From 5d917f8266d1998a6bf5271ed72053513ef49314 Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Sat, 7 May 2005 23:20:43 +0000 Subject: [PATCH] Fix compilation with gcc40: Move function prototypes from funtion to file scope. This stone-old C sucks the skin off a dead goat. Or even off a living one. --- usr.bin/tip/libacu/biz22.c | 4 +++- usr.bin/tip/libacu/courier.c | 4 +++- usr.bin/tip/libacu/multitech.c | 3 ++- usr.bin/tip/libacu/t3000.c | 4 +++- usr.bin/tip/libacu/unidialer.c | 5 +++-- usr.bin/tip/libacu/v3451.c | 13 +++++++------ usr.bin/tip/libacu/v831.c | 6 +++--- usr.bin/tip/libacu/ventel.c | 7 ++++--- usr.bin/tip/tip/value.c | 4 ++-- usr.bin/window/wwgets.c | 5 +++-- 10 files changed, 33 insertions(+), 22 deletions(-) diff --git a/usr.bin/tip/libacu/biz22.c b/usr.bin/tip/libacu/biz22.c index f0417f88f6..428f98407a 100644 --- a/usr.bin/tip/libacu/biz22.c +++ b/usr.bin/tip/libacu/biz22.c @@ -31,6 +31,7 @@ * SUCH DAMAGE. * * @(#)biz22.c 8.1 (Berkeley) 6/6/93 + * $DragonFly: src/usr.bin/tip/libacu/biz22.c,v 1.3 2005/05/07 23:20:43 corecode Exp $ */ #include "tipconf.h" @@ -39,6 +40,8 @@ #define DISCONNECT_CMD "\20\04" /* disconnection string */ static void sigALRM(); +static int cmd(char *s); +static int detect(char *s); static int timeout = 0; static jmp_buf timeoutbuf; @@ -53,7 +56,6 @@ biz_dialer(num, mod) { register int connected = 0; char cbuf[40]; - static int cmd(), detect(); if (boolean(value(VERBOSE))) printf("\nstarting call..."); diff --git a/usr.bin/tip/libacu/courier.c b/usr.bin/tip/libacu/courier.c index 6747e1ac53..3620964d72 100644 --- a/usr.bin/tip/libacu/courier.c +++ b/usr.bin/tip/libacu/courier.c @@ -31,6 +31,7 @@ * SUCH DAMAGE. * * @(#)courier.c 8.1 (Berkeley) 6/6/93 + * $DragonFly: src/usr.bin/tip/libacu/courier.c,v 1.3 2005/05/07 23:20:43 corecode Exp $ */ /* @@ -45,6 +46,8 @@ #define MAXRETRY 5 static void sigALRM(); +static int cour_connect(void); +static int cour_swallow(char *); static int timeout = 0; static int connected = 0; static jmp_buf timeoutbuf, intbuf; @@ -58,7 +61,6 @@ cour_dialer(num, acu) #if ACULOG char line[80]; #endif - static int cour_connect(), cour_swallow(); if (boolean(value(VERBOSE))) printf("Using \"%s\"\n", acu); diff --git a/usr.bin/tip/libacu/multitech.c b/usr.bin/tip/libacu/multitech.c index 60566a9ca4..385bfdda05 100644 --- a/usr.bin/tip/libacu/multitech.c +++ b/usr.bin/tip/libacu/multitech.c @@ -31,6 +31,7 @@ * SUCH DAMAGE. * * @(#)multitech.c 8.1 (Berkeley) 6/6/93 + * $DragonFly: src/usr.bin/tip/libacu/multitech.c,v 1.3 2005/05/07 23:20:43 corecode Exp $ */ /* @@ -70,6 +71,7 @@ void acu_nap (unsigned int how_long); static void sigALRM (); static int multitechsync (); static int multitech_swallow (register char *match); +static int multitech_connect(void); /* Global vars @@ -84,7 +86,6 @@ int multitech_dialer (register char *num, char *acu) #if ACULOG char line [80]; #endif - static int multitech_connect(), multitech_swallow(); if (lock_baud) { diff --git a/usr.bin/tip/libacu/t3000.c b/usr.bin/tip/libacu/t3000.c index f91f14bea9..c9627b249a 100644 --- a/usr.bin/tip/libacu/t3000.c +++ b/usr.bin/tip/libacu/t3000.c @@ -31,6 +31,7 @@ * SUCH DAMAGE. * * @(#)t3000.c 8.1 (Berkeley) 6/6/93 + * $DragonFly: src/usr.bin/tip/libacu/t3000.c,v 1.3 2005/05/07 23:20:43 corecode Exp $ */ /* @@ -49,6 +50,8 @@ static int timeout = 0; static int connected = 0; static jmp_buf timeoutbuf, intbuf; static int t3000_sync(); +static int t3000_connect(void); +static int t3000_swallow(char *); t3000_dialer(num, acu) register char *num; @@ -58,7 +61,6 @@ t3000_dialer(num, acu) #if ACULOG char line[80]; #endif - static int t3000_connect(), t3000_swallow(); if (boolean(value(VERBOSE))) printf("Using \"%s\"\n", acu); diff --git a/usr.bin/tip/libacu/unidialer.c b/usr.bin/tip/libacu/unidialer.c index cc3974ab00..68a706168f 100644 --- a/usr.bin/tip/libacu/unidialer.c +++ b/usr.bin/tip/libacu/unidialer.c @@ -32,7 +32,7 @@ * * @(#)unidialer.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/tip/libacu/unidialer.c,v 1.7 1999/08/28 01:06:30 peter Exp $ - * $DragonFly: src/usr.bin/tip/libacu/unidialer.c,v 1.3 2005/04/19 18:55:24 swildner Exp $ + * $DragonFly: src/usr.bin/tip/libacu/unidialer.c,v 1.4 2005/05/07 23:20:43 corecode Exp $ */ /* @@ -94,6 +94,8 @@ static unsigned int reset_delay; static int unidialer_dialer (register char *num, char *acu); static void unidialer_disconnect (); static void unidialer_abort (); +static int unidialer_connect(void); +static int unidialer_swallow(char *); static acu_t unidialer = { @@ -409,7 +411,6 @@ static int unidialer_dialer (register char *num, char *acu) #if ACULOG char line [80]; #endif - static int unidialer_connect(), unidialer_swallow(); #ifdef DEBUG dumpmodemparms (modem_name); diff --git a/usr.bin/tip/libacu/v3451.c b/usr.bin/tip/libacu/v3451.c index c9e5e7cbf9..78bcc6a462 100644 --- a/usr.bin/tip/libacu/v3451.c +++ b/usr.bin/tip/libacu/v3451.c @@ -31,6 +31,7 @@ * SUCH DAMAGE. * * @(#)v3451.c 8.1 (Berkeley) 6/6/93 + * $DragonFly: src/usr.bin/tip/libacu/v3451.c,v 1.3 2005/05/07 23:20:43 corecode Exp $ */ /* @@ -39,6 +40,12 @@ #include "tipconf.h" #include "tip.h" +static int expect(char *); +static void vawrite(char *, int); +static int notin(char *, char *); +static void alarmtr(void); +static int prefix(char *, char *); + static jmp_buf Sjbuf; v3451_dialer(num, acu) @@ -52,8 +59,6 @@ v3451_dialer(num, acu) #if ACULOG char line[80]; #endif - static int expect(); - static void vawrite(); /* * Get in synch @@ -148,8 +153,6 @@ expect(cp) char buf[300]; register char *rp = buf; int timeout = 30, online = 0; - static int notin(); - static void alarmtr(); if (strcmp(cp, "\"\"") == 0) return (1); @@ -192,8 +195,6 @@ static int notin(sh, lg) char *sh, *lg; { - static int prefix(); - for (; *lg; lg++) if (prefix(sh, lg)) return (0); diff --git a/usr.bin/tip/libacu/v831.c b/usr.bin/tip/libacu/v831.c index 239edb48c9..1d99046588 100644 --- a/usr.bin/tip/libacu/v831.c +++ b/usr.bin/tip/libacu/v831.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/tip/libacu/v831.c,v 1.1.12.1 2000/07/01 12:24:22 ps Exp $ - * $DragonFly: src/usr.bin/tip/libacu/v831.c,v 1.2 2003/06/17 04:29:32 dillon Exp $ + * $DragonFly: src/usr.bin/tip/libacu/v831.c,v 1.3 2005/05/07 23:20:43 corecode Exp $ * * @(#)v831.c 8.1 (Berkeley) 6/6/93 */ @@ -45,6 +45,8 @@ int v831_abort(); static void alarmtr(); +static int dialit(char *, char *); +static char *sanitize(char *); static jmp_buf jmpbuf; static int child = -1; @@ -54,7 +56,6 @@ v831_dialer(num, acu) { int status, pid, connected = 1; register int timelim; - static int dialit(); if (boolean(value(VERBOSE))) printf("\nstarting call..."); @@ -185,7 +186,6 @@ dialit(phonenum, acu) register struct vaconfig *vp; char c; int i, two = 2; - static char *sanitize(); phonenum = sanitize(phonenum); #ifdef DEBUG diff --git a/usr.bin/tip/libacu/ventel.c b/usr.bin/tip/libacu/ventel.c index 6f538fbd04..c52302ce9b 100644 --- a/usr.bin/tip/libacu/ventel.c +++ b/usr.bin/tip/libacu/ventel.c @@ -32,7 +32,7 @@ * * @(#)ventel.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/tip/libacu/ventel.c,v 1.3 1999/08/28 01:06:31 peter Exp $ - * $DragonFly: src/usr.bin/tip/libacu/ventel.c,v 1.2 2003/06/17 04:29:32 dillon Exp $ + * $DragonFly: src/usr.bin/tip/libacu/ventel.c,v 1.3 2005/05/07 23:20:43 corecode Exp $ */ /* @@ -46,6 +46,9 @@ #define MAXRETRY 5 static void sigALRM(); +static int gobble(char, char[]); +static int vensync(int); +static void echo(char *); static int timeout = 0; static jmp_buf timeoutbuf; @@ -66,8 +69,6 @@ ven_dialer(num, acu) register char *cp; register int connected = 0; char *msg, *index(), line[80]; - static int gobble(), vensync(); - static void echo(); /* * Get in synch with a couple of carriage returns diff --git a/usr.bin/tip/tip/value.c b/usr.bin/tip/tip/value.c index bbf78aba20..af0ccd30d6 100644 --- a/usr.bin/tip/tip/value.c +++ b/usr.bin/tip/tip/value.c @@ -32,7 +32,7 @@ * * @(#)value.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/tip/tip/value.c,v 1.5.2.1 2000/07/01 12:24:23 ps Exp $ - * $DragonFly: src/usr.bin/tip/tip/value.c,v 1.4 2005/04/19 05:32:02 cpressey Exp $ + * $DragonFly: src/usr.bin/tip/tip/value.c,v 1.5 2005/05/07 23:20:43 corecode Exp $ */ #include "tip.h" @@ -140,13 +140,13 @@ vassign(p, v) } static void vprint(); +static void vtoken(char *); void vlex(s) register char *s; { register value_t *p; - static void vtoken(); if (equal(s, "all")) { for (p = vtable; p->v_name; p++) diff --git a/usr.bin/window/wwgets.c b/usr.bin/window/wwgets.c index a51b84d87b..1eb9805dfa 100644 --- a/usr.bin/window/wwgets.c +++ b/usr.bin/window/wwgets.c @@ -35,12 +35,14 @@ * * @(#)wwgets.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/window/wwgets.c,v 1.3.14.1 2001/05/17 09:45:01 obrien Exp $ - * $DragonFly: src/usr.bin/window/wwgets.c,v 1.2 2003/06/17 04:29:34 dillon Exp $ + * $DragonFly: src/usr.bin/window/wwgets.c,v 1.3 2005/05/07 23:20:43 corecode Exp $ */ #include "ww.h" #include "char.h" +static void rub(int, struct ww *); + wwgets(buf, n, w) char *buf; int n; @@ -49,7 +51,6 @@ register struct ww *w; register char *p = buf; register int c; char uc = w->ww_unctrl; - static void rub(); w->ww_unctrl = 0; for (;;) { -- 2.41.0