Mostly, this changes all the "#if defined(ENCRYPTION)"
authorDave A. Borman <dab@ucbvax.Berkeley.EDU>
Fri, 21 May 1993 01:49:40 +0000 (17:49 -0800)
committerDave A. Borman <dab@ucbvax.Berkeley.EDU>
Fri, 21 May 1993 01:49:40 +0000 (17:49 -0800)
lines to "#ifdef ENCRYPTION".  This will allow unifdef
to be used to strip out the encryption code for
foreign exports.  This also fixes up the usage statement.

SCCS-vsn: usr.bin/telnet/authenc.c 5.3
SCCS-vsn: usr.bin/telnet/externs.h 5.7
SCCS-vsn: usr.bin/telnet/telnet.c 5.56
SCCS-vsn: usr.bin/telnet/network.c 5.4
SCCS-vsn: usr.bin/telnet/terminal.c 5.5
SCCS-vsn: usr.bin/telnet/ring.h 5.4
SCCS-vsn: usr.bin/telnet/main.c 5.6
SCCS-vsn: usr.bin/telnet/sys_bsd.c 5.5
SCCS-vsn: usr.bin/telnet/ring.c 5.4
SCCS-vsn: usr.bin/telnet/commands.c 5.12
SCCS-vsn: usr.bin/telnet/utilities.c 5.8

usr/src/usr.bin/telnet/authenc.c
usr/src/usr.bin/telnet/commands.c
usr/src/usr.bin/telnet/externs.h
usr/src/usr.bin/telnet/main.c
usr/src/usr.bin/telnet/network.c
usr/src/usr.bin/telnet/ring.c
usr/src/usr.bin/telnet/ring.h
usr/src/usr.bin/telnet/sys_bsd.c
usr/src/usr.bin/telnet/telnet.c
usr/src/usr.bin/telnet/terminal.c
usr/src/usr.bin/telnet/utilities.c

index 1312560..c917f1c 100644 (file)
@@ -9,7 +9,7 @@
 static char sccsid[] = "@(#)authenc.c  5.3 (Berkeley) %G%";
 #endif /* not lint */
 
 static char sccsid[] = "@(#)authenc.c  5.3 (Berkeley) %G%";
 #endif /* not lint */
 
-#if    defined(ENCRYPTION) || defined(AUTHENTICATION)
+#if    defined(AUTHENTICATION) || defined(ENCRYPTION)
 #include <sys/types.h>
 #include <arpa/telnet.h>
 #include <libtelnet/encrypt.h>
 #include <sys/types.h>
 #include <arpa/telnet.h>
 #include <libtelnet/encrypt.h>
@@ -38,12 +38,12 @@ net_write(str, len)
        void
 net_encrypt()
 {
        void
 net_encrypt()
 {
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
        if (encrypt_output)
                ring_encrypt(&netoring, encrypt_output);
        else
                ring_clearto(&netoring);
        if (encrypt_output)
                ring_encrypt(&netoring, encrypt_output);
        else
                ring_clearto(&netoring);
-#endif
+#endif /* ENCRYPTION */
 }
 
        int
 }
 
        int
@@ -82,4 +82,4 @@ telnet_gets(prompt, result, length, echo)
        TerminalNewMode(om);
        return(res);
 }
        TerminalNewMode(om);
        return(res);
 }
-#endif
+#endif /* defined(AUTHENTICATION) || defined(ENCRYPTION) */
index 9a9aaa6..1228fc8 100644 (file)
@@ -593,12 +593,12 @@ static int togglehelp P((void));
 #if    defined(AUTHENTICATION)
 extern int auth_togdebug P((int));
 #endif
 #if    defined(AUTHENTICATION)
 extern int auth_togdebug P((int));
 #endif
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
 extern int EncryptAutoEnc P((int));
 extern int EncryptAutoDec P((int));
 extern int EncryptDebug P((int));
 extern int EncryptVerbose P((int));
 extern int EncryptAutoEnc P((int));
 extern int EncryptAutoDec P((int));
 extern int EncryptDebug P((int));
 extern int EncryptVerbose P((int));
