Skip to content
Snippets Groups Projects
Commit dcc9cc34 authored by wlott's avatar wlott
Browse files

Rewrote lookup-host-entry to no longer use LOOP until we get a

clarification on what LOOP is supposed to do in that case.
parent 0493a0fc
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/internet.lisp,v 1.11 1992/07/15 11:43:13 garland Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/internet.lisp,v 1.12 1992/12/18 19:02:13 wlott Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -131,20 +131,28 @@
(make-host-entry
:name (slot hostent 'name)
:aliases
(loop
for index upfrom 0
while (not (zerop (deref (cast (slot hostent 'aliases)
(* (unsigned 32)))
index)))
collect (deref (slot hostent 'aliases) index))
(collect ((results))
(iterate repeat ((index 0))
(declare (type kernel:index index))
(cond ((zerop (deref (cast (slot hostent 'aliases)
(* (unsigned 32)))
index))
(results))
(t
(results (deref (slot hostent 'aliases) index))
(repeat (1+ index))))))
:addr-type (slot hostent 'addrtype)
:addr-list
(loop
for index upfrom 0
while (not (zerop (deref (cast (slot hostent 'addr-list)
(* (unsigned 32)))
index)))
collect (deref (deref (slot hostent 'addr-list) index))))))))
(collect ((results))
(iterate repeat ((index 0))
(declare (type kernel:index index))
(cond ((zerop (deref (cast (slot hostent 'addr-list)
(* (unsigned 32)))
index))
(results))
(t
(results (deref (deref (slot hostent 'addr-list) index)))
(repeat (1+ index)))))))))))
(defun create-unix-socket (&optional (kind :stream))
(multiple-value-bind (proto type)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment