help-octave
[Top][All Lists]
Advanced

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

Re: Does save support append


From: David Bateman
Subject: Re: Does save support append
Date: Tue, 26 Jun 2007 17:34:43 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Kristjan Onu wrote:
> Hi,
>
> I am seeking clarification regarding whether the save command supports
> the append option.
>
> The file NEWS.2 states:
>
>   * The save command now accepts the option -append to save the
>     variables at the end of the file, leaving the existing contents.
>
> When I run the attached test file however, the error 'x not found' is
> triggered.
>
> I have tried this using Debian's Octave2.9.9-8etch1 as well as the
> CVS version updated a couple of hours ago.
>
> Best,
>
> K
>   
>

Yes I can confirm the bug... The attached patch fixes it for me.. Note
that the append mode for hdf5 will need a little more work, though it
wouldn't be impossible to have either..

D.



-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary

--- src/load-save.cc.~1.224.~   2007-05-22 21:06:46.000000000 +0200
+++ src/load-save.cc    2007-06-26 17:18:36.501360027 +0200
@@ -1413,7 +1413,7 @@
          || format == LS_MAT7_BINARY)
        mode |= std::ios::binary;
 
-      mode |= append ? std::ios::ate : std::ios::trunc;
+      mode |= append ? std::ios::app : std::ios::trunc;
 
 #ifdef HAVE_HDF5
       if (format == LS_HDF5)
@@ -1684,7 +1684,7 @@
          || format == LS_MAT7_BINARY)
        mode |= std::ios::binary;
 
-      mode |= append ? std::ios::ate : std::ios::trunc;
+      mode |= append ? std::ios::app : std::ios::trunc;
 
 #ifdef HAVE_HDF5
       if (format == LS_HDF5)
2007-06-26  David Bateman  <address@hidden>

        * load-save.cc (Fsave): Use C++ std::ios:app and not std::ios:ate
        for append mode.

reply via email to

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