=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sed/compile.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- src/usr.bin/sed/compile.c 2003/06/03 02:56:16 1.14 +++ src/usr.bin/sed/compile.c 2003/06/10 22:20:50 1.15 @@ -1,4 +1,4 @@ -/* $OpenBSD: compile.c,v 1.14 2003/06/03 02:56:16 millert Exp $ */ +/* $OpenBSD: compile.c,v 1.15 2003/06/10 22:20:50 deraadt Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -35,7 +35,7 @@ #ifndef lint /* from: static char sccsid[] = "@(#)compile.c 8.2 (Berkeley) 4/28/95"; */ -static char *rcsid = "$OpenBSD: compile.c,v 1.14 2003/06/03 02:56:16 millert Exp $"; +static char *rcsid = "$OpenBSD: compile.c,v 1.15 2003/06/10 22:20:50 deraadt Exp $"; #endif /* not lint */ #include @@ -128,7 +128,7 @@ * Initialise appends. */ void -compile() +compile(void) { *compile_stream(&prog) = NULL; fixuplabel(prog, NULL); @@ -144,8 +144,7 @@ } while (0) static struct s_command ** -compile_stream(link) - struct s_command **link; +compile_stream(struct s_command **link) { char *p; static char lbuf[_POSIX2_LINE_MAX + 1]; /* To save stack */ @@ -335,8 +334,7 @@ * with the processed string. */ static char * -compile_delimited(p, d) - char *p, *d; +compile_delimited(char *p, char *d) { char c; @@ -374,9 +372,7 @@ /* compile_ccl: expand a POSIX character class */ static char * -compile_ccl(sp, t) - char **sp; - char *t; +compile_ccl(char **sp, char *t) { int c, d; char *s = *sp; @@ -407,9 +403,7 @@ * Cflags are passed to regcomp. */ static char * -compile_re(p, repp) - char *p; - regex_t **repp; +compile_re(char *p, regex_t **repp) { int eval; char re[_POSIX2_LINE_MAX + 1]; @@ -433,9 +427,7 @@ * expressions. */ static char * -compile_subst(p, s) - char *p; - struct s_subst *s; +compile_subst(char *p, struct s_subst *s) { static char lbuf[_POSIX2_LINE_MAX + 1]; int asize, ref, size; @@ -493,9 +485,7 @@ * Compile the flags of the s command */ static char * -compile_flags(p, s) - char *p; - struct s_subst *s; +compile_flags(char *p, struct s_subst *s) { int gn; /* True if we have seen g or n */ char wfile[_POSIX2_LINE_MAX + 1], *q; @@ -568,9 +558,7 @@ * Compile a translation set of strings into a lookup table. */ static char * -compile_tr(p, transtab) - char *p; - char **transtab; +compile_tr(char *p, char **transtab) { int i; char *lt, *op, *np; @@ -609,7 +597,7 @@ * Compile the text following an a, c, or i command. */ static char * -compile_text() +compile_text(void) { int asize, esc_nl, size; char *text, *p, *op, *s; @@ -646,9 +634,7 @@ * it. Fill the structure pointed to according to the address. */ static char * -compile_addr(p, a) - char *p; - struct s_addr *a; +compile_addr(char *p, struct s_addr *a) { char *end; @@ -683,9 +669,7 @@ * Return a copy of all the characters up to \n or \0. */ static char * -duptoeol(s, ctype) - char *s; - char *ctype; +duptoeol(char *s, char *ctype) { size_t len; int ws; @@ -709,8 +693,7 @@ * TODO: Remove } nodes */ static void -fixuplabel(cp, end) - struct s_command *cp, *end; +fixuplabel(struct s_command *cp, struct s_command *end) { for (; cp != end; cp = cp->next) @@ -741,8 +724,7 @@ * Associate the given command label for later lookup. */ static void -enterlabel(cp) - struct s_command *cp; +enterlabel(struct s_command *cp) { struct labhash **lhp, *lh; u_char *p; @@ -767,8 +749,7 @@ * list cp. L is excluded from the search. Return NULL if not found. */ static struct s_command * -findlabel(name) - char *name; +findlabel(char *name) { struct labhash *lh; u_char *p; @@ -790,7 +771,7 @@ * table space. */ static void -uselabel() +uselabel(void) { struct labhash *lh, *next; int i;