Remove __P macro usage so it compiles without cdefs.h.

This commit is contained in:
Bryan Henderson 1996-12-15 09:21:37 +00:00
parent 9fc7250d3a
commit fa9c0fff36
3 changed files with 62 additions and 50 deletions

View File

@ -90,12 +90,23 @@ extern "C" {
#endif
/* === engine.c === */
static int matcher __P((struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], int eflags));
static char *dissect __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst));
static char *backref __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst, sopno lev));
static char *fast __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst));
static char *slow __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst));
static states step __P((struct re_guts *g, sopno start, sopno stop, states bef, int ch, states aft));
static int
matcher(struct re_guts *g, char *string, size_t nmatch,
regmatch_t pmatch[], int eflags);
static char *
dissect(struct match *m, char *start, char *stop,
sopno startst, sopno stopst);
static char *
backref(struct match *m, char *start, char *stop,
sopno startst, sopno stopst, sopno lev);
static char *
fast(struct match *m, char *start, char *stop,
sopno startst, sopno stopst);
static char *
slow(struct match *m, char *start, char *stop, sopno startst, sopno stopst);
static states
step(struct re_guts *g, sopno start,
sopno stop, states bef, int ch, states aft);
#define BOL (OUT+1)
#define EOL (BOL+1)
#define BOLEOL (BOL+2)
@ -106,13 +117,17 @@ static states step __P((struct re_guts *g, sopno start, sopno stop, states bef,
#define NONCHAR(c) ((c) > CHAR_MAX)
#define NNONCHAR (CODEMAX-CHAR_MAX)
#ifdef REDEBUG
static void print __P((struct match *m, char *caption, states st, int ch, FILE *d));
static void
print(struct match *m, char *caption, states st, int ch, FILE *d);
#endif
#ifdef REDEBUG
static void at __P((struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst));
static void
at(struct match *m, char *title, char *start, char *stop,
sopno startst, sopno stopst);
#endif
#ifdef REDEBUG
static char *pchar __P((int ch));
static char *
pchar(int ch);
#endif
#ifdef __cplusplus

View File

@ -79,46 +79,43 @@ extern "C" {
#endif
/* === regcomp.c === */
static void p_ere __P((struct parse *p, int stop));
static void p_ere_exp __P((struct parse *p));
static void p_str __P((struct parse *p));
static void p_bre __P((struct parse *p, int end1, int end2));
static int p_simp_re __P((struct parse *p, int starordinary));
static int p_count __P((struct parse *p));
static void p_bracket __P((struct parse *p));
static void p_b_term __P((struct parse *p, cset *cs));
static void p_b_cclass __P((struct parse *p, cset *cs));
static void p_b_eclass __P((struct parse *p, cset *cs));
static char p_b_symbol __P((struct parse *p));
static char p_b_coll_elem __P((struct parse *p, int endc));
static char othercase __P((int ch));
static void bothcases __P((struct parse *p, int ch));
static void ordinary __P((struct parse *p, int ch));
static void nonnewline __P((struct parse *p));
static void repeat __P((struct parse *p, sopno start, int from, int to));
static int seterr __P((struct parse *p, int e));
static cset *allocset __P((struct parse *p));
static void freeset __P((struct parse *p, cset *cs));
static int freezeset __P((struct parse *p, cset *cs));
static int firstch __P((struct parse *p, cset *cs));
static int nch __P((struct parse *p, cset *cs));
static void mcadd __P((struct parse *p, cset *cs, char *cp));
/* static void mcsub __P((cset *cs, char *cp)); */
/*static int mcin __P((cset *cs, char *cp));*/
/*static char *mcfind __P((cset *cs, char *cp)); */
static void mcinvert __P((struct parse *p, cset *cs));
static void mccase __P((struct parse *p, cset *cs));
static int isinsets __P((struct re_guts *g, int c));
static int samesets __P((struct re_guts *g, int c1, int c2));
static void categorize __P((struct parse *p, struct re_guts *g));
static sopno dupl __P((struct parse *p, sopno start, sopno finish));
static void doemit __P((struct parse *p, sop op, size_t opnd));
static void doinsert __P((struct parse *p, sop op, size_t opnd, sopno pos));
static void dofwd __P((struct parse *p, sopno pos, sop value));
static void enlarge __P((struct parse *p, sopno size));
static void stripsnug __P((struct parse *p, struct re_guts *g));
static void findmust __P((struct parse *p, struct re_guts *g));
static sopno pluscount __P((struct parse *p, struct re_guts *g));
static void p_ere(struct parse *p, int stop);
static void p_ere_exp(struct parse *p);
static void p_str(struct parse *p);
static void p_bre(struct parse *p, int end1, int end2);
static int p_simp_re(struct parse *p, int starordinary);
static int p_count(struct parse *p);
static void p_bracket(struct parse *p);
static void p_b_term(struct parse *p, cset *cs);
static void p_b_cclass(struct parse *p, cset *cs);
static void p_b_eclass(struct parse *p, cset *cs);
static char p_b_symbol(struct parse *p);
static char p_b_coll_elem(struct parse *p, int endc);
static char othercase(int ch);
static void bothcases(struct parse *p, int ch);
static void ordinary(struct parse *p, int ch);
static void nonnewline(struct parse *p);
static void repeat(struct parse *p, sopno start, int from, int to);
static int seterr(struct parse *p, int e);
static cset *allocset(struct parse *p);
static void freeset(struct parse *p, cset *cs);
static int freezeset(struct parse *p, cset *cs);
static int firstch(struct parse *p, cset *cs);
static int nch(struct parse *p, cset *cs);
static void mcadd(struct parse *p, cset *cs, char *cp);
static void mcinvert(struct parse *p, cset *cs);
static void mccase(struct parse *p, cset *cs);
static int isinsets(struct re_guts *g, int c);
static int samesets(struct re_guts *g, int c1, int c2);
static void categorize(struct parse *p, struct re_guts *g);
static sopno dupl(struct parse *p, sopno start, sopno finish);
static void doemit(struct parse *p, sop op, size_t opnd);
static void doinsert(struct parse *p, sop op, size_t opnd, sopno pos);
static void dofwd(struct parse *p, sopno pos, sop value);
static void enlarge(struct parse *p, sopno size);
static void stripsnug(struct parse *p, struct re_guts *g);
static void findmust(struct parse *p, struct re_guts *g);
static sopno pluscount(struct parse *p, struct re_guts *g);
#ifdef __cplusplus
}

View File

@ -58,7 +58,7 @@ extern "C" {
#endif
/* === regerror.c === */
static char *regatoi __P((const regex_t *preg, char *localbuf));
static char *regatoi(const regex_t *preg, char *localbuf);
#ifdef __cplusplus
}