Date: Mon, 16 Aug 2010 12:19:36 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r211394 - head/usr.bin/script Message-ID: <201008161219.o7GCJanq098188@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008161219.o7GCJanq098188>