[wiki] [sites] tabbed: update client number patch || Quentin Rameau

From: <git_AT_suckless.org>
Date: Sun, 03 Jan 2016 18:34:01 +0100

commit d44f00541bd3ff5f5bd63bf2ef174c82c87f1c98
Author: Quentin Rameau <quinq_AT_fifth.space>
Date: Sun Jan 3 18:33:17 2016 +0100

    tabbed: update client number patch

diff --git a/tools.suckless.org/tabbed/patches/clientnumber.md b/tools.suckless.org/tabbed/patches/clientnumber.md
index 5c357f8..980dede 100644
--- a/tools.suckless.org/tabbed/patches/clientnumber.md
+++ b/tools.suckless.org/tabbed/patches/clientnumber.md
_AT_@ -1,12 +1,13 @@
 Client number
-========
+=============
 With this patch, tabbed prints the position number of the client before the
 window title.
 
 Download
 --------
-* [tabbed-0.6-clientnumber.diff](tabbed-0.6-clientnumber.diff)
+* [tabbed-clientnumber-20160103-eb0ff62.patch](tabbed-clientnumber-20160103-eb0ff62.patch)
+ (works with 0.6).
 
 Author
 ------
-* Quentin Rameau <quinq_AT_quinq.eu.org>
+* Quentin Rameau <quinq_AT_fifth.space>
diff --git a/tools.suckless.org/tabbed/patches/tabbed-0.6-clientnumber.diff b/tools.suckless.org/tabbed/patches/tabbed-0.6-clientnumber.diff
deleted file mode 100644
index bbcff56..0000000
--- a/tools.suckless.org/tabbed/patches/tabbed-0.6-clientnumber.diff
+++ /dev/null
_AT_@ -1,36 +0,0 @@
-diff --git a/config.mk b/config.mk
-index 5279711..b0c212c 100644
---- a/config.mk
-+++ b/config.mk
-_AT_@ -12,7 +12,7 @@ INCS = -I. -I/usr/include
- LIBS = -L/usr/lib -lc -lX11
-
- # flags
--CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE
-+CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_GNU_SOURCE
- CFLAGS = -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
- LDFLAGS = -s ${LIBS}
-
-diff --git a/tabbed.c b/tabbed.c
-index b2adf29..19b5bbb 100644
---- a/tabbed.c
-+++ b/tabbed.c
-_AT_@ -308,6 +308,7 @@ drawbar(void) {
- unsigned long *col;
- int c, fc, width, n = 0;
- char *name = NULL;
-+ char *tabtitle = NULL;
-
- if(nclients == 0) {
- dc.x = 0;
-_AT_@ -353,7 +354,9 @@ drawbar(void) {
- } else {
- col = dc.norm;
- }
-- drawtext(clients[c]->name, col);
-+ asprintf(&tabtitle, "%d: %s", c + 1, clients[c]->name);
-+ drawtext(tabtitle, col);
-+ free(tabtitle);
- dc.x += dc.w;
- clients[c]->tabx = dc.x;
- }
diff --git a/tools.suckless.org/tabbed/patches/tabbed-clientnumber-20160103-eb0ff62.patch b/tools.suckless.org/tabbed/patches/tabbed-clientnumber-20160103-eb0ff62.patch
new file mode 100644
index 0000000..59d4e74
--- /dev/null
+++ b/tools.suckless.org/tabbed/patches/tabbed-clientnumber-20160103-eb0ff62.patch
_AT_@ -0,0 +1,23 @@
+diff --git a/tabbed.c b/tabbed.c
+index 5f035c0..b118050 100644
+--- a/tabbed.c
++++ b/tabbed.c
+_AT_@ -317,6 +317,7 @@ drawbar(void)
+ unsigned long *col;
+ int c, cc, fc, width;
+ char *name = NULL;
++ char tabtitle[258]; /* drawtext buffer + one char + '
Received on Sun Jan 03 2016 - 18:34:01 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 03 2016 - 18:36:12 CET