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>
This commit is contained in:
@ -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))
|
||||
|
Reference in New Issue
Block a user