diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-01-20 20:39:22 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-01-20 20:39:22 +0100 |
commit | 3380e13c62e1b7a8309423f4eccfb4b6cbaa0310 (patch) | |
tree | d73aafad96da8d6390631a100853c30aee257d9c | |
parent | e3d48ee0458f1d0078da65bad99804d2ba58aaf0 (diff) | |
download | abrt-3380e13c62e1b7a8309423f4eccfb4b6cbaa0310.tar.gz abrt-3380e13c62e1b7a8309423f4eccfb4b6cbaa0310.tar.xz abrt-3380e13c62e1b7a8309423f4eccfb4b6cbaa0310.zip |
Remove unused OPTION_GROUP
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
-rw-r--r-- | src/lib/parse_options.c | 13 | ||||
-rw-r--r-- | src/lib/parse_options.h | 2 |
2 files changed, 1 insertions, 14 deletions
diff --git a/src/lib/parse_options.c b/src/lib/parse_options.c index 6f022551..bcec7869 100644 --- a/src/lib/parse_options.c +++ b/src/lib/parse_options.c @@ -28,22 +28,13 @@ void show_usage_and_die(const char *usage, const struct options *opt) { fprintf(stderr, _("Usage: %s\n"), usage); - if (opt->type != OPTION_GROUP) - fputc('\n', stderr); + fputc('\n', stderr); for (; opt->type != OPTION_END; opt++) { size_t pos; int pad; - if (opt->type == OPTION_GROUP) - { - fputc('\n', stderr); - if (*opt->help) - fprintf(stderr, "%s\n", opt->help); - continue; - } - pos = fprintf(stderr, " "); if (opt->short_name) pos += fprintf(stderr, "-%c", opt->short_name); @@ -119,7 +110,6 @@ unsigned parse_opts(int argc, char **argv, const struct options *opt, if (opt[ii].short_name) strbuf_append_strf(shortopts, "%c::", opt[ii].short_name); break; - case OPTION_GROUP: case OPTION_END: break; } @@ -185,7 +175,6 @@ unsigned parse_opts(int argc, char **argv, const struct options *opt, if (optarg) *(char**)opt[ii].value = (char*)optarg; break; - case OPTION_GROUP: case OPTION_END: break; } diff --git a/src/lib/parse_options.h b/src/lib/parse_options.h index 55ca0e2d..05d6fd90 100644 --- a/src/lib/parse_options.h +++ b/src/lib/parse_options.h @@ -25,7 +25,6 @@ extern "C" { enum parse_opt_type { OPTION_BOOL, - OPTION_GROUP, OPTION_STRING, OPTION_INTEGER, OPTION_OPTSTRING, @@ -50,7 +49,6 @@ struct options { */ #define OPT_END() { OPTION_END } #define OPT_BOOL(s, l, v, h) { OPTION_BOOL, (s), (l), (v), NULL, (h) } -#define OPT_GROUP(h) { OPTION_GROUP, 0, NULL, NULL, NULL, (h) } #define OPT_INTEGER(s, l, v, h) { OPTION_INTEGER, (s), (l), (v), "n", (h) } #define OPT_STRING(s, l, v, a, h) { OPTION_STRING, (s), (l), (v), (a), (h) } #define OPT_OPTSTRING(s, l, v, a, h) { OPTION_OPTSTRING, (s), (l), (v), (a), (h) } |