# HG changeset patch # User jwe # Date 949446068 0 # Node ID 9118c2a3bc79ba8c3035373279c1b3401c15cd51 # Parent f84c0b63b3dfe42ad96084ee30e17567e170c744 [project @ 2000-02-01 23:01:07 by jwe] diff -r f84c0b63b3df -r 9118c2a3bc79 liboctave/ChangeLog --- a/liboctave/ChangeLog Tue Feb 01 22:41:11 2000 +0000 +++ b/liboctave/ChangeLog Tue Feb 01 23:01:08 2000 +0000 @@ -1,5 +1,9 @@ 2000-02-01 John W. Eaton + * oct-env.cc (octave_env::do_polite_directory_format): + Use operator== and substr method to do limited-length string + comparison. + * Array2-idx.h, Array-idx.h: Avoid shadowing warnings for idx. * Quad.h: Use do_integrate as name of pure virtual function. diff -r f84c0b63b3df -r 9118c2a3bc79 liboctave/oct-env.cc --- a/liboctave/oct-env.cc Tue Feb 01 22:41:11 2000 +0000 +++ b/liboctave/oct-env.cc Tue Feb 01 23:01:08 2000 +0000 @@ -216,7 +216,7 @@ size_t len = home_dir.length (); - if (len > 1 && home_dir.compare (name, 0, len) == 0 + if (len > 1 && home_dir == name.substr (0, len) && (name.length () == len || name[len] == '/')) { retval = "~";