summaryrefslogtreecommitdiffstats
path: root/usr.bin/telnet/telnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/telnet/telnet.c')
-rw-r--r--usr.bin/telnet/telnet.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/usr.bin/telnet/telnet.c b/usr.bin/telnet/telnet.c
index 97f63e6..e792262 100644
--- a/usr.bin/telnet/telnet.c
+++ b/usr.bin/telnet/telnet.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)telnet.c 8.2 (Berkeley) 12/15/93";
+static char sccsid[] = "@(#)telnet.c 8.4 (Berkeley) 5/30/95";
#endif /* not lint */
#include <sys/types.h>
@@ -57,7 +57,7 @@ static char sccsid[] = "@(#)telnet.c 8.2 (Berkeley) 12/15/93";
#include "general.h"
-#define strip(x) ((x)&0x7f)
+#define strip(x) ((my_want_state_is_wont(TELOPT_BINARY)) ? ((x)&0x7f) : (x))
static unsigned char subbuffer[SUBBUFSIZE],
*subpointer, *subend; /* buffer for sub-options */
@@ -177,7 +177,7 @@ init_telnet()
ClearArray(options);
connected = In3270 = ISend = localflow = donebinarytoggle = 0;
-#if defined(AUTHENTICATION) || defined(ENCRYPTION)
+#if defined(AUTHENTICATION) || defined(ENCRYPTION)
auth_encrypt_connect(connected);
#endif /* defined(AUTHENTICATION) || defined(ENCRYPTION) */
restartany = -1;
@@ -623,7 +623,7 @@ mklist(buf, name)
register char c, *cp, **argvp, *cp2, **argv, **avt;
if (name) {
- if (strlen(name) > 40) {
+ if ((int)strlen(name) > 40) {
name = 0;
unknown[0] = name_unknown;
} else {
@@ -689,7 +689,7 @@ mklist(buf, name)
else if (islower(c))
*cp = toupper(c);
}
-
+
/*
* Check for an old V6 2 character name. If the second
* name points to the beginning of the buffer, and is
@@ -782,7 +782,7 @@ gettermname()
(setupterm(tname, 1, &err) == 0)) {
tnamep = mklist(termbuf, tname);
} else {
- if (tname && (strlen(tname) <= 40)) {
+ if (tname && ((int)strlen(tname) <= 40)) {
unknown[0] = tname;
upcase(tname);
} else
@@ -1810,7 +1810,7 @@ telrcv()
TTYADD('\n');
} else {
#ifdef ENCRYPTION
- if (decrypt_input)
+ if (decrypt_input)
(*decrypt_input)(-1);
#endif /* ENCRYPTION */
@@ -1834,7 +1834,7 @@ telrcv()
case TS_IAC:
process_iac:
switch (c) {
-
+
case WILL:
telrcv_state = TS_WILL;
continue;
@@ -2220,7 +2220,7 @@ Scheduler(block)
ring_full_consecutive(&ttyiring));
if (c) {
returnValue = 1;
- ring_consumed(&ttyiring, c);
+ ring_consumed(&ttyiring, c);
}
} else {
# endif /* defined(TN3270) */
@@ -2249,7 +2249,7 @@ telnet(user)
{
sys_telnet_init();
-#if defined(AUTHENTICATION) || defined(ENCRYPTION)
+#if defined(AUTHENTICATION) || defined(ENCRYPTION)
{
static char local_host[256] = { 0 };
@@ -2431,7 +2431,7 @@ netclear()
next = nextitem(next);
} while (wewant(next) && (nfrontp > next));
length = next-thisitem;
- memcpy(good, thisitem, length);
+ memmove(good, thisitem, length);
good += length;
thisitem = next;
} else {
OpenPOWER on IntegriCloud