1
1

add a few comment fixes and an explicit check in rcfile.c for

rcopts[i].name's being "tabsize" (to avoid a spurious error under some
circumstances about tabsize's being 0 when there's no tabsize entry in
the rcfile)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1785 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
David Lawrence Ramsey 2004-05-29 17:05:52 +00:00
родитель 89bb93733a
Коммит 8d911991a3
3 изменённых файлов: 10 добавлений и 7 удалений

Просмотреть файл

@ -240,6 +240,9 @@ CVS code -
- rcfile.c: - rcfile.c:
- Move "rebinddelete" up in the list of options so that the list - Move "rebinddelete" up in the list of options so that the list
is in alphabetical order. (DLR) is in alphabetical order. (DLR)
- Explicitly check for rcopts[i].name's being "tabsize" to avoid
a spurious error under some circumstances about tabsize's
being 0 when there's no tabsize entry in the rcfile. (DLR)
- search.c: - search.c:
regexp_init() regexp_init()
- Overhaul for efficiency. Also check if regcomp() failed, and - Overhaul for efficiency. Also check if regcomp() failed, and

Просмотреть файл

@ -1290,8 +1290,8 @@ int do_wrap(filestruct *inptr)
* such that the last word before it ended at or before fill. If there * such that the last word before it ended at or before fill. If there
* is no such point, we settle for the first legal wrap point. * is no such point, we settle for the first legal wrap point.
* *
* A "legal wrap point" is a white-space character that is not followed by * A "legal wrap point" is a whitespace character that is not followed
* white-space. * by whitespace.
* *
* If there is no legal wrap point or we found the last character of the * If there is no legal wrap point or we found the last character of the
* line, we should return without wrapping. * line, we should return without wrapping.
@ -1299,8 +1299,8 @@ int do_wrap(filestruct *inptr)
* Note that the initial indentation does not count as a legal wrap * Note that the initial indentation does not count as a legal wrap
* point if we are going to auto-indent! * point if we are going to auto-indent!
* *
* Note that the code below could be optimised, by not calling strnlenpt() * Note that the code below could be optimized, by not calling
* so often. */ * strnlenpt() so often. */
#ifndef NANO_SMALL #ifndef NANO_SMALL
if (ISSET(AUTOINDENT)) if (ISSET(AUTOINDENT))
@ -1874,8 +1874,8 @@ int do_spell(void)
#endif /* !DISABLE_SPELLER */ #endif /* !DISABLE_SPELLER */
#if !defined(NANO_SMALL) || !defined(DISABLE_JUSTIFY) #if !defined(NANO_SMALL) || !defined(DISABLE_JUSTIFY)
/* The "indentation" of a line is the white-space between the quote part /* The "indentation" of a line is the whitespace between the quote part
* and the non-white-space of the line. */ * and the non-whitespace of the line. */
size_t indent_length(const char *line) size_t indent_length(const char *line)
{ {
size_t len = 0; size_t len = 0;

Просмотреть файл

@ -637,7 +637,7 @@ void parse_rcfile(FILE *rcstream)
alt_speller = mallocstrcpy(NULL, option); alt_speller = mallocstrcpy(NULL, option);
else else
#endif #endif
{ if (!strcasecmp(rcopts[i].name, "tabsize")) {
char *first_error; char *first_error;
/* Using strtol instead of atoi lets us /* Using strtol instead of atoi lets us