mirror of git://git.sv.gnu.org/nano.git
miscellaneous cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3506 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
75850e501a
commit
660e05be3d
|
@ -167,6 +167,8 @@ CVS code -
|
||||||
Schulenberg)
|
Schulenberg)
|
||||||
- Remove redundant key checks. (DLR)
|
- Remove redundant key checks. (DLR)
|
||||||
- nano.c:
|
- nano.c:
|
||||||
|
print1opt_full()
|
||||||
|
- Rename to print_opt_full(), for consistency. (DLR)
|
||||||
usage()
|
usage()
|
||||||
- Fix inaccuracies in the usage example. (DLR)
|
- Fix inaccuracies in the usage example. (DLR)
|
||||||
renumber()
|
renumber()
|
||||||
|
|
|
@ -1961,6 +1961,10 @@ int diralphasort(const void *va, const void *vb)
|
||||||
if (!aisdir && bisdir)
|
if (!aisdir && bisdir)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
/* Standard function brain damage: We should be sorting
|
||||||
|
* alphabetically and case-insensitively according to the current
|
||||||
|
* locale, but there's no standard strcasecoll() function, so we
|
||||||
|
* have to use multibyte strcasecmp() instead, */
|
||||||
return mbstrcasecmp(a, b);
|
return mbstrcasecmp(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
84
src/nano.c
84
src/nano.c
|
@ -678,15 +678,15 @@ void mouse_init(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_GETOPT_LONG
|
#ifdef HAVE_GETOPT_LONG
|
||||||
#define print1opt(shortflag, longflag, desc) print1opt_full(shortflag, longflag, desc)
|
#define print_opt(shortflag, longflag, desc) print_opt_full(shortflag, longflag, desc)
|
||||||
#else
|
#else
|
||||||
#define print1opt(shortflag, longflag, desc) print1opt_full(shortflag, desc)
|
#define print_opt(shortflag, longflag, desc) print_opt_full(shortflag, desc)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Print one usage string to the screen. This cuts down on duplicate
|
/* 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). */
|
* translatable (the flag names). */
|
||||||
void print1opt_full(const char *shortflag
|
void print_opt_full(const char *shortflag
|
||||||
#ifdef HAVE_GETOPT_LONG
|
#ifdef HAVE_GETOPT_LONG
|
||||||
, const char *longflag
|
, const char *longflag
|
||||||
#endif
|
#endif
|
||||||
|
@ -720,101 +720,101 @@ void usage(void)
|
||||||
_("Option\t\tMeaning\n")
|
_("Option\t\tMeaning\n")
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
print1opt("-h, -?", "--help", N_("Show this message"));
|
print_opt("-h, -?", "--help", N_("Show this message"));
|
||||||
print1opt(_("+LINE,COLUMN"), "",
|
print_opt(_("+LINE,COLUMN"), "",
|
||||||
N_("Start at line LINE, column COLUMN"));
|
N_("Start at line LINE, column COLUMN"));
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
print1opt("-A", "--smarthome", N_("Enable smart home key"));
|
print_opt("-A", "--smarthome", N_("Enable smart home key"));
|
||||||
print1opt("-B", "--backup", N_("Save backups of existing files"));
|
print_opt("-B", "--backup", N_("Save backups of existing files"));
|
||||||
print1opt(_("-C [dir]"), _("--backupdir=[dir]"),
|
print_opt(_("-C [dir]"), _("--backupdir=[dir]"),
|
||||||
N_("Directory for saving unique backup files"));
|
N_("Directory for saving unique backup files"));
|
||||||
print1opt("-D", "--boldtext",
|
print_opt("-D", "--boldtext",
|
||||||
N_("Use bold instead of reverse video text"));
|
N_("Use bold instead of reverse video text"));
|
||||||
print1opt("-E", "--tabstospaces",
|
print_opt("-E", "--tabstospaces",
|
||||||
N_("Convert typed tabs to spaces"));
|
N_("Convert typed tabs to spaces"));
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
print1opt("-F", "--multibuffer", N_("Enable multiple file buffers"));
|
print_opt("-F", "--multibuffer", N_("Enable multiple file buffers"));
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_NANORC
|
#ifdef ENABLE_NANORC
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
print1opt("-H", "--historylog",
|
print_opt("-H", "--historylog",
|
||||||
N_("Log & read search/replace string history"));
|
N_("Log & read search/replace string history"));
|
||||||
#endif
|
#endif
|
||||||
print1opt("-I", "--ignorercfiles",
|
print_opt("-I", "--ignorercfiles",
|
||||||
N_("Don't look at nanorc files"));
|
N_("Don't look at nanorc files"));
|
||||||
#endif
|
#endif
|
||||||
print1opt("-K", "--rebindkeypad",
|
print_opt("-K", "--rebindkeypad",
|
||||||
N_("Fix numeric keypad key confusion problem"));
|
N_("Fix numeric keypad key confusion problem"));
|
||||||
print1opt("-L", "--nonewlines",
|
print_opt("-L", "--nonewlines",
|
||||||
N_("Don't add newlines to the ends of files"));
|
N_("Don't add newlines to the ends of files"));
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
print1opt("-N", "--noconvert",
|
print_opt("-N", "--noconvert",
|
||||||
N_("Don't convert files from DOS/Mac format"));
|
N_("Don't convert files from DOS/Mac format"));
|
||||||
#endif
|
#endif
|
||||||
print1opt("-O", "--morespace", N_("Use more space for editing"));
|
print_opt("-O", "--morespace", N_("Use more space for editing"));
|
||||||
#ifndef DISABLE_JUSTIFY
|
#ifndef DISABLE_JUSTIFY
|
||||||
print1opt(_("-Q [str]"), _("--quotestr=[str]"),
|
print_opt(_("-Q [str]"), _("--quotestr=[str]"),
|
||||||
N_("Quoting string"));
|
N_("Quoting string"));
|
||||||
#endif
|
#endif
|
||||||
print1opt("-R", "--restricted", N_("Restricted mode"));
|
print_opt("-R", "--restricted", N_("Restricted mode"));
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
print1opt("-S", "--smooth", N_("Smooth scrolling"));
|
print_opt("-S", "--smooth", N_("Smooth scrolling"));
|
||||||
#endif
|
#endif
|
||||||
print1opt(_("-T [#cols]"), _("--tabsize=[#cols]"),
|
print_opt(_("-T [#cols]"), _("--tabsize=[#cols]"),
|
||||||
N_("Set width of a tab in cols to #cols"));
|
N_("Set width of a tab in cols to #cols"));
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
print1opt("-U", "--quickblank", N_("Do quick statusbar blanking"));
|
print_opt("-U", "--quickblank", N_("Do quick statusbar blanking"));
|
||||||
#endif
|
#endif
|
||||||
print1opt("-V", "--version",
|
print_opt("-V", "--version",
|
||||||
N_("Print version information and exit"));
|
N_("Print version information and exit"));
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
print1opt("-W", "--wordbounds",
|
print_opt("-W", "--wordbounds",
|
||||||
N_("Detect word boundaries more accurately"));
|
N_("Detect word boundaries more accurately"));
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_COLOR
|
#ifdef ENABLE_COLOR
|
||||||
print1opt(_("-Y [str]"), _("--syntax=[str]"),
|
print_opt(_("-Y [str]"), _("--syntax=[str]"),
|
||||||
N_("Syntax definition to use"));
|
N_("Syntax definition to use"));
|
||||||
#endif
|
#endif
|
||||||
print1opt("-c", "--const", N_("Constantly show cursor position"));
|
print_opt("-c", "--const", N_("Constantly show cursor position"));
|
||||||
print1opt("-d", "--rebinddelete",
|
print_opt("-d", "--rebinddelete",
|
||||||
N_("Fix Backspace/Delete confusion problem"));
|
N_("Fix Backspace/Delete confusion problem"));
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
print1opt("-i", "--autoindent",
|
print_opt("-i", "--autoindent",
|
||||||
N_("Automatically indent new lines"));
|
N_("Automatically indent new lines"));
|
||||||
print1opt("-k", "--cut", N_("Cut from cursor to end of line"));
|
print_opt("-k", "--cut", N_("Cut from cursor to end of line"));
|
||||||
#endif
|
#endif
|
||||||
print1opt("-l", "--nofollow",
|
print_opt("-l", "--nofollow",
|
||||||
N_("Don't follow symbolic links, overwrite"));
|
N_("Don't follow symbolic links, overwrite"));
|
||||||
#ifndef DISABLE_MOUSE
|
#ifndef DISABLE_MOUSE
|
||||||
print1opt("-m", "--mouse", N_("Enable mouse"));
|
print_opt("-m", "--mouse", N_("Enable mouse"));
|
||||||
#endif
|
#endif
|
||||||
#ifndef DISABLE_OPERATINGDIR
|
#ifndef DISABLE_OPERATINGDIR
|
||||||
print1opt(_("-o [dir]"), _("--operatingdir=[dir]"),
|
print_opt(_("-o [dir]"), _("--operatingdir=[dir]"),
|
||||||
N_("Set operating directory"));
|
N_("Set operating directory"));
|
||||||
#endif
|
#endif
|
||||||
print1opt("-p", "--preserve",
|
print_opt("-p", "--preserve",
|
||||||
N_("Preserve XON (^Q) and XOFF (^S) keys"));
|
N_("Preserve XON (^Q) and XOFF (^S) keys"));
|
||||||
#ifndef DISABLE_WRAPJUSTIFY
|
#ifndef DISABLE_WRAPJUSTIFY
|
||||||
print1opt(_("-r [#cols]"), _("--fill=[#cols]"),
|
print_opt(_("-r [#cols]"), _("--fill=[#cols]"),
|
||||||
N_("Set fill cols to (wrap lines at) #cols"));
|
N_("Set fill cols to (wrap lines at) #cols"));
|
||||||
#endif
|
#endif
|
||||||
#ifndef DISABLE_SPELLER
|
#ifndef DISABLE_SPELLER
|
||||||
print1opt(_("-s [prog]"), _("--speller=[prog]"),
|
print_opt(_("-s [prog]"), _("--speller=[prog]"),
|
||||||
N_("Enable alternate speller"));
|
N_("Enable alternate speller"));
|
||||||
#endif
|
#endif
|
||||||
print1opt("-t", "--tempfile",
|
print_opt("-t", "--tempfile",
|
||||||
N_("Auto save on exit, don't prompt"));
|
N_("Auto save on exit, don't prompt"));
|
||||||
print1opt("-v", "--view", N_("View (read only) mode"));
|
print_opt("-v", "--view", N_("View (read only) mode"));
|
||||||
#ifndef DISABLE_WRAPPING
|
#ifndef DISABLE_WRAPPING
|
||||||
print1opt("-w", "--nowrap", N_("Don't wrap long lines"));
|
print_opt("-w", "--nowrap", N_("Don't wrap long lines"));
|
||||||
#endif
|
#endif
|
||||||
print1opt("-x", "--nohelp", N_("Don't show help window"));
|
print_opt("-x", "--nohelp", N_("Don't show help window"));
|
||||||
print1opt("-z", "--suspend", N_("Enable suspend"));
|
print_opt("-z", "--suspend", N_("Enable suspend"));
|
||||||
|
|
||||||
/* This is a special case. */
|
/* This is a special case. */
|
||||||
print1opt("-a, -b, -e,", "", NULL);
|
print_opt("-a, -b, -e,", "", NULL);
|
||||||
print1opt("-f, -g, -j", "", N_("(ignored, for Pico compatibility)"));
|
print_opt("-f, -g, -j", "", N_("(ignored, for Pico compatibility)"));
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -430,7 +430,7 @@ void window_init(void);
|
||||||
#ifndef DISABLE_MOUSE
|
#ifndef DISABLE_MOUSE
|
||||||
void mouse_init(void);
|
void mouse_init(void);
|
||||||
#endif
|
#endif
|
||||||
void print1opt_full(const char *shortflag
|
void print_opt_full(const char *shortflag
|
||||||
#ifdef HAVE_GETOPT_LONG
|
#ifdef HAVE_GETOPT_LONG
|
||||||
, const char *longflag
|
, const char *longflag
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue