[Expat-checkins] expat/lib xmltok.c,1.9,1.10
fdrake@users.sourceforge.net
fdrake@users.sourceforge.net
Fri May 17 11:06:05 2002
Update of /cvsroot/expat/expat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv27220/lib
Modified Files:
xmltok.c
Log Message:
Include a more reasonable definition of the UTF8_INVALID3() macro.
It still is not used anywhere, though. ;-(
Index: xmltok.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmltok.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** xmltok.c 26 Apr 2002 05:14:20 -0000 1.9
--- xmltok.c 17 May 2002 18:05:06 -0000 1.10
***************
*** 68,76 ****
#define UTF8_INVALID3(p) \
! ((*p) == 0xED \
! ? (((p)[1] & 0x20) != 0) \
! : ((*p) == 0xEF \
! ? ((p)[1] == 0xBF && ((p)[2] == 0xBF || (p)[2] == 0xBE)) \
! : 0))
#define UTF8_INVALID4(p) ((*p) == 0xF4 && ((p)[1] & 0x30) != 0)
--- 68,74 ----
#define UTF8_INVALID3(p) \
! ((((*p) && 0xF0) == 0xE0) \
! && (((p)[1] && 0xC0) == 0x80) \
! && (((p)[2] && 0xC0) == 0x80))
#define UTF8_INVALID4(p) ((*p) == 0xF4 && ((p)[1] & 0x30) != 0)