diff options
author | imp <imp@FreeBSD.org> | 2003-04-06 08:30:25 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2003-04-06 08:30:25 +0000 |
commit | 4783472987a6fdc4ee75b949bbe4c578ae25bd02 (patch) | |
tree | d19f79c416730a10238808b1e80212775ced996f /usr.bin/tip | |
parent | 3b10d8d86d377c10322614fead0e85f5a555f445 (diff) | |
download | FreeBSD-src-4783472987a6fdc4ee75b949bbe4c578ae25bd02.zip FreeBSD-src-4783472987a6fdc4ee75b949bbe4c578ae25bd02.tar.gz |
make prototpyes match functions, and declare things static as needed
Diffstat (limited to 'usr.bin/tip')
-rw-r--r-- | usr.bin/tip/libacu/courier.c | 1 | ||||
-rw-r--r-- | usr.bin/tip/libacu/df.c | 5 | ||||
-rw-r--r-- | usr.bin/tip/libacu/hayes.c | 6 | ||||
-rw-r--r-- | usr.bin/tip/libacu/t3000.c | 1 | ||||
-rw-r--r-- | usr.bin/tip/tip/cmds.c | 19 | ||||
-rw-r--r-- | usr.bin/tip/tip/cmdtab.c | 4 | ||||
-rw-r--r-- | usr.bin/tip/tip/tip.c | 5 | ||||
-rw-r--r-- | usr.bin/tip/tip/tip.h | 7 | ||||
-rw-r--r-- | usr.bin/tip/tip/value.c | 2 |
9 files changed, 29 insertions, 21 deletions
diff --git a/usr.bin/tip/libacu/courier.c b/usr.bin/tip/libacu/courier.c index c63120d..598dbab 100644 --- a/usr.bin/tip/libacu/courier.c +++ b/usr.bin/tip/libacu/courier.c @@ -60,6 +60,7 @@ static int connected = 0; static jmp_buf timeoutbuf, intbuf; static int coursync(), cour_connect(), cour_swallow(); void cour_nap(); +static void cour_write(int fd, char *cp, int n); void cour_disconnect(void); diff --git a/usr.bin/tip/libacu/df.c b/usr.bin/tip/libacu/df.c index 1c8ee30..7d11271 100644 --- a/usr.bin/tip/libacu/df.c +++ b/usr.bin/tip/libacu/df.c @@ -52,6 +52,7 @@ static char rcsid[] = "$OpenBSD: df.c,v 1.5 2001/10/24 18:38:58 millert Exp $"; static jmp_buf Sjbuf; static void timeout(); +static void df_disconnect(void); int df02_dialer(num, acu) @@ -123,8 +124,8 @@ df_dialer(num, acu, df03) return (c == 'A'); } -void -df_disconnect() +static void +df_disconnect(void) { write(FD, "\001", 1); sleep(1); diff --git a/usr.bin/tip/libacu/hayes.c b/usr.bin/tip/libacu/hayes.c index 8210fbf..7784f29 100644 --- a/usr.bin/tip/libacu/hayes.c +++ b/usr.bin/tip/libacu/hayes.c @@ -74,6 +74,8 @@ static char rcsid[] = "$OpenBSD: hayes.c,v 1.8 2001/10/24 18:38:58 millert Exp $ #define min(a,b) ((a < b) ? a : b) +static void error_rep(char c); +static void goodbye(void); static void sigALRM(); static int timeout = 0; static jmp_buf timeoutbuf; @@ -252,8 +254,8 @@ error_rep(c) /* * set modem back to normal verbose status codes. */ -void -goodbye() +static void +goodbye(void) { int len; char c; diff --git a/usr.bin/tip/libacu/t3000.c b/usr.bin/tip/libacu/t3000.c index 627aae9..ec9c3d4 100644 --- a/usr.bin/tip/libacu/t3000.c +++ b/usr.bin/tip/libacu/t3000.c @@ -61,6 +61,7 @@ static int connected = 0; static jmp_buf timeoutbuf, intbuf; static int t3000_sync(), t3000_connect(), t3000_swallow(); static void t3000_nap(); +static int t3000_write(int fd, char *cp, int n); int t3000_dialer(num, acu) diff --git a/usr.bin/tip/tip/cmds.c b/usr.bin/tip/tip/cmds.c index a5fe28e..5bfd65f 100644 --- a/usr.bin/tip/tip/cmds.c +++ b/usr.bin/tip/tip/cmds.c @@ -95,6 +95,7 @@ getfl(c) return; } transfer(buf, sfd, value(EOFREAD)); + return; } /* @@ -202,7 +203,7 @@ transfer(buf, fd, eofchars) * send remote input to local process via pipe */ void -pipefile() +pipefile(char c) { int cpid, pdes[2]; char buf[256]; @@ -473,7 +474,7 @@ timeout() * Identical to consh() except for where stdout goes. */ void -pipeout(c) +pipeout(char c) { char buf[256]; int cpid, status, p; @@ -525,7 +526,7 @@ pipeout(c) * 2 <-> local tty out */ void -consh(c) +consh(char c) { char buf[256]; int cpid, status, p; @@ -575,7 +576,7 @@ consh(c) * Escape to local shell */ void -shell() +shell(char c) { int shpid, status; char *cp; @@ -633,7 +634,7 @@ setscript() * local portion of tip */ void -chdirectory() +chdirectory(char c) { char dirname[PATH_MAX]; char *cp = dirname; @@ -665,7 +666,7 @@ tipabort(msg) } void -finish() +finish(char c) { char *dismsg; @@ -745,7 +746,7 @@ prtime(s, a) } void -variable() +variable(char c) { char buf[256]; @@ -789,7 +790,7 @@ variable() } void -listvariables() +listvariables(char c) { value_t *p; char *buf; @@ -853,7 +854,7 @@ tandem(option) * Send a break. */ void -genbrk() +genbrk(char c) { ioctl(FD, TIOCSBRK, NULL); diff --git a/usr.bin/tip/tip/cmdtab.c b/usr.bin/tip/tip/cmdtab.c index 562fa74..272d70a 100644 --- a/usr.bin/tip/tip/cmdtab.c +++ b/usr.bin/tip/tip/cmdtab.c @@ -46,10 +46,6 @@ static char rcsid[] = "$OpenBSD: cmdtab.c,v 1.3 2001/09/09 17:58:41 millert Exp #include "tip.h" -extern int shell(), getfl(), sendfile(), chdirectory(); -extern int finish(), help(), pipefile(), pipeout(), consh(), variable(); -extern int cu_take(), cu_put(), dollar(), genbrk(), suspend(), listvariables(); - esctable_t etable[] = { { '!', NORM, "shell", shell }, { '<', NORM, "receive file from remote host", getfl }, diff --git a/usr.bin/tip/tip/tip.c b/usr.bin/tip/tip/tip.c index 98e8424..d1ea1ae 100644 --- a/usr.bin/tip/tip/tip.c +++ b/usr.bin/tip/tip/tip.c @@ -81,6 +81,7 @@ main(argc, argv) char *system = NOSTR; int i; char *p; + const char *p2; char sbuf[12]; gid = getgid(); @@ -198,8 +199,8 @@ notnumber: */ if (HW) ttysetup(i); - if ((p = connect())) { - printf("\07%s\n[EOT]\n", p); + if ((p2 = connect())) { + printf("\07%s\n[EOT]\n", p2); daemon_uid(); (void)uu_unlock(uucplock); exit(1); diff --git a/usr.bin/tip/tip/tip.h b/usr.bin/tip/tip/tip.h index c10d24c..a274a64 100644 --- a/usr.bin/tip/tip/tip.h +++ b/usr.bin/tip/tip/tip.h @@ -173,7 +173,7 @@ typedef char e_char; /* char to match on */ char e_flags; /* experimental, priviledged */ const char *e_help; /* help string */ - int (*e_func)(char); /* command */ + void (*e_func)(char); /* command */ } esctable_t; @@ -330,3 +330,8 @@ void t3000_abort(void); int v831_dialer(char *, char *); void v831_disconnect(void); void v831_abort(void); + +void shell(char c), getfl(char c), sendfile(char c), chdirectory(char c); +void finish(char c), help(char c), pipefile(char c), pipeout(char c); +void consh(char c), variable(char c), cu_take(char c), cu_put(char c); +void dollar(char c), genbrk(char c), suspend(char c), listvariables(char c); diff --git a/usr.bin/tip/tip/value.c b/usr.bin/tip/tip/value.c index 59ff91d..66c20a0 100644 --- a/usr.bin/tip/tip/value.c +++ b/usr.bin/tip/tip/value.c @@ -218,7 +218,7 @@ vprint(p) value_t *p; { char *cp; - extern char *interp(), *ctrl(); + extern char *interp(); if (col > 0 && col < MIDDLE) while (col++ < MIDDLE) |