- files.c:
do_browser()
- Rename variable lineno to fileline to avoid confusion. (DLR)
+- nano.c:
+ print1opt()
+ - Don't include longflag if HAVE_GETOPT_LONG isn't defined.
+ Rename this function to print1opt_full(), leave out the
+ longflag parameter if HAVE_GETOPT_LONG isn't defined, and make
+ print1opt() a macro for print1opt_full() that does that
+ without the need for a lot of extra #ifdefs. (David
+ Benbennick) DLR: Rename print1opt_f() to print1opt_full().
+ - Rework the special case of options that are ignored for Pico
+ compatibility so that they display more neatly when
+ HAVE_GETOPT_LONG isn't defined. (DLR)
+ usage()
+ - Fix erroneous #ifdef that resulted in the -d/--rebinddelete
+ and -k/--cut options' not being printed when NANO_SMALL was
+ defined. (DLR)
- utils.c:
regexec_safe()
- Rename to safe_regexec() for consistency. (DLR)
}
/* Print one usage string to the screen. This cuts down on duplicate
- * strings to translate and leaves out the parts that shouldn't be
+ * strings to translate, and leaves out the parts that shouldn't be
* translatable (the flag names). */
-void print1opt(const char *shortflag, const char *longflag, const char
- *desc)
+void print1opt_full(const char *shortflag
+#ifdef HAVE_GETOPT_LONG
+ , const char *longflag
+#endif
+ , const char *desc)
{
printf(" %s\t", shortflag);
if (strlen(shortflag) < 8)
#endif
print1opt("-Z", "--restricted", N_("Restricted mode"));
print1opt("-c", "--const", N_("Constantly show cursor position"));
-#ifndef NANO_SMALL
print1opt("-d", "--rebinddelete", N_("Fix Backspace/Delete confusion problem"));
+#ifndef NANO_SMALL
print1opt("-i", "--autoindent", N_("Automatically indent new lines"));
- print1opt("-k", "--cut", N_("Cut from cursor to end of line"));
#endif
+ print1opt("-k", "--cut", N_("Cut from cursor to end of line"));
print1opt("-l", "--nofollow", N_("Don't follow symbolic links, overwrite"));
#ifndef DISABLE_MOUSE
print1opt("-m", "--mouse", N_("Enable mouse"));
print1opt("-z", "--suspend", N_("Enable suspend"));
/* This is a special case. */
- printf(" %s\t\t\t%s\n","-a, -b, -e, -f, -g, -j", _("(ignored, for Pico compatibility)"));
+ print1opt("-a, -b, -e,", "", "");
+ print1opt("-f, -g, -j", "", _("(ignored, for Pico compatibility)"));
exit(0);
}
#define charmove(dest, src, n) memmove(dest, src, (n) * sizeof(char))
#define charcpy(dest, src, n) memcpy(dest, src, (n) * sizeof(char))
+/* Other macros. */
+#ifdef HAVE_GETOPT_LONG
+#define print1opt(shortflag, longflag, desc) print1opt_full(shortflag, longflag, desc)
+#else
+#define print1opt(shortflag, longflag, desc) print1opt_full(shortflag, desc)
+#endif
+
#ifdef BROKEN_REGEXEC
#undef regexec
#define regexec(preg, string, nmatch, pmatch, eflags) safe_regexec(preg, string, nmatch, pmatch, eflags)