From 0813637235d5007c00e1c31ce104af98ced23e32 Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Sun, 11 May 2003 18:27:49 +0000 Subject: [PATCH] Mrege from crypto telnet with "make unifdef". This gets a bunch of $FreeBSD$ tags and some debug variable safety belts. --- libexec/telnetd/global.c | 8 ++++---- libexec/telnetd/slc.c | 8 ++++---- libexec/telnetd/state.c | 8 ++++---- libexec/telnetd/sys_term.c | 8 ++++---- libexec/telnetd/telnetd.c | 10 +++++----- libexec/telnetd/termstat.c | 8 ++++---- libexec/telnetd/utility.c | 8 ++++---- usr.bin/telnet/commands.c | 16 ++++++++-------- usr.bin/telnet/externs.h | 2 +- usr.bin/telnet/main.c | 10 +++++----- usr.bin/telnet/network.c | 8 ++++---- usr.bin/telnet/ring.c | 8 ++++---- usr.bin/telnet/sys_bsd.c | 12 ++++++------ usr.bin/telnet/telnet.c | 10 +++++----- usr.bin/telnet/terminal.c | 8 ++++---- usr.bin/telnet/utilities.c | 8 ++++---- 16 files changed, 70 insertions(+), 70 deletions(-) diff --git a/libexec/telnetd/global.c b/libexec/telnetd/global.c index 0cf95dbd463e..2ed82d0b6aee 100644 --- a/libexec/telnetd/global.c +++ b/libexec/telnetd/global.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#ifndef lint #if 0 +#ifndef lint static const char sccsid[] = "@(#)global.c 8.1 (Berkeley) 6/4/93"; -#endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ +#endif +#include +__FBSDID("$FreeBSD$"); /* * Allocate global variables. We do this diff --git a/libexec/telnetd/slc.c b/libexec/telnetd/slc.c index d4eee1ad4f5f..ad034418d313 100644 --- a/libexec/telnetd/slc.c +++ b/libexec/telnetd/slc.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)slc.c 8.2 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD$"); #include "telnetd.h" diff --git a/libexec/telnetd/state.c b/libexec/telnetd/state.c index 412fd941d259..7b733e4743cf 100644 --- a/libexec/telnetd/state.c +++ b/libexec/telnetd/state.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)state.c 8.5 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD$"); #include #include "telnetd.h" diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c index 17686b366bac..e0525d631292 100644 --- a/libexec/telnetd/sys_term.c +++ b/libexec/telnetd/sys_term.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD$"); #include #include diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c index 7532865cf2ca..042fea55c8c6 100644 --- a/libexec/telnetd/telnetd.c +++ b/libexec/telnetd/telnetd.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)telnetd.c 8.4 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD$"); #include "telnetd.h" #include "pathnames.h" @@ -71,7 +71,7 @@ int terminaltypeok(char *); int hostinfo = 1; /* do we print login banner? */ -int debug = 0; +static int debug = 0; int keepalive = 1; const char *altlogin; diff --git a/libexec/telnetd/termstat.c b/libexec/telnetd/termstat.c index 14719a2b4330..8d8257d0f6df 100644 --- a/libexec/telnetd/termstat.c +++ b/libexec/telnetd/termstat.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)termstat.c 8.2 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD$"); #include "telnetd.h" diff --git a/libexec/telnetd/utility.c b/libexec/telnetd/utility.c index c835269b7bb3..042b248bd79c 100644 --- a/libexec/telnetd/utility.c +++ b/libexec/telnetd/utility.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#ifndef lint #if 0 +#ifndef lint static const char sccsid[] = "@(#)utility.c 8.4 (Berkeley) 5/30/95"; -#endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ +#endif +#include +__FBSDID("$FreeBSD$"); #ifdef __FreeBSD__ #include diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c index e0c5b6225bde..489481f9ba7e 100644 --- a/usr.bin/telnet/commands.c +++ b/usr.bin/telnet/commands.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)commands.c 8.4 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD$"); #include #include @@ -517,11 +517,11 @@ togdebug(void) { #ifndef NOT43 if (net > 0 && - (SetSockOpt(net, SOL_SOCKET, SO_DEBUG, debug)) < 0) { + (SetSockOpt(net, SOL_SOCKET, SO_DEBUG, telnet_debug)) < 0) { perror("setsockopt (SO_DEBUG)"); } #else /* NOT43 */ - if (debug) { + if (telnet_debug) { if (net > 0 && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) perror("setsockopt (SO_DEBUG)"); } else @@ -692,7 +692,7 @@ static struct togglelist Togglelist[] = { { "debug", "debugging", (int (*)(int))togdebug, - &debug, + &telnet_debug, "turn on socket level debugging" }, { "netdata", "printing of hexadecimal network data (debugging)", @@ -2146,7 +2146,7 @@ tn(int argc, char *argv[]) } #endif /* defined(IPPROTO_IP) && defined(IP_TOS) */ - if (debug && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) { + if (telnet_debug && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) { perror("setsockopt (SO_DEBUG)"); } diff --git a/usr.bin/telnet/externs.h b/usr.bin/telnet/externs.h index 1129817a329d..b4fd327bec53 100644 --- a/usr.bin/telnet/externs.h +++ b/usr.bin/telnet/externs.h @@ -127,7 +127,7 @@ extern int netdata, /* Print out network data flow */ prettydump, /* Print "netdata" output in user readable format */ termdata, /* Print out terminal data flow */ - debug, /* Debug level */ + telnet_debug, /* Debug level */ doaddrlookup, /* do a reverse lookup? */ clienteof; /* Client received EOF */ diff --git a/usr.bin/telnet/main.c b/usr.bin/telnet/main.c index 676f13f8ae1a..e00734832b46 100644 --- a/usr.bin/telnet/main.c +++ b/usr.bin/telnet/main.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)main.c 8.3 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD$"); #include #include @@ -180,7 +180,7 @@ main(int argc, char *argv[]) skiprc = 1; break; case 'd': - debug = 1; + telnet_debug = 1; break; case 'e': set_escape_char(optarg); diff --git a/usr.bin/telnet/network.c b/usr.bin/telnet/network.c index b93f82519d2f..cdcd41994333 100644 --- a/usr.bin/telnet/network.c +++ b/usr.bin/telnet/network.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)network.c 8.2 (Berkeley) 12/15/93"; #endif +#endif +#include +__FBSDID("$FreeBSD$"); #include #include diff --git a/usr.bin/telnet/ring.c b/usr.bin/telnet/ring.c index ac415a9073dc..b6e2bea3616c 100644 --- a/usr.bin/telnet/ring.c +++ b/usr.bin/telnet/ring.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)ring.c 8.2 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD$"); /* * This defines a structure for a ring buffer. diff --git a/usr.bin/telnet/sys_bsd.c b/usr.bin/telnet/sys_bsd.c index 5d931bf8b874..45ef1e2aa3cd 100644 --- a/usr.bin/telnet/sys_bsd.c +++ b/usr.bin/telnet/sys_bsd.c @@ -31,15 +31,13 @@ * SUCH DAMAGE. */ -#include -#include -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)sys_bsd.c 8.4 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD$"); /* * The following routines try to encapsulate what is system dependent @@ -49,9 +47,11 @@ static const char sccsid[] = "@(#)sys_bsd.c 8.4 (Berkeley) 5/30/95"; #include #include #include +#include #include #include #include +#include #include #include diff --git a/usr.bin/telnet/telnet.c b/usr.bin/telnet/telnet.c index 27aeaa9a7d8d..75c27a5cc119 100644 --- a/usr.bin/telnet/telnet.c +++ b/usr.bin/telnet/telnet.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)telnet.c 8.4 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD$"); #include @@ -89,7 +89,7 @@ int connected, showoptions, ISend, /* trying to send network data in */ - debug = 0, + telnet_debug = 0, crmod, netdata, /* Print out network data flow */ crlf, /* Should '\r' be mapped to (or )? */ diff --git a/usr.bin/telnet/terminal.c b/usr.bin/telnet/terminal.c index b6e4a4755c56..bea4e4d26778 100644 --- a/usr.bin/telnet/terminal.c +++ b/usr.bin/telnet/terminal.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)terminal.c 8.2 (Berkeley) 2/16/95"; #endif +#endif +#include +__FBSDID("$FreeBSD$"); #include #include diff --git a/usr.bin/telnet/utilities.c b/usr.bin/telnet/utilities.c index 4a51966e4691..d1eb8a8c4452 100644 --- a/usr.bin/telnet/utilities.c +++ b/usr.bin/telnet/utilities.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint static const char sccsid[] = "@(#)utilities.c 8.3 (Berkeley) 5/30/95"; #endif +#endif +#include +__FBSDID("$FreeBSD$"); #define TELOPTS #define TELCMDS