Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/telnetd fix redundant declarations.



details:   https://anonhg.NetBSD.org/src/rev/3a1ebd8802cc
branches:  trunk
changeset: 503343:3a1ebd8802cc
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Feb 04 22:32:15 2001 +0000

description:
fix redundant declarations.

diffstat:

 libexec/telnetd/ext.h      |  15 +++++++++++----
 libexec/telnetd/slc.c      |   5 ++---
 libexec/telnetd/state.c    |  19 +++++++------------
 libexec/telnetd/sys_term.c |  23 +++++++++++------------
 libexec/telnetd/telnetd.c  |  18 ++++++------------
 libexec/telnetd/utility.c  |  19 +++++--------------
 6 files changed, 42 insertions(+), 57 deletions(-)

diffs (truncated from 345 to 300 lines):

diff -r 111297938927 -r 3a1ebd8802cc libexec/telnetd/ext.h
--- a/libexec/telnetd/ext.h     Sun Feb 04 22:14:13 2001 +0000
+++ b/libexec/telnetd/ext.h     Sun Feb 04 22:32:15 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ext.h,v 1.11 2000/06/22 06:47:49 thorpej Exp $ */
+/*     $NetBSD: ext.h,v 1.12 2001/02/04 22:32:15 christos Exp $        */
 
 /*
  * Copyright (c) 1989, 1993
@@ -125,8 +125,10 @@
 #ifdef DIAGNOSTICS
        printoption P((char *, int)),
        printdata P((char *, char *, int)),
+#if !defined(ENCRYPTION)
        printsub P((int, unsigned char *, int)),
 #endif
+#endif
        ptyflush P((void)),
        putchr P((int)),
        recv_ayt P((void)),
@@ -157,7 +159,6 @@
 #ifndef convex
        getpty P((int *)),
 #endif
-       login_tty P((int)),
        spcset P((int, cc_t *, cc_t **)),
        stilloob P((int)),
        terminit P((void)),
@@ -190,8 +191,6 @@
        writenet P((unsigned char *, int));
 
 #ifdef ENCRYPTION
-extern int     (*decrypt_input) P((int));
-extern void    (*encrypt_output) P((unsigned char *, int));
 extern char    *nclearto;
 #endif /* ENCRYPTION */
 
@@ -235,4 +234,12 @@
 #   endif
 #  endif
 # endif
+
+#if    defined(AUTHENTICATION)
+#include <libtelnet/auth.h>
 #endif
+
+#if defined(ENCRYPTION)
+#include <libtelnet/encrypt.h>
+#endif
+#endif
diff -r 111297938927 -r 3a1ebd8802cc libexec/telnetd/slc.c
--- a/libexec/telnetd/slc.c     Sun Feb 04 22:14:13 2001 +0000
+++ b/libexec/telnetd/slc.c     Sun Feb 04 22:32:15 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: slc.c,v 1.8 1998/08/10 02:57:24 perry Exp $    */
+/*     $NetBSD: slc.c,v 1.9 2001/02/04 22:32:15 christos Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)slc.c      8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: slc.c,v 1.8 1998/08/10 02:57:24 perry Exp $");
+__RCSID("$NetBSD: slc.c,v 1.9 2001/02/04 22:32:15 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -55,7 +55,6 @@
 static unsigned char   slcbuf[NSLC*6]; /* buffer for slc negotiation */
 
 void default_slc __P((void));
-int end_slc __P((unsigned char **));
 void process_slc __P((u_int, u_int, cc_t));
 
 /*
diff -r 111297938927 -r 3a1ebd8802cc libexec/telnetd/state.c
--- a/libexec/telnetd/state.c   Sun Feb 04 22:14:13 2001 +0000
+++ b/libexec/telnetd/state.c   Sun Feb 04 22:32:15 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: state.c,v 1.13 2000/10/10 19:54:39 is Exp $    */
+/*     $NetBSD: state.c,v 1.14 2001/02/04 22:32:16 christos Exp $      */
 
 /*
  * Copyright (c) 1989, 1993
@@ -38,18 +38,11 @@
 #if 0
 static char sccsid[] = "@(#)state.c    8.5 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: state.c,v 1.13 2000/10/10 19:54:39 is Exp $");
+__RCSID("$NetBSD: state.c,v 1.14 2001/02/04 22:32:16 christos Exp $");
 #endif
 #endif /* not lint */
 
 #include "telnetd.h"
-#if    defined(AUTHENTICATION)
-#include <libtelnet/auth.h>
-#endif
-
-#if defined(ENCRYPTION)
-#include <libtelnet/encrypt.h>
-#endif
 
 static int envvarok __P((char *));
 
@@ -471,15 +464,17 @@
        DIAG(TD_OPTIONS, printoption("td: send do", option));
 }
 
+#ifdef LINEMODE
+extern void doclientstat __P((void));
+#endif
+#if 0
 #ifdef AUTHENTICATION
 extern void auth_request __P((void));  /* libtelnet */
 #endif
-#ifdef LINEMODE
-extern void doclientstat __P((void));
-#endif
 #ifdef ENCRYPTION
 extern void encrypt_send_support __P((void));
 #endif /* ENCRYPTION */
+#endif
 
        void
 willoption(option)
