mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-22 21:32:29 +02:00
b2/: rename "name" field in struct value to more generic "s", for better sharing
This commit is contained in:
parent
fdac542592
commit
061e8f5872
4
b2/chr.c
4
b2/chr.c
@ -70,7 +70,7 @@ struct condition *new_condition(enum relop relop, const char *word)
|
|||||||
struct condition *cond;
|
struct condition *cond;
|
||||||
|
|
||||||
cond = alloc_type(struct condition);
|
cond = alloc_type(struct condition);
|
||||||
cond->value.u.name = word;
|
cond->value.u.s = word;
|
||||||
cond->relop = relop;
|
cond->relop = relop;
|
||||||
cond->next = NULL;
|
cond->next = NULL;
|
||||||
return cond;
|
return cond;
|
||||||
@ -84,7 +84,7 @@ void field_finalize(struct field *field)
|
|||||||
|
|
||||||
for (sel = field->sel; sel; sel = sel->next)
|
for (sel = field->sel; sel; sel = sel->next)
|
||||||
for (cond = sel->cond; cond; cond = cond->next)
|
for (cond = sel->cond; cond; cond = cond->next)
|
||||||
if (!evaluate(field->fmt, cond->value.u.name,
|
if (!evaluate(field->fmt, cond->value.u.s,
|
||||||
&cond->value))
|
&cond->value))
|
||||||
yyerrorf("invalid value in selection");
|
yyerrorf("invalid value in selection");
|
||||||
/* @@@ indicate exact location */
|
/* @@@ indicate exact location */
|
||||||
|
@ -40,7 +40,7 @@ static int do_comp_name(const char *a, enum relop relop, const char *b)
|
|||||||
|
|
||||||
int comp_name(const struct value *a, enum relop relop, const struct value *b)
|
int comp_name(const struct value *a, enum relop relop, const struct value *b)
|
||||||
{
|
{
|
||||||
return do_comp_name(a->u.name, relop, b->u.name);
|
return do_comp_name(a->u.s, relop, b->u.s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
2
b2/db.c
2
b2/db.c
@ -110,7 +110,7 @@ static void convert_params(struct param **params,
|
|||||||
|
|
||||||
/* convert parameter */
|
/* convert parameter */
|
||||||
prm->u.field = f;
|
prm->u.field = f;
|
||||||
if (!evaluate(f->fmt, prm->value.u.name, &prm->value))
|
if (!evaluate(f->fmt, prm->value.u.s, &prm->value))
|
||||||
yyerrorf("invalid value for %s", f->name);
|
yyerrorf("invalid value for %s", f->name);
|
||||||
|
|
||||||
/* add to result list */
|
/* add to result list */
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
void dump_name(FILE *file, const struct format *fmt, const struct value *v)
|
void dump_name(FILE *file, const struct format *fmt, const struct value *v)
|
||||||
{
|
{
|
||||||
fprintf(file, "%s", v->u.name);
|
fprintf(file, "%s", v->u.s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
int eval_name(const struct format *fmt, const char *s, struct value *res)
|
int eval_name(const struct format *fmt, const char *s, struct value *res)
|
||||||
{
|
{
|
||||||
res->u.name = s;
|
res->u.s = s;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -425,7 +425,7 @@ param:
|
|||||||
$$ = alloc_type(struct param);
|
$$ = alloc_type(struct param);
|
||||||
$$->u.name = $1;
|
$$->u.name = $1;
|
||||||
$$->op = rel_eq;
|
$$->op = rel_eq;
|
||||||
$$->value.u.name = $3;
|
$$->value.u.s = $3;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ struct format {
|
|||||||
|
|
||||||
struct value {
|
struct value {
|
||||||
union {
|
union {
|
||||||
const char *name;
|
const char *s;
|
||||||
struct bitset set;
|
struct bitset set;
|
||||||
double abs;
|
double abs;
|
||||||
struct rel_value {
|
struct rel_value {
|
||||||
|
Loading…
Reference in New Issue
Block a user