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/redir.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/redir.c')
-rw-r--r-- | bin/sh/redir.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/bin/sh/redir.c b/bin/sh/redir.c index b51fa2b..b596463 100644 --- a/bin/sh/redir.c +++ b/bin/sh/redir.c @@ -84,8 +84,8 @@ MKINIT struct redirtab *redirlist; */ int fd0_redirected = 0; -STATIC void openredirect __P((union node *, char[10 ])); -STATIC int openhere __P((union node *)); +STATIC void openredirect(union node *, char[10 ]); +STATIC int openhere(union node *); /* @@ -97,10 +97,8 @@ STATIC int openhere __P((union node *)); */ void -redirect(redir, flags) - union node *redir; - int flags; - { +redirect(union node *redir, int flags) +{ union node *n; struct redirtab *sv = NULL; int i; @@ -161,10 +159,8 @@ again: STATIC void -openredirect(redir, memory) - union node *redir; - char memory[10]; - { +openredirect(union node *redir, char memory[10]) +{ int fd = redir->nfile.fd; char *fname; int f; @@ -260,9 +256,8 @@ movefd: */ STATIC int -openhere(redir) - union node *redir; - { +openhere(union node *redir) +{ int pip[2]; int len = 0; @@ -302,7 +297,8 @@ out: */ void -popredir() { +popredir(void) +{ struct redirtab *rp = redirlist; int i; @@ -344,7 +340,8 @@ SHELLPROC { /* Return true if fd 0 has already been redirected at least once. */ int -fd0_redirected_p () { +fd0_redirected_p(void) +{ return fd0_redirected != 0; } @@ -353,7 +350,8 @@ fd0_redirected_p () { */ void -clearredir() { +clearredir(void) +{ struct redirtab *rp; int i; @@ -376,9 +374,7 @@ clearredir() { */ int -copyfd(from, to) - int from; - int to; +copyfd(int from, int to) { int newfd; |