diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-01-14 14:02:07 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-01-14 14:02:07 +0100 |
commit | 6cff54c0b97d162e8c0461a28b10c260495458f2 (patch) | |
tree | 45742187276df0cf25b1a9b463eddeeced08c379 /src/lib | |
parent | dc4d0c9a4034769089776755f80c20159ed26653 (diff) | |
download | abrt-6cff54c0b97d162e8c0461a28b10c260495458f2.tar.gz abrt-6cff54c0b97d162e8c0461a28b10c260495458f2.tar.xz abrt-6cff54c0b97d162e8c0461a28b10c260495458f2.zip |
preliminary cleanup patches
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/parse_options.c | 22 | ||||
-rw-r--r-- | src/lib/parse_options.h | 22 |
2 files changed, 39 insertions, 5 deletions
diff --git a/src/lib/parse_options.c b/src/lib/parse_options.c index c1a2c297..6f022551 100644 --- a/src/lib/parse_options.c +++ b/src/lib/parse_options.c @@ -1,3 +1,21 @@ +/* + Copyright (C) 2010 ABRT team + Copyright (C) 2010 RedHat Inc + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ #include <getopt.h> #include "abrtlib.h" @@ -6,7 +24,7 @@ #define USAGE_OPTS_WIDTH 24 #define USAGE_GAP 2 -void parse_usage_and_die(const char *usage, const struct options *opt) +void show_usage_and_die(const char *usage, const struct options *opt) { fprintf(stderr, _("Usage: %s\n"), usage); @@ -144,7 +162,7 @@ unsigned parse_opts(int argc, char **argv, const struct options *opt, { free(longopts); strbuf_free(shortopts); - parse_usage_and_die(usage, opt); + show_usage_and_die(usage, opt); } for (ii = 0; ii < size; ++ii) diff --git a/src/lib/parse_options.h b/src/lib/parse_options.h index 218cc2bf..55ca0e2d 100644 --- a/src/lib/parse_options.h +++ b/src/lib/parse_options.h @@ -1,8 +1,24 @@ +/* + Copyright (C) 2010 ABRT team + Copyright (C) 2010 RedHat Inc + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ #ifndef PARSE_OPTIONS_H #define PARSE_OPTIONS_H - #ifdef __cplusplus extern "C" { #endif @@ -45,8 +61,8 @@ struct options { unsigned parse_opts(int argc, char **argv, const struct options *opt, const char *usage); -#define parse_usage_and_die abrt_parse_usage_and_die -void parse_usage_and_die(const char *usage, const struct options *opt); +#define show_usage_and_die abrt_show_usage_and_die +void show_usage_and_die(const char *usage, const struct options *opt); #ifdef __cplusplus } |