# HG changeset patch # User jwe # Date 949446395 0 # Node ID ef5c83d6bffc01af1487cf677869cd959edd8504 # Parent 9118c2a3bc79ba8c3035373279c1b3401c15cd51 [project @ 2000-02-01 23:06:35 by jwe] diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,5 +1,8 @@ 2000-02-01 John W. Eaton + * data-conv.cc (LS_DO_WRITE): Cast arg to ostream::write to char*. + (LS_DO_READ): Likewise, for istream::read. + * oct-env.cc (octave_env::do_polite_directory_format): Use operator== and substr method to do limited-length string comparison. diff --git a/liboctave/data-conv.cc b/liboctave/data-conv.cc --- a/liboctave/data-conv.cc +++ b/liboctave/data-conv.cc @@ -189,7 +189,7 @@ do \ { \ volatile TYPE *ptr = X_CAST (volatile TYPE *, data); \ - stream.read (X_CAST (TYPE *, ptr), size * len); \ + stream.read (X_CAST (char *, ptr), size * len); \ if (swap) \ swap_ ## size ## _bytes (ptr, len); \ TYPE tmp = ptr[0]; \ @@ -210,7 +210,7 @@ TYPE *ptr = new TYPE [len]; \ for (int i = 0; i < len; i++) \ ptr[i] = X_CAST (TYPE, data[i]); \ - stream.write (ptr, size * len); \ + stream.write (X_CAST (char *, ptr), size * len); \ delete [] ptr ; \ } \ while (0)