[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Gusek : a GLPK IDE for Windows
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] Gusek : a GLPK IDE for Windows |
Date: |
Wed, 10 Dec 2008 04:08:59 +0300 |
>>> All others programs called by Gusek/SciTE (MinGW GCC, for example)
>>> generates outputs in real time, but the glpsol.exe does not.
> could it be that file flushing is missing.
> Would adding
> LIBENV *env = lib_link_env();
> if (!env->term_out) return;
> if (env->log_file != NULL) fflush(env->log_file);
> at the end of xprintf() in glplib04.c help?
The proper place to flush the terminal output is xputc in glplib04.c,
which is a base routine that produces actual output:
/* write the character to the terminal */
fputc(c, stdout);
+++ if (c == '\n') fflush(stdout);
though by default stdout must be open in _IONBF mode, i.e. the output
must not be buffered at all.
All this has sense only if SciTE replaces the standard output handle
(STD_OUTPUT_HANDLE) by a pipe handle on spawning glpsol.