diff options
| -rw-r--r-- | utils/acid/acid.h | 2 | ||||
| -rw-r--r-- | utils/acid/exec.c | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/utils/acid/acid.h b/utils/acid/acid.h index cb88a554..224b984d 100644 --- a/utils/acid/acid.h +++ b/utils/acid/acid.h @@ -178,7 +178,7 @@ List* addlist(List*, List*); List* al(int); Node* an(int, Node*, Node*); void append(Node*, Node*, Node*); -int bool(Node*); +int boolx(Node*); void build(Node*); void call(char*, Node*, Node*, Node*, Node*); void checkqid(int, int); diff --git a/utils/acid/exec.c b/utils/acid/exec.c index f77eddc2..7f819a4b 100644 --- a/utils/acid/exec.c +++ b/utils/acid/exec.c @@ -129,18 +129,18 @@ execute(Node *n) case OIF: expr(l, &res); if(r && r->op == OELSE) { - if(bool(&res)) + if(boolx(&res)) execute(r->left); else execute(r->right); } - else if(bool(&res)) + else if(boolx(&res)) execute(r); break; case OWHILE: for(;;) { expr(l, &res); - if(!bool(&res)) + if(!boolx(&res)) break; execute(r); } @@ -161,9 +161,9 @@ execute(Node *n) } int -bool(Node *n) +boolx(Node *n) { - int true = 0; + int truef = 0; if(n->op != OCONST) fatal("bool: not const"); @@ -171,22 +171,22 @@ bool(Node *n) switch(n->type) { case TINT: if(n->nstore.u0.sival != 0) - true = 1; + truef = 1; break; case TFLOAT: if(n->nstore.u0.sfval != 0.0) - true = 1; + truef = 1; break; case TSTRING: if(n->nstore.u0.sstring->len) - true = 1; + truef = 1; break; case TLIST: if(n->nstore.u0.sl) - true = 1; + truef = 1; break; } - return true; + return truef; } void |
