projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD 4 release
[unix-history]
/
usr
/
src
/
cmd
/
f77
/
defines
diff --git
a/usr/src/cmd/f77/defines
b/usr/src/cmd/f77/defines
index
288addf
..
663ee6c
100644
(file)
--- a/
usr/src/cmd/f77/defines
+++ b/
usr/src/cmd/f77/defines
@@
-21,15
+21,23
@@
Here = HERE
#define M(x) (1<<x)
#define ALLOC(x) (struct x *) ckalloc(sizeof(struct x))
#define ALLOCN(n,x) (struct x *) ckalloc(n*sizeof(struct x))
#define M(x) (1<<x)
#define ALLOC(x) (struct x *) ckalloc(sizeof(struct x))
#define ALLOCN(n,x) (struct x *) ckalloc(n*sizeof(struct x))
+#define ALLEXPR (expptr) ckalloc( sizeof(union Expression) )
typedef int *ptr;
typedef int *ptr;
+typedef char *charptr;
typedef FILE *FILEP;
typedef short flag;
typedef FILE *FILEP;
typedef short flag;
+typedef char field; /* actually need only 4 bits */
typedef long int ftnint;
#define LOCAL static
#define NO 0
#define YES 1
typedef long int ftnint;
#define LOCAL static
#define NO 0
#define YES 1
+#define CNULL (char *) 0
+#define PNULL (ptr) 0
+#define CHNULL (chainp) 0
+#define ENULL (expptr) 0
+
/* block tag values */
/* block tag values */
@@
-60,7
+68,7
@@
typedef long int ftnint;
#define PROCFUNCT 4
#define PROCFUNCT 4
-/* storage classes */
+/* storage classes
-- vstg values
*/
#define STGUNKNOWN 0
#define STGARG 1
#define STGUNKNOWN 0
#define STGARG 1
@@
-75,8
+83,9
@@
typedef long int ftnint;
#define STGEQUIV 10
#define STGREG 11
#define STGLENG 12
#define STGEQUIV 10
#define STGREG 11
#define STGLENG 12
+#define STGNULL 13
-/* name classes */
+/* name classes
-- vclass values
*/
#define CLUNKNOWN 0
#define CLPARAM 1
#define CLUNKNOWN 0
#define CLPARAM 1
@@
-85,9
+94,10
@@
typedef long int ftnint;
#define CLMAIN 4
#define CLBLOCK 5
#define CLPROC 6
#define CLMAIN 4
#define CLBLOCK 5
#define CLPROC 6
+#define CLNAMELIST 7
-/* vproclass values */
+/* vproc
c
lass values */
#define PUNKNOWN 0
#define PEXTERNAL 1
#define PUNKNOWN 0
#define PEXTERNAL 1
@@
-145,16
+155,6
@@
typedef long int ftnint;
#define OPRSHIFT 39
#define OPRSHIFT 39
-/* memory regions */
-
-#define REGARG 1
-#define REGAUTO 2
-#define REGBSS 3
-#define REGINIT 4
-#define REGCONST 5
-#define REGEXT 6
-#define REGPROG 7
-
/* label type codes */
#define LABUNKNOWN 0
/* label type codes */
#define LABUNKNOWN 0
@@
-179,6
+179,7
@@
typedef long int ftnint;
#define IOSTDIN ICON(5)
#define IOSTDOUT ICON(6)
#define IOSTDIN ICON(5)
#define IOSTDOUT ICON(6)
+#define IOSTDERR ICON(0)
#define IOSBAD (-1)
#define IOSPOSITIONAL 0
#define IOSBAD (-1)
#define IOSPOSITIONAL 0
@@
-203,6
+204,7
@@
typedef long int ftnint;
#define MSKINT M(TYSHORT)|M(TYLONG)
#define MSKREAL M(TYREAL)|M(TYDREAL)
#define MSKCOMPLEX M(TYCOMPLEX)|M(TYDCOMPLEX)
#define MSKINT M(TYSHORT)|M(TYLONG)
#define MSKREAL M(TYREAL)|M(TYDREAL)
#define MSKCOMPLEX M(TYCOMPLEX)|M(TYDCOMPLEX)
+#define MSKSTATIC (M(STGINIT)|M(STGBSS)|M(STGCOMMON)|M(STGEQUIV)|M(STGCONST))
/* miscellaneous macros */
/* miscellaneous macros */
@@
-210,26
+212,19
@@
typedef long int ftnint;
#define ISCOMPLEX(z) ONEOF(z, MSKCOMPLEX)
#define ISREAL(z) ONEOF(z, MSKREAL)
#define ISNUMERIC(z) ONEOF(z, MSKINT|MSKREAL|MSKCOMPLEX)
#define ISCOMPLEX(z) ONEOF(z, MSKCOMPLEX)
#define ISREAL(z) ONEOF(z, MSKREAL)
#define ISNUMERIC(z) ONEOF(z, MSKINT|MSKREAL|MSKCOMPLEX)
-#define ISICON(z) (z->
headblock.tag==TCONST && ISINT(z->head
block.vtype))
+#define ISICON(z) (z->
tag==TCONST && ISINT(z->const
block.vtype))
#define ISCHAR(z) (z->headblock.vtype==TYCHAR)
#define ISINT(z) ONEOF(z, MSKINT)
#define ISCHAR(z) (z->headblock.vtype==TYCHAR)
#define ISINT(z) ONEOF(z, MSKINT)
-#define ISCONST(z) (z->
headblock.
tag==TCONST)
-#define ISERROR(z) (z->
headblock.
tag==TERROR)
-#define ISPLUSOP(z) (z->
headblock.
tag==TEXPR && z->exprblock.opcode==OPPLUS)
-#define ISSTAROP(z) (z->
headblock.
tag==TEXPR && z->exprblock.opcode==OPSTAR)
+#define ISCONST(z) (z->tag==TCONST)
+#define ISERROR(z) (z->tag==TERROR)
+#define ISPLUSOP(z) (z->tag==TEXPR && z->exprblock.opcode==OPPLUS)
+#define ISSTAROP(z) (z->tag==TEXPR && z->exprblock.opcode==OPSTAR)
#define ISONE(z) (ISICON(z) && z->constblock.const.ci==1)
#define INT(z) ONEOF(z, MSKINT|MSKCHAR)
#define ICON(z) mkintcon( (ftnint)(z) )
#define ISONE(z) (ISICON(z) && z->constblock.const.ci==1)
#define INT(z) ONEOF(z, MSKINT|MSKCHAR)
#define ICON(z) mkintcon( (ftnint)(z) )
-#define CHCON(z) mkstrcon(strlen(z), z)
-
-#if HERE == PDP11
- /* not enough space in compiler for checks */
-# define NO66(s)
-# define NOEXT(s)
-#else
-# define NO66(s) if(no66flag) err66(s)
-# define NOEXT(s) if(noextflag) errext(s)
-#endif
+
+#define NO66(s) if(no66flag) err66(s)
+#define NOEXT(s) if(noextflag) errext(s)
/* round a up to a multiple of b */
#define roundup(a,b) ( b * ( (a+b-1)/b) )
/* round a up to a multiple of b */
#define roundup(a,b) ( b * ( (a+b-1)/b) )