From d90014f6464dd122afdd1a8cd81933e72c72619a Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Fri, 7 Jun 2013 08:49:25 +0000 Subject: UTFmax increased, Runeerror changed --- Linux/386/include/lib9.h | 13 ------------- Linux/arm/include/lib9.h | 6 ++++-- Linux/power/include/lib9.h | 6 ++++-- Linux/spim/include/lib9.h | 6 ++++-- 4 files changed, 12 insertions(+), 19 deletions(-) (limited to 'Linux') diff --git a/Linux/386/include/lib9.h b/Linux/386/include/lib9.h index 69ff958a..e278d94a 100644 --- a/Linux/386/include/lib9.h +++ b/Linux/386/include/lib9.h @@ -41,11 +41,7 @@ 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; @@ -79,21 +75,12 @@ 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 }; /* diff --git a/Linux/arm/include/lib9.h b/Linux/arm/include/lib9.h index 1a6628b1..002e3d15 100644 --- a/Linux/arm/include/lib9.h +++ b/Linux/arm/include/lib9.h @@ -75,10 +75,12 @@ extern int tokenize(char*, char**, int); enum { - UTFmax = 3, /* maximum bytes per rune */ + 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 = 0x80 /* decoding error in UTF */ + Runeerror = 0xFFFD, /* decoding error in UTF */ + Runemax = 0x10FFFF, /* 21-bit rune */ + Runemask = 0x1FFFFF, /* bits used by runes (see grep) */ }; /* diff --git a/Linux/power/include/lib9.h b/Linux/power/include/lib9.h index a9b9dab8..b3d47212 100644 --- a/Linux/power/include/lib9.h +++ b/Linux/power/include/lib9.h @@ -76,10 +76,12 @@ extern int tokenize(char*, char**, int); enum { - UTFmax = 3, /* maximum bytes per rune */ + 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 = 0x80 /* decoding error in UTF */ + Runeerror = 0xFFFD, /* decoding error in UTF */ + Runemax = 0x10FFFF, /* 21-bit rune */ + Runemask = 0x1FFFFF, /* bits used by runes (see grep) */ }; /* diff --git a/Linux/spim/include/lib9.h b/Linux/spim/include/lib9.h index 5a1b36bf..36f121fb 100644 --- a/Linux/spim/include/lib9.h +++ b/Linux/spim/include/lib9.h @@ -77,10 +77,12 @@ extern int tokenize(char*, char**, int); enum { - UTFmax = 3, /* maximum bytes per rune */ + 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 = 0x80 /* decoding error in UTF */ + Runeerror = 0xFFFD, /* decoding error in UTF */ + Runemax = 0x10FFFF, /* 21-bit rune */ + Runemask = 0x1FFFFF, /* bits used by runes (see grep) */ }; /* -- cgit v1.2.3