[PATCH]: Implement fwide (was Re: swprintf() and friends?)
Corinna Vinschen
vinschen@redhat.com
Wed Nov 12 15:56:00 GMT 2008
On Nov 7 11:11, Howland Craig D (Craig) wrote:
> 1) The comments in the start of the file say C99 and POSIX.1-2001.
> POSIX adds (with respect to C99) setting errno to EBADF if the stream
> argument is invalid. However, this is not done. So either setting
> errno should be added or the POSIX note should be deleted. What is
> the better approach?
POSIX doesn't require fwide to return EBADF. The actual paragraph
says:
The fwide() function *may* fail if:
[EBADF] The stream argument is not a valid stream.
That's an optional error code.
> 2) Another comment at the start of the file says "Once a stream has an
> orientation, it cannot be changed and persists until the stream is
> closed."
> Actually, C99 allows it to be changed by freopen() (end of the paragraph
> at the top of the page on page 264, which is paragraph 4 in section
> 7.19.2). A proposed modification is:
> "Once a stream has an orientation, it cannot be changed and persists
> until the stream is closed, unless the stream is re-opened with freopen,
> which removes the orientation of the stream."
Probably a good idea.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
More information about the Newlib
mailing list