[Pkg-wmaker-commits] [fookb] 02/07: Import Upstream version 3.0

Doug Torrance dtorrance-guest at moszumanska.debian.org
Sat Sep 2 14:53:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository fookb.

commit a04fc709c581e954f14a7372f2a348b7c5a1fd8e
Author: Doug Torrance <dtorrance at piedmont.edu>
Date:   Sat Sep 2 10:50:42 2017 -0400

    Import Upstream version 3.0
---
 INSTALL                                 |  25 ++-
 KNOWN_BUGS                              |   8 +
 Makefile.in                             |  16 +-
 README.russian => README.russian.koi8-r |   0
 README.russian.utf-8                    |   7 +
 TODO                                    |  10 +
 VERSION                                 |  12 ++
 build-stamp                             |   0
 configure                               | 317 +++++++++++++++++---------------
 configure.in                            | 160 +++++++++++-----
 copyright                               |   2 +-
 fookb-plainx.1x                         |  24 +--
 fookb-wmaker.1x                         |  24 +--
 fookb.1x                                |  20 +-
 fookb.c                                 |  15 +-
 fookb.h                                 |   5 +-
 globals.c                               |   3 +-
 images.c                                |   2 +-
 images.h                                |   2 +-
 opts.c                                  |  12 +-
 opts.h                                  |   3 +-
 params.c                                | 132 +++++++++----
 params.h                                |   8 +-
 sound.c                                 |   2 +-
 sound.h                                 |   3 +-
 25 files changed, 491 insertions(+), 321 deletions(-)

diff --git a/INSTALL b/INSTALL
index 9c4967e..777ac29 100644
--- a/INSTALL
+++ b/INSTALL
@@ -22,11 +22,11 @@ E.g.: ./configure --prefix /usr/local/stow/fookb
 
 configure tries automagically decide: do you wish to compile WindowMaker
 dockable version of fookb and would you like use PropList-like configuration
-file or X resources for configuring fookb.
+file or X resources for configuring fookb (using libWUtil).
 
-If you have libPropList AND proplist.h we will try to compile
-libPropList-enabled version of fookb. If you want to compile libproplist-free
-version of fookb, run configure with --disable-libproplist argument.
+If you have libWUtil AND WINGs/WUtil.h we will try to compile
+libWUtil-enabled version of fookb. If you want to compile libWUtil-free
+version of fookb, run configure with --disable-libWUtil argument.
 
 If you have wmaker in your $PATH, we will compile WindowMaker dockable verison
 of fookb. Run configure with --disable-wmaker to disable this behaviour.
@@ -47,20 +47,24 @@ make install
 
 5. Configuring fookb
 
-IF YOU COMPILED libPropList-version of fookb:
+IF YOU COMPILED libWUtil-version of fookb:
 
 Copy fookb.cf to ~/GNUstep/Defaults/FOOkb (for Window Maker enabled) or to
 ~/.fookb (for Window Maker disabled version) and edit this file according to
 your desire.
 
-IF YOU COMPILED non-libPropList version of fookb:
+IF YOU COMPILED non-libWUtil version of fookb:
 
 You should put the following resources in your
 /usr/X11R6/lib/X11/app-defaults/Fookb (or in other file which will be read by
 xrdb -- such as ~/.Xresources):
 
-fookb.icon1: xpm_file_with_full_path fookb.icon2: the same fookb.icon3: the
-same fookb.icon4: the same fookb.iconBoom: the same fookb.sound: Yes/No
+fookb.icon1: xpm_file_with_full_path
+fookb.icon2: the same
+fookb.icon3: the same
+fookb.icon4: the same
+fookb.iconBoom: the same
+fookb.sound: Yes/No
 fookb.command: some_command (for playing sound)
 
 BOTH WAYS:
@@ -68,7 +72,10 @@ BOTH WAYS:
 Instead of putting parameter in config file you may use the following command
 line parameters:
 
--icon1 xpm_file_with_full_path -icon2 the same -icon3 the same -icon4 the same
+-icon1 xpm_file_with_full_path
+-icon2 the same
+-icon3 the same
+-icon4 the same
 -iconboom the same
 
 You may also use -display command line parameter.
diff --git a/KNOWN_BUGS b/KNOWN_BUGS
new file mode 100644
index 0000000..2fda5c8
--- /dev/null
+++ b/KNOWN_BUGS
@@ -0,0 +1,8 @@
+* If configuration parameter 'sound' is not defined, fookb will not die, but
+will print error message and kill new-born child every time you switch
+keyboard layout. Well, it's not a bug, it's a feature.
+
+* Sometimes fookb receives message about changing XKB group, but
+message.state.group does not point to any existing XKB group. In this
+case fookb will show IconBoom (from config file) picture.
+As far as I know the only way to look at this bug is to run vmware.
diff --git a/Makefile.in b/Makefile.in
index df1dbd7..96e926c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3,15 +3,15 @@ SHARE_PATH=@prefix@/share/fookb
 MAN_PATH=@prefix@/man/man1
 
 srcdir = ..
-
 # FLAGS=-Wall -g -DDEBUG @DEFS@
 FLAGS=-Wall @DEFS@
 
 GCC=@CC@
 
 INCLUDEDIR=@X_CFLAGS@
-
 LIBDIR=@X_LIBS@
+PRELIBS=@X_PRE_LIBS@
+EXTRALIBS=@X_EXTRA_LIBS@
 
 LIBS=@LIBS@
 
@@ -19,10 +19,8 @@ LIBS=@LIBS@
 # DLIBS=-lefence
 DLIBS=
 
-
-
 fookb: fookb.o params.o images.o sound.o opts.o globals.o
-	${GCC} ${LIBDIR} ${DLIBS} ${LIBS} -o fookb fookb.o params.o images.o sound.o opts.o globals.o
+	${GCC} ${PRELIBS} ${LIBDIR} ${EXTRALIBS} ${DLIBS} ${LIBS} -o fookb fookb.o params.o images.o sound.o opts.o globals.o @WUTIL_LIB@
 
 fookb.o: $(srcdir)/fookb.c $(srcdir)/fookb.h $(srcdir)/params.h
 	${GCC} -c ${FLAGS} ${INCLUDEDIR} -I$(srcdir) $(srcdir)/fookb.c
