Date: Tuesday, July 1, 2014 @ 11:50:42 Author: spupykin Revision: 113925
archrelease: copy trunk to community-i686, community-x86_64 Added: beye/repos/community-i686/PKGBUILD (from rev 113924, beye/trunk/PKGBUILD) beye/repos/community-i686/biew-610-fix_localedep-1.patch (from rev 113924, beye/trunk/biew-610-fix_localedep-1.patch) beye/repos/community-i686/biew-610-portable_configure-1.patch (from rev 113924, beye/trunk/biew-610-portable_configure-1.patch) beye/repos/community-i686/biew-610-setup_window-1.patch (from rev 113924, beye/trunk/biew-610-setup_window-1.patch) beye/repos/community-x86_64/PKGBUILD (from rev 113924, beye/trunk/PKGBUILD) beye/repos/community-x86_64/biew-610-fix_localedep-1.patch (from rev 113924, beye/trunk/biew-610-fix_localedep-1.patch) beye/repos/community-x86_64/biew-610-portable_configure-1.patch (from rev 113924, beye/trunk/biew-610-portable_configure-1.patch) beye/repos/community-x86_64/biew-610-setup_window-1.patch (from rev 113924, beye/trunk/biew-610-setup_window-1.patch) Deleted: beye/repos/community-i686/PKGBUILD beye/repos/community-i686/biew-610-fix_localedep-1.patch beye/repos/community-i686/biew-610-portable_configure-1.patch beye/repos/community-i686/biew-610-setup_window-1.patch beye/repos/community-x86_64/PKGBUILD beye/repos/community-x86_64/biew-610-fix_localedep-1.patch beye/repos/community-x86_64/biew-610-portable_configure-1.patch beye/repos/community-x86_64/biew-610-setup_window-1.patch ------------------------------------------------------+ /PKGBUILD | 96 ++++ /biew-610-fix_localedep-1.patch | 52 ++ /biew-610-portable_configure-1.patch | 334 +++++++++++++++++ /biew-610-setup_window-1.patch | 56 ++ community-i686/PKGBUILD | 48 -- community-i686/biew-610-fix_localedep-1.patch | 26 - community-i686/biew-610-portable_configure-1.patch | 167 -------- community-i686/biew-610-setup_window-1.patch | 28 - community-x86_64/PKGBUILD | 48 -- community-x86_64/biew-610-fix_localedep-1.patch | 26 - community-x86_64/biew-610-portable_configure-1.patch | 167 -------- community-x86_64/biew-610-setup_window-1.patch | 28 - 12 files changed, 538 insertions(+), 538 deletions(-) Deleted: community-i686/PKGBUILD =================================================================== --- community-i686/PKGBUILD 2014-07-01 09:50:25 UTC (rev 113924) +++ community-i686/PKGBUILD 2014-07-01 09:50:42 UTC (rev 113925) @@ -1,48 +0,0 @@ -# $Id$ -# Maintainer: Sergej Pupykin <pupykin.s+a...@gmail.com> -# Contributor: Sergej Pupykin <pupykin.s+a...@gmail.com> - -pkgname=beye -pkgver=6.1.0 -_lver=610 -pkgrel=4 -pkgdesc="A portable viewer of binary files, hexadecimal and disassembler modes" -arch=('i686' 'x86_64') -license=('GPL') -depends=('slang' 'gpm') -makedepends=('libx11') -replaces=('biew') -url="http://beye.sourceforge.net/" -source=("http://downloads.sourceforge.net/project/beye/biew/$pkgver/biew-${_lver}-src.tar.bz2" - 'biew-610-fix_localedep-1.patch' - 'biew-610-portable_configure-1.patch' - 'biew-610-setup_window-1.patch') -md5sums=('1b6477defaa61b8ca0f2ae1254978e94' - 'f2d510cbeffadc4cc20e4bc4e7a08014' - '32e8bc2673db6566720c1ec6f9512fd6' - '93d7e300bd5fb85952891f220b12250a') - -build() { - cd $srcdir/biew-${_lver} - - patch -Np1 -i "${srcdir}/biew-610-fix_localedep-1.patch" - patch -Np1 -i "${srcdir}/biew-610-portable_configure-1.patch" - - # Patch fixing a crash if MainWindow is not yet set - patch -Np1 -i "${srcdir}/biew-610-setup_window-1.patch" - - sed -i -e "s:lib32:lib:g" configure - export CFLAGS="$CFLAGS -mmmx -msse" - ./configure --prefix=/usr - - # Fix man pages path - sed -i -e 's^man/man1/biew.1^share/man/man1/biew.1^' makefile - - make LDFLAGS="${LDFLAGS}" -} - -package() { - cd $srcdir/biew-${_lver} - - make DESTDIR=$pkgdir install -} Copied: beye/repos/community-i686/PKGBUILD (from rev 113924, beye/trunk/PKGBUILD) =================================================================== --- community-i686/PKGBUILD (rev 0) +++ community-i686/PKGBUILD 2014-07-01 09:50:42 UTC (rev 113925) @@ -0,0 +1,48 @@ +# $Id$ +# Maintainer: Sergej Pupykin <pupykin.s+a...@gmail.com> +# Contributor: Sergej Pupykin <pupykin.s+a...@gmail.com> + +pkgname=beye +pkgver=6.1.0 +_lver=610 +pkgrel=5 +pkgdesc="A portable viewer of binary files, hexadecimal and disassembler modes" +arch=('i686' 'x86_64') +license=('GPL') +depends=('slang' 'gpm') +makedepends=('libx11') +replaces=('biew') +url="http://beye.sourceforge.net/" +source=("http://downloads.sourceforge.net/project/beye/biew/$pkgver/biew-${_lver}-src.tar.bz2" + 'biew-610-fix_localedep-1.patch' + 'biew-610-portable_configure-1.patch' + 'biew-610-setup_window-1.patch') +md5sums=('1b6477defaa61b8ca0f2ae1254978e94' + 'f2d510cbeffadc4cc20e4bc4e7a08014' + '32e8bc2673db6566720c1ec6f9512fd6' + '93d7e300bd5fb85952891f220b12250a') + +build() { + cd $srcdir/biew-${_lver} + + patch -Np1 -i "${srcdir}/biew-610-fix_localedep-1.patch" + patch -Np1 -i "${srcdir}/biew-610-portable_configure-1.patch" + + # Patch fixing a crash if MainWindow is not yet set + patch -Np1 -i "${srcdir}/biew-610-setup_window-1.patch" + + sed -i -e "s:lib32:lib:g" configure + export CFLAGS="$CFLAGS -mmmx -msse" + ./configure --prefix=/usr + + # Fix man pages path + sed -i -e 's^man/man1/biew.1^share/man/man1/biew.1^' makefile + + make LDFLAGS="${LDFLAGS}" +} + +package() { + cd $srcdir/biew-${_lver} + + make DESTDIR=$pkgdir install +} Deleted: community-i686/biew-610-fix_localedep-1.patch =================================================================== --- community-i686/biew-610-fix_localedep-1.patch 2014-07-01 09:50:25 UTC (rev 113924) +++ community-i686/biew-610-fix_localedep-1.patch 2014-07-01 09:50:42 UTC (rev 113925) @@ -1,26 +0,0 @@ -The configure script of biew-6.1.0 fails with - Checking for C compiler name ... gcc-Version -if using the de_DE.UTF-8 locale and sys-devel/gcc-4.5.2. It may fail with other -locales and/or compilers, too. The problem occurs due to the fact that the -string “gcc version” written by gcc for ‘gcc -v’ is translated according to the -language (German in the case mentioned above). - -This patch makes sure that the POSIX locale is used when the biew configure -script checks for the name of the compiler. This allows the configure script to -parse the output properly. - - –nico - - -diff -Naur biew-610.orig/configure biew-610/configure ---- biew-610.orig/configure 2009-11-13 15:52:36.000000000 +0100 -+++ biew-610/configure 2011-01-13 11:11:59.000000000 +0100 -@@ -497,7 +497,7 @@ - - _cdefos="-DDATADIR='\"$_datadir\"'" - --cc_name=`$_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1` -+cc_name=`LC_ALL=POSIX $_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1` - cc_version=`$_cc -dumpversion` - - echocheck "C compiler name" Copied: beye/repos/community-i686/biew-610-fix_localedep-1.patch (from rev 113924, beye/trunk/biew-610-fix_localedep-1.patch) =================================================================== --- community-i686/biew-610-fix_localedep-1.patch (rev 0) +++ community-i686/biew-610-fix_localedep-1.patch 2014-07-01 09:50:42 UTC (rev 113925) @@ -0,0 +1,26 @@ +The configure script of biew-6.1.0 fails with + Checking for C compiler name ... gcc-Version +if using the de_DE.UTF-8 locale and sys-devel/gcc-4.5.2. It may fail with other +locales and/or compilers, too. The problem occurs due to the fact that the +string “gcc version” written by gcc for ‘gcc -v’ is translated according to the +language (German in the case mentioned above). + +This patch makes sure that the POSIX locale is used when the biew configure +script checks for the name of the compiler. This allows the configure script to +parse the output properly. + + –nico + + +diff -Naur biew-610.orig/configure biew-610/configure +--- biew-610.orig/configure 2009-11-13 15:52:36.000000000 +0100 ++++ biew-610/configure 2011-01-13 11:11:59.000000000 +0100 +@@ -497,7 +497,7 @@ + + _cdefos="-DDATADIR='\"$_datadir\"'" + +-cc_name=`$_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1` ++cc_name=`LC_ALL=POSIX $_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1` + cc_version=`$_cc -dumpversion` + + echocheck "C compiler name" Deleted: community-i686/biew-610-portable_configure-1.patch =================================================================== --- community-i686/biew-610-portable_configure-1.patch 2014-07-01 09:50:25 UTC (rev 113924) +++ community-i686/biew-610-portable_configure-1.patch 2014-07-01 09:50:42 UTC (rev 113925) @@ -1,167 +0,0 @@ -Changes the biew-610 configure script to use portable test constructs. See the -Autoconf manual <URL:https://www.gnu.org/software/autoconf/manual/html_node/ -Limitations-of-Builtins.html#index-g_t_0040command_007btest_007d-1725> for -explanations. - - –nico - - -diff -Naur biew-610.orig/configure biew-610/configure ---- biew-610.orig/configure 2009-11-13 14:52:36.000000000 +0000 -+++ biew-610/configure 2011-02-24 09:44:10.000000000 +0000 -@@ -171,7 +171,7 @@ - # 1st: print out help - - for parm in "$@" ; do -- if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then -+ if test "X$parm" = "X--help" || test "X$parm" = "X-help" || test "X$parm" = "X-h" ; then - cat << EOF - - Usage: $0 [OPTIONS]... -@@ -235,7 +235,7 @@ - _cp=cp - _libext=a - _libprefix=lib --test "$CC" && _cc="$CC" -+test "X$CC" != X && _cc="$CC" - _prefix="/usr/local" - _datadir= - _libdir= -@@ -340,11 +340,11 @@ - ;; - esac - done --test -z "$_datadir" && _datadir=$_prefix"/share/biew" --test -z "$_libdir" && _libdir=$_prefix"/lib/biew" -+test "X$_datadir" = X && _datadir=$_prefix"/share/biew" -+test "X$_libdir" = X && _libdir=$_prefix"/lib/biew" - - for I in "$TMPDIR" "$TEMPDIR" "/tmp" ; do -- test "$I" && break -+ test "X$I" != X && break - done - - TMPLOG="config.log" -@@ -357,8 +357,8 @@ - _tee="tee -a $TMPLOG" - - echocheck "architecture" --if test "$_target_arch" = auto ; then -- if test -z "$host_arch" ; then -+if test "X$_target_arch" = Xauto ; then -+ if test "X$host_arch" = X ; then - host_arch=`( uname -p ) 2>&1` - log "uname -p :" "$host_arch" - case "$host_arch" in -@@ -416,8 +416,8 @@ - x86_64 && _bitness=64 - - echocheck "target OS" --if test "$_target_system" = auto ; then -- if test -z "$system_name" ; then -+if test "X$_target_system" = Xauto ; then -+ if test "X$system_name" = X ; then - # OS name - system_name=`uname -s` - log "uname -s :" "$system_name" -@@ -461,8 +461,8 @@ - fi - fi - --if test "$_target_system" = auto ; then -- if test -z "$system_name" ; then -+if test "X$_target_system" = Xauto ; then -+ if test "X$system_name" = X ; then - # OS name - system_name=`/bin/sh --version 2>&1 | sed -n 's/^.*\([(]\)./\1/p'` - log "/bin/sh --version:" "$system_name" -@@ -549,7 +549,7 @@ - ;; - esac - --if test -z "$_x11incdir" ; then -+if test "X$_x11incdir" = X ; then - echocheck "X11 headers" - for I in /usr/include /usr/X11R6/include /usr/X11/include /usr/openwin/include ; do - if test -d "$I/X11" ; then -@@ -559,11 +559,11 @@ - fi - done - fi --if test -z "$_x11incdir" ; then -+if test "X$_x11incdir" = X ; then - echores "x11inc not found" - fi - --if test -z "$_x11libdir" ; then -+if test "X$_x11libdir" = X ; then - echocheck "X11 libs" - for I in /usr/X11R6/lib /usr/X11/lib /usr/lib32 /usr/openwin/lib ; do - if test -d "$I" ; then -@@ -573,24 +573,24 @@ - fi - done - fi --if test -z "$_x11libdir" ; then -+if test "X$_x11libdir" = X ; then - echores "x11lib not found" - fi - --test -z "$_debug" && _osldef="-s $_osldef" || _cdefos="-finline-limit-5 $_cdefos" --if test "$_profile" -o "$_debug" -o "$_gcov"; then -+test "X$_debug" = X && _osldef="-s $_osldef" || _cdefos="-finline-limit-5 $_cdefos" -+if test "X$_profile" != X || test "X$_debug" != X || test "X$_gcov" != X ; then - _cdefos="-W -Wall -O2 -fno-builtin $_debug $_profile $_gcov $_cdefos" - _osldef="$_debug $_profile $_osldef" --elif test -z "$CFLAGS" ; then -+elif test "X$CFLAGS" = X ; then - _cdefos="-DNDEBUG=1 -O2 -ffast-math -fomit-frame-pointer $_cdefos" - x86 && _cdefos="-mmmx -msse $_cdefos" - else - _cdefos="-DNDEBUG=1 $CFLAGS $_cdefos" - fi --test -n "$LDFLAGS" && _osldef="$LDFLAGS $_osldef" --test -n "$LIBS" && _osldef="$LIBS $_osldef" -+test "X$LDFLAGS" != X && _osldef="$LDFLAGS $_osldef" -+test "X$LIBS" != X && _osldef="$LIBS $_osldef" - --if test "$_target_system" = dos ; then -+if test "X$_target_system" = Xdos ; then - # disable cc_check call for DJGPP due bugs in bash - _cdefos="-D__HAVE_PRAGMA_PACK__=1 $_cdefos" - else -@@ -668,10 +668,10 @@ - _curseslib= - disable _curses - cc_check -lcurses && _curseslib="-lcurses" -- if test -z "$_curseslib" ; then -+ if test "X$_curseslib" = X ; then - cc_check -lncurses && _curseslib="-lncurses" - fi -- if test -n "$_curseslib" ; then -+ if test "X$_curseslib" != X ; then - enable _curses - _cdefos="-D_CURSES_ -D__OS_NAME__='\"Unix/Curses\"' $_cdefos" - _oslibs="$_curseslib $_oslibs" -@@ -711,10 +711,10 @@ - enabled sys_resource_h && _cdefos="-DHAVE_SYS_RESOURCE=1 $_cdefos" - echores "$sys_resource_h" - --if test -z "$_x11libdir" ; then -+if test "X$_x11libdir" = X ; then - _cdefos="$_cdefos" - else -- if test -z "$_x11incdir" ; then -+ if test "X$_x11incdir" = X ; then - _cdefos="$_cdefos" - else - _cdefos="-DHAVE_X11 $_cdefos" -@@ -738,7 +738,7 @@ - fi - - # Checking for INSTALL --if test -z $_install -+if test "X$_install" = X - then - _install="install" - $_install --version 1>/dev/null 2>/dev/null || _install="" Copied: beye/repos/community-i686/biew-610-portable_configure-1.patch (from rev 113924, beye/trunk/biew-610-portable_configure-1.patch) =================================================================== --- community-i686/biew-610-portable_configure-1.patch (rev 0) +++ community-i686/biew-610-portable_configure-1.patch 2014-07-01 09:50:42 UTC (rev 113925) @@ -0,0 +1,167 @@ +Changes the biew-610 configure script to use portable test constructs. See the +Autoconf manual <URL:https://www.gnu.org/software/autoconf/manual/html_node/ +Limitations-of-Builtins.html#index-g_t_0040command_007btest_007d-1725> for +explanations. + + –nico + + +diff -Naur biew-610.orig/configure biew-610/configure +--- biew-610.orig/configure 2009-11-13 14:52:36.000000000 +0000 ++++ biew-610/configure 2011-02-24 09:44:10.000000000 +0000 +@@ -171,7 +171,7 @@ + # 1st: print out help + + for parm in "$@" ; do +- if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then ++ if test "X$parm" = "X--help" || test "X$parm" = "X-help" || test "X$parm" = "X-h" ; then + cat << EOF + + Usage: $0 [OPTIONS]... +@@ -235,7 +235,7 @@ + _cp=cp + _libext=a + _libprefix=lib +-test "$CC" && _cc="$CC" ++test "X$CC" != X && _cc="$CC" + _prefix="/usr/local" + _datadir= + _libdir= +@@ -340,11 +340,11 @@ + ;; + esac + done +-test -z "$_datadir" && _datadir=$_prefix"/share/biew" +-test -z "$_libdir" && _libdir=$_prefix"/lib/biew" ++test "X$_datadir" = X && _datadir=$_prefix"/share/biew" ++test "X$_libdir" = X && _libdir=$_prefix"/lib/biew" + + for I in "$TMPDIR" "$TEMPDIR" "/tmp" ; do +- test "$I" && break ++ test "X$I" != X && break + done + + TMPLOG="config.log" +@@ -357,8 +357,8 @@ + _tee="tee -a $TMPLOG" + + echocheck "architecture" +-if test "$_target_arch" = auto ; then +- if test -z "$host_arch" ; then ++if test "X$_target_arch" = Xauto ; then ++ if test "X$host_arch" = X ; then + host_arch=`( uname -p ) 2>&1` + log "uname -p :" "$host_arch" + case "$host_arch" in +@@ -416,8 +416,8 @@ + x86_64 && _bitness=64 + + echocheck "target OS" +-if test "$_target_system" = auto ; then +- if test -z "$system_name" ; then ++if test "X$_target_system" = Xauto ; then ++ if test "X$system_name" = X ; then + # OS name + system_name=`uname -s` + log "uname -s :" "$system_name" +@@ -461,8 +461,8 @@ + fi + fi + +-if test "$_target_system" = auto ; then +- if test -z "$system_name" ; then ++if test "X$_target_system" = Xauto ; then ++ if test "X$system_name" = X ; then + # OS name + system_name=`/bin/sh --version 2>&1 | sed -n 's/^.*\([(]\)./\1/p'` + log "/bin/sh --version:" "$system_name" +@@ -549,7 +549,7 @@ + ;; + esac + +-if test -z "$_x11incdir" ; then ++if test "X$_x11incdir" = X ; then + echocheck "X11 headers" + for I in /usr/include /usr/X11R6/include /usr/X11/include /usr/openwin/include ; do + if test -d "$I/X11" ; then +@@ -559,11 +559,11 @@ + fi + done + fi +-if test -z "$_x11incdir" ; then ++if test "X$_x11incdir" = X ; then + echores "x11inc not found" + fi + +-if test -z "$_x11libdir" ; then ++if test "X$_x11libdir" = X ; then + echocheck "X11 libs" + for I in /usr/X11R6/lib /usr/X11/lib /usr/lib32 /usr/openwin/lib ; do + if test -d "$I" ; then +@@ -573,24 +573,24 @@ + fi + done + fi +-if test -z "$_x11libdir" ; then ++if test "X$_x11libdir" = X ; then + echores "x11lib not found" + fi + +-test -z "$_debug" && _osldef="-s $_osldef" || _cdefos="-finline-limit-5 $_cdefos" +-if test "$_profile" -o "$_debug" -o "$_gcov"; then ++test "X$_debug" = X && _osldef="-s $_osldef" || _cdefos="-finline-limit-5 $_cdefos" ++if test "X$_profile" != X || test "X$_debug" != X || test "X$_gcov" != X ; then + _cdefos="-W -Wall -O2 -fno-builtin $_debug $_profile $_gcov $_cdefos" + _osldef="$_debug $_profile $_osldef" +-elif test -z "$CFLAGS" ; then ++elif test "X$CFLAGS" = X ; then + _cdefos="-DNDEBUG=1 -O2 -ffast-math -fomit-frame-pointer $_cdefos" + x86 && _cdefos="-mmmx -msse $_cdefos" + else + _cdefos="-DNDEBUG=1 $CFLAGS $_cdefos" + fi +-test -n "$LDFLAGS" && _osldef="$LDFLAGS $_osldef" +-test -n "$LIBS" && _osldef="$LIBS $_osldef" ++test "X$LDFLAGS" != X && _osldef="$LDFLAGS $_osldef" ++test "X$LIBS" != X && _osldef="$LIBS $_osldef" + +-if test "$_target_system" = dos ; then ++if test "X$_target_system" = Xdos ; then + # disable cc_check call for DJGPP due bugs in bash + _cdefos="-D__HAVE_PRAGMA_PACK__=1 $_cdefos" + else +@@ -668,10 +668,10 @@ + _curseslib= + disable _curses + cc_check -lcurses && _curseslib="-lcurses" +- if test -z "$_curseslib" ; then ++ if test "X$_curseslib" = X ; then + cc_check -lncurses && _curseslib="-lncurses" + fi +- if test -n "$_curseslib" ; then ++ if test "X$_curseslib" != X ; then + enable _curses + _cdefos="-D_CURSES_ -D__OS_NAME__='\"Unix/Curses\"' $_cdefos" + _oslibs="$_curseslib $_oslibs" +@@ -711,10 +711,10 @@ + enabled sys_resource_h && _cdefos="-DHAVE_SYS_RESOURCE=1 $_cdefos" + echores "$sys_resource_h" + +-if test -z "$_x11libdir" ; then ++if test "X$_x11libdir" = X ; then + _cdefos="$_cdefos" + else +- if test -z "$_x11incdir" ; then ++ if test "X$_x11incdir" = X ; then + _cdefos="$_cdefos" + else + _cdefos="-DHAVE_X11 $_cdefos" +@@ -738,7 +738,7 @@ + fi + + # Checking for INSTALL +-if test -z $_install ++if test "X$_install" = X + then + _install="install" + $_install --version 1>/dev/null 2>/dev/null || _install="" Deleted: community-i686/biew-610-setup_window-1.patch =================================================================== --- community-i686/biew-610-setup_window-1.patch 2014-07-01 09:50:25 UTC (rev 113924) +++ community-i686/biew-610-setup_window-1.patch 2014-07-01 09:50:42 UTC (rev 113925) @@ -1,28 +0,0 @@ -If .biewrc does not exist, the setup dialog appears at program start. If you try -to click a checkbox with the mouse, biew tries to dereference a null pointer -(because the MainWindow is not yet set). - -This patch adds a workaround. Note that you actually cannot click a checkbox. -But that is what users might expect. (Maybe the biew code should be changed to -handle this properly.) Well, it is better not to crash, even if the checkboxes -are not clickable. - - –nico - - -diff -Naur biew-610.orig/events.c biew-610/events.c ---- biew-610.orig/events.c 2009-09-03 16:57:40.000000000 +0000 -+++ biew-610/events.c 2011-09-06 09:41:01.000000000 +0000 -@@ -118,7 +118,11 @@ - } - else - { -- X1 = 0; X2 = twGetClientWidth(MainWnd); Y1 = 1; Y2 = twGetClientHeight(MainWnd) - 1; -+ TWindow *wnd = -+ MainWnd ? MainWnd : /*XXX:drop this line?*/ -+ twGetWinAtPos(mx, my); -+ if(!wnd) return KE_MOUSE; -+ X1 = 0; X2 = twGetClientWidth(wnd); Y1 = 1; Y2 = twGetClientHeight(wnd) - 1; - } - wdh = X2 - X1; - hght = Y2 - Y1; Copied: beye/repos/community-i686/biew-610-setup_window-1.patch (from rev 113924, beye/trunk/biew-610-setup_window-1.patch) =================================================================== --- community-i686/biew-610-setup_window-1.patch (rev 0) +++ community-i686/biew-610-setup_window-1.patch 2014-07-01 09:50:42 UTC (rev 113925) @@ -0,0 +1,28 @@ +If .biewrc does not exist, the setup dialog appears at program start. If you try +to click a checkbox with the mouse, biew tries to dereference a null pointer +(because the MainWindow is not yet set). + +This patch adds a workaround. Note that you actually cannot click a checkbox. +But that is what users might expect. (Maybe the biew code should be changed to +handle this properly.) Well, it is better not to crash, even if the checkboxes +are not clickable. + + –nico + + +diff -Naur biew-610.orig/events.c biew-610/events.c +--- biew-610.orig/events.c 2009-09-03 16:57:40.000000000 +0000 ++++ biew-610/events.c 2011-09-06 09:41:01.000000000 +0000 +@@ -118,7 +118,11 @@ + } + else + { +- X1 = 0; X2 = twGetClientWidth(MainWnd); Y1 = 1; Y2 = twGetClientHeight(MainWnd) - 1; ++ TWindow *wnd = ++ MainWnd ? MainWnd : /*XXX:drop this line?*/ ++ twGetWinAtPos(mx, my); ++ if(!wnd) return KE_MOUSE; ++ X1 = 0; X2 = twGetClientWidth(wnd); Y1 = 1; Y2 = twGetClientHeight(wnd) - 1; + } + wdh = X2 - X1; + hght = Y2 - Y1; Deleted: community-x86_64/PKGBUILD =================================================================== --- community-x86_64/PKGBUILD 2014-07-01 09:50:25 UTC (rev 113924) +++ community-x86_64/PKGBUILD 2014-07-01 09:50:42 UTC (rev 113925) @@ -1,48 +0,0 @@ -# $Id$ -# Maintainer: Sergej Pupykin <pupykin.s+a...@gmail.com> -# Contributor: Sergej Pupykin <pupykin.s+a...@gmail.com> - -pkgname=beye -pkgver=6.1.0 -_lver=610 -pkgrel=4 -pkgdesc="A portable viewer of binary files, hexadecimal and disassembler modes" -arch=('i686' 'x86_64') -license=('GPL') -depends=('slang' 'gpm') -makedepends=('libx11') -replaces=('biew') -url="http://beye.sourceforge.net/" -source=("http://downloads.sourceforge.net/project/beye/biew/$pkgver/biew-${_lver}-src.tar.bz2" - 'biew-610-fix_localedep-1.patch' - 'biew-610-portable_configure-1.patch' - 'biew-610-setup_window-1.patch') -md5sums=('1b6477defaa61b8ca0f2ae1254978e94' - 'f2d510cbeffadc4cc20e4bc4e7a08014' - '32e8bc2673db6566720c1ec6f9512fd6' - '93d7e300bd5fb85952891f220b12250a') - -build() { - cd $srcdir/biew-${_lver} - - patch -Np1 -i "${srcdir}/biew-610-fix_localedep-1.patch" - patch -Np1 -i "${srcdir}/biew-610-portable_configure-1.patch" - - # Patch fixing a crash if MainWindow is not yet set - patch -Np1 -i "${srcdir}/biew-610-setup_window-1.patch" - - sed -i -e "s:lib32:lib:g" configure - export CFLAGS="$CFLAGS -mmmx -msse" - ./configure --prefix=/usr - - # Fix man pages path - sed -i -e 's^man/man1/biew.1^share/man/man1/biew.1^' makefile - - make LDFLAGS="${LDFLAGS}" -} - -package() { - cd $srcdir/biew-${_lver} - - make DESTDIR=$pkgdir install -} Copied: beye/repos/community-x86_64/PKGBUILD (from rev 113924, beye/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2014-07-01 09:50:42 UTC (rev 113925) @@ -0,0 +1,48 @@ +# $Id$ +# Maintainer: Sergej Pupykin <pupykin.s+a...@gmail.com> +# Contributor: Sergej Pupykin <pupykin.s+a...@gmail.com> + +pkgname=beye +pkgver=6.1.0 +_lver=610 +pkgrel=5 +pkgdesc="A portable viewer of binary files, hexadecimal and disassembler modes" +arch=('i686' 'x86_64') +license=('GPL') +depends=('slang' 'gpm') +makedepends=('libx11') +replaces=('biew') +url="http://beye.sourceforge.net/" +source=("http://downloads.sourceforge.net/project/beye/biew/$pkgver/biew-${_lver}-src.tar.bz2" + 'biew-610-fix_localedep-1.patch' + 'biew-610-portable_configure-1.patch' + 'biew-610-setup_window-1.patch') +md5sums=('1b6477defaa61b8ca0f2ae1254978e94' + 'f2d510cbeffadc4cc20e4bc4e7a08014' + '32e8bc2673db6566720c1ec6f9512fd6' + '93d7e300bd5fb85952891f220b12250a') + +build() { + cd $srcdir/biew-${_lver} + + patch -Np1 -i "${srcdir}/biew-610-fix_localedep-1.patch" + patch -Np1 -i "${srcdir}/biew-610-portable_configure-1.patch" + + # Patch fixing a crash if MainWindow is not yet set + patch -Np1 -i "${srcdir}/biew-610-setup_window-1.patch" + + sed -i -e "s:lib32:lib:g" configure + export CFLAGS="$CFLAGS -mmmx -msse" + ./configure --prefix=/usr + + # Fix man pages path + sed -i -e 's^man/man1/biew.1^share/man/man1/biew.1^' makefile + + make LDFLAGS="${LDFLAGS}" +} + +package() { + cd $srcdir/biew-${_lver} + + make DESTDIR=$pkgdir install +} Deleted: community-x86_64/biew-610-fix_localedep-1.patch =================================================================== --- community-x86_64/biew-610-fix_localedep-1.patch 2014-07-01 09:50:25 UTC (rev 113924) +++ community-x86_64/biew-610-fix_localedep-1.patch 2014-07-01 09:50:42 UTC (rev 113925) @@ -1,26 +0,0 @@ -The configure script of biew-6.1.0 fails with - Checking for C compiler name ... gcc-Version -if using the de_DE.UTF-8 locale and sys-devel/gcc-4.5.2. It may fail with other -locales and/or compilers, too. The problem occurs due to the fact that the -string “gcc version” written by gcc for ‘gcc -v’ is translated according to the -language (German in the case mentioned above). - -This patch makes sure that the POSIX locale is used when the biew configure -script checks for the name of the compiler. This allows the configure script to -parse the output properly. - - –nico - - -diff -Naur biew-610.orig/configure biew-610/configure ---- biew-610.orig/configure 2009-11-13 15:52:36.000000000 +0100 -+++ biew-610/configure 2011-01-13 11:11:59.000000000 +0100 -@@ -497,7 +497,7 @@ - - _cdefos="-DDATADIR='\"$_datadir\"'" - --cc_name=`$_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1` -+cc_name=`LC_ALL=POSIX $_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1` - cc_version=`$_cc -dumpversion` - - echocheck "C compiler name" Copied: beye/repos/community-x86_64/biew-610-fix_localedep-1.patch (from rev 113924, beye/trunk/biew-610-fix_localedep-1.patch) =================================================================== --- community-x86_64/biew-610-fix_localedep-1.patch (rev 0) +++ community-x86_64/biew-610-fix_localedep-1.patch 2014-07-01 09:50:42 UTC (rev 113925) @@ -0,0 +1,26 @@ +The configure script of biew-6.1.0 fails with + Checking for C compiler name ... gcc-Version +if using the de_DE.UTF-8 locale and sys-devel/gcc-4.5.2. It may fail with other +locales and/or compilers, too. The problem occurs due to the fact that the +string “gcc version” written by gcc for ‘gcc -v’ is translated according to the +language (German in the case mentioned above). + +This patch makes sure that the POSIX locale is used when the biew configure +script checks for the name of the compiler. This allows the configure script to +parse the output properly. + + –nico + + +diff -Naur biew-610.orig/configure biew-610/configure +--- biew-610.orig/configure 2009-11-13 15:52:36.000000000 +0100 ++++ biew-610/configure 2011-01-13 11:11:59.000000000 +0100 +@@ -497,7 +497,7 @@ + + _cdefos="-DDATADIR='\"$_datadir\"'" + +-cc_name=`$_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1` ++cc_name=`LC_ALL=POSIX $_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1` + cc_version=`$_cc -dumpversion` + + echocheck "C compiler name" Deleted: community-x86_64/biew-610-portable_configure-1.patch =================================================================== --- community-x86_64/biew-610-portable_configure-1.patch 2014-07-01 09:50:25 UTC (rev 113924) +++ community-x86_64/biew-610-portable_configure-1.patch 2014-07-01 09:50:42 UTC (rev 113925) @@ -1,167 +0,0 @@ -Changes the biew-610 configure script to use portable test constructs. See the -Autoconf manual <URL:https://www.gnu.org/software/autoconf/manual/html_node/ -Limitations-of-Builtins.html#index-g_t_0040command_007btest_007d-1725> for -explanations. - - –nico - - -diff -Naur biew-610.orig/configure biew-610/configure ---- biew-610.orig/configure 2009-11-13 14:52:36.000000000 +0000 -+++ biew-610/configure 2011-02-24 09:44:10.000000000 +0000 -@@ -171,7 +171,7 @@ - # 1st: print out help - - for parm in "$@" ; do -- if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then -+ if test "X$parm" = "X--help" || test "X$parm" = "X-help" || test "X$parm" = "X-h" ; then - cat << EOF - - Usage: $0 [OPTIONS]... -@@ -235,7 +235,7 @@ - _cp=cp - _libext=a - _libprefix=lib --test "$CC" && _cc="$CC" -+test "X$CC" != X && _cc="$CC" - _prefix="/usr/local" - _datadir= - _libdir= -@@ -340,11 +340,11 @@ - ;; - esac - done --test -z "$_datadir" && _datadir=$_prefix"/share/biew" --test -z "$_libdir" && _libdir=$_prefix"/lib/biew" -+test "X$_datadir" = X && _datadir=$_prefix"/share/biew" -+test "X$_libdir" = X && _libdir=$_prefix"/lib/biew" - - for I in "$TMPDIR" "$TEMPDIR" "/tmp" ; do -- test "$I" && break -+ test "X$I" != X && break - done - - TMPLOG="config.log" -@@ -357,8 +357,8 @@ - _tee="tee -a $TMPLOG" - - echocheck "architecture" --if test "$_target_arch" = auto ; then -- if test -z "$host_arch" ; then -+if test "X$_target_arch" = Xauto ; then -+ if test "X$host_arch" = X ; then - host_arch=`( uname -p ) 2>&1` - log "uname -p :" "$host_arch" - case "$host_arch" in -@@ -416,8 +416,8 @@ - x86_64 && _bitness=64 - - echocheck "target OS" --if test "$_target_system" = auto ; then -- if test -z "$system_name" ; then -+if test "X$_target_system" = Xauto ; then -+ if test "X$system_name" = X ; then - # OS name - system_name=`uname -s` - log "uname -s :" "$system_name" -@@ -461,8 +461,8 @@ - fi - fi - --if test "$_target_system" = auto ; then -- if test -z "$system_name" ; then -+if test "X$_target_system" = Xauto ; then -+ if test "X$system_name" = X ; then - # OS name - system_name=`/bin/sh --version 2>&1 | sed -n 's/^.*\([(]\)./\1/p'` - log "/bin/sh --version:" "$system_name" -@@ -549,7 +549,7 @@ - ;; - esac - --if test -z "$_x11incdir" ; then -+if test "X$_x11incdir" = X ; then - echocheck "X11 headers" - for I in /usr/include /usr/X11R6/include /usr/X11/include /usr/openwin/include ; do - if test -d "$I/X11" ; then -@@ -559,11 +559,11 @@ - fi - done - fi --if test -z "$_x11incdir" ; then -+if test "X$_x11incdir" = X ; then - echores "x11inc not found" - fi - --if test -z "$_x11libdir" ; then -+if test "X$_x11libdir" = X ; then - echocheck "X11 libs" - for I in /usr/X11R6/lib /usr/X11/lib /usr/lib32 /usr/openwin/lib ; do - if test -d "$I" ; then -@@ -573,24 +573,24 @@ - fi - done - fi --if test -z "$_x11libdir" ; then -+if test "X$_x11libdir" = X ; then - echores "x11lib not found" - fi - --test -z "$_debug" && _osldef="-s $_osldef" || _cdefos="-finline-limit-5 $_cdefos" --if test "$_profile" -o "$_debug" -o "$_gcov"; then -+test "X$_debug" = X && _osldef="-s $_osldef" || _cdefos="-finline-limit-5 $_cdefos" -+if test "X$_profile" != X || test "X$_debug" != X || test "X$_gcov" != X ; then - _cdefos="-W -Wall -O2 -fno-builtin $_debug $_profile $_gcov $_cdefos" - _osldef="$_debug $_profile $_osldef" --elif test -z "$CFLAGS" ; then -+elif test "X$CFLAGS" = X ; then - _cdefos="-DNDEBUG=1 -O2 -ffast-math -fomit-frame-pointer $_cdefos" - x86 && _cdefos="-mmmx -msse $_cdefos" - else - _cdefos="-DNDEBUG=1 $CFLAGS $_cdefos" - fi --test -n "$LDFLAGS" && _osldef="$LDFLAGS $_osldef" --test -n "$LIBS" && _osldef="$LIBS $_osldef" -+test "X$LDFLAGS" != X && _osldef="$LDFLAGS $_osldef" -+test "X$LIBS" != X && _osldef="$LIBS $_osldef" - --if test "$_target_system" = dos ; then -+if test "X$_target_system" = Xdos ; then - # disable cc_check call for DJGPP due bugs in bash - _cdefos="-D__HAVE_PRAGMA_PACK__=1 $_cdefos" - else -@@ -668,10 +668,10 @@ - _curseslib= - disable _curses - cc_check -lcurses && _curseslib="-lcurses" -- if test -z "$_curseslib" ; then -+ if test "X$_curseslib" = X ; then - cc_check -lncurses && _curseslib="-lncurses" - fi -- if test -n "$_curseslib" ; then -+ if test "X$_curseslib" != X ; then - enable _curses - _cdefos="-D_CURSES_ -D__OS_NAME__='\"Unix/Curses\"' $_cdefos" - _oslibs="$_curseslib $_oslibs" -@@ -711,10 +711,10 @@ - enabled sys_resource_h && _cdefos="-DHAVE_SYS_RESOURCE=1 $_cdefos" - echores "$sys_resource_h" - --if test -z "$_x11libdir" ; then -+if test "X$_x11libdir" = X ; then - _cdefos="$_cdefos" - else -- if test -z "$_x11incdir" ; then -+ if test "X$_x11incdir" = X ; then - _cdefos="$_cdefos" - else - _cdefos="-DHAVE_X11 $_cdefos" -@@ -738,7 +738,7 @@ - fi - - # Checking for INSTALL --if test -z $_install -+if test "X$_install" = X - then - _install="install" - $_install --version 1>/dev/null 2>/dev/null || _install="" Copied: beye/repos/community-x86_64/biew-610-portable_configure-1.patch (from rev 113924, beye/trunk/biew-610-portable_configure-1.patch) =================================================================== --- community-x86_64/biew-610-portable_configure-1.patch (rev 0) +++ community-x86_64/biew-610-portable_configure-1.patch 2014-07-01 09:50:42 UTC (rev 113925) @@ -0,0 +1,167 @@ +Changes the biew-610 configure script to use portable test constructs. See the +Autoconf manual <URL:https://www.gnu.org/software/autoconf/manual/html_node/ +Limitations-of-Builtins.html#index-g_t_0040command_007btest_007d-1725> for +explanations. + + –nico + + +diff -Naur biew-610.orig/configure biew-610/configure +--- biew-610.orig/configure 2009-11-13 14:52:36.000000000 +0000 ++++ biew-610/configure 2011-02-24 09:44:10.000000000 +0000 +@@ -171,7 +171,7 @@ + # 1st: print out help + + for parm in "$@" ; do +- if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then ++ if test "X$parm" = "X--help" || test "X$parm" = "X-help" || test "X$parm" = "X-h" ; then + cat << EOF + + Usage: $0 [OPTIONS]... +@@ -235,7 +235,7 @@ + _cp=cp + _libext=a + _libprefix=lib +-test "$CC" && _cc="$CC" ++test "X$CC" != X && _cc="$CC" + _prefix="/usr/local" + _datadir= + _libdir= +@@ -340,11 +340,11 @@ + ;; + esac + done +-test -z "$_datadir" && _datadir=$_prefix"/share/biew" +-test -z "$_libdir" && _libdir=$_prefix"/lib/biew" ++test "X$_datadir" = X && _datadir=$_prefix"/share/biew" ++test "X$_libdir" = X && _libdir=$_prefix"/lib/biew" + + for I in "$TMPDIR" "$TEMPDIR" "/tmp" ; do +- test "$I" && break ++ test "X$I" != X && break + done + + TMPLOG="config.log" +@@ -357,8 +357,8 @@ + _tee="tee -a $TMPLOG" + + echocheck "architecture" +-if test "$_target_arch" = auto ; then +- if test -z "$host_arch" ; then ++if test "X$_target_arch" = Xauto ; then ++ if test "X$host_arch" = X ; then + host_arch=`( uname -p ) 2>&1` + log "uname -p :" "$host_arch" + case "$host_arch" in +@@ -416,8 +416,8 @@ + x86_64 && _bitness=64 + + echocheck "target OS" +-if test "$_target_system" = auto ; then +- if test -z "$system_name" ; then ++if test "X$_target_system" = Xauto ; then ++ if test "X$system_name" = X ; then + # OS name + system_name=`uname -s` + log "uname -s :" "$system_name" +@@ -461,8 +461,8 @@ + fi + fi + +-if test "$_target_system" = auto ; then +- if test -z "$system_name" ; then ++if test "X$_target_system" = Xauto ; then ++ if test "X$system_name" = X ; then + # OS name + system_name=`/bin/sh --version 2>&1 | sed -n 's/^.*\([(]\)./\1/p'` + log "/bin/sh --version:" "$system_name" +@@ -549,7 +549,7 @@ + ;; + esac + +-if test -z "$_x11incdir" ; then ++if test "X$_x11incdir" = X ; then + echocheck "X11 headers" + for I in /usr/include /usr/X11R6/include /usr/X11/include /usr/openwin/include ; do + if test -d "$I/X11" ; then +@@ -559,11 +559,11 @@ + fi + done + fi +-if test -z "$_x11incdir" ; then ++if test "X$_x11incdir" = X ; then + echores "x11inc not found" + fi + +-if test -z "$_x11libdir" ; then ++if test "X$_x11libdir" = X ; then + echocheck "X11 libs" + for I in /usr/X11R6/lib /usr/X11/lib /usr/lib32 /usr/openwin/lib ; do + if test -d "$I" ; then +@@ -573,24 +573,24 @@ + fi + done + fi +-if test -z "$_x11libdir" ; then ++if test "X$_x11libdir" = X ; then + echores "x11lib not found" + fi + +-test -z "$_debug" && _osldef="-s $_osldef" || _cdefos="-finline-limit-5 $_cdefos" +-if test "$_profile" -o "$_debug" -o "$_gcov"; then ++test "X$_debug" = X && _osldef="-s $_osldef" || _cdefos="-finline-limit-5 $_cdefos" ++if test "X$_profile" != X || test "X$_debug" != X || test "X$_gcov" != X ; then + _cdefos="-W -Wall -O2 -fno-builtin $_debug $_profile $_gcov $_cdefos" + _osldef="$_debug $_profile $_osldef" +-elif test -z "$CFLAGS" ; then ++elif test "X$CFLAGS" = X ; then + _cdefos="-DNDEBUG=1 -O2 -ffast-math -fomit-frame-pointer $_cdefos" + x86 && _cdefos="-mmmx -msse $_cdefos" + else + _cdefos="-DNDEBUG=1 $CFLAGS $_cdefos" + fi +-test -n "$LDFLAGS" && _osldef="$LDFLAGS $_osldef" +-test -n "$LIBS" && _osldef="$LIBS $_osldef" ++test "X$LDFLAGS" != X && _osldef="$LDFLAGS $_osldef" ++test "X$LIBS" != X && _osldef="$LIBS $_osldef" + +-if test "$_target_system" = dos ; then ++if test "X$_target_system" = Xdos ; then + # disable cc_check call for DJGPP due bugs in bash + _cdefos="-D__HAVE_PRAGMA_PACK__=1 $_cdefos" + else +@@ -668,10 +668,10 @@ + _curseslib= + disable _curses + cc_check -lcurses && _curseslib="-lcurses" +- if test -z "$_curseslib" ; then ++ if test "X$_curseslib" = X ; then + cc_check -lncurses && _curseslib="-lncurses" + fi +- if test -n "$_curseslib" ; then ++ if test "X$_curseslib" != X ; then + enable _curses + _cdefos="-D_CURSES_ -D__OS_NAME__='\"Unix/Curses\"' $_cdefos" + _oslibs="$_curseslib $_oslibs" +@@ -711,10 +711,10 @@ + enabled sys_resource_h && _cdefos="-DHAVE_SYS_RESOURCE=1 $_cdefos" + echores "$sys_resource_h" + +-if test -z "$_x11libdir" ; then ++if test "X$_x11libdir" = X ; then + _cdefos="$_cdefos" + else +- if test -z "$_x11incdir" ; then ++ if test "X$_x11incdir" = X ; then + _cdefos="$_cdefos" + else + _cdefos="-DHAVE_X11 $_cdefos" +@@ -738,7 +738,7 @@ + fi + + # Checking for INSTALL +-if test -z $_install ++if test "X$_install" = X + then + _install="install" + $_install --version 1>/dev/null 2>/dev/null || _install="" Deleted: community-x86_64/biew-610-setup_window-1.patch =================================================================== --- community-x86_64/biew-610-setup_window-1.patch 2014-07-01 09:50:25 UTC (rev 113924) +++ community-x86_64/biew-610-setup_window-1.patch 2014-07-01 09:50:42 UTC (rev 113925) @@ -1,28 +0,0 @@ -If .biewrc does not exist, the setup dialog appears at program start. If you try -to click a checkbox with the mouse, biew tries to dereference a null pointer -(because the MainWindow is not yet set). - -This patch adds a workaround. Note that you actually cannot click a checkbox. -But that is what users might expect. (Maybe the biew code should be changed to -handle this properly.) Well, it is better not to crash, even if the checkboxes -are not clickable. - - –nico - - -diff -Naur biew-610.orig/events.c biew-610/events.c ---- biew-610.orig/events.c 2009-09-03 16:57:40.000000000 +0000 -+++ biew-610/events.c 2011-09-06 09:41:01.000000000 +0000 -@@ -118,7 +118,11 @@ - } - else - { -- X1 = 0; X2 = twGetClientWidth(MainWnd); Y1 = 1; Y2 = twGetClientHeight(MainWnd) - 1; -+ TWindow *wnd = -+ MainWnd ? MainWnd : /*XXX:drop this line?*/ -+ twGetWinAtPos(mx, my); -+ if(!wnd) return KE_MOUSE; -+ X1 = 0; X2 = twGetClientWidth(wnd); Y1 = 1; Y2 = twGetClientHeight(wnd) - 1; - } - wdh = X2 - X1; - hght = Y2 - Y1; Copied: beye/repos/community-x86_64/biew-610-setup_window-1.patch (from rev 113924, beye/trunk/biew-610-setup_window-1.patch) =================================================================== --- community-x86_64/biew-610-setup_window-1.patch (rev 0) +++ community-x86_64/biew-610-setup_window-1.patch 2014-07-01 09:50:42 UTC (rev 113925) @@ -0,0 +1,28 @@ +If .biewrc does not exist, the setup dialog appears at program start. If you try +to click a checkbox with the mouse, biew tries to dereference a null pointer +(because the MainWindow is not yet set). + +This patch adds a workaround. Note that you actually cannot click a checkbox. +But that is what users might expect. (Maybe the biew code should be changed to +handle this properly.) Well, it is better not to crash, even if the checkboxes +are not clickable. + + –nico + + +diff -Naur biew-610.orig/events.c biew-610/events.c +--- biew-610.orig/events.c 2009-09-03 16:57:40.000000000 +0000 ++++ biew-610/events.c 2011-09-06 09:41:01.000000000 +0000 +@@ -118,7 +118,11 @@ + } + else + { +- X1 = 0; X2 = twGetClientWidth(MainWnd); Y1 = 1; Y2 = twGetClientHeight(MainWnd) - 1; ++ TWindow *wnd = ++ MainWnd ? MainWnd : /*XXX:drop this line?*/ ++ twGetWinAtPos(mx, my); ++ if(!wnd) return KE_MOUSE; ++ X1 = 0; X2 = twGetClientWidth(wnd); Y1 = 1; Y2 = twGetClientHeight(wnd) - 1; + } + wdh = X2 - X1; + hght = Y2 - Y1;