sh: kill off more macro bits
authorAlan Cox <alan@linux.intel.com>
Sun, 10 May 2015 21:36:49 +0000 (22:36 +0100)
committerAlan Cox <alan@linux.intel.com>
Sun, 10 May 2015 21:36:49 +0000 (22:36 +0100)
Applications/V7/cmd/sh/mac.h
Applications/V7/cmd/sh/mode.h

index e77820a..b852ff1 100644 (file)
@@ -9,11 +9,6 @@
  *
  */
 
-#define TYPE   typedef
-#define STRUCT TYPE struct
-#define UNION  TYPE union
-
-
 #define TRUE   (-1)
 #define FALSE  0
 #define LOBYTE 0377
index d02b9a9..b7c8d0b 100644 (file)
@@ -9,39 +9,39 @@
 
 #define BYTESPERWORD   (sizeof(char *))
 
-TYPE char      CHAR;
-TYPE char      BOOL;
-TYPE int       UFD;
-TYPE int       INT;
-TYPE float     REAL;
-TYPE void      *ADDRESS;
-TYPE long int  L_INT;
-TYPE unsigned  POS;
-TYPE char      *STRING;
-TYPE int       PIPE[];
-TYPE char      *STKPTR;
-TYPE char      *BYTPTR;
-
-STRUCT stat    STATBUF;        /* defined in /usr/sys/stat.h */
-STRUCT blk     *BLKPTR;
-STRUCT fileblk FILEBLK;
-STRUCT filehdr FILEHDR;
-STRUCT fileblk *FILE;
-STRUCT trenod  *TREPTR;
-STRUCT forknod *FORKPTR;
-STRUCT comnod  *COMPTR;
-STRUCT swnod   *SWPTR;
-STRUCT regnod  *REGPTR;
-STRUCT parnod  *PARPTR;
-STRUCT ifnod   *IFPTR;
-STRUCT whnod   *WHPTR;
-STRUCT fornod  *FORPTR;
-STRUCT lstnod  *LSTPTR;
-STRUCT argnod  *ARGPTR;
-STRUCT dolnod  *DOLPTR;
-STRUCT ionod   *IOPTR;
-STRUCT namnod  NAMNOD;
-STRUCT namnod  *NAMPTR;
+typedef char   CHAR;
+typedef char   BOOL;
+typedef int    UFD;
+typedef int    INT;
+typedef float  REAL;
+typedef void   *ADDRESS;
+typedef long int       L_INT;
+typedef unsigned       POS;
+typedef char   *STRING;
+typedef int    PIPE[];
+typedef char   *STKPTR;
+typedef char   *BYTPTR;
+
+typedef struct stat    STATBUF;        /* defined in /usr/sys/stat.h */
+typedef struct blk     *BLKPTR;
+typedef struct fileblk FILEBLK;
+typedef struct filehdr FILEHDR;
+typedef struct fileblk *FILE;
+typedef struct trenod  *TREPTR;
+typedef struct forknod *FORKPTR;
+typedef struct comnod  *COMPTR;
+typedef struct swnod   *SWPTR;
+typedef struct regnod  *REGPTR;
+typedef struct parnod  *PARPTR;
+typedef struct ifnod   *IFPTR;
+typedef struct whnod   *WHPTR;
+typedef struct fornod  *FORPTR;
+typedef struct lstnod  *LSTPTR;
+typedef struct argnod  *ARGPTR;
+typedef struct dolnod  *DOLPTR;
+typedef struct ionod   *IOPTR;
+typedef struct namnod  NAMNOD;
+typedef struct namnod  *NAMPTR;
 #define NIL    ((char*)0)
 
 
@@ -55,7 +55,7 @@ STRUCT namnod *NAMPTR;
 
 
 /* address puns for storage allocation */
-UNION {
+typedef union {
        FORKPTR _forkptr;
        COMPTR  _comptr;
        PARPTR  _parptr;
@@ -105,9 +105,9 @@ struct sysnod {
        INT     sysval;
 };
 
-STRUCT sysnod  SYSNOD;
-STRUCT sysnod  *SYSPTR;
-STRUCT sysnod  SYSTAB[];
+typedef struct sysnod  SYSNOD;
+typedef struct sysnod  *SYSPTR;
+typedef struct sysnod  SYSTAB[];
 
 /* this node is a proforma for those that follow */
 struct trenod {