flush logfile in case of crash
This commit is contained in:
@@ -422,6 +422,7 @@ struct filestream : stream
|
||||
bool end() { return feof(file)!=0; }
|
||||
long tell() { return ftell(file); }
|
||||
bool seek(long offset, int whence) { return fseek(file, offset, whence) >= 0; }
|
||||
void fflush() { if(file) ::fflush(file); }
|
||||
int read(void *buf, int len) { return (int)fread(buf, 1, len, file); }
|
||||
int write(const void *buf, int len) { return (int)fwrite(buf, 1, len, file); }
|
||||
int getchar() { return fgetc(file); }
|
||||
|
||||
Reference in New Issue
Block a user