summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorftrvxmtrx <ftrvxmtrx@gmail.com>2015-06-09 10:33:30 +0200
committerftrvxmtrx <ftrvxmtrx@gmail.com>2015-06-09 10:33:30 +0200
commita314302e64ffbff295c832edc5cb1e3ef110614a (patch)
tree2e5bca7e026841ef4b53aaaeac0e7021b5741839
parent94333d83ab5df8bd51b148a69a33aa6b335c6fc6 (diff)
downloadplan9front-a314302e64ffbff295c832edc5cb1e3ef110614a.tar.xz
libdraw: sync allocimage/allocwindow prototypes with man pages
-rw-r--r--sys/man/2/allocimage7
-rw-r--r--sys/man/2/subfont2
-rw-r--r--sys/man/2/window4
-rw-r--r--sys/src/libdraw/alloc.c8
-rw-r--r--sys/src/libdraw/window.c8
5 files changed, 15 insertions, 14 deletions
diff --git a/sys/man/2/allocimage b/sys/man/2/allocimage
index 1946a342d..6eef189ab 100644
--- a/sys/man/2/allocimage
+++ b/sys/man/2/allocimage
@@ -13,10 +13,10 @@ allocimage, allocimagemix, freeimage, nameimage, namedimage, setalpha, loadimage
.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 @@ on
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 ,
diff --git a/sys/man/2/subfont b/sys/man/2/subfont
index fb43b2a3c..308aec07a 100644
--- a/sys/man/2/subfont
+++ b/sys/man/2/subfont
@@ -22,7 +22,7 @@ void freesubfont(Subfont *f)
void installsubfont(char *name, Subfont *f)
.PP
.B
-Subfont* lookupsubfont(Subfont *f)
+Subfont* lookupsubfont(Display *d, char *name)
.PP
.B
void uninstallsubfont(Subfont *f)
diff --git a/sys/man/2/window b/sys/man/2/window
index 5fe2b2bfe..95a6e1d3c 100644
--- a/sys/man/2/window
+++ b/sys/man/2/window
@@ -33,7 +33,7 @@ Screen* publicscreen(Display *d, int id, ulong chan)
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 @@ which takes a pointer to the
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
diff --git a/sys/src/libdraw/alloc.c b/sys/src/libdraw/alloc.c
index 7cb6e2d5c..90289a6aa 100644
--- a/sys/src/libdraw/alloc.c
+++ b/sys/src/libdraw/alloc.c
@@ -3,18 +3,18 @@
#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;
}
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 @@ _allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val,
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;
diff --git a/sys/src/libdraw/window.c b/sys/src/libdraw/window.c
index 3f006405c..b4dc7fad9 100644
--- a/sys/src/libdraw/window.c
+++ b/sys/src/libdraw/window.c
@@ -107,18 +107,18 @@ Error:
}
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;