Dedicated xml,json,yang and xsl parser utility programs added
Sanity check of stdarg (...) added Cleanup of error messages.
This commit is contained in:
parent
1306174071
commit
85c4782e36
56 changed files with 1004 additions and 379 deletions
|
|
@ -85,7 +85,11 @@ extern char clicon_err_reason[ERR_STRLEN];
|
|||
* Prototypes
|
||||
*/
|
||||
int clicon_err_reset(void);
|
||||
#if defined(__GNUC__) && __GNUC__ >= 3
|
||||
int clicon_err_fn(const char *fn, const int line, int level, int err, char *format, ...) __attribute__ ((format (printf, 5, 6)));
|
||||
#else
|
||||
int clicon_err_fn(const char *fn, const int line, int level, int err, char *format, ...);
|
||||
#endif
|
||||
char *clicon_strerror(int err);
|
||||
void *clicon_err_save(void);
|
||||
int clicon_err_restore(void *handle);
|
||||
|
|
|
|||
|
|
@ -62,10 +62,16 @@ extern int debug;
|
|||
int clicon_log_init(char *ident, int upto, int flags);
|
||||
int clicon_get_logflags(void);
|
||||
int clicon_log_str(int level, char *msg);
|
||||
#if defined(__GNUC__) && __GNUC__ >= 3
|
||||
int clicon_log(int level, char *format, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
int clicon_debug(int dbglevel, char *format, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
#else
|
||||
int clicon_log(int level, char *format, ...);
|
||||
int clicon_debug(int dbglevel, char *format, ...);
|
||||
#endif
|
||||
clicon_log_notify_t *clicon_log_register_callback(clicon_log_notify_t *cb, void *arg);
|
||||
int clicon_debug_init(int dbglevel, FILE *f);
|
||||
int clicon_debug(int dbglevel, char *format, ...);
|
||||
|
||||
char *mon2name(int md);
|
||||
|
||||
#endif /* _CLIXON_LOG_H_ */
|
||||
|
|
|
|||
|
|
@ -61,7 +61,11 @@ struct clicon_msg {
|
|||
char *format_int2str(enum format_enum showas);
|
||||
enum format_enum format_str2int(char *str);
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 3
|
||||
struct clicon_msg *clicon_msg_encode(char *format, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
#else
|
||||
struct clicon_msg *clicon_msg_encode(char *format, ...);
|
||||
#endif
|
||||
int clicon_msg_decode(struct clicon_msg *msg, cxobj **xml);
|
||||
|
||||
int clicon_connect_unix(char *sockpath);
|
||||
|
|
|
|||
|
|
@ -39,10 +39,17 @@
|
|||
/*
|
||||
* Prototypes
|
||||
*/
|
||||
#if defined(__GNUC__) && __GNUC__ >= 3
|
||||
cxobj *xpath_first(cxobj *cxtop, char *format, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
int xpath_vec(cxobj *cxtop, char *format, cxobj ***vec, size_t *veclen, ...) __attribute__ ((format (printf, 2, 5)));
|
||||
int xpath_vec_flag(cxobj *cxtop, char *format, uint16_t flags,
|
||||
cxobj ***vec, size_t *veclen, ...) __attribute__ ((format (printf, 2, 6)));
|
||||
#else
|
||||
cxobj *xpath_first(cxobj *cxtop, char *format, ...);
|
||||
cxobj *xpath_each(cxobj *xn_top, char *xpath, cxobj *prev);
|
||||
int xpath_vec(cxobj *cxtop, char *format, cxobj ***vec, size_t *veclen, ...);
|
||||
int xpath_vec_flag(cxobj *cxtop, char *xpath, uint16_t flags,
|
||||
cxobj ***vec, size_t *veclen, ...);
|
||||
#endif
|
||||
cxobj *xpath_each(cxobj *xn_top, char *xpath, cxobj *prev);
|
||||
|
||||
#endif /* _CLIXON_XSL_H */
|
||||
|
|
|
|||
|
|
@ -257,6 +257,7 @@ char *yang_find_myprefix(yang_stmt *ys);
|
|||
int yang_order(yang_stmt *y);
|
||||
int yang_print(FILE *f, yang_node *yn);
|
||||
int yang_print_cbuf(cbuf *cb, yang_node *yn, int marginal);
|
||||
yang_stmt *yang_parse_file(int fd, const char *name, yang_spec *ysp);
|
||||
int yang_parse(clicon_handle h, const char *yang_dir,
|
||||
const char *module, const char *revision, yang_spec *ysp);
|
||||
int yang_apply(yang_node *yn, enum rfc_6020 key, yang_applyfn_t fn,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue