clarify the description of -T/--tabsize a bit in usage(), and add extra
{}'s to sunder() and unsunder() to make them a bit easier to read git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1662 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
f5300af90a
commit
a7c9364641
|
@ -32,6 +32,8 @@ CVS code -
|
||||||
shortcut_init()
|
shortcut_init()
|
||||||
- Only allow verbatim input when we're not in view mode. (DLR)
|
- Only allow verbatim input when we're not in view mode. (DLR)
|
||||||
- nano.c:
|
- nano.c:
|
||||||
|
usage()
|
||||||
|
- Clarify the description for -T/--tabsize a bit. (DLR)
|
||||||
do_verbatim_input()
|
do_verbatim_input()
|
||||||
- Remove the now-unneeded code to disable XON, XOFF, and
|
- Remove the now-unneeded code to disable XON, XOFF, and
|
||||||
suspend, since we now go into raw mode in
|
suspend, since we now go into raw mode in
|
||||||
|
|
|
@ -652,7 +652,7 @@ void usage(void)
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
print1opt("-S", "--smooth", _("Smooth scrolling"));
|
print1opt("-S", "--smooth", _("Smooth scrolling"));
|
||||||
#endif
|
#endif
|
||||||
print1opt(_("-T [num]"), _("--tabsize=[num]"), _("Set width of a tab to num"));
|
print1opt(_("-T [#cols]"), _("--tabsize=[#cols]"), _("Set width of a tab in cols to #cols"));
|
||||||
print1opt("-V", "--version", _("Print version information and exit"));
|
print1opt("-V", "--version", _("Print version information and exit"));
|
||||||
#ifdef ENABLE_COLOR
|
#ifdef ENABLE_COLOR
|
||||||
print1opt(_("-Y [str]"), _("--syntax [str]"), _("Syntax definition to use"));
|
print1opt(_("-Y [str]"), _("--syntax [str]"), _("Syntax definition to use"));
|
||||||
|
|
|
@ -94,9 +94,10 @@ void null_at(char **data, size_t index)
|
||||||
void unsunder(char *str, size_t true_len)
|
void unsunder(char *str, size_t true_len)
|
||||||
{
|
{
|
||||||
assert(str != NULL);
|
assert(str != NULL);
|
||||||
for (; true_len > 0; true_len--, str++)
|
for (; true_len > 0; true_len--, str++) {
|
||||||
if (*str == '\0')
|
if (*str == '\0')
|
||||||
*str = '\n';
|
*str = '\n';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For non-null-terminated lines. A line, by definition, shouldn't
|
/* For non-null-terminated lines. A line, by definition, shouldn't
|
||||||
|
@ -104,9 +105,10 @@ void unsunder(char *str, size_t true_len)
|
||||||
void sunder(char *str)
|
void sunder(char *str)
|
||||||
{
|
{
|
||||||
assert(str != NULL);
|
assert(str != NULL);
|
||||||
for (; *str != '\0'; str++)
|
for (; *str != '\0'; str++) {
|
||||||
if (*str == '\n')
|
if (*str == '\n')
|
||||||
*str = '\0';
|
*str = '\0';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_STRCASECMP
|
#ifndef HAVE_STRCASECMP
|
||||||
|
|
Loading…
Reference in New Issue