diff options
| -rw-r--r-- | src/stdio/fflush.c | 2 | ||||
| -rw-r--r-- | src/stdio/freopen.c | 1 | ||||
| -rw-r--r-- | src/stdio/fseek.c | 2 | ||||
| -rw-r--r-- | src/stdio/fsetpos.c | 1 |
4 files changed, 6 insertions, 0 deletions
diff --git a/src/stdio/fflush.c b/src/stdio/fflush.c index cb5f49c6..a653e0d1 100644 --- a/src/stdio/fflush.c +++ b/src/stdio/fflush.c @@ -54,6 +54,8 @@ int fflush(FILE *stream) RETURN_FAILURE(CONSTANT(EOF)); */ + stream->operation = OP_NONE; + return ret; } diff --git a/src/stdio/freopen.c b/src/stdio/freopen.c index f2238ff9..f23d53af 100644 --- a/src/stdio/freopen.c +++ b/src/stdio/freopen.c @@ -107,6 +107,7 @@ FILE * freopen(const char * restrict filename, const char * restrict mode, FILE stream->text = !(strchr(mode, 'b')); stream->read = ((openmode & O_RDONLY) == O_RDONLY) || ((openmode & O_RDWR) == O_RDWR); stream->write = ((openmode & O_WRONLY) == O_WRONLY) || ((openmode & O_RDWR) == O_RDWR); + stream->operation = OP_NONE; /* RETURN_SUCCESS(ARGUMENT(stream)); diff --git a/src/stdio/fseek.c b/src/stdio/fseek.c index 9f4bd733..f9f3371a 100644 --- a/src/stdio/fseek.c +++ b/src/stdio/fseek.c @@ -20,6 +20,8 @@ int fseek(FILE *stream, long int offset, int whence) } else if (whence == SEEK_SET) { } + stream->operation = OP_NONE; + return 1; } diff --git a/src/stdio/fsetpos.c b/src/stdio/fsetpos.c index 40545061..c75fed41 100644 --- a/src/stdio/fsetpos.c +++ b/src/stdio/fsetpos.c @@ -10,6 +10,7 @@ int fsetpos(FILE *stream, const fpos_t *pos) (void)stream; (void)pos; /* TODO */ + stream->operation = OP_NONE; return 1; } |
