2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Close a message catalog.
8 #include <exec/types.h>
9 #include <proto/exec.h>
10 #include "locale_intern.h"
12 #define DEBUG_CLOSECATALOG(x) ;
14 /*****************************************************************************
17 #include <proto/locale.h>
19 AROS_LH1(void, CloseCatalog
,
22 AROS_LHA(struct Catalog
*, catalog
, A0
),
25 struct LocaleBase
*, LocaleBase
, 6, Locale
)
28 Conclude access to a message catalog, and decrement the use count.
29 If this use count is 0, the catalog can be expunged when the
30 system memory is running low.
33 catalog - the message catalog to close, note that NULL is
37 The catalog is closed, and should no longer be used by the
47 GetCatalogStr(), OpenCatalogA()
52 27-11-96 digulla automatically created from
53 locale_lib.fd and clib/locale_protos.h
55 *****************************************************************************/
59 DEBUG_CLOSECATALOG(dprintf("CloseCatalog: catalog 0x%lx\n",catalog
));
63 ObtainSemaphore (&IntLB(LocaleBase
)->lb_CatalogLock
);
65 /* Decrement the use counter. */
66 IntCat(catalog
)->ic_UseCount
--;
68 if (0 == IntCat(catalog
)->ic_UseCount
)
70 Remove(&catalog
->cat_Link
);
72 dispose_catalog((struct IntCatalog
*)catalog
, LocaleBase
);
76 ReleaseSemaphore(&IntLB(LocaleBase
)->lb_CatalogLock
);
80 DEBUG_CLOSECATALOG(dprintf("CloseCatalog: done\n"));