Go to the documentation of this file.00001 #include "FormatString.h"
00002 #include <stdio.h>
00003 #include <string.h>
00004 #include <stdarg.h>
00005 #include "LinuxStrings.h"
00006
00007 char * FormatString(const char *format, ...)
00008 {
00009 static int textIndex=0;
00010 static char text[4][8096];
00011 va_list ap;
00012 va_start(ap, format);
00013
00014 if (++textIndex==4)
00015 textIndex=0;
00016 _vsnprintf(text[textIndex], 8096, format, ap);
00017 va_end(ap);
00018 text[textIndex][8096-1]=0;
00019
00020 return text[textIndex];
00021 }
00022
00023 char * FormatStringTS(char *output, const char *format, ...)
00024 {
00025 va_list ap;
00026 va_start(ap, format);
00027 _vsnprintf(output, 512, format, ap);
00028 va_end(ap);
00029 return output;
00030 }