# HG changeset patch # User jwe # Date 1112053042 0 # Node ID 2fa6253e36a3db1c020e359e94c8c9bf9694e8a7 # Parent 6b91c98e3db02411a3d9aae1149a62144c812272 [project @ 2005-03-28 23:37:22 by jwe] diff -r 6b91c98e3db0 -r 2fa6253e36a3 src/ChangeLog --- a/src/ChangeLog Mon Mar 28 18:56:56 2005 +0000 +++ b/src/ChangeLog Mon Mar 28 23:37:22 2005 +0000 @@ -1,5 +1,8 @@ 2005-03-28 John W. Eaton + * oct-stream.cc (octave_stream::write): For compatibility, Write + zeros instead of seeking if SKIP is nonzero. + * DLD-FUNCTIONS/gplot.l (Fgraw): Recommend __gnuplot_raw__, not __gnuplot__raw__. (Fgshow): Recommend __gnuplot_show__, not __gnuplot__show__. diff -r 6b91c98e3db0 -r 2fa6253e36a3 src/oct-stream.cc --- a/src/oct-stream.cc Mon Mar 28 18:56:56 2005 +0000 +++ b/src/oct-stream.cc Mon Mar 28 23:37:22 2005 +0000 @@ -3471,8 +3471,18 @@ { std::ostream& os = *osp; + // It seems that Matlab writes zeros instead of actually + // seeking. Hmm... + if (skip != 0 && (i % block_size) == 0) - seek (skip, SEEK_CUR); + { + // XXX FIXME XXX -- probably should try to write larger + // blocks... + + unsigned char zero = 0; + for (int j = 0; j < skip; j++) + os.write (reinterpret_cast (&zero), 1); + } if (os) {