From cf71578cfd86004f5bd7d31b17e71ebd0ad30075 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 27 Mar 2014 11:06:16 +0000 Subject: [PATCH] Fixing compilation with --disable-utf8. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4690 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ src/nano.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ac0dabd7..be1d6ea3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2014-03-27 Benno Schulenberg + * src/nano.c (main) - Fix compilation with --disable-utf8. + 2014-03-27 Mike Frysinger . * configure.ac - Make --disable-nanorc with --enable-color barf. * configure.ac - Allow --disable-utf8 and --enable-utf8 to work. diff --git a/src/nano.c b/src/nano.c index 97c06c08..22305bb7 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2563,11 +2563,14 @@ int main(int argc, char **argv) #if !defined(NANO_TINY) && defined(ENABLE_NANORC) /* If whitespace wasn't specified, set its default value. */ if (whitespace == NULL) { +#ifdef ENABLE_UTF8 if (using_utf8()) { whitespace = mallocstrcpy(NULL, "»·"); whitespace_len[0] = 2; whitespace_len[1] = 2; - } else { + } else +#endif + { whitespace = mallocstrcpy(NULL, ">."); whitespace_len[0] = 1; whitespace_len[1] = 1; -- 2.39.5