Blame view
tools/sctk-2.4.10/src/sclite/rsprintf.c
781 Bytes
8dcb6dfcb first commit |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
#include "sctk.h" #ifdef __STDC__ # include <stdarg.h> #else # include <varargs.h> #endif char static_message_buffer[10000]; #ifdef __STDC__ char *rsprintf(char *format , ...) #else char *rsprintf(va_alist) va_dcl #endif { va_list args; #ifndef __STDC__ char *format; #endif #ifdef __STDC__ va_start(args,format); #else va_start(args); format = va_arg(args,char *); #endif /* printf("rsprintf: format: %s ",format); */ vsprintf(static_message_buffer,format,args); if (strlen(static_message_buffer) > 10000){ fprintf(stderr,"Error: rsprintf's internal buffer is too small. increase the size "); exit (1); } /* printf("rsprintf: message: %s ",static_message_buffer);*/ return(static_message_buffer); } |