Source-Changes-HG archive

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

[src/trunk]: src/libexec/telnetd Don't play #define games with extern, just h...



details:   https://anonhg.NetBSD.org/src/rev/887fe6aa0cf9
branches:  trunk
changeset: 971378:887fe6aa0cf9
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Apr 23 00:03:40 2020 +0000

description:
Don't play #define games with extern, just have a separate list to avoid commons

diffstat:

 libexec/telnetd/ext.h    |   4 +-
 libexec/telnetd/global.c |  51 +++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 50 insertions(+), 5 deletions(-)

diffs (88 lines):

diff -r 40867b785327 -r 887fe6aa0cf9 libexec/telnetd/ext.h
--- a/libexec/telnetd/ext.h     Wed Apr 22 23:57:56 2020 +0000
+++ b/libexec/telnetd/ext.h     Thu Apr 23 00:03:40 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ext.h,v 1.22 2012/01/10 23:39:11 joerg Exp $   */
+/*     $NetBSD: ext.h,v 1.23 2020/04/23 00:03:40 joerg Exp $   */
 
 /*
  * Copyright (c) 1989, 1993
@@ -179,7 +179,7 @@
  * The following are some clocks used to decide how to interpret
  * the relationship between various variables.
  */
-extern struct {
+extern struct clockstate {
     int
        system,                 /* what the current time is */
        echotoggle,             /* last time user entered echo character */
diff -r 40867b785327 -r 887fe6aa0cf9 libexec/telnetd/global.c
--- a/libexec/telnetd/global.c  Wed Apr 22 23:57:56 2020 +0000
+++ b/libexec/telnetd/global.c  Thu Apr 23 00:03:40 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: global.c,v 1.8 2003/08/07 09:46:51 agc Exp $   */
+/*     $NetBSD: global.c,v 1.9 2020/04/23 00:03:40 joerg Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)global.c   8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: global.c,v 1.8 2003/08/07 09:46:51 agc Exp $");
+__RCSID("$NetBSD: global.c,v 1.9 2020/04/23 00:03:40 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -47,5 +47,50 @@
  */
 
 #include <defs.h>
-#define extern
 #include <ext.h>
+
+char   options[256];
+char   do_dont_resp[256];
+char   will_wont_resp[256];
+int    linemode;       /* linemode on/off */
+#ifdef LINEMODE
+int    uselinemode;    /* what linemode to use (on/off) */
+int    editmode;       /* edit modes in use */
+int    useeditmode;    /* edit modes to use */
+int    alwayslinemode; /* command line option */
+# ifdef        KLUDGELINEMODE
+int    lmodetype;      /* Client support for linemode */
+# endif        /* KLUDGELINEMODE */
+#endif /* LINEMODE */
+int    flowmode;       /* current flow control state */
+int    restartany;     /* restart output on any character state */
+#ifdef DIAGNOSTICS
+int    diagnostic;     /* telnet diagnostic capabilities */
+#endif /* DIAGNOSTICS */
+#ifdef SECURELOGIN
+int    require_secure_login;
+#endif
+#ifdef AUTHENTICATION
+int    auth_level;
+#endif
+
+slcfun slctab[NSLC + 1];       /* slc mapping table */
+char   terminaltype[41];
+
+/*
+ * I/O data buffers, pointers, and counters.
+ */
+char   ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp;
+char   netibuf[BUFSIZ], *netip;
+char   netobuf[BUFSIZ+NETSLOP], *nfrontp, *nbackp;
+char   *neturg;                /* one past last bye of urgent data */
+int    pcc, ncc;
+int    pty, net;
+char   *line;
+int    SYNCHing;               /* we are in TELNET SYNCH mode */
+
+#ifdef ENCRYPTION
+char   *nclearto;
+#endif /* ENCRYPTION */
+
+struct clockstate clocks;



Home | Main Index | Thread Index | Old Index