1
1

tweaks: rename three variables, to use full words instead of abbrevs

Этот коммит содержится в:
Benno Schulenberg 2019-06-05 14:47:46 +02:00
родитель 7c1b649eb8
Коммит cdc9482d8f

Просмотреть файл

@ -272,24 +272,24 @@ char *parse_next_regex(char *ptr)
bool compile(const char *expression, int rex_flags, regex_t **packed) bool compile(const char *expression, int rex_flags, regex_t **packed)
{ {
regex_t *compiled = nmalloc(sizeof(regex_t)); regex_t *compiled = nmalloc(sizeof(regex_t));
int rc = regcomp(compiled, expression, rex_flags); int outcome = regcomp(compiled, expression, rex_flags);
if (rc != 0) { if (outcome != 0) {
size_t len = regerror(rc, compiled, NULL, 0); size_t length = regerror(outcome, compiled, NULL, 0);
char *str = charalloc(len); char *message = charalloc(length);
regerror(rc, compiled, str, len); regerror(outcome, compiled, message, length);
rcfile_error(N_("Bad regex \"%s\": %s"), expression, str); rcfile_error(N_("Bad regex \"%s\": %s"), expression, message);
free(str); free(message);
} }
if (packed == NULL || rc != 0) { if (packed == NULL || outcome != 0) {
regfree(compiled); regfree(compiled);
free(compiled); free(compiled);
} else } else
*packed = compiled; *packed = compiled;
return (rc == 0); return (outcome == 0);
} }
/* Parse the next syntax name and its possible extension regexes from the /* Parse the next syntax name and its possible extension regexes from the