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
19

DESCRIPTION

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  s  argument  points  to a default message string which
25       shall be returned by catgets() if it  cannot  retrieve  the  identified
26       message.
27
28       The  catgets()  function  need not be reentrant. A function that is not
29       required to be reentrant is not required to be thread-safe.
30

RETURN VALUE

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 may be set to indicate the error.
36

ERRORS

38       The catgets() function may fail if:
39
40       EBADF  The catd argument is not a valid message catalog descriptor open
41              for reading.
42
43       EBADMSG
44              The message identified by set_id and  msg_id  in  the  specified
45              message  catalog did not satisfy implementation-defined security
46              criteria.
47
48       EINTR  The read operation was terminated due to the receipt of  a  sig‐
49              nal, and no data was transferred.
50
51       EINVAL The message catalog identified by catd is corrupted.
52
53       ENOMSG The  message  identified by set_id and msg_id is not in the mes‐
54              sage catalog.
55
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(),    the    Base    Definitions    volume    of
73       IEEE Std 1003.1-2001, <nl_types.h>
74
76       Portions  of  this text are reprinted and reproduced in electronic form
77       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
78       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
79       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
80       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
81       event of any discrepancy between this version and the original IEEE and
82       The  Open Group Standard, the original IEEE and The Open Group Standard
83       is the referee document. The original Standard can be  obtained  online
84       at http://www.opengroup.org/unix/online.html .
85
86
87
88IEEE/The Open Group                  2003                          CATGETS(3P)
Impressum