{"id":7315,"date":"2022-12-20T19:37:40","date_gmt":"2022-12-20T22:37:40","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/fwide-man3\/"},"modified":"2022-12-20T19:37:40","modified_gmt":"2022-12-20T22:37:40","slug":"fwide-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/fwide-man3\/","title":{"rendered":"FWIDE (man3)"},"content":{"rendered":"<h1 align=\"center\">FWIDE<\/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=\"#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\">fwide \u2212 set and determine the orientation of a FILE stream<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <wchar.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>int fwide(FILE *<\/b><i>stream<\/i><b>, int<\/b> <i>mode<\/i><b>);<\/b><\/p>\n<p style=\"margin-left:5%; margin-top: 1em\">Feature Test Macro Requirements for glibc (see <b>feature_test_macros<\/b>(7)):<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>fwide<\/b>():<\/p>\n<p style=\"margin-left:17%;\">_XOPEN_SOURCE\u00a0>=\u00a0500 || _ISOC99_SOURCE || <br \/> _POSIX_C_SOURCE\u00a0>=\u00a0200112L<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">When <i>mode<\/i> is zero, the <b>fwide<\/b>() function determines the current orientation of <i>stream<\/i>. It returns a positive value if <i>stream<\/i> is wide-character oriented, that is, if wide-character I\/O is permitted but char I\/O is disallowed. It returns a negative value if <i>stream<\/i> is byte oriented\u2014that is, if char I\/O is permitted but wide-character I\/O is disallowed. It returns zero if <i>stream<\/i> has no orientation yet; in this case the next I\/O operation might change the orientation (to byte oriented if it is a char I\/O operation, or to wide-character oriented if it is a wide-character I\/O operation).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Once a stream has an orientation, it cannot be changed and persists until the stream is closed.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">When <i>mode<\/i> is nonzero, the <b>fwide<\/b>() function first attempts to set <i>stream<\/i>\u2019s orientation (to wide-character oriented if <i>mode<\/i> is greater than 0, or to byte oriented if <i>mode<\/i> is less than 0). It then returns a value denoting the current orientation, as above.<\/p>\n<h2>RETURN VALUE <a name=\"RETURN VALUE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>fwide<\/b>() function returns the stream\u2019s orientation, after possibly changing it. A positive return value means wide-character oriented. A negative return value means byte oriented. A return value of zero means undecided.<\/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, C99.<\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Wide-character output to a byte oriented stream can be performed through the <b>fprintf<\/b>(3) function with the <b>%lc<\/b> and <b>%ls<\/b> directives.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Char oriented output to a wide-character oriented stream can be performed through the <b>fwprintf<\/b>(3) function with the <b>%c<\/b> and <b>%s<\/b> directives.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>fprintf<\/b>(3), <b>fwprintf<\/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>  fwide \u2212 set and determine the orientation of a FILE stream <\/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,1795,3007],"class_list":["post-7315","post","type-post","status-publish","format-standard","hentry","category-3-llamadas-de-bibliotecas","tag-2538","tag-fwide","tag-man3"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7315","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=7315"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7315\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}