From f572c87be91cd31046cf0b6a147adf45f8e60615 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 10 May 2015 22:36:49 +0100 Subject: [PATCH] sh: kill off more macro bits --- Applications/V7/cmd/sh/mac.h | 5 --- Applications/V7/cmd/sh/mode.h | 74 +++++++++++++++++------------------ 2 files changed, 37 insertions(+), 42 deletions(-) diff --git a/Applications/V7/cmd/sh/mac.h b/Applications/V7/cmd/sh/mac.h index e77820a5..b852ff1f 100644 --- a/Applications/V7/cmd/sh/mac.h +++ b/Applications/V7/cmd/sh/mac.h @@ -9,11 +9,6 @@ * */ -#define TYPE typedef -#define STRUCT TYPE struct -#define UNION TYPE union - - #define TRUE (-1) #define FALSE 0 #define LOBYTE 0377 diff --git a/Applications/V7/cmd/sh/mode.h b/Applications/V7/cmd/sh/mode.h index d02b9a97..b7c8d0bc 100644 --- a/Applications/V7/cmd/sh/mode.h +++ b/Applications/V7/cmd/sh/mode.h @@ -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 { -- 2.34.1