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

PROLOG

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

NAME

12       catgets — read a program message
13

SYNOPSIS

15       #include <nl_types.h>
16
17       char *catgets(nl_catd catd, int set_id, int msg_id, const char *s);
18

DESCRIPTION

20       The catgets() function shall attempt to read  message  msg_id,  in  set
21       set_id, from the message catalog identified by catd.  The catd argument
22       is a message catalog  descriptor  returned  from  an  earlier  call  to
23       catopen().   The  results are undefined if catd is not a value returned
24       by catopen() for a message catalog still open in  the  process.  The  s
25       argument  points to a default message string which shall be returned by
26       catgets() if it cannot retrieve the identified message.
27
28       The catgets() function need not be thread-safe.
29

RETURN VALUE

31       If the identified message is retrieved  successfully,  catgets()  shall
32       return  a pointer to an internal buffer area containing the null-termi‐
33       nated message string. If the call is unsuccessful  for  any  reason,  s
34       shall be returned and errno shall be set to indicate the error.
35

ERRORS

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

EXAMPLES

60       None.
61

APPLICATION USAGE

63       None.
64

RATIONALE

66       None.
67

FUTURE DIRECTIONS

69       None.
70

SEE ALSO

72       catclose(), catopen()
73
74       The Base Definitions volume of POSIX.1‐2017, <nl_types.h>
75
77       Portions of this text are reprinted and reproduced in  electronic  form
78       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
79       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
80       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
81       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
82       event of any discrepancy between this version and the original IEEE and
83       The Open Group Standard, the original IEEE and The Open Group  Standard
84       is  the  referee document. The original Standard can be obtained online
85       at http://www.opengroup.org/unix/online.html .
86
87       Any typographical or formatting errors that appear  in  this  page  are
88       most likely to have been introduced during the conversion of the source
89       files to man page format. To report such errors,  see  https://www.ker
90       nel.org/doc/man-pages/reporting_bugs.html .
91
92
93
94IEEE/The Open Group                  2017                          CATGETS(3P)
Impressum