From 27bb4927046412f9180ca947a6c0144680c0f10d Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Mon, 2 Oct 2000 09:00:40 +0000 Subject: [PATCH] patch-1.3.9.bj.yesno.1 --- curs_lib.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) 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); -- 2.40.0