]> granicus.if.org Git - icu/commitdiff
ICU-9596 cleanup U_NO_DEFAULT_INCLUDE_UTF_HEADERS - use utf_old.h in tests when needed
authorSteven R. Loomis <srl@icu-project.org>
Thu, 27 Sep 2012 18:52:04 +0000 (18:52 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Thu, 27 Sep 2012 18:52:04 +0000 (18:52 +0000)
X-SVN-Rev: 32440

icu4c/source/common/unicode/utf_old.h
icu4c/source/extra/uconv/uconv.cpp
icu4c/source/test/cintltst/cintltst.h
icu4c/source/test/intltest/intltest.h
icu4c/source/tools/gendict/gendict.cpp
icu4c/source/tools/genrb/read.c
icu4c/source/tools/genrb/reslist.c
icu4c/source/tools/genrb/ustr.c
icu4c/source/tools/genrb/wrtxml.cpp

index 38d13efb6d9467c5c65ae5944c4d55db3b6e7e35..f9125b1dd2ed7e1c684da1654f5e47dd7cd5fb14 100644 (file)
@@ -1,11 +1,11 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2002-2011, International Business Machines
+*   Copyright (C) 2002-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
-*   file name:  utf.h
+*   file name:  utf_old.h
 *   encoding:   US-ASCII
 *   tab size:   8 (not used)
 *   indentation:4
@@ -298,7 +298,7 @@ typedef int32_t UTextOffset;
  * Code point comparisons need to be in uint32_t because UChar32
  * may be a signed type, and negative values must be recognized.
  *
- * @deprecated ICU 2.4. Use U8_LENGTH instead, see utf_old.h.
+ * @deprecated ICU 2.4. Use U8_LENGTH instead, see utf.h.
  */
 #if 1
 #   define UTF8_CHAR_LENGTH(c) \
index 41ed32caf46171643bb41af4e16ca30c48072a5b..aaa0ab8b742c933bb5b43ba83863b5be307cb8c6 100644 (file)
@@ -26,6 +26,7 @@
 #include <unicode/translit.h>
 #include <unicode/uset.h>
 #include <unicode/uclean.h>
+#include <unicode/utf16.h>
 
 #include <stdio.h>
 #include <errno.h>
index a47553961928df0721ceb74235db69acd433618c..6e6d1614f0abc9c725d01468ad0b64e3d0899167 100644 (file)
@@ -22,6 +22,12 @@ The main root for C API tests
 #include "unicode/utypes.h"
 #include "unicode/putil.h"
 #include "unicode/ctest.h"
+
+#if U_NO_DEFAULT_INCLUDE_UTF_HEADERS
+/* deprecated  - make tests pass with U_NO_DEFAULT_INCLUDE_UTF_HEADERS */
+#include "unicode/utf_old.h" 
+#endif
+
 #include <stdlib.h>
 
 #ifndef U_USE_DEPRECATED_API
index 3fef2d879179e5005acd255acaad60ca693c06c6..3851c712163a8147a774a1092cd066d51e9cafde 100644 (file)
 #include "unicode/fmtable.h"
 #include "unicode/testlog.h"
 
+
+#if U_NO_DEFAULT_INCLUDE_UTF_HEADERS
+/* deprecated  - make tests pass with U_NO_DEFAULT_INCLUDE_UTF_HEADERS */
+#include "unicode/utf_old.h" 
+#endif
+
 /**
  * \def ICU_USE_THREADS
  *
  * Enables multi-threaded testing. Moved here from uconfig.h.
  * Default: enabled
  *
- * This switched used to allow thread support (use of mutexes) to be compiled out of ICU.
+ * This switch used to allow thread support (use of mutexes) to be compiled out of ICU.
  */
 #ifdef ICU_USE_THREADS
     /* Use the predefined value. */
index c099c82277af44b108e4143b8262fd3660efce25..81affcd9c0f1f8ce4983830d4d2f47d320ce68e3 100644 (file)
@@ -20,6 +20,7 @@
 #include "unicode/ucharstrie.h"
 #include "unicode/bytestrie.h"
 #include "unicode/ucnv.h"
+#include "unicode/utf16.h"
 
 #include "charstr.h"
 #include "dictionarydata.h"
index 8efad67c1ac8268478564c789b4223f2f74fcdb3..358c683577e7db9a3b078fc988c366e7f9d36921 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 1998-2011, International Business Machines
+*   Copyright (C) 1998-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -19,6 +19,7 @@
 #include "read.h"
 #include "errmsg.h"
 #include "unicode/ustring.h"
+#include "unicode/utf16.h"
 
 #define OPENBRACE    0x007B
 #define CLOSEBRACE   0x007D
index 209eea38adc7acdaf4bc886c77692894512e9282..829dc22f7e57a245aba8672e1d002f2f9ef89702 100644 (file)
@@ -27,7 +27,7 @@
 #include "uelement.h"
 #include "uinvchar.h"
 #include "ustr_imp.h"
-
+#include "unicode/utf16.h"
 /*
  * Align binary data at a 16-byte offset from the start of the resource bundle,
  * to be safe for any data type it may contain.
index faa03adef4e8e75be8aa82fc309c5f260215694d..91e6bd785ac511388f4c2e03f8f6cdb23e6e5785 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 1998-2011, International Business Machines
+*   Copyright (C) 1998-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -20,6 +20,7 @@
 #include "cstring.h"
 #include "unicode/ustring.h"
 #include "unicode/putil.h"
+#include "unicode/utf16.h"
 
 /* Protos */
 static void ustr_resize(struct UString *s, int32_t len, UErrorCode *status);
index 7e760534a5a73eae885851328a486b7d9e6cbdbe..4a642b9eb8715806a9c3c3602223bb1613062a79 100644 (file)
@@ -33,6 +33,8 @@
 #include "ustr.h"
 #include "prscmnts.h"
 #include "unicode/unistr.h"
+#include "unicode/utf8.h"
+#include "unicode/utf16.h"
 #include <time.h>
 
 U_NAMESPACE_USE
@@ -251,7 +253,7 @@ static char* convertAndEscape(char** pDest, int32_t destCap, int32_t* destLength
             return NULL;
         }
 
-        if((destLen+UTF8_CHAR_LENGTH(c)) < destCap){
+        if((destLen+U8_LENGTH(c)) < destCap){
 
             /* ASCII Range */
             if(c <=0x007F){