{"id":6785,"date":"2022-12-20T19:33:38","date_gmt":"2022-12-20T22:33:38","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/catgets-man3\/"},"modified":"2022-12-20T19:33:38","modified_gmt":"2022-12-20T22:33:38","slug":"catgets-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/catgets-man3\/","title":{"rendered":"CATGETS (man3)"},"content":{"rendered":"<h1 align=\"center\">CATGETS<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#RETURN VALUE\">RETURN VALUE<\/a><br \/> <a href=\"#ATTRIBUTES\">ATTRIBUTES<\/a><br \/> <a href=\"#CONFORMING TO\">CONFORMING TO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COLOPHON\">COLOPHON<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">catgets \u2212 get message from a message catalog<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <nl_types.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>char *catgets(nl_catd<\/b> <i>catalog<\/i><b>, int<\/b> <i>set_number<\/i><b>, int<\/b> <i>message_number<\/i><b>, <br \/> const char *<\/b><i>message<\/i><b>);<\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>catgets<\/b>() reads the message <i>message_number<\/i>, in set <i>set_number<\/i>, from the message catalog identified by <i>catalog<\/i>, where <i>catalog<\/i> is a catalog descriptor returned from an earlier call to <b>catopen<\/b>(3). The fourth argument, <i>message<\/i>, points to a default message string which will be returned by <b>catgets<\/b>() if the identified message catalog is not currently available. The message-text is contained in an internal buffer area and should be copied by the application if it is to be saved or modified. The return string is always terminated with a null byte (&#8216;\u0000&#8217;).<\/p>\n<h2>RETURN VALUE <a name=\"RETURN VALUE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">On success, <b>catgets<\/b>() returns a pointer to an internal buffer area containing the null-terminated message string. On failure, <b>catgets<\/b>() returns the value <i>message<\/i>.<\/p>\n<h2>ATTRIBUTES <a name=\"ATTRIBUTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">For an explanation of the terms used in this section, see <b>attributes<\/b>(7).<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p align=\"center\"><img decoding=\"async\" src=\"grohtml-1587201.png\" alt=\"Image grohtml-1587201.png\"><\/p>\n<h2>CONFORMING TO <a name=\"CONFORMING TO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">POSIX.1-2001, POSIX.1-2008.<\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>catgets<\/b>() function is available only in libc.so.4.4.4c and above. The Jan 1987 X\/Open Portability Guide specifies a more subtle error return: <i>message<\/i> is returned if the message catalog specified by <i>catalog<\/i> is not available, while an empty string is returned when the message catalog is available but does not contain the specified message. These two possible error returns seem to be discarded in SUSv2 in favor of always returning <i>message<\/i>.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>catopen<\/b>(3), <b>setlocale<\/b>(3)<\/p>\n<h2>COLOPHON <a name=\"COLOPHON\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This page is part of release 5.10 of the Linux <i>man-pages<\/i> project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https:\/\/www.kernel.org\/doc\/man\u2212pages\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  catgets \u2212 get message from a message catalog <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2536],"tags":[2538,1691,3007],"class_list":["post-6785","post","type-post","status-publish","format-standard","hentry","category-3-llamadas-de-bibliotecas","tag-2538","tag-catgets","tag-man3"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6785"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6785\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}