nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit bf72cdd81451ba9fa70a64c90077e268b669651e
parent 8e3f40155ca20f7cba8361183ee1be8670fbcc58
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun,  2 Jul 2017 12:02:13 +0200

tweaks: rename two variables, to make a little sense

And rename a third variable, to match another in its style.

Diffstat:
Msrc/rcfile.c | 16++++++++--------
Msrc/text.c | 4++--
2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/rcfile.c b/src/rcfile.c @@ -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); diff --git a/src/text.c b/src/text.c @@ -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);