aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2020-01-08 22:49:36 -0500
committerRuss Cox <rsc@swtch.com>2020-01-13 16:46:14 -0500
commitcc3d97d52a72d7eaceb5b636bcdf81c3e19f7a2e (patch)
tree62781b8bc02e247548b0ad84daac978a9b590f73 /src
parentbf59f0ed282f9c9b1ae0660e5af0ac86c0d247b5 (diff)
downloadplan9port-cc3d97d52a72d7eaceb5b636bcdf81c3e19f7a2e.tar.gz
plan9port-cc3d97d52a72d7eaceb5b636bcdf81c3e19f7a2e.tar.bz2
plan9port-cc3d97d52a72d7eaceb5b636bcdf81c3e19f7a2e.zip
devdraw: update drawclient test program to run again
Diffstat (limited to 'src')
-rw-r--r--src/cmd/devdraw/drawclient.c15
-rw-r--r--src/cmd/devdraw/mkfile2
2 files changed, 8 insertions, 9 deletions
diff --git a/src/cmd/devdraw/drawclient.c b/src/cmd/devdraw/drawclient.c
index f6139289..71c7142d 100644
--- a/src/cmd/devdraw/drawclient.c
+++ b/src/cmd/devdraw/drawclient.c
@@ -4,7 +4,7 @@
#include <draw.h>
#include <mouse.h>
#include <cursor.h>
-#include <drawsrv.h>
+#include <drawfcall.h>
typedef struct Cmd Cmd;
struct Cmd {
@@ -29,7 +29,7 @@ startsrv(void)
close(p[0]);
dup(p[1], 0);
dup(p[1], 1);
- execl("o.drawsrv", "o.drawsrv", "-D", nil);
+ execl("./o.devdraw", "o.devdraw", "-D", nil);
sysfatal("exec: %r");
}
close(p[1]);
@@ -47,7 +47,7 @@ fprint(2, "write %d to %d\n", n, fd);
n = readwsysmsg(fd, buf, sizeof buf);
nn = convM2W(buf, n, m);
assert(nn == n);
- if(m->op == Rerror)
+ if(m->type == Rerror)
return -1;
return 0;
}
@@ -58,10 +58,9 @@ cmdinit(int argc, char **argv)
Wsysmsg m;
memset(&m, 0, sizeof m);
- m.op = Tinit;
+ m.type = Tinit;
m.winsize = "100x100";
m.label = "label";
- m.font = "";
if(domsg(&m) < 0)
sysfatal("domsg");
}
@@ -72,7 +71,7 @@ cmdmouse(int argc, char **argv)
Wsysmsg m;
memset(&m, 0, sizeof m);
- m.op = Trdmouse;
+ m.type = Trdmouse;
if(domsg(&m) < 0)
sysfatal("domsg");
print("%c %d %d %d\n",
@@ -88,10 +87,10 @@ cmdkbd(int argc, char **argv)
Wsysmsg m;
memset(&m, 0, sizeof m);
- m.op = Trdkbd;
+ m.type = Trdkbd;
if(domsg(&m) < 0)
sysfatal("domsg");
- print("%s\n", m.runes);
+ print("%d\n", m.rune);
}
Cmd cmdtab[] = {
diff --git a/src/cmd/devdraw/mkfile b/src/cmd/devdraw/mkfile
index 7f0c2a20..e60b427f 100644
--- a/src/cmd/devdraw/mkfile
+++ b/src/cmd/devdraw/mkfile
@@ -20,7 +20,7 @@ HFILES=\
<$PLAN9/src/mkone
-$O.drawclient: drawclient.$O drawfcall.$O
+$O.drawclient: drawclient.$O
$LD -o $target $prereq
$O.snarf: x11-alloc.$O x11-cload.$O x11-draw.$O x11-fill.$O x11-get.$O x11-init.$O x11-itrans.$O x11-keysym2ucs.$O x11-load.$O x11-pixelbits.$O x11-unload.$O x11-wsys.$O snarf.$O latin1.$O devdraw.$O