Lint (and new copyrights).
authorGregory Minshall <minshall@ucbvax.Berkeley.EDU>
Mon, 29 Aug 1988 08:53:47 +0000 (00:53 -0800)
committerGregory Minshall <minshall@ucbvax.Berkeley.EDU>
Mon, 29 Aug 1988 08:53:47 +0000 (00:53 -0800)
SCCS-vsn: usr.bin/tn3270/api/makefile 3.5
SCCS-vsn: usr.bin/tn3270/api/apilib.c 3.3
SCCS-vsn: usr.bin/tn3270/api/api_exch.h 3.4
SCCS-vsn: usr.bin/tn3270/api/api_exch.c 3.3
SCCS-vsn: usr.bin/tn3270/api/api_bsd.c 3.4
SCCS-vsn: usr.bin/tn3270/ascii/mset.c 3.4
SCCS-vsn: usr.bin/tn3270/ascii/map3270.c 3.4
SCCS-vsn: usr.bin/tn3270/ascii/termin.c 3.3
SCCS-vsn: usr.bin/tn3270/ascii/makefile 3.6

usr/src/usr.bin/tn3270/api/api_bsd.c
usr/src/usr.bin/tn3270/api/api_exch.c
usr/src/usr.bin/tn3270/api/api_exch.h
usr/src/usr.bin/tn3270/api/apilib.c
usr/src/usr.bin/tn3270/api/makefile
usr/src/usr.bin/tn3270/ascii/makefile
usr/src/usr.bin/tn3270/ascii/map3270.c
usr/src/usr.bin/tn3270/ascii/mset.c
usr/src/usr.bin/tn3270/ascii/termin.c

index 5e62d4b..7043174 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)api_bsd.c  3.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)api_bsd.c  3.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #if    defined(unix)
 #endif /* not lint */
 
 #if    defined(unix)
@@ -51,13 +51,14 @@ char        *string;                /* if non-zero, where to connect to */
     struct sockaddr_in server;
     struct hostent *hp;
     struct storage_descriptor sd;
     struct sockaddr_in server;
     struct hostent *hp;
     struct storage_descriptor sd;
-    char *getenv();
+    extern char *getenv();
+    extern unsigned short htons();
     char thehostname[100];
     char keyname[100];
     char inkey[100];
     FILE *keyfile;
     int sock;
     char thehostname[100];
     char keyname[100];
     char inkey[100];
     FILE *keyfile;
     int sock;
-    int port;
+    unsigned int port;
     int i;
 
     if (string == 0) {
     int i;
 
     if (string == 0) {
@@ -69,7 +70,8 @@ char  *string;                /* if non-zero, where to connect to */
        }
     }
 
        }
     }
 
-    if (sscanf(string, "%[^:]:%d:%s", thehostname, &port, keyname) != 3) {
+    if (sscanf(string, "%[^:]:%d:%s", thehostname,
+                               (int *)&port, keyname) != 3) {
        fprintf(stderr, "API3270 environmental variable has bad format.\n");
        return -1;
     }
        fprintf(stderr, "API3270 environmental variable has bad format.\n");
        return -1;
     }
@@ -85,10 +87,10 @@ char        *string;                /* if non-zero, where to connect to */
        fprintf(stderr, "%s specifies bad host name.\n", string);
        return -1;
     }
        fprintf(stderr, "%s specifies bad host name.\n", string);
        return -1;
     }
-    bcopy(hp->h_addr, &server.sin_addr, hp->h_length);
+    bcopy(hp->h_addr, (char *)&server.sin_addr, hp->h_length);
     server.sin_port = htons(port);
 
     server.sin_port = htons(port);
 
-    if (connect(sock, &server, sizeof server) < 0) {
+    if (connect(sock, (struct sockaddr *)&server, sizeof server) < 0) {
        perror("connecting to API server");
        return -1;
     }
        perror("connecting to API server");
        return -1;
     }
@@ -230,7 +232,7 @@ int length;
                return -1;
            }
            if (api_exch_outtype(EXCH_TYPE_BYTES, sd.length,
                return -1;
            }
            if (api_exch_outtype(EXCH_TYPE_BYTES, sd.length,
-                           sd.location) == -1) {
+                           (char *)sd.location) == -1) {
                return -1;
            }
            break;
                return -1;
            }
            break;
