Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/telnet unifdef TN3270 which is never defined (and wo...



details:   https://anonhg.NetBSD.org/src/rev/3aa4288097b6
branches:  trunk
changeset: 446641:3aa4288097b6
user:      maya <maya%NetBSD.org@localhost>
date:      Thu Dec 13 04:49:19 2018 +0000

description:
unifdef TN3270 which is never defined (and wouldn't build if it was)
delete tn3270 file no longer needed.
SetIn3270(); expands to nothing now, so remove it.

No functional change.

diffstat:

 usr.bin/telnet/Makefile    |    4 +-
 usr.bin/telnet/commands.c  |   99 +-----------
 usr.bin/telnet/defines.h   |    8 +-
 usr.bin/telnet/externs.h   |   45 +-----
 usr.bin/telnet/main.c      |   38 +----
 usr.bin/telnet/sys_bsd.c   |   39 +----
 usr.bin/telnet/telnet.c    |  161 +------------------
 usr.bin/telnet/tn3270.c    |  394 ---------------------------------------------
 usr.bin/telnet/utilities.c |   18 +-
 9 files changed, 14 insertions(+), 792 deletions(-)

diffs (truncated from 1234 to 300 lines):

diff -r 313b1b4cce61 -r 3aa4288097b6 usr.bin/telnet/Makefile
--- a/usr.bin/telnet/Makefile   Thu Dec 13 04:41:41 2018 +0000
+++ b/usr.bin/telnet/Makefile   Thu Dec 13 04:49:19 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.53 2018/02/25 00:16:49 mrg Exp $
+#      $NetBSD: Makefile,v 1.54 2018/12/13 04:49:19 maya Exp $
 #
 # Copyright (c) 1990 The Regents of the University of California.
 # All rights reserved.
@@ -50,7 +50,7 @@
 DPADD+=        ${LIBTERMINFO} ${LIBTELNETDIR}/libtelnet.a
 
 SRCS=  authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \
-       terminal.c tn3270.c utilities.c
+       terminal.c utilities.c
 
 CPPFLAGS+=-I${NETBSDSRCDIR}/lib
 CPPFLAGS+=-DIPSEC
diff -r 313b1b4cce61 -r 3aa4288097b6 usr.bin/telnet/commands.c
--- a/usr.bin/telnet/commands.c Thu Dec 13 04:41:41 2018 +0000
+++ b/usr.bin/telnet/commands.c Thu Dec 13 04:49:19 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: commands.c,v 1.70 2016/10/04 14:36:11 joerg Exp $      */
+/*     $NetBSD: commands.c,v 1.71 2018/12/13 04:49:19 maya Exp $       */
 
 /*
  * Copyright (C) 1997 and 1998 WIDE Project.
@@ -63,7 +63,7 @@
 #if 0
 static char sccsid[] = "@(#)commands.c 8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: commands.c,v 1.70 2016/10/04 14:36:11 joerg Exp $");
+__RCSID("$NetBSD: commands.c,v 1.71 2018/12/13 04:49:19 maya Exp $");
 #endif
 #endif /* not lint */
 
@@ -160,9 +160,6 @@
 #ifdef AUTHENTICATION
 static int auth_help(char *);
 #endif
-#ifdef TN3270
-static void filestuff(int);
-#endif
 static int status(int, char *[]);
 static const char *sockaddr_ntop (struct sockaddr *);
 typedef int (*intrtn_t)(int, char **);
@@ -743,18 +740,6 @@
                &localchars,
                    "recognize certain control characters" },
     { " ", "", 0, NULL, NULL },                /* empty line */
-#ifdef TN3270
-    { "apitrace",
-       "(debugging) toggle tracing of API transactions",
-           0,
-               &apitrace,
-                   "trace API transactions" },
-    { "cursesdata",
-       "(debugging) toggle printing of hexadecimal curses data",
-           0,
-               &cursesdata,
-                   "print hexadecimal representation of curses data" },
-#endif /* defined(TN3270) */
     { "debug",
        "debugging",
            togdebug,
@@ -1355,7 +1340,6 @@
     return 1;
 }
 
-#ifndef TN3270
 /*ARGSUSED*/
 int
 shell(int argc, char *argv[])
@@ -1403,7 +1387,6 @@
     }
     return 1;
 }
