summaryrefslogtreecommitdiff
path: root/appl/acme/acme/edit/src/d.b
diff options
context:
space:
mode:
Diffstat (limited to 'appl/acme/acme/edit/src/d.b')
-rw-r--r--appl/acme/acme/edit/src/d.b30
1 files changed, 30 insertions, 0 deletions
diff --git a/appl/acme/acme/edit/src/d.b b/appl/acme/acme/edit/src/d.b
new file mode 100644
index 00000000..0b663942
--- /dev/null
+++ b/appl/acme/acme/edit/src/d.b
@@ -0,0 +1,30 @@
+implement Dd;
+
+include "sys.m";
+include "draw.m";
+include "sh.m";
+
+Dd : module {
+ init : fn(ctxt : ref Draw->Context, argl : list of string);
+};
+
+init(ctxt : ref Draw->Context, argl : list of string)
+{
+ sys := load Sys Sys->PATH;
+ stderr := sys->fildes(2);
+ if (len argl != 1) {
+ sys->fprint(stderr, "usage : d\n");
+ return;
+ }
+ cmd := "/acme/edit/c";
+ file := cmd + ".dis";
+ c := load Command file;
+ if(c == nil) {
+ sys->fprint(stderr, "%s: %r\n", cmd);
+ return;
+ }
+ argl = nil;
+ argl = "" :: argl;
+ argl = cmd :: argl;
+ c->init(ctxt, argl);
+} \ No newline at end of file