OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / original / man3 / catgets.3
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.
11 .\"
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.
19 .\"
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
24 .TH CATGETS 3 1998-08-09 "" "Linux Programmer's Manual"
25 .SH NAME
26 catgets \- get message from a message catalog
27 .SH SYNOPSIS
28 .nf
29 .B #include <nl_types.h>
30
31 .BI "char *catgets(nl_catd " catalog ", int " set_number \
32 ", int " message_number ,
33 .BI "              const char *" message );
34 .fi
35 .SH DESCRIPTION
36 .BR catgets ()
37 reads the message
38 .IR message_number ,
39 in set
40 .IR set_number ,
41 from the message catalog identified by
42 .IR catalog ,
43 where
44 .I catalog
45 is a catalog descriptor returned from an earlier call to
46 .BR catopen (3).
47 The fourth argument
48 .I message
49 points to a default message string which will be returned by
50 .BR catgets ()
51 if the identified message catalog is not currently available.
52 The
53 message-text is contained in an internal buffer area and should be copied by
54 the application if it is to be saved or modified.
55 The return string is
56 always terminated with a null byte.
57 .SH "RETURN VALUE"
58 .LP
59 On success,
60 .BR catgets ()
61 returns a pointer to an internal buffer area
62 containing the null-terminated message string.
63 On failure,
64 .BR catgets ()
65 returns the value
66 .IR message .
67 .SH "CONFORMING TO"
68 POSIX.1-2001.
69 .SH NOTES
70 These functions are only available in libc.so.4.4.4c and above.
71 The Jan 1987 X/Open Portability Guide specifies a more subtle
72 error return:
73 .I message
74 is returned if the message catalog specified by
75 .I catalog
76 is not available, while an empty string is returned
77 when the message catalog is available but does not contain
78 the specified message.
79 These two possible error returns seem to be discarded in SUSv2
80 in favor of always returning
81 .IR message .
82 .SH "SEE ALSO"
83 .BR catopen (3),
84 .BR setlocale (3)