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

Side by Side Diff: icu46/source/common/ucnv_set.c

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « icu46/source/common/ucnv_lmb.c ('k') | icu46/source/common/ucnv_u16.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 *******************************************************************************
3 *
4 * Copyright (C) 2003-2007, International Business Machines
5 * Corporation and others. All Rights Reserved.
6 *
7 *******************************************************************************
8 * file name: ucnv_set.c
9 * encoding: US-ASCII
10 * tab size: 8 (not used)
11 * indentation:4
12 *
13 * created on: 2004sep07
14 * created by: Markus W. Scherer
15 *
16 * Conversion API functions using USet (ucnv_getUnicodeSet())
17 * moved here from ucnv.c for removing the dependency of other ucnv_
18 * implementation functions on the USet implementation.
19 */
20
21 #include "unicode/utypes.h"
22 #include "unicode/uset.h"
23 #include "unicode/ucnv.h"
24 #include "ucnv_bld.h"
25 #include "uset_imp.h"
26
27 #if !UCONFIG_NO_CONVERSION
28
29 U_CAPI void U_EXPORT2
30 ucnv_getUnicodeSet(const UConverter *cnv,
31 USet *setFillIn,
32 UConverterUnicodeSet whichSet,
33 UErrorCode *pErrorCode) {
34 /* argument checking */
35 if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
36 return;
37 }
38 if(cnv==NULL || setFillIn==NULL || whichSet<UCNV_ROUNDTRIP_SET || UCNV_SET_C OUNT<=whichSet) {
39 *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
40 return;
41 }
42
43 /* does this converter support this function? */
44 if(cnv->sharedData->impl->getUnicodeSet==NULL) {
45 *pErrorCode=U_UNSUPPORTED_ERROR;
46 return;
47 }
48
49 {
50 USetAdder sa={
51 NULL,
52 uset_add,
53 uset_addRange,
54 uset_addString,
55 uset_remove,
56 uset_removeRange
57 };
58 sa.set=setFillIn;
59
60 /* empty the set */
61 uset_clear(setFillIn);
62
63 /* call the converter to add the code points it supports */
64 cnv->sharedData->impl->getUnicodeSet(cnv, &sa, whichSet, pErrorCode);
65 }
66 }
67
68 #endif
OLDNEW
« no previous file with comments | « icu46/source/common/ucnv_lmb.c ('k') | icu46/source/common/ucnv_u16.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698