changeset 5595:83df01a26136

[project @ 2006-01-13 20:01:08 by jwe]
author jwe
date Fri, 13 Jan 2006 20:01:09 +0000
parents f2c058edda40
children 6c4e4bffa622
files scripts/ChangeLog scripts/miscellaneous/dir.m scripts/miscellaneous/fullfile.m test/ChangeLog test/test_system.m
diffstat 5 files changed, 17 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,8 @@
+2006-01-13  Bill Denney  <bill@givebillmoney.com>
+
+         * miscellaneous/dir.m: Use filesep instead of "/" where needed.
+	 * miscellaneous/fullfile.m: Likewise.
+
 2006-01-12  David Bateman  <dbateman@free.fr>
 
 	* general/blkdiag.m: Compatible behavior for empty matrices 
--- a/scripts/miscellaneous/dir.m
+++ b/scripts/miscellaneous/dir.m
@@ -81,7 +81,7 @@
 		  tfn = lst{j};
 		  ## The lstat call seems to be the bottleneck for large
 		  ## directories.
-		  [st, err, msg] = lstat (strcat (fn, "/", tfn));
+		  [st, err, msg] = lstat (strcat (fn, filesep, tfn));
 		  if (err < 0)
 		    warning ("dir: stat failed for %s (%s)", tfn, msg);
 		  else
--- a/scripts/miscellaneous/fullfile.m
+++ b/scripts/miscellaneous/fullfile.m
@@ -29,15 +29,15 @@
     if (length (filename) < 1)
       filename = ".";
     endif
-    if (strcmp (filename(end), "/"))
+    if (strcmp (filename(end), filesep))
       filename(end) = "";
     endif
     for i = 2:nargin
       tmp = varargin{i};
-      if (strcmp (tmp(1), "/"))
+      if (strcmp (tmp(1), filesep))
 	tmp(1) = "";
       endif
-      if (i < nargin && strcmp (tmp(end), "/"))
+      if (i < nargin && strcmp (tmp(end), filesep))
 	tmp(end) = "";
       endif
       filename = strcat (filename, filesep, tmp);
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2006-01-13  Bill Denney  <bill@givebillmoney.com>
+
+	* test_system.m: Use filesep instead of "/" where needed.
+
 2005-12-14  David Bateman  <dbateman@free.fr>
 
 	* build_sparse_tests.sh: New script to build sparse matrix tests.
--- a/test/test_system.m
+++ b/test/test_system.m
@@ -217,7 +217,7 @@
 
 %% test/octave.test/system/readdir-1.m
 %!test
-%! [files, status, msg] = readdir ("/");
+%! [files, status, msg] = readdir (filesep);
 %! assert(iscell (files) && status == 0 && msg == "");
 
 %% test/octave.test/system/readdir-2.m
@@ -274,7 +274,7 @@
 
 %% test/octave.test/system/stat-1.m
 %!test
-%! [s, err, msg] = stat ("/");
+%! [s, err, msg] = stat (filesep);
 %! assert((err == 0
 %! && isstruct (s)
 %! && struct_contains (s, "dev")
@@ -297,7 +297,7 @@
 
 %% test/octave.test/system/lstat-1.m
 %!test
-%! [s, err, msg] = lstat ("/");
+%! [s, err, msg] = lstat (filesep);
 %! assert((err == 0
 %! && isstruct (s)
 %! && struct_contains (s, "dev")
@@ -319,7 +319,7 @@
 %!error <... lstat:.*> lstat ("foo", 1);
 
 %% test/octave.test/system/glob-1.m
-%!assert(iscell (glob ("/*")));
+%!assert(iscell (glob ([filesep "*"])));
 
 %% test/octave.test/system/glob-2.m
 %!error <... glob:*> glob ();