commit fb790fbac505bc681c06a64d0246e312b185fcea
parent ab5eb008a851dc6997d149eb0d1d0d0768e3b4c7
Author: garbeam <garbeam@localhost.localdomain>
Date: Mon, 5 Dec 2005 03:25:48 +0200
increased warning level, cleaned blitz_strtorect
Diffstat:
8 files changed, 9 insertions(+), 65 deletions(-)
diff --git a/cmd/wm/frame.c b/cmd/wm/frame.c
@@ -557,7 +557,7 @@ static void handle_after_write_frame(IXPServer * s, File * f)
char *size = frames[i]->files[F_SIZE]->content;
if (size && strrchr(size, ',')) {
XRectangle frect;
- blitz_strtorect(dpy, &rect, &frect, size);
+ blitz_strtorect(&rect, &frect, size);
resize_frame(frames[i], &frect, 0, 0);
draw_page(frames[i]->area->page);
}
diff --git a/cmd/wm/layout_dummy.c b/cmd/wm/layout_dummy.c
@@ -1,52 +0,0 @@
-/*
- * (C)opyright MMIV-MMV Anselm R. Garbe <garbeam at gmail dot com>
- * See LICENSE file for license details.
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include "wm.h"
-#include "layout.h"
-
-#include <cext.h>
-
-static void init_dummy(Area * a);
-static void deinit_dummy(Area * a);
-static void arrange_dummy(Area * a);
-static void attach_dummy(Area * a, Client * c);
-static void detach_dummy(Area * a, Client * c, int unmapped, int destroyed);
-static void resize_dummy(Frame * f, XRectangle * new, XPoint * pt);
-
-static Layout ldummy = { "dummy", init_dummy, deinit_dummy, arrange_dummy, attach_dummy, detach_dummy, resize_dummy };
-
-void init_layout_dummy()
-{
- layouts = (Layout **) attach_item_end((void **) layouts, &ldummy, sizeof(Layout *));
-}
-
-
-static void arrange_dummy(Area * a)
-{
-}
-
-static void init_dummy(Area * a)
-{
-}
-
-static void deinit_dummy(Area * a)
-{
-}
-
-static void attach_dummy(Area * a, Client * c)
-{
-}
-
-static void detach_dummy(Area * a, Client * c, int unmapped, int destroyed)
-{
-}
-
-static void resize_dummy(Frame * f, XRectangle * new, XPoint * pt)
-{
-}
diff --git a/cmd/wmibar.c b/cmd/wmibar.c
@@ -361,7 +361,7 @@ static void check_event(Connection * e)
static void update_geometry(char *size)
{
- blitz_strtorect(dpy, &rect, &brect, size);
+ blitz_strtorect(&rect, &brect, size);
if (!brect.width)
brect.width = DisplayWidth(dpy, screen_num);
if (!brect.height)
diff --git a/cmd/wmikeys.c b/cmd/wmikeys.c
@@ -375,7 +375,7 @@ static void handle_after_write(IXPServer * s, File * f)
} else if (files[K_SIZE] == f) {
char *size = files[K_SIZE]->content;
if (size && strrchr(size, ','))
- blitz_strtorect(dpy, &rect, &krect, size);
+ blitz_strtorect(&rect, &krect, size);
} else if (f == files[K_GRAB_KB]) {
grabkb = _strtonum(files[K_GRAB_KB]->content, 0, 1);
if (!grabkb) {
@@ -443,7 +443,7 @@ static void run(char *size)
rect.height = DisplayHeight(dpy, screen_num);
krect.x = krect.y = -1;
krect.width = krect.height = 0;
- blitz_strtorect(dpy, &rect, &krect, size);
+ blitz_strtorect(&rect, &krect, size);
/* default is center position */
if (!krect.width) {
krect.width = 200;
diff --git a/cmd/wmimenu.c b/cmd/wmimenu.c
@@ -564,7 +564,7 @@ static void handle_after_write(IXPServer * s, File * f)
} else if (files[M_SIZE] == f) {
char *size = files[M_SIZE]->content;
if (size && strrchr(size, ',')) {
- blitz_strtorect(dpy, &rect, &mrect, size);
+ blitz_strtorect(&rect, &mrect, size);
XFreePixmap(dpy, pmap);
XMoveResizeWindow(dpy, win, mrect.x, mrect.y,
mrect.width, mrect.height);
@@ -644,7 +644,7 @@ static void run(char *size)
rect.x = rect.y = 0;
rect.width = DisplayWidth(dpy, screen_num);
rect.height = DisplayHeight(dpy, screen_num);
- blitz_strtorect(dpy, &rect, &mrect, size);
+ blitz_strtorect(&rect, &mrect, size);
if (!mrect.width)
mrect.width = DisplayWidth(dpy, screen_num);
if (!mrect.height)
diff --git a/config.mk b/config.mk
@@ -17,7 +17,7 @@ LIBS = -L${LIBDIR} -L/usr/lib -lc -lm -L${X11LIB} -lX11
VERSION = 3-current
# flags
-CFLAGS = -O0 -g -Wall ${INCLUDES} -DVERSION=\"${VERSION}\"
+CFLAGS = -O0 -g -Wall -W ${INCLUDES} -DVERSION=\"${VERSION}\"
LDFLAGS = -g ${LIBS}
# compiler
diff --git a/liblitz/blitz.h b/liblitz/blitz.h
@@ -41,9 +41,7 @@ void blitz_drawmeter(Display * dpy, Draw * r);
void blitz_drawlabelnoborder(Display * dpy, Draw * r);
/* geometry.c */
-int
-blitz_strtorect(Display * dpy, XRectangle * root, XRectangle * r,
- char *val);
+int blitz_strtorect(XRectangle * root, XRectangle * r, char *val);
int blitz_ispointinrect(int x, int y, XRectangle * r);
int blitz_distance(XRectangle * origin, XRectangle * target);
void
diff --git a/liblitz/geometry.c b/liblitz/geometry.c
@@ -46,9 +46,7 @@ static int strtoalign(Align * result, char *val)
* Each component can be of following format:
* <...> = [+|-]0..n|<alignment>[[+|-]0..n]
*/
-int
-blitz_strtorect(Display * dpy, XRectangle * root, XRectangle * r,
- char *val)
+int blitz_strtorect(XRectangle * root, XRectangle * r, char *val)
{
char buf[64];
char *x, *y, *w, *h;