diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2022-03-08 15:33:21 +0100 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2022-03-08 15:36:26 +0100 |
commit | 349794f3e4f11e4cc34a501ba935a2a305229738 (patch) | |
tree | 3e858a2d3dbf8b4ad43cc5f2f40a8790b37b99b6 /util.c | |
parent | 3d294346ab168fd0b12761711fbe667e47fd644e (diff) | |
download | roux-349794f3e4f11e4cc34a501ba935a2a305229738.tar.gz |
cosmetics
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 12 |
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; |