changeset: 2485:424202a307a9
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Thu Sep 17 09:27:11 2009 -0400
files: alternative_wmiircs/python/wmiirc.py cmd/Makefile cmd/menu/Makefile cmd/menu/fns.h cmd/menu/main.c cmd/menu/menu.c cmd/wmii/Makefile cmd/wmii/main.c cmd/wmiir.c mk/wmii.mk util/compile
description:
Makefile cleanup and other general cleanup.
diff -r bdd0ad8ca0fc -r 424202a307a9 alternative_wmiircs/python/wmiirc.py
--- a/alternative_wmiircs/python/wmiirc.py Thu Sep 17 09:25:38 2009 -0400
+++ b/alternative_wmiircs/python/wmiirc.py Thu Sep 17 09:27:11 2009 -0400
@@ -140,7 +140,7 @@
class Notice(Button):
def __init__(self):
- super(Notice, self).__init__(*noticebar)
+ super(Notice, self).__init__(*noticebar, colors=wmii['normcolors'])
self.timer = None
def tick(self):
diff -r bdd0ad8ca0fc -r 424202a307a9 cmd/Makefile
--- a/cmd/Makefile Thu Sep 17 09:25:38 2009 -0400
+++ b/cmd/Makefile Thu Sep 17 09:27:11 2009 -0400
@@ -23,7 +23,7 @@
s|AWKPATH|$(AWKPATH)|g"
LDFLAGS += -lfmt -lutf
-CFLAGS += $(INCX11) -DVERSION=\"$(VERSION)\"
+CFLAGS += $(INCX11)
include $(ROOT)/mk/many.mk
include $(ROOT)/mk/dir.mk
diff -r bdd0ad8ca0fc -r 424202a307a9 cmd/menu/Makefile
--- a/cmd/menu/Makefile Thu Sep 17 09:25:38 2009 -0400
+++ b/cmd/menu/Makefile Thu Sep 17 09:27:11 2009 -0400
@@ -16,7 +16,7 @@
LIB = $(LIBIXP)
LDFLAGS += -lm -lregexp9 -lbio -lfmt -lutf
-CFLAGS += -DVERSION=\"$(VERSION)\" -DIXP_NEEDAPI=86
+CFLAGS += -DIXP_NEEDAPI=86
OBJ = main \
caret \
history \
diff -r bdd0ad8ca0fc -r 424202a307a9 cmd/menu/fns.h
--- a/cmd/menu/fns.h Thu Sep 17 09:25:38 2009 -0400
+++ b/cmd/menu/fns.h Thu Sep 17 09:27:11 2009 -0400
@@ -21,6 +21,7 @@
Item* filter_list(Item*, char*);
void init_screens(int);
void update_filter(bool);
+void update_input(void);
/* menu.c */
void menu_draw(void);
diff -r bdd0ad8ca0fc -r 424202a307a9 cmd/menu/main.c
--- a/cmd/menu/main.c Thu Sep 17 09:25:38 2009 -0400
+++ b/cmd/menu/main.c Thu Sep 17 09:27:11 2009 -0400
@@ -14,7 +14,7 @@
#include "fns.h"
#define link _link
-static const char version[] = "wimenu-"VERSION", ©2009 Kris Maglione\n";
+static const char version[] = "wimenu-"VERSION", "COPYRIGHT"\n";
static Biobuf* cmplbuf;
static Biobuf* inbuf;
static bool alwaysprint;
@@ -141,6 +141,15 @@
}
void
+update_input(void) {
+ if(alwaysprint) {
+ write(1, input.string, input.pos - input.string);
+ write(1, "", 1);
+ write(1, input.pos, input.end - input.pos + 1);
+ }
+}
+
+void
update_filter(bool print) {
char *filter;
@@ -150,11 +159,8 @@
matchidx = nil;
matchfirst = matchstart = filter_list(items, filter);
- if(alwaysprint && print) {
- write(1, input.string, input.pos - input.string);
- write(1, "", 1);
- write(1, input.pos, input.end - input.pos + 1);
- }
+ if(print)
+ update_input();
}
/*
@@ -264,6 +270,9 @@
case 's':
screen = strtol(EARGF(usage()), nil, 10);
break;
+ case 'v':
+ print("%s", version);
+ return 0;
default:
usage();
}ARGEND;
diff -r bdd0ad8ca0fc -r 424202a307a9 cmd/menu/menu.c
--- a/cmd/menu/menu.c Thu Sep 17 09:25:38 2009 -0400
+++ b/cmd/menu/menu.c Thu Sep 17 09:27:11 2009 -0400
@@ -95,6 +95,7 @@
case BACKWARD:
case FORWARD:
caret_move(op, motion);
+ update_input();
break;
case CMPL_NEXT:
selectitem(matchidx ? matchidx->next : matchfirst);
@@ -298,19 +299,14 @@
menu_cmd(BACKWARD, amount);
break;
case LCOMPLETE:
- amount = CMPL_NEXT;
- if(have(LNEXT))
- amount = CMPL_NEXT;
- else if(have(LPREV))
- amount = CMPL_PREV;
- else if(have(LNEXTPAGE))
- amount = CMPL_NEXT_PAGE;
- else if(have(LPREVPAGE))
- amount = CMPL_PREV_PAGE;
- else if(have(LFIRST))
- amount = CMPL_FIRST;
- else if(have(LLAST))
- amount = CMPL_LAST;
+ amount = (
+ have(LNEXT) ? CMPL_NEXT :
+ have(LPREV) ? CMPL_PREV :
+ have(LNEXTPAGE) ? CMPL_NEXT_PAGE :
+ have(LPREVPAGE) ? CMPL_PREV_PAGE :
+ have(LFIRST) ? CMPL_FIRST :
+ have(LLAST) ? CMPL_LAST :
+ CMPL_NEXT);
menu_cmd(amount, 0);
break;
case LFORWARD:
diff -r bdd0ad8ca0fc -r 424202a307a9 cmd/wmii/Makefile
--- a/cmd/wmii/Makefile Thu Sep 17 09:25:38 2009 -0400
+++ b/cmd/wmii/Makefile Thu Sep 17 09:27:11 2009 -0400
@@ -12,8 +12,7 @@
LIB = $(LIBIXP)
LDFLAGS += -lm $(LIBICONV) -lregexp9 -lbio -lfmt -lutf
-CFLAGS += $(INCICONV) -DVERSION=\"$(VERSION)\" \
- -DIXP_NEEDAPI=97
+CFLAGS += $(INCICONV) -DIXP_NEEDAPI=97
OBJ = area \
bar \
client \
diff -r bdd0ad8ca0fc -r 424202a307a9 cmd/wmii/main.c
--- a/cmd/wmii/main.c Thu Sep 17 09:25:38 2009 -0400
+++ b/cmd/wmii/main.c Thu Sep 17 09:27:11 2009 -0400
@@ -16,7 +16,7 @@
#include "fns.h"
static const char
- version[] = "wmii-"VERSION", ©2009 Kris Maglione\n";
+ version[] = "wmii-"VERSION", "COPYRIGHT"\n";
static char* address;
static char* ns_path;
diff -r bdd0ad8ca0fc -r 424202a307a9 cmd/wmiir.c
--- a/cmd/wmiir.c Thu Sep 17 09:25:38 2009 -0400
+++ b/cmd/wmiir.c Thu Sep 17 09:27:11 2009 -0400
@@ -384,7 +384,7 @@
ARGBEGIN{
case 'v':
- print("%s-" VERSION ", ©2009 Kris Maglione\n", argv0);
+ print("%s-" VERSION ", " COPYRIGHT "\n", argv0);
exit(0);
case 'a':
address = EARGF(usage());
diff -r bdd0ad8ca0fc -r 424202a307a9 mk/wmii.mk
--- a/mk/wmii.mk Thu Sep 17 09:25:38 2009 -0400
+++ b/mk/wmii.mk Thu Sep 17 09:27:11 2009 -0400
@@ -4,4 +4,6 @@
VERSION := $(shell echo $(VERS))
VERSION != echo $(VERS)
CONFVERSION = -hg
+COPYRIGHT = ©2009 Kris Maglione
+CFLAGS += '-DVERSION=\"$(VERSION)\"' '-DCOPYRIGHT=\"$(COPYRIGHT)\"'
diff -r bdd0ad8ca0fc -r 424202a307a9 util/compile
--- a/util/compile Thu Sep 17 09:25:38 2009 -0400
+++ b/util/compile Thu Sep 17 09:27:11 2009 -0400
@@ -9,7 +9,7 @@
echo CC $($bin/cleanname ${BASE}$outfile)
[ -n "$noisycc" ] && echo $CC -o $outfile $CFLAGS $@
-$CC -o $outfile $CFLAGS $@ >$xtmp 2>&1
+eval '$CC -o $outfile '"$CFLAGS"' $@ >$xtmp 2>&1'
status=$?
[ $? -eq 0 ] || echo $CC -o $outfile $CFLAGS $@ >&2
Received on Thu Sep 17 2009 - 13:27:18 UTC
This archive was generated by hypermail 2.2.0 : Thu Sep 17 2009 - 13:36:05 UTC