strcat error on printing plots

Marco Atzeri marco_atzeri at yahoo.it
Mon Jul 27 04:21:45 CDT 2009


--- Mar 21/7/09, John W. Eaton <jwe at octave.org> ha scritto:

> Da: John W. Eaton <jwe at octave.org>
> Oggetto: Re: strcat error on printing plots
> A: "Marco Atzeri" <marco_atzeri at yahoo.it>
> Cc: "octave maintainers list" <maintainers at octave.org>
> Data: Martedì 21 luglio 2009, 18:25
> On 21-Jul-2009, Marco Atzeri wrote:
> 
> | this is the     __gnuplot_get_var__
> | 
> |       ## Now read from fifo.
> |       reading = true;
> |       str = {};
> |       while (reading)
> |         str{end+1} = fgets
> (gpin);
> |         if (isnumeric
> (str{end}) && (str{end} == -1))
> |           reading =
> false;
> |           str =
> str(1:(end-1));
> |         endif
> |       endwhile
> |       str = strcat
> (str{:});            <-
> line 113
> |       fclose (gpin);
> | 
> | so eventually is a fifo issue communicating with
> | gnuplot.
> | Not really surprising as the MS implementation
> | that is used to built the cygwin function
> | is buggy
> | http://cygwin.com/ml/cygwin/2009-07/threads.html#00233
> 
> So is str when the error happens?  That's the only way
> I can see it
> causing an error.  I guess it should be
> 
>   if (! isempty (str))
>     str = strcat (str{:});
>   endiif
> 
> ?
> 
> But given that the current implementation of the plotting
> system
> depends on knowing the gnuplot version info, I think it
> will cause
> some trouble if we can't reliably get the version info from
> gnuplot.
> 
> jwe
> 

FYI. 
It was really a cygwin fault and not an octave issue.
The latest cygwin snapshot solved the problem
implementing a better pipe.

Regards
Marco



      




More information about the Octave-maintainers mailing list