diff --git a/LICENSE b/LICENSE index ed9b7714..1f9a3cfd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -© 2006-2007 Kris Maglione +© 2006-2009 Kris Maglione © 2003-2006 Anselm R. Garbe Permission is hereby granted, free of charge, to any person obtaining a diff --git a/cmd/click/_util.c b/cmd/click/_util.c index 94fe37e0..95f13878 100644 --- a/cmd/click/_util.c +++ b/cmd/click/_util.c @@ -1,4 +1,4 @@ -/* Copyright ©2008 Kris Maglione +/* Copyright ©2008-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/click/main.c b/cmd/click/main.c index 979452f5..445229f5 100644 --- a/cmd/click/main.c +++ b/cmd/click/main.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #define EXTERN @@ -9,7 +9,7 @@ #include #include "fns.h" -static const char version[] = "click-"VERSION", ©2008 Kris Maglione\n"; +static const char version[] = "click-"VERSION", ©2009 Kris Maglione\n"; static void usage(void) { diff --git a/cmd/menu/event.c b/cmd/menu/event.c index ea278af2..357253a1 100644 --- a/cmd/menu/event.c +++ b/cmd/menu/event.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/menu/main.c b/cmd/menu/main.c index c8a74d2b..1bbde02d 100644 --- a/cmd/menu/main.c +++ b/cmd/menu/main.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #define IXP_NO_P9_ @@ -13,7 +13,7 @@ #include "fns.h" #define link _link -static const char version[] = "wimenu-"VERSION", ©2008 Kris Maglione\n"; +static const char version[] = "wimenu-"VERSION", ©2009 Kris Maglione\n"; static IxpClient* client; static IxpCFid* ctlfid; static Biobuf* inbuf; diff --git a/cmd/menu/menu.c b/cmd/menu/menu.c index c2f5f0bc..ebd78e4a 100644 --- a/cmd/menu/menu.c +++ b/cmd/menu/menu.c @@ -272,6 +272,14 @@ kdown_event(Window *w, XKeyEvent *e) { case XK_E: menu_cmd(FORWARD, LINE); return; + case XK_b: + case XK_B: + menu_cmd(BACKWARD, CHAR); + return; + case XK_f: + case XK_F: + menu_cmd(FORWARD, CHAR); + return; case XK_n: case XK_N: menu_cmd(HIST, FORWARD); @@ -325,6 +333,14 @@ kdown_event(Window *w, XKeyEvent *e) { case XK_G: menu_cmd(CMPL_LAST, 0); return; + case XK_b: + case XK_B: + menu_cmd(BACKWARD, WORD); + return; + case XK_f: + case XK_F: + menu_cmd(FORWARD, WORD); + return; } } switch(ksym) { diff --git a/cmd/strut/_util.c b/cmd/strut/_util.c index 94fe37e0..95f13878 100644 --- a/cmd/strut/_util.c +++ b/cmd/strut/_util.c @@ -1,4 +1,4 @@ -/* Copyright ©2008 Kris Maglione +/* Copyright ©2008-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/strut/event.c b/cmd/strut/event.c index a8c654c6..a3bb8ea2 100644 --- a/cmd/strut/event.c +++ b/cmd/strut/event.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/strut/ewmh.c b/cmd/strut/ewmh.c index 58609f10..ec007852 100644 --- a/cmd/strut/ewmh.c +++ b/cmd/strut/ewmh.c @@ -1,4 +1,4 @@ -/* Copyright ©2007-2008 Kris Maglione +/* Copyright ©2007-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/strut/main.c b/cmd/strut/main.c index cdf68c2b..abbd4309 100644 --- a/cmd/strut/main.c +++ b/cmd/strut/main.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #define EXTERN diff --git a/cmd/strut/win.c b/cmd/strut/win.c index e7dde2ac..79dbff85 100644 --- a/cmd/strut/win.c +++ b/cmd/strut/win.c @@ -1,4 +1,4 @@ -/* Copyright ©2008 Kris Maglione +/* Copyright ©2008-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/_util.c b/cmd/wmii/_util.c index 77d822c1..06c82014 100644 --- a/cmd/wmii/_util.c +++ b/cmd/wmii/_util.c @@ -1,4 +1,4 @@ -/* Copyright ©2008 Kris Maglione +/* Copyright ©2008-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" @@ -239,9 +239,8 @@ char** comm(int cols, char **toka, char **tokb) { Vector_ptr vec; char **ret; - int cmp, len; + int cmp; - len = 0; vector_pinit(&vec); while(*toka || *tokb) { if(!*toka) @@ -251,22 +250,16 @@ comm(int cols, char **toka, char **tokb) { else cmp = strcmp(*toka, *tokb); if(cmp < 0) { - if(cols & CLeft) { + if(cols & CLeft) vector_ppush(&vec, *toka); - len += strlen(*toka) + 1; - } toka++; }else if(cmp > 0) { - if(cols & CRight) { + if(cols & CRight) vector_ppush(&vec, *tokb); - len += strlen(*tokb) + 1; - } tokb++; }else { - if(cols & CCenter) { + if(cols & CCenter) vector_ppush(&vec, *toka); - len += strlen(*toka) + 1; - } toka++; tokb++; } diff --git a/cmd/wmii/area.c b/cmd/wmii/area.c index 7a0affb3..264e69bf 100644 --- a/cmd/wmii/area.c +++ b/cmd/wmii/area.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/bar.c b/cmd/wmii/bar.c index a8b683d5..21dd0b8c 100644 --- a/cmd/wmii/bar.c +++ b/cmd/wmii/bar.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/client.c b/cmd/wmii/client.c index 5d3df760..b3e51490 100644 --- a/cmd/wmii/client.c +++ b/cmd/wmii/client.c @@ -1,5 +1,5 @@ /* Copyright ©2004-2006 Anselm R. Garbe - * Copyright ©2006-2008 Kris Maglione + * Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" @@ -629,7 +629,7 @@ fullscreen(Client *c, int fullscreen) { } void -client_seturgent(Client *c, bool urgent, int from) { +client_seturgent(Client *c, int urgent, int from) { XWMHints *wmh; char *cfrom, *cnot; Frame *f, *ff; diff --git a/cmd/wmii/column.c b/cmd/wmii/column.c index 0b91801e..908b58e8 100644 --- a/cmd/wmii/column.c +++ b/cmd/wmii/column.c @@ -1,5 +1,5 @@ /* Copyright ©2004-2006 Anselm R. Garbe - * Copyright ©2006-2008 Kris Maglione + * Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/div.c b/cmd/wmii/div.c index 5e1d8d79..f5aba03c 100644 --- a/cmd/wmii/div.c +++ b/cmd/wmii/div.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/event.c b/cmd/wmii/event.c index baed27d5..0859a7e1 100644 --- a/cmd/wmii/event.c +++ b/cmd/wmii/event.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/ewmh.c b/cmd/wmii/ewmh.c index 71982356..a1ea744e 100644 --- a/cmd/wmii/ewmh.c +++ b/cmd/wmii/ewmh.c @@ -1,4 +1,4 @@ -/* Copyright ©2007-2008 Kris Maglione +/* Copyright ©2007-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/float.c b/cmd/wmii/float.c index 5a6d08dd..c5d4524a 100644 --- a/cmd/wmii/float.c +++ b/cmd/wmii/float.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/fns.h b/cmd/wmii/fns.h index c7d21243..e701e00b 100644 --- a/cmd/wmii/fns.h +++ b/cmd/wmii/fns.h @@ -84,7 +84,7 @@ void client_prop(Client*, Atom); void client_reparent(Client*, Window*, Point); void client_resize(Client*, Rectangle); void client_setcursor(Client*, Cursor); -void client_seturgent(Client*, bool, int); +void client_seturgent(Client*, int, int); void client_setviews(Client*, char**); void client_unmap(Client*, int state); Frame* client_viewframe(Client *c, View *v); diff --git a/cmd/wmii/frame.c b/cmd/wmii/frame.c index 35b12b04..2c249aa9 100644 --- a/cmd/wmii/frame.c +++ b/cmd/wmii/frame.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/fs.c b/cmd/wmii/fs.c index 1561d3ed..8834c057 100644 --- a/cmd/wmii/fs.c +++ b/cmd/wmii/fs.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" @@ -212,8 +212,10 @@ dostat(Stat *s, IxpFileId *f) { s->muid = user; } -/* All lookups and directory organization should be performed through - * lookup_file, mostly through the dirtabs[] tree. */ +/* + * All lookups and directory organization should be performed through + * lookup_file, mostly through the dirtab[] tree. + */ static IxpFileId* lookup_file(IxpFileId *parent, char *name) { @@ -249,12 +251,15 @@ lookup_file(IxpFileId *parent, char *name) file->p.client = c; file->id = c->w.w; file->index = c->w.w; - }if(name) goto LastItem; + } + if(name) + goto LastItem; } SET(id); if(name) { id = (uint)strtol(name, &name, 16); - if(*name) goto NextItem; + if(*name) + goto NextItem; } for(c=client; c; c=c->next) { if(!name || c->w.w == id) { @@ -264,7 +269,8 @@ lookup_file(IxpFileId *parent, char *name) file->id = c->w.w; file->index = c->w.w; assert(file->tab.name); - if(name) goto LastItem; + if(name) + goto LastItem; } } break; @@ -273,7 +279,8 @@ lookup_file(IxpFileId *parent, char *name) if(!name || !strcmp(name, debugtab[i])) { push_file(debugtab[i]); file->id = i; - if(name) goto LastItem; + if(name) + goto LastItem; } break; case FsDTags: @@ -283,7 +290,9 @@ lookup_file(IxpFileId *parent, char *name) file->volatil = true; file->p.view = selview; file->id = selview->id; - }if(name) goto LastItem; + } + if(name) + goto LastItem; } for(v=view; v; v=v->next) { if(!name || !strcmp(name, v->name)) { @@ -291,7 +300,8 @@ lookup_file(IxpFileId *parent, char *name) file->volatil = true; file->p.view = v; file->id = v->id; - if(name) goto LastItem; + if(name) + goto LastItem; } } break; @@ -302,7 +312,8 @@ lookup_file(IxpFileId *parent, char *name) file->volatil = true; file->p.bar = b; file->id = b->id; - if(name) goto LastItem; + if(name) + goto LastItem; } } break; @@ -329,7 +340,8 @@ lookup_file(IxpFileId *parent, char *name) file->p.rule = &def.tagrules; break; } - if(name) goto LastItem; + if(name) + goto LastItem; } NextItem: continue; @@ -466,7 +478,8 @@ fs_read(Ixp9Req *r) { return; } r->ofcall.io.data = smprint("%C", f->p.client); - r->ofcall.io.count = strlen(r->ofcall.io.data); /* will die if nil */ + /* Will (and should) die if result is nil */ + r->ofcall.io.count = strlen(r->ofcall.io.data); respond(r, nil); return; case FsFTindex: @@ -483,10 +496,7 @@ fs_read(Ixp9Req *r) { return; } } - /* - * This is an assert because this should this should not be called if - * the file is not open for reading. - */ + /* This should not be called if the file is not open for reading. */ die("Read called on an unreadable file"); } @@ -566,9 +576,7 @@ fs_write(Ixp9Req *r) { return; } /* - * This is an assert because this function should not be called if - * the file is not open for writing. - */ + /* This should not be called if the file is not open for writing. */ die("Write called on an unwritable file"); } diff --git a/cmd/wmii/geom.c b/cmd/wmii/geom.c index d3e7611e..2da8d3d0 100644 --- a/cmd/wmii/geom.c +++ b/cmd/wmii/geom.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/key.c b/cmd/wmii/key.c index 2c55bb4f..346ac181 100644 --- a/cmd/wmii/key.c +++ b/cmd/wmii/key.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * Copyright ©2004-2006 Anselm R. Garbe * See LICENSE file for license details. */ diff --git a/cmd/wmii/layout.c b/cmd/wmii/layout.c index 05c957d5..c618bab0 100644 --- a/cmd/wmii/layout.c +++ b/cmd/wmii/layout.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/main.c b/cmd/wmii/main.c index 43eb2856..c8323a11 100644 --- a/cmd/wmii/main.c +++ b/cmd/wmii/main.c @@ -1,5 +1,5 @@ /* Copyright ©2004-2006 Anselm R. Garbe - * Copyright ©2006-2008 Kris Maglione + * Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #define EXTERN @@ -16,7 +16,7 @@ #include "fns.h" static const char - version[] = "wmii-"VERSION", ©2008 Kris Maglione\n"; + version[] = "wmii-"VERSION", ©2009 Kris Maglione\n"; static char* address; static char* ns_path; diff --git a/cmd/wmii/message.c b/cmd/wmii/message.c index cf339e58..25516a8f 100644 --- a/cmd/wmii/message.c +++ b/cmd/wmii/message.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/mouse.c b/cmd/wmii/mouse.c index abbfed0d..f924c764 100644 --- a/cmd/wmii/mouse.c +++ b/cmd/wmii/mouse.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/root.c b/cmd/wmii/root.c index 776e048f..ae6a0084 100644 --- a/cmd/wmii/root.c +++ b/cmd/wmii/root.c @@ -1,4 +1,4 @@ -/* Copyright ©2008 Kris Maglione +/* Copyright ©2008-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/screen.c b/cmd/wmii/screen.c index d451e691..d6da1f47 100644 --- a/cmd/wmii/screen.c +++ b/cmd/wmii/screen.c @@ -1,4 +1,4 @@ -/* Copyright ©2006-2008 Kris Maglione +/* Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/view.c b/cmd/wmii/view.c index 945c24f5..7f03856e 100644 --- a/cmd/wmii/view.c +++ b/cmd/wmii/view.c @@ -1,5 +1,5 @@ /* Copyright ©2004-2006 Anselm R. Garbe - * Copyright ©2006-2008 Kris Maglione + * Copyright ©2006-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/x11.c b/cmd/wmii/x11.c index a41e68c2..4708a130 100644 --- a/cmd/wmii/x11.c +++ b/cmd/wmii/x11.c @@ -1,4 +1,4 @@ -/* Copyright ©2007-2008 Kris Maglione +/* Copyright ©2007-2009 Kris Maglione * See LICENSE file for license details. */ #define _X11_VISIBLE diff --git a/cmd/wmii/xdnd.c b/cmd/wmii/xdnd.c index dfd80007..950d616a 100644 --- a/cmd/wmii/xdnd.c +++ b/cmd/wmii/xdnd.c @@ -1,4 +1,4 @@ -/* Copyright ©2008 Kris Maglione +/* Copyright ©2008-2009 Kris Maglione * See LICENSE file for license details. */ #include "dat.h" diff --git a/cmd/wmii/xext.c b/cmd/wmii/xext.c index aa45a117..bb0231ae 100644 --- a/cmd/wmii/xext.c +++ b/cmd/wmii/xext.c @@ -1,4 +1,4 @@ -/* Copyright ©2008 Kris Maglione +/* Copyright ©2008-2009 Kris Maglione * See LICENSE file for license details. */ #define _X11_VISIBLE diff --git a/cmd/wmiir.c b/cmd/wmiir.c index a00956d9..0d583cab 100644 --- a/cmd/wmiir.c +++ b/cmd/wmiir.c @@ -1,4 +1,4 @@ -/* Copyight ©2007-2008 Kris Maglione +/* Copyight ©2007-2009 Kris Maglione * See LICENSE file for license details. */ #define IXP_NO_P9_ @@ -384,7 +384,7 @@ main(int argc, char *argv[]) { ARGBEGIN{ case 'v': - print("%s-" VERSION ", ©2008 Kris Maglione\n", argv0); + print("%s-" VERSION ", ©2009 Kris Maglione\n", argv0); exit(0); case 'a': address = EARGF(usage()); diff --git a/img/mkfile b/img/mkfile index 40941e31..0fec732b 100644 --- a/img/mkfile +++ b/img/mkfile @@ -2,11 +2,12 @@ MKSHELL=rc path=$PLAN9/bin $path eps = wmii.eps +calc = rc -c 'hoc -e $"*' epsbox = `{sed -n '/^%%BoundingBox:/{s/.*://p; q;}' $eps} iconwidth = 154 -iconscale = `{*=$epsbox; hoc -e $iconwidth/'('$3-' '$1')'} -iconheight = `{*=$epsbox; hoc -e '('$4-' '$2')*'$iconscale} +iconscale = `{*=$epsbox; $calc $iconwidth / '('$3 - $1')'} +iconheight = `{*=$epsbox; $calc '('$4 - $2') *' $iconscale} %.png: %.eps * = `{hoc -e'-('$epsbox')'} diff --git a/rc/wmiirc.sh b/rc/wmiirc.sh index e7aa53a3..ec389d39 100644 --- a/rc/wmiirc.sh +++ b/rc/wmiirc.sh @@ -51,7 +51,7 @@ echo $WMII_NORMCOLORS | wmiir create $noticebar # Event processing events() { - sed 's/^ //' <<'!' + cat <<'!' # Events Event CreateTag echo "$WMII_NORMCOLORS" "$@" | wmiir create "/lbar/$@" @@ -186,7 +186,7 @@ events() { wmiir xwrite /tag/sel/ctl send sel up ! for i in 0 1 2 3 4 5 6 7 8 9; do - sed 's/^ //' <