Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
catclose(3)
Edit
PageHistory
Diff
Info
LikePages
CATOPEN !!!CATOPEN NAME SYNOPSIS DESCRIPTION RETURN VALUE NOTES SEE ALSO ---- !!NAME catopen, catclose - open/close a message catalog !!SYNOPSIS __#include __ #include __ nl_catd catopen(name, flag) char *name; int flag; void catclose(catalog) nl_catd catalog; !!DESCRIPTION catopen() opens a message catalog and returns a catalog descriptor. ''name'' specifies the name of the message catalog to be opened. If ''name'' specifies and absolute path, (i.e. contains a `__/__'__)__ then ''name'' specifies a pathname for the message catalog. Otherwise, the environment variable __NLSPATH__ is used with ''name'' substituted for __%N__ (see locale(7)). If __NLSPATH__ does not exist in the environment, or if a message catalog cannot be opened in any of the paths specified by __NLSPATH__ , then the following paths are searched in order __/etc/locale/LC_MESSAGES /usr/lib/locale/LC_MESSAGES /usr/lib/locale/name/LC_MESSAGES__ In all cases ''LC_MESSAGES'' stands for the current setting of the __LC_MESSAGES__ category of locale from a previous call to __setlocale__() and defaults to the __name'' refers to the catalog name. The ''flag'' argument to catopen is used to indicate the type of loading desired. This should be either __MCLoadBySet__ or __MCLoadAll__. The former value indicates that only the required set from the catalog is loaded into memory when needed, whereas the latter causes the initial call to __catopen__() to load the entire catalog into memory. __catclose()__ closes the message catalog identified by ''catalog''. It invalidates any subsequent references to the message catalog defined by ''catalog''. !!RETURN VALUE __catopen()__ returns a message catalog descriptor of type ''nl_catd'' on success. On failure, it returns -1. __catclose()__ returns 0 on success, or -1 on failure. !!NOTES These functions are only available in libc.so.4.4.4c and above. In the case of linux, the catalog descriptor ''nl_catd'' is actually a mmap()'ed area of memory and not a file descriptor, thus allowing catalogs to be shared. !!SEE ALSO catgets(3), setlocale(3) ----
One page links to
catclose(3)
:
Man3c
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.