commit b58418b32f362b8f4996d4e18642a7818fe87be7
parent 23190aa60fadf7c749e5262174c36d5ad487308f
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 21 Mar 2019 19:21:45 +0100
tweaks: rename a variable, to be more distinct
Diffstat:
5 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/global.c b/src/global.c
@@ -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
diff --git a/src/nano.c b/src/nano.c
@@ -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 */
diff --git a/src/proto.h b/src/proto.h
@@ -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;
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -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
diff --git a/src/winio.c b/src/winio.c
@@ -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