]> git.eshelyaron.com Git - emacs.git/commitdiff
Replace `string-to-int' by `string-to-number'.
authorJuanma Barranquero <lekktu@gmail.com>
Mon, 16 May 2005 10:07:59 +0000 (10:07 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Mon, 16 May 2005 10:07:59 +0000 (10:07 +0000)
lisp/url/ChangeLog
lisp/url/url-auth.el
lisp/url/url-cookie.el
lisp/url/url-dav.el
lisp/url/url-http.el
lisp/url/url-ns.el
lisp/url/url-parse.el
lisp/url/url-util.el

index a023bdf18c772ec1fcc9be9af6b0a2a1a6103ad9..f6c75639d6f8c00b47a6be295e8813c9f458cb18 100644 (file)
@@ -1,3 +1,16 @@
+2005-05-06  Juanma Barranquero  <lekktu@gmail.com>
+
+       * url-auth.el (url-register-auth-scheme):
+       * url-cookie.el (url-cookie-expired-p):
+       * url-dav.el (url-dav-process-date-property)
+       (url-dav-process-boolean-property, url-dav-process-DAV:status):
+       * url-http.el (url-http-chunked-encoding-after-change-function)
+       (url-http-wait-for-headers-change-function):
+       * url-ns.el (isInNet):
+       * url-parse.el (url-generic-parse-url):
+       * url-util.el (url-get-normalized-date): Replace `string-to-int'
+       by `string-to-number'.
+
 2005-04-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * url.el (url-retrieve-synchronously): Work around the fact that
index 260315c5d5421b00fa0184e6bbd6dfe7b20ebb95..ea208ccadead9552f3c42d993767b907d336994a 100644 (file)
@@ -293,7 +293,7 @@ RATING   a rating between 1 and 10 of the strength of the authentication.
         (function (or function (intern (concat "url-" type "-auth"))))
         (rating (cond
                  ((null rating) 2)
-                 ((stringp rating) (string-to-int rating))
+                 ((stringp rating) (string-to-number rating))
                  (t rating)))
         (node (assoc type url-registered-auth-schemes)))
     (if (not (fboundp function))
index 9f7db86759777a0e58281bc0ca4a31ba0a75baad..ba13d3d7a8dc172e7dd5c8fe0454624373d20c79 100644 (file)
@@ -208,13 +208,13 @@ telling Microsoft that.")
         (cur-date (and exp (timezone-parse-date (current-time-string))))
         (exp-date (and exp (timezone-parse-date exp)))
         (cur-greg (and cur-date (timezone-absolute-from-gregorian
-                                 (string-to-int (aref cur-date 1))
-                                 (string-to-int (aref cur-date 2))
-                                 (string-to-int (aref cur-date 0)))))
+                                 (string-to-number (aref cur-date 1))
+                                 (string-to-number (aref cur-date 2))
+                                 (string-to-number (aref cur-date 0)))))
         (exp-greg (and exp (timezone-absolute-from-gregorian
-                            (string-to-int (aref exp-date 1))
-                            (string-to-int (aref exp-date 2))
-                            (string-to-int (aref exp-date 0)))))
+                            (string-to-number (aref exp-date 1))
+                            (string-to-number (aref exp-date 2))
+                            (string-to-number (aref exp-date 0)))))
         (diff-in-days (and exp (- cur-greg exp-greg)))
         )
     (cond
@@ -224,12 +224,12 @@ telling Microsoft that.")
      (t                                        ; Expires sometime today, check times
       (let* ((cur-time (timezone-parse-time (aref cur-date 3)))
             (exp-time (timezone-parse-time (aref exp-date 3)))
-            (cur-norm (+ (* 360 (string-to-int (aref cur-time 2)))
-                         (*  60 (string-to-int (aref cur-time 1)))
-                         (*   1 (string-to-int (aref cur-time 0)))))
-            (exp-norm (+ (* 360 (string-to-int (aref exp-time 2)))
-                         (*  60 (string-to-int (aref exp-time 1)))
-                         (*   1 (string-to-int (aref exp-time 0))))))
+            (cur-norm (+ (* 360 (string-to-number (aref cur-time 2)))
+                         (*  60 (string-to-number (aref cur-time 1)))
+                         (*   1 (string-to-number (aref cur-time 0)))))
+            (exp-norm (+ (* 360 (string-to-number (aref exp-time 2)))
+                         (*  60 (string-to-number (aref exp-time 1)))
+                         (*   1 (string-to-number (aref exp-time 0))))))
        (> (- cur-norm exp-norm) 1))))))
 
 ;;;###autoload
