diff options
author | imp <imp@FreeBSD.org> | 2002-02-02 06:36:49 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-02-02 06:36:49 +0000 |
commit | 3fc8df52e3856eeac730574d5ae122806dd1e1ef (patch) | |
tree | 331e1d7f986e20bcd52361067fc4b66cab14b048 /bin/ed/glbl.c | |
parent | 5203a0a465a65bd5e6e40b6364bb0dbe05feb7cf (diff) | |
download | FreeBSD-src-3fc8df52e3856eeac730574d5ae122806dd1e1ef.zip FreeBSD-src-3fc8df52e3856eeac730574d5ae122806dd1e1ef.tar.gz |
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
o gc some #ifdef sun ... #endif code
Approved by: arch@, new style(9)
Diffstat (limited to 'bin/ed/glbl.c')
-rw-r--r-- | bin/ed/glbl.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/bin/ed/glbl.c b/bin/ed/glbl.c index 163f170..06c6848 100644 --- a/bin/ed/glbl.c +++ b/bin/ed/glbl.c @@ -41,8 +41,7 @@ static const char rcsid[] = /* build_active_list: add line matching a pattern to the global-active list */ int -build_active_list(isgcmd) - int isgcmd; +build_active_list(int isgcmd) { pattern_t *pat; line_t *lp; @@ -75,9 +74,7 @@ build_active_list(isgcmd) /* exec_global: apply command list in the command buffer to the active lines in a range; return command status */ long -exec_global(interact, gflag) - int interact; - int gflag; +exec_global(int interact, int gflag) { static char *ocmd = NULL; static int ocmdsz = 0; @@ -149,8 +146,7 @@ long active_ndx; /* active_list index (modulo active_last) */ /* set_active_node: add a line node to the global-active list */ int -set_active_node(lp) - line_t *lp; +set_active_node(line_t *lp) { if (active_last + 1 > active_size) { int ti = active_size; @@ -188,8 +184,7 @@ set_active_node(lp) /* unset_active_nodes: remove a range of lines from the global-active list */ void -unset_active_nodes(np, mp) - line_t *np, *mp; +unset_active_nodes(line_t *np, line_t *mp) { line_t *lp; long i; @@ -206,7 +201,7 @@ unset_active_nodes(np, mp) /* next_active_node: return the next global-active line node */ line_t * -next_active_node() +next_active_node(void) { while (active_ptr < active_last && active_list[active_ptr] == NULL) active_ptr++; @@ -216,7 +211,7 @@ next_active_node() /* clear_active_list: clear the global-active list */ void -clear_active_list() +clear_active_list(void) { SPL1(); active_size = active_last = active_ptr = active_ndx = 0; |