mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 12:00:38 +00:00
Fet rid of explicit file stream flushes, streams are flushed on exit, which we can always gurantee.
This commit is contained in:
parent
752409417f
commit
7ba7fd5968
4 changed files with 0 additions and 10 deletions
1
exec.c
1
exec.c
|
@ -455,7 +455,6 @@ static void prog_print_statement(qc_program *prog, prog_section_statement *st)
|
||||||
else printf("(none)");
|
else printf("(none)");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
fflush(stdout);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static qcint prog_enterfunction(qc_program *prog, prog_section_function *func)
|
static qcint prog_enterfunction(qc_program *prog, prog_section_function *func)
|
||||||
|
|
5
fs.c
5
fs.c
|
@ -165,11 +165,6 @@ int fs_file_seek(FILE *fp, long int off, int whence) {
|
||||||
return fseek(fp, off, 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) {
|
long int fs_file_tell(FILE *fp) {
|
||||||
/* Invokes file_exception on windows if fp is null */
|
/* Invokes file_exception on windows if fp is null */
|
||||||
return ftell(fp);
|
return ftell(fp);
|
||||||
|
|
1
gmqcc.h
1
gmqcc.h
|
@ -466,7 +466,6 @@ void util_hsdel(hash_set_t *);
|
||||||
void fs_file_close (FILE *);
|
void fs_file_close (FILE *);
|
||||||
int fs_file_error (FILE *);
|
int fs_file_error (FILE *);
|
||||||
int fs_file_getc (FILE *);
|
int fs_file_getc (FILE *);
|
||||||
int fs_file_flush (FILE *);
|
|
||||||
int fs_file_printf (FILE *, const char *, ...);
|
int fs_file_printf (FILE *, const char *, ...);
|
||||||
int fs_file_puts (FILE *, const char *);
|
int fs_file_puts (FILE *, const char *);
|
||||||
int fs_file_seek (FILE *, long int, int);
|
int fs_file_seek (FILE *, long int, int);
|
||||||
|
|
3
test.c
3
test.c
|
@ -985,8 +985,6 @@ void task_schedualize(size_t *pad) {
|
||||||
task_tasks[i].compiled = false;
|
task_tasks[i].compiled = false;
|
||||||
execute = false;
|
execute = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
fs_file_flush(task_tasks[i].stdoutlog);
|
|
||||||
}
|
}
|
||||||
while (fs_file_getline(&data, &size, task_tasks[i].runhandles[2]) != EOF) {
|
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_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")) {
|
if (!task_tasks[i].compiled && strcmp(task_tasks[i].tmpl->proceduretype, "-fail")) {
|
||||||
|
|
Loading…
Reference in a new issue