diff options
| author | Charles Forsyth <charles.forsyth@gmail.com> | 2013-06-05 11:30:21 +0000 |
|---|---|---|
| committer | Charles Forsyth <charles.forsyth@gmail.com> | 2013-06-05 11:30:21 +0000 |
| commit | 2a19b85740a0bb79223305e7aae9a1eb5bd33647 (patch) | |
| tree | 615152e317d61c6fd8ad1beae85f83fb4d6885a6 | |
| parent | 26b470d63604a41f4bf17eeaa2c3f62d8db34702 (diff) | |
start adding RUNE32
| -rw-r--r-- | Linux/386/include/lib9.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Linux/386/include/lib9.h b/Linux/386/include/lib9.h index 14205872..69ff958a 100644 --- a/Linux/386/include/lib9.h +++ b/Linux/386/include/lib9.h @@ -41,7 +41,11 @@ typedef struct Proc Proc; typedef unsigned char uchar; typedef signed char schar; +#ifdef RUNE32 +typedef unsigned int Rune; +#else typedef unsigned short Rune; +#endif typedef long long int vlong; typedef unsigned long long int uvlong; typedef unsigned int u32int; @@ -75,10 +79,21 @@ extern int tokenize(char*, char**, int); enum { +#ifdef RUNE32 + UTFmax = 4, /* maximum bytes per rune */ + Runesync = 0x80, /* cannot represent part of a UTF sequence (<) */ + Runeself = 0x80, /* rune and UTF sequences are the same (<) */ + Runeerror = 0xFFFD, /* decoding error in UTF */ + Runemax = 0x10FFFF, /* 21-bit rune */ + Runemask = 0x1FFFFF, /* bits used by runes (see grep) */ +#else UTFmax = 3, /* maximum bytes per rune */ Runesync = 0x80, /* cannot represent part of a UTF sequence (<) */ Runeself = 0x80, /* rune and UTF sequences are the same (<) */ Runeerror = 0x80 /* decoding error in UTF */ + Runemax = 0xFFFF, /* 16-bit rune */ + Runemask = 0xFFFF, /* bits used by runes (see grep) */ +#endif }; /* |
