diff options
author | Moritz Jodeit <moritz@cvs.openbsd.org> | 2006-03-17 14:43:07 +0000 |
---|---|---|
committer | Moritz Jodeit <moritz@cvs.openbsd.org> | 2006-03-17 14:43:07 +0000 |
commit | b678932bdb4b0fd73d046c7eb934809c2e3e605d (patch) | |
tree | 5466b01c4a9586066e4adb231293812efc59be2a /usr.bin/tip/tip.c | |
parent | 6d052bb0ddd1b432e9e85fc458c8d131d179f76e (diff) |
big prototype cleanup:
o make more functions static
o add all the prototypes to tip.h
o consistently declare functions in the cmd table
testing and ok dhill@
Diffstat (limited to 'usr.bin/tip/tip.c')
-rw-r--r-- | usr.bin/tip/tip.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/usr.bin/tip/tip.c b/usr.bin/tip/tip.c index a2d90259374..975337e550e 100644 --- a/usr.bin/tip/tip.c +++ b/usr.bin/tip/tip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tip.c,v 1.25 2006/03/16 19:32:46 deraadt Exp $ */ +/* $OpenBSD: tip.c,v 1.26 2006/03/17 14:43:06 moritz Exp $ */ /* $NetBSD: tip.c,v 1.13 1997/04/20 00:03:05 mellon Exp $ */ /* @@ -40,7 +40,7 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)tip.c 8.1 (Berkeley) 6/6/93"; #endif -static const char rcsid[] = "$OpenBSD: tip.c,v 1.25 2006/03/16 19:32:46 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: tip.c,v 1.26 2006/03/17 14:43:06 moritz Exp $"; #endif /* not lint */ /* @@ -53,11 +53,12 @@ static const char rcsid[] = "$OpenBSD: tip.c,v 1.25 2006/03/16 19:32:46 deraadt #include "pathnames.h" int disc = TTYDISC; /* tip normally runs this way */ -void intprompt(); -void timeout(); -void cleanup(int); char PNbuf[256]; /* This limits the size of a number */ +static void intprompt(int); +static void tipin(void); +static int escape(void); + int main(int argc, char *argv[]) { @@ -245,7 +246,6 @@ cucommon: void cleanup(int signo) { - daemon_uid(); (void)uu_unlock(uucplock); if (odisc) @@ -347,10 +347,9 @@ prompt(char *s, char *p, size_t sz) /* * Interrupt service routine during prompting */ -void -intprompt(void) +static void +intprompt(int signo) { - (void)signal(SIGINT, SIG_IGN); stoprompt = 1; printf("\r\n"); @@ -360,7 +359,7 @@ intprompt(void) /* * ****TIPIN TIPIN**** */ -void +static void tipin(void) { char bol = 1; @@ -415,7 +414,7 @@ extern esctable_t etable[]; * Escape handler -- * called on recognition of ``escapec'' at the beginning of a line */ -int +static int escape(void) { int gch; @@ -503,7 +502,7 @@ ctrl(char c) * Help command */ void -help(char c) +help(int c) { esctable_t *p; |