2 ******************************************************************************
4 * Copyright (C) 2001-2004, International Business Machines *
5 * Corporation and others. All Rights Reserved. *
7 ******************************************************************************
8 * file name: ucln_cmn.c
10 * tab size: 8 (not used)
13 * created on: 2001July05
14 * created by: George Rhoten
17 #include "unicode/utypes.h"
18 #include "unicode/uclean.h"
28 static cleanupFunc
*gCommonCleanupFunctions
[UCLN_COMMON_COUNT
];
30 void ucln_common_registerCleanup(ECleanupCommonType type
,
33 U_ASSERT(UCLN_COMMON_START
< type
&& type
< UCLN_COMMON_COUNT
);
34 if (UCLN_COMMON_START
< type
&& type
< UCLN_COMMON_COUNT
)
36 gCommonCleanupFunctions
[type
] = func
;
40 U_CFUNC UBool
ucln_common_lib_cleanup(void) {
41 ECleanupCommonType commonFunc
;
43 for (commonFunc
= UCLN_COMMON_START
+1; commonFunc
<UCLN_COMMON_COUNT
; commonFunc
++) {
44 if (gCommonCleanupFunctions
[commonFunc
])
46 gCommonCleanupFunctions
[commonFunc
]();
47 gCommonCleanupFunctions
[commonFunc
] = NULL
;