commit 3ef6399d56de0552e8ad21fd1a0e4458136a28b2
parent f4754bfb5a1f82158aa9119bdaa2cdb8b3bbf627
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 24 Mar 2024 10:46:46 +0100
tweaks: rename a variable, away from an abbreviation
And rename its sister too.
Diffstat:
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -1084,40 +1084,40 @@ short color_to_short(const char *colorname, bool *vivid, bool *thick)
/* Parse the color name (or pair of color names) in the given string.
* Return FALSE when any color name is invalid; otherwise return TRUE. */
-bool parse_combination(char *combostr, short *fg, short *bg, int *attributes)
+bool parse_combination(char *combotext, short *fg, short *bg, int *attributes)
{
bool vivid, thick;
char *comma;
*attributes = A_NORMAL;
- if (strncmp(combostr, "bold", 4) == 0) {
+ if (strncmp(combotext, "bold", 4) == 0) {
*attributes |= A_BOLD;
- if (combostr[4] != ',') {
+ if (combotext[4] != ',') {
jot_error(N_("An attribute requires a subsequent comma"));
return FALSE;
}
- combostr += 5;
+ combotext += 5;
}
- if (strncmp(combostr, "italic", 6) == 0) {
+ if (strncmp(combotext, "italic", 6) == 0) {
#ifdef A_ITALIC
*attributes |= A_ITALIC;
#endif
- if (combostr[6] != ',') {
+ if (combotext[6] != ',') {
jot_error(N_("An attribute requires a subsequent comma"));
return FALSE;
}
- combostr += 7;
+ combotext += 7;
}
- comma = strchr(combostr, ',');
+ comma = strchr(combotext, ',');
if (comma)
*comma = '\0';
- if (!comma || comma > combostr) {
- *fg = color_to_short(combostr, &vivid, &thick);
+ if (!comma || comma > combotext) {
+ *fg = color_to_short(combotext, &vivid, &thick);
if (*fg == BAD_COLOR)
return FALSE;
if (vivid && !thick && COLORS > 8)
@@ -1230,11 +1230,11 @@ void parse_rule(char *ptr, int rex_flags)
}
/* Set the colors for the given interface element to the given combination. */
-void set_interface_color(int element, char *combostring)
+void set_interface_color(int element, char *combotext)
{
colortype *trio = nmalloc(sizeof(colortype));
- if (parse_combination(combostring, &trio->fg, &trio->bg, &trio->attributes)) {
+ if (parse_combination(combotext, &trio->fg, &trio->bg, &trio->attributes)) {
free(color_combo[element]);
color_combo[element] = trio;
} else