commit a7c93646411a3aab69437086431d1238cc911b1b
parent f5300af90abafeafaa159ba6cd0c0c8690cfde46
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Wed, 25 Feb 2004 03:19:29 +0000
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-d3aeb78583b8
Diffstat:
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -32,6 +32,8 @@ CVS code -
shortcut_init()
- Only allow verbatim input when we're not in view mode. (DLR)
- nano.c:
+ usage()
+ - Clarify the description for -T/--tabsize a bit. (DLR)
do_verbatim_input()
- Remove the now-unneeded code to disable XON, XOFF, and
suspend, since we now go into raw mode in
diff --git a/src/nano.c b/src/nano.c
@@ -652,7 +652,7 @@ void usage(void)
#ifndef NANO_SMALL
print1opt("-S", "--smooth", _("Smooth scrolling"));
#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"));
#ifdef ENABLE_COLOR
print1opt(_("-Y [str]"), _("--syntax [str]"), _("Syntax definition to use"));
diff --git a/src/utils.c b/src/utils.c
@@ -94,9 +94,10 @@ void null_at(char **data, size_t index)
void unsunder(char *str, size_t true_len)
{
assert(str != NULL);
- for (; true_len > 0; true_len--, str++)
+ for (; true_len > 0; true_len--, str++) {
if (*str == '\0')
*str = '\n';
+ }
}
/* 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)
{
assert(str != NULL);
- for (; *str != '\0'; str++)
+ for (; *str != '\0'; str++) {
if (*str == '\n')
*str = '\0';
+ }
}
#ifndef HAVE_STRCASECMP