From 24fa47dbef30035803054a9c2da8bb99806c0a13 Mon Sep 17 00:00:00 2001 From: djcb Date: Wed, 15 May 2013 00:05:21 +0300 Subject: [PATCH] * cosmetics --- configure.ac | 5 +++-- lib/mu-str.c | 9 +++++---- lib/mu-str.h | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 19b7a580..6afa9377 100644 --- a/configure.ac +++ b/configure.ac @@ -60,7 +60,8 @@ AC_ARG_ENABLE([mu4e], AS_HELP_STRING([--disable-mu4e],[Disable building mu4e])) AS_IF([test "x$enable_mu4e" != "xno"], [ AM_PATH_LISPDIR - AS_IF([test "x$lispdir" != "xno"], [emacs_version="`$EMACS --version | head -1`"]) + AS_IF([test "x$lispdir" != "xno"], + [emacs_version="`$EMACS --version | head -1`"]) AS_CASE([$emacs_version],[*23*|*24*|*25*],[build_mu4e=yes], [AC_WARN([emacs is too old to build mu4e (need emacs >= 23.x)])]) ]) @@ -164,7 +165,7 @@ AC_SUBST(XAPIAN_LIBS) ############################################################################### # we set the set the version of the MuStore (Xapian database) layout # here; it will become part of the db name, so we can automatically -# recreate the database when we incompatible have changes. +# recreate the database when we have incompatible changes. # # note that MU_STORE_SCHEMA_VERSION does not necessarily follow MU # versioning, as we hopefully don't have updates for each version; diff --git a/lib/mu-str.c b/lib/mu-str.c index 30c9246f..22675332 100644 --- a/lib/mu-str.c +++ b/lib/mu-str.c @@ -748,9 +748,10 @@ mu_str_asciify_in_place (char *buf) g_return_val_if_fail (buf, NULL); - for (c = buf; c && *c; ++c) - if (!isascii(*c)) - c[0] = '.'; + for (c = buf; c && *c; ++c) { + if (!isascii(*c) || *c < ' ') + *c = '.'; + } return buf; } @@ -765,7 +766,7 @@ mu_str_utf8ify (const char *buf) utf8 = g_strdup (buf); if (!g_utf8_validate (buf, -1, NULL)) - mu_str_asciify_in_place (utf8); + mu_str_asciify_in_place (utf8); return utf8; } diff --git a/lib/mu-str.h b/lib/mu-str.h index 73186398..0ab8bd18 100644 --- a/lib/mu-str.h +++ b/lib/mu-str.h @@ -201,7 +201,7 @@ char* mu_str_escape_c_literal (const gchar* str, gboolean in_quotes) /** * turn a string into plain ascii by replacing each non-ascii - * character with a dot ('.'). replacement is done in-place. + * character with a dot ('.'). Replacement is done in-place. * * @param buf a buffer to asciify *