]>
git.saurik.com Git - apple/icu.git/blob - icuSources/io/ucln_io.c
2 ******************************************************************************
4 * Copyright (C) 2001-2006, International Business Machines *
5 * Corporation and others. All Rights Reserved. *
7 ******************************************************************************
10 * tab size: 8 (not used)
13 * created on: 2006August11
14 * created by: George Rhoten
22 /* Leave this copyright notice here! It needs to go somewhere in this library. */
23 static const char copyright
[] = U_COPYRIGHT_STRING
;
25 static cleanupFunc
*gCleanupFunctions
[UCLN_IO_COUNT
];
27 static UBool
io_cleanup(void)
29 ECleanupIOType libType
= UCLN_IO_START
;
31 while (++libType
<UCLN_IO_COUNT
) {
32 if (gCleanupFunctions
[libType
])
34 gCleanupFunctions
[libType
]();
35 gCleanupFunctions
[libType
] = NULL
;
41 void ucln_io_registerCleanup(ECleanupIOType type
,
44 U_ASSERT(UCLN_IO_START
< type
&& type
< UCLN_IO_COUNT
);
45 ucln_registerCleanup(UCLN_IO
, io_cleanup
);
46 if (UCLN_IO_START
< type
&& type
< UCLN_IO_COUNT
)
48 gCleanupFunctions
[type
] = func
;