]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - opts.c
Eeasy fix for that
[xonotic/gmqcc.git] / opts.c
diff --git a/opts.c b/opts.c
index 4cfa79c9eb13fd900e2cf5935db8fb253169a42c..286b1686b66c72a496f656664ffaba3e6497b75a 100644 (file)
--- a/opts.c
+++ b/opts.c
  */
 #include <string.h>
 #include <stdlib.h>
-#include <ctype.h>
 
 #include "gmqcc.h"
 
 unsigned int opts_optimizationcount[COUNT_OPTIMIZATIONS];
 opts_cmd_t   opts; /* command lien options */
 
-static void opts_setdefault() {
+static void opts_setdefault(void) {
     memset(&opts, 0, sizeof(opts_cmd_t));
     OPTS_OPTION_BOOL(OPTION_CORRECTION) = true;
 
@@ -163,13 +162,13 @@ void opts_setoptimlevel(unsigned int level) {
  */
 static char *opts_ini_rstrip(char *s) {
     char *p = s + strlen(s);
-    while(p > s && isspace(*--p))
+    while(p > s && util_isspace(*--p))
         *p = '\0';
     return s;
 }
 
 static char *opts_ini_lskip(const char *s) {
-    while (*s && isspace(*s))
+    while (*s && util_isspace(*s))
         s++;
     return (char*)s;
 }
@@ -177,7 +176,7 @@ static char *opts_ini_lskip(const char *s) {
 static char *opts_ini_next(const char *s, char c) {
     bool last = false;
     while (*s && *s != c && !(last && *s == ';'))
-        last = !!isspace(*s), s++;
+        last = !!util_isspace(*s), s++;
 
     return (char*)s;
 }
@@ -348,7 +347,7 @@ void opts_ini_init(const char *file) {
      *  gmqcc.ini
      *  gmqcc.cfg
      */
-    char       *error;
+    char       *error = NULL;
     size_t     line;
     FILE       *ini;