nano

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

commit cc2b4f712c763d2b0b13cce4a2dd1a60c9f7d763
parent 98f038ad96183ed4cca947180928d03002f87201
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun,  9 Feb 2020 12:02:37 +0100

tweaks: unabbreviate the name of a variable

Diffstat:
Msrc/rcfile.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/rcfile.c b/src/rcfile.c @@ -1299,10 +1299,10 @@ static void check_vitals_mapped(void) void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only) { char *buffer = NULL; - ssize_t len; size_t size = 0; + ssize_t length; - while ((len = getline(&buffer, &size, rcstream)) > 0) { + while ((length = getline(&buffer, &size, rcstream)) > 0) { char *ptr, *keyword, *option, *argument; #ifdef ENABLE_COLOR bool drop_open = FALSE; @@ -1318,10 +1318,10 @@ void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only) continue; #endif /* Strip the terminating newline and possibly a carriage return. */ - if (buffer[len - 1] == '\n') - buffer[--len] = '\0'; - if (buffer[len - 1] == '\r') - buffer[--len] = '\0'; + if (buffer[length - 1] == '\n') + buffer[--length] = '\0'; + if (buffer[length - 1] == '\r') + buffer[--length] = '\0'; ptr = buffer; while (isblank((unsigned char)*ptr))