@@ -41,7 +39,6 @@ opts.o: $(srcdir)/opts.h $(srcdir)/fookb.h $(srcdir)/opts.c
 
 globals.o: $(srcdir)/globals.c
 	${GCC} -c ${FLAGS} ${INCLUDEDIR} -I$(srcdir) $(srcdir)/globals.c
-	
 
 clean:
 	rm -f fookb fookb.o params.o images.o sound.o opts.o globals.o
@@ -49,9 +46,12 @@ clean:
 superclean: clean
 	rm -f Makefile config.*
 
+superpuperclean: superclean
+	rm -f configure
+
 install: fookb
-	# mkdir -p ${BIN_PATH}
-	#mkdir -p ${SHARE_PATH}
+	#mkdir -p ${BIN_PATH}
+	#mkdir -p ${DESTDIR}${SHARE_PATH}
 	#mkdir -p ${MAN_PATH}
 	#cp fookb ${BIN_PATH}
 	cp $(srcdir)/1.xpm ${DESTDIR}${SHARE_PATH}
diff --git a/README.russian b/README.russian.koi8-r
similarity index 100%
rename from README.russian
rename to README.russian.koi8-r
diff --git a/README.russian.utf-8 b/README.russian.utf-8
new file mode 100644
index 0000000..4a6cd2b
--- /dev/null
+++ b/README.russian.utf-8
@@ -0,0 +1,7 @@
+***** Этот текст не дублирует файл README! *****
+
+Если вы нашли эту программу по ссылке, приведенной в какой-либо книге (мне
+таких известно две), то имейте в виду, что инструкции по компиляции и
+установке fookb, приведенные в этих книгах, УСТАРЕЛИ!
+
+Делайте все так, как написано в INSTALL.
diff --git a/TODO b/TODO
index 5ea3442..7a539aa 100644
--- a/TODO
+++ b/TODO
@@ -3,3 +3,13 @@ To find English-speaking editor for all documentation.
 ??? WINGs-based config utility for fookb.
 
 [This is a place for your suggestion.]
+
+[XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX]
+
+There is NO PLACE for different Xkb groups for different windows. Xkb group is
+the property of X server, not window.
+
+[XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX]
+
+There is NO PLACE for putting icon in window tilebar. Use Window Maker; it
+provides such facility. I'm doing nothing with windows.
diff --git a/VERSION b/VERSION
index 4059702..17278fd 100644
--- a/VERSION
+++ b/VERSION
@@ -1,3 +1,15 @@
+3.0-unstable
+
+configure.in rewritten almost from scratch.
+
+Starting from version 0.70 Window Maker does not contain libproplist anymore;
+so fookb now DOES NOT SUPPORT libproplist. You will get the same functionality
+with libWUtil (part of Window Maker).
+
+lint is still unhappy.
+
+And the most important thing -- author's email was changed everywhere.
+
 2.21-unstable
 
 One more step to the lint happiness.
diff --git a/build-stamp b/build-stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/configure b/configure
index 1711998..bec331e 100755
--- a/configure
+++ b/configure
@@ -14,9 +14,9 @@ ac_default_prefix=/usr/local
 ac_help="$ac_help
   --with-x                use the X Window System"
 ac_help="$ac_help
---enable-libproplist  Try to compile libproplist-enabled version"
+  --enable-libWUtil       try to use property lists handling in libWUtil"
 ac_help="$ac_help
---enable-wmaker  Create windowmaker dockable application"
+  --enable-wmaker         create windowmaker dockable application"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -528,11 +528,10 @@ fi
 
 
 
-
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:536: checking for $ac_word" >&5
+echo "configure:535: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -562,7 +561,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:566: checking for $ac_word" >&5
+echo "configure:565: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -613,7 +612,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:617: checking for $ac_word" >&5
+echo "configure:616: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -645,7 +644,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:649: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:648: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -656,12 +655,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 660 "configure"
+#line 659 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -687,12 +686,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:691: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:690: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:696: checking whether we are using GNU C" >&5
+echo "configure:695: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -701,7 +700,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -720,7 +719,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:724: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:723: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -752,9 +751,13 @@ else
 fi
 
 
+WUTIL_LIB="-lWUtil"
+
+
+
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:758: checking how to run the C preprocessor" >&5
+echo "configure:761: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -769,13 +772,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 773 "configure"
+#line 776 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -786,13 +789,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 790 "configure"
+#line 793 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -803,13 +806,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 807 "configure"
+#line 810 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -838,7 +841,7 @@ echo "$ac_t""$CPP" 1>&6
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:842: checking for X" >&5
+echo "configure:845: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -900,12 +903,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 904 "configure"
+#line 907 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -974,14 +977,14 @@ if test "$ac_x_libraries" = NO; then
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 978 "configure"
+#line 981 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -1087,17 +1090,17 @@ else
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:1091: checking whether -R must be followed by a space" >&5
+echo "configure:1094: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 1094 "configure"
+#line 1097 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -1113,14 +1116,14 @@ rm -f conftest*
       else
 	LIBS="$ac_xsave_LIBS -R $x_libraries"
 	cat > conftest.$ac_ext <<EOF
-#line 1117 "configure"
+#line 1120 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -1152,7 +1155,7 @@ rm -f conftest*
     # libraries were built with DECnet support.  And karl at cs.umb.edu says
     # the Alpha needs dnet_stub (dnet does not exist).
     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:1156: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:1159: checking for dnet_ntoa in -ldnet" >&5
 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1160,7 +1163,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1164 "configure"
+#line 1167 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1171,7 +1174,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:1175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1193,7 +1196,7 @@ fi
 
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:1197: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:1200: checking for dnet_ntoa in -ldnet_stub" >&5
 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1201,7 +1204,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1205 "configure"
+#line 1208 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1212,7 +1215,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:1216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1241,12 +1244,12 @@ fi
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey at clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:1245: checking for gethostbyname" >&5
+echo "configure:1248: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1250 "configure"
+#line 1253 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -1269,7 +1272,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -1290,7 +1293,7 @@ fi
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:1294: checking for gethostbyname in -lnsl" >&5
+echo "configure:1297: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1298,7 +1301,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1302 "configure"
+#line 1305 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1309,7 +1312,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:1313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1339,12 +1342,12 @@ fi
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:1343: checking for connect" >&5
+echo "configure:1346: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1348 "configure"
+#line 1351 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -1367,7 +1370,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -1388,7 +1391,7 @@ fi
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:1392: checking for connect in -lsocket" >&5
+echo "configure:1395: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1396,7 +1399,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1400 "configure"
+#line 1403 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1407,7 +1410,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:1411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1431,12 +1434,12 @@ fi
 
     # gomez at mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:1435: checking for remove" >&5
