[hackers] [dmenu] adopted Alex Sedov's config.h revival patch to tip || Anselm R Garbe

From: <git_AT_suckless.org>
Date: Wed, 17 Apr 2013 21:03:41 +0200

commit 14f72a276334de4a46543cf648a4922bc54f1e9f
Author: Anselm R Garbe <anselm_AT_garbe.us>
Date: Wed Apr 17 21:04:05 2013 +0200

    adopted Alex Sedov's config.h revival patch to tip

diff --git a/Makefile b/Makefile
index f011ad7..0f7dfbd 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -18,7 +18,11 @@ options:
         _AT_echo CC -c $<
         _AT_${CC} -c $< ${CFLAGS}
 
-${OBJ}: config.mk draw.h
+config.h:
+ _AT_echo creating $@ from config.def.h
+ _AT_cp config.def.h $@
+
+${OBJ}: config.h config.mk draw.h
 
 dmenu: dmenu.o draw.o
         _AT_echo CC -o $@
diff --git a/dmenu.c b/dmenu.c
index c25dc82..a06ae15 100644
--- a/dmenu.c
+++ b/dmenu.c
_AT_@ -44,20 +44,10 @@ static char text[BUFSIZ] = "";
 static int bh, mw, mh;
 static int inputw, promptw;
 static size_t cursor = 0;
-static const char *font = NULL;
-static const char *prompt = NULL;
-static const char *normbgcolor = "#222222";
-static const char *normfgcolor = "#bbbbbb";
-static const char *selbgcolor = "#005577";
-static const char *selfgcolor = "#eeeeee";
-static const char *outbgcolor = "#00ffff";
-static const char *outfgcolor = "#000000";
-static unsigned int lines = 0;
 static unsigned long normcol[ColLast];
 static unsigned long selcol[ColLast];
 static unsigned long outcol[ColLast];
 static Atom clip, utf8;
-static Bool topbar = True;
 static DC *dc;
 static Item *items = NULL;
 static Item *matches, *matchend;
_AT_@ -65,6 +55,8 @@ static Item *prev, *curr, *next, *sel;
 static Window win;
 static XIC xic;
 
+#include "config.h"
+
 static int (*fstrncmp)(const char *, const char *, size_t) = strncmp;
 static char *(*fstrstr)(const char *, const char *) = strstr;
 
Received on Wed Apr 17 2013 - 21:03:41 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 17 2013 - 21:12:15 CEST