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

getchar.3p (2364B)


  1. '\" et
  2. .TH GETCHAR "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. getchar
  12. \(em get a byte from a
  13. .IR stdin
  14. stream
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <stdio.h>
  19. .P
  20. int getchar(void);
  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. The
  28. \fIgetchar\fR()
  29. function shall be equivalent to \fIgetc\fP(\fIstdin\fP).
  30. .SH "RETURN VALUE"
  31. Refer to
  32. .IR "\fIfgetc\fR\^(\|)".
  33. .SH ERRORS
  34. Refer to
  35. .IR "\fIfgetc\fR\^(\|)".
  36. .LP
  37. .IR "The following sections are informative."
  38. .SH EXAMPLES
  39. None.
  40. .SH "APPLICATION USAGE"
  41. If the integer value returned by
  42. \fIgetchar\fR()
  43. is stored into a variable of type
  44. .BR char
  45. and then compared against the integer constant EOF, the comparison may
  46. never succeed, because sign-extension of a variable of type
  47. .BR char
  48. on widening to integer is implementation-defined.
  49. .SH RATIONALE
  50. None.
  51. .SH "FUTURE DIRECTIONS"
  52. None.
  53. .SH "SEE ALSO"
  54. .IR "Section 2.5" ", " "Standard I/O Streams",
  55. .IR "\fIgetc\fR\^(\|)"
  56. .P
  57. The Base Definitions volume of POSIX.1\(hy2017,
  58. .IR "\fB<stdio.h>\fP"
  59. .\"
  60. .SH COPYRIGHT
  61. Portions of this text are reprinted and reproduced in electronic form
  62. from IEEE Std 1003.1-2017, Standard for Information Technology
  63. -- Portable Operating System Interface (POSIX), The Open Group Base
  64. Specifications Issue 7, 2018 Edition,
  65. Copyright (C) 2018 by the Institute of
  66. Electrical and Electronics Engineers, Inc and The Open Group.
  67. In the event of any discrepancy between this version and the original IEEE and
  68. The Open Group Standard, the original IEEE and The Open Group Standard
  69. is the referee document. The original Standard can be obtained online at
  70. http://www.opengroup.org/unix/online.html .
  71. .PP
  72. Any typographical or formatting errors that appear
  73. in this page are most likely
  74. to have been introduced during the conversion of the source files to
  75. man page format. To report such errors, see
  76. https://www.kernel.org/doc/man-pages/reporting_bugs.html .