tweaks: rename a variable, to be more distinct
Этот коммит содержится в:
родитель
23190aa60f
Коммит
b58418b32f
@ -135,7 +135,7 @@ char *matchbrackets = NULL;
|
||||
/* The opening and closing brackets that bracket searches can find. */
|
||||
char *whitespace = NULL;
|
||||
/* The characters used when visibly showing tabs and spaces. */
|
||||
int whitespace_len[2];
|
||||
int whitelen[2];
|
||||
/* The length in bytes of these characters. */
|
||||
#endif
|
||||
|
||||
|
@ -2536,14 +2536,14 @@ int main(int argc, char **argv)
|
||||
/* A tab is shown as a Right-Pointing Double Angle Quotation Mark
|
||||
* (U+00BB), and a space as a Middle Dot (U+00B7). */
|
||||
whitespace = mallocstrcpy(NULL, "\xC2\xBB\xC2\xB7");
|
||||
whitespace_len[0] = 2;
|
||||
whitespace_len[1] = 2;
|
||||
whitelen[0] = 2;
|
||||
whitelen[1] = 2;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
whitespace = mallocstrcpy(NULL, ">.");
|
||||
whitespace_len[0] = 1;
|
||||
whitespace_len[1] = 1;
|
||||
whitelen[0] = 1;
|
||||
whitelen[1] = 1;
|
||||
}
|
||||
}
|
||||
#endif /* !NANO_TINY */
|
||||
|
@ -103,7 +103,7 @@ extern openfilestruct *firstfile;
|
||||
#ifndef NANO_TINY
|
||||
extern char *matchbrackets;
|
||||
extern char *whitespace;
|
||||
extern int whitespace_len[2];
|
||||
extern int whitelen[2];
|
||||
#endif
|
||||
|
||||
extern const char *exit_tag;
|
||||
|
@ -1139,9 +1139,8 @@ void parse_rcfile(FILE *rcstream, bool syntax_only)
|
||||
free(option);
|
||||
} else {
|
||||
whitespace = option;
|
||||
whitespace_len[0] = parse_mbchar(whitespace, NULL, NULL);
|
||||
whitespace_len[1] = parse_mbchar(whitespace +
|
||||
whitespace_len[0], NULL, NULL);
|
||||
whitelen[0] = parse_mbchar(whitespace, NULL, NULL);
|
||||
whitelen[1] = parse_mbchar(whitespace + whitelen[0], NULL, NULL);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
|
@ -1921,9 +1921,9 @@ char *display_string(const char *buf, size_t column, size_t span,
|
||||
/* Show a space as a visible character, or as a space. */
|
||||
#ifndef NANO_TINY
|
||||
if (ISSET(WHITESPACE_DISPLAY)) {
|
||||
int i = whitespace_len[0];
|
||||
int i = whitelen[0];
|
||||
|
||||
while (i < whitespace_len[0] + whitespace_len[1])
|
||||
while (i < whitelen[0] + whitelen[1])
|
||||
converted[index++] = whitespace[i++];
|
||||
} else
|
||||
#endif
|
||||
@ -1939,7 +1939,7 @@ char *display_string(const char *buf, size_t column, size_t span,
|
||||
column == start_col)) {
|
||||
int i = 0;
|
||||
|
||||
while (i < whitespace_len[0])
|
||||
while (i < whitelen[0])
|
||||
converted[index++] = whitespace[i++];
|
||||
} else
|
||||
#endif
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user