Cleanup.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@734 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -55,7 +55,7 @@ RCSID("$Id$");
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
|
|
||||||
#define strip(x) ((my_want_state_is_wont(TELOPT_BINARY)) ? ((x)&0x7f) : (x))
|
#define strip(x) ((my_want_state_is_wont(TELOPT_BINARY)) ? ((x)&0x7f) : (x))
|
||||||
|
|
||||||
static unsigned char subbuffer[SUBBUFSIZE],
|
static unsigned char subbuffer[SUBBUFSIZE],
|
||||||
@@ -143,20 +143,7 @@ int kludgelinemode = 1;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Clocks clocks;
|
Clocks clocks;
|
||||||
|
|
||||||
#ifdef notdef
|
|
||||||
Modelist modelist[] = {
|
|
||||||
{ "telnet command mode", COMMAND_LINE },
|
|
||||||
{ "character-at-a-time mode", 0 },
|
|
||||||
{ "character-at-a-time mode (local echo)", LOCAL_ECHO|LOCAL_CHARS },
|
|
||||||
{ "line-by-line mode (remote echo)", LINE | LOCAL_CHARS },
|
|
||||||
{ "line-by-line mode", LINE | LOCAL_ECHO | LOCAL_CHARS },
|
|
||||||
{ "line-by-line mode (local echoing suppressed)", LINE | LOCAL_CHARS },
|
|
||||||
{ "3270 mode", 0 },
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize telnet environment.
|
* Initialize telnet environment.
|
||||||
*/
|
*/
|
||||||
@@ -188,57 +175,7 @@ init_telnet()
|
|||||||
flushline = 1;
|
flushline = 1;
|
||||||
telrcv_state = TS_DATA;
|
telrcv_state = TS_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef notdef
|
|
||||||
#include <varargs.h>
|
|
||||||
|
|
||||||
/*VARARGS*/
|
|
||||||
static void
|
|
||||||
printring(va_alist)
|
|
||||||
va_dcl
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
char buffer[100]; /* where things go */
|
|
||||||
char *ptr;
|
|
||||||
char *format;
|
|
||||||
char *string;
|
|
||||||
Ring *ring;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
va_start(ap);
|
|
||||||
|
|
||||||
ring = va_arg(ap, Ring *);
|
|
||||||
format = va_arg(ap, char *);
|
|
||||||
ptr = buffer;
|
|
||||||
|
|
||||||
while ((i = *format++) != 0) {
|
|
||||||
if (i == '%') {
|
|
||||||
i = *format++;
|
|
||||||
switch (i) {
|
|
||||||
case 'c':
|
|
||||||
*ptr++ = va_arg(ap, int);
|
|
||||||
break;
|
|
||||||
case 's':
|
|
||||||
string = va_arg(ap, char *);
|
|
||||||
ring_supply_data(ring, buffer, ptr-buffer);
|
|
||||||
ring_supply_data(ring, string, strlen(string));
|
|
||||||
ptr = buffer;
|
|
||||||
break;
|
|
||||||
case 0:
|
|
||||||
ExitString("printring: trailing %%.\n", 1);
|
|
||||||
/*NOTREACHED*/
|
|
||||||
default:
|
|
||||||
ExitString("printring: unknown format character.\n", 1);
|
|
||||||
/*NOTREACHED*/
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
*ptr++ = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ring_supply_data(ring, buffer, ptr-buffer);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These routines are in charge of sending option negotiations
|
* These routines are in charge of sending option negotiations
|
||||||
@@ -249,8 +186,7 @@ printring(va_alist)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
send_do(c, init)
|
send_do(int c, int init)
|
||||||
register int c, init;
|
|
||||||
{
|
{
|
||||||
if (init) {
|
if (init) {
|
||||||
if (((do_dont_resp[c] == 0) && my_state_is_do(c)) ||
|
if (((do_dont_resp[c] == 0) && my_state_is_do(c)) ||
|
||||||
@@ -265,8 +201,7 @@ send_do(c, init)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
send_dont(c, init)
|
send_dont(int c, int init)
|
||||||
register int c, init;
|
|
||||||
{
|
{
|
||||||
if (init) {
|
if (init) {
|
||||||
if (((do_dont_resp[c] == 0) && my_state_is_dont(c)) ||
|
if (((do_dont_resp[c] == 0) && my_state_is_dont(c)) ||
|
||||||
@@ -281,8 +216,7 @@ send_dont(c, init)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
send_will(c, init)
|
send_will(int c, int init)
|
||||||
register int c, init;
|
|
||||||
{
|
{
|
||||||
if (init) {
|
if (init) {
|
||||||
if (((will_wont_resp[c] == 0) && my_state_is_will(c)) ||
|
if (((will_wont_resp[c] == 0) && my_state_is_will(c)) ||
|
||||||
@@ -297,8 +231,7 @@ send_will(c, init)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
send_wont(c, init)
|
send_wont(int c, int init)
|
||||||
register int c, init;
|
|
||||||
{
|
{
|
||||||
if (init) {
|
if (init) {
|
||||||
if (((will_wont_resp[c] == 0) && my_state_is_wont(c)) ||
|
if (((will_wont_resp[c] == 0) && my_state_is_wont(c)) ||
|
||||||
@@ -314,8 +247,7 @@ send_wont(c, init)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
willoption(option)
|
willoption(int option)
|
||||||
int option;
|
|
||||||
{
|
{
|
||||||
int new_state_ok = 0;
|
int new_state_ok = 0;
|
||||||
|
|
||||||
@@ -430,8 +362,7 @@ wontoption(int option)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dooption(option)
|
dooption(int option)
|
||||||
int option;
|
|
||||||
{
|
{
|
||||||
int new_state_ok = 0;
|
int new_state_ok = 0;
|
||||||
|
|
||||||
@@ -592,11 +523,10 @@ static char *name_unknown = "UNKNOWN";
|
|||||||
static char *unknown[] = { 0, 0 };
|
static char *unknown[] = { 0, 0 };
|
||||||
|
|
||||||
char **
|
char **
|
||||||
mklist(buf, name)
|
mklist(char *buf, char *name)
|
||||||
char *buf, *name;
|
|
||||||
{
|
{
|
||||||
register int n;
|
int n;
|
||||||
register char c, *cp, **argvp, *cp2, **argv, **avt;
|
char c, *cp, **argvp, *cp2, **argv, **avt;
|
||||||
|
|
||||||
if (name) {
|
if (name) {
|
||||||
if ((int)strlen(name) > 40) {
|
if ((int)strlen(name) > 40) {
|
||||||
@@ -704,11 +634,10 @@ mklist(buf, name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
is_unique(name, as, ae)
|
is_unique(char *name, char **as, char **ae)
|
||||||
register char *name, **as, **ae;
|
|
||||||
{
|
{
|
||||||
register char **ap;
|
char **ap;
|
||||||
register int n;
|
int n;
|
||||||
|
|
||||||
n = strlen(name) + 1;
|
n = strlen(name) + 1;
|
||||||
for (ap = as; ap < ae; ap++)
|
for (ap = as; ap < ae; ap++)
|
||||||
@@ -1042,9 +971,7 @@ suboption()
|
|||||||
static unsigned char str_lm[] = { IAC, SB, TELOPT_LINEMODE, 0, 0, IAC, SE };
|
static unsigned char str_lm[] = { IAC, SB, TELOPT_LINEMODE, 0, 0, IAC, SE };
|
||||||
|
|
||||||
void
|
void
|
||||||
lm_will(cmd, len)
|
lm_will(unsigned char *cmd, int len)
|
||||||
unsigned char *cmd;
|
|
||||||
int len;
|
|
||||||
{
|
{
|
||||||
if (len < 1) {
|
if (len < 1) {
|
||||||
/*@*/ printf("lm_will: no command!!!\n"); /* Should not happen... */
|
/*@*/ printf("lm_will: no command!!!\n"); /* Should not happen... */
|
||||||
@@ -1065,9 +992,7 @@ lm_will(cmd, len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
lm_wont(cmd, len)
|
lm_wont(unsigned char *cmd, int len)
|
||||||
unsigned char *cmd;
|
|
||||||
int len;
|
|
||||||
{
|
{
|
||||||
if (len < 1) {
|
if (len < 1) {
|
||||||
/*@*/ printf("lm_wont: no command!!!\n"); /* Should not happen... */
|
/*@*/ printf("lm_wont: no command!!!\n"); /* Should not happen... */
|
||||||
@@ -1082,9 +1007,7 @@ lm_wont(cmd, len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
lm_do(cmd, len)
|
lm_do(unsigned char *cmd, int len)
|
||||||
unsigned char *cmd;
|
|
||||||
int len;
|
|
||||||
{
|
{
|
||||||
if (len < 1) {
|
if (len < 1) {
|
||||||
/*@*/ printf("lm_do: no command!!!\n"); /* Should not happen... */
|
/*@*/ printf("lm_do: no command!!!\n"); /* Should not happen... */
|
||||||
@@ -1105,9 +1028,7 @@ lm_do(cmd, len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
lm_dont(cmd, len)
|
lm_dont(unsigned char *cmd, int len)
|
||||||
unsigned char *cmd;
|
|
||||||
int len;
|
|
||||||
{
|
{
|
||||||
if (len < 1) {
|
if (len < 1) {
|
||||||
/*@*/ printf("lm_dont: no command!!!\n"); /* Should not happen... */
|
/*@*/ printf("lm_dont: no command!!!\n"); /* Should not happen... */
|
||||||
@@ -1126,9 +1047,7 @@ static unsigned char str_lm_mode[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
lm_mode(cmd, len, init)
|
lm_mode(unsigned char *cmd, int len, int init)
|
||||||
unsigned char *cmd;
|
|
||||||
int len, init;
|
|
||||||
{
|
{
|
||||||
if (len != 1)
|
if (len != 1)
|
||||||
return;
|
return;
|
||||||
@@ -1148,7 +1067,7 @@ lm_mode(cmd, len, init)
|
|||||||
setconnmode(0); /* set changed mode */
|
setconnmode(0); /* set changed mode */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* slc()
|
* slc()
|
||||||
@@ -1170,7 +1089,7 @@ static int slc_mode = SLC_EXPORT;
|
|||||||
void
|
void
|
||||||
slc_init()
|
slc_init()
|
||||||
{
|
{
|
||||||
register struct spc *spcp;
|
struct spc *spcp;
|
||||||
|
|
||||||
localchars = 1;
|
localchars = 1;
|
||||||
for (spcp = spc_data; spcp < &spc_data[NSLC+1]; spcp++) {
|
for (spcp = spc_data; spcp < &spc_data[NSLC+1]; spcp++) {
|
||||||
@@ -1269,7 +1188,7 @@ slc_import(int def)
|
|||||||
void
|
void
|
||||||
slc_export()
|
slc_export()
|
||||||
{
|
{
|
||||||
register struct spc *spcp;
|
struct spc *spcp;
|
||||||
|
|
||||||
TerminalDefaultChars();
|
TerminalDefaultChars();
|
||||||
|
|
||||||
@@ -1293,8 +1212,8 @@ slc_export()
|
|||||||
void
|
void
|
||||||
slc(unsigned char *cp, int len)
|
slc(unsigned char *cp, int len)
|
||||||
{
|
{
|
||||||
register struct spc *spcp;
|
struct spc *spcp;
|
||||||
register int func,level;
|
int func,level;
|
||||||
|
|
||||||
slc_start_reply();
|
slc_start_reply();
|
||||||
|
|
||||||
@@ -1361,7 +1280,7 @@ slc(unsigned char *cp, int len)
|
|||||||
void
|
void
|
||||||
slc_check()
|
slc_check()
|
||||||
{
|
{
|
||||||
register struct spc *spcp;
|
struct spc *spcp;
|
||||||
|
|
||||||
slc_start_reply();
|
slc_start_reply();
|
||||||
for (spcp = &spc_data[1]; spcp < &spc_data[NSLC+1]; spcp++) {
|
for (spcp = &spc_data[1]; spcp < &spc_data[NSLC+1]; spcp++) {
|
||||||
@@ -1406,7 +1325,7 @@ slc_add_reply(unsigned char func, unsigned char flags, cc_t value)
|
|||||||
void
|
void
|
||||||
slc_end_reply()
|
slc_end_reply()
|
||||||
{
|
{
|
||||||
register int len;
|
int len;
|
||||||
|
|
||||||
*slc_replyp++ = IAC;
|
*slc_replyp++ = IAC;
|
||||||
*slc_replyp++ = SE;
|
*slc_replyp++ = SE;
|
||||||
@@ -1423,7 +1342,7 @@ slc_end_reply()
|
|||||||
int
|
int
|
||||||
slc_update()
|
slc_update()
|
||||||
{
|
{
|
||||||
register struct spc *spcp;
|
struct spc *spcp;
|
||||||
int need_update = 0;
|
int need_update = 0;
|
||||||
|
|
||||||
for (spcp = &spc_data[1]; spcp < &spc_data[NSLC+1]; spcp++) {
|
for (spcp = &spc_data[1]; spcp < &spc_data[NSLC+1]; spcp++) {
|
||||||
@@ -1444,12 +1363,10 @@ slc_update()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
env_opt(buf, len)
|
env_opt(unsigned char *buf, int len)
|
||||||
register unsigned char *buf;
|
|
||||||
register int len;
|
|
||||||
{
|
{
|
||||||
register unsigned char *ep = 0, *epc = 0;
|
unsigned char *ep = 0, *epc = 0;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
switch(buf[0]&0xff) {
|
switch(buf[0]&0xff) {
|
||||||
case TELQUAL_SEND:
|
case TELQUAL_SEND:
|
||||||
@@ -1537,10 +1454,9 @@ env_opt_start_info()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_opt_add(ep)
|
env_opt_add(unsigned char *ep)
|
||||||
register unsigned char *ep;
|
|
||||||
{
|
{
|
||||||
register unsigned char *vp, c;
|
unsigned char *vp, c;
|
||||||
|
|
||||||
if (opt_reply == NULL) /*XXX*/
|
if (opt_reply == NULL) /*XXX*/
|
||||||
return; /*XXX*/
|
return; /*XXX*/
|
||||||
@@ -1561,7 +1477,7 @@ env_opt_add(ep)
|
|||||||
if (opt_replyp + (vp ? strlen((char *)vp) : 0) +
|
if (opt_replyp + (vp ? strlen((char *)vp) : 0) +
|
||||||
strlen((char *)ep) + 6 > opt_replyend)
|
strlen((char *)ep) + 6 > opt_replyend)
|
||||||
{
|
{
|
||||||
register int len;
|
int len;
|
||||||
opt_replyend += OPT_REPLY_SIZE;
|
opt_replyend += OPT_REPLY_SIZE;
|
||||||
len = opt_replyend - opt_reply;
|
len = opt_replyend - opt_reply;
|
||||||
opt_reply = (unsigned char *)realloc(opt_reply, len);
|
opt_reply = (unsigned char *)realloc(opt_reply, len);
|
||||||
@@ -1611,8 +1527,7 @@ env_opt_add(ep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
opt_welldefined(ep)
|
opt_welldefined(char *ep)
|
||||||
char *ep;
|
|
||||||
{
|
{
|
||||||
if ((strcmp(ep, "USER") == 0) ||
|
if ((strcmp(ep, "USER") == 0) ||
|
||||||
(strcmp(ep, "DISPLAY") == 0) ||
|
(strcmp(ep, "DISPLAY") == 0) ||
|
||||||
@@ -1623,11 +1538,11 @@ opt_welldefined(ep)
|
|||||||
return(1);
|
return(1);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_opt_end(emptyok)
|
env_opt_end(int emptyok)
|
||||||
register int emptyok;
|
|
||||||
{
|
{
|
||||||
register int len;
|
int len;
|
||||||
|
|
||||||
len = opt_replyp - opt_reply + 2;
|
len = opt_replyp - opt_reply + 2;
|
||||||
if (emptyok || len > 6) {
|
if (emptyok || len > 6) {
|
||||||
@@ -1645,14 +1560,14 @@ env_opt_end(emptyok)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
telrcv()
|
telrcv()
|
||||||
{
|
{
|
||||||
register int c;
|
int c;
|
||||||
register int scc;
|
int scc;
|
||||||
register unsigned char *sbp;
|
unsigned char *sbp;
|
||||||
int count;
|
int count;
|
||||||
int returnValue = 0;
|
int returnValue = 0;
|
||||||
|
|
||||||
@@ -1902,8 +1817,8 @@ telsnd()
|
|||||||
tcc = 0;
|
tcc = 0;
|
||||||
count = 0;
|
count = 0;
|
||||||
while (NETROOM() > 2) {
|
while (NETROOM() > 2) {
|
||||||
register int sc;
|
int sc;
|
||||||
register int c;
|
int c;
|
||||||
|
|
||||||
if (tcc == 0) {
|
if (tcc == 0) {
|
||||||
if (count) {
|
if (count) {
|
||||||
@@ -2031,7 +1946,7 @@ telsnd()
|
|||||||
ring_consumed(&ttyiring, count);
|
ring_consumed(&ttyiring, count);
|
||||||
return returnValue||count; /* Non-zero if we did anything */
|
return returnValue||count; /* Non-zero if we did anything */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Scheduler()
|
* Scheduler()
|
||||||
*
|
*
|
||||||
@@ -2043,8 +1958,7 @@ telsnd()
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
Scheduler(block)
|
Scheduler(int block) /* should we block in the select ? */
|
||||||
int block; /* should we block in the select ? */
|
|
||||||
{
|
{
|
||||||
/* One wants to be a bit careful about setting returnValue
|
/* One wants to be a bit careful about setting returnValue
|
||||||
* to one, since a one implies we did some useful work,
|
* to one, since a one implies we did some useful work,
|
||||||
@@ -2089,13 +2003,12 @@ Scheduler(block)
|
|||||||
}
|
}
|
||||||
return returnValue;
|
return returnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Select from tty and network...
|
* Select from tty and network...
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
telnet(user)
|
telnet(char *user)
|
||||||
char *user;
|
|
||||||
{
|
{
|
||||||
sys_telnet_init();
|
sys_telnet_init();
|
||||||
|
|
||||||
@@ -2150,49 +2063,6 @@ telnet(user)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* XXX - this not being in is a bug */
|
|
||||||
/*
|
|
||||||
* nextitem()
|
|
||||||
*
|
|
||||||
* Return the address of the next "item" in the TELNET data
|
|
||||||
* stream. This will be the address of the next character if
|
|
||||||
* the current address is a user data character, or it will
|
|
||||||
* be the address of the character following the TELNET command
|
|
||||||
* if the current address is a TELNET IAC ("I Am a Command")
|
|
||||||
* character.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static char *
|
|
||||||
nextitem(current)
|
|
||||||
char *current;
|
|
||||||
{
|
|
||||||
if ((*current&0xff) != IAC) {
|
|
||||||
return current+1;
|
|
||||||
}
|
|
||||||
switch (*(current+1)&0xff) {
|
|
||||||
case DO:
|
|
||||||
case DONT:
|
|
||||||
case WILL:
|
|
||||||
case WONT:
|
|
||||||
return current+3;
|
|
||||||
case SB: /* loop forever looking for the SE */
|
|
||||||
{
|
|
||||||
register char *look = current+2;
|
|
||||||
|
|
||||||
for (;;) {
|
|
||||||
if ((*look++&0xff) == IAC) {
|
|
||||||
if ((*look++&0xff) == SE) {
|
|
||||||
return look;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
return current+2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* 0 */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* netclear()
|
* netclear()
|
||||||
@@ -2215,7 +2085,7 @@ nextitem(current)
|
|||||||
netclear()
|
netclear()
|
||||||
{
|
{
|
||||||
#if 0 /* XXX */
|
#if 0 /* XXX */
|
||||||
register char *thisitem, *next;
|
char *thisitem, *next;
|
||||||
char *good;
|
char *good;
|
||||||
#define wewant(p) ((nfrontp > p) && ((*p&0xff) == IAC) && \
|
#define wewant(p) ((nfrontp > p) && ((*p&0xff) == IAC) && \
|
||||||
((*(p+1)&0xff) != EC) && ((*(p+1)&0xff) != EL))
|
((*(p+1)&0xff) != EC) && ((*(p+1)&0xff) != EL))
|
||||||
@@ -2249,7 +2119,7 @@ netclear()
|
|||||||
|
|
||||||
#endif /* 0 */
|
#endif /* 0 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These routines add various telnet commands to the data stream.
|
* These routines add various telnet commands to the data stream.
|
||||||
*/
|
*/
|
||||||
@@ -2309,7 +2179,7 @@ int want_status_response = 0;
|
|||||||
get_status()
|
get_status()
|
||||||
{
|
{
|
||||||
unsigned char tmp[16];
|
unsigned char tmp[16];
|
||||||
register unsigned char *cp;
|
unsigned char *cp;
|
||||||
|
|
||||||
if (my_want_state_is_dont(TELOPT_STATUS)) {
|
if (my_want_state_is_dont(TELOPT_STATUS)) {
|
||||||
printf("Remote side does not support STATUS option\n");
|
printf("Remote side does not support STATUS option\n");
|
||||||
@@ -2410,7 +2280,7 @@ sendnaws()
|
|||||||
{
|
{
|
||||||
long rows, cols;
|
long rows, cols;
|
||||||
unsigned char tmp[16];
|
unsigned char tmp[16];
|
||||||
register unsigned char *cp;
|
unsigned char *cp;
|
||||||
|
|
||||||
if (my_state_is_wont(TELOPT_NAWS))
|
if (my_state_is_wont(TELOPT_NAWS))
|
||||||
return;
|
return;
|
||||||
@@ -2438,8 +2308,7 @@ sendnaws()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tel_enter_binary(rw)
|
tel_enter_binary(int rw)
|
||||||
int rw;
|
|
||||||
{
|
{
|
||||||
if (rw&1)
|
if (rw&1)
|
||||||
send_do(TELOPT_BINARY, 1);
|
send_do(TELOPT_BINARY, 1);
|
||||||
@@ -2448,8 +2317,7 @@ tel_enter_binary(rw)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tel_leave_binary(rw)
|
tel_leave_binary(int rw)
|
||||||
int rw;
|
|
||||||
{
|
{
|
||||||
if (rw&1)
|
if (rw&1)
|
||||||
send_dont(TELOPT_BINARY, 1);
|
send_dont(TELOPT_BINARY, 1);
|
||||||
|
Reference in New Issue
Block a user