diff options
Diffstat (limited to 'support')
-rw-r--r-- | support/ChangeLog | 6 | ||||
-rw-r--r-- | support/easy-vsnprintf.c | 30 | ||||
-rw-r--r-- | support/vsnprintf.c | 1 |
3 files changed, 37 insertions, 0 deletions
diff --git a/support/ChangeLog b/support/ChangeLog index c8d7dfdd..a16d7607 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,9 @@ +1998-03-09 Raja R Harinath <harinath@cs.umn.edu> + + * easy-vsnprintf.c: New file. Provides (v)snprintf as simple + wrappers to `__vsnprintf'. + * vsnprintf.c: New file. Empty for now. + Sun Mar 8 17:13:33 1998 Tom Tromey <tromey@cygnus.com> * Makefile.am: Rewrote. Library now named libgnomesupport, now diff --git a/support/easy-vsnprintf.c b/support/easy-vsnprintf.c new file mode 100644 index 00000000..b50df741 --- /dev/null +++ b/support/easy-vsnprintf.c @@ -0,0 +1,30 @@ +/* (v)snprintf in terms of __(v)snprintf + * + * Useful with Solaris 2.5 libc, which appears to have the `__*' versions + * of (v)snprintf. + * + * This file is in the public domain + * (in case it matters) + */ + +#include <stdarg.h> +#include <stdlib.h> + +extern int __vsnprintf (char *, size_t, const char *, va_list); + +int +vsnprintf (char *string, size_t maxlen, const char *format, va_list args) +{ + return __vsnprintf (string, maxlen, format, args); +} + +int +snprintf (char *string, size_t maxlen, const char *format, ...) +{ + va_list args; + int retval; + va_start(args, format); + retval = vsnprintf (string, maxlen, format, args); + va_end(args); + return retval; +} diff --git a/support/vsnprintf.c b/support/vsnprintf.c new file mode 100644 index 00000000..61193468 --- /dev/null +++ b/support/vsnprintf.c @@ -0,0 +1 @@ +#error "Fill in the code" |