Mercurial > hg > xemacs-beta
changeset 280:7df0dd720c89 r21-0b38
Import from CVS: tag r21-0b38
line wrap: on
line diff
--- a/CHANGES-beta Mon Aug 13 10:31:30 2007 +0200 +++ b/CHANGES-beta Mon Aug 13 10:32:22 2007 +0200 @@ -1,4 +1,34 @@ -*- indented-text -*- +to 21.0 beta38 "Repartida" +-- apropos.el modernization +-- Documentation updates from Hrvoje Niksic +-- range table fix from Olivier Galibert +-- Various changes from Andy Piper +-- Magic specifier fixes from Kirill Katsnelson +-- Various changes from Hrvoje Niksic +-- print changes/find-file changes from Hrvoje Niksic +-- source formatting changes from Martin Buchholz +-- font handling for W3 under MS Windows from Andy Piper +-- Xpm color symbol support for MS Windows from Andy Piper +-- keyboard macro fixes from Hrvoje Niksic +-- MS Windows Signal fix from Kirill Katsnelson +-- All GIFs in core distribution converted to PNGs -- screw Unisys +-- More build tweaks +-- Make line-number-mode/column-number-mode appear in minor mode menu from + Jim Radford +-- General toolbar fixes from Kirill Katsnelson +-- Selection patches from Andy Piper +-- background pixmaps in MS Windows from Andy Piper +-- Startup patches from Michael Sperber +-- Signalling support for MS Windows from Kirill Katsnelson +-- Startup tweaks +-- PNG crash fix from Jareth Hein +-- Keyboard Focus sanity from Greg Klanderman +-- LDAP fixes from Oscar Figueiredo +-- Fix Lisp union type on MS Windows from Andy Piper +-- Miscellaneous patches from Jonathan Harris, Kirill Katsnelson +-- Build clean up + to 21.0 beta37 "Pygmy" -- Bug fixes, generalization of image code from Andy Piper -- Installation/startup fixes from Michael Sperber
--- a/ChangeLog Mon Aug 13 10:31:30 2007 +0200 +++ b/ChangeLog Mon Aug 13 10:32:22 2007 +0200 @@ -1,3 +1,30 @@ +1998-05-02 SL Baur <steve@altair.xemacs.org> + + * XEmacs 21.0-beta38 is released. + +1998-04-29 SL Baur <steve@altair.xemacs.org> + + * configure.in: Use `PROGNAME' for all generated paths. + + * Makefile.in: Change `progname' to `PROGNAME' for consistency. + +1998-04-27 SL Baur <steve@altair.xemacs.org> + + * configure.in (progname): Parameterize program name on `progname' + and add --with-infodock. + +1998-04-26 SL Baur <steve@altair.xemacs.org> + + * Makefile.in: Religiously use ${progname} instead of hardcoded + `xemacs'. + CPPFLAGS was being set correctly in ${subdir}/Makefiles and + overridden by the empty one set in the toplevel Makefile. + +1998-04-26 Jason R Mastaler <jason@4b.org> + + * etc/BETA: Replaced SmartList references in favor of + Majordomo. + 1998-04-25 SL Baur <steve@altair.xemacs.org> * XEmacs-21.0-beta37 is released.
--- a/Makefile.in Mon Aug 13 10:31:30 2007 +0200 +++ b/Makefile.in Mon Aug 13 10:32:22 2007 +0200 @@ -62,6 +62,7 @@ CPP=@CPP@ LN_S=@LN_S@ CFLAGS=@CFLAGS@ +CPPFLAGS=@CPPFLAGS@ ## These help us choose version- and architecture-specific directories ## to install files in. @@ -74,6 +75,10 @@ ## for, like `mips-dec-ultrix' or `sparc-sun-sunos'. configuration=@configuration@ +## This will be the name of the generated binary and is set automatically +## by configure. +PROGNAME=@PROGNAME@ + ## ==================== Where To Install Things ==================== ## The default location for installation. Everything is placed in @@ -135,8 +140,6 @@ ## These variables hold the values XEmacs will actually use. They are ## based on the values of the standard Make variables above. -progname=xemacs - ## Where to install the lisp files distributed with ## XEmacs. This includes the XEmacs version, so that the ## lisp files for different versions of XEmacs will install @@ -211,9 +214,9 @@ GENERATED_HEADERS = src/paths.h src/Emacs.ad.h src/puresize-adjust.h src/config.h lwlib/config.h src/sheap-adjust.h GENERATED_LISP = lisp/finder-inf.el -all: xemacs all-elc info +all: ${PROGNAME} all-elc info -xemacs: ${GENERATED_HEADERS} ${MAKE_SUBDIR} ${GENERATED_LISP} +${PROGNAME}: ${GENERATED_HEADERS} ${MAKE_SUBDIR} ${GENERATED_LISP} ## For performance and consistency, no built-in rules .SUFFIXES: @@ -249,22 +252,22 @@ ## Build XEmacs and recompile out-of-date and missing .elc files along ## the way. all-elc all-elcs: lib-src lwlib dump-elcs src - MAKE='$(MAKE)' sh ${srcdir}/lib-src/update-elc.sh + MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-elc.sh ## Sub-target for all-elc. dump-elc dump-elcs: ${GENERATED_HEADERS} FRC.dump-elcs cd src && $(RECURSIVE_MAKE) dump-elcs autoloads: src - MAKE='$(MAKE)' sh ${srcdir}/lib-src/update-autoloads.sh + MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-autoloads.sh custom-loads: - MAKE='$(MAKE)' sh ${srcdir}/lib-src/update-custom.sh + MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-custom.sh finder: src @echo "Building finder database ..." @(cd lisp; \ - ${blddir}/src/xemacs -batch -vanilla \ + ${blddir}/src/${PROGNAME} -batch -vanilla \ -eval '(setq finder-compile-keywords-quiet t)' \ -l finder -f finder-compile-keywords ) @echo "Building finder database ...(done)" @@ -272,7 +275,7 @@ lisp/finder-inf.el: @echo "Building finder database ..." @(cd lisp; \ - ${blddir}/src/xemacs -batch -vanilla \ + ${blddir}/src/${PROGNAME} -batch -vanilla \ -eval '(setq finder-compile-keywords-quiet t)' \ -l finder -f finder-compile-keywords ) @echo "Building finder database ...(done)" @@ -363,7 +366,7 @@ ## all. --cet check-features: all - ${blddir}/src/xemacs -batch -l check-features.el + ${blddir}/src/${PROGNAME} -batch -l check-features.el install-only: ${MAKE_SUBDIR} check-features install-arch-dep install-arch-indep @@ -384,15 +387,15 @@ for subdir in `find ${archlibdir} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; \ do (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; done ; \ else true; fi - ${INSTALL_PROGRAM} src/xemacs ${bindir}/${progname}-${version} - -chmod 0755 ${bindir}/${progname}-${version} - cd ${bindir} && $(RM) ./xemacs && ${LN_S} ${progname}-${version} ./xemacs + ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version} + -chmod 0755 ${bindir}/${PROGNAME}-${version} + cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME} if test "${prefix}" != "${exec_prefix}"; then \ for dir in \ - lib/xemacs \ - lib/${progname}-${version}/etc \ - lib/${progname}-${version}/info \ - lib/${progname}-${version}/lisp; do \ + lib/${PROGNAME} \ + lib/${PROGNAME}-${version}/etc \ + lib/${PROGNAME}-${version}/info \ + lib/${PROGNAME}-${version}/lisp; do \ if test ! -d ${exec_prefix}/$${dir}; then \ $(LN_S) ${prefix}/$${dir} ${exec_prefix}/$${dir}; fi; \ done; \ @@ -431,6 +434,7 @@ chmod 0644 ${infodir}/$${file}; \ done ; \ fi + ## Note it's `xemacs' not ${PROGNAME} cd ${srcdir}/etc && \ for page in xemacs etags ctags gnuserv gnuclient gnuattach gnudoit; do \ ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \ @@ -449,7 +453,7 @@ MAKEPATH=./lib-src/make-path ## Build all the directories to install XEmacs in. ## Since we may be creating several layers of directories, -## (e.g. /usr/local/lib/${progname}-20.5/sparc-sun-solaris2.6), we use +## (e.g. /usr/local/lib/${PROGNAME}-20.5/sparc-sun-solaris2.6), we use ## make-path instead of mkdir. Not all mkdirs have the `-p' flag. mkdir: FRC.mkdir ${MAKEPATH} ${COPYDESTS} ${lockdir} ${infodir} ${archlibdir} \ @@ -474,14 +478,14 @@ # * ) $(RM) $${dir} ;; \ # esac ; \ # case $${dir} in \ -# ${datadir}/xemacs/${version}/* ) \ -# $(RM) -r ${datadir}/xemacs/${version} \ +# ${datadir}/${PROGNAME}/${version}/* ) \ +# $(RM) -r ${datadir}/${PROGNAME}/${version} \ # ;; \ # esac ; \ # done -# cd ${infodir} && $(RM) cl* xemacs* forms* info* vip* +# cd ${infodir} && $(RM) cl* ${PROGNAME}* forms* info* vip* # cd ${mandir} && $(RM) xemacs.1 etags.1 ctags.1 gnuserv.1 -# cd ${bindir} && $(RM) ${progname}-${version} xemacs +# cd ${bindir} && $(RM) ${PROGNAME}-${version} ${PROGNAME} ## Some makes seem to remember that they've built something called FRC, @@ -604,7 +608,7 @@ tests = ${testdir}/basic-lisp.el ${testdir}/database.el check: - src/xemacs -batch -l ${testdir}/test-emacs.el -f batch-test-emacs ${tests} + src/${PROGNAME} -batch -l ${testdir}/test-emacs.el -f batch-test-emacs ${tests} info: FRC.info cd ${srcdir}/man && $(RECURSIVE_MAKE) $@ @@ -616,6 +620,6 @@ mcs: date=`LANG=C LC_ALL=C date -u '+%e %b %Y'`; \ ident="@(#)RELEASE VERSION XEmacs ${version} $${date}"; \ - for f in `file lib-src/* src/xemacs | grep ELF | sed -e 's/:.*//'`; do \ + for f in `file lib-src/* src/${PROGNAME} | grep ELF | sed -e 's/:.*//'`; do \ mcs -da "$${ident} `echo $${f} | sed 's/.*\///'`" $${f}; \ done
--- a/configure Mon Aug 13 10:31:30 2007 +0200 +++ b/configure Mon Aug 13 10:32:22 2007 +0200 @@ -217,15 +217,15 @@ statedir='${prefix}/lib' libdir='${exec_prefix}/lib' mandir='${prefix}/man/man1' -infodir='${datadir}/xemacs-${version}/info' +infodir='${datadir}/${PROGNAME}-${version}/info' infopath='' install_pp='' -lispdir='${datadir}/xemacs-${version}/lisp' -pkgdir='${datadir}/xemacs-${version}/lisp' +lispdir='${datadir}/${PROGNAME}-${version}/lisp' +pkgdir='${datadir}/${PROGNAME}-${version}/lisp' package_path='' -etcdir='${datadir}/xemacs-${version}/etc' -lockdir='${statedir}/xemacs/lock' -archlibdir='${libdir}/xemacs-${version}/${configuration}' +etcdir='${datadir}/${PROGNAME}-${version}/etc' +lockdir='${statedir}/${PROGNAME}/lock' +archlibdir='${libdir}/${PROGNAME}-${version}/${configuration}' with_site_lisp='no' with_menubars='' with_scrollbars='' @@ -332,6 +332,7 @@ with_kerberos | \ with_hesiod | \ with_dnet | \ + with_infodock | \ external_widget | \ verbose | \ extra_verbose | \ @@ -735,7 +736,7 @@ if test -z "$configuration"; then echo $ac_n "checking "host system type"""... $ac_c" 1>&6 -echo "configure:739: checking "host system type"" >&5 +echo "configure:740: checking "host system type"" >&5 if configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess | \ sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` ; then echo "$ac_t""$configuration" 1>&6 @@ -749,7 +750,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:753: checking whether ln -s works" >&5 +echo "configure:754: checking whether ln -s works" >&5 rm -f conftestdata if ln -s X conftestdata 2>/dev/null @@ -852,7 +853,15 @@ } -{ test "$extra_verbose" = "yes" && cat << EOF +if test "$with_infodock" = "yes"; then + if test ! -f ../InfoDock.rules; then + echo "Cannot build InfoDock without InfoDock sources" + with_infodock=no + fi +fi + +if test "$with_infodock" = "yes"; then + { test "$extra_verbose" = "yes" && cat << EOF Defining INFODOCK_MAJOR_VERSION = $infodock_major_version EOF cat >> confdefs.h <<EOF @@ -860,7 +869,7 @@ EOF } -{ test "$extra_verbose" = "yes" && cat << EOF + { test "$extra_verbose" = "yes" && cat << EOF Defining INFODOCK_MINOR_VERSION = $infodock_minor_version EOF cat >> confdefs.h <<EOF @@ -868,7 +877,7 @@ EOF } -{ test "$extra_verbose" = "yes" && cat << EOF + { test "$extra_verbose" = "yes" && cat << EOF Defining INFODOCK_BUILD_VERSION = $infodock_build_version EOF cat >> confdefs.h <<EOF @@ -876,6 +885,12 @@ EOF } + version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version} + PROGNAME=infodock + CPPFLAGS="$CPPFLAGS -DINFODOCK" +else + PROGNAME=xemacs +fi if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi test "${error_check_extents=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF @@ -951,7 +966,7 @@ echo "checking "the configuration name"" 1>&6 -echo "configure:955: checking "the configuration name"" >&5 +echo "configure:970: checking "the configuration name"" >&5 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else exit $? @@ -1356,7 +1371,7 @@ case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac -stack_trace_eye_catcher=`echo xemacs_${version}_${canonical} | sed 'y/.-/__/'` +stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'` { test "$extra_verbose" = "yes" && cat << EOF Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher EOF @@ -1415,7 +1430,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1419: checking for $ac_word" >&5 +echo "configure:1434: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1441,7 +1456,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1445: checking for $ac_word" >&5 +echo "configure:1460: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1486,7 +1501,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1490: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1505: 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' @@ -1498,11 +1513,11 @@ cross_compiling=no cat > conftest.$ac_ext <<EOF -#line 1502 "configure" +#line 1517 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 @@ -1522,19 +1537,19 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1526: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1541: 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:1531: checking whether we are using GNU C" >&5 +echo "configure:1546: checking whether we are using GNU C" >&5 cat > conftest.c <<EOF #ifdef __GNUC__ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1553: \"$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 @@ -1548,7 +1563,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1552: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1567: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1577,7 +1592,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1581: checking for $ac_word" >&5 +echo "configure:1596: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1603,7 +1618,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1607: checking for $ac_word" >&5 +echo "configure:1622: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1648,7 +1663,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1652: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1667: 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' @@ -1660,11 +1675,11 @@ cross_compiling=no cat > conftest.$ac_ext <<EOF -#line 1664 "configure" +#line 1679 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 @@ -1684,19 +1699,19 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1688: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1703: 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:1693: checking whether we are using GNU C" >&5 +echo "configure:1708: checking whether we are using GNU C" >&5 cat > conftest.c <<EOF #ifdef __GNUC__ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1715: \"$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 @@ -1710,7 +1725,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1714: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1729: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1739,7 +1754,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1743: checking for $ac_word" >&5 +echo "configure:1758: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1765,7 +1780,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1769: checking for $ac_word" >&5 +echo "configure:1784: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1810,7 +1825,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1814: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1829: 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' @@ -1822,11 +1837,11 @@ cross_compiling=no cat > conftest.$ac_ext <<EOF -#line 1826 "configure" +#line 1841 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1830: \"$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; 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 @@ -1846,19 +1861,19 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1850: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1865: 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:1855: checking whether we are using GNU C" >&5 +echo "configure:1870: checking whether we are using GNU C" >&5 cat > conftest.c <<EOF #ifdef __GNUC__ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1877: \"$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 @@ -1872,7 +1887,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1876: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1891: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1905,7 +1920,7 @@ test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1909: checking how to run the C preprocessor" >&5 +echo "configure:1924: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1918,13 +1933,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1922 "configure" +#line 1937 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1935,13 +1950,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1939 "configure" +#line 1954 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1964,9 +1979,9 @@ echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:1968: checking for AIX" >&5 -cat > conftest.$ac_ext <<EOF -#line 1970 "configure" +echo "configure:1983: checking for AIX" >&5 +cat > conftest.$ac_ext <<EOF +#line 1985 "configure" #include "confdefs.h" #ifdef _AIX yes @@ -1993,9 +2008,9 @@ echo $ac_n "checking for GNU libc""... $ac_c" 1>&6 -echo "configure:1997: checking for GNU libc" >&5 -cat > conftest.$ac_ext <<EOF -#line 1999 "configure" +echo "configure:2012: checking for GNU libc" >&5 +cat > conftest.$ac_ext <<EOF +#line 2014 "configure" #include "confdefs.h" #include <features.h> int main() { @@ -2007,7 +2022,7 @@ ; return 0; } EOF -if { (eval echo configure:2011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* have_glibc=yes else @@ -2028,9 +2043,9 @@ echo $ac_n "checking whether we are using SunPro C""... $ac_c" 1>&6 -echo "configure:2032: checking whether we are using SunPro C" >&5 -cat > conftest.$ac_ext <<EOF -#line 2034 "configure" +echo "configure:2047: checking whether we are using SunPro C" >&5 +cat > conftest.$ac_ext <<EOF +#line 2049 "configure" #include "confdefs.h" int main() { @@ -2041,7 +2056,7 @@ ; return 0; } EOF -if { (eval echo configure:2045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* __sunpro_c=yes else @@ -2315,7 +2330,7 @@ fi echo $ac_n "checking for dynodump""... $ac_c" 1>&6 -echo "configure:2319: checking for dynodump" >&5 +echo "configure:2334: checking for dynodump" >&5 if test "$unexec" != "unexsol2.o"; then echo "$ac_t""no" 1>&6 else @@ -2415,7 +2430,7 @@ if test "$add_runtime_path" = "yes"; then echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 -echo "configure:2419: checking "for runtime libraries flag"" >&5 +echo "configure:2434: checking "for runtime libraries flag"" >&5 dash_r="" for try_dash_r in "-R" "-R " "-rpath "; do xe_check_libs="${try_dash_r}/no/such/file-or-directory" @@ -2433,14 +2448,14 @@ done fi cat > conftest.$ac_ext <<EOF -#line 2437 "configure" -#include "confdefs.h" - -int main() { - -; return 0; } -EOF -if { (eval echo configure:2444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +#line 2452 "configure" +#include "confdefs.h" + +int main() { + +; return 0; } +EOF +if { (eval echo configure:2459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* dash_r="$try_dash_r" else @@ -2540,10 +2555,10 @@ fi after_morecore_hook_exists=yes echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6 -echo "configure:2544: checking for malloc_get_state" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2547 "configure" +echo "configure:2559: checking for malloc_get_state" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2562 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char malloc_get_state(); below. */ @@ -2566,7 +2581,7 @@ ; return 0; } EOF -if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_malloc_get_state=yes" else @@ -2586,10 +2601,10 @@ fi echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 -echo "configure:2590: checking for malloc_set_state" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2593 "configure" +echo "configure:2605: checking for malloc_set_state" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2608 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char malloc_set_state(); below. */ @@ -2612,7 +2627,7 @@ ; return 0; } EOF -if { (eval echo configure:2616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_malloc_set_state=yes" else @@ -2632,16 +2647,16 @@ fi echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 -echo "configure:2636: checking whether __after_morecore_hook exists" >&5 -cat > conftest.$ac_ext <<EOF -#line 2638 "configure" +echo "configure:2651: checking whether __after_morecore_hook exists" >&5 +cat > conftest.$ac_ext <<EOF +#line 2653 "configure" #include "confdefs.h" extern void (* __after_morecore_hook)(); int main() { __after_morecore_hook = 0 ; return 0; } EOF -if { (eval echo configure:2645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2700,7 +2715,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2704: checking for $ac_word" >&5 +echo "configure:2719: checking for $ac_word" >&5 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -2753,7 +2768,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:2757: checking for a BSD compatible install" >&5 +echo "configure:2772: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" @@ -2804,7 +2819,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2808: checking for $ac_word" >&5 +echo "configure:2823: checking for $ac_word" >&5 if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. @@ -2835,15 +2850,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2839: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2842 "configure" +echo "configure:2854: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2857 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2876,15 +2891,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2880: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2883 "configure" +echo "configure:2895: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2898 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2917,15 +2932,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2921: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2924 "configure" +echo "configure:2936: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2939 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2955,10 +2970,10 @@ done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2959: checking for sys/wait.h that is POSIX.1 compatible" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2962 "configure" +echo "configure:2974: checking for sys/wait.h that is POSIX.1 compatible" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2977 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/wait.h> @@ -2974,7 +2989,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2998,10 +3013,10 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3002: checking for ANSI C header files" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3005 "configure" +echo "configure:3017: checking for ANSI C header files" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3020 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -3009,7 +3024,7 @@ #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3026,7 +3041,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 3030 "configure" +#line 3045 "configure" #include "confdefs.h" #include <string.h> EOF @@ -3044,7 +3059,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 3048 "configure" +#line 3063 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -3062,7 +3077,7 @@ if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. cat > conftest.$ac_ext <<EOF -#line 3066 "configure" +#line 3081 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3073,7 +3088,7 @@ exit (0); } EOF -if { (eval echo configure:3077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then : else @@ -3098,10 +3113,10 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3102: checking whether time.h and sys/time.h may both be included" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3105 "configure" +echo "configure:3117: checking whether time.h and sys/time.h may both be included" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3120 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -3110,7 +3125,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3134,10 +3149,10 @@ fi echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:3138: checking for sys_siglist declaration in signal.h or unistd.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3141 "configure" +echo "configure:3153: checking for sys_siglist declaration in signal.h or unistd.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3156 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -3149,7 +3164,7 @@ char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:3153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -3174,9 +3189,9 @@ echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6 -echo "configure:3178: checking for struct utimbuf" >&5 -cat > conftest.$ac_ext <<EOF -#line 3180 "configure" +echo "configure:3193: checking for struct utimbuf" >&5 +cat > conftest.$ac_ext <<EOF +#line 3195 "configure" #include "confdefs.h" #ifdef TIME_WITH_SYS_TIME #include <sys/time.h> @@ -3195,7 +3210,7 @@ static struct utimbuf x; x.actime = x.modtime; ; return 0; } EOF -if { (eval echo configure:3199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3214: \"$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 @@ -3215,10 +3230,10 @@ rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3219: checking return type of signal handlers" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3222 "configure" +echo "configure:3234: checking return type of signal handlers" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3237 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -3235,7 +3250,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:3239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3257,10 +3272,10 @@ echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3261: checking for size_t" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3264 "configure" +echo "configure:3276: checking for size_t" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3279 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3291,10 +3306,10 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3295: checking for pid_t" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3298 "configure" +echo "configure:3310: checking for pid_t" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3313 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3325,10 +3340,10 @@ fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3329: checking for uid_t in sys/types.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3332 "configure" +echo "configure:3344: checking for uid_t in sys/types.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3347 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -3364,10 +3379,10 @@ fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3368: checking for mode_t" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3371 "configure" +echo "configure:3383: checking for mode_t" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3386 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3398,10 +3413,10 @@ fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3402: checking for off_t" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3405 "configure" +echo "configure:3417: checking for off_t" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3420 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3433,9 +3448,9 @@ echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:3437: checking for struct timeval" >&5 -cat > conftest.$ac_ext <<EOF -#line 3439 "configure" +echo "configure:3452: checking for struct timeval" >&5 +cat > conftest.$ac_ext <<EOF +#line 3454 "configure" #include "confdefs.h" #ifdef TIME_WITH_SYS_TIME #include <sys/time.h> @@ -3451,7 +3466,7 @@ static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } EOF -if { (eval echo configure:3455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 HAVE_TIMEVAL=yes @@ -3473,10 +3488,10 @@ rm -f conftest* echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3477: checking whether struct tm is in sys/time.h or time.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3480 "configure" +echo "configure:3492: checking whether struct tm is in sys/time.h or time.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3495 "configure" #include "confdefs.h" #include <sys/types.h> #include <time.h> @@ -3484,7 +3499,7 @@ struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3508,10 +3523,10 @@ fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3512: checking for tm_zone in struct tm" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3515 "configure" +echo "configure:3527: checking for tm_zone in struct tm" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3530 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_cv_struct_tm> @@ -3519,7 +3534,7 @@ struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:3523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -3542,10 +3557,10 @@ else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3546: checking for tzname" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3549 "configure" +echo "configure:3561: checking for tzname" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3564 "configure" #include "confdefs.h" #include <time.h> #ifndef tzname /* For SGI. */ @@ -3555,7 +3570,7 @@ atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -3581,10 +3596,10 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3585: checking for working const" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3588 "configure" +echo "configure:3600: checking for working const" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3603 "configure" #include "confdefs.h" int main() { @@ -3633,7 +3648,7 @@ ; return 0; } EOF -if { (eval echo configure:3637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3658,7 +3673,7 @@ echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:3662: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:3677: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` cat > conftestmake <<\EOF @@ -3683,12 +3698,12 @@ echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3687: checking whether byte ordering is bigendian" >&5 +echo "configure:3702: 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 <<EOF -#line 3692 "configure" +#line 3707 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -3699,11 +3714,11 @@ #endif ; return 0; } EOF -if { (eval echo configure:3703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3718: \"$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 <<EOF -#line 3707 "configure" +#line 3722 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -3714,7 +3729,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:3718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3731,7 +3746,7 @@ rm -f conftest* if test $ac_cv_c_bigendian = unknown; then cat > conftest.$ac_ext <<EOF -#line 3735 "configure" +#line 3750 "configure" #include "confdefs.h" main () { /* Are we little or big endian? From Harbison&Steele. */ @@ -3744,7 +3759,7 @@ exit (u.c[sizeof (long) - 1] == 1); } EOF -if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_c_bigendian=no else @@ -3770,10 +3785,10 @@ echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:3774: checking size of short" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3777 "configure" +echo "configure:3789: checking size of short" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3792 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3784,7 +3799,7 @@ exit(0); } EOF -if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_sizeof_short=`cat conftestval` else @@ -3811,10 +3826,10 @@ exit 1 fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:3815: checking size of int" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3818 "configure" +echo "configure:3830: checking size of int" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3833 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3825,7 +3840,7 @@ exit(0); } EOF -if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_sizeof_int=`cat conftestval` else @@ -3846,10 +3861,10 @@ echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:3850: checking size of long" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3853 "configure" +echo "configure:3865: checking size of long" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3868 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3860,7 +3875,7 @@ exit(0); } EOF -if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_sizeof_long=`cat conftestval` else @@ -3881,10 +3896,10 @@ echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:3885: checking size of long long" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3888 "configure" +echo "configure:3900: checking size of long long" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3903 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3895,7 +3910,7 @@ exit(0); } EOF -if { (eval echo configure:3899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3914: \"$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 @@ -3916,10 +3931,10 @@ echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:3920: checking size of void *" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3923 "configure" +echo "configure:3935: checking size of void *" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3938 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3930,7 +3945,7 @@ exit(0); } EOF -if { (eval echo configure:3934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3949: \"$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 @@ -3952,7 +3967,7 @@ echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:3956: checking for long file names" >&5 +echo "configure:3971: 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: @@ -3999,12 +4014,12 @@ echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:4003: checking for sin in -lm" >&5 +echo "configure:4018: checking for sin in -lm" >&5 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` xe_check_libs=" -lm " cat > conftest.$ac_ext <<EOF -#line 4008 "configure" +#line 4023 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4015,7 +4030,7 @@ sin() ; return 0; } EOF -if { (eval echo configure:4019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4057,14 +4072,14 @@ cat > conftest.$ac_ext <<EOF -#line 4061 "configure" +#line 4076 "configure" #include "confdefs.h" #include <math.h> int main() { return atanh(1.0) + asinh(1.0) + acosh(1.0); ; return 0; } EOF -if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_INVERSE_HYPERBOLIC @@ -4081,7 +4096,7 @@ rm -f conftest* echo "checking type of mail spool file locking" 1>&6 -echo "configure:4085: checking type of mail spool file locking" >&5 +echo "configure:4100: 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 @@ -4105,12 +4120,12 @@ echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:4109: checking for kstat_open in -lkstat" >&5 +echo "configure:4124: 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 <<EOF -#line 4114 "configure" +#line 4129 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4121,7 +4136,7 @@ kstat_open() ; return 0; } EOF -if { (eval echo configure:4125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4155,12 +4170,12 @@ echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 -echo "configure:4159: checking for kvm_read in -lkvm" >&5 +echo "configure:4174: 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 <<EOF -#line 4164 "configure" +#line 4179 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4171,7 +4186,7 @@ kvm_read() ; return 0; } EOF -if { (eval echo configure:4175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4206,12 +4221,12 @@ case "$opsys" in decosf*) echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 -echo "configure:4210: checking for cma_open in -lpthreads" >&5 +echo "configure:4225: 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 <<EOF -#line 4215 "configure" +#line 4230 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4222,7 +4237,7 @@ cma_open() ; return 0; } EOF -if { (eval echo configure:4226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4258,7 +4273,7 @@ esac echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 -echo "configure:4262: checking whether the -xildoff compiler flag is required" >&5 +echo "configure:4277: 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; @@ -4269,7 +4284,7 @@ if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6 -echo "configure:4273: checking for \"-z ignore\" linker flag" >&5 +echo "configure:4288: 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 ;; @@ -4279,7 +4294,7 @@ echo "checking "for specified window system"" 1>&6 -echo "configure:4283: checking "for specified window system"" >&5 +echo "configure:4298: checking "for specified window system"" >&5 if test "$with_x11" != "no"; then test "$x_includes $x_libraries" != "NONE NONE" && \ @@ -4312,7 +4327,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:4316: checking for X" >&5 +echo "configure:4331: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4372,12 +4387,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext <<EOF -#line 4376 "configure" +#line 4391 "configure" #include "confdefs.h" #include <$x_direct_test_include> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4446,14 +4461,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <<EOF -#line 4450 "configure" +#line 4465 "configure" #include "confdefs.h" int main() { ${x_direct_test_function}() ; return 0; } EOF -if { (eval echo configure:4457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -4562,17 +4577,17 @@ case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:4566: checking whether -R must be followed by a space" >&5 +echo "configure:4581: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <<EOF -#line 4569 "configure" -#include "confdefs.h" - -int main() { - -; return 0; } -EOF -if { (eval echo configure:4576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +#line 4584 "configure" +#include "confdefs.h" + +int main() { + +; return 0; } +EOF +if { (eval echo configure:4591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_nospace=yes else @@ -4588,14 +4603,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <<EOF -#line 4592 "configure" -#include "confdefs.h" - -int main() { - -; return 0; } -EOF -if { (eval echo configure:4599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +#line 4607 "configure" +#include "confdefs.h" + +int main() { + +; return 0; } +EOF +if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_space=yes else @@ -4631,12 +4646,12 @@ else echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:4635: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:4650: 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 <<EOF -#line 4640 "configure" +#line 4655 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4647,7 +4662,7 @@ dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:4651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4671,12 +4686,12 @@ if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:4675: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:4690: 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 <<EOF -#line 4680 "configure" +#line 4695 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4687,7 +4702,7 @@ dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:4691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4716,10 +4731,10 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:4720: checking for gethostbyname" >&5 - -cat > conftest.$ac_ext <<EOF -#line 4723 "configure" +echo "configure:4735: checking for gethostbyname" >&5 + +cat > conftest.$ac_ext <<EOF +#line 4738 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname(); below. */ @@ -4742,7 +4757,7 @@ ; return 0; } EOF -if { (eval echo configure:4746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -4763,12 +4778,12 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:4767: checking for gethostbyname in -lnsl" >&5 +echo "configure:4782: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` xe_check_libs=" -lnsl " cat > conftest.$ac_ext <<EOF -#line 4772 "configure" +#line 4787 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4779,7 +4794,7 @@ gethostbyname() ; return 0; } EOF -if { (eval echo configure:4783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4809,10 +4824,10 @@ # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:4813: checking for connect" >&5 - -cat > conftest.$ac_ext <<EOF -#line 4816 "configure" +echo "configure:4828: checking for connect" >&5 + +cat > conftest.$ac_ext <<EOF +#line 4831 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect(); below. */ @@ -4835,7 +4850,7 @@ ; return 0; } EOF -if { (eval echo configure:4839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -4858,12 +4873,12 @@ xe_msg_checking="for connect in -lsocket" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:4862: checking "$xe_msg_checking"" >&5 +echo "configure:4877: 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 <<EOF -#line 4867 "configure" +#line 4882 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4874,7 +4889,7 @@ connect() ; return 0; } EOF -if { (eval echo configure:4878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4898,10 +4913,10 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:4902: checking for remove" >&5 - -cat > conftest.$ac_ext <<EOF -#line 4905 "configure" +echo "configure:4917: checking for remove" >&5 + +cat > conftest.$ac_ext <<EOF +#line 4920 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove(); below. */ @@ -4924,7 +4939,7 @@ ; return 0; } EOF -if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -4945,12 +4960,12 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:4949: checking for remove in -lposix" >&5 +echo "configure:4964: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` xe_check_libs=" -lposix " cat > conftest.$ac_ext <<EOF -#line 4954 "configure" +#line 4969 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4961,7 +4976,7 @@ remove() ; return 0; } EOF -if { (eval echo configure:4965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4985,10 +5000,10 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:4989: checking for shmat" >&5 - -cat > conftest.$ac_ext <<EOF -#line 4992 "configure" +echo "configure:5004: checking for shmat" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5007 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat(); below. */ @@ -5011,7 +5026,7 @@ ; return 0; } EOF -if { (eval echo configure:5015: \"$ac_link\") 1>&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; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -5032,12 +5047,12 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:5036: checking for shmat in -lipc" >&5 +echo "configure:5051: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` xe_check_libs=" -lipc " cat > conftest.$ac_ext <<EOF -#line 5041 "configure" +#line 5056 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5048,7 +5063,7 @@ shmat() ; return 0; } EOF -if { (eval echo configure:5052: \"$ac_link\") 1>&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; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5082,12 +5097,12 @@ # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:5086: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:5101: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` xe_check_libs=" -lICE " cat > conftest.$ac_ext <<EOF -#line 5091 "configure" +#line 5106 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5098,7 +5113,7 @@ IceConnectionNumber() ; return 0; } EOF -if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5265,7 +5280,7 @@ echo "checking for X defines extracted by xmkmf" 1>&6 -echo "configure:5269: checking for X defines extracted by xmkmf" >&5 +echo "configure:5284: checking for X defines extracted by xmkmf" >&5 rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -5297,15 +5312,15 @@ ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6 -echo "configure:5301: checking for X11/Intrinsic.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 5304 "configure" +echo "configure:5316: checking for X11/Intrinsic.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5319 "configure" #include "confdefs.h" #include <X11/Intrinsic.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5329,12 +5344,12 @@ echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:5333: checking for XOpenDisplay in -lX11" >&5 +echo "configure:5348: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <<EOF -#line 5338 "configure" +#line 5353 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5345,7 +5360,7 @@ XOpenDisplay() ; return 0; } EOF -if { (eval echo configure:5349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5370,12 +5385,12 @@ xe_msg_checking="for XGetFontProperty in -lX11" test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5374: checking "$xe_msg_checking"" >&5 +echo "configure:5389: 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 <<EOF -#line 5379 "configure" +#line 5394 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5386,7 +5401,7 @@ XGetFontProperty() ; return 0; } EOF -if { (eval echo configure:5390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5413,12 +5428,12 @@ echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:5417: checking for XShapeSelectInput in -lXext" >&5 +echo "configure:5432: checking for XShapeSelectInput in -lXext" >&5 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'` xe_check_libs=" -lXext " cat > conftest.$ac_ext <<EOF -#line 5422 "configure" +#line 5437 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5429,7 +5444,7 @@ XShapeSelectInput() ; return 0; } EOF -if { (eval echo configure:5433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5452,12 +5467,12 @@ echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 -echo "configure:5456: checking for XtOpenDisplay in -lXt" >&5 +echo "configure:5471: checking for XtOpenDisplay in -lXt" >&5 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lXt " cat > conftest.$ac_ext <<EOF -#line 5461 "configure" +#line 5476 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5468,7 +5483,7 @@ XtOpenDisplay() ; return 0; } EOF -if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5491,14 +5506,14 @@ echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:5495: checking the version of X11 being used" >&5 +echo "configure:5510: checking the version of X11 being used" >&5 cat > conftest.$ac_ext <<EOF -#line 5497 "configure" +#line 5512 "configure" #include "confdefs.h" #include <X11/Intrinsic.h> int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; } EOF -if { (eval echo configure:5502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:5517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ./conftest foobar; x11_release=$? else @@ -5522,15 +5537,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5526: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 5529 "configure" +echo "configure:5541: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5544 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5561,7 +5576,7 @@ echo $ac_n "checking for XFree86""... $ac_c" 1>&6 -echo "configure:5565: checking for XFree86" >&5 +echo "configure:5580: checking for XFree86" >&5 if test -d "/usr/X386/include" -o \ -f "/etc/XF86Config" -o \ -f "/etc/X11/XF86Config" -o \ @@ -5581,12 +5596,12 @@ test -z "$with_xmu" && { echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 -echo "configure:5585: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 +echo "configure:5600: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'` xe_check_libs=" -lXmu " cat > conftest.$ac_ext <<EOF -#line 5590 "configure" +#line 5605 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5597,7 +5612,7 @@ XmuReadBitmapDataFromFile() ; return 0; } EOF -if { (eval echo configure:5601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5636,19 +5651,19 @@ echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:5640: checking for main in -lXbsd" >&5 +echo "configure:5655: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lXbsd " cat > conftest.$ac_ext <<EOF -#line 5645 "configure" +#line 5660 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5685,22 +5700,22 @@ fi if test "$with_msw" != "no"; then echo "checking for MS-Windows" 1>&6 -echo "configure:5689: checking for MS-Windows" >&5 +echo "configure:5704: checking for MS-Windows" >&5 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 -echo "configure:5692: checking for main in -lgdi32" >&5 +echo "configure:5707: checking for main in -lgdi32" >&5 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdi32 " cat > conftest.$ac_ext <<EOF -#line 5697 "configure" +#line 5712 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5758,12 +5773,12 @@ fi fi cat > conftest.$ac_ext <<EOF -#line 5762 "configure" +#line 5777 "configure" #include "confdefs.h" #include <fcntl.h> int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; } EOF -if { (eval echo configure:5767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:5782: \"$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 @@ -5841,7 +5856,7 @@ esac echo "checking for session-management option" 1>&6 -echo "configure:5845: checking for session-management option" >&5; +echo "configure:5860: checking for session-management option" >&5; if test "$with_session" != "no"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SESSION @@ -5856,15 +5871,15 @@ test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6 -echo "configure:5860: checking for X11/Xauth.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 5863 "configure" +echo "configure:5875: checking for X11/Xauth.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5878 "configure" #include "confdefs.h" #include <X11/Xauth.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5887,12 +5902,12 @@ } test -z "$with_xauth" && { echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 -echo "configure:5891: checking for XauGetAuthByAddr in -lXau" >&5 +echo "configure:5906: checking for XauGetAuthByAddr in -lXau" >&5 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'` xe_check_libs=" -lXau " cat > conftest.$ac_ext <<EOF -#line 5896 "configure" +#line 5911 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5903,7 +5918,7 @@ XauGetAuthByAddr() ; return 0; } EOF -if { (eval echo configure:5907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5967,15 +5982,15 @@ for dir in "" "Tt/" "desktop/" ; do ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6 -echo "configure:5971: checking for ${dir}tt_c.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 5974 "configure" +echo "configure:5986: checking for ${dir}tt_c.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5989 "configure" #include "confdefs.h" #include <${dir}tt_c.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6004,12 +6019,12 @@ xe_msg_checking="for tt_message_create in -ltt" test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6008: checking "$xe_msg_checking"" >&5 +echo "configure:6023: 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 <<EOF -#line 6013 "configure" +#line 6028 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6020,7 +6035,7 @@ tt_message_create() ; return 0; } EOF -if { (eval echo configure:6024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6069,15 +6084,15 @@ test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6 -echo "configure:6073: checking for Dt/Dt.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6076 "configure" +echo "configure:6088: checking for Dt/Dt.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6091 "configure" #include "confdefs.h" #include <Dt/Dt.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6100,12 +6115,12 @@ } test -z "$with_cde" && { echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 -echo "configure:6104: checking for DtDndDragStart in -lDtSvc" >&5 +echo "configure:6119: checking for DtDndDragStart in -lDtSvc" >&5 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'` xe_check_libs=" -lDtSvc " cat > conftest.$ac_ext <<EOF -#line 6109 "configure" +#line 6124 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6116,7 +6131,7 @@ DtDndDragStart() ; return 0; } EOF -if { (eval echo configure:6120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6153,18 +6168,18 @@ fi echo "checking for LDAP" 1>&6 -echo "configure:6157: checking for LDAP" >&5 +echo "configure:6172: 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:6160: checking for ldap.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6163 "configure" +echo "configure:6175: checking for ldap.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6178 "configure" #include "confdefs.h" #include <ldap.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6187,15 +6202,15 @@ } test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for lber.h""... $ac_c" 1>&6 -echo "configure:6191: checking for lber.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6194 "configure" +echo "configure:6206: checking for lber.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6209 "configure" #include "confdefs.h" #include <lber.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6221,12 +6236,12 @@ xe_msg_checking="for ldap_open in -lldap" test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6225: checking "$xe_msg_checking"" >&5 +echo "configure:6240: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber" cat > conftest.$ac_ext <<EOF -#line 6230 "configure" +#line 6245 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6237,7 +6252,7 @@ ldap_open() ; return 0; } EOF -if { (eval echo configure:6241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6260,12 +6275,12 @@ } test "$with_umich_ldap" = "no" && { echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6 -echo "configure:6264: checking for ldap_set_option in -lldap10" >&5 +echo "configure:6279: 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 <<EOF -#line 6269 "configure" +#line 6284 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6276,7 +6291,7 @@ ldap_set_option() ; return 0; } EOF -if { (eval echo configure:6280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6340,14 +6355,14 @@ if test "$window_system" != "none"; then echo "checking for graphics libraries" 1>&6 -echo "configure:6344: checking for graphics libraries" >&5 +echo "configure:6359: checking for graphics libraries" >&5 if test -z "$with_xpm"; then echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6 -echo "configure:6348: checking for Xpm - no older than 3.4f" >&5 +echo "configure:6363: checking for Xpm - no older than 3.4f" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext <<EOF -#line 6351 "configure" +#line 6366 "configure" #include "confdefs.h" #include <X11/xpm.h> int main(int c, char **v) { @@ -6355,7 +6370,7 @@ XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;} EOF -if { (eval echo configure:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:6374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ./conftest dummy_arg; xpm_status=$?; if test "$?" = "0"; then @@ -6396,17 +6411,17 @@ libs_x="-lXpm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6 -echo "configure:6400: checking for \"FOR_MSW\" xpm" >&5 +echo "configure:6415: checking for \"FOR_MSW\" xpm" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext <<EOF -#line 6403 "configure" +#line 6418 "configure" #include "confdefs.h" int main() { XpmCreatePixmapFromData() ; return 0; } EOF -if { (eval echo configure:6410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* xpm_for_msw=no else @@ -6433,12 +6448,12 @@ if test "$with_png $with_tiff" != "no no"; then echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6 -echo "configure:6437: checking for inflate in -lc" >&5 +echo "configure:6452: checking for inflate in -lc" >&5 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <<EOF -#line 6442 "configure" +#line 6457 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6449,7 +6464,7 @@ inflate() ; return 0; } EOF -if { (eval echo configure:6453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6468,12 +6483,12 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:6472: checking for inflate in -lz" >&5 +echo "configure:6487: checking for inflate in -lz" >&5 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lz " cat > conftest.$ac_ext <<EOF -#line 6477 "configure" +#line 6492 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6484,7 +6499,7 @@ inflate() ; return 0; } EOF -if { (eval echo configure:6488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6503,12 +6518,12 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 -echo "configure:6507: checking for inflate in -lgz" >&5 +echo "configure:6522: checking for inflate in -lgz" >&5 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lgz " cat > conftest.$ac_ext <<EOF -#line 6512 "configure" +#line 6527 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6519,7 +6534,7 @@ inflate() ; return 0; } EOF -if { (eval echo configure:6523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6548,18 +6563,18 @@ fi echo $ac_n "checking for giflib - no older than 3.1""... $ac_c" 1>&6 -echo "configure:6552: checking for giflib - no older than 3.1" >&5 +echo "configure:6567: checking for giflib - no older than 3.1" >&5 test -z "$with_gif" && { ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6 -echo "configure:6555: checking for gif_lib.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6558 "configure" +echo "configure:6570: checking for gif_lib.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6573 "configure" #include "confdefs.h" #include <gif_lib.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6582,12 +6597,12 @@ } test -z "$with_gif" && { echo $ac_n "checking for GetGifError in -lgif""... $ac_c" 1>&6 -echo "configure:6586: checking for GetGifError in -lgif" >&5 +echo "configure:6601: checking for GetGifError in -lgif" >&5 ac_lib_var=`echo gif'_'GetGifError | sed 'y%./+-%__p_%'` xe_check_libs=" -lgif " cat > conftest.$ac_ext <<EOF -#line 6591 "configure" +#line 6606 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6598,7 +6613,7 @@ GetGifError() ; return 0; } EOF -if { (eval echo configure:6602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6634,15 +6649,15 @@ test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 -echo "configure:6638: checking for jpeglib.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6641 "configure" +echo "configure:6653: checking for jpeglib.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6656 "configure" #include "confdefs.h" #include <jpeglib.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6665,12 +6680,12 @@ } test -z "$with_jpeg" && { echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 -echo "configure:6669: checking for jpeg_destroy_decompress in -ljpeg" >&5 +echo "configure:6684: 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 <<EOF -#line 6674 "configure" +#line 6689 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6681,7 +6696,7 @@ jpeg_destroy_decompress() ; return 0; } EOF -if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6717,9 +6732,9 @@ if test -z "$with_png"; then echo $ac_n "checking for png.h - no older than 0.96""... $ac_c" 1>&6 -echo "configure:6721: checking for png.h - no older than 0.96" >&5 +echo "configure:6736: checking for png.h - no older than 0.96" >&5 cat > conftest.$ac_ext <<EOF -#line 6723 "configure" +#line 6738 "configure" #include "confdefs.h" #include <png.h> #if PNG_LIBPNG_VER >= 96 @@ -6739,10 +6754,10 @@ fi test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 -echo "configure:6743: checking for pow" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6746 "configure" +echo "configure:6758: checking for pow" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6761 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char pow(); below. */ @@ -6765,7 +6780,7 @@ ; return 0; } EOF -if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pow=yes" else @@ -6786,12 +6801,12 @@ } test -z "$with_png" && { echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:6790: checking for png_read_image in -lpng" >&5 +echo "configure:6805: 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 <<EOF -#line 6795 "configure" +#line 6810 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6802,7 +6817,7 @@ png_read_image() ; return 0; } EOF -if { (eval echo configure:6806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6838,15 +6853,15 @@ test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:6842: checking for tiffio.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6845 "configure" +echo "configure:6857: checking for tiffio.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6860 "configure" #include "confdefs.h" #include <tiffio.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6869,12 +6884,12 @@ } test -z "$with_tiff" && { echo $ac_n "checking for TIFFReadScanline in -ltiff""... $ac_c" 1>&6 -echo "configure:6873: checking for TIFFReadScanline in -ltiff" >&5 +echo "configure:6888: checking for TIFFReadScanline in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFReadScanline | sed 'y%./+-%__p_%'` xe_check_libs=" -ltiff " cat > conftest.$ac_ext <<EOF -#line 6878 "configure" +#line 6893 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6885,7 +6900,7 @@ TIFFReadScanline() ; return 0; } EOF -if { (eval echo configure:6889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6924,19 +6939,19 @@ if test "$with_x11" = "yes"; then echo "checking for X11 graphics libraries" 1>&6 -echo "configure:6928: checking for X11 graphics libraries" >&5 +echo "configure:6943: checking for X11 graphics libraries" >&5 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:6932: checking for compface.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6935 "configure" +echo "configure:6947: checking for compface.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6950 "configure" #include "confdefs.h" #include <compface.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6959,12 +6974,12 @@ } test -z "$with_xface" && { echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:6963: checking for UnGenFace in -lcompface" >&5 +echo "configure:6978: checking for UnGenFace in -lcompface" >&5 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'` xe_check_libs=" -lcompface " cat > conftest.$ac_ext <<EOF -#line 6968 "configure" +#line 6983 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6975,7 +6990,7 @@ UnGenFace() ; return 0; } EOF -if { (eval echo configure:6979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7011,12 +7026,12 @@ echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6 -echo "configure:7015: checking for XawScrollbarSetThumb in -lXaw" >&5 +echo "configure:7030: checking for XawScrollbarSetThumb in -lXaw" >&5 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` xe_check_libs=" -lXaw " cat > conftest.$ac_ext <<EOF -#line 7020 "configure" +#line 7035 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7027,7 +7042,7 @@ XawScrollbarSetThumb() ; return 0; } EOF -if { (eval echo configure:7031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7051,15 +7066,15 @@ ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:7055: checking for Xm/Xm.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7058 "configure" +echo "configure:7070: checking for Xm/Xm.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7073 "configure" #include "confdefs.h" #include <Xm/Xm.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7076,12 +7091,12 @@ echo "$ac_t""yes" 1>&6 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6 -echo "configure:7080: checking for XmStringFree in -lXm" >&5 +echo "configure:7095: checking for XmStringFree in -lXm" >&5 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <<EOF -#line 7085 "configure" +#line 7100 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7092,7 +7107,7 @@ XmStringFree() ; return 0; } EOF -if { (eval echo configure:7096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7121,9 +7136,9 @@ if test "$have_motif" = "yes"; then echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 -echo "configure:7125: checking for Lesstif" >&5 +echo "configure:7140: checking for Lesstif" >&5 cat > conftest.$ac_ext <<EOF -#line 7127 "configure" +#line 7142 "configure" #include "confdefs.h" #include <Xm/Xm.h> #ifdef LESSTIF_VERSION @@ -7407,7 +7422,7 @@ if test "$with_mule" = "yes" ; then echo "checking for Mule-related features" 1>&6 -echo "configure:7411: checking for Mule-related features" >&5 +echo "configure:7426: checking for Mule-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining MULE EOF @@ -7432,15 +7447,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7436: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7439 "configure" +echo "configure:7451: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7454 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7471,12 +7486,12 @@ echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:7475: checking for strerror in -lintl" >&5 +echo "configure:7490: checking for strerror in -lintl" >&5 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'` xe_check_libs=" -lintl " cat > conftest.$ac_ext <<EOF -#line 7480 "configure" +#line 7495 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7487,7 +7502,7 @@ strerror() ; return 0; } EOF -if { (eval echo configure:7491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7520,19 +7535,19 @@ echo "checking for Mule input methods" 1>&6 -echo "configure:7524: checking for Mule input methods" >&5 +echo "configure:7539: checking for Mule input methods" >&5 case "$with_xim" in "" | "yes" ) echo "checking for XIM" 1>&6 -echo "configure:7527: checking for XIM" >&5 +echo "configure:7542: checking for XIM" >&5 if test "$have_lesstif" = "yes"; then with_xim=xlib else echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:7531: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:7546: checking for XmImMbLookupString in -lXm" >&5 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <<EOF -#line 7536 "configure" +#line 7551 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7543,7 +7558,7 @@ XmImMbLookupString() ; return 0; } EOF -if { (eval echo configure:7547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7609,15 +7624,15 @@ if test "$with_xfs" = "yes" ; then echo "checking for XFontSet" 1>&6 -echo "configure:7613: checking for XFontSet" >&5 +echo "configure:7628: checking for XFontSet" >&5 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:7616: checking for XmbDrawString in -lX11" >&5 +echo "configure:7631: checking for XmbDrawString in -lX11" >&5 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <<EOF -#line 7621 "configure" +#line 7636 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7628,7 +7643,7 @@ XmbDrawString() ; return 0; } EOF -if { (eval echo configure:7632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7668,15 +7683,15 @@ test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6 -echo "configure:7672: checking for wnn/jllib.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7675 "configure" +echo "configure:7687: checking for wnn/jllib.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7690 "configure" #include "confdefs.h" #include <wnn/jllib.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7701,10 +7716,10 @@ for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7705: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7708 "configure" +echo "configure:7720: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7723 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7727,7 +7742,7 @@ ; return 0; } EOF -if { (eval echo configure:7731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7756,12 +7771,12 @@ test "$ac_cv_func_crypt" != "yes" && { echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:7760: checking for crypt in -lcrypt" >&5 +echo "configure:7775: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` xe_check_libs=" -lcrypt " cat > conftest.$ac_ext <<EOF -#line 7765 "configure" +#line 7780 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7772,7 +7787,7 @@ crypt() ; return 0; } EOF -if { (eval echo configure:7776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7806,12 +7821,12 @@ fi test -z "$with_wnn" && { echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6 -echo "configure:7810: checking for jl_dic_list_e in -lwnn" >&5 +echo "configure:7825: 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 <<EOF -#line 7815 "configure" +#line 7830 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7822,7 +7837,7 @@ jl_dic_list_e() ; return 0; } EOF -if { (eval echo configure:7826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7859,12 +7874,12 @@ fi echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6 -echo "configure:7863: checking for jl_fi_dic_list in -lwnn" >&5 +echo "configure:7878: checking for jl_fi_dic_list in -lwnn" >&5 ac_lib_var=`echo wnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn " cat > conftest.$ac_ext <<EOF -#line 7868 "configure" +#line 7883 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7875,7 +7890,7 @@ jl_fi_dic_list() ; return 0; } EOF -if { (eval echo configure:7879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7909,15 +7924,15 @@ if test "$with_canna" != "no"; then ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:7913: checking for canna/jrkanji.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7916 "configure" +echo "configure:7928: checking for canna/jrkanji.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7931 "configure" #include "confdefs.h" #include <canna/jrkanji.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7944,15 +7959,15 @@ c_switch_site="$c_switch_site -I/usr/local/canna/include" ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:7948: checking for canna/jrkanji.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7951 "configure" +echo "configure:7963: checking for canna/jrkanji.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7966 "configure" #include "confdefs.h" #include <canna/jrkanji.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7980,15 +7995,15 @@ test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6 -echo "configure:7984: checking for canna/RK.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7987 "configure" +echo "configure:7999: checking for canna/RK.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8002 "configure" #include "confdefs.h" #include <canna/RK.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8011,12 +8026,12 @@ } test -z "$with_canna" && { echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:8015: checking for RkBgnBun in -lRKC" >&5 +echo "configure:8030: checking for RkBgnBun in -lRKC" >&5 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'` xe_check_libs=" -lRKC " cat > conftest.$ac_ext <<EOF -#line 8020 "configure" +#line 8035 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8027,7 +8042,7 @@ RkBgnBun() ; return 0; } EOF -if { (eval echo configure:8031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8050,12 +8065,12 @@ } test -z "$with_canna" && { echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:8054: checking for jrKanjiControl in -lcanna" >&5 +echo "configure:8069: checking for jrKanjiControl in -lcanna" >&5 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'` xe_check_libs=" -lcanna " cat > conftest.$ac_ext <<EOF -#line 8059 "configure" +#line 8074 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8066,7 +8081,7 @@ jrKanjiControl() ; return 0; } EOF -if { (eval echo configure:8070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8115,12 +8130,12 @@ libs_x="-lXm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXm\" to \$libs_x"; fi echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6 -echo "configure:8119: checking for layout_object_getvalue in -li18n" >&5 +echo "configure:8134: 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 <<EOF -#line 8124 "configure" +#line 8139 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8131,7 +8146,7 @@ layout_object_getvalue() ; return 0; } EOF -if { (eval echo configure:8135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8217,10 +8232,10 @@ 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:8221: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8224 "configure" +echo "configure:8236: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8239 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8243,7 +8258,7 @@ ; return 0; } EOF -if { (eval echo configure:8247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8280,10 +8295,10 @@ for ac_func in realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8284: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8287 "configure" +echo "configure:8299: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8302 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8306,7 +8321,7 @@ ; return 0; } EOF -if { (eval echo configure:8310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8339,16 +8354,16 @@ esac echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:8343: checking whether netdb declares h_errno" >&5 -cat > conftest.$ac_ext <<EOF -#line 8345 "configure" +echo "configure:8358: checking whether netdb declares h_errno" >&5 +cat > conftest.$ac_ext <<EOF +#line 8360 "configure" #include "confdefs.h" #include <netdb.h> int main() { return h_errno; ; return 0; } EOF -if { (eval echo configure:8352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -8368,16 +8383,16 @@ rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:8372: checking for sigsetjmp" >&5 -cat > conftest.$ac_ext <<EOF -#line 8374 "configure" +echo "configure:8387: checking for sigsetjmp" >&5 +cat > conftest.$ac_ext <<EOF +#line 8389 "configure" #include "confdefs.h" #include <setjmp.h> int main() { sigjmp_buf bar; sigsetjmp (bar, 0); ; return 0; } EOF -if { (eval echo configure:8381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8396: \"$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 @@ -8397,11 +8412,11 @@ rm -f conftest* echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:8401: checking whether localtime caches TZ" >&5 +echo "configure:8416: checking whether localtime caches TZ" >&5 if test "$ac_cv_func_tzset" = "yes"; then cat > conftest.$ac_ext <<EOF -#line 8405 "configure" +#line 8420 "configure" #include "confdefs.h" #include <time.h> #if STDC_HEADERS @@ -8436,7 +8451,7 @@ exit (0); } EOF -if { (eval echo configure:8440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then emacs_cv_localtime_cache=no else @@ -8465,9 +8480,9 @@ if test "$HAVE_TIMEVAL" = "yes"; then echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6 -echo "configure:8469: checking whether gettimeofday accepts one or two arguments" >&5 -cat > conftest.$ac_ext <<EOF -#line 8471 "configure" +echo "configure:8484: checking whether gettimeofday accepts one or two arguments" >&5 +cat > conftest.$ac_ext <<EOF +#line 8486 "configure" #include "confdefs.h" #ifdef TIME_WITH_SYS_TIME @@ -8489,7 +8504,7 @@ ; return 0; } EOF -if { (eval echo configure:8493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""two" 1>&6 else @@ -8511,19 +8526,19 @@ echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:8515: checking for inline" >&5 +echo "configure:8530: checking for inline" >&5 ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 8520 "configure" +#line 8535 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:8527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -8573,17 +8588,17 @@ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:8577: checking for working alloca.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8580 "configure" +echo "configure:8592: checking for working alloca.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8595 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:8587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -8607,10 +8622,10 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:8611: checking for alloca" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8614 "configure" +echo "configure:8626: checking for alloca" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8629 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -8633,7 +8648,7 @@ char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:8637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -8672,10 +8687,10 @@ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:8676: checking whether alloca needs Cray hooks" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8679 "configure" +echo "configure:8691: checking whether alloca needs Cray hooks" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8694 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -8699,10 +8714,10 @@ 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:8703: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8706 "configure" +echo "configure:8718: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8721 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8725,7 +8740,7 @@ ; return 0; } EOF -if { (eval echo configure:8729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8755,10 +8770,10 @@ fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:8759: checking stack direction for C alloca" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8762 "configure" +echo "configure:8774: checking stack direction for C alloca" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8777 "configure" #include "confdefs.h" find_stack_direction () { @@ -8777,7 +8792,7 @@ exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_c_stack_direction=1 else @@ -8805,15 +8820,15 @@ ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:8809: checking for vfork.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8812 "configure" +echo "configure:8824: checking for vfork.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8827 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8841,10 +8856,10 @@ fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:8845: checking for working vfork" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8848 "configure" +echo "configure:8860: checking for working vfork" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8863 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -8939,7 +8954,7 @@ } } EOF -if { (eval echo configure:8943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_func_vfork_works=yes else @@ -8964,10 +8979,10 @@ echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:8968: checking for working strcoll" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8971 "configure" +echo "configure:8983: checking for working strcoll" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8986 "configure" #include "confdefs.h" #include <string.h> main () @@ -8977,7 +8992,7 @@ strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:8981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_func_strcoll_works=yes else @@ -9004,10 +9019,10 @@ for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9008: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9011 "configure" +echo "configure:9023: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9026 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -9030,7 +9045,7 @@ ; return 0; } EOF -if { (eval echo configure:9034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9058,10 +9073,10 @@ done echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:9062: checking whether getpgrp takes no argument" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9065 "configure" +echo "configure:9077: checking whether getpgrp takes no argument" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9080 "configure" #include "confdefs.h" /* @@ -9116,7 +9131,7 @@ } EOF -if { (eval echo configure:9120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:9135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_func_getpgrp_void=yes else @@ -9142,10 +9157,10 @@ echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:9146: checking for working mmap" >&5 +echo "configure:9161: checking for working mmap" >&5 case "$opsys" in ultrix* ) have_mmap=no ;; *) cat > conftest.$ac_ext <<EOF -#line 9149 "configure" +#line 9164 "configure" #include "confdefs.h" #include <stdio.h> #include <unistd.h> @@ -9178,7 +9193,7 @@ return 1; } EOF -if { (eval echo configure:9182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:9197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then have_mmap=yes else @@ -9212,15 +9227,15 @@ ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:9216: checking for termios.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9219 "configure" +echo "configure:9231: checking for termios.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9234 "configure" #include "confdefs.h" #include <termios.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9263,15 +9278,15 @@ echo "$ac_t""no" 1>&6 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termio.h""... $ac_c" 1>&6 -echo "configure:9267: checking for termio.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9270 "configure" +echo "configure:9282: checking for termio.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9285 "configure" #include "confdefs.h" #include <termio.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9303,10 +9318,10 @@ echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:9307: checking for socket" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9310 "configure" +echo "configure:9322: checking for socket" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9325 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char socket(); below. */ @@ -9329,7 +9344,7 @@ ; return 0; } EOF -if { (eval echo configure:9333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -9344,15 +9359,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6 -echo "configure:9348: checking for netinet/in.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9351 "configure" +echo "configure:9363: checking for netinet/in.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9366 "configure" #include "confdefs.h" #include <netinet/in.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9369,15 +9384,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6 -echo "configure:9373: checking for arpa/inet.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9376 "configure" +echo "configure:9388: checking for arpa/inet.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9391 "configure" #include "confdefs.h" #include <arpa/inet.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9402,9 +9417,9 @@ } echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:9406: checking "for sun_len member in struct sockaddr_un"" >&5 +echo "configure:9421: checking "for sun_len member in struct sockaddr_un"" >&5 cat > conftest.$ac_ext <<EOF -#line 9408 "configure" +#line 9423 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9415,7 +9430,7 @@ static struct sockaddr_un x; x.sun_len = 1; ; return 0; } EOF -if { (eval echo configure:9419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SOCKADDR_SUN_LEN @@ -9433,9 +9448,9 @@ fi rm -f conftest* echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 -echo "configure:9437: checking "for ip_mreq struct in netinet/in.h"" >&5 +echo "configure:9452: checking "for ip_mreq struct in netinet/in.h"" >&5 cat > conftest.$ac_ext <<EOF -#line 9439 "configure" +#line 9454 "configure" #include "confdefs.h" #include <netinet/in.h> @@ -9444,7 +9459,7 @@ static struct ip_mreq x; ; return 0; } EOF -if { (eval echo configure:9448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MULTICAST @@ -9475,10 +9490,10 @@ echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:9479: checking for msgget" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9482 "configure" +echo "configure:9494: checking for msgget" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9497 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char msgget(); below. */ @@ -9501,7 +9516,7 @@ ; return 0; } EOF -if { (eval echo configure:9505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_msgget=yes" else @@ -9516,15 +9531,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6 -echo "configure:9520: checking for sys/ipc.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9523 "configure" +echo "configure:9535: checking for sys/ipc.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9538 "configure" #include "confdefs.h" #include <sys/ipc.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9541,15 +9556,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6 -echo "configure:9545: checking for sys/msg.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9548 "configure" +echo "configure:9560: checking for sys/msg.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9563 "configure" #include "confdefs.h" #include <sys/msg.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9587,15 +9602,15 @@ ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:9591: checking for dirent.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9594 "configure" +echo "configure:9606: checking for dirent.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9609 "configure" #include "confdefs.h" #include <dirent.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9622,15 +9637,15 @@ echo "$ac_t""no" 1>&6 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6 -echo "configure:9626: checking for sys/dir.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9629 "configure" +echo "configure:9641: checking for sys/dir.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9644 "configure" #include "confdefs.h" #include <sys/dir.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9663,15 +9678,15 @@ ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:9667: checking for nlist.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9670 "configure" +echo "configure:9682: checking for nlist.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9685 "configure" #include "confdefs.h" #include <nlist.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9701,7 +9716,7 @@ echo "checking "for sound support"" 1>&6 -echo "configure:9705: checking "for sound support"" >&5 +echo "configure:9720: checking "for sound support"" >&5 case "$with_sound" in native | both ) with_native_sound=yes;; nas | no ) with_native_sound=no;; @@ -9712,15 +9727,15 @@ 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:9716: checking for multimedia/audio_device.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9719 "configure" +echo "configure:9731: checking for multimedia/audio_device.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9734 "configure" #include "confdefs.h" #include <multimedia/audio_device.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9768,12 +9783,12 @@ if test -z "$native_sound_lib"; then echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:9772: checking for ALopenport in -laudio" >&5 +echo "configure:9787: checking for ALopenport in -laudio" >&5 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <<EOF -#line 9777 "configure" +#line 9792 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9784,7 +9799,7 @@ ALopenport() ; return 0; } EOF -if { (eval echo configure:9788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9815,12 +9830,12 @@ if test -z "$native_sound_lib"; then echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:9819: checking for AOpenAudio in -lAlib" >&5 +echo "configure:9834: checking for AOpenAudio in -lAlib" >&5 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'` xe_check_libs=" -lAlib " cat > conftest.$ac_ext <<EOF -#line 9824 "configure" +#line 9839 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9831,7 +9846,7 @@ AOpenAudio() ; return 0; } EOF -if { (eval echo configure:9835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9869,15 +9884,15 @@ for dir in "machine" "sys" "linux"; do ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6 -echo "configure:9873: checking for ${dir}/soundcard.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9876 "configure" +echo "configure:9888: checking for ${dir}/soundcard.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9891 "configure" #include "confdefs.h" #include <${dir}/soundcard.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9947,7 +9962,7 @@ fi libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi cat > conftest.$ac_ext <<EOF -#line 9951 "configure" +#line 9966 "configure" #include "confdefs.h" #include <audio/Xtutil.h> EOF @@ -9974,7 +9989,7 @@ if test "$with_tty" = "yes" ; then echo "checking for TTY-related features" 1>&6 -echo "configure:9978: checking for TTY-related features" >&5 +echo "configure:9993: checking for TTY-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_TTY EOF @@ -9990,12 +10005,12 @@ if test -z "$with_ncurses"; then echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:9994: checking for tgetent in -lncurses" >&5 +echo "configure:10009: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lncurses " cat > conftest.$ac_ext <<EOF -#line 9999 "configure" +#line 10014 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10006,7 +10021,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:10010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10039,15 +10054,15 @@ ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:10043: checking for ncurses/curses.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10046 "configure" +echo "configure:10058: checking for ncurses/curses.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10061 "configure" #include "confdefs.h" #include <ncurses/curses.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10069,15 +10084,15 @@ ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6 -echo "configure:10073: checking for ncurses/term.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10076 "configure" +echo "configure:10088: checking for ncurses/term.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10091 "configure" #include "confdefs.h" #include <ncurses/term.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10107,15 +10122,15 @@ c_switch_site="$c_switch_site -I/usr/include/ncurses" ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:10111: checking for ncurses/curses.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10114 "configure" +echo "configure:10126: checking for ncurses/curses.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10129 "configure" #include "confdefs.h" #include <ncurses/curses.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10150,12 +10165,12 @@ for lib in curses termlib termcap; do echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:10154: checking for tgetent in -l$lib" >&5 +echo "configure:10169: 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 <<EOF -#line 10159 "configure" +#line 10174 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10166,7 +10181,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:10170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10197,12 +10212,12 @@ else echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:10201: checking for tgetent in -lcurses" >&5 +echo "configure:10216: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lcurses " cat > conftest.$ac_ext <<EOF -#line 10206 "configure" +#line 10221 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10213,7 +10228,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:10217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10231,12 +10246,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:10235: checking for tgetent in -ltermcap" >&5 +echo "configure:10250: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -ltermcap " cat > conftest.$ac_ext <<EOF -#line 10240 "configure" +#line 10255 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10247,7 +10262,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:10251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10295,15 +10310,15 @@ test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gpm.h""... $ac_c" 1>&6 -echo "configure:10299: checking for gpm.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10302 "configure" +echo "configure:10314: checking for gpm.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10317 "configure" #include "confdefs.h" #include <gpm.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10326,12 +10341,12 @@ } test -z "$with_gpm" && { echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:10330: checking for Gpm_Open in -lgpm" >&5 +echo "configure:10345: 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 <<EOF -#line 10335 "configure" +#line 10350 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10342,7 +10357,7 @@ Gpm_Open() ; return 0; } EOF -if { (eval echo configure:10346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10391,22 +10406,22 @@ echo "checking for database support" 1>&6 -echo "configure:10395: checking for database support" >&5 +echo "configure:10410: checking for database support" >&5 if test "$with_database_gnudbm" != "no"; then for ac_hdr in ndbm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10402: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10405 "configure" +echo "configure:10417: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10420 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10438,12 +10453,12 @@ if test "$have_ndbm_h" = "yes"; then echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:10442: checking for dbm_open in -lgdbm" >&5 +echo "configure:10457: 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 <<EOF -#line 10447 "configure" +#line 10462 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10454,7 +10469,7 @@ dbm_open() ; return 0; } EOF -if { (eval echo configure:10458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10477,10 +10492,10 @@ fi if test "$with_database_gnudbm" != "yes"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:10481: checking for dbm_open" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10484 "configure" +echo "configure:10496: checking for dbm_open" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10499 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dbm_open(); below. */ @@ -10503,7 +10518,7 @@ ; return 0; } EOF -if { (eval echo configure:10507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -10539,10 +10554,10 @@ if test "$with_database_dbm" != "no"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:10543: checking for dbm_open" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10546 "configure" +echo "configure:10558: checking for dbm_open" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10561 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dbm_open(); below. */ @@ -10565,7 +10580,7 @@ ; return 0; } EOF -if { (eval echo configure:10569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -10586,12 +10601,12 @@ if test "$need_libdbm" != "no"; then echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:10590: checking for dbm_open in -ldbm" >&5 +echo "configure:10605: 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 <<EOF -#line 10595 "configure" +#line 10610 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10602,7 +10617,7 @@ dbm_open() ; return 0; } EOF -if { (eval echo configure:10606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10639,10 +10654,10 @@ if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:10643: checking for dbopen" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10646 "configure" +echo "configure:10658: checking for dbopen" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10661 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dbopen(); below. */ @@ -10665,7 +10680,7 @@ ; return 0; } EOF -if { (eval echo configure:10669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -10686,12 +10701,12 @@ if test "$need_libdb" != "no"; then echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:10690: checking for dbopen in -ldb" >&5 +echo "configure:10705: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` xe_check_libs=" -ldb " cat > conftest.$ac_ext <<EOF -#line 10695 "configure" +#line 10710 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10702,7 +10717,7 @@ dbopen() ; return 0; } EOF -if { (eval echo configure:10706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10726,7 +10741,7 @@ if test "$with_database_berkdb" = "yes"; then for path in "db/db.h" "db.h"; do cat > conftest.$ac_ext <<EOF -#line 10730 "configure" +#line 10745 "configure" #include "confdefs.h" #ifdef HAVE_INTTYPES_H #define __BIT_TYPES_DEFINED__ @@ -10744,7 +10759,7 @@ ; return 0; } EOF -if { (eval echo configure:10748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_path="$path"; break else @@ -10795,12 +10810,12 @@ if test "$with_socks" = "yes"; then echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:10799: checking for SOCKSinit in -lsocks" >&5 +echo "configure:10814: checking for SOCKSinit in -lsocks" >&5 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocks " cat > conftest.$ac_ext <<EOF -#line 10804 "configure" +#line 10819 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10811,7 +10826,7 @@ SOCKSinit() ; return 0; } EOF -if { (eval echo configure:10815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10868,15 +10883,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10872: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10875 "configure" +echo "configure:10887: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10890 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10907,12 +10922,12 @@ test -z "$with_shlib" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:10911: checking for dlopen in -ldl" >&5 +echo "configure:10926: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -ldl " cat > conftest.$ac_ext <<EOF -#line 10916 "configure" +#line 10931 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10923,7 +10938,7 @@ dlopen() ; return 0; } EOF -if { (eval echo configure:10927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10952,12 +10967,12 @@ } test -z "$with_shlib" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6 -echo "configure:10956: checking for _dlopen in -lc" >&5 +echo "configure:10971: checking for _dlopen in -lc" >&5 ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <<EOF -#line 10961 "configure" +#line 10976 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10968,7 +10983,7 @@ _dlopen() ; return 0; } EOF -if { (eval echo configure:10972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10997,12 +11012,12 @@ } test -z "$with_shlib" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 -echo "configure:11001: checking for dlopen in -lc" >&5 +echo "configure:11016: checking for dlopen in -lc" >&5 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <<EOF -#line 11006 "configure" +#line 11021 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -11013,7 +11028,7 @@ dlopen() ; return 0; } EOF -if { (eval echo configure:11017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11042,12 +11057,12 @@ } test -z "$with_shlib" && { echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:11046: checking for shl_load in -ldld" >&5 +echo "configure:11061: 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 <<EOF -#line 11051 "configure" +#line 11066 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -11058,7 +11073,7 @@ shl_load() ; return 0; } EOF -if { (eval echo configure:11062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11087,12 +11102,12 @@ } test -z "$with_shlib" && { echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:11091: checking for dld_init in -ldld" >&5 +echo "configure:11106: 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 <<EOF -#line 11096 "configure" +#line 11111 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -11103,7 +11118,7 @@ dld_init() ; return 0; } EOF -if { (eval echo configure:11107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11153,7 +11168,7 @@ dll_oflags="-o " echo $ac_n "checking how to build a shared library""... $ac_c" 1>&6 -echo "configure:11157: checking how to build a shared library" >&5 +echo "configure:11172: checking how to build a shared library" >&5 case `uname -rs` in UNIX_SV*|UNIX_System_V*) dll_lflags="-G" @@ -11244,10 +11259,10 @@ for ac_func in dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11248: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 11251 "configure" +echo "configure:11263: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 11266 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -11270,7 +11285,7 @@ ; return 0; } EOF -if { (eval echo configure:11274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11306,11 +11321,11 @@ fi cat > conftest.$ac_ext <<EOF -#line 11310 "configure" +#line 11325 "configure" #include "confdefs.h" int main(int c,char *v[]){return 0;} EOF -if { (eval echo configure:11314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:11329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then : else @@ -11474,6 +11489,7 @@ + PREFIX=$prefix while true; do case "$PREFIX" in @@ -12093,6 +12109,7 @@ s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g +s%@PROGNAME@%$PROGNAME%g s%@version@%$version%g s%@configuration@%$configuration%g s%@canonical@%$canonical%g
--- a/configure.in Mon Aug 13 10:31:30 2007 +0200 +++ b/configure.in Mon Aug 13 10:32:22 2007 +0200 @@ -325,16 +325,16 @@ statedir='${prefix}/lib' libdir='${exec_prefix}/lib' mandir='${prefix}/man/man1' -infodir='${datadir}/xemacs-${version}/info' +infodir='${datadir}/${PROGNAME}-${version}/info' infopath='' install_pp='' -lispdir='${datadir}/xemacs-${version}/lisp' +lispdir='${datadir}/${PROGNAME}-${version}/lisp' dnl sitelispdir='${datadir}/xemacs/site-lisp' -pkgdir='${datadir}/xemacs-${version}/lisp' +pkgdir='${datadir}/${PROGNAME}-${version}/lisp' package_path='' -etcdir='${datadir}/xemacs-${version}/etc' -lockdir='${statedir}/xemacs/lock' -archlibdir='${libdir}/xemacs-${version}/${configuration}' +etcdir='${datadir}/${PROGNAME}-${version}/etc' +lockdir='${statedir}/${PROGNAME}/lock' +archlibdir='${libdir}/${PROGNAME}-${version}/${configuration}' with_site_lisp='no' with_menubars='' with_scrollbars='' @@ -480,6 +480,7 @@ with_kerberos | \ with_hesiod | \ with_dnet | \ + with_infodock | \ external_widget | \ verbose | \ extra_verbose | \ @@ -909,11 +910,25 @@ AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename") AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version") -dnl InfoDock version numbers. XEmacs will use the same numbering after -dnl the release of 21.0. -AC_DEFINE_UNQUOTED(INFODOCK_MAJOR_VERSION, $infodock_major_version) -AC_DEFINE_UNQUOTED(INFODOCK_MINOR_VERSION, $infodock_minor_version) -AC_DEFINE_UNQUOTED(INFODOCK_BUILD_VERSION, $infodock_build_version) +if test "$with_infodock" = "yes"; then + if test ! -f ../InfoDock.rules; then + echo "Cannot build InfoDock without InfoDock sources" + with_infodock=no + fi +fi + +if test "$with_infodock" = "yes"; then + dnl InfoDock version numbers. XEmacs will use the same style of numbering + dnl after the release of XEmacs 21.0. + AC_DEFINE_UNQUOTED(INFODOCK_MAJOR_VERSION, $infodock_major_version) + AC_DEFINE_UNQUOTED(INFODOCK_MINOR_VERSION, $infodock_minor_version) + AC_DEFINE_UNQUOTED(INFODOCK_BUILD_VERSION, $infodock_build_version) + version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version} + PROGNAME=infodock + CPPFLAGS="$CPPFLAGS -DINFODOCK" +else + PROGNAME=xemacs +fi dnl ---------------------------------- dnl Error checking and debugging flags @@ -1461,7 +1476,7 @@ dnl Use xlc by default on AIX case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac -stack_trace_eye_catcher=`echo xemacs_${version}_${canonical} | sed 'y/.-/__/'` +stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'` AC_DEFINE_UNQUOTED(STACK_TRACE_EYE_CATCHER, $stack_trace_eye_catcher) machfile="m/${machine}.h" @@ -3535,6 +3550,7 @@ dnl what sort of things to edit into Makefile, config.h and paths.h dnl configuration here uncanonicalized to avoid exceeding size limits. +AC_SUBST(PROGNAME) AC_SUBST(version) AC_SUBST(configuration) AC_SUBST(canonical)
--- a/etc/BETA Mon Aug 13 10:31:30 2007 +0200 +++ b/etc/BETA Mon Aug 13 10:32:22 2007 +0200 @@ -14,21 +14,21 @@ --------------- If you are not subscribed to the XEmacs beta list you should be. Send -an email message with a subject of `subscribe' (without the quotes) to -xemacs-beta-request@xemacs.org and follow the directions. You do not -have to fill out the survey if you don't want to. +an email message to xemacs-beta-request@xemacs.org with `subscribe' +(without the quotes) as the BODY of the message. *** Unsubscribing ----------------- -To unsubscribe from the list send an email message with a subject of -`unsubscribe' (without the quotes) to xemacs-beta-request@xemacs.org. +To unsubscribe from the list send an email message to +xemacs-beta-request@xemacs.org with `unsubscribe' (without the quotes) +as the BODY of the message. *** Administrivia ----------------- -The XEmacs beta list is managed by the SmartList mailing list package, -and the usual SmartList commands work. Do not send mailing list +The XEmacs beta list is managed by the Majordomo mailing list package, +and the usual Majordomo commands work. Do not send mailing list requests to the main address (xemacs-beta@xemacs.org), always send them to xemacs-beta-request@xemacs.org. If you have problems with the list itself, they should be brought to the attention of the XEmacs
--- a/etc/NEWS Mon Aug 13 10:31:30 2007 +0200 +++ b/etc/NEWS Mon Aug 13 10:32:22 2007 +0200 @@ -50,6 +50,9 @@ (setq echo-keystrokes 0.1) +** The new command `center-to-window-line' works like `recenter' +(bound to `C-l'), only it does not redisplay the whole display area. + ** The `M-.' command will now first search through exact tags matches, and then through inexact matches, as one would expect. @@ -166,6 +169,13 @@ change, the maximum buffer size on 32-bit machines is bumped from 128M to 1G. This setting will be the default in a future XEmacs version. +** When the variable focus-follows-mouse is non-nil, `select-frame' no +longer permanently selects a different frame. The frame selection is +temporary and is reverted when the current command terminates, much +like the buffer selected by `set-buffer'. The `other-frame' command +(`C-x 5 o') is unaffected by `focus-follows-mouse', and its behaviour +is unchanged. + ** It is now possible to build XEmacs with LDAP support You need to install a LDAP library first. The following have been tested: @@ -174,6 +184,14 @@ - LDAP SDK 1.0 from Netscape Corp. (http://developer.netscape.com) +** The arithmetic comparison functions <, >, =, /= now accept 1 or +more arguments. + +This means that if you want to test whether A < B < C, you can write +it as (< A B C) instead of (and (< A B) (< B C)). Likewise, +(apply #'> LIST) now tests if LIST is monotonously increasing -- and +so on. + ** The XEmacs hashtables now have a consistent read/print syntax. This means that a hashtable will be readably printed in a structure-like form:
--- a/lib-src/config.values.in Mon Aug 13 10:31:30 2007 +0200 +++ b/lib-src/config.values.in Mon Aug 13 10:32:22 2007 +0200 @@ -46,6 +46,7 @@ PACKAGE_PATH "@PACKAGE_PATH@" PACKAGE_PATH_USER_DEFINED "@PACKAGE_PATH_USER_DEFINED@" PREFIX "@PREFIX@" +PROGNAME "@PROGNAME@" RANLIB "@RANLIB@" RECURSIVE_MAKE "@RECURSIVE_MAKE@" SET_MAKE "@SET_MAKE@"
--- a/lib-src/update-autoloads.sh Mon Aug 13 10:31:30 2007 +0200 +++ b/lib-src/update-autoloads.sh Mon Aug 13 10:32:22 2007 +0200 @@ -38,7 +38,7 @@ exit 1 fi -EMACS="./src/xemacs" +test -z "$EMACS" && EMACS="./src/xemacs" echo " (using $EMACS)" export EMACS
--- a/lib-src/update-custom.sh Mon Aug 13 10:31:30 2007 +0200 +++ b/lib-src/update-custom.sh Mon Aug 13 10:32:22 2007 +0200 @@ -40,7 +40,7 @@ exit 1 fi -EMACS="./src/xemacs" +test -z "$EMACS" && EMACS="./src/xemacs" echo " (using $EMACS)" export EMACS
--- a/lib-src/update-elc.sh Mon Aug 13 10:31:30 2007 +0200 +++ b/lib-src/update-elc.sh Mon Aug 13 10:32:22 2007 +0200 @@ -42,7 +42,7 @@ exit 1 fi -EMACS="./src/xemacs" +test -z "$EMACS" && EMACS="./src/xemacs" export EMACS echo " (using $EMACS)"
--- a/lisp/ChangeLog Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/ChangeLog Mon Aug 13 10:32:22 2007 +0200 @@ -1,3 +1,206 @@ +1998-05-02 SL Baur <steve@altair.xemacs.org> + + * about.el (about-hackers): Update Bob Weiner bio. + (about-maintainer-info): Ditto. + +1998-05-02 Hrvoje Niksic <hniksic@srce.hr> + + * simple.el (display-warning-minimum-level): Docfix. + +1998-04-04 Per Abrahamsen <abraham@dina.kvl.dk> + + * widget.el (:default-get): New keyword. + * wid-edit.el (default, widget-default-default-get): Define it. + (group, widget-group-default-get): Define it. + (menu-choice, widget-choice-default-get): Define it. + (widget-default-get): New function. + (widget-choice-action): Call it. + (widget-editable-list-entry-create): Call it. + +1998-05-01 Hrvoje Niksic <hniksic@srce.hr> + + * byte-optimize.el (byte-boolean-vars): Removed. + (byte-optimize-lapcode): Use `built-in-variable-type' instead of + lookup through `byte-boolean-vars'. + +1998-05-01 Kirill M. Katsnelson <kkm@kis.ru> + + * x-scrollbar.el (x-init-scrollbar-from-resources): Stuff + resource-provided values into ghost specs for scrollbar-height and + scrollbar-width. + +1998-05-01 Hrvoje Niksic <hniksic@srce.hr> + + * byte-optimize.el: Don't attempt to optimize /=. + + * bytecomp.el (byte-compile-one-ore-more-args): New function. + (byte-compile-/=): Ditto. + +1998-05-02 SL Baur <steve@altair.xemacs.org> + + * apropos.el: Use `with-displaying-help-buffer'. + (apropos-print): Remove explicit mentions of "*Apropos*" buffer. + Use `with-displaying-help-buffer'. + (apropos-follow): Do not give special treatment to buffer cursor + was in prior to a mouse click. + (apropos-describe-plist): Use `with-displaying-help-buffer'. + (apropos-print-doc): Set correct buffer for setting text + properties. + +1998-05-01 SL Baur <steve@altair.xemacs.org> + + * help.el (help-buffer-prefix-string): New variable. + (help-buffer-name): Use it. + + * modeline.el (modeline-minor-mode-menu): Alphabetize the minor + mode menu. + +1998-04-30 Greg Klanderman <greg@alphatech.com> + + * frame.el (other-frame): Work even when focus-follows-mouse is true. + +1998-05-01 Hrvoje Niksic <hniksic@srce.hr> + + * files.el (find-file-noselect): Update docstring. + (find-file-noselect): Signal an error if found an unreadable file. + (file-chase-links): Save the match data. + (normal-mode): Use `lwarn' and `error-message-string'. + (interpreter-mode-alist): Change defconst to defvar. + (inhibit-first-line-modes-regexps): Ditto. + (inhibit-first-line-modes-regexps): Added .tgz. + (inhibit-first-line-modes-suffixes): Change defconst to defvar. + (change-major-mode-with-file-name): New user-option. + (set-visited-file-name): Synched with FSF. + (file-name-extension): New function, from FSF 20.3. + (file-relative-name): Synched with FSF. + (save-some-buffers): Support the C-r feature. + (recover-session): Synched with FSF. + (kill-some-buffers): Ditto. + (set-auto-mode): New argument JUST-FROM-FILE-NAME. + +1998-04-30 SL Baur <steve@altair.xemacs.org> + + * files.el (insert-file): Undo previous change and reenable use of + format.el. + +1998-04-30 Hrvoje Niksic <hniksic@srce.hr> + + * window-xemacs.el (recenter): Define. + +1998-04-29 Andy Piper <andyp@parallax.co.uk> + + * font.el (mswindows-font-create-name) + (mswindows-font-create-object): new functions for mswindows type + fonts. + + * msw-faces.el (mswindows-font-canicolize-name): fix so that + strings are parsed as well as font objects. + +1998-04-30 Hrvoje Niksic <hniksic@srce.hr> + + * modeline.el (defining-kbd-macro): Restore modeline indication of + kbd-macro being recorded. + (add-minor-mode): Simplify docstring. + (modeline-minor-mode-menu): Remove stuff. + +1998-04-29 Andy Piper <andyp@parallax.co.uk> + + * code-process.el (call-process): dynamically decide process + coding type. + +1998-04-29 Jim Radford <radford@robby.caltech.edu> + + * modeline.el: Add line-number-mode, column-number-mode to + the modeline minor-mode menu. Button2 on the line number does + goto-line. + +1998-04-29 Andy Piper <andyp@parallax.co.uk> + + * mouse.el: move x-selection-owner-p type things to + selection-owner-p. + + * msw-init.el: copy zmacs stuff from x-init.el + + * msw-select.el (mswindows-own-selection) + (mswindows-disown-selection) (mswindows-selection-owner-p): new + functions. Very simple minded implementation of selectio + ownership. + + * select.el (own-selection) (disown-selection) + (activate-region-as-selection) (select-make-extent-for-selection) + (valid-simple-selection-p): functions moved from x-select.el for + generalized selection. + + * x-select.el: see select.el changes. + + * x-toolbar.el: use new selection functions. + +1998-04-28 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * packages.el (packages-find-package-directories): Fixed bug that + would pick up multiple site-package directories. + (package-locations): Added "xemacs-packages" as a late package + location. + + * find-paths.el: Now uses `emacs-program-name' and + `emacs-program-version'. + Additions to enforce version-specific directories in + `paths-find-version-directory'. + +1998-04-29 SL Baur <steve@altair.xemacs.org> + + * default.el: Removed. + * site-start.el: Removed. + +1998-04-29 Didier Verna <verna@inf.enst.fr> + + * minibuf.el (minibuffer-history-minimum-string-length): Default + to nil. + +1998-04-28 SL Baur <steve@altair.xemacs.org> + + * find-paths.el (paths-program-name): Rename. + (paths-emacs-root-p): Ditto. + (paths-find-site-directory): Ditto. + +1998-04-26 Karl M. Hegbloom <karlheg@inetarena.com> + + * lisp-mode.el (emacs-lisp-mode-popup-menu-1): Add menu entry for + `emacs-lisp-byte-compile-and-load'. + +1998-04-26 Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> + + * ldap.el (ldap-search): Fixed additional parameter passing to + `ldap-open' + +1998-04-27 Andy Piper <andyp@parallax.co.uk> + + * select.el (kill-primary-selection) (selection-owner-p) + (copy-primary-selection) (yank-clipboard-selection) + (selection-exists-p) (delete-primary-selection): new file and + functions that do the right thing for the selected device. + + * x-menubar.el: use generalised selection functions. + + * dumped-lisp.el: dump select.el. + +1998-04-27 SL Baur <steve@altair.xemacs.org> + + * find-paths.el (paths-progname): New variable. + (paths-emacs-root-p): Use it. + (paths-find-site-directory): Ditto. + +1998-04-26 SL Baur <steve@altair.xemacs.org> + + * loadup.el ((member "dump" command-line-args)): Dump as + `infodock' if InfoDock. + +1998-04-25 SL Baur <steve@altair.xemacs.org> + + * find-paths.el (construct-emacs-version): Simplify, include + program name in the return value. + * (paths-find-version-directory): Use it. + 1998-04-25 Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> * info.el (Info-parse-dir-entries): Fixed regexp
--- a/lisp/about.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/about.el Mon Aug 13 10:32:22 2007 +0200 @@ -733,11 +733,11 @@ (widget-insert "\ Author of the Hyperbole everyday information management hypertext system and the OO-Browser multi-language code browser. He also -designed the Altrasoft integrated tool framework for software -engineers. It runs atop XEmacs and is available from his firm, -Altrasoft, which offers distributions, custom development, support, -and training packages for corporate users of XEmacs, GNU Emacs and -InfoDock. See ") +designed the Altrasoft InfoDock integrated development environment +for software engineers. It runs atop XEmacs and is available from +his firm, Altrasoft, which offers distributions, custom development, +support, and training packages for corporate users of XEmacs, GNU +Emacs and InfoDock. See ") (about-url-link 'altrasoft "Visit Altrasoft WWW page") (widget-insert ". @@ -1061,10 +1061,10 @@ (about-show-linked-info 'bw "\ Author of the Hyperbole everyday information management hypertext system and the OO-Browser multi-language code browser. He also -designed the Altrasoft integrated tool framework for software -engineers. It runs atop XEmacs and is available from his firm, -Altrasoft, which offers custom development and support packages for -corporate users of XEmacs, GNU Emacs and InfoDock. His interests +designed the Altrasoft InfoDock integrated development environment +for software engineers. It runs atop XEmacs and is available from +his firm, Altrasoft, which offers custom development and support packages +for corporate users of XEmacs, GNU Emacs and InfoDock. His interests include user interfaces, information management, CASE tools, communications and enterprise integration.\n") (about-show-linked-info 'wmperry "\
--- a/lisp/apropos.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/apropos.el Mon Aug 13 10:32:22 2007 +0200 @@ -4,6 +4,7 @@ ;; Author: Joe Wells <jbw@bigbird.bu.edu> ;; Rewritten: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389 +;; Maintainer: SL Baur <steve@altair.xemacs.org> ;; Keywords: help ;; This file is part of XEmacs. @@ -23,7 +24,7 @@ ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. -;;; Synched up with: FSF 19.34. +;;; Synched up with: Last synched with FSF 19.34, diverged since. ;;; Commentary: @@ -35,7 +36,8 @@ ;; The idea for super-apropos is based on the original implementation ;; by Lynn Slater <lrs@esl.com>. -;; History: +;;; ChangeLog: + ;; Fixed bug, current-local-map can return nil. ;; Change, doesn't calculate key-bindings unless needed. ;; Added super-apropos capability, changed print functions. @@ -140,56 +142,54 @@ ;; For auld lang syne: ;;;###autoload (fset 'command-apropos 'apropos-command) + ;;;###autoload (defun apropos-command (apropos-regexp &optional do-all) "Shows commands (interactively callable functions) that match REGEXP. With optional prefix ARG or if `apropos-do-all' is non-nil, also show variables." + ;; XEmacs: All code related to special treatment of buffer has been removed (interactive (list (read-string (concat "Apropos command " (if (or current-prefix-arg apropos-do-all) "or variable ") "(regexp): ")) current-prefix-arg)) - (let ((message - (let ((standard-output (get-buffer-create "*Apropos*"))) - (print-help-return-message 'identity)))) - (or do-all (setq do-all apropos-do-all)) - (setq apropos-accumulator - (apropos-internal apropos-regexp - (if do-all - (lambda (symbol) (or (commandp symbol) - (user-variable-p symbol))) - 'commandp))) - (if (apropos-print - t - (lambda (p) - (let (doc symbol) - (while p - (setcar p (list - (setq symbol (car p)) - (if (commandp symbol) - (if (setq doc - ;; XEmacs change: if obsolete, - ;; only mention that. - (or (function-obsoleteness-doc symbol) - (documentation symbol t))) - (substring doc 0 (string-match "\n" doc)) - "(not documented)")) - (and do-all - (user-variable-p symbol) - (if (setq doc - (or - ;; XEmacs change: if obsolete, - ;; only mention that. - (variable-obsoleteness-doc symbol) - (documentation-property - symbol 'variable-documentation t))) - (substring doc 0 - (string-match "\n" doc)))))) - (setq p (cdr p))))) - nil) - (and message (message message))))) + (or do-all (setq do-all apropos-do-all)) + (setq apropos-accumulator + (apropos-internal apropos-regexp + (if do-all + (lambda (symbol) (or (commandp symbol) + (user-variable-p symbol))) + 'commandp))) + (apropos-print + t + (lambda (p) + (let (doc symbol) + (while p + (setcar p (list + (setq symbol (car p)) + (if (commandp symbol) + (if (setq doc + ;; XEmacs change: if obsolete, + ;; only mention that. + (or (function-obsoleteness-doc symbol) + (documentation symbol t))) + (substring doc 0 (string-match "\n" doc)) + "(not documented)")) + (and do-all + (user-variable-p symbol) + (if (setq doc + (or + ;; XEmacs change: if obsolete, + ;; only mention that. + (variable-obsoleteness-doc symbol) + (documentation-property + symbol 'variable-documentation t))) + (substring doc 0 + (string-match "\n" doc)))))) + (setq p (cdr p))))) + nil)) ;;;###autoload @@ -377,7 +377,7 @@ (defun apropos-documentation-check-doc-file () (let (type symbol (sepa 2) sepb beg end) - (insert ?\^_) + (princ ?\^_) (backward-char) (insert-file-contents (concat doc-directory internal-doc-file-name)) (forward-char) @@ -500,97 +500,99 @@ (facep apropos-label-face)) ; XEmacs (setq apropos-label-face `(face ,apropos-label-face mouse-face highlight))) - (with-output-to-temp-buffer "*Apropos*" - (let ((p apropos-accumulator) - (old-buffer (current-buffer)) - symbol item point1 point2) - (set-buffer standard-output) - (apropos-mode) - ;; XEmacs change from (if window-system - (if (device-on-window-system-p) - (insert "If you move the mouse over text that changes color,\n" - (substitute-command-keys - "you can click \\[apropos-mouse-follow] to get more information.\n"))) - (insert (substitute-command-keys - "Type \\[apropos-follow] in this buffer to get full documentation.\n\n")) - (while (consp p) - (or (not spacing) (bobp) (terpri)) - (setq apropos-item (car p) - symbol (car apropos-item) - p (cdr p) - point1 (point)) - (princ symbol) ; print symbol name - (setq point2 (point)) - ;; Calculate key-bindings if we want them. - (and do-keys - (commandp symbol) - (indent-to 30 1) - (if (let ((keys - (save-excursion - (set-buffer old-buffer) - (where-is-internal symbol))) - filtered) - ;; Copy over the list of key sequences, - ;; omitting any that contain a buffer or a frame. - (while keys - (let ((key (car keys)) - (i 0) - loser) - (while (< i (length key)) - (if (or (framep (aref key i)) - (bufferp (aref key i))) - (setq loser t)) - (setq i (1+ i))) - (or loser - (setq filtered (cons key filtered)))) - (setq keys (cdr keys))) - (setq item filtered)) - ;; Convert the remaining keys to a string and insert. - (insert - (mapconcat - (lambda (key) - (setq key (key-description key)) - (if apropos-keybinding-face - (put-text-property 0 (length key) - 'face apropos-keybinding-face - key)) - key) - item ", ")) - (insert "Type ") - (insert "M-x") - (put-text-property (- (point) 3) (point) - 'face apropos-keybinding-face) - (insert " " (symbol-name symbol) " ") - (insert "RET") - (put-text-property (- (point) 3) (point) - 'face apropos-keybinding-face))) - (terpri) - ;; only now so we don't propagate text attributes all over - (put-text-property point1 point2 'item - (if (eval `(or ,@(cdr apropos-item))) - (car apropos-item) - apropos-item)) - (if apropos-symbol-face - (put-text-property point1 point2 'face apropos-symbol-face)) - (apropos-print-doc 'describe-function 1 - (if (commandp symbol) - "Command" - (if (apropos-macrop symbol) - "Macro" - "Function")) - do-keys) - (if (get symbol 'custom-type) - (apropos-print-doc 'customize-variable-other-window 2 - "User Option" do-keys) - (apropos-print-doc 'describe-variable 2 - "Variable" do-keys)) - (apropos-print-doc 'customize-other-window 6 "Group" do-keys) - (apropos-print-doc 'customize-face-other-window 5 "Face" do-keys) - (apropos-print-doc 'widget-browse-other-window 4 "Widget" do-keys) - (apropos-print-doc 'apropos-describe-plist 3 - "Plist" nil))))) - (prog1 apropos-accumulator - (setq apropos-accumulator ()))) ; permit gc + (let ((help-buffer-prefix-string "Apropos")) + (with-displaying-help-buffer apropos-regexp + (with-current-buffer standard-output + (run-hooks 'apropos-mode-hook) + (let ((p apropos-accumulator) + (old-buffer (current-buffer)) + symbol item point1 point2) + ;; XEmacs change from (if window-system + (if (device-on-window-system-p) + (progn + (princ "If you move the mouse over text that changes color,\n") + (princ (substitute-command-keys + "you can click \\[apropos-mouse-follow] to get more information.\n")))) + (princ (substitute-command-keys + "Type \\[apropos-follow] in this buffer to get full documentation.\n\n")) + (while (consp p) + (or (not spacing) (bobp) (terpri)) + (setq apropos-item (car p) + symbol (car apropos-item) + p (cdr p) + point1 (point)) + (princ symbol) ; print symbol name + (setq point2 (point)) + ;; Calculate key-bindings if we want them. + (and do-keys + (commandp symbol) + (indent-to 30 1) + (if (let ((keys + (save-excursion + (set-buffer old-buffer) + (where-is-internal symbol))) + filtered) + ;; Copy over the list of key sequences, + ;; omitting any that contain a buffer or a frame. + (while keys + (let ((key (car keys)) + (i 0) + loser) + (while (< i (length key)) + (if (or (framep (aref key i)) + (bufferp (aref key i))) + (setq loser t)) + (setq i (1+ i))) + (or loser + (setq filtered (cons key filtered)))) + (setq keys (cdr keys))) + (setq item filtered)) + ;; Convert the remaining keys to a string and insert. + (princ + (mapconcat + (lambda (key) + (setq key (key-description key)) + (if apropos-keybinding-face + (put-text-property 0 (length key) + 'face apropos-keybinding-face + key)) + key) + item ", ")) + (princ "Type ") + (princ "M-x") + (put-text-property (- (point) 3) (point) + 'face apropos-keybinding-face) + (princ (format " %s " (symbol-name symbol))) + (princ "RET") + (put-text-property (- (point) 3) (point) + 'face apropos-keybinding-face))) + (terpri) + ;; only now so we don't propagate text attributes all over + (put-text-property point1 point2 'item + (if (eval `(or ,@(cdr apropos-item))) + (car apropos-item) + apropos-item)) + (if apropos-symbol-face + (put-text-property point1 point2 'face apropos-symbol-face)) + (apropos-print-doc 'describe-function 1 + (if (commandp symbol) + "Command" + (if (apropos-macrop symbol) + "Macro" + "Function")) + do-keys) + (if (get symbol 'custom-type) + (apropos-print-doc 'customize-variable-other-window 2 + "User Option" do-keys) + (apropos-print-doc 'describe-variable 2 + "Variable" do-keys)) + (apropos-print-doc 'customize-other-window 6 "Group" do-keys) + (apropos-print-doc 'customize-face-other-window 5 "Face" do-keys) + (apropos-print-doc 'widget-browse-other-window 4 "Widget" do-keys) + (apropos-print-doc 'apropos-describe-plist 3 + "Plist" nil)))))) + (prog1 apropos-accumulator + (setq apropos-accumulator ())))) ; permit gc (defun apropos-macrop (symbol) @@ -605,35 +607,40 @@ (defun apropos-print-doc (action i str do-keys) - (if (stringp (setq i (nth i apropos-item))) - (progn - (insert " ") - (put-text-property (- (point) 2) (1- (point)) - 'action action) - (insert str ": ") - (if apropos-label-face - (add-text-properties (- (point) (length str) 2) - (1- (point)) - apropos-label-face)) - (insert (if do-keys (substitute-command-keys i) i)) - (or (bolp) (terpri))))) + (with-current-buffer standard-output + (if (stringp (setq i (nth i apropos-item))) + (progn + (insert " ") + (put-text-property (- (point) 2) (1- (point)) + 'action action) + (insert str ": ") + (if apropos-label-face + (add-text-properties (- (point) (length str) 2) + (1- (point)) + apropos-label-face)) + (add-text-properties (- (point) (length str) 2) + (1- (point)) + (list 'keymap apropos-mode-map)) + (insert (if do-keys (substitute-command-keys i) i)) + (or (bolp) (terpri)))))) (defun apropos-mouse-follow (event) (interactive "e") - (let ((other (if (eq (current-buffer) (get-buffer "*Apropos*")) - () - (current-buffer)))) - (save-excursion - ;; XEmacs change from: - ;; (set-buffer (window-buffer (posn-window (event-start event)))) - ;; (goto-char (posn-point (event-start event))) - (set-buffer (event-buffer event)) - (goto-char (event-closest-point event)) - ;; XEmacs change: following code seems useless - ;;(or (and (not (eobp)) (get-text-property (point) 'mouse-face)) - ;; (and (not (bobp)) (get-text-property (1- (point)) 'mouse-face)) - ;; (error "There is nothing to follow here")) - (apropos-follow other)))) + ;; XEmacs change: We're using the standard help buffer code now, don't + ;; do special tricks about trying to preserve current-buffer about mouse + ;; clicks. + + (save-excursion + ;; XEmacs change from: + ;; (set-buffer (window-buffer (posn-window (event-start event)))) + ;; (goto-char (posn-point (event-start event))) + (set-buffer (event-buffer event)) + (goto-char (event-closest-point event)) + ;; XEmacs change: following code seems useless + ;;(or (and (not (eobp)) (get-text-property (point) 'mouse-face)) + ;; (and (not (bobp)) (get-text-property (1- (point)) 'mouse-face)) + ;; (error "There is nothing to follow here")) + (apropos-follow))) (defun apropos-follow (&optional other) @@ -660,16 +667,19 @@ (defun apropos-describe-plist (symbol) "Display a pretty listing of SYMBOL's plist." - (with-output-to-temp-buffer "*Help*" - (set-buffer standard-output) - (princ "Symbol ") - (prin1 symbol) - (princ "'s plist is\n (") - (if apropos-symbol-face - (put-text-property 8 (- (point) 14) 'face apropos-symbol-face)) - (insert (apropos-format-plist symbol "\n ")) - (princ ")") - (print-help-return-message))) + (let ((help-buffer-prefix-string "Apropos-plist")) + (with-displaying-help-buffer (symbol-name symbol) + (run-hooks 'apropos-mode-hook) + (princ "Symbol ") + (prin1 symbol) + (princ "'s plist is\n (") + (with-current-buffer standard-output + (if apropos-symbol-face + (put-text-property 8 (- (point) 14) 'face apropos-symbol-face))) + (princ (apropos-format-plist symbol "\n ")) + (princ ")") + (terpri) + (print-help-return-message)))) (provide 'apropos) ; XEmacs
--- a/lisp/byte-optimize.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/byte-optimize.el Mon Aug 13 10:32:22 2007 +0200 @@ -1029,7 +1029,7 @@ (put 'while 'byte-optimizer 'byte-optimize-while) ;; byte-compile-negation-optimizer lives in bytecomp.el -(put '/= 'byte-optimizer 'byte-compile-negation-optimizer) +;(put '/= 'byte-optimizer 'byte-compile-negation-optimizer) (put 'atom 'byte-optimizer 'byte-compile-negation-optimizer) (put 'nlistp 'byte-optimizer 'byte-compile-negation-optimizer) @@ -1396,29 +1396,41 @@ ;;; old-pop-ups are not EQ when really they are. So we have to know what ;;; the BOOL variables are, and not perform this optimization on them. ;;; -(defconst byte-boolean-vars - '(abbrev-all-caps purify-flag find-file-compare-truenames - find-file-use-truenames find-file-visit-truename - find-file-existing-other-name byte-metering-on - zmacs-regions zmacs-region-active-p zmacs-region-stays - atomic-extent-goto-char-p suppress-early-error-handler - noninteractive ignore-kernel debug-on-quit debug-on-next-call - modifier-keys-are-sticky x-allow-sendevents vms-stmlf-recfm - disable-auto-save-when-buffer-shrinks indent-tabs-mode - load-in-progress load-warn-when-source-newer load-warn-when-source-only - load-ignore-elc-files load-force-doc-strings - fail-on-bucky-bit-character-escapes popup-menu-titles - menubar-show-keybindings completion-ignore-case - canna-empty-info canna-through-info canna-underline - canna-inhibit-hankakukana x-handle-non-fully-specified-fonts - print-escape-newlines print-readably - delete-exited-processes truncate-partial-width-windows - visible-bell no-redraw-on-reenter cursor-in-echo-area - inhibit-warning-display parse-sexp-ignore-comments words-include-escapes - scroll-on-clipped-lines pop-up-frames pop-up-windows) - "DEFVAR_BOOL variables. Giving these any non-nil value sets them to t. -If this does not enumerate all DEFVAR_BOOL variables, the byte-optimizer -may generate incorrect code.") + +;;; This used to hold a large list of boolean variables, which had to +;;; be updated every time a new DEFVAR_BOOL is added, making it very +;;; hard to maintain. Such a list is not necessary under XEmacs, +;;; where we can use `built-in-variable-type' to query for boolean +;;; variables. + +;(defconst byte-boolean-vars +; '(abbrev-all-caps purify-flag find-file-compare-truenames +; find-file-use-truenames delete-auto-save-files byte-metering-on +; x-seppuku-on-epipe zmacs-regions zmacs-region-active-p +; zmacs-region-stays atomic-extent-goto-char-p +; suppress-early-error-handler-backtrace noninteractive +; inhibit-early-packages inhibit-autoloads debug-paths +; inhibit-site-lisp debug-on-quit debug-on-next-call +; modifier-keys-are-sticky x-allow-sendevents +; mswindows-dynamic-frame-resize focus-follows-mouse +; inhibit-input-event-recording enable-multibyte-characters +; disable-auto-save-when-buffer-shrinks +; allow-deletion-of-last-visible-frame indent-tabs-mode +; load-in-progress load-warn-when-source-newer +; load-warn-when-source-only load-ignore-elc-files +; load-force-doc-strings fail-on-bucky-bit-character-escapes +; popup-menu-titles menubar-show-keybindings completion-ignore-case +; canna-empty-info canna-through-info canna-underline +; canna-inhibit-hankakukana enable-multibyte-characters +; re-short-flag x-handle-non-fully-specified-fonts +; print-escape-newlines print-readably delete-exited-processes +; windowed-process-io visible-bell no-redraw-on-reenter +; cursor-in-echo-area inhibit-warning-display +; column-number-start-at-one parse-sexp-ignore-comments +; words-include-escapes scroll-on-clipped-lines) +; "DEFVAR_BOOL variables. Giving these any non-nil value sets them to t. +;If this does not enumerate all DEFVAR_BOOL variables, the byte-optimizer +;may generate incorrect code.") (defun byte-optimize-lapcode (lap &optional for-effect) "Simple peephole optimizer. LAP is both modified and returned." @@ -1497,7 +1509,8 @@ ((and (eq 'byte-varref (car lap2)) (eq (cdr lap1) (cdr lap2)) (memq (car lap1) '(byte-varset byte-varbind))) - (if (and (setq tmp (memq (car (cdr lap2)) byte-boolean-vars)) + (if (and (setq tmp (eq (built-in-variable-type (car (cdr lap2))) + 'boolean)) (not (eq (car lap0) 'byte-constant))) nil (setq keep-going t) @@ -1803,7 +1816,8 @@ (eq (car (car (setq tmp (cdr (memq (cdr lap2) lap))))) 'byte-varref) (eq (cdr (car tmp)) (cdr lap1)) - (not (memq (car (cdr lap1)) byte-boolean-vars))) + (not (eq (built-in-variable-type (car (cdr lap1))) + 'boolean))) ;;(byte-compile-log-lap " Pulled %s to end of loop" (car tmp)) (let ((newtag (byte-compile-make-tag))) (byte-compile-log-lap
--- a/lisp/bytecomp.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/bytecomp.el Mon Aug 13 10:32:22 2007 +0200 @@ -2889,11 +2889,12 @@ (byte-defop-compiler20 old-memq 2) (byte-defop-compiler cons 2) (byte-defop-compiler aref 2) -(byte-defop-compiler (= byte-eqlsign) 2) -(byte-defop-compiler (< byte-lss) 2) -(byte-defop-compiler (> byte-gtr) 2) -(byte-defop-compiler (<= byte-leq) 2) -(byte-defop-compiler (>= byte-geq) 2) +(byte-defop-compiler (= byte-eqlsign) byte-compile-one-or-more-args) +(byte-defop-compiler (< byte-lss) byte-compile-one-or-more-args) +(byte-defop-compiler (> byte-gtr) byte-compile-one-or-more-args) +(byte-defop-compiler (<= byte-leq) byte-compile-one-or-more-args) +(byte-defop-compiler (>= byte-geq) byte-compile-one-or-more-args) +(byte-defop-compiler /= byte-compile-/=) (byte-defop-compiler get 2+1) (byte-defop-compiler nth 2) (byte-defop-compiler substring 2-3) @@ -3103,6 +3104,21 @@ (byte-defop-compiler nconc) (byte-defop-compiler-1 beginning-of-line) +(defun byte-compile-one-or-more-args (form) + (let ((len (length form))) + (cond ((= len 1) (byte-compile-subr-wrong-args form "1 or more")) + ((= len 2) (byte-compile-constant t)) + ((= len 3) (byte-compile-two-args form)) + (t (byte-compile-normal-call form))))) + +(defun byte-compile-/= (form) + (let ((len (length form))) + (cond ((= len 1) (byte-compile-subr-wrong-args form "1 or more")) + ((= len 2) (byte-compile-constant t)) + ;; optimize (/= X Y) to (not (= X Y)) + ((= len 3) (byte-compile-form-do-effect `(not (= ,@(cdr form))))) + (t (byte-compile-normal-call form))))) + (defun byte-compile-buffer-substring (form) (let ((len (length form))) ;; buffer-substring used to take exactly two args, but now takes 0-3. @@ -3539,18 +3555,18 @@ (byte-compile-out 'byte-unbind (length (car (cdr form)))))) -(byte-defop-compiler-1 /= byte-compile-negated) +;;(byte-defop-compiler-1 /= byte-compile-negated) (byte-defop-compiler-1 atom byte-compile-negated) (byte-defop-compiler-1 nlistp byte-compile-negated) -(put '/= 'byte-compile-negated-op '=) +;;(put '/= 'byte-compile-negated-op '=) (put 'atom 'byte-compile-negated-op 'consp) (put 'nlistp 'byte-compile-negated-op 'listp) (defun byte-compile-negated (form) (byte-compile-form-do-effect (byte-compile-negation-optimizer form))) -;; Even when optimization is off, /= is optimized to (not (= ...)). +;; Even when optimization is off, atom is optimized to (not (consp ...)). (defun byte-compile-negation-optimizer (form) ;; an optimizer for forms where <form1> is less efficient than (not <form2>) (list 'not
--- a/lisp/code-process.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/code-process.el Mon Aug 13 10:32:22 2007 +0200 @@ -77,6 +77,7 @@ (setq ret (funcall ret 'call-process program)) ) (cond ((consp ret) (car ret)) + ((not ret) 'undecided) ((find-coding-system ret) ret) ) ))))
--- a/lisp/default.el Mon Aug 13 10:31:30 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -;; default.el --- Site-wide file run after User's init file is run.
--- a/lisp/dumped-lisp.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/dumped-lisp.el Mon Aug 13 10:32:22 2007 +0200 @@ -159,6 +159,7 @@ #+window-system "gui" #+window-system "mode-motion" #+window-system "mouse" + #+window-system "select" ;; preload the X code, for faster startup. #+(and (not infodock) (or x mswindows) menubar) "x-menubar" #+(and infodock (or x mswindows) menubar) "id-menus"
--- a/lisp/files.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/files.el Mon Aug 13 10:32:22 2007 +0200 @@ -23,7 +23,7 @@ ;; Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA ;; 02111-1307, USA. -;;; Synched up with: FSF 19.34 [Partial]. +;;; Synched up with: FSF 20.3 (but diverging) ;;; Warning: Merging this file is tough. Beware. ;;; Commentary: @@ -496,85 +496,7 @@ ; We have this in C and use the realpath() system call. ;(defun file-truename (filename &optional counter prev-dirs) -; "Return the truename of FILENAME, which should be absolute. -;The truename of a file name is found by chasing symbolic links -;both at the level of the file and at the level of the directories -;containing it, until no links are left at any level. -; -;The arguments COUNTER and PREV-DIRS are used only in recursive calls. -;Do not specify them in other calls." -; ;; COUNTER can be a cons cell whose car is the count of how many more links -; ;; to chase before getting an error. -; ;; PREV-DIRS can be a cons cell whose car is an alist -; ;; of truenames we've just recently computed. -; ;; The last test looks dubious, maybe `+' is meant here? --simon. -; (if (or (string= filename "") (string= filename "~") -; (and (string= (substring filename 0 1) "~") -; (string-match "~[^/]*" filename))) -; (progn -; (setq filename (expand-file-name filename)) -; (if (string= filename "") -; (setq filename "/")))) -; (or counter (setq counter (list 100))) -; (let (done -; ;; For speed, remove the ange-ftp completion handler from the list. -; ;; We know it's not needed here. -; ;; For even more speed, do this only on the outermost call. -; (file-name-handler-alist -; (if prev-dirs file-name-handler-alist -; (let ((tem (copy-sequence file-name-handler-alist))) -; (delq (rassq 'ange-ftp-completion-hook-function tem) tem))))) -; (or prev-dirs (setq prev-dirs (list nil))) -; ;; If this file directly leads to a link, process that iteratively -; ;; so that we don't use lots of stack. -; (while (not done) -; (setcar counter (1- (car counter))) -; (if (< (car counter) 0) -; (error "Apparent cycle of symbolic links for %s" filename)) -; (let ((handler (find-file-name-handler filename 'file-truename))) -; ;; For file name that has a special handler, call handler. -; ;; This is so that ange-ftp can save time by doing a no-op. -; (if handler -; (setq filename (funcall handler 'file-truename filename) -; done t) -; (let ((dir (or (file-name-directory filename) default-directory)) -; target dirfile) -; ;; Get the truename of the directory. -; (setq dirfile (directory-file-name dir)) -; ;; If these are equal, we have the (or a) root directory. -; (or (string= dir dirfile) -; ;; If this is the same dir we last got the truename for, -; ;; save time--don't recalculate. -; (if (assoc dir (car prev-dirs)) -; (setq dir (cdr (assoc dir (car prev-dirs)))) -; (let ((old dir) -; (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) -; (setcar prev-dirs (cons (cons old new) (car prev-dirs))) -; (setq dir new)))) -; (if (equal ".." (file-name-nondirectory filename)) -; (setq filename -; (directory-file-name (file-name-directory (directory-file-name dir))) -; done t) -; (if (equal "." (file-name-nondirectory filename)) -; (setq filename (directory-file-name dir) -; done t) -; ;; Put it back on the file name. -; (setq filename (concat dir (file-name-nondirectory filename))) -; ;; Is the file name the name of a link? -; (setq target (file-symlink-p filename)) -; (if target -; ;; Yes => chase that link, then start all over -; ;; since the link may point to a directory name that uses links. -; ;; We can't safely use expand-file-name here -; ;; since target might look like foo/../bar where foo -; ;; is itself a link. Instead, we handle . and .. above. -; (setq filename -; (if (file-name-absolute-p target) -; target -; (concat dir target)) -; done nil) -; ;; No, we are done! -; (setq done t)))))))) +; [... lots of code snipped ...] ; filename)) ;; XEmacs addition. Called from `insert-file-contents-internal' @@ -610,28 +532,29 @@ unlike `file-truename'." (let (tem (count 100) (newname filename)) (while (setq tem (file-symlink-p newname)) - (if (= count 0) - (error "Apparent cycle of symbolic links for %s" filename)) - ;; In the context of a link, `//' doesn't mean what XEmacs thinks. - (while (string-match "//+" tem) - (setq tem (concat (substring tem 0 (1+ (match-beginning 0))) - (substring tem (match-end 0))))) - ;; Handle `..' by hand, since it needs to work in the - ;; target of any directory symlink. - ;; This code is not quite complete; it does not handle - ;; embedded .. in some cases such as ./../foo and foo/bar/../../../lose. - (while (string-match "\\`\\.\\./" tem) ;#### Unix specific - (setq tem (substring tem 3)) - (setq newname (file-name-as-directory - ;; Do the .. by hand. - (directory-file-name - (file-name-directory - ;; Chase links in the default dir of the symlink. - (file-chase-links - (directory-file-name - (file-name-directory newname)))))))) - (setq newname (expand-file-name tem (file-name-directory newname))) - (setq count (1- count))) + (save-match-data + (if (= count 0) + (error "Apparent cycle of symbolic links for %s" filename)) + ;; In the context of a link, `//' doesn't mean what XEmacs thinks. + (while (string-match "//+" tem) + (setq tem (concat (substring tem 0 (1+ (match-beginning 0))) + (substring tem (match-end 0))))) + ;; Handle `..' by hand, since it needs to work in the + ;; target of any directory symlink. + ;; This code is not quite complete; it does not handle + ;; embedded .. in some cases such as ./../foo and foo/bar/../../../lose. + (while (string-match "\\`\\.\\./" tem) ;#### Unix specific + (setq tem (substring tem 3)) + (setq newname (file-name-as-directory + ;; Do the .. by hand. + (directory-file-name + (file-name-directory + ;; Chase links in the default dir of the symlink. + (file-chase-links + (directory-file-name + (file-name-directory newname)))))))) + (setq newname (expand-file-name tem (file-name-directory newname))) + (setq count (1- count)))) newname)) (defun switch-to-other-buffer (arg) @@ -913,6 +836,7 @@ ;; This function is needed by FSF vc.el. I hope somebody can make it ;; work for XEmacs. -sb. +;; #### In what way does it not work? --hniksic (defun find-buffer-visiting (filename) "Return the buffer visiting file FILENAME (a string). This is like `get-file-buffer', except that it checks for any buffer @@ -974,20 +898,18 @@ If a buffer exists visiting FILENAME, return that one, but verify that the file has not changed since visited or saved. The buffer is not selected, just returned to the caller. -If NOWARN is non-nil, warning messages about several potential -problems will be suppressed." +If NOWARN is non-nil, warning messages will be suppressed. +If RAWFILE is non-nil, the file is read literally." (setq filename (abbreviate-file-name (expand-file-name filename))) (if (file-directory-p filename) (if (and (fboundp 'dired-noselect) find-file-run-dired) (dired-noselect (if find-file-use-truenames (abbreviate-file-name (file-truename filename)) filename)) - (error "%s is a directory." filename)) + (error "%s is a directory" filename)) (let* ((buf (get-file-buffer filename)) (truename (abbreviate-file-name (file-truename filename))) - (number (nthcdr 10 (file-attributes (file-truename filename)))) -; (number (and buffer-file-truename -; (nthcdr 10 (file-attributes buffer-file-truename)))) + (number (nthcdr 10 (file-attributes truename))) ; ;; Find any buffer for a file which has same truename. ; (other (and (not buf) (find-buffer-visiting filename))) (error nil)) @@ -1022,10 +944,9 @@ ;; Certain files should be reverted automatically ;; if they have changed on disk and not in the buffer. ((and (not (buffer-modified-p buf)) - (let (found) - (dolist (rx revert-without-query found) - (when (string-match rx filename) - (setq found t))))) + (dolist (rx revert-without-query nil) + (when (string-match rx filename) + (return t)))) (with-current-buffer buf (message "Reverting file %s..." filename) (revert-buffer t t) @@ -1044,8 +965,7 @@ (gettext "File %s changed on disk. Reread from disk into %s? ")) (file-name-nondirectory filename) (buffer-name buf)))) - (save-excursion - (set-buffer buf) + (with-current-buffer buf (revert-buffer t t))))) ;; Else: we must create a new buffer for filename (save-excursion @@ -1064,15 +984,23 @@ (condition-case () (insert-file-contents-literally filename t) (file-error + (when (and (file-exists-p filename) + (not (file-readable-p filename))) + (kill-buffer buf) + (signal 'file-error (list "File is not readable" filename))) ;; Unconditionally set error (setq error t))) - (condition-case e + (condition-case () (insert-file-contents filename t) (file-error + (when (and (file-exists-p filename) + (not (file-readable-p filename))) + (kill-buffer buf) + (signal 'file-error (list "File is not readable" filename))) ;; Run find-file-not-found-hooks until one returns non-nil. (or (run-hook-with-args-until-success 'find-file-not-found-hooks) ;; If they fail too, set error. - (setq error e))))) + (setq error t))))) ;; Find the file's truename, and maybe use that as visited name. ;; automatically computed in XEmacs, unless jka-compr was used! (unless buffer-file-truename @@ -1087,10 +1015,6 @@ 0 (match-beginning 0)))) (not (member logical find-file-not-true-dirname-list))) (setq buffer-file-name buffer-file-truename)) -; (if find-file-visit-truename -; (setq buffer-file-name -; (setq filename -; (expand-file-name buffer-file-truename)))) (and find-file-use-truenames ;; This should be in C. Put pathname abbreviations that have ;; been explicitly requested back into the pathname. Most @@ -1106,11 +1030,16 @@ (make-local-variable 'backup-inhibited) (setq backup-inhibited t))) (if rawfile + ;; #### FSF 20.3 sets buffer-file-coding-system to + ;; `no-conversion' here. Should we copy? It also makes + ;; `find-file-literally' a local variable and sets it to t. nil (after-find-file error (not nowarn)) (setq buf (current-buffer))))) buf))) +;; FSF has `insert-file-literally' and `find-file-literally' here. + (defvar after-find-file-from-revert-buffer nil) (defun after-find-file (&optional error warn noauto @@ -1195,8 +1124,9 @@ nil)) (condition-case err (hack-local-variables (not find-file)) - (error (message "File local-variables error: %s" - (prin1-to-string err)))))) + (error (lwarn 'local-variables 'warning + "File local-variables error: %s" + (error-message-string err)))))) (defvar auto-mode-alist '(("\\.te?xt\\'" . text-mode) @@ -1288,7 +1218,7 @@ calling FUNCTION (if it's not nil), we delete the suffix that matched REGEXP and search the list again for another match.") -(defconst interpreter-mode-alist +(defvar interpreter-mode-alist '(("^#!.*csh" . sh-mode) ("^#!.*sh\\b" . sh-mode) ("^#!.*\\b\\(scope\\|wish\\|tcl\\|expect\\)" . tcl-mode) @@ -1312,10 +1242,10 @@ with the name of the interpreter specified in the first line. If it matches, mode MODE is selected.") -(defconst inhibit-first-line-modes-regexps (purecopy '("\\.tar\\'")) +(defvar inhibit-first-line-modes-regexps (purecopy '("\\.tar\\'" "\\.tgz\\'")) "List of regexps; if one matches a file name, don't look for `-*-'.") -(defconst inhibit-first-line-modes-suffixes nil +(defvar inhibit-first-line-modes-suffixes nil "List of regexps for what to ignore, for `inhibit-first-line-modes-regexps'. When checking `inhibit-first-line-modes-regexps', we first discard from the end of the file name anything that matches one of these regexps.") @@ -1324,7 +1254,7 @@ "" ; set by command-line "File name including directory of user's initialization file.") -(defun set-auto-mode () +(defun set-auto-mode (&optional just-from-file-name) "Select major mode appropriate for current buffer. This checks for a -*- mode tag in the buffer's text, compares the filename against the entries in `auto-mode-alist', @@ -1335,7 +1265,11 @@ Local Variables section of the file; for that, use `hack-local-variables'. If `enable-local-variables' is nil, this function does not check for a --*- mode tag." +-*- mode tag. + +If the optional argument JUST-FROM-FILE-NAME is non-nil, +then we do not set anything but the major mode, +and we don't even do that unless it would come from the file name." (save-excursion ;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*- ;; Do this by calling the hack-local-variables helper to avoid redundancy. @@ -1370,24 +1304,25 @@ (setq mode (cdr (car alist)) keep-going nil))) (setq alist (cdr alist)))) - ;; If we can't deduce a mode from the file name, - ;; look for an interpreter specified in the first line. - (if (and (null mode) - (save-excursion ; XEmacs - (goto-char (point-min)) - (looking-at "#!"))) - (let ((firstline - (buffer-substring - (point-min) - (save-excursion - (goto-char (point-min)) (end-of-line) (point))))) - (setq alist interpreter-mode-alist) - (while alist - (if (string-match (car (car alist)) firstline) - (progn - (setq mode (cdr (car alist))) - (setq alist nil)) - (setq alist (cdr alist)))))) + (unless just-from-file-name + ;; If we can't deduce a mode from the file name, + ;; look for an interpreter specified in the first line. + (if (and (null mode) + (save-excursion ; XEmacs + (goto-char (point-min)) + (looking-at "#!"))) + (let ((firstline + (buffer-substring + (point-min) + (save-excursion + (goto-char (point-min)) (end-of-line) (point))))) + (setq alist interpreter-mode-alist) + (while alist + (if (string-match (car (car alist)) firstline) + (progn + (setq mode (cdr (car alist))) + (setq alist nil)) + (setq alist (cdr alist))))))) (if mode (if (not (fboundp mode)) (progn @@ -1401,8 +1336,13 @@ (message "Mode %s either doesn't exist or is not a known package" mode)) (sit-for 2) (error "%s" mode))) - (funcall mode))) - )))))) + (unless (and just-from-file-name + (or + ;; Don't reinvoke major mode. + (eq mode major-mode) + ;; Don't lose on minor modes. + (assq mode minor-mode-alist))) + (funcall mode)))))))))) (defvar hack-local-variables-hook nil "Normal hook run after processing a file's local variables specs. @@ -1718,12 +1658,28 @@ (t (make-local-variable var) (set var val)))) -(defun set-visited-file-name (filename) +(defcustom change-major-mode-with-file-name t + "*Non-nil means \\[write-file] should set the major mode from the file name. +However, the mode will not be changed if +\(1) a local variables list or the `-*-' line specifies a major mode, or +\(2) the current major mode is a \"special\" mode, +\ not suitable for ordinary files, or +\(3) the new file name does not particularly specify any mode." + :type 'boolean + :group 'editing-basics) + +(defun set-visited-file-name (filename &optional no-query along-with-file) "Change name of file visited in current buffer to FILENAME. The next time the buffer is saved it will go in the newly specified file. nil or empty string as argument means make buffer not be visiting any file. Remember to delete the initial contents of the minibuffer -if you wish to pass an empty string as the argument." +if you wish to pass an empty string as the argument. + +The optional second argument NO-QUERY, if non-nil, inhibits asking for +confirmation in the case where another buffer is already visiting FILENAME. + +The optional third argument ALONG-WITH-FILE, if non-nil, means that +the old visited file has been renamed to the new name FILENAME." (interactive "FSet visited file name: ") (if (buffer-base-buffer) (error "An indirect buffer cannot visit a file")) @@ -1739,6 +1695,12 @@ ;; #### Do we need to check if truename is non-nil? (if find-file-use-truenames (setq filename truename)))) + (let ((buffer (and filename (find-buffer-visiting filename)))) + (and buffer (not (eq buffer (current-buffer))) + (not no-query) + (not (y-or-n-p (message "A buffer is visiting %s; proceed? " + filename))) + (error "Aborted"))) (or (equal filename buffer-file-name) (progn (and filename (lock-buffer filename)) @@ -1754,7 +1716,8 @@ (or (string= new-name (buffer-name)) (rename-buffer new-name t)))) (setq buffer-backed-up nil) - (clear-visited-file-modtime) + (or along-with-file + (clear-visited-file-modtime)) (compute-buffer-file-truename) ; insert-file-contents does this too. ; ;; Abbreviate the file names of the buffer. ; (if truename @@ -1777,12 +1740,14 @@ (kill-local-variable 'backup-inhibited) ;; If buffer was read-only because of version control, ;; that reason is gone now, so make it writable. - (if (and (boundp 'vc-mode) vc-mode) - (setq buffer-read-only nil)) - (kill-local-variable 'vc-mode) + (when (boundp 'vc-mode) + (if vc-mode + (setq buffer-read-only nil)) + (kill-local-variable 'vc-mode)) ;; Turn off backup files for certain file names. ;; Since this is a permanent local, the major mode won't eliminate it. - (and (not (funcall backup-enable-predicate buffer-file-name)) + (and buffer-file-name + (not (funcall backup-enable-predicate buffer-file-name)) (progn (make-local-variable 'backup-inhibited) (setq backup-inhibited t))) @@ -1803,7 +1768,17 @@ (file-exists-p oauto) (rename-file oauto buffer-auto-save-file-name t))) (if buffer-file-name + (not along-with-file) (set-buffer-modified-p t)) + ;; Update the major mode, if the file name determines it. + (condition-case nil + ;; Don't change the mode if it is special. + (or (not change-major-mode-with-file-name) + (get major-mode 'mode-class) + ;; Don't change the mode if the local variable list specifies it. + (hack-local-variables t) + (set-auto-mode t)) + (error nil)) ;; #### ?? (run-hooks 'after-set-visited-file-name-hooks)) @@ -1994,6 +1969,22 @@ (substring file 0 (match-beginning 0))) filename)))) +(defun file-name-extension (filename &optional period) + "Return FILENAME's final \"extension\". +The extension, in a file name, is the part that follows the last `.'. +Return nil for extensionless file names such as `foo'. +Return the empty string for file names such as `foo.'. + +If PERIOD is non-nil, then the returned value includes the period +that delimits the extension, and if FILENAME has no extension, +the value is \"\"." + (save-match-data + (let ((file (file-name-sans-versions (file-name-nondirectory filename)))) + (if (string-match "\\.[^.]*\\'" file) + (substring file (+ (match-beginning 0) (if period 0 1))) + (if period + ""))))) + (defun make-backup-file-name (file) "Create the non-numeric backup file name for FILE. This is a separate function so you can redefine it for customization." @@ -2081,15 +2072,43 @@ (car (cdr (file-attributes filename)))) (defun file-relative-name (filename &optional directory) - "Convert FILENAME to be relative to DIRECTORY (default: default-directory)." - (setq filename (expand-file-name filename) - directory (file-name-as-directory (expand-file-name - (or directory default-directory)))) - (let ((ancestor "")) - (while (not (string-match (concat "^" (regexp-quote directory)) filename)) - (setq directory (file-name-directory (substring directory 0 -1)) - ancestor (concat "../" ancestor))) - (concat ancestor (substring filename (match-end 0))))) + "Convert FILENAME to be relative to DIRECTORY (default: default-directory).1 +This function returns a relative file name which is equivalent to FILENAME +when used with that default directory as the default. +If this is impossible (which can happen on MSDOS and Windows +when the file name and directory use different drive names) +then it returns FILENAME." + (save-match-data + (let ((fname (expand-file-name filename))) + (setq directory (file-name-as-directory + (expand-file-name (or directory default-directory)))) + ;; On Microsoft OSes, if FILENAME and DIRECTORY have different + ;; drive names, they can't be relative, so return the absolute name. + (if (and (or (eq system-type 'ms-dos) + (eq system-type 'windows-nt)) + (not (string-equal (substring fname 0 2) + (substring directory 0 2)))) + filename + (let ((ancestor ".") + (fname-dir (file-name-as-directory fname))) + (while (and (not (string-match (concat "^" (regexp-quote directory)) fname-dir)) + (not (string-match (concat "^" (regexp-quote directory)) fname))) + (setq directory (file-name-directory (substring directory 0 -1)) + ancestor (if (equal ancestor ".") + ".." + (concat "../" ancestor)))) + ;; Now ancestor is empty, or .., or ../.., etc. + (if (string-match (concat "^" (regexp-quote directory)) fname) + ;; We matched within FNAME's directory part. + ;; Add the rest of FNAME onto ANCESTOR. + (let ((rest (substring fname (match-end 0)))) + (if (and (equal ancestor ".") + (not (equal rest ""))) + ;; But don't bother with ANCESTOR if it would give us `./'. + rest + (concat (file-name-as-directory ancestor) rest))) + ;; We matched FNAME's directory equivalent. + ancestor)))))) (defun save-buffer (&optional args) "Save current buffer in visited file if modified. Versions described below. @@ -2419,16 +2438,20 @@ ;; (it makes the dialog box too big, and you get an error ;; "wrong type argument: framep, nil" when you hit q after ;; choosing the option from the dialog box) -; (list (list ?\C-r (lambda (buf) -; (view-buffer buf) -; (setq view-exit-action -; '(lambda (ignore) -; (exit-recursive-edit))) -; (recursive-edit) -; ;; Return nil to ask about BUF again. -; nil) -; "display the current buffer")) - )) + + ;; We should fix the dialog box rather than disabling + ;; this! --hniksic + (list (list ?\C-r (lambda (buf) + ;; FSF has an EXIT-ACTION argument to + ;; `view-buffer'. + (view-buffer buf) + (setq view-exit-action + (lambda (ignore) + (exit-recursive-edit))) + (recursive-edit) + ;; Return nil to ask about BUF again. + nil) + "display the current buffer")))) (abbrevs-done (and save-abbrevs abbrevs-changed (progn @@ -2480,8 +2503,7 @@ (if (file-directory-p filename) (signal 'file-error (list "Opening input file" "file is a directory" filename))) - (let* (format-alist ; format.el only confuses people in this context - (tem + (let ((tem (if codesys (let ((coding-system-for-read (get-coding-system codesys))) @@ -2623,10 +2645,11 @@ the files modes. Normally we reinitialize them using `normal-mode'. If the value of `revert-buffer-function' is non-nil, it is called to -do the work. +do all the work for this command. Otherwise, the hooks +`before-revert-hook' and `after-revert-hook' are run at the beginning +and the end, and if `revert-buffer-insert-file-contents-function' is +non-nil, it is called instead of rereading visited file contents." -The default revert function runs the hook `before-revert-hook' at the -beginning and `after-revert-hook' at the end." ;; I admit it's odd to reverse the sense of the prefix argument, but ;; there is a lot of code out there which assumes that the first ;; argument should be t to avoid consulting the auto-save file, and @@ -2752,6 +2775,9 @@ (interactive) (unless (fboundp 'dired) (error "recover-session requires dired")) + (if (null auto-save-list-file-prefix) + (error + "You set `auto-save-list-file-prefix' to disable making session files")) (dired (concat auto-save-list-file-prefix "*")) (goto-char (point-min)) (or (looking-at "Move to the session you want to recover,") @@ -2839,23 +2865,25 @@ (message "No files can be recovered from this session now"))) (kill-buffer buffer)))) -(defun kill-some-buffers () - "For each buffer, ask whether to kill it." +(defun kill-some-buffers (&optional list) + "For each buffer in LIST, ask whether to kill it. +LIST defaults to all existing live buffers." (interactive) - (let ((list (buffer-list))) - (while list - (let* ((buffer (car list)) - (name (buffer-name buffer))) - (and (not (string-equal name "")) - (/= (aref name 0) ? ) - (yes-or-no-p - (format - (if (buffer-modified-p buffer) - (gettext "Buffer %s HAS BEEN EDITED. Kill? ") - (gettext "Buffer %s is unmodified. Kill? ")) - name)) - (kill-buffer buffer))) - (setq list (cdr list))))) + (if (null list) + (setq list (buffer-list))) + (while list + (let* ((buffer (car list)) + (name (buffer-name buffer))) + (and (not (string-equal name "")) + (/= (aref name 0) ?\ ) + (yes-or-no-p + (format + (if (buffer-modified-p buffer) + (gettext "Buffer %s HAS BEEN EDITED. Kill? ") + (gettext "Buffer %s is unmodified. Kill? ")) + name)) + (kill-buffer buffer))) + (setq list (cdr list)))) (defun auto-save-mode (arg) "Toggle auto-saving of contents of current buffer. @@ -3227,4 +3255,6 @@ ((fboundp 'efs-ftp-path) (efs-ftp-path file-name)) (t nil))) +;; #### FSF has file-name-non-special here. + ;;; files.el ends here
--- a/lisp/find-paths.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/find-paths.el Mon Aug 13 10:32:22 2007 +0200 @@ -85,7 +85,9 @@ "Check if DIRECTORY is a plausible installation root for XEmacs." (or ;; installed - (file-directory-p (paths-construct-path (list directory "lib" "xemacs"))) + (file-directory-p (paths-construct-path (list directory + "lib" + emacs-program-name))) ;; in-place (and (file-directory-p (paths-construct-path (list directory "lib-src"))) @@ -141,14 +143,17 @@ suffix base)))) -(defun paths-find-emacs-directory (roots suffix base &optional envvar default) +(defun paths-find-emacs-directory (roots suffix base + &optional envvar default keep-suffix) "Find a directory in the XEmacs hierarchy. ROOTS must be a list of installation roots. SUFFIX is the subdirectory from there. BASE is the base to look for. ENVVAR is the name of the environment variable that might also specify the directory. -DEFAULT is the preferred value." +DEFAULT is the preferred value. +If KEEP-SUFFIX is non-nil, the suffix must be respected in searching +the directory." (let ((preferred-value (or (and envvar (getenv envvar)) default))) (if (and preferred-value @@ -157,14 +162,15 @@ (catch 'gotcha (while roots (let* ((root (car roots)) + ;; installed (path (paths-construct-emacs-directory root suffix base))) - ;; installed (if (file-directory-p path) (throw 'gotcha path) - (let ((path (paths-construct-emacs-directory root "" base))) - ;; in-place - (if (file-directory-p path) - (throw 'gotcha path))))) + ;; in-place + (if (null keep-suffix) + (let ((path (paths-construct-emacs-directory root "" base))) + (if (file-directory-p path) + (throw 'gotcha path)))))) (setq roots (cdr roots))) nil)))) @@ -172,20 +178,24 @@ "Find a site-specific directory in the XEmacs hierarchy." (paths-find-emacs-directory roots (file-name-as-directory - (paths-construct-path '("lib" "xemacs"))) + (paths-construct-path (list + "lib" + emacs-program-name))) base envvar default)) -(defun paths-find-version-directory (roots base &optional envvar default) - "Find a version-specific directory in the XEmacs hierarchy." +(defun paths-find-version-directory (roots base + &optional envvar default enforce-version) + "Find a version-specific directory in the XEmacs hierarchy. +If ENFORCE-VERSION is non-nil, the directory must contain the XEmacs version." (paths-find-emacs-directory roots (file-name-as-directory (paths-construct-path (list "lib" - (concat "xemacs-" - (construct-emacs-version))))) + (construct-emacs-version-name)))) base - envvar default)) + envvar default + enforce-version)) (defun paths-find-architecture-directory (roots base &optional envvar default) "Find an architecture-specific directory in the XEmacs hierarchy." @@ -200,27 +210,10 @@ (paths-find-version-directory roots system-configuration envvar default))) - -(defvar paths-path-emacs-version nil - "Emacs version as it appears in paths.") -(defun construct-emacs-version () - "Construct the raw version number of XEmacs in the form XX.XX." - ;; emacs-version isn't available early, but we really don't care then - (if (null (boundp 'emacs-version)) - "XX.XX" - (or paths-path-emacs-version ; cache - (progn - (string-match "\\`[^0-9]*\\([0-9]+\\.[0-9]+\\)" emacs-version) - (let ((version (substring emacs-version - (match-beginning 1) (match-end 1)))) - (if (string-match "(beta *\\([0-9]+\\))" emacs-version) - (setq version (concat version - "-b" - (substring emacs-version - (match-beginning 1) (match-end 1))))) - (setq paths-path-emacs-version version) - version))))) +(defun construct-emacs-version-name () + "Construct the raw XEmacs version number." + (concat emacs-program-name "-" emacs-program-version)) (defun paths-directories-which-exist (directories) "Return the directories among DIRECTORIES."
--- a/lisp/font.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/font.el Mon Aug 13 10:32:22 2007 +0200 @@ -100,7 +100,7 @@ (defconst font-window-system-mappings '((x . (x-font-create-name x-font-create-object)) (ns . (ns-font-create-name ns-font-create-object)) - (mswindows . (x-font-create-name x-font-create-object)) ; XXX FIXME + (mswindows . (mswindows-font-create-name mswindows-font-create-object)) (pm . (x-font-create-name x-font-create-object)) ; Change? FIXME (tty . (tty-font-create-plist tty-font-create-object))) "An assoc list mapping device types to the function used to create @@ -765,6 +765,134 @@ (if done font-name)))) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; The window-system dependent code (mswindows-style) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;; mswindows fonts look like: +;;; fontname[:[weight][ style][:pointsize[:effects[:charset]]]] +;;; A minimal mswindows font spec looks like: +;;; Courier New +;;; A maximal mswindows font spec looks like: +;;; Courier New:Bold Italic:10:underline strikeout:ansi +;;; Missing parts of the font spec should be filled in with these values: +;;; Courier New:Normal:10::ansi +;; "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*:[a-zA-Z 0-9]*$" +(defvar font-mswindows-font-regexp + (let + ((- ":") + (fontname "\\([a-zA-Z ]+\\)") + (weight "\\([a-zA-Z]*\\)") + (style "\\( [a-zA-Z]*\\)?") + (pointsize "\\([0-9]+\\)") + (effects "\\([a-zA-Z ]*\\)")q + (charset "\\([a-zA-Z 0-9]*\\)") + ) + (concat "^" + fontname - weight style - pointsize - effects - charset "$"))) + +(defconst mswindows-font-weight-mappings + '((:extra-light . "Extralight") + (:light . "Light") + (:demi-light . "Demilight") + (:demi . "Demi") + (:book . "Book") + (:medium . "Medium") + (:normal . "Medium") + (:demi-bold . "Demibold") + (:bold . "Bold") + (:regular . "Regular") + (:extra-bold . "Extrabold")) + "An assoc list mapping keywords to actual mswindows specific strings +for use in the 'weight' field of an mswindows font string.") + + +(defun mswindows-font-create-object (fontname &optional device) + (let ((case-fold-search t) + (font (mswindows-font-canicolize-name fontname))) + (if (or (not (stringp font)) + (not (string-match font-mswindows-font-regexp font))) + (make-font) + (let ((name (match-string 1 font)) + (weight (match-string 2 font)) + (style (match-string 3 font)) + (pointsize (match-string 4 font)) + (effects (match-string 5 font)) + (charset (match-string 6 font)) + (retval nil) + (size nil) + (case-fold-search t) + ) + (if pointsize (setq size (/ (string-to-int pointsize) 10))) + (if weight (setq weight (intern-soft (concat ":" (downcase weight))))) + (setq retval (make-font :family name + :weight weight + :size size)) + (set-font-bold-p retval (eq :bold weight)) + (cond + ((null style) nil) + ((string-match "^[iI]talic" style) + (set-font-italic-p retval t))) + retval)))) + +(defun mswindows-font-create-name (fontobj &optional device) + (if (and (not (or (font-family fontobj) + (font-weight fontobj) + (font-size fontobj) + (font-registry fontobj) + (font-encoding fontobj))) + (= (font-style fontobj) 0)) + (face-font 'default) + (or device (setq device (selected-device))) + (let* ((default (font-default-object-for-device device)) + (family (or (font-family fontobj) + (font-family default))) + (weight (or (font-weight fontobj) :medium)) + (style (font-style fontobj)) + (size (or (if font-running-xemacs + (font-size fontobj)) + (font-size default))) + (registry (or (font-registry fontobj) + (font-registry default))) + (encoding (or (font-encoding fontobj) + (font-encoding default)))) + (if (stringp family) + (setq family (list family))) + (setq weight (font-higher-weight weight + (and (font-bold-p fontobj) :bold))) + (if (stringp size) + (setq size (truncate (font-spatial-to-canonical size device)))) + (setq weight (or (cdr-safe + (assq weight mswindows-font-weight-mappings)) "")) + (let ((done nil) ; Did we find a good font yet? + (font-name nil) ; font name we are currently checking + (cur-family nil) ; current family we are checking + ) + (while (and family (not done)) + (setq cur-family (car family) + family (cdr family)) + (if (assoc cur-family font-family-mappings) + ;; If the family name is an alias as defined by + ;; font-family-mappings, then append those families + ;; to the front of 'family' and continue in the loop. + (setq family (append + (cdr-safe (assoc cur-family + font-family-mappings)) + family)) + ;; We treat oblique and italic as equivalent. Don't ask. + ;; Courier New:Bold Italic:10:underline strikeout:ansi + (setq font-name (format "%s:%s%s:%s:%s:%s" + cur-family weight + (if (font-italic-p fontobj) + " Italic" "") + (if size + (int-to-string (* 10 size)) "10") + "" + "") + done (try-font-name font-name device)))) + (if done font-name))))) + + ;;; Cache building code ;;;###autoload (defun x-font-build-cache (&optional device)
--- a/lisp/frame.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/frame.el Mon Aug 13 10:32:22 2007 +0200 @@ -517,9 +517,15 @@ "Select the ARG'th different visible frame, and raise it. All frames are arranged in a cyclic order. This command selects the frame ARG steps away in that order. -A negative ARG moves in the opposite order." +A negative ARG moves in the opposite order. + +This command ignores the value of `focus-follows-mouse'." (interactive "p") - (let ((frame (selected-frame))) + (let ((frame (selected-frame)) + (old-focus-follows-mouse focus-follows-mouse) + ;; Allow selecting another frame even when + ;; focus-follows-mouse is true. + (focus-follows-mouse nil)) (while (> arg 0) (setq frame (next-frame frame 'visible-nomini)) (setq arg (1- arg))) @@ -528,6 +534,10 @@ (setq arg (1+ arg))) (raise-frame frame) (select-frame frame) + ;; Allow the focus change to be processed while + ;; focus-follows-mouse is nil. + (and old-focus-follows-mouse + (sit-for 0)) ;this is a bad idea; you should in general never warp the ;pointer unless the user asks for this. Furthermore, ;our version of `set-mouse-position' takes a window,
--- a/lisp/help.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/help.el Mon Aug 13 10:32:22 2007 +0200 @@ -457,13 +457,17 @@ ;; push new buffer (setq help-buffer-list (cons newbuf help-buffer-list))) +(defvar help-buffer-prefix-string "Help" + "Initial string to use in constructing help buffer names. +You should never set this directory, only let-bind it.") + (defun help-buffer-name (name) "Return a name for a Help buffer using string NAME for context." (if (and (integerp help-max-help-buffers) (> help-max-help-buffers 0) (stringp name)) - (format "*Help: %s*" name) - "*Help*")) + (format "*%s: %s*" help-buffer-prefix-string name) + (format "*%s*" help-buffer-prefix-string))) ;; Use this function for displaying help when C-h something is pressed ;; or in similar situations. Do *not* use it when you are displaying
--- a/lisp/ldap.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/ldap.el Mon Aug 13 10:32:22 2007 +0200 @@ -5,7 +5,7 @@ ;; Author: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> ;; Created: Jan 1998 -;; Version: $Revision: 1.3 $ +;; Version: $Revision: 1.4 $ ;; Keywords: help comm ;; This file is part of XEmacs @@ -84,7 +84,7 @@ (setq host-alist (assoc host ldap-host-parameters-alist)) (message "Opening LDAP connection to %s..." host) - (setq ldap (ldap-open host (alist-to-plist host-alist))) + (setq ldap (ldap-open host (alist-to-plist (cdr host-alist)))) (message "Searching with LDAP on %s..." host) (setq res (ldap-search-internal ldap filter (cdr (assq 'base host-alist))
--- a/lisp/lisp-mode.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/lisp-mode.el Mon Aug 13 10:32:22 2007 +0200 @@ -82,6 +82,7 @@ (nconc '("Emacs-Lisp" ["Byte-compile This File" emacs-lisp-byte-compile] + ["Byte-compile/load This" emacs-lisp-byte-compile-and-load] ["Byte-recompile Directory..." byte-recompile-directory] "---") (cdr lisp-interaction-mode-popup-menu-1))))
--- a/lisp/loadup.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/loadup.el Mon Aug 13 10:32:22 2007 +0200 @@ -178,7 +178,7 @@ ;; (condition-case () (delete-file "xemacs") (file-error nil)) (when (fboundp 'really-free) (really-free)) - (dump-emacs "xemacs" "temacs") + (dump-emacs (if (featurep 'infodock) "infodock" "xemacs") "temacs") (kill-emacs)) (when (member "run-temacs" command-line-args)
--- a/lisp/minibuf.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/minibuf.el Mon Aug 13 10:32:22 2007 +0200 @@ -319,7 +319,7 @@ (defvar current-minibuffer-contents) (defvar current-minibuffer-point) -(defcustom minibuffer-history-minimum-string-length 3 +(defcustom minibuffer-history-minimum-string-length nil "*If this variable is non-nil, a string will not be added to the minibuffer history if its length is less than that value." :type '(choice (const :tag "Any" nil)
--- a/lisp/modeline.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/modeline.el Mon Aug 13 10:32:22 2007 +0200 @@ -74,7 +74,7 @@ (start-event-frame (event-frame event)) (start-event-window (event-window event)) (start-nwindows (count-windows t)) - (hscroll-delta (face-width 'modeline)) +;; (hscroll-delta (face-width 'modeline)) ;; (start-hscroll (modeline-hscroll (event-window event))) (start-x-pixel (event-x-pixel event)) (last-timestamp 0) @@ -313,26 +313,12 @@ ;; (append minor-mode-alist ;; '((isearch-mode isearch-mode)))))) -(defvar place) (defun add-minor-mode (toggle name &optional keymap after toggle-fun) "Add a minor mode to `minor-mode-alist' and `minor-mode-map-alist'. TOGGLE is a symbol whose value as a variable specifies whether the minor mode is active. - If TOGGLE has the `:menu-tag' property set to a string, that string - will be used as the label on the `modeline-minor-mode-menu' instead - of TOGGLE's symbol-name. - - TOGGLE may have an `:included' property, which determines whether a - menu button will be shown for this minor mode in the - `modeline-minor-mode-menu'. This should be either a boolean - variable, or an expression evaluating to t or nil. \(See the - documentation of `current-menubar' for more information.) - - It may have an `:active' property also, as documented in - `current-menubar'. - NAME is the name that should appear in the modeline. It should either be a string beginning with a space, or a symbol with a similar string as its value. @@ -349,70 +335,61 @@ modes. If TOGGLE-FUN is nil and TOGGLE names an interactive function, TOGGLE is used as the toggle function. -Example: (put 'view-minor-mode :menu-tag \"View (minor)\") - (put 'view-minor-mode :included '(buffer-file-name)) - (add-minor-mode 'view-minor-mode \" View\" view-mode-map)" - (let (el place - (add-elt #'(lambda (elt sym) - (cond ((null after) ; add to front - (set sym (cons elt (symbol-value sym)))) - ((and (not (eq after t)) - (setq place (memq (assq after - (symbol-value sym)) - (symbol-value sym)))) - (setq elt (cons elt (cdr place))) - (setcdr place elt)) - (t - (set sym (append (symbol-value sym) (list elt)))) - ) - (symbol-value sym))) - toggle-keymap) +Example: (add-minor-mode 'view-minor-mode \" View\" view-mode-map)" + (let* ((add-elt #'(lambda (elt sym) + (let (place) + (cond ((null after) ; add to front + (push elt (symbol-value sym))) + ((and (not (eq after t)) + (setq place (memq (assq after + (symbol-value sym)) + (symbol-value sym)))) + (push elt (cdr place))) + (t + (set sym (append (symbol-value sym) + (list elt)))))) + (symbol-value sym))) + el toggle-keymap) (if toggle-fun - (if (not (commandp toggle-fun)) - (error "not an interactive function: %S" toggle-fun)) - (if (commandp toggle) - (setq toggle-fun toggle))) - (if (and toggle-fun name) - (progn - (setq toggle-keymap (make-sparse-keymap - (intern (concat "modeline-minor-" - (symbol-name toggle) - "-map")))) - (define-key toggle-keymap 'button2 - ;; defeat the DUMB-ASS byte-compiler, which tries to - ;; expand the macro at compile time and fucks up. - (eval '(make-modeline-command-wrapper toggle-fun))) - (put toggle 'modeline-toggle-function toggle-fun))) - (and name - (let ((hacked-name - (if toggle-keymap - (cons (let ((extent (make-extent nil nil))) - (set-extent-keymap extent toggle-keymap) - (set-extent-property - extent 'help-echo - (concat "button2 turns off " - (if (symbolp toggle-fun) - (symbol-name toggle-fun) - (symbol-name toggle)))) - extent) - (cons - modeline-mousable-minor-mode-extent - name)) - name))) - (if (setq el (assq toggle minor-mode-alist)) - (setcdr el (list hacked-name)) - (funcall add-elt - (list toggle hacked-name) - 'minor-mode-alist)))) - (and keymap - (if (setq el (assq toggle minor-mode-map-alist)) - (setcdr el keymap) - (funcall add-elt - (cons toggle keymap) - 'minor-mode-map-alist))) - )) + (check-argument-type 'commandp toggle-fun) + (when (commandp toggle) + (setq toggle-fun toggle))) + (when (and toggle-fun name) + (setq toggle-keymap (make-sparse-keymap + (intern (concat "modeline-minor-" + (symbol-name toggle) + "-map")))) + (define-key toggle-keymap 'button2 + ;; defeat the DUMB-ASS byte-compiler, which tries to + ;; expand the macro at compile time and fucks up. + (eval '(make-modeline-command-wrapper toggle-fun))) + (put toggle 'modeline-toggle-function toggle-fun)) + (when name + (let ((hacked-name + (if toggle-keymap + (cons (let ((extent (make-extent nil nil))) + (set-extent-keymap extent toggle-keymap) + (set-extent-property + extent 'help-echo + (concat "button2 turns off " + (if (symbolp toggle-fun) + (symbol-name toggle-fun) + (symbol-name toggle)))) + extent) + (cons modeline-mousable-minor-mode-extent name)) + name))) + (if (setq el (assq toggle minor-mode-alist)) + (setcdr el (list hacked-name)) + (funcall add-elt + (list toggle hacked-name) + 'minor-mode-alist)))) + (when keymap + (if (setq el (assq toggle minor-mode-map-alist)) + (setcdr el keymap) + (funcall add-elt + (cons toggle keymap) + 'minor-mode-map-alist))))) -;; gettext anyone? (put 'abbrev-mode :menu-tag "Abbreviation Expansion") (add-minor-mode 'abbrev-mode " Abbrev") ;; only when visiting a file... @@ -420,10 +397,18 @@ (put 'auto-fill-function :menu-tag "Auto Fill") (add-minor-mode 'auto-fill-function " Fill" nil nil 'auto-fill-mode) -;; what's the meaning of `####' vs `FIXME' or ...? -;; not really a minor mode... and it doesn't work right anyway. -;;(put 'defining-kbd-macro :menu-tag "Defining kbd macro") -;;(add-minor-mode 'defining-kbd-macro " Def") FIXME +(put 'defining-kbd-macro :menu-tag "Keyboard Macro") +(add-minor-mode 'defining-kbd-macro " Def" nil nil + (lambda () + (interactive) + (if defining-kbd-macro + ;; #### 1 means to disregard the last event. + ;; This is needed because the last recorded + ;; event is usually the mouse event that invoked + ;; the menu item (and this function), and having + ;; it in the macro causes problems. + (end-kbd-macro nil 1) + (start-kbd-macro nil)))) (defun modeline-minor-mode-menu (event) "The menu that pops up when you press `button3' inside the @@ -432,38 +417,39 @@ (save-excursion (set-buffer (event-buffer event)) (popup-menu-and-execute-in-window - (cons "Minor Mode Toggles" - (apply 'nconc - (mapcar - #'(lambda (x) - (let* ((toggle-sym (car x)) - (menu-tag (get toggle-sym :menu-tag nil)) - (toggle-fun - (or (get toggle-sym - 'modeline-toggle-function) - (and (fboundp toggle-sym) - (commandp toggle-sym) - toggle-sym)))) - (if (not toggle-fun) nil - (list (vector - (or (and (stringp menu-tag) - menu-tag) - (setq menu-tag (capitalize - (replace-in-string - (replace-in-string - (replace-in-string (if (symbolp toggle-fun) - (symbol-name toggle-fun) - (symbol-name toggle-sym)) - "-" " ") - "minor" " (minor)") - " mode" "")))) - toggle-fun - :active (get toggle-sym :active t) - :included (get toggle-sym :included t) - :style 'toggle - :selected (and (boundp toggle-sym) - toggle-sym)))))) - minor-mode-alist))) + (cons + "Minor Mode Toggles" + (sort + (delq nil (mapcar + #'(lambda (x) + (let* ((toggle-sym (car x)) + (toggle-fun (or (get toggle-sym + 'modeline-toggle-function) + (and (commandp toggle-sym) + toggle-sym))) + (menu-tag (or (get toggle-sym :menu-tag nil) + (symbol-name (if (symbolp toggle-fun) + toggle-fun + toggle-sym)) + ;; Here a function should + ;; maybe be invoked to + ;; beautify the symbol's + ;; menu appearance. + ))) + (and toggle-fun + (vector menu-tag + toggle-fun + ;; The following two are wrong + ;; because of possible name + ;; clashes. + ;:active (get toggle-sym :active t) + ;:included (get toggle-sym :included t) + :style 'toggle + :selected (and (boundp toggle-sym) + toggle-sym))))) + minor-mode-alist)) + (lambda (e1 e2) + (string< (aref e1 0) (aref e2 0))))) event))) (defvar modeline-minor-mode-map (make-sparse-keymap 'modeline-minor-mode-map) @@ -541,6 +527,24 @@ other than ordinary files may change this (e.g. Info, Dired,...)") (make-variable-buffer-local 'modeline-buffer-identification) +(defvar modeline-line-number-map + (make-sparse-keymap 'modeline-line-number-map) +"Keymap consulted for mouse-clicks on the line number in the modeline.") + +(define-key modeline-line-number-map 'button2 'goto-line) + +(defvar modeline-line-number-extent (make-extent nil nil) + "Extent covering the modeline-line-number string.") +(set-extent-face modeline-line-number-extent 'modeline-mousable) +(set-extent-keymap modeline-line-number-extent modeline-line-number-map) +(set-extent-property modeline-line-number-extent 'help-echo + "button2 to goto a specific line") + +(put 'line-number-mode :menu-tag "Line Number") +(add-minor-mode 'line-number-mode "") +(put 'column-number-mode :menu-tag "Column Number") +(add-minor-mode 'column-number-mode "") + (defconst modeline-process nil "Modeline control for displaying info on process status. Normally nil in most modes, since there is no process to display.") @@ -587,7 +591,7 @@ (cons modeline-narrowed-extent "%n") 'modeline-process (purecopy ")%]----") - (purecopy '(line-number-mode "L%l--")) + (cons modeline-line-number-extent (list 'line-number-mode (purecopy "L%l--"))) (purecopy '(column-number-mode "C%c--")) (purecopy '(-3 . "%p")) (purecopy "-%-")))
--- a/lisp/mouse.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/mouse.el Mon Aug 13 10:32:22 2007 +0200 @@ -978,8 +978,7 @@ )))) (defun default-mouse-track-has-selection-p (buffer) - (and (or (not (eq 'x (console-type))) - (x-selection-owner-p)) + (and (selection-owner-p) (extent-live-p primary-selection-extent) (not (extent-detached-p primary-selection-extent)) (eq buffer (extent-object primary-selection-extent)))) @@ -1043,9 +1042,10 @@ ;; (sit-for 0.15 t) (zmacs-activate-region))) - ((eq 'x (console-type)) + ((or (eq 'x (console-type)) + (eq 'mswindows (console-type))) (if (= start end) - (x-disown-selection type) + (disown-selection type) (if (consp default-mouse-track-extent) ;; own the rectangular region ;; this is a hack @@ -1055,11 +1055,11 @@ (while r (insert (extent-string (car r)) "\n") (setq r (cdr r))) - (x-own-selection (buffer-substring (point-min) (point-max))) + (own-selection (buffer-substring (point-min) (point-max))) (kill-buffer (current-buffer)))) - (x-own-selection (cons (set-marker (make-marker) start) - (set-marker (make-marker) end)) - type))))) + (own-selection (cons (set-marker (make-marker) start) + (set-marker (make-marker) end)) + type))))) (if (and (eq 'x (console-type)) (not (= start end))) ;; I guess cutbuffers should do something with rectangles too.
--- a/lisp/msw-faces.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/msw-faces.el Mon Aug 13 10:32:22 2007 +0200 @@ -61,20 +61,23 @@ (defun mswindows-font-canicolize-name (font) "Given a mswindows font specification, this returns its name in canonical form." - (if (font-instance-p font) - (let ((name (font-instance-name font))) - (cond ((string-match - "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*:[a-zA-Z 0-9]*$" - name) name) - ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*$" - name) (concat name ":ansi")) - ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+$" name) - (concat name "::ansi")) - ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*$" name) - (concat name ":10::ansi")) - ((string-match "^[a-zA-Z ]+$" name) - (concat name ":Normal:10::ansi")) - (t "Courier New:Normal:10::ansi"))))) + (if (or (font-instance-p font) + (stringp font)) + (let ((name (if (font-instance-p font) + (font-instance-name font) + font))) + (cond ((string-match + "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*:[a-zA-Z 0-9]*$" + name) name) + ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*$" + name) (concat name ":ansi")) + ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+$" name) + (concat name "::ansi")) + ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*$" name) + (concat name ":10::ansi")) + ((string-match "^[a-zA-Z ]+$" name) + (concat name ":Normal:10::ansi")) + (t "Courier New:Normal:10::ansi"))))) (defun mswindows-make-font-bold (font &optional device) "Given a mswindows font specification, this attempts to make a bold font.
--- a/lisp/msw-init.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/msw-init.el Mon Aug 13 10:32:22 2007 +0200 @@ -48,6 +48,18 @@ ;; any toolbar-related color resources. (if (and (featurep 'xpm) (featurep 'toolbar)) (init-x-toolbar)) + (add-hook 'zmacs-deactivate-region-hook + (lambda () + (if (console-on-window-system-p) + (disown-selection)))) + (add-hook 'zmacs-activate-region-hook + (lambda () + (if (console-on-window-system-p) + (activate-region-as-selection)))) + (add-hook 'zmacs-update-region-hook + (lambda () + (if (console-on-window-system-p) + (activate-region-as-selection)))) ;; Old-style mswindows bindings. The new-style mswindows bindings ;; (namely Ctrl-X, Ctrl-C and Ctrl-V) are already spoken for by XEmacs. (define-key global-map '(control insert) 'mswindows-copy-clipboard)
--- a/lisp/msw-select.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/msw-select.el Mon Aug 13 10:32:22 2007 +0200 @@ -82,3 +82,55 @@ ;; (setq zmacs-region-stays t) )) (error "there is no selection to cut or copy")))) + +(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 + (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)) + +(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))) +
--- a/lisp/package-get-base.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/package-get-base.el Mon Aug 13 10:32:22 2007 +0200 @@ -1,19 +1,19 @@ (setq package-get-base '((eudc (standards-version 1.0 - version "1.04" - author-version "1.04" - date "1998-04-21" - build-date "1998-04-22" + version "1.05" + author-version "1.05" + date "1998-04-29" + build-date "1998-05-01" maintainer "Oscar Figueiredo <Oscar.Figueiredo@epfl.ch>" distribution stable priority low category "comm" dump nil description "Emacs Unified Directory Client." - filename "eudc-1.04-pkg.tar.gz" - md5sum "f1eea3313ad2b7a78c3165042ec9a285" - size 39938 + filename "eudc-1.05-pkg.tar.gz" + md5sum "1313a4cf7bb644e807bd846ab0d6e414" + size 40378 provides (eudc eudc-ldap eudc-ph) requires (fsf-compat xemacs-base) type regular @@ -58,19 +58,19 @@ )) (gnus (standards-version 1.0 - version "1.13" - author-version "5.6.4" + version "1.15" + author-version "5.6.9" date "1998-04-06" - build-date "1998-04-17" + build-date "1998-05-02" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "comm" dump nil description "The Gnus Newsreader and Mailreader." - filename "gnus-1.13-pkg.tar.gz" - md5sum "648162290d6117033466df446e90bc2e" - size 1650837 + filename "gnus-1.15-pkg.tar.gz" + md5sum "fd8b38887e680fd04748e6eaf490628e" + size 1657321 provides (gnus message) requires (gnus w3 mh-e mailcrypt rmail mail-lib xemacs-base) type regular @@ -191,57 +191,57 @@ )) (tm (standards-version 1.0 - version "1.05" - author-version "21.0b36" - date "1998-04-07" - build-date "1998-04-17" + version "1.06" + author-version "21.0b38" + date "1998-04-23" + build-date "1998-05-01" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "comm" dump nil description "Emacs MIME support." - filename "tm-1.05-pkg.tar.gz" - md5sum "8d8f186356ebd4258a7090603c2772b6" - size 252141 + filename "tm-1.06-pkg.tar.gz" + md5sum "3f40b731e676c866c5a6133c0bff031b" + size 252232 provides (tm tm-edit tm-view mime-setup) requires (gnus mh-e rmail vm mailcrypt mail-lib apel xemacs-base) type regular )) (vm (standards-version 1.0 - version "1.06" - author-version "6.41" + version "1.07" + author-version "6.47" date "1998-02-17" - build-date "1998-04-04" + build-date "1998-04-27" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "comm" dump t description "An Emacs mailer." - filename "vm-1.06-pkg.tar.gz" - md5sum "e38e76e531a8e818a29e3231b26b0e8d" - size 506233 + filename "vm-1.07-pkg.tar.gz" + md5sum "2e8394bdb84469c492e784cba02e3b04" + size 508955 provides (vm) requires (mail-lib xemacs-base) type regular )) (w3 (standards-version 1.0 - version "1.04" - author-version "4.0pre16" - date "1998-03-07" - build-date "1998-04-04" + version "1.06" + author-version "4.0pre18" + date "1998-05-01" + build-date "1998-05-02" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution experimental priority high category "comm" dump nil description "A Web browser." - filename "w3-1.04-pkg.tar.gz" - md5sum "d8e742ce7e806e14dcfab27b0e6ae767" - size 584488 + filename "w3-1.06-pkg.tar.gz" + md5sum "fea5098f9e8dd5b3b82e3ebe7d447b9c" + size 581731 provides (w3 url) requires (w3 mail-lib xemacs-base) type regular @@ -438,19 +438,19 @@ )) (mail-lib (standards-version 1.0 - version "1.10" - author-version "21.0b37" - date "1998-04-22" - build-date "1998-04-22" + version "1.12" + author-version "21.0b38" + date "1998-05-01" + build-date "1998-05-02" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "libs" dump nil description "Fundamental lisp files for providing email support." - filename "mail-lib-1.10-pkg.tar.gz" - md5sum "c13e2168624d382573e6b2470f0a4363" - size 119600 + filename "mail-lib-1.12-pkg.tar.gz" + md5sum "287eaaeafd45a778e45200866e6952f4" + size 119922 provides (browse-url highlight-headers mail-abbrevs mail-extr mail-utils reporter rfc822 rmail-mini rmailout sendmail smtpmail) requires (xemacs-base) type single @@ -476,19 +476,19 @@ )) (xemacs-base (standards-version 1.0 - version "1.18" - author-version "21.0b36" - date "1998-04-06" - build-date "1998-04-17" + version "1.19" + author-version "21.0b38" + date "1998-04-29" + build-date "1998-05-01" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution mule priority high category "libs" dump nil description "Fundamental XEmacs support, you almost certainly need this." - filename "xemacs-base-1.18-pkg.tar.gz" - md5sum "2c327a8caee676f5bb28e7c42db37f41" - size 453497 + filename "xemacs-base-1.19-pkg.tar.gz" + md5sum "3cd0aa1366931e36651f7aee46931e22" + size 453658 provides (add-log advice annotations assoc case-table chistory comint-xemacs comint compile debug ebuff-menu echistory edmacro ehelp electric enriched env facemenu ffap helper imenu iso-syntax macros novice outline overlay passwd pp regi ring shell skeleton sort thing time-stamp timezone xbm-button xpm-button) requires () type regular @@ -609,19 +609,19 @@ )) (skk (standards-version 1.0 - version "1.05" + version "1.06" author-version "10.38" - date "1998-04-14" - build-date "1998-04-17" - maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" + date "1998-04-28" + build-date "1998-05-01" + maintainer "SL Baur <steve@altair.xemacs.org>" distribution mule priority medium category "mule" dump t description "Japanese Language Input Method." - filename "skk-1.05-pkg.tar.gz" - md5sum "9582d421dd26c2c888764c0c3aface60" - size 1466874 + filename "skk-1.06-pkg.tar.gz" + md5sum "ccc92c60519be92efef3c40696897ef7" + size 1467006 provides (skk skk-tut) requires (viper mule-base xemacs-base) type regular @@ -666,19 +666,19 @@ )) (edit-utils (standards-version 1.0 - version "1.18" - author-version "21.0b37" - date "1998-04-22" - build-date "1998-04-22" + version "1.21" + author-version "21.0b38" + date "1998-03-15" + build-date "1998-05-02" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority high category "oa" dump nil description "Miscellaneous editor extensions, you probably need this." - filename "edit-utils-1.18-pkg.tar.gz" - md5sum "0273e49738108d16f69f6dcff734d666" - size 570191 + filename "edit-utils-1.21-pkg.tar.gz" + md5sum "5483cfb7d0ed4588332c2185e77d31eb" + size 570895 provides (abbrevlist atomic-extents avoid backup-dir balloon-help big-menubar blink-cursor blink-paren bookmark compare-w completion dabbrev desktop detached-minibuf edit-toolbar fast-lock file-part floating-toolbar flow-ctrl foldout func-menu hippie-exp icomplete id-select info-look iswitchb lazy-lock lazy-shot live-icon man mic-paren paren popper mode-motion+ outl-mouse page-ext blink-paren paren permanent-buffers recent-files redo reportmail rsz-minibuf saveconfsavehist saveplace scroll-in-place tempo toolbar-utils tree-menu uniquify where-was-i-db) requires (xemacs-base) type single @@ -761,38 +761,38 @@ )) (pc (standards-version 1.0 - version "1.09" - author-version "21.0b37" + version "1.10" + author-version "21.0b38" date "1998-04-22" - build-date "1998-04-22" + build-date "1998-04-26" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "oa" dump nil description "PC style interface emulation." - filename "pc-1.09-pkg.tar.gz" - md5sum "04ddfb122b0dca50ef9f29ee05e24c75" - size 15761 + filename "pc-1.10-pkg.tar.gz" + md5sum "e750bebcb0d2b7632796b1c6c4fc4c16" + size 16004 provides (delbs fusion pc-select pending-del s-region) requires (xemacs-base) type regular )) (psgml (standards-version 1.0 - version "1.06" + version "1.07" author-version "1.01" date "1998-03-20" - build-date "1998-04-04" + build-date "1998-05-02" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "oa" dump nil description "Validated HTML/SGML editing." - filename "psgml-1.06-pkg.tar.gz" - md5sum "97c4a41f501629201c35de44c0568c83" - size 418630 + filename "psgml-1.07-pkg.tar.gz" + md5sum "957f026375a4e4bd4c2d8952eb1bbeba" + size 418672 provides (psgml sgml) requires (edit-utils) type regular @@ -894,19 +894,19 @@ )) (time (standards-version 1.0 - version "1.03" + version "1.04" author-version "1.17" - date "1998-01-25" - build-date "1998-04-04" + date "1998-04-24" + build-date "1998-04-26" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "oa" dump nil description "Display time & date on the modeline." - filename "time-1.03-pkg.tar.gz" - md5sum "319c60e36fc0e51000323e22e8955f32" - size 20087 + filename "time-1.04-pkg.tar.gz" + md5sum "e25caf29cf9684887460d9cd124639d4" + size 19905 provides (time) requires (xemacs-base) type regular @@ -1065,38 +1065,38 @@ )) (debug (standards-version 1.0 - version "1.01" - author-version "21.0b35" - date "1998-01-24" - build-date "1998-04-04" + version "1.02" + author-version "21.0b38" + date "1998-04-24" + build-date "1998-04-26" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution contrib priority low category "prog" dump nil description "GUD, gdb, dbx debugging support." - filename "debug-1.01-pkg.tar.gz" - md5sum "b36126702924e2822387957b5db68827" - size 87176 + filename "debug-1.02-pkg.tar.gz" + md5sum "953ac508318ffcdcf3a81643499dda33" + size 87609 provides () requires (xemacs-base) type regular )) (ediff (standards-version 1.0 - version "1.06" + version "1.07" author-version "2.70.1" - date "1998-02-25" - build-date "1998-04-04" + date "1998-04-27" + build-date "1998-04-27" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "prog" dump nil description "Interface over GNU patch." - filename "ediff-1.06-pkg.tar.gz" - md5sum "1bad29a3f9a6e28c34afc1f155ffdb05" - size 244476 + filename "ediff-1.07-pkg.tar.gz" + md5sum "78e0193180343fba87ae08a67036b3b4" + size 244462 provides (ediff) requires (pcl-cvs dired xemacs-base) type regular @@ -1122,38 +1122,38 @@ )) (pcl-cvs (standards-version 1.0 - version "1.05" - author-version "21.0b37" - date "1998-04-19" - build-date "1998-04-22" + version "1.07" + author-version "21.0b38" + date "1998-04-27" + build-date "1998-05-01" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "prog" dump nil description "CVS frontend." - filename "pcl-cvs-1.05-pkg.tar.gz" - md5sum "c11ede6b5e9748b928ffa7f709da9252" - size 135472 + filename "pcl-cvs-1.07-pkg.tar.gz" + md5sum "252e448e4d2a6d68d52b7e0389949889" + size 170580 provides (pcl-cvs dll elib-node generic-sc) requires (xemacs-base) type regular )) (prog-modes (standards-version 1.0 - version "1.04" - author-version "21.0b35" - date "1998-02-08" - build-date "1998-04-04" + version "1.05" + author-version "21.0b38" + date "1998-04-29" + build-date "1998-05-01" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "prog" dump nil description "Support for various programming languages." - filename "prog-modes-1.04-pkg.tar.gz" - md5sum "ab211a10361e9485c502b7c466131640" - size 535455 + filename "prog-modes-1.05-pkg.tar.gz" + md5sum "94622c06c1c7416bc4bf69e64ec7acb9" + size 539786 provides (autoconf-mode cperl-mode eiffel3 f90 fortran ksh-mode m4-mode makefile perl-mode postscript python-mode rexx-mode simula-mode tcl teco verilog-mod) requires (mail-lib xemacs-base) type regular @@ -1217,19 +1217,19 @@ )) (vc (standards-version 1.0 - version "1.06" - author-version "21.0b35" - date "1998-03-20" - build-date "1998-04-04" + version "1.07" + author-version "21.0b38" + date "1998-04-27" + build-date "1998-04-27" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "prog" dump t description "Version Control for Free systems." - filename "vc-1.06-pkg.tar.gz" - md5sum "875822474ef43fcb0ad83521279acb7c" - size 74620 + filename "vc-1.07-pkg.tar.gz" + md5sum "04b5fb71ac7975479824c0a636b4b510" + size 74573 provides (vc) requires (dired xemacs-base) type regular @@ -1350,19 +1350,19 @@ )) (textools (standards-version 1.0 - version "1.04" - author-version "21.0b35" - date "1998-02-17" - build-date "1998-04-04" + version "1.05" + author-version "21.0b38" + date "1998-04-29" + build-date "1998-05-01" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stabl priority medium category "wp" dump nil description "Miscellaneous TeX support." - filename "textools-1.04-pkg.tar.gz" - md5sum "2e90b7dfd81c0b5748ac09b3db86e2c8" - size 78964 + filename "textools-1.05-pkg.tar.gz" + md5sum "4b0a417849ca270ed498c1e9c9aaa07b" + size 79125 provides (bib-mode bibtex refer-to-bibtex) requires (xemacs-base) type single
--- a/lisp/packages.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/packages.el Mon Aug 13 10:32:22 2007 +0200 @@ -88,6 +88,7 @@ (list "site-packages" 'late #'(lambda () t)) (list "infodock-packages" 'late #'(lambda () (featurep 'infodock))) (list "mule-packages" 'late #'(lambda () (featurep 'mule))) + (list "xemacs-packages" 'late #'(lambda () t)) (list "packages" 'late #'(lambda () t))) "Locations of the various package directories. This is a list each of whose elements describes one directory. @@ -320,7 +321,9 @@ (defun packages-find-package-directories (roots base) "Find a set of package directories." - (let ((version-directory (paths-find-version-directory roots base)) + ;; make sure paths-find-version-directory and paths-find-site-directory + ;; don't both pick up version-independent directories ... + (let ((version-directory (paths-find-version-directory roots base nil nil t)) (site-directory (paths-find-site-directory roots base))) (paths-uniq-append (and version-directory (list version-directory))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/select.el Mon Aug 13 10:32:22 2007 +0200 @@ -0,0 +1,231 @@ +;;; select.el --- Lisp interface to windows selections. + +;; Copyright (C) 1998 Andy Piper. +;; Copyright (C) 1990, 1997 Free Software Foundation, Inc. +;; Copyright (C) 1995 Sun Microsystems. + +;; Maintainer: XEmacs Development Team +;; Keywords: extensions, dumped + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Synched up with: Not in FSF + +;;; Commentary: + +;; This file is dumped with XEmacs + +;;; Code: + +(defun copy-primary-selection () + "Copy the selection to the Clipboard and the kill ring." + (interactive) + (case (device-type (selected-device)) + (x (x-copy-primary-selection)) + (mswindows (mswindows-copy-clipboard)) + (otherwise nil))) + +(defun kill-primary-selection () + "Copy the selection to the Clipboard and the kill ring, then delete it." + (interactive "*") + (case (device-type (selected-device)) + (x (x-kill-primary-selection)) + (mswindows (mswindows-cut-clipboard)) + (otherwise nil))) + +(defun delete-primary-selection () + "Delete the selection without copying it to the Clipboard or the kill ring." + (interactive "*") + (case (device-type (selected-device)) + (x (x-delete-primary-selection)) + (otherwise nil))) + +(defun yank-clipboard-selection () + "Insert the current Clipboard selection at point." + (interactive "*") + (case (device-type (selected-device)) + (x (x-yank-clipboard-selection)) + (mswindows (mswindows-paste-clipboard)) + (otherwise nil))) + +(defun selection-owner-p (&optional selection) + "Return t if current emacs 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 t) + (otherwise nil))) + +(defun own-selection (data &optional type) + "Make an 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))))) + (case (device-type (selected-device)) + (x (x-own-selection data type)) + (mswindows (mswindows-own-selection data type)) + (otherwise nil))) + +(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))) + +;; from x-init.el +;; selections and active regions + +;; If and only if zmacs-regions is true: + +;; When a mark is pushed and the region goes into the "active" state, we +;; assert it as the Primary selection. This causes it to be hilighted. +;; When the region goes into the "inactive" state, we disown the Primary +;; selection, causing the region to be dehilighted. + +;; Note that it is possible for the region to be in the "active" state +;; and not be hilighted, if it is in the active state and then some other +;; application asserts the selection. This is probably not a big deal. + +(defun activate-region-as-selection () + (if (marker-buffer (mark-marker t)) + (own-selection (cons (point-marker t) (mark-marker t))))) + +; moved from x-select.el +(defvar primary-selection-extent nil + "The extent of the primary selection; don't use this.") + +(defvar secondary-selection-extent nil + "The extent of the secondary selection; don't use this.") + +(defun select-make-extent-for-selection (selection previous-extent) + ;; Given a selection, this makes an extent in the buffer which holds that + ;; selection, for highlighting purposes. If the selection isn't associated + ;; with a buffer, this does nothing. + (let ((buffer nil) + (valid (and (extentp previous-extent) + (extent-object previous-extent) + (buffer-live-p (extent-object previous-extent)))) + start end) + (cond ((stringp selection) + ;; if we're selecting a string, lose the previous extent used + ;; to highlight the selection. + (setq valid nil)) + ((consp selection) + (setq start (min (car selection) (cdr selection)) + end (max (car selection) (cdr selection)) + valid (and valid + (eq (marker-buffer (car selection)) + (extent-object previous-extent))) + buffer (marker-buffer (car selection)))) + ((extentp selection) + (setq start (extent-start-position selection) + end (extent-end-position selection) + valid (and valid + (eq (extent-object selection) + (extent-object previous-extent))) + buffer (extent-object selection))) + (t + (signal 'error (list "invalid selection" selection)))) + + (if valid + nil + (condition-case () + (if (listp previous-extent) + (mapcar 'delete-extent previous-extent) + (delete-extent previous-extent)) + (error nil))) + + (if (not buffer) + ;; string case + nil + ;; normal case + (if valid + (set-extent-endpoints previous-extent start end) + (setq previous-extent (make-extent start end buffer)) + + ;; Make the extent be closed on the right, which means that if + ;; characters are inserted exactly at the end of the extent, the + ;; extent will grow to cover them. This is important for shell + ;; buffers - suppose one makes a selection, and one end is at + ;; point-max. If the shell produces output, that marker will remain + ;; at point-max (its position will increase). So it's important that + ;; the extent exhibit the same behavior, lest the region covered by + ;; the extent (the visual indication), and the region between point + ;; and mark (the actual selection value) become different! + (set-extent-property previous-extent 'end-open nil) + + (cond + (mouse-track-rectangle-p + (setq previous-extent (list previous-extent)) + (default-mouse-track-next-move-rect start end previous-extent) + )) + previous-extent)))) + +;; moved from x-select.el +(defun valid-simple-selection-p (data) + (or (stringp data) + ;FSFmacs huh?? (symbolp data) + (integerp data) + (and (consp data) + (integerp (car data)) + (or (integerp (cdr data)) + (and (consp (cdr data)) + (integerp (car (cdr data)))))) + (extentp data) + (and (consp data) + (markerp (car data)) + (markerp (cdr data)) + (marker-buffer (car data)) + (marker-buffer (cdr data)) + (eq (marker-buffer (car data)) + (marker-buffer (cdr data))) + (buffer-live-p (marker-buffer (car data))) + (buffer-live-p (marker-buffer (cdr data)))))) + +;;; select.el ends here
--- a/lisp/simple.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/simple.el Mon Aug 13 10:32:22 2007 +0200 @@ -3846,8 +3846,8 @@ (defcustom display-warning-minimum-level 'info "Minimum level of warnings that should be displayed. -The warnings in levels below this are completely ignored, as if they never -happened. +The warnings in levels below this will be generated, but not +displayed. The recognized warning levels, in decreasing order of priority, are 'emergency, 'alert, 'critical, 'error, 'warning, 'notice, 'info, and
--- a/lisp/site-start.el Mon Aug 13 10:31:30 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -;; site-start.el --- Site wide run time initialization -;; This file is executed before a user's init file is executed.
--- a/lisp/wid-edit.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/wid-edit.el Mon Aug 13 10:32:22 2007 +0200 @@ -572,6 +572,11 @@ :value-set (widget-apply widget :value-to-internal value))) +(defun widget-default-get (widget) + "Extract the defaylt value of WIDGET." + (or (widget-get widget :value) + (widget-apply widget :default-get))) + (defun widget-match-inline (widget vals) ;; In WIDGET, match the start of VALS. (cond ((widget-get widget :inline) @@ -1581,6 +1586,7 @@ :delete 'widget-default-delete :value-set 'widget-default-value-set :value-inline 'widget-default-value-inline + :default-get 'widget-default-default-get :menu-tag-get 'widget-default-menu-tag-get :validate (lambda (widget) nil) :active 'widget-default-active @@ -1789,6 +1795,10 @@ (widget-value widget) (list (widget-value widget)))) +(defun widget-default-default-get (widget) + ;; Get `:value'. + (widget-get widget :value)) + (defun widget-default-menu-tag-get (widget) ;; Use tag or value for menus. (or (widget-get widget :menu-tag) @@ -2200,6 +2210,7 @@ :value-delete 'widget-children-value-delete :value-get 'widget-choice-value-get :value-inline 'widget-choice-value-inline + :default-get 'widget-choice-default-get :mouse-down-action 'widget-choice-mouse-down-action :action 'widget-choice-action :error "Make a choice" @@ -2241,6 +2252,10 @@ ;; Get value of the child widget. (widget-apply (car (widget-get widget :children)) :value-inline)) +(defun widget-choice-default-get (widget) + ;; Get default for the first choice. + (widget-default-get (car (widget-get widget :args)))) + (defcustom widget-choice-toggle nil "If non-nil, a binary choice will just toggle between the values. Otherwise, the user will explicitly have to choose between the values @@ -2308,9 +2323,9 @@ (widget-put widget :explicit-choice choice) choice)))) (when current - (widget-value-set widget - (widget-apply current :value-to-external - (widget-get current :value))) + (let ((value (widget-default-get current))) + (widget-value-set widget + (widget-apply current :value-to-external value))) (widget-setup) (widget-apply widget :notify widget event))) (run-hook-with-args 'widget-edit-functions widget)) @@ -2920,7 +2935,8 @@ (if conv (setq child (widget-create-child-value widget type value)) - (setq child (widget-create-child widget type)))) + (setq child (widget-create-child-value + widget type (widget-default-get type))))) (t (signal 'error (list "Unknown escape" escape)))))) (widget-put widget @@ -2946,6 +2962,7 @@ :value-create 'widget-group-value-create :value-delete 'widget-children-value-delete :value-get 'widget-editable-list-value-get + :default-get 'widget-group-default-get :validate 'widget-children-validate :match 'widget-group-match :match-inline 'widget-group-match-inline) @@ -2972,6 +2989,10 @@ children)) (widget-put widget :children (nreverse children)))) +(defun widget-group-default-get (widget) + ;; Get the default of the components. + (mapcar 'widget-default-get (widget-get widget :args))) + (defun widget-group-match (widget values) ;; Match if the components match. (and (listp values)
--- a/lisp/window-xemacs.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/window-xemacs.el Mon Aug 13 10:32:22 2007 +0200 @@ -39,6 +39,18 @@ "Windows within a frame." :group 'environment) +(defun recenter (n &optional window) + "Center point in WINDOW and redisplay frame. With N, put point on line N. +The desired position of point is always relative to the window. +Just C-u as prefix means put point in the center of the window. +No N (i.e., it is nil) erases the entire frame and then +redraws with point in the center of the window. +If WINDOW is nil, the selected window is used." + (interactive "_P") + (center-to-window-line (if (consp n) nil n) window) + (when (null n) + (redraw-frame (window-frame window) t))) + (defun backward-other-window (arg &optional all-frames device) "Select the ARG'th different window on this frame, going backwards. This is just like calling `other-window' with the arg negated."
--- a/lisp/x-menubar.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/x-menubar.el Mon Aug 13 10:32:22 2007 +0200 @@ -105,18 +105,14 @@ (or (eq buffer-undo-list pending-undo-list) (eq (cdr buffer-undo-list) pending-undo-list)))) :suffix (if (eq last-command 'redo) "More" "")] - ["Cut" x-kill-primary-selection - :active (and (eq 'x (device-type (selected-device))) - (x-selection-owner-p))] - ["Copy" x-copy-primary-selection - :active (and (eq 'x (device-type (selected-device))) - (x-selection-owner-p))] - ["Paste" x-yank-clipboard-selection - :active (and (eq 'x (device-type (selected-device))) - (x-selection-exists-p 'CLIPBOARD))] - ["Clear" x-delete-primary-selection - :active (and (eq 'x (device-type (selected-device))) - (x-selection-owner-p))] + ["Cut" kill-primary-selection + :active (selection-owner-p)] + ["Copy" copy-primary-selection + :active (selection-owner-p)] + ["Paste" yank-clipboard-selection + :active (selection-exists-p 'CLIPBOARD)] + ["Clear" delete-primary-selection + :active (selection-owner-p)] "----" ["Search..." isearch-forward] ["Search Backward..." isearch-backward]
--- a/lisp/x-scrollbar.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/x-scrollbar.el Mon Aug 13 10:32:22 2007 +0200 @@ -35,7 +35,7 @@ (defun x-init-scrollbar-from-resources (locale) (x-init-specifier-from-resources - scrollbar-width 'natnum locale + (specifier-fallback scrollbar-width) 'natnum locale '("scrollBarWidth" . "ScrollBarWidth") ;; The name strings are wrong, but the scrollbar name is ;; non-deterministic so it is a poor way to set a resource @@ -52,12 +52,12 @@ ;; time. (if (featurep 'athena-scrollbars) (x-init-specifier-from-resources - scrollbar-width 'natnum locale + (specifier-fallback scrollbar-width) 'natnum locale '("scrollbar.width" . "ScrollBar.Width"))) ;; lather, rinse, repeat. (x-init-specifier-from-resources - scrollbar-height 'natnum locale + (specifier-fallback scrollbar-height) 'natnum locale '("scrollBarHeight" . "ScrollBarHeight") ;; The name strings are wrong, but the scrollbar name is ;; non-deterministic so it is a poor way to set a resource @@ -74,7 +74,7 @@ ;; time. (if (featurep 'athena-scrollbars) (x-init-specifier-from-resources - scrollbar-height 'natnum locale + (specifier-fallback scrollbar-height) 'natnum locale '("scrollbar.height" . "ScrollBar.Height")))) ;;; x-scrollbar.el ends here
--- a/lisp/x-select.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/x-select.el Mon Aug 13 10:32:22 2007 +0200 @@ -73,78 +73,6 @@ "Return text pasted to the clipboard." (x-get-selection 'CLIPBOARD)) - -(defvar primary-selection-extent nil - "The extent of the primary selection; don't use this.") - -(defvar secondary-selection-extent nil - "The extent of the secondary selection; don't use this.") - - -(defun x-select-make-extent-for-selection (selection previous-extent) - ;; Given a selection, this makes an extent in the buffer which holds that - ;; selection, for highlighting purposes. If the selection isn't associated - ;; with a buffer, this does nothing. - (let ((buffer nil) - (valid (and (extentp previous-extent) - (extent-object previous-extent) - (buffer-live-p (extent-object previous-extent)))) - start end) - (cond ((stringp selection) - ;; if we're selecting a string, lose the previous extent used - ;; to highlight the selection. - (setq valid nil)) - ((consp selection) - (setq start (min (car selection) (cdr selection)) - end (max (car selection) (cdr selection)) - valid (and valid - (eq (marker-buffer (car selection)) - (extent-object previous-extent))) - buffer (marker-buffer (car selection)))) - ((extentp selection) - (setq start (extent-start-position selection) - end (extent-end-position selection) - valid (and valid - (eq (extent-object selection) - (extent-object previous-extent))) - buffer (extent-object selection))) - (t - (signal 'error (list "invalid selection" selection)))) - - (if valid - nil - (condition-case () - (if (listp previous-extent) - (mapcar 'delete-extent previous-extent) - (delete-extent previous-extent)) - (error nil))) - - (if (not buffer) - ;; string case - nil - ;; normal case - (if valid - (set-extent-endpoints previous-extent start end) - (setq previous-extent (make-extent start end buffer)) - - ;; Make the extent be closed on the right, which means that if - ;; characters are inserted exactly at the end of the extent, the - ;; extent will grow to cover them. This is important for shell - ;; buffers - suppose one makes a selection, and one end is at - ;; point-max. If the shell produces output, that marker will remain - ;; at point-max (its position will increase). So it's important that - ;; the extent exhibit the same behavior, lest the region covered by - ;; the extent (the visual indication), and the region between point - ;; and mark (the actual selection value) become different! - (set-extent-property previous-extent 'end-open nil) - - (cond - (mouse-track-rectangle-p - (setq previous-extent (list previous-extent)) - (default-mouse-track-next-move-rect start end previous-extent) - )) - previous-extent)))) - ;; FSFmacs calls this `x-set-selection', and reverses the ;; arguments (duh ...). This order is more logical. (defun x-own-selection (data &optional type) @@ -185,34 +113,17 @@ (x-disown-selection-internal type)) (cond ((eq type 'PRIMARY) (setq primary-selection-extent - (x-select-make-extent-for-selection + (select-make-extent-for-selection data primary-selection-extent))) ((eq type 'SECONDARY) (setq secondary-selection-extent - (x-select-make-extent-for-selection + (select-make-extent-for-selection data secondary-selection-extent)))) (setq zmacs-region-stays t) data) (defun x-valid-simple-selection-p (data) - (or (stringp data) - ;FSFmacs huh?? (symbolp data) - (integerp data) - (and (consp data) - (integerp (car data)) - (or (integerp (cdr data)) - (and (consp (cdr data)) - (integerp (car (cdr data)))))) - (extentp data) - (and (consp data) - (markerp (car data)) - (markerp (cdr data)) - (marker-buffer (car data)) - (marker-buffer (cdr data)) - (eq (marker-buffer (car data)) - (marker-buffer (cdr data))) - (buffer-live-p (marker-buffer (car data))) - (buffer-live-p (marker-buffer (cdr data)))))) + (valid-simple-selection-p data)) (defun x-own-secondary-selection (selection &optional type) "Make a secondary X Selection of the given argument. The argument may be a
--- a/lisp/x-toolbar.el Mon Aug 13 10:31:30 2007 +0200 +++ b/lisp/x-toolbar.el Mon Aug 13 10:32:22 2007 +0200 @@ -93,9 +93,9 @@ (interactive) (call-interactively toolbar-print-function)) -(defcustom toolbar-cut-function 'x-kill-primary-selection +(defcustom toolbar-cut-function 'kill-primary-selection "*Function to call when the cut icon is selected." - :type '(radio (function-item x-kill-primary-selection) + :type '(radio (function-item kill-primary-selection) (function :tag "Other")) :group 'toolbar) @@ -103,9 +103,9 @@ (interactive) (call-interactively toolbar-cut-function)) -(defcustom toolbar-copy-function 'x-copy-primary-selection +(defcustom toolbar-copy-function 'copy-primary-selection "*Function to call when the copy icon is selected." - :type '(radio (function-item x-copy-primary-selection) + :type '(radio (function-item copy-primary-selection) (function :tag "Other")) :group 'toolbar) @@ -113,9 +113,9 @@ (interactive) (call-interactively toolbar-copy-function)) -(defcustom toolbar-paste-function 'x-yank-clipboard-selection +(defcustom toolbar-paste-function 'yank-clipboard-selection "*Function to call when the paste icon is selected." - :type '(radio (function-item x-yank-clipboard-selection) + :type '(radio (function-item yank-clipboard-selection) (function :tag "Other")) :group 'toolbar)
--- a/man/ChangeLog Mon Aug 13 10:31:30 2007 +0200 +++ b/man/ChangeLog Mon Aug 13 10:32:22 2007 +0200 @@ -1,3 +1,71 @@ +1998-05-02 Hrvoje Niksic <hniksic@srce.hr> + + * lispref/windows.texi (Vertical Scrolling): Fixup docstring for + scroll-conservatively. + + * lispref/loading.texi (Named Features): Document advanced args to + `feature'. + + * lispref/files.texi (File Name Expansion): Document that + expand-file-name does not treat // and ~/ in the middle of file + names specially. + + * lispref/positions.texi (Excursions): Document + `with-current-buffer' and `with-temp-file'. + + * lispref/strings.texi (Formatting Strings): Document `%*' + construct. + + * lispref/os.texi (Time Conversion): Document that TIME may be + omitted from format-time-string. + + * lispref/strings.texi (String Conversion): Document BASE argument + to `string-to-number'. + + * lispref/searching.texi (Syntax of Regexps): Fix up Perl + constructs documentation. + (Regexp Search): Document `split-string'. + + * xemacs/display.texi (Scrolling): Document scroll-conservatively. + + * xemacs/killing.texi (Active Regions): Document that errors no + longer highlight the region. + + * lispref/display.texi (The Echo Area): Document message log + stuff, including `display-message', `lmessage', `clear-message', + (Warnings): Document warning stuff. + + * lispref/commands.texi (Working With Events): Update `make-event' + for misc-user events. + (Using Interactive): Document `function-interactive'. + + * lispref/os.texi (System Environment): Document USE-FLOATS + argument to `load-average'. + (User Identification): Document the new semantics of + `user-full-name'. + + * lispref/strings.texi (Creating Strings): Document `string' + function. + +1998-05-02 Hrvoje Niksic <hniksic@srce.hr> + + * lispref/numbers.texi (Comparison of Numbers): Document multi-arg + comparison functions. + +1998-04-30 Greg Klanderman <greg@alphatech.com> + + * lispref/frames.texi (Input Focus): Document behavior of + select-frame wrt focus-follows-mouse. + +1998-04-30 Martin Buchholz <martin@xemacs.org> + + * Makefile: Support generic makes by avoiding `%' syntax. + It breaks my heart to uglify the Makefile like this, but this is + going to be a perpetual FAQ otherwise. + General cleanup. + Comment out w3 and vm info rules. + Use paranoid cd ./$@ syntax to avoid losing with luser's CDPATH. + 1998-03-27 Stephen Turnbull <turnbull@sk.tsukuba.ac.jp> * xemacs/frame.texi: Document cursor appearance at end of line.
--- a/man/Makefile Mon Aug 13 10:31:30 2007 +0200 +++ b/man/Makefile Mon Aug 13 10:32:22 2007 +0200 @@ -36,73 +36,121 @@ RECURSIVE_MAKE = $(MAKE) $(MFLAGS) MAKEINFO='$(MAKEINFO)' TEXI2DVI='$(TEXI2DVI)' -# Subdirectories to make recursively. -SUBDIR = xemacs lispref new-users-guide internals +# Ughhh! The things we do to have portable makefiles... -../info/%.info : %.texi - -$(MAKEINFO) -o $@ $< +INFODIR = ../info -srcs = cl custom external-widget \ - info \ - standards term \ - termcap texinfo widget xemacs-faq - -info = $(srcs:%=../info/%.info) -dvi = $(srcs:%=%.dvi) - -special = # ../info/w3.info ../info/vm.info ../info/texinfo.info +info_files = \ + $(INFODIR)/cl.info \ + $(INFODIR)/custom.info \ + $(INFODIR)/external-widget.info \ + $(INFODIR)/info.info \ + $(INFODIR)/standards.info \ + $(INFODIR)/term.info \ + $(INFODIR)/termcap.info \ + $(INFODIR)/texinfo.info \ + $(INFODIR)/widget.info \ + $(INFODIR)/xemacs-faq.info -all : info -info : $(info) $(special) - -for d in $(SUBDIR) ; do (cd $${d} && $(RECURSIVE_MAKE) $@) ; done +dvi_files = \ + cl.dvi \ + custom.dvi \ + external-widget.dvi \ + info.dvi \ + standards.dvi \ + term.dvi \ + termcap.dvi \ + texinfo.dvi \ + widget.dvi \ + xemacs-faq.dvi + +../info/cl.info : cl.texi + -$(MAKEINFO) cl.texi -o ../info/cl.info -xemacs: FRC.xemacs - -cd $@ && $(RECURSIVE_MAKE) -lispref: FRC.lispref - -cd $@ && $(RECURSIVE_MAKE) -new-users-guide: FRC.new-users-guide - -cd $@ && $(RECURSIVE_MAKE) -internals: FRC.internals - -cd $@ && $(RECURSIVE_MAKE) -tm: FRC.tm - -cd $@ && $(RECURSIVE_MAKE) -gnats: FRC.gnats - -cd $@ && $(RECURSIVE_MAKE) -FRC.xemacs FRC.lispref FRC.new-users-guide FRC.internals FRC.tm FRC.gnats: +../info/custom.info : custom.texi + -$(MAKEINFO) custom.texi -o ../info/custom.info + +../info/external-widget.info : external-widget.texi + -$(MAKEINFO) external-widget.texi -o ../info/external-widget.info + +../info/info.info : info.texi + -$(MAKEINFO) info.texi -o ../info/info.info -../info/w3.info : w3.texi - -$(MAKEINFO) w3.texi -o ../info/w3.info +../info/standards.info : standards.texi + -$(MAKEINFO) standards.texi -o ../info/standards.info + +../info/term.info : term.texi + -$(MAKEINFO) term.texi -o ../info/term.info + +../info/termcap.info : termcap.texi + -$(MAKEINFO) termcap.texi -o ../info/termcap.info ../info/texinfo.info : texinfo.texi -$(MAKEINFO) texinfo.texi -o ../info/texinfo.info +../info/widget.info : widget.texi + -$(MAKEINFO) widget.texi -o ../info/widget.info -../info/vm.info : vm.texi - -$(EMACS) $(EMACSFLAGS) -insert vm.texi -l texinfmt \ - -f texinfo-format-buffer -f save-buffer - -mv vm.info* ../info +../info/xemacs-faq.info : xemacs-faq.texi + -$(MAKEINFO) xemacs-faq.texi -o ../info/xemacs-faq.info + + +# ../info/w3.info : w3.texi +# -$(MAKEINFO) w3.texi -o ../info/w3.info + +# ../info/vm.info : vm.texi +# -$(EMACS) $(EMACSFLAGS) -insert vm.texi -l texinfmt \ +# -f texinfo-format-buffer -f save-buffer +# -mv vm.info* ../info + +# special = # ../info/w3.info ../info/vm.info ../info/texinfo.info + +all: info + +# Subdirectories to make recursively. +SUBDIR = xemacs lispref new-users-guide internals +.PHONY: $(SUBDIR) -texinfo.dvi: texinfo.texi - $(TEXI2DVI) $< +info : $(info_files) + -for d in $(SUBDIR) ; do (cd ./$$d && $(RECURSIVE_MAKE) $@) ; done + +.PHONY: info dvi + +xemacs: FRC.xemacs + -cd ./$@ && $(RECURSIVE_MAKE) +lispref: FRC.lispref + -cd ./$@ && $(RECURSIVE_MAKE) +new-users-guide: FRC.new-users-guide + -cd ./$@ && $(RECURSIVE_MAKE) +internals: FRC.internals + -cd ./$@ && $(RECURSIVE_MAKE) +# tm: FRC.tm +# -cd ./$@ && $(RECURSIVE_MAKE) +# gnats: FRC.gnats +# -cd ./$@ && $(RECURSIVE_MAKE) +# FRC.xemacs FRC.lispref FRC.new-users-guide FRC.internals FRC.tm FRC.gnats: +FRC.info FRC.dvi FRC.xemacs FRC.lispref FRC.new-users-guide FRC.internals: + + .texi.dvi: $(TEXI2DVI) $< -.PHONY: dvi -dvi : $(dvi) - -for d in $(SUBDIR) ; do (cd $${d} && $(RECURSIVE_MAKE) $@) ; done +dvi : $(dvi_files) + -for d in $(SUBDIR) ; do (cd ./$${d} && $(RECURSIVE_MAKE) $@) ; done + .PHONY: mostlyclean clean distclean realclean extraclean mostlyclean: - -for d in $(SUBDIR) ; do (cd $${d} && $(RECURSIVE_MAKE) $@) ; done - rm -f *.toc *.aux *.log \ + -for d in $(SUBDIR) ; do (cd ./$${d} && $(RECURSIVE_MAKE) $@) ; done + rm -f *.toc *.aux *.log *.op \ *.cp *.cps *.fn *.fns *.ky *.kys *.pg *.pgs *.vr *.vrs *.tp *.tps clean: mostlyclean - -for d in $(SUBDIR) ; do (cd $${d} && $(RECURSIVE_MAKE) $@) ; done + -for d in $(SUBDIR) ; do (cd ./$${d} && $(RECURSIVE_MAKE) $@) ; done rm -f *.o core *.dvi distclean: clean - -for d in $(SUBDIR) ; do (cd $${d} && $(RECURSIVE_MAKE) $@) ; done + -for d in $(SUBDIR) ; do (cd ./$${d} && $(RECURSIVE_MAKE) $@) ; done realclean: distclean - -for d in $(SUBDIR) ; do (cd $${d} && $(RECURSIVE_MAKE) $@) ; done + -for d in $(SUBDIR) ; do (cd ./$${d} && $(RECURSIVE_MAKE) $@) ; done extraclean: distclean - -for d in $(SUBDIR) ; do (cd $${d} && $(RECURSIVE_MAKE) $@) ; done + -for d in $(SUBDIR) ; do (cd ./$${d} && $(RECURSIVE_MAKE) $@) ; done -rm -f *~ \#*
--- a/man/lispref/commands.texi Mon Aug 13 10:31:30 2007 +0200 +++ b/man/lispref/commands.texi Mon Aug 13 10:32:22 2007 +0200 @@ -239,6 +239,13 @@ @samp{*}, @samp{@@}, or @samp{_}). @end itemize +@defun function-interactive function +This function retrieves the interactive specification of @var{function}, +which may be any funcallable object. The specification will be returned +as the list of the symbol @code{interactive} and the specs. If +@var{function} is not interactive, @code{nil} will be returned. +@end defun + @node Interactive Codes @subsection Code Characters for @code{interactive} @cindex interactive code description @@ -1313,8 +1320,8 @@ This function creates a new event structure. If no arguments are specified, the created event will be empty. To specify the event type, use the @var{type} argument. The allowed types are @code{empty}, -@code{key-press}, @code{button-press}, @code{button-release}, or -@code{motion}. +@code{key-press}, @code{button-press}, @code{button-release}, +@code{motion}, or @code{misc-user}. @var{plist} is a property list, the properties being compatible to those returned by @code{event-properties}. For events other than @@ -1385,7 +1392,7 @@ @end group @group -;; @r{Creating a key-press event, try No. 2.} +;; @r{Creating a key-press event, try 2} (make-event 'key-press '(key home)) @result{} #<keypress-event home> @end group @@ -1397,8 +1404,8 @@ @end group @group -;; @r{Create a M-button1 event at coordinates defined by variables -;; @var{x} and @var{y}.} +;; @r{Create a M-button1 event at coordinates defined by variables} +;; @r{@var{x} and @var{y}.} (make-event 'button-press `(button 1 modifiers (meta) x ,x y ,y)) @result{} #<buttondown-event meta-button1> @end group @@ -1412,11 +1419,11 @@ @group ;; @r{Create a mouse-motion event.} (make-event 'motion '(x 20 y 30)) - @result{} #<motion-event 20, 67> - -;; @r{(the Y coordinate is printed incompatibly; however:)} + @result{} #<motion-event 20, 30> + (event-properties (make-event 'motion '(x 20 y 30))) - @result{} (channel #<x-frame "emacs" 0x8e2> x 20 y 30 modifiers nil timestamp 0) + @result{} (channel #<x-frame "emacs" 0x8e2> x 20 y 30 + modifiers nil timestamp 0) @end group @end lisp @@ -1434,7 +1441,7 @@ replacement for @code{copy-event}, because it does not allow creating all of the event types. -To create a changed copy of an event, you can use the canonicalization +To create a modified copy of an event, you can use the canonicalization feature of @var{plist}. The following example creates a copy of @var{event}, but with @code{modifiers} reset to @code{nil}.
--- a/man/lispref/display.texi Mon Aug 13 10:31:30 2007 +0200 +++ b/man/lispref/display.texi Mon Aug 13 10:32:22 2007 +0200 @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the XEmacs Lisp Reference Manual. -@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. +@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1998 Free Software Foundation, Inc. @c See the file lispref.texi for copying conditions. @setfilename ../../info/display.info @node Display, Hash Tables, Annotations, Top @@ -13,6 +13,7 @@ * Refresh Screen:: Clearing the screen and redrawing everything on it. * Truncation:: Folding or wrapping long text lines. * The Echo Area:: Where messages are displayed. +* Warnings:: Display of Warnings. * Invisible Text:: Hiding part of the buffer text. * Selective Display:: Hiding part of the buffer text (the old way). * Overlay Arrow:: Display of an arrow to indicate position. @@ -71,16 +72,9 @@ @code{next-event} or @code{sit-for} is called; however, a display update will not occur if there is input pending. @xref{Command Loop}. -@deffn Command force-redisplay -@cindex force redisplay -This function causes an immediate update of the display in all -circumstances, whether or not input is pending. (This function does -not exist in FSF Emacs.) -@end deffn - @defun force-cursor-redisplay This function causes an immediate update of the cursor on the selected -frame. (This function does not exist in FSF Emacs.) +frame. (This function does not exist in FSF Emacs.) @end defun @node Truncation @@ -208,39 +202,134 @@ @end example @end defun -Some of the messages displayed in the echo area are also recorded in the -@samp{ *Message-Log*} buffer. +In addition to only displaying a message, XEmacs allows you to +@dfn{label} your messages, giving you fine-grained control of their +display. Message label is a symbol denoting the message type. Some +standard labels are: + +@itemize @bullet +@item @code{message}---default label used by the @code{message} +function; + +@item @code{error}---default label used for reporting errors; + +@item @code{progress}---progress indicators like +@samp{Converting... 45%} (not logged by default); + +@item @code{prompt}---prompt-like messages like @samp{Isearch: foo} (not +logged by default); + +@item @code{command}---helper command messages like @samp{Mark set} (not +logged by default); -@ignore -@defopt message-log-max -This variable specifies how many lines to keep in the @samp{*Messages*} -buffer. The value @code{t} means there is no limit on how many lines to -keep. The value @code{nil} disables message logging entirely. Here's -how to display a message and prevent it from being logged: -@defopt log-message-max-size -This variable specifies how many lines to keep in the @samp{* Message-Log*} -buffer. The value @code{t} means there is no limit on how many lines to -keep. The value @code{nil} disables message logging entirely. Here's -how to display a message and prevent it from being logged: +@item @code{no-log}---messages that should never be logged +@end itemize + +Several messages may be stacked in the echo area at once. Lisp programs +may access these messages, or remove them as appropriate, via the +message stack. + +@defun display-message label message &optional frame stdout-p +This function displays @var{message} (a string) labeled as @var{label}, +as described above. + +The @var{frame} argument specifies the frame to whose minibuffer the +message should be printed. This is currently unimplemented. The +@var{stdout-p} argument is used internally. + +@example +(display-message 'command "Mark set") +@end example +@end defun + +@defun lmessage label string &rest arguments +This function displays a message @var{string} with label @var{label}. +It is similar to @code{message} in that it accepts a @code{printf}-like +strings and any number of arguments. @example -(let (message-log-max) - (message @dots{})) +@group +;; @r{Display a command message.} +(lmessage 'command "Comment column set to %d" comment-column) +@end group + +@group +;; @r{Display a progress message.} +(lmessage 'progress "Fontifying %s... (%d)" buffer percentage) +@end group + +@group +;; @r{Display a message that should not be logged.} +(lmessage 'no-log "Done") +@end group @end example -@end defopt -@end ignore +@end defun + +@defun clear-message &optional label frame stdout-p no-restore +This function remove any message with the given @var{label} +from the message-stack, erasing it from the echo area if it's currently +displayed there. + +If a message remains at the head of the message-stack and +@var{no-restore} is @code{nil}, it will be displayed. The string which +remains in the echo area will be returned, or @code{nil} if the +message-stack is now empty. If @var{label} is nil, the entire +message-stack is cleared. + +@example +;; @r{Show a message, wait for 2 seconds, and restore old minibuffer} +;; @r{contents.} +(message "A message") + @print{} A message +@result{} "A Message" +(lmessage 'my-label "Newsflash! Newsflash!") + @print{} Newsflash! Newsflash! +@result{} "Newsflash! Newsflash!" +(sit-for 2) +(clear-message 'my-label) + @print{} A message +@result{} "A message" +@end example + +Unless you need the return value or you need to specify a label, +you should just use @code{(message nil)}. +@end defun + +@defun current-message &optional frame +This function returns the current message in the echo area, or +@code{nil}. The @var{frame} argument is currently unused. +@end defun + +Some of the messages displayed in the echo area are also recorded in the +@samp{ *Message-Log*} buffer. Exactly which messages will be recorded +can be tuned using the following variables. + @defopt log-message-max-size -This variable specifies the maximum size of @samp{* Message-Log*} +This variable specifies the maximum size of the @samp{ *Message-log*} buffer. @end defopt +@defvar log-message-ignore-labels +This variable specifies the labels whose messages will not be logged. +It should be a list of symbols. +@end defvar + +@defvar log-message-ignore-regexps +This variable specifies the regular expressions matching messages that +will not be logged. It should be a list of regular expressions. + +Normally, packages that generate messages that might need to be ignored +should label them with @code{progress}, @code{prompt}, or @code{no-log}, +so they can be filtered by @code{log-message-ignore-labels}. +@end defvar + @defvar echo-keystrokes This variable determines how much time should elapse before command -characters echo. Its value must be an integer, which specifies the -number of seconds to wait before echoing. If the user types a prefix -key (such as @kbd{C-x}) and then delays this many seconds before -continuing, the prefix key is echoed in the echo area. Any subsequent -characters in the same command will be echoed as well. +characters echo. Its value must be a number, which specifies the number +of seconds to wait before echoing. If the user types a prefix key (such +as @kbd{C-x}) and then delays this many seconds before continuing, the +prefix key is echoed in the echo area. Any subsequent characters in the +same command will be echoed as well. If the value is zero, then command input is not echoed. @end defvar @@ -255,6 +344,117 @@ for brief periods of time. @end defvar +@node Warnings +@section Warnings + +XEmacs contains a facility for unified display of various warnings. +Unlike errors, warnings are displayed in the situations when XEmacs +encounters a problem that is recoverable, but which should be fixed for +safe future operation. + +For example, warnings are printed by the startup code when it encounters +problems with X keysyms, when there is an error in @file{.emacs}, and in +other problematic situations. Unlike messages, warnings are displayed +in a separate buffer, and include an explanatory message that may span +across several lines. Here is an example of how a warning is displayed: + +@example +(1) (initialization/error) An error has occured while loading ~/.emacs: + +Symbol's value as variable is void: bogus-variable + +To ensure normal operation, you should investigate the cause of the error +in your initialization file and remove it. Use the `-debug-init' option +to XEmacs to view a complete error backtrace. +@end example + +Each warning has a @dfn{class} and a @dfn{priority level}. The class is +a symbol describing what sort of warning this is, such as +@code{initialization}, @code{resource} or @code{key-mapping}. + +The warning priority level specifies how important the warning is. The +recognized warning levels, in increased order of priority, are: +@code{debug}, @code{info}, @code{notice}, @code{warning}, @code{error}, +@code{critical}, @code{alert} and @code{emergency}. + +@defun display-warning class message &optional level +This function displays a warning message @var{message} (a string). +@var{class} should be a warning class symbol, as described above, or a +list of such symbols. @var{level} describes the warning priority level. +If unspecified, it default to @code{warning}. + +@example +@group +(display-warning 'resource + "Bad resource specification encountered: +something like + + Emacs*foo: bar + +You should replace the * with a . in order to get proper behavior when +you use the specifier and/or `set-face-*' functions.") +@end group + +@group +---------- Warning buffer ---------- +(1) (resource/warning) Bad resource specification encountered: +something like + + Emacs*foo: bar + +You should replace the * with a . in order to get proper behavior when +you use the specifier and/or `set-face-*' functions. +---------- Warning buffer ---------- +@end group +@end example +@end defun + +@defun lwarn class level message &rest args +This function displays a formatted labeled warning message. As above, +@var{class} should be the warning class symbol, or a list of such +symbols, and @var{level} should specify the warning priority level +(@code{warning} by default). + +Unlike in @code{display-warning}, @var{message} may be a formatted +message, which will be, together with the rest of the arguments, passed +to @code{format}. + +@example +(lwarn 'message-log 'warning + "Error caught in `remove-message-hook': %s" + (error-message-string e)) +@end example +@end defun + +@defvar log-warning-minimum-level +This variable specifies the minimum level of warnings that should be +generated. Warnings with level lower than defined by this variable are +completely ignored, as if they never happened. +@end defvar + +@defvar display-warning-minimum-level +This variable specifies the minimum level of warnings that should be +displayed. Unlike @code{log-warning-minimum-level}, setting this +function does not suppress warnings entirely---they are still generated +in the @samp{*Warnings*} buffer, only they are not displayed by default. +@end defvar + +@defvar log-warning-suppressed-classes +This variable specifies a list of classes that should not be logged or +displayed. If any of the class symbols associated with a warning is the +same as any of the symbols listed here, the warning will be completely +ignored, as it they never happened. +@end defvar + +@defvar display-warning-suppressed-classes +This variable specifies a list of classes that should not be logged or +displayed. If any of the class symbols associated with a warning is the +same as any of the symbols listed here, the warning will not be +displayed. The warning will still logged in the *Warnings* buffer +(unless also contained in `log-warning-suppressed-classes'), but the +buffer will not be automatically popped up. +@end defvar + @node Invisible Text @section Invisible Text
--- a/man/lispref/files.texi Mon Aug 13 10:31:30 2007 +0200 +++ b/man/lispref/files.texi Mon Aug 13 10:32:22 2007 +0200 @@ -1538,26 +1538,8 @@ @end group @end example -@samp{~/} is expanded into the user's home directory. A @samp{/} or -@samp{~} following a @samp{/} is taken to be the start of an absolute -file name that overrides what precedes it, so everything before that -@samp{/} or @samp{~} is deleted. For example: - -@example -@group -(expand-file-name - "/a1/gnu//usr/local/lib/emacs/etc/MACHINES") - @result{} "/usr/local/lib/emacs/etc/MACHINES" -@end group -@group -(expand-file-name "/a1/gnu/~/foo") - @result{} "/xcssun/users/rms/foo" -@end group -@end example - -@noindent -In both cases, @file{/a1/gnu/} is discarded because an absolute file -name follows it. +@samp{~/} at the beginning is expanded into the user's home directory. +A @samp{/} or @samp{~} following a @samp{/}. Note that @code{expand-file-name} does @emph{not} expand environment variables; only @code{substitute-in-file-name} does that.
--- a/man/lispref/frames.texi Mon Aug 13 10:31:30 2007 +0200 +++ b/man/lispref/frames.texi Mon Aug 13 10:32:22 2007 +0200 @@ -677,6 +677,13 @@ @code{deselect-frame-hook} to be run, until the next time that XEmacs is waiting for an event. +Also note that when the variable @code{focus-follows-mouse} is non-nil, +the frame selection is temporary and is reverted when the current +command terminates, much like the buffer selected by @code{set-buffer}. +In order to effect a permanent focus change in this case, bind +@code{focus-follows-mouse} to nil, select the frame you want, and do a +@code{(sit-for 0)} within the scope of the binding. + @ignore (FSF Emacs) XEmacs cooperates with the X server and the window managers by arranging to select frames according to what the server and window manager ask
--- a/man/lispref/loading.texi Mon Aug 13 10:31:30 2007 +0200 +++ b/man/lispref/loading.texi Mon Aug 13 10:32:22 2007 +0200 @@ -602,10 +602,55 @@ provided}. @end defun -@defun featurep feature -This function returns @code{t} if @var{feature} has been provided in the -current XEmacs session (i.e., @var{feature} is a member of -@code{features}.) +@defun featurep fexp +This function returns @code{t} if feature @var{fexp} is present in this +Emacs. Use this to conditionalize execution of lisp code based on the +presence or absence of emacs or environment extensions. + +@var{fexp} can be a symbol, a number, or a list. + +If @var{fexp} is a symbol, it is looked up in the `features' variable, +and @code{t} is returned if it is found, @code{nil} otherwise. + +If @var{fexp} is a number, the function returns @code{t} if this Emacs +has an equal or greater number than @code{fexp}, @code{nil} otherwise. +Note that minor Emacs version is expected to be 2 decimal places wide, +so @code{(featurep 20.4)} will return @code{nil} on XEmacs 20.4---you +must write @code{(featurep 20.04)}, unless you wish to match for XEmacs +20.40. + +If @var{fexp} is a list whose car is the symbol @code{and}, the function +returns @code{t} if all the features in its cdr are present, @code{nil} +otherwise. + +If @var{fexp} is a list whose car is the symbol @code{or}, the function +returns @code{t} if any the features in its cdr are present, @code{nil} +otherwise. + +If @var{fexp} is a list whose car is the symbol @code{not}, the function +returns @code{t} if the feature is not present, @code{nil} otherwise. + +Examples: + +@example +(featurep 'xemacs) + @result{} ; @r{t on XEmacs.} + +(featurep '(and xemacs gnus)) + @result{} ; @r{t on XEmacs with Gnus loaded.} + +(featurep '(or tty-frames (and emacs 19.30))) + @result{} ; @r{t if this Emacs supports TTY frames.} + +(featurep '(or (and xemacs 19.15) (and emacs 19.34))) + @result{} ; @r{t on XEmacs 19.15 and later, or on} + ; @r{FSF Emacs 19.34 and later.} +@end example + +@strong{NOTE}: The advanced arguments of this function (anything other than a +symbol) are not yet supported by FSF Emacs. If you feel they are useful +for supporting multiple Emacs variants, lobby Richard Stallman at +@samp{<bug-gnu-emacs@@prep.ai.mit.edu>}. @end defun @defvar features
--- a/man/lispref/numbers.texi Mon Aug 13 10:31:30 2007 +0200 +++ b/man/lispref/numbers.texi Mon Aug 13 10:32:22 2007 +0200 @@ -240,7 +240,7 @@ Here's a function to do this: @example -(defvar fuzz-factor 1.0e-6) +(defconst fuzz-factor 1.0e-6) (defun approx-equal (x y) (or (and (= x 0) (= y 0)) (< (/ (abs (- x y)) @@ -257,40 +257,79 @@ limited range of integer values. @end quotation -@defun = number-or-marker1 number-or-marker2 -This function tests whether its arguments are numerically equal, and -returns @code{t} if so, @code{nil} otherwise. +In addition to numbers, all of the following functions also accept +characters and markers as arguments, and treat them as their number +equivalents. + +@defun = number &rest more-numbers +This function returns @code{t} if all of its arguments are numerically +equal, @code{nil} otherwise. + +@example +(= 5) + @result{} t +(= 5 6) + @result{} nil +(= 5 5.0) + @result{} t +(= 5 5 6) + @result{} nil +@end example @end defun -@defun /= number-or-marker1 number-or-marker2 -This function tests whether its arguments are numerically not equal. It -returns @code{t} if so, and @code{nil} otherwise. -@end defun +@defun /= number &rest more-numbers +This function returns @code{t} if no two arguments are numerically +equal, @code{nil} otherwise. -@defun < number-or-marker1 number-or-marker2 -This function tests whether its first argument is strictly less than -its second argument. It returns @code{t} if so, @code{nil} otherwise. +@example +(/= 5 6) + @result{} t +(/= 5 5 6) + @result{} nil +(/= 5 6 1) + @result{} t +@end example @end defun -@defun <= number-or-marker1 number-or-marker2 -This function tests whether its first argument is less than or equal -to its second argument. It returns @code{t} if so, @code{nil} -otherwise. +@defun < number &rest more-numbers +This function returns @code{t} if the sequence of its arguments is +monotonically increasing, @code{nil} otherwise. + +@example +(< 5 6) + @result{} t +(< 5 6 6) + @result{} nil +(< 5 6 7) + @result{} t +@end example @end defun -@defun > number-or-marker1 number-or-marker2 -This function tests whether its first argument is strictly greater -than its second argument. It returns @code{t} if so, @code{nil} -otherwise. +@defun <= number &rest more-numbers +This function returns @code{t} if the sequence of its arguments is +monotonically nondecreasing, @code{nil} otherwise. + +@example +(<= 5 6) + @result{} t +(<= 5 6 6) + @result{} t +(<= 5 6 5) + @result{} nil +@end example @end defun -@defun >= number-or-marker1 number-or-marker2 -This function tests whether its first argument is greater than or -equal to its second argument. It returns @code{t} if so, @code{nil} -otherwise. +@defun > number &rest more-numbers +This function returns @code{t} if the sequence of its arguments is +monotonically decreasing, @code{nil} otherwise. @end defun -@defun max number-or-marker &rest numbers-or-markers +@defun >= number &rest more-numbers +This function returns @code{t} if the sequence of its arguments is +monotonically nonincreasing, @code{nil} otherwise. +@end defun + +@defun max number &rest more-numbers This function returns the largest of its arguments. @example @@ -303,7 +342,7 @@ @end example @end defun -@defun min number-or-marker &rest numbers-or-markers +@defun min number &rest more-numbers This function returns the smallest of its arguments. @example
--- a/man/lispref/os.texi Mon Aug 13 10:31:30 2007 +0200 +++ b/man/lispref/os.texi Mon Aug 13 10:32:22 2007 +0200 @@ -723,24 +723,36 @@ containing the Emacs executable. @end defvar -@defun load-average -This function returns the current 1-minute, 5-minute and 15-minute -load averages in a list. The values are integers that are 100 times -the system load averages. (The load averages indicate the number of +@defun load-average &optional use-floats +This function returns a list of the current 1-minute, 5-minute and +15-minute load averages. The values are integers that are 100 times the +system load averages. (The load averages indicate the number of processes trying to run.) +When @var{use-floats} is non-@code{nil}, floats will be returned instead +of integers. These floats are not multiplied by 100. + @example @group (load-average) - @result{} (169 48 36) + @result{} (169 158 164) +(load-average t) + @result{} (1.69921875 1.58984375 1.640625) @end group @group lewis@@rocky[5] % uptime - 11:55am up 1 day, 19:37, 3 users, - load average: 1.69, 0.48, 0.36 + 8:06pm up 16 day(s), 21:57, 40 users, + load average: 1.68, 1.59, 1.64 @end group @end example + +If the 5-minute or 15-minute load averages are not available, return a +shortened list, containing only those averages which are available. + +On some systems, this function may require special privileges to run, or +it may be unimplemented for the particular system type. In that case, +the function will signal an error. @end defun @defun emacs-pid @@ -792,13 +804,31 @@ environment variables @code{LOGNAME} and @code{USER}. @end defun -@defun user-full-name -This function returns the full name of the user. +@defvar user-full-name +This variable holds the name of the user running this Emacs. It is +initialized at startup time from the value of @code{NAME} environment +variable. You can change the value of this variable to alter the result +of the @code{user-full-name} function. +@end defvar + +@defun user-full-name &optional user +This function returns the full name of @var{user}. If @var{user} is +@code{nil}, it defaults to the user running this Emacs. In that case, +the value of @code{user-full-name} variable, if non-@code{nil}, will be +used. + +If @var{user} is specified explicitly, @code{user-full-name} variable is +ignored. @example @group (user-full-name) - @result{} "Bil Lewis" + @result{} "Hrvoje Niksic" +(setq user-full-name "Hrvoje \"Niksa\" Niksic") +(user-full-name) + @result{} "Hrvoje \"Niksa\" Niksic" +(user-full-name "hniksic") + @result{} "Hrvoje Niksic" @end group @end example @end defun @@ -910,9 +940,10 @@ values from the functions @code{current-time} (@pxref{Time of Day}) and @code{file-attributes} (@pxref{File Attributes}). -@defun format-time-string format-string time +@defun format-time-string format-string &optional time This function converts @var{time} to a string according to -@var{format-string}. The argument @var{format-string} may contain +@var{format-string}. If @var{time} is omitted, it defaults to the +current time. The argument @var{format-string} may contain @samp{%}-sequences which say to substitute parts of the time. Here is a table of what the @samp{%}-sequences mean:
--- a/man/lispref/positions.texi Mon Aug 13 10:31:30 2007 +0200 +++ b/man/lispref/positions.texi Mon Aug 13 10:32:22 2007 +0200 @@ -788,7 +788,19 @@ @defspec save-current-buffer forms@dots{} This special form is similar to @code{save-excursion} but it only -saves and restores the current buffer. +saves and restores the current buffer. Beginning with XEmacs 20.3, +@code{save-current-buffer} is a primitive. +@end defspec + +@defspec with-current-buffer buffer forms@dots{} +This special form evaluates @var{forms} with @var{buffer} as the current +buffer. It returns the value of the last form. +@end defspec + +@defspec with-temp-file file forms@dots{} +This special form creates a new buffer, evaluates @var{forms} there, and +writes the buffer to @var{file}. It returns the value of the last form +evaluated. @end defspec @defspec save-selected-window forms@dots{}
--- a/man/lispref/searching.texi Mon Aug 13 10:31:30 2007 +0200 +++ b/man/lispref/searching.texi Mon Aug 13 10:32:22 2007 +0200 @@ -173,7 +173,7 @@ The XEmacs regular expression syntax most closely resembles that of @cite{ed}, or @cite{grep}, the GNU versions of which all utilize the GNU @cite{regex} library. XEmacs' version of @cite{regex} has recently been -extended with some perl--like capabilities, described in the next +extended with some Perl--like capabilities, described in the next section. @menu @@ -269,26 +269,17 @@ @item *? @cindex @samp{*?} in regexp works just like @samp{*}, except that rather than matching the longest -match, it matches the shortest match. This is known as a "non-greedy" -quantifier. It is a syntax that comes to us from perl. It is very -useful for situations where you want to match the text inside a pair of -delimiters. +match, it matches the shortest match. @samp{*?} is known as a +@dfn{non-greedy} quantifier, a regexp construct borrowed from Perl. @c Did perl get this from somewhere? What's the real history of *? ? -@lisp -@group -(setq s "/ blah / / blah2 /") - @result{} "/ blah / / blah2 /" -(string-match "/.*/" s) - @result{} 0 -(match-string 0 s) - @result{} "/ blah / / blah2 /" -(string-match "/.*?/" s) - @result{} 0 -(match-string 0 s) - @result{} "/ blah /" -@end group -@end lisp +This construct very useful for when you want to match the text inside a +pair of delimiters. For instance, @samp{/\*.*?\*/} will match C +comments in a string. This could not be achieved without the use of +greedy quantifier. + +This construct has not been available prior to XEmacs 20.4. It is not +available in FSF Emacs. @item +? @cindex @samp{+?} in regexp @@ -297,26 +288,10 @@ @item \@{n,m\@} @c Note the spacing after the close brace is deliberate. @cindex @samp{\@{n,m\@} }in regexp -this is an interval quantifier, which is analogous to @samp{*} or -@samp{+}, but specifies that the expression must match at least @samp{n} -times, but no more than @samp{m} times. This syntax comes to us from -@cite{ed}, @cite{grep}, and @cite{perl}. The @cite{etags} utility also -supports it. - -@lisp -@group -(setq s "12 123 1234 12345") - @result{} "12 123 1234 12345" -(string-match "[0-9]\\@{2,4\\@}" s) - @result{} 0 -(match-string 0 s) - @result{} "12" -(string-match "[0-9]\\@{3,4\\@}" s) - @result{} 3 -(match-string 0 s) - @result{} "123" -@end group -@end lisp +serves as an interval quantifier, analogous to @samp{*} or @samp{+}, but +specifies that the expression must match at least @var{n} times, but no +more than @var{m} times. This syntax is supported by most Unix regexp +utilities, and has been introduced to XEmacs for the version 20.3. @item [ @dots{} ] @cindex character set (in regexp) @@ -482,26 +457,13 @@ @item \(?: @dots{} \) @cindex @samp{(?:} in regex @cindex regexp grouping -is called a "shy" grouping operator, and it is used just like @samp{\( -@dots{} \)}, except that it does not cause the matched substring to be -recorded for future reference. This can be useful at times when a -program wants to refer to a specific @samp{\( @dots{} \)} group's number -(eg. in a @code{match-string} or @code{match-beginning} function -application) and you need to use grouping constructs for an alternation -or multi--character repetition inside a regular expression string that -can change each time the code is run, but you don't want those groups -counting because they'd change the reference number of the group you -want to refer to that is inside the static part of your generated -regular expression. +is called a @dfn{shy} grouping operator, and it is used just like +@samp{\( @dots{} \)}, except that it does not cause the matched +substring to be recorded for future reference. -@lisp -;; @r{Here `dynamic-regex' might contain shy groups.} -(re-search-forward - (concat "\\(" dynamic-regex "\\)\\(-?[0-9]\\@{2,4\\@}\\)")) -;; @r{and this `match-string' will still refer to the integer} -;; @r{captured by the second group in the `concat' string.} -(match-string 2) -@end lisp +This is useful when you need a lot of grouping @samp{\( @dots{} \)} +constructs, but only want to remember one or two. Then you can use +not want to remember them for later use with @code{match-string}. Using @samp{\(?: @dots{} \)} rather than @samp{\( @dots{} \)} when you don't need the captured substrings ought to speed up your programs some, @@ -509,8 +471,11 @@ engine, as well as the amount of memory allocation and string copying it must do. The actual performance gain to be observed has not been measured or quantified as of this writing. -@c This is used to good advantage by the font-locking code, and by `regexp-opt.el'. -@c ... It will be. It's not yet, but will be. +@c This is used to good advantage by the font-locking code, and by +@c `regexp-opt.el'. ... It will be. It's not yet, but will be. + +The shy grouping operator has been borrowed from Perl, and has not been +available prior to XEmacs 20.3, nor is it available in FSF Emacs. @item \w @cindex @samp{\w} in regexp @@ -792,6 +757,35 @@ @end example @end defun +@defun split-string string &optional pattern +This function splits @var{string} to substrings delimited by +@var{pattern}, and returns a list of substrings. If @var{pattern} is +omitted, it defaults to @samp{[ \f\t\n\r\v]+}, which means that it +splits @var{string} by white--space. + +@example +@group +(split-string "foo bar") + @result{} ("foo" "bar") +@end group + +@group +(split-string "something") + @result{} ("something") +@end group + +@group +(split-string "a:b:c" ":") + @result{} ("a" "b" "c") +@end group + +@group +(split-string ":a::b:c" ":") + @result{} ("" "a" "" "b" "c") +@end group +@end example +@end defun + @defun looking-at regexp This function determines whether the text in the current buffer directly following point matches the regular expression @var{regexp}. ``Directly
--- a/man/lispref/strings.texi Mon Aug 13 10:31:30 2007 +0200 +++ b/man/lispref/strings.texi Mon Aug 13 10:32:22 2007 +0200 @@ -114,6 +114,10 @@ @defun char-or-string-p object This function returns @code{t} if @var{object} is a string or a character, @code{nil} otherwise. + +In XEmacs addition, this function also returns @code{t} if @var{object} +is an integer that can be represented as a character. This is because +of compatibility with previous XEmacs and should not be depended on. @end defun @node Creating Strings @@ -122,6 +126,22 @@ The following functions create strings, either from scratch, or by putting strings together, or by taking them apart. +@defun string &rest characters + This function returns of string made up of @var{characters}. + +@example +(string ?X ?E ?m ?a ?c ?s) + @result{} "XEmacs" +(string) + @result{} "" +@end example + +Analogous functions operating on other data types include @code{list}, +@code{cons} (@pxref{Building Lists}), @code{vector} (@pxref{Vectors}) +and @code{bit-vector} (@pxref{Bit Vectors}). This function has not been +available in XEmacs prior to 21.0 and FSF Emacs prior to 20.3. +@end defun + @defun make-string count character This function returns a string made up of @var{count} repetitions of @var{character}. If @var{count} is negative, an error is signaled. @@ -538,16 +558,19 @@ See also the function @code{format} in @ref{Formatting Strings}. @end defun -@defun string-to-number string +@defun string-to-number string &optional base @cindex string to number This function returns the numeric value of the characters in -@var{string}, read in base ten. It skips spaces and tabs at the +@var{string}, read in @var{base}. It skips spaces and tabs at the beginning of @var{string}, then reads as much of @var{string} as it can interpret as a number. (On some systems it ignores other whitespace at the beginning, not just spaces and tabs.) If the first character after the ignored whitespace is not a digit or a minus sign, this function returns 0. +If @var{base} is not specified, it defaults to ten. With @var{base} +other than ten, only integers can be read. + @example (string-to-number "256") @result{} 256 @@ -557,6 +580,8 @@ @result{} 0 (string-to-number "-4.5") @result{} -4.5 +(string-to-number "ffff" 16) + @result{} 65535 @end example @findex string-to-int @@ -740,6 +765,10 @@ @samp{ }, @samp{0}, and @samp{#}. @item +An asterisk (@samp{*}, meaning that the field width is now assumed to +have been specified as an argument. + +@item An optional minimum field width. @item
--- a/man/lispref/windows.texi Mon Aug 13 10:31:30 2007 +0200 +++ b/man/lispref/windows.texi Mon Aug 13 10:32:22 2007 +0200 @@ -1289,7 +1289,8 @@ recentering. If you set it to a small number, then when you move point a short distance off the screen, XEmacs will scroll the screen just far enough to bring point back on screen, provided that does not exceed -@var{scroll-conservatively} lines. +@code{scroll-conservatively} lines. This variable overrides the +redisplay preemption. @end defopt @defopt next-screen-context-lines
--- a/man/xemacs/display.texi Mon Aug 13 10:31:30 2007 +0200 +++ b/man/xemacs/display.texi Mon Aug 13 10:32:22 2007 +0200 @@ -131,6 +131,21 @@ scroll the buffer by that many lines; if that is enough to bring point back into visibility, that is what happens. + Scrolling happens automatically if point has moved out of the visible +portion of the text when it is time to display. Usually scrolling is +done to put point vertically centered within the window. However, if +the variable @code{scroll-step} has a non-zero value, an attempt is made to +scroll the buffer by that many lines; if that is enough to bring point back +into visibility, that is what happens. + +@vindex scroll-conservatively + If you set @code{scroll-step} to a small value because you want to use +arrow keys to scroll the screen without recentering, the redisplay +preemption will likely make XEmacs keep recentering the screen when +scrolling fast, regardless of @code{scroll-step}. To prevent this, set +@code{scroll-conservatively} to a small value, which will have the +result of overriding the redisplay preemption. + @node Horizontal Scrolling,, Scrolling, Display @section Horizontal Scrolling
--- a/man/xemacs/killing.texi Mon Aug 13 10:31:30 2007 +0200 +++ b/man/xemacs/killing.texi Mon Aug 13 10:32:22 2007 +0200 @@ -581,7 +581,7 @@ Any other commands besides cursor-motion commands (such as inserting or deleting text) will cause the region to no longer be active; it will no longer be highlighted, and will no longer be the primary selection. -Errors also remove highlighting from a region. +Region can be explicitly deactivated with @kbd{C-g}. Commands that require a region (such as @kbd{C-w}) signal an error if the region is not active. Certain commands cause the region to be in
--- a/nt/ChangeLog Mon Aug 13 10:31:30 2007 +0200 +++ b/nt/ChangeLog Mon Aug 13 10:32:22 2007 +0200 @@ -1,3 +1,7 @@ +1998-04-26 Kirill M. Katsnelson <kkm@kis.ru> + + * xemacs.mak: Added glyphs-eimage.{c,obj} + 1998-04-20 Kirill M. Katsnelson <kkm@kis.ru> * xemacs.mak: Support "Don't panic, I will restart make" exit code.
--- a/nt/xemacs.mak Mon Aug 13 10:31:30 2007 +0200 +++ b/nt/xemacs.mak Mon Aug 13 10:32:22 2007 +0200 @@ -361,6 +361,7 @@ $(XEMACS)\src\free-hook.c \ $(XEMACS)\src\general.c \ $(XEMACS)\src\glyphs.c \ + $(XEMACS)\src\glyphs-eimage.c \ $(XEMACS)\src\gmalloc.c \ $(XEMACS)\src\gui.c \ $(XEMACS)\src\hash.c \ @@ -620,6 +621,7 @@ $(OUTDIR)\free-hook.obj \ $(OUTDIR)\general.obj \ $(OUTDIR)\glyphs.obj \ + $(OUTDIR)\glyphs-eimage.obj \ $(OUTDIR)\gmalloc.obj \ $(OUTDIR)\gui.obj \ $(OUTDIR)\hash.obj \
--- a/src/ChangeLog Mon Aug 13 10:31:30 2007 +0200 +++ b/src/ChangeLog Mon Aug 13 10:32:22 2007 +0200 @@ -1,3 +1,372 @@ +1998-05-03 Olivier Galibert <galibert@pobox.com> + + * alloc.c (make_pure_float): Remove reference to obsolete 'next' + field. + (make_float): Ditto. + + * lisp.h (struct Lisp_Float): Remove obsolete 'next' field. + +1998-05-02 SL Baur <steve@altair.xemacs.org> + + * lread.c (FSF_KEYS): Remove if built with Mule. + +1998-05-01 Kirill M. Katsnelson <kkm@kis.ru> + + * event-msw.c (ntpipe_shove_flusher): Removed. + (init_shove_stream): Flusher undeclared. + +1998-05-02 SL Baur <steve@altair.xemacs.org> + + * rangetab.c: `default_dumped' removed. + +1998-05-02 Hrvoje Niksic <hniksic@srce.hr> + + * events.c (Fmake_event): Initialize key data for key-press + events. + +1998-05-02 Hrvoje Niksic <hniksic@srce.hr> + + * fileio.c (close_stream_unwind): Renamed to delete_stream_unwind. + Delete the stream. + (Finsert_file_contents_internal): Delete STREAM after use. + (Fmake_temp_name): Improve randomness of generated file names. + (Fmake_temp_name): Don't initialize COUNT if in temacs. + +1998-05-02 Olivier Galibert <galibert@pobox.com> + + * buffer.h: Put the range_table lrecrod declaration where it + belongs... + + * rangetab.h: New file - ...which is here. + + * rangetab.c: Move declarations to rangetab.h + +1998-05-01 Hrvoje Niksic <hniksic@srce.hr> + + * data.c (Fneq): Fix docstring. + (arithcompare_many): Slightly simplify. + +1998-04-29 Andy Piper <andyp@parallax.co.uk> + + * s/cygwin32.h: don't define BROKEN_CYGWIN anymore since we normally + link with unixoid event loop now. + +1998-05-01 Kirill M. Katsnelson <kkm@kis.ru> + + * event-stream.c (event_stream_next_event): Disable polling for + quit while XEmacs is blocked waiting for an event. + +1998-05-01 Kirill M. Katsnelson <kkm@kis.ru> + + * specifier.h: Corrected documentation on magic specifiers. + Documented DEPTH parameter to instantiate_method. + Renamed reveal->unlock_ghost_specifiers_protected(). + + * specifier.c: Removed the reveal mechanism and made ghost + specifiers read-only, so they are accessible as fallbacks of magic + specifier, but aren't modifiable unless C code enables so. + (specifier_equal): Compare specifier fallbacks as well. + + * scrollbar.c (init_frame_scrollbars): + (init_device_scrollbars): + (init_global_scrollbars): Renamed + reveal->unlock_ghost_specifiers_protected(). + +1998-05-01 Hrvoje Niksic <hniksic@srce.hr> + + * fileio.c (Fcar_less_than_car): Fix Flss caller. + (Fcdr_less_than_cdr): Ditto. + + * lisp.h: Fix declarations. + + * data.c: Enable many arguments versions of <, >, <=, >= and /=. + + * bytecode.c (Fbyte_code): Use arithcompare. + + * data.c (arithcompare): Make non-static. + +1998-04-30 Greg Klanderman <greg@alphatech.com> + + * frame.c (Fselect_frame): update docstring to describe + focus-follows-mouse behavior. + +1998-05-01 Hrvoje Niksic <hniksic@srce.hr> + + * print.c (Fwrite_char): Don't touch Vprint_gensym. + (print_error_message): Don't gcpro TAIL. + (Fdisplay_error): Simplify. + +1998-04-30 Hrvoje Niksic <hniksic@srce.hr> + + * print.c (print_internal): Use long_to_string(). + + * redisplay.c (decode_mode_spec): Remove bogus calculation of the + number of digits. + + * print.c (Fprin1): Removed THE_STREAM. + (Fprinc): Ditto. + (Fprint): Ditto. + (Fdisplay_error): Canonicalize STREAM here. + (print_error_message): Don't canonicalize STREAM. + (print_error_message): Use print_internal() instead of Fprin1 and + Fprinc. + + * print.c: (Fprin1_to_string): Delete internal stream explicitly. + (Ferror_message_string): Ditto. + (Fterpri): Use write_char_internal. + +1998-04-18 Martin Buchholz <martin@xemacs.org> + + * console-x.h: Initialize_Locale should not depend on HAVE_XIM, + esp. in the future. + + * Makefile.in.in: be more careful generating depend. + + * *.c (F*): Unfortunately, etags can only detect per-line + patterns, and so the DEFUN macro must have the lisp name and the C + name on the same line for a complete TAGS file. Make it so. + + * signal.c (init_signals_very_early): + * process.c (Fsignal_process): Order the signals in decreasing + order of standardization. Provide helpful standardization + comments. Add missing signal names. + + * unexhp9k800.c: Remove undefined roundup. + * symsinit.h: Add prototype for init_hpplay(). + +1998-04-30 Hrvoje Niksic <hniksic@srce.hr> + + * window.c (Fcenter_to_window_line): New function. + (Frecenter): Use it. + +1998-04-30 Hrvoje Niksic <hniksic@srce.hr> + + * dired.c (make_directory_hash_table): Constify. + + * scrollbar.c (Fscrollbar_page_up): Use Fcenter_to_window_line + instead of Frecenter. + (Fscrollbar_page_down): Ditto. + (Fscrollbar_to_top): Ditto. + (Fscrollbar_to_bottom): Ditto. + + * window.c (Frecenter): Removed. + +1998-04-29 Andy Piper <andyp@parallax.co.uk> + + * console.h: xpm_normalize is not a console method anymore. + + * event-msw.c: honour toolbar help string length. + + * glyphs-msw.c: make copyright more meaningful. implement color + symbol support for Xpm. (extract_xpm_color_symbols) new function. + + * glyphs.c (pixmap_to_lisp_data) (xpm_normalize): fucntions moved + from glyphs-x.c + + * glyphs.h: declare pixmap_to_lisp_data. + + * toolbar-msw.c: more meaningful copyright. + +1998-04-30 Hrvoje Niksic <hniksic@srce.hr> + + * macros.c (Fend_kbd_macro): New arg REMOVE-LAST. + + * gui-x.c (popup_selection_callback): Treat anonymous interactive + and compiled-function interactive callbacks as commands. + +1998-04-28 Hrvoje Niksic <hniksic@srce.hr> + + * abbrev.c (obarray_has_blank_p): Simplify. + +1998-04-27 Hrvoje Niksic <hniksic@srce.hr> + + * getloadavg.c (getloadavg): Removed some code repetition. + +1998-05-01 Kirill M. Katsnelson <kkm@kis.ru> + + * process-nt.c: Document usage of #pragma warning. + (alloc_process_memory): Spell _ALPHA_ correctly. + +1998-04-29 SL Baur <steve@altair.xemacs.org> + + * Makefile.in.in: Change `progname' to `PROGNAME' for + consistency. + +1998-04-29 Kirill M. Katsnelson <kkm@kis.ru> + + * frame.c (change_frame_size_1): Adjust frame row/columns taking + real toolbar size into account, not the theoretical one. + + * toolbar.c (set_frame_toolbar): Removed unused parameter. + Return void, not unused int. + Logic which checks whether toolbar to be recomputed moved here + from macro COMPUTE_TOOLBAR_DATA (r.i.p) + (compute_frame_toolbars_data): Removed COMPUTE_TOOLBAR_DATA. It + did not work due to a bug, and also did not check whether toolbar + size has changed. + Compute new character sizes passed to change_frame_size, do not + use the old (pre-toolbar-change) ones. + (update_frame_toolbars): Honor frame_changed and clear frame bits. + (recompute_overlaying_specifier): New helper function, called from + default toolbar specifier change handlers. + (default_toolbar_specs_changed): Use it. + (default_toolbar_size_changed_in_frame): Ditto. + (default_toolbar_border_width_changed_in_frame): Ditto. + (default_toolbar_visible_p_changed_in_frame): Ditto. + (toolbar_geometry_changed_in_window): New handler. The old one, + some_windows_value_changed, did not do the trick. + (default_toolbar_size_changed_in_window): New handler for default + toolbar. + (default_toolbar_border_width_changed_in_window): Ditto. + (default_toolbar_visible_p_changed_in_window): Ditto. + (specifier_vars_of_toolbar): Use one of the above four handlers + instead of some_windows_value_changed in toolbar specifiers. + +1998-04-29 Andy Piper <andyp@parallax.co.uk> + + * redisplay-msw.c (mswindows_output_string) + (mswindows_output_string): output the background pixmap if we have + one. + +1998-04-28 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * paths.h.in: Added PATH_PROGNAME and PATH_VERSION. + +1998-04-28 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * emacs.c (complex_vars_of_emacs): Added `emacs-program-name' and + `emacs-program-version'. + +1998-04-29 Kirill M. Katsnelson <kkm@kis.ru> + + * process-nt.c: Signal support for Windows NT. + New code under subheadings "Running remote threads" and "Sending + signals". + (nt_create_process): Create new process suspended, then enable + signals in it, then resume it. + (nt_kill_child_process): Implemented + (nt_kill_process_by_pid): Ditto. + (process_type_create_nt): Registered the two above. + +1998-04-28 P. E. Jareth Hein <jareth@camelot-soft.com> + + * glyphs-x.c : slight cleanup and bugfix related to memory + corruption and possible leaks. Also fix a visual problem + with XPM pointers + +1998-04-28 P. E. Jareth Hein <jareth@camelot-soft.com> + + * glyphs-x.c (x_init_image_instance_from_eimage): Make sure + automatic pointers are null... + +1998-04-27 Greg Klanderman <greg@alphatech.com> + + * cmdloop.c (Fcommand_loop_1): Call investigate_frame_change if + focus_follows_mouse is true. + + * event-stream.c (next_event_internal): Only call + investigate_frame_change if focus_follows_mouse is false. + + * event-stream.c (investigate_frame_change): Fix + focus_follows_mouse handling. It was the case that, with + focus_follows_mouse true, (select-frame (next-frame)) could leave + next-frame with input focus, but not window manager focus. Now + needs to be called from 2 places, conditional on the value of + focus_follows_mouse. + +1998-04-24 Kirill M. Katsnelson <kkm@kis.ru> + + * frame.c (Fmake_frame): GC-protect new frame immediately upon + creation. + +1998-04-27 Kirill M. Katsnelson <kkm@kis.ru> + + * frame.c (delete_frame_internal): Fixed spurious minibuffer + frames when creating minibufferless frames (reverted to 20.3 + source, change not in ChangeLog) + +1998-04-26 Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> + + * eldap.h: Added CONCHECK_LDAP macro + + * eldap.c: Moved definition of most Lisp_object keywords to + general.c + (Fldap_close): Modified semantics to match those of + `Fclose_database' + (Fldap_search_internal): Do not consider a + `LDAP_SIZELIMIT_EXCEEDED' a fatal error + + * general.c: Added several keywords needed by eldap.c. Sorted + keywords alphabetically. + +1998-04-24 Hrvoje Niksic <hniksic@srce.hr> + + * eldap.c (finalize_ldap): New function; use it when declaring + LDAP lrecord type. + +1998-04-27 Kirill M. Katsnelson <kkm@kis.ru> + + * fileio.c (Fwrite_file_contents_internal): Prefer stat() over + fstat() back for Windows, where closing a file changes its + modification time. + +1998-04-26 Amir J. Katz <amir@ndsoft.com> + + * sysdep.h: Simplified definition of strerror() + +Sun Apr 23 1998 Andy Piper <andyp@parallax.co.uk> + + * emacs.c: + * symsinit.h: + * glyphs-eimage.c: rename glyphs_read to glyphs_eimage. + + * glyphs.c: + * console.h: + * glyphs-x.c: + * glyphx-msw.c: make xpm_normalize and xpm_instantiate device + methods and use them appropriately. Remove redundant pixmap file + handling functions. + +Sun Apr 23 1998 Andy Piper <andyp@parallax.co.uk> + + * glyphs-msw.c: use XINT for lisp ints. + + * console-msw.c: remove redundant functions that break under union + type. + + * frame-msw.c: build lisp ints for functions that expect them. + + * objects-msw.c: don't LISP_HASH COLORREF's. + + * sheap.c: remove dependency on VALMASK. + +1998-04-27 SL Baur <steve@altair.xemacs.org> + + * debug.c (vars_of_debug): Remove `Fprovide("internal-debug")'. + +1998-04-27 Jonathan Harris <jhar@tardis.ed.ac.uk> + + * device-msw.c: Unconditionally use InitCommonControls() instead + of InitcommonControlsEx() - the latter is not defined in all + environments. + +1998-04-26 SL Baur <steve@altair.xemacs.org> + + * Makefile.in.in: Religiously use ${progname}. + + * paths.h.in: Remove reference to user-defined site-lisp location. + * debug.c (vars_of_debug): Rename feature to 'internal-debug. + +1998-04-24 Martin Buchholz <martin@xemacs.org> + + * mule-charset.h: + * mule-charset.c: + Use ints instead of bitfields for Lisp_Charset fields. This + should work around bugs in the latest egcs snapshot, and make + XEmacs faster. Introduce dimension and chars as fields in + Lisp_Charset instead of computing them every time. The extra + space is about 1k, a reasonable price. + 1998-04-25 SL Baur <steve@altair.xemacs.org> * glyphs-x.c (xface_normalize): Add console_type parameters to
--- a/src/Makefile.in.in Mon Aug 13 10:31:30 2007 +0200 +++ b/src/Makefile.in.in Mon Aug 13 10:32:22 2007 +0200 @@ -22,7 +22,9 @@ ## Synched up with: Not synched with FSF. -all: xemacs +PROGNAME=@PROGNAME@ + +all: ${PROGNAME} .PHONY : all release dump-elc dump-elcs all-elc all-elcs lint ## For performance and consistency, no built-in rules. @@ -288,7 +290,7 @@ release: temacs ${libsrc}DOC $(mo_file) ${other_files} #ifdef CANNOT_DUMP - ln temacs xemacs + ln temacs ${PROGNAME} #else #ifdef HAVE_SHM -if [ -w ${srcdir}/../lisp ]; then \ @@ -310,21 +312,21 @@ touch release #endif /* ! defined (CANNOT_DUMP) */ -xemacs: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp +${PROGNAME}: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp @$(RM) $@ && touch SATISFIED -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump @if test -f $@; then if test -f SATISFIED; then \ echo "Testing for Lisp shadows ..."; \ - ./xemacs -batch -vanilla -f list-load-path-shadows; fi; \ + ./${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) $@; fastdump: temacs - @$(RM) xemacs && touch SATISFIED + @$(RM) ${PROGNAME} && touch SATISFIED -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump - @if test -f xemacs; then if test -f SATISFIED; then \ - ./xemacs -batch -vanilla -f list-load-path-shadows; fi; \ + @if test -f ${PROGNAME}; then if test -f SATISFIED; then \ + ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \ $(RM) SATISFIED; exit 0; fi; \ if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; @@ -659,10 +661,10 @@ ## Do not use it on development directories! distclean: clean $(RM) config.h paths.h Emacs.ad.h \ - Makefile Makefile.in TAGS xemacs.* + Makefile Makefile.in TAGS ${PROGNAME}.* realclean: distclean versionclean: - $(RM) xemacs xemacs.exe ${libsrc}DOC + $(RM) ${PROGNAME} ${PROGNAME}.exe ${libsrc}DOC extraclean: realclean $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#* @@ -676,8 +678,7 @@ chmod -w $(SOURCES) ## Dependency processing using home-grown script, not makedepend -FRC.depend : depend: FRC.depend - $(RM) $@; + $(RM) ${srcdir}/depend; mv depend.tmp ${srcdir}/depend perl ${srcdir}/make-src-depend > depend.tmp mv depend.tmp ${srcdir}/depend
--- a/src/abbrev.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/abbrev.c Mon Aug 13 10:32:22 2007 +0200 @@ -190,10 +190,10 @@ wordstart = get_buffer_pos_char (buf, Vabbrev_start_location, GB_COERCE_RANGE); Vabbrev_start_location = Qnil; +#if 0 /* Previously, abbrev-prefix-mark crockishly inserted a dash to indicate the abbrev start point. It now uses an extent with a begin glyph so there's no dash to remove. */ -#if 0 if (wordstart != BUF_ZV (buf) && BUF_FETCH_CHAR (buf, wordstart) == '-') { @@ -245,10 +245,7 @@ static int obarray_has_blank_p (Lisp_Object obarray) { - Lisp_Object lookup; - - lookup = oblookup (obarray, (Bufbyte *)" ", 1); - return SYMBOLP (lookup); + return !ZEROP (oblookup (obarray, (Bufbyte *)" ", 1)); } /* Analyze case in the buffer substring, and report it. */ @@ -256,12 +253,10 @@ abbrev_count_case (struct buffer *buf, Bufpos pos, Charcount length, int *lccount, int *uccount) { - Emchar c; - *lccount = *uccount = 0; while (length--) { - c = BUF_FETCH_CHAR (buf, pos); + Emchar c = BUF_FETCH_CHAR (buf, pos); if (UPPERCASEP (buf, c)) ++*uccount; else if (LOWERCASEP (buf, c))
--- a/src/alloc.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/alloc.c Mon Aug 13 10:32:22 2007 +0200 @@ -1271,7 +1271,6 @@ ALLOCATE_FIXED_TYPE (float, struct Lisp_Float, f); set_lheader_implementation (&(f->lheader), lrecord_float); - float_next (f) = ((struct Lisp_Float *) -1); float_data (f) = float_value; XSETFLOAT (val, f); return val; @@ -2749,7 +2748,6 @@ pure_bytes_used += sizeof (struct Lisp_Float); bump_purestat (&purestat_float, sizeof (struct Lisp_Float)); - float_next (f) = ((struct Lisp_Float *) -1); float_data (f) = num; XSETFLOAT (val, f); return val;
--- a/src/buffer.h Mon Aug 13 10:31:30 2007 +0200 +++ b/src/buffer.h Mon Aug 13 10:32:22 2007 +0200 @@ -1789,9 +1789,4 @@ #define DOWNCASE(buf, ch) DOWNCASE_TABLE_OF (buf, ch) - -/* put it here, somewhat arbitrarily ... it needs to be in *some* - header file. */ -DECLARE_LRECORD (range_table, struct Lisp_Range_Table); - #endif /* _XEMACS_BUFFER_H_ */
--- a/src/bytecode.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/bytecode.c Mon Aug 13 10:32:22 2007 +0200 @@ -811,22 +811,22 @@ case Bgtr: v1 = POP; - TOP = Fgtr (TOP, v1); + TOP = arithcompare (TOP, v1, arith_grtr); break; case Blss: v1 = POP; - TOP = Flss (TOP, v1); + TOP = arithcompare (TOP, v1, arith_less); break; case Bleq: v1 = POP; - TOP = Fleq (TOP, v1); + TOP = arithcompare (TOP, v1, arith_less_or_equal); break; case Bgeq: v1 = POP; - TOP = Fgeq (TOP, v1); + TOP = arithcompare (TOP, v1, arith_grtr_or_equal); break; case Bdiff:
--- a/src/cmdloop.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/cmdloop.c Mon Aug 13 10:32:22 2007 +0200 @@ -533,6 +533,15 @@ while (EQ (Vcommand_loop, old_loop)) #endif /* LISP_COMMAND_LOOP */ { + /* If focus_follows_mouse, make sure the frame with window manager + focus is selected. */ + { extern void investigate_frame_change (void); + extern int focus_follows_mouse; + + if (focus_follows_mouse) + investigate_frame_change (); + } + /* Make sure the current window's buffer is selected. */ { Lisp_Object selected_window = Fselected_window (Qnil);
--- a/src/console-msw.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/console-msw.c Mon Aug 13 10:32:22 2007 +0200 @@ -104,26 +104,11 @@ return (CONSP (obj)) ? XCONS (obj) : NULL; } -Lisp_Object DCAR(Lisp_Object obj) -{ - return (CONSP (obj)) ? XCAR (obj) : 0; -} - -Lisp_Object DCDR(Lisp_Object obj) -{ - return (CONSP (obj)) ? XCDR (obj) : 0; -} - struct Lisp_Cons *DCONSCDR(Lisp_Object obj) { return ((CONSP (obj)) && (CONSP (XCDR (obj)))) ? XCONS (XCDR (obj)) : 0; } -Lisp_Object DCARCDR(Lisp_Object obj) -{ - return ((CONSP (obj)) && (CONSP (XCDR (obj)))) ? XCAR (XCDR (obj)) : 0; -} - char *DSTRING(Lisp_Object obj) { return (STRINGP (obj)) ? XSTRING_DATA (obj) : NULL;
--- a/src/console-tty.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/console-tty.c Mon Aug 13 10:32:22 2007 +0200 @@ -216,7 +216,8 @@ return XCONSOLE (console); } -DEFUN ("console-tty-terminal-type", Fconsole_tty_terminal_type, 0, 1, 0, /* +DEFUN ("console-tty-terminal-type", Fconsole_tty_terminal_type, + 0, 1, 0, /* Return the terminal type of TTY console CONSOLE. */ (console)) @@ -224,8 +225,8 @@ return CONSOLE_TTY_DATA (decode_tty_console (console))->terminal_type; } -DEFUN ("console-tty-controlling-process", - Fconsole_tty_controlling_process, 0, 1, 0, /* +DEFUN ("console-tty-controlling-process", Fconsole_tty_controlling_process, + 0, 1, 0, /* Return the controlling process of tty console CONSOLE. */ (console)) @@ -235,8 +236,8 @@ #ifdef MULE -DEFUN ("console-tty-input-coding-system", - Fconsole_tty_input_coding_system, 0, 1, 0, /* +DEFUN ("console-tty-input-coding-system", Fconsole_tty_input_coding_system, + 0, 1, 0, /* Return the input coding system of tty console CONSOLE. */ (console)) @@ -245,8 +246,8 @@ (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->instream)); } -DEFUN ("set-console-tty-input-coding-system", - Fset_console_tty_input_coding_system, 0, 2, 0, /* +DEFUN ("set-console-tty-input-coding-system", Fset_console_tty_input_coding_system, + 0, 2, 0, /* Set the input coding system of tty console CONSOLE to CODESYS. CONSOLE defaults to the selected console. CODESYS defaults to the value of `keyboard-coding-system'. @@ -259,8 +260,8 @@ return Qnil; } -DEFUN ("console-tty-output-coding-system", - Fconsole_tty_output_coding_system, 0, 1, 0, /* +DEFUN ("console-tty-output-coding-system", Fconsole_tty_output_coding_system, + 0, 1, 0, /* Return TTY CONSOLE's output coding system. */ (console)) @@ -269,8 +270,8 @@ (XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->outstream)); } -DEFUN ("set-console-tty-output-coding-system", - Fset_console_tty_output_coding_system, 0, 2, 0, /* +DEFUN ("set-console-tty-output-coding-system", Fset_console_tty_output_coding_system, + 0, 2, 0, /* Set the coding system of tty output of console CONSOLE to CODESYS. CONSOLE defaults to the selected console. CODESYS defaults to the value of `terminal-coding-system'. @@ -284,8 +285,8 @@ } /* ### Move this function to lisp */ -DEFUN ("set-console-tty-coding-system", - Fset_console_tty_coding_system, 0, 2, 0, /* +DEFUN ("set-console-tty-coding-system", Fset_console_tty_coding_system, + 0, 2, 0, /* Set the input and output coding systems of tty console CONSOLE to CODESYS. CONSOLE defaults to the selected console. If CODESYS is nil, the values of `keyboard-coding-system' and
--- a/src/console-x.h Mon Aug 13 10:31:30 2007 +0200 +++ b/src/console-x.h Mon Aug 13 10:32:22 2007 +0200 @@ -440,9 +440,9 @@ #define HANDLING_X_ERROR(dpy, body) \ ( expect_x_error ((dpy)), (body), signal_if_x_error ((dpy), 0)) +void Initialize_Locale (void); + #ifdef HAVE_XIM -/* Locale */ -void Initialize_Locale (void); /* X Input Method `methods' */ void XIM_init_device (struct device *d);
--- a/src/console.h Mon Aug 13 10:31:30 2007 +0200 +++ b/src/console.h Mon Aug 13 10:32:22 2007 +0200 @@ -203,6 +203,14 @@ Lisp_Object (*locate_pixmap_file_method) (Lisp_Object file_method); int (*colorize_image_instance_method) (Lisp_Object image_instance, Lisp_Object fg, Lisp_Object bg); +#ifdef HAVE_XPM + /* which is more tacky - this or #defines in glyphs.c? */ + void (*xpm_instantiate_method)(Lisp_Object image_instance, + Lisp_Object instantiator, + Lisp_Object pointer_fg, + Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain); +#endif Lisp_Object image_conversion_list; #ifdef HAVE_TOOLBARS
--- a/src/data.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/data.c Mon Aug 13 10:32:22 2007 +0200 @@ -187,7 +187,7 @@ even though they are not the same object and are in fact of different types. This is ABSOLUTELY AND UTTERLY HORRENDOUS but is necessary to preserve byte-code compatibility with v19. This kludge is known as the -\"char-to-int confoundance disease\" and appears in a number of other +\"char-int confoundance disease\" and appears in a number of other functions with `old-foo' equivalents. Do not use this function! @@ -374,9 +374,9 @@ DEFUN ("characterp", Fcharacterp, 1, 1, 0, /* Return t if OBJECT is a character. -Unlike in XEmacs v19 and Emacs, a character is its own primitive type. +Unlike in XEmacs v19 and FSF Emacs, a character is its own primitive type. Any character can be converted into an equivalent integer using -`char-to-int'. To convert the other way, use `int-to-char'; however, +`char-int'. To convert the other way, use `int-char'; however, only some integers can be converted into characters. Such an integer is called a `char-int'; see `char-int-p'. @@ -434,7 +434,7 @@ DEFUN ("char-int-p", Fchar_int_p, 1, 1, 0, /* Return t if OBJECT is an integer that can be converted into a character. -See `char-to-int'. +See `char-int'. */ (object)) { @@ -974,10 +974,9 @@ /* Arithmetic functions */ /**********************************************************************/ -enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal }; - -static Lisp_Object -arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) +Lisp_Object +arithcompare (Lisp_Object num1, Lisp_Object num2, + enum arith_comparison comparison) { CHECK_INT_OR_FLOAT_COERCE_CHAR_OR_MARKER (num1); CHECK_INT_OR_FLOAT_COERCE_CHAR_OR_MARKER (num2); @@ -990,152 +989,94 @@ switch (comparison) { - case equal: return f1 == f2 ? Qt : Qnil; - case notequal: return f1 != f2 ? Qt : Qnil; - case less: return f1 < f2 ? Qt : Qnil; - case less_or_equal: return f1 <= f2 ? Qt : Qnil; - case grtr: return f1 > f2 ? Qt : Qnil; - case grtr_or_equal: return f1 >= f2 ? Qt : Qnil; + case arith_equal: return f1 == f2 ? Qt : Qnil; + case arith_notequal: return f1 != f2 ? Qt : Qnil; + case arith_less: return f1 < f2 ? Qt : Qnil; + case arith_less_or_equal: return f1 <= f2 ? Qt : Qnil; + case arith_grtr: return f1 > f2 ? Qt : Qnil; + case arith_grtr_or_equal: return f1 >= f2 ? Qt : Qnil; } } #endif /* LISP_FLOAT_TYPE */ switch (comparison) { - case equal: return XINT (num1) == XINT (num2) ? Qt : Qnil; - case notequal: return XINT (num1) != XINT (num2) ? Qt : Qnil; - case less: return XINT (num1) < XINT (num2) ? Qt : Qnil; - case less_or_equal: return XINT (num1) <= XINT (num2) ? Qt : Qnil; - case grtr: return XINT (num1) > XINT (num2) ? Qt : Qnil; - case grtr_or_equal: return XINT (num1) >= XINT (num2) ? Qt : Qnil; + case arith_equal: return XINT (num1) == XINT (num2) ? Qt : Qnil; + case arith_notequal: return XINT (num1) != XINT (num2) ? Qt : Qnil; + case arith_less: return XINT (num1) < XINT (num2) ? Qt : Qnil; + case arith_less_or_equal: return XINT (num1) <= XINT (num2) ? Qt : Qnil; + case arith_grtr: return XINT (num1) > XINT (num2) ? Qt : Qnil; + case arith_grtr_or_equal: return XINT (num1) >= XINT (num2) ? Qt : Qnil; } abort (); return Qnil; /* suppress compiler warning */ } -DEFUN ("=", Feqlsign, 2, 2, 0, /* -Return t if two args, both numbers, characters or markers, are equal. -*/ - (num1, num2)) -{ - return arithcompare (num1, num2, equal); -} - -DEFUN ("<", Flss, 2, 2, 0, /* -Return t if first arg is less than second arg. -Both must be numbers, characters or markers. -*/ - (num1, num2)) -{ - return arithcompare (num1, num2, less); -} - -DEFUN (">", Fgtr, 2, 2, 0, /* -Return t if first arg is greater than second arg. -Both must be numbers, characters or markers. -*/ - (num1, num2)) -{ - return arithcompare (num1, num2, grtr); -} - -DEFUN ("<=", Fleq, 2, 2, 0, /* -Return t if first arg is less than or equal to second arg. -Both must be numbers, characters or markers. -*/ - (num1, num2)) +static Lisp_Object +arithcompare_many (enum arith_comparison comparison, + int nargs, Lisp_Object *args) { - return arithcompare (num1, num2, less_or_equal); -} - -DEFUN (">=", Fgeq, 2, 2, 0, /* -Return t if first arg is greater than or equal to second arg. -Both must be numbers, characters or markers. -*/ - (num1, num2)) -{ - return arithcompare (num1, num2, grtr_or_equal); -} - -DEFUN ("/=", Fneq, 2, 2, 0, /* -Return t if first arg is not equal to second arg. -Both must be numbers, characters or markers. -*/ - (num1, num2)) -{ - return arithcompare (num1, num2, notequal); -} - -#if 0 -/* I tried implementing Common Lisp multi-arg comparison functions, - but failed because the byte-compiler needs to be hacked as well. */ - -static Lisp_Object -arithcompare_many (enum comparison comparison, int nargs, Lisp_Object *args) -{ - REGISTER int argnum; - for (argnum = 1; argnum < nargs; argnum++) - if (EQ (arithcompare ( args[argnum-1], args[argnum], comparison), Qnil)) + for (; --nargs > 0; args++) + if (NILP (arithcompare (*args, *(args + 1), comparison))) return Qnil; return Qt; } -xxxDEFUN ("=", Feqlsign, 1, MANY, 0, /* -Return t if all the arguments are equal. +DEFUN ("=", Feqlsign, 1, MANY, 0, /* +Return t if all the arguments are numerically equal. The arguments may be numbers, characters or markers. */ (int nargs, Lisp_Object *args)) { - return arithcompare (equal, nargs, args); + return arithcompare_many (arith_equal, nargs, args); } -xxxDEFUN ("<", Flss, 1, MANY, 0, /* +DEFUN ("<", Flss, 1, MANY, 0, /* Return t if the sequence of arguments is monotonically increasing. The arguments may be numbers, characters or markers. */ (int nargs, Lisp_Object *args)) { - return arithcompare (less, nargs, args); + return arithcompare_many (arith_less, nargs, args); } -xxxDEFUN (">", Fgtr, 1, MANY, 0, /* +DEFUN (">", Fgtr, 1, MANY, 0, /* Return t if the sequence of arguments is monotonically decreasing. The arguments may be numbers, characters or markers. */ (int nargs, Lisp_Object *args)) { - return arithcompare (grtr, nargs, args); + return arithcompare_many (arith_grtr, nargs, args); } -xxxDEFUN ("<=", Fleq, 1, MANY, 0, /* +DEFUN ("<=", Fleq, 1, MANY, 0, /* Return t if the sequence of arguments is monotonically nondecreasing. The arguments may be numbers, characters or markers. */ (int nargs, Lisp_Object *args)) { - return arithcompare (less_or_equal, nargs, args); + return arithcompare_many (arith_less_or_equal, nargs, args); } -xxxDEFUN (">=", Fgeq, 1, MANY, 0, /* +DEFUN (">=", Fgeq, 1, MANY, 0, /* Return t if the sequence of arguments is monotonically nonincreasing. The arguments may be numbers, characters or markers. */ (int nargs, Lisp_Object *args)) { - return arithcompare_many (grtr_or_equal, nargs, args); + return arithcompare_many (arith_grtr_or_equal, nargs, args); } -xxxDEFUN ("/=", Fneq, 1, MANY, 0, /* -Return t if the sequence of arguments is monotonically increasing. +DEFUN ("/=", Fneq, 1, MANY, 0, /* +Return t if no two arguments are numerically equal. The arguments may be numbers, characters or markers. */ (int nargs, Lisp_Object *args)) { - return arithcompare_many (notequal, nargs, args); + return arithcompare_many (arith_notequal, nargs, args); } -#endif /* 0 - disabled for now */ DEFUN ("zerop", Fzerop, 1, 1, 0, /* Return t if NUMBER is zero.
--- a/src/debug.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/debug.c Mon Aug 13 10:32:22 2007 +0200 @@ -208,8 +208,6 @@ void vars_of_debug (void) { - Fprovide (intern ("debug")); - /* If you need to have any classes active early on in startup, then the flags should be set here. All functions called by this function are "allowed" according
--- a/src/depend Mon Aug 13 10:31:30 2007 +0200 +++ b/src/depend Mon Aug 13 10:32:22 2007 +0200 @@ -27,7 +27,7 @@ dialog-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsManager.h EmacsShell.h buffer.h bufslots.h commands.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h gui-x.h gui.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h xintrinsic.h frame-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h conslots.h console-x.h console.h device.h events-mod.h events.h extents.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h mule-charset.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar-x.h scrollbar.h specifier.h systime.h toolbar.h window.h xintrinsic.h xintrinsicp.h xmprimitivep.h xmu.h glyphs-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h conslots.h console-x.h console.h device.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h imgproc.h insdel.h lstream.h msdos.h mule-charset.h nt.h objects-x.h objects.h opaque.h scrollbar.h specifier.h sysfile.h toolbar.h xintrinsic.h xmu.h -gui-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h conslots.h console-x.h console.h device.h frame.h frameslots.h gui-x.h gui.h mule-charset.h opaque.h scrollbar.h specifier.h toolbar.h xintrinsic.h +gui-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h bytecode.h conslots.h console-x.h console.h device.h frame.h frameslots.h gui-x.h gui.h mule-charset.h opaque.h scrollbar.h specifier.h toolbar.h xintrinsic.h input-method-xfs.o: $(LISP_H) EmacsFrame.h buffer.h bufslots.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h mule-charset.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h xintrinsic.h input-method-xlib.o: $(LISP_H) EmacsFrame.h buffer.h bufslots.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h mule-charset.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h xintrinsic.h menubar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsManager.h EmacsShell.h buffer.h bufslots.h commands.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h gui-x.h gui.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h xintrinsic.h @@ -112,6 +112,7 @@ free-hook.o: $(LISP_H) hash.h general.o: $(LISP_H) getloadavg.o: $(LISP_H) msdos.h nt.h sysfile.h +glyphs-eimage.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h file-coding.h frame.h frameslots.h glyphs.h imgproc.h insdel.h lstream.h msdos.h mule-charset.h nt.h objects.h opaque.h scrollbar.h specifier.h sysfile.h toolbar.h glyphs.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h insdel.h mule-charset.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window.h gmalloc.o: config.h getpagesize.h gpmevent.o: $(LISP_H) conslots.h console-tty.h console.h device.h events-mod.h events.h gpmevent.h sysdep.h syssignal.h systime.h systty.h @@ -154,7 +155,7 @@ profile.o: $(LISP_H) backtrace.h bytecode.h hash.h syssignal.h systime.h pure.o: $(LISP_H) puresize-adjust.h puresize.h ralloc.o: $(LISP_H) getpagesize.h -rangetab.o: $(LISP_H) +rangetab.o: $(LISP_H) rangetab.h realpath.o: config.h redisplay-output.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h debug.h device.h faces.h frame.h frameslots.h glyphs.h mule-charset.h redisplay.h scrollbar.h specifier.h sysdep.h toolbar.h window.h redisplay-tty.o: $(LISP_H) buffer.h bufslots.h conslots.h console-tty.h console.h device.h events.h faces.h frame.h frameslots.h glyphs.h lstream.h mule-charset.h objects-tty.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h syssignal.h systime.h systty.h toolbar.h window.h
--- a/src/device-msw.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/device-msw.c Mon Aug 13 10:32:22 2007 +0200 @@ -39,23 +39,16 @@ #include "frame.h" #include "sysdep.h" +#ifndef __CYGWIN32__ +#include <commctrl.h> +#endif + /* win32 DDE management library globals */ DWORD mswindows_dde_mlid; HSZ mswindows_dde_service; HSZ mswindows_dde_topic_system; HSZ mswindows_dde_item_open; -#ifdef __CYGWIN32__ -typedef struct tagINITCOMMONCONTROLSEX -{ - DWORD dwSize; - DWORD dwICC; -} INITCOMMONCONTROLSEX; -WINAPI BOOL InitCommonControlsEx (INITCOMMONCONTROLSEX*); -#else -#include <commctrl.h> -#endif - /* Control conversion of upper case file names to lower case. nil means no, t means yes. */ Lisp_Object Vmswindows_downcase_file_names; @@ -73,10 +66,6 @@ WNDCLASSEX wc; HWND desktop; HDC hdc; -#ifdef HAVE_TOOLBARS - INITCOMMONCONTROLSEX iccex; - xzero(iccex); -#endif DEVICE_INFD (d) = DEVICE_OUTFD (d) = -1; init_baud_rate (d); @@ -119,13 +108,7 @@ IMAGE_ICON, 16, 16, 0); RegisterClassEx (&wc); #ifdef HAVE_TOOLBARS - iccex.dwSize = sizeof (iccex); - iccex.dwICC = ICC_BAR_CLASSES; -#ifdef __CYGWIN32__ InitCommonControls (); -#else - InitCommonControlsEx (&iccex); -#endif #endif }
--- a/src/device-x.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/device-x.c Mon Aug 13 10:32:22 2007 +0200 @@ -1499,8 +1499,8 @@ return DEVICE_X_DATA (d)->x_keysym_map_hashtable; } -DEFUN ("x-keysym-on-keyboard-sans-modifiers-p", - Fx_keysym_on_keyboard_sans_modifiers_p, 1, 2, 0, /* +DEFUN ("x-keysym-on-keyboard-sans-modifiers-p", Fx_keysym_on_keyboard_sans_modifiers_p, + 1, 2, 0, /* Return true if KEYSYM names a key on the keyboard of DEVICE. More precisely, return true if pressing a physical key on the keyboard of DEVICE without any modifier keys generates KEYSYM.
--- a/src/dired.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/dired.c Mon Aug 13 10:32:22 2007 +0200 @@ -529,18 +529,18 @@ Lisp_Object -make_directory_hash_table (char *path) +make_directory_hash_table (CONST char *path) { DIR *d; - DIRENTRY *dp; - Bytecount len; Lisp_Object hash = make_lisp_hashtable (100, HASHTABLE_NONWEAK, HASHTABLE_EQUAL); if ((d = opendir (path))) { + DIRENTRY *dp; + while ((dp = readdir (d))) { - len = NAMLEN (dp); + Bytecount len = NAMLEN (dp); if (DIRENTRY_NONEMPTY (dp)) Fputhash (make_ext_string ((Bufbyte *) dp->d_name, len, FORMAT_FILENAME), Qt, hash);
--- a/src/eldap.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/eldap.c Mon Aug 13 10:32:22 2007 +0200 @@ -47,25 +47,25 @@ #undef HAVE_LDAP_GET_ERRNO #endif - - static int ldap_default_port; static Lisp_Object Vldap_default_base; /* ldap-open plist keywords */ -static Lisp_Object Qport, Qauth, Qbinddn, Qpasswd, Qderef, Qtimelimit, +extern Lisp_Object Qport, Qauth, Qbinddn, Qpasswd, Qderef, Qtimelimit, Qsizelimit; /* Search scope limits */ -static Lisp_Object Qbase, Qonelevel, Qsubtree; +extern Lisp_Object Qbase, Qonelevel, Qsubtree; /* Authentication methods */ #ifdef LDAP_AUTH_KRBV41 -static Lisp_Object Qkrbv41; +extern Lisp_Object Qkrbv41; #endif #ifdef LDAP_AUTH_KRBV42 -static Lisp_Object Qkrbv42; +extern Lisp_Object Qkrbv42; #endif /* Deref policy */ -static Lisp_Object Qnever, Qalways, Qfind; +extern Lisp_Object Qnever, Qalways, Qfind; +/* Connection status */ +extern Lisp_Object Qopen, Qclosed; static Lisp_Object Qldapp; @@ -150,8 +150,24 @@ return ldap; } +static void +finalize_ldap (void *header, int for_disksave) +{ + struct Lisp_LDAP *ldap = (struct Lisp_LDAP *) header; + + if (for_disksave) + { + Lisp_Object obj; + XSETLDAP (obj, ldap); + signal_simple_error + ("Can't dump an emacs containing LDAP objects", obj); + } + if (EQ (ldap->status_symbol, Qopen)) + ldap_unbind (ldap->ld); +} + DEFINE_LRECORD_IMPLEMENTATION ("ldap", ldap, - mark_ldap, print_ldap, NULL, + mark_ldap, print_ldap, finalize_ldap, NULL, NULL, struct Lisp_LDAP); @@ -320,7 +336,7 @@ lisp_strerror (errno)); -#if HAVE_LDAP_SET_OPTION +#ifdef HAVE_LDAP_SET_OPTION if (ldap_set_option (ld, LDAP_OPT_DEREF, (void *)&ldap_deref) != LDAP_SUCCESS) signal_ldap_error (ld); if (ldap_set_option (ld, LDAP_OPT_TIMELIMIT, @@ -331,16 +347,16 @@ signal_ldap_error (ld); if (ldap_set_option (ld, LDAP_OPT_REFERRALS, LDAP_OPT_ON) != LDAP_SUCCESS) signal_ldap_error (ld); -#else /* HAVE_LDAP_SET_OPTION */ +#else /* not HAVE_LDAP_SET_OPTION */ ld->ld_deref = ldap_deref; ld->ld_timelimit = ldap_timelimit; ld->ld_sizelimit = ldap_sizelimit; #ifdef LDAP_REFERRALS ld->ld_options = LDAP_OPT_REFERRALS; -#else /* LDAP_REFERRALS */ +#else /* not LDAP_REFERRALS */ ld->ld_options = 0; -#endif /* LDAP_REFERRALS */ -#endif /* HAVE_LDAP_SET_OPTION */ +#endif /* not LDAP_REFERRALS */ +#endif /* not HAVE_LDAP_SET_OPTION */ /* ldap_bind_s calls select and may be wedged by spurious signals */ slow_down_interrupts (); @@ -364,18 +380,14 @@ DEFUN ("ldap-close", Fldap_close, 1, 1, 0, /* Close an LDAP connection. -Return t if the connection was actually closed or nil if -it was already closed before the call */ (ldap)) { - CHECK_LDAP (ldap); - if ( EQ ((XLDAP (ldap))->status_symbol, Qopen) ) - { - ldap_unbind ((XLDAP (ldap))->ld); - (XLDAP (ldap))->status_symbol = Qclosed; - return Qt; - } + struct Lisp_LDAP *lldap; + CHECK_LIVE_LDAP (ldap); + lldap = XLDAP (ldap); + ldap_unbind (lldap->ld); + lldap->status_symbol = Qclosed; return Qnil; } @@ -562,8 +574,9 @@ { signal_ldap_error (ld); } - - if ((rc = ldap_result2error (ld, unwind.res, 0)) != LDAP_SUCCESS) + rc = ldap_result2error (ld, unwind.res, 0); + if ((rc != LDAP_SUCCESS) && + (rc != LDAP_SIZELIMIT_EXCEEDED)) { signal_ldap_error (ld); }
--- a/src/eldap.h Mon Aug 13 10:31:30 2007 +0200 +++ b/src/eldap.h Mon Aug 13 10:32:22 2007 +0200 @@ -29,8 +29,6 @@ #else /* HAVE_LDAP */ -extern Lisp_Object Qopen, Qclosed; - struct Lisp_LDAP; DECLARE_LRECORD (ldap, struct Lisp_LDAP); @@ -39,6 +37,7 @@ #define LDAPP(x) RECORDP (x, ldap) #define GC_LDAPP(x) GC_RECORDP (x, ldap) #define CHECK_LDAP(x) CHECK_RECORD (x, ldap) +#define CONCHECK_LDAP(x) CONCHECK_RECORD (x, ldap) #define LDAP_LIVE_P(x) (EQ (x->status_symbol, Qopen)) #define CHECK_LIVE_LDAP(ldap) do { \ @@ -47,8 +46,8 @@ signal_simple_error ("Attempting to access closed LDAP connection", \ ldap); \ } while (0) - - + + #ifdef emacs
--- a/src/emacs.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/emacs.c Mon Aug 13 10:32:22 2007 +0200 @@ -131,6 +131,7 @@ Lisp_Object Vinstallation_directory; #endif +Lisp_Object Vemacs_program_name, Vemacs_program_version; Lisp_Object Vexec_path; Lisp_Object Vexec_directory, Vconfigure_exec_directory; Lisp_Object Vlisp_directory, Vconfigure_lisp_directory; @@ -239,19 +240,19 @@ { fatal_error_in_progress = dont_check_for_quit = 1; shut_down_emacs (sig, Qnil); - stderr_out("\nLisp backtrace follows:\n\n"); - Fbacktrace(Qexternal_debugging_output, Qt); + stderr_out ("\nLisp backtrace follows:\n\n"); + Fbacktrace (Qexternal_debugging_output, Qt); # if 0 /* This is evil, rarely useful, and causes grief in some cases. */ /* Check for Sun-style stack printing via /proc */ { CONST char *pstack = "/usr/proc/bin/pstack"; - if (access(pstack, X_OK) == 0) + if (access (pstack, X_OK) == 0) { char buf[100]; - stderr_out("\nC backtrace follows:\n" + stderr_out ("\nC backtrace follows:\n" "(A real debugger may provide better information)\n\n"); - sprintf(buf, "%s %d >&2", pstack, (int)getpid()); - system(buf); + sprintf (buf, "%s %d >&2", pstack, (int)getpid()); + system (buf); } } # endif @@ -903,7 +904,7 @@ syms_of_frame (); syms_of_general (); syms_of_glyphs (); - syms_of_glyphs_read (); + syms_of_glyphs_eimage (); #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) syms_of_gui (); #endif @@ -1149,7 +1150,7 @@ called before the any calls to the other macros. */ image_instantiator_format_create (); - image_instantiator_format_create_glyphs_read (); + image_instantiator_format_create_glyphs_eimage (); #ifdef HAVE_X_WINDOWS image_instantiator_format_create_glyphs_x (); #endif /* HAVE_X_WINDOWS */ @@ -1268,7 +1269,7 @@ vars_of_font_lock (); vars_of_frame (); vars_of_glyphs (); - vars_of_glyphs_read (); + vars_of_glyphs_eimage (); #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) vars_of_gui (); #endif @@ -2529,8 +2530,8 @@ #endif /* USE_ASSERTIONS */ #ifdef QUANTIFY -DEFUN ("quantify-start-recording-data", - Fquantify_start_recording_data, 0, 0, 0, /* +DEFUN ("quantify-start-recording-data", Fquantify_start_recording_data, + 0, 0, 0, /* Start recording Quantify data. */ ()) @@ -2539,8 +2540,8 @@ return Qnil; } -DEFUN ("quantify-stop-recording-data", - Fquantify_stop_recording_data, 0, 0, 0, /* +DEFUN ("quantify-stop-recording-data", Fquantify_stop_recording_data, + 0, 0, 0, /* Stop recording Quantify data. */ ()) @@ -2772,6 +2773,22 @@ void complex_vars_of_emacs (void) { + /* This is all related to path searching. */ + + DEFVAR_LISP ("emacs-program-name", &Vemacs_program_name /* +*Name of the Emacs variant. +For example, this may be \"xemacs\" or \"infodock\". +This is mainly meant for use in path searching. +*/ ); + Vemacs_program_name = build_string ((char *) PATH_PROGNAME); + + DEFVAR_LISP ("emacs-program-version", &Vemacs_program_version /* +*Version of the Emacs variant. +This typically has the form XX.XX[-bXX]. +This is mainly meant for use in path searching. +*/ ); + Vemacs_program_version = build_string ((char *) PATH_VERSION); + DEFVAR_LISP ("exec-path", &Vexec_path /* *List of directories to search programs to run in subprocesses. Each element is a string (directory name) or nil (try default directory).
--- a/src/event-msw.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/event-msw.c Mon Aug 13 10:32:22 2007 +0200 @@ -574,27 +574,6 @@ } static int -ntpipe_shove_flusher (Lstream *stream) -{ - struct ntpipe_shove_stream* s = NTPIPE_SHOVE_STREAM_DATA(stream); - int i; - - if (s->error_p) - return -1; - - /* We do not want to be blocked forever. Instead, we wait - about 0.5 second for output to finish. If this does - not help, we just return flush failure. */ - for (i = 0; i < MAX_FLUSH_TIME / 50; ++i) - { - if (s->idle_p) - return 0; - Sleep (50); - } - return -1; -} - -static int ntpipe_shove_closer (Lstream *stream) { struct ntpipe_shove_stream* s = NTPIPE_SHOVE_STREAM_DATA(stream); @@ -622,7 +601,6 @@ init_shove_stream (void) { LSTREAM_HAS_METHOD (ntpipe_shove, writer); - LSTREAM_HAS_METHOD (ntpipe_shove, flusher); LSTREAM_HAS_METHOD (ntpipe_shove, was_blocked_p); LSTREAM_HAS_METHOD (ntpipe_shove, closer); } @@ -1613,7 +1591,7 @@ if (!NILP(btext)) { - strncpy (tttext->szText, XSTRING_DATA (btext), 80); + strncpy (tttext->szText, XSTRING_DATA (btext), XSTRING_LENGTH(btext)+1); tttext->lpszText=tttext->szText; } #if 0
--- a/src/event-stream.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/event-stream.c Mon Aug 13 10:32:22 2007 +0200 @@ -557,15 +557,15 @@ Let's hope it doesn't. I think the code here is fairly clean and doesn't do this. */ emacs_is_blocking = 1; -#if 0 - /* Do this if the poll-for-quit timer seems to be taking too - much CPU time when idle ... */ + + /* Do not poll for quit while blocking, because this prevents idle + XEmacs from swapping out from memory */ reset_poll_for_quit (); -#endif + event_stream->next_event_cb (event); -#if 0 + init_poll_for_quit (); -#endif + emacs_is_blocking = 0; #ifdef DEBUG_XEMACS @@ -1718,8 +1718,9 @@ run_hook (Qdeselect_frame_hook); } -/* When select-frame is called, we want to tell the window system that - the focus should be changed to point to the new frame. However, +/* When select-frame is called and focus_follows_mouse is false, we want + to tell the window system that the focus should be changed to point to + the new frame. However, sometimes Lisp functions will temporarily change the selected frame (e.g. to call a function that operates on the selected frame), and it's annoying if this focus-change happens exactly when @@ -1729,9 +1730,17 @@ an event from the user. To do this, we keep track of the frame where the window-manager focus lies on, and just before waiting for user events, check the currently selected frame and change - the focus as necessary. */ - -static void + the focus as necessary. + + On the other hand, if focus_follows_mouse is true, we need to switch the + selected frame back to the frame with window manager focus just before we + execute the next command in Fcommand_loop_1, just as the selected buffer is + reverted after a set-buffer. + + Both cases are handled by this function. It must be called as appropriate + from these two places, depending on the value of focus_follows_mouse. */ + +void investigate_frame_change (void) { Lisp_Object devcons, concons; @@ -1751,14 +1760,46 @@ in emacs_handle_focus_change_final() is based on the _FOR_HOOKS value, we need to do so too. */ if (!NILP (sel_frame) && - !focus_follows_mouse && !EQ (DEVICE_FRAME_THAT_OUGHT_TO_HAVE_FOCUS (d), sel_frame) && !NILP (DEVICE_FRAME_WITH_FOCUS_FOR_HOOKS (d)) && !EQ (DEVICE_FRAME_WITH_FOCUS_FOR_HOOKS (d), sel_frame)) { - /* prevent us from issuing the same request more than once */ - DEVICE_FRAME_THAT_OUGHT_TO_HAVE_FOCUS (d) = sel_frame; - MAYBE_DEVMETH (d, focus_on_frame, (XFRAME (sel_frame))); + /* At this point, we know that the frame has been changed. Now, if + * focus_follows_mouse is not set, we finish off the frame change, + * so that user events will now come from the new frame. Otherwise, + * if focus_follows_mouse is set, no gratuitous frame changing + * should take place. Set the focus back to the frame which was + * originally selected for user input. + */ + if (!focus_follows_mouse) + { + /* prevent us from issuing the same request more than once */ + DEVICE_FRAME_THAT_OUGHT_TO_HAVE_FOCUS (d) = sel_frame; + MAYBE_DEVMETH (d, focus_on_frame, (XFRAME (sel_frame))); + } + else + { + Lisp_Object old_frame = Qnil; + + /* #### Do we really want to check OUGHT ?? + * It seems to make sense, though I have never seen us + * get here and have it be non-nil. + */ + if (FRAMEP (DEVICE_FRAME_THAT_OUGHT_TO_HAVE_FOCUS (d))) + old_frame = DEVICE_FRAME_THAT_OUGHT_TO_HAVE_FOCUS (d); + else if (FRAMEP (DEVICE_FRAME_WITH_FOCUS_FOR_HOOKS (d))) + old_frame = DEVICE_FRAME_WITH_FOCUS_FOR_HOOKS (d); + + /* #### Can old_frame ever be NIL? play it safe.. */ + if (!NILP (old_frame)) + { + /* Fselect_frame is not really the right thing: it frobs the + * buffer stack. But there's no easy way to do the right + * thing, and this code already had this problem anyway. + */ + Fselect_frame (old_frame); + } + } } } } @@ -1932,7 +1973,12 @@ assert (NILP (XEVENT_NEXT (target_event))); GCPRO1 (target_event); - investigate_frame_change (); + + /* When focus_follows_mouse is nil, if a frame change took place, we need + * to actually switch window manager focus to the selected window now. + */ + if (!focus_follows_mouse) + investigate_frame_change (); if (allow_queued && !NILP (command_event_queue)) {
--- a/src/events.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/events.c Mon Aug 13 10:32:22 2007 +0200 @@ -478,7 +478,10 @@ return event; } else if (EQ (type, Qkey_press)) - e->event_type = key_press_event; + { + e->event_type = key_press_event; + e->event.key.keysym = Qunbound; + } else if (EQ (type, Qbutton_press)) e->event_type = button_press_event; else if (EQ (type, Qbutton_release)) @@ -700,7 +703,8 @@ switch (e->event_type) { case key_press_event: - if (!(SYMBOLP (e->event.key.keysym) || CHARP (e->event.key.keysym))) + if (UNBOUNDP (e->event.key.keysym) + || !(SYMBOLP (e->event.key.keysym) || CHARP (e->event.key.keysym))) error ("Undefined key for keypress event"); break; case button_press_event:
--- a/src/extents.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/extents.c Mon Aug 13 10:32:22 2007 +0200 @@ -4748,8 +4748,8 @@ } /* Do we need a lisp-level function ? */ -DEFUN ("set-extent-initial-redisplay-function", - Fset_extent_initial_redisplay_function, 2,2,0,/* +DEFUN ("set-extent-initial-redisplay-function", Fset_extent_initial_redisplay_function, + 2,2,0,/* Note: This feature is experimental! Set initial-redisplay-function of EXTENT to the function @@ -4984,7 +4984,7 @@ (extent)) { EXTENT e = decode_extent (extent, 0); - return glyph_layout_to_symbol (extent_begin_glyph_layout (e)); + return glyph_layout_to_symbol ((glyph_layout) extent_begin_glyph_layout (e)); } DEFUN ("extent-end-glyph-layout", Fextent_end_glyph_layout, 1, 1, 0, /* @@ -4994,7 +4994,7 @@ (extent)) { EXTENT e = decode_extent (extent, 0); - return glyph_layout_to_symbol (extent_end_glyph_layout (e)); + return glyph_layout_to_symbol ((glyph_layout) extent_end_glyph_layout (e)); } DEFUN ("set-extent-priority", Fset_extent_priority, 2, 2, 0, /* @@ -5339,7 +5339,7 @@ { EXTENT e, anc; Lisp_Object result, face, anc_obj; - enum glyph_layout layout; + glyph_layout layout; CHECK_EXTENT (extent); e = XEXTENT (extent); @@ -5359,14 +5359,14 @@ if (!NILP (face = Fextent_mouse_face (anc_obj))) result = cons3 (Qmouse_face, face, result); - if ((layout = extent_begin_glyph_layout (anc)) != GL_TEXT) + if ((layout = (glyph_layout) extent_begin_glyph_layout (anc)) != GL_TEXT) { Lisp_Object sym = glyph_layout_to_symbol (layout); result = cons3 (Qglyph_layout, sym, result); /* compatibility */ result = cons3 (Qbegin_glyph_layout, sym, result); } - if ((layout = extent_end_glyph_layout (anc)) != GL_TEXT) + if ((layout = (glyph_layout) extent_end_glyph_layout (anc)) != GL_TEXT) result = cons3 (Qend_glyph_layout, glyph_layout_to_symbol (layout), result); if (!NILP (extent_end_glyph (anc))) @@ -6275,8 +6275,8 @@ return prop; } -DEFUN ("put-nonduplicable-text-property", - Fput_nonduplicable_text_property, 4, 5, 0, /* +DEFUN ("put-nonduplicable-text-property", Fput_nonduplicable_text_property, + 4, 5, 0, /* Adds the given property/value to all characters in the specified region. The property is conceptually attached to the characters rather than the region, however the properties will not be copied when the characters @@ -6321,8 +6321,8 @@ } -DEFUN ("add-nonduplicable-text-properties", - Fadd_nonduplicable_text_properties, 3, 4, 0, /* +DEFUN ("add-nonduplicable-text-properties", Fadd_nonduplicable_text_properties, + 3, 4, 0, /* Add nonduplicable properties to the characters from START to END. \(The properties will not be copied when the characters are copied.) The third argument PROPS is a property list specifying the property values @@ -6384,8 +6384,8 @@ the rest of the put-text-prop code here, I moved this as well for completeness. */ -DEFUN ("text-prop-extent-paste-function", - Ftext_prop_extent_paste_function, 3, 3, 0, /* +DEFUN ("text-prop-extent-paste-function", Ftext_prop_extent_paste_function, + 3, 3, 0, /* Used as the `paste-function' property of `text-prop' extents. */ (extent, from, to)) @@ -6414,7 +6414,8 @@ to use it in connection with invisible extents (at least currently). If this changes, consider moving this back into Lisp. */ -DEFUN ("next-single-property-change", Fnext_single_property_change, 2, 4, 0, /* +DEFUN ("next-single-property-change", Fnext_single_property_change, + 2, 4, 0, /* Return the position of next property change for a specific property. Scans characters forward from POS till it finds a change in the PROP property, then returns the position of the change. The optional third @@ -6480,8 +6481,8 @@ /* See comment on previous function about why this is written in C. */ -DEFUN ("previous-single-property-change", - Fprevious_single_property_change, 2, 4, 0, /* +DEFUN ("previous-single-property-change", Fprevious_single_property_change, + 2, 4, 0, /* Return the position of next property change for a specific property. Scans characters backward from POS till it finds a change in the PROP property, then returns the position of the change. The optional third
--- a/src/fileio.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/fileio.c Mon Aug 13 10:32:22 2007 +0200 @@ -133,6 +133,8 @@ Lisp_Object Qcompute_buffer_file_truename; +EXFUN (Frunning_temacs_p, 0); + /* signal a file error when errno contains a meaningful value. */ DOESNT_RETURN @@ -260,9 +262,9 @@ } static Lisp_Object -close_stream_unwind (Lisp_Object stream) +delete_stream_unwind (Lisp_Object stream) { - Lstream_close (XLSTREAM (stream)); + Lstream_delete (XLSTREAM (stream)); return Qnil; } @@ -716,18 +718,26 @@ if (!count_initialized_p) { count = (unsigned)time (NULL); - count_initialized_p = 1; + /* Dumping temacs with a non-zero count_initialized_p wouldn't + make much sense. */ + if (NILP (Frunning_temacs_p ())) + count_initialized_p = 1; } while (1) { struct stat ignored; - unsigned num = count++; + unsigned num = count; p[0] = tbl[num & 63], num >>= 6; p[1] = tbl[num & 63], num >>= 6; p[2] = tbl[num & 63], num >>= 6; + /* Poor man's congruential RN generator. Replace with ++count + for debugging. */ + count += 25229; + count %= 225307; + if (stat ((CONST char *) data, &ignored) < 0) { /* We want to return only if errno is ENOENT. */ @@ -738,7 +748,7 @@ can do. The alternatives are to return nil, which is as bad as (and in many cases worse than) throwing the error, or to ignore the error, which will likely result - in looping through 262144 stat's, which is not only + in looping through 225307 stat's, which is not only dog-slow, but also useless since it will fallback to the errow below, anyway. */ report_file_error ("Cannot create temporary name for prefix", @@ -749,6 +759,7 @@ signal_simple_error ("Cannot create temporary name for prefix", prefix); RETURN_NOT_REACHED (Qnil); } + DEFUN ("expand-file-name", Fexpand_file_name, 1, 2, 0, /* Convert filename NAME to absolute, and canonicalize it. @@ -2634,7 +2645,8 @@ /* #define READ_BUF_SIZE (2 << 16) */ #define READ_BUF_SIZE (1 << 15) -DEFUN ("insert-file-contents-internal", Finsert_file_contents_internal, 1, 7, 0, /* +DEFUN ("insert-file-contents-internal", Finsert_file_contents_internal, + 1, 7, 0, /* Insert contents of file FILENAME after point; no coding-system frobbing. This function is identical to `insert-file-contents' except for the handling of the CODESYS and USED-CODESYS arguments under @@ -2948,7 +2960,7 @@ Lstream_set_buffering (XLSTREAM (stream), LSTREAM_BLOCKN_BUFFERED, 65536); #endif /* FILE_CODING */ - record_unwind_protect (close_stream_unwind, stream); + record_unwind_protect (delete_stream_unwind, stream); /* No need to limit the amount of stuff we attempt to read. (It would be incorrect, anyway, when Mule is enabled.) Instead, the limiting @@ -3320,7 +3332,8 @@ but who knows about all the other machines with NFS?) */ /* On VMS and APOLLO, must do the stat after the close since closing changes the modtime. */ -#if 1 /* !defined (VMS) && !defined (APOLLO) */ + /* As it does on Windows too - kkm */ +#if !defined (WINDOWSNT) /* !defined (VMS) && !defined (APOLLO) */ fstat (desc, &st); #endif @@ -3338,8 +3351,7 @@ unbind_to (speccount, Qnil); } - -#if 0 /* defined (VMS) || defined (APOLLO) */ +#if defined (WINDOWSNT) /* defined (VMS) || defined (APOLLO) */ stat ((char *) XSTRING_DATA (fn), &st); #endif @@ -3401,7 +3413,7 @@ */ (a, b)) { - return Flss (Fcar (a), Fcar (b)); + return arithcompare (Fcar (a), Fcar (b), arith_less); } /* Heh heh heh, let's define this too, just to aggravate the person who @@ -3411,7 +3423,7 @@ */ (a, b)) { - return Flss (Fcdr (a), Fcdr (b)); + return arithcompare (Fcdr (a), Fcdr (b), arith_less); } /* Build the complete list of annotations appropriate for writing out
--- a/src/font-lock.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/font-lock.c Mon Aug 13 10:32:22 2007 +0200 @@ -661,8 +661,8 @@ return context_to_symbol (context_cache.context); } -DEFUN ("buffer-syntactic-context-depth", - Fbuffer_syntactic_context_depth, 0, 1, 0, /* +DEFUN ("buffer-syntactic-context-depth", Fbuffer_syntactic_context_depth, + 0, 1, 0, /* Return the depth within all parenthesis-syntax delimiters at point. If BUFFER is nil or omitted, the current buffer is assumed. WARNING: this may alter match-data.
--- a/src/frame-msw.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/frame-msw.c Mon Aug 13 10:32:22 2007 +0200 @@ -643,8 +643,10 @@ { Lisp_Object frame; XSETFRAME (frame, frm); - Fset_frame_size (frame, FRAME_MSWINDOWS_CHARWIDTH (frm), - FRAME_MSWINDOWS_CHARHEIGHT (frm), Qnil); + Fset_frame_size (frame, + make_int(FRAME_MSWINDOWS_CHARWIDTH (frm)), + make_int(FRAME_MSWINDOWS_CHARHEIGHT (frm)), + Qnil); } }
--- a/src/frame.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/frame.c Mon Aug 13 10:32:22 2007 +0200 @@ -416,6 +416,7 @@ signal_simple_error (". not allowed in frame names", name); f = allocate_frame_core (device); + XSETFRAME (frame, f); specbind (Qframe_being_created, name); f->name = name; @@ -445,7 +446,6 @@ else signal_simple_error ("Invalid value for `minibuffer'", minibuf); - XSETFRAME (frame, f); update_frame_window_mirror (f); if (initialized) @@ -667,6 +667,13 @@ Note that this does not actually cause the window-system focus to be set to this frame, or the select-frame-hook or deselect-frame-hook to be run, until the next time that XEmacs is waiting for an event. + +Also note that when focus-follows-mouse is non-nil, the frame +selection is temporary and is reverted when the current command +terminates, much like the buffer selected by `set-buffer'. In order +to effect a permanent focus change in this case, bind +focus-follows-mouse to nil, select the frame you want, and do +a (sit-for 0) within the scope of the binding. */ (frame)) { @@ -1511,11 +1518,14 @@ } double_break_1: - if (!called_from_delete_device) +#if 0 + /* The following test is degenerate FALSE */ + if (called_from_delete_device < 0) /* then we're being called from delete-console, and we shouldn't try to find another default-minibuffer frame for the console. */ con->default_minibuffer_frame = Qnil; +#endif /* If we've deleted this console's default_minibuffer_frame, try to find another one. Prefer minibuffer-only frames, but also notice @@ -2741,23 +2751,34 @@ } /* when frame_conversion_internal() calculated the number of rows/cols - in the frame, the toolbar sizes were subtracted out. However, - if the corresponding toolbar is not actually visible in the - selected window, then the extra space needs to be filled in - with rows/cols. */ - if (!FRAME_REAL_TOP_TOOLBAR_VISIBLE (f)) - new_pixheight += FRAME_THEORETICAL_TOP_TOOLBAR_HEIGHT (f) + - 2 * FRAME_THEORETICAL_TOP_TOOLBAR_BORDER_WIDTH (f); - if (!FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f)) - new_pixheight += FRAME_THEORETICAL_BOTTOM_TOOLBAR_HEIGHT (f) + - 2 * FRAME_THEORETICAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f); - if (!FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f)) - new_pixwidth += FRAME_THEORETICAL_LEFT_TOOLBAR_WIDTH (f) + - 2 * FRAME_THEORETICAL_LEFT_TOOLBAR_BORDER_WIDTH (f); - if (!FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f)) - new_pixwidth += FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH (f) + - 2 * FRAME_THEORETICAL_RIGHT_TOOLBAR_BORDER_WIDTH (f); - + in the frame, the theoretical toolbar sizes were subtracted out. + The caluclations below adjust for real toolbar height/width in + frame, which may be different from frame spec, taking the above + fact into account */ + new_pixheight += + + FRAME_THEORETICAL_TOP_TOOLBAR_HEIGHT (f) + + 2 * FRAME_THEORETICAL_TOP_TOOLBAR_BORDER_WIDTH (f) + - FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) + - 2 * FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH (f); + + new_pixheight += + + FRAME_THEORETICAL_BOTTOM_TOOLBAR_HEIGHT (f) + + 2 * FRAME_THEORETICAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f) + - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) + - 2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f); + + new_pixwidth += + + FRAME_THEORETICAL_LEFT_TOOLBAR_WIDTH (f) + + 2 * FRAME_THEORETICAL_LEFT_TOOLBAR_BORDER_WIDTH (f) + - FRAME_REAL_LEFT_TOOLBAR_WIDTH (f) + - 2 * FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH (f); + + new_pixwidth += + + FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH (f) + + 2 * FRAME_THEORETICAL_RIGHT_TOOLBAR_BORDER_WIDTH (f) + - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) + - 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f); + /* Adjust the width for the end glyph which may be a different width than the default character width. */ {
--- a/src/general.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/general.c Mon Aug 13 10:32:22 2007 +0200 @@ -34,21 +34,24 @@ Lisp_Object Qactually_requested; Lisp_Object Qafter; Lisp_Object Qall; +Lisp_Object Qalways; Lisp_Object Qand; Lisp_Object Qassoc; Lisp_Object Qat; +Lisp_Object Qauth; Lisp_Object Qautodetect; -Lisp_Object Qundecided; Lisp_Object Qbad_variable; +Lisp_Object Qbase; Lisp_Object Qbefore; Lisp_Object Qbinary; +Lisp_Object Qbinddn; Lisp_Object Qblack; Lisp_Object Qboolean; Lisp_Object Qbottom; Lisp_Object Qbuffer; Lisp_Object Qbutton; +Lisp_Object Qcase; Lisp_Object Qcategory; -Lisp_Object Qcase; Lisp_Object Qchannel; Lisp_Object Qchar; Lisp_Object Qcharacter; @@ -63,6 +66,7 @@ Lisp_Object Qdefault; Lisp_Object Qdelete; Lisp_Object Qdelq; +Lisp_Object Qderef; Lisp_Object Qdevice; Lisp_Object Qdimension; Lisp_Object Qdisplay; @@ -71,11 +75,12 @@ Lisp_Object Qdynarr_overhead; Lisp_Object Qempty; Lisp_Object Qeq; +Lisp_Object Qeql; Lisp_Object Qequal; -Lisp_Object Qeql; Lisp_Object Qeval; Lisp_Object Qextents; Lisp_Object Qface; +Lisp_Object Qfind; Lisp_Object Qfont; Lisp_Object Qframe; Lisp_Object Qfunction; @@ -95,6 +100,8 @@ Lisp_Object Qkey_assoc; Lisp_Object Qkeyboard; Lisp_Object Qkeymap; +Lisp_Object Qkrbv41; +Lisp_Object Qkrbv42; Lisp_Object Qleft; Lisp_Object Qlist; Lisp_Object Qmagic; @@ -109,17 +116,26 @@ Lisp_Object Qmotion; Lisp_Object Qmswindows; Lisp_Object Qname; +Lisp_Object Qnever; Lisp_Object Qnone; Lisp_Object Qnot; Lisp_Object Qnothing; Lisp_Object Qnotice; Lisp_Object Qobject; +Lisp_Object Qold_assoc; +Lisp_Object Qold_delete; +Lisp_Object Qold_delq; +Lisp_Object Qold_rassoc; +Lisp_Object Qold_rassq; +Lisp_Object Qonelevel; Lisp_Object Qonly; Lisp_Object Qor; Lisp_Object Qother; +Lisp_Object Qpasswd; Lisp_Object Qpath; Lisp_Object Qpointer; Lisp_Object Qpopup; +Lisp_Object Qport; Lisp_Object Qprint; Lisp_Object Qprocess; Lisp_Object Qprovide; @@ -130,29 +146,28 @@ Lisp_Object Qreturn; Lisp_Object Qreverse; Lisp_Object Qright; -Lisp_Object Qold_assoc; -Lisp_Object Qold_delete; -Lisp_Object Qold_delq; -Lisp_Object Qold_rassoc; -Lisp_Object Qold_rassq; Lisp_Object Qsearch; Lisp_Object Qsignal; Lisp_Object Qsimple; Lisp_Object Qsize; +Lisp_Object Qsizelimit; Lisp_Object Qspace; Lisp_Object Qspecifier; Lisp_Object Qstream; Lisp_Object Qstring; +Lisp_Object Qsubtree; Lisp_Object Qsymbol; Lisp_Object Qsyntax; Lisp_Object Qtest; Lisp_Object Qtext; +Lisp_Object Qtimelimit; Lisp_Object Qtimeout; Lisp_Object Qtimestamp; Lisp_Object Qtoolbar; Lisp_Object Qtop; Lisp_Object Qtty; Lisp_Object Qtype; +Lisp_Object Qundecided; Lisp_Object Qundefined; Lisp_Object Qunimplemented; Lisp_Object Qvalue_assoc; @@ -171,14 +186,17 @@ defsymbol (&Qactually_requested, "actually-requested"); defsymbol (&Qafter, "after"); defsymbol (&Qall, "all"); + defsymbol (&Qalways, "always"); defsymbol (&Qand, "and"); defsymbol (&Qassoc, "assoc"); defsymbol (&Qat, "at"); + defsymbol (&Qauth, "auth"); defsymbol (&Qautodetect, "autodetect"); - defsymbol (&Qundecided, "undecided"); defsymbol (&Qbad_variable, "bad-variable"); + defsymbol (&Qbase, "base"); defsymbol (&Qbefore, "before"); defsymbol (&Qbinary, "binary"); + defsymbol (&Qbinddn, "binddn"); defsymbol (&Qblack, "black"); defsymbol (&Qboolean, "boolean"); defsymbol (&Qbottom, "bottom"); @@ -200,6 +218,7 @@ defsymbol (&Qdefault, "default"); defsymbol (&Qdelete, "delete"); defsymbol (&Qdelq, "delq"); + defsymbol (&Qderef, "deref"); defsymbol (&Qdevice, "device"); defsymbol (&Qdimension, "dimension"); defsymbol (&Qdisplay, "display"); @@ -208,11 +227,12 @@ defsymbol (&Qdynarr_overhead, "dynarr-overhead"); defsymbol (&Qempty, "empty"); defsymbol (&Qeq, "eq"); + defsymbol (&Qeql, "eql"); defsymbol (&Qequal, "equal"); - defsymbol (&Qeql, "eql"); defsymbol (&Qeval, "eval"); defsymbol (&Qextents, "extents"); defsymbol (&Qface, "face"); + defsymbol (&Qfind, "find"); defsymbol (&Qfont, "font"); defsymbol (&Qframe, "frame"); defsymbol (&Qfunction, "function"); @@ -225,13 +245,15 @@ defsymbol (&Qid, "id"); defsymbol (&Qimage, "image"); defsymbol (&Qinfo, "info"); + defsymbol (&Qinherit, "inherit"); defsymbol (&Qinteger, "integer"); - defsymbol (&Qinherit, "inherit"); defsymbol (&Qinternal, "internal"); defsymbol (&Qkey, "key"); defsymbol (&Qkey_assoc, "key-assoc"); defsymbol (&Qkeyboard, "keyboard"); defsymbol (&Qkeymap, "keymap"); + defsymbol (&Qkrbv41, "krbv41"); + defsymbol (&Qkrbv42, "krbv42"); defsymbol (&Qleft, "left"); defsymbol (&Qlist, "list"); defsymbol (&Qmagic, "magic"); @@ -246,17 +268,26 @@ defsymbol (&Qmotion, "motion"); defsymbol (&Qmswindows, "mswindows"); defsymbol (&Qname, "name"); + defsymbol (&Qnever, "never"); defsymbol (&Qnone, "none"); defsymbol (&Qnot, "not"); defsymbol (&Qnothing, "nothing"); defsymbol (&Qnotice, "notice"); defsymbol (&Qobject, "object"); + defsymbol (&Qold_assoc, "old-assoc"); + defsymbol (&Qold_delete, "old-delete"); + defsymbol (&Qold_delq, "old-delq"); + defsymbol (&Qold_rassoc, "old-rassoc"); + defsymbol (&Qold_rassq, "old-rassq"); + defsymbol (&Qonelevel, "onelevel"); defsymbol (&Qonly, "only"); defsymbol (&Qor, "or"); defsymbol (&Qother, "other"); + defsymbol (&Qpasswd, "passwd"); defsymbol (&Qpath, "path"); defsymbol (&Qpointer, "pointer"); defsymbol (&Qpopup, "popup"); + defsymbol (&Qport, "port"); defsymbol (&Qprint, "print"); defsymbol (&Qprocess, "process"); defsymbol (&Qprovide, "provide"); @@ -266,29 +297,28 @@ defsymbol (&Qreturn, "return"); defsymbol (&Qreverse, "reverse"); defsymbol (&Qright, "right"); - defsymbol (&Qold_assoc, "old-assoc"); - defsymbol (&Qold_delete, "old-delete"); - defsymbol (&Qold_delq, "old-delq"); - defsymbol (&Qold_rassoc, "old-rassoc"); - defsymbol (&Qold_rassq, "old-rassq"); defsymbol (&Qsearch, "search"); defsymbol (&Qsignal, "signal"); defsymbol (&Qsimple, "simple"); defsymbol (&Qsize, "size"); + defsymbol (&Qsizelimit, "sizelimit"); defsymbol (&Qspace, "space"); defsymbol (&Qspecifier, "specifier"); defsymbol (&Qstream, "stream"); defsymbol (&Qstring, "string"); + defsymbol (&Qsubtree, "subtree"); defsymbol (&Qsymbol, "symbol"); defsymbol (&Qsyntax, "syntax"); defsymbol (&Qtest, "test"); defsymbol (&Qtext, "text"); + defsymbol (&Qtimelimit, "timelimit"); defsymbol (&Qtimeout, "timeout"); defsymbol (&Qtimestamp, "timestamp"); defsymbol (&Qtoolbar, "toolbar"); defsymbol (&Qtop, "top"); defsymbol (&Qtty, "tty"); defsymbol (&Qtype, "type"); + defsymbol (&Qundecided, "undecided"); defsymbol (&Qundefined, "undefined"); defsymbol (&Qunimplemented, "unimplemented"); defsymbol (&Qvalue_assoc, "value-assoc");
--- a/src/getloadavg.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/getloadavg.c Mon Aug 13 10:32:22 2007 +0200 @@ -525,7 +525,7 @@ this function just can't work at all on this system. */ errno = 0; elem = -2; -#endif +#endif /* NO_GET_LOAD_AVG */ #if ! defined (LDAV_DONE) && defined (HAVE_KSTAT_H) && defined (HAVE_LIBKSTAT) #define LDAV_DONE @@ -546,7 +546,7 @@ if (nelem > countof (avestrings)) nelem = countof (avestrings); - kc = kstat_open(); + kc = kstat_open (); if (!kc) return -1; ksp = kstat_lookup (kc, "unix", 0, "system_misc"); @@ -568,7 +568,7 @@ kstat_close (kc); return -1; } - loadavg[elem] = (double)kn->value.ul/FSCALE; + loadavg[elem] = (double)kn->value.ul / FSCALE; } kstat_close (kc); #endif /* HAVE_KSTAT_H && HAVE_LIBKSTAT */ @@ -943,14 +943,7 @@ #define LDAV_DONE #endif /* !LDAV_DONE && LOAD_AVE_TYPE */ -#ifdef LDAV_DONE return elem; -#else - /* Set errno to zero to indicate that there was no particular error; - this function just can't work at all on this system. */ - errno = 0; - return -2; -#endif } #endif /* ! HAVE_GETLOADAVG */
--- a/src/glyphs-eimage.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/glyphs-eimage.c Mon Aug 13 10:32:22 2007 +0200 @@ -1252,12 +1252,12 @@ /************************************************************************/ void -syms_of_glyphs_read (void) +syms_of_glyphs_eimage (void) { } void -image_instantiator_format_create_glyphs_read (void) +image_instantiator_format_create_glyphs_eimage (void) { /* image-instantiator types */ #ifdef HAVE_JPEG @@ -1311,7 +1311,7 @@ } void -vars_of_glyphs_read (void) +vars_of_glyphs_eimage (void) { #ifdef HAVE_JPEG Fprovide (Qjpeg);
--- a/src/glyphs-msw.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/glyphs-msw.c Mon Aug 13 10:32:22 2007 +0200 @@ -1,5 +1,10 @@ /* mswindows-specific Lisp objects. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1993, 1994 Free Software Foundation, Inc. + Copyright (C) 1995 Board of Trustees, University of Illinois. + Copyright (C) 1995 Tinker Systems + Copyright (C) 1995, 1996 Ben Wing + Copyright (C) 1995 Sun Microsystems + Copyright (C) 1998 Andy Piper. This file is part of XEmacs. @@ -187,7 +192,7 @@ where the file might be located. Return a full pathname if found; otherwise, return Qnil. */ -Lisp_Object +static Lisp_Object mswindows_locate_pixmap_file (Lisp_Object name) { /* This function can GC if IN_REDISPLAY is false */ @@ -220,88 +225,6 @@ return found; } -#if 0 -/* If INSTANTIATOR refers to inline data, return Qnil. - If INSTANTIATOR refers to data in a file, return the full filename - if it exists; otherwise, return a cons of (filename). - - FILE_KEYWORD and DATA_KEYWORD are symbols specifying the - keywords used to look up the file and inline data, - respectively, in the instantiator. Normally these would - be Q_file and Q_data, but might be different for mask data. */ - -static Lisp_Object -potential_pixmap_file_instantiator (Lisp_Object instantiator, - Lisp_Object file_keyword, - Lisp_Object data_keyword) -{ - Lisp_Object file; - Lisp_Object data; - - assert (VECTORP (instantiator)); - - data = find_keyword_in_vector (instantiator, data_keyword); - file = find_keyword_in_vector (instantiator, file_keyword); - - if (!NILP (file) && NILP (data)) - { - Lisp_Object retval = locate_pixmap_file(file); - if (!NILP (retval)) - return retval; - else - return Fcons (file, Qnil); /* should have been file */ - } - - return Qnil; -} - -static Lisp_Object -simple_image_type_normalize (Lisp_Object inst, Lisp_Object console_type, - Lisp_Object image_type_tag) -{ - /* This function can call lisp */ - Lisp_Object file = Qnil; - struct gcpro gcpro1, gcpro2; - Lisp_Object alist = Qnil; - - GCPRO2 (file, alist); - - /* Now, convert any file data into inline data. At the end of this, - `data' will contain the inline data (if any) or Qnil, and `file' - will contain the name this data was derived from (if known) or - Qnil. - - Note that if we cannot generate any regular inline data, we - skip out. */ - - file = potential_pixmap_file_instantiator (inst, Q_file, Q_data); - - if (CONSP (file)) /* failure locating filename */ - signal_double_file_error ("Opening pixmap file", - "no such file or directory", - Fcar (file)); - - if (NILP (file)) /* no conversion necessary */ - RETURN_UNGCPRO (inst); - - alist = tagged_vector_to_alist (inst); - - { - Lisp_Object data = make_string_from_file (file); - alist = remassq_no_quit (Q_file, alist); - /* there can't be a :data at this point. */ - alist = Fcons (Fcons (Q_file, file), - Fcons (Fcons (Q_data, data), alist)); - } - - { - Lisp_Object result = alist_to_tagged_vector (image_type_tag, alist); - free_alist (alist); - RETURN_UNGCPRO (result); - } -} -#endif - /* Initialize an image instance from a bitmap @@ -453,8 +376,8 @@ /* PatBlt(hdcDst, 0, 0, size, size, WHITENESS);*/ x_icon.fIcon=TRUE; - x_icon.xHotspot=XIMAGE_INSTANCE_PIXMAP_HOTSPOT_X (image); - x_icon.yHotspot=XIMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (image); + x_icon.xHotspot=XINT (XIMAGE_INSTANCE_PIXMAP_HOTSPOT_X (image)); + x_icon.yHotspot=XINT (XIMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (image)); x_icon.hbmMask=mask; x_icon.hbmColor=bmp; @@ -512,15 +435,85 @@ **********************************************************************/ #ifdef HAVE_XPM + +struct color_symbol +{ + char* name; + COLORREF color; +}; + +static struct color_symbol* +extract_xpm_color_names (Lisp_Object device, + Lisp_Object domain, + Lisp_Object color_symbol_alist, + int* nsymbols) +{ + /* This function can GC */ + Lisp_Object rest; + Lisp_Object results = Qnil; + int i, j; + struct color_symbol *colortbl; + struct gcpro gcpro1, gcpro2; + + GCPRO2 (results, device); + + /* We built up results to be (("name" . #<color>) ...) so that if an + error happens we don't lose any malloc()ed data, or more importantly, + leave any pixels allocated in the server. */ + i = 0; + LIST_LOOP (rest, color_symbol_alist) + { + Lisp_Object cons = XCAR (rest); + Lisp_Object name = XCAR (cons); + Lisp_Object value = XCDR (cons); + if (NILP (value)) + continue; + if (STRINGP (value)) + value = + Fmake_color_instance + (value, device, encode_error_behavior_flag (ERROR_ME_NOT)); + else + { + assert (COLOR_SPECIFIERP (value)); + value = Fspecifier_instance (value, domain, Qnil, Qnil); + } + if (NILP (value)) + continue; + results = noseeum_cons (noseeum_cons (name, value), results); + i++; + } + UNGCPRO; /* no more evaluation */ + + *nsymbols=i; + if (i == 0) return 0; + + colortbl = xnew_array_and_zero (struct color_symbol, i); + + for (j=0; j<i; j++) + { + Lisp_Object cons = XCAR (results); + colortbl[j].color = + COLOR_INSTANCE_MSWINDOWS_COLOR (XCOLOR_INSTANCE (XCDR (cons))); + + colortbl[j].name = (char *) XSTRING_DATA (XCAR (cons)); + free_cons (XCONS (cons)); + cons = results; + results = XCDR (results); + free_cons (XCONS (cons)); + } + return colortbl; +} + static int xpm_to_eimage (Lisp_Object image, CONST Extbyte *buffer, unsigned char** data, int* width, int* height, int* x_hot, int* y_hot, - COLORREF bg) + COLORREF bg, struct color_symbol* color_symbols, + int nsymbols) { XpmImage xpmimage; XpmInfo xpminfo; - int result, i, transp_idx, maskbpline; + int result, i, j, transp_idx, maskbpline; unsigned char* dptr; unsigned int* sptr; COLORREF color; /* the american spelling virus hits again .. */ @@ -580,8 +573,30 @@ for (i=0; i<xpmimage.ncolors; i++) { + /* pick up symbolic colors */ + if (xpmimage.colorTable[i].c_color == 0 + && + xpmimage.colorTable[i].symbolic != 0) + { + if (!color_symbols) + { + xfree (*data); + xfree (colortbl); + XpmFreeXpmImage (&xpmimage); + XpmFreeXpmInfo (&xpminfo); + return 0; + } + for (j = 0; j<nsymbols; j++) + { + if (!strcmp (xpmimage.colorTable[i].symbolic, + color_symbols[j].name )) + { + colortbl[i]=color_symbols[j].color; + } + } + } /* pick up transparencies */ - if (!strcmp (xpmimage.colorTable[i].c_color,"None")) + else if (!strcmp (xpmimage.colorTable[i].c_color,"None")) { colortbl[i]=bg; /* PALETTERGB(0,0,0); */ transp_idx=i; @@ -615,13 +630,7 @@ return TRUE; } -Lisp_Object -mswindows_xpm_normalize (Lisp_Object inst, Lisp_Object console_type) -{ - return simple_image_type_normalize (inst, console_type, Qxpm); -} - -void +static void mswindows_xpm_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, @@ -637,8 +646,12 @@ unsigned char* bmp_data; int bmp_bits; COLORREF bkcolor; + int nsymbols=0; + struct color_symbol* color_symbols=NULL; Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); + Lisp_Object color_symbol_alist = find_keyword_in_vector (instantiator, + Q_color_symbols); if (!DEVICE_MSWINDOWS_P (XDEVICE (device))) signal_simple_error ("Not an mswindows device", device); @@ -652,14 +665,21 @@ bkcolor = COLOR_INSTANCE_MSWINDOWS_COLOR (XCOLOR_INSTANCE (FACE_BACKGROUND (Vdefault_face, domain))); + /* in case we have color symbols */ + color_symbols = extract_xpm_color_names (device, domain, + color_symbol_alist, &nsymbols); + /* convert to an eimage to make processing easier */ if (!xpm_to_eimage (image_instance, bytes, &eimage, &width, &height, - &x_hot, &y_hot, bkcolor)) + &x_hot, &y_hot, bkcolor, color_symbols, nsymbols)) { signal_simple_error ("XPM to EImage conversion failed", image_instance); } + if (color_symbols) + xfree(color_symbols); + /* build a bitmap from the eimage */ if (!(bmp_info=convert_EImage_to_DIBitmap (device, width, height, eimage, &bmp_bits, &bmp_data))) @@ -870,6 +890,9 @@ CONSOLE_HAS_METHOD (mswindows, image_instance_hash); CONSOLE_HAS_METHOD (mswindows, init_image_instance_from_eimage); CONSOLE_HAS_METHOD (mswindows, locate_pixmap_file); +#ifdef HAVE_XPM + CONSOLE_HAS_METHOD (mswindows, xpm_instantiate); +#endif } void
--- a/src/glyphs-x.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/glyphs-x.c Mon Aug 13 10:32:22 2007 +0200 @@ -152,7 +152,7 @@ static XImage * convert_EImage_to_XImage (Lisp_Object device, int width, int height, unsigned char *pic, unsigned long **pixtbl, - int *pixcount, int *npixels) + int *npixels) { Display *dpy; Colormap cmap; @@ -201,10 +201,10 @@ if (vis->class == PseudoColor) { unsigned long pixarray[256]; - int n; + int pixcount, n; /* use our quantize table to allocate the colors */ - *pixcount = 32; - *pixtbl = xnew_array (unsigned long, *pixcount); + pixcount = 32; + *pixtbl = xnew_array (unsigned long, pixcount); *npixels = 0; /* ### should implement a sort by popularity to assure proper allocation */ @@ -221,7 +221,7 @@ res = allocate_nearest_color (dpy, cmap, vis, &color); if (res > 0 && res < 3) { - DO_REALLOC(*pixtbl, *pixcount, n+1, unsigned long); + DO_REALLOC(*pixtbl, pixcount, n+1, unsigned long); (*pixtbl)[n] = color.pixel; n++; } @@ -474,7 +474,7 @@ where the file might be located. Return a full pathname if found; otherwise, return Qnil. */ -Lisp_Object +static Lisp_Object x_locate_pixmap_file (Lisp_Object name) { /* This function can GC if IN_REDISPLAY is false */ @@ -556,90 +556,6 @@ } #if 0 -/* If INSTANTIATOR refers to inline data, return Qnil. - If INSTANTIATOR refers to data in a file, return the full filename - if it exists; otherwise, return a cons of (filename). - - FILE_KEYWORD and DATA_KEYWORD are symbols specifying the - keywords used to look up the file and inline data, - respectively, in the instantiator. Normally these would - be Q_file and Q_data, but might be different for mask data. */ - -static Lisp_Object -potential_pixmap_file_instantiator (Lisp_Object instantiator, - Lisp_Object file_keyword, - Lisp_Object data_keyword) -{ - Lisp_Object file; - Lisp_Object data; - - assert (VECTORP (instantiator)); - - data = find_keyword_in_vector (instantiator, data_keyword); - file = find_keyword_in_vector (instantiator, file_keyword); - - if (!NILP (file) && NILP (data)) - { - Lisp_Object retval = locate_pixmap_file (file); - if (!NILP (retval)) - return retval; - else - return Fcons (file, Qnil); /* should have been file */ - } - - return Qnil; -} - - -static Lisp_Object -simple_image_type_normalize (Lisp_Object inst, Lisp_Object console_type, - Lisp_Object image_type_tag) -{ - /* This function can call lisp */ - Lisp_Object file = Qnil; - struct gcpro gcpro1, gcpro2; - Lisp_Object alist = Qnil; - - GCPRO2 (file, alist); - - /* Now, convert any file data into inline data. At the end of this, - `data' will contain the inline data (if any) or Qnil, and `file' - will contain the name this data was derived from (if known) or - Qnil. - - Note that if we cannot generate any regular inline data, we - skip out. */ - - file = potential_pixmap_file_instantiator (inst, Q_file, Q_data, - console_type); - - if (CONSP (file)) /* failure locating filename */ - signal_double_file_error ("Opening pixmap file", - "no such file or directory", - Fcar (file)); - - if (NILP (file)) /* no conversion necessary */ - RETURN_UNGCPRO (inst); - - alist = tagged_vector_to_alist (inst); - - { - Lisp_Object data = make_string_from_file (file); - alist = remassq_no_quit (Q_file, alist); - /* there can't be a :data at this point. */ - alist = Fcons (Fcons (Q_file, file), - Fcons (Fcons (Q_data, data), alist)); - } - - { - Lisp_Object result = alist_to_tagged_vector (image_type_tag, alist); - free_alist (alist); - RETURN_UNGCPRO (result); - } -} -#endif - -#if 0 static void write_lisp_string_to_temp_file (Lisp_Object string, char *filename_out) { @@ -909,16 +825,18 @@ { Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); Colormap cmap = DEVICE_X_COLORMAP (XDEVICE(device)); - unsigned long *pixtbl; - int pixcount; - int npixels; + unsigned long *pixtbl = NULL; + int npixels = 0; XImage* ximage; ximage = convert_EImage_to_XImage (device, width, height, eimage, - &pixtbl, &pixcount, &npixels); + &pixtbl, &npixels); if (!ximage) - signal_image_error("EImage to XImage conversion failed", instantiator); - + { + if (pixtbl) xfree (pixtbl); + signal_image_error("EImage to XImage conversion failed", instantiator); + } + /* Now create the pixmap and set up the image instance */ init_image_instance_from_x_image (ii, ximage, dest_mask, cmap, pixtbl, npixels, @@ -1362,145 +1280,6 @@ /********************************************************************** * XPM * **********************************************************************/ - -static Lisp_Object -pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid) -{ - char **data; - int result; - - result = XpmReadFileToData ((char *) XSTRING_DATA (name), &data); - - if (result == XpmSuccess) - { - Lisp_Object retval = Qnil; - struct buffer *old_buffer = current_buffer; - Lisp_Object temp_buffer = - Fget_buffer_create (build_string (" *pixmap conversion*")); - int elt; - int height, width, ncolors; - struct gcpro gcpro1, gcpro2, gcpro3; - int speccount = specpdl_depth (); - - GCPRO3 (name, retval, temp_buffer); - - specbind (Qinhibit_quit, Qt); - set_buffer_internal (XBUFFER (temp_buffer)); - Ferase_buffer (Qnil); - - buffer_insert_c_string (current_buffer, "/* XPM */\r"); - buffer_insert_c_string (current_buffer, "static char *pixmap[] = {\r"); - - sscanf (data[0], "%d %d %d", &height, &width, &ncolors); - for (elt = 0; elt <= width + ncolors; elt++) - { - buffer_insert_c_string (current_buffer, "\""); - buffer_insert_c_string (current_buffer, data[elt]); - - if (elt < width + ncolors) - buffer_insert_c_string (current_buffer, "\",\r"); - else - buffer_insert_c_string (current_buffer, "\"};\r"); - } - - retval = Fbuffer_substring (Qnil, Qnil, Qnil); - XpmFree (data); - - set_buffer_internal (old_buffer); - unbind_to (speccount, Qnil); - - RETURN_UNGCPRO (retval); - } - - switch (result) - { - case XpmFileInvalid: - { - if (ok_if_data_invalid) - return Qt; - signal_image_error ("invalid XPM data in file", name); - } - case XpmNoMemory: - { - signal_double_file_error ("Reading pixmap file", - "out of memory", name); - } - case XpmOpenFailed: - { - /* should never happen? */ - signal_double_file_error ("Opening pixmap file", - "no such file or directory", name); - } - default: - { - signal_double_file_error_2 ("Parsing pixmap file", - "unknown error code", - make_int (result), name); - break; - } - } - - return Qnil; /* not reached */ -} - -Lisp_Object -x_xpm_normalize (Lisp_Object inst, Lisp_Object console_type) -{ - Lisp_Object file = Qnil; - Lisp_Object color_symbols; - struct gcpro gcpro1, gcpro2; - Lisp_Object alist = Qnil; - - GCPRO2 (file, alist); - - /* Now, convert any file data into inline data. At the end of this, - `data' will contain the inline data (if any) or Qnil, and - `file' will contain the name this data was derived from (if - known) or Qnil. - - Note that if we cannot generate any regular inline data, we - skip out. */ - - file = potential_pixmap_file_instantiator (inst, Q_file, Q_data, - console_type); - - if (CONSP (file)) /* failure locating filename */ - signal_double_file_error ("Opening pixmap file", - "no such file or directory", - Fcar (file)); - - color_symbols = find_keyword_in_vector_or_given (inst, Q_color_symbols, - Qunbound); - - if (NILP (file) && !UNBOUNDP (color_symbols)) - /* no conversion necessary */ - RETURN_UNGCPRO (inst); - - alist = tagged_vector_to_alist (inst); - - if (!NILP (file)) - { - Lisp_Object data = pixmap_to_lisp_data (file, 0); - alist = remassq_no_quit (Q_file, alist); - /* there can't be a :data at this point. */ - alist = Fcons (Fcons (Q_file, file), - Fcons (Fcons (Q_data, data), alist)); - } - - if (UNBOUNDP (color_symbols)) - { - color_symbols = evaluate_xpm_color_symbols (); - alist = Fcons (Fcons (Q_color_symbols, color_symbols), - alist); - } - - { - Lisp_Object result = alist_to_tagged_vector (Qxpm, alist); - free_alist (alist); - RETURN_UNGCPRO (result); - } -} - /* xpm 3.2g and better has XpmCreatePixmapFromBuffer()... There was no version number in xpm.h before 3.3, but this should do. */ @@ -1594,7 +1373,7 @@ XpmFreeAttributes (xpmattrs); } -void +static void x_xpm_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain) @@ -1607,6 +1386,7 @@ Screen *xs; Colormap cmap; int depth; + Visual *visual; Pixmap pixmap; Pixmap mask = 0; XpmAttributes xpmattrs; @@ -1638,22 +1418,23 @@ #if 1 /* Although I haven't found it documented yet, it appears that pointers are - always colored via the default window colormap... Sigh. However, with - the current color structure, this will blow the doors off as things aren't set up - to differenciate between two colormaps per console. AARGH! */ + always colored via the default window colormap... Sigh. */ if (type == IMAGE_POINTER) { cmap = DefaultColormap(dpy, DefaultScreen(dpy)); depth = DefaultDepthOfScreen (xs); + visual = DefaultVisualOfScreen (xs); } else { cmap = DEVICE_X_COLORMAP (XDEVICE(device)); depth = DEVICE_X_DEPTH (XDEVICE(device)); + visual = DEVICE_X_VISUAL (XDEVICE(device)); } #else cmap = DEVICE_X_COLORMAP (XDEVICE(device)); depth = DEVICE_X_DEPTH (XDEVICE(device)); + visual = DEVICE_X_VISUAL (XDEVICE(device)); #endif x_initialize_pixmap_image_instance (ii, type); @@ -1680,7 +1461,7 @@ xpmattrs.valuemask |= XpmCloseness; xpmattrs.depth = depth; xpmattrs.valuemask |= XpmDepth; - xpmattrs.visual = DEVICE_X_VISUAL (XDEVICE(device)); + xpmattrs.visual = visual; xpmattrs.valuemask |= XpmVisual; xpmattrs.colormap = cmap; xpmattrs.valuemask |= XpmColormap; @@ -4575,6 +4356,9 @@ CONSOLE_HAS_METHOD (x, colorize_image_instance); CONSOLE_HAS_METHOD (x, init_image_instance_from_eimage); CONSOLE_HAS_METHOD (x, locate_pixmap_file); +#ifdef HAVE_XPM + CONSOLE_HAS_METHOD (x, xpm_instantiate); +#endif } void @@ -4589,6 +4373,7 @@ IIFORMAT_HAS_METHOD (xbm, possible_dest_types); IIFORMAT_HAS_METHOD (xbm, instantiate); + IIFORMAT_VALID_KEYWORD (xbm, Q_data, check_valid_xbm_inline); IIFORMAT_VALID_KEYWORD (xbm, Q_file, check_valid_string); IIFORMAT_VALID_KEYWORD (xbm, Q_mask_data, check_valid_xbm_inline);
--- a/src/glyphs.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/glyphs.c Mon Aug 13 10:32:22 2007 +0200 @@ -79,16 +79,6 @@ DEFINE_IMAGE_INSTANTIATOR_FORMAT (xpm); Lisp_Object Qxpm; Lisp_Object Q_color_symbols; -void x_xpm_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, - Lisp_Object pointer_fg, Lisp_Object pointer_bg, - int dest_mask, Lisp_Object domain); -void mswindows_xpm_instantiate (Lisp_Object image_instance, - Lisp_Object instantiator, - Lisp_Object pointer_fg, Lisp_Object pointer_bg, - int dest_mask, Lisp_Object domain); -Lisp_Object x_xpm_normalize (Lisp_Object inst, Lisp_Object console_type); -Lisp_Object mswindows_xpm_normalize (Lisp_Object inst, - Lisp_Object console_type); #endif typedef struct image_instantiator_format_entry image_instantiator_format_entry; @@ -1549,6 +1539,86 @@ * XPM * **********************************************************************/ +Lisp_Object +pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid) +{ + char **data; + int result; + + result = XpmReadFileToData ((char *) XSTRING_DATA (name), &data); + + if (result == XpmSuccess) + { + Lisp_Object retval = Qnil; + struct buffer *old_buffer = current_buffer; + Lisp_Object temp_buffer = + Fget_buffer_create (build_string (" *pixmap conversion*")); + int elt; + int height, width, ncolors; + struct gcpro gcpro1, gcpro2, gcpro3; + int speccount = specpdl_depth (); + + GCPRO3 (name, retval, temp_buffer); + + specbind (Qinhibit_quit, Qt); + set_buffer_internal (XBUFFER (temp_buffer)); + Ferase_buffer (Qnil); + + buffer_insert_c_string (current_buffer, "/* XPM */\r"); + buffer_insert_c_string (current_buffer, "static char *pixmap[] = {\r"); + + sscanf (data[0], "%d %d %d", &height, &width, &ncolors); + for (elt = 0; elt <= width + ncolors; elt++) + { + buffer_insert_c_string (current_buffer, "\""); + buffer_insert_c_string (current_buffer, data[elt]); + + if (elt < width + ncolors) + buffer_insert_c_string (current_buffer, "\",\r"); + else + buffer_insert_c_string (current_buffer, "\"};\r"); + } + + retval = Fbuffer_substring (Qnil, Qnil, Qnil); + XpmFree (data); + + set_buffer_internal (old_buffer); + unbind_to (speccount, Qnil); + + RETURN_UNGCPRO (retval); + } + + switch (result) + { + case XpmFileInvalid: + { + if (ok_if_data_invalid) + return Qt; + signal_image_error ("invalid XPM data in file", name); + } + case XpmNoMemory: + { + signal_double_file_error ("Reading pixmap file", + "out of memory", name); + } + case XpmOpenFailed: + { + /* should never happen? */ + signal_double_file_error ("Opening pixmap file", + "no such file or directory", name); + } + default: + { + signal_double_file_error_2 ("Parsing pixmap file", + "unknown error code", + make_int (result), name); + break; + } + } + + return Qnil; /* not reached */ +} + static void check_valid_xpm_color_symbols (Lisp_Object data) { @@ -1608,18 +1678,59 @@ static Lisp_Object xpm_normalize (Lisp_Object inst, Lisp_Object console_type) { -#ifdef HAVE_X_WINDOWS - if (CONSOLE_TYPESYM_X_P (console_type)) - return x_xpm_normalize (inst, console_type); - else -#endif -#ifdef HAVE_MS_WINDOWS - if (CONSOLE_TYPESYM_MSWINDOWS_P (console_type)) - return mswindows_xpm_normalize (inst, console_type); - else -#endif - signal_image_error ("Can't display XPM images on this console", - console_type); + Lisp_Object file = Qnil; + Lisp_Object color_symbols; + struct gcpro gcpro1, gcpro2; + Lisp_Object alist = Qnil; + + GCPRO2 (file, alist); + + /* Now, convert any file data into inline data. At the end of this, + `data' will contain the inline data (if any) or Qnil, and + `file' will contain the name this data was derived from (if + known) or Qnil. + + Note that if we cannot generate any regular inline data, we + skip out. */ + + file = potential_pixmap_file_instantiator (inst, Q_file, Q_data, + console_type); + + if (CONSP (file)) /* failure locating filename */ + signal_double_file_error ("Opening pixmap file", + "no such file or directory", + Fcar (file)); + + color_symbols = find_keyword_in_vector_or_given (inst, Q_color_symbols, + Qunbound); + + if (NILP (file) && !UNBOUNDP (color_symbols)) + /* no conversion necessary */ + RETURN_UNGCPRO (inst); + + alist = tagged_vector_to_alist (inst); + + if (!NILP (file)) + { + Lisp_Object data = pixmap_to_lisp_data (file, 0); + alist = remassq_no_quit (Q_file, alist); + /* there can't be a :data at this point. */ + alist = Fcons (Fcons (Q_file, file), + Fcons (Fcons (Q_data, data), alist)); + } + + if (UNBOUNDP (color_symbols)) + { + color_symbols = evaluate_xpm_color_symbols (); + alist = Fcons (Fcons (Q_color_symbols, color_symbols), + alist); + } + + { + Lisp_Object result = alist_to_tagged_vector (Qxpm, alist); + free_alist (alist); + RETURN_UNGCPRO (result); + } } static int @@ -1637,27 +1748,11 @@ int dest_mask, Lisp_Object domain) { Lisp_Object device= IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (image_instance)); -#ifdef HAVE_X_WINDOWS - if (DEVICE_X_P (XDEVICE (device))) - { - x_xpm_instantiate (image_instance, instantiator, - pointer_fg, pointer_bg, - dest_mask, domain); - return; - } - else -#endif -#ifdef HAVE_MS_WINDOWS - if (DEVICE_MSWINDOWS_P (XDEVICE (device))) - { - mswindows_xpm_instantiate (image_instance, instantiator, - pointer_fg, pointer_bg, - dest_mask, domain); - return; - } - else -#endif - signal_image_error ("Can't display XPM images on this device", device); + + MAYBE_DEVMETH (XDEVICE (device), + xpm_instantiate, + (image_instance, instantiator, pointer_fg, + pointer_bg, dest_mask, domain)); } #endif /* HAVE_XPM */
--- a/src/glyphs.h Mon Aug 13 10:31:30 2007 +0200 +++ b/src/glyphs.h Mon Aug 13 10:32:22 2007 +0200 @@ -30,6 +30,7 @@ #ifdef HAVE_XPM extern Lisp_Object Q_color_symbols; Lisp_Object evaluate_xpm_color_symbols (void); +Lisp_Object pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid); #endif DOESNT_RETURN signal_image_error (CONST char *, Lisp_Object);
--- a/src/gui-x.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/gui-x.c Mon Aug 13 10:32:22 2007 +0200 @@ -36,6 +36,7 @@ #include "frame.h" #include "gui.h" #include "opaque.h" +#include "bytecode.h" /* for struct Lisp_Compiled_Function */ #ifdef HAVE_POPUPS Lisp_Object Qmenu_no_selection_hook; @@ -258,7 +259,12 @@ fn = Qrun_hooks; arg = Qmenu_no_selection_hook; } - else if (SYMBOLP (data)) + else if (SYMBOLP (data) + /* poor man's commandp */ + || (COMPILED_FUNCTIONP (data) + && XCOMPILED_FUNCTION (data)->flags.interactivep) + || (EQ (XCAR (data), Qlambda) + && !NILP (Fassq (Qinteractive, Fcdr (Fcdr (data)))))) { fn = Qcall_interactively; arg = data;
--- a/src/input-method-xlib.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/input-method-xlib.c Mon Aug 13 10:32:22 2007 +0200 @@ -28,8 +28,8 @@ for further details */ #include <config.h> +#include "lisp.h" #include <X11/Xlocale.h> /* More portable than <locale.h> ? */ -#include "lisp.h" #include "frame.h" #include "device.h" #include "window.h"
--- a/src/lisp.h Mon Aug 13 10:31:30 2007 +0200 +++ b/src/lisp.h Mon Aug 13 10:32:22 2007 +0200 @@ -1072,7 +1072,7 @@ /*********** subr ***********/ -typedef Lisp_Object (*lisp_fn_t) (); +typedef Lisp_Object (*lisp_fn_t) (void); struct Lisp_Subr { @@ -1152,7 +1152,7 @@ struct Lisp_Float { struct lrecord_header lheader; - union { double d; struct Lisp_Float *next; } data; + double data; }; DECLARE_LRECORD (float, struct Lisp_Float); @@ -1163,8 +1163,7 @@ #define CHECK_FLOAT(x) CHECK_RECORD (x, float) #define CONCHECK_FLOAT(x) CONCHECK_RECORD (x, float) -#define float_next(f) ((f)->data.next) -#define float_data(f) ((f)->data.d) +#define float_data(f) ((f)->data) #define XFLOATINT(n) extract_float (n) @@ -2004,11 +2003,21 @@ Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); DECLARE_DOESNT_RETURN (dead_wrong_type_argument (Lisp_Object, Lisp_Object)); void check_int_range (int, int, int); + +enum arith_comparison { + arith_equal, + arith_notequal, + arith_less, + arith_grtr, + arith_less_or_equal, + arith_grtr_or_equal }; +Lisp_Object arithcompare (Lisp_Object, Lisp_Object, enum arith_comparison); + Lisp_Object word_to_lisp (unsigned int); unsigned int lisp_to_word (Lisp_Object); /* Defined in dired.c */ -Lisp_Object make_directory_hash_table (char *); +Lisp_Object make_directory_hash_table (CONST char *); Lisp_Object wasteful_word_to_lisp (unsigned int); /* Defined in doc.c */ @@ -2557,7 +2566,7 @@ EXFUN (Fforward_line, 2); EXFUN (Ffset, 2); EXFUN (Ffuncall, MANY); -EXFUN (Fgeq, 2); +EXFUN (Fgeq, MANY); EXFUN (Fget, 3); EXFUN (Fget_buffer_process, 1); EXFUN (Fget_coding_system, 1); @@ -2566,7 +2575,7 @@ EXFUN (Fgethash, 3); EXFUN (Fgettext, 1); EXFUN (Fgoto_char, 2); -EXFUN (Fgtr, 2); +EXFUN (Fgtr, MANY); EXFUN (Fhashtablep, 1); EXFUN (Findent_to, 3); EXFUN (Findirect_function, 1); @@ -2583,10 +2592,10 @@ EXFUN (Flax_plist_get, 3); EXFUN (Flax_plist_remprop, 2); EXFUN (Flength, 1); -EXFUN (Fleq, 2); +EXFUN (Fleq, MANY); EXFUN (Flist, MANY); EXFUN (Flistp, 1); -EXFUN (Flss, 2); +EXFUN (Flss, MANY); EXFUN (Fmake_byte_code, MANY); EXFUN (Fmake_coding_system, 4); EXFUN (Fmake_glyph_internal, 1);
--- a/src/lread.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/lread.c Mon Aug 13 10:32:22 2007 +0200 @@ -1593,7 +1593,9 @@ c = read_escape (readcharfun); return c | 0200; +#ifndef MULE #define FSF_KEYS +#endif #ifdef FSF_KEYS #define alt_modifier (0x040000)
--- a/src/macros.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/macros.c Mon Aug 13 10:32:22 2007 +0200 @@ -87,7 +87,7 @@ return Qnil; } -DEFUN ("end-kbd-macro", Fend_kbd_macro, 0, 1, "P", /* +DEFUN ("end-kbd-macro", Fend_kbd_macro, 0, 2, "P", /* Finish defining a keyboard macro. The definition was started by \\[start-kbd-macro]. The macro is now available for use via \\[call-last-kbd-macro], @@ -97,16 +97,29 @@ With numeric arg, repeat macro now that many times, counting the definition just completed as the first repetition. An argument of zero means repeat until error. + +If REMOVE-LAST is an integer, it means to not record the last number +of events. This is used internally and will likely be removed. */ - (arg)) + (arg, remove_last)) { /* This function can GC */ struct console *con = XCONSOLE (Vselected_console); - int repeat; + int repeat, kill; if (NILP (con->defining_kbd_macro)) error ("Not defining kbd macro."); + /* #### Read the comment in modeline.el to see why this ugliness is + needed. #### Try to avoid it, somehow! */ + if (!NILP (remove_last)) + { + CHECK_NATNUM (remove_last); + kill = XINT (remove_last); + } + else + kill = 0; + if (NILP (arg)) repeat = -1; else @@ -115,9 +128,12 @@ if (!NILP (con->defining_kbd_macro)) { int i; - int size = con->kbd_macro_end; + int size = con->kbd_macro_end - kill; + + if (size < 0) + size = 0; con->last_kbd_macro = make_vector (size, Qnil); - for (i = 0; i < con->kbd_macro_end; i++) + for (i = 0; i < size; i++) XVECTOR_DATA (con->last_kbd_macro) [i] = XVECTOR_DATA (con->kbd_macro_builder) [i]; con->defining_kbd_macro = Qnil;
--- a/src/md5.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/md5.c Mon Aug 13 10:32:22 2007 +0200 @@ -312,7 +312,7 @@ md5_process_block (CONST void *buffer, size_t len, struct md5_ctx *ctx) { md5_uint32 correct_words[16]; - const md5_uint32 *words = buffer; + const md5_uint32 *words = (const md5_uint32 *) buffer; size_t nwords = len / sizeof (md5_uint32); const md5_uint32 *endp = words + nwords; md5_uint32 A = ctx->A;
--- a/src/mule-charset.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/mule-charset.c Mon Aug 13 10:32:22 2007 +0200 @@ -457,6 +457,11 @@ CHARSET_CCL_PROGRAM (cs) = Qnil; CHARSET_REVERSE_DIRECTION_CHARSET (cs) = Qnil; + CHARSET_DIMENSION (cs) = (CHARSET_TYPE (cs) == CHARSET_TYPE_94 || + CHARSET_TYPE (cs) == CHARSET_TYPE_96) ? 1 : 2; + CHARSET_CHARS (cs) = (CHARSET_TYPE (cs) == CHARSET_TYPE_94 || + CHARSET_TYPE (cs) == CHARSET_TYPE_94X94) ? 94 : 96; + if (final) { /* some charsets do not have final characters. This includes @@ -765,8 +770,8 @@ return charset; } -DEFUN ("make-reverse-direction-charset", - Fmake_reverse_direction_charset, 2, 2, 0, /* +DEFUN ("make-reverse-direction-charset", Fmake_reverse_direction_charset, + 2, 2, 0, /* Make a charset equivalent to CHARSET but which goes in the opposite direction. NEW-NAME is the name of the new charset. Return the new charset. */ @@ -814,8 +819,8 @@ /* #### The defsubr for this is commented out at the moment but no reason why is given. */ #if 0 -DEFUN ("charset-reverse-direction-charset", - Fcharset_reverse_direction_charset, 1, 1, 0, /* +DEFUN ("charset-reverse-direction-charset", Fcharset_reverse_direction_charset, + 1, 1, 0, /* Return the reverse-direction charset parallel to CHARSET, if any. This is the charset with the same properties (in particular, the same dimension, number of characters per dimension, and final byte) as
--- a/src/mule-charset.h Mon Aug 13 10:31:30 2007 +0200 +++ b/src/mule-charset.h Mon Aug 13 10:32:22 2007 +0200 @@ -452,29 +452,34 @@ Lisp_Object ccl_program; - unsigned int leading_byte :8; + Bufbyte leading_byte; + + /* Final byte of this character set in ISO2022 designating escape sequence */ + Bufbyte final; /* Number of bytes (1 - 4) required in the internal representation for characters in this character set. This is *not* the - same as the number of bytes used in the encoding (i.e. - the "dimension" of the character set). That value can - be derived from the TYPE. */ - unsigned int rep_bytes :3; + same as the dimension of the character set). */ + unsigned int rep_bytes; /* Number of columns a character in this charset takes up, on TTY devices. Not used for X devices. */ - unsigned int columns :2; + unsigned int columns; + /* Direction of this character set */ - unsigned int direction :1; + unsigned int direction; /* Type of this character set (94, 96, 94x94, 96x96) */ - unsigned int type :2; + unsigned int type; + + /* Number of bytes used in encoding of this character set (1 or 2) */ + unsigned int dimension; + + /* Number of chars in each dimension (usually 94 or 96) */ + unsigned int chars; /* Which half of font to be used to display this character set */ - unsigned int graphic :2; - - /* Final byte of this character set in ISO2022 designating escape sequence */ - Bufbyte final; + unsigned int graphic; }; DECLARE_LRECORD (charset, struct Lisp_Charset); @@ -505,11 +510,10 @@ #define CHARSET_DOC_STRING(cs) ((cs)->doc_string) #define CHARSET_REGISTRY(cs) ((cs)->registry) #define CHARSET_CCL_PROGRAM(cs) ((cs)->ccl_program) +#define CHARSET_DIMENSION(cs) ((cs)->dimension) +#define CHARSET_CHARS(cs) ((cs)->chars) #define CHARSET_REVERSE_DIRECTION_CHARSET(cs) ((cs)->reverse_direction_charset) -/* Optimized using inside knowledge of CHARSET_TYPE values */ -#define CHARSET_DIMENSION(cs) ((CHARSET_TYPE (cs) <= CHARSET_TYPE_96) ? 1 : 2) -#define CHARSET_CHARS(cs) ((CHARSET_TYPE (cs) & 0x1) ? 96 : 94) #define CHARSET_PRIVATE_P(cs) LEADING_BYTE_PRIVATE_P (CHARSET_LEADING_BYTE (cs))
--- a/src/objects-msw.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/objects-msw.c Mon Aug 13 10:32:22 2007 +0200 @@ -850,7 +850,7 @@ static unsigned long mswindows_color_instance_hash (struct Lisp_Color_Instance *c, int depth) { - return LISP_HASH (COLOR_INSTANCE_MSWINDOWS_COLOR(c)); + return (unsigned long)(COLOR_INSTANCE_MSWINDOWS_COLOR(c)); } static Lisp_Object
--- a/src/paths.h.in Mon Aug 13 10:31:30 2007 +0200 +++ b/src/paths.h.in Mon Aug 13 10:32:22 2007 +0200 @@ -24,6 +24,10 @@ If it defines anything, this file should define some subset of the following: + PATH_PROGNAME The name of the Emacs variant that's running. + + PATH_VERSION The version id of the Emacs variant that's running. + PATH_EXEC_PREFIX The value of --exec-prefix. PATH_PREFIX The value of --prefix. @@ -53,6 +57,10 @@ These are additional places info files are searched for. */ +#define PATH_PROGNAME "@PROGNAME@" + +#define PATH_VERSION "@version@" + #define PATH_EXEC_PREFIX "@EXEC_PREFIX@" #define PATH_PREFIX "@PREFIX@" @@ -65,10 +73,6 @@ #define PATH_PACKAGEPATH "@PACKAGE_PATH@" #endif -#ifdef SITELISPDIR_USER_DEFINED -#define PATH_SITE "@SITELISPDIR@" -#endif - #ifdef ARCHLIBDIR_USER_DEFINED #define PATH_EXEC "@ARCHLIBDIR@" #endif
--- a/src/print.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/print.c Mon Aug 13 10:32:22 2007 +0200 @@ -45,8 +45,6 @@ #define DBL_DIG 16 #endif -static void print_error_message (Lisp_Object data, Lisp_Object stream); - Lisp_Object Vstandard_output, Qstandard_output; /* The subroutine object for external-debugging-output is kept here @@ -220,7 +218,7 @@ else if (FRAMEP (function)) { /* This gets used by functions not invoking print_prepare(), - such as Fwrite_char. */ + such as Fwrite_char, Fterpri, etc.. */ struct frame *f = XFRAME (function); CHECK_LIVE_FRAME (function); @@ -337,21 +335,21 @@ Lstream_delete (str); } } - -/* Used for printing a character. STRING_OF_LENGTH_1 must contain a - single-byte character, not just any emchar. */ + +/* Used for printing a single-byte character (*not* any Emchar). */ #define write_char_internal(string_of_length_1, stream) \ - output_string ((stream), (CONST Bufbyte *) (string_of_length_1), \ + output_string (stream, (CONST Bufbyte *) (string_of_length_1), \ Qnil, 0, 1) -/* NOTE: Do not call this with the data of a Lisp_String, - * as printcharfun might cause a GC, which might cause - * the string's data to be relocated. - * Use print_internal (string, printcharfun, 0) - * to princ a Lisp_String - * Note: "stream" should be the result of "canonicalize_printcharfun" - * (ie Qnil means stdout, not Vstandard_output, etc) - */ +/* NOTE: Do not call this with the data of a Lisp_String, as + printcharfun might cause a GC, which might cause the string's data + to be relocated. To princ a Lisp string, use: + + print_internal (string, printcharfun, 0); + + Also note that STREAM should be the result of + canonicalize_printcharfun() (i.e. Qnil means stdout, not + Vstandard_output, etc.) */ void write_string_1 (CONST Bufbyte *str, Bytecount size, Lisp_Object stream) { @@ -381,10 +379,8 @@ Bytecount len; CHECK_CHAR_COERCE_INT (ch); - RESET_PRINT_GENSYM; len = set_charptr_emchar (str, XCHAR (ch)); output_string (canonicalize_printcharfun (stream), str, Qnil, 0, len); - RESET_PRINT_GENSYM; return ch; } @@ -478,9 +474,7 @@ (stream)) { /* This function can GC */ - Bufbyte str[1]; - str[0] = '\n'; - output_string (canonicalize_printcharfun (stream), str, Qnil, 0, 1); + write_char_internal ("\n", canonicalize_printcharfun (stream)); return Qt; } @@ -493,14 +487,15 @@ (object, stream)) { /* This function can GC */ - Lisp_Object the_stream = Qnil, frame = Qnil; - struct gcpro gcpro1, gcpro2, gcpro3; + Lisp_Object frame = Qnil; + struct gcpro gcpro1, gcpro2; + GCPRO2 (object, stream); - GCPRO3 (object, stream, the_stream); print_depth = 0; - the_stream = print_prepare (stream, &frame); - print_internal (object, the_stream, 1); - print_finish (the_stream, frame); + stream = print_prepare (stream, &frame); + print_internal (object, stream, 1); + print_finish (stream, frame); + UNGCPRO; return object; } @@ -514,23 +509,23 @@ (object, noescape)) { /* This function can GC */ - Lisp_Object stream; - Lstream *str; - struct gcpro gcpro1, gcpro2; + Lisp_Object result = Qnil; + Lisp_Object stream = make_resizing_buffer_output_stream (); + Lstream *str = XLSTREAM (stream); + /* gcpro OBJECT in case a caller forgot to do so */ + struct gcpro gcpro1, gcpro2, gcpro3; + GCPRO3 (object, stream, result); - stream = make_resizing_buffer_output_stream (); - str = XLSTREAM (stream); - - /* Protect OBJECT, in case a caller forgot to protect. */ - GCPRO2 (object, stream); print_depth = 0; RESET_PRINT_GENSYM; print_internal (object, stream, NILP (noescape)); RESET_PRINT_GENSYM; Lstream_flush (str); UNGCPRO; - return make_string (resizing_buffer_stream_ptr (str), - Lstream_byte_count (str)); + result = make_string (resizing_buffer_stream_ptr (str), + Lstream_byte_count (str)); + Lstream_delete (str); + return result; } DEFUN ("princ", Fprinc, 1, 2, 0, /* @@ -539,19 +534,19 @@ the contents of strings. Output stream is STREAM, or value of standard-output (which see). */ - (obj, stream)) + (object, stream)) { /* This function can GC */ - Lisp_Object the_stream = Qnil, frame = Qnil; - struct gcpro gcpro1, gcpro2, gcpro3; + Lisp_Object frame = Qnil; + struct gcpro gcpro1, gcpro2; - GCPRO3 (obj, stream, the_stream); - the_stream = print_prepare (stream, &frame); + GCPRO2 (object, stream); + stream = print_prepare (stream, &frame); print_depth = 0; - print_internal (obj, the_stream, 0); - print_finish (the_stream, frame); + print_internal (object, stream, 0); + print_finish (stream, frame); UNGCPRO; - return obj; + return object; } DEFUN ("print", Fprint, 1, 2, 0, /* @@ -560,62 +555,40 @@ can handle, whenever this is possible. Output stream is STREAM, or value of `standard-output' (which see). */ - (obj, stream)) + (object, stream)) { /* This function can GC */ - Lisp_Object the_stream = Qnil, frame = Qnil; - struct gcpro gcpro1, gcpro2, gcpro3; + Lisp_Object frame = Qnil; + struct gcpro gcpro1, gcpro2; - GCPRO3 (obj, stream, the_stream); - the_stream = print_prepare (stream, &frame); + GCPRO2 (object, stream); + stream = print_prepare (stream, &frame); print_depth = 0; - write_char_internal ("\n", the_stream); - print_internal (obj, the_stream, 1); - write_char_internal ("\n", the_stream); - print_finish (the_stream, frame); + write_char_internal ("\n", stream); + print_internal (object, stream, 1); + write_char_internal ("\n", stream); + print_finish (stream, frame); UNGCPRO; - return obj; + return object; } - -/* Synched with Emacs 19.34 -- underlying implementation (incarnated - in print_error_message) is completely divergent, though. */ -DEFUN ("error-message-string", Ferror_message_string, 1, 1, 0, /* -Convert an error value (ERROR-SYMBOL . DATA) to an error message. -*/ - (data)) -{ - /* This function can GC */ - Lisp_Object stream = make_resizing_buffer_output_stream (); - struct gcpro gcpro1; - GCPRO1 (stream); +/* Print an error message for the error DATA to STREAM. This is a + complete implementation of `display-error', which used to be in + Lisp (see prim/cmdloop.el). It was ported to C so it can be used + efficiently by Ferror_message_string. Fdisplay_error and + Ferror_message_string are trivial wrappers around this function. - print_error_message (data, stream); - Lstream_flush (XLSTREAM (stream)); - UNGCPRO; - return make_string (resizing_buffer_stream_ptr (XLSTREAM (stream)), - Lstream_byte_count (XLSTREAM (stream))); -} - -/* Print an error message for the error DATA onto Lisp output stream - STREAM (suitable for the print functions). - - This is a complete implementation of `display-error', which used to - be in Lisp (see prim/cmdloop.el). It was ported to C so we can use - it in Ferror_message_string. Fdisplay_error and - Ferror_message_string are trivial wrappers to this function. */ + STREAM should be the result of canonicalize_printcharfun(). */ static void print_error_message (Lisp_Object error_object, Lisp_Object stream) { /* This function can GC */ - Lisp_Object type; + Lisp_Object type = Fcar_safe (error_object); Lisp_Object method = Qnil; - Lisp_Object tail = Qnil; - struct gcpro gcpro1; + Lisp_Object tail; - GCPRO1 (tail); - - type = Fcar_safe (error_object); + /* No need to GCPRO anything under the assumption that ERROR_OBJECT + is GCPRO'd. */ if (! (CONSP (error_object) && SYMBOLP (type) && CONSP (Fget (type, Qerror_conditions, Qnil)))) @@ -645,44 +618,40 @@ /* Default method */ { int first = 1; - Lisp_Object printcharfun = canonicalize_printcharfun (stream); int speccount = specpdl_depth (); specbind (Qprint_message_label, Qerror); tail = Fcdr (error_object); if (EQ (type, Qerror)) { - Fprinc (Fcar (tail), stream); + print_internal (Fcar (tail), stream, 0); tail = Fcdr (tail); } else { Lisp_Object errmsg = Fget (type, Qerror_message, Qnil); if (NILP (errmsg)) - Fprinc (type, stream); + print_internal (type, stream, 0); else - Fprinc (errmsg, stream); + print_internal (LISP_GETTEXT (errmsg), stream, 0); } while (!NILP (tail)) { - write_c_string (first ? ": " : ", ", printcharfun); - Fprin1 (Fcar (tail), stream); + write_c_string (first ? ": " : ", ", stream); + print_internal (Fcar (tail), stream, 1); tail = Fcdr (tail); first = 0; } unbind_to (speccount, Qnil); - UNGCPRO; return; - /* Unreached */ + /* not reached */ } error_throw: - UNGCPRO; if (NILP (method)) { - write_c_string ("Peculiar error ", - canonicalize_printcharfun (stream)); - Fprin1 (error_object, stream); + write_c_string (GETTEXT ("Peculiar error "), stream); + print_internal (error_object, stream, 1); return; } else @@ -691,13 +660,38 @@ } } +DEFUN ("error-message-string", Ferror_message_string, 1, 1, 0, /* +Convert ERROR-OBJECT to an error message, and return it. + +The format of ERROR-OBJECT should be (ERROR-SYMBOL . DATA). The +message is equivalent to the one that would be issued by +`display-error' with the same argument. +*/ + (error_object)) +{ + /* This function can GC */ + Lisp_Object result = Qnil; + Lisp_Object stream = make_resizing_buffer_output_stream (); + struct gcpro gcpro1; + GCPRO1 (stream); + + print_error_message (error_object, stream); + Lstream_flush (XLSTREAM (stream)); + result = make_string (resizing_buffer_stream_ptr (XLSTREAM (stream)), + Lstream_byte_count (XLSTREAM (stream))); + Lstream_delete (XLSTREAM (stream)); + + UNGCPRO; + return result; +} + DEFUN ("display-error", Fdisplay_error, 2, 2, 0, /* -Display an error message for ERROR-OBJECT to STREAM. +Display ERROR-OBJECT on STREAM in a user-friendly way. */ (error_object, stream)) { /* This function can GC */ - print_error_message (error_object, stream); + print_error_message (error_object, canonicalize_printcharfun (stream)); return Qnil; } @@ -707,8 +701,6 @@ Lisp_Object Vfloat_output_format; Lisp_Object Qfloat_output_format; -void -float_to_string (char *buf, double data) /* * This buffer should be at least as large as the max string size of the * largest float, printed in the biggest notation. This is undoubtably @@ -722,6 +714,8 @@ * re-writing _doprnt to be more sane)? * -wsr */ +void +float_to_string (char *buf, double data) { Bufbyte *cp, c; int width; @@ -797,12 +791,15 @@ /* Print NUMBER to BUFFER. The digits are first written in reverse order (the least significant digit first), and are then reversed. This is equivalent to sprintf(buffer, "%ld", number), only much - faster. */ + faster. + + BUFFER should accept 24 bytes. This should suffice for the longest + numbers on 64-bit machines. */ void long_to_string (char *buffer, long number) { char *p; - int i, l; + int i, len; if (number < 0) { @@ -810,6 +807,7 @@ number = -number; } p = buffer; + /* Print the digits to the string. */ do { @@ -817,15 +815,16 @@ number /= 10; } while (number); + /* And reverse them. */ - l = p - buffer - 1; - for (i = l/2; i >= 0; i--) + len = p - buffer - 1; + for (i = len / 2; i >= 0; i--) { char c = buffer[i]; - buffer[i] = buffer[l - i]; - buffer[l - i] = c; + buffer[i] = buffer[len - i]; + buffer[len - i] = c; } - buffer[l + 1] = '\0'; + buffer[len + 1] = '\0'; } static void @@ -877,7 +876,7 @@ { obj = XCAR (XCDR (obj)); GCPRO2 (obj, printcharfun); - write_char_internal ("'", printcharfun); + write_char_internal ("\'", printcharfun); UNGCPRO; print_internal (obj, printcharfun, escapeflag); return; @@ -885,6 +884,7 @@ GCPRO2 (obj, printcharfun); write_char_internal ("(", printcharfun); + { int i = 0; int max = 0; @@ -1028,7 +1028,6 @@ print_internal (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) { /* This function can GC */ - char buf[256]; QUIT; @@ -1055,13 +1054,14 @@ for (i = 0; i < print_depth; i++) if (EQ (obj, being_printed[i])) { - sprintf (buf, "#%d", i); + char buf[32]; + *buf = '#'; + long_to_string (buf + 1, i); write_c_string (buf, printcharfun); return; } } - being_printed[print_depth] = obj; print_depth++; @@ -1077,6 +1077,7 @@ case Lisp_Type_Int: #endif { + char buf[24]; long_to_string (buf, XINT (obj)); write_c_string (buf, printcharfun); break; @@ -1085,6 +1086,7 @@ case Lisp_Type_Char: { /* God intended that this be #\..., you know. */ + char buf[16]; Emchar ch = XCHAR (obj); char *p = buf; *p++ = '?'; @@ -1209,8 +1211,9 @@ default: { - /* We're in trouble if this happens! - Probably should just abort () */ + char buf[128]; + /* We're in trouble if this happens! Probably should just + abort () */ if (print_readably) error ("printing illegal data type #o%03o", (int) XTYPE (obj)); @@ -1436,8 +1439,13 @@ } /* #ifdef DEBUG_XEMACS */ -/* I don't like seeing `Note: Strange doc (not fboundp) for function */ -/* alternate-debugging-output @ 429542' -slb */ + +/* I don't like seeing `Note: Strange doc (not fboundp) for function + alternate-debugging-output @ 429542' -slb */ +/* #### Eek! Any clue how to get rid of it? In fact, how about + getting rid of this function altogether? Does anything actually + *use* it? --hniksic */ + int alternate_do_pointer; char alternate_do_string[5000]; @@ -1462,7 +1470,7 @@ alternate_do_string[alternate_do_pointer] = 0; return character; } -/* #endif /* DEBUG_XEMACS */ +/* #endif / * DEBUG_XEMACS */ DEFUN ("external-debugging-output", Fexternal_debugging_output, 1, 3, 0, /* Write CHAR-OR-STRING to stderr or stdout.
--- a/src/process-nt.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/process-nt.c Mon Aug 13 10:32:22 2007 +0200 @@ -34,6 +34,7 @@ #include <windows.h> #include <shellapi.h> +#include <signal.h> /* Implemenation-specific data. Pointed to by Lisp_Process->process_data */ struct nt_process_data @@ -54,7 +55,315 @@ { return (NT_DATA (p)->h_process); } + +/*-----------------------------------------------------------------------*/ +/* Running remote threads. See Microsoft Systems Journal 1994 Number 5 */ +/* Jeffrey Richter, Load Your 32-bit DLL into Another Process's Address..*/ +/*-----------------------------------------------------------------------*/ +typedef struct +{ + HANDLE h_process; + HANDLE h_thread; + LPVOID address; +} process_memory; + +/* + * Allocate SIZE bytes in H_PROCESS address space. Fill in PMC used + * further by other routines. Return nonzero if successful. + * + * The memory in other process is allocated by creating a suspended + * thread. Initial stack of that thread is used as the memory + * block. The thread entry point is the routine ExitThread in + * kernel32.dll, so the allocated memory is freed just by resuming the + * thread, which immediately terminates after that. + */ + +static int +alloc_process_memory (HANDLE h_process, size_t size, + process_memory* pmc) +{ + LPTHREAD_START_ROUTINE adr_ExitThread = + (LPTHREAD_START_ROUTINE) + GetProcAddress (GetModuleHandle ("kernel32"), "ExitThread"); + DWORD dw_unused; + CONTEXT context; + MEMORY_BASIC_INFORMATION mbi; + + pmc->h_process = h_process; + pmc->h_thread = CreateRemoteThread (h_process, NULL, size, + adr_ExitThread, NULL, + CREATE_SUSPENDED, &dw_unused); + if (pmc->h_thread == NULL) + return 0; + + /* Get context, for thread's stack pointer */ + context.ContextFlags = CONTEXT_CONTROL; + if (!GetThreadContext (pmc->h_thread, &context)) + goto failure; + + /* Determine base address of the committed range */ + if (sizeof(mbi) != VirtualQueryEx (h_process, +#if defined (_X86_) + (LPDWORD)context.Esp - 1, +#elif defined (_ALPHA_) + (LPDWORD)context.IntSp - 1, +#else +#error Unknown processor architecture +#endif + &mbi, sizeof(mbi))) + goto failure; + + /* Change the page protection of the allocated memory to executable, + read, and write. */ + if (!VirtualProtectEx (h_process, mbi.BaseAddress, size, + PAGE_EXECUTE_READWRITE, &dw_unused)) + goto failure; + + pmc->address = mbi.BaseAddress; + return 1; + + failure: + ResumeThread (pmc->h_thread); + pmc->address = 0; + return 0; +} + +static void +free_process_memory (process_memory* pmc) +{ + ResumeThread (pmc->h_thread); +} + +/* + * Run ROUTINE in the context of process determined by H_PROCESS. The + * routine is passed the address of DATA as parameter. CODE_END is the + * address immediately after ROUTINE's code. DATA_SIZE is the size of + * DATA structure. + * + * Note that the code must be positionally independent, and compiled + * without stack checks (they cause implicit calls into CRT so will + * fail). DATA should not refer any data in calling process, as both + * routine and its data are copied into remote process. Size of data + * and code together should not exceed one page (4K on x86 systems). + * + * Return the value returned by ROUTINE, or (DWORD)-1 if call failed. + */ +static DWORD +run_in_other_process (HANDLE h_process, + LPTHREAD_START_ROUTINE routine, LPVOID code_end, + LPVOID data, size_t data_size) +{ + process_memory pm; + size_t code_size = (LPBYTE)code_end - (LPBYTE)routine; + /* Need at most 3 extra bytes of memory, for data alignment */ + size_t total_size = code_size + data_size + 3; + LPVOID remote_data; + HANDLE h_thread; + DWORD dw_unused; + + /* Allocate memory */ + if (!alloc_process_memory (h_process, total_size, &pm)) + return (DWORD)-1; + + /* Copy code */ + if (!WriteProcessMemory (h_process, pm.address, (LPVOID)routine, + code_size, NULL)) + goto failure; + + /* Copy data */ + if (data_size) + { + remote_data = (LPBYTE)pm.address + ((code_size + 4) & ~3); + if (!WriteProcessMemory (h_process, remote_data, data, data_size, NULL)) + goto failure; + } + else + remote_data = NULL; + + /* Execute the remote copy of code, passing it remote data */ + h_thread = CreateRemoteThread (h_process, NULL, 0, + (LPTHREAD_START_ROUTINE) pm.address, + remote_data, 0, &dw_unused); + if (h_thread == NULL) + goto failure; + + /* Wait till thread finishes */ + WaitForSingleObject (h_thread, INFINITE); + + /* Free remote memory */ + free_process_memory (&pm); + + /* Return thread's exit code */ + { + DWORD exit_code; + GetExitCodeThread (h_thread, &exit_code); + CloseHandle (h_thread); + return exit_code; + } + + failure: + free_process_memory (&pm); + return (DWORD)-1; +} + +/*-----------------------------------------------------------------------*/ +/* Sending signals */ +/*-----------------------------------------------------------------------*/ + +/* + * We handle the following signals: + * + * SIGKILL, SIGTERM, SIGQUIT - These three translate to ExitProcess + * executed by the remote process + * SIGINT - The remote process is sent CTRL_BREAK_EVENT + */ + +/* + * Sending SIGKILL + */ +typedef struct +{ + void (WINAPI *adr_ExitProcess) (UINT); +} sigkill_data; + +static DWORD WINAPI +sigkill_proc (sigkill_data* data) +{ + (*data->adr_ExitProcess)(255); + return 1; +} + +/* Watermark in code space */ +static void +sigkill_code_end (void) +{ +} + +/* + * Sending break or control c + */ +typedef struct +{ + BOOL (WINAPI *adr_GenerateConsoleCtrlEvent) (DWORD, DWORD); + DWORD event; +} sigint_data; + +static DWORD WINAPI +sigint_proc (sigint_data* data) +{ + return (*data->adr_GenerateConsoleCtrlEvent) (data->event, 0); +} + +/* Watermark in code space */ +static void +sigint_code_end (void) +{ +} + +/* + * Enabling signals + */ +typedef struct +{ + BOOL (WINAPI *adr_SetConsoleCtrlHandler) (LPVOID, BOOL); +} sig_enable_data; + +static DWORD WINAPI +sig_enable_proc (sig_enable_data* data) +{ + (*data->adr_SetConsoleCtrlHandler) (NULL, FALSE); + return 1; +} + +/* Watermark in code space */ +static void +sig_enable_code_end (void) +{ +} + +/* + * Send signal SIGNO to process H_PROCESS. + * Return nonzero if successful. + */ + +/* This code assigns a return value of GetProcAddress to function pointers + of many different types. Instead of heavy obscure casts, we just disable + warnings about assignments to different function pointer types. */ +#pragma warning (disable : 4113) + +static int +send_signal (HANDLE h_process, int signo) +{ + HMODULE h_kernel = GetModuleHandle ("kernel32"); + DWORD retval; + + assert (h_kernel != NULL); + + switch (signo) + { + case SIGKILL: + case SIGTERM: + case SIGQUIT: + { + sigkill_data d; + d.adr_ExitProcess = GetProcAddress (h_kernel, "ExitProcess"); + assert (d.adr_ExitProcess); + retval = run_in_other_process (h_process, + sigkill_proc, sigkill_code_end, + &d, sizeof (d)); + break; + } + case SIGINT: + { + sigint_data d; + d.adr_GenerateConsoleCtrlEvent = + GetProcAddress (h_kernel, "GenerateConsoleCtrlEvent"); + assert (d.adr_GenerateConsoleCtrlEvent); + d.event = CTRL_C_EVENT; + retval = run_in_other_process (h_process, + sigint_proc, sigint_code_end, + &d, sizeof (d)); + break; + } + default: + assert (0); + } + + return (int)retval > 0 ? 1 : 0; +} + +/* + * Enable CTRL_C_EVENT handling in a new child process + */ +static void +enable_child_signals (HANDLE h_process) +{ + HMODULE h_kernel = GetModuleHandle ("kernel32"); + sig_enable_data d; + + assert (h_kernel != NULL); + d.adr_SetConsoleCtrlHandler = + GetProcAddress (h_kernel, "SetConsoleCtrlHandler"); + assert (d.adr_SetConsoleCtrlHandler); + run_in_other_process (h_process, + sig_enable_proc, sig_enable_code_end, + &d, sizeof (d)); +} + +#pragma warning (default : 4113) + +/* + * Signal error if SIGNO is not supported + */ +static void +validate_signal_number (int signo) +{ + if (signo != SIGKILL && signo != SIGTERM + && signo != SIGQUIT && signo != SIGINT) + error ("Signal number %d not supported", signo); +} + /*-----------------------------------------------------------------------*/ /* Process methods */ /*-----------------------------------------------------------------------*/ @@ -226,7 +535,8 @@ } err = (CreateProcess (NULL, command_line, NULL, NULL, TRUE, - CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP, + CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP + | CREATE_SUSPENDED, NULL, current_dir, &si, &pi) ? 0 : GetLastError ()); @@ -261,6 +571,10 @@ CloseHandle (pi.hProcess); } + if (!windowed) + enable_child_signals (pi.hProcess); + + ResumeThread (pi.hThread); CloseHandle (pi.hThread); /* Hack to support Windows 95 negative pids */ @@ -357,6 +671,67 @@ Lstream_flush (XLSTREAM (DATA_OUTSTREAM(p))); } +/* + * Send a signal number SIGNO to PROCESS. + * CURRENT_GROUP means send to the process group that currently owns + * the terminal being used to communicate with PROCESS. + * This is used for various commands in shell mode. + * If NOMSG is zero, insert signal-announcements into process's buffers + * right away. + * + * If we can, we try to signal PROCESS by sending control characters + * down the pty. This allows us to signal inferiors who have changed + * their uid, for which killpg would return an EPERM error. + * + * The method signals an error if the given SIGNO is not valid + */ + +static void +nt_kill_child_process (Lisp_Object proc, int signo, + int current_group, int nomsg) +{ + struct Lisp_Process *p = XPROCESS (proc); + + /* Signal error if SIGNO cannot be sent */ + validate_signal_number (signo); + + /* Send signal */ + if (!send_signal (NT_DATA(p)->h_process, signo)) + error ("Cannot send signal to process"); +} + +/* + * Kill any process in the system given its PID. + * + * Returns zero if a signal successfully sent, or + * negative number upon failure + */ +static int +nt_kill_process_by_pid (int pid, int signo) +{ + HANDLE h_process; + int send_result; + + /* Signal error if SIGNO cannot be sent */ + validate_signal_number (signo); + + /* Try to open the process with required privileges */ + h_process = OpenProcess (PROCESS_CREATE_THREAD + | PROCESS_QUERY_INFORMATION + | PROCESS_VM_OPERATION + | PROCESS_VM_WRITE, + FALSE, pid); + if (h_process == NULL) + return -1; + + send_result = send_signal (h_process, signo); + + CloseHandle (h_process); + + return send_result ? 0 : -1; +} + + /*-----------------------------------------------------------------------*/ /* Initialization */ /*-----------------------------------------------------------------------*/ @@ -372,8 +747,8 @@ PROCESS_HAS_METHOD (nt, create_process); PROCESS_HAS_METHOD (nt, update_status_if_terminated); PROCESS_HAS_METHOD (nt, send_process); - /* PROCESS_HAS_METHOD (nt, kill_child_process); */ - /* PROCESS_HAS_METHOD (nt, kill_process_by_pid); */ + PROCESS_HAS_METHOD (nt, kill_child_process); + PROCESS_HAS_METHOD (nt, kill_process_by_pid); #if 0 /* Yet todo */ #ifdef HAVE_SOCKETS PROCESS_HAS_METHOD (nt, canonicalize_host_name);
--- a/src/process.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/process.c Mon Aug 13 10:32:22 2007 +0200 @@ -1148,20 +1148,21 @@ (XLSTREAM (XPROCESS (process)->coding_outstream))); } -DEFUN ("set-process-input-coding-system", - Fset_process_input_coding_system, 2, 2, 0, /* +DEFUN ("set-process-input-coding-system", Fset_process_input_coding_system, + 2, 2, 0, /* Set PROCESS's input coding system to CODESYS. */ (process, codesys)) { codesys = Fget_coding_system (codesys); process = get_process (process); - set_decoding_stream_coding_system ( XLSTREAM ( XPROCESS (process)->coding_instream ), codesys); + set_decoding_stream_coding_system + (XLSTREAM (XPROCESS (process)->coding_instream), codesys); return Qnil; } -DEFUN ("set-process-output-coding-system", - Fset_process_output_coding_system, 2, 2, 0, /* +DEFUN ("set-process-output-coding-system", Fset_process_output_coding_system, + 2, 2, 0, /* Set PROCESS's output coding system to CODESYS. */ (process, codesys)) @@ -1169,22 +1170,22 @@ codesys = Fget_coding_system (codesys); process = get_process (process); set_encoding_stream_coding_system - ( XLSTREAM ( XPROCESS (process)->coding_outstream), codesys); + (XLSTREAM (XPROCESS (process)->coding_outstream), codesys); return Qnil; } -DEFUN ("set-process-coding-system", - Fset_process_coding_system, 1, 3, 0, /* +DEFUN ("set-process-coding-system", Fset_process_coding_system, + 1, 3, 0, /* Set coding-systems of PROCESS to DECODING and ENCODING. */ (process, decoding, encoding)) { - if(!NILP(decoding)){ - Fset_process_input_coding_system(process, decoding); - } - if(!NILP(encoding)){ - Fset_process_output_coding_system(process, encoding); - } + if (!NILP (decoding)) + Fset_process_input_coding_system (process, decoding); + + if (!NILP (encoding)) + Fset_process_output_coding_system (process, encoding); + return Qnil; } @@ -1559,7 +1560,11 @@ (process, current_group)) { /* This function can GC */ +#ifdef SIGKILL process_send_signal (process, SIGKILL, !NILP (current_group), 0); +#else + error ("kill-process: Not supported on this system"); +#endif return process; } @@ -1570,7 +1575,11 @@ (process, current_group)) { /* This function can GC */ +#ifdef SIGQUIT process_send_signal (process, SIGQUIT, !NILP (current_group), 0); +#else + error ("quit-process: Not supported on this system"); +#endif return process; } @@ -1614,10 +1623,6 @@ { CHECK_INT (pid); -#define handle_signal(NAME, VALUE) \ - else if (!strcmp ((CONST char *) name, NAME)) \ - XSETINT (sigcode, VALUE) - if (INTP (sigcode)) ; else @@ -1627,97 +1632,144 @@ CHECK_SYMBOL (sigcode); name = string_data (XSYMBOL (sigcode)->name); +#define handle_signal(signal) \ + else if (!strcmp ((CONST char *) name, #signal)) \ + XSETINT (sigcode, signal) + if (0) ; + handle_signal (SIGINT); /* ANSI */ + handle_signal (SIGILL); /* ANSI */ + handle_signal (SIGABRT); /* ANSI */ + handle_signal (SIGFPE); /* ANSI */ + handle_signal (SIGSEGV); /* ANSI */ + handle_signal (SIGTERM); /* ANSI */ + #ifdef SIGHUP - handle_signal ("SIGHUP", SIGHUP); -#endif -#ifdef SIGINT - handle_signal ("SIGINT", SIGINT); + handle_signal (SIGHUP); /* POSIX */ #endif #ifdef SIGQUIT - handle_signal ("SIGQUIT", SIGQUIT); -#endif -#ifdef SIGILL - handle_signal ("SIGILL", SIGILL); + handle_signal (SIGQUIT); /* POSIX */ #endif -#ifdef SIGABRT - handle_signal ("SIGABRT", SIGABRT); -#endif -#ifdef SIGEMT - handle_signal ("SIGEMT", SIGEMT); +#ifdef SIGTRAP + handle_signal (SIGTRAP); /* POSIX */ #endif #ifdef SIGKILL - handle_signal ("SIGKILL", SIGKILL); + handle_signal (SIGKILL); /* POSIX */ +#endif +#ifdef SIGUSR1 + handle_signal (SIGUSR1); /* POSIX */ +#endif +#ifdef SIGUSR2 + handle_signal (SIGUSR2); /* POSIX */ #endif -#ifdef SIGFPE - handle_signal ("SIGFPE", SIGFPE); +#ifdef SIGPIPE + handle_signal (SIGPIPE); /* POSIX */ +#endif +#ifdef SIGALRM + handle_signal (SIGALRM); /* POSIX */ +#endif +#ifdef SIGCHLD + handle_signal (SIGCHLD); /* POSIX */ +#endif +#ifdef SIGCONT + handle_signal (SIGCONT); /* POSIX */ #endif -#ifdef SIGBUS - handle_signal ("SIGBUS", SIGBUS); +#ifdef SIGSTOP + handle_signal (SIGSTOP); /* POSIX */ +#endif +#ifdef SIGTSTP + handle_signal (SIGTSTP); /* POSIX */ +#endif +#ifdef SIGTTIN + handle_signal (SIGTTIN); /* POSIX */ #endif -#ifdef SIGSEGV - handle_signal ("SIGSEGV", SIGSEGV); +#ifdef SIGTTOU + handle_signal (SIGTTOU); /* POSIX */ +#endif + +#ifdef SIGBUS + handle_signal (SIGBUS); /* XPG5 */ +#endif +#ifdef SIGPOLL + handle_signal (SIGPOLL); /* XPG5 */ +#endif +#ifdef SIGPROF + handle_signal (SIGPROF); /* XPG5 */ #endif #ifdef SIGSYS - handle_signal ("SIGSYS", SIGSYS); -#endif -#ifdef SIGPIPE - handle_signal ("SIGPIPE", SIGPIPE); -#endif -#ifdef SIGALRM - handle_signal ("SIGALRM", SIGALRM); -#endif -#ifdef SIGTERM - handle_signal ("SIGTERM", SIGTERM); + handle_signal (SIGSYS); /* XPG5 */ #endif #ifdef SIGURG - handle_signal ("SIGURG", SIGURG); -#endif -#ifdef SIGSTOP - handle_signal ("SIGSTOP", SIGSTOP); -#endif -#ifdef SIGTSTP - handle_signal ("SIGTSTP", SIGTSTP); -#endif -#ifdef SIGCONT - handle_signal ("SIGCONT", SIGCONT); -#endif -#ifdef SIGCHLD - handle_signal ("SIGCHLD", SIGCHLD); -#endif -#ifdef SIGTTIN - handle_signal ("SIGTTIN", SIGTTIN); -#endif -#ifdef SIGTTOU - handle_signal ("SIGTTOU", SIGTTOU); -#endif -#ifdef SIGIO - handle_signal ("SIGIO", SIGIO); + handle_signal (SIGURG); /* XPG5 */ #endif #ifdef SIGXCPU - handle_signal ("SIGXCPU", SIGXCPU); + handle_signal (SIGXCPU); /* XPG5 */ #endif #ifdef SIGXFSZ - handle_signal ("SIGXFSZ", SIGXFSZ); + handle_signal (SIGXFSZ); /* XPG5 */ #endif #ifdef SIGVTALRM - handle_signal ("SIGVTALRM", SIGVTALRM); + handle_signal (SIGVTALRM); /* XPG5 */ #endif -#ifdef SIGPROF - handle_signal ("SIGPROF", SIGPROF); + +#ifdef SIGIO + handle_signal (SIGIO); /* BSD 4.2 */ #endif #ifdef SIGWINCH - handle_signal ("SIGWINCH", SIGWINCH); + handle_signal (SIGWINCH); /* BSD 4.3 */ +#endif + +#ifdef SIGEMT + handle_signal (SIGEMT); #endif #ifdef SIGINFO - handle_signal ("SIGINFO", SIGINFO); + handle_signal (SIGINFO); +#endif +#ifdef SIGHWE + handle_signal (SIGHWE); +#endif +#ifdef SIGPRE + handle_signal (SIGPRE); +#endif +#ifdef SIGUME + handle_signal (SIGUME); +#endif +#ifdef SIGDLK + handle_signal (SIGDLK); +#endif +#ifdef SIGCPULIM + handle_signal (SIGCPULIM); +#endif +#ifdef SIGIOT + handle_signal (SIGIOT); +#endif +#ifdef SIGLOST + handle_signal (SIGLOST); #endif -#ifdef SIGUSR1 - handle_signal ("SIGUSR1", SIGUSR1); +#ifdef SIGSTKFLT + handle_signal (SIGSTKFLT); +#endif +#ifdef SIGUNUSED + handle_signal (SIGUNUSED); +#endif +#ifdef SIGDANGER + handle_signal (SIGDANGER); +#endif +#ifdef SIGMSG + handle_signal (SIGMSG); #endif -#ifdef SIGUSR2 - handle_signal ("SIGUSR2", SIGUSR2); +#ifdef SIGSOUND + handle_signal (SIGSOUND); +#endif +#ifdef SIGRETRACT + handle_signal (SIGRETRACT); +#endif +#ifdef SIGGRANT + handle_signal (SIGGRANT); +#endif +#ifdef SIGPWR + handle_signal (SIGPWR); #endif else error ("Undefined signal name %s", name); @@ -1740,9 +1792,7 @@ (process)) { /* This function can GC */ - Lisp_Object proc; - - proc = get_process (process); + Lisp_Object proc = get_process (process); /* Make sure the process is really alive. */ if (! EQ (XPROCESS (proc)->status_symbol, Qrun))
--- a/src/rangetab.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/rangetab.c Mon Aug 13 10:32:22 2007 +0200 @@ -23,35 +23,7 @@ /* Written by Ben Wing, August 1995. */ -#include <config.h> -#include "lisp.h" - -typedef struct range_table_entry range_table_entry; -struct range_table_entry -{ - EMACS_INT first; - EMACS_INT last; - Lisp_Object val; -}; - -typedef struct -{ - Dynarr_declare (range_table_entry); -} range_table_entry_dynarr; - -struct Lisp_Range_Table -{ - struct lcrecord_header header; - range_table_entry_dynarr *entries; -}; - -DECLARE_LRECORD (range_table, struct Lisp_Range_Table); -#define XRANGE_TABLE(x) \ - XRECORD (x, range_table, struct Lisp_Range_Table) -#define XSETRANGE_TABLE(x, p) XSETRECORD (x, p, range_table) -#define RANGE_TABLEP(x) RECORDP (x, range_table) -#define GC_RANGE_TABLEP(x) GC_RECORDP (x, range_table) -#define CHECK_RANGE_TABLE(x) CHECK_RECORD (x, range_table) +#include "rangetab.h" Lisp_Object Qrange_tablep; Lisp_Object Qrange_table;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/rangetab.h Mon Aug 13 10:32:22 2007 +0200 @@ -0,0 +1,59 @@ +/* XEmacs routines to deal with range tables. + Copyright (C) 1995 Sun Microsystems, Inc. + Copyright (C) 1995 Ben Wing. + +This file is part of XEmacs. + +XEmacs is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +XEmacs is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with XEmacs; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Synched up with: Not in FSF. */ + +/* Extracted from rangetab.c by O. Galibert, 1998. */ + +#ifndef _XEMACS_RANGETAB_H_ +#define _XEMACS_RANGETAB_H_ + +#include <config.h> +#include "lisp.h" + +typedef struct range_table_entry range_table_entry; +struct range_table_entry +{ + EMACS_INT first; + EMACS_INT last; + Lisp_Object val; +}; + +typedef struct +{ + Dynarr_declare (range_table_entry); +} range_table_entry_dynarr; + +struct Lisp_Range_Table +{ + struct lcrecord_header header; + range_table_entry_dynarr *entries; +}; + +DECLARE_LRECORD (range_table, struct Lisp_Range_Table); +#define XRANGE_TABLE(x) \ + XRECORD (x, range_table, struct Lisp_Range_Table) +#define XSETRANGE_TABLE(x, p) XSETRECORD (x, p, range_table) +#define RANGE_TABLEP(x) RECORDP (x, range_table) +#define GC_RANGE_TABLEP(x) GC_RECORDP (x, range_table) +#define CHECK_RANGE_TABLE(x) CHECK_RECORD (x, range_table) + +#endif
--- a/src/redisplay-msw.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/redisplay-msw.c Mon Aug 13 10:32:22 2007 +0200 @@ -71,6 +71,11 @@ static void mswindows_output_vertical_divider (struct window *w, int clear); static void mswindows_redraw_exposed_windows (Lisp_Object window, int x, int y, int width, int height); +static void mswindows_output_pixmap (struct window *w, struct display_line *dl, + Lisp_Object image_instance, int xpos, + int xoffset, int start_pixpos, int width, + face_index findex, int cursor_start, + int cursor_width, int cursor_height); typedef struct textual_run { @@ -244,26 +249,6 @@ if (!NILP (bg)) SetBkColor (hdc, COLOR_INSTANCE_MSWINDOWS_COLOR (XCOLOR_INSTANCE (bg))); - -#if 0 /* XXX Implement me */ - /* I expect that the Lisp_Image_Instance's data will point to a brush */ - if (IMAGE_INSTANCEP (bg_pmap) - && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (bg_pmap))) - { - if (XIMAGE_INSTANCE_PIXMAP_DEPTH (bg_pmap) == 0) - { - gcv.fill_style = FillOpaqueStippled; - gcv.stipple = XIMAGE_INSTANCE_X_PIXMAP (bg_pmap); - mask |= (GCStipple | GCFillStyle); - } - else - { - gcv.fill_style = FillTiled; - gcv.tile = XIMAGE_INSTANCE_X_PIXMAP (bg_pmap); - mask |= (GCTile | GCFillStyle); - } - } -#endif } @@ -285,7 +270,7 @@ of its face. ****************************************************************************/ static void -mswindows_output_blank (struct window *w, struct display_line *dl, struct rune *rb) +mswindows_output_blank (struct window *w, struct display_line *dl, struct rune *rb, int start_pixpos) { struct frame *f = XFRAME (w->frame); RECT rect = { rb->xpos, dl->ypos-dl->ascent, @@ -298,10 +283,21 @@ || !IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (bg_pmap))) bg_pmap = Qnil; - /* #### This deals only with solid colors */ - mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, Qnil, - cachel->background, Qnil); - ExtTextOut (FRAME_MSWINDOWS_DC (f), 0, 0, ETO_OPAQUE, &rect, NULL, 0, NULL); + if (!NILP(bg_pmap)) + { + mswindows_output_pixmap (w, dl, bg_pmap, + rb->xpos, rb->object.dglyph.xoffset, + start_pixpos, rb->width, rb->findex, + 0, 0, 0); + } + else + { + mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, Qnil, + cachel->background, Qnil); + + ExtTextOut (FRAME_MSWINDOWS_DC (f), 0, 0, ETO_OPAQUE, + &rect, NULL, 0, NULL); + } } @@ -483,7 +479,13 @@ this_width = mswindows_text_width_single_run (hdc, cachel, runs + i); /* #### bg_pmap should be output here */ - + if (!NILP(bg_pmap)) + { + mswindows_output_pixmap (w, dl, bg_pmap, + xpos, xoffset, + clip_start, width, findex, + 0, 0, 0); + } assert (runs[i].dimension == 1); /* XXX FIXME */ ExtTextOut (hdc, xpos, dl->ypos, NILP(bg_pmap) ? ETO_CLIPPED | ETO_OPAQUE : ETO_CLIPPED, @@ -1061,7 +1063,7 @@ else if (rb->type == RUNE_BLANK || rb->type == RUNE_HLINE) { if (rb->type == RUNE_BLANK) - mswindows_output_blank (w, dl, rb); + mswindows_output_blank (w, dl, rb, start_pixpos); else { /* #### Our flagging of when we need to redraw the @@ -1318,11 +1320,12 @@ mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, fcolor, bcolor, background_pixmap); - } - - /* XX FIXME: Get brush from background_pixmap here */ - assert(0); - FillRect (FRAME_MSWINDOWS_DC(f), &rect, brush); + FillRect (FRAME_MSWINDOWS_DC(f), &rect, brush); + } + else + { + assert(0); + } } else {
--- a/src/redisplay.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/redisplay.c Mon Aug 13 10:32:22 2007 +0200 @@ -6319,18 +6319,11 @@ /* print the current column */ case 'c': { - int col = current_column (b) + (column_number_start_at_one != 0); + int col = current_column (b) + !!column_number_start_at_one; int temp = col; int size = 2; - char *buf; - - while (temp >= 10) - { - temp /= 10; - size++; - } - - buf = alloca_array (char, size); + char buf[32]; + long_to_string (buf, col); Dynarr_add_many (mode_spec_bufbyte_string,
--- a/src/s/cygwin32.h Mon Aug 13 10:31:30 2007 +0200 +++ b/src/s/cygwin32.h Mon Aug 13 10:32:22 2007 +0200 @@ -139,7 +139,7 @@ #define DATA_END -1 #define HEAP_IN_DATA #define UNEXEC "unexcw.o" -#define BROKEN_SIGIO +/* #define BROKEN_SIGIO */ #define PROCESS_IO_BLOCKING #define strnicmp strncasecmp #ifndef HAVE_SOCKETS
--- a/src/scrollbar.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/scrollbar.c Mon Aug 13 10:32:22 2007 +0200 @@ -65,6 +65,8 @@ Lisp_Object Vscrollbar_pointer_glyph; +EXFUN (Fcenter_to_window_line, 2); + static void update_scrollbar_instance (struct window *w, int vertical, struct scrollbar_instance *instance); @@ -541,7 +543,7 @@ if (HAS_DEVMETH_P (d, create_scrollbar_instance)) { - int depth = reveal_ghost_specifiers_protected (); + int depth = unlock_ghost_specifiers_protected (); Lisp_Object frame; XSETFRAME (frame, f); call_critical_lisp_code (XDEVICE (FRAME_DEVICE (f)), @@ -556,7 +558,7 @@ { if (HAS_DEVMETH_P (d, create_scrollbar_instance)) { - int depth = reveal_ghost_specifiers_protected (); + int depth = unlock_ghost_specifiers_protected (); Lisp_Object device; XSETDEVICE (device, d); call_critical_lisp_code (d, @@ -571,7 +573,7 @@ { if (HAS_DEVMETH_P (d, create_scrollbar_instance)) { - int depth = reveal_ghost_specifiers_protected (); + int depth = unlock_ghost_specifiers_protected (); call_critical_lisp_code (d, Qinit_scrollbar_from_resources, Qglobal); @@ -741,7 +743,7 @@ bufpos = vmotion (XWINDOW (window), XINT (Fwindow_point (window)), XINT (value), 0); Fset_window_point (window, make_int (bufpos)); - Frecenter (Qzero, window); + Fcenter_to_window_line (Qzero, window); } #endif /* Athena */ zmacs_region_stays = 1; @@ -773,7 +775,7 @@ Lisp_Object value = Fcdr (object); CHECK_INT (value); Fmove_to_window_line (value, window); - Frecenter (Qzero, window); + Fcenter_to_window_line (Qzero, window); } #endif /* Athena */ zmacs_region_stays = 1; @@ -791,7 +793,7 @@ { Lisp_Object orig_pt = Fwindow_point (window); Fset_window_point (window, Fpoint_min (Fwindow_buffer (window))); - Frecenter (Qzero, window); + Fcenter_to_window_line (Qzero, window); scrollbar_reset_cursor (window, orig_pt); zmacs_region_stays = 1; return Qnil; @@ -808,7 +810,7 @@ { Lisp_Object orig_pt = Fwindow_point (window); Fset_window_point (window, Fpoint_max (Fwindow_buffer (window))); - Frecenter (make_int (-3), window); + Fcenter_to_window_line (make_int (-3), window); scrollbar_reset_cursor (window, orig_pt); zmacs_region_stays = 1; return Qnil;
--- a/src/sheap.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/sheap.c Mon Aug 13 10:32:22 2007 +0200 @@ -48,11 +48,13 @@ if (!static_heap_initialized) { +#ifdef VALMASK if (((unsigned long) static_heap_base & ~VALMASK) != 0) { printf ("error: The heap was allocated in upper memory.\n"); exit (-1); } +#endif static_heap_base=(char*)ALIGN_ALLOC(static_heap_buffer); static_heap_ptr=static_heap_base; static_heap_size=STATIC_HEAP_SIZE -
--- a/src/signal.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/signal.c Mon Aug 13 10:32:22 2007 +0200 @@ -631,119 +631,132 @@ /* initialization */ /************************************************************************/ +/* If we've been nohup'ed, keep it that way. + This allows `nohup xemacs &' to work. + More generally, if a normally fatal signal has been redirected + to SIG_IGN by our invocation environment, trust the environment. + This keeps xemacs from being killed by a SIGQUIT intended for a + different process after having been backgrounded under a + non-job-control shell! */ +static void +handle_signal_if_fatal (int signo) +{ + if (signal (signo, fatal_error_signal) == SIG_IGN) + signal (signo, SIG_IGN); +} + void init_signals_very_early (void) { - /* Catch all signals that would kill us. */ - if (! noninteractive || initialized) - { - /* Don't catch these signals in batch mode if not initialized. - On some machines, this sets static data that would make - signal fail to work right when the dumped Emacs is run. */ + /* Catch all signals that would kill us. + Don't catch these signals in batch mode if not initialized. + On some machines, this sets static data that would make + signal fail to work right when the dumped Emacs is run. */ + if (noninteractive && !initialized) + return; + + handle_signal_if_fatal (SIGILL); /* ANSI */ + handle_signal_if_fatal (SIGABRT); /* ANSI */ + handle_signal_if_fatal (SIGFPE); /* ANSI */ + handle_signal_if_fatal (SIGSEGV); /* ANSI */ + handle_signal_if_fatal (SIGTERM); /* ANSI */ + + #ifdef SIGHUP - /* If we've been nohup'ed, keep it that way. */ - if (signal (SIGHUP, fatal_error_signal) == SIG_IGN) - signal (SIGHUP, SIG_IGN); + handle_signal_if_fatal (SIGHUP); /* POSIX */ #endif #ifdef SIGQUIT - signal (SIGQUIT, fatal_error_signal); -#endif -#ifdef SIGILL - signal (SIGILL, fatal_error_signal); + handle_signal_if_fatal (SIGQUIT); /* POSIX */ #endif #ifdef SIGTRAP - signal (SIGTRAP, fatal_error_signal); + handle_signal_if_fatal (SIGTRAP); /* POSIX */ +#endif +#ifdef SIGUSR1 + handle_signal_if_fatal (SIGUSR1); /* POSIX */ +#endif +#ifdef SIGUSR2 + handle_signal_if_fatal (SIGUSR2); /* POSIX */ +#endif +#ifdef SIGPIPE + handle_signal_if_fatal (SIGPIPE); /* POSIX */ +#endif +#ifdef SIGALRM + /* This will get reset later, once we're + capable of handling it properly. */ + handle_signal_if_fatal (SIGALRM); /* POSIX */ +#endif + + +#ifdef SIGBUS + handle_signal_if_fatal (SIGBUS); /* XPG5 */ #endif -#ifdef SIGABRT - signal (SIGABRT, fatal_error_signal); +#ifdef SIGSYS + handle_signal_if_fatal (SIGSYS); /* XPG5 */ +#endif +#ifdef SIGXCPU + handle_signal_if_fatal (SIGXCPU); /* XPG5 */ +#endif +#ifdef SIGXFSZ + handle_signal_if_fatal (SIGXFSZ); /* XPG5 */ #endif +#ifdef SIGVTALRM + handle_signal_if_fatal (SIGVTALRM); /* XPG5 */ +#endif +#ifdef SIGPROF + /* Messes up the REAL profiler */ + /* handle_signal_if_fatal (SIGPROF); */ /* XPG5 */ +#endif + + #ifdef SIGHWE - signal (SIGHWE, fatal_error_signal); + handle_signal_if_fatal (SIGHWE); #endif #ifdef SIGPRE - signal (SIGPRE, fatal_error_signal); + handle_signal_if_fatal (SIGPRE); #endif #ifdef SIGORE - signal (SIGORE, fatal_error_signal); + handle_signal_if_fatal (SIGORE); #endif #ifdef SIGUME - signal (SIGUME, fatal_error_signal); + handle_signal_if_fatal (SIGUME); #endif #ifdef SIGDLK - signal (SIGDLK, fatal_error_signal); + handle_signal_if_fatal (SIGDLK); #endif #ifdef SIGCPULIM - signal (SIGCPULIM, fatal_error_signal); + handle_signal_if_fatal (SIGCPULIM); #endif #ifdef SIGIOT - signal (SIGIOT, fatal_error_signal); + handle_signal_if_fatal (SIGIOT); #endif #ifdef SIGEMT - signal (SIGEMT, fatal_error_signal); -#endif - signal (SIGFPE, fatal_error_signal); -#ifdef SIGBUS - signal (SIGBUS, fatal_error_signal); -#endif - signal (SIGSEGV, fatal_error_signal); -#ifdef SIGSYS - signal (SIGSYS, fatal_error_signal); -#endif -#ifdef SIGPIPE - signal (SIGPIPE, fatal_error_signal); + handle_signal_if_fatal (SIGEMT); #endif - signal (SIGTERM, fatal_error_signal); -#ifdef SIGXCPU - signal (SIGXCPU, fatal_error_signal); -#endif -#ifdef SIGXFSZ - signal (SIGXFSZ, fatal_error_signal); -#endif /* SIGXFSZ */ - -#ifdef SIGDANGER - /* This just means available memory is getting low. */ - signal (SIGDANGER, memory_warning_signal); -#endif - #ifdef SIGLOST - signal (SIGLOST, fatal_error_signal); + handle_signal_if_fatal (SIGLOST); #endif #ifdef SIGSTKFLT /* coprocessor stack fault under Linux */ - signal (SIGSTKFLT, fatal_error_signal); -#endif -#ifdef SIGUSR1 - signal (SIGUSR1, fatal_error_signal); -#endif -#ifdef SIGUSR2 - signal (SIGUSR2, fatal_error_signal); -#endif -#ifdef SIGALRM - /* This will get reset later, once we're capable of handling - this properly. */ - signal (SIGALRM, fatal_error_signal); -#endif -#ifdef SIGVTALRM - signal (SIGVTALRM, fatal_error_signal); -#endif -#ifdef SIGPROF - /* Messes up the REAL profiler */ - /* signal (SIGPROF, fatal_error_signal); */ + handle_signal_if_fatal (SIGSTKFLT); #endif #ifdef SIGUNUSED /* exists under Linux, and will kill process! */ - signal (SIGUNUSED, fatal_error_signal); + handle_signal_if_fatal (SIGUNUSED); #endif #ifdef AIX /* 20 is SIGCHLD, 21 is SIGTTIN, 22 is SIGTTOU. */ #ifndef _I386 - signal (SIGIOINT, fatal_error_signal); + handle_signal_if_fatal (SIGIOINT); #endif - signal (SIGGRANT, fatal_error_signal); - signal (SIGRETRACT, fatal_error_signal); - signal (SIGSOUND, fatal_error_signal); - signal (SIGMSG, fatal_error_signal); + handle_signal_if_fatal (SIGGRANT); + handle_signal_if_fatal (SIGRETRACT); + handle_signal_if_fatal (SIGSOUND); + handle_signal_if_fatal (SIGMSG); #endif /* AIX */ - } + +#ifdef SIGDANGER + /* This just means available memory is getting low. */ + signal (SIGDANGER, memory_warning_signal); +#endif } void @@ -766,7 +779,7 @@ init_async_timeouts (); #ifdef SIGIO signal (SIGIO, input_available_signal); -# ifdef SIGPOLL +# ifdef SIGPOLL /* XPG5 */ /* Some systems (e.g. Motorola SVR4) losingly have different values for SIGIO and SIGPOLL, and send SIGPOLL instead of SIGIO. On those same systems, an uncaught SIGPOLL kills the
--- a/src/specifier.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/specifier.c Mon Aug 13 10:32:22 2007 +0200 @@ -24,7 +24,9 @@ /* Design by Ben Wing; Original version by Chuck Thompson; - rewritten by Ben Wing */ + rewritten by Ben Wing; + Magic specifiers by Kirill Katsnelson; +*/ #include <config.h> #include "lisp.h" @@ -69,14 +71,14 @@ /* Do NOT mark through this, or specifiers will never be GC'd. */ static Lisp_Object Vall_specifiers; -static Lisp_Object Vreveal_ghoste_specifiers; +static Lisp_Object Vunlock_ghost_specifiers; /* #### The purpose of this is to check for inheritance loops in specifiers that can inherit from other specifiers, but it's not yet implemented. #### Look into this for 19.14. */ -static Lisp_Object_dynarr current_specifiers; +/* static Lisp_Object_dynarr current_specifiers; */ static void recompute_cached_specifier_everywhere (Lisp_Object specifier); @@ -303,8 +305,8 @@ internal_equal (s1->device_specs, s2->device_specs, depth) && internal_equal (s1->frame_specs, s2->frame_specs, depth) && internal_equal (s1->window_specs, s2->window_specs, depth) && - internal_equal (s1->buffer_specs, s2->buffer_specs, depth)); - /* #### Why do not compare fallbacks here? */ + internal_equal (s1->buffer_specs, s2->buffer_specs, depth) && + internal_equal (s1->fallback, s2->fallback, depth)); if (retval && HAS_SPECMETH_P (s1, equal)) retval = SPECMETH (s1, equal, (o1, o2, depth - 1)); @@ -584,8 +586,8 @@ signal_simple_error ("Invalid specifier locale or locale type", locale); } -DEFUN ("specifier-locale-type-from-locale", - Fspecifier_locale_type_from_locale, 1, 1, 0, /* +DEFUN ("specifier-locale-type-from-locale", Fspecifier_locale_type_from_locale, + 1, 1, 0, /* Given a specifier LOCALE, return its type. */ (locale)) @@ -938,8 +940,8 @@ } } -DEFUN ("device-matching-specifier-tag-list", - Fdevice_matching_specifier_tag_list, 0, 1, 0, /* +DEFUN ("device-matching-specifier-tag-list", Fdevice_matching_specifier_tag_list, + 0, 1, 0, /* Return a list of all specifier tags matching DEVICE. DEVICE defaults to the selected device if omitted. */ @@ -1237,7 +1239,7 @@ return SPEC_PREPEND; /* not reached */ } -/* Given a specifier object SPEC, return its bodily specifier for a +/* Given a specifier object SPEC, return bodily specifier if SPEC is a ghost specifier, otherwise return the object itself */ static Lisp_Object @@ -1247,36 +1249,35 @@ ? XSPECIFIER(spec)->magic_parent : spec); } -/* Given a specifier object SPEC, return a specifier to be operated on - by external lisp function. This is a ghost specifier for a magic - specifier when and only when Vreveal_ghoste_specifiers is non-nil, - otherwise SPEC itself. +/* Signal error if (specifier SPEC is read-only. + Read only are ghost specifiers unless Vunlock_ghost_specifiers is + non-nil. All other specifiers are read-write. */ -static Lisp_Object -maybe_ghost_specifier (Lisp_Object spec) +static void +check_modifiable_specifier (Lisp_Object spec) { - return (!NILP (Vreveal_ghoste_specifiers) - && BODILY_SPECIFIER_P (XSPECIFIER (spec)) - ? XSPECIFIER(spec)->fallback : spec); + if (NILP (Vunlock_ghost_specifiers) + && GHOST_SPECIFIER_P (XSPECIFIER (spec))) + signal_simple_error ("Attempt to modify read-only specifier", + list1 (spec)); } /* Helper function which unwind protects the value of - Vreveal_ghoste_specifiers, then sets it to non-nil value */ - + Vunlock_ghost_specifiers, then sets it to non-nil value */ static Lisp_Object -restore_reveal_value (Lisp_Object val) +restore_unlock_value (Lisp_Object val) { - Vreveal_ghoste_specifiers = val; + Vunlock_ghost_specifiers = val; return val; } int -reveal_ghost_specifiers_protected (void) +unlock_ghost_specifiers_protected (void) { int depth = specpdl_depth (); - record_unwind_protect (restore_reveal_value, - Vreveal_ghoste_specifiers); - Vreveal_ghoste_specifiers = Qt; + record_unwind_protect (restore_unlock_value, + Vunlock_ghost_specifiers); + Vunlock_ghost_specifiers = Qt; return depth; } @@ -1844,6 +1845,8 @@ struct gcpro gcpro1; CHECK_SPECIFIER (specifier); + check_modifiable_specifier (specifier); + locale = decode_locale (locale); check_valid_instantiator (instantiator, decode_specifier_type @@ -1856,8 +1859,7 @@ inst_list = list1 (Fcons (tag_set, instantiator)); GCPRO1 (inst_list); - specifier_add_spec (maybe_ghost_specifier (specifier), - locale, inst_list, add_meth); + specifier_add_spec (specifier, locale, inst_list, add_meth); recompute_cached_specifier_everywhere (specifier); RETURN_UNGCPRO (Qnil); } @@ -1895,6 +1897,8 @@ Lisp_Object rest; CHECK_SPECIFIER (specifier); + check_modifiable_specifier (specifier); + check_valid_spec_list (spec_list, decode_specifier_type (Fspecifier_type (specifier), ERROR_ME), @@ -1908,8 +1912,7 @@ Lisp_Object locale = XCAR (specification); Lisp_Object inst_list = XCDR (specification); - specifier_add_spec (maybe_ghost_specifier (specifier), - locale, inst_list, add_meth); + specifier_add_spec (specifier, locale, inst_list, add_meth); } recompute_cached_specifier_everywhere (specifier); return Qnil; @@ -1920,9 +1923,9 @@ Lisp_Object locale, Lisp_Object tag_set, Lisp_Object how_to_add) { - int depth = reveal_ghost_specifiers_protected (); - Fadd_spec_to_specifier (specifier, instantiator, locale, - tag_set, how_to_add); + int depth = unlock_ghost_specifiers_protected (); + Fadd_spec_to_specifier (XSPECIFIER(specifier)->fallback, + instantiator, locale, tag_set, how_to_add); unbind_to (depth, Qnil); } @@ -2013,8 +2016,7 @@ CHECK_SPECIFIER (specifier); cl.head = cl.tail = Qnil; GCPRO2 (cl.head, cl.tail); - map_specifier (maybe_ghost_specifier (specifier), - locale, specifier_spec_list_mapfun, + map_specifier (specifier, locale, specifier_spec_list_mapfun, tag_set, exact_p, &cl); UNGCPRO; return cl.head; @@ -2058,11 +2060,9 @@ tag_set = decode_specifier_tag_set (tag_set); tag_set = canonicalize_tag_set (tag_set); RETURN_UNGCPRO - (specifier_get_external_inst_list (maybe_ghost_specifier (specifier), - locale, + (specifier_get_external_inst_list (specifier, locale, locale_type_from_locale (locale), - tag_set, !NILP (exact_p), - 1, 1)); + tag_set, !NILP (exact_p), 1, 1)); } else return Fspecifier_spec_list (specifier, locale, tag_set, exact_p); @@ -2109,8 +2109,10 @@ (specifier, locale, tag_set, exact_p)) { CHECK_SPECIFIER (specifier); - map_specifier (maybe_ghost_specifier (specifier), locale, - remove_specifier_mapfun, tag_set, exact_p, 0); + check_modifiable_specifier (specifier); + + map_specifier (specifier, locale, remove_specifier_mapfun, + tag_set, exact_p, 0); recompute_cached_specifier_everywhere (specifier); return Qnil; } @@ -2119,8 +2121,9 @@ remove_ghost_specifier (Lisp_Object specifier, Lisp_Object locale, Lisp_Object tag_set, Lisp_Object exact_p) { - int depth = reveal_ghost_specifiers_protected (); - Fremove_specifier (specifier, locale, tag_set, exact_p); + int depth = unlock_ghost_specifiers_protected (); + Fremove_specifier (XSPECIFIER(specifier)->fallback, + locale, tag_set, exact_p); unbind_to (depth, Qnil); } @@ -2202,14 +2205,15 @@ else { CHECK_SPECIFIER (dest); + check_modifiable_specifier (dest); if (XSPECIFIER (dest)->methods != XSPECIFIER (specifier)->methods) error ("Specifiers not of same type"); } cl.dest = dest; GCPRO1 (dest); - map_specifier (maybe_ghost_specifier (specifier), locale, - copy_specifier_mapfun, tag_set, exact_p, &cl); + map_specifier (specifier, locale, copy_specifier_mapfun, + tag_set, exact_p, &cl); UNGCPRO; recompute_cached_specifier_everywhere (dest); return dest; @@ -2447,7 +2451,9 @@ device = domain; else /* #### dmoore - dammit, this should just signal an error or something - shouldn't it? */ + shouldn't it? + #### No. Errors are handled in Lisp primitives implementation. + Invalid domain is a design error here - kkm. */ abort (); if (NILP (buffer) && !NILP (window)) @@ -2581,8 +2587,7 @@ CHECK_SPECIFIER (specifier); domain = decode_domain (domain); - instance = specifier_instance (maybe_ghost_specifier (specifier), - Qunbound, domain, ERROR_ME, 0, + instance = specifier_instance (specifier, Qunbound, domain, ERROR_ME, 0, !NILP (no_fallback), Qzero); return UNBOUNDP (instance) ? default_ : instance; } @@ -2619,14 +2624,13 @@ ERROR_ME); domain = decode_domain (domain); - instance = specifier_instance (maybe_ghost_specifier (specifier), - matchspec, domain, ERROR_ME, + instance = specifier_instance (specifier, matchspec, domain, ERROR_ME, 0, !NILP (no_fallback), Qzero); return UNBOUNDP (instance) ? default_ : instance; } -DEFUN ("specifier-instance-from-inst-list", - Fspecifier_instance_from_inst_list, 3, 4, 0, /* +DEFUN ("specifier-instance-from-inst-list", Fspecifier_instance_from_inst_list, + 3, 4, 0, /* Attempt to convert a particular inst-list into an instance. This attempts to instantiate INST-LIST in the given DOMAIN, as if INST-LIST existed in a specification in SPECIFIER. If @@ -2644,18 +2648,17 @@ check_valid_domain (domain); check_valid_inst_list (inst_list, sp->methods, ERROR_ME); GCPRO1 (built_up_list); - built_up_list = build_up_processed_list (maybe_ghost_specifier (specifier), - domain, inst_list); + built_up_list = build_up_processed_list (specifier, domain, inst_list); if (!NILP (built_up_list)) - val = specifier_instance_from_inst_list (maybe_ghost_specifier (specifier), - Qunbound, domain, built_up_list, - ERROR_ME, 0, Qzero); + val = specifier_instance_from_inst_list (specifier, Qunbound, domain, + built_up_list, ERROR_ME, + 0, Qzero); UNGCPRO; return UNBOUNDP (val) ? default_ : val; } -DEFUN ("specifier-matching-instance-from-inst-list", - Fspecifier_matching_instance_from_inst_list, 4, 5, 0, /* +DEFUN ("specifier-matching-instance-from-inst-list", Fspecifier_matching_instance_from_inst_list, + 4, 5, 0, /* Attempt to convert a particular inst-list into an instance. This attempts to instantiate INST-LIST in the given DOMAIN \(as if INST-LIST existed in a specification in SPECIFIER), @@ -2679,12 +2682,11 @@ check_valid_domain (domain); check_valid_inst_list (inst_list, sp->methods, ERROR_ME); GCPRO1 (built_up_list); - built_up_list = build_up_processed_list (maybe_ghost_specifier (specifier), - domain, inst_list); + built_up_list = build_up_processed_list (specifier, domain, inst_list); if (!NILP (built_up_list)) - val = specifier_instance_from_inst_list (maybe_ghost_specifier (specifier), - matchspec, domain, built_up_list, - ERROR_ME, 0, Qzero); + val = specifier_instance_from_inst_list (specifier, matchspec, domain, + built_up_list, ERROR_ME, + 0, Qzero); UNGCPRO; return UNBOUNDP (val) ? default_ : val; } @@ -3130,6 +3132,6 @@ Vuser_defined_tags = Qnil; staticpro (&Vuser_defined_tags); - Vreveal_ghoste_specifiers = Qnil; - staticpro (&Vreveal_ghoste_specifiers); + Vunlock_ghost_specifiers = Qnil; + staticpro (&Vunlock_ghost_specifiers); }
--- a/src/specifier.h Mon Aug 13 10:31:30 2007 +0200 +++ b/src/specifier.h Mon Aug 13 10:32:22 2007 +0200 @@ -35,7 +35,13 @@ A magic specifier consists of two specifier objects. The first one behaves like a normal specifier in all sences. The second one, a - ghost specifier, is a fallback value for the first one. + ghost specifier, is a fallback value for the first one, and contains + values provided by window system, resources etc. which reflect + default settings for values being specified. + + A magic specifier has an "ultimate" fallback value, as any usual + specifier does. This value, an inst-list, is stored in the fallback + slot of the ghost specifier object. Ghost specifiers have the following properties: - Have back pointers to their parent specifiers. @@ -43,15 +49,16 @@ data. - Have the same methods structure pointer. - Share parent's caching scheme. - - Store fallback value instead of their parent. + - Store fallback value instead of their parents. Ghost specifiers normally are not modifiable at the lisp level, and - only used to supply fallback instance values. Although, under - certain rare conditions, all functions that modify specifiers - operate on ghost objects. This behavior is controlled by the global - variable Vreveal_ghoste_specifiers. It is not exposed to lisp, and - is set during calls to lisp functions which initialize global, - device and frame defaults, such as + only used to supply fallback instance values. They are accessible + via (specifier-fallback), but are read-only. Although, under + certain rare conditions, modification of ghost objects is allowed. + This behavior is controlled by the global variable + Vunlock_ghost_specifiers. It is not exposed to lisp, and is set + during calls to lisp functions which initialize global, device and + frame defaults, such as init-{global,frame,device}-{faces,toolbars,etc}. Thus, values supplied by resources or other means of a window system @@ -63,23 +70,15 @@ Rules of conduct for magic specifiers ------------------------------------- - 1. All functions exposed to lisp operate on a ghost specifier when - Vreveal_ghoste_specifiers is non-nil. This includes both - modifying and non-modifying functions, such as - Fspecifier_instance, for symmetry and consistency. - 2. These functions deal with the above condition internally, passing - mangled specifier pointer to internal functions. The internal - functions always work on a specifier passed, and do not regard - the value of Vreveal_ghoste_specifiers. - 3. recompute_*() functions always operate on the whole specifier + 1. recompute_*() functions always operate on the whole specifier when passed only a ghost object, by substituting it with their parent bodily object. - 4. All specifier methods, except for instantiate method, are passed + 2. All specifier methods, except for instantiate method, are passed the bodily object of the magic specifier. Instantiate method is passed the specifier being instantiated. - 5. Only bodily objects are passed to set_specifier_caching function, + 3. Only bodily objects are passed to set_specifier_caching function, and only these may be cached. - 6. All specifiers are added to Vall_specifiers list, both bodily and + 4. All specifiers are added to Vall_specifiers list, both bodily and ghost. The pair of objects is always removed from the list at the same time. */ @@ -139,7 +138,10 @@ safely. DEPTH is a lisp integer denoting current depth of instantiation - calls. #### WTF a method can do with this? + calls. This parameter should be passed as the initial depth value + to functions which also instantiate specifiers (of which I can + name specifier_instance) to avoid creating "external" + specification loops. This method must presume that both INSTANTIATOR and MATCSPEC are already validated by the corresponding validate_* methods, and @@ -412,15 +414,15 @@ void recompute_all_cached_specifiers_in_window (struct window *w); void recompute_all_cached_specifiers_in_frame (struct frame *f); -/* Counterparts of Fadd_spec_to_specifier and Fremove_specifier, - which operate directly on ghost objects */ +/* Counterparts of Fadd_spec_to_specifier and Fremove_specifier, which + operate directly on ghost objects given a magic specifier. */ void add_spec_to_ghost_specifier (Lisp_Object specifier, Lisp_Object instantiator, Lisp_Object locale, Lisp_Object tag_set, Lisp_Object how_to_add); void remove_ghost_specifier (Lisp_Object specifier, Lisp_Object locale, Lisp_Object tag_set, Lisp_Object exact_p); -int reveal_ghost_specifiers_protected (void); +int unlock_ghost_specifiers_protected (void); void cleanup_specifiers (void); void prune_specifiers (int (*obj_marked_p) (Lisp_Object));
--- a/src/symbols.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/symbols.c Mon Aug 13 10:32:22 2007 +0200 @@ -2888,8 +2888,8 @@ bfwd->harg[htype], Qnil); } -DEFUN ("dontusethis-set-symbol-value-handler", - Fdontusethis_set_symbol_value_handler, 3, 5, 0, /* +DEFUN ("dontusethis-set-symbol-value-handler", Fdontusethis_set_symbol_value_handler, + 3, 5, 0, /* Don't you dare use this. If you do, suffer the wrath of Ben, who is likely to rename this function (or change the semantics of its arguments) without
--- a/src/symsinit.h Mon Aug 13 10:31:30 2007 +0200 +++ b/src/symsinit.h Mon Aug 13 10:32:22 2007 +0200 @@ -90,7 +90,7 @@ void syms_of_free_hook (void); void syms_of_general (void); void syms_of_glyphs_x (void); -void syms_of_glyphs_read (void); +void syms_of_glyphs_eimage (void); void syms_of_glyphs_mswindows (void); void syms_of_glyphs (void); void syms_of_gui_x (void); @@ -186,7 +186,7 @@ /* Initialize the image instantiator types (dump-time only). */ void image_instantiator_format_create (void); -void image_instantiator_format_create_glyphs_read (void); +void image_instantiator_format_create_glyphs_eimage (void); void image_instantiator_format_create_glyphs_x (void); void image_instantiator_format_create_glyphs_mswindows (void); @@ -251,7 +251,7 @@ void vars_of_frame_x (void); void vars_of_frame (void); void vars_of_glyphs_x (void); -void vars_of_glyphs_read (void); +void vars_of_glyphs_eimage (void); void vars_of_glyphs_mswindows (void); void vars_of_glyphs (void); void vars_of_gui_x (void); @@ -360,6 +360,7 @@ void init_event_tty_late (void); void init_event_mswindows_late (void); void init_event_unixoid (void); +void init_hpplay (void); void init_lread (void); void init_macros (void); /* Not named init_process in order to avoid conflict with NS 3.3 */
--- a/src/sysdep.h Mon Aug 13 10:31:30 2007 +0200 +++ b/src/sysdep.h Mon Aug 13 10:32:22 2007 +0200 @@ -158,16 +158,8 @@ # ifdef strerror # undef strerror # endif -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#if ((__GNUC__ == 2) && (__GNUC_MINOR__ > 7)) || ((__GNUC__ > 2)) -char *strerror (int); -#else CONST char *strerror (int); #endif -#else -CONST char *strerror (int); -#endif -#endif #ifdef WINDOWSNT void mswindows_set_errno (unsigned long win32_error);
--- a/src/toolbar-msw.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/toolbar-msw.c Mon Aug 13 10:32:22 2007 +0200 @@ -1,5 +1,9 @@ /* toolbar implementation -- mswindows interface. - Copyright (C) 1998 Free Software Foundation. + Copyright (C) 1995 Board of Trustees, University of Illinois. + Copyright (C) 1995 Sun Microsystems, Inc. + Copyright (C) 1995, 1996 Ben Wing. + Copyright (C) 1996 Chuck Thompson. + Copyright (C) 1998 Andy Piper. This file is part of XEmacs.
--- a/src/toolbar.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/toolbar.c Mon Aug 13 10:32:22 2007 +0200 @@ -721,14 +721,18 @@ return first_button; } -static int -set_frame_toolbar (struct frame *f, enum toolbar_pos pos, int first_time_p) +static void +set_frame_toolbar (struct frame *f, enum toolbar_pos pos) { Lisp_Object toolbar, buttons; struct window *w = XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)); Lisp_Object buffer = w->buffer; - int visible = FRAME_THEORETICAL_TOOLBAR_SIZE (f, pos); + if (!f->toolbar_changed + && !NILP (f->toolbar_data[pos]) + && EQ (FRAME_TOOLBAR_DATA (f, pos)->last_toolbar_buffer, buffer)) + return; + toolbar = w->toolbar[pos]; if (NILP (f->toolbar_data[pos])) @@ -741,60 +745,29 @@ XSETTOOLBAR_DATA (f->toolbar_data[pos], td); } - buttons = visible ? compute_frame_toolbar_buttons (f, pos, toolbar) : Qnil; + buttons = (FRAME_REAL_TOOLBAR_VISIBLE (f, pos) + ? compute_frame_toolbar_buttons (f, pos, toolbar) : Qnil); FRAME_TOOLBAR_DATA (f, pos)->last_toolbar_buffer = buffer; FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons = buttons; - - return visible; } -#define COMPUTE_TOOLBAR_DATA(position) \ - do \ - { \ - local_toolbar_changed = \ - (f->toolbar_changed \ - || NILP (f->toolbar_data[position]) \ - || (!EQ (FRAME_TOOLBAR_DATA (f, position)->last_toolbar_buffer, \ - XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f))->buffer))); \ - \ - toolbar_was_visible = \ - (!NILP (f->toolbar_data[position]) \ - && !NILP (FRAME_TOOLBAR_DATA (f, position)->toolbar_buttons)); \ - toolbar_will_be_visible = toolbar_was_visible; \ - \ - if (local_toolbar_changed) \ - toolbar_will_be_visible = \ - set_frame_toolbar (f, position, first_time_p); \ - \ - toolbar_visibility_changed = \ - (toolbar_was_visible != toolbar_will_be_visible); \ - \ - if (toolbar_visibility_changed) \ - frame_changed_size = 1; \ - } while (0) - static void compute_frame_toolbars_data (struct frame *f, int first_time_p) { - int local_toolbar_changed; - int toolbar_was_visible, toolbar_will_be_visible; - int toolbar_visibility_changed; - int frame_changed_size = 0; + set_frame_toolbar (f, TOP_TOOLBAR); + set_frame_toolbar (f, BOTTOM_TOOLBAR); + set_frame_toolbar (f, LEFT_TOOLBAR); + set_frame_toolbar (f, RIGHT_TOOLBAR); - COMPUTE_TOOLBAR_DATA (TOP_TOOLBAR); - COMPUTE_TOOLBAR_DATA (BOTTOM_TOOLBAR); - COMPUTE_TOOLBAR_DATA (LEFT_TOOLBAR); - COMPUTE_TOOLBAR_DATA (RIGHT_TOOLBAR); - - /* The frame itself doesn't actually change size, but the usable - text area does. All we have to do is call change_frame_size with - the current height and width parameters and it will readjust for - all changes in the toolbars. */ - if (frame_changed_size && !first_time_p) - change_frame_size (f, FRAME_HEIGHT (f), FRAME_WIDTH (f), 0); + if (!first_time_p) + { + int height, width; + pixel_to_char_size (f, FRAME_PIXWIDTH(f), FRAME_PIXHEIGHT(f), + &width, &height); + change_frame_size (f, height, width, 0); + } } -#undef COMPUTE_TOOLBAR_DATA void update_frame_toolbars (struct frame *f) @@ -806,7 +779,7 @@ last_toolbar_buffer value for any of the toolbars, then the toolbars need to be recomputed. */ if ((HAS_DEVMETH_P (d, output_frame_toolbars)) - && (f->toolbar_changed + && (f->toolbar_changed || f->frame_changed || f->clear || !EQ (FRAME_TOOLBAR_BUFFER (f, TOP_TOOLBAR), buffer) || !EQ (FRAME_TOOLBAR_BUFFER (f, BOTTOM_TOOLBAR), buffer) || !EQ (FRAME_TOOLBAR_BUFFER (f, LEFT_TOOLBAR), buffer) @@ -1230,6 +1203,17 @@ } +/* + Helper for invalidating the real specifier when default + specifier caching changes +*/ +static void +recompute_overlaying_specifier (Lisp_Object real_one[4]) +{ + enum toolbar_pos pos = decode_toolbar_position (Vdefault_toolbar_position); + Fset_specifier_dirty_flag (real_one[pos]); +} + static void toolbar_specs_changed (Lisp_Object specifier, struct window *w, Lisp_Object oldval) @@ -1245,9 +1229,7 @@ default_toolbar_specs_changed (Lisp_Object specifier, struct window *w, Lisp_Object oldval) { - enum toolbar_pos pos = decode_toolbar_position (Vdefault_toolbar_position); - - Fset_specifier_dirty_flag (Vtoolbar[pos]); + recompute_overlaying_specifier (Vtoolbar); } static void @@ -1313,12 +1295,7 @@ default_toolbar_size_changed_in_frame (Lisp_Object specifier, struct frame *f, Lisp_Object oldval) { - enum toolbar_pos pos = decode_toolbar_position (Vdefault_toolbar_position); - - Fset_specifier_dirty_flag (Vtoolbar_size[pos]); - - /* Let redisplay know that something has possibly changed. */ - MARK_TOOLBAR_CHANGED; + recompute_overlaying_specifier (Vtoolbar_size); } static void @@ -1326,12 +1303,7 @@ struct frame *f, Lisp_Object oldval) { - enum toolbar_pos pos = decode_toolbar_position (Vdefault_toolbar_position); - - Fset_specifier_dirty_flag (Vtoolbar_border_width[pos]); - - /* Let redisplay know that something has possibly changed. */ - MARK_TOOLBAR_CHANGED; + recompute_overlaying_specifier (Vtoolbar_border_width); } static void @@ -1339,14 +1311,39 @@ struct frame *f, Lisp_Object oldval) { - enum toolbar_pos pos = decode_toolbar_position (Vdefault_toolbar_position); + recompute_overlaying_specifier (Vtoolbar_visible_p); +} - Fset_specifier_dirty_flag (Vtoolbar_visible_p[pos]); - - /* Let redisplay know that something has possibly changed. */ +static void +toolbar_geometry_changed_in_window (Lisp_Object specifier, struct window *w, + Lisp_Object oldval) +{ MARK_TOOLBAR_CHANGED; + MARK_WINDOWS_CHANGED (w); } +static void +default_toolbar_size_changed_in_window (Lisp_Object specifier, struct window *w, + Lisp_Object oldval) +{ + recompute_overlaying_specifier (Vtoolbar_size); +} + +static void +default_toolbar_border_width_changed_in_window (Lisp_Object specifier, + struct window *w, + Lisp_Object oldval) +{ + recompute_overlaying_specifier (Vtoolbar_border_width); +} + +static void +default_toolbar_visible_p_changed_in_window (Lisp_Object specifier, + struct window *w, + Lisp_Object oldval) +{ + recompute_overlaying_specifier (Vtoolbar_visible_p); +} static void toolbar_buttons_captioned_p_changed (Lisp_Object specifier, struct window *w, @@ -1642,7 +1639,7 @@ set_specifier_caching (Vdefault_toolbar_height, slot_offset (struct window, default_toolbar_height), - some_window_value_changed, + default_toolbar_size_changed_in_window, slot_offset (struct frame, default_toolbar_height), default_toolbar_size_changed_in_frame); @@ -1657,7 +1654,7 @@ set_specifier_caching (Vdefault_toolbar_width, slot_offset (struct window, default_toolbar_width), - some_window_value_changed, + default_toolbar_size_changed_in_window, slot_offset (struct frame, default_toolbar_width), default_toolbar_size_changed_in_frame); @@ -1673,7 +1670,7 @@ set_specifier_caching (Vtoolbar_size[TOP_TOOLBAR], slot_offset (struct window, toolbar_size[TOP_TOOLBAR]), - some_window_value_changed, + toolbar_geometry_changed_in_window, slot_offset (struct frame, toolbar_size[TOP_TOOLBAR]), toolbar_size_changed_in_frame); @@ -1689,7 +1686,7 @@ set_specifier_caching (Vtoolbar_size[BOTTOM_TOOLBAR], slot_offset (struct window, toolbar_size[BOTTOM_TOOLBAR]), - some_window_value_changed, + toolbar_geometry_changed_in_window, slot_offset (struct frame, toolbar_size[BOTTOM_TOOLBAR]), toolbar_size_changed_in_frame); @@ -1705,7 +1702,7 @@ set_specifier_caching (Vtoolbar_size[LEFT_TOOLBAR], slot_offset (struct window, toolbar_size[LEFT_TOOLBAR]), - some_window_value_changed, + toolbar_geometry_changed_in_window, slot_offset (struct frame, toolbar_size[LEFT_TOOLBAR]), toolbar_size_changed_in_frame); @@ -1721,7 +1718,7 @@ set_specifier_caching (Vtoolbar_size[RIGHT_TOOLBAR], slot_offset (struct window, toolbar_size[RIGHT_TOOLBAR]), - some_window_value_changed, + toolbar_geometry_changed_in_window, slot_offset (struct frame, toolbar_size[RIGHT_TOOLBAR]), toolbar_size_changed_in_frame); @@ -1786,7 +1783,7 @@ set_specifier_caching (Vdefault_toolbar_border_width, slot_offset (struct window, default_toolbar_border_width), - some_window_value_changed, + default_toolbar_border_width_changed_in_window, slot_offset (struct frame, default_toolbar_border_width), default_toolbar_border_width_changed_in_frame); @@ -1802,7 +1799,7 @@ set_specifier_caching (Vtoolbar_border_width[TOP_TOOLBAR], slot_offset (struct window, toolbar_border_width[TOP_TOOLBAR]), - some_window_value_changed, + toolbar_geometry_changed_in_window, slot_offset (struct frame, toolbar_border_width[TOP_TOOLBAR]), toolbar_border_width_changed_in_frame); @@ -1818,7 +1815,7 @@ set_specifier_caching (Vtoolbar_border_width[BOTTOM_TOOLBAR], slot_offset (struct window, toolbar_border_width[BOTTOM_TOOLBAR]), - some_window_value_changed, + toolbar_geometry_changed_in_window, slot_offset (struct frame, toolbar_border_width[BOTTOM_TOOLBAR]), toolbar_border_width_changed_in_frame); @@ -1834,7 +1831,7 @@ set_specifier_caching (Vtoolbar_border_width[LEFT_TOOLBAR], slot_offset (struct window, toolbar_border_width[LEFT_TOOLBAR]), - some_window_value_changed, + toolbar_geometry_changed_in_window, slot_offset (struct frame, toolbar_border_width[LEFT_TOOLBAR]), toolbar_border_width_changed_in_frame); @@ -1850,7 +1847,7 @@ set_specifier_caching (Vtoolbar_border_width[RIGHT_TOOLBAR], slot_offset (struct window, toolbar_border_width[RIGHT_TOOLBAR]), - some_window_value_changed, + toolbar_geometry_changed_in_window, slot_offset (struct frame, toolbar_border_width[RIGHT_TOOLBAR]), toolbar_border_width_changed_in_frame); @@ -1898,7 +1895,7 @@ set_specifier_caching (Vdefault_toolbar_visible_p, slot_offset (struct window, default_toolbar_visible_p), - some_window_value_changed, + default_toolbar_visible_p_changed_in_window, slot_offset (struct frame, default_toolbar_visible_p), default_toolbar_visible_p_changed_in_frame); @@ -1914,7 +1911,7 @@ set_specifier_caching (Vtoolbar_visible_p[TOP_TOOLBAR], slot_offset (struct window, toolbar_visible_p[TOP_TOOLBAR]), - some_window_value_changed, + toolbar_geometry_changed_in_window, slot_offset (struct frame, toolbar_visible_p[TOP_TOOLBAR]), toolbar_visible_p_changed_in_frame); @@ -1930,7 +1927,7 @@ set_specifier_caching (Vtoolbar_visible_p[BOTTOM_TOOLBAR], slot_offset (struct window, toolbar_visible_p[BOTTOM_TOOLBAR]), - some_window_value_changed, + toolbar_geometry_changed_in_window, slot_offset (struct frame, toolbar_visible_p[BOTTOM_TOOLBAR]), toolbar_visible_p_changed_in_frame); @@ -1946,7 +1943,7 @@ set_specifier_caching (Vtoolbar_visible_p[LEFT_TOOLBAR], slot_offset (struct window, toolbar_visible_p[LEFT_TOOLBAR]), - some_window_value_changed, + toolbar_geometry_changed_in_window, slot_offset (struct frame, toolbar_visible_p[LEFT_TOOLBAR]), toolbar_visible_p_changed_in_frame); @@ -1962,7 +1959,7 @@ set_specifier_caching (Vtoolbar_visible_p[RIGHT_TOOLBAR], slot_offset (struct window, toolbar_visible_p[RIGHT_TOOLBAR]), - some_window_value_changed, + toolbar_geometry_changed_in_window, slot_offset (struct frame, toolbar_visible_p[RIGHT_TOOLBAR]), toolbar_visible_p_changed_in_frame);
--- a/src/tooltalk.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/tooltalk.c Mon Aug 13 10:32:22 2007 +0200 @@ -537,8 +537,8 @@ return make_string (value, len); } -DEFUN ("get-tooltalk-message-attribute", - Fget_tooltalk_message_attribute, 2, 3, 0, /* +DEFUN ("get-tooltalk-message-attribute", Fget_tooltalk_message_attribute, + 2, 3, 0, /* Return the indicated Tooltalk message attribute. Attributes are identified by symbols with the same name (underscores and all) as the suffix of the Tooltalk tt_message_<attribute> function that extracts the value. @@ -679,8 +679,8 @@ return Qnil; } -DEFUN ("set-tooltalk-message-attribute", - Fset_tooltalk_message_attribute, 3, 4, 0, /* +DEFUN ("set-tooltalk-message-attribute", Fset_tooltalk_message_attribute, + 3, 4, 0, /* Initialize one Tooltalk message attribute. Attribute names and values are the same as for
--- a/src/unexhp9k800.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/unexhp9k800.c Mon Aug 13 10:32:22 2007 +0200 @@ -84,7 +84,6 @@ int run_time_remap(); #endif -#define roundup(x,n) ( ( (x)+(n-1) ) & ~(n-1) ) /* n is power of 2 */ #define min(x,y) ( ((x)<(y))?(x):(y) ) void write_header(int file, struct header *hdr, struct som_exec_auxhdr *auxhdr);
--- a/src/window.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/window.c Mon Aug 13 10:32:22 2007 +0200 @@ -1371,9 +1371,8 @@ */ (window)) { - struct window *w; - - w = decode_window (window); + struct window *w = decode_window (window); + return (WINDOW_HAS_MODELINE_P (w)) ? make_int (w->modeline_hscroll) : Qnil; } @@ -1384,12 +1383,11 @@ */ (window, ncol)) { - struct window *w; - int ncols; - - w = decode_window (window); + struct window *w = decode_window (window); + if (WINDOW_HAS_MODELINE_P (w)) { + int ncols; CHECK_INT (ncol); ncols = XINT (ncol); if (ncols < 0) ncols = 0; @@ -1536,7 +1534,8 @@ if (NILP (guarantee)) { - Lisp_Object buf = w->buffer; + Lisp_Object buf; + buf = w->buffer; CHECK_BUFFER (buf); return make_int (BUF_Z (XBUFFER (buf)) - w->window_end_pos[CURRENT_DISP]); } @@ -2751,8 +2750,8 @@ but there is no sensible way to implement those functions, since you can't in general derive a window from a buffer. */ -DEFUN ("window-left-margin-pixel-width", - Fwindow_left_margin_pixel_width, 0, 1, 0, /* +DEFUN ("window-left-margin-pixel-width", Fwindow_left_margin_pixel_width, + 0, 1, 0, /* Return the width in pixels of the left outside margin of window WINDOW. If WINDOW is nil, the selected window is assumed. */ @@ -2761,8 +2760,8 @@ return make_int (window_left_margin_width (decode_window (window))); } -DEFUN ("window-right-margin-pixel-width", - Fwindow_right_margin_pixel_width, 0, 1, 0, /* +DEFUN ("window-right-margin-pixel-width", Fwindow_right_margin_pixel_width, + 0, 1, 0, /* Return the width in pixels of the right outside margin of window WINDOW. If WINDOW is nil, the selected window is assumed. */ @@ -4187,48 +4186,25 @@ return Fset_window_hscroll (window, make_int (w->hscroll - XINT (arg))); } - -DEFUN ("recenter", Frecenter, 0, 2, "_P", /* -Center point in WINDOW and redisplay frame. With N, put point on line N. + +DEFUN ("center-to-window-line", Fcenter_to_window_line, 0, 2, "_P", /* +Center point in WINDOW. With N, put point on line N. The desired position of point is always relative to the window. -Just C-u as prefix means put point in the center of the window. -No N (i.e., it is nil) erases the entire frame and then -redraws with point in the center of the window. If WINDOW is nil, the selected window is used. */ (n, window)) { - struct window *w; - struct buffer *b; + struct window *w = decode_window (window); + struct buffer *b = XBUFFER (w->buffer); + Bufpos opoint = BUF_PT (b); Bufpos startp; - Bufpos opoint; - - if (NILP (window)) - window = Fselected_window (Qnil); - else - CHECK_WINDOW (window); - w = XWINDOW (window); - b = XBUFFER (w->buffer); - - opoint = BUF_PT (b); - - if (LISTP (n)) - { - struct frame *f = XFRAME (w->frame); - - if (NILP (n)) - { - MARK_FRAME_CHANGED (f); - SET_FRAME_CLEAR (f); - } - - startp = start_with_line_at_pixpos (w, opoint, window_half_pixpos (w)); - } + + if (NILP (n)) + startp = start_with_line_at_pixpos (w, opoint, window_half_pixpos (w)); else { n = Fprefix_numeric_value (n); CHECK_INT (n); - startp = start_with_point_on_display_line (w, opoint, XINT (n)); } @@ -4239,7 +4215,7 @@ MARK_WINDOWS_CHANGED (w); return Qnil; } - + DEFUN ("move-to-window-line", Fmove_to_window_line, 1, 2, "_P", /* Position point relative to WINDOW. With no argument, position text at center of window. @@ -4255,6 +4231,8 @@ Bufpos start, new_point; int selected; + /* Don't use decode_window() because we need the new value of + WINDOW. */ if (NILP (window)) window = Fselected_window (Qnil); else @@ -5568,7 +5546,7 @@ DEFSUBR (Fscroll_right); DEFSUBR (Fother_window_for_scrolling); DEFSUBR (Fscroll_other_window); - DEFSUBR (Frecenter); + DEFSUBR (Fcenter_to_window_line); DEFSUBR (Fmove_to_window_line); #ifdef MEMORY_USAGE_STATS DEFSUBR (Fwindow_memory_usage);
--- a/src/xselect.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/xselect.c Mon Aug 13 10:32:22 2007 +0200 @@ -1049,8 +1049,8 @@ static Lisp_Object Qx_selection_reply_timeout_internal; -DEFUN ("x-selection-reply-timeout-internal", - Fx_selection_reply_timeout_internal, 1, 1, 0, /* +DEFUN ("x-selection-reply-timeout-internal", Fx_selection_reply_timeout_internal, + 1, 1, 0, /* */ (arg))
--- a/version.sh Mon Aug 13 10:31:30 2007 +0200 +++ b/version.sh Mon Aug 13 10:32:22 2007 +0200 @@ -1,8 +1,8 @@ #!/bin/sh emacs_major_version=21 emacs_minor_version=0 -emacs_beta_version=37 -xemacs_codename="Pygmy" +emacs_beta_version=38 +xemacs_codename="Repartida" infodock_major_version=3 infodock_minor_version=90 -infodock_build_version=2 +infodock_build_version=4