fix redundant declarations.

This commit is contained in:
christos 2001-02-04 22:32:15 +00:00
parent 20d53d3990
commit 5dea9a59e1
6 changed files with 41 additions and 56 deletions

View File

@ -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,7 +125,9 @@ extern void
#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)),
@ -157,7 +159,6 @@ extern int
#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 @@ extern void
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 @@ extern int needtermstat;
# endif
# endif
# endif
#if defined(AUTHENTICATION)
#include <libtelnet/auth.h>
#endif
#if defined(ENCRYPTION)
#include <libtelnet/encrypt.h>
#endif
#endif

View File

@ -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 *slcptr; /* pointer into slc buffer */
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));
/*

View File

@ -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 @@ send_do(option, init)
DIAG(TD_OPTIONS, printoption("td: send do", option));
}
#ifdef AUTHENTICATION
extern void auth_request __P((void)); /* libtelnet */
#endif
#ifdef LINEMODE
extern void doclientstat __P((void));
#endif
#if 0
#ifdef AUTHENTICATION
extern void auth_request __P((void)); /* libtelnet */
#endif
#ifdef ENCRYPTION
extern void encrypt_send_support __P((void));
#endif /* ENCRYPTION */
#endif
void
willoption(option)

View File

@ -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 @@ __RCSID("$NetBSD: sys_term.c,v 1.21 2001/01/10 02:51:37 lukem Exp $");
#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 @@ int ttyfd = -1;
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 @@ extern void utmp_sig_notify P((int));
* 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 @@ getptyslave()
# 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 @@ startslave(host, autologin, autoname)
}
char *envinit[3];
extern char **environ;
void
init_env()
@ -1581,6 +1580,7 @@ init_env()
* 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 @@ start_login(host, autologin, name)
char *name;
{
register char **argv;
extern char *gettyname;
#define TABBUFSIZ 512
char defent[TABBUFSIZ];
char defstrs[TABBUFSIZ];

View File

@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
#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 @@ struct socket_security ss;
#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 @@ int require_secure_login = 0;
#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 @@ int keepalive = 1;
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 @@ main(argc, argv)
* 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 @@ main(argc, argv)
#ifdef ENCRYPTION
case 'e':
if (strcmp(optarg, "debug") == 0) {
extern int encrypt_debug_mode;
encrypt_debug_mode = 1;
break;
}
@ -353,7 +349,6 @@ main(argc, argv)
#ifdef KRB5
case 'H':
{
extern int require_hwpreauth;
require_hwpreauth = 1;
break;
}
@ -417,7 +412,6 @@ main(argc, argv)
#ifdef KRB5
case 'R':
{
extern krb5_context telnet_context;
krb5_error_code retval;
if (telnet_context == 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: utility.c,v 1.16 2001/01/10 02:51:37 lukem Exp $ */
/* $NetBSD: utility.c,v 1.17 2001/02/04 22:32:17 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)utility.c 8.4 (Berkeley) 5/30/95";
#else
__RCSID("$NetBSD: utility.c,v 1.16 2001/01/10 02:51:37 lukem Exp $");
__RCSID("$NetBSD: utility.c,v 1.17 2001/02/04 22:32:17 christos Exp $");
#endif
#endif /* not lint */
@ -46,19 +46,11 @@ __RCSID("$NetBSD: utility.c,v 1.16 2001/01/10 02:51:37 lukem Exp $");
#define PRINTOPTIONS
#include "telnetd.h"
#if defined(AUTHENTICATION)
#include <libtelnet/auth.h>
#endif
#if defined(ENCRYPTION)
#include <libtelnet/encrypt.h>
#endif
char *nextitem __P((char *));
void fatalperror __P((int, char *));
void edithost __P((char *, char *));
void putstr __P((char *));
extern int not42;
/*
* utility functions performing io related tasks
*/
@ -262,7 +254,6 @@ netclear()
netflush()
{
int n;
extern int not42;
if ((n = nfrontp - nbackp) > 0) {
DIAG(TD_REPORT,