ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gclib/GBase.cpp
(Generate patch)
# Line 11 | Line 11
11   #define S_ISREG(mode)  (((mode) & S_IFMT) == S_IFREG)
12   #endif
13  
14 static char msg[4069];
14   /*
15   #ifdef _DEFINE_WIN32_FSEEKO
16   int fseeko(FILE *stream, off_t offset, int whence) {
# Line 54 | Line 53
53   //************************* Debug helpers **************************
54   // Assert failed routine
55   void GAssert(const char* expression, const char* filename, unsigned int lineno){
56 +  char msg[4096];
57    sprintf(msg,"%s(%d): ASSERT(%s) failed.\n",filename,lineno,expression);
58    fprintf(stderr,"%s",msg);
59    //abort();
# Line 61 | Line 61
61   // Error routine (prints error message and exits!)
62   void GError(const char* format,...){
63    #ifdef __WIN32__
64 +    char msg[4096];
65      va_list arguments;
66      va_start(arguments,format);
67      vsprintf(msg,format,arguments);
# Line 83 | Line 84
84    
85   // Warning routine (just print message without exiting)
86   void GMessage(const char* format,...){
87 +  char msg[4096];
88    va_list arguments;
89    va_start(arguments,format);
90    vsprintf(msg,format,arguments);
# Line 752 | Line 754
754   }
755  
756   char* commaprint(uint64 n) {
757 <  static int comma = '\0';
758 <  static char retbuf[48];
757 >  int comma = '\0';
758 >  char retbuf[48];
759    char *p = &retbuf[sizeof(retbuf)-1];
760    int i = 0;
761    if(comma == '\0') {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines