Lint (and, maybe, copyrights).
authorGregory Minshall <minshall@ucbvax.Berkeley.EDU>
Mon, 29 Aug 1988 08:58:03 +0000 (00:58 -0800)
committerGregory Minshall <minshall@ucbvax.Berkeley.EDU>
Mon, 29 Aug 1988 08:58:03 +0000 (00:58 -0800)
SCCS-vsn: usr.bin/tn3270/ctlr/makefile 3.6
SCCS-vsn: usr.bin/tn3270/ctlr/inbound.c 3.5
SCCS-vsn: usr.bin/tn3270/ctlr/outbound.c 3.4
SCCS-vsn: usr.bin/tn3270/ctlr/options.c 3.4
SCCS-vsn: usr.bin/tn3270/ctlr/api.h 3.5
SCCS-vsn: usr.bin/tn3270/ctlr/api.c 3.3
SCCS-vsn: usr.bin/tn3270/ctlr/externs.h 1.2
SCCS-vsn: usr.bin/tn3270/ctlr/declare.h 1.2

usr/src/usr.bin/tn3270/ctlr/api.c
usr/src/usr.bin/tn3270/ctlr/api.h
usr/src/usr.bin/tn3270/ctlr/declare.h
usr/src/usr.bin/tn3270/ctlr/externs.h
usr/src/usr.bin/tn3270/ctlr/inbound.c
usr/src/usr.bin/tn3270/ctlr/makefile
usr/src/usr.bin/tn3270/ctlr/options.c
usr/src/usr.bin/tn3270/ctlr/outbound.c

index 2a6430a..effb027 100644 (file)
@@ -3,15 +3,20 @@
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of California at Berkeley. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)api.c      3.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)api.c      3.3 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -47,11 +52,12 @@ static void movetothem(int, int, char *, int);
 static void
 movetous(parms, es, di, length)
 char *parms;
 static void
 movetous(parms, es, di, length)
 char *parms;
-int es, di, length;
+int es, di;
+int length;
 {
     char far *farparms = parms;
 
 {
     char far *farparms = parms;
 
-    movedata(es, di, (int) FP_SEG(farparms), (int) FP_OFF(farparms), length);
+    movedata(es, di, FP_SEG(farparms), FP_OFF(farparms), length);
 }
 
 static void
 }
 
 static void
@@ -62,12 +68,13 @@ int length;
 {
     char far *farparms = parms;
 
 {
     char far *farparms = parms;
 
-    movedata((int) FP_SEG(farparms), (int) FP_OFF(farparms), es, di, length);
+    movedata(FP_SEG(farparms), FP_OFF(farparms), es, di, length);
 }
 #endif /* defined(MSDOS) */
 
 #if    defined(unix)
 }
 #endif /* defined(MSDOS) */
 
 #if    defined(unix)
-extern char *access_api(), *unaccess_api();
+extern char *access_api();
+extern void movetous(), movetothem(), unaccess_api();
 #endif /* defined(unix) */
 
 
 #endif /* defined(unix) */
 
 
@@ -122,10 +129,9 @@ struct SREGS *sregs;
        parms.rc = 0x0b;
     } else {
        NameArray list;
        parms.rc = 0x0b;
     } else {
        NameArray list;
-       NameArrayElement element;
 
        movetous((char *)&list, FP_SEG(parms.name_array),
 
        movetous((char *)&list, FP_SEG(parms.name_array),
-                           FP_OFF(parms.name_array), sizeof list);
+                   FP_OFF(parms.name_array), sizeof list);
        if ((list.length < 14) || (list.length > 170)) {
            parms.rc = 0x12;
        } else {
        if ((list.length < 14) || (list.length > 170)) {
            parms.rc = 0x12;
        } else {
@@ -282,9 +288,10 @@ struct SREGS *sregs;
                todo;
 
            movetous((char *)&list, FP_SEG(atlist),
                todo;
 
            movetous((char *)&list, FP_SEG(atlist),
-                               FP_OFF(atlist), sizeof *atlist);
+                       FP_OFF(atlist), sizeof *atlist);
            todo = list.length/2;
            ourentry = entry+(highestof(entry)+1);
            todo = list.length/2;
            ourentry = entry+(highestof(entry)+1);
+           theirentry = &atlist->keystrokes;
 
            while (todo) {
                if (ourentry > &entry[highestof(entry)]) {
 
            while (todo) {
                if (ourentry > &entry[highestof(entry)]) {
@@ -433,7 +440,7 @@ int what_is_user;
            *output++ = *input++;
        }
        if (needtodo&TARGET_NO_EAB) {
            *output++ = *input++;
        }
        if (needtodo&TARGET_NO_EAB) {
-           *input++;
+           input++;
        } else if (needtodo&SOURCE_NO_EAB) {
            *output++ = 0;              /* Should figure out good EAB? */
        }
        } else if (needtodo&SOURCE_NO_EAB) {
            *output++ = 0;              /* Should figure out good EAB? */
        }
@@ -476,8 +483,8 @@ struct SREGS *sregs;
                    if (source->characteristics&CHARACTERISTIC_EAB) {
                        length *= 2;
                    }
                    if (source->characteristics&CHARACTERISTIC_EAB) {
                        length *= 2;
                    }
-                   movetothem( (int) FP_SEG(target->buffer),
-                           (int) FP_OFF(target->buffer),
+                   movetothem(FP_SEG(target->buffer),
+                           FP_OFF(target->buffer),
                            (char *)&Host[source->begin], length);
                } else {
                    copy_subroutine(target, source, &parms,
                            (char *)&Host[source->begin], length);
                } else {
                    copy_subroutine(target, source, &parms,
@@ -501,8 +508,8 @@ struct SREGS *sregs;
                    length *= 2;
                }
                movetous((char *)&Host[target->begin],
                    length *= 2;
                }
                movetous((char *)&Host[target->begin],
-                           (int) FP_SEG(source->buffer),
-                           (int) FP_OFF(source->buffer), length);
+                           FP_SEG(source->buffer),
+                           FP_OFF(source->buffer), length);
            } else {
                copy_subroutine(target, source, &parms, USER_IS_SOURCE, length);
            }
            } else {
                copy_subroutine(target, source, &parms, USER_IS_SOURCE, length);
            }
@@ -553,6 +560,7 @@ struct SREGS *sregs;
     movetothem(sregs->es, regs->x.di, (char *)&parms, sizeof parms);
 }
 \f
     movetothem(sregs->es, regs->x.di, (char *)&parms, sizeof parms);
 }
 \f
+/*ARGSUSED*/
 static void
 unknown_op(regs, sregs)
 union REGS *regs;
 static void
 unknown_op(regs, sregs)
 union REGS *regs;
index 819981d..758f55c 100644 (file)
@@ -14,7 +14,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- *     @(#)api.h       3.4 (Berkeley) %G%
+ *     @(#)api.h       3.5 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -172,7 +172,7 @@ typedef struct {
        function_id,
        session_id,
        reserved;
        function_id,
        session_id,
        reserved;
-    int
+    short
        event_queue_id,
        input_queue_id;
     char
        event_queue_id,
        input_queue_id;
     char
@@ -186,18 +186,18 @@ typedef struct {
        function_id,
        session_id,
        reserved;
        function_id,
        session_id,
        reserved;
-    int
+    short
        connectors_task_id;
 } DisconnectFromKeyboardParms;
 
 typedef struct {
        connectors_task_id;
 } DisconnectFromKeyboardParms;
 
 typedef struct {
-    char
+    unsigned char
        scancode,
        shift_state;
 } KeystrokeEntry;
 
 typedef struct {
        scancode,
        shift_state;
 } KeystrokeEntry;
 
 typedef struct {
-    int
+    short
        length;                 /* Length (in bytes) of list */
     KeystrokeEntry keystrokes; /* Variable size */
 } KeystrokeList;
        length;                 /* Length (in bytes) of list */
     KeystrokeEntry keystrokes; /* Variable size */
 } KeystrokeList;
@@ -208,7 +208,7 @@ typedef struct {
        function_id,
        session_id,
        reserved;
        function_id,
        session_id,
        reserved;
-    int
+    short
        connectors_task_id;
     char
        options,
        connectors_task_id;
     char
        options,
@@ -230,7 +230,7 @@ typedef struct {
        function_id,
        session_id,
        reserved;
        function_id,
        session_id,
        reserved;
-    int
+    short
        connectors_task_id;
 } DisableInputParms;
 
        connectors_task_id;
 } DisableInputParms;
 
@@ -245,7 +245,7 @@ typedef struct {
     char
        characteristics,
        session_type;
     char
        characteristics,
        session_type;
-    int
+    short
        begin;                  /* Offset within buffer */
 } BufferDescriptor;
     
        begin;                  /* Offset within buffer */
 } BufferDescriptor;
     
@@ -255,7 +255,7 @@ typedef struct {
        function_id;
     BufferDescriptor
        source;
        function_id;
     BufferDescriptor
        source;
-    int
+    short
        source_end;             /* Offset within source buffer */
     BufferDescriptor
        target;
        source_end;             /* Offset within source buffer */
     BufferDescriptor
        target;
@@ -304,8 +304,14 @@ typedef struct {
  * a dos system.
  */
 
  * a dos system.
  */
 
-#define        FP_SEG(x)       (x)
-#define        FP_OFF(y)       (y)
+#define        FP_SEG(x)       ((unsigned int)(((unsigned long)(x))>>16))
+#define        FP_OFF(y)       ((unsigned int)(((unsigned long)(y))&0xFFFF))
+
+/*
+ * Undo the preceeding.
+ */
+
+#define        SEG_OFF_BACK(x,y)       (((x)<<16)|(y))
 
 /*
  * Now, it is somewhat of a pain, but we need to keep
 
 /*
  * Now, it is somewhat of a pain, but we need to keep
@@ -315,7 +321,7 @@ typedef struct {
 
 struct highlow {
     unsigned char
 
 struct highlow {
     unsigned char
-#if    defined(vax)
+#if    defined(vax) || defined(ns32000)
        al,
        ah,
        bl,
        al,
        ah,
        bl,
@@ -324,7 +330,7 @@ struct highlow {
        ch,
        dl,
        dh;
        ch,
        dl,
        dh;
-#endif /* defined(vax) */
+#endif /* defined(vax) || defined(ns32000) */ 
 #if    defined(sun) || defined(tahoe) || defined(ibm032) || defined(pyr)
        ah,
        al,
 #if    defined(sun) || defined(tahoe) || defined(ibm032) || defined(pyr)
        ah,
        al,
@@ -334,7 +340,7 @@ struct highlow {
        cl,
        dh,
        dl;
        cl,
        dh,
        dl;
-#endif /* defined(sun) || defined(tahoe) || defined(ibm032) */
+#endif /* defined(sun) || defined(tahoe) || defined(ibm032) || defined(pyr) */
 };
 
 struct words {
 };
 
 struct words {
@@ -343,7 +349,7 @@ struct words {
        bx,
        cx,
        dx;
        bx,
        cx,
        dx;
-    unsigned int
+    unsigned short
        si,
        di;
 };
        si,
        di;
 };
@@ -354,7 +360,7 @@ union REGS {
 };
 
 struct SREGS {
 };
 
 struct SREGS {
-    unsigned int
+    unsigned short
        cs,
        ds,
        es,
        cs,
        ds,
        es,
index 7bd1fde..5ab4b8a 100644 (file)
@@ -1,5 +1,7 @@
 /*
  * Declarations of routines from the controller.
 /*
  * Declarations of routines from the controller.
+ *
+ *     @(#)declare.h   1.2 (Berkeley) %G%
  */
 
 extern void
  */
 
 extern void
index c5d023e..53c2de9 100644 (file)
@@ -1,5 +1,7 @@
 /*
  * External references from the controller.
 /*
  * External references from the controller.
+ *
+ *     @(#)externs.h   1.2 (Berkeley) %G%
  */
 
 #if    !defined(MSDOS)
  */
 
 #if    !defined(MSDOS)
@@ -7,16 +9,25 @@ extern char *access_api();
 extern void movetous(), movetothem(), unaccess_api();
 #endif /* !defined(MSDOS) */
 
 extern void movetous(), movetothem(), unaccess_api();
 #endif /* !defined(MSDOS) */
 
+extern unsigned char
+       *memNSchr();    /* Search for a character ANDED, increment by stride */
+
 extern int
 extern int
-       TransparentClock,
+       DataToNetwork(),
        OutputClock,
        OutputClock,
+       suspend(),
+       TransparentClock,
        UnLocked;               /* keyboard is UnLocked? */
        UnLocked;               /* keyboard is UnLocked? */
+
 extern void
 extern void
+       command(),
        ConnectScreen(),
        ConnectScreen(),
+       ExitString(),
        init_inbound(),
        LocalClearScreen(),
        RefreshScreen(),
        RingBell(),
        init_inbound(),
        LocalClearScreen(),
        RefreshScreen(),
        RingBell(),
+       setconnmode(),
        StopScreen(),
        TransOut(),
        TransStop();
        StopScreen(),
        TransOut(),
        TransStop();
index 103ee2c..3f054e4 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)inbound.c  3.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)inbound.c  3.5 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <stdio.h>
 #endif /* not lint */
 
 #include <stdio.h>
@@ -32,9 +32,8 @@ static char sccsid[] = "@(#)inbound.c 3.4 (Berkeley) %G%";
 #include "../api/ebc_disp.h"
 
 #include "../general/globals.h"
 #include "../api/ebc_disp.h"
 
 #include "../general/globals.h"
-#include "inbound.ext"
-#include "outbound.ext"
-#include "../telnet.ext"
+#include "externs.h"
+#include "declare.h"
 
 #define EmptyChar()    (ourPTail == ourPHead)
 #define FullChar()     (ourPHead == ourBuffer+sizeof ourBuffer)
 
 #define EmptyChar()    (ourPTail == ourPHead)
 #define FullChar()     (ourPHead == ourBuffer+sizeof ourBuffer)
@@ -65,7 +64,9 @@ static int    HadAid;                 /* Had an AID haven't sent */
 
 static int InsertMode;                 /* is the terminal in insert mode? */
 
 
 static int InsertMode;                 /* is the terminal in insert mode? */
 
-static int rememberedshiftstate;       /* Shift (alt) state of terminal */
+static unsigned int
+       rememberedshiftstate;   /* Shift (alt) state of terminal */
+
 #   define HITNUM(s) ((((s)&(SHIFT_CAPS|SHIFT_UPSHIFT))? 1:0) \
                        + ((((s)&SHIFT_ALT)? 1:0)<<1))
 
 #   define HITNUM(s) ((((s)&(SHIFT_CAPS|SHIFT_UPSHIFT))? 1:0) \
                        + ((((s)&SHIFT_ALT)? 1:0)<<1))
 
