]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cleanup: remove Cisms from GNURegex alternative
authorAmos Jeffries <amosjeffries@squid-cache.org>
Fri, 16 Apr 2010 06:55:31 +0000 (00:55 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Fri, 16 Apr 2010 06:55:31 +0000 (00:55 -0600)
compat/GnuRegex.c
compat/GnuRegex.h

index 660654902816960d0cad92b6196c33f962893efd..35924851d16a1256aa27bf0452348ca6060a8fd0 100644 (file)
@@ -104,7 +104,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
@@ -112,25 +112,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,
+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));
+          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,
+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));
+          int start, struct re_registers * regs, int stop);
 
 
 /* isalpha etc. are used for the character classes.  */
index 6bcb99ea166e6eca66b9821934567b3a4607540f..d57a0c9c499dfbdeae9d59cc9f5dbbb5da7b8b11 100644 (file)
@@ -398,21 +398,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
 }