From 53a479f79a6c23bf1deea4165ad2ac0efbd8460c Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 10 Jun 2010 03:23:35 -0400 Subject: [PATCH] Work around mawk bug that broke wmiirc. --- NEWS | 10 +++++++++- cmd/wmii.sh.sh | 11 +++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 1287ecaf..02e9533a 100644 --- a/NEWS +++ b/NEWS @@ -7,7 +7,15 @@ * Dock windows act more like dock windows * Fixed some managed move bugs -3.9b1: +3.9.2: + * Work around mawk bug that broke wmiirc. + +3.9.1: + * Workaround a dash 0.5.6 bug that broke wmiirc. + * Noticably speed-up python wmiirc startup. + * Disable static linking which breaks wmiir in glibc 2.12. + +3.9: * wmii9menu is now Xinerama aware. * Install READMEs to $(PREFIX)/share/doc/wmii/. * Documentation updates. Add wmiir.1, wmii9menu.1. diff --git a/cmd/wmii.sh.sh b/cmd/wmii.sh.sh index 8d10abfd..dfa04a86 100755 --- a/cmd/wmii.sh.sh +++ b/cmd/wmii.sh.sh @@ -194,19 +194,14 @@ wi_eventloop() { if [ "$1" = -i ] then cat else wmiir read /event - fi | awk '/./ { print; fflush() } END { print "" }' | - while :; do - # Work around a dash bug. - # Only quit on successful read of a blank line. - read wi_event || continue - test -n "$wi_event" || break - + fi | + while read wi_event; do IFS="$wi_newline" wi_arg=$(echo "$wi_event" | sed 's/^[^ ]* //') unset IFS set -- $wi_event event=$1; shift - Event $event "$@" + ( Event $event "$@" ) done true }