-#endif
+#endif /* ENCRYPTION */
 
 struct togglelist {
     char       *name;          /* name of toggle */
 
 struct togglelist {
     char       *name;          /* name of toggle */
@@ -631,7 +631,7 @@ static struct togglelist Togglelist[] = {
                0,
                     "print authentication debugging information" },
 #endif
                0,
                     "print authentication debugging information" },
 #endif
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
     { "autoencrypt",
        "automatic encryption of data stream",
            EncryptAutoEnc,
     { "autoencrypt",
        "automatic encryption of data stream",
            EncryptAutoEnc,
@@ -652,7 +652,7 @@ static struct togglelist Togglelist[] = {
            EncryptDebug,
                0,
                    "print encryption debugging information" },
            EncryptDebug,
                0,
                    "print encryption debugging information" },
-#endif
+#endif /* ENCRYPTION */
     { "skiprc",
        "don't read ~/.telnetrc file",
            0,
     { "skiprc",
        "don't read ~/.telnetrc file",
            0,
@@ -1270,9 +1270,9 @@ display(argc, argv)
        }
     }
 /*@*/optionstatus();
        }
     }
 /*@*/optionstatus();
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
     EncryptStatus();
     EncryptStatus();
-#endif
+#endif /* ENCRYPTION */
     return 1;
 #undef doset
 #undef dotog
     return 1;
 #undef doset
 #undef dotog
@@ -1424,7 +1424,7 @@ bye(argc, argv)
        resettermname = 1;
 #if    defined(AUTHENTICATION) || defined(ENCRYPTION)
        auth_encrypt_connect(connected);
        resettermname = 1;
 #if    defined(AUTHENTICATION) || defined(ENCRYPTION)
        auth_encrypt_connect(connected);
-#endif
+#endif /* defined(AUTHENTICATION) || defined(ENCRYPTION) */
        /* reset options */
        tninit();
 #if    defined(TN3270)
        /* reset options */
        tninit();
 #if    defined(TN3270)
@@ -1948,7 +1948,7 @@ auth_cmd(argc, argv)
 }
 #endif
 
 }
 #endif
 
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
 /*
  * The ENCRYPT command.
  */
 /*
  * The ENCRYPT command.
  */
@@ -2061,7 +2061,7 @@ encrypt_cmd(argc, argv)
                        argc > 1 ? argv[3] : 0,
                        argc > 2 ? argv[4] : 0));
 }
                        argc > 1 ? argv[3] : 0,
                        argc > 2 ? argv[4] : 0));
 }
-#endif
+#endif /* ENCRYPTION */
 
 #if    defined(unix) && defined(TN3270)
     static void
 
 #if    defined(unix) && defined(TN3270)
     static void
@@ -2128,9 +2128,9 @@ status(argc, argv)
            printf("%s character echo\n", (mode&MODE_ECHO) ? "Local" : "Remote");
            if (my_want_state_is_will(TELOPT_LFLOW))
                printf("%s flow control\n", (mode&MODE_FLOW) ? "Local" : "No");
            printf("%s character echo\n", (mode&MODE_ECHO) ? "Local" : "Remote");
            if (my_want_state_is_will(TELOPT_LFLOW))
                printf("%s flow control\n", (mode&MODE_FLOW) ? "Local" : "No");
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
            encrypt_display();
            encrypt_display();
