* Added xml_wrap function that adds an XML node above a node as a wrapper
* also renamed `xml_insert` to `xml_wrap_all`. * Added `clicon_argv_get()` function to get the user command-line options, ie the args in `-- <args>`. This is an alternative to using them passed to `plugin_start()`.
This commit is contained in:
parent
8624be0a67
commit
6ff36a2894
9 changed files with 642 additions and 54 deletions
|
|
@ -214,4 +214,8 @@ int clicon_module_state_set(clicon_handle h, cxobj *xms);
|
|||
cxobj *clicon_xml_changelog_get(clicon_handle h);
|
||||
int clicon_xml_changelog_set(clicon_handle h, cxobj *xchlog);
|
||||
|
||||
/*! Set and get user command-line options (after --) */
|
||||
int clicon_argv_get(clicon_handle h, int *argc, char ***argv);
|
||||
int clicon_argv_set(clicon_handle h, char *argv0, int argc, char **argv);
|
||||
|
||||
#endif /* _CLIXON_OPTIONS_H_ */
|
||||
|
|
|
|||
|
|
@ -127,7 +127,9 @@ int xml_cv_set(cxobj *x, cg_var *cv);
|
|||
cxobj *xml_find(cxobj *xn_parent, char *name);
|
||||
|
||||
int xml_addsub(cxobj *xp, cxobj *xc);
|
||||
cxobj *xml_insert(cxobj *xt, char *tag);
|
||||
cxobj *xml_wrap_all(cxobj *xp, char *tag);
|
||||
cxobj *xml_wrap(cxobj *xc, char *tag);
|
||||
#define xml_insert(x,t) xml_wrap_all((x),(t))
|
||||
int xml_purge(cxobj *xc);
|
||||
int xml_child_rm(cxobj *xp, int i);
|
||||
int xml_rm(cxobj *xc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue