+2008-02-17 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * modb.el (elmo-msgdb-match-condition-primitive): Use
+ `string-to-number' instead of `string-to-int'.
+
+ * modb-entity.el (elmo-msgdb-create-message-entity-from-buffer)
+ (elmo-msgdb-message-match-condition)
+ (elmo-msgdb-create-message-entity-from-buffer): Use
+ `string-to-number' instead of `string-to-int'.
+
+ * elmo.el (elmo-folder-confirm-appends): Use `string-to-number'
+ instead of `string-to-int'.
+
+ * elmo-util.el (elmo-cache-expire-by-age): Use `string-to-number'
+ instead of `string-to-int'.
+
+ * elmo-pop3.el (elmo-pop3-list-by-list, elmo-folder-status): Use
+ `string-to-number' instead of `string-to-int'.
+
+ * elmo-nntp.el (elmo-nntp-make-msglist)
+ (elmo-folder-list-messages-plugged, elmo-nntp-folder-status)
+ (elmo-nntp-create-msgdb-from-overview-string)
+ (elmo-nntp-parse-xhdr-response, elmo-nntp-msgdb-create-message)
+ (elmo-nntp-search-primitive): Use `string-to-number' instead of
+ `string-to-int'.
+
+ * elmo-net.el (elmo-net-folder-set-parameters): Use
+ `string-to-number' instead of `string-to-int'.
+
+ * elmo-localdir.el (elmo-localdir-list-subr): Use
+ `string-to-number' instead of `string-to-int'.
+
+ * elmo-imap4.el (elmo-imap4-search-internal-primitive): Use
+ `string-to-number' instead of `string-to-int'.
+
+ * elmo-date.el (elmo-date-get-datevec): Use `string-to-number'
+ instead of `string-to-int'.
+
+ * elmo-archive.el (elmo-archive-list-folder-subr): Use
+ `string-to-number' instead of `string-to-int'.
+
2008-02-16 TAKAHASHI Kaoru <kaoru@kaisei.org>
* elmo-util.el (elmo-get-passwd): Fix typo.
(goto-char (point-min))))
(while (and (re-search-forward file-regexp nil t)
(not (eobp))) ; for GNU tar 981010
- (setq file-list (nconc file-list (list (string-to-int
+ (setq file-list (nconc file-list (list (string-to-number
(match-string 1)))))))
(error "%s does not exist" file))
(if nonsort
(timezone-fix-time (current-time-string) (current-time-zone)
nil)))
(number
- (string-to-int
+ (string-to-number
(if (match-beginning 1)
(elmo-match-string 1 description)
"0")))
((string= "last" search-key)
(let ((numbers (or from-msgs (elmo-folder-list-messages folder))))
(nthcdr (max (- (length numbers)
- (string-to-int (elmo-filter-value filter)))
+ (string-to-number (elmo-filter-value filter)))
0)
numbers)))
((string= "first" search-key)
(let* ((numbers (or from-msgs (elmo-folder-list-messages folder)))
- (rest (nthcdr (string-to-int (elmo-filter-value filter) )
+ (rest (nthcdr (string-to-number (elmo-filter-value filter) )
numbers)))
(mapcar '(lambda (x) (delete x numbers)) rest)
numbers))
one-level)))
(defsubst elmo-localdir-list-subr (folder &optional nonsort)
- (let ((flist (mapcar 'string-to-int
+ (let ((flist (mapcar 'string-to-number
(directory-files
(elmo-localdir-folder-directory-internal folder)
nil "^[0-9]+$" t)))
;; port
(elmo-net-folder-set-port-internal
folder
- (or (and port (string-to-int port))
+ (or (and port (string-to-number port))
(plist-get defaults :port)))
;; stream-type
(elmo-net-folder-set-stream-type-internal
ret-val)))
(defun elmo-nntp-make-msglist (beg-str end-str)
- (elmo-make-number-list (string-to-int beg-str) (string-to-int end-str)))
+ (elmo-make-number-list (string-to-number beg-str)
+ (string-to-number end-str)))
(luna-define-method elmo-folder-list-messages-plugged ((folder
elmo-nntp-folder)
(string-match
"211 \\([0-9]+\\) \\([0-9]+\\) \\([0-9]+\\) [^.].+$"
response)
- (> (string-to-int (elmo-match-string 1 response)) 0))
+ (> (string-to-number (elmo-match-string 1 response)) 0))
(setq numbers (elmo-nntp-make-msglist
(elmo-match-string 2 response)
(elmo-match-string 3 response)))))
"211 \\([0-9]+\\) \\([0-9]+\\) \\([0-9]+\\) [^.].+$"
response))
(progn
- (setq end-num (string-to-int
+ (setq end-num (string-to-number
(elmo-match-string 3 response)))
- (setq e-num (string-to-int
+ (setq e-num (string-to-number
(elmo-match-string 1 response)))
(when (and killed-list
(elmo-number-set-member end-num killed-list))
;;; (<= num 0))
;;; (setq num 0))
;;; (setq num (int-to-string num))
- (setq num (string-to-int (aref ov-entity 0)))
+ (setq num (string-to-number (aref ov-entity 0)))
(when (or (null numlist)
(memq num numlist))
(setq entity (elmo-msgdb-make-message-entity
(aref ov-entity 1)))
elmo-no-subject)
:date (aref ov-entity 3)
- :size (string-to-int (aref ov-entity 6))))
+ :size (string-to-number (aref ov-entity 6))))
(dolist (extra elmo-msgdb-extra-fields)
(setq extra (downcase extra))
(when (and (setq field-index
(goto-char (point-min))
(while (not (eobp))
(if (looking-at "^\\([0-9]+\\) \\(.*\\)$")
- (setq response (cons (cons (string-to-int (elmo-match-buffer 1))
+ (setq response (cons (cons (string-to-number (elmo-match-buffer 1))
(elmo-match-buffer 2))
response)))
(forward-line 1)))
((string= "last" search-key)
(let ((numbers (or from-msgs (elmo-folder-list-messages spec))))
(nthcdr (max (- (length numbers)
- (string-to-int (elmo-filter-value condition)))
+ (string-to-number (elmo-filter-value condition)))
0)
numbers)))
((string= "first" search-key)
(let* ((numbers (or from-msgs (elmo-folder-list-messages spec)))
- (rest (nthcdr (string-to-int (elmo-filter-value condition) )
+ (rest (nthcdr (string-to-number (elmo-filter-value condition) )
numbers)))
(mapcar '(lambda (x) (delete x numbers)) rest)
numbers))
(setq beg (save-excursion (forward-line 1) (point)))
(setq num
(and (looking-at "^2[0-9]*[ ]+\\([0-9]+\\)")
- (string-to-int
+ (string-to-number
(elmo-match-buffer 1))))
(elmo-nntp-next-result-arrived-p)
(when num
(if elmo-pop3-list-done
(progn
(mapatoms (lambda (atom)
- (setq list (cons (string-to-int
+ (setq list (cons (string-to-number
(substring (symbol-name atom) 1))
list)))
elmo-pop3-size-hash)
(if (not (string-match "^\+OK[ \t]*\\([0-9]*\\)" response))
(error "POP STAT command failed")
(setq total
- (string-to-int
+ (string-to-number
(substring response (match-beginning 1)(match-end 1 ))))
(elmo-folder-close-internal folder)
(cons total total))))))
curtime)
(if (string= age "")
(setq age elmo-cache-expire-default-age)
- (setq age (string-to-int age)))
+ (setq age (string-to-number age)))
(setq curtime (current-time))
(setq curtime (+ (* (nth 0 curtime)
(float 65536)) (nth 1 curtime)))
(while t
(setq in (read-from-minibuffer "Update number: "
(int-to-string in))
- in (string-to-int in))
+ in (string-to-number in))
(if (< len in)
(throw 'end len))
(if (y-or-n-p (format
cc (mapconcat 'identity (elmo-multiple-field-body "cc") ","))
(unless (elmo-msgdb-message-entity-field handler entity 'size)
(if (setq size (elmo-field-body "content-length"))
- (setq size (string-to-int size))
+ (setq size (string-to-number size))
(setq size 0)))
(while extras
(if (setq field-body (elmo-field-body (car extras)))
((or (string= key "larger")
(string= key "smaller"))
(let ((bytes (elmo-msgdb-message-entity-field handler entity 'size))
- (threshold (string-to-int (elmo-filter-value condition))))
+ (threshold (string-to-number (elmo-filter-value condition))))
(if (string= key "larger")
(> bytes threshold)
(< bytes threshold))))
:size
(let ((size (elmo-field-body "content-length")))
(if size
- (string-to-int size)
+ (string-to-number size)
(or (plist-get args :size) 0)))))))
(let (field-name field-body extractor)
(dolist (extra (cons "newsgroups" elmo-msgdb-extra-fields))
(cond
((string= key "last")
(<= (length (memq number population))
- (string-to-int (elmo-filter-value condition))))
+ (string-to-number (elmo-filter-value condition))))
((string= key "first")
(< (- (length population)
(length (memq number population)))
- (string-to-int (elmo-filter-value condition))))
+ (string-to-number (elmo-filter-value condition))))
((string= key "flag")
(let ((flags (elmo-msgdb-flags msgdb number)))
(cond ((string= (elmo-filter-value condition) "any")