nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit cf71578cfd86004f5bd7d31b17e71ebd0ad30075
parent c55ac2bb4deee54fc96a2292a95e83172d0caac2
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Thu, 27 Mar 2014 11:06:16 +0000

Fixing compilation with --disable-utf8.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4690 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 3+++
Msrc/nano.c | 5++++-
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,6 @@ +2014-03-27 Benno Schulenberg <bensberg@justemail.net> + * src/nano.c (main) - Fix compilation with --disable-utf8. + 2014-03-27 Mike Frysinger <vapier@gentoo.org>. * 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 @@ -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;