]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cleanup: remove Cisms from GNURegex alternative
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 22 Apr 2010 13:10:25 +0000 (01:10 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 22 Apr 2010 13:10:25 +0000 (01:10 +1200)
compat/GnuRegex.c
compat/GnuRegex.h

index 222429cd5a552d5ac783e5792f7b829022483651..bdb302c0a22b6c2b6633b96898e6d7e598898ed7 100644 (file)
@@ -103,7 +103,7 @@ init_syntax_once(void)
 /* Compile a fastmap for the compiled pattern in BUFFER; used to
  * accelerate searches.  Return 0 if successful and -2 if was an
  * internal error.  */
-static int re_compile_fastmap _RE_ARGS((struct re_pattern_buffer * buffer));
+static int re_compile_fastmap(struct re_pattern_buffer * buffer);
 
 
 /* Search in the string STRING (with length LENGTH) for the pattern
@@ -111,25 +111,22 @@ static int re_compile_fastmap _RE_ARGS((struct re_pattern_buffer * buffer));
  * characters.  Return the starting position of the match, -1 for no
  * match, or -2 for an internal error.  Also return register
  * information in REGS (if REGS and BUFFER->no_sub are nonzero).  */
-static int re_search
-_RE_ARGS((struct re_pattern_buffer * buffer, const char *string,
-          int length, int start, int range, struct re_registers * regs));
+static int re_search(struct re_pattern_buffer * buffer, const char *string,
+                     int length, int start, int range, struct re_registers * regs);
 
 
 /* Like `re_search', but search in the concatenation of STRING1 and
  * STRING2.  Also, stop searching at index START + STOP.  */
-static int re_search_2
-_RE_ARGS((struct re_pattern_buffer * buffer, const char *string1,
-          int length1, const char *string2, int length2,
-          int start, int range, struct re_registers * regs, int stop));
+static int re_search_2(struct re_pattern_buffer * buffer, const char *string1,
+                       int length1, const char *string2, int length2,
+                       int start, int range, struct re_registers * regs, int stop);
 
 
 /* Like `re_search_2', but return how many characters in STRING the regexp
  * in BUFFER matched, starting at position START.  */
-static int re_match_2
-_RE_ARGS((struct re_pattern_buffer * buffer, const char *string1,
-          int length1, const char *string2, int length2,
-          int start, struct re_registers * regs, int stop));
+static int re_match_2(struct re_pattern_buffer * buffer, const char *string1,
+                      int length1, const char *string2, int length2,
+                      int start, struct re_registers * regs, int stop);
 
 
 /* isalpha etc. are used for the character classes.  */
index 32dac86a165200d29ef70438c0daadf4ae15dcee..6309c36484f20f21b5658969442c8fff76a9c9a4 100644 (file)
@@ -405,25 +405,11 @@ extern "C" {
      * unfortunately clutters up the declarations a bit, but I think it's
      * worth it.  */
 
-#if STDC_HEADERS
-
-#define _RE_ARGS(args) args
-
-#else /* not __STDC__ */
-
-#define _RE_ARGS(args) ()
-
-#endif /* not __STDC__ */
-
     /* POSIX compatibility.  */
-    extern int regcomp _RE_ARGS((regex_t * preg, const char *pattern, int cflags));
-    extern int regexec
-    _RE_ARGS((const regex_t * preg, const char *string, size_t nmatch,
-              regmatch_t pmatch[], int eflags));
-    extern size_t regerror
-    _RE_ARGS((int errcode, const regex_t * preg, char *errbuf,
-              size_t errbuf_size));
-    extern void regfree _RE_ARGS((regex_t * preg));
+    extern int regcomp(regex_t * preg, const char *pattern, int cflags);
+    extern int regexec(const regex_t * preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags);
+    extern size_t regerror(int errcode, const regex_t * preg, char *errbuf, size_t errbuf_size);
+    extern void regfree(regex_t * preg);
 
 #ifdef __cplusplus
 }