tweaks: rename two variables, to make a little sense
And rename a third variable, to match another in its style.master
parent
8e3f40155c
commit
bf72cdd814
16
src/rcfile.c
16
src/rcfile.c
|
@ -899,23 +899,23 @@ void pick_up_name(const char *kind, char *ptr, char **storage)
|
||||||
if (!strcmp(ptr, "\"\""))
|
if (!strcmp(ptr, "\"\""))
|
||||||
*storage = NULL;
|
*storage = NULL;
|
||||||
else if (*ptr == '"') {
|
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. */
|
/* Snip out the backslashes of escaped characters. */
|
||||||
while (*p != '"') {
|
while (*look != '"') {
|
||||||
if (*p == '\0') {
|
if (*look == '\0') {
|
||||||
rcfile_error(N_("Argument of '%s' lacks closing \""), kind);
|
rcfile_error(N_("Argument of '%s' lacks closing \""), kind);
|
||||||
free(*storage);
|
free(*storage);
|
||||||
*storage = NULL;
|
*storage = NULL;
|
||||||
return;
|
return;
|
||||||
} else if (*p == '\\' && *(p + 1) != '\0') {
|
} else if (*look == '\\' && *(look + 1) != '\0') {
|
||||||
p++;
|
look++;
|
||||||
}
|
}
|
||||||
*q++ = *p++;
|
*take++ = *look++;
|
||||||
}
|
}
|
||||||
*q = '\0';
|
*take = '\0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*storage = mallocstrcpy(NULL, ptr);
|
*storage = mallocstrcpy(NULL, ptr);
|
||||||
|
|
|
@ -1494,7 +1494,7 @@ bool do_wrap(filestruct *line)
|
||||||
/* The length of next_line. */
|
/* The length of next_line. */
|
||||||
|
|
||||||
size_t old_x = openfile->current_x;
|
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
|
/* There are three steps. First, we decide where to wrap. Then, we
|
||||||
* create the new wrap line. Finally, we clean up. */
|
* create the new wrap line. Finally, we clean up. */
|
||||||
|
@ -1600,7 +1600,7 @@ bool do_wrap(filestruct *line)
|
||||||
|
|
||||||
if (old_x < wrap_loc) {
|
if (old_x < wrap_loc) {
|
||||||
openfile->current_x = old_x;
|
openfile->current_x = old_x;
|
||||||
openfile->current = oldLine;
|
openfile->current = old_line;
|
||||||
prepend_wrap = TRUE;
|
prepend_wrap = TRUE;
|
||||||
} else {
|
} else {
|
||||||
openfile->current_x += (old_x - wrap_loc);
|
openfile->current_x += (old_x - wrap_loc);
|
||||||
|
|
Loading…
Reference in New Issue