7c4cd0e6b0
- split sprintf() and snprintf() to solve a linking problem when compiling an application
24 lines
344 B
C
24 lines
344 B
C
/*
|
|
* snprintf - print limited formatted output on an array
|
|
*/
|
|
/* $Header$ */
|
|
|
|
#include <stdio.h>
|
|
#include <stdarg.h>
|
|
#include <limits.h>
|
|
#include "loc_incl.h"
|
|
|
|
int
|
|
snprintf(char *s, size_t n, const char *format, ...)
|
|
{
|
|
va_list ap;
|
|
int retval;
|
|
|
|
va_start(ap, format);
|
|
|
|
retval = vsnprintf(s, n, format, ap);
|
|
|
|
va_end(ap);
|
|
|
|
return retval;
|
|
}
|