octave-maintainers
[Top][All Lists]
Advanced

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

Re: wait_for_file ??


From: Ben Abbott
Subject: Re: wait_for_file ??
Date: Fri, 03 Sep 2010 21:41:17 -0400

On Sep 3, 2010, at 8:32 PM, Michael D Godfrey wrote:

> On 09/03/2010 05:26 PM, Michael D Godfrey wrote:
>> I previously said:
>>> Now the question is:  why is the opts.source file not generated
>>> before __wait_for_file__(opts.source) is called?
> I should have added that this makes the __wait_for_file__ patches
> unnecessary.  Once the reason is found for the eps file only being known
> within gl2ps-renderer.cc  there should be no timing window.  Of course,
> please, everyone remember that  fflush()  is required before each fclose().
> Not doing the flush() would reintroduce a window, and this was a a part of
> this problem.
> 
> Michael

Take a look at gl2ps-renderer.cc

79          opengl_renderer::draw (go);
80          state = gl2psEndPage ();
81        }
82
83      gnulib::fclose (fp);

Then in gl2ps.c

5773 GL2PSDLL_API GLint gl2psEndPage(void)
5774 {
5775   GLint res;
5776 
5777   if(!gl2ps) return GL2PS_UNINITIALIZED;
5778 
5779   res = gl2psPrintPrimitives();
5780 
5781   if(res != GL2PS_OVERFLOW)
5782     (gl2psbackends[gl2ps->format]->printFooter)();
5783 
5784   fflush(gl2ps->stream);
5785 
5786   gl2psListDelete(gl2ps->primitives);
5787   gl2psListDelete(gl2ps->auxprimitives);
5788   gl2psFreeImagemap(gl2ps->imagemap_head);
5789   gl2psFree(gl2ps->colormap);
5790   gl2psFree(gl2ps->title);
5791   gl2psFree(gl2ps->producer);
5792   gl2psFree(gl2ps->filename);
5793   gl2psFree(gl2ps->feedback);
5794   gl2psFree(gl2ps);
5795   gl2ps = NULL;
5796 
5797   return res;
5798 }

Do I understand correctly, the stream is being flushed at line 5784?

Ben



reply via email to

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