tweaks: rename two variables, to make a little sense

And rename a third variable, to match another in its style.
master
Benno Schulenberg 2017-07-02 12:02:13 +02:00
parent 8e3f40155c
commit bf72cdd814
2 changed files with 10 additions and 10 deletions

View File

@ -899,23 +899,23 @@ void pick_up_name(const char *kind, char *ptr, char **storage)
if (!strcmp(ptr, "\"\""))
*storage = NULL;
else if (*ptr == '"') {
char *p, *q;
char *look, *take;
p = q = *storage = mallocstrcpy(NULL, ++ptr);
look = take = *storage = mallocstrcpy(NULL, ++ptr);
/* Snip out the backslashes of escaped characters. */
while (*p != '"') {
if (*p == '\0') {
while (*look != '"') {
if (*look == '\0') {
rcfile_error(N_("Argument of '%s' lacks closing \""), kind);
free(*storage);
*storage = NULL;
return;
} else if (*p == '\\' && *(p + 1) != '\0') {
p++;
} else if (*look == '\\' && *(look + 1) != '\0') {
look++;
}
*q++ = *p++;
*take++ = *look++;
}
*q = '\0';
*take = '\0';
}
else
*storage = mallocstrcpy(NULL, ptr);

View File

@ -1494,7 +1494,7 @@ bool do_wrap(filestruct *line)
/* The length of next_line. */
size_t old_x = openfile->current_x;
filestruct * oldLine = openfile->current;
filestruct * old_line = openfile->current;
/* There are three steps. First, we decide where to wrap. Then, we
* create the new wrap line. Finally, we clean up. */
@ -1600,7 +1600,7 @@ bool do_wrap(filestruct *line)
if (old_x < wrap_loc) {
openfile->current_x = old_x;
openfile->current = oldLine;
openfile->current = old_line;
prepend_wrap = TRUE;
} else {
openfile->current_x += (old_x - wrap_loc);