logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

catgets.3p (3229B)


  1. '\" et
  2. .TH CATGETS "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. catgets
  12. \(em read a program message
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <nl_types.h>
  17. .P
  18. char *catgets(nl_catd \fIcatd\fP, int \fIset_id\fP, int \fImsg_id\fP, const char *\fIs\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIcatgets\fR()
  23. function shall attempt to read message
  24. .IR msg_id ,
  25. in set
  26. .IR set_id ,
  27. from the message catalog identified by
  28. .IR catd .
  29. The
  30. .IR catd
  31. argument is a message catalog descriptor returned from an earlier call
  32. to
  33. \fIcatopen\fR().
  34. The results are undefined if
  35. .IR catd
  36. is not a value returned by
  37. \fIcatopen\fR()
  38. for a message catalog still open in the process. The
  39. .IR s
  40. argument points to a default message string which shall be returned by
  41. \fIcatgets\fR()
  42. if it cannot retrieve the identified message.
  43. .P
  44. The
  45. \fIcatgets\fR()
  46. function need not be thread-safe.
  47. .SH "RETURN VALUE"
  48. If the identified message is retrieved successfully,
  49. \fIcatgets\fR()
  50. shall return a pointer to an internal buffer area containing the
  51. null-terminated message string. If the call is unsuccessful for any
  52. reason,
  53. .IR s
  54. shall be returned and
  55. .IR errno
  56. shall be set to indicate the error.
  57. .SH ERRORS
  58. The
  59. \fIcatgets\fR()
  60. function shall fail if:
  61. .TP
  62. .BR EINTR
  63. The read operation was terminated due to the receipt of a signal, and
  64. no data was transferred.
  65. .TP
  66. .BR ENOMSG
  67. The message identified by
  68. .IR set_id
  69. and
  70. .IR msg_id
  71. is not in the message catalog.
  72. .P
  73. The
  74. \fIcatgets\fR()
  75. function may fail if:
  76. .TP
  77. .BR EBADF
  78. The
  79. .IR catd
  80. argument is not a valid message catalog descriptor open for reading.
  81. .TP
  82. .BR EBADMSG
  83. The message identified by
  84. .IR set_id
  85. and
  86. .IR msg_id
  87. in the specified message catalog did not satisfy implementation-defined
  88. security criteria.
  89. .TP
  90. .BR EINVAL
  91. The message catalog identified by
  92. .IR catd
  93. is corrupted.
  94. .LP
  95. .IR "The following sections are informative."
  96. .SH EXAMPLES
  97. None.
  98. .SH "APPLICATION USAGE"
  99. None.
  100. .SH RATIONALE
  101. None.
  102. .SH "FUTURE DIRECTIONS"
  103. None.
  104. .SH "SEE ALSO"
  105. .IR "\fIcatclose\fR\^(\|)",
  106. .IR "\fIcatopen\fR\^(\|)"
  107. .P
  108. The Base Definitions volume of POSIX.1\(hy2017,
  109. .IR "\fB<nl_types.h>\fP"
  110. .\"
  111. .SH COPYRIGHT
  112. Portions of this text are reprinted and reproduced in electronic form
  113. from IEEE Std 1003.1-2017, Standard for Information Technology
  114. -- Portable Operating System Interface (POSIX), The Open Group Base
  115. Specifications Issue 7, 2018 Edition,
  116. Copyright (C) 2018 by the Institute of
  117. Electrical and Electronics Engineers, Inc and The Open Group.
  118. In the event of any discrepancy between this version and the original IEEE and
  119. The Open Group Standard, the original IEEE and The Open Group Standard
  120. is the referee document. The original Standard can be obtained online at
  121. http://www.opengroup.org/unix/online.html .
  122. .PP
  123. Any typographical or formatting errors that appear
  124. in this page are most likely
  125. to have been introduced during the conversion of the source files to
  126. man page format. To report such errors, see
  127. https://www.kernel.org/doc/man-pages/reporting_bugs.html .