xref: /openbsd-src/lib/libc/nls/catopen.3 (revision a28daedfc357b214be5c701aa8ba8adb29a7f1c2)
1.\"	$OpenBSD: catopen.3,v 1.6 2007/05/31 19:19:30 jmc Exp $
2.\"
3.\" Written by J.T. Conklin <jtc@netbsd.org>.
4.\" Public domain.
5.\"
6.Dd $Mdocdate: May 31 2007 $
7.Dt CATOPEN 3
8.Os
9.Sh NAME
10.Nm catopen
11.Nd open message catalog
12.Sh SYNOPSIS
13.Fd #include <nl_types.h>
14.Ft nl_catd
15.Fn catopen "const char *name" "int oflag"
16.Sh DESCRIPTION
17The
18.Fn catopen
19function opens the message catalog specified by
20.Fa name
21and returns a message catalog descriptor.
22If
23.Fa name
24contains a
25.Ql / ,
26then
27.Fa name
28specifies the full pathname for the message catalog, otherwise the value
29of the environment variable
30.Ev NLSPATH
31is used with
32.Fa name
33substituted for
34.Ql \&%N .
35.Pp
36The
37.Fa oflag
38argument is reserved for future use and should be set to zero.
39.Sh RETURN VALUES
40Upon successful completion,
41.Fn catopen
42returns a message catalog descriptor.
43Otherwise, \-1 is returned and
44.Va errno
45is set to indicate the error.
46.Sh ERRORS
47.Bl -tag -width Er
48.It Bq Er ENOMEM
49Insufficient memory available.
50.El
51.Sh SEE ALSO
52.Xr catclose 3 ,
53.Xr catgets 3
54.Sh STANDARDS
55The
56.Fn catopen
57function conforms to
58.St -xpg3 .
59