Commit c7b6ac5a authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

cosmetic fixes for the getopt_(long)?() calls and the switch block

dealing with the command line options


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1887 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 115 additions and 116 deletions
+115 -116
...@@ -642,7 +642,7 @@ void usage(void) ...@@ -642,7 +642,7 @@ void usage(void)
#else #else
printf(_("Usage: nano [+LINE] [option] [file]\n\n")); printf(_("Usage: nano [+LINE] [option] [file]\n\n"));
printf(_("Option\t\tMeaning\n")); printf(_("Option\t\tMeaning\n"));
#endif /* HAVE_GETOPT_LONG */ #endif
print1opt("-h, -?", "--help", N_("Show this message")); print1opt("-h, -?", "--help", N_("Show this message"));
print1opt(_("+LINE"), "", N_("Start at line number LINE")); print1opt(_("+LINE"), "", N_("Start at line number LINE"));
...@@ -3093,23 +3093,22 @@ int main(int argc, char *argv[]) ...@@ -3093,23 +3093,22 @@ int main(int argc, char *argv[])
SET(NO_WRAP); SET(NO_WRAP);
#endif #endif
while ((optchr =
#ifdef HAVE_GETOPT_LONG #ifdef HAVE_GETOPT_LONG
while ((optchr = getopt_long(argc, argv, "h?ABDE:FHIMNQ:RST:VY:Zabcdefgijklmo:pr:s:tvwxz", getopt_long(argc, argv, "h?ABDE:FHIMNQ:RST:VY:Zabcdefgijklmo:pr:s:tvwxz", long_options, NULL)
long_options, NULL)) != -1) {
#else #else
while ((optchr = getopt(argc, argv, "h?ABDE:FHIMNQ:RST:VY:Zabcdefgijklmo:pr:s:tvwxz")
getopt(argc, argv, "h?ABDE:FHIMNQ:RST:VY:Zabcdefgijklmo:pr:s:tvwxz")) != -1) {
#endif #endif
) != -1) {
switch (optchr) { switch (optchr) {
case 'a': case 'a':
case 'b': case 'b':
case 'e': case 'e':
case 'f': case 'f':
case 'g': case 'g':
case 'j': case 'j':
/* Pico compatibility flags */ /* Pico compatibility flags. */
break; break;
#ifndef NANO_SMALL #ifndef NANO_SMALL
case 'A': case 'A':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment