Commit c31cd773 authored by Mihai Moldovan's avatar Mihai Moldovan

nx-X11/programs/Xserver/os/xprintf.c: remove doubly-defined Xscnprintf function,…

nx-X11/programs/Xserver/os/xprintf.c: remove doubly-defined Xscnprintf function, add missing header includes. Fix up for 1e3a9748, which has been faulty in this regard.
parent e54e42af
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment