From: ceriel Date: Thu, 26 Mar 1987 15:32:26 +0000 (+0000) Subject: added estack.str, minor fix X-Git-Tag: release-5-5~4329 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=bac2a42c82a5d27e93fc1dd5cd0d8712688a3d1c;p=ack.git added estack.str, minor fix --- diff --git a/lang/cem/cemcom/Makefile.erik b/lang/cem/cemcom/Makefile.erik index 761c033d5..7806b2d9f 100644 --- a/lang/cem/cemcom/Makefile.erik +++ b/lang/cem/cemcom/Makefile.erik @@ -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 index 000000000..b71bdb304 --- /dev/null +++ b/lang/cem/cemcom/estack.str @@ -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 diff --git a/lang/cem/cemcom/ival.g b/lang/cem/cemcom/ival.g index e77d31f01..8e7304a25 100644 --- a/lang/cem/cemcom/ival.g +++ b/lang/cem/cemcom/ival.g @@ -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));