-/* configured variables */
-
-int debug = 0; /* Debug flag */
-int kdebugflag = 0; /* Kernel debugging flag */
-char user[MAXNAMELEN]; /* username for PAP */
-char passwd[MAXSECRETLEN]; /* password for PAP */
-char *connector = NULL; /* "connect" command */
-char *disconnector = NULL; /* "disconnect" command */
-int inspeed = 0; /* Input/Output speed requested */
-int baud_rate; /* bits/sec currently used */
-u_long netmask = 0; /* netmask to use on ppp interface */
-int crtscts = 0; /* use h/w flow control */
-int nodetach = 0; /* don't fork */
-int modem = 0; /* use modem control lines */
-int auth_required = 0; /* require peer to authenticate */
-int defaultroute = 0; /* assign default route through interface */
-int proxyarp = 0; /* set entry in arp table */
-int persist = 0; /* re-initiate on termination */
-int answer = 0; /* wait for incoming call */
-int uselogin = 0; /* check PAP info against /etc/passwd */
-int lockflag = 0; /* lock the serial device */
-
-
-/* prototypes */
-static void hup __ARGS((int, int, struct sigcontext *, char *));
-static void intr __ARGS((int, int, struct sigcontext *, char *));
-static void term __ARGS((int, int, struct sigcontext *, char *));
-static void alrm __ARGS((int, int, struct sigcontext *, char *));
-static void io __ARGS((int, int, struct sigcontext *, char *));
-static void incdebug __ARGS((int));
-static void nodebug __ARGS((int));
-void establish_ppp __ARGS((void));
-
-void reap_kids __ARGS((void));
-void cleanup __ARGS((int, caddr_t));
-void die __ARGS((int));
-void novm __ARGS((char *));
-
-void log_packet __ARGS((u_char *, int, char *));
-void format_packet __ARGS((u_char *, int,
- void (*) (void *, char *, ...), void *));
-void pr_log __ARGS((void *, char *, ...));
-
-#ifdef STREAMS
-extern char *ttyname __ARGS((int));
+int baud_rate; /* Actual bits/second for serial device */
+
+static int locked; /* lock() has succeeded */
+
+char *no_ppp_msg = "Sorry - this system lacks PPP kernel support\n";
+
+/* Prototypes for procedures local to this file. */
+
+static void cleanup __P((void));
+static void close_tty __P((void));
+static void get_input __P((void));
+static void connect_time_expired __P((caddr_t));
+static void calltimeout __P((void));
+static struct timeval *timeleft __P((struct timeval *));
+static void hup __P((int));
+static void term __P((int));
+static void chld __P((int));
+static void toggle_debug __P((int));
+static void open_ccp __P((int));
+static void bad_signal __P((int));
+static void holdoff_end __P((void *));
+static int device_script __P((char *, int, int));
+static void reap_kids __P((void));
+static void pr_log __P((void *, char *, ...));
+
+extern char *ttyname __P((int));
+extern char *getlogin __P((void));
+
+#ifdef ultrix
+#undef O_NONBLOCK
+#define O_NONBLOCK O_NDELAY