diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-09-14 08:31:59 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-09-14 09:03:12 +1000 |
commit | a758f8cefaa38292fa91e8bf7a097a5341edd3c5 (patch) | |
tree | 5bd5e02a5be9a464b7f4fa07be48ae5e3bfe3ce5 /utf8.h | |
parent | 69bfcb89ff30d027911688f66f085db48b9f74d9 (diff) | |
download | jimtcl-a758f8cefaa38292fa91e8bf7a097a5341edd3c5.zip jimtcl-a758f8cefaa38292fa91e8bf7a097a5341edd3c5.tar.gz jimtcl-a758f8cefaa38292fa91e8bf7a097a5341edd3c5.tar.bz2 |
Minor linenoise improvements
From github:
- CHA is 1-based
- Added some casts to make it easier to include in a c++
- const correctness
- chars are unsigned if not utf-8
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -22,7 +22,7 @@ int utf8_fromunicode(char *p, unsigned short uc); /* No utf-8 support. 1 byte = 1 char */ #define utf8_strlen(S, B) (B) < 0 ? strlen(S) : (B) -#define utf8_tounicode(S, CP) (*(CP) = *(S), 1) +#define utf8_tounicode(S, CP) (*(CP) = (unsigned char)*(S), 1) #define utf8_upper(C) toupper(C) #define utf8_lower(C) tolower(C) #define utf8_index(C, I) (I) |