ustr_const (3) - Linux Manuals
ustr_const: ustr string library constants
Command to display ustr_const
manual in Linux: $ man 3 ustr_const
NAME
ustr_const - ustr string library constants
SYNOPSIS
#include "ustr.h"
USTR_CONF_INCLUDE_CODEONLY_HEADERS
USTR_CONF_USE_EOS_MARK
USTR_CONF_USE_ASSERT
USTR_CONF_COMPILE_USE_ATTRIBUTES
USTR_CONF_COMPILE_TYPEDEF
USTR_CONF_COMPILE_USE_INLINE
USTR_BEG_CONST1
USTR_BEG_CONST2
USTR_BEG_CONST4
USTR_BEG_FIXED1
USTR_BEG_FIXED2
USTR_BEG_FIXED4
USTR_BEG_FIXED8
USTR_END_ALOCDx
USTR_END_CONSTx
USTR_END_FIXEDx
USTR_FLAG_PARSE_NUM_DEF
USTR_FLAG_PARSE_NUM_SEP
USTR_FLAG_PARSE_NUM_OVERFLOW
USTR_FLAG_PARSE_NUM_SPACE
USTR_FLAG_PARSE_NUM_NO_BEG_ZERO
USTR_FLAG_PARSE_NUM_NO_BEG_PM
USTR_FLAG_PARSE_NUM_NO_NEGATIVE
USTR_FLAG_PARSE_NUM_EXACT
USTR_TYPE_PARSE_NUM_ERR_NONE
USTR_TYPE_PARSE_NUM_ERR_ONLY_S
USTR_TYPE_PARSE_NUM_ERR_ONLY_SPM
USTR_TYPE_PARSE_NUM_ERR_ONLY_SPMX
USTR_TYPE_PARSE_NUM_ERR_OOB
USTR_TYPE_PARSE_NUM_ERR_OVERFLOW
USTR_TYPE_PARSE_NUM_ERR_NEGATIVE
USTR_TYPE_PARSE_NUM_ERR_BEG_ZERO
USTR_FLAG_SPLIT_DEF
USTR_FLAG_SPLIT_RET_SEP
USTR_FLAG_SPLIT_RET_NON
USTR_FLAG_SPLIT_KEEP_CONFIG
USTR_NULL
USTR_POOL_NULL
USTR_TRUE
USTR_FALSE
USTR_CNTL_OPT_GET_REF_BYTES
USTR_CNTL_OPT_SET_REF_BYTES
USTR_CNTL_OPT_GET_HAS_SIZE
USTR_CNTL_OPT_SET_HAS_SIZE
USTR_CNTL_OPT_GET_EXACT_BYTES
USTR_CNTL_OPT_SET_EXACT_BYTES
USTR_CNTL_OPT_GET_MEM
USTR_CNTL_OPT_SET_MEM
USTR_CNTL_OPT_GET_MC_M_SCRUB
USTR_CNTL_OPT_SET_MC_M_SCRUB
USTR_CNTL_OPT_GET_MC_F_SCRUB
USTR_CNTL_OPT_SET_MC_F_SCRUB
USTR_CNTL_OPT_GET_MC_R_SCRUB
USTR_CNTL_OPT_SET_MC_R_SCRUB
USTR_CNTL_OPT_GET_FMT
USTR_CNTL_OPT_SET_FMT
USTR_POOL_LL_CNTL_GET_FREE_CMP
USTR_POOL_LL_CNTL_SET_FREE_CMP
USTR_POOL_LL_CNTL_GET_REALLOC
USTR_POOL_LL_CNTL_SET_REALLOC
Constant: USTR_CONF_INCLUDE_CODEONLY_HEADERS
Explanation:
This switch controls whether all the code will be included as inline functions. Having this be non-zero means that you don't have to link against the library.
Constant: USTR_CONF_USE_EOS_MARK
Explanation:
This switch turns on End of String markers, so any bounds overflow will be noticed by ustr_assert_valid().
Note:
Changing this will not do anything useful unless USTR_CONF_INCLUDE_CODEONLY_HEADERS is non-zero.
Constant: USTR_CONF_USE_ASSERT
Explanation:
This switch turns USTR_ASSERT() calls on, so the code within them will be evaluated. Note that there are many calls to ustr_assert_valid() within USTR_ASSERT() macros and that call is relatively expensive.
Note:
Changing this will not do anything useful unless USTR_CONF_INCLUDE_CODEONLY_HEADERS is non-zero.
Constant: USTR_CONF_COMPILE_USE_ATTRIBUTES
Explanation:
This switch controls whether gcc type __attribute__() statements are used in the public headers headers for the library. If the value is 1 then if they are supported by the compiler that built the library they will be used, if the value is 0 they won't be used at all.
Constant: USTR_CONF_COMPILE_TYPEDEF
Explanation:
This switch controls whether typedef will be used for the structs in the public headers for the library. If the value is 1 then they will be used, if the value is 0 they won't be used at all (and your code will have to use struct tags instead -- note all libraries using ustr should compile without this option set).
Constant: USTR_CONF_COMPILE_USE_INLINE
Explanation:
This switch controls whether inline functions will be used in a few cases where the function bodies are very small.
Note:
In some cases this is used so that GCC can eliminate calls to strlen(), for the *_cstr() functions.
Constants to created fixed/read-only Ustr's
Constant: USTR_BEG_CONST1
Explanation:
This macro is a constant C-style string of the first byte of a constant/read-only Ustr that has a length in the range 0-255.
Constant: USTR_BEG_CONST2
Explanation:
This macro is a constant C-style string of the first byte of a constant/read-only Ustr that has a length in the range 0-65535.
Constant: USTR_BEG_CONST4
Explanation:
This macro is a constant C-style string of the first byte of a constant/read-only Ustr that has a length in the range 0-4294967295.
Constant: USTR_BEG_FIXED1
Explanation:
This macro is a constant C-style string of the first byte of a fixed Ustr that has a length in the range 0-255.
Constant: USTR_BEG_FIXED2
Explanation:
This macro is a constant C-style string of the first byte of a fixed Ustr that has a length in the range 0-65535.
Constant: USTR_BEG_FIXED4
Explanation:
This macro is a constant C-style string of the first byte of a fixed Ustr that has a length in the range 0-4294967295.
Constant: USTR_BEG_FIXED8
Explanation:
This macro is a constant C-style string of the first byte of a fixed Ustr that has a length in the range 0-18446744073709551615.
Note:
This macro is only available if the Ustr code was compiled in a 64bit environment.
Constant: USTR_END_ALOCDx
Explanation:
This macro is a constant C-style string of the last bytes of an allocated Ustr.
Note:
Unless USTR_CONF_USE_EOS_MARK is non-zero, this is just the NIL byte.
Constant: USTR_END_CONSTx
Explanation:
This macro is a constant C-style string of the last bytes of a constant/read-only Ustr.
Note:
Unless USTR_CONF_USE_EOS_MARK is non-zero, this is just the NIL byte.
Constant: USTR_END_FIXEDx
Explanation:
This macro is a constant C-style string of the last bytes of a fixed Ustr.
Note:
Unless USTR_CONF_USE_EOS_MARK is non-zero, this is just the NIL byte.
Constants to use with parsing numbers: ustr_parse_uintmaxx, etc.
Constant: USTR_FLAG_PARSE_NUM_DEF
Explanation:
Default flags, this is merely 0 but can be used as live documentation.
Constant: USTR_FLAG_PARSE_NUM_SEP
Explanation:
This flag allows the parsing (and ignoring) of the seperator character, at arbitrary pointers in the number, so "1234" and "1_234" would both parse the same (assuming "_" is the seperator).
Constant: USTR_FLAG_PARSE_NUM_OVERFLOW
Explanation:
This flag turns on the overflow checking, in other words without it USTR_TYPE_PARSE_NUM_ERR_OVERFLOW will never be returned as an error code.
Constant: USTR_FLAG_PARSE_NUM_SPACE
Explanation:
This flag allows one or more ' ' (Space) characters before the number or number prefix (Plus Sign, Hyphen).
Note:
Other forms of whitespace don't count, this just affects ' '.
Constant: USTR_FLAG_PARSE_NUM_NO_BEG_ZERO
Explanation:
This flag disallows one or more '0' (Digit Zero) characters before the number.
Constant: USTR_FLAG_PARSE_NUM_NO_BEG_PM
Explanation:
This flag disallows a plus or a minus character before the number.
Constant: USTR_FLAG_PARSE_NUM_NO_NEGATIVE
Explanation:
This flag disallows negative values.
Constant: USTR_FLAG_PARSE_NUM_EXACT
Explanation:
This flag makes the parsing functions return an error if the entire string doesn't contain the number being parsed.
Constant: USTR_TYPE_PARSE_NUM_ERR_NONE
Explanation:
This error code has the value 0, and means that no error occurred parsing the number.