make ANSI C compatible
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 22 Dec 1987 04:28:53 +0000 (20:28 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 22 Dec 1987 04:28:53 +0000 (20:28 -0800)
SCCS-vsn: old/adb/adb.vax/setup.c 4.11
SCCS-vsn: old/make/files.c 4.17
SCCS-vsn: old/sed/sed.h 4.3
SCCS-vsn: old/sed/sed0.c 4.5
SCCS-vsn: old/sed/sed1.c 4.3

usr/src/old/adb/adb.vax/setup.c
usr/src/old/make/files.c
usr/src/old/sed/sed.h
usr/src/old/sed/sed0.c
usr/src/old/sed/sed1.c

index 51f4aff..48a9746 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)setup.c    4.10 (Berkeley) 85/05/09";
+static char sccsid[] = "@(#)setup.c    4.11 (Berkeley) 87/12/21";
 /*
  * adb - routines to read a.out+core at startup
  */
 /*
  * adb - routines to read a.out+core at startup
  */
@@ -71,7 +71,7 @@ setsym()
        if (read(fsym, strtab + sizeof (ssiz), ssiz) != ssiz)
                goto readerr;
        for (sp = symtab; sp < esymtab; sp++)
        if (read(fsym, strtab + sizeof (ssiz), ssiz) != ssiz)
                goto readerr;
        for (sp = symtab; sp < esymtab; sp++)
-               if (sp->n_strx)
+               if (sp->n_un.n_strx)
                        /* SHOULD PERFORM RANGE CHECK HERE */
                        sp->n_un.n_name = strtab + sp->n_un.n_strx;
 nosymt:
                        /* SHOULD PERFORM RANGE CHECK HERE */
                        sp->n_un.n_name = strtab + sp->n_un.n_strx;
 nosymt:
index b397471..ed91e67 100644 (file)
@@ -1,4 +1,4 @@
-static char *sccsid = "@(#)files.c     4.16 (Berkeley) 87/11/15";
+static char *sccsid = "@(#)files.c     4.17 (Berkeley) 87/12/21";
 #include <fcntl.h>
 
 /* UNIX DEPENDENT PROCEDURES */
 #include <fcntl.h>
 
 /* UNIX DEPENDENT PROCEDURES */
@@ -582,6 +582,7 @@ register char *name;
        register char *p;
        register struct varblock *cp;
        struct stat buf;
        register char *p;
        register struct varblock *cp;
        struct stat buf;
+       struct varblock *varptr();
 
        for (p = name; *p; p++) 
                if(*p == '/') return(name);
 
        for (p = name; *p; p++) 
                if(*p == '/') return(name);
