From d6b4eae8eb0a5ca3119414005e483fedd63a62d6 Mon Sep 17 00:00:00 2001 From: forsyth Date: Mon, 17 Jan 2011 11:10:35 +0000 Subject: 20110117-1110 --- appl/cmd/dial.b | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'appl/cmd/dial.b') diff --git a/appl/cmd/dial.b b/appl/cmd/dial.b index 8821b49a..c562a570 100644 --- a/appl/cmd/dial.b +++ b/appl/cmd/dial.b @@ -1,4 +1,4 @@ -implement Dialcmd; +implement Dial; include "sys.m"; sys: Sys; include "draw.m"; @@ -7,12 +7,11 @@ include "keyring.m"; keyring: Keyring; include "security.m"; auth: Auth; -include "dial.m"; include "sh.m"; sh: Sh; Context: import sh; -Dialcmd: module { +Dial: module { init: fn(nil: ref Draw->Context, argv: list of string); }; @@ -36,9 +35,6 @@ init(drawctxt: ref Draw->Context, argv: list of string) arg := load Arg Arg->PATH; if (arg == nil) badmodule(Arg->PATH); - dial := load Dial Dial->PATH; - if(dial == nil) - badmodule(Dial->PATH); sh = load Sh Sh->PATH; if (sh == nil) badmodule(Sh->PATH); @@ -91,8 +87,8 @@ init(drawctxt: ref Draw->Context, argv: list of string) } } - c := dial->dial(addr, nil); - if (c == nil) { + (ok, c) := sys->dial(addr, nil); + if (ok == -1) { sys->fprint(stderr(), "dial: cannot dial %s:: %r\n", addr); raise "fail:errors"; } -- cgit v1.2.3