X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=config%2Fexpr.c;h=8cee597d33a594d3d7380390aa2b697218034578;hp=667d1aa237114453c28bafac618e9552405a19c4;hb=42bc2cb9fd5367ea805f291c72c81e67fbcabde5;hpb=b049eebc30b8654df29be2960f85762f679a6699 diff --git a/config/expr.c b/config/expr.c index 667d1aa..8cee597 100644 --- a/config/expr.c +++ b/config/expr.c @@ -893,7 +893,10 @@ static enum string_value_kind expr_parse_string(const char *str, switch (type) { case S_BOOLEAN: case S_TRISTATE: - return k_string; + val->s = !strcmp(str, "n") ? 0 : + !strcmp(str, "m") ? 1 : + !strcmp(str, "y") ? 2 : -1; + return k_signed; case S_INT: val->s = strtoll(str, &tail, 10); kind = k_signed; @@ -1113,7 +1116,7 @@ void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char * fn(data, e->left.sym, e->left.sym->name); else fn(data, NULL, ""); - fn(data, NULL, e->type == E_LEQ ? ">=" : ">"); + fn(data, NULL, e->type == E_GEQ ? ">=" : ">"); fn(data, e->right.sym, e->right.sym->name); break; case E_UNEQUAL: