diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-06-07 09:42:39 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-07-02 10:09:13 +0200 |
commit | e85501e5ef0d990539090f4d12dbb3eae487c971 (patch) | |
tree | f3acd91b9e7d076150e6efd3e181fb6ca0b38838 /src/calcurse.h | |
parent | c8029a5a1356ee7e684dc6dfe4001bcc739bc2a6 (diff) | |
download | calcurse-e85501e5ef0d990539090f4d12dbb3eae487c971.zip |
Use constant for maximum UTF-8 character size
Introduce a UTF8_MAXLEN constant instead of using the literal value "6"
at various places.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/calcurse.h')
-rw-r--r-- | src/calcurse.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/calcurse.h b/src/calcurse.h index 8e71a27..315f8e1 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -200,6 +200,7 @@ #define TOSTRING(x) STRINGIFY(x) #define __FILE_POS__ __FILE__ ":" TOSTRING(__LINE__) +#define UTF8_MAXLEN 6 #define UTF8_LENGTH(ch) ((unsigned char)ch >= 0xFC ? 6 : \ ((unsigned char)ch >= 0xF8 ? 5 : \ ((unsigned char)ch >= 0xF0 ? 4 : \ |