MMgr v1.0.0
Zero-heap memory manager in C11. One borrowed buffer, carved by asserted offset.
Loading...
Searching...
No Matches
verba_scribo.h
Go to the documentation of this file.
1/* MMgr - Copyright (C) 2026 Douglas Quigg (dstroy0) <dquigg123@gmail.com>
2 * SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Commercial OR LicenseRef-Educational
3 *
4 * Every use falls under AGPL-3.0-or-later unless you hold explicit permission, which is either a
5 * negotiated commercial licensing contract or an educator's license issued to you personally.
6 */
7/**
8 * @file verba_scribo.h
9 * @brief Text and number formatting, the limits, and one table per kind of thing written.
10 * @author dstroy0 (Douglas Quigg) <dquigg123@gmail.com>
11 * @date 2026-08-29
12 *
13 * @note Five tables and not one, each with the arguments its own entries read. A call carries the
14 * destination and the value it is placing,, alone. Writing a character does not pass
15 * a double, a base and a column count it will never look at.
16 * @note Every writing entry takes the offset to write at and returns the offset past what it wrote, and so calls chain.
17 * @note An entry that will not fit returns args->cap, which every later entry then reads as no room left.
18 * @note finish stores the terminator and reports the length. Nothing before it terminates the buffer.
19 */
20#ifndef MMGR_VERBA_SCRIBO_H
21#define MMGR_VERBA_SCRIBO_H
22
23#include "mmgr.h"
24
25EMBED_BEGIN_DECLS
26
27/**
28 * @brief Expands to 18u, the most significant digits mmgr_verba_g will keep.
29 *
30 * @note A larger args->sig is clamped here. An args->sig of 0 is taken as 1.
31 */
32#define MMGR_G_MAX_SIG 18u
33
34/**
35 * @brief Expands to 18u, the most digits after the point mmgr_verba_fixed will write.
36 *
37 * @note A larger args->decimals is clamped here. An args->decimals of 0 writes no point at all.
38 */
39#define MMGR_FIXED_MAX_DECIMALS 18u
40
41/**
42 * @brief Arguments for the entries that write text into a buffer.
43 *
44 * @note put_n writes text_len bytes. put measures the text when text_len is 0 and takes it as given
45 * otherwise. put_clip, xml and json read text and leave text_len alone.
46 * @warning out must be writable for cap bytes. A byte is always reserved for the terminator finish
47 * stores.
48 */
49typedef struct
50{
51 char *const out; /**< Destination buffer [BORROWS]. */
52 const size_t cap; /**< Bytes available in out. */
53 const size_t at; /**< Offset to write at. */
54 const char *const text; /**< Text to write [BORROWS]. */
55 const size_t text_len; /**< Bytes of text put_n writes, and the length put takes when non-zero. */
57
58/**
59 * @brief Type of the verba_textus dispatch table.
60 *
61 * @note EMBED_TABLE_LAYOUT asserts the five members sit at consecutive EMBED_FUNCTION_POINTER_BYTES offsets, with
62 * nothing else.
63 */
64typedef struct
65{
66 size_t (*put_n)(const VerbaTextusCfg *args); /**< Writes a counted run of text. */
67 size_t (*put)(const VerbaTextusCfg *args); /**< Writes a terminated string, measuring it first. */
68 size_t (*put_clip)(const VerbaTextusCfg *args); /**< Writes as much of a string as fits. */
69 size_t (*xml)(const VerbaTextusCfg *args); /**< Writes text with the four XML entities substituted. */
70 size_t (*json)(const VerbaTextusCfg *args); /**< Writes text as a quoted JSON string. */
72EMBED_TABLE_LAYOUT(VerbaScriboTextusNs, put_n, put, put_clip, xml, json);
73
74/**
75 * @brief Arguments for the entries that write one character.
76 *
77 * @note Only mmgr_verba_ch reads these, and it writes one byte at the offset in at.
78 * @warning out must be writable for cap bytes. A byte is always reserved for the terminator finish
79 * stores.
80 */
81typedef struct
82{
83 char *const out; /**< Destination buffer [BORROWS]. */
84 const size_t cap; /**< Bytes available in out. */
85 const size_t at; /**< Offset to write at. */
86 const char ch; /**< Character to write. */
88
89/**
90 * @brief Type of the verba_littera dispatch table.
91 *
92 * @note EMBED_TABLE_LAYOUT asserts the ch member is at offset 0 and that the struct holds nothing else.
93 */
94typedef struct
95{
96 size_t (*ch)(const VerbaLitteraCfg *args); /**< Writes one character. */
98EMBED_TABLE_LAYOUT(VerbaScriboLitteraNs, ch);
99
100/**
101 * @brief Arguments for the entries that write an integer.
102 *
103 * @note i64 reads sval and every other entry reads val. uint is the only one that reads base, and
104 * u64_clip the only one that reads columns.
105 * @note uint, u32w and hex read min. u32, u64 and i64 fix it at one in the backend instead.
106 * @warning out must be writable for cap bytes. A byte is always reserved for the terminator finish
107 * stores.
108 */
109typedef struct
110{
111 char *const out; /**< Destination buffer [BORROWS]. */
112 const size_t cap; /**< Bytes available in out. */
113 const size_t at; /**< Offset to write at. */
114 const uint64_t val; /**< Unsigned value the unsigned entries write. */
115 const int64_t sval; /**< Signed value i64 writes. */
116 const uint8_t base; /**< Numeric base uint writes in: 8, 16, or anything else for ten. */
117 const uint8_t min; /**< Fewest digits to write, padded on the left with zeros. */
118 const uint8_t columns; /**< Fewest columns u64_clip fills, padded on the left with spaces. */
120
121/**
122 * @brief Type of the verba_numerus dispatch table.
123 *
124 * @note EMBED_TABLE_LAYOUT asserts the seven members sit at consecutive EMBED_FUNCTION_POINTER_BYTES offsets, with
125 * nothing else.
126 */
127typedef struct
128{
129 size_t (*u64_clip)(const VerbaNumerusCfg *args); /**< Writes a value right aligned, padded with spaces. */
130 size_t (*uint)(const VerbaNumerusCfg *args); /**< Writes a value in the base the caller gives. */
131 size_t (*u32w)(const VerbaNumerusCfg *args); /**< Writes a value in base ten, padded to min digits. */
132 size_t (*hex)(const VerbaNumerusCfg *args); /**< Writes a value in lower case base sixteen. */
133 size_t (*u32)(const VerbaNumerusCfg *args); /**< Writes a value in base ten, unpadded. */
134 size_t (*u64)(const VerbaNumerusCfg *args); /**< The same walk as u32, named for the width meant. */
135 size_t (*i64)(const VerbaNumerusCfg *args); /**< Writes a signed value in base ten. */
137EMBED_TABLE_LAYOUT(VerbaScriboNumerusNs, u64_clip, uint, u32w, hex, u32, u64, i64);
138
139/**
140 * @brief Arguments for the entries that write a double.
141 *
142 * @note g reads sig and fixed reads decimals. Neither reads the other's. The three predicates read
143 * real on its own and write nothing, and so out and cap may be left unset for them.
144 * @warning g and fixed need out writable for cap bytes. A byte is always reserved for the terminator
145 * finish stores.
146 */
147typedef struct
148{
149 char *const out; /**< Destination buffer [BORROWS]. The three predicates leave it unset. */
150 const size_t cap; /**< Bytes available in out. */
151 const size_t at; /**< Offset to write at. */
152 const double real; /**< The value to write or classify. */
153 const uint8_t sig; /**< Significant digits g keeps, clamped at MMGR_G_MAX_SIG. */
154 const uint8_t decimals; /**< Digits after the point fixed writes, clamped at MMGR_FIXED_MAX_DECIMALS. */
156
157/**
158 * @brief Type of the verba_fractio dispatch table.
159 *
160 * @note EMBED_TABLE_LAYOUT asserts the five members sit at consecutive EMBED_FUNCTION_POINTER_BYTES offsets, with
161 * nothing else.
162 */
163typedef struct
164{
165 size_t (*g)(const VerbaFractioCfg *args); /**< Writes a double to a significant digit count. */
166 size_t (*fixed)(const VerbaFractioCfg *args); /**< Writes a double to a decimal count. */
167 embed_bool (*sign_bit)(const VerbaFractioCfg *args); /**< Reports a double's sign bit. */
168 embed_bool (*is_inf)(const VerbaFractioCfg *args); /**< Reports whether a double is an infinity. */
169 embed_bool (*is_nan)(const VerbaFractioCfg *args); /**< Reports whether a double is a NaN. */
171EMBED_TABLE_LAYOUT(VerbaScriboFractioNs, g, fixed, sign_bit, is_inf, is_nan);
172
173/**
174 * @brief Arguments for the entries that write the buffer itself, with no value to place in it.
175 *
176 * @note finish stores a byte at at, and so it needs out. ok compares at against cap and reads neither the
177 * buffer nor a value, and so out may be left unset for it.
178 */
179typedef struct
180{
181 char *const out; /**< Destination buffer [BORROWS]. ok leaves it unset. */
182 const size_t cap; /**< Bytes available in out. */
183 const size_t at; /**< Offset reached. */
185
186/**
187 * @brief Type of the verba_finis dispatch table.
188 *
189 * @note EMBED_TABLE_LAYOUT asserts the two members sit at consecutive EMBED_FUNCTION_POINTER_BYTES offsets, with
190 * nothing else.
191 */
192typedef struct
193{
194 size_t (*finish)(const VerbaFinisCfg *args); /**< Stores the terminator and reports the length. */
195 embed_bool (*ok)(const VerbaFinisCfg *args); /**< Reports whether there is still room. */
197EMBED_TABLE_LAYOUT(VerbaScriboFinisNs, finish, ok);
198
199/**
200 * @brief Writes a counted run of text.
201 *
202 * @param[in] args Buffer, capacity, offset, text and its length [BORROWS].
203 * @return The offset past the text, or args->cap when it did not fit.
204 * @note Writes nothing at all when it does not fit, instead of writing what it can.
205 * @warning args->text must be readable for args->text_len bytes. No terminator is looked for.
206 */
208
209/**
210 * @brief Writes a terminated string, measuring it first.
211 *
212 * @param[in] args Buffer, capacity, offset and the text [BORROWS].
213 * @return The offset past the text, or args->cap when it did not fit.
214 * @note Takes args->text_len as the length when it is non-zero, and only otherwise measures.
215 * @warning args->text must not be NULL here, unlike put_clip, xml and json.
216 */
217size_t mmgr_verba_put(const VerbaTextusCfg *args);
218
219/**
220 * @brief Writes as much of a string as fits.
221 *
222 * @param[in] args Buffer, capacity, offset and the text [BORROWS].
223 * @return The offset past what was written, which is args->at when nothing was.
224 * @note Returns args->at and not args->cap when it writes nothing. A later call can still write.
225 * @note Bounds the measure by the room left, and so the length measured is already the length that fits.
226 * @warning A NULL args->text writes nothing and not faulting, unlike put.
227 */
229
230/**
231 * @brief Writes text with the four XML entities substituted.
232 *
233 * @param[in] args Buffer, capacity, offset and the text [BORROWS].
234 * @return The offset past what was written, which is args->at for a NULL args->text.
235 * @note Replaces the ampersand, the two angle brackets and the double quote. The apostrophe is
236 * written as it stands, and so this suits element text and double quoted attributes.
237 * @warning Walks to the terminator. args->text is bounded by its own terminator instead of by args->cap.
238 */
239size_t mmgr_verba_xml(const VerbaTextusCfg *args);
240
241/**
242 * @brief Writes text as a quoted JSON string.
243 *
244 * @param[in] args Buffer, capacity, offset and the text [BORROWS].
245 * @return The offset past the closing quote, or args->cap once something did not fit.
246 * @note Writes the opening and closing quotes itself, and so the result is a complete JSON string, and a
247 * NULL args->text writes an empty pair of quotes where xml writes nothing at all.
248 * @warning Walks to the terminator. args->text is bounded by its own terminator instead of by args->cap.
249 */
250size_t mmgr_verba_json(const VerbaTextusCfg *args);
251
252/**
253 * @brief Writes one character.
254 *
255 * @param[in] args Buffer, capacity, offset and the character [BORROWS].
256 * @return args->at plus one, or args->cap when there is no room.
257 * @note The building block the escape and digit entries write through, one character at a time.
258 * @warning args->out must be writable for args->cap bytes. A byte is always reserved for the
259 * terminator finish stores.
260 */
261size_t mmgr_verba_ch(const VerbaLitteraCfg *args);
262
263/**
264 * @brief Writes a value right aligned, padded with spaces.
265 *
266 * @param[in] args Buffer, capacity, offset, the value and the column count [BORROWS].
267 * @return The offset past what was written, which is args->at when there was no room.
268 * @note Takes args->columns as a floor. A value needing more digits than that widens the field.
269 * @note Pads on the left with spaces, where uint pads with leading zeros.
270 * @warning args->out must be writable for args->cap bytes, and a byte is reserved for the terminator.
271 */
273
274/**
275 * @brief Writes a value in the base the caller gives.
276 *
277 * @param[in] args Buffer, capacity, offset, the value, the base and the least digit count [BORROWS].
278 * @return The offset past the digits, or args->cap when they do not fit.
279 * @note Raising the digit count to args->min before the room test is what pads with leading zeros.
280 * @warning Any args->base other than 8 or 16 is written in base ten, whatever value it holds.
281 */
283
284/**
285 * @brief Writes a value in base ten, padded to min digits.
286 *
287 * @param[in] args Buffer, capacity, offset, the value and the least digit count [BORROWS].
288 * @return The offset past the digits, or args->cap when they do not fit.
289 * @note Fixes the base at ten and forwards args->min, as separates it from u32.
290 * @warning args->base takes no part here, whatever the caller put in it.
291 */
293
294/**
295 * @brief Writes a value in lower case base sixteen.
296 *
297 * @param[in] args Buffer, capacity, offset, the value and the least digit count [BORROWS].
298 * @return The offset past the digits, or args->cap when they do not fit.
299 * @note Fixes the base at sixteen, and so the digits come out lower case, and forwards args->min so the
300 * result can be padded with leading zeros to a fixed width.
301 * @warning args->base takes no part here, whatever the caller put in it.
302 */
303size_t mmgr_verba_hex(const VerbaNumerusCfg *args);
304
305/**
306 * @brief Writes a value in base ten, unpadded.
307 *
308 * @param[in] args Buffer, capacity, offset and the value [BORROWS].
309 * @return The offset past the digits, or args->cap when they do not fit.
310 * @note Fixes both the base at ten and the least digit count at one.
311 * @warning Neither args->base nor args->min takes any part here. Reach for u32w to pad.
312 */
313size_t mmgr_verba_u32(const VerbaNumerusCfg *args);
314
315/**
316 * @brief Writes a value in base ten, unpadded.
317 *
318 * @param[in] args Buffer, capacity, offset and the value [BORROWS].
319 * @return The offset past the digits, or args->cap when they do not fit.
320 * @note The same walk as u32, since args->val is 64 bits either way. Both names exist to let a caller
321 * read the width it means at the call.
322 * @warning Neither args->base nor args->min takes any part here. Reach for u32w to pad.
323 */
324size_t mmgr_verba_u64(const VerbaNumerusCfg *args);
325
326/**
327 * @brief Writes a signed value in base ten.
328 *
329 * @param[in] args Buffer, capacity, offset and the signed value in sval [BORROWS].
330 * @return The offset past the digits, or args->cap when they do not fit.
331 * @note Writes the sign through ch, then hands the magnitude to uint at base ten.
332 * @note The magnitude is taken as -(sval + 1) plus one, which stays in range for the most negative value.
333 * @warning Reads args->sval and not args->val. A caller filling the unsigned member writes a zero.
334 */
335size_t mmgr_verba_i64(const VerbaNumerusCfg *args);
336
337/**
338 * @brief Writes a double to a significant digit count.
339 *
340 * @param[in] args Buffer, capacity, offset, the value and the significant digit count [BORROWS].
341 * @return The offset past what was written, or args->cap once something did not fit.
342 * @note An args->sig of 0 is taken as 1, and anything above MMGR_G_MAX_SIG is clamped there.
343 * @note Picks the shorter of a plain and an exponential form, dropping trailing zeros before it chooses.
344 * @warning An infinity writes inf and a NaN writes nan, lower case and unquoted, and so neither is valid
345 * JSON on its own.
346 */
347size_t mmgr_verba_g(const VerbaFractioCfg *args);
348
349/**
350 * @brief Writes a double to a decimal count.
351 *
352 * @param[in] args Buffer, capacity, offset, the value and the decimal count [BORROWS].
353 * @return The offset past what was written, or args->cap once something did not fit.
354 * @note args->decimals is clamped at MMGR_FIXED_MAX_DECIMALS, and a value of 0 writes no point at all.
355 * @note A half rounds up, and a fraction that carries raises the integer part. The sign is written
356 * ahead of the magnitude. A negative half rounds away from zero.
357 * @warning A magnitude too large for 64 bits of integer part falls back to g at ten significant
358 * digits, and so the result is not always in the fixed form asked for.
359 */
361
362/**
363 * @brief Reports a double's sign bit.
364 *
365 * @param[in] args The value to test, as args->real [BORROWS].
366 * @return EMBED_TRUE when the sign bit is set, with nothing written.
367 * @note Reads the bit instead of comparing against zero. A negative zero returns EMBED_TRUE.
368 * @note Reads no member but args->real. args->out may be left unset.
369 */
370embed_bool mmgr_verba_sign_bit(const VerbaFractioCfg *args);
371
372/**
373 * @brief Reports whether a double is an infinity.
374 *
375 * @param[in] args The value to test, as args->real [BORROWS].
376 * @return EMBED_TRUE for either infinity, with nothing written.
377 * @note Wants the exponent field all ones and the mantissa zero, where is_nan wants it non-zero.
378 * @note The sign takes no part. A negative infinity returns EMBED_TRUE too.
379 */
380embed_bool mmgr_verba_is_inf(const VerbaFractioCfg *args);
381
382/**
383 * @brief Reports whether a double is a NaN.
384 *
385 * @param[in] args The value to test, as args->real [BORROWS].
386 * @return EMBED_TRUE for any NaN, with nothing written.
387 * @note Wants the exponent field all ones and the mantissa non-zero, where is_inf wants it zero.
388 * @note Quiet and signaling NaNs answer alike, since only the mantissa being non-zero is tested.
389 */
390embed_bool mmgr_verba_is_nan(const VerbaFractioCfg *args);
391
392/**
393 * @brief Stores the terminator and reports the length.
394 *
395 * @param[in] args Buffer, capacity and the offset reached [BORROWS].
396 * @return args->at, or 0 when args->at already reached args->cap.
397 * @note A return of 0 covers both an empty result and one that ran out of room. ok tells them apart.
398 * @warning The only entry that writes a terminator. A buffer is not a string until this has run.
399 */
401
402/**
403 * @brief Reports whether there is still room.
404 *
405 * @param[in] args Capacity and the offset reached [BORROWS].
406 * @return EMBED_TRUE while there is still room, EMBED_FALSE once an entry returned args->cap.
407 * @note Reads neither args->out nor any value member, and so it touches no memory and args->out may be NULL.
408 */
409embed_bool mmgr_verba_ok(const VerbaFinisCfg *args);
410
411/**
412 * @brief Dispatch table instance named verba_textus, with each member set to its mmgr_verba_ function.
413 */
414EMBED_TABLE_STORAGE VerbaScriboTextusNs verba_textus EMBED_UNUSED = {
415 .put_n = mmgr_verba_put_n,
416 .put = mmgr_verba_put,
417 .put_clip = mmgr_verba_put_clip,
418 .xml = mmgr_verba_xml,
419 .json = mmgr_verba_json,
420};
421
422/**
423 * @brief Dispatch table instance named verba_littera, whose one member is set to mmgr_verba_ch.
424 */
425EMBED_TABLE_STORAGE VerbaScriboLitteraNs verba_littera EMBED_UNUSED = {
426 .ch = mmgr_verba_ch,
427};
428
429/**
430 * @brief Dispatch table instance named verba_numerus, with each member set to its mmgr_verba_ function.
431 */
432EMBED_TABLE_STORAGE VerbaScriboNumerusNs verba_numerus EMBED_UNUSED = {
433 .u64_clip = mmgr_verba_u64_clip,
434 .uint = mmgr_verba_uint,
435 .u32w = mmgr_verba_u32w,
436 .hex = mmgr_verba_hex,
437 .u32 = mmgr_verba_u32,
438 .u64 = mmgr_verba_u64,
439 .i64 = mmgr_verba_i64,
440};
441
442/**
443 * @brief Dispatch table instance named verba_fractio, with each member set to its mmgr_verba_ function.
444 */
445EMBED_TABLE_STORAGE VerbaScriboFractioNs verba_fractio EMBED_UNUSED = {
446 .g = mmgr_verba_g,
447 .fixed = mmgr_verba_fixed,
448 .sign_bit = mmgr_verba_sign_bit,
449 .is_inf = mmgr_verba_is_inf,
450 .is_nan = mmgr_verba_is_nan,
451};
452
453/**
454 * @brief Dispatch table instance named verba_finis, with each member set to its mmgr_verba_ function.
455 */
456EMBED_TABLE_STORAGE VerbaScriboFinisNs verba_finis EMBED_UNUSED = {
457 .finish = mmgr_verba_finish,
458 .ok = mmgr_verba_ok,
459};
460
461EMBED_END_DECLS
462
463#endif
The embedded_types headers every module builds on.
Arguments for the entries that write the buffer itself, with no value to place in it.
const size_t at
char *const out
const size_t cap
Arguments for the entries that write a double.
char *const out
const double real
const size_t at
const size_t cap
const uint8_t decimals
const uint8_t sig
Arguments for the entries that write one character.
char *const out
const char ch
const size_t cap
const size_t at
Arguments for the entries that write an integer.
const uint64_t val
const size_t cap
char *const out
const uint8_t base
const int64_t sval
const uint8_t min
const uint8_t columns
const size_t at
Type of the verba_finis dispatch table.
embed_bool(*) ok(const VerbaFinisCfg *args)
size_t(*) finish(const VerbaFinisCfg *args)
Type of the verba_fractio dispatch table.
embed_bool(*) is_inf(const VerbaFractioCfg *args)
embed_bool(*) sign_bit(const VerbaFractioCfg *args)
size_t(*) g(const VerbaFractioCfg *args)
embed_bool(*) is_nan(const VerbaFractioCfg *args)
size_t(*) fixed(const VerbaFractioCfg *args)
Type of the verba_littera dispatch table.
size_t(*) ch(const VerbaLitteraCfg *args)
Type of the verba_numerus dispatch table.
size_t(*) u32w(const VerbaNumerusCfg *args)
size_t(*) u64(const VerbaNumerusCfg *args)
size_t(*) u64_clip(const VerbaNumerusCfg *args)
size_t(*) i64(const VerbaNumerusCfg *args)
size_t(*) u32(const VerbaNumerusCfg *args)
size_t(*) hex(const VerbaNumerusCfg *args)
size_t(*) uint(const VerbaNumerusCfg *args)
Type of the verba_textus dispatch table.
size_t(*) put_clip(const VerbaTextusCfg *args)
size_t(*) put(const VerbaTextusCfg *args)
size_t(*) put_n(const VerbaTextusCfg *args)
size_t(*) xml(const VerbaTextusCfg *args)
size_t(*) json(const VerbaTextusCfg *args)
Arguments for the entries that write text into a buffer.
const size_t cap
const char *const text
const size_t text_len
char *const out
const size_t at
static const VerbaScriboLitteraNs verba_littera
Dispatch table instance named verba_littera, whose one member is set to mmgr_verba_ch.
static const VerbaScriboFinisNs verba_finis
Dispatch table instance named verba_finis, with each member set to its mmgr_verba_ function.
size_t mmgr_verba_u32w(const VerbaNumerusCfg *args)
Writes a value in base ten, padded to min digits.
size_t mmgr_verba_u64_clip(const VerbaNumerusCfg *args)
Writes a value right aligned, padded with spaces.
size_t mmgr_verba_hex(const VerbaNumerusCfg *args)
Writes a value in lower case base sixteen.
embed_bool mmgr_verba_ok(const VerbaFinisCfg *args)
Reports whether there is still room.
size_t mmgr_verba_xml(const VerbaTextusCfg *args)
Writes text with the four XML entities substituted.
size_t mmgr_verba_put_clip(const VerbaTextusCfg *args)
Writes as much of a string as fits.
size_t mmgr_verba_uint(const VerbaNumerusCfg *args)
Writes a value in the base the caller gives.
size_t mmgr_verba_put_n(const VerbaTextusCfg *args)
Writes a counted run of text.
static const VerbaScriboTextusNs verba_textus
Dispatch table instance named verba_textus, with each member set to its mmgr_verba_ function.
size_t mmgr_verba_u64(const VerbaNumerusCfg *args)
Writes a value in base ten, unpadded.
size_t mmgr_verba_finish(const VerbaFinisCfg *args)
Stores the terminator and reports the length.
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.
size_t mmgr_verba_u32(const VerbaNumerusCfg *args)
Writes a value in base ten, unpadded.
embed_bool mmgr_verba_is_nan(const VerbaFractioCfg *args)
Reports whether a double is a NaN.
static const VerbaScriboFractioNs verba_fractio
Dispatch table instance named verba_fractio, with each member set to its mmgr_verba_ function.
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.
static const VerbaScriboNumerusNs verba_numerus
Dispatch table instance named verba_numerus, with each member set to its mmgr_verba_ function.
size_t mmgr_verba_json(const VerbaTextusCfg *args)
Writes text as a quoted JSON string.
size_t mmgr_verba_i64(const VerbaNumerusCfg *args)
Writes a signed value in base ten.
size_t mmgr_verba_ch(const VerbaLitteraCfg *args)
Writes one character.
size_t mmgr_verba_put(const VerbaTextusCfg *args)
Writes a terminated string, measuring it first.