IN: resolv-conf
TUPLE: network ip netmask ;
-CONSTRUCTOR: network ( ip netmask -- network ) ;
+CONSTRUCTOR: <network> network ( ip netmask -- network ) ;
TUPLE: options
debug?
{ attempts integer initial: 2 }
rotate? no-check-names? inet6? tcp? ;
-CONSTRUCTOR: options ( -- options ) ;
+CONSTRUCTOR: <options> options ( -- options ) ;
TUPLE: resolv.conf nameserver domain lookup search sortlist options ;
-CONSTRUCTOR: resolv.conf ( -- resolv.conf )
+CONSTRUCTOR: <resolv.conf> resolv.conf ( -- resolv.conf )
V{ } clone >>nameserver
V{ } clone >>domain
V{ } clone >>search
[ <resolv.conf> ] dip
utf8 file-lines
[ [ blank? ] trim ] map harvest
- [ "#" head? not ] filter
+ [ "#" head? ] reject
[ parse-resolv.conf-line ] each ;
: default-resolv.conf ( -- resolv.conf )