-#endif /* !defined(TN3270) */
 
 /*VARARGS*/
 static int
@@ -1422,9 +1405,6 @@
 #endif /* defined(AUTHENTICATION) */
        /* reset options */
        tninit();
-#ifdef TN3270
-       SetIn3270();            /* Get out of 3270 mode */
-#endif /* defined(TN3270) */
     }
     if ((argc != 2) || (strcmp(argv[1], "fromquit") != 0)) {
        longjmp(toplevel, 1);
@@ -2035,35 +2015,6 @@
 }
 #endif /* ENCRYPTION */
 
-#ifdef TN3270
-static void
-filestuff(int fd)
-{
-    int res;
-
-    setconnmode(0);
-    res = fcntl(fd, F_GETOWN, 0);
-    setcommandmode();
-
-    if (res == -1) {
-       perror("fcntl");
-       return;
-    }
-    printf("\tOwner is %d.\n", res);
-
-    setconnmode(0);
-    res = fcntl(fd, F_GETFL, 0);
-    setcommandmode();
-
-    if (res == -1) {
-       perror("fcntl");
-       return;
-    }
-#ifdef notdef
-    printf("\tFlags are 0x%x: %s\n", res, decodeflags(res));
-#endif
-}
-#endif /* defined(TN3270) */
 
 /*
  * Print status about the connection.
@@ -2102,35 +2053,8 @@
     } else {
        printf("No connection.\n");
     }
-#   ifndef TN3270
     printf("Escape character is '%s'.\n", control(escape));
     (void) fflush(stdout);
-#   else /* !defined(TN3270) */
-    if ((!In3270) && ((argc < 2) || strcmp(argv[1], "notmuch"))) {
-       printf("Escape character is '%s'.\n", control(escape));
-    }
-    if ((argc >= 2) && !strcmp(argv[1], "everything")) {
-       printf("SIGIO received %d time%s.\n",
-                               sigiocount, (sigiocount == 1)? "":"s");
-       if (In3270) {
-           printf("Process ID %d, process group %d.\n",
-                                           getpid(), getpgrp());
-           printf("Terminal input:\n");
-           filestuff(tin);
-           printf("Terminal output:\n");
-           filestuff(tout);
-           printf("Network socket:\n");
-           filestuff(net);
-       }
-    }
-    if (In3270 && transcom) {
-       printf("Transparent mode command is '%s'.\n", transcom);
-    }
-    (void) fflush(stdout);
-    if (In3270) {
-       return 0;
-    }
-#   endif /* defined(TN3270) */
     return 1;
 }
 
@@ -2384,9 +2308,6 @@
        togglestring[] ="toggle operating parameters ('toggle ?' for more)",
        slchelp[] =     "change state of special characters ('slc ?' for more)",
        displayhelp[] = "display operating parameters",
-#ifdef TN3270
-       transcomhelp[] = "specify Unix command for transparent mode pipe",
-#endif /* defined(TN3270) */
 #ifdef AUTHENTICATION
        authhelp[] =    "turn on (off) authentication ('auth ?' for more)",
 #endif
@@ -2411,9 +2332,6 @@
        { "status",     statushelp,     status,         0 },
        { "toggle",     togglestring,   toggle,         0 },
        { "slc",        slchelp,        slccmd,         0 },
-#ifdef TN3270
-       { "transcom",   transcomhelp,   settranscom,    0 },
-#endif /* defined(TN3270) */
 #ifdef AUTHENTICATION
        { "auth",       authhelp,       auth_cmd,       0 },
 #endif
@@ -2421,11 +2339,7 @@
        { "encrypt",    encrypthelp,    encrypt_cmd,    0 },
 #endif
        { "z",          zhelp,          suspend,        0 },
-#ifdef TN3270
-       { "!",          shellhelp,      shell,          1 },
-#else
        { "!",          shellhelp,      shell,          0 },
-#endif
        { "environ",    envhelp,        env_cmd,        0 },
        { "?",          helphelp,       help,           0 },
        { NULL,         NULL,           NULL,           0 }
@@ -2503,9 +2417,6 @@
        getline:
            if (rlogin != _POSIX_VDISABLE)
                printf("%s> ", prompt);
