X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4388f060552cc537e71e957d32f35e9d75a61233..f59164e3d128c7675a4d3934206346a3384e53a5:/icuSources/tools/genrb/ustr.h diff --git a/icuSources/tools/genrb/ustr.h b/icuSources/tools/genrb/ustr.h index b2d59725..05a446ea 100644 --- a/icuSources/tools/genrb/ustr.h +++ b/icuSources/tools/genrb/ustr.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2011, International Business Machines +* Copyright (C) 1998-2012, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -35,6 +35,19 @@ } \ } +#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;