diff options
author | des <des@FreeBSD.org> | 2003-11-04 12:15:20 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-11-04 12:15:20 +0000 |
commit | b91f0f90098b58510256c011dd9c94bdafdf1c93 (patch) | |
tree | c02afdeabaa33ba118bd0228ecc163810ec41319 /usr.bin/sed/compile.c | |
parent | 12bd424bdff20ebb0fe66992ca9bf4afccef3127 (diff) | |
download | FreeBSD-src-b91f0f90098b58510256c011dd9c94bdafdf1c93.zip FreeBSD-src-b91f0f90098b58510256c011dd9c94bdafdf1c93.tar.gz |
ANSIfy
Diffstat (limited to 'usr.bin/sed/compile.c')
-rw-r--r-- | usr.bin/sed/compile.c | 49 |
1 files changed, 15 insertions, 34 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c index a97e01d..07528611 100644 --- a/usr.bin/sed/compile.c +++ b/usr.bin/sed/compile.c @@ -132,7 +132,7 @@ struct s_command *prog; * Initialise appends. */ void -compile() +compile(void) { *compile_stream(&prog) = NULL; fixuplabel(prog, NULL); @@ -153,8 +153,7 @@ compile() } 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 */ @@ -363,8 +362,7 @@ nonsel: /* Now parse the command */ * with the processed string. */ static char * -compile_delimited(p, d) - char *p, *d; +compile_delimited(char *p, char *d) { char c; @@ -404,9 +402,7 @@ compile_delimited(p, d) /* 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; @@ -437,9 +433,7 @@ compile_ccl(sp, t) * 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]; @@ -465,9 +459,7 @@ compile_re(p, repp) * 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, size; @@ -554,9 +546,7 @@ compile_subst(p, s) * 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; @@ -629,9 +619,7 @@ compile_flags(p, s) * 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; @@ -669,7 +657,7 @@ compile_tr(p, transtab) * Compile the text following an a or i command. */ static char * -compile_text() +compile_text(void) { int asize, esc_nl, size; char *text, *p, *op, *s; @@ -710,9 +698,7 @@ compile_text() * 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; @@ -747,9 +733,7 @@ compile_addr(p, a) * Return a copy of all the characters up to \n or \0. */ static char * -duptoeol(s, ctype) - char *s; - const char *ctype; +duptoeol(char *s, const char *ctype) { size_t len; int ws; @@ -775,8 +759,7 @@ duptoeol(s, ctype) * 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) @@ -807,8 +790,7 @@ fixuplabel(cp, end) * 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; @@ -834,8 +816,7 @@ enterlabel(cp) * 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; @@ -857,7 +838,7 @@ findlabel(name) * table space. */ static void -uselabel() +uselabel(void) { struct labhash *lh, *next; int i; |