[hackers] [wmii] Fix some bugs.

From: Kris Maglione <jg_AT_suckless.org>
Date: Tue Feb 05 00:38:15 2008

changeset: 2281:a59b47a1ea39
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Mon Feb 04 18:33:57 2008 -0500
summary: Fix some bugs.

diff -r 3a84d2ae4a64 -r a59b47a1ea39 cmd/wmiistartrc.sh
--- a/cmd/wmiistartrc.sh Mon Feb 04 18:19:40 2008 -0500
+++ b/cmd/wmiistartrc.sh Mon Feb 04 18:33:57 2008 -0500
@@ -6,7 +6,7 @@ gconf="CONFPREFIX/wmii-CONFVERSION"
 gconf="CONFPREFIX/wmii-CONFVERSION"
 
 export WMII_CONFPATH="$lconf:$gconf"
-export POSIXLY_CORRECT=gnu_hippies
+#export POSIXLY_CORRECT=gnu_hippies
 
 which="$(which which)"
 if wmii9rc; then
diff -r 3a84d2ae4a64 -r a59b47a1ea39 libwmii_hack/hack.c
--- a/libwmii_hack/hack.c Mon Feb 04 18:19:40 2008 -0500
+++ b/libwmii_hack/hack.c Mon Feb 04 18:33:57 2008 -0500
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <sys/time.h>
 #include <sys/types.h>
+#include <time.h>
 #include <unistd.h>
 
 #include "util.c"
@@ -79,8 +80,7 @@ init(Display *d) { /* Hrm... assumes one
                 unsetenv("WMII_HACK_TAGS");
 
                 n = tokenize(toks, nelem(toks)-1, s, '+');
- toks[n] = 0;
- tags = strlistdup(toks);
+ tags = strlistdup(toks, n);
                 free(s);
         }
         if((s = getenv("WMII_HACK_TIME"))) {
diff -r 3a84d2ae4a64 -r a59b47a1ea39 libwmii_hack/x11.c
--- a/libwmii_hack/x11.c Mon Feb 04 18:19:40 2008 -0500
+++ b/libwmii_hack/x11.c Mon Feb 04 18:33:57 2008 -0500
@@ -151,14 +151,13 @@ strlistdup(char *list[], int n) {
 #endif
 
 static char**
-strlistdup(char *list[]) {
+strlistdup(char *list[], int n) {
         char **p, *q;
- int i, m, n;
-
- n = 0;
+ int i, m;
+
         m = 0;
- for(p=list; *p; p++, n++)
- m += strlen(*p) + 1;
+ for(i=0; i < n; i++)
+ m += strlen(list[i]) + 1;
 
         p = malloc((n+1) * sizeof(*p) + m);
         q = (char*)&p[n+1];
@@ -184,7 +183,7 @@ getprop_textlist(Display *display, Windo
         XGetTextProperty(display, w, &prop, xatom(display, name));
         if(prop.nitems > 0) {
                 if(Xutf8TextPropertyToTextList(display, &prop, &list, &n) == Success) {
- *ret = strlistdup(list);
+ *ret = strlistdup(list, n);
                         XFreeStringList(list);
                 }
                 XFree(prop.value);
diff -r 3a84d2ae4a64 -r a59b47a1ea39 rc/rc.wmii.rc
--- a/rc/rc.wmii.rc Mon Feb 04 18:19:40 2008 -0500
+++ b/rc/rc.wmii.rc Mon Feb 04 18:33:57 2008 -0500
@@ -123,10 +123,10 @@ fn Event-LeftBarMouseDown {
 
 # Actions
 fn Action-rehash {
- comm -23 <{ls `{namespace}/proglist.* >[2]/dev/null | awk -F'\.' '{print $NF}'} \
+ comm -23 <{ls `{namespace}^/proglist.* >[2]/dev/null | awk -F'.' '{print $NF}'} \
                  <{ps | awk '{print $2}'} |
         while(id=`{read})
- rm `{namespace}/proglist.$id
+ rm `{namespace}^/proglist.$id
         wi_proglist $PATH >$progs_file}
 fn Action-quit {
         wmiir xwrite /ctl quit}
@@ -233,7 +233,7 @@ Action overridekeys
 Action overridekeys
 
 # Misc Setup
-progs_file=`{namespace}/proglist.$pid
+progs_file=`{namespace}^/proglist.$pid
 Action status
 Action rehash
 
Received on Tue Feb 05 2008 - 00:38:15 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:59:19 UTC