File: vsnprintf.c

package info (click to toggle)
dictd 1.12.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,584 kB
  • ctags: 1,645
  • sloc: ansic: 13,063; sh: 4,046; yacc: 491; makefile: 443; cpp: 277; lex: 255; perl: 175; awk: 12
file content (19 lines) | stat: -rw-r--r-- 368 bytes parent folder | download | duplicates (8)
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( __func__, "Buffer too small\n" );
}