A line written into a caller's buffer and handed on as it fills, one field at a time. More...
#include "mmgr.h"Go to the source code of this file.
Data Structures | |
| struct | VerbaLinea |
| A line written into out, at bytes so far, and handed to flush as it fills. More... | |
Typedefs | |
| typedef int(*) | VerbaLineaFlush(void *context, const char *bytes, size_t size) |
| Where a line hands the size bytes at bytes it holds once it is full. | |
Functions | |
| VerbaLinea | mmgr_line_over (char *out, size_t capacity) |
| Makes a line over a buffer, of no capacity where the buffer is NULL. | |
| embed_bool | mmgr_line_flush (VerbaLinea *line) |
| Hands what the line holds to its flush and empties it. | |
| size_t | mmgr_line_put_n (VerbaLinea *line, const char *text, size_t length) |
| Writes length bytes of text. | |
| size_t | mmgr_line_put (VerbaLinea *line, const char *text) |
| Writes a terminated text. | |
| size_t | mmgr_line_put_most (VerbaLinea *line, const char *text, size_t most) |
| Writes a terminated text, at most most bytes of it. | |
| void | mmgr_line_put_columns (VerbaLinea *line, const char *text, unsigned int columns) |
| Writes a terminated text and spaces after it out to columns. | |
| void | mmgr_line_ch (VerbaLinea *line, char character) |
| Writes one character. | |
| 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. | |
| 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. | |
| void | mmgr_line_decimal_signed (VerbaLinea *line, int64_t value) |
| Writes a signed value in base ten, a minus sign before a negative one. | |
| 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. | |
| size_t | mmgr_line_finish (VerbaLinea *line) |
| Stores the terminator, the one store a line no write has reached still needs. | |
| embed_bool | mmgr_line_ok (const VerbaLinea *line) |
| Reports whether every write fit. | |
A line written into a caller's buffer and handed on as it fills, one field at a time.
Definition in file verba_linea.h.
| typedef int(*) VerbaLineaFlush(void *context, const char *bytes, size_t size) |
Where a line hands 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 42 of file verba_linea.h.
| 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 was refused [BORROWS]. |
| [in] | capacity | Bytes in out. |
References mmgr_line_over().
Referenced by mmgr_line_over().
| embed_bool mmgr_line_flush | ( | VerbaLinea * | line | ) |
Hands 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().
| 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().
| 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().
| size_t mmgr_line_put_most | ( | VerbaLinea * | line, |
| const char * | text, | ||
| size_t | most ) |
Writes a terminated text, at most most bytes of it.
| [in,out] | line | The line [BORROWS]. |
| [in] | text | Text to write [BORROWS]. |
| [in] | most | The most bytes of text read. |
References mmgr_line_put_most().
Referenced by mmgr_line_put_most().
| 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().
| 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().
| 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().
| 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().
| 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 is written whole. |
References mmgr_line_decimal_signed().
Referenced by mmgr_line_decimal_signed().
| 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().
| size_t mmgr_line_finish | ( | VerbaLinea * | line | ) |
Stores the terminator, the one store a line no write has reached still needs.
| [in,out] | line | The line [BORROWS]. |
References mmgr_line_finish().
Referenced by mmgr_line_finish().
| 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().