aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-12-11 01:05:50 +0100
committerMihai Moldovan <ionic@ionic.de>2017-12-11 01:05:52 +0100
commitc31cd7737461cdab0dd9f78518147c826d53c606 (patch)
tree3b2347f9ee8b0892afa30f11ff0fd28daefe7a8d /nx-X11/programs/Xserver
parente54e42af93017ba6ab5f18a83e705a8e24ed3906 (diff)
downloadnx-libs-c31cd7737461cdab0dd9f78518147c826d53c606.tar.gz
nx-libs-c31cd7737461cdab0dd9f78518147c826d53c606.tar.bz2
nx-libs-c31cd7737461cdab0dd9f78518147c826d53c606.zip
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.
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/os/xprintf.c24
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