[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: Michael Hennebry
Subject: Re: [Help-glpk] Gusek : a GLPK IDE for Windows
Date: Wed, 10 Dec 2008 11:35:16 -0600 (CST)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Wed, 10 Dec 2008, Andrew Makhorin wrote:

I think that the "real output" did not work, because in most
implementations of the C run-time library it is checked if the device
assigned to stdout is a terminal device or not (via isatty), and if so,
stdout is open in non-buffered mode (_IONBF) otherwise it is fully
buffered (_IOFBF). Thus, if you launch glpsol from the command line,
stdout is assigned to tty and therefore non-buffered, so you have the
"real output". If the glpsol executable is called from SciTE, which
replaces the standard output handle by a pipe handle, the output is
buffered, because the pipe is not a tty device.

I see two possible fixes.
One is to provide an isatty that always returns 1.
The other is to call setvbuf to make stdout unbuffered.

Michael   address@hidden
"Pessimist: The glass is half empty.
Optimist:   The glass is half full.
Engineer:   The glass is twice as big as it needs to be."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]