Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 1996 08:52:15 GMT
From:      Mark Diekhans <markd@grizzly.com>
To:        jkh@time.cdrom.com
Cc:        torek@bsdi.com, hackers@freebsd.org
Subject:   Re: Change to stdio.h to export `cookie?'
Message-ID:  <199601180852.IAA01128@Grizzly.COM>
In-Reply-To: <23707.821959252@time.cdrom.com> (jkh@time.cdrom.com)

next in thread | previous in thread | raw e-mail | index | archive | help

>> >#define fpending(fp)    ((fp)->_p - (fp)->_bf._base)
> 
>> Probably not a bad idea, though this is only correct for write-mode.
>> A more general version might be proposed and sent to ANSI for C9X...
>
>I'm open to suggestions.. :-)


#define fwritepending(fp)    ((fp)->_p - (fp)->_bf._base)
#define freadpending(fp)    ((fp)->_r > 0)

I believe is correct.  The read check is much more useful, however.

Mark



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