* libc/stdio/putw.c (putw): Return 0 on success, to be compliant
with XSH5, not SVID.
This commit is contained in:
parent
e9c9497815
commit
1cf0ee341f
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Mar 10 14:53:50 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
|
||||||
|
|
||||||
|
* libc/stdio/putw.c (putw): Return 0 on success, to be compliant
|
||||||
|
with XSH5, not SVID.
|
||||||
|
|
||||||
Thu Mar 9 17:20:41 2000 Jeff Johnston <jjohnstn@cygnus.com>
|
Thu Mar 9 17:20:41 2000 Jeff Johnston <jjohnstn@cygnus.com>
|
||||||
|
|
||||||
* libc/include/string.h: Changed last argument back to ssize_t
|
* libc/include/string.h: Changed last argument back to ssize_t
|
||||||
|
|
|
@ -37,10 +37,7 @@ DESCRIPTION
|
||||||
to write a word to the file or stream identified by <[fp]>. As a side
|
to write a word to the file or stream identified by <[fp]>. As a side
|
||||||
effect, <<putw>> advances the file's current position indicator.
|
effect, <<putw>> advances the file's current position indicator.
|
||||||
|
|
||||||
RETURNS The written word, unless the host system reports a write
|
RETURNS Zero on success, <<EOF>> on failure.
|
||||||
error, in which case <<putw>> returns <<EOF>>. Since <<EOF>> is a
|
|
||||||
valid <<int>>, you must use <<ferror>> or <<feof>> to distinguish
|
|
||||||
these situations when writing the integer equal to <<EOF>>.
|
|
||||||
|
|
||||||
PORTABILITY
|
PORTABILITY
|
||||||
<<putw>> is a remnant of K&R C, it is not part of any ISO C Standard.
|
<<putw>> is a remnant of K&R C, it is not part of any ISO C Standard.
|
||||||
|
@ -62,5 +59,5 @@ putw (w, fp)
|
||||||
{
|
{
|
||||||
if (fwrite((const char*)&w, sizeof(w), 1, fp) != 1)
|
if (fwrite((const char*)&w, sizeof(w), 1, fp) != 1)
|
||||||
return EOF;
|
return EOF;
|
||||||
return w;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue