From 78d6a5000398cc4813a6644ab525ab32a056d066 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 8 Dec 2000 22:06:54 +0000 Subject: 2000-12-08 Joel Sherrill * libc/linkaddr.c: Initialized variable to remove warning. * modem/ppp.c, modem/ppp_tty.c: Made numerous variable declarations conditional on PPP_COMPRESS and PPP_FILTER. Commented out variables that were not used because the code using them was commented out. Removed totally unused variables. * modem/pppcompress.c: Added parentheses to avoid warnings. * pppd/pppmain.c: Removed numerous warnings. --- c/src/libnetworking/pppd/pppmain.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'c/src/libnetworking/pppd') diff --git a/c/src/libnetworking/pppd/pppmain.c b/c/src/libnetworking/pppd/pppmain.c index 9036dfcb54..0bf8d68e87 100644 --- a/c/src/libnetworking/pppd/pppmain.c +++ b/c/src/libnetworking/pppd/pppmain.c @@ -39,10 +39,12 @@ #include #include #include -#include #include #include +#include +#include + /* #include */ #include "pppd.h" #include "magic.h" @@ -72,6 +74,9 @@ extern char *strerror(); void SetStatusInfo(int state, char * text, int res); +/* prototypes for routines in this file */ +int connect_script(int fd); + /* interface vars */ char ifname[32]; /* Interface name */ int interfunit; /* Interface unit number */ @@ -107,15 +112,17 @@ char *no_ppp_msg = "lack of PPP\n"; /* Prototypes for procedures local to this file. */ static void cleanup(void); -static void create_pidfile __P((void)); static void close_tty __P((void)); static void get_input __P((void)); static void calltimeout __P((void)); static struct timeval *timeleft __P((struct timeval *)); static void holdoff_end __P((void *)); -static int device_script __P((char *[], int, int)); static void reap_kids __P((void)); +/* XXX currently unused */ +#if 0 +static int device_script __P((char *[], int, int)); static void pr_log __P((void *, char *,...)); +#endif extern char *ttyname __P((int)); extern char *getlogin __P((void)); @@ -164,10 +171,14 @@ int argc; char *argv[]; { int i; +#if 0 struct timeval timo; +#endif struct protent *protp; struct stat statbuf; +#if 0 char t[100]; +#endif phase = PHASE_INITIALIZE; @@ -757,15 +768,9 @@ int sig; kill_link = 1; } -static int input_fd, output_fd; -#include - - - int modem_fd; /* FIXME: should not be global... */ int connect_script(int fd) { - int status; #if 0 /* FIXME: This is WinNT special */ char program[256] = "TIMEOUT@10@@CLIENT@CLIENTSERVER"; #else @@ -775,12 +780,14 @@ int connect_script(int fd) /* XXX PPPConfiguration */ GlobalSystemStatus * volatile stat; #endif +#if 0 /* Connect scripts are almost the same as in Linux Chat ... */ static char *scripts[] = { "TIMEOUT@5@@\rAT@OK-+++\\c-OK@ATH0@TIMEOUT@90@OK@ATDT%s@CONNECT@", "TIMEOUT@5@@\rAT@OK-+++\\c-OK@ATH0@TIMEOUT@90@OK@ATDT%s@CONNECT@@ppp@@Username:@%s@Password:@%s@" }; +#endif modem_fd = fd; #if 0 /* XXX PPPConfiguration */ @@ -898,6 +905,8 @@ void *arg; +/* XXX currently unused */ +#if 0 static void pr_log __V((void *arg, char *fmt,...)) { @@ -925,6 +934,7 @@ pr_log __V((void *arg, char *fmt,...)) strcpy(linep, buf); linep += n; } +#endif /* * print_string - print a readable representation of a string using -- cgit v1.2.3