octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wait_for_file ??


From: Michael D Godfrey
Subject: Re: wait_for_file ??
Date: Fri, 03 Sep 2010 02:00:38 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Thunderbird/3.1.2

I noticed one item that affects the wait_for_file problem:

In gl2ps-renderer.cc the is an fclose(fp)   (at line 82) which is not preceded
by an fflush(fp).  This is bad practice since fclose doe not do an fflush.
Inserting an fflush(fp) ahead of the fclose changes the behavior.  previously
it appeared that the file that took a long time to appear was *.ps.  But with
the fflush the *.ps file appears in 1 iteration and all the delay is waiting for
the *.eps.

This does not yet fix the problem, but it is a bit clearer.  In any case, the gl2ps
maintainer should be encouraged to insert the fflush(fp).

I will try to do some more on this tomorrow.

Currently my test output looks like:
octave:1> plot(1:20)
octave:2> print ('gl2ps_t1x.pdf','-dpdf')
gl2ps file closed. /tmp/oct-teyA9s.ps
gl2ps file closed. /tmp/oct-Xvz3bZ.eps
fflush(fid)
status: 0
filename used for /tmp/oct-teyA9s.ps delay: 1
drawnow iter 1
drawnow iter 2
drawnow iter 3
drawnow iter 4
drawnow iter 5
drawnow iter 6
drawnow iter 7
drawnow iter 8
drawnow iter 9
filename used for /tmp/oct-Xvz3bZ.eps delay: 1
drawnow iter 1
Ghostscript command: /usr/bin/gs -dQUIET -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -dEmbedAllFonts=true -dOptimize=true -sPAPERSIZE=letter -dFIXEDMEDIA -sOutputFile=gl2ps_t1x.pdf /tmp/oct-teyA9s.ps /tmp/oct-Xvz3bZ.eps
octave:3>
===========================


reply via email to

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