Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Unified Diff: icu46/source/tools/genrb/ustr.h

Issue 5516007: Check in the pristine copy of ICU 4.6... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « icu46/source/tools/genrb/rle.c ('k') | icu46/source/tools/genrb/ustr.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: icu46/source/tools/genrb/ustr.h
===================================================================
--- icu46/source/tools/genrb/ustr.h (revision 0)
+++ icu46/source/tools/genrb/ustr.h (revision 0)
@@ -0,0 +1,66 @@
+/*
+*******************************************************************************
+*
+* Copyright (C) 1998-2003, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+*******************************************************************************
+*
+* File ustr.h
+*
+* Modification History:
+*
+* Date Name Description
+* 05/28/99 stephen Creation.
+*******************************************************************************
+*/
+
+#ifndef USTR_H
+#define USTR_H 1
+
+#include "unicode/utypes.h"
+
+#define U_APPEND_CHAR32(c,target,len) { \
+ if (c <= 0xffff) \
+ { \
+ *(target)++ = (UChar) c; \
+ len=1; \
+ } \
+ else \
+ { \
+ target[0] = U16_LEAD(c); \
+ target[1] = U16_TRAIL(c); \
+ len=2; \
+ target +=2; \
+ } \
+}
+
+/* A C representation of a string "object" (to avoid realloc all the time) */
+struct UString {
+ UChar *fChars;
+ int32_t fLength;
+ int32_t fCapacity;
+};
+
+void ustr_init(struct UString *s);
+
+void
+ustr_initChars(struct UString *s, const char* source, int32_t length, UErrorCode *status);
+
+void ustr_deinit(struct UString *s);
+
+void ustr_setlen(struct UString *s, int32_t len, UErrorCode *status);
+
+void ustr_cpy(struct UString *dst, const struct UString *src,
+ UErrorCode *status);
+
+void ustr_cat(struct UString *dst, const struct UString *src,
+ UErrorCode *status);
+
+void ustr_ncat(struct UString *dst, const struct UString *src,
+ int32_t n, UErrorCode *status);
+
+void ustr_ucat(struct UString *dst, UChar c, UErrorCode *status);
+void ustr_u32cat(struct UString *dst, UChar32 c, UErrorCode *status);
+void ustr_uscat(struct UString *dst, const UChar* src,int len,UErrorCode *status);
+#endif
Property changes on: icu46/source/tools/genrb/ustr.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « icu46/source/tools/genrb/rle.c ('k') | icu46/source/tools/genrb/ustr.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698