]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Fet rid of explicit file stream flushes, streams are flushed on exit, which we can...
authorDale Weiler <killfieldengine@gmail.com>
Sun, 14 Apr 2013 01:32:29 +0000 (01:32 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sun, 14 Apr 2013 01:32:29 +0000 (01:32 +0000)
exec.c
fs.c
gmqcc.h
test.c

diff --git a/exec.c b/exec.c
index d9ced65102578238e8f0a8f4aab38ccce36f49b2..8b0ee5e830722084c8e522840c05239cd918b431 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -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)
diff --git a/fs.c b/fs.c
index e39858a0ed9fd3619abc6c8aca8b51721f42f201..997b368b13ce6bf801ff5637b9689ae464e853b0 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -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);
diff --git a/gmqcc.h b/gmqcc.h
index 6d4d9718fc78f5f8ad4550961211052b4d5e9791..fbddf15da657ef89321d047c4d7d14a7b1ef64de 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -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);
diff --git a/test.c b/test.c
index 23106333a225e3bc7068b5ec13d2d841f89dcde4..ebd7bfa89c97310674a5ebde1c4bab6e73da3f8d 100644 (file)
--- a/test.c
+++ b/test.c
@@ -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")) {