mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-11-14 16:06:00 +00:00
Remove macro definition of rewind() which does not clear the IO error indicator.
Now rewind() will always be called as a function. In combination with an update to the rewind() function in ORCALib, this will ensure that the error indicator is always cleared, as required by the C standards.
This commit is contained in:
parent
c987f240c6
commit
06bf0c5f46
@ -99,16 +99,6 @@ extern FILE *stdout;
|
|||||||
|
|
||||||
typedef long fpos_t;
|
typedef long fpos_t;
|
||||||
|
|
||||||
/*
|
|
||||||
* Function declared as a macro
|
|
||||||
*/
|
|
||||||
|
|
||||||
void rewind(FILE *);
|
|
||||||
#define rewind(stream) (__fseek((stream),0L,SEEK_SET))
|
|
||||||
|
|
||||||
/* Private function used in the above macro (not to be used otherwise) */
|
|
||||||
int __fseek(FILE *, long, int);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function declarations
|
* Function declarations
|
||||||
*/
|
*/
|
||||||
@ -142,6 +132,7 @@ int putchar(int);
|
|||||||
int puts(const char *);
|
int puts(const char *);
|
||||||
int remove(const char *);
|
int remove(const char *);
|
||||||
int rename(const char *, const char *);
|
int rename(const char *, const char *);
|
||||||
|
void rewind(FILE *);
|
||||||
int scanf(const char *, ...);
|
int scanf(const char *, ...);
|
||||||
void setbuf(FILE *, char *);
|
void setbuf(FILE *, char *);
|
||||||
int setvbuf(FILE *, char *, int, size_t);
|
int setvbuf(FILE *, char *, int, size_t);
|
||||||
|
2
cc.notes
2
cc.notes
@ -1829,6 +1829,8 @@ int foo(int[42]);
|
|||||||
|
|
||||||
(Jay Krell, Devin Reade)
|
(Jay Krell, Devin Reade)
|
||||||
|
|
||||||
|
190. Calling rewind() should clear the I/O error indicator for the stream (the value returned by ferror()), but it was not doing so.
|
||||||
|
|
||||||
-- Bugs from C 2.1.0 that have been fixed -----------------------------------
|
-- Bugs from C 2.1.0 that have been fixed -----------------------------------
|
||||||
|
|
||||||
1. In some situations, fread() reread the first 1K or so of the file.
|
1. In some situations, fread() reread the first 1K or so of the file.
|
||||||
|
Loading…
Reference in New Issue
Block a user