#include "system.h"
#include "error.h"
#include "euidaccess.h"
-#include "long-options.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "pathchk"
static struct option const longopts[] =
{
{"portability", no_argument, NULL, 'p'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
atexit (close_stdout);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- usage, AUTHORS, (char const *) NULL);
-
- while ((optc = getopt_long (argc, argv, "p", longopts, NULL)) != -1)
+ while ((optc = getopt_long (argc, argv, "+p", longopts, NULL)) != -1)
{
switch (optc)
{
- case 0:
- break;
-
case 'p':
check_portability = true;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (EXIT_FAILURE);
}