From c31cd7737461cdab0dd9f78518147c826d53c606 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Mon, 11 Dec 2017 01:05:50 +0100 Subject: nx-X11/programs/Xserver/os/xprintf.c: remove doubly-defined Xscnprintf function, add missing header includes. Fix up for 1e3a97482840401af9ffcf73db6008ebfe6c1d52, which has been faulty in this regard. --- nx-X11/programs/Xserver/os/xprintf.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'nx-X11') 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 #include +#include +#include #ifdef asprintf #undef asprintf @@ -242,28 +244,6 @@ XNFasprintf(char **ret, const char *_X_RESTRICT_KYWD format, ...) return size; } -/** - * 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. -- cgit v1.2.3