]>
Commit | Line | Data |
---|---|---|
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 |
26 | catgets \- 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 |
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). | |
e357a0a4 MK |
47 | The fourth argument, |
48 | .IR message , | |
fea681da | 49 | points to a default message string which will be returned by |
63aa9df0 | 50 | .BR catgets () |
c13182ef MK |
51 | if the identified message catalog is not currently available. |
52 | The | |
fea681da | 53 | message-text is contained in an internal buffer area and should be copied by |
c13182ef MK |
54 | the application if it is to be saved or modified. |
55 | The return string is | |
fea681da MK |
56 | always terminated with a null byte. |
57 | .SH "RETURN VALUE" | |
58 | .LP | |
59 | On success, | |
63aa9df0 | 60 | .BR catgets () |
fea681da MK |
61 | returns a pointer to an internal buffer area |
62 | containing the null-terminated message string. | |
63 | On failure, | |
63aa9df0 | 64 | .BR catgets () |
fea681da MK |
65 | returns the value |
66 | .IR message . | |
2b2581ee MK |
67 | .SH "CONFORMING TO" |
68 | POSIX.1-2001. | |
fea681da MK |
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. | |
68e1685c | 79 | These two possible error returns seem to be discarded in SUSv2 |
d9bfdb9c | 80 | in favor of always returning |
fea681da | 81 | .IR message . |
fea681da MK |
82 | .SH "SEE ALSO" |
83 | .BR catopen (3), | |
84 | .BR setlocale (3) |