diff options
Diffstat (limited to 'src/rm.c')
-rw-r--r-- | src/rm.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -52,9 +52,15 @@ #include "system.h" #include "closeout.h" #include "error.h" -#include "long-options.h" #include "remove.h" #include "save-cwd.h" +#include "version-etc.h" + +/* The official name of this program (e.g., no `g' prefix). */ +#define PROGRAM_NAME "rm" + +#define AUTHORS \ + "Paul Rubin, David MacKenzie, Richard Stallman, and Jim Meyering" void strip_trailing_slashes (); @@ -68,6 +74,8 @@ static struct option const long_opts[] = {"interactive", no_argument, NULL, 'i'}, {"recursive", no_argument, NULL, 'r'}, {"verbose", no_argument, NULL, 'v'}, + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, {NULL, 0, NULL, 0} }; @@ -120,10 +128,6 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - parse_long_options (argc, argv, "rm", GNU_PACKAGE, VERSION, - "Paul Rubin, David MacKenzie, Richard Stallman, and Jim Meyering", - usage); - rm_option_init (&x); while ((c = getopt_long (argc, argv, "dfirvR", long_opts, NULL)) != -1) @@ -150,6 +154,8 @@ main (int argc, char **argv) case 'v': x.verbose = 1; break; + case_GETOPT_HELP_CHAR; + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); default: usage (1); } |