mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-05 04:34:04 +02:00
b2/: choose better names for creator functions in chr.c
This commit is contained in:
parent
b3c865e6fd
commit
3fff9373e3
6
b2/chr.c
6
b2/chr.c
@ -31,7 +31,7 @@ const struct format *field_find(const char *name, const struct field *tail)
|
||||
/* ----- Construction of the field hierarchy ------------------------------- */
|
||||
|
||||
|
||||
struct field *field_new(const char *name, const struct format *fmt,
|
||||
struct field *new_field(const char *name, const struct format *fmt,
|
||||
const struct field *prev)
|
||||
{
|
||||
struct field *field;
|
||||
@ -50,7 +50,7 @@ struct field *field_new(const char *name, const struct format *fmt,
|
||||
}
|
||||
|
||||
|
||||
struct selector *field_selector(void)
|
||||
struct selector *new_selector(void)
|
||||
{
|
||||
struct selector *sel;
|
||||
|
||||
@ -63,7 +63,7 @@ struct selector *field_selector(void)
|
||||
}
|
||||
|
||||
|
||||
struct condition *field_condition(enum relop relop, const char *word)
|
||||
struct condition *new_condition(enum relop relop, const char *word)
|
||||
{
|
||||
struct condition *cond;
|
||||
|
||||
|
6
b2/chr.h
6
b2/chr.h
@ -48,10 +48,10 @@ struct field {
|
||||
|
||||
|
||||
const struct format *field_find(const char *name, const struct field *tail);
|
||||
struct field *field_new(const char *name, const struct format *fmt,
|
||||
struct field *new_field(const char *name, const struct format *fmt,
|
||||
const struct field *prev);
|
||||
struct selector *field_selector(void);
|
||||
struct condition *field_condition(enum relop relop, const char *word);
|
||||
struct selector *new_selector(void);
|
||||
struct condition *new_condition(enum relop relop, const char *word);
|
||||
void field_finalize(struct field *field);
|
||||
void field_dump(FILE *file, const struct field *field);
|
||||
|
||||
|
@ -185,7 +185,7 @@ selectors:
|
||||
}
|
||||
| conditions ':' action selectors
|
||||
{
|
||||
$$ = field_selector();
|
||||
$$ = new_selector();
|
||||
$$->cond = $1;
|
||||
$$->act = $3;
|
||||
$$->next = $4;
|
||||
@ -207,7 +207,7 @@ conditions:
|
||||
condition:
|
||||
opt_relop WORD
|
||||
{
|
||||
$$ = field_condition($1, $2);
|
||||
$$ = new_condition($1, $2);
|
||||
}
|
||||
;
|
||||
|
||||
@ -299,7 +299,7 @@ fields:
|
||||
field:
|
||||
WORD '=' format
|
||||
{
|
||||
$$ = field_new($1, $3, top_field());
|
||||
$$ = new_field($1, $3, top_field());
|
||||
}
|
||||
;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user