-#endif
+#endif /* ENCRYPTION */
        }
     } else {
        printf("No connection.\n");
        }
     } else {
        printf("No connection.\n");
@@ -2387,7 +2387,7 @@ tn(argc, argv)
        connected++;
 #if    defined(AUTHENTICATION) || defined(ENCRYPTION)
        auth_encrypt_connect(connected);
        connected++;
 #if    defined(AUTHENTICATION) || defined(ENCRYPTION)
        auth_encrypt_connect(connected);
-#endif
+#endif /* defined(AUTHENTICATION) || defined(ENCRYPTION) */
     } while (connected == 0);
     cmdrc(hostp, hostname);
     if (autologin && user == NULL) {
     } while (connected == 0);
     cmdrc(hostp, hostname);
     if (autologin && user == NULL) {
@@ -2435,9 +2435,9 @@ static char
 #if    defined(AUTHENTICATION)
        authhelp[] =    "turn on (off) authentication ('auth ?' for more)",
 #endif
 #if    defined(AUTHENTICATION)
        authhelp[] =    "turn on (off) authentication ('auth ?' for more)",
 #endif
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
        encrypthelp[] = "turn on (off) encryption ('encrypt ?' for more)",
        encrypthelp[] = "turn on (off) encryption ('encrypt ?' for more)",
-#endif
+#endif /* ENCRYPTION */
 #if    defined(unix)
        zhelp[] =       "suspend telnet",
 #endif /* defined(unix) */
 #if    defined(unix)
        zhelp[] =       "suspend telnet",
 #endif /* defined(unix) */
@@ -2466,9 +2466,9 @@ static Command cmdtab[] = {
 #if    defined(AUTHENTICATION)
        { "auth",       authhelp,       auth_cmd,       0 },
 #endif
 #if    defined(AUTHENTICATION)
        { "auth",       authhelp,       auth_cmd,       0 },
 #endif
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
        { "encrypt",    encrypthelp,    encrypt_cmd,    0 },
        { "encrypt",    encrypthelp,    encrypt_cmd,    0 },
-#endif
+#endif /* ENCRYPTION */
 #if    defined(unix)
        { "z",          zhelp,          suspend,        0 },
 #endif /* defined(unix) */
 #if    defined(unix)
        { "z",          zhelp,          suspend,        0 },
 #endif /* defined(unix) */
index 7b3937b..1afb89c 100644 (file)
 
 #include <stdio.h>
 #include <setjmp.h>
 
 #include <stdio.h>
 #include <setjmp.h>
+#if defined(CRAY) && !defined(NO_BSD_SETJMP)
+#include <bsdsetjmp.h>
+#endif
 #ifndef        FILIO_H
 #include <sys/ioctl.h>
 #else
 #include <sys/filio.h>
 #endif
 #ifndef        FILIO_H
 #include <sys/ioctl.h>
 #else
 #include <sys/filio.h>
 #endif
+#ifdef CRAY
+# include <errno.h>
+#endif /* CRAY */
 #ifdef USE_TERMIO
 # ifndef       VINTR
 #  ifdef SYSV_TERMIO
 #ifdef USE_TERMIO
 # ifndef       VINTR
 #  ifdef SYSV_TERMIO
@@ -65,7 +71,9 @@ typedef unsigned char cc_t;
 
 #define        SUBBUFSIZE      256
 
 
 #define        SUBBUFSIZE      256
 
+#ifndef CRAY
 extern int errno;              /* outside this world */
 extern int errno;              /* outside this world */
+#endif /* !CRAY */
 
 #if    !defined(P)
 # ifdef        __STDC__
 
 #if    !defined(P)
 # ifdef        __STDC__
@@ -126,10 +134,10 @@ extern char
     wont[],
     options[],         /* All the little options */
     *hostname;         /* Who are we connected to? */
     wont[],
     options[],         /* All the little options */
     *hostname;         /* Who are we connected to? */
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
 extern void (*encrypt_output) P((unsigned char *, int));
 extern int (*decrypt_input) P((int));
 extern void (*encrypt_output) P((unsigned char *, int));
 extern int (*decrypt_input) P((int));
-#endif
+#endif /* ENCRYPTION */
 
 /*
  * We keep track of each side of the option negotiation.
 
 /*
  * We keep track of each side of the option negotiation.
index 2074e84..1efa552 100644 (file)
@@ -46,26 +46,26 @@ usage()
        fprintf(stderr, "Usage: %s %s%s%s%s\n",
            prompt,
 #ifdef AUTHENTICATION
        fprintf(stderr, "Usage: %s %s%s%s%s\n",
            prompt,
 #ifdef AUTHENTICATION
-           " [-8] [-E] [-K] [-L] [-X atype] [-a] [-d] [-e char] [-k realm]",
-           "\n\t[-l user] [-n tracefile] ",
+           "[-8] [-E] [-K] [-L] [-S tos] [-X atype] [-a] [-c] [-d] [-e char]",
+           "\n\t[-k realm] [-l user] [-n tracefile] ",
 #else
 #else
-           " [-8] [-E] [-L] [-a] [-d] [-e char] [-l user] [-n tracefile]",
-           "\n\t",
+           "[-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user]",
+           "\n\t[-n tracefile]",
 #endif
 #if defined(TN3270) && defined(unix)
 # ifdef AUTHENTICATION
 #endif
 #if defined(TN3270) && defined(unix)
 # ifdef AUTHENTICATION
-           "[-noasynch] [-noasynctty] [-noasyncnet]\n\t[-r] [-t transcom] ",
+           "[-noasynch] [-noasynctty]\n\t[-noasyncnet] [-r] [-t transcom] ",
 # else
 # else
-           "[-noasynch] [-noasynctty] [-noasyncnet] [-r] [-t transcom]\n\t",
+           "[-noasynch] [-noasynctty] [-noasyncnet] [-r]\n\t[-t transcom]",
 # endif
 #else
            "[-r] ",
 #endif
 #ifdef ENCRYPTION
            "[-x] [host-name [port]]"
 # endif
 #else
            "[-r] ",
 #endif
 #ifdef ENCRYPTION
            "[-x] [host-name [port]]"
-#else
+#else  /* ENCRYPTION */
            "[host-name [port]]"
            "[host-name [port]]"
-#endif
+#endif /* ENCRYPTION */
        );
        exit(1);
 }
        );
        exit(1);
 }
