From 3d08cd331c1adcf0d917392f7e527b3f00511748 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 24 May 2024 06:52:22 +0200 Subject: Merging upstream version 6.8. Signed-off-by: Daniel Baumann --- man/man3const/EOF.3const | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 man/man3const/EOF.3const (limited to 'man/man3const/EOF.3const') diff --git a/man/man3const/EOF.3const b/man/man3const/EOF.3const new file mode 100644 index 0000000..61a244f --- /dev/null +++ b/man/man3const/EOF.3const @@ -0,0 +1,42 @@ +.\" Copyright (c) 2022 by Alejandro Colomar +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" +.TH EOF 3const 2024-05-02 "Linux man-pages (unreleased)" +.SH NAME +EOF \- end of file or error indicator +.SH LIBRARY +Standard C library +.RI ( libc ) +.SH SYNOPSIS +.nf +.B #include +.P +.BR "#define EOF " "/* ... */" +.fi +.SH DESCRIPTION +.B EOF +represents the end of an input file, or an error indication. +It is a negative value, of type +.IR int . +.P +.B EOF +is not a character +(it can't be represented by +.IR "unsigned char" ). +It is instead a sentinel value outside of the valid range for valid characters. +.SH CONFORMING TO +C99 and later; +POSIX.1-2001 and later. +.SH CAVEATS +Programs can't pass this value to an output function +to "write" the end of a file. +That would likely result in undefined behavior. +Instead, +closing the writing stream or file descriptor +that refers to such file +is the way to signal the end of that file. +.SH SEE ALSO +.BR feof (3), +.BR fgetc (3) -- cgit v1.2.3