diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
| commit | 37da2899f40661e3e9631e497da8dc59b971cbd0 (patch) | |
| tree | cbc6d4680e347d906f5fa7fca73214418741df72 /appl/cmd/src.b | |
| parent | 54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff) | |
20060303a
Diffstat (limited to 'appl/cmd/src.b')
| -rw-r--r-- | appl/cmd/src.b | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/appl/cmd/src.b b/appl/cmd/src.b new file mode 100644 index 00000000..70c9da65 --- /dev/null +++ b/appl/cmd/src.b @@ -0,0 +1,28 @@ +implement Src; + +include "sys.m"; + sys: Sys; +include "draw.m"; +include "dis.m"; + dis: Dis; + +Src: module +{ + init: fn(nil: ref Draw->Context, argv: list of string); +}; + +init(nil: ref Draw->Context, argv: list of string) +{ + sys = load Sys Sys->PATH; + dis = load Dis Dis->PATH; + + if(dis != nil){ + dis->init(); + for(argv = tl argv; argv != nil; argv = tl argv){ + src := dis->src(hd argv); + if(src == nil) + src = "?"; + sys->print("%s: %s\n", hd argv, src); + } + } +} |
