File: getc.3

package info (click to toggle)
manpages 6.16-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 20,476 kB
  • sloc: sh: 576; python: 222; perl: 191; makefile: 29; lisp: 22
file content (47 lines) | stat: -rw-r--r-- 858 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.\" Copyright, the authors of the Linux man-pages project
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.TH getc 3 2025-10-10 "Linux man-pages (unreleased)"
.SH NAME
getc \- get character from stream
.SH LIBRARY
Standard C library
.RI ( libc ,\~ \-lc )
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.P
.BI "int getc(FILE *" stream );
.fi
.SH DESCRIPTION
.BR getc ()
is equivalent to
.BR fgetc (3),
except for the BUGS
(see below).
.P
Use
.BR fgetc (3)
instead.
.SH STANDARDS
C23, POSIX.1-2024.
.SH HISTORY
POSIX.1-2001, C89.
.SH BUGS
.SS Multiple evaluation
It may be implemented as a macro,
and it may evaluate
.I stream
more than once.
.SS Name
The name is inconsistent.
It is often confused with
.BR getchar (3),
as normally
.I <stdio.h>
functions without the "f" prefix in their name
are variants that use
.IR stdin .
.SH SEE ALSO
.BR fgetc (3)