added estack.str, minor fix
This commit is contained in:
parent
044587ec57
commit
bac2a42c82
3 changed files with 24 additions and 3 deletions
lang/cem/cemcom
|
@ -84,7 +84,7 @@ GSRC = char.c symbol2str.c next.c \
|
||||||
|
|
||||||
# .h files generated by `make hfiles'; PLEASE KEEP THIS UP-TO-DATE!
|
# .h files generated by `make hfiles'; PLEASE KEEP THIS UP-TO-DATE!
|
||||||
GHSRC = botch_free.h dataflow.h debug.h density.h errout.h \
|
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 \
|
maxincl.h nobitfield.h nofloat.h nopp.h noRoption.h nocross.h \
|
||||||
nparams.h numsize.h parbufsize.h pathlength.h \
|
nparams.h numsize.h parbufsize.h pathlength.h \
|
||||||
strsize.h target_sizes.h textsize.h use_tmp.h spec_arith.h static.h
|
strsize.h target_sizes.h textsize.h use_tmp.h spec_arith.h static.h
|
||||||
|
|
21
lang/cem/cemcom/estack.str
Normal file
21
lang/cem/cemcom/estack.str
Normal file
|
@ -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
|
|
@ -525,7 +525,7 @@ ch_array(tpp, ex)
|
||||||
if (tp->tp_size == (arith)-1) {
|
if (tp->tp_size == (arith)-1) {
|
||||||
/* set the dimension */
|
/* set the dimension */
|
||||||
tp = *tpp = construct_type(ARRAY, tp->tp_up, length);
|
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 {
|
else {
|
||||||
arith dim = tp->tp_size / tp->tp_up->tp_size;
|
arith dim = tp->tp_size / tp->tp_up->tp_size;
|
||||||
|
@ -535,7 +535,7 @@ ch_array(tpp, ex)
|
||||||
expr_warning(ex, "too many initialisers");
|
expr_warning(ex, "too many initialisers");
|
||||||
length = dim;
|
length = dim;
|
||||||
}
|
}
|
||||||
ntopad = align(dim, word_size) - length;
|
ntopad = align(dim,(int) word_size) - length;
|
||||||
}
|
}
|
||||||
/* throw out the characters of the already prepared string */
|
/* throw out the characters of the already prepared string */
|
||||||
s = Malloc((unsigned) (length + ntopad));
|
s = Malloc((unsigned) (length + ntopad));
|
||||||
|
|
Loading…
Reference in a new issue