mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-29 20:04:11 +00:00
vtysh: rework DEFPY processing in extract.pl
Currently, all DEFPY commands are translated into one-liners in vtysh_cmd.c. After the patch, DEFPY commands are correctly indented just like DEFUN/ALIAS commands. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
67ce4ba19b
commit
dc47ff5c3a
@ -328,18 +328,6 @@ struct cmd_node {
|
|||||||
DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, \
|
DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, \
|
||||||
CMD_ATTR_DEPRECATED, daemon)
|
CMD_ATTR_DEPRECATED, daemon)
|
||||||
|
|
||||||
#else /* VTYSH_EXTRACT_PL */
|
|
||||||
#define DEFPY(funcname, cmdname, cmdstr, helpstr) \
|
|
||||||
DEFUN(funcname, cmdname, cmdstr, helpstr)
|
|
||||||
|
|
||||||
#define DEFPY_NOSH(funcname, cmdname, cmdstr, helpstr) \
|
|
||||||
DEFUN_NOSH(funcname, cmdname, cmdstr, helpstr)
|
|
||||||
|
|
||||||
#define DEFPY_ATTR(funcname, cmdname, cmdstr, helpstr, attr) \
|
|
||||||
DEFUN_ATTR(funcname, cmdname, cmdstr, helpstr, attr)
|
|
||||||
|
|
||||||
#define DEFPY_HIDDEN(funcname, cmdname, cmdstr, helpstr) \
|
|
||||||
DEFUN_HIDDEN(funcname, cmdname, cmdstr, helpstr)
|
|
||||||
#endif /* VTYSH_EXTRACT_PL */
|
#endif /* VTYSH_EXTRACT_PL */
|
||||||
|
|
||||||
/* Some macroes */
|
/* Some macroes */
|
||||||
|
@ -48,7 +48,7 @@ sub scan_file {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ?: makes a group non-capturing
|
# ?: makes a group non-capturing
|
||||||
@defun = ($line =~ /((?:DEFUN|DEFUN_HIDDEN|ALIAS|ALIAS_HIDDEN)\s*\(.+?\));?\s?\s?\n/sg);
|
@defun = ($line =~ /((?:DEFUN|DEFUN_HIDDEN|ALIAS|ALIAS_HIDDEN|DEFPY|DEFPY_HIDDEN)\s*\(.+?\));?\s?\s?\n/sg);
|
||||||
@install = ($line =~ /install_element\s*\(\s*[0-9A-Z_]+,\s*&[^;]*;\s*\n/sg);
|
@install = ($line =~ /install_element\s*\(\s*[0-9A-Z_]+,\s*&[^;]*;\s*\n/sg);
|
||||||
|
|
||||||
# DEFUN process
|
# DEFUN process
|
||||||
|
Loading…
Reference in New Issue
Block a user