diff options
author | ed <ed@FreeBSD.org> | 2012-10-19 14:49:42 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2012-10-19 14:49:42 +0000 |
commit | af31e8843c2cc0ba388a33f341de8da1b50de433 (patch) | |
tree | ddffe542a2e921ec48c73d322a2046f559a9d74f /usr.bin/msgs | |
parent | b1462253851ab8c1f6dde48bb7796b15d3f38253 (diff) | |
download | FreeBSD-src-af31e8843c2cc0ba388a33f341de8da1b50de433.zip FreeBSD-src-af31e8843c2cc0ba388a33f341de8da1b50de433.tar.gz |
More -Wmissing-variable-declarations fixes.
In addition to adding `static' where possible:
- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
Diffstat (limited to 'usr.bin/msgs')
-rw-r--r-- | usr.bin/msgs/msgs.c | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/usr.bin/msgs/msgs.c b/usr.bin/msgs/msgs.c index 8139b3f..e534fac 100644 --- a/usr.bin/msgs/msgs.c +++ b/usr.bin/msgs/msgs.c @@ -105,47 +105,47 @@ __FBSDID("$FreeBSD$"); typedef char bool; -FILE *msgsrc; -FILE *newmsg; -const char *sep = "-"; -char inbuf[BUFSIZ]; -char fname[MAXPATHLEN]; -char cmdbuf[MAXPATHLEN + MAXPATHLEN]; -char subj[128]; -char from[128]; -char date[128]; -char *ptr; -char *in; -bool local; -bool ruptible; -bool totty; -bool seenfrom; -bool seensubj; -bool blankline; -bool printing = NO; -bool mailing = NO; -bool quitit = NO; -bool sending = NO; -bool intrpflg = NO; -uid_t uid; -int msg; -int prevmsg; -int lct; -int nlines; -int Lpp = 0; -time_t t; -time_t keep; +static FILE *msgsrc; +static FILE *newmsg; +static const char *sep = "-"; +static char inbuf[BUFSIZ]; +static char fname[MAXPATHLEN]; +static char cmdbuf[MAXPATHLEN + MAXPATHLEN]; +static char subj[128]; +static char from[128]; +static char date[128]; +static char *ptr; +static char *in; +static bool local; +static bool ruptible; +static bool totty; +static bool seenfrom; +static bool seensubj; +static bool blankline; +static bool printing = NO; +static bool mailing = NO; +static bool quitit = NO; +static bool sending = NO; +static bool intrpflg = NO; +static uid_t uid; +static int msg; +static int prevmsg; +static int lct; +static int nlines; +static int Lpp = 0; +static time_t t; +static time_t keep; /* option initialization */ -bool hdrs = NO; -bool qopt = NO; -bool hush = NO; -bool send_msg = NO; -bool locomode = NO; -bool use_pager = NO; -bool clean = NO; -bool lastcmd = NO; -jmp_buf tstpbuf; +static bool hdrs = NO; +static bool qopt = NO; +static bool hush = NO; +static bool send_msg = NO; +static bool locomode = NO; +static bool use_pager = NO; +static bool clean = NO; +static bool lastcmd = NO; +static jmp_buf tstpbuf; static void ask(const char *); static void gfrsub(FILE *); @@ -155,7 +155,7 @@ static char *nxtfld(char *); static void onsusp(int); static void onintr(int); static void prmesg(int); -static void usage(void); +static void usage(void); int main(int argc, char *argv[]) |