diff options
| author | forsyth <forsyth@vitanuova.com> | 2011-01-17 11:10:35 +0000 |
|---|---|---|
| committer | forsyth <forsyth@vitanuova.com> | 2011-01-17 11:10:35 +0000 |
| commit | d6b4eae8eb0a5ca3119414005e483fedd63a62d6 (patch) | |
| tree | 4959b04b1ae02ce5ccb4b3c0a8c459ff46587eb7 /appl/cmd/dial.b | |
| parent | 9e6910dc0c747c8f30b87f6482f4eadb48ad6654 (diff) | |
20110117-1110
Diffstat (limited to 'appl/cmd/dial.b')
| -rw-r--r-- | appl/cmd/dial.b | 12 |
1 files changed, 4 insertions, 8 deletions
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"; } |
