Data Structures | |
| struct | VerbaLinea |
| A line written into out, at bytes so far, and passed to flush as it fills. More... | |
| 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 retain. | |
| #define | MMGR_FIXED_MAX_DECIMALS |
| Expands to 18u, the max digits after the point mmgr_verba_fixed will write. | |
Typedefs | |
| typedef int(*) | VerbaLineaFlush(void *context, const char *bytes, size_t size) |
| Where a line passes the size bytes at bytes it holds once it is full. | |
Functions | |
| EMBED_HOST_DEVICE VerbaLinea | mmgr_line_over (char *out, size_t capacity) |
| Makes a line over a buffer, of no capacity where the buffer is NULL. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_line_flush (VerbaLinea *line) |
| Passes what the line holds to its flush and empties it. | |
| EMBED_HOST_DEVICE size_t | mmgr_line_put_n (VerbaLinea *line, const char *text, size_t length) |
| Writes length bytes of text. | |
| EMBED_HOST_DEVICE size_t | mmgr_line_put (VerbaLinea *line, const char *text) |
| Writes a terminated text. | |
| EMBED_HOST_DEVICE size_t | mmgr_line_put_max (VerbaLinea *line, const char *text, size_t max) |
| Writes a terminated text, at max max bytes of it. | |
| EMBED_HOST_DEVICE void | mmgr_line_put_columns (VerbaLinea *line, const char *text, unsigned int columns) |
| Writes a terminated text and spaces after it out to columns. | |
| EMBED_HOST_DEVICE void | mmgr_line_put_right (VerbaLinea *line, const char *text, unsigned int columns) |
| Writes spaces out to columns and then a terminated text, and so the text is right aligned. | |
| EMBED_HOST_DEVICE void | mmgr_line_ch (VerbaLinea *line, char character) |
| Writes one character. | |
| EMBED_HOST_DEVICE void | mmgr_line_decimal (VerbaLinea *line, uint64_t value, unsigned int digits_least) |
| Writes value in base ten, padded on the left with zeros to digits_least digits. | |
| EMBED_HOST_DEVICE void | mmgr_line_decimal_columns (VerbaLinea *line, uint64_t value, unsigned int columns) |
| Writes value in base ten, right aligned in columns with spaces before it. | |
| EMBED_HOST_DEVICE void | mmgr_line_decimal_signed (VerbaLinea *line, int64_t value) |
| Writes a signed value in base ten, a minus sign before a negative one. | |
| EMBED_HOST_DEVICE void | mmgr_line_hex (VerbaLinea *line, uint64_t value, unsigned int digits_least) |
| Writes value in lower case base sixteen, padded on the left with zeros to digits_least digits. | |
| EMBED_HOST_DEVICE void | mmgr_line_fixed (VerbaLinea *line, double value, unsigned int decimals, unsigned int columns, embed_bool plus) |
| Writes a double with decimals digits after the point, right aligned in columns with spaces before it. | |
| EMBED_HOST_DEVICE void | mmgr_line_exponent (VerbaLinea *line, double value, unsigned int decimals, unsigned int columns, embed_bool plus) |
| Writes a double as one digit, a point, decimals digits, e, a sign and a power of two digits or more, right aligned in columns with spaces before it. | |
| EMBED_HOST_DEVICE void | mmgr_line_general (VerbaLinea *line, double value, unsigned int significant, unsigned int columns, embed_bool plus) |
| Writes a double to significant digits in the shorter form that printf's g chooses, right aligned in columns with spaces before it. | |
| EMBED_HOST_DEVICE size_t | mmgr_line_finish (VerbaLinea *line) |
| Stores the terminator, the one store a line no write reached yet still needs. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_line_ok (const VerbaLinea *line) |
| Reports whether every write fit. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_put_n (const VerbaTextusCfg *args) |
| Writes a counted run of text. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_put (const VerbaTextusCfg *args) |
| Writes a terminated string, with a measure of it first. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_put_clip (const VerbaTextusCfg *args) |
| Writes as much of a string as fits. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_xml (const VerbaTextusCfg *args) |
| Writes text with the four XML entities substituted. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_json (const VerbaTextusCfg *args) |
| Writes text as a quoted JSON string. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_ch (const VerbaLitteraCfg *args) |
| Writes one character. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_u64_clip (const VerbaNumerusCfg *args) |
| Writes a value right aligned, padded with spaces. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_uint (const VerbaNumerusCfg *args) |
| Writes a value in the base the caller gives. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_u32w (const VerbaNumerusCfg *args) |
| Writes a value in base ten, padded to min digits. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_hex (const VerbaNumerusCfg *args) |
| Writes a value in lower case base sixteen. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_u32 (const VerbaNumerusCfg *args) |
| Writes a value in base ten, unpadded. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_u64 (const VerbaNumerusCfg *args) |
| Writes a value in base ten, unpadded. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_i64 (const VerbaNumerusCfg *args) |
| Writes a signed value in base ten. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_g (const VerbaFractioCfg *args) |
| Writes a double to a significant digit count. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_fixed (const VerbaFractioCfg *args) |
| Writes a double to a decimal count. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_verba_sign_bit (const VerbaFractioCfg *args) |
| Reports a double's sign bit. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_verba_is_inf (const VerbaFractioCfg *args) |
| Reports whether a double is an infinity. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_verba_is_nan (const VerbaFractioCfg *args) |
| Reports whether a double is a NaN. | |
| EMBED_HOST_DEVICE size_t | mmgr_verba_finish (const VerbaFinisCfg *args) |
| Stores the terminator and reports the length. | |
| EMBED_HOST_DEVICE 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 holds 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. | |
| #define MMGR_G_MAX_SIG |
Expands to 18u, the most significant digits mmgr_verba_g will retain.
Definition at line 35 of file verba_scribo.h.
| #define MMGR_FIXED_MAX_DECIMALS |
Expands to 18u, the max digits after the point mmgr_verba_fixed will write.
Definition at line 42 of file verba_scribo.h.
| typedef int(*) VerbaLineaFlush(void *context, const char *bytes, size_t size) |
Where a line passes the size bytes at bytes it holds once it is full.
| [in] | context | The line's context [BORROWS]. |
| [in] | bytes | What the line holds [BORROWS]. |
| [in] | size | Bytes at bytes. |
Definition at line 45 of file verba_linea.h.
| EMBED_HOST_DEVICE VerbaLinea mmgr_line_over | ( | char * | out, |
| size_t | capacity ) |
Makes a line over a buffer, of no capacity where the buffer is NULL.
| [in] | out | The line's buffer, or NULL where its take failed [BORROWS]. |
| [in] | capacity | Bytes in out. |
References mmgr_line_over().
Referenced by mmgr_line_over().
| EMBED_HOST_DEVICE embed_bool mmgr_line_flush | ( | VerbaLinea * | line | ) |
Passes what the line holds to its flush and empties it.
| [in,out] | line | The line [BORROWS]. |
References mmgr_line_flush().
Referenced by mmgr_line_flush().
| EMBED_HOST_DEVICE size_t mmgr_line_put_n | ( | VerbaLinea * | line, |
| const char * | text, | ||
| size_t | length ) |
Writes length bytes of text.
| [in,out] | line | The line [BORROWS]. |
| [in] | text | Bytes to write [BORROWS]. |
| [in] | length | Bytes of text. |
References mmgr_line_put_n().
Referenced by mmgr_line_put_n().
| EMBED_HOST_DEVICE size_t mmgr_line_put | ( | VerbaLinea * | line, |
| const char * | text ) |
Writes a terminated text.
| [in,out] | line | The line [BORROWS]. |
| [in] | text | Terminated text to write [BORROWS]. |
References mmgr_line_put().
Referenced by mmgr_line_put().
| EMBED_HOST_DEVICE size_t mmgr_line_put_max | ( | VerbaLinea * | line, |
| const char * | text, | ||
| size_t | max ) |
Writes a terminated text, at max max bytes of it.
| [in,out] | line | The line [BORROWS]. |
| [in] | text | Text to write [BORROWS]. |
| [in] | max | The max bytes of text read. |
References mmgr_line_put_max().
Referenced by mmgr_line_put_max().
| EMBED_HOST_DEVICE void mmgr_line_put_columns | ( | VerbaLinea * | line, |
| const char * | text, | ||
| unsigned int | columns ) |
Writes a terminated text and spaces after it out to columns.
| [in,out] | line | The line [BORROWS]. |
| [in] | text | Terminated text to write [BORROWS]. |
| [in] | columns | Bytes the text and its spaces fill. A longer text gets no spaces. |
References mmgr_line_put_columns().
Referenced by mmgr_line_put_columns().
| EMBED_HOST_DEVICE void mmgr_line_put_right | ( | VerbaLinea * | line, |
| const char * | text, | ||
| unsigned int | columns ) |
Writes spaces out to columns and then a terminated text, and so the text is right aligned.
| [in,out] | line | The line [BORROWS]. |
| [in] | text | Terminated text to write [BORROWS]. |
| [in] | columns | Bytes the spaces and the text fill. A text of columns bytes or more gets no spaces. |
References mmgr_line_put_right().
Referenced by mmgr_line_put_right().
| EMBED_HOST_DEVICE void mmgr_line_ch | ( | VerbaLinea * | line, |
| char | character ) |
Writes one character.
| [in,out] | line | The line [BORROWS]. |
| [in] | character | The character. |
References mmgr_line_ch().
Referenced by mmgr_line_ch().
| EMBED_HOST_DEVICE void mmgr_line_decimal | ( | VerbaLinea * | line, |
| uint64_t | value, | ||
| unsigned int | digits_least ) |
Writes value in base ten, padded on the left with zeros to digits_least digits.
| [in,out] | line | The line [BORROWS]. |
| [in] | value | The value. |
| [in] | digits_least | Fewest digits written, clamped at 255. |
References mmgr_line_decimal().
Referenced by mmgr_line_decimal().
| EMBED_HOST_DEVICE void mmgr_line_decimal_columns | ( | VerbaLinea * | line, |
| uint64_t | value, | ||
| unsigned int | columns ) |
Writes value in base ten, right aligned in columns with spaces before it.
| [in,out] | line | The line [BORROWS]. |
| [in] | value | The value. |
| [in] | columns | Bytes the value and its spaces fill, clamped at 255. |
References mmgr_line_decimal_columns().
Referenced by mmgr_line_decimal_columns().
| EMBED_HOST_DEVICE void mmgr_line_decimal_signed | ( | VerbaLinea * | line, |
| int64_t | value ) |
Writes a signed value in base ten, a minus sign before a negative one.
| [in,out] | line | The line [BORROWS]. |
| [in] | value | The value. INT64_MIN goes out whole. |
References mmgr_line_decimal_signed().
Referenced by mmgr_line_decimal_signed().
| EMBED_HOST_DEVICE void mmgr_line_hex | ( | VerbaLinea * | line, |
| uint64_t | value, | ||
| unsigned int | digits_least ) |
Writes value in lower case base sixteen, padded on the left with zeros to digits_least digits.
| [in,out] | line | The line [BORROWS]. |
| [in] | value | The value. |
| [in] | digits_least | Fewest digits written, clamped at 255. |
References mmgr_line_hex().
Referenced by mmgr_line_hex().
| EMBED_HOST_DEVICE void mmgr_line_fixed | ( | VerbaLinea * | line, |
| double | value, | ||
| unsigned int | decimals, | ||
| unsigned int | columns, | ||
| embed_bool | plus ) |
Writes a double with decimals digits after the point, right aligned in columns with spaces before it.
| [in,out] | line | The line [BORROWS]. |
| [in] | value | The value. |
| [in] | decimals | Digits after the point, clamped at MMGR_FIXED_MAX_DECIMALS. A count of 0 writes no point. |
| [in] | columns | Bytes the value, its sign and its spaces fill, clamped at 255. |
| [in] | plus | EMBED_TRUE writes a plus sign before a value whose sign bit is clear. |
References mmgr_line_fixed().
Referenced by mmgr_line_fixed().
| EMBED_HOST_DEVICE void mmgr_line_exponent | ( | VerbaLinea * | line, |
| double | value, | ||
| unsigned int | decimals, | ||
| unsigned int | columns, | ||
| embed_bool | plus ) |
Writes a double as one digit, a point, decimals digits, e, a sign and a power of two digits or more, right aligned in columns with spaces before it.
| [in,out] | line | The line [BORROWS]. |
| [in] | value | The value. |
| [in] | decimals | Digits after the point, clamped at MMGR_G_MAX_SIG less one. A count of 0 writes no point. |
| [in] | columns | Bytes the value, its sign and its spaces fill, clamped at 255. |
| [in] | plus | EMBED_TRUE writes a plus sign before a value whose sign bit is clear. |
References mmgr_line_exponent().
Referenced by mmgr_line_exponent().
| EMBED_HOST_DEVICE void mmgr_line_general | ( | VerbaLinea * | line, |
| double | value, | ||
| unsigned int | significant, | ||
| unsigned int | columns, | ||
| embed_bool | plus ) |
Writes a double to significant digits in the shorter form that printf's g chooses, right aligned in columns with spaces before it.
| [in,out] | line | The line [BORROWS]. |
| [in] | value | The value. |
| [in] | significant | Digits kept, 1 where it is 0, clamped at MMGR_G_MAX_SIG. |
| [in] | columns | Bytes the value, its sign and its spaces fill, clamped at 255. |
| [in] | plus | EMBED_TRUE writes a plus sign before a value whose sign bit is clear. |
References mmgr_line_general().
Referenced by mmgr_line_general().
| EMBED_HOST_DEVICE size_t mmgr_line_finish | ( | VerbaLinea * | line | ) |
Stores the terminator, the one store a line no write reached yet still needs.
| [in,out] | line | The line [BORROWS]. |
References mmgr_line_finish().
Referenced by mmgr_line_finish().
| EMBED_HOST_DEVICE embed_bool mmgr_line_ok | ( | const VerbaLinea * | line | ) |
Reports whether every write fit.
| [in] | line | The line [BORROWS]. |
References mmgr_line_ok().
Referenced by mmgr_line_ok().
| EMBED_HOST_DEVICE 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().
| EMBED_HOST_DEVICE size_t mmgr_verba_put | ( | const VerbaTextusCfg * | args | ) |
Writes a terminated string, with a measure of it first.
| [in] | args | Buffer, capacity, offset and the text [BORROWS]. |
References mmgr_verba_put().
Referenced by mmgr_verba_put().
| EMBED_HOST_DEVICE 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().
| EMBED_HOST_DEVICE 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().
| EMBED_HOST_DEVICE 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().
| EMBED_HOST_DEVICE 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().
| EMBED_HOST_DEVICE 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().
| EMBED_HOST_DEVICE 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().
| EMBED_HOST_DEVICE 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().
| EMBED_HOST_DEVICE 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().
| EMBED_HOST_DEVICE 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().
| EMBED_HOST_DEVICE 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().
| EMBED_HOST_DEVICE 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().
| EMBED_HOST_DEVICE 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().
| EMBED_HOST_DEVICE 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_HOST_DEVICE 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_HOST_DEVICE 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_HOST_DEVICE 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().
| EMBED_HOST_DEVICE 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_HOST_DEVICE 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 417 of file verba_scribo.h.
|
static |
Dispatch table instance named verba_littera, whose one member holds mmgr_verba_ch.
Definition at line 428 of file verba_scribo.h.
|
static |
Dispatch table instance named verba_numerus, with each member set to its mmgr_verba_ function.
Definition at line 435 of file verba_scribo.h.
|
static |
Dispatch table instance named verba_fractio, with each member set to its mmgr_verba_ function.
Definition at line 448 of file verba_scribo.h.
|
static |
Dispatch table instance named verba_finis, with each member set to its mmgr_verba_ function.
Definition at line 459 of file verba_scribo.h.