]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/tools/genrb/ustr.h
ICU-57166.0.1.tar.gz
[apple/icu.git] / icuSources / tools / genrb / ustr.h
index b2d597256bd0f580aee04dfa407eb9ea377cdd2e..05a446ea0e58ad9e51fd3b64e56ee103d8fa3a17 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.
 *
 *******************************************************************************
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
     }                                                           \
 }
 
     }                                                           \
 }
 
+#define U_APPEND_CHAR32_ONLY(c,target) {                             \
+    if (c <= 0xffff)                                            \
+    {                                                           \
+        *(target)++ = (UChar) c;                                \
+    }                                                           \
+    else                                                        \
+    {                                                           \
+        target[0] = U16_LEAD(c);                                \
+        target[1] = U16_TRAIL(c);                               \
+        target +=2;                                             \
+    }                                                           \
+}
+
 /* A C representation of a string "object" (to avoid realloc all the time) */
 struct UString {
   UChar *fChars;
 /* A C representation of a string "object" (to avoid realloc all the time) */
 struct UString {
   UChar *fChars;