From: tomo Date: Fri, 4 Jun 1999 05:04:07 +0000 (+0000) Subject: Sync with r21_2_14-1999-06-04-13. X-Git-Tag: r21_2_14-raw-text-2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1387c94a1fcb01f9b4e234ef7d92b59d3a7cafb0;p=chise%2Fxemacs-chise.git- Sync with r21_2_14-1999-06-04-13. --- diff --git a/CHANGES-beta b/CHANGES-beta index 48c24ee..6cea377 100644 --- a/CHANGES-beta +++ b/CHANGES-beta @@ -1,6 +1,42 @@ -*- indented-text -*- -to 21.2.14 "" +to 21.2.15 "Sakuragawa" +-- Miscellaneous fixes from Hrvoje Niksic +-- Documentation updates from Hrvoje Niksic +-- mule-charset.el synch with Mule from Steve Baur +-- miscellaneous build and cosmetic fixes from Steve Baur +-- font-menu for mswindows from Andy Piper +-- select rationalisation for window systems from Andy Piper +-- reinstate sheap adjustment + mingw32 fixes from Andy Piper + +to 21.2.14 "Dionysos" -- mingw32 port from Andy Piper +-- fix for Solaris build lossage from Hrvoje Niksic +-- THAI/Cyrillic-KOI8, Vietnamese, Ethiopic support from MORIOKA Tomohiko +-- miscellaneous bug fixes from Gunnar Evermann +-- Internal purespace cleanup from Olivier Galibert +-- documentation updates from Hrvoje Niksic +-- dump time tuning from Hrvoje Niksic +-- miscellaneous bug fixes from Giacomo Boffi +-- font hacking from Jan Vroonhof +-- Czech language support from David Sauer +-- `delete-key-deletes-forward' now defaults to t +-- `locate-file' update from Hrvoje Niksic +-- MS Windows build fixes from Adrian Aichner +-- LDAP updates from Oscar Figueiredo +-- miscellaneous bug fixes from Colin Rafferty and Kai Haberzettl +-- disable display of images in buffers by file format +-- miscellaneous Mule fixes from Olivier Galibert +-- documentation updates from Albert Chin-A-Young +-- documentation updates from Gunnar Evermann and Stephen Turnbull +-- MS Windows build fix from Norbert Koch +-- miscellaneous MS Windows fixes from Andy Piper +-- redisplay bug fixes from Jan Vroonhof +-- miscellaneous bug fixes from Robert Pluim, MORIOKA Tomohiko +-- many, many bug fixes and enhancements from Hrvoje Niksic and Olivier + Galibert +-- miscellaneous bug fixes from Martin Buchholz +-- Miscellaneous MS Windows fixes from Philip Aston +-- lots of new tests from Hrvoje Niksic to 21.2.13 "Demeter" -- Build fixes from Martin Buchholz diff --git a/ChangeLog b/ChangeLog index bb8025d..c7da4c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,35 @@ +1999-05-25 Jan Vroonhof + + * configure.in: For non-beta's use x.y.z format for version strings. + +1999-06-03 SL Baur + + * version.sh: add emacs_is_beta initialization + + * configure.in: Implement patch levels in version number + From Jan Vroonhof + + * configure.in: + * configure.usage: + * config.h.in: Rename session option to wmcommand. + From Oliver Graf + +1999-05-16 Mike McEwan + + * info/dir: Add `emodules.info' entry to the top info dir. + +1999-05-31 SL Baur + + * configure.in (CPP): Don't check for include subdirectories in + site-prefix directories. This check loses in valid configurations + like /usr/jp in TurboLinux. Conditionally add include directory to + site switches. + +1999-05-14 Hrvoje Niksic + + * configure.in (quoted_arguments): Support + --error-checking=byte-code. + 1999-05-14 XEmacs Build Bot * XEmacs 21.2.14 is released diff --git a/configure b/configure index 8e677b0..d7035ac 100755 --- a/configure +++ b/configure @@ -2,7 +2,7 @@ #### Configuration script for XEmacs. Largely divergent from FSF. #### Guess values for system-dependent variables and create Makefiles. -#### Generated automatically using autoconf version 2.12 +#### Generated automatically using autoconf version 2.13 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois. #### Copyright (C) 1996, 1997 Sun Microsystems, Inc. @@ -199,6 +199,8 @@ ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' cross_compiling=no +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -323,7 +325,7 @@ while test $# != 0; do with_jpeg | \ with_png | \ with_tiff | \ - with_session | \ + with_wmcommand | \ with_xmu | \ with_purify | \ with_quantify | \ @@ -501,14 +503,17 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; malloc ) error_check_malloc=yes ;; nomalloc ) error_check_malloc=no ;; + byte_code ) error_check_byte_code=yes ;; + nobyte_code ) error_check_byte_code=no ;; + * ) bogus_error_check=yes ;; esac if test "$bogus_error_check" -o \ \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then if test "$error_check_default" = yes ; then - types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'." + types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'." else - types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'." + types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'." fi (echo "$progname: Usage error:" echo " " "Valid types for the \`--$optname' option are: @@ -520,6 +525,7 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1 error_check_bufpos=$new_default error_check_gc=$new_default error_check_malloc=$new_default + error_check_byte_code=$new_default new_default= # reset this fi echeck_notfirst=true @@ -763,7 +769,7 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1 fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:767: checking whether ln -s works" >&5 +echo "configure:773: checking whether ln -s works" >&5 rm -f conftestdata if ln -s X conftestdata 2>/dev/null @@ -828,7 +834,7 @@ vpath %.in $(srcdir)' fi . "$srcdir/version.sh" || exit 1; -if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi +if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi : "${extra_verbose=$beta}" version="${emacs_major_version}.${emacs_minor_version}" { test "$extra_verbose" = "yes" && cat << EOF @@ -847,9 +853,10 @@ cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <<\EOF EOF } +test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF + Defining ERROR_CHECK_BYTE_CODE +EOF +cat >> confdefs.h <<\EOF +#define ERROR_CHECK_BYTE_CODE 1 +EOF +} + if test "${debug:=$beta}" = "yes"; then use_assertions=yes memory_usage_stats=yes extra_objs="$extra_objs debug.o" && if test "$extra_verbose" = "yes"; then @@ -988,7 +1014,7 @@ EOF echo $ac_n "checking "host system type"""... $ac_c" 1>&6 -echo "configure:992: checking "host system type"" >&5 +echo "configure:1018: 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/'` @@ -1480,13 +1506,14 @@ xe_save_CFLAGS="$CFLAGS" # 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:1484: checking for $ac_word" >&5 +echo "configure:1510: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -1506,14 +1533,15 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1510: checking for $ac_word" >&5 +echo "configure:1537: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -1547,11 +1575,42 @@ else echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # 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:1585: checking for $ac_word" >&5 + +if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1555: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1614: 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' @@ -1562,12 +1621,14 @@ ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' cross_compiling=no -cat > conftest.$ac_ext < conftest.$ac_ext << EOF + +#line 1627 "configure" #include "confdefs.h" + main(){return(0);} EOF -if { (eval echo configure:1571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1632: \"$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 @@ -1581,25 +1642,33 @@ else ac_cv_prog_cc_works=no fi rm -fr conftest* +ac_ext=c +xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' +xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run' +xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard' +ac_cpp='$CPP '"$xe_cppflags" +ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' +cross_compiling=no echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1591: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1660: 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:1596: checking whether we are using GNU C" >&5 +echo "configure:1665: 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:1672: \"$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 @@ -1609,11 +1678,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1617: checking whether ${CC-cc} accepts -g" >&5 +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1690: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1625,16 +1698,20 @@ rm -f conftest* echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then CFLAGS="-g -O2" else - CFLAGS="-O2" + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi if test "$with_gcc" = "no" -a "$GCC" = "yes"; then @@ -1642,13 +1719,14 @@ if test "$with_gcc" = "no" -a "$GCC" = "yes"; then # 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:1646: checking for $ac_word" >&5 +echo "configure:1723: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -1668,14 +1746,15 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1672: checking for $ac_word" >&5 +echo "configure:1750: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -1709,11 +1788,42 @@ else echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # 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:1798: checking for $ac_word" >&5 + +if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1827: 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' @@ -1724,12 +1834,14 @@ ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' cross_compiling=no -cat > conftest.$ac_ext < conftest.$ac_ext << EOF + +#line 1840 "configure" #include "confdefs.h" + main(){return(0);} EOF -if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1845: \"$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 @@ -1743,25 +1855,33 @@ else ac_cv_prog_cc_works=no fi rm -fr conftest* +ac_ext=c +xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' +xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run' +xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard' +ac_cpp='$CPP '"$xe_cppflags" +ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' +cross_compiling=no echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1753: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1873: 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:1758: checking whether we are using GNU C" >&5 +echo "configure:1878: 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:1885: \"$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 @@ -1771,11 +1891,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1779: checking whether ${CC-cc} accepts -g" >&5 +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1903: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1787,16 +1911,20 @@ rm -f conftest* echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then CFLAGS="-g -O2" else - CFLAGS="-O2" + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then @@ -1804,13 +1932,14 @@ elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then # 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:1808: checking for $ac_word" >&5 +echo "configure:1936: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -1830,14 +1959,15 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1834: checking for $ac_word" >&5 +echo "configure:1963: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -1871,11 +2001,42 @@ else echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # 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:2011: checking for $ac_word" >&5 + +if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1879: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2040: 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' @@ -1886,12 +2047,14 @@ ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' cross_compiling=no -cat > conftest.$ac_ext < conftest.$ac_ext << EOF + +#line 2053 "configure" #include "confdefs.h" + main(){return(0);} EOF -if { (eval echo configure:1895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2058: \"$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 @@ -1905,25 +2068,33 @@ else ac_cv_prog_cc_works=no fi rm -fr conftest* +ac_ext=c +xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' +xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run' +xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard' +ac_cpp='$CPP '"$xe_cppflags" +ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' +cross_compiling=no echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1915: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2086: 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:1920: checking whether we are using GNU C" >&5 +echo "configure:2091: 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:2098: \"$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 @@ -1933,11 +2104,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1941: checking whether ${CC-cc} accepts -g" >&5 +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:2116: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1949,16 +2124,20 @@ rm -f conftest* echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then CFLAGS="-g -O2" else - CFLAGS="-O2" + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi fi @@ -1970,7 +2149,7 @@ test -n "$CPP" -a -d "$CPP" && CPP= 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:1974: checking how to run the C preprocessor" >&5 +echo "configure:2153: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1983,14 +2162,14 @@ if test -z "$CPP"; then # 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:1993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:2172: \"$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 : else @@ -2000,14 +2179,31 @@ else 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:2189: \"$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 + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + 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:2010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:2206: \"$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 : else @@ -2020,6 +2216,8 @@ fi rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" CPP="$ac_cv_prog_CPP" else @@ -2029,9 +2227,9 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:2033: checking for AIX" >&5 +echo "configure:2231: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:2062: checking for GNU libc" >&5 +echo "configure:2260: checking for GNU libc" >&5 cat > conftest.$ac_ext < int main() { @@ -2072,7 +2270,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* have_glibc=yes else @@ -2094,7 +2292,7 @@ EOF cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -2380,7 +2578,7 @@ test -n "$unexec" && extra_objs="$extra_objs $unexec" && if test "$ext fi echo $ac_n "checking for dynodump""... $ac_c" 1>&6 -echo "configure:2384: checking for dynodump" >&5 +echo "configure:2582: checking for dynodump" >&5 if test "$unexec" != "unexsol2.o"; then echo "$ac_t""no" 1>&6 else @@ -2418,12 +2616,12 @@ if test "$unexec" = "unexaix.o"; then done echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6 -echo "configure:2422: checking for terminateAndUnload in -lC" >&5 +echo "configure:2620: 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; then +if { (eval echo configure:2636: \"$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 @@ -2501,16 +2699,15 @@ fi case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac if test -n "$site_prefixes"; then for dir in $site_prefixes; do - inc_dir="${dir}/include" lib_dir="${dir}/lib" if test ! -d "$dir"; then { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; } - elif test ! -d "$inc_dir"; then - { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$inc_dir'" >&2; exit 1; } elif test ! -d "$lib_dir"; then { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; } else - c_switch_site="$c_switch_site "-I$inc_dir"" && if test "$extra_verbose" = "yes"; then echo " Appending \""-I$inc_dir"\" to \$c_switch_site"; fi + if test -d "$inc_dir"; then + c_switch_site="$c_switch_site "-I$inc_dir"" && if test "$extra_verbose" = "yes"; then echo " Appending \""-I$inc_dir"\" to \$c_switch_site"; fi + fi ld_switch_site="$ld_switch_site "-L$lib_dir"" && if test "$extra_verbose" = "yes"; then echo " Appending \""-L$lib_dir"\" to \$ld_switch_site"; fi fi done @@ -2538,7 +2735,7 @@ fi if test "$add_runtime_path" = "yes"; then echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 -echo "configure:2542: checking "for runtime libraries flag"" >&5 +echo "configure:2739: checking "for runtime libraries flag"" >&5 case "$opsys" in sol2 ) dash_r="-R" ;; decosf* | linux* | irix*) dash_r="-rpath " ;; @@ -2560,14 +2757,14 @@ if test "$GCC" = "yes"; then done fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* dash_r="$try_dash_r" else @@ -2669,10 +2866,10 @@ else fi after_morecore_hook_exists=yes echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6 -echo "configure:2673: checking for malloc_get_state" >&5 +echo "configure:2870: checking for malloc_get_state" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2896: \"$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 @@ -2715,10 +2912,10 @@ doug_lea_malloc=no fi echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 -echo "configure:2719: checking for malloc_set_state" >&5 +echo "configure:2916: checking for malloc_set_state" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2942: \"$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 @@ -2761,16 +2958,16 @@ doug_lea_malloc=no fi echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 -echo "configure:2765: checking whether __after_morecore_hook exists" >&5 +echo "configure:2962: checking whether __after_morecore_hook exists" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2971: \"$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 @@ -2829,13 +3026,14 @@ fi # 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:2833: checking for $ac_word" >&5 +echo "configure:3030: checking for $ac_word" >&5 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" @@ -2878,26 +3076,28 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # 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:2886: checking for a BSD compatible install" >&5 +echo "configure:3085: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" @@ -2926,6 +3126,8 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' for ac_prog in 'bison -y' byacc @@ -2933,13 +3135,14 @@ do # 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:2937: checking for $ac_word" >&5 +echo "configure:3139: checking for $ac_word" >&5 if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_YACC="$ac_prog" @@ -2964,16 +3167,16 @@ for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2968: checking for $ac_hdr" >&5 +echo "configure:3171: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:3179: \"$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" @@ -3005,16 +3208,16 @@ for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3009: checking for $ac_hdr" >&5 +echo "configure:3212: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:3220: \"$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" @@ -3046,16 +3249,16 @@ for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3050: checking for $ac_hdr" >&5 +echo "configure:3253: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:3261: \"$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" @@ -3084,10 +3287,10 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3088: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3291: checking for sys/wait.h that is POSIX.1 compatible" >&5 cat > conftest.$ac_ext < #include @@ -3103,7 +3306,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3127,10 +3330,10 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3131: checking for ANSI C header files" >&5 +echo "configure:3334: checking for ANSI C header files" >&5 cat > conftest.$ac_ext < #include @@ -3138,8 +3341,8 @@ cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:3345: \"$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* ac_cv_header_stdc=yes @@ -3155,7 +3358,7 @@ rm -f conftest* 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 @@ -3173,7 +3376,7 @@ fi 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 @@ -3191,7 +3394,7 @@ fi 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') @@ -3202,7 +3405,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:3409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -3228,10 +3431,10 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3232: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3435: checking whether time.h and sys/time.h may both be included" >&5 cat > conftest.$ac_ext < #include @@ -3240,7 +3443,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3264,10 +3467,10 @@ EOF fi echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:3268: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo "configure:3471: checking for sys_siglist declaration in signal.h or unistd.h" >&5 cat > conftest.$ac_ext < #include @@ -3279,7 +3482,7 @@ int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:3283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -3304,9 +3507,9 @@ fi echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6 -echo "configure:3308: checking for struct utimbuf" >&5 +echo "configure:3511: checking for struct utimbuf" >&5 cat > conftest.$ac_ext < @@ -3325,7 +3528,7 @@ int main() { static struct utimbuf x; x.actime = x.modtime; ; return 0; } EOF -if { (eval echo configure:3329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3532: \"$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 @@ -3345,10 +3548,10 @@ fi rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3349: checking return type of signal handlers" >&5 +echo "configure:3552: checking return type of signal handlers" >&5 cat > conftest.$ac_ext < #include @@ -3365,7 +3568,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3387,10 +3590,10 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3391: checking for size_t" >&5 +echo "configure:3594: checking for size_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3399,7 +3602,7 @@ cat > conftest.$ac_ext <&5 | - egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_size_t=yes else @@ -3421,10 +3624,10 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3425: checking for pid_t" >&5 +echo "configure:3628: checking for pid_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3433,7 +3636,7 @@ cat > conftest.$ac_ext <&5 | - egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else @@ -3455,10 +3658,10 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3459: checking for uid_t in sys/types.h" >&5 +echo "configure:3662: checking for uid_t in sys/types.h" >&5 cat > conftest.$ac_ext < EOF @@ -3494,10 +3697,10 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3498: checking for mode_t" >&5 +echo "configure:3701: checking for mode_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3506,7 +3709,7 @@ cat > conftest.$ac_ext <&5 | - egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_mode_t=yes else @@ -3528,10 +3731,10 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3532: checking for off_t" >&5 +echo "configure:3735: checking for off_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3540,7 +3743,7 @@ cat > conftest.$ac_ext <&5 | - egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_off_t=yes else @@ -3563,9 +3766,9 @@ fi echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:3567: checking for struct timeval" >&5 +echo "configure:3770: checking for struct timeval" >&5 cat > conftest.$ac_ext < @@ -3581,7 +3784,7 @@ int main() { static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } EOF -if { (eval echo configure:3585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 HAVE_TIMEVAL=yes @@ -3603,10 +3806,10 @@ fi rm -f conftest* echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3607: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3810: checking whether struct tm is in sys/time.h or time.h" >&5 cat > conftest.$ac_ext < #include @@ -3614,7 +3817,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3638,10 +3841,10 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3642: checking for tm_zone in struct tm" >&5 +echo "configure:3845: checking for tm_zone in struct tm" >&5 cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -3649,7 +3852,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:3653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -3672,10 +3875,10 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3676: checking for tzname" >&5 +echo "configure:3879: checking for tzname" >&5 cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -3685,7 +3888,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:3689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -3711,10 +3914,10 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3715: checking for working const" >&5 +echo "configure:3918: checking for working const" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3788,7 +3991,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:3792: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:3995: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` cat > conftestmake <<\EOF @@ -3813,12 +4016,12 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3817: checking whether byte ordering is bigendian" >&5 +echo "configure:4020: 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 @@ -3829,11 +4032,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4036: \"$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 @@ -3844,7 +4047,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3861,7 +4064,7 @@ fi 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:4081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_bigendian=no else @@ -3901,10 +4104,10 @@ fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:3905: checking size of short" >&5 +echo "configure:4108: checking size of short" >&5 cat > conftest.$ac_ext < main() @@ -3915,7 +4118,7 @@ main() exit(0); } EOF -if { (eval echo configure:3919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_short=`cat conftestval` else @@ -3943,10 +4146,10 @@ if test "$ac_cv_sizeof_short" = 0; then exit 1 fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:3947: checking size of int" >&5 +echo "configure:4150: checking size of int" >&5 cat > conftest.$ac_ext < main() @@ -3957,7 +4160,7 @@ main() exit(0); } EOF -if { (eval echo configure:3961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_int=`cat conftestval` else @@ -3979,10 +4182,10 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:3983: checking size of long" >&5 +echo "configure:4186: checking size of long" >&5 cat > conftest.$ac_ext < main() @@ -3993,7 +4196,7 @@ main() exit(0); } EOF -if { (eval echo configure:3997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long=`cat conftestval` else @@ -4015,10 +4218,10 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:4019: checking size of long long" >&5 +echo "configure:4222: checking size of long long" >&5 cat > conftest.$ac_ext < main() @@ -4029,7 +4232,7 @@ main() exit(0); } EOF -if { (eval echo configure:4033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4236: \"$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 @@ -4051,10 +4254,10 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:4055: checking size of void *" >&5 +echo "configure:4258: checking size of void *" >&5 cat > conftest.$ac_ext < main() @@ -4065,7 +4268,7 @@ main() exit(0); } EOF -if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4272: \"$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 @@ -4088,7 +4291,7 @@ EOF echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:4092: checking for long file names" >&5 +echo "configure:4295: 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: @@ -4134,10 +4337,10 @@ fi echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4138: checking for sin" >&5 +echo "configure:4341: checking for sin" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4367: \"$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 @@ -4178,12 +4381,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:4182: checking for sin in -lm" >&5 +echo "configure:4385: 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; then +if { (eval echo configure:4401: \"$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 @@ -4238,14 +4441,14 @@ EOF cat > conftest.$ac_ext < int main() { return atanh(1.0) + asinh(1.0) + acosh(1.0); ; return 0; } EOF -if { (eval echo configure:4249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4452: \"$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 @@ -4262,7 +4465,7 @@ fi rm -f conftest* echo "checking type of mail spool file locking" 1>&6 -echo "configure:4266: checking type of mail spool file locking" >&5 +echo "configure:4469: 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 @@ -4287,12 +4490,12 @@ fi case "$opsys" in decosf*) echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 -echo "configure:4291: checking for cma_open in -lpthreads" >&5 +echo "configure:4494: 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; then +if { (eval echo configure:4510: \"$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 @@ -4339,7 +4542,7 @@ fi esac echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 -echo "configure:4343: checking whether the -xildoff compiler flag is required" >&5 +echo "configure:4546: 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; @@ -4350,7 +4553,7 @@ fi 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:4354: checking for \"-z ignore\" linker flag" >&5 +echo "configure:4557: 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 ;; @@ -4360,7 +4563,7 @@ fi echo "checking "for specified window system"" 1>&6 -echo "configure:4364: checking "for specified window system"" >&5 +echo "configure:4567: checking "for specified window system"" >&5 if test "$with_x11" != "no"; then test "$x_includes $x_libraries" != "NONE NONE" && \ @@ -4393,7 +4596,7 @@ if test "$with_x11" != "no"; then # 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:4397: checking for X" >&5 +echo "configure:4600: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4453,13 +4656,13 @@ if test "$ac_x_includes" = NO; then # 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:4462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:4665: \"$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* # We can compile using X headers with no special include directory. @@ -4527,14 +4730,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4741: \"$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. @@ -4643,17 +4846,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:4647: checking whether -R must be followed by a space" >&5 +echo "configure:4850: 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; then +if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -4669,14 +4872,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -4712,12 +4915,12 @@ ac_cv_lib_dnet_dnet_ntoa=no else echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:4716: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:4919: 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; then +if { (eval echo configure:4935: \"$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 @@ -4752,12 +4955,12 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:4756: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:4959: 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; then +if { (eval echo configure:4975: \"$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 @@ -4797,10 +5000,10 @@ fi # 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:4801: checking for gethostbyname" >&5 +echo "configure:5004: checking for gethostbyname" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5030: \"$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 @@ -4844,12 +5047,12 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:4848: checking for gethostbyname in -lnsl" >&5 +echo "configure:5051: 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; then +if { (eval echo configure:5067: \"$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 @@ -4890,10 +5093,10 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:4894: checking for connect" >&5 +echo "configure:5097: checking for connect" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5123: \"$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 @@ -4939,12 +5142,12 @@ fi 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:4943: checking "$xe_msg_checking"" >&5 +echo "configure:5146: 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; then +if { (eval echo configure:5162: \"$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 @@ -4979,10 +5182,10 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:4983: checking for remove" >&5 +echo "configure:5186: checking for remove" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5212: \"$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 @@ -5026,12 +5229,12 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:5030: checking for remove in -lposix" >&5 +echo "configure:5233: 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; then +if { (eval echo configure:5249: \"$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 @@ -5066,10 +5269,10 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:5070: checking for shmat" >&5 +echo "configure:5273: checking for shmat" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5299: \"$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 @@ -5113,12 +5316,12 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:5117: checking for shmat in -lipc" >&5 +echo "configure:5320: 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; then +if { (eval echo configure:5336: \"$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 @@ -5162,13 +5365,15 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. -echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:5167: checking for IceConnectionNumber in -lICE" >&5 +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:5372: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` -xe_check_libs=" -lICE " +xe_check_libs=" -lICE $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5388: \"$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 @@ -5348,7 +5553,7 @@ EOF echo "checking for X defines extracted by xmkmf" 1>&6 -echo "configure:5352: checking for X defines extracted by xmkmf" >&5 +echo "configure:5557: checking for X defines extracted by xmkmf" >&5 rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -5380,16 +5585,16 @@ EOF ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6 -echo "configure:5384: checking for X11/Intrinsic.h" >&5 +echo "configure:5589: checking for X11/Intrinsic.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:5597: \"$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" @@ -5412,12 +5617,12 @@ fi echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:5416: checking for XOpenDisplay in -lX11" >&5 +echo "configure:5621: 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; then +if { (eval echo configure:5637: \"$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 @@ -5453,12 +5658,12 @@ fi 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:5457: checking "$xe_msg_checking"" >&5 +echo "configure:5662: 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; then +if { (eval echo configure:5678: \"$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 @@ -5496,12 +5701,12 @@ fi echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:5500: checking for XShapeSelectInput in -lXext" >&5 +echo "configure:5705: 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; then +if { (eval echo configure:5721: \"$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 @@ -5535,12 +5740,12 @@ fi echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 -echo "configure:5539: checking for XtOpenDisplay in -lXt" >&5 +echo "configure:5744: 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; then +if { (eval echo configure:5760: \"$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 @@ -5574,14 +5779,14 @@ fi echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:5578: checking the version of X11 being used" >&5 +echo "configure:5783: 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:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:5790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest foobar; x11_release=$? else @@ -5606,16 +5811,16 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5610: checking for $ac_hdr" >&5 +echo "configure:5815: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:5823: \"$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" @@ -5645,7 +5850,7 @@ done echo $ac_n "checking for XFree86""... $ac_c" 1>&6 -echo "configure:5649: checking for XFree86" >&5 +echo "configure:5854: checking for XFree86" >&5 if test -d "/usr/X386/include" -o \ -f "/etc/XF86Config" -o \ -f "/etc/X11/XF86Config" -o \ @@ -5665,12 +5870,12 @@ EOF test -z "$with_xmu" && { echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 -echo "configure:5669: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 +echo "configure:5874: 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; then +if { (eval echo configure:5890: \"$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 @@ -5720,19 +5925,19 @@ EOF echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:5724: checking for main in -lXbsd" >&5 +echo "configure:5929: 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; then +if { (eval echo configure:5941: \"$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 @@ -5769,22 +5974,22 @@ fi fi if test "$with_msw" != "no"; then echo "checking for MS-Windows" 1>&6 -echo "configure:5773: checking for MS-Windows" >&5 +echo "configure:5978: checking for MS-Windows" >&5 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 -echo "configure:5776: checking for main in -lgdi32" >&5 +echo "configure:5981: 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; then +if { (eval echo configure:5993: \"$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 @@ -5849,12 +6054,12 @@ EOF fi fi cat > conftest.$ac_ext < int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; } EOF -if { (eval echo configure:5858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6063: \"$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 @@ -5907,7 +6112,7 @@ else fi if test "$with_x11" != "yes"; then - for feature in tooltalk cde offix session xim xmu + for feature in tooltalk cde offix wmcommand xim xmu 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 @@ -5929,14 +6134,14 @@ case "$x_libraries" in *X11R4* ) test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h" esac -echo "checking for session-management option" 1>&6 -echo "configure:5934: checking for session-management option" >&5; -if test "$with_session" != "no"; then +echo "checking for WM_COMMAND option" 1>&6 +echo "configure:6139: checking for WM_COMMAND option" >&5; +if test "$with_wmcommand" != "no"; then { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_SESSION + Defining HAVE_WMCOMMAND EOF cat >> confdefs.h <<\EOF -#define HAVE_SESSION 1 +#define HAVE_WMCOMMAND 1 EOF } @@ -5945,16 +6150,16 @@ fi 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:5949: checking for X11/Xauth.h" >&5 +echo "configure:6154: checking for X11/Xauth.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:6162: \"$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" @@ -5976,12 +6181,12 @@ fi } test -z "$with_xauth" && { echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 -echo "configure:5980: checking for XauGetAuthByAddr in -lXau" >&5 +echo "configure:6185: 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; then +if { (eval echo configure:6201: \"$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 @@ -6037,16 +6242,16 @@ if test "$with_tooltalk" != "no" ; then 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:6041: checking for ${dir}tt_c.h" >&5 +echo "configure:6246: checking for ${dir}tt_c.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:6254: \"$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" @@ -6081,12 +6286,12 @@ if test "$with_tooltalk" != "no" ; then 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:6085: checking "$xe_msg_checking"" >&5 +echo "configure:6290: 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; then +if { (eval echo configure:6306: \"$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 @@ -6154,16 +6359,16 @@ fi 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:6158: checking for Dt/Dt.h" >&5 +echo "configure:6363: checking for Dt/Dt.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:6371: \"$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" @@ -6185,12 +6390,12 @@ fi } test -z "$with_cde" && { echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 -echo "configure:6189: checking for DtDndDragStart in -lDtSvc" >&5 +echo "configure:6394: 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; then +if { (eval echo configure:6410: \"$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 @@ -6270,7 +6475,7 @@ EOF fi echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6 -echo "configure:6274: checking if drag and drop API is needed" >&5 +echo "configure:6479: checking if drag and drop API is needed" >&5 if test "$with_dragndrop" != "no" ; then if test -n "$dragndrop_proto" ; then with_dragndrop=yes @@ -6291,19 +6496,19 @@ EOF fi echo "checking for LDAP" 1>&6 -echo "configure:6295: checking for LDAP" >&5 +echo "configure:6500: 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:6298: checking for ldap.h" >&5 +echo "configure:6503: checking for ldap.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:6511: \"$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" @@ -6325,16 +6530,16 @@ fi } 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:6329: checking for lber.h" >&5 +echo "configure:6534: checking for lber.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:6542: \"$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" @@ -6359,12 +6564,12 @@ if test "$with_ldap" != "no"; then 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:6363: checking "$xe_msg_checking"" >&5 +echo "configure:6568: 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; then +if { (eval echo configure:6584: \"$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 @@ -6398,12 +6603,12 @@ fi } test "$with_umich_ldap" = "no" && { echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6 -echo "configure:6402: checking for ldap_set_option in -lldap10" >&5 +echo "configure:6607: checking for ldap_set_option in -lldap10" >&5 ac_lib_var=`echo ldap10'_'ldap_set_option | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap10 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6623: \"$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 @@ -6478,15 +6683,15 @@ fi if test "$window_system" != "none"; then echo "checking for graphics libraries" 1>&6 -echo "configure:6482: checking for graphics libraries" >&5 +echo "configure:6687: 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:6487: checking for Xpm - no older than 3.4f" >&5 +echo "configure:6692: checking for Xpm - no older than 3.4f" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext < int main(int c, char **v) { @@ -6494,7 +6699,7 @@ echo "configure:6487: checking for Xpm - no older than 3.4f" >&5 XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;} EOF -if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6703: \"$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 @@ -6536,17 +6741,17 @@ EOF 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:6540: checking for \"FOR_MSW\" xpm" >&5 +echo "configure:6745: checking for \"FOR_MSW\" xpm" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* xpm_for_msw=no else @@ -6572,16 +6777,16 @@ EOF 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:6576: checking for compface.h" >&5 +echo "configure:6781: checking for compface.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:6789: \"$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" @@ -6603,12 +6808,12 @@ fi } test -z "$with_xface" && { echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:6607: checking for UnGenFace in -lcompface" >&5 +echo "configure:6812: 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; then +if { (eval echo configure:6828: \"$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 @@ -6671,12 +6876,12 @@ EOF if test "$with_png $with_tiff" != "no no"; then echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6 -echo "configure:6675: checking for inflate in -lc" >&5 +echo "configure:6880: 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; then +if { (eval echo configure:6896: \"$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 @@ -6706,12 +6911,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:6710: checking for inflate in -lz" >&5 +echo "configure:6915: 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; then +if { (eval echo configure:6931: \"$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 @@ -6741,12 +6946,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 -echo "configure:6745: checking for inflate in -lgz" >&5 +echo "configure:6950: 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; then +if { (eval echo configure:6966: \"$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 @@ -6787,16 +6992,16 @@ fi 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:6791: checking for jpeglib.h" >&5 +echo "configure:6996: checking for jpeglib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:7004: \"$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" @@ -6818,12 +7023,12 @@ fi } test -z "$with_jpeg" && { echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 -echo "configure:6822: checking for jpeg_destroy_decompress in -ljpeg" >&5 +echo "configure:7027: 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; then +if { (eval echo configure:7043: \"$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 @@ -6870,10 +7075,10 @@ EOF png_problem="" test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 -echo "configure:6874: checking for pow" >&5 +echo "configure:7079: checking for pow" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7105: \"$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 @@ -6917,16 +7122,16 @@ fi } 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:6921: checking for png.h" >&5 +echo "configure:7126: checking for png.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:7134: \"$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" @@ -6948,12 +7153,12 @@ fi } test -z "$with_png" && { echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:6952: checking for png_read_image in -lpng" >&5 +echo "configure:7157: 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; then +if { (eval echo configure:7173: \"$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 @@ -6987,10 +7192,10 @@ fi } if test -z "$with_png"; then echo $ac_n "checking for workable png version information""... $ac_c" 1>&6 -echo "configure:6991: checking for workable png version information" >&5 +echo "configure:7196: checking for workable png version information" >&5 xe_check_libs="-lpng -lz" cat > conftest.$ac_ext < int main(int c, char **v) { @@ -6998,7 +7203,7 @@ echo "configure:6991: checking for workable png version information" >&5 if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1; return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;} EOF -if { (eval echo configure:7002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7207: \"$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 @@ -7041,16 +7246,16 @@ EOF 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:7045: checking for tiffio.h" >&5 +echo "configure:7250: checking for tiffio.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:7258: \"$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" @@ -7072,12 +7277,12 @@ fi } test -z "$with_tiff" && { echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6 -echo "configure:7076: checking for TIFFClientOpen in -ltiff" >&5 +echo "configure:7281: 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; then +if { (eval echo configure:7297: \"$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 @@ -7127,16 +7332,16 @@ fi if test "$with_x11" = "yes"; then echo "checking for X11 graphics libraries" 1>&6 -echo "configure:7131: checking for X11 graphics libraries" >&5 +echo "configure:7336: checking for X11 graphics libraries" >&5 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6 -echo "configure:7135: checking for XawScrollbarSetThumb in -lXaw" >&5 +echo "configure:7340: checking for XawScrollbarSetThumb in -lXaw" >&5 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` xe_check_libs=" -lXaw " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7356: \"$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 @@ -7171,16 +7376,16 @@ fi ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:7175: checking for Xm/Xm.h" >&5 +echo "configure:7380: checking for Xm/Xm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:7388: \"$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" @@ -7196,12 +7401,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6 -echo "configure:7200: checking for XmStringFree in -lXm" >&5 +echo "configure:7405: 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; then +if { (eval echo configure:7421: \"$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 @@ -7241,9 +7446,9 @@ fi if test "$have_motif" = "yes"; then echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 -echo "configure:7245: checking for Lesstif" >&5 +echo "configure:7450: checking for Lesstif" >&5 cat > conftest.$ac_ext < #ifdef LESSTIF_VERSION @@ -7506,7 +7711,7 @@ fi if test "$with_mule" = "yes" ; then echo "checking for Mule-related features" 1>&6 -echo "configure:7510: checking for Mule-related features" >&5 +echo "configure:7715: checking for Mule-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining MULE EOF @@ -7531,16 +7736,16 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7535: checking for $ac_hdr" >&5 +echo "configure:7740: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:7748: \"$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" @@ -7570,12 +7775,12 @@ done echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:7574: checking for strerror in -lintl" >&5 +echo "configure:7779: 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; then +if { (eval echo configure:7795: \"$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 @@ -7619,18 +7824,18 @@ fi echo "checking for Mule input methods" 1>&6 -echo "configure:7623: checking for Mule input methods" >&5 +echo "configure:7828: checking for Mule input methods" >&5 case "$with_xim" in "" | "yes" ) echo "checking for XIM" 1>&6 -echo "configure:7626: checking for XIM" >&5 +echo "configure:7831: checking for XIM" >&5 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6 -echo "configure:7629: checking for XOpenIM in -lX11" >&5 +echo "configure:7834: 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; then +if { (eval echo configure:7850: \"$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 @@ -7665,12 +7870,12 @@ fi if test "$have_motif $have_lesstif" = "yes no"; then echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:7669: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:7874: 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; then +if { (eval echo configure:7890: \"$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 @@ -7746,15 +7951,15 @@ EOF if test "$with_xfs" = "yes" ; then echo "checking for XFontSet" 1>&6 -echo "configure:7750: checking for XFontSet" >&5 +echo "configure:7955: checking for XFontSet" >&5 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:7753: checking for XmbDrawString in -lX11" >&5 +echo "configure:7958: 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; then +if { (eval echo configure:7974: \"$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 @@ -7805,16 +8010,16 @@ EOF 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:7809: checking for wnn/jllib.h" >&5 +echo "configure:8014: checking for wnn/jllib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:8022: \"$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" @@ -7838,10 +8043,10 @@ fi for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7842: checking for $ac_func" >&5 +echo "configure:8047: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8073: \"$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 @@ -7893,12 +8098,12 @@ done test "$ac_cv_func_crypt" != "yes" && { echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:7897: checking for crypt in -lcrypt" >&5 +echo "configure:8102: 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; then +if { (eval echo configure:8118: \"$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 @@ -7944,12 +8149,12 @@ fi 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:7948: checking for jl_dic_list_e in -lwnn" >&5 +echo "configure:8153: 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; then +if { (eval echo configure:8169: \"$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 @@ -7978,12 +8183,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6 -echo "configure:7982: checking for jl_dic_list_e in -lwnn4" >&5 +echo "configure:8187: 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; then +if { (eval echo configure:8203: \"$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 @@ -8012,12 +8217,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6 -echo "configure:8016: checking for jl_dic_list_e in -lwnn6" >&5 +echo "configure:8221: 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; then +if { (eval echo configure:8237: \"$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 @@ -8046,12 +8251,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6 -echo "configure:8050: checking for dic_list_e in -lwnn6_fromsrc" >&5 +echo "configure:8255: 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; then +if { (eval echo configure:8271: \"$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 @@ -8110,12 +8315,12 @@ EOF if test "$with_wnn6" != "no"; then echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6 -echo "configure:8114: checking for jl_fi_dic_list in -l$libwnn" >&5 +echo "configure:8319: 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; then +if { (eval echo configure:8335: \"$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 @@ -8161,16 +8366,16 @@ EOF 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:8165: checking for canna/jrkanji.h" >&5 +echo "configure:8370: checking for canna/jrkanji.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:8378: \"$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" @@ -8196,16 +8401,16 @@ fi 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:8200: checking for canna/jrkanji.h" >&5 +echo "configure:8405: checking for canna/jrkanji.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:8413: \"$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" @@ -8232,16 +8437,16 @@ fi 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:8236: checking for canna/RK.h" >&5 +echo "configure:8441: checking for canna/RK.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:8449: \"$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" @@ -8263,12 +8468,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:8267: checking for RkBgnBun in -lRKC" >&5 +echo "configure:8472: 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; then +if { (eval echo configure:8488: \"$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 @@ -8302,12 +8507,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:8306: checking for jrKanjiControl in -lcanna" >&5 +echo "configure:8511: 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; then +if { (eval echo configure:8527: \"$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 @@ -8367,12 +8572,12 @@ if test "$need_motif" = "yes" ; then 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:8371: checking for layout_object_getvalue in -li18n" >&5 +echo "configure:8576: 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; then +if { (eval echo configure:8592: \"$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 @@ -8469,10 +8674,10 @@ fi for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8473: checking for $ac_func" >&5 +echo "configure:8678: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8704: \"$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 @@ -8536,10 +8741,10 @@ case "$opsys" in * ) for ac_func in realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8540: checking for $ac_func" >&5 +echo "configure:8745: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8771: \"$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 @@ -8598,10 +8803,10 @@ esac for ac_func in getloadavg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8602: checking for $ac_func" >&5 +echo "configure:8807: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8833: \"$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 @@ -8660,12 +8865,12 @@ then echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:8664: checking for kstat_open in -lkstat" >&5 +echo "configure:8869: 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; then +if { (eval echo configure:8885: \"$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 @@ -8710,12 +8915,12 @@ fi echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 -echo "configure:8714: checking for kvm_read in -lkvm" >&5 +echo "configure:8919: 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; then +if { (eval echo configure:8935: \"$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 @@ -8760,16 +8965,16 @@ fi fi echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:8764: checking whether netdb declares h_errno" >&5 +echo "configure:8969: checking whether netdb declares h_errno" >&5 cat > conftest.$ac_ext < int main() { return h_errno; ; return 0; } EOF -if { (eval echo configure:8773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8978: \"$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 @@ -8789,16 +8994,16 @@ fi rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:8793: checking for sigsetjmp" >&5 +echo "configure:8998: checking for sigsetjmp" >&5 cat > conftest.$ac_ext < int main() { sigjmp_buf bar; sigsetjmp (bar, 0); ; return 0; } EOF -if { (eval echo configure:8802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9007: \"$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 @@ -8818,11 +9023,11 @@ fi rm -f conftest* echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:8822: checking whether localtime caches TZ" >&5 +echo "configure:9027: checking whether localtime caches TZ" >&5 if test "$ac_cv_func_tzset" = "yes"; then cat > conftest.$ac_ext < #if STDC_HEADERS @@ -8857,7 +9062,7 @@ main() exit (0); } EOF -if { (eval echo configure:8861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then emacs_cv_localtime_cache=no else @@ -8887,9 +9092,9 @@ fi if test "$HAVE_TIMEVAL" = "yes"; then echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6 -echo "configure:8891: checking whether gettimeofday accepts one or two arguments" >&5 +echo "configure:9096: checking whether gettimeofday accepts one or two arguments" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9120: \"$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 @@ -8933,19 +9138,19 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:8937: checking for inline" >&5 +echo "configure:9142: 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:9154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -8995,17 +9200,17 @@ fi # 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:8999: checking for working alloca.h" >&5 +echo "configure:9204: checking for working alloca.h" >&5 cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:9009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9214: \"$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 @@ -9029,23 +9234,28 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:9033: checking for alloca" >&5 +echo "configure:9238: checking for alloca" >&5 cat > conftest.$ac_ext < +# ifdef _MSC_VER +# include +# define alloca _alloca # else -# ifdef _AIX - #pragma alloca +# if HAVE_ALLOCA_H +# include # else -# ifndef alloca /* predefined by HP cc +Olibcalls */ +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); +# endif # endif # endif # endif @@ -9055,7 +9265,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:9059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9269: \"$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 @@ -9083,7 +9293,7 @@ if test $ac_cv_func_alloca_works = no; then # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.o + ALLOCA=alloca.${ac_objext} { test "$extra_verbose" = "yes" && cat << \EOF Defining C_ALLOCA EOF @@ -9094,10 +9304,10 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:9098: checking whether alloca needs Cray hooks" >&5 +echo "configure:9308: checking whether alloca needs Cray hooks" >&5 cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9125: checking for $ac_func" >&5 +echo "configure:9335: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9361: \"$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 @@ -9177,10 +9387,10 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:9181: checking stack direction for C alloca" >&5 +echo "configure:9391: checking stack direction for C alloca" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_stack_direction=1 else @@ -9228,16 +9438,16 @@ test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" && if test "$extra_verbos ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:9232: checking for vfork.h" >&5 +echo "configure:9442: checking for vfork.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:9450: \"$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" @@ -9264,10 +9474,10 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:9268: checking for working vfork" >&5 +echo "configure:9478: checking for working vfork" >&5 cat > conftest.$ac_ext < @@ -9362,7 +9572,7 @@ main() { } } EOF -if { (eval echo configure:9366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_vfork_works=yes else @@ -9388,10 +9598,10 @@ fi echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:9392: checking for working strcoll" >&5 +echo "configure:9602: checking for working strcoll" >&5 cat > conftest.$ac_ext < main () @@ -9401,7 +9611,7 @@ main () strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:9405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_strcoll_works=yes else @@ -9429,10 +9639,10 @@ fi for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9433: checking for $ac_func" >&5 +echo "configure:9643: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9669: \"$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 @@ -9483,10 +9693,10 @@ fi done echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:9487: checking whether getpgrp takes no argument" >&5 +echo "configure:9697: checking whether getpgrp takes no argument" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_getpgrp_void=yes else @@ -9568,10 +9778,10 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:9572: checking for working mmap" >&5 +echo "configure:9782: checking for working mmap" >&5 case "$opsys" in ultrix* ) have_mmap=no ;; *) cat > conftest.$ac_ext < #include @@ -9604,7 +9814,7 @@ int main (int argc, char *argv[]) return 1; } EOF -if { (eval echo configure:9608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:9818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then have_mmap=yes else @@ -9629,16 +9839,16 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9633: checking for $ac_hdr" >&5 +echo "configure:9843: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:9851: \"$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" @@ -9669,10 +9879,10 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9673: checking for $ac_func" >&5 +echo "configure:9883: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9909: \"$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 @@ -9723,10 +9933,10 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:9727: checking for working mmap" >&5 +echo "configure:9937: checking for working mmap" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_mmap_fixed_mapped=yes else @@ -9904,16 +10114,16 @@ EOF ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:9908: checking for termios.h" >&5 +echo "configure:10118: checking for termios.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10126: \"$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" @@ -9955,16 +10165,16 @@ else 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:9959: checking for termio.h" >&5 +echo "configure:10169: checking for termio.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10177: \"$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" @@ -9995,10 +10205,10 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:9999: checking for socket" >&5 +echo "configure:10209: checking for socket" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10235: \"$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 @@ -10036,16 +10246,16 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then 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:10040: checking for netinet/in.h" >&5 +echo "configure:10250: checking for netinet/in.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10258: \"$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" @@ -10061,16 +10271,16 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 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:10065: checking for arpa/inet.h" >&5 +echo "configure:10275: checking for arpa/inet.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10283: \"$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" @@ -10094,9 +10304,9 @@ EOF } echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:10098: checking "for sun_len member in struct sockaddr_un"" >&5 +echo "configure:10308: checking "for sun_len member in struct sockaddr_un"" >&5 cat > conftest.$ac_ext < @@ -10107,7 +10317,7 @@ int main() { static struct sockaddr_un x; x.sun_len = 1; ; return 0; } EOF -if { (eval echo configure:10111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10321: \"$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 @@ -10125,9 +10335,9 @@ else fi rm -f conftest* echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 -echo "configure:10129: checking "for ip_mreq struct in netinet/in.h"" >&5 +echo "configure:10339: checking "for ip_mreq struct in netinet/in.h"" >&5 cat > conftest.$ac_ext < @@ -10137,7 +10347,7 @@ int main() { static struct ip_mreq x; ; return 0; } EOF -if { (eval echo configure:10141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10351: \"$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 @@ -10168,10 +10378,10 @@ fi echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:10172: checking for msgget" >&5 +echo "configure:10382: checking for msgget" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10408: \"$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 @@ -10209,16 +10419,16 @@ if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then 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:10213: checking for sys/ipc.h" >&5 +echo "configure:10423: checking for sys/ipc.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10431: \"$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" @@ -10234,16 +10444,16 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 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:10238: checking for sys/msg.h" >&5 +echo "configure:10448: checking for sys/msg.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10456: \"$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" @@ -10280,16 +10490,16 @@ fi ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:10284: checking for dirent.h" >&5 +echo "configure:10494: checking for dirent.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10502: \"$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" @@ -10315,16 +10525,16 @@ else 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:10319: checking for sys/dir.h" >&5 +echo "configure:10529: checking for sys/dir.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10537: \"$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" @@ -10356,16 +10566,16 @@ fi ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:10360: checking for nlist.h" >&5 +echo "configure:10570: checking for nlist.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10578: \"$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" @@ -10394,7 +10604,7 @@ fi echo "checking "for sound support"" 1>&6 -echo "configure:10398: checking "for sound support"" >&5 +echo "configure:10608: checking "for sound support"" >&5 case "$with_sound" in native | both ) with_native_sound=yes;; nas | no ) with_native_sound=no;; @@ -10405,16 +10615,16 @@ 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:10409: checking for multimedia/audio_device.h" >&5 +echo "configure:10619: checking for multimedia/audio_device.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10627: \"$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" @@ -10461,12 +10671,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:10465: checking for ALopenport in -laudio" >&5 +echo "configure:10675: 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; then +if { (eval echo configure:10691: \"$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 @@ -10508,12 +10718,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:10512: checking for AOpenAudio in -lAlib" >&5 +echo "configure:10722: 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; then +if { (eval echo configure:10738: \"$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 @@ -10562,16 +10772,16 @@ fi 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:10566: checking for ${dir}/soundcard.h" >&5 +echo "configure:10776: checking for ${dir}/soundcard.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10784: \"$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" @@ -10640,7 +10850,7 @@ EOF fi libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi cat > conftest.$ac_ext < EOF @@ -10667,7 +10877,7 @@ test -z "$with_tty" && with_tty=yes if test "$with_tty" = "yes" ; then echo "checking for TTY-related features" 1>&6 -echo "configure:10671: checking for TTY-related features" >&5 +echo "configure:10881: checking for TTY-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_TTY EOF @@ -10683,12 +10893,12 @@ EOF if test -z "$with_ncurses"; then echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:10687: checking for tgetent in -lncurses" >&5 +echo "configure:10897: 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; then +if { (eval echo configure:10913: \"$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 @@ -10732,16 +10942,16 @@ EOF ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:10736: checking for ncurses/curses.h" >&5 +echo "configure:10946: checking for ncurses/curses.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10954: \"$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" @@ -10762,16 +10972,16 @@ fi ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6 -echo "configure:10766: checking for ncurses/term.h" >&5 +echo "configure:10976: checking for ncurses/term.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10984: \"$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" @@ -10800,16 +11010,16 @@ fi 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:10804: checking for ncurses/curses.h" >&5 +echo "configure:11014: checking for ncurses/curses.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:11022: \"$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" @@ -10843,12 +11053,12 @@ fi for lib in curses termlib termcap; do echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:10847: checking for tgetent in -l$lib" >&5 +echo "configure:11057: 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; then +if { (eval echo configure:11073: \"$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 @@ -10890,12 +11100,12 @@ fi else echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:10894: checking for tgetent in -lcurses" >&5 +echo "configure:11104: 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; then +if { (eval echo configure:11120: \"$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 @@ -10924,12 +11134,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:10928: checking for tgetent in -ltermcap" >&5 +echo "configure:11138: 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; then +if { (eval echo configure:11154: \"$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 @@ -10988,16 +11198,16 @@ EOF 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:10992: checking for gpm.h" >&5 +echo "configure:11202: checking for gpm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:11210: \"$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" @@ -11019,12 +11229,12 @@ fi } test -z "$with_gpm" && { echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:11023: checking for Gpm_Open in -lgpm" >&5 +echo "configure:11233: 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; then +if { (eval echo configure:11249: \"$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 @@ -11085,21 +11295,21 @@ test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \ != "no no no" && echo "checking for database support" 1>&6 -echo "configure:11089: checking for database support" >&5 +echo "configure:11299: checking for database support" >&5 if test "$with_database_gnudbm $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:11094: checking for ndbm.h" >&5 +echo "configure:11304: checking for ndbm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:11312: \"$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" @@ -11128,12 +11338,12 @@ fi if test "$with_database_gnudbm" != "no"; then echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:11132: checking for dbm_open in -lgdbm" >&5 +echo "configure:11342: 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; then +if { (eval echo configure:11358: \"$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 @@ -11172,10 +11382,10 @@ fi if test "$with_database_dbm" != "no"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:11176: checking for dbm_open" >&5 +echo "configure:11386: checking for dbm_open" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11412: \"$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 @@ -11217,12 +11427,12 @@ else echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:11221: checking for dbm_open in -ldbm" >&5 +echo "configure:11431: 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; then +if { (eval echo configure:11447: \"$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 @@ -11274,10 +11484,10 @@ EOF if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6 -echo "configure:11278: checking for Berkeley db.h" >&5 +echo "configure:11488: 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:11509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_path="$path"; break else @@ -11311,9 +11521,9 @@ rm -f conftest* if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6 -echo "configure:11315: checking for Berkeley DB version" >&5 +echo "configure:11525: checking for Berkeley DB version" >&5 cat > conftest.$ac_ext < #if DB_VERSION_MAJOR > 1 @@ -11332,10 +11542,10 @@ fi rm -f conftest* echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6 -echo "configure:11336: checking for $dbfunc" >&5 +echo "configure:11546: checking for $dbfunc" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11572: \"$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 @@ -11377,12 +11587,12 @@ else echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6 -echo "configure:11381: checking for $dbfunc in -ldb" >&5 +echo "configure:11591: 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; then +if { (eval echo configure:11607: \"$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 @@ -11457,12 +11667,12 @@ fi if test "$with_socks" = "yes"; then echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:11461: checking for SOCKSinit in -lsocks" >&5 +echo "configure:11671: 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; then +if { (eval echo configure:11687: \"$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 @@ -11530,16 +11740,16 @@ for ac_hdr in dlfcn.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11534: checking for $ac_hdr" >&5 +echo "configure:11744: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:11752: \"$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" @@ -11577,12 +11787,12 @@ done test -z "$with_shlib" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:11581: checking for dlopen in -ldl" >&5 +echo "configure:11791: 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; then +if { (eval echo configure:11807: \"$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 @@ -11622,12 +11832,12 @@ fi } test -z "$with_shlib" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6 -echo "configure:11626: checking for _dlopen in -lc" >&5 +echo "configure:11836: 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; then +if { (eval echo configure:11852: \"$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 @@ -11667,12 +11877,12 @@ fi } test -z "$with_shlib" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 -echo "configure:11671: checking for dlopen in -lc" >&5 +echo "configure:11881: 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; then +if { (eval echo configure:11897: \"$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 @@ -11712,12 +11922,12 @@ fi } test -z "$with_shlib" && { echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:11716: checking for shl_load in -ldld" >&5 +echo "configure:11926: 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; then +if { (eval echo configure:11942: \"$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 @@ -11757,12 +11967,12 @@ fi } test -z "$with_shlib" && { echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:11761: checking for dld_init in -ldld" >&5 +echo "configure:11971: 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; then +if { (eval echo configure:11987: \"$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 @@ -11812,7 +12022,7 @@ xehost=$canonical xealias=$internal_configuration echo "checking how to build dynamic libraries for ${xehost}" 1>&6 -echo "configure:11816: checking how to build dynamic libraries for ${xehost}" >&5 +echo "configure:12026: checking how to build dynamic libraries for ${xehost}" >&5 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts. case "$xehost" in *-*-linux-gnu*) ;; @@ -11840,9 +12050,9 @@ if test "$GCC" = "yes"; then XEGCC=yes else echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:11844: checking checking whether we are using GNU C" >&5 +echo "configure:12054: checking checking whether we are using GNU C" >&5 cat > conftest.$ac_ext <&6 -echo "configure:11868: checking how to produce PIC code" >&5 +echo "configure:12078: checking how to produce PIC code" >&5 wl= can_build_shared=yes @@ -11957,18 +12167,18 @@ if test -n "$dll_cflags"; then # 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:11961: checking if PIC flag ${dll_cflags} really works" >&5 +echo "configure:12171: 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:12182: \"$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 @@ -11999,7 +12209,7 @@ cc_produces_so=no xldf= xcldf= echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6 -echo "configure:12003: checking if C compiler can produce shared libraries" >&5 +echo "configure:12213: checking if C compiler can produce shared libraries" >&5 if test "$XEGCC" = yes; then xcldf="-shared" xldf="-shared" @@ -12050,14 +12260,14 @@ if test -n "$xcldf"; then 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; then +if { (eval echo configure:12271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cc_produces_so=yes else @@ -12082,7 +12292,7 @@ if test -z "$LTLD"; then 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:12086: checking for ld used by GCC" >&5 +echo "configure:12296: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -12107,7 +12317,7 @@ echo "configure:12086: checking for ld used by GCC" >&5 esac else echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:12111: checking for GNU ld" >&5 +echo "configure:12321: checking for GNU ld" >&5 fi if test -z "$LTLD"; then @@ -12145,7 +12355,7 @@ ld_dynamic_link_flags= # 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:12149: checking if the linker is GNU ld" >&5 +echo "configure:12359: 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 @@ -12172,7 +12382,7 @@ else # 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:12176: checking whether the linker supports shared libraries" >&5 +echo "configure:12386: checking whether the linker supports shared libraries" >&5 dll_ld=$CC dll_ldflags=$LDFLAGS ld_shlibs=yes @@ -12388,10 +12598,10 @@ EOF for ac_func in dlerror _dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12392: checking for $ac_func" >&5 +echo "configure:12602: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:12628: \"$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 @@ -12448,11 +12658,11 @@ done fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:12666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -13009,8 +13219,15 @@ echo "" echo "$0 $quoted_arguments" ) > Installation -xemacs_betaname="" -test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}" +if test ! -z ${emacs_beta_version} ; then + if test -z "${emacs_is_beta}" ; then + xemacs_betaname=".${emacs_beta_version}" + else + xemacs_betaname="-b${emacs_beta_version}" + fi +else + xemacs_betaname="" +fi ( echo " @@ -13114,7 +13331,7 @@ test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." test "$with_offix" = yes && echo " Compiling in support for OffiX." test "$with_dragndrop" = yes && echo " Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )." test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." -test "$with_session" != no && echo " Compiling in support for proper session-management." +test "$with_wmcommand" != no && echo " Compiling in support for proper WM_COMMAND handling." case "$with_menubars" in lucid ) echo " Using Lucid menubars." ;; motif ) echo " Using Motif menubars." @@ -13225,7 +13442,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -13245,9 +13462,11 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -13277,6 +13496,7 @@ s%@ld@%$ld%g s%@lib_gcc@%$lib_gcc%g s%@RANLIB@%$RANLIB%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@YACC@%$YACC%g s%@SET_MAKE@%$SET_MAKE%g diff --git a/configure.in b/configure.in index e77bf16..cfa5b20 100644 --- a/configure.in +++ b/configure.in @@ -482,7 +482,7 @@ while test $# != 0; do with_jpeg | \ with_png | \ with_tiff | \ - with_session | \ + with_wmcommand | \ with_xmu | \ with_purify | \ with_quantify | \ @@ -661,14 +661,17 @@ while test $# != 0; do malloc ) error_check_malloc=yes ;; nomalloc ) error_check_malloc=no ;; + byte_code ) error_check_byte_code=yes ;; + nobyte_code ) error_check_byte_code=no ;; + * ) bogus_error_check=yes ;; esac if test "$bogus_error_check" -o \ \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then if test "$error_check_default" = yes ; then - types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'." + types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'." else - types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'." + types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'." fi USAGE_ERROR(["Valid types for the \`--$optname' option are: $types."]) @@ -678,6 +681,7 @@ while test $# != 0; do error_check_bufpos=$new_default error_check_gc=$new_default error_check_malloc=$new_default + error_check_byte_code=$new_default new_default= # reset this fi echeck_notfirst=true @@ -909,14 +913,19 @@ dnl Find out which version of XEmacs this is dnl ---------------------------------------- . "$srcdir/version.sh" || exit 1; dnl Must do the following first to determine verbosity for AC_DEFINE -if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi +if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi : "${extra_verbose=$beta}" version="${emacs_major_version}.${emacs_minor_version}" AC_DEFINE_UNQUOTED(EMACS_MAJOR_VERSION, $emacs_major_version) AC_DEFINE_UNQUOTED(EMACS_MINOR_VERSION, $emacs_minor_version) -if test -n "$emacs_beta_version"; then - version="${version}-b${emacs_beta_version}" - AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version) +if test -n "$emacs_beta_version" ; then + if test "$beta" = "yes"; then + version="${version}-b${emacs_beta_version}" + AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version) + else + version="${version}.${emacs_beta_version}" + AC_DEFINE_UNQUOTED(EMACS_PATCH_LEVEL, $emacs_beta_version) + fi fi AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename") AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version") @@ -946,12 +955,13 @@ dnl Error checking and debugging flags dnl ---------------------------------- dnl Error checking default to "yes" in beta versions, to "no" in releases. dnl Same goes for --debug and --extra-verbosity. -if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi +if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi test "${error_check_extents=$beta}" = yes && AC_DEFINE(ERROR_CHECK_EXTENTS) test "${error_check_typecheck=$beta}" = yes && AC_DEFINE(ERROR_CHECK_TYPECHECK) test "${error_check_bufpos=$beta}" = yes && AC_DEFINE(ERROR_CHECK_BUFPOS) test "${error_check_gc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_GC) test "${error_check_malloc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_MALLOC) +test "${error_check_byte_code=$beta}" = yes && AC_DEFINE(ERROR_CHECK_BYTE_CODE) dnl debug=yes must be set when error checking is present. This should be dnl fixed up. dnl debug implies other options @@ -1882,16 +1892,15 @@ dnl site-includes and site-libraries. COLON_TO_SPACE(site_prefixes) if test -n "$site_prefixes"; then for dir in $site_prefixes; do - inc_dir="${dir}/include" lib_dir="${dir}/lib" if test ! -d "$dir"; then XE_DIE("Invalid site prefix \`$dir': no such directory") - elif test ! -d "$inc_dir"; then - XE_DIE("Invalid site prefix \`$dir': no such directory \`$inc_dir'") elif test ! -d "$lib_dir"; then XE_DIE("Invalid site prefix \`$dir': no such directory \`$lib_dir'") else - XE_APPEND("-I$inc_dir", c_switch_site) + if test -d "$inc_dir"; then + XE_APPEND("-I$inc_dir", c_switch_site) + fi XE_APPEND("-L$lib_dir", ld_switch_site) fi done @@ -2519,7 +2528,7 @@ if test "$with_x11" != "yes"; then 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 session xim xmu + for feature in tooltalk cde offix wmcommand xim xmu do if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then AC_MSG_WARN([--with-$feature ignored: Not valid without X support]) @@ -2542,11 +2551,11 @@ case "$x_libraries" in *X11R4* ) test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h" esac -dnl Enable or disable proper session-management -AC_CHECKING(for session-management option); -dnl if test "$with_session" = "yes"; then -if test "$with_session" != "no"; then - AC_DEFINE(HAVE_SESSION) +dnl Enable or disable proper handling of WM_COMMAND +AC_CHECKING(for WM_COMMAND option); +dnl if test "$with_wmcommand" = "yes"; then +if test "$with_wmcommand" != "no"; then + AC_DEFINE(HAVE_WMCOMMAND) fi dnl Autodetect Xauth @@ -3963,8 +3972,15 @@ echo "" echo "$0 $quoted_arguments" ) > Installation -xemacs_betaname="" -test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}" +if test ! -z ${emacs_beta_version} ; then + if test -z "${emacs_is_beta}" ; then + xemacs_betaname=".${emacs_beta_version}" + else + xemacs_betaname="-b${emacs_beta_version}" + fi +else + xemacs_betaname="" +fi dnl Start stdout redirection to '| tee -a Installation' ( @@ -4069,7 +4085,7 @@ test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." test "$with_offix" = yes && echo " Compiling in support for OffiX." test "$with_dragndrop" = yes && echo " Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )." test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." -test "$with_session" != no && echo " Compiling in support for proper session-management." +test "$with_wmcommand" != no && echo " Compiling in support for proper WM_COMMAND handling." case "$with_menubars" in lucid ) echo " Using Lucid menubars." ;; motif ) echo " Using Motif menubars." diff --git a/configure.usage b/configure.usage index 69088f9..6d44544 100644 --- a/configure.usage +++ b/configure.usage @@ -56,9 +56,8 @@ Window-system options: --x-includes=DIR Search for X header files in DIR. --x-libraries=DIR Search for X libraries in DIR. --without-toolbars Don't compile with any toolbar support. ---without-session Compile without realized leader window which will - keep the WM_COMMAND property. Required for proper - session-management. +--without-wmcommand Compile without realized leader window which will + keep the WM_COMMAND property. --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. diff --git a/dynodump/_dynodump.h b/dynodump/_dynodump.h index c09bd7f..847c4eb 100644 --- a/dynodump/_dynodump.h +++ b/dynodump/_dynodump.h @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: _dynodump.h,v 1.5 1996/05/23 18:39:07 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: _dynodump.h,v 1.3 1997/05/29 04:22:29 steve Exp $ - SMI" #ifndef _DYNODUMP_DOT_H #define _DYNODUMP_DOT_H diff --git a/dynodump/dynodump.c b/dynodump/dynodump.c index b684813..ff4477d 100644 --- a/dynodump/dynodump.c +++ b/dynodump/dynodump.c @@ -73,7 +73,7 @@ * N.B. The above commentary is not quite correct in the flags have been hardwired * to RTLD_SAVREL. */ -#pragma ident "@(#) $Id: dynodump.c,v 1.8 1996/05/23 18:39:21 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: dynodump.c,v 1.6 1998/03/31 20:10:55 steve Exp $ - SMI" #define __EXTENSIONS__ 1 diff --git a/dynodump/i386/_relocate.c b/dynodump/i386/_relocate.c index d3ec59c..f97dd1b 100644 --- a/dynodump/i386/_relocate.c +++ b/dynodump/i386/_relocate.c @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: _relocate.c,v 1.4 1995/06/26 20:12:41 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: _relocate.c,v 1.3 1997/05/29 04:23:02 steve Exp $ - SMI" /* LINTLIBRARY */ diff --git a/dynodump/i386/machdep.h b/dynodump/i386/machdep.h index c90e29c..4dc66fe 100644 --- a/dynodump/i386/machdep.h +++ b/dynodump/i386/machdep.h @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: machdep.h,v 1.2 1995/02/16 22:58:43 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:02 steve Exp $ - SMI" /* * Global include file for all sgs Intel machine dependent macros, constants diff --git a/dynodump/ppc/_relocate.c b/dynodump/ppc/_relocate.c index feb5ca9..754b417 100644 --- a/dynodump/ppc/_relocate.c +++ b/dynodump/ppc/_relocate.c @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: _relocate.c,v 1.3 1995/06/26 20:16:39 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: _relocate.c,v 1.4 1998/03/31 20:10:55 steve Exp $ - SMI" /* LINTLIBRARY */ diff --git a/dynodump/ppc/machdep.h b/dynodump/ppc/machdep.h index 2a3d1e6..a649a9c 100644 --- a/dynodump/ppc/machdep.h +++ b/dynodump/ppc/machdep.h @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: machdep.h,v 1.2 1995/02/16 22:58:49 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:20 steve Exp $ - SMI" /* * Global include file for all sgs PowerPC machine dependent macros, constants diff --git a/dynodump/sparc/_relocate.c b/dynodump/sparc/_relocate.c index 10b0fda..14466f0 100644 --- a/dynodump/sparc/_relocate.c +++ b/dynodump/sparc/_relocate.c @@ -35,7 +35,7 @@ /* * Update the value of the `_edata' and `_end' symbols. */ -#pragma ident "@(#) $Id: _relocate.c,v 1.4 1995/06/26 20:13:26 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: _relocate.c,v 1.4 1998/03/31 20:10:55 steve Exp $ - SMI" #include #include diff --git a/dynodump/sparc/machdep.h b/dynodump/sparc/machdep.h index 972081e..b4b76d8 100644 --- a/dynodump/sparc/machdep.h +++ b/dynodump/sparc/machdep.h @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: machdep.h,v 1.2 1995/02/16 22:58:55 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:26 steve Exp $ - SMI" /* * Global include file for all sgs SPARC machine dependent macros, constants diff --git a/dynodump/syms.c b/dynodump/syms.c index c060f33..0ac5cb8 100644 --- a/dynodump/syms.c +++ b/dynodump/syms.c @@ -35,7 +35,7 @@ /* * Update the value of the `_edata' and `_end' symbols. */ -#pragma ident "@(#) $Id: syms.c,v 1.2 1995/03/06 22:39:22 georgn Exp $ - SMI" +#pragma ident "@(#) $Id: syms.c,v 1.3 1997/05/29 04:22:30 steve Exp $ - SMI" #include #include diff --git a/etc/NEWS b/etc/NEWS index a7cbbe0..a8f7c80 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -85,6 +85,9 @@ file name prompts; e.g. `C-x C-f ~hni' will complete to `~hniksic/'. To make this operation faster, a cache of user names is maintained internally. +The new primitives available for this purpose are functions named +`user-name-completion' and `user-name-all-completions'. + * Lisp and internal changes in XEmacs 21.2 ========================================== @@ -175,6 +178,18 @@ details. Of course, the old form is still accepted for backward compatibility. +** `translate-region' has been improved in several ways. Its TABLE +argument used to be a 256-character string. In addition to this, it +can now also be a vector or a char-table (which is useful for Mule.) +If TABLE a vector or a generic char-table, you can map characters to +strings instead of to other characters. For instance: + + (let ((table (make-char-table 'generic))) + (put-char-table ?a "the letter a" table) + (put-char-table ?b "" table) + (put-char-table ?c ?\n table) + (translate-region (point-min) (point-max) table)) + ** The `keywordp' function now returns non-nil only on symbols interned in the global obarray. For example: @@ -185,7 +200,7 @@ interned in the global obarray. For example: This behaviour is compatible with other code which treats symbols beginning with colon as keywords only if they are interned in the -global obarray. `keyword' used to wrongly return t in both cases +global obarray. `keywordp' used to wrongly return t in both cases above. ** The first argument to `intern-soft' may now also be a symbol, like diff --git a/info/dir b/info/dir index 59cc3ed..033bf07 100644 --- a/info/dir +++ b/info/dir @@ -44,6 +44,7 @@ XEmacs 21.2 * New-Users-Guide:: XEmacs New User's Guide for XEmacs 21.2. * XEmacs-FAQ:: XEmacs Frequently Asked Questions for 21.2. * Internals:: Guide to the internals of XEmacs. +* Emodules:: XEmacs dynamic loadable module support. Local Packages: diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index d90785d..778381a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +1999-06-03 SL Baur + + * Makefile.in.in: Move .PHONY up to force execution of `all'. + 1999-05-14 XEmacs Build Bot * XEmacs 21.2.14 is released diff --git a/lib-src/Makefile.in.in b/lib-src/Makefile.in.in index 9a4552f..87116be 100644 --- a/lib-src/Makefile.in.in +++ b/lib-src/Makefile.in.in @@ -171,6 +171,8 @@ ldflags = $(LDFLAGS) $(ld_switch_general) $(ld_libs_general) .c.o: ${CC} -c $(cflags) $< +.PHONY : all maybe-blessmail install uninstall + all: ${UTILITIES} ${INSTALLABLES} srcdir-symlink.stamp ## Make symlinks for shell scripts if using --srcdir @@ -229,7 +231,6 @@ ${archlibdir}: all ## We do not need to install "wakeup" explicitly, because it will be ## copied when this whole directory is copied. -.PHONY : all maybe-blessmail install uninstall install: ${archlibdir} @echo; echo "Installing utilities for users to run." for file in ${INSTALLABLES} ; do \ diff --git a/lib-src/config.values.in b/lib-src/config.values.in index a816455..45d1924 100644 --- a/lib-src/config.values.in +++ b/lib-src/config.values.in @@ -27,6 +27,7 @@ DEFS "@DEFS@" ETCDIR "@ETCDIR@" ETCDIR_USER_DEFINED "@ETCDIR_USER_DEFINED@" EXEC_PREFIX "@EXEC_PREFIX@" +FFLAGS "@FFLAGS@" INFODIR "@INFODIR@" INFODIR_USER_DEFINED "@INFODIR_USER_DEFINED@" INFOPATH "@INFOPATH@" @@ -35,6 +36,7 @@ INSTALL "@INSTALL@" INSTALL_ARCH_DEP_SUBDIR "@INSTALL_ARCH_DEP_SUBDIR@" INSTALL_DATA "@INSTALL_DATA@" INSTALL_PROGRAM "@INSTALL_PROGRAM@" +INSTALL_SCRIPT "@INSTALL_SCRIPT@" LDFLAGS "@LDFLAGS@" LIBS "@LIBS@" LISPDIR "@LISPDIR@" @@ -52,6 +54,7 @@ PROGNAME "@PROGNAME@" RANLIB "@RANLIB@" RECURSIVE_MAKE "@RECURSIVE_MAKE@" SET_MAKE "@SET_MAKE@" +SHELL "@SHELL@" SITELISPDIR "@SITELISPDIR@" SITELISPDIR_USER_DEFINED "@SITELISPDIR_USER_DEFINED@" SITEMODULEDIR "@SITEMODULEDIR@" diff --git a/lib-src/rcs2log b/lib-src/rcs2log index 2a9e7d1..8fa12d9 100755 --- a/lib-src/rcs2log +++ b/lib-src/rcs2log @@ -28,7 +28,7 @@ Options: Report bugs to .' -Id='$Id: rcs2log,v 1.37 1997/03/21 22:19:30 eggert Exp $' +Id='$Id: rcs2log,v 1.2 1997/07/09 04:31:03 steve Exp $' # Copyright 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 168d99e..1d590db 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -12,6 +12,217 @@ * coding.el: Don't copy `no-conversion' to `raw-text'. +1999-05-30 Oscar Figueiredo + + * ldap.el (ldap-ignore-attribute-codings): New variable + (ldap-default-attribute-decoder): New variable + (ldap-coding-system): New variable + (ldap-attribute-syntax-encoders): New variable + (ldap-attribute-syntax-decoders): New variable + (ldap-attribute-syntaxes-alist): New variable + (ldap-encode-boolean): New function + (ldap-decode-boolean): New function + (ldap-encode-country-string): New function + (ldap-decode-string): New function + (ldap-decode-address): New function + (ldap-encode-address): New function + (ldap-decode-attribute): New function + (ldap-search): Use some of these + +1999-05-25 Jan Vroonhof + + * version.el (emacs-version): Make the patch level/beta come + before the XEmacs qualifier so that it gets into (funcall + emacs-version) and thus in the bug reports. + (emacs-version>=): Support patch levels. + +1999-06-03 SL Baur + + * version.el: implement x.y.z version number + From Jan Vroonhof + +1999-05-27 Yoshiki Hayashi + + * mule/mule-cmds.el (read-input-method-name): set input-method properly. + +1999-05-22 Vin Shelton + + * startup.el: Document -private and break out non-standard X options. + +1999-05-26 SL Baur + + * mule/mule-charset.el (charset-after): New function. + (charset-direction): Synch with Mule, update docstring. + (get-charset-property): New function. + (put-charset-property): New function. + (charset-plist): New function. + + * mule/mule-charset.el (compose-region): + (decompose-region): remove; these functions (which don't work + since we don't do composite characters) have been moved to + mule-util.el. + (toplevel): follow coding standards + +1999-05-26 SL Baur + + * dumped-lisp.el (preloaded-file-list): mule-files.el does not + exist any more. + + * code-files.el: Fix commentary to follow coding standards. Move + the single line left in mule-files.el to here. + + * mule/mule-files.el: delete. + +1999-05-24 SL Baur + + * info.el (Info-scroll-prev): Use event functions instead of the + old emacs 19 interface. + +1999-06-02 Andy Piper + + * x-font-menu.el (x-font-menu-load-font): + font-menu-registry-encoding -> x-font-menu-registry-encoding type. + +1999-05-31 Andy Piper + + * font-menu.el (font-menu-ignore-scaled-fonts): move to font-menu + group. + (font-menu-this-frame-only-p): ditto. + (font-menu-max-items): reinstate, from Jan Vroonhof + + (font-menu-submenu-name-format): ditto. + (font-menu-split-long-menu): ditto, for use by the family + constructor. + (font-menu-family-constructor): use it. + +1999-05-30 Andy Piper + + * msw-faces.el (mswindows-font-regexp): new font matching regexp + for use by the font menu. + + * msw-font-menu.el: new file implementing mswindows specific + font-menu behaviour. + (mswindows-font-menu-registry-encoding): new function mirroring x version. + (mswindows-font-menu-junk-families): ditto. + (hack-font-truename): ditto. + (mswindows-font-regexp-ascii): ditto. + (mswindows-reset-device-font-menus): ditto. + (mswindows-font-menu-font-data): ditto. + (mswindows-font-menu-load-font): ditto. + + * x-font-menu.el (x-reset-device-font-menus): made device specific. + (x-font-menu-font-data): ditto. + (x-font-menu-load-font): ditto. + + * font-menu.el: new file implementing generic font menu behaviour. + (font-menu-ignore-scaled-fonts): copied from x-font-menu.el and + made device independent. + (font-menu-this-frame-only-p): ditto. + (font-menu-preferred-resolution): ditto. + (font-menu-size-scaling): new variable used to determine whether + sizes are in points or tenths of a point. + (vassoc): moved from x-font-menu.el. + (device-fonts-cache): ditto. + (device-fonts-cache): ditto. + (flush-device-fonts-cache): ditto. + (reset-device-font-menus): copied from x-font-menu.el and made + device independent. Most functionality deferred to + device-dependent versions. + (font-menu-family-constructor): copied from x-font-menu.el and + made device independent. + (font-menu-size-constructor): ditto. + (font-menu-weight-constructor): ditto. + (font-menu-set-font): ditto. + (font-menu-change-face): ditto. + (font-menu-load-font): new device method. + (font-menu-font-data): ditto. + + * x-font-menu.el: The above functions deleted. + +1999-05-26 Andy Piper + + * update-elc.el: + * make-docfile.el: + * loadup.el: rehash expand-file-name usage to not use default-directory. + +1999-05-21 Andy Piper + + * x-select.el (x-select-convert-to-text): + (x-selected-text-type): + (x-get-selection): + (xselect-convert-to-string): + (xselect-convert-to-compound-text): + (xselect-convert-to-length): + (xselect-convert-to-targets): + (xselect-convert-to-delete): + (xselect-convert-to-filename): + (xselect-convert-to-charpos): + (xselect-convert-to-lineno): + (xselect-convert-to-colno): + (xselect-convert-to-sourceloc): + (xselect-convert-to-os): + (xselect-convert-to-host): + (xselect-convert-to-user): + (xselect-convert-to-class): + (xselect-convert-to-name): + (xselect-convert-to-integer): + (xselect-convert-to-atom): + (xselect-convert-to-identity): functions renamed from x-* and + moved to select.el. + (x-get-secondary-selection): use rename get-selection. + (x-get-clipboard): ditto. + (x-own-selection): moved to select.el. + (x-valid-simple-selection-p): ditto. + (x-dehilight-selection): ditto. + (x-own-clipboard): ditto. + (x-disown-selection): ditto. + + * x-mouse.el (x-yank-function): moved to mouse.el. + (x-insert-selection): ditto. + (x-set-point-and-move-selection): use renamed function. + + * select.el (selected-text-type): moved and renamed from + x-select.el. + (selection-owner-p): moved to C. + (selection-exists-p): ditto. + (get-cutbuffer): new device method. + (get-selection): generalised and moved from x-select.el. + (own-selection): moved x-own-selection functionality into here. + (dehilight-selection): renamed and moved from x-select.el. + (own-clipboard): functionality moved from x-select.el using new + generic C builtins. + (disown-clipboard): ditto. + (select-convert-to-text): + (select-convert-to-string): + (select-convert-to-compound-text): + (select-convert-to-length): + (select-convert-to-targets): + (select-convert-to-delete): + (select-convert-to-filename): + (select-convert-to-charpos): + (select-convert-to-lineno): + (select-convert-to-colno): + (select-convert-to-sourceloc): + (select-convert-to-os): + (select-convert-to-host): + (select-convert-to-user): + (select-convert-to-class): + (select-convert-to-name): + (select-convert-to-integer): + (select-convert-to-atom): + (select-convert-to-identity): new functions renamed from x-* and + moved from x-select.el. + + * mouse.el (mouse-consolidated-yank): subsume x-yank-function + into here and use as the default window-system mouse yank. + (insert-selection): generalised and moved from x-mouse.el. + (own-clipboard): moved to C. + + * msw-select.el (mswindows-selection-owned-p): deleted. + (mswindows-own-selection): generalised and moved to select.el. + (mswindows-disown-selection): generalised and moved to C. + (mswindows-selection-owner-p): ditto. + 1999-05-14 XEmacs Build Bot * XEmacs 21.2.14 is released diff --git a/lisp/auto-autoloads.el b/lisp/auto-autoloads.el index b485276..01510e5 100644 --- a/lisp/auto-autoloads.el +++ b/lisp/auto-autoloads.el @@ -1057,6 +1057,30 @@ This can take a while for large buffers." t nil) ;;;*** +;;;### (autoloads (mswindows-font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "font-menu" "lisp/font-menu.el") + +(defcustom font-menu-ignore-scaled-fonts nil "*If non-nil, then the font menu will try to show only bitmap fonts." :type 'boolean :group 'x) + +(defcustom font-menu-this-frame-only-p nil "*If non-nil, then changing the default font from the font menu will only\naffect one frame instead of all frames." :type 'boolean :group 'x) + +(fset 'install-font-menus 'reset-device-font-menus) + +(autoload 'reset-device-font-menus "font-menu" "\ +Generates the `Font', `Size', and `Weight' submenus for the Options menu. +This is run the first time that a font-menu is needed for each device. +If you don't like the lazy invocation of this function, you can add it to +`create-device-hook' and that will make the font menus respond more quickly +when they are selected for the first time. If you add fonts to your system, +or if you change your font path, you can call this to re-initialize the menus." nil nil) + +(autoload 'font-menu-family-constructor "font-menu" nil nil nil) + +(autoload 'font-menu-size-constructor "font-menu" nil nil nil) + +(autoload 'mswindows-font-menu-weight-constructor "font-menu" nil nil nil) + +;;;*** + ;;;### (autoloads (x-font-build-cache font-default-size-for-device font-default-encoding-for-device font-default-registry-for-device font-default-family-for-device font-default-object-for-device font-default-font-for-device font-create-object) "font" "lisp/font.el") (autoload 'font-create-object "font" nil nil nil) @@ -1228,6 +1252,20 @@ This command is designed to be used whether you are already in Info or not." t n ;;;*** +;;;### (autoloads (mswindows-reset-device-font-menus) "msw-font-menu" "lisp/msw-font-menu.el") + +(autoload 'mswindows-reset-device-font-menus "msw-font-menu" "\ +Generates the `Font', `Size', and `Weight' submenus for the Options menu. +This is run the first time that a font-menu is needed for each device. +If you don't like the lazy invocation of this function, you can add it to +`create-device-hook' and that will make the font menus respond more quickly +when they are selected for the first time. If you add fonts to your system, +or if you change your font path, you can call this to re-initialize the menus." nil nil) + +(defun* mswindows-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match mswindows-font-regexp name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match mswindows-font-regexp truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from font-menu-font-data (make-vector 5 nil))) (when (string-match mswindows-font-regexp name) (setq weight (capitalize (match-string 2 name))) (setq size (string-to-int (match-string 4 name)))) (when (string-match mswindows-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (capitalize (match-string 2 truename)))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 4 truename)))) (setq slant (capitalize (match-string 5 truename)))) (vector entry family size weight slant))) + +;;;*** + ;;;### (autoloads (mwheel-install) "mwheel" "lisp/mwheel.el") (autoload 'mwheel-install "mwheel" "\ @@ -1719,15 +1757,9 @@ Delete WIDGET." nil nil) ;;;*** -;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "x-font-menu" "lisp/x-font-menu.el") - -(defcustom font-menu-ignore-scaled-fonts t "*If non-nil, then the font menu will try to show only bitmap fonts." :type 'boolean :group 'font-menu) - -(defcustom font-menu-this-frame-only-p nil "*If non-nil, then changing the default font from the font menu will only\naffect one frame instead of all frames." :type 'boolean :group 'font-menu) +;;;### (autoloads (x-reset-device-font-menus) "x-font-menu" "lisp/x-font-menu.el") -(fset 'install-font-menus 'reset-device-font-menus) - -(autoload 'reset-device-font-menus "x-font-menu" "\ +(autoload 'x-reset-device-font-menus "x-font-menu" "\ Generates the `Font', `Size', and `Weight' submenus for the Options menu. This is run the first time that a font-menu is needed for each device. If you don't like the lazy invocation of this function, you can add it to @@ -1735,11 +1767,7 @@ If you don't like the lazy invocation of this function, you can add it to when they are selected for the first time. If you add fonts to your system, or if you change your font path, you can call this to re-initialize the menus." nil nil) -(autoload 'font-menu-family-constructor "x-font-menu" nil nil nil) - -(autoload 'font-menu-size-constructor "x-font-menu" nil nil nil) - -(autoload 'font-menu-weight-constructor "x-font-menu" nil nil nil) +(defun* x-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match x-font-regexp-foundry-and-family name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match x-font-regexp-foundry-and-family truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from font-menu-font-data (make-vector 5 nil))) (when (string-match x-font-regexp name) (setq weight (capitalize (match-string 1 name))) (setq size (string-to-int (match-string 6 name)))) (when (string-match x-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (capitalize (match-string 1 truename)))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 6 truename)))) (setq slant (capitalize (match-string 2 truename)))) (vector entry family size weight slant))) ;;;*** diff --git a/lisp/code-files.el b/lisp/code-files.el index 893908d..c07749a 100644 --- a/lisp/code-files.el +++ b/lisp/code-files.el @@ -6,8 +6,6 @@ ;; This file is part of XEmacs. -;; This file is very similar to mule-files.el - ;; 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) @@ -23,13 +21,18 @@ ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. +;;; Synched up with: Not synched. + ;;; Commentary: -;;; Derived from mule.el in the original Mule but heavily modified -;;; by Ben Wing. +;; Derived from mule.el in the original Mule but heavily modified +;; by Ben Wing. ;; 1997/3/11 modified by MORIOKA Tomohiko to sync with Emacs 20 API. +;; This file was derived from the former mule-files.el which has been removed +;; as of XEmacs 21.2.15. + ;;; Code: (setq-default buffer-file-coding-system 'raw-text) @@ -555,4 +558,9 @@ See also `write-region-pre-hook' and `write-region-post-hook'." start end filename append visit lockname coding-system))) -;;; mule-files.el ends here +;;; The following was all that remained in mule-files.el, so I moved it +;;; here for neatness. -sb +(when (featurep 'mule) + (setq-default buffer-file-coding-system 'iso-2022-8)) + +;;; code-files.el ends here diff --git a/lisp/dumped-lisp.el b/lisp/dumped-lisp.el index 07c67ce..1b33b17 100644 --- a/lisp/dumped-lisp.el +++ b/lisp/dumped-lisp.el @@ -94,7 +94,6 @@ (when-feature mule "mule-coding") ;; Handle I/O of files with extended characters. (when-feature file-coding "code-files") - (when-feature mule "mule-files") ;; Handle process with encoding/decoding non-ascii coding-system. (when-feature file-coding "code-process") (when-feature mule "mule-help") diff --git a/lisp/info.el b/lisp/info.el index dc40409..6d4e22f 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2074,9 +2074,9 @@ A positive or negative prefix argument moves by multiple screenfuls." (not (eq Info-auto-advance t)) (not (eq last-command this-command))) (message "Hit %s again to go to previous node" - (if (= last-command-char 0) + (if (mouse-event-p last-command-event) "mouse button" - (key-description (char-to-string last-command-char)))) + (key-description (event-key last-command-event)))) (Info-page-prev) (setq this-command 'Info)) (scroll-down arg))) diff --git a/lisp/ldap.el b/lisp/ldap.el index 57cfe78..bb31a83 100644 --- a/lisp/ldap.el +++ b/lisp/ldap.el @@ -5,7 +5,7 @@ ;; Author: Oscar Figueiredo ;; Maintainer: Oscar Figueiredo ;; Created: Jan 1998 -;; Version: $Revision: 1.7.2.3 $ +;; Version: $Revision: 1.7.2.5 $ ;; Keywords: help comm ;; This file is part of XEmacs @@ -145,14 +145,301 @@ Valid properties include: (integer :tag "(number of records)"))))) :group 'ldap) +(defcustom ldap-ignore-attribute-codings nil + "*If non-nil, do not perform any encoding/decoding on LDAP attribute values." + :type 'boolean + :group 'ldap) + +(defcustom ldap-default-attribute-decoder nil + "*Decoder function to use for attributes whose syntax is unknown." + :type 'symbol + :group 'ldap) + +(defcustom ldap-coding-system (if (featurep 'mule) + 'utf-8 + nil) + "*Coding system of LDAP string values. +LDAP v3 specifies the coding system of strings to be UTF-8. +Mule support is needed for this." + :type 'symbol + :group 'ldap) + +(defvar ldap-attribute-syntax-encoders + [nil ; 1 ACI Item N + nil ; 2 Access Point Y + nil ; 3 Attribute Type Description Y + nil ; 4 Audio N + nil ; 5 Binary N + nil ; 6 Bit String Y + ldap-encode-boolean ; 7 Boolean Y + nil ; 8 Certificate N + nil ; 9 Certificate List N + nil ; 10 Certificate Pair N + ldap-encode-country-string ; 11 Country String Y + ldap-encode-string ; 12 DN Y + nil ; 13 Data Quality Syntax Y + nil ; 14 Delivery Method Y + ldap-encode-string ; 15 Directory String Y + nil ; 16 DIT Content Rule Description Y + nil ; 17 DIT Structure Rule Description Y + nil ; 18 DL Submit Permission Y + nil ; 19 DSA Quality Syntax Y + nil ; 20 DSE Type Y + nil ; 21 Enhanced Guide Y + nil ; 22 Facsimile Telephone Number Y + nil ; 23 Fax N + nil ; 24 Generalized Time Y + nil ; 25 Guide Y + nil ; 26 IA5 String Y + number-to-string ; 27 INTEGER Y + nil ; 28 JPEG N + nil ; 29 Master And Shadow Access Points Y + nil ; 30 Matching Rule Description Y + nil ; 31 Matching Rule Use Description Y + nil ; 32 Mail Preference Y + nil ; 33 MHS OR Address Y + nil ; 34 Name And Optional UID Y + nil ; 35 Name Form Description Y + nil ; 36 Numeric String Y + nil ; 37 Object Class Description Y + nil ; 38 OID Y + nil ; 39 Other Mailbox Y + nil ; 40 Octet String Y + ldap-encode-address ; 41 Postal Address Y + nil ; 42 Protocol Information Y + nil ; 43 Presentation Address Y + ldap-encode-string ; 44 Printable String Y + nil ; 45 Subtree Specification Y + nil ; 46 Supplier Information Y + nil ; 47 Supplier Or Consumer Y + nil ; 48 Supplier And Consumer Y + nil ; 49 Supported Algorithm N + nil ; 50 Telephone Number Y + nil ; 51 Teletex Terminal Identifier Y + nil ; 52 Telex Number Y + nil ; 53 UTC Time Y + nil ; 54 LDAP Syntax Description Y + nil ; 55 Modify Rights Y + nil ; 56 LDAP Schema Definition Y + nil ; 57 LDAP Schema Description Y + nil ; 58 Substring Assertion Y + ] + "A vector of functions used to encode LDAP attribute values. +The sequence of functions corresponds to the sequence of LDAP attribute syntax +object identifiers of the form 1.3.6.1.4.1.1466.1115.121.1.* as defined in +RFC2252 section 4.3.2") + +(defvar ldap-attribute-syntax-decoders + [nil ; 1 ACI Item N + nil ; 2 Access Point Y + nil ; 3 Attribute Type Description Y + nil ; 4 Audio N + nil ; 5 Binary N + nil ; 6 Bit String Y + ldap-decode-boolean ; 7 Boolean Y + nil ; 8 Certificate N + nil ; 9 Certificate List N + nil ; 10 Certificate Pair N + ldap-decode-string ; 11 Country String Y + ldap-decode-string ; 12 DN Y + nil ; 13 Data Quality Syntax Y + nil ; 14 Delivery Method Y + ldap-decode-string ; 15 Directory String Y + nil ; 16 DIT Content Rule Description Y + nil ; 17 DIT Structure Rule Description Y + nil ; 18 DL Submit Permission Y + nil ; 19 DSA Quality Syntax Y + nil ; 20 DSE Type Y + nil ; 21 Enhanced Guide Y + nil ; 22 Facsimile Telephone Number Y + nil ; 23 Fax N + nil ; 24 Generalized Time Y + nil ; 25 Guide Y + nil ; 26 IA5 String Y + string-to-number ; 27 INTEGER Y + nil ; 28 JPEG N + nil ; 29 Master And Shadow Access Points Y + nil ; 30 Matching Rule Description Y + nil ; 31 Matching Rule Use Description Y + nil ; 32 Mail Preference Y + nil ; 33 MHS OR Address Y + nil ; 34 Name And Optional UID Y + nil ; 35 Name Form Description Y + nil ; 36 Numeric String Y + nil ; 37 Object Class Description Y + nil ; 38 OID Y + nil ; 39 Other Mailbox Y + nil ; 40 Octet String Y + ldap-decode-address ; 41 Postal Address Y + nil ; 42 Protocol Information Y + nil ; 43 Presentation Address Y + ldap-decode-string ; 44 Printable String Y + nil ; 45 Subtree Specification Y + nil ; 46 Supplier Information Y + nil ; 47 Supplier Or Consumer Y + nil ; 48 Supplier And Consumer Y + nil ; 49 Supported Algorithm N + nil ; 50 Telephone Number Y + nil ; 51 Teletex Terminal Identifier Y + nil ; 52 Telex Number Y + nil ; 53 UTC Time Y + nil ; 54 LDAP Syntax Description Y + nil ; 55 Modify Rights Y + nil ; 56 LDAP Schema Definition Y + nil ; 57 LDAP Schema Description Y + nil ; 58 Substring Assertion Y + ] + "A vector of functions used to decode LDAP attribute values. +The sequence of functions corresponds to the sequence of LDAP attribute syntax +object identifiers of the form 1.3.6.1.4.1.1466.1115.121.1.* as defined in +RFC2252 section 4.3.2") + + +(defvar ldap-attribute-syntaxes-alist + '((createtimestamp . 24) + (modifytimestamp . 24) + (creatorsname . 12) + (modifiersname . 12) + (subschemasubentry . 12) + (attributetypes . 3) + (objectclasses . 37) + (matchingrules . 30) + (matchingruleuse . 31) + (namingcontexts . 12) + (altserver . 26) + (supportedextension . 38) + (supportedcontrol . 38) + (supportedsaslmechanisms . 15) + (supportedldapversion . 27) + (ldapsyntaxes . 16) + (ditstructurerules . 17) + (nameforms . 35) + (ditcontentrules . 16) + (objectclass . 38) + (aliasedobjectname . 12) + (cn . 15) + (sn . 15) + (serialnumber . 44) + (c . 15) + (l . 15) + (st . 15) + (street . 15) + (o . 15) + (ou . 15) + (title . 15) + (description . 15) + (searchguide . 25) + (businesscategory . 15) + (postaladdress . 41) + (postalcode . 15) + (postofficebox . 15) + (physicaldeliveryofficename . 15) + (telephonenumber . 50) + (telexnumber . 52) + (telexterminalidentifier . 51) + (facsimiletelephonenumber . 22) + (x121address . 36) + (internationalisdnnumber . 36) + (registeredaddress . 41) + (destinationindicator . 44) + (preferreddeliverymethod . 14) + (presentationaddress . 43) + (supportedapplicationcontext . 38) + (member . 12) + (owner . 12) + (roleoccupant . 12) + (seealso . 12) + (userpassword . 40) + (usercertificate . 8) + (cacertificate . 8) + (authorityrevocationlist . 9) + (certificaterevocationlist . 9) + (crosscertificatepair . 10) + (name . 15) + (givenname . 15) + (initials . 15) + (generationqualifier . 15) + (x500uniqueidentifier . 6) + (dnqualifier . 44) + (enhancedsearchguide . 21) + (protocolinformation . 42) + (distinguishedname . 12) + (uniquemember . 34) + (houseidentifier . 15) + (supportedalgorithms . 49) + (deltarevocationlist . 9) + (dmdname . 15)) + "A map of LDAP attribute names to their type object id minor number. +This table is built from RFC2252 Section 5 and RFC2256 Section 5") + + +;; Coding/decoding functions + +(defun ldap-encode-boolean (bool) + (if bool + "TRUE" + "FALSE")) + +(defun ldap-decode-boolean (str) + (cond + ((string-equal str "TRUE") + t) + ((string-equal str "FALSE") + nil) + (t + (error "Wrong LDAP boolean string: %s" str)))) + +(defun ldap-encode-country-string (str) + ;; We should do something useful here... + (if (not (= 2 (length str))) + (error "Invalid country string: %s" str))) + +(defun ldap-decode-string (str) + (decode-coding-string str ldap-coding-system)) + +(defun ldap-encode-string (str) + (encode-coding-string str ldap-coding-system)) + +(defun ldap-decode-address (str) + (mapconcat 'ldap-decode-string + (split-string str "\\$") + "\n")) + +(defun ldap-encode-address (str) + (mapconcat 'ldap-encode-string + (split-string str "\n") + "$")) + + +;; LDAP protocol functions + (defun ldap-get-host-parameter (host parameter) "Get the value of PARAMETER for HOST in `ldap-host-parameters-alist'." (plist-get (cdr (assoc host ldap-host-parameters-alist)) parameter)) +(defun ldap-decode-attribute (attr) + "Decode the attribute/value pair ATTR according to LDAP rules. +The attribute name is looked up in `ldap-attribute-syntaxes-alist' +and the corresponding decoder is then retrieved from +`ldap-attribute-syntax-decoders' and applied on the value(s)." + (let* ((name (car attr)) + (values (cdr attr)) + (syntax-id (cdr (assq (intern (downcase name)) + ldap-attribute-syntaxes-alist))) + decoder) + (if syntax-id + (setq decoder (aref ldap-attribute-syntax-decoders + (1- syntax-id))) + (setq decoder ldap-default-attribute-decoder)) + (if decoder + (cons name (mapcar decoder values)) + attr))) + + (defun ldap-search (filter &optional host attributes attrsonly withdn) "Perform an LDAP search. -FILTER is the search filter in RFC1558 syntax, i.e. something that +FILTER is the search filter in RFC1558 syntax, i.e., something that looks like \"(cn=John Smith)\". HOST is the LDAP host on which to perform the search. ATTRIBUTES is a list of attributes to retrieve; nil means retrieve all. @@ -167,19 +454,25 @@ an alist of attribute/value pairs optionally preceded by the DN of the entry according to the value of WITHDN." (interactive "sFilter:") (or host - (setq host ldap-default-host)) - (or host + (setq host ldap-default-host) (error "No LDAP host specified")) (let ((host-plist (cdr (assoc host ldap-host-parameters-alist))) - ldap) + ldap + result) (message "Opening LDAP connection to %s..." host) (setq ldap (ldap-open host host-plist)) (message "Searching with LDAP on %s..." host) - (prog1 (ldap-search-internal ldap filter - (plist-get host-plist 'base) - (plist-get host-plist 'scope) - attributes attrsonly withdn) - (ldap-close ldap)))) + (setq result (ldap-search-internal ldap filter + (plist-get host-plist 'base) + (plist-get host-plist 'scope) + attributes attrsonly withdn)) + (ldap-close ldap) + (if ldap-ignore-attribute-codings + result + (mapcar (function + (lambda (record) + (mapcar 'ldap-decode-attribute record))) + result)))) (provide 'ldap) diff --git a/lisp/lib-complete.el b/lisp/lib-complete.el index 7ae20c3..3713295 100644 --- a/lisp/lib-complete.el +++ b/lisp/lib-complete.el @@ -38,7 +38,7 @@ ;; Last Modified By: Heiko M|nkel ;; Additional XEmacs integration By: Chuck Thompson ;; Last Modified On: Thu Jul 1 14:23:00 1994 -;; RCS Info : $Revision: 1.3.2.1 $ $Locker: $ +;; RCS Info : $Revision: 1.3.2.2 $ $Locker: $ ;; ======================================================================== ;; NOTE: XEmacs must be redumped if this file is changed. ;; diff --git a/lisp/loadup.el b/lisp/loadup.el index 4c836bb..f29dac8 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -117,7 +117,7 @@ ;;(print (format "guessed-roots: %S" (paths-find-emacs-roots invocation-directory invocation-name))) nil))) - (load (concat default-directory "../lisp/dumped-lisp.el")) + (load (expand-file-name "../lisp/dumped-lisp.el")) (let ((files preloaded-file-list) file) diff --git a/lisp/make-docfile.el b/lisp/make-docfile.el index e67fdbf..e6c0cf8 100644 --- a/lisp/make-docfile.el +++ b/lisp/make-docfile.el @@ -91,7 +91,7 @@ (nconc load-path (split-path (getenv "EMACSBOOTSTRAPLOADPATH")))) (let (preloaded-file-list) - (load (concat default-directory "../lisp/dumped-lisp.el")) + (load (expand-file-name "../lisp/dumped-lisp.el")) (let ((package-preloaded-file-list (packages-collect-package-dumped-lisps late-package-load-path))) diff --git a/lisp/mouse.el b/lisp/mouse.el index 5bd4db7..c42c8aa 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -84,11 +84,48 @@ If set to `symbol', double-click will always attempt to highlight a "Function that is called upon by `mouse-yank' to actually insert text.") (defun mouse-consolidated-yank () + "Insert the current selection or, if there is none under X insert the X cutbuffer. +A mark is pushed, so that the inserted text lies between point and mark." (interactive) - (case (device-type) - (x (x-yank-function)) - (tty (yank)) - (otherwise (yank)))) + (if (not (console-on-window-system-p)) + (yank) + (push-mark) + (if (region-active-p) + (if (consp zmacs-region-extent) + ;; pirated code from insert-rectangle in rect.el + ;; perhaps that code should be modified to handle a list of extents + ;; as the rectangle to be inserted? + (let ((lines zmacs-region-extent) + (insertcolumn (current-column)) + (first t)) + (push-mark) + (while lines + (or first + (progn + (forward-line 1) + (or (bolp) (insert ?\n)) + (move-to-column insertcolumn t))) + (setq first nil) + (insert (extent-string (car lines))) + (setq lines (cdr lines)))) + (insert (extent-string zmacs-region-extent))) + (insert-selection t)))) + +(defun insert-selection (&optional check-cutbuffer-p move-point-event) + "Insert the current selection into buffer at point." + (interactive "P") + (let ((text (if check-cutbuffer-p + (or (condition-case () (get-selection) (error ())) + (get-cutbuffer) + (error "No selection or cut buffer available")) + (get-selection)))) + (cond (move-point-event + (mouse-set-point move-point-event) + (push-mark (point))) + ((interactive-p) + (push-mark (point)))) + (insert text) + )) (defun mouse-select () diff --git a/lisp/msw-faces.el b/lisp/msw-faces.el index e77f415..f4e4125 100644 --- a/lisp/msw-faces.el +++ b/lisp/msw-faces.el @@ -39,6 +39,19 @@ (defun mswindows-init-frame-faces (frame) ) +;; Other functions expect these regexps +(defconst mswindows-font-regexp + (let + ((- ":") + (fontname "\\([a-zA-Z ]+\\)") + (weight "\\([a-zA-Z]*\\)?") + (style "\\( [a-zA-Z]*\\)?") + (pointsize "\\([0-9]+\\)?") + (effects "\\([a-zA-Z ]*\\)?") + (charset "\\([a-zA-Z 0-9]*\\)") + ) + (concat "^" + fontname - weight style - pointsize - effects - charset "$"))) ;;; Fill in missing parts of a font spec. This is primarily intended as a ;;; helper function for the functions below. diff --git a/lisp/msw-select.el b/lisp/msw-select.el index 34b43b8..de454df 100644 --- a/lisp/msw-select.el +++ b/lisp/msw-select.el @@ -49,61 +49,6 @@ replacing the active selection if there is one." (insert-rectangle clip) (insert clip)))) -(defun mswindows-own-clipboard (string) - "Paste the given string to the mswindows clipboard." - (mswindows-set-clipboard string)) -(defvar mswindows-selection-owned-p nil - "Whether we have a selection or not. -MS-Windows has no concept of ownership; don't use this.") -(defun mswindows-own-selection (data &optional type) - "Make an MS-Windows selection of type TYPE and value DATA. -The argument TYPE is ignored, and DATA specifies the contents. -DATA may be a string, -a symbol, an integer (or a cons of two integers or list of two integers). - -The selection may also be a cons of two markers pointing to the same buffer, -or an overlay. In these cases, the selection is considered to be the text -between the markers *at whatever time the selection is examined*. -Thus, editing done in the buffer after you specify the selection -can alter the effective value of the selection. - -The data may also be a vector of valid non-vector selection values. - -Interactively, the text of the region is used as the selection value." - (interactive (if (not current-prefix-arg) - (list (read-string "Store text for pasting: ")) - (list (substring (region-beginning) (region-end))))) - (or (valid-simple-selection-p data) - (and (vectorp data) - (let ((valid t) - (i (1- (length data)))) - (while (>= i 0) - (or (valid-simple-selection-p (aref data i)) - (setq valid nil)) - (setq i (1- i))) - valid)) - (signal 'error (list "invalid selection" data))) - (if data - (progn -; (mswindows-set-clipboard data) - (setq mswindows-selection-owned-p data)) - (setq mswindows-selection-owned-p nil)) - (setq primary-selection-extent - (select-make-extent-for-selection - data primary-selection-extent)) - (setq zmacs-region-stays t) - data) - -(defun mswindows-disown-selection (&optional secondary-p) - "Assuming we own the selection, disown it. With an argument, discard the -secondary selection instead of the primary selection." - (setq mswindows-selection-owned-p nil) - (mswindows-delete-selection)) - -(defun mswindows-selection-owner-p (&optional selection) - "Return t if current emacs process owns the given Selection. -The arg is ignored." - (not (eq mswindows-selection-owned-p nil))) diff --git a/lisp/mule/mule-charset.el b/lisp/mule/mule-charset.el index c31abc8..7758dec 100644 --- a/lisp/mule/mule-charset.el +++ b/lisp/mule/mule-charset.el @@ -1,8 +1,12 @@ ;;; mule-charset.el --- Charset functions for Mule. + ;; Copyright (C) 1992 Free Software Foundation, Inc. ;; Copyright (C) 1995 Amdahl Corporation. ;; Copyright (C) 1996 Sun Microsystems. +;; Author: Unknown +;; Keywords: i18n, mule, internal + ;; This file is part of XEmacs. ;; XEmacs is free software; you can redistribute it and/or modify it @@ -20,40 +24,14 @@ ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. - -;;;; Composite character support +;;; Synched up with: Not synched. API at source level synched with FSF 20.3.9. -(defun compose-region (start end &optional buffer) - "Compose characters in the current region into one composite character. -From a Lisp program, pass two arguments, START to END. -The composite character replaces the composed characters. -BUFFER defaults to the current buffer if omitted." - (interactive "r") - (let ((ch (make-composite-char (buffer-substring start end buffer)))) - (delete-region start end buffer) - (insert-char ch nil nil buffer))) - -(defun decompose-region (start end &optional buffer) - "Decompose any composite characters in the current region. -From a Lisp program, pass two arguments, START to END. -This converts each composite character into one or more characters, -the individual characters out of which the composite character was formed. -Non-composite characters are left as-is. BUFFER defaults to the current -buffer if omitted." - (interactive "r") - (save-excursion - (set-buffer buffer) - (save-restriction - (narrow-to-region start end) - (goto-char (point-min)) - (let ((compcharset (get-charset 'composite))) - (while (< (point) (point-max)) - (let ((ch (char-after (point)))) - (if (eq compcharset (char-charset ch)) - (progn - (delete-char 1) - (insert (composite-char-string ch)))))))))) +;;; Commentary: + +;; These functions are not compatible at the bytecode level with Emacs/Mule, +;; and they never will be. -sb [1999-05-26] +;;; Code: ;;;; Classifying text according to charsets @@ -116,10 +94,15 @@ This only applies to TTY mode (under X, the actual display width can be automatically determined)." (charset-property charset 'columns)) +;; #### FSFmacs returns 0 (defun charset-direction (charset) - "Return the display direction (`l2r' or `r2l') of CHARSET." - (charset-property charset 'direction)) + "Return the display direction (0 for `l2r' or 1 for `r2l') of CHARSET. +Only left-to-right is currently implemented." + (if (eq (charset-property charset 'direction) 'l2r) + 0 + 1)) +;; Not in Emacs/Mule (defun charset-registry (charset) "Return the registry of CHARSET. This is a regular expression matching the registry field of fonts @@ -144,3 +127,126 @@ See `make-charset'." (defsetf charset-registry set-charset-registry) (defsetf charset-ccl-program set-charset-ccl-program) + +;;; FSF compatibility functions +(defun charset-after (&optional pos) + "Return charset of a character in current buffer at position POS. +If POS is nil, it defauls to the current point. +If POS is out of range, the value is nil." + (when (null pos) + (setq pos (point))) + (check-argument-type 'integerp pos) + (unless (or (< pos (point-min)) + (> pos (point-max))) + (char-charset (char-after pos)))) + +;; Yuck! +;; We're not going to support this. +;(defun charset-info (charset) +; "Return a vector of information of CHARSET. +;The elements of the vector are: +; CHARSET-ID, BYTES, DIMENSION, CHARS, WIDTH, DIRECTION, +; LEADING-CODE-BASE, LEADING-CODE-EXT, +; ISO-FINAL-CHAR, ISO-GRAPHIC-PLANE, +; REVERSE-CHARSET, SHORT-NAME, LONG-NAME, DESCRIPTION, +; PLIST, +;where +;CHARSET-ID (integer) is the identification number of the charset. +;BYTES (integer) is the length of multi-byte form of a character in +; the charset: one of 1, 2, 3, and 4. +;DIMENSION (integer) is the number of bytes to represent a character of +;the charset: 1 or 2. +;CHARS (integer) is the number of characters in a dimension: 94 or 96. +;WIDTH (integer) is the number of columns a character in the charset +; occupies on the screen: one of 0, 1, and 2. +;DIRECTION (integer) is the rendering direction of characters in the +; charset when rendering. If 0, render from left to right, else +; render from right to left. +;LEADING-CODE-BASE (integer) is the base leading-code for the +; charset. +;LEADING-CODE-EXT (integer) is the extended leading-code for the +; charset. All charsets of less than 0xA0 has the value 0. +;ISO-FINAL-CHAR (character) is the final character of the +; corresponding ISO 2022 charset. +;ISO-GRAPHIC-PLANE (integer) is the graphic plane to be invoked +; while encoding to variants of ISO 2022 coding system, one of the +; following: 0/graphic-plane-left(GL), 1/graphic-plane-right(GR). +;REVERSE-CHARSET (integer) is the charset which differs only in +; LEFT-TO-RIGHT value from the charset. If there's no such a +; charset, the value is -1. +;SHORT-NAME (string) is the short name to refer to the charset. +;LONG-NAME (string) is the long name to refer to the charset +;DESCRIPTION (string) is the description string of the charset. +;PLIST (property list) may contain any type of information a user +; want to put and get by functions `put-charset-property' and +; `get-charset-property' respectively." +; (vector +; (charset-id charset) +; 1 +; (charset-dimension charset) +; (charset-chars charset) +; (charset-width charset) +; (charset-direction charset) +; nil ;; (charset-leading-code-base (charset)) +; nil ;; (charset-leading-code-ext (charset)) +; (charset-iso-final-char charset) +; (charset-iso-graphic-plane charset) +; -1 +; (charset-short-name charset) +; (charset-long-name charset) +; (charset-description charset) +; (charset-plist charset))) + +;(make-compatible 'charset-info "Don't use this if you can help it.") + +(defun define-charset (charset-id charset property-vector) + "Define CHARSET-ID as the identification number of CHARSET with INFO-VECTOR. +If CHARSET-ID is nil, it is decided automatically, which means CHARSET is + treated as a private charset. +INFO-VECTOR is a vector of the format: + [DIMENSION CHARS WIDTH DIRECTION ISO-FINAL-CHAR ISO-GRAPHIC-PLANE + SHORT-NAME LONG-NAME DESCRIPTION] +The meanings of each elements is as follows: +DIMENSION (integer) is the number of bytes to represent a character: 1 or 2. +CHARS (integer) is the number of characters in a dimension: 94 or 96. +WIDTH (integer) is the number of columns a character in the charset +occupies on the screen: one of 0, 1, and 2. + +DIRECTION (integer) is the rendering direction of characters in the +charset when rendering. If 0, render from left to right, else +render from right to left. + +ISO-FINAL-CHAR (character) is the final character of the +corresponding ISO 2022 charset. + +ISO-GRAPHIC-PLANE (integer) is the graphic plane to be invoked +while encoding to variants of ISO 2022 coding system, one of the +following: 0/graphic-plane-left(GL), 1/graphic-plane-right(GR). + + +SHORT-NAME (string) is the short name to refer to the charset. + +LONG-NAME (string) is the long name to refer to the charset. + +DESCRIPTION (string) is the description string of the charset." + (make-charset charset (aref property-vector 8) + (list + 'short-name (aref property-vector 6) + 'long-name (aref property-vector 7) + 'dimension (aref property-vector 0) + 'columns (aref property-vector 2) + 'chars (aref property-vector 1) + 'final (aref property-vector 4) + 'graphic (aref property-vector 5) + 'direction (aref property-vector 3)))) + +(make-compatible 'define-charset "") + +;;; Charset property + +(defalias 'get-charset-property 'get) +(defalias 'put-charset-property 'put) +(defalias 'charset-plist 'object-plist) +(defalias 'set-charset-plist 'setplist) + +;;; mule-charset.el ends here diff --git a/lisp/mule/mule-cmds.el b/lisp/mule/mule-cmds.el index 832bf97..32c22ed 100644 --- a/lisp/mule/mule-cmds.el +++ b/lisp/mule/mule-cmds.el @@ -390,6 +390,8 @@ The return value is a string." nil t nil 'input-method-history) ;;default) )) + (if (string-equal input-method "") + (setq input-method default)) (if (> (length input-method) 0) input-method (if inhibit-null diff --git a/lisp/mule/mule-files.el b/lisp/mule/mule-files.el deleted file mode 100644 index e228426..0000000 --- a/lisp/mule/mule-files.el +++ /dev/null @@ -1,35 +0,0 @@ -;;; mule-files.el --- File I/O functions for XEmacs/Mule. - -;; Copyright (C) 1992,93,94,95 Free Software Foundation, Inc. -;; Copyright (C) 1995 Amdahl Corporation. -;; Copyright (C) 1995 Sun Microsystems. - -;; 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. - -;;; Commentary: - -;;; Derived from mule.el in the original Mule but heavily modified -;;; by Ben Wing. Mostly moved to code-files.el - -;; 1997/3/11 modified by MORIOKA Tomohiko to sync with Emacs 20 API. - -;;; Code: - -(setq-default buffer-file-coding-system 'iso-2022-8) - -;;; mule-files.el ends here diff --git a/lisp/select.el b/lisp/select.el index df593f8..db01d6a 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -32,32 +32,31 @@ ;;; Code: +(defvar selected-text-type + (if (featurep 'mule) '(COMPOUND_TEXT STRING) 'STRING) + "The type atom used to obtain selections from the X server. +Can be either a valid X selection data type, or a list of such types. +COMPOUND_TEXT and STRING are the most commonly used data types. +If a list is provided, the types are tried in sequence until +there is a successful conversion.") + (defun copy-primary-selection () "Copy the selection to the Clipboard and the kill ring." (interactive) (and (console-on-window-system-p) (cut-copy-clear-internal 'copy))) -(define-obsolete-function-alias - 'x-copy-primary-selection - 'copy-primary-selection) (defun kill-primary-selection () "Copy the selection to the Clipboard and the kill ring, then delete it." (interactive "*") (and (console-on-window-system-p) (cut-copy-clear-internal 'cut))) -(define-obsolete-function-alias - 'x-kill-primary-selection - 'kill-primary-selection) (defun delete-primary-selection () "Delete the selection without copying it to the Clipboard or the kill ring." (interactive "*") (and (console-on-window-system-p) (cut-copy-clear-internal 'clear))) -(define-obsolete-function-alias - 'x-delete-primary-selection - 'delete-primary-selection) (defun yank-clipboard-selection () "Insert the current Clipboard selection at point." @@ -67,30 +66,34 @@ (mswindows (mswindows-paste-clipboard)) (otherwise nil))) -(defun selection-owner-p (&optional selection) - "Return t if current XEmacs process owns the given Selection. -The arg should be the name of the selection in question, typically one -of the symbols PRIMARY, SECONDARY, or CLIPBOARD. (For convenience, -the symbol nil is the same as PRIMARY, and t is the same as -SECONDARY.)" - (interactive) - (case (device-type (selected-device)) - (x (x-selection-owner-p selection)) - (mswindows (mswindows-selection-owner-p selection)) - (otherwise nil))) - -(defun selection-exists-p (&optional selection) - "Whether there is an owner for the given Selection. -The arg should be the name of the selection in question, typically one -of the symbols PRIMARY, SECONDARY, or CLIPBOARD. (For convenience, -the symbol nil is the same as PRIMARY, and t is the same as -SECONDARY." - (interactive) - (case (device-type (selected-device)) - (x (x-selection-exists-p selection)) - (mswindows (mswindows-selection-exists-p)) - (otherwise nil))) +(define-device-method get-cutbuffer + "Return the value of one of the cut buffers. +This will do nothing under anything other than X.") +(defun get-selection (&optional type data-type) + "Return the value of a Windows selection. +The argument TYPE (default `PRIMARY') says which selection, +and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule) +says how to convert the data." + (or type (setq type 'PRIMARY)) + (or data-type (setq data-type selected-text-type)) + (let ((text + (if (consp data-type) + (condition-case err + (get-selection-internal type (car data-type)) + (selection-conversion-error + (if (cdr data-type) + (get-selection type (cdr data-type)) + (signal (car err) (cdr err))))) + (get-selection-internal type data-type)))) + (when (and (consp text) (symbolp (car text))) + (setq text (cdr text))) + (when (not (stringp text)) + (error "Selection is not a string: %S" text)) + text)) + +;; FSFmacs calls this `x-set-selection', and reverses the +;; arguments (duh ...). This order is more logical. (defun own-selection (data &optional type) "Make an Windows selection of type TYPE and value DATA. The argument TYPE (default `PRIMARY') says which selection, @@ -109,26 +112,64 @@ Interactively, the text of the region is used as the selection value." (interactive (if (not current-prefix-arg) (list (read-string "Store text for pasting: ")) (list (substring (region-beginning) (region-end))))) - (case (device-type (selected-device)) - (x (x-own-selection data type)) - (mswindows (mswindows-own-selection data type)) - (otherwise nil))) + ;FSFmacs huh?? It says: + ;; "This is for temporary compatibility with pre-release Emacs 19." + ;(if (stringp type) + ; (setq type (intern type))) + (or (valid-simple-selection-p data) + (and (vectorp data) + (let ((valid t) + (i (1- (length data)))) + (while (>= i 0) + (or (valid-simple-selection-p (aref data i)) + (setq valid nil)) + (setq i (1- i))) + valid)) + (signal 'error (list "invalid selection" data))) + (or type (setq type 'PRIMARY)) + (if data + (own-selection-internal type data) + (disown-selection-internal type)) + (cond ((eq type 'PRIMARY) + (setq primary-selection-extent + (select-make-extent-for-selection + data primary-selection-extent))) + ((eq type 'SECONDARY) + (setq secondary-selection-extent + (select-make-extent-for-selection + data secondary-selection-extent)))) + (setq zmacs-region-stays t) + data) + +(defun dehilight-selection (selection) + "for use as a value of `lost-selection-hooks'." + (cond ((eq selection 'PRIMARY) + (if primary-selection-extent + (let ((inhibit-quit t)) + (if (consp primary-selection-extent) + (mapcar 'delete-extent primary-selection-extent) + (delete-extent primary-selection-extent)) + (setq primary-selection-extent nil))) + (if zmacs-regions (zmacs-deactivate-region))) + ((eq selection 'SECONDARY) + (if secondary-selection-extent + (let ((inhibit-quit t)) + (if (consp secondary-selection-extent) + (mapcar 'delete-extent secondary-selection-extent) + (delete-extent secondary-selection-extent)) + (setq secondary-selection-extent nil))))) + nil) + +(setq lost-selection-hooks 'dehilight-selection) (defun own-clipboard (string) - "Paste the given string to the Clipboard." - (case (device-type (selected-device)) - (x (x-own-clipboard string)) - (mswindows (mswindows-own-clipboard string)) - (otherwise nil))) + "Paste the given string to the X Clipboard." + (own-selection string 'CLIPBOARD)) (defun disown-selection (&optional secondary-p) "Assuming we own the selection, disown it. With an argument, discard the secondary selection instead of the primary selection." - (case (device-type (selected-device)) - (x (x-disown-selection secondary-p)) - (mswindows (mswindows-disown-selection secondary-p)) - (otherwise nil))) - + (disown-selection-internal (if secondary-p 'SECONDARY 'PRIMARY))) ;; from x-init.el ;; selections and active regions @@ -218,9 +259,6 @@ secondary selection instead of the primary selection." (default-mouse-track-next-move-rect start end previous-extent) )) previous-extent)))) -(define-obsolete-function-alias - 'x-select-make-extent-for-selection - 'select-make-extent-for-selection) ;; moved from x-select.el (defun valid-simple-selection-p (data) @@ -242,9 +280,6 @@ secondary selection instead of the primary selection." (marker-buffer (cdr data))) (buffer-live-p (marker-buffer (car data))) (buffer-live-p (marker-buffer (cdr data)))))) -(define-obsolete-function-alias - 'x-valid-simple-selection-p - 'valid-simple-selection-p) (defun cut-copy-clear-internal (mode) (or (memq mode '(cut copy clear)) (error "unkown mode %S" mode)) @@ -287,8 +322,241 @@ secondary selection instead of the primary selection." (delete-region s e)))) (disown-selection nil) ))) -(define-obsolete-function-alias - 'x-cut-copy-clear-internal - 'cut-copy-clear-internal) + +;;; Functions to convert the selection into various other selection +;;; types. Every selection type that emacs handles is implemented +;;; this way, except for TIMESTAMP, which is a special case. These are +;;; all moved from x-select.el + +(defun select-convert-to-text (selection type value) + (cond ((stringp value) + value) + ((extentp value) + (save-excursion + (set-buffer (extent-object value)) + (save-restriction + (widen) + (buffer-substring (extent-start-position value) + (extent-end-position value))))) + ((and (consp value) + (markerp (car value)) + (markerp (cdr value))) + (or (eq (marker-buffer (car value)) (marker-buffer (cdr value))) + (signal 'error + (list "markers must be in the same buffer" + (car value) (cdr value)))) + (save-excursion + (set-buffer (or (marker-buffer (car value)) + (error "selection is in a killed buffer"))) + (save-restriction + (widen) + (buffer-substring (car value) (cdr value))))) + (t nil))) + +(defun select-convert-to-string (selection type value) + (let ((outval (select-convert-to-text selection type value))) + ;; force the string to be not in Compound Text format. + (if (stringp outval) + (cons 'STRING outval) + outval))) + +(defun select-convert-to-compound-text (selection type value) + ;; converts to compound text automatically + (select-convert-to-text selection type value)) + +(defun select-convert-to-length (selection type value) + (let ((value + (cond ((stringp value) + (length value)) + ((extentp value) + (extent-length value)) + ((and (consp value) + (markerp (car value)) + (markerp (cdr value))) + (or (eq (marker-buffer (car value)) + (marker-buffer (cdr value))) + (signal 'error + (list "markers must be in the same buffer" + (car value) (cdr value)))) + (abs (- (car value) (cdr value))))))) + (if value ; force it to be in 32-bit format. + (cons (ash value -16) (logand value 65535)) + nil))) + +(defun select-convert-to-targets (selection type value) + ;; return a vector of atoms, but remove duplicates first. + (let* ((all (cons 'TIMESTAMP (mapcar 'car selection-converter-alist))) + (rest all)) + (while rest + (cond ((memq (car rest) (cdr rest)) + (setcdr rest (delq (car rest) (cdr rest)))) + ((eq (car (cdr rest)) '_EMACS_INTERNAL) ; shh, it's a secret + (setcdr rest (cdr (cdr rest)))) + (t + (setq rest (cdr rest))))) + (apply 'vector all))) + +(defun select-convert-to-delete (selection type value) + (disown-selection-internal selection) + ;; A return value of nil means that we do not know how to do this conversion, + ;; and replies with an "error". A return value of NULL means that we have + ;; done the conversion (and any side-effects) but have no value to return. + 'NULL) + +(defun select-convert-to-filename (selection type value) + (cond ((extentp value) + (buffer-file-name (or (extent-object value) + (error "selection is in a killed buffer")))) + ((and (consp value) + (markerp (car value)) + (markerp (cdr value))) + (buffer-file-name (or (marker-buffer (car value)) + (error "selection is in a killed buffer")))) + (t nil))) + +(defun select-convert-to-charpos (selection type value) + (let (a b tmp) + (cond ((cond ((extentp value) + (setq a (extent-start-position value) + b (extent-end-position value))) + ((and (consp value) + (markerp (car value)) + (markerp (cdr value))) + (setq a (car value) + b (cdr value)))) + (setq a (1- a) b (1- b)) ; zero-based + (if (< b a) (setq tmp a a b b tmp)) + (cons 'SPAN + (vector (cons (ash a -16) (logand a 65535)) + (cons (ash b -16) (logand b 65535)))))))) + +(defun select-convert-to-lineno (selection type value) + (let (a b buf tmp) + (cond ((cond ((extentp value) + (setq buf (extent-object value) + a (extent-start-position value) + b (extent-end-position value))) + ((and (consp value) + (markerp (car value)) + (markerp (cdr value))) + (setq a (marker-position (car value)) + b (marker-position (cdr value)) + buf (marker-buffer (car value))))) + (save-excursion + (set-buffer buf) + (save-restriction + (widen) + (goto-char a) + (beginning-of-line) + (setq a (1+ (count-lines 1 (point)))) + (goto-char b) + (beginning-of-line) + (setq b (1+ (count-lines 1 (point)))))) + (if (< b a) (setq tmp a a b b tmp)) + (cons 'SPAN + (vector (cons (ash a -16) (logand a 65535)) + (cons (ash b -16) (logand b 65535)))))))) + +(defun select-convert-to-colno (selection type value) + (let (a b buf tmp) + (cond ((cond ((extentp value) + (setq buf (extent-object value) + a (extent-start-position value) + b (extent-end-position value))) + ((and (consp value) + (markerp (car value)) + (markerp (cdr value))) + (setq a (car value) + b (cdr value) + buf (marker-buffer a)))) + (save-excursion + (set-buffer buf) + (goto-char a) + (setq a (current-column)) + (goto-char b) + (setq b (current-column))) + (if (< b a) (setq tmp a a b b tmp)) + (cons 'SPAN + (vector (cons (ash a -16) (logand a 65535)) + (cons (ash b -16) (logand b 65535)))))))) + +(defun select-convert-to-sourceloc (selection type value) + (let (a b buf file-name tmp) + (cond ((cond ((extentp value) + (setq buf (or (extent-object value) + (error "selection is in a killed buffer")) + a (extent-start-position value) + b (extent-end-position value) + file-name (buffer-file-name buf))) + ((and (consp value) + (markerp (car value)) + (markerp (cdr value))) + (setq a (marker-position (car value)) + b (marker-position (cdr value)) + buf (or (marker-buffer (car value)) + (error "selection is in a killed buffer")) + file-name (buffer-file-name buf)))) + (save-excursion + (set-buffer buf) + (save-restriction + (widen) + (goto-char a) + (beginning-of-line) + (setq a (1+ (count-lines 1 (point)))) + (goto-char b) + (beginning-of-line) + (setq b (1+ (count-lines 1 (point)))))) + (if (< b a) (setq tmp a a b b tmp)) + (format "%s:%d" file-name a))))) + +(defun select-convert-to-os (selection type size) + (symbol-name system-type)) + +(defun select-convert-to-host (selection type size) + (system-name)) + +(defun select-convert-to-user (selection type size) + (user-full-name)) + +(defun select-convert-to-class (selection type size) + x-emacs-application-class) + +;; We do not try to determine the name Emacs was invoked with, +;; because it is not clean for a program's behavior to depend on that. +(defun select-convert-to-name (selection type size) + ;invocation-name + "xemacs") + +(defun select-convert-to-integer (selection type value) + (and (integerp value) + (cons (ash value -16) (logand value 65535)))) + +(defun select-convert-to-atom (selection type value) + (and (symbolp value) value)) + +(defun select-convert-to-identity (selection type value) ; used internally + (vector value)) + +(setq selection-converter-alist + '((TEXT . select-convert-to-text) + (STRING . select-convert-to-string) + (COMPOUND_TEXT . select-convert-to-compound-text) + (TARGETS . select-convert-to-targets) + (LENGTH . select-convert-to-length) + (DELETE . select-convert-to-delete) + (FILE_NAME . select-convert-to-filename) + (CHARACTER_POSITION . select-convert-to-charpos) + (SOURCE_LOC . select-convert-to-sourceloc) + (LINE_NUMBER . select-convert-to-lineno) + (COLUMN_NUMBER . select-convert-to-colno) + (OWNER_OS . select-convert-to-os) + (HOST_NAME . select-convert-to-host) + (USER . select-convert-to-user) + (CLASS . select-convert-to-class) + (NAME . select-convert-to-name) + (ATOM . select-convert-to-atom) + (INTEGER . select-convert-to-integer) + (_EMACS_INTERNAL . select-convert-to-identity) + )) ;;; select.el ends here diff --git a/lisp/startup.el b/lisp/startup.el index 3ac3778..8a73014 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -200,12 +200,18 @@ remaining command-line args are in the variable `command-line-args-left'.") (princ (concat "\n" (emacs-version) "\n\n")) (princ (if (featurep 'x) - (concat (emacs-name) - " accepts all standard X Toolkit command line options.\n" - "In addition, the") + (concat "When creating a window on an X display, " + (emacs-name) + " accepts all standard X Toolkit +command line options plus the following: + -iconname Use title as the icon name. + -mc <color> Use color as the mouse color. + -cr <color> Use color as the text-cursor foregound color. + -private Install a private colormap. + +In addition, the") "The")) (princ " following options are accepted: - -t <device> Use TTY <device> instead of the terminal for input and output. This implies the -nw option. -nw Inhibit the use of any window-system-specific diff --git a/lisp/update-elc.el b/lisp/update-elc.el index bddaf12..8a4527a 100644 --- a/lisp/update-elc.el +++ b/lisp/update-elc.el @@ -84,7 +84,7 @@ ;; (print (prin1-to-string update-elc-files-to-compile)) (let (preloaded-file-list site-load-packages) - (load (concat default-directory "../lisp/dumped-lisp.el")) + (load (expand-file-name "../lisp/dumped-lisp.el")) ;; Path setup (let ((package-preloaded-file-list diff --git a/lisp/version.el b/lisp/version.el index d0ba84c..914ec3a 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -37,16 +37,19 @@ Warning, this variable did not exist in XEmacs versions prior to 20.3") (defconst emacs-version (purecopy - (format "%d.%d %s%s%s" + (format "%d.%d %s%s%s%s" emacs-major-version emacs-minor-version - (if xemacs-codename - (concat "\"" xemacs-codename "\"") + (if emacs-patch-level + (format "(patch %d)" emacs-patch-level) "") - " XEmacs Lucid" (if xemacs-betaname (concat " " xemacs-betaname) - ""))) + "") + (if xemacs-codename + (concat " \"" xemacs-codename "\"") + "") + " XEmacs Lucid")) "Version numbers of this version of XEmacs.") (if (featurep 'infodock) @@ -107,16 +110,19 @@ to the system configuration; look at `system-configuration' instead." (t (insert version-string)))))) ;; from emacs-vers.el -(defun emacs-version>= (major &optional minor) - "Return true if the Emacs version is >= to the given MAJOR and MINOR numbers. -The MAJOR version number argument is required, but the MINOR version number -argument is optional. If the minor version number is not specified (or is the -symbol `nil') then only the major version numbers are considered in the test." - (if (null minor) - (>= emacs-major-version major) - (or (> emacs-major-version major) - (and (= emacs-major-version major) - (>= emacs-minor-version minor))))) +(defun emacs-version>= (major &optional minor patch) + "Return true if the Emacs version is >= to the given MAJOR, MINOR, + and PATCH numbers. +The MAJOR version number argument is required, but the other arguments +argument are optional. Only the Non-nil arguments are used in the test." + (let ((emacs-patch (or emacs-patch-level emacs-beta-version -1))) + (cond ((> emacs-major-version major)) + ((< emacs-major-version major) nil) + ((null minor)) + ((> emacs-minor-version minor)) + ((< emacs-minor-version minor) nil) + ((null patch)) + ((>= emacs-patch patch))))) ;;; We hope that this alias is easier for people to find. (define-function 'version 'emacs-version) diff --git a/lisp/x-font-menu.el b/lisp/x-font-menu.el index d96fe11..8dffa39 100644 --- a/lisp/x-font-menu.el +++ b/lisp/x-font-menu.el @@ -7,6 +7,7 @@ ;; Author: Jamie Zawinski <jwz@netscape.com> ;; Restructured by: Jonathan Stigelman <Stig@hackvan.com> ;; Mule-ized by: Martin Buchholz +;; More restructuring for MS-Windows by Andy Piper <andy@xemacs.org> ;; This file is part of XEmacs. @@ -24,105 +25,6 @@ ;; along with XEmacs; see the file COPYING. If not, write to the ;; Free Software Foundation, 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. - -;;; Commentary: -;;; -;;; Creates three menus, "Font", "Size", and "Weight", and puts them on the -;;; "Options" menu. The contents of these menus are the superset of those -;;; properties available on any fonts, but only the intersection of the three -;;; sets is selectable at one time. -;;; -;;; Known Problems: -;;; =============== -;;; Items on the Font menu are selectable if and only if that font exists in -;;; the same size and weight as the current font. This means that some fonts -;;; are simply not reachable from some other fonts - if only one font comes -;;; in only one point size (like "Nil", which comes only in 2), you will never -;;; be able to select it. It would be better if the items on the Fonts menu -;;; were always selectable, and selecting them would set the size to be the -;;; closest size to the current font's size. -;;; -;;; This attempts to change all other faces in an analagous way to the change -;;; that was made to the default face; if it can't, it will skip over the face. -;;; However, this could leave incongruous font sizes around, which may cause -;;; some nonreversibility problems if further changes are made. Perhaps it -;;; should remember the initial fonts of all faces, and derive all subsequent -;;; fonts from that initial state. -;;; -;;; xfontsel(1) is a lot more flexible (but probably harder to understand). -;;; -;;; The code to construct menus from all of the x11 fonts available from the -;;; server is autoloaded and executed the very first time that one of the Font -;;; menus is selected on each device. That is, if XEmacs has frames on two -;;; different devices, then separate font menu information will be maintained -;;; for each X display. If the font path changes after emacs has already -;;; asked the X server on a particular display for its list of fonts, this -;;; won't notice. Also, the first time that a font menu is posted on each -;;; display will entail a lengthy delay, but that's better than slowing down -;;; XEmacs startup. At any time (i.e.: after a font-path change or -;;; immediately after device creation), you can call -;;; `reset-device-font-menus' to rebuild the menus from all currently -;;; available fonts. -;;; -;;; There is knowledge here about the regexp match numbers in -;;; `x-font-regexp' and `x-font-regexp-foundry-and-family' defined in -;;; x-faces.el. -;;; -;;; There are at least three kinds of fonts under X11r5: -;;; -;;; - bitmap fonts, which can be assumed to look as good as possible; -;;; - bitmap fonts which have been (or can be) automatically scaled to -;;; a new size, and which almost always look awful; -;;; - and true outline fonts, which should look ok at any size, but in -;;; practice (on at least some systems) look awful at any size, and -;;; even in theory are unlikely ever to look as good as non-scaled -;;; bitmap fonts. -;;; -;;; It would be nice to get this code to look for non-scaled bitmap fonts -;;; first, then outline fonts, then scaled bitmap fonts as a last resort. -;;; But it's not clear to me how to tell them apart based on their truenames -;;; and/or the result of XListFonts(). I welcome any and all explanations -;;; of the subtleties involved... -;;; -;;; -;;; If You Think You'Re Seeing A Bug: -;;; ================================= -;;; When reporting problems, send the following information: -;;; -;;; - Exactly what behavior you're seeing; -;;; - The output of the `xlsfonts' program; -;;; - The value of the variable `device-fonts-cache'; -;;; - The values of the following expressions, both before and after -;;; making a selection from any of the fonts-related menus: -;;; (face-font 'default) -;;; (font-truename (face-font 'default)) -;;; (font-properties (face-font 'default)) -;;; - The values of the following variables after making a selection: -;;; font-menu-preferred-resolution -;;; font-menu-registry-encoding -;;; -;;; There is a common misconception that "*-courier-medium-r-*-11-*", also -;;; known as "-adobe-courier-medium-r-normal--11-80-100-100-m-60-iso8859-1", -;;; is an 11-point font. It is not -- it is an 11-pixel font at 100dpi, -;;; which is an 8-point font (the number after -11- is the size in tenths -;;; of points). So if you expect to be seeing an "11" entry in the "Size" -;;; menu and are not, this may be why. -;;; -;;; In the real world (aka Solaris), one has to deal with fonts that -;;; appear to be medium-i but are really light-r, and fonts that -;;; resolve to different resolutions depending on the charset: -;;; -;;; (font-instance-truename -;;; (make-font-instance "-*-mincho-medium-i-normal-*-*-*-*-*-*-*-jisx0201*-*")) -;;; ==> -;;; "-morisawa-ryumin light kl-light-r-normal--10-100-72-72-m-50-jisx0201.1976-0" -;;; -;;; (list-fonts "-dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*") -;;; ==> -;;; ("-dt-interface user-medium-r-normal-s sans-12-120-72-72-m-70-iso8859-1" -;;; "-dt-interface user-medium-r-normal-s-14-120-75-75-m-120-jisx0208.1983-0" -;;; "-dt-interface user-medium-r-normal-s-14-120-75-75-m-60-jisx0201.1976-0") - ;;; Code: ;; #### - implement these... @@ -130,57 +32,12 @@ ;;; (defvar font-menu-ignore-proportional-fonts nil ;;; "*If non-nil, then the font menu will only show fixed-width fonts.") -(defgroup font-menu () - "Settings for the font menu" - :group 'x) - -;;;###autoload -(defcustom font-menu-ignore-scaled-fonts t - "*If non-nil, then the font menu will try to show only bitmap fonts." - :type 'boolean - :group 'font-menu) - -;;;###autoload -(defcustom font-menu-this-frame-only-p nil - "*If non-nil, then changing the default font from the font menu will only -affect one frame instead of all frames." - :type 'boolean - :group 'font-menu) - -(defcustom font-menu-max-items 25 - "*Maximum number of items in the font menu -If number of entries in a menu is larger than this value, split menu -into submenus of nearly equal length. If nil, never split menu into -submenus." - :group 'font-menu - :type '(choice (const :tag "no submenus" nil) - (integer))) - -(defcustom font-menu-submenu-name-format "%-12.12s ... %.12s" - "*Format specification of the submenu name. -Used by `font-menu-split-long-menu' if the number of entries in a menu is -larger than `font-menu-menu-max-items'. -This string should contain one %s for the name of the first entry and -one %s for the name of the last entry in the submenu. -If the value is a function, it should return the submenu name. The -function is be called with two arguments, the names of the first and -the last entry in the menu." - :group 'font-menu - :type '(choice (string :tag "Format string") - (function))) - - -;; only call XListFonts (and parse) once per device. -;; ( (device . [parsed-list-fonts family-menu size-menu weight-menu]) ...) -(defvar device-fonts-cache nil) +(require 'font-menu) -(defvar font-menu-registry-encoding nil +(defvar x-font-menu-registry-encoding nil "Registry and encoding to use with font menu fonts.") -(defvar font-menu-preferred-resolution "*-*" - "Preferred horizontal and vertical font menu resolution (e.g. \"75-75\").") - -(defvar fonts-menu-junk-families +(defvar x-fonts-menu-junk-families (purecopy (mapconcat #'identity @@ -194,11 +51,6 @@ the last entry in the menu." "\\|")) "A regexp matching font families which are uninteresting (e.g. cursor fonts).") -(eval-when-compile - (defsubst device-fonts-cache () - (or (cdr (assq (selected-device) device-fonts-cache)) - (reset-device-font-menus (selected-device))))) - (defun hack-font-truename (fn) "Filter the output of `font-instance-truename' to deal with Japanese fontsets." (if (string-match "," (font-instance-truename fn)) @@ -213,26 +65,12 @@ the last entry in the menu." ret) (font-instance-truename fn))) -;;;###autoload -(fset 'install-font-menus 'reset-device-font-menus) -(make-obsolete 'install-font-menus 'reset-device-font-menus) - (defvar x-font-regexp-ascii nil "This is used to filter out font families that can't display ASCII text. It must be set at run-time.") -(defun vassoc (key valist) - "Search VALIST for a vector whose first element is equal to KEY. -See also `assoc'." - ;; by Stig@hackvan.com - (let (el) - (catch 'done - (while (setq el (pop valist)) - (and (equal key (aref el 0)) - (throw 'done el)))))) - ;;;###autoload -(defun reset-device-font-menus (&optional device debug) +(defun x-reset-device-font-menus (device &optional debug) "Generates the `Font', `Size', and `Weight' submenus for the Options menu. This is run the first time that a font-menu is needed for each device. If you don't like the lazy invocation of this function, you can add it to @@ -242,107 +80,100 @@ or if you change your font path, you can call this to re-initialize the menus." ;; by Stig@hackvan.com ;; #### - this should implement a `menus-only' option, which would ;; recalculate the menus from the cache w/o having to do list-fonts again. - (message "Getting list of fonts from server... ") - (if (or noninteractive - (not (or device (setq device (selected-device)))) - (not (eq (device-type device) 'x))) - nil - (unless x-font-regexp-ascii - (setq x-font-regexp-ascii (if (featurep 'mule) - (charset-registry 'ascii) - "iso8859-1"))) - (setq font-menu-registry-encoding - (if (featurep 'mule) "*-*" "iso8859-1")) - (let ((case-fold-search t) - family size weight entry monospaced-p - dev-cache cache families sizes weights) - (dolist (name (cond ((null debug) ; debugging kludge - (list-fonts "*-*-*-*-*-*-*-*-*-*-*-*-*-*" device)) - ((stringp debug) (split-string debug "\n")) - (t debug))) - (when (and (string-match x-font-regexp-ascii name) - (string-match x-font-regexp name)) - (setq weight (capitalize (match-string 1 name)) - size (string-to-int (match-string 6 name))) - (or (string-match x-font-regexp-foundry-and-family name) - (error "internal error")) - (setq family (capitalize (match-string 1 name))) - (or (string-match x-font-regexp-spacing name) - (error "internal error")) - (setq monospaced-p (string= "m" (match-string 1 name))) - (unless (string-match fonts-menu-junk-families family) - (setq entry (or (vassoc family cache) - (car (setq cache - (cons (vector family nil nil t) - cache))))) - (or (member family families) (push family families)) - (or (member weight weights) (push weight weights)) - (or (member size sizes) (push size sizes)) - (or (member weight (aref entry 1)) (push weight (aref entry 1))) - (or (member size (aref entry 2)) (push size (aref entry 2))) - (aset entry 3 (and (aref entry 3) monospaced-p))))) - ;; - ;; Hack scalable fonts. - ;; Some fonts come only in scalable versions (the only size is 0) - ;; and some fonts come in both scalable and non-scalable versions - ;; (one size is 0). If there are any scalable fonts at all, make - ;; sure that the union of all point sizes contains at least some - ;; common sizes - it's possible that some sensible sizes might end - ;; up not getting mentioned explicitly. - ;; - (if (member 0 sizes) - (let ((common '(60 80 100 120 140 160 180 240))) - (while common - (or;;(member (car common) sizes) ; not enough slack - (let ((rest sizes) - (done nil)) - (while (and (not done) rest) - (if (and (> (car common) (- (car rest) 5)) - (< (car common) (+ (car rest) 5))) - (setq done t)) - (setq rest (cdr rest))) - done) - (setq sizes (cons (car common) sizes))) - (setq common (cdr common))) - (setq sizes (delq 0 sizes)))) - - (setq families (sort families 'string-lessp) - weights (sort weights 'string-lessp) - sizes (sort sizes '<)) - - (dolist (entry cache) - (aset entry 1 (sort (aref entry 1) 'string-lessp)) - (aset entry 2 (sort (aref entry 2) '<))) - - (message "Getting list of fonts from server... done.") - - (setq dev-cache (assq device device-fonts-cache)) - (or dev-cache - (setq dev-cache (car (push (list device) device-fonts-cache)))) - (setcdr - dev-cache - (vector - cache - (mapcar (lambda (x) - (vector x - (list 'font-menu-set-font x nil nil) - ':style 'radio ':active nil ':selected nil)) - families) - (mapcar (lambda (x) - (vector (if (/= 0 (% x 10)) - ;; works with no LISP_FLOAT_TYPE - (concat (int-to-string (/ x 10)) "." - (int-to-string (% x 10))) - (int-to-string (/ x 10))) - (list 'font-menu-set-font nil nil x) - ':style 'radio ':active nil ':selected nil)) - sizes) - (mapcar (lambda (x) - (vector x - (list 'font-menu-set-font nil x nil) - ':style 'radio ':active nil ':selected nil)) - weights))) - (cdr dev-cache)))) + (unless x-font-regexp-ascii + (setq x-font-regexp-ascii (if (featurep 'mule) + (charset-registry 'ascii) + "iso8859-1"))) + (setq x-font-menu-registry-encoding + (if (featurep 'mule) "*-*" "iso8859-1")) + (let ((case-fold-search t) + family size weight entry monospaced-p + dev-cache cache families sizes weights) + (dolist (name (cond ((null debug) ; debugging kludge + (list-fonts "*-*-*-*-*-*-*-*-*-*-*-*-*-*" device)) + ((stringp debug) (split-string debug "\n")) + (t debug))) + (when (and (string-match x-font-regexp-ascii name) + (string-match x-font-regexp name)) + (setq weight (capitalize (match-string 1 name)) + size (string-to-int (match-string 6 name))) + (or (string-match x-font-regexp-foundry-and-family name) + (error "internal error")) + (setq family (capitalize (match-string 1 name))) + (or (string-match x-font-regexp-spacing name) + (error "internal error")) + (setq monospaced-p (string= "m" (match-string 1 name))) + (unless (string-match x-fonts-menu-junk-families family) + (setq entry (or (vassoc family cache) + (car (setq cache + (cons (vector family nil nil t) + cache))))) + (or (member family families) (push family families)) + (or (member weight weights) (push weight weights)) + (or (member size sizes) (push size sizes)) + (or (member weight (aref entry 1)) (push weight (aref entry 1))) + (or (member size (aref entry 2)) (push size (aref entry 2))) + (aset entry 3 (and (aref entry 3) monospaced-p))))) + ;; + ;; Hack scalable fonts. + ;; Some fonts come only in scalable versions (the only size is 0) + ;; and some fonts come in both scalable and non-scalable versions + ;; (one size is 0). If there are any scalable fonts at all, make + ;; sure that the union of all point sizes contains at least some + ;; common sizes - it's possible that some sensible sizes might end + ;; up not getting mentioned explicitly. + ;; + (if (member 0 sizes) + (let ((common '(60 80 100 120 140 160 180 240))) + (while common + (or;;(member (car common) sizes) ; not enough slack + (let ((rest sizes) + (done nil)) + (while (and (not done) rest) + (if (and (> (car common) (- (car rest) 5)) + (< (car common) (+ (car rest) 5))) + (setq done t)) + (setq rest (cdr rest))) + done) + (setq sizes (cons (car common) sizes))) + (setq common (cdr common))) + (setq sizes (delq 0 sizes)))) + + (setq families (sort families 'string-lessp) + weights (sort weights 'string-lessp) + sizes (sort sizes '<)) + + (dolist (entry cache) + (aset entry 1 (sort (aref entry 1) 'string-lessp)) + (aset entry 2 (sort (aref entry 2) '<))) + + (setq dev-cache (assq device device-fonts-cache)) + (or dev-cache + (setq dev-cache (car (push (list device) device-fonts-cache)))) + (setcdr + dev-cache + (vector + cache + (mapcar (lambda (x) + (vector x + (list 'font-menu-set-font x nil nil) + ':style 'radio ':active nil ':selected nil)) + families) + (mapcar (lambda (x) + (vector (if (/= 0 (% x 10)) + ;; works with no LISP_FLOAT_TYPE + (concat (int-to-string (/ x 10)) "." + (int-to-string (% x 10))) + (int-to-string (/ x 10))) + (list 'font-menu-set-font nil nil x) + ':style 'radio ':active nil ':selected nil)) + sizes) + (mapcar (lambda (x) + (vector x + (list 'font-menu-set-font nil x nil) + ':style 'radio ':active nil ':selected nil)) + weights))) + (cdr dev-cache))) ;; Extract font information from a face. We examine both the ;; user-specified font name and the canonical (`true') font name. @@ -352,7 +183,8 @@ or if you change your font path, you can call this to re-initialize the menus." ;; We use the user-specified one if possible, else use the truename. ;; If the user didn't specify one (with "-dt-*-*", for example) ;; get the truename and use the possibly suboptimal data from that. -(defun* font-menu-font-data (face dcache) +;;;###autoload +(defun* x-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) @@ -370,7 +202,7 @@ or if you change your font path, you can call this to re-initialize the menus." (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) - (return-from font-menu-font-data (make-vector 5 nil))) + (return-from x-font-menu-font-data (make-vector 5 nil))) (when (string-match x-font-regexp name) (setq weight (capitalize (match-string 1 name))) @@ -385,229 +217,7 @@ or if you change your font path, you can call this to re-initialize the menus." (vector entry family size weight slant))) -(defun font-menu-split-long-menu (menu) - "Split MENU according to `font-menu-max-items'." - (let ((len (length menu))) - (if (or (null font-menu-max-items) - (null (featurep 'lisp-float-type)) - (<= len font-menu-max-items)) - menu - ;; Submenu is max 2 entries longer than menu, never shorter, number of - ;; entries in submenus differ by at most one (with longer submenus first) - (let* ((outer (floor (sqrt len))) - (inner (/ len outer)) - (rest (% len outer)) - (result nil)) - (setq menu (reverse menu)) - (while menu - (let ((in inner) - (sub nil) - (to (car menu))) - (while (> in 0) - (setq in (1- in) - sub (cons (car menu) sub) - menu (cdr menu))) - (setq result - (cons (cons (if (stringp font-menu-submenu-name-format) - (format font-menu-submenu-name-format - (aref (car sub) 0) (aref to 0)) - (funcall font-menu-submenu-name-format - (aref (car sub) 0) (aref to 0))) - sub) - result) - rest (1+ rest)) - (if (= rest outer) (setq inner (1+ inner))))) - result)))) - -;;;###autoload -(defun font-menu-family-constructor (ignored) - (catch 'menu - (unless (eq 'x (device-type (selected-device))) - (throw 'menu '(["Cannot parse current font" ding nil]))) - (let* ((dcache (device-fonts-cache)) - (font-data (font-menu-font-data 'default dcache)) - (entry (aref font-data 0)) - (family (aref font-data 1)) - (size (aref font-data 2)) - (weight (aref font-data 3)) - f) - (unless family - (throw 'menu '(["Cannot parse current font" ding nil]))) - ;; Items on the Font menu are enabled iff that font exists in - ;; the same size and weight as the current font (scalable fonts - ;; exist in every size). Only the current font is marked as - ;; selected. - (font-menu-split-long-menu - (mapcar - (lambda (item) - (setq f (aref item 0) - entry (vassoc f (aref dcache 0))) - ;; The user can no longer easily control the weight using the menu - ;; Note it is silly anyway as it could very well be that the font - ;; has no common size+weight combinations with the default font. -;; (if (and (member weight (aref entry 1)) -;; (or (member size (aref entry 2)) -;; (and (not font-menu-ignore-scaled-fonts) -;; (member 0 (aref entry 2))))) -;; (enable-menu-item item) -;; (disable-menu-item item)) - (if (and font-menu-ignore-scaled-fonts (member 0 (aref entry 2))) - (disable-menu-item item) - (enable-menu-item item)) - (if (string-equal family f) - (select-toggle-menu-item item) - (deselect-toggle-menu-item item)) - item) - (aref dcache 1)))))) - -;;;###autoload -(defun font-menu-size-constructor (ignored) - (catch 'menu - (unless (eq 'x (device-type (selected-device))) - (throw 'menu '(["Cannot parse current font" ding nil]))) - (let* ((dcache (device-fonts-cache)) - (font-data (font-menu-font-data 'default dcache)) - (entry (aref font-data 0)) - (family (aref font-data 1)) - (size (aref font-data 2)) - ;;(weight (aref font-data 3)) - s) - (unless family - (throw 'menu '(["Cannot parse current font" ding nil]))) - ;; Items on the Size menu are enabled iff current font has - ;; that size. Only the size of the current font is selected. - ;; (If the current font comes in size 0, it is scalable, and - ;; thus has every size.) - (mapcar - (lambda (item) - (setq s (nth 3 (aref item 1))) - (if (or (member s (aref entry 2)) - (and (not font-menu-ignore-scaled-fonts) - (member 0 (aref entry 2)))) - (enable-menu-item item) - (disable-menu-item item)) - (if (eq size s) - (select-toggle-menu-item item) - (deselect-toggle-menu-item item)) - item) - (aref dcache 2))))) - -;;;###autoload -(defun font-menu-weight-constructor (ignored) - (catch 'menu - (unless (eq 'x (device-type (selected-device))) - (throw 'menu '(["Cannot parse current font" ding nil]))) - (let* ((dcache (device-fonts-cache)) - (font-data (font-menu-font-data 'default dcache)) - (entry (aref font-data 0)) - (family (aref font-data 1)) - ;;(size (aref font-data 2)) - (weight (aref font-data 3)) - w) - (unless family - (throw 'menu '(["Cannot parse current font" ding nil]))) - ;; Items on the Weight menu are enabled iff current font - ;; has that weight. Only the weight of the current font - ;; is selected. - (mapcar - (lambda (item) - (setq w (aref item 0)) - (if (member w (aref entry 1)) - (enable-menu-item item) - (disable-menu-item item)) - (if (string-equal weight w) - (select-toggle-menu-item item) - (deselect-toggle-menu-item item)) - item) - (aref dcache 3))))) - - -;;; Changing font sizes - -(defun font-menu-set-font (family weight size) - ;; This is what gets run when an item is selected from any of the three - ;; fonts menus. It needs to be rather clever. - ;; (size is measured in 10ths of points.) - (let* ((dcache (device-fonts-cache)) - (font-data (font-menu-font-data 'default dcache)) - (from-family (aref font-data 1)) - (from-size (aref font-data 2)) - (from-weight (aref font-data 3)) - (from-slant (aref font-data 4)) - new-default-face-font - new-props) - (unless from-family - (signal 'error '("couldn't parse font name for default face"))) - (when weight - (signal 'error '("Setting weight currently not supported"))) - (setq new-default-face-font - (font-menu-load-font (or family from-family) - (or weight from-weight) - (or size from-size) - from-slant - font-menu-preferred-resolution)) - (dolist (face (delq 'default (face-list))) - (when (face-font-instance face) - (message "Changing font of `%s'..." face) - (condition-case c - (font-menu-change-face face - from-family from-weight from-size - family weight size) - (error - (display-error c nil) - (sit-for 1))))) - ;; Set the default face's font after hacking the other faces, so that - ;; the frame size doesn't change until we are all done. - - ;; If we need to be frame local we do the changes ourselves. - (if font-menu-this-frame-only-p - ;;; WMP - we need to honor font-menu-this-frame-only-p here! - (set-face-font 'default new-default-face-font - (and font-menu-this-frame-only-p (selected-frame))) - ;; OK Let Customize do it. - (when (and family (not (equal family from-family))) - (setq new-props (append (list :family family) new-props))) - (when (and size (not (equal size from-size))) - (setq new-props (append - (list :size (concat (int-to-string (/ size 10)) "pt")) new-props))) - (custom-set-face-update-spec 'default '((type x)) new-props) - (message "Font %s" (face-font-name 'default))))) - - -(defun font-menu-change-face (face - from-family from-weight from-size - to-family to-weight to-size) - (or (symbolp face) (signal 'wrong-type-argument (list 'symbolp face))) - (let* ((dcache (device-fonts-cache)) - (font-data (font-menu-font-data face dcache)) - (face-family (aref font-data 1)) - (face-size (aref font-data 2)) - (face-weight (aref font-data 3)) - (face-slant (aref font-data 4))) - - (or face-family - (signal 'error (list "couldn't parse font name for face" face))) - - ;; If this face matches the old default face in the attribute we - ;; are changing, then change it to the new attribute along that - ;; dimension. Also, the face must have its own global attribute. - ;; If its value is inherited, we don't touch it. If any of this - ;; is not true, we leave it alone. - (when (and (face-font face 'global) - (cond - (to-family (string-equal face-family from-family)) - (to-weight (string-equal face-weight from-weight)) - (to-size (= face-size from-size)))) - (set-face-font face - (font-menu-load-font (or to-family face-family) - (or to-weight face-weight) - (or to-size face-size) - face-slant - font-menu-preferred-resolution) - (and font-menu-this-frame-only-p - (selected-frame)))))) - -(defun font-menu-load-font (family weight size slant resolution) +(defun x-font-menu-load-font (family weight size slant resolution) "Try to load a font with the requested properties. The weight, slant and resolution are only hints." (when (integerp size) (setq size (int-to-string size))) @@ -627,18 +237,10 @@ The weight, slant and resolution are only hints." (make-font-instance (concat "-*-" family "-" weight "-" slant "-*-*-*-" size "-" resolution "-*-*-" - font-menu-registry-encoding) + x-font-menu-registry-encoding) nil t)) (throw 'got-font font)))))))) -(defun flush-device-fonts-cache (device) - ;; by Stig@hackvan.com - (let ((elt (assq device device-fonts-cache))) - (and elt - (setq device-fonts-cache (delq elt device-fonts-cache))))) - -(add-hook 'delete-device-hook 'flush-device-fonts-cache) - (provide 'x-font-menu) ;;; x-font-menu.el ends here diff --git a/lisp/x-mouse.el b/lisp/x-mouse.el index f5c06aa..8d29570 100644 --- a/lisp/x-mouse.el +++ b/lisp/x-mouse.el @@ -36,6 +36,8 @@ ;;(define-key global-map '(shift button2) 'x-mouse-kill) (define-key global-map '(control button2) 'x-set-point-and-move-selection) +(define-obsolete-function-alias 'x-insert-selection 'insert-selection) + (defun x-mouse-kill (event) "Kill the text between the point and mouse and copy it to the clipboard and to the cut buffer" @@ -43,51 +45,10 @@ to the cut buffer" (let ((old-point (point))) (mouse-set-point event) (let ((s (buffer-substring old-point (point)))) - (x-own-clipboard s) + (own-clipboard s) (x-store-cutbuffer s)) (kill-region old-point (point)))) -(defun x-yank-function () - "Insert the current X selection or, if there is none, insert the X cutbuffer. -A mark is pushed, so that the inserted text lies between point and mark." - (push-mark) - (if (region-active-p) - (if (consp zmacs-region-extent) - ;; pirated code from insert-rectangle in rect.el - ;; perhaps that code should be modified to handle a list of extents - ;; as the rectangle to be inserted? - (let ((lines zmacs-region-extent) - (insertcolumn (current-column)) - (first t)) - (push-mark) - (while lines - (or first - (progn - (forward-line 1) - (or (bolp) (insert ?\n)) - (move-to-column insertcolumn t))) - (setq first nil) - (insert (extent-string (car lines))) - (setq lines (cdr lines)))) - (insert (extent-string zmacs-region-extent))) - (x-insert-selection t))) - -(defun x-insert-selection (&optional check-cutbuffer-p move-point-event) - "Insert the current selection into buffer at point." - (interactive "P") - (let ((text (if check-cutbuffer-p - (or (condition-case () (x-get-selection) (error ())) - (x-get-cutbuffer) - (error "No selection or cut buffer available")) - (x-get-selection)))) - (cond (move-point-event - (mouse-set-point move-point-event) - (push-mark (point))) - ((interactive-p) - (push-mark (point)))) - (insert text) - )) - (make-obsolete 'x-set-point-and-insert-selection 'mouse-yank) (defun x-set-point-and-insert-selection (event) "Set point where clicked and insert the primary selection or the cut buffer." @@ -102,9 +63,9 @@ A mark is pushed, so that the inserted text lies between point and mark." ;; to fail; just let the appropriate error message get issued. (We need ;; to insert the selection and set point first, or the selection may ;; get inserted at the wrong place.) - (and (x-selection-owner-p) + (and (selection-owner-p) primary-selection-extent - (x-insert-selection t event)) + (insert-selection t event)) (kill-primary-selection)) (defun mouse-track-and-copy-to-cutbuffer (event) diff --git a/lisp/x-select.el b/lisp/x-select.el index 7c2f070..99a7299 100644 --- a/lisp/x-select.el +++ b/lisp/x-select.el @@ -35,95 +35,29 @@ ;;; Code: -(defvar x-selected-text-type - (if (featurep 'mule) '(COMPOUND_TEXT STRING) 'STRING) - "The type atom used to obtain selections from the X server. -Can be either a valid X selection data type, or a list of such types. -COMPOUND_TEXT and STRING are the most commonly used data types. -If a list is provided, the types are tried in sequence until -there is a successful conversion.") - -(defun x-get-selection (&optional type data-type) - "Return the value of an X Windows selection. -The argument TYPE (default `PRIMARY') says which selection, -and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule) -says how to convert the data." - (or type (setq type 'PRIMARY)) - (or data-type (setq data-type x-selected-text-type)) - (let ((text - (if (consp data-type) - (condition-case err - (x-get-selection-internal type (car data-type)) - (selection-conversion-error - (if (cdr data-type) - (x-get-selection type (cdr data-type)) - (signal (car err) (cdr err))))) - (x-get-selection-internal type data-type)))) - (when (and (consp text) (symbolp (car text))) - (setq text (cdr text))) - (when (not (stringp text)) - (error "Selection is not a string: %S" text)) - text)) +(define-obsolete-function-alias 'x-selection-exists-p 'selection-exists-p) +(define-obsolete-function-alias 'x-selection-owner-p 'selection-owner-p) +(define-obsolete-variable-alias 'x-selection-converter-alist 'selection-converter-alist) +(define-obsolete-variable-alias 'x-lost-selection-hooks 'lost-selection-hooks) +(define-obsolete-variable-alias 'x-selected-text-type 'selected-text-type) +(define-obsolete-function-alias 'x-valid-simple-selection-p 'valid-simple-selection-p) +(define-obsolete-function-alias 'x-own-selection 'own-selection) +(define-obsolete-function-alias 'x-disown-selection 'disown-selection) +(define-obsolete-function-alias 'x-delete-primary-selection 'delete-primary-selection) +(define-obsolete-function-alias 'x-copy-primary-selection 'copy-primary-selection) +(define-obsolete-function-alias 'x-kill-primary-selection 'kill-primary-selection) +(define-obsolete-function-alias 'x-select-make-extent-for-selection + 'select-make-extent-for-selection) +(define-obsolete-function-alias 'x-cut-copy-clear-internal 'cut-copy-clear-internal) +(define-obsolete-function-alias 'x-get-selection 'get-selection) (defun x-get-secondary-selection () "Return text selected from some X window." - (x-get-selection 'SECONDARY)) + (get-selection 'SECONDARY)) (defun x-get-clipboard () "Return text pasted to the clipboard." - (x-get-selection 'CLIPBOARD)) - -;; FSFmacs calls this `x-set-selection', and reverses the -;; arguments (duh ...). This order is more logical. -(defun x-own-selection (data &optional type) - "Make an X Windows selection of type TYPE and value DATA. -The argument TYPE (default `PRIMARY') says which selection, -and DATA specifies the contents. DATA may be a string, -a symbol, an integer (or a cons of two integers or list of two integers). - -The selection may also be a cons of two markers pointing to the same buffer, -or an overlay. In these cases, the selection is considered to be the text -between the markers *at whatever time the selection is examined*. -Thus, editing done in the buffer after you specify the selection -can alter the effective value of the selection. - -The data may also be a vector of valid non-vector selection values. - -Interactively, the text of the region is used as the selection value." - (interactive (if (not current-prefix-arg) - (list (read-string "Store text for pasting: ")) - (list (substring (region-beginning) (region-end))))) - ;FSFmacs huh?? It says: - ;; "This is for temporary compatibility with pre-release Emacs 19." - ;(if (stringp type) - ; (setq type (intern type))) - (or (x-valid-simple-selection-p data) - (and (vectorp data) - (let ((valid t) - (i (1- (length data)))) - (while (>= i 0) - (or (x-valid-simple-selection-p (aref data i)) - (setq valid nil)) - (setq i (1- i))) - valid)) - (signal 'error (list "invalid selection" data))) - (or type (setq type 'PRIMARY)) - (if data - (x-own-selection-internal type data) - (x-disown-selection-internal type)) - (cond ((eq type 'PRIMARY) - (setq primary-selection-extent - (select-make-extent-for-selection - data primary-selection-extent))) - ((eq type 'SECONDARY) - (setq secondary-selection-extent - (select-make-extent-for-selection - data secondary-selection-extent)))) - (setq zmacs-region-stays t) - data) - -(defun x-valid-simple-selection-p (data) - (valid-simple-selection-p data)) + (get-selection 'CLIPBOARD)) (defun x-own-secondary-selection (selection &optional type) "Make a secondary X Selection of the given argument. The argument may be a @@ -136,38 +70,6 @@ be the text between those markers)." (copy-marker (mark-marker)))))) (x-own-selection selection 'SECONDARY)) - -(defun x-own-clipboard (string) - "Paste the given string to the X Clipboard." - (x-own-selection string 'CLIPBOARD)) - - -(defun x-disown-selection (&optional secondary-p) - "Assuming we own the selection, disown it. With an argument, discard the -secondary selection instead of the primary selection." - (x-disown-selection-internal (if secondary-p 'SECONDARY 'PRIMARY))) - -(defun x-dehilight-selection (selection) - "for use as a value of `x-lost-selection-hooks'." - (cond ((eq selection 'PRIMARY) - (if primary-selection-extent - (let ((inhibit-quit t)) - (if (consp primary-selection-extent) - (mapcar 'delete-extent primary-selection-extent) - (delete-extent primary-selection-extent)) - (setq primary-selection-extent nil))) - (if zmacs-regions (zmacs-deactivate-region))) - ((eq selection 'SECONDARY) - (if secondary-selection-extent - (let ((inhibit-quit t)) - (if (consp secondary-selection-extent) - (mapcar 'delete-extent secondary-selection-extent) - (delete-extent secondary-selection-extent)) - (setq secondary-selection-extent nil))))) - nil) - -(setq x-lost-selection-hooks 'x-dehilight-selection) - (defun x-notice-selection-requests (selection type successful) "for possible use as the value of x-sent-selection-hooks." (if (not successful) @@ -200,7 +102,7 @@ secondary selection instead of the primary selection." (defun xselect-kill-buffer-hook-1 (selection) (let (value) (if (and (x-selection-owner-p selection) - (setq value (x-get-selection-internal selection '_EMACS_INTERNAL)) + (setq value (get-selection-internal selection '_EMACS_INTERNAL)) ;; The _EMACS_INTERNAL selection type has a converter registered ;; for it that does no translation. This only works if emacs is ;; requesting the selection from itself. We could have done this @@ -262,240 +164,6 @@ into Emacs." (push-mark) (insert clip))) -;;; Functions to convert the selection into various other selection types. -;;; Every selection type that emacs handles is implemented this way, except -;;; for TIMESTAMP, which is a special case. - -(defun xselect-convert-to-text (selection type value) - (cond ((stringp value) - value) - ((extentp value) - (save-excursion - (set-buffer (extent-object value)) - (save-restriction - (widen) - (buffer-substring (extent-start-position value) - (extent-end-position value))))) - ((and (consp value) - (markerp (car value)) - (markerp (cdr value))) - (or (eq (marker-buffer (car value)) (marker-buffer (cdr value))) - (signal 'error - (list "markers must be in the same buffer" - (car value) (cdr value)))) - (save-excursion - (set-buffer (or (marker-buffer (car value)) - (error "selection is in a killed buffer"))) - (save-restriction - (widen) - (buffer-substring (car value) (cdr value))))) - (t nil))) - -(defun xselect-convert-to-string (selection type value) - (let ((outval (xselect-convert-to-text selection type value))) - ;; force the string to be not in Compound Text format. - (if (stringp outval) - (cons 'STRING outval) - outval))) - -(defun xselect-convert-to-compound-text (selection type value) - ;; converts to compound text automatically - (xselect-convert-to-text selection type value)) - -(defun xselect-convert-to-length (selection type value) - (let ((value - (cond ((stringp value) - (length value)) - ((extentp value) - (extent-length value)) - ((and (consp value) - (markerp (car value)) - (markerp (cdr value))) - (or (eq (marker-buffer (car value)) - (marker-buffer (cdr value))) - (signal 'error - (list "markers must be in the same buffer" - (car value) (cdr value)))) - (abs (- (car value) (cdr value))))))) - (if value ; force it to be in 32-bit format. - (cons (ash value -16) (logand value 65535)) - nil))) - -(defun xselect-convert-to-targets (selection type value) - ;; return a vector of atoms, but remove duplicates first. - (let* ((all (cons 'TIMESTAMP (mapcar 'car selection-converter-alist))) - (rest all)) - (while rest - (cond ((memq (car rest) (cdr rest)) - (setcdr rest (delq (car rest) (cdr rest)))) - ((eq (car (cdr rest)) '_EMACS_INTERNAL) ; shh, it's a secret - (setcdr rest (cdr (cdr rest)))) - (t - (setq rest (cdr rest))))) - (apply 'vector all))) - -(defun xselect-convert-to-delete (selection type value) - (x-disown-selection-internal selection) - ;; A return value of nil means that we do not know how to do this conversion, - ;; and replies with an "error". A return value of NULL means that we have - ;; done the conversion (and any side-effects) but have no value to return. - 'NULL) - -(defun xselect-convert-to-filename (selection type value) - (cond ((extentp value) - (buffer-file-name (or (extent-object value) - (error "selection is in a killed buffer")))) - ((and (consp value) - (markerp (car value)) - (markerp (cdr value))) - (buffer-file-name (or (marker-buffer (car value)) - (error "selection is in a killed buffer")))) - (t nil))) - -(defun xselect-convert-to-charpos (selection type value) - (let (a b tmp) - (cond ((cond ((extentp value) - (setq a (extent-start-position value) - b (extent-end-position value))) - ((and (consp value) - (markerp (car value)) - (markerp (cdr value))) - (setq a (car value) - b (cdr value)))) - (setq a (1- a) b (1- b)) ; zero-based - (if (< b a) (setq tmp a a b b tmp)) - (cons 'SPAN - (vector (cons (ash a -16) (logand a 65535)) - (cons (ash b -16) (logand b 65535)))))))) - -(defun xselect-convert-to-lineno (selection type value) - (let (a b buf tmp) - (cond ((cond ((extentp value) - (setq buf (extent-object value) - a (extent-start-position value) - b (extent-end-position value))) - ((and (consp value) - (markerp (car value)) - (markerp (cdr value))) - (setq a (marker-position (car value)) - b (marker-position (cdr value)) - buf (marker-buffer (car value))))) - (save-excursion - (set-buffer buf) - (save-restriction - (widen) - (goto-char a) - (beginning-of-line) - (setq a (1+ (count-lines 1 (point)))) - (goto-char b) - (beginning-of-line) - (setq b (1+ (count-lines 1 (point)))))) - (if (< b a) (setq tmp a a b b tmp)) - (cons 'SPAN - (vector (cons (ash a -16) (logand a 65535)) - (cons (ash b -16) (logand b 65535)))))))) - -(defun xselect-convert-to-colno (selection type value) - (let (a b buf tmp) - (cond ((cond ((extentp value) - (setq buf (extent-object value) - a (extent-start-position value) - b (extent-end-position value))) - ((and (consp value) - (markerp (car value)) - (markerp (cdr value))) - (setq a (car value) - b (cdr value) - buf (marker-buffer a)))) - (save-excursion - (set-buffer buf) - (goto-char a) - (setq a (current-column)) - (goto-char b) - (setq b (current-column))) - (if (< b a) (setq tmp a a b b tmp)) - (cons 'SPAN - (vector (cons (ash a -16) (logand a 65535)) - (cons (ash b -16) (logand b 65535)))))))) - -(defun xselect-convert-to-sourceloc (selection type value) - (let (a b buf file-name tmp) - (cond ((cond ((extentp value) - (setq buf (or (extent-object value) - (error "selection is in a killed buffer")) - a (extent-start-position value) - b (extent-end-position value) - file-name (buffer-file-name buf))) - ((and (consp value) - (markerp (car value)) - (markerp (cdr value))) - (setq a (marker-position (car value)) - b (marker-position (cdr value)) - buf (or (marker-buffer (car value)) - (error "selection is in a killed buffer")) - file-name (buffer-file-name buf)))) - (save-excursion - (set-buffer buf) - (save-restriction - (widen) - (goto-char a) - (beginning-of-line) - (setq a (1+ (count-lines 1 (point)))) - (goto-char b) - (beginning-of-line) - (setq b (1+ (count-lines 1 (point)))))) - (if (< b a) (setq tmp a a b b tmp)) - (format "%s:%d" file-name a))))) - -(defun xselect-convert-to-os (selection type size) - (symbol-name system-type)) - -(defun xselect-convert-to-host (selection type size) - (system-name)) - -(defun xselect-convert-to-user (selection type size) - (user-full-name)) - -(defun xselect-convert-to-class (selection type size) - x-emacs-application-class) - -;; We do not try to determine the name Emacs was invoked with, -;; because it is not clean for a program's behavior to depend on that. -(defun xselect-convert-to-name (selection type size) - ;invocation-name - "xemacs") - -(defun xselect-convert-to-integer (selection type value) - (and (integerp value) - (cons (ash value -16) (logand value 65535)))) - -(defun xselect-convert-to-atom (selection type value) - (and (symbolp value) value)) - -(defun xselect-convert-to-identity (selection type value) ; used internally - (vector value)) - -(setq selection-converter-alist - '((TEXT . xselect-convert-to-text) - (STRING . xselect-convert-to-string) - (COMPOUND_TEXT . xselect-convert-to-compound-text) - (TARGETS . xselect-convert-to-targets) - (LENGTH . xselect-convert-to-length) - (DELETE . xselect-convert-to-delete) - (FILE_NAME . xselect-convert-to-filename) - (CHARACTER_POSITION . xselect-convert-to-charpos) - (SOURCE_LOC . xselect-convert-to-sourceloc) - (LINE_NUMBER . xselect-convert-to-lineno) - (COLUMN_NUMBER . xselect-convert-to-colno) - (OWNER_OS . xselect-convert-to-os) - (HOST_NAME . xselect-convert-to-host) - (USER . xselect-convert-to-user) - (CLASS . xselect-convert-to-class) - (NAME . xselect-convert-to-name) - (ATOM . xselect-convert-to-atom) - (INTEGER . xselect-convert-to-integer) - (_EMACS_INTERNAL . xselect-convert-to-identity) - )) ;FSFmacs (provide 'select) diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 3e8da0b..2f92e38 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,8 @@ +1999-05-17 Jerry James <jerry@cs.ucsb.edu> + + * xlwmenu.c (make_shadow_gcs): Test bottom_shadow_pixmap before + using it. + 1999-05-14 XEmacs Build Bot <builds@cvs.xemacs.org> * XEmacs 21.2.14 is released diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 94ebf84..4b01283 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -2825,8 +2825,8 @@ make_shadow_gcs (XlwMenuWidget mw) xgcv.foreground = mw->menu.bottom_shadow_color; /* xgcv.stipple = mw->menu.bottom_shadow_pixmap; gtb */ #ifdef NEED_MOTIF - if (mw->menu.top_shadow_pixmap && - mw->menu.top_shadow_pixmap != XmUNSPECIFIED_PIXMAP) + if (mw->menu.bottom_shadow_pixmap && + mw->menu.bottom_shadow_pixmap != XmUNSPECIFIED_PIXMAP) xgcv.stipple = mw->menu.bottom_shadow_pixmap; else xgcv.stipple = 0; diff --git a/man/ChangeLog b/man/ChangeLog index ec0ac13..024bba0 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,27 @@ +1999-05-30 Albert Chin-A-Young <china@thewrittenword.com> + + * custom.texi, external-widget.texi: Minor + fix to get info DIR entry correct. + +1999-05-22 Vin Shelton <acs@xemacs.org> + + * xemacs/cmdargs.texi: + Document -private. + +1999-05-16 Mike McEwan <mike@lotusland.demon.co.uk> + + * Makefile: Added `emodules.info' to info targets. + +1999-05-20 Karl M. Hegbloom <karlheg@debian.org> + + * internals/internals.texi (The XEmacs Object System + (Abstractly Speaking)): typo. + +1999-05-16 Hrvoje Niksic <hniksic@srce.hr> + + * lispref/text.texi (Substitution): Document improvements in + `translate-region'. + 1999-05-14 XEmacs Build Bot <builds@cvs.xemacs.org> * XEmacs 21.2.14 is released diff --git a/man/Makefile b/man/Makefile index 7c013c5..7ede490 100644 --- a/man/Makefile +++ b/man/Makefile @@ -43,6 +43,7 @@ INFODIR = ../info info_files = \ $(INFODIR)/cl.info \ $(INFODIR)/custom.info \ + $(INFODIR)/emodules.info \ $(INFODIR)/external-widget.info \ $(INFODIR)/info.info \ $(INFODIR)/standards.info \ @@ -55,6 +56,7 @@ info_files = \ dvi_files = \ cl.dvi \ custom.dvi \ + emodules.dvi \ external-widget.dvi \ info.dvi \ standards.dvi \ @@ -70,6 +72,9 @@ dvi_files = \ ../info/custom.info : custom.texi -$(MAKEINFO) custom.texi -o ../info/custom.info +../info/emodules.info : emodules.texi + -$(MAKEINFO) emodules.texi -o ../info/emodules.info + ../info/external-widget.info : external-widget.texi -$(MAKEINFO) external-widget.texi -o ../info/external-widget.info diff --git a/man/custom.texi b/man/custom.texi index 7a92b74..6f468a3 100644 --- a/man/custom.texi +++ b/man/custom.texi @@ -13,7 +13,6 @@ @dircategory XEmacs Editor @direntry * Customizations: (custom). Customization Library. -package. @end direntry @end ifinfo diff --git a/man/external-widget.texi b/man/external-widget.texi index 9de5af0..209b498 100644 --- a/man/external-widget.texi +++ b/man/external-widget.texi @@ -5,7 +5,6 @@ @dircategory XEmacs Editor @direntry * External Widget: (external-widget) External Client Widget. -package. @end direntry @end ifinfo diff --git a/man/info-stnd.texi b/man/info-stnd.texi index d20bab7..abb7ff8 100644 --- a/man/info-stnd.texi +++ b/man/info-stnd.texi @@ -9,7 +9,7 @@ @synindex fn cp @synindex ky cp @comment %**end of header -@comment $Id: info-stnd.texi,v 1.3 1997/07/06 21:49:30 karl Exp $ +@comment $Id: info-stnd.texi,v 1.3 1998/06/30 06:35:28 steve Exp $ @dircategory Texinfo documentation system @direntry diff --git a/man/info.texi b/man/info.texi index d2fda6f..1b6c0da 100644 --- a/man/info.texi +++ b/man/info.texi @@ -3,7 +3,7 @@ @setfilename ../info/info.info @settitle Info 1.0 @comment %**end of header -@comment $Id: info.texi,v 1.4 1997/07/10 21:58:11 karl Exp $ +@comment $Id: info.texi,v 1.4 1998/06/30 06:35:28 steve Exp $ @dircategory Texinfo documentation system @direntry diff --git a/man/internals/internals.texi b/man/internals/internals.texi index c5d8399..2366573 100644 --- a/man/internals/internals.texi +++ b/man/internals/internals.texi @@ -1462,7 +1462,7 @@ converts to an integer whose value is 17297. 1.983e-4 @end example -converts to a float whose value is 1983.23e-4, or .0001983. +converts to a float whose value is 1.983e-4, or .0001983. @example ?b diff --git a/man/lispref/text.texi b/man/lispref/text.texi index f66bf59..1f743a5 100644 --- a/man/lispref/text.texi +++ b/man/lispref/text.texi @@ -2464,18 +2464,59 @@ ThXs Xs the contents of the buffer before. @defun translate-region start end table This function applies a translation table to the characters in the -buffer between positions @var{start} and @var{end}. +buffer between positions @var{start} and @var{end}. The translation +table @var{table} can be either a string, a vector, or a char-table. -The translation table @var{table} is a string; @code{(aref @var{table} -@var{ochar})} gives the translated character corresponding to -@var{ochar}. If the length of @var{table} is less than 256, any -characters with codes larger than the length of @var{table} are not -altered by the translation. +If @var{table} is a string, its @var{n}th element is the mapping for the +character with code @var{n}. + +If @var{table} is a vector, its @var{n}th element is the mapping for +character with code @var{n}. Legal mappings are characters, strings, or +@code{nil} (meaning don't replace.) + +If @var{table} is a char-table, its elements describe the mapping +between characters and their replacements. The char-table should be of +type @code{char} or @code{generic}. + +When the @var{table} is a string or vector and its length is less than +the total number of characters (256 without Mule), any characters with +codes larger than the length of @var{table} are not altered by the +translation. The return value of @code{translate-region} is the number of characters that were actually changed by the translation. This does not count characters that were mapped into themselves in the translation table. + +@strong{NOTE}: Prior to XEmacs 21.2, the @var{table} argument was +allowed only to be a string. This is still the case in FSF Emacs. + +The following example creates a char-table that is passed to +@code{translate-region}, which translates character @samp{a} to +@samp{the letter a}, removes character @samp{b}, and translates +character @samp{c} to newline. + +@example +@group +---------- Buffer: foo ---------- +Here is a sentence in the buffer. +---------- Buffer: foo ---------- +@end group + +@group +(let ((table (make-char-table 'generic))) + (put-char-table ?a "the letter a" table) + (put-char-table ?b "" table) + (put-char-table ?c ?\n table) + (translate-region (point-min) (point-max) table)) + @result{} 3 + +---------- Buffer: foo ---------- +Here is the letter a senten +e in the uffer. +---------- Buffer: foo ---------- +@end group +@end example @end defun @node Registers diff --git a/man/texinfo.tex b/man/texinfo.tex index 3ce4715..6057ffa 100644 --- a/man/texinfo.tex +++ b/man/texinfo.tex @@ -1,5 +1,5 @@ % texinfo.tex -- TeX macros to handle Texinfo files. -% $Id: texinfo.tex,v 2.227 1998/02/25 22:54:34 karl Exp $ +% $Id: texinfo.tex,v 1.5 1998/06/13 04:28:12 steve Exp $ % % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98 % Free Software Foundation, Inc. @@ -44,7 +44,7 @@ % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} -\deftexinfoversion$Revision: 2.227 $ +\deftexinfoversion$Revision: 1.5 $ \message{Loading texinfo package [Version \texinfoversion]:} % If in a .fmt file, print the version number diff --git a/man/texinfo.texi b/man/texinfo.texi index 0bc09a7..e5cd94d 100644 --- a/man/texinfo.texi +++ b/man/texinfo.texi @@ -1,5 +1,5 @@ \input texinfo.tex @c -*-texinfo-*- -@c $Id: texinfo.txi,v 1.50 1998/02/27 21:21:34 karl Exp $ +@c $Id: texinfo.texi,v 1.8.2.1 1999/03/04 15:48:24 steveb Exp $ @c %**start of header @c All text is ignored before the setfilename. diff --git a/man/xemacs-faq.texi b/man/xemacs-faq.texi index 76641d8..666e99b 100644 --- a/man/xemacs-faq.texi +++ b/man/xemacs-faq.texi @@ -7,7 +7,7 @@ @finalout @titlepage @title XEmacs FAQ -@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 1999/03/04 15:48:25 $ +@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 1999/05/13 12:26:40 $ @sp 1 @author Tony Rossini <arossini@@stat.sc.edu> @author Ben Wing <wing@@666.com> diff --git a/man/xemacs/cmdargs.texi b/man/xemacs/cmdargs.texi index a41ee2b..c81812c 100644 --- a/man/xemacs/cmdargs.texi +++ b/man/xemacs/cmdargs.texi @@ -224,6 +224,9 @@ Use @var{color} as the mouse color. @item -cr @var{color} Use @var{color} as the text-cursor foreground color. + +@item -private +Install a private colormap for XEmacs. @end table In addition, XEmacs allows you to use a number of standard Xt diff --git a/nt/ChangeLog b/nt/ChangeLog index 6fa286b..85f7d7e 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +1999-05-31 Andy Piper <andy@xemacs.org> + + * xemacs.mak: add select & select-x targets. + 1999-05-14 XEmacs Build Bot <builds@cvs.xemacs.org> * XEmacs 21.2.14 is released diff --git a/nt/xemacs.mak b/nt/xemacs.mak index 438223e..9cff2b0 100644 --- a/nt/xemacs.mak +++ b/nt/xemacs.mak @@ -582,6 +582,7 @@ DOC_SRC4=\ $(XEMACS)\src\regex.c \ $(XEMACS)\src\scrollbar.c \ $(XEMACS)\src\search.c \ + $(XEMACS)\src\select.c \ $(XEMACS)\src\signal.c \ $(XEMACS)\src\sound.c DOC_SRC5=\ @@ -620,7 +621,7 @@ DOC_SRC6=\ $(XEMACS)\src\balloon-x.c \ $(XEMACS)\src\xgccache.c \ $(XEMACS)\src\xmu.c \ - $(XEMACS)\src\xselect.c + $(XEMACS)\src\select-x.c !endif !if $(HAVE_MSW) @@ -709,7 +710,7 @@ TEMACS_X_OBJS=\ $(OUTDIR)\scrollbar-x.obj \ $(OUTDIR)\xgccache.obj \ $(OUTDIR)\xmu.obj \ - $(OUTDIR)\xselect.obj + $(OUTDIR)\select-x.obj !endif !if $(HAVE_MSW) @@ -829,6 +830,7 @@ TEMACS_OBJS= \ $(OUTDIR)\regex.obj \ $(OUTDIR)\scrollbar.obj \ $(OUTDIR)\search.obj \ + $(OUTDIR)\select.obj \ $(OUTDIR)\signal.obj \ $(OUTDIR)\sound.obj \ $(OUTDIR)\specifier.obj \ diff --git a/src/ChangeLog b/src/ChangeLog index e698e56..a34ec8f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -21,6 +21,151 @@ japanese-jisx0208-1978 should not match with "jisx0208.1983" nor "jisc6226.1983". +1999-06-03 SL Baur <steve@xemacs.org> + + * config.h.in: + * emacs.c: Implement x.y.z version numbers + From Jan Vroonhof <vroonhof@math.ethz.ch> + +1999-05-20 MORIOKA Tomohiko <tomo@etl.go.jp> + + * mule-charset.c (complex_vars_of_mule_charset): Registry of + japanese-jisx0208-1978 should not match with "jisx0208.1983" nor + "jisc6226.1983". + +1999-06-03 SL Baur <steve@xemacs.org> + + * frame-x.c: + * device-x.c: rename session option to wmcommand. + From Oliver Graf <ograf@rhein-zeitung.de> + +1999-05-27 Hrvoje Niksic <hniksic@srce.hr> + + * fns.c (Fsubstring): Don't traverse the same region twice with + charcount_to_bytecount(). + +1999-06-03 SL Baur <steve@steve1.m17n.org> + + * m/alpha.h (SYSTEM_MALLOC): Fix indented preprocessor directive + garbage. + + * s/decosf4-0.h: Defining ORDINARY_LINK here is redundant (and it + doesn't really work as is implied by the commentary). + Don't define SYSTEM_MALLOC so the old GNU malloc can be used. + +1999-06-02 SL Baur <steve@steve1.m17n.org> + + * symsinit.h: Declare vars_of_ntproc. + * emacs.c (main_1): Call it. + + * ntproc.c (syms_of_ntproc): Move variable initializations from + here ... + (vars_of_ntproc): ... to here [new function]. + + * file-coding.c (syms_of_file_coding): Rename. + (vars_of_file_coding): Ditto. + (complex_vars_of_file_coding): Ditto. + + * symsinit.h: Rename *_mule_coding to *_file_coding. + + * emacs.c (main_1): Call them by the proper name. + + * device-msw.c (syms_of_device_mswindows): Move variable + initializations from here ... + (vars_of_device_mswindows): ... to here. + + * chartab.c (vars_of_chartab): New function. + + * symsinit.h: New function, vars_of_chartab. + + * emacs.c (main_1): Call it. + + * mule-canna.c (syms_of_mule_canna): Move CANNA initialization ... + (vars_of_mule_canna): ... to here. + + * mule-ccl.c (vars_of_mule_ccl): New function. Move variable + initializations out of syms_of_mule_ccl. + + * symsinit.h: Declare new function vars_of_mule_ccl. + + * emacs.c (main_1): Call it. + +1999-05-27 Hrvoje Niksic <hniksic@srce.hr> + + * fns.c (base64_decode_1): Ignore whitespace. + +1999-05-27 Hrvoje Niksic <hniksic@srce.hr> + + * mule-charset.c (Fmake_char): Strip the eighth bit off ARG1 and + ARG2. + +1999-05-21 Andy Piper <andy@xemacs.org> + + * xselect.c: deleted. + + * symsinit.h: declare select initialisation. + + * select.h: new file. declare commonly used select functions and + variables. + + * select.c: new file. generalised from xselect.c. + (clean_local_selection_data): moved from xselect.c. + (get_local_selection): ditto. device specific pieces called via a + devmeth. + (handle_selection_clear): ditto. + (Fown_selection_internal): renamed and generalised from + Fx_own_selection_internal. moved from xselect.c. + (Fdisown_selection_internal): ditto. + (Fselection_owner_p): ditto. + (Fselection_exists_p): ditto. + (Fget_selection_internal): ditto. + (syms_of_select): new function. QXXXX values moved from xselect.c + (vars_of_select): new function. selection_converter_alist, + lost_selection_hooks moved and renamed from xselect.c + + * select-x.c: renamed from xselect.c. + (x_own_selection): converted to device specific. non-X-specific + bits moved to select.c. + (x_get_foreign_selection): ditto. + (x_disown_selection): ditto. + (x_selection_exists_p): ditto. + (console_type_create_select_x): new function. + + * select-msw.c (mswindows_own_selection): new device method to set + the clipboard when we 'own' the selection. + (mswindows_get_foreign_selection): new device method to get the + clipboard. + (mswindows_disown_selection): new device method to delete the + selection when we 'disown' it. + (console_type_create_select_mswindows): new function. + + * emacs.c (main_1): add select to things to initialise. + + * console.h (struct console_methods): new console methods for + selection. + + * Makefile.in.in (x_objs): xselect.c renamed to select-x.c + +1999-05-20 Hrvoje Niksic <hniksic@srce.hr> + + * print.c (long_to_string): Install a faster version. + +1999-05-16 Andy Piper <andy@xemacs.org> + + * ntproc.c (syms_of_ntproc): default + win32-start-process-share-console to t. + +1999-05-14 Hrvoje Niksic <hniksic@srce.hr> + + * config.h.in: Do it here. + + * bytecode.c: Don't define ERROR_CHECK_TYPECHECK here. + +1999-05-14 Andy Piper <andy@xemacs.org> + + * toolbar-msw.c (mswindows_output_toolbar): hash on something + hashable. + 1999-05-14 XEmacs Build Bot <builds@cvs.xemacs.org> * XEmacs 21.2.14 is released diff --git a/src/Makefile.in.in b/src/Makefile.in.in index 47d726c..7c28cb1 100644 --- a/src/Makefile.in.in +++ b/src/Makefile.in.in @@ -117,7 +117,7 @@ $(lwlib_libs) : cd ../lwlib && $(RECURSIVE_MAKE) x_objs=balloon_help.o balloon-x.o console-x.o device-x.o event-Xt.o frame-x.o\ - glyphs-x.o objects-x.o redisplay-x.o xgccache.o xselect.o + glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o #ifdef AIX4 LIBI18N = -li18n @@ -181,7 +181,7 @@ objs=\ macros.o marker.o md5.o minibuf.o objects.o opaque.o\ print.o process.o profile.o\ rangetab.o redisplay.o redisplay-output.o regex.o\ - search.o $(sheap_obj) signal.o sound.o\ + search.o select.o $(sheap_obj) signal.o sound.o\ specifier.o strftime.o symbols.o syntax.o sysdep.o\ undo.o $(x_objs) widget.o window.o @@ -340,10 +340,21 @@ release: temacs ${libsrc}DOC $(mo_file) ${other_files} #endif /* ! defined (CANNOT_DUMP) */ ${PROGNAME}: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp +#ifdef HEAP_IN_DATA + @$(RM) $@ $@.exe && touch SATISFIED + -${dump_temacs} + @if test -f $@; then if test -f SATISFIED; then \ + echo "Testing for Lisp shadows ..."; \ + ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \ + $(RM) SATISFIED; exit 0; fi; \ + if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \ + $(RECURSIVE_MAKE) $@; +#else @$(RM) $@ -${dump_temacs} @echo "Testing for Lisp shadows ..." @./${PROGNAME} -batch -vanilla -f list-load-path-shadows +#endif fastdump: temacs @$(RM) ${PROGNAME} && touch SATISFIED diff --git a/src/alloc.c b/src/alloc.c index 7902603..15deca8 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -176,10 +176,6 @@ extern /* Non-zero means we're in the process of doing the dump */ int purify_flag; -#ifdef HEAP_IN_DATA -extern void sheap_adjust_h(); -#endif - #ifdef ERROR_CHECK_TYPECHECK Error_behavior ERROR_ME, ERROR_ME_NOT, ERROR_ME_WARN; diff --git a/src/bytecode.c b/src/bytecode.c index 09e4908..de2b646 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -226,12 +226,6 @@ static Lisp_Object execute_optimized_program (CONST Opbyte *program, extern Lisp_Object Qand_rest, Qand_optional; -/* Define ERROR_CHECK_BYTE_CODE to enable some minor sanity checking. - Useful for debugging the byte compiler. */ -#ifdef DEBUG_XEMACS -#define ERROR_CHECK_BYTE_CODE -#endif - /* Define BYTE_CODE_METER to enable generation of a byte-op usage histogram. This isn't defined in FSF Emacs and isn't defined in XEmacs v19. */ /* #define BYTE_CODE_METER */ diff --git a/src/chartab.c b/src/chartab.c index f5eddc9..a6292b4 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -1750,6 +1750,11 @@ syms_of_chartab (void) DEFSUBR (Fcategory_table_value_p); #endif /* MULE */ +} + +void +vars_of_chartab (void) +{ /* DO NOT staticpro this. It works just like Vweak_hash_tables. */ Vall_syntax_tables = Qnil; } diff --git a/src/config.h.in b/src/config.h.in index b4145ec..af07583 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -61,6 +61,7 @@ char *alloca(); /* The version info from version.sh. Used in #pragma ident in emacs.c */ #undef EMACS_MAJOR_VERSION #undef EMACS_MINOR_VERSION +#undef EMACS_PATCH_LEVEL #undef EMACS_BETA_VERSION #undef EMACS_VERSION #undef XEMACS_CODENAME @@ -399,6 +400,9 @@ char *alloca(); #undef ERROR_CHECK_GC /* Attempt to catch freeing of a non-malloc()ed block, heap corruption, etc. */ #undef ERROR_CHECK_MALLOC +/* Minor sanity checking of the bytecode interpreter. Useful for + debugging the byte compiler. */ +#undef ERROR_CHECK_BYTE_CODE /* Define DEBUG_XEMACS if you want extra debugging code compiled in. This is mainly intended for use by developers. */ @@ -453,8 +457,8 @@ char *alloca(); /* Compile in generic Drag'n'Drop API */ #undef HAVE_DRAGNDROP -/* Compile in support for proper session-management. */ -#undef HAVE_SESSION +/* Compile in support for proper handling of WM_COMMAND. */ +#undef HAVE_WMCOMMAND /* Define this if you want Mule support (multi-byte character support). There may be some performance penalty, although it should be small diff --git a/src/console.h b/src/console.h index 9bcc81c..d551141 100644 --- a/src/console.h +++ b/src/console.h @@ -90,6 +90,11 @@ struct console_methods void (*asynch_device_change_method) (void); Lisp_Object (*device_system_metrics_method) (struct device *, enum device_metrics); unsigned int (*device_implementation_flags_method) (void); + Lisp_Object (*own_selection_method)(Lisp_Object selection_name, Lisp_Object selection_value); + void (*disown_selection_method)(Lisp_Object selection_name, Lisp_Object timeval); + Lisp_Object (*get_foreign_selection_method) (Lisp_Object selection_symbol, + Lisp_Object target_type); + Lisp_Object (*selection_exists_p_method)(Lisp_Object selection_name); /* frame methods */ Lisp_Object *device_specific_frame_props; diff --git a/src/device-msw.c b/src/device-msw.c index 7aef4e8..49231f7 100644 --- a/src/device-msw.c +++ b/src/device-msw.c @@ -300,20 +300,6 @@ syms_of_device_mswindows (void) { defsymbol (&Qinit_pre_mswindows_win, "init-pre-mswindows-win"); defsymbol (&Qinit_post_mswindows_win, "init-post-mswindows-win"); - - DEFVAR_LISP ("mswindows-downcase-file-names", &Vmswindows_downcase_file_names /* -Non-nil means convert all-upper case file names to lower case. -This applies when performing completions and file name expansion. -*/ ); - Vmswindows_downcase_file_names = Qnil; - - DEFVAR_LISP ("mswindows-get-true-file-attributes", &Vmswindows_get_true_file_attributes /* -Non-nil means determine accurate link count in file-attributes. -This option slows down file-attributes noticeably, so is disabled by -default. Note that it is only useful for files on NTFS volumes, -where hard links are supported. -*/ ); - Vmswindows_get_true_file_attributes = Qnil; } void @@ -330,4 +316,17 @@ console_type_create_device_mswindows (void) void vars_of_device_mswindows (void) { + DEFVAR_LISP ("mswindows-downcase-file-names", &Vmswindows_downcase_file_names /* +Non-nil means convert all-upper case file names to lower case. +This applies when performing completions and file name expansion. +*/ ); + Vmswindows_downcase_file_names = Qnil; + + DEFVAR_LISP ("mswindows-get-true-file-attributes", &Vmswindows_get_true_file_attributes /* +Non-nil means determine accurate link count in file-attributes. +This option slows down file-attributes noticeably, so is disabled by +default. Note that it is only useful for files on NTFS volumes, +where hard links are supported. +*/ ); + Vmswindows_get_true_file_attributes = Qnil; } diff --git a/src/device-x.c b/src/device-x.c index b7531bd..9ea7f0b 100644 --- a/src/device-x.c +++ b/src/device-x.c @@ -696,7 +696,7 @@ x_init_device (struct device *d, Lisp_Object props) XtRealizeWidget (app_shell); } -#ifdef HAVE_SESSION +#ifdef HAVE_WMCOMMAND { int new_argc; char **new_argv; @@ -704,7 +704,7 @@ x_init_device (struct device *d, Lisp_Object props) XSetCommand (XtDisplay (app_shell), XtWindow (app_shell), new_argv, new_argc); free_argc_argv (new_argv); } -#endif /* HAVE_SESSION */ +#endif /* HAVE_WMCOMMAND */ #ifdef HAVE_OFFIX_DND diff --git a/src/emacs.c b/src/emacs.c index a41e580..c3fc9fc 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -73,6 +73,10 @@ Boston, MA 02111-1307, USA. */ /* For PATH_EXEC */ #include <paths.h> +#ifdef HEAP_IN_DATA +void report_sheap_usage (int die_if_pure_storage_exceeded); +#endif + #if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC extern void *(*__malloc_hook)(size_t); extern void *(*__realloc_hook)(void *, size_t); @@ -111,6 +115,7 @@ Lisp_Object Vsystem_configuration_options; /* Version numbers and strings */ Lisp_Object Vemacs_major_version; Lisp_Object Vemacs_minor_version; +Lisp_Object Vemacs_patch_level; Lisp_Object Vemacs_beta_version; Lisp_Object Vxemacs_codename; #ifdef INFODOCK @@ -970,6 +975,7 @@ main_1 (int argc, char **argv, char **envp, int restart) syms_of_rangetab (); syms_of_redisplay (); syms_of_search (); + syms_of_select (); syms_of_signal (); syms_of_sound (); syms_of_specifier (); @@ -1035,7 +1041,7 @@ main_1 (int argc, char **argv, char **envp, int restart) syms_of_mule_charset (); #endif #ifdef FILE_CODING - syms_of_mule_coding (); + syms_of_file_coding (); #endif #ifdef MULE #ifdef HAVE_WNN @@ -1107,6 +1113,7 @@ main_1 (int argc, char **argv, char **envp, int restart) console_type_create_device_x (); console_type_create_frame_x (); console_type_create_glyphs_x (); + console_type_create_select_x (); #ifdef HAVE_MENUBARS console_type_create_menubar_x (); #endif @@ -1130,6 +1137,7 @@ main_1 (int argc, char **argv, char **envp, int restart) console_type_create_objects_mswindows (); console_type_create_redisplay_mswindows (); console_type_create_glyphs_mswindows (); + console_type_create_select_mswindows (); # ifdef HAVE_SCROLLBARS console_type_create_scrollbar_mswindows (); # endif @@ -1209,7 +1217,7 @@ main_1 (int argc, char **argv, char **envp, int restart) lstream_type_create (); #ifdef FILE_CODING - lstream_type_create_mule_coding (); + lstream_type_create_file_coding (); #endif #if defined (HAVE_MS_WINDOWS) && !defined(HAVE_MSG_SELECT) lstream_type_create_mswindows_selectable (); @@ -1280,6 +1288,7 @@ main_1 (int argc, char **argv, char **envp, int restart) vars_of_bytecode (); vars_of_callint (); vars_of_callproc (); + vars_of_chartab (); vars_of_cmdloop (); vars_of_cmds (); vars_of_console (); @@ -1351,6 +1360,9 @@ main_1 (int argc, char **argv, char **envp, int restart) #ifdef HAVE_SHLIB vars_of_module (); #endif +#ifdef WINDOWSNT + vars_of_ntproc (); +#endif vars_of_objects (); vars_of_print (); @@ -1373,6 +1385,7 @@ main_1 (int argc, char **argv, char **envp, int restart) vars_of_scrollbar (); #endif vars_of_search (); + vars_of_select (); vars_of_sound (); vars_of_specifier (); vars_of_symbols (); @@ -1432,10 +1445,11 @@ main_1 (int argc, char **argv, char **envp, int restart) #ifdef MULE vars_of_mule (); + vars_of_mule_ccl (); vars_of_mule_charset (); #endif #ifdef FILE_CODING - vars_of_mule_coding (); + vars_of_file_coding (); #endif #ifdef MULE #ifdef HAVE_WNN @@ -1507,7 +1521,7 @@ main_1 (int argc, char **argv, char **envp, int restart) complex_vars_of_mule_charset (); #endif #if defined(FILE_CODING) - complex_vars_of_mule_coding (); + complex_vars_of_file_coding (); #endif /* This calls allocate_glyph(), which creates specifiers @@ -2037,6 +2051,9 @@ Do not call this. It will reinitialize your XEmacs. You'll be sorry. unbind_to (0, Qnil); /* this closes loadup.el */ purify_flag = 0; run_temacs_argc = nargs + 1; +#ifdef HEAP_IN_DATA + report_sheap_usage (0); +#endif LONGJMP (run_temacs_catch, 1); return Qnil; /* not reached; warning suppression */ } @@ -2445,6 +2462,10 @@ and announce itself normally when it is run. opurify = purify_flag; purify_flag = 0; +#ifdef HEAP_IN_DATA + report_sheap_usage (1); +#endif + fflush (stderr); fflush (stdout); @@ -2781,7 +2802,20 @@ Warning: this variable did not exist in Emacs versions earlier than: */ ); Vemacs_minor_version = make_int (EMACS_MINOR_VERSION); - DEFVAR_LISP ("emacs-beta-version", &Vemacs_beta_version /* + DEFVAR_LISP ("emacs-patch-level", &Vemacs_patch_level /* +The patch level of this version of Emacs, as an integer. +The value is non-nil if this version of XEmacs is part of a series of +stable XEmacsen, but has bug fixes applied. +Warning: this variable does not exist in FSF Emacs or in XEmacs versions +earlier than 21.1.1 +*/ ); +#ifdef EMACS_PATCH_LEVEL + Vemacs_patch_level = make_int (EMACS_PATCH_LEVEL); +#else + Vemacs_patch_level = Qnil; +#endif + + DEFVAR_LISP ("emacs-beta-version", &Vemacs_beta_version /* Beta number of this version of Emacs, as an integer. The value is nil if this is an officially released version of XEmacs. Warning: this variable does not exist in FSF Emacs or in XEmacs versions diff --git a/src/file-coding.c b/src/file-coding.c index 0b4f6c1..daae138 100644 --- a/src/file-coding.c +++ b/src/file-coding.c @@ -5403,7 +5403,7 @@ convert_from_external_format (CONST Extbyte *ptr, /************************************************************************/ void -syms_of_mule_coding (void) +syms_of_file_coding (void) { defsymbol (&Qbuffer_file_coding_system, "buffer-file-coding-system"); deferror (&Qcoding_system_error, "coding-system-error", @@ -5516,7 +5516,7 @@ syms_of_mule_coding (void) } void -lstream_type_create_mule_coding (void) +lstream_type_create_file_coding (void) { LSTREAM_HAS_METHOD (decoding, reader); LSTREAM_HAS_METHOD (decoding, writer); @@ -5536,7 +5536,7 @@ lstream_type_create_mule_coding (void) } void -vars_of_mule_coding (void) +vars_of_file_coding (void) { int i; @@ -5598,7 +5598,7 @@ Setting this to nil does not do anything. } void -complex_vars_of_mule_coding (void) +complex_vars_of_file_coding (void) { staticpro (&Vcoding_system_hash_table); Vcoding_system_hash_table = diff --git a/src/fns.c b/src/fns.c index e4fb1a1..ea6fcfe 100644 --- a/src/fns.c +++ b/src/fns.c @@ -881,7 +881,7 @@ Relevant parts of the string-extent-data are copied in the new string. (string, from, to)) { Charcount ccfr, ccto; - Bytecount bfr, bto; + Bytecount bfr, blen; Lisp_Object val; CHECK_STRING (string); @@ -889,10 +889,10 @@ Relevant parts of the string-extent-data are copied in the new string. get_string_range_char (string, from, to, &ccfr, &ccto, GB_HISTORICAL_STRING_BEHAVIOR); bfr = charcount_to_bytecount (XSTRING_DATA (string), ccfr); - bto = charcount_to_bytecount (XSTRING_DATA (string), ccto); - val = make_string (XSTRING_DATA (string) + bfr, bto - bfr); + blen = charcount_to_bytecount (XSTRING_DATA (string) + bfr, ccto - ccfr); + val = make_string (XSTRING_DATA (string) + bfr, blen); /* Copy any applicable extent information into the new string: */ - copy_string_extents (val, string, 0, bfr, bto - bfr); + copy_string_extents (val, string, 0, bfr, blen); return val; } @@ -3440,11 +3440,11 @@ static short base64_char_to_value[128] = base64 characters. */ #define ADVANCE_INPUT(c, stream) \ - (ec = Lstream_get_emchar (stream), \ - ec == -1 ? 0 : \ + ((ec = Lstream_get_emchar (stream)) == -1 ? 0 : \ ((ec > 255) ? \ - (error ("Non-ascii character detected in base64 input"), 0) \ - : (c = (Bufbyte)ec, 1))) + (signal_simple_error ("Non-ascii character in base64 input", \ + make_char (ec)), 0) \ + : (c = (Bufbyte)ec), 1)) static Bytind base64_encode_1 (Lstream *istream, Bufbyte *to, int line_break) @@ -3504,10 +3504,24 @@ base64_encode_1 (Lstream *istream, Bufbyte *to, int line_break) } #undef ADVANCE_INPUT +/* Semantically identical to ADVANCE_INPUT above, only no >255 + checking is needed for decoding -- checking is covered by IS_BASE64 + below. */ #define ADVANCE_INPUT(c, stream) \ (ec = Lstream_get_emchar (stream), \ ec == -1 ? 0 : (c = (Bufbyte)ec, 1)) +/* Get next character from the stream, but ignore it if it's + whitespace. ENDP is set to 1 if EOF is hit. */ +#define ADVANCE_INPUT_IGNORE_WHITESPACE(c, endp, stream) do { \ + endp = 0; \ + do { \ + if (!ADVANCE_INPUT (c, stream)) \ + endp = 1; \ + } while (!endp && (c == ' ' || c == '\t' || c == '\r' || c == '\n' \ + || c == '\f' || c == '\v')); \ +} while (0) + #define STORE_BYTE(pos, val) do { \ pos += set_charptr_emchar (pos, (Emchar)((unsigned char)(val))); \ ++*ccptr; \ @@ -3516,7 +3530,6 @@ base64_encode_1 (Lstream *istream, Bufbyte *to, int line_break) static Bytind base64_decode_1 (Lstream *istream, Bufbyte *to, Charcount *ccptr) { - Emchar ec; Bufbyte *e = to; unsigned long value; @@ -3524,33 +3537,21 @@ base64_decode_1 (Lstream *istream, Bufbyte *to, Charcount *ccptr) while (1) { Bufbyte c; + Emchar ec; + int endp; - if (!ADVANCE_INPUT (c, istream)) + ADVANCE_INPUT_IGNORE_WHITESPACE (c, endp, istream); + if (endp) break; - /* Accept wrapping lines. */ - if (c == '\r') - { - if (!ADVANCE_INPUT (c, istream) - || c != '\n') - return -1; - } - if (c == '\n') - { - if (!ADVANCE_INPUT (c, istream)) - break; - /* FSF checks for end of text here, but that's wrong. */ - /* FSF checks for correct line length here; that's also - wrong; some MIME encoders use different line lengths. */ - } - /* Process first byte of a quadruplet. */ if (!IS_BASE64 (c)) return -1; value = base64_char_to_value[c] << 18; /* Process second byte of a quadruplet. */ - if (!ADVANCE_INPUT (c, istream)) + ADVANCE_INPUT_IGNORE_WHITESPACE (c, endp, istream); + if (endp) return -1; if (!IS_BASE64 (c)) @@ -3560,12 +3561,14 @@ base64_decode_1 (Lstream *istream, Bufbyte *to, Charcount *ccptr) STORE_BYTE (e, value >> 16); /* Process third byte of a quadruplet. */ - if (!ADVANCE_INPUT (c, istream)) + ADVANCE_INPUT_IGNORE_WHITESPACE (c, endp, istream); + if (endp) return -1; if (c == '=') { - if (!ADVANCE_INPUT (c, istream)) + ADVANCE_INPUT_IGNORE_WHITESPACE (c, endp, istream); + if (endp) return -1; if (c != '=') return -1; @@ -3579,7 +3582,8 @@ base64_decode_1 (Lstream *istream, Bufbyte *to, Charcount *ccptr) STORE_BYTE (e, 0xff & value >> 8); /* Process fourth byte of a quadruplet. */ - if (!ADVANCE_INPUT (c, istream)) + ADVANCE_INPUT_IGNORE_WHITESPACE (c, endp, istream); + if (endp) return -1; if (c == '=') @@ -3595,7 +3599,8 @@ base64_decode_1 (Lstream *istream, Bufbyte *to, Charcount *ccptr) return e - to; } #undef ADVANCE_INPUT -#undef INPUT_EOF_P +#undef ADVANCE_INPUT_IGNORE_WHITESPACE +#undef STORE_BYTE static Lisp_Object free_malloced_ptr (Lisp_Object unwind_obj) diff --git a/src/frame-x.c b/src/frame-x.c index 40a75f7..2aa7d59 100644 --- a/src/frame-x.c +++ b/src/frame-x.c @@ -328,7 +328,7 @@ x_wm_store_class_hints (Widget shell, char *frame_name) XSetClassHint (dpy, XtWindow (shell), &classhint); } -#ifndef HAVE_SESSION +#ifndef HAVE_WMCOMMAND static void x_wm_maybe_store_wm_command (struct frame *f) { @@ -379,7 +379,7 @@ x_wm_maybe_move_wm_command (struct frame *f) } } -#endif /* !HAVE_SESSION */ +#endif /* !HAVE_WMCOMMAND */ static int x_frame_iconified_p (struct frame *f) @@ -2059,9 +2059,9 @@ x_popup_frame (struct frame *f) /* tell the window manager about us. */ x_wm_store_class_hints (shell_widget, XtName (frame_widget)); -#ifndef HAVE_SESSION +#ifndef HAVE_WMCOMMAND x_wm_maybe_store_wm_command (f); -#endif /* HAVE_SESSION */ +#endif /* HAVE_WMCOMMAND */ x_wm_hack_wm_protocols (shell_widget); } @@ -2625,10 +2625,10 @@ x_delete_frame (struct frame *f) { Display *dpy; -#ifndef HAVE_SESSION +#ifndef HAVE_WMCOMMAND if (FRAME_X_TOP_LEVEL_FRAME_P (f)) x_wm_maybe_move_wm_command (f); -#endif /* HAVE_SESSION */ +#endif /* HAVE_WMCOMMAND */ #ifdef HAVE_CDE DtDndDropUnregister (FRAME_X_TEXT_WIDGET (f)); diff --git a/src/m/alpha.h b/src/m/alpha.h index 8bc4a98..c209390 100644 --- a/src/m/alpha.h +++ b/src/m/alpha.h @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ #ifdef LINUX - # define SYSTEM_MALLOC +# define SYSTEM_MALLOC #endif #ifdef OSF1 diff --git a/src/mule-canna.c b/src/mule-canna.c index 931e93c..069c7b5 100644 --- a/src/mule-canna.c +++ b/src/mule-canna.c @@ -1022,9 +1022,6 @@ Lisp_Object VCANNA; /* by MORIOKA Tomohiko <morioka@jaist.ac.jp> void syms_of_mule_canna (void) { - DEFVAR_LISP ("CANNA", &VCANNA); /* hir@nec, 1992.5.21 */ - VCANNA = Qt; /* hir@nec, 1992.5.21 */ - DEFSUBR (Fcanna_key_proc); DEFSUBR (Fcanna_initialize); DEFSUBR (Fcanna_finalize); @@ -1048,6 +1045,9 @@ syms_of_mule_canna (void) void vars_of_mule_canna (void) { + DEFVAR_LISP ("CANNA", &VCANNA); /* hir@nec, 1992.5.21 */ + VCANNA = Qt; /* hir@nec, 1992.5.21 */ + DEFVAR_LISP ("canna-kakutei-string", &Vcanna_kakutei_string /* */ ); diff --git a/src/mule-ccl.c b/src/mule-ccl.c index dded758..70f26a6 100644 --- a/src/mule-ccl.c +++ b/src/mule-ccl.c @@ -1097,6 +1097,14 @@ Return index number of the registered CCL program. void syms_of_mule_ccl (void) { + DEFSUBR (Fccl_execute); + DEFSUBR (Fccl_execute_on_string); + DEFSUBR (Fregister_ccl_program); +} + +void +vars_of_mule_ccl (void) +{ staticpro (&Vccl_program_table); Vccl_program_table = Fmake_vector (make_int (32), Qnil); @@ -1113,10 +1121,6 @@ The code point in the font is set in CCL registers R1 and R2 If the font is single-byte font, the register R2 is not used. */ ); Vfont_ccl_encoder_alist = Qnil; - - DEFSUBR (Fccl_execute); - DEFSUBR (Fccl_execute_on_string); - DEFSUBR (Fregister_ccl_program); } #endif /* emacs */ diff --git a/src/mule-charset.c b/src/mule-charset.c index a941f9b..67f1049 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -1067,7 +1067,11 @@ Make a multi-byte character from CHARSET and octets ARG1 and ARG2. else /* CHARSET_CHARS (cs) == 96) */ lowlim = 32, highlim = 127; CHECK_INT (arg1); - a1 = XINT (arg1); + /* It is useful (and safe, according to Olivier Galibert) to strip + the 8th bit off ARG1 and ARG2 becaue it allows programmers to + write (make-char 'latin-iso8859-2 CODE) where code is the actual + Latin 2 code of the character. */ + a1 = XINT (arg1) & 0x7f; if (a1 < lowlim || a1 > highlim) args_out_of_range_3 (arg1, make_int (lowlim), make_int (highlim)); @@ -1080,7 +1084,7 @@ Make a multi-byte character from CHARSET and octets ARG1 and ARG2. } CHECK_INT (arg2); - a2 = XINT (arg2); + a2 = XINT (arg2) & 0x7f; if (a2 < lowlim || a2 > highlim) args_out_of_range_3 (arg2, make_int (lowlim), make_int (highlim)); diff --git a/src/ntproc.c b/src/ntproc.c index d20bb19..5618847 100644 --- a/src/ntproc.c +++ b/src/ntproc.c @@ -1442,9 +1442,6 @@ If successful, the new locale id is returned, otherwise nil. void syms_of_ntproc () { - Qhigh = intern ("high"); - Qlow = intern ("low"); - DEFSUBR (Fwin32_short_file_name); DEFSUBR (Fwin32_long_file_name); DEFSUBR (Fwin32_set_process_priority); @@ -1453,6 +1450,14 @@ syms_of_ntproc () DEFSUBR (Fwin32_get_default_locale_id); DEFSUBR (Fwin32_get_valid_locale_ids); DEFSUBR (Fwin32_set_current_locale); +} + + +void +vars_of_ntproc (void) +{ + Qhigh = intern ("high"); + Qlow = intern ("low"); DEFVAR_LISP ("win32-quote-process-args", &Vwin32_quote_process_args /* Non-nil enables quoting of process arguments to ensure correct parsing. @@ -1483,7 +1488,7 @@ or indirectly by Emacs), and preventing Emacs from cleanly terminating the subprocess group, but may allow Emacs to interrupt a subprocess that doesn't otherwise respond to interrupts from Emacs. */ ); - Vwin32_start_process_share_console = Qnil; + Vwin32_start_process_share_console = Qt; DEFVAR_LISP ("win32-pipe-read-delay", &Vwin32_pipe_read_delay /* Forced delay before reading subprocess output. @@ -1508,4 +1513,5 @@ the truename of a file can be slow. Vwin32_generate_fake_inodes = Qnil; #endif } + /* end of ntproc.c */ diff --git a/src/print.c b/src/print.c index 98d4a84..8ded305 100644 --- a/src/print.c +++ b/src/print.c @@ -806,37 +806,52 @@ float_to_string (char *buf, double data) faster. BUFFER should accept 24 bytes. This should suffice for the longest - numbers on 64-bit machines. */ + numbers on 64-bit machines, including the `-' sign and the trailing + \0. */ void long_to_string (char *buffer, long number) { - char *p; - int i, len; +#if (SIZEOF_LONG != 4) && (SIZEOF_LONG != 8) + /* Huh? */ + sprintf (buffer, "%ld", number); +#else /* (SIZEOF_LONG == 4) || (SIZEOF_LONG == 8) */ + char *p = buffer; + int force = 0; if (number < 0) { - *buffer++ = '-'; + *p++ = '-'; number = -number; } - p = buffer; - /* Print the digits to the string. */ - do - { - *p++ = number % 10 + '0'; - number /= 10; - } - while (number); - - /* And reverse them. */ - len = p - buffer - 1; - for (i = len / 2; i >= 0; i--) - { - char c = buffer[i]; - buffer[i] = buffer[len - i]; - buffer[len - i] = c; - } - buffer[len + 1] = '\0'; +#define FROB(figure) do { \ + if (force || number >= figure) \ + *p++ = number / figure + '0', number %= figure, force = 1; \ + } while (0) +#if SIZEOF_LONG == 8 + FROB (1000000000000000000L); + FROB (100000000000000000L); + FROB (10000000000000000L); + FROB (1000000000000000L); + FROB (100000000000000L); + FROB (10000000000000L); + FROB (1000000000000L); + FROB (100000000000L); + FROB (10000000000L); +#endif /* SIZEOF_LONG == 8 */ + FROB (1000000000); + FROB (100000000); + FROB (10000000); + FROB (1000000); + FROB (100000); + FROB (10000); + FROB (1000); + FROB (100); + FROB (10); +#undef FROB + *p++ = number + '0'; + *p = '\0'; +#endif /* (SIZEOF_LONG == 4) || (SIZEOF_LONG == 8) */ } static void diff --git a/src/s/decosf4-0.h b/src/s/decosf4-0.h index 5f9f4ff..bd0fee8 100644 --- a/src/s/decosf4-0.h +++ b/src/s/decosf4-0.h @@ -24,13 +24,13 @@ #define regoff_t sys_regoff_t #define regmatch_t sys_regmatch_t -/* A perfectly ordinary link wins again - martin */ +/* A perfectly ordinary link wins again - martin #undef C_SWITCH_SYSTEM #undef LIBS_SYSTEM #undef LIBS_DEBUG -#define ORDINARY_LINK +#define ORDINARY_LINK */ -#define SYSTEM_MALLOC +/*#define SYSTEM_MALLOC*/ #if 0 /* martin */ /* Some V4.0* versions before V4.0B don't detect rename properly. */ diff --git a/src/select-msw.c b/src/select-msw.c index 3096d54..2e4a127 100644 --- a/src/select-msw.c +++ b/src/select-msw.c @@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */ #include <config.h> #include "lisp.h" +#include "select.h" #include "console-msw.h" @@ -92,6 +93,20 @@ Copy STRING to the mswindows clipboard. return i ? Qt : Qnil; } +/* Do protocol to assert ourself as a selection owner. Under mswindows +this is easy, we just set the clipboard. */ +static Lisp_Object +mswindows_own_selection (Lisp_Object selection_name, Lisp_Object selection_value) +{ + Lisp_Object converted_value = get_local_selection (selection_name, QSTRING); + if (!NILP (converted_value) && + CONSP (converted_value) && + EQ (XCAR (converted_value), QSTRING)) + Fmswindows_set_clipboard (XCDR (converted_value)); + + return Qnil; +} + DEFUN ("mswindows-get-clipboard", Fmswindows_get_clipboard, 0, 0, 0, /* Return the contents of the mswindows clipboard. */ @@ -144,6 +159,12 @@ Return the contents of the mswindows clipboard. return ret; } +static Lisp_Object +mswindows_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type) +{ + return Fmswindows_get_clipboard (); +} + DEFUN ("mswindows-selection-exists-p", Fmswindows_selection_exists_p, 0, 0, 0, /* Whether there is an MS-Windows selection. */ @@ -160,12 +181,26 @@ Remove the current MS-Windows selection from the clipboard. return EmptyClipboard () ? Qt : Qnil; } +static void +mswindows_disown_selection (Lisp_Object selection, Lisp_Object timeval) +{ + Fmswindows_delete_selection (); +} + /************************************************************************/ /* initialization */ /************************************************************************/ void +console_type_create_select_mswindows (void) +{ + CONSOLE_HAS_METHOD (mswindows, own_selection); + CONSOLE_HAS_METHOD (mswindows, disown_selection); + CONSOLE_HAS_METHOD (mswindows, get_foreign_selection); +} + +void syms_of_select_mswindows (void) { DEFSUBR (Fmswindows_set_clipboard); diff --git a/src/sheap.c b/src/sheap.c index 1c389b5..977addc 100644 --- a/src/sheap.c +++ b/src/sheap.c @@ -25,7 +25,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include <unistd.h> #include <sheap-adjust.h> -#define STATIC_HEAP_BASE 0x600000 +#define STATIC_HEAP_BASE 0x800000 #define STATIC_HEAP_SLOP 0x40000 #define STATIC_HEAP_SIZE \ (STATIC_HEAP_BASE + SHEAP_ADJUSTMENT + STATIC_HEAP_SLOP) @@ -103,7 +103,7 @@ static_heap_base, static_heap_ptr); return result; } -void +static void sheap_adjust_h () { FILE *stream = fopen ("sheap-adjust.h", "w"); @@ -120,3 +120,31 @@ sheap_adjust_h () fclose (stream); } +void +report_sheap_usage (int die_if_pure_storage_exceeded) +{ + int rc = 0; + + size_t lost = (STATIC_HEAP_BASE + STATIC_HEAP_SLOP + SHEAP_ADJUSTMENT) + - (static_heap_ptr - static_heap_buffer); + char buf[200]; + sprintf (buf, "Static heap usage: %ld of %ld", + (long) (static_heap_ptr - static_heap_buffer), + (long) (STATIC_HEAP_BASE + STATIC_HEAP_SLOP + SHEAP_ADJUSTMENT)); + + if (lost > STATIC_HEAP_SLOP) { + sprintf (buf + strlen (buf), " -- %ldk wasted", (long)(lost/1024)); + if (die_if_pure_storage_exceeded) { + sheap_adjust_h(); + rc = -1; + } + message ("%s", buf); + } + + if (rc < 0) { + unlink("SATISFIED"); + fatal ("Static heap size adjusted, Don't Panic! I will restart the `make'"); + } +} + + diff --git a/src/symsinit.h b/src/symsinit.h index 9195a25..542980f 100644 --- a/src/symsinit.h +++ b/src/symsinit.h @@ -113,7 +113,7 @@ void syms_of_mule (void); void syms_of_mule_canna (void); void syms_of_mule_ccl (void); void syms_of_mule_charset (void); -void syms_of_mule_coding (void); +void syms_of_file_coding (void); void syms_of_mule_wnn (void); void syms_of_ntproc (void); void syms_of_objects_tty (void); @@ -130,6 +130,7 @@ void syms_of_redisplay (void); void syms_of_scrollbar (void); void syms_of_scrollbar_mswindows(void); void syms_of_search (void); +void syms_of_select (void); void syms_of_select_mswindows (void); void syms_of_signal (void); void syms_of_sound (void); @@ -162,6 +163,7 @@ void console_type_create_menubar_x (void); void console_type_create_objects_x (void); void console_type_create_redisplay_x (void); void console_type_create_scrollbar_x (void); +void console_type_create_select_x (void); void console_type_create_toolbar_x (void); void console_type_create_dialog_x (void); void console_type_create_mswindows (void); @@ -174,6 +176,7 @@ void console_type_create_scrollbar_mswindows (void); void console_type_create_toolbar_mswindows (void); void console_type_create_glyphs_mswindows (void); void console_type_create_dialog_mswindows (void); +void console_type_create_select_mswindows (void); /* Initialize the specifier types (dump-time only). */ @@ -201,7 +204,7 @@ void image_instantiator_format_create_glyphs_mswindows (void); /* Initialize the lstream types (dump-time only). */ void lstream_type_create (void); -void lstream_type_create_mule_coding (void); +void lstream_type_create_file_coding (void); void lstream_type_create_print (void); void lstream_type_create_mswindows_selectable (void); @@ -223,6 +226,7 @@ void vars_of_buffer (void); void vars_of_bytecode (void); void vars_of_callint (void); void vars_of_callproc (void); +void vars_of_chartab (void); void vars_of_cmdloop (void); void vars_of_cmds (void); void vars_of_console (void); @@ -285,9 +289,11 @@ void vars_of_minibuf (void); void vars_of_module (void); void vars_of_mule (void); void vars_of_mule_canna (void); +void vars_of_mule_ccl(void); void vars_of_mule_charset (void); -void vars_of_mule_coding (void); +void vars_of_file_coding (void); void vars_of_mule_wnn (void); +void vars_of_ntproc (void); void vars_of_objects (void); void vars_of_objects_tty (void); void vars_of_objects_mswindows (void); @@ -303,6 +309,7 @@ void vars_of_scrollbar_x (void); void vars_of_scrollbar (void); void vars_of_scrollbar_mswindows (void); void vars_of_search (void); +void vars_of_select (void); void vars_of_select_mswindows (void); void vars_of_sound (void); void vars_of_specifier (void); @@ -334,7 +341,7 @@ void complex_vars_of_event_stream (void); void complex_vars_of_extents (void); void complex_vars_of_faces (void); void complex_vars_of_mule_charset (void); -void complex_vars_of_mule_coding (void); +void complex_vars_of_file_coding (void); void complex_vars_of_glyphs (void); void complex_vars_of_glyphs_x (void); void complex_vars_of_glyphs_mswindows (void); diff --git a/src/toolbar-msw.c b/src/toolbar-msw.c index ca86e9d..8d6389b 100644 --- a/src/toolbar-msw.c +++ b/src/toolbar-msw.c @@ -209,7 +209,7 @@ mswindows_output_toolbar (struct frame *f, enum toolbar_pos pos) internal_hash (get_toolbar_button_glyph(w, tb), 0), internal_hash (tb->callback, 0), width, - w->toolbar_buttons_captioned_p); + LISP_HASH (w->toolbar_buttons_captioned_p)); button = tb->next; nbuttons++; } diff --git a/src/unexsol2.c b/src/unexsol2.c index d9de182..06e71e7 100644 --- a/src/unexsol2.c +++ b/src/unexsol2.c @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ -/* #pragma ident "@(#) $Id: unexsol2.c,v 1.2 1995/01/25 20:39:16 georgn Exp $" */ +/* #pragma ident "@(#) $Id: unexsol2.c,v 1.3 1997/10/13 03:35:33 steve Exp $" */ #include <stdlib.h> #include <stdio.h> diff --git a/src/xselect.c b/src/xselect.c deleted file mode 100644 index 8dada0a..0000000 --- a/src/xselect.c +++ /dev/null @@ -1,2144 +0,0 @@ -/* X Selection processing for XEmacs - Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. - -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 synched with FSF. */ - -/* Rewritten by jwz */ - -#include <config.h> -#include "lisp.h" - -#include "buffer.h" -#include "console-x.h" -#include "objects-x.h" - -#include "frame.h" -#include "opaque.h" -#include "systime.h" - -int lisp_to_time (Lisp_Object, time_t *); -Lisp_Object time_to_lisp (time_t); - -#ifdef LWLIB_USES_MOTIF -# define MOTIF_CLIPBOARDS -#endif - -#ifdef MOTIF_CLIPBOARDS -# include <Xm/CutPaste.h> -static void hack_motif_clipboard_selection (Atom selection_atom, - Lisp_Object selection_value, - Time thyme, Display *display, - Window selecting_window, - Bool owned_p); -#endif - -#define CUT_BUFFER_SUPPORT - -Lisp_Object QPRIMARY, QSECONDARY, QSTRING, QINTEGER, QCLIPBOARD, QTIMESTAMP, - QTEXT, QDELETE, QMULTIPLE, QINCR, QEMACS_TMP, QTARGETS, QATOM, QNULL, - QATOM_PAIR, QCOMPOUND_TEXT; - -#ifdef CUT_BUFFER_SUPPORT -Lisp_Object QCUT_BUFFER0, QCUT_BUFFER1, QCUT_BUFFER2, QCUT_BUFFER3, - QCUT_BUFFER4, QCUT_BUFFER5, QCUT_BUFFER6, QCUT_BUFFER7; -#endif - -Lisp_Object Vx_lost_selection_hooks; -Lisp_Object Vx_sent_selection_hooks; - -/* If this is a smaller number than the max-request-size of the display, - emacs will use INCR selection transfer when the selection is larger - than this. The max-request-size is usually around 64k, so if you want - emacs to use incremental selection transfers when the selection is - smaller than that, set this. I added this mostly for debugging the - incremental transfer stuff, but it might improve server performance. - */ -#define MAX_SELECTION_QUANTUM 0xFFFFFF - -#define SELECTION_QUANTUM(dpy) ((XMaxRequestSize (dpy) << 2) - 100) - -/* This is an association list whose elements are of the form - ( selection-name selection-value selection-timestamp ) - selection-name is a lisp symbol, whose name is the name of an X Atom. - selection-value is the value that emacs owns for that selection. - It may be any kind of Lisp object. - selection-timestamp is the time at which emacs began owning this selection, - as a cons of two 16-bit numbers (making a 32 bit time). - If there is an entry in this alist, then it can be assumed that emacs owns - that selection. - The only (eq) parts of this list that are visible from elisp are the - selection-values. - */ -Lisp_Object Vselection_alist; - -/* This is an alist whose CARs are selection-types (whose names are the same - as the names of X Atoms) and whose CDRs are the names of Lisp functions to - call to convert the given Emacs selection value to a string representing - the given selection type. This is for elisp-level extension of the emacs - selection handling. - */ -Lisp_Object Vselection_converter_alist; - -/* "Selection owner couldn't convert selection" */ -Lisp_Object Qselection_conversion_error; - -/* If the selection owner takes too long to reply to a selection request, - we give up on it. This is in seconds (0 = no timeout). - */ -int x_selection_timeout; - - -/* Utility functions */ - -static void lisp_data_to_selection_data (struct device *, - Lisp_Object obj, - unsigned char **data_ret, - Atom *type_ret, - unsigned int *size_ret, - int *format_ret); -static Lisp_Object selection_data_to_lisp_data (struct device *, - unsigned char *data, - size_t size, - Atom type, - int format); -static Lisp_Object x_get_window_property_as_lisp_data (Display *, - Window, - Atom property, - Lisp_Object target_type, - Atom selection_atom); - -static int expect_property_change (Display *, Window, Atom prop, int state); -static void wait_for_property_change (long); -static void unexpect_property_change (int); -static int waiting_for_other_props_on_window (Display *, Window); - -/* This converts a Lisp symbol to a server Atom, avoiding a server - roundtrip whenever possible. - */ -static Atom -symbol_to_x_atom (struct device *d, Lisp_Object sym, int only_if_exists) -{ - Display *display = DEVICE_X_DISPLAY (d); - - if (NILP (sym)) return XA_PRIMARY; - if (EQ (sym, Qt)) return XA_SECONDARY; - if (EQ (sym, QPRIMARY)) return XA_PRIMARY; - if (EQ (sym, QSECONDARY)) return XA_SECONDARY; - if (EQ (sym, QSTRING)) return XA_STRING; - if (EQ (sym, QINTEGER)) return XA_INTEGER; - if (EQ (sym, QATOM)) return XA_ATOM; - if (EQ (sym, QCLIPBOARD)) return DEVICE_XATOM_CLIPBOARD (d); - if (EQ (sym, QTIMESTAMP)) return DEVICE_XATOM_TIMESTAMP (d); - if (EQ (sym, QTEXT)) return DEVICE_XATOM_TEXT (d); - if (EQ (sym, QDELETE)) return DEVICE_XATOM_DELETE (d); - if (EQ (sym, QMULTIPLE)) return DEVICE_XATOM_MULTIPLE (d); - if (EQ (sym, QINCR)) return DEVICE_XATOM_INCR (d); - if (EQ (sym, QEMACS_TMP)) return DEVICE_XATOM_EMACS_TMP (d); - if (EQ (sym, QTARGETS)) return DEVICE_XATOM_TARGETS (d); - if (EQ (sym, QNULL)) return DEVICE_XATOM_NULL (d); - if (EQ (sym, QATOM_PAIR)) return DEVICE_XATOM_ATOM_PAIR (d); - if (EQ (sym, QCOMPOUND_TEXT)) return DEVICE_XATOM_COMPOUND_TEXT (d); - -#ifdef CUT_BUFFER_SUPPORT - if (EQ (sym, QCUT_BUFFER0)) return XA_CUT_BUFFER0; - if (EQ (sym, QCUT_BUFFER1)) return XA_CUT_BUFFER1; - if (EQ (sym, QCUT_BUFFER2)) return XA_CUT_BUFFER2; - if (EQ (sym, QCUT_BUFFER3)) return XA_CUT_BUFFER3; - if (EQ (sym, QCUT_BUFFER4)) return XA_CUT_BUFFER4; - if (EQ (sym, QCUT_BUFFER5)) return XA_CUT_BUFFER5; - if (EQ (sym, QCUT_BUFFER6)) return XA_CUT_BUFFER6; - if (EQ (sym, QCUT_BUFFER7)) return XA_CUT_BUFFER7; -#endif /* CUT_BUFFER_SUPPORT */ - - { - CONST char *nameext; - GET_C_STRING_CTEXT_DATA_ALLOCA (Fsymbol_name (sym), nameext); - return XInternAtom (display, nameext, only_if_exists ? True : False); - } -} - - -/* This converts a server Atom to a Lisp symbol, avoiding server roundtrips - and calls to intern whenever possible. - */ -static Lisp_Object -x_atom_to_symbol (struct device *d, Atom atom) -{ - Display *display = DEVICE_X_DISPLAY (d); - - if (! atom) return Qnil; - if (atom == XA_PRIMARY) return QPRIMARY; - if (atom == XA_SECONDARY) return QSECONDARY; - if (atom == XA_STRING) return QSTRING; - if (atom == XA_INTEGER) return QINTEGER; - if (atom == XA_ATOM) return QATOM; - if (atom == DEVICE_XATOM_CLIPBOARD (d)) return QCLIPBOARD; - if (atom == DEVICE_XATOM_TIMESTAMP (d)) return QTIMESTAMP; - if (atom == DEVICE_XATOM_TEXT (d)) return QTEXT; - if (atom == DEVICE_XATOM_DELETE (d)) return QDELETE; - if (atom == DEVICE_XATOM_MULTIPLE (d)) return QMULTIPLE; - if (atom == DEVICE_XATOM_INCR (d)) return QINCR; - if (atom == DEVICE_XATOM_EMACS_TMP (d)) return QEMACS_TMP; - if (atom == DEVICE_XATOM_TARGETS (d)) return QTARGETS; - if (atom == DEVICE_XATOM_NULL (d)) return QNULL; - if (atom == DEVICE_XATOM_ATOM_PAIR (d)) return QATOM_PAIR; - if (atom == DEVICE_XATOM_COMPOUND_TEXT (d)) return QCOMPOUND_TEXT; - -#ifdef CUT_BUFFER_SUPPORT - if (atom == XA_CUT_BUFFER0) return QCUT_BUFFER0; - if (atom == XA_CUT_BUFFER1) return QCUT_BUFFER1; - if (atom == XA_CUT_BUFFER2) return QCUT_BUFFER2; - if (atom == XA_CUT_BUFFER3) return QCUT_BUFFER3; - if (atom == XA_CUT_BUFFER4) return QCUT_BUFFER4; - if (atom == XA_CUT_BUFFER5) return QCUT_BUFFER5; - if (atom == XA_CUT_BUFFER6) return QCUT_BUFFER6; - if (atom == XA_CUT_BUFFER7) return QCUT_BUFFER7; -#endif - - { - Lisp_Object newsym; - CONST Bufbyte *intstr; - char *str = XGetAtomName (display, atom); - - if (! str) return Qnil; - - GET_C_CHARPTR_INT_CTEXT_DATA_ALLOCA (str, intstr); - newsym = intern ((char *) intstr); - XFree (str); - return newsym; - } -} - - -/* Do protocol to assert ourself as a selection owner. - Update the Vselection_alist so that we can reply to later requests for - our selection. - */ -static void -x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value) -{ - struct device *d = decode_x_device (Qnil); - Display *display = DEVICE_X_DISPLAY (d); - struct frame *sel_frame = selected_frame (); - Window selecting_window = XtWindow (FRAME_X_TEXT_WIDGET (sel_frame)); - /* Use the time of the last-read mouse or keyboard event. - For selection purposes, we use this as a sleazy way of knowing what the - current time is in server-time. This assumes that the most recently read - mouse or keyboard event has something to do with the assertion of the - selection, which is probably true. - */ - Time thyme = DEVICE_X_MOUSE_TIMESTAMP (d); - Atom selection_atom; - - CHECK_SYMBOL (selection_name); - selection_atom = symbol_to_x_atom (d, selection_name, 0); - - XSetSelectionOwner (display, selection_atom, selecting_window, thyme); - - /* Now update the local cache */ - { - /* We do NOT use time_to_lisp() here any more, like we used to. - That assumed equivalence of time_t and Time, which is not - necessarily the case (e.g. under OSF on the Alphas, where - Time is a 64-bit quantity and time_t is a 32-bit quantity). - - Opaque pointers are the clean way to go here. - */ - Lisp_Object selection_time = make_opaque (sizeof (thyme), (void *) &thyme); - Lisp_Object selection_data = list3 (selection_name, - selection_value, - selection_time); - Lisp_Object prev_value = assq_no_quit (selection_name, Vselection_alist); - Vselection_alist = Fcons (selection_data, Vselection_alist); - - /* If we already owned the selection, remove the old selection data. - Perhaps we should destructively modify it instead. - Don't use Fdelq() as that may QUIT;. - */ - if (!NILP (prev_value)) - { - Lisp_Object rest; /* we know it's not the CAR, so it's easy. */ - for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) - if (EQ (prev_value, Fcar (XCDR (rest)))) - { - XCDR (rest) = Fcdr (XCDR (rest)); - break; - } - } -#ifdef MOTIF_CLIPBOARDS - hack_motif_clipboard_selection (selection_atom, selection_value, - thyme, display, selecting_window, - !NILP (prev_value)); -#endif - } -} - - -#ifdef MOTIF_CLIPBOARDS /* Bend over baby. Take it and like it. */ - -# ifdef MOTIF_INCREMENTAL_CLIPBOARDS_WORK -static void motif_clipboard_cb (); -# endif - -static void -hack_motif_clipboard_selection (Atom selection_atom, - Lisp_Object selection_value, - Time thyme, - Display *display, - Window selecting_window, - Bool owned_p) -{ - struct device *d = get_device_from_display (display); - /* Those Motif wankers can't be bothered to follow the ICCCM, and do - their own non-Xlib non-Xt clipboard processing. So we have to do - this so that linked-in Motif widgets don't get themselves wedged. - */ - if (selection_atom == DEVICE_XATOM_CLIPBOARD (d) - && STRINGP (selection_value) - - /* If we already own the clipboard, don't own it again in the Motif - way. This might lose in some subtle way, since the timestamp won't - be current, but owning the selection on the Motif way does a - SHITLOAD of X protocol, and it makes killing text be incredibly - slow when using an X terminal. ARRRRGGGHHH!!!! - */ - /* No, this is no good, because then Motif text fields don't bother - to look up the new value, and you can't Copy from a buffer, Paste - into a text field, then Copy something else from the buffer and - paste it into the text field -- it pastes the first thing again. */ -/* && !owned_p */ - ) - { -#ifdef MOTIF_INCREMENTAL_CLIPBOARDS_WORK - Widget widget = FRAME_X_TEXT_WIDGET (selected_frame()); -#endif - long itemid; -#if XmVersion >= 1002 - long dataid; -#else - int dataid; /* 1.2 wants long, but 1.1.5 wants int... */ -#endif - XmString fmh; - String encoding = "STRING"; - CONST Extbyte *data = XSTRING_DATA (selection_value); - Extcount bytes = XSTRING_LENGTH (selection_value); - -#ifdef MULE - { - enum { ASCII, LATIN_1, WORLD } chartypes = ASCII; - CONST Bufbyte *ptr = data, *end = ptr + bytes; - /* Optimize for the common ASCII case */ - while (ptr <= end) - { - if (BYTE_ASCII_P (*ptr)) - { - ptr++; - continue; - } - - if ((*ptr) == LEADING_BYTE_LATIN_ISO8859_1 || - (*ptr) == LEADING_BYTE_CONTROL_1) - { - chartypes = LATIN_1; - ptr += 2; - continue; - } - - chartypes = WORLD; - break; - } - - if (chartypes == LATIN_1) - GET_STRING_BINARY_DATA_ALLOCA (selection_value, data, bytes); - else if (chartypes == WORLD) - { - GET_STRING_CTEXT_DATA_ALLOCA (selection_value, data, bytes); - encoding = "COMPOUND_TEXT"; - } - } -#endif /* MULE */ - - fmh = XmStringCreateLtoR ("Clipboard", XmSTRING_DEFAULT_CHARSET); - while (ClipboardSuccess != - XmClipboardStartCopy (display, selecting_window, fmh, thyme, -#ifdef MOTIF_INCREMENTAL_CLIPBOARDS_WORK - widget, motif_clipboard_cb, -#else - 0, NULL, -#endif - &itemid)) - ; - XmStringFree (fmh); - while (ClipboardSuccess != - XmClipboardCopy (display, selecting_window, itemid, encoding, -#ifdef MOTIF_INCREMENTAL_CLIPBOARDS_WORK - /* O'Reilly examples say size can be 0, - but this clearly is not the case. */ - 0, bytes, (int) selecting_window, /* private id */ -#else /* !MOTIF_INCREMENTAL_CLIPBOARDS_WORK */ - (XtPointer) data, bytes, 0, -#endif /* !MOTIF_INCREMENTAL_CLIPBOARDS_WORK */ - &dataid)) - ; - while (ClipboardSuccess != - XmClipboardEndCopy (display, selecting_window, itemid)) - ; - } -} - -# ifdef MOTIF_INCREMENTAL_CLIPBOARDS_WORK -/* I tried to treat the clipboard like a real selection, and not send - the data until it was requested, but it looks like that just doesn't - work at all unless the selection owner and requestor are in different - processes. From reading the Motif source, it looks like they never - even considered having two widgets in the same application transfer - data between each other using "by-name" clipboard values. What a - bunch of fuckups. - */ -static void -motif_clipboard_cb (Widget widget, int *data_id, int *private_id, int *reason) -{ - switch (*reason) - { - case XmCR_CLIPBOARD_DATA_REQUEST: - { - Display *dpy = XtDisplay (widget); - Window window = (Window) *private_id; - Lisp_Object selection = assq_no_quit (QCLIPBOARD, Vselection_alist); - if (NILP (selection)) abort (); - selection = XCDR (selection); - if (!STRINGP (selection)) abort (); - XmClipboardCopyByName (dpy, window, *data_id, - (char *) XSTRING_DATA (selection), - XSTRING_LENGTH (selection) + 1, - 0); - } - break; - case XmCR_CLIPBOARD_DATA_DELETE: - default: - /* don't need to free anything */ - break; - } -} -# endif /* MOTIF_INCREMENTAL_CLIPBOARDS_WORK */ -#endif /* MOTIF_CLIPBOARDS */ - - -/* Given a selection-name and desired type, this looks up our local copy of - the selection value and converts it to the type. It returns nil or a - string. This calls random elisp code, and may signal or gc. - */ -static Lisp_Object -x_get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type) -{ - /* This function can GC */ - Lisp_Object local_value = assq_no_quit (selection_symbol, Vselection_alist); - Lisp_Object handler_fn, value, check; - - if (NILP (local_value)) return Qnil; - - /* TIMESTAMP and MULTIPLE are special cases 'cause that's easiest. */ - if (EQ (target_type, QTIMESTAMP)) - { - handler_fn = Qnil; - value = XCAR (XCDR (XCDR (local_value))); - } - -#if 0 /* #### MULTIPLE doesn't work yet */ - else if (CONSP (target_type) && - XCAR (target_type) == QMULTIPLE) - { - Lisp_Object pairs = XCDR (target_type); - int len = XVECTOR_LENGTH (pairs); - int i; - /* If the target is MULTIPLE, then target_type looks like - (MULTIPLE . [[SELECTION1 TARGET1] [SELECTION2 TARGET2] ... ]) - We modify the second element of each pair in the vector and - return it as [[SELECTION1 <value1>] [SELECTION2 <value2>] ... ] - */ - for (i = 0; i < len; i++) - { - Lisp_Object pair = XVECTOR_DATA (pairs) [i]; - XVECTOR_DATA (pair) [1] = - x_get_local_selection (XVECTOR_DATA (pair) [0], - XVECTOR_DATA (pair) [1]); - } - return pairs; - } -#endif - else - { - CHECK_SYMBOL (target_type); - handler_fn = Fcdr (Fassq (target_type, Vselection_converter_alist)); - if (NILP (handler_fn)) return Qnil; - value = call3 (handler_fn, - selection_symbol, target_type, - XCAR (XCDR (local_value))); - } - - /* This lets the selection function to return (TYPE . VALUE). For example, - when the selected type is LINE_NUMBER, the returned type is SPAN, not - INTEGER. - */ - check = value; - if (CONSP (value) && SYMBOLP (XCAR (value))) - check = XCDR (value); - - /* Strings, vectors, and symbols are converted to selection data format in - the obvious way. Integers are converted to 16 bit quantities if they're - small enough, otherwise 32 bits are used. - */ - if (STRINGP (check) || - VECTORP (check) || - SYMBOLP (check) || - INTP (check) || - CHARP (check) || - NILP (value)) - return value; - - /* (N . M) or (N M) get turned into a 32 bit quantity. So if you want to - always return a small quantity as 32 bits, your converter routine needs - to return a cons. - */ - else if (CONSP (check) && - INTP (XCAR (check)) && - (INTP (XCDR (check)) || - (CONSP (XCDR (check)) && - INTP (XCAR (XCDR (check))) && - NILP (XCDR (XCDR (check)))))) - return value; - /* Otherwise the lisp converter function returned something unrecognized. - */ - else - signal_error (Qerror, - list3 (build_string - ("unrecognized selection-conversion type"), - handler_fn, - value)); - - return Qnil; /* suppress compiler warning */ -} - - - -/* Send a SelectionNotify event to the requestor with property=None, meaning - we were unable to do what they wanted. - */ -static void -x_decline_selection_request (XSelectionRequestEvent *event) -{ - XSelectionEvent reply; - reply.type = SelectionNotify; - reply.display = event->display; - reply.requestor = event->requestor; - reply.selection = event->selection; - reply.time = event->time; - reply.target = event->target; - reply.property = None; - - XSendEvent (reply.display, reply.requestor, False, 0L, (XEvent *) &reply); - XFlush (reply.display); -} - - -/* Used as an unwind-protect clause so that, if a selection-converter signals - an error, we tell the requestor that we were unable to do what they wanted - before we throw to top-level or go into the debugger or whatever. - */ -static Lisp_Object -x_selection_request_lisp_error (Lisp_Object closure) -{ - XSelectionRequestEvent *event = (XSelectionRequestEvent *) - get_opaque_ptr (closure); - - free_opaque_ptr (closure); - if (event->type == 0) /* we set this to mean "completed normally" */ - return Qnil; - x_decline_selection_request (event); - return Qnil; -} - - -/* Convert our selection to the requested type, and put that data where the - requestor wants it. Then tell them whether we've succeeded. - */ -static void -x_reply_selection_request (XSelectionRequestEvent *event, int format, - unsigned char *data, int size, Atom type) -{ - /* This function can GC */ - XSelectionEvent reply; - Display *display = event->display; - struct device *d = get_device_from_display (display); - Window window = event->requestor; - int bytes_remaining; - int format_bytes = format/8; - int max_bytes = SELECTION_QUANTUM (display); - if (max_bytes > MAX_SELECTION_QUANTUM) max_bytes = MAX_SELECTION_QUANTUM; - - reply.type = SelectionNotify; - reply.display = display; - reply.requestor = window; - reply.selection = event->selection; - reply.time = event->time; - reply.target = event->target; - reply.property = (event->property == None ? event->target : event->property); - - /* #### XChangeProperty can generate BadAlloc, and we must handle it! */ - - /* Store the data on the requested property. - If the selection is large, only store the first N bytes of it. - */ - bytes_remaining = size * format_bytes; - if (bytes_remaining <= max_bytes) - { - /* Send all the data at once, with minimal handshaking. */ -#if 0 - stderr_out ("\nStoring all %d\n", bytes_remaining); -#endif - XChangeProperty (display, window, reply.property, type, format, - PropModeReplace, data, size); - /* At this point, the selection was successfully stored; ack it. */ - XSendEvent (display, window, False, 0L, (XEvent *) &reply); - XFlush (display); - } - else - { - /* Send an INCR selection. */ - int prop_id; - - if (x_window_to_frame (d, window)) /* #### debug */ - error ("attempt to transfer an INCR to ourself!"); -#if 0 - stderr_out ("\nINCR %d\n", bytes_remaining); -#endif - prop_id = expect_property_change (display, window, reply.property, - PropertyDelete); - - XChangeProperty (display, window, reply.property, DEVICE_XATOM_INCR (d), - 32, PropModeReplace, (unsigned char *) - &bytes_remaining, 1); - XSelectInput (display, window, PropertyChangeMask); - /* Tell 'em the INCR data is there... */ - XSendEvent (display, window, False, 0L, (XEvent *) &reply); - XFlush (display); - - /* First, wait for the requestor to ack by deleting the property. - This can run random lisp code (process handlers) or signal. - */ - wait_for_property_change (prop_id); - - while (bytes_remaining) - { - int i = ((bytes_remaining < max_bytes) - ? bytes_remaining - : max_bytes); - prop_id = expect_property_change (display, window, reply.property, - PropertyDelete); -#if 0 - stderr_out (" INCR adding %d\n", i); -#endif - /* Append the next chunk of data to the property. */ - XChangeProperty (display, window, reply.property, type, format, - PropModeAppend, data, i / format_bytes); - bytes_remaining -= i; - data += i; - - /* Now wait for the requestor to ack this chunk by deleting the - property. This can run random lisp code or signal. - */ - wait_for_property_change (prop_id); - } - /* Now write a zero-length chunk to the property to tell the requestor - that we're done. */ -#if 0 - stderr_out (" INCR done\n"); -#endif - if (! waiting_for_other_props_on_window (display, window)) - XSelectInput (display, window, 0L); - - XChangeProperty (display, window, reply.property, type, format, - PropModeReplace, data, 0); - } -} - - - -/* Called from the event-loop in response to a SelectionRequest event. - */ -void -x_handle_selection_request (XSelectionRequestEvent *event) -{ - /* This function can GC */ - struct gcpro gcpro1, gcpro2, gcpro3; - Lisp_Object local_selection_data = Qnil; - Lisp_Object selection_symbol; - Lisp_Object target_symbol = Qnil; - Lisp_Object converted_selection = Qnil; - Time local_selection_time; - Lisp_Object successful_p = Qnil; - int count; - struct device *d = get_device_from_display (event->display); - - GCPRO3 (local_selection_data, converted_selection, target_symbol); - - selection_symbol = x_atom_to_symbol (d, event->selection); - - local_selection_data = assq_no_quit (selection_symbol, Vselection_alist); - -#if 0 - /* This list isn't user-visible, so it can't "go bad." */ - assert (CONSP (local_selection_data)); - assert (CONSP (XCDR (local_selection_data))); - assert (CONSP (XCDR (XCDR (local_selection_data)))); - assert (NILP (XCDR (XCDR (XCDR (local_selection_data))))); - assert (CONSP (XCAR (XCDR (XCDR (local_selection_data))))); - assert (INTP (XCAR (XCAR (XCDR (XCDR (local_selection_data)))))); - assert (INTP (XCDR (XCAR (XCDR (XCDR (local_selection_data)))))); -#endif - - if (NILP (local_selection_data)) - { - /* Someone asked for the selection, but we don't have it any more. */ - x_decline_selection_request (event); - goto DONE_LABEL; - } - - local_selection_time = - * (Time *) XOPAQUE_DATA (XCAR (XCDR (XCDR (local_selection_data)))); - - if (event->time != CurrentTime && - local_selection_time > event->time) - { - /* Someone asked for the selection, and we have one, but not the one - they're looking for. */ - x_decline_selection_request (event); - goto DONE_LABEL; - } - - count = specpdl_depth (); - record_unwind_protect (x_selection_request_lisp_error, - make_opaque_ptr (event)); - target_symbol = x_atom_to_symbol (d, event->target); - -#if 0 /* #### MULTIPLE doesn't work yet */ - if (EQ (target_symbol, QMULTIPLE)) - target_symbol = fetch_multiple_target (event); -#endif - - /* Convert lisp objects back into binary data */ - - converted_selection = - x_get_local_selection (selection_symbol, target_symbol); - - if (! NILP (converted_selection)) - { - unsigned char *data; - unsigned int size; - int format; - Atom type; - lisp_data_to_selection_data (d, converted_selection, - &data, &type, &size, &format); - - x_reply_selection_request (event, format, data, size, type); - successful_p = Qt; - /* Tell x_selection_request_lisp_error() it's cool. */ - event->type = 0; - xfree (data); - } - unbind_to (count, Qnil); - - DONE_LABEL: - - UNGCPRO; - - /* Let random lisp code notice that the selection has been asked for. */ - { - Lisp_Object rest; - Lisp_Object val = Vx_sent_selection_hooks; - if (!UNBOUNDP (val) && !NILP (val)) - { - if (CONSP (val) && !EQ (XCAR (val), Qlambda)) - for (rest = val; !NILP (rest); rest = Fcdr (rest)) - call3 (Fcar(rest), selection_symbol, target_symbol, - successful_p); - else - call3 (val, selection_symbol, target_symbol, - successful_p); - } - } -} - - -/* Called from the event-loop in response to a SelectionClear event. - */ -void -x_handle_selection_clear (XSelectionClearEvent *event) -{ - Display *display = event->display; - struct device *d = get_device_from_display (display); - Atom selection = event->selection; - Time changed_owner_time = event->time; - - Lisp_Object selection_symbol, local_selection_data; - Time local_selection_time; - - selection_symbol = x_atom_to_symbol (d, selection); - - local_selection_data = assq_no_quit (selection_symbol, Vselection_alist); - - /* Well, we already believe that we don't own it, so that's just fine. */ - if (NILP (local_selection_data)) return; - - local_selection_time = - * (Time *) XOPAQUE_DATA (XCAR (XCDR (XCDR (local_selection_data)))); - - /* This SelectionClear is for a selection that we no longer own, so we can - disregard it. (That is, we have reasserted the selection since this - request was generated.) - */ - if (changed_owner_time != CurrentTime && - local_selection_time > changed_owner_time) - return; - - /* Otherwise, we're really honest and truly being told to drop it. - Don't use Fdelq() as that may QUIT;. - */ - if (EQ (local_selection_data, Fcar (Vselection_alist))) - Vselection_alist = Fcdr (Vselection_alist); - else - { - Lisp_Object rest; - for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) - if (EQ (local_selection_data, Fcar (XCDR (rest)))) - { - XCDR (rest) = Fcdr (XCDR (rest)); - break; - } - } - - /* Let random lisp code notice that the selection has been stolen. - */ - { - Lisp_Object rest; - Lisp_Object val = Vx_lost_selection_hooks; - if (!UNBOUNDP (val) && !NILP (val)) - { - if (CONSP (val) && !EQ (XCAR (val), Qlambda)) - for (rest = val; !NILP (rest); rest = Fcdr (rest)) - call1 (Fcar (rest), selection_symbol); - else - call1 (val, selection_symbol); - } - } -} - - -/* This stuff is so that INCR selections are reentrant (that is, so we can - be servicing multiple INCR selection requests simultaneously). I haven't - actually tested that yet. - */ - -static int prop_location_tick; - -static struct prop_location { - int tick; - Display *display; - Window window; - Atom property; - int desired_state; - struct prop_location *next; -} *for_whom_the_bell_tolls; - - -static int -property_deleted_p (void *tick) -{ - struct prop_location *rest = for_whom_the_bell_tolls; - while (rest) - if (rest->tick == (long) tick) - return 0; - else - rest = rest->next; - return 1; -} - -static int -waiting_for_other_props_on_window (Display *display, Window window) -{ - struct prop_location *rest = for_whom_the_bell_tolls; - while (rest) - if (rest->display == display && rest->window == window) - return 1; - else - rest = rest->next; - return 0; -} - - -static int -expect_property_change (Display *display, Window window, - Atom property, int state) -{ - struct prop_location *pl = xnew (struct prop_location); - pl->tick = ++prop_location_tick; - pl->display = display; - pl->window = window; - pl->property = property; - pl->desired_state = state; - pl->next = for_whom_the_bell_tolls; - for_whom_the_bell_tolls = pl; - return pl->tick; -} - -static void -unexpect_property_change (int tick) -{ - struct prop_location *prev = 0, *rest = for_whom_the_bell_tolls; - while (rest) - { - if (rest->tick == tick) - { - if (prev) - prev->next = rest->next; - else - for_whom_the_bell_tolls = rest->next; - xfree (rest); - return; - } - prev = rest; - rest = rest->next; - } -} - -static void -wait_for_property_change (long tick) -{ - /* This function can GC */ - wait_delaying_user_input (property_deleted_p, (void *) tick); -} - - -/* Called from the event-loop in response to a PropertyNotify event. - */ -void -x_handle_property_notify (XPropertyEvent *event) -{ - struct prop_location *prev = 0, *rest = for_whom_the_bell_tolls; - while (rest) - { - if (rest->property == event->atom && - rest->window == event->window && - rest->display == event->display && - rest->desired_state == event->state) - { -#if 0 - stderr_out ("Saw expected prop-%s on %s\n", - (event->state == PropertyDelete ? "delete" : "change"), - (char *) string_data (XSYMBOL (x_atom_to_symbol (get_device_from_display (event->display), event->atom))->name); -#endif - if (prev) - prev->next = rest->next; - else - for_whom_the_bell_tolls = rest->next; - xfree (rest); - return; - } - prev = rest; - rest = rest->next; - } -#if 0 - stderr_out ("Saw UNexpected prop-%s on %s\n", - (event->state == PropertyDelete ? "delete" : "change"), - (char *) string_data (XSYMBOL (x_atom_to_symbol (get_device_from_display (event->display), event->atom))->name)); -#endif -} - - - -#if 0 /* #### MULTIPLE doesn't work yet */ - -static Lisp_Object -fetch_multiple_target (XSelectionRequestEvent *event) -{ - /* This function can GC */ - Display *display = event->display; - Window window = event->requestor; - Atom target = event->target; - Atom selection_atom = event->selection; - int result; - - return - Fcons (QMULTIPLE, - x_get_window_property_as_lisp_data (display, window, target, - QMULTIPLE, - selection_atom)); -} - -static Lisp_Object -copy_multiple_data (Lisp_Object obj) -{ - Lisp_Object vec; - int i; - int len; - if (CONSP (obj)) - return Fcons (XCAR (obj), copy_multiple_data (XCDR (obj))); - - CHECK_VECTOR (obj); - len = XVECTOR_LENGTH (obj); - vec = make_vector (len, Qnil); - for (i = 0; i < len; i++) - { - Lisp_Object vec2 = XVECTOR_DATA (obj) [i]; - CHECK_VECTOR (vec2); - if (XVECTOR_LENGTH (vec2) != 2) - signal_error (Qerror, list2 (build_string - ("vectors must be of length 2"), - vec2)); - XVECTOR_DATA (vec) [i] = make_vector (2, Qnil); - XVECTOR_DATA (XVECTOR_DATA (vec) [i]) [0] = XVECTOR_DATA (vec2) [0]; - XVECTOR_DATA (XVECTOR_DATA (vec) [i]) [1] = XVECTOR_DATA (vec2) [1]; - } - return vec; -} - -#endif /* 0 */ - - -static Window reading_selection_reply; -static Atom reading_which_selection; -static int selection_reply_timed_out; - -static int -selection_reply_done (void *ignore) -{ - return !reading_selection_reply; -} - -static Lisp_Object Qx_selection_reply_timeout_internal; - -DEFUN ("x-selection-reply-timeout-internal", Fx_selection_reply_timeout_internal, - 1, 1, 0, /* -*/ - (arg)) -{ - selection_reply_timed_out = 1; - reading_selection_reply = 0; - return Qnil; -} - - -/* Do protocol to read selection-data from the server. - Converts this to lisp data and returns it. - */ -static Lisp_Object -x_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type) -{ - /* This function can GC */ - struct device *d = decode_x_device (Qnil); - Display *display = DEVICE_X_DISPLAY (d); - struct frame *sel_frame = selected_frame (); - Window requestor_window = XtWindow (FRAME_X_TEXT_WIDGET (sel_frame)); - Time requestor_time = DEVICE_X_MOUSE_TIMESTAMP (d); - Atom target_property = DEVICE_XATOM_EMACS_TMP (d); - Atom selection_atom = symbol_to_x_atom (d, selection_symbol, 0); - int speccount; - Atom type_atom = symbol_to_x_atom (d, (CONSP (target_type) ? - XCAR (target_type) : target_type), 0); - - XConvertSelection (display, selection_atom, type_atom, target_property, - requestor_window, requestor_time); - - /* Block until the reply has been read. */ - reading_selection_reply = requestor_window; - reading_which_selection = selection_atom; - selection_reply_timed_out = 0; - - speccount = specpdl_depth (); - - /* add a timeout handler */ - if (x_selection_timeout > 0) - { - Lisp_Object id = Fadd_timeout (make_int (x_selection_timeout), - Qx_selection_reply_timeout_internal, - Qnil, Qnil); - record_unwind_protect (Fdisable_timeout, id); - } - - /* This is ^Gable */ - wait_delaying_user_input (selection_reply_done, 0); - - if (selection_reply_timed_out) - error ("timed out waiting for reply from selection owner"); - - unbind_to (speccount, Qnil); - - /* otherwise, the selection is waiting for us on the requested property. */ - return - x_get_window_property_as_lisp_data (display, requestor_window, - target_property, target_type, - selection_atom); -} - - -static void -x_get_window_property (Display *display, Window window, Atom property, - unsigned char **data_ret, int *bytes_ret, - Atom *actual_type_ret, int *actual_format_ret, - unsigned long *actual_size_ret, int delete_p) -{ - int total_size; - unsigned long bytes_remaining; - int offset = 0; - unsigned char *tmp_data = 0; - int result; - int buffer_size = SELECTION_QUANTUM (display); - if (buffer_size > MAX_SELECTION_QUANTUM) buffer_size = MAX_SELECTION_QUANTUM; - - /* First probe the thing to find out how big it is. */ - result = XGetWindowProperty (display, window, property, - 0, 0, False, AnyPropertyType, - actual_type_ret, actual_format_ret, - actual_size_ret, - &bytes_remaining, &tmp_data); - if (result != Success) - { - *data_ret = 0; - *bytes_ret = 0; - return; - } - XFree ((char *) tmp_data); - - if (*actual_type_ret == None || *actual_format_ret == 0) - { - if (delete_p) XDeleteProperty (display, window, property); - *data_ret = 0; - *bytes_ret = 0; - return; - } - - total_size = bytes_remaining + 1; - *data_ret = (unsigned char *) xmalloc (total_size); - - /* Now read, until we've gotten it all. */ - while (bytes_remaining) - { -#if 0 - int last = bytes_remaining; -#endif - result = - XGetWindowProperty (display, window, property, - offset/4, buffer_size/4, - (delete_p ? True : False), - AnyPropertyType, - actual_type_ret, actual_format_ret, - actual_size_ret, &bytes_remaining, &tmp_data); -#if 0 - stderr_out ("<< read %d\n", last-bytes_remaining); -#endif - /* If this doesn't return Success at this point, it means that - some clod deleted the selection while we were in the midst of - reading it. Deal with that, I guess.... - */ - if (result != Success) break; - *actual_size_ret *= *actual_format_ret / 8; - memcpy ((*data_ret) + offset, tmp_data, *actual_size_ret); - offset += *actual_size_ret; - XFree ((char *) tmp_data); - } - *bytes_ret = offset; -} - - -static void -receive_incremental_selection (Display *display, Window window, Atom property, - /* this one is for error messages only */ - Lisp_Object target_type, - unsigned int min_size_bytes, - unsigned char **data_ret, int *size_bytes_ret, - Atom *type_ret, int *format_ret, - unsigned long *size_ret) -{ - /* This function can GC */ - int offset = 0; - int prop_id; - *size_bytes_ret = min_size_bytes; - *data_ret = (unsigned char *) xmalloc (*size_bytes_ret); -#if 0 - stderr_out ("\nread INCR %d\n", min_size_bytes); -#endif - /* At this point, we have read an INCR property, and deleted it (which - is how we ack its receipt: the sending window will be selecting - PropertyNotify events on our window to notice this). - - Now, we must loop, waiting for the sending window to put a value on - that property, then reading the property, then deleting it to ack. - We are done when the sender places a property of length 0. - */ - prop_id = expect_property_change (display, window, property, - PropertyNewValue); - while (1) - { - unsigned char *tmp_data; - int tmp_size_bytes; - wait_for_property_change (prop_id); - /* expect it again immediately, because x_get_window_property may - .. no it won't, I don't get it. - .. Ok, I get it now, the Xt code that implements INCR is broken. - */ - prop_id = expect_property_change (display, window, property, - PropertyNewValue); - x_get_window_property (display, window, property, - &tmp_data, &tmp_size_bytes, - type_ret, format_ret, size_ret, 1); - - if (tmp_size_bytes == 0) /* we're done */ - { -#if 0 - stderr_out (" read INCR done\n"); -#endif - unexpect_property_change (prop_id); - if (tmp_data) xfree (tmp_data); - break; - } -#if 0 - stderr_out (" read INCR %d\n", tmp_size_bytes); -#endif - if (*size_bytes_ret < offset + tmp_size_bytes) - { -#if 0 - stderr_out (" read INCR realloc %d -> %d\n", - *size_bytes_ret, offset + tmp_size_bytes); -#endif - *size_bytes_ret = offset + tmp_size_bytes; - *data_ret = (unsigned char *) xrealloc (*data_ret, *size_bytes_ret); - } - memcpy ((*data_ret) + offset, tmp_data, tmp_size_bytes); - offset += tmp_size_bytes; - xfree (tmp_data); - } -} - - -static Lisp_Object -x_get_window_property_as_lisp_data (Display *display, - Window window, - Atom property, - /* next two for error messages only */ - Lisp_Object target_type, - Atom selection_atom) -{ - /* This function can GC */ - Atom actual_type; - int actual_format; - unsigned long actual_size; - unsigned char *data = NULL; - int bytes = 0; - Lisp_Object val; - struct device *d = get_device_from_display (display); - - x_get_window_property (display, window, property, &data, &bytes, - &actual_type, &actual_format, &actual_size, 1); - if (! data) - { - if (XGetSelectionOwner (display, selection_atom)) - /* there is a selection owner */ - signal_error - (Qselection_conversion_error, - Fcons (build_string ("selection owner couldn't convert"), - Fcons (x_atom_to_symbol (d, selection_atom), - actual_type ? - list2 (target_type, x_atom_to_symbol (d, actual_type)) : - list1 (target_type)))); - else - signal_error (Qerror, - list2 (build_string ("no selection"), - x_atom_to_symbol (d, selection_atom))); - } - - if (actual_type == DEVICE_XATOM_INCR (d)) - { - /* Ok, that data wasn't *the* data, it was just the beginning. */ - - unsigned int min_size_bytes = * ((unsigned int *) data); - xfree (data); - receive_incremental_selection (display, window, property, target_type, - min_size_bytes, &data, &bytes, - &actual_type, &actual_format, - &actual_size); - } - - /* It's been read. Now convert it to a lisp object in some semi-rational - manner. */ - val = selection_data_to_lisp_data (d, data, bytes, - actual_type, actual_format); - - xfree (data); - return val; -} - -/* These functions convert from the selection data read from the server into - something that we can use from elisp, and vice versa. - - Type: Format: Size: Elisp Type: - ----- ------- ----- ----------- - * 8 * String - ATOM 32 1 Symbol - ATOM 32 > 1 Vector of Symbols - * 16 1 Integer - * 16 > 1 Vector of Integers - * 32 1 if <=16 bits: Integer - if > 16 bits: Cons of top16, bot16 - * 32 > 1 Vector of the above - - When converting a Lisp number to C, it is assumed to be of format 16 if - it is an integer, and of format 32 if it is a cons of two integers. - - When converting a vector of numbers from Elisp to C, it is assumed to be - of format 16 if every element in the vector is an integer, and is assumed - to be of format 32 if any element is a cons of two integers. - - When converting an object to C, it may be of the form (SYMBOL . <data>) - where SYMBOL is what we should claim that the type is. Format and - representation are as above. - - NOTE: Under Mule, when someone shoves us a string without a type, we - set the type to 'COMPOUND_TEXT and automatically convert to Compound - Text. If the string has a type, we assume that the user wants the - data sent as-is so we just do "binary" conversion. - */ - - -static Lisp_Object -selection_data_to_lisp_data (struct device *d, - unsigned char *data, - size_t size, - Atom type, - int format) -{ - if (type == DEVICE_XATOM_NULL (d)) - return QNULL; - - /* Convert any 8-bit data to a string, for compactness. */ - else if (format == 8) - return make_ext_string (data, size, - type == DEVICE_XATOM_TEXT (d) || - type == DEVICE_XATOM_COMPOUND_TEXT (d) - ? FORMAT_CTEXT : FORMAT_BINARY); - - /* Convert a single atom to a Lisp Symbol. - Convert a set of atoms to a vector of symbols. */ - else if (type == XA_ATOM) - { - if (size == sizeof (Atom)) - return x_atom_to_symbol (d, *((Atom *) data)); - else - { - int i; - int len = size / sizeof (Atom); - Lisp_Object v = Fmake_vector (make_int (len), Qzero); - for (i = 0; i < len; i++) - Faset (v, make_int (i), x_atom_to_symbol (d, ((Atom *) data) [i])); - return v; - } - } - - /* Convert a single 16 or small 32 bit number to a Lisp Int. - If the number is > 16 bits, convert it to a cons of integers, - 16 bits in each half. - */ - else if (format == 32 && size == sizeof (long)) - return word_to_lisp (((unsigned long *) data) [0]); - else if (format == 16 && size == sizeof (short)) - return make_int ((int) (((unsigned short *) data) [0])); - - /* Convert any other kind of data to a vector of numbers, represented - as above (as an integer, or a cons of two 16 bit integers). - - #### Perhaps we should return the actual type to lisp as well. - - (x-get-selection-internal 'PRIMARY 'LINE_NUMBER) - ==> [4 4] - - and perhaps it should be - - (x-get-selection-internal 'PRIMARY 'LINE_NUMBER) - ==> (SPAN . [4 4]) - - Right now the fact that the return type was SPAN is discarded before - lisp code gets to see it. - */ - else if (format == 16) - { - int i; - Lisp_Object v = make_vector (size / 4, Qzero); - for (i = 0; i < (int) size / 4; i++) - { - int j = (int) ((unsigned short *) data) [i]; - Faset (v, make_int (i), make_int (j)); - } - return v; - } - else - { - int i; - Lisp_Object v = make_vector (size / 4, Qzero); - for (i = 0; i < (int) size / 4; i++) - { - unsigned long j = ((unsigned long *) data) [i]; - Faset (v, make_int (i), word_to_lisp (j)); - } - return v; - } -} - - -static void -lisp_data_to_selection_data (struct device *d, - Lisp_Object obj, - unsigned char **data_ret, - Atom *type_ret, - unsigned int *size_ret, - int *format_ret) -{ - Lisp_Object type = Qnil; - - if (CONSP (obj) && SYMBOLP (XCAR (obj))) - { - type = XCAR (obj); - obj = XCDR (obj); - if (CONSP (obj) && NILP (XCDR (obj))) - obj = XCAR (obj); - } - - if (EQ (obj, QNULL) || (EQ (type, QNULL))) - { /* This is not the same as declining */ - *format_ret = 32; - *size_ret = 0; - *data_ret = 0; - type = QNULL; - } - else if (STRINGP (obj)) - { - CONST Extbyte *extval; - Extcount extvallen; - - if (NILP (type)) - GET_STRING_CTEXT_DATA_ALLOCA (obj, extval, extvallen); - else - GET_STRING_BINARY_DATA_ALLOCA (obj, extval, extvallen); - *format_ret = 8; - *size_ret = extvallen; - *data_ret = (unsigned char *) xmalloc (*size_ret); - memcpy (*data_ret, extval, *size_ret); -#ifdef MULE - if (NILP (type)) type = QCOMPOUND_TEXT; -#else - if (NILP (type)) type = QSTRING; -#endif - } - else if (CHARP (obj)) - { - Bufbyte buf[MAX_EMCHAR_LEN]; - Bytecount len; - CONST Extbyte *extval; - Extcount extvallen; - - *format_ret = 8; - len = set_charptr_emchar (buf, XCHAR (obj)); - GET_CHARPTR_EXT_CTEXT_DATA_ALLOCA (buf, len, extval, extvallen); - *size_ret = extvallen; - *data_ret = (unsigned char *) xmalloc (*size_ret); - memcpy (*data_ret, extval, *size_ret); -#ifdef MULE - if (NILP (type)) type = QCOMPOUND_TEXT; -#else - if (NILP (type)) type = QSTRING; -#endif - } - else if (SYMBOLP (obj)) - { - *format_ret = 32; - *size_ret = 1; - *data_ret = (unsigned char *) xmalloc (sizeof (Atom) + 1); - (*data_ret) [sizeof (Atom)] = 0; - (*(Atom **) data_ret) [0] = symbol_to_x_atom (d, obj, 0); - if (NILP (type)) type = QATOM; - } - else if (INTP (obj) && - XINT (obj) <= 0x7FFF && - XINT (obj) >= -0x8000) - { - *format_ret = 16; - *size_ret = 1; - *data_ret = (unsigned char *) xmalloc (sizeof (short) + 1); - (*data_ret) [sizeof (short)] = 0; - (*(short **) data_ret) [0] = (short) XINT (obj); - if (NILP (type)) type = QINTEGER; - } - else if (INTP (obj) || CONSP (obj)) - { - *format_ret = 32; - *size_ret = 1; - *data_ret = (unsigned char *) xmalloc (sizeof (long) + 1); - (*data_ret) [sizeof (long)] = 0; - (*(unsigned long **) data_ret) [0] = lisp_to_word (obj); - if (NILP (type)) type = QINTEGER; - } - else if (VECTORP (obj)) - { - /* Lisp Vectors may represent a set of ATOMs; - a set of 16 or 32 bit INTEGERs; - or a set of ATOM_PAIRs (represented as [[A1 A2] [A3 A4] ...] - */ - int i; - - if (SYMBOLP (XVECTOR_DATA (obj) [0])) - /* This vector is an ATOM set */ - { - if (NILP (type)) type = QATOM; - *size_ret = XVECTOR_LENGTH (obj); - *format_ret = 32; - *data_ret = (unsigned char *) xmalloc ((*size_ret) * sizeof (Atom)); - for (i = 0; i < (int) (*size_ret); i++) - if (SYMBOLP (XVECTOR_DATA (obj) [i])) - (*(Atom **) data_ret) [i] = - symbol_to_x_atom (d, XVECTOR_DATA (obj) [i], 0); - else - signal_error (Qerror, /* Qselection_error */ - list2 (build_string - ("all elements of the vector must be of the same type"), - obj)); - } -#if 0 /* #### MULTIPLE doesn't work yet */ - else if (VECTORP (XVECTOR_DATA (obj) [0])) - /* This vector is an ATOM_PAIR set */ - { - if (NILP (type)) type = QATOM_PAIR; - *size_ret = XVECTOR_LENGTH (obj); - *format_ret = 32; - *data_ret = (unsigned char *) - xmalloc ((*size_ret) * sizeof (Atom) * 2); - for (i = 0; i < *size_ret; i++) - if (VECTORP (XVECTOR_DATA (obj) [i])) - { - Lisp_Object pair = XVECTOR_DATA (obj) [i]; - if (XVECTOR_LENGTH (pair) != 2) - signal_error (Qerror, - list2 (build_string - ("elements of the vector must be vectors of exactly two elements"), - pair)); - - (*(Atom **) data_ret) [i * 2] = - symbol_to_x_atom (d, XVECTOR_DATA (pair) [0], 0); - (*(Atom **) data_ret) [(i * 2) + 1] = - symbol_to_x_atom (d, XVECTOR_DATA (pair) [1], 0); - } - else - signal_error (Qerror, - list2 (build_string - ("all elements of the vector must be of the same type"), - obj)); - } -#endif - else - /* This vector is an INTEGER set, or something like it */ - { - *size_ret = XVECTOR_LENGTH (obj); - if (NILP (type)) type = QINTEGER; - *format_ret = 16; - for (i = 0; i < (int) (*size_ret); i++) - if (CONSP (XVECTOR_DATA (obj) [i])) - *format_ret = 32; - else if (!INTP (XVECTOR_DATA (obj) [i])) - signal_error (Qerror, /* Qselection_error */ - list2 (build_string - ("all elements of the vector must be integers or conses of integers"), - obj)); - - *data_ret = (unsigned char *) xmalloc (*size_ret * (*format_ret/8)); - for (i = 0; i < (int) (*size_ret); i++) - if (*format_ret == 32) - (*((unsigned long **) data_ret)) [i] = - lisp_to_word (XVECTOR_DATA (obj) [i]); - else - (*((unsigned short **) data_ret)) [i] = - (unsigned short) lisp_to_word (XVECTOR_DATA (obj) [i]); - } - } - else - signal_error (Qerror, /* Qselection_error */ - list2 (build_string ("unrecognized selection data"), - obj)); - - *type_ret = symbol_to_x_atom (d, type, 0); -} - -static Lisp_Object -clean_local_selection_data (Lisp_Object obj) -{ - if (CONSP (obj) && - INTP (XCAR (obj)) && - CONSP (XCDR (obj)) && - INTP (XCAR (XCDR (obj))) && - NILP (XCDR (XCDR (obj)))) - obj = Fcons (XCAR (obj), XCDR (obj)); - - if (CONSP (obj) && - INTP (XCAR (obj)) && - INTP (XCDR (obj))) - { - if (XINT (XCAR (obj)) == 0) - return XCDR (obj); - if (XINT (XCAR (obj)) == -1) - return make_int (- XINT (XCDR (obj))); - } - if (VECTORP (obj)) - { - int i; - int len = XVECTOR_LENGTH (obj); - Lisp_Object copy; - if (len == 1) - return clean_local_selection_data (XVECTOR_DATA (obj) [0]); - copy = make_vector (len, Qnil); - for (i = 0; i < len; i++) - XVECTOR_DATA (copy) [i] = - clean_local_selection_data (XVECTOR_DATA (obj) [i]); - return copy; - } - return obj; -} - - -/* Called from the event loop to handle SelectionNotify events. - I don't think this needs to be reentrant. - */ -void -x_handle_selection_notify (XSelectionEvent *event) -{ - if (! reading_selection_reply) - message ("received an unexpected SelectionNotify event"); - else if (event->requestor != reading_selection_reply) - message ("received a SelectionNotify event for the wrong window"); - else if (event->selection != reading_which_selection) - message ("received the wrong selection type in SelectionNotify!"); - else - reading_selection_reply = 0; /* we're done now. */ -} - - -DEFUN ("x-own-selection-internal", Fx_own_selection_internal, 2, 2, 0, /* -Assert an X selection of the given TYPE with the given VALUE. -TYPE is a symbol, typically PRIMARY, SECONDARY, or CLIPBOARD. -VALUE is typically a string, or a cons of two markers, but may be -anything that the functions on selection-converter-alist know about. -*/ - (selection_name, selection_value)) -{ - CHECK_SYMBOL (selection_name); - if (NILP (selection_value)) error ("selection-value may not be nil."); - x_own_selection (selection_name, selection_value); - return selection_value; -} - - -/* Request the selection value from the owner. If we are the owner, - simply return our selection value. If we are not the owner, this - will block until all of the data has arrived. - */ -DEFUN ("x-get-selection-internal", Fx_get_selection_internal, 2, 2, 0, /* -Return text selected from some X window. -SELECTION_SYMBOL is a symbol, typically PRIMARY, SECONDARY, or CLIPBOARD. -TARGET_TYPE is the type of data desired, typically STRING or COMPOUND_TEXT. -Under Mule, if the resultant data comes back as 8-bit data in type -TEXT or COMPOUND_TEXT, it will be decoded as Compound Text. -*/ - (selection_symbol, target_type)) -{ - /* This function can GC */ - Lisp_Object val = Qnil; - struct gcpro gcpro1, gcpro2; - GCPRO2 (target_type, val); /* we store newly consed data into these */ - CHECK_SYMBOL (selection_symbol); - -#if 0 /* #### MULTIPLE doesn't work yet */ - if (CONSP (target_type) && - XCAR (target_type) == QMULTIPLE) - { - CHECK_VECTOR (XCDR (target_type)); - /* So we don't destructively modify this... */ - target_type = copy_multiple_data (target_type); - } - else -#endif - CHECK_SYMBOL (target_type); - - val = x_get_local_selection (selection_symbol, target_type); - - if (NILP (val)) - { - val = x_get_foreign_selection (selection_symbol, target_type); - } - else - { - if (CONSP (val) && SYMBOLP (XCAR (val))) - { - val = XCDR (val); - if (CONSP (val) && NILP (XCDR (val))) - val = XCAR (val); - } - val = clean_local_selection_data (val); - } - UNGCPRO; - return val; -} - -DEFUN ("x-disown-selection-internal", Fx_disown_selection_internal, 1, 2, 0, /* -If we own the named selection, then disown it (make there be no selection). -*/ - (selection, timeval)) -{ - struct device *d = decode_x_device (Qnil); - Display *display = DEVICE_X_DISPLAY (d); - Time timestamp; - Atom selection_atom; - XSelectionClearEvent event; - - CHECK_SYMBOL (selection); - if (NILP (timeval)) - timestamp = DEVICE_X_MOUSE_TIMESTAMP (d); - else - { - /* #### This is bogus. See the comment above about problems - on OSF/1 and DEC Alphas. Yet another reason why it sucks - to have the implementation (i.e. cons of two 16-bit - integers) exposed. */ - time_t the_time; - lisp_to_time (timeval, &the_time); - timestamp = (Time) the_time; - } - - if (NILP (assq_no_quit (selection, Vselection_alist))) - return Qnil; /* Don't disown the selection when we're not the owner. */ - - selection_atom = symbol_to_x_atom (d, selection, 0); - - XSetSelectionOwner (display, selection_atom, None, timestamp); - - /* It doesn't seem to be guaranteed that a SelectionClear event will be - generated for a window which owns the selection when that window sets - the selection owner to None. The NCD server does, the MIT Sun4 server - doesn't. So we synthesize one; this means we might get two, but - that's ok, because the second one won't have any effect. - */ - event.display = display; - event.selection = selection_atom; - event.time = timestamp; - x_handle_selection_clear (&event); - - return Qt; -} - - -DEFUN ("x-selection-owner-p", Fx_selection_owner_p, 0, 1, 0, /* -Return t if current emacs process owns the given X Selection. -The arg should be the name of the selection in question, typically one of -the symbols PRIMARY, SECONDARY, or CLIPBOARD. (For convenience, the symbol -nil is the same as PRIMARY, and t is the same as SECONDARY.) -*/ - (selection)) -{ - CHECK_SYMBOL (selection); - if (EQ (selection, Qnil)) selection = QPRIMARY; - else if (EQ (selection, Qt)) selection = QSECONDARY; - - return NILP (Fassq (selection, Vselection_alist)) ? Qnil : Qt; -} - -DEFUN ("x-selection-exists-p", Fx_selection_exists_p, 0, 1, 0, /* -Whether there is an owner for the given X Selection. -The arg should be the name of the selection in question, typically one of -the symbols PRIMARY, SECONDARY, or CLIPBOARD. (For convenience, the symbol -nil is the same as PRIMARY, and t is the same as SECONDARY.) -*/ - (selection)) -{ - struct device *d = decode_x_device (Qnil); - Display *dpy = DEVICE_X_DISPLAY (d); - CHECK_SYMBOL (selection); - if (!NILP (Fx_selection_owner_p (selection))) - return Qt; - return XGetSelectionOwner (dpy, symbol_to_x_atom (d, selection, 0)) != None ? - Qt : Qnil; -} - - -#ifdef CUT_BUFFER_SUPPORT - -static int cut_buffers_initialized; /* Whether we're sure they all exist */ - -/* Ensure that all 8 cut buffers exist. ICCCM says we gotta... */ -static void -initialize_cut_buffers (Display *display, Window window) -{ - static unsigned CONST char * CONST data = (unsigned CONST char *) ""; -#define FROB(atom) XChangeProperty (display, window, atom, XA_STRING, 8, \ - PropModeAppend, data, 0) - FROB (XA_CUT_BUFFER0); - FROB (XA_CUT_BUFFER1); - FROB (XA_CUT_BUFFER2); - FROB (XA_CUT_BUFFER3); - FROB (XA_CUT_BUFFER4); - FROB (XA_CUT_BUFFER5); - FROB (XA_CUT_BUFFER6); - FROB (XA_CUT_BUFFER7); -#undef FROB - cut_buffers_initialized = 1; -} - -#define CHECK_CUTBUFFER(symbol) \ - { CHECK_SYMBOL (symbol); \ - if (!EQ((symbol),QCUT_BUFFER0) && !EQ((symbol),QCUT_BUFFER1) && \ - !EQ((symbol),QCUT_BUFFER2) && !EQ((symbol),QCUT_BUFFER3) && \ - !EQ((symbol),QCUT_BUFFER4) && !EQ((symbol),QCUT_BUFFER5) && \ - !EQ((symbol),QCUT_BUFFER6) && !EQ((symbol),QCUT_BUFFER7)) \ - signal_error (Qerror, list2 (build_string ("Doesn't name a cutbuffer"), \ - (symbol))); \ - } - -DEFUN ("x-get-cutbuffer-internal", Fx_get_cutbuffer_internal, 1, 1, 0, /* -Return the value of the named CUTBUFFER (typically CUT_BUFFER0). -*/ - (cutbuffer)) -{ - struct device *d = decode_x_device (Qnil); - Display *display = DEVICE_X_DISPLAY (d); - Window window = RootWindow (display, 0); /* Cutbuffers are on frame 0 */ - Atom cut_buffer_atom; - unsigned char *data; - int bytes; - Atom type; - int format; - unsigned long size; - Lisp_Object ret; - - CHECK_CUTBUFFER (cutbuffer); - cut_buffer_atom = symbol_to_x_atom (d, cutbuffer, 0); - - x_get_window_property (display, window, cut_buffer_atom, &data, &bytes, - &type, &format, &size, 0); - if (!data) return Qnil; - - if (format != 8 || type != XA_STRING) - signal_simple_error_2 ("Cut buffer doesn't contain 8-bit STRING data", - x_atom_to_symbol (d, type), - make_int (format)); - - /* We cheat - if the string contains an ESC character, that's - technically not allowed in a STRING, so we assume it's - COMPOUND_TEXT that we stored there ourselves earlier, - in x-store-cutbuffer-internal */ - ret = (bytes ? - make_ext_string (data, bytes, - memchr (data, 0x1b, bytes) ? - FORMAT_CTEXT : FORMAT_BINARY) - : Qnil); - xfree (data); - return ret; -} - - -DEFUN ("x-store-cutbuffer-internal", Fx_store_cutbuffer_internal, 2, 2, 0, /* -Set the value of the named CUTBUFFER (typically CUT_BUFFER0) to STRING. -*/ - (cutbuffer, string)) -{ - struct device *d = decode_x_device (Qnil); - Display *display = DEVICE_X_DISPLAY (d); - Window window = RootWindow (display, 0); /* Cutbuffers are on frame 0 */ - Atom cut_buffer_atom; - CONST Extbyte *data = XSTRING_DATA (string); - Extcount bytes = XSTRING_LENGTH (string); - Extcount bytes_remaining; - int max_bytes = SELECTION_QUANTUM (display); -#ifdef MULE - CONST Bufbyte *ptr, *end; - enum { ASCII, LATIN_1, WORLD } chartypes = ASCII; -#endif - - if (max_bytes > MAX_SELECTION_QUANTUM) - max_bytes = MAX_SELECTION_QUANTUM; - - CHECK_CUTBUFFER (cutbuffer); - CHECK_STRING (string); - cut_buffer_atom = symbol_to_x_atom (d, cutbuffer, 0); - - if (! cut_buffers_initialized) - initialize_cut_buffers (display, window); - - /* We use the STRING encoding (Latin-1 only) if we can, else COMPOUND_TEXT. - We cheat and use type = `STRING' even when using COMPOUND_TEXT. - The ICCCM requires that this be so, and other clients assume it, - as we do ourselves in initialize_cut_buffers. */ - -#ifdef MULE - /* Optimize for the common ASCII case */ - for (ptr = data, end = ptr + bytes; ptr <= end; ) - { - if (BYTE_ASCII_P (*ptr)) - { - ptr++; - continue; - } - - if ((*ptr) == LEADING_BYTE_LATIN_ISO8859_1 || - (*ptr) == LEADING_BYTE_CONTROL_1) - { - chartypes = LATIN_1; - ptr += 2; - continue; - } - - chartypes = WORLD; - break; - } - - if (chartypes == LATIN_1) - GET_STRING_BINARY_DATA_ALLOCA (string, data, bytes); - else if (chartypes == WORLD) - GET_STRING_CTEXT_DATA_ALLOCA (string, data, bytes); -#endif /* MULE */ - - bytes_remaining = bytes; - - while (bytes_remaining) - { - int chunk = bytes_remaining < max_bytes ? bytes_remaining : max_bytes; - XChangeProperty (display, window, cut_buffer_atom, XA_STRING, 8, - (bytes_remaining == bytes - ? PropModeReplace : PropModeAppend), - data, chunk); - data += chunk; - bytes_remaining -= chunk; - } - return string; -} - - -DEFUN ("x-rotate-cutbuffers-internal", Fx_rotate_cutbuffers_internal, 1, 1, 0, /* -Rotate the values of the cutbuffers by the given number of steps; -positive means move values forward, negative means backward. -*/ - (n)) -{ - struct device *d = decode_x_device (Qnil); - Display *display = DEVICE_X_DISPLAY (d); - Window window = RootWindow (display, 0); /* Cutbuffers are on frame 0 */ - Atom props [8]; - - CHECK_INT (n); - if (XINT (n) == 0) - return n; - if (! cut_buffers_initialized) - initialize_cut_buffers (display, window); - props[0] = XA_CUT_BUFFER0; - props[1] = XA_CUT_BUFFER1; - props[2] = XA_CUT_BUFFER2; - props[3] = XA_CUT_BUFFER3; - props[4] = XA_CUT_BUFFER4; - props[5] = XA_CUT_BUFFER5; - props[6] = XA_CUT_BUFFER6; - props[7] = XA_CUT_BUFFER7; - XRotateWindowProperties (display, window, props, 8, XINT (n)); - return n; -} - -#endif /* CUT_BUFFER_SUPPORT */ - - - -/************************************************************************/ -/* initialization */ -/************************************************************************/ - -void -syms_of_xselect (void) -{ - DEFSUBR (Fx_get_selection_internal); - DEFSUBR (Fx_own_selection_internal); - DEFSUBR (Fx_disown_selection_internal); - DEFSUBR (Fx_selection_owner_p); - DEFSUBR (Fx_selection_exists_p); - -#ifdef CUT_BUFFER_SUPPORT - DEFSUBR (Fx_get_cutbuffer_internal); - DEFSUBR (Fx_store_cutbuffer_internal); - DEFSUBR (Fx_rotate_cutbuffers_internal); -#endif /* CUT_BUFFER_SUPPORT */ - - /* Unfortunately, timeout handlers must be lisp functions. */ - defsymbol (&Qx_selection_reply_timeout_internal, - "x-selection-reply-timeout-internal"); - DEFSUBR (Fx_selection_reply_timeout_internal); - - defsymbol (&QPRIMARY, "PRIMARY"); - defsymbol (&QSECONDARY, "SECONDARY"); - defsymbol (&QSTRING, "STRING"); - defsymbol (&QINTEGER, "INTEGER"); - defsymbol (&QCLIPBOARD, "CLIPBOARD"); - defsymbol (&QTIMESTAMP, "TIMESTAMP"); - defsymbol (&QTEXT, "TEXT"); - defsymbol (&QDELETE, "DELETE"); - defsymbol (&QMULTIPLE, "MULTIPLE"); - defsymbol (&QINCR, "INCR"); - defsymbol (&QEMACS_TMP, "_EMACS_TMP_"); - defsymbol (&QTARGETS, "TARGETS"); - defsymbol (&QATOM, "ATOM"); - defsymbol (&QATOM_PAIR, "ATOM_PAIR"); - defsymbol (&QCOMPOUND_TEXT, "COMPOUND_TEXT"); - defsymbol (&QNULL, "NULL"); - -#ifdef CUT_BUFFER_SUPPORT - defsymbol (&QCUT_BUFFER0, "CUT_BUFFER0"); - defsymbol (&QCUT_BUFFER1, "CUT_BUFFER1"); - defsymbol (&QCUT_BUFFER2, "CUT_BUFFER2"); - defsymbol (&QCUT_BUFFER3, "CUT_BUFFER3"); - defsymbol (&QCUT_BUFFER4, "CUT_BUFFER4"); - defsymbol (&QCUT_BUFFER5, "CUT_BUFFER5"); - defsymbol (&QCUT_BUFFER6, "CUT_BUFFER6"); - defsymbol (&QCUT_BUFFER7, "CUT_BUFFER7"); -#endif /* CUT_BUFFER_SUPPORT */ - - deferror (&Qselection_conversion_error, - "selection-conversion-error", - "selection-conversion error", Qio_error); -} - -void -vars_of_xselect (void) -{ -#ifdef CUT_BUFFER_SUPPORT - cut_buffers_initialized = 0; - Fprovide (intern ("cut-buffer")); -#endif - - reading_selection_reply = 0; - reading_which_selection = 0; - selection_reply_timed_out = 0; - for_whom_the_bell_tolls = 0; - prop_location_tick = 0; - - Vselection_alist = Qnil; - staticpro (&Vselection_alist); - - DEFVAR_LISP ("selection-converter-alist", &Vselection_converter_alist /* -An alist associating selection-types (such as STRING and TIMESTAMP) with -functions. These functions will be called with three args: the name of the -selection (typically PRIMARY, SECONDARY, or CLIPBOARD); a desired type to -which the selection should be converted; and the local selection value - (whatever had been passed to `x-own-selection'). These functions should -return the value to send to the X server, which should be one of: - --- nil (the conversion could not be done) --- a cons of a symbol and any of the following values; the symbol - explicitly specifies the type that will be sent. --- a string (If the type is not specified, then if Mule support exists, - the string will be converted to Compound Text and sent in - the 'COMPOUND_TEXT format; otherwise (no Mule support), - the string will be left as-is and sent in the 'STRING - format. If the type is specified, the string will be - left as-is (or converted to binary format under Mule). - In all cases, 8-bit data it sent.) --- a character (With Mule support, will be converted to Compound Text - whether or not a type is specified. If a type is not - specified, a type of 'STRING or 'COMPOUND_TEXT will be - sent, as for strings.) --- the symbol 'NULL (Indicates that there is no meaningful return value. - Empty 32-bit data with a type of 'NULL will be sent.) --- a symbol (Will be converted into an atom. If the type is not specified, - a type of 'ATOM will be sent.) --- an integer (Will be converted into a 16-bit or 32-bit integer depending - on the value. If the type is not specified, a type of - 'INTEGER will be sent.) --- a cons (HIGH . LOW) of integers (Will be converted into a 32-bit integer. - If the type is not specified, a type of - 'INTEGER will be sent.) --- a vector of symbols (Will be converted into a list of atoms. If the type - is not specified, a type of 'ATOM will be sent.) --- a vector of integers (Will be converted into a list of 16-bit integers. - If the type is not specified, a type of 'INTEGER - will be sent.) --- a vector of integers and/or conses (HIGH . LOW) of integers - (Will be converted into a list of 16-bit integers. - If the type is not specified, a type of 'INTEGER - will be sent.) -*/ ); - Vselection_converter_alist = Qnil; - - DEFVAR_LISP ("x-lost-selection-hooks", &Vx_lost_selection_hooks /* -A function or functions to be called after the X server has notified us -that we have lost the selection. The function(s) will be called with one -argument, a symbol naming the selection (typically PRIMARY, SECONDARY, or -CLIPBOARD). -*/ ); - Vx_lost_selection_hooks = Qunbound; - - DEFVAR_LISP ("x-sent-selection-hooks", &Vx_sent_selection_hooks /* -A function or functions to be called after we have responded to some -other client's request for the value of a selection that we own. The -function(s) will be called with four arguments: - - the name of the selection (typically PRIMARY, SECONDARY, or CLIPBOARD); - - the name of the selection-type which we were requested to convert the - selection into before sending (for example, STRING or LENGTH); - - and whether we successfully transmitted the selection. -We might have failed (and declined the request) for any number of reasons, -including being asked for a selection that we no longer own, or being asked -to convert into a type that we don't know about or that is inappropriate. -This hook doesn't let you change the behavior of emacs's selection replies, -it merely informs you that they have happened. -*/ ); - Vx_sent_selection_hooks = Qunbound; - - DEFVAR_INT ("x-selection-timeout", &x_selection_timeout /* -If the selection owner doesn't reply in this many seconds, we give up. -A value of 0 means wait as long as necessary. This is initialized from the -\"*selectionTimeout\" resource (which is expressed in milliseconds). -*/ ); - x_selection_timeout = 0; -} - -void -Xatoms_of_xselect (struct device *d) -{ - Display *D = DEVICE_X_DISPLAY (d); - - /* Non-predefined atoms that we might end up using a lot */ - DEVICE_XATOM_CLIPBOARD (d) = XInternAtom (D, "CLIPBOARD", False); - DEVICE_XATOM_TIMESTAMP (d) = XInternAtom (D, "TIMESTAMP", False); - DEVICE_XATOM_TEXT (d) = XInternAtom (D, "TEXT", False); - DEVICE_XATOM_DELETE (d) = XInternAtom (D, "DELETE", False); - DEVICE_XATOM_MULTIPLE (d) = XInternAtom (D, "MULTIPLE", False); - DEVICE_XATOM_INCR (d) = XInternAtom (D, "INCR", False); - DEVICE_XATOM_TARGETS (d) = XInternAtom (D, "TARGETS", False); - DEVICE_XATOM_NULL (d) = XInternAtom (D, "NULL", False); - DEVICE_XATOM_ATOM_PAIR (d) = XInternAtom (D, "ATOM_PAIR", False); - DEVICE_XATOM_COMPOUND_TEXT (d) = XInternAtom (D, "COMPOUND_TEXT", False); - DEVICE_XATOM_EMACS_TMP (d) = XInternAtom (D, "_EMACS_TMP_", False); -} diff --git a/tests/ChangeLog b/tests/ChangeLog index 909e4df..17c3971 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +1999-05-27 Hrvoje Niksic <hniksic@srce.hr> + + * automated/base64-tests.el: New file. + 1999-05-14 XEmacs Build Bot <builds@cvs.xemacs.org> * XEmacs 21.2.14 is released diff --git a/version.sh b/version.sh index 73ba99c..1d410f8 100644 --- a/version.sh +++ b/version.sh @@ -1,4 +1,5 @@ #!/bin/sh +emacs_is_beta=t emacs_major_version=21 emacs_minor_version=2 emacs_beta_version=14