Date: Mon, 22 Jan 2007 17:46:46 -0500 From: Garrett Wollman <wollman@csail.mit.edu> To: =?iso-8859-2?Q?K=F8i=B9tof_=AEelechovski?= <giecrilj@stegny.2a.pl> Cc: freebsd-standards@freebsd.org Subject: return value of fprintf Message-ID: <17845.16086.313698.205301@khavrinen.csail.mit.edu> In-Reply-To: <005301c73e6c$ba6ffd00$1a01080a@POCZTOWIEC>
index | next in thread | previous in thread | raw e-mail
<<On Mon, 22 Jan 2007 22:31:50 +0100, Křištof Želechovski <giecrilj@stegny.2a.pl> said:
> The latter is correct: I get printf("abcd") == 4 even under >/dev/full.
> (uname is Interix on x86 ver. 3.5)
The FreeBSD C library is only supported as an integral part of the
FreeBSD operating system.
> However, the former is not: according to the ANSI C standard
> <http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf> , §7.19.6.1/14,
> printf should return a negative value in this case.
The standard makes no such requirement; neither an encoding error nor
an I/O error can ever be encountered in this example. The error
condition will not be detected until the stream's buffer is flushed,
as by fflush() or fclose().
-GAWollman
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17845.16086.313698.205301>
