]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/resolv-conf/resolv-conf.factor
use reject instead of [ ... not ] filter.
[factor.git] / extra / resolv-conf / resolv-conf.factor
index d8d370a02b635d6d1dfd2a8ad814e0dad0941f4f..b6eefd214785192277c39d659655c6e38248bd0a 100644 (file)
@@ -6,7 +6,7 @@ unicode.categories ;
 IN: resolv-conf
 
 TUPLE: network ip netmask ;
-CONSTRUCTOR: network ( ip netmask -- network ) ;
+CONSTRUCTOR: <network> network ( ip netmask -- network ) ;
 
 TUPLE: options
 debug?
@@ -18,11 +18,11 @@ insecure2?
 { 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
@@ -90,7 +90,7 @@ PRIVATE>
     [ <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 )