Enhanced for client-side functionality:

- parse of yang from string, not only file
- Decode of xml encoding, not only decoding
This commit is contained in:
Olof Hagsand 2023-01-02 21:25:49 +01:00
parent 0df023c70e
commit 99c6f61637
7 changed files with 158 additions and 7 deletions

View file

@ -95,6 +95,7 @@ int uri_str2cvec(char *string, char delim1, char delim2, int decode, cvec **c
int uri_percent_encode(char **encp, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
int xml_chardata_encode(char **escp, const char *fmt, ... ) __attribute__ ((format (printf, 2, 3)));
int xml_chardata_cbuf_append(cbuf *cb, char *str);
int xml_chardata_decode(char **escp, const char *fmt,...);
int uri_percent_decode(char *enc, char **str);
const char *clicon_int2str(const map_str2int *mstab, int i);

View file

@ -55,6 +55,7 @@ yang_stmt *yang_parse_file(FILE *fp, const char *name, yang_stmt *ysp);
yang_stmt *yang_parse_filename(const char *filename, yang_stmt *ysp);
int yang_spec_parse_module(clicon_handle h, const char *module,
const char *revision, yang_stmt *yspec);
yang_stmt *yang_parse_str(char *str, const char *name, yang_stmt *yspec);
int yang_spec_parse_file(clicon_handle h, char *filename, yang_stmt *yspec);
int yang_spec_load_dir(clicon_handle h, char *dir, yang_stmt *yspec);
int ys_parse_date_arg(char *datearg, uint32_t *dateint);