xref: /netbsd-src/lib/libc/nls/catopen.3 (revision 9573504567626934c7ee01c7dce0c4bb1dfe7403)
1.\"	$NetBSD: catopen.3,v 1.5 1995/05/11 23:03:44 jtc Exp $
2.\"
3.\" Written by J.T. Conklin <jtc@netbsd.org>.
4.\" Public domain.
5.\"
6.Dd May 29, 1994
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.Sq /
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 %N.
34.Pp
35The
36.Fa oflag
37argument is reserved for future use and should be set to zero.
38.Sh RETURN VALUE
39Upon successful completion,
40.Fn catopen
41returns a message catalog descriptor.
42Otherwise, (nl_catd) -1 is returned and
43.Va errno
44is set to indicate the error.
45.Sh ERRORS
46.Bl -tag -width Er
47.It Bq Er ENOMEM
48Insufficient memory is availiable.
49.El
50.Sh SEE ALSO
51.Xr catclose 3 ,
52.Xr catgets 3
53.Sh STANDARDS
54The
55.Fn catopen
56function conforms to
57.St -xpg3 .
58