help-octave
[Top][All Lists]
Advanced

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

Re: multiple problems with audio toolbox


From: John W. Eaton
Subject: Re: multiple problems with audio toolbox
Date: Sat, 1 Mar 2003 20:35:17 -0600

On  1-Mar-2003, Paul Kienzle <address@hidden> wrote:

| It seems that popen is broken:
| 
| octave:1> fid=popen('cat > out','w');
| octave:2> fwrite(fid,1,'double');
| octave:3> pclose(fid);
| octave:4> system('ls -l out');
| -rw-rw-r--    1 pkienzle pkienzle        0 Mar  1 19:46 out
| 
| This fails on:
|     octave 2.1.45 for gcc 2.96 (RedHat 7.1)
|     octave 2.1.45 for MipsPRO CC 7.3 (IRIX 6.4)
| But it works on:
|     octave 2.1.38 for gcc 2.96 (RedHat 7.1)
|     octave 2.1.40 for gcc 3.2 (IRIX 6.4)
|     octave 2.1.44 for gcc 3.2 (cygwin)
| Can someone confirm that it works for 2.1.45?
| Or is this something which broke because of the
| c-file-ptr-stream changes?

Oops.  Here is a patch that should fix this problem.

Thanks,

jwe


2003-03-01  John W. Eaton  <address@hidden>

        * oct-stdstrm.h (octave_stdiostream::output_stream): Return stream
        if mode is out, not in.


Index: src/oct-stdstrm.h
===================================================================
RCS file: /usr/local/cvsroot/octave/src/oct-stdstrm.h,v
retrieving revision 1.18
diff -u -r1.18 oct-stdstrm.h
--- src/oct-stdstrm.h   16 Feb 2003 03:24:26 -0000      1.18
+++ src/oct-stdstrm.h   2 Mar 2003 02:34:13 -0000
@@ -68,7 +68,7 @@
 
   std::istream *input_stream (void) { return (md & std::ios::in) ? s : 0; }
 
-  std::ostream *output_stream (void) { return (md & std::ios::in) ? s : 0; }
+  std::ostream *output_stream (void) { return (md & std::ios::out) ? s : 0; }
 
   // XXX FIXME XXX -- should not have to cast away const here.
   c_file_ptr_buf *rdbuf (void) const



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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