ref: a314302e64ffbff295c832edc5cb1e3ef110614a
parent: 94333d83ab5df8bd51b148a69a33aa6b335c6fc6
author: ftrvxmtrx <[email protected]>
date: Tue Jun 9 06:33:30 EDT 2015
libdraw: sync allocimage/allocwindow prototypes with man pages
--- a/sys/man/2/allocimage
+++ b/sys/man/2/allocimage
@@ -13,10 +13,10 @@
.PP
.ta \w'\fLImage 'u
.B
-Image *allocimage(Display *d, Rectangle r,
+Image *allocimage(Display *d, Rectangle r,
.br
.B
- ulong chan, int repl, int col)
+ ulong chan, int repl, ulong col)
.PP
.B
Image *allocimagemix(Display *d, ulong one, ulong three)
@@ -102,7 +102,8 @@
is allocated with
.BR allocimage ;
it will have the rectangle, pixel channel format,
-and replication flag
+replication flag,
+and initial fill color
given by its arguments.
Convenient pixel channels like
.BR GREY1 ,
--- a/sys/man/2/subfont
+++ b/sys/man/2/subfont
@@ -22,7 +22,7 @@
void installsubfont(char *name, Subfont *f)
.PP
.B
-Subfont* lookupsubfont(Subfont *f)
+Subfont* lookupsubfont(Display *d, char *name)
.PP
.B
void uninstallsubfont(Subfont *f)
--- a/sys/man/2/window
+++ b/sys/man/2/window
@@ -33,7 +33,7 @@
int freescreen(Screen *s)
.PP
.B
-Image* allocwindow(Screen *s, Rectangle r, int ref, int val)
+Image* allocwindow(Screen *s, Rectangle r, int ref, int col)
.PP
.B
void bottomwindow(Image *w)
@@ -115,7 +115,7 @@
upon which to create the window, a rectangle
.I r
defining its geometry, an integer pixel value
-.I val
+.I col
to color the window initially, and a refresh method
.BR ref .
The refresh methods are
--- a/sys/src/libdraw/alloc.c
+++ b/sys/src/libdraw/alloc.c
@@ -3,11 +3,11 @@
#include <draw.h>
Image*
-allocimage(Display *d, Rectangle r, ulong chan, int repl, ulong val)
+allocimage(Display *d, Rectangle r, ulong chan, int repl, ulong col)
{
Image *i;
- i = _allocimage(nil, d, r, chan, repl, val, 0, 0);
+ i = _allocimage(nil, d, r, chan, repl, col, 0, 0);
if(i != nil)
setmalloctag(i, getcallerpc(&d));
return i;
@@ -14,7 +14,7 @@
}
Image*
-_allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val, int screenid, int refresh)
+_allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong col, int screenid, int refresh)
{
uchar *a;
char *err;
@@ -73,7 +73,7 @@
BPLONG(a+35, clipr.min.y);
BPLONG(a+39, clipr.max.x);
BPLONG(a+43, clipr.max.y);
- BPLONG(a+47, val);
+ BPLONG(a+47, col);
if(flushimage(d, 0) < 0)
goto Error;
--- a/sys/src/libdraw/window.c
+++ b/sys/src/libdraw/window.c
@@ -107,18 +107,18 @@
}
Image*
-allocwindow(Screen *s, Rectangle r, int ref, ulong val)
+allocwindow(Screen *s, Rectangle r, int ref, ulong col)
{
- return _allocwindow(nil, s, r, ref, val);
+ return _allocwindow(nil, s, r, ref, col);
}
Image*
-_allocwindow(Image *i, Screen *s, Rectangle r, int ref, ulong val)
+_allocwindow(Image *i, Screen *s, Rectangle r, int ref, ulong col)
{
Display *d;
d = s->display;
- i = _allocimage(i, d, r, d->screenimage->chan, 0, val, s->id, ref);
+ i = _allocimage(i, d, r, d->screenimage->chan, 0, col, s->id, ref);
if(i == nil)
return nil;
i->screen = s;