@@ -229,7 +230,7 @@ register int        where,          /* Where to start deleting from */
        if (IsStartField(from)) {
            AddHost(i, 0);              /* Stick the edge at the start field */
        } else {
        if (IsStartField(from)) {
            AddHost(i, 0);              /* Stick the edge at the start field */
        } else {
-           AddHost(i, GetHost(from));
+           AddHost(i, (char)GetHost(from));
            from = ScreenInc(from);             /* Move the edge */
        }
        i = ScreenInc(i);
            from = ScreenInc(from);             /* Move the edge */
        }
        i = ScreenInc(i);
@@ -346,7 +347,7 @@ char        character;
 
            sprintf(buffer, "File %s, line %d:  No room in network buffer!\n",
                                __FILE__, __LINE__);
 
            sprintf(buffer, "File %s, line %d:  No room in network buffer!\n",
                                __FILE__, __LINE__);
-           ExitString(stderr, buffer, 1);
+           ExitString(buffer, 1);
            /*NOTREACHED*/
        }
     }
            /*NOTREACHED*/
        }
     }
@@ -373,16 +374,16 @@ SendUnformatted()
                Nulls--;
                AddChar(EBCDIC_BLANK);          /* put in blanks */
            }
                Nulls--;
                AddChar(EBCDIC_BLANK);          /* put in blanks */
            }
-           AddChar(disp_ebc[c]);
+           AddChar((char)disp_ebc[c]);
        }
        i = ScreenInc(i);
     } while (i != j);
 }
 
 static
        }
        i = ScreenInc(i);
     } while (i != j);
 }
 
 static
-SendField(i, command)
+SendField(i, cmd)
 register int i;                        /* where we saw MDT bit */
 register int i;                        /* where we saw MDT bit */
-int    command;                /* The command code (type of read) */
+int    cmd;                    /* The command code (type of read) */
 {
     register int j;
     register int k;
 {
     register int j;
     register int k;
@@ -394,7 +395,7 @@ int command;                /* The command code (type of read) */
 
                /* On a test_request_read, don't send sba and address */
     if ((AidByte != AID_TREQ)
 
                /* On a test_request_read, don't send sba and address */
     if ((AidByte != AID_TREQ)
-                       || (command == CMD_SNA_READ_MODIFIED_ALL)) {
+                       || (cmd == CMD_SNA_READ_MODIFIED_ALL)) {
        AddChar(ORDER_SBA);             /* set start field */
        AddChar(BufferTo3270_0(j));     /* set address of this field */
        AddChar(BufferTo3270_1(j));
        AddChar(ORDER_SBA);             /* set start field */
        AddChar(BufferTo3270_0(j));     /* set address of this field */
        AddChar(BufferTo3270_1(j));
@@ -405,7 +406,7 @@ int command;                /* The command code (type of read) */
                 * selector pen.
                 */
     if ((AidByte != AID_SELPEN)
                 * selector pen.
                 */
     if ((AidByte != AID_SELPEN)
-                       || (command == CMD_SNA_READ_MODIFIED_ALL)) {
+                       || (cmd == CMD_SNA_READ_MODIFIED_ALL)) {
        if (!IsStartField(j)) {
            Nulls = 0;
            k = ScreenInc(WhereHighByte(j));
        if (!IsStartField(j)) {
            Nulls = 0;
            k = ScreenInc(WhereHighByte(j));
@@ -418,7 +419,7 @@ int command;                /* The command code (type of read) */
                        Nulls--;
                        AddChar(EBCDIC_BLANK);          /* put in blanks */
                    }
                        Nulls--;
                        AddChar(EBCDIC_BLANK);          /* put in blanks */
                    }
-                   AddChar(disp_ebc[c]);
+                   AddChar((char)disp_ebc[c]);
                }
                j = ScreenInc(j);
            } while ((j != k) && (j != i));
                }
                j = ScreenInc(j);
            } while ((j != k) && (j != i));
@@ -431,8 +432,8 @@ int command;                /* The command code (type of read) */
 \f
 /* Various types of reads... */
 void
 \f
 /* Various types of reads... */
 void
-DoReadModified(command)
-int    command;                        /* The command sent */
+DoReadModified(cmd)
+int    cmd;                    /* The command sent */
 {
     register int i, j;
 
 {
     register int i, j;
 
@@ -451,9 +452,9 @@ int command;                        /* The command sent */
     }
     if (((AidByte != AID_PA1) && (AidByte != AID_PA2)
            && (AidByte != AID_PA3) && (AidByte != AID_CLEAR))
     }
     if (((AidByte != AID_PA1) && (AidByte != AID_PA2)
            && (AidByte != AID_PA3) && (AidByte != AID_CLEAR))
-           || (command == CMD_SNA_READ_MODIFIED_ALL)) {
+           || (cmd == CMD_SNA_READ_MODIFIED_ALL)) {
        if ((AidByte != AID_TREQ)
        if ((AidByte != AID_TREQ)
-           || (command == CMD_SNA_READ_MODIFIED_ALL)) {
+           || (cmd == CMD_SNA_READ_MODIFIED_ALL)) {
                /* Test request read_modified doesn't give cursor address */
            AddChar(BufferTo3270_0(CursorAddress));
            AddChar(BufferTo3270_1(CursorAddress));
                /* Test request read_modified doesn't give cursor address */
            AddChar(BufferTo3270_0(CursorAddress));
            AddChar(BufferTo3270_1(CursorAddress));
@@ -465,7 +466,7 @@ int command;                        /* The command sent */
        } else {
            do {
                if (HasMdt(i)) {
        } else {
            do {
                if (HasMdt(i)) {
-                   i = SendField(i, command);
+                   i = SendField(i, cmd);
                } else {
                    i = FieldInc(i);
                }
                } else {
                    i = FieldInc(i);
                }
@@ -499,7 +500,7 @@ DoReadBuffer()
            AddChar(ORDER_SF);
            AddChar(BufferTo3270_1(FieldAttributes(i)));
        } else {
            AddChar(ORDER_SF);
            AddChar(BufferTo3270_1(FieldAttributes(i)));
        } else {
-           AddChar(disp_ebc[GetHost(i)]);
+           AddChar((char)disp_ebc[GetHost(i)]);
        }
        i = ScreenInc(i);
     } while (i != j);
        }
        i = ScreenInc(i);
     } while (i != j);
@@ -579,7 +580,7 @@ int insert;         /* are we in insert mode? */
        } else {
            for (j = ScreenDec(i); i != CursorAddress;
                            j = ScreenDec(j), i = ScreenDec(i)) {
        } else {
            for (j = ScreenDec(i); i != CursorAddress;
                            j = ScreenDec(j), i = ScreenDec(i)) {
-               AddHost(i, GetHost(j));
+               AddHost(i, (char)GetHost(j));
            }
        }
     }
            }
        }
     }