+echo "configure:1438: checking for remove" >&5
 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1440 "configure"
+#line 1443 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -1459,7 +1462,7 @@ remove();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -1480,7 +1483,7 @@ fi
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:1484: checking for remove in -lposix" >&5
+echo "configure:1487: checking for remove in -lposix" >&5
 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1488,7 +1491,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1492 "configure"
+#line 1495 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1499,7 +1502,7 @@ int main() {
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:1503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1523,12 +1526,12 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:1527: checking for shmat" >&5
+echo "configure:1530: checking for shmat" >&5
 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1532 "configure"
+#line 1535 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -1551,7 +1554,7 @@ shmat();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -1572,7 +1575,7 @@ fi
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:1576: checking for shmat in -lipc" >&5
+echo "configure:1579: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1580,7 +1583,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1584 "configure"
+#line 1587 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1591,7 +1594,7 @@ int main() {
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1624,7 +1627,7 @@ fi
   # libraries we check for below, so use a different variable.
   #  --interran at uluru.Stanford.EDU, kb at cs.umb.edu.
   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:1628: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:1631: checking for IceConnectionNumber in -lICE" >&5
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1632,7 +1635,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1636 "configure"
+#line 1639 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1643,7 +1646,7 @@ int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1669,15 +1672,16 @@ fi
 
 
 echo $ac_n "checking for XkbOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:1673: checking for XkbOpenDisplay in -lX11" >&5
+echo "configure:1676: checking for XkbOpenDisplay in -lX11" >&5
 ac_lib_var=`echo X11'_'XkbOpenDisplay | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lX11 $X_LIBS $LIBS"
+LIBS="-lX11 $X_LIBS
+ $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1681 "configure"
+#line 1685 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1688,7 +1692,7 @@ int main() {
 XkbOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:1692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1713,20 +1717,21 @@ EOF
 
 else
   echo "$ac_t""no" 1>&6
-echo "Fatal error! No libX11 found!"; exit 1
+{ echo "configure: error: Fatal: no libX11 or no XkbOpenDisplay() in libX11" 1>&2; exit 1; }
 fi
 
 
 echo $ac_n "checking for XpmReadFileToImage in -lXpm""... $ac_c" 1>&6
-echo "configure:1722: checking for XpmReadFileToImage in -lXpm" >&5
+echo "configure:1726: checking for XpmReadFileToImage in -lXpm" >&5
 ac_lib_var=`echo Xpm'_'XpmReadFileToImage | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lXpm $X_LIBS $LIBS"
+LIBS="-lXpm $X_LIBS
+ $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1730 "configure"
+#line 1735 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1737,7 +1742,7 @@ int main() {
 XpmReadFileToImage()
 ; return 0; }
 EOF
-if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1762,36 +1767,40 @@ EOF
 
 else
   echo "$ac_t""no" 1>&6
-echo "Fatal error! No libXpm found!"; exit 1
+{ echo "configure: error: Fatal: no libXpm found!" 1>&2; exit 1; }
 fi
 
 
-# Check whether --enable-libproplist or --disable-libproplist was given.
-if test "${enable_libproplist+set}" = set; then
-  enableval="$enable_libproplist"
-  if test $enable_libproplist = yes ; then
-	
-	echo $ac_n "checking for PLGetProplistWithPath in -lPropList""... $ac_c" 1>&6
-echo "configure:1776: checking for PLGetProplistWithPath in -lPropList" >&5
-ac_lib_var=`echo PropList'_'PLGetProplistWithPath | sed 'y%./+-%__p_%'`
+
+
+# Check whether --enable-libWUtil or --disable-libWUtil was given.
+if test "${enable_libWUtil+set}" = set; then
+  enableval="$enable_libWUtil"
+  
+    if test $enable_libWUtil = yes ; then
+
+      echo $ac_n "checking for WMReadPropListFromFile in -lWUtil""... $ac_c" 1>&6
+echo "configure:1784: checking for WMReadPropListFromFile in -lWUtil" >&5
+ac_lib_var=`echo WUtil'_'WMReadPropListFromFile | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lPropList $X_LIBS $LIBS"
+LIBS="-lWUtil $X_LIBS
+       $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1784 "configure"
+#line 1793 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char PLGetProplistWithPath();
+char WMReadPropListFromFile();
 
 int main() {
-PLGetProplistWithPath()
+WMReadPropListFromFile()
 ; return 0; }
 EOF
-if { (eval echo configure:1795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1806,35 +1815,22 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo PropList | sed -e 's/^a-zA-Z0-9_/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lPropList $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-echo "No libPropList found. You should use X resources for customizing fookb."
-fi
-
-	
-	for ac_hdr in proplist.h
+  
+                    for ac_hdr in WINGs/WUtil.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1828: checking for $ac_hdr" >&5
+echo "configure:1824: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1833 "configure"
+#line 1829 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1857,36 +1853,50 @@ EOF
  
 else
   echo "$ac_t""no" 1>&6
-echo "No proplist.h found -- cannot compile libPropList version. You should use X resources for customizing fookb."
+echo "configure: warning: No WINGs/WUtil.h found -- cannot compile version with property lists support. You should use X resources for customizing fookb; or, if you have libproplist, use older version of fookb" 1>&2
+              WUTIL_LIB=""
+            
+          
 fi
 done
 
+                  
+else
+  echo "$ac_t""no" 1>&6
 
+          echo "configure: warning: No libWUtil found or old libWUtil version. You should use X resources for setting up fookb. If you have libproplist, use older version of fookb" 1>&2
+          WUTIL_LIB=""
+        
+        
 fi
 
-
+          fi
+    WUTIL_LIB=""
+  
 else
-  echo $ac_n "checking for PLGetProplistWithPath in -lPropList""... $ac_c" 1>&6
-echo "configure:1871: checking for PLGetProplistWithPath in -lPropList" >&5
-ac_lib_var=`echo PropList'_'PLGetProplistWithPath | sed 'y%./+-%__p_%'`
+  
+    echo $ac_n "checking for WMReadPropListFromFile in -lWUtil""... $ac_c" 1>&6
+echo "configure:1880: checking for WMReadPropListFromFile in -lWUtil" >&5
+ac_lib_var=`echo WUtil'_'WMReadPropListFromFile | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lPropList $X_LIBS $LIBS"
+LIBS="-lWUtil $X_LIBS
+     $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1879 "configure"
+#line 1889 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char PLGetProplistWithPath();
+char WMReadPropListFromFile();
 
 int main() {
-PLGetProplistWithPath()
+WMReadPropListFromFile()
 ; return 0; }
 EOF
