Author: ed Date: Mon Aug 16 12:19:36 2010 New Revision: 211394 URL: http://svn.freebsd.org/changeset/base/211394
Log: 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. Modified: head/usr.bin/script/script.c Modified: head/usr.bin/script/script.c ============================================================================== --- head/usr.bin/script/script.c Mon Aug 16 11:32:20 2010 (r211393) +++ head/usr.bin/script/script.c Mon Aug 16 12:19:36 2010 (r211394) @@ -63,19 +63,18 @@ static const char sccsid[] = "@(#)script #include <termios.h> #include <unistd.h> -FILE *fscript; -int master, slave; -int child; -const char *fname; -int qflg, ttyflg; - -struct termios tt; - -void done(int) __dead2; -void dooutput(void); -void doshell(char **); -void fail(void); -void finish(void); +static FILE *fscript; +static int master, slave; +static int child; +static const char *fname; +static int qflg, ttyflg; + +static struct termios tt; + +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; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"