From 094f39337898c837024c05d3400c34d350dd1df1 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 14 May 2016 18:34:15 -0700 Subject: [PATCH] role parsing lint --- src/options.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/options.c b/src/options.c index e24618e6a..ba4e0f1b4 100644 --- a/src/options.c +++ b/src/options.c @@ -519,6 +519,8 @@ STATIC_DCL int NDECL(msgtype_count); STATIC_DCL boolean FDECL(add_menu_coloring_parsed, (char *, int, int)); STATIC_DCL void FDECL(free_one_menu_coloring, (int)); STATIC_DCL int NDECL(count_menucolors); +STATIC_DCL boolean FDECL(parse_role_opts, (BOOLEAN_P, const char *, + char *, char **)); STATIC_DCL void FDECL(oc_to_str, (char *, char *)); STATIC_DCL void FDECL(doset_add_menu, (winid, const char *, int)); @@ -1723,18 +1725,20 @@ count_menucolors() return count; } -boolean +STATIC_OVL boolean parse_role_opts(negated, fullname, opts, opp) boolean negated; -char *fullname; +const char *fullname; char *opts; char **opp; { char *op = *opp; + if (negated) { bad_negation(fullname, FALSE); } else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) { boolean val_negated = FALSE; + while ((*op == '!') || !strncmpi(op, "no", 2)) { if (*op == '!') op++; @@ -1762,7 +1766,7 @@ boolean tinitial, tfrom_file; { char *op; unsigned num; - boolean negated, val_negated, duplicate; + boolean negated, duplicate; int i; const char *fullname; -- 2.50.1