[sword-svn] r197 - in trunk/source: common/unicode i18n io
chrislit at crosswire.org
chrislit at crosswire.org
Fri May 8 20:37:27 MST 2009
Author: chrislit
Date: 2009-05-08 20:37:27 -0700 (Fri, 08 May 2009)
New Revision: 197
Modified:
trunk/source/common/unicode/pwin32.h
trunk/source/i18n/dtfmtsym.cpp
trunk/source/i18n/regexcmp.cpp
trunk/source/i18n/zonemeta.cpp
trunk/source/io/ufile.c
Log:
ICU 4.2 update, reintroduced Borland-specific fixes
Modified: trunk/source/common/unicode/pwin32.h
===================================================================
--- trunk/source/common/unicode/pwin32.h 2009-05-09 03:35:48 UTC (rev 196)
+++ trunk/source/common/unicode/pwin32.h 2009-05-09 03:37:27 UTC (rev 197)
@@ -32,7 +32,7 @@
#endif
/** _MSC_VER is used to detect the Microsoft compiler. */
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) || defined(__BORLANDC__)
#define U_INT64_IS_LONG_LONG 0
#else
#define U_INT64_IS_LONG_LONG 1
@@ -40,7 +40,7 @@
/** Define whether inttypes.h is available */
#ifndef U_HAVE_INTTYPES_H
-# if defined(__BORLANDC__) || defined(__MINGW32__)
+# if defined(__MINGW32__)
# define U_HAVE_INTTYPES_H 1
# else
# define U_HAVE_INTTYPES_H 0
Modified: trunk/source/i18n/dtfmtsym.cpp
===================================================================
--- trunk/source/i18n/dtfmtsym.cpp 2009-05-09 03:35:48 UTC (rev 196)
+++ trunk/source/i18n/dtfmtsym.cpp 2009-05-09 03:37:27 UTC (rev 197)
@@ -1048,7 +1048,7 @@
UErrorCode status = U_ZERO_ERROR;
if (fZoneStrings) {
// Create an istance of ZoneStringFormat by the custom zone strings array
- fZSFLocal = new ZoneStringFormat(fZoneStrings, fZoneStringsRowCount,
+ fZSFLocal = new ZoneStringFormat((const UnicodeString* const*)fZoneStrings, fZoneStringsRowCount,
fZoneStringsColCount, status);
if (U_FAILURE(status)) {
delete fZSFLocal;
Modified: trunk/source/i18n/regexcmp.cpp
===================================================================
--- trunk/source/i18n/regexcmp.cpp 2009-05-09 03:35:48 UTC (rev 196)
+++ trunk/source/i18n/regexcmp.cpp 2009-05-09 03:37:27 UTC (rev 197)
@@ -3789,7 +3789,7 @@
error(U_REGEX_PROPERTY_SYNTAX);
return 0;
}
- charName.extract(0, charName.length(), name, sizeof(name), US_INV);
+ charName.extract(0, charName.length(), name, (int)sizeof(name), US_INV);
UChar32 theChar = u_charFromName(U_UNICODE_CHAR_NAME, name, fStatus);
if (U_FAILURE(*fStatus)) {
@@ -4013,9 +4013,9 @@
// See if the property looks like a Java "InBlockName", which
// we will recast as "Block=BlockName"
//
- static const UChar IN[] = {0x49, 0x6E, 0}; // "In"
+ static const UChar INB[] = {0x49, 0x6E, 0}; // "In"
static const UChar BLOCK[] = {0x42, 0x6C, 0x6f, 0x63, 0x6b, 0x3d, 00}; // "Block="
- if (mPropName.startsWith(IN, 2) && propName.length()>=3) {
+ if (mPropName.startsWith(INB, 2) && propName.length()>=3) {
setExpr.truncate(4); // Leaves "[\p{", or "[\P{"
setExpr.append(BLOCK, -1);
setExpr.append(UnicodeString(mPropName, 2)); // Property with the leading "In" removed.
Modified: trunk/source/i18n/zonemeta.cpp
===================================================================
--- trunk/source/i18n/zonemeta.cpp 2009-05-09 03:35:48 UTC (rev 196)
+++ trunk/source/i18n/zonemeta.cpp 2009-05-09 03:37:27 UTC (rev 197)
@@ -543,7 +543,7 @@
// We may skip aliases, because the bundle
// contains only canonical IDs. For now, try
// all of them.
- tzid->extract(0, tzid->length(), zidkey, sizeof(zidkey), US_INV);
+ tzid->extract(0, tzid->length(), zidkey, (int)sizeof(zidkey), US_INV);
zidkey[sizeof(zidkey)-1] = 0; // NULL terminate just in case.
// Replace '/' with ':'
Modified: trunk/source/io/ufile.c
===================================================================
--- trunk/source/io/ufile.c 2009-05-09 03:35:48 UTC (rev 196)
+++ trunk/source/io/ufile.c 2009-05-09 03:37:27 UTC (rev 197)
@@ -60,7 +60,7 @@
uprv_memset(result, 0, sizeof(UFILE));
result->fFileno = fileno(f);
-#ifdef U_WINDOWS
+#if defined(U_WINDOWS) && !defined(__BORLANDC__)
if (0 <= result->fFileno && result->fFileno <= 2) {
/* stdin, stdout and stderr need to be special cased for Windows 98 */
#if _MSC_VER >= 1400
More information about the sword-cvs
mailing list