summaryrefslogtreecommitdiff
path: root/net/ztelnet/files/patch-ao
blob: 2392e64ec30cbdc7dc6f21ca3b5cf82fc0f5ed4c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
diff -uNr ../ztelnet/telnet/utilities.c ./telnet/utilities.c
--- ../ztelnet/telnet/utilities.c	Tue Sep 19 21:41:41 1995
+++ ./telnet/utilities.c	Wed Dec  3 01:57:23 1997
@@ -40,6 +40,15 @@
 
 #include "externs.h"
 
+#ifdef SLC_NAME_OK
+#undef SLC_NAME_OK
+#define SLC_NAME_OK(x)  ( (x) < NSLC )
+#endif
+#ifdef TELOPT_OK
+#undef TELOPT_OK
+#define TELOPT_OK(x) ((x) <= TELOPT_LAST)
+#endif
+
 FILE	*NetTrace = 0;		/* Not in bss, since needs to stay */
 int	prettydump;
 
@@ -282,9 +291,6 @@
     register int i;
     char buf[512];
     extern int want_status_response;
-#ifdef BYPMS
-	unsigned int bypms;
-#endif /* PMS */
 
     if (showoptions || direction == 0 ||
 	(want_status_response && (pointer[0] == TELOPT_STATUS))) {
@@ -578,12 +584,7 @@
 	    case LM_SLC:
 		fprintf(NetTrace, "SLC");
 		for (i = 2; i < length - 2; i += 3) {
-#ifdef BYPMS
-			bypms = (unsigned int) pointer[i+SLC_FUNC];
-		    if (SLC_NAME_OK(bypms))
-#else
 		    if (SLC_NAME_OK(pointer[i+SLC_FUNC]))
-#endif /* PMS */
 			fprintf(NetTrace, " %s", SLC_NAME(pointer[i+SLC_FUNC]));
 		    else
 			fprintf(NetTrace, " %d", pointer[i+SLC_FUNC]);
@@ -672,12 +673,7 @@
 		    case WONT:	cp = "WONT"; goto common2;
 		    common2:
 			i++;
-#ifdef BYPMS
-			bypms = (unsigned int) pointer[i];
-			if (TELOPT_OK(bypms))
-#else
 			if (TELOPT_OK((int)pointer[i]))
-#endif /* PMS */
 			    fprintf(NetTrace, " %s %s", cp, TELOPT(pointer[i]));
 			else
 			    fprintf(NetTrace, " %s %d", cp, pointer[i]);
@@ -799,12 +795,7 @@
 	    break;
 
 	default:
-#ifdef BYPMS
-		bypms = (unsigned int) pointer[0];
- 		if (TELOPT_OK(bypms))
-#else	   
- 		if (TELOPT_OK(pointer[0]))
-#endif /* PMS */
+	    if (TELOPT_OK(pointer[0]))
 		fprintf(NetTrace, "%s (unknown)", TELOPT(pointer[0]));
 	    else
 		fprintf(NetTrace, "%d (unknown)", pointer[i]);