switch source tree from k&r to c99
This commit is contained in:
@@ -20,7 +20,7 @@ struct nhregex {
|
||||
};
|
||||
|
||||
struct nhregex *
|
||||
regex_init()
|
||||
regex_init(void)
|
||||
{
|
||||
struct nhregex *re;
|
||||
|
||||
@@ -30,9 +30,7 @@ regex_init()
|
||||
}
|
||||
|
||||
boolean
|
||||
regex_compile(s, re)
|
||||
const char *s;
|
||||
struct nhregex *re;
|
||||
regex_compile(const char *s, struct nhregex *re)
|
||||
{
|
||||
if (!re)
|
||||
return FALSE;
|
||||
@@ -44,16 +42,13 @@ struct nhregex *re;
|
||||
}
|
||||
|
||||
const char *
|
||||
regex_error_desc(re)
|
||||
struct nhregex *re UNUSED;
|
||||
regex_error_desc(struct nhregex *re UNUSED)
|
||||
{
|
||||
return "pattern match compilation error";
|
||||
}
|
||||
|
||||
boolean
|
||||
regex_match(s, re)
|
||||
const char *s;
|
||||
struct nhregex *re;
|
||||
regex_match(const char *s, struct nhregex *re)
|
||||
{
|
||||
if (!re || !re->pat || !s)
|
||||
return FALSE;
|
||||
@@ -62,8 +57,7 @@ struct nhregex *re;
|
||||
}
|
||||
|
||||
void
|
||||
regex_free(re)
|
||||
struct nhregex *re;
|
||||
regex_free(struct nhregex *re)
|
||||
{
|
||||
if (re) {
|
||||
if (re->pat)
|
||||
|
||||
Reference in New Issue
Block a user