diff options
Diffstat (limited to 'newlib/libc/stdio')
-rw-r--r-- | newlib/libc/stdio/getdelim.c | 8 | ||||
-rw-r--r-- | newlib/libc/stdio/getw.c | 7 | ||||
-rw-r--r-- | newlib/libc/stdio/putw.c | 5 |
3 files changed, 11 insertions, 9 deletions
diff --git a/newlib/libc/stdio/getdelim.c b/newlib/libc/stdio/getdelim.c index dad8feeb2..0fdfb3add 100644 --- a/newlib/libc/stdio/getdelim.c +++ b/newlib/libc/stdio/getdelim.c @@ -1,7 +1,7 @@ /* Copyright 2002, Red Hat Inc. - all rights reserved */ /* FUNCTION -<<getdelim>>---read a line up to a specified line delimeter +<<getdelim>>---read a line up to a specified line delimiter INDEX getdelim @@ -21,16 +21,16 @@ TRAD_SYNOPSIS DESCRIPTION <<getdelim>> reads a file <[fp]> up to and possibly including a specified -delimeter <[delim]>. The line is read into a buffer pointed to +delimiter <[delim]>. The line is read into a buffer pointed to by <[bufptr]> and designated with size *<[n]>. If the buffer is not large enough, it will be dynamically grown by <<getdelim>>. As the buffer is grown, the pointer to the size <[n]> will be updated. RETURNS -<<getdelim>> returns <<-1>> if no characters were successfully read, +<<getdelim>> returns <<-1>> if no characters were successfully read; otherwise, it returns the number of bytes successfully read. -at end of file, the result is nonzero. +At end of file, the result is nonzero. PORTABILITY <<getdelim>> is a glibc extension. diff --git a/newlib/libc/stdio/getw.c b/newlib/libc/stdio/getw.c index b5065bd53..210c5939a 100644 --- a/newlib/libc/stdio/getw.c +++ b/newlib/libc/stdio/getw.c @@ -37,14 +37,15 @@ to get the next word from the file or stream identified by <[fp]>. As a side effect, <<getw>> advances the file's current position indicator. -RETURNS The next word (read as an <<int>>), unless there is no more -data, or the host system reports a read error; in either of these +RETURNS +The next word (read as an <<int>>), unless there is no more +data or the host system reports a read error; in either of these situations, <<getw>> returns <<EOF>>. Since <<EOF>> is a valid <<int>>, you must use <<ferror>> or <<feof>> to distinguish these situations. PORTABILITY -<<getw>> is a remnant of K&R C, it is not part of any ISO C Standard. +<<getw>> is a remnant of K&R C; it is not part of any ISO C Standard. <<fread>> should be used instead. In fact, this implementation of <<getw>> is based upon <<fread>>. diff --git a/newlib/libc/stdio/putw.c b/newlib/libc/stdio/putw.c index 78406eeb4..682015c0a 100644 --- a/newlib/libc/stdio/putw.c +++ b/newlib/libc/stdio/putw.c @@ -37,10 +37,11 @@ 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 Zero on success, <<EOF>> on failure. +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. +<<putw>> is a remnant of K&R C; it is not part of any ISO C Standard. <<fwrite>> should be used instead. In fact, this implementation of <<putw>> is based upon <<fwrite>>. |