]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.dns: enable use from command-line.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 1 Apr 2015 21:18:31 +0000 (14:18 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 1 Apr 2015 21:18:31 +0000 (14:18 -0700)
extra/tools/dns/dns.factor

index 3f730ba3a95146c9862e1b963ee4cfca29e40957..fe72417dd04877a7b9c2bad8ec75231d30fcc81f 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2010 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: arrays dns fry io kernel math.parser sequences
-strings ;
+USING: arrays command-line dns fry io kernel math.parser
+namespaces sequences strings ;
 IN: tools.dns
 
 : a-line. ( host ip -- )
@@ -41,3 +41,8 @@ M: sequence dns-host ( servers domain -- )
 
 M: string dns-host
     [ 1array ] dip dns-host ;
+
+: run-host ( -- )
+    command-line get first host ;
+
+MAIN: run-host