Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Mar 1996 00:38:47 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        CVS-committers@freefall.freebsd.org, ache@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-lib@freefall.freebsd.org
Subject:   Re: cvs commit:  src/lib/libc/stdio fgets.c
Message-ID:  <199603251338.AAA16035@godzilla.zeta.org.au>

index | next in thread | raw e-mail

>  Modified:    lib/libc/stdio  fgets.c
>  Log:
>  Since n is int now, sanity check must be n <= 0, not simple n == 0

I was going to change this too.  NetBSD also has n <= 0.  Plauger's C
library book has n <= 1.  The C standard doesn't seem to define the
(stupid) case when no input is read due to lack of space in the buffer.
I also have some fixes for our man page.  It said wrong and incomplete
things about what happens to the buffer when EOF is returned.

Bruce


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603251338.AAA16035>