-if { (eval echo configure:1890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1901,35 +1911,22 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo PropList | sed -e 's/^a-zA-Z0-9_/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lPropList $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-echo "No libPropList found. You should use X resources for customizing fookb."
-fi
-
-
-for ac_hdr in proplist.h
+  
+                for ac_hdr in WINGs/WUtil.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1923: checking for $ac_hdr" >&5
+echo "configure:1920: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1928 "configure"
+#line 1925 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1952,19 +1949,47 @@ EOF
  
 else
   echo "$ac_t""no" 1>&6
-echo "No proplist.h found -- cannot compile libPropList version. You should use X resources for customizing fookb."
+echo "configure: warning: No WINGs/WUtil.h found -- cannot compile version with property lists support. You should use X resources for customizing fookb; or, if you have libproplist, use older version of fookb" 1>&2
+            WUTIL_LIB=""
+          
+        
 fi
 done
 
+              
+else
+  echo "$ac_t""no" 1>&6
+
+        echo "configure: warning: No libWUtil found or old libWUtil version. You should use X resources for setting up fookb. If you have libproplist, use older version of fookb" 1>&2
+        WUTIL_LIB=""
+      
+      
+fi
 
+  
 
 fi
 
+ 
+
 
-# Extract the first word of "wmaker", so it can be a program name with args.
+# Check whether --enable-wmaker or --disable-wmaker was given.
+if test "${enable_wmaker+set}" = set; then
+  enableval="$enable_wmaker"
+   
+    if test $enable_wmaker = yes ; then
+      cat >> confdefs.h <<\EOF
+#define WMAKER 1
+EOF
+
+    fi
+  
+else
+  
+    # Extract the first word of "wmaker", so it can be a program name with args.
 set dummy wmaker; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1968: checking for $ac_word" >&5
+echo "configure:1993: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_HAVE_WMAKER'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1991,25 +2016,14 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
-
-# Check whether --enable-wmaker or --disable-wmaker was given.
-if test "${enable_wmaker+set}" = set; then
-  enableval="$enable_wmaker"
-  if test $enable_wmaker = yes ; then
-	cat >> confdefs.h <<\EOF
-#define WMAKER 1
-EOF
-
-fi
-
-
-else
-  if test $HAVE_WMAKER = yes ; then
-	cat >> confdefs.h <<\EOF
+  
+    if test $HAVE_WMAKER = yes ; then
+      cat >> confdefs.h <<\EOF
 #define WMAKER 1
 EOF
 
-fi
+    fi
+  
 
 fi
 
@@ -2159,6 +2173,7 @@ s%@oldincludedir@%$oldincludedir%g
 s%@infodir@%$infodir%g
 s%@mandir@%$mandir%g
 s%@CC@%$CC%g
+s%@WUTIL_LIB@%$WUTIL_LIB%g
 s%@CPP@%$CPP%g
 s%@X_CFLAGS@%$X_CFLAGS%g
 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
diff --git a/configure.in b/configure.in
index 3aea77a..792b3da 100644
--- a/configure.in
+++ b/configure.in
@@ -1,59 +1,133 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl (c) 2001 Alexey Vyskubov <alexey at pepper.spb.ru>
+dnl
+dnl (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
+dnl
+dnl vim:ts=8:sts=2:shiftwidth=2:expandtab:foldmethod=marker
 
+dnl {{{1
 AC_INIT(fookb.c)
 
-dnl AC_CONFIG_HEADER(foofig.h)
-
 dnl Checks for programs.
 AC_PROG_CC
 
-dnl Checks for libraries.
-
-AC_PATH_XTRA
-
-AC_CHECK_LIB(X11, XkbOpenDisplay,, echo "Fatal error! No libX11 found!"; exit 1, $X_LIBS)
-
-AC_CHECK_LIB(Xpm, XpmReadFileToImage,, echo "Fatal error! No libXpm found!"; exit 1, $X_LIBS)
-
-AC_ARG_ENABLE(libproplist,
-	
-  --enable-libproplist  Try to compile libproplist-enabled version,
-
-if test $enable_libproplist = yes ; then
-	
-	AC_CHECK_LIB(PropList, PLGetProplistWithPath,,
-	echo "No libPropList found. You should use X resources for customizing fookb.", $X_LIBS)
-	
-	AC_CHECK_HEADERS(proplist.h,,
-	echo "No proplist.h found -- cannot compile libPropList version. You should use X resources for customizing fookb.")
-
-fi
+WUTIL_LIB="-lWUtil"
+AC_SUBST(WUTIL_LIB)
+dnl }}}1
 
-,
+dnl Checks for libraries. {{{1
 
-AC_CHECK_LIB(PropList, PLGetProplistWithPath,,
-echo "No libPropList found. You should use X resources for customizing fookb.", $X_LIBS)
-
-AC_CHECK_HEADERS(proplist.h,,
-echo "No proplist.h found -- cannot compile libPropList version. You should use X resources for customizing fookb.")
+dnl Basic checks: X compilation settings and essential libraries {{{2
 
+AC_PATH_XTRA
+dnl Adds C compiler flags to X_CFLAGS and X linker flags to X_CFLAGS
+dnl Extra libraries will be in X_EXTRA_LIBS
+dnl Libraries wich should be linked before -lX11 will be in X_PRE_LIBS
+dnl We do not check X_DISPLAY_MISSING because we need to check for
+dnl XkbOpenDisplay in libX11 anyway.
+
+AC_CHECK_LIB(
+  [X11],
+  [XkbOpenDisplay],
+  ,
+  [AC_MSG_ERROR([[Fatal: no libX11 or no XkbOpenDisplay() in libX11]])],
+  $X_LIBS
 )
 
-AC_CHECK_PROG(HAVE_WMAKER, wmaker, yes, no)
-
-AC_ARG_ENABLE(wmaker,
-  --enable-wmaker  Create windowmaker dockable application,
-
-if test $enable_wmaker = yes ; then
-	AC_DEFINE(WMAKER)
-fi
-
-,
+AC_CHECK_LIB(
+  [Xpm],
+  [XpmReadFileToImage],
+  ,
+  [AC_MSG_ERROR([[Fatal: no libXpm found!]])],
+  $X_LIBS
+)
 
-if test $HAVE_WMAKER = yes ; then
-	AC_DEFINE(WMAKER)
-fi
+dnl }}}2
+
+dnl --enable/disable libWUtil (property lists handling) {{{2
+
+AC_ARG_ENABLE(
+  [libWUtil],
+  [  --enable-libWUtil       try to use property lists handling in libWUtil],
+  [
+    if test $enable_libWUtil = yes ; then
+
+dnl   enabled: libWUtil and WINGs/WUtil.h check {{{3    
+      AC_CHECK_LIB(
+        [WUtil],
+        [WMReadPropListFromFile],
+        [
+          dnl library is found; let's check header file {{{4
+          AC_CHECK_HEADERS(
+            [WINGs/WUtil.h],
+            ,
+            [
+              AC_MSG_WARN([[No WINGs/WUtil.h found -- cannot compile version with property lists support. You should use X resources for customizing fookb; or, if you have libproplist, use older version of fookb]])
+              WUTIL_LIB=""
+            ]
+          )
+          dnl }}}4
+        ],
+        [
+          AC_MSG_WARN([[No libWUtil found or old libWUtil version. You should use X resources for setting up fookb. If you have libproplist, use older version of fookb]])
+          WUTIL_LIB=""
+        ]
+        ,
+        $X_LIBS
+      )
+      dnl That's EVEN BETTER than LISP!!!
+dnl }}}3
+    fi
+dnl if --disable-libWUtil is given we just do almost nothing
+    WUTIL_LIB=""
+  ],
+  [
+dnl neither --enable nor --disable-libWUtil is not given.
+dnl By default we will try to search for libWUtil {{{3
+    AC_CHECK_LIB(
+      [WUtil],
+      [WMReadPropListFromFile],
+      [
+        dnl library is found; let's check header file {{{4
+        AC_CHECK_HEADERS(
+          [WINGs/WUtil.h],
+          ,
+          [
+            AC_MSG_WARN([[No WINGs/WUtil.h found -- cannot compile version with property lists support. You should use X resources for customizing fookb; or, if you have libproplist, use older version of fookb]])
+            WUTIL_LIB=""
+          ]
+        )
+        dnl }}}4
+      ],
+      [
+        AC_MSG_WARN([[No libWUtil found or old libWUtil version. You should use X resources for setting up fookb. If you have libproplist, use older version of fookb]])
+        WUTIL_LIB=""
+      ]
+      ,
+      $X_LIBS
+    )
+dnl }}}3
+  ]
+)
+ 
+dnl }}}2
+
+dnl }}}1
+
+AC_ARG_ENABLE(
+  [wmaker],
+  [  --enable-wmaker         create windowmaker dockable application],
+  [ 
+    if test $enable_wmaker = yes ; then
+      AC_DEFINE(WMAKER)
+    fi
+  ],
+  [
+    AC_CHECK_PROG(HAVE_WMAKER, wmaker, yes, no)
+  
+    if test $HAVE_WMAKER = yes ; then
+      AC_DEFINE(WMAKER)
+    fi
+  ]
 )
 
 AC_OUTPUT(Makefile)
