Add (eval-when-compile (require 'cl)).
[elisp/wanderlust.git] / elmo / elmo-pop3.el
index 19d052b..85bb096 100644 (file)
@@ -36,6 +36,7 @@
 (require 'elmo-map)
 
 (eval-when-compile
+  (require 'cl)
   (require 'elmo-util))
 
 (eval-and-compile
@@ -299,7 +300,7 @@ CODE is one of the following:
     (car response)))
 
 (defun elmo-pop3-auth-apop (session)
-  (unless (string-match "^\+OK .*\\(<[^\>]+>\\)"
+  (unless (string-match "^\+OK .*\\(<[=!-;?-~]+@[=!-;?-~]+>\\)"
                        (elmo-network-session-greeting-internal session))
     (signal 'elmo-open-error '(elmo-pop3-auth-apop)))
   ;; good, APOP ready server
@@ -582,7 +583,7 @@ until the login delay period has expired"))
       (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)
@@ -617,7 +618,7 @@ until the login delay period has expired"))
        (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))))))