[hackers] [wmii] Hg sucks at merging.

From: Kris Maglione <jg_AT_suckless.org>
Date: Mon Jan 21 00:31:14 2008

changeset: 2242:e8c80abe2ccb
user: Kris Maglione <jg_AT_suckless.org>
date: Sat Jan 19 22:47:05 2008 -0500
summary: Hg sucks at merging.

diff -r 236c073180ec -r e8c80abe2ccb DISTRIBUTORS
--- a/DISTRIBUTORS Sat Jan 19 22:30:37 2008 -0500
+++ b/DISTRIBUTORS Sat Jan 19 22:47:05 2008 -0500
@@ -5,7 +5,7 @@ When in doubt about any of these conditi
 When in doubt about any of these conditions or other matters
 of packaging or distrobution, , please contact the wmii
 mailing lists <wmii-hackers_AT_suckless.org> or
-<wmii_AT_suckless.org>.
+<wmii_AT_suckless.org>, or Kris Maglione <fbsdaemon_AT_gmail.com>.
 
 Any binary distribution of wmii MUST have a properly set
 version string. This string may normally be set in
diff -r 236c073180ec -r e8c80abe2ccb Makefile
--- a/Makefile Sat Jan 19 22:30:37 2008 -0500
+++ b/Makefile Sat Jan 19 22:47:05 2008 -0500
@@ -24,6 +24,5 @@ deb:
         dpkg-buildpackage -rfakeroot
 
 include ${ROOT}/mk/dir.mk
-include ${ROOT}/mk/common.mk
 INSTDIRS = ${PDIRS}
 
diff -r 236c073180ec -r e8c80abe2ccb cmd/wmii/area.c
--- a/cmd/wmii/area.c Sat Jan 19 22:30:37 2008 -0500
+++ b/cmd/wmii/area.c Sat Jan 19 22:47:05 2008 -0500
@@ -1,13 +1,11 @@
-/* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com>
- * Copyright ©2006-2007 Kris Maglione <fbsdaemon_AT_gmail.com>
+/* Copyright ©2006-2008 Kris Maglione <fbsdaemon_AT_gmail.com>
  * See LICENSE file for license details.
  */
 #include "dat.h"
 #include <assert.h>
 #include <math.h>
+#include <sys/limits.h>
 #include "fns.h"
-
-static void place_frame(Frame *f);
 
 Client*
 area_selclient(Area *a) {
@@ -249,3 +247,4 @@ area_focus(Area *a) {
                         event("ColumnFocus %d\n", area_idx(a));
         }
 }
+
diff -r 236c073180ec -r e8c80abe2ccb cmd/wmii/client.c
--- a/cmd/wmii/client.c Sat Jan 19 22:30:37 2008 -0500
+++ b/cmd/wmii/client.c Sat Jan 19 22:47:05 2008 -0500
@@ -983,7 +983,8 @@ apply_tags(Client *c, const char *tags)
                 else
                 if(!strcmp(buf+n, "!") || !strcmp(buf+n, "sel"))
                         cur = screen->sel->name;
- else if(!Mbsearch(buf+n, badtags, bsstrcmp))
+ else
+ if(!Mbsearch(buf+n, badtags, bsstrcmp))
                         cur = buf+n;
 
                 n = i + 1;
diff -r 236c073180ec -r e8c80abe2ccb cmd/wmii/column.c
--- a/cmd/wmii/column.c Sat Jan 19 22:30:37 2008 -0500
+++ b/cmd/wmii/column.c Sat Jan 19 22:47:05 2008 -0500
@@ -108,18 +108,8 @@ column_remove(Frame *f, bool arrange) {
         }
 }
 
-static Handlers divhandler = {
- .bdown = bdown_event,
- .expose = expose_event,
-};
-
-Area*
-column_new(View *v, Area *pos, uint w) {
- Area *a;
-
- a = area_create(v, pos, w);
- if(!a)
- return nil;
+void
+column_detach(Frame *f) {
 
         column_remove(f, true);
 }
diff -r 236c073180ec -r e8c80abe2ccb cmd/wmii/dat.h
--- a/cmd/wmii/dat.h Sat Jan 19 22:30:37 2008 -0500
+++ b/cmd/wmii/dat.h Sat Jan 19 22:47:05 2008 -0500
@@ -235,6 +235,22 @@ struct View {
         Rectangle r;
 };
 
+/* Yuck. */
+#define VECTOR(type, nam, c) \
+typedef struct Vector_##nam Vector_##nam; \
+struct Vector_##nam { \
+ type* ary; \
+ long n; \
+ long size; \
+}; \
+void vector_##c##free(Vector_##nam*); \
+void vector_##c##init(Vector_##nam*); \
+void vector_##c##push(Vector_##nam*, type); \
+
+VECTOR(long, long, l)
+VECTOR(Rectangle, rect, r)
+#undef VECTOR
+
 #ifndef EXTERN
 # define EXTERN extern
 #endif
