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

fwide.3p (3158B)


  1. '\" et
  2. .TH FWIDE "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. fwide
  12. \(em set stream orientation
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <stdio.h>
  17. #include <wchar.h>
  18. .P
  19. int fwide(FILE *\fIstream\fP, int \fImode\fP);
  20. .fi
  21. .SH DESCRIPTION
  22. The functionality described on this reference page is aligned with the
  23. ISO\ C standard. Any conflict between the requirements described here and the
  24. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  25. .P
  26. The
  27. \fIfwide\fR()
  28. function shall determine the orientation of the stream pointed to by
  29. .IR stream .
  30. If
  31. .IR mode
  32. is greater than zero, the function first attempts to make the stream
  33. wide-oriented. If
  34. .IR mode
  35. is less than zero, the function first attempts to make the stream
  36. byte-oriented. Otherwise,
  37. .IR mode
  38. is zero and the function does not alter the orientation of the stream.
  39. .P
  40. If the orientation of the stream has already been determined,
  41. \fIfwide\fR()
  42. shall not change it.
  43. .P
  44. The
  45. \fIfwide\fR()
  46. function shall not change the setting of
  47. .IR errno
  48. if successful.
  49. .P
  50. Since no return value is reserved to indicate an error, an
  51. application wishing to check for error situations should set
  52. .IR errno
  53. to 0, then call
  54. \fIfwide\fR(),
  55. then check
  56. .IR errno ,
  57. and if it is non-zero, assume an error has occurred.
  58. .SH "RETURN VALUE"
  59. The
  60. \fIfwide\fR()
  61. function shall return a value greater than zero if, after the call, the
  62. stream has wide-orientation, a value less than zero if the stream has
  63. byte-orientation, or zero if the stream has no orientation.
  64. .SH ERRORS
  65. The
  66. \fIfwide\fR()
  67. function may fail if:
  68. .TP
  69. .BR EBADF
  70. The
  71. .IR stream
  72. argument is not a valid stream.
  73. .LP
  74. .IR "The following sections are informative."
  75. .SH EXAMPLES
  76. None.
  77. .SH "APPLICATION USAGE"
  78. A call to
  79. \fIfwide\fR()
  80. with
  81. .IR mode
  82. set to zero can be used to determine the current orientation of a
  83. stream.
  84. .SH RATIONALE
  85. None.
  86. .SH "FUTURE DIRECTIONS"
  87. None.
  88. .SH "SEE ALSO"
  89. The Base Definitions volume of POSIX.1\(hy2017,
  90. .IR "\fB<stdio.h>\fP",
  91. .IR "\fB<wchar.h>\fP"
  92. .\"
  93. .SH COPYRIGHT
  94. Portions of this text are reprinted and reproduced in electronic form
  95. from IEEE Std 1003.1-2017, Standard for Information Technology
  96. -- Portable Operating System Interface (POSIX), The Open Group Base
  97. Specifications Issue 7, 2018 Edition,
  98. Copyright (C) 2018 by the Institute of
  99. Electrical and Electronics Engineers, Inc and The Open Group.
  100. In the event of any discrepancy between this version and the original IEEE and
  101. The Open Group Standard, the original IEEE and The Open Group Standard
  102. is the referee document. The original Standard can be obtained online at
  103. http://www.opengroup.org/unix/online.html .
  104. .PP
  105. Any typographical or formatting errors that appear
  106. in this page are most likely
  107. to have been introduced during the conversion of the source files to
  108. man page format. To report such errors, see
  109. https://www.kernel.org/doc/man-pages/reporting_bugs.html .