patch for GAStatistics
guignotj
guignotj at miage.univ-paris12.fr
Tue Mar 7 08:04:29 EST 2000
hi!
GAStatistics does not write well if the output file is a named pipe.
I need to write in a pipe, because I want to have an "on-line graph" of
the results.
Here is a small patch for GAStatistics, which enables it to write in a
pipe
----------------- patch begins here
---------------------------------------
490,492c490,496
< static ofstream outfile;
< if (gen[0] == 0) outfile.open(scorefile);
< if (outfile.bad()){
---
> #ifndef NO_STREAMS
> ofstream outfile(scorefile, ((gen[0] == 0) ?
> (ios::out | ios::trunc) :
> (ios::out | ios::app)));
> // should be done this way, but SGI systems (and others?) don't do it
right...
> // if(! outfile.is_open()){
> if(outfile.fail()){
496a501,502
> outfile.close();
> #endif
-------------------------- EOP (end of patch ;-)
----------------------------------
More information about the galib
mailing list