History

update libdraw code to 9front version, cleanup x11 code

cinap_lenrek committed 10 years ago

Commit a08fb221 parent 5dc9cad39 files · +832 −2306Browse files

Unified · Split

39 files
  1. gui-win32/Makefile +0 −4
  2. gui-win32/alloc.c +0 −23
  3. gui-win32/cload.c +0 −10
  4. gui-win32/draw.c +0 −22
  5. gui-win32/load.c +0 −10
  6. gui-win32/screen.c +1 −1
  7. gui-x11/x11.c +35 −430
  8. include/draw.h +11 −19
  9. include/memdraw.h +4 −34
  10. kern/devdraw.c +3 −4
  11. kern/devkbd.c +1 −0
  12. kern/screen.h +1 −1
  13. libdraw/Makefile +2 −0
  14. libdraw/alloc.c +41 −35
  15. libdraw/arith.c +6 −21
  16. libdraw/badrect.c +22 −0
  17. libdraw/chan.c +5 −1
  18. libdraw/defont.c +358 −372
  19. libdraw/fmt.c +22 −0
  20. libmemdraw/alloc.c +16 −13
  21. libmemdraw/arctest.c +0 −62
  22. libmemdraw/cload.c +2 −2
  23. libmemdraw/defont.c +1 −1
  24. libmemdraw/draw.c +243 −188
  25. libmemdraw/drawtest.c +0 −1004
  26. libmemdraw/ellipse.c +4 −4
  27. libmemdraw/fillpoly.c +1 −3
  28. libmemdraw/line.c +2 −3
  29. libmemdraw/load.c +9 −2
  30. libmemdraw/openmemsubfont.c +9 −6
  31. libmemdraw/read.c +0 −4
  32. libmemdraw/string.c +3 −4
  33. libmemdraw/subfont.c +1 −0
  34. libmemdraw/unload.c +1 −1
  35. libmemdraw/write.c +21 −15
  36. libmemlayer/draw.c +2 −2
  37. libmemlayer/lalloc.c +1 −1
  38. libmemlayer/lsetrefresh.c +3 −3
  39. libmemlayer/unload.c +1 −1
