libosmocore 1.10.0.64-ff3d
Osmocom core library
|
State for OSMO_STRBUF_APPEND() and OSMO_STRBUF_PRINTF(). More...
#include <utils.h>
Data Fields | |
char * | buf |
Point to the start of a string buffer. More... | |
size_t | len |
Total sizeof() the buffer buf points at. More... | |
char * | pos |
Current writing position in buf (end of the string written so far). More... | |
size_t | chars_needed |
After all OSMO_STRBUF_APPEND operations, reflects the total number of characters that would be written had buf been large enough. More... | |
State for OSMO_STRBUF_APPEND() and OSMO_STRBUF_PRINTF().
See there for examples.
char* osmo_strbuf::buf |
Point to the start of a string buffer.
Referenced by _osmo_escape_str_buf(), _osmo_quote_str_buf(), _osmo_strbuf_char_count(), _osmo_strbuf_remain(), _output_buf(), osmo_escape_cstr_buf(), osmo_escape_str_buf2(), osmo_escape_str_buf3(), osmo_int_to_float_str_buf(), osmo_quote_cstr_buf(), osmo_quote_str_buf(), osmo_quote_str_buf2(), osmo_quote_str_buf3(), osmo_str_tolower_c(), osmo_str_toupper_c(), osmo_strbuf_added_tail(), osmo_strbuf_drop_tail(), and osmo_use_count_to_str_buf().
size_t osmo_strbuf::chars_needed |
After all OSMO_STRBUF_APPEND operations, reflects the total number of characters that would be written had buf been large enough.
Like snprintf()'s return value, this does not include the terminating nul character. Hence, to allocate an adequately sized buffer, add 1 to this number.
Referenced by _osmo_escape_str_buf(), _osmo_quote_str_buf(), osmo_int_to_float_str_buf(), osmo_strbuf_added_tail(), osmo_strbuf_drop_tail(), and osmo_use_count_to_str_buf().
size_t osmo_strbuf::len |
Total sizeof() the buffer buf points at.
Referenced by _osmo_strbuf_char_count(), _osmo_strbuf_remain(), and osmo_strbuf_added_tail().
char* osmo_strbuf::pos |
Current writing position in buf (end of the string written so far).
Referenced by _osmo_strbuf_char_count(), _osmo_strbuf_remain(), _output_buf(), osmo_strbuf_added_tail(), and osmo_strbuf_drop_tail().