* beautifying modules.scm by ...
* ... creating sunet-utilities.scm
This commit is contained in:
parent
a76848a6c6
commit
20a12efc6d
18
modules.scm
18
modules.scm
|
@ -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))))))
|
||||
|
|
|
@ -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))))
|
Loading…
Reference in New Issue