summaryrefslogtreecommitdiff
path: root/b4light.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-13 20:01:33 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-13 20:01:33 -0200
commit6648b49e4fb8461975eff8002e4c84f04b698a5e (patch)
treef820fa4c6c7e3a6f35bc2755437b145262b492cb /b4light.c
parent712cd2c1909dd7a10a5ca98d48605d170321c025 (diff)
Ansification and compile warning fixes.
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, and corrects make distcheck.
Diffstat (limited to 'b4light.c')
-rw-r--r--b4light.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/b4light.c b/b4light.c
index 9a125f9..791f5f5 100644
--- a/b4light.c
+++ b/b4light.c
@@ -289,7 +289,7 @@ main(int argc, char *argv[])
XID kill_id;
Atom kill_type;
int i;
- int (*oldHandler)();
+ int (*oldHandler)(Display*, XErrorEvent*);
Window r;
int x, y;
unsigned int w, h, b, d;
@@ -348,9 +348,9 @@ main(int argc, char *argv[])
AllocateColors();
blank_pix = XCreatePixmap (display, root, 1, 1, 1);
XScreenSaverRegister (display, screen, (XID) blank_pix, XA_PIXMAP);
- bit_0_gc = XCreateGC (display, blank_pix, 0, 0);
+ bit_0_gc = XCreateGC (display, blank_pix, 0, NULL);
XSetForeground (display, bit_0_gc, 0);
- bit_1_gc = XCreateGC (display, blank_pix, 0, 0);
+ bit_1_gc = XCreateGC (display, blank_pix, 0, NULL);
XSetForeground (display, bit_1_gc, ~0);
XFillRectangle (display, blank_pix, bit_0_gc, 0, 0, 1, 1);
info = XScreenSaverAllocInfo ();
@@ -364,14 +364,14 @@ main(int argc, char *argv[])
mask |= CWCursor;
XScreenSaverSetAttributes (display, root, 0, 0,
DisplayWidth (display, screen), DisplayHeight(display, screen), 0,
- CopyFromParent, CopyFromParent, CopyFromParent, mask, &attr);
+ CopyFromParent, CopyFromParent, (Visual *)CopyFromParent, mask, &attr);
XSync (display, False);
- gc = XCreateGC (display, root, 0, 0);
- black_gc = XCreateGC (display, root, 0, 0);
+ gc = XCreateGC (display, root, 0, NULL);
+ black_gc = XCreateGC (display, root, 0, NULL);
XSetForeground (display, black_gc, black_pixel);
if (filled)
{
- erase_gc = XCreateGC (display, root, 0, 0);
+ erase_gc = XCreateGC (display, root, 0, NULL);
XSetBackground (display, erase_gc, 0);
XSetFunction (display, erase_gc, GXxor);
XSetGraphicsExposures (display, erase_gc, False);