diff -r 236c073180ec -r e8c80abe2ccb cmd/wmii/fns.h
--- a/cmd/wmii/fns.h Sat Jan 19 22:30:37 2008 -0500
+++ b/cmd/wmii/fns.h Sat Jan 19 22:47:05 2008 -0500
@@ -38,6 +38,7 @@ void client_destroy(Client*);
 void client_destroy(Client*);
 bool client_floats_p(Client*);
 void client_focus(Client*);
+Frame* client_groupframe(Client*, View*);
 void client_kill(Client*, bool);
 void client_manage(Client*);
 void client_map(Client*);
diff -r 236c073180ec -r e8c80abe2ccb cmd/wmii/fs.c
--- a/cmd/wmii/fs.c Sat Jan 19 22:30:37 2008 -0500
+++ b/cmd/wmii/fs.c Sat Jan 19 22:47:05 2008 -0500
@@ -659,7 +659,7 @@ fs_read(Ixp9Req *r) {
                         respond(r, nil);
                         return;
                 case FsFRctl:
- buf = root_readctl();
+ buf = readctl_root();
                         write_buf(r, buf, strlen(buf));
                         respond(r, nil);
                         return;
diff -r 236c073180ec -r e8c80abe2ccb cmd/wmii/geom.c
--- a/cmd/wmii/geom.c Sat Jan 19 22:30:37 2008 -0500
+++ b/cmd/wmii/geom.c Sat Jan 19 22:47:05 2008 -0500
@@ -88,3 +88,32 @@ get_sticky(Rectangle src, Rectangle dst)
 
         return stickycorner;
 }
+
+/* XXX: These don't belong here. */
+/* Blech. */
+#define VECTOR(type, nam, c) \
+void \
+vector_##c##init(Vector_##nam *v) { \
+ memset(v, 0, sizeof *v); \
+} \
+ \
+void \
+vector_##c##free(Vector_##nam *v) { \
+ free(v->ary); \
+ memset(v, 0, sizeof *v); \
+} \
+ \
+void \
+vector_##c##push(Vector_##nam *v, type val) { \
+ if(v->n == v->size) { \
+ if(v->size == 0) \
+ v->size = 2; \
+ v->size <<= 2; \
+ v->ary = erealloc(v->ary, v->size * sizeof *v->ary); \
+ } \
+ v->ary[v->n++] = val; \
+} \
+
+VECTOR(long, long, l)
+VECTOR(Rectangle, rect, r)
+
diff -r 236c073180ec -r e8c80abe2ccb cmd/wmii/message.c
--- a/cmd/wmii/message.c Sat Jan 19 22:30:37 2008 -0500
+++ b/cmd/wmii/message.c Sat Jan 19 22:47:05 2008 -0500
@@ -705,3 +705,44 @@ msg_sendframe(Frame *f, int sym, bool sw
         view_update_all();
         return nil;
 }
+
+char*
+readctl_root(void) {
+ bufclear();
+ bufprint("view %s\n", screen->sel->name);
+ bufprint("focuscolors %s\n", def.focuscolor.colstr);
+ bufprint("normcolors %s\n", def.normcolor.colstr);
+ bufprint("font %s\n", def.font->name);
+ bufprint("grabmod %s\n", def.grabmod);
+ bufprint("border %d\n", def.border);
+ if(debug) {
+ bufprint("debug ");
+ printdebug();
+ bufprint("\n");
+ }
+ return buffer;
+}
+
+char*
+readctl_view(View *v) {
+ Area *a;
+ uint i;
+
+ bufclear();
+ bufprint("%s\n", v->name);
+
+ /* select <area>[ <frame>] */
+ bufprint("select %s", area_name(v->sel));
+ if(v->sel->sel)
+ bufprint(" %d", frame_idx(v->sel->sel));
+ bufprint("\n");
+
+ /* select client <client> */
+ if(v->sel->sel)
+ bufprint("select client %C\n", v->sel->sel->client);
+
+ for(a = v->area->next, i = 1; a; a = a->next, i++)
+ bufprint("colmode %d %s\n", i, colmode2str(a->mode));
+ return buffer;
+}
+
diff -r 236c073180ec -r e8c80abe2ccb cmd/wmii/mouse.c
--- a/cmd/wmii/mouse.c Sat Jan 19 22:30:37 2008 -0500
+++ b/cmd/wmii/mouse.c Sat Jan 19 22:47:05 2008 -0500
@@ -299,7 +299,7 @@ horiz:
 
                                 r = fw->fprev_r;
                                 if(f->aprev) {
- f->aprev->r.max.y = fw->fr.min.y;
+ f->aprev->r.max.y = r.min.y;
                                         frame_resize(f->aprev, f->aprev->r);
                                 }else
                                         r.min.y = f->area->r.min.y;
