Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Aug 2001 13:52:47 -0700
From:      housel@acm.org (Peter S. Housel)
To:        "Andrey A. Chernov" <ache@FreeBSD.ORG>
Cc:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/lib/libc/stdio ftell.c ungetc.c
Message-ID:  <mu9n14g2bq8.wl@cx281057-a.irvn1.occa.home.com>
In-Reply-To: <200108311950.f7VJoPd48683@freefall.freebsd.org>
References:  <200108311950.f7VJoPd48683@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At Fri, 31 Aug 2001 12:50:25 -0700 (PDT),
Andrey A. Chernov <ache@FreeBSD.ORG> wrote:
> ache        2001/08/31 12:50:25 PDT
> 
>   Modified files:
>     lib/libc/stdio       ftell.c ungetc.c 
>   Log:
>   Disallow ungetc at offset 0 (to prevent negative offset happens), so simplify
>   checks in ftell.
>   
>   Revision  Changes    Path
>   1.18      +12 -23    src/lib/libc/stdio/ftell.c
>   1.10      +5 -1      src/lib/libc/stdio/ungetc.c

Section 7.19.7.11 of ISO/IEC 9899:1999 says that one character of
ungetc is guaranteed.  It also says that the file position indicator
value is indeterminate if was zero before the call.

Section 7.26.9 says that pusing back characters at position 0 is an
"obsolescent feature" that will probably go away in the next revision
of the standard.  But that doesn't mean you can disallow it now.

-Peter-


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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