]>
git.saurik.com Git - apple/icu.git/blob - icuSources/common/uinit.c
2 ******************************************************************************
4 * Copyright (C) 2001-2011, International Business Machines *
5 * Corporation and others. All Rights Reserved. *
7 ******************************************************************************
10 * tab size: 8 (not used)
13 * created on: 2001July05
14 * created by: George Rhoten
17 #include "unicode/utypes.h"
18 #include "unicode/icuplug.h"
19 #include "unicode/uclean.h"
21 #include "icuplugimp.h"
28 * ICU Initialization Function. Need not be called.
31 u_init(UErrorCode
*status
) {
32 UTRACE_ENTRY_OC(UTRACE_U_INIT
);
33 /* initialize plugins */
36 umtx_lock(&gICUInitMutex
);
37 if (gICUInitialized
|| U_FAILURE(*status
)) {
38 umtx_unlock(&gICUInitMutex
);
39 UTRACE_EXIT_STATUS(*status
);
46 * ICU4C 3.4 (jitterbug 4497) hardcodes the data for Unicode character
47 * properties for APIs that want to be fast.
48 * Therefore, we need not load them here nor check for errors.
49 * Instead, we load the converter alias table to see if any ICU data
51 * Users should really open the service objects they need and check
52 * for errors there, to make sure that the actual items they need are
55 #if !UCONFIG_NO_CONVERSION
56 ucnv_io_countKnownConverters(status
);
59 gICUInitialized
= TRUE
; /* TODO: don't set if U_FAILURE? */
60 umtx_unlock(&gICUInitMutex
);
61 UTRACE_EXIT_STATUS(*status
);