summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fe-common/core/fe-settings.c2
-rw-r--r--src/nls.h7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/fe-common/core/fe-settings.c b/src/fe-common/core/fe-settings.c
index 5a7b2b64..59dbdbba 100644
--- a/src/fe-common/core/fe-settings.c
+++ b/src/fe-common/core/fe-settings.c
@@ -256,7 +256,7 @@ static void settings_save_fe(const char *fname)
static void settings_save_confirm(const char *line, char *fname)
{
- if (toupper(*line) == nl_langinfo(YESEXPR))
+ if (regexp_match(line, nl_langinfo(YESEXPR))
settings_save_fe(fname);
g_free(fname);
}
diff --git a/src/nls.h b/src/nls.h
index c01f8e60..fe6ed0e5 100644
--- a/src/nls.h
+++ b/src/nls.h
@@ -1,20 +1,25 @@
#ifdef ENABLE_NLS
+
# ifdef HAVE_LIBINTL_H
# include <libintl.h>
# else
# include "../intl/libgettext.h"
# endif
+
# define _(String) gettext (String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
+
# ifdef HAVE_LANGINFO_H
# include <langinfo.h>
# else
# define nl_langinfo(x) x
-# define YESEXPR 'Y'
+# endif
+# ifndef YESEXPR
+# define YESEXPR "^[yY]"
# endif
#else
/* Stubs that do something close enough. */