OLD | NEW |
1 /* | 1 /* |
2 ******************************************************************************* | 2 ******************************************************************************* |
3 * | 3 * |
4 * Copyright (C) 1998-2013, International Business Machines | 4 * Copyright (C) 1998-2014, International Business Machines |
5 * Corporation and others. All Rights Reserved. | 5 * Corporation and others. All Rights Reserved. |
6 * | 6 * |
7 ******************************************************************************* | 7 ******************************************************************************* |
8 * file name: ustr_cnv.c | 8 * file name: ustr_cnv.cpp |
9 * encoding: US-ASCII | 9 * encoding: US-ASCII |
10 * tab size: 8 (not used) | 10 * tab size: 8 (not used) |
11 * indentation:4 | 11 * indentation:4 |
12 * | 12 * |
13 * created on: 2004aug24 | 13 * created on: 2004aug24 |
14 * created by: Markus W. Scherer | 14 * created by: Markus W. Scherer |
15 * | 15 * |
16 * Character conversion functions moved here from ustring.c | 16 * Character conversion functions moved here from ustring.c |
17 */ | 17 */ |
18 | 18 |
19 #include "unicode/utypes.h" | 19 #include "unicode/utypes.h" |
20 | 20 |
21 #if !UCONFIG_NO_CONVERSION | 21 #if !UCONFIG_NO_CONVERSION |
22 | 22 |
23 #include "unicode/ustring.h" | 23 #include "unicode/ustring.h" |
24 #include "unicode/ucnv.h" | 24 #include "unicode/ucnv.h" |
25 #include "cstring.h" | 25 #include "cstring.h" |
26 #include "cmemory.h" | 26 #include "cmemory.h" |
27 #include "cmutex.h" | 27 #include "umutex.h" |
28 #include "ustr_cnv.h" | 28 #include "ustr_cnv.h" |
29 | 29 |
30 /* mutexed access to a shared default converter ----------------------------- */ | 30 /* mutexed access to a shared default converter ----------------------------- */ |
31 | 31 |
32 static UConverter *gDefaultConverter = NULL; | 32 static UConverter *gDefaultConverter = NULL; |
33 | 33 |
34 U_CAPI UConverter* U_EXPORT2 | 34 U_CAPI UConverter* U_EXPORT2 |
35 u_getDefaultConverter(UErrorCode *status) | 35 u_getDefaultConverter(UErrorCode *status) |
36 { | 36 { |
37 UConverter *converter = NULL; | 37 UConverter *converter = NULL; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 &err); | 244 &err); |
245 u_releaseDefaultConverter(cnv); | 245 u_releaseDefaultConverter(cnv); |
246 s1[len] = 0; | 246 s1[len] = 0; |
247 } else { | 247 } else { |
248 *s1 = 0; | 248 *s1 = 0; |
249 } | 249 } |
250 return s1; | 250 return s1; |
251 } | 251 } |
252 | 252 |
253 #endif | 253 #endif |
OLD | NEW |