@@ -201,11 +201,11 @@ main(argc, argv)
 #ifdef ENCRYPTION
                        encrypt_auto(1);
                        decrypt_auto(1);
 #ifdef ENCRYPTION
                        encrypt_auto(1);
                        decrypt_auto(1);
-#else
+#else  /* ENCRYPTION */
                        fprintf(stderr,
                            "%s: Warning: -x ignored, no ENCRYPT support.\n",
                                                                prompt);
                        fprintf(stderr,
                            "%s: Warning: -x ignored, no ENCRYPT support.\n",
                                                                prompt);
-#endif
+#endif /* ENCRYPTION */
                        break;
                case '?':
                default:
                        break;
                case '?':
                default:
index 154a73d..c40ae1e 100644 (file)
@@ -102,10 +102,10 @@ netflush()
 {
     register int n, n1;
 
 {
     register int n, n1;
 
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
     if (encrypt_output)
        ring_encrypt(&netoring, encrypt_output);
     if (encrypt_output)
        ring_encrypt(&netoring, encrypt_output);
-#endif
+#endif /* ENCRYPTION */
     if ((n1 = n = ring_full_consecutive(&netoring)) > 0) {
        if (!ring_at_mark(&netoring)) {
            n = send(net, netoring.consume, n, 0);      /* normal write */
     if ((n1 = n = ring_full_consecutive(&netoring)) > 0) {
        if (!ring_at_mark(&netoring)) {
            n = send(net, netoring.consume, n, 0);      /* normal write */
index 64fa657..22d7e03 100644 (file)
@@ -86,9 +86,9 @@ Ring *ring;
 
     ring->top = ring->bottom+ring->size;
 
 
     ring->top = ring->bottom+ring->size;
 
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
     ring->clearto = 0;
     ring->clearto = 0;
-#endif
+#endif /* ENCRYPTION */
 
     return 1;
 }
 
     return 1;
 }
@@ -159,7 +159,7 @@ ring_consumed(ring, count)
                (ring_subtract(ring, ring->mark, ring->consume) < count)) {
        ring->mark = 0;
     }
                (ring_subtract(ring, ring->mark, ring->consume) < count)) {
        ring->mark = 0;
     }
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
     if (ring->consume < ring->clearto &&
                ring->clearto <= ring->consume + count)
        ring->clearto = 0;
     if (ring->consume < ring->clearto &&
                ring->clearto <= ring->consume + count)
        ring->clearto = 0;
@@ -167,7 +167,7 @@ ring_consumed(ring, count)
                ring->bottom <= ring->clearto &&
                ring->bottom + ((ring->consume + count) - ring->top))
        ring->clearto = 0;
                ring->bottom <= ring->clearto &&
                ring->bottom + ((ring->consume + count) - ring->top))
        ring->clearto = 0;
