diff options
author | Mark Kettenis <kettenis@gnu.org> | 2005-03-17 22:11:09 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2005-03-17 22:11:09 +0000 |
commit | bde2058dde90fc3c353df5aace64005d399ee24a (patch) | |
tree | 37d84c0de40cbf4a2a862d12f82ca42faae1b5e4 /gdb/defs.h | |
parent | 3ecda4574edb38ad12fb491ccaf6d9b0caa3a07a (diff) | |
download | gdb-bde2058dde90fc3c353df5aace64005d399ee24a.zip gdb-bde2058dde90fc3c353df5aace64005d399ee24a.tar.gz gdb-bde2058dde90fc3c353df5aace64005d399ee24a.tar.bz2 |
* defs.h (xsnprintf): New prototype.
* utils.c (xsnprintf): New function.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r-- | gdb/defs.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -879,6 +879,10 @@ extern void xvasprintf (char **ret, const char *format, va_list ap); extern char *xstrprintf (const char *format, ...) ATTR_FORMAT (printf, 1, 2); extern char *xstrvprintf (const char *format, va_list ap); +/* Like snprintf, but throw an error if the output buffer is too small. */ +extern int xsnprintf (char *str, size_t size, const char *format, ...) + ATTR_FORMAT (printf, 3, 4); + extern int parse_escape (char **); /* Message to be printed before the error message, when an error occurs. */ |