ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/misc.C
(Generate patch)

Comparing rxvt-unicode/src/misc.C (file contents):
Revision 1.48 by ayin, Tue Oct 23 21:54:42 2007 UTC vs.
Revision 1.49 by ayin, Wed Oct 31 09:55:23 2007 UTC

116 if (len == 0) 116 if (len == 0)
117 break; 117 break;
118 else if (s[0] < 0x80) 118 else if (s[0] < 0x80)
119 *p++ = *s++; 119 *p++ = *s++;
120 else if (len >= 2 120 else if (len >= 2
121 && s[0] >= 0xc2 && s[0] <= 0xdf 121 && s[0] >= 0xc2 && s[0] <= 0xdf
122 && (s[1] & 0xc0) == 0x80) 122 && (s[1] & 0xc0) == 0x80)
123 { 123 {
124 *p++ = ((s[0] & 0x1f) << 6) 124 *p++ = ((s[0] & 0x1f) << 6)
125 | (s[1] & 0x3f); 125 | (s[1] & 0x3f);
126 s += 2; 126 s += 2;
144 || (s[0] == 0xf4 && s[1] >= 0x80 && s[1] <= 0x8f) 144 || (s[0] == 0xf4 && s[1] >= 0x80 && s[1] <= 0x8f)
145 ) 145 )
146 && (s[2] & 0xc0) == 0x80 146 && (s[2] & 0xc0) == 0x80
147 && (s[3] & 0xc0) == 0x80) 147 && (s[3] & 0xc0) == 0x80)
148 { 148 {
149 *p++ = ((s[0] & 0x07) << 18) 149 *p++ = ((s[0] & 0x07) << 18)
150 | ((s[1] & 0x3f) << 12) 150 | ((s[1] & 0x3f) << 12)
151 | ((s[2] & 0x3f) << 6) 151 | ((s[2] & 0x3f) << 6)
152 | (s[3] & 0x3f); 152 | (s[3] & 0x3f);
153 s += 4; 153 s += 4;
154 } 154 }
155 else 155 else
156 { 156 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines