From: Benno Schulenberg Date: Thu, 27 Mar 2014 11:06:16 +0000 (+0000) Subject: Fixing compilation with --disable-utf8. X-Git-Tag: v2.3.3~240 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=cf71578cfd86004f5bd7d31b17e71ebd0ad30075;p=nano.git Fixing compilation with --disable-utf8. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4690 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- 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;