summary refs log tree commit diff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/util.c b/util.c
index c8b0b9c..5296b86 100644
--- a/util.c
+++ b/util.c
@@ -399,7 +399,7 @@ addcon(Con *c0, Con *c1)
 }
 
 void
-blit(Ref rdst, uint doff, Ref rsrc, uint sz, Fn *fn)
+blit(Ref rdst, uint doff, Ref rsrc, uint boff, uint sz, Fn *fn)
 {
 	struct { int st, ld, cls, size; } *p, tbl[] = {
 		{ Ostorel, Oload,   Kl, 8 },
@@ -408,9 +408,9 @@ blit(Ref rdst, uint doff, Ref rsrc, uint sz, Fn *fn)
 		{ Ostoreb, Oloadub, Kw, 1 }
 	};
 	Ref r, r1;
-	uint boff, s;
+	uint s;
 
-	for (boff=0, p=tbl; sz; p++)
+	for (p=tbl; sz; p++)
 		for (s=p->size; sz>=s; sz-=s, doff+=s, boff+=s) {
 			r = newtmp("blt", Kl, fn);
 			r1 = newtmp("blt", Kl, fn);
@@ -423,6 +423,12 @@ blit(Ref rdst, uint doff, Ref rsrc, uint sz, Fn *fn)
 }
 
 void
+blit0(Ref rdst, Ref rsrc, uint sz, Fn *fn)
+{
+	blit(rdst, 0, rsrc, 0, sz, fn);
+}
+
+void
 bsinit(BSet *bs, uint n)
 {
 	n = (n + NBit-1) / NBit;