diff --git a/copyright b/copyright
index 0e74c0b..56730a8 100644
--- a/copyright
+++ b/copyright
@@ -1,4 +1,4 @@
-(c) 1998,99,2000,2001 Alexey Vyskubov <alexey at pepper.spb.ru>
+(c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
 
 Icons (c) 1999 LionN <xpert at mail.ru>
 
diff --git a/fookb-plainx.1x b/fookb-plainx.1x
index cc76762..9586006 100644
--- a/fookb-plainx.1x
+++ b/fookb-plainx.1x
@@ -1,15 +1,15 @@
-.\" Copyright (c) 1999, 2000, 2001 Alexey Vyskubov <alexey at pepper.spb.ru>
+.\" Copyright (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
 .\"
 .\" This is free documentation; you can redistribute it and/or
 .\" modify it under the terms of the Artistic License
 .\" This manual is distributed in the hope that it will be useful,
 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-.TH fookb 1 "17 Mar 2001" "fookb" "FOOcrosoft"
+.TH fookb 1 "10 Jan 2002" "fookb" "FOOcrosoft"
 .SH NAME
-fookb \- Xkb state indicator with optional Window Maker support
+fookb-plainx \- Xkb state indicator without Window Maker support
 .SH SYNOPSIS
-.B fookb [options]
+.B fookb-plainx [options]
 
 .SH DESCRIPTION
 \fBfookb\fP is a Xkb state indicator. It displays
@@ -40,7 +40,7 @@ NB! Command line parameters take precedence over config file or X resources!
 .TP
 .B -display
 
-.SH CONFIGURATION FILE (for libPropList-enabled version)
+.SH CONFIGURATION FILE (for libWUtil-enabled version)
 The configuration file consist of a single PropList dictionary, which
 in turn is composed of several PropList key\-value pairs. The
 recognized keys is:
@@ -73,7 +73,7 @@ set to "Yes".
 
 .SH X resources
 .TP
-NB! Parameters in PropList config file take precednece over X resources!
+NB! Parameters in PropList config file take precedence over X resources!
 .TP
 .B fookb.icon1 Filename
 .TP
@@ -129,17 +129,13 @@ Sometimes \fBfookb\fP receives message about changing XKB group, but
 message.state.group does not point to any existing XKB group. In this
 case \fBfookb\fP will show IconBoom (from config file) picture.
 .P
-As far as I know the only way to look at this bug is run vmware.
+As far as I know the only way to look at this bug is to run vmware.
 
 .SH VERSION
-This man page is up-to-date for version 2.13 of \fBfookb\fP.
+This man page is [hopefully] up-to-date for version 3.0 of \fBfookb\fP.
 
 .SH AUTHORS
 .P
-\fBfookb\fP is (c) 1998, 99, 2000, 20001 Alexey Vyskubov <alexey at pepper.spb.ru>.
+\fBfookb\fP is (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>.
 .P
-This manpage was written by Alexey Vyskubov <alexey at pepper.spb.ru>.
-
-
-
-
+This manpage was written by Alexey Vyskubov <alexey at mawhrin.net>.
diff --git a/fookb-wmaker.1x b/fookb-wmaker.1x
index cc76762..691fa40 100644
--- a/fookb-wmaker.1x
+++ b/fookb-wmaker.1x
@@ -1,15 +1,15 @@
-.\" Copyright (c) 1999, 2000, 2001 Alexey Vyskubov <alexey at pepper.spb.ru>
+.\" Copyright (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
 .\"
 .\" This is free documentation; you can redistribute it and/or
 .\" modify it under the terms of the Artistic License
 .\" This manual is distributed in the hope that it will be useful,
 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-.TH fookb 1 "17 Mar 2001" "fookb" "FOOcrosoft"
+.TH fookb 1 "10 Jan 2002" "fookb" "FOOcrosoft"
 .SH NAME
-fookb \- Xkb state indicator with optional Window Maker support
+fookb-wmaker \- Xkb state indicator with Window Maker support
 .SH SYNOPSIS
-.B fookb [options]
+.B fookb-wmaker [options]
 
 .SH DESCRIPTION
 \fBfookb\fP is a Xkb state indicator. It displays
@@ -40,7 +40,7 @@ NB! Command line parameters take precedence over config file or X resources!
 .TP
 .B -display
 
-.SH CONFIGURATION FILE (for libPropList-enabled version)
+.SH CONFIGURATION FILE (for libWUtil-enabled version)
 The configuration file consist of a single PropList dictionary, which
 in turn is composed of several PropList key\-value pairs. The
 recognized keys is:
@@ -73,7 +73,7 @@ set to "Yes".
 
 .SH X resources
 .TP
-NB! Parameters in PropList config file take precednece over X resources!
+NB! Parameters in PropList config file take precedence over X resources!
 .TP
 .B fookb.icon1 Filename
 .TP
@@ -129,17 +129,13 @@ Sometimes \fBfookb\fP receives message about changing XKB group, but
 message.state.group does not point to any existing XKB group. In this
 case \fBfookb\fP will show IconBoom (from config file) picture.
 .P
-As far as I know the only way to look at this bug is run vmware.
+As far as I know the only way to look at this bug is to run vmware.
 
 .SH VERSION
-This man page is up-to-date for version 2.13 of \fBfookb\fP.
+This man page is [hopefully] up-to-date for version 3.0 of \fBfookb\fP.
 
 .SH AUTHORS
 .P
-\fBfookb\fP is (c) 1998, 99, 2000, 20001 Alexey Vyskubov <alexey at pepper.spb.ru>.
+\fBfookb\fP is (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>.
 .P
-This manpage was written by Alexey Vyskubov <alexey at pepper.spb.ru>.
-
-
-
-
+This manpage was written by Alexey Vyskubov <alexey at mawhrin.net>.
diff --git a/fookb.1x b/fookb.1x
index cc76762..9349f5c 100644
--- a/fookb.1x
+++ b/fookb.1x
@@ -1,11 +1,11 @@
-.\" Copyright (c) 1999, 2000, 2001 Alexey Vyskubov <alexey at pepper.spb.ru>
+.\" Copyright (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
 .\"
 .\" This is free documentation; you can redistribute it and/or
 .\" modify it under the terms of the Artistic License
 .\" This manual is distributed in the hope that it will be useful,
 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-.TH fookb 1 "17 Mar 2001" "fookb" "FOOcrosoft"
+.TH fookb 1 "10 Jan 2002" "fookb" "FOOcrosoft"
 .SH NAME
 fookb \- Xkb state indicator with optional Window Maker support
 .SH SYNOPSIS
@@ -40,7 +40,7 @@ NB! Command line parameters take precedence over config file or X resources!
 .TP
 .B -display
 
-.SH CONFIGURATION FILE (for libPropList-enabled version)
+.SH CONFIGURATION FILE (for libWUtil-enabled version)
 The configuration file consist of a single PropList dictionary, which
 in turn is composed of several PropList key\-value pairs. The
 recognized keys is:
@@ -73,7 +73,7 @@ set to "Yes".
 
 .SH X resources
 .TP
-NB! Parameters in PropList config file take precednece over X resources!
+NB! Parameters in PropList config file take precedence over X resources!
 .TP
 .B fookb.icon1 Filename
 .TP
@@ -129,17 +129,13 @@ Sometimes \fBfookb\fP receives message about changing XKB group, but
 message.state.group does not point to any existing XKB group. In this
 case \fBfookb\fP will show IconBoom (from config file) picture.
 .P
-As far as I know the only way to look at this bug is run vmware.
+As far as I know the only way to look at this bug is to run vmware.
 
 .SH VERSION
-This man page is up-to-date for version 2.13 of \fBfookb\fP.
+This man page is [hopefully] up-to-date for version 3.0 of \fBfookb\fP.
 
 .SH AUTHORS
 .P
-\fBfookb\fP is (c) 1998, 99, 2000, 20001 Alexey Vyskubov <alexey at pepper.spb.ru>.
+\fBfookb\fP is (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>.
 .P
-This manpage was written by Alexey Vyskubov <alexey at pepper.spb.ru>.
-
-
-
-
+This manpage was written by Alexey Vyskubov <alexey at mawhrin.net>.
diff --git a/fookb.c b/fookb.c
index 0ab92c6..b8db0c2 100644
--- a/fookb.c
+++ b/fookb.c
@@ -1,7 +1,7 @@
 /*
  * fookb.c
  *
- * (c) 1998, 1999, 2000, 2001 Alexey Vyskubov <alexey at pepper.spb.ru>
+ * (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
  */
 
 #include <stdlib.h>		/* malloc() */
@@ -23,7 +23,8 @@
 #include "sound.h"
 #include "opts.h"
 
-#define sterror(x) (void)printf("Strange error, please report! %s:%d, %s\n", __FILE__, __LINE__, x)
+#define sterror(x) (void)printf("Strange error, please report! %s:%d, %s\n",\
+		__FILE__, __LINE__, x)
 
 static void getGC(win, gc)
 Window win;
@@ -107,8 +108,11 @@ register char *argv[];
 
 /* We would like receive the only Xkb event: XkbStateNotify. And only
  * when XkbLockGroup happens. */
-	if (False == XkbSelectEventDetails(dpy, XkbUseCoreKbd, XkbStateNotify, 0xFFF,
-			      XkbGroupLockMask)) {
+	if (False == XkbSelectEventDetails(dpy,
+				XkbUseCoreKbd,
+				XkbStateNotify,
+				0xFFF,
+				XkbGroupLockMask)) {
 		sterror("Cannot XkbSelectEventDetails. It's your problems -- not mine.");
 		exit(EXIT_FAILURE);
 	}
@@ -180,7 +184,8 @@ register char *argv[];
 			exit(EXIT_FAILURE);
 	}
 
-#ifdef WMAKER			/* Look at the comment for XSizeHints * BigBunny */
+#ifdef WMAKER
+	/* Look at the comment for XSizeHints * BigBunny */
 	BigBunny = XAllocSizeHints();
 	if (NULL == BigBunny) {
 		(void)printf("Not enough memory, %s:%d.\n", __FILE__, __LINE__);
diff --git a/fookb.h b/fookb.h
index e459b2b..b696eae 100644
--- a/fookb.h
+++ b/fookb.h
@@ -1,14 +1,15 @@
 /*
  * fookb.h
  * 
- * (c) 1998, 1999, 2000, 2001 Alexey Vyskubov <alexey at pepper.spb.ru>
+ * (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
  *
  */
 
 #ifndef FOOKB_H
 #define FOOKB_H
 
-//void getGC(Window, GC *);
+/* void getGC(Window, GC *); */
+
 void update_window(Window, GC, unsigned int);
 
 extern Display *dpy;		/* X display */
diff --git a/globals.c b/globals.c
index 9f78aae..ceb12f6 100644
--- a/globals.c
+++ b/globals.c
@@ -1,9 +1,8 @@
 /*
  * File: globals.c
  *
- * (c) 1999, 2000, 2001 Alexey Vyskubov <alexey at pepper.spb.ru>
+ * (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
  *
- * Created: Sun Sep 26 13:54:08 1999
  */
 
 #include <X11/Xlib.h>
diff --git a/images.c b/images.c
index df501e6..6dfb6f3 100644
--- a/images.c
+++ b/images.c
@@ -1,7 +1,7 @@
 /*
  * images.c
  *
- * (c) 1998, 1999, 2000, 2001 Alexey Vyskubov <alexey at pepper.spb.ru>
+ * (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
  */
 
 #include <stdio.h>		/* puts() */
diff --git a/images.h b/images.h
index 018064e..6ec3469 100644
--- a/images.h
+++ b/images.h
@@ -1,7 +1,7 @@
 /*
  * images.h
  * 
- * (c) 1998, 1999, 2000, 2001 Alexey Vyskubov <alexey at pepper.spb.ru>
+ * (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
  */
 
 #ifndef IMAGES_H
diff --git a/opts.c b/opts.c
index 9cd33a6..ae50656 100644
--- a/opts.c
+++ b/opts.c
@@ -1,17 +1,11 @@
 /*
  * File: opts.c
  *
- * Created: Sun Sep 26 00:10:42 1999
+ * (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
  */
 
 #include <stdio.h>
 
-#ifdef HAVE_LIBPROPLIST
-#ifdef HAVE_PROPLIST_H
-#define PROPLIST
-#endif
-#endif
-
 #include <string.h>
 
 #include <X11/Xlib.h>		/* X Window standard header */
@@ -58,7 +52,7 @@ register char *argv[];
 #endif
 
 	if (1 != *argc) {
-		puts("Fookb v 2.13");
+		puts("Fookb v 3.0");
 		puts("\tUsage: fookb [options]");
 		puts("Possible options:");
 		puts("-icon1 xpm_file\t\tIcon to show for the 1st Xkb group");
@@ -68,7 +62,7 @@ register char *argv[];
 		puts("-iconboom xpm_file\tIcon to show when Xkb system goes crazy");
 		puts("-display X_display\tX display to use (normally not needed)");
 		puts("");
-#ifdef PROPLIST
+#ifdef HAVE_WINGS_WUTIL_H
 		puts("Command line parameters takes precedence over X resources or configuration file!");
 		printf("Configuration file location: ");
 #ifdef WMAKER
diff --git a/opts.h b/opts.h
index 9ba2082..29f135c 100644
--- a/opts.h
+++ b/opts.h
@@ -1,9 +1,8 @@
 /*
  * File: opts.h
  *
- * (c) 1999, 2000, 2001 Alexey Vyskubov <alexey at pepper.spb.ru>
+ * (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
  *
- * Created: Sun Sep 26 00:10:23 1999
  */
 
 #ifndef OPTS_H
diff --git a/params.c b/params.c
index e45b644..8f62c46 100644
--- a/params.c
+++ b/params.c
@@ -2,89 +2,141 @@
 #include <string.h>		/* strlen & strcat */
 #include <ctype.h>		/* toupper */
 #include <stdlib.h>
-#ifdef HAVE_LIBPROPLIST
-#ifdef HAVE_PROPLIST_H
-#define PROPLIST
-#endif
-#endif
 #include "params.h"
 #include "opts.h"
 
+/* Let's make lint happy */
+#define lputs(x) (void)puts(x)
+
 char *read_param(string)
 char *string;
 {
-
 	XrmValue xvalue;
 
-#ifdef HAVE_LIBPROPLIST
-#ifdef HAVE_PROPLIST_H
-#define PROPLIST
-#endif
-#endif
-
-#ifdef PROPLIST
-	proplist_t pl, value;
+#ifdef HAVE_WINGS_WUTIL_H
+	WMPropList *pl;
+	WMPropList *value;
+	WMPropList *tmp;
+	char *path;
 #endif
 
 	char *newstring;
 	char *newString;
 	char *result;
 	char *str_type[20];
-
-	newstring = (char *) malloc(7 + strlen(string));	/* 7 is
-								   strlen("fookb.") + 1 */
-	newString = (char *) malloc(7 + strlen(string));	/* The same */
+	
+	/* Let's make lint happy */
+	xvalue.size = 0;
+
+	newstring = (char *) malloc(7 + strlen(string));
+	newString = (char *) malloc(7 + strlen(string));
+	/* 7 is strlen("fookb.") + 1 */
+	
+	if ((NULL == newstring) || (NULL == newString)) {
+		lputs("Not enough memory");
+		exit(EXIT_FAILURE);
+	}
 
 	strcpy(newstring, "fookb.");
 	strcpy(newString, "Fookb.");
 
 	strcat(newstring, string);
 	strcat(newString, string);
-	newstring[6] = tolower(newstring[6]);
-	newString[6] = toupper(newString[6]);
+	newstring[6] = tolower((unsigned char)newstring[6]);
+	newString[6] = toupper((unsigned char)newString[6]);
 
 /* Command line parameters take precedence over all */
 
-	if (XrmGetResource(cmdlineDB, newstring, newString, str_type,
-			   &xvalue) == True) {
-		result = (char *) malloc((int) xvalue.size + 1);
-		strncpy(result, xvalue.addr, (int) xvalue.size);
+	if (XrmGetResource(cmdlineDB,
+				newstring,
+				newString,
+				str_type,
+				&xvalue) == True) {
+		result = (char *) malloc(xvalue.size + 1);
+		if (NULL == result) {
+			lputs("Not enough memory");
+			exit(EXIT_FAILURE);
+		}
+		strncpy(result, xvalue.addr, (size_t)xvalue.size);
 		result[(int) xvalue.size + 1] = '\0';
+		free(newstring);
+		free(newString);
 		return result;
 	}
-#ifdef PROPLIST
 
-	pl = PLGetProplistWithPath(DEFAULTS_FILE);
+#ifdef HAVE_WINGS_WUTIL_H
+
+	free(newstring);
+	free(newString);
+
+	/*
+	 * Here we start the game with property lists.
+	 * pl will be property list, read from DEFAULTS_FILE.
+	 * tmp will be temporary key for this property list,
+	 * constructed using ``string'', supplied to function.
+	 * value will be property list, which contain the value
+	 * of parameter
+	 */
+
+	path = wexpandpath(DEFAULTS_FILE);
+	pl = WMReadPropListFromFile(path);
+	wfree(path);
 
 	if (!pl) {
-		puts("Cannot open config file: ");
-		puts(DEFAULTS_FILE);
-		exit(20);
+		lputs("Cannot open config file: ");
+		lputs(DEFAULTS_FILE);
+		exit(EXIT_FAILURE);
 	}
 
-	value = PLGetDictionaryEntry(pl, PLMakeString(string));
+	tmp = WMCreatePLString(string);
+	value = WMGetFromPLDictionary(pl, tmp);
+	WMReleasePropList(tmp);
+
+	/*
+	 * pl and value objects will exist as long as fookb is running
+	 */
 
 	if (!value) {
-		puts("Cannot find in config file value for: ");
-		puts(string);
-		exit(21);
+		lputs("Cannot find in config file value for: ");
+		lputs(string);
+		exit(EXIT_FAILURE);
+	}
+
+	if (!WMIsPLString(value)) {
+		lputs("Value for: ");
+		lputs(string);
+		lputs("in config file is not a string.");
+		exit(EXIT_FAILURE);
+	}
+
+	result = WMGetFromPLString(value);
+
+	if (!result) {
+		lputs("Something wrong with libWUtils :(");
+		lputs("Please report this error to fookb author.");
+		exit(EXIT_FAILURE);
 	}
 
-	result = (char *) malloc(strlen(PLGetString(value)) + 1);
-	strcpy(result, PLGetString(value));
 	return result;
 
-#else				/* PROPLIST */
+#else				/* HAVE_WINGS_WUTIL_H */
 
 	if (XrmGetResource(finalDB, newstring, newString, str_type,
 			   &xvalue) == True) {
-		result = (char *) malloc((int) xvalue.size + 1);
-		strncpy(result, xvalue.addr, (int) xvalue.size);
+		result = (char *) malloc(xvalue.size + 1);
+		if (NULL == result) {
+			lputs("Not enough memory");
+			exit(EXIT_FAILURE);
+		}
+		strncpy(result, xvalue.addr, (size_t)xvalue.size);
 		result[(int) xvalue.size + 1] = '\0';
+		free(newstring);
+		free(newString);
 		return result;
 	} else {
-		printf("Fatal error: cannot find configuration parameter %s\n", newstring);
-		exit(25);
+		(void)printf("Fatal error: cannot find configuration parameter %s\n",
+				newstring);
+		exit(EXIT_FAILURE);
 	}
 
 #endif
diff --git a/params.h b/params.h
index 95b9423..37309e8 100644
--- a/params.h
+++ b/params.h
@@ -1,15 +1,15 @@
 /*
  * params.h
  *
- * (c) 1999, 2000, 2001 Alexey Vyskubov <alexey at pepper.spb.ru>
+ * (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
  *
  */
 
 #ifndef PARAMS_H
 #define PARAMS_H
 
-#ifdef PROPLIST
-#include <proplist.h>
+#ifdef HAVE_WINGS_WUTIL_H 
+#include <WINGs/WUtil.h> 
 
 #ifdef WMAKER
 #define DEFAULTS_FILE "~/GNUstep/Defaults/FOOkb"
@@ -17,7 +17,7 @@
 #define DEFAULTS_FILE "~/.fookb"
 #endif				/* WMAKER */
 
-#endif				/* PROPLIST */
+#endif				/* HAVE_WINGS_WUTIL_H */
 
 #include <X11/Xlib.h>		/* X Window standard header */
 #include <X11/Xresource.h>	/* X resource manager stuff */
diff --git a/sound.c b/sound.c
index 7280aff..b794746 100644
--- a/sound.c
+++ b/sound.c
@@ -1,7 +1,7 @@
 /*
  * File: sound.c
  *
- * Created: Sun Sep 19 16:53:19 1999
+ * (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
  */
 
 #include <unistd.h>		/* fork() */
diff --git a/sound.h b/sound.h
index a91aa23..3e86dab 100644
--- a/sound.h
+++ b/sound.h
@@ -1,9 +1,8 @@
 /*
  * File: sound.h
  *
- * (c) 1999, 2000, 2001 Alexey Vyskubov <alexey at pepper.spb.ru>
+ * (c) 1998-2002 Alexey Vyskubov <alexey at mawhrin.net>
  *
- * Created: Sun Sep 19 16:52:45 1999
  */
 
 #ifndef SOUND_H

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/fookb.git



More information about the Pkg-wmaker-commits mailing list