diff options
Diffstat (limited to 'usr/src/lib/libcmdutils/libcmdutils.h')
-rw-r--r-- | usr/src/lib/libcmdutils/libcmdutils.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/src/lib/libcmdutils/libcmdutils.h b/usr/src/lib/libcmdutils/libcmdutils.h index bbc03475dc..e0c97178dc 100644 --- a/usr/src/lib/libcmdutils/libcmdutils.h +++ b/usr/src/lib/libcmdutils/libcmdutils.h @@ -156,6 +156,12 @@ extern int custr_alloc(custr_t **); extern void custr_free(custr_t *); /* + * Allocate a "custr_t" dynamic string object that operates on a fixed external + * buffer. + */ +extern int custr_alloc_buf(custr_t **, void *, size_t); + +/* * Append a single character, or a NUL-terminated string of characters, to a * dynamic string. Returns 0 on success and -1 otherwise. The dynamic string * will be unmodified if the function returns -1. @@ -164,6 +170,13 @@ extern int custr_appendc(custr_t *, char); extern int custr_append(custr_t *, const char *); /* + * Append a format string and arguments as though the contents were being parsed + * through snprintf. Returns 0 on success and -1 otherwise. The dynamic string + * will be unmodified if the function returns -1. + */ +extern int custr_append_printf(custr_t *, const char *, ...); + +/* * Determine the length in bytes, not including the NUL terminator, of the * dynamic string. */ |