1CATGETS(P)                 POSIX Programmer's Manual                CATGETS(P)
2
3
4

NAME

6       catgets - read a program message
7

SYNOPSIS

9       #include <nl_types.h>
10
11       char *catgets(nl_catd catd, int set_id, int msg_id, const char *s);
12
13

DESCRIPTION

15       The  catgets()  function  shall  attempt to read message msg_id, in set
16       set_id, from the message catalog identified by catd. The catd  argument
17       is  a  message  catalog  descriptor  returned  from  an earlier call to
18       catopen(). The s argument points to  a  default  message  string  which
19       shall  be  returned  by  catgets() if it cannot retrieve the identified
20       message.
21
22       The catgets() function need not be reentrant. A function  that  is  not
23       required to be reentrant is not required to be thread-safe.
24

RETURN VALUE

26       If  the  identified  message is retrieved successfully, catgets() shall
27       return a pointer to an internal buffer area containing the  null-termi‐
28       nated  message  string.  If  the call is unsuccessful for any reason, s
29       shall be returned and errno may be set to indicate the error.
30

ERRORS

32       The catgets() function may fail if:
33
34       EBADF  The catd argument is not a valid message catalog descriptor open
35              for reading.
36
37       EBADMSG
38              The  message  identified  by  set_id and msg_id in the specified
39              message catalog did not satisfy implementation-defined  security
40              criteria.
41
42       EINTR  The  read  operation was terminated due to the receipt of a sig‐
43              nal, and no data was transferred.
44
45       EINVAL The message catalog identified by catd is corrupted.
46
47       ENOMSG The message identified by set_id and msg_id is not in  the  mes‐
48              sage catalog.
49
50
51       The following sections are informative.
52

EXAMPLES

54       None.
55

APPLICATION USAGE

57       None.
58

RATIONALE

60       None.
61

FUTURE DIRECTIONS

63       None.
64

SEE ALSO

66       catclose()   ,   catopen()   ,   the   Base   Definitions   volume   of
67       IEEE Std 1003.1-2001, <nl_types.h>
68
70       Portions of this text are reprinted and reproduced in  electronic  form
71       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
72       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
73       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
74       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
75       event of any discrepancy between this version and the original IEEE and
76       The Open Group Standard, the original IEEE and The Open Group  Standard
77       is  the  referee document. The original Standard can be obtained online
78       at http://www.opengroup.org/unix/online.html .
79
80
81
82IEEE/The Open Group                  2003                           CATGETS(P)
Impressum