From 44bfc19e3be14e20b7c141cb3268f3afdb339705 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 1 Apr 2015 14:18:31 -0700 Subject: [PATCH] tools.dns: enable use from command-line. --- extra/tools/dns/dns.factor | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/extra/tools/dns/dns.factor b/extra/tools/dns/dns.factor index 3f730ba3a9..fe72417dd0 100644 --- a/extra/tools/dns/dns.factor +++ b/extra/tools/dns/dns.factor @@ -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