added estack.str, minor fix
authorceriel <none@none>
Thu, 26 Mar 1987 15:32:26 +0000 (15:32 +0000)
committerceriel <none@none>
Thu, 26 Mar 1987 15:32:26 +0000 (15:32 +0000)
lang/cem/cemcom/Makefile.erik
lang/cem/cemcom/estack.str [new file with mode: 0644]
lang/cem/cemcom/ival.g

index 761c033..7806b2d 100644 (file)
@@ -84,7 +84,7 @@ GSRC =        char.c symbol2str.c next.c \
 
 # .h files generated by `make hfiles'; PLEASE KEEP THIS UP-TO-DATE!
 GHSRC = botch_free.h dataflow.h debug.h density.h errout.h \
-       idepth.h idfsize.h ifdepth.h inputtype.h inumlength.h lapbuf.h \
+       idfsize.h ifdepth.h inputtype.h inumlength.h lapbuf.h \
        maxincl.h nobitfield.h nofloat.h nopp.h noRoption.h nocross.h \
        nparams.h numsize.h parbufsize.h pathlength.h \
        strsize.h target_sizes.h textsize.h use_tmp.h spec_arith.h static.h
diff --git a/lang/cem/cemcom/estack.str b/lang/cem/cemcom/estack.str
new file mode 100644 (file)
index 0000000..b71bdb3
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
+ * See the copyright notice in the ACK home directory, in the file "Copyright".
+ */
+/* $Header$ */
+/* EXPRESSION STACK */
+/* Used for global initializations */
+struct e_stack {
+       struct e_stack  *next;
+       arith           s_cnt1, s_cnt2;
+       struct sdef     *s_def;
+       struct type     **s_tpp;
+       char            s_nested;
+};
+
+/* ALLOCDEF "e_stack" 5 */
+
+#define bytes_upto_here        s_cnt1
+#define last_offset    s_cnt2
+#define elem_count     s_cnt1
+#define nelem          s_cnt2
index e77d31f..8e7304a 100644 (file)
@@ -525,7 +525,7 @@ ch_array(tpp, ex)
        if (tp->tp_size == (arith)-1) {
                /* set the dimension    */
                tp = *tpp = construct_type(ARRAY, tp->tp_up, length);
-               ntopad = align(tp->tp_size, word_size) - tp->tp_size;
+               ntopad = align(tp->tp_size, (int) word_size) - tp->tp_size;
        }
        else {
                arith dim = tp->tp_size / tp->tp_up->tp_size;
@@ -535,7 +535,7 @@ ch_array(tpp, ex)
                        expr_warning(ex, "too many initialisers");
                        length = dim;
                }
-               ntopad = align(dim, word_size) - length;
+               ntopad = align(dim,(int)  word_size) - length;
        }
        /* throw out the characters of the already prepared string      */
        s = Malloc((unsigned) (length + ntopad));