index d6c5ffffa43cbe1c09c25fced85b916a9fba9583..a0f1ae1ebe70723dc1df49495ea940d65c0aa4f4 100644 (file)
 
     ;; Nobody else handles iso8601 correctly, lets do it ourselves.
     (when (string-match date-re date-string re-start)
-      (setq year (string-to-int (match-string 1 date-string))
-           month (string-to-int (match-string 2 date-string))
-           day (string-to-int (match-string 3 date-string))
+      (setq year (string-to-number (match-string 1 date-string))
+           month (string-to-number (match-string 2 date-string))
+           day (string-to-number (match-string 3 date-string))
            re-start (match-end 0))
       (when (string-match time-re date-string re-start)
-       (setq hour (string-to-int (match-string 1 date-string))
-             minute (string-to-int (match-string 2 date-string))
-             seconds (string-to-int (match-string 3 date-string))
-             fractional-seconds (string-to-int (or
-                                                (match-string 4 date-string)
-                                                "0"))
+       (setq hour (string-to-number (match-string 1 date-string))
+             minute (string-to-number (match-string 2 date-string))
+             seconds (string-to-number (match-string 3 date-string))
+             fractional-seconds (string-to-number (or
+                                                    (match-string 4 date-string)
+                                                    "0"))
              re-start (match-end 0))
        (when (string-match tz-re date-string re-start)
          (setq tz (match-string 1 date-string)))
     time))
 
 (defun url-dav-process-boolean-property (node)
-  (/= 0 (string-to-int (url-dav-node-text node))))
+  (/= 0 (string-to-number (url-dav-node-text node))))
 
 (defun url-dav-process-uri-property (node)
   ;; Returns a parsed representation of the URL...
   ;; only care about the numeric status code.
   (let ((status (url-dav-node-text node)))
     (if (string-match "\\`[ \r\t\n]*HTTP/[0-9.]+ \\([0-9]+\\)" status)
-       (string-to-int (match-string 1 status))
+       (string-to-number (match-string 1 status))
       500)))
 
 (defun url-dav-process-DAV:propstat (node)
index 872ea22ce05a5019b7dcfd47d1478108710ff102..16d51a0258c55d7cc781c6bbe24d2400ecfacacc 100644 (file)
@@ -827,10 +827,10 @@ the end of the document."
                                                 'text-cursor
                                               'cursor)
                                       'invisible t))
-           (setq url-http-chunked-length (string-to-int (buffer-substring
-                                                         (match-beginning 1)
-                                                         (match-end 1))
-                                                        16)
+           (setq url-http-chunked-length (string-to-number (buffer-substring
+                                                             (match-beginning 1)
+                                                             (match-end 1))
+                                                            16)
                  url-http-chunked-counter (1+ url-http-chunked-counter)
                  url-http-chunked-start (set-marker
                                          (or url-http-chunked-start
@@ -904,7 +904,7 @@ the end of the document."
                    url-http-content-type (mail-fetch-field "content-type"))
              (if (mail-fetch-field "content-length")
                  (setq url-http-content-length
-                       (string-to-int (mail-fetch-field "content-length"))))
+                       (string-to-number (mail-fetch-field "content-length"))))
              (widen)))
          (if url-http-transfer-encoding
              (setq url-http-transfer-encoding
index fe181422e4fe27eee43251d4aa6122ba1eb18c69..1dcb1f85f27e114d14d8aea9376b0d5bf87639b6 100644 (file)
@@ -51,9 +51,9 @@
     (if (or (/= (length netc) (length ipc))
            (/= (length ipc) (length maskc)))
        nil
-      (setq netc (mapcar 'string-to-int netc)
-           ipc (mapcar 'string-to-int ipc)
-           maskc (mapcar 'string-to-int maskc))
+      (setq netc (mapcar 'string-to-number netc)
+           ipc (mapcar 'string-to-number ipc)
+           maskc (mapcar 'string-to-number maskc))
       (and
        (= (logand (nth 0 netc) (nth 0 maskc))
          (logand (nth 0 ipc)  (nth 0 maskc)))
index 97348ab5db257ceb26f2dbb8514bb8aa3ed91279..5b5250ab31fdaab9d135226b1c12fc80f999f886 100644 (file)
@@ -167,7 +167,7 @@ Format is:
                  (setq pass (match-string 2 user)
                        user (match-string 1 user)))
              (if (string-match ":\\([0-9+]+\\)" host)
-                 (setq port (string-to-int (match-string 1 host))
+                 (setq port (string-to-number (match-string 1 host))
                        host (substring host 0 (match-beginning 0))))
              (if (string-match ":$" host)
                  (setq host (substring host 0 (match-beginning 0))))
index 1d0bfcf0c48a8333169cf1a3139332d97e559d12..b796d69546107fb49e472e7938c79de1a98d6637 100644 (file)
@@ -196,7 +196,7 @@ Will not do anything if `url-show-status' is nil."
         (year nil)
         (month (car
                 (rassoc
-                 (string-to-int (aref parsed 1)) url-monthabbrev-alist)))
+                 (string-to-number (aref parsed 1)) url-monthabbrev-alist)))
         )
     (setq day (or (car-safe (rassoc day url-weekday-alist))
                  (substring raw 0 3))