@@ -606,7 +607,7 @@ int insert;         /* are we in insert mode? */
 
 int
 AcceptKeystroke(scancode, shiftstate)
 
 int
 AcceptKeystroke(scancode, shiftstate)
-int
+unsigned int
     scancode,                  /* 3270 scancode */
     shiftstate;                        /* The shift state */
 {
     scancode,                  /* 3270 scancode */
     shiftstate;                        /* The shift state */
 {
@@ -616,7 +617,7 @@ int
     enum ctlrfcn ctlrfcn;
 
     if (scancode >= numberof(hits)) {
     enum ctlrfcn ctlrfcn;
 
     if (scancode >= numberof(hits)) {
-       ExitString(stderr,
+       ExitString(
                "Unknown scancode encountered in AcceptKeystroke.\n", 1);
        /*NOTREACHED*/
     }
                "Unknown scancode encountered in AcceptKeystroke.\n", 1);
        /*NOTREACHED*/
     }
@@ -1137,8 +1138,7 @@ int               count;                  /* how much data there is */
 
     while (count) {
        if (*buffer >= numberof(hits)) {
 
     while (count) {
        if (*buffer >= numberof(hits)) {
-           ExitString(stderr,
-                       "Unknown scancode encountered in DataFrom3270.\n", 1);
+           ExitString("Unknown scancode encountered in DataFrom3270.\n", 1);
            /*NOTREACHED*/
        }
 
            /*NOTREACHED*/
        }
 
index 65135bc..013b33c 100644 (file)
@@ -14,7 +14,7 @@
 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
-#      @(#)makefile    3.5 (Berkeley) %G%
+#      @(#)makefile    3.6 (Berkeley) %G%
 #
 # msdos versus unix defines
 O      = .o
 #
 # msdos versus unix defines
 O      = .o
@@ -73,8 +73,8 @@ KBD   = 3270pc.kbd
 KBD    = unix.kbd
 
 # The source files...
 KBD    = unix.kbd
 
 # The source files...
-ALLH = api.h function.h hostctlr.h inbound.ext oia.h \
-       options.ext options.h outbound.ext screen.h scrnctlr.h
+ALLH = api.h declare.h externs.h function.h hostctlr.h oia.h \
+       options.h screen.h scrnctlr.h
 
 ALLC = api.c function.c inbound.c oia.c options.c outbound.c
 
 
 ALLC = api.c function.c inbound.c oia.c options.c outbound.c
 
@@ -164,9 +164,8 @@ api$O: ../general/globals.h
 function$O: function.h
 inbound$O: ../general/general.h function.h hostctlr.h oia.h scrnctlr.h screen.h
 inbound$O: options.h ../api/dctype.h ../api/ebc_disp.h ../general/globals.h
 function$O: function.h
 inbound$O: ../general/general.h function.h hostctlr.h oia.h scrnctlr.h screen.h
 inbound$O: options.h ../api/dctype.h ../api/ebc_disp.h ../general/globals.h
-inbound$O: inbound.ext outbound.ext ../telnet.ext kbd.out
+inbound$O: externs.h declare.h kbd.out
 oia$O: ../general/general.h oia.h ../general/globals.h
 oia$O: ../general/general.h oia.h ../general/globals.h
-options$O: options.h ../general/globals.h options.ext
+options$O: options.h ../general/globals.h declare.h
 outbound$O: ../general/general.h hostctlr.h oia.h screen.h ../api/ebc_disp.h
 outbound$O: ../general/general.h hostctlr.h oia.h screen.h ../api/ebc_disp.h
-outbound$O: ../general/globals.h options.ext ../telnet.ext inbound.ext
-outbound$O: outbound.ext ../general/bsubs.ext
+outbound$O: ../general/globals.h externs.h declare.h
index 60224f3..70ea8ef 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)options.c  3.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)options.c  3.4 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -27,7 +27,7 @@ static char sccsid[] = "@(#)options.c 3.3 (Berkeley) %G%";
 #include "options.h"
 
 #include "../general/globals.h"
 #include "options.h"
 
 #include "../general/globals.h"
-#include "options.ext"
+#include "declare.h"
 
 void
 OptInit()
 
 void
 OptInit()
@@ -50,7 +50,7 @@ OptInit()
 }
 
 OptOrder(pointer, count, control)
 }
 
 OptOrder(pointer, count, control)
