tfixed a bug when dmenu is run with -v - dmenu - Dmenu fork with xft fonts.
(HTM) git clone git://r-36.net/dmenu
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 6b5b580affe4f1f5315afd375c86a87d44799778
(DIR) parent d8b48d64e168d515ade6631e75ce202f26e00f2d
(HTM) Author: Anselm R. Garbe <arg@suckless.org>
Date: Fri, 23 Feb 2007 14:39:54 +0100
fixed a bug when dmenu is run with -v
Diffstat:
config.mk | 2 +-
main.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/config.mk b/config.mk
t@@ -1,5 +1,5 @@
# dmenu version
-VERSION = 2.4.2
+VERSION = 2.5
# Customize below to fit your system
(DIR) diff --git a/main.c b/main.c
t@@ -418,7 +418,9 @@ main(int argc, char *argv[]) {
XModifierKeymap *modmap;
XSetWindowAttributes wa;
- if(isatty(STDIN_FILENO)) {
+ if(argc == 2 && !strncmp("-v", argv[1], 3))
+ eprint("dmenu-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n");
+ else if(isatty(STDIN_FILENO)) {
fputs("error: dmenu can't run in an interactive shell\n", stdout);
usage();
}
t@@ -445,8 +447,6 @@ main(int argc, char *argv[]) {
else if(!strncmp(argv[i], "-sf", 4)) {
if(++i < argc) selfg = argv[i];
}
- else if(!strncmp(argv[i], "-v", 3))
- eprint("dmenu-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n");
else
usage();
setlocale(LC_CTYPE, "");