Text and number formatting, the limits, and one table per kind of thing written. More...
#include "mmgr.h"Go to the source code of this file.
Data Structures | |
| struct | VerbaTextusCfg |
| Arguments for the entries that write text into a buffer. More... | |
| struct | VerbaScriboTextusNs |
| Type of the verba_textus dispatch table. More... | |
| struct | VerbaLitteraCfg |
| Arguments for the entries that write one character. More... | |
| struct | VerbaScriboLitteraNs |
| Type of the verba_littera dispatch table. More... | |
| struct | VerbaNumerusCfg |
| Arguments for the entries that write an integer. More... | |
| struct | VerbaScriboNumerusNs |
| Type of the verba_numerus dispatch table. More... | |
| struct | VerbaFractioCfg |
| Arguments for the entries that write a double. More... | |
| struct | VerbaScriboFractioNs |
| Type of the verba_fractio dispatch table. More... | |
| struct | VerbaFinisCfg |
| Arguments for the entries that write the buffer itself, with no value to place in it. More... | |
| struct | VerbaScriboFinisNs |
| Type of the verba_finis dispatch table. More... | |
Macros | |
| #define | MMGR_G_MAX_SIG |
| Expands to 18u, the most significant digits mmgr_verba_g will keep. | |
| #define | MMGR_FIXED_MAX_DECIMALS |
| Expands to 18u, the most digits after the point mmgr_verba_fixed will write. | |
Functions | |
| size_t | mmgr_verba_put_n (const VerbaTextusCfg *args) |
| Writes a counted run of text. | |
| size_t | mmgr_verba_put (const VerbaTextusCfg *args) |
| Writes a terminated string, measuring it first. | |
| size_t | mmgr_verba_put_clip (const VerbaTextusCfg *args) |
| Writes as much of a string as fits. | |
| size_t | mmgr_verba_xml (const VerbaTextusCfg *args) |
| Writes text with the four XML entities substituted. | |
| size_t | mmgr_verba_json (const VerbaTextusCfg *args) |
| Writes text as a quoted JSON string. | |
| size_t | mmgr_verba_ch (const VerbaLitteraCfg *args) |
| Writes one character. | |
| size_t | mmgr_verba_u64_clip (const VerbaNumerusCfg *args) |
| Writes a value right aligned, padded with spaces. | |
| size_t | mmgr_verba_uint (const VerbaNumerusCfg *args) |
| Writes a value in the base the caller gives. | |
| size_t | mmgr_verba_u32w (const VerbaNumerusCfg *args) |
| Writes a value in base ten, padded to min digits. | |
| size_t | mmgr_verba_hex (const VerbaNumerusCfg *args) |
| Writes a value in lower case base sixteen. | |
| size_t | mmgr_verba_u32 (const VerbaNumerusCfg *args) |
| Writes a value in base ten, unpadded. | |
| size_t | mmgr_verba_u64 (const VerbaNumerusCfg *args) |
| Writes a value in base ten, unpadded. | |
| size_t | mmgr_verba_i64 (const VerbaNumerusCfg *args) |
| Writes a signed value in base ten. | |
| size_t | mmgr_verba_g (const VerbaFractioCfg *args) |
| Writes a double to a significant digit count. | |
| size_t | mmgr_verba_fixed (const VerbaFractioCfg *args) |
| Writes a double to a decimal count. | |
| embed_bool | mmgr_verba_sign_bit (const VerbaFractioCfg *args) |
| Reports a double's sign bit. | |
| embed_bool | mmgr_verba_is_inf (const VerbaFractioCfg *args) |
| Reports whether a double is an infinity. | |
| embed_bool | mmgr_verba_is_nan (const VerbaFractioCfg *args) |
| Reports whether a double is a NaN. | |
| size_t | mmgr_verba_finish (const VerbaFinisCfg *args) |
| Stores the terminator and reports the length. | |
| embed_bool | mmgr_verba_ok (const VerbaFinisCfg *args) |
| Reports whether there is still room. | |
Variables | |
| static const VerbaScriboTextusNs | verba_textus |
| Dispatch table instance named verba_textus, with each member set to its mmgr_verba_ function. | |
| static const VerbaScriboLitteraNs | verba_littera |
| Dispatch table instance named verba_littera, whose one member is set to mmgr_verba_ch. | |
| static const VerbaScriboNumerusNs | verba_numerus |
| Dispatch table instance named verba_numerus, with each member set to its mmgr_verba_ function. | |
| static const VerbaScriboFractioNs | verba_fractio |
| Dispatch table instance named verba_fractio, with each member set to its mmgr_verba_ function. | |
| static const VerbaScriboFinisNs | verba_finis |
| Dispatch table instance named verba_finis, with each member set to its mmgr_verba_ function. | |
Text and number formatting, the limits, and one table per kind of thing written.
Definition in file verba_scribo.h.
| #define MMGR_G_MAX_SIG |
Expands to 18u, the most significant digits mmgr_verba_g will keep.
Definition at line 32 of file verba_scribo.h.
| #define MMGR_FIXED_MAX_DECIMALS |
Expands to 18u, the most digits after the point mmgr_verba_fixed will write.
Definition at line 39 of file verba_scribo.h.
| size_t mmgr_verba_put_n | ( | const VerbaTextusCfg * | args | ) |
Writes a counted run of text.
| [in] | args | Buffer, capacity, offset, text and its length [BORROWS]. |
References mmgr_verba_put_n().
Referenced by mmgr_verba_put_n().
| size_t mmgr_verba_put | ( | const VerbaTextusCfg * | args | ) |
Writes a terminated string, measuring it first.
| [in] | args | Buffer, capacity, offset and the text [BORROWS]. |
References mmgr_verba_put().
Referenced by mmgr_verba_put().
| size_t mmgr_verba_put_clip | ( | const VerbaTextusCfg * | args | ) |
Writes as much of a string as fits.
| [in] | args | Buffer, capacity, offset and the text [BORROWS]. |
References mmgr_verba_put_clip().
Referenced by mmgr_verba_put_clip().
| size_t mmgr_verba_xml | ( | const VerbaTextusCfg * | args | ) |
Writes text with the four XML entities substituted.
| [in] | args | Buffer, capacity, offset and the text [BORROWS]. |
References mmgr_verba_xml().
Referenced by mmgr_verba_xml().
| size_t mmgr_verba_json | ( | const VerbaTextusCfg * | args | ) |
Writes text as a quoted JSON string.
| [in] | args | Buffer, capacity, offset and the text [BORROWS]. |
References mmgr_verba_json().
Referenced by mmgr_verba_json().
| size_t mmgr_verba_ch | ( | const VerbaLitteraCfg * | args | ) |
Writes one character.
| [in] | args | Buffer, capacity, offset and the character [BORROWS]. |
References mmgr_verba_ch().
Referenced by mmgr_verba_ch().
| size_t mmgr_verba_u64_clip | ( | const VerbaNumerusCfg * | args | ) |
Writes a value right aligned, padded with spaces.
| [in] | args | Buffer, capacity, offset, the value and the column count [BORROWS]. |
References mmgr_verba_u64_clip().
Referenced by mmgr_verba_u64_clip().
| size_t mmgr_verba_uint | ( | const VerbaNumerusCfg * | args | ) |
Writes a value in the base the caller gives.
| [in] | args | Buffer, capacity, offset, the value, the base and the least digit count [BORROWS]. |
References mmgr_verba_uint().
Referenced by mmgr_verba_uint().
| size_t mmgr_verba_u32w | ( | const VerbaNumerusCfg * | args | ) |
Writes a value in base ten, padded to min digits.
| [in] | args | Buffer, capacity, offset, the value and the least digit count [BORROWS]. |
References mmgr_verba_u32w().
Referenced by mmgr_verba_u32w().
| size_t mmgr_verba_hex | ( | const VerbaNumerusCfg * | args | ) |
Writes a value in lower case base sixteen.
| [in] | args | Buffer, capacity, offset, the value and the least digit count [BORROWS]. |
References mmgr_verba_hex().
Referenced by mmgr_verba_hex().
| size_t mmgr_verba_u32 | ( | const VerbaNumerusCfg * | args | ) |
Writes a value in base ten, unpadded.
| [in] | args | Buffer, capacity, offset and the value [BORROWS]. |
References mmgr_verba_u32().
Referenced by mmgr_verba_u32().
| size_t mmgr_verba_u64 | ( | const VerbaNumerusCfg * | args | ) |
Writes a value in base ten, unpadded.
| [in] | args | Buffer, capacity, offset and the value [BORROWS]. |
References mmgr_verba_u64().
Referenced by mmgr_verba_u64().
| size_t mmgr_verba_i64 | ( | const VerbaNumerusCfg * | args | ) |
Writes a signed value in base ten.
| [in] | args | Buffer, capacity, offset and the signed value in sval [BORROWS]. |
References mmgr_verba_i64().
Referenced by mmgr_verba_i64().
| size_t mmgr_verba_g | ( | const VerbaFractioCfg * | args | ) |
Writes a double to a significant digit count.
| [in] | args | Buffer, capacity, offset, the value and the significant digit count [BORROWS]. |
References mmgr_verba_g().
Referenced by mmgr_verba_g().
| size_t mmgr_verba_fixed | ( | const VerbaFractioCfg * | args | ) |
Writes a double to a decimal count.
| [in] | args | Buffer, capacity, offset, the value and the decimal count [BORROWS]. |
References mmgr_verba_fixed().
Referenced by mmgr_verba_fixed().
| embed_bool mmgr_verba_sign_bit | ( | const VerbaFractioCfg * | args | ) |
Reports a double's sign bit.
| [in] | args | The value to test, as args->real [BORROWS]. |
References mmgr_verba_sign_bit().
Referenced by mmgr_verba_sign_bit().
| embed_bool mmgr_verba_is_inf | ( | const VerbaFractioCfg * | args | ) |
Reports whether a double is an infinity.
| [in] | args | The value to test, as args->real [BORROWS]. |
References mmgr_verba_is_inf().
Referenced by mmgr_verba_is_inf().
| embed_bool mmgr_verba_is_nan | ( | const VerbaFractioCfg * | args | ) |
Reports whether a double is a NaN.
| [in] | args | The value to test, as args->real [BORROWS]. |
References mmgr_verba_is_nan().
Referenced by mmgr_verba_is_nan().
| size_t mmgr_verba_finish | ( | const VerbaFinisCfg * | args | ) |
Stores the terminator and reports the length.
| [in] | args | Buffer, capacity and the offset reached [BORROWS]. |
References mmgr_verba_finish().
Referenced by mmgr_verba_finish().
| embed_bool mmgr_verba_ok | ( | const VerbaFinisCfg * | args | ) |
Reports whether there is still room.
| [in] | args | Capacity and the offset reached [BORROWS]. |
References mmgr_verba_ok().
Referenced by mmgr_verba_ok().
|
static |
Dispatch table instance named verba_textus, with each member set to its mmgr_verba_ function.
Definition at line 414 of file verba_scribo.h.
|
static |
Dispatch table instance named verba_littera, whose one member is set to mmgr_verba_ch.
Definition at line 425 of file verba_scribo.h.
|
static |
Dispatch table instance named verba_numerus, with each member set to its mmgr_verba_ function.
Definition at line 432 of file verba_scribo.h.
|
static |
Dispatch table instance named verba_fractio, with each member set to its mmgr_verba_ function.
Definition at line 445 of file verba_scribo.h.
|
static |
Dispatch table instance named verba_finis, with each member set to its mmgr_verba_ function.
Definition at line 456 of file verba_scribo.h.