ref: a5e964190697f7367e92628620baaee370c32f88
parent: e30f50283c60e21763aa28def66deab70ae12187
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Thu Oct 17 08:02:45 EDT 2013
change Rune from ushort to uint for to 21 bit runes (thanks mischief!) big big change. requires rebuilding 8c first and then rebuild everything.
--- a/386/include/u.h
+++ b/386/include/u.h
@@ -3,12 +3,12 @@
typedef unsigned char uchar;
typedef unsigned long ulong;
typedef unsigned int uint;
-typedef signed char schar;
+typedef signed char schar;
typedef long long vlong;
typedef unsigned long long uvlong;
typedef unsigned long uintptr;
typedef unsigned long usize;
-typedef ushort Rune;
+typedef uint Rune;
typedef union FPdbleword FPdbleword;
typedef long jmp_buf[2];
#define JMPBUFSP 0
--- a/68000/include/u.h
+++ b/68000/include/u.h
@@ -8,7 +8,7 @@
typedef unsigned long long uvlong;
typedef unsigned long uintptr;
typedef unsigned long usize;
-typedef ushort Rune;
+typedef uint Rune;
typedef union FPdbleword FPdbleword;
typedef long jmp_buf[2];
#define JMPBUFSP 0
--- a/68020/include/u.h
+++ b/68020/include/u.h
@@ -8,7 +8,7 @@
typedef unsigned long long uvlong;
typedef unsigned long uintptr;
typedef unsigned long usize;
-typedef ushort Rune;
+typedef uint Rune;
typedef union FPdbleword FPdbleword;
typedef long jmp_buf[2];
#define JMPBUFSP 0
--- a/alpha/include/u.h
+++ b/alpha/include/u.h
@@ -3,12 +3,12 @@
typedef unsigned char uchar;
typedef unsigned long ulong;
typedef unsigned int uint;
-typedef signed char schar;
+typedef signed char schar;
typedef long long vlong;
typedef unsigned long long uvlong;
typedef unsigned long uintptr;
typedef unsigned long usize;
-typedef ushort Rune;
+typedef uint Rune;
typedef union FPdbleword FPdbleword;
typedef long jmp_buf[2];
#define JMPBUFSP 0
--- a/amd64/include/u.h
+++ b/amd64/include/u.h
@@ -3,12 +3,12 @@
typedef unsigned char uchar;
typedef unsigned long ulong;
typedef unsigned int uint;
-typedef signed char schar;
+typedef signed char schar;
typedef long long vlong;
typedef unsigned long long uvlong;
typedef unsigned long long uintptr;
typedef unsigned long usize;
-typedef ushort Rune;
+typedef uint Rune;
typedef union FPdbleword FPdbleword;
typedef uintptr jmp_buf[2];
#define JMPBUFSP 0
--- a/arm/include/u.h
+++ b/arm/include/u.h
@@ -9,7 +9,7 @@
typedef unsigned long long uvlong;
typedef unsigned long uintptr;
typedef unsigned long usize;
-typedef ushort Rune;
+typedef uint Rune;
typedef union FPdbleword FPdbleword;
typedef long jmp_buf[2];
#define JMPBUFSP 0
--- a/mips/include/u.h
+++ b/mips/include/u.h
@@ -8,7 +8,7 @@
typedef unsigned long long uvlong;
typedef unsigned long uintptr;
typedef unsigned long usize;
-typedef ushort Rune;
+typedef uint Rune;
typedef union FPdbleword FPdbleword;
typedef long jmp_buf[2];
#define JMPBUFSP 0
--- a/power/include/u.h
+++ b/power/include/u.h
@@ -3,12 +3,12 @@
typedef unsigned char uchar;
typedef unsigned long ulong;
typedef unsigned int uint;
-typedef signed char schar;
+typedef signed char schar;
typedef long long vlong;
typedef unsigned long long uvlong;
typedef unsigned long uintptr;
typedef unsigned long usize;
-typedef ushort Rune;
+typedef uint Rune;
typedef union FPdbleword FPdbleword;
typedef long jmp_buf[2];
#define JMPBUFSP 0
--- a/power64/include/u.h
+++ b/power64/include/u.h
@@ -8,7 +8,7 @@
typedef unsigned long long uvlong;
typedef unsigned long long uintptr;
typedef unsigned long usize;
-typedef ushort Rune;
+typedef uint Rune;
typedef union FPdbleword FPdbleword;
typedef uintptr jmp_buf[2];
#define JMPBUFSP 0
--- a/sparc/include/u.h
+++ b/sparc/include/u.h
@@ -8,7 +8,7 @@
typedef unsigned long long uvlong;
typedef unsigned long uintptr;
typedef unsigned long usize;
-typedef ushort Rune;
+typedef uint Rune;
typedef union FPdbleword FPdbleword;
typedef long jmp_buf[2];
#define JMPBUFSP 0
--- a/sparc64/include/u.h
+++ b/sparc64/include/u.h
@@ -8,7 +8,7 @@
typedef unsigned long long uvlong;
typedef unsigned long uintptr;
typedef unsigned long usize;
-typedef ushort Rune;
+typedef uint Rune;
typedef union FPdbleword FPdbleword;
typedef long jmp_buf[2];
#define JMPBUFSP 0
--- a/sys/include/ape/limits.h
+++ b/sys/include/ape/limits.h
@@ -3,7 +3,7 @@
/* 8 bit chars (signed), 16 bit shorts, 32 bit ints/longs */
#define CHAR_BIT 8
-#define MB_LEN_MAX 3
+#define MB_LEN_MAX 4
#define UCHAR_MAX 0xff
#define USHRT_MAX 0xffff
--- a/sys/include/ape/u.h
+++ b/sys/include/ape/u.h
@@ -9,10 +9,10 @@
typedef unsigned char uchar;
typedef unsigned long ulong;
typedef unsigned int uint;
-typedef signed char schar;
+typedef signed char schar;
typedef long long vlong;
typedef unsigned long long uvlong;
-typedef ushort Rune;
+typedef uint Rune;
typedef union FPdbleword FPdbleword;
typedef char* p9va_list;
--- a/sys/include/ape/utf.h
+++ b/sys/include/ape/utf.h
@@ -7,15 +7,15 @@
extern "C" { #endif
-typedef unsigned short Rune; /* 16 bits */
+typedef unsigned int Rune; /* 32 bits */
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 = 0xFFFD, /* decoding error in UTF */
- Runemax = 0xFFFF, /* 16 bit rune */
+ Runemax = 0x10FFFF, /* 21 bit rune */
};
/*
--- a/sys/include/libc.h
+++ b/sys/include/libc.h
@@ -41,12 +41,12 @@
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 = 0xFFFD, /* decoding error in UTF */
- Runemax = 0xFFFF, /* 16 bit rune */
- Runemask = 0xFFFF, /* bits used by runes (see grep) */
+ Runemax = 0x10FFFF, /* 21 bit rune */
+ Runemask = 0x1FFFFF, /* bits used by runes (see grep) */
};
/*
--
⑨