diff options
Diffstat (limited to 'nx-X11/programs')
-rw-r--r-- | nx-X11/programs/Xserver/os/xprintf.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/nx-X11/programs/Xserver/os/xprintf.c b/nx-X11/programs/Xserver/os/xprintf.c index 674b33581..2b10e6eba 100644 --- a/nx-X11/programs/Xserver/os/xprintf.c +++ b/nx-X11/programs/Xserver/os/xprintf.c @@ -64,6 +64,8 @@ #include "os.h" #include <stdarg.h> #include <stdio.h> +#include <errno.h> +#include <string.h> #ifdef asprintf #undef asprintf @@ -243,28 +245,6 @@ XNFasprintf(char **ret, const char *_X_RESTRICT_KYWD format, ...) } /** - * snprintf that returns the actual number of bytes (excluding final '\0') that - * were copied into the buffer. - * This is opposed to the normal sprintf() usually returns the number of bytes - * that would have been written. - * - * @param s buffer to copy into - * @param n size of buffer s - * @param format printf style format string - * @param ... arguments for specified format - * @return number of bytes actually copied, excluding final '\0' - */ -int Xscnprintf(char *s, int n, const char *format, ...) -{ - int x; - va_list ap; - va_start(ap, format); - x = Xvscnprintf(s, n, format, ap); - va_end(ap); - return x; -} - -/** * Varargs snprintf that returns the actual number of bytes (excluding final * '\0') that were copied into the buffer. * This is opposed to the normal sprintf() usually returns the number of bytes |