]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - error.c
gcc style long option support and -std=foo added
[xonotic/gmqcc.git] / error.c
diff --git a/error.c b/error.c
index 641d5e503b9e1ff68474b49eb5e2b5b1480823f6..b9cf740b6b5ddae8383ff718b87a76598dc6a25e 100644 (file)
--- a/error.c
+++ b/error.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 
+ * Copyright (C) 2012
  *     Dale Weiler
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * intereting like colors for the console.
  */
 #ifndef WIN32
-#    define CON_BLACK   30
-#    define CON_RED     31
-#    define CON_GREEN   32
-#    define CON_BROWN   33
-#    define CON_BLUE    34
-#    define CON_MAGENTA 35
-#    define CON_CYAN    36
-#    define CON_WHITE   37
+enum {
+    CON_BLACK   = 30,
+    CON_RED,
+    CON_GREEN,
+    CON_BROWN,
+    CON_BLUE,
+    CON_MAGENTA,
+    CON_CYAN ,
+    CON_WHITE
+};
 static const int error_color[] = {
     CON_RED,
     CON_CYAN,
@@ -61,7 +63,7 @@ int error(lex_file *file, int status, const char *msg, ...) {
     char      bu[1024*4]; /* enough? */
     char      fu[1024*4]; /* enough? */
     va_list   va;
-    
+
     if (error_total + 1 > error_max) {
         fprintf(stderr, "%d errors and more following, bailing\n", error_total);
         exit (-1);
@@ -83,8 +85,8 @@ int error(lex_file *file, int status, const char *msg, ...) {
 #    ifndef WIN32
     fputs    ("\033[0m", stderr);
 #    endif
-    
+
     fflush   (stderr);
-    
+
     return status;
 }