tweaks: unabbreviate the name of a variable
parent
98f038ad96
commit
cc2b4f712c
12
src/rcfile.c
12
src/rcfile.c
|
@ -1299,10 +1299,10 @@ static void check_vitals_mapped(void)
|
||||||
void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only)
|
void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only)
|
||||||
{
|
{
|
||||||
char *buffer = NULL;
|
char *buffer = NULL;
|
||||||
ssize_t len;
|
|
||||||
size_t size = 0;
|
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;
|
char *ptr, *keyword, *option, *argument;
|
||||||
#ifdef ENABLE_COLOR
|
#ifdef ENABLE_COLOR
|
||||||
bool drop_open = FALSE;
|
bool drop_open = FALSE;
|
||||||
|
@ -1318,10 +1318,10 @@ void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only)
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
/* Strip the terminating newline and possibly a carriage return. */
|
/* Strip the terminating newline and possibly a carriage return. */
|
||||||
if (buffer[len - 1] == '\n')
|
if (buffer[length - 1] == '\n')
|
||||||
buffer[--len] = '\0';
|
buffer[--length] = '\0';
|
||||||
if (buffer[len - 1] == '\r')
|
if (buffer[length - 1] == '\r')
|
||||||
buffer[--len] = '\0';
|
buffer[--length] = '\0';
|
||||||
|
|
||||||
ptr = buffer;
|
ptr = buffer;
|
||||||
while (isblank((unsigned char)*ptr))
|
while (isblank((unsigned char)*ptr))
|
||||||
|
|
Loading…
Reference in New Issue