[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sscanf
From: |
Bertrand Roessli |
Subject: |
Re: sscanf |
Date: |
Wed, 6 Apr 2005 09:01:13 +0200 (CEST) |
hi,
the patch works!
Thanks a lot
Bertrand Roessli
On Tue, 5 Apr 2005, John W. Eaton wrote:
> On 5-Apr-2005, bertrand roessli <address@hidden> wrote:
>
> | I am using GNU Octave, version 2.1.57 (i686-pc-linux-gnu).
> | so is it a kind of a bug?
>
> Yes. Please try the following patch. This is relative to the current
> CVS sources, but I think it will apply to other recent snapshot
> versions as well.
>
> Thanks,
>
> jwe
>
>
> src/ChangeLog:
>
> 2005-04-05 John W. Eaton <address@hidden>
>
> * oct-stream.cc (BEGIN_C_CONVERSION): Clear stream state if
> we hit EOF after we read something.
>
>
> Index: src/oct-stream.cc
> ===================================================================
> RCS file: /cvs/octave/src/oct-stream.cc,v
> retrieving revision 1.113
> diff -u -r1.113 oct-stream.cc
> --- src/oct-stream.cc 30 Mar 2005 21:13:28 -0000 1.113
> +++ src/oct-stream.cc 5 Apr 2005 15:44:42 -0000
> @@ -1460,6 +1460,9 @@
> \
> tbuf[n] = '\0'; \
> \
> + if (n > 0 && c == EOF) \
> + is.clear (); \
> + \
> std::string tmp = tbuf; \
> \
> delete [] tbuf
>
>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web: http://www.octave.org
> How to fund new projects: http://www.octave.org/funding.html
> Subscription information: http://www.octave.org/archive.html
> -------------------------------------------------------------
>
--
Dr. Bertrand Roessli
Laboratory for Neutron Scattering
ETHZ and Paul Scherrer Institut
CH-5232 Villigen, PSI
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- sscanf, bertrand roessli, 2005/04/04
- Re: sscanf, mavram, 2005/04/04
- Re: sscanf, Miquel Cabanas, 2005/04/05
- Message not available
- Re: sscanf, bertrand roessli, 2005/04/05
- Re: sscanf, John W. Eaton, 2005/04/05
- Message not available
- Re: sscanf,
Bertrand Roessli <=