diff options
author | Connor Lane Smith <cls@lubutu.com> | 2011-05-14 22:43:42 +0100 |
---|---|---|
committer | Connor Lane Smith <cls@lubutu.com> | 2011-05-14 22:43:42 +0100 |
commit | d066975e78d98f368ab0e3106e00804a28697373 (patch) | |
tree | 087ba6c0282d7f7556c51fad8c0d3938fa0a6bd1 /dmenu.c | |
parent | 26236a4900657e8e6e9c5fcf277b51ca242fa3e8 (diff) |
cleanup
Diffstat (limited to 'dmenu.c')
-rw-r--r-- | dmenu.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -66,7 +66,6 @@ main(int argc, char *argv[]) { Bool fast = False; int i; - progname = "dmenu"; for(i = 1; i < argc; i++) /* single flags */ if(!strcmp(argv[i], "-v")) { @@ -383,10 +382,9 @@ keypress(XKeyEvent *ev) { void match(void) { - size_t len; + size_t len = strlen(text); Item *item, *lexact, *lprefix, *lsubstr, *exactend, *prefixend, *substrend; - len = strlen(text); matches = lexact = lprefix = lsubstr = matchend = exactend = prefixend = substrend = NULL; for(item = items; item && item->text; item++) if(!fstrncmp(text, item->text, len + 1)) @@ -424,9 +422,8 @@ match(void) { size_t nextrune(int incr) { - size_t n, len; + size_t n, len = strlen(text); - len = strlen(text); for(n = cursor + incr; n >= 0 && n < len && (text[n] & 0xc0) == 0x80; n += incr); return n; } |