Fresco/Babylon/src Dictionary.cc,1.16,1.17
Tobias Hunger <[email protected]> Tue, 05 Aug 2003 11:30:01 -0500
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/Fresco/Babylon/src
In directory purcel:/tmp/cvs-serv1349/Babylon/src
Modified Files:
Dictionary.cc
Log Message:
Fix DerivedCoreProperties unit test. Now all unit tests pass!
Update the character database while we need to modify the modules anyway
and fix up some parsing problems in the perl scripts generating the
modules while doing so.
Index: Dictionary.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Babylon/src/Dictionary.cc,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- Dictionary.cc 1 Aug 2003 16:47:15 -0000 1.16
+++ Dictionary.cc 5 Aug 2003 16:29:29 -0000 1.17
@@ -501,14 +501,17 @@
bool Dictionary::is_XID_Start(const UCS4 uc) const throw (Block_Error)
{
- // FIXME: This is wrong!
- return(is_ID_Start(uc));
+ Prague::Trace trace("Babylon::Char::is_XID_Start()");
+ Guard<RWLock, RLockTrait> guard(my_rw_lock);
+ return (is_ID_Start(uc) ^ find_char(uc)->is_XID_Start_Closure(uc));
}
bool Dictionary::is_XID_Continue(const UCS4 uc) const throw (Block_Error)
{
- // FIXME: This is wrong!
- return(is_ID_Continue(uc));
+ Prague::Trace trace("Babylon::Char::is_XID_Continue()");
+ Guard<RWLock, RLockTrait> guard(my_rw_lock);
+ return (is_ID_Continue(uc) ^
+ find_char(uc)->is_XID_Continue_Closure(uc));
}
bool Dictionary::is_Default_Ignorable_Code_Point(const UCS4 uc) const
@@ -529,7 +532,7 @@
bool Dictionary::is_Grapheme_Base(const UCS4 uc) const throw (Block_Error)
{
Gen_Cat cat = category(uc);
- return ((0 <= uc && uc <= 0x10FFFF) &&
+ return ((0 <= uc && uc <= 0x10FFFF) &&
!(cat == CAT_Cc || cat == CAT_Cf || cat == CAT_Cs ||
cat == CAT_Co || cat == CAT_Cn || cat == CAT_Zl ||
cat == CAT_Zp || is_Grapheme_Extend(uc)));
@@ -548,7 +551,7 @@
if (decomp.length() == 1)
{
if (decomp[0] == uc) return 0; // no decomposition
- if (decomp_type(uc) == DECOMP_CANONICAL ) return 1;
+ if (decomp_type(uc) == DECOMP_CANONICAL) return 1;
return 0;
}
if (Dictionary::instance()->comb_class(decomp[0]) != CC_SPACING) return 1;