# # # patch "ChangeLog" # from [ec8f4d2703cf584434b718a6d72a07f11215aa38] # to [463106f254c2e5ce5e114ec3ac7c61172a0181e9] # # patch "transforms.cc" # from [a1fe770e8fff896e7fb29a16e3154ed6e427042c] # to [5961919057cf4e5e19191d47b2b2d8fe7a0899cd] # ============================================================ --- ChangeLog ec8f4d2703cf584434b718a6d72a07f11215aa38 +++ ChangeLog 463106f254c2e5ce5e114ec3ac7c61172a0181e9 @@ -1,5 +1,6 @@ 2006-03-01 Matthew Gregan + * transforms.cc: Better use of appropriately typedefed types. * transforms.cc: Don't assume wchar_t is wide enough to hold a UCS-4 character. * transforms.cc, transforms.hh: Add utf8_validate function and ============================================================ --- transforms.cc a1fe770e8fff896e7fb29a16e3154ed6e427042c +++ transforms.cc 5961919057cf4e5e19191d47b2b2d8fe7a0899cd @@ -600,7 +600,7 @@ // from the file gutf8.c of the GLib library. static bool -is_valid_unicode_char(unsigned int c) +is_valid_unicode_char(u32 c) { return (c < 0x110000 && ((c & 0xfffff800) != 0xd800) && @@ -609,7 +609,7 @@ } static bool -utf8_consume_continuation_char(unsigned char c, unsigned int & val) +utf8_consume_continuation_char(u8 c, u32 & val) { if ((c & 0xc0) != 0x80) return false; @@ -622,12 +622,12 @@ utf8_validate(utf8 const & utf) { std::string::size_type left = utf().size(); - unsigned int min, val; + u32 min, val; for (std::string::const_iterator i = utf().begin(); i != utf().end(); ++i, --left) { - unsigned char c = *i; + u8 c = *i; if (c < 128) continue; if ((c & 0xe0) == 0xc0)