Skip to content

Commit

Permalink
* MacOSX/386/include/lib9.h: more rune
Browse files Browse the repository at this point in the history
  • Loading branch information
pad committed May 7, 2014
1 parent 4d5318b commit c087732
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions MacOSX/386/include/lib9.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ typedef unsigned long ulong;
typedef signed char schar;
typedef long long vlong;
typedef unsigned long long uvlong;
typedef ushort Rune;
//PAD: typedef ushort Rune; backported from latest plan9
// to not get some "illegal rune" error when compiling libc/
typedef unsigned int uint;
typedef uint Rune;
typedef unsigned int u32int;
typedef uvlong u64int;

Expand Down Expand Up @@ -86,10 +89,17 @@ extern vlong strtoll(const 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) */

//PAD: UTFmax = 3, /* maximum bytes per rune */
//PAD: Runesync = 0x80, /* cannot represent part of a UTF sequence (<) */
//PAD: Runeself = 0x80, /* rune and UTF sequences are the same (<) */
//PAD: Runeerror = 0x80 /* decoding error in UTF */
};

/*
Expand Down

0 comments on commit c087732

Please sign in to comment.