File: snprintf.cc

package info (click to toggle)
xosview 1.7.3-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,000 kB
  • ctags: 1,200
  • sloc: cpp: 7,317; sh: 1,760; ansic: 368; makefile: 46; 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