@@ -241,7 +243,7 @@ int length;
            }
            /* XXX Validty check HEREIS? */
            if (api_exch_intype(EXCH_TYPE_BYTES, sd.length,
            }
            /* XXX Validty check HEREIS? */
            if (api_exch_intype(EXCH_TYPE_BYTES, sd.length,
-                           sd.location) == -1) {
+                           (char *)sd.location) == -1) {
                return -1;
            }
            break;
                return -1;
            }
            break;
index d3695c9..4743083 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_exch.c 3.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)api_exch.c 3.3 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <stdio.h>
 #endif /* not lint */
 
 #include <stdio.h>
@@ -71,7 +76,6 @@ iget(location, length)
 char   *location;
 int    length;
 {
 char   *location;
 int    length;
 {
-    int i;
     int count;
 
     if (OBUFAVAILABLE()) {
     int count;
 
     if (OBUFAVAILABLE()) {
@@ -348,7 +352,7 @@ int
 char
     *location;
 {
 char
     *location;
 {
-    int i, netleng = length;
+    int netleng = length;
 
     if (conversation != RECEIVE) {
        if (enter_receive() == -1) {
 
     if (conversation != RECEIVE) {
        if (enter_receive() == -1) {
@@ -372,7 +376,7 @@ char
        return -1;
     }
     if (exch_state.length != netleng) {
        return -1;
     }
     if (exch_state.length != netleng) {
-       fprintf(stderr, "Type 0x%x - expected length %d, received length %d.\n",
+       fprintf(stderr, "Type 0x%x - expected length %d, received length %u.\n",
                type, length, exch_state.length);
        return -1;
     }
                type, length, exch_state.length);
        return -1;
     }
@@ -393,8 +397,10 @@ api_exch_init(sock_number, ourname)
 int sock_number;
 char *ourname;
 {
 int sock_number;
 char *ourname;
 {
+    extern char *strcpy();
+
     sock = sock_number;
     sock = sock_number;
-    strcpy(whoarewe, ourname);         /* For error messages */
+    (void) strcpy(whoarewe, ourname);          /* For error messages */
 
     my_sequence = your_sequence = 0;
 
 
     my_sequence = your_sequence = 0;
 
index 7e4bb86..87fff64 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_exch.h  3.3 (Berkeley) %G%
+ *     @(#)api_exch.h  3.4 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -58,8 +58,9 @@
 #define        EXCH_EXCH_TYPE          3       /* The following is a type */
 
 struct exch_exch {
 #define        EXCH_EXCH_TYPE          3       /* The following is a type */
 
 struct exch_exch {
+    char
+       opcode;                 /* COMMAND, TURNAROUND, or TYPE */
     unsigned char
     unsigned char
-       opcode,                 /* COMMAND, TURNAROUND, or TYPE */
        my_sequence,            /* 0-ff, initially zero */
        your_sequence,          /* 0-ff, initially zero */
        command_or_type;        /* Application level command or type */
        my_sequence,            /* 0-ff, initially zero */
        your_sequence,          /* 0-ff, initially zero */
        command_or_type;        /* Application level command or type */
index 432242a..d9eb236 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[] = "@(#)apilib.c   3.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)apilib.c   3.3 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "../ctlr/api.h"
 #endif /* not lint */
 
 #include "../ctlr/api.h"
@@ -52,8 +57,8 @@ struct SREGS  *sregs;
     regs->h.bl = bl;
     regs->x.cx = cx;
     regs->x.dx = dx;
     regs->h.bl = bl;
     regs->x.cx = cx;
     regs->x.dx = dx;
-    sregs->es = (int) FP_SEG(ourseg);
-    regs->x.di = (int) FP_OFF(ourseg);
+    sregs->es = FP_SEG(ourseg);
+    regs->x.di = FP_OFF(ourseg);
 
 #if    defined(MSDOS)
     int86x(API_INTERRUPT_NUMBER, regs, regs, sregs);
 
 #if    defined(MSDOS)
     int86x(API_INTERRUPT_NUMBER, regs, regs, sregs);
@@ -115,8 +120,8 @@ char *name;
        }
     }
 
        }
     }
 
-    if (api_issue_regs(NAME_RESOLUTION, 0, 0, 0, 0, 0, &parms, sizeof parms, &regs, &sregs)
-                   == -1) {
+    if (api_issue_regs(NAME_RESOLUTION, 0, 0, 0, 0, 0, (char *) &parms,
+                           sizeof parms, &regs, &sregs) == -1) {
        return -1;
     } else {
        return regs.x.dx;
        return -1;
     } else {
        return regs.x.dx;
@@ -134,8 +139,8 @@ api_ps_or_oia_modified()
     union REGS regs;
     struct SREGS sregs;
 
     union REGS regs;
     struct SREGS sregs;
 
-    if (api_issue_regs(PS_OR_OIA_MODIFIED, 0, 0, 0, 0, 0, 0, 0, &regs, &sregs)
-                   == -1) {
+    if (api_issue_regs(PS_OR_OIA_MODIFIED, 0, 0, 0, 0, 0, (char *) 0,
+                               0, &regs, &sregs) == -1) {
        return -1;
     } else {
        return 0;
        return -1;
     } else {
        return 0;
@@ -355,10 +360,10 @@ api_finish()
 
 api_init()
 {
 
 api_init()
 {
+#if    defined(MSDOS)
     union REGS regs;
     struct SREGS sregs;
 
     union REGS regs;
     struct SREGS sregs;
 
-#if    defined(MSDOS)
     regs.h.ah = 0x35;
     regs.h.al = API_INTERRUPT_NUMBER;
     intdosx(&regs, &regs, &sregs);
     regs.h.ah = 0x35;
     regs.h.al = API_INTERRUPT_NUMBER;
     intdosx(&regs, &regs, &sregs);
@@ -368,7 +373,7 @@ api_init()
     }
 #endif /* defined(MSDOS) */
 #if    defined(unix)
     }
 #endif /* defined(MSDOS) */
 #if    defined(unix)
-    if (api_open_api(0) == -1) {
+    if (api_open_api((char *)0) == -1) {
        return 0;
     }
 #endif /* defined(unix) */
        return 0;
     }
 #endif /* defined(unix) */
index e9dfead..a7bf35d 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.4 (Berkeley) %G%
+#      @(#)makefile    3.5 (Berkeley) %G%
 # msdos versus unix defines
 O      = .o
 #PC_O  = .obj
 # msdos versus unix defines
 O      = .o
 #PC_O  = .obj
index e0d93ad..1887848 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
@@ -72,7 +72,7 @@ KBD   = unix.kbd
 
 
 # The source files...
 
 
 # The source files...
-ALLH = map3270.ext state.h termin.ext
+ALLH = state.h
 
 ALLC = map3270.c mset.c termin.c
 
 
 ALLC = map3270.c mset.c termin.c
 
@@ -150,9 +150,8 @@ depend:
 
 # DO NOT DELETE THIS LINE
 
 
 # DO NOT DELETE THIS LINE
 
-map3270$O: state.h ../general/globals.h map3270.ext default.map
-mset$O: ../ctlr/function.h state.h ../api/astosc.h ../general/globals.h
-mset$O: map3270.ext
-termin$O: ../general/general.h ../ctlr/function.h ../ctlr/inbound.ext
-termin$O: ../ctlr/outbound.ext ../telnet.ext termin.ext ../api/astosc.h state.h
-termin$O: ../general/globals.h
+map3270$O: state.h map3270.h ../general/globals.h default.map
+mset$O: ../ctlr/function.h state.h map3270.h ../api/astosc.h
+mset$O: ../general/globals.h
+termin$O: ../general/general.h ../ctlr/function.h ../ctlr/externs.h
+termin$O: ../ctlr/declare.h ../api/astosc.h state.h ../general/globals.h
index c56bbd6..cad6e71 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)map3270.c  3.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)map3270.c  3.4 (Berkeley) %G%";
 #endif /* not lint */
 
 /*     This program reads a description file, somewhat like /etc/termcap,
 #endif /* not lint */
 
 /*     This program reads a description file, somewhat like /etc/termcap,
@@ -50,9 +50,9 @@ static char sccsid[] = "@(#)map3270.c 3.3 (Berkeley) %G%";
 #define        IsPrint(c)      ((isprint(c) && !isspace(c)) || ((c) == ' '))
 
 #include "state.h"
 #define        IsPrint(c)      ((isprint(c) && !isspace(c)) || ((c) == ' '))
 
 #include "state.h"
+#include "map3270.h"
 
 #include "../general/globals.h"
 
 #include "../general/globals.h"
-#include "map3270.ext"
 \f
 /* this is the list of types returned by the lex processor */
 #define        LEX_CHAR        400                     /* plain unadorned character */
 \f
 /* this is the list of types returned by the lex processor */
 #define        LEX_CHAR        400                     /* plain unadorned character */
@@ -457,7 +457,7 @@ static void
 FreeState(pState)
 state *pState;
 {
 FreeState(pState)
 state *pState;
 {
-    extern void free();
+    extern int free();
 
     free((char *)pState);
 }
 
     free((char *)pState);
 }
@@ -815,7 +815,7 @@ char *string;
     char *p;
     extern char *malloc();
 
     char *p;
     extern char *malloc();
 
-    p = malloc(strlen(string)+1);
+    p = malloc((unsigned int)strlen(string)+1);
     if (p != 0) {
        strcpy(p, string);
     }
     if (p != 0) {
        strcpy(p, string);
     }
index 8aaf7f3..c08dbe7 100644 (file)
@@ -22,7 +22,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)mset.c     3.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)mset.c     3.4 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -41,10 +41,11 @@ static char sccsid[] = "@(#)mset.c  3.3 (Berkeley) %G%";
 #include "../ctlr/function.h"
 
 #include "state.h"
 #include "../ctlr/function.h"
 
 #include "state.h"
+#include "map3270.h"
+
 #include "../api/astosc.h"
 
 #include "../general/globals.h"
 #include "../api/astosc.h"
 
 #include "../general/globals.h"
-#include "map3270.ext"
 
 struct regstate {
        char *result;
 
 struct regstate {
        char *result;
index 487ee2a..fd3eb7e 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[] = "@(#)termin.c   3.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)termin.c   3.3 (Berkeley) %G%";
 #endif /* not lint */
 
 /* this takes characters from the keyboard, and produces 3270 keystroke
 #endif /* not lint */
 
 /* this takes characters from the keyboard, and produces 3270 keystroke
@@ -23,10 +28,8 @@ static char sccsid[] = "@(#)termin.c 3.2 (Berkeley) %G%";
 
 #include "../general/general.h"
 #include "../ctlr/function.h"
 
 #include "../general/general.h"
 #include "../ctlr/function.h"
-#include "../ctlr/inbound.ext"
-#include "../ctlr/outbound.ext"
-#include "../telnet.ext"
-#include "termin.ext"
+#include "../ctlr/externs.h"
+#include "../ctlr/declare.h"
 
 #include "../api/astosc.h"
 #include "state.h"
 
 #include "../api/astosc.h"
 #include "state.h"
@@ -123,6 +126,7 @@ FlushChar()
     ourPHead = ourBuffer;
 }
 
     ourPHead = ourBuffer;
 }
 
+/*ARGSUSED*/
 void
 TransInput(onoff, mode)
 int    mode;                   /* Which KIND of transparent input */
 void
 TransInput(onoff, mode)
 int    mode;                   /* Which KIND of transparent input */
@@ -188,7 +192,7 @@ register int        count;                  /* how many bytes in this buffer */
            c = (*buffer++)&0x7f;
            *TransPointer++ = c|0x80;
            if (c == '\r') {
            c = (*buffer++)&0x7f;
            *TransPointer++ = c|0x80;
            if (c == '\r') {
-               SendTransparent(ourBuffer, TransPointer-ourBuffer);
+               SendTransparent((char *)ourBuffer, TransPointer-ourBuffer);
                TransPointer = 0;               /* Done */
                break;
            }
                TransPointer = 0;               /* Done */
                break;
            }
@@ -197,6 +201,8 @@ register int        count;                  /* how many bytes in this buffer */
     }
 
     if (bellwinup) {
     }
 
     if (bellwinup) {
+       void BellOff();
+
        BellOff();
     }
 
        BellOff();
     }
 
@@ -234,6 +240,8 @@ register int        count;                  /* how many bytes in this buffer */
                        if (astosc[result].function == FCN_SYNCH) {
                            WaitingForSynch = 0;
                        } else {
                        if (astosc[result].function == FCN_SYNCH) {
                            WaitingForSynch = 0;
                        } else {
+                           void RingBell();
+
                            RingBell("Need to type synch character");
                        }
                    }
                            RingBell("Need to type synch character");
                        }
                    }