From 73e912fdc4ca0db34c76593d7520472524a1a05f Mon Sep 17 00:00:00 2001 From: Rafael Ravedutti Lucio Machado <rafael.r.ravedutti@fau.de> Date: Wed, 16 Dec 2020 15:07:06 +0100 Subject: [PATCH] Print fflush in another line Signed-off-by: Rafael Ravedutti Lucio Machado <rafael.r.ravedutti@fau.de> --- code_gen/cgen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code_gen/cgen.py b/code_gen/cgen.py index 7aed0dc..6482e91 100644 --- a/code_gen/cgen.py +++ b/code_gen/cgen.py @@ -117,7 +117,8 @@ class CGen: return f"({cond}) ? ({expr_if}) : ({expr_else})" def generate_print(string): - printer.print(f"fprintf(stdout, \"{string}\\n\"); fflush(stdout);") + printer.print(f"fprintf(stdout, \"{string}\\n\");") + printer.print(f"fflush(stdout);") def generate_vtk_writing(id, filename, start, n, timestep): # TODO: Do this in a more elegant way, without hard coded stuff -- GitLab