Don't bother trying to handle "-" arguments ourselves, getopt(3) already

does this for us.
This commit is contained in:
Tim J. Robbins 2002-05-29 23:52:55 +00:00
parent 628855e758
commit fc63032590
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97527

View File

@ -83,11 +83,8 @@ main (argc, argv)
(void) setlocale(LC_ALL, "");
obsolete(argv);
while ((ch = getopt(argc, argv, "-cdif:s:u")) != -1)
while ((ch = getopt(argc, argv, "cdif:s:u")) != -1)
switch (ch) {
case '-':
--optind;
goto done;
case 'c':
cflag = 1;
break;
@ -115,7 +112,7 @@ main (argc, argv)
usage();
}
done: argc -= optind;
argc -= optind;
argv +=optind;
/* If no flags are set, default is -d -u. */