[hackers] [wmii] Fix for 64bit archs again.

From: Kris Maglione <jg_AT_suckless.org>
Date: Tue Jun 26 20:17:24 2007

changeset: 2165:8d79cae4cb0e
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Tue Jun 26 14:16:22 2007 -0400
summary: Fix for 64bit archs again.

diff -r d6404716b170 -r 8d79cae4cb0e cmd/wmii/client.c
--- a/cmd/wmii/client.c Mon Jun 25 19:51:10 2007 -0400
+++ b/cmd/wmii/client.c Tue Jun 26 14:16:22 2007 -0400
@@ -268,7 +268,7 @@ frame_hints(Frame *f, Rectangle r, Align
 
 static void
 set_client_state(Client * c, int state) {
- Atom data[] = { state, None };
+ long data[] = { state, None };
         changeprop(&c->w, "WM_STATE", "WM_STATE", data, nelem(data));
 }
 
@@ -866,7 +866,7 @@ apply_tags(Client *c, const char *tags)
                 cur = nil;
                 if(!strcmp(buf+n, "~"))
                         c->floating = add;
- else if(!strcmp(buf+n, "!"))
+ else if(!strcmp(buf+n, "!") || strcmp(buf+n, "sel"))
                         cur = screen->sel->name;
                 else if(!Mbsearch(buf+n, badtags, bsstrcmp))
                         cur = buf+n;
diff -r d6404716b170 -r 8d79cae4cb0e cmd/wmii/x11.h
--- a/cmd/wmii/x11.h Mon Jun 25 19:51:10 2007 -0400
+++ b/cmd/wmii/x11.h Tue Jun 26 14:16:22 2007 -0400
@@ -113,5 +113,6 @@ XRectangle XRect(Rectangle r);
 #define Pt(x, y) ((Point){(x), (y)})
 #define Rpt(p, q) ((Rectangle){p, q})
 #define Rect(x0, y0, x1, y1) ((Rectangle){Pt(x0, y0), Pt(x1, y1)})
-#define changeprop(w, prop, type, data, n) changeproperty(w, prop, type, (sizeof(*(data))*8), \
- (uchar*)(data), n)
+#define changeprop(w, prop, type, data, n) changeproperty(w, prop, type, ((sizeof(*(data)) == 8 ? 4 : sizeof(*(data))) \
+ * 8), \
+ (uchar*)(data), n)
diff -r d6404716b170 -r 8d79cae4cb0e debian/rules
--- a/debian/rules Mon Jun 25 19:51:10 2007 -0400
+++ b/debian/rules Tue Jun 26 14:16:22 2007 -0400
@@ -12,7 +12,7 @@ UNPATCH=debian/unpatch.ed
 
 CFLAGS = -g -O0
 ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- # wmii is IO, not CPU bound. Please do not use -O2 here.
+ # wmii is IO, not CPU, bound. Please do not use -O2 here.
         CFLAGS += -O
 endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
diff -r d6404716b170 -r 8d79cae4cb0e rc/sh.wmii
--- a/rc/sh.wmii Mon Jun 25 19:51:10 2007 -0400
+++ b/rc/sh.wmii Tue Jun 26 14:16:22 2007 -0400
@@ -209,9 +209,7 @@ fn proglist {
 }
 
 fn getfuns {
- ls -p /env | grep '^fn-' ^ $1 ^ '-' | getlines {
- echo ${re s '^fn-[^-]+-' '' $line}
- }
+ ls -p /env | sed -n 's/^fn-' ^ $1 ^ '-//p'
 }
 
 fn actionlist {
@@ -254,7 +252,7 @@ Action rehash &
 Action rehash &
 
 # Tag Bar Setup
-{ifs:="{echo}; seltag=`{sed 1q /tag/sel/ctl}}
+seltag=${lines sed 1q /tag/sel/ctl}
 comm -13 ${pipe from {read_tags}} ${pipe from {ls -p /lbar/*}} |
         getlines { rm /lbar/$line }
 read_tags | getlines {
@@ -281,3 +279,4 @@ getlines {
         } </dev/null
         dprint loop
 } </event
+
Received on Tue Jun 26 2007 - 20:17:24 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:22 UTC