From de36e1c120d0ff5a0bf1b00a91a19cd0eff19858 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 17 Jan 2017 12:33:46 +0100 Subject: [PATCH] tweaks: rename a variable, to be more general --- src/rcfile.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/rcfile.c b/src/rcfile.c index 42c21df1..a63e13bf 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -648,7 +648,7 @@ void parse_colors(char *ptr, int rex_flags) { short fg, bg; bool bright = FALSE; - char *fgstr; + char *item; assert(ptr != NULL); @@ -664,9 +664,9 @@ void parse_colors(char *ptr, int rex_flags) return; } - fgstr = ptr; + item = ptr; ptr = parse_next_word(ptr); - if (!parse_color_names(fgstr, &fg, &bg, &bright)) + if (!parse_color_names(item, &fg, &bg, &bright)) return; if (*ptr == '\0') { @@ -696,16 +696,16 @@ void parse_colors(char *ptr, int rex_flags) continue; } - fgstr = ++ptr; + item = ++ptr; ptr = parse_next_regex(ptr); if (ptr == NULL) break; - if (*fgstr == '\0') { + if (*item == '\0') { rcfile_error(N_("Empty regex string")); goodstart = FALSE; } else - goodstart = nregcomp(fgstr, rex_flags); + goodstart = nregcomp(item, rex_flags); /* If the starting regex is valid, initialize a new color struct, * and hook it in at the tail of the linked list. */ @@ -717,7 +717,7 @@ void parse_colors(char *ptr, int rex_flags) newcolor->bright = bright; newcolor->rex_flags = rex_flags; - newcolor->start_regex = mallocstrcpy(NULL, fgstr); + newcolor->start_regex = mallocstrcpy(NULL, item); newcolor->start = NULL; newcolor->end_regex = NULL; @@ -750,12 +750,12 @@ void parse_colors(char *ptr, int rex_flags) continue; } - fgstr = ++ptr; + item = ++ptr; ptr = parse_next_regex(ptr); if (ptr == NULL) break; - if (*fgstr == '\0') { + if (*item == '\0') { rcfile_error(N_("Empty regex string")); continue; } @@ -766,8 +766,8 @@ void parse_colors(char *ptr, int rex_flags) continue; /* If it's valid, save the ending regex string. */ - if (nregcomp(fgstr, rex_flags)) - newcolor->end_regex = mallocstrcpy(NULL, fgstr); + if (nregcomp(item, rex_flags)) + newcolor->end_regex = mallocstrcpy(NULL, item); /* Lame way to skip another static counter. */ newcolor->id = live_syntax->nmultis;