On Sun, Sep 12, 2010 at 7:13 PM, Michael D Godfrey
<address@hidden> wrote:
On 09/12/2010 08:57 AM, Ben Abbott wrote:
Just for reference, adding an fclose(fid) doesn't fix the problem for me. I should also mention that the "GL2PS error: Bad file pointer" messages are not consistent. If I run my example several times, I get different results.
I'll propose a changeset for printing using pipes, and include a test script to allow others to do some testing and debugging as well.
Ben
Ben,
A bit odd. I thought I was the only one having lots of trouble
with this! I ran your example
repeated about 5 or 6 times both in NX and using remote login
through ssh with no errors!
Switching to using a pipe seems a good idea in any case.
I do still recommend clearing the fid after fclose. This would
have caused my fclose
to fail and would have resolved the question of whether it was
needed.
I don't know how to do that -- I use a local copy of the fid, and I see no way to change the value of fid in the calling function.
Shai