87#define NCX_MAX_DEC64_DIGITS 18
dlq provides general double-linked list and queue support:
log_debug_t
The debug level enumerations used in util/log.c.
Definition: log.h:348
status_t
global error return code
Definition: status_enum.h:210
ncx_numfmt_t
Enumeration of number format types.
Definition: ncxtypes.h:497
ncx_btype_t
enumeration of the built-in NCX types These types cannot be overridden and cannot be imported
Definition: ncxtypes.h:213
boolean ncx_num_is_nan(ncx_num_t *num, ncx_btype_t btyp)
Check if a FP number is set to the Not a Number value.
Definition: ncx_num.c:609
boolean ncx_num_zero(const ncx_num_t *num, ncx_btype_t btyp)
Compare a ncx_num_t to zero.
Definition: ncx_num.c:643
void ncx_printf_num(const ncx_num_t *num, ncx_btype_t btyp, log_debug_t level)
Printf a ncx_num_t contents using logging functions.
Definition: ncx_num.c:2406
status_t ncx_convert_dec64(const xmlChar *numstr, ncx_numfmt_t numfmt, uint8 digits, ncx_num_t *val)
Convert a number string to a decimal64 number.
Definition: ncx_num.c:1022
void ncx_set_num_nan(ncx_num_t *num, ncx_btype_t btyp)
Set a FP number to the Not a Number value.
Definition: ncx_num.c:576
status_t ncx_decode_dec64(const xmlChar *numstr, uint8 digits, ncx_num_t *retnum)
Handle some sort of decimal64 number string (NCX_BT_DECIMAL64)
Definition: ncx_num.c:1579
void ncx_set_num_one(ncx_num_t *num, ncx_btype_t btyp)
Set a number to one.
Definition: ncx_num.c:480
status_t ncx_convert_tkcnum(tk_chain_t *tkc, ncx_btype_t btyp, ncx_num_t *val)
Convert the current token in a token chain to a ncx_num_t struct.
Definition: ncx_num.c:2864
void ncx_clean_num(ncx_btype_t btyp, ncx_num_t *num)
Scrub the memory in a ncx_num_t by freeing all the sub-fields.
Definition: ncx_num.c:186
int64 ncx_cvt_to_int64(const ncx_num_t *num, ncx_btype_t btyp)
Convert a number to an integer64; Use rounding for float64.
Definition: ncx_num.c:2299
status_t ncx_copy_num(const ncx_num_t *num1, ncx_num_t *num2, ncx_btype_t btyp)
Copy the contents of num1 to num2.
Definition: ncx_num.c:1645
status_t ncx_sprintf_num(xmlChar *buff, const ncx_num_t *num, ncx_btype_t btyp, uint32 *len)
Sprintf a ncx_num_t contents.
Definition: ncx_num.c:2543
ncx_numfmt_t ncx_get_numfmt(const xmlChar *numstr)
Get the number format of the specified string.
Definition: ncx_num.c:2358
void ncx_audit_printf_num(const ncx_num_t *num, ncx_btype_t btyp)
Printf a ncx_num_t contents to the audit log file.
Definition: ncx_num.c:2502
void ncx_init_num(ncx_num_t *num)
Init a ncx_num_t struct.
Definition: ncx_num.c:161
void ncx_set_num_max(ncx_num_t *num, ncx_btype_t btyp)
Set a number to the maximum value for its type.
Definition: ncx_num.c:418
void ncx_alt_printf_num(const ncx_num_t *num, ncx_btype_t btyp)
Printf a ncx_num_t contents to the alternate log file.
Definition: ncx_num.c:2468
boolean ncx_is_max(const ncx_num_t *num, ncx_btype_t btyp)
Return TRUE if the specified number is the max value for its type.
Definition: ncx_num.c:2805
status_t ncx_round_num(const ncx_num_t *num1, ncx_num_t *num2, ncx_btype_t btyp)
Get the rounded value of a number.
Definition: ncx_num.c:2162
int64 ncx_get_dec64_fraction(const ncx_num_t *num)
Get the fraction part of a decimal64 number.
Definition: ncx_num.c:3008
void ncx_set_num_zero(ncx_num_t *num, ncx_btype_t btyp)
Set a number to zero.
Definition: ncx_num.c:528
status_t ncx_convert_num(const xmlChar *numstr, ncx_numfmt_t numfmt, ncx_btype_t btyp, ncx_num_t *val)
Convert a number string to a numeric type.
Definition: ncx_num.c:695
status_t ncx_cast_num(const ncx_num_t *num1, ncx_btype_t btyp1, ncx_num_t *num2, ncx_btype_t btyp2)
Cast a number as another number type.
Definition: ncx_num.c:1709
boolean ncx_num_is_integral(const ncx_num_t *num, ncx_btype_t btyp)
Check if the number is integral or if it has a fractional part.
Definition: ncx_num.c:2236
void ncx_printf_num_ex(const ncx_num_t *num, ncx_btype_t btyp, log_debug_t level, FILE *overrideOut)
Printf a ncx_num_t contents (write to a file)
Definition: ncx_num.c:2426
status_t ncx_convert_cbor_dec64(int64 mantissa, int64 basenum, uint8 digits, ncx_num_t *val)
Convert a CBOR decimal bignum to a decimal64 number.
Definition: ncx_num.c:1280
int32 ncx_compare_nums(const ncx_num_t *num1, const ncx_num_t *num2, ncx_btype_t btyp)
Compare 2 ncx_num_t union contents.
Definition: ncx_num.c:236
void ncx_set_num_min(ncx_num_t *num, ncx_btype_t btyp)
Set a number to the minimum value for its type.
Definition: ncx_num.c:360
status_t ncx_convert_tkc_dec64(tk_chain_t *tkc, uint8 digits, ncx_num_t *val)
Convert the current token in a token chain to a ncx_num_t struct, expecting NCX_BT_DECIMAL64.
Definition: ncx_num.c:2923
status_t ncx_num_ceiling(const ncx_num_t *num1, ncx_num_t *num2, ncx_btype_t btyp)
Get the ceiling value of a number.
Definition: ncx_num.c:2084
status_t ncx_decode_num(const xmlChar *numstr, ncx_btype_t btyp, ncx_num_t *retnum)
Handle some sort of number string.
Definition: ncx_num.c:1486
int64 ncx_get_dec64_base(const ncx_num_t *num)
Get the base part of a decimal64 number.
Definition: ncx_num.c:2978
status_t ncx_decode_num_ex(const xmlChar *numstr, ncx_btype_t btyp, ncx_num_t *retnum, typ_def_t *typdef)
Handle some sort of number string EXTENDED.
Definition: ncx_num.c:1510
boolean ncx_is_min(const ncx_num_t *num, ncx_btype_t btyp)
Return TRUE if the specified number is the min value for its type.
Definition: ncx_num.c:2750
status_t ncx_set_num_from_uint64(ncx_num_t *retval, uint64 val, ncx_btype_t btyp, boolean is_neg)
Set the number from a uint64 plus sign flag.
Definition: ncx_num.c:3040
status_t ncx_num_floor(const ncx_num_t *num1, ncx_num_t *num2, ncx_btype_t btyp)
Get the floor value of a number.
Definition: ncx_num.c:2007
YANG module data structures Many internal representations of YANG module constructs.
token parsing chain (main parser control block)
Definition: tk.h:415
Discriminated union for all data typedefs.
Definition: typ.h:458
NCX Syntax Token Handler.
union of all the basic number types if float not supported, then it is stored as an int64
Definition: ncxtypes.h:784
Value Node Basic Support.
YANG Module parser utilities.