File: snprintf.c

package info (click to toggle)
starplot 0.95.5-8.2%2Bdeb9u1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 3,476 kB
  • sloc: ansic: 11,296; cpp: 6,418; sh: 5,092; makefile: 613; yacc: 289; sed: 16
file content (20 lines) | stat: -rw-r--r-- 317 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "compat.h"

#if ! HAVE_SNPRINTF
#include <stdarg.h>
#include <stdio.h>

int
snprintf(char * string, size_t size, const char * format, ...)
{
  int length;
  va_list args;
  va_start(args, format);

  length = vsnprintf(string, size, format, args);

  /* clean up */
  va_end(args);
  return length;
}
#endif