Mercurial > hg > xemacs-beta
changeset 278:90d73dddcdc4 r21-0b37
Import from CVS: tag r21-0b37
line wrap: on
line diff
--- a/CHANGES-beta Mon Aug 13 10:30:38 2007 +0200 +++ b/CHANGES-beta Mon Aug 13 10:31:29 2007 +0200 @@ -1,4 +1,25 @@ -*- indented-text -*- +to 21.0 beta37 "Pygmy" +-- Bug fixes, generalization of image code from Andy Piper +-- Installation/startup fixes from Michael Sperber +-- Irix 5.3 dumping fix from Olivier Galibert +-- Bug fixes from Martin Buchholz, Michael Sperber and Bob Weiner +-- miscellaneous bug fixes +-- More fixes from Didier Verna for Customization of options menu +-- Miscellaneous patches from Kirill Katsnelson and Hrvoje Niksic +-- More MS Windows toolbar stuffs from Kirill Katsnelson +-- Custom-ization of the options menu from Didier Verna +-- MS Windows toolbar stuffs from Andy Piper +-- MS Windows build fixes from Kirill Katsnelson +-- MS Windows process fixes from Kirill Katsnelson +-- miscellaneous patches from Michael Sperber, Hrvoje Niksic, Martin Buchholz +-- Gnuclient/gnudoit stdin support from Jan Vroonhof +-- eldap fixes from Oscar Figueiredo +-- Synching with InfoDock 3.7 +-- info fixes from Oscar Figueiredo +-- removed --sitelispdir configure option +-- miscellaneous bug fixes + to 21.0 beta36 "Philippine" -- Xpm for MS Windows from Jonathan Harris -- print stream fix from Hrvoje Niksic
--- a/ChangeLog Mon Aug 13 10:30:38 2007 +0200 +++ b/ChangeLog Mon Aug 13 10:31:29 2007 +0200 @@ -1,3 +1,64 @@ +1998-04-25 SL Baur <steve@altair.xemacs.org> + + * XEmacs-21.0-beta37 is released. + +1998-04-25 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * configure.in: Sychronized ..._USER_DEFINED variables with + datadir setting. + + * Makefile.in (mkdir): No longer create sitelispdir. + +Sat Apr 24 1998 Andy Piper <andyp@parallax.co.uk> + + * configure.in: make graphic libraries tests be dependant on a + window system not X11 only. + +Fri Apr 24 19:38:19 1998 Andy Piper <andyp@parallax.co.uk> + + * configure.in: check for our special select in msw. + +1998-04-22 Marcus Thiessel <marcus_thiessel@hp.com> + + * PROBLEMS: add answers to some FAQ concerning hpux. + +Wed Apr 22 12:59:35 1998 Andy Piper <andyp@parallax.co.uk> + + * configure.in: enable checking for special mswindows select() + +1998-04-21 Martin Buchholz <martin@xemacs.org> + + * configure.in: Isolate incomprehensible cma_open/pthreads checking + to decosf* + +1998-04-21 Marcus Thiessel <marcus_thiessel@hp.com> + + * configure.in: /usr/{include,lib}/Motif2.1 added to search path for X11 + libs and includes. + +1998-04-22 Itay Ben-Yaacov <pezz@www-mail.huji.ac.il> + + * configure.in: check for xpm does not depend anymore on having X. + if libXpm exists, and is of the FOR_MSW flavor, define FOR_MSW. + +1998-04-19 Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> + + * etc/NEWS: Documented info dir rebuilding and LDAP support. + + * info/dir: Fixed the explanatory notes for + `Info-default-directory-list' removal and the new automatic dir + rebuilding facility. Reindented the menu. Added an entry for + term.info + +1998-04-20 SL Baur <steve@altair.xemacs.org> + + * configure.in (LISPDIR): Removed configuration option for + site-lisp. + +1998-04-19 SL Baur <steve@altair.xemacs.org> + + * configure.in (version): snarf InfoDock version number. + 1998-04-18 SL Baur <steve@altair.xemacs.org> * XEmacs-21.0-beta36 is released.
--- a/Makefile.in Mon Aug 13 10:30:38 2007 +0200 +++ b/Makefile.in Mon Aug 13 10:31:29 2007 +0200 @@ -453,7 +453,7 @@ ## make-path instead of mkdir. Not all mkdirs have the `-p' flag. mkdir: FRC.mkdir ${MAKEPATH} ${COPYDESTS} ${lockdir} ${infodir} ${archlibdir} \ - ${mandir} ${bindir} ${datadir} ${libdir} ${sitelispdir} ${pkgdir} + ${mandir} ${bindir} ${datadir} ${libdir} ${pkgdir} -chmod 0777 ${lockdir} ## Delete all the installed files that the `install' target would
--- a/PROBLEMS Mon Aug 13 10:30:38 2007 +0200 +++ b/PROBLEMS Mon Aug 13 10:31:29 2007 +0200 @@ -1,11 +1,12 @@ --*- mode:outline -*- + -*- mode:outline -*- + This file describes various problems that have been encountered in compiling, installing and running XEmacs. It has been updated for XEmacs 21.0. -This file is large, but we have tried to sort the entries by their -respective relevance for XEmacs, but may have not succeeded completely -in that task. The file is divided into four parts: +This file is rather large, but we have tried to sort the entries by +their respective relevance for XEmacs, but may have not succeeded +completely in that task. The file is divided into four parts: - Problems with building XEmacs - Problems with running XEmacs @@ -167,7 +168,7 @@ new versions of the compiler should run fine. ** On HPUX, the HP C compiler might have a problem compiling some files - with optimization. +with optimization. Richard Cognot <cognot@ensg.u-nancy.fr> writes: @@ -185,6 +186,19 @@ You can get these standard X tools by anonymous FTP to hpcvaaz.cv.hp.com. Essentially all X programs need these. +** On HP-UX, problems with make + +Marcus Thiessel <marcus_thiessel@hp.com> + + Some releases of XEmacs require GNU make to build successfully. + +** On HP-UX 9.05 XEmacs won't compile or coredump during the build. + +Marcus Thiessel <marcus_thiessel@hp.com> + + This might be a sed problem. For your own safety make sure to use + GNU sed while dumping XEmacs. + ** Solaris 2.3 /bin/sh coredumps during configuration. This only occurs if you have LANG != C. This is a known bug with @@ -485,13 +499,18 @@ mode of the installed copy; changing the group and mode of the build directory copy is ineffective. -** XEmacs crashes on Digital Unix when dealing with large compilation -buffers. +** XEmacs crashes on Digital Unix within font-lock, or when dealing +with large compilation buffers. -This is a known problem with the regexp code, that uses alloca -extensively, and overflows the stack in case of complex regexp -matches. As a workaround, you can recompile with REGEX_MALLOC -defined. +The default stack size under Digital Unix is rather small (2M as +opposed to Solaris 8M), hosing the regexp code, which uses alloca() +extensively, overflowing the stack when complex regexps are used. +Workarounds: + +1) Increase your stack size, using `ulimit -s 8192' or a (t)csh + equivalent; + +2) Recompile regex.c with REGEX_MALLOC defined. ** On Solaris, C-x doesn't get through to Emacs when you use the console. @@ -1362,7 +1381,7 @@ funding, and all work is done by volunteers. If you think you can help, please contact the XEmacs maintainers. -** XEmacs/Mule doesn't work on a tty. +** XEmacs/Mule doesn't support TTY's satisfactorily. This is a major problem, which we plan to address in a future release of XEmacs. Basically, XEmacs should have primitives to be told
--- a/configure Mon Aug 13 10:30:38 2007 +0200 +++ b/configure Mon Aug 13 10:31:29 2007 +0200 @@ -221,7 +221,6 @@ infopath='' install_pp='' lispdir='${datadir}/xemacs-${version}/lisp' -sitelispdir='${datadir}/xemacs/site-lisp' pkgdir='${datadir}/xemacs-${version}/lisp' package_path='' etcdir='${datadir}/xemacs-${version}/etc' @@ -534,7 +533,7 @@ prefix | exec_prefix | bindir | datadir | statedir | libdir | \ mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \ - archlibdir | sitelispdir | docdir | package_path ) + archlibdir | docdir | package_path ) if test "$valomitted" = "yes"; then if test "$#" = 0; then (echo "$progname: Usage error:" @@ -545,7 +544,7 @@ fi eval "$opt=\"$val\"" - case "$opt" in + case "$opt" in lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF Defining LISPDIR_USER_DEFINED EOF @@ -554,14 +553,6 @@ EOF } ;; - sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF - Defining SITELISPDIR_USER_DEFINED -EOF -cat >> confdefs.h <<\EOF -#define SITELISPDIR_USER_DEFINED 1 -EOF -} - ;; etcdir ) { test "$extra_verbose" = "yes" && cat << \EOF Defining ETCDIR_USER_DEFINED EOF @@ -594,7 +585,24 @@ EOF } ;; - datadir ) { test "$extra_verbose" = "yes" && cat << \EOF + datadir ) + { test "$extra_verbose" = "yes" && cat << \EOF + Defining INFODIR_USER_DEFINED +EOF +cat >> confdefs.h <<\EOF +#define INFODIR_USER_DEFINED 1 +EOF +} + + { test "$extra_verbose" = "yes" && cat << \EOF + Defining LISPDIR_USER_DEFINED +EOF +cat >> confdefs.h <<\EOF +#define LISPDIR_USER_DEFINED 1 +EOF +} + + { test "$extra_verbose" = "yes" && cat << \EOF Defining ETCDIR_USER_DEFINED EOF cat >> confdefs.h <<\EOF @@ -727,7 +735,7 @@ if test -z "$configuration"; then echo $ac_n "checking "host system type"""... $ac_c" 1>&6 -echo "configure:731: checking "host system type"" >&5 +echo "configure:739: checking "host system type"" >&5 if configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess | \ sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` ; then echo "$ac_t""$configuration" 1>&6 @@ -741,7 +749,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:745: checking whether ln -s works" >&5 +echo "configure:753: checking whether ln -s works" >&5 rm -f conftestdata if ln -s X conftestdata 2>/dev/null @@ -844,6 +852,31 @@ } +{ test "$extra_verbose" = "yes" && cat << EOF + Defining INFODOCK_MAJOR_VERSION = $infodock_major_version +EOF +cat >> confdefs.h <<EOF +#define INFODOCK_MAJOR_VERSION $infodock_major_version +EOF +} + +{ test "$extra_verbose" = "yes" && cat << EOF + Defining INFODOCK_MINOR_VERSION = $infodock_minor_version +EOF +cat >> confdefs.h <<EOF +#define INFODOCK_MINOR_VERSION $infodock_minor_version +EOF +} + +{ test "$extra_verbose" = "yes" && cat << EOF + Defining INFODOCK_BUILD_VERSION = $infodock_build_version +EOF +cat >> confdefs.h <<EOF +#define INFODOCK_BUILD_VERSION $infodock_build_version +EOF +} + + 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 Defining ERROR_CHECK_EXTENTS @@ -918,7 +951,7 @@ echo "checking "the configuration name"" 1>&6 -echo "configure:922: checking "the configuration name"" >&5 +echo "configure:955: checking "the configuration name"" >&5 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else exit $? @@ -1382,7 +1415,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:1386: checking for $ac_word" >&5 +echo "configure:1419: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1408,7 +1441,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:1412: checking for $ac_word" >&5 +echo "configure:1445: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1453,7 +1486,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1457: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1490: 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' @@ -1465,11 +1498,11 @@ cross_compiling=no cat > conftest.$ac_ext <<EOF -#line 1469 "configure" +#line 1502 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1506: \"$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 @@ -1489,19 +1522,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:1493: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1526: 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:1498: checking whether we are using GNU C" >&5 +echo "configure:1531: 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:1505: \"$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:1538: \"$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 @@ -1515,7 +1548,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1519: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1552: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1544,7 +1577,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:1548: checking for $ac_word" >&5 +echo "configure:1581: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1570,7 +1603,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:1574: checking for $ac_word" >&5 +echo "configure:1607: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1615,7 +1648,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1619: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1652: 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' @@ -1627,11 +1660,11 @@ cross_compiling=no cat > conftest.$ac_ext <<EOF -#line 1631 "configure" +#line 1664 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1668: \"$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 @@ -1651,19 +1684,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:1655: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1688: 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:1660: checking whether we are using GNU C" >&5 +echo "configure:1693: 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:1667: \"$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:1700: \"$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 @@ -1677,7 +1710,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1681: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1714: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1706,7 +1739,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:1710: checking for $ac_word" >&5 +echo "configure:1743: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1732,7 +1765,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:1736: checking for $ac_word" >&5 +echo "configure:1769: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1777,7 +1810,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1781: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1814: 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' @@ -1789,11 +1822,11 @@ cross_compiling=no cat > conftest.$ac_ext <<EOF -#line 1793 "configure" +#line 1826 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1830: \"$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 @@ -1813,19 +1846,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:1817: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1850: 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:1822: checking whether we are using GNU C" >&5 +echo "configure:1855: 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:1829: \"$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:1862: \"$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 @@ -1839,7 +1872,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1843: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1876: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1872,7 +1905,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:1876: checking how to run the C preprocessor" >&5 +echo "configure:1909: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1885,13 +1918,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1889 "configure" +#line 1922 "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:1895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1902,13 +1935,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1906 "configure" +#line 1939 "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:1912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1931,9 +1964,9 @@ echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:1935: checking for AIX" >&5 -cat > conftest.$ac_ext <<EOF -#line 1937 "configure" +echo "configure:1968: checking for AIX" >&5 +cat > conftest.$ac_ext <<EOF +#line 1970 "configure" #include "confdefs.h" #ifdef _AIX yes @@ -1960,9 +1993,9 @@ echo $ac_n "checking for GNU libc""... $ac_c" 1>&6 -echo "configure:1964: checking for GNU libc" >&5 -cat > conftest.$ac_ext <<EOF -#line 1966 "configure" +echo "configure:1997: checking for GNU libc" >&5 +cat > conftest.$ac_ext <<EOF +#line 1999 "configure" #include "confdefs.h" #include <features.h> int main() { @@ -1974,7 +2007,7 @@ ; return 0; } EOF -if { (eval echo configure:1978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* have_glibc=yes else @@ -1995,9 +2028,9 @@ echo $ac_n "checking whether we are using SunPro C""... $ac_c" 1>&6 -echo "configure:1999: checking whether we are using SunPro C" >&5 -cat > conftest.$ac_ext <<EOF -#line 2001 "configure" +echo "configure:2032: checking whether we are using SunPro C" >&5 +cat > conftest.$ac_ext <<EOF +#line 2034 "configure" #include "confdefs.h" int main() { @@ -2008,7 +2041,7 @@ ; return 0; } EOF -if { (eval echo configure:2012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* __sunpro_c=yes else @@ -2282,7 +2315,7 @@ fi echo $ac_n "checking for dynodump""... $ac_c" 1>&6 -echo "configure:2286: checking for dynodump" >&5 +echo "configure:2319: checking for dynodump" >&5 if test "$unexec" != "unexsol2.o"; then echo "$ac_t""no" 1>&6 else @@ -2382,7 +2415,7 @@ if test "$add_runtime_path" = "yes"; then echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 -echo "configure:2386: checking "for runtime libraries flag"" >&5 +echo "configure:2419: 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" @@ -2400,14 +2433,14 @@ done fi cat > conftest.$ac_ext <<EOF -#line 2404 "configure" -#include "confdefs.h" - -int main() { - -; return 0; } -EOF -if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +#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 rm -rf conftest* dash_r="$try_dash_r" else @@ -2507,10 +2540,10 @@ fi after_morecore_hook_exists=yes echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6 -echo "configure:2511: checking for malloc_get_state" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2514 "configure" +echo "configure:2544: checking for malloc_get_state" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2547 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char malloc_get_state(); below. */ @@ -2533,7 +2566,7 @@ ; return 0; } EOF -if { (eval echo configure:2537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2570: \"$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 @@ -2553,10 +2586,10 @@ fi echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 -echo "configure:2557: checking for malloc_set_state" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2560 "configure" +echo "configure:2590: checking for malloc_set_state" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2593 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char malloc_set_state(); below. */ @@ -2579,7 +2612,7 @@ ; return 0; } EOF -if { (eval echo configure:2583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2616: \"$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 @@ -2599,16 +2632,16 @@ fi echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 -echo "configure:2603: checking whether __after_morecore_hook exists" >&5 -cat > conftest.$ac_ext <<EOF -#line 2605 "configure" +echo "configure:2636: checking whether __after_morecore_hook exists" >&5 +cat > conftest.$ac_ext <<EOF +#line 2638 "configure" #include "confdefs.h" extern void (* __after_morecore_hook)(); int main() { __after_morecore_hook = 0 ; return 0; } EOF -if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2667,7 +2700,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:2671: checking for $ac_word" >&5 +echo "configure:2704: checking for $ac_word" >&5 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -2720,7 +2753,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:2724: checking for a BSD compatible install" >&5 +echo "configure:2757: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" @@ -2771,7 +2804,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:2775: checking for $ac_word" >&5 +echo "configure:2808: checking for $ac_word" >&5 if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. @@ -2802,15 +2835,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2806: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2809 "configure" +echo "configure:2839: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2842 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2843,15 +2876,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2847: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2850 "configure" +echo "configure:2880: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2883 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2884,15 +2917,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2888: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2891 "configure" +echo "configure:2921: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2924 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2922,10 +2955,10 @@ done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2926: checking for sys/wait.h that is POSIX.1 compatible" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2929 "configure" +echo "configure:2959: checking for sys/wait.h that is POSIX.1 compatible" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2962 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/wait.h> @@ -2941,7 +2974,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2965,10 +2998,10 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2969: checking for ANSI C header files" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2972 "configure" +echo "configure:3002: checking for ANSI C header files" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3005 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -2976,7 +3009,7 @@ #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2993,7 +3026,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 2997 "configure" +#line 3030 "configure" #include "confdefs.h" #include <string.h> EOF @@ -3011,7 +3044,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 3015 "configure" +#line 3048 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -3029,7 +3062,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 3033 "configure" +#line 3066 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3040,7 +3073,7 @@ exit (0); } EOF -if { (eval echo configure:3044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then : else @@ -3065,10 +3098,10 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3069: checking whether time.h and sys/time.h may both be included" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3072 "configure" +echo "configure:3102: checking whether time.h and sys/time.h may both be included" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3105 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -3077,7 +3110,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3101,10 +3134,10 @@ fi echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:3105: checking for sys_siglist declaration in signal.h or unistd.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3108 "configure" +echo "configure:3138: checking for sys_siglist declaration in signal.h or unistd.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3141 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -3116,7 +3149,7 @@ char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:3120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -3141,9 +3174,9 @@ echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6 -echo "configure:3145: checking for struct utimbuf" >&5 -cat > conftest.$ac_ext <<EOF -#line 3147 "configure" +echo "configure:3178: checking for struct utimbuf" >&5 +cat > conftest.$ac_ext <<EOF +#line 3180 "configure" #include "confdefs.h" #ifdef TIME_WITH_SYS_TIME #include <sys/time.h> @@ -3162,7 +3195,7 @@ static struct utimbuf x; x.actime = x.modtime; ; return 0; } EOF -if { (eval echo configure:3166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3199: \"$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 @@ -3182,10 +3215,10 @@ rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3186: checking return type of signal handlers" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3189 "configure" +echo "configure:3219: checking return type of signal handlers" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3222 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -3202,7 +3235,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:3206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3224,10 +3257,10 @@ echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3228: checking for size_t" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3231 "configure" +echo "configure:3261: checking for size_t" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3264 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3258,10 +3291,10 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3262: checking for pid_t" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3265 "configure" +echo "configure:3295: checking for pid_t" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3298 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3292,10 +3325,10 @@ fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3296: checking for uid_t in sys/types.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3299 "configure" +echo "configure:3329: checking for uid_t in sys/types.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3332 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -3331,10 +3364,10 @@ fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3335: checking for mode_t" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3338 "configure" +echo "configure:3368: checking for mode_t" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3371 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3365,10 +3398,10 @@ fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3369: checking for off_t" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3372 "configure" +echo "configure:3402: checking for off_t" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3405 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3400,9 +3433,9 @@ echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:3404: checking for struct timeval" >&5 -cat > conftest.$ac_ext <<EOF -#line 3406 "configure" +echo "configure:3437: checking for struct timeval" >&5 +cat > conftest.$ac_ext <<EOF +#line 3439 "configure" #include "confdefs.h" #ifdef TIME_WITH_SYS_TIME #include <sys/time.h> @@ -3418,7 +3451,7 @@ static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } EOF -if { (eval echo configure:3422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 HAVE_TIMEVAL=yes @@ -3440,10 +3473,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:3444: checking whether struct tm is in sys/time.h or time.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3447 "configure" +echo "configure:3477: checking whether struct tm is in sys/time.h or time.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3480 "configure" #include "confdefs.h" #include <sys/types.h> #include <time.h> @@ -3451,7 +3484,7 @@ struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3475,10 +3508,10 @@ fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3479: checking for tm_zone in struct tm" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3482 "configure" +echo "configure:3512: checking for tm_zone in struct tm" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3515 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_cv_struct_tm> @@ -3486,7 +3519,7 @@ struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:3490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -3509,10 +3542,10 @@ else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3513: checking for tzname" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3516 "configure" +echo "configure:3546: checking for tzname" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3549 "configure" #include "confdefs.h" #include <time.h> #ifndef tzname /* For SGI. */ @@ -3522,7 +3555,7 @@ atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:3526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -3548,10 +3581,10 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3552: checking for working const" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3555 "configure" +echo "configure:3585: checking for working const" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3588 "configure" #include "confdefs.h" int main() { @@ -3600,7 +3633,7 @@ ; return 0; } EOF -if { (eval echo configure:3604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3625,7 +3658,7 @@ echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:3629: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:3662: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` cat > conftestmake <<\EOF @@ -3650,12 +3683,12 @@ echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3654: checking whether byte ordering is bigendian" >&5 +echo "configure:3687: 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 3659 "configure" +#line 3692 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -3666,11 +3699,11 @@ #endif ; return 0; } EOF -if { (eval echo configure:3670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3703: \"$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 3674 "configure" +#line 3707 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -3681,7 +3714,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:3685: \"$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* ac_cv_c_bigendian=yes else @@ -3698,7 +3731,7 @@ rm -f conftest* if test $ac_cv_c_bigendian = unknown; then cat > conftest.$ac_ext <<EOF -#line 3702 "configure" +#line 3735 "configure" #include "confdefs.h" main () { /* Are we little or big endian? From Harbison&Steele. */ @@ -3711,7 +3744,7 @@ exit (u.c[sizeof (long) - 1] == 1); } EOF -if { (eval echo configure:3715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_c_bigendian=no else @@ -3737,10 +3770,10 @@ echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:3741: checking size of short" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3744 "configure" +echo "configure:3774: checking size of short" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3777 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3751,7 +3784,7 @@ exit(0); } EOF -if { (eval echo configure:3755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_sizeof_short=`cat conftestval` else @@ -3778,10 +3811,10 @@ exit 1 fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:3782: checking size of int" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3785 "configure" +echo "configure:3815: checking size of int" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3818 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3792,7 +3825,7 @@ exit(0); } EOF -if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_sizeof_int=`cat conftestval` else @@ -3813,10 +3846,10 @@ echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:3817: checking size of long" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3820 "configure" +echo "configure:3850: checking size of long" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3853 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3827,7 +3860,7 @@ exit(0); } EOF -if { (eval echo configure:3831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_sizeof_long=`cat conftestval` else @@ -3848,10 +3881,10 @@ echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:3852: checking size of long long" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3855 "configure" +echo "configure:3885: checking size of long long" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3888 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3862,7 +3895,7 @@ exit(0); } EOF -if { (eval echo configure:3866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3899: \"$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 @@ -3883,10 +3916,10 @@ echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:3887: checking size of void *" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3890 "configure" +echo "configure:3920: checking size of void *" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3923 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3897,7 +3930,7 @@ exit(0); } EOF -if { (eval echo configure:3901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3934: \"$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 @@ -3919,7 +3952,7 @@ echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:3923: checking for long file names" >&5 +echo "configure:3956: 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: @@ -3966,12 +3999,12 @@ echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:3970: checking for sin in -lm" >&5 +echo "configure:4003: 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 3975 "configure" +#line 4008 "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 @@ -3982,7 +4015,7 @@ sin() ; return 0; } EOF -if { (eval echo configure:3986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4019: \"$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 @@ -4024,14 +4057,14 @@ cat > conftest.$ac_ext <<EOF -#line 4028 "configure" +#line 4061 "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:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4068: \"$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 @@ -4048,7 +4081,7 @@ rm -f conftest* echo "checking type of mail spool file locking" 1>&6 -echo "configure:4052: checking type of mail spool file locking" >&5 +echo "configure:4085: 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 @@ -4072,12 +4105,12 @@ echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:4076: checking for kstat_open in -lkstat" >&5 +echo "configure:4109: 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 4081 "configure" +#line 4114 "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 @@ -4088,7 +4121,7 @@ kstat_open() ; return 0; } EOF -if { (eval echo configure:4092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4125: \"$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 @@ -4122,12 +4155,12 @@ echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 -echo "configure:4126: checking for kvm_read in -lkvm" >&5 +echo "configure:4159: 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 4131 "configure" +#line 4164 "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 @@ -4138,7 +4171,7 @@ kvm_read() ; return 0; } EOF -if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4175: \"$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 @@ -4170,14 +4203,15 @@ - +case "$opsys" in decosf*) + echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 -echo "configure:4176: checking for cma_open in -lpthreads" >&5 +echo "configure:4210: 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 4181 "configure" +#line 4215 "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 @@ -4188,7 +4222,7 @@ cma_open() ; return 0; } EOF -if { (eval echo configure:4192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4226: \"$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 @@ -4219,12 +4253,12 @@ fi -if test "$ac_cv_lib_pthreads_cma_open" = "yes"; then - case "$opsys" in decosf*) c_switch_site="$c_switch_site -threads";; esac -fi + test "$ac_cv_lib_pthreads_cma_open" = "yes" && \ + c_switch_site="$c_switch_site -threads" ;; +esac echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 -echo "configure:4228: checking whether the -xildoff compiler flag is required" >&5 +echo "configure:4262: 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; @@ -4235,7 +4269,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:4239: checking for \"-z ignore\" linker flag" >&5 +echo "configure:4273: 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 ;; @@ -4245,7 +4279,7 @@ echo "checking "for specified window system"" 1>&6 -echo "configure:4249: checking "for specified window system"" >&5 +echo "configure:4283: checking "for specified window system"" >&5 if test "$with_x11" != "no"; then test "$x_includes $x_libraries" != "NONE NONE" && \ @@ -4278,7 +4312,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:4282: checking for X" >&5 +echo "configure:4316: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4338,12 +4372,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext <<EOF -#line 4342 "configure" +#line 4376 "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:4347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4412,14 +4446,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <<EOF -#line 4416 "configure" +#line 4450 "configure" #include "confdefs.h" int main() { ${x_direct_test_function}() ; return 0; } EOF -if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4457: \"$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. @@ -4528,17 +4562,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:4532: checking whether -R must be followed by a space" >&5 +echo "configure:4566: 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 4535 "configure" -#include "confdefs.h" - -int main() { - -; return 0; } -EOF -if { (eval echo configure:4542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +#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 rm -rf conftest* ac_R_nospace=yes else @@ -4554,14 +4588,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <<EOF -#line 4558 "configure" -#include "confdefs.h" - -int main() { - -; return 0; } -EOF -if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +#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 rm -rf conftest* ac_R_space=yes else @@ -4597,12 +4631,12 @@ else echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:4601: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:4635: 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 4606 "configure" +#line 4640 "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 @@ -4613,7 +4647,7 @@ dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4651: \"$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 @@ -4637,12 +4671,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:4641: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:4675: 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 4646 "configure" +#line 4680 "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 @@ -4653,7 +4687,7 @@ dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:4657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4691: \"$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 @@ -4682,10 +4716,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:4686: checking for gethostbyname" >&5 - -cat > conftest.$ac_ext <<EOF -#line 4689 "configure" +echo "configure:4720: checking for gethostbyname" >&5 + +cat > conftest.$ac_ext <<EOF +#line 4723 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname(); below. */ @@ -4708,7 +4742,7 @@ ; return 0; } EOF -if { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -4729,12 +4763,12 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:4733: checking for gethostbyname in -lnsl" >&5 +echo "configure:4767: 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 4738 "configure" +#line 4772 "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 @@ -4745,7 +4779,7 @@ gethostbyname() ; return 0; } EOF -if { (eval echo configure:4749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4783: \"$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 @@ -4775,10 +4809,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:4779: checking for connect" >&5 - -cat > conftest.$ac_ext <<EOF -#line 4782 "configure" +echo "configure:4813: checking for connect" >&5 + +cat > conftest.$ac_ext <<EOF +#line 4816 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect(); below. */ @@ -4801,7 +4835,7 @@ ; return 0; } EOF -if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -4824,12 +4858,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:4828: checking "$xe_msg_checking"" >&5 +echo "configure:4862: 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 4833 "configure" +#line 4867 "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 @@ -4840,7 +4874,7 @@ connect() ; return 0; } EOF -if { (eval echo configure:4844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4878: \"$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 @@ -4864,10 +4898,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:4868: checking for remove" >&5 - -cat > conftest.$ac_ext <<EOF -#line 4871 "configure" +echo "configure:4902: checking for remove" >&5 + +cat > conftest.$ac_ext <<EOF +#line 4905 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove(); below. */ @@ -4890,7 +4924,7 @@ ; return 0; } EOF -if { (eval echo configure:4894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -4911,12 +4945,12 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:4915: checking for remove in -lposix" >&5 +echo "configure:4949: 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 4920 "configure" +#line 4954 "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 @@ -4927,7 +4961,7 @@ remove() ; return 0; } EOF -if { (eval echo configure:4931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4965: \"$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 @@ -4951,10 +4985,10 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:4955: checking for shmat" >&5 - -cat > conftest.$ac_ext <<EOF -#line 4958 "configure" +echo "configure:4989: checking for shmat" >&5 + +cat > conftest.$ac_ext <<EOF +#line 4992 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat(); below. */ @@ -4977,7 +5011,7 @@ ; return 0; } EOF -if { (eval echo configure:4981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -4998,12 +5032,12 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:5002: checking for shmat in -lipc" >&5 +echo "configure:5036: 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 5007 "configure" +#line 5041 "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 @@ -5014,7 +5048,7 @@ shmat() ; return 0; } EOF -if { (eval echo configure:5018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5052: \"$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 @@ -5048,12 +5082,12 @@ # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:5052: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:5086: 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 5057 "configure" +#line 5091 "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 @@ -5064,7 +5098,7 @@ IceConnectionNumber() ; return 0; } EOF -if { (eval echo configure:5068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5102: \"$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 @@ -5111,7 +5145,7 @@ MAKE_SUBDIR="$MAKE_SUBDIR lwlib" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib\" to \$MAKE_SUBDIR"; fi SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" && if test "$extra_verbose" = "yes"; then echo " Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi - for lib_dir in "/usr/dt/lib" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do + for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do inc_dir=`echo $lib_dir | sed -e 's/lib/include/'` if test -d "$lib_dir" -a -d "$inc_dir"; then case "$x_libraries" in *"$lib_dir"* ) ;; *) @@ -5231,7 +5265,7 @@ echo "checking for X defines extracted by xmkmf" 1>&6 -echo "configure:5235: checking for X defines extracted by xmkmf" >&5 +echo "configure:5269: checking for X defines extracted by xmkmf" >&5 rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -5263,15 +5297,15 @@ ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6 -echo "configure:5267: checking for X11/Intrinsic.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 5270 "configure" +echo "configure:5301: checking for X11/Intrinsic.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5304 "configure" #include "confdefs.h" #include <X11/Intrinsic.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5295,12 +5329,12 @@ echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:5299: checking for XOpenDisplay in -lX11" >&5 +echo "configure:5333: 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 5304 "configure" +#line 5338 "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 @@ -5311,7 +5345,7 @@ XOpenDisplay() ; return 0; } EOF -if { (eval echo configure:5315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5349: \"$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 @@ -5336,12 +5370,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:5340: checking "$xe_msg_checking"" >&5 +echo "configure:5374: 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 5345 "configure" +#line 5379 "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 @@ -5352,7 +5386,7 @@ XGetFontProperty() ; return 0; } EOF -if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5390: \"$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 @@ -5379,12 +5413,12 @@ echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:5383: checking for XShapeSelectInput in -lXext" >&5 +echo "configure:5417: 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 5388 "configure" +#line 5422 "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 @@ -5395,7 +5429,7 @@ XShapeSelectInput() ; return 0; } EOF -if { (eval echo configure:5399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5433: \"$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 @@ -5418,12 +5452,12 @@ echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 -echo "configure:5422: checking for XtOpenDisplay in -lXt" >&5 +echo "configure:5456: 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 5427 "configure" +#line 5461 "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 @@ -5434,7 +5468,7 @@ XtOpenDisplay() ; return 0; } EOF -if { (eval echo configure:5438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5472: \"$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 @@ -5457,14 +5491,14 @@ echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:5461: checking the version of X11 being used" >&5 +echo "configure:5495: checking the version of X11 being used" >&5 cat > conftest.$ac_ext <<EOF -#line 5463 "configure" +#line 5497 "configure" #include "confdefs.h" #include <X11/Intrinsic.h> int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; } EOF -if { (eval echo configure:5468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:5502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ./conftest foobar; x11_release=$? else @@ -5488,15 +5522,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5492: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 5495 "configure" +echo "configure:5526: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5529 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5527,7 +5561,7 @@ echo $ac_n "checking for XFree86""... $ac_c" 1>&6 -echo "configure:5531: checking for XFree86" >&5 +echo "configure:5565: checking for XFree86" >&5 if test -d "/usr/X386/include" -o \ -f "/etc/XF86Config" -o \ -f "/etc/X11/XF86Config" -o \ @@ -5547,12 +5581,12 @@ test -z "$with_xmu" && { echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 -echo "configure:5551: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 +echo "configure:5585: 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 5556 "configure" +#line 5590 "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 @@ -5563,7 +5597,7 @@ XmuReadBitmapDataFromFile() ; return 0; } EOF -if { (eval echo configure:5567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5601: \"$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 @@ -5602,19 +5636,19 @@ echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:5606: checking for main in -lXbsd" >&5 +echo "configure:5640: 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 5611 "configure" +#line 5645 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5652: \"$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 @@ -5651,22 +5685,22 @@ fi if test "$with_msw" != "no"; then echo "checking for MS-Windows" 1>&6 -echo "configure:5655: checking for MS-Windows" >&5 +echo "configure:5689: checking for MS-Windows" >&5 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 -echo "configure:5658: checking for main in -lgdi32" >&5 +echo "configure:5692: 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 5663 "configure" +#line 5697 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5704: \"$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 @@ -5723,8 +5757,31 @@ echo " xemacs will be linked with \"toolbar-msw.o\"" fi fi + cat > conftest.$ac_ext <<EOF +#line 5762 "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 +then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_MSG_SELECT +EOF +cat >> confdefs.h <<\EOF +#define HAVE_MSG_SELECT 1 +EOF +} + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* const_is_losing=no with_file_coding=yes + use_minimal_tagbits=yes + use_indexed_lrecord_implementation=yes extra_objs="$extra_objs console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o\"" fi @@ -5761,7 +5818,7 @@ if test "$with_x11" != "yes"; then for feature in tooltalk cde offix session xim xmu \ - tiff png jpeg gif xface xpm + xface do if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then echo "configure: warning: --with-$feature ignored: Not valid without X support" 1>&2 @@ -5784,7 +5841,7 @@ esac echo "checking for session-management option" 1>&6 -echo "configure:5788: checking for session-management option" >&5; +echo "configure:5845: checking for session-management option" >&5; if test "$with_session" != "no"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SESSION @@ -5799,15 +5856,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:5803: checking for X11/Xauth.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 5806 "configure" +echo "configure:5860: checking for X11/Xauth.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5863 "configure" #include "confdefs.h" #include <X11/Xauth.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5830,12 +5887,12 @@ } test -z "$with_xauth" && { echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 -echo "configure:5834: checking for XauGetAuthByAddr in -lXau" >&5 +echo "configure:5891: 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 5839 "configure" +#line 5896 "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 @@ -5846,7 +5903,7 @@ XauGetAuthByAddr() ; return 0; } EOF -if { (eval echo configure:5850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5907: \"$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 @@ -5910,15 +5967,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:5914: checking for ${dir}tt_c.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 5917 "configure" +echo "configure:5971: checking for ${dir}tt_c.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5974 "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:5922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5947,12 +6004,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:5951: checking "$xe_msg_checking"" >&5 +echo "configure:6008: 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 5956 "configure" +#line 6013 "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 @@ -5963,7 +6020,7 @@ tt_message_create() ; return 0; } EOF -if { (eval echo configure:5967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6024: \"$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 @@ -6012,15 +6069,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:6016: checking for Dt/Dt.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6019 "configure" +echo "configure:6073: checking for Dt/Dt.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6076 "configure" #include "confdefs.h" #include <Dt/Dt.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6043,12 +6100,12 @@ } test -z "$with_cde" && { echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 -echo "configure:6047: checking for DtDndDragStart in -lDtSvc" >&5 +echo "configure:6104: 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 6052 "configure" +#line 6109 "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 @@ -6059,7 +6116,7 @@ DtDndDragStart() ; return 0; } EOF -if { (eval echo configure:6063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6120: \"$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 @@ -6096,18 +6153,18 @@ fi echo "checking for LDAP" 1>&6 -echo "configure:6100: checking for LDAP" >&5 +echo "configure:6157: 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:6103: checking for ldap.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6106 "configure" +echo "configure:6160: checking for ldap.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6163 "configure" #include "confdefs.h" #include <ldap.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6130,15 +6187,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:6134: checking for lber.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6137 "configure" +echo "configure:6191: checking for lber.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6194 "configure" #include "confdefs.h" #include <lber.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6164,12 +6221,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:6168: checking "$xe_msg_checking"" >&5 +echo "configure:6225: 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 6173 "configure" +#line 6230 "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 @@ -6180,7 +6237,7 @@ ldap_open() ; return 0; } EOF -if { (eval echo configure:6184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6241: \"$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 @@ -6203,12 +6260,12 @@ } test "$with_umich_ldap" = "no" && { echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6 -echo "configure:6207: checking for ldap_set_option in -lldap10" >&5 +echo "configure:6264: 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 6212 "configure" +#line 6269 "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 @@ -6219,7 +6276,7 @@ ldap_set_option() ; return 0; } EOF -if { (eval echo configure:6223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6280: \"$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 @@ -6281,134 +6338,16 @@ fi -if test "$with_x11" = "yes"; then - - echo "checking for X11 graphics libraries" 1>&6 -echo "configure:6288: checking for X11 graphics libraries" >&5 - - if test "$with_png $with_tiff" != "no no"; then - -echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6 -echo "configure:6293: 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 6298 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char inflate(); - -int main() { -inflate() -; return 0; } -EOF -if { (eval echo configure:6309: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:6328: 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 6333 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char inflate(); - -int main() { -inflate() -; return 0; } -EOF -if { (eval echo configure:6344: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-lz $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lz\" to \$libs_x"; fi -else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 -echo "configure:6363: 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 6368 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char inflate(); - -int main() { -inflate() -; return 0; } -EOF -if { (eval echo configure:6379: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - libs_x="-lgz $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lgz\" to \$libs_x"; fi -else - echo "$ac_t""no" 1>&6 -fi - - -fi - - -fi - - - fi +if test "$window_system" != "none"; then + echo "checking for graphics libraries" 1>&6 +echo "configure:6344: 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:6409: checking for Xpm - no older than 3.4f" >&5 +echo "configure:6348: checking for Xpm - no older than 3.4f" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext <<EOF -#line 6412 "configure" +#line 6351 "configure" #include "confdefs.h" #include <X11/xpm.h> int main(int c, char **v) { @@ -6416,7 +6355,7 @@ XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;} EOF -if { (eval echo configure:6420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:6359: \"$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 @@ -6431,11 +6370,11 @@ xpm_problem="Internal xpm detection logic error!" fi echo " - *** WARNING *** $problem - I'm not touching that with a 10-foot pole! - If you really want to use the installed version of Xpm, rerun - configure --with-xpm=yes, but don't blame me if XEmacs crashes!" - fi +*** WARNING *** $problem + I'm not touching that with a 10-foot pole! + If you really want to use the installed version of Xpm, rerun + configure --with-xpm=yes, but don't blame me if XEmacs crashes!" + fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 @@ -6456,58 +6395,61 @@ } libs_x="-lXpm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi - fi - - 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:6464: checking for compface.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6467 "configure" -#include "confdefs.h" -#include <compface.h> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_xface=no -fi - } - test -z "$with_xface" && { -echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:6495: 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 6500 "configure" + echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6 +echo "configure:6400: checking for \"FOR_MSW\" xpm" >&5 + xe_check_libs=-lXpm + cat > conftest.$ac_ext <<EOF +#line 6403 "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 + rm -rf conftest* + xpm_for_msw=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + xpm_for_msw=yes +fi +rm -f conftest* + xe_check_libs= + echo "$ac_t""$xpm_for_msw" 1>&6 + if test "$xpm_for_msw" = "yes"; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining FOR_MSW +EOF +cat >> confdefs.h <<\EOF +#define FOR_MSW 1 +EOF +} + + fi + fi + + 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 +ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'` + +xe_check_libs=" -lc " +cat > conftest.$ac_ext <<EOF +#line 6442 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char UnGenFace(); - -int main() { -UnGenFace() -; return 0; } -EOF -if { (eval echo configure:6511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +char inflate(); + +int main() { +inflate() +; return 0; } +EOF +if { (eval echo configure:6453: \"$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 @@ -6521,39 +6463,103 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_xface=no -fi - - } - test -z "$with_xface" && with_xface=yes - if test "$with_xface" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_XFACE -EOF -cat >> confdefs.h <<\EOF -#define HAVE_XFACE 1 -EOF -} - - libs_x="-lcompface $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lcompface\" to \$libs_x"; fi + : +else + 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 +ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` + +xe_check_libs=" -lz " +cat > conftest.$ac_ext <<EOF +#line 6477 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char inflate(); + +int main() { +inflate() +; return 0; } +EOF +if { (eval echo configure:6488: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +xe_check_libs="" + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then + echo "$ac_t""yes" 1>&6 + libs_x="-lz $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lz\" to \$libs_x"; fi +else + 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 +ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'` + +xe_check_libs=" -lgz " +cat > conftest.$ac_ext <<EOF +#line 6512 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char inflate(); + +int main() { +inflate() +; return 0; } +EOF +if { (eval echo configure:6523: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +xe_check_libs="" + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then + echo "$ac_t""yes" 1>&6 + libs_x="-lgz $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lgz\" to \$libs_x"; fi +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + +fi + + fi echo $ac_n "checking for giflib - no older than 3.1""... $ac_c" 1>&6 -echo "configure:6546: checking for giflib - no older than 3.1" >&5 +echo "configure:6552: 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:6549: checking for gif_lib.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6552 "configure" +echo "configure:6555: checking for gif_lib.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6558 "configure" #include "confdefs.h" #include <gif_lib.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6576,12 +6582,12 @@ } test -z "$with_gif" && { echo $ac_n "checking for GetGifError in -lgif""... $ac_c" 1>&6 -echo "configure:6580: checking for GetGifError in -lgif" >&5 +echo "configure:6586: 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 6585 "configure" +#line 6591 "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 @@ -6592,7 +6598,7 @@ GetGifError() ; return 0; } EOF -if { (eval echo configure:6596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6602: \"$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 @@ -6628,15 +6634,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:6632: checking for jpeglib.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6635 "configure" +echo "configure:6638: checking for jpeglib.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6641 "configure" #include "confdefs.h" #include <jpeglib.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6659,12 +6665,12 @@ } test -z "$with_jpeg" && { echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 -echo "configure:6663: checking for jpeg_destroy_decompress in -ljpeg" >&5 +echo "configure:6669: 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 6668 "configure" +#line 6674 "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 @@ -6675,7 +6681,7 @@ jpeg_destroy_decompress() ; return 0; } EOF -if { (eval echo configure:6679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6685: \"$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 @@ -6711,9 +6717,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:6715: checking for png.h - no older than 0.96" >&5 +echo "configure:6721: checking for png.h - no older than 0.96" >&5 cat > conftest.$ac_ext <<EOF -#line 6717 "configure" +#line 6723 "configure" #include "confdefs.h" #include <png.h> #if PNG_LIBPNG_VER >= 96 @@ -6733,10 +6739,10 @@ fi test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 -echo "configure:6737: checking for pow" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6740 "configure" +echo "configure:6743: checking for pow" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6746 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char pow(); below. */ @@ -6759,7 +6765,7 @@ ; return 0; } EOF -if { (eval echo configure:6763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pow=yes" else @@ -6780,12 +6786,12 @@ } test -z "$with_png" && { echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:6784: checking for png_read_image in -lpng" >&5 +echo "configure:6790: 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 6789 "configure" +#line 6795 "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 @@ -6796,7 +6802,7 @@ png_read_image() ; return 0; } EOF -if { (eval echo configure:6800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6806: \"$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 @@ -6832,15 +6838,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:6836: checking for tiffio.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6839 "configure" +echo "configure:6842: checking for tiffio.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6845 "configure" #include "confdefs.h" #include <tiffio.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6863,12 +6869,12 @@ } test -z "$with_tiff" && { echo $ac_n "checking for TIFFReadScanline in -ltiff""... $ac_c" 1>&6 -echo "configure:6867: checking for TIFFReadScanline in -ltiff" >&5 +echo "configure:6873: 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 6872 "configure" +#line 6878 "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 @@ -6879,7 +6885,7 @@ TIFFReadScanline() ; return 0; } EOF -if { (eval echo configure:6883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6889: \"$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 @@ -6912,15 +6918,105 @@ libs_x="-ltiff $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ltiff\" to \$libs_x"; fi fi +fi + + +if test "$with_x11" = "yes"; then + + echo "checking for X11 graphics libraries" 1>&6 +echo "configure:6928: 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" +#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; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +with_xface=no +fi + } + 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 +ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'` + +xe_check_libs=" -lcompface " +cat > conftest.$ac_ext <<EOF +#line 6968 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char UnGenFace(); + +int main() { +UnGenFace() +; return 0; } +EOF +if { (eval echo configure:6979: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +xe_check_libs="" + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +with_xface=no +fi + + } + test -z "$with_xface" && with_xface=yes + if test "$with_xface" = "yes"; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_XFACE +EOF +cat >> confdefs.h <<\EOF +#define HAVE_XFACE 1 +EOF +} + + libs_x="-lcompface $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lcompface\" to \$libs_x"; fi + fi echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6 -echo "configure:6919: checking for XawScrollbarSetThumb in -lXaw" >&5 +echo "configure:7015: 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 6924 "configure" +#line 7020 "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 @@ -6931,7 +7027,7 @@ XawScrollbarSetThumb() ; return 0; } EOF -if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7031: \"$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 @@ -6955,15 +7051,15 @@ ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:6959: checking for Xm/Xm.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6962 "configure" +echo "configure:7055: checking for Xm/Xm.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7058 "configure" #include "confdefs.h" #include <Xm/Xm.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6980,12 +7076,12 @@ echo "$ac_t""yes" 1>&6 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6 -echo "configure:6984: checking for XmStringFree in -lXm" >&5 +echo "configure:7080: 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 6989 "configure" +#line 7085 "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 @@ -6996,7 +7092,7 @@ XmStringFree() ; return 0; } EOF -if { (eval echo configure:7000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7096: \"$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 @@ -7025,9 +7121,9 @@ if test "$have_motif" = "yes"; then echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 -echo "configure:7029: checking for Lesstif" >&5 +echo "configure:7125: checking for Lesstif" >&5 cat > conftest.$ac_ext <<EOF -#line 7031 "configure" +#line 7127 "configure" #include "confdefs.h" #include <Xm/Xm.h> #ifdef LESSTIF_VERSION @@ -7311,7 +7407,7 @@ if test "$with_mule" = "yes" ; then echo "checking for Mule-related features" 1>&6 -echo "configure:7315: checking for Mule-related features" >&5 +echo "configure:7411: checking for Mule-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining MULE EOF @@ -7336,15 +7432,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7340: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7343 "configure" +echo "configure:7436: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7439 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7375,12 +7471,12 @@ echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:7379: checking for strerror in -lintl" >&5 +echo "configure:7475: 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 7384 "configure" +#line 7480 "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 @@ -7391,7 +7487,7 @@ strerror() ; return 0; } EOF -if { (eval echo configure:7395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7491: \"$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 @@ -7424,19 +7520,19 @@ echo "checking for Mule input methods" 1>&6 -echo "configure:7428: checking for Mule input methods" >&5 +echo "configure:7524: checking for Mule input methods" >&5 case "$with_xim" in "" | "yes" ) echo "checking for XIM" 1>&6 -echo "configure:7431: checking for XIM" >&5 +echo "configure:7527: 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:7435: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:7531: 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 7440 "configure" +#line 7536 "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 @@ -7447,7 +7543,7 @@ XmImMbLookupString() ; return 0; } EOF -if { (eval echo configure:7451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7547: \"$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 @@ -7513,15 +7609,15 @@ if test "$with_xfs" = "yes" ; then echo "checking for XFontSet" 1>&6 -echo "configure:7517: checking for XFontSet" >&5 +echo "configure:7613: checking for XFontSet" >&5 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:7520: checking for XmbDrawString in -lX11" >&5 +echo "configure:7616: 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 7525 "configure" +#line 7621 "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 @@ -7532,7 +7628,7 @@ XmbDrawString() ; return 0; } EOF -if { (eval echo configure:7536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7632: \"$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 @@ -7572,15 +7668,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:7576: checking for wnn/jllib.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7579 "configure" +echo "configure:7672: checking for wnn/jllib.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7675 "configure" #include "confdefs.h" #include <wnn/jllib.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7605,10 +7701,10 @@ for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7609: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7612 "configure" +echo "configure:7705: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7708 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7631,7 +7727,7 @@ ; return 0; } EOF -if { (eval echo configure:7635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7660,12 +7756,12 @@ test "$ac_cv_func_crypt" != "yes" && { echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:7664: checking for crypt in -lcrypt" >&5 +echo "configure:7760: 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 7669 "configure" +#line 7765 "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 @@ -7676,7 +7772,7 @@ crypt() ; return 0; } EOF -if { (eval echo configure:7680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7776: \"$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 @@ -7710,12 +7806,12 @@ fi test -z "$with_wnn" && { echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6 -echo "configure:7714: checking for jl_dic_list_e in -lwnn" >&5 +echo "configure:7810: 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 7719 "configure" +#line 7815 "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 @@ -7726,7 +7822,7 @@ jl_dic_list_e() ; return 0; } EOF -if { (eval echo configure:7730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7826: \"$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 @@ -7763,12 +7859,12 @@ fi echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6 -echo "configure:7767: checking for jl_fi_dic_list in -lwnn" >&5 +echo "configure:7863: 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 7772 "configure" +#line 7868 "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 @@ -7779,7 +7875,7 @@ jl_fi_dic_list() ; return 0; } EOF -if { (eval echo configure:7783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7879: \"$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 @@ -7813,15 +7909,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:7817: checking for canna/jrkanji.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7820 "configure" +echo "configure:7913: checking for canna/jrkanji.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7916 "configure" #include "confdefs.h" #include <canna/jrkanji.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7848,15 +7944,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:7852: checking for canna/jrkanji.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7855 "configure" +echo "configure:7948: checking for canna/jrkanji.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7951 "configure" #include "confdefs.h" #include <canna/jrkanji.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7884,15 +7980,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:7888: checking for canna/RK.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7891 "configure" +echo "configure:7984: checking for canna/RK.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7987 "configure" #include "confdefs.h" #include <canna/RK.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7915,12 +8011,12 @@ } test -z "$with_canna" && { echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:7919: checking for RkBgnBun in -lRKC" >&5 +echo "configure:8015: 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 7924 "configure" +#line 8020 "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 @@ -7931,7 +8027,7 @@ RkBgnBun() ; return 0; } EOF -if { (eval echo configure:7935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8031: \"$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 @@ -7954,12 +8050,12 @@ } test -z "$with_canna" && { echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:7958: checking for jrKanjiControl in -lcanna" >&5 +echo "configure:8054: 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 7963 "configure" +#line 8059 "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 @@ -7970,7 +8066,7 @@ jrKanjiControl() ; return 0; } EOF -if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8070: \"$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 @@ -8019,12 +8115,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:8023: checking for layout_object_getvalue in -li18n" >&5 +echo "configure:8119: 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 8028 "configure" +#line 8124 "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 @@ -8035,7 +8131,7 @@ layout_object_getvalue() ; return 0; } EOF -if { (eval echo configure:8039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8135: \"$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 @@ -8121,10 +8217,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:8125: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8128 "configure" +echo "configure:8221: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8224 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8147,7 +8243,7 @@ ; return 0; } EOF -if { (eval echo configure:8151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8184,10 +8280,10 @@ for ac_func in realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8188: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8191 "configure" +echo "configure:8284: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8287 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8210,7 +8306,7 @@ ; return 0; } EOF -if { (eval echo configure:8214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8243,16 +8339,16 @@ esac echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:8247: checking whether netdb declares h_errno" >&5 -cat > conftest.$ac_ext <<EOF -#line 8249 "configure" +echo "configure:8343: checking whether netdb declares h_errno" >&5 +cat > conftest.$ac_ext <<EOF +#line 8345 "configure" #include "confdefs.h" #include <netdb.h> int main() { return h_errno; ; return 0; } EOF -if { (eval echo configure:8256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8352: \"$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 @@ -8272,16 +8368,16 @@ rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:8276: checking for sigsetjmp" >&5 -cat > conftest.$ac_ext <<EOF -#line 8278 "configure" +echo "configure:8372: checking for sigsetjmp" >&5 +cat > conftest.$ac_ext <<EOF +#line 8374 "configure" #include "confdefs.h" #include <setjmp.h> int main() { sigjmp_buf bar; sigsetjmp (bar, 0); ; return 0; } EOF -if { (eval echo configure:8285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8381: \"$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 @@ -8301,11 +8397,11 @@ rm -f conftest* echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:8305: checking whether localtime caches TZ" >&5 +echo "configure:8401: checking whether localtime caches TZ" >&5 if test "$ac_cv_func_tzset" = "yes"; then cat > conftest.$ac_ext <<EOF -#line 8309 "configure" +#line 8405 "configure" #include "confdefs.h" #include <time.h> #if STDC_HEADERS @@ -8340,7 +8436,7 @@ exit (0); } EOF -if { (eval echo configure:8344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then emacs_cv_localtime_cache=no else @@ -8369,9 +8465,9 @@ if test "$HAVE_TIMEVAL" = "yes"; then echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6 -echo "configure:8373: checking whether gettimeofday accepts one or two arguments" >&5 -cat > conftest.$ac_ext <<EOF -#line 8375 "configure" +echo "configure:8469: checking whether gettimeofday accepts one or two arguments" >&5 +cat > conftest.$ac_ext <<EOF +#line 8471 "configure" #include "confdefs.h" #ifdef TIME_WITH_SYS_TIME @@ -8393,7 +8489,7 @@ ; return 0; } EOF -if { (eval echo configure:8397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""two" 1>&6 else @@ -8415,19 +8511,19 @@ echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:8419: checking for inline" >&5 +echo "configure:8515: checking for inline" >&5 ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 8424 "configure" +#line 8520 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:8431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -8477,17 +8573,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:8481: checking for working alloca.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8484 "configure" +echo "configure:8577: checking for working alloca.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8580 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:8491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -8511,10 +8607,10 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:8515: checking for alloca" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8518 "configure" +echo "configure:8611: checking for alloca" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8614 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -8537,7 +8633,7 @@ char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:8541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -8576,10 +8672,10 @@ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:8580: checking whether alloca needs Cray hooks" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8583 "configure" +echo "configure:8676: checking whether alloca needs Cray hooks" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8679 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -8603,10 +8699,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:8607: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8610 "configure" +echo "configure:8703: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8706 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8629,7 +8725,7 @@ ; return 0; } EOF -if { (eval echo configure:8633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8659,10 +8755,10 @@ fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:8663: checking stack direction for C alloca" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8666 "configure" +echo "configure:8759: checking stack direction for C alloca" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8762 "configure" #include "confdefs.h" find_stack_direction () { @@ -8681,7 +8777,7 @@ exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:8685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_c_stack_direction=1 else @@ -8709,15 +8805,15 @@ ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:8713: checking for vfork.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8716 "configure" +echo "configure:8809: checking for vfork.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8812 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8745,10 +8841,10 @@ fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:8749: checking for working vfork" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8752 "configure" +echo "configure:8845: checking for working vfork" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8848 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -8843,7 +8939,7 @@ } } EOF -if { (eval echo configure:8847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_func_vfork_works=yes else @@ -8868,10 +8964,10 @@ echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:8872: checking for working strcoll" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8875 "configure" +echo "configure:8968: checking for working strcoll" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8971 "configure" #include "confdefs.h" #include <string.h> main () @@ -8881,7 +8977,7 @@ strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:8885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_func_strcoll_works=yes else @@ -8908,10 +9004,10 @@ for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8912: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8915 "configure" +echo "configure:9008: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9011 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8934,7 +9030,7 @@ ; return 0; } EOF -if { (eval echo configure:8938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8962,10 +9058,10 @@ done echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:8966: checking whether getpgrp takes no argument" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8969 "configure" +echo "configure:9062: checking whether getpgrp takes no argument" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9065 "configure" #include "confdefs.h" /* @@ -9020,7 +9116,7 @@ } EOF -if { (eval echo configure:9024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:9120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then ac_cv_func_getpgrp_void=yes else @@ -9046,10 +9142,10 @@ echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:9050: checking for working mmap" >&5 +echo "configure:9146: checking for working mmap" >&5 case "$opsys" in ultrix* ) have_mmap=no ;; *) cat > conftest.$ac_ext <<EOF -#line 9053 "configure" +#line 9149 "configure" #include "confdefs.h" #include <stdio.h> #include <unistd.h> @@ -9082,7 +9178,7 @@ return 1; } EOF -if { (eval echo configure:9086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:9182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then have_mmap=yes else @@ -9116,15 +9212,15 @@ ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:9120: checking for termios.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9123 "configure" +echo "configure:9216: checking for termios.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9219 "configure" #include "confdefs.h" #include <termios.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9167,15 +9263,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:9171: checking for termio.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9174 "configure" +echo "configure:9267: checking for termio.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9270 "configure" #include "confdefs.h" #include <termio.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9207,10 +9303,10 @@ echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:9211: checking for socket" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9214 "configure" +echo "configure:9307: checking for socket" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9310 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char socket(); below. */ @@ -9233,7 +9329,7 @@ ; return 0; } EOF -if { (eval echo configure:9237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -9248,15 +9344,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:9252: checking for netinet/in.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9255 "configure" +echo "configure:9348: checking for netinet/in.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9351 "configure" #include "confdefs.h" #include <netinet/in.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9273,15 +9369,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:9277: checking for arpa/inet.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9280 "configure" +echo "configure:9373: checking for arpa/inet.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9376 "configure" #include "confdefs.h" #include <arpa/inet.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9306,9 +9402,9 @@ } echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:9310: checking "for sun_len member in struct sockaddr_un"" >&5 +echo "configure:9406: checking "for sun_len member in struct sockaddr_un"" >&5 cat > conftest.$ac_ext <<EOF -#line 9312 "configure" +#line 9408 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9319,7 +9415,7 @@ static struct sockaddr_un x; x.sun_len = 1; ; return 0; } EOF -if { (eval echo configure:9323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9419: \"$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 @@ -9337,9 +9433,9 @@ fi rm -f conftest* echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 -echo "configure:9341: checking "for ip_mreq struct in netinet/in.h"" >&5 +echo "configure:9437: checking "for ip_mreq struct in netinet/in.h"" >&5 cat > conftest.$ac_ext <<EOF -#line 9343 "configure" +#line 9439 "configure" #include "confdefs.h" #include <netinet/in.h> @@ -9348,7 +9444,7 @@ static struct ip_mreq x; ; return 0; } EOF -if { (eval echo configure:9352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9448: \"$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 @@ -9379,10 +9475,10 @@ echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:9383: checking for msgget" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9386 "configure" +echo "configure:9479: checking for msgget" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9482 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char msgget(); below. */ @@ -9405,7 +9501,7 @@ ; return 0; } EOF -if { (eval echo configure:9409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_msgget=yes" else @@ -9420,15 +9516,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:9424: checking for sys/ipc.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9427 "configure" +echo "configure:9520: checking for sys/ipc.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9523 "configure" #include "confdefs.h" #include <sys/ipc.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9445,15 +9541,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:9449: checking for sys/msg.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9452 "configure" +echo "configure:9545: checking for sys/msg.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9548 "configure" #include "confdefs.h" #include <sys/msg.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9491,15 +9587,15 @@ ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:9495: checking for dirent.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9498 "configure" +echo "configure:9591: checking for dirent.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9594 "configure" #include "confdefs.h" #include <dirent.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9526,15 +9622,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:9530: checking for sys/dir.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9533 "configure" +echo "configure:9626: checking for sys/dir.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9629 "configure" #include "confdefs.h" #include <sys/dir.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9567,15 +9663,15 @@ ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:9571: checking for nlist.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9574 "configure" +echo "configure:9667: checking for nlist.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9670 "configure" #include "confdefs.h" #include <nlist.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9605,7 +9701,7 @@ echo "checking "for sound support"" 1>&6 -echo "configure:9609: checking "for sound support"" >&5 +echo "configure:9705: checking "for sound support"" >&5 case "$with_sound" in native | both ) with_native_sound=yes;; nas | no ) with_native_sound=no;; @@ -9616,15 +9712,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:9620: checking for multimedia/audio_device.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9623 "configure" +echo "configure:9716: checking for multimedia/audio_device.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9719 "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:9628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9672,12 +9768,12 @@ if test -z "$native_sound_lib"; then echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:9676: checking for ALopenport in -laudio" >&5 +echo "configure:9772: 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 9681 "configure" +#line 9777 "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 @@ -9688,7 +9784,7 @@ ALopenport() ; return 0; } EOF -if { (eval echo configure:9692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9788: \"$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 @@ -9719,12 +9815,12 @@ if test -z "$native_sound_lib"; then echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:9723: checking for AOpenAudio in -lAlib" >&5 +echo "configure:9819: 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 9728 "configure" +#line 9824 "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 @@ -9735,7 +9831,7 @@ AOpenAudio() ; return 0; } EOF -if { (eval echo configure:9739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9835: \"$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 @@ -9773,15 +9869,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:9777: checking for ${dir}/soundcard.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9780 "configure" +echo "configure:9873: checking for ${dir}/soundcard.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9876 "configure" #include "confdefs.h" #include <${dir}/soundcard.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9851,7 +9947,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 9855 "configure" +#line 9951 "configure" #include "confdefs.h" #include <audio/Xtutil.h> EOF @@ -9878,7 +9974,7 @@ if test "$with_tty" = "yes" ; then echo "checking for TTY-related features" 1>&6 -echo "configure:9882: checking for TTY-related features" >&5 +echo "configure:9978: checking for TTY-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_TTY EOF @@ -9894,12 +9990,12 @@ if test -z "$with_ncurses"; then echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:9898: checking for tgetent in -lncurses" >&5 +echo "configure:9994: 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 9903 "configure" +#line 9999 "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 @@ -9910,7 +10006,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:9914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10010: \"$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 @@ -9943,15 +10039,15 @@ ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:9947: checking for ncurses/curses.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9950 "configure" +echo "configure:10043: checking for ncurses/curses.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10046 "configure" #include "confdefs.h" #include <ncurses/curses.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9973,15 +10069,15 @@ ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6 -echo "configure:9977: checking for ncurses/term.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9980 "configure" +echo "configure:10073: checking for ncurses/term.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10076 "configure" #include "confdefs.h" #include <ncurses/term.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10011,15 +10107,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:10015: checking for ncurses/curses.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10018 "configure" +echo "configure:10111: checking for ncurses/curses.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10114 "configure" #include "confdefs.h" #include <ncurses/curses.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10054,12 +10150,12 @@ for lib in curses termlib termcap; do echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:10058: checking for tgetent in -l$lib" >&5 +echo "configure:10154: 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 10063 "configure" +#line 10159 "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 @@ -10070,7 +10166,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:10074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10170: \"$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 @@ -10101,12 +10197,12 @@ else echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:10105: checking for tgetent in -lcurses" >&5 +echo "configure:10201: 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 10110 "configure" +#line 10206 "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 @@ -10117,7 +10213,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:10121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10217: \"$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 @@ -10135,12 +10231,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:10139: checking for tgetent in -ltermcap" >&5 +echo "configure:10235: 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 10144 "configure" +#line 10240 "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 @@ -10151,7 +10247,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:10155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10251: \"$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 @@ -10199,15 +10295,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:10203: checking for gpm.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10206 "configure" +echo "configure:10299: checking for gpm.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10302 "configure" #include "confdefs.h" #include <gpm.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10230,12 +10326,12 @@ } test -z "$with_gpm" && { echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:10234: checking for Gpm_Open in -lgpm" >&5 +echo "configure:10330: 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 10239 "configure" +#line 10335 "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 @@ -10246,7 +10342,7 @@ Gpm_Open() ; return 0; } EOF -if { (eval echo configure:10250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10346: \"$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,22 +10391,22 @@ echo "checking for database support" 1>&6 -echo "configure:10299: checking for database support" >&5 +echo "configure:10395: 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:10306: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10309 "configure" +echo "configure:10402: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10405 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10342,12 +10438,12 @@ if test "$have_ndbm_h" = "yes"; then echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:10346: checking for dbm_open in -lgdbm" >&5 +echo "configure:10442: 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 10351 "configure" +#line 10447 "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 @@ -10358,7 +10454,7 @@ dbm_open() ; return 0; } EOF -if { (eval echo configure:10362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10458: \"$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 @@ -10381,10 +10477,10 @@ fi if test "$with_database_gnudbm" != "yes"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:10385: checking for dbm_open" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10388 "configure" +echo "configure:10481: checking for dbm_open" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10484 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dbm_open(); below. */ @@ -10407,7 +10503,7 @@ ; return 0; } EOF -if { (eval echo configure:10411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -10443,10 +10539,10 @@ if test "$with_database_dbm" != "no"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:10447: checking for dbm_open" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10450 "configure" +echo "configure:10543: checking for dbm_open" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10546 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dbm_open(); below. */ @@ -10469,7 +10565,7 @@ ; return 0; } EOF -if { (eval echo configure:10473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -10490,12 +10586,12 @@ if test "$need_libdbm" != "no"; then echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:10494: checking for dbm_open in -ldbm" >&5 +echo "configure:10590: 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 10499 "configure" +#line 10595 "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 @@ -10506,7 +10602,7 @@ dbm_open() ; return 0; } EOF -if { (eval echo configure:10510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10606: \"$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 @@ -10543,10 +10639,10 @@ if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:10547: checking for dbopen" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10550 "configure" +echo "configure:10643: checking for dbopen" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10646 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dbopen(); below. */ @@ -10569,7 +10665,7 @@ ; return 0; } EOF -if { (eval echo configure:10573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -10590,12 +10686,12 @@ if test "$need_libdb" != "no"; then echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:10594: checking for dbopen in -ldb" >&5 +echo "configure:10690: 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 10599 "configure" +#line 10695 "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 @@ -10606,7 +10702,7 @@ dbopen() ; return 0; } EOF -if { (eval echo configure:10610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10706: \"$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 @@ -10630,7 +10726,7 @@ if test "$with_database_berkdb" = "yes"; then for path in "db/db.h" "db.h"; do cat > conftest.$ac_ext <<EOF -#line 10634 "configure" +#line 10730 "configure" #include "confdefs.h" #ifdef HAVE_INTTYPES_H #define __BIT_TYPES_DEFINED__ @@ -10648,7 +10744,7 @@ ; return 0; } EOF -if { (eval echo configure:10652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_path="$path"; break else @@ -10699,12 +10795,12 @@ if test "$with_socks" = "yes"; then echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:10703: checking for SOCKSinit in -lsocks" >&5 +echo "configure:10799: 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 10708 "configure" +#line 10804 "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 @@ -10715,7 +10811,7 @@ SOCKSinit() ; return 0; } EOF -if { (eval echo configure:10719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10815: \"$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 @@ -10772,15 +10868,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10776: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10779 "configure" +echo "configure:10872: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10875 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10811,12 +10907,12 @@ test -z "$with_shlib" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:10815: checking for dlopen in -ldl" >&5 +echo "configure:10911: 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 10820 "configure" +#line 10916 "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 @@ -10827,7 +10923,7 @@ dlopen() ; return 0; } EOF -if { (eval echo configure:10831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10927: \"$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 @@ -10856,12 +10952,12 @@ } test -z "$with_shlib" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6 -echo "configure:10860: checking for _dlopen in -lc" >&5 +echo "configure:10956: 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 10865 "configure" +#line 10961 "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 @@ -10872,7 +10968,7 @@ _dlopen() ; return 0; } EOF -if { (eval echo configure:10876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10972: \"$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 @@ -10901,12 +10997,12 @@ } test -z "$with_shlib" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 -echo "configure:10905: checking for dlopen in -lc" >&5 +echo "configure:11001: 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 10910 "configure" +#line 11006 "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 @@ -10917,7 +11013,7 @@ dlopen() ; return 0; } EOF -if { (eval echo configure:10921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11017: \"$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 @@ -10946,12 +11042,12 @@ } test -z "$with_shlib" && { echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:10950: checking for shl_load in -ldld" >&5 +echo "configure:11046: 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 10955 "configure" +#line 11051 "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 @@ -10962,7 +11058,7 @@ shl_load() ; return 0; } EOF -if { (eval echo configure:10966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11062: \"$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 @@ -10991,12 +11087,12 @@ } test -z "$with_shlib" && { echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:10995: checking for dld_init in -ldld" >&5 +echo "configure:11091: 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 11000 "configure" +#line 11096 "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 @@ -11007,7 +11103,7 @@ dld_init() ; return 0; } EOF -if { (eval echo configure:11011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11107: \"$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 @@ -11057,7 +11153,7 @@ dll_oflags="-o " echo $ac_n "checking how to build a shared library""... $ac_c" 1>&6 -echo "configure:11061: checking how to build a shared library" >&5 +echo "configure:11157: checking how to build a shared library" >&5 case `uname -rs` in UNIX_SV*|UNIX_System_V*) dll_lflags="-G" @@ -11148,10 +11244,10 @@ for ac_func in dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11152: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 11155 "configure" +echo "configure:11248: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 11251 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -11174,7 +11270,7 @@ ; return 0; } EOF -if { (eval echo configure:11178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11210,11 +11306,11 @@ fi cat > conftest.$ac_ext <<EOF -#line 11214 "configure" +#line 11310 "configure" #include "confdefs.h" int main(int c,char *v[]){return 0;} EOF -if { (eval echo configure:11218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:11314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 then : else @@ -11378,6 +11474,24 @@ +PREFIX=$prefix +while true; do + case "$PREFIX" in + *\$* ) eval "PREFIX=$PREFIX" ;; + *) break ;; + esac +done + + + +EXEC_PREFIX=$exec_prefix +while true; do + case "$EXEC_PREFIX" in + *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;; + *) break ;; + esac +done + @@ -11425,16 +11539,6 @@ -SITELISPDIR=$sitelispdir -while true; do - case "$SITELISPDIR" in - *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;; - *) break ;; - esac -done - - - ETCDIR=$etcdir while true; do @@ -11995,6 +12099,8 @@ s%@srcdir@%$srcdir%g s%@pkgdir@%$pkgdir%g s%@statedir@%$statedir%g +s%@PREFIX@%$PREFIX%g +s%@EXEC_PREFIX@%$EXEC_PREFIX%g s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g s%@INFODIR@%$INFODIR%g s%@infopath@%$infopath%g @@ -12006,9 +12112,6 @@ s%@lispdir@%$lispdir%g s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g s%@LISPDIR@%$LISPDIR%g -s%@sitelispdir@%$sitelispdir%g -s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g -s%@SITELISPDIR@%$SITELISPDIR%g s%@etcdir@%$etcdir%g s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g s%@ETCDIR@%$ETCDIR%g
--- a/configure.in Mon Aug 13 10:30:38 2007 +0200 +++ b/configure.in Mon Aug 13 10:31:29 2007 +0200 @@ -269,6 +269,8 @@ dnl and all the variables that are supposed to be based on exec_prefix dnl by default will actually change. dnl Use braces instead of parens because sh, perl, etc. also accept them. +dnl If you change these, you need to synchronize with the settings of the +dnl various ..._USER_DEFINED variables further down. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' @@ -327,7 +329,7 @@ infopath='' install_pp='' lispdir='${datadir}/xemacs-${version}/lisp' -sitelispdir='${datadir}/xemacs/site-lisp' +dnl sitelispdir='${datadir}/xemacs/site-lisp' pkgdir='${datadir}/xemacs-${version}/lisp' package_path='' etcdir='${datadir}/xemacs-${version}/etc' @@ -682,7 +684,7 @@ dnl Has the user specified one of the path options? prefix | exec_prefix | bindir | datadir | statedir | libdir | \ mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \ - archlibdir | sitelispdir | docdir | package_path ) + archlibdir | docdir | package_path ) dnl If the value was omitted, get it from the next argument. if test "$valomitted" = "yes"; then if test "$#" = 0; then @@ -692,18 +694,19 @@ fi eval "$opt=\"$val\"" - dnl Changing exec_prefix or libdir will change the default value - dnl of archlibdir. Changing datadir will change the default value - dnl of etcdir and lispdir. Changing statedir will change the - dnl default value of lockdir. - case "$opt" in + dnl You need to synchronize this with the way the + dnl default values are built. + case "$opt" in lispdir ) AC_DEFINE(LISPDIR_USER_DEFINED) ;; - sitelispdir ) AC_DEFINE(SITELISPDIR_USER_DEFINED) ;; +dnl sitelispdir ) AC_DEFINE(SITELISPDIR_USER_DEFINED) ;; etcdir ) AC_DEFINE(ETCDIR_USER_DEFINED) ;; infodir ) AC_DEFINE(INFODIR_USER_DEFINED) ;; infopath ) AC_DEFINE(INFOPATH_USER_DEFINED) ;; package_path ) AC_DEFINE(PACKAGE_PATH_USER_DEFINED) ;; - datadir ) AC_DEFINE(ETCDIR_USER_DEFINED) ;; + datadir ) + AC_DEFINE(INFODIR_USER_DEFINED) + AC_DEFINE(LISPDIR_USER_DEFINED) + AC_DEFINE(ETCDIR_USER_DEFINED) ;; statedir | lockdir ) AC_DEFINE(LOCKDIR_USER_DEFINED) ;; exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;; esac @@ -906,6 +909,12 @@ 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) + dnl ---------------------------------- dnl Error checking and debugging flags dnl ---------------------------------- @@ -2108,10 +2117,11 @@ dnl Another way to get the load average AC_CHECK_LIB(kvm, kvm_read) -AC_CHECK_LIB(pthreads, cma_open) -if test "$ac_cv_lib_pthreads_cma_open" = "yes"; then - case "$opsys" in decosf*) c_switch_site="$c_switch_site -threads";; esac -fi +case "$opsys" in decosf*) + AC_CHECK_LIB(pthreads, cma_open) + test "$ac_cv_lib_pthreads_cma_open" = "yes" && \ + c_switch_site="$c_switch_site -threads" ;; +esac AC_MSG_CHECKING(whether the -xildoff compiler flag is required) if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then @@ -2194,7 +2204,7 @@ dnl Try to find Motif/CDE/Tooltalk dirs dnl These take precedence over other X libs/includes, so PRE-pend - for lib_dir in "/usr/dt/lib" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do + for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do inc_dir=`echo $lib_dir | sed -e 's/lib/include/'` if test -d "$lib_dir" -a -d "$inc_dir"; then case "$x_libraries" in *"$lib_dir"* ) ;; *) @@ -2374,8 +2384,14 @@ test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-msw.o) test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-msw.o) fi + dnl check for our special version of select + AC_TRY_RUN([#include <fcntl.h> + int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }], + [AC_DEFINE(HAVE_MSG_SELECT)]) const_is_losing=no with_file_coding=yes + use_minimal_tagbits=yes + use_indexed_lrecord_implementation=yes XE_ADD_OBJS(console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o) fi fi @@ -2419,7 +2435,7 @@ dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.]) dnl fi for feature in tooltalk cde offix session xim xmu \ - tiff png jpeg gif xface xpm + xface do if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then AC_MSG_WARN([--with-$feature ignored: Not valid without X support]) @@ -2536,20 +2552,11 @@ fi dnl ---------------------- -dnl X11 Graphics libraries +dnl Graphics libraries dnl ---------------------- -if test "$with_x11" = "yes"; then - - AC_CHECKING(for X11 graphics libraries) - - dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime - dnl So we always search for libz compression support. - if test "$with_png $with_tiff" != "no no"; then - AC_CHECK_LIB(c, inflate, [:], [ - AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_x)],[ - AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])]) - fi +if test "$window_system" != "none"; then + AC_CHECKING(for graphics libraries) dnl Autodetect Xpm if test -z "$with_xpm"; then @@ -2573,11 +2580,11 @@ xpm_problem="Internal xpm detection logic error!" fi echo " - *** WARNING *** $problem - I'm not touching that with a 10-foot pole! - If you really want to use the installed version of Xpm, rerun - configure --with-xpm=yes, but don't blame me if XEmacs crashes!" - fi], +*** WARNING *** $problem + I'm not touching that with a 10-foot pole! + If you really want to use the installed version of Xpm, rerun + configure --with-xpm=yes, but don't blame me if XEmacs crashes!" + fi], [with_xpm=no]) xe_check_libs= AC_MSG_RESULT($with_xpm) @@ -2585,15 +2592,24 @@ if test "$with_xpm" = "yes"; then AC_DEFINE(HAVE_XPM) XE_PREPEND(-lXpm, libs_x) + AC_MSG_CHECKING(for \"FOR_MSW\" xpm) + xe_check_libs=-lXpm + AC_TRY_LINK(, [XpmCreatePixmapFromData()], + [xpm_for_msw=no], + [xpm_for_msw=yes]) + xe_check_libs= + AC_MSG_RESULT($xpm_for_msw) + if test "$xpm_for_msw" = "yes"; then + AC_DEFINE(FOR_MSW) + fi fi - dnl Autodetect XFACE - test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) } - test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) } - test -z "$with_xface" && with_xface=yes - if test "$with_xface" = "yes"; then - AC_DEFINE(HAVE_XFACE) - XE_PREPEND(-lcompface, libs_x) + dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime + dnl So we always search for libz compression support. + if test "$with_png $with_tiff" != "no no"; then + AC_CHECK_LIB(c, inflate, [:], [ + AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_x)],[ + AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])]) fi dnl Autodetect GIFlib @@ -2641,6 +2657,24 @@ AC_DEFINE(HAVE_TIFF) XE_PREPEND(-ltiff, libs_x) fi +fi + +dnl ---------------------- +dnl Graphics libraries +dnl ---------------------- + +if test "$with_x11" = "yes"; then + + AC_CHECKING(for X11 graphics libraries) + + dnl Autodetect XFACE + test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) } + test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) } + test -z "$with_xface" && with_xface=yes + if test "$with_xface" = "yes"; then + AC_DEFINE(HAVE_XFACE) + XE_PREPEND(-lcompface, libs_x) + fi dnl Autodetect -lXaw AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no) @@ -3505,8 +3539,6 @@ AC_SUBST(configuration) AC_SUBST(canonical) AC_SUBST(srcdir) -AC_SUBST(prefix) -AC_SUBST(exec_prefix) AC_SUBST(bindir) AC_SUBST(datadir) AC_SUBST(pkgdir) @@ -3514,9 +3546,29 @@ AC_SUBST(libdir) AC_SUBST(mandir) +AC_SUBST(prefix) +dnl Yo, Stephen Bourne! I want to marry you! +PREFIX=$prefix +while true; do + case "$PREFIX" in + *\$* ) eval "PREFIX=$PREFIX" ;; + *) break ;; + esac +done +AC_SUBST(PREFIX) + +AC_SUBST(exec_prefix) +EXEC_PREFIX=$exec_prefix +while true; do + case "$EXEC_PREFIX" in + *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;; + *) break ;; + esac +done +AC_SUBST(EXEC_PREFIX) + AC_SUBST(infodir) AC_SUBST(INFODIR_USER_DEFINED) -dnl Yo, Stephen Bourne! I want to marry you! INFODIR=$infodir while true; do case "$INFODIR" in @@ -3559,16 +3611,16 @@ done AC_SUBST(LISPDIR) -AC_SUBST(sitelispdir) -AC_SUBST(SITELISPDIR_USER_DEFINED) -SITELISPDIR=$sitelispdir -while true; do - case "$SITELISPDIR" in - *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;; - *) break ;; - esac -done -AC_SUBST(SITELISPDIR) +dnl AC_SUBST(sitelispdir) +dnl AC_SUBST(SITELISPDIR_USER_DEFINED) +dnl SITELISPDIR=$sitelispdir +dnl while true; do +dnl case "$SITELISPDIR" in +dnl *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;; +dnl *) break ;; +dnl esac +dnl done +dnl AC_SUBST(SITELISPDIR) AC_SUBST(etcdir) AC_SUBST(ETCDIR_USER_DEFINED)
--- a/etc/HELLO Mon Aug 13 10:30:38 2007 +0200 +++ b/etc/HELLO Mon Aug 13 10:31:29 2007 +0200 @@ -18,7 +18,7 @@ Hebrew [2],Hylem[0](B Italiano Ciao, Buon giorno Maltese Ciao -Nederlands, Vlaams Hallo, Dag +Nederlands, Vlaams Hallo, Hoi, Goedendag Norwegian (Norsk) Hei, God dag Polish Cze,B6f(B! Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!
--- a/etc/NEWS Mon Aug 13 10:30:38 2007 +0200 +++ b/etc/NEWS Mon Aug 13 10:31:29 2007 +0200 @@ -37,6 +37,9 @@ See the file `etc/PACKAGES' in the distribution for a full description. +** When the Zmacs region is active, `M-x query-replace' and the other +replace commands now operate on the region contents only. + ** Using the new `-private' option, you can make XEmacs use a private colormap. @@ -93,11 +96,46 @@ or the native C libraries support Japanese localization. This has been available since 20.3, only it hasn't been announced before. +** C mode changes + +*** Multiline macros are now handled, both as they affect indentation, +and as recognized syntax. New syntactic symbol cpp-macro-cont is +assigned to second and subsequent lines of a multiline macro +definition. + +*** A new style "user" which captures all non-hook-ified +(i.e. top-level) .emacs file variable setings and customizations. +Style "cc-mode" is an alias for "user" and is deprecated. "gnu" style +is still the default however. + +*** "java" style now conforms to Sun's JDK coding style. + +*** There are new commands c-beginning-of-defun, c-end-of-defun which +are alternatives which you could bind to C-M-a and C-M-e if you prefer +them. They do not have key bindings by default. + +*** New and improved implementations of M-a (c-beginning-of-statement) +and M-e (c-end-of-statement). + +*** C++ namespace blocks are supported, with new syntactic symbols +namespace-open, namespace-close, and innamespace. + +*** File local variable settings of c-file-style and c-file-offsets +makes the style variables local to that buffer only. + +*** New indentation functions c-lineup-close-paren, +c-indent-one-line-block, c-lineup-dont-change. + +*** Improvements (hopefully!) to the way CC Mode is loaded. You +should now be able to do a (require 'cc-mode) to get the entire +package loaded properly for customization in your .emacs file. A new +variable c-initialize-on-load controls this and is t by default. + ** In Text mode, now only blank lines separate paragraphs. This makes it possible to get the full benefit of Adaptive Fill mode in Text mode, and other modes derived from it (such as Mail mode). -TAB in Text mode now runs the command indent-relative; this -makes a practical difference only when you use indented paragraphs. +TAB in Text mode now runs the command indent-relative; this makes a +practical difference only when you use indented paragraphs. As a result, the old Indented Text mode is now identical to Text mode, and is an alias for it. @@ -105,6 +143,19 @@ If you want spaces at the beginning of a line to start a paragraph, use the new mode, Paragraph Indent Text mode. +** In Info mode, dir files can be automatically rebuilt +when they do not exist or get out of date with respect to the info files +in the same directory. + +The default behaviour is to ask the user if he wants to rebuild an +outdated info file when doing so would overwrite the file. When the +user has no write access to an outdated info file or to an info +directory containing no dir file, a temporary dir file is built and used +instead without asking the user but issuing a warning. + +This behaviour can be customized, look for `Info-rebuild-outdated-dir' +in the `info' customization group. + * Lisp and internal changes in XEmacs 21.0 ========================================== @@ -115,6 +166,14 @@ 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. +** It is now possible to build XEmacs with LDAP support +You need to install a LDAP library first. The following have been +tested: + - LDAP 3.3 from the University of Michigan + (http://www.umich.edu/~dirsvcs/ldap/) + - LDAP SDK 1.0 from Netscape Corp. + (http://developer.netscape.com) + ** The XEmacs hashtables now have a consistent read/print syntax. This means that a hashtable will be readably printed in a structure-like form: @@ -135,6 +194,15 @@ `call-count-profile-table', and is utilized by `profile-results' as well as the new function `profile-call-count-results'. +** The new function `string' concatenates all its argument characters +and returns the resulting string. This is consistent with other +functions, like `list', `vector', etc. + +** The `load-average' function now accepts a USE-FLOATS argument +which, when non-nil, means to use floats instead of integers +multiplied by 100. At a future date, `load-average' will use floats +by default. + ** The `make-event' function now supports the TYPE and PLIST arguments, which can be used to create various events from Lisp. See the documentation for details.
--- a/etc/gnuserv.1 Mon Aug 13 10:30:38 2007 +0200 +++ b/etc/gnuserv.1 Mon Aug 13 10:31:29 2007 +0200 @@ -69,13 +69,14 @@ Tell Emacs to load the specified library. .TP 8 .BI \-batch -Tell Emacs not to open any frames. Just load libraries and evaluate lisp code. You -must use the +Tell Emacs not to open any frames. Just load libraries and evaluate +lisp code. If no files to execute, functions to call or forms to eval +are given using the .BR \-l , .BR \-f , -and +or .B \-eval -options to specify files to execute and functions to call. +options, then forms to eval are read from STDIN. .TP 8 .BI \-f " function," Make Emacs execute the lisp function.
--- a/info/dir Mon Aug 13 10:30:38 2007 +0200 +++ b/info/dir Mon Aug 13 10:31:29 2007 +0200 @@ -13,13 +13,13 @@ loaded before ~/.emacs each time the editor starts up: ;; find local info nodes - (setq Info-default-directory-list - (append Info-default-directory-list '("/private/info/"))) + (setq Info-directory-list + (append Info-directory-list '("/private/info/"))) -Then, when you enter info, the contents of the file "/private/info/localdir" -will be appended to the contents of this file (where the "* Locals:" line is.) -The "localdir" file should simply contain lines like in this file, listing the -names of the info files in its directory. +Then, when you enter info, a dir file like this one will be automatically +created and saved (provided you have write access to the directory). The +contents of that file "/private/info/dir" will be appended to the contents of +this file. File: dir Node: Top This is the top of the INFO tree @@ -36,26 +36,24 @@ XEmacs 21.0 =========== -* Info:: Documentation browsing system. -* XEmacs:: The extensible user-friendly self-documenting text editor. - This manual is for XEmacs 21.0. -* Lispref:: XEmacs Lisp technical reference. - This manual is for XEmacs 21.0. -* New-Users-Guide:: - XEmacs User's Guide for XEmacs 21.0. -* XEmacs-FAQ:: XEmacs Frequently Asked Questions for 21.0. -* Internals:: Guide to the internals of XEmacs. +* Info:: Documentation browsing system. +* XEmacs:: The extensible user-friendly self-documenting text editor. + This manual is for XEmacs 21.0. +* Lispref:: XEmacs Lisp technical reference. + This manual is for XEmacs 21.0. +* New-Users-Guide:: XEmacs New User's Guide for XEmacs 21.0. +* XEmacs-FAQ:: XEmacs Frequently Asked Questions for 21.0. +* Internals:: Guide to the internals of XEmacs. Local Packages: -* CL:: A Common Lisp compatibility package for Emacs-Lisp. -* Custom:: Customization Library for Emacs -* External-Widget:: - Use XEmacs as a text widget inside of another program. -* Standards:: The GNU coding standards. -* Termcap:: The termcap library, which enables application programs - to handle all types of character-display terminals. -* Texinfo:: With one source file, make either a printed manual (through - TeX) or an Info file (through texinfo). -* Widget:: An Emacs Lisp widget library -* Locals: +* CL:: A Common Lisp compatibility package for Emacs-Lisp. +* Custom:: Customization Library for Emacs +* External-Widget:: Use XEmacs as a text widget inside of another program. +* Standards:: The GNU coding standards. +* Term:: A mode to control inferior processes (a comint replacement) +* Termcap:: The termcap library, which enables application programs + to handle all types of character-display terminals. +* Texinfo:: With one source file, make either a printed manual (through + TeX) or an Info file (through texinfo). +* Widget:: An Emacs Lisp widget library
--- a/lib-src/ChangeLog Mon Aug 13 10:30:38 2007 +0200 +++ b/lib-src/ChangeLog Mon Aug 13 10:31:29 2007 +0200 @@ -1,3 +1,22 @@ +Wed Apr 22 12:59:35 1998 Andy Piper <andyp@parallax.co.uk> + + * installexe.sh: fix to use -f instead of -e file and fix shift + typo. + +1998-04-22 SL Baur <steve@altair.xemacs.org> + + * etags.c: Unconditionally define OO_BROWSER. + + * update-elc.sh: Tighten up regexp on uname -r output. + From Marcus Thiessel <thiessel@tmbbwtx.bbn.hp.com> + +1998-04-19 Jan Vroonhof <vroonhof@math.ethz.ch> + + * gnuclient.c (main): Read eval from from stdin if just "-batch" + is given. + * gnudoit: Support this. + * gnuserv.1: Document this behavior. + 1998-04-18 Andreas Jaeger <aj@arthur.rhein-neckar.de> * etags.c (C_entries): Add parentheses.
--- a/lib-src/config.values.in Mon Aug 13 10:30:38 2007 +0200 +++ b/lib-src/config.values.in Mon Aug 13 10:31:29 2007 +0200 @@ -26,6 +26,7 @@ DEFS "@DEFS@" ETCDIR "@ETCDIR@" ETCDIR_USER_DEFINED "@ETCDIR_USER_DEFINED@" +EXEC_PREFIX "@EXEC_PREFIX@" INFODIR "@INFODIR@" INFODIR_USER_DEFINED "@INFODIR_USER_DEFINED@" INFOPATH "@INFOPATH@" @@ -44,11 +45,10 @@ MAKE_SUBDIR "@MAKE_SUBDIR@" PACKAGE_PATH "@PACKAGE_PATH@" PACKAGE_PATH_USER_DEFINED "@PACKAGE_PATH_USER_DEFINED@" +PREFIX "@PREFIX@" RANLIB "@RANLIB@" RECURSIVE_MAKE "@RECURSIVE_MAKE@" SET_MAKE "@SET_MAKE@" -SITELISPDIR "@SITELISPDIR@" -SITELISPDIR_USER_DEFINED "@SITELISPDIR_USER_DEFINED@" SRC_SUBDIR_DEPS "@SRC_SUBDIR_DEPS@" SUBDIR_MAKEFILES "@SUBDIR_MAKEFILES@" X_CFLAGS "@X_CFLAGS@" @@ -110,7 +110,6 @@ program_transform_name "@program_transform_name@" sbindir "@sbindir@" sharedstatedir "@sharedstatedir@" -sitelispdir "@sitelispdir@" sound_cflags "@sound_cflags@" srcdir "@srcdir@" start_files "@start_files@"
--- a/lib-src/etags.c Mon Aug 13 10:30:38 2007 +0200 +++ b/lib-src/etags.c Mon Aug 13 10:31:29 2007 +0200 @@ -166,10 +166,12 @@ #define intoken(c) (_itk[CHAR(c)]) /* c can be in token */ #define endtoken(c) (_etk[CHAR(c)]) /* c ends tokens */ -#ifdef INFODOCK -#undef OO_BROWSER +/*#ifdef INFODOCK*/ +/*#undef OO_BROWSER*/ +/* Due to the way this file is constructed, this unfortunately doesn't */ +/* work except for documentation purposes. -slb */ #define OO_BROWSER 1 -#endif +/*#endif*/ #ifdef OO_BROWSER #define set_construct(construct) \ @@ -2879,23 +2881,26 @@ token_name.buffer[toklen] = '\0'; token_name.len = toklen; /* Name macros. */ -#ifdef OO_BROWSER - /* Also name #define constants, - enumerations and enum_labels. - -- Bob Weiner, Altrasoft */ tok.named = (structdef == stagseen || typdef == tend - || definedef == dignorerest +#ifdef OO_BROWSER + /* Also name #define constants, + enumerations and enum_labels. + Conditionalize `funorvar' reference + here or #defines will appear without + their #names. + -- Bob Weiner, Altrasoft, 4/25/1998 */ + || ((oo_browser_format || funorvar) + && definedef == dignorerest) || (oo_browser_format && (oo_browser_construct == C_ENUMERATION - || oo_browser_construct == C_ENUM_LABEL))); + || oo_browser_construct == C_ENUM_LABEL)) #else - tok.named = (structdef == stagseen - || typdef == tend - || (funorvar - && definedef == dignorerest)); + || (funorvar + && definedef == dignorerest) #endif + ); } tok.lineno = lineno; tok.linelen = tokoff + toklen + 1;
--- a/lib-src/gnuclient.c Mon Aug 13 10:30:38 2007 +0200 +++ b/lib-src/gnuclient.c Mon Aug 13 10:31:29 2007 +0200 @@ -475,9 +475,29 @@ } /* eval_function || eval_form || load_library */ else if (batch) { - fprintf (stderr, "%s: `-batch' requires an evaluation\n", - progname); - exit (1); + /* no sexp on the command line, so read it from stdin */ + int nb; + +#if defined(INTERNET_DOMAIN_SOCKETS) + connect_type = make_connection (hostarg, port, &s); +#else + connect_type = make_connection (NULL, (u_short) 0, &s); +#endif + sprintf (command, "(gnuserv-eval%s '(progn ", quick ? "-quickly" : ""); + send_string (s, command); + + while ((nb = read(fileno(stdin), buffer, GSERV_BUFSZ-1)) > 0) + { + buffer[nb] = '\0'; + send_string(s, buffer); + } + send_string(s,"))"); + send_string (s, EOT_STR); + if (read_line (s, result) == 0) + { + fprintf (stderr, "%s: Could not read\n", progname); + exit (1); + } } if (!batch)
--- a/lib-src/gnudoit Mon Aug 13 10:30:38 2007 +0200 +++ b/lib-src/gnudoit Mon Aug 13 10:31:29 2007 +0200 @@ -27,10 +27,10 @@ if [ $# -eq 0 ] then - echo "$0: arguments expected" >&2 - exit 1 + exec gnuclient $quick -batch +else +# I use "$*" instead of "$@" intentionally -- I don't want to have the +# arguments split. + exec gnuclient $quick -batch -eval "$*" fi -# I use "$*" instead of "$@" intentionally -- I don't want to have the -# arguments split. -exec gnuclient $quick -batch -eval "$*"
--- a/lib-src/installexe.sh Mon Aug 13 10:30:38 2007 +0200 +++ b/lib-src/installexe.sh Mon Aug 13 10:31:29 2007 +0200 @@ -6,10 +6,10 @@ tstr="" while [ $# -gt 0 ] do - if [ -e $1.exe ] + if [ -f $1.exe ] then tstr="$tstr$1.exe $2.exe" - shift + shift 2 else tstr="$tstr$1 " fi
--- a/lib-src/update-elc.sh Mon Aug 13 10:30:38 2007 +0200 +++ b/lib-src/update-elc.sh Mon Aug 13 10:31:29 2007 +0200 @@ -48,7 +48,7 @@ echo " (using $EMACS)" # fuckin' sysv, man... -if [ "`uname -r | sed 's/\(.\).*/\1/'`" -gt 4 ]; then +if [ "`uname -r | sed 's/[^0-9]*\([0-9]*\).*/\1/'`" -gt 4 ]; then echon() { /bin/echo $* '\c'
--- a/lisp/ChangeLog Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/ChangeLog Mon Aug 13 10:31:29 2007 +0200 @@ -1,3 +1,147 @@ +1998-04-25 Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> + + * info.el (Info-parse-dir-entries): Fixed regexp + (Info-build-dir-anew): Remove full suffix and capitalize info file + name for files with no @direntry + (Info-batch-rebuild-dir): New function + (Info-suffixed-file): Check for regular files instead of simple + file existence (could catch directories before) + +1998-04-25 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * setup-paths.el, find-paths.el: Removed uses of `not' which + temacs doesn't have. + + * find-paths.el (paths-find-emacs-roots): Included exec-prefix + into root searching. + +1998-04-24 Martin Buchholz <martin@xemacs.org> + + * subr.el: Remove definition of `not'. + +Sat Apr 24 1998 Andy Piper <andyp@parallax.co.uk> + + * msw-glyphs.el: enable graphics support. + +1998-04-23 Didier Verna <verna@inf.enst.fr> + + * x-menubar.el (default-menubar): restored the line-number-mode + option. + + * misc doc string updates related to the options menu. + +1998-04-24 SL Baur <steve@altair.xemacs.org> + + * setup-paths.el (paths-construct-load-path): Fix typo. + +1998-04-23 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * x-menubar.el (default-menubar): font-menu-this-frame-only-p and + font-menu-ignore-scaled-fonts don't have to be bound now; this + gets us one step further towards making --no-autoloads work. + + * startup.el (normal-top-level): Load auto-autoloads only if + lisp-directory is non-nil. + + * setup-paths.el (paths-construct-load-path): Made it robust + against nil lisp-directory. + + * startup.el (startup-setup-paths-warning): Added `lisp-directory' + to the list of variables that cause a warning when nil. + + * toolbar.el (init-toolbar-location): Now works even when there's + no toolbar icon directory. + +1998-04-23 Hrvoje Niksic <hniksic@srce.hr> + + * help.el (view-lossage): Recognize it. + + * simple.el (log-message): Mark multiline messages. + +1998-04-22 SL Baur <steve@altair.xemacs.org> + + * info.el (Info-exit): `toolbar-info-frame' doesn't necessarily exist. + +1998-4-20 Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp> + + * package-get.el (package-get-all): add `\n' separator to + interactive specification so that both variables are read + +1998-04-22 Didier Verna <verna@inf.enst.fr> + + * x-menubar.el: ported the options menu to Custom. + Moved the "read only" toggle button to the buffers menu. + Corrected some missing ;;;###autoload or defcustom. + + * scrollbar.el (scrollbars-visible-p): defcustom wrapper around + the scrollbar-visible specifier for options menu handling. + + * toolbar.el (toolbar-visible-p) + (toolbar-captioned-p) + (default-toolbar-position): defcustom wrappers around + the toolbar specifiers for options menu handling. + + * frame.el (get-frame-for-buffer-default-instance-limit): + defcustom it for options menu handling. + + * font-lock.el (font-lock-mode): defcustom and autolaod the variable + font-lock-mode for options menu handling. + + * cus-start.el: added Custom properties to overwrite-mode for + options menu handling. + +Wed Apr 22 12:59:35 1998 Andy Piper <andyp@parallax.co.uk> + + * about.el: shameless self-promotion. + +1998-04-21 Hrvoje Niksic <hniksic@srce.hr> + + * simple.el (raw-append-message): Slightly optimize. + (remove-message): Use `push' for clarity. + (append-message): Ditto. + (display-warning): Dito. + (raw-append-message): Send the message to the appropriate device. + +1998-04-22 SL Baur <steve@altair.xemacs.org> + + * auto-save.el (auto-save-cyclic-hash-14): De-ebolification. + From Sean MacLennan <Sean.MacLennan@pika.ca> + +1998-04-18 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * setup-paths.el: Changed `directory-sep-char' to + `path-separator', following a change in GNU Emacs. + +1998-04-19 Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> + + * info.el (Info-maybe-update-dir): Bug fix in `conservative' behaviour + (Info-build-dir-anew): Add a final newline. + (Info-build-dir-anew): Do not issue warning when rebuilding policy + is `always' + (Info-rebuild-dir): Ditto + + * dumped-lisp.el (preloaded-file-list): Added ldap.el + +1998-04-21 SL Baur <steve@altair.xemacs.org> + + * simple.el (count-words-buffer): Retain zmacs region. + (count-words-region): Ditto. + * simple.el: (what-line): Expanded line counts. + (count-lines): New parameter to conditionalize whether collapsed + lines get counted. + From Bob Weiner <weiner@altrasoft.com> + +1998-04-19 SL Baur <steve@altair.xemacs.org> + + * packages.el (package-locations): infodock-packages must override + mule-packages and packages. + +1998-04-19 Jonathan Harris <jhar@tardis.ed.a.uk> + + * wid-edit.el: + remove rude messages from widget-activation-widget-mapper + and widget-activation-glyph-mapper + 1998-04-17 Jonathan Harris <jhar@tardis.ed.ac.uk> * toolbar.el: Remove (featurep 'x) test from
--- a/lisp/about.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/about.el Mon Aug 13 10:31:29 2007 +0200 @@ -111,6 +111,7 @@ (marcpa . "http://www.positron911.com/products/power.htm") (ograf . "http://www.fga.de/~ograf/") (pez . "http://www.dwwc.com/") + (piper . "http://www.parallax.co.uk/~andyp") (vin . "http://www.upa.org/") (stigb . "http://www.tihlde.hist.no/~stigb/") (wget . "ftp://gnjilux.cc.fer.hr/pub/unix/util/wget/") @@ -720,9 +721,12 @@ Churn it up and make some butter\n")) (piper (widget-insert "\ -Author of the original \"fake\" XEmacs toolbar, and outl-mouse for -mouse gesture based outlining. Accomplished kludge contributor. - +Author of the original \"fake\" XEmacs toolbar, outl-mouse for mouse +gesture based outlining, the original CDE drag-n-drop support, the +cygwin port of XEmacs including unexec, glyphs under MS-Windows, +toolbars under MS-Windows. My home page is here:\n") + (about-url-link 'piper "Visit andy's home page") + (widget-insert "\n Andy has recently rejoined the XEmacs team to help port XEmacs to MS Windows operating systems.\n")) (bw @@ -1051,7 +1055,9 @@ and ToT dictate (but not necessarily in that order).\n") (about-show-linked-info 'piper "\ Created the prototype for the toolbars. Has been the first to make -use of many of the new XEmacs graphics features.\n") +use of many of the new XEmacs graphics features. Has implemented many +of XEmacs' graphics features under MS-Windows and has ported XEmacs +to cygwin under MS-Windows.\n") (about-show-linked-info 'bw "\ Author of the Hyperbole everyday information management hypertext system and the OO-Browser multi-language code browser. He also
--- a/lisp/auto-save.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/auto-save.el Mon Aug 13 10:31:29 2007 +0200 @@ -421,7 +421,7 @@ ;; byte-by-byte basis. The polynomial used is D^7 + D^6 + D^3 +1. ;; The resulting string consists of hexadecimal digits [0-9a-f]. ;; In particular, it contains no slash, so it can be used as autosave name." - (let ((crc (make-string 7 ?\0))) + (let ((crc (make-vector 7 ?\0))) (mapc (lambda (new) (setq new (+ new (aref crc 6))) @@ -434,13 +434,13 @@ (aset crc 0 new)) s) (format "%02x%02x%02x%02x%02x%02x%02x" - (aref crc 0) - (aref crc 1) - (aref crc 2) - (aref crc 3) - (aref crc 4) - (aref crc 5) - (aref crc 6)))) + (logand 255 (aref crc 0)) + (logand 255 (aref crc 1)) + (logand 255 (aref crc 2)) + (logand 255 (aref crc 3)) + (logand 255 (aref crc 4)) + (logand 255 (aref crc 5)) + (logand 255 (aref crc 6))))) ;; #### It is unclear to me how the following function is useful. It ;; should be used in `auto-save-name-in-same-directory', if anywhere.
--- a/lisp/cus-start.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/cus-start.el Mon Aug 13 10:31:29 2007 +0200 @@ -121,6 +121,12 @@ (left-margin fill integer) (tab-width editing-basics integer) (truncate-lines display boolean) + (overwrite-mode editing-basics ;; for the options menu - dverna + (choice (const :tag "disabled" nil) + (const :tag "textual" + 'overwrite-mode-textual) + (const :tag "binary" + 'overwrite-mode-binary))) ;; not documented as user-options, but should still be ;; customizable: (bar-cursor display (choice (const :tag "Block Cursor" nil)
--- a/lisp/dumped-lisp.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/dumped-lisp.el Mon Aug 13 10:31:29 2007 +0200 @@ -188,6 +188,8 @@ ;; "ediff-hook" ; Packaged. "fontl-hooks" "auto-show" + #+ldap "ldap" + ;; #+energize "energize/energize-load.el" ;;; formerly in sunpro/sunpro-load.el ;; #+(and mule sparcworks) "mime-setup"
--- a/lisp/find-paths.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/find-paths.el Mon Aug 13 10:31:29 2007 +0200 @@ -243,11 +243,11 @@ (append list-1 (reverse reverse-survivors)))) -(defun paths-delete (predicate list) +(defun paths-filter (predicate list) "Delete all matches of PREDICATE from LIST." (let ((reverse-result '())) (while list - (if (not (funcall predicate (car list))) + (if (funcall predicate (car list)) (setq reverse-result (cons (car list) reverse-result))) (setq list (cdr list))) (nreverse reverse-result))) @@ -265,24 +265,30 @@ (file-name-as-directory component))) components))) (if drop-empties - (paths-delete #'(lambda (component) - (string-equal "" component)) + (paths-filter #'(lambda (component) + (null (string-equal "" component))) directories) directories))) (defun paths-find-emacs-roots (invocation-directory invocation-name) "Find all plausible installation roots for XEmacs." - (let ((invocation-root - (paths-find-emacs-root invocation-directory invocation-name)) - (installation-root - (and configure-prefix-directory - (file-directory-p configure-prefix-directory) - (file-name-as-directory configure-prefix-directory)))) - (append (and invocation-root - (list invocation-root)) - (and installation-root - (paths-emacs-root-p installation-root) - (list installation-root))))) + (let* ((potential-invocation-root + (paths-find-emacs-root invocation-directory invocation-name)) + (invocation-roots + (and potential-invocation-root + (list potential-invocation-root))) + (potential-installation-roots + (paths-uniq-append + (and configure-exec-prefix-directory + (list (file-name-as-directory + configure-exec-prefix-directory))) + (and configure-prefix-directory + (list (file-name-as-directory + configure-prefix-directory))))) + (installation-roots + (paths-filter #'paths-emacs-root-p potential-installation-roots))) + (paths-uniq-append invocation-roots + installation-roots))) ;;; find-paths.el ends here
--- a/lisp/font-lock.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/font-lock.el Mon Aug 13 10:31:29 2007 +0200 @@ -527,7 +527,16 @@ This is normally set via `font-lock-defaults'.") ;;;###autoload -(defvar font-lock-mode nil) ; for modeline +(defcustom font-lock-mode nil ;; customized for the option menu. dverna + "Non nil means `font-lock-mode' is on" + :group 'font-lock + :type 'boolean + :initialize 'custom-initialize-default + :require 'font-lock + :set '(lambda (var val) + (font-lock-mode (or val 0))) + ) + (defvar font-lock-fontified nil) ; whether we have hacked this buffer (put 'font-lock-fontified 'permanent-local t)
--- a/lisp/frame.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/frame.el Mon Aug 13 10:31:29 2007 +0200 @@ -873,10 +873,16 @@ ;;; Application-specific frame-management -(defvar get-frame-for-buffer-default-frame-name nil - "The default frame to select; see doc of `get-frame-for-buffer'.") +(defcustom get-frame-for-buffer-default-frame-name nil + "*The default frame to select; see doc of `get-frame-for-buffer'." + :type 'string + :group 'frames) -(defvar get-frame-for-buffer-default-instance-limit nil) +(defcustom get-frame-for-buffer-default-instance-limit nil + "*The default instance limit for creating new frames; +see doc of `get-frame-for-buffer'." + :type 'integer + :group 'frames) (defun get-frame-name-for-buffer (buffer) (let ((mode (and (get-buffer buffer)
--- a/lisp/help.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/help.el Mon Aug 13 10:31:29 2007 +0200 @@ -762,21 +762,28 @@ (while (progn (move-to-column 50) (not (eobp))) (search-forward " " nil t) (insert "\n"))) - ;; XEmacs addition + ;; XEmacs addition: copy the messages from " *Message-Log*", + ;; reversing their order and handling multiline messages + ;; correctly. (princ "\n\n\nRecent minibuffer messages (most recent first):\n\n") (save-excursion (let ((buffer (get-buffer-create " *Message-Log*")) (count 0) - oldpoint) - (set-buffer buffer) - (goto-char (point-max)) + oldpoint extent) + (goto-char (point-max buffer) buffer) (set-buffer standard-output) - (while (and (> (point buffer) (point-min buffer)) + (while (and (not (bobp buffer)) (< count view-lossage-message-count)) (setq oldpoint (point buffer)) - (forward-line -1 buffer) + (setq extent (extent-at oldpoint buffer + 'message-multiline nil 'before)) + ;; If the message was multiline, move all the way to the + ;; beginning. + (if extent + (goto-char (extent-start-position extent) buffer) + (forward-line -1 buffer)) (insert-buffer-substring buffer (point buffer) oldpoint) - (setq count (1+ count))))))) + (incf count)))))) (define-function 'help 'help-for-help)
--- a/lisp/info.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/info.el Mon Aug 13 10:31:29 2007 +0200 @@ -978,17 +978,19 @@ (if (not (find-buffer-visiting file)) (if (not (file-exists-p file)) (if (or (eq Info-rebuild-outdated-dir 'always) - (and (eq Info-rebuild-outdated-dir 'conservative) - (not (file-writable-p file))) + (eq Info-rebuild-outdated-dir 'conservative) (and (eq Info-rebuild-outdated-dir 'ask) - (y-or-n-p (format "No dir file in %s. Rebuild now ? " (file-name-directory file))))) + (y-or-n-p (format "No dir file in %s. Rebuild now ? " + (file-name-directory file))))) (Info-build-dir-anew (file-name-directory file) (not (file-writable-p file)))) (if (Info-dir-outdated-p file) (if (or (eq Info-rebuild-outdated-dir 'always) (and (eq Info-rebuild-outdated-dir 'conservative) - (not (file-writable-p file))) + (or (not (file-writable-p file)) + (y-or-n-p (format "%s is outdated. Rebuild it now ? " + (file-name-directory file))))) (and (eq Info-rebuild-outdated-dir 'ask) - (y-or-n-p (format "%s is outdated. Rebuild now ? " file)))) + (y-or-n-p (format "%s is outdated. Rebuild it now ? " file)))) (Info-rebuild-dir file (not (file-writable-p file))))))))) ;; Record which *.info files are newer than the dir file @@ -996,7 +998,7 @@ (defun Info-dir-outdated-p (file) "Return non-nil if dir or localdir is outdated. -dir or localdir are outdated when a *.info file in the same +dir or localdir are outdated when an info file in the same directory has been modified more recently." (let ((dir-mod-time (nth 5 (file-attributes file))) f-mod-time @@ -1045,20 +1047,23 @@ (save-restriction (narrow-to-region beg end) (goto-char beg) - (while (re-search-forward "^\\* \\([^:]+\\):\\([ \t]*(\\(.*\\))\\w*\\.\\|:\\)" nil t) + (while (re-search-forward "^\\* \\([^:]+\\):\\([ \t]*(\\([^)]*\\))\\w*\\.\\|:\\)" nil t) (setq entry (list (match-string 2) (match-string 1) (downcase (or (match-string 3) (match-string 1))))) - (setq entry (cons (nreverse - (cdr - (nreverse - (split-string (buffer-substring (re-search-forward "[ \t]*" nil t) - (or (and (re-search-forward "^[^ \t]" nil t) - (goto-char (match-beginning 0))) - (point-max))) - "[ \t]*\n[ \t]*")))) - entry)) + (setq entry + (cons (nreverse + (cdr + (nreverse + (split-string + (buffer-substring + (re-search-forward "[ \t]*" nil t) + (or (and (re-search-forward "^[^ \t]" nil t) + (goto-char (match-beginning 0))) + (point-max))) + "[ \t]*\n[ \t]*")))) + entry)) (setq entries (cons (nreverse entry) entries))))) (nreverse entries))) @@ -1082,7 +1087,8 @@ (indent-to-column description-col) (insert (car e) "\n") (setq e (cdr e)))) - entries))) + entries) + (insert "\n"))) (defun Info-build-dir-anew (directory to-temp) @@ -1096,7 +1102,10 @@ nil t))) (if to-temp - (display-warning 'info (format "Missing info dir file in %s" directory) 'notice) + (if (not (eq Info-rebuild-outdated-dir 'always)) + (display-warning 'info + (format "Missing info dir file in %s" directory) + 'notice)) (message "Creating %s..." dirfile)) (set-buffer (find-file-noselect dirfile t)) (setq buffer-read-only nil) @@ -1108,7 +1117,10 @@ '(lambda (f) (or (Info-extract-dir-entry-from f) (list 'dummy - (file-name-sans-extension (file-name-nondirectory f)) + (progn + (string-match "\\(.*\\)\\.info\\(.gz\\|.Z\\|-z\\|.zip\\)?$" + (file-name-nondirectory f)) + (capitalize (match-string 1 (file-name-nondirectory f)))) ":" (list Info-no-description-string)))) info-files)) @@ -1132,7 +1144,10 @@ (set-buffer (find-file-noselect file t)) (setq buffer-read-only nil) (if to-temp - (display-warning 'info (format "Outdated info dir file: %s" file) 'notice) + (if (not (eq Info-rebuild-outdated-dir 'always)) + (display-warning 'info + (format "Outdated info dir file: %s" file) + 'notice)) (message "Rebuilding %s..." file)) (catch 'done (setq buffer-read-only nil) @@ -1195,7 +1210,35 @@ (if to-temp (message "Rebuilding temporary dir...done") (message "Rebuilding %s...done" file)))))) - + +;;;###autoload +(defun Info-batch-rebuild-dir () + "(Re)build info `dir' files in the directories remaining on the command line. +Use this from the command line, with `-batch'; +it won't work in an interactive Emacs. +Each file is processed even if an error occurred previously. +For example, invoke \"xemacs -batch -f Info-batch-rebuild-dir /usr/local/info\"" + ;; command-line-args-left is what is left of the command line (from + ;; startup.el) + (defvar command-line-args-left) ; Avoid 'free variable' warning + (if (not noninteractive) + (error "`Info-batch-rebuild-dir' is to be used only with -batch")) + (while command-line-args-left + (if (not (file-directory-p (car command-line-args-left))) + (message "Warning: Skipped %s. Not a directory." + (car command-line-args-left)) + (setq dir (expand-file-name "dir" (car command-line-args-left))) + (setq localdir (expand-file-name "localdir" (car command-line-args-left))) + (cond + ((file-exists-p dir) + (Info-rebuild-dir dir nil)) + ((file-exists-p localdir) + (Info-rebuild-dir localdir nil)) + (t + (Info-build-dir-anew (car command-line-args-left) nil)))) + (setq command-line-args-left (cdr command-line-args-left))) + (message "Done") + (kill-emacs 0)) (defun Info-history-add (file node point) (if Info-keeping-history @@ -1268,16 +1311,16 @@ (setq file (concat name (caar suff)) file2 (and name2 (concat name2 (caar suff)))) (cond - ((file-exists-p file) + ((file-regular-p file) (setq found file)) - ((and file2 (file-exists-p file2)) + ((and file2 (file-regular-p file2)) (setq found file2)) (t (setq suff (cdr suff))))) (or found - (and name (when (file-exists-p name) + (and name (when (file-regular-p name) name)) - (and name2 (when (file-exists-p name2) + (and name2 (when (file-regular-p name2) name2))))) (defun Info-insert-file-contents (file &optional visit) @@ -2371,6 +2414,7 @@ (save-buffers-kill-emacs) (bury-buffer (current-buffer)) (if (and (featurep 'toolbar) + (boundp 'toolbar-info-frame) (eq toolbar-info-frame (selected-frame))) (condition-case () (delete-frame toolbar-info-frame)
--- a/lisp/msw-glyphs.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/msw-glyphs.el Mon Aug 13 10:31:29 2007 +0200 @@ -43,20 +43,18 @@ ("\\`BM" [bmp :data nil] 2) ,@(if (featurep 'xpm) '(("\\.xpm\\'" [xpm :file nil] 2))) ,@(if (featurep 'xpm) '(("\\`/\\* XPM \\*/" [xpm :data nil] 2))) -; ,@(if (featurep 'xface) '(("\\`X-Face:" [xface :data nil] 2))) -; ,@(if (featurep 'gif) '(("\\.gif\\'" [gif :file nil] 2) -; ("\\`GIF8[79]" [gif :data nil] 2))) -; ,@(if (featurep 'jpeg) '(("\\.jpe?g\\'" [jpeg :file nil] 2))) -; ;; all of the JFIF-format JPEG's that I've seen begin with -; ;; the following. I have no idea if this is standard. -; ,@(if (featurep 'jpeg) '(("\\`\377\330\377\340\000\020JFIF" -; [jpeg :data nil] 2))) -; ,@(if (featurep 'png) '(("\\.png\\'" [png :file nil] 2))) -; ,@(if (featurep 'png) '(("\\`\211PNG" [png :data nil] 2))) + ,@(if (featurep 'gif) '(("\\.gif\\'" [gif :file nil] 2) + ("\\`GIF8[79]" [gif :data nil] 2))) + ,@(if (featurep 'jpeg) '(("\\.jpe?g\\'" [jpeg :file nil] 2))) + ;; all of the JFIF-format JPEG's that I've seen begin with + ;; the following. I have no idea if this is standard. + ,@(if (featurep 'jpeg) '(("\\`\377\330\377\340\000\020JFIF" + [jpeg :data nil] 2))) + ,@(if (featurep 'png) '(("\\.png\\'" [png :file nil] 2))) + ,@(if (featurep 'png) '(("\\`\211PNG" [png :data nil] 2))) + ,@(if (featurep 'tiff) '(("\\.tif?f\\'" [tiff :file nil] 2))) ("\\`X-Face:" [string :data "[xface]"]) ("\\`/\\* XPM \\*/" [string :data "[xpm]"]) - ("\\`GIF87" [string :data "[gif]"]) - ("\\`\377\330\340\000\020JFIF" [string :data "[jpeg]"]) ("" [string :data nil] 2) ;; this last one is here for pointers and icons and such -- ;; strings are not allowed so they will be ignored.
--- a/lisp/package-get-base.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/package-get-base.el Mon Aug 13 10:31:29 2007 +0200 @@ -1,19 +1,19 @@ (setq package-get-base '((eudc (standards-version 1.0 - version "1.02" - author-version "1.02" - date "1998-03-24" - build-date "1998-04-04" + version "1.04" + author-version "1.04" + date "1998-04-21" + build-date "1998-04-22" maintainer "Oscar Figueiredo <Oscar.Figueiredo@epfl.ch>" distribution stable priority low category "comm" dump nil description "Emacs Unified Directory Client." - filename "eudc-1.02-pkg.tar.gz" - md5sum "d2bf22f6d9587303b62736e31af23faf" - size 36621 + filename "eudc-1.04-pkg.tar.gz" + md5sum "f1eea3313ad2b7a78c3165042ec9a285" + size 39938 provides (eudc eudc-ldap eudc-ph) requires (fsf-compat xemacs-base) type regular @@ -39,38 +39,38 @@ )) (gnats (standards-version 1.0 - version "1.02" + version "1.03" author-version "3.101" - date "1998-01-24" - build-date "1998-04-04" + date "1998-04-06" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority high category "comm" dump nil description "XEmacs bug reports." - filename "gnats-1.02-pkg.tar.gz" - md5sum "67b301b42b9edad9fe22dce5b5dd29ac" - size 126358 + filename "gnats-1.03-pkg.tar.gz" + md5sum "2b8f3a25baa78ffd23927ac5bb5777b5" + size 126412 provides (gnats gnats-admin send-pr) requires (mail-lib xemacs-base) type regular )) (gnus (standards-version 1.0 - version "1.12" + version "1.13" author-version "5.6.4" - date "1998-03-31" - build-date "1998-04-04" + date "1998-04-06" + build-date "1998-04-17" 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.12-pkg.tar.gz" - md5sum "3dba6b7965a8b7e3db944c8b0d09b484" - size 1650833 + filename "gnus-1.13-pkg.tar.gz" + md5sum "648162290d6117033466df446e90bc2e" + size 1650837 provides (gnus message) requires (gnus w3 mh-e mailcrypt rmail mail-lib xemacs-base) type regular @@ -115,19 +115,19 @@ )) (net-utils (standards-version 1.0 - version "1.04" - author-version "21.0b35" - date "1998-03-30" - build-date "1998-04-04" + version "1.05" + author-version "21.0b36" + date "1998-04-05" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "comm" dump nil description "Miscellaneous Networking Utilities." - filename "net-utils-1.04-pkg.tar.gz" - md5sum "9aea3b824c54ebe69bbf3f7f83c0f4f4" - size 81591 + filename "net-utils-1.05-pkg.tar.gz" + md5sum "8a4368d99ccdc3ccc468dcd557cf8f54" + size 82006 provides (ilisp-browse-cltl2 emacsbug feedmail metamail net-utils rcompile shadowfile webjump webster-www) requires (w3 efs mail-lib xemacs-base) type single @@ -191,19 +191,19 @@ )) (tm (standards-version 1.0 - version "1.04" - author-version "21.0b35" - date "1998-01-25" - build-date "1998-04-04" + version "1.05" + author-version "21.0b36" + date "1998-04-07" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "comm" dump nil description "Emacs MIME support." - filename "tm-1.04-pkg.tar.gz" - md5sum "35fb54b645164dc27fc33f9bb2f9718f" - size 252091 + filename "tm-1.05-pkg.tar.gz" + md5sum "8d8f186356ebd4258a7090603c2772b6" + size 252141 provides (tm tm-edit tm-view mime-setup) requires (gnus mh-e rmail vm mailcrypt mail-lib apel xemacs-base) type regular @@ -248,38 +248,38 @@ )) (cookie (standards-version 1.0 - version "1.06" - author-version "21.0b35" - date "1998-02-01" - build-date "1998-04-04" + version "1.07" + author-version "21.0b36" + date "1998-04-07" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "games" dump nil description "Spook and Yow (Zippy quotes)." - filename "cookie-1.06-pkg.tar.gz" - md5sum "317920a2e78fb5bc49f6647dca605cb6" - size 34122 + filename "cookie-1.07-pkg.tar.gz" + md5sum "df97f80082395667a0e23eda8f68b8dd" + size 34184 provides (cookie1 yow) requires (xemacs-base) type regular )) (games (standards-version 1.0 - version "1.02" + version "1.03" author-version "1.0" - date "1998-01-24" - build-date "1998-04-04" + date "1998-04-07" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "games" dump nil description "Tetris, Sokoban, and Snake." - filename "games-1.02-pkg.tar.gz" - md5sum "2d14ef7a300f8d49343cccaa89b1f463" - size 29281 + filename "games-1.03-pkg.tar.gz" + md5sum "5fe869c517652083641cbdcae80defa2" + size 29340 provides (gamegrid snake tetris sokoban) requires (xemacs-base) type regular @@ -438,19 +438,19 @@ )) (mail-lib (standards-version 1.0 - version "1.09" - author-version "21.0b35" - date "1998-03-22" - build-date "1998-04-04" + version "1.10" + author-version "21.0b37" + date "1998-04-22" + build-date "1998-04-22" 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.09-pkg.tar.gz" - md5sum "17c0038a1e441add44faaeb0e8dd7941" - size 119331 + filename "mail-lib-1.10-pkg.tar.gz" + md5sum "c13e2168624d382573e6b2470f0a4363" + size 119600 provides (browse-url highlight-headers mail-abbrevs mail-extr mail-utils reporter rfc822 rmail-mini rmailout sendmail smtpmail) requires (xemacs-base) type single @@ -476,38 +476,38 @@ )) (xemacs-base (standards-version 1.0 - version "1.17" - author-version "21.0b35" - date "1998-04-04" - build-date "1998-04-04" + version "1.18" + author-version "21.0b36" + date "1998-04-06" + build-date "1998-04-17" 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.17-pkg.tar.gz" - md5sum "e610fb980cae1ef459df0e9611ad92e8" - size 417610 + filename "xemacs-base-1.18-pkg.tar.gz" + md5sum "2c327a8caee676f5bb28e7c42db37f41" + size 453497 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 )) (xemacs-devel (standards-version 1.0 - version "1.10" - author-version "21.0b35" - date "1998-03-09" - build-date "1998-04-04" + version "1.12" + author-version "21.0b37" + date "1998-04-20" + build-date "1998-04-22" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "libs" dump nil description "Emacs Lisp developer support." - filename "xemacs-devel-1.10-pkg.tar.gz" - md5sum "3dab1194f0ba1807ac06f710b057d86c" - size 76359 + filename "xemacs-devel-1.12-pkg.tar.gz" + md5sum "7661b0a0e77c30f4147d943b382c0d9c" + size 77623 provides (docref eldoc elp find-func hide-copyleft ielm regexp-opt trace) requires (xemacs-base) type single @@ -552,19 +552,19 @@ )) (leim (standards-version 1.0 - version "1.06" - author-version "21.0b35" - date "1998-02-06" - build-date "1998-04-04" + version "1.07" + author-version "21.0b36" + date "1998-04-09" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution mule priority medium category "mule" dump nil description "Quail. All non-English and non-Japanese language support." - filename "leim-1.06-pkg.tar.gz" - md5sum "fe4649250d6882b828a0e408e9c4d010" - size 1743964 + filename "leim-1.07-pkg.tar.gz" + md5sum "91ef40389a36d7236ce3e9536c5097e1" + size 1744016 provides () requires (mule-base fsf-compat xemacs-base) type regular @@ -590,57 +590,57 @@ )) (mule-base (standards-version 1.0 - version "1.12" - author-version "21.0b35" - date "1998-03-13" - build-date "1998-04-04" + version "1.14" + author-version "21.0b36" + date "1998-04-07" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution mule priority high category "mule" dump t description "Basic Mule support, required for building with Mule." - filename "mule-base-1.12-pkg.tar.gz" - md5sum "336cc78d33b94190b3ae2ed1dc44b9f4" - size 487519 + filename "mule-base-1.14-pkg.tar.gz" + md5sum "6f5cd80e31ff852636c19df9ad7d3e95" + size 487974 provides (canna-leim canna char-table china-util cyril-util isearch-ext japan-util ccl can-n-egg mule-help) requires (fsf-compat xemacs-base) type regular )) (skk (standards-version 1.0 - version "1.03" + version "1.05" author-version "10.38" - date "1998-01-24" - build-date "1998-04-04" + date "1998-04-14" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution mule priority medium category "mule" dump t description "Japanese Language Input Method." - filename "skk-1.03-pkg.tar.gz" - md5sum "84341a8fd04ff28542c428b7413d0996" - size 1466996 + filename "skk-1.05-pkg.tar.gz" + md5sum "9582d421dd26c2c888764c0c3aface60" + size 1466874 provides (skk skk-tut) requires (viper mule-base xemacs-base) type regular )) (calc (standards-version 1.0 - version "1.03" + version "1.04" author-version "2.02fX1" - date "1998-03-03" - build-date "1998-04-04" + date "1998-02-27" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "oa" dump nil description "Emacs calculator" - filename "calc-1.03-pkg.tar.gz" - md5sum "ea536d7e82fb24812614d4984be9e0fe" - size 1158896 + filename "calc-1.04-pkg.tar.gz" + md5sum "7e4a7609c30b51de49854a568d10b1a8" + size 1159127 provides (calc) requires () type regular @@ -666,19 +666,19 @@ )) (edit-utils (standards-version 1.0 - version "1.16" - author-version "21.0b35" - date "1998-03-23" - build-date "1998-04-04" + version "1.18" + author-version "21.0b37" + date "1998-04-22" + build-date "1998-04-22" 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.16-pkg.tar.gz" - md5sum "795df69759eda984202e932a11afa340" - size 552434 + filename "edit-utils-1.18-pkg.tar.gz" + md5sum "0273e49738108d16f69f6dcff734d666" + size 570191 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,19 +761,19 @@ )) (pc (standards-version 1.0 - version "1.08" - author-version "21.0b35" - date "1998-03-22" - build-date "1998-04-04" + version "1.09" + author-version "21.0b37" + date "1998-04-22" + build-date "1998-04-22" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "oa" dump nil description "PC style interface emulation." - filename "pc-1.08-pkg.tar.gz" - md5sum "1d170e2a7cc2483e4f002afa99482d15" - size 15535 + filename "pc-1.09-pkg.tar.gz" + md5sum "04ddfb122b0dca50ef9f29ee05e24c75" + size 15761 provides (delbs fusion pc-select pending-del s-region) requires (xemacs-base) type regular @@ -913,19 +913,19 @@ )) (eterm (standards-version 1.0 - version "1.03" - author-version "21.0b35" - date "1998-01-24" - build-date "1998-04-04" + version "1.04" + author-version "21.0b37" + date "1998-04-19" + build-date "1998-04-22" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "os" dump nil description "Terminal emulation." - filename "eterm-1.03-pkg.tar.gz" - md5sum "2aa35f7f492facc7bccea1053cb2975c" - size 102144 + filename "eterm-1.04-pkg.tar.gz" + md5sum "e8a818c8596b4965899f12db0d305b8d" + size 105512 provides (eterm) requires (xemacs-base) type regular @@ -970,19 +970,19 @@ )) (os-utils (standards-version 1.0 - version "1.06" - author-version "21.0b35" - date "1998-02-21" - build-date "1998-04-04" + version "1.07" + author-version "21.0b36" + date "1998-04-17" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "os" dump nil description "Miscellaneous O/S utilities." - filename "os-utils-1.06-pkg.tar.gz" - md5sum "43db6a9e28ac5626850a2aabb2511ab3" - size 228053 + filename "os-utils-1.07-pkg.tar.gz" + md5sum "562d30b4186938bfbaef3a20eb968f15" + size 229683 provides (archive-mode background crypt crypt++ inf-lisp jka-compr lpr mchat ps-print tar-mode telnet terminal uncompress) requires (xemacs-base) type single @@ -1103,38 +1103,38 @@ )) (emerge (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.0b36" + date "1998-04-07" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "prog" dump nil description "Another interface over GNU patch." - filename "emerge-1.01-pkg.tar.gz" - md5sum "8c112dda38c9274792d72f0583c9415b" - size 60905 + filename "emerge-1.02-pkg.tar.gz" + md5sum "6f7687196172109d6014346d5ead6d3a" + size 60940 provides (emerge) requires () type regular )) (pcl-cvs (standards-version 1.0 - version "1.03" - author-version "21.0b35" - date "1998-01-24" - build-date "1998-04-04" + version "1.05" + author-version "21.0b37" + date "1998-04-19" + build-date "1998-04-22" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "prog" dump nil description "CVS frontend." - filename "pcl-cvs-1.03-pkg.tar.gz" - md5sum "5d538ca24b26958463898ec80e0bac4b" - size 134577 + filename "pcl-cvs-1.05-pkg.tar.gz" + md5sum "c11ede6b5e9748b928ffa7f709da9252" + size 135472 provides (pcl-cvs dll elib-node generic-sc) requires (xemacs-base) type regular @@ -1160,20 +1160,20 @@ )) (scheme (standards-version 1.0 - version "1.02" - author-version "21.0b35" - date "1998-01-24" - build-date "1998-04-04" - maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" + version "1.03" + author-version "21.0b36" + date "1998-04-11" + build-date "1998-04-17" + maintainer "Karl M. Hegbloom <karlheg@bittersweet.inetarena.com>" distribution contrib priority low category "prog" dump nil description "Front-end support for Inferior Scheme." - filename "scheme-1.02-pkg.tar.gz" - md5sum "f79ca713130470b1040b19b94e2d8087" - size 34812 - provides (scheme xscheme cmuscheme) + filename "scheme-1.03-pkg.tar.gz" + md5sum "f22026713da1be70eba93f8d59700499" + size 36833 + provides (scheme xscheme cmuscheme cmuscheme48) requires (xemacs-base) type regular )) @@ -1255,19 +1255,19 @@ )) (auctex (standards-version 1.0 - version "1.06" + version "1.08" author-version "9.7p" - date "1998-02-25" - build-date "1998-04-04" + date "1998-04-10" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "wp" dump nil description "Basic TeX/LaTeX support." - filename "auctex-1.06-pkg.tar.gz" - md5sum "bdd76782a4b9e02b0cecc51ebace3ed8" - size 304787 + filename "auctex-1.08-pkg.tar.gz" + md5sum "e79c956bd2a7cfc086d91c399667c2ef" + size 305607 provides (auc-old bib-cite font-latex latex multi-prompt tex-buf tex-info tex-jp tex-site tex) requires (xemacs-base) type regular @@ -1293,19 +1293,19 @@ )) (edt (standards-version 1.0 - version "1.03" - author-version "21.0b35" - date "1998-01-24" - build-date "1998-04-04" + version "1.04" + author-version "21.0b36" + date "1998-04-07" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution contrib priority low category "wp" dump nil description "DEC EDIT/EDT emulation." - filename "edt-1.03-pkg.tar.gz" - md5sum "30c7aa5a4b6a5822f30976a947d422a4" - size 46031 + filename "edt-1.04-pkg.tar.gz" + md5sum "fabfedc63988de7296eae068d8b78ae0" + size 46095 provides (edt) requires (xemacs-base) type regular @@ -1331,19 +1331,19 @@ )) (texinfo (standards-version 1.0 - version "1.06" - author-version "21.0b35" - date "1998-03-03" - build-date "1998-04-04" + version "1.07" + author-version "21.0b36" + date "1998-04-07" + build-date "1998-04-17" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority high category "wp" dump nil description "XEmacs TeXinfo support." - filename "texinfo-1.06-pkg.tar.gz" - md5sum "4fa94b9ade9864cc915032157a921a4c" - size 125853 + filename "texinfo-1.07-pkg.tar.gz" + md5sum "d9f2b99ad7249c1cca9e1eea91130c6d" + size 125908 provides (makeinfo tex-mode texinfmt texinfo texnfo-tex texnfo-upd) requires (xemacs-base) type regular
--- a/lisp/package-get.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/package-get.el Mon Aug 13 10:31:29 2007 +0200 @@ -177,7 +177,7 @@ package provides that functionality. If VERSION is nil, retrieves latest version. Optional argument FETCHED-PACKAGES is used to keep track of packages already fetched." - (interactive "sPackage: sVersion: ") + (interactive "sPackage: \nsVersion: ") (let* ((the-package (package-get-info-find-package package-get-base package)) (this-package (package-get-info-version
--- a/lisp/packages.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/packages.el Mon Aug 13 10:31:29 2007 +0200 @@ -86,9 +86,9 @@ (list (paths-construct-path '("~" ".xemacs")) 'early #'(lambda () t)) (list "site-packages" 'late #'(lambda () t)) + (list "infodock-packages" 'late #'(lambda () (featurep 'infodock))) (list "mule-packages" 'late #'(lambda () (featurep 'mule))) - (list "packages" 'late #'(lambda () t)) - (list "infodock-packages" 'late #'(lambda () (featurep 'infodock)))) + (list "packages" 'late #'(lambda () t))) "Locations of the various package directories. This is a list each of whose elements describes one directory. A directory description is a three-element list.
--- a/lisp/scrollbar.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/scrollbar.el Mon Aug 13 10:31:29 2007 +0200 @@ -30,6 +30,24 @@ ;;; Code: +(defcustom scrollbars-visible-p ;; added for the options menu - dverna + (> (specifier-instance scrollbar-width) 0) + "Whether the scrollbars are globally visible. This variable can be +customized through the options menu." + :group 'display + :type 'boolean + ;; This is really a hack: there should be a real specifier for this, in + ;; order to turn on/off the scrollbars without altering their size. + :set '(lambda (var val) + (if val + (progn + (set-specifier scrollbar-width 15) + (set-specifier scrollbar-height 15)) + (set-specifier scrollbar-width 0) + (set-specifier scrollbar-height 0)) + (setq scrollbars-visible-p val)) + ) + (defun init-scrollbar-from-resources (locale) (when (and (featurep 'x) (or (eq locale 'global)
--- a/lisp/setup-paths.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/setup-paths.el Mon Aug 13 10:31:29 2007 +0200 @@ -42,10 +42,8 @@ "Depth of load-path searches in core Lisp paths.") (defvar paths-default-info-directories - (list (paths-construct-path '("usr" "local" "info") - (char-to-string directory-sep-char)) - (paths-construct-path '("usr" "info") - (char-to-string directory-sep-char))) + (list (paths-construct-path '("usr" "local" "info") path-separator) + (paths-construct-path '("usr" "info") path-separator)) "Directories appended to the end of the info path by default.") (defun paths-find-site-lisp-directory (roots) @@ -74,8 +72,9 @@ (paths-find-recursive-load-path (list site-lisp-directory) paths-load-path-depth))) (lisp-load-path - (paths-find-recursive-load-path (list lisp-directory) - paths-load-path-depth))) + (and lisp-directory + (paths-find-recursive-load-path (list lisp-directory) + paths-load-path-depth)))) (append env-load-path early-package-load-path site-lisp-load-path @@ -99,7 +98,7 @@ (packages-find-package-info-path last-packages) (and info-path-envval (paths-decode-directory-path info-path-envval 'drop-empties))) - (and (not info-path-envval) + (and (null info-path-envval) (paths-uniq-append (paths-directories-which-exist configure-info-path) (paths-directories-which-exist paths-default-info-directories))))))
--- a/lisp/simple.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/simple.el Mon Aug 13 10:31:29 2007 +0200 @@ -569,7 +569,7 @@ "Print the number of words in BUFFER. If called noninteractively, the value is returned rather than printed. BUFFER defaults to the current buffer." - (interactive "bBuffer: ") + (interactive "_bBuffer: ") (let ((words (count-words-region (point-min) (point-max) buffer))) (when (interactive-p) (message "Buffer has %d words" words)) @@ -580,7 +580,7 @@ "Print the number of words in region between START and END in BUFFER. If called noninteractively, the value is returned rather than printed. BUFFER defaults to the current buffer." - (interactive "r") + (interactive "_r") (save-excursion (set-buffer (or buffer (current-buffer))) (let ((words 0)) @@ -610,36 +610,71 @@ cnt (- (point-max) (point-min))) cnt))) +;;; Modified by Bob Weiner, 8/24/95, to print narrowed line number also. +;;; Expanded by Bob Weiner, Altrasoft, on 02/12/1997 (defun what-line () - "Print the current buffer line number and narrowed line number of point." + "Print the following variants of the line number of point: + Region line - displayed line within the active region + Collapsed line - includes only selectively displayed lines; + Buffer line - physical line in the buffer; + Narrowed line - line number from the start of the buffer narrowing." ;; XEmacs change (interactive "_") (let ((opoint (point)) start) (save-excursion (save-restriction - (goto-char (point-min)) + (if (region-active-p) + (goto-char (region-beginning)) + (goto-char (point-min))) (widen) (beginning-of-line) (setq start (point)) (goto-char opoint) (beginning-of-line) - (if (/= start 1) - (message "Line %d (narrowed line %d)" - (1+ (count-lines 1 (point))) - (1+ (count-lines start (point)))) - (message "Line %d" (1+ (count-lines 1 (point))))))))) - - -(defun count-lines (start end) + (let* ((buffer-line (1+ (count-lines 1 (point)))) + (narrowed-p (or (/= start 1) + (/= (point-max) (1+ (buffer-size))))) + (narrowed-line (if narrowed-p (1+ (count-lines start (point))))) + (selective-line (if selective-display + (1+ (count-lines start (point) t)))) + (region-line (if (region-active-p) + (1+ (count-lines start (point) selective-display))))) + (cond (region-line + (message "Region line %d; Buffer line %d" + region-line buffer-line)) + ((and narrowed-p selective-line (/= selective-line narrowed-line)) + ;; buffer narrowed and some lines selectively displayed + (message "Collapsed line %d; Buffer line %d; Narrowed line %d" + selective-line buffer-line narrowed-line)) + (narrowed-p + ;; buffer narrowed + (message "Buffer line %d; Narrowed line %d" + buffer-line narrowed-line)) + ((and selective-line (/= selective-line buffer-line)) + ;; some lines selectively displayed + (message "Collapsed line %d; Buffer line %d" + selective-line buffer-line)) + (t + ;; give a basic line count + (message "Line %d" buffer-line))))))) + (setq zmacs-region-stays t)) + +;;; Bob Weiner, Altrasoft, 02/12/1998 +;;; Added the 3rd arg in `count-lines' to conditionalize the counting of +;;; collapsed lines. +(defun count-lines (start end &optional ignore-invisible-lines-flag) "Return number of lines between START and END. This is usually the number of newlines between them, but can be one more if START is not equal to END -and the greater of them is not at the start of a line." +and the greater of them is not at the start of a line. + +With optional IGNORE-INVISIBLE-LINES-FLAG non-nil, lines collapsed with +selective-display are excluded from the line count." (save-excursion (save-restriction (narrow-to-region start end) (goto-char (point-min)) - (if (eq selective-display t) + (if (and (not ignore-invisible-lines-flag) (eq selective-display t)) (save-match-data (let ((done 0)) (while (re-search-forward "[\n\C-m]" nil t 40) @@ -2762,7 +2797,7 @@ ;; fa-extras, which I'm not gonna do. His changes are to (1) execute ;; the save-excursion below unconditionally, and (2) uncomment the check ;; for (not comment-multi-line) further below. --Stig - ;;### jhod: probably need to fix this for kinsoku processing + ;;#### jhod: probably need to fix this for kinsoku processing (if (not comment-multi-line) (save-excursion (if (and comment-start-skip @@ -3603,12 +3638,23 @@ For use on `remove-message-hook'." (when (and (not noninteractive) (funcall log-message-filter-function label message)) - (with-current-buffer (get-buffer-create " *Message-Log*") + ;; Use save-excursion rather than save-current-buffer because we + ;; change the value of point. + (save-excursion + (set-buffer (get-buffer-create " *Message-Log*")) (goto-char (point-max)) - ;; (insert (concat (upcase (symbol-name label)) ": " message "\n")) - (insert message "\n") + ;(insert (concat (upcase (symbol-name label)) ": " message "\n")) + (let (extent) + ;; Mark multiline message with an extent, which `view-lossage' + ;; will recognize. + (when (string-match "\n" message) + (setq extent (make-extent (point) (point))) + (set-extent-properties extent '(end-open nil message-multiline t))) + (insert message "\n") + (when extent + (set-extent-property extent 'end-open t))) (when (> (point-max) (max log-message-max-size (point-min))) - ;; trim log to ~90% of max size + ;; Trim log to ~90% of max size. (goto-char (max (- (point-max) (truncate (* 0.9 log-message-max-size))) (point-min))) @@ -3644,10 +3690,9 @@ (or frame (setq frame (selected-frame))) (let ((clear-stream (and message-stack (eq 'stream (frame-type frame))))) (remove-message label frame) - (let ((buffer (get-buffer " *Echo Area*")) - (inhibit-read-only t) + (let ((inhibit-read-only t) (zmacs-region-stays zmacs-region-stays)) ; preserve from change - (erase-buffer buffer)) + (erase-buffer " *Echo Area*")) (if clear-stream (send-string-to-terminal ?\n stdout-p)) (if no-restore @@ -3656,7 +3701,8 @@ (let ((oldmsg (cdr (car message-stack)))) (raw-append-message oldmsg frame stdout-p) oldmsg) - ;; ### should we (redisplay-echo-area) here? messes some things up. + ;; #### Should we (redisplay-echo-area) here? Messes some + ;; things up. nil)))) (defun remove-message (&optional label frame) @@ -3666,14 +3712,14 @@ (while (and message-stack (or (null label) ; null label means clear whole stack (eq label (car (car message-stack))))) - (setq log (cons (car message-stack) log)) - (setq message-stack (cdr message-stack))) + (push (car message-stack) log) + (setq message-stack (cdr message-stack))) (let ((s message-stack)) (while (cdr s) (let ((msg (car (cdr s)))) (if (eq label (car msg)) (progn - (setq log (cons msg log)) + (push msg log) (setcdr s (cdr (cdr s)))) (setq s (cdr s)))))) ;; (possibly) log each removed message @@ -3686,27 +3732,26 @@ "Error caught in `remove-message-hook': %s" (error-message-string e)) (let ((inhibit-read-only t)) - (erase-buffer (get-buffer " *Echo Area*"))) + (erase-buffer " *Echo Area*")) (signal (car e) (cdr e)))) (setq log (cdr log))))) (defun append-message (label message &optional frame stdout-p) (or frame (setq frame (selected-frame))) - ;; add a new entry to the message-stack, or modify an existing one + ;; Add a new entry to the message-stack, or modify an existing one (let ((top (car message-stack))) (if (eq label (car top)) (setcdr top (concat (cdr top) message)) - (setq message-stack (cons (cons label message) message-stack)))) + (push (cons label message) message-stack))) (raw-append-message message frame stdout-p)) -;; really append the message to the echo area. no fiddling with message-stack. +;; Really append the message to the echo area. no fiddling with +;; message-stack. (defun raw-append-message (message &optional frame stdout-p) - (if (eq message "") nil - (let ((buffer (get-buffer " *Echo Area*")) + (unless (equal message "") + (let ((inhibit-read-only t) (zmacs-region-stays zmacs-region-stays)) ; preserve from change - (with-current-buffer buffer - (let ((inhibit-read-only t)) - (insert message))) + (insert-string message " *Echo Area*") ;; Conditionalizing on the device type in this way is not that clean, ;; but neither is having a device method, as I originally implemented ;; it: all non-stream devices behave in the same way. Perhaps @@ -3718,7 +3763,7 @@ ;; Don't redisplay the echo area if we are executing a macro. (if (not executing-kbd-macro) (if (eq 'stream (frame-type frame)) - (send-string-to-terminal message stdout-p) + (send-string-to-terminal message stdout-p (frame-device frame)) (redisplay-echo-area)))))) (defun display-message (label message &optional frame stdout-p) @@ -3894,8 +3939,7 @@ (check-argument-type 'warning-level-p level) (if (and (not (featurep 'infodock)) (not init-file-loaded)) - (setq before-init-deferred-warnings - (cons (list class message level) before-init-deferred-warnings)) + (push (list class message level) before-init-deferred-warnings) (catch 'ignored (let ((display-p t) (level-num (cdr (assq level warning-level-alist))))
--- a/lisp/startup.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/startup.el Mon Aug 13 10:31:29 2007 +0200 @@ -395,7 +395,8 @@ debug-paths)) (startup-setup-paths-warning)) - (if (not inhibit-autoloads) + (if (and (not inhibit-autoloads) + lisp-directory) (load (expand-file-name (file-name-sans-extension autoload-file-name) lisp-directory) nil t)) @@ -1132,45 +1133,40 @@ (erase-buffer) (buffer-disable-undo (current-buffer)) - (insert "Couldn't find an obvious default for the root of the " + (insert "Couldn't find an obvious default for the root of the\n" "XEmacs hierarchy.") - (let ((fill-column 76)) - (fill-region (point-min) (point-max))) - (princ "\nWARNING:\n" 'external-debugging-output) (princ (buffer-string) 'external-debugging-output))) (defun startup-setup-paths-warning () (let ((lock (if (boundp 'lock-directory) lock-directory 't)) - warnings message) + (warnings '())) (if (and (stringp lock) (null (file-directory-p lock))) (setq lock nil)) (cond - ((null (and exec-directory data-directory doc-directory load-path lock)) + ((null (and lisp-directory exec-directory data-directory doc-directory + load-path + lock)) (save-excursion (set-buffer (get-buffer-create " *warning-tmp*")) (erase-buffer) (buffer-disable-undo (current-buffer)) + (if (null lisp-directory) (push "lisp-directory" warnings)) (if (null lock) (push "lock-directory" warnings)) (if (null exec-directory) (push "exec-directory" warnings)) (if (null data-directory) (push "data-directory" warnings)) (if (null doc-directory) (push "doc-directory" warnings)) (if (null load-path) (push "load-path" warnings)) - (cond ((cdr (cdr warnings)) - (setq message (apply 'format "%s, %s, and %s" warnings))) - ((cdr warnings) - (setq message (apply 'format "%s and %s" warnings))) - (t (setq message (format "variable %s" (car warnings))))) - (insert "couldn't find an obvious default for " message - ", and there were no defaults specified in paths.h when " - "XEmacs was built. Perhaps some directories don't exist, " - "or the XEmacs executable, " (concat invocation-directory + + (insert "Couldn't find obvious defaults for:\n") + (while warnings + (insert (car warnings) "\n") + (setq warnings (cdr warnings))) + (insert "Perhaps some directories don't exist, " + "or the XEmacs executable,\n" (concat invocation-directory invocation-name) - " is in a strange place?") - - (let ((fill-column 76)) - (fill-region (point-min) (point-max))) + "\nis in a strange place?") (princ "\nWARNING:\n" 'external-debugging-output) (princ (buffer-string) 'external-debugging-output)
--- a/lisp/toolbar.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/toolbar.el Mon Aug 13 10:31:29 2007 +0200 @@ -30,6 +30,42 @@ ;;; Code: +(defcustom toolbar-visible-p ;; added for the options menu - dverna apr. 98 + (specifier-instance default-toolbar-visible-p) + "Whether the default toolbar is globally visible. This option can be +customized through the options menu." + :group 'display + :type 'boolean + :set '(lambda (var val) + (set-specifier default-toolbar-visible-p val) + (setq toolbar-visible-p val)) + ) + +(defcustom toolbar-captioned-p ;; added for the options menu - dverna apr. 98 + (specifier-instance toolbar-buttons-captioned-p) + "Whether the toolbars buttons are globally captioned. This option can be +customized through the options menu." + :group 'display + :type 'boolean + :set '(lambda (var val) + (set-specifier toolbar-buttons-captioned-p val) + (setq toolbar-captioned-p val)) + ) + +(defcustom default-toolbar-position ;; added for the options menu - dverna + (default-toolbar-position) + "The location of the default toolbar. It can be 'top, 'bootom, 'left or +'right. This option can be customized through the options menu." + :group 'display + :type '(choice (const :tag "top" 'top) + (const :tag "bottom" 'bottom) + (const :tag "left" 'left) + (const :tag "right" 'right)) + :set '(lambda (var val) + (set-default-toolbar-position val) + (setq default-toolbar-position val)) + ) + (defvar toolbar-help-enabled t "If non-nil help is echoed for toolbar buttons.") @@ -60,9 +96,10 @@ (defun init-toolbar-location () (if (not toolbar-icon-directory) - (setq toolbar-icon-directory - (file-name-as-directory - (locate-data-directory "toolbar"))))) + (let ((name (locate-data-directory "toolbar"))) + (if name + (setq toolbar-icon-directory + (file-name-as-directory name)))))) (defun init-toolbar-from-resources (locale) (if (and (featurep 'x)
--- a/lisp/update-elc.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/update-elc.el Mon Aug 13 10:31:29 2007 +0200 @@ -81,12 +81,6 @@ (cons src update-elc-files-to-compile)))) (setq autol (cdr autol)))) -;; We must have some lisp support at this point -(let ((temp-path (expand-file-name "." (car load-path)))) - (setq load-path (nconc (directory-files temp-path t "^[^-.]" - nil 'dirs-only) - (cons temp-path load-path)))) - ;; (print (prin1-to-string update-elc-files-to-compile)) (let (preloaded-file-list site-load-packages)
--- a/lisp/wid-edit.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/wid-edit.el Mon Aug 13 10:31:29 2007 +0200 @@ -427,7 +427,6 @@ (defun widget-activation-widget-mapper (extent action) "Activate or deactivate EXTENT's widget (button or field). Suitable for use with `map-extents'." - (message "FUCK") (ecase action (:activate (decf (extent-property extent :inactive-count)) @@ -450,7 +449,6 @@ nil) (defun widget-activation-glyph-mapper (extent action) - (message "FUCK") (let ((activate-p (if (eq action :activate) t nil))) (if activate-p (decf (extent-property extent :inactive-count))
--- a/lisp/x-menubar.el Mon Aug 13 10:30:38 2007 +0200 +++ b/lisp/x-menubar.el Mon Aug 13 10:31:29 2007 +0200 @@ -236,504 +236,566 @@ ["Set..." customize-customized] ["Apropos..." customize-apropos] ["Browse..." customize-browse]) - ["Read Only" (toggle-read-only) - :style toggle :selected buffer-read-only] ("Editing Options" - ["Overstrike" (progn - (overwrite-mode current-prefix-arg) - (setq-default overwrite-mode overwrite-mode)) + ["Overstrike" + (progn + (setq overwrite-mode (if overwrite-mode nil 'overwrite-mode-textual)) + (customize-set-variable 'overwrite-mode overwrite-mode)) :style toggle :selected overwrite-mode] - ["Case Sensitive Search" (progn - (setq case-fold-search - (not case-fold-search)) - (setq-default case-fold-search - case-fold-search)) + ["Case Sensitive Search" + (customize-set-variable 'case-fold-search + (setq case-fold-search (not case-fold-search))) :style toggle :selected (not case-fold-search)] - ["Case Matching Replace" (setq case-replace (not case-replace)) + ["Case Matching Replace" + (customize-set-variable 'case-replace (not case-replace)) :style toggle :selected case-replace] - ["Auto Delete Selection" (pending-delete-mode - (if pending-delete-mode 0 1)) + ["Auto Delete Selection" + (customize-set-variable 'pending-delete-mode (not pending-delete-mode)) :style toggle :selected (and (boundp 'pending-delete-mode) pending-delete-mode) - :active (fboundp 'pending-delete-mode)] - ["Active Regions" (setq zmacs-regions (not zmacs-regions)) + :active (boundp 'pending-delete-mode)] + ["Active Regions" + (customize-set-variable 'zmacs-regions (not zmacs-regions)) :style toggle :selected zmacs-regions] - ["Mouse Paste At Text Cursor" (setq mouse-yank-at-point - (not mouse-yank-at-point)) + ["Mouse Paste At Text Cursor" + (customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point)) :style toggle :selected mouse-yank-at-point] - ["Require Newline At End" (setq require-final-newline - (or (eq require-final-newline 'ask) - (not require-final-newline))) - :style toggle :selected (eq require-final-newline 't)] - ["Add Newline When Moving Past End" (setq next-line-add-newlines - (not next-line-add-newlines)) + ("Newline at end of file..." + ["Don't require" + (customize-set-variable 'require-final-newline nil) + :style radio :selected (not require-final-newline)] + ["Require" + (customize-set-variable 'require-final-newline t) + :style radio :selected (eq require-final-newline t)] + ["Ask" + (customize-set-variable 'require-final-newline 'ask) + :style radio :selected (and require-final-newline + (not (eq require-final-newline t)))]) + ["Add Newline When Moving Past End" + (customize-set-variable 'next-line-add-newlines + (not next-line-add-newlines)) :style toggle :selected next-line-add-newlines] ) ("General Options" - ["Teach Extended Commands" (setq teach-extended-commands-p - (not teach-extended-commands-p)) + ["Teach Extended Commands" + (customize-set-variable 'teach-extended-commands-p + (not teach-extended-commands-p)) :style toggle :selected teach-extended-commands-p] - ["Debug On Error" (setq debug-on-error (not debug-on-error)) + ["Debug On Error" + (customize-set-variable 'debug-on-error (not debug-on-error)) :style toggle :selected debug-on-error] - ["Debug On Quit" (setq debug-on-quit (not debug-on-quit)) + ["Debug On Quit" + (customize-set-variable 'debug-on-quit (not debug-on-quit)) :style toggle :selected debug-on-quit] ) ("Printing Options" ["Command-Line Switches for `lpr'/`lp'..." - (setq lpr-switches - (read-expression "Switches for `lpr'/`lp': " - (format "%S" lpr-switches))) + ;; better to directly open a customization buffer, since the value + ;; must be a list of strings, which is somewhat complex to prompt for. + (customize-variable 'lpr-switches) (boundp 'lpr-switches)] ("Pretty-Print Paper Size" ["Letter" - (setq ps-paper-type 'letter) + (customize-set-variable 'ps-paper-type 'letter) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'letter)) - :active (fboundp 'ps-print-buffer)] + :active (boundp 'ps-paper-type)] ["Letter-small" - (setq ps-paper-type 'letter-small) + (customize-set-variable 'ps-paper-type 'letter-small) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'letter-small)) - :active (fboundp 'ps-print-buffer)] + :active (boundp 'ps-paper-type)] ["Legal" - (setq ps-paper-type 'legal) + (customize-set-variable 'ps-paper-type 'legal) :style radio - :selected (and (boundp 'ps-paper-type) - (eq ps-paper-type 'legal)) - :active (fboundp 'ps-print-buffer)] + :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'legal)) + :active (boundp 'ps-paper-type)] ["Statement" - (setq ps-paper-type 'statement) + (customize-set-variable 'ps-paper-type 'statement) :style radio - :selected (and (boundp 'ps-paper-type) - (eq ps-paper-type 'statement)) - :active (fboundp 'ps-print-buffer)] - ["Executive" - (setq ps-paper-type 'executive) + :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'statement)) + :active (boundp 'ps-paper-type)] + ["Executive" + (customize-set-variable 'ps-paper-type 'executive) :style radio - :selected (and (boundp 'ps-paper-type) - (eq ps-paper-type 'executive)) - :active (fboundp 'ps-print-buffer)] + :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'executive)) + :active (boundp 'ps-paper-type)] ["Tabloid" - (setq ps-paper-type 'tabloid) + (customize-set-variable 'ps-paper-type 'tabloid) :style radio - :selected (and (boundp 'ps-paper-type) - (eq ps-paper-type 'tabloid)) - :active (fboundp 'ps-print-buffer)] - ["Ledger" - (setq ps-paper-type 'ledger) + :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'tabloid)) + :active (boundp 'ps-paper-type)] + ["Ledger" + (customize-set-variable 'ps-paper-type 'ledger) :style radio - :selected (and (boundp 'ps-paper-type) - (eq ps-paper-type 'ledger)) - :active (fboundp 'ps-print-buffer)] + :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'ledger)) + :active (boundp 'ps-paper-type)] ["A3" - (setq ps-paper-type 'a3) + (customize-set-variable 'ps-paper-type 'a3) :style radio - :selected (and (boundp 'ps-paper-type) - (eq ps-paper-type 'a3)) - :active (fboundp 'ps-print-buffer)] - ["A4" - (setq ps-paper-type 'a4) + :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a3)) + :active (boundp 'ps-paper-type)] + ["A4" + (customize-set-variable 'ps-paper-type 'a4) :style radio - :selected (and (boundp 'ps-paper-type) - (eq ps-paper-type 'a4)) - :active (fboundp 'ps-print-buffer)] - ["A4small" - (setq ps-paper-type 'a4small) + :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4)) + :active (boundp 'ps-paper-type)] + ["A4small" + (customize-set-variable 'ps-paper-type 'a4small) :style radio - :selected (and (boundp 'ps-paper-type) - (eq ps-paper-type 'a4small)) - :active (fboundp 'ps-print-buffer)] - ["B4" - (setq ps-paper-type 'b4) + :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4small)) + :active (boundp 'ps-paper-type)] + ["B4" + (customize-set-variable 'ps-paper-type 'b4) :style radio - :selected (and (boundp 'ps-paper-type) - (eq ps-paper-type 'b4)) - :active (fboundp 'ps-print-buffer)] - ["B5" - (setq ps-paper-type 'b5) + :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b4)) + :active (boundp 'ps-paper-type)] + ["B5" + (customize-set-variable 'ps-paper-type 'b5) :style radio - :selected (and (boundp 'ps-paper-type) - (eq ps-paper-type 'b5)) - :active (fboundp 'ps-print-buffer)] + :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b5)) + :active (boundp 'ps-paper-type)] ) ["Color Printing" - (when (boundp 'ps-print-color-p) - (if ps-print-color-p - (progn - (setq ps-print-color-p nil) - (when (and (boundp 'original-face-background) - original-face-background) - (set-face-background 'default original-face-background))) - (setq original-face-background (face-background-instance 'default)) - (set-face-background 'default "white") - (setq ps-print-color-p t))) - :style toggle :selected (and (boundp 'ps-print-color-p) - ps-print-color-p) - :active (fboundp 'ps-print-buffer)]) + (cond (ps-print-color-p + (customize-set-variable 'ps-print-color-p nil) + ;; I'm wondering whether all this muck is usefull. + (and (boundp 'original-face-background) + original-face-background + (set-face-background 'default original-face-background))) + (t + (customize-set-variable 'ps-print-color-p t) + (setq original-face-background + (face-background-instance 'default)) + (set-face-background 'default "white"))) + :style toggle + :selected (and (boundp 'ps-print-color-p) ps-print-color-p) + :active (boundp 'ps-print-color-p)]) ("\"Other Window\" Location" ["Always in Same Frame" - (setq get-frame-for-buffer-default-instance-limit nil) + (customize-set-variable + 'get-frame-for-buffer-default-instance-limit nil) :style radio :selected (null get-frame-for-buffer-default-instance-limit)] ["Other Frame (2 Frames Max)" - (setq get-frame-for-buffer-default-instance-limit 2) + (customize-set-variable 'get-frame-for-buffer-default-instance-limit 2) :style radio :selected (eq 2 get-frame-for-buffer-default-instance-limit)] ["Other Frame (3 Frames Max)" - (setq get-frame-for-buffer-default-instance-limit 3) + (customize-set-variable 'get-frame-for-buffer-default-instance-limit 3) :style radio :selected (eq 3 get-frame-for-buffer-default-instance-limit)] ["Other Frame (4 Frames Max)" - (setq get-frame-for-buffer-default-instance-limit 4) + (customize-set-variable 'get-frame-for-buffer-default-instance-limit 4) :style radio :selected (eq 4 get-frame-for-buffer-default-instance-limit)] ["Other Frame (5 Frames Max)" - (setq get-frame-for-buffer-default-instance-limit 5) + (customize-set-variable 'get-frame-for-buffer-default-instance-limit 5) :style radio :selected (eq 5 get-frame-for-buffer-default-instance-limit)] ["Always Create New Frame" - (setq get-frame-for-buffer-default-instance-limit 0) + (customize-set-variable 'get-frame-for-buffer-default-instance-limit 0) :style radio :selected (eq 0 get-frame-for-buffer-default-instance-limit)] "-----" ["Temp Buffers Always in Same Frame" - (setq temp-buffer-show-function 'show-temp-buffer-in-current-frame) + (customize-set-variable 'temp-buffer-show-function + 'show-temp-buffer-in-current-frame) :style radio :selected (eq temp-buffer-show-function 'show-temp-buffer-in-current-frame)] ["Temp Buffers Like Other Buffers" - (setq temp-buffer-show-function nil) + (customize-set-variable 'temp-buffer-show-function nil) :style radio :selected (null temp-buffer-show-function)] "-----" ["Make current frame gnuserv target" - (setq gnuserv-frame - (if (equal gnuserv-frame (selected-frame)) - 'new - (selected-frame))) - :style radio - :selected (and (boundp 'gnuserv-frame) - (equal gnuserv-frame (selected-frame)))] + (customize-set-variable 'gnuserv-frame (if (eq gnuserv-frame t) nil t)) + :style toggle + :selected (and (boundp 'gnuserv-frame) (eq gnuserv-frame t)) + :active (boundp 'gnuserv-frame)] ) - "-----" ("Syntax Highlighting" - ["In This Buffer" (font-lock-mode) - :style toggle :selected (and (boundp 'font-lock-mode) font-lock-mode) - :active (fboundp 'font-lock-mode)] - ["Automatic" (if (not (featurep 'font-lock)) - (progn - (setq font-lock-auto-fontify t) - (require 'font-lock)) - (setq font-lock-auto-fontify - (not font-lock-auto-fontify))) + ["In This Buffer" + (progn ;; becomes buffer local + (font-lock-mode) + (customize-set-variable 'font-lock-mode font-lock-mode)) + :style toggle + :selected (and (boundp 'font-lock-mode) font-lock-mode) + :active (boundp 'font-lock-mode)] + ["Automatic" + (customize-set-variable 'font-lock-auto-fontify + (not font-lock-auto-fontify)) :style toggle - :selected (and (featurep 'font-lock) font-lock-auto-fontify) + :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify) :active (fboundp 'font-lock-mode)] "-----" - ["Fonts" (progn (require 'font-lock) - (font-lock-use-default-fonts) - (setq font-lock-use-fonts t - font-lock-use-colors nil) - (font-lock-mode 1)) - :style radio - :selected (and (boundp 'font-lock-mode) - font-lock-mode - font-lock-use-fonts) - :active (fboundp 'font-lock-mode)] - ["Colors" (progn (require 'font-lock) - (font-lock-use-default-colors) - (setq font-lock-use-colors t - font-lock-use-fonts nil) - (font-lock-mode 1)) + ["Fonts" + (progn + (require 'font-lock) + (font-lock-use-default-fonts) + (customize-set-variable 'font-lock-use-fonts t) + (customize-set-variable 'font-lock-use-colors nil) + (font-lock-mode 1)) :style radio - :selected (and (boundp 'font-lock-mode) - font-lock-mode - font-lock-use-colors) + :selected (and (boundp 'font-lock-use-fonts) font-lock-use-fonts) :active (fboundp 'font-lock-mode)] + ["Colors" + (progn + (require 'font-lock) + (font-lock-use-default-colors) + (customize-set-variable 'font-lock-use-colors t) + (customize-set-variable 'font-lock-use-fonts nil) + (font-lock-mode 1)) + :style radio + :selected (and (boundp 'font-lock-use-colors) font-lock-use-colors) + :active (boundp 'font-lock-mode)] "-----" - ["Least" (if (or (and (not (integerp font-lock-maximum-decoration)) - (not (eq t font-lock-maximum-decoration))) - (and (integerp font-lock-maximum-decoration) - (<= font-lock-maximum-decoration 0))) - nil - (setq font-lock-maximum-decoration nil) - (font-lock-recompute-variables)) + ["Least" + (progn + (require 'font-lock) + (if (or (and (not (integerp font-lock-maximum-decoration)) + (not (eq t font-lock-maximum-decoration))) + (and (integerp font-lock-maximum-decoration) + (<= font-lock-maximum-decoration 0))) + nil + (customize-set-variable 'font-lock-maximum-decoration nil) + (font-lock-recompute-variables))) :style radio - :active (and (boundp 'font-lock-mode) font-lock-mode) - :selected (and (boundp 'font-lock-mode) - font-lock-mode + :active (fboundp 'font-lock-mode) + :selected (and (boundp 'font-lock-maximium-decoration) (or (and (not (integerp font-lock-maximum-decoration)) (not (eq t font-lock-maximum-decoration))) (and (integerp font-lock-maximum-decoration) (<= font-lock-maximum-decoration 0))))] - ["More" (if (and (integerp font-lock-maximum-decoration) - (= 1 font-lock-maximum-decoration)) - nil - (setq font-lock-maximum-decoration 1) - (font-lock-recompute-variables)) + ["More" + (progn + (require 'font-lock) + (if (and (integerp font-lock-maximum-decoration) + (= 1 font-lock-maximum-decoration)) + nil + (customize-set-variable 'font-lock-maximum-decoration 1) + (font-lock-recompute-variables))) :style radio - :active (and (boundp 'font-lock-mode) font-lock-mode) - :selected (and (boundp 'font-lock-mode) - font-lock-mode + :active (fboundp 'font-lock-mode) + :selected (and (boundp 'font-lock-maximium-decoration) (integerp font-lock-maximum-decoration) (= 1 font-lock-maximum-decoration))] - ["Even More" (if (and (integerp font-lock-maximum-decoration) - (= 2 font-lock-maximum-decoration)) - nil - (setq font-lock-maximum-decoration 2) - (font-lock-recompute-variables)) + ["Even More" + (progn + (require 'font-lock) + (if (and (integerp font-lock-maximum-decoration) + (= 2 font-lock-maximum-decoration)) + nil + (customize-set-variable 'font-lock-maximum-decoration 2) + (font-lock-recompute-variables))) :style radio - :active (and (boundp 'font-lock-mode) font-lock-mode) - :selected (and (boundp 'font-lock-mode) - font-lock-mode + :active (fboundp 'font-lock-mode) + :selected (and (boundp 'font-lock-maximum-decoration) (integerp font-lock-maximum-decoration) (= 2 font-lock-maximum-decoration))] - ["Most" (if (or (eq font-lock-maximum-decoration t) - (and (integerp font-lock-maximum-decoration) - (>= font-lock-maximum-decoration 3))) - nil - (setq font-lock-maximum-decoration t) - (font-lock-recompute-variables)) + ["Most" + (progn + (require 'font-lock) + (if (or (eq font-lock-maximum-decoration t) + (and (integerp font-lock-maximum-decoration) + (>= font-lock-maximum-decoration 3))) + nil + (customize-set-variable 'font-lock-maximum-decoration t) + (font-lock-recompute-variables))) :style radio - :active (and (boundp 'font-lock-mode) font-lock-mode) - :selected (and (boundp 'font-lock-mode) - font-lock-mode + :active (fboundp 'font-lock-mode) + :selected (and (boundp 'font-lock-maximum-decoration) (or (eq font-lock-maximum-decoration t) (and (integerp font-lock-maximum-decoration) (>= font-lock-maximum-decoration 3))))] "-----" - ["Lazy" (progn (require 'lazy-shot) - (if (and (boundp 'lazy-shot-mode) lazy-shot-mode) - (progn - (lazy-shot-mode 0) - ;; this shouldn't be necessary so there has to - ;; be a redisplay bug lurking somewhere (or - ;; possibly another event handler bug) - (redraw-modeline) - (remove-hook 'font-lock-mode-hook - 'turn-on-lazy-shot)) - (if font-lock-mode - (progn - (lazy-shot-mode 1) - (redraw-modeline) - (add-hook 'font-lock-mode-hook - 'turn-on-lazy-shot))))) - :active (and (boundp 'font-lock-mode) - (boundp 'lazy-shot-mode) + ["Lazy" + (progn ;; becomes buffer local + (lazy-shot-mode) + (customize-set-variable 'lazy-shot-mode lazy-shot-mode) + ;; this shouldn't be necessary so there has to + ;; be a redisplay bug lurking somewhere (or + ;; possibly another event handler bug) + (redraw-modeline)) + :active (and (boundp 'font-lock-mode) (boundp 'lazy-shot-mode) font-lock-mode) :style toggle :selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)] - ["Caching" (progn (require 'fast-lock) - (if fast-lock-mode - (progn - (fast-lock-mode 0) - ;; this shouldn't be necessary so there has to - ;; be a redisplay bug lurking somewhere (or - ;; possibly another event handler bug) - (redraw-modeline)) - (if font-lock-mode - (progn - (fast-lock-mode 1) - (redraw-modeline))))) - :active (and (boundp 'font-lock-mode) font-lock-mode) + ["Caching" + (progn ;; becomes buffer local + (fast-lock-mode) + (customize-set-variable 'fast-lock-mode fast-lock-mode) + ;; this shouldn't be necessary so there has to + ;; be a redisplay bug lurking somewhere (or + ;; possibly another event handler bug) + (redraw-modeline)) + :active (and (boundp 'font-lock-mode) (boundp 'fast-lock-mode) + font-lock-mode) :style toggle :selected (and (boundp 'fast-lock-mode) fast-lock-mode)] ) ("Paren Highlighting" - ["None" (paren-set-mode -1) - :style radio :selected (and (boundp 'paren-mode) (not paren-mode)) - :active (fboundp 'paren-set-mode)] - ["Blinking Paren" (paren-set-mode 'blink-paren) - :style radio :selected (and (boundp 'paren-mode) - (eq paren-mode 'blink-paren)) - :active (fboundp 'paren-set-mode)] - ["Steady Paren" (paren-set-mode 'paren) - :style radio :selected (and (boundp 'paren-mode) - (eq paren-mode 'paren)) - :active (fboundp 'paren-set-mode)] - ["Expression" (paren-set-mode 'sexp) - :style radio :selected (and (boundp 'paren-mode) - (eq paren-mode 'sexp)) - :active (fboundp 'paren-set-mode)] -;;; ["Nested Shading" (paren-set-mode 'nested) -;;; :style radio :selected (eq paren-mode 'nested)] + ["None" + (customize-set-variable 'paren-mode nil) + :style radio + :selected (and (boundp 'paren-mode) (not paren-mode)) + :active (boundp 'paren-mode)] + ["Blinking Paren" + (customize-set-variable 'paren-mode 'blink-paren) + :style radio + :selected (and (boundp 'paren-mode) (eq paren-mode 'blink-paren)) + :active (boundp 'paren-mode)] + ["Steady Paren" + (customize-set-variable 'paren-mode 'paren) + :style radio + :selected (and (boundp 'paren-mode) (eq paren-mode 'paren)) + :active (boundp 'paren-mode)] + ["Expression" + (customize-set-variable 'paren-mode 'sexp) + :style radio + :selected (and (boundp 'paren-mode) (eq paren-mode 'sexp)) + :active (boundp 'paren-mode)] +;; ["Nested Shading" +;; (customize-set-variable 'paren-mode 'nested) +;; :style radio +;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested)) +;; :active (boundp 'paren-mode)] ) "-----" ("Frame Appearance" + ["Frame-Local Font Menu" + (customize-set-variable 'font-menu-this-frame-only-p + (not font-menu-this-frame-only-p)) + :style toggle + :selected (and (boundp 'font-menu-this-frame-only-p) + font-menu-this-frame-only-p)] ,@(if (featurep 'scrollbar) - '(["Scrollbars" (if (= (specifier-instance scrollbar-width) 0) - (progn - (set-specifier scrollbar-width 15) - (set-specifier scrollbar-height 15)) - (set-specifier scrollbar-width 0) - (set-specifier scrollbar-height 0)) - :style toggle :selected (> (specifier-instance scrollbar-width) 0)])) - ["3D Modeline" + '(["Scrollbars" + (customize-set-variable 'scrollbars-visible-p + (not scrollbars-visible-p)) + :style toggle + :selected scrollbars-visible-p])) + ;; I don't think this is of any interest. - dverna apr. 98 +;; ["3D Modeline" +;; (progn +;; (if (zerop (specifier-instance modeline-shadow-thickness)) +;; (set-specifier modeline-shadow-thickness 2) +;; (set-specifier modeline-shadow-thickness 0)) +;; (redraw-modeline t)) +;; :style toggle +;; :selected (let ((thickness +;; (specifier-instance modeline-shadow-thickness))) +;; (and (integerp thickness) +;; (> thickness 0)))] + ["Truncate Lines" + (progn ;; becomes buffer-local + (setq truncate-lines (not truncate-lines)) + (customize-set-variable 'truncate-lines truncate-lines)) + :style toggle + :selected truncate-lines] + ["Blinking Cursor" + (customize-set-variable 'blink-cursor-mode (not blink-cursor-mode)) + :style toggle + :selected (and (boundp 'blink-cursor-mode) blink-cursor-mode) + :active (boundp 'blink-cursor-mode)] + "-----" + ["Block cursor" (progn - (if (zerop (specifier-instance modeline-shadow-thickness)) - (set-specifier modeline-shadow-thickness 2) - (set-specifier modeline-shadow-thickness 0)) - (redraw-modeline t)) - :style toggle :selected - (let ((thickness - (specifier-instance modeline-shadow-thickness))) - (and (integerp thickness) - (> thickness 0)))] - ["Truncate Lines" (progn - (setq truncate-lines (not truncate-lines)) - (setq-default truncate-lines truncate-lines)) - :style toggle :selected truncate-lines] - ["Bar Cursor" (progn - (setq bar-cursor - (if (not bar-cursor) 2 nil)) - (force-cursor-redisplay)) - :style toggle :selected bar-cursor] - ["Blinking Cursor" (blink-cursor-mode) - :style toggle - :selected (and (boundp 'blink-cursor-mode) blink-cursor-mode)] - ["Frame-Local Font Menu" (setq font-menu-this-frame-only-p - (not font-menu-this-frame-only-p)) - :style toggle :selected (and (boundp 'font-menu-this-frame-only-p) - font-menu-this-frame-only-p)] - ; ["Line Numbers" (line-number-mode nil) - ; :style toggle :selected line-number-mode] + (customize-set-variable 'bar-cursor nil) + (force-cursor-redisplay)) + :style radio + :selected (null bar-cursor)] + ["Bar cursor (1 pixel)" + (progn + (customize-set-variable 'bar-cursor t) + (force-cursor-redisplay)) + :style radio + :selected (eq bar-cursor t)] + ["Bar cursor (2 pixels)" + (progn + (customize-set-variable 'bar-cursor 2) + (force-cursor-redisplay)) + :style radio + :selected (and bar-cursor (not (eq bar-cursor t)))] + "------" + ["Line Numbers" + (progn + (customize-set-variable 'line-number-mode (not line-number-mode)) + (redraw-modeline)) + :style toggle :selected line-number-mode] + ["Column Numbers" + (progn + (customize-set-variable 'column-number-mode + (not column-number-mode)) + (redraw-modeline)) + :style toggle :selected column-number-mode] ) ("Menubar Appearance" ["Buffers Menu Length..." - (progn - (setq buffers-menu-max-size + (customize-set-variable + 'buffers-menu-max-size + ;; would it be better to open a customization buffer ? + (let ((val (read-number - "Enter number of buffers to display (or 0 for unlimited): ")) - (if (eq buffers-menu-max-size 0) (setq buffers-menu-max-size nil)))] + "Enter number of buffers to display (or 0 for unlimited): "))) + (if (eq val 0) nil val)))] ["Multi-Operation Buffers Sub-Menus" - (setq complex-buffers-menu-p - (not complex-buffers-menu-p)) - :style toggle :selected complex-buffers-menu-p] + (customize-set-variable 'complex-buffers-menu-p + (not complex-buffers-menu-p)) + :style toggle + :selected complex-buffers-menu-p] ("Buffers Menu Sorting" ["Most Recently Used" (progn - (setq buffers-menu-sort-function nil) - (setq buffers-menu-grouping-function nil)) + (customize-set-variable 'buffers-menu-sort-function nil) + (customize-set-variable 'buffers-menu-grouping-function nil)) :style radio :selected (null buffers-menu-sort-function)] ["Alphabetically" (progn - (setq buffers-menu-sort-function - 'sort-buffers-menu-alphabetically) - (setq buffers-menu-grouping-function nil)) + (customize-set-variable 'buffers-menu-sort-function + 'sort-buffers-menu-alphabetically) + (customize-set-variable 'buffers-menu-grouping-function nil)) :style radio :selected (eq 'sort-buffers-menu-alphabetically buffers-menu-sort-function)] ["By Major Mode, Then Alphabetically" (progn - (setq buffers-menu-sort-function - 'sort-buffers-menu-by-mode-then-alphabetically) - (setq buffers-menu-grouping-function - 'group-buffers-menu-by-mode-then-alphabetically)) + (customize-set-variable + 'buffers-menu-sort-function + 'sort-buffers-menu-by-mode-then-alphabetically) + (customize-set-variable + 'buffers-menu-grouping-function + 'group-buffers-menu-by-mode-then-alphabetically)) :style radio :selected (eq 'sort-buffers-menu-by-mode-then-alphabetically buffers-menu-sort-function)]) ["Submenus for Buffer Groups" - (setq buffers-menu-submenus-for-groups-p - (not buffers-menu-submenus-for-groups-p)) + (customize-set-variable 'buffers-menu-submenus-for-groups-p + (not buffers-menu-submenus-for-groups-p)) :style toggle - :selected buffers-menu-submenus-for-groups-p - :active (not (null buffers-menu-grouping-function))] + :selected buffers-menu-submenus-for-groups-p] "---" - ["Ignore Scaled Fonts" (setq font-menu-ignore-scaled-fonts - (not font-menu-ignore-scaled-fonts)) - :style toggle :selected (and (boundp 'font-menu-ignore-scaled-fonts) - font-menu-ignore-scaled-fonts)] + ["Ignore Scaled Fonts" + (customize-set-variable 'font-menu-ignore-scaled-fonts + (not font-menu-ignore-scaled-fonts)) + :style toggle + :selected (and (boundp 'font-menu-ignore-scaled-fonts) + font-menu-ignore-scaled-fonts)] ) ,@(if (featurep 'toolbar) '(("Toolbar Appearance" - ["Visible" (set-specifier default-toolbar-visible-p - (not (specifier-instance - default-toolbar-visible-p))) + ["Visible" + (customize-set-variable 'toolbar-visible-p + (not toolbar-visible-p)) :style toggle - :selected (specifier-instance default-toolbar-visible-p)] - ["Captioned" (set-specifier toolbar-buttons-captioned-p - (not (specifier-instance - toolbar-buttons-captioned-p))) + :selected toolbar-visible-p] + ["Captioned" + (customize-set-variable 'toolbar-captioned-p + (not toolbar-captioned-p)) :style toggle - :selected - (specifier-instance toolbar-buttons-captioned-p)] + :selected toolbar-captioned-p] ("Default Location" - ["Top" (set-default-toolbar-position 'top) - :style radio :selected (eq (default-toolbar-position) 'top)] - ["Bottom" (set-default-toolbar-position 'bottom) - :style radio :selected (eq (default-toolbar-position) 'bottom)] - ["Left" (set-default-toolbar-position 'left) - :style radio :selected (eq (default-toolbar-position) 'left)] - ["Right" (set-default-toolbar-position 'right) - :style radio :selected (eq (default-toolbar-position) 'right)] + ["Top" + (customize-set-variable 'default-toolbar-position 'top) + :style radio + :selected (eq default-toolbar-position 'top)] + ["Bottom" + (customize-set-variable 'default-toolbar-position 'bottom) + :style radio + :selected (eq default-toolbar-position 'bottom)] + ["Left" + (customize-set-variable 'default-toolbar-position 'left) + :style radio + :selected (eq default-toolbar-position 'left)] + ["Right" + (customize-set-variable 'default-toolbar-position 'right) + :style radio + :selected (eq default-toolbar-position 'right)] ) ))) ("Mouse" - ["Avoid-Text" - (if (equal (device-type) 'x) - (if mouse-avoidance-mode - (mouse-avoidance-mode 'none) - (mouse-avoidance-mode 'banish)) - (beep) - (message "This option requires a window system.")) - :style toggle :selected (and (boundp 'mouse-avoidance-mode) - mouse-avoidance-mode - window-system) - :active (fboundp 'mouse-avoidance-mode)] + ["Avoid Text..." + (customize-set-variable 'mouse-avoidance-mode + (if mouse-avoidance-mode nil 'banish)) + :style toggle + :selected (and (boundp 'mouse-avoidance-mode) mouse-avoidance-mode) + :active (and (boundp 'mouse-avoidance-mode) + window-system (eq (device-type) 'x))] ["strokes-mode" - (if (equal (device-type) 'x) - (strokes-mode) - (beep) - (message "This option requires a window system.")) - :style toggle :selected (and (boundp 'strokes-mode) - strokes-mode - window-system) - :active (fboundp 'strokes-mode)]) + (customize-set-variable 'strokes-mode (not strokes-mode)) + :style toggle + :selected (and (boundp 'strokes-mode) strokes-mode) + :active (and (boundp 'strokes-mode) + window-system (eq (device-type) 'x))] + ) ("Open URLs With" - ["Emacs-W3" (setq browse-url-browser-function 'browse-url-w3) + ["Emacs-W3" + (customize-set-variable 'browse-url-browser-function 'browse-url-w3) :style radio :selected (and (boundp 'browse-url-browser-function) (eq browse-url-browser-function 'browse-url-w3)) - :active (and (fboundp 'browse-url-w3) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-w3) (fboundp 'w3-fetch))] - ["Netscape" (setq browse-url-browser-function 'browse-url-netscape) + ["Netscape" + (customize-set-variable 'browse-url-browser-function + 'browse-url-netscape) :style radio :selected (and (boundp 'browse-url-browser-function) (eq browse-url-browser-function 'browse-url-netscape)) - :active (fboundp 'browse-url-netscape)] - ["Mosaic" (setq browse-url-browser-function 'browse-url-mosaic) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-netscape))] + ["Mosaic" + (customize-set-variable 'browse-url-browser-function + 'browse-url-mosaic) :style radio :selected (and (boundp 'browse-url-browser-function) (eq browse-url-browser-function 'browse-url-mosaic)) - :active (fboundp 'browse-url-mosaic)] - ["Mosaic (CCI)" (setq browse-url-browser-function 'browse-url-cci) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-mosaic))] + ["Mosaic (CCI)" + (customize-set-variable 'browse-url-browser-function 'browse-url-cci) :style radio :selected (and (boundp 'browse-url-browser-function) - (eq browse-url-browser-function 'browse-url-iximosaic)) - :active (fboundp 'browse-url-iximosaic)] - ["IXI Mosaic" (setq browse-url-browser-function 'browse-url-iximosaic) + (eq browse-url-browser-function 'browse-url-cci)) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-cci))] + ["IXI Mosaic" + (customize-set-variable 'browse-url-browser-function + 'browse-url-iximosaic) :style radio :selected (and (boundp 'browse-url-browser-function) (eq browse-url-browser-function 'browse-url-iximosaic)) - :active (fboundp 'browse-url-iximosaic)] - ["Lynx (xterm)" (setq browse-url-browser-function 'browse-url-lynx-xterm) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-iximosaic))] + ["Lynx (xterm)" + (customize-set-variable 'browse-url-browser-function + 'browse-url-lynx-xterm) :style radio :selected (and (boundp 'browse-url-browser-function) (eq browse-url-browser-function 'browse-url-lynx-xterm)) - :active (fboundp 'browse-url-lynx-xterm)] - ["Lynx (xemacs)" (setq browse-url-browser-function 'browse-url-lynx-emacs) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-lynx-xterm))] + ["Lynx (xemacs)" + (customize-set-variable 'browse-url-browser-function + 'browse-url-lynx-emacs) :style radio :selected (and (boundp 'browse-url-browser-function) (eq browse-url-browser-function 'browse-url-lynx-emacs)) - :active (fboundp 'browse-url-lynx-emacs)] - ["Grail" (setq browse-url-browser-function 'browse-url-grail) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-lynx-emacs))] + ["Grail" + (customize-set-variable 'browse-url-browser-function + 'browse-url-grail) :style radio :selected (and (boundp 'browse-url-browser-function) (eq browse-url-browser-function 'browse-url-grail)) - :active (fboundp 'browse-url-grail)] + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-grail))] ) "-----" ["Browse Faces..." (customize-face nil)] @@ -741,11 +803,13 @@ ("Size" :filter font-menu-size-constructor) ("Weight" :filter font-menu-weight-constructor) "-----" - ["Save Options" save-options-menu-settings] + ["Save Options" customize-save-customized] ) ("Buffers" :filter buffers-menu-filter + ["Read Only" (toggle-read-only) + :style toggle :selected buffer-read-only] ["List All Buffers" list-buffers] "--" ) @@ -1208,6 +1272,9 @@ ;;; The Options menu +;; We'll keep those variables here for a while, in order to provide a +;; function for porting the old options file that a user may own to Custom. + (defvar options-save-faces nil "*Non-nil value means save-options will save information about faces. A nil value means save-options will not save face information. @@ -1219,189 +1286,6 @@ M-x edit-faces is deprecated. Support for it and this variable will be discontinued in a future release.") -(defconst options-menu-saved-forms - ;; This is really quite a kludge, but it gets the job done. - ;; - ;; remember that we have to conditionalize on default features - ;; both in the forms to evaluate and in the forms output to - ;; .emacs, in case the .emacs is loaded into an XEmacs with - ;; different features. - (purecopy - '( - ;; Editing Options menu. - ;; put case-fold-search first to defeat a bug in the backquote - ;; processing mechanism. Feh! - case-fold-search - `(setq-default overwrite-mode ,(default-value 'overwrite-mode)) - (if (default-value 'overwrite-mode) - '(overwrite-mode 1)) - `(setq-default case-fold-search ,(default-value 'case-fold-search)) - case-replace - (if (and (boundp 'pending-delete-mode) - pending-delete-mode) - '(pending-delete-mode 1)) - zmacs-regions - mouse-yank-at-point - require-final-newline - next-line-add-newlines - - ;; General Options menu. - teach-extended-commands-p - ;; (#### not actually on Options menu) - teach-extended-commands-timeout - debug-on-error - debug-on-quit - - ;; Printing Options menu. - lpr-switches - ps-print-color-p - ps-paper-type - - ;; Other Window Location - get-frame-for-buffer-default-instance-limit - temp-buffer-show-function - (if gnuserv-frame - '(setq gnuserv-frame (selected-frame))) - - ;; Syntax Highlighting - font-lock-auto-fontify - font-lock-use-fonts - font-lock-use-colors - font-lock-maximum-decoration - font-lock-maximum-size - ;; (#### the next two not on Options menu) - font-lock-mode-enable-list - font-lock-mode-disable-list - ;; #### - this structure is clearly broken. There's no way to ever - ;; un-require font-lock via the menus. --Stig - (if (featurep 'font-lock) - '(require 'font-lock)) - (if (and (boundp 'font-lock-mode-hook) - (memq 'turn-on-fast-lock font-lock-mode-hook)) - '(add-hook 'font-lock-mode-hook 'turn-on-fast-lock) - '(remove-hook 'font-lock-mode-hook 'turn-on-fast-lock)) - (if (and (boundp 'font-lock-mode-hook) - (memq 'turn-on-lazy-shot font-lock-mode-hook)) - '(add-hook 'font-lock-mode-hook 'turn-on-lazy-shot) - '(remove-hook 'font-lock-mode-hook 'turn-on-lazy-shot)) - - ;; Paren Highlighting - (if paren-mode - `(progn (require 'paren) (paren-set-mode ',paren-mode))) - - ;; For specifiers, we only save global settings since the others - ;; will belong to objects which only exist during this session. - - ;; Frame Appearance - (if (featurep 'scrollbar) - `(if (featurep 'scrollbar) - (progn - (add-spec-list-to-specifier - scrollbar-width - ',(specifier-spec-list scrollbar-width 'global)) - (add-spec-list-to-specifier - scrollbar-height - ',(specifier-spec-list scrollbar-height 'global))))) - `(add-spec-list-to-specifier - modeline-shadow-thickness - ',(specifier-spec-list modeline-shadow-thickness 'global)) - `(setq-default truncate-lines ,(default-value 'truncate-lines)) - bar-cursor - (if (and (boundp 'blink-cursor-mode) blink-cursor-mode) - '(blink-cursor-mode t)) - - ;; Menubar Appearance - buffers-menu-max-size - complex-buffers-menu-p - buffers-menu-sort-function - buffers-menu-grouping-function - buffers-menu-submenus-for-groups-p - font-menu-ignore-scaled-fonts - font-menu-this-frame-only-p - - ;; Toolbar Appearance - (if (featurep 'toolbar) - `(if (featurep 'toolbar) - (progn - (set-default-toolbar-position - ',(default-toolbar-position)) - (add-spec-list-to-specifier - default-toolbar-visible-p - ',(specifier-spec-list default-toolbar-visible-p 'global)) - (add-spec-list-to-specifier - toolbar-buttons-captioned-p - ',(specifier-spec-list toolbar-buttons-captioned-p - 'global))))) - - ;; mouse - mouse-avoidance-mode - - ;; Open URLs With - browse-url-browser-function - - ;; Now save all faces. - - ;; Setting this in lisp conflicts with X resources. Bad move. --Stig - ;; (list 'set-face-font ''default (face-font-name 'default)) - ;; (list 'set-face-font ''modeline (face-font-name 'modeline)) - (if options-save-faces - (cons 'progn - (mapcar #'(lambda (face) - `(make-face ',face)) - (save-options-non-customized-face-list)))) - - (if options-save-faces - (cons 'progn - (apply 'nconc - (mapcar - #'(lambda (face) - (delq nil - (mapcar - #'(lambda (property) - (if (specifier-spec-list - (face-property face property)) - `(add-spec-list-to-specifier - (face-property ',face ',property) - ',(save-options-specifier-spec-list - face property)))) - (delq 'display-table - (copy-sequence - built-in-face-specifiers))))) - (save-options-non-customized-face-list))))) - - ;; Mule-specific: - (if (featurep 'mule) - `(if (featurep 'mule) - (set-language-environment ',current-language-environment))) - )) - "The variables to save; or forms to evaluate to get forms to write out. -This is used by `save-options-menu-settings' and should mirror the -options listed in the Options menu.") - -(defun save-options-non-customized-face-list () - "Return a list of all faces that have not been 'customized'." - (delq nil (mapcar '(lambda (face) - (unless (get face 'saved-face) - face)) - (face-list)))) - -(defun save-options-specifier-spec-list (face property) - (if (not (or (eq property 'font) (eq property 'color))) - (specifier-spec-list (face-property face property) 'global) - (let* ((retlist (specifier-spec-list (face-property face property) - 'global)) - (entry (cdr (car retlist))) - item) - (while entry - (setq item (car entry)) - (if (eq property 'font) - (if (font-instance-p (cdr item)) - (setcdr item (font-instance-name (cdr item)))) - (if (color-instance-p (cdr item)) - (setcdr item (color-instance-name (cdr item))))) - (setq entry (cdr entry))) - retlist))) - (defvar save-options-init-file nil "File into which to save forms to load the options file (nil for .emacs). Normally this is nil, which means save into your .emacs file (the value @@ -1413,123 +1297,6 @@ If this is a relative filename, it is put into the same directory as your .emacs file.") -(defun save-options-menu-settings () - "Save the current settings of the `Options' menu to your `.emacs' file." - (interactive) - ;; we compute the actual filenames now because x-menubar is loaded - ;; at dump time, when the identity of the user running XEmacs is not known. - (let* ((actual-save-options-init-file - (or save-options-init-file - (and (not (equal user-init-file "")) - user-init-file) - (and (eq system-type 'ms-dos) - (concat "~" (user-login-name) "/_emacs")) - (concat "~" (user-login-name) "/.emacs"))) - (actual-save-options-file - (abbreviate-file-name - (expand-file-name - save-options-file - (file-name-directory actual-save-options-init-file)) - ;; Don't hack-homedir in abbreviate-file-name. This will - ;; cause an incorrect expansion if the save-options variables - ;; have ~ in them. - )) - (init-output-buffer (find-file-noselect - actual-save-options-init-file)) - init-output-marker - (options-output-buffer - (find-file-noselect actual-save-options-file)) - options-output-marker) - - (save-excursion - (set-buffer options-output-buffer) - (erase-buffer) - (setq options-output-marker (point-marker))) - - ;; run with current-buffer unchanged so that variables are evaluated in - ;; the current context, instead of in the context of the ".emacs" buffer - ;; or the ".xemacs-options" buffer. - - ;; first write out .xemacs-options. - - (let ((standard-output options-output-marker)) - (princ ";; -*- Mode: Emacs-Lisp -*-\n\n") - (princ "(setq options-file-xemacs-version '(") - (princ emacs-major-version) - (princ " ") - (princ emacs-minor-version) - (princ "))\n") - (let ((print-readably t) - (print-escape-newlines t)) - (mapcar #'(lambda (var) - (princ " ") - (if (symbolp var) - (prin1 (list 'setq-default var - (let ((val (symbol-value var))) - (if (or (memq val '(t nil)) - (and (not (symbolp val)) - (not (consp val)))) - val - (list 'quote val))))) - (setq var (eval var)) - (cond ((eq (car-safe var) 'progn) - (while (setq var (cdr var)) - (prin1 (car var)) - (princ "\n") - (if (cdr var) (princ " ")) - )) - (var - (prin1 var)))) - (if var (princ "\n"))) - options-menu-saved-forms) - )) - (set-marker options-output-marker nil) - (save-excursion - (set-buffer options-output-buffer) - (save-buffer)) - - ;; then fix .emacs. - - (save-excursion - (set-buffer init-output-buffer) - ;; - ;; Find and delete the previously saved data, and position to write. - ;; - (goto-char (point-min)) - (if (re-search-forward "^;; Options Menu Settings *\n" nil 'move) - (let ((p (match-beginning 0))) - (goto-char p) - (or (re-search-forward - "^;; End of Options Menu Settings *\\(\n\\|\\'\\)" - nil t) - (error "can't find END of saved state in .emacs")) - (delete-region p (match-end 0))) - (goto-char (point-max)) - (insert "\n")) - (setq init-output-marker (point-marker))) - - (let ((standard-output init-output-marker)) - (princ ";; Options Menu Settings\n") - (princ ";; =====================\n") - (princ "(cond\n") - (princ " ((and (string-match \"XEmacs\" emacs-version)\n") - (princ " (boundp 'emacs-major-version)\n") - (princ " (or (and\n") - (princ " (= emacs-major-version 19)\n") - (princ " (>= emacs-minor-version 14))\n") - (princ " (= emacs-major-version 20))\n") - (princ " (fboundp 'load-options-file))\n") - (princ " (load-options-file \"") - (princ actual-save-options-file) - (princ "\")))\n") - (princ ";; ============================\n") - (princ ";; End of Options Menu Settings\n")) - - (set-marker init-output-marker nil) - (save-excursion - (set-buffer init-output-buffer) - (save-buffer)) - )) ;;; The Help menu
--- a/nt/ChangeLog Mon Aug 13 10:30:38 2007 +0200 +++ b/nt/ChangeLog Mon Aug 13 10:31:29 2007 +0200 @@ -1,3 +1,13 @@ +1998-04-20 Kirill M. Katsnelson <kkm@kis.ru> + + * xemacs.mak: Support "Don't panic, I will restart make" exit code. + Extra checks for externally specified X{PM,11}_DIR. + Proper quoting to allow spaces in these paths. + Conduct all config checks at once. + New option VERBOSECC. When non-zero, C compiler echoes its + commands. When zero, only name of the file being compiled is + echoed. Default is 0 (do not echo). + 1998-04-17 Jonathan Harris <jhar@tardis.ed.ac.uk> * README: Documented new msvc build procedure, including XPM
--- a/nt/xemacs.mak Mon Aug 13 10:30:38 2007 +0200 +++ b/nt/xemacs.mak Mon Aug 13 10:31:29 2007 +0200 @@ -67,17 +67,33 @@ # # Conf error checks # +CONFIG_ERROR=0 !if !$(HAVE_MSW) && !$(HAVE_X) -!error Please specify at least one HAVE_MSW=1 and/or HAVE_X=1 +!message Please specify at least one HAVE_MSW=1 and/or HAVE_X=1 +CONFIG_ERROR=1 !endif !if $(HAVE_X) && !defined(X11_DIR) -!error Please specify root directory for your X11 installation: X11_DIR=path +!message Please specify root directory for your X11 installation: X11_DIR=path +CONFIG_ERROR=1 +!endif +!if $(HAVE_X) && defined(X11_DIR) && !exist("$(X11_DIR)\LIB\X11.LIB") +!message Specified X11 directory does not contain "$(X11_DIR)\LIB\X11.LIB" +CONFIG_ERROR=1 !endif !if $(HAVE_MSW) && $(HAVE_XPM) && !defined(XPM_DIR) -!error Please specify root directory for your XPM installation: XPM_DIR=path +!message Please specify root directory for your XPM installation: XPM_DIR=path +CONFIG_ERROR=1 +!endif +!if $(HAVE_MSW) && $(HAVE_XPM) && defined(XPM_DIR) && !exist("$(XPM_DIR)\LIB\XPM.LIB") +!message Specified XPM directory does not contain "$(XPM_DIR)\LIB\XPM.LIB" +CONFIG_ERROR=1 !endif !if $(HAVE_MSW) && $(HAVE_TOOLBARS) && !$(HAVE_XPM) !error Toolbars require XPM support +CONFIG_ERROR=1 +!endif +!if $(CONFIG_ERROR) +!error Configuration error(s) found !endif # @@ -132,6 +148,18 @@ !message !endif # !defined(CONF_REPORT_ALREADY_PRINTED) +# +# Compiler command echo control. Define VERBOSECC=1 to get vebose compilation. +# +!if !defined(VERBOSECC) +VERBOSECC=0 +!endif +!if $(VERBOSECC) +CCV=$(CC) +!else +CCV=@$(CC) +!endif + !if $(DEBUG_XEMACS) OPT=-Od -Zi !else @@ -157,8 +185,8 @@ !endif !if $(HAVE_XPM) MSW_DEFINES=$(MSW_DEFINES) -DHAVE_XPM -DFOR_MSW -MSW_INCLUDES=$(MSW_INCLUDES) -I$(XPM_DIR) -I$(XPM_DIR)\lib -MSW_LIBS=$(MSW_LIBS) $(XPM_DIR)\lib\Xpm.lib +MSW_INCLUDES=$(MSW_INCLUDES) -I"$(XPM_DIR)" -I"$(XPM_DIR)\lib" +MSW_LIBS=$(MSW_LIBS) "$(XPM_DIR)\lib\Xpm.lib" !endif !if $(HAVE_TOOLBARS) MSW_DEFINES=$(MSW_DEFINES) -DHAVE_TOOLBARS @@ -181,7 +209,7 @@ # Generic variables -INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(XEMACS)\nt\inc -I$(XEMACS)\src -I$(XEMACS)\lwlib -I"$(MSVCDIR)\include" +INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(XEMACS)\nt\inc -I$(XEMACS)\src -I$(XEMACS)\lwlib DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) \ -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN -DWINDOWSNT -Demacs \ @@ -203,16 +231,16 @@ $(XEMACS)\src\puresize-adjust.h $(XEMACS)\src\config.h: config.h - !copy config.h $(XEMACS)\src + copy config.h $(XEMACS)\src $(XEMACS)\src\Emacs.ad.h: Emacs.ad.h - !copy Emacs.ad.h $(XEMACS)\src + copy Emacs.ad.h $(XEMACS)\src $(XEMACS)\src\paths.h: paths.h - !copy paths.h $(XEMACS)\src + copy paths.h $(XEMACS)\src $(XEMACS)\src\puresize-adjust.h: puresize-adjust.h - !copy puresize-adjust.h $(XEMACS)\src + copy puresize-adjust.h $(XEMACS)\src #------------------------------------------------------------------------------ @@ -228,7 +256,7 @@ link.exe -lib -nologo -out:$@ $(LASTFILE_OBJS) $(OUTDIR)\lastfile.obj: $(LASTFILE_SRC)\lastfile.c - $(CC) $(LASTFILE_FLAGS) $** + $(CCV) $(LASTFILE_FLAGS) $** #------------------------------------------------------------------------------ @@ -255,25 +283,25 @@ link.exe -lib -nologo $(DEBUG_FLAGS) -out:$@ $(LWLIB_OBJS) $(OUTDIR)\lwlib-config.obj: $(LWLIB_SRC)\lwlib-config.c - $(CC) $(LWLIB_FLAGS) $** + $(CCV) $(LWLIB_FLAGS) $** $(OUTDIR)\lwlib-utils.obj: $(LWLIB_SRC)\lwlib-utils.c - $(CC) $(LWLIB_FLAGS) $** + $(CCV) $(LWLIB_FLAGS) $** $(OUTDIR)\lwlib-Xaw.obj: $(LWLIB_SRC)\lwlib-Xaw.c - $(CC) $(LWLIB_FLAGS) $** + $(CCV) $(LWLIB_FLAGS) $** $(OUTDIR)\lwlib-Xlw.obj: $(LWLIB_SRC)\lwlib-Xlw.c - $(CC) $(LWLIB_FLAGS) $** + $(CCV) $(LWLIB_FLAGS) $** $(OUTDIR)\lwlib.obj: $(LWLIB_SRC)\lwlib.c - $(CC) $(LWLIB_FLAGS) $** + $(CCV) $(LWLIB_FLAGS) $** $(OUTDIR)\xlwmenu.obj: $(LWLIB_SRC)\xlwmenu.c - $(CC) $(LWLIB_FLAGS) $** + $(CCV) $(LWLIB_FLAGS) $** $(OUTDIR)\xlwscrollbar.obj: $(LWLIB_SRC)\xlwscrollbar.c - $(CC) $(LWLIB_FLAGS) $** + $(CCV) $(LWLIB_FLAGS) $** !endif #------------------------------------------------------------------------------ @@ -446,7 +474,7 @@ link.exe -out:$@ $(LIB_SRC_LFLAGS) $** $(LIB_SRC_LIBS) $(OUTDIR)\make-docfile.obj: $(LIB_SRC)\make-docfile.c - $(CC) -nologo $(LIB_SRC_FLAGS) -c $** -Fo$@ + $(CCV) -nologo $(LIB_SRC_FLAGS) -c $** -Fo$@ RUNEMACS=$(XEMACS)\src\runemacs.exe @@ -457,7 +485,7 @@ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib libc.lib $(OUTDIR)\runemacs.obj: $(XEMACS)\nt\runemacs.c - $(CC) -nologo -ML $(WARN_CPP_FLAGS) $(OPT) -c \ + $(CCV) -nologo -ML $(WARN_CPP_FLAGS) $(OPT) -c \ -D_DEBUG -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN \ -D_X86_ -Demacs -DHAVE_CONFIG_H \ $** -Fo$@ @@ -648,13 +676,13 @@ # nmake rule {$(TEMACS_SRC)}.c{$(OUTDIR)}.obj: - $(CC) $(TEMACS_FLAGS) $< -Fo$@ -Fr$*.sbr + $(CCV) $(TEMACS_FLAGS) $< -Fo$@ -Fr$*.sbr $(OUTDIR)\TopLevelEmacsShell.obj: $(TEMACS_SRC)\EmacsShell-sub.c - $(CC) $(TEMACS_FLAGS) -DDEFINE_TOP_LEVEL_EMACS_SHELL $** -Fo$@ + $(CCV) $(TEMACS_FLAGS) -DDEFINE_TOP_LEVEL_EMACS_SHELL $** -Fo$@ $(OUTDIR)\TransientEmacsShell.obj: $(TEMACS_SRC)\EmacsShell-sub.c - $(CC) $(TEMACS_FLAGS) -DDEFINE_TRANSIENT_EMACS_SHELL $** -Fo$@ + $(CCV) $(TEMACS_FLAGS) -DDEFINE_TRANSIENT_EMACS_SHELL $** -Fo$@ $(OUTDIR)\pure.obj: $(TEMACS_SRC)\pure.c $(TEMACS_SRC)\puresize-adjust.h @@ -675,7 +703,7 @@ # MSDEV Source Broswer file. "*.sbr" is too inclusive but this is harmless $(TEMACS_BROWSE): $(TEMACS_OBJS) @dir /b/s $(OUTDIR)\*.sbr > bscmake.tmp - bscmake /nologo -o$@ @bscmake.tmp + bscmake -nologo -o$@ @bscmake.tmp @del bscmake.tmp #------------------------------------------------------------------------------ @@ -686,44 +714,41 @@ $(DOC): $(LIB_SRC)\make-docfile.exe -del $(DOC) - !$(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages - !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC1) - !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC2) - !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC3) - !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC4) - !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC5) - !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC6) - !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC7) - !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC8) - !$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC9) + $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages + $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC1) + $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC2) + $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC3) + $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC4) + $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC5) + $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC6) + $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC7) + $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC8) + $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC9) $(LISP)\Installation.el: Installation.el copy Installation.el $(LISP) update-elc: $(LISP)\Installation.el set EMACSBOOTSTRAPLOADPATH=$(LISP) - !$(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\update-elc.el - -rebuild: $(TEMACS_DIR)\puresize-adjust.h - !nmake -nologo -f xemacs.mak dump-xemacs + $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\update-elc.el -# This rule dumps xemacs and then checks to see if a rebuild is required due -# to changing PURESPACE requirements. +# This rule dumps xemacs and then possibly spawns sub-make if PURESPACE +# requirements has changed. dump-xemacs: $(TEMACS) - !echo >rebuild + @echo >$(TEMACS_DIR)\SATISFIED cd $(TEMACS_DIR) set EMACSBOOTSTRAPLOADPATH=$(LISP) - !$(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\loadup.el dump + -1 $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\loadup.el dump cd $(XEMACS)\nt - !nmake -nologo -f xemacs.mak rebuild + @if not exist $(TEMACS_DIR)\SATISFIED nmake -nologo -f xemacs.mak $@ #------------------------------------------------------------------------------ # use this rule to build the complete system -all: $(LASTFILE) $(LWLIB) $(SUPPORT_PROGS) $(TEMACS) $(TEMACS_BROWSE) update-elc $(DOC) dump-xemacs - -del rebuild +all: $(OUTDIR)\nul $(LASTFILE) $(LWLIB) $(SUPPORT_PROGS) \ + $(TEMACS) $(TEMACS_BROWSE) update-elc $(DOC) dump-xemacs -temacs: $(TEMACS) +temacs: $(TEMACS) # use this rule to install the system install:
--- a/src/ChangeLog Mon Aug 13 10:30:38 2007 +0200 +++ b/src/ChangeLog Mon Aug 13 10:31:29 2007 +0200 @@ -1,3 +1,276 @@ +1998-04-25 SL Baur <steve@altair.xemacs.org> + + * glyphs-x.c (xface_normalize): Add console_type parameters to + calls to `potential_pixmap_file_instantiator'. + +Sat Apr 24 1998 Andy Piper <andyp@parallax.co.uk> + + * event-msw.c: fix and enable signal pipe handling when using msg + select(). + +1998-04-25 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * process-unix.c (allocate_pty): Typo fix. + +1998-04-25 Olivier Galibert <galibert@pobox.com> + + * s/irix5-0.h (PTY_OPEN): Ditto + * s/irix4-0.h (PTY_OPEN): Restore the stb variable. + +1998-04-25 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * emacs.c (complex_vars_of_emacs): Typo fixes. + + * emacs.c: Added configure-exec-prefix-directory. + + * paths.h.in: Added PATH_EXEC_PREFIX. + +1998-04-25 Olivier Galibert <galibert@pobox.com> + + * unexelfsgi.c (unexec): Kludge for Irix 5.3 which clears the + .sbss section no matter what. Defensively remove the alignment fix + if the .sbss section type isn't modified (Irix 6.5SE). Remove some + warnings. + +1998-04-24 Martin Buchholz <martin@xemacs.org> + + * data.c (Fnot): There has traditionally been kludgy startup lisp + code that called `null' even if `not' was more appropriate, + because `not' was defined in lisp. This is one primitive + sufficiently important that it should ALWAYS be defined. + +Sat Apr 24 1998 Andy Piper <andyp@parallax.co.uk> + + * Makefile.in.in: add glyphs-eimage.o to build. + + * console.h: added console methods init_image_instance_from_eimage + and locate_pixmap_file. + + * emacs.c: add initialisation for glyphs-eimage.c + + * symsinit.h: declare glyphs-eimage functions. + + * glyphs-eimage.c: New file - generalised eimage support for gif, + tiff, png and jpeg, mainly from glyphs-x.c. + + * glyphs-msw.c: added init_image_instance_from_eimage. Tidied up + file location. + + * glyphs-x.c: disable gif, tiff, png and jpeg support in this + file. Added init_image_instance_from_eimage. Tidied up file + location. + + * glyphs.h: + * glyphs.c: abstract image location. + +Fri Apr 24 19:38:19 1998 Andy Piper <andyp@parallax.co.uk> + + * config.h.in: support our special select + + * event-msw.c: + * toolbar-msw.c: + * console-msw.h: toolbar cleanup. + + * device-msw.c: + * emacs.c: + * frame-msw.c: + * glyphs-msw.h: + * ntplay.c: + * process-unix.c: + * select-msw.c: + * sheap.c: + * s/cygwin32.h: warning elimination. + +1998-04-24 Hrvoje Niksic <hniksic@srce.hr> + + * fns.c (Fload_average): New argument USE_FLOATS. + + * alloc.c (Fstring): New function, synched with FSF 20.3. + +Thu Apr 23 19:38:19 1998 Andy Piper <andyp@parallax.co.uk> + + * unexcw.c: cope with the reversed executable sections written by + binutils-2.9 ld and egcs. + +1998-04-24 Kirill M. Katsnelson <kkm@kis.ru> + + * menubar-msw.c (populate_or_checksum_helper): Fixed to compile + with union type. + +1998-04-23 Hrvoje Niksic <hniksic@srce.hr> + + * fns.c (Fload_average): Respect errno when reporting getloadavg() + errors. + + * getloadavg.c (getloadavg): Cleaner Solaris implementation, based + on sample code by Casper Dik. + +1998-04-23 SL Baur <steve@altair.xemacs.org> + + * frame-x.c (x_delete_frame): remove dead code. + +1998-04-22 SL Baur <steve@altair.xemacs.org> + + * print.c (Falternate_debugging_output): Unconditionally define. + +1998-04-22 Hrvoje Niksic <hniksic@srce.hr> + + * eval.c: Ditto. + + * alloc.c: Ditto. + + * lread.c: Ditto. + + * print.c: Removed standalone hacks. + +1998-04-23 Kirill M. Katsnelson <kkm@kis.ru> + + * toolbar-msw.c (mswindows_clear_toolbar): Fixed wabbit buttons. + (mswindows_output_toolbar): Gave 3D look to toolbars. Still no + pretty, needs more work. + (mswindows_move_toolbar): Renamed so because it does not deal with + redrawing exposed toolbars. + Properly position toolbars. + (mswindows_redraw_exposed_toolbars): Changed calls to the above. + (mswindows_find_toolbar_pos): Do not assert if toolbar not + found: a command can come from a menu. + (mswindows_handle_toolbar_wm_command): Quickly return nil if + toolbar not found. + +1998-04-22 Kirill M. Katsnelson <kkm@kis.ru> + + * device-msw.c (tagINITCOMMONCONTROLSEX): Uniform declaration + between SDK and cygwin. + (mswindows_init_device): InitCommonControls -> + InitCommonControlsEx typo fix. + +Wed Apr 22 12:59:35 1998 Andy Piper <andyp@parallax.co.uk> + + * glyphs-msw.c (EImage2DIBitmap): count the number of bytes correctly. + +Wed Apr 22 12:59:35 1998 Andy Piper <andyp@parallax.co.uk> + + * config.h.in: support for HAVE_MSG_SELECT. + + * console-msw.h: add support for four toolbars. + + * device-msw.c: init common controls. + + * event-msw.c: if HAVE_MSG_SELECT is defined use unixoid event + stream tye callbacks and select() on events rather than MWFMO. + Added event handling for tooltip messages. If you have this + special select then all process support works under cygwin. + + * frame-msw.c: add support for four toolbars. + + * redisplay-msw.c: update toolbars when an area is exposed. + + * signal.c: _WIN32 -> WINDOWSNT. + + * event-stream.c: enable unixoid initialization if we have it. + + * event-unixoid.c: allow us to turn off the signal pipe. + + * toolbar-msw.c: major overhaul. Enable support for all four + toolbars, fix display and sizing problems, enable tooltip support, + be more optimal about deleting toolbars. + + * toolbar.h: reinstate 0 toolbar border width for msw. + + * s/cygwin32.h: minor define updates. + +1998-04-22 Hrvoje Niksic <hniksic@srce.hr> + + * print.c (Falternate_debugging_output): Define only if + DEBUG_XEMACS. + +1998-04-21 Hrvoje Niksic <hniksic@srce.hr> + + * fileio.c (Fmake_temp_name): Updated docstring. + +1998-04-21 Hrvoje Niksic <hniksic@srce.hr> + + * print.c (print_prepare): New argument FRAME_KLUDGE. + (print_prepare): If writing to a frame, return a resizing buffer + stream. + (print_finish): Flush the stream. + (Fprin1): Adjust calls to print_prepare() and print_finish(). + (Fprinc): Ditto. + (Fprint): Ditto. + (print_internal): Optimize printing of characters. + + * print.c (RESET_PRINT_GENSYM): New macro. + (print_prepare): Use it. + (print_finish): Ditto. + (Fwrite_char): Ditto. + (Fprin1_to_string): Ditto. + +1998-04-22 SL Baur <steve@altair.xemacs.org> + + * config.h.in: add FOR_MSW variable. + From Itay Ben-Yaacov <pezz@www-mail.huji.ac.il> + +1998-04-20 Kirill M. Katsnelson <kkm@kis.ru> + + * alloc.c (report_pure_usage): Remove ifdef WINDOWSNT around + "Don't panic, I will restart make". + +1998-04-19 Kirill M. Katsnelson <kkm@kis.ru> + + * process.c (vars_of_process): Declared lisp variable + windowed-process-io. + + * procimpl.h: Externally declared it. + + * process-nt.c (nt_create_process): Changed to honor the above + variable, and to utilize SHGetFileInfo to determine file type. + +1998-04-21 Martin Buchholz <martin@xemacs.org> + + * mule-ccl.c: Fix compiler warnings. I hate compiler warnings. + The code is clearer anyways without macros that goto. + +1998-04-22 SL Baur <steve@altair.xemacs.org> + + * glyphs.h: Add prototypes for signal_image_error and + signal_image_error_2. + Suggested by Hrvoje Niksic <hniksic@srce.hr> + +1998-04-18 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * fileio.c: Changed `directory-sep-char' to `path-separator', + following a change in GNU Emacs. + +1998-04-21 Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> + + * eldap.c: As suggested by Hrvoje Niksic + (Fldap_search_internal): Loop and GCPRO cleanup + (print_ldap): Removed text translation + +1998-04-19 Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> + + * eldap.c: (print_ldap): Ignore escapeflag + (Fldap_search_internal): Added unwind protection to appropriately + free the LDAP temporary structures in case of interruption. Added + a QUIT to the result fetching loop. + +1998-04-19 SL Baur <steve@altair.xemacs.org> + + * emacs.c (TopLevel): New variables: Vinfodock_major_version, + Vinfodock_minor_version, Vinfodock_build_version. + (vars_of_emacs): Initialize them. + + * config.h.in: Add InfoDock version numbers. + + * device-x.c (have_xemacs_resources_in_xrdb): distinguish whether + we're running as InfoDock or XEmacs. + +1998-04-18 SL Baur <steve@altair.xemacs.org> + + * glyphs-x.c: Remove definition of Q_color_symbols. + + * glyphs.h: Declare Q_color_symbols and evaluate_xpm_color_symbols. + 1998-04-17 Jonathan Harris <jhar@tardis.ed.ac.uk> * console-msw.h: @@ -123,6 +396,9 @@ 1998-04-12 Kirill M. Katsnelson <kkm@kis.ru> + * event-msw.c (emacs_mswindows_quit_p): Do not check for quit + character in modal loop. + * fileio.c: Removed Vdirectory_sep_char variable. * lisp.h: Removed extern decl for the above.
--- a/src/Makefile.in.in Mon Aug 13 10:30:38 2007 +0200 +++ b/src/Makefile.in.in Mon Aug 13 10:31:29 2007 +0200 @@ -167,7 +167,7 @@ eval.o events.o $(extra_objs)\ event-stream.o extents.o faces.o\ fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o font-lock.o\ - frame.o general.o getloadavg.o glyphs.o\ + frame.o general.o getloadavg.o glyphs.o glyphs-eimage.o\ $(gui_objs) hash.o imgproc.o indent.o insdel.o intl.o\ keymap.o $(RTC_patch_objs) line-number.o lread.o lstream.o\ macros.o marker.o md5.o minibuf.o objects.o opaque.o\
--- a/src/alloc.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/alloc.c Mon Aug 13 10:31:29 2007 +0200 @@ -41,7 +41,6 @@ #include <config.h> #include "lisp.h" -#ifndef standalone #include "backtrace.h" #include "buffer.h" #include "bytecode.h" @@ -56,7 +55,6 @@ #include "specifier.h" #include "sysfile.h" #include "window.h" -#endif #ifdef DOUG_LEA_MALLOC #include <malloc.h> @@ -371,13 +369,11 @@ consing_since_gc = gc_cons_threshold + 1; release_breathing_space (); -#ifndef standalone - /* Flush some histories which might conceivably contain - * garbalogical inhibitors */ + /* Flush some histories which might conceivably contain garbalogical + inhibitors. */ if (!NILP (Fboundp (Qvalues))) Fset (Qvalues, Qnil); Vcommand_history = Qnil; -#endif error ("Memory exhausted"); } @@ -2365,6 +2361,23 @@ return val; } +DEFUN ("string", Fstring, 0, MANY, 0, /* +Concatenate all the argument characters and make the result a string. +*/ + (int nargs, Lisp_Object *args)) +{ + Bufbyte *storage = alloca_array (Bufbyte, nargs * MAX_EMCHAR_LEN); + Bufbyte *p = storage; + + for (; nargs; nargs--, args++) + { + Lisp_Object lisp_char = *args; + CHECK_CHAR_COERCE_INT (lisp_char); + p += set_charptr_emchar (p, XCHAR (lisp_char)); + } + return make_string (storage, p - storage); +} + /* Take some raw memory, which MUST already be in internal format, and package it up into a Lisp string. */ Lisp_Object @@ -3072,12 +3085,7 @@ if (rc < 0) { unlink("SATISFIED"); - /* Current build process on NT does */ - /* not know how to restart itself. */ - /* --marcpa */ -#ifndef WINDOWSNT fatal ("Pure size adjusted, Don't Panic! I will restart the `make'"); -#endif } else if (pure_lossage && die_if_pure_storage_exceeded) { fatal ("Pure storage exhausted"); } @@ -3899,9 +3907,6 @@ SWEEP_FIXED_TYPE_BLOCK (symbol, struct Lisp_Symbol); } - -#ifndef standalone - static void sweep_extents (void) { @@ -3951,9 +3956,6 @@ FREE_FIXED_TYPE_WHEN_NOT_IN_GC (marker, struct Lisp_Marker, ptr); #endif /* ALLOC_NO_POOLS */ } - -#endif /* not standalone */ - #if defined (MULE) && defined (VERIFY_STRING_CHARS_INTEGRITY) @@ -5010,11 +5012,10 @@ #ifdef LISP_FLOAT_TYPE init_float_alloc (); #endif /* LISP_FLOAT_TYPE */ -#ifndef standalone init_marker_alloc (); init_extent_alloc (); init_event_alloc (); -#endif + ignore_malloc_warnings = 0; staticidx = 0; consing_since_gc = 0; @@ -5067,6 +5068,7 @@ DEFSUBR (Fmake_vector); DEFSUBR (Fmake_bit_vector); DEFSUBR (Fmake_string); + DEFSUBR (Fstring); DEFSUBR (Fmake_symbol); DEFSUBR (Fmake_marker); DEFSUBR (Fpurecopy);
--- a/src/buffer.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/buffer.c Mon Aug 13 10:31:29 2007 +0200 @@ -2588,6 +2588,10 @@ until the tab is filled in. If `overwrite-mode-binary', self-insertion replaces newlines and tabs too. Automatically becomes buffer-local when set in any fashion. + +Normally, you shouldn't modify this variable by hand, but use the functions +`overwrite-mode' and `binary-overwrite-mode' instead. However, you can +customize the default value from the options menu. */ ); #if 0 /* FSFmacs */
--- a/src/config.h.in Mon Aug 13 10:30:38 2007 +0200 +++ b/src/config.h.in Mon Aug 13 10:31:29 2007 +0200 @@ -64,6 +64,10 @@ #undef EMACS_BETA_VERSION #undef EMACS_VERSION #undef XEMACS_CODENAME +/* InfoDock versions, not used with XEmacs */ +#undef INFODOCK_MAJOR_VERSION +#undef INFODOCK_MINOR_VERSION +#undef INFODOCK_BUILD_VERSION /* Make all functions available on AIX. See AC_AIX. */ #undef _ALL_SOURCE @@ -113,6 +117,9 @@ /* Compile in support for MS windows? */ #undef HAVE_MS_WINDOWS +/* special cygwin process handling? */ +#undef HAVE_MSG_SELECT + /* Compile in support for the X window system? */ #undef HAVE_X_WINDOWS @@ -142,7 +149,7 @@ #endif /* Define HAVE_UNIXOID_EVENT_LOOP if we use select() to wait for events. */ -#if defined (HAVE_X_WINDOWS) || defined (HAVE_TTY) +#if defined (HAVE_X_WINDOWS) || defined (HAVE_TTY) || defined(HAVE_MSG_SELECT) #define HAVE_UNIXOID_EVENT_LOOP #endif @@ -308,6 +315,7 @@ /* Compile in support for X pixmaps via the `xpm' library? */ #undef HAVE_XPM +#undef FOR_MSW /* Compile in support for "X faces" via the `compface' library? This enables graphical display of X-face headers in mail/news messages */
--- a/src/console-msw.h Mon Aug 13 10:30:38 2007 +0200 +++ b/src/console-msw.h Mon Aug 13 10:31:29 2007 +0200 @@ -125,9 +125,9 @@ /* Coordinates of last click event, screen-relative */ POINTS last_click_point; #ifdef HAVE_TOOLBARS - HWND htoolbar; /* Toolbar hashtable. See toolbar-msw.c */ Lisp_Object toolbar_hashtable; + unsigned int toolbar_checksum[4]; #endif /* Menu hashtable. See menubar-msw.c */ @@ -155,11 +155,13 @@ #define FRAME_MSWINDOWS_DATA(f) FRAME_TYPE_DATA (f, mswindows) #define FRAME_MSWINDOWS_HANDLE(f) (FRAME_MSWINDOWS_DATA (f)->hwnd) -#define FRAME_MSWINDOWS_TOOLBAR(f) (FRAME_MSWINDOWS_DATA (f)->htoolbar) #define FRAME_MSWINDOWS_DC(f) (FRAME_MSWINDOWS_DATA (f)->hdc) #define FRAME_MSWINDOWS_CDC(f) (FRAME_MSWINDOWS_DATA (f)->cdc) #define FRAME_MSWINDOWS_MENU_HASHTABLE(f) (FRAME_MSWINDOWS_DATA (f)->menu_hashtable) -#define FRAME_MSWINDOWS_TOOLBAR_HASHTABLE(f) (FRAME_MSWINDOWS_DATA (f)->toolbar_hashtable) +#define FRAME_MSWINDOWS_TOOLBAR_HASHTABLE(f) \ + (FRAME_MSWINDOWS_DATA (f)->toolbar_hashtable) +#define FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos) \ + (FRAME_MSWINDOWS_DATA (f)->toolbar_checksum[pos]) #define FRAME_MSWINDOWS_MENU_CHECKSUM(f) (FRAME_MSWINDOWS_DATA (f)->menu_checksum) #define FRAME_MSWINDOWS_TITLE_CHECKSUM(f) (FRAME_MSWINDOWS_DATA (f)->title_checksum) #define FRAME_MSWINDOWS_CHARWIDTH(f) (FRAME_MSWINDOWS_DATA (f)->charwidth)
--- a/src/console.h Mon Aug 13 10:30:38 2007 +0200 +++ b/src/console.h Mon Aug 13 10:31:29 2007 +0200 @@ -194,6 +194,13 @@ int depth); unsigned long (*image_instance_hash_method) (struct Lisp_Image_Instance *, int depth); + void (*init_image_instance_from_eimage_method) (struct Lisp_Image_Instance *ii, + int width, int height, + unsigned char *eimage, + int dest_mask, + Lisp_Object instantiator, + Lisp_Object domain); + 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); Lisp_Object image_conversion_list;
--- a/src/depend Mon Aug 13 10:30:38 2007 +0200 +++ b/src/depend Mon Aug 13 10:31:29 2007 +0200 @@ -10,7 +10,7 @@ console-msw.o: $(LISP_H) conslots.h console-msw.h console.h events.h opaque.h systime.h device-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console-stream.h console.h device.h events.h faces.h frame.h frameslots.h mule-charset.h scrollbar.h specifier.h sysdep.h systime.h toolbar.h dired-msw.o: $(LISP_H) buffer.h bufslots.h msdos.h mule-charset.h ndir.h nt.h regex.h sysdir.h sysfile.h -event-msw.o: $(LISP_H) conslots.h console-msw.h console.h device.h events-mod.h events.h frame.h frameslots.h lstream.h menubar-msw.h mule-charset.h process.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h sysproc.h systime.h syswait.h toolbar.h +event-msw.o: $(LISP_H) conslots.h console-msw.h console.h device.h events-mod.h events.h frame.h frameslots.h lstream.h menubar-msw.h msdos.h mule-charset.h nt.h process.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h sysdep.h sysfile.h sysproc.h systime.h syswait.h toolbar.h frame-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h events.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h mule-charset.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h glyphs-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h faces.h file-coding.h frame.h frameslots.h glyphs-msw.h glyphs.h imgproc.h insdel.h lstream.h msdos.h mule-charset.h nt.h objects-msw.h objects.h opaque.h scrollbar.h specifier.h sysfile.h toolbar.h menubar-msw.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console-msw.h console.h device.h elhash.h events.h frame.h frameslots.h gui.h menubar-msw.h menubar.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window.h @@ -18,7 +18,7 @@ redisplay-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h debug.h device.h events.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h mule-ccl.h mule-charset.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h systime.h toolbar.h window.h scrollbar-msw.o: $(LISP_H) conslots.h console-msw.h console.h device.h events.h frame.h frameslots.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h systime.h toolbar.h window.h select-msw.o: $(LISP_H) conslots.h console-msw.h console.h -toolbar-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h mule-charset.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window.h +toolbar-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h mule-charset.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window.h #endif #ifdef HAVE_X_WINDOWS balloon-x.o: $(LISP_H) balloon_help.h conslots.h console-x.h console.h device.h xintrinsic.h @@ -89,7 +89,7 @@ dynarr.o: $(LISP_H) ecrt0.o: config.h editfns.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h events.h extents.h frame.h frameslots.h insdel.h line-number.h mule-charset.h redisplay.h scrollbar.h specifier.h sysdep.h syspwd.h systime.h toolbar.h window.h -eldap.o: $(LISP_H) eldap.h +eldap.o: $(LISP_H) eldap.h opaque.h elhash.o: $(LISP_H) bytecode.h elhash.h hash.h emacs.o: $(LISP_H) backtrace.h buffer.h bufslots.h commands.h conslots.h console.h msdos.h mule-charset.h nt.h paths.h process.h sysdep.h sysdll.h sysfile.h syssignal.h systime.h systty.h eval.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h commands.h conslots.h console.h mule-charset.h opaque.h @@ -112,7 +112,7 @@ free-hook.o: $(LISP_H) hash.h general.o: $(LISP_H) getloadavg.o: $(LISP_H) msdos.h nt.h sysfile.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 mule-charset.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window.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 gui.o: $(LISP_H) gui.h @@ -148,7 +148,7 @@ offix.o: offix-cursors.h offix-types.h offix.h xintrinsic.h opaque.o: $(LISP_H) opaque.h print.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h conslots.h console-stream.h console-tty.h console.h device.h extents.h frame.h frameslots.h insdel.h lstream.h msdos.h mule-charset.h nt.h scrollbar.h specifier.h sysfile.h syssignal.h systty.h toolbar.h -process-nt.o: $(LISP_H) hash.h lstream.h mule-charset.h process.h procimpl.h +process-nt.o: $(LISP_H) hash.h lstream.h mule-charset.h process.h procimpl.h sysdep.h process-unix.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h hash.h insdel.h lstream.h msdos.h mule-charset.h nt.h opaque.h process.h procimpl.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h process.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h hash.h insdel.h lstream.h msdos.h mule-charset.h nt.h opaque.h process.h procimpl.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h profile.o: $(LISP_H) backtrace.h bytecode.h hash.h syssignal.h systime.h
--- a/src/device-msw.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/device-msw.c Mon Aug 13 10:31:29 2007 +0200 @@ -45,6 +45,16 @@ 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. */ @@ -63,6 +73,10 @@ 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); @@ -104,6 +118,15 @@ wc.hIconSm = LoadImage (GetModuleHandle (NULL), XEMACS_CLASS, 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 } static void @@ -111,7 +134,7 @@ { /* Initialise DDE management library and our related globals */ mswindows_dde_mlid = 0; - DdeInitialize (&mswindows_dde_mlid, mswindows_dde_callback, + DdeInitialize (&mswindows_dde_mlid, (PFNCALLBACK)mswindows_dde_callback, APPCMD_FILTERINITS|CBF_FAIL_SELFCONNECTIONS|CBF_FAIL_ADVISES| CBF_FAIL_POKES|CBF_FAIL_REQUESTS|CBF_SKIP_ALLNOTIFICATIONS, 0);
--- a/src/device-x.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/device-x.c Mon Aug 13 10:31:29 2007 +0200 @@ -276,7 +276,11 @@ char *xdefs, *key; int len; +#ifdef INFODOCK + key = "InfoDock"; +#else key = "XEmacs"; +#endif len = strlen (key); if (!dpy) @@ -370,7 +374,11 @@ { app_class = (NILP (Vx_emacs_application_class) && have_xemacs_resources_in_xrdb (dpy)) +#ifdef INFODOCK + ? "InfoDock" +#else ? "XEmacs" +#endif : "Emacs"; /* need to update Vx_emacs_application_class: */ Vx_emacs_application_class = build_string (app_class);
--- a/src/eldap.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/eldap.c Mon Aug 13 10:31:29 2007 +0200 @@ -31,6 +31,7 @@ #include <config.h> #include "lisp.h" +#include "opaque.h" #include <errno.h> #include <lber.h> @@ -129,19 +130,12 @@ error ("printing unreadable object #<ldap %s>", XSTRING_DATA (ldap->host)); - if (!escapeflag) - { - print_internal (ldap->host, printcharfun, 0); - } - else - { - write_c_string (GETTEXT ("#<ldap "), printcharfun); - print_internal (ldap->host, printcharfun, 1); - write_c_string (" state:",printcharfun); - print_internal (ldap->status_symbol, printcharfun, 1); - sprintf (buf, " 0x%x>", ldap); - write_c_string (buf, printcharfun); - } + write_c_string ("#<ldap ", printcharfun); + print_internal (ldap->host, printcharfun, 1); + write_c_string (" state:",printcharfun); + print_internal (ldap->status_symbol, printcharfun, 1); + sprintf (buf, " 0x%x>", ldap); + write_c_string (buf, printcharfun); } static struct Lisp_LDAP * @@ -227,14 +221,14 @@ struct Lisp_LDAP *lisp_ldap; LDAP *ld; - int ldap_port = 0; + int ldap_port = 0; int ldap_auth = LDAP_AUTH_SIMPLE; char *ldap_binddn = NULL; char *ldap_passwd = NULL; int ldap_deref = LDAP_DEREF_NEVER; int ldap_timelimit = 0; int ldap_sizelimit = 0; - int err; + int err; Lisp_Object ldap, list, keyword, value; struct gcpro gcpro1; @@ -390,6 +384,23 @@ /************************************************************************/ /* Working on a LDAP connection */ /************************************************************************/ +struct ldap_unwind_struct +{ + LDAPMessage *res; + char **vals; +}; + + +static Lisp_Object +ldap_search_unwind (Lisp_Object unwind_obj) +{ + struct ldap_unwind_struct *unwind = + (struct ldap_unwind_struct *) get_opaque_ptr (unwind_obj); + if (unwind->res != (LDAPMessage *)NULL) + ldap_msgfree (unwind->res); + if (unwind->vals != (char **)NULL) + ldap_value_free (unwind->vals); +} DEFUN ("ldap-search-internal", Fldap_search_internal, 2, 6, 0, /* Perform a search on an open LDAP connection. @@ -412,23 +423,27 @@ /* Vars for query */ LDAP *ld; - LDAPMessage *res, *e; + LDAPMessage *e; BerElement *ptr; char *a; int i, rc, err; - - char **vals = NULL; int matches; + struct ldap_unwind_struct unwind; int ldap_scope = LDAP_SCOPE_SUBTREE; char **ldap_attributes = NULL; + int speccount = specpdl_depth (); + Lisp_Object list, entry, result; struct gcpro gcpro1, gcpro2, gcpro3; list = entry = result = Qnil; GCPRO3(list, entry, result); + unwind.res = (LDAPMessage *)NULL; + unwind.vals = (char **)NULL; + /* Do all the parameter checking */ CHECK_LIVE_LDAP (ldap); ld = (XLDAP (ldap))->ld; @@ -463,23 +478,21 @@ /* Attributes to search */ if (!NILP (attrs)) { - Lisp_Object attr_left = attrs; - struct gcpro ngcpro1; - - NGCPRO1 (attr_left); CHECK_CONS (attrs); - - ldap_attributes = alloca ((XINT (Flength (attrs)) + 1)*sizeof (char *)); + ldap_attributes = alloca_array (char *, 1 + XINT (Flength (attrs))); - for (i=0; !NILP (attr_left); i++) { - CHECK_STRING (XCAR (attr_left)); - ldap_attributes[i] = alloca (XSTRING_LENGTH (XCAR (attr_left)) + 1); - strcpy(ldap_attributes[i], - (char *)(XSTRING_DATA( XCAR (attr_left)))); - attr_left = XCDR (attr_left); - } + i = 0; + EXTERNAL_LIST_LOOP (attrs, attrs) + { + Lisp_Object current = XCAR (attrs); + CHECK_STRING (current); + ldap_attributes[i] = + alloca_array (char, 1 + XSTRING_LENGTH (current)); + memcpy (ldap_attributes[i], + XSTRING_DATA (current), XSTRING_LENGTH (current)); + ++i; + } ldap_attributes[i] = NULL; - NUNGCPRO; } /* Attributes only ? */ @@ -498,17 +511,22 @@ signal_ldap_error (ld); } + /* Ensure we don't exit without cleaning up */ + record_unwind_protect (ldap_search_unwind, + make_opaque_ptr (&unwind)); + /* Build the results list */ matches = 0; /* ldap_result calls select() and can get wedged by EINTR signals */ slow_down_interrupts (); - rc = ldap_result (ld, LDAP_RES_ANY, 0, NULL, &res); + rc = ldap_result (ld, LDAP_RES_ANY, 0, NULL, &(unwind.res)); speed_up_interrupts (); while ( rc == LDAP_RES_SEARCH_ENTRY ) { + QUIT; matches ++; - e = ldap_first_entry (ld, res); + e = ldap_first_entry (ld, unwind.res); message ("Parsing results... %d", matches); entry = Qnil; for (a= ldap_first_attribute (ld, e, &ptr); @@ -516,25 +534,27 @@ a= ldap_next_attribute (ld, e, ptr) ) { list = Fcons (build_string (a), Qnil); - vals = ldap_get_values (ld, e, a); - if (vals != NULL) + unwind.vals = ldap_get_values (ld, e, a); + if (unwind.vals != NULL) { - for (i=0; vals[i]!=NULL; i++) + for (i=0; unwind.vals[i]!=NULL; i++) { - list = Fcons (build_string (vals[i]), + list = Fcons (build_string (unwind.vals[i]), list); } } entry = Fcons (Fnreverse (list), entry); - ldap_value_free (vals); + ldap_value_free (unwind.vals); + unwind.vals = (char **)NULL; } result = Fcons (Fnreverse (entry), result); - ldap_msgfree (res); + ldap_msgfree (unwind.res); + unwind.res = (LDAPMessage *)NULL; slow_down_interrupts (); - rc = ldap_result (ld, LDAP_RES_ANY, 0, NULL, &res); + rc = ldap_result (ld, LDAP_RES_ANY, 0, NULL, &(unwind.res)); speed_up_interrupts (); } @@ -543,17 +563,19 @@ signal_ldap_error (ld); } - if ((rc = ldap_result2error (ld, res, 0)) != LDAP_SUCCESS) + if ((rc = ldap_result2error (ld, unwind.res, 0)) != LDAP_SUCCESS) { signal_ldap_error (ld); } - ldap_msgfree (res); + ldap_msgfree (unwind.res); + unwind.res = (LDAPMessage *)NULL; message ("Done."); result = Fnreverse (result); clear_message (); + unbind_to (speccount, Qnil); UNGCPRO; return result; }
--- a/src/emacs.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/emacs.c Mon Aug 13 10:31:29 2007 +0200 @@ -109,6 +109,11 @@ Lisp_Object Vemacs_minor_version; Lisp_Object Vemacs_beta_version; Lisp_Object Vxemacs_codename; +#ifdef INFODOCK +Lisp_Object Vinfodock_major_version; +Lisp_Object Vinfodock_minor_version; +Lisp_Object Vinfodock_build_version; +#endif /* The path under which XEmacs was invoked. */ Lisp_Object Vinvocation_path; @@ -140,7 +145,7 @@ Lisp_Object Vinternal_error_checking; /* The default base directory XEmacs is installed under. */ -Lisp_Object Vconfigure_prefix_directory; +Lisp_Object Vconfigure_exec_prefix_directory, Vconfigure_prefix_directory; /* If nonzero, set XEmacs to run at this priority. This is also used in child_setup and sys_suspend to make sure subshells run at normal @@ -898,6 +903,7 @@ syms_of_frame (); syms_of_general (); syms_of_glyphs (); + syms_of_glyphs_read (); #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) syms_of_gui (); #endif @@ -1143,6 +1149,7 @@ called before the any calls to the other macros. */ image_instantiator_format_create (); + image_instantiator_format_create_glyphs_read (); #ifdef HAVE_X_WINDOWS image_instantiator_format_create_glyphs_x (); #endif /* HAVE_X_WINDOWS */ @@ -1162,7 +1169,7 @@ #ifdef FILE_CODING lstream_type_create_mule_coding (); #endif -#ifdef HAVE_MS_WINDOWS +#if defined (HAVE_MS_WINDOWS) && !defined(HAVE_MSG_SELECT) lstream_type_create_mswindows_selectable (); #endif @@ -1261,6 +1268,7 @@ vars_of_font_lock (); vars_of_frame (); vars_of_glyphs (); + vars_of_glyphs_read (); #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) vars_of_gui (); #endif @@ -2668,6 +2676,23 @@ Vemacs_beta_version = Qnil; #endif +#ifdef INFODOCK + DEFVAR_LISP ("infodock-major-version", &Vinfodock_major_version /* +Major version number of this InfoDock release. +*/ ); + Vinfodock_major_version = make_int (INFODOCK_MAJOR_VERSION); + + DEFVAR_LISP ("infodock-minor-version", &Vinfodock_minor_version /* +Minor version number of this InfoDock release. +*/ ); + Vinfodock_minor_version = make_int (INFODOCK_MINOR_VERSION); + + DEFVAR_LISP ("infodock-build-version", &Vinfodock_build_version /* +Build version of this InfoDock release. +*/ ); + Vinfodock_build_version = make_int (INFODOCK_BUILD_VERSION); +#endif + DEFVAR_LISP ("xemacs-codename", &Vxemacs_codename /* Codename of this version of Emacs (a string). */ ); @@ -2788,7 +2813,7 @@ DEFVAR_LISP ("configure-package-path", &Vconfigure_package_path /* For internal use by the build procedure only. -configure's idea of what PACKAGE-DIRECTORY will be. +configure's idea of what the package path will be. */ ); #ifdef PATH_PACKAGEPATH Vconfigure_package_path = decode_path (PATH_PACKAGEPATH); @@ -2867,6 +2892,17 @@ Vconfigure_doc_directory = Qnil; #endif + DEFVAR_LISP ("configure-exec-prefix-directory", &Vconfigure_exec_prefix_directory /* +For internal use by the build procedure only. +configure's idea of what EXEC-PREFIX-DIRECTORY will be. +*/ ); +#ifdef PATH_EXEC_PREFIX + Vconfigure_exec_prefix_directory = Ffile_name_as_directory + (build_string ((char *) PATH_EXEC_PREFIX)); +#else + Vconfigure_exec_prefix_directory = Qnil; +#endif + DEFVAR_LISP ("configure-prefix-directory", &Vconfigure_prefix_directory /* For internal use by the build procedure only. configure's idea of what PREFIX-DIRECTORY will be.
--- a/src/eval.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/eval.c Mon Aug 13 10:31:29 2007 +0200 @@ -28,10 +28,7 @@ #include <config.h> #include "lisp.h" -#ifndef standalone #include "commands.h" -#endif - #include "backtrace.h" #include "bytecode.h" #include "buffer.h"
--- a/src/event-msw.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/event-msw.c Mon Aug 13 10:31:29 2007 +0200 @@ -52,17 +52,15 @@ #include "sysproc.h" #include "syswait.h" #include "systime.h" +#include "sysdep.h" #include "events-mod.h" +#ifdef HAVE_MSG_SELECT +#include "sysfile.h" +#endif #include <io.h> #include <errno.h> -#ifdef BROKEN_CYGWIN -int WINAPI DdeCmpStringHandles (HSZ, HSZ); -HDDEDATA WINAPI DdeCreateDataHandle (DWORD, LPBYTE, DWORD, DWORD, HSZ, - UINT, UINT); -#endif - #ifdef HAVE_MENUBARS #define ADJR_MENUFLAG TRUE #else @@ -81,6 +79,10 @@ #define DndFiles 3 #define DndText 4 +extern Lisp_Object +mswindows_get_toolbar_button_text (struct frame* f, int command_id); +extern Lisp_Object +mswindows_handle_toolbar_wm_command (struct frame* f, HWND ctrl, WORD id); static Lisp_Object mswindows_find_frame (HWND hwnd); static Lisp_Object mswindows_find_console (HWND hwnd); @@ -92,6 +94,13 @@ static struct event_stream *mswindows_event_stream; +#ifdef HAVE_MSG_SELECT +extern SELECT_TYPE input_wait_mask, non_fake_input_wait_mask; +extern SELECT_TYPE process_only_mask, tty_only_mask; +extern int signal_event_pipe_initialized; +int windows_fd; +#endif + /* * Two separate queues, for efficiency, one (_u_) for user events, and * another (_s_) for non-user ones. We always return events out of the @@ -171,7 +180,7 @@ #define MAX_SLURP_STREAMS 32 struct ntpipe_slurp_stream_shared_data -shared_data_block[MAX_SLURP_STREAMS]={0}; +shared_data_block[MAX_SLURP_STREAMS]={{0}}; struct ntpipe_slurp_stream { @@ -401,6 +410,7 @@ return bytes_read + 1; } } + return 0; } static int @@ -1057,8 +1067,77 @@ while (NILP (mswindows_u_dispatch_event_queue) && NILP (mswindows_s_dispatch_event_queue)) - { - /* Now try getting a message or process event */ + { +#ifdef HAVE_MSG_SELECT + int i; + SELECT_TYPE temp_mask = input_wait_mask; + EMACS_TIME sometime; + EMACS_SELECT_TIME select_time_to_block, *pointer_to_this; + + if (badly_p) + pointer_to_this = 0; + else + { + EMACS_SET_SECS_USECS (sometime, 0, 0); + EMACS_TIME_TO_SELECT_TIME (sometime, select_time_to_block); + pointer_to_this = &select_time_to_block; + } + active = select (MAXDESC, &temp_mask, 0, 0, pointer_to_this); + + if (active == 0) + { + return; /* timeout */ + } + else if (active > 0) + { + if (FD_ISSET (windows_fd, &temp_mask)) + { + mswindows_drain_windows_queue (); + } + + /* Look for a process event */ + for (i = 0; i < MAXDESC-1; i++) + { + if (FD_ISSET (i, &temp_mask)) + { + if (FD_ISSET (i, &process_only_mask)) + { + struct Lisp_Process *p = + get_process_from_usid (FD_TO_USID(i)); + + mswindows_enqueue_process_event (p); + } + else if (FD_ISSET (i, &tty_only_mask)) + { + /* do we care about tty events? Do we + ever get tty events? */ + } + else + { + /* We might get here when a fake event came + through a signal. Return a dummy event, so + that a cycle of the command loop will + occur. */ + drain_signal_event_pipe (); + mswindows_bump_queue(); + } + } + } + } + else if (active==-1) + { + if (errno != EINTR) + { + /* something bad happended */ + assert(0); + } + } + else + { + assert(0); + } +#else + /* Now try getting a message or process event */ active = MsgWaitForMultipleObjects (mswindows_waitable_count, mswindows_waitable_handles, FALSE, badly_p ? INFINITE : 0, @@ -1104,6 +1183,7 @@ mswindows_bump_queue (); } } +#endif } /* while */ } @@ -1516,6 +1596,34 @@ } break; +#ifdef HAVE_TOOLBARS + case WM_NOTIFY: + { + LPTOOLTIPTEXT tttext = (LPTOOLTIPTEXT)lParam; + Lisp_Object btext; + if (tttext->hdr.code == TTN_NEEDTEXT) + { + /* find out which toolbar */ + frame = XFRAME (mswindows_find_frame (hwnd)); + btext = mswindows_get_toolbar_button_text ( frame, + tttext->hdr.idFrom ); + + tttext->lpszText = NULL; + tttext->hinst = NULL; + + if (!NILP(btext)) + { + strncpy (tttext->szText, XSTRING_DATA (btext), 80); + tttext->lpszText=tttext->szText; + } +#if 0 + tttext->uFlags |= TTF_DI_SETITEM; +#endif + } + } + break; +#endif + case WM_PAINT: { PAINTSTRUCT paintStruct; @@ -1726,10 +1834,11 @@ case WM_COMMAND: { WORD id = LOWORD (wParam); + HWND cid = (HWND)lParam; frame = XFRAME (mswindows_find_frame (hwnd)); #ifdef HAVE_TOOLBARS - if (!NILP (mswindows_handle_toolbar_wm_command (frame, id))) + if (!NILP (mswindows_handle_toolbar_wm_command (frame, cid, id))) break; #endif @@ -2331,13 +2440,22 @@ mswindows_event_stream->handle_magic_event_cb = emacs_mswindows_handle_magic_event; mswindows_event_stream->add_timeout_cb = emacs_mswindows_add_timeout; mswindows_event_stream->remove_timeout_cb = emacs_mswindows_remove_timeout; + mswindows_event_stream->quit_p_cb = emacs_mswindows_quit_p; mswindows_event_stream->select_console_cb = emacs_mswindows_select_console; mswindows_event_stream->unselect_console_cb = emacs_mswindows_unselect_console; +#ifdef HAVE_MSG_SELECT + mswindows_event_stream->select_process_cb = + (void (*)(struct Lisp_Process*))event_stream_unixoid_select_process; + mswindows_event_stream->unselect_process_cb = + (void (*)(struct Lisp_Process*))event_stream_unixoid_unselect_process; + mswindows_event_stream->create_stream_pair_cb = event_stream_unixoid_create_stream_pair; + mswindows_event_stream->delete_stream_pair_cb = event_stream_unixoid_delete_stream_pair; +#else mswindows_event_stream->select_process_cb = emacs_mswindows_select_process; mswindows_event_stream->unselect_process_cb = emacs_mswindows_unselect_process; - mswindows_event_stream->quit_p_cb = emacs_mswindows_quit_p; mswindows_event_stream->create_stream_pair_cb = emacs_mswindows_create_stream_pair; mswindows_event_stream->delete_stream_pair_cb = emacs_mswindows_delete_stream_pair; +#endif DEFVAR_BOOL ("mswindows-dynamic-frame-resize", &mswindows_dynamic_frame_resize /* *Controls redrawing frame contents during mouse-drag or keyboard resize @@ -2400,6 +2518,15 @@ void init_event_mswindows_late (void) { +#ifdef HAVE_MSG_SELECT + windows_fd = open("/dev/windows", O_RDONLY | O_NONBLOCK, 0); + assert (windows_fd>=0); + FD_SET (windows_fd, &input_wait_mask); + /* for some reason I get blocks on the signal event pipe, which is + bad... + signal_event_pipe_initialized = 0; */ +#endif + event_stream = mswindows_event_stream; mswindows_dynamic_frame_resize = !GetSystemMetrics (SM_SLOWMACHINE);
--- a/src/event-stream.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/event-stream.c Mon Aug 13 10:31:29 2007 +0200 @@ -5328,7 +5328,7 @@ if (initialized) { #ifdef HAVE_UNIXOID_EVENT_LOOP - if (strcmp (display_use, "mswindows") != 0) + /* if (strcmp (display_use, "mswindows") != 0)*/ init_event_unixoid (); #endif #ifdef HAVE_X_WINDOWS
--- a/src/event-unixoid.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/event-unixoid.c Mon Aug 13 10:31:29 2007 +0200 @@ -70,7 +70,7 @@ through a signal (e.g. window-change or C-g on controlling TTY). */ int signal_event_pipe[2]; -static int signal_event_pipe_initialized; +int signal_event_pipe_initialized; int fake_event_occurred;
--- a/src/fileio.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/fileio.c Mon Aug 13 10:31:29 2007 +0200 @@ -111,7 +111,7 @@ Lisp_Object Qfile_name_handler_alist; -Lisp_Object Vdirectory_sep_char; +Lisp_Object Vpath_separator; /* These variables describe handlers that have "already" had a chance to handle the current operation. @@ -655,10 +655,9 @@ The Emacs process number forms part of the result, so there is no danger of generating a name being used by another process. -In its current implementation, this function guarantees 262144 unique -names per process per PREFIX (this is 54872 on case-insensitive -filesystems. However, if you want it to operate safely, PREFIX should -have been passed through `expand-file-name'. +In addition, this function makes an attempt to choose a name which +has no existing file. To make this work, PREFIX should be an +absolute file name. */ (prefix)) { @@ -700,10 +699,10 @@ memcpy (data, XSTRING_DATA (prefix), len); p = data + len; - /* `val' is created by adding 6 characters to PREFIX. The first - three are the PID of this process, in base 64, and the second - three are incremented if the file already exists. This ensures - 262144 unique file names per PID per PREFIX. */ + /* VAL is created by adding 6 characters to PREFIX. The first three + are the PID of this process, in base 64, and the second three are + incremented if the file already exists. This ensures 262144 + unique file names per PID per PREFIX. */ pid = (unsigned)getpid (); *p++ = tbl[pid & 63], pid >>= 6; @@ -729,7 +728,7 @@ p[1] = tbl[num & 63], num >>= 6; p[2] = tbl[num & 63], num >>= 6; - if (stat ((const char *) data, &ignored) < 0) + if (stat ((CONST char *) data, &ignored) < 0) { /* We want to return only if errno is ENOENT. */ if (errno == ENOENT) @@ -4294,12 +4293,10 @@ */ ); disable_auto_save_when_buffer_shrinks = 1; - DEFVAR_LISP ("directory-sep-char", &Vdirectory_sep_char /* - *Directory separator character for built-in functions that return file names. -The value should be either ?/ or ?\\ (any other value is treated as ?\\). -This variable affects the built-in functions only on Windows, -on other platforms, it is initialized so that Lisp code can find out -what the normal separator is. + DEFVAR_LISP ("path-separator", &Vpath_separator /* + *Directory separator string for built-in functions that return file names. +The value should be either \"/\" or \"\\\". */ ); - Vdirectory_sep_char = make_char(DIRECTORY_SEP); + Vpath_separator = build_string("X"); + (XSTRING_DATA (Vpath_separator))[0] = DIRECTORY_SEP; }
--- a/src/fns.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/fns.c Mon Aug 13 10:31:29 2007 +0200 @@ -39,6 +39,7 @@ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif +#include <errno.h> #include "buffer.h" #include "bytecode.h" @@ -3322,33 +3323,40 @@ /* #### this function doesn't belong in this file! */ -DEFUN ("load-average", Fload_average, 0, 0, 0, /* +DEFUN ("load-average", Fload_average, 0, 1, 0, /* Return list of 1 minute, 5 minute and 15 minute load averages. Each of the three load averages is multiplied by 100, then converted to integer. +When USE-FLOATS is non-nil, floats will be used instead of integers. +These floats are not multiplied by 100. + 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 won't work due to permissions on /dev/kmem, in which case you can't use this. */ - ()) + (use_floats)) { double load_ave[3]; int loads = getloadavg (load_ave, countof (load_ave)); + Lisp_Object ret = Qnil; if (loads == -2) - error ("load-average not implemented for this operating system."); + error ("load-average not implemented for this operating system"); else if (loads < 0) - error ("could not get load-average; check permissions."); - - { - Lisp_Object ret = Qnil; - while (loads > 0) - ret = Fcons (make_int ((int) (load_ave[--loads] * 100.0)), ret); - return ret; - } + signal_simple_error ("Could not get load-average", + lisp_strerror (errno)); + + while (loads-- > 0) + { + Lisp_Object load = (NILP (use_floats) ? + make_int ((int) (100.0 * load_ave[loads])) + : make_float (load_ave[loads])); + ret = Fcons (load, ret); + } + return ret; }
--- a/src/frame-msw.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/frame-msw.c Mon Aug 13 10:31:29 2007 +0200 @@ -78,7 +78,6 @@ static void mswindows_init_frame_1 (struct frame *f, Lisp_Object props) { - Lisp_Object device = FRAME_DEVICE (f); Lisp_Object initially_unmapped; Lisp_Object name, height, width, popup, top, left; Lisp_Object frame_obj = Qnil; @@ -184,7 +183,7 @@ hwnd = CreateWindowEx (exstyle, XEMACS_CLASS, STRINGP(f->name) ? XSTRING_DATA(f->name) : - (STRINGP(name) ? XSTRING_DATA(name) : XEMACS_CLASS), + (STRINGP(name) ? XSTRING_DATA(name) : XEMACS_CLASS), style, rect_default.left, rect_default.top, rect_default.width, rect_default.height,
--- a/src/frame-x.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/frame-x.c Mon Aug 13 10:31:29 2007 +0200 @@ -2499,8 +2499,7 @@ XtUnrealizeWidget() here. Xt can really suck. */ if (f->being_deleted) XtUnrealizeWidget (w); - if (NILP (popup)) - XtDestroyWidget (w); + XtDestroyWidget (w); x_error_occurred_p (dpy); } #else
--- a/src/getloadavg.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/getloadavg.c Mon Aug 13 10:31:29 2007 +0200 @@ -503,6 +503,10 @@ static kvm_t *kd; #endif /* SUNOS_5 */ +#ifndef countof +# define countof(x) (sizeof (x) / sizeof (*(x))) +#endif + #endif /* LOAD_AVE_TYPE */ /* Put the 1 minute, 5 minute and 15 minute load averages @@ -520,44 +524,53 @@ /* 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; - elem = -1; + elem = -2; #endif -#ifdef XEMACS #if ! defined (LDAV_DONE) && defined (HAVE_KSTAT_H) && defined (HAVE_LIBKSTAT) #define LDAV_DONE +/* getloadavg is best implemented using kstat (kernel stats), on + systems (like SunOS5) that support it, since you don't need special + privileges to use it. -/* getloadavg is best implemented using kstat (kernel stats), - on systems (like SunOS5) that support it, - since you don't have to be superusers to use it. - Thanks to Zlatko Calusic <zcalusic@srce.hr>. - Integrated to XEmacs by Hrvoje Niksic <hniksic@srce.hr>. */ - static kstat_ctl_t *kc; - static kstat_t *ksp; - static kstat_named_t *buf; + Initial implementation courtesy Zlatko Calusic <zcalusic@carnet.hr>. + Integrated to XEmacs by Hrvoje Niksic <hniksic@srce.hr>. + Additional cleanup by Hrvoje Niksic, based on code published by + Casper Dik <Casper.Dik@Holland.Sun.Com>. */ + kstat_ctl_t *kc; + kstat_t *ksp; + static char *avestrings[] = { "avenrun_1min", + "avenrun_5min", + "avenrun_15min" }; - if (!getloadavg_initialized) + if (nelem > countof (avestrings)) + nelem = countof (avestrings); + + kc = kstat_open(); + if (!kc) + return -1; + ksp = kstat_lookup (kc, "unix", 0, "system_misc"); + if (!ksp) { - kc = kstat_open(); - if (!kc) - return -1; - getloadavg_initialized = 1; + kstat_close (kc); + return -1; } - ksp = kstat_lookup(kc, "unix", 0, "system_misc"); - if (!ksp) + if (kstat_read (kc, ksp, 0) < 0) + { + kstat_close (kc); return -1; - if (kstat_read(kc, ksp, ksp->ks_data) < 0) - return -1; - buf = (kstat_named_t *) malloc (ksp->ks_data_size); - if (!buf) - return -1; - memcpy(buf, ksp->ks_data, ksp->ks_data_size); - if (nelem > 3) - nelem = 3; + } for (elem = 0; elem < nelem; elem++) - loadavg[elem] = (buf + 6 + elem)->value.ul / 256.0; - free(buf); - + { + kstat_named_t *kn = kstat_data_lookup (ksp, avestrings[elem]); + if (!kn) + { + kstat_close (kc); + return -1; + } + loadavg[elem] = (double)kn->value.ul/FSCALE; + } + kstat_close (kc); #endif /* HAVE_KSTAT_H && HAVE_LIBKSTAT */ #if !defined (LDAV_DONE) && defined (HAVE_SYS_PSTAT_H) @@ -579,8 +592,6 @@ loadavg[elem++] = procinfo.psd_avg_15_min; #endif /* HPUX */ -#endif /* XEMACS */ - #if !defined (LDAV_DONE) && defined (__linux__) #define LDAV_DONE #undef LOAD_AVE_TYPE @@ -608,9 +619,6 @@ for (elem = 0; elem < nelem && elem < count; elem++) loadavg[elem] = load_ave[elem]; - - return elem; - #endif /* __linux__ */ #if !defined (LDAV_DONE) && defined (__NetBSD__) @@ -637,9 +645,6 @@ for (elem = 0; elem < nelem; elem++) loadavg[elem] = (double) load_ave[elem] / (double) scale; - - return elem; - #endif /* __NetBSD__ */ #if !defined (LDAV_DONE) && defined (NeXT) @@ -944,7 +949,7 @@ /* 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 -1; + return -2; #endif }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/glyphs-eimage.c Mon Aug 13 10:31:29 2007 +0200 @@ -0,0 +1,1332 @@ +/* EImage-specific Lisp objects. + Copyright (C) 1993, 1994, 1998 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 + +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. */ + +/* Original author: Jamie Zawinski for 19.8 + font-truename stuff added by Jamie Zawinski for 19.10 + subwindow support added by Chuck Thompson + additional XPM support added by Chuck Thompson + initial X-Face support added by Stig + rewritten/restructured by Ben Wing for 19.12/19.13 + GIF/JPEG support added by Ben Wing for 19.14 + PNG support added by Bill Perry for 19.14 + Improved GIF/JPEG support added by Bill Perry for 19.14 + Cleanup/simplification of error handling by Ben Wing for 19.14 + Pointer/icon overhaul, more restructuring by Ben Wing for 19.14 + GIF support changed to external GIFlib 3.1 by Jareth Hein for 21.0 + Many changes for color work and optimizations by Jareth Hein for 21.0 + Switch of GIF/JPEG/PNG to new EImage intermediate code by Jareth Hein for 21.0 + TIFF code by Jareth Hein for 21.0 + Generalization for ms-windows by Andy Piper for 21.0 + TODO: + Convert images.el to C and stick it in here? + */ + +#include <config.h> +#include "lisp.h" +#include "lstream.h" +#include "console.h" +#include "device.h" +#include "glyphs.h" +#include "objects.h" + +#include "buffer.h" +#include "frame.h" +#include "insdel.h" +#include "opaque.h" + +#include "imgproc.h" +#include "sysfile.h" + +#ifdef HAVE_PNG +#ifdef __cplusplus +extern "C" { +#endif +#include <png.h> +#ifdef __cplusplus +} +#endif +#else +#include <setjmp.h> +#endif +#ifdef FILE_CODING +#include "file-coding.h" +#endif + +#if INTBITS == 32 +# define FOUR_BYTE_TYPE unsigned int +#elif LONGBITS == 32 +# define FOUR_BYTE_TYPE unsigned long +#elif SHORTBITS == 32 +# define FOUR_BYTE_TYPE unsigned short +#else +#error What kind of strange-ass system are we running on? +#endif + +#ifdef HAVE_TIFF +DEFINE_IMAGE_INSTANTIATOR_FORMAT (tiff); +Lisp_Object Qtiff; +#endif + +#ifdef HAVE_JPEG +DEFINE_IMAGE_INSTANTIATOR_FORMAT (jpeg); +Lisp_Object Qjpeg; +#endif + +#ifdef HAVE_GIF +DEFINE_IMAGE_INSTANTIATOR_FORMAT (gif); +Lisp_Object Qgif; +#endif + +#ifdef HAVE_PNG +DEFINE_IMAGE_INSTANTIATOR_FORMAT (png); +Lisp_Object Qpng; +#endif + + +#ifdef HAVE_JPEG + +/********************************************************************** + * JPEG * + **********************************************************************/ + +#ifdef __cplusplus +extern "C" { +#endif +#include <jpeglib.h> +#include <jerror.h> +#ifdef __cplusplus +} +#endif + +/*#define USE_TEMP_FILES_FOR_JPEG_IMAGES 1*/ +static void +jpeg_validate (Lisp_Object instantiator) +{ + file_or_data_must_be_present (instantiator); +} + +static Lisp_Object +jpeg_normalize (Lisp_Object inst, Lisp_Object console_type) +{ + return simple_image_type_normalize (inst, console_type, Qjpeg); +} + +static int +jpeg_possible_dest_types (void) +{ + return IMAGE_COLOR_PIXMAP_MASK; +} + +/* To survive the otherwise baffling complexity of making sure + everything gets cleaned up in the presence of an error, we + use an unwind_protect(). */ + +struct jpeg_unwind_data +{ + /* Stream that we need to close */ + FILE *instream; + /* Object that holds state info for JPEG decoding */ + struct jpeg_decompress_struct *cinfo_ptr; + /* EImage data */ + unsigned char *eimage; +}; + +static Lisp_Object +jpeg_instantiate_unwind (Lisp_Object unwind_obj) +{ + struct jpeg_unwind_data *data = + (struct jpeg_unwind_data *) get_opaque_ptr (unwind_obj); + + free_opaque_ptr (unwind_obj); + if (data->cinfo_ptr) + jpeg_destroy_decompress (data->cinfo_ptr); + + if (data->instream) + fclose (data->instream); + + if (data->eimage) xfree (data->eimage); + + return Qnil; +} + +/* + * ERROR HANDLING: + * + * The JPEG library's standard error handler (jerror.c) is divided into + * several "methods" which you can override individually. This lets you + * adjust the behavior without duplicating a lot of code, which you might + * have to update with each future release. + * + * Our example here shows how to override the "error_exit" method so that + * control is returned to the library's caller when a fatal error occurs, + * rather than calling exit() as the standard error_exit method does. + * + * We use C's setjmp/longjmp facility to return control. This means that the + * routine which calls the JPEG library must first execute a setjmp() call to + * establish the return point. We want the replacement error_exit to do a + * longjmp(). But we need to make the setjmp buffer accessible to the + * error_exit routine. To do this, we make a private extension of the + * standard JPEG error handler object. (If we were using C++, we'd say we + * were making a subclass of the regular error handler.) + * + * Here's the extended error handler struct: + */ + +struct my_jpeg_error_mgr +{ + struct jpeg_error_mgr pub; /* "public" fields */ + jmp_buf setjmp_buffer; /* for return to caller */ +}; + +#if defined(JPEG_LIB_VERSION) && (JPEG_LIB_VERSION >= 61) +METHODDEF(void) +#else +METHODDEF void +#endif +our_init_source (j_decompress_ptr cinfo) +{ +} + +#if defined(JPEG_LIB_VERSION) && (JPEG_LIB_VERSION >= 61) +METHODDEF(boolean) +#else +METHODDEF boolean +#endif +our_fill_input_buffer (j_decompress_ptr cinfo) +{ + /* Insert a fake EOI marker */ + struct jpeg_source_mgr *src = cinfo->src; + static JOCTET buffer[2]; + + buffer[0] = (JOCTET) 0xFF; + buffer[1] = (JOCTET) JPEG_EOI; + + src->next_input_byte = buffer; + src->bytes_in_buffer = 2; + return TRUE; +} + +#if defined(JPEG_LIB_VERSION) && (JPEG_LIB_VERSION >= 61) +METHODDEF(void) +#else +METHODDEF void +#endif +our_skip_input_data (j_decompress_ptr cinfo, long num_bytes) +{ + struct jpeg_source_mgr *src = NULL; + + src = (struct jpeg_source_mgr *) cinfo->src; + + if (!src) + { + return; + } else if (num_bytes > src->bytes_in_buffer) + { + ERREXIT(cinfo, JERR_INPUT_EOF); + /*NOTREACHED*/ + } + + src->bytes_in_buffer -= num_bytes; + src->next_input_byte += num_bytes; +} + +#if defined(JPEG_LIB_VERSION) && (JPEG_LIB_VERSION >= 61) +METHODDEF(void) +#else +METHODDEF void +#endif +our_term_source (j_decompress_ptr cinfo) +{ +} + +typedef struct +{ + struct jpeg_source_mgr pub; +} our_jpeg_source_mgr; + +static void +jpeg_memory_src (j_decompress_ptr cinfo, JOCTET *data, unsigned int len) +{ + struct jpeg_source_mgr *src; + + if (cinfo->src == NULL) + { /* first time for this JPEG object? */ + cinfo->src = (struct jpeg_source_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + sizeof(our_jpeg_source_mgr)); + src = (struct jpeg_source_mgr *) cinfo->src; + src->next_input_byte = data; + } + src = (struct jpeg_source_mgr *) cinfo->src; + src->init_source = our_init_source; + src->fill_input_buffer = our_fill_input_buffer; + src->skip_input_data = our_skip_input_data; + src->resync_to_restart = jpeg_resync_to_restart; /* use default method */ + src->term_source = our_term_source; + src->bytes_in_buffer = len; + src->next_input_byte = data; +} + +#if defined(JPEG_LIB_VERSION) && (JPEG_LIB_VERSION >= 61) +METHODDEF(void) +#else +METHODDEF void +#endif +my_jpeg_error_exit (j_common_ptr cinfo) +{ + /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ + struct my_jpeg_error_mgr *myerr = (struct my_jpeg_error_mgr *) cinfo->err; + + /* Return control to the setjmp point */ + longjmp (myerr->setjmp_buffer, 1); +} + +#if defined(JPEG_LIB_VERSION) && (JPEG_LIB_VERSION >= 61) +METHODDEF(void) +#else +METHODDEF void +#endif +my_jpeg_output_message (j_common_ptr cinfo) +{ + char buffer[JMSG_LENGTH_MAX]; + + /* Create the message */ + (*cinfo->err->format_message) (cinfo, buffer); + warn_when_safe (Qjpeg, Qinfo, "%s", buffer); +} + +/* The code in this routine is based on example.c from the JPEG library + source code and from gif_instantiate() */ +static void +jpeg_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + /* It is OK for the unwind data to be local to this function, + because the unwind-protect is always executed when this + stack frame is still valid. */ + struct jpeg_unwind_data unwind; + int speccount = specpdl_depth (); + + /* This struct contains the JPEG decompression parameters and pointers to + * working space (which is allocated as needed by the JPEG library). + */ + struct jpeg_decompress_struct cinfo; + /* We use our private extension JPEG error handler. + * Note that this struct must live as long as the main JPEG parameter + * struct, to avoid dangling-pointer problems. + */ + struct my_jpeg_error_mgr jerr; + + /* Step -1: First record our unwind-protect, which will clean up after + any exit, normal or not */ + + xzero (unwind); + record_unwind_protect (jpeg_instantiate_unwind, make_opaque_ptr (&unwind)); + + /* Step 1: allocate and initialize JPEG decompression object */ + + /* We set up the normal JPEG error routines, then override error_exit. */ + cinfo.err = jpeg_std_error (&jerr.pub); + jerr.pub.error_exit = my_jpeg_error_exit; + jerr.pub.output_message = my_jpeg_output_message; + + /* Establish the setjmp return context for my_error_exit to use. */ + if (setjmp (jerr.setjmp_buffer)) + { + /* If we get here, the JPEG code has signaled an error. + * We need to clean up the JPEG object, close the input file, and return. + */ + + { + Lisp_Object errstring; + char buffer[JMSG_LENGTH_MAX]; + + /* Create the message */ + (*cinfo.err->format_message) ((j_common_ptr) &cinfo, buffer); + errstring = build_string (buffer); + + signal_image_error_2 ("JPEG decoding error", + errstring, instantiator); + } + } + + /* Now we can initialize the JPEG decompression object. */ + jpeg_create_decompress (&cinfo); + unwind.cinfo_ptr = &cinfo; + + /* Step 2: specify data source (eg, a file) */ + + { + Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); + CONST Extbyte *bytes; + Extcount len; + + /* #### This is a definite problem under Mule due to the amount of + stack data it might allocate. Need to be able to convert and + write out to a file. */ + GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len); + jpeg_memory_src (&cinfo, (JOCTET *) bytes, len); + } + + /* Step 3: read file parameters with jpeg_read_header() */ + + jpeg_read_header (&cinfo, TRUE); + /* We can ignore the return value from jpeg_read_header since + * (a) suspension is not possible with the stdio data source, and + * (b) we passed TRUE to reject a tables-only JPEG file as an error. + * See libjpeg.doc for more info. + */ + + { + /* Step 4: set parameters for decompression. */ + + /* Now that we're using EImages, use the default of all data in 24bit color. + The backend routine will take care of any necessary reductions. */ + + /* Step 5: Start decompressor */ + jpeg_start_decompress (&cinfo); + + /* Step 6: Read in the data and put into EImage format (8bit RGB triples)*/ + + unwind.eimage = (unsigned char*) xmalloc (cinfo.output_width * cinfo.output_height * 3); + if (!unwind.eimage) + signal_image_error("Unable to allocate enough memory for image", instantiator); + + { + JSAMPARRAY row_buffer; /* Output row buffer */ + JSAMPLE *jp; + int row_stride; /* physical row width in output buffer */ + unsigned char *op = unwind.eimage; + + /* We may need to do some setup of our own at this point before reading + * the data. After jpeg_start_decompress() we have the correct scaled + * output image dimensions available + * We need to make an output work buffer of the right size. + */ + /* JSAMPLEs per row in output buffer. */ + row_stride = cinfo.output_width * cinfo.output_components; + /* Make a one-row-high sample array that will go away when done + with image */ + row_buffer = ((*cinfo.mem->alloc_sarray) + ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1)); + + /* Here we use the library's state variable cinfo.output_scanline as the + * loop counter, so that we don't have to keep track ourselves. + */ + while (cinfo.output_scanline < cinfo.output_height) + { + int i; + + /* jpeg_read_scanlines expects an array of pointers to scanlines. + * Here the array is only one element long, but you could ask for + * more than one scanline at a time if that's more convenient. + */ + (void) jpeg_read_scanlines (&cinfo, row_buffer, 1); + jp = row_buffer[0]; + for (i = 0; i < cinfo.output_width; i++) + { + int clr; +#if (BITS_IN_JSAMPLE == 8) + for (clr = 0; clr < 3; clr++) + *op++ = (unsigned char)*jp++; +#else /* other option is 12 */ + for (clr = 0; clr < 3; clr++) + *op++ = (unsigned char)(*jp++ >> 4); +#endif + } + } + } + } + + /* Step 6.5: Create the pixmap and set up the image instance */ + /* now instantiate */ + MAYBE_DEVMETH (XDEVICE (ii->device), + init_image_instance_from_eimage, + (ii, cinfo.output_width, cinfo.output_height, + unwind.eimage, dest_mask, + instantiator, domain)); + + /* Step 7: Finish decompression */ + + jpeg_finish_decompress (&cinfo); + /* We can ignore the return value since suspension is not possible + * with the stdio data source. + */ + + /* And we're done! */ + /* This will clean up everything else. */ + unbind_to (speccount, Qnil); +} + +#endif /* HAVE_JPEG */ + +#ifdef HAVE_GIF +/********************************************************************** + * GIF * + **********************************************************************/ + +#include <gif_lib.h> + +static void +gif_validate (Lisp_Object instantiator) +{ + file_or_data_must_be_present (instantiator); +} + +static Lisp_Object +gif_normalize (Lisp_Object inst, Lisp_Object console_type) +{ + return simple_image_type_normalize (inst, console_type, Qgif); +} + +static int +gif_possible_dest_types (void) +{ + return IMAGE_COLOR_PIXMAP_MASK; +} + +/* To survive the otherwise baffling complexity of making sure + everything gets cleaned up in the presence of an error, we + use an unwind_protect(). */ + +struct gif_unwind_data +{ + unsigned char *eimage; + /* Object that holds the decoded data from a GIF file */ + GifFileType *giffile; +}; + +static Lisp_Object +gif_instantiate_unwind (Lisp_Object unwind_obj) +{ + struct gif_unwind_data *data = + (struct gif_unwind_data *) get_opaque_ptr (unwind_obj); + + free_opaque_ptr (unwind_obj); + if (data->giffile) + { + DGifCloseFile (data->giffile); + GifFree(data->giffile); + } + if (data->eimage) xfree(data->eimage); + + return Qnil; +} + +typedef struct gif_memory_storage +{ + Extbyte *bytes; /* The data */ + Extcount len; /* How big is it? */ + int index; /* Where are we? */ +} gif_memory_storage; + +static size_t +gif_read_from_memory(GifByteType *buf, size_t size, VoidPtr data) +{ + gif_memory_storage *mem = (gif_memory_storage*)data; + + if (size > (mem->len - mem->index)) + return -1; + memcpy(buf, mem->bytes + mem->index, size); + mem->index = mem->index + size; + return size; +} + +static int +gif_memory_close(VoidPtr data) +{ + return 0; +} + +struct gif_error_struct +{ + CONST char *err_str; /* return the error string */ + jmp_buf setjmp_buffer; /* for return to caller */ +}; + +static void +gif_error_func(CONST char *err_str, VoidPtr error_ptr) +{ + struct gif_error_struct *error_data = (struct gif_error_struct*)error_ptr; + + /* return to setjmp point */ + error_data->err_str = err_str; + longjmp (error_data->setjmp_buffer, 1); +} + +static void +gif_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + /* It is OK for the unwind data to be local to this function, + because the unwind-protect is always executed when this + stack frame is still valid. */ + struct gif_unwind_data unwind; + int speccount = specpdl_depth (); + gif_memory_storage mem_struct; + struct gif_error_struct gif_err; + Extbyte *bytes; + Extcount len; + int height = 0; + int width = 0; + + xzero (unwind); + record_unwind_protect (gif_instantiate_unwind, make_opaque_ptr (&unwind)); + + /* 1. Now decode the data. */ + + { + Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); + + assert (!NILP (data)); + + if (!(unwind.giffile = GifSetup())) + signal_image_error ("Insufficent memory to instantiate GIF image", instantiator); + + /* set up error facilities */ + if (setjmp(gif_err.setjmp_buffer)) + { + /* An error was signaled. No clean up is needed, as unwind handles that + for us. Just pass the error along. */ + Lisp_Object errstring; + errstring = build_string (gif_err.err_str); + signal_image_error_2 ("GIF decoding error", errstring, instantiator); + } + GifSetErrorFunc(unwind.giffile, (Gif_error_func)gif_error_func, (VoidPtr)&gif_err); + + GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len); + mem_struct.bytes = bytes; + mem_struct.len = len; + mem_struct.index = 0; + GifSetReadFunc(unwind.giffile, gif_read_from_memory, (VoidPtr)&mem_struct); + GifSetCloseFunc(unwind.giffile, gif_memory_close, (VoidPtr)&mem_struct); + DGifInitRead(unwind.giffile); + + /* Then slurp the image into memory, decoding along the way. + The result is the image in a simple one-byte-per-pixel + format (#### the GIF routines only support 8-bit GIFs, + it appears). */ + DGifSlurp (unwind.giffile); + } + + /* 3. Now create the EImage */ + { + ColorMapObject *cmo = unwind.giffile->SColorMap; + int i, j, row, pass, interlace; + unsigned char *eip; + /* interlaced gifs have rows in this order: + 0, 8, 16, ..., 4, 12, 20, ..., 2, 6, 10, ..., 1, 3, 5, ... */ + static int InterlacedOffset[] = { 0, 4, 2, 1 }; + static int InterlacedJumps[] = { 8, 8, 4, 2 }; + + height = unwind.giffile->SHeight; + width = unwind.giffile->SWidth; + unwind.eimage = (unsigned char*) xmalloc (width * height * 3); + if (!unwind.eimage) + signal_image_error("Unable to allocate enough memory for image", instantiator); + + /* write the data in EImage format (8bit RGB triples) */ + + /* Note: We just use the first image in the file and ignore the rest. + We check here that that image covers the full "screen" size. + I don't know whether that's always the case. + -dkindred@cs.cmu.edu */ + if (unwind.giffile->SavedImages[0].ImageDesc.Height != height + || unwind.giffile->SavedImages[0].ImageDesc.Width != width + || unwind.giffile->SavedImages[0].ImageDesc.Left != 0 + || unwind.giffile->SavedImages[0].ImageDesc.Top != 0) + signal_image_error ("First image in GIF file is not full size", + instantiator); + + interlace = unwind.giffile->SavedImages[0].ImageDesc.Interlace; + pass = 0; + row = interlace ? InterlacedOffset[pass] : 0; + eip = unwind.eimage; + for (i = 0; i < height; i++) + { + if (interlace && row >= height) + row = InterlacedOffset[++pass]; + eip = unwind.eimage + (row * width * 3); + for (j = 0; j < width; j++) + { + unsigned char pixel = unwind.giffile->SavedImages[0].RasterBits[(i * width) + j]; + *eip++ = cmo->Colors[pixel].Red; + *eip++ = cmo->Colors[pixel].Green; + *eip++ = cmo->Colors[pixel].Blue; + } + row += interlace ? InterlacedJumps[pass] : 1; + } + } + /* now instantiate */ + MAYBE_DEVMETH (XDEVICE (ii->device), + init_image_instance_from_eimage, + (ii, width, height, unwind.eimage, dest_mask, + instantiator, domain)); + + unbind_to (speccount, Qnil); +} + +#endif /* HAVE_GIF */ + + +#ifdef HAVE_PNG + +/********************************************************************** + * PNG * + **********************************************************************/ +static void +png_validate (Lisp_Object instantiator) +{ + file_or_data_must_be_present (instantiator); +} + +static Lisp_Object +png_normalize (Lisp_Object inst, Lisp_Object console_type) +{ + return simple_image_type_normalize (inst, console_type, Qpng); +} + +static int +png_possible_dest_types (void) +{ + return IMAGE_COLOR_PIXMAP_MASK; +} + +struct png_memory_storage +{ + CONST Extbyte *bytes; /* The data */ + Extcount len; /* How big is it? */ + int index; /* Where are we? */ +}; + +static void +png_read_from_memory(png_structp png_ptr, png_bytep data, + png_size_t length) +{ + struct png_memory_storage *tbr = + (struct png_memory_storage *) png_get_io_ptr (png_ptr); + + if (length > (tbr->len - tbr->index)) + png_error (png_ptr, (png_const_charp) "Read Error"); + memcpy (data,tbr->bytes + tbr->index,length); + tbr->index = tbr->index + length; +} + +struct png_error_struct +{ + CONST char *err_str; + jmp_buf setjmp_buffer; /* for return to caller */ +}; + +/* jh 98/03/12 - #### AARRRGH! libpng includes jmp_buf inside its own + structure, and there are cases where the size can be different from + between inside the libarary, and inside the code! To do an end run + around this, use our own error functions, and don't rely on things + passed in the png_ptr to them. This is an ugly hack and must + go away when the lisp engine is threaded! */ +static struct png_error_struct png_err_stct; + +static void +png_error_func (png_structp png_ptr, png_const_charp msg) +{ + png_err_stct.err_str = msg; + longjmp (png_err_stct.setjmp_buffer, 1); +} + +static void +png_warning_func (png_structp png_ptr, png_const_charp msg) +{ + warn_when_safe (Qpng, Qinfo, "%s", msg); +} + +struct png_unwind_data +{ + FILE *instream; + unsigned char *eimage; + png_structp png_ptr; + png_infop info_ptr; +}; + +static Lisp_Object +png_instantiate_unwind (Lisp_Object unwind_obj) +{ + struct png_unwind_data *data = + (struct png_unwind_data *) get_opaque_ptr (unwind_obj); + + free_opaque_ptr (unwind_obj); + if (data->png_ptr) + png_destroy_read_struct (&(data->png_ptr), &(data->info_ptr), (png_infopp)NULL); + if (data->instream) + fclose (data->instream); + + return Qnil; +} + +static void +png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + struct png_unwind_data unwind; + int speccount = specpdl_depth (); + int height, width; + + /* PNG variables */ + png_structp png_ptr; + png_infop info_ptr; + + /* Initialize all PNG structures */ + png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, (void*)&png_err_stct, + png_error_func, png_warning_func); + if (!png_ptr) + signal_image_error ("Error obtaining memory for png_read", instantiator); + info_ptr = png_create_info_struct (png_ptr); + if (!info_ptr) + { + png_destroy_read_struct (&png_ptr, (png_infopp)NULL, (png_infopp)NULL); + signal_image_error ("Error obtaining memory for png_read", instantiator); + } + + xzero (unwind); + unwind.png_ptr = png_ptr; + unwind.info_ptr = info_ptr; + + record_unwind_protect (png_instantiate_unwind, make_opaque_ptr (&unwind)); + + /* This code is a mixture of stuff from Ben's GIF/JPEG stuff from + this file, example.c from the libpng 0.81 distribution, and the + pngtopnm sources. -WMP- + */ + /* It has been further modified to handle the API changes for 0.96, + and is no longer usable for previous versions. jh + */ + + /* Set the jmp_buf reurn context for png_error ... if this returns !0, then + we ran into a problem somewhere, and need to clean up after ourselves. */ + if (setjmp (png_err_stct.setjmp_buffer)) + { + /* Something blew up: just display the error (cleanup happens in the unwind) */ + signal_image_error_2 ("Error decoding PNG", + build_string(png_err_stct.err_str), + instantiator); + } + + /* Initialize the IO layer and read in header information */ + { + Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); + CONST Extbyte *bytes; + Extcount len; + struct png_memory_storage tbr; /* Data to be read */ + + assert (!NILP (data)); + + /* #### This is a definite problem under Mule due to the amount of + stack data it might allocate. Need to think about using Lstreams */ + GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len); + tbr.bytes = bytes; + tbr.len = len; + tbr.index = 0; + png_set_read_fn (png_ptr,(void *) &tbr, png_read_from_memory); + } + + png_read_info (png_ptr, info_ptr); + + { + int y; + unsigned char **row_pointers; + height = info_ptr->height; + width = info_ptr->width; + + /* Wow, allocate all the memory. Truly, exciting. */ + unwind.eimage = xnew_array_and_zero (unsigned char, width * height * 3); + /* libpng expects that the image buffer passed in contains a + picture to draw on top of if the png has any transparencies. + This could be a good place to pass that in... */ + + row_pointers = xnew_array (png_byte *, height); + + for (y = 0; y < height; y++) + row_pointers[y] = unwind.eimage + (width * 3 * y); + + /* Now that we're using EImage, ask for 8bit RGB triples for any type + of image*/ + /* convert palatte images to full RGB */ + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + png_set_expand (png_ptr); + /* send grayscale images to RGB too */ + if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY || + info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb (png_ptr); + /* we can't handle alpha values */ + if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) + png_set_strip_alpha (png_ptr); + /* rip out any transparancy layers/colors */ + if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) + { + png_set_expand (png_ptr); + png_set_strip_alpha (png_ptr); + } + /* tell libpng to strip 16 bit depth files down to 8 bits */ + if (info_ptr->bit_depth == 16) + png_set_strip_16 (png_ptr); + /* if the image is < 8 bits, pad it out */ + if (info_ptr->bit_depth < 8) + { + if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY) + png_set_expand (png_ptr); + else + png_set_packing (png_ptr); + } + +#if 1 /* tests? or permanent? */ + { + /* if the png specifies a background chunk, go ahead and + use it */ + png_color_16 my_background, *image_background; + + /* ### how do I get the background of the current frame? */ + my_background.red = 0x7fff; + my_background.green = 0x7fff; + my_background.blue = 0x7fff; + + if (png_get_bKGD (png_ptr, info_ptr, &image_background)) + png_set_background (png_ptr, image_background, + PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); + else + png_set_background (png_ptr, &my_background, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); + } +#endif + png_read_image (png_ptr, row_pointers); + png_read_end (png_ptr, info_ptr); + +#ifdef PNG_SHOW_COMMENTS + /* #### + * I turn this off by default now, because the !%^@#!% comments + * show up every time the image is instantiated, which can get + * really really annoying. There should be some way to pass this + * type of data down into the glyph code, where you can get to it + * from lisp anyway. - WMP + */ + { + int i; + + for (i = 0 ; i < info_ptr->num_text ; i++) + { + /* How paranoid do I have to be about no trailing NULLs, and + using (int)info_ptr->text[i].text_length, and strncpy and a temp + string somewhere? */ + + warn_when_safe (Qpng, Qinfo, "%s - %s", + info_ptr->text[i].key, + info_ptr->text[i].text); + } + } +#endif + + xfree (row_pointers); + } + + /* now instantiate */ + MAYBE_DEVMETH (XDEVICE (ii->device), + init_image_instance_from_eimage, + (ii, width, height, unwind.eimage, dest_mask, + instantiator, domain)); + + /* This will clean up everything else. */ + unbind_to (speccount, Qnil); +} + +#endif /* HAVE_PNG */ + + +#ifdef HAVE_TIFF +#include "tiffio.h" + +/********************************************************************** + * TIFF * + **********************************************************************/ +static void +tiff_validate (Lisp_Object instantiator) +{ + file_or_data_must_be_present (instantiator); +} + +static Lisp_Object +tiff_normalize (Lisp_Object inst, Lisp_Object console_type) +{ + return simple_image_type_normalize (inst, console_type, Qtiff); +} + +static int +tiff_possible_dest_types (void) +{ + return IMAGE_COLOR_PIXMAP_MASK; +} + +struct tiff_unwind_data +{ + unsigned char *eimage; + /* Object that holds the decoded data from a TIFF file */ + TIFF *tiff; +}; + +static Lisp_Object +tiff_instantiate_unwind (Lisp_Object unwind_obj) +{ + struct tiff_unwind_data *data = + (struct tiff_unwind_data *) get_opaque_ptr (unwind_obj); + + free_opaque_ptr (unwind_obj); + if (data->tiff) + { + TIFFClose(data->tiff); + } + if (data->eimage) + xfree (data->eimage); + + return Qnil; +} + +typedef struct tiff_memory_storage +{ + Extbyte *bytes; /* The data */ + Extcount len; /* How big is it? */ + int index; /* Where are we? */ +} tiff_memory_storage; + +static size_t +tiff_memory_read(thandle_t data, tdata_t buf, tsize_t size) +{ + tiff_memory_storage *mem = (tiff_memory_storage*)data; + + if (size > (mem->len - mem->index)) + return (size_t) -1; + memcpy(buf, mem->bytes + mem->index, size); + mem->index = mem->index + size; + return size; +} + +static size_t tiff_memory_write(thandle_t data, tdata_t buf, tsize_t size) +{ + abort(); + return 0; /* Shut up warnings. */ +} + +static toff_t tiff_memory_seek(thandle_t data, toff_t off, int whence) +{ + tiff_memory_storage *mem = (tiff_memory_storage*)data; + int newidx; + switch(whence) { + case SEEK_SET: + newidx = off; + break; + case SEEK_END: + newidx = mem->len + off; + break; + case SEEK_CUR: + newidx = mem->index + off; + break; + default: + fprintf(stderr,"Eh? invalid seek mode in tiff_memory_seek\n"); + return -1; + } + + if ((newidx > mem->len) || (newidx < 0)) + return -1; + + mem->index = newidx; + return newidx; +} + +static int +tiff_memory_close(thandle_t data) +{ + return 0; +} + +static int +tiff_map_noop(thandle_t data, tdata_t* pbase, toff_t* psize) +{ + return 0; +} + +static void +tiff_unmap_noop(thandle_t data, tdata_t pbase, toff_t psize) +{ + return; +} + +static toff_t +tiff_memory_size(thandle_t data) +{ + tiff_memory_storage *mem = (tiff_memory_storage*)data; + return mem->len; +} + +struct tiff_error_struct +{ +#if HAVE_VSNPRINTF + char err_str[256]; +#else + char err_str[1024]; /* return the error string */ +#endif + jmp_buf setjmp_buffer; /* for return to caller */ +}; + +/* jh 98/03/12 - ###This struct for passing data to the error functions + is an ugly hack caused by the fact that libtiff (as of v3.4) doesn't + have any place to store error func data. This should be rectified + before XEmacs gets threads! */ +static struct tiff_error_struct tiff_err_data; + +static void +tiff_error_func(CONST char *module, CONST char *fmt, ...) +{ + va_list vargs; + + va_start (vargs, fmt); +#if HAVE_VSNPRINTF + vsnprintf (tiff_err_data.err_str, 255, fmt, vargs); +#else + /* pray this doesn't overflow... */ + vsprintf (tiff_err_data.err_str, fmt, vargs); +#endif + va_end (vargs); + /* return to setjmp point */ + longjmp (tiff_err_data.setjmp_buffer, 1); +} + +static void +tiff_warning_func(CONST char *module, CONST char *fmt, ...) +{ + va_list vargs; +#if HAVE_VSNPRINTF + char warn_str[256]; +#else + char warn_str[1024]; +#endif + + va_start (vargs, fmt); +#if HAVE_VSNPRINTF + vsnprintf (warn_str, 255, fmt, vargs); +#else + vsprintf (warn_str, fmt, vargs); +#endif + va_end (vargs); + warn_when_safe (Qtiff, Qinfo, "%s - %s", + module, warn_str); +} + +static void +tiff_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, + Lisp_Object pointer_fg, Lisp_Object pointer_bg, + int dest_mask, Lisp_Object domain) +{ + struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + tiff_memory_storage mem_struct; + /* It is OK for the unwind data to be local to this function, + because the unwind-protect is always executed when this + stack frame is still valid. */ + struct tiff_unwind_data unwind; + int speccount = specpdl_depth (); + uint32 width, height; + + xzero (unwind); + record_unwind_protect (tiff_instantiate_unwind, make_opaque_ptr (&unwind)); + + /* set up error facilities */ + if (setjmp (tiff_err_data.setjmp_buffer)) + { + /* An error was signaled. No clean up is needed, as unwind handles that + for us. Just pass the error along. */ + signal_image_error_2 ("TIFF decoding error", + build_string(tiff_err_data.err_str), + instantiator); + } + TIFFSetErrorHandler ((TIFFErrorHandler)tiff_error_func); + TIFFSetWarningHandler ((TIFFErrorHandler)tiff_warning_func); + { + Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); + Extbyte *bytes; + Extcount len; + + uint32 *raster; + unsigned char *ep; + + assert (!NILP (data)); + + /* #### This is a definite problem under Mule due to the amount of + stack data it might allocate. Think about Lstreams... */ + GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len); + mem_struct.bytes = bytes; + mem_struct.len = len; + mem_struct.index = 0; + + unwind.tiff = TIFFClientOpen ("memfile", "r", &mem_struct, + (TIFFReadWriteProc)tiff_memory_read, + (TIFFReadWriteProc)tiff_memory_write, + tiff_memory_seek, tiff_memory_close, tiff_memory_size, + tiff_map_noop, tiff_unmap_noop); + if (!unwind.tiff) + signal_image_error ("Insufficent memory to instantiate TIFF image", instantiator); + + TIFFGetField (unwind.tiff, TIFFTAG_IMAGEWIDTH, &width); + TIFFGetField (unwind.tiff, TIFFTAG_IMAGELENGTH, &height); + unwind.eimage = (unsigned char *) xmalloc (width * height * 3); + + /* ### This is little more than proof-of-concept/function testing. + It needs to be reimplimented via scanline reads for both memory + compactness. */ + raster = (uint32*) _TIFFmalloc (width * height * sizeof (uint32)); + if (raster != NULL) + { + int i,j; + uint32 *rp; + ep = unwind.eimage; + rp = raster; + if (TIFFReadRGBAImage (unwind.tiff, width, height, raster, 0)) + { + for (i = height - 1; i >= 0; i--) + { + /* This is to get around weirdness in the libtiff library where properly + made TIFFs will come out upside down. libtiff bug or jhod-brainlock? */ + rp = raster + (i * width); + for (j = 0; j < width; j++) + { + *ep++ = (unsigned char)TIFFGetR(*rp); + *ep++ = (unsigned char)TIFFGetG(*rp); + *ep++ = (unsigned char)TIFFGetB(*rp); + rp++; + } + } + } + _TIFFfree (raster); + } else + signal_image_error ("Unable to allocate memory for TIFFReadRGBA", instantiator); + + } + + /* now instantiate */ + MAYBE_DEVMETH (XDEVICE (ii->device), + init_image_instance_from_eimage, + (ii, width, height, unwind.eimage, dest_mask, + instantiator, domain)); + + unbind_to (speccount, Qnil); +} + +#endif /* HAVE_TIFF */ + + +/************************************************************************/ +/* initialization */ +/************************************************************************/ + +void +syms_of_glyphs_read (void) +{ +} + +void +image_instantiator_format_create_glyphs_read (void) +{ + /* image-instantiator types */ +#ifdef HAVE_JPEG + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (jpeg, "jpeg"); + + IIFORMAT_HAS_METHOD (jpeg, validate); + IIFORMAT_HAS_METHOD (jpeg, normalize); + IIFORMAT_HAS_METHOD (jpeg, possible_dest_types); + IIFORMAT_HAS_METHOD (jpeg, instantiate); + + IIFORMAT_VALID_KEYWORD (jpeg, Q_data, check_valid_string); + IIFORMAT_VALID_KEYWORD (jpeg, Q_file, check_valid_string); +#endif + +#ifdef HAVE_GIF + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (gif, "gif"); + + IIFORMAT_HAS_METHOD (gif, validate); + IIFORMAT_HAS_METHOD (gif, normalize); + IIFORMAT_HAS_METHOD (gif, possible_dest_types); + IIFORMAT_HAS_METHOD (gif, instantiate); + + IIFORMAT_VALID_KEYWORD (gif, Q_data, check_valid_string); + IIFORMAT_VALID_KEYWORD (gif, Q_file, check_valid_string); +#endif + +#ifdef HAVE_PNG + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (png, "png"); + + IIFORMAT_HAS_METHOD (png, validate); + IIFORMAT_HAS_METHOD (png, normalize); + IIFORMAT_HAS_METHOD (png, possible_dest_types); + IIFORMAT_HAS_METHOD (png, instantiate); + + IIFORMAT_VALID_KEYWORD (png, Q_data, check_valid_string); + IIFORMAT_VALID_KEYWORD (png, Q_file, check_valid_string); +#endif + +#ifdef HAVE_TIFF + INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tiff, "tiff"); + + IIFORMAT_HAS_METHOD (tiff, validate); + IIFORMAT_HAS_METHOD (tiff, normalize); + IIFORMAT_HAS_METHOD (tiff, possible_dest_types); + IIFORMAT_HAS_METHOD (tiff, instantiate); + + IIFORMAT_VALID_KEYWORD (tiff, Q_data, check_valid_string); + IIFORMAT_VALID_KEYWORD (tiff, Q_file, check_valid_string); +#endif + +} + +void +vars_of_glyphs_read (void) +{ +#ifdef HAVE_JPEG + Fprovide (Qjpeg); +#endif + +#ifdef HAVE_GIF + Fprovide (Qgif); +#endif + +#ifdef HAVE_PNG + Fprovide (Qpng); +#endif + +#ifdef HAVE_TIFF + Fprovide (Qtiff); +#endif + +}
--- a/src/glyphs-msw.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/glyphs-msw.c Mon Aug 13 10:31:29 2007 +0200 @@ -56,10 +56,11 @@ /* convert from a series of RGB triples to a BITMAPINFO formated for the*/ /* proper display */ /************************************************************************/ -BITMAPINFO* EImage2DIBitmap (Lisp_Object device, int width, int height, - unsigned char *pic, - int *bit_count, - unsigned char** bmp_data) +static BITMAPINFO* convert_EImage_to_DIBitmap (Lisp_Object device, + int width, int height, + unsigned char *pic, + int *bit_count, + unsigned char** bmp_data) { struct device *d = XDEVICE (device); int i,j; @@ -92,7 +93,7 @@ /* bitmap data needs to be in blue, green, red triples - in that order, eimage is in RGB format so we need to convert */ *bmp_data = xnew_array_and_zero (unsigned char, bpline * height); - *bit_count = width * height * 3; + *bit_count = bpline * height; if (!bmp_data) { @@ -186,8 +187,8 @@ where the file might be located. Return a full pathname if found; otherwise, return Qnil. */ -static Lisp_Object -locate_pixmap_file (Lisp_Object name) +Lisp_Object +mswindows_locate_pixmap_file (Lisp_Object name) { /* This function can GC if IN_REDISPLAY is false */ Lisp_Object found; @@ -219,6 +220,7 @@ 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). @@ -298,6 +300,7 @@ RETURN_UNGCPRO (result); } } +#endif /* Initialize an image instance from a bitmap @@ -357,6 +360,44 @@ IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = bmp_info->bmiHeader.biBitCount; } +static void +mswindows_init_image_instance_from_eimage (struct Lisp_Image_Instance *ii, + int width, int height, + unsigned char *eimage, + int dest_mask, + Lisp_Object instantiator, + Lisp_Object domain) +{ + Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); + BITMAPINFO* bmp_info; + unsigned char* bmp_data; + int bmp_bits; + COLORREF bkcolor; + + if (!DEVICE_MSWINDOWS_P (XDEVICE (device))) + signal_simple_error ("Not an mswindows device", device); + + /* this is a hack but MaskBlt and TransparentBlt are not supported + on most windows variants */ + bkcolor = COLOR_INSTANCE_MSWINDOWS_COLOR + (XCOLOR_INSTANCE (FACE_BACKGROUND (Vdefault_face, domain))); + + /* build a bitmap from the eimage */ + if (!(bmp_info=convert_EImage_to_DIBitmap (device, width, height, eimage, + &bmp_bits, &bmp_data))) + { + signal_simple_error ("EImage to DIBitmap conversion failed", + instantiator); + } + + /* Now create the pixmap and set up the image instance */ + init_image_instance_from_dibitmap (ii, bmp_info, dest_mask, + bmp_data, bmp_bits, instantiator); + + xfree (bmp_info); + xfree (bmp_data); +} + void mswindows_create_icon_from_image(Lisp_Object image, struct frame* f, int size) { @@ -620,8 +661,8 @@ } /* build a bitmap from the eimage */ - if (!(bmp_info=EImage2DIBitmap (device, width, height, eimage, - &bmp_bits, &bmp_data))) + if (!(bmp_info=convert_EImage_to_DIBitmap (device, width, height, eimage, + &bmp_bits, &bmp_data))) { signal_simple_error ("XPM to EImage conversion failed", image_instance); @@ -827,6 +868,8 @@ CONSOLE_HAS_METHOD (mswindows, finalize_image_instance); CONSOLE_HAS_METHOD (mswindows, image_instance_equal); CONSOLE_HAS_METHOD (mswindows, image_instance_hash); + CONSOLE_HAS_METHOD (mswindows, init_image_instance_from_eimage); + CONSOLE_HAS_METHOD (mswindows, locate_pixmap_file); } void
--- a/src/glyphs-msw.h Mon Aug 13 10:30:38 2007 +0200 +++ b/src/glyphs-msw.h Mon Aug 13 10:31:29 2007 +0200 @@ -59,5 +59,12 @@ #define XIMAGE_INSTANCE_MSWINDOWS_ICON(i) \ IMAGE_INSTANCE_MSWINDOWS_ICON (XIMAGE_INSTANCE (i)) +int +mswindows_resize_dibitmap_instance (struct Lisp_Image_Instance* ii, + struct frame* f, + int newx, int newy); +void +mswindows_create_icon_from_image(Lisp_Object image, struct frame* f, int size); + #endif /* HAVE_MS_WINDOWS */ #endif /* _XEMACS_GLYPHS_MSW_H_ */
--- a/src/glyphs-x.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/glyphs-x.c Mon Aug 13 10:31:29 2007 +0200 @@ -76,6 +76,11 @@ #include "file-coding.h" #endif +#undef HAVE_PNG +#undef HAVE_TIFF +#undef HAVE_JPEG +#undef HAVE_GIF + #if INTBITS == 32 # define FOUR_BYTE_TYPE unsigned int #elif LONGBITS == 32 @@ -94,10 +99,6 @@ Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y; Lisp_Object Q_foreground, Q_background; -#ifdef HAVE_XPM -Lisp_Object Q_color_symbols; -#endif - #ifdef HAVE_XFACE DEFINE_IMAGE_INSTANTIATOR_FORMAT (xface); Lisp_Object Qxface; @@ -473,8 +474,8 @@ where the file might be located. Return a full pathname if found; otherwise, return Qnil. */ -static Lisp_Object -locate_pixmap_file (Lisp_Object name) +Lisp_Object +x_locate_pixmap_file (Lisp_Object name) { /* This function can GC if IN_REDISPLAY is false */ Display *display; @@ -548,6 +549,13 @@ } } +static Lisp_Object +locate_pixmap_file (Lisp_Object name) +{ + return x_locate_pixmap_file (name); +} + +#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). @@ -602,8 +610,9 @@ Note that if we cannot generate any regular inline data, we skip out. */ - file = potential_pixmap_file_instantiator (inst, Q_file, Q_data); - + file = potential_pixmap_file_instantiator (inst, Q_file, Q_data, + console_type); + if (CONSP (file)) /* failure locating filename */ signal_double_file_error ("Opening pixmap file", "no such file or directory", @@ -628,6 +637,7 @@ RETURN_UNGCPRO (result); } } +#endif #if 0 static void @@ -889,6 +899,42 @@ IMAGE_INSTANCE_X_NPIXELS (ii) = npixels; } +static void +x_init_image_instance_from_eimage (struct Lisp_Image_Instance *ii, + int width, int height, + unsigned char *eimage, + int dest_mask, + Lisp_Object instantiator, + Lisp_Object domain) +{ + Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); + Colormap cmap = DEVICE_X_COLORMAP (XDEVICE(device)); + unsigned long *pixtbl; + int pixcount; + int npixels; + XImage* ximage; + + ximage = convert_EImage_to_XImage (device, width, height, eimage, + &pixtbl, &pixcount, &npixels); + if (!ximage) + 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, + instantiator); + + if (ximage) + { + if (ximage->data) + { + xfree (ximage->data); + ximage->data = 0; + } + XDestroyImage (ximage); + } +} + /********************************************************************** * XBM * @@ -1056,9 +1102,10 @@ Note that if we cannot generate any regular inline data, we skip out. */ - file = potential_pixmap_file_instantiator (inst, Q_file, Q_data); + file = potential_pixmap_file_instantiator (inst, Q_file, Q_data, + console_type); mask_file = potential_pixmap_file_instantiator (inst, Q_mask_file, - Q_mask_data); + Q_mask_data, console_type); if (CONSP (file)) /* failure locating filename */ signal_double_file_error ("Opening bitmap file", @@ -1414,7 +1461,8 @@ Note that if we cannot generate any regular inline data, we skip out. */ - file = potential_pixmap_file_instantiator (inst, Q_file, Q_data); + file = potential_pixmap_file_instantiator (inst, Q_file, Q_data, + console_type); if (CONSP (file)) /* failure locating filename */ signal_double_file_error ("Opening pixmap file", @@ -3702,9 +3750,10 @@ Note that if we cannot generate any regular inline data, we skip out. */ - file = potential_pixmap_file_instantiator (inst, Q_file, Q_data); + file = potential_pixmap_file_instantiator (inst, Q_file, Q_data, + console_type); mask_file = potential_pixmap_file_instantiator (inst, Q_mask_file, - Q_mask_data); + Q_mask_data, console_type); if (CONSP (file)) /* failure locating filename */ signal_double_file_error ("Opening bitmap file", @@ -4524,6 +4573,8 @@ CONSOLE_HAS_METHOD (x, image_instance_equal); CONSOLE_HAS_METHOD (x, image_instance_hash); CONSOLE_HAS_METHOD (x, colorize_image_instance); + CONSOLE_HAS_METHOD (x, init_image_instance_from_eimage); + CONSOLE_HAS_METHOD (x, locate_pixmap_file); } void
--- a/src/glyphs.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/glyphs.c Mon Aug 13 10:31:29 2007 +0200 @@ -72,6 +72,9 @@ DEFINE_IMAGE_INSTANTIATOR_FORMAT (string); DEFINE_IMAGE_INSTANTIATOR_FORMAT (formatted_string); +Lisp_Object x_locate_pixmap_file (Lisp_Object name); +Lisp_Object mswindows_locate_pixmap_file (Lisp_Object name); + #ifdef HAVE_XPM DEFINE_IMAGE_INSTANTIATOR_FORMAT (xpm); Lisp_Object Qxpm; @@ -1450,6 +1453,96 @@ } +/************************************************************************/ +/* pixmap file functions */ +/************************************************************************/ + +/* 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. */ + +Lisp_Object +potential_pixmap_file_instantiator (Lisp_Object instantiator, + Lisp_Object file_keyword, + Lisp_Object data_keyword, + Lisp_Object console_type) +{ + 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 = MAYBE_LISP_CONTYPE_METH + (decode_console_type(console_type, ERROR_ME), + locate_pixmap_file, (file)); + + if (!NILP (retval)) + return retval; + else + return Fcons (file, Qnil); /* should have been file */ + } + + return Qnil; +} + +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); + } +} + + #ifdef HAVE_XPM /**********************************************************************
--- a/src/glyphs.h Mon Aug 13 10:30:38 2007 +0200 +++ b/src/glyphs.h Mon Aug 13 10:31:29 2007 +0200 @@ -27,6 +27,13 @@ #include "specifier.h" extern Lisp_Object Qxpm; +#ifdef HAVE_XPM +extern Lisp_Object Q_color_symbols; +Lisp_Object evaluate_xpm_color_symbols (void); +#endif + +DOESNT_RETURN signal_image_error (CONST char *, Lisp_Object); +DOESNT_RETURN signal_image_error_2 (CONST char *, Lisp_Object, Lisp_Object); /************************************************************************/ /* Image Instantiators */ @@ -187,6 +194,13 @@ Lisp_Object find_keyword_in_vector_or_given (Lisp_Object vector, Lisp_Object keyword, Lisp_Object default_); +Lisp_Object simple_image_type_normalize (Lisp_Object inst, + Lisp_Object console_type, + Lisp_Object image_type_tag); +Lisp_Object potential_pixmap_file_instantiator (Lisp_Object instantiator, + Lisp_Object file_keyword, + Lisp_Object data_keyword, + Lisp_Object console_type); void check_valid_string (Lisp_Object data); void check_valid_int (Lisp_Object data); DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator,
--- a/src/lread.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/lread.c Mon Aug 13 10:31:29 2007 +0200 @@ -27,7 +27,6 @@ #include <config.h> #include "lisp.h" -#ifndef standalone #include "buffer.h" #include "bytecode.h" #include "commands.h" @@ -35,7 +34,6 @@ #include "lstream.h" #include "opaque.h" #include <paths.h> -#endif #ifdef FILE_CODING #include "file-coding.h" #endif @@ -341,20 +339,6 @@ int allow_dotted_lists, int check_for_doc_references); -/* get a character from the tty */ - -#ifdef standalone /* This primitive is normally not defined */ - -#define kludge DEFUN /* to keep this away from make-docfile... */ -kludge ("read-char", Fread_char, Sread_char, 0, 0, 0, "") () -{ - return getchar (); -} -#undef kludge -#endif /* standalone */ - - - static void readevalloop (Lisp_Object readcharfun, Lisp_Object sourcefile, Lisp_Object (*evalfun) (Lisp_Object), @@ -1373,8 +1357,6 @@ unbind_to (speccount, Qnil); } -#ifndef standalone - DEFUN ("eval-buffer", Feval_buffer, 0, 2, "bBuffer: ", /* Execute BUFFER as Lisp code. Programs can pass two arguments, BUFFER and PRINTFLAG. @@ -1467,8 +1449,6 @@ return unbind_to (speccount, Qnil); } - -#endif /* standalone */ DEFUN ("read", Fread, 0, 1, 0, /* Read one Lisp expression as text from STREAM, return as Lisp object. @@ -1493,14 +1473,12 @@ #ifdef COMPILED_FUNCTION_ANNOTATION_HACK Vcurrent_compiled_function_annotation = Qnil; #endif -#ifndef standalone if (EQ (stream, Qread_char)) { Lisp_Object val = call1 (Qread_from_minibuffer, build_translated_string ("Lisp expression: ")); return Fcar (Fread_from_string (val, Qnil, Qnil)); } -#endif if (STRINGP (stream)) return Fcar (Fread_from_string (stream, Qnil, Qnil)); @@ -3031,9 +3009,6 @@ DEFSUBR (Flocate_file_clear_hashing); DEFSUBR (Feval_buffer); DEFSUBR (Feval_region); -#ifdef standalone - DEFSUBR (Fread_char); -#endif defsymbol (&Qstandard_input, "standard-input"); defsymbol (&Qread_char, "read-char");
--- a/src/menubar-msw.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/menubar-msw.c Mon Aug 13 10:31:29 2007 +0200 @@ -402,7 +402,7 @@ if (bar_p && !REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIHGT_FLUSH) flush_right = 1; if (!populate_p) - checksum = HASH2 (checksum, Qnil); + checksum = HASH2 (checksum, LISP_HASH (Qnil)); } else if (populate_p) populate_menu_add_item (menu, path, hash_tab,
--- a/src/mule-ccl.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/mule-ccl.c Mon Aug 13 10:31:29 2007 +0200 @@ -436,75 +436,65 @@ command. */ #define CCL_STAT_QUIT 3 /* Terminated because of quit. */ -/* Terminate CCL program successfully. */ -#define CCL_SUCCESS \ - do { \ - ccl->status = CCL_STAT_SUCCESS; \ - ccl->ic = CCL_HEADER_MAIN; \ - goto ccl_finish; \ - } while (0) - -/* Suspend CCL program because of reading from empty input buffer or - writing to full output buffer. When this program is resumed, the - same I/O command is executed. */ -#define CCL_SUSPEND \ - do { \ - ic--; \ - ccl->status = CCL_STAT_SUSPEND; \ - goto ccl_finish; \ - } while (0) - -/* Terminate CCL program because of invalid command. Should not occur - in the normal case. */ -#define CCL_INVALID_CMD \ - do { \ - ccl->status = CCL_STAT_INVALID_CMD; \ - goto ccl_error_handler; \ - } while (0) - /* Encode one character CH to multibyte form and write to the current output buffer. If CH is less than 256, CH is written as is. */ -#define CCL_WRITE_CHAR(ch) \ - do { \ - if (!destination) \ - CCL_INVALID_CMD; \ - else \ - { \ - Bufbyte work[MAX_EMCHAR_LEN]; \ - int len = ( ch < 256 ) ? \ - simple_set_charptr_emchar (work, ch) : \ - non_ascii_set_charptr_emchar (work, ch); \ - Dynarr_add_many (destination, work, len); \ - } \ - } while (0) +#define CCL_WRITE_CHAR(ch) do { \ + if (!destination) \ + { \ + ccl->status = CCL_STAT_INVALID_CMD; \ + goto ccl_error_handler; \ + } \ + else \ + { \ + Bufbyte work[MAX_EMCHAR_LEN]; \ + int len = ( ch < 256 ) ? \ + simple_set_charptr_emchar (work, ch) : \ + non_ascii_set_charptr_emchar (work, ch); \ + Dynarr_add_many (destination, work, len); \ + } \ +} while (0) /* Write a string at ccl_prog[IC] of length LEN to the current output buffer. */ -#define CCL_WRITE_STRING(len) \ - do { \ - if (!destination) \ - CCL_INVALID_CMD; \ - else \ - for (i = 0; i < len; i++) \ - Dynarr_add(destination, (XINT (ccl_prog[ic + (i / 3)]) \ - >> ((2 - (i % 3)) * 8)) & 0xFF); \ - } while (0) +#define CCL_WRITE_STRING(len) do { \ + if (!destination) \ + { \ + ccl->status = CCL_STAT_INVALID_CMD; \ + goto ccl_error_handler; \ + } \ + else \ + for (i = 0; i < len; i++) \ + Dynarr_add(destination, \ + (XINT (ccl_prog[ic + (i / 3)]) \ + >> ((2 - (i % 3)) * 8)) & 0xFF); \ +} while (0) /* Read one byte from the current input buffer into Rth register. */ -#define CCL_READ_CHAR(r) \ - do { \ - if (!src) \ - CCL_INVALID_CMD; \ - else if (src < src_end) \ - r = *src++; \ - else if (ccl->last_block) \ - { \ - ic = ccl->eof_ic; \ - goto ccl_finish; \ - } \ - else \ - CCL_SUSPEND; \ - } while (0) +#define CCL_READ_CHAR(r) do { \ + if (!src) \ + { \ + ccl->status = CCL_STAT_INVALID_CMD; \ + goto ccl_error_handler; \ + } \ + else if (src < src_end) \ + r = *src++; \ + else if (ccl->last_block) \ + { \ + ic = ccl->eof_ic; \ + goto ccl_finish; \ + } \ + else \ + /* Suspend CCL program because of \ + reading from empty input buffer or \ + writing to full output buffer. \ + When this program is resumed, the \ + same I/O command is executed. */ \ + { \ + ic--; \ + ccl->status = CCL_STAT_SUSPEND; \ + goto ccl_finish; \ + } \ +} while (0) /* Execute CCL code on SRC_BYTES length text at SOURCE. The resulting @@ -727,7 +717,8 @@ ccl_prog = ccl_prog_stack_struct[0].ccl_prog; ic = ccl_prog_stack_struct[0].ic; } - CCL_INVALID_CMD; + ccl->status = CCL_STAT_INVALID_CMD; + goto ccl_error_handler; } ccl_prog_stack_struct[stack_idx].ccl_prog = ccl_prog; @@ -765,7 +756,10 @@ ic = ccl_prog_stack_struct[stack_idx].ic; break; } - CCL_SUCCESS; + /* Terminate CCL program successfully. */ + ccl->status = CCL_STAT_SUCCESS; + ccl->ic = CCL_HEADER_MAIN; + goto ccl_finish; case CCL_ExprSelfConst: /* 00000OPERATION000000rrrXXXXX */ i = XINT (ccl_prog[ic]); @@ -799,7 +793,9 @@ case CCL_LE: reg[rrr] = reg[rrr] <= i; break; case CCL_GE: reg[rrr] = reg[rrr] >= i; break; case CCL_NE: reg[rrr] = reg[rrr] != i; break; - default: CCL_INVALID_CMD; + default: + ccl->status = CCL_STAT_INVALID_CMD; + goto ccl_error_handler; } break; @@ -862,7 +858,9 @@ case CCL_NE: reg[rrr] = i != j; break; case CCL_ENCODE_SJIS: ENCODE_SJIS (i, j, reg[rrr], reg[7]); break; case CCL_DECODE_SJIS: DECODE_SJIS (i, j, reg[rrr], reg[7]); break; - default: CCL_INVALID_CMD; + default: + ccl->status = CCL_STAT_INVALID_CMD; + goto ccl_error_handler; } code &= 0x1F; if (code == CCL_WriteExprConst || code == CCL_WriteExprRegister) @@ -875,7 +873,8 @@ break; default: - CCL_INVALID_CMD; + ccl->status = CCL_STAT_INVALID_CMD; + goto ccl_error_handler; } } @@ -889,6 +888,8 @@ switch (ccl->status) { + /* Terminate CCL program because of invalid command. + Should not occur in the normal case. */ case CCL_STAT_INVALID_CMD: sprintf(msg, "\nCCL: Invalid command %x (ccl_code = %x) at %d.", code & 0x1F, code, ic);
--- a/src/ntplay.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/ntplay.c Mon Aug 13 10:31:29 2007 +0200 @@ -21,6 +21,7 @@ #include <windows.h> #undef CONST #include <config.h> +#include <stdio.h> #ifdef __CYGWIN32__ extern BOOL WINAPI PlaySound(LPCSTR,HMODULE,DWORD);
--- a/src/paths.h.in Mon Aug 13 10:30:38 2007 +0200 +++ b/src/paths.h.in Mon Aug 13 10:31:29 2007 +0200 @@ -24,8 +24,9 @@ If it defines anything, this file should define some subset of the following: - PATH_PREFIX The default value of `prefix-directory'. This is the - default root for everything. + PATH_EXEC_PREFIX The value of --exec-prefix. + + PATH_PREFIX The value of --prefix. PATH_LOADSEARCH The default value of `load-path'. @@ -52,7 +53,9 @@ These are additional places info files are searched for. */ -#define PATH_PREFIX "@prefix@" +#define PATH_EXEC_PREFIX "@EXEC_PREFIX@" + +#define PATH_PREFIX "@PREFIX@" #ifdef LISPDIR_USER_DEFINED #define PATH_LOADSEARCH "@LISPDIR@"
--- a/src/print.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/print.c Mon Aug 13 10:31:29 2007 +0200 @@ -28,7 +28,6 @@ #include <config.h> #include "lisp.h" -#ifndef standalone #include "backtrace.h" #include "buffer.h" #include "bytecode.h" @@ -40,8 +39,6 @@ #include "lstream.h" #include "sysfile.h" -#endif /* not standalone */ - #include <float.h> /* Define if not in float.h */ #ifndef DBL_DIG @@ -152,7 +149,7 @@ Lisp_Object reloc, Bytecount offset, Bytecount len) { /* This function can GC */ - Charcount ccoff, cclen; + Charcount cclen; /* We change the value of nonreloc (fetching it from reloc as necessary), but we don't want to pass this changed value on to other functions that take both a nonreloc and a reloc, or things @@ -172,7 +169,6 @@ if (STRINGP (reloc)) newnonreloc = XSTRING_DATA (reloc); - ccoff = bytecount_to_charcount (newnonreloc, offset); cclen = bytecount_to_charcount (newnonreloc + offset, len); if (LSTREAMP (function)) @@ -182,8 +178,7 @@ /* Protect against Lstream_write() causing a GC and relocating the string. For small strings, we do it by alloc'ing the string and using a copy; for large strings, - we inhibit GC. Now that print_streams are dead, this - case should happen very rarely anyway. */ + we inhibit GC. */ if (len < 65536) { Bufbyte *copied = alloca_array (Bufbyte, len); @@ -206,8 +201,6 @@ if (print_unbuffered) Lstream_flush (XLSTREAM (function)); } - -#ifndef standalone else if (BUFFERP (function)) { CHECK_LIVE_BUFFER (function); @@ -215,10 +208,10 @@ } else if (MARKERP (function)) { - /* marker_position will err if marker doesn't point anywhere */ + /* marker_position() will err if marker doesn't point anywhere. */ Bufpos spoint = marker_position (function); - buffer_insert_string_1 (XBUFFER (Fmarker_buffer (function)), + buffer_insert_string_1 (XMARKER (function)->buffer, spoint, nonreloc, reloc, offset, len, 0); Fset_marker (function, make_int (spoint + cclen), @@ -226,12 +219,15 @@ } else if (FRAMEP (function)) { + /* This gets used by functions not invoking print_prepare(), + such as Fwrite_char. */ struct frame *f = XFRAME (function); + CHECK_LIVE_FRAME (function); + if (!EQ (Vprint_message_label, echo_area_status (f))) clear_echo_area_from_print (f, Qnil, 1); echo_area_append (f, nonreloc, reloc, offset, len, Vprint_message_label); } -#endif /* not standalone */ else if (EQ (function, Qt) || EQ (function, Qnil)) { write_string_to_stdio_stream (stdout, 0, newnonreloc, offset, len, @@ -239,6 +235,7 @@ } else { + Charcount ccoff = bytecount_to_charcount (newnonreloc, offset); Charcount iii; for (iii = ccoff; iii < cclen + ccoff; iii++) @@ -252,6 +249,11 @@ UNGCPRO; } + +#define RESET_PRINT_GENSYM do { \ + if (!CONSP (Vprint_gensym)) \ + Vprint_gensym_alist = Qnil; \ +} while (0) static Lisp_Object canonicalize_printcharfun (Lisp_Object printcharfun) @@ -260,54 +262,92 @@ printcharfun = Vstandard_output; if (EQ (printcharfun, Qt) || NILP (printcharfun)) - { -#ifndef standalone - printcharfun = Fselected_frame (Qnil); /* print to minibuffer */ -#endif - } + printcharfun = Fselected_frame (Qnil); /* print to minibuffer */ + return printcharfun; } -/* Now that print_streams are dead, I wonder if the following two - functions are needed as separate entities. */ - static Lisp_Object -print_prepare (Lisp_Object printcharfun) +print_prepare (Lisp_Object printcharfun, Lisp_Object *frame_kludge) { /* Emacs won't print whilst GCing, but an external debugger might */ if (gc_in_progress) return Qnil; + RESET_PRINT_GENSYM; + printcharfun = canonicalize_printcharfun (printcharfun); - if (!CONSP (Vprint_gensym)) - Vprint_gensym_alist = Qnil; + + /* Here we could safely return the canonicalized PRINTCHARFUN. + However, if PRINTCHARFUN is a frame, printing of complex + structures becomes very expensive, because `append-message' + (called by echo_area_append) gets called as many times as + output_string() is called (and that's a *lot*). append-message + tries to keep top of the message-stack in sync with the contents + of " *Echo Area" buffer, consing a new string for each component + of the printed structure. For instance, if you print (a a), + append-message will cons up the following strings: + + "(" + "(a" + "(a " + "(a a" + "(a a)" + + and will use only the last one. With larger objects, this turns + into an O(n^2) consing frenzy that locks up XEmacs in incessant + garbage collection. + + We prevent this by creating a resizing_buffer stream and letting + the printer write into it. print_finish() will notice this + stream, and invoke echo_area_append() with the stream's buffer, + only once. */ + if (FRAMEP (printcharfun)) + { + CHECK_LIVE_FRAME (printcharfun); + *frame_kludge = printcharfun; + printcharfun = make_resizing_buffer_output_stream (); + } return printcharfun; } static void -print_finish (Lisp_Object stream) +print_finish (Lisp_Object stream, Lisp_Object frame_kludge) { /* Emacs won't print whilst GCing, but an external debugger might */ if (gc_in_progress) return; - if (!CONSP (Vprint_gensym)) - Vprint_gensym_alist = Qnil; + RESET_PRINT_GENSYM; + + /* See the comment in print_prepare(). */ + if (FRAMEP (frame_kludge)) + { + struct frame *f = XFRAME (frame_kludge); + Lstream *str = XLSTREAM (stream); + CHECK_LIVE_FRAME (frame_kludge); + + Lstream_flush (str); + if (!EQ (Vprint_message_label, echo_area_status (f))) + clear_echo_area_from_print (f, Qnil, 1); + echo_area_append (f, resizing_buffer_stream_ptr (str), + Qnil, 0, Lstream_byte_count (str), + Vprint_message_label); + Lstream_delete (str); + } } -#if 1 /* Prefer space over "speed" */ -#define write_char_internal(string_of_length_1, stream) \ - write_string_1 ((CONST Bufbyte *) (string_of_length_1), 1, (stream)) -#else -#define write_char_internal(string_of_length_1, stream) \ - output_string ((stream), (CONST Bufbyte *) (string_of_length_1), Qnil, 0, 1) -#endif +/* Used for printing a character. STRING_OF_LENGTH_1 must contain a + single-byte character, not just any emchar. */ +#define write_char_internal(string_of_length_1, stream) \ + 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_object_internal (string, printcharfun, 0) + * 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) @@ -316,7 +356,9 @@ write_string_1 (CONST Bufbyte *str, Bytecount size, Lisp_Object stream) { /* This function can GC */ +#ifdef ERROR_CHECK_BUFPOS assert (size >= 0); +#endif output_string (stream, str, Qnil, 0, size); } @@ -339,13 +381,13 @@ 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; } -#ifndef standalone - void temp_output_buffer_setup (CONST char *bufname) { @@ -428,7 +470,6 @@ return unbind_to (speccount, val); } -#endif /* not standalone */ DEFUN ("terpri", Fterpri, 0, 1, 0, /* Output a newline to STREAM. @@ -452,21 +493,18 @@ (object, stream)) { /* This function can GC */ - Lisp_Object the_stream = Qnil; + Lisp_Object the_stream = Qnil, frame = Qnil; struct gcpro gcpro1, gcpro2, gcpro3; GCPRO3 (object, stream, the_stream); print_depth = 0; - the_stream = print_prepare (stream); + the_stream = print_prepare (stream, &frame); print_internal (object, the_stream, 1); - print_finish (the_stream); + print_finish (the_stream, frame); UNGCPRO; return object; } -/* Stream to which prin1-to-string prints. */ -static Lisp_Object Vprin1_to_string_stream; - DEFUN ("prin1-to-string", Fprin1_to_string, 1, 2, 0, /* Return a string containing the printed representation of OBJECT, any Lisp object. Quoting characters are used when needed to make output @@ -476,29 +514,23 @@ (object, noescape)) { /* This function can GC */ - Lstream *stream; - struct gcpro gcpro1; + Lisp_Object stream; + Lstream *str; + struct gcpro gcpro1, gcpro2; - /* We avoid creating a new stream for every invocation of - prin1_to_string, for better memory usage. #### Is it necessary? */ - - if (NILP (Vprin1_to_string_stream)) - Vprin1_to_string_stream = make_resizing_buffer_output_stream (); - stream = XLSTREAM (Vprin1_to_string_stream); - Lstream_rewind (stream); + stream = make_resizing_buffer_output_stream (); + str = XLSTREAM (stream); - /* In case a caller forgot to protect. */ - GCPRO1 (object); + /* Protect OBJECT, in case a caller forgot to protect. */ + GCPRO2 (object, stream); print_depth = 0; - if (!CONSP (Vprint_gensym)) - Vprint_gensym_alist = Qnil; - print_internal (object, Vprin1_to_string_stream, NILP (noescape)); - if (!CONSP (Vprint_gensym)) - Vprint_gensym_alist = Qnil; - Lstream_flush (stream); + RESET_PRINT_GENSYM; + print_internal (object, stream, NILP (noescape)); + RESET_PRINT_GENSYM; + Lstream_flush (str); UNGCPRO; - return make_string (resizing_buffer_stream_ptr (stream), - Lstream_byte_count (stream)); + return make_string (resizing_buffer_stream_ptr (str), + Lstream_byte_count (str)); } DEFUN ("princ", Fprinc, 1, 2, 0, /* @@ -510,14 +542,14 @@ (obj, stream)) { /* This function can GC */ - Lisp_Object the_stream = Qnil; + Lisp_Object the_stream = Qnil, frame = Qnil; struct gcpro gcpro1, gcpro2, gcpro3; GCPRO3 (obj, stream, the_stream); - the_stream = print_prepare (stream); + the_stream = print_prepare (stream, &frame); print_depth = 0; print_internal (obj, the_stream, 0); - print_finish (the_stream); + print_finish (the_stream, frame); UNGCPRO; return obj; } @@ -531,16 +563,16 @@ (obj, stream)) { /* This function can GC */ - Lisp_Object the_stream = Qnil; + Lisp_Object the_stream = Qnil, frame = Qnil; struct gcpro gcpro1, gcpro2, gcpro3; GCPRO3 (obj, stream, the_stream); - the_stream = print_prepare (stream); + the_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); + print_finish (the_stream, frame); UNGCPRO; return obj; } @@ -761,6 +793,40 @@ } } #endif /* LISP_FLOAT_TYPE */ + +/* 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. */ +void +long_to_string (char *buffer, long number) +{ + char *p; + int i, l; + + if (number < 0) + { + *buffer++ = '-'; + number = -number; + } + p = buffer; + /* Print the digits to the string. */ + do + { + *p++ = number % 10 + '0'; + number /= 10; + } + while (number); + /* And reverse them. */ + l = p - buffer - 1; + for (i = l/2; i >= 0; i--) + { + char c = buffer[i]; + buffer[i] = buffer[l - i]; + buffer[l - i] = c; + } + buffer[l + 1] = '\0'; +} static void print_vector_internal (CONST char *start, CONST char *end, @@ -911,8 +977,7 @@ write_char_internal ("\\", printcharfun); /* This is correct for Mule because the character is either \ or " */ - write_char_internal ((char *) (string_data (s) + i), - printcharfun); + write_char_internal (string_data (s) + i, printcharfun); } last = i + 1; } @@ -927,41 +992,6 @@ write_char_internal ("\"", printcharfun); } UNGCPRO; - return; -} - -/* 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. */ -void -long_to_string (char *buffer, long number) -{ - char *p; - int i, l; - - if (number < 0) - { - *buffer++ = '-'; - number = -number; - } - p = buffer; - /* Print the digits to the string. */ - do - { - *p++ = number % 10 + '0'; - number /= 10; - } - while (number); - /* And reverse them. */ - l = p - buffer - 1; - for (i = l/2; i >= 0; i--) - { - char c = buffer[i]; - buffer[i] = buffer[l - i]; - buffer[l - i] = c; - } - buffer[l + 1] = '\0'; } static void @@ -988,9 +1018,9 @@ int escapeflag) { char buf[200]; - sprintf (buf, "#<INTERNAL OBJECT (XEmacs bug?) (%s) 0x%p>", + sprintf (buf, "#<INTERNAL OBJECT (XEmacs bug?) (%s) 0x%lx>", XRECORD_LHEADER_IMPLEMENTATION (obj)->name, - (void *) XPNTR (obj)); + (unsigned long) XPNTR (obj)); write_c_string (buf, printcharfun); } @@ -1056,26 +1086,27 @@ { /* God intended that this be #\..., you know. */ Emchar ch = XCHAR (obj); - write_c_string ("?", printcharfun); + char *p = buf; + *p++ = '?'; if (ch == '\n') - strcpy (buf, "\\n"); + *p++ = '\\', *p++ = 'n'; else if (ch == '\r') - strcpy (buf, "\\r"); + *p++ = '\\', *p++ = 'r'; else if (ch == '\t') - strcpy (buf, "\\t"); - else if (ch < 32) { - sprintf (buf, "\\^%c", ch + 64); - if ((ch + 64) == '\\') { - strcat(buf, "\\"); + *p++ = '\\', *p++ = 't'; + else if (ch < 32) + { + *p++ = '\\', *p++ = '^'; + *p++ = ch + 64; + if ((ch + 64) == '\\') + *p++ = '\\'; } - } else if (ch == 127) - strcpy (buf, "\\^?"); + else if (ch == 127) + *p++ = '\\', *p++ = '^', *p++ = '?'; else if (ch >= 128 && ch < 160) { - Bytecount i; - strcpy (buf, "\\^"); - i = set_charptr_emchar ((unsigned char *) (buf + 2), ch + 64); - buf[2+i] = '\0'; + *p++ = '\\', *p++ = '^'; + p += set_charptr_emchar ((Bufbyte *)p, ch + 64); } else if (ch < 127 && !isdigit (ch) @@ -1083,21 +1114,17 @@ && ch != '^') /* must not backslash this or it will be interpreted as the start of a control char */ - sprintf (buf, "\\%c", ch); + *p++ = '\\', *p++ = ch; else - { - Bytecount i; - i = set_charptr_emchar ((unsigned char *) buf, ch); - buf[i] = '\0'; - } - write_c_string (buf, printcharfun); + p += set_charptr_emchar ((Bufbyte *)p, ch); + output_string (printcharfun, (Bufbyte *)buf, Qnil, 0, p - buf); break; } #ifndef LRECORD_STRING case Lisp_Type_String: { - print_string(obj, printcharfun, escapeflag); + print_string (obj, printcharfun, escapeflag); break; } #endif /* ! LRECORD_STRING */ @@ -1125,12 +1152,11 @@ #ifndef LRECORD_VECTOR case Lisp_Type_Vector: { - struct gcpro gcpro1, gcpro2; - /* If deeper than spec'd depth, print placeholder. */ if (INTP (Vprint_level) && print_depth > XINT (Vprint_level)) { + struct gcpro gcpro1, gcpro2; GCPRO2 (obj, printcharfun); write_c_string ("...", printcharfun); UNGCPRO; @@ -1293,7 +1319,7 @@ /* This function can GC */ /* #### Bug!! (intern "") isn't printed in some distinguished way */ /* #### (the reader also loses on it) */ - struct Lisp_String *name = XSYMBOL (obj)->name; + struct Lisp_String *name = symbol_name (XSYMBOL (obj)); Bytecount size = string_length (name); struct gcpro gcpro1, gcpro2; @@ -1372,6 +1398,9 @@ #ifdef LISP_FLOAT_TYPE if (!confusing) + /* #### Ugh, this is needlessly complex and slow for what we + need here. It might be a good idea to copy equivalent code + from FSF. --hniksic */ confusing = isfloat_string ((char *) data); #endif if (confusing) @@ -1406,6 +1435,9 @@ UNGCPRO; } +/* #ifdef DEBUG_XEMACS */ +/* I don't like seeing `Note: Strange doc (not fboundp) for function */ +/* alternate-debugging-output @ 429542' -slb */ int alternate_do_pointer; char alternate_do_string[5000]; @@ -1414,7 +1446,6 @@ This can be used in place of `external-debugging-output' as a function to be passed to `print'. Before calling `print', set `alternate_do_pointer' to 0. - */ (character)) { @@ -1431,6 +1462,7 @@ alternate_do_string[alternate_do_pointer] = 0; return character; } +/* #endif /* DEBUG_XEMACS */ DEFUN ("external-debugging-output", Fexternal_debugging_output, 1, 3, 0, /* Write CHAR-OR-STRING to stderr or stdout. @@ -1502,7 +1534,7 @@ file = Fexpand_file_name (file, Qnil); termscript = fopen ((char *) XSTRING_DATA (file), "w"); if (termscript == NULL) - report_file_error ("Opening termscript", Fcons (file, Qnil)); + report_file_error ("Opening termscript", list1 (file)); } return Qnil; } @@ -1672,9 +1704,7 @@ DEFSUBR (Fexternal_debugging_output); DEFSUBR (Fopen_termscript); defsymbol (&Qexternal_debugging_output, "external-debugging-output"); -#ifndef standalone DEFSUBR (Fwith_output_to_temp_buffer); -#endif /* not standalone */ } void @@ -1784,7 +1814,4 @@ generally be bound with `let' rather than set. (See `display-message'.) */ ); Vprint_message_label = Qprint; - - Vprin1_to_string_stream = Qnil; - staticpro (&Vprin1_to_string_stream); }
--- a/src/process-nt.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/process-nt.c Mon Aug 13 10:31:29 2007 +0200 @@ -30,8 +30,10 @@ #include "lstream.h" #include "process.h" #include "procimpl.h" +#include "sysdep.h" #include <windows.h> +#include <shellapi.h> /* Implemenation-specific data. Pointed to by Lisp_Process->process_data */ struct nt_process_data @@ -124,36 +126,61 @@ /* #### This function completely ignores Vprocess_environment */ +static void +signal_cannot_launch (char* image_file, DWORD err) +{ + mswindows_set_errno (err); + error ("Starting \"%s\": %s", image_file, strerror (errno)); +} + static int nt_create_process (struct Lisp_Process *p, char **argv, CONST char *current_dir) { HANDLE hmyshove, hmyslurp, hprocin, hprocout; LPTSTR command_line; - - /* Create two unidirectional named pipes */ + BOOL do_io, windowed; + + /* Find out whether the application is windowed or not */ { - HANDLE htmp; - SECURITY_ATTRIBUTES sa; - - sa.nLength = sizeof(sa); - sa.bInheritHandle = TRUE; - sa.lpSecurityDescriptor = NULL; + /* SHGetFileInfo tends to return ERROR_FILE_NOT_FOUND on most + errors. This leads to bogus error message. */ + DWORD image_type = SHGetFileInfo (argv[0], 0, NULL, 0, SHGFI_EXETYPE); + if (image_type == 0) + signal_cannot_launch (argv[0], (GetLastError () == ERROR_FILE_NOT_FOUND + ? ERROR_BAD_FORMAT : GetLastError ())); + windowed = HIWORD (image_type) != 0; + } - CreatePipe (&hprocin, &hmyshove, &sa, 0); - CreatePipe (&hmyslurp, &hprocout, &sa, 0); + /* Decide whether to do I/O on process handles, or just mark the + process exited immediately upon successful launching. We do I/O if the + process is a console one, or if it is windowed but windowed_process_io + is non-zero */ + do_io = !windowed || windowed_process_io ; + + if (do_io) + { + /* Create two unidirectional named pipes */ + HANDLE htmp; + SECURITY_ATTRIBUTES sa; - /* Stupid Win32 allows to create a pipe with *both* ends either - inheritable or not. We need process ends inheritable, and local - ends not inheritable. */ - /* #### Perhaps even stupider me does not know how to do this better */ - DuplicateHandle (GetCurrentProcess(), hmyshove, GetCurrentProcess(), &htmp, - 0, FALSE, DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS); - hmyshove = htmp; - DuplicateHandle (GetCurrentProcess(), hmyslurp, GetCurrentProcess(), &htmp, - 0, FALSE, DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS); - hmyslurp = htmp; - } + sa.nLength = sizeof(sa); + sa.bInheritHandle = TRUE; + sa.lpSecurityDescriptor = NULL; + + CreatePipe (&hprocin, &hmyshove, &sa, 0); + CreatePipe (&hmyslurp, &hprocout, &sa, 0); + + /* Stupid Win32 allows to create a pipe with *both* ends either + inheritable or not. We need process ends inheritable, and local + ends not inheritable. */ + DuplicateHandle (GetCurrentProcess(), hmyshove, GetCurrentProcess(), &htmp, + 0, FALSE, DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS); + hmyshove = htmp; + DuplicateHandle (GetCurrentProcess(), hmyslurp, GetCurrentProcess(), &htmp, + 0, FALSE, DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS); + hmyslurp = htmp; + } /* Convert an argv vector into Win32 style command line. @@ -186,74 +213,57 @@ STARTUPINFO si; PROCESS_INFORMATION pi; DWORD err; - BOOL windowed; xzero (si); - si.hStdInput = hprocin; - si.hStdOutput = hprocout; - si.hStdError = hprocout; - si.wShowWindow = SW_HIDE; - si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; - - err = (CreateProcess (NULL, command_line, NULL, NULL, TRUE, - CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP | CREATE_SUSPENDED, - NULL, current_dir, &si, &pi) - ? 0 : GetLastError ()); - - CloseHandle (hprocin); - CloseHandle (hprocout); - - /* See if we succeeded with process creation */ - if (err) + si.dwFlags = STARTF_USESHOWWINDOW; + si.wShowWindow = windowed ? SW_SHOWNORMAL : SW_HIDE; + if (do_io) { - process_error__One_of_those_nasty_uses_for_goto_statement: - CloseHandle (hmyshove); - CloseHandle (hmyslurp); - error ("Cannot start \"%s\": error code was %lu", argv[0], err); + si.hStdInput = hprocin; + si.hStdOutput = hprocout; + si.hStdError = hprocout; + si.dwFlags |= STARTF_USESTDHANDLES; } - /* Determine if the new process is a windowed one */ - windowed = WaitForInputIdle (pi.hProcess, 100) == WAIT_TIMEOUT; - if (windowed) + err = (CreateProcess (NULL, command_line, NULL, NULL, TRUE, + CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP, + NULL, current_dir, &si, &pi) + ? 0 : GetLastError ()); + + if (do_io) { - /* We restart windowed process fire-and forget style, and - indicate successful process creation, just as if the - process ended instantly upon launching */ - CloseHandle (hmyshove); - CloseHandle (hmyslurp); - /* TerminateProcess is safe becuase the process is not yet - running */ - TerminateProcess (pi.hProcess, 0); - si.dwFlags = STARTF_USESHOWWINDOW; - si.wShowWindow = SW_SHOWNORMAL; - if (!CreateProcess (NULL, command_line, NULL, NULL, FALSE, - DETACHED_PROCESS , NULL, current_dir, &si, &pi)) + /* These just have been inherited; we do not need a copy */ + CloseHandle (hprocin); + CloseHandle (hprocout); + } + + /* Handle process creation failure */ + if (err) + { + if (do_io) { - err = GetLastError (); - goto process_error__One_of_those_nasty_uses_for_goto_statement; + CloseHandle (hmyshove); + CloseHandle (hmyslurp); } + signal_cannot_launch (argv[0], GetLastError ()); + } - /* We just launched a windowed process. Fake it as if a - process launched has already ended */ - p->status_symbol = Qexit; - - /* Get rid of process and thread handles */ - CloseHandle (pi.hThread); - CloseHandle (pi.hProcess); + /* The process started successfully */ + if (do_io) + { + NT_DATA(p)->h_process = pi.hProcess; + init_process_io_handles (p, (void*)hmyslurp, (void*)hmyshove, 0); } else { - /* Just started a console subprocess */ - - NT_DATA(p)->h_process = pi.hProcess; - - init_process_io_handles (p, (void*)hmyslurp, (void*)hmyshove, 0); - - /* We created it suspended. Resume the only thread */ - ResumeThread (pi.hThread); - CloseHandle (pi.hThread); + /* Indicate as if the process has exited immediately. */ + p->status_symbol = Qexit; + CloseHandle (pi.hProcess); } + CloseHandle (pi.hThread); + + /* Hack to support Windows 95 negative pids */ return ((int)pi.dwProcessId < 0 ? -(int)pi.dwProcessId : (int)pi.dwProcessId); }
--- a/src/process-unix.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/process-unix.c Mon Aug 13 10:31:29 2007 +0200 @@ -204,9 +204,8 @@ static int allocate_pty (void) { +#ifndef PTY_OPEN struct stat stb; - int c, i; - int fd; /* Some systems name their pseudoterminals so that there are gaps in the usual sequence - for example, on HP9000/S700 systems, there @@ -214,6 +213,10 @@ three failures in a row before deciding that we've reached the end of the ptys. */ int failed_count = 0; +#endif + int i; + int fd; + int c; #ifdef PTY_ITERATION PTY_ITERATION
--- a/src/process.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/process.c Mon Aug 13 10:31:29 2007 +0200 @@ -82,6 +82,9 @@ maybe other values to come. */ Lisp_Object Vprocess_connection_type; +/* Read comments to DEFVAR of this */ +int windowed_process_io; + #ifdef PROCESS_IO_BLOCKING /* List of port numbers or port names to set a blocking I/O mode. Nil means set a non-blocking I/O mode [default]. */ @@ -2011,6 +2014,26 @@ */ ); Vprocess_connection_type = Qt; + DEFVAR_BOOL ("windowed-process-io", &windowed_process_io /* +Enables input/ouptut on standard handles of a windowed process. +When this variable is nil (the default), XEmacs does not attempt to read +standard output handle of a windowed process. Instead, the process is +immediately marked as exited immediately upon successful launching. This is +done because normal windowed processes do not use stadnard I/O, as they are +not connected to any console. + +When launching a specially crafted windowed process, which expects to be +launched by XEmacs, or by other program which pipes its standard input and +output, this variable must be set to non-nil, in which case XEmacs will +treat this process just like a console process. + +NOTE: You should never set this variable, only bind it. + +Only Windows processes can be "windowed" or "console". This variable has no +effect on UNIX processes, because all UNIX processes are "console". +*/ ); + windowed_process_io = 0; + #ifdef PROCESS_IO_BLOCKING DEFVAR_LISP ("network-stream-blocking-port-list", &network_stream_blocking_port_list /* List of port numbers or port names to set a blocking I/O mode with connection.
--- a/src/procimpl.h Mon Aug 13 10:30:38 2007 +0200 +++ b/src/procimpl.h Mon Aug 13 10:31:29 2007 +0200 @@ -166,6 +166,8 @@ extern volatile int process_tick; +extern int windowed_process_io; + #ifdef HAVE_MULTICAST extern Lisp_Object Qmulticast; #endif
--- a/src/redisplay-msw.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/redisplay-msw.c Mon Aug 13 10:31:29 2007 +0200 @@ -821,6 +821,12 @@ use them we'll blow up. We mark the frame as changed to ensure that redisplay will do a full update. This probably isn't necessary but it can't hurt. */ +#ifdef HAVE_TOOLBARS + /* #### We would rather put these off as well but there is currently + no combination of flags which will force an unchanged toolbar to + redraw anyhow. */ + MAYBE_FRAMEMETH (f, redraw_exposed_toolbars, (f, x, y, width, height)); +#endif if (!f->window_face_cache_reset) {
--- a/src/s/cygwin32.h Mon Aug 13 10:30:38 2007 +0200 +++ b/src/s/cygwin32.h Mon Aug 13 10:31:29 2007 +0200 @@ -82,12 +82,26 @@ extern int cygwin32_posix_to_win32_path_list_buf_size(const char*); struct timeval; struct timezone; +struct itimerval; +struct stat; extern int gettimeofday(struct timeval *tp, struct timezone *tzp); extern int gethostname (char* name, int namelen); extern char* mktemp(char *); extern double logb(double); extern void sync(); extern int ioctl(int, int, ...); + /* sys/stat.h */ +extern int lstat(const char *path, struct stat *buf); + /* unistd.h */ +extern int readlink(const char *path, void *buf, unsigned int bufsiz); +extern int symlink(const char *name1, const char *name2); + /* sys/time.h */ +extern int setitimer(int which, const struct itimerval *value, + struct itimerval *ovalue); +extern int utimes(char *file, struct timeval *tvp); + +extern int srandom( unsigned seed); +extern long random(); #endif #ifdef HAVE_MS_WINDOWS @@ -99,9 +113,10 @@ #define ORDINARY_LINK #endif -#define C_SWITCH_SYSTEM -Wno-sign-compare -Wno-implicit -fno-caller-saves +#define C_SWITCH_SYSTEM -Wno-sign-compare -fno-caller-saves #define LIBS_SYSTEM -lwinmm +#define ICC_BAR_CLASSES 4 #define SIF_TRACKPOS 0x0010 #define FW_BLACK FW_HEAVY #define FW_ULTRABOLD FW_EXTRABOLD @@ -133,12 +148,6 @@ #define OBJECTS_SYSTEM ntplay.o #define HAVE_NATIVE_SOUND -#ifndef CYGWIN_B19 -#define TMPF_FIXED_PITCH 0x01 -#define SIGPROF 0 -#define SIGWINCH 0 -#endif - #undef MAIL_USE_SYSTEM_LOCK #define MAIL_USE_POP @@ -178,6 +187,10 @@ /* Text does precede data space, but this is never a safe assumption. */ #define VIRT_ADDR_VARIES +/* set this if you have a new version of cygwin +#define DATA_SEG_BITS 0x10000000 +*/ + /* If you are compiling with a non-C calling convention but need to declare vararg routines differently, put it here */ #define _VARARGS_ __cdecl
--- a/src/s/irix4-0.h Mon Aug 13 10:30:38 2007 +0200 +++ b/src/s/irix4-0.h Mon Aug 13 10:31:29 2007 +0200 @@ -35,6 +35,7 @@ #define PTY_OPEN \ { \ char *name; \ + struct stat stb; \ EMACS_BLOCK_SIGCHLD; \ name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \ EMACS_UNBLOCK_SIGCHLD; \
--- a/src/s/irix5-0.h Mon Aug 13 10:30:38 2007 +0200 +++ b/src/s/irix5-0.h Mon Aug 13 10:31:29 2007 +0200 @@ -42,6 +42,7 @@ #define PTY_OPEN \ { \ char *name; \ + struct stat stb; \ EMACS_BLOCK_SIGCHLD; \ name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \ EMACS_UNBLOCK_SIGCHLD; \
--- a/src/select-msw.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/select-msw.c Mon Aug 13 10:31:29 2007 +0200 @@ -121,7 +121,7 @@ do { /* copy next line or remaining bytes excluding '\0' */ - next = _memccpy (dst, src, '\r', rawsize); + next = memccpy (dst, src, '\r', rawsize); if (next) { /* copied one line ending with '\r' */
--- a/src/sheap.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/sheap.c Mon Aug 13 10:31:29 2007 +0200 @@ -22,6 +22,7 @@ #include <stdio.h> #include "lisp.h" #include <stddef.h> +#include <unistd.h> #include <sheap-adjust.h> #define STATIC_HEAP_BASE 0x600000
--- a/src/signal.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/signal.c Mon Aug 13 10:31:29 2007 +0200 @@ -180,7 +180,7 @@ it needs to stay the way it is. */ quit_check_signal_happened = 1; -#ifdef _WIN32 +#ifdef WINDOWSNT can_break_system_calls = 0; #else /* can_break_system_calls is set when we want to break out of
--- a/src/symsinit.h Mon Aug 13 10:30:38 2007 +0200 +++ b/src/symsinit.h Mon Aug 13 10:31:29 2007 +0200 @@ -90,6 +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_mswindows (void); void syms_of_glyphs (void); void syms_of_gui_x (void); @@ -185,6 +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_x (void); void image_instantiator_format_create_glyphs_mswindows (void); @@ -249,6 +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_mswindows (void); void vars_of_glyphs (void); void vars_of_gui_x (void);
--- a/src/toolbar-msw.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/toolbar-msw.c Mon Aug 13 10:31:29 2007 +0200 @@ -31,6 +31,7 @@ #include "toolbar.h" #include "window.h" #include "gui.h" +#include "elhash.h" #include "console-msw.h" #include "glyphs-msw.h" #include "objects-msw.h" @@ -39,9 +40,13 @@ #define TOOLBAR_ITEM_ID_MIN 0x4000 #define TOOLBAR_ITEM_ID_MAX 0x7FFF #define TOOLBAR_ITEM_ID_BITS(x) (((x) & 0x3FFF) | 0x4000) +#define TOOLBAR_ID_BIAS 16 +#define TOOLBAR_HANDLE(f,p) \ +GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS + p) #ifndef TB_SETIMAGELIST #define TB_SETIMAGELIST (WM_USER + 48) #define TB_GETIMAGELIST (WM_USER + 49) +#define TB_SETPADDING (WM_USER + 87) #endif #define SET_TOOLBAR_WAS_VISIBLE_FLAG(frame, pos, flag) \ @@ -66,7 +71,8 @@ } while (0) static int -allocate_toolbar_item_id (struct frame* f, struct toolbar_button* button) +allocate_toolbar_item_id (struct frame* f, struct toolbar_button* button, + enum toolbar_pos pos) { /* hmm what do we generate an id based on */ int id = TOOLBAR_ITEM_ID_BITS (internal_hash (button->callback, 0)); @@ -83,24 +89,37 @@ int thickness_change) { HIMAGELIST ilist=NULL; - if (FRAME_MSWINDOWS_TOOLBAR (f)) + int i; + HWND toolbarwnd = TOOLBAR_HANDLE(f, pos); + if (toolbarwnd) { - /* get the image list and delete it */ - SendMessage (FRAME_MSWINDOWS_TOOLBAR (f), - TB_GETIMAGELIST, 0, - (LONG) &ilist); + TBBUTTON info; - /* destroy the toolbar window */ - DestroyWindow (FRAME_MSWINDOWS_TOOLBAR (f)); - FRAME_MSWINDOWS_TOOLBAR (f) = 0; - + /* delete the buttons and remove the command from the hashtable*/ + i = SendMessage (toolbarwnd, TB_BUTTONCOUNT, 0, 0); + for (i--; i >= 0; i--) + { + SendMessage (toolbarwnd, TB_GETBUTTON, (WPARAM)i, + (LPARAM)&info); + Fremhash(make_int(info.idCommand), + FRAME_MSWINDOWS_TOOLBAR_HASHTABLE(f)); + SendMessage (toolbarwnd, TB_DELETEBUTTON, (WPARAM)i, 0); + } + /* finally get rid of the image list assuming it clears up its bitmaps */ + SendMessage (toolbarwnd, TB_GETIMAGELIST, 0, (LONG) &ilist); if (ilist) { ImageList_Destroy(ilist); } + SendMessage (toolbarwnd, TB_SETIMAGELIST, 0, (LPARAM)NULL); + + ShowWindow(toolbarwnd, SW_HIDE); } + + FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)=0; + SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 0); } static void @@ -111,24 +130,34 @@ int border_width = FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, pos); Lisp_Object button, window, glyph, instance; int nbuttons=0; + int shadow_thickness = 2; /* get this from somewhere else? */ + int window_frame_width = 3; + unsigned int checksum=0; struct window *w; TBBUTTON* button_tbl, *tbbutton; HIMAGELIST ilist=NULL; + HWND toolbarwnd=NULL; get_toolbar_coords (f, pos, &x, &y, &bar_width, &bar_height, &vert, 0); + + if (x==1) + x=0; + window = FRAME_LAST_NONMINIBUF_WINDOW (f); w = XWINDOW (window); + toolbarwnd = TOOLBAR_HANDLE(f,pos); + /* set button sizes based on bar size */ if (vert) { - width = height = bar_width - border_width * 2; - bmwidth = bmheight = width -2; + width = height = bar_width; + bmwidth = bmheight = width - (border_width + shadow_thickness) * 2; } else { - height = width = bar_height - border_width * 2; - bmwidth = bmheight = width -2; + height = width = bar_height - window_frame_width * 2; + bmwidth = bmheight = width - (border_width + shadow_thickness) * 2; } button = FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons; @@ -140,132 +169,249 @@ while (!NILP (button)) { struct toolbar_button *tb = XTOOLBAR_BUTTON (button); + checksum = HASH3 (checksum, + internal_hash (get_toolbar_button_glyph(w, tb), 0), + internal_hash (tb->callback, 0)); button = tb->next; nbuttons++; } - /* build up the data required by win32 fns. */ - button_tbl = xnew_array_and_zero (TBBUTTON, nbuttons); - button = FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons; - tbbutton = button_tbl; - - while (!NILP (button)) + /* only rebuild if something has changed */ + if (!toolbarwnd || FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)!=checksum) { - struct toolbar_button *tb = XTOOLBAR_BUTTON (button); + /* remove the old one */ + mswindows_clear_toolbar (f, pos, 0); - tbbutton->idCommand = allocate_toolbar_item_id (f, tb); - tbbutton->fsState=tb->enabled ? TBSTATE_ENABLED : TBSTATE_INDETERMINATE; - tbbutton->fsStyle=tb->blank ? TBSTYLE_SEP : TBSTYLE_BUTTON; - tbbutton->dwData=0; - tbbutton->iString=0; - - /* mess with the button image */ - glyph = get_toolbar_button_glyph (w, tb); + FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)=checksum; - if (GLYPHP (glyph)) - instance = glyph_image_instance (glyph, window, ERROR_ME_NOT, 1); - else - instance = Qnil; - - if (IMAGE_INSTANCEP (instance)) - { - struct Lisp_Image_Instance* p = XIMAGE_INSTANCE (instance); + /* build up the data required by win32 fns. */ + button_tbl = xnew_array_and_zero (TBBUTTON, nbuttons); + button = FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons; + tbbutton = button_tbl; - if (IMAGE_INSTANCE_PIXMAP_TYPE_P (p)) + while (!NILP (button)) + { + struct toolbar_button *tb = XTOOLBAR_BUTTON (button); + + tbbutton->idCommand = allocate_toolbar_item_id (f, tb, pos); + tbbutton->fsState=tb->enabled ? TBSTATE_ENABLED + : TBSTATE_INDETERMINATE; + tbbutton->fsStyle=tb->blank ? TBSTYLE_SEP : TBSTYLE_BUTTON; + tbbutton->dwData=0; + tbbutton->iString=0; + + /* note that I am not doing the button size here. This is + because it is slightly out of my control and the main + place they are used is in redisplay for getting events + over toolbar buttons. Since the right way to do help echo + is with tooltips I'm not going to bother with the extra + work involved. */ + + /* mess with the button image */ + glyph = get_toolbar_button_glyph (w, tb); + + if (GLYPHP (glyph)) + instance = glyph_image_instance (glyph, window, ERROR_ME_NOT, 1); + else + instance = Qnil; + + if (IMAGE_INSTANCEP (instance)) { - /* we are going to honour the toolbar settings and - resize the bitmaps accordingly */ + struct Lisp_Image_Instance* p = XIMAGE_INSTANCE (instance); - if ((IMAGE_INSTANCE_PIXMAP_WIDTH (p) != bmwidth - || - IMAGE_INSTANCE_PIXMAP_HEIGHT (p) != bmheight) - && - !mswindows_resize_dibitmap_instance (p, f, - bmwidth, bmheight)) + if (IMAGE_INSTANCE_PIXMAP_TYPE_P (p)) { - xfree (button_tbl); - if (ilist) ImageList_Destroy (ilist); - signal_simple_error ("couldn't resize pixmap", - instance); - } + /* we are going to honour the toolbar settings and + resize the bitmaps accordingly */ + + if (IMAGE_INSTANCE_PIXMAP_WIDTH (p) > bmwidth + || + IMAGE_INSTANCE_PIXMAP_HEIGHT (p) > bmheight) + { + if (!mswindows_resize_dibitmap_instance + (p, f, bmwidth, bmheight)) + { + xfree (button_tbl); + if (ilist) ImageList_Destroy (ilist); + signal_simple_error ("couldn't resize pixmap", + instance); + } + } + else + { + bmwidth = IMAGE_INSTANCE_PIXMAP_WIDTH (p); + bmheight = IMAGE_INSTANCE_PIXMAP_HEIGHT (p); + } - /* need to build an image list for the bitmaps */ - if (!ilist) - { - if (!(ilist = ImageList_Create - ( IMAGE_INSTANCE_PIXMAP_WIDTH (p), - IMAGE_INSTANCE_PIXMAP_HEIGHT (p), - ILC_COLOR24, - nbuttons, - nbuttons * 2 ))) + /* need to build an image list for the bitmaps */ + if (!ilist) + { + if (!(ilist = ImageList_Create + ( IMAGE_INSTANCE_PIXMAP_WIDTH (p), + IMAGE_INSTANCE_PIXMAP_HEIGHT (p), + ILC_COLOR24, + nbuttons, + nbuttons * 2 ))) + { + xfree (button_tbl); + signal_simple_error ("couldn't create image list", + instance); + } + } + + /* add a bitmap to the list */ + if ((tbbutton->iBitmap = + ImageList_Add (ilist, + IMAGE_INSTANCE_MSWINDOWS_BITMAP (p), + IMAGE_INSTANCE_MSWINDOWS_MASK (p))) < 0) { xfree (button_tbl); - signal_simple_error ("couldn't create image list", + if (ilist) ImageList_Destroy (ilist); + signal_simple_error ("image list creation failed", instance); } } - - /* add a bitmap to the list */ - if ((tbbutton->iBitmap = - ImageList_Add (ilist, - IMAGE_INSTANCE_MSWINDOWS_BITMAP (p), - IMAGE_INSTANCE_MSWINDOWS_MASK (p))) < 0) - { - xfree (button_tbl); - if (ilist) ImageList_Destroy (ilist); - signal_simple_error ("image list creation failed", - instance); - } } + + Fputhash (make_int (tbbutton->idCommand), + button, FRAME_MSWINDOWS_TOOLBAR_HASHTABLE (f)); + + tbbutton++; + button = tb->next; + } + + button = FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons; + + /* create the toolbar window? */ + if (!toolbarwnd + && + (toolbarwnd = + CreateWindowEx ( WS_EX_WINDOWEDGE, + TOOLBARCLASSNAME, + NULL, + WS_CHILD | WS_VISIBLE | WS_DLGFRAME | TBSTYLE_TOOLTIPS + | CCS_NORESIZE | CCS_NOPARENTALIGN | CCS_NODIVIDER, + x, y, bar_width, bar_height, + FRAME_MSWINDOWS_HANDLE (f), + (HMENU)(TOOLBAR_ID_BIAS + pos), + NULL, + NULL))==NULL) + { + xfree (button_tbl); + ImageList_Destroy (ilist); + error ("couldn't create toolbar"); + } +#if 0 + SendMessage (toolbarwnd, TB_SETPADDING, + 0, MAKELPARAM(border_width, border_width)); +#endif + /* finally populate with images */ + if (SendMessage (toolbarwnd, TB_BUTTONSTRUCTSIZE, + (WPARAM)sizeof(TBBUTTON), (LPARAM)0) == -1) + { + mswindows_clear_toolbar (f, pos, 0); + error ("couldn't set button structure size"); + } + + /* set the size of buttons */ + SendMessage (toolbarwnd, TB_SETBUTTONSIZE, 0, + (LPARAM)MAKELONG (width, height)); + + /* set the size of bitmaps */ + SendMessage (toolbarwnd, TB_SETBITMAPSIZE, 0, + (LPARAM)MAKELONG (bmwidth, bmheight)); + + /* finally populate with images */ + if (!SendMessage (toolbarwnd, TB_ADDBUTTONS, + (WPARAM)nbuttons, (LPARAM)button_tbl)) + { + mswindows_clear_toolbar (f, pos, 0); + error ("couldn't add button list to toolbar"); + } + + /* vertical toolbars need more rows */ + if (vert) + { + SendMessage (toolbarwnd, TB_SETROWS, + MAKEWPARAM(nbuttons, FALSE), 0); + } + + else + { + SendMessage (toolbarwnd, TB_SETROWS, MAKEWPARAM(1, FALSE), 0); } - Fputhash (make_int (tbbutton->idCommand), - tb->callback, FRAME_MSWINDOWS_TOOLBAR_HASHTABLE (f)); - - tbbutton++; - button = tb->next; - } + /* finally populate with images */ + if (SendMessage (toolbarwnd, TB_SETIMAGELIST, 0, + (LPARAM)ilist) == -1) + { + mswindows_clear_toolbar (f, pos, 0); + error ("couldn't add image list to toolbar"); + } - button = FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons; + /* now display the window */ + ShowWindow (toolbarwnd, SW_SHOW); - /* now create the toolbar ... */ - if ((FRAME_MSWINDOWS_TOOLBAR (f) = - CreateToolbarEx (FRAME_MSWINDOWS_HANDLE (f), - TBSTYLE_ALTDRAG | WS_CHILD, - NULL, - nbuttons, - 0, - 0, - button_tbl, - nbuttons, - width, height, - bmwidth, bmheight, - sizeof(TBBUTTON) )) == NULL) + if (button_tbl) xfree (button_tbl); + + SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 1); + } +} + +static void +mswindows_move_toolbar (struct frame *f, enum toolbar_pos pos) +{ + int bar_x, bar_y, bar_width, bar_height, vert; + HWND toolbarwnd = TOOLBAR_HANDLE(f,pos); + + if (toolbarwnd) { - xfree (button_tbl); - ImageList_Destroy (ilist); - error ("couldn't create toolbar"); - } + get_toolbar_coords (f, pos, &bar_x, &bar_y, &bar_width, &bar_height, + &vert, 1); - /* finally populate with images */ - if (SendMessage (FRAME_MSWINDOWS_TOOLBAR (f), TB_SETIMAGELIST, NULL, - (LPARAM)ilist) == -1) - { - mswindows_clear_toolbar (f, pos, 0); - error ("couldn't add image list to toolbar"); + /* #### This terrible mangling with coordinates perhaps + arises from different treatment of toolbar positions + by Windows and by XEmacs. */ + switch (pos) + { + case TOP_TOOLBAR: + bar_x -= 2; bar_y--; + bar_width += 2; bar_height++; + break; + case LEFT_TOOLBAR: + bar_x -= 2; bar_y--; + bar_width++; bar_height++; + break; + case BOTTOM_TOOLBAR: + bar_x--; + bar_width++; + break; + case RIGHT_TOOLBAR: + bar_y--; + break; + } + SetWindowPos (toolbarwnd, NULL, bar_x, bar_y, + bar_width + 1, bar_height + 1, SWP_NOZORDER); } +} - /* now move the window */ - SetWindowPos (FRAME_MSWINDOWS_TOOLBAR (f), HWND_TOP, x, y, - bar_width, bar_height, - SWP_SHOWWINDOW); -#if 0 - ShowWindow (FRAME_MSWINDOWS_TOOLBAR (f), SW_SHOWNORMAL); -#endif +static void +mswindows_redraw_exposed_toolbars (struct frame *f, int x, int y, int width, + int height) +{ + assert (FRAME_MSWINDOWS_P (f)); + + if (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f)) + mswindows_move_toolbar (f, TOP_TOOLBAR); - if (button_tbl) xfree (button_tbl); + if (FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f)) + mswindows_move_toolbar (f, BOTTOM_TOOLBAR); - SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 1); + if (FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f)) + mswindows_move_toolbar (f, LEFT_TOOLBAR); + + if (FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f)) + mswindows_move_toolbar (f, RIGHT_TOOLBAR); } static void @@ -303,7 +449,51 @@ static void mswindows_free_frame_toolbars (struct frame *f) { - mswindows_clear_toolbar(f, 0, 0); + HWND twnd=NULL; +#define DELETE_TOOLBAR(pos) \ + mswindows_clear_toolbar(f, 0, pos); \ + if ((twnd=GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS + pos))) \ + DestroyWindow(twnd) + + DELETE_TOOLBAR(TOP_TOOLBAR); + DELETE_TOOLBAR(BOTTOM_TOOLBAR); + DELETE_TOOLBAR(LEFT_TOOLBAR); + DELETE_TOOLBAR(RIGHT_TOOLBAR); +#undef DELETE_TOOLBAR +} + +/* map toolbar hwnd to pos*/ +int mswindows_find_toolbar_pos(struct frame* f, HWND ctrl) +{ +#if 1 + int id = GetDlgCtrlID(ctrl); + return id ? id - TOOLBAR_ID_BIAS : -1; +#else + if (GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS) == ctrl) + return 0; + else if (GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS +1) == ctrl) + return 1; + else if (GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS +2) == ctrl) + return 2; + else if (GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS +3) == ctrl) + return 3; + else + assert(0); +#endif +} + +Lisp_Object +mswindows_get_toolbar_button_text ( struct frame* f, int command_id ) +{ + Lisp_Object button = Fgethash (make_int (command_id), + FRAME_MSWINDOWS_TOOLBAR_HASHTABLE (f), Qnil); + + if (!NILP (button)) + { + struct toolbar_button *tb = XTOOLBAR_BUTTON (button); + return tb->help_string; + } + return Qnil; } /* @@ -313,19 +503,23 @@ * command if we return nil */ Lisp_Object -mswindows_handle_toolbar_wm_command (struct frame* f, WORD id) +mswindows_handle_toolbar_wm_command (struct frame* f, HWND ctrl, WORD id) { /* Try to map the command id through the proper hash table */ - Lisp_Object command, funcsym, frame; + Lisp_Object button, command, funcsym, frame; struct gcpro gcpro1; + + button = Fgethash (make_int (id), + FRAME_MSWINDOWS_TOOLBAR_HASHTABLE (f), Qnil); - command = Fgethash (make_int (id), - FRAME_MSWINDOWS_TOOLBAR_HASHTABLE (f), Qunbound); - if (UNBOUNDP (command)) - { - return Qnil; - } + if (NILP (button)) + return Qnil; + command = XTOOLBAR_BUTTON(button)->callback; + + if (UNBOUNDP(command)) + return Qnil; + /* Need to gcpro because the hashtable may get destroyed by menu_cleanup(), and will not gcpro the command any more */ @@ -363,5 +557,6 @@ CONSOLE_HAS_METHOD (mswindows, output_frame_toolbars); CONSOLE_HAS_METHOD (mswindows, initialize_frame_toolbars); CONSOLE_HAS_METHOD (mswindows, free_frame_toolbars); + CONSOLE_HAS_METHOD (mswindows, redraw_exposed_toolbars); }
--- a/src/toolbar.h Mon Aug 13 10:30:38 2007 +0200 +++ b/src/toolbar.h Mon Aug 13 10:31:29 2007 +0200 @@ -114,7 +114,7 @@ #define MSWINDOWS_DEFAULT_TOOLBAR_HEIGHT 37 #define MSWINDOWS_DEFAULT_TOOLBAR_WIDTH 40 -#define MSWINDOWS_DEFAULT_TOOLBAR_BORDER_WIDTH 6 +#define MSWINDOWS_DEFAULT_TOOLBAR_BORDER_WIDTH 0 #define DEFAULT_TOOLBAR_HEIGHT 37 #define DEFAULT_TOOLBAR_WIDTH 40 #define DEFAULT_TOOLBAR_BLANK_SIZE 8
--- a/src/unexcw.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/unexcw.c Mon Aug 13 10:31:29 2007 +0200 @@ -67,6 +67,7 @@ /* Cached info about the .bss section in the executable. */ void* bss_start = UNINIT_PTR; unsigned long bss_size = UNINIT_LONG; +int sections_reversed = 0; FILHDR f_hdr; PEAOUTHDR f_ohdr; SCNHDR f_data, f_bss, f_text, f_nextdata; @@ -155,11 +156,12 @@ PERROR (a_name); } } - /* Loop through .data & .bss section headers, copying them in */ + /* Loop through .data & .bss section headers, copying them in. + With newer lds these are reversed so we have to cope with both */ lseek (a_out, sizeof (f_hdr) + f_hdr.f_opthdr, 0); if (read (a_out, &f_text, sizeof (f_text)) != sizeof (f_text) - && + || strcmp (f_text.s_name, ".text")) { PERROR ("no .text section"); @@ -167,12 +169,40 @@ /* The .bss section. */ if (read (a_out, &f_bss, sizeof (f_bss)) != sizeof (f_bss) - && - strcmp (f_bss.s_name, ".bss")) + || + (strcmp (f_bss.s_name, ".bss") && strcmp (f_bss.s_name, ".data"))) { - PERROR ("no .bss section"); + PERROR ("no .bss / .data section"); + } + + /* check for reversed .bss and .data */ + if (!strcmp(f_bss.s_name, ".data")) + { + printf(".data and .bss reversed\n"); + sections_reversed = 1; + memcpy(&f_data, &f_bss, sizeof(f_bss)); } + /* The .data section. */ + if (!sections_reversed) + { + if (read (a_out, &f_data, sizeof (f_data)) != sizeof (f_data) + || + strcmp (f_data.s_name, ".data")) + { + PERROR ("no .data section"); + } + } + else + { + if (read (a_out, &f_bss, sizeof (f_bss)) != sizeof (f_bss) + || + strcmp (f_bss.s_name, ".bss")) + { + PERROR ("no .bss section"); + } + } + bss_start = (void *) ((char*)f_ohdr.ImageBase + f_bss.s_vaddr); bss_size = (unsigned long)((char*)&my_ebss-(char*)bss_start); @@ -180,14 +210,6 @@ printf("found bss - keeping %lx of %lx bytes\n", bss_size, f_ohdr.bsize); /* The .data section. */ - if (read (a_out, &f_data, sizeof (f_data)) != sizeof (f_data) - && - strcmp (f_data.s_name, ".data")) - { - PERROR ("no .data section"); - } - - /* The .data section. */ data_start_va = (void *) ((char*)f_ohdr.ImageBase + f_data.s_vaddr); /* We want to only write Emacs data back to the executable, @@ -195,8 +217,9 @@ then a dumped Emacs won't run on system versions other than the one Emacs was dumped on). */ data_size = (unsigned long)my_edata - (unsigned long)data_start_va; + printf("found data - keeping %lx of %lx bytes\n", data_size, f_ohdr.dsize); - /* The following data section. */ + /* The following data section - often .idata */ if (read (a_out, &f_nextdata, sizeof (f_nextdata)) != sizeof (f_nextdata) && strcmp (&f_nextdata.s_name[2], "data")) @@ -211,8 +234,13 @@ copy_executable_and_dump_data_section (int a_out, int a_new) { long size=0; - unsigned long new_data_size, new_bss_size, f_data_s_vaddr, - file_sz_change, f_data_s_scnptr, bss_padding; + unsigned long new_data_size, new_bss_size, + bss_padding, file_sz_change, data_padding=0, + f_data_s_vaddr = f_data.s_vaddr, + f_data_s_scnptr = f_data.s_scnptr, + f_bss_s_vaddr = f_bss.s_vaddr, + f_nextdata_s_scnptr = f_nextdata.s_scnptr; + int i; void* empty_space; extern int static_heap_dumped; @@ -230,14 +258,27 @@ f_data.s_vaddr is f_bss.s_vaddr f_data.s_size is new dsize maybe. what about s_paddr & s_scnptr? */ + /* this is the amount the file increases in size */ - new_bss_size=f_data.s_vaddr - f_bss.s_vaddr; - file_sz_change=new_bss_size; - new_data_size=f_ohdr.dsize + new_bss_size; - f_data_s_scnptr = f_data.s_scnptr; - f_data_s_vaddr = f_data.s_vaddr; - f_data.s_vaddr = f_bss.s_vaddr; - f_data.s_paddr += new_bss_size; + if (!sections_reversed) + { + new_bss_size = f_data.s_vaddr - f_bss.s_vaddr; + data_padding = 0; + } + else + { + new_bss_size = f_nextdata.s_vaddr - f_bss.s_vaddr; + data_padding = (f_bss.s_vaddr - f_data.s_vaddr) - f_data.s_size; + } + + file_sz_change=new_bss_size + data_padding; + new_data_size=f_ohdr.dsize + file_sz_change; + + if (!sections_reversed) + { + f_data.s_vaddr = f_bss.s_vaddr; + } + f_data.s_paddr += file_sz_change; #if 0 if (f_data.s_size + f_nextdata.s_size != f_ohdr.dsize) { @@ -245,7 +286,7 @@ f_data.s_size + f_nextdata.s_size, f_ohdr.dsize); } #endif - f_data.s_size += new_bss_size; + f_data.s_size += file_sz_change; lseek (a_new, 0, SEEK_SET); /* write file header */ f_hdr.f_symptr += file_sz_change; @@ -331,24 +372,27 @@ CHECK_AOUT_POS(f_data_s_scnptr); - /* dump bss + padding between sections */ - printf ("dumping .bss into executable... %lx bytes\n", bss_size); - if (write(a_new, bss_start, bss_size) != (int)bss_size) + if (!sections_reversed) { - PERROR("failed to write bss section"); + /* dump bss + padding between sections */ + printf ("dumping .bss into executable... %lx bytes\n", bss_size); + if (write(a_new, bss_start, bss_size) != (int)bss_size) + { + PERROR("failed to write bss section"); + } + + /* pad, needs to be zero */ + bss_padding = new_bss_size - bss_size; + printf ("padding .bss ... %lx bytes\n", bss_padding); + empty_space = malloc(bss_padding); + memset(empty_space, 0, bss_padding); + if (write(a_new, empty_space, bss_padding) != (int)bss_padding) + { + PERROR("failed to write bss section"); + } + free(empty_space); } - /* pad, needs to be zero */ - bss_padding = new_bss_size - bss_size; - printf ("padding .bss ... %lx bytes\n", bss_padding); - empty_space = malloc(bss_padding); - memset(empty_space, 0, bss_padding); - if (write(a_new, empty_space, bss_padding) != (int)bss_padding) - { - PERROR("failed to write bss section"); - } - free(empty_space); - /* tell dumped version not to free pure heap */ static_heap_dumped = 1; /* Get a pointer to the raw data in our address space. */ @@ -361,11 +405,48 @@ static_heap_dumped = 0; size = lseek(a_out, f_data_s_scnptr + data_size, SEEK_SET); - size = f_nextdata.s_scnptr - size; - dup_file_area(a_out, a_new, size); + + if (!sections_reversed) + { + size = f_nextdata_s_scnptr - size; + dup_file_area(a_out, a_new, size); + } + else + { + /* need to bad to bss with data in file */ + printf ("padding .data ... %lx bytes\n", data_padding); + size = (f_bss_s_vaddr - f_data_s_vaddr) - data_size; + dup_file_area(a_out, a_new, size); - // lseek(a_out, f_nextdata.s_scnptr, SEEK_CUR); - CHECK_AOUT_POS(f_nextdata.s_scnptr); + /* dump bss + padding between sections */ + printf ("dumping .bss into executable... %lx bytes\n", bss_size); + if (write(a_new, bss_start, bss_size) != (int)bss_size) + { + PERROR("failed to write bss section"); + } + + /* pad, needs to be zero */ + bss_padding = new_bss_size - bss_size; + printf ("padding .bss ... %lx bytes\n", bss_padding); + empty_space = malloc(bss_padding); + memset(empty_space, 0, bss_padding); + if (write(a_new, empty_space, bss_padding) != (int)bss_padding) + { + PERROR("failed to write bss section"); + } + free(empty_space); + if (lseek(a_new, 0, SEEK_CUR) != f_nextdata.s_scnptr) + { + printf("at %lx should be at %lx\n", + lseek(a_new, 0, SEEK_CUR), + f_nextdata.s_scnptr); + PERROR("file positioning error\n"); + } + lseek(a_out, f_nextdata_s_scnptr, SEEK_SET); + } + + CHECK_AOUT_POS(f_nextdata_s_scnptr); + /* now dump - nextdata don't need to do this cygwin ds is in .data! */ printf ("dumping following data section... %lx bytes\n", f_nextdata.s_size); @@ -374,8 +455,8 @@ /* write rest of file */ printf ("writing rest of file\n"); size = lseek(a_out, 0, SEEK_END); - size = size - (f_nextdata.s_scnptr + f_nextdata.s_size); /* length remaining in a_out */ - lseek(a_out, f_nextdata.s_scnptr + f_nextdata.s_size, SEEK_SET); + size = size - (f_nextdata_s_scnptr + f_nextdata.s_size); /* length remaining in a_out */ + lseek(a_out, f_nextdata_s_scnptr + f_nextdata.s_size, SEEK_SET); dup_file_area(a_out, a_new, size); }
--- a/src/unexelfsgi.c Mon Aug 13 10:30:38 2007 +0200 +++ b/src/unexelfsgi.c Mon Aug 13 10:31:29 2007 +0200 @@ -584,7 +584,7 @@ if (noerror) return -1; else - fatal ("Can't find .bss in %s.\n", file_name, 0); + fatal ("Can't find .bss in %s.\n", file_name); } return idx; @@ -626,7 +626,7 @@ l_Elf_Addr new_data2_addr; l_Elf_Addr new_offsets_shift; - int n, nn, old_bss_index, old_data_index, new_data2_index; + int n, nn, old_bss_index, old_data_index; int old_mdebug_index, old_sbss_index; struct stat stat_buf; @@ -713,7 +713,7 @@ #endif if ((unsigned) new_bss_addr < (unsigned) old_bss_addr + old_bss_size) - fatal (".bss shrank when undumping???\n", 0, 0); + fatal (".bss shrank when undumping???\n"); /* Set the output file to the right size and mmap it. Set pointers to various interesting objects. stat_buf still has @@ -758,6 +758,7 @@ new_file_h->e_shoff += new_offsets_shift; new_file_h->e_shnum += 1; + #ifdef DEBUG fprintf (stderr, "Old section offset %x\n", old_file_h->e_shoff); fprintf (stderr, "Old section count %d\n", old_file_h->e_shnum); @@ -782,7 +783,7 @@ /* Supposedly this condition is okay for the SGI. */ #if 0 if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz > old_base_addr) - fatal ("Program segment above .bss in %s\n", old_name, 0); + fatal ("Program segment above .bss in %s\n", old_name); #endif if (NEW_PROGRAM_H (n).p_type == PT_LOAD @@ -794,7 +795,7 @@ } if (n < 0) fatal ("Couldn't find segment next to %s in %s\n", - old_sbss_index == -1 ? ".sbss" : ".bss", old_name, 0); + old_sbss_index == -1 ? ".sbss" : ".bss", old_name); NEW_PROGRAM_H (n).p_filesz += new_offsets_shift; NEW_PROGRAM_H (n).p_memsz = NEW_PROGRAM_H (n).p_filesz; @@ -822,7 +823,7 @@ ".data")) break; if (old_data_index == old_file_h->e_shnum) - fatal ("Can't find .data in %s.\n", old_name, 0); + fatal ("Can't find .data in %s.\n", old_name); /* Walk through all section headers, insert the new data2 section right before the new bss section. */ @@ -893,7 +894,7 @@ PATCH_INDEX (NEW_SECTION_H (nn).sh_info); /* Fix the type and alignment for the .sbss section */ - if (!strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sbss")) + if ((old_sbss_index != -1) && !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sbss")) { NEW_SECTION_H (nn).sh_type = SHT_PROGBITS; NEW_SECTION_H (nn).sh_offset = round_up (NEW_SECTION_H (nn).sh_offset, @@ -992,6 +993,15 @@ } } + /* Kludge around the stupid 5.3 run time loader which always + zero-fills the .sbss section no matter what. */ + + if (old_sbss_index != -1) + strcpy (new_base + + NEW_SECTION_H (new_file_h->e_shstrndx).sh_offset + + NEW_SECTION_H (old_sbss_index).sh_name, + ".zbzz"); + /* Close the files and make the new file executable. */ if (close (old_file))
--- a/version.sh Mon Aug 13 10:30:38 2007 +0200 +++ b/version.sh Mon Aug 13 10:31:29 2007 +0200 @@ -1,8 +1,8 @@ #!/bin/sh emacs_major_version=21 emacs_minor_version=0 -emacs_beta_version=36 -xemacs_codename="Philippine" +emacs_beta_version=37 +xemacs_codename="Pygmy" infodock_major_version=3 infodock_minor_version=90 -infodock_build_version=1 +infodock_build_version=2