Fix up external variables named "debug" that have a horrible habit

of conflicting with other, similarly named functions in static
libraries. This is done mostly by renaming the var if it is shared
amongst modules, or making it static otherwise.

OK'ed by:	re(scottl)
This commit is contained in:
Mark Murray 2003-05-11 18:17:00 +00:00
parent 6902ee83c7
commit 074e8e8ee9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114911
10 changed files with 16 additions and 16 deletions

View File

@ -532,11 +532,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
@ -741,7 +741,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)",
@ -2404,7 +2404,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)");
}

View File

@ -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 */

View File

@ -213,7 +213,7 @@ main(int argc, char *argv[])
skiprc = 1;
break;
case 'd':
debug = 1;
telnet_debug = 1;
break;
case 'e':
set_escape_char(optarg);

View File

@ -95,7 +95,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 <CR><LF> (or <CR><NUL>)? */

View File

@ -78,7 +78,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;

View File

@ -532,11 +532,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
@ -741,7 +741,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)",
@ -2404,7 +2404,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)");
}

View File

@ -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 */

View File

@ -213,7 +213,7 @@ main(int argc, char *argv[])
skiprc = 1;
break;
case 'd':
debug = 1;
telnet_debug = 1;
break;
case 'e':
set_escape_char(optarg);

View File

@ -95,7 +95,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 <CR><LF> (or <CR><NUL>)? */

View File

@ -78,7 +78,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;