From 3fff9373e31bc6ba5083ea2701fe7de190cace80 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Thu, 26 Apr 2012 02:48:08 -0300 Subject: [PATCH] b2/: choose better names for creator functions in chr.c --- b2/chr.c | 6 +++--- b2/chr.h | 6 +++--- b2/lang.y | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2/chr.c b/b2/chr.c index 119ec77..d4b9fb7 100644 --- a/b2/chr.c +++ b/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; diff --git a/b2/chr.h b/b2/chr.h index 706fbe0..602b7ba 100644 --- a/b2/chr.h +++ b/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); diff --git a/b2/lang.y b/b2/lang.y index 82cbde4..41c99b7 100644 --- a/b2/lang.y +++ b/b2/lang.y @@ -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()); } ;