gui-win32/Makefile+0−4
@@ -3,10 +3,6 @@ include ../Make.config · 2 unmodified lines
33 LIB=libgui.a
44
55 OFILES=\
6− alloc.$O\
7− cload.$O\
8− draw.$O\
9− load.$O\
106 screen.$O\
117 r16.$O
128
gui-win32/alloc.c+0−23
@@ -1,23 +0,0 @@
1−#include <u.h>
2−#include <libc.h>
3−#include <draw.h>
4−#include <memdraw.h>
5−
6−Memimage*
7−allocmemimage(Rectangle r, ulong chan)
8−{
9− return _allocmemimage(r, chan);
10−}
11−
12−void
13−freememimage(Memimage *i)
14−{
15− _freememimage(i);
16−}
17−
18−void
19−memfillcolor(Memimage *i, ulong val)
20−{
21− _memfillcolor(i, val);
22−}
23−
gui-win32/cload.c+0−10
@@ -1,10 +0,0 @@
1−#include <u.h>
2−#include <libc.h>
3−#include <draw.h>
4−#include <memdraw.h>
5−
6−int
7−cloadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata)
8−{
9− return _cloadmemimage(i, r, data, ndata);
10−}
gui-win32/draw.c+0−22
@@ -1,22 +0,0 @@
1−#include <u.h>
2−#include <libc.h>
3−#include <draw.h>
4−#include <memdraw.h>
5−
6−void
7−memimagedraw(Memimage *dst, Rectangle r, Memimage *src, Point sp, Memimage *mask, Point mp, int op)
8−{
9− _memimagedraw(_memimagedrawsetup(dst, r, src, sp, mask, mp, op));
10−}
11−
12−ulong
13−pixelbits(Memimage *m, Point p)
14−{
15− return _pixelbits(m, p);
16−}
17−
18−void
19−memimageinit(void)
20−{
21− _memimageinit();
22−}
gui-win32/load.c+0−10
@@ -1,10 +0,0 @@
1−#include <u.h>
2−#include <libc.h>
3−#include <draw.h>
4−#include <memdraw.h>
5−
6−int
7−loadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata)
8−{
9− return _loadmemimage(i, r, data, ndata);
10−}
gui-win32/screen.c+1−1
@@ -88,7 +88,7 @@ screeninit(void) · 87 unmodified lines
8888 }
8989
9090 uchar*
91−attachscreen(Rectangle *r, ulong *chan, int *depth, int *width, int *softscreen, void **X)
91+attachscreen(Rectangle *r, ulong *chan, int *depth, int *width, int *softscreen)
9292 {
9393 *r = gscreen->r;
9494 *chan = gscreen->chan;
gui-x11/x11.c+35−430
@@ -37,42 +37,16 @@ typedef struct Cursor Cursor; · 36 unmodified lines
3737 /* perfect approximation to NTSC = .299r+.587g+.114b when 0 ≤ r,g,b < 256 */
3838 #define RGB2K(r,g,b) ((156763*(r)+307758*(g)+59769*(b))>>19)
3939
40−enum
41−{
42− PMundef = ~0 /* undefined pixmap id */
43−};
44−
45−/*
46− * Structure pointed to by X field of Memimage
47− */
48−typedef struct Xmem Xmem;
49−struct Xmem
50−{
51− int pmid; /* pixmap id for screen ldepth instance */
52− XImage *xi; /* local image if we currenty have the data */
53− int dirty;
54− Rectangle dirtyr;
55− Rectangle r;
56− uintptr pc; /* who wrote into xi */
57−};
58−
59−static int xgcfillcolor;
60−static int xgcfillcolor0;
61−static int xgcsimplecolor0;
62−static int xgcsimplepm0;
63−
6440 static XDisplay* xdisplay; /* used holding draw lock */
65−static int xtblbit;
66−static int plan9tox11[256]; /* Values for mapping between */
67−static int x11toplan9[256]; /* X11 and Plan 9 */
68−static GC xgcfill, xgccopy, xgcsimplesrc, xgczero, xgcreplsrc;
69−static GC xgcfill0, xgccopy0, xgcsimplesrc0, xgczero0, xgcreplsrc0;
41+static int xtblbit;
42+static int plan9tox11[256]; /* Values for mapping between */
43+static int x11toplan9[256]; /* X11 and Plan 9 */
44+static GC xgccopy;
7045 static ulong xscreenchan;
7146 static Drawable xscreenid;
47+static XImage* xscreenimage;
7248 static Visual *xvis;
7349
74−static int xdraw(Memdrawparam*);
75−
7650 #define glenda_width 48
7751 #define glenda_height 48
7852 static unsigned short glenda_bits[] = {
@@ -94,133 +68,25 @@ static unsigned short glenda_bits[] = { · 15 unmodified lines
9468 0xffff, 0x8807, 0xffe0, 0xffff, 0x003f, 0xfff0, 0xffff, 0x1fff, 0xfffe
9569 };
9670
97−/*
98− * Synchronize images between X bitmaps and in-memory bitmaps.
99− */
100−static void
101−addrect(Rectangle *rp, Rectangle r)
102−{
103− if(rp->min.x >= rp->max.x)
104− *rp = r;
105− else
106− combinerect(rp, r);
107−}
108−
109−static XImage*
110−getXdata(Memimage *m, Rectangle r)
111−{
112− uchar *p;
113− int x, y;
114− Xmem *xm;
115− Point xdelta, delta;
116− Point tp;
117−
118− xm = m->X;
119− if(xm == nil)
120− return nil;
121−
122− assert(xm != nil && xm->xi != nil);
123−
124− if(xm->dirty == 0)
125− return xm->xi;
126−
127− r = xm->dirtyr;
128− if(Dx(r)==0 || Dy(r)==0)
129− return xm->xi;
130−
131− delta = subpt(r.min, m->r.min);
132− tp = xm->r.min; /* avoid unaligned access on digital unix */
133− xdelta = subpt(r.min, tp);
134−
135− XGetSubImage(xdisplay, xm->pmid, delta.x, delta.y, Dx(r), Dy(r),
136− AllPlanes, ZPixmap, xm->xi, xdelta.x, xdelta.y);
137−
138− if(xtblbit && m->chan == CMAP8)
139− for(y=r.min.y; y<r.max.y; y++)
140− for(x=r.min.x, p=byteaddr(m, Pt(x,y)); x<r.max.x; x++, p++)
141− *p = x11toplan9[*p];
142−
143− xm->dirty = 0;
144− xm->dirtyr = Rect(0,0,0,0);
145− return xm->xi;
146−}
147−
148−static void
149−putXdata(Memimage *m, Rectangle r)
150−{
151− Xmem *xm;
152− XImage *xi;
153− GC g;
154− Point xdelta, delta;
155− Point tp;
156− int x, y;
157− uchar *p;
158−
159− xm = m->X;
160− if(xm == nil)
161− return;
162−
163− assert(xm != nil);
164− assert(xm->xi != nil);
165−
166− xi = xm->xi;
167−
168− g = (m->chan == GREY1) ? xgccopy0 : xgccopy;
169−
170− delta = subpt(r.min, m->r.min);
171− tp = xm->r.min; /* avoid unaligned access on digital unix */
172− xdelta = subpt(r.min, tp);
173−
174− if(xtblbit && m->chan == CMAP8)
175− for(y=r.min.y; y<r.max.y; y++)
176− for(x=r.min.x, p=byteaddr(m, Pt(x,y)); x<r.max.x; x++, p++)
177− *p = plan9tox11[*p];
178−
179− XPutImage(xdisplay, xm->pmid, g, xi, xdelta.x, xdelta.y, delta.x, delta.y, Dx(r), Dy(r));
180−
181− if(xtblbit && m->chan == CMAP8)
182− for(y=r.min.y; y<r.max.y; y++)
183− for(x=r.min.x, p=byteaddr(m, Pt(x,y)); x<r.max.x; x++, p++)
184− *p = x11toplan9[*p];
185−}
186−
187−static void
188−dirtyXdata(Memimage *m, Rectangle r)
189−{
190− Xmem *xm;
191−
192− if((xm = m->X) != nil){
193− xm->dirty = 1;
194− addrect(&xm->dirtyr, r);
195− }
196−}
197−
19871 Memimage*
199−xallocmemimage(Rectangle r, ulong chan, int pmid)
72+xallocmemimage(Rectangle r, ulong chan, int pmid, XImage **X)
20073 {
20174 Memimage *m;
202− Xmem *xm;
20375 XImage *xi;
20476 int offset;
20577 int d;
206−
207− m = _allocmemimage(r, chan);
78+
79+ m = allocmemimage(r, chan);
20880 if(m == nil)
20981 return nil;
21082 if(chan != GREY1 && chan != xscreenchan)
21183 return m;
21284
21385 d = m->depth;
214− xm = mallocz(sizeof(Xmem), 1);
215− if(pmid != PMundef)
216− xm->pmid = pmid;
217− else
218− xm->pmid = XCreatePixmap(xdisplay, xscreenid, Dx(r), Dy(r), (d==32) ? 24 : d);
219−
220− if(m->depth == 24)
86+ if(d == 24)
22187 offset = r.min.x&(4-1);
22288 else
223− offset = r.min.x&(31/m->depth);
89+ offset = r.min.x&(31/d);
22490 r.min.x -= offset;
22591
22692 assert(wordsperline(r, m->depth) <= m->width);
@@ -229,14 +95,10 @@ xallocmemimage(Rectangle r, ulong chan, int pmid) · 2 unmodified lines
22995 (char*)m->data->bdata, Dx(r), Dy(r), 32, m->width*sizeof(ulong));
23096
23197 if(xi == nil){
232− _freememimage(m);
98+ freememimage(m);
23399 return nil;
234100 }
235101
236− xm->xi = xi;
237− xm->pc = getcallerpc(&r);
238− xm->r = r;
239−
240102 /*
241103 * Set the parameters of the XImage so its memory looks exactly like a
242104 * Memimage, so we can call _memimagedraw on the same data. All frame
@@ -247,256 +109,12 @@ xallocmemimage(Rectangle r, ulong chan, int pmid) · 4 unmodified lines
247109 xi->byte_order = LSBFirst;
248110 xi->bitmap_bit_order = MSBFirst;
249111 xi->bitmap_pad = 32;
250− xm->r = Rect(0,0,0,0);
251112 XInitImage(xi);
252113 XFlush(xdisplay);
253114
254− m->X = xm;
255− return m;
256−}
257−
258−void
259−xfillcolor(Memimage *m, Rectangle r, ulong v)
260−{
261− GC gc;
262− Xmem *dxm;
263−
264− dxm = m->X;
265− assert(dxm != nil);
266− r = rectsubpt(r, m->r.min);
267−
268− if(m->chan == GREY1){
269− gc = xgcfill0;
270− if(xgcfillcolor0 != v){
271− XSetForeground(xdisplay, gc, v);
272− xgcfillcolor0 = v;
273− }
274− }else{
275− if(m->chan == CMAP8 && xtblbit)
276− v = plan9tox11[v];
277−
278− gc = xgcfill;
279− if(xgcfillcolor != v){
280− XSetForeground(xdisplay, gc, v);
281− xgcfillcolor = v;
282− }
283− }
284− XFillRectangle(xdisplay, dxm->pmid, gc, r.min.x, r.min.y, Dx(r), Dy(r));
285−}
115+ *X = xi;
286116
287−/*
288− * Replacements for libmemdraw routines.
289− * (They've been underscored.)
290− */
291−Memimage*
292−allocmemimage(Rectangle r, ulong chan)
293−{
294− return xallocmemimage(r, chan, PMundef);
295−}
296−
297−void
298−freememimage(Memimage *m)
299−{
300− Xmem *xm;
301−
302− if(m == nil)
303− return;
304−
305− if(m->data->ref == 1){
306− if((xm = m->X) != nil){
307− if(xm->xi){
308− xm->xi->data = nil;
309− XFree(xm->xi);
310− }
311− XFreePixmap(xdisplay, xm->pmid);
312− free(xm);
313− m->X = nil;
314− }
315− }
316− _freememimage(m);
317−}
318−
319−void
320−memfillcolor(Memimage *m, ulong val)
321−{
322− _memfillcolor(m, val);
323− if(m->X){
324− if((val & 0xFF) == 0xFF)
325− xfillcolor(m, m->r, _rgbatoimg(m, val));
326− else
327− putXdata(m, m->r);
328− }
329−}
330−
331−int
332−loadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata)
333−{
334− int n;
335−
336− n = _loadmemimage(i, r, data, ndata);
337− if(n > 0 && i->X)
338− putXdata(i, r);
339− return n;
340−}
341−
342−int
343−cloadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata)
344−{
345− int n;
346−
347− n = _cloadmemimage(i, r, data, ndata);
348− if(n > 0 && i->X)
349− putXdata(i, r);
350− return n;
351−}
352−
353−ulong
354−pixelbits(Memimage *m, Point p)
355−{
356− if(m->X)
357− getXdata(m, Rect(p.x, p.y, p.x+1, p.y+1));
358− return _pixelbits(m, p);
359−}
360−
361−void
362−memimageinit(void)
363−{
364− static int didinit = 0;
365−
366− if(didinit)
367− return;
368−
369− didinit = 1;
370− _memimageinit();
371−
372− xfillcolor(memblack, memblack->r, 0);
373− xfillcolor(memwhite, memwhite->r, 1);
374−}
375−
376−void
377−memimagedraw(Memimage *dst, Rectangle r, Memimage *src, Point sp, Memimage *mask, Point mp, int op)
378−{
379− Memdrawparam *par;
380−
381− if((par = _memimagedrawsetup(dst, r, src, sp, mask, mp, op)) == nil)
382− return;
383− _memimagedraw(par);
384− if(!xdraw(par))
385− putXdata(dst, par->r);
386−}
387−
388−static int
389−xdraw(Memdrawparam *par)
390−{
391− return 0;
392−}
393−
394−static int
395−xdraw_broken(Memdrawparam *par)
396−{
397− int dy, dx;
398− unsigned m;
399− Memimage *src, *dst, *mask;
400− Xmem *dxm, *sxm, *mxm;
401− GC gc;
402− Rectangle r, sr, mr;
403− ulong sdval;
404−
405− dx = Dx(par->r);
406− dy = Dy(par->r);
407− src = par->src;
408− dst = par->dst;
409− mask = par->mask;
410− r = par->r;
411− sr = par->sr;
412− mr = par->mr;
413− sdval = par->sdval;
414−
415− /*
416− * drawterm was distributed for years with
417− * "return 0;" right here.
418− * maybe we should give up on all this?
419− */
420−
421− if((dxm = dst->X) == nil)
422− return 0;
423−
424− /*
425− * If we have an opaque mask and source is one opaque pixel we can convert to the
426− * destination format and just XFillRectangle.
427− */
428− m = Simplesrc|Simplemask|Fullmask;
429− if((par->state&m)==m){
430− xfillcolor(dst, r, sdval);
431− dirtyXdata(dst, par->r);
432− return 1;
433− }
434−
435− /*
436− * If no source alpha, an opaque mask, we can just copy the
437− * source onto the destination. If the channels are the same and
438− * the source is not replicated, XCopyArea suffices.
439− */
440− m = Simplemask|Fullmask;
441− if((par->state&(m|Replsrc))==m && src->chan == dst->chan && src->X){
442− sxm = src->X;
443− r = rectsubpt(r, dst->r.min);
444− sr = rectsubpt(sr, src->r.min);
445− if(dst->chan == GREY1)
446− gc = xgccopy0;
447− else
448− gc = xgccopy;
449− XCopyArea(xdisplay, sxm->pmid, dxm->pmid, gc,
450− sr.min.x, sr.min.y, dx, dy, r.min.x, r.min.y);
451− dirtyXdata(dst, par->r);
452− return 1;
453− }
454−
455− /*
456− * If no source alpha, a 1-bit mask, and a simple source
457− * we can just copy through the mask onto the destination.
458− */
459− if(dst->X && mask->X && !(mask->flags&Frepl)
460− && mask->chan == GREY1 && (par->state&Simplesrc)){
461− Point p;
462−
463− mxm = mask->X;
464− r = rectsubpt(r, dst->r.min);
465− mr = rectsubpt(mr, mask->r.min);
466− p = subpt(r.min, mr.min);
467− if(dst->chan == GREY1){
468− gc = xgcsimplesrc0;
469− if(xgcsimplecolor0 != sdval){
470− XSetForeground(xdisplay, gc, sdval);
471− xgcsimplecolor0 = sdval;
472− }
473− if(xgcsimplepm0 != mxm->pmid){
474− XSetStipple(xdisplay, gc, mxm->pmid);
475− xgcsimplepm0 = mxm->pmid;
476− }
477− }else{
478− /* somehow this doesn't work on rob's mac
479− gc = xgcsimplesrc;
480− if(dst->chan == CMAP8 && xtblbit)
481− sdval = plan9tox11[sdval];
482−
483− if(xgcsimplecolor != sdval){
484− XSetForeground(xdisplay, gc, sdval);
485− xgcsimplecolor = sdval;
486− }
487− if(xgcsimplepm != mxm->pmid){
488− XSetStipple(xdisplay, gc, mxm->pmid);
489− xgcsimplepm = mxm->pmid;
490− }
491− */
492− return 0;
493− }
494− XSetTSOrigin(xdisplay, gc, p.x, p.y);
495− XFillRectangle(xdisplay, dxm->pmid, gc, r.min.x, r.min.y, dx, dy);
496− dirtyXdata(dst, par->r);
497− return 1;
498− }
499− return 0;
117+ return m;
500118 }
501119
502120 /*
@@ -507,7 +125,7 @@ xdraw_broken(Memdrawparam *par) · 4 unmodified lines
507125 static XColor map[256]; /* Plan 9 colormap array */
508126 static XColor map7[128]; /* Plan 9 colormap array */
509127 static uchar map7to8[128][2];
510−static Colormap xcmap; /* Default shared colormap */
128+static Colormap xcmap; /* Default shared colormap */
511129
512130 extern int mousequeue;
513131
@@ -533,20 +151,34 @@ static void graphicscmap(XColor*); · 19 unmodified lines
533151 static int xscreendepth;
534152 static XDisplay* xkmcon; /* used only in xproc */
535153 static XDisplay* xsnarfcon; /* used holding clip.lk */
536−static ulong xblack;
537−static ulong xwhite;
538154
539155 static int putsnarf, assertsnarf;
540156
541− Memimage *gscreen;
542− Screeninfo screen;
157+Memimage *gscreen;
158+Screeninfo screen;
543159
544160 void
545161 flushmemscreen(Rectangle r)
546162 {
163+ int x, y;
164+ uchar *p;
165+
547166 assert(!drawcanqlock());
548167 if(r.min.x >= r.max.x || r.min.y >= r.max.y)
549168 return;
169+
170+ if(xtblbit && gscreen->chan == CMAP8)
171+ for(y=r.min.y; y<r.max.y; y++)
172+ for(x=r.min.x, p=byteaddr(gscreen, Pt(x,y)); x<r.max.x; x++, p++)
173+ *p = plan9tox11[*p];
174+
175+ XPutImage(xdisplay, xscreenid, xgccopy, xscreenimage, r.min.x, r.min.y, r.min.x, r.min.y, Dx(r), Dy(r));
176+
177+ if(xtblbit && gscreen->chan == CMAP8)
178+ for(y=r.min.y; y<r.max.y; y++)
179+ for(x=r.min.x, p=byteaddr(gscreen, Pt(x,y)); x<r.max.x; x++, p++)
180+ *p = x11toplan9[*p];
181+
550182 XCopyArea(xdisplay, xscreenid, xdrawable, xgccopy, r.min.x, r.min.y, Dx(r), Dy(r), r.min.x, r.min.y);
551183 XFlush(xdisplay);
552184 }
@@ -567,14 +199,12 @@ screeninit(void) · 14 unmodified lines
567199 }
568200
569201 uchar*
570−attachscreen(Rectangle *r, ulong *chan, int *depth,
571− int *width, int *softscreen, void **X)
202+attachscreen(Rectangle *r, ulong *chan, int *depth, int *width, int *softscreen)
572203 {
573204 *r = gscreen->r;
574205 *chan = gscreen->chan;
575206 *depth = gscreen->depth;
576207 *width = gscreen->width;
577− *X = gscreen->X;
578208 *softscreen = 1;
579209
580210 return gscreen->data->bdata;
@@ -708,7 +338,7 @@ static Memimage* · 127 unmodified lines
708338 xinitscreen(void)
709339 {
710340 Memimage *gscreen;
711− int i, xsize, ysize, pmid;
341+ int i, xsize, ysize;
712342 char *argv[2];
713343 char *disp_val;
714344 Window rootwin;
@@ -868,31 +498,8 @@ xinitscreen(void) · 153 unmodified lines
868498 XFlush(xdisplay);
869499
870500 xscreenid = XCreatePixmap(xdisplay, xdrawable, Dx(r), Dy(r), xscreendepth);
871− gscreen = xallocmemimage(r, xscreenchan, xscreenid);
872−
873− xgcfill = creategc(xscreenid);
874− XSetFillStyle(xdisplay, xgcfill, FillSolid);
501+ gscreen = xallocmemimage(r, xscreenchan, xscreenid, &xscreenimage);
875502 xgccopy = creategc(xscreenid);
876− xgcsimplesrc = creategc(xscreenid);
877− XSetFillStyle(xdisplay, xgcsimplesrc, FillStippled);
878− xgczero = creategc(xscreenid);
879− xgcreplsrc = creategc(xscreenid);
880− XSetFillStyle(xdisplay, xgcreplsrc, FillTiled);
881−
882− pmid = XCreatePixmap(xdisplay, xdrawable, 1, 1, 1);
883− xgcfill0 = creategc(pmid);
884− XSetForeground(xdisplay, xgcfill0, 0);
885− XSetFillStyle(xdisplay, xgcfill0, FillSolid);
886− xgccopy0 = creategc(pmid);
887− xgcsimplesrc0 = creategc(pmid);
888− XSetFillStyle(xdisplay, xgcsimplesrc0, FillStippled);
889− xgczero0 = creategc(pmid);
890− xgcreplsrc0 = creategc(pmid);
891− XSetFillStyle(xdisplay, xgcreplsrc0, FillTiled);
892− XFreePixmap(xdisplay, pmid);
893−
894− XSetForeground(xdisplay, xgccopy, plan9tox11[0]);
895− XFillRectangle(xdisplay, xscreenid, xgccopy, 0, 0, xsize, ysize);
896503
897504 xkmcon = XOpenDisplay(NULL);
898505 if(xkmcon == 0){
@@ -917,8 +524,6 @@ xinitscreen(void) · 18 unmodified lines
917524 text = XInternAtom(xkmcon, "TEXT", False);
918525 compoundtext = XInternAtom(xkmcon, "COMPOUND_TEXT", False);
919526
920− xblack = screen->black_pixel;
921− xwhite = screen->white_pixel;
922527 return gscreen;
923528 }
924529
include/draw.h+11−19
@@ -1,8 +1,3 @@
1−#ifdef PLAN9
2−#pragma src "/sys/src/libdraw"
3−#pragma lib "libdraw.a"
4−#endif
5−
61 typedef struct Cachefont Cachefont;
72 typedef struct Cacheinfo Cacheinfo;
83 typedef struct Cachesubf Cachesubf;
@@ -17,10 +12,6 @@ typedef struct RGB RGB; · 8 unmodified lines
1712 typedef struct Screen Screen;
1813 typedef struct Subfont Subfont;
1914
20−#ifdef VARARGCK
21−#pragma varargck type "R" Rectangle
22−#pragma varargck type "P" Point
23−#endif
2415 extern int Rfmt(Fmt*);
2516 extern int Pfmt(Fmt*);
2617
@@ -140,11 +131,12 @@ enum { · 113 unmodified lines
140131 RGB15 = CHAN4(CIgnore, 1, CRed, 5, CGreen, 5, CBlue, 5),
141132 RGB16 = CHAN3(CRed, 5, CGreen, 6, CBlue, 5),
142133 RGB24 = CHAN3(CRed, 8, CGreen, 8, CBlue, 8),
143− BGR24 = CHAN3(CBlue, 8, CGreen, 8, CRed, 8),
144134 RGBA32 = CHAN4(CRed, 8, CGreen, 8, CBlue, 8, CAlpha, 8),
145135 ARGB32 = CHAN4(CAlpha, 8, CRed, 8, CGreen, 8, CBlue, 8), /* stupid VGAs */
146− XRGB32 = CHAN4(CIgnore, 8, CRed, 8, CGreen, 8, CBlue, 8),
147− XBGR32 = CHAN4(CIgnore, 8, CBlue, 8, CGreen, 8, CRed, 8),
136+ XRGB32 = CHAN4(CIgnore, 8, CRed, 8, CGreen, 8, CBlue, 8),
137+ BGR24 = CHAN3(CBlue, 8, CGreen, 8, CRed, 8),
138+ ABGR32 = CHAN4(CAlpha, 8, CBlue, 8, CGreen, 8, CRed, 8),
139+ XBGR32 = CHAN4(CIgnore, 8, CBlue, 8, CGreen, 8, CRed, 8),
148140 };
149141
150142 extern char* chantostr(char*, ulong);
@@ -175,7 +167,7 @@ struct Screen · 24 unmodified lines
175167
176168 struct Display
177169 {
178− QLock qlock;
170+ QLock qlock;
179171 int locking; /*program is using lockdisplay */
180172 int dirno;
181173 int fd;
@@ -194,13 +186,13 @@ struct Display · 12 unmodified lines
194186 Image *transparent;
195187 Image *image;
196188 uchar *buf;
197− int bufsize;
189+ int bufsize;
198190 uchar *bufp;
199191 Font *defaultfont;
200192 Subfont *defaultsubfont;
201193 Image *windows;
202194 Image *screenimage;
203− int _isnewdisplay;
195+ int _isnewdisplay;
204196 };
205197
206198 struct Image
@@ -210,7 +202,7 @@ struct Image · 3 unmodified lines
210202 Rectangle r; /* rectangle in data area, local coords */
211203 Rectangle clipr; /* clipping region */
212204 int depth; /* number of bits per pixel */
213− ulong chan;
205+ ulong chan;
214206 int repl; /* flag: data replicates to tile clipr */
215207 Screen *screen; /* 0 if not a window */
216208 Image *next; /* next in list of windows */
@@ -397,6 +389,7 @@ extern int cmap2rgb(int); · 180 unmodified lines
397389 extern int cmap2rgba(int);
398390 extern void icossin(int, int*, int*);
399391 extern void icossin2(int, int, int*, int*);
392+extern int badrect(Rectangle);
400393
401394 /*
402395 * Graphics
@@ -480,7 +473,6 @@ extern Subfont* _getsubfont(Display*, char*); · 77 unmodified lines
480473 extern Subfont* getdefont(Display*);
481474 extern void lockdisplay(Display*);
482475 extern void unlockdisplay(Display*);
483−extern int drawlsetrefresh(ulong, int, void*, void*);
484476
485477 /*
486478 * Predefined
@@ -495,7 +487,7 @@ extern Rectangle ZR; · 8 unmodified lines
495487 */
496488 extern Display *display;
497489 extern Font *font;
498−/* extern Image *screen; */
490+// extern Image *screen;
499491 extern Screen *_screen;
500492 extern int _cursorfd;
501493 extern int _drawdebug; /* set to 1 to see errors from flushimage */
@@ -518,6 +510,6 @@ extern void _twiddlecompressed(uchar*, int); · 16 unmodified lines
518510 extern int _compblocksize(Rectangle, int);
519511
520512 /* XXX backwards helps; should go */
521−extern int log2[];
513+// extern int log2[]; /* was used by libmemlayer/line.c */
522514 extern ulong drawld2chan[];
523515 extern void drawsetdebug(int);
include/memdraw.h+4−34
@@ -1,8 +1,3 @@
1−#ifdef PLAN9
2−#pragma src "/sys/src/libmemdraw"
3−#pragma lib "libmemdraw.a"
4−#endif
5−
61 typedef struct Memimage Memimage;
72 typedef struct Memdata Memdata;
83 typedef struct Memsubfont Memsubfont;
@@ -54,8 +49,6 @@ struct Memimage · 45 unmodified lines
5449 int shift[NChan];
5550 int mask[NChan];
5651 int nbits[NChan];
57−
58− void *X;
5952 };
6053
6154 struct Memcmap
@@ -119,26 +112,20 @@ struct Memdrawparam · 57 unmodified lines
119112 */
120113
121114 extern Memimage* allocmemimage(Rectangle, ulong);
122−extern Memimage* _allocmemimage(Rectangle, ulong);
123−extern Memimage* allocmemimaged(Rectangle, ulong, Memdata*, void*);
115+extern Memimage* allocmemimaged(Rectangle, ulong, Memdata*);
124116 extern Memimage* readmemimage(int);
125117 extern Memimage* creadmemimage(int);
126118 extern int writememimage(int, Memimage*);
127119 extern void freememimage(Memimage*);
128−extern void _freememimage(Memimage*);
129−extern int _loadmemimage(Memimage*, Rectangle, uchar*, int);
130−extern int _cloadmemimage(Memimage*, Rectangle, uchar*, int);
131−extern int _unloadmemimage(Memimage*, Rectangle, uchar*, int);
132120 extern int loadmemimage(Memimage*, Rectangle, uchar*, int);
133121 extern int cloadmemimage(Memimage*, Rectangle, uchar*, int);
134122 extern int unloadmemimage(Memimage*, Rectangle, uchar*, int);
135123 extern ulong* wordaddr(Memimage*, Point);
136124 extern uchar* byteaddr(Memimage*, Point);
125+extern int drawclipnorepl(Memimage*, Rectangle*, Memimage*, Point*, Memimage*, Point*, Rectangle*, Rectangle*);
137126 extern int drawclip(Memimage*, Rectangle*, Memimage*, Point*, Memimage*, Point*, Rectangle*, Rectangle*);
138127 extern void memfillcolor(Memimage*, ulong);
139−extern void _memfillcolor(Memimage*, ulong);
140128 extern int memsetchan(Memimage*, ulong);
141−extern ulong _rgbatoimg(Memimage*, ulong);
142129
143130 /*
144131 * Graphics
@@ -148,8 +135,6 @@ extern void memline(Memimage*, Point, Point, int, int, int, Memimage*, Point, in · 3 unmodified lines
148135 extern void mempoly(Memimage*, Point*, int, int, int, int, Memimage*, Point, int);
149136 extern void memfillpoly(Memimage*, Point*, int, int, Memimage*, Point, int);
150137 extern void _memfillpolysc(Memimage*, Point*, int, int, Memimage*, Point, int, int, int, int);
151−extern Memdrawparam* _memimagedrawsetup(Memimage*, Rectangle, Memimage*, Point, Memimage*, Point, int);
152−extern void _memimagedraw(Memdrawparam*);
153138 extern void memimagedraw(Memimage*, Rectangle, Memimage*, Point, Memimage*, Point, int);
154139 extern int hwdraw(Memdrawparam*);
155140 extern void memimageline(Memimage*, Point, Point, int, int, int, Memimage*, Point, int);
@@ -160,8 +145,7 @@ extern void memarc(Memimage*, Point, int, int, int, Memimage*, Point, int, int, · 4 unmodified lines
160145 extern Rectangle memlinebbox(Point, Point, int, int, int);
161146 extern int memlineendsize(int);
162147 extern void _memmkcmap(void);
163−extern void _memimageinit(void);
164−extern void memimageinit(void);
148+extern int memimageinit(void);
165149
166150 /*
167151 * Subfont management
@@ -193,18 +177,4 @@ extern void rdb(void); · 25 unmodified lines
193177 extern int iprint(char*, ...);
194178 extern int drawdebug;
195179
196−/*
197− * doprint interface: numbconv bit strings
198− */
199−#ifdef VARARGCK
200−#pragma varargck argpos iprint 1
201−#pragma varargck type "llb" vlong
202−#pragma varargck type "llb" uvlong
203−#pragma varargck type "lb" long
204−#pragma varargck type "lb" ulong
205−#pragma varargck type "b" int
206−#pragma varargck type "b" uint
207−#endif
208−
209−extern ulong _pixelbits(Memimage*,Point);
210−extern ulong pixelbits(Memimage*, Point);
180+extern ulong pixelbits(Memimage*, Point);
kern/devdraw.c+3−4
@@ -921,19 +921,18 @@ initscreenimage(void) · 920 unmodified lines
921921 {
922922 int width, depth;
923923 ulong chan;
924− void *X;
925924 Rectangle r;
926925
927926 if(screenimage != nil)
928927 return 1;
929928
930929 screendata.base = nil;
931− screendata.bdata = attachscreen(&r, &chan, &depth, &width, &sdraw.softscreen, &X);
932− if(screendata.bdata == nil && X == nil)
930+ screendata.bdata = attachscreen(&r, &chan, &depth, &width, &sdraw.softscreen);
931+ if(screendata.bdata == nil)
933932 return 0;
934933 screendata.ref = 1;
935934
936− screenimage = allocmemimaged(r, chan, &screendata, X);
935+ screenimage = allocmemimaged(r, chan, &screendata);
937936 if(screenimage == nil){
938937 /* RSC: BUG: detach screen */
939938 return 0;
kern/devkbd.c+1−0
@@ -117,6 +117,7 @@ kbdwrite(Chan *c, void *va, long n, vlong off) · 116 unmodified lines
117117 USED(n);
118118 USED(off);
119119 error(Eperm);
120+ return -1; /* never reached */
120121 }
121122
122123 Dev kbddevtab = {
kern/screen.h+1−1
@@ -55,7 +55,7 @@ void setcursor(void); · 54 unmodified lines
5555 void mouseset(Point);
5656 void drawflushr(Rectangle);
5757 void flushmemscreen(Rectangle);
58−uchar *attachscreen(Rectangle*, ulong*, int*, int*, int*, void**);
58+uchar *attachscreen(Rectangle*, ulong*, int*, int*, int*);
5959
6060 void drawqlock(void);
6161 void drawqunlock(void);
libdraw/Makefile+2−0
@@ -5,10 +5,12 @@ LIB=libdraw.a · 4 unmodified lines
55 OFILES=\
66 alloc.$O\
77 arith.$O\
8+ badrect.$O\
89 bytesperline.$O\
910 chan.$O\
1011 defont.$O\
1112 drawrepl.$O\
13+ fmt.$O\
1214 icossin.$O\
1315 icossin2.$O\
1416 rectclip.$O\
libdraw/alloc.c+41−35
@@ -3,13 +3,18 @@ · 2 unmodified lines
33 #include <draw.h>
44
55 Image*
6−allocimage(Display *d, Rectangle r, ulong chan, int repl, ulong val)
6+allocimage(Display *d, Rectangle r, ulong chan, int repl, ulong col)
77 {
8− return _allocimage(nil, d, r, chan, repl, val, 0, 0);
8+ Image *i;
9+
10+ i = _allocimage(nil, d, r, chan, repl, col, 0, 0);
11+ if(i != nil)
12+ setmalloctag(i, getcallerpc(&d));
13+ return i;
914 }
1015
1116 Image*
12−_allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val, int screenid, int refresh)
17+_allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong col, int screenid, int refresh)
1318 {
1419 uchar *a;
1520 char *err;
@@ -18,9 +23,13 @@ _allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val, · 2 unmodified lines
1823 int id;
1924 int depth;
2025
21− err = 0;
22− i = 0;
26+ err = nil;
27+ i = nil;
2328
29+ if(badrect(r)){
30+ werrstr("bad rectangle");
31+ return nil;
32+ }
2433 if(chan == 0){
2534 werrstr("bad channel descriptor");
2635 return nil;
@@ -30,18 +39,18 @@ _allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val, · 3 unmodified lines
3039 if(depth == 0){
3140 err = "bad channel descriptor";
3241 Error:
33− if(err)
42+ if(err != nil)
3443 werrstr("allocimage: %s", err);
3544 else
3645 werrstr("allocimage: %r");
3746 free(i);
38− return 0;
47+ return nil;
3948 }
4049
4150 /* flush pending data so we don't get error allocating the image */
4251 flushimage(d, 0);
4352 a = bufimage(d, 1+4+4+1+4+1+4*4+4*4+4);
44− if(a == 0)
53+ if(a == nil)
4554 goto Error;
4655 d->imageid++;
4756 id = d->imageid;
@@ -64,17 +73,17 @@ _allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val, · 16 unmodified lines
6473 BPLONG(a+35, clipr.min.y);
6574 BPLONG(a+39, clipr.max.x);
6675 BPLONG(a+43, clipr.max.y);
67− BPLONG(a+47, val);
76+ BPLONG(a+47, col);
6877 if(flushimage(d, 0) < 0)
6978 goto Error;
7079
71− if(ai)
80+ if(ai != nil)
7281 i = ai;
7382 else{
7483 i = malloc(sizeof(Image));
7584 if(i == nil){
7685 a = bufimage(d, 1+4);
77− if(a){
86+ if(a != nil){
7887 a[0] = 'f';
7988 BPLONG(a+1, id);
8089 flushimage(d, 0);
@@ -89,8 +98,8 @@ _allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val, · 8 unmodified lines
8998 i->r = r;
9099 i->clipr = clipr;
91100 i->repl = repl;
92− i->screen = 0;
93− i->next = 0;
101+ i->screen = nil;
102+ i->next = nil;
94103 return i;
95104 }
96105
@@ -103,25 +112,24 @@ namedimage(Display *d, char *name) · 6 unmodified lines
103112 int id, n;
104113 ulong chan;
105114
106− err = 0;
107− i = 0;
115+ err = nil;
116+ i = nil;
108117
109118 n = strlen(name);
110119 if(n >= 256){
111120 err = "name too long";
112121 Error:
113− if(err)
122+ if(err != nil)
114123 werrstr("namedimage: %s", err);
115124 else
116125 werrstr("namedimage: %r");
117− if(i)
118− free(i);
119− return 0;
126+ free(i);
127+ return nil;
120128 }
121129 /* flush pending data so we don't get error allocating the image */
122130 flushimage(d, 0);
123131 a = bufimage(d, 1+4+1+n);
124− if(a == 0)
132+ if(a == nil)
125133 goto Error;
126134 d->imageid++;
127135 id = d->imageid;
@@ -140,7 +148,7 @@ namedimage(Display *d, char *name) · 12 unmodified lines
140148 if(i == nil){
141149 Error1:
142150 a = bufimage(d, 1+4);
143− if(a){
151+ if(a != nil){
144152 a[0] = 'f';
145153 BPLONG(a+1, id);
146154 flushimage(d, 0);
@@ -164,8 +172,8 @@ namedimage(Display *d, char *name) · 17 unmodified lines
164172 i->clipr.min.y = atoi(buf+9*12);
165173 i->clipr.max.x = atoi(buf+10*12);
166174 i->clipr.max.y = atoi(buf+11*12);
167− i->screen = 0;
168− i->next = 0;
175+ i->screen = nil;
176+ i->next = nil;
169177 return i;
170178 }
171179
@@ -177,7 +185,7 @@ nameimage(Image *i, char *name, int in) · 5 unmodified lines
177185
178186 n = strlen(name);
179187 a = bufimage(i->display, 1+4+1+1+n);
180− if(a == 0)
188+ if(a == nil)
181189 return 0;
182190 a[0] = 'N';
183191 BPLONG(a+1, i->id);
@@ -196,23 +204,16 @@ _freeimage1(Image *i) · 12 unmodified lines
196204 Display *d;
197205 Image *w;
198206
199− if(i == 0)
207+ if(i == nil || i->display == nil)
200208 return 0;
201− /* make sure no refresh events occur on this if we block in the write */
202209 d = i->display;
203− /* flush pending data so we don't get error deleting the image */
204210 flushimage(d, 0);
205− a = bufimage(d, 1+4);
206− if(a == 0)
207− return -1;
208− a[0] = 'f';
209− BPLONG(a+1, i->id);
210− if(i->screen){
211+ if(i->screen != nil){
211212 w = d->windows;
212213 if(w == i)
213214 d->windows = i->next;
214215 else
215− while(w){
216+ while(w != nil){
216217 if(w->next == i){
217218 w->next = i->next;
218219 break;
@@ -220,7 +221,12 @@ _freeimage1(Image *i) · 1 unmodified line
220221 w = w->next;
221222 }
222223 }
223− if(flushimage(d, i->screen!=0) < 0)
224+ a = bufimage(d, 1+4);
225+ if(a == nil)
226+ return -1;
227+ a[0] = 'f';
228+ BPLONG(a+1, i->id);
229+ if(flushimage(d, i->screen!=nil) < 0)
224230 return -1;
225231
226232 return 0;
libdraw/arith.c+6−21
@@ -159,15 +159,18 @@ combinerect(Rectangle *r1, Rectangle r2) · 158 unmodified lines
159159 r1->max.y = r2.max.y;
160160 }
161161
162−ulong
163−drawld2chan[] = {
162+ulong drawld2chan[] = {
164163 GREY1,
165164 GREY2,
166165 GREY4,
167166 CMAP8,
168167 };
169168
170−int log2[] = { -1, 0, 1, -1, 2, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, 4 /* BUG */, -1, -1, -1, -1, -1, -1, -1, 5 };
169+/*
170+ * was used by libmemlayer/line.c; made static, instead of deleting it,
171+ * to avoid updating many binaries on sources.
172+ */
173+static int log2[] = { -1, 0, 1, -1, 2, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, 4 /* BUG */, -1, -1, -1, -1, -1, -1, -1, 5 };
171174
172175 ulong
173176 setalpha(ulong color, uchar alpha)
@@ -186,21 +189,3 @@ setalpha(ulong color, uchar alpha) · 12 unmodified lines
186189
187190 Point ZP;
188191 Rectangle ZR;
189−int
190−Rfmt(Fmt *f)
191−{
192− Rectangle r;
193−
194− r = va_arg(f->args, Rectangle);
195− return fmtprint(f, "%P %P", r.min, r.max);
196−}
197−
198−int
199−Pfmt(Fmt *f)
200−{
201− Point p;
202−
203− p = va_arg(f->args, Point);
204− return fmtprint(f, "[%d %d]", p.x, p.y);
205−}
206−
libdraw/badrect.c+22−0
@@ -0,0 +1,22 @@
1+#include <u.h>
2+#include <libc.h>
3+#include <draw.h>
4+
5+/*
6+ * check for zero, negative size or insanely huge rectangle.
7+ */
8+int
9+badrect(Rectangle r)
10+{
11+ int x, y;
12+ uint z;
13+
14+ x = Dx(r);
15+ y = Dy(r);
16+ if(x > 0 && y > 0){
17+ z = x*y;
18+ if(z/x == y && z < 0x10000000)
19+ return 0;
20+ }
21+ return 1;
22+}
libdraw/chan.c+5−1
@@ -41,9 +41,10 @@ strtochan(char *s) · 40 unmodified lines
4141 {
4242 char *p, *q;
4343 ulong c;
44− int t, n;
44+ int t, n, d;
4545
4646 c = 0;
47+ d = 0;
4748 p=s;
4849 while(*p && xisspace(*p))
4950 p++;
@@ -55,9 +56,12 @@ strtochan(char *s) · 5 unmodified lines
5556 if(p[1] < '0' || p[1] > '9')
5657 return 0;
5758 n = p[1]-'0';
59+ d += n;
5860 c = (c<<8) | __DC(t, n);
5961 p += 2;
6062 }
63+ if(d==0 || (d>8 && d%8) || (d<8 && 8%d))
64+ return 0;
6165 return c;
6266 }
6367
libdraw/defont.c+358−372
@@ -3,384 +3,370 @@ · 2 unmodified lines
33 #include <draw.h>
44
55 /*
6− * lucm/latin1.9, in uncompressed form
6+ * vga/vga00, in uncompressed form
77 */
88 uchar
99 defontdata[] =
1010 {
1111 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x30,0x20,0x20,0x20,0x20,0x20,
1212 0x20,0x20,0x20,0x20,0x20,0x20,0x30,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
13−0x20,0x20,0x30,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x32,0x33,0x30,0x34,0x20,
14−0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x31,0x35,0x20,0x00,0x00,0x00,0x00,
15−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
16−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
17−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
18−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
19−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
20−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
21−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
22−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
23−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
24−0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
25−0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
26−0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
27−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
28−0x00,0x00,0x00,0x00,0x30,0x06,0x06,0x03,0x42,0x40,0x00,0x00,0x00,0x18,0x03,0x03,
29−0x02,0x43,0x00,0x60,0x60,0x48,0x00,0x0d,0x0c,0x01,0x81,0x80,0xd0,0x90,0x00,0x00,
30−0x18,0x01,0x81,0x81,0x40,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
31−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
32−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x7f,0x9c,0x1c,
33−0x0e,0x07,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x70,
34−0x38,0x1c,0x0e,0x04,0x81,0xc1,0xc0,0x70,0x00,0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,
35−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
36−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
37−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
38−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
39−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
40−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
41−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x80,0xc0,0x63,0xe3,
42−0xf1,0xf8,0xfe,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x7f,0xff,0xff,0x1f,0x8f,
43−0xc7,0xe3,0xf1,0xfb,0x7e,0x3e,0x3f,0x8f,0xff,0xe3,0xe3,0xff,0xff,0xff,0xff,0xff,
44−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
45−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
46−0x00,0x00,0x00,0x00,0x0c,0x18,0x09,0x05,0x82,0x40,0xc0,0x00,0x00,0x06,0x0c,0x04,
47−0x82,0x40,0xc1,0x80,0x90,0x48,0x00,0x16,0x03,0x06,0x02,0x41,0x60,0x90,0x00,0x00,
48−0x06,0x06,0x02,0x41,0x41,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
49−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
50−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x7f,0xa0,0x10,
51−0x08,0x04,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x48,
52−0x24,0x12,0x09,0x06,0x82,0x01,0x00,0x90,0x00,0x20,0x10,0x00,0x00,0x00,0x00,0x00,
53−0x00,0x00,0x04,0x80,0x00,0x40,0x00,0x00,0x38,0x06,0x18,0x00,0x00,0x00,0x00,0x00,
54−0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
55−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
56−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
57−0x00,0x00,0x07,0xc6,0x01,0xf0,0x00,0x00,0x0c,0x00,0x18,0x00,0x00,0x30,0x00,0x3c,
58−0x00,0x60,0x06,0x01,0x8c,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
59−0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xe0,0xc3,0xc0,0x01,0x54,0x9c,0xc0,0x5f,0xef,
60−0xf7,0xfb,0xfd,0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0x7f,0xff,0xff,0x6f,0xb7,
61−0xdb,0xed,0xf6,0xf9,0x7d,0xfe,0xff,0x6f,0xff,0xdf,0xef,0xff,0xff,0xff,0xff,0xff,
62−0xff,0x00,0x01,0x00,0x00,0x00,0x00,0x30,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x00,
63−0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
64−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x20,0x00,0x00,0x00,0x00,0x00,
65−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
66−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x30,0x06,0x06,0x06,0x82,0x80,0xc0,0x00,
67−0x00,0x18,0x03,0x03,0x02,0x41,0x80,0x30,0x30,0x24,0x76,0x0d,0x0c,0x00,0xc0,0xc0,
68−0xd0,0x50,0x00,0x00,0x18,0x01,0x81,0x81,0x40,0x30,0x00,0x28,0x0f,0x7f,0xbc,0x1c,
69−0x0e,0x07,0x03,0xc0,0x10,0x70,0x24,0x10,0x09,0x07,0x03,0x80,0xe0,0x70,0x90,0x48,
70−0x24,0x12,0x09,0x05,0x81,0x81,0xc0,0x80,0x70,0x18,0x1c,0x07,0x01,0xc1,0xc0,0x90,
71−0x00,0x0c,0x04,0x84,0x83,0xe1,0xc0,0xe0,0x38,0x0c,0x0c,0x02,0x00,0x00,0x00,0x00,
72−0x00,0x06,0x1c,0x06,0x0f,0x87,0xc0,0x63,0xf8,0x78,0xfe,0x3e,0x0e,0x00,0x00,0x00,
73−0x00,0x00,0x00,0x7c,0x1c,0x0c,0x1f,0x03,0xc7,0xc3,0xf1,0xf8,0x3c,0x63,0x3f,0x0f,
74−0x8c,0x66,0x06,0x19,0x84,0x78,0x7e,0x1e,0x1f,0x07,0xcf,0xf3,0x1b,0x0d,0x86,0x63,
75−0x61,0x9f,0xc6,0x06,0x00,0x30,0x00,0x00,0x10,0x00,0x18,0x00,0x00,0x30,0x00,0x60,
76−0x00,0x60,0x06,0x01,0x8c,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,
77−0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0xc0,0x60,0x00,0xaa,0xb6,0xc0,0x43,0xe3,
78−0xf1,0xf8,0xfc,0x3f,0xef,0x8f,0xdb,0xef,0xf6,0xf8,0xfb,0xff,0x1f,0x8f,0x6f,0xb7,
79−0xdb,0xed,0xf6,0xfa,0x7e,0x7e,0x3f,0x7f,0x8f,0xe7,0xe3,0xf8,0xfe,0x3e,0x3f,0x6f,
80−0x00,0x00,0x01,0x01,0xc8,0x0b,0x0c,0x30,0x7c,0x14,0x0f,0x0f,0x00,0x00,0x00,0x00,
81−0x78,0x00,0x1c,0x00,0x0f,0x07,0x81,0x80,0x00,0x7c,0x00,0x00,0x1c,0x0f,0x80,0x04,
82−0x42,0x23,0x90,0x00,0x18,0x0c,0x06,0x03,0x01,0x80,0xc0,0x3c,0x3c,0x3f,0x1f,0x8f,
83−0xc7,0xe7,0xe3,0xf1,0xf8,0xfc,0x7c,0x30,0x8f,0x07,0x83,0xc1,0xe0,0xf0,0x00,0x3d,
84−0x31,0x98,0xcc,0x66,0x36,0x19,0x80,0xcc,0x0c,0x18,0x09,0x0b,0x02,0x81,0x20,0x00,
85−0x00,0x06,0x0c,0x04,0x82,0x40,0x60,0xc0,0x48,0x24,0x18,0x16,0x03,0x03,0x01,0x21,
86−0x60,0x50,0x00,0x00,0x06,0x06,0x02,0x41,0x40,0xc1,0x80,0x28,0x87,0x7f,0x84,0x10,
87−0x08,0x04,0x02,0x40,0x38,0x48,0x24,0x10,0x09,0x04,0x04,0x81,0x00,0x80,0x90,0x48,
88−0x24,0x12,0x09,0x04,0x80,0x41,0x00,0x80,0x40,0x04,0x10,0x04,0x02,0x01,0x20,0x90,
89−0x00,0x0c,0x04,0x84,0x86,0x53,0x65,0xb0,0x08,0x18,0x06,0x0a,0x80,0x00,0x00,0x00,
90−0x00,0x0c,0x36,0x0e,0x19,0xcc,0xe0,0xe3,0xf8,0xcc,0xfe,0x63,0x1b,0x00,0x00,0x00,
91−0x00,0x00,0x00,0xc6,0x62,0x0c,0x19,0x86,0x66,0x63,0x01,0x80,0x66,0x63,0x0c,0x01,
92−0x8c,0xc6,0x06,0x19,0xc4,0xcc,0x63,0x33,0x19,0x8c,0x61,0x83,0x1b,0x0d,0x86,0x63,
93−0x61,0x80,0xc6,0x03,0x00,0x30,0x30,0x00,0x1c,0x00,0x18,0x00,0x00,0x30,0x00,0x60,
94−0x00,0x60,0x00,0x00,0x0c,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,
95−0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0xc0,0x60,0x01,0x54,0x86,0xc0,0x7b,0xef,
96−0xf7,0xfb,0xfd,0xbf,0xc7,0xb7,0xdb,0xef,0xf6,0xfb,0xfb,0x7e,0xff,0x7f,0x6f,0xb7,
97−0xdb,0xed,0xf6,0xfb,0x7f,0xbe,0xff,0x7f,0xbf,0xfb,0xef,0xfb,0xfd,0xfe,0xdf,0x6f,
98−0xff,0x00,0x07,0x83,0x24,0x13,0x0c,0x30,0xc6,0x00,0x10,0x81,0x80,0x00,0x00,0x00,
99−0x84,0x00,0x22,0x00,0x01,0x80,0xc0,0x00,0x00,0xf4,0x00,0x00,0x2c,0x18,0xc0,0x0c,
100−0x46,0x20,0x90,0x00,0x18,0x0c,0x06,0x03,0x01,0x80,0xc0,0x70,0x66,0x30,0x18,0x0c,
101−0x06,0x01,0x80,0xc0,0x60,0x30,0x66,0x38,0x99,0x8c,0xc6,0x63,0x31,0x98,0x00,0x66,
102−0x31,0x98,0xcc,0x66,0x36,0x19,0x80,0xcc,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,
103−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x00,0x00,0x00,0x00,0x00,
104−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0xff,0x7f,0xb8,0x1c,
105−0x0e,0x07,0x02,0x40,0x7c,0x70,0x3c,0x10,0x09,0x07,0x04,0x00,0xc0,0x60,0xe0,0x70,
106−0x38,0x1c,0x0e,0x04,0x83,0x81,0xc0,0x70,0x70,0x38,0x1c,0x07,0x02,0xc1,0xc0,0x90,
107−0x00,0x0c,0x00,0x04,0x86,0x43,0x69,0xb0,0x30,0x18,0x06,0x07,0x01,0x00,0x00,0x00,
108−0x00,0x0c,0x63,0x16,0x00,0xc0,0x61,0x62,0x01,0x80,0x06,0x63,0x31,0x80,0x00,0x00,
109−0x60,0x00,0xc0,0x06,0x43,0x16,0x19,0x8c,0x06,0x33,0x01,0x80,0xc0,0x63,0x0c,0x01,
110−0x8c,0x86,0x07,0x39,0xc5,0x86,0x63,0x61,0x99,0x8c,0x01,0x83,0x1b,0x0d,0xb6,0x63,
111−0x31,0x01,0x86,0x03,0x00,0x30,0x30,0x00,0x1c,0x3e,0x1b,0x03,0xc1,0xf0,0xf0,0x60,
112−0x3e,0x6e,0x3e,0x0f,0x8c,0x60,0xc5,0xb1,0xb8,0x38,0x6c,0x0f,0x8c,0xc7,0xc1,0x83,
113−0x19,0x8d,0x82,0x63,0x31,0x9f,0xc1,0x80,0xc0,0xc0,0x00,0xaa,0x86,0xc0,0x47,0xe3,
114−0xf1,0xf8,0xfd,0xbf,0x83,0x8f,0xc3,0xef,0xf6,0xf8,0xfc,0xff,0x3f,0x9f,0x1f,0x8f,
115−0xc7,0xe3,0xf1,0xfb,0x7c,0x7e,0x3f,0x8f,0x8f,0xc7,0xe3,0xf8,0xfd,0x3e,0x3f,0x6f,
116−0x00,0x0c,0x0d,0x43,0x03,0xe1,0x88,0x30,0xc0,0x00,0x27,0x41,0x80,0x00,0x00,0x01,
117−0x72,0x00,0x22,0x04,0x01,0x80,0xc0,0x03,0x18,0xf4,0x00,0x00,0x0c,0x18,0xc0,0x04,
118−0x82,0x43,0x20,0x18,0x2c,0x16,0x0b,0x05,0x82,0xc1,0x60,0xb0,0xc0,0x30,0x18,0x0c,
119−0x06,0x01,0x80,0xc0,0x60,0x30,0x63,0x38,0xb0,0xd8,0x6c,0x36,0x1b,0x0c,0x00,0xc7,
120−0x31,0x98,0xcc,0x66,0x33,0x11,0xf8,0xc8,0x7c,0x3e,0x1f,0x0f,0x87,0xc3,0xe1,0xd8,
121−0x3c,0x1e,0x0f,0x07,0x83,0xc7,0xc3,0xe1,0xf0,0xf8,0x06,0x37,0x07,0x03,0x81,0xc0,
122−0xe0,0x70,0x10,0x1d,0x31,0x98,0xcc,0x66,0x33,0x19,0xb0,0xc6,0x8f,0x7f,0x87,0x03,
123−0x81,0x80,0x90,0x30,0x6c,0x48,0x24,0x10,0x06,0x04,0x04,0x80,0x20,0x10,0x10,0x0e,
124−0x07,0x03,0x81,0xc0,0x60,0x88,0x38,0x0c,0x40,0x09,0x03,0x84,0x02,0x41,0x40,0x90,
125−0x00,0x0c,0x00,0x1f,0xe7,0x41,0xd1,0xa0,0x00,0x30,0x03,0x0a,0x81,0x00,0x00,0x00,
126−0x00,0x18,0x63,0x06,0x00,0xc0,0xc2,0x62,0x01,0xb0,0x0c,0x72,0x31,0x86,0x03,0x00,
127−0xc0,0x00,0x60,0x06,0x8f,0x16,0x19,0x0c,0x06,0x33,0x01,0x80,0xc0,0x63,0x0c,0x01,
128−0x8d,0x06,0x07,0x39,0x65,0x86,0x63,0x61,0x99,0x0e,0x01,0x83,0x19,0x89,0xb6,0x32,
129−0x33,0x03,0x06,0x01,0x80,0x30,0x78,0x00,0x00,0x03,0x1d,0x86,0x23,0x31,0x99,0xfc,
130−0x66,0x77,0x06,0x01,0x8c,0x40,0xc6,0xd9,0xdc,0x6c,0x76,0x19,0x8d,0xcc,0x27,0xf3,
131−0x19,0x8d,0x82,0x63,0x31,0x80,0xc0,0x80,0xc0,0x80,0x01,0x54,0x8c,0xc0,0x78,0xfc,
132−0x7e,0x7f,0x6f,0xcf,0x93,0xb7,0xdb,0xef,0xf9,0xfb,0xff,0xff,0xdf,0xef,0xef,0xf1,
133−0xf8,0xfc,0x7e,0x3f,0x9f,0x77,0xc7,0xf3,0xbf,0xf6,0xfc,0x7b,0xfd,0xbe,0xbf,0x6f,
134−0xff,0x0c,0x19,0x03,0x03,0x61,0x98,0x30,0x78,0x00,0x28,0x4f,0x83,0x30,0x00,0x01,
135−0x4a,0x00,0x1c,0x04,0x03,0x03,0x80,0x03,0x18,0xf4,0x00,0x00,0x0c,0x18,0xd9,0x84,
136−0x82,0x40,0xa0,0x18,0x2c,0x16,0x0b,0x05,0x82,0xc1,0x60,0xb0,0xc0,0x30,0x18,0x0c,
137−0x06,0x01,0x80,0xc0,0x60,0x30,0x63,0x2c,0xb0,0xd8,0x6c,0x36,0x1b,0x0c,0x64,0xcb,
138−0x31,0x98,0xcc,0x66,0x33,0x31,0x8c,0xd8,0x06,0x03,0x01,0x80,0xc0,0x60,0x30,0x6c,
139−0x62,0x33,0x19,0x8c,0xc6,0x60,0xc0,0x60,0x30,0x18,0x1e,0x3b,0x8d,0x86,0xc3,0x61,
140−0xb0,0xd8,0x10,0x36,0x31,0x98,0xcc,0x66,0x33,0x19,0xd8,0xc6,0x0f,0x7f,0x82,0x01,
141−0x02,0x40,0xd0,0x40,0x6c,0x70,0x24,0x1c,0x06,0x04,0x03,0x01,0xc0,0xe0,0x10,0x12,
142−0x09,0x04,0x82,0x40,0x90,0x50,0x10,0x12,0x70,0x09,0x04,0x04,0x01,0xc1,0x20,0x60,
143−0x00,0x0c,0x00,0x04,0x83,0xc0,0x20,0xcc,0x00,0x30,0x03,0x02,0x01,0x00,0x00,0x00,
144−0x00,0x18,0x63,0x06,0x01,0x83,0x84,0x63,0xf1,0xd8,0x18,0x3c,0x31,0x86,0x03,0x01,
145−0x83,0xf8,0x30,0x1c,0x9b,0x33,0x1e,0x0c,0x06,0x33,0xe1,0x80,0xc0,0x7f,0x0c,0x01,
146−0x8f,0x06,0x07,0x79,0x65,0x86,0x66,0x61,0x9e,0x07,0x81,0x83,0x19,0x89,0xb6,0x1c,
147−0x1a,0x03,0x06,0x01,0x80,0x30,0x48,0x00,0x00,0x03,0x18,0xcc,0x06,0x33,0x18,0x60,
148−0xc6,0x63,0x06,0x01,0x8c,0x80,0xc6,0xd9,0x8c,0xc6,0x63,0x31,0x8e,0x4c,0x01,0x83,
149−0x19,0x8d,0x92,0x32,0x31,0x81,0x87,0x00,0xc0,0x70,0xe4,0xaa,0x98,0xc0,0x7d,0xfe,
150−0xfd,0xbf,0x2f,0xbf,0x93,0x8f,0xdb,0xe3,0xf9,0xfb,0xff,0x1e,0x3f,0x1f,0xef,0xed,
151−0xf6,0xfb,0x7d,0xbf,0x6f,0xaf,0xef,0xed,0x8f,0xf6,0xfb,0xfb,0xfe,0x3e,0xdf,0x9f,
152−0x00,0x00,0x19,0x0f,0xc6,0x30,0xd0,0x00,0xcc,0x00,0x28,0x59,0x86,0x67,0xf0,0x01,
153−0x72,0x00,0x00,0x3f,0x86,0x00,0xc0,0x03,0x18,0xf4,0x00,0x00,0x0c,0x18,0xcc,0xc5,
154−0x32,0x83,0x4c,0x00,0x66,0x33,0x19,0x8c,0xc6,0x63,0x31,0xbc,0xc0,0x3e,0x1f,0x0f,
155−0x87,0xc1,0x80,0xc0,0x60,0x30,0xfb,0x2c,0xb0,0xd8,0x6c,0x36,0x1b,0x0c,0x38,0xcb,
156−0x31,0x98,0xcc,0x66,0x31,0xa1,0x8c,0xcc,0x06,0x03,0x01,0x80,0xc0,0x60,0x30,0x6c,
157−0xc0,0x63,0x31,0x98,0xcc,0x60,0xc0,0x60,0x30,0x18,0x37,0x31,0x98,0xcc,0x66,0x33,
158−0x19,0x8c,0x00,0x67,0x31,0x98,0xcc,0x66,0x33,0x19,0x8c,0xc6,0x1f,0x7f,0x82,0x01,
159−0x02,0x40,0xb0,0x40,0x6c,0x07,0x03,0x83,0x80,0xe0,0xe0,0x00,0x18,0x0e,0x10,0x10,
160−0x08,0x04,0x02,0x00,0xf0,0x20,0x10,0x1e,0x08,0x89,0x03,0x00,0xe0,0x38,0x1c,0x0e,
161−0x00,0x0c,0x00,0x04,0x81,0xe0,0x41,0x6c,0x00,0x30,0x03,0x00,0x0f,0xe0,0x03,0xf8,
162−0x00,0x30,0x63,0x06,0x03,0x00,0xc7,0xf0,0x39,0x8c,0x30,0x3e,0x1b,0x80,0x00,0x03,
163−0x00,0x00,0x18,0x30,0x9b,0x23,0x19,0x0c,0x06,0x33,0x01,0xf8,0xc6,0x63,0x0c,0x01,
164−0x8d,0x86,0x05,0xd9,0x35,0x86,0x7c,0x61,0x9b,0x01,0xc1,0x83,0x19,0x99,0xb4,0x1c,
165−0x0c,0x06,0x06,0x00,0xc0,0x30,0xcc,0x00,0x00,0x3f,0x18,0xcc,0x06,0x33,0xf8,0x60,
166−0xc6,0x63,0x06,0x01,0x8f,0x00,0xc6,0xd9,0x8c,0xc6,0x63,0x31,0x8c,0x0f,0x81,0x83,
167−0x18,0xd9,0xba,0x1c,0x1b,0x03,0x00,0x80,0xc0,0x81,0x75,0x54,0x98,0xc0,0x7d,0xfe,
168−0xfd,0xbf,0x4f,0xbf,0x93,0xf8,0xfc,0x7c,0x7f,0x1f,0x1f,0x6f,0xe7,0xf1,0xef,0xef,
169−0xf7,0xfb,0xfd,0xff,0x0f,0xdf,0xef,0xe1,0xf7,0x76,0xfc,0xff,0x1f,0xc7,0xe3,0xf1,
170−0xff,0x08,0x19,0x03,0x06,0x31,0xf8,0x00,0xc6,0x00,0x28,0x5b,0x8c,0xc0,0x11,0xf1,
171−0x4a,0x00,0x00,0x04,0x0c,0x00,0xc0,0x03,0x18,0x74,0x38,0x00,0x0c,0x18,0xc6,0x65,
172−0x52,0xb8,0x54,0x18,0x46,0x23,0x11,0x88,0xc4,0x62,0x31,0x30,0xc0,0x30,0x18,0x0c,
173−0x06,0x01,0x80,0xc0,0x60,0x30,0x63,0x26,0xb0,0xd8,0x6c,0x36,0x1b,0x0c,0x10,0xd3,
174−0x31,0x98,0xcc,0x66,0x30,0xc1,0x8c,0xc6,0x7e,0x3f,0x1f,0x8f,0xc7,0xe3,0xf1,0xfc,
175−0xc0,0x7f,0x3f,0x9f,0xcf,0xe0,0xc0,0x60,0x30,0x18,0x63,0x31,0x98,0xcc,0x66,0x33,
176−0x19,0x8c,0xfe,0x6b,0x31,0x98,0xcc,0x66,0x31,0xb1,0x8c,0x6c,0x0e,0x7f,0x82,0x01,
177−0x01,0x80,0x90,0x30,0xc6,0x08,0x01,0x02,0x00,0x40,0x80,0xe0,0x24,0x04,0x1c,0x10,
178−0x08,0x04,0x02,0x00,0x90,0x20,0x10,0x12,0x0d,0x86,0x00,0x81,0x00,0x40,0x20,0x10,
179−0x00,0x04,0x00,0x1f,0xe1,0x70,0xbb,0x28,0x00,0x30,0x03,0x00,0x01,0x00,0x00,0x00,
180−0x00,0x30,0x63,0x06,0x06,0x00,0x67,0xf0,0x19,0x8c,0x30,0x67,0x0d,0x80,0x00,0x01,
181−0x83,0xf8,0x30,0x30,0x9b,0x7f,0x19,0x8c,0x06,0x33,0x01,0x80,0xc6,0x63,0x0c,0x01,
182−0x8c,0xc6,0x05,0xd9,0x35,0x86,0x60,0x61,0x99,0x80,0xe1,0x83,0x18,0xd0,0xdc,0x26,
183−0x0c,0x0c,0x06,0x00,0xc0,0x30,0x84,0x00,0x00,0x63,0x18,0xcc,0x06,0x33,0x00,0x60,
184−0xc6,0x63,0x06,0x01,0x8d,0x80,0xc6,0xd9,0x8c,0xc6,0x63,0x31,0x8c,0x03,0xe1,0x83,
185−0x18,0xd9,0xba,0x1c,0x1b,0x06,0x01,0x80,0xc0,0xc1,0x38,0xaa,0x80,0xc0,0x7d,0xfe,
186−0xfe,0x7f,0x6f,0xcf,0x39,0xf7,0xfe,0xfd,0xff,0xbf,0x7f,0x0f,0xdb,0xfb,0xe3,0xef,
187−0xf7,0xfb,0xfd,0xff,0x6f,0xdf,0xef,0xed,0xf2,0x79,0xff,0x7e,0xff,0xbf,0xdf,0xef,
188−0x00,0x0c,0x19,0x03,0x03,0x60,0x60,0x30,0x66,0x00,0x28,0x4d,0xc6,0x60,0x10,0x00,
189−0x84,0x00,0x00,0x04,0x0f,0x87,0x80,0x03,0x18,0x14,0x38,0x00,0x3f,0x0f,0x8c,0xc2,
190−0x90,0x84,0xa4,0x18,0xfe,0x7f,0x3f,0x9f,0xcf,0xe7,0xf1,0xf0,0xc0,0x30,0x18,0x0c,
191−0x06,0x01,0x80,0xc0,0x60,0x30,0x63,0x26,0xb0,0xd8,0x6c,0x36,0x1b,0x0c,0x38,0xd3,
192−0x31,0x98,0xcc,0x66,0x30,0xc1,0x98,0xc6,0xc6,0x63,0x31,0x98,0xcc,0x66,0x33,0x60,
193−0xc0,0x60,0x30,0x18,0x0c,0x00,0xc0,0x60,0x30,0x18,0x63,0x31,0x98,0xcc,0x66,0x33,
194−0x19,0x8c,0x00,0x6b,0x31,0x98,0xcc,0x66,0x31,0xb1,0x8c,0x6c,0x1c,0x7f,0x81,0x20,
195−0x90,0x38,0x18,0x0b,0x83,0x06,0x01,0x03,0x80,0x40,0xe0,0x90,0x24,0x04,0x03,0x8e,
196−0x86,0xc3,0x61,0x90,0x24,0x12,0x0e,0x04,0x8a,0x81,0xc7,0x70,0xc0,0x30,0x18,0x0c,
197−0x00,0x00,0x00,0x04,0x81,0x31,0x6f,0x30,0x00,0x18,0x06,0x00,0x01,0x00,0x00,0x00,
198−0x00,0x60,0x63,0x06,0x0c,0x00,0x60,0x60,0x19,0x8c,0x60,0x63,0x01,0x80,0x00,0x00,
199−0xc0,0x00,0x60,0x00,0x4d,0xe1,0x99,0x8c,0x06,0x33,0x01,0x80,0xc6,0x63,0x0c,0x01,
200−0x8c,0xc6,0x04,0x99,0x1d,0x86,0x60,0x61,0x99,0x80,0x61,0x83,0x18,0xd0,0xdc,0x63,
201−0x0c,0x0c,0x06,0x00,0x60,0x30,0x84,0x00,0x00,0x63,0x18,0xcc,0x06,0x33,0x00,0x60,
202−0x6e,0x63,0x06,0x01,0x8c,0xc0,0xc6,0xd9,0x8c,0xc6,0x63,0x31,0x8c,0x00,0x61,0x83,
203−0x18,0xd0,0xcc,0x26,0x0e,0x0c,0x03,0x00,0xc0,0x60,0x01,0x54,0x98,0xc0,0x7e,0xdf,
204−0x6f,0xc7,0xe7,0xf4,0x7c,0xf9,0xfe,0xfc,0x7f,0xbf,0x1f,0x5f,0xdb,0xfb,0xfc,0x71,
205−0x79,0x3c,0x9e,0x6f,0xdb,0xed,0xf1,0xfb,0x75,0x7e,0x38,0x8f,0x3f,0xcf,0xe7,0xf3,
206−0xff,0x0c,0x0d,0x03,0x03,0xe1,0xf8,0x30,0x3c,0x00,0x27,0x40,0x03,0x30,0x00,0x00,
207−0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x18,0x14,0x00,0x00,0x00,0x00,0x19,0x82,
208−0xf8,0x98,0xbe,0x70,0xc3,0x61,0xb0,0xd8,0x6c,0x36,0x1b,0x30,0xc0,0x30,0x18,0x0c,
209−0x06,0x01,0x80,0xc0,0x60,0x30,0x63,0x23,0xb0,0xd8,0x6c,0x36,0x1b,0x0c,0x4c,0xe3,
210−0x31,0x98,0xcc,0x66,0x30,0xc1,0xf0,0xc6,0xc6,0x63,0x31,0x98,0xcc,0x66,0x33,0x60,
211−0xc0,0x60,0x30,0x18,0x0c,0x00,0xc0,0x60,0x30,0x18,0x63,0x31,0x98,0xcc,0x66,0x33,
212−0x19,0x8c,0x10,0x73,0x31,0x98,0xcc,0x66,0x30,0xe1,0x8c,0x38,0x1c,0x7f,0x80,0xa0,
213−0x50,0x10,0x24,0x0d,0xff,0x01,0x01,0x02,0x00,0x40,0x80,0xf0,0x24,0x04,0x02,0x01,
214−0x81,0x20,0x10,0x30,0x28,0x1a,0x09,0x06,0x8a,0x81,0x20,0x90,0x20,0x08,0x04,0x02,
215−0x00,0x0c,0x00,0x04,0x85,0x32,0x6f,0xb8,0x00,0x18,0x06,0x00,0x01,0x01,0xc0,0x00,
216−0x70,0x60,0x36,0x06,0x1f,0xcc,0xe0,0x63,0x30,0xd8,0x60,0x63,0x33,0x06,0x03,0x00,
217−0x60,0x00,0xc0,0x30,0x60,0x61,0x99,0x86,0x66,0x63,0x01,0x80,0x66,0x63,0x0c,0x03,
218−0x0c,0x66,0x04,0x19,0x1c,0xcc,0x60,0x33,0x18,0xcc,0x61,0x81,0xb0,0x60,0xcc,0x63,
219−0x0c,0x18,0x06,0x00,0x60,0x30,0x00,0x00,0x00,0x67,0x19,0x86,0x23,0x71,0x88,0x60,
220−0x36,0x63,0x06,0x01,0x8c,0x60,0xc6,0xd9,0x8c,0x6c,0x66,0x1b,0x8c,0x08,0x61,0x83,
221−0xb8,0x70,0xcc,0x63,0x0c,0x18,0x03,0x00,0xc0,0x60,0x00,0xaa,0x98,0xc0,0x7f,0x5f,
222−0xaf,0xef,0xdb,0xf2,0x00,0xfe,0xfe,0xfd,0xff,0xbf,0x7f,0x6f,0xdb,0xfb,0xfd,0xfe,
223−0x7e,0xdf,0xef,0xcf,0xd7,0xe5,0xf6,0xf9,0x75,0x7e,0xdf,0x6f,0xdf,0xf7,0xfb,0xfd,
224−0x00,0x0c,0x07,0xc6,0x04,0x10,0x60,0x30,0x06,0x00,0x10,0x80,0x00,0x00,0x00,0x00,
225−0x00,0x00,0x00,0x3f,0x80,0x00,0x00,0x03,0xb8,0x14,0x00,0x00,0x00,0x00,0x00,0x04,
226−0x11,0x21,0x04,0xc0,0xc3,0x61,0xb0,0xd8,0x6c,0x36,0x1b,0x30,0x66,0x30,0x18,0x0c,
227−0x06,0x01,0x80,0xc0,0x60,0x30,0x66,0x23,0x99,0x8c,0xc6,0x63,0x31,0x98,0x00,0x66,
228−0x1b,0x0d,0x86,0xc3,0x60,0xc1,0x80,0xc6,0xce,0x67,0x33,0x99,0xcc,0xe6,0x73,0x74,
229−0x62,0x31,0x18,0x8c,0x46,0x20,0xc0,0x60,0x30,0x18,0x36,0x31,0x8d,0x86,0xc3,0x61,
230−0xb0,0xd8,0x10,0x36,0x3b,0x9d,0xce,0xe7,0x70,0xc1,0x98,0x30,0x00,0x7f,0x80,0xc0,
231−0x60,0x10,0x24,0x0c,0x38,0x0e,0x01,0x02,0x00,0x40,0x80,0xa0,0x18,0x0e,0x03,0x00,
232−0x80,0x40,0x60,0x50,0x30,0x16,0x0e,0x05,0x88,0x81,0xc0,0x81,0xc0,0x70,0x38,0x1c,
233−0x00,0x0c,0x00,0x04,0x83,0xe0,0x39,0xcc,0x00,0x0c,0x0c,0x00,0x00,0x01,0xc0,0x00,
234−0x70,0xc0,0x1c,0x06,0x1f,0xc7,0xc0,0x61,0xe0,0x70,0x60,0x3e,0x1e,0x06,0x03,0x00,
235−0x00,0x00,0x00,0x30,0x1e,0x61,0x9f,0x03,0xc7,0xc3,0xf1,0x80,0x3e,0x63,0x3f,0x1e,
236−0x0c,0x67,0xe4,0x19,0x0c,0x78,0x60,0x1e,0x18,0xc7,0xc1,0x80,0xe0,0x60,0xcc,0x63,
237−0x0c,0x1f,0xc6,0x00,0x30,0x30,0x00,0x00,0x00,0x3b,0x9f,0x03,0xc1,0xb0,0xf0,0x60,
238−0x06,0x63,0x06,0x01,0x8c,0x70,0xc6,0xd9,0x8c,0x38,0x7c,0x0d,0x8c,0x07,0xc0,0xf1,
239−0xd8,0x60,0xcc,0x63,0x0c,0x1f,0xc3,0x00,0xc0,0x60,0x01,0x54,0x80,0xc0,0x7f,0x3f,
240−0x9f,0xef,0xdb,0xf3,0xc7,0xf1,0xfe,0xfd,0xff,0xbf,0x7f,0xff,0xe7,0xf1,0xfc,0xff,
241−0x7f,0xbf,0x9f,0xaf,0xcf,0xe9,0xf1,0xfa,0x77,0x7e,0x3f,0x7e,0x3f,0x8f,0xc7,0xe3,
242−0xff,0x0c,0x01,0x0f,0xe8,0x08,0x60,0x30,0xc6,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,
243−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xd8,0x14,0x00,0x00,0x00,0x00,0x00,0x04,
244−0x11,0x3d,0x04,0xc0,0xc3,0x61,0xb0,0xd8,0x6c,0x36,0x1b,0x3c,0x3c,0x3f,0x1f,0x8f,
245−0xc7,0xe7,0xe3,0xf1,0xf8,0xfc,0x7c,0x21,0x8f,0x07,0x83,0xc1,0xe0,0xf0,0x00,0xbc,
246−0x0e,0x07,0x03,0x81,0xc0,0xc1,0x80,0xcc,0x77,0x3b,0x9d,0xce,0xe7,0x73,0xb9,0x98,
247−0x3c,0x1e,0x0f,0x07,0x83,0xc0,0xc0,0x60,0x30,0x18,0x1c,0x31,0x87,0x03,0x81,0xc0,
248−0xe0,0x70,0x00,0x5c,0x1d,0x8e,0xc7,0x63,0xb0,0xc1,0xf0,0x30,0x00,0x7f,0x81,0x40,
249−0xa0,0x10,0x28,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0x00,0x02,0x00,
250−0x80,0x80,0x10,0xf8,0x28,0x12,0x09,0x04,0x80,0x01,0x20,0x80,0x00,0x00,0x00,0x00,
251−0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x06,0x18,0x00,0x00,0x00,0x40,0x00,
252−0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
253−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
254−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
255−0x00,0x00,0x07,0xc0,0x31,0xf0,0x01,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
256−0xcc,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x60,0x01,0x80,0x00,0x00,0x00,
257−0x00,0x00,0x00,0x00,0x18,0x00,0x01,0xe0,0xc3,0xc0,0x00,0x00,0xff,0xc0,0x7e,0xbf,
258−0x5f,0xef,0xd7,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0xff,
259−0x7f,0x7f,0xef,0x07,0xd7,0xed,0xf6,0xfb,0x7f,0xfe,0xdf,0x7f,0xff,0xff,0xff,0xff,
260−0x00,0x0c,0x01,0x00,0x00,0x00,0x00,0x30,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
261−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x14,0x00,0x08,0x00,0x00,0x00,0x00,
262−0x00,0x00,0x00,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
263−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
264−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
265−0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
266−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x81,0x80,0x60,0x00,0x7f,0x81,0x20,
267−0x90,0x10,0x1c,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,
268−0x81,0xe0,0x60,0x10,0x24,0x12,0x0e,0x04,0x80,0x01,0xc0,0x70,0x00,0x00,0x00,0x00,
269−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,
270−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,
271−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
272−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
273−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
274−0x78,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x01,0x80,0x00,0x00,0x00,
275−0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0xfe,0xdf,
276−0x6f,0xef,0xe3,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x7f,
277−0x7e,0x1f,0x9f,0xef,0xdb,0xed,0xf1,0xfb,0x7f,0xfe,0x3f,0x8f,0xff,0xff,0xff,0xff,
278−0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
279−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,
280−0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
281−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
282−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
283−0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
284−0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x81,0x80,0x60,0x20,0x20,0x20,0x20,
285−0x20,0x20,0x20,0x20,0x32,0x35,0x36,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
286−0x20,0x31,0x35,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x31,0x33,0x20,
287−0x00,0x00,0x01,0x0c,0x00,0x09,0x09,0x00,0x01,0x0f,0x00,0x09,0x12,0x00,0x01,0x0f,
288−0x00,0x09,0x1b,0x00,0x01,0x0f,0x00,0x09,0x24,0x00,0x01,0x0f,0x00,0x09,0x2d,0x00,
289−0x01,0x0f,0x00,0x09,0x36,0x00,0x01,0x0f,0x00,0x09,0x3f,0x00,0x03,0x0d,0x00,0x09,
290−0x48,0x00,0x03,0x0d,0x00,0x09,0x51,0x00,0x03,0x0d,0x00,0x09,0x5a,0x00,0x03,0x0d,
291−0x00,0x09,0x63,0x00,0x03,0x0d,0x00,0x09,0x6c,0x00,0x03,0x0d,0x00,0x09,0x75,0x00,
292−0x03,0x0e,0x00,0x09,0x7e,0x00,0x03,0x0d,0x00,0x09,0x87,0x00,0x03,0x0d,0x00,0x09,
293−0x90,0x00,0x01,0x0f,0x00,0x09,0x99,0x00,0x01,0x0f,0x00,0x09,0xa2,0x00,0x01,0x0f,
294−0x00,0x09,0xab,0x00,0x01,0x0f,0x00,0x09,0xb4,0x00,0x01,0x0f,0x00,0x09,0xbd,0x00,
295−0x01,0x0f,0x00,0x09,0xc6,0x00,0x01,0x0f,0x00,0x09,0xcf,0x00,0x01,0x0f,0x00,0x09,
296−0xd8,0x00,0x01,0x0f,0x00,0x09,0xe1,0x00,0x03,0x0d,0x00,0x09,0xea,0x00,0x01,0x0f,
297−0x00,0x09,0xf3,0x00,0x01,0x0f,0x00,0x09,0xfc,0x00,0x03,0x0d,0x00,0x09,0x05,0x01,
298−0x03,0x0d,0x00,0x09,0x0e,0x01,0x03,0x0d,0x00,0x09,0x17,0x01,0x03,0x0d,0x00,0x09,
299−0x20,0x01,0x00,0x00,0x00,0x09,0x29,0x01,0x03,0x0d,0x00,0x09,0x32,0x01,0x02,0x05,
300−0x00,0x09,0x3b,0x01,0x03,0x0d,0x00,0x09,0x44,0x01,0x02,0x0e,0x00,0x09,0x4d,0x01,
301−0x03,0x0d,0x00,0x09,0x56,0x01,0x03,0x0d,0x00,0x09,0x5f,0x01,0x02,0x06,0x00,0x09,
302−0x68,0x01,0x02,0x0e,0x00,0x09,0x71,0x01,0x02,0x0e,0x00,0x09,0x7a,0x01,0x03,0x08,
303−0x00,0x09,0x83,0x01,0x05,0x0c,0x00,0x09,0x8c,0x01,0x0b,0x0f,0x00,0x09,0x95,0x01,
304−0x08,0x09,0x00,0x09,0x9e,0x01,0x0b,0x0d,0x00,0x09,0xa7,0x01,0x02,0x0e,0x00,0x09,
305−0xb0,0x01,0x03,0x0d,0x00,0x09,0xb9,0x01,0x03,0x0d,0x00,0x09,0xc2,0x01,0x03,0x0d,
306−0x00,0x09,0xcb,0x01,0x03,0x0d,0x00,0x09,0xd4,0x01,0x03,0x0d,0x00,0x09,0xdd,0x01,
307−0x03,0x0d,0x00,0x09,0xe6,0x01,0x03,0x0d,0x00,0x09,0xef,0x01,0x03,0x0d,0x00,0x09,
308−0xf8,0x01,0x03,0x0d,0x00,0x09,0x01,0x02,0x03,0x0d,0x00,0x09,0x0a,0x02,0x06,0x0d,
309−0x00,0x09,0x13,0x02,0x06,0x0f,0x00,0x09,0x1c,0x02,0x05,0x0c,0x00,0x09,0x25,0x02,
310−0x07,0x0a,0x00,0x09,0x2e,0x02,0x05,0x0c,0x00,0x09,0x37,0x02,0x03,0x0d,0x00,0x09,
311−0x40,0x02,0x03,0x0d,0x00,0x09,0x49,0x02,0x03,0x0d,0x00,0x09,0x52,0x02,0x03,0x0d,
312−0x00,0x09,0x5b,0x02,0x03,0x0d,0x00,0x09,0x64,0x02,0x03,0x0d,0x00,0x09,0x6d,0x02,
313−0x03,0x0d,0x00,0x09,0x76,0x02,0x03,0x0d,0x00,0x09,0x7f,0x02,0x03,0x0d,0x00,0x09,
314−0x88,0x02,0x03,0x0d,0x00,0x09,0x91,0x02,0x03,0x0d,0x00,0x09,0x9a,0x02,0x03,0x0d,
315−0x00,0x09,0xa3,0x02,0x03,0x0d,0x00,0x09,0xac,0x02,0x03,0x0d,0x00,0x09,0xb5,0x02,
316−0x03,0x0d,0x00,0x09,0xbe,0x02,0x03,0x0d,0x00,0x09,0xc7,0x02,0x03,0x0d,0x00,0x09,
317−0xd0,0x02,0x03,0x0d,0x00,0x09,0xd9,0x02,0x03,0x0f,0x00,0x09,0xe2,0x02,0x03,0x0d,
318−0x00,0x09,0xeb,0x02,0x03,0x0d,0x00,0x09,0xf4,0x02,0x03,0x0d,0x00,0x09,0xfd,0x02,
319−0x03,0x0d,0x00,0x09,0x06,0x03,0x03,0x0d,0x00,0x09,0x0f,0x03,0x03,0x0d,0x00,0x09,
320−0x18,0x03,0x03,0x0d,0x00,0x09,0x21,0x03,0x03,0x0d,0x00,0x09,0x2a,0x03,0x03,0x0d,
321−0x00,0x09,0x33,0x03,0x02,0x0e,0x00,0x09,0x3c,0x03,0x02,0x0e,0x00,0x09,0x45,0x03,
322−0x02,0x0e,0x00,0x09,0x4e,0x03,0x04,0x0b,0x00,0x09,0x57,0x03,0x0d,0x0e,0x00,0x09,
323−0x60,0x03,0x02,0x06,0x00,0x09,0x69,0x03,0x05,0x0d,0x00,0x09,0x72,0x03,0x02,0x0d,
324−0x00,0x09,0x7b,0x03,0x05,0x0d,0x00,0x09,0x84,0x03,0x02,0x0d,0x00,0x09,0x8d,0x03,
325−0x05,0x0d,0x00,0x09,0x96,0x03,0x02,0x0d,0x00,0x09,0x9f,0x03,0x05,0x0f,0x00,0x09,
326−0xa8,0x03,0x02,0x0d,0x00,0x09,0xb1,0x03,0x02,0x0d,0x00,0x09,0xba,0x03,0x02,0x0f,
327−0x00,0x09,0xc3,0x03,0x02,0x0d,0x00,0x09,0xcc,0x03,0x02,0x0d,0x00,0x09,0xd5,0x03,
328−0x05,0x0d,0x00,0x09,0xde,0x03,0x05,0x0d,0x00,0x09,0xe7,0x03,0x05,0x0d,0x00,0x09,
329−0xf0,0x03,0x05,0x0f,0x00,0x09,0xf9,0x03,0x05,0x0f,0x00,0x09,0x02,0x04,0x05,0x0d,
330−0x00,0x09,0x0b,0x04,0x05,0x0d,0x00,0x09,0x14,0x04,0x03,0x0d,0x00,0x09,0x1d,0x04,
331−0x05,0x0d,0x00,0x09,0x26,0x04,0x05,0x0d,0x00,0x09,0x2f,0x04,0x05,0x0d,0x00,0x09,
332−0x38,0x04,0x05,0x0d,0x00,0x09,0x41,0x04,0x05,0x0f,0x00,0x09,0x4a,0x04,0x05,0x0d,
333−0x00,0x09,0x53,0x04,0x02,0x0e,0x00,0x09,0x5c,0x04,0x02,0x0e,0x00,0x09,0x65,0x04,
334−0x02,0x0e,0x00,0x09,0x6e,0x04,0x07,0x0a,0x00,0x09,0x77,0x04,0x01,0x0d,0x00,0x09,
335−0x80,0x04,0x00,0x0e,0x00,0x09,0x89,0x04,0x00,0x0f,0x00,0x09,0x92,0x04,0x00,0x0f,
336−0x00,0x09,0x9b,0x04,0x00,0x0f,0x00,0x09,0xa4,0x04,0x00,0x0f,0x00,0x09,0xad,0x04,
337−0x00,0x0f,0x00,0x09,0xb6,0x04,0x00,0x0f,0x00,0x09,0xbf,0x04,0x00,0x0f,0x00,0x09,
338−0xc8,0x04,0x00,0x0f,0x00,0x09,0xd1,0x04,0x00,0x0f,0x00,0x09,0xda,0x04,0x00,0x0f,
339−0x00,0x09,0xe3,0x04,0x00,0x0f,0x00,0x09,0xec,0x04,0x00,0x0f,0x00,0x09,0xf5,0x04,
340−0x00,0x0f,0x00,0x09,0xfe,0x04,0x00,0x0f,0x00,0x09,0x07,0x05,0x00,0x0f,0x00,0x09,
341−0x10,0x05,0x00,0x0f,0x00,0x09,0x19,0x05,0x00,0x0f,0x00,0x09,0x22,0x05,0x00,0x0f,
342−0x00,0x09,0x2b,0x05,0x00,0x0f,0x00,0x09,0x34,0x05,0x00,0x0f,0x00,0x09,0x3d,0x05,
343−0x00,0x0f,0x00,0x09,0x46,0x05,0x00,0x0f,0x00,0x09,0x4f,0x05,0x00,0x0f,0x00,0x09,
344−0x58,0x05,0x00,0x0f,0x00,0x09,0x61,0x05,0x00,0x0f,0x00,0x09,0x6a,0x05,0x00,0x0f,
345−0x00,0x09,0x73,0x05,0x00,0x0f,0x00,0x09,0x7c,0x05,0x00,0x0f,0x00,0x09,0x85,0x05,
346−0x00,0x0f,0x00,0x09,0x8e,0x05,0x00,0x0f,0x00,0x09,0x97,0x05,0x00,0x0f,0x00,0x09,
347−0xa0,0x05,0x00,0x0d,0x00,0x09,0xa9,0x05,0x05,0x0f,0x00,0x09,0xb2,0x05,0x02,0x0e,
348−0x00,0x09,0xbb,0x05,0x03,0x0d,0x00,0x09,0xc4,0x05,0x03,0x0d,0x00,0x09,0xcd,0x05,
349−0x03,0x0d,0x00,0x09,0xd6,0x05,0x02,0x0e,0x00,0x09,0xdf,0x05,0x03,0x0e,0x00,0x09,
350−0xe8,0x05,0x02,0x04,0x00,0x09,0xf1,0x05,0x03,0x0d,0x00,0x09,0xfa,0x05,0x03,0x0a,
351−0x00,0x09,0x03,0x06,0x06,0x0b,0x00,0x09,0x0c,0x06,0x07,0x0a,0x00,0x09,0x15,0x06,
352−0x08,0x09,0x00,0x09,0x1e,0x06,0x03,0x0b,0x00,0x09,0x27,0x06,0x02,0x03,0x00,0x09,
353−0x30,0x06,0x03,0x07,0x00,0x09,0x39,0x06,0x05,0x0c,0x00,0x09,0x42,0x06,0x03,0x0a,
354−0x00,0x09,0x4b,0x06,0x03,0x0a,0x00,0x09,0x54,0x06,0x02,0x04,0x00,0x09,0x5d,0x06,
355−0x05,0x0f,0x00,0x09,0x66,0x06,0x03,0x0e,0x00,0x09,0x6f,0x06,0x08,0x0a,0x00,0x09,
356−0x78,0x06,0x0d,0x0f,0x00,0x09,0x81,0x06,0x03,0x0a,0x00,0x09,0x8a,0x06,0x03,0x0a,
357−0x00,0x09,0x93,0x06,0x06,0x0b,0x00,0x09,0x9c,0x06,0x03,0x0d,0x00,0x09,0xa5,0x06,
358−0x03,0x0d,0x00,0x09,0xae,0x06,0x03,0x0d,0x00,0x09,0xb7,0x06,0x05,0x0f,0x00,0x09,
359−0xc0,0x06,0x00,0x0d,0x00,0x09,0xc9,0x06,0x00,0x0d,0x00,0x09,0xd2,0x06,0x00,0x0d,
360−0x00,0x09,0xdb,0x06,0x00,0x0d,0x00,0x09,0xe4,0x06,0x00,0x0d,0x00,0x09,0xed,0x06,
361−0x01,0x0d,0x00,0x09,0xf6,0x06,0x03,0x0d,0x00,0x09,0xff,0x06,0x03,0x0f,0x00,0x09,
362−0x08,0x07,0x00,0x0d,0x00,0x09,0x11,0x07,0x00,0x0d,0x00,0x09,0x1a,0x07,0x00,0x0d,
363−0x00,0x09,0x23,0x07,0x00,0x0d,0x00,0x09,0x2c,0x07,0x00,0x0d,0x00,0x09,0x35,0x07,
364−0x00,0x0d,0x00,0x09,0x3e,0x07,0x00,0x0d,0x00,0x09,0x47,0x07,0x00,0x0d,0x00,0x09,
365−0x50,0x07,0x03,0x0d,0x00,0x09,0x59,0x07,0x00,0x0d,0x00,0x09,0x62,0x07,0x00,0x0d,
366−0x00,0x09,0x6b,0x07,0x00,0x0d,0x00,0x09,0x74,0x07,0x00,0x0d,0x00,0x09,0x7d,0x07,
367−0x00,0x0d,0x00,0x09,0x86,0x07,0x00,0x0d,0x00,0x09,0x8f,0x07,0x06,0x0b,0x00,0x09,
368−0x98,0x07,0x03,0x0d,0x00,0x09,0xa1,0x07,0x00,0x0d,0x00,0x09,0xaa,0x07,0x00,0x0d,
369−0x00,0x09,0xb3,0x07,0x00,0x0d,0x00,0x09,0xbc,0x07,0x00,0x0d,0x00,0x09,0xc5,0x07,
370−0x00,0x0d,0x00,0x09,0xce,0x07,0x03,0x0d,0x00,0x09,0xd7,0x07,0x02,0x0d,0x00,0x09,
371−0xe0,0x07,0x02,0x0d,0x00,0x09,0xe9,0x07,0x02,0x0d,0x00,0x09,0xf2,0x07,0x02,0x0d,
372−0x00,0x09,0xfb,0x07,0x02,0x0d,0x00,0x09,0x04,0x08,0x02,0x0d,0x00,0x09,0x0d,0x08,
373−0x02,0x0d,0x00,0x09,0x16,0x08,0x05,0x0d,0x00,0x09,0x1f,0x08,0x05,0x0f,0x00,0x09,
374−0x28,0x08,0x02,0x0d,0x00,0x09,0x31,0x08,0x02,0x0d,0x00,0x09,0x3a,0x08,0x02,0x0d,
375−0x00,0x09,0x43,0x08,0x02,0x0d,0x00,0x09,0x4c,0x08,0x02,0x0d,0x00,0x09,0x55,0x08,
376−0x02,0x0d,0x00,0x09,0x5e,0x08,0x02,0x0d,0x00,0x09,0x67,0x08,0x02,0x0d,0x00,0x09,
377−0x70,0x08,0x02,0x0d,0x00,0x09,0x79,0x08,0x02,0x0d,0x00,0x09,0x82,0x08,0x02,0x0d,
378−0x00,0x09,0x8b,0x08,0x02,0x0d,0x00,0x09,0x94,0x08,0x02,0x0d,0x00,0x09,0x9d,0x08,
379−0x02,0x0d,0x00,0x09,0xa6,0x08,0x02,0x0d,0x00,0x09,0xaf,0x08,0x05,0x0c,0x00,0x09,
380−0xb8,0x08,0x05,0x0d,0x00,0x09,0xc1,0x08,0x02,0x0d,0x00,0x09,0xca,0x08,0x02,0x0d,
381−0x00,0x09,0xd3,0x08,0x02,0x0d,0x00,0x09,0xdc,0x08,0x02,0x0d,0x00,0x09,0xe5,0x08,
382−0x02,0x0f,0x00,0x09,0xee,0x08,0x03,0x0f,0x00,0x09,0xf7,0x08,0x02,0x0f,0x00,0x09,
383−0x00,0x09,0x00,0x00,0x00,0x00,
13+0x20,0x20,0x30,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x32,0x30,0x34,0x38,0x20,
14+0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x31,0x36,0x20,0x00,0x00,0x00,0x00,
15+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
16+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
17+0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
18+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
19+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
20+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x30,0x00,0x00,0x00,
21+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
22+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
23+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
24+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
25+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
26+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x0c,0x10,0x76,
27+0x6c,0x38,0x00,0x00,0x30,0x0c,0x10,0x6c,0x30,0x0c,0x18,0x66,0x00,0x76,0x60,0x0c,
28+0x10,0x76,0x6c,0x00,0x00,0x60,0x0c,0x10,0x6c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,
29+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
30+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xe0,
31+0xe0,0xe0,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xe0,0xe0,0xe0,
32+0xe0,0x90,0x70,0xe0,0x70,0x00,0x70,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x00,
33+0x18,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
34+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
35+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
36+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x30,0x00,0x00,0x00,
37+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
38+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
39+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
40+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x38,
41+0x00,0x00,0x00,0x7c,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x70,0x70,
42+0x00,0x00,0x00,0x00,0x00,0x30,0x38,0x00,0xc0,0xc0,0xe0,0x00,0x30,0x18,0x38,0xdc,
43+0x6c,0x6c,0x00,0x00,0x18,0x18,0x38,0x6c,0x18,0x18,0x3c,0x66,0x00,0xdc,0x30,0x18,
44+0x38,0xdc,0x6c,0x00,0x00,0x30,0x18,0x38,0x6c,0x18,0x00,0x00,0x00,0x00,0x10,0x00,
45+0x00,0x38,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
46+0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0xda,0x00,0x80,0x80,
47+0x80,0x80,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x90,0x90,0x90,
48+0x90,0xd0,0x80,0x80,0x90,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x18,0x66,0x00,
49+0x7c,0x00,0x38,0x30,0x0c,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x18,0x7c,0x7c,
50+0x0c,0xfe,0x38,0xfe,0x7c,0x7c,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x10,0xfc,0x3c,
51+0xf8,0xfe,0xfe,0x3c,0xc6,0x3c,0x1e,0xe6,0xf0,0xc6,0xc6,0x7c,0xfc,0x7c,0xfc,0x7c,
52+0x7e,0xc6,0xc6,0xc6,0xc6,0x66,0xfe,0x3c,0x00,0x3c,0x6c,0x00,0x18,0x00,0xe0,0x00,
53+0x1c,0x00,0x38,0x00,0xe0,0x18,0x06,0xe0,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
54+0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x18,0x70,0x76,0x00,0x00,0x00,0x00,0x00,
55+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
56+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x6c,
57+0x00,0x66,0x18,0xc6,0x6c,0x3c,0x6c,0x00,0x00,0x00,0x38,0x00,0x6c,0x00,0xd8,0xd8,
58+0x0c,0x00,0x7f,0x00,0x00,0x70,0x6c,0x00,0xc0,0xc0,0x30,0x30,0x00,0x00,0x6c,0x00,
59+0x00,0x38,0x3e,0x3c,0x00,0x00,0x44,0x00,0x00,0x00,0x42,0x00,0xf8,0x00,0x00,0x00,
60+0x44,0x00,0x00,0x00,0x7a,0x00,0x00,0x44,0x00,0x00,0xf0,0x3c,0x60,0x18,0x38,0x76,
61+0x6c,0x6c,0x00,0x00,0x60,0x0c,0x38,0x6c,0x30,0x0c,0x38,0x66,0x76,0x76,0x60,0x0c,
62+0x38,0x76,0x6c,0x00,0x00,0x60,0x18,0x38,0xcc,0x0c,0xe0,0x6c,0x02,0x00,0xe0,0xe0,
63+0xe0,0xe0,0xf0,0x18,0x70,0x48,0x20,0x48,0x70,0x38,0x38,0x38,0x90,0x90,0x90,0x90,
64+0x90,0xb0,0x60,0xe0,0x80,0xe0,0x60,0xe0,0x70,0x38,0x70,0x48,0x00,0x3c,0x66,0x6c,
65+0xc6,0x00,0x6c,0x30,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x38,0xc6,0xc6,
66+0x1c,0xc0,0x60,0xc6,0xc6,0xc6,0x00,0x00,0x06,0x00,0x60,0xc6,0x7c,0x38,0x66,0x66,
67+0x6c,0x66,0x66,0x66,0xc6,0x18,0x0c,0x66,0x60,0xee,0xe6,0xc6,0x66,0xc6,0x66,0xc6,
68+0x7e,0xc6,0xc6,0xc6,0xc6,0x66,0xc6,0x30,0x80,0x0c,0xc6,0x00,0x00,0x00,0x60,0x00,
69+0x0c,0x00,0x6c,0x00,0x60,0x18,0x06,0x60,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
70+0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0xdc,0x00,0x00,0x00,0x00,0x00,
71+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
72+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x3c,0x64,
73+0x00,0x66,0x18,0x60,0x6c,0x42,0x6c,0x00,0x00,0x00,0x44,0x7c,0x6c,0x00,0x30,0x30,
74+0x18,0x00,0xdb,0x00,0x00,0x30,0x6c,0x00,0xc2,0xc2,0x62,0x30,0x10,0x10,0x10,0x10,
75+0x10,0x10,0x6c,0x66,0xfe,0xfe,0xfe,0xfe,0x3c,0x3c,0x3c,0x3c,0x6c,0xc6,0x7c,0x7c,
76+0x7c,0x7c,0x7c,0x00,0xc4,0xc6,0xc6,0xc6,0xc6,0x66,0x60,0x66,0x30,0x30,0x6c,0xdc,
77+0x6c,0x38,0x00,0x00,0x30,0x18,0x6c,0x6c,0x18,0x18,0x6c,0x66,0x1c,0xdc,0x30,0x18,
78+0x6c,0xdc,0x6c,0x00,0x00,0x30,0x30,0x6c,0xcc,0x18,0x60,0x6c,0x80,0x00,0x10,0x80,
79+0x80,0x80,0x90,0x3c,0x48,0x48,0x20,0x48,0x40,0x48,0x40,0x40,0x90,0x90,0x90,0x90,
80+0x90,0x90,0x10,0x80,0x80,0x80,0x10,0x80,0x40,0x40,0x48,0x48,0x00,0x3c,0x24,0x6c,
81+0xc2,0xc2,0x6c,0x20,0x30,0x0c,0x00,0x00,0x00,0x00,0x00,0x02,0xc6,0x78,0x06,0x06,
82+0x3c,0xc0,0xc0,0x06,0xc6,0xc6,0x18,0x18,0x0c,0x00,0x30,0xc6,0xc6,0x6c,0x66,0xc2,
83+0x66,0x62,0x62,0xc2,0xc6,0x18,0x0c,0x66,0x60,0xfe,0xf6,0xc6,0x66,0xc6,0x66,0xc6,
84+0x5a,0xc6,0xc6,0xc6,0x6c,0x66,0x86,0x30,0xc0,0x0c,0x00,0x00,0x00,0x00,0x60,0x00,
85+0x0c,0x00,0x64,0x00,0x60,0x00,0x00,0x60,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
86+0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x00,0x10,0x00,0x00,0x00,0x00,
87+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
88+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x60,
89+0x66,0x3c,0x18,0x38,0x00,0x99,0x3e,0x00,0x00,0x00,0xba,0x00,0x38,0x18,0x60,0x18,
90+0x00,0x00,0xdb,0x00,0x00,0x30,0x38,0x00,0xc6,0xc6,0x36,0x00,0x38,0x38,0x38,0x38,
91+0x38,0x38,0xcc,0xc2,0x66,0x66,0x66,0x66,0x18,0x18,0x18,0x18,0x66,0xe6,0xc6,0xc6,
92+0xc6,0xc6,0xc6,0x00,0xce,0xc6,0xc6,0xc6,0xc6,0x66,0x7c,0x66,0x00,0x00,0x00,0x00,
93+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,
94+0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x82,0x00,0xe0,0xe0,
95+0xe0,0xe0,0x90,0x3c,0x70,0x78,0x20,0x48,0x70,0x40,0x30,0x30,0xe0,0xe0,0xe0,0xe0,
96+0xe0,0x90,0xe0,0xe0,0x70,0xe0,0xe0,0xe0,0x70,0x58,0x70,0x48,0x00,0x3c,0x00,0xfe,
97+0xc0,0xc6,0x38,0x00,0x30,0x0c,0x66,0x18,0x00,0x00,0x00,0x06,0xc6,0x18,0x0c,0x06,
98+0x6c,0xc0,0xc0,0x06,0xc6,0xc6,0x18,0x18,0x18,0x7e,0x18,0x0c,0xc6,0xc6,0x66,0xc0,
99+0x66,0x68,0x68,0xc0,0xc6,0x18,0x0c,0x6c,0x60,0xfe,0xfe,0xc6,0x66,0xc6,0x66,0x60,
100+0x18,0xc6,0xc6,0xc6,0x7c,0x66,0x0c,0x30,0xe0,0x0c,0x00,0x00,0x00,0x78,0x78,0x7c,
101+0x3c,0x7c,0x60,0x76,0x6c,0x38,0x0e,0x66,0x18,0xec,0xdc,0x7c,0xdc,0x76,0xdc,0x7c,
102+0xfc,0xcc,0x66,0xc6,0xc6,0xc6,0xfe,0x18,0x18,0x18,0x00,0x38,0x00,0x00,0x00,0x00,
103+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
104+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x60,0xf0,
105+0x3c,0x18,0x18,0x6c,0x00,0xa5,0x00,0x36,0x00,0x00,0xb2,0x00,0x00,0x18,0xc8,0xd8,
106+0x00,0xcc,0xdb,0x00,0x00,0x30,0x00,0xd8,0xcc,0xcc,0xec,0x30,0x6c,0x6c,0x6c,0x6c,
107+0x6c,0x6c,0xcc,0xc0,0x62,0x62,0x62,0x62,0x18,0x18,0x18,0x18,0x66,0xf6,0xc6,0xc6,
108+0xc6,0xc6,0xc6,0x66,0xce,0xc6,0xc6,0xc6,0xc6,0x66,0x66,0x66,0x78,0x78,0x78,0x78,
109+0x78,0x78,0xcc,0x7c,0x7c,0x7c,0x7c,0x7c,0x38,0x38,0x38,0x38,0x06,0xdc,0x7c,0x7c,
110+0x7c,0x7c,0x7c,0x18,0x7a,0xcc,0xcc,0xcc,0xcc,0xc6,0x7c,0xc6,0x02,0x00,0x1c,0x1c,
111+0x18,0x24,0x1c,0x3c,0x48,0x48,0x20,0x30,0x40,0x40,0x08,0x08,0x10,0x1c,0x1c,0x1c,
112+0x1c,0x0c,0x44,0x1c,0x0c,0x80,0x24,0x1c,0x40,0x48,0x50,0x48,0x00,0x18,0x00,0x6c,
113+0x7c,0x0c,0x76,0x00,0x30,0x0c,0x3c,0x18,0x00,0x00,0x00,0x0c,0xd6,0x18,0x18,0x3c,
114+0xcc,0xfc,0xfc,0x0c,0x7c,0x7e,0x00,0x00,0x30,0x00,0x0c,0x18,0xde,0xc6,0x7c,0xc0,
115+0x66,0x78,0x78,0xc0,0xfe,0x18,0x0c,0x78,0x60,0xd6,0xde,0xc6,0x7c,0xc6,0x7c,0x38,
116+0x18,0xc6,0xc6,0xd6,0x38,0x3c,0x18,0x30,0x70,0x0c,0x00,0x00,0x00,0x0c,0x6c,0xc6,
117+0x6c,0xc6,0xf0,0xcc,0x76,0x18,0x06,0x6c,0x18,0xfe,0x66,0xc6,0x66,0xcc,0x76,0xc6,
118+0x30,0xcc,0x66,0xc6,0x6c,0xc6,0xcc,0x70,0x00,0x0e,0x00,0x6c,0x00,0x00,0x00,0x00,
119+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
120+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x60,0x60,
121+0x66,0x7e,0x00,0xc6,0x00,0xa1,0x7e,0x6c,0xfe,0x00,0xaa,0x00,0x00,0x7e,0xf8,0x70,
122+0x00,0xcc,0x7b,0x00,0x00,0x78,0x7c,0x6c,0x18,0x18,0x18,0x30,0xc6,0xc6,0xc6,0xc6,
123+0xc6,0xc6,0xfe,0xc0,0x68,0x68,0x68,0x68,0x18,0x18,0x18,0x18,0xf6,0xfe,0xc6,0xc6,
124+0xc6,0xc6,0xc6,0x3c,0xd6,0xc6,0xc6,0xc6,0xc6,0x3c,0x66,0x6c,0x0c,0x0c,0x0c,0x0c,
125+0x0c,0x0c,0x76,0xc6,0xc6,0xc6,0xc6,0xc6,0x18,0x18,0x18,0x18,0x7e,0x66,0xc6,0xc6,
126+0xc6,0xc6,0xc6,0x00,0xc4,0xcc,0xcc,0xcc,0xcc,0xc6,0x66,0xc6,0x80,0x00,0x08,0x08,
127+0x24,0x34,0x24,0x3c,0x70,0x48,0x38,0x30,0x40,0x38,0x70,0x70,0x10,0x24,0x24,0x24,
128+0x24,0x12,0x28,0x08,0x12,0xe0,0x24,0x20,0x40,0x38,0x48,0x30,0x00,0x18,0x00,0x6c,
129+0x06,0x18,0xdc,0x00,0x30,0x0c,0xff,0x7e,0x00,0xfe,0x00,0x18,0xd6,0x18,0x30,0x06,
130+0xfe,0x06,0xc6,0x18,0xc6,0x06,0x00,0x00,0x60,0x00,0x06,0x18,0xde,0xfe,0x66,0xc0,
131+0x66,0x68,0x68,0xde,0xc6,0x18,0x0c,0x78,0x60,0xc6,0xce,0xc6,0x60,0xc6,0x6c,0x0c,
132+0x18,0xc6,0xc6,0xd6,0x38,0x18,0x30,0x30,0x38,0x0c,0x00,0x00,0x00,0x7c,0x66,0xc0,
133+0xcc,0xfe,0x60,0xcc,0x66,0x18,0x06,0x78,0x18,0xd6,0x66,0xc6,0x66,0xcc,0x66,0x60,
134+0x30,0xcc,0x66,0xd6,0x38,0xc6,0x18,0x18,0x18,0x18,0x00,0xc6,0x00,0x00,0x00,0x00,
135+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
136+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x60,0x60,
137+0x66,0x18,0x18,0xc6,0x00,0xa1,0x00,0xd8,0x06,0x3c,0x44,0x00,0x00,0x18,0x00,0x00,
138+0x00,0xcc,0x1b,0x00,0x00,0x00,0x00,0x36,0x30,0x30,0x30,0x60,0xc6,0xc6,0xc6,0xc6,
139+0xc6,0xc6,0xcc,0xc0,0x78,0x78,0x78,0x78,0x18,0x18,0x18,0x18,0x66,0xde,0xc6,0xc6,
140+0xc6,0xc6,0xc6,0x18,0xd6,0xc6,0xc6,0xc6,0xc6,0x18,0x66,0x66,0x7c,0x7c,0x7c,0x7c,
141+0x7c,0x7c,0x36,0xc0,0xfe,0xfe,0xfe,0xfe,0x18,0x18,0x18,0x18,0xc6,0x66,0xc6,0xc6,
142+0xc6,0xc6,0xc6,0x7e,0xce,0xcc,0xcc,0xcc,0xcc,0xc6,0x66,0xc6,0x82,0x00,0x08,0x08,
143+0x24,0x2c,0x20,0x66,0x07,0x07,0x07,0x07,0x0e,0x00,0x06,0x07,0x10,0x20,0x20,0x20,
144+0x20,0x1e,0x10,0x08,0x1e,0x11,0x24,0x18,0x0e,0x07,0x07,0x07,0x00,0x18,0x00,0x6c,
145+0x06,0x30,0xcc,0x00,0x30,0x0c,0x3c,0x18,0x00,0x00,0x00,0x30,0xc6,0x18,0x60,0x06,
146+0x0c,0x06,0xc6,0x30,0xc6,0x06,0x00,0x00,0x30,0x7e,0x0c,0x18,0xde,0xc6,0x66,0xc0,
147+0x66,0x60,0x60,0xc6,0xc6,0x18,0xcc,0x6c,0x60,0xc6,0xc6,0xc6,0x60,0xc6,0x66,0x06,
148+0x18,0xc6,0xc6,0xd6,0x7c,0x18,0x60,0x30,0x1c,0x0c,0x00,0x00,0x00,0xcc,0x66,0xc0,
149+0xcc,0xc0,0x60,0xcc,0x66,0x18,0x06,0x78,0x18,0xd6,0x66,0xc6,0x66,0xcc,0x60,0x38,
150+0x30,0xcc,0x66,0xd6,0x38,0xc6,0x30,0x18,0x18,0x18,0x00,0xc6,0x00,0x00,0x00,0x00,
151+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
152+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x66,0x60,
153+0x66,0x7e,0x18,0x6c,0x00,0xa5,0x00,0x6c,0x06,0x00,0x38,0x00,0x00,0x18,0x00,0x00,
154+0x00,0xcc,0x1b,0x18,0x00,0x00,0x00,0x6c,0x66,0x60,0x66,0xc0,0xfe,0xfe,0xfe,0xfe,
155+0xfe,0xfe,0xcc,0xc0,0x68,0x68,0x68,0x68,0x18,0x18,0x18,0x18,0x66,0xce,0xc6,0xc6,
156+0xc6,0xc6,0xc6,0x3c,0xe6,0xc6,0xc6,0xc6,0xc6,0x18,0x66,0x66,0xcc,0xcc,0xcc,0xcc,
157+0xcc,0xcc,0x7e,0xc0,0xc0,0xc0,0xc0,0xc0,0x18,0x18,0x18,0x18,0xc6,0x66,0xc6,0xc6,
158+0xc6,0xc6,0xc6,0x00,0xd6,0xcc,0xcc,0xcc,0xcc,0xc6,0x66,0xc6,0x02,0x00,0x08,0x08,
159+0x24,0x24,0x20,0xc3,0x08,0x02,0x04,0x02,0x08,0x0e,0x09,0x02,0x10,0x20,0x20,0x20,
160+0x20,0x12,0x10,0x08,0x12,0x1b,0x24,0x04,0x10,0x08,0x08,0x08,0x00,0x00,0x00,0xfe,
161+0x86,0x60,0xcc,0x00,0x30,0x0c,0x66,0x18,0x18,0x00,0x00,0x60,0xc6,0x18,0xc0,0x06,
162+0x0c,0x06,0xc6,0x30,0xc6,0x06,0x18,0x18,0x18,0x00,0x18,0x00,0xdc,0xc6,0x66,0xc2,
163+0x66,0x62,0x60,0xc6,0xc6,0x18,0xcc,0x66,0x62,0xc6,0xc6,0xc6,0x60,0xd6,0x66,0xc6,
164+0x18,0xc6,0x6c,0xfe,0x6c,0x18,0xc2,0x30,0x0e,0x0c,0x00,0x00,0x00,0xcc,0x66,0xc0,
165+0xcc,0xc0,0x60,0xcc,0x66,0x18,0x06,0x6c,0x18,0xd6,0x66,0xc6,0x66,0xcc,0x60,0x0c,
166+0x30,0xcc,0x66,0xd6,0x38,0xc6,0x60,0x18,0x18,0x18,0x00,0xc6,0x00,0x00,0x00,0x00,
167+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
168+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x3c,0x60,
169+0x3c,0x18,0x18,0x38,0x00,0x99,0x00,0x36,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
170+0x00,0xcc,0x1b,0x00,0x00,0x00,0x00,0xd8,0xce,0xdc,0xce,0xc6,0xc6,0xc6,0xc6,0xc6,
171+0xc6,0xc6,0xcc,0xc2,0x62,0x62,0x62,0x62,0x18,0x18,0x18,0x18,0x66,0xc6,0xc6,0xc6,
172+0xc6,0xc6,0xc6,0x66,0xe6,0xc6,0xc6,0xc6,0xc6,0x18,0x7c,0x66,0xcc,0xcc,0xcc,0xcc,
173+0xcc,0xcc,0xd8,0xc0,0xc0,0xc0,0xc0,0xc0,0x18,0x18,0x18,0x18,0xc6,0x66,0xc6,0xc6,
174+0xc6,0xc6,0xc6,0x18,0xe6,0xcc,0xcc,0xcc,0xcc,0xc6,0x66,0xc6,0x80,0x00,0x08,0x08,
175+0x18,0x24,0x1c,0xff,0x06,0x02,0x07,0x02,0x0e,0x09,0x09,0x02,0x1c,0x1c,0x1c,0x1c,
176+0x1c,0x12,0x10,0x08,0x12,0x15,0x18,0x38,0x0c,0x06,0x06,0x06,0x00,0x18,0x00,0x6c,
177+0xc6,0xc6,0xcc,0x00,0x18,0x18,0x00,0x00,0x18,0x00,0x18,0xc0,0x6c,0x18,0xc6,0xc6,
178+0x0c,0xc6,0xc6,0x30,0xc6,0x0c,0x18,0x18,0x0c,0x00,0x30,0x18,0xc0,0xc6,0x66,0x66,
179+0x6c,0x66,0x60,0x66,0xc6,0x18,0xcc,0x66,0x66,0xc6,0xc6,0xc6,0x60,0xde,0x66,0xc6,
180+0x18,0xc6,0x38,0xee,0xc6,0x18,0xc6,0x30,0x06,0x0c,0x00,0x00,0x00,0xcc,0x66,0xc6,
181+0xcc,0xc6,0x60,0xcc,0x66,0x18,0x06,0x66,0x18,0xd6,0x66,0xc6,0x66,0xcc,0x60,0xc6,
182+0x36,0xcc,0x3c,0xfe,0x6c,0xc6,0xc6,0x18,0x18,0x18,0x00,0xfe,0x00,0x00,0x00,0x00,
183+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
184+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x18,0xe6,
185+0x66,0x18,0x18,0x0c,0x00,0x42,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,
186+0x00,0xcc,0x1b,0x00,0x00,0x00,0x00,0x00,0x9e,0x86,0x9e,0xc6,0xc6,0xc6,0xc6,0xc6,
187+0xc6,0xc6,0xcc,0x66,0x66,0x66,0x66,0x66,0x18,0x18,0x18,0x18,0x6c,0xc6,0xc6,0xc6,
188+0xc6,0xc6,0xc6,0x00,0x46,0xc6,0xc6,0xc6,0xc6,0x18,0x60,0x66,0xcc,0xcc,0xcc,0xcc,
189+0xcc,0xcc,0xd8,0xc6,0xc6,0xc6,0xc6,0xc6,0x18,0x18,0x18,0x18,0xc6,0x66,0xc6,0xc6,
190+0xc6,0xc6,0xc6,0x18,0x46,0xcc,0xcc,0xcc,0xcc,0xc6,0x66,0xc6,0xb6,0x00,0x05,0x05,
191+0x07,0x0c,0x09,0x18,0x01,0x02,0x04,0x02,0x08,0x0e,0x09,0x02,0x07,0x02,0x06,0x06,
192+0x02,0x09,0x09,0x0e,0x09,0x15,0x0e,0x07,0x02,0x01,0x01,0x01,0x00,0x18,0x00,0x6c,
193+0x7c,0x86,0x76,0x00,0x0c,0x30,0x00,0x00,0x18,0x00,0x18,0x80,0x38,0x7e,0xfe,0x7c,
194+0x1e,0x7c,0x7c,0x30,0x7c,0x78,0x00,0x30,0x06,0x00,0x60,0x18,0x7c,0xc6,0xfc,0x3c,
195+0xf8,0xfe,0xf0,0x3a,0xc6,0x3c,0x78,0xe6,0xfe,0xc6,0xc6,0x7c,0xf0,0x7c,0xe6,0x7c,
196+0x3c,0x7c,0x10,0x6c,0xc6,0x3c,0xfe,0x3c,0x02,0x3c,0x00,0x00,0x00,0x76,0x7c,0x7c,
197+0x76,0x7c,0xf0,0x7c,0xe6,0x3c,0x06,0xe6,0x3c,0xc6,0x66,0x7c,0x7c,0x7c,0xf0,0x7c,
198+0x1c,0x76,0x18,0x6c,0xc6,0x7e,0xfe,0x0e,0x18,0x70,0x00,0x00,0x00,0x00,0x00,0x00,
199+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
200+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0xfc,
201+0x00,0x18,0x18,0xc6,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
202+0x00,0xf6,0x1b,0x00,0x00,0x00,0x00,0x00,0x3e,0x0c,0x3e,0x7c,0xc6,0xc6,0xc6,0xc6,
203+0xc6,0xc6,0xce,0x3c,0xfe,0xfe,0xfe,0xfe,0x3c,0x3c,0x3c,0x3c,0xf8,0xc6,0x7c,0x7c,
204+0x7c,0x7c,0x7c,0x00,0xbc,0x7c,0x7c,0x7c,0x7c,0x3c,0xf0,0xec,0x76,0x76,0x76,0x76,
205+0x76,0x76,0x6e,0x7c,0x7c,0x7c,0x7c,0x7c,0x3c,0x3c,0x3c,0x3c,0x7c,0x66,0x7c,0x7c,
206+0x7c,0x7c,0x7c,0x00,0xbc,0x76,0x76,0x76,0x76,0x7e,0x7c,0x7e,0x00,0x00,0x05,0x05,
207+0x02,0x12,0x0a,0x00,0x0e,0x02,0x04,0x02,0x08,0x0a,0x06,0x07,0x04,0x06,0x09,0x01,
208+0x06,0x0a,0x0d,0x09,0x0d,0x11,0x09,0x09,0x1c,0x0e,0x0e,0x0e,0x00,0x00,0x00,0x00,
209+0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
210+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
211+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00,
212+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
213+0x00,0x00,0x00,0x0c,0x00,0x00,0x66,0x00,0x00,0x00,0x00,0x00,0x60,0x0c,0x00,0x00,
214+0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
215+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
216+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
217+0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
218+0x00,0xc0,0x00,0x00,0x18,0x00,0x00,0x00,0x06,0x18,0x06,0x00,0x00,0x00,0x00,0x00,
219+0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
220+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
221+0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
222+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x60,0x06,0x00,0x00,0x02,0x02,
223+0x02,0x12,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x07,0x02,0x02,0x06,
224+0x0a,0x0c,0x0b,0x0e,0x0b,0x00,0x0e,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
225+0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
226+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
227+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,
228+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,
229+0x00,0x00,0x00,0xcc,0x00,0x00,0x66,0x00,0x00,0x00,0x00,0x00,0x60,0x0c,0x00,0x00,
230+0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
231+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
232+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
233+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
234+0x00,0xc0,0x00,0x00,0x0c,0x00,0x00,0x00,0x06,0x3e,0x06,0x00,0x00,0x00,0x00,0x00,
235+0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
236+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
237+0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
238+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x60,0x0c,0x00,0x00,0x05,0x05,
239+0x02,0x16,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x02,0x04,0x01,
240+0x1f,0x0a,0x09,0x09,0x09,0x00,0x09,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
241+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
242+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
243+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
244+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
245+0x00,0x00,0x00,0x78,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0xf0,0x1e,0x00,0x00,
246+0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
247+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
248+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
249+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
250+0x00,0xc0,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
251+0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
252+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
253+0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
254+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xf0,0xf8,0x00,0x00,0x05,0x05,
255+0x02,0x0d,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x0f,0x06,
256+0x02,0x09,0x09,0x0e,0x09,0x00,0x0e,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
257+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
258+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
259+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
260+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
261+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
262+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
263+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
264+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
265+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
266+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
267+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
268+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
269+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
270+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x35,0x36,0x20,
271+0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x31,0x36,0x20,0x20,0x20,0x20,0x20,0x20,
272+0x20,0x20,0x20,0x20,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
273+0x00,0x00,0x00,0x0f,0x00,0x08,0x08,0x00,0x00,0x0f,0x00,0x08,0x10,0x00,0x00,0x0f,
274+0x00,0x08,0x18,0x00,0x00,0x0f,0x00,0x08,0x20,0x00,0x00,0x0f,0x00,0x08,0x28,0x00,
275+0x00,0x0f,0x00,0x08,0x30,0x00,0x00,0x0f,0x00,0x08,0x38,0x00,0x00,0x0f,0x00,0x08,
276+0x40,0x00,0x00,0x0f,0x00,0x08,0x48,0x00,0x00,0x0f,0x00,0x08,0x50,0x00,0x00,0x0f,
277+0x00,0x08,0x58,0x00,0x00,0x0f,0x00,0x08,0x60,0x00,0x00,0x0f,0x00,0x08,0x68,0x00,
278+0x00,0x0f,0x00,0x08,0x70,0x00,0x00,0x0f,0x00,0x08,0x78,0x00,0x00,0x0f,0x00,0x08,
279+0x80,0x00,0x00,0x0f,0x00,0x08,0x88,0x00,0x00,0x0f,0x00,0x08,0x90,0x00,0x00,0x0f,
280+0x00,0x08,0x98,0x00,0x00,0x0f,0x00,0x08,0xa0,0x00,0x00,0x0f,0x00,0x08,0xa8,0x00,
281+0x00,0x0f,0x00,0x08,0xb0,0x00,0x00,0x0f,0x00,0x08,0xb8,0x00,0x00,0x0f,0x00,0x08,
282+0xc0,0x00,0x00,0x0f,0x00,0x08,0xc8,0x00,0x00,0x0f,0x00,0x08,0xd0,0x00,0x00,0x0f,
283+0x00,0x08,0xd8,0x00,0x00,0x0f,0x00,0x08,0xe0,0x00,0x00,0x0f,0x00,0x08,0xe8,0x00,
284+0x00,0x0f,0x00,0x08,0xf0,0x00,0x00,0x0f,0x00,0x08,0xf8,0x00,0x00,0x0f,0x00,0x08,
285+0x00,0x01,0x00,0x0f,0x00,0x08,0x08,0x01,0x00,0x0f,0x00,0x08,0x10,0x01,0x00,0x0f,
286+0x00,0x08,0x18,0x01,0x00,0x0f,0x00,0x08,0x20,0x01,0x00,0x0f,0x00,0x08,0x28,0x01,
287+0x00,0x0f,0x00,0x08,0x30,0x01,0x00,0x0f,0x00,0x08,0x38,0x01,0x00,0x0f,0x00,0x08,
288+0x40,0x01,0x00,0x0f,0x00,0x08,0x48,0x01,0x00,0x0f,0x00,0x08,0x50,0x01,0x00,0x0f,
289+0x00,0x08,0x58,0x01,0x00,0x0f,0x00,0x08,0x60,0x01,0x00,0x0f,0x00,0x08,0x68,0x01,
290+0x00,0x0f,0x00,0x08,0x70,0x01,0x00,0x0f,0x00,0x08,0x78,0x01,0x00,0x0f,0x00,0x08,
291+0x80,0x01,0x00,0x0f,0x00,0x08,0x88,0x01,0x00,0x0f,0x00,0x08,0x90,0x01,0x00,0x0f,
292+0x00,0x08,0x98,0x01,0x00,0x0f,0x00,0x08,0xa0,0x01,0x00,0x0f,0x00,0x08,0xa8,0x01,
293+0x00,0x0f,0x00,0x08,0xb0,0x01,0x00,0x0f,0x00,0x08,0xb8,0x01,0x00,0x0f,0x00,0x08,
294+0xc0,0x01,0x00,0x0f,0x00,0x08,0xc8,0x01,0x00,0x0f,0x00,0x08,0xd0,0x01,0x00,0x0f,
295+0x00,0x08,0xd8,0x01,0x00,0x0f,0x00,0x08,0xe0,0x01,0x00,0x0f,0x00,0x08,0xe8,0x01,
296+0x00,0x0f,0x00,0x08,0xf0,0x01,0x00,0x0f,0x00,0x08,0xf8,0x01,0x00,0x0f,0x00,0x08,
297+0x00,0x02,0x00,0x0f,0x00,0x08,0x08,0x02,0x00,0x0f,0x00,0x08,0x10,0x02,0x00,0x0f,
298+0x00,0x08,0x18,0x02,0x00,0x0f,0x00,0x08,0x20,0x02,0x00,0x0f,0x00,0x08,0x28,0x02,
299+0x00,0x0f,0x00,0x08,0x30,0x02,0x00,0x0f,0x00,0x08,0x38,0x02,0x00,0x0f,0x00,0x08,
300+0x40,0x02,0x00,0x0f,0x00,0x08,0x48,0x02,0x00,0x0f,0x00,0x08,0x50,0x02,0x00,0x0f,
301+0x00,0x08,0x58,0x02,0x00,0x0f,0x00,0x08,0x60,0x02,0x00,0x0f,0x00,0x08,0x68,0x02,
302+0x00,0x0f,0x00,0x08,0x70,0x02,0x00,0x0f,0x00,0x08,0x78,0x02,0x00,0x0f,0x00,0x08,
303+0x80,0x02,0x00,0x0f,0x00,0x08,0x88,0x02,0x00,0x0f,0x00,0x08,0x90,0x02,0x00,0x0f,
304+0x00,0x08,0x98,0x02,0x00,0x0f,0x00,0x08,0xa0,0x02,0x00,0x0f,0x00,0x08,0xa8,0x02,
305+0x00,0x0f,0x00,0x08,0xb0,0x02,0x00,0x0f,0x00,0x08,0xb8,0x02,0x00,0x0f,0x00,0x08,
306+0xc0,0x02,0x00,0x0f,0x00,0x08,0xc8,0x02,0x00,0x0f,0x00,0x08,0xd0,0x02,0x00,0x0f,
307+0x00,0x08,0xd8,0x02,0x00,0x0f,0x00,0x08,0xe0,0x02,0x00,0x0f,0x00,0x08,0xe8,0x02,
308+0x00,0x0f,0x00,0x08,0xf0,0x02,0x00,0x0f,0x00,0x08,0xf8,0x02,0x00,0x0f,0x00,0x08,
309+0x00,0x03,0x00,0x0f,0x00,0x08,0x08,0x03,0x00,0x0f,0x00,0x08,0x10,0x03,0x00,0x0f,
310+0x00,0x08,0x18,0x03,0x00,0x0f,0x00,0x08,0x20,0x03,0x00,0x0f,0x00,0x08,0x28,0x03,
311+0x00,0x0f,0x00,0x08,0x30,0x03,0x00,0x0f,0x00,0x08,0x38,0x03,0x00,0x0f,0x00,0x08,
312+0x40,0x03,0x00,0x0f,0x00,0x08,0x48,0x03,0x00,0x0f,0x00,0x08,0x50,0x03,0x00,0x0f,
313+0x00,0x08,0x58,0x03,0x00,0x0f,0x00,0x08,0x60,0x03,0x00,0x0f,0x00,0x08,0x68,0x03,
314+0x00,0x0f,0x00,0x08,0x70,0x03,0x00,0x0f,0x00,0x08,0x78,0x03,0x00,0x0f,0x00,0x08,
315+0x80,0x03,0x00,0x0f,0x00,0x08,0x88,0x03,0x00,0x0f,0x00,0x08,0x90,0x03,0x00,0x0f,
316+0x00,0x08,0x98,0x03,0x00,0x0f,0x00,0x08,0xa0,0x03,0x00,0x0f,0x00,0x08,0xa8,0x03,
317+0x00,0x0f,0x00,0x08,0xb0,0x03,0x00,0x0f,0x00,0x08,0xb8,0x03,0x00,0x0f,0x00,0x08,
318+0xc0,0x03,0x00,0x0f,0x00,0x08,0xc8,0x03,0x00,0x0f,0x00,0x08,0xd0,0x03,0x00,0x0f,
319+0x00,0x08,0xd8,0x03,0x00,0x0f,0x00,0x08,0xe0,0x03,0x00,0x0f,0x00,0x08,0xe8,0x03,
320+0x00,0x0f,0x00,0x08,0xf0,0x03,0x00,0x0f,0x00,0x08,0xf8,0x03,0x00,0x0f,0x00,0x08,
321+0x00,0x04,0x00,0x0f,0x00,0x08,0x08,0x04,0x00,0x0f,0x00,0x08,0x10,0x04,0x00,0x0f,
322+0x00,0x08,0x18,0x04,0x00,0x0f,0x00,0x08,0x20,0x04,0x00,0x0f,0x00,0x08,0x28,0x04,
323+0x00,0x0f,0x00,0x08,0x30,0x04,0x00,0x0f,0x00,0x08,0x38,0x04,0x00,0x0f,0x00,0x08,
324+0x40,0x04,0x00,0x0f,0x00,0x08,0x48,0x04,0x00,0x0f,0x00,0x08,0x50,0x04,0x00,0x0f,
325+0x00,0x08,0x58,0x04,0x00,0x0f,0x00,0x08,0x60,0x04,0x00,0x0f,0x00,0x08,0x68,0x04,
326+0x00,0x0f,0x00,0x08,0x70,0x04,0x00,0x0f,0x00,0x08,0x78,0x04,0x00,0x0f,0x00,0x08,
327+0x80,0x04,0x00,0x0f,0x00,0x08,0x88,0x04,0x00,0x0f,0x00,0x08,0x90,0x04,0x00,0x0f,
328+0x00,0x08,0x98,0x04,0x00,0x0f,0x00,0x08,0xa0,0x04,0x00,0x0f,0x00,0x08,0xa8,0x04,
329+0x00,0x0f,0x00,0x08,0xb0,0x04,0x00,0x0f,0x00,0x08,0xb8,0x04,0x00,0x0f,0x00,0x08,
330+0xc0,0x04,0x00,0x0f,0x00,0x08,0xc8,0x04,0x00,0x0f,0x00,0x08,0xd0,0x04,0x00,0x0f,
331+0x00,0x08,0xd8,0x04,0x00,0x0f,0x00,0x08,0xe0,0x04,0x00,0x0f,0x00,0x08,0xe8,0x04,
332+0x00,0x0f,0x00,0x08,0xf0,0x04,0x00,0x0f,0x00,0x08,0xf8,0x04,0x00,0x0f,0x00,0x08,
333+0x00,0x05,0x00,0x0f,0x00,0x08,0x08,0x05,0x00,0x0f,0x00,0x08,0x10,0x05,0x00,0x0f,
334+0x00,0x08,0x18,0x05,0x00,0x0f,0x00,0x08,0x20,0x05,0x00,0x0f,0x00,0x08,0x28,0x05,
335+0x00,0x0f,0x00,0x08,0x30,0x05,0x00,0x0f,0x00,0x08,0x38,0x05,0x00,0x0f,0x00,0x08,
336+0x40,0x05,0x00,0x0f,0x00,0x08,0x48,0x05,0x00,0x0f,0x00,0x08,0x50,0x05,0x00,0x0f,
337+0x00,0x08,0x58,0x05,0x00,0x0f,0x00,0x08,0x60,0x05,0x00,0x0f,0x00,0x08,0x68,0x05,
338+0x00,0x0f,0x00,0x08,0x70,0x05,0x00,0x0f,0x00,0x08,0x78,0x05,0x00,0x0f,0x00,0x08,
339+0x80,0x05,0x00,0x0f,0x00,0x08,0x88,0x05,0x00,0x0f,0x00,0x08,0x90,0x05,0x00,0x0f,
340+0x00,0x08,0x98,0x05,0x00,0x0f,0x00,0x08,0xa0,0x05,0x00,0x0f,0x00,0x08,0xa8,0x05,
341+0x00,0x0f,0x00,0x08,0xb0,0x05,0x00,0x0f,0x00,0x08,0xb8,0x05,0x00,0x0f,0x00,0x08,
342+0xc0,0x05,0x00,0x0f,0x00,0x08,0xc8,0x05,0x00,0x0f,0x00,0x08,0xd0,0x05,0x00,0x0f,
343+0x00,0x08,0xd8,0x05,0x00,0x0f,0x00,0x08,0xe0,0x05,0x00,0x0f,0x00,0x08,0xe8,0x05,
344+0x00,0x0f,0x00,0x08,0xf0,0x05,0x00,0x0f,0x00,0x08,0xf8,0x05,0x00,0x0f,0x00,0x08,
345+0x00,0x06,0x00,0x0f,0x00,0x08,0x08,0x06,0x00,0x0f,0x00,0x08,0x10,0x06,0x00,0x0f,
346+0x00,0x08,0x18,0x06,0x00,0x0f,0x00,0x08,0x20,0x06,0x00,0x0f,0x00,0x08,0x28,0x06,
347+0x00,0x0f,0x00,0x08,0x30,0x06,0x00,0x0f,0x00,0x08,0x38,0x06,0x00,0x0f,0x00,0x08,
348+0x40,0x06,0x00,0x0f,0x00,0x08,0x48,0x06,0x00,0x0f,0x00,0x08,0x50,0x06,0x00,0x0f,
349+0x00,0x08,0x58,0x06,0x00,0x0f,0x00,0x08,0x60,0x06,0x00,0x0f,0x00,0x08,0x68,0x06,
350+0x00,0x0f,0x00,0x08,0x70,0x06,0x00,0x0f,0x00,0x08,0x78,0x06,0x00,0x0f,0x00,0x08,
351+0x80,0x06,0x00,0x0f,0x00,0x08,0x88,0x06,0x00,0x0f,0x00,0x08,0x90,0x06,0x00,0x0f,
352+0x00,0x08,0x98,0x06,0x00,0x0f,0x00,0x08,0xa0,0x06,0x00,0x0f,0x00,0x08,0xa8,0x06,
353+0x00,0x0f,0x00,0x08,0xb0,0x06,0x00,0x0f,0x00,0x08,0xb8,0x06,0x00,0x0f,0x00,0x08,
354+0xc0,0x06,0x00,0x0f,0x00,0x08,0xc8,0x06,0x00,0x0f,0x00,0x08,0xd0,0x06,0x00,0x0f,
355+0x00,0x08,0xd8,0x06,0x00,0x0f,0x00,0x08,0xe0,0x06,0x00,0x0f,0x00,0x08,0xe8,0x06,
356+0x00,0x0f,0x00,0x08,0xf0,0x06,0x00,0x0f,0x00,0x08,0xf8,0x06,0x00,0x0f,0x00,0x08,
357+0x00,0x07,0x00,0x0f,0x00,0x08,0x08,0x07,0x00,0x0f,0x00,0x08,0x10,0x07,0x00,0x0f,
358+0x00,0x08,0x18,0x07,0x00,0x0f,0x00,0x08,0x20,0x07,0x00,0x0f,0x00,0x08,0x28,0x07,
359+0x00,0x0f,0x00,0x08,0x30,0x07,0x00,0x0f,0x00,0x08,0x38,0x07,0x00,0x0f,0x00,0x08,
360+0x40,0x07,0x00,0x0f,0x00,0x08,0x48,0x07,0x00,0x0f,0x00,0x08,0x50,0x07,0x00,0x0f,
361+0x00,0x08,0x58,0x07,0x00,0x0f,0x00,0x08,0x60,0x07,0x00,0x0f,0x00,0x08,0x68,0x07,
362+0x00,0x0f,0x00,0x08,0x70,0x07,0x00,0x0f,0x00,0x08,0x78,0x07,0x00,0x0f,0x00,0x08,
363+0x80,0x07,0x00,0x0f,0x00,0x08,0x88,0x07,0x00,0x0f,0x00,0x08,0x90,0x07,0x00,0x0f,
364+0x00,0x08,0x98,0x07,0x00,0x0f,0x00,0x08,0xa0,0x07,0x00,0x0f,0x00,0x08,0xa8,0x07,
365+0x00,0x0f,0x00,0x08,0xb0,0x07,0x00,0x0f,0x00,0x08,0xb8,0x07,0x00,0x0f,0x00,0x08,
366+0xc0,0x07,0x00,0x0f,0x00,0x08,0xc8,0x07,0x00,0x0f,0x00,0x08,0xd0,0x07,0x00,0x0f,
367+0x00,0x08,0xd8,0x07,0x00,0x0f,0x00,0x08,0xe0,0x07,0x00,0x0f,0x00,0x08,0xe8,0x07,
368+0x00,0x0f,0x00,0x08,0xf0,0x07,0x00,0x0f,0x00,0x08,0xf8,0x07,0x00,0x0f,0x00,0x08,
369+0x00,0x08,0x00,0x0f,0x00,0x08,
384370 };
385371
386372 int sizeofdefont = sizeof defontdata;
libdraw/fmt.c+22−0
@@ -0,0 +1,22 @@
1+#include <u.h>
2+#include <libc.h>
3+#include <draw.h>
4+
5+int
6+Rfmt(Fmt *f)
7+{
8+ Rectangle r;
9+
10+ r = va_arg(f->args, Rectangle);
11+ return fmtprint(f, "%P %P", r.min, r.max);
12+}
13+
14+int
15+Pfmt(Fmt *f)
16+{
17+ Point p;
18+
19+ p = va_arg(f->args, Point);
20+ return fmtprint(f, "[%d %d]", p.x, p.y);
21+}
22+
libmemdraw/alloc.c+16−13
@@ -23,20 +23,20 @@ memimagemove(void *from, void *to) · 22 unmodified lines
2323 }
2424
2525 Memimage*
26−allocmemimaged(Rectangle r, ulong chan, Memdata *md, void *X)
26+allocmemimaged(Rectangle r, ulong chan, Memdata *md)
2727 {
2828 int d;
2929 ulong l;
3030 Memimage *i;
3131
32− if(Dx(r) <= 0 || Dy(r) <= 0){
33− werrstr("bad rectangle %R", r);
34− return nil;
35− }
3632 if((d = chantodepth(chan)) == 0) {
3733 werrstr("bad channel descriptor %.8lux", chan);
3834 return nil;
3935 }
36+ if(badrect(r)){
37+ werrstr("bad rectangle %R", r);
38+ return nil;
39+ }
4040
4141 l = wordsperline(r, d);
4242
@@ -44,7 +44,6 @@ allocmemimaged(Rectangle r, ulong chan, Memdata *md, void *X) · 1 unmodified line
4444 if(i == nil)
4545 return nil;
4646
47− i->X = X;
4847 i->data = md;
4948 i->zero = sizeof(ulong)*l*r.min.y;
5049
@@ -67,11 +66,11 @@ allocmemimaged(Rectangle r, ulong chan, Memdata *md, void *X) · 16 unmodified lines
6766 }
6867
6968 Memimage*
70−_allocmemimage(Rectangle r, ulong chan)
69+allocmemimage(Rectangle r, ulong chan)
7170 {
7271 int d;
73− u32int l, nw;
7472 uchar *p;
73+ ulong l, nw;
7574 Memdata *md;
7675 Memimage *i;
7776
@@ -79,8 +78,13 @@ _allocmemimage(Rectangle r, ulong chan) · 1 unmodified line
7978 werrstr("bad channel descriptor %.8lux", chan);
8079 return nil;
8180 }
81+ if(badrect(r)){
82+ werrstr("bad rectangle %R", r);
83+ return nil;
84+ }
8285
8386 l = wordsperline(r, d);
87+
8488 nw = l*Dy(r);
8589 md = malloc(sizeof(Memdata));
8690 if(md == nil)
@@ -104,7 +108,7 @@ _allocmemimage(Rectangle r, ulong chan) · 17 unmodified lines
104108 md->bdata = p;
105109 md->allocd = 1;
106110
107− i = allocmemimaged(r, chan, md, nil);
111+ i = allocmemimaged(r, chan, md);
108112 if(i == nil){
109113 poolfree(imagmem, md->base);
110114 free(md);
@@ -115,11 +119,11 @@ _allocmemimage(Rectangle r, ulong chan) · 4 unmodified lines
115119 }
116120
117121 void
118−_freememimage(Memimage *i)
122+freememimage(Memimage *i)
119123 {
120124 if(i == nil)
121125 return;
122− if(i->data->ref-- == 1 && i->data->allocd){
126+ if(--i->data->ref == 0 && i->data->allocd){
123127 if(i->data->base)
124128 poolfree(imagmem, i->data->base);
125129 free(i->data);
@@ -141,8 +145,7 @@ byteaddr(Memimage *i, Point p) · 15 unmodified lines
141145 {
142146 uchar *a;
143147
144− a = i->data->bdata+i->zero+sizeof(ulong)*p.y*i->width;
145−
148+ a = i->data->bdata+i->zero+(int)(sizeof(ulong)*p.y*i->width);
146149 if(i->depth < 8){
147150 /*
148151 * We need to always round down,
libmemdraw/arctest.c+0−62
@@ -1,62 +0,0 @@
1−#include <u.h>
2−#include <libc.h>
3−#include <draw.h>
4−#include <memdraw.h>
5−#include <memlayer.h>
6−
7−extern int drawdebug;
8−void
9−main(int argc, char **argv)
10−{
11− char cc;
12− Memimage *x;
13− Point c = {208,871};
14− int a = 441;
15− int b = 441;
16− int thick = 0;
17− Point sp = {0,0};
18− int alpha = 51;
19− int phi = 3;
20− vlong t0, t1;
21− int i, n;
22− vlong del;
23−
24− memimageinit();
25−
26− x = allocmemimage(Rect(0,0,1000,1000), CMAP8);
27− n = atoi(argv[1]);
28−
29− t0 = nsec();
30− t0 = nsec();
31− t0 = nsec();
32− t1 = nsec();
33− del = t1-t0;
34− t0 = nsec();
35− for(i=0; i<n; i++)
36− memarc(x, c, a, b, thick, memblack, sp, alpha, phi, SoverD);
37− t1 = nsec();
38− print("%lld %lld\n", t1-t0-del, del);
39−}
40−
41−int drawdebug = 0;
42−
43−void
44−rdb(void)
45−{
46−}
47−
48−int
49−iprint(char *fmt, ...)
50−{
51− int n;
52− va_list va;
53− char buf[1024];
54−
55− va_start(va, fmt);
56− n = doprint(buf, buf+sizeof buf, fmt, va) - buf;
57− va_end(va);
58−
59− write(1,buf,n);
60− return 1;
61−}
62−
libmemdraw/cload.c+2−2
@@ -4,12 +4,12 @@ · 3 unmodified lines
44 #include <memdraw.h>
55
66 int
7−_cloadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata)
7+cloadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata)
88 {
99 int y, bpl, c, cnt, offs;
1010 uchar mem[NMEM], *memp, *omemp, *emem, *linep, *elinep, *u, *eu;
1111
12− if(!rectinrect(r, i->r))
12+ if(badrect(r) || !rectinrect(r, i->r))
1313 return -1;
1414 bpl = bytesperline(r, i->depth);
1515 u = data;
libmemdraw/defont.c+1−1
@@ -43,7 +43,7 @@ getmemdefont(void) · 42 unmodified lines
4343 md->ref = 1;
4444 md->allocd = 1; /* so freememimage does free md */
4545
46− i = allocmemimaged(r, drawld2chan[ld], md, nil);
46+ i = allocmemimaged(r, drawld2chan[ld], md);
4747 if(i == nil){
4848 free(md);
4949 return nil;
libmemdraw/draw.c+243−188
@@ -4,7 +4,6 @@ · 3 unmodified lines
44 #include <memdraw.h>
55
66 int drawdebug;
7−static int tablesbuilt;
87
98 /* perfect approximation to NTSC = .299r+.587g+.114b when 0 ≤ r,g,b < 256 */
109 #define RGB2K(r,g,b) ((156763*(r)+307758*(g)+59769*(b))>>19)
@@ -52,15 +51,13 @@ Memimage *memopaque; · 41 unmodified lines
5251
5352 int _ifmt(Fmt*);
5453
55−void
56−_memimageinit(void)
54+int
55+memimageinit(void)
5756 {
5857 static int didinit = 0;
5958
6059 if(didinit)
61− return;
62−
63− didinit = 1;
60+ return 0;
6461
6562 mktables();
6663 _memmkcmap();
@@ -69,34 +66,36 @@ _memimageinit(void) · 2 unmodified lines
6966 fmtinstall('P', Pfmt);
7067
7168 memones = allocmemimage(Rect(0,0,1,1), GREY1);
69+ memzeros = allocmemimage(Rect(0,0,1,1), GREY1);
70+ if(memones == nil || memzeros == nil)
71+ return -1;
72+
7273 memones->flags |= Frepl;
7374 memones->clipr = Rect(-0x3FFFFFF, -0x3FFFFFF, 0x3FFFFFF, 0x3FFFFFF);
7475 *byteaddr(memones, ZP) = ~0;
7576
76− memzeros = allocmemimage(Rect(0,0,1,1), GREY1);
7777 memzeros->flags |= Frepl;
7878 memzeros->clipr = Rect(-0x3FFFFFF, -0x3FFFFFF, 0x3FFFFFF, 0x3FFFFFF);
7979 *byteaddr(memzeros, ZP) = 0;
8080
81− if(memones == nil || memzeros == nil)
82− assert(0 /*cannot initialize memimage library */); /* RSC BUG */
83−
8481 memwhite = memones;
8582 memblack = memzeros;
8683 memopaque = memones;
8784 memtransparent = memzeros;
85+
86+ didinit = 1;
87+ return 0;
8888 }
8989
90−ulong _imgtorgba(Memimage*, ulong);
91−ulong _rgbatoimg(Memimage*, ulong);
92−ulong _pixelbits(Memimage*, Point);
90+static ulong imgtorgba(Memimage*, ulong);
91+static ulong rgbatoimg(Memimage*, ulong);
9392
9493 #define DBG if(0)
95−static Memdrawparam par;
96−
97−Memdrawparam*
98−_memimagedrawsetup(Memimage *dst, Rectangle r, Memimage *src, Point p0, Memimage *mask, Point p1, int op)
94+void
95+memimagedraw(Memimage *dst, Rectangle r, Memimage *src, Point p0, Memimage *mask, Point p1, int op)
9996 {
97+ static int n = 0;
98+ Memdrawparam par;
10099
101100 if(mask == nil)
102101 mask = memopaque;
@@ -106,13 +105,13 @@ DBG print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/%luX %P... ", dst, dst->ch · 3 unmodified lines
106105 if(drawclip(dst, &r, src, &p0, mask, &p1, &par.sr, &par.mr) == 0){
107106 // if(drawdebug)
108107 // iprint("empty clipped rectangle\n");
109− return nil;
108+ return;
110109 }
111110
112111 if(op < Clear || op > SoverD){
113112 // if(drawdebug)
114113 // iprint("op out of range: %d\n", op);
115− return nil;
114+ return;
116115 }
117116
118117 par.op = op;
@@ -127,13 +126,13 @@ DBG print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/%luX %P... ", dst, dst->ch · 8 unmodified lines
127126 if(src->flags&Frepl){
128127 par.state |= Replsrc;
129128 if(Dx(src->r)==1 && Dy(src->r)==1){
130− par.sval = _pixelbits(src, src->r.min);
129+ par.sval = pixelbits(src, src->r.min);
131130 par.state |= Simplesrc;
132− par.srgba = _imgtorgba(src, par.sval);
133− par.sdval = _rgbatoimg(dst, par.srgba);
131+ par.srgba = imgtorgba(src, par.sval);
132+ par.sdval = rgbatoimg(dst, par.srgba);
134133 if((par.srgba&0xFF) == 0 && (op&DoutS)){
135134 // if (drawdebug) iprint("fill with transparent source\n");
136− return nil; /* no-op successfully handled */
135+ return; /* no-op successfully handled */
137136 }
138137 }
139138 }
@@ -141,15 +140,15 @@ DBG print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/%luX %P... ", dst, dst->ch · 1 unmodified line
141140 if(mask->flags & Frepl){
142141 par.state |= Replmask;
143142 if(Dx(mask->r)==1 && Dy(mask->r)==1){
144− par.mval = _pixelbits(mask, mask->r.min);
143+ par.mval = pixelbits(mask, mask->r.min);
145144 if(par.mval == 0 && (op&DoutS)){
146145 // if(drawdebug) iprint("fill with zero mask\n");
147− return nil; /* no-op successfully handled */
146+ return; /* no-op successfully handled */
148147 }
149148 par.state |= Simplemask;
150149 if(par.mval == ~0)
151150 par.state |= Fullmask;
152− par.mrgba = _imgtorgba(mask, par.mval);
151+ par.mrgba = imgtorgba(mask, par.mval);
153152 }
154153 }
155154
@@ -157,15 +156,6 @@ DBG print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/%luX %P... ", dst, dst->ch · 1 unmodified line
157156 // iprint("dr %R sr %R mr %R...", r, par.sr, par.mr);
158157 DBG print("draw dr %R sr %R mr %R %lux\n", r, par.sr, par.mr, par.state);
159158
160− return &par;
161−}
162−
163−void
164−_memimagedraw(Memdrawparam *par)
165−{
166− if (par == nil)
167− return;
168−
169159 /*
170160 * Now that we've clipped the parameters down to be consistent, we
171161 * simply try sub-drawing routines in order until we find one that was able
@@ -179,7 +169,7 @@ _memimagedraw(Memdrawparam *par) · 7 unmodified lines
179169 * There could be an if around this checking to see if dst is in video memory.
180170 */
181171 DBG print("test hwdraw\n");
182− if(hwdraw(par)){
172+ if(hwdraw(&par)){
183173 //if(drawdebug) iprint("hw handled\n");
184174 DBG print("hwdraw handled\n");
185175 return;
@@ -188,7 +178,7 @@ DBG print("hwdraw handled\n"); · 2 unmodified lines
188178 * Optimizations using memmove and memset.
189179 */
190180 DBG print("test memoptdraw\n");
191− if(memoptdraw(par)){
181+ if(memoptdraw(&par)){
192182 //if(drawdebug) iprint("memopt handled\n");
193183 DBG print("memopt handled\n");
194184 return;
@@ -199,7 +189,7 @@ DBG print("memopt handled\n"); · 4 unmodified lines
199189 * Solid source color being painted through a boolean mask onto a high res image.
200190 */
201191 DBG print("test chardraw\n");
202− if(chardraw(par)){
192+ if(chardraw(&par)){
203193 //if(drawdebug) iprint("chardraw handled\n");
204194 DBG print("chardraw handled\n");
205195 return;
@@ -209,29 +199,28 @@ DBG print("chardraw handled\n"); · 3 unmodified lines
209199 * General calculation-laden case that does alpha for each pixel.
210200 */
211201 DBG print("do alphadraw\n");
212− alphadraw(par);
202+ alphadraw(&par);
213203 //if(drawdebug) iprint("alphadraw handled\n");
214204 DBG print("alphadraw handled\n");
215205 }
216206 #undef DBG
217207
208+
218209 /*
219210 * Clip the destination rectangle further based on the properties of the
220211 * source and mask rectangles. Once the destination rectangle is properly
221212 * clipped, adjust the source and mask rectangles to be the same size.
222− * Then if source or mask is replicated, move its clipped rectangle
223− * so that its minimum point falls within the repl rectangle.
224213 *
225214 * Return zero if the final rectangle is null.
226215 */
227216 int
228−drawclip(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, Point *p1, Rectangle *sr, Rectangle *mr)
217+drawclipnorepl(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, Point *p1, Rectangle *sr, Rectangle *mr)
229218 {
230219 Point rmin, delta;
231220 int splitcoords;
232221 Rectangle omr;
233222
234− if(r->min.x>=r->max.x || r->min.y>=r->max.y)
223+ if(badrect(*r))
235224 return 0;
236225 splitcoords = (p0->x!=p1->x) || (p0->y!=p1->y);
237226 /* clip to destination */
@@ -272,15 +261,13 @@ drawclip(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, · 34 unmodified lines
272261 sr->min.y += mr->min.y-omr.min.y;
273262 sr->max.x += mr->max.x-omr.max.x;
274263 sr->max.y += mr->max.y-omr.max.y;
275− *p1 = mr->min;
276264 }else{
277265 if(!(mask->flags&Frepl) && !rectclip(sr, mask->r))
278266 return 0;
279267 if(!rectclip(sr, mask->clipr))
280268 return 0;
281− *p1 = sr->min;
269+ *mr = *sr;
282270 }
283−
284271 /* move source clipping back to destination */
285272 delta.x = r->min.x - p0->x;
286273 delta.y = r->min.y - p0->y;
@@ -288,6 +275,30 @@ drawclip(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, · 1 unmodified line
288275 r->min.y = sr->min.y + delta.y;
289276 r->max.x = sr->max.x + delta.x;
290277 r->max.y = sr->max.y + delta.y;
278+ *p0 = sr->min;
279+ *p1 = mr->min;
280+
281+ assert(Dx(*sr) == Dx(*mr) && Dx(*mr) == Dx(*r));
282+ assert(Dy(*sr) == Dy(*mr) && Dy(*mr) == Dy(*r));
283+ assert(ptinrect(r->min, dst->r));
284+
285+ return 1;
286+}
287+
288+/*
289+ * like drawclipnorepl() above, but if source or mask is replicated,
290+ * move its clipped rectangle so that its minimum point falls within
291+ * the repl rectangle.
292+ *
293+ * Return zero if the final rectangle is null.
294+ */
295+int
296+drawclip(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, Point *p1, Rectangle *sr, Rectangle *mr)
297+{
298+ Point delta;
299+
300+ if(!drawclipnorepl(dst, r, src, p0, mask, p1, sr, mr))
301+ return 0;
291302
292303 /* move source rectangle so sr->min is in src->r */
293304 if(src->flags&Frepl) {
@@ -297,8 +308,8 @@ drawclip(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, · 3 unmodified lines
297308 sr->min.y += delta.y;
298309 sr->max.x += delta.x;
299310 sr->max.y += delta.y;
311+ *p0 = sr->min;
300312 }
301− *p0 = sr->min;
302313
303314 /* move mask point so it is in mask->r */
304315 *p1 = drawrepl(mask->r, *p1);
@@ -306,11 +317,8 @@ drawclip(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, · 1 unmodified line
306317 mr->max.x = p1->x+Dx(*sr);
307318 mr->max.y = p1->y+Dy(*sr);
308319
309− assert(Dx(*sr) == Dx(*mr) && Dx(*mr) == Dx(*r));
310− assert(Dy(*sr) == Dy(*mr) && Dy(*mr) == Dy(*r));
311320 assert(ptinrect(*p0, src->r));
312321 assert(ptinrect(*p1, mask->r));
313− assert(ptinrect(r->min, dst->r));
314322
315323 return 1;
316324 }
@@ -357,13 +365,6 @@ mktables(void) · 40 unmodified lines
357365 {
358366 int i, j, mask, sh, small;
359367
360− if(tablesbuilt)
361− return;
362−
363− fmtinstall('R', Rfmt);
364− fmtinstall('P', Pfmt);
365− tablesbuilt = 1;
366−
367368 /* bit replication up to 8 bits */
368369 for(i=0; i<256; i++){
369370 for(j=0; j<=8; j++){ /* j <= 8 [sic] */
@@ -396,7 +397,7 @@ struct Buffer { · 26 unmodified lines
396397 uchar *red;
397398 uchar *grn;
398399 uchar *blu;
399− uchar *alpha;
400+ uchar *alpha; /* is &ones when unused, never nil */
400401 uchar *grey;
401402 ulong *rgba;
402403 int delta; /* number of bytes to add to pointer to get next pixel to the right */
@@ -456,7 +457,6 @@ struct Param { · 53 unmodified lines
456457 static uchar *drawbuf;
457458 static int ndrawbuf;
458459 static int mdrawbuf;
459−static Param spar, mpar, dpar; /* easier on the stacks */
460460 static Readfn greymaskread, replread, readptr;
461461 static Writefn nullwrite;
462462 static Calcfn alphacalc0, alphacalc14, alphacalc2810, alphacalc3679, alphacalc5, alphacalc11, alphacalcS;
@@ -467,7 +467,8 @@ static Readfn* readalphafn(Memimage*); · 4 unmodified lines
467467 static Writefn* writefn(Memimage*);
468468
469469 static Calcfn* boolcopyfn(Memimage*, Memimage*);
470−static Readfn* convfn(Memimage*, Param*, Memimage*, Param*);
470+static Readfn* convfn(Memimage*, Param*, Memimage*, Param*, int*);
471+static Readfn* ptrfn(Memimage*);
471472
472473 static Calcfn *alphacalc[Ncomp] =
473474 {
@@ -501,59 +502,66 @@ static Calcfn *boolcalc[Ncomp] = · 27 unmodified lines
501502 boolcalc1011, /* SoverD */
502503 };
503504
504−static int
505−allocdrawbuf(void)
505+/*
506+ * Avoid standard Lock, QLock so that can be used in kernel.
507+ */
508+typedef struct Dbuf Dbuf;
509+struct Dbuf
506510 {
507511 uchar *p;
512+ int n;
513+ Param spar, mpar, dpar;
514+ int inuse;
515+};
516+static Dbuf dbuf[10];
508517
509− if(ndrawbuf > mdrawbuf){
510− p = realloc(drawbuf, ndrawbuf);
511− if(p == nil){
512− werrstr("memimagedraw out of memory");
513− return -1;
514− }
515− drawbuf = p;
516− mdrawbuf = ndrawbuf;
518+static Dbuf*
519+allocdbuf(void)
520+{
521+ int i;
522+
523+ for(i=0; i<nelem(dbuf); i++){
524+ if(dbuf[i].inuse)
525+ continue;
526+ if(!tas(&dbuf[i].inuse))
527+ return &dbuf[i];
517528 }
518− return 0;
529+ return nil;
519530 }
520531
521−static Param
522−getparam(Memimage *img, Rectangle r, int convgrey, int needbuf)
532+static void
533+getparam(Param *p, Memimage *img, Rectangle r, int convgrey, int needbuf, int *ndrawbuf)
523534 {
524− Param p;
525535 int nbuf;
526536
527− memset(&p, 0, sizeof p);
537+ memset(p, 0, sizeof *p);
528538
529− p.img = img;
530− p.r = r;
531− p.dx = Dx(r);
532− p.needbuf = needbuf;
533− p.convgrey = convgrey;
539+ p->img = img;
540+ p->r = r;
541+ p->dx = Dx(r);
542+ p->needbuf = needbuf;
543+ p->convgrey = convgrey;
534544
535545 assert(img->r.min.x <= r.min.x && r.min.x < img->r.max.x);
536546
537− p.bytey0s = byteaddr(img, Pt(img->r.min.x, img->r.min.y));
538− p.bytermin = byteaddr(img, Pt(r.min.x, img->r.min.y));
539− p.bytey0e = byteaddr(img, Pt(img->r.max.x, img->r.min.y));
540− p.bwidth = sizeof(ulong)*img->width;
547+ p->bytey0s = byteaddr(img, Pt(img->r.min.x, img->r.min.y));
548+ p->bytermin = byteaddr(img, Pt(r.min.x, img->r.min.y));
549+ p->bytey0e = byteaddr(img, Pt(img->r.max.x, img->r.min.y));
550+ p->bwidth = sizeof(ulong)*img->width;
541551
542− assert(p.bytey0s <= p.bytermin && p.bytermin <= p.bytey0e);
552+ assert(p->bytey0s <= p->bytermin && p->bytermin <= p->bytey0e);
543553
544− if(p.r.min.x == p.img->r.min.x)
545− assert(p.bytermin == p.bytey0s);
554+ if(p->r.min.x == p->img->r.min.x)
555+ assert(p->bytermin == p->bytey0s);
546556
547557 nbuf = 1;
548558 if((img->flags&Frepl) && Dy(img->r) <= MAXBCACHE && Dy(img->r) < Dy(r)){
549− p.replcache = 1;
559+ p->replcache = 1;
550560 nbuf = Dy(img->r);
551561 }
552− p.bufdelta = 4*p.dx;
553− p.bufoff = ndrawbuf;
554− ndrawbuf += p.bufdelta*nbuf;
555−
556− return p;
562+ p->bufdelta = 4*p->dx;
563+ p->bufoff = *ndrawbuf;
564+ *ndrawbuf += p->bufdelta*nbuf;
557565 }
558566
559567 static void
@@ -578,19 +586,19 @@ dumpbuf(char *s, Buffer b, int n) · 18 unmodified lines
578586 print("%s", s);
579587 for(i=0; i<n; i++){
580588 print(" ");
581− if((p=b.grey)){
589+ if(p=b.grey){
582590 print(" k%.2uX", *p);
583591 b.grey += b.delta;
584592 }else{
585− if((p=b.red)){
593+ if(p=b.red){
586594 print(" r%.2uX", *p);
587595 b.red += b.delta;
588596 }
589− if((p=b.grn)){
597+ if(p=b.grn){
590598 print(" g%.2uX", *p);
591599 b.grn += b.delta;
592600 }
593− if((p=b.blu)){
601+ if(p=b.blu){
594602 print(" b%.2uX", *p);
595603 b.blu += b.delta;
596604 }
@@ -624,19 +632,23 @@ alphadraw(Memdrawparam *par) · 27 unmodified lines
624632 {
625633 int isgrey, starty, endy, op;
626634 int needbuf, dsty, srcy, masky;
627− int y, dir, dx, dy;
635+ int y, dir, dx, dy, ndrawbuf;
636+ uchar *drawbuf;
628637 Buffer bsrc, bdst, bmask;
629638 Readfn *rdsrc, *rdmask, *rddst;
630639 Calcfn *calc;
631640 Writefn *wrdst;
632641 Memimage *src, *mask, *dst;
633642 Rectangle r, sr, mr;
643+ Dbuf *z;
634644
635645 r = par->r;
636646 dx = Dx(r);
637647 dy = Dy(r);
638648
639− ndrawbuf = 0;
649+ z = allocdbuf();
650+ if(z == nil)
651+ return 0;
640652
641653 src = par->src;
642654 mask = par->mask;
@@ -655,12 +667,13 @@ alphadraw(Memdrawparam *par) · 12 unmodified lines
655667 */
656668 needbuf = (src->data == dst->data);
657669
658− spar = getparam(src, sr, isgrey, needbuf);
659− dpar = getparam(dst, r, isgrey, needbuf);
660− mpar = getparam(mask, mr, 0, needbuf);
670+ ndrawbuf = 0;
671+ getparam(&z->spar, src, sr, isgrey, needbuf, &ndrawbuf);
672+ getparam(&z->dpar, dst, r, isgrey, needbuf, &ndrawbuf);
673+ getparam(&z->mpar, mask, mr, 0, needbuf, &ndrawbuf);
661674
662675 dir = (needbuf && byteaddr(dst, r.min) > byteaddr(src, sr.min)) ? -1 : 1;
663− spar.dir = mpar.dir = dpar.dir = dir;
676+ z->spar.dir = z->mpar.dir = z->dpar.dir = dir;
664677
665678 /*
666679 * If the mask is purely boolean, we can convert from src to dst format
@@ -680,7 +693,7 @@ alphadraw(Memdrawparam *par) · 13 unmodified lines
680693 //if(drawdebug) iprint("flag %lud mchan %lux=?%x dd %d\n", src->flags&Falpha, mask->chan, GREY1, dst->depth);
681694 if(!(src->flags&Falpha) && mask->chan == GREY1 && dst->depth >= 8 && op == SoverD){
682695 //if(drawdebug) iprint("boolcopy...");
683− rdsrc = convfn(dst, &dpar, src, &spar);
696+ rdsrc = convfn(dst, &z->dpar, src, &z->spar, &ndrawbuf);
684697 rddst = readptr;
685698 rdmask = readfn(mask);
686699 calc = boolcopyfn(dst, mask);
@@ -698,10 +711,10 @@ alphadraw(Memdrawparam *par) · 11 unmodified lines
698711 */
699712 if(mask->flags&Falpha){
700713 rdmask = readalphafn(mask);
701− mpar.alphaonly = 1;
714+ z->mpar.alphaonly = 1;
702715 }else{
703− mpar.greymaskcall = readfn(mask);
704− mpar.convgrey = 1;
716+ z->mpar.greymaskcall = readfn(mask);
717+ z->mpar.convgrey = 1;
705718 rdmask = greymaskread;
706719
707720 /*
@@ -723,27 +736,34 @@ alphadraw(Memdrawparam *par) · 15 unmodified lines
723736 * If the image has a small enough repl rectangle,
724737 * we can just read each line once and cache them.
725738 */
726− if(spar.replcache){
727− spar.replcall = rdsrc;
739+ if(z->spar.replcache){
740+ z->spar.replcall = rdsrc;
728741 rdsrc = replread;
729742 }
730− if(mpar.replcache){
731− mpar.replcall = rdmask;
743+ if(z->mpar.replcache){
744+ z->mpar.replcall = rdmask;
732745 rdmask = replread;
733746 }
734747
735− if(allocdrawbuf() < 0)
736− return 0;
748+ if(z->n < ndrawbuf){
749+ free(z->p);
750+ if((z->p = mallocz(ndrawbuf, 0)) == nil){
751+ z->inuse = 0;
752+ return 0;
753+ }
754+ z->n = ndrawbuf;
755+ }
756+ drawbuf = z->p;
737757
738758 /*
739759 * Before we were saving only offsets from drawbuf in the parameter
740760 * structures; now that drawbuf has been grown to accomodate us,
741761 * we can fill in the pointers.
742762 */
743− spar.bufbase = drawbuf+spar.bufoff;
744− mpar.bufbase = drawbuf+mpar.bufoff;
745− dpar.bufbase = drawbuf+dpar.bufoff;
746− spar.convbuf = drawbuf+spar.convbufoff;
763+ z->spar.bufbase = drawbuf+z->spar.bufoff;
764+ z->mpar.bufbase = drawbuf+z->mpar.bufoff;
765+ z->dpar.bufbase = drawbuf+z->dpar.bufoff;
766+ z->spar.convbuf = drawbuf+z->spar.convbufoff;
747767
748768 if(dir == 1){
749769 starty = 0;
@@ -771,18 +791,19 @@ alphadraw(Memdrawparam *par) · 21 unmodified lines
771791 clipy(dst, &dsty);
772792 clipy(mask, &masky);
773793
774− bsrc = rdsrc(&spar, spar.bufbase, srcy);
794+ bsrc = rdsrc(&z->spar, z->spar.bufbase, srcy);
775795 DBG print("[");
776− bmask = rdmask(&mpar, mpar.bufbase, masky);
796+ bmask = rdmask(&z->mpar, z->mpar.bufbase, masky);
777797 DBG print("]\n");
778− bdst = rddst(&dpar, dpar.bufbase, dsty);
798+ bdst = rddst(&z->dpar, z->dpar.bufbase, dsty);
779799 DBG dumpbuf("src", bsrc, dx);
780800 DBG dumpbuf("mask", bmask, dx);
781801 DBG dumpbuf("dst", bdst, dx);
782802 bdst = calc(bdst, bsrc, bmask, dx, isgrey, op);
783− wrdst(&dpar, dpar.bytermin+dsty*dpar.bwidth, bdst);
803+ wrdst(&z->dpar, z->dpar.bytermin+dsty*z->dpar.bwidth, bdst);
784804 }
785805
806+ z->inuse = 0;
786807 return 1;
787808 }
788809 #undef DBG
@@ -1344,7 +1365,7 @@ readnbit(Param *p, uchar *buf, int y) · 555 unmodified lines
13441365 DBG print("readnbit dx %d %p=%p+%d*%d, *r=%d fetch %d ", dx, r, p->bytermin, y, p->bwidth, *r, n);
13451366 bits = *r++;
13461367 nbits = 8;
1347− if((i=x&(npack-1))){
1368+ if(i=x&(npack-1)){
13481369 DBG print("throwaway %d...", i);
13491370 bits <<= depth*i;
13501371 nbits -= depth*i;
@@ -1376,7 +1397,7 @@ DBG print("bit %x...", repl[bits>>sh]); · 25 unmodified lines
13761397 DBG print("x=%d r=%p...", x, r);
13771398 bits = *r++;
13781399 nbits = 8;
1379− if((i=x&(npack-1))){
1400+ if(i=x&(npack-1)){
13801401 bits <<= depth*i;
13811402 nbits -= depth*i;
13821403 }
@@ -1461,7 +1482,7 @@ readcmap(Param *p, uchar *buf, int y) · 78 unmodified lines
14611482 end = p->bytey0e + y*p->bwidth;
14621483 cmap = p->img->cmap->cmap2rgb;
14631484 convgrey = p->convgrey;
1464− copyalpha = (p->img->flags&Falpha) ? 1 : 0;
1485+ copyalpha = (p->img->flags&Falpha) != 0;
14651486
14661487 w = buf;
14671488 dx = p->dx;
@@ -1518,8 +1539,8 @@ readcmap(Param *p, uchar *buf, int y) · 50 unmodified lines
15181539 static void
15191540 writecmap(Param *p, uchar *w, Buffer src)
15201541 {
1521− uchar *cmap, *red, *grn, *blu;
1522− int i, dx, delta;
1542+ uchar *cmap, *red, *grn, *blu, *alpha;
1543+ int i, dx, delta, a, m;
15231544
15241545 cmap = p->img->cmap->rgb2cmap;
15251546
@@ -1529,8 +1550,20 @@ writecmap(Param *p, uchar *w, Buffer src) · 3 unmodified lines
15291550 blu = src.blu;
15301551
15311552 dx = p->dx;
1532− for(i=0; i<dx; i++, red+=delta, grn+=delta, blu+=delta)
1533− *w++ = cmap[(*red>>4)*256+(*grn>>4)*16+(*blu>>4)];
1553+ if(p->img->flags&Falpha){
1554+ alpha = src.alpha;
1555+ m = p->img->shift[CMap]/8;
1556+ a = p->img->shift[CAlpha]/8;
1557+ for(i=0; i<dx; i++, red+=delta, grn+=delta, blu+=delta, w+=2){
1558+ w[a] = *alpha;
1559+ if(alpha != &ones)
1560+ alpha+=delta;
1561+ w[m] = cmap[(*red>>4)*256+(*grn>>4)*16+(*blu>>4)];
1562+ }
1563+ } else {
1564+ for(i=0; i<dx; i++, red+=delta, grn+=delta, blu+=delta)
1565+ *w++ = cmap[(*red>>4)*256+(*grn>>4)*16+(*blu>>4)];
1566+ }
15341567 }
15351568
15361569 #define DBG if(0)
@@ -1556,7 +1589,7 @@ readbyte(Param *p, uchar *buf, int y) · 19 unmodified lines
15561589 convgrey = p->convgrey; /* convert rgb to grey */
15571590 isgrey = img->flags&Fgrey;
15581591 alphaonly = p->alphaonly;
1559− copyalpha = (img->flags&Falpha) ? 1 : 0;
1592+ copyalpha = (img->flags&Falpha) != 0;
15601593
15611594 DBG print("copyalpha %d alphaonly %d convgrey %d isgrey %d\n", copyalpha, alphaonly, convgrey, isgrey);
15621595 /* if we can, avoid processing everything */
@@ -1608,16 +1641,17 @@ DBG print("g %x %x %x\n", ured, ugrn, ublu); · 45 unmodified lines
16081641 *w++ = RGB2K(ured, ugrn, ublu);
16091642 DBG print("%x\n", w[-1]);
16101643 }else{
1611− *w++ = brepl[(u >> img->shift[CBlue]) & img->mask[CBlue]];
1612− *w++ = grepl[(u >> img->shift[CGreen]) & img->mask[CGreen]];
1613− *w++ = rrepl[(u >> img->shift[CRed]) & img->mask[CRed]];
1644+ w[0] = ublu;
1645+ w[1] = ugrn;
1646+ w[2] = ured;
1647+ w += 3;
16141648 }
16151649 }
16161650 r += nb;
16171651 if(r == end)
16181652 r = begin;
16191653 }
1620−
1654+
16211655 b.alpha = copyalpha ? buf : &ones;
16221656 b.rgba = (ulong*)buf;
16231657 if(alphaonly){
@@ -1629,7 +1663,7 @@ DBG print("%x\n", w[-1]); · 5 unmodified lines
16291663 b.grey = buf+copyalpha;
16301664 b.red = b.grn = b.blu = buf+copyalpha;
16311665 b.delta = copyalpha+1;
1632−DBG print("alpha %x grey %x\n", b.alpha ? *b.alpha : 0xFF, *b.grey);
1666+DBG print("alpha %x grey %x\n", *b.alpha, *b.grey);
16331667 }else{
16341668 b.blu = buf+copyalpha;
16351669 b.grn = buf+copyalpha+1;
@@ -1647,7 +1681,7 @@ writebyte(Param *p, uchar *w, Buffer src) · 11 unmodified lines
16471681 {
16481682 Memimage *img;
16491683 int i, isalpha, isgrey, nb, delta, dx, adelta;
1650− uchar ff, *red, *grn, *blu, *grey, *alpha;
1684+ uchar *red, *grn, *blu, *grey, *alpha;
16511685 ulong u, mask;
16521686
16531687 img = p->img;
@@ -1661,18 +1695,45 @@ writebyte(Param *p, uchar *w, Buffer src) · 7 unmodified lines
16611695 dx = p->dx;
16621696
16631697 nb = img->depth/8;
1664− mask = (nb==4) ? 0 : ~((1<<img->depth)-1);
16651698
16661699 isalpha = img->flags&Falpha;
16671700 isgrey = img->flags&Fgrey;
16681701 adelta = src.delta;
16691702
1670− if(isalpha && (alpha == nil || alpha == &ones)){
1671− ff = 0xFF;
1672− alpha = &ff;
1703+ if(isalpha && alpha == &ones)
16731704 adelta = 0;
1705+
1706+ if((img->flags&Fbytes) != 0){
1707+ int ogry, ored, ogrn, oblu, oalp;
1708+
1709+ ogry = img->shift[CGrey]/8;
1710+ ored = img->shift[CRed]/8;
1711+ ogrn = img->shift[CGreen]/8;
1712+ oblu = img->shift[CBlue]/8;
1713+ oalp = img->shift[CAlpha]/8;
1714+
1715+ for(i=0; i<dx; i++){
1716+ if(isgrey){
1717+ w[ogry] = *grey;
1718+ grey += delta;
1719+ } else {
1720+ w[ored] = *red;
1721+ w[ogrn] = *grn;
1722+ w[oblu] = *blu;
1723+ red += delta;
1724+ grn += delta;
1725+ blu += delta;
1726+ }
1727+ if(isalpha){
1728+ w[oalp] = *alpha;
1729+ alpha += adelta;
1730+ }
1731+ w += nb;
1732+ }
1733+ return;
16741734 }
16751735
1736+ mask = (nb==4) ? 0 : ~((1<<img->depth)-1);
16761737 for(i=0; i<dx; i++){
16771738 u = w[0] | (w[1]<<8) | (w[2]<<16) | (w[3]<<24);
16781739 DBG print("u %.8lux...", u);
@@ -1729,7 +1790,7 @@ writefn(Memimage *img) · 50 unmodified lines
17291790 {
17301791 if(img->depth < 8)
17311792 return writenbit;
1732− if(img->chan == CMAP8)
1793+ if(img->nbits[CMap] == 8)
17331794 return writecmap;
17341795 return writebyte;
17351796 }
@@ -1750,7 +1811,8 @@ readptr(Param *p, uchar *s, int y) · 14 unmodified lines
17501811 USED(s);
17511812 q = p->bytermin + y*p->bwidth;
17521813 b.red = q; /* ptr to data */
1753− b.grn = b.blu = b.grey = b.alpha = nil;
1814+ b.grn = b.blu = b.grey = nil;
1815+ b.alpha = &ones;
17541816 b.rgba = (ulong*)q;
17551817 b.delta = p->img->depth/8;
17561818 return b;
@@ -1866,7 +1928,8 @@ genconv(Param *p, uchar *buf, int y) · 109 unmodified lines
18661928 }
18671929
18681930 b.red = buf;
1869− b.blu = b.grn = b.grey = b.alpha = nil;
1931+ b.blu = b.grn = b.grey = nil;
1932+ b.alpha = &ones;
18701933 b.rgba = (ulong*)buf;
18711934 b.delta = 0;
18721935
@@ -1874,7 +1937,7 @@ genconv(Param *p, uchar *buf, int y) · 1 unmodified line
18741937 }
18751938
18761939 static Readfn*
1877−convfn(Memimage *dst, Param *dpar, Memimage *src, Param *spar)
1940+convfn(Memimage *dst, Param *dpar, Memimage *src, Param *spar, int *ndrawbuf)
18781941 {
18791942 if(dst->chan == src->chan && !(src->flags&Frepl)){
18801943 //if(drawdebug) iprint("readptr...");
@@ -1892,8 +1955,8 @@ convfn(Memimage *dst, Param *dpar, Memimage *src, Param *spar) · 11 unmodified lines
18921955 spar->convdpar = dpar;
18931956
18941957 /* allocate a conversion buffer */
1895− spar->convbufoff = ndrawbuf;
1896− ndrawbuf += spar->dx*4;
1958+ spar->convbufoff = *ndrawbuf;
1959+ *ndrawbuf += spar->dx*4;
18971960
18981961 if(spar->dx > Dx(spar->img->r)){
18991962 spar->convdx = spar->dx;
@@ -1905,7 +1968,7 @@ convfn(Memimage *dst, Param *dpar, Memimage *src, Param *spar) · 5 unmodified lines
19051968 }
19061969
19071970 ulong
1908−_pixelbits(Memimage *i, Point pt)
1971+pixelbits(Memimage *i, Point pt)
19091972 {
19101973 uchar *p;
19111974 ulong val;
@@ -1965,23 +2028,17 @@ boolcopyfn(Memimage *img, Memimage *mask) · 53 unmodified lines
19652028
19662029 /*
19672030 * Optimized draw for filling and scrolling; uses memset and memmove.
1968− *
1969−static void
1970−memsetb(void *vp, uchar val, int n)
1971−{
1972− uchar *p, *ep;
1973−
1974− p = vp;
1975− ep = p+n;
1976− while(p<ep)
1977− *p++ = val;
1978−}
1979−*/
1980−
2031+ */
19812032 static void
19822033 memsets(void *vp, ushort val, int n)
19832034 {
19842035 ushort *p, *ep;
2036+ uchar b[2];
2037+
2038+ /* make little endian */
2039+ b[0] = val;
2040+ b[1] = val>>8;
2041+ val = *(ushort*)b;
19852042
19862043 p = vp;
19872044 ep = p+n;
@@ -1993,6 +2050,14 @@ static void · 5 unmodified lines
19932050 memsetl(void *vp, ulong val, int n)
19942051 {
19952052 ulong *p, *ep;
2053+ uchar b[4];
2054+
2055+ /* make little endian */
2056+ b[0] = val;
2057+ b[1] = val>>8;
2058+ b[2] = val>>16;
2059+ b[3] = val>>24;
2060+ val = *(ulong*)b;
19962061
19972062 p = vp;
19982063 ep = p+n;
@@ -2006,20 +2071,22 @@ memset24(void *vp, ulong val, int n) · 7 unmodified lines
20062071 uchar *p, *ep;
20072072 uchar a,b,c;
20082073
2009− p = vp;
2010− ep = p+3*n;
20112074 a = val;
20122075 b = val>>8;
20132076 c = val>>16;
2077+
2078+ p = vp;
2079+ ep = p+3*n;
20142080 while(p<ep){
2015− *p++ = a;
2016− *p++ = b;
2017− *p++ = c;
2081+ p[0] = a;
2082+ p[1] = b;
2083+ p[2] = c;
2084+ p += 3;
20182085 }
20192086 }
20202087
2021−ulong
2022−_imgtorgba(Memimage *img, ulong val)
2088+static ulong
2089+imgtorgba(Memimage *img, ulong val)
20232090 {
20242091 uchar r, g, b, a;
20252092 int nb, ov, v;
@@ -2057,17 +2124,17 @@ _imgtorgba(Memimage *img, ulong val) · 31 unmodified lines
20572124 break;
20582125 case CMap:
20592126 p = img->cmap->cmap2rgb+3*ov;
2060− r = *p++;
2061− g = *p++;
2062− b = *p;
2127+ r = p[0];
2128+ g = p[1];
2129+ b = p[2];
20632130 break;
20642131 }
20652132 }
20662133 return (r<<24)|(g<<16)|(b<<8)|a;
20672134 }
20682135
2069−ulong
2070−_rgbatoimg(Memimage *img, ulong rgba)
2136+static ulong
2137+rgbatoimg(Memimage *img, ulong rgba)
20712138 {
20722139 ulong chan;
20732140 int d, nb;
@@ -2133,9 +2200,8 @@ DBG print("state %lux mval %lux dd %d\n", par->state, par->mval, dst->depth); · 59 unmodified lines
21332200 */
21342201 m = Simplesrc|Simplemask|Fullmask;
21352202 if((par->state&m)==m && (par->srgba&0xFF) == 0xFF && (op ==S || op == SoverD)){
2136− uchar *dp, p[4];
21372203 int d, dwid, ppb, np, nb;
2138− uchar lm, rm;
2204+ uchar *dp, lm, rm;
21392205
21402206 DBG print("memopt, dst %p, dst->data->bdata %p\n", dst, dst->data->bdata);
21412207 dwid = dst->width*sizeof(ulong);
@@ -2204,11 +2270,6 @@ DBG print("dp %p v %lux lm %ux (v ^ *dp) & lm %lux\n", dp, v, lm, (v^*dp)&lm); · 62 unmodified lines
22042270 memset(dp, v, dx);
22052271 return 1;
22062272 case 16:
2207− p[0] = v; /* make little endian */
2208− p[1] = v>>8;
2209− v = *(ushort*)p;
2210−DBG print("dp=%p; dx=%d; for(y=0; y<%d; y++, dp+=%d)\nmemsets(dp, v, dx);\n",
2211− dp, dx, dy, dwid);
22122273 for(y=0; y<dy; y++, dp+=dwid)
22132274 memsets(dp, v, dx);
22142275 return 1;
@@ -2217,11 +2278,6 @@ DBG print("dp=%p; dx=%d; for(y=0; y<%d; y++, dp+=%d)\nmemsets(dp, v, dx);\n", · 2 unmodified lines
22172278 memset24(dp, v, dx);
22182279 return 1;
22192280 case 32:
2220− p[0] = v; /* make little endian */
2221− p[1] = v>>8;
2222− p[2] = v>>16;
2223− p[3] = v>>24;
2224− v = *(ulong*)p;
22252281 for(y=0; y<dy; y++, dp+=dwid)
22262282 memsetl(dp, v, dx);
22272283 return 1;
@@ -2370,9 +2426,8 @@ DBG print("dp=%p; dx=%d; for(y=0; y<%d; y++, dp+=%d)\nmemsets(dp, v, dx);\n", · 142 unmodified lines
23702426 static int
23712427 chardraw(Memdrawparam *par)
23722428 {
2373− ulong bits;
23742429 int i, ddepth, dy, dx, x, bx, ex, y, npack, bsh, depth, op;
2375− ulong v, maskwid, dstwid;
2430+ ulong bits, v, maskwid, dstwid;
23762431 uchar *wp, *rp, *q, *wc;
23772432 ushort *ws;
23782433 ulong *wl;
@@ -2513,7 +2568,7 @@ membyteval(Memimage *src) · 134 unmodified lines
25132568 bpp = src->depth;
25142569 uc <<= (src->r.min.x&(7/src->depth))*src->depth;
25152570 uc &= ~(0xFF>>bpp);
2516− // pixel value is now in high part of byte. repeat throughout byte
2571+ /* pixel value is now in high part of byte. repeat throughout byte
25172572 val = uc;
25182573 for(i=bpp; i<8; i<<=1)
25192574 val |= val>>i;
@@ -2523,7 +2578,7 @@ membyteval(Memimage *src) · 3 unmodified lines
25232578 */
25242579
25252580 void
2526−_memfillcolor(Memimage *i, ulong val)
2581+memfillcolor(Memimage *i, ulong val)
25272582 {
25282583 ulong bits;
25292584 int d, y;
@@ -2531,7 +2586,7 @@ _memfillcolor(Memimage *i, ulong val) · 1 unmodified line
25312586 if(val == DNofill)
25322587 return;
25332588
2534− bits = _rgbatoimg(i, val);
2589+ bits = rgbatoimg(i, val);
25352590 switch(i->depth){
25362591 case 24: /* 24-bit images suck */
25372592 for(y=i->r.min.y; y<i->r.max.y; y++)
libmemdraw/drawtest.c+0−1004
@@ -1,1004 +0,0 @@
1−#include <u.h>
2−#include <libc.h>
3−#include <bio.h>
4−#include <draw.h>
5−#include <memdraw.h>
6−
7−#define DBG if(0)
8−#define RGB2K(r,g,b) ((299*((ulong)(r))+587*((ulong)(g))+114*((ulong)(b)))/1000)
9−
10−/*
11− * This program tests the 'memimagedraw' primitive stochastically.
12− * It tests the combination aspects of it thoroughly, but since the
13− * three images it uses are disjoint, it makes no check of the
14− * correct behavior when images overlap. That is, however, much
15− * easier to get right and to test.
16− */
17−
18−void drawonepixel(Memimage*, Point, Memimage*, Point, Memimage*, Point);
19−void verifyone(void);
20−void verifyline(void);
21−void verifyrect(void);
22−void verifyrectrepl(int, int);
23−void putpixel(Memimage *img, Point pt, ulong nv);
24−ulong rgbatopix(uchar, uchar, uchar, uchar);
25−
26−char *dchan, *schan, *mchan;
27−int dbpp, sbpp, mbpp;
28−
29−int drawdebug=0;
30−int seed;
31−int niters = 100;
32−int dbpp; /* bits per pixel in destination */
33−int sbpp; /* bits per pixel in src */
34−int mbpp; /* bits per pixel in mask */
35−int dpm; /* pixel mask at high part of byte, in destination */
36−int nbytes; /* in destination */
37−
38−int Xrange = 64;
39−int Yrange = 8;
40−
41−Memimage *dst;
42−Memimage *src;
43−Memimage *mask;
44−Memimage *stmp;
45−Memimage *mtmp;
46−Memimage *ones;
47−uchar *dstbits;
48−uchar *srcbits;
49−uchar *maskbits;
50−ulong *savedstbits;
51−
52−void
53−rdb(void)
54−{
55−}
56−
57−int
58−iprint(char *fmt, ...)
59−{
60− int n;
61− va_list va;
62− char buf[1024];
63−
64− va_start(va, fmt);
65− n = doprint(buf, buf+sizeof buf, fmt, va) - buf;
66− va_end(va);
67−
68− write(1,buf,n);
69− return 1;
70−}
71−
72−void
73−main(int argc, char *argv[])
74−{
75− memimageinit();
76− seed = time(0);
77−
78− ARGBEGIN{
79− case 'x':
80− Xrange = atoi(ARGF());
81− break;
82− case 'y':
83− Yrange = atoi(ARGF());
84− break;
85− case 'n':
86− niters = atoi(ARGF());
87− break;
88− case 's':
89− seed = atoi(ARGF());
90− break;
91− }ARGEND
92−
93− dchan = "r8g8b8";
94− schan = "r8g8b8";
95− mchan = "r8g8b8";
96− switch(argc){
97− case 3: mchan = argv[2];
98− case 2: schan = argv[1];
99− case 1: dchan = argv[0];
100− case 0: break;
101− default: goto Usage;
102− Usage:
103− fprint(2, "usage: dtest [dchan [schan [mchan]]]\n");
104− exits("usage");
105− }
106−
107− fmtinstall('b', numbconv); /* binary! */
108−
109− fprint(2, "%s -x %d -y %d -s 0x%x %s %s %s\n", argv0, Xrange, Yrange, seed, dchan, schan, mchan);
110− srand(seed);
111−
112− dst = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(dchan));
113− src = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(schan));
114− mask = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(mchan));
115− stmp = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(schan));
116− mtmp = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(mchan));
117− ones = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(mchan));
118−// print("chan %lux %lux %lux %lux %lux %lux\n", dst->chan, src->chan, mask->chan, stmp->chan, mtmp->chan, ones->chan);
119− if(dst==0 || src==0 || mask==0 || mtmp==0 || ones==0) {
120− Alloc:
121− fprint(2, "dtest: allocation failed: %r\n");
122− exits("alloc");
123− }
124− nbytes = (4*Xrange+4)*Yrange;
125− srcbits = malloc(nbytes);
126− dstbits = malloc(nbytes);
127− maskbits = malloc(nbytes);
128− savedstbits = malloc(nbytes);
129− if(dstbits==0 || srcbits==0 || maskbits==0 || savedstbits==0)
130− goto Alloc;
131− dbpp = dst->depth;
132− sbpp = src->depth;
133− mbpp = mask->depth;
134− dpm = 0xFF ^ (0xFF>>dbpp);
135− memset(ones->data->bdata, 0xFF, ones->width*sizeof(ulong)*Yrange);
136−
137−
138− fprint(2, "dtest: verify single pixel operation\n");
139− verifyone();
140−
141− fprint(2, "dtest: verify full line non-replicated\n");
142− verifyline();
143−
144− fprint(2, "dtest: verify full rectangle non-replicated\n");
145− verifyrect();
146−
147− fprint(2, "dtest: verify full rectangle source replicated\n");
148− verifyrectrepl(1, 0);
149−
150− fprint(2, "dtest: verify full rectangle mask replicated\n");
151− verifyrectrepl(0, 1);
152−
153− fprint(2, "dtest: verify full rectangle source and mask replicated\n");
154− verifyrectrepl(1, 1);
155−
156− exits(0);
157−}
158−
159−/*
160− * Dump out an ASCII representation of an image. The label specifies
161− * a list of characters to put at various points in the picture.
162− */
163−static void
164−Bprintr5g6b5(Biobuf *bio, char*, ulong v)
165−{
166− int r,g,b;
167− r = (v>>11)&31;
168− g = (v>>5)&63;
169− b = v&31;
170− Bprint(bio, "%.2x%.2x%.2x", r,g,b);
171−}
172−
173−static void
174−Bprintr5g5b5a1(Biobuf *bio, char*, ulong v)
175−{
176− int r,g,b,a;
177− r = (v>>11)&31;
178− g = (v>>6)&31;
179− b = (v>>1)&31;
180− a = v&1;
181− Bprint(bio, "%.2x%.2x%.2x%.2x", r,g,b,a);
182−}
183−
184−void
185−dumpimage(char *name, Memimage *img, void *vdata, Point labelpt)
186−{
187− Biobuf b;
188− uchar *data;
189− uchar *p;
190− char *arg;
191− void (*fmt)(Biobuf*, char*, ulong);
192− int npr, x, y, nb, bpp;
193− ulong v, mask;
194− Rectangle r;
195−
196− fmt = nil;
197− arg = nil;
198− switch(img->depth){
199− case 1:
200− case 2:
201− case 4:
202− fmt = (void(*)(Biobuf*,char*,ulong))Bprint;
203− arg = "%.1ux";
204− break;
205− case 8:
206− fmt = (void(*)(Biobuf*,char*,ulong))Bprint;
207− arg = "%.2ux";
208− break;
209− case 16:
210− arg = nil;
211− if(img->chan == RGB16)
212− fmt = Bprintr5g6b5;
213− else{
214− fmt = (void(*)(Biobuf*,char*,ulong))Bprint;
215− arg = "%.4ux";
216− }
217− break;
218− case 24:
219− fmt = (void(*)(Biobuf*,char*,ulong))Bprint;
220− arg = "%.6lux";
221− break;
222− case 32:
223− fmt = (void(*)(Biobuf*,char*,ulong))Bprint;
224− arg = "%.8lux";
225− break;
226− }
227− if(fmt == nil){
228− fprint(2, "bad format\n");
229− abort();
230− }
231−
232− r = img->r;
233− Binit(&b, 2, OWRITE);
234− data = vdata;
235− bpp = img->depth;
236− Bprint(&b, "%s\t%d\tr %R clipr %R repl %d data %p *%P\n", name, r.min.x, r, img->clipr, (img->flags&Frepl) ? 1 : 0, vdata, labelpt);
237− mask = (1ULL<<bpp)-1;
238−// for(y=r.min.y; y<r.max.y; y++){
239− for(y=0; y<Yrange; y++){
240− nb = 0;
241− v = 0;
242− p = data+(byteaddr(img, Pt(0,y))-(uchar*)img->data->bdata);
243− Bprint(&b, "%-4d\t", y);
244−// for(x=r.min.x; x<r.max.x; x++){
245− for(x=0; x<Xrange; x++){
246− if(x==0)
247− Bprint(&b, "\t");
248−
249− if(x != 0 && (x%8)==0)
250− Bprint(&b, " ");
251−
252− npr = 0;
253− if(x==labelpt.x && y==labelpt.y){
254− Bprint(&b, "*");
255− npr++;
256− }
257− if(npr == 0)
258− Bprint(&b, " ");
259−
260− while(nb < bpp){
261− v &= (1<<nb)-1;
262− v |= (ulong)(*p++) << nb;
263− nb += 8;
264− }
265− nb -= bpp;
266−// print("bpp %d v %.8lux mask %.8lux nb %d\n", bpp, v, mask, nb);
267− fmt(&b, arg, (v>>nb)&mask);
268− }
269− Bprint(&b, "\n");
270− }
271− Bterm(&b);
272−}
273−
274−/*
275− * Verify that the destination pixel has the specified value.
276− * The value is in the high bits of v, suitably masked, but must
277− * be extracted from the destination Memimage.
278− */
279−void
280−checkone(Point p, Point sp, Point mp)
281−{
282− int delta;
283− uchar *dp, *sdp;
284−
285− delta = (uchar*)byteaddr(dst, p)-(uchar*)dst->data->bdata;
286− dp = (uchar*)dst->data->bdata+delta;
287− sdp = (uchar*)savedstbits+delta;
288−
289− if(memcmp(dp, sdp, (dst->depth+7)/8) != 0) {
290− fprint(2, "dtest: one bad pixel drawing at dst %P from source %P mask %P\n", p, sp, mp);
291− fprint(2, " %.2ux %.2ux %.2ux %.2ux should be %.2ux %.2ux %.2ux %.2ux\n",
292− dp[0], dp[1], dp[2], dp[3], sdp[0], sdp[1], sdp[2], sdp[3]);
293− fprint(2, "addresses dst %p src %p mask %p\n", dp, byteaddr(src, sp), byteaddr(mask, mp));
294− dumpimage("src", src, src->data->bdata, sp);
295− dumpimage("mask", mask, mask->data->bdata, mp);
296− dumpimage("origdst", dst, dstbits, p);
297− dumpimage("dst", dst, dst->data->bdata, p);
298− dumpimage("gooddst", dst, savedstbits, p);
299− abort();
300− }
301−}
302−
303−/*
304− * Verify that the destination line has the same value as the saved line.
305− */
306−#define RECTPTS(r) (r).min.x, (r).min.y, (r).max.x, (r).max.y
307−void
308−checkline(Rectangle r, Point sp, Point mp, int y, Memimage *stmp, Memimage *mtmp)
309−{
310− ulong *dp;
311− int nb;
312− ulong *saved;
313−
314− dp = wordaddr(dst, Pt(0, y));
315− saved = savedstbits + y*dst->width;
316− if(dst->depth < 8)
317− nb = Xrange/(8/dst->depth);
318− else
319− nb = Xrange*(dst->depth/8);
320− if(memcmp(dp, saved, nb) != 0){
321− fprint(2, "dtest: bad line at y=%d; saved %p dp %p\n", y, saved, dp);
322− fprint(2, "draw dst %R src %P mask %P\n", r, sp, mp);
323− dumpimage("src", src, src->data->bdata, sp);
324− if(stmp) dumpimage("stmp", stmp, stmp->data->bdata, sp);
325− dumpimage("mask", mask, mask->data->bdata, mp);
326− if(mtmp) dumpimage("mtmp", mtmp, mtmp->data->bdata, mp);
327− dumpimage("origdst", dst, dstbits, r.min);
328− dumpimage("dst", dst, dst->data->bdata, r.min);
329− dumpimage("gooddst", dst, savedstbits, r.min);
330− abort();
331− }
332−}
333−
334−/*
335− * Fill the bits of an image with random data.
336− * The Memimage parameter is used only to make sure
337− * the data is well formatted: only ucbits is written.
338− */
339−void
340−fill(Memimage *img, uchar *ucbits)
341−{
342− int i, x, y;
343− ushort *up;
344− uchar alpha, r, g, b;
345− void *data;
346−
347− if((img->flags&Falpha) == 0){
348− up = (ushort*)ucbits;
349− for(i=0; i<nbytes/2; i++)
350− *up++ = lrand() >> 7;
351− if(i+i != nbytes)
352− *(uchar*)up = lrand() >> 7;
353− }else{
354− data = img->data->bdata;
355− img->data->bdata = ucbits;
356−
357− for(x=img->r.min.x; x<img->r.max.x; x++)
358− for(y=img->r.min.y; y<img->r.max.y; y++){
359− alpha = rand() >> 4;
360− r = rand()%(alpha+1);
361− g = rand()%(alpha+1);
362− b = rand()%(alpha+1);
363− putpixel(img, Pt(x,y), rgbatopix(r,g,b,alpha));
364− }
365− img->data->bdata = data;
366− }
367−
368−}
369−
370−/*
371− * Mask is preset; do the rest
372− */
373−void
374−verifyonemask(void)
375−{
376− Point dp, sp, mp;
377−
378− fill(dst, dstbits);
379− fill(src, srcbits);
380− memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange);
381− memmove(src->data->bdata, srcbits, src->width*sizeof(ulong)*Yrange);
382− memmove(mask->data->bdata, maskbits, mask->width*sizeof(ulong)*Yrange);
383−
384− dp.x = nrand(Xrange);
385− dp.y = nrand(Yrange);
386−
387− sp.x = nrand(Xrange);
388− sp.y = nrand(Yrange);
389−
390− mp.x = nrand(Xrange);
391− mp.y = nrand(Yrange);
392−
393− drawonepixel(dst, dp, src, sp, mask, mp);
394− memmove(mask->data->bdata, maskbits, mask->width*sizeof(ulong)*Yrange);
395− memmove(savedstbits, dst->data->bdata, dst->width*sizeof(ulong)*Yrange);
396−
397− memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange);
398− memimagedraw(dst, Rect(dp.x, dp.y, dp.x+1, dp.y+1), src, sp, mask, mp, SoverD);
399− memmove(mask->data->bdata, maskbits, mask->width*sizeof(ulong)*Yrange);
400−
401− checkone(dp, sp, mp);
402−}
403−
404−void
405−verifyone(void)
406−{
407− int i;
408−
409− /* mask all zeros */
410− memset(maskbits, 0, nbytes);
411− for(i=0; i<niters; i++)
412− verifyonemask();
413−
414− /* mask all ones */
415− memset(maskbits, 0xFF, nbytes);
416− for(i=0; i<niters; i++)
417− verifyonemask();
418−
419− /* random mask */
420− for(i=0; i<niters; i++){
421− fill(mask, maskbits);
422− verifyonemask();
423− }
424−}
425−
426−/*
427− * Mask is preset; do the rest
428− */
429−void
430−verifylinemask(void)
431−{
432− Point sp, mp, tp, up;
433− Rectangle dr;
434− int x;
435−
436− fill(dst, dstbits);
437− fill(src, srcbits);
438− memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange);
439− memmove(src->data->bdata, srcbits, src->width*sizeof(ulong)*Yrange);
440− memmove(mask->data->bdata, maskbits, mask->width*sizeof(ulong)*Yrange);
441−
442− dr.min.x = nrand(Xrange-1);
443− dr.min.y = nrand(Yrange-1);
444− dr.max.x = dr.min.x + 1 + nrand(Xrange-1-dr.min.x);
445− dr.max.y = dr.min.y + 1;
446−
447− sp.x = nrand(Xrange);
448− sp.y = nrand(Yrange);
449−
450− mp.x = nrand(Xrange);
451− mp.y = nrand(Yrange);
452−
453− tp = sp;
454− up = mp;
455− for(x=dr.min.x; x<dr.max.x && tp.x<Xrange && up.x<Xrange; x++,tp.x++,up.x++)
456− memimagedraw(dst, Rect(x, dr.min.y, x+1, dr.min.y+1), src, tp, mask, up, SoverD);
457− memmove(savedstbits, dst->data->bdata, dst->width*sizeof(ulong)*Yrange);
458−
459− memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange);
460−
461− memimagedraw(dst, dr, src, sp, mask, mp, SoverD);
462− checkline(dr, drawrepl(src->r, sp), drawrepl(mask->r, mp), dr.min.y, nil, nil);
463−}
464−
465−void
466−verifyline(void)
467−{
468− int i;
469−
470− /* mask all ones */
471− memset(maskbits, 0xFF, nbytes);
472− for(i=0; i<niters; i++)
473− verifylinemask();
474−
475− /* mask all zeros */
476− memset(maskbits, 0, nbytes);
477− for(i=0; i<niters; i++)
478− verifylinemask();
479−
480− /* random mask */
481− for(i=0; i<niters; i++){
482− fill(mask, maskbits);
483− verifylinemask();
484− }
485−}
486−
487−/*
488− * Mask is preset; do the rest
489− */
490−void
491−verifyrectmask(void)
492−{
493− Point sp, mp, tp, up;
494− Rectangle dr;
495− int x, y;
496−
497− fill(dst, dstbits);
498− fill(src, srcbits);
499− memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange);
500− memmove(src->data->bdata, srcbits, src->width*sizeof(ulong)*Yrange);
501− memmove(mask->data->bdata, maskbits, mask->width*sizeof(ulong)*Yrange);
502−
503− dr.min.x = nrand(Xrange-1);
504− dr.min.y = nrand(Yrange-1);
505− dr.max.x = dr.min.x + 1 + nrand(Xrange-1-dr.min.x);
506− dr.max.y = dr.min.y + 1 + nrand(Yrange-1-dr.min.y);
507−
508− sp.x = nrand(Xrange);
509− sp.y = nrand(Yrange);
510−
511− mp.x = nrand(Xrange);
512− mp.y = nrand(Yrange);
513−
514− tp = sp;
515− up = mp;
516− for(y=dr.min.y; y<dr.max.y && tp.y<Yrange && up.y<Yrange; y++,tp.y++,up.y++){
517− for(x=dr.min.x; x<dr.max.x && tp.x<Xrange && up.x<Xrange; x++,tp.x++,up.x++)
518− memimagedraw(dst, Rect(x, y, x+1, y+1), src, tp, mask, up, SoverD);
519− tp.x = sp.x;
520− up.x = mp.x;
521− }
522− memmove(savedstbits, dst->data->bdata, dst->width*sizeof(ulong)*Yrange);
523−
524− memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange);
525−
526− memimagedraw(dst, dr, src, sp, mask, mp, SoverD);
527− for(y=0; y<Yrange; y++)
528− checkline(dr, drawrepl(src->r, sp), drawrepl(mask->r, mp), y, nil, nil);
529−}
530−
531−void
532−verifyrect(void)
533−{
534− int i;
535−
536− /* mask all zeros */
537− memset(maskbits, 0, nbytes);
538− for(i=0; i<niters; i++)
539− verifyrectmask();
540−
541− /* mask all ones */
542− memset(maskbits, 0xFF, nbytes);
543− for(i=0; i<niters; i++)
544− verifyrectmask();
545−
546− /* random mask */
547− for(i=0; i<niters; i++){
548− fill(mask, maskbits);
549− verifyrectmask();
550− }
551−}
552−
553−Rectangle
554−randrect(void)
555−{
556− Rectangle r;
557−
558− r.min.x = nrand(Xrange-1);
559− r.min.y = nrand(Yrange-1);
560− r.max.x = r.min.x + 1 + nrand(Xrange-1-r.min.x);
561− r.max.y = r.min.y + 1 + nrand(Yrange-1-r.min.y);
562− return r;
563−}
564−
565−/*
566− * Return coordinate corresponding to x withing range [minx, maxx)
567− */
568−int
569−tilexy(int minx, int maxx, int x)
570−{
571− int sx;
572−
573− sx = (x-minx) % (maxx-minx);
574− if(sx < 0)
575− sx += maxx-minx;
576− return sx+minx;
577−}
578−
579−void
580−replicate(Memimage *i, Memimage *tmp)
581−{
582− Rectangle r, r1;
583− int x, y, nb;
584−
585− /* choose the replication window (i->r) */
586− r.min.x = nrand(Xrange-1);
587− r.min.y = nrand(Yrange-1);
588− /* make it trivial more often than pure chance allows */
589− switch(lrand()&0){
590− case 1:
591− r.max.x = r.min.x + 2;
592− r.max.y = r.min.y + 2;
593− if(r.max.x < Xrange && r.max.y < Yrange)
594− break;
595− /* fall through */
596− case 0:
597− r.max.x = r.min.x + 1;
598− r.max.y = r.min.y + 1;
599− break;
600− default:
601− if(r.min.x+3 >= Xrange)
602− r.max.x = Xrange;
603− else
604− r.max.x = r.min.x+3 + nrand(Xrange-(r.min.x+3));
605−
606− if(r.min.y+3 >= Yrange)
607− r.max.y = Yrange;
608− else
609− r.max.y = r.min.y+3 + nrand(Yrange-(r.min.y+3));
610− }
611− assert(r.min.x >= 0);
612− assert(r.max.x <= Xrange);
613− assert(r.min.y >= 0);
614− assert(r.max.y <= Yrange);
615− /* copy from i to tmp so we have just the replicated bits */
616− nb = tmp->width*sizeof(ulong)*Yrange;
617− memset(tmp->data->bdata, 0, nb);
618− memimagedraw(tmp, r, i, r.min, ones, r.min, SoverD);
619− memmove(i->data->bdata, tmp->data->bdata, nb);
620− /* i is now a non-replicated instance of the replication */
621− /* replicate it by hand through tmp */
622− memset(tmp->data->bdata, 0, nb);
623− x = -(tilexy(r.min.x, r.max.x, 0)-r.min.x);
624− for(; x<Xrange; x+=Dx(r)){
625− y = -(tilexy(r.min.y, r.max.y, 0)-r.min.y);
626− for(; y<Yrange; y+=Dy(r)){
627− /* set r1 to instance of tile by translation */
628− r1.min.x = x;
629− r1.min.y = y;
630− r1.max.x = r1.min.x+Dx(r);
631− r1.max.y = r1.min.y+Dy(r);
632− memimagedraw(tmp, r1, i, r.min, ones, r.min, SoverD);
633− }
634− }
635− i->flags |= Frepl;
636− i->r = r;
637− i->clipr = randrect();
638−// fprint(2, "replicate [[%d %d] [%d %d]] [[%d %d][%d %d]]\n", r.min.x, r.min.y, r.max.x, r.max.y,
639−// i->clipr.min.x, i->clipr.min.y, i->clipr.max.x, i->clipr.max.y);
640− tmp->clipr = i->clipr;
641−}
642−
643−/*
644− * Mask is preset; do the rest
645− */
646−void
647−verifyrectmaskrepl(int srcrepl, int maskrepl)
648−{
649− Point sp, mp, tp, up;
650− Rectangle dr;
651− int x, y;
652− Memimage *s, *m;
653−
654−// print("verfrect %d %d\n", srcrepl, maskrepl);
655− src->flags &= ~Frepl;
656− src->r = Rect(0, 0, Xrange, Yrange);
657− src->clipr = src->r;
658− stmp->flags &= ~Frepl;
659− stmp->r = Rect(0, 0, Xrange, Yrange);
660− stmp->clipr = src->r;
661− mask->flags &= ~Frepl;
662− mask->r = Rect(0, 0, Xrange, Yrange);
663− mask->clipr = mask->r;
664− mtmp->flags &= ~Frepl;
665− mtmp->r = Rect(0, 0, Xrange, Yrange);
666− mtmp->clipr = mask->r;
667−
668− fill(dst, dstbits);
669− fill(src, srcbits);
670−
671− memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange);
672− memmove(src->data->bdata, srcbits, src->width*sizeof(ulong)*Yrange);
673− memmove(mask->data->bdata, maskbits, mask->width*sizeof(ulong)*Yrange);
674−
675− if(srcrepl){
676− replicate(src, stmp);
677− s = stmp;
678− }else
679− s = src;
680− if(maskrepl){
681− replicate(mask, mtmp);
682− m = mtmp;
683− }else
684− m = mask;
685−
686− dr = randrect();
687−
688− sp.x = nrand(Xrange);
689− sp.y = nrand(Yrange);
690−
691− mp.x = nrand(Xrange);
692− mp.y = nrand(Yrange);
693−
694−DBG print("smalldraws\n");
695− for(tp.y=sp.y,up.y=mp.y,y=dr.min.y; y<dr.max.y && tp.y<Yrange && up.y<Yrange; y++,tp.y++,up.y++)
696− for(tp.x=sp.x,up.x=mp.x,x=dr.min.x; x<dr.max.x && tp.x<Xrange && up.x<Xrange; x++,tp.x++,up.x++)
697− memimagedraw(dst, Rect(x, y, x+1, y+1), s, tp, m, up, SoverD);
698− memmove(savedstbits, dst->data->bdata, dst->width*sizeof(ulong)*Yrange);
699−
700− memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange);
701−
702−DBG print("bigdraw\n");
703− memimagedraw(dst, dr, src, sp, mask, mp, SoverD);
704− for(y=0; y<Yrange; y++)
705− checkline(dr, drawrepl(src->r, sp), drawrepl(mask->r, mp), y, srcrepl?stmp:nil, maskrepl?mtmp:nil);
706−}
707−
708−void
709−verifyrectrepl(int srcrepl, int maskrepl)
710−{
711− int i;
712−
713− /* mask all ones */
714− memset(maskbits, 0xFF, nbytes);
715− for(i=0; i<niters; i++)
716− verifyrectmaskrepl(srcrepl, maskrepl);
717−
718− /* mask all zeros */
719− memset(maskbits, 0, nbytes);
720− for(i=0; i<niters; i++)
721− verifyrectmaskrepl(srcrepl, maskrepl);
722−
723− /* random mask */
724− for(i=0; i<niters; i++){
725− fill(mask, maskbits);
726− verifyrectmaskrepl(srcrepl, maskrepl);
727− }
728−}
729−
730−/*
731− * Trivial draw implementation.
732− * Color values are passed around as ulongs containing ααRRGGBB
733− */
734−
735−/*
736− * Convert v, which is nhave bits wide, into its nwant bits wide equivalent.
737− * Replicates to widen the value, truncates to narrow it.
738− */
739−ulong
740−replbits(ulong v, int nhave, int nwant)
741−{
742− v &= (1<<nhave)-1;
743− for(; nhave<nwant; nhave*=2)
744− v |= v<<nhave;
745− v >>= (nhave-nwant);
746− return v & ((1<<nwant)-1);
747−}
748−
749−/*
750− * Decode a pixel into the uchar* values.
751− */
752−void
753−pixtorgba(ulong v, uchar *r, uchar *g, uchar *b, uchar *a)
754−{
755− *a = v>>24;
756− *r = v>>16;
757− *g = v>>8;
758− *b = v;
759−}
760−
761−/*
762− * Convert uchar channels into ulong pixel.
763− */
764−ulong
765−rgbatopix(uchar r, uchar g, uchar b, uchar a)
766−{
767− return (a<<24)|(r<<16)|(g<<8)|b;
768−}
769−
770−/*
771− * Retrieve the pixel value at pt in the image.
772− */
773−ulong
774−getpixel(Memimage *img, Point pt)
775−{
776− uchar r, g, b, a, *p;
777− int nbits, npack, bpp;
778− ulong v, c, rbits, bits;
779−
780− r = g = b = 0;
781− a = ~0; /* default alpha is full */
782−
783− p = byteaddr(img, pt);
784− v = p[0]|(p[1]<<8)|(p[2]<<16)|(p[3]<<24);
785− bpp = img->depth;
786− if(bpp<8){
787− /*
788− * Sub-byte greyscale pixels.
789− *
790− * We want to throw away the top pt.x%npack pixels and then use the next bpp bits
791− * in the bottom byte of v. This madness is due to having big endian bits
792− * but little endian bytes.
793− */
794− npack = 8/bpp;
795− v >>= 8 - bpp*(pt.x%npack+1);
796− v &= (1<<bpp)-1;
797− r = g = b = replbits(v, bpp, 8);
798− }else{
799− /*
800− * General case. We need to parse the channel descriptor and do what it says.
801− * In all channels but the color map, we replicate to 8 bits because that's the
802− * precision that all calculations are done at.
803− *
804− * In the case of the color map, we leave the bits alone, in case a color map
805− * with less than 8 bits of index is used. This is currently disallowed, so it's
806− * sort of silly.
807− */
808−
809− for(c=img->chan; c; c>>=8){
810− nbits = NBITS(c);
811− bits = v & ((1<<nbits)-1);
812− rbits = replbits(bits, nbits, 8);
813− v >>= nbits;
814− switch(TYPE(c)){
815− case CRed:
816− r = rbits;
817− break;
818− case CGreen:
819− g = rbits;
820− break;
821− case CBlue:
822− b = rbits;
823− break;
824− case CGrey:
825− r = g = b = rbits;
826− break;
827− case CAlpha:
828− a = rbits;
829− break;
830− case CMap:
831− p = img->cmap->cmap2rgb + 3*bits;
832− r = p[0];
833− g = p[1];
834− b = p[2];
835− break;
836− case CIgnore:
837− break;
838− default:
839− fprint(2, "unknown channel type %lud\n", TYPE(c));
840− abort();
841− }
842− }
843− }
844− return rgbatopix(r, g, b, a);
845−}
846−
847−/*
848− * Return the greyscale equivalent of a pixel.
849− */
850−uchar
851−getgrey(Memimage *img, Point pt)
852−{
853− uchar r, g, b, a;
854− pixtorgba(getpixel(img, pt), &r, &g, &b, &a);
855− return RGB2K(r, g, b);
856−}
857−
858−/*
859− * Return the value at pt in image, if image is interpreted
860− * as a mask. This means the alpha channel if present, else
861− * the greyscale or its computed equivalent.
862− */
863−uchar
864−getmask(Memimage *img, Point pt)
865−{
866− if(img->flags&Falpha)
867− return getpixel(img, pt)>>24;
868− else
869− return getgrey(img, pt);
870−}
871−#undef DBG
872−
873−#define DBG if(0)
874−/*
875− * Write a pixel to img at point pt.
876− *
877− * We do this by reading a 32-bit little endian
878− * value from p and then writing it back
879− * after tweaking the appropriate bits. Because
880− * the data is little endian, we don't have to worry
881− * about what the actual depth is, as long as it is
882− * less than 32 bits.
883− */
884−void
885−putpixel(Memimage *img, Point pt, ulong nv)
886−{
887− uchar r, g, b, a, *p, *q;
888− ulong c, mask, bits, v;
889− int bpp, sh, npack, nbits;
890−
891− pixtorgba(nv, &r, &g, &b, &a);
892−
893− p = byteaddr(img, pt);
894− v = p[0]|(p[1]<<8)|(p[2]<<16)|(p[3]<<24);
895− bpp = img->depth;
896−DBG print("v %.8lux...", v);
897− if(bpp < 8){
898− /*
899− * Sub-byte greyscale pixels. We need to skip the leftmost pt.x%npack pixels,
900− * which is equivalent to skipping the rightmost npack - pt.x%npack - 1 pixels.
901− */
902− npack = 8/bpp;
903− sh = bpp*(npack - pt.x%npack - 1);
904− bits = RGB2K(r,g,b);
905−DBG print("repl %lux 8 %d = %lux...", bits, bpp, replbits(bits, 8, bpp));
906− bits = replbits(bits, 8, bpp);
907− mask = (1<<bpp)-1;
908−DBG print("bits %lux mask %lux sh %d...", bits, mask, sh);
909− mask <<= sh;
910− bits <<= sh;
911−DBG print("(%lux & %lux) | (%lux & %lux)", v, ~mask, bits, mask);
912− v = (v & ~mask) | (bits & mask);
913− } else {
914− /*
915− * General case. We need to parse the channel descriptor again.
916− */
917− sh = 0;
918− for(c=img->chan; c; c>>=8){
919− nbits = NBITS(c);
920− switch(TYPE(c)){
921− case CRed:
922− bits = r;
923− break;
924− case CGreen:
925− bits = g;
926− break;
927− case CBlue:
928− bits = b;
929− break;
930− case CGrey:
931− bits = RGB2K(r, g, b);
932− break;
933− case CAlpha:
934− bits = a;
935− break;
936− case CIgnore:
937− bits = 0;
938− break;
939− case CMap:
940− q = img->cmap->rgb2cmap;
941− bits = q[(r>>4)*16*16+(g>>4)*16+(b>>4)];
942− break;
943− default:
944− SET(bits);
945− fprint(2, "unknown channel type %lud\n", TYPE(c));
946− abort();
947− }
948−
949−DBG print("repl %lux 8 %d = %lux...", bits, nbits, replbits(bits, 8, nbits));
950− if(TYPE(c) != CMap)
951− bits = replbits(bits, 8, nbits);
952− mask = (1<<nbits)-1;
953−DBG print("bits %lux mask %lux sh %d...", bits, mask, sh);
954− bits <<= sh;
955− mask <<= sh;
956− v = (v & ~mask) | (bits & mask);
957− sh += nbits;
958− }
959− }
960−DBG print("v %.8lux\n", v);
961− p[0] = v;
962− p[1] = v>>8;
963− p[2] = v>>16;
964− p[3] = v>>24;
965−}
966−#undef DBG
967−
968−#define DBG if(0)
969−void
970−drawonepixel(Memimage *dst, Point dp, Memimage *src, Point sp, Memimage *mask, Point mp)
971−{
972− uchar m, M, sr, sg, sb, sa, sk, dr, dg, db, da, dk;
973−
974− pixtorgba(getpixel(dst, dp), &dr, &dg, &db, &da);
975− pixtorgba(getpixel(src, sp), &sr, &sg, &sb, &sa);
976− m = getmask(mask, mp);
977− M = 255-(sa*m)/255;
978−
979−DBG print("dst %x %x %x %x src %x %x %x %x m %x = ", dr,dg,db,da, sr,sg,sb,sa, m);
980− if(dst->flags&Fgrey){
981− /*
982− * We need to do the conversion to grey before the alpha calculation
983− * because the draw operator does this, and we need to be operating
984− * at the same precision so we get exactly the same answers.
985− */
986− sk = RGB2K(sr, sg, sb);
987− dk = RGB2K(dr, dg, db);
988− dk = (sk*m + dk*M)/255;
989− dr = dg = db = dk;
990− da = (sa*m + da*M)/255;
991− }else{
992− /*
993− * True color alpha calculation treats all channels (including alpha)
994− * the same. It might have been nice to use an array, but oh well.
995− */
996− dr = (sr*m + dr*M)/255;
997− dg = (sg*m + dg*M)/255;
998− db = (sb*m + db*M)/255;
999− da = (sa*m + da*M)/255;
1000− }
1001−
1002−DBG print("%x %x %x %x\n", dr,dg,db,da);
1003− putpixel(dst, dp, rgbatopix(dr, dg, db, da));
1004−}
libmemdraw/ellipse.c+4−4
@@ -124,7 +124,7 @@ memellipse(Memimage *dst, Point c, int a, int b, int t, Memimage *src, Point sp, · 123 unmodified lines
124124 p.op = op;
125125
126126 u = (t<<1)*(a-b);
127− if((b<a && u>b*b) || (a<b && -u>a*a)) {
127+ if(b<a && u>b*b || a<b && -u>a*a) {
128128 /* if(b<a&&(t<<1)>b*b/a || a<b&&(t<<1)>a*a/b) # very thick */
129129 bellipse(b, newstate(&in, a, b), &p);
130130 return;
@@ -209,7 +209,7 @@ erect(int x0, int y0, int x1, int y1, Param *p) · 78 unmodified lines
209209 {
210210 Rectangle r;
211211
212−/* print("R %d,%d %d,%d\n", x0, y0, x1, y1); */
212+/* print("R %d,%d %d,%d\n", x0, y0, x1, y1); /**/
213213 r = Rect(p->c.x+x0, p->c.y+y0, p->c.x+x1+1, p->c.y+y1+1);
214214 memdraw(p->dst, r, p->src, addpt(p->sp, r.min), memopaque, p00, p->op);
215215 }
@@ -224,7 +224,7 @@ epoint(int x, int y, Param *p) · 8 unmodified lines
224224 Point p0;
225225 Rectangle r;
226226
227−/* print("P%d %d,%d\n", p->t, x, y); */
227+/* print("P%d %d,%d\n", p->t, x, y); /**/
228228 p0 = Pt(p->c.x+x, p->c.y+y);
229229 r = Rpt(addpt(p0, p->disc->r.min), addpt(p0, p->disc->r.max));
230230 memdraw(p->dst, r, p->src, addpt(p->sp, r.min), p->disc, p->disc->r.min, p->op);
@@ -237,7 +237,7 @@ static · 6 unmodified lines
237237 void
238238 eline(int x0, int y0, int x1, int y1, Param *p)
239239 {
240−/* print("L%d %d,%d %d,%d\n", p->t, x0, y0, x1, y1); */
240+/* print("L%d %d,%d %d,%d\n", p->t, x0, y0, x1, y1); /**/
241241 if(x1 > x0+1)
242242 erect(x0+1, y0-p->t, x1-1, y1+p->t, p);
243243 else if(y1 > y0+1)
libmemdraw/fillpoly.c+1−3
@@ -26,7 +26,6 @@ static int zcompare(const void*, const void*); · 25 unmodified lines
2626 static void xscan(Memimage *dst, Seg **seg, Seg *segtab, int nseg, int wind, Memimage *src, Point sp, int, int, int, int);
2727 static void yscan(Memimage *dst, Seg **seg, Seg *segtab, int nseg, int wind, Memimage *src, Point sp, int, int);
2828
29−#ifdef NOT
3029 static void
3130 fillcolor(Memimage *dst, int left, int right, int y, Memimage *src, Point p)
3231 {
@@ -38,7 +37,6 @@ fillcolor(Memimage *dst, int left, int right, int y, Memimage *src, Point p) · 5 unmodified lines
3837 p.y = y;
3938 memset(byteaddr(dst, p), srcval, right-left);
4039 }
41−#endif
4240
4341 static void
4442 fillline(Memimage *dst, int left, int right, int y, Memimage *src, Point p, int op)
@@ -81,7 +79,7 @@ _memfillpolysc(Memimage *dst, Point *vert, int nvert, int w, Memimage *src, Poin · 36 unmodified lines
8179 Point p0;
8280 int i;
8381
84− if(nvert == 0)
82+ if(nvert <= 0)
8583 return;
8684
8785 seg = malloc((nvert+2)*sizeof(Seg*));
libmemdraw/line.c+2−3
@@ -11,7 +11,6 @@ enum · 10 unmodified lines
1111 Arrow3 = 3,
1212 };
1313
14−#ifdef NOT
1514 static
1615 int
1716 lmin(int a, int b)
@@ -20,7 +19,6 @@ lmin(int a, int b) · 2 unmodified lines
2019 return a;
2120 return b;
2221 }
23−#endif
2422
2523 static
2624 int
@@ -370,6 +368,7 @@ _memimageline(Memimage *dst, Point p0, Point p1, int end0, int end1, int radius, · 343 unmodified lines
370368 r.max.y += radius+1;
371369 }
372370 oclipr = dst->clipr;
371+ sp = addpt(r.min, d);
373372 dst->clipr = clipr;
374373 memimagedraw(dst, r, src, sp, memopaque, sp, op);
375374 dst->clipr = oclipr;
@@ -422,7 +421,7 @@ _memimageline(Memimage *dst, Point p0, Point p1, int end0, int end1, int radius, · 46 unmodified lines
422421 break;
423422 case Endarrow:
424423 arrowend(q, pp, end1, sin, cos, radius);
425− _memfillpolysc(dst, pp, 5, ~0, src, addpt(pts[0], mulpt(d, ICOSSCALE)), 1, 10, 1, op);
424+ _memfillpolysc(dst, pp, 5, ~0, src, addpt(pp[0], mulpt(d, ICOSSCALE)), 1, 10, 1, op);
426425 pp[1] = pp[4];
427426 pp += 2;
428427 }
libmemdraw/load.c+9−2
@@ -4,13 +4,20 @@ · 3 unmodified lines
44 #include <memdraw.h>
55
66 int
7−_loadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata)
7+loadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata)
88 {
99 int y, l, lpart, rpart, mx, m, mr;
10+ Memdrawparam par;
1011 uchar *q;
1112
12− if(!rectinrect(r, i->r))
13+ if(badrect(r) || !rectinrect(r, i->r))
1314 return -1;
15+
16+ memset(&par, 0, sizeof par);
17+ par.dst = i;
18+ par.r = r;
19+ hwdraw(&par);
20+
1421 l = bytesperline(r, i->depth);
1522 if(ndata < l*Dy(r))
1623 return -1;
libmemdraw/openmemsubfont.c+9−6
@@ -20,15 +20,19 @@ openmemsubfont(char *name) · 19 unmodified lines
2020 i = readmemimage(fd);
2121 if(i == nil)
2222 goto Err;
23− if(read(fd, hdr, 3*12) != 3*12){
23+ if(readn(fd, hdr, 3*12) != 3*12){
2424 werrstr("openmemsubfont: header read error: %r");
2525 goto Err;
2626 }
2727 n = atoi(hdr);
28+ if(n <= 0 || n > 0x7fff){
29+ werrstr("openmemsubfont: bad fontchar count %d", n);
30+ goto Err;
31+ }
2832 p = malloc(6*(n+1));
2933 if(p == nil)
3034 goto Err;
31− if(read(fd, p, 6*(n+1)) != 6*(n+1)){
35+ if(readn(fd, p, 6*(n+1)) != 6*(n+1)){
3236 werrstr("openmemsubfont: fontchar read error: %r");
3337 goto Err;
3438 }
@@ -41,13 +45,12 @@ openmemsubfont(char *name) · 6 unmodified lines
4145 free(fc);
4246 goto Err;
4347 }
48+ close(fd);
4449 free(p);
4550 return sf;
4651 Err:
4752 close(fd);
48− if (i != nil)
49− freememimage(i);
50− if (p != nil)
51− free(p);
53+ free(p);
54+ freememimage(i);
5255 return nil;
5356 }
libmemdraw/read.c+0−4
@@ -85,10 +85,6 @@ readmemimage(int fd) · 84 unmodified lines
8585 dy = maxy - miny;
8686 if(dy*l > chunk)
8787 dy = chunk/l;
88− if(dy <= 0){
89− werrstr("readmemimage: image too wide for buffer");
90− goto Err;
91− }
9288 n = dy*l;
9389 m = readn(fd, tmp, n);
9490 if(m != n){
libmemdraw/string.c+3−4
@@ -13,7 +13,7 @@ memimagestring(Memimage *b, Point p, Memimage *color, Point cp, Memsubfont *f, c · 12 unmodified lines
1313 Fontchar *i;
1414
1515 s = (uchar*)cs;
16− for(; (c=*s); p.x+=width, cp.x+=width){
16+ for(; c=*s; p.x+=width, cp.x+=width){
1717 width = 0;
1818 if(c < Runeself)
1919 s++;
@@ -27,8 +27,7 @@ memimagestring(Memimage *b, Point p, Memimage *color, Point cp, Memsubfont *f, c · 7 unmodified lines
2727 }
2828 if(c >= f->n)
2929 continue;
30−// i = f->info+c;
31− i = &(f->info[c]);
30+ i = f->info+c;
3231 width = i->width;
3332 memdraw(b, Rect(p.x+i->left, p.y+i->top, p.x+i->left+(i[1].x-i[0].x), p.y+i->bottom),
3433 color, cp, f->bits, Pt(i->x, i->top), SoverD);
@@ -47,7 +46,7 @@ memsubfontwidth(Memsubfont *f, char *cs) · 12 unmodified lines
4746
4847 p = Pt(0, f->height);
4948 s = (uchar*)cs;
50− for(; (c=*s); p.x+=width){
49+ for(; c=*s; p.x+=width){
5150 width = 0;
5251 if(c < Runeself)
5352 s++;
libmemdraw/subfont.c+1−0
@@ -30,5 +30,6 @@ freememsubfont(Memsubfont *f) · 29 unmodified lines
3030 return;
3131 free(f->info); /* note: f->info must have been malloc'ed! */
3232 freememimage(f->bits);
33+ free(f->name);
3334 free(f);
3435 }
libmemdraw/unload.c+1−1
@@ -9,7 +9,7 @@ unloadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata) · 8 unmodified lines
99 int y, l;
1010 uchar *q;
1111
12− if(!rectinrect(r, i->r))
12+ if(badrect(r) || !rectinrect(r, i->r))
1313 return -1;
1414 l = bytesperline(r, i->depth);
1515 if(ndata < l*Dy(r))
libmemdraw/write.c+21−15
@@ -27,12 +27,10 @@ writememimage(int fd, Memimage *i) · 26 unmodified lines
2727 uchar *line, *eline; /* input line, end pointer */
2828 uchar *data, *edata; /* input buffer, end pointer */
2929 ulong n; /* length of input buffer */
30− ulong nb; /* # of bytes returned by unloadimage */
3130 int bpl; /* input line length */
3231 int offs, runlen; /* offset, length of consumed data */
3332 uchar dumpbuf[NDUMP]; /* dump accumulator */
3433 int ndump; /* length of dump accumulator */
35− int miny, dy; /* y values while unloading input */
3634 int ncblock; /* size of compressed blocks */
3735 Rectangle r;
3836 uchar *p, *q, *s, *es, *t;
@@ -41,28 +39,36 @@ writememimage(int fd, Memimage *i) · 2 unmodified lines
4139
4240 r = i->r;
4341 bpl = bytesperline(r, i->depth);
42+ ncblock = _compblocksize(r, i->depth);
43+ if(ncblock > CHUNK){
44+ sprint(hdr, "%11s %11d %11d %11d %11d ",
45+ chantostr(cbuf, i->chan), r.min.x, r.min.y, r.max.x, r.max.y);
46+ if(write(fd, hdr, 5*12) != 5*12)
47+ return -1;
48+ for(; r.min.y < r.max.y; r.min.y++)
49+ if(write(fd, byteaddr(i, r.min), bpl) != bpl)
50+ return -1;
51+ return 0;
52+ }
53+
4454 n = Dy(r)*bpl;
4555 data = malloc(n);
46− ncblock = _compblocksize(r, i->depth);
56+ if(data == 0){
57+ ErrOut0:
58+ free(data);
59+ return -1;
60+ }
61+ if(unloadmemimage(i, r, data, n) != n)
62+ goto ErrOut0;
4763 outbuf = malloc(ncblock);
4864 hash = malloc(NHASH*sizeof(Hlist));
4965 chain = malloc(NMEM*sizeof(Hlist));
50− if(data == 0 || outbuf == 0 || hash == 0 || chain == 0){
66+ if(outbuf == 0 || hash == 0 || chain == 0){
5167 ErrOut:
52− free(data);
5368 free(outbuf);
5469 free(hash);
5570 free(chain);
56− return -1;
57− }
58− for(miny = r.min.y; miny != r.max.y; miny += dy){
59− dy = r.max.y-miny;
60− if(dy*bpl > CHUNK)
61− dy = CHUNK/bpl;
62− nb = unloadmemimage(i, Rect(r.min.x, miny, r.max.x, miny+dy),
63− data+(miny-r.min.y)*bpl, dy*bpl);
64− if(nb != dy*bpl)
65− goto ErrOut;
71+ goto ErrOut0;
6672 }
6773 sprint(hdr, "compressed\n%11s %11d %11d %11d %11d ",
6874 chantostr(cbuf, i->chan), r.min.x, r.min.y, r.max.x, r.max.y);
libmemlayer/draw.c+2−2
@@ -42,7 +42,7 @@ ldrawop(Memimage *dst, Rectangle screenr, Rectangle clipr, void *etc, int insave · 41 unmodified lines
4242 if(!rectinrect(r, clipr)){
4343 oclipr = dst->clipr;
4444 dst->clipr = clipr;
45− ok = drawclip(dst, &r, d->src, &p0, d->mask, &p1, &srcr, &mr);
45+ ok = drawclipnorepl(dst, &r, d->src, &p0, d->mask, &p1, &srcr, &mr);
4646 dst->clipr = oclipr;
4747 if(!ok)
4848 return;
@@ -74,7 +74,7 @@ if(drawdebug) iprint("mask->layer != nil\n"); · 25 unmodified lines
7474 return;
7575 }
7676
77− if(drawclip(dst, &r, src, &p0, mask, &p1, &srcr, &mr) == 0){
77+ if(drawclipnorepl(dst, &r, src, &p0, mask, &p1, &srcr, &mr) == 0){
7878 if(drawdebug) iprint("drawclip dstcr %R srccr %R maskcr %R\n", dst->clipr, src->clipr, mask->clipr);
7979 return;
8080 }
libmemlayer/lalloc.c+1−1
@@ -19,7 +19,7 @@ memlalloc(Memscreen *s, Rectangle screenr, Refreshfn refreshfn, void *refreshptr · 18 unmodified lines
1919 paint->clipr = Rect(-0x3FFFFFF, -0x3FFFFFF, 0x3FFFFFF, 0x3FFFFFF);
2020 }
2121
22− n = allocmemimaged(screenr, s->image->chan, s->image->data, s->image->X);
22+ n = allocmemimaged(screenr, s->image->chan, s->image->data);
2323 if(n == nil)
2424 return nil;
2525 l = malloc(sizeof(Memlayer));
libmemlayer/lsetrefresh.c+3−3
@@ -10,13 +10,13 @@ memlsetrefresh(Memimage *i, Refreshfn fn, void *ptr) · 9 unmodified lines
1010 Memlayer *l;
1111
1212 l = i->layer;
13− if(l->refreshfn!=0 && fn!=0){ /* just change functions */
13+ if(l->refreshfn!=nil && fn!=nil){ /* just change functions */
1414 l->refreshfn = fn;
1515 l->refreshptr = ptr;
1616 return 1;
1717 }
1818
19− if(l->refreshfn == 0){ /* is using backup image; just free it */
19+ if(l->refreshfn == nil){ /* is using backup image; just free it */
2020 freememimage(l->save);
2121 l->save = nil;
2222 l->refreshfn = fn;
@@ -29,7 +29,7 @@ memlsetrefresh(Memimage *i, Refreshfn fn, void *ptr) · 6 unmodified lines
2929 return 0;
3030 /* easiest way is just to update the entire save area */
3131 l->refreshfn(i, i->r, l->refreshptr);
32− l->refreshfn = 0;
32+ l->refreshfn = nil;
3333 l->refreshptr = nil;
3434 return 1;
3535 }
libmemlayer/unload.c+1−1
@@ -35,7 +35,7 @@ memunload(Memimage *src, Rectangle r, uchar *data, int n) · 34 unmodified lines
3535 * src is an obscured layer or data is unaligned
3636 */
3737 if(dl->save && dx==0){
38− if(dl->refreshfn != 0)
38+ if(dl->refreshfn != nil)
3939 return -1; /* can't unload window if it's not Refbackup */
4040 if(n > 0)
4141 memlhide(src, r);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t