#include <stdio.h>
#include "system.h"
-#include "getline.h"
-#include "long-options.h"
#include "closeout.h"
+#include "dircolors.h"
#include "error.h"
-#include "long-options.h"
+#include "getline.h"
#include "obstack.h"
-#include "dircolors.h"
+#include "version-etc.h"
+
+/* The official name of this program (e.g., no `g' prefix). */
+#define PROGRAM_NAME "dircolors"
#define obstack_chunk_alloc malloc
#define obstack_chunk_free free
{"csh", no_argument, NULL, 'c'},
{"c-shell", no_argument, NULL, 'c'},
{"print-database", no_argument, NULL, 'p'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, "dircolors", GNU_PACKAGE, VERSION,
- "H. Peter Anvin", usage);
-
while ((optc = getopt_long (argc, argv, "bcp", long_options, NULL)) != -1)
switch (optc)
{
print_database = 1;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, "H. Peter Anvin");
+
default:
usage (1);
}