index 4bec3da..808432e 100644 (file)
@@ -1,4 +1,4 @@
-/*     sed.h   4.2     87/09/16        */
+/*     sed.h   4.3     87/12/21        */
 
 /*
  * sed -- stream  editor
 
 /*
  * sed -- stream  editor
@@ -31,8 +31,8 @@
 #define NBRA   9
 
 FILE   *fin;
 #define NBRA   9
 
 FILE   *fin;
-union reptr    *abuf[ABUFSIZE];
-union reptr **aptr;
+struct reptr   *abuf[ABUFSIZE];
+struct reptr **aptr;
 char   *lastre;
 char   ibuf[BUFSIZ];
 char   *cbp;
 char   *lastre;
 char   ibuf[BUFSIZ];
 char   *cbp;
@@ -46,7 +46,7 @@ char  *reend;
 char   *lbend;
 char   *hend;
 char   *lcomend;
 char   *lbend;
 char   *hend;
 char   *lcomend;
-union reptr    *ptrend;
+struct reptr   *ptrend;
 int    eflag;
 int    dolflag;
 int    sflag;
 int    eflag;
 int    dolflag;
 int    sflag;
@@ -100,31 +100,22 @@ char      *cp;
 char   *reend;
 char   *lbend;
 
 char   *reend;
 char   *lbend;
 
-union  reptr {
-       struct reptr1 {
-               char    *ad1;
-               char    *ad2;
-               char    *re1;
-               char    *rhs;
-               FILE    *fcode;
-               char    command;
-               char    gfl;
-               char    pfl;
-               char    inar;
-               char    negfl;
-       } A;
-       struct reptr2 {
-               char    *ad1;
-               char    *ad2;
-               union reptr     *lb1;
-               char    *rhs;
-               FILE    *fcode;
-               char    command;
-               char    gfl;
-               char    pfl;
-               char    inar;
-               char    negfl;
-       } B;
+struct reptr {
+       char    *ad1;
+       char    *ad2;
+       union {
+               char    *real_re1;
+               struct reptr    *real_lb1;
+       } re_lb;
+#define        re1     re_lb.real_re1
+#define        lb1     re_lb.real_lb1
+       char    *rhs;
+       FILE    *fcode;
+       char    command;
+       char    gfl;
+       char    pfl;
+       char    inar;
+       char    negfl;
 } ptrspace[PTRSIZE], *rep;
 
 
 } ptrspace[PTRSIZE], *rep;
 
 
@@ -132,8 +123,8 @@ char        respace[RESIZE];
 
 struct label {
        char    asc[9];
 
 struct label {
        char    asc[9];
-       union reptr     *chain;
-       union reptr     *address;
+       struct reptr    *chain;
+       struct reptr    *address;
 } ltab[LABSIZE];
 
 struct label   *lab;
 } ltab[LABSIZE];
 
 struct label   *lab;
@@ -147,9 +138,9 @@ char        **eargv;
 
 extern char    bittab[];
 
 
 extern char    bittab[];
 
-union reptr    **cmpend[DEPTH];
+struct reptr   **cmpend[DEPTH];
 int    depth;
 int    depth;
-union reptr    *pending;
+struct reptr   *pending;
 char   *badp;
 char   bad;
 char   *compile();
 char   *badp;
 char   bad;
 char   *compile();
index 1cca745..fbf82fb 100644 (file)
@@ -1,4 +1,4 @@
-/*     sed0.c  4.4     87/09/16        */
+/*     sed0.c  4.5     87/12/21        */
 
 #include <sys/param.h>
 #include <stdio.h>
 
 #include <sys/param.h>
 #include <stdio.h>
@@ -120,7 +120,7 @@ fcomp()
 
        register char   *p, *op, *tp;
        char    *address();
 
        register char   *p, *op, *tp;
        char    *address();
-       union reptr     *pt, *pt1;
+       struct reptr    *pt, *pt1;
        int     i;
        struct label    *lpt;
        char fbuf[MAXPATHLEN + 1], *newstr();
        int     i;
        struct label    *lpt;
        char fbuf[MAXPATHLEN + 1], *newstr();
@@ -920,7 +920,7 @@ struct label        *ptr;
 dechain()
 {
        struct label    *lptr;
 dechain()
 {
        struct label    *lptr;
-       union reptr     *rptr, *trptr;
+       struct reptr    *rptr, *trptr;
 
        for(lptr = labtab; lptr < lab; lptr++) {
 
 
        for(lptr = labtab; lptr < lab; lptr++) {
 
index 27b04ba..869973b 100644 (file)
@@ -1,4 +1,4 @@
-/*     sed1.c  4.2     85/04/05        */
+/*     sed1.c  4.3     87/12/21        */
 
 #include       <stdio.h>
 #include "sed.h"
 
 #include       <stdio.h>
 #include "sed.h"
@@ -42,7 +42,7 @@ execute(file)
 char *file;
 {
        register char *p1, *p2;
 char *file;
 {
        register char *p1, *p2;
-       register union reptr    *ipc;
+       register struct reptr   *ipc;
        int     c;
        char    *execp;
 
        int     c;
        char    *execp;
 
@@ -336,7 +336,7 @@ char        *alp, *aep;
        }
 }
 substitute(ipc)
        }
 }
 substitute(ipc)
-union reptr    *ipc;
+struct reptr   *ipc;
 {
        if(match(ipc->re1, 0) == 0)     return(0);
 
 {
        if(match(ipc->re1, 0) == 0)     return(0);
 
@@ -403,7 +403,7 @@ char        *asp, *al1, *al2;
 }
 
 command(ipc)
 }
 
 command(ipc)
-union reptr    *ipc;
+struct reptr   *ipc;
 {
        register int    i;
        register char   *p1, *p2, *p3;
 {
        register int    i;
        register char   *p1, *p2, *p3;