* beautifying modules.scm by ...

* ... creating sunet-utilities.scm
This commit is contained in:
interp 2001-11-13 18:37:05 +00:00
parent a76848a6c6
commit 20a12efc6d
2 changed files with 15 additions and 10 deletions

View File

@ -11,6 +11,14 @@
let-opt) ; :optional
(files format-net))
(define-interface sunet-utilities-interface
(export host-name-or-empty))
(define-structure sunet-utilities sunet-utilities-interface
(open scsh
scheme
handle-fatal-error)
(files sunet-utilities))
(define-interface smtp-interface
(export sendmail %sendmail
@ -685,13 +693,3 @@
(define (eval-safely exp)
(ignore-errors (lambda () (eval exp (new-safe-package)))))))
(define-structure sunet-utilities (export host-name-or-empty)
(open scsh
scheme
handle-fatal-error)
(begin
(define (host-name-or-empty addr)
(with-fatal-error-handler
(lambda (condition more)
"")
(host-info:name (host-info addr))))))

7
sunet-utilities.scm Normal file
View File

@ -0,0 +1,7 @@
; some useful utilities
(define (host-name-or-empty addr)
(with-fatal-error-handler
(lambda (condition more)
"")
(host-info:name (host-info addr))))