-#endif
+#endif /* ENCRYPTION */
     ring->consume = ring_increment(ring, ring->consume, count);
     ring->consumetime = ++ring_clock;
     /*
     ring->consume = ring_increment(ring, ring->consume, count);
     ring->consumetime = ++ring_clock;
     /*
@@ -299,7 +299,7 @@ ring_consume_data(ring, buffer, count)
 }
 #endif
 
 }
 #endif
 
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
     void
 ring_encrypt(ring, encryptor)
     Ring *ring;
     void
 ring_encrypt(ring, encryptor)
     Ring *ring;
@@ -333,4 +333,4 @@ ring_clearto(ring)
     else
        ring->clearto = 0;
 }
     else
        ring->clearto = 0;
 }
-#endif
+#endif /* ENCRYPTION */
index 39886ad..f0ccbd0 100644 (file)
@@ -33,10 +33,10 @@ typedef struct {
                        *bottom,        /* lowest address in buffer */
                        *top,           /* highest address+1 in buffer */
                        *mark;          /* marker (user defined) */
                        *bottom,        /* lowest address in buffer */
                        *top,           /* highest address+1 in buffer */
                        *mark;          /* marker (user defined) */
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
     unsigned char      *clearto;       /* Data to this point is clear text */
     unsigned char      *encryyptedto;  /* Data is encrypted to here */
     unsigned char      *clearto;       /* Data to this point is clear text */
     unsigned char      *encryyptedto;  /* Data is encrypted to here */
-#endif
+#endif /* ENCRYPTION */
     int                size;           /* size in bytes of buffer */
     u_long     consumetime,    /* help us keep straight full, empty, etc. */
                supplytime;
     int                size;           /* size in bytes of buffer */
     u_long     consumetime,    /* help us keep straight full, empty, etc. */
                supplytime;
@@ -68,11 +68,11 @@ extern int
        ring_full_count P((Ring *ring)),
        ring_full_consecutive P((Ring *ring));
 
        ring_full_count P((Ring *ring)),
        ring_full_consecutive P((Ring *ring));
 
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
 extern void
        ring_encrypt P((Ring *ring, void (*func)())),
        ring_clearto P((Ring *ring));
 extern void
        ring_encrypt P((Ring *ring, void (*func)())),
        ring_clearto P((Ring *ring));
-#endif
+#endif /* ENCRYPTION */
 
 extern void
     ring_clear_mark(),
 
 extern void
     ring_clear_mark(),
index c2840c9..5585e2d 100644 (file)
@@ -637,6 +637,8 @@ TerminalNewMode(f)
 #endif
     } else {
 #ifdef SIGINFO
 #endif
     } else {
 #ifdef SIGINFO
+       SIG_FUNC_RET ayt_status();
+
        (void) signal(SIGINFO, ayt_status);
 #endif SIGINFO
 #ifdef SIGTSTP
        (void) signal(SIGINFO, ayt_status);
 #endif SIGINFO
 #ifdef SIGTSTP
index b6239c1..302bf5f 100644 (file)
@@ -146,9 +146,9 @@ init_telnet()
     ClearArray(options);
 
     connected = In3270 = ISend = localflow = donebinarytoggle = 0;
     ClearArray(options);
 
     connected = In3270 = ISend = localflow = donebinarytoggle = 0;
-#if    defined(ENCRYPTION) || defined(AUTHENTICATION)
+#if    defined(AUTHENTICATION) || defined(ENCRYPTION) 
     auth_encrypt_connect(connected);
     auth_encrypt_connect(connected);
-#endif
+#endif /* defined(AUTHENTICATION) || defined(ENCRYPTION)  */
     restartany = -1;
 
     SYNCHing = 0;
     restartany = -1;
 
     SYNCHing = 0;
@@ -338,9 +338,9 @@ willoption(option)
 #if    defined(AUTHENTICATION)
            case TELOPT_AUTHENTICATION:
 #endif
 #if    defined(AUTHENTICATION)
            case TELOPT_AUTHENTICATION:
 #endif
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
            case TELOPT_ENCRYPT:
            case TELOPT_ENCRYPT:
-#endif
+#endif /* ENCRYPTION */
                new_state_ok = 1;
                break;
 
                new_state_ok = 1;
                break;
 
@@ -370,10 +370,10 @@ willoption(option)
            }
        }
        set_my_state_do(option);
            }
        }
        set_my_state_do(option);
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
        if (option == TELOPT_ENCRYPT)
                encrypt_send_support();
        if (option == TELOPT_ENCRYPT)
                encrypt_send_support();
