Skip to content

Commit 91e9010

Browse files
author
Filip Jagodzinski
committed
Tests: Stream: Use a quote from C99 spec
Use C99 instead of Linux man entry.
1 parent 89a475b commit 91e9010

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

TESTS/mbed_platform/Stream/main.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,15 @@
2323
/* This test suite verifies that write/read/write/read sequence can be
2424
* successfully executed on the Stream objects.
2525
*
26-
* A qute from `man 3 fdopen`:
26+
* A qute from C99 standard, paragraph 7.19.5.3, point 6:
2727
*
28-
* Reads and writes may be intermixed on read/write streams in any order. Note
29-
* that ANSI C requires that a file positioning function intervene between
30-
* output and input, unless an input operation encounters end-of-file. (If
31-
* this condition is not met, then a read is allowed to return the result
32-
* of writes other than the most recent.) Therefore it is good practice (and
33-
* indeed sometimes necessary under Linux) to put an fseek(3) or fgetpos(3)
34-
* operation between write and read operations on such a stream. This operation
35-
* may be an apparent no-op (as in fseek(..., 0L, SEEK_CUR) called for its
36-
* synchronizing side effect).
28+
* When a file is opened with update mode ('+' as the second or third character in the
29+
* above list of mode argument values), both input and output may be performed on the
30+
* associated stream. However, output shall not be directly followed by input without an
31+
* intervening call to the fflush function or to a file positioning function (fseek,
32+
* fsetpos, or rewind), and input shall not be directly followed by output without an
33+
* intervening call to a file positioning function, unless the input operation encounters end-
34+
* of-file.
3735
*/
3836

3937
using utest::v1::Case;

0 commit comments

Comments
 (0)