fixed some problems, updated with cemcom
authorceriel <none@none>
Tue, 14 Feb 1989 14:35:38 +0000 (14:35 +0000)
committerceriel <none@none>
Tue, 14 Feb 1989 14:35:38 +0000 (14:35 +0000)
lang/cem/cemcom.ansi/BigPars
lang/cem/cemcom.ansi/Makefile
lang/cem/cemcom.ansi/SmallPars
lang/cem/cemcom.ansi/eval.c

index 08aaa58..1f0a513 100644 (file)
@@ -22,6 +22,7 @@
 
 !File: nparams.h
 #define        NPARAMS 32      /* maximum number of parameters of macros       */
+#define        STDC_NPARAMS 31 /* ANSI limit on number of parameters           */
 
 
 !File: ifdepth.h
 
 
 !File: lapbuf.h
-#define        LAPBUF  4096    /* size of macro actual parameter buffer        */
+#define        LAPBUF  4096    /* size of macro replacement buffer             */
+
+
+!File: argbuf.h
+#define        ARGBUF  2048    /* size of macro actual parameter buffer        */
 
 
 !File: strsize.h
@@ -55,6 +60,7 @@
 #ifndef NOFLOAT
 #define        SZ_FLOAT        (arith)4
 #define        SZ_DOUBLE       (arith)8
+#define        SZ_LNGDBL       (arith)8        /* for now */
 #endif NOFLOAT
 #define        SZ_POINTER      (arith)4
 
@@ -67,6 +73,7 @@
 #ifndef NOFLOAT
 #define        AL_FLOAT        SZ_WORD
 #define        AL_DOUBLE       SZ_WORD
+#define        AL_LNGDBL       SZ_WORD
 #endif NOFLOAT
 #define        AL_POINTER      SZ_WORD
 #define AL_STRUCT      1
index fa9ee59..f4c92f3 100644 (file)
@@ -3,8 +3,8 @@
 
 # Machine and environ dependent definitions
 EMHOME = ../../..
-CC = /proj/em/Work/bin/fcc.cc
 CC = cc
+CC = /proj/em/Work/bin/fcc.cc
 CFLOW = cflow
 MKDEP = $(EMHOME)/bin/mkdep
 PRID = $(EMHOME)/bin/prid
index fb0bf2a..9d012b7 100644 (file)
@@ -22,6 +22,7 @@
 
 !File: nparams.h
 #define        NPARAMS 32      /* maximum number of parameters of macros       */
+#define        STDC_NPARAMS 31 /* ANSI limit on number of parameters           */
 
 
 !File: ifdepth.h
 
 
 !File: lapbuf.h
-#define        LAPBUF  4096    /* size of macro actual parameter buffer        */
+#define        LAPBUF  4096    /* size of macro replacement buffer             */
+
+
+!File: argbuf.h
+#define ARGBUF 2048    /* sizeof of macro actual parameter buffer      */
 
 
 !File: strsize.h
@@ -55,6 +60,7 @@
 #ifndef NOFLOAT
 #define        SZ_FLOAT        (arith)4
 #define        SZ_DOUBLE       (arith)8
+#define        SZ_LNGDBL       (arith)8        /* for now */
 #endif NOFLOAT
 #define        SZ_POINTER      (arith)4
 
@@ -67,6 +73,7 @@
 #ifndef NOFLOAT
 #define        AL_FLOAT        SZ_WORD
 #define        AL_DOUBLE       SZ_WORD
+#define        AL_LNGDBL       SZ_WORD
 #endif NOFLOAT
 #define        AL_POINTER      SZ_WORD
 #define AL_STRUCT      1
index 0f329de..3854c5d 100644 (file)
@@ -495,10 +495,11 @@ EVAL(expr, val, code, true_label, false_label)
                                while ( ex->ex_class == Oper &&
                                        ex->OP_OPER == PARCOMMA
                                ) {
-                                       EVAL(ex->OP_RIGHT, RVAL,
-                                            ex->ex_type->tp_size > 0,
+                                       register struct expr *rght = ex->OP_RIGHT;
+                                       EVAL(rght, RVAL,
+                                            rght->ex_type->tp_size > 0,
                                                        NO_LABEL, NO_LABEL);
-                                       ParSize += ATW(ex->ex_type->tp_size);
+                                       ParSize += ATW(rght->ex_type->tp_size);
                                        ex = ex->OP_LEFT;
                                }
                                EVAL(ex, RVAL, ex->ex_type->tp_size > 0,