Fet rid of explicit file stream flushes, streams are flushed on exit, which we can always gurantee.

This commit is contained in:
Dale Weiler 2013-04-14 01:32:29 +00:00
parent 752409417f
commit 7ba7fd5968
4 changed files with 0 additions and 10 deletions

1
exec.c
View file

@ -455,7 +455,6 @@ static void prog_print_statement(qc_program *prog, prog_section_statement *st)
else printf("(none)");
printf("\n");
}
fflush(stdout);
}
static qcint prog_enterfunction(qc_program *prog, prog_section_function *func)

5
fs.c
View file

@ -165,11 +165,6 @@ int fs_file_seek(FILE *fp, long int off, int whence) {
return fseek(fp, off, whence);
}
int fs_file_flush(FILE *fp) {
/* Invokes file_exception on windows if fp is null */
return fflush(fp);
}
long int fs_file_tell(FILE *fp) {
/* Invokes file_exception on windows if fp is null */
return ftell(fp);

View file

@ -466,7 +466,6 @@ void util_hsdel(hash_set_t *);
void fs_file_close (FILE *);
int fs_file_error (FILE *);
int fs_file_getc (FILE *);
int fs_file_flush (FILE *);
int fs_file_printf (FILE *, const char *, ...);
int fs_file_puts (FILE *, const char *);
int fs_file_seek (FILE *, long int, int);

3
test.c
View file

@ -985,8 +985,6 @@ void task_schedualize(size_t *pad) {
task_tasks[i].compiled = false;
execute = false;
}
fs_file_flush(task_tasks[i].stdoutlog);
}
while (fs_file_getline(&data, &size, task_tasks[i].runhandles[2]) != EOF) {
/*
@ -1003,7 +1001,6 @@ void task_schedualize(size_t *pad) {
}
fs_file_puts (task_tasks[i].stderrlog, data);
fs_file_flush(task_tasks[i].stdoutlog);
}
if (!task_tasks[i].compiled && strcmp(task_tasks[i].tmpl->proceduretype, "-fail")) {