Keyword "min" (not only "max") can be used in built-in types "range" and "length" statements.
This commit is contained in:
parent
bd67a2a5f2
commit
c7e847cd24
14 changed files with 469 additions and 405 deletions
|
|
@ -87,6 +87,7 @@ int uri_percent_decode(char *enc, char **str);
|
|||
const char *clicon_int2str(const map_str2int *mstab, int i);
|
||||
int clicon_str2int(const map_str2int *mstab, char *str);
|
||||
int nodeid_split(char *nodeid, char **prefix, char **id);
|
||||
char *clixon_trim(char *str);
|
||||
#ifndef HAVE_STRNDUP
|
||||
char *clicon_strndup (const char *, size_t);
|
||||
#endif /* ! HAVE_STRNDUP */
|
||||
|
|
|
|||
|
|
@ -176,8 +176,7 @@ typedef struct yang_stmt yang_stmt; /* forward */
|
|||
*/
|
||||
struct yang_type_cache{
|
||||
int yc_options;
|
||||
cg_var *yc_mincv;
|
||||
cg_var *yc_maxcv;
|
||||
cvec *yc_cvv; /* range and length restriction */
|
||||
char *yc_pattern;
|
||||
uint8_t yc_fraction;
|
||||
yang_stmt *yc_resolved; /* Resolved type object, can be NULL - note direct ptr */
|
||||
|
|
|
|||
|
|
@ -55,11 +55,11 @@
|
|||
* Prototypes
|
||||
*/
|
||||
int yang_type_cache_set(yang_type_cache **ycache,
|
||||
yang_stmt *resolved, int options, cg_var *mincv,
|
||||
cg_var *maxcv, char *pattern, uint8_t fraction);
|
||||
int yang_type_cache_get(yang_type_cache *ycache,
|
||||
yang_stmt **resolved, int *options, cg_var **mincv,
|
||||
cg_var **maxcv, char **pattern, uint8_t *fraction);
|
||||
yang_stmt *resolved, int options,
|
||||
cvec *cvv, char *pattern, uint8_t fraction);
|
||||
int yang_type_cache_get(yang_type_cache *ycache, yang_stmt **resolved,
|
||||
int *options, cvec **cvv, char **pattern,
|
||||
uint8_t *fraction);
|
||||
int yang_type_cache_cp(yang_type_cache **ycnew, yang_type_cache *ycold);
|
||||
int yang_type_cache_free(yang_type_cache *ycache);
|
||||
int ys_resolve_type(yang_stmt *ys, void *arg);
|
||||
|
|
@ -69,12 +69,11 @@ yang_stmt *yang_find_identity(yang_stmt *ys, char *identity);
|
|||
int ys_cv_validate(cg_var *cv, yang_stmt *ys, char **reason);
|
||||
int clicon_type2cv(char *type, char *rtype, enum cv_type *cvtype);
|
||||
int yang_type_get(yang_stmt *ys, char **otype, yang_stmt **restype,
|
||||
int *options, cg_var **mincv, cg_var **maxcv, char **pattern,
|
||||
int *options, cvec **cvv, char **pattern,
|
||||
uint8_t *fraction_digits);
|
||||
int yang_type_resolve(yang_stmt *ys, yang_stmt *ytype,
|
||||
yang_stmt **restype, int *options,
|
||||
cg_var **mincv, cg_var **maxcv,
|
||||
char **pattern, uint8_t *fraction);
|
||||
int yang_type_resolve(yang_stmt *ys, yang_stmt *ytype,
|
||||
yang_stmt **restype, int *options,
|
||||
cvec **cvv, char **pattern, uint8_t *fraction);
|
||||
|
||||
|
||||
#endif /* _CLIXON_YANG_TYPE_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue