changeset 3516:9118c2a3bc79

[project @ 2000-02-01 23:01:07 by jwe]
author jwe
date Tue, 01 Feb 2000 23:01:08 +0000
parents f84c0b63b3df
children ef5c83d6bffc
files liboctave/ChangeLog liboctave/oct-env.cc
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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  <jwe@bevo.che.wisc.edu>
 
+	* 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.
--- 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 = "~";