octave-maintainers
[Top][All Lists]
Advanced

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

Re: wait_for_file ?? [GL2PS error: Bad file pointer]


From: Ben Abbott
Subject: Re: wait_for_file ?? [GL2PS error: Bad file pointer]
Date: Sat, 11 Sep 2010 18:00:01 -0400

On Sep 9, 2010, at 7:35 AM, Shai Ayal wrote:

> OK, I pushed the relevant changes to make fltk print to an fid
> **warning** this breaks current fltk printing!
> http://hg.savannah.gnu.org/hgweb/octave/rev/2786e3b7072e
> 
> to use, pass the fid as a string to drawnow:
> e.g. to keep current functionality, use
> fid = fopen ("test.eps","wb");
> drawnow ("eps" , sprintf ("%d" , fid));
> 
> and to pipe it into another program, use popen:
> fid = popen ("cat >  test.eps" , "w")
> drawnow ("eps" , sprintf ("%d" , fid));
> 
> Shai


I'm seeing a repeatable error/warning when printing to a file.

The code below ...

        backend fltk
        more off
        plot (1:10)
        for n = 1:10
          disp (n)
          fid = fopen ("test.eps", "wb");
          drawnow ("eps", sprintf ("%d", fid));
        endfor

... gives me ...

1
 2
 3
 4
 5
GL2PS error: Bad file pointer
 6
 7
GL2PS error: Bad file pointer
 8
 9
 10

If I run again ...

octave:2> bad_file_pointer
 1
GL2PS error: Bad file pointer
 2
GL2PS error: Bad file pointer
 3
GL2PS error: Bad file pointer
 4
GL2PS error: Bad file pointer
 5
GL2PS error: Bad file pointer
 6
GL2PS error: Bad file pointer
 7
GL2PS error: Bad file pointer
 8
GL2PS error: Bad file pointer
 9
GL2PS error: Bad file pointer
 10
GL2PS error: Bad file pointer

When this error occurs, the file is empty.

Ben



reply via email to

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