aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/include/Xprintf.h
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/include/Xprintf.h')
-rw-r--r--nx-X11/programs/Xserver/include/Xprintf.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/include/Xprintf.h b/nx-X11/programs/Xserver/include/Xprintf.h
index 7f7366d33..e9ee79d22 100644
--- a/nx-X11/programs/Xserver/include/Xprintf.h
+++ b/nx-X11/programs/Xserver/include/Xprintf.h
@@ -66,4 +66,16 @@ _X_ATTRIBUTE_PRINTF(2, 0);
#define vasprintf Xvasprintf
#endif
+/*
+ * These functions provide a portable implementation of the linux kernel
+ * scnprintf & vscnprintf routines that return the number of bytes actually
+ * copied during a snprintf, (excluding the final '\0').
+ */
+extern _X_EXPORT int
+Xscnprintf(char *s, int n, const char * _X_RESTRICT_KYWD fmt, ...)
+_X_ATTRIBUTE_PRINTF(3,4);
+extern _X_EXPORT int
+Xvscnprintf(char *s, int n, const char * _X_RESTRICT_KYWD fmt, va_list va)
+_X_ATTRIBUTE_PRINTF(3,0);
+
#endif /* XPRINTF_H */