diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-08-19 15:31:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-19 15:46:06 -0700 |
commit | 178b33157aba98e34f641408105be54f42cbe5bc (patch) | |
tree | a74049b538f8783e7ecc219eaa7b9792b267156f /compat/regex/regcomp.c | |
parent | b50f37098fcf7efb097c01daa3d60df8b9704025 (diff) | |
download | git-178b33157aba98e34f641408105be54f42cbe5bc.tar.gz |
compat/regex: get rid of old-style definition
These files mostly used ANSI style function definitions, but with small
number of old-style ones. Convert them to consistently use ANSI style.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/regex/regcomp.c')
-rw-r--r-- | compat/regex/regcomp.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/compat/regex/regcomp.c b/compat/regex/regcomp.c index 4a80056e1f..8c96ed942c 100644 --- a/compat/regex/regcomp.c +++ b/compat/regex/regcomp.c @@ -230,10 +230,9 @@ btowc (int c) are set in BUFP on entry. */ const char * -re_compile_pattern (pattern, length, bufp) - const char *pattern; - size_t length; - struct re_pattern_buffer *bufp; +re_compile_pattern (const char *pattern, + size_t length, + struct re_pattern_buffer *bufp) { reg_errcode_t ret; @@ -271,8 +270,7 @@ reg_syntax_t re_syntax_options; defined in regex.h. We return the old syntax. */ reg_syntax_t -re_set_syntax (syntax) - reg_syntax_t syntax; +re_set_syntax (reg_syntax_t syntax) { reg_syntax_t ret = re_syntax_options; @@ -284,8 +282,7 @@ weak_alias (__re_set_syntax, re_set_syntax) #endif int -re_compile_fastmap (bufp) - struct re_pattern_buffer *bufp; +re_compile_fastmap (struct re_pattern_buffer *bufp) { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; char *fastmap = bufp->fastmap; @@ -484,10 +481,9 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, the return codes and their meanings.) */ int -regcomp (preg, pattern, cflags) - regex_t *__restrict preg; - const char *__restrict pattern; - int cflags; +regcomp (regex_t *__restrict preg, + const char *__restrict pattern, + int cflags) { reg_errcode_t ret; reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED @@ -650,8 +646,7 @@ free_dfa_content (re_dfa_t *dfa) /* Free dynamically allocated space used by PREG. */ void -regfree (preg) - regex_t *preg; +regfree (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; if (BE (dfa != NULL, 1)) |