EXIT AUTOCRAP \o/
[apps/madmutt.git] / lib-ui / curs_lib.c
index 7562ad8..71be011 100644 (file)
@@ -14,9 +14,7 @@
 #include <lib-lib/lib-lib.h>
 
 #include <termios.h>
 #include <lib-lib/lib-lib.h>
 
 #include <termios.h>
-#ifdef HAVE_LANGINFO_YESEXPR
 #include <langinfo.h>
 #include <langinfo.h>
-#endif
 
 #include <lib-lua/lib-lua.h>
 #include <lib-sys/unix.h>
 
 #include <lib-lua/lib-lua.h>
 #include <lib-sys/unix.h>
@@ -158,8 +156,6 @@ int mutt_yesorno (const char *msg, int def)
   char *no = _("no");
   char *answer_string;
   ssize_t answer_string_len;
   char *no = _("no");
   char *answer_string;
   ssize_t answer_string_len;
-
-#ifdef HAVE_LANGINFO_YESEXPR
   char *expr;
   regex_t reyes;
   regex_t reno;
   char *expr;
   regex_t reyes;
   regex_t reno;
@@ -173,7 +169,6 @@ int mutt_yesorno (const char *msg, int def)
     !regcomp (&reyes, expr, REG_NOSUB | REG_EXTENDED);
   reno_ok = (expr = nl_langinfo (NOEXPR)) && expr[0] == '^' &&
     !regcomp (&reno, expr, REG_NOSUB | REG_EXTENDED);
     !regcomp (&reyes, expr, REG_NOSUB | REG_EXTENDED);
   reno_ok = (expr = nl_langinfo (NOEXPR)) && expr[0] == '^' &&
     !regcomp (&reno, expr, REG_NOSUB | REG_EXTENDED);
-#endif
 
   CLEARLINE (LINES - 1);
 
 
   CLEARLINE (LINES - 1);
 
@@ -200,20 +195,14 @@ int mutt_yesorno (const char *msg, int def)
       break;
     }
 
       break;
     }
 
-#ifdef HAVE_LANGINFO_YESEXPR
     answer[0] = ch.ch;
     if (reyes_ok ? (regexec (&reyes, answer, 0, 0, 0) == 0) : tolower (ch.ch) == *yes)
     answer[0] = ch.ch;
     if (reyes_ok ? (regexec (&reyes, answer, 0, 0, 0) == 0) : tolower (ch.ch) == *yes)
-#else
-    if (tolower (ch.ch) == *yes)
-#endif
     {
       def = M_YES;
       break;
     }
     else if (
     {
       def = M_YES;
       break;
     }
     else if (
-#ifdef HAVE_LANGINFO_YESEXPR
               reno_ok ? (regexec (&reno, answer, 0, 0, 0) == 0) :
               reno_ok ? (regexec (&reno, answer, 0, 0, 0) == 0) :
-#endif
               (tolower (ch.ch) == *no)) {
       def = M_NO;
       break;
               (tolower (ch.ch) == *no)) {
       def = M_NO;
       break;
@@ -222,12 +211,10 @@ int mutt_yesorno (const char *msg, int def)
     }
   }
 
     }
   }
 
-#ifdef HAVE_LANGINFO_YESEXPR
   if (reyes_ok)
     regfree (&reyes);
   if (reno_ok)
     regfree (&reno);
   if (reyes_ok)
     regfree (&reyes);
   if (reno_ok)
     regfree (&reno);
-#endif
 
   if (def != -1) {
     addstr ((char *) (def == M_YES ? yes : no));
 
   if (def != -1) {
     addstr ((char *) (def == M_YES ? yes : no));