Commit 4b73a937 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Touch up naming of ipv6-expand

* lisp/net/net-utils.el (nslookup--ipv6-expand): Rename to avoid
make prefix more regular.
(nslookup-host-ipv6): Rename call.
parent 0e5e816a
Pipeline #3178 passed with stage
in 79 minutes and 50 seconds
...@@ -563,7 +563,7 @@ This command uses `nslookup-program' to look up DNS records." ...@@ -563,7 +563,7 @@ This command uses `nslookup-program' to look up DNS records."
(apply #'vector (mapcar #'string-to-number (split-string ip "\\.")))) (apply #'vector (mapcar #'string-to-number (split-string ip "\\."))))
(t (error "Invalid format: %s" format))))) (t (error "Invalid format: %s" format)))))
(defun ipv6-expand (ipv6-vector) (defun nslookup--ipv6-expand (ipv6-vector)
(let ((len (length ipv6-vector))) (let ((len (length ipv6-vector)))
(if (< len 8) (if (< len 8)
(let* ((pivot (cl-position 0 ipv6-vector)) (let* ((pivot (cl-position 0 ipv6-vector))
...@@ -598,9 +598,10 @@ This command uses `nslookup-program' to look up DNS records." ...@@ -598,9 +598,10 @@ This command uses `nslookup-program' to look up DNS records."
(cond ((memq format '(string nil)) (cond ((memq format '(string nil))
ip) ip)
((eq format 'vector) ((eq format 'vector)
(ipv6-expand (apply #'vector (nslookup--ipv6-expand
(cl-loop for hextet in (split-string ip "[:]") (apply #'vector
collect (string-to-number hextet 16))))) (cl-loop for hextet in (split-string ip "[:]")
collect (string-to-number hextet 16)))))
(t (error "Invalid format: %s" format))))) (t (error "Invalid format: %s" format)))))
;;;###autoload ;;;###autoload
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment