Changeset 46ac986 in mainline for uspace/lib/posix/stdio.c
- Timestamp:
- 2011-07-11T21:57:54Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 221afc9e
- Parents:
- 12fb8498
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/stdio.c
r12fb8498 r46ac986 100 100 101 101 bool can_unget = 102 102 /* Provided character is legal. */ 103 103 c != EOF && 104 104 /* Stream is consistent. */ 105 105 !stream->error && 106 106 /* Stream is buffered. */ 107 107 stream->btype != _IONBF && 108 108 /* Last operation on the stream was a read operation. */ 109 109 stream->buf_state == _bs_read && 110 111 112 110 /* Stream buffer is already allocated (i.e. there was already carried 111 * out either write or read operation on the stream). This is probably 112 * redundant check but let's be safe. */ 113 113 stream->buf != NULL && 114 115 116 117 114 /* There is still space in the stream to retreat. POSIX demands the 115 * possibility to unget at least 1 character. It should be always 116 * possible, assuming the last operation on the stream read at least 1 117 * character, because the buffer is refilled in the lazily manner. */ 118 118 stream->buf_tail > stream->buf; 119 119 … … 230 230 * stream with a changed mode. NULL otherwise. 231 231 */ 232 FILE *posix_freopen( 233 const char *restrict filename, 234 const char *restrict mode, 235 FILE *restrict stream) 232 FILE *posix_freopen(const char *restrict filename, 233 const char *restrict mode, FILE *restrict stream) 236 234 { 237 235 assert(mode != NULL);
Note:
See TracChangeset
for help on using the changeset viewer.