diff -r 111297938927 -r 3a1ebd8802cc libexec/telnetd/sys_term.c
--- a/libexec/telnetd/sys_term.c        Sun Feb 04 22:14:13 2001 +0000
+++ b/libexec/telnetd/sys_term.c        Sun Feb 04 22:32:15 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_term.c,v 1.21 2001/01/10 02:51:37 lukem Exp $      */
+/*     $NetBSD: sys_term.c,v 1.22 2001/02/04 22:32:16 christos Exp $   */
 
 /*
  * Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: sys_term.c,v 1.21 2001/01/10 02:51:37 lukem Exp $");
+__RCSID("$NetBSD: sys_term.c,v 1.22 2001/02/04 22:32:16 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -50,10 +50,6 @@
 #include <sys/cdefs.h>
 #define P __P
 
-#if    defined(AUTHENTICATION)
-#include <libtelnet/auth.h>
-#endif
-
 #if defined(CRAY) || defined(__hpux)
 # define PARENT_DOES_UTMP
 #endif
@@ -184,7 +180,6 @@
 
 void getptyslave __P((void));
 int cleanopen __P((char *));
-void init_env __P((void));
 char **addarg __P((char **, char *));
 void scrub_env __P((void));
 int getent __P((char *, char *));
@@ -1106,7 +1101,14 @@
  * that is necessary.  The return value is a file descriptor
  * for the slave side.
  */
-       void
+#if    !defined(CRAY) || !defined(NEWINIT)
+extern int def_tspeed, def_rspeed;
+# ifdef        TIOCGWINSZ
+       extern int def_row, def_col;
+# endif
+#endif
+
+    void
 getptyslave()
 {
        register int t = -1;
@@ -1117,9 +1119,7 @@
 # endif
 # ifdef        TIOCGWINSZ
        struct winsize ws;
-       extern int def_row, def_col;
 # endif
-       extern int def_tspeed, def_rspeed;
        /*
         * Opening the slave side may cause initilization of the
         * kernel tty structure.  We need remember the state of
@@ -1555,7 +1555,6 @@
 }
 
 char   *envinit[3];
-extern char **environ;
 
        void
 init_env()
@@ -1581,6 +1580,7 @@
  * Assuming that we are now running as a child processes, this
  * function will turn us into the login process.
  */
+extern char *gettyname;
 
        void
 start_login(host, autologin, name)
@@ -1589,7 +1589,6 @@
        char *name;
 {
        register char **argv;
-       extern char *gettyname;
 #define        TABBUFSIZ       512
        char    defent[TABBUFSIZ];
        char    defstrs[TABBUFSIZ];
diff -r 111297938927 -r 3a1ebd8802cc libexec/telnetd/telnetd.c
--- a/libexec/telnetd/telnetd.c Sun Feb 04 22:14:13 2001 +0000
+++ b/libexec/telnetd/telnetd.c Sun Feb 04 22:32:15 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: telnetd.c,v 1.24 2001/01/10 02:51:37 lukem Exp $       */
+/*     $NetBSD: telnetd.c,v 1.25 2001/02/04 22:32:17 christos Exp $    */
 
 /*
  * Copyright (C) 1997 and 1998 WIDE Project.
@@ -69,7 +69,7 @@
 #if 0
 static char sccsid[] = "@(#)telnetd.c  8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: telnetd.c,v 1.24 2001/01/10 02:51:37 lukem Exp $");
+__RCSID("$NetBSD: telnetd.c,v 1.25 2001/02/04 22:32:17 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -120,14 +120,9 @@
 #endif
 
 #if    defined(AUTHENTICATION)
-#include <libtelnet/auth.h>
 int    auth_level = 0;
 #endif
 
-#if defined(ENCRYPTION)
-#include <libtelnet/encrypt.h>
-#endif
-
 #if    defined(AUTHENTICATION) || defined(ENCRYPTION)
 #include <libtelnet/misc.h>
 #endif
@@ -137,6 +132,10 @@
 #endif
 
 extern int utmp_len;
+extern int require_hwpreauth;
+#ifdef KRB5
+extern krb5_context telnet_context;
+#endif
 int    registerd_host_only = 0;
 
 #ifdef STREAMSPTY
@@ -183,7 +182,6 @@
 char *gettyname = "default";
 char *progname;
 
-extern void usage P((void));
 int main __P((int, char *[]));
 void usage __P((void));
 int getterminaltype __P((char *));
@@ -271,7 +269,6 @@
                         * Check for required authentication level
                         */
                        if (strcmp(optarg, "debug") == 0) {
-                               extern int auth_debug_mode;
                                auth_debug_mode = 1;
                        } else if (strcasecmp(optarg, "none") == 0) {
                                auth_level = 0;
@@ -333,7 +330,6 @@
 #ifdef ENCRYPTION
                case 'e':
                        if (strcmp(optarg, "debug") == 0) {
-                               extern int encrypt_debug_mode;
                                encrypt_debug_mode = 1;
                                break;
                        }
@@ -353,7 +349,6 @@
 #ifdef KRB5
                case 'H':
                    {
-                       extern int require_hwpreauth;
                        require_hwpreauth = 1;
                        break;
                    }
@@ -417,7 +412,6 @@
 #ifdef KRB5
                case 'R':
                    {
-                       extern krb5_context telnet_context;
                        krb5_error_code retval;
 
                        if (telnet_context == 0) {
diff -r 111297938927 -r 3a1ebd8802cc libexec/telnetd/utility.c
--- a/libexec/telnetd/utility.c Sun Feb 04 22:14:13 2001 +0000
+++ b/libexec/telnetd/utility.c Sun Feb 04 22:32:15 2001 +0000



Home | Main Index | Thread Index | Old Index