many minor fixes and modifications
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
char *symbol2str();
|
||||
char *long2str();
|
||||
char *strncpy();
|
||||
struct expr *do_array(), *do_struct(), *IVAL();
|
||||
extern char options[];
|
||||
|
||||
@@ -482,7 +483,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_align) - tp->tp_size;
|
||||
ntopad = align(tp->tp_size, word_size) - tp->tp_size;
|
||||
}
|
||||
else {
|
||||
arith dim = tp->tp_size / tp->tp_up->tp_size;
|
||||
@@ -498,12 +499,13 @@ ch_array(tpp, ex)
|
||||
length = dim;
|
||||
}
|
||||
}
|
||||
ntopad = align(dim, word_align) - length;
|
||||
ntopad = align(dim, word_size) - length;
|
||||
}
|
||||
/* throw out the characters of the already prepared string */
|
||||
s = Malloc((int) (length + ntopad));
|
||||
s = Malloc((unsigned) (length + ntopad));
|
||||
clear(s, (int) (length + ntopad));
|
||||
strncpy(s, ex->SG_VALUE, (int) length);
|
||||
free(ex->SG_VALUE);
|
||||
str_cst(s, (int) (length + ntopad));
|
||||
free(s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user