Print out "Escape character ..." only if it is not
authorAndrey Chernov <ache@FreeBSD.org>
Mon, 13 Jun 1994 21:40:22 +0000 (21:40 +0000)
committerAndrey Chernov <ache@FreeBSD.org>
Mon, 13 Jun 1994 21:40:22 +0000 (21:40 +0000)
equal _POSIX_VDISABLE

usr.bin/telnet/commands.c

index c5e175b..4757d78 100644 (file)
@@ -1320,7 +1320,7 @@ setescape(argc, argv)
        }
        if (arg[0] != '\0')
                escape = arg[0];
        }
        if (arg[0] != '\0')
                escape = arg[0];
-       if (!In3270) {
+       if (!In3270 && escape != _POSIX_VDISABLE) {
                printf("Escape character is '%s'.\n", control(escape));
        }
        (void) fflush(stdout);
                printf("Escape character is '%s'.\n", control(escape));
        }
        (void) fflush(stdout);
@@ -2084,10 +2084,12 @@ status(argc, argv)
        printf("No connection.\n");
     }
 #   if !defined(TN3270)
        printf("No connection.\n");
     }
 #   if !defined(TN3270)
-    printf("Escape character is '%s'.\n", control(escape));
+    if (escape != _POSIX_VDISABLE)
+       printf("Escape character is '%s'.\n", control(escape));
     (void) fflush(stdout);
 #   else /* !defined(TN3270) */
     (void) fflush(stdout);
 #   else /* !defined(TN3270) */
-    if ((!In3270) && ((argc < 2) || strcmp(argv[1], "notmuch"))) {
+    if ((!In3270) && escape != _POSIX_VDISABLE
+       && ((argc < 2) || strcmp(argv[1], "notmuch"))) {
        printf("Escape character is '%s'.\n", control(escape));
     }
 #   if defined(unix)
        printf("Escape character is '%s'.\n", control(escape));
     }
 #   if defined(unix)