# HG changeset patch # User cvs # Date 1186997453 -7200 # Node ID 9d177e8d41508aa871154a7390b1d15cbe3518c3 # Parent 892ca416f0fbd460f05c38c9e10c33078a623c79 Import from CVS: tag r21-2-25 diff -r 892ca416f0fb -r 9d177e8d4150 CHANGES-beta --- a/CHANGES-beta Mon Aug 13 11:30:00 2007 +0200 +++ b/CHANGES-beta Mon Aug 13 11:30:53 2007 +0200 @@ -1,5 +1,25 @@ - -*- indented-text -*- +to 21.2.25 "Hephaestus" +-- the LATEST.IS.* file has been renamed to LATEST-IS-*. +-- the CVS tag to checkout the latest tarball is `r21-2-latest-beta'. +-- 3 crashes in mapcar1 have been fixed. +-- lwlib arg passing cleanup +-- yet more widget and tab fixes +-- yet another Tab sync +-- specifier copying fix for widgets +-- preparation for proper layouts +-- native widgets used for some custom widgets +-- (+ 1) is no longer incorrectly compiled +-- char-before no longer has performance penalty +-- xpm again works on Windows +-- native Windows fixes from Adrian Aichner +-- Mule fixes from Yoshiki Hayashi +-- properly detect Athena widgets headers and libs, preventing crashes + from misdetection and from libraries and headers that don't match, + from Daniel Pittman + to 21.2.24 "Hecate" +-- Tabs fixes from Andy Piper +-- Widget leak fixes from Andy Piper -- (coding-system-list) deals properly with coding system aliases, Shenghuo ZHU -- configure support for ESD sound rewritte, Martin Buchholz -- directory separator fix from Mike Alexander diff -r 892ca416f0fb -r 9d177e8d4150 ChangeLog --- a/ChangeLog Mon Aug 13 11:30:00 2007 +0200 +++ b/ChangeLog Mon Aug 13 11:30:53 2007 +0200 @@ -1,3 +1,16 @@ +1999-12-24 Martin Buchholz + + * XEmacs 21.2.25 is released. + +1999-12-17 Yoshiki Hayashi + + * README: Remove msdos part. + +1999-12-17 Martin Buchholz + + * configure.in: Oops. xpm doesn't actually depend on X11. + I got confused by the name (like others get confused by `xemacs'?) + 1999-12-14 Martin Buchholz * XEmacs 21.2.24 is released. @@ -147,7 +160,7 @@ * Makefile.in.in: use WINDOWSNT for mingw install. -1999-08-01 Adrian Aichner +1999-08-01 Adrian Aichner * etc/DISTRIB: Update IP address of ftp.xemacs.org. * etc/NEWS: Fix typo @@ -683,7 +696,7 @@ * etc/check_cygwin_setup.sh: fix a couple of buglets. -1998-08-23 Adrian Aichner +1998-08-23 Adrian Aichner * etc/sample.emacs: Enable sound support on mswindows devices. @@ -694,7 +707,7 @@ conditions for both PNG and XPM, stop screaming if png is not found and no window-system is selected, and fixed a bug in the XPM checking. -1998-08-06 Adrian Aichner +1998-08-06 Adrian Aichner * etc/TUTORIAL.de: Fixing typos and grammatical errors. Fixing inconsistent usage of RET, , and (only using @@ -1512,7 +1525,7 @@ * etc/aliases.ksh: Add `mak' function to create beta.err for build-report. - From Adrian Aichner + From Adrian Aichner Suggested by Karl M. Hegbloom 1998-01-27 SL Baur @@ -1926,13 +1939,13 @@ * lwlib/lwlib-Xm.c(update_one_menu_entry): Add missing variable. From Skip Montanaro -1997-11-04 Adrian Aichner +1997-11-04 Adrian Aichner * etc/TUTORIAL.de: Updated copyright information. Translated most of the COPYING section. Translated the <<.*>> didactic line. -1997-10-22 Adrian Aichner +1997-10-22 Adrian Aichner * etc/TUTORIAL.de: Fixed two issues reported by Achim Oppelt @@ -1945,12 +1958,12 @@ Applied patches supplied by Marc Aurel <4-tea-2@bong.saar.de>. They fix yet more typos and quite a few awkward sentences. -1997-10-21 Adrian Aichner +1997-10-21 Adrian Aichner * etc/TUTORIAL.de: Manually merged a few more corrections by Carsten Leonhardt -1997-10-20 Adrian Aichner +1997-10-20 Adrian Aichner * etc/TUTORIAL.de: Applied patches from Andreas Jaeger to 1.2, diff -r 892ca416f0fb -r 9d177e8d4150 README --- a/README Mon Aug 13 11:30:00 2007 +0200 +++ b/README Mon Aug 13 11:30:53 2007 +0200 @@ -59,8 +59,5 @@ `info' holds the Info documentation tree for XEmacs. `man' holds the source code for the XEmacs info documentation tree. -`msdos' holds configuration files for compiling XEmacs under MSDOG. - See the file etc/MSDOS for more information. - `nt' holds configuration files for compiling XEmacs under Microsoft Windows NT. The support for NT is very tentative right now. diff -r 892ca416f0fb -r 9d177e8d4150 configure --- a/configure Mon Aug 13 11:30:00 2007 +0200 +++ b/configure Mon Aug 13 11:30:53 2007 +0200 @@ -482,6 +482,21 @@ done ;; + "with_athena" ) + case "$val" in + xa | xaw ) val=xaw ;; + 3 | 3d | xaw3d ) val=3d ;; + ne | nex | next | naxtaw) val=next ;; + 9 | 95 | xaw95 ) val=95 ;; + xp | xpm | xawxpm ) val=xpm ;; + * ) (echo "$progname: Usage error:" +echo " " "The \`--$optname' option must have one of these values: + \`xaw', \`3d', \`next', \`95', or \`xpm'." +echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; + esac + eval "$opt=\"$val\"" + ;; + "with_xim" ) case "$val" in y | ye | yes ) val=yes ;; @@ -710,12 +725,11 @@ case "$val" in l | lu | luc | luci | lucid ) val=lucid ;; m | mo | mot | moti | motif ) val=motif ;; - athena3d | athena-3d ) val=athena3d ;; a | at | ath | athe | athen | athena ) val=athena ;; n | no | non | none ) val=no ;; * ) (echo "$progname: Usage error:" echo " " "The \`--$optname' option must have one of these values: - \`lucid', \`motif', \`athena', \`athena3d', or \`no'." + \`lucid', \`motif', \`athena', or \`no'." echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; esac eval "$opt=\"$val\"" @@ -816,7 +830,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:820: checking whether ln -s works" >&5 +echo "configure:834: checking whether ln -s works" >&5 rm -f conftestdata if ln -s X conftestdata 2>/dev/null @@ -1061,7 +1075,7 @@ echo $ac_n "checking "host system type"""... $ac_c" 1>&6 -echo "configure:1065: checking "host system type"" >&5 +echo "configure:1079: checking "host system type"" >&5 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"` configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` @@ -1555,7 +1569,7 @@ # 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:1559: checking for $ac_word" >&5 +echo "configure:1573: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1582,7 +1596,7 @@ # 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:1586: checking for $ac_word" >&5 +echo "configure:1600: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1630,7 +1644,7 @@ # 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:1634: checking for $ac_word" >&5 +echo "configure:1648: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1659,7 +1673,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1663: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1677: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -1672,12 +1686,12 @@ cat > conftest.$ac_ext << EOF -#line 1676 "configure" +#line 1690 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1695: \"$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 @@ -1705,19 +1719,19 @@ { 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:1709: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1723: 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:1714: checking whether we are using GNU C" >&5 +echo "configure:1728: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1735: \"$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 @@ -1735,7 +1749,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1739: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1753: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1768,7 +1782,7 @@ # 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:1772: checking for $ac_word" >&5 +echo "configure:1786: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1795,7 +1809,7 @@ # 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:1799: checking for $ac_word" >&5 +echo "configure:1813: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1843,7 +1857,7 @@ # 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:1847: checking for $ac_word" >&5 +echo "configure:1861: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1872,7 +1886,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1876: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1890: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -1885,12 +1899,12 @@ cat > conftest.$ac_ext << EOF -#line 1889 "configure" +#line 1903 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1908: \"$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 @@ -1918,19 +1932,19 @@ { 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:1922: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1936: 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:1927: checking whether we are using GNU C" >&5 +echo "configure:1941: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1948: \"$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 @@ -1948,7 +1962,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1952: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1966: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1981,7 +1995,7 @@ # 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:1985: checking for $ac_word" >&5 +echo "configure:1999: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2008,7 +2022,7 @@ # 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:2012: checking for $ac_word" >&5 +echo "configure:2026: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2056,7 +2070,7 @@ # 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:2060: checking for $ac_word" >&5 +echo "configure:2074: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2085,7 +2099,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2089: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2103: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -2098,12 +2112,12 @@ cat > conftest.$ac_ext << EOF -#line 2102 "configure" +#line 2116 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2121: \"$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 @@ -2131,19 +2145,19 @@ { 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:2135: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2149: 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:2140: checking whether we are using GNU C" >&5 +echo "configure:2154: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2161: \"$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 @@ -2161,7 +2175,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2165: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2179: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -2198,7 +2212,7 @@ test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2202: checking how to run the C preprocessor" >&5 +echo "configure:2216: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2211,13 +2225,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2235: \"$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 : @@ -2228,13 +2242,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2252: \"$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 : @@ -2245,13 +2259,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2269: \"$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 : @@ -2276,9 +2290,9 @@ echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:2280: checking for AIX" >&5 -cat > conftest.$ac_ext <&5 +cat > conftest.$ac_ext <&6 -echo "configure:2309: checking for GNU libc" >&5 -cat > conftest.$ac_ext <&5 +cat > conftest.$ac_ext < int main() { @@ -2319,7 +2333,7 @@ ; return 0; } EOF -if { (eval echo configure:2323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* have_glibc=yes else @@ -2341,7 +2355,7 @@ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:2371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -2627,7 +2641,7 @@ fi echo $ac_n "checking for dynodump""... $ac_c" 1>&6 -echo "configure:2631: checking for dynodump" >&5 +echo "configure:2645: checking for dynodump" >&5 if test "$unexec" != "unexsol2.o"; then echo "$ac_t""no" 1>&6 else @@ -2665,12 +2679,12 @@ done echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6 -echo "configure:2669: checking for terminateAndUnload in -lC" >&5 +echo "configure:2683: checking for terminateAndUnload in -lC" >&5 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'` xe_check_libs=" -lC " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2699: \"$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 @@ -2785,7 +2799,7 @@ if test "$add_runtime_path" = "yes"; then echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 -echo "configure:2789: checking "for runtime libraries flag"" >&5 +echo "configure:2803: checking "for runtime libraries flag"" >&5 case "$opsys" in sol2 ) dash_r="-R" ;; decosf* | linux* | irix*) dash_r="-rpath " ;; @@ -2807,14 +2821,14 @@ done fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +#line 2825 "configure" +#include "confdefs.h" + +int main() { + +; return 0; } +EOF +if { (eval echo configure:2832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* dash_r="$try_dash_r" else @@ -2916,10 +2930,10 @@ fi after_morecore_hook_exists=yes echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6 -echo "configure:2920: checking for malloc_get_state" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_malloc_get_state=yes" else @@ -2962,10 +2976,10 @@ fi echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 -echo "configure:2966: checking for malloc_set_state" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_malloc_set_state=yes" else @@ -3008,16 +3022,16 @@ fi echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 -echo "configure:3012: checking whether __after_morecore_hook exists" >&5 -cat > conftest.$ac_ext <&5 +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -3076,7 +3090,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3080: checking for $ac_word" >&5 +echo "configure:3094: checking for $ac_word" >&5 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -3131,7 +3145,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:3135: checking for a BSD compatible install" >&5 +echo "configure:3149: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -3185,7 +3199,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3189: checking for $ac_word" >&5 +echo "configure:3203: checking for $ac_word" >&5 if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. @@ -3217,15 +3231,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3221: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3243: \"$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* @@ -3258,15 +3272,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3262: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3284: \"$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* @@ -3299,15 +3313,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3303: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3325: \"$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* @@ -3337,10 +3351,10 @@ done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3341: checking for sys/wait.h that is POSIX.1 compatible" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < #include @@ -3356,7 +3370,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3380,10 +3394,10 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3384: checking for ANSI C header files" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < #include @@ -3391,7 +3405,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3409: \"$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* @@ -3408,7 +3422,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3426,7 +3440,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3444,7 +3458,7 @@ if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3455,7 +3469,7 @@ exit (0); } EOF -if { (eval echo configure:3459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -3481,10 +3495,10 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3485: checking whether time.h and sys/time.h may both be included" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < #include @@ -3493,7 +3507,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3517,10 +3531,10 @@ fi echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:3521: checking for sys_siglist declaration in signal.h or unistd.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < #include @@ -3532,7 +3546,7 @@ char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:3536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -3557,9 +3571,9 @@ echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6 -echo "configure:3561: checking for struct utimbuf" >&5 -cat > conftest.$ac_ext <&5 +cat > conftest.$ac_ext < @@ -3578,7 +3592,7 @@ static struct utimbuf x; x.actime = x.modtime; ; return 0; } EOF -if { (eval echo configure:3582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -3598,10 +3612,10 @@ rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3602: checking return type of signal handlers" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < #include @@ -3618,7 +3632,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:3622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3640,10 +3654,10 @@ echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3644: checking for size_t" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3674,10 +3688,10 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3678: checking for pid_t" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3708,10 +3722,10 @@ fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3712: checking for uid_t in sys/types.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF @@ -3747,10 +3761,10 @@ fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3751: checking for mode_t" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3781,10 +3795,10 @@ fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3785: checking for off_t" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3815,10 +3829,10 @@ fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3819: checking for ssize_t" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3850,9 +3864,9 @@ echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:3854: checking for struct timeval" >&5 -cat > conftest.$ac_ext <&5 +cat > conftest.$ac_ext < @@ -3868,7 +3882,7 @@ static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } EOF -if { (eval echo configure:3872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 HAVE_TIMEVAL=yes @@ -3890,10 +3904,10 @@ rm -f conftest* echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3894: checking whether struct tm is in sys/time.h or time.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < #include @@ -3901,7 +3915,7 @@ struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3925,10 +3939,10 @@ fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3929: checking for tm_zone in struct tm" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -3936,7 +3950,7 @@ struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:3940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -3959,10 +3973,10 @@ else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3963: checking for tzname" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -3972,7 +3986,7 @@ atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:3976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -3998,10 +4012,10 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4002: checking for working const" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4075,7 +4089,7 @@ echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:4079: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:4093: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` cat > conftestmake <<\EOF @@ -4100,12 +4114,12 @@ echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4104: checking whether byte ordering is bigendian" >&5 +echo "configure:4118: checking whether byte ordering is bigendian" >&5 ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -4116,11 +4130,11 @@ #endif ; return 0; } EOF -if { (eval echo configure:4120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -4131,7 +4145,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:4135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4148,7 +4162,7 @@ rm -f conftest* if test $ac_cv_c_bigendian = unknown; then cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_bigendian=no else @@ -4188,10 +4202,10 @@ echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:4192: checking size of short" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < main() @@ -4202,7 +4216,7 @@ exit(0); } EOF -if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_short=`cat conftestval` else @@ -4230,10 +4244,10 @@ exit 1 fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:4234: checking size of int" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < main() @@ -4244,7 +4258,7 @@ exit(0); } EOF -if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_int=`cat conftestval` else @@ -4266,10 +4280,10 @@ echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:4270: checking size of long" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < main() @@ -4280,7 +4294,7 @@ exit(0); } EOF -if { (eval echo configure:4284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long=`cat conftestval` else @@ -4302,10 +4316,10 @@ echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:4306: checking size of long long" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < main() @@ -4316,7 +4330,7 @@ exit(0); } EOF -if { (eval echo configure:4320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long_long=`cat conftestval` else @@ -4338,10 +4352,10 @@ echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:4342: checking size of void *" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < main() @@ -4352,7 +4366,7 @@ exit(0); } EOF -if { (eval echo configure:4356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_void_p=`cat conftestval` else @@ -4375,7 +4389,7 @@ echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:4379: checking for long file names" >&5 +echo "configure:4393: checking for long file names" >&5 ac_cv_sys_long_file_names=yes # Test for long file names in all the places we know might matter: @@ -4421,10 +4435,10 @@ echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4425: checking for sin" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -4465,12 +4479,12 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:4469: checking for sin in -lm" >&5 +echo "configure:4483: checking for sin in -lm" >&5 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` xe_check_libs=" -lm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4499: \"$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 @@ -4525,14 +4539,14 @@ cat > conftest.$ac_ext < int main() { return atanh(1.0) + asinh(1.0) + acosh(1.0); ; return 0; } EOF -if { (eval echo configure:4536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_INVERSE_HYPERBOLIC @@ -4549,7 +4563,7 @@ rm -f conftest* echo "checking type of mail spool file locking" 1>&6 -echo "configure:4553: checking type of mail spool file locking" >&5 +echo "configure:4567: checking type of mail spool file locking" >&5 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf if test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF @@ -4574,12 +4588,12 @@ case "$opsys" in decosf*) echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 -echo "configure:4578: checking for cma_open in -lpthreads" >&5 +echo "configure:4592: checking for cma_open in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lpthreads " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4608: \"$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 @@ -4626,7 +4640,7 @@ esac echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 -echo "configure:4630: checking whether the -xildoff compiler flag is required" >&5 +echo "configure:4644: checking whether the -xildoff compiler flag is required" >&5 if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then echo "$ac_t""no" 1>&6; @@ -4637,7 +4651,7 @@ if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6 -echo "configure:4641: checking for \"-z ignore\" linker flag" >&5 +echo "configure:4655: checking for \"-z ignore\" linker flag" >&5 case "`ld -h 2>&1`" in *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6 ld_switch_site="-z ignore $ld_switch_site" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-z ignore\" to \$ld_switch_site"; fi ;; @@ -4647,7 +4661,7 @@ echo "checking "for specified window system"" 1>&6 -echo "configure:4651: checking "for specified window system"" >&5 +echo "configure:4665: checking "for specified window system"" >&5 if test "$with_x11" != "no"; then test "$x_includes $x_libraries" != "NONE NONE" && \ @@ -4680,7 +4694,7 @@ # 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:4684: checking for X" >&5 +echo "configure:4698: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4740,12 +4754,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4763: \"$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* @@ -4814,14 +4828,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4839: \"$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. @@ -4930,17 +4944,17 @@ 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:4934: checking whether -R must be followed by a space" >&5 +echo "configure:4948: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +#line 4951 "configure" +#include "confdefs.h" + +int main() { + +; return 0; } +EOF +if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -4956,14 +4970,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +#line 4974 "configure" +#include "confdefs.h" + +int main() { + +; return 0; } +EOF +if { (eval echo configure:4981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -4999,12 +5013,12 @@ else echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:5003: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:5017: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5033: \"$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 @@ -5039,12 +5053,12 @@ 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:5043: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:5057: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet_stub " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5073: \"$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 @@ -5084,10 +5098,10 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:5088: checking for gethostbyname" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5128: \"$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 @@ -5131,12 +5145,12 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:5135: checking for gethostbyname in -lnsl" >&5 +echo "configure:5149: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` xe_check_libs=" -lnsl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5165: \"$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 @@ -5177,10 +5191,10 @@ # -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:5181: checking for connect" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5221: \"$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 @@ -5226,12 +5240,12 @@ xe_msg_checking="for connect in -lsocket" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5230: checking "$xe_msg_checking"" >&5 +echo "configure:5244: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocket $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5260: \"$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 @@ -5266,10 +5280,10 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:5270: checking for remove" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5310: \"$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 @@ -5313,12 +5327,12 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:5317: checking for remove in -lposix" >&5 +echo "configure:5331: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` xe_check_libs=" -lposix " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5347: \"$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 @@ -5353,10 +5367,10 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:5357: checking for shmat" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5397: \"$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 @@ -5400,12 +5414,12 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:5404: checking for shmat in -lipc" >&5 +echo "configure:5418: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` xe_check_libs=" -lipc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5434: \"$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 @@ -5452,12 +5466,12 @@ xe_msg_checking="for IceConnectionNumber in -lICE" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5456: checking "$xe_msg_checking"" >&5 +echo "configure:5470: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` xe_check_libs=" -lICE $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5486: \"$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 @@ -5637,7 +5651,7 @@ echo "checking for X defines extracted by xmkmf" 1>&6 -echo "configure:5641: checking for X defines extracted by xmkmf" >&5 +echo "configure:5655: checking for X defines extracted by xmkmf" >&5 rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -5669,15 +5683,15 @@ ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6 -echo "configure:5673: checking for X11/Intrinsic.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5695: \"$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* @@ -5701,12 +5715,12 @@ echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:5705: checking for XOpenDisplay in -lX11" >&5 +echo "configure:5719: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5735: \"$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 @@ -5742,12 +5756,12 @@ xe_msg_checking="for XGetFontProperty in -lX11" test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5746: checking "$xe_msg_checking"" >&5 +echo "configure:5760: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 -b i486-linuxaout" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5776: \"$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 @@ -5785,12 +5799,12 @@ echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:5789: checking for XShapeSelectInput in -lXext" >&5 +echo "configure:5803: checking for XShapeSelectInput in -lXext" >&5 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'` xe_check_libs=" -lXext " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5819: \"$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 @@ -5824,12 +5838,12 @@ echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 -echo "configure:5828: checking for XtOpenDisplay in -lXt" >&5 +echo "configure:5842: checking for XtOpenDisplay in -lXt" >&5 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lXt " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5858: \"$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 @@ -5863,14 +5877,14 @@ echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:5867: checking the version of X11 being used" >&5 +echo "configure:5881: checking the version of X11 being used" >&5 cat > conftest.$ac_ext < int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; } EOF -if { (eval echo configure:5874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:5888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest foobar; x11_release=$? else @@ -5895,15 +5909,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5899: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5921: \"$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* @@ -5934,7 +5948,7 @@ echo $ac_n "checking for XFree86""... $ac_c" 1>&6 -echo "configure:5938: checking for XFree86" >&5 +echo "configure:5952: checking for XFree86" >&5 if test -d "/usr/X386/include" -o \ -f "/etc/XF86Config" -o \ -f "/etc/X11/XF86Config" -o \ @@ -5954,12 +5968,12 @@ test -z "$with_xmu" && { echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 -echo "configure:5958: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 +echo "configure:5972: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'` xe_check_libs=" -lXmu " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5988: \"$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 @@ -6009,19 +6023,19 @@ echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:6013: checking for main in -lXbsd" >&5 +echo "configure:6027: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lXbsd " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6039: \"$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 @@ -6058,22 +6072,22 @@ fi if test "$with_msw" != "no"; then echo "checking for MS-Windows" 1>&6 -echo "configure:6062: checking for MS-Windows" >&5 +echo "configure:6076: checking for MS-Windows" >&5 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 -echo "configure:6065: checking for main in -lgdi32" >&5 +echo "configure:6079: checking for main in -lgdi32" >&5 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdi32 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6091: \"$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 @@ -6139,12 +6153,12 @@ fi fi cat > conftest.$ac_ext < int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; } EOF -if { (eval echo configure:6148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MSG_SELECT @@ -6197,7 +6211,7 @@ fi if test "$with_x11" != "yes"; then - for feature in tooltalk cde offix wmcommand xim xmu xpm nas_sound + for feature in tooltalk cde offix wmcommand xim xmu nas_sound do if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then echo "configure: warning: --with-$feature ignored: Not valid without X support" 1>&2 @@ -6220,7 +6234,7 @@ esac echo "checking for WM_COMMAND option" 1>&6 -echo "configure:6224: checking for WM_COMMAND option" >&5; +echo "configure:6238: checking for WM_COMMAND option" >&5; if test "$with_wmcommand" != "no"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_WMCOMMAND @@ -6235,15 +6249,15 @@ test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6 -echo "configure:6239: checking for X11/Xauth.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6261: \"$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* @@ -6266,12 +6280,12 @@ } test -z "$with_xauth" && { echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 -echo "configure:6270: checking for XauGetAuthByAddr in -lXau" >&5 +echo "configure:6284: checking for XauGetAuthByAddr in -lXau" >&5 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'` xe_check_libs=" -lXau " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6300: \"$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 @@ -6327,15 +6341,15 @@ for dir in "" "Tt/" "desktop/" ; do ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6 -echo "configure:6331: checking for ${dir}tt_c.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6353: \"$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* @@ -6371,12 +6385,12 @@ xe_msg_checking="for tt_message_create in -ltt" test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6375: checking "$xe_msg_checking"" >&5 +echo "configure:6389: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'` xe_check_libs=" -ltt $extra_libs" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6405: \"$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 @@ -6444,15 +6458,15 @@ test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6 -echo "configure:6448: checking for Dt/Dt.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6470: \"$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* @@ -6475,12 +6489,12 @@ } test -z "$with_cde" && { echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 -echo "configure:6479: checking for DtDndDragStart in -lDtSvc" >&5 +echo "configure:6493: checking for DtDndDragStart in -lDtSvc" >&5 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'` xe_check_libs=" -lDtSvc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6509: \"$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 @@ -6560,7 +6574,7 @@ fi echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6 -echo "configure:6564: checking if drag and drop API is needed" >&5 +echo "configure:6578: checking if drag and drop API is needed" >&5 if test "$with_dragndrop" != "no" ; then if test -n "$dragndrop_proto" ; then with_dragndrop=yes @@ -6581,18 +6595,18 @@ fi echo "checking for LDAP" 1>&6 -echo "configure:6585: checking for LDAP" >&5 +echo "configure:6599: checking for LDAP" >&5 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ldap.h""... $ac_c" 1>&6 -echo "configure:6588: checking for ldap.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6610: \"$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* @@ -6615,15 +6629,15 @@ } test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for lber.h""... $ac_c" 1>&6 -echo "configure:6619: checking for lber.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6641: \"$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* @@ -6647,12 +6661,12 @@ if test "$with_ldap" != "no"; then echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6 -echo "configure:6651: checking for ldap_search in -lldap" >&5 +echo "configure:6665: checking for ldap_search in -lldap" >&5 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6681: \"$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 @@ -6688,12 +6702,12 @@ xe_msg_checking="for ldap_open in -lldap" test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6692: checking "$xe_msg_checking"" >&5 +echo "configure:6706: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6722: \"$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 @@ -6729,12 +6743,12 @@ xe_msg_checking="for ldap_open in -lldap" test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6733: checking "$xe_msg_checking"" >&5 +echo "configure:6747: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber -lkrb" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6763: \"$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 @@ -6770,12 +6784,12 @@ xe_msg_checking="for ldap_open in -lldap" test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6774: checking "$xe_msg_checking"" >&5 +echo "configure:6788: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber -lkrb -ldes" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6804: \"$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 @@ -6837,10 +6851,10 @@ for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6841: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6895,15 +6909,15 @@ if test "$window_system" != "none"; then echo "checking for graphics libraries" 1>&6 -echo "configure:6899: checking for graphics libraries" >&5 +echo "configure:6913: checking for graphics libraries" >&5 xpm_problem="" if test -z "$with_xpm"; then echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6 -echo "configure:6904: checking for Xpm - no older than 3.4f" >&5 +echo "configure:6918: checking for Xpm - no older than 3.4f" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext < int main(int c, char **v) { @@ -6911,7 +6925,7 @@ XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;} EOF -if { (eval echo configure:6915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest dummy_arg; xpm_status=$?; if test "$xpm_status" = "0"; then @@ -6953,17 +6967,17 @@ libs_x="-lXpm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6 -echo "configure:6957: checking for \"FOR_MSW\" xpm" >&5 +echo "configure:6971: checking for \"FOR_MSW\" xpm" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* xpm_for_msw=no else @@ -6989,15 +7003,15 @@ test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for compface.h""... $ac_c" 1>&6 -echo "configure:6993: checking for compface.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7015: \"$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* @@ -7020,12 +7034,12 @@ } test -z "$with_xface" && { echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:7024: checking for UnGenFace in -lcompface" >&5 +echo "configure:7038: checking for UnGenFace in -lcompface" >&5 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'` xe_check_libs=" -lcompface " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7054: \"$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 @@ -7088,12 +7102,12 @@ if test "$with_png $with_tiff" != "no no"; then echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6 -echo "configure:7092: checking for inflate in -lc" >&5 +echo "configure:7106: checking for inflate in -lc" >&5 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7122: \"$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 @@ -7123,12 +7137,12 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:7127: checking for inflate in -lz" >&5 +echo "configure:7141: checking for inflate in -lz" >&5 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lz " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7157: \"$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 @@ -7158,12 +7172,12 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 -echo "configure:7162: checking for inflate in -lgz" >&5 +echo "configure:7176: checking for inflate in -lgz" >&5 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lgz " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7192: \"$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 @@ -7204,15 +7218,15 @@ test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 -echo "configure:7208: checking for jpeglib.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7230: \"$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* @@ -7235,12 +7249,12 @@ } test -z "$with_jpeg" && { echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 -echo "configure:7239: checking for jpeg_destroy_decompress in -ljpeg" >&5 +echo "configure:7253: checking for jpeg_destroy_decompress in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'` xe_check_libs=" -ljpeg " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7269: \"$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 @@ -7287,10 +7301,10 @@ png_problem="" test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 -echo "configure:7291: checking for pow" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pow=yes" else @@ -7334,15 +7348,15 @@ } test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:7338: checking for png.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7360: \"$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* @@ -7365,12 +7379,12 @@ } test -z "$with_png" && { echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:7369: checking for png_read_image in -lpng" >&5 +echo "configure:7383: checking for png_read_image in -lpng" >&5 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'` xe_check_libs=" -lpng " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7399: \"$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 @@ -7404,10 +7418,10 @@ } if test -z "$with_png"; then echo $ac_n "checking for workable png version information""... $ac_c" 1>&6 -echo "configure:7408: checking for workable png version information" >&5 +echo "configure:7422: checking for workable png version information" >&5 xe_check_libs="-lpng -lz" cat > conftest.$ac_ext < int main(int c, char **v) { @@ -7415,7 +7429,7 @@ if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1; return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;} EOF -if { (eval echo configure:7419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest dummy_arg; png_status=$?; if test "$png_status" = "0"; then @@ -7458,15 +7472,15 @@ test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:7462: checking for tiffio.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7484: \"$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* @@ -7489,12 +7503,12 @@ } test -z "$with_tiff" && { echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6 -echo "configure:7493: checking for TIFFClientOpen in -ltiff" >&5 +echo "configure:7507: checking for TIFFClientOpen in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'` xe_check_libs=" -ltiff " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7523: \"$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 @@ -7544,16 +7558,29 @@ if test "$with_x11" = "yes"; then echo "checking for X11 graphics libraries" 1>&6 -echo "configure:7548: checking for X11 graphics libraries" >&5 - +echo "configure:7562: checking for X11 graphics libraries" >&5 + + echo "checking for the Athena widgets" 1>&6 +echo "configure:7565: checking for the Athena widgets" >&5 + + case "$with_athena" in + "xaw" | "") athena_variant=Xaw athena_3d=no ;; + "3d") athena_variant=Xaw3d athena_3d=yes ;; + "next") athena_variant=neXtaw athena_3d=yes ;; + "95") athena_variant=Xaw95 athena_3d=yes ;; + "xpm") athena_variant=XawXpm athena_3d=yes ;; + *) { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;; + esac + + if test "$athena_3d" = "no"; then -echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6 -echo "configure:7552: checking for XawScrollbarSetThumb in -lXaw" >&5 -ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lXaw " -cat > conftest.$ac_ext <&6 +echo "configure:7579: checking for XawScrollbarSetThumb in -l$athena_variant" >&5 +ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` + +xe_check_libs=" -l$athena_variant " +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7595: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +xe_check_libs="" + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then + echo "$ac_t""yes" 1>&6 + +echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6 +echo "configure:7611: checking for threeDClassRec in -l$athena_variant" >&5 +ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'` + +xe_check_libs=" -l$athena_variant " +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +xe_check_libs="" + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then + echo "$ac_t""yes" 1>&6 + echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2 +else + echo "$ac_t""no" 1>&6 +athena_lib=$athena_variant +fi + + + +else + echo "$ac_t""no" 1>&6 +echo "configure: warning: "Could not find an Athena widget library."" 1>&2 +fi + + + else + +echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6 +echo "configure:7658: checking for threeDClassRec in -l$athena_variant" >&5 +ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'` + +xe_check_libs=" -l$athena_variant " +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +xe_check_libs="" + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then + echo "$ac_t""yes" 1>&6 + athena_lib=$athena_variant +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6 +echo "configure:7692: checking for threeDClassRec in -lXaw" >&5 +ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'` + +xe_check_libs=" -lXaw " +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7578,65 +7718,263 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - have_xaw=yes -else - echo "$ac_t""no" 1>&6 -have_xaw=no -fi - - - - -echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6 -echo "configure:7592: checking for XawScrollbarSetThumb in -lXaw3d" >&5 -ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lXaw3d " -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - have_xaw3d=yes -else - echo "$ac_t""no" 1>&6 -have_xaw3d=no -fi - - + athena_lib=Xaw; + echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2; + +else + echo "$ac_t""no" 1>&6 +echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2 +fi + + +fi + + + fi + + if test "$athena_3d" = "no"; then + ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6 +echo "configure:7739: checking for X11/Xaw/ThreeD.h" >&5 + +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7747: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2 +else + echo "$ac_t""no" 1>&6 +ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6 +echo "configure:7767: checking for X11/Xaw/XawInit.h" >&5 + +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7775: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + athena_h_path=X11/Xaw +else + echo "$ac_t""no" 1>&6 +echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2 +fi + +fi + + else + ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6 +echo "configure:7801: checking for X11/$athena_variant/XawInit.h" >&5 + +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7809: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6 +echo "configure:7826: checking for X11/$athena_variant/ThreeD.h" >&5 + +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7834: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + athena_h_path=X11/$athena_variant +else + echo "$ac_t""no" 1>&6 +fi + +else + echo "$ac_t""no" 1>&6 +fi + + + if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then + ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6 +echo "configure:7862: checking for X11/Xaw3d/XawInit.h" >&5 + +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7870: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6 +echo "configure:7887: checking for X11/Xaw3d/ThreeD.h" >&5 + +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7895: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2 + athena_h_path=X11/Xaw3d + +else + echo "$ac_t""no" 1>&6 +fi + +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test -z "$athena_h_path"; then + ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6 +echo "configure:7927: checking for X11/Xaw/ThreeD.h" >&5 + +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7935: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2 + athena_h_path=X11/Xaw + +else + echo "$ac_t""no" 1>&6 +echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2 +fi + + fi + fi + + if test -n "$athena_lib" -a -n "$athena_h_path"; then + have_xaw=yes + else + have_xaw=no + fi ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:7632: checking for Xm/Xm.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7978: \"$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* @@ -7653,12 +7991,12 @@ echo "$ac_t""yes" 1>&6 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6 -echo "configure:7657: checking for XmStringFree in -lXm" >&5 +echo "configure:7995: checking for XmStringFree in -lXm" >&5 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8011: \"$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 @@ -7698,9 +8036,9 @@ if test "$have_motif" = "yes"; then echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 -echo "configure:7702: checking for Lesstif" >&5 +echo "configure:8040: checking for Lesstif" >&5 cat > conftest.$ac_ext < #ifdef LESSTIF_VERSION @@ -7723,13 +8061,12 @@ fi -case "$with_menubars" in "" | "yes" | "athena" | "athena3d" ) +case "$with_menubars" in "" | "yes" | "athena" ) with_menubars="lucid" ;; esac case "$with_dialogs" in "" | "yes" | "lucid" ) - if test "$have_motif" = "yes"; then with_dialogs="motif" - elif test "$have_xaw3d" = "yes"; then with_dialogs="athena3d" - elif test "$have_xaw" = "yes"; then with_dialogs="athena" + if test "$have_motif" = "yes"; then with_dialogs="motif" + elif test "$have_xaw" = "yes"; then with_dialogs="athena" else with_dialogs=no fi ;; esac @@ -7738,7 +8075,6 @@ esac case "$with_widgets" in "" | "yes" | "lucid") if test "$have_motif" = "yes"; then with_widgets="motif" - elif test "$have_xaw3d" = "yes"; then with_widgets="athena3d" elif test "$have_xaw" = "yes"; then with_widgets="athena" else with_widgets=no fi ;; @@ -7747,8 +8083,25 @@ all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets" case "$all_widgets" in - *athena*3d ) - { test "$extra_verbose" = "yes" && cat << \EOF + *athena* ) + if test "$have_xaw" != "yes"; then + { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; } + fi + + lwlib_objs="$lwlib_objs lwlib-Xaw.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi + + libs_x="-l$athena_lib $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-l$athena_lib\" to \$libs_x"; fi + + { test "$extra_verbose" = "yes" && cat << EOF + Defining ATHENA_H_PATH = $athena_h_path +EOF +cat >> confdefs.h <> confdefs.h <<\EOF @@ -7756,7 +8109,7 @@ EOF } - { test "$extra_verbose" = "yes" && cat << \EOF + { test "$extra_verbose" = "yes" && cat << \EOF Defining NEED_ATHENA EOF cat >> confdefs.h <<\EOF @@ -7764,31 +8117,18 @@ EOF } - lwlib_objs="$lwlib_objs lwlib-Xaw.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi - if test "$have_xaw3d"; then - libs_x="-lXaw3d $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXaw3d\" to \$libs_x"; fi - else - libs_x="-lXaw $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXaw\" to \$libs_x"; fi - fi ;; - *athena* ) - { test "$extra_verbose" = "yes" && cat << \EOF - Defining LWLIB_USES_ATHENA -EOF -cat >> confdefs.h <<\EOF -#define LWLIB_USES_ATHENA 1 -EOF -} - - { test "$extra_verbose" = "yes" && cat << \EOF - Defining NEED_ATHENA -EOF -cat >> confdefs.h <<\EOF -#define NEED_ATHENA 1 -EOF -} - - lwlib_objs="$lwlib_objs lwlib-Xaw.o" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi - libs_x="-lXaw $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXaw\" to \$libs_x"; fi ;; + + if test "$athena_3d" = "yes"; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_ATHENA_3D +EOF +cat >> confdefs.h <<\EOF +#define HAVE_ATHENA_3D 1 +EOF +} + + fi + ;; esac case "$all_widgets" in *motif* ) @@ -7834,23 +8174,25 @@ -case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF +test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF Defining LWLIB_SCROLLBARS_ATHENA EOF cat >> confdefs.h <<\EOF #define LWLIB_SCROLLBARS_ATHENA 1 EOF } -;; esac -case "$with_dialogs" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF + +test "$with_dialogs" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF Defining LWLIB_DIALOGS_ATHENA EOF cat >> confdefs.h <<\EOF #define LWLIB_DIALOGS_ATHENA 1 EOF } - ;; esac -test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF + + +if test "$athena_3d" = "yes"; then + test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF Defining LWLIB_SCROLLBARS_ATHENA3D EOF cat >> confdefs.h <<\EOF @@ -7858,7 +8200,7 @@ EOF } -test "$with_dialogs" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF + test "$with_dialogs" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF Defining LWLIB_DIALOGS_ATHENA3D EOF cat >> confdefs.h <<\EOF @@ -7866,6 +8208,8 @@ EOF } +fi + case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF Defining LWLIB_WIDGETS_ATHENA EOF @@ -8027,7 +8371,7 @@ if test "$with_mule" = "yes" ; then echo "checking for Mule-related features" 1>&6 -echo "configure:8031: checking for Mule-related features" >&5 +echo "configure:8375: checking for Mule-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining MULE EOF @@ -8052,15 +8396,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8056: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8408: \"$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* @@ -8091,12 +8435,12 @@ echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:8095: checking for strerror in -lintl" >&5 +echo "configure:8439: checking for strerror in -lintl" >&5 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'` xe_check_libs=" -lintl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8455: \"$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 @@ -8140,18 +8484,18 @@ echo "checking for Mule input methods" 1>&6 -echo "configure:8144: checking for Mule input methods" >&5 +echo "configure:8488: checking for Mule input methods" >&5 case "$with_xim" in "" | "yes" ) echo "checking for XIM" 1>&6 -echo "configure:8147: checking for XIM" >&5 +echo "configure:8491: checking for XIM" >&5 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6 -echo "configure:8150: checking for XOpenIM in -lX11" >&5 +echo "configure:8494: checking for XOpenIM in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8510: \"$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 @@ -8186,12 +8530,12 @@ if test "$have_motif $have_lesstif" = "yes no"; then echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:8190: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:8534: checking for XmImMbLookupString in -lXm" >&5 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8550: \"$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 @@ -8267,15 +8611,15 @@ if test "$with_xfs" = "yes" ; then echo "checking for XFontSet" 1>&6 -echo "configure:8271: checking for XFontSet" >&5 +echo "configure:8615: checking for XFontSet" >&5 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:8274: checking for XmbDrawString in -lX11" >&5 +echo "configure:8618: checking for XmbDrawString in -lX11" >&5 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8634: \"$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 @@ -8326,15 +8670,15 @@ test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6 -echo "configure:8330: checking for wnn/jllib.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8682: \"$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* @@ -8359,10 +8703,10 @@ for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8363: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8414,12 +8758,12 @@ test "$ac_cv_func_crypt" != "yes" && { echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:8418: checking for crypt in -lcrypt" >&5 +echo "configure:8762: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` xe_check_libs=" -lcrypt " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8778: \"$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 @@ -8465,12 +8809,12 @@ if test -z "$with_wnn" -o "$with_wnn" = "yes"; then echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6 -echo "configure:8469: checking for jl_dic_list_e in -lwnn" >&5 +echo "configure:8813: checking for jl_dic_list_e in -lwnn" >&5 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8829: \"$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 @@ -8499,12 +8843,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6 -echo "configure:8503: checking for jl_dic_list_e in -lwnn4" >&5 +echo "configure:8847: checking for jl_dic_list_e in -lwnn4" >&5 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn4 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8863: \"$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 @@ -8533,12 +8877,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6 -echo "configure:8537: checking for jl_dic_list_e in -lwnn6" >&5 +echo "configure:8881: checking for jl_dic_list_e in -lwnn6" >&5 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn6 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8897: \"$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 @@ -8567,12 +8911,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6 -echo "configure:8571: checking for dic_list_e in -lwnn6_fromsrc" >&5 +echo "configure:8915: checking for dic_list_e in -lwnn6_fromsrc" >&5 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn6_fromsrc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8931: \"$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 @@ -8631,12 +8975,12 @@ if test "$with_wnn6" != "no"; then echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6 -echo "configure:8635: checking for jl_fi_dic_list in -l$libwnn" >&5 +echo "configure:8979: checking for jl_fi_dic_list in -l$libwnn" >&5 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'` xe_check_libs=" -l$libwnn " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8995: \"$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 @@ -8682,15 +9026,15 @@ if test "$with_canna" != "no"; then ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:8686: checking for canna/jrkanji.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9038: \"$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* @@ -8717,15 +9061,15 @@ c_switch_site="$c_switch_site -I/usr/local/canna/include" ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:8721: checking for canna/jrkanji.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9073: \"$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* @@ -8753,15 +9097,15 @@ test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6 -echo "configure:8757: checking for canna/RK.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9109: \"$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* @@ -8784,12 +9128,12 @@ } test -z "$with_canna" && { echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:8788: checking for RkBgnBun in -lRKC" >&5 +echo "configure:9132: checking for RkBgnBun in -lRKC" >&5 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'` xe_check_libs=" -lRKC " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9148: \"$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 @@ -8823,12 +9167,12 @@ } test -z "$with_canna" && { echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:8827: checking for jrKanjiControl in -lcanna" >&5 +echo "configure:9171: checking for jrKanjiControl in -lcanna" >&5 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'` xe_check_libs=" -lcanna " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9187: \"$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 @@ -8888,12 +9232,12 @@ libs_x="-lXm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXm\" to \$libs_x"; fi echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6 -echo "configure:8892: checking for layout_object_getvalue in -li18n" >&5 +echo "configure:9236: checking for layout_object_getvalue in -li18n" >&5 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'` xe_check_libs=" -li18n " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9252: \"$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 @@ -8990,10 +9334,10 @@ for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8994: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9057,10 +9401,10 @@ * ) for ac_func in realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9061: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9119,10 +9463,10 @@ for ac_func in getloadavg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9123: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9181,12 +9525,12 @@ echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:9185: checking for kstat_open in -lkstat" >&5 +echo "configure:9529: checking for kstat_open in -lkstat" >&5 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lkstat " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9545: \"$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 @@ -9231,12 +9575,12 @@ echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 -echo "configure:9235: checking for kvm_read in -lkvm" >&5 +echo "configure:9579: checking for kvm_read in -lkvm" >&5 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'` xe_check_libs=" -lkvm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9595: \"$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 @@ -9281,16 +9625,16 @@ fi echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:9285: checking whether netdb declares h_errno" >&5 -cat > conftest.$ac_ext <&5 +cat > conftest.$ac_ext < int main() { return h_errno; ; return 0; } EOF -if { (eval echo configure:9294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -9310,16 +9654,16 @@ rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:9314: checking for sigsetjmp" >&5 -cat > conftest.$ac_ext <&5 +cat > conftest.$ac_ext < int main() { sigjmp_buf bar; sigsetjmp (bar, 0); ; return 0; } EOF -if { (eval echo configure:9323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -9339,11 +9683,11 @@ rm -f conftest* echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:9343: checking whether localtime caches TZ" >&5 +echo "configure:9687: checking whether localtime caches TZ" >&5 if test "$ac_cv_func_tzset" = "yes"; then cat > conftest.$ac_ext < #if STDC_HEADERS @@ -9378,7 +9722,7 @@ exit (0); } EOF -if { (eval echo configure:9382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then emacs_cv_localtime_cache=no else @@ -9408,9 +9752,9 @@ if test "$HAVE_TIMEVAL" = "yes"; then echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6 -echo "configure:9412: checking whether gettimeofday accepts one or two arguments" >&5 -cat > conftest.$ac_ext <&5 +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""two" 1>&6 else @@ -9454,19 +9798,19 @@ echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:9458: checking for inline" >&5 +echo "configure:9802: checking for inline" >&5 ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -9516,17 +9860,17 @@ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:9520: checking for working alloca.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:9530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -9550,10 +9894,10 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:9554: checking for alloca" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -9620,10 +9964,10 @@ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:9624: checking whether alloca needs Cray hooks" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&6 -echo "configure:9651: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9703,10 +10047,10 @@ fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:9707: checking stack direction for C alloca" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_stack_direction=1 else @@ -9754,15 +10098,15 @@ ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:9758: checking for vfork.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10110: \"$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* @@ -9790,10 +10134,10 @@ fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:9794: checking for working vfork" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < @@ -9888,7 +10232,7 @@ } } EOF -if { (eval echo configure:9892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_vfork_works=yes else @@ -9914,10 +10258,10 @@ echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:9918: checking for working strcoll" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < main () @@ -9927,7 +10271,7 @@ strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:9931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_strcoll_works=yes else @@ -9955,10 +10299,10 @@ for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9959: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10009,10 +10353,10 @@ done echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:10013: checking whether getpgrp takes no argument" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_getpgrp_void=yes else @@ -10094,10 +10438,10 @@ echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:10098: checking for working mmap" >&5 +echo "configure:10442: checking for working mmap" >&5 case "$opsys" in ultrix* ) have_mmap=no ;; *) cat > conftest.$ac_ext < #include @@ -10130,7 +10474,7 @@ return 1; } EOF -if { (eval echo configure:10134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then have_mmap=yes else @@ -10165,15 +10509,15 @@ ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:10169: checking for termios.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10521: \"$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* @@ -10216,15 +10560,15 @@ echo "$ac_t""no" 1>&6 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termio.h""... $ac_c" 1>&6 -echo "configure:10220: checking for termio.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10572: \"$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* @@ -10256,10 +10600,10 @@ echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:10260: checking for socket" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -10297,15 +10641,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6 -echo "configure:10301: checking for netinet/in.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10653: \"$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* @@ -10322,15 +10666,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6 -echo "configure:10326: checking for arpa/inet.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10678: \"$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* @@ -10355,9 +10699,9 @@ } echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:10359: checking "for sun_len member in struct sockaddr_un"" >&5 +echo "configure:10703: checking "for sun_len member in struct sockaddr_un"" >&5 cat > conftest.$ac_ext < @@ -10368,7 +10712,7 @@ static struct sockaddr_un x; x.sun_len = 1; ; return 0; } EOF -if { (eval echo configure:10372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SOCKADDR_SUN_LEN @@ -10386,9 +10730,9 @@ fi rm -f conftest* echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 -echo "configure:10390: checking "for ip_mreq struct in netinet/in.h"" >&5 +echo "configure:10734: checking "for ip_mreq struct in netinet/in.h"" >&5 cat > conftest.$ac_ext < @@ -10398,7 +10742,7 @@ static struct ip_mreq x; ; return 0; } EOF -if { (eval echo configure:10402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MULTICAST @@ -10429,10 +10773,10 @@ echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:10433: checking for msgget" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_msgget=yes" else @@ -10470,15 +10814,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6 -echo "configure:10474: checking for sys/ipc.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10826: \"$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* @@ -10495,15 +10839,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6 -echo "configure:10499: checking for sys/msg.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10851: \"$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* @@ -10541,15 +10885,15 @@ ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:10545: checking for dirent.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10897: \"$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* @@ -10576,15 +10920,15 @@ echo "$ac_t""no" 1>&6 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6 -echo "configure:10580: checking for sys/dir.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10932: \"$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* @@ -10617,15 +10961,15 @@ ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:10621: checking for nlist.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10973: \"$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* @@ -10655,22 +10999,22 @@ echo "checking "for sound support"" 1>&6 -echo "configure:10659: checking "for sound support"" >&5 +echo "configure:11003: checking "for sound support"" >&5 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes if test "$with_native_sound" != "no"; then if test -n "$native_sound_lib"; then ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6 -echo "configure:10666: checking for multimedia/audio_device.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11018: \"$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* @@ -10718,12 +11062,12 @@ if test -z "$native_sound_lib"; then echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:10722: checking for ALopenport in -laudio" >&5 +echo "configure:11066: checking for ALopenport in -laudio" >&5 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11082: \"$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 @@ -10765,12 +11109,12 @@ if test -z "$native_sound_lib"; then echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:10769: checking for AOpenAudio in -lAlib" >&5 +echo "configure:11113: checking for AOpenAudio in -lAlib" >&5 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'` xe_check_libs=" -lAlib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11129: \"$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 @@ -10819,15 +11163,15 @@ for dir in "machine" "sys" "linux"; do ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6 -echo "configure:10823: checking for ${dir}/soundcard.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11175: \"$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* @@ -10881,15 +11225,15 @@ if test "$with_nas_sound" != "no"; then ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6 -echo "configure:10885: checking for audio/audiolib.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11237: \"$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* @@ -10907,12 +11251,12 @@ echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6 -echo "configure:10911: checking for AuOpenServer in -laudio" >&5 +echo "configure:11255: checking for AuOpenServer in -laudio" >&5 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11271: \"$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 @@ -10962,7 +11306,7 @@ fi libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi cat > conftest.$ac_ext < EOF @@ -10993,7 +11337,7 @@ # Extract the first word of "esd-config", so it can be a program name with args. set dummy esd-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:10997: checking for $ac_word" >&5 +echo "configure:11341: checking for $ac_word" >&5 if test -n "$have_esd_config"; then ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test. @@ -11022,10 +11366,10 @@ c_switch_site="$c_switch_site `esd-config --cflags`" && if test "$extra_verbose" = "yes"; then echo " Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi LIBS="`esd-config --libs` $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"`esd-config --libs`\" to \$LIBS"; fi echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6 -echo "configure:11026: checking for esd_play_stream" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_esd_play_stream=yes" else @@ -11099,7 +11443,7 @@ if test "$with_tty" = "yes" ; then echo "checking for TTY-related features" 1>&6 -echo "configure:11103: checking for TTY-related features" >&5 +echo "configure:11447: checking for TTY-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_TTY EOF @@ -11115,12 +11459,12 @@ if test -z "$with_ncurses"; then echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:11119: checking for tgetent in -lncurses" >&5 +echo "configure:11463: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lncurses " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11479: \"$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 @@ -11164,15 +11508,15 @@ ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:11168: checking for ncurses/curses.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11520: \"$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* @@ -11194,15 +11538,15 @@ ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6 -echo "configure:11198: checking for ncurses/term.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11550: \"$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* @@ -11232,15 +11576,15 @@ c_switch_site="$c_switch_site -I/usr/include/ncurses" ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:11236: checking for ncurses/curses.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11588: \"$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* @@ -11275,12 +11619,12 @@ for lib in curses termlib termcap; do echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:11279: checking for tgetent in -l$lib" >&5 +echo "configure:11623: checking for tgetent in -l$lib" >&5 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -l$lib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11639: \"$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 @@ -11322,12 +11666,12 @@ else echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:11326: checking for tgetent in -lcurses" >&5 +echo "configure:11670: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lcurses " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11686: \"$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 @@ -11356,12 +11700,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:11360: checking for tgetent in -ltermcap" >&5 +echo "configure:11704: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -ltermcap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11720: \"$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 @@ -11420,15 +11764,15 @@ test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gpm.h""... $ac_c" 1>&6 -echo "configure:11424: checking for gpm.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11776: \"$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* @@ -11451,12 +11795,12 @@ } test -z "$with_gpm" && { echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:11455: checking for Gpm_Open in -lgpm" >&5 +echo "configure:11799: checking for Gpm_Open in -lgpm" >&5 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgpm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11815: \"$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 @@ -11517,20 +11861,20 @@ test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \ != "no no no" && echo "checking for database support" 1>&6 -echo "configure:11521: checking for database support" >&5 +echo "configure:11865: checking for database support" >&5 if test "$with_database_gdbm $with_database_dbm" != "no no"; then ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6 -echo "configure:11526: checking for ndbm.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11878: \"$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* @@ -11560,12 +11904,12 @@ if test "$with_database_gdbm" != "no"; then echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:11564: checking for dbm_open in -lgdbm" >&5 +echo "configure:11908: checking for dbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdbm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11924: \"$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 @@ -11604,10 +11948,10 @@ if test "$with_database_dbm" != "no"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:11608: checking for dbm_open" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -11649,12 +11993,12 @@ echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:11653: checking for dbm_open in -ldbm" >&5 +echo "configure:11997: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -ldbm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12013: \"$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 @@ -11706,10 +12050,10 @@ if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6 -echo "configure:11710: checking for Berkeley db.h" >&5 +echo "configure:12054: checking for Berkeley db.h" >&5 for path in "db/db.h" "db.h"; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_path="$path"; break else @@ -11743,9 +12087,9 @@ if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6 -echo "configure:11747: checking for Berkeley DB version" >&5 +echo "configure:12091: checking for Berkeley DB version" >&5 cat > conftest.$ac_ext < #if DB_VERSION_MAJOR > 1 @@ -11764,10 +12108,10 @@ rm -f conftest* echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6 -echo "configure:11768: checking for $dbfunc" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$dbfunc=yes" else @@ -11809,12 +12153,12 @@ echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6 -echo "configure:11813: checking for $dbfunc in -ldb" >&5 +echo "configure:12157: checking for $dbfunc in -ldb" >&5 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'` xe_check_libs=" -ldb " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12173: \"$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 @@ -11889,12 +12233,12 @@ if test "$with_socks" = "yes"; then echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:11893: checking for SOCKSinit in -lsocks" >&5 +echo "configure:12237: checking for SOCKSinit in -lsocks" >&5 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocks " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12253: \"$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 @@ -11960,19 +12304,19 @@ if test "$with_modules" != "no"; then echo "checking for module support" 1>&6 -echo "configure:11964: checking for module support" >&5 +echo "configure:12308: checking for module support" >&5 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:11968: checking for dlfcn.h" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12320: \"$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* @@ -11990,12 +12334,12 @@ echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:11994: checking for dlopen in -ldl" >&5 +echo "configure:12338: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -ldl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12354: \"$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 @@ -12025,12 +12369,12 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 -echo "configure:12029: checking for dlopen in -lc" >&5 +echo "configure:12373: checking for dlopen in -lc" >&5 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12389: \"$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 @@ -12080,12 +12424,12 @@ else echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:12084: checking for shl_load in -ldld" >&5 +echo "configure:12428: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12444: \"$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 @@ -12123,12 +12467,12 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:12127: checking for dld_init in -ldld" >&5 +echo "configure:12471: checking for dld_init in -ldld" >&5 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12487: \"$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 @@ -12184,7 +12528,7 @@ xealias=$internal_configuration echo "checking how to build dynamic libraries for ${xehost}" 1>&6 -echo "configure:12188: checking how to build dynamic libraries for ${xehost}" >&5 +echo "configure:12532: checking how to build dynamic libraries for ${xehost}" >&5 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts. case "$xehost" in *-*-linux-gnu*) ;; @@ -12212,9 +12556,9 @@ XEGCC=yes else echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:12216: checking checking whether we are using GNU C" >&5 +echo "configure:12560: checking checking whether we are using GNU C" >&5 cat > conftest.$ac_ext <&6 -echo "configure:12240: checking how to produce PIC code" >&5 +echo "configure:12584: checking how to produce PIC code" >&5 wl= can_build_shared=yes @@ -12329,18 +12673,18 @@ # Check to make sure the dll_cflags actually works. echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6 -echo "configure:12333: checking if PIC flag ${dll_cflags} really works" >&5 +echo "configure:12677: checking if PIC flag ${dll_cflags} really works" >&5 save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $dll_cflags -DPIC" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also @@ -12371,7 +12715,7 @@ xldf= xcldf= echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6 -echo "configure:12375: checking if C compiler can produce shared libraries" >&5 +echo "configure:12719: checking if C compiler can produce shared libraries" >&5 if test "$XEGCC" = yes; then xcldf="-shared" xldf="-shared" @@ -12422,14 +12766,14 @@ xe_libs= ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cc_produces_so=yes else @@ -12454,7 +12798,7 @@ if test "$XEGCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:12458: checking for ld used by GCC" >&5 +echo "configure:12802: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -12479,7 +12823,7 @@ esac else echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:12483: checking for GNU ld" >&5 +echo "configure:12827: checking for GNU ld" >&5 fi if test -z "$LTLD"; then @@ -12517,7 +12861,7 @@ # Check to see if it really is or isn't GNU ld. echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6 -echo "configure:12521: checking if the linker is GNU ld" >&5 +echo "configure:12865: checking if the linker is GNU ld" >&5 # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LTLD -v 2>&1 &5; then xe_gnu_ld=yes @@ -12544,7 +12888,7 @@ # OK - only NOW do we futz about with ld. # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6 -echo "configure:12548: checking whether the linker supports shared libraries" >&5 +echo "configure:12892: checking whether the linker supports shared libraries" >&5 dll_ld=$CC dll_ldflags=$LDFLAGS ld_shlibs=yes @@ -12759,10 +13103,10 @@ for ac_func in dlerror _dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12763: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <&5 + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12824,11 +13168,11 @@ fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:13176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else diff -r 892ca416f0fb -r 9d177e8d4150 configure.in --- a/configure.in Mon Aug 13 11:30:00 2007 +0200 +++ b/configure.in Mon Aug 13 11:30:53 2007 +0200 @@ -638,6 +638,23 @@ done ;; + dnl Has the user specified a prefered Athena widget set? + dnl This bit expands any alias names out for us... + "with_athena" ) + case "$val" in + xa | xaw ) val=xaw ;; + 3 | 3d | xaw3d ) val=3d ;; + dnl No `n' for next, someone may try `no' + ne | nex | next | naxtaw) val=next ;; + dnl Have not tested the next two... + 9 | 95 | xaw95 ) val=95 ;; + xp | xpm | xawxpm ) val=xpm ;; + * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: + \`xaw', \`3d', \`next', \`95', or \`xpm'."]) ;; + esac + eval "$opt=\"$val\"" + ;; + dnl Has the user requested XIM support? "with_xim" ) case "$val" in @@ -772,11 +789,10 @@ case "$val" in l | lu | luc | luci | lucid ) val=lucid ;; m | mo | mot | moti | motif ) val=motif ;; - athena3d | athena-3d ) val=athena3d ;; a | at | ath | athe | athen | athena ) val=athena ;; n | no | non | none ) val=no ;; * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: - \`lucid', \`motif', \`athena', \`athena3d', or \`no'."]) ;; + \`lucid', \`motif', \`athena', or \`no'."]) ;; esac eval "$opt=\"$val\"" ;; @@ -2568,7 +2584,7 @@ dnl if test "$with_tty" = "no" ; then dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.]) dnl fi - for feature in tooltalk cde offix wmcommand xim xmu xpm nas_sound + for feature in tooltalk cde offix wmcommand xim xmu nas_sound do if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then AC_MSG_WARN([--with-$feature ignored: Not valid without X support]) @@ -2879,16 +2895,84 @@ AC_CHECKING(for X11 graphics libraries) - dnl Autodetect -lXaw - AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no) - dnl if test "$have_xaw" = "yes"; then - dnl AC_CHECK_HEADER(X11/Xaw/Reports.h, [ - dnl XE_APPEND(pkg-src/tree-x, MAKE_SUBDIR) - dnl XE_APPEND(pkg-src/tree-x, INSTALL_ARCH_DEP_SUBDIR)]) - dnl fi - - dnl Autodetect -lXaw3d - AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, have_xaw3d=yes, have_xaw3d=no) + AC_CHECKING(for the Athena widgets) + + dnl What in heck did the user actually want? + case "$with_athena" in + dnl This is the default, old fashioned flat Athena. + "xaw" | "") athena_variant=Xaw athena_3d=no ;; + "3d") athena_variant=Xaw3d athena_3d=yes ;; + "next") athena_variant=neXtaw athena_3d=yes ;; + "95") athena_variant=Xaw95 athena_3d=yes ;; + "xpm") athena_variant=XawXpm athena_3d=yes ;; + *) XE_DIE("Unknown Athena widget set \`$with_athena'. This should not happen.") ;; + esac + + dnl Search for the Athena library... + if test "$athena_3d" = "no"; then + AC_CHECK_LIB($athena_variant, XawScrollbarSetThumb, + [ + dnl Must not be a 3d library... + AC_CHECK_LIB($athena_variant, threeDClassRec, + AC_MSG_WARN("Could not find a non-3d Athena widget library."), + athena_lib=$athena_variant) + ], + AC_MSG_WARN("Could not find an Athena widget library.")) + else + dnl The real configuration, need 3d library + AC_CHECK_LIB($athena_variant, threeDClassRec, athena_lib=$athena_variant, + dnl OK, couldn't find it with a proper name, try the standard Athena lib + dnl If that is 3d, presume the user asked for what they have installed. + AC_CHECK_LIB(Xaw, threeDClassRec, + [ + athena_lib=Xaw; + AC_MSG_WARN("Assuming that libXaw is actually $athena_variant."); + ], + AC_MSG_WARN("Could not find a 3d Athena widget library that looked like $athena_variant."))) + fi + + dnl Now we locate the Athena headers that we need. + if test "$athena_3d" = "no"; then + AC_CHECK_HEADER(X11/Xaw/ThreeD.h, + AC_MSG_WARN("Could not find a non-3d Athena header set."), + AC_CHECK_HEADER(X11/Xaw/XawInit.h, + athena_h_path=X11/Xaw, + AC_MSG_WARN("Could not find a non-3d Athena header set."))) + else + dnl The three-d Athena headers are so much more slippery. + dnl Curse this `Lets replace standard libraries' thing that they did. :/ + AC_CHECK_HEADER(X11/$athena_variant/XawInit.h, + AC_CHECK_HEADER(X11/$athena_variant/ThreeD.h, + athena_h_path=X11/$athena_variant,)) + + dnl If we couldn't find the specific variant, try the generic Athena 3d headers + if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then + AC_CHECK_HEADER(X11/Xaw3d/XawInit.h, + AC_CHECK_HEADER(X11/Xaw3d/ThreeD.h, + [ + AC_MSG_WARN("Assuming that X11/Xaw3d headers are suitable for $athena_variant.") + athena_h_path=X11/Xaw3d + ],)) + fi + + dnl If nothing yet found, see if Xaw is a 3d header set... + dnl We AC_MSG_WARN if we fail because I am all out of ideas... + if test -z "$athena_h_path"; then + AC_CHECK_HEADER(X11/Xaw/ThreeD.h, + [ + AC_MSG_WARN("Assuming that X11/Xaw headers are suitable for $athena_variant.") + athena_h_path=X11/Xaw + ], + AC_MSG_WARN("Could not find a suitable 3d Athena header set.")) + fi + fi + + dnl Do we actually have a usable Athena widget set? Please? + if test -n "$athena_lib" -a -n "$athena_h_path"; then + have_xaw=yes + else + have_xaw=no + fi dnl autodetect Motif - but only add to libs_x later (if necessary) AC_CHECK_HEADER(Xm/Xm.h, @@ -2913,13 +2997,12 @@ dnl Not all toolkits support all widgets dnl if Motif is available we use it for the dialog boxes. -case "$with_menubars" in "" | "yes" | "athena" | "athena3d" ) +case "$with_menubars" in "" | "yes" | "athena" ) with_menubars="lucid" ;; esac case "$with_dialogs" in "" | "yes" | "lucid" ) - if test "$have_motif" = "yes"; then with_dialogs="motif" - elif test "$have_xaw3d" = "yes"; then with_dialogs="athena3d" - elif test "$have_xaw" = "yes"; then with_dialogs="athena" + if test "$have_motif" = "yes"; then with_dialogs="motif" + elif test "$have_xaw" = "yes"; then with_dialogs="athena" else with_dialogs=no fi ;; esac @@ -2928,7 +3011,6 @@ esac case "$with_widgets" in "" | "yes" | "lucid") if test "$have_motif" = "yes"; then with_widgets="motif" - elif test "$have_xaw3d" = "yes"; then with_widgets="athena3d" elif test "$have_xaw" = "yes"; then with_widgets="athena" else with_widgets=no fi ;; @@ -2937,20 +3019,28 @@ all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets" case "$all_widgets" in - *athena*3d ) - AC_DEFINE(LWLIB_USES_ATHENA) - AC_DEFINE(NEED_ATHENA) - XE_APPEND(lwlib-Xaw.o, lwlib_objs) - if test "$have_xaw3d"; then - XE_PREPEND(-lXaw3d, libs_x) - else - XE_PREPEND(-lXaw, libs_x) - fi ;; - *athena* ) - AC_DEFINE(LWLIB_USES_ATHENA) - AC_DEFINE(NEED_ATHENA) - XE_APPEND(lwlib-Xaw.o, lwlib_objs) - XE_PREPEND(-lXaw, libs_x) ;; + *athena* ) + if test "$have_xaw" != "yes"; then + XE_DIE("Could not find a suitable Athena library to build with.") + fi + + dnl Add the Lucid widget Athena code + XE_APPEND(lwlib-Xaw.o, lwlib_objs) + + dnl Add the Athena widget library we located earlier + XE_PREPEND(-l$athena_lib, libs_x) + + dnl Export the path for lwlib, used to build and include the headers + dnl from the right place later on. + AC_DEFINE_UNQUOTED(ATHENA_H_PATH, $athena_h_path) + + AC_DEFINE(LWLIB_USES_ATHENA) + AC_DEFINE(NEED_ATHENA) + + if test "$athena_3d" = "yes"; then + AC_DEFINE(HAVE_ATHENA_3D) + fi + ;; esac case "$all_widgets" in *motif* ) @@ -2975,10 +3065,14 @@ AC_SUBST(lwlib_objs) -case "$with_scrollbars" in athena* ) AC_DEFINE(LWLIB_SCROLLBARS_ATHENA);; esac -case "$with_dialogs" in athena* ) AC_DEFINE(LWLIB_DIALOGS_ATHENA) ;; esac -test "$with_scrollbars" = "athena3d" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D) -test "$with_dialogs" = "athena3d" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D) +test "$with_scrollbars" = "athena" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA) +test "$with_dialogs" = "athena" && AC_DEFINE(LWLIB_DIALOGS_ATHENA) + +if test "$athena_3d" = "yes"; then + test "$with_scrollbars" = "athena" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D) + test "$with_dialogs" = "athena" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D) +fi + case "$with_widgets" in athena* ) AC_DEFINE(LWLIB_WIDGETS_ATHENA);; esac test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \ AC_DEFINE(LWLIB_TABS_LUCID) diff -r 892ca416f0fb -r 9d177e8d4150 configure.usage --- a/configure.usage Mon Aug 13 11:30:00 2007 +0200 +++ b/configure.usage Mon Aug 13 11:30:53 2007 +0200 @@ -61,15 +61,17 @@ --without-toolbars Don't compile with any toolbar support. --without-wmcommand Compile without realized leader window which will keep the WM_COMMAND property. +--with-athena=TYPE Use TYPE Athena widgets + (xaw, 3d, next, 95, or xpm) --with-menubars=TYPE Use TYPE menubars (lucid, motif, or no). The Lucid widgets emulate Motif (mostly) but are faster. *WARNING* The Motif menubar is currently broken. --with-scrollbars=TYPE Use TYPE scrollbars - (lucid, motif, athena, athena3d, or no). ---with-dialogs=TYPE Use TYPE dialog boxes (motif, athena, athena3d, or no). + (lucid, motif, athena, or no). +--with-dialogs=TYPE Use TYPE dialog boxes (motif, athena, or no). Lucid menubars and scrollbars are the default. Motif dialog boxes will be used if Motif can be found. ---with-widgets=TYPE Use TYPE widgets (motif, athena, athena3d, or no). +--with-widgets=TYPE Use TYPE widgets (motif, athena, or no). Motif widgets will be used if Motif can be found. Other widget types are currently unsupported. --with-dragndrop (*) Compile in the generic drag and drop API. This is diff -r 892ca416f0fb -r 9d177e8d4150 etc/TUTORIAL.de --- a/etc/TUTORIAL.de Mon Aug 13 11:30:00 2007 +0200 +++ b/etc/TUTORIAL.de Mon Aug 13 11:30:53 2007 +0200 @@ -1,4 +1,4 @@ -Copyright (c) 1997, Adrian Aichner . +Copyright (c) 1997, Adrian Aichner . Copyright (c) 1985, 1996 Free Software Foundation, Inc. See end for conditions. @@ -1131,13 +1131,13 @@ Ben Wing hat das Tutorial für X Windows erweitert. Martin Buchholz und Hrvoje Niksic haben weitere Korrekturen für XEmacs beigetragen. Ins Deutsche übertragen wurde es von Adrian Aichner -. +. Diese Version des Tutorials ist, wie GNU Emacs selbst, urheberrechtlich geschützt und erlaubt die Verteilung von Kopien unter bestimmten Voraussetzungen: -Copyright (c) 1997, Adrian Aichner . +Copyright (c) 1997, Adrian Aichner . Copyright (c) 1985, 1996 Free Software Foundation diff -r 892ca416f0fb -r 9d177e8d4150 lib-src/ChangeLog --- a/lib-src/ChangeLog Mon Aug 13 11:30:00 2007 +0200 +++ b/lib-src/ChangeLog Mon Aug 13 11:30:53 2007 +0200 @@ -1,3 +1,13 @@ +1999-12-24 Martin Buchholz + + * XEmacs 21.2.25 is released. + +1999-12-21 Martin Buchholz + + * fakemail.c (cuserid): ((expr)) ==> (expr) + + * fakemail.c (xmalloc): ANSIfy. + 1999-12-14 Martin Buchholz * config.values.sh: Only update config.values.in if changed. diff -r 892ca416f0fb -r 9d177e8d4150 lib-src/config.values.sh --- a/lib-src/config.values.sh Mon Aug 13 11:30:00 2007 +0200 +++ b/lib-src/config.values.sh Mon Aug 13 11:30:53 2007 +0200 @@ -1,4 +1,7 @@ -#! /bin/sh +: #-*- Perl -*- +eval 'exec perl -w -S $0 ${1+"$@"}' # Portability kludge + if 0; + # config.values.sh --- create config.values.in from ../configure # Author: Martin Buchholz @@ -35,17 +38,27 @@ ## by an XEmacs Maintainer (consider yourself so blessed, if you are ## actually reading this commentary). ## -if test ! -r ./configure; then - cd .. - if test ! -r ./configure; then - echo "Can't find configure!"; - exit 1; - fi -fi + +if (! -r "./configure") { + chdir ".." or die "Can't chdir: $!"; + if (! -r "./configure") { + die "Can't find configure!"; + } +} -exec < ./configure > "lib-src/config.values.in" -cat <<\EOF -;;; Do not edit this file! +sub FileContents { + local $/ = undef; # Slurp mode + open (FILE, "< $_[0]") or die "$_[0]: $!"; + my $contents = ; + close FILE or die "$_[0]: $!"; + return $contents; +} + +my $configure_contents = FileContents "./configure"; +my $cvi_contents = FileContents "lib-src/config.values.in"; + +my $new_cvi_contents = +";;; Do not edit this file! ;;; This file was automatically generated, by the config.values.sh script, ;;; from configure, which was itself automatically generated from configure.in. ;;; @@ -62,15 +75,27 @@ ;;; Variables defined in configure by AC_SUBST follow: ;;; (These are used in Makefiles) -EOF -sed -n '/^s%@\([A-Za-z_][A-Za-z_]*\)@%\$\1%g$/ { - s/^s%@\([A-Za-z_][A-Za-z_]*\)@%\$\1%g$/\1 "@\1@"/ - p -}' | \ -sort -u -cat <<\EOF +"; +my %done; +for my $var (sort { $a cmp $b } + $configure_contents =~ + /^s\%\@([A-Za-z0-9_]+)\@\%\$[A-Za-z0-9_]+\%g/mg) { + $new_cvi_contents .= "$var \"\@$var\@\"\n" unless exists $done{$var}; + $done{$var} = 1; +} + +$new_cvi_contents .= " ;;; Variables defined in configure by AC_DEFINE and AC_DEFINE_UNQUOTED follow: ;;; (These are used in C code) -EOF +"; + +if ($cvi_contents ne $new_cvi_contents) { + unlink "lib-src/config.values.in"; + open (CVI, "> lib-src/config.values.in") + or die "lib-src/config.values.in: $!"; + print CVI $new_cvi_contents; + close CVI + or die "lib-src/config.values.in: $!"; +} diff -r 892ca416f0fb -r 9d177e8d4150 lib-src/fakemail.c --- a/lib-src/fakemail.c Mon Aug 13 11:30:00 2007 +0200 +++ b/lib-src/fakemail.c Mon Aug 13 11:30:53 2007 +0200 @@ -162,7 +162,7 @@ extern unsigned short geteuid (); static struct passwd *my_entry; #define cuserid(s) \ -(my_entry = getpwuid (((int) geteuid ())), \ +(my_entry = getpwuid ((int) geteuid ()), \ my_entry->pw_name) #endif @@ -193,7 +193,7 @@ static char * xmalloc (size_t size) { - char *result = malloc (((unsigned) size)); + char *result = (char *) malloc (size); if (result == ((char *) NULL)) fatal ("virtual memory exhausted", (char *) 0); return result; diff -r 892ca416f0fb -r 9d177e8d4150 lisp/ChangeLog --- a/lisp/ChangeLog Mon Aug 13 11:30:00 2007 +0200 +++ b/lisp/ChangeLog Mon Aug 13 11:30:53 2007 +0200 @@ -1,3 +1,60 @@ +1999-12-24 Martin Buchholz + + * XEmacs 21.2.25 is released. + +1999-12-24 Yoshiki Hayashi + + * hyper-apropos.el (hyper-apropos): Toggle + hyper-apropos-programming-apropos correctly. + Set REGEXP when user accepts default value. + +1999-12-22 Yoshiki Hayashi + + * minibuf.el (read-from-minibuffer): Bind minibuffer-default. + (read-file-name-2): Use DEFAULT argument of read-from-minibuffer. + +1999-12-22 Yoshiki Hayashi + + * mule/mule-category.el (undefined-category-designator): + Return char instead of character. Search for undefined one. + (describe-category): Use with-displaying-help-buffer. + +1999-12-21 Martin Buchholz + + * byte-optimize.el (byte-optimize-plus): + Optimize (+ 1) to 1 instead of (1+ nil). + + * files.el (basic-save-buffer): Rewrite for clarity. Use (char-before). + + * byte-optimize.el (byte-compile-butlast): Remove. Use butlast instead. + + * byte-optimize.el (byte-optimize-char-before): New function. + Remove performance penalty for using (char-before) instead of (char-after). + +1999-12-20 Yoshiki Hayashi + + * mule/mule-category.el (char-category-list): Return character + instead of integer. + +1999-12-17 Yoshiki Hayashi + + * minibuf.el (read-buffer): Check default is buffer object. + +1999-11-25 Andy Piper + + * cus-edit.el (custom-buffer-create-buttons): Use native widgets + for buttons. + +1999-12-16 Andreas Jaeger + + * package-get.el (package-get-maybe-save-index): Fixed typo. + Patch by Jeff Miller . + +1999-12-13 Charles G Waldman + + * gnuserv.el (gnuserv-process-filter): don't call + gnuserv-write-to-client when gnuserv-current-client is nil + 1999-12-14 Martin Buchholz * XEmacs 21.2.24 is released. @@ -28,7 +85,7 @@ completing-read returns. (describe-variable): Ditto. -1999-11-16 Adrian Aichner +1999-11-16 Adrian Aichner * hyper-apropos.el (hyper-apropos-this-symbol): Handle `hyper-apropos-help-mode' here to find symbol to customize @@ -199,7 +256,7 @@ * files.el (recover-file): Don't use ls under windows for revert buffer. -1999-09-25 Adrian Aichner +1999-09-25 Adrian Aichner * package-get.el (package-get-download-menu): Make menu really toggle download sites. @@ -1935,7 +1992,7 @@ Installation.el needs to be loaded before `dump-paths', otherwise the dumping process won't find it. -1999-03-13 Adrian Aichner +1999-03-13 Adrian Aichner * dumped-lisp.el (preloaded-file-list): Load Installation.el after subr so that we can use `replace-in-string' in Installation.el to @@ -2133,7 +2190,7 @@ * x-faces.el (x-init-face-from-resources): Only set fonts in the 'x locale. -1999-03-04 Adrian Aichner +1999-03-04 Adrian Aichner * package-ui.el (pui-install-selected-packages): Don't throw on `package-admin-delete-binary-package' returning nil since it's @@ -2208,7 +2265,7 @@ * dumped-lisp.el (preloaded-file-list): Core mule files moved out of mule-base into lisp/mule. -1999-02-10 Adrian Aichner +1999-02-10 Adrian Aichner * process.el (exec-to-string): Use `shell-command-switch' in place of hard-wired "-c" (for WindowsNT). @@ -2264,7 +2321,7 @@ * about.el (about-url-alist): Update my entry. (xemacs-hackers): Ditto. -1999-01-14 Adrian Aichner +1999-01-14 Adrian Aichner * buffer.el (switch-to-buffer): Fixing documentation. * minibuf.el (minibuffer-completion-table): ditto. @@ -2653,7 +2710,7 @@ * subr.el (buffer-substring-no-properties): Comment out. -1998-11-07 Adrian Aichner +1998-11-07 Adrian Aichner * msw-faces.el (mswindows-find-smaller-font): Turning font names into font instances first, like `x-frob-font-size' does. @@ -3493,7 +3550,7 @@ * ldap.el (ldap-host-parameters-alist): New name of `ldap-host-parameters-plist' -1998-06-26 Adrian Aichner +1998-06-26 Adrian Aichner * package-get.el: Using (require 'package-get-base), now that it provides itself. Consequently removed all instances of (load @@ -3580,7 +3637,7 @@ (font-lock-match-c++-style-declaration-item-and-skip-to-next): Let declaration items contain non-word symbol characters. -1998-06-15 Adrian Aichner +1998-06-15 Adrian Aichner * package-get.el (package-get-package-provider): Added autoload cookie. Loading "package-get-base.el" in ALL functions that use @@ -4015,7 +4072,7 @@ * dumped-lisp.el (preloaded-file-list): Added msw-mouse.el -1998-05-17 Adrian Aichner +1998-05-17 Adrian Aichner * itimer.el (activate-itimer): Fixed usage of integers as argument to `concat'. diff -r 892ca416f0fb -r 9d177e8d4150 lisp/build-report.el --- a/lisp/build-report.el Mon Aug 13 11:30:00 2007 +0200 +++ b/lisp/build-report.el Mon Aug 13 11:30:53 2007 +0200 @@ -2,8 +2,8 @@ ;; Copyright (C) 1997 Adrian Aichner -;; Author: Adrian Aichner, Teradyne GmbH Munich -;; Date: Sun., Apr. 20, 1997. +;; Author: Adrian Aichner +;; Date: Sun., Apr. 20, 1997, 1998, 1999. ;; Version: 1.35 ;; Keywords: internal diff -r 892ca416f0fb -r 9d177e8d4150 lisp/byte-optimize.el --- a/lisp/byte-optimize.el Mon Aug 13 11:30:00 2007 +0200 +++ b/lisp/byte-optimize.el Mon Aug 13 11:30:53 2007 +0200 @@ -699,31 +699,27 @@ (setq form (byte-optimize-delay-constants-math form 1 '+)) (if (memq 0 form) (setq form (delq 0 (copy-sequence form)))) ;;(setq form (byte-optimize-associative-two-args-math form)) - (cond ((null (cdr form)) - (condition-case () - (eval form) - (error form))) + (case (length (cdr form)) + ((0) + (condition-case () + (eval form) + (error form))) - ;; `add1' and `sub1' are a marginally fewer instructions - ;; than `plus' and `minus', so use them when possible. - ((and (null (nthcdr 3 form)) - (eq (nth 2 form) 1)) - (list '1+ (nth 1 form))) ; (+ x 1) --> (1+ x) - ((and (null (nthcdr 3 form)) - (eq (nth 1 form) 1)) - (list '1+ (nth 2 form))) ; (+ 1 x) --> (1+ x) - ((and (null (nthcdr 3 form)) - (eq (nth 2 form) -1)) - (list '1- (nth 1 form))) ; (+ x -1) --> (1- x) - ((and (null (nthcdr 3 form)) - (eq (nth 1 form) -1)) - (list '1- (nth 2 form))) ; (+ -1 x) --> (1- x) + ;; `add1' and `sub1' are a marginally fewer instructions + ;; than `plus' and `minus', so use them when possible. + ((2) + (cond + ((eq (nth 1 form) 1) `(1+ ,(nth 2 form))) ; (+ 1 x) --> (1+ x) + ((eq (nth 2 form) 1) `(1+ ,(nth 1 form))) ; (+ x 1) --> (1+ x) + ((eq (nth 1 form) -1) `(1- ,(nth 2 form))) ; (+ -1 x) --> (1- x) + ((eq (nth 2 form) -1) `(1- ,(nth 1 form))) ; (+ x -1) --> (1- x) + (t form))) -;;; It is not safe to delete the function entirely -;;; (actually, it would be safe if we know the sole arg -;;; is not a marker). -;; ((null (cdr (cdr form))) (nth 1 form)) - (t form))) + ;; It is not safe to delete the function entirely + ;; (actually, it would be safe if we know the sole arg + ;; is not a marker). + ;; ((null (cdr (cdr form))) (nth 1 form)) + (t form))) (defun byte-optimize-minus (form) ;; Put constants at the end, except the last constant. @@ -784,9 +780,6 @@ (setcar form (list '+ (car form) (car form))))) (form)))))) -(defsubst byte-compile-butlast (form) - (nreverse (cdr (reverse form)))) - (defun byte-optimize-divide (form) (setq form (byte-optimize-delay-constants-math form 2 '*)) (let ((last (car (reverse (cdr (cdr form)))))) @@ -799,11 +792,11 @@ (error nil))) (setq form (list 'progn (/ (nth 1 form) last))))) ((= last 1) - (setq form (byte-compile-butlast form))) + (setq form (butlast form))) ((numberp (nth 1 form)) (setq form (cons (car form) (cons (/ (nth 1 form) last) - (byte-compile-butlast (cdr (cdr form))))) + (butlast (cdr (cdr form))))) last nil)))) (cond ;;; ((null (cdr (cdr form))) @@ -812,7 +805,7 @@ (append '(progn) (cdr (cdr form)) '(0))) ((eq last -1) (list '- (if (nthcdr 3 form) - (byte-compile-butlast form) + (butlast form) (nth 1 form)))) (form)))) @@ -1033,6 +1026,12 @@ (put 'if 'byte-optimizer 'byte-optimize-if) (put 'while 'byte-optimizer 'byte-optimize-while) +;; Remove any reason for avoiding `char-before'. +(defun byte-optimize-char-before (form) + `(char-after (1- ,(or (nth 1 form) '(point))) ,@(cdr (cdr form)))) + +(put 'char-before 'byte-optimizer 'byte-optimize-char-before) + ;; byte-compile-negation-optimizer lives in bytecomp.el ;(put '/= 'byte-optimizer 'byte-compile-negation-optimizer) (put 'atom 'byte-optimizer 'byte-compile-negation-optimizer) diff -r 892ca416f0fb -r 9d177e8d4150 lisp/cus-edit.el --- a/lisp/cus-edit.el Mon Aug 13 11:30:00 2007 +0200 +++ b/lisp/cus-edit.el Mon Aug 13 11:30:53 2007 +0200 @@ -1033,7 +1033,6 @@ (widget-insert "\nOperate on everything in this buffer:\n ") (widget-create 'push-button :tag "Set" - :tag-glyph '("set-up" "set-down") :help-echo "\ Make your editing in this buffer take effect for this session" :action (lambda (widget &optional event) @@ -1041,7 +1040,6 @@ (widget-insert " ") (widget-create 'push-button :tag "Save" - :tag-glyph '("save-up" "save-down") :help-echo "\ Make your editing in this buffer take effect for future Emacs sessions" :action (lambda (widget &optional event) @@ -1077,7 +1075,6 @@ (widget-insert " ") (widget-create 'push-button :tag "Done" - :tag-glyph '("done-up" "done-down") :help-echo "Remove the buffer" :action (lambda (widget &optional event) (Custom-buffer-done))) diff -r 892ca416f0fb -r 9d177e8d4150 lisp/files.el --- a/lisp/files.el Mon Aug 13 11:30:00 2007 +0200 +++ b/lisp/files.el Mon Aug 13 11:30:53 2007 +0200 @@ -2213,19 +2213,21 @@ (error "Save not confirmed")) (save-restriction (widen) - (and (> (point-max) 1) - (/= (char-after (1- (point-max))) ?\n) - (not (and (eq selective-display t) - (= (char-after (1- (point-max))) ?\r))) - (or (eq require-final-newline t) - (and require-final-newline - (y-or-n-p - (format "Buffer %s does not end in newline. Add one? " - (buffer-name))))) - (save-excursion - (goto-char (point-max)) - (insert ?\n))) - ;; + + ;; Add final newline if required. See `require-final-newline'. + (when (and (not (eq (char-before (point-max)) ?\n)) ; common case + (char-before (point-max)) ; empty buffer? + (not (and (eq selective-display t) + (eq (char-before (point-max)) ?\r))) + (or (eq require-final-newline t) + (and require-final-newline + (y-or-n-p + (format "Buffer %s does not end in newline. Add one? " + (buffer-name)))))) + (save-excursion + (goto-char (point-max)) + (insert ?\n))) + ;; Run the write-file-hooks until one returns non-null. ;; Bind after-save-hook to nil while running the ;; write-file-hooks so that if this function is called diff -r 892ca416f0fb -r 9d177e8d4150 lisp/gnuserv.el --- a/lisp/gnuserv.el Mon Aug 13 11:30:00 2007 +0200 +++ b/lisp/gnuserv.el Mon Aug 13 11:30:53 2007 +0200 @@ -348,11 +348,13 @@ ;; In case of an error, write the description to the ;; client, and then signal it. (error (setq gnuserv-string "") - (gnuserv-write-to-client gnuserv-current-client oops) + (when gnuserv-current-client + (gnuserv-write-to-client gnuserv-current-client oops)) (setq gnuserv-current-client nil) (signal (car oops) (cdr oops))) (quit (setq gnuserv-string "") - (gnuserv-write-to-client gnuserv-current-client oops) + (when gnuserv-current-client + (gnuserv-write-to-client gnuserv-current-client oops)) (setq gnuserv-current-client nil) (signal 'quit nil))) (setq gnuserv-string ""))) diff -r 892ca416f0fb -r 9d177e8d4150 lisp/hyper-apropos.el --- a/lisp/hyper-apropos.el Mon Aug 13 11:30:00 2007 +0200 +++ b/lisp/hyper-apropos.el Mon Aug 13 11:30:53 2007 +0200 @@ -243,16 +243,22 @@ (setq hyper-apropos-prev-wconfig (current-window-configuration))) (if (string= "" regexp) (if (get-buffer hyper-apropos-apropos-buf) - (if toggle-apropos - (hyper-apropos-toggle-programming-flag) - (message "Using last search results")) + (progn + (setq regexp hyper-apropos-last-regexp) + (if toggle-apropos + (hyper-apropos-toggle-programming-flag) + (message "Using last search results"))) (error "Be more specific...")) (set-buffer (get-buffer-create hyper-apropos-apropos-buf)) (setq buffer-read-only nil) (erase-buffer) (if toggle-apropos - (set (make-local-variable 'hyper-apropos-programming-apropos) - (not (default-value 'hyper-apropos-programming-apropos)))) + (if (local-variable-p 'hyper-apropos-programming-apropos + (current-buffer)) + (setq hyper-apropos-programming-apropos + (not hyper-apropos-programming-apropos)) + (set (make-local-variable 'hyper-apropos-programming-apropos) + (not (default-value 'hyper-apropos-programming-apropos))))) (let ((flist (apropos-internal regexp (if hyper-apropos-programming-apropos #'fboundp diff -r 892ca416f0fb -r 9d177e8d4150 lisp/minibuf.el --- a/lisp/minibuf.el Mon Aug 13 11:30:00 2007 +0200 +++ b/lisp/minibuf.el Mon Aug 13 11:30:53 2007 +0200 @@ -415,7 +415,8 @@ ;; `M-x doctor' makes history a local variable, and thus ;; our binding above is buffer-local and doesn't apply ;; once we switch buffers!!!! We demand better scope! - (_history_ history)) + (_history_ history) + (minibuffer-default default)) (unwind-protect (progn (set-buffer (reset-buffer buffer)) @@ -1445,7 +1446,9 @@ (while (progn (setq result (completing-read prompt alist nil require-match nil 'buffer-history - (if default (buffer-name default)))) + (if (bufferp default) + (buffer-name default) + default))) (cond ((not (equal result "")) nil) ((not require-match) @@ -1548,8 +1551,9 @@ read-file-name-map read-file-name-must-match-map) nil - history)) - )) + history + nil + default)))) ;;; ;; Kludge! Put "/foo/bar" on history rather than "/default//foo/bar" ;;; (let ((hist (cond ((not history) 'minibuffer-history) ;;; ((consp history) (car history)) diff -r 892ca416f0fb -r 9d177e8d4150 lisp/mule/mule-category.el --- a/lisp/mule/mule-category.el Mon Aug 13 11:30:00 2007 +0200 +++ b/lisp/mule/mule-category.el Mon Aug 13 11:30:53 2007 +0200 @@ -69,8 +69,8 @@ "Return an undefined category designator, or nil if there are none." (let ((a 32) found) (while (and (< a 127) (not found)) - (if (gethash a defined-category-hashtable) - (setq found a)) + (unless (gethash a defined-category-hashtable) + (setq found (make-char 'ascii a))) (setq a (1+ a))) found)) @@ -117,7 +117,7 @@ (let ((a 32) list) (while (< a 127) (if (= 1 (aref vec (- a 32))) - (setq list (cons a list))) + (setq list (cons (make-char 'ascii a) list))) (setq a (1+ a))) (nreverse list))))) @@ -137,8 +137,9 @@ "Describe the category specifications in the category table. The descriptions are inserted in a buffer, which is then displayed." (interactive) - (with-output-to-temp-buffer "*Help*" - (describe-category-table (category-table) standard-output))) + (with-displaying-help-buffer + (lambda () + (describe-category-table (category-table) standard-output)))) (defun describe-category-table (table stream) (let (first-char diff -r 892ca416f0fb -r 9d177e8d4150 lisp/package-get.el --- a/lisp/package-get.el Mon Aug 13 11:30:00 2007 +0200 +++ b/lisp/package-get.el Mon Aug 13 11:30:53 2007 +0200 @@ -371,7 +371,7 @@ (md5 (current-buffer))))) (unless (and location (file-writable-p location)) (setq location package-get-user-index-filename)) - (when (y-or-n-p (concat "Update package index in" location "? ")) + (when (y-or-n-p (concat "Update package index in " location "? ")) (write-file location)))))) diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/ChangeLog --- a/lwlib/ChangeLog Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/ChangeLog Mon Aug 13 11:30:53 2007 +0200 @@ -1,3 +1,39 @@ +1999-12-24 Martin Buchholz + + * XEmacs 21.2.25 is released. + +1999-12-23 Andy Piper + + * lwlib.c (lw_copy_widget_value_args): don't create empty + widget_args just because someone might use them later. This makes + all widgets look like they've changed. + +1999-12-22 Andy Piper + + * xlwtabs.c: Fix for X11R5 from Damon Lipparelli + . + +1999-12-21 Martin Buchholz + + * xlwscrollbar.c (seg_pixel_sizes): ((expr)) ==> (expr) + +1999-12-12 Daniel Pittman + + * lwlib-Xaw.c: + * xlwcheckbox.c: + * xlwgauge.h: + * xlwgaugeP.h: + * xlwradio.c: + * xlwradio.h: + * xlwradioP.h: + Clean up Athena widget support: + - Athena headers now use dynamic include paths. + +1999-12-08 Andy Piper + + * xlwtabs.c: sync with Tabs 2.2. + * xlwtabP.h: ditto. + 1999-12-14 Martin Buchholz * XEmacs 21.2.24 is released. diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/config.h.in --- a/lwlib/config.h.in Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/config.h.in Mon Aug 13 11:30:53 2007 +0200 @@ -29,4 +29,12 @@ #undef NEED_ATHENA #undef NEED_LUCID +/* The path to the Athena widgets - the usual value is `X11/Xaw' */ +#undef ATHENA_H_PATH + +/* For use in #include statements. This extra level of macro indirection + is necessary because you can't use macros directly within <> or "" */ +#define ATHENA_INCLUDE(header_file) + + #endif /* _LWLIB_CONFIG_H_ */ diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/lwlib-Xaw.c --- a/lwlib/lwlib-Xaw.c Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/lwlib-Xaw.c Mon Aug 13 11:30:53 2007 +0200 @@ -33,21 +33,21 @@ #include #ifdef LWLIB_SCROLLBARS_ATHENA -#include +#include ATHENA_INCLUDE(Scrollbar.h) #endif #ifdef LWLIB_DIALOGS_ATHENA -#include -#include -#include -#include +#include ATHENA_INCLUDE(Dialog.h) +#include ATHENA_INCLUDE(Form.h) +#include ATHENA_INCLUDE(Command.h) +#include ATHENA_INCLUDE(Label.h) #endif #ifdef LWLIB_WIDGETS_ATHENA -#include +#include ATHENA_INCLUDE(Toggle.h) #include "xlwradio.h" #include "xlwcheckbox.h" #include "xlwgauge.h" #ifndef NEED_MOTIF -#include +#include ATHENA_INCLUDE(AsciiText.h) #endif #endif #include @@ -126,8 +126,8 @@ xaw_update_one_widget (widget_instance *instance, Widget widget, widget_value *val, Boolean deep_p) { - if (val->nargs) - XtSetValues (widget, val->args, val->nargs); + if (val->args && val->args->nargs) + XtSetValues (widget, val->args->args, val->args->nargs); if (0) ; @@ -146,7 +146,7 @@ } #endif /* LWLIB_DIALOGS_ATHENA */ #ifdef LWLIB_WIDGETS_ATHENA - else if (XtClass (widget) == labelWidgetClass) + else if (XtIsSubclass (widget, labelWidgetClass)) { Arg al [1]; XtSetArg (al [0], XtNlabel, val->value); diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/lwlib.c --- a/lwlib/lwlib.c Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/lwlib.c Mon Aug 13 11:30:53 2007 +0200 @@ -40,6 +40,9 @@ #endif #ifdef NEED_MOTIF #include "lwlib-Xm.h" +#ifdef LWLIB_WIDGETS_MOTIF +#include +#endif #endif #ifdef NEED_ATHENA #include "lwlib-Xaw.h" @@ -67,8 +70,8 @@ /* Forward declarations */ -static void -instantiate_widget_instance (widget_instance *instance); +static void instantiate_widget_instance (widget_instance *instance); +static void free_widget_value_args (widget_value* wv); /* utility functions for widget_instance and widget_info */ @@ -153,14 +156,9 @@ free_widget_value_tree (wv->contents); wv->contents = (widget_value *) 0xDEADBEEF; } - if (wv->args && wv->nargs) - { - if (wv->free_args) - free (wv->args); - wv->args = (ArgList) 0xDEADBEEF; - wv->nargs = 0; - wv->free_args = 0; - } + + free_widget_value_args (wv); + if (wv->next) { free_widget_value_tree (wv->next); @@ -237,6 +235,41 @@ #endif /* NEED_SCROLLBARS */ +#ifdef HAVE_WIDGETS +/* + * Return true if old->args was not equivalent + * to new->args. + */ +static Boolean +merge_widget_value_args (widget_value *old, widget_value *new) +{ + Boolean changed = False; + + if (new->args && !old->args) + { + lw_copy_widget_value_args (new, old); + changed = True; + } + /* Generally we don't want to lose values that are already in the + widget. */ + else if (!new->args && old->args) + { + lw_copy_widget_value_args (old, new); + changed = True; + } + else if (new->args && old->args) + { + /* #### Do something more sensible here than just copying the + new values (like actually merging the values). */ + free_widget_value_args (old); + lw_copy_widget_value_args (new, old); + changed = True; + } + + return changed; +} +#endif /* HAVE_WIDGETS */ + /* Make a complete copy of a widget_value tree. Store CHANGE into the widget_value tree's `change' field. */ @@ -269,13 +302,8 @@ copy->next = copy_widget_value_tree (val->next, change); copy->toolkit_data = NULL; copy->free_toolkit_data = False; - if (val->nargs) - { - copy->args = (ArgList)malloc (sizeof (Arg) * val->nargs); - memcpy (copy->args, val->args, sizeof(Arg) * val->nargs); - copy->nargs = val->nargs; - copy->free_args = True; - } + + lw_copy_widget_value_args (val, copy); #ifdef NEED_SCROLLBARS copy_scrollbar_values (val, copy); #endif @@ -590,6 +618,14 @@ change = max (change, INVISIBLE_CHANGE); val1->call_data = val2->call_data; } +#ifdef HAVE_WIDGETS + if (merge_widget_value_args (val1, val2)) + { + EXPLAIN (val1->name, change, VISIBLE_CHANGE, "widget change", 0, 0); + change = max (change, VISIBLE_CHANGE); + } +#endif + #ifdef NEED_SCROLLBARS if (merge_scrollbar_values (val1, val2)) { @@ -1317,13 +1353,67 @@ void lw_add_value_args_to_args (widget_value* wv, ArgList addto, int* offset) { int i; - if (wv->nargs && wv->args) + if (wv->args && wv->args->nargs) { - for (i = 0; inargs; i++) + for (i = 0; iargs->nargs; i++) { - addto[i + *offset] = wv->args[i]; + addto[i + *offset] = wv->args->args[i]; } - *offset += wv->nargs; + *offset += wv->args->nargs; } } +void lw_add_widget_value_arg (widget_value* wv, String name, XtArgVal value) +{ + if (!wv->args) + { + wv->args = (widget_args *) malloc (sizeof (widget_args)); + memset (wv->args, 0, sizeof (widget_args)); + wv->args->ref_count = 1; + wv->args->nargs = 0; + wv->args->args = (ArgList) malloc (sizeof (Arg) * 10); + memset (wv->args->args, 0, sizeof (Arg) * 10); + } + + if (wv->args->nargs > 10) + return; + + XtSetArg (wv->args->args [wv->args->nargs], name, value); wv->args->nargs++; +} + +static void free_widget_value_args (widget_value* wv) +{ + if (wv->args) + { + if (--wv->args->ref_count <= 0) + { +#ifdef LWLIB_WIDGETS_MOTIF + int i; + for (i = 0; i < wv->args->nargs; i++) + { + if (!strcmp (wv->args->args[i].name, XmNfontList)) + XmFontListFree ((XmFontList)wv->args->args[i].value); + } +#endif + free (wv->args->args); + free (wv->args); + wv->args = (widget_args*)0xDEADBEEF; + } + } +} + +void lw_copy_widget_value_args (widget_value* val, widget_value* copy) +{ + if (!val->args) + { + if (copy->args) + free_widget_value_args (copy); + copy->args = 0; + } + else + { + copy->args = val->args; + copy->args->ref_count++; + } +} + diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/lwlib.h --- a/lwlib/lwlib.h Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/lwlib.h Mon Aug 13 11:30:53 2007 +0200 @@ -106,6 +106,17 @@ int scrollbar_x, scrollbar_y; } scrollbar_values; +typedef struct _widget_args +{ + /* some things are only possible at creation time. args are applied + to widgets at creation time. */ + ArgList args; + int nargs; + /* Copying args is impossible so we make the caller give us heap allocated + args and free them when on-one wants them any more. */ + int ref_count; +} widget_args; + typedef struct _widget_value { /* This slot is only partially utilized right now. */ @@ -147,15 +158,12 @@ /* data defining a scrollbar; only valid if type == "scrollbar" */ scrollbar_values *scrollbar_data; + /* A reference counted arg structure. */ + struct _widget_args *args; /* we resource the widget_value structures; this points to the next one on the free list if this one has been deallocated. */ struct _widget_value *free_list; - /* some things are only possible at creation time. args are applied - to widgets at creation time. */ - ArgList args; - int nargs; - Boolean free_args; } widget_value; @@ -211,6 +219,8 @@ void lw_pop_up_all_widgets (LWLIB_ID id); void lw_pop_down_all_widgets (LWLIB_ID id); void lw_add_value_args_to_args (widget_value* wv, ArgList addto, int* offset); +void lw_add_widget_value_arg (widget_value* wv, String name, XtArgVal value); +void lw_copy_widget_value_args (widget_value* copy, widget_value* val); widget_value *malloc_widget_value (void); void free_widget_value (widget_value *); diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/xlwcheckbox.c --- a/lwlib/xlwcheckbox.c Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/xlwcheckbox.c Mon Aug 13 11:30:53 2007 +0200 @@ -38,7 +38,7 @@ #include #include -#include +#include ATHENA_INCLUDE(XawInit.h) #include "../src/xmu.h" #include "xlwcheckboxP.h" diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/xlwgauge.c --- a/lwlib/xlwgauge.c Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/xlwgauge.c Mon Aug 13 11:30:53 2007 +0200 @@ -52,7 +52,7 @@ #include #include #include -#include +#include ATHENA_INCLUDE(XawInit.h) #include "xlwgaugeP.h" #include "../src/xmu.h" #ifdef HAVE_XMU diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/xlwgauge.h --- a/lwlib/xlwgauge.h Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/xlwgauge.h Mon Aug 13 11:30:53 2007 +0200 @@ -42,7 +42,7 @@ * ***********************************************************************/ -#include +#include ATHENA_INCLUDE(Label.h) /* Resources: diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/xlwgaugeP.h --- a/lwlib/xlwgaugeP.h Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/xlwgaugeP.h Mon Aug 13 11:30:53 2007 +0200 @@ -40,7 +40,7 @@ ***********************************************************************/ #include "xlwgauge.h" -#include +#include ATHENA_INCLUDE(LabelP.h) /* New fields for the Gauge widget class record */ diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/xlwradio.c --- a/lwlib/xlwradio.c Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/xlwradio.c Mon Aug 13 11:30:53 2007 +0200 @@ -53,7 +53,7 @@ #include #include -#include +#include ATHENA_INCLUDE(XawInit.h) #include "../src/xmu.h" #include "xlwradioP.h" diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/xlwradio.h --- a/lwlib/xlwradio.h Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/xlwradio.h Mon Aug 13 11:30:53 2007 +0200 @@ -42,7 +42,7 @@ * ***********************************************************************/ -#include +#include ATHENA_INCLUDE(Toggle.h) /* Resources: diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/xlwradioP.h --- a/lwlib/xlwradioP.h Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/xlwradioP.h Mon Aug 13 11:30:53 2007 +0200 @@ -32,7 +32,7 @@ #define _XawRadioP_h #include "xlwradio.h" -#include +#include ATHENA_INCLUDE(ToggleP.h) /*********************************************************************** * diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/xlwscrollbar.c --- a/lwlib/xlwscrollbar.c Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/xlwscrollbar.c Mon Aug 13 11:30:53 2007 +0200 @@ -979,7 +979,7 @@ if (ss < SS_MIN) { /* add a percent amount for integer rounding */ - float tmp = ((((float) (SS_MIN - ss) * (float) value)) / total) + 0.5; + float tmp = (((float) (SS_MIN - ss) * (float) value) / total) + 0.5; above -= (int) tmp; ss = SS_MIN; diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/xlwtabs.c --- a/lwlib/xlwtabs.c Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/xlwtabs.c Mon Aug 13 11:30:53 2007 +0200 @@ -18,7 +18,7 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* Synched up with: Tabs.c 1.25 */ + /* Synched up with: Tabs.c 1.27 */ /* * Tabs.c - Index Tabs composite widget @@ -51,8 +51,8 @@ * the frame. */ -/* TODO: min child height = tab height - * +/* + * TODO: min child height = tab height */ #include @@ -189,6 +189,7 @@ static void TabsDestroy(); static void TabsRealize(); static Boolean TabsSetValues(); +static Boolean TabsAcceptFocus(); static XtGeometryResult TabsQueryGeometry(); static XtGeometryResult TabsGeometryManager(); static void TabsChangeManaged(); @@ -237,6 +238,7 @@ static void TabsResize( Widget w) ; static void TabsExpose( Widget w, XEvent *event, Region region) ; static Boolean TabsSetValues(Widget, Widget, Widget, ArgList, Cardinal *) ; +static Boolean TabsAcceptFocus(Widget, Time *); static Boolean TabsConstraintSetValues(Widget, Widget, Widget, ArgList, Cardinal *) ; static XtGeometryResult TabsQueryGeometry(Widget, @@ -263,7 +265,7 @@ static int TabLayout( TabsWidget, int wid, int hgt, Dimension *r_hgt, Bool query_only) ; static void GetPreferredSizes(TabsWidget) ; -static void MaxChild(TabsWidget) ; +static void MaxChild(TabsWidget, Widget except, Dimension, Dimension) ; static void TabsShuffleRows( TabsWidget tw) ; static int PreferredSize( TabsWidget, Dimension *reply_width, Dimension *reply_height, @@ -325,9 +327,13 @@ /* num_resources */ XtNumber(resources), /* xrm_class */ NULLQUARK, /* compress_motion */ TRUE, - /* compress_exposure */ TRUE, +#if XtSpecificationRelease < 6 + /* compress_exposure */ XtExposeCompressMaximal, +#else + /* compress_exposure */ XtExposeCompressMaximal|XtExposeNoRegion, +#endif /* compress_enterleave*/ TRUE, - /* visible_interest */ FALSE, + /* visible_interest */ TRUE, /* destroy */ TabsDestroy, /* resize */ TabsResize, /* expose */ TabsExpose, @@ -335,7 +341,7 @@ /* set_values_hook */ NULL, /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, - /* accept_focus */ NULL, + /* accept_focus */ TabsAcceptFocus, /* version */ XtVersion, /* callback_private */ NULL, /* tm_table */ defaultTranslations, @@ -460,7 +466,7 @@ newTw->tabs.grey50 = None ; newTw->tabs.needs_layout = False ; - + newTw->tabs.hilight = NULL ; #ifdef NEED_MOTIF @@ -480,7 +486,6 @@ { TabsConstraints tab = (TabsConstraints) new->core.constraints ; tab->tabs.greyAlloc = False ; /* defer allocation of pixel */ - tab->tabs.queried = False ; /* defer size query */ getBitmapInfo((TabsWidget)XtParent(new), tab) ; TabWidth(new) ; @@ -539,6 +544,8 @@ * to the bottom row. */ + tw->tabs.needs_layout = False ; + if( num_children > 0 && tw->composite.children != NULL ) { /* Loop through the tabs and assign rows & x positions */ @@ -554,28 +561,27 @@ tw->tabs.child_width = cw = tw->core.width - 2 * SHADWID ; tw->tabs.child_height = ch = - tw->core.height - tw->tabs.tab_total - 2 * SHADWID ; + tw->core.height - tw->tabs.tab_total - 2 * SHADWID ; for(i=0, childP=tw->composite.children; - i < num_children; + i < num_children; ++i, ++childP) if( XtIsManaged(*childP) ) { tab = (TabsConstraints) (*childP)->core.constraints ; - bw = tab->tabs.bwid ; + bw = (*childP)->core.border_width ; XtConfigureWidget(*childP, SHADWID,tw->tabs.tab_total+SHADWID, cw-bw*2,ch-bw*2, bw) ; } - if( XtIsRealized(w) ) - { - XClearWindow(XtDisplay((Widget)tw), XtWindow((Widget)tw)) ; - tw->tabs.needs_layout = False ; - XtClass(tw)->core_class.expose((Widget)tw,NULL,None) ; - } + if( XtIsRealized(w) ) { + XClearWindow(XtDisplay((Widget)tw), XtWindow((Widget)tw)) ; + /* should not be necessary to explicitly repaint after a + * resize, but XEmacs folks tell me it is. + */ + XtClass(tw)->core_class.expose((Widget)tw,NULL,None) ; + } } - - tw->tabs.needs_layout = False ; } /* Resize */ @@ -731,6 +737,22 @@ } +static Boolean +TabsAcceptFocus(Widget w, Time *t) +{ + if( !w->core.being_destroyed && XtIsRealized(w) && + XtIsSensitive(w) && XtIsManaged(w) && w->core.visible ) + { + Widget p ; + for(p = XtParent(w); !XtIsShell(p); p = XtParent(p)) ; + XtSetKeyboardFocus(p,w) ; + return True ; + } + else + return False ; +} + + /* * Return preferred size. Happily accept anything >= our preferred size. @@ -752,11 +774,9 @@ (!(mode & CWHeight) || intended->height == w->core.height) ) return XtGeometryNo ; -#ifdef COMMENT if( (!(mode & CWWidth) || intended->width >= preferred->width) && (!(mode & CWHeight) || intended->height >= preferred->height) ) return XtGeometryYes; -#endif /* COMMENT */ return XtGeometryAlmost; } @@ -774,6 +794,7 @@ Dimension s = SHADWID ; TabsConstraints tab = (TabsConstraints)w->core.constraints; XtGeometryResult result ; + Dimension rw, rh ; /* Position request always denied */ @@ -795,11 +816,11 @@ req->border_width == w->core.border_width ) return XtGeometryNo ; - /* updated cached preferred size of the child */ - tab->tabs.bwid = req->border_width ; - tab->tabs.wid = req->width + req->border_width * 2 ; - tab->tabs.hgt = req->height + req->border_width * 2 ; - MaxChild(tw) ; + rw = req->width + 2 * req->border_width ; + rh = req->height + 2 * req->border_width ; + + /* find out how big the children want to be now */ + MaxChild(tw, w, rw, rh) ; /* Size changes must see if the new size can be accommodated. @@ -807,7 +828,9 @@ * size. A request to shrink will be accepted only if the * new size is still big enough for all other children. A * request to shrink that is not big enough for all children - * returns an "almost" response with the new proposed size. + * returns an "almost" response with the new proposed size + * or a "no" response if unable to shrink at all. + * * A request to grow will be accepted only if the Tabs parent can * grow to accommodate. * @@ -819,24 +842,19 @@ if (req->request_mode & (CWWidth | CWHeight | CWBorderWidth)) { - Dimension rw,rh ; /* child's requested width, height */ Dimension cw,ch ; /* children's preferred size */ Dimension aw,ah ; /* available size we can give child */ Dimension th ; /* space used by tabs */ Dimension wid,hgt ; /* Tabs widget size */ - rw = cw = tab->tabs.wid ; - rh = ch = tab->tabs.hgt ; - - /* find out what the resulting preferred size would be */ + cw = tw->tabs.max_cw ; + ch = tw->tabs.max_ch ; -#ifdef COMMENT - MaxChild(tw, &cw, &ch) ; -#endif /* COMMENT */ - PreferredSize2(tw, - cw=tw->tabs.max_cw, ch=tw->tabs.max_ch, &wid, &hgt) ; + /* find out what *my* resulting preferred size would be */ - /* Ask to be resized to accommodate. */ + PreferredSize2(tw, cw, ch, &wid, &hgt) ; + + /* Would my size change? If so, ask to be resized. */ if( wid != tw->core.width || hgt != tw->core.height ) { @@ -856,7 +874,7 @@ result = XtMakeGeometryRequest((Widget)tw, &myrequest, &myreply) ; - /* !$@# Box widget changes the core size even if QueryOnly + /* !$@# Athena Box widget changes the core size even if QueryOnly * is set. I'm convinced this is a bug. At any rate, to work * around the bug, we need to restore the core size after every * query geometry request. This is only partly effective, @@ -874,6 +892,7 @@ switch( result ) { case XtGeometryYes: case XtGeometryDone: + tw->tabs.needs_layout = True ; break ; case XtGeometryNo: @@ -884,6 +903,8 @@ case XtGeometryAlmost: wid = myreply.width ; hgt = myreply.height ; + tw->tabs.needs_layout = True ; + break ; } } @@ -995,9 +1016,6 @@ if( tw->tabs.topWidget != NULL ) XtVaSetValues(tw->tabs.topWidget, XmNtraversalOn, True, 0) ; #endif - - - } @@ -1224,15 +1242,15 @@ if( !XtIsSubclass(w->core.parent, tabsWidgetClass) ) { - char line[1024] ; - sprintf(line, "XawTabsSetTop: widget \"%s\" is not the child of a tabs widget.", XtName(w)) ; + char line[256] ; + sprintf(line, "XawTabsSetTop: widget \"%.64s\" is not the child of a tabs widget.", XtName(w)) ; XtAppWarning(XtWidgetToApplicationContext(w), line) ; return ; } if( callCallbacks ) XtCallCallbackList(w, tw->tabs.popdownCallbacks, - (XtPointer)tw->tabs.topWidget) ; + (XtPointer)tw->tabs.topWidget) ; if( !XtIsRealized(w) ) { tw->tabs.topWidget = w ; @@ -1437,11 +1455,11 @@ { if( tab->tabs.lbm_depth == 1 ) XCopyPlane(dpy, tab->tabs.left_bitmap, win,gc, - 0,0, tab->tabs.lbm_width, tab->tabs.lbm_height, + 0,0, tab->tabs.lbm_width, tab->tabs.lbm_height, x+tab->tabs.lbm_x, y+tab->tabs.lbm_y, 1L) ; else XCopyArea(dpy, tab->tabs.left_bitmap, win,gc, - 0,0, tab->tabs.lbm_width, tab->tabs.lbm_height, + 0,0, tab->tabs.lbm_width, tab->tabs.lbm_height, x+tab->tabs.lbm_x, y+tab->tabs.lbm_y) ; } @@ -1600,8 +1618,27 @@ /* GEOMETRY UTILITIES */ + /* Overview: + * + * MaxChild(): ask all children (except possibly one) their + * preferred sizes, set max_cw, max_ch accordingly. + * + * GetPreferredSizes(): ask all children their preferred sizes, + * set max_cw, max_ch accordingly. + * + * PreferredSize(): given max_cw, max_ch, return tabs widget + * preferred size. Iterate with other widths in order to get + * a reasonable aspect ratio. + * + * PreferredSize2(): Given child dimensions, return Tabs + * widget dimensions. + * + * PreferredSize3(): Same, except given child dimensions plus + * shadow. + */ - /* Compute the size of one child's tab. Positions will be computed + + /* Compute the width of one child's tab. Positions will be computed * elsewhere. * * height: font height + vertical_space*2 + shadowWid*2 @@ -1634,7 +1671,7 @@ { tab->tabs.width += XTextWidth( font, lbl, (int)strlen(lbl) ) + iw ; tab->tabs.l_y = (tw->tabs.tab_height + - tw->tabs.font->max_bounds.ascent - + tw->tabs.font->max_bounds.ascent - tw->tabs.font->max_bounds.descent)/2 ; } } @@ -1731,59 +1768,34 @@ /* Find max preferred child size. Returned sizes include child - * border widths. We only ever ask a child its preferred - * size once. After that, the preferred size is updated only - * if the child makes a geometry request. + * border widths. */ static void GetPreferredSizes(TabsWidget tw) { - int i ; - Widget *childP = tw->composite.children ; - XtWidgetGeometry preferred ; - TabsConstraints tab ; - Dimension cw = 0, ch = 0 ; - - for(i=tw->tabs.displayChildren; --i >= 0; ++childP) - if( XtIsManaged(*childP) ) - { - tab = (TabsConstraints) (*childP)->core.constraints ; - if( !tab->tabs.queried ) { - (void) XtQueryGeometry(*childP, NULL, &preferred) ; - tab->tabs.bwid = preferred.border_width ; - tab->tabs.wid = preferred.width + preferred.border_width * 2 ; - tab->tabs.hgt = preferred.height + preferred.border_width * 2 ; - tab->tabs.queried = True ; - } - cw = Max(cw, tab->tabs.wid ) ; - ch = Max(ch, tab->tabs.hgt ) ; - } - tw->tabs.max_cw = cw ; - tw->tabs.max_ch = ch ; + MaxChild(tw, NULL, 0,0) ; } /* Find max preferred child size. Returned sizes include child - * border widths. */ + * border widths. If except is non-null, don't ask that one. + */ static void -MaxChild(TabsWidget tw) +MaxChild(TabsWidget tw, Widget except, Dimension cw, Dimension ch) { - Dimension cw,ch ; /* child width, height */ - int i ; - Widget *childP = tw->composite.children ; - TabsConstraints tab ; - - cw = ch = 0 ; + int i ; + Widget *childP = tw->composite.children ; + XtWidgetGeometry preferred ; for(i=tw->composite.num_children; --i >=0; ++childP) - if( XtIsManaged(*childP) ) + if( XtIsManaged(*childP) && *childP != except ) { - tab = (TabsConstraints) (*childP)->core.constraints ; - cw = Max(cw, tab->tabs.wid ) ; - ch = Max(ch, tab->tabs.hgt ) ; + (void) XtQueryGeometry(*childP, NULL, &preferred) ; + cw = Max(cw, preferred.width + preferred.border_width * 2 ) ; + ch = Max(ch, preferred.height + preferred.border_width * 2 ) ; } tw->tabs.max_cw = cw ; @@ -1845,10 +1857,12 @@ } - /* find preferred size. Ask children, find size of largest, + /* Find preferred size. Ask children, find size of largest, * add room for tabs & return. This can get a little involved, * as we don't want to have too many rows of tabs; we may widen * the widget to reduce # of rows. + * + * This function requires that max_cw, max_ch already be set. */ static int @@ -1864,12 +1878,6 @@ Dimension rwid,rhgt ; int nrow ; - - /* find max desired child height */ -#ifdef COMMENT - MaxChild(tw, &cw, &ch) ; -#endif /* COMMENT */ - wid = cw = tw->tabs.max_cw ; hgt = ch = tw->tabs.max_ch ; @@ -1883,6 +1891,7 @@ if( nrow > 2 && rhgt > rwid ) { Dimension w0, w1 ; + int maxloop = 20 ; /* step 1: start doubling size until it's too big */ do { @@ -1895,7 +1904,7 @@ /* step 2: use Newton's method to find ideal size. Stop within * 8 pixels. */ - while( w1 > w0 + 8 ) + while( --maxloop > 0 && w1 > w0 + 8 ) { wid = (w0+w1)/2 ; nrow = PreferredSize2(tw, wid,hgt, &rwid,&rhgt) ; @@ -2013,7 +2022,7 @@ if( tab->tabs.left_bitmap == None || !XGetGeometry(XtDisplay(tw), tab->tabs.left_bitmap, &root, &x, &y, - &tab->tabs.lbm_width, &tab->tabs.lbm_height, + &tab->tabs.lbm_width, &tab->tabs.lbm_height, &bw, &tab->tabs.lbm_depth) ) tab->tabs.lbm_width = tab->tabs.lbm_height = 0 ; } diff -r 892ca416f0fb -r 9d177e8d4150 lwlib/xlwtabsP.h --- a/lwlib/xlwtabsP.h Mon Aug 13 11:30:00 2007 +0200 +++ b/lwlib/xlwtabsP.h Mon Aug 13 11:30:53 2007 +0200 @@ -18,7 +18,7 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Synched up with: TabsP.h 1.7 */ +/* Synched up with: TabsP.h 1.8 */ /* * TabsP.h - Private definitions for Index Tabs widget @@ -132,9 +132,6 @@ Dimension width ; /* tab width */ Position x,y ; /* tab base position */ short row ; /* tab row */ - Dimension wid,hgt ; /* desired size */ - Dimension bwid ; /* desired border width */ - Boolean queried ; /* we've asked child it's pref. size */ Position l_x, l_y ; /* label position */ Position lbm_x, lbm_y ; /* bitmap position */ unsigned int lbm_width, lbm_height, lbm_depth ; diff -r 892ca416f0fb -r 9d177e8d4150 man/ChangeLog --- a/man/ChangeLog Mon Aug 13 11:30:00 2007 +0200 +++ b/man/ChangeLog Mon Aug 13 11:30:53 2007 +0200 @@ -1,3 +1,25 @@ +1999-12-24 Martin Buchholz + + * XEmacs 21.2.25 is released. + +1999-12-21 Martin Buchholz + + * lispref/text.texi (Near Point): Document `char-before'. + +1999-12-20 Adrian Aichner + + * widget.texi: Fix typos and possessive singular errors. Break + long sentences for readability. Remove some redundant commas. + +1999-12-18 Martin Buchholz + + * lispref/functions.texi (Mapping Functions): + Warn about mapping functions modifying their sequences. + +1999-12-15 Sandra Wambold + + * xemacs-faq.texi: link to matlab.el added; misc. address changes + 1999-12-14 Martin Buchholz * XEmacs 21.2.24 is released. @@ -116,7 +138,7 @@ * xemacs-faq.texi (Q5.0.6): Describe `shell-multiple-shells' -1999-08-01 Adrian Aichner +1999-08-01 Adrian Aichner * xemacs/programs.texi (Balanced Editing): Remove broken line-break. @@ -147,7 +169,7 @@ * XEmacs 21.2.19 is released -1999-07-10 Adrian Aichner +1999-07-10 Adrian Aichner * emodules.texi: Use @set emacs and @value{emacs} instead of @macro (unsupported by texinfo package). Remove stray @code. @@ -258,7 +280,7 @@ * XEmacs 21.2.9 is released -1999-01-14 Adrian Aichner +1999-01-14 Adrian Aichner * internals\internals.texi (Techniques for XEmacs Developers): Fixing documentation. @@ -397,7 +419,7 @@ * lispref/files.texi (User Name Completion): new section. -1998-07-23 Adrian Aichner +1998-07-23 Adrian Aichner * xemacs/packages.texi (Packages): Changing @itemize @emph to @itemize @bullet (this is what all other files included in @@ -446,7 +468,7 @@ * standards.texi (Preface): Revert previous change to @node because it doesn't pass makeinfo. -1998-06-27 Adrian Aichner +1998-06-27 Adrian Aichner * cl.texi: See ALL. * info-stnd.texi: Fixed @setfilename. @@ -485,7 +507,7 @@ * xemacs/startup.texi: * xemacs/packages.texi: Created. -1998-06-10 Adrian Aichner +1998-06-10 Adrian Aichner * texinfo.texi: added ../info/ to @setfilename, broke line after @noindent. Changed @var{arg-not-used-by-@TeX{}} to @@ -545,7 +567,7 @@ * lispref/dragndrop.texi: naming changed to Drag and Drop added some docu about the drop procedure -1998-06-09 Adrian Aichner +1998-06-09 Adrian Aichner * info-stnd.texi: added ../info/ to @setfilename. * info.texi: added ../info/ to @setfilename. @@ -736,7 +758,7 @@ * xemacs/custom.texi (Init Syntax): document #b, #o, and #x reader syntax for integers. - From Adrian Aichner + From Adrian Aichner * cl.texi (Porting Common Lisp): ' ' * lispref/numbers.texi (Numbers): ' ' diff -r 892ca416f0fb -r 9d177e8d4150 man/lispref/functions.texi --- a/man/lispref/functions.texi Mon Aug 13 11:30:00 2007 +0200 +++ b/man/lispref/functions.texi Mon Aug 13 11:30:53 2007 +0200 @@ -680,18 +680,21 @@ @cindex mapping functions A @dfn{mapping function} applies a given function to each element of a -list or other collection. XEmacs Lisp has three such functions; +list or other collection. XEmacs Lisp has several such functions; @code{mapcar} and @code{mapconcat}, which scan a list, are described -here. For the third mapping function, @code{mapatoms}, see -@ref{Creating Symbols}. +here. @xref{Creating Symbols}, for the function @code{mapatoms} which +maps over the symbols in an obarray. + +Mapping functions should never modify the sequence being mapped over. +The results are unpredictable. @defun mapcar function sequence @code{mapcar} applies @var{function} to each element of @var{sequence} in turn, and returns a list of the results. -The argument @var{sequence} may be a list, a vector, or a string. The -result is always a list. The length of the result is the same as the -length of @var{sequence}. +The argument @var{sequence} can be any kind of sequence; that is, a +list, a vector, a bit vector, or a string. The result is always a list. +The length of the result is the same as the length of @var{sequence}. @smallexample @group @@ -738,7 +741,8 @@ other suitable punctuation. The argument @var{function} must be a function that can take one -argument and return a string. +argument and return a string. The argument @var{sequence} can be any +kind of sequence; that is, a list, a vector, a bit vector, or a string. @smallexample @group diff -r 892ca416f0fb -r 9d177e8d4150 man/lispref/minibuf.texi --- a/man/lispref/minibuf.texi Mon Aug 13 11:30:00 2007 +0200 +++ b/man/lispref/minibuf.texi Mon Aug 13 11:30:53 2007 +0200 @@ -25,6 +25,7 @@ * Completion:: How to invoke and customize completion. * Yes-or-No Queries:: Asking a question with a simple answer. * Multiple Queries:: Asking a series of similar questions. +* Reading a Password:: Reading a password from the terminal. * Minibuffer Misc:: Various customization hooks and variables. @end menu @@ -37,7 +38,7 @@ to minibuffers. The name of a minibuffer always has the form @w{@samp{ *Minibuf-@var{number}}}, and it cannot be changed. Minibuffers are displayed only in special windows used only for minibuffers; these -windows always appear at the bottom of a frame. (Sometime frames have +windows always appear at the bottom of a frame. (Sometimes frames have no minibuffer window, and sometimes a special kind of frame contains nothing but a minibuffer window; see @ref{Minibuffers and Frames}.) @@ -67,10 +68,6 @@ @code{minibuffer-local-map} is for ordinary input (no completion). @item -@code{minibuffer-local-ns-map} is similar, except that @key{SPC} exits -just like @key{RET}. This is used mainly for Mocklisp compatibility. - -@item @code{minibuffer-local-completion-map} is for permissive completion. @item @@ -91,7 +88,7 @@ reading the arguments for a command, in the @code{interactive} spec. @xref{Defining Commands}. -@defun read-from-minibuffer prompt-string &optional initial-contents keymap read hist +@defun read-from-minibuffer prompt-string &optional initial-contents keymap read hist abbrev-table default This function is the most general way to get input through the minibuffer. By default, it accepts arbitrary text and returns it as a string; however, if @var{read} is non-@code{nil}, then it uses @@ -112,12 +109,25 @@ @var{string} in the minibuffer but put point @var{position} characters from the beginning, rather than at the end. +When the user types a command to exit the minibuffer, +@code{read-from-minibuffer} constructs the return value from the text in +the minibuffer. Normally it returns a string containing that text. +However, if @var{read} is non-@code{nil}, @code{read-from-minibuffer} +reads the text and returns the resulting Lisp object, unevaluated. +(@xref{Input Functions}, for information about reading.) + +The argument @var{default} specifies a default value to make available +through the history commands. It should be a string, or @code{nil}. + If @var{keymap} is non-@code{nil}, that keymap is the local keymap to use in the minibuffer. If @var{keymap} is omitted or @code{nil}, the value of @code{minibuffer-local-map} is used as the keymap. Specifying a keymap is the most important way to customize the minibuffer for various applications such as completion. +The argument @var{abbrev-table} specifies @code{local-abbrev-table} in +the minibuffer (@pxref{Standard Abbrev Tables}). + The argument @var{hist} specifies which history list variable to use for saving the input and for history commands used in the minibuffer. It defaults to @code{minibuffer-history}. @xref{Minibuffer History}. @@ -129,15 +139,27 @@ @code{read-from-minibuffer} reads the text and returns the resulting Lisp object, unevaluated. (@xref{Input Functions}, for information about reading.) + +@strong{Usage note:} The @var{initial-contents} argument and the +@var{default} argument are two alternative features for more or less the +same job. It does not make sense to use both features in a single call +to @code{read-from-minibuffer}. In general, we recommend using +@var{default}, since this permits the user to insert the default value +when it is wanted, but does not burden the user with deleting it from +the minibuffer on other occasions. However, if user is supposed to edit +default value, @var{initial-contents} may be preferred. @end defun -@defun read-string prompt &optional initial +@defun read-string prompt &optional initial history This function reads a string from the minibuffer and returns it. The arguments @var{prompt} and @var{initial} are used as in @code{read-from-minibuffer}. The keymap used is @code{minibuffer-local-map}. -This is a simplified interface to the +The optional argument @var{history}, if non-nil, specifies a history +list and optionally the initial position in the list. + +This function is a simplified interface to the @code{read-from-minibuffer} function: @smallexample @@ -154,7 +176,7 @@ default, it makes the following bindings: @table @asis -@item @key{LFD} +@item @kbd{C-j} @code{exit-minibuffer} @item @key{RET} @@ -177,49 +199,6 @@ @end table @end defvar -@c In version 18, initial is required -@c Emacs 19 feature -@defun read-no-blanks-input prompt &optional initial -This function reads a string from the minibuffer, but does not allow -whitespace characters as part of the input: instead, those characters -terminate the input. The arguments @var{prompt} and @var{initial} are -used as in @code{read-from-minibuffer}. - -This is a simplified interface to the @code{read-from-minibuffer} -function, and passes the value of the @code{minibuffer-local-ns-map} -keymap as the @var{keymap} argument for that function. Since the keymap -@code{minibuffer-local-ns-map} does not rebind @kbd{C-q}, it @emph{is} -possible to put a space into the string, by quoting it. - -@smallexample -@group -(read-no-blanks-input @var{prompt} @var{initial}) -@equiv{} -(read-from-minibuffer @var{prompt} @var{initial} minibuffer-local-ns-map) -@end group -@end smallexample -@end defun - -@defvar minibuffer-local-ns-map -This built-in variable is the keymap used as the minibuffer local keymap -in the function @code{read-no-blanks-input}. By default, it makes the -following bindings, in addition to those of @code{minibuffer-local-map}: - -@table @asis -@item @key{SPC} -@cindex @key{SPC} in minibuffer -@code{exit-minibuffer} - -@item @key{TAB} -@cindex @key{TAB} in minibuffer -@code{exit-minibuffer} - -@item @kbd{?} -@cindex @kbd{?} in minibuffer -@code{self-insert-and-exit} -@end table -@end defvar - @node Object from Minibuffer @section Reading Lisp Objects with the Minibuffer @@ -227,7 +206,7 @@ minibuffer. @defun read-minibuffer prompt &optional initial -This function reads a Lisp object in the minibuffer and returns it, +This function reads a Lisp object using the minibuffer, and returns it without evaluating it. The arguments @var{prompt} and @var{initial} are used as in @code{read-from-minibuffer}. @@ -266,9 +245,9 @@ @end defun @defun eval-minibuffer prompt &optional initial -This function reads a Lisp expression in the minibuffer, evaluates it, -then returns the result. The arguments @var{prompt} and @var{initial} -are used as in @code{read-from-minibuffer}. +This function reads a Lisp expression using the minibuffer, evaluates +it, then returns the result. The arguments @var{prompt} and +@var{initial} are used as in @code{read-from-minibuffer}. This function simply evaluates the result of a call to @code{read-minibuffer}: @@ -293,7 +272,7 @@ The first thing @code{edit-and-eval-command} does is to activate the minibuffer with @var{prompt} as the prompt. Then it inserts the printed -representation of @var{form} in the minibuffer, and lets the user edit. +representation of @var{form} in the minibuffer, and lets the user edit it. When the user exits the minibuffer, the edited text is read with @code{read} and then evaluated. The resulting value becomes the value of @code{edit-and-eval-command}. @@ -366,6 +345,8 @@ name to the input functions when you wish. But it is safe to modify the list by hand when the minibuffer input functions are not using it. + Here are some of the standard minibuffer history list variables: + @defvar minibuffer-history The default history list for minibuffer history input. @end defvar @@ -551,7 +532,7 @@ @defun all-completions string collection &optional predicate nospace This function returns a list of all possible completions of -@var{string}. The parameters to this function are the same as to +@var{string}. The arguments to this function are the same as those of @code{try-completion}. If @var{collection} is a function, it is called with three arguments: @@ -592,7 +573,7 @@ This section describes the basic interface for reading from the minibuffer with completion. -@defun completing-read prompt collection &optional predicate require-match initial hist +@defun completing-read prompt collection &optional predicate require-match initial hist default This function reads a string in the minibuffer, assisting the user by providing completion. It activates the minibuffer with prompt @var{prompt}, which must be a string. If @var{initial} is @@ -611,11 +592,17 @@ @var{collection}. If @var{require-match} is @code{nil}, the exit commands work regardless of the input in the minibuffer. +However, empty input is always permitted, regardless of the value of +@var{require-match}; in that case, @code{completing-read} returns +@var{default}. The value of @var{default} (if non-@code{nil}) is also +available to the user through the history commands. + The user can exit with null input by typing @key{RET} with an empty -minibuffer. Then @code{completing-read} returns @code{nil}. This is -how the user requests whatever default the command uses for the value -being read. The user can return using @key{RET} in this way regardless -of the value of @var{require-match}. +minibuffer. Then @code{completing-read} returns @code{""}. This is how +the user requests whatever default the command uses for the value being +read. The user can return using @key{RET} in this way regardless of the +value of @var{require-match}, and regardless of whether the empty string +is included in @var{collection}. The function @code{completing-read} works by calling @code{read-minibuffer}. It uses @code{minibuffer-local-completion-map} @@ -707,7 +694,7 @@ @item @key{TAB} @code{minibuffer-complete} -@item @key{LFD} +@item @kbd{C-j} @code{minibuffer-complete-and-exit} @item @key{RET} @@ -745,7 +732,7 @@ @deffn Command minibuffer-complete-and-exit This function completes the minibuffer contents, and exits if confirmation is not required, i.e., if -@code{minibuffer-completion-confirm} is non-@code{nil}. If confirmation +@code{minibuffer-completion-confirm} is @code{nil}. If confirmation @emph{is} required, it is given by repeating this command immediately---the command is programmed to work without confirmation when run twice in succession. @@ -956,7 +943,7 @@ @c Emacs 19 feature If you specify @var{initial}, that is an initial file name to insert in -the buffer (after with @var{directory}, if that is inserted). In this +the buffer (after @var{directory}, if that is inserted). In this case, point goes at the beginning of @var{initial}. The default for @var{initial} is @code{nil}---don't insert any file name. To see what @var{initial} does, try the command @kbd{C-x C-v}. @@ -1071,8 +1058,12 @@ @item @code{nil} specifies @code{try-completion}. The completion function should return the completion of the specified string, or @code{t} if the -string is an exact match already, or @code{nil} if the string matches no -possibility. +string is a unique and exact match already, or @code{nil} if the string +matches no possibility. + +If the string is an exact match for one possibility, but also matches +other longer possibilities, the function should return the string, not +@code{t}. @item @code{t} specifies @code{all-completions}. The completion function @@ -1343,6 +1334,40 @@ The return value of @code{map-y-or-n-p} is the number of objects acted on. @end defun +@node Reading a Password +@section Reading a Password +@cindex passwords, reading + + To read a password to pass to another program, you can use the +function @code{read-passwd}. + +@defun read-passwd prompt &optional confirm default +This function reads a password, prompting with @var{prompt}. It does +not echo the password as the user types it; instead, it echoes @samp{.} +for each character in the password. + +The optional argument @var{confirm}, if non-@code{nil}, says to read the +password twice and insist it must be the same both times. If it isn't +the same, the user has to type it over and over until the last two +times match. + +The optional argument @var{default} specifies the default password to +return if the user enters empty input. It is translated to @samp{.} +and inserted in the minibuffer. If @var{default} is @code{nil}, then +@code{read-passwd} returns the null string in that case. +@end defun + +@defopt passwd-invert-frame-when-keyboard-grabbed +If non-nil swap the foreground and background colors of all faces while +reading a password. Default values is @code{t} unless feature +@code{infodock} is provided. +@end defopt + +@defopt passwd-echo +This specifies the character echoed when typing a password. When nil, +nothing is echoed. +@end defopt + @node Minibuffer Misc @section Minibuffer Miscellany @@ -1452,8 +1477,8 @@ @defopt enable-recursive-minibuffers If this variable is non-@code{nil}, you can invoke commands (such as -@code{find-file}) that use minibuffers even while in the minibuffer -window. Such invocation produces a recursive editing level for a new +@code{find-file}) that use minibuffers even while the minibuffer window +is active. Such invocation produces a recursive editing level for a new minibuffer. The outer-level minibuffer is invisible while you are editing the inner one. @@ -1476,4 +1501,4 @@ in this fashion, just use an evaluated interactive spec and bind @code{enable-recursive-minibuffers} while reading from the minibuffer. See the definition of @code{next-matching-history-element} in -@file{lisp/prim/minibuf.el}. +@file{lisp/minibuf.el}. diff -r 892ca416f0fb -r 9d177e8d4150 man/lispref/text.texi --- a/man/lispref/text.texi Mon Aug 13 11:30:00 2007 +0200 +++ b/man/lispref/text.texi Mon Aug 13 11:30:53 2007 +0200 @@ -70,12 +70,13 @@ and always operated on the current buffer.) -@defun char-after position &optional buffer +@defun char-after &optional position buffer This function returns the character in the buffer at (i.e., immediately after) position @var{position}. If @var{position} is out of range for this purpose, either before the beginning of the buffer, or at -or beyond the end, then the value is @code{nil}. If optional argument -@var{buffer} is @code{nil}, the current buffer is assumed. +or beyond the end, then the value is @code{nil}. The default for +@var{position} is point. If optional argument @var{buffer} is +@code{nil}, the current buffer is assumed. In the following example, assume that the first character in the buffer is @samp{@@}: @@ -88,6 +89,15 @@ @end example @end defun +@defun char-before &optional position buffer +This function returns the character in the current buffer immediately +before position @var{position}. If @var{position} is out of range for +this purpose, either at or before the beginning of the buffer, or beyond +the end, then the value is @code{nil}. The default for +@var{position} is point. If optional argument @var{buffer} is +@code{nil}, the current buffer is assumed. +@end defun + @defun following-char &optional buffer This function returns the character following point in the buffer. This is similar to @code{(char-after (point))}. However, if point is at diff -r 892ca416f0fb -r 9d177e8d4150 man/widget.texi --- a/man/widget.texi Mon Aug 13 11:30:00 2007 +0200 +++ b/man/widget.texi Mon Aug 13 11:30:53 2007 +0200 @@ -462,11 +462,11 @@ @item %@{ @itemx %@} -The text inside will be displayed with the face specified by -@code{:sample-face}. +The text inside will be displayed in the face specified by +@code{:sample-face}. @item %v -This will be replaces with the buffer representation of the widgets +This will be replaced with the buffer representation of the widget's value. What this is depends on the widget type. @item %d @@ -560,8 +560,8 @@ @item :validate A function which takes a widget as an argument, and return nil if the -widgets current value is valid for the widget. Otherwise, it should -return the widget containing the invalid data, and set that widgets +widget's current value is valid for the widget. Otherwise it should +return the widget containing the invalid data, and set that widget's @code{:error} property to a string explaining the error. The following predefined function can be used: @@ -764,10 +764,10 @@ TYPE ::= (menu-choice [KEYWORD ARGUMENT]... TYPE ... ) @end example -The @var{type} arguments represents each possible choice. The widgets -value of will be the value of the chosen @var{type} argument. This -widget will match any value that matches at least one of the specified -@var{type} arguments. +The @var{type} argument represents each possible choice. The widget's +value will be that of the chosen @var{type} argument. This widget will +match any value matching at least one of the specified @var{type} +arguments. @table @code @item :void @@ -799,10 +799,10 @@ TYPE ::= (radio-button-choice [KEYWORD ARGUMENT]... TYPE ... ) @end example -The @var{type} arguments represents each possible choice. The widgets -value of will be the value of the chosen @var{type} argument. This -widget will match any value that matches at least one of the specified -@var{type} arguments. +The @var{type} argument represents each possible choice. The widget's +value will be that of the chosen @var{type} argument. This widget will +match any value matching at least one of the specified @var{type} +arguments. The following extra properties are recognized. @@ -889,8 +889,8 @@ TYPE ::= (toggle [KEYWORD ARGUMENT]...) @end example -The widget has two possible states, `on' and `off', which corresponds to -a @code{t} or @code{nil} value. +The widget has two possible states, `on' and `off', which correspond to +a @code{t} or @code{nil} value respectively. The following extra properties are recognized. @@ -930,10 +930,10 @@ TYPE ::= (checklist [KEYWORD ARGUMENT]... TYPE ... ) @end example -The @var{type} arguments represents each checklist item. The widgets -value of will be a list containing the value of each ticked @var{type} -argument. The checklist widget will match a list whose elements all -matches at least one of the specified @var{type} arguments. +The @var{type} arguments represents each checklist item. The widget's +value will be a list containing the values of all ticked @var{type} +arguments. The checklist widget will match a list whose elements all +match at least one of the specified @var{type} arguments. The following extra properties are recognized. @@ -951,11 +951,11 @@ @end table @item :greedy -Usually, a checklist will only match if the items are in the exact +Usually a checklist will only match if the items are in the exact sequence given in the specification. By setting @code{:greedy} to -non-nil, it will allow the items to come in any sequence. However, if -you extract the value they will be in the sequence given in the -checklist. I.e. the original sequence is forgotten. +non-nil, it will allow the items to appear in any sequence. However, if +you extract the values they will be in the sequence given in the +checklist. I.e. the original sequence is forgotten. @item button-args A list of keywords to pass to the checkboxes. Useful for setting @@ -1236,13 +1236,13 @@ @samp{(file t)} or @code{(file string string)}. This concept of inline is probably hard to understand. It was certainly -hard to implement so instead of confuse you more by trying to explain it -here, I'll just suggest you meditate over it for a while. +hard to implement so instead of confusing you more by trying to explain +it here, I'll just suggest you meditate over it for a while. @deffn Widget choice -Allows you to edit a sexp which may have one of fixed set of types. It -is currently implemented with the @code{choice-menu} basic widget, and -has a similar syntax. +Allows you to edit a sexp which may have one of a fixed set of types. +It is currently implemented with the @code{choice-menu} basic widget, +and has a similar syntax. @end deffn @deffn Widget set @@ -1326,9 +1326,9 @@ (widget-apply @var{widget} :activate) @end lisp -A widget is inactive if itself, or any of its ancestors (found by +A widget is inactive if itself or any of its ancestors (found by following the @code{:parent} link) have been deactivated. To make sure -a widget is really active, you must therefore activate both itself, and +a widget is really active, you must therefore activate both itself and all its ancestors. @lisp @@ -1338,12 +1338,12 @@ @end lisp You can check if a widget has been made inactive by examining the value -of @code{:inactive} keyword. If this is non-nil, the widget itself has -been deactivated. This is different from using the @code{:active} -keyword, in that the later tell you if the widget @strong{or} any of its -ancestors have been deactivated. Do not attempt to set the +of the @code{:inactive} keyword. If this is non-nil, the widget itself +has been deactivated. This is different from using the @code{:active} +keyword, in that the latter tells you if the widget @strong{or} any of +its ancestors have been deactivated. Do not attempt to set the @code{:inactive} keyword directly. Use the @code{:activate} -@code{:deactivated} keywords instead. +@code{:deactivate} keywords instead. @node Defining New Widgets, Widget Browser, Widget Properties, Top @@ -1351,9 +1351,9 @@ @section Defining New Widgets You can define specialized widgets with @code{define-widget}. It allows -you to create a shorthand for more complex widgets, including specifying -component widgets and default new default values for the keyword -arguments. +you to create a shorthand for more complex widgets. This includes +specifying component widgets and new default values for the keyword +arguments. @defun widget-define name class doc &rest args Define a new widget type named @var{name} from @code{class}. @@ -1363,7 +1363,7 @@ The third argument @var{DOC} is a documentation string for the widget. -After the new widget has been defined, the following two calls will +After the new widget has been defined the following two calls will create identical widgets: @itemize @bullet @@ -1380,8 +1380,8 @@ @end defun -Using @code{widget-define} does just store the definition of the widget -type in the @code{widget-type} property of @var{name}, which is what +Using @code{widget-define} just stores the definition of the widget type +in the @code{widget-type} property of @var{name}, which is what @code{widget-create} uses. If you just want to specify defaults for keywords with no complex @@ -1394,7 +1394,7 @@ Function to convert a widget type before creating a widget of that type. It takes a widget type as an argument, and returns the converted widget type. When a widget is created, this function is called for the -widget type and all the widgets parent types, most derived first. +widget type and all the widget's parent types, most derived first. The following predefined functions can be used here: @@ -1408,7 +1408,7 @@ @item :value-to-internal Function to convert the value to the internal format. The function -takes two arguments, a widget and an external value, and returns the +takes two arguments, a widget and an external value. It returns the internal value. The function is called on the present @code{:value} when the widget is created, and on any value set later with @code{widget-value-set}. @@ -1422,8 +1422,8 @@ @item :create Function to create a widget from scratch. The function takes one -argument, a widget type, and create a widget of that type, insert it in -the buffer, and return a widget object. +argument, a widget type, and creates a widget of that type, inserts it +in the buffer, and returns a widget object. @item :delete Function to delete a widget. The function takes one argument, a widget, @@ -1431,14 +1431,14 @@ @item :value-create Function to expand the @samp{%v} escape in the format string. It will -be called with the widget as its argument. Should -insert a representation of the widgets value in the buffer. +be called with the widget as its argument and should insert a +representation of the widget's value in the buffer. @item :value-delete -Should remove the representation of the widgets value from the buffer. +Should remove the representation of the widget's value from the buffer. It will be called with the widget as its argument. It doesn't have to remove the text, but it should release markers and delete nested widgets -if such has been used. +if such have been used. The following predefined function can be used here: @@ -1462,8 +1462,8 @@ You can set this to allow your widget to handle non-standard escapes. You should end up calling @code{widget-default-format-handler} to handle -unknown escape sequences, which will handle the @samp{%h} and any future -escape sequences, as well as give an error for unknown escapes. +unknown escape sequences. It will handle the @samp{%h} and any future +escape sequences as well as give an error for unknown escapes. @item :action Function to handle user initiated events. By default, @code{:notify} @@ -1481,9 +1481,9 @@ take four arguments, @var{widget}, @var{prompt}, @var{value}, and @var{unbound} and should return a value for widget entered by the user. @var{prompt} is the prompt to use. @var{value} is the default value to -use, unless @var{unbound} is non-nil in which case there are no default +use, unless @var{unbound} is non-nil. In this case there is no default value. The function should read the value using the method most natural -for this widget, and does not have to check that it matches. +for this widget and does not have to check whether it matches. @end table If you want to define a new widget from scratch, use the @code{default} diff -r 892ca416f0fb -r 9d177e8d4150 man/xemacs-faq.texi --- a/man/xemacs-faq.texi Mon Aug 13 11:30:00 2007 +0200 +++ b/man/xemacs-faq.texi Mon Aug 13 11:30:53 2007 +0200 @@ -7,15 +7,15 @@ @finalout @titlepage @title XEmacs FAQ -@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 1999/12/07 03:11:46 $ +@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 1999/12/23 01:50:47 $ @sp 1 -@author Tony Rossini +@author Tony Rossini @author Ben Wing @author Chuck Thompson @author Steve Baur @author Andreas Kaempf @author Christian Nyb@o{} -@author Sandra Wambold +@author Sandra Wambold @page @end titlepage @@ -182,6 +182,7 @@ * Q2.1.21:: Every so often the XEmacs frame freezes. * Q2.1.22:: XEmacs seems to take a really long time to do some things. * Q2.1.23:: Movemail on Linux does not work for XEmacs 19.15 and later. +* Q2.1.24:: XEmacs won't start without network. (NEW) Customization and Options @@ -424,7 +425,7 @@ wondering what to do next. It is also useful as a reference to available resources. -The previous maintainer of the FAQ was @email{rossini@@stat.sc.edu, +The previous maintainer of the FAQ was @email{rossini@@biostat.washington.edu, Anthony Rossini}, who started it, after getting tired of hearing JWZ complain about repeatedly having to answer questions. @email{ben@@xemacs.org, Ben Wing} and @email{cthomp@@xemacs.org, Chuck @@ -435,15 +436,13 @@ The previous version was converted to hypertext format, and edited by @email{steve@@xemacs.org, Steven L. Baur}. It was converted back to -texinfo by @email{hniksic@@xemacs.org, Hrvoje Niksic}. - -The FAQ was then maintained by @email{andreas@@sccon.com, Andreas -Kaempf}, who passed it on to @email{faq@@xemacs.org, Christian -Nyb@o{}}, the current FAQ maintainer. +texinfo by @email{hniksic@@xemacs.org, Hrvoje Niksic}. The FAQ was then +maintained by @email{andreas@@sccon.com, Andreas Kaempf}, who passed it +on to ChristianNyb@o{}. If you notice any errors or items which should be added or amended to -this FAQ please send email to @email{faq@@xemacs.org, Christian -Nyb@o{}}. Include @samp{XEmacs FAQ} on the Subject: line. +this FAQ please send email to @email{faq@@xemacs.org, Sandra +Wambold}. Include @samp{XEmacs FAQ} on the Subject: line. @menu Introduction: @@ -728,8 +727,10 @@ @unnumberedsubsec Q1.1.1: What is the FAQ editorial policy? The FAQ is actively maintained and modified regularly. All links should -be up to date. All submissions are welcome. E-mail submissions to -@email{faq@@xemacs.org, XEmacs FAQ maintainers}. +be up to date. Unfortunately, some of the information is out of date -- +a situation which the FAQ maintainer is working on. All submissions are +welcome, please e-mail submissions to @email{faq@@xemacs.org, XEmacs FAQ +maintainers}. Please make sure that @samp{XEmacs FAQ} appears on the Subject: line. If you think you have a better way of answering a question, or think a @@ -1331,6 +1332,7 @@ * Q2.1.21:: Every so often the XEmacs frame freezes. * Q2.1.22:: XEmacs seems to take a really long time to do some things. * Q2.1.23:: Movemail on Linux does not work for XEmacs 19.15 and later. +* Q2.1.24:: XEmacs won't start without network. (NEW) @end menu @node Q2.0.1, Q2.0.2, Installation, Installation @@ -2547,7 +2549,7 @@ some other strange cases. @end quotation -@node Q2.1.23, , Q2.1.22, Installation +@node Q2.1.23, Q2.1.24, Q2.1.22, Installation @unnumberedsubsec Q2.1.23: Movemail on Linux does not work for XEmacs 19.15 and later. Movemail used to work fine in 19.14 but has stopped working in 19.15 @@ -2566,6 +2568,20 @@ @end example @end quotation +@node Q2.1.24, , Q2.1.23, Installation +@unnumberedsubsec Q2.1.24: XEmacs won't start without network. (NEW) +Q2.1.23: Movemail on Linux does not work for XEmacs 19.15 and later. + +If XEmacs starts when you're on the network, but fails when you're not +on the network, you may be missing a "localhost" entry in your +@file{/etc/hosts} file. The file should contain an entry like: + +@example +127.0.0.1 localhost +@end example + +Add that line, and XEmacs will be happy. + @node Customization, Subsystems, Installation, Top @unnumbered 3 Customization and Options @@ -4925,23 +4941,10 @@ @node Q4.7.6, , Q4.7.5, Subsystems @unnumberedsubsec Q4.7.5: Is there a MatLab mode? -@c New -Is there any way I can get syntax highlighting for MatLab .m files? -Can I "teach" emacs what words are MatLab commands, comments, etc. ? - -@email{elsner@@mathematik.tu-chemnitz.de, Ulrich Elsner} writes: -@quotation -One way to do this (and much more) is by using the -@iftex -@* -@end iftex -@comment @uref{ftp://ftp.mathworks.com/pub/contrib/v5/tools/matlab.el, matlab mode}. -matlab mode. (If someone knows where this can be found, please contact -the @email{faq@@xemacs.org,XEmacs FAQ maintainer}. - -Instructions on how to install this mode are included in this file. -@end quotation - + +Yes, a matlab mode and other items are available at the +@uref{ftp://ftp.mathworks.com/pub/contrib/emacs_add_ons, +MathWorks' emacs_add_ons ftp directory}. @node Miscellaneous, MS Windows, Subsystems, Top @unnumbered 5 The Miscellaneous Stuff diff -r 892ca416f0fb -r 9d177e8d4150 nt/ChangeLog --- a/nt/ChangeLog Mon Aug 13 11:30:00 2007 +0200 +++ b/nt/ChangeLog Mon Aug 13 11:30:53 2007 +0200 @@ -1,8 +1,17 @@ +1999-12-24 Martin Buchholz + + * XEmacs 21.2.25 is released. + +1999-12-15 Scott Blachowicz + + * minitar.c (main): Add explicit exit(0) to get successful return + code. + 1999-12-14 Martin Buchholz * XEmacs 21.2.24 is released. -1999-11-28 Adrian Aichner +1999-11-28 Adrian Aichner * xemacs.mak (depend): Only update `depend' if there were changes. Use "perl ./make-src-depend" instead of "mkdepend". @@ -11,7 +20,7 @@ * XEmacs 21.2.23 is released. -1999-11-27 Adrian Aichner +1999-11-27 Adrian Aichner * xemacs.mak (SRCDIR): Make path to xemacs absolute to facilitate building info in man subdirs. Echo all cd commands, @@ -48,7 +57,7 @@ * xemacs.mak: Ignore return code of 'del' calls. Use a make variable for 'del'. -1999-09-26 Adrian Aichner +1999-09-26 Adrian Aichner * xemacs.mak (all): Update $(LISP)/auto-autoloads.elc? and $(LISP)/custom-load.el using XEmacs itself, like xemacs-packages @@ -60,7 +69,7 @@ * xemacs.mak (HAVE_WIDGETS): add define to appropriate places. -1999-07-26 Adrian Aichner +1999-07-26 Adrian Aichner * xemacs.mak ($(MANDIR)\lispref\lispref.texi): Replace bad dependency. @@ -69,7 +78,7 @@ * XEmacs 21.2.19 is released -1999-07-10 Adrian Aichner +1999-07-10 Adrian Aichner * xemacs.mak (.SUFFIXES): Add .texi. (check): Improve automated test section. @@ -88,7 +97,7 @@ * XEmacs 21.2.17 is released -1999-06-13 Adrian Aichner +1999-06-13 Adrian Aichner * xemacs.mak (DOC_SRC8): Remove mule-coding.c. (TEMACS_MULE_OBJS): Remove mule-coding.obj @@ -103,7 +112,7 @@ * XEmacs 21.2.16 is released -1999-05-14 Adrian Aichner <aichner@ecf.teradyne.com> +1999-05-14 Adrian Aichner <adrian@xemacs.org> * xemacs.mak (GUNG_HO): Explicitly default to 0. Fix some comment typos. @@ -132,7 +141,7 @@ * xemacs.mak ($(LISP)\Installation.el): Don't use `replace-in-string'. -1999-03-17 Adrian Aichner +1999-03-17 Adrian Aichner * xemacs.mak: Remove ESC macro -- no longer needed. Remove small configuration report. Remove simplified version of @@ -208,7 +217,7 @@ * XEmacs 21.2.9 is released -1999-01-14 Adrian Aichner +1999-01-14 Adrian Aichner * xemacs.mak (MODULES): Adding variable. (update-elc): Setting EMACSBOOTSTRAPMODULEPATH. @@ -259,7 +268,7 @@ * XEmacs 21.2.6 is released -1998-12-11 Adrian Aichner +1998-12-11 Adrian Aichner * xemacs.mak (DOC_SRC2): CLASH_DETECTION is not supported under native Windows NT. Therefore src\filelock.c is not to be @@ -281,7 +290,7 @@ (DOC_SRC4): - Remove pure.c, pure.obj -1998-11-04 Adrian Aichner +1998-11-04 Adrian Aichner * xemacs.mak: Creating minimal versions of Installation, Installation.el, and config.values to make @@ -310,7 +319,7 @@ * XEmacs 21.2-beta2 is released. -1998-09-19 Adrian Aichner +1998-09-19 Adrian Aichner * tiff.mak: New file provided by Charles Wilson @@ -400,7 +409,7 @@ * config.h: * xemacs.mak: NT native sound fixes - From Fabrice POPINEAU via Adrian Aichner + From Fabrice POPINEAU via Adrian Aichner 1998-06-21 Martin Buchholz @@ -423,7 +432,7 @@ * xemacs.mak (distclean): Reorder when puresize-adjust.h gets deleted. - From Adrian Aichner + From Adrian Aichner 1998-06-08 Kirill M. Katsnelson diff -r 892ca416f0fb -r 9d177e8d4150 nt/minitar.c --- a/nt/minitar.c Mon Aug 13 11:30:00 2007 +0200 +++ b/nt/minitar.c Mon Aug 13 11:30:53 2007 +0200 @@ -204,6 +204,7 @@ in_block = 0; } } + exit (0); } diff -r 892ca416f0fb -r 9d177e8d4150 src/ChangeLog --- a/src/ChangeLog Mon Aug 13 11:30:00 2007 +0200 +++ b/src/ChangeLog Mon Aug 13 11:30:53 2007 +0200 @@ -1,3 +1,180 @@ +1999-12-24 Martin Buchholz + + * XEmacs 21.2.25 is released. + +1999-12-22 Yoshiki Hayashi + + * syntax.c (vars_of_syntax): Initialize parse-sexp_ignore_comments. + +1999-12-21 Martin Buchholz + + * editfns.c (Fpoint_min): + (Fpoint_min_marker): + (Fpoint_max): + (Fpoint_max_marker): + (Fchar_after): + (Fchar_before): + Docstring fixes. What's a `buffer pointer' anyways? + + * editfns.c (char=): Remove unused and undocumented optional + third BUFFER argument. + + * toolbar.h (DEVICE_SUPPORTS_TOOLBARS_P): + * fns.c (plists_differ): + * elhash.c (HASH_CODE): + * elhash.c (KEYS_EQUAL_P): + * redisplay-output.c (redisplay_move_cursor): + * redisplay.c (create_text_block): + * floatfns.c (Flogb): + * glyphs-msw.c (mswindows_initialize_image_instance_mask): + * glyphs-msw.c (xpm_to_eimage): + * buffer.h (POINT_MARKER_P): + * syntax.c (scan_lists): + * cmdloop.c (Fcommand_loop_1): + * widget.c (Fwidget_apply): + * regex.c (STREQ): + Remove extra parens, esp. of the form ((expr)) + + * floatfns.c (Flogb): Make 64-bit clean. + +1999-12-12 Daniel Pittman + + * configure.in: + * configure.usage: + Clean up Athena widget support: + - Add `with-athena' to select a variant. + - Remove all `athena3d' options. + - Robust detection of Athena libraries and headers. + - Refuse to build with mismatched library and headers. + - Only build a 3d Athena if the user asks for it. + +1999-12-21 Andy Piper + + * redisplay.c (redisplay_frame): check for faces changed when + reseting subwindow caches. + + * glyphs.h (struct ii_keyword_entry): add copy_p. + (struct image_instantiator_methods): add query_geometry_method and + layout_children_method. + (IIFORMAT_VALID_GENERIC_KEYWORD): new macro to take into account + copying characteristics of keywords. + (IIFORMAT_VALID_NONCOPY_KEYWORD): new macro for defining keywords + whose arguments should not be copied by the specifier code. + (image_instance_geometry): new enum for layouts. + (struct Lisp_Image_Instance): re-jig for layouts and update + macros. + + * glyphs.c (string_instantiate): rename variables. + (image_instantiate): add strings to those widgets that are + instantiated per-window. + (image_copy_vector_instantiator): new function for copying glyph + specifier instantiators. + (image_copy_instantiator): ditto. + + * glyphs-x.c (x_update_subwindow): use new face update functions. + (update_widget_face): update to use new lwlib arg functions. + (update_tab_widget_face): new function for updating tab control + label faces. + (x_widget_instantiate): use new face update functions and new + lwlib arg functions. + (x_tab_control_instantiate): ditto. + (x_tab_control_set_property): ditto. + + * glyphs-widget.c (VALID_GUI_KEYWORDS): use NONCOPY keyword for + callbacks and other things that could recurse. + (VALID_GUI_KEYWORDS): + + * event-msw.c: fix cpp stuff for cygwin < b20. + + * config.h.in: move uid_t and friends to before the s&m files so + that they can be used there. + + * Makefile.in.in (debug-temacs): new target that adds emacs + environment before invoking gdb. + + * lwlib.h (_widget_args): new structure for holding widget + args. It is reference counted so that we don't have to copy Xt + args. + (_widget_value): remove widget args. Add reference to widget_args. + + * lwlib.c (free_widget_value_contents): free widget args using + free_widget_value_args. + + * lwlib-Xaw.c (xaw_update_one_widget): use new arg packet. + (xaw_update_one_widget): use XtIsSubclass for determining labels. + + * lwlib.c (lw_add_value_args_to_args): modify to use our reference + counted arg packet. + (lw_add_widget_value_arg): new function. Add an arg to the arg + packet. + (free_widget_value_args): new function. Remove a reference counted + arg packet. + (lw_copy_widget_value_args): new function. Copy reference counted + arg packet. + (merge_widget_value_args): new function. Do a merge of widget + args. + (merge_widget_value): use it. + (copy_widget_value_tree): copy widget args using reference + counting, since we can't easily copy the args we have been given. + + * specifier.h (struct specifier_methods): add copy_instantiator_method. + + * specifier.c (build_up_processed_list): use + copy_instantiator_method if defined. + +1999-12-19 Martin Buchholz + + * fns.c (Ffillarray): Use O(N), not O(N^2) algorithm for strings. + +1999-12-19 Hrvoje Niksic + + * profile.c (sigprof_handler): FUN retrieved from the backtrace + can also be a cons representing anonymous interpreted function. + +1999-12-18 Martin Buchholz + + * fns.c (mapcar1): + (Fmapconcat): + (Fmapcar): + (Fmapvector): + Docstring fixes. Make them consistent with the lispref and ANSI Lisp. + +1999-12-17 Martin Buchholz + + * print.c (print_internal): print ?+ instead of ?\+, etc... + Make printing a little more efficient. + Prevent buffer overflow if sizeof EMACS_INT > 8. + My first 128-bit fix! + +1999-12-14 Karl M. Hegbloom + + * filelock.c (unlock_all_files): GC_CONSP should be CONSP + +1999-12-17 Martin Buchholz + + * database.c: + * window.c: + * event-stream.c: + Remove last vestigial uses of GC_* + + * fns.c (mapcar1): Fix ***THREE*** obscure crashes in one function! + - Two of those involve evil mapping functions that destructively + modify a list being mapped over. + - Any garbage collection when mapping over a string could cause a + crash (typically in mapconcat). + +1999-12-08 Adrian Aichner + + * s\windowsnt.h (DIRECTORY_SEP): Initialize from + `Vdirectory_sep_char'. + + * lisp.h: Add declaration for `Vdirectory_sep_char' to allow + customization of `DIRECTORY_SEP' under native Windows NT. + +1999-12-14 Katsumi Yamaoka + + * buffer.c (Fbury_buffer): Add directions to the docstring. + 1999-12-14 Martin Buchholz * XEmacs 21.2.24 is released. @@ -27,7 +204,7 @@ * fileio.c (vars_of_fileio): directory separator fix from Mike Alexander. * windowsnt.h (ditto): -1999-11-27 Adrian Aichner +1999-11-27 Adrian Aichner * sysfile.h: Encapsulate `fstat' for Windows NT just like stat to get consistent file modification times. @@ -546,7 +723,7 @@ * esd.c: New file -1999-10-24 Adrian Aichner +1999-10-24 Adrian Aichner * lisp.h (Dynarr_declare): Fix boo-boo. @@ -4203,7 +4380,7 @@ (image_instantiator_format_create): xface declarations moved from glyphs-x.c. -1999-01-14 Adrian Aichner +1999-01-14 Adrian Aichner * event-stream.c (vars_of_event_stream): Fixing documentation. @@ -6698,7 +6875,7 @@ substitute-in-file-name because we don't know that the filename refers to a local file. -1998-06-24 Adrian Aichner +1998-06-24 Adrian Aichner * process-nt.c (nt_create_process): Try appending the standard executable file extensions to the filename if none supplied. diff -r 892ca416f0fb -r 9d177e8d4150 src/Makefile.in.in --- a/src/Makefile.in.in Mon Aug 13 11:30:00 2007 +0200 +++ b/src/Makefile.in.in Mon Aug 13 11:30:53 2007 +0200 @@ -320,6 +320,7 @@ temacs_loadup = $(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump_temacs = ${temacs_loadup} dump run_temacs = ${temacs_loadup} run-temacs +debug_temacs = $(DUMPENV) gdb temacs release: temacs ${libsrc}DOC $(mo_file) ${other_files} #ifdef CANNOT_DUMP @@ -492,6 +493,9 @@ runargs -batch -l ${srcdir}/../lisp/loadup.el run-temacs -q; \ run' rtcmacs +debug-temacs: temacs + -${debug_temacs} + ## Purify, Quantify, PureCoverage are software quality products from ## Rational, formerly Pure Atria, formerly Pure Software. ## diff -r 892ca416f0fb -r 9d177e8d4150 src/buffer.c --- a/src/buffer.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/buffer.c Mon Aug 13 11:30:53 2007 +0200 @@ -1624,6 +1624,8 @@ If BUFFER is nil or omitted, bury the current buffer. Also, if BUFFER is nil or omitted, remove the current buffer from the selected window if it is displayed there. +Because of this, you may need to specify (current-buffer) as +BUFFER when calling from minibuffer. If BEFORE is non-nil, it specifies a buffer before which BUFFER will be placed, instead of being placed at the end. */ diff -r 892ca416f0fb -r 9d177e8d4150 src/buffer.h --- a/src/buffer.h Mon Aug 13 11:30:00 2007 +0200 +++ b/src/buffer.h Mon Aug 13 11:30:53 2007 +0200 @@ -1441,7 +1441,7 @@ #define POINT_MARKER_P(marker) \ (XMARKER (marker)->buffer != 0 && \ - EQ ((marker), XMARKER (marker)->buffer->point_marker)) + EQ (marker, XMARKER (marker)->buffer->point_marker)) #define BUF_MARKERS(buf) ((buf)->markers) diff -r 892ca416f0fb -r 9d177e8d4150 src/cmdloop.c --- a/src/cmdloop.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/cmdloop.c Mon Aug 13 11:30:53 2007 +0200 @@ -518,8 +518,8 @@ like the real thing. This is slightly bogus, but it's in here for compatibility with Emacs 18. It's not even clear what the "right thing" is. */ - if (!(((STRINGP (Vexecuting_macro) || VECTORP (Vexecuting_macro)) - && XINT (Flength (Vexecuting_macro)) == 1))) + if (!((STRINGP (Vexecuting_macro) || VECTORP (Vexecuting_macro)) + && XINT (Flength (Vexecuting_macro)) == 1)) Vlast_command = Qt; #ifndef LISP_COMMAND_LOOP @@ -533,7 +533,7 @@ focus is selected. */ if (focus_follows_mouse) investigate_frame_change (); - + /* Make sure the current window's buffer is selected. */ { Lisp_Object selected_window = Fselected_window (Qnil); diff -r 892ca416f0fb -r 9d177e8d4150 src/config.h.in --- a/src/config.h.in Mon Aug 13 11:30:00 2007 +0200 +++ b/src/config.h.in Mon Aug 13 11:30:53 2007 +0200 @@ -499,6 +499,16 @@ #define CONST const +/* Allow the source to use standard types. Include these before the + s&m files so that they can use them. */ +#undef ssize_t +#undef size_t +#undef pid_t +#undef mode_t +#undef off_t +#undef uid_t +#undef gid_t + /* If defined, use unions instead of ints. A few systems (DEC Alpha) seem to require this, probably because something with the int definitions isn't right with 64-bit systems. */ @@ -550,15 +560,6 @@ #define SIGRETURN return #endif -/* Allow the source to use standard types */ -#undef ssize_t -#undef size_t -#undef pid_t -#undef mode_t -#undef off_t -#undef uid_t -#undef gid_t - /* Define DYNODUMP if it is necessary to properly dump on this system. Currently this is only Solaris 2.x, for x < 6. */ #undef DYNODUMP diff -r 892ca416f0fb -r 9d177e8d4150 src/database.c --- a/src/database.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/database.c Mon Aug 13 11:30:53 2007 +0200 @@ -113,7 +113,6 @@ #define XDATABASE(x) XRECORD (x, database, Lisp_Database) #define XSETDATABASE(x, p) XSETRECORD (x, p, database) #define DATABASEP(x) RECORDP (x, database) -#define GC_DATABASEP(x) GC_RECORDP (x, database) #define CHECK_DATABASE(x) CHECK_RECORD (x, database) #define CONCHECK_DATABASE(x) CONCHECK_RECORD (x, database) #define DATABASE_LIVE_P(x) (x->live_p) diff -r 892ca416f0fb -r 9d177e8d4150 src/editfns.c --- a/src/editfns.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/editfns.c Mon Aug 13 11:30:53 2007 +0200 @@ -440,7 +440,8 @@ DEFUN ("point-min", Fpoint_min, 0, 1, 0, /* Return the minimum permissible value of point in BUFFER. -This is 1, unless narrowing (a buffer restriction) is in effect. +This is 1, unless narrowing (a buffer restriction) +is in effect, in which case it may be greater. If BUFFER is nil, the current buffer is assumed. */ (buffer)) @@ -451,7 +452,8 @@ DEFUN ("point-min-marker", Fpoint_min_marker, 0, 1, 0, /* Return a marker to the minimum permissible value of point in BUFFER. -This is the beginning, unless narrowing (a buffer restriction) is in effect. +This is the beginning, unless narrowing (a buffer restriction) +is in effect, in which case it may be greater. If BUFFER is nil, the current buffer is assumed. */ (buffer)) @@ -463,7 +465,7 @@ DEFUN ("point-max", Fpoint_max, 0, 1, 0, /* Return the maximum permissible value of point in BUFFER. This is (1+ (buffer-size)), unless narrowing (a buffer restriction) -is in effect, in which case it is less. +is in effect, in which case it may be less. If BUFFER is nil, the current buffer is assumed. */ (buffer)) @@ -473,9 +475,9 @@ } DEFUN ("point-max-marker", Fpoint_max_marker, 0, 1, 0, /* -Return a marker to the maximum permissible value of point BUFFER. +Return a marker to the maximum permissible value of point in BUFFER. This is (1+ (buffer-size)), unless narrowing (a buffer restriction) -is in effect, in which case it is less. +is in effect, in which case it may be less. If BUFFER is nil, the current buffer is assumed. */ (buffer)) @@ -564,11 +566,11 @@ } DEFUN ("char-after", Fchar_after, 0, 2, 0, /* -Return character in BUFFER at position POS. -POS is an integer or a buffer pointer. +Return the character at position POS in BUFFER. +POS is an integer or a marker. If POS is out of range, the value is nil. +if POS is nil, the value of point is assumed. If BUFFER is nil, the current buffer is assumed. -if POS is nil, the value of point is assumed. */ (pos, buffer)) { @@ -582,17 +584,17 @@ } DEFUN ("char-before", Fchar_before, 0, 2, 0, /* -Return character in BUFFER before position POS. -POS is an integer or a buffer pointer. +Return the character preceding position POS in BUFFER. +POS is an integer or a marker. If POS is out of range, the value is nil. +if POS is nil, the value of point is assumed. If BUFFER is nil, the current buffer is assumed. -if POS is nil, the value of point is assumed. */ (pos, buffer)) { struct buffer *b = decode_buffer (buffer, 1); - Bufpos n = ((NILP (pos) ? BUF_PT (b) : - get_buffer_pos_char (b, pos, GB_NO_ERROR_IF_BAD))); + Bufpos n = (NILP (pos) ? BUF_PT (b) : + get_buffer_pos_char (b, pos, GB_NO_ERROR_IF_BAD)); n--; @@ -2231,17 +2233,16 @@ ? Qt : Qnil; } -DEFUN ("char=", Fchar_Equal, 2, 3, 0, /* +DEFUN ("char=", Fchar_Equal, 2, 2, 0, /* Return t if two characters match, case is significant. Both arguments must be characters (i.e. NOT integers). -The optional buffer argument is for symmetry and is ignored. */ - (c1, c2, buffer)) + (c1, c2)) { CHECK_CHAR_COERCE_INT (c1); CHECK_CHAR_COERCE_INT (c2); - return XCHAR(c1) == XCHAR(c2) ? Qt : Qnil; + return EQ (c1, c2) ? Qt : Qnil; } #if 0 /* Undebugged FSFmacs code */ diff -r 892ca416f0fb -r 9d177e8d4150 src/elhash.c --- a/src/elhash.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/elhash.c Mon Aug 13 11:30:53 2007 +0200 @@ -70,13 +70,13 @@ #define HASH_TABLE_DEFAULT_REHASH_SIZE 1.3 #define HASH_TABLE_MIN_SIZE 10 -#define HASH_CODE(key, ht) \ - (((((ht)->hash_function ? (ht)->hash_function (key) : LISP_HASH (key)) \ - * (ht)->golden_ratio) \ - % (ht)->size)) +#define HASH_CODE(key, ht) \ +((((ht)->hash_function ? (ht)->hash_function (key) : LISP_HASH (key)) \ + * (ht)->golden_ratio) \ + % (ht)->size) #define KEYS_EQUAL_P(key1, key2, testfun) \ - (EQ ((key1), (key2)) || ((testfun) && (testfun) ((key1), (key2)))) + (EQ (key1, key2) || ((testfun) && (testfun) (key1, key2))) #define LINEAR_PROBING_LOOP(probe, entries, size) \ for (; \ diff -r 892ca416f0fb -r 9d177e8d4150 src/event-msw.c --- a/src/event-msw.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/event-msw.c Mon Aug 13 11:30:53 2007 +0200 @@ -73,7 +73,7 @@ #include #include -#if defined (__CYGWIN32__) && !defined (CYGWIN_VERSION_DLL_MAJOR) +#if defined (__CYGWIN32__) && (CYGWIN_VERSION_DLL_MAJOR < 20) typedef NMHDR *LPNMHDR; #endif diff -r 892ca416f0fb -r 9d177e8d4150 src/event-stream.c --- a/src/event-stream.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/event-stream.c Mon Aug 13 11:30:53 2007 +0200 @@ -384,7 +384,6 @@ XRECORD (x, command_builder, struct command_builder) #define XSETCOMMAND_BUILDER(x, p) XSETRECORD (x, p, command_builder) #define COMMAND_BUILDERP(x) RECORDP (x, command_builder) -#define GC_COMMAND_BUILDERP(x) GC_RECORDP (x, command_builder) #define CHECK_COMMAND_BUILDER(x) CHECK_RECORD (x, command_builder) static Lisp_Object diff -r 892ca416f0fb -r 9d177e8d4150 src/filelock.c --- a/src/filelock.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/filelock.c Mon Aug 13 11:30:53 2007 +0200 @@ -371,7 +371,7 @@ register Lisp_Object tail; register struct buffer *b; - for (tail = Vbuffer_alist; GC_CONSP (tail); tail = XCDR (tail)) + for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) { b = XBUFFER (XCDR (XCAR (tail))); if (STRINGP (b->file_truename) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) diff -r 892ca416f0fb -r 9d177e8d4150 src/floatfns.c --- a/src/floatfns.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/floatfns.c Mon Aug 13 11:30:53 2007 +0200 @@ -705,19 +705,19 @@ double f = extract_float (arg); if (f == 0.0) - return make_int (- (int)((((EMACS_UINT) 1) << (VALBITS - 1)))); /* most-negative-fixnum */ + return make_int (- (EMACS_INT)(((EMACS_UINT) 1) << (VALBITS - 1))); /* most-negative-fixnum */ #ifdef HAVE_LOGB { Lisp_Object val; - IN_FLOAT (val = make_int ((int) logb (f)), "logb", arg); - return (val); + IN_FLOAT (val = make_int ((EMACS_INT) logb (f)), "logb", arg); + return val; } #else #ifdef HAVE_FREXP { int exqp; IN_FLOAT (frexp (f, &exqp), "logb", arg); - return (make_int (exqp - 1)); + return make_int (exqp - 1); } #else { @@ -741,7 +741,7 @@ f /= d; val += i; } - return (make_int (val)); + return make_int (val); } #endif /* ! HAVE_FREXP */ #endif /* ! HAVE_LOGB */ diff -r 892ca416f0fb -r 9d177e8d4150 src/fns.c --- a/src/fns.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/fns.c Mon Aug 13 11:30:53 2007 +0200 @@ -1894,10 +1894,10 @@ { if (!laxp ? EQ (k, keys [i]) : internal_equal (k, keys [i], depth)) { - if ((eqp - /* We narrowly escaped being Ebolified here. */ - ? !EQ_WITH_EBOLA_NOTICE (v, vals [i]) - : !internal_equal (v, vals [i], depth))) + if (eqp + /* We narrowly escaped being Ebolified here. */ + ? !EQ_WITH_EBOLA_NOTICE (v, vals [i]) + : !internal_equal (v, vals [i], depth)) /* a property in B has a different value than in A */ goto MISMATCH; flags [i] = 1; @@ -2864,7 +2864,7 @@ DEFUN ("fillarray", Ffillarray, 2, 2, 0, /* -Store each element of ARRAY with ITEM. +Destructively modify ARRAY by replacing each element with ITEM. ARRAY is a vector, bit vector, or string. */ (array, item)) @@ -2872,15 +2872,28 @@ retry: if (STRINGP (array)) { - Emchar charval; struct Lisp_String *s = XSTRING (array); - Charcount len = string_char_length (s); - Charcount i; + Bytecount old_bytecount = string_length (s); + Bytecount new_bytecount; + Bytecount item_bytecount; + Bufbyte item_buf[MAX_EMCHAR_LEN]; + Bufbyte *p; + Bufbyte *end; + CHECK_CHAR_COERCE_INT (item); CHECK_LISP_WRITEABLE (array); - charval = XCHAR (item); - for (i = 0; i < len; i++) - set_string_char (s, i, charval); + + item_bytecount = set_charptr_emchar (item_buf, XCHAR (item)); + new_bytecount = item_bytecount * string_char_length (s); + + resize_string (s, -1, new_bytecount - old_bytecount); + + for (p = string_data (s), end = p + new_bytecount; + p < end; + p += item_bytecount) + memcpy (p, item_buf, item_bytecount); + *p = '\0'; + bump_string_modiff (array); } else if (VECTORP (array)) @@ -3043,15 +3056,16 @@ } -/* This is the guts of all mapping functions. - Apply fn to each element of seq, one by one, - storing the results into elements of vals, a C vector of Lisp_Objects. - leni is the length of vals, which should also be the length of seq. +/* This is the guts of several mapping functions. + Apply FUNCTION to each element of SEQUENCE, one by one, + storing the results into elements of VALS, a C vector of Lisp_Objects. + LENI is the length of VALS, which should also be the length of SEQUENCE. If VALS is a null pointer, do not accumulate the results. */ static void -mapcar1 (size_t leni, Lisp_Object *vals, Lisp_Object fn, Lisp_Object seq) +mapcar1 (size_t leni, Lisp_Object *vals, + Lisp_Object function, Lisp_Object sequence) { Lisp_Object result; Lisp_Object args[2]; @@ -3064,21 +3078,61 @@ gcpro1.nvars = 0; } - args[0] = fn; - - if (LISTP (seq)) + args[0] = function; + + if (LISTP (sequence)) { - for (i = 0; i < leni; i++) + /* A devious `function' could either: + - insert garbage into the list in front of us, causing XCDR to crash + - amputate the list behind us using (setcdr), causing the remaining + elts to lose their GCPRO status. + + if (vals != 0) we avoid this by copying the elts into the + `vals' array. By a stroke of luck, `vals' is exactly large + enough to hold the elts left to be traversed as well as the + results computed so far. + + if (vals == 0) we don't have any free space available and + don't want to eat up any more stack with alloca(). + So we use EXTERNAL_LIST_LOOP_3 and GCPRO the tail. */ + + if (vals) { - args[1] = XCAR (seq); - seq = XCDR (seq); - result = Ffuncall (2, args); - if (vals) vals[gcpro1.nvars++] = result; + Lisp_Object *val = vals; + Lisp_Object elt; + + LIST_LOOP_2 (elt, sequence) + *val++ = elt; + + gcpro1.nvars = leni; + + for (i = 0; i < leni; i++) + { + args[1] = vals[i]; + vals[i] = Ffuncall (2, args); + } + } + else + { + Lisp_Object elt, tail; + struct gcpro ngcpro1; + + NGCPRO1 (tail); + + { + EXTERNAL_LIST_LOOP_3 (elt, sequence, tail) + { + args[1] = elt; + Ffuncall (2, args); + } + } + + NUNGCPRO; } } - else if (VECTORP (seq)) + else if (VECTORP (sequence)) { - Lisp_Object *objs = XVECTOR_DATA (seq); + Lisp_Object *objs = XVECTOR_DATA (sequence); for (i = 0; i < leni; i++) { args[1] = *objs++; @@ -3086,10 +3140,16 @@ if (vals) vals[gcpro1.nvars++] = result; } } - else if (STRINGP (seq)) + else if (STRINGP (sequence)) { - Bufbyte *p = XSTRING_DATA (seq); - for (i = 0; i < leni; i++) + /* The string data of `sequence' might be relocated during GC. */ + Bytecount slen = XSTRING_LENGTH (sequence); + Bufbyte *p = alloca_array (Bufbyte, slen); + Bufbyte *end = p + slen; + + memcpy (p, XSTRING_DATA (sequence), slen); + + while (p < end) { args[1] = make_char (charptr_emchar (p)); INC_CHARPTR (p); @@ -3097,9 +3157,9 @@ if (vals) vals[gcpro1.nvars++] = result; } } - else if (BIT_VECTORP (seq)) + else if (BIT_VECTORP (sequence)) { - struct Lisp_Bit_Vector *v = XBIT_VECTOR (seq); + struct Lisp_Bit_Vector *v = XBIT_VECTOR (sequence); for (i = 0; i < leni; i++) { args[1] = make_int (bit_vector_bit (v, i)); @@ -3108,20 +3168,21 @@ } } else - abort(); /* cannot get here since Flength(seq) did not get an error */ + abort(); /* cannot get here since Flength(sequence) did not get an error */ if (vals) UNGCPRO; } DEFUN ("mapconcat", Fmapconcat, 3, 3, 0, /* -Apply FN to each element of SEQ, and concat the results as strings. -In between each pair of results, stick in SEP. -Thus, " " as SEP results in spaces between the values returned by FN. +Apply FUNCTION to each element of SEQUENCE, and concat the results as strings. +In between each pair of results, insert SEPARATOR. Thus, using " " as +SEPARATOR results in spaces between the values returned by FUNCTION. +SEQUENCE may be a list, a vector, a bit vector, or a string. */ - (fn, seq, sep)) + (function, sequence, separator)) { - size_t len = XINT (Flength (seq)); + size_t len = XINT (Flength (sequence)); Lisp_Object *args; int i; struct gcpro gcpro1; @@ -3131,47 +3192,47 @@ args = alloca_array (Lisp_Object, nargs); - GCPRO1 (sep); - mapcar1 (len, args, fn, seq); + GCPRO1 (separator); + mapcar1 (len, args, function, sequence); UNGCPRO; for (i = len - 1; i >= 0; i--) args[i + i] = args[i]; for (i = 1; i < nargs; i += 2) - args[i] = sep; + args[i] = separator; return Fconcat (nargs, args); } DEFUN ("mapcar", Fmapcar, 2, 2, 0, /* -Apply FUNCTION to each element of SEQUENCE, and make a list of the results. -The result is a list just as long as SEQUENCE. +Apply FUNCTION to each element of SEQUENCE; return a list of the results. +The result is a list of the same length as SEQUENCE. SEQUENCE may be a list, a vector, a bit vector, or a string. */ - (fn, seq)) + (function, sequence)) { - size_t len = XINT (Flength (seq)); + size_t len = XINT (Flength (sequence)); Lisp_Object *args = alloca_array (Lisp_Object, len); - mapcar1 (len, args, fn, seq); + mapcar1 (len, args, function, sequence); return Flist (len, args); } DEFUN ("mapvector", Fmapvector, 2, 2, 0, /* -Apply FUNCTION to each element of SEQUENCE, making a vector of the results. +Apply FUNCTION to each element of SEQUENCE; return a vector of the results. The result is a vector of the same length as SEQUENCE. -SEQUENCE may be a list, a vector or a string. +SEQUENCE may be a list, a vector, a bit vector, or a string. */ - (fn, seq)) + (function, sequence)) { - size_t len = XINT (Flength (seq)); + size_t len = XINT (Flength (sequence)); Lisp_Object result = make_vector (len, Qnil); struct gcpro gcpro1; GCPRO1 (result); - mapcar1 (len, XVECTOR_DATA (result), fn, seq); + mapcar1 (len, XVECTOR_DATA (result), function, sequence); UNGCPRO; return result; @@ -3186,11 +3247,11 @@ The difference between this and `mapc' is that `mapc' supports all the spiffy Common Lisp arguments. You should normally use `mapc'. */ - (fn, seq)) + (function, sequence)) { - mapcar1 (XINT (Flength (seq)), 0, fn, seq); - - return seq; + mapcar1 (XINT (Flength (sequence)), 0, function, sequence); + + return sequence; } diff -r 892ca416f0fb -r 9d177e8d4150 src/glyphs-msw.c --- a/src/glyphs-msw.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/glyphs-msw.c Mon Aug 13 11:30:53 2007 +0200 @@ -1,6 +1,6 @@ /* mswindows-specific glyph objects. Copyright (C) 1998, 1999 Andy Piper. - + This file is part of XEmacs. XEmacs is free software; you can redistribute it and/or modify it @@ -63,13 +63,13 @@ #endif #ifdef HAVE_TIFF DECLARE_IMAGE_INSTANTIATOR_FORMAT (tiff); -#endif +#endif #ifdef HAVE_PNG DECLARE_IMAGE_INSTANTIATOR_FORMAT (png); -#endif +#endif #ifdef HAVE_GIF DECLARE_IMAGE_INSTANTIATOR_FORMAT (gif); -#endif +#endif #ifdef HAVE_XPM DEFINE_DEVICE_IIFORMAT (mswindows, xpm); #endif @@ -102,7 +102,7 @@ int slices, enum image_instance_type type); static void -mswindows_initialize_image_instance_mask (struct Lisp_Image_Instance* image, +mswindows_initialize_image_instance_mask (struct Lisp_Image_Instance* image, struct frame* f); COLORREF mswindows_string_to_color (CONST char *name); @@ -137,7 +137,7 @@ * structure - unless it has memory / color allocation implications * .... */ bmp_info=xnew_and_zero (BITMAPINFO); - + if (!bmp_info) { return NULL; @@ -145,7 +145,7 @@ bmp_info->bmiHeader.biBitCount=24; /* just RGB triples for now */ bmp_info->bmiHeader.biCompression=BI_RGB; /* just RGB triples for now */ - bmp_info->bmiHeader.biSizeImage=width*height*3; + bmp_info->bmiHeader.biSizeImage=width*height*3; /* bitmap data needs to be in blue, green, red triples - in that order, eimage is in RGB format so we need to convert */ @@ -181,7 +181,7 @@ /* use our quantize table to allocate the colors */ ncolors = qtable->num_active_colors; - bmp_info=(BITMAPINFO*)xmalloc_and_zero (sizeof(BITMAPINFOHEADER) + + bmp_info=(BITMAPINFO*)xmalloc_and_zero (sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * ncolors); if (!bmp_info) { @@ -191,12 +191,12 @@ colortbl=(RGBQUAD*)(((unsigned char*)bmp_info)+sizeof(BITMAPINFOHEADER)); - bmp_info->bmiHeader.biBitCount=8; - bmp_info->bmiHeader.biCompression=BI_RGB; + bmp_info->bmiHeader.biBitCount=8; + bmp_info->bmiHeader.biCompression=BI_RGB; bmp_info->bmiHeader.biSizeImage=bpline*height; - bmp_info->bmiHeader.biClrUsed=ncolors; - bmp_info->bmiHeader.biClrImportant=ncolors; - + bmp_info->bmiHeader.biClrUsed=ncolors; + bmp_info->bmiHeader.biClrImportant=ncolors; + *bmp_data = (unsigned char *) xmalloc_and_zero (bpline * height); *bit_count = bpline * height; @@ -206,7 +206,7 @@ xfree (bmp_info); return NULL; } - + /* build up an RGBQUAD colortable */ for (i = 0; i < qtable->num_active_colors; i++) { colortbl[i].rgbRed = (BYTE) qtable->rm[i]; @@ -228,14 +228,14 @@ } } xfree (qtable); - } + } /* fix up the standard stuff */ bmp_info->bmiHeader.biWidth=width; bmp_info->bmiHeader.biHeight=height; bmp_info->bmiHeader.biPlanes=1; bmp_info->bmiHeader.biSize=sizeof(BITMAPINFOHEADER); bmp_info->bmiHeader.biXPelsPerMeter=0; /* unless you know better */ - bmp_info->bmiHeader.biYPelsPerMeter=0; + bmp_info->bmiHeader.biYPelsPerMeter=0; return bmp_info; } @@ -273,7 +273,7 @@ locate_file (temp, name, Qnil, &found, R_OK); UNGCPRO; } - + return found; } @@ -292,7 +292,7 @@ void *bmp_data, int bmp_bits, int slices, - Lisp_Object instantiator, + Lisp_Object instantiator, int x_hot, int y_hot, int create_mask) { @@ -311,20 +311,20 @@ signal_simple_error ("No selected frame on mswindows device", device); f = XFRAME (DEVICE_SELECTED_FRAME (d)); - + if (dest_mask & IMAGE_COLOR_PIXMAP_MASK) type = IMAGE_COLOR_PIXMAP; else if (dest_mask & IMAGE_POINTER_MASK) type = IMAGE_POINTER; - else + else incompatible_image_types (instantiator, dest_mask, IMAGE_COLOR_PIXMAP_MASK | IMAGE_POINTER_MASK); hdc = FRAME_MSWINDOWS_CDC (f); - bitmap=CreateDIBSection (hdc, + bitmap=CreateDIBSection (hdc, bmp_info, DIB_RGB_COLORS, - &bmp_buf, + &bmp_buf, 0,0); if (!bitmap || !bmp_buf) @@ -352,7 +352,7 @@ { mswindows_initialize_image_instance_mask (ii, f); } - + if (type == IMAGE_POINTER) { mswindows_initialize_image_instance_icon(ii, TRUE); @@ -372,12 +372,12 @@ struct frame *f = XFRAME (DEVICE_SELECTED_FRAME (d)); void* bmp_buf=0; HDC hdc = FRAME_MSWINDOWS_CDC (f); - HBITMAP bitmap = CreateDIBSection (hdc, + HBITMAP bitmap = CreateDIBSection (hdc, bmp_info, DIB_RGB_COLORS, - &bmp_buf, + &bmp_buf, 0,0); - + if (!bitmap || !bmp_buf) signal_simple_error ("Unable to create bitmap", instantiator); @@ -390,7 +390,7 @@ mswindows_init_image_instance_from_eimage (struct Lisp_Image_Instance *ii, int width, int height, int slices, - unsigned char *eimage, + unsigned char *eimage, int dest_mask, Lisp_Object instantiator, Lisp_Object domain) @@ -401,19 +401,19 @@ int bmp_bits; COLORREF bkcolor; int slice; - + if (!DEVICE_MSWINDOWS_P (XDEVICE (device))) signal_simple_error ("Not an mswindows device", device); /* this is a hack but MaskBlt and TransparentBlt are not supported on most windows variants */ - bkcolor = COLOR_INSTANCE_MSWINDOWS_COLOR + bkcolor = COLOR_INSTANCE_MSWINDOWS_COLOR (XCOLOR_INSTANCE (FACE_BACKGROUND (Vdefault_face, domain))); for (slice = 0; slice < slices; slice++) { /* build a bitmap from the eimage */ - if (!(bmp_info=convert_EImage_to_DIBitmap (device, width, height, + if (!(bmp_info=convert_EImage_to_DIBitmap (device, width, height, eimage + (width * height * 3 * slice), &bmp_bits, &bmp_data))) { @@ -429,46 +429,46 @@ else image_instance_add_dibitmap (ii, bmp_info, bmp_data, bmp_bits, slice, instantiator); - + xfree (bmp_info); xfree (bmp_data); } } -static void set_mono_pixel ( unsigned char* bits, - int bpline, int height, - int x, int y, int white ) -{ +static void set_mono_pixel ( unsigned char* bits, + int bpline, int height, + int x, int y, int white ) +{ int index; - unsigned char bitnum; + unsigned char bitnum; /* Find the byte on which this scanline begins */ - index = (height - y - 1) * bpline; + index = (height - y - 1) * bpline; /* Find the byte containing this pixel */ - index += (x >> 3); + index += (x >> 3); /* Which bit is it? */ - bitnum = (unsigned char)( 7 - (x % 8) ); + bitnum = (unsigned char)( 7 - (x % 8) ); if( white ) /* Turn it on */ bits[index] |= (1<bmiHeader.biHeight = height; bmp_info->bmiHeader.biPlanes=1; bmp_info->bmiHeader.biSize=sizeof(BITMAPINFOHEADER); - bmp_info->bmiHeader.biBitCount=1; - bmp_info->bmiHeader.biCompression=BI_RGB; - bmp_info->bmiHeader.biClrUsed = 2; - bmp_info->bmiHeader.biClrImportant = 2; - bmp_info->bmiHeader.biSizeImage = height * maskbpline; + bmp_info->bmiHeader.biBitCount=1; + bmp_info->bmiHeader.biCompression=BI_RGB; + bmp_info->bmiHeader.biClrUsed = 2; + bmp_info->bmiHeader.biClrImportant = 2; + bmp_info->bmiHeader.biSizeImage = height * maskbpline; bmp_info->bmiColors[0].rgbRed = 0; bmp_info->bmiColors[0].rgbGreen = 0; bmp_info->bmiColors[0].rgbBlue = 0; @@ -490,11 +490,11 @@ bmp_info->bmiColors[1].rgbGreen = 255; bmp_info->bmiColors[1].rgbBlue = 255; bmp_info->bmiColors[0].rgbReserved = 0; - - if (!(mask = CreateDIBSection (hcdc, + + if (!(mask = CreateDIBSection (hcdc, bmp_info, DIB_RGB_COLORS, - &and_bits, + &and_bits, 0,0))) { xfree (bmp_info); @@ -509,10 +509,10 @@ bmp_info->bmiHeader.biHeight = -height; bmp_info->bmiHeader.biPlanes=1; bmp_info->bmiHeader.biSize=sizeof(BITMAPINFOHEADER); - bmp_info->bmiHeader.biBitCount=24; - bmp_info->bmiHeader.biCompression=BI_RGB; - bmp_info->bmiHeader.biClrUsed = 0; - bmp_info->bmiHeader.biClrImportant = 0; + bmp_info->bmiHeader.biBitCount=24; + bmp_info->bmiHeader.biCompression=BI_RGB; + bmp_info->bmiHeader.biClrUsed = 0; + bmp_info->bmiHeader.biClrImportant = 0; bmp_info->bmiHeader.biSizeImage = height * bpline; dibits = xmalloc_and_zero (bpline * height); @@ -530,19 +530,19 @@ /* now set the colored bits in the mask and transparent ones to black in the original */ - for(i=0; ibfOffBits; @@ -1036,9 +1036,9 @@ static void mswindows_resource_validate (Lisp_Object instantiator) { - if ((NILP (find_keyword_in_vector (instantiator, Q_file)) + if ((NILP (find_keyword_in_vector (instantiator, Q_file)) && - NILP (find_keyword_in_vector (instantiator, Q_resource_id))) + NILP (find_keyword_in_vector (instantiator, Q_resource_id))) || NILP (find_keyword_in_vector (instantiator, Q_resource_type))) signal_simple_error ("Must supply :file, :resource-id and :resource-type", @@ -1055,7 +1055,7 @@ GCPRO2 (file, alist); - file = potential_pixmap_file_instantiator (inst, Q_file, Q_data, + file = potential_pixmap_file_instantiator (inst, Q_file, Q_data, console_type); if (CONSP (file)) /* failure locating filename */ @@ -1086,7 +1086,7 @@ return IMAGE_POINTER_MASK | IMAGE_COLOR_PIXMAP_MASK; } -typedef struct +typedef struct { char *name; int resource_id; @@ -1105,7 +1105,7 @@ #endif #endif -static CONST resource_t bitmap_table[] = +static CONST resource_t bitmap_table[] = { /* bitmaps */ { "close", OBM_CLOSE }, @@ -1137,7 +1137,7 @@ {0} }; -static CONST resource_t cursor_table[] = +static CONST resource_t cursor_table[] = { /* cursors */ { "normal", OCR_NORMAL }, @@ -1156,7 +1156,7 @@ { 0 } }; -static CONST resource_t icon_table[] = +static CONST resource_t icon_table[] = { /* icons */ { "sample", OIC_SAMPLE }, @@ -1170,8 +1170,8 @@ static int resource_name_to_resource (Lisp_Object name, int type) { - CONST resource_t* res = (type == IMAGE_CURSOR ? cursor_table - : type == IMAGE_ICON ? icon_table + CONST resource_t* res = (type == IMAGE_CURSOR ? cursor_table + : type == IMAGE_ICON ? icon_table : bitmap_table); if (INTP (name)) @@ -1182,7 +1182,7 @@ { signal_simple_error ("invalid resource identifier", name); } - + do { Extbyte* nm=0; GET_C_STRING_OS_DATA_ALLOCA (name, nm); @@ -1221,9 +1221,9 @@ Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); Lisp_Object file = find_keyword_in_vector (instantiator, Q_file); - Lisp_Object resource_type = find_keyword_in_vector (instantiator, + Lisp_Object resource_type = find_keyword_in_vector (instantiator, Q_resource_type); - Lisp_Object resource_id = find_keyword_in_vector (instantiator, + Lisp_Object resource_id = find_keyword_in_vector (instantiator, Q_resource_id); xzero (iconinfo); @@ -1237,7 +1237,7 @@ iitype = IMAGE_POINTER; else if (dest_mask & IMAGE_COLOR_PIXMAP_MASK) iitype = IMAGE_COLOR_PIXMAP; - else + else incompatible_image_types (instantiator, dest_mask, IMAGE_COLOR_PIXMAP_MASK | IMAGE_POINTER_MASK); @@ -1251,7 +1251,7 @@ #else fname = f; #endif - + if (NILP (resource_id)) resid = (LPCTSTR)fname; else @@ -1260,7 +1260,7 @@ LOAD_LIBRARY_AS_DATAFILE); resid = MAKEINTRESOURCE (resource_name_to_resource (resource_id, type)); - + if (!resid) GET_C_STRING_OS_DATA_ALLOCA (resource_id, resid); } @@ -1268,11 +1268,11 @@ else if (!(resid = MAKEINTRESOURCE (resource_name_to_resource (resource_id, type)))) signal_simple_error ("Invalid resource identifier", resource_id); - + /* load the image */ if (!(himage = LoadImage (hinst, resid, type, 0, 0, - LR_CREATEDIBSECTION | LR_DEFAULTSIZE | - LR_SHARED | + LR_CREATEDIBSECTION | LR_DEFAULTSIZE | + LR_SHARED | (!NILP (file) ? LR_LOADFROMFILE : 0)))) { signal_simple_error ("Cannot load image", instantiator); @@ -1284,9 +1284,9 @@ mswindows_initialize_dibitmap_image_instance (ii, 1, iitype); IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = file; - IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = + IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = GetSystemMetrics (type == IMAGE_CURSOR ? SM_CXCURSOR : SM_CXICON); - IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) = + IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) = GetSystemMetrics (type == IMAGE_CURSOR ? SM_CYCURSOR : SM_CYICON); IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = 1; @@ -1383,7 +1383,7 @@ * and return data * * Note that this file and ../X/XRdBitF.c look very similar.... Keep them - * that way (but don't use common source code so that people can have one + * that way (but don't use common source code so that people can have one * without the other). */ @@ -1433,7 +1433,7 @@ hexTable[' '] = -1; hexTable[','] = -1; hexTable['}'] = -1; hexTable['\n'] = -1; hexTable['\t'] = -1; - + initialized = TRUE; } @@ -1446,7 +1446,7 @@ int value = 0; int gotone = 0; int done = 0; - + /* loop, accumulate hex value until find delimiter */ /* skip any initial delimiters found in read stream */ @@ -1527,7 +1527,7 @@ } continue; } - + if (sscanf(line, "static short %s = {", name_and_type) == 1) version10p = 1; else if (sscanf(line,"static unsigned char %s = {",name_and_type) == 1) @@ -1544,7 +1544,7 @@ if (strcmp("bits[]", type)) continue; - + if (!ww || !hh) RETURN (BitmapFileInvalid); @@ -1557,7 +1557,7 @@ size = bytes_per_line * hh; data = (unsigned char *) Xmalloc ((unsigned int) size); - if (!data) + if (!data) RETURN (BitmapNoMemory); if (version10p) { @@ -1576,7 +1576,7 @@ int bytes; for (bytes=0, ptr=data; bytesbmiHeader.biHeight=-(LONG)height; bmp_info->bmiHeader.biPlanes=1; bmp_info->bmiHeader.biSize=sizeof(BITMAPINFOHEADER); - bmp_info->bmiHeader.biBitCount=1; + bmp_info->bmiHeader.biBitCount=1; bmp_info->bmiHeader.biCompression=BI_RGB; - bmp_info->bmiHeader.biClrUsed = 2; - bmp_info->bmiHeader.biClrImportant = 2; - bmp_info->bmiHeader.biSizeImage = height * new_width; + bmp_info->bmiHeader.biClrUsed = 2; + bmp_info->bmiHeader.biClrImportant = 2; + bmp_info->bmiHeader.biSizeImage = height * new_width; bmp_info->bmiColors[0].rgbRed = GetRValue (fg); bmp_info->bmiColors[0].rgbGreen = GetGValue (fg); bmp_info->bmiColors[0].rgbBlue = GetBValue (fg); @@ -1694,21 +1694,21 @@ bmp_info->bmiColors[1].rgbGreen = GetGValue (bg); bmp_info->bmiColors[1].rgbBlue = GetBValue (bg); bmp_info->bmiColors[1].rgbReserved = 0; - - bitmap = CreateDIBSection (hdc, + + bitmap = CreateDIBSection (hdc, bmp_info, DIB_RGB_COLORS, - &bmp_buf, + &bmp_buf, 0,0); xfree (bmp_info); - + if (!bitmap || !bmp_buf) { xfree (new_data); return NULL; } - + /* copy in the actual bitmap */ memcpy (bmp_buf, new_data, height * new_width); xfree (new_data); @@ -1764,7 +1764,7 @@ | IMAGE_POINTER_MASK); mswindows_initialize_dibitmap_image_instance (ii, 1, type); - + IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = find_keyword_in_vector (instantiator, Q_file); IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = width; @@ -1773,14 +1773,14 @@ XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii), 0); XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii), 0); IMAGE_INSTANCE_MSWINDOWS_MASK (ii) = mask ? mask : - xbm_create_bitmap_from_data (hdc, (Extbyte *) bits, width, height, + xbm_create_bitmap_from_data (hdc, (Extbyte *) bits, width, height, TRUE, black, white); switch (type) { case IMAGE_MONO_PIXMAP: - IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii) = - xbm_create_bitmap_from_data (hdc, (Extbyte *) bits, width, height, + IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii) = + xbm_create_bitmap_from_data (hdc, (Extbyte *) bits, width, height, FALSE, black, black); break; @@ -1808,8 +1808,8 @@ IMAGE_INSTANCE_PIXMAP_FG (ii) = foreground; IMAGE_INSTANCE_PIXMAP_BG (ii) = background; - IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii) = - xbm_create_bitmap_from_data (hdc, (Extbyte *) bits, width, height, + IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii) = + xbm_create_bitmap_from_data (hdc, (Extbyte *) bits, width, height, FALSE, fg, black); } break; @@ -1824,9 +1824,9 @@ if (NILP (background)) background = pointer_bg; - IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii) = + IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii) = find_keyword_in_vector (instantiator, Q_hotspot_x); - IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii) = + IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii) = find_keyword_in_vector (instantiator, Q_hotspot_y); IMAGE_INSTANCE_PIXMAP_FG (ii) = foreground; IMAGE_INSTANCE_PIXMAP_BG (ii) = background; @@ -1835,8 +1835,8 @@ if (COLOR_INSTANCEP (background)) bg = COLOR_INSTANCE_MSWINDOWS_COLOR (XCOLOR_INSTANCE (background)); - IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii) = - xbm_create_bitmap_from_data (hdc, (Extbyte *) bits, width, height, + IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii) = + xbm_create_bitmap_from_data (hdc, (Extbyte *) bits, width, height, TRUE, fg, black); mswindows_initialize_image_instance_icon (ii, TRUE); } @@ -1857,7 +1857,7 @@ Lisp_Object mask_data = find_keyword_in_vector (instantiator, Q_mask_data); Lisp_Object mask_file = find_keyword_in_vector (instantiator, Q_mask_file); struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); - struct frame* f = XFRAME (DEVICE_SELECTED_FRAME + struct frame* f = XFRAME (DEVICE_SELECTED_FRAME (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)))); HDC hdc = FRAME_MSWINDOWS_CDC (f); HBITMAP mask = 0; @@ -1885,7 +1885,7 @@ /* Instantiate method for XBM's. */ static void -mswindows_xbm_instantiate (Lisp_Object image_instance, +mswindows_xbm_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain) @@ -2007,12 +2007,12 @@ case IMAGE_MONO_PIXMAP: case IMAGE_COLOR_PIXMAP: case IMAGE_POINTER: - sprintf (buf, " (0x%lx", + sprintf (buf, " (0x%lx", (unsigned long) IMAGE_INSTANCE_MSWINDOWS_BITMAP (p)); write_c_string (buf, printcharfun); if (IMAGE_INSTANCE_MSWINDOWS_MASK (p)) { - sprintf (buf, "/0x%lx", + sprintf (buf, "/0x%lx", (unsigned long) IMAGE_INSTANCE_MSWINDOWS_MASK (p)); write_c_string (buf, printcharfun); } @@ -2034,7 +2034,7 @@ if (DEVICE_LIVE_P (XDEVICE (p->device))) { if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET - || + || IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW) { #ifdef DEBUG_WIDGETS @@ -2092,8 +2092,8 @@ { if (IMAGE_INSTANCE_SUBWINDOW_ID (p)) { - SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), - NULL, + SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), + NULL, 0, 0, 0, 0, SWP_HIDEWINDOW | SWP_NOMOVE | SWP_NOSIZE | SWP_NOSENDCHANGING); @@ -2108,32 +2108,32 @@ { /* move the window before mapping it ... */ SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), - NULL, + NULL, x, y, dga->width, dga->height, - SWP_NOZORDER + SWP_NOZORDER | SWP_NOCOPYBITS | SWP_NOSENDCHANGING); /* ... adjust the child ... */ SetWindowPos (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), - NULL, + NULL, -dga->xoffset, -dga->yoffset, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOCOPYBITS | SWP_NOSENDCHANGING); /* ... now map it - we are not allowed to move it at the same time. */ - SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), - NULL, + SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p), + NULL, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE - | SWP_SHOWWINDOW | SWP_NOCOPYBITS + | SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOSENDCHANGING); } /* resize the subwindow instance */ -static void +static void mswindows_resize_subwindow (struct Lisp_Image_Instance* ii, int w, int h) { /* Set the size of the control .... */ - SetWindowPos (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii), - NULL, + SetWindowPos (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii), + NULL, 0, 0, w, h, SWP_NOZORDER | SWP_NOMOVE | SWP_NOCOPYBITS | SWP_NOSENDCHANGING); @@ -2150,8 +2150,8 @@ if ( EQ (IMAGE_INSTANCE_WIDGET_TYPE (p), Qbutton)) { if (gui_item_selected_p (IMAGE_INSTANCE_WIDGET_ITEM (p))) - SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), - BM_SETCHECK, (WPARAM)BST_CHECKED, 0); + SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), + BM_SETCHECK, (WPARAM)BST_CHECKED, 0); else SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0); @@ -2159,12 +2159,12 @@ /* set the widget font from the widget face */ SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), - WM_SETFONT, - (WPARAM)FONT_INSTANCE_MSWINDOWS_HFONT + WM_SETFONT, + (WPARAM)FONT_INSTANCE_MSWINDOWS_HFONT (XFONT_INSTANCE (widget_face_font_info - (IMAGE_INSTANCE_SUBWINDOW_FRAME (p), + (IMAGE_INSTANCE_SUBWINDOW_FRAME (p), IMAGE_INSTANCE_WIDGET_FACE (p), - 0, 0))), + 0, 0))), MAKELPARAM (TRUE, 0)); } } @@ -2228,21 +2228,21 @@ NULL, /* No menu */ NULL, /* must be null for this class */ NULL)) == NULL) - signal_simple_error ("window creation failed with code", + signal_simple_error ("window creation failed with code", make_int (GetLastError())); - wnd = CreateWindow( "STATIC", + wnd = CreateWindow( "STATIC", "", - WS_CHILD, + WS_CHILD, 0, /* starting x position */ 0, /* starting y position */ IMAGE_INSTANCE_WIDGET_WIDTH (ii), IMAGE_INSTANCE_WIDGET_HEIGHT (ii), IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (ii), 0, - (HINSTANCE) + (HINSTANCE) GetWindowLong (FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), - GWL_HINSTANCE), + GWL_HINSTANCE), NULL); SetWindowLong (wnd, GWL_USERDATA, (LONG)LISP_TO_VOID(image_instance)); @@ -2258,11 +2258,11 @@ case IMAGE_MONO_PIXMAP: case IMAGE_COLOR_PIXMAP: case IMAGE_POINTER: - if (IMAGE_INSTANCE_MSWINDOWS_BITMAP (p1) + if (IMAGE_INSTANCE_MSWINDOWS_BITMAP (p1) != IMAGE_INSTANCE_MSWINDOWS_BITMAP (p2)) return 0; break; - + default: break; } @@ -2279,7 +2279,7 @@ case IMAGE_COLOR_PIXMAP: case IMAGE_POINTER: return (unsigned long) IMAGE_INSTANCE_MSWINDOWS_BITMAP (p); - + default: return 0; } @@ -2305,7 +2305,7 @@ IMAGE_INSTANCE_PIXMAP_FG (ii) = Qnil; IMAGE_INSTANCE_PIXMAP_BG (ii) = Qnil; IMAGE_INSTANCE_PIXMAP_MAXSLICE (ii) = slices; - IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES (ii) = + IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES (ii) = xnew_array_and_zero (HBITMAP, slices); } @@ -2368,12 +2368,12 @@ (HMENU)id, /* No menu */ NULL, /* must be null for this class */ NULL)) == NULL) - signal_simple_error ("window creation failed with code", + signal_simple_error ("window creation failed with code", make_int (GetLastError())); - if ((wnd = CreateWindowEx( + if ((wnd = CreateWindowEx( exflags /* | WS_EX_NOPARENTNOTIFY*/, - class, + class, nm, flags | WS_CHILD | WS_VISIBLE, 0, /* starting x position */ @@ -2383,23 +2383,23 @@ /* parent window */ IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (ii), (HMENU)id, /* No menu */ - (HINSTANCE) - GetWindowLong + (HINSTANCE) + GetWindowLong (FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), - GWL_HINSTANCE), + GWL_HINSTANCE), NULL)) == NULL) - signal_simple_error ("window creation failed with code", + signal_simple_error ("window creation failed with code", make_int (GetLastError())); IMAGE_INSTANCE_SUBWINDOW_ID (ii) = wnd; SetWindowLong (wnd, GWL_USERDATA, (LONG)LISP_TO_VOID(image_instance)); /* set the widget font from the widget face */ - SendMessage (wnd, WM_SETFONT, - (WPARAM)FONT_INSTANCE_MSWINDOWS_HFONT - (XFONT_INSTANCE (widget_face_font_info - (domain, + SendMessage (wnd, WM_SETFONT, + (WPARAM)FONT_INSTANCE_MSWINDOWS_HFONT + (XFONT_INSTANCE (widget_face_font_info + (domain, IMAGE_INSTANCE_WIDGET_FACE (ii), - 0, 0))), + 0, 0))), MAKELPARAM (TRUE, 0)); } @@ -2432,7 +2432,7 @@ glyph = glyph_image_instance (glyph, domain, ERROR_ME, 1); if (IMAGE_INSTANCEP (glyph)) - flags |= XIMAGE_INSTANCE_MSWINDOWS_BITMAP (glyph) ? + flags |= XIMAGE_INSTANCE_MSWINDOWS_BITMAP (glyph) ? BS_BITMAP : BS_ICON; } @@ -2450,20 +2450,20 @@ flags |= BS_DEFPUSHBUTTON; mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, - pointer_bg, dest_mask, domain, "BUTTON", flags, + pointer_bg, dest_mask, domain, "BUTTON", flags, WS_EX_CONTROLPARENT); wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); /* set the checked state */ if (gui_item_selected_p (gui)) - SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_CHECKED, 0); + SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_CHECKED, 0); else SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0); /* add the image if one was given */ if (!NILP (glyph) && IMAGE_INSTANCEP (glyph)) { - SendMessage (wnd, BM_SETIMAGE, - (WPARAM) (XIMAGE_INSTANCE_MSWINDOWS_BITMAP (glyph) ? + SendMessage (wnd, BM_SETIMAGE, + (WPARAM) (XIMAGE_INSTANCE_MSWINDOWS_BITMAP (glyph) ? IMAGE_BITMAP : IMAGE_ICON), (LPARAM) (XIMAGE_INSTANCE_MSWINDOWS_BITMAP (glyph) ? XIMAGE_INSTANCE_MSWINDOWS_BITMAP (glyph) : @@ -2478,7 +2478,7 @@ int dest_mask, Lisp_Object domain) { mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, - pointer_bg, dest_mask, domain, "EDIT", + pointer_bg, dest_mask, domain, "EDIT", ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP | WS_BORDER, WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT); @@ -2493,24 +2493,24 @@ HWND wnd; struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, - pointer_bg, dest_mask, domain, PROGRESS_CLASS, + pointer_bg, dest_mask, domain, PROGRESS_CLASS, WS_TABSTOP | WS_BORDER | PBS_SMOOTH, WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT); wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); /* set the colors */ #ifdef PBS_SETBKCOLOR - SendMessage (wnd, PBS_SETBKCOLOR, 0, - (LPARAM) (COLOR_INSTANCE_MSWINDOWS_COLOR - (XCOLOR_INSTANCE - (FACE_BACKGROUND + SendMessage (wnd, PBS_SETBKCOLOR, 0, + (LPARAM) (COLOR_INSTANCE_MSWINDOWS_COLOR + (XCOLOR_INSTANCE + (FACE_BACKGROUND (XIMAGE_INSTANCE_WIDGET_FACE (ii), XIMAGE_INSTANCE_SUBWINDOW_FRAME (ii)))))); #endif #ifdef PBS_SETBARCOLOR - SendMessage (wnd, PBS_SETBARCOLOR, 0, - (L:PARAM) (COLOR_INSTANCE_MSWINDOWS_COLOR - (XCOLOR_INSTANCE - (FACE_FOREGROUND + SendMessage (wnd, PBS_SETBARCOLOR, 0, + (L:PARAM) (COLOR_INSTANCE_MSWINDOWS_COLOR + (XCOLOR_INSTANCE + (FACE_FOREGROUND (XIMAGE_INSTANCE_WIDGET_FACE (ii), XIMAGE_INSTANCE_SUBWINDOW_FRAME (ii)))))); #endif @@ -2528,12 +2528,12 @@ tvitem.hInsertAfter = TVI_LAST; tvitem.item.mask = TVIF_TEXT | TVIF_CHILDREN; tvitem.item.cChildren = children; - + if (GUI_ITEMP (item)) { tvitem.item.lParam = mswindows_register_gui_item (item, domain); tvitem.item.mask |= TVIF_PARAM; - GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (item)->name, + GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (item)->name, tvitem.item.pszText); } else @@ -2541,7 +2541,7 @@ tvitem.item.cchTextMax = strlen (tvitem.item.pszText); - if ((ret = (HTREEITEM)SendMessage (wnd, TVM_INSERTITEM, + if ((ret = (HTREEITEM)SendMessage (wnd, TVM_INSERTITEM, 0, (LPARAM)&tvitem)) == 0) signal_simple_error ("error adding tree view entry", item); @@ -2576,18 +2576,18 @@ HTREEITEM parent; struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, - pointer_bg, dest_mask, domain, WC_TREEVIEW, + pointer_bg, dest_mask, domain, WC_TREEVIEW, WS_TABSTOP | WS_BORDER | PBS_SMOOTH | TVS_HASLINES | TVS_HASBUTTONS, WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT); wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); - + /* define a root */ - parent = add_tree_item (image_instance, wnd, NULL, - XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)), + parent = add_tree_item (image_instance, wnd, NULL, + XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)), TRUE, domain); - + /* recursively add items to the tree view */ /* add items to the tab */ LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii))) @@ -2607,12 +2607,12 @@ TC_ITEM tvitem, *ret; tvitem.mask = TCIF_TEXT; - + if (GUI_ITEMP (item)) { tvitem.lParam = mswindows_register_gui_item (item, domain); tvitem.mask |= TCIF_PARAM; - GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (item)->name, + GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (item)->name, tvitem.pszText); } else @@ -2623,7 +2623,7 @@ tvitem.cchTextMax = strlen (tvitem.pszText); - if ((ret = (TC_ITEM*)SendMessage (wnd, TCM_INSERTITEM, + if ((ret = (TC_ITEM*)SendMessage (wnd, TCM_INSERTITEM, index, (LPARAM)&tvitem)) < 0) signal_simple_error ("error adding tab entry", item); @@ -2640,7 +2640,7 @@ int index = 0; struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, - pointer_bg, dest_mask, domain, WC_TABCONTROL, + pointer_bg, dest_mask, domain, WC_TABCONTROL, /* borders don't suit tabs so well */ WS_TABSTOP, WS_EX_CONTROLPARENT); @@ -2670,15 +2670,15 @@ /* delete the pre-existing items */ SendMessage (wnd, TCM_DELETEALLITEMS, 0, 0); - - IMAGE_INSTANCE_WIDGET_ITEMS (ii) = - Fcons (XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)), + + IMAGE_INSTANCE_WIDGET_ITEMS (ii) = + Fcons (XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)), parse_gui_item_tree_children (val)); /* add items to the tab */ LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii))) { - add_tab_item (image_instance, wnd, XCAR (rest), + add_tab_item (image_instance, wnd, XCAR (rest), IMAGE_INSTANCE_SUBWINDOW_FRAME (ii), index); index++; } @@ -2695,7 +2695,7 @@ int dest_mask, Lisp_Object domain) { mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, - pointer_bg, dest_mask, domain, "STATIC", + pointer_bg, dest_mask, domain, "STATIC", 0, WS_EX_STATICEDGE); } @@ -2706,7 +2706,7 @@ int dest_mask, Lisp_Object domain) { mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, - pointer_bg, dest_mask, domain, "SCROLLBAR", + pointer_bg, dest_mask, domain, "SCROLLBAR", 0, WS_EX_CLIENTEDGE ); } @@ -2735,14 +2735,14 @@ pointer_bg, dest_mask, domain, len + 1, 0, 0); mswindows_widget_instantiate (image_instance, instantiator, pointer_fg, - pointer_bg, dest_mask, domain, "COMBOBOX", + pointer_bg, dest_mask, domain, "COMBOBOX", WS_BORDER | WS_TABSTOP | CBS_DROPDOWN - | CBS_AUTOHSCROLL + | CBS_AUTOHSCROLL | CBS_HASSTRINGS | WS_VSCROLL, WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT); /* reset the height */ - widget_text_to_pixel_conversion (domain, - IMAGE_INSTANCE_WIDGET_FACE (ii), 1, 0, + widget_text_to_pixel_conversion (domain, + IMAGE_INSTANCE_WIDGET_FACE (ii), 1, 0, &IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii), 0); wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); /* add items to the combo box */ @@ -2767,7 +2767,7 @@ { Extcount len = SendMessage (wnd, WM_GETTEXTLENGTH, 0, 0); Extbyte* buf =alloca (len+1); - + SendMessage (wnd, WM_GETTEXT, (WPARAM)len+1, (LPARAM) buf); return build_ext_string (buf, FORMAT_OS); } @@ -2920,13 +2920,13 @@ #endif #ifdef HAVE_TIFF IIFORMAT_VALID_CONSOLE (mswindows, tiff); -#endif +#endif #ifdef HAVE_PNG IIFORMAT_VALID_CONSOLE (mswindows, png); -#endif +#endif #ifdef HAVE_GIF IIFORMAT_VALID_CONSOLE (mswindows, gif); -#endif +#endif #ifdef HAVE_WIDGETS /* button widget */ INITIALIZE_DEVICE_IIFORMAT (mswindows, button); @@ -2935,7 +2935,7 @@ INITIALIZE_DEVICE_IIFORMAT (mswindows, edit_field); IIFORMAT_HAS_DEVMETHOD (mswindows, edit_field, instantiate); - + INITIALIZE_DEVICE_IIFORMAT (mswindows, subwindow); IIFORMAT_HAS_DEVMETHOD (mswindows, subwindow, instantiate); @@ -2991,7 +2991,7 @@ IIFORMAT_HAS_METHOD (mswindows_resource, possible_dest_types); IIFORMAT_HAS_METHOD (mswindows_resource, instantiate); - IIFORMAT_VALID_KEYWORD (mswindows_resource, Q_resource_type, + IIFORMAT_VALID_KEYWORD (mswindows_resource, Q_resource_type, check_valid_resource_symbol); IIFORMAT_VALID_KEYWORD (mswindows_resource, Q_resource_id, check_valid_resource_id); IIFORMAT_VALID_KEYWORD (mswindows_resource, Q_file, check_valid_string); diff -r 892ca416f0fb -r 9d177e8d4150 src/glyphs-widget.c --- a/src/glyphs-widget.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/glyphs-widget.c Mon Aug 13 11:30:53 2007 +0200 @@ -599,7 +599,49 @@ return inst; } -/* Instantiate a layout widget. */ +/* Instantiate a layout widget. Sizing commentary: we have a number of + problems that we would like to address. Some consider some of these + more important than others. Currently size information is + determined at instantiation time and is then fixed forever + after. Generally this is not what we want. Users want size to be + "big enough" to accommodate whatever they are trying to show and + this is dependent on text length, lines, font metrics etc. Of + course these attributes can change dynamically and so the size + should changed dynamically also. Only in a few limited cases should + the size be fixed and remain fixed. Of course this actually means + that we don't really want to specifiy the size *at all* for most + widgets - we want it to be discovered dynamically. Thus we can + envisage the following scenarios: + + 1. A button is sized to accommodate its text, the text changes and the + button should change size also. + + 2. A button is given an explicit size. Its size should never change. + + 3. Layout is put inside an area. The size of the area changes, the + layout should change with it. + + 4. A button grows to accommodate additional text. The whitespace + around it should be modified to cope with the new layout + requirements. + + 5. A button grows. The area surrounding it should grow also if + possible. + + What metrics are important? + 1. Actual width and height. + + 2. Whether the width and height are what the widget actually wants, or + whether it can grow or shrink. + + Text glyphs are particularly troublesome since their metrics depend + on the context in which they are being viewed. For instance they + can appear differently depending on the window face, frame face or + glyph face. All other glyphs are essentially fixed in + appearance. Perhaps the problem is that text glyphs are cached on a + device basis like most other glyphs. Instead they should be cached + per-window and then the instance would be fixed and we wouldn't + have to mess around with font metrics and the rest. */ static void layout_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, @@ -795,19 +837,19 @@ image_instantiator_format_create_glyphs_widget (void) { #define VALID_GUI_KEYWORDS(type) \ - IIFORMAT_VALID_KEYWORD (type, Q_active, check_valid_anything); \ - IIFORMAT_VALID_KEYWORD (type, Q_suffix, check_valid_anything); \ + IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_active, check_valid_anything); \ + IIFORMAT_VALID_KEYWORD (type, Q_suffix, check_valid_anything); \ IIFORMAT_VALID_KEYWORD (type, Q_keys, check_valid_string); \ IIFORMAT_VALID_KEYWORD (type, Q_style, check_valid_symbol); \ - IIFORMAT_VALID_KEYWORD (type, Q_selected, check_valid_anything); \ + IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_selected, check_valid_anything); \ IIFORMAT_VALID_KEYWORD (type, Q_filter, check_valid_anything); \ IIFORMAT_VALID_KEYWORD (type, Q_config, check_valid_symbol); \ IIFORMAT_VALID_KEYWORD (type, Q_included, check_valid_anything); \ IIFORMAT_VALID_KEYWORD (type, Q_key_sequence, check_valid_string); \ - IIFORMAT_VALID_KEYWORD (type, Q_accelerator, check_valid_string); \ + IIFORMAT_VALID_KEYWORD (type, Q_accelerator, check_valid_string); \ IIFORMAT_VALID_KEYWORD (type, Q_label, check_valid_anything); \ - IIFORMAT_VALID_KEYWORD (type, Q_callback, check_valid_callback); \ - IIFORMAT_VALID_KEYWORD (type, Q_descriptor, check_valid_string_or_vector) + IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_callback, check_valid_callback); \ + IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_descriptor, check_valid_string_or_vector) #define VALID_WIDGET_KEYWORDS(type) \ IIFORMAT_VALID_KEYWORD (type, Q_width, check_valid_int); \ diff -r 892ca416f0fb -r 9d177e8d4150 src/glyphs-x.c --- a/src/glyphs-x.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/glyphs-x.c Mon Aug 13 11:30:53 2007 +0200 @@ -148,7 +148,11 @@ #ifdef HAVE_WIDGETS static void -update_widget_face (struct Lisp_Image_Instance* ii, Lisp_Object domain); +update_widget_face (widget_value* wv, + struct Lisp_Image_Instance* ii, Lisp_Object domain); +static void +update_tab_widget_face (widget_value* wv, + struct Lisp_Image_Instance* ii, Lisp_Object domain); #endif #include "bitmaps.h" @@ -2163,30 +2167,16 @@ /* This seems ugly, but I'm not sure what else to do. */ if (EQ (IMAGE_INSTANCE_WIDGET_TYPE (p), Qtab_control)) { - widget_value* cur = 0; - /* Give each child label the correct foreground color. */ - Lisp_Object pixel = FACE_FOREGROUND - (IMAGE_INSTANCE_WIDGET_FACE (p), - IMAGE_INSTANCE_SUBWINDOW_FRAME (p)); - XColor fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); - XtSetArg (al [0], XtNtabForeground, fcolor.pixel); + update_tab_widget_face (wv, p, + IMAGE_INSTANCE_SUBWINDOW_FRAME (p)); + } + /* update the colors and font */ + update_widget_face (wv, p, IMAGE_INSTANCE_SUBWINDOW_FRAME (p)); - for (cur = wv->contents; cur; cur = cur->next) - { - if (cur->value) - { - cur->nargs = 1; - cur->args = al; - } - } - } - /* now modify the widget */ lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (p), wv, True); free_widget_value_tree (wv); - /* update the colors and font */ - update_widget_face (p, IMAGE_INSTANCE_SUBWINDOW_FRAME (p)); /* We have to do this otherwise Motif will unceremoniously resize us when the label gets set. */ XtSetArg (al [0], XtNwidth, IMAGE_INSTANCE_WIDGET_WIDTH (p)); @@ -2314,45 +2304,59 @@ /************************************************************************/ static void -update_widget_face (struct Lisp_Image_Instance* ii, Lisp_Object domain) +update_widget_face (widget_value* wv, struct Lisp_Image_Instance *ii, + Lisp_Object domain) { - Arg al[3]; #ifdef LWLIB_WIDGETS_MOTIF XmFontList fontList; #endif - + Lisp_Object pixel = FACE_FOREGROUND (IMAGE_INSTANCE_WIDGET_FACE (ii), - IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + domain); XColor fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); - XColor bcolor; - - pixel = FACE_BACKGROUND - (IMAGE_INSTANCE_WIDGET_FACE (ii), - IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); - bcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); - - XtSetArg (al [0], XtNbackground, bcolor.pixel); - XtSetArg (al [1], XtNforeground, fcolor.pixel); - + + lw_add_widget_value_arg (wv, XtNforeground, fcolor.pixel); #ifdef LWLIB_WIDGETS_MOTIF fontList = XmFontListCreate (FONT_INSTANCE_X_FONT (XFONT_INSTANCE (widget_face_font_info - (domain, IMAGE_INSTANCE_WIDGET_FACE (ii), + (domain, + IMAGE_INSTANCE_WIDGET_FACE (ii), 0, 0))), XmSTRING_DEFAULT_CHARSET); - XtSetArg (al [2], XmNfontList, fontList ); -#else - XtSetArg (al [2], XtNfont, (void*)FONT_INSTANCE_X_FONT - (XFONT_INSTANCE (widget_face_font_info - (domain, - IMAGE_INSTANCE_WIDGET_FACE (ii), - 0, 0)))); + lw_add_widget_value_arg (wv, XmNfontList, (XtArgVal)fontList); #endif - XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 3); -#ifdef LWLIB_WIDGETS_MOTIF - XmFontListFree (fontList); -#endif + lw_add_widget_value_arg + (wv, XtNfont, (XtArgVal)FONT_INSTANCE_X_FONT + (XFONT_INSTANCE (widget_face_font_info + (domain, + IMAGE_INSTANCE_WIDGET_FACE (ii), + 0, 0)))); +} + +static void +update_tab_widget_face (widget_value* wv, struct Lisp_Image_Instance *ii, + Lisp_Object domain) +{ + if (wv->contents) + { + widget_value* val = wv->contents, *cur; + + /* Give each child label the correct foreground color. */ + Lisp_Object pixel = FACE_FOREGROUND + (IMAGE_INSTANCE_WIDGET_FACE (ii), + domain); + XColor fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); + lw_add_widget_value_arg (val, XtNtabForeground, fcolor.pixel); + + for (cur = val->next; cur; cur = cur->next) + { + if (cur->value) + { + lw_copy_widget_value_args (val, cur); + } + } + } } static void @@ -2393,15 +2397,13 @@ required. */ clip_wv = xmalloc_widget_value (); - XtSetArg (al [ac], XtNresize, False); ac++; - XtSetArg (al [ac], XtNwidth, - (Dimension)IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii)); ac++; - XtSetArg (al [ac], XtNheight, - (Dimension)IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii)); ac++; - + lw_add_widget_value_arg (clip_wv, XtNresize, False); + lw_add_widget_value_arg (clip_wv, XtNwidth, + (Dimension)IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii)); + lw_add_widget_value_arg (clip_wv, XtNheight, + (Dimension)IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii)); clip_wv->enabled = True; - clip_wv->nargs = ac; - clip_wv->args = al; + clip_wv->name = xstrdup ("clip-window"); clip_wv->value = xstrdup ("clip-window"); @@ -2414,9 +2416,7 @@ /* copy any args we were given */ ac = 0; - - if (wv->nargs) - lw_add_value_args_to_args (wv, al, &ac); + lw_add_value_args_to_args (wv, al, &ac); /* Fixup the colors. We have to do this *before* the widget gets created so that Motif will fix up the shadow colors @@ -2432,17 +2432,16 @@ IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); bcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); - XtSetArg (al [ac], XtNbackground, bcolor.pixel); ac++; - XtSetArg (al [ac], XtNforeground, fcolor.pixel); ac++; + lw_add_widget_value_arg (wv, XtNbackground, bcolor.pixel); + lw_add_widget_value_arg (wv, XtNforeground, fcolor.pixel); /* we cannot allow widgets to resize themselves */ - XtSetArg (al [ac], XtNresize, False); ac++; - XtSetArg (al [ac], XtNwidth, - (Dimension)IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii)); ac++; - XtSetArg (al [ac], XtNheight, - (Dimension)IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii)); ac++; - - wv->nargs = ac; - wv->args = al; + lw_add_widget_value_arg (wv, XtNresize, False); + lw_add_widget_value_arg (wv, XtNwidth, + (Dimension)IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii)); + lw_add_widget_value_arg (wv, XtNheight, + (Dimension)IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii)); + /* update the font. */ + update_widget_face (wv, ii, domain); wid = lw_create_widget (type, wv->name, id, wv, IMAGE_INSTANCE_X_CLIPWIDGET (ii), False, 0, popup_selection_callback, 0); @@ -2450,9 +2449,6 @@ IMAGE_INSTANCE_SUBWINDOW_ID (ii) = (void*)wid; IMAGE_INSTANCE_X_WIDGET_LWID (ii) = id; - /* update the font. */ - update_widget_face (ii, domain); - /* Resize the widget here so that the values do not get copied by lwlib. */ ac = 0; @@ -2480,6 +2476,7 @@ { struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + /* Modify the text properties of the widget */ if (EQ (prop, Q_text)) { char* str; @@ -2490,10 +2487,13 @@ lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (ii), wv, False); return Qt; } - /* Modify the face properties of the widget */ - if (EQ (prop, Q_face)) + + /* Modify the text properties of the widget */ + else if (EQ (prop, Q_face)) { - update_widget_face (ii, IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii)); + update_widget_face (wv, ii, IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); + lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (ii), wv, False); return Qt; } return Qunbound; @@ -2650,29 +2650,11 @@ int dest_mask, Lisp_Object domain) { struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); - Arg al [1]; - XColor fcolor; - Lisp_Object pixel; - widget_value* cur; - widget_value * wv = gui_items_to_widget_values (IMAGE_INSTANCE_WIDGET_ITEMS (ii)); - /* Give each child label the correct foreground color. */ - pixel = FACE_FOREGROUND - (IMAGE_INSTANCE_WIDGET_FACE (ii), - IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); - fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); - XtSetArg (al [0], XtNtabForeground, fcolor.pixel); - - for (cur = wv->contents; cur; cur = cur->next) - { - if (cur->value) - { - cur->nargs = 1; - cur->args = al; - } - } + update_tab_widget_face (wv, ii, + IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); x_widget_instantiate (image_instance, instantiator, pointer_fg, pointer_bg, dest_mask, domain, "tab-control", wv); @@ -2687,11 +2669,7 @@ if (EQ (prop, Q_items)) { - widget_value * wv = 0, *cur; - Arg al [1]; - XColor fcolor; - Lisp_Object pixel; - + widget_value * wv = 0; check_valid_item_list_1 (val); IMAGE_INSTANCE_WIDGET_ITEMS (ii) = @@ -2699,22 +2677,9 @@ parse_gui_item_tree_children (val)); wv = gui_items_to_widget_values (IMAGE_INSTANCE_WIDGET_ITEMS (ii)); - - /* Give each child label the correct foreground color. */ - pixel = FACE_FOREGROUND - (IMAGE_INSTANCE_WIDGET_FACE (ii), - IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); - fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); - XtSetArg (al [0], XtNtabForeground, fcolor.pixel); - for (cur = wv->contents; cur; cur = cur->next) - { - if (cur->value) - { - cur->nargs = 1; - cur->args = al; - } - } + update_tab_widget_face (wv, ii, + IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (ii), wv, True); diff -r 892ca416f0fb -r 9d177e8d4150 src/glyphs.c --- a/src/glyphs.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/glyphs.c Mon Aug 13 11:30:53 2007 +0200 @@ -1724,14 +1724,14 @@ Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain) { - Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); + Lisp_Object string = find_keyword_in_vector (instantiator, Q_data); struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); - assert (!NILP (data)); + assert (!NILP (string)); if (dest_mask & IMAGE_TEXT_MASK) { IMAGE_INSTANCE_TYPE (ii) = IMAGE_TEXT; - IMAGE_INSTANCE_TEXT_STRING (ii) = data; + IMAGE_INSTANCE_TEXT_STRING (ii) = string; } else incompatible_image_types (instantiator, dest_mask, IMAGE_TEXT_MASK); @@ -2536,10 +2536,12 @@ round it. */ if (UNBOUNDP (instance) && - dest_mask & (IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK)) + dest_mask & (IMAGE_SUBWINDOW_MASK + | IMAGE_WIDGET_MASK + | IMAGE_TEXT_MASK)) { if (!WINDOWP (domain)) - signal_simple_error ("Can't instantiate subwindow outside a window", + signal_simple_error ("Can't instantiate text or subwindow outside a window", instantiator); instance = Fgethash (instantiator, XWINDOW (domain)->subwindow_instance_cache, @@ -2733,6 +2735,76 @@ return retlist; } +/* Copy an image instantiator. We can't use Fcopy_tree since widgets + may contain circular references which would send Fcopy_tree into + infloop death. */ +static Lisp_Object +image_copy_vector_instantiator (Lisp_Object instantiator) +{ + int i; + struct image_instantiator_methods *meths; + Lisp_Object *elt; + int instantiator_len; + + CHECK_VECTOR (instantiator); + + instantiator = Fcopy_sequence (instantiator); + elt = XVECTOR_DATA (instantiator); + instantiator_len = XVECTOR_LENGTH (instantiator); + + meths = decode_image_instantiator_format (elt[0], ERROR_ME); + + for (i = 1; i < instantiator_len; i += 2) + { + int j; + Lisp_Object keyword = elt[i]; + Lisp_Object value = elt[i+1]; + + /* Find the keyword entry. */ + for (j = 0; j < Dynarr_length (meths->keywords); j++) + { + if (EQ (keyword, Dynarr_at (meths->keywords, j).keyword)) + break; + } + + /* Only copy keyword values that should be copied. */ + if (Dynarr_at (meths->keywords, j).copy_p + && + (CONSP (value) || VECTORP (value))) + { + elt [i+1] = Fcopy_tree (value, Qt); + } + } + + return instantiator; +} + +static Lisp_Object +image_copy_instantiator (Lisp_Object arg) +{ + if (CONSP (arg)) + { + Lisp_Object rest; + rest = arg = Fcopy_sequence (arg); + while (CONSP (rest)) + { + Lisp_Object elt = XCAR (rest); + if (CONSP (elt)) + XCAR (rest) = Fcopy_tree (elt, Qt); + else if (VECTORP (elt)) + XCAR (rest) = image_copy_vector_instantiator (elt); + if (VECTORP (XCDR (rest))) /* hack for (a b . [c d]) */ + XCDR (rest) = Fcopy_tree (XCDR (rest), Qt); + rest = XCDR (rest); + } + } + else if (VECTORP (arg)) + { + arg = image_copy_vector_instantiator (arg); + } + return arg; +} + DEFUN ("image-specifier-p", Fimage_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is an image specifier. @@ -4473,6 +4545,7 @@ SPECIFIER_HAS_METHOD (image, validate); SPECIFIER_HAS_METHOD (image, after_change); SPECIFIER_HAS_METHOD (image, going_to_add); + SPECIFIER_HAS_METHOD (image, copy_instantiator); } void diff -r 892ca416f0fb -r 9d177e8d4150 src/glyphs.h --- a/src/glyphs.h Mon Aug 13 11:30:00 2007 +0200 +++ b/src/glyphs.h Mon Aug 13 11:30:53 2007 +0200 @@ -74,6 +74,7 @@ Lisp_Object keyword; void (*validate) (Lisp_Object data); int multiple_p; + int copy_p; }; typedef struct @@ -130,6 +131,13 @@ Lisp_Object (*set_property_method) (Lisp_Object image_instance, Lisp_Object property, Lisp_Object val); + + /* Find out the geometry of this image instance. */ + void (*query_geometry_method) (Lisp_Object image_instance, + int* width, int* height, int disp); + + /* Layout the instances children. */ + void (*layout_children_method) (Lisp_Object image_instance); }; /***** Calling an image-instantiator method *****/ @@ -202,29 +210,31 @@ /* Declare that KEYW is a valid keyword for image-instantiator format FORMAT. VALIDATE_FUN if a function that returns whether the data is valid. The keyword may not appear more than once. */ -#define IIFORMAT_VALID_KEYWORD(format, keyw, validate_fun) \ - do { \ +#define IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, copy, multi) \ + do { \ struct ii_keyword_entry entry; \ - \ - entry.keyword = keyw; \ + \ + entry.keyword = keyw; \ entry.validate = validate_fun; \ - entry.multiple_p = 0; \ + entry.multiple_p = multi; \ + entry.copy_p = copy; \ Dynarr_add (format##_image_instantiator_methods->keywords, \ entry); \ } while (0) +#define IIFORMAT_VALID_KEYWORD(format, keyw, validate_fun) \ +IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 1, 0) + /* Same as IIFORMAT_VALID_KEYWORD except that the keyword may appear multiple times. */ -#define IIFORMAT_VALID_MULTI_KEYWORD(format, keyword, validate_fun) \ - do { \ - struct ii_keyword_entry entry; \ - \ - entry.keyword = keyword; \ - entry.validate = validate_fun; \ - entry.multiple_p = 1; \ - Dynarr_add (format##_image_instantiator_methods->keywords, \ - entry); \ - } while (0) +#define IIFORMAT_VALID_MULTI_KEYWORD(format, keyw, validate_fun) \ +IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 1, 1) + +/* Same as IIFORMAT_VALID_KEYWORD execpt that the argument is not + copied by the specifier functions. This is necessary for things + like callbacks etc. */ +#define IIFORMAT_VALID_NONCOPY_KEYWORD(format, keyw, validate_fun) \ +IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 0, 0) /* Declare that image-instantiator format FORMAT is supported on CONSOLE type. */ @@ -362,6 +372,14 @@ IMAGE_LAYOUT }; +enum image_instance_geometry +{ + IMAGE_GEOMETRY, + IMAGE_DESIRED_GEOMETRY, + IMAGE_MIN_GEOMETRY, + IMAGE_MAX_GEOMETRY +}; + #define IMAGE_NOTHING_MASK (1 << 0) #define IMAGE_TEXT_MASK (1 << 1) #define IMAGE_MONO_PIXMAP_MASK (1 << 2) @@ -446,18 +464,20 @@ Lisp_Object device; Lisp_Object name; enum image_instance_type type; - int x_offset, y_offset; /* for layout purposes */ + unsigned int x_offset, y_offset; /* for layout purposes */ + unsigned int width, height; unsigned int dirty : 1; union { struct { + unsigned int descent; Lisp_Object string; } text; struct { - int width, height, depth; - int slice, maxslice, timeout; + unsigned int depth; + unsigned int slice, maxslice, timeout; Lisp_Object hotspot_x, hotspot_y; /* integer or Qnil */ Lisp_Object filename; /* string or Qnil */ Lisp_Object mask_filename; /* string or Qnil */ @@ -471,7 +491,6 @@ struct { Lisp_Object frame; - unsigned int width, height; void* subwindow; /* specific devices can use this as necessary */ unsigned int being_displayed : 1; /* used to detect when needs to be unmapped */ union @@ -501,15 +520,24 @@ #define IMAGE_INSTANCE_TYPE(i) ((i)->type) #define IMAGE_INSTANCE_XOFFSET(i) ((i)->x_offset) #define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset) +#define IMAGE_INSTANCE_WIDTH(i) ((i)->width) +#define IMAGE_INSTANCE_HEIGHT(i) ((i)->height) #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \ ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \ || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP)) #define IMAGE_INSTANCE_DIRTYP(i) ((i)->dirty) #define IMAGE_INSTANCE_TEXT_STRING(i) ((i)->u.text.string) +#define IMAGE_INSTANCE_TEXT_WIDTH(i) \ + IMAGE_INSTANCE_WIDTH(i) +#define IMAGE_INSTANCE_TEXT_HEIGHT(i) \ + IMAGE_INSTANCE_HEIGHT(i) +#define IMAGE_INSTANCE_TEXT_DESCENT(i) ((i)->u.text.descent) -#define IMAGE_INSTANCE_PIXMAP_WIDTH(i) ((i)->u.pixmap.width) -#define IMAGE_INSTANCE_PIXMAP_HEIGHT(i) ((i)->u.pixmap.height) +#define IMAGE_INSTANCE_PIXMAP_WIDTH(i) \ + IMAGE_INSTANCE_WIDTH(i) +#define IMAGE_INSTANCE_PIXMAP_HEIGHT(i) \ + IMAGE_INSTANCE_HEIGHT(i) #define IMAGE_INSTANCE_PIXMAP_DEPTH(i) ((i)->u.pixmap.depth) #define IMAGE_INSTANCE_PIXMAP_FILENAME(i) ((i)->u.pixmap.filename) #define IMAGE_INSTANCE_PIXMAP_MASK_FILENAME(i) ((i)->u.pixmap.mask_filename) @@ -523,17 +551,19 @@ #define IMAGE_INSTANCE_PIXMAP_MAXSLICE(i) ((i)->u.pixmap.maxslice) #define IMAGE_INSTANCE_PIXMAP_TIMEOUT(i) ((i)->u.pixmap.timeout) -#define IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) ((i)->u.subwindow.width) -#define IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) ((i)->u.subwindow.height) +#define IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \ + IMAGE_INSTANCE_WIDTH(i) +#define IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) \ + IMAGE_INSTANCE_HEIGHT(i) #define IMAGE_INSTANCE_SUBWINDOW_ID(i) ((i)->u.subwindow.subwindow) #define IMAGE_INSTANCE_SUBWINDOW_FRAME(i) ((i)->u.subwindow.frame) #define IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP(i) \ ((i)->u.subwindow.being_displayed) #define IMAGE_INSTANCE_WIDGET_WIDTH(i) \ - IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) + IMAGE_INSTANCE_WIDTH(i) #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \ - IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) + IMAGE_INSTANCE_HEIGHT(i) #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.s.widget.type) #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.s.widget.props) #define IMAGE_INSTANCE_WIDGET_FACE(i) ((i)->u.subwindow.s.widget.face) diff -r 892ca416f0fb -r 9d177e8d4150 src/gutter.h --- a/src/gutter.h Mon Aug 13 11:30:00 2007 +0200 +++ b/src/gutter.h Mon Aug 13 11:30:53 2007 +0200 @@ -25,8 +25,7 @@ #include "specifier.h" -#define DEVICE_SUPPORTS_GUTTERS_P(d) \ - (HAS_DEVMETH_P ((d), output_frame_gutters)) +#define DEVICE_SUPPORTS_GUTTERS_P(d) HAS_DEVMETH_P (d, output_frame_gutters) DECLARE_SPECIFIER_TYPE (gutter); #define XGUTTER_SPECIFIER(x) XSPECIFIER_TYPE (x, gutter) diff -r 892ca416f0fb -r 9d177e8d4150 src/lisp.h --- a/src/lisp.h Mon Aug 13 11:30:00 2007 +0200 +++ b/src/lisp.h Mon Aug 13 11:30:53 2007 +0200 @@ -2887,7 +2887,8 @@ extern Lisp_Object Vconsole_list, Vcontrolling_terminal; extern Lisp_Object Vcurrent_compiled_function_annotation, Vcurrent_load_list; extern Lisp_Object Vcurrent_mouse_event, Vcurrent_prefix_arg, Vdata_directory; -extern Lisp_Object Vdisabled_command_hook, Vdoc_directory, Vinternal_doc_file_name; +extern Lisp_Object Vdirectory_sep_char, Vdisabled_command_hook; +extern Lisp_Object Vdoc_directory, Vinternal_doc_file_name; extern Lisp_Object Vecho_area_buffer, Vemacs_major_version; extern Lisp_Object Vemacs_minor_version, Vexec_directory, Vexec_path; extern Lisp_Object Vexecuting_macro, Vfeatures, Vfile_domain; diff -r 892ca416f0fb -r 9d177e8d4150 src/print.c --- a/src/print.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/print.c Mon Aug 13 11:30:53 2007 +0200 @@ -1106,7 +1106,9 @@ case Lisp_Type_Int_Even: case Lisp_Type_Int_Odd: { - char buf[24]; + /* ASCII Decimal representation uses 2.4 times as many bits as + machine binary. */ + char buf[3 * sizeof (EMACS_INT) + 5]; long_to_string (buf, XINT (obj)); write_c_string (buf, printcharfun); break; @@ -1119,36 +1121,61 @@ Emchar ch = XCHAR (obj); char *p = buf; *p++ = '?'; - if (ch == '\n') - *p++ = '\\', *p++ = 'n'; - else if (ch == '\r') - *p++ = '\\', *p++ = 'r'; - else if (ch == '\t') - *p++ = '\\', *p++ = 't'; - else if (ch < 32) + if (ch < 32) + { + *p++ = '\\'; + switch (ch) + { + case '\t': *p++ = 't'; break; + case '\n': *p++ = 'n'; break; + case '\r': *p++ = 'r'; break; + default: + *p++ = '^'; + *p++ = ch + 64; + if ((ch + 64) == '\\') + *p++ = '\\'; + break; + } + } + else if (ch < 127) { - *p++ = '\\', *p++ = '^'; - *p++ = ch + 64; - if ((ch + 64) == '\\') - *p++ = '\\'; + /* syntactically special characters should be escaped. */ + switch (ch) + { + case ' ': + case '"': + case '#': + case '\'': + case '(': + case ')': + case ',': + case '.': + case ';': + case '?': + case '[': + case '\\': + case ']': + case '`': + *p++ = '\\'; + } + *p++ = ch; } else if (ch == 127) - *p++ = '\\', *p++ = '^', *p++ = '?'; - else if (ch >= 128 && ch < 160) + { + *p++ = '\\', *p++ = '^', *p++ = '?'; + } + else if (ch < 160) { *p++ = '\\', *p++ = '^'; - p += set_charptr_emchar ((Bufbyte *)p, ch + 64); + p += set_charptr_emchar ((Bufbyte *) p, ch + 64); } - else if (ch < 127 - && !isdigit (ch) - && !isalpha (ch) - && ch != '^') /* must not backslash this or it will - be interpreted as the start of a - control char */ - *p++ = '\\', *p++ = ch; else - p += set_charptr_emchar ((Bufbyte *)p, ch); - output_string (printcharfun, (Bufbyte *)buf, Qnil, 0, p - buf); + { + p += set_charptr_emchar ((Bufbyte *) p, ch); + } + + output_string (printcharfun, (Bufbyte *) buf, Qnil, 0, p - buf); + break; } diff -r 892ca416f0fb -r 9d177e8d4150 src/profile.c --- a/src/profile.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/profile.c Mon Aug 13 11:30:53 2007 +0200 @@ -119,9 +119,10 @@ { fun = *backtrace_list->function; - if (!SYMBOLP (fun) && - !COMPILED_FUNCTIONP (fun) && - !SUBRP (fun)) + if (!SYMBOLP (fun) + && !COMPILED_FUNCTIONP (fun) + && !SUBRP (fun) + && !CONSP (fun)) fun = QSunknown; } else diff -r 892ca416f0fb -r 9d177e8d4150 src/redisplay-output.c --- a/src/redisplay-output.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/redisplay-output.c Mon Aug 13 11:30:53 2007 +0200 @@ -47,16 +47,16 @@ int run_end_begin_glyphs); static void redisplay_output_display_block (struct window *w, struct display_line *dl, int block, int start, int end, int start_pixpos, - int cursor_start, int cursor_width, + int cursor_start, int cursor_width, int cursor_height); -static void redisplay_normalize_display_box (struct display_box* dest, +static void redisplay_normalize_display_box (struct display_box* dest, struct display_glyph_area* src); static int redisplay_display_boxes_in_window_p (struct window* w, struct display_box* db, struct display_glyph_area* dga); -static void redisplay_clear_clipped_region (Lisp_Object locale, face_index findex, - struct display_box* dest, - struct display_glyph_area* glyphsrc, +static void redisplay_clear_clipped_region (Lisp_Object locale, face_index findex, + struct display_box* dest, + struct display_glyph_area* glyphsrc, int fullheight_p, Lisp_Object); /***************************************************************************** @@ -210,7 +210,7 @@ #### It would really be worth it to arrange for this function to be (almost) a single call to memcmp. */ - + if ((crb->findex != drb->findex) || (WINDOW_FACE_CACHEL_DIRTY (w, drb->findex))) return 0; @@ -229,7 +229,7 @@ (crb->object.hline.thickness != drb->object.hline.thickness || crb->object.hline.yoffset != drb->object.hline.yoffset)) return 0; - else if (crb->type == RUNE_DGLYPH && + else if (crb->type == RUNE_DGLYPH && (!EQ (crb->object.dglyph.glyph, drb->object.dglyph.glyph) || !EQ (crb->object.dglyph.extent, drb->object.dglyph.extent) || crb->object.dglyph.xoffset != drb->object.dglyph.xoffset)) @@ -244,7 +244,7 @@ up-to-date. */ if (GLYPH_CACHEL_DIRTYP (w, gindex)) return 0; - else + else return 1; } else @@ -657,7 +657,7 @@ if (x < ddl->bounds.left_in) { findex = ddl->left_margin_findex ? - ddl->left_margin_findex + ddl->left_margin_findex : get_builtin_face_cache_index (w, Vleft_margin_face); } else if (x < ddl->bounds.right_in) @@ -668,7 +668,7 @@ else if (x < ddl->bounds.right_out) { findex = ddl->right_margin_findex ? - ddl->right_margin_findex + ddl->right_margin_findex : get_builtin_face_cache_index (w, Vright_margin_face); } else @@ -712,10 +712,10 @@ region or if it was a block of a different type, then output the entire ddb. Otherwise, compare cdb and ddb and output only the changed region. */ - if (!force && cdb && ddb->type == cdb->type + if (!force && cdb && ddb->type == cdb->type /* If there was no buffer being display before the compare anyway as we might be outputting a gutter. */ - && + && (b == old_b || !old_b)) { must_sync |= compare_display_blocks (w, cdl, ddl, old_block, @@ -754,7 +754,7 @@ cursor_start, cursor_width, cursor_height); } - + start_pixpos = next_start_pixpos; } } @@ -778,7 +778,7 @@ y -= MODELINE_SHADOW_THICKNESS (w); height += (2 * MODELINE_SHADOW_THICKNESS (w)); } - + if (window_is_leftmost (w)) clear_left_border (w, y, height); if (window_is_rightmost (w)) @@ -924,7 +924,7 @@ } } - while ((up ? (cur_dl < Dynarr_length (cla)) : (cur_dl >= 0))) + while (up ? (cur_dl < Dynarr_length (cla)) : (cur_dl >= 0)) { dl = Dynarr_atp (cla, cur_dl); db = get_display_block_from_line (dl, TEXT); @@ -1112,7 +1112,7 @@ cachel->x + cachel->width > x && cachel->x < x + width && cachel->y + cachel->height > y && cachel->y < y + height - && + && !EQ (cachel->subwindow, ignored_window)) { unmap_subwindow (cachel->subwindow); @@ -1134,7 +1134,7 @@ } } -static void redisplay_unmap_subwindows_except_us (struct frame* f, int x, int y, int width, +static void redisplay_unmap_subwindows_except_us (struct frame* f, int x, int y, int width, int height, Lisp_Object subwindow) { if (Dynarr_length (FRAME_SUBWINDOW_CACHE (f))) @@ -1151,7 +1151,7 @@ pixmaps, backgrounds etc. ****************************************************************************/ void -redisplay_output_subwindow (struct window *w, +redisplay_output_subwindow (struct window *w, Lisp_Object image_instance, struct display_box* db, struct display_glyph_area* dga, face_index findex, int cursor_start, int cursor_width, @@ -1189,7 +1189,7 @@ sdga.yoffset = -dga->yoffset; sdga.height = IMAGE_INSTANCE_SUBWINDOW_HEIGHT (p); sdga.width = IMAGE_INSTANCE_SUBWINDOW_WIDTH (p); - + if (redisplay_display_boxes_in_window_p (w, db, &sdga) < 0) { map_subwindow (image_instance, db->xpos, db->ypos, dga); @@ -1197,7 +1197,7 @@ else { sdga.xoffset = sdga.yoffset = 0; - map_subwindow (image_instance, db->xpos - dga->xoffset, + map_subwindow (image_instance, db->xpos - dga->xoffset, db->ypos - dga->yoffset, &sdga); } } @@ -1208,7 +1208,7 @@ Output a widget hierarchy. This can safely call itself recursively. ****************************************************************************/ void -redisplay_output_layout (struct window *w, +redisplay_output_layout (struct window *w, Lisp_Object image_instance, struct display_box* db, struct display_glyph_area* dga, face_index findex, int cursor_start, int cursor_width, @@ -1252,7 +1252,7 @@ thing to do since we have many gaps that we have to make sure are filled in. */ redisplay_clear_clipped_region (window, findex, db, dga, 1, Qnil); - + /* Output a border if required */ if (!NILP (IMAGE_INSTANCE_LAYOUT_BORDER (p))) { @@ -1260,7 +1260,7 @@ enum edge_style style; int ypos = db->ypos; int height = dga->height; - + if (dga->xoffset >= 0) edges |= EDGE_LEFT; if (dga->width - dga->xoffset == layout_width) @@ -1269,7 +1269,7 @@ edges |= EDGE_TOP; if (dga->height - dga->yoffset == layout_height) edges |= EDGE_BOTTOM; - + if (EQ (IMAGE_INSTANCE_LAYOUT_BORDER (p), Qetched_in)) style = EDGE_ETCHED_IN; else if (EQ (IMAGE_INSTANCE_LAYOUT_BORDER (p), Qetched_out)) @@ -1288,13 +1288,13 @@ else style = EDGE_BEVEL_OUT; - MAYBE_DEVMETH (d, bevel_area, + MAYBE_DEVMETH (d, bevel_area, (w, findex, db->xpos, - ypos, + ypos, dga->width, height, 2, edges, style)); } } - + /* This shrinks the display box to exactly enclose the glyph area. */ redisplay_normalize_display_box (db, dga); @@ -1346,8 +1346,8 @@ { /* #### This is well hacked and could use some generalisation.*/ - if (redisplay_normalize_glyph_area (&cdb, &cdga) - && + if (redisplay_normalize_glyph_area (&cdb, &cdga) + && (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii))) { struct display_line dl; /* this is fake */ @@ -1355,7 +1355,7 @@ IMAGE_INSTANCE_TEXT_STRING (childii); convert_bufbyte_string_into_emchar_dynarr (XSTRING_DATA (string), XSTRING_LENGTH (string), buf); - + redisplay_normalize_display_box (&cdb, &cdga); /* Offsets are now +ve again so be careful when fixing up the display line. */ @@ -1379,30 +1379,30 @@ } } break; - + case IMAGE_MONO_PIXMAP: case IMAGE_COLOR_PIXMAP: if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii)) redisplay_output_pixmap (w, child, &cdb, &cdga, findex, 0, 0, 0, 0); break; - + case IMAGE_WIDGET: case IMAGE_SUBWINDOW: if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii)) redisplay_output_subwindow (w, child, &cdb, &cdga, findex, 0, 0, 0); break; - + case IMAGE_LAYOUT: redisplay_output_layout (w, child, &cdb, &cdga, findex, 0, 0, 0); break; - + case IMAGE_NOTHING: /* nothing is as nothing does */ break; - + case IMAGE_POINTER: default: abort (); @@ -1420,7 +1420,7 @@ output a pixmap. ****************************************************************************/ void -redisplay_output_pixmap (struct window *w, +redisplay_output_pixmap (struct window *w, Lisp_Object image_instance, struct display_box* db, struct display_glyph_area* dga, face_index findex, int cursor_start, int cursor_width, @@ -1449,7 +1449,7 @@ if (!offset_bitmap) { redisplay_clear_clipped_region (window, findex, - db, dga, + db, dga, (int)IMAGE_INSTANCE_PIXMAP_MASK (p), Qnil); @@ -1506,7 +1506,7 @@ /* #### This isn't quite right for when this function is called from the toolbar code. */ - + /* Don't use a backing pixmap in the border area */ if (x >= FRAME_LEFT_BORDER_END (f) && x < FRAME_RIGHT_BORDER_START (f) @@ -1514,11 +1514,11 @@ && y < FRAME_BOTTOM_BORDER_START (f)) { Lisp_Object temp; - + if (w) { temp = WINDOW_FACE_CACHEL_BACKGROUND_PIXMAP (w, findex); - + if (IMAGE_INSTANCEP (temp) && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (temp))) { @@ -1530,14 +1530,14 @@ else { temp = FACE_BACKGROUND_PIXMAP (Vdefault_face, locale); - + if (IMAGE_INSTANCEP (temp) && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (temp))) { background_pixmap = temp; } } - } + } if (!UNBOUNDP (background_pixmap) && XIMAGE_INSTANCE_PIXMAP_DEPTH (background_pixmap) == 0) @@ -1558,13 +1558,13 @@ fcolor = (w ? WINDOW_FACE_CACHEL_BACKGROUND (w, findex) : FACE_BACKGROUND (Vdefault_face, locale)); - + } - + if (UNBOUNDP (background_pixmap)) background_pixmap = Qnil; - - DEVMETH (d, clear_region, + + DEVMETH (d, clear_region, (locale, d, f, findex, x, y, width, height, fcolor, bcolor, background_pixmap)); } @@ -1577,8 +1577,8 @@ around with by altering these. glyphsrc should be normalized. ****************************************************************************/ static void -redisplay_clear_clipped_region (Lisp_Object window, face_index findex, - struct display_box* dest, struct display_glyph_area* glyphsrc, +redisplay_clear_clipped_region (Lisp_Object window, face_index findex, + struct display_box* dest, struct display_glyph_area* glyphsrc, int fullheight_p, Lisp_Object ignored_subwindow) { /* assume dest->xpos >= 0 */ @@ -1602,8 +1602,8 @@ } else { - int yoffset = (glyphsrc->yoffset > 0 ? glyphsrc->yoffset : 0); - + int yoffset = (glyphsrc->yoffset > 0 ? glyphsrc->yoffset : 0); + /* We need to make sure that subwindows are unmapped from the whole area. */ redisplay_unmap_subwindows_except_us (f, clear_x, dest->ypos, @@ -1614,14 +1614,14 @@ { redisplay_clear_region (window, findex, clear_x, dest->ypos, glyphsrc->width, yoffset); - + } /* Then the bottom box */ if (yoffset + glyphsrc->height < dest->height) { redisplay_clear_region (window, findex, clear_x, dest->ypos + yoffset + glyphsrc->height, - glyphsrc->width, + glyphsrc->width, dest->height - (yoffset + glyphsrc->height)); } @@ -1635,7 +1635,7 @@ Calculate the visible box for displaying src in dest. ****************************************************************************/ int -redisplay_normalize_glyph_area (struct display_box* dest, +redisplay_normalize_glyph_area (struct display_box* dest, struct display_glyph_area* glyphsrc) { if (dest->xpos + glyphsrc->xoffset > dest->xpos + dest->width @@ -1678,7 +1678,7 @@ } static void -redisplay_normalize_display_box (struct display_box* dest, +redisplay_normalize_display_box (struct display_box* dest, struct display_glyph_area* glyphsrc) { /* Adjust the destination area. At the end of this the destination @@ -1735,7 +1735,7 @@ || db->ypos + db->height > bottom) /* We are not displaying in a window at all */ return 0; - + if (db->xpos + dga->xoffset >= left && db->ypos + dga->yoffset >= top @@ -1757,7 +1757,7 @@ int redisplay_calculate_display_boxes (struct display_line *dl, int xpos, int xoffset, int start_pixpos, int width, - struct display_box* dest, + struct display_box* dest, struct display_glyph_area* src) { dest->xpos = xpos; @@ -1838,38 +1838,38 @@ else { int height = ypos2 - ypos1; - + if (height) { Lisp_Object window; int bflag = 0 ; /* (window_needs_vertical_divider (w) ? 0 : 1);*/ layout_bounds bounds; - + bounds = calculate_display_line_boundaries (w, bflag); XSETWINDOW (window, w); if (window_is_leftmost (w)) redisplay_clear_region (window, DEFAULT_INDEX, FRAME_LEFT_BORDER_START (f), ypos1, FRAME_BORDER_WIDTH (f), height); - + if (bounds.left_in - bounds.left_out > 0) redisplay_clear_region (window, get_builtin_face_cache_index (w, Vleft_margin_face), bounds.left_out, ypos1, bounds.left_in - bounds.left_out, height); - + if (bounds.right_in - bounds.left_in > 0) - redisplay_clear_region (window, + redisplay_clear_region (window, DEFAULT_INDEX, bounds.left_in, ypos1, bounds.right_in - bounds.left_in, height); - + if (bounds.right_out - bounds.right_in > 0) redisplay_clear_region (window, get_builtin_face_cache_index (w, Vright_margin_face), bounds.right_in, ypos1, bounds.right_out - bounds.right_in, height); - + if (window_is_rightmost (w)) redisplay_clear_region (window, DEFAULT_INDEX, FRAME_RIGHT_BORDER_START (f), ypos1, FRAME_BORDER_WIDTH (f), height); @@ -2256,7 +2256,7 @@ style = EDGE_BEVEL_OUT; } - MAYBE_DEVMETH (d, bevel_area, + MAYBE_DEVMETH (d, bevel_area, (w, MODELINE_INDEX, x, y, width, height, shadow_thickness, EDGE_ALL, style)); } diff -r 892ca416f0fb -r 9d177e8d4150 src/redisplay.c --- a/src/redisplay.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/redisplay.c Mon Aug 13 11:30:53 2007 +0200 @@ -156,7 +156,7 @@ Bytind bi_start_col_enabled; int start_col_xoffset; /* Number of pixels that still need to be skipped. This is used for - horizontal scrolling of glyphs, where we want + horizontal scrolling of glyphs, where we want to be able to scroll over part of the glyph. */ int hscroll_glyph_width_adjust; /* how much the width of the hscroll @@ -1815,7 +1815,7 @@ after a ^M is invisible. */ int selective = (INTP (b->selective_display) ? XINT (b->selective_display) - : ((!NILP (b->selective_display) ? -1 : 0))); + : (!NILP (b->selective_display) ? -1 : 0)); /* The variable ctl-arrow allows the user to specify what characters can actually be displayed and which octal should be used for. @@ -2288,7 +2288,7 @@ int prop_width = 0; if (data.start_col > 1) - tab_start_pixpos -= (space_width (w) * (data.start_col - 1)) + tab_start_pixpos -= (space_width (w) * (data.start_col - 1)) + data.start_col_xoffset; next_tab_start = @@ -4341,9 +4341,9 @@ } else { - dl->left_margin_findex = + dl->left_margin_findex = get_builtin_face_cache_index (w, Vleft_margin_face); - dl->right_margin_findex = + dl->right_margin_findex = get_builtin_face_cache_index (w, Vright_margin_face); } @@ -4380,7 +4380,7 @@ data.start_col = 0; /* I don't think we want this, string areas should not scroll with - the window + the window data.start_col = w->hscroll; data.bi_start_col_enabled = (w->hscroll ? bi_start_pos : 0); */ @@ -4849,7 +4849,7 @@ else dl->end_bufpos = buffer_or_string_bytind_to_bufpos (disp_string, data.bi_bufpos) - 1; if (truncate_win) - data.dl->num_chars = + data.dl->num_chars = string_column_at_point (s, dl->end_bufpos, b ? XINT (b->tab_width) : 8); else /* This doesn't correctly take into account tabs and control @@ -4889,8 +4889,8 @@ representation of the buffer contents starting from the given position when displayed in the given window. The display line ends when the contents of the line reach the right boundary of the given - window. - + window. + This is very similar to generate_display_line but with the same limitations as create_string_text_block. I have taken the liberty of fixing the bytind stuff though.*/ @@ -4905,7 +4905,7 @@ Bufpos ret_bufpos; /* you must set bounds before calling this. */ - + /* Reset what this line is using. */ if (dl->display_blocks) Dynarr_reset (dl->display_blocks); @@ -5151,7 +5151,7 @@ /* See if we've been asked to start midway through a line, for partial display line scrolling. */ - if (yclip) + if (yclip) { dlp->top_clip = yclip; yclip = 0; @@ -6311,6 +6311,7 @@ process.*/ if (!Dynarr_length (f->subwindow_cachels) || f->subwindows_changed + || f->faces_changed || f->frame_changed) { reset_subwindow_cachels (f); @@ -7136,7 +7137,7 @@ else { struct line_start_cache lsc; - + lsc.start = dl->bufpos; lsc.end = dl->end_bufpos; lsc.height = dl->ascent + dl->descent; @@ -7657,7 +7658,7 @@ assert (cur_elt >= -1); /* This used to be cur_elt>=0 under the assumption that if point is in the top line and not at BUF_BEGV, then - setting the window_start to a newline before the start of + setting the window_start to a newline before the start of the first line will always cause scrolling. However in my (jv) opinion this is wrong. That new line @@ -7667,7 +7668,7 @@ on that assert. So we have no option but to continue the search if we found point at the top of the line_start_cache again. */ - cur_pos = Dynarr_atp (w->line_start_cache,0)->start; + cur_pos = Dynarr_atp (w->line_start_cache,0)->start; } prev_pos = cur_pos; } diff -r 892ca416f0fb -r 9d177e8d4150 src/regex.c --- a/src/regex.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/regex.c Mon Aug 13 11:30:53 2007 +0200 @@ -352,7 +352,7 @@ #define BYTEWIDTH 8 /* In bits. */ -#define STREQ(s1, s2) ((strcmp (s1, s2) == 0)) +#define STREQ(s1, s2) (strcmp (s1, s2) == 0) #undef MAX #undef MIN diff -r 892ca416f0fb -r 9d177e8d4150 src/s/windowsnt.h --- a/src/s/windowsnt.h Mon Aug 13 11:30:00 2007 +0200 +++ b/src/s/windowsnt.h Mon Aug 13 11:30:53 2007 +0200 @@ -125,8 +125,7 @@ /* XEmacs file I/O for DOS text files requires FILE_CODING */ #define FILE_CODING -extern Lisp_Object Vdirectory_sep_char; -#define DIRECTORY_SEP ((char)XCHARVAL(Vdirectory_sep_char)) +#define DIRECTORY_SEP ((char)XCHAR(Vdirectory_sep_char)) /* Define this to be the separator between devices and paths */ #define DEVICE_SEP ':' diff -r 892ca416f0fb -r 9d177e8d4150 src/specifier.c --- a/src/specifier.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/specifier.c Mon Aug 13 11:30:53 2007 +0200 @@ -1648,10 +1648,16 @@ LIST_LOOP (rest, inst_list) { Lisp_Object tag_set = XCAR (XCAR (rest)); - Lisp_Object instantiator = Fcopy_tree (XCDR (XCAR (rest)), Qt); Lisp_Object sub_inst_list = Qnil; + Lisp_Object instantiator; struct gcpro ngcpro1, ngcpro2; + if (HAS_SPECMETH_P (sp, copy_instantiator)) + instantiator = SPECMETH (sp, copy_instantiator, + (XCDR (XCAR (rest)))); + else + instantiator = Fcopy_tree (XCDR (XCAR (rest)), Qt); + NGCPRO2 (instantiator, sub_inst_list); /* call the will-add method; it may GC */ sub_inst_list = HAS_SPECMETH_P (sp, going_to_add) ? @@ -2539,7 +2545,7 @@ goto do_fallback; } -retry: + retry: /* First see if we can generate one from the window specifiers. */ if (!NILP (window)) CHECK_INSTANCE_ENTRY (window, matchspec, LOCALE_WINDOW); @@ -2558,7 +2564,7 @@ /* Last and least try the global specifiers. */ CHECK_INSTANCE_ENTRY (Qglobal, matchspec, LOCALE_GLOBAL); -do_fallback: + do_fallback: /* We're out of specifiers and we still haven't generated an instance. At least try the fallback ... If this fails, then we just return Qunbound. */ diff -r 892ca416f0fb -r 9d177e8d4150 src/specifier.h --- a/src/specifier.h Mon Aug 13 11:30:00 2007 +0200 +++ b/src/specifier.h Mon Aug 13 11:30:53 2007 +0200 @@ -124,6 +124,13 @@ valid. */ void (*validate_method) (Lisp_Object instantiator); + + /* Copy method: Given an instantiator, copy the bits that we need to + for this specifier type. + + If this function is not present, then Fcopy_tree is used. */ + Lisp_Object (*copy_instantiator_method) (Lisp_Object instantiator); + /* Validate-matchspec method: Given a matchspec, verify that it's valid for this specifier type. If not, signal an error. diff -r 892ca416f0fb -r 9d177e8d4150 src/syntax.c --- a/src/syntax.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/syntax.c Mon Aug 13 11:30:53 2007 +0200 @@ -385,12 +385,12 @@ if (code != Sword #ifdef MULE || WORD_BOUNDARY_P (ch0, ch1) -#endif +#endif ) break; #ifdef MULE ch0 = ch1; -#endif +#endif from++; } count--; @@ -1027,7 +1027,7 @@ if (SYNTAX_PREFIX_UNSAFE (mirrortab, c)) continue; - switch (((quoted) ? Sword : code)) + switch (quoted ? Sword : code) { case Sword: case Ssymbol: @@ -1681,11 +1681,12 @@ DEFVAR_BOOL ("parse-sexp-ignore-comments", &parse_sexp_ignore_comments /* Non-nil means `forward-sexp', etc., should treat comments as whitespace. */ ); + parse_sexp_ignore_comments = 0; - words_include_escapes = 0; DEFVAR_BOOL ("words-include-escapes", &words_include_escapes /* Non-nil means `forward-word', etc., should treat escape chars part of words. */ ); + words_include_escapes = 0; no_quit_in_re_search = 0; } diff -r 892ca416f0fb -r 9d177e8d4150 src/toolbar.h --- a/src/toolbar.h Mon Aug 13 11:30:00 2007 +0200 +++ b/src/toolbar.h Mon Aug 13 11:30:53 2007 +0200 @@ -34,7 +34,7 @@ #define FRAME_CURRENT_TOOLBAR_SIZE(frame, pos) \ ((frame)->current_toolbar_size[pos]) #define DEVICE_SUPPORTS_TOOLBARS_P(d) \ - (HAS_DEVMETH_P ((d), output_frame_toolbars)) + HAS_DEVMETH_P (d, output_frame_toolbars) struct toolbar_button { diff -r 892ca416f0fb -r 9d177e8d4150 src/widget.c --- a/src/widget.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/widget.c Mon Aug 13 11:30:53 2007 +0200 @@ -101,7 +101,7 @@ newargs[0] = Fwidget_get (args[0], args[1]); newargs[1] = args[0]; newargs[2] = Flist (nargs - 2, args + 2); - GCPRO1 ((newargs[2])); + GCPRO1 (newargs[2]); RETURN_UNGCPRO (Fapply (3, newargs)); } diff -r 892ca416f0fb -r 9d177e8d4150 src/window.c --- a/src/window.c Mon Aug 13 11:30:00 2007 +0200 +++ b/src/window.c Mon Aug 13 11:30:53 2007 +0200 @@ -4731,7 +4731,6 @@ #define XWINDOW_CONFIGURATION(x) XRECORD (x, window_configuration, struct window_config) #define XSETWINDOW_CONFIGURATION(x, p) XSETRECORD (x, p, window_configuration) #define WINDOW_CONFIGURATIONP(x) RECORDP (x, window_configuration) -#define GC_WINDOW_CONFIGURATIONP(x) GC_RECORDP (x, window_configuration) #define CHECK_WINDOW_CONFIGURATION(x) CHECK_RECORD (x, window_configuration) static Lisp_Object diff -r 892ca416f0fb -r 9d177e8d4150 tests/ChangeLog --- a/tests/ChangeLog Mon Aug 13 11:30:00 2007 +0200 +++ b/tests/ChangeLog Mon Aug 13 11:30:53 2007 +0200 @@ -1,3 +1,22 @@ +1999-12-24 Martin Buchholz + + * XEmacs 21.2.25 is released. + +1999-12-21 Martin Buchholz + + * automated/byte-compiler-tests.el: Add Jan's tests for equal + effect of bytecode and interpreted code. + + * automated/lisp-tests.el: Add tests for near-text functions. + +1999-12-19 Martin Buchholz + + * automated/mule-tests.el: Add tests for fillarray, aset. + +1999-12-17 Martin Buchholz + + * automated/lisp-tests.el: Add tests for mapcar1() crashes. + 1999-12-14 Martin Buchholz * XEmacs 21.2.24 is released. diff -r 892ca416f0fb -r 9d177e8d4150 tests/automated/base64-tests.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/automated/base64-tests.el Mon Aug 13 11:30:53 2007 +0200 @@ -0,0 +1,249 @@ +;; Copyright (C) 1999 Free Software Foundation, Inc. + +;; Author: Hrvoje Niksic +;; Maintainer: Hrvoje Niksic +;; Created: 1999 +;; Keywords: tests + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs 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. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: Not in FSF. + +;;; Commentary: + +;; Test base64 functions. +;; See test-harness.el for instructions on how to run these tests. + +(eval-when-compile + (condition-case nil + (require 'test-harness) + (file-error + (push "." load-path) + (when (and (boundp 'load-file-name) (stringp load-file-name)) + (push (file-name-directory load-file-name) load-path)) + (require 'test-harness)))) + +;; We need to test the buffer and string functions. We do it by +;; testing them in various circumstances, asserting the same result, +;; and returning that result. + +(defvar bt-test-buffer (get-buffer-create " *base64-workhorse*")) + +(defun bt-base64-encode-string (string &optional no-line-break) + (let ((string-result (base64-encode-string string no-line-break)) + length) + (with-current-buffer bt-test-buffer + ;; the whole buffer + (erase-buffer) + (insert string) + (setq length (base64-encode-region (point-min) (point-max) no-line-break)) + (Assert (eq length (- (point-max) (point-min)))) + (Assert (equal (buffer-string) string-result)) + ;; partial + (erase-buffer) + (insert "random junk........\0\0';'eqwrkw[erpqf") + (let ((p1 (point)) p2) + (insert string) + (setq p2 (point-marker)) + (insert "...more random junk.q,f3/.qrm314.r,m2typ' 2436T@W$^@$#^T@") + (setq length (base64-encode-region p1 p2 no-line-break)) + (Assert (eq length (- p2 p1))) + (Assert (equal (buffer-substring p1 p2) string-result)))) + string-result)) + +(defun bt-base64-decode-string (string) + (let ((string-result (base64-decode-string string)) + length) + (with-current-buffer bt-test-buffer + ;; the whole buffer + (erase-buffer) + (insert string) + (setq length (base64-decode-region (point-min) (point-max))) + (cond (string-result + (Assert (eq length (- (point-max) (point-min)))) + (Assert (equal (buffer-string) string-result))) + (t + (Assert (null length)) + ;; The buffer should not have been modified. + (Assert (equal (buffer-string) string)))) + ;; partial + (erase-buffer) + (insert "random junk........\0\0';'eqwrkw[erpqf") + (let ((p1 (point)) p2) + (insert string) + (setq p2 (point-marker)) + (insert "...more random junk.q,f3/.qrm314.\0\0r,m2typ' 2436T@W$^@$#T@") + (setq length (base64-decode-region p1 p2)) + (cond (string-result + (Assert (eq length (- p2 p1))) + (Assert (equal (buffer-substring p1 p2) string-result))) + (t + (Assert (null length)) + ;; The buffer should not have been modified. + (Assert (equal (buffer-substring p1 p2) string)))))) + string-result)) + +(defun bt-remove-newlines (str) + (apply #'string (delete ?\n (mapcar #'identity str)))) + +(defconst bt-allchars + (let ((str (make-string 256 ?\0))) + (dotimes (i 256) + (aset str i (int-char i))) + str)) + +(defconst bt-test-strings + `(("" "") + ("foo" "Zm9v") + ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" + "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAx +MjM0NTY3ODk=") + (,bt-allchars + "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1 +Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWpr +bG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6Ch +oqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX +2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==") + )) + +;;----------------------------------------------------- +;; Encoding base64 +;;----------------------------------------------------- + +(loop for (raw encoded) in bt-test-strings do + (Assert (equal (bt-base64-encode-string raw) encoded)) + ;; test the NO-LINE-BREAK flag + (Assert (equal (bt-base64-encode-string raw t) (bt-remove-newlines encoded)))) + +;; When Mule is around, Lisp programmers should make sure that the +;; buffer contains only characters whose `char-int' is in the [0, 256) +;; range. If this condition is not satisfied for any character, an +;; error is signaled. +(when (featurep 'mule) + ;; #### remove subtraction of 128 -- no longer needed with make-char + ;; patch! + (let* ((mule-string (format "Hrvoje Nik%ci%c" + ;; scaron == 185 in Latin 2 + (make-char 'latin-iso8859-2 (- 185 128)) + ;; cacute == 230 in Latin 2 + (make-char 'latin-iso8859-2 (- 230 128))))) + (Check-Error-Message error "Non-ascii character in base64 input" + (bt-base64-encode-string mule-string)))) + +;;----------------------------------------------------- +;; Decoding base64 +;;----------------------------------------------------- + +(loop for (raw encoded) in bt-test-strings do + (Assert (equal (bt-base64-decode-string encoded) raw)) + (Assert (equal (bt-base64-decode-string (bt-remove-newlines encoded)) raw))) + +;; Test errors +(dolist (str `("foo" "AAC" "foo\0bar" "====" "Zm=9v" ,bt-allchars)) + (Check-Error error (base64-decode-string str))) + +;; base64-decode-string should ignore non-base64 characters anywhere +;; in the string. We test this in the cheesiest manner possible, by +;; inserting non-base64 chars at the beginning, at the end, and in the +;; middle of the string. + +(defconst bt-base64-chars '(?A ?B ?C ?D ?E ?F ?G ?H ?I ?J + ;; sometimes I hate Emacs indentation. + ?K ?L ?M ?N ?O ?P ?Q ?R ?S ?T + ?U ?V ?W ?X ?Y ?Z ?a ?b ?c ?d + ?e ?f ?g ?h ?i ?j ?k ?l ?m ?n + ?o ?p ?q ?r ?s ?t ?u ?v ?w ?x + ?y ?z ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 + ?8 ?9 ?+ ?/ ?=)) + +(defconst bt-nonbase64-chars (set-difference (mapcar #'identity bt-allchars) + bt-base64-chars)) + +(when t + ;; This code crashes some versions of XEmacs 21.2! This requires + ;; further investigation. I (hniksic) am running Linux, and for me, + ;; XEmacs used to crash in Fmapconcat()->mapcar1(), after a GC that + ;; thrashes the stack. Raymond Toy reported a similar crash under + ;; Solaris. I can no longer repeat the bug, so I cannot fix it now. + (loop for (raw encoded) in bt-test-strings do + (unless (equal raw "") + (let* ((middlepos (/ (1+ (length encoded)) 2)) + (left (substring encoded 0 middlepos)) + (right (substring encoded middlepos))) + ;; Whitespace at the beginning, end, and middle. + (let ((mangled (concat bt-nonbase64-chars left bt-nonbase64-chars right + bt-nonbase64-chars))) + (Assert (equal (bt-base64-decode-string mangled) raw))) + + ;; Whitespace between every char. + (let ((mangled (concat bt-nonbase64-chars + ;; ENCODED with bt-nonbase64-chars + ;; between every character. + (mapconcat #'char-to-string encoded + (apply #'string bt-nonbase64-chars)) + bt-nonbase64-chars))) + (Assert (equal (bt-base64-decode-string mangled) raw)))))) + ) + +;;----------------------------------------------------- +;; Mixed... +;;----------------------------------------------------- + +;; The whole point of base64 is to ensure that an arbitrary sequence +;; of bytes passes through gateway hellfire unscathed, protected by +;; the asbestos suit of base64. Here we test that +;; (base64-decode-string (base64-decode-string FOO)) equals FOO for +;; any FOO we can think of. The following stunts stress-test +;; practically all aspects of the encoding and decoding process. + +(loop for (raw ignored) in bt-test-strings do + (Assert (equal (bt-base64-decode-string + (bt-base64-encode-string raw)) + raw)) + (Assert (equal (bt-base64-decode-string + (bt-base64-decode-string + (bt-base64-encode-string + (bt-base64-encode-string raw)))) + raw)) + (Assert (equal (bt-base64-decode-string + (bt-base64-decode-string + (bt-base64-decode-string + (bt-base64-encode-string + (bt-base64-encode-string + (bt-base64-encode-string raw)))))) + raw)) + (Assert (equal (bt-base64-decode-string + (bt-base64-decode-string + (bt-base64-decode-string + (bt-base64-decode-string + (bt-base64-encode-string + (bt-base64-encode-string + (bt-base64-encode-string + (bt-base64-encode-string raw)))))))) + raw)) + (Assert (equal (bt-base64-decode-string + (bt-base64-decode-string + (bt-base64-decode-string + (bt-base64-decode-string + (bt-base64-decode-string + (bt-base64-encode-string + (bt-base64-encode-string + (bt-base64-encode-string + (bt-base64-encode-string + (bt-base64-encode-string raw)))))))))) + raw))) diff -r 892ca416f0fb -r 9d177e8d4150 tests/automated/byte-compiler-tests.el --- a/tests/automated/byte-compiler-tests.el Mon Aug 13 11:30:00 2007 +0200 +++ b/tests/automated/byte-compiler-tests.el Mon Aug 13 11:30:53 2007 +0200 @@ -91,3 +91,30 @@ error "`let' bindings can have only one value-form" (eval '(let* ((x 1 2)) 3))) +(defmacro before-and-after-compile-equal (&rest form) + `(Assert (equal (funcall (quote (lambda () ,@form))) + (funcall (byte-compile (quote (lambda () ,@form))))))) + +(defvar simplyamarker (point-min-marker)) + +;; The byte optimizer must be careful with +/- with a single argument. + +(before-and-after-compile-equal (+)) +(before-and-after-compile-equal (+ 2 2)) +(before-and-after-compile-equal (+ 2 1)) +(before-and-after-compile-equal (+ 1 2)) +;; (+ 1) is OK. but (+1) signals an error. +(before-and-after-compile-equal (+ 1)) +(before-and-after-compile-equal (+ 3)) +(before-and-after-compile-equal (+ simplyamarker 1)) +;; The optimization (+ m) --> m is invalid when m is a marker. +;; Currently the following test fails - controversial. +;; (before-and-after-compile-equal (+ simplyamarker)) +;; Same tests for minus. +(before-and-after-compile-equal (- 2 2)) +(before-and-after-compile-equal (- 2 1)) +(before-and-after-compile-equal (- 1 2)) +(before-and-after-compile-equal (- 1)) +(before-and-after-compile-equal (- 3)) +(before-and-after-compile-equal (- simplyamarker 1)) +(before-and-after-compile-equal (- simplyamarker)) diff -r 892ca416f0fb -r 9d177e8d4150 tests/automated/lisp-tests.el --- a/tests/automated/lisp-tests.el Mon Aug 13 11:30:00 2007 +0200 +++ b/tests/automated/lisp-tests.el Mon Aug 13 11:30:53 2007 +0200 @@ -755,6 +755,29 @@ (Assert (equal (mapconcat #'identity '("1" "2" "3") "|") "1|2|3")) (Assert (equal (mapconcat #'identity ["1" "2" "3"] "|") "1|2|3")) +;; The following 2 functions used to crash XEmacs via mapcar1(). +;; We don't test the actual values of the mapcar, since they're undefined. +(Assert + (let ((x (list (cons 1 1) (cons 2 2) (cons 3 3)))) + (mapcar + (lambda (y) + "Devious evil mapping function" + (when (eq (car y) 2) ; go out onto a limb + (setcdr x nil) ; cut it off behind us + (garbage-collect)) ; are we riding a magic broomstick? + (car y)) ; sorry, hard landing + x))) + +(Assert + (let ((x (list (cons 1 1) (cons 2 2) (cons 3 3)))) + (mapcar + (lambda (y) + "Devious evil mapping function" + (when (eq (car y) 1) + (setcdr (cdr x) 42)) ; drop a brick wall onto the freeway + (car y)) + x))) + ;;----------------------------------------------------- ;; Test vector functions ;;----------------------------------------------------- @@ -807,3 +830,34 @@ (Assert (equal (split-string "foo,,bar,," ",") '("foo" "" "bar" "" ""))) (Assert (equal (split-string "foo,,bar" ",+") '("foo" "bar"))) (Assert (equal (split-string ",foo,,bar," ",+") '("" "foo" "bar" ""))) + +;;----------------------------------------------------- +;; Test near-text buffer functions. +;;----------------------------------------------------- +(with-temp-buffer + (erase-buffer) + (Assert (eq (char-before) nil)) + (Assert (eq (char-before (point)) nil)) + (Assert (eq (char-before (point-marker)) nil)) + (Assert (eq (char-before (point) (current-buffer)) nil)) + (Assert (eq (char-before (point-marker) (current-buffer)) nil)) + (Assert (eq (char-after) nil)) + (Assert (eq (char-after (point)) nil)) + (Assert (eq (char-after (point-marker)) nil)) + (Assert (eq (char-after (point) (current-buffer)) nil)) + (Assert (eq (char-after (point-marker) (current-buffer)) nil)) + (Assert (eq (preceding-char) 0)) + (Assert (eq (preceding-char (current-buffer)) 0)) + (Assert (eq (following-char) 0)) + (Assert (eq (following-char (current-buffer)) 0)) + (insert "foobar") + (Assert (eq (char-before) ?r)) + (Assert (eq (char-after) nil)) + (Assert (eq (preceding-char) ?r)) + (Assert (eq (following-char) 0)) + (goto-char (point-min)) + (Assert (eq (char-before) nil)) + (Assert (eq (char-after) ?f)) + (Assert (eq (preceding-char) 0)) + (Assert (eq (following-char) ?f)) + ) diff -r 892ca416f0fb -r 9d177e8d4150 tests/automated/mule-tests.el --- a/tests/automated/mule-tests.el Mon Aug 13 11:30:00 2007 +0200 +++ b/tests/automated/mule-tests.el Mon Aug 13 11:30:53 2007 +0200 @@ -29,6 +29,9 @@ ;; Test some Mule functionality (most of these remain to be written) . ;; See test-harness.el for instructions on how to run these tests. +;; This file will be (read)ed by a non-mule XEmacs, so don't use +;; literal non-Latin1 characters. Use (make-char) instead. + ;;----------------------------------------------------------------- ;; Test whether all legal chars may be safely inserted to a buffer. ;;----------------------------------------------------------------- @@ -73,3 +76,31 @@ ;; time-consuming tests like this one run twice, once interpreted and ;; once compiled, for no good reason. (test-chars t) + +;;----------------------------------------------------------------- +;; Test string modification functions that modify the length of a char. +;;----------------------------------------------------------------- + +(when (featurep 'mule) + ;; Test fillarray + (macrolet + ((fillarray-test + (charset1 charset2) + (let ((char1 (make-char charset1 69)) + (char2 (make-char charset2 69))) + `(let ((string (make-string 1000 ,char1))) + (fillarray string ,char2) + (Assert (eq (aref string 0) ,char2)) + (Assert (eq (aref string (1- (length string))) ,char2)) + (Assert (eq (length string) 1000)))))) + (fillarray-test ascii latin-iso8859-1) + (fillarray-test ascii latin-iso8859-2) + (fillarray-test latin-iso8859-1 ascii) + (fillarray-test latin-iso8859-2 ascii)) + + ;; Test aset + (let ((string (string (make-char 'ascii 69) (make-char 'latin-iso8859-2 69)))) + (aset string 0 (make-char 'latin-iso8859-2 42)) + (Assert (eq (aref string 1) (make-char 'latin-iso8859-2 69)))) + + ) diff -r 892ca416f0fb -r 9d177e8d4150 tests/glyph-test.el --- a/tests/glyph-test.el Mon Aug 13 11:30:00 2007 +0200 +++ b/tests/glyph-test.el Mon Aug 13 11:30:53 2007 +0200 @@ -151,4 +151,25 @@ (set-glyph-face layout 'gui-element) (set-extent-begin-glyph (make-extent (point) (point)) layout) - + +(setq test-toggle-widget nil) + +(defun test-toggle (widget) + (set-extent-begin-glyph + (make-extent (point) (point)) + (make-glyph (vector 'button + :descriptor "ok" + :style 'toggle + :selected `(funcall test-toggle-value + ,widget) + :callback `(funcall test-toggle-action + ,widget))))) + +(defun test-toggle-action (widget &optional event) + (if widget + (message "Widget is t") + (message "Widget is nil"))) + +(defun test-toggle-value (widget) + (setq widget (not widget)) + (not widget)) diff -r 892ca416f0fb -r 9d177e8d4150 version.sh --- a/version.sh Mon Aug 13 11:30:00 2007 +0200 +++ b/version.sh Mon Aug 13 11:30:53 2007 +0200 @@ -2,8 +2,8 @@ emacs_is_beta=t emacs_major_version=21 emacs_minor_version=2 -emacs_beta_version=24 -xemacs_codename="Hecate" +emacs_beta_version=25 +xemacs_codename="Hephaestus" infodock_major_version=4 infodock_minor_version=0 infodock_build_version=8