diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2017-09-17 22:24:37 +0200 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2017-09-17 22:24:37 +0200 |
commit | ec10077b9f943212a9c0c634d79ada4f88b0d0c1 (patch) | |
tree | 96f1e3e0be013484bd500290946deea19971b564 /src/utf8.h | |
parent | ca1ed401ddfc1ab88b532c3f955c2ee02435be42 (diff) | |
download | ratpoison-ec10077b9f943212a9c0c634d79ada4f88b0d0c1.zip |
Move RP_IS_UTF8_* macros in utf8.h
Only used in editor.c when introduced, but they're used elsewhere since.
Diffstat (limited to 'src/utf8.h')
-rw-r--r-- | src/utf8.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1,6 +1,11 @@ #ifndef UTF8_H #define UTF8_H +/* UTF-8 handling macros */ +#define RP_IS_UTF8_CHAR(c) (utf8_locale && (c) & 0xC0) +#define RP_IS_UTF8_START(c) (utf8_locale && ((c) & 0xC0) == 0xC0) +#define RP_IS_UTF8_CONT(c) (utf8_locale && ((c) & 0xC0) == 0x80) + extern int utf8_locale; int utf8_check_locale(void); |