scuffed-code/icu4c/source/common/ucln_cmn.c
Markus Scherer 9b04837ff0 ICU-770 call unorm_cleanup()
X-SVN-Rev: 5702
2001-09-06 01:22:23 +00:00

62 lines
1.5 KiB
C

/*
******************************************************************************
* *
* Copyright (C) 2001-2001, International Business Machines *
* Corporation and others. All Rights Reserved. *
* *
******************************************************************************
* file name: ucln_cmn.c
* encoding: US-ASCII
* tab size: 8 (not used)
* indentation:4
*
* created on: 2001July05
* created by: George Rhoten
*/
#include "unicode/uclean.h"
#include "ucln_cmn.h"
#include "umutex.h"
#include "ucln.h"
static cleanupFunc *gCleanupFunctions[UCLN_COMMON] = {
NULL,
NULL,
NULL
};
U_CAPI void U_EXPORT2
ucln_registerCleanup(ECleanupLibraryType type,
cleanupFunc *func)
{
if (UCLN_START < type && type < UCLN_COMMON)
{
gCleanupFunctions[type] = func;
}
}
void u_cleanup(void)
{
ECleanupLibraryType libType = UCLN_START;
while (++libType < UCLN_COMMON)
{
if (gCleanupFunctions[libType])
{
gCleanupFunctions[libType]();
}
}
unorm_cleanup();
unames_cleanup();
uchar_cleanup();
locale_cleanup();
uloc_cleanup();
ustring_cleanup();
ucnv_cleanup();
ucnv_io_cleanup();
ures_cleanup();
udata_cleanup();
putil_cleanup();
}