[waffle] [PATCH 0/4] waffle_string_to_enum()

Frank Henigman fjhenigman at google.com
Wed Apr 22 11:03:46 PDT 2015


Here is waffle_string_to_enum() which I suggested a while back.
The main motivation is the number of waffle applications which need
to translate command line args to a platform and api.
Not only do we avoid writing that code over and over (perhaps inconsistently),
but now those programs won't need to be updated when waffle gets a new
platform; they should just work with the new platform.
I've updated wflinfo as proof of concept.  If people like this I'll
do gl_basic too.

Frank Henigman (4):
  waffle: put waffle_enum items in a macro
  waffle: use enum list in waffle_enum_to_string()
  waffle: add waffle_string_to_enum()
  wflinfo: use waffle_string_to_enum()

 include/waffle/waffle.h      | 155 ++++++++++++++++++++++++-------------------
 man/waffle_enum.3.xml        |  24 +++++++
 src/utils/wflinfo.c          |  80 +++-------------------
 src/waffle/api/waffle_enum.c |   7 ++
 src/waffle/core/wcore_util.c | 130 +++++++++++++++++++++++-------------
 src/waffle/core/wcore_util.h |   3 +
 src/waffle/waffle.def.in     |   1 +
 7 files changed, 215 insertions(+), 185 deletions(-)

-- 
2.2.0.rc0.207.ga3a616c



More information about the waffle mailing list