Go to the source code of this file.
Data Structures |
struct | explain_string_buffer_t |
Defines |
#define | i18n(x) x |
Typedefs |
typedef struct
explain_string_buffer_t | explain_string_buffer_t |
Functions |
void | explain_string_buffer_init (explain_string_buffer_t *sb, char *message, int message_size) |
void | explain_string_buffer_putc (explain_string_buffer_t *sb, int c) |
void | explain_string_buffer_putc_quoted (explain_string_buffer_t *sb, int c) |
void | explain_string_buffer_putc_escaped (explain_string_buffer_t *sb, int c, int delimiter) |
void | explain_string_buffer_puts (explain_string_buffer_t *sb, const char *s) |
void | explain_string_buffer_putsu (explain_string_buffer_t *sb, const unsigned char *s) |
void | explain_string_buffer_puts_quoted (explain_string_buffer_t *sb, const char *s) |
void | explain_string_buffer_puts_shell_quoted (explain_string_buffer_t *sb, const char *s) |
void | explain_string_buffer_putsu_quoted (explain_string_buffer_t *sb, const unsigned char *s) |
void | explain_string_buffer_puts_quoted_n (explain_string_buffer_t *sb, const char *s, size_t n) |
void | explain_string_buffer_putsu_quoted_n (explain_string_buffer_t *sb, const unsigned char *s, size_t n) |
void | explain_string_buffer_printf (explain_string_buffer_t *sb, const char *fmt,...) LIBEXPLAIN_FORMAT_PRINTF(2 |
void void | explain_string_buffer_printf_gettext (explain_string_buffer_t *sb, const char *fmt,...) LIBEXPLAIN_FORMAT_PRINTF(2 |
void void void | explain_string_buffer_vprintf (explain_string_buffer_t *sb, const char *fmt, va_list ap) |
void | explain_string_buffer_copy (explain_string_buffer_t *dst, const explain_string_buffer_t *src) |
void | explain_string_buffer_path_join (explain_string_buffer_t *sb, const char *s) |
int | explain_string_buffer_full (const explain_string_buffer_t *sb) |
void | explain_string_buffer_write (explain_string_buffer_t *sb, const char *data, size_t data_size) |
void | explain_string_buffer_truncate (explain_string_buffer_t *sb, long new_position) |
void | explain_string_buffer_rewind (explain_string_buffer_t *sb) |
Define Documentation
Typedef Documentation
Function Documentation
The explain_string_buffer_full functionmay be used to determine whether or not a string buffer is full (has no more room for additional characters).
- Parameters:
-
sb | The string buffer to test. |
Definition at line 24 of file full.c.
The explain_string_buffer_init function may be used to prespare a string buffer for use in building a C string.
- Parameters:
-
sb | The string buffer to be initialised. |
message | The array which is to contain the string being constructed by the string buffer. |
message_size | The size (in bytes) of the array which is to contain the string being constructed by the string buffer. |
Definition at line 24 of file string_buffer.c.
The explain_string_buffer_printf function is used to print a formatted string into a string buffer.
- Parameters:
-
sb | The string buffer to print into |
fmt | The format string controling the types of the remaining arguments. See printf(3) for more information. |
The explain_string_buffer_printf function is used to print a formatted string into a string buffer, translating the formatting text.
- Parameters:
-
sb | The string buffer to print into |
fmt | The format string controling the types of the remaining arguments. See printf(3) for more information on the content of this string. It will be passed through explain_gettext for translation before it is used. |
The explain_string_buffer_putc_escaped function is used to print a character with C escaping. This can be used for the contents of "string" and 'character' constants.
- Parameters:
-
sb | The string buffer to be initialised. |
c | The character to be printed if possible, and C escaped if not. |
delimiter | The delimiter character; single quote for character constants, double quote for string constants |
Definition at line 27 of file putc_escaped.c.
The explain_string_buffer_putc_quoted function is used to print a C character constant (i.e., including the single quotes), with escaping if necessary.
- Parameters:
-
sb | The string buffer to be initialised. |
c | The character to be printed as a C character constant. |
Definition at line 23 of file putc_quoted.c.
The explain_string_buffer_rewind function is used to trim a string buffer back to empty.
- Parameters:
-
sb | The string buffer to shorten |
Definition at line 24 of file rewind.c.
The explain_string_buffer_truncate function is used to trim a string buffer back to the given size.
- Parameters:
-
sb | The string buffer to shorten |
new_position | The newer shorter position (ignored of longer) |
Definition at line 24 of file truncate.c.
The explain_string_buffer_write function may be used to append a run of bytes to the end of a string buffer. They do not need to be NUL terminated; indeed, they shall not contain any NUL characters.
- Parameters:
-
sb | The string buffer to print into |
data | Pointer to the base of the array of characters to be written into the string buffer. |
data_size | The size in bytes (printable characters could be multi-byte sequences) the size in bytes of the array of bytes to write into the string buffer. |
Definition at line 26 of file write.c.