diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2000-03-10 17:57:32 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2000-03-10 17:57:32 +0000 |
commit | 1cf0ee341fc61176176d11cfae6312778e750585 (patch) | |
tree | 1b266aa95093a4bff11ec3f9c784e07abd211602 /newlib/libc/stdio/putw.c | |
parent | e9c949781598a0476a6cdb953e5f09442d5ca016 (diff) | |
download | newlib-1cf0ee341fc61176176d11cfae6312778e750585.zip newlib-1cf0ee341fc61176176d11cfae6312778e750585.tar.gz newlib-1cf0ee341fc61176176d11cfae6312778e750585.tar.bz2 |
* libc/stdio/putw.c (putw): Return 0 on success, to be compliant
with XSH5, not SVID.
Diffstat (limited to 'newlib/libc/stdio/putw.c')
-rw-r--r-- | newlib/libc/stdio/putw.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/newlib/libc/stdio/putw.c b/newlib/libc/stdio/putw.c index 4bcefaf..19f4abc 100644 --- a/newlib/libc/stdio/putw.c +++ b/newlib/libc/stdio/putw.c @@ -37,10 +37,7 @@ DESCRIPTION to write a word to the file or stream identified by <[fp]>. As a side effect, <<putw>> advances the file's current position indicator. -RETURNS The written word, unless the host system reports a write -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>>. +RETURNS Zero on success, <<EOF>> on failure. PORTABILITY <<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) return EOF; - return w; + return 0; } |