-char *pointer;
+unsigned char *pointer;
 int count;
 int control;
 {
 int count;
 int control;
 {
index 04cbea4..5a2975f 100644 (file)
@@ -3,15 +3,20 @@
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of California at Berkeley. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)outbound.c 3.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)outbound.c 3.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <stdio.h>
 #endif /* not lint */
 
 #include <stdio.h>
@@ -24,11 +29,8 @@ static char sccsid[] = "@(#)outbound.c       3.3 (Berkeley) %G%";
 #include "../api/ebc_disp.h"
 
 #include "../general/globals.h"
 #include "../api/ebc_disp.h"
 
 #include "../general/globals.h"
-#include "options.ext"
-#include "../telnet.ext"
-#include "inbound.ext"
-#include "outbound.ext"
-#include "../general/bsubs.ext"
+#include "externs.h"
+#include "declare.h"
 
 #define SetHighestLowest(position) { \
                                        if (position < Lowest) { \
 
 #define SetHighestLowest(position) { \
                                        if (position < Lowest) { \
@@ -160,12 +162,13 @@ char      character;
 \f
 /* returns the number of characters consumed */
 int
 \f
 /* returns the number of characters consumed */
 int
-DataFromNetwork(buffer, count, control)
-register unsigned char *buffer;                /* what the data is */
+DataFromNetwork(Buffer, count, control)
+char   *Buffer;                                /* what the data is */
 register int   count;                          /* and how much there is */
 int    control;                                /* this buffer ended block? */
 {
     int origCount;
 register int   count;                          /* and how much there is */
 int    control;                                /* this buffer ended block? */
 {
     int origCount;
+    register unsigned char *buffer = (unsigned char *)Buffer;
     register int c;
     register int i;
     static int Command;
     register int c;
     register int i;
     static int Command;
@@ -181,7 +184,7 @@ int control;                                /* this buffer ended block? */
 
        if (count < 2) {
            if (count == 0) {
 
        if (count < 2) {
            if (count == 0) {
-               ExitString(stderr, "Short count received from host!\n", 1);
+               ExitString("Short count received from host!\n", 1);
                return(count);
            }
            Command = buffer[0];
                return(count);
            }
            Command = buffer[0];
@@ -201,12 +204,12 @@ int       control;                                /* this buffer ended block? */
                break;
            default:
                {
                break;
            default:
                {
-                   char buffer[100];
+                   char s_buffer[100];
 
 
-                   sprintf(buffer,
+                   sprintf(s_buffer,
                        "Unexpected read command code 0x%x received.\n",
                                                                    Command);
                        "Unexpected read command code 0x%x received.\n",
                                                                    Command);
-                   ExitString(stderr, buffer, 1);
+                   ExitString(s_buffer, 1);
                    break;
                }
            }
                    break;
                }
            }
@@ -300,12 +303,12 @@ int       control;                                /* this buffer ended block? */
            break;
        default:
            {
            break;
        default:
            {
-               char buffer[100];
+               char s_buffer[100];
 
 
-               sprintf(buffer,
+               sprintf(s_buffer,
                        "Unexpected write command code 0x%x received.\n",
                                                                Command);
                        "Unexpected write command code 0x%x received.\n",
                                                                Command);
-               ExitString(stderr, buffer, 1);
+               ExitString(s_buffer, 1);
                break;
            }
        }
                break;
            }
        }
@@ -427,8 +430,8 @@ int control;                                /* this buffer ended block? */
            case ORDER_GE:
                Ensure(2);
                /* XXX Should do SOMETHING! */
            case ORDER_GE:
                Ensure(2);
                /* XXX Should do SOMETHING! */
-               buffer += 0;
-               count -= 0;             /* For now, just use this character */
+               /* XXX buffer += 0; */
+               /* XXX count -= 0; *//* For now, just use this character */
                break;
            case ORDER_YALE:            /* special YALE defined order */
                Ensure(2);      /* need at least two characters */
                break;
            case ORDER_YALE:            /* special YALE defined order */
                Ensure(2);      /* need at least two characters */
@@ -444,22 +447,22 @@ int       control;                                /* this buffer ended block? */
                break;
            default:
                {
                break;
            default:
                {
-                   char buffer[100];
+                   char s_buffer[100];
                    static struct orders_def unk_order
                                                = { 0, "??", "(unknown)" };
                    struct orders_def *porder = &unk_order;
                    static struct orders_def unk_order
                                                = { 0, "??", "(unknown)" };
                    struct orders_def *porder = &unk_order;
-                   int i;
+                   int s_i;
 
 
-                   for (i = 0; i <= highestof(orders_def); i++) {
-                       if (orders_def[i].code == c) {
-                           porder = &orders_def[i];
+                   for (s_i = 0; s_i <= highestof(orders_def); s_i++) {
+                       if (orders_def[s_i].code == c) {
+                           porder = &orders_def[s_i];
                            break;
                        }
                    }
                            break;
                        }
                    }
-                   sprintf(buffer,
+                   sprintf(s_buffer,
                        "Unsupported order '%s' (%s, 0x%x) received.\n",
                        porder->long_name, porder->short_name, c);
                        "Unsupported order '%s' (%s, 0x%x) received.\n",
                        porder->long_name, porder->short_name, c);
-                   ExitString(stderr, buffer, 1);
+                   ExitString(s_buffer, 1);
                    /*NOTREACHED*/
                }
            }
                    /*NOTREACHED*/
                }
            }
@@ -507,7 +510,7 @@ int control;                                /* this buffer ended block? */
                TerminalIn();
            }
            if (Wcc & WCC_ALARM) {
                TerminalIn();
            }
            if (Wcc & WCC_ALARM) {
-               RingBell(0);
+               RingBell((char *)0);
            }
        }
        LastWasTerminated = control;    /* state for next time */
            }
        }
        LastWasTerminated = control;    /* state for next time */