Penguin
Annotated edit history of catclose(3) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 CATOPEN
2 !!!CATOPEN
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 NOTES
8 SEE ALSO
9 ----
10 !!NAME
11
12
13 catopen, catclose - open/close a message catalog
14 !!SYNOPSIS
15
16
17 __#include __
18 #include __
19
20
21 nl_catd catopen(name, flag)
22 char *name;
23 int flag;
24
25
26 void catclose(catalog)
27 nl_catd catalog;
28 !!DESCRIPTION
29
30
31 catopen() opens a message catalog and returns a catalog
32 descriptor. ''name'' specifies the name of the message
33 catalog to be opened. If ''name'' specifies and absolute
34 path, (i.e. contains a `__/__'__)__ then ''name''
35 specifies a pathname for the message catalog. Otherwise, the
36 environment variable __NLSPATH__ is used
37 with ''name'' substituted for __%N__ (see
38 locale(7)). If __NLSPATH__ does not
39 exist in the environment, or if a message catalog cannot be
40 opened in any of the paths specified by
41 __NLSPATH__ , then the following paths are
42 searched in order
43
44
45 __/etc/locale/LC_MESSAGES
46 /usr/lib/locale/LC_MESSAGES
47 /usr/lib/locale/name/LC_MESSAGES__
48
49
50 In all cases ''LC_MESSAGES'' stands for the current
51 setting of the __LC_MESSAGES__ category of
52 locale from a previous call to __setlocale__() and
53 defaults to the
54 __name'' refers to the catalog name.
55
56
57 The ''flag'' argument to catopen is used to indicate the
58 type of loading desired. This should be either
59 __MCLoadBySet__ or __MCLoadAll__. The former value
60 indicates that only the required set from the catalog is
61 loaded into memory when needed, whereas the latter causes
62 the initial call to __catopen__() to load the entire
63 catalog into memory.
64
65
66 __catclose()__ closes the message catalog identified by
67 ''catalog''. It invalidates any subsequent references to
68 the message catalog defined by ''catalog''.
69 !!RETURN VALUE
70
71
72 __catopen()__ returns a message catalog descriptor of
73 type ''nl_catd'' on success. On failure, it returns
74 -1.
75
76
77 __catclose()__ returns 0 on success, or -1 on
78 failure.
79 !!NOTES
80
81
82 These functions are only available in libc.so.4.4.4c and
83 above. In the case of linux, the catalog descriptor
84 ''nl_catd'' is actually a mmap()'ed area of memory and
85 not a file descriptor, thus allowing catalogs to be
86 shared.
87 !!SEE ALSO
88
89
90 catgets(3), setlocale(3)
91 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.