File: vsnprintf.c

package info (click to toggle)
dictd 1.9.15-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,760 kB
  • ctags: 3,266
  • sloc: ansic: 28,734; sh: 4,576; makefile: 1,002; perl: 410; yacc: 280; cpp: 275; lex: 217
file content (19 lines) | stat: -rw-r--r-- 372 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "dictP.h"

#include <stdarg.h>
#include <stddef.h>
#include <maa.h>
#include <string.h>

/*
  partial vsnprintf implementation:
  - size PARAMETER IS COMPLETELY IGNORED
*/

int vsnprintf(char *str, size_t size, const char *format, va_list ap)
{
   vsprintf (str, format, ap);

   if (strlen (str) >= size)
      err_fatal( __FUNCTION__, "Buffer too small\n" );
}