diff options
author | imp <imp@FreeBSD.org> | 2002-02-02 06:50:57 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-02-02 06:50:57 +0000 |
commit | 5ef5088ac4e038d0a147a08377ef087fd6edf527 (patch) | |
tree | 01a827446e9ba4f34cf1e754fcac691f6c9eb1cf /bin/sh/histedit.c | |
parent | 50014e35418ca00d25ea852fc4f94acf80be4df3 (diff) | |
download | FreeBSD-src-5ef5088ac4e038d0a147a08377ef087fd6edf527.zip FreeBSD-src-5ef5088ac4e038d0a147a08377ef087fd6edf527.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 Change
int
foo() {
...
to
int
foo(void)
{
...
Diffstat (limited to 'bin/sh/histedit.c')
-rw-r--r-- | bin/sh/histedit.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index 55cf73b..453c9a6 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -72,14 +72,14 @@ EditLine *el; /* editline cookie */ int displayhist; static FILE *el_in, *el_out, *el_err; -STATIC char *fc_replace __P((const char *, char *, char *)); +STATIC char *fc_replace(const char *, char *, char *); /* * Set history and editing status. Called whenever the status may * have changed (figures out what to do). */ void -histedit() +histedit(void) { #define editing (Eflag || Vflag) @@ -168,9 +168,7 @@ sethistsize(hs) * the Korn shell fc command. Oh well... */ int -histcmd(argc, argv) - int argc; - char **argv; +histcmd(int argc, char **argv) { int ch; char *editor = NULL; @@ -395,9 +393,7 @@ histcmd(argc, argv) } STATIC char * -fc_replace(s, p, r) - const char *s; - char *p, *r; +fc_replace(const char *s, char *p, char *r) { char *dest; int plen = strlen(p); @@ -419,8 +415,7 @@ fc_replace(s, p, r) } int -not_fcnumber(s) - char *s; +not_fcnumber(char *s) { if (s == NULL) return (0); @@ -430,9 +425,7 @@ not_fcnumber(s) } int -str_to_event(str, last) - char *str; - int last; +str_to_event(char *str, int last) { HistEvent he; char *s = str; @@ -482,9 +475,7 @@ str_to_event(str, last) #include "error.h" int -histcmd(argc, argv) - int argc; - char **argv; +histcmd(int argc, char **argv) { error("not compiled with history support"); |