Change Details
b2/chr.c |
70 | 70 | struct condition *cond; |
71 | 71 | |
72 | 72 | cond = alloc_type(struct condition); |
73 | | cond->value.u.name = word; |
| 73 | cond->value.u.s = word; |
74 | 74 | cond->relop = relop; |
75 | 75 | cond->next = NULL; |
76 | 76 | return cond; |
... | ... | |
84 | 84 | |
85 | 85 | for (sel = field->sel; sel; sel = sel->next) |
86 | 86 | for (cond = sel->cond; cond; cond = cond->next) |
87 | | if (!evaluate(field->fmt, cond->value.u.name, |
| 87 | if (!evaluate(field->fmt, cond->value.u.s, |
88 | 88 | &cond->value)) |
89 | 89 | yyerrorf("invalid value in selection"); |
90 | 90 | /* @@@ indicate exact location */ |
b2/comp.c |
40 | 40 | |
41 | 41 | int comp_name(const struct value *a, enum relop relop, const struct value *b) |
42 | 42 | { |
43 | | return do_comp_name(a->u.name, relop, b->u.name); |
| 43 | return do_comp_name(a->u.s, relop, b->u.s); |
44 | 44 | } |
45 | 45 | |
46 | 46 | |
b2/db.c |
110 | 110 | |
111 | 111 | /* convert parameter */ |
112 | 112 | prm->u.field = f; |
113 | | if (!evaluate(f->fmt, prm->value.u.name, &prm->value)) |
| 113 | if (!evaluate(f->fmt, prm->value.u.s, &prm->value)) |
114 | 114 | yyerrorf("invalid value for %s", f->name); |
115 | 115 | |
116 | 116 | /* add to result list */ |
b2/dump.c |
18 | 18 | |
19 | 19 | void dump_name(FILE *file, const struct format *fmt, const struct value *v) |
20 | 20 | { |
21 | | fprintf(file, "%s", v->u.name); |
| 21 | fprintf(file, "%s", v->u.s); |
22 | 22 | } |
23 | 23 | |
24 | 24 | |
b2/eval.c |
20 | 20 | |
21 | 21 | int eval_name(const struct format *fmt, const char *s, struct value *res) |
22 | 22 | { |
23 | | res->u.name = s; |
| 23 | res->u.s = s; |
24 | 24 | return 1; |
25 | 25 | } |
26 | 26 | |
b2/lang.y |
425 | 425 | $$ = alloc_type(struct param); |
426 | 426 | $$->u.name = $1; |
427 | 427 | $$->op = rel_eq; |
428 | | $$->value.u.name = $3; |
| 428 | $$->value.u.s = $3; |
429 | 429 | } |
430 | 430 | ; |
431 | 431 | |
b2/param.h |
52 | 52 | |
53 | 53 | struct value { |
54 | 54 | union { |
55 | | const char *name; |
| 55 | const char *s; |
56 | 56 | struct bitset set; |
57 | 57 | double abs; |
58 | 58 | struct rel_value { |
Download the corresponding diff file