]> git.8kb.co.uk Git - dataflex/df32func/blobdiff - src/c/gnuregex.c
Amend functionality of antiquated matrix methods and minor changes to matrix parsing...
[dataflex/df32func] / src / c / gnuregex.c
index f0f2dea668b76d7960c85bef8c81b931eb99de56..f5cce37a72929641ce34a68d25ee6c5211f66542 100644 (file)
@@ -31,7 +31,7 @@ static char * quote_output(char *str) {
     /* Check for characters that need quoting */\r
     for (ptr = str; *ptr; ptr++) {\r
         char        ch = *ptr;\r
-        if (ch == '\"' || ch =='\\' || ch == '\{' || ch == ',') {\r
+        if (ch == '"' || ch =='\\' || ch == '{' || ch == ',') {\r
             do_quote = 1;\r
             break;\r
         }\r
@@ -118,11 +118,11 @@ static int compile_regex(regex_t *re, const char *pattern, const char *flags, in
 \r
     status = regcomp(re, pattern, cflags);\r
     if (status != REG_NOERROR) {\r
-               if (errors == 1) {\r
-               char error_message[MAX_ERROR_MSG];\r
-               regerror (status, re, error_message, MAX_ERROR_MSG);\r
-               fprintf (stderr, "Regex error compiling '%s': %s\n", pattern, error_message);\r
-               }\r
+        if (errors == 1) {\r
+            char error_message[MAX_ERROR_MSG];\r
+            regerror (status, re, error_message, MAX_ERROR_MSG);\r
+            fprintf (stderr, "Regex error compiling '%s': %s\n", pattern, error_message);\r
+        }\r
     }\r
     return status;\r
 }\r
@@ -300,7 +300,7 @@ int regexp_match(const char *str, const char *pattern, const char *flags, int er
         if (!result) /* match */\r
             return 1;\r
         else /* no match */\r
-               return 0;\r
+            return 0;\r
     }\r
     else /* error condition, but still: no match */\r
         return 0;\r