From 89e25f44bb1e7f08574fe50a3443619a83e3a83b Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Tue, 24 Jun 2008 14:58:33 -0400 Subject: [PATCH] Fixes in the CREATE-operator code --- src/feh2.c | 5 +++-- src/ick_ec.c | 4 +++- src/parser.y | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/feh2.c b/src/feh2.c index aca3ead..f4a3070 100644 --- a/src/feh2.c +++ b/src/feh2.c @@ -296,7 +296,8 @@ void typecast(node *np) if (np->opcode == MESH || np->opcode == ick_ONESPOT || np->opcode == ick_TAIL) np->width = 16; else if (np->opcode == ick_TWOSPOT || np->opcode == ick_HYBRID - || np->opcode == MINGLE || np->opcode == MESH32) + || np->opcode == MINGLE || np->opcode == MESH32 + || np->opcode == UNKNOWNOP /* AIS */) np->width = 32; else if (np->opcode == AND || np->opcode == OR || np->opcode == XOR || np->opcode == FIN || @@ -304,7 +305,7 @@ void typecast(node *np) np->width = np->rval->width; else if (np->opcode == SELECT) np->width = np->rval->width; /* n-bit select has an n-bit result */ - else if (np->opcode == UNKNOWNOP || np->opcode == INTERSECTION) /* AIS */ + else if (np->opcode == INTERSECTION) /* AIS */ np->width = (np->rval ? np->lval ? np->rval->width == 16 ? np->lval->width : 32 : np->rval->width : np->lval ? np->lval->width : 32); diff --git a/src/ick_ec.c b/src/ick_ec.c index 77839cc..1478354 100644 --- a/src/ick_ec.c +++ b/src/ick_ec.c @@ -69,6 +69,7 @@ extern ick_overop* ick_oo_twospots; /*@observer@*/ char* errstr) { int st; + uint32_t rv; st = ick_jicmatch(unopstr); if(st) { @@ -83,6 +84,7 @@ extern ick_overop* ick_oo_twospots; ick_oo_twospots[vi3]=icd[2].accessors; ick_global_createdata=icd; ick_dogoto(st, emitlineno, 1); + rv = og3(ick_twospots[vi3]); ick_retrieve(ick_twospots+vi1, ick_TWOSPOT, vi1, ick_twoforget[vi1], ick_oo_twospots); ick_retrieve(ick_twospots+vi2, ick_TWOSPOT, vi2, @@ -92,7 +94,7 @@ extern ick_overop* ick_oo_twospots; } else ick_lose(IE000, emitlineno, errstr); - return og3(ick_twospots[vi3]); + return rv; } /* Do a NEXT or goto. Gotos don't work with an empty NEXT stack, but that's diff --git a/src/parser.y b/src/parser.y index c74c7bd..901b2bc 100644 --- a/src/parser.y +++ b/src/parser.y @@ -524,7 +524,7 @@ expr : unambig {$$ = $1;} if(!firstslat) firstslat=$1; else prevslat->nextslat=$1; $1->nextslat=$3; prevslat=$3; - $3->nextslat=0; + $3->nextslat=0; opoverused=1; intern(ick_TWOSPOT, 1601); intern(ick_TWOSPOT, 1602); intern(ick_TWOSPOT, 1603);}} @@ -549,7 +549,7 @@ notanlvalue:nlunambig {$$ = $1;} if(!firstslat) firstslat=$1; else prevslat->nextslat=$1; $1->nextslat=$3; prevslat=$3; - $3->nextslat=0; + $3->nextslat=0; opoverused=1; intern(ick_TWOSPOT, 1601); intern(ick_TWOSPOT, 1602); intern(ick_TWOSPOT, 1603);}} @@ -570,7 +570,7 @@ limexpr : limunambig {$$ = $1;} if(!firstslat) firstslat=$1; else prevslat->nextslat=$1; $1->nextslat=$3; prevslat=$3; - $3->nextslat=0; + $3->nextslat=0; opoverused=1; intern(ick_TWOSPOT, 1601); intern(ick_TWOSPOT, 1602); intern(ick_TWOSPOT, 1603);}} -- 2.43.0