convert to 4-byte UTF-8 and 32-bit Rune
http://codereview.appspot.com/116075
This commit is contained in:
parent
4dbf255619
commit
0cadb4301d
14 changed files with 86 additions and 44 deletions
|
|
@ -488,7 +488,7 @@ bldcclass(void)
|
|||
exprp++; /* eat '-' */
|
||||
if((c2 = nextrec()) == ']')
|
||||
goto Error;
|
||||
classp[n+0] = 0xFFFF;
|
||||
classp[n+0] = Runemax;
|
||||
classp[n+1] = c1;
|
||||
classp[n+2] = c2;
|
||||
n += 3;
|
||||
|
|
@ -510,7 +510,7 @@ classmatch(int classno, int c, int negate)
|
|||
|
||||
p = class[classno];
|
||||
while(*p){
|
||||
if(*p == 0xFFFF){
|
||||
if(*p == Runemax){
|
||||
if(p[1]<=c && c<=p[2])
|
||||
return !negate;
|
||||
p += 3;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue