GccStyleErrorMessages

From CSWiki
Revision as of 12:39, 27 April 2006 by Kruhft (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Causes chuck to generate gcc style/format error messages to make the edit/compile/listen cycle much easier using emacs compilation mode.

diff -u chuck-1.2.0.5-devel/src/chuck_errmsg.cpp chuck-1.2.0.5/src/chuck_errmsg.cpp
--- chuck-1.2.0.5-devel/src/chuck_errmsg.cpp    2006-04-27 10:58:36.000000000 -0600
+++ chuck-1.2.0.5/src/chuck_errmsg.cpp  2006-04-05 08:59:54.000000000 -0600
@@ -128,15 +128,6 @@
         num--;                                                                                                                                                                       
     }

-    /* kruhft */
-#define GCC_STYLE_ERROR_MESSAGES
-#ifdef GCC_STYLE_ERROR_MESSAGES
-  fprintf(stderr, "%s:%d: error: ", *fileName ? mini(fileName) : "chuck", num);                                                                                                      
-  va_start(ap, message);                                                                                                                                                             
-  vfprintf(stderr, message, ap);                                                                                                                                                     
-  va_end(ap);                                                                                                                                                                        
-  fprintf(stderr, "\n");                                                                                                                                                             
-#else
     fprintf( stderr, "[%s]:", *fileName ? mini(fileName) : "chuck" );                                                                                                                
     sprintf( g_lasterror, "[%s]:", *fileName ? mini(fileName) : "chuck" );                                                                                                           
     if(lines)
@@ -153,7 +144,6 @@
     va_end(ap);                                                                                                                                                                      
     fprintf(stderr, "\n");                                                                                                                                                           
     strcat( g_lasterror, g_buffer );                                                                                                                                                 
-#endif
 }