-#endif
+#endif /* ENCRYPTION */
 }
 
        void
 }
 
        void
@@ -462,9 +462,9 @@ dooption(option)
            case TELOPT_TTYPE:          /* terminal type option */
            case TELOPT_SGA:            /* no big deal */
            case TELOPT_ENVIRON:        /* environment variable option */
            case TELOPT_TTYPE:          /* terminal type option */
            case TELOPT_SGA:            /* no big deal */
            case TELOPT_ENVIRON:        /* environment variable option */
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
            case TELOPT_ENCRYPT:        /* encryption variable option */
            case TELOPT_ENCRYPT:        /* encryption variable option */
-#endif
+#endif /* ENCRYPTION */
                new_state_ok = 1;
                break;
 #if    defined(AUTHENTICATION)
                new_state_ok = 1;
                break;
 #if    defined(AUTHENTICATION)
@@ -944,7 +944,7 @@ suboption()
        }
        break;
 #endif
        }
        break;
 #endif
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
        case TELOPT_ENCRYPT:
                if (SB_EOF())
                        return;
        case TELOPT_ENCRYPT:
                if (SB_EOF())
                        return;
@@ -1004,7 +1004,7 @@ suboption()
                        break;
                }
                break;
                        break;
                }
                break;
-#endif
+#endif /* ENCRYPTION */
     default:
        break;
     }
     default:
        break;
     }
@@ -1669,10 +1669,10 @@ telrcv()
        }
 
        c = *sbp++ & 0xff, scc--; count++;
        }
 
        c = *sbp++ & 0xff, scc--; count++;
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
        if (decrypt_input)
                c = (*decrypt_input)(c);
        if (decrypt_input)
                c = (*decrypt_input)(c);
