xref: /openbsd/lib/libc/nls/catgets.3 (revision 73471bf0)
1.\"	$OpenBSD: catgets.3,v 1.7 2013/06/05 03:39:23 tedu Exp $
2.\"
3.\" Written by J.T. Conklin <jtc@netbsd.org>.
4.\" Public domain.
5.\"
6.Dd $Mdocdate: June 5 2013 $
7.Dt CATGETS 3
8.Os
9.Sh NAME
10.Nm catgets
11.Nd retrieve string from message catalog
12.Sh SYNOPSIS
13.In nl_types.h
14.Ft char *
15.Fn catgets "nl_catd catd" "int set_id" "int msg_id" "const char *s"
16.Sh DESCRIPTION
17The
18.Fn catgets
19function attempts to retrieve message
20.Fa msg_id
21of set
22.Fa set_id
23from the message catalog referenced by the descriptor
24.Fa catd .
25The argument
26.Fa s
27points to a default message which is returned if the function
28is unable to retrieve the specified message.
29.Sh RETURN VALUES
30If the specified message was retrieved successfully,
31.Fn catgets
32returns a pointer to an internal buffer containing the message string;
33otherwise it returns
34.Fa s .
35.Sh SEE ALSO
36.Xr catclose 3 ,
37.Xr catopen 3
38.Sh STANDARDS
39The
40.Fn catgets
41function conforms to
42.St -xpg3 .
43