mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-15 23:50:44 +00:00
50b0e6ce97
Forgotten by: steve
70 lines
1.8 KiB
Plaintext
70 lines
1.8 KiB
Plaintext
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]);
|