From: Thomas Roessler Date: Mon, 2 Oct 2000 09:00:40 +0000 (+0000) Subject: patch-1.3.9.bj.yesno.1 X-Git-Tag: mutt-1-3-10-rel~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27bb4927046412f9180ca947a6c0144680c0f10d;p=mutt patch-1.3.9.bj.yesno.1 --- diff --git a/curs_lib.c b/curs_lib.c index 9e75a901..22da8a63 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -154,19 +154,16 @@ int mutt_yesorno (const char *msg, int def) char *expr; regex_t reyes; regex_t reno; - int reyes_ok = 0; - int reno_ok = 0; + int reyes_ok; + int reno_ok; char answer[2]; answer[1] = 0; - if ((expr = nl_langinfo (YESEXPR)) && *expr && - !regcomp (&reyes, expr, REG_NOSUB)) - reyes_ok = 1; - - if ((expr = nl_langinfo (NOEXPR)) && *expr && - !regcomp (&reno, expr, REG_NOSUB)) - reno_ok = 1; + reyes_ok = (expr = nl_langinfo (YESEXPR)) && expr[0] == '^' && + !regcomp (&reyes, expr, REG_NOSUB); + reno_ok = (expr = nl_langinfo (NOEXPR)) && expr[0] == '^' && + !regcomp (&reno, expr, REG_NOSUB); #endif CLEARLINE(LINES-1);