nano

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

commit 91c740ed3b7fecf817c4b59dfdf5aa1e444671f6
parent 5e901c41e82c101f914a42c1325e35d431d6891c
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Tue,  8 Apr 2014 12:24:52 +0000

Converting a literal UTF-8 string into its corresponding byte sequence.
Patch by David Lawrence Ramsey.


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

Diffstat:
MChangeLog | 4++++
Msrc/nano.c | 7+++++--
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,7 @@ +2014-04-08 David Lawrence Ramsey <pooka109@gmail.com> + * src/nano.c (main): Convert the literal UTF-8 whitespace string into + its corresponding byte sequence, and add a comment for it. + 2014-04-08 Benno Schulenberg <bensberg@justemail.net> * src/rcfile.c (parse_binding): Melt the binding and unbinding code, which are very similar, into a single function. diff --git a/src/nano.c b/src/nano.c @@ -2595,11 +2595,14 @@ int main(int argc, char **argv) matchbrackets = mallocstrcpy(NULL, "(<[{)>]}"); #ifdef ENABLE_NANORC - /* If whitespace wasn't specified, set its default value. */ + /* If whitespace wasn't specified, set its default value. If we're + * using UTF-8, it's Unicode 00BB (Right-Pointing Double Angle + * Quotation Mark) and Unicode 00B7 (Middle Dot). Otherwise, it's + * ">" and ".". */ if (whitespace == NULL) { #ifdef ENABLE_UTF8 if (using_utf8()) { - whitespace = mallocstrcpy(NULL, "»·"); + whitespace = mallocstrcpy(NULL, "\xC2\xBB\xC2\xB7"); whitespace_len[0] = 2; whitespace_len[1] = 2; } else