Bill Allombert on Tue, 08 Sep 2015 19:22:35 +0200


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

Re: Reading a stream from a C string


On Sat, Sep 05, 2015 at 11:24:14AM +0200, Jeroen Demeyer wrote:
> Dear pari-dev,
> 
> the functions gp_read_str() on the one hand and
> gp_read_stream()/gp_read_file() on the other hand are not
> functionally identical: essentially, gp_read_str() reads the input
> as one line while the other allow multi-line input.
> 
> Now, I would also like a function which reads from a C string but
> which does treat newlines like gp_read_stream(). This function could
> be called gp_read_stream_from_str() or something. It would be not
> hard to implement, analogous to gp_read_stream().
> 
> What do you think?

Alas this is not implemented. At minimum one would need to implement an
'input_method' which handle C strings.

Cheers,
Bill.