diff -r 236c073180ec -r e8c80abe2ccb cmd/wmii/rule.c
--- a/cmd/wmii/rule.c Sat Jan 19 22:30:37 2008 -0500
+++ b/cmd/wmii/rule.c Sat Jan 19 22:47:05 2008 -0500
@@ -42,6 +42,7 @@ update_rules(Rule **rule, const char *da
         char *value_end = value + sizeof(value) - 1;
         char *r, *v;
         const char *p;
+ char c;
         
         SET(r);
         SET(v);
@@ -56,6 +57,10 @@ update_rules(Rule **rule, const char *da
         state = IGNORE;
         for(p = data; (c = *p); p++)
                 switch(state) {
+ case COMMENT:
+ if(c == '\n')
+ state = IGNORE;
+ break;
                 case IGNORE:
                         if(c == '#')
                                 state = COMMENT;
@@ -75,6 +80,7 @@ update_rules(Rule **rule, const char *da
                         else if(c == '/') {
                                 *r = 0;
                                 state = IGNORE;
+ break;
                         }
                         if(r < regex_end)
                                 *r++ = c;
diff -r 236c073180ec -r e8c80abe2ccb cmd/wmii/utf.c
--- a/cmd/wmii/utf.c Sat Jan 19 22:30:37 2008 -0500
+++ b/cmd/wmii/utf.c Sat Jan 19 22:47:05 2008 -0500
@@ -47,7 +47,7 @@ toutf8n(char *str, size_t nstr) {
 }
 
 char*
-toutf8(char *str) {
+toutf8(const char *str) {
         return toutf8n(str, strlen(str));
 }
 
diff -r 236c073180ec -r e8c80abe2ccb cmd/wmiistartrc.sh
--- a/cmd/wmiistartrc.sh Sat Jan 19 22:30:37 2008 -0500
+++ b/cmd/wmiistartrc.sh Sat Jan 19 22:47:05 2008 -0500
@@ -3,15 +3,16 @@
 
 export home="$HOME"
 lconf="$home/.wmii-CONFVERSION"
-gconf="CONFPREFIX/.wmii-CONFVERSION"
+gconf="CONFPREFIX/wmii-CONFVERSION"
 
-export WMII_CONFPATH="$conf:$gconf"
+export WMII_CONFPATH="$lconf:$gconf"
 export POSIXLY_CORRECT=gnu_hippies
 
+which="`which which`"
 if wmii9rc; then
- WMIIRC=`PATH="$WMII_CONFPATH:$PATH" which rc.wmii`
+ WMIIRC=`PATH="$WMII_CONFPATH:$PATH" $which rc.wmii`
 else
- WMIIRC=`PATH="$WMII_CONFPATH:$PATH" which wmiirc`
+ WMIIRC=`PATH="$WMII_CONFPATH:$PATH" $which wmiirc`
 fi
 
 mkdir $conf 2>/dev/null && $gconf/welcome &
diff -r 236c073180ec -r e8c80abe2ccb config.mk
--- a/config.mk Sat Jan 19 22:30:37 2008 -0500
+++ b/config.mk Sat Jan 19 22:47:05 2008 -0500
@@ -18,7 +18,6 @@ LDFLAGS += -g $(LIBS)
 LDFLAGS += -g $(LIBS)
 SOLDFLAGS += $(LDFLAGS)
 STATIC = -static
-MKDEP = cpp -M
 
 # Compiler, Linker. Linker should usually *not* be ld.
 CC = cc -c
diff -r 236c073180ec -r e8c80abe2ccb include/util.h
--- a/include/util.h Sat Jan 19 22:30:37 2008 -0500
+++ b/include/util.h Sat Jan 19 22:47:05 2008 -0500
@@ -1,3 +1,6 @@
+/* Copyright ©2007-2008 Kris Maglione <fbsdaemon_AT_gmail.com>
+ * See LICENSE file for license details.
+ */
 #define nil ((void*)0)
 #define nelem(ary) (sizeof(ary) / sizeof(*ary))
 
diff -r 236c073180ec -r e8c80abe2ccb include/x11.h
--- a/include/x11.h Sat Jan 19 22:30:37 2008 -0500
+++ b/include/x11.h Sat Jan 19 22:47:05 2008 -0500
@@ -1,3 +1,6 @@
+/* Copyright ©2007-2008 Kris Maglione <fbsdaemon_AT_gmail.com>
+ * See LICENSE file for license details.
+ */
 #define Window XWindow
 #define Font XFont
 #define Screen XScreen
diff -r 236c073180ec -r e8c80abe2ccb mk/gcc.mk
--- a/mk/gcc.mk Sat Jan 19 22:30:37 2008 -0500
+++ b/mk/gcc.mk Sat Jan 19 22:47:05 2008 -0500
@@ -1,3 +1,12 @@ CFLAGS += \
+DEBUGCFLAGS = \
+ -g \
+ -O1 \
+ -fno-builtin \
+ -fno-inline \
+ -fno-omit-frame-pointer \
+ -fno-optimize-sibling-calls \
+ -fno-unroll-loops \
+ -DIXPlint
 CFLAGS += \
         -std=c99 \
         -pedantic \
Received on Mon Jan 21 2008 - 00:31:14 UTC

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