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
master
David Lawrence Ramsey 2004-08-07 22:00:02 +00:00
parent 00d7798756
commit c7b6ac5afe
1 changed files with 116 additions and 117 deletions

View File

@ -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[])
SET(NO_WRAP); SET(NO_WRAP);
#endif #endif
#ifdef HAVE_GETOPT_LONG
while ((optchr = getopt_long(argc, argv, "h?ABDE:FHIMNQ:RST:VY:Zabcdefgijklmo:pr:s:tvwxz",
long_options, NULL)) != -1) {
#else
while ((optchr = while ((optchr =
getopt(argc, argv, "h?ABDE:FHIMNQ:RST:VY:Zabcdefgijklmo:pr:s:tvwxz")) != -1) { #ifdef HAVE_GETOPT_LONG
getopt_long(argc, argv, "h?ABDE:FHIMNQ:RST:VY:Zabcdefgijklmo:pr:s:tvwxz", long_options, NULL)
#else
getopt(argc, argv, "h?ABDE:FHIMNQ:RST:VY:Zabcdefgijklmo:pr:s:tvwxz")
#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':