-#endif
+#endif /* ENCRYPTION */
 
        switch (telrcv_state) {
 
 
        switch (telrcv_state) {
 
@@ -1697,10 +1697,10 @@ telrcv()
                *Ifrontp++ = c;
                while (scc > 0) {
                    c = *sbp++ & 0377, scc--; count++;
                *Ifrontp++ = c;
                while (scc > 0) {
                    c = *sbp++ & 0377, scc--; count++;
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
                    if (decrypt_input)
                        c = (*decrypt_input)(c);
                    if (decrypt_input)
                        c = (*decrypt_input)(c);
-#endif
+#endif /* ENCRYPTION */
                    if (c == IAC) {
                        telrcv_state = TS_IAC;
                        break;
                    if (c == IAC) {
                        telrcv_state = TS_IAC;
                        break;
@@ -1719,10 +1719,10 @@ telrcv()
            if ((c == '\r') && my_want_state_is_dont(TELOPT_BINARY)) {
                if (scc > 0) {
                    c = *sbp&0xff;
            if ((c == '\r') && my_want_state_is_dont(TELOPT_BINARY)) {
                if (scc > 0) {
                    c = *sbp&0xff;
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
                    if (decrypt_input)
                        c = (*decrypt_input)(c);
                    if (decrypt_input)
                        c = (*decrypt_input)(c);
-#endif
+#endif /* ENCRYPTION */
                    if (c == 0) {
                        sbp++, scc--; count++;
                        /* a "true" CR */
                    if (c == 0) {
                        sbp++, scc--; count++;
                        /* a "true" CR */
@@ -1732,10 +1732,10 @@ telrcv()
                        sbp++, scc--; count++;
                        TTYADD('\n');
                    } else {
                        sbp++, scc--; count++;
                        TTYADD('\n');
                    } else {
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
                        if (decrypt_input)
                            (*decrypt_input)(-1);
                        if (decrypt_input)
                            (*decrypt_input)(-1);
-#endif
+#endif /* ENCRYPTION */
 
                        TTYADD('\r');
                        if (crmod) {
 
                        TTYADD('\r');
                        if (crmod) {
@@ -2172,7 +2172,7 @@ telnet(user)
 {
     sys_telnet_init();
 
 {
     sys_telnet_init();
 
-#if defined(ENCRYPTION) || defined(AUTHENTICATION)
+#if    defined(AUTHENTICATION) || defined(ENCRYPTION) 
     {
        static char local_host[256] = { 0 };
 
     {
        static char local_host[256] = { 0 };
 
@@ -2183,17 +2183,17 @@ telnet(user)
        auth_encrypt_init(local_host, hostname, "TELNET", 0);
        auth_encrypt_user(user);
     }
        auth_encrypt_init(local_host, hostname, "TELNET", 0);
        auth_encrypt_user(user);
     }
-#endif
+#endif /* defined(AUTHENTICATION) || defined(ENCRYPTION)  */
 #   if !defined(TN3270)
     if (telnetport) {
 #if    defined(AUTHENTICATION)
        if (autologin)
                send_will(TELOPT_AUTHENTICATION, 1);
 #endif
 #   if !defined(TN3270)
     if (telnetport) {
 #if    defined(AUTHENTICATION)
        if (autologin)
                send_will(TELOPT_AUTHENTICATION, 1);
 #endif
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
        send_do(TELOPT_ENCRYPT, 1);
        send_will(TELOPT_ENCRYPT, 1);
        send_do(TELOPT_ENCRYPT, 1);
        send_will(TELOPT_ENCRYPT, 1);
-#endif
+#endif /* ENCRYPTION */
        send_do(TELOPT_SGA, 1);
        send_will(TELOPT_TTYPE, 1);
        send_will(TELOPT_NAWS, 1);
        send_do(TELOPT_SGA, 1);
        send_will(TELOPT_TTYPE, 1);
        send_will(TELOPT_NAWS, 1);
index c583a38..3d96ed0 100644 (file)
@@ -181,7 +181,7 @@ setconnmode(force)
 {
 #ifdef ENCRYPTION
     static int enc_passwd = 0;
 {
 #ifdef ENCRYPTION
     static int enc_passwd = 0;
-#endif
+#endif /* ENCRYPTION */
     register int newmode;
 
     newmode = getconnmode()|(force?MODE_FORCE:0);
     register int newmode;
 
     newmode = getconnmode()|(force?MODE_FORCE:0);
@@ -201,7 +201,7 @@ setconnmode(force)
            enc_passwd = 0;
        }
     }
            enc_passwd = 0;
        }
     }
-#endif
+#endif /* ENCRYPTION */
 
 }
 
 
 }
 
index 028c3e8..bc485c4 100644 (file)
@@ -456,7 +456,7 @@ printsub(direction, pointer, length)
            break;
 #endif
 
            break;
 #endif
 
-#if    defined(ENCRYPTION)
+#ifdef ENCRYPTION
        case TELOPT_ENCRYPT:
            fprintf(NetTrace, "ENCRYPT");
            if (length < 2) {
        case TELOPT_ENCRYPT:
            fprintf(NetTrace, "ENCRYPT");
            if (length < 2) {
@@ -525,7 +525,7 @@ printsub(direction, pointer, length)
                break;
            }
            break;
                break;
            }
            break;
-#endif
+#endif /* ENCRYPTION */
 
        case TELOPT_LINEMODE:
            fprintf(NetTrace, "LINEMODE ");
 
        case TELOPT_LINEMODE:
            fprintf(NetTrace, "LINEMODE ");