diff options
author | Dave Beckett <dave@dajobe.org> | 2010-02-05 21:27:56 -0800 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2010-02-05 21:27:56 -0800 |
commit | 7f58e2ceec41b42f8897afcee94b2fc6183a0fc0 (patch) | |
tree | 87e97a050863f15e4d6fd96aa838616ef6023c3e /utils | |
parent | 07d278e1a9a6e8e3a018136f15f84dc7845341fe (diff) | |
download | raptor-7f58e2ceec41b42f8897afcee94b2fc6183a0fc0.tar.gz |
Use raptor_option_get_value_type_label to print option types
Diffstat (limited to 'utils')
-rw-r--r-- | utils/rapper.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/utils/rapper.c b/utils/rapper.c index 58bb078c..9b7c4c14 100644 --- a/utils/rapper.c +++ b/utils/rapper.c @@ -376,10 +376,11 @@ main(int argc, char *argv[]) const char *option_name; const char *option_label; if(!raptor_world_enumerate_parser_options(world, (raptor_option)i, &option_name, NULL, &option_label)) { - raptor_option_value_type value_type = raptor_option_get_value_type((raptor_option)i); - const char *option_type = (value_type == RAPTOR_OPTION_VALUE_TYPE_BOOL || value_type == RAPTOR_OPTION_VALUE_TYPE_INT) ? "" : " (string)"; - fprintf(stderr, " %-21s %s%s\n", option_name, option_label, - option_type); + raptor_option_value_type value_type; + value_type = raptor_option_get_value_type((raptor_option)i); + fprintf(stderr, " %-21s %s (%s)\n", + option_name, option_label, + raptor_option_get_value_type_label(value_type)); } } fprintf(stderr, "%s: Valid serializer options are:\n", program); @@ -387,10 +388,11 @@ main(int argc, char *argv[]) const char *option_name; const char *option_label; if(!raptor_world_enumerate_serializer_options(world, (raptor_option)i, &option_name, NULL, &option_label)) { - raptor_option_value_type value_type = raptor_option_get_value_type((raptor_option)i); - const char *option_type = (value_type == RAPTOR_OPTION_VALUE_TYPE_BOOL || value_type == RAPTOR_OPTION_VALUE_TYPE_INT) ? "" : " (string)"; - fprintf(stderr, " %-21s %s%s\n", option_name, option_label, - option_type); + raptor_option_value_type value_type; + value_type = raptor_option_get_value_type((raptor_option)i); + fprintf(stderr, " %-21s %s (%s)\n", + option_name, option_label, + raptor_option_get_value_type_label(value_type)); } } fputs("Options are set with `" HELP_ARG(f, option) " OPTION = VALUE or `-f OPTION'\nand take a decimal integer VALUE except where noted, defaulting to 1 if omitted.\n", stderr); |