diff lisp/eshell/esh-util.el @ 62915:b89e30bcd2bb

Changed all uses of `directory-sep-char' to ?/, and all uses of `string-to-int' to `string-to-number'.
author John Wiegley <johnw@newartisans.com>
date Tue, 31 May 2005 00:14:26 +0000
parents 695cf19ef79e
children 18a818a2ee7c 01137c1fdbe9
line wrap: on
line diff
--- a/lisp/eshell/esh-util.el	Tue May 31 00:13:51 2005 +0000
+++ b/lisp/eshell/esh-util.el	Tue May 31 00:14:26 2005 +0000
@@ -253,14 +253,13 @@
 	parts)
     (if (and (eshell-under-windows-p)
 	     (> len 2)
-	     (eq (aref path 0) directory-sep-char)
-	     (eq (aref path 1) directory-sep-char))
+	     (eq (aref path 0) ?/)
+	     (eq (aref path 1) ?/))
 	(setq i 2))
     (while (< i len)
-      (if (and (eq (aref path i) directory-sep-char)
+      (if (and (eq (aref path i) ?/)
 	       (not (get-text-property i 'escaped path)))
-	  (setq parts (cons (if (= li i)
-				(char-to-string directory-sep-char)
+	  (setq parts (cons (if (= li i) "/"
 			      (substring path li (1+ i))) parts)
 		li (1+ i)))
       (setq i (1+ i)))
@@ -268,9 +267,7 @@
 	(setq parts (cons (substring path li i) parts)))
     (if (and (eshell-under-windows-p)
 	     (string-match "\\`[A-Za-z]:\\'" (car (last parts))))
-	(setcar (last parts)
-		(concat (car (last parts))
-			(char-to-string directory-sep-char))))
+	(setcar (last parts) (concat (car (last parts)) "/")))
     (nreverse parts)))
 
 (defun eshell-to-flat-string (value)
@@ -450,8 +447,8 @@
 				 (point) (progn (end-of-line)
 						(point))) ":")))
 	    (if (and (and fields (nth 0 fields) (nth 2 fields))
-		     (not (assq (string-to-int (nth 2 fields)) names)))
-		(setq names (cons (cons (string-to-int (nth 2 fields))
+		     (not (assq (string-to-number (nth 2 fields)) names)))
+		(setq names (cons (cons (string-to-number (nth 2 fields))
 					(nth 0 fields))
 				  names))))
 	  (forward-line))))