diff options
author | ed <ed@FreeBSD.org> | 2010-08-16 12:19:36 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2010-08-16 12:19:36 +0000 |
commit | 90ee446bc02cee72e4e15804bf92a4b07018ef35 (patch) | |
tree | e0417ef5a211de028cb425e95f46b787a2c6f75e /usr.bin/script/script.c | |
parent | 618102f75f6c78d63f04e1aafc90fb25689f51c9 (diff) | |
download | FreeBSD-src-90ee446bc02cee72e4e15804bf92a4b07018ef35.zip FreeBSD-src-90ee446bc02cee72e4e15804bf92a4b07018ef35.tar.gz |
Mark functions and variables as static.
All these functions and variables are local to this compilation unit, so
there is no reason why we shouldn't mark them static. This slightly
reduces the binary size.
Diffstat (limited to 'usr.bin/script/script.c')
-rw-r--r-- | usr.bin/script/script.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index a21785a..64ca486 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -63,19 +63,18 @@ static const char sccsid[] = "@(#)script.c 8.1 (Berkeley) 6/6/93"; #include <termios.h> #include <unistd.h> -FILE *fscript; -int master, slave; -int child; -const char *fname; -int qflg, ttyflg; +static FILE *fscript; +static int master, slave; +static int child; +static const char *fname; +static int qflg, ttyflg; -struct termios tt; +static struct termios tt; -void done(int) __dead2; -void dooutput(void); -void doshell(char **); -void fail(void); -void finish(void); +static void done(int) __dead2; +static void doshell(char **); +static void fail(void); +static void finish(void); static void usage(void); int @@ -216,7 +215,7 @@ usage(void) exit(1); } -void +static void finish(void) { int e, status; @@ -232,7 +231,7 @@ finish(void) } } -void +static void doshell(char **av) { const char *shell; @@ -254,14 +253,14 @@ doshell(char **av) fail(); } -void +static void fail(void) { (void)kill(0, SIGTERM); done(1); } -void +static void done(int eno) { time_t tvec; |