]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/catgets.3
random.4: spfix
[thirdparty/man-pages.git] / man3 / catgets.3
CommitLineData
fea681da
MK
1.\" Copyright 1993 Mitchum DSouza <m.dsouza@mrc-applied-psychology.cambridge.ac.uk>
2.\"
3.\" Permission is granted to make and distribute verbatim copies of this
4.\" manual provided the copyright notice and this permission notice are
5.\" preserved on all copies.
6.\"
7.\" Permission is granted to copy and distribute modified versions of this
8.\" manual under the conditions for verbatim copying, provided that the
9.\" entire resulting derived work is distributed under the terms of a
10.\" permission notice identical to this one.
c13182ef 11.\"
fea681da
MK
12.\" Since the Linux kernel and libraries are constantly changing, this
13.\" manual page may be incorrect or out-of-date. The author(s) assume no
14.\" responsibility for errors or omissions, or for damages resulting from
15.\" the use of the information contained herein. The author(s) may not
16.\" have taken the same level of care in the production of this manual,
17.\" which is licensed free of charge, as they might when working
18.\" professionally.
c13182ef 19.\"
fea681da
MK
20.\" Formatted or processed versions of this manual, if unaccompanied by
21.\" the source, must acknowledge the copyright and authors of this work.
22.\"
23.\" Updated, aeb, 980809
0ed55ece 24.TH CATGETS 3 1998-08-09 "" "Linux Programmer's Manual"
fea681da
MK
25.SH NAME
26catgets \- get message from a message catalog
27.SH SYNOPSIS
fea681da 28.nf
b9f02710
MK
29.B #include <nl_types.h>
30
31.BI "char *catgets(nl_catd " catalog ", int " set_number \
c13182ef 32", int " message_number ,
b9f02710 33.BI " const char *" message );
fea681da 34.fi
fea681da 35.SH DESCRIPTION
63aa9df0 36.BR catgets ()
fea681da
MK
37reads the message
38.IR message_number ,
39in set
40.IR set_number ,
41from the message catalog identified by
42.IR catalog ,
43where
44.I catalog
45is a catalog descriptor returned from an earlier call to
46.BR catopen (3).
e357a0a4
MK
47The fourth argument,
48.IR message ,
fea681da 49points to a default message string which will be returned by
63aa9df0 50.BR catgets ()
c13182ef
MK
51if the identified message catalog is not currently available.
52The
fea681da 53message-text is contained in an internal buffer area and should be copied by
c13182ef
MK
54the application if it is to be saved or modified.
55The return string is
fea681da
MK
56always terminated with a null byte.
57.SH "RETURN VALUE"
58.LP
59On success,
63aa9df0 60.BR catgets ()
fea681da
MK
61returns a pointer to an internal buffer area
62containing the null-terminated message string.
63On failure,
63aa9df0 64.BR catgets ()
fea681da
MK
65returns the value
66.IR message .
2b2581ee
MK
67.SH "CONFORMING TO"
68POSIX.1-2001.
fea681da
MK
69.SH NOTES
70These functions are only available in libc.so.4.4.4c and above.
71The Jan 1987 X/Open Portability Guide specifies a more subtle
72error return:
73.I message
74is returned if the message catalog specified by
75.I catalog
76is not available, while an empty string is returned
77when the message catalog is available but does not contain
78the specified message.
68e1685c 79These two possible error returns seem to be discarded in SUSv2
d9bfdb9c 80in favor of always returning
fea681da 81.IR message .
fea681da
MK
82.SH "SEE ALSO"
83.BR catopen (3),
84.BR setlocale (3)