1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-25 18:19:00 +02:00

(main): Use getopt_long rather than getopt.

This commit is contained in:
Paul Eggert
2004-11-17 00:56:25 +00:00
parent 6fca9011e5
commit d1bc398fa0
22 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "+") != -1)
if (getopt_long (argc, argv, "+", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (argc < optind + 1)
+1 -1
View File
@@ -76,7 +76,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "+") != -1)
if (getopt_long (argc, argv, "+", NULL, NULL) != -1)
usage (EXIT_FAIL);
if (argc <= optind)
+1 -1
View File
@@ -298,7 +298,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
have_read_stdin = false;
+1 -1
View File
@@ -1447,7 +1447,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
/* Don't close stdout on exit from here on. */
+1 -1
View File
@@ -78,7 +78,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "+") != -1)
if (getopt_long (argc, argv, "+", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (argc < optind + 1)
+1 -1
View File
@@ -202,7 +202,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (argc <= optind)
+1 -1
View File
@@ -74,7 +74,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (optind < argc)
+1 -1
View File
@@ -91,7 +91,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (argc == optind + 1)
+1 -1
View File
@@ -74,7 +74,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (argc < optind + 2)
+1 -1
View File
@@ -68,7 +68,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (optind < argc)
+1 -1
View File
@@ -87,7 +87,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "+") != -1)
if (getopt_long (argc, argv, "+", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (argc <= optind)
+1 -1
View File
@@ -91,7 +91,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "+") != -1)
if (getopt_long (argc, argv, "+", NULL, NULL) != -1)
usage (PRINTENV_FAILURE);
if (optind >= argc)
+1 -1
View File
@@ -306,7 +306,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (optind < argc)
+1 -1
View File
@@ -86,7 +86,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "+") != -1)
if (getopt_long (argc, argv, "+", NULL, NULL) != -1)
usage (SETUIDGID_FAILURE);
if (argc <= optind + 1)
+1 -1
View File
@@ -113,7 +113,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (argc == 1)
+1 -1
View File
@@ -67,7 +67,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (optind < argc)
+1 -1
View File
@@ -552,7 +552,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
have_read_stdin = false;
+1 -1
View File
@@ -73,7 +73,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (argc < optind + 1)
+1 -1
View File
@@ -219,7 +219,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
switch (argc - optind)
+1 -1
View File
@@ -135,7 +135,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
switch (argc - optind)
+1 -1
View File
@@ -76,7 +76,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "") != -1)
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (optind != argc)
+1 -1
View File
@@ -73,7 +73,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
usage, AUTHORS, (char const *) NULL);
if (getopt (argc, argv, "+") != -1)
if (getopt_long (argc, argv, "+", NULL, NULL) != -1)
usage (EXIT_FAILURE);
if (argc <= optind)