Change binary mode to do just that, and add a eight-bit mode for just
passing all characters. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4064 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -56,6 +56,7 @@ extern int
|
|||||||
autologin, /* Autologin enabled */
|
autologin, /* Autologin enabled */
|
||||||
skiprc, /* Don't process the ~/.telnetrc file */
|
skiprc, /* Don't process the ~/.telnetrc file */
|
||||||
eight, /* use eight bit mode (binary in and/or out */
|
eight, /* use eight bit mode (binary in and/or out */
|
||||||
|
binary,
|
||||||
flushout, /* flush output */
|
flushout, /* flush output */
|
||||||
connected, /* Are we connected to the other side? */
|
connected, /* Are we connected to the other side? */
|
||||||
globalmode, /* Mode tty should be in */
|
globalmode, /* Mode tty should be in */
|
||||||
|
@@ -127,6 +127,9 @@ main(int argc, char **argv)
|
|||||||
case '7':
|
case '7':
|
||||||
eight = 0;
|
eight = 0;
|
||||||
break;
|
break;
|
||||||
|
case 'b':
|
||||||
|
binary = 3;
|
||||||
|
break;
|
||||||
case 'D': {
|
case 'D': {
|
||||||
/* sometimes we don't want a mangled display */
|
/* sometimes we don't want a mangled display */
|
||||||
char *p;
|
char *p;
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
|
|
||||||
#define strip(x) ((my_want_state_is_wont(TELOPT_BINARY)) ? ((x)&0x7f) : (x))
|
#define strip(x) (eight ? (x) : ((x) & 0x7f))
|
||||||
|
|
||||||
static unsigned char subbuffer[SUBBUFSIZE],
|
static unsigned char subbuffer[SUBBUFSIZE],
|
||||||
*subpointer, *subend; /* buffer for sub-options */
|
*subpointer, *subend; /* buffer for sub-options */
|
||||||
@@ -56,6 +56,7 @@ char will_wont_resp[256];
|
|||||||
|
|
||||||
int
|
int
|
||||||
eight = 3,
|
eight = 3,
|
||||||
|
binary = 0,
|
||||||
autologin = 0, /* Autologin anyone? */
|
autologin = 0, /* Autologin anyone? */
|
||||||
skiprc = 0,
|
skiprc = 0,
|
||||||
connected,
|
connected,
|
||||||
@@ -1594,9 +1595,9 @@ telrcv(void)
|
|||||||
telrcv_state = TS_IAC;
|
telrcv_state = TS_IAC;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* The 'crmod' hack (see following) is needed
|
* The 'crmod' hack (see following) is needed
|
||||||
* since we can't * set CRMOD on output only.
|
* since we can't set CRMOD on output only.
|
||||||
* Machines like MULTICS like to send \r without
|
* Machines like MULTICS like to send \r without
|
||||||
* \n; since we must turn off CRMOD to get proper
|
* \n; since we must turn off CRMOD to get proper
|
||||||
* input, the mapping is done here (sigh).
|
* input, the mapping is done here (sigh).
|
||||||
@@ -2026,8 +2027,8 @@ telnet(char *user)
|
|||||||
send_do(TELOPT_STATUS, 1);
|
send_do(TELOPT_STATUS, 1);
|
||||||
if (env_getvalue((unsigned char *)"DISPLAY"))
|
if (env_getvalue((unsigned char *)"DISPLAY"))
|
||||||
send_will(TELOPT_XDISPLOC, 1);
|
send_will(TELOPT_XDISPLOC, 1);
|
||||||
if (eight)
|
if (binary)
|
||||||
tel_enter_binary(eight);
|
tel_enter_binary(binary);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
@@ -163,10 +163,10 @@ getconnmode(void)
|
|||||||
if (localflow)
|
if (localflow)
|
||||||
mode |= MODE_FLOW;
|
mode |= MODE_FLOW;
|
||||||
|
|
||||||
if (my_want_state_is_will(TELOPT_BINARY))
|
if ((eight & 1) || my_want_state_is_will(TELOPT_BINARY))
|
||||||
mode |= MODE_INBIN;
|
mode |= MODE_INBIN;
|
||||||
|
|
||||||
if (his_want_state_is_will(TELOPT_BINARY))
|
if ((eight & 2) || his_want_state_is_will(TELOPT_BINARY))
|
||||||
mode |= MODE_OUTBIN;
|
mode |= MODE_OUTBIN;
|
||||||
|
|
||||||
#ifdef KLUDGELINEMODE
|
#ifdef KLUDGELINEMODE
|
||||||
|
Reference in New Issue
Block a user