File: snprintf.cc

package info (click to toggle)
xosview 1.8.3%2Bdebian-9
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,788 kB
  • ctags: 1,428
  • sloc: cpp: 9,506; sh: 4,257; ansic: 368; makefile: 89; awk: 20
file content (17 lines) | stat: -rw-r--r-- 305 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef HAVE_SNPRINTF

#include <stdarg.h>
#include <stdio.h>

extern "C" int snprintf ( char *str, int n, const char *format, ...)
    {
    /* punt the warning */
    n++;
    va_list ap;
    va_start(ap, format);
    int rval = vsprintf(str, format, ap);
    va_end(ap);
    return rval;
    }

#endif