-#ifdef TN3270
-           fflush(stdout);
-#endif
            if (fgets(line, sizeof(line), stdin) == NULL) {
                if (feof(stdin) || ferror(stdin)) {
                    (void) quit(0, NULL);
@@ -2542,13 +2453,7 @@
            longjmp(toplevel, 1);
            /*NOTREACHED*/
        }
-#ifdef TN3270
-       if (shell_active == 0) {
-           setconnmode(0);
-       }
-#else  /* defined(TN3270) */
        setconnmode(0);
-#endif /* defined(TN3270) */
     }
 }
 
diff -r 313b1b4cce61 -r 3aa4288097b6 usr.bin/telnet/defines.h
--- a/usr.bin/telnet/defines.h  Thu Dec 13 04:41:41 2018 +0000
+++ b/usr.bin/telnet/defines.h  Thu Dec 13 04:49:19 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: defines.h,v 1.8 2003/08/07 11:16:09 agc Exp $  */
+/*     $NetBSD: defines.h,v 1.9 2018/12/13 04:49:19 maya Exp $ */
 
 /*
  * Copyright (c) 1988, 1993
@@ -33,12 +33,6 @@
 
 #define        settimer(x)     clocks.x = clocks.system++
 
-#ifndef TN3270
-
-#define        SetIn3270()
-
-#endif /* !defined(TN3270) */
-
 #define        NETADD(c)       { *netoring.supply = (c); ring_supplied(&netoring, 1); }
 #define        NET2ADD(c1,c2)  { NETADD((c1)); NETADD((c2)); }
 #define        NETBYTES()      (ring_full_count(&netoring))
diff -r 313b1b4cce61 -r 3aa4288097b6 usr.bin/telnet/externs.h
--- a/usr.bin/telnet/externs.h  Thu Dec 13 04:41:41 2018 +0000
+++ b/usr.bin/telnet/externs.h  Thu Dec 13 04:49:19 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: externs.h,v 1.38 2016/10/04 14:35:38 joerg Exp $       */
+/*     $NetBSD: externs.h,v 1.39 2018/12/13 04:49:19 maya Exp $        */
 
 /*
  * Copyright (c) 1988, 1990, 1993
@@ -90,10 +90,6 @@
     crmod,
     netdata,           /* Print out network data flow */
     prettydump,                /* Print "netdata" output in user readable format */
-#ifdef TN3270
-    cursesdata,                /* Print out curses data flow */
-    apitrace,          /* Trace API transactions */
-#endif /* defined(TN3270) */
     termdata,          /* Print out terminal data flow */
     telnet_debug,      /* Debug level */
     doaddrlookup,      /* do a reverse address lookup? */
@@ -371,42 +367,3 @@
 # define termForw1Charp                &termForw1Char
 # define termForw2Charp                &termForw2Char
 # define termAytCharp          &termAytChar
-
-
-/* Tn3270 section */
-#if    defined(TN3270)
-
-extern int
-    HaveInput,         /* Whether an asynchronous I/O indication came in */
-    noasynchtty,       /* Don't do signals on I/O (SIGURG, SIGIO) */
-    noasynchnet,       /* Don't do signals on I/O (SIGURG, SIGIO) */
-    sigiocount,                /* Count of SIGIO receptions */
-    shell_active;      /* Subshell is active */
-
-extern char
-    *Ibackp,           /* Oldest byte of 3270 data */
-    Ibuf[],            /* 3270 buffer */
-    *Ifrontp,          /* Where next 3270 byte goes */
-    tline[200],
-    *transcom;         /* Transparent command */
-
-/* tn3270.c */
-void init_3270(void);
-int DataToNetwork(char *, int, int);
-void inputAvailable(int);
-void outputPurge(void);
-int DataToTerminal(char *, int);
-int Push3270(void);
-void Finish3270(void);
-void StringToTerminal(char *);
-int _putchar(int);
-void SetIn3270(void);
-int tn3270_ttype(void);
-int settranscom(int, char *[]);
-int shell_continue(void);
-int DataFromTerminal(char *, int);
-int DataFromNetwork(char *, int, int);



Home | Main Index | Thread Index | Old Index