Hi Tristan,
I have already made an --unbuffered option work. It disable buffering on
stdout, and does line buffering on stderr. Should I also completely
disable buffering on stderr ?
Currently, a C function is called to disable buffering after reading the
--unbuffered option in grt-options.adb. Does it work that way or should
I call setvbuf()/setbuf() before each write to stdout/stderr ?
What is remaining to do is to make this option work also when a file is
open in write mode in VHDL.
Jonas
Le 23. 06. 16 à 20:43, Tristan Gingold a écrit :
On 23/06/16 20:40, Jonas Baggett wrote:
Le 23. 06. 16 à 08:01, Tristan Gingold a écrit :
On 23/06/16 07:43, Jonas Baggett wrote:
Hi Tristan,
I if understand well, what needs to be done is to add the possibility
that each write to either the console or a file can be unbuffered,
right
? Or maybe writes to the console is already unbuffered. This
feature can
be done with the the C function fflush which is already imported in
grt-stdio.ads and then call it at the end of the Put procedures in
grt-astdio.adb, right ?
I would simply call setvbuf() (or setbuf) on stdout/stderr and after
fopen. That would be slightly more efficient.
Tristan.
I think I will start with this issue, finally. Should the unbuffered
option be passed during elaboration ?
No, at execution time. There are already an infrastructure to handle
options, see grt-options.adb
Tristan.
_______________________________________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss