tweaks: put check for -h and -l options in their alphabetical positions

And put the Pico-compatibility flags last, as normally they are never
given.
master
Benno Schulenberg 2018-05-12 19:44:14 +02:00
parent cecf453b14
commit ae1ba5e259
1 changed files with 12 additions and 13 deletions

View File

@ -2070,12 +2070,6 @@ int main(int argc, char **argv)
"ABC:DEFGHIKLMNOPQ:RST:UVWX:Y:abcdefghijklmno:pqr:s:tuvwxyz$",
long_options, NULL)) != -1) {
switch (optchr) {
case 'b':
case 'e':
case 'f':
case 'j':
/* Pico compatibility flags. */
break;
#ifndef NANO_TINY
case 'A':
SET(SMART_HOME);
@ -2192,6 +2186,9 @@ int main(int argc, char **argv)
case 'g':
SET(SHOW_CURSOR);
break;
case 'h':
usage();
exit(0);
#ifndef NANO_TINY
case 'i':
SET(AUTOINDENT);
@ -2200,6 +2197,11 @@ int main(int argc, char **argv)
SET(CUT_FROM_CURSOR);
break;
#endif
#ifdef ENABLE_LINENUMBERS
case 'l':
SET(LINE_NUMBERS);
break;
#endif
#ifdef ENABLE_MOUSE
case 'm':
SET(USE_MOUSE);
@ -2275,14 +2277,11 @@ int main(int argc, char **argv)
SET(SOFTWRAP);
break;
#endif
#ifdef ENABLE_LINENUMBERS
case 'l':
SET(LINE_NUMBERS);
case 'b': /* Pico compatibility flags. */
case 'e':
case 'f':
case 'j':
break;
#endif
case 'h':
usage();
exit(0);
default:
printf(_("Type '%s -h' for a list of available options.\n"), argv[0]);
exit(1);