aboutsummaryrefslogtreecommitdiff
path: root/src/libmemdraw
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-06-25 19:28:25 +0000
committerrsc <devnull@localhost>2006-06-25 19:28:25 +0000
commite0ef95dce18a85730c5d9d596a26271ac43f9958 (patch)
treea1160eb5c9a39a8e3fef0228aa3b1a94ff95639e /src/libmemdraw
parent3656f159a335b24b2b49f91fd4a95f851b213545 (diff)
downloadplan9port-e0ef95dce18a85730c5d9d596a26271ac43f9958.tar.gz
plan9port-e0ef95dce18a85730c5d9d596a26271ac43f9958.tar.bz2
plan9port-e0ef95dce18a85730c5d9d596a26271ac43f9958.zip
add stub routines
Diffstat (limited to 'src/libmemdraw')
-rw-r--r--src/libmemdraw/alloc-stub.c17
-rw-r--r--src/libmemdraw/cload-stub.c10
-rw-r--r--src/libmemdraw/draw-stub.c27
-rw-r--r--src/libmemdraw/fill-stub.c11
-rw-r--r--src/libmemdraw/load-stub.c11
-rw-r--r--src/libmemdraw/mkfile5
-rw-r--r--src/libmemdraw/unload-stub.c10
7 files changed, 91 insertions, 0 deletions
diff --git a/src/libmemdraw/alloc-stub.c b/src/libmemdraw/alloc-stub.c
new file mode 100644
index 00000000..2c92f6fe
--- /dev/null
+++ b/src/libmemdraw/alloc-stub.c
@@ -0,0 +1,17 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+#include <memdraw.h>
+
+Memimage*
+allocmemimage(Rectangle r, u32int chan)
+{
+ return _allocmemimage(r, chan);
+}
+
+void
+freememimage(Memimage *m)
+{
+ _freememimage(m);
+}
+
diff --git a/src/libmemdraw/cload-stub.c b/src/libmemdraw/cload-stub.c
new file mode 100644
index 00000000..9d658ef8
--- /dev/null
+++ b/src/libmemdraw/cload-stub.c
@@ -0,0 +1,10 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+#include <memdraw.h>
+
+int
+cloadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata)
+{
+ return _cloadmemimage(i, r, data, ndata);
+}
diff --git a/src/libmemdraw/draw-stub.c b/src/libmemdraw/draw-stub.c
new file mode 100644
index 00000000..08e46a1c
--- /dev/null
+++ b/src/libmemdraw/draw-stub.c
@@ -0,0 +1,27 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+#include <memdraw.h>
+
+void
+memimagedraw(Memimage *dst, Rectangle r, Memimage *src, Point sp, Memimage *mask, Point mp, int op)
+{
+ Memdrawparam *par;
+
+ if((par = _memimagedrawsetup(dst, r, src, sp, mask, mp, op)) == nil)
+ return;
+ _memimagedraw(par);
+}
+
+void
+memfillcolor(Memimage *m, u32int val)
+{
+ _memfillcolor(m, val);
+}
+
+u32int
+pixelbits(Memimage *m, Point p)
+{
+ return _pixelbits(m, p);
+}
+
diff --git a/src/libmemdraw/fill-stub.c b/src/libmemdraw/fill-stub.c
new file mode 100644
index 00000000..d75459f1
--- /dev/null
+++ b/src/libmemdraw/fill-stub.c
@@ -0,0 +1,11 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+#include <memdraw.h>
+
+void
+memfillcolor(Memimage *m, u32int val)
+{
+ _memfillcolor(m, val);
+}
+
diff --git a/src/libmemdraw/load-stub.c b/src/libmemdraw/load-stub.c
new file mode 100644
index 00000000..b0d5fcee
--- /dev/null
+++ b/src/libmemdraw/load-stub.c
@@ -0,0 +1,11 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+#include <memdraw.h>
+
+int
+loadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata)
+{
+ return _loadmemimage(i, r, data, ndata);
+}
+
diff --git a/src/libmemdraw/mkfile b/src/libmemdraw/mkfile
index 4c99bd60..a8c32ff5 100644
--- a/src/libmemdraw/mkfile
+++ b/src/libmemdraw/mkfile
@@ -4,24 +4,29 @@ LIB=libmemdraw.a
OFILES=\
alloc.$O\
+ alloc-stub.$O\
arc.$O\
cload.$O\
+ cload-stub.$O\
cmap.$O\
cread.$O\
defont.$O\
draw.$O\
+ draw-stub.$O\
ellipse.$O\
fillpoly.$O\
hwdraw.$O\
iprint.$O\
line.$O\
load.$O\
+ load-stub.$O\
openmemsubfont.$O\
poly.$O\
read.$O\
string.$O\
subfont.$O\
unload.$O\
+ unload-stub.$O\
write.$O\
HFILES=\
diff --git a/src/libmemdraw/unload-stub.c b/src/libmemdraw/unload-stub.c
new file mode 100644
index 00000000..c0a411ab
--- /dev/null
+++ b/src/libmemdraw/unload-stub.c
@@ -0,0 +1,10 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+#include <memdraw.h>
+
+int
+unloadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata)
+{
+ return _unloadmemimage(i, r, data, ndata);
+}