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

stdin.3p (3825B)


  1. '\" et
  2. .TH STDIN "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. stderr,
  12. stdin,
  13. stdout
  14. \(em standard I/O streams
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <stdio.h>
  19. .P
  20. extern FILE *stderr, *stdin, *stdout;
  21. .fi
  22. .SH DESCRIPTION
  23. The functionality described on this reference page is aligned with the
  24. ISO\ C standard. Any conflict between the requirements described here and the
  25. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  26. .P
  27. A file with associated buffering is called a
  28. .IR stream
  29. and is declared to be a pointer to a defined type
  30. .BR FILE .
  31. The
  32. \fIfopen\fR()
  33. function shall create certain descriptive data for a stream and return
  34. a pointer to designate the stream in all further transactions. Normally,
  35. there are three open streams with constant pointers declared in the
  36. .IR <stdio.h>
  37. header and associated with the standard open files.
  38. .P
  39. At program start-up, three streams shall be predefined and need not
  40. be opened explicitly:
  41. .IR "standard input"
  42. (for reading conventional input),
  43. .IR "standard output"
  44. (for writing conventional output), and
  45. .IR "standard error"
  46. (for writing diagnostic output). When opened, the standard error
  47. stream is not fully buffered; the standard input and standard output
  48. streams are fully buffered if and only if the stream can be determined
  49. not to refer to an interactive device.
  50. .P
  51. The following symbolic values in
  52. .IR <unistd.h>
  53. define the file descriptors that shall be associated with the C-language
  54. .IR stdin ,
  55. .IR stdout ,
  56. and
  57. .IR stderr
  58. when the application is started:
  59. .IP STDIN_FILENO 14
  60. Standard input value,
  61. .IR stdin .
  62. Its value is 0.
  63. .IP STDOUT_FILENO 14
  64. Standard output value,
  65. .IR stdout .
  66. Its value is 1.
  67. .IP STDERR_FILENO 14
  68. Standard error value,
  69. .IR stderr .
  70. Its value is 2.
  71. .P
  72. The
  73. .IR stderr
  74. stream is expected to be open for reading and writing.
  75. .SH "RETURN VALUE"
  76. None.
  77. .SH ERRORS
  78. No errors are defined.
  79. .LP
  80. .IR "The following sections are informative."
  81. .SH EXAMPLES
  82. None.
  83. .SH "APPLICATION USAGE"
  84. None.
  85. .SH RATIONALE
  86. None.
  87. .SH "FUTURE DIRECTIONS"
  88. None.
  89. .SH "SEE ALSO"
  90. .IR "\fIfclose\fR\^(\|)",
  91. .IR "\fIfeof\fR\^(\|)",
  92. .IR "\fIferror\fR\^(\|)",
  93. .IR "\fIfileno\fR\^(\|)",
  94. .IR "\fIfopen\fR\^(\|)",
  95. .IR "\fIfprintf\fR\^(\|)",
  96. .IR "\fIfread\fR\^(\|)",
  97. .IR "\fIfscanf\fR\^(\|)",
  98. .IR "\fIfseek\fR\^(\|)",
  99. .IR "\fIgetc\fR\^(\|)",
  100. .IR "\fIgets\fR\^(\|)",
  101. .IR "\fIpopen\fR\^(\|)",
  102. .IR "\fIputc\fR\^(\|)",
  103. .IR "\fIputs\fR\^(\|)",
  104. .IR "\fIread\fR\^(\|)",
  105. .IR "\fIsetbuf\fR\^(\|)",
  106. .IR "\fIsetvbuf\fR\^(\|)",
  107. .IR "\fItmpfile\fR\^(\|)",
  108. .IR "\fIungetc\fR\^(\|)",
  109. .IR "\fIvfprintf\fR\^(\|)"
  110. .P
  111. The Base Definitions volume of POSIX.1\(hy2017,
  112. .IR "\fB<stdio.h>\fP",
  113. .IR "\fB<unistd.h>\fP"
  114. .\"
  115. .SH COPYRIGHT
  116. Portions of this text are reprinted and reproduced in electronic form
  117. from IEEE Std 1003.1-2017, Standard for Information Technology
  118. -- Portable Operating System Interface (POSIX), The Open Group Base
  119. Specifications Issue 7, 2018 Edition,
  120. Copyright (C) 2018 by the Institute of
  121. Electrical and Electronics Engineers, Inc and The Open Group.
  122. In the event of any discrepancy between this version and the original IEEE and
  123. The Open Group Standard, the original IEEE and The Open Group Standard
  124. is the referee document. The original Standard can be obtained online at
  125. http://www.opengroup.org/unix/online.html .
  126. .PP
  127. Any typographical or formatting errors that appear
  128. in this page are most likely
  129. to have been introduced during the conversion of the source files to
  130. man page format. To report such errors, see
  131. https://www.kernel.org/doc/man-pages/reporting_bugs.html .