1CATGETS(3P) POSIX Programmer's Manual CATGETS(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
11
13 catgets — read a program message
14
16 #include <nl_types.h>
17
18 char *catgets(nl_catd catd, int set_id, int msg_id, const char *s);
19
21 The catgets() function shall attempt to read message msg_id, in set
22 set_id, from the message catalog identified by catd. The catd argument
23 is a message catalog descriptor returned from an earlier call to
24 catopen(). The results are undefined if catd is not a value returned
25 by catopen() for a message catalog still open in the process. The s
26 argument points to a default message string which shall be returned by
27 catgets() if it cannot retrieve the identified message.
28
29 The catgets() function need not be thread-safe.
30
32 If the identified message is retrieved successfully, catgets() shall
33 return a pointer to an internal buffer area containing the null-termi‐
34 nated message string. If the call is unsuccessful for any reason, s
35 shall be returned and errno shall be set to indicate the error.
36
38 The catgets() function shall fail if:
39
40 EINTR The read operation was terminated due to the receipt of a sig‐
41 nal, and no data was transferred.
42
43 ENOMSG The message identified by set_id and msg_id is not in the mes‐
44 sage catalog.
45
46 The catgets() function may fail if:
47
48 EBADF The catd argument is not a valid message catalog descriptor open
49 for reading.
50
51 EBADMSG
52 The message identified by set_id and msg_id in the specified
53 message catalog did not satisfy implementation-defined security
54 criteria.
55
56 EINVAL The message catalog identified by catd is corrupted.
57
58 The following sections are informative.
59
61 None.
62
64 None.
65
67 None.
68
70 None.
71
73 catclose(), catopen()
74
75 The Base Definitions volume of POSIX.1‐2008, <nl_types.h>
76
78 Portions of this text are reprinted and reproduced in electronic form
79 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
80 -- Portable Operating System Interface (POSIX), The Open Group Base
81 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
82 cal and Electronics Engineers, Inc and The Open Group. (This is
83 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
84 event of any discrepancy between this version and the original IEEE and
85 The Open Group Standard, the original IEEE and The Open Group Standard
86 is the referee document. The original Standard can be obtained online
87 at http://www.unix.org/online.html .
88
89 Any typographical or formatting errors that appear in this page are
90 most likely to have been introduced during the conversion of the source
91 files to man page format. To report such errors, see https://www.ker‐
92 nel.org/doc/man-pages/reporting_bugs.html .
93
94
95
96IEEE/The Open Group 2013 CATGETS(3P)