summaryrefslogtreecommitdiff
path: root/chess-images.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-29 02:43:55 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-29 02:43:55 -0400
commit3187bd1eadb312b6f6d6e1bb9218f19346300e7d (patch)
treeeb3667d49ec27fc7036d23bd23ed839191a261d7 /chess-images.el
parent7e5230b8ffe32cfe7c1ec31d37c40684893aa787 (diff)
Several changes to fix byte-compile warnings, changed some iso-8859-1 encoded
files to UTF-8, and switched to using insert-file-contents instead of the -literally variant (which doesn't respect content encodings).
Diffstat (limited to 'chess-images.el')
-rw-r--r--chess-images.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/chess-images.el b/chess-images.el
index 45259a3..cce9efb 100644
--- a/chess-images.el
+++ b/chess-images.el
@@ -364,13 +364,13 @@ They are returned in ascending order, or nil for no sizes available."
(with-temp-buffer
(insert-file-contents-literally file)
(re-search-forward "\"\\([0-9]+\\)")
- (setq chess-images-sizes (list (string-to-int (match-string 1)))))
+ (setq chess-images-sizes (list (string-to-number (match-string 1)))))
(let (sizes)
(dolist (file (directory-files chess-images-directory nil
(format "rdd[0-9]+\\.%s"
chess-images-extension)))
(if (string-match "rdd\\([0-9]+\\)\\." file)
- (push (string-to-int (match-string 1 file)) sizes)))
+ (push (string-to-number (match-string 1 file)) sizes)))
(setq chess-images-sizes (sort sizes '<))))))
(defun chess-images-best-size (&optional height width)
@@ -425,10 +425,10 @@ This is necessary for bizzare Emacs reasons."
(goto-char (point-min))
(if (re-search-forward (concat "\"\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-+"
"\\([0-9]+\\)\\s-+\\([0-9]+\\)\"") nil t)
- (let* ((width (string-to-int (match-string 1)))
- (height (string-to-int (match-string 2)))
- (colors (string-to-int (match-string 3)))
- (chars-per-color (string-to-int (match-string 4)))
+ (let* ((width (string-to-number (match-string 1)))
+ (height (string-to-number (match-string 2)))
+ (colors (string-to-number (match-string 3)))
+ (chars-per-color (string-to-number (match-string 4)))
(color-char (make-string chars-per-color ?~)))
(replace-match (int-to-string (+ height add-height)) t t nil 2)
(unless