Fixed problem with missed unstacks
This commit is contained in:
parent
b371972acf
commit
e9a4337ccf
|
@ -31,6 +31,7 @@
|
|||
extern char *symbol2str();
|
||||
extern char options[];
|
||||
extern arith flt_flt2arith();
|
||||
extern label code_string();
|
||||
|
||||
arithbalance(e1p, oper, e2p) /* 3.1.2.5 */
|
||||
register struct expr **e1p, **e2p;
|
||||
|
@ -464,9 +465,9 @@ string2pointer(ex)
|
|||
/* The expression, which must be a string constant, is converted
|
||||
to a pointer to the string-containing area.
|
||||
*/
|
||||
label lbl = data_label();
|
||||
label lbl;
|
||||
|
||||
code_string(ex->SG_VALUE, ex->SG_LEN, lbl);
|
||||
lbl = code_string(ex->SG_VALUE, ex->SG_LEN);
|
||||
ex->ex_class = Value;
|
||||
ex->VL_CLASS = Label;
|
||||
ex->VL_LBL = lbl;
|
||||
|
|
|
@ -105,12 +105,13 @@ init_code(dst_file)
|
|||
|
||||
struct string_cst *str_list = 0;
|
||||
|
||||
code_string(val, len, dlb)
|
||||
label
|
||||
code_string(val, len)
|
||||
char *val;
|
||||
int len;
|
||||
label dlb;
|
||||
{
|
||||
register struct string_cst *sc = new_string_cst();
|
||||
label lbl = data_label();
|
||||
|
||||
C_ina_dlb(dlb);
|
||||
sc->next = str_list;
|
||||
|
@ -118,6 +119,7 @@ code_string(val, len, dlb)
|
|||
sc->sc_value = val;
|
||||
sc->sc_len = len;
|
||||
sc->sc_dlb = dlb;
|
||||
return dlb;
|
||||
}
|
||||
|
||||
def_strings(sc)
|
||||
|
|
|
@ -308,14 +308,23 @@ actual(repl)
|
|||
register int ch = 0;
|
||||
register int level = 0, nostashraw = 0;
|
||||
int lastch;
|
||||
static int Unstacked_missed;
|
||||
|
||||
while (1) {
|
||||
lastch = ch;
|
||||
ch = GetChar();
|
||||
|
||||
if (nostashraw
|
||||
&& nostashraw >= Unstacked_missed) {
|
||||
nostashraw -= Unstacked_missed;
|
||||
Unstacked_missed = 0;
|
||||
}
|
||||
if (Unstacked) {
|
||||
nostashraw -= Unstacked;
|
||||
if (nostashraw < 0) nostashraw = 0;
|
||||
if (nostashraw < 0) {
|
||||
Unstacked_missed = -nostashraw;
|
||||
nostashraw = 0;
|
||||
}
|
||||
EnableMacros();
|
||||
}
|
||||
if (class(ch) == STIDF || class(ch) == STELL) {
|
||||
|
|
Loading…
Reference in a new issue