From: kazuhiko Date: Tue, 12 Sep 2000 06:52:18 +0000 (+0000) Subject: Sync with r21-2-35. X-Git-Tag: r21-2-35-utf-2000-0_17-0~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd8f4c0e5ff27909836e7478df6b17d816a0db28;p=chise%2Fxemacs-chise.git Sync with r21-2-35. --- diff --git a/CHANGES-beta b/CHANGES-beta index 5d382f6..1819931 100644 --- a/CHANGES-beta +++ b/CHANGES-beta @@ -1,3 +1,23 @@ +to 21.2.35 "Nike" +-- You now again build XEmacs in a directory containing a predefined + CPP symbol -- Martin Buchholz +-- Minor fixes for Postgres integration -- Martin Buchholz +-- Many fixes for DEC OSF 4.0 -- Martin Buchholz +-- More C++ compilation support (for quality control) -- Martin Buchholz +-- XEmacs can now be built with XFree86 4.0 -- Martin Buchholz +-- Fix lots of byte-compiler warnings -- Martin Buchholz +-- Many documentation fixes -- Adrian Aichner +-- support for S390 has been added -- Andreas Jaeger, Martin Schwidefsky +-- clean up Windows includes/defines -- Ben Wing +-- numerous configure/GCC-warning fixes -- Martin Buchholz +-- generalize selection support to arbitrary types -- Alastair Houghton +-- MS Windows printer improvements -- Kirill Katsnelson +-- MinGW fixes -- Craig Lanning +-- NT process fixes -- Mixe Alexander, Adrian Aichner +-- new key-value weak hashtable type -- Andy Piper/Olivier Galibert +-- migrate .emacs to .xemacs/init.el -- Mike Sperber +-- new file compat.el for cleaner compatibility functions -- Ben Wing + to 21.2.34 "Molpe" -- Lots of changes to GUI, Windows, font-lock code, Ben Wing -- Lots of changes to GUI, Windows code, Andy Piper diff --git a/ChangeLog b/ChangeLog index f3b3627..4a8ddc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,138 @@ * configure.in: Add new option `--with-utf-2000'; define `UTF2000' if it is specified. +2000-07-19 Martin Buchholz + + * XEmacs 21.2.35 is released. + +2000-07-13 Martin Buchholz + + * configure.in: --with-menubars=yes should not be an error. + + * configure.in: "compiling in support for Athena" message was + sometimes lying. + +2000-07-12 Martin Buchholz + + * configure.in: Rewrite xmkmf symbol detection to avoid + redefinition of symbols we've already defined. + Also, handle xmkmf symbols with values other than 1. + +2000-07-12 Martin Buchholz + + * configure.in: + Make sure Unix98 socklen_t is defined. + Use ANSI C mode `-std1' with DEC C instead of `-std'. + +2000-07-09 Martin Buchholz + + * configure.in: + Replace SMART_INCLUDE with a dumber, but more reliable method. +2000-07-10 Martin Buchholz + + * modules/zlib/Makefile: + * modules/sample/Makefile: + * modules/ldap/Makefile: + * modules/base64/Makefile: + * Makefile.in.in: + rm -f ==> $(RM) + define SHELL=/bin/sh + +2000-07-09 Martin Buchholz + + * configure.in: PostgreSQL rewrite. + - Don't look for postgreSQL in /usr/local. + - Simplify detection code. + - Don't use SMART_INCLUDE. + - Don't autodetect if --with-postgresql=no. + +2000-07-08 Ben Wing + + * configure.usage: addl doc for graphics libs, with-msw. + +2000-07-09 Martin Buchholz + + * configure.in: sh builtin `test' uses `=', not `=='. + +2000-07-08 Ben Wing + + * configure.in: add -lcomdlg32 for cygwin. + +2000-07-05 Craig Lanning + + * aclocal.m4 (can_build_shared): + First pass at module support for cygwin and mingw. + + * configure: + * configure (xe_check_libs): + * configure (acfindx): + * configure (ac_x_includes): + * configure (ac_x_libraries): + * configure (ac_cv_lib_dnet_dnet_ntoa): + * configure (xe_msg_checking): + * configure (xe_runpath_dir): + * configure (xetest): + * configure (ac_err): + * configure (ac_safe): + * configure (with_xmu): + * configure (bitmapdir): + * configure (with_xauth): + * configure (libs_xauth): + * configure (with_cde): + * configure (with_ldap): + * configure (with_ldap_krbdes): + * configure (save_c_switch_site): + * configure (with_postgresql): + * configure (with_xface): + * configure (with_jpeg): + * configure (with_png): + * configure (with_tiff): + * configure (athena_lib): + * configure (have_motif): + * configure (all_widgets): + * configure (with_xim): + * configure (with_xfs): + * configure (with_wnn): + * configure (with_canna): + * configure (extra_objs): + * configure (ac_cv_c_inline): + * configure (have_esd_config): + * configure (c_switch_site): + * configure (with_ncurses): + * configure (with_gpm): + * configure (xealias): + * configure (xehost_os): + * configure (can_build_shared): + * configure (xcldf): + * configure (LTLD): + * configure (ld_dynamic_link_flags): + * configure (Mail): + * configure.in: + * configure.in (after_morecore_hook_exists): + * configure.in (xetest): + * configure.in (emacs_cv_localtime_cache): + * configure.in (Mail): + * configure.in: + Clean up configure support for cygwin and mingw. + +2000-06-27 Darryl Okahata + + * PROBLEMS: Document broken native audio for recent patches and + releases of HP-UX. + +2000-06-10 Ben Wing + + * Makefile.in.in (install-arch-dep): + WINDOWSNT -> WIN32_NATIVE. + __CYGWIN32__ -> CYGWIN. + +2000-06-01 Andreas Jaeger + + * configure.in: Recognize s390. + + * config.guess: New version from GNU config archive. + * config.sub: Likewise. + 2000-05-28 Martin Buchholz * XEmacs 21.2.34 is released. diff --git a/INSTALL b/INSTALL index 4019235..44a27d5 100644 --- a/INSTALL +++ b/INSTALL @@ -292,7 +292,7 @@ The `--rel-alloc' option can be used to either enable or disable use of the relocating allocator. Turning on --rel-alloc will allow XEmacs to return unused memory to the operating system, thereby reducing its memory footprint. However, it may make XEmacs runs more slowly, -especially if your system's `mmap' implemntation is missing or +especially if your system's `mmap' implementation is missing or inefficient. Generally, it's best to go with the default configuration for your system. You can tweak this based on how you use XEmacs, and the memory and cpu resources available on your system. @@ -320,7 +320,7 @@ determining configure failures is the file `config.log', which contains the results of the compile and link tests used by configure. The `--with-mule' option enables (MUlti-Lingual Emacs) support, needed -to suport non-Latin-1 (including Asian) languages. The Mule support +to support non-Latin-1 (including Asian) languages. The Mule support is not yet as stable or efficient as the `Latin1' support. Enabling Mule support requires the mule-base package installed prior to building XEmacs. The following options require Mule support: @@ -639,8 +639,8 @@ GNU software; here are some variables specific to XEmacs. `/usr/local/lib/xemacs-VERSION/CONFIGURATION-NAME/modules' (where VERSION and CONFIGURATION-NAME are as described above). By their very nature, dynamic loadable modules are architecture- - dependant, and care should be taken not to set this directory - to a system- or architecture-independant directory. + dependent, and care should be taken not to set this directory + to a system- or architecture-independent directory. Remember that you must specify any variable values you need each time you run `make' in the top directory. If you run `make' once to build diff --git a/Makefile.in.in b/Makefile.in.in index cb71002..e6e0eac 100644 --- a/Makefile.in.in +++ b/Makefile.in.in @@ -299,19 +299,19 @@ autoloads: lisp/auto-autoloads.el lisp/custom-load.el FRC.lisp.auto.autoloads.el: lisp/auto-autoloads.el: FRC.lisp.auto.autoloads.el - rm -f lisp/auto-autoloads.el + $(RM) lisp/auto-autoloads.el ${blddir}/src/${PROGNAME} -batch -vanilla \ -l autoload -f batch-update-directory lisp ${blddir}/src/${PROGNAME} -batch -vanilla \ -f batch-byte-compile lisp/auto-autoloads.el - @rm -f lisp/auto-autoloads.el~ + @$(RM) lisp/auto-autoloads.el~ #ifdef MULE - rm -f lisp/mule/auto-autoloads.el + $(RM) lisp/mule/auto-autoloads.el ${blddir}/src/${PROGNAME} -batch -vanilla \ -l autoload -f batch-update-directory lisp/mule ${blddir}/src/${PROGNAME} -batch -vanilla \ -f batch-byte-compile lisp/mule/auto-autoloads.el - @rm -f lisp/mule/auto-autoloads.el~ + @$(RM) lisp/mule/auto-autoloads.el~ #endif FRC.lisp.custom.load.el: @@ -439,18 +439,18 @@ install-arch-dep: mkdir #ifdef PDUMP ${INSTALL_DATA} src/${PROGNAME}.dmp ${bindir}/${PROGNAME}-${version}-`src/${PROGNAME} -sd`.dmp #endif -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME} -chmod 0755 ${bindir}/${PROGNAME} #else ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version} -chmod 0755 ${bindir}/${PROGNAME}-${version} -# ifdef __CYGWIN32__ +# ifdef CYGWIN cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${PROGNAME} # else cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME} -# endif /* __CYGWIN32__ */ -#endif /* WINDOWSNT */ +# endif /* CYGWIN */ +#endif /* WIN32_NATIVE */ if test "${prefix}" != "${exec_prefix}"; then \ $(MAKEPATH) ${exec_prefix}/lib/${instvardir}; \ for dir in \ diff --git a/PROBLEMS b/PROBLEMS index f3ab159..0000084 100644 --- a/PROBLEMS +++ b/PROBLEMS @@ -1458,6 +1458,60 @@ configures the X server. add mod2 = Mode_switch EOF + +*** XEmacs dumps core at startup when native audio is used. Native +audio does not work with recent versions of HP-UX. + +Under HP-UX 10.20 and later (e.g., HP-UX 11.XX), with native audio +enabled, the dumped XEmacs binary ("xemacs") core dumps at startup if +recent versions of the libAlib.sl audio shared library is used. Note +that "temacs" will run, but "xemacs" will dump core. This, of course, +causes the XEmacs build to fail. If GNU malloc is enabled, a stack +trace will show XEmacs to have crashed in the "first" call to malloc(). + +This bug currently exists in all versions of XEmacs, when the undump +mechanism is used. It is not known if using the experimental portable +dumper will allow native audio to work. + +**** Cause: + +Recent versions of the HP-UX 10.20 (and later) audio shared library (in +/opt/audio/lib), pulls in the libdce shared library, which pulls in a +thread (libcma) library. This prevents the HP-UX undump() routine (in +unexhp9k800.c) from properly working. What's happening is that some +initialization routines are being called in the libcma library, *BEFORE* +main() is called, and these initialization routines are calling +malloc(). Unfortunately, in order for the undumper to work, XEmacs must +adjust (move upwards) the sbrk() value *BEFORE* the first call to +malloc(); if malloc() is called before XEmacs has properly adjusted sbrk +(which is what is happening), dumped memory that is being used by +XEmacs, is improperly re-allocated for use by malloc() and the dumped +memory is corrupted. This causes XEmacs to die an horrible death. + +It is believed that versions of the audio library past December 1998 +will trigger this problem. Under HP-UX 10.20, you probably have to +install audio library patches to encounter this. It's probable that +recent "fresh, out-of-the-box" HP-UX 11.XX workstations also have this +problem. For HP-UX 10.20, it's believed that audio patch PHSS_17121 (or +a superceeding one, like PHSS_17554, PHSS_17971, PHSS_18777, PHSS_21481, +or PHSS_21662, etc.) will trigger this. + +To check if your audio library will cause problems for XEmacs, run +"chatr /opt/audio/lib/libAlib.sl". If "libdce" appears in the displayed +shared library list, XEmacs will probably encounter problems if audio is +enabled. + +**** Workaround: + +Don't enable native audio. Re-run configure without native audio +support. + +If your site supports it, try using NAS (Network Audio Support). + +Try using the experimental portable dumper. It may work, or it may +not. + + *** `Pid xxx killed due to text modification or page I/O error' On HP-UX, you can get that error when the Emacs executable is on an NFS diff --git a/aclocal.m4 b/aclocal.m4 index 48afe84..1cfb91f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -101,6 +101,9 @@ if test "$XEGCC" = yes; then # like `-m68040'. dll_cflags='-m68020 -resident32 -malways-restore-a4' ;; + *cygwin* | *mingw* ) + # PIC is the default + ;; *) dll_cflags='-fPIC' ;; diff --git a/config.guess b/config.guess index e1b5871..b4faaed 100755 --- a/config.guess +++ b/config.guess @@ -1,8 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 # Free Software Foundation, Inc. -# + +version='2000-05-30' + # This file 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 of the License, or @@ -23,8 +25,7 @@ # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. -# Please send patches to . +# Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and @@ -37,6 +38,46 @@ # (but try to keep the structure clean). # +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of this system. + +Operation modes: + -h, --help print this help, then exit + -V, --version print version number, then exit" + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case "$1" in + --version | --vers* | -V ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + exec >&2 + echo "$me: invalid option $1" + echo "$help" + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + # Use $HOST_CC if defined. $CC may point to a cross-compiler if test x"$CC_FOR_BUILD" = x; then if test x"$HOST_CC" != x; then @@ -68,6 +109,43 @@ trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-cbm ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format. + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -77,41 +155,51 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text .globl main + .align 4 .ent main main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit .end main EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then - ./$dummy - case "$?" in - 7) + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; - 15) + 1-0) UNAME_MACHINE="alphaev5" ;; - 14) + 1-1) UNAME_MACHINE="alphaev56" ;; - 10) + 1-101) UNAME_MACHINE="alphapca56" ;; - 16) + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; esac fi rm -f $dummy.s $dummy @@ -129,9 +217,6 @@ EOF Amiga*:UNIX_System_V:4.0:*) echo m68k-cbm-sysv4 exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -162,9 +247,6 @@ EOF arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; SR2?01:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; @@ -221,15 +303,12 @@ EOF aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor + # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not @@ -253,15 +332,9 @@ EOF *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} - exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -274,9 +347,6 @@ EOF powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; - macppc:NetBSD:*:*) - echo powerpc-apple-netbsd${UNAME_RELEASE} - exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; @@ -292,6 +362,7 @@ EOF mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus +#include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { @@ -331,7 +402,7 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110] + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] @@ -408,7 +479,7 @@ EOF ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) @@ -429,6 +500,8 @@ EOF 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE #include #include @@ -553,10 +626,13 @@ EOF -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ exit 0 ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos @@ -569,13 +645,10 @@ EOF F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - i?86:BSD/386:*:* | i?86:BSD/OS:*:*) + i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) @@ -585,17 +658,8 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - if test -x /usr/bin/objformat; then - if test "elf" = "`/usr/bin/objformat`"; then - echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` - exit 0 - fi - fi echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` - exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; @@ -644,6 +708,10 @@ EOF echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; + elf_i?86) + echo "${UNAME_MACHINE}-pc-linux" + exit 0 + ;; i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 @@ -657,7 +725,7 @@ EOF exit 0 ;; elf32arm*) - echo "${UNAME_MACHINE}-unknown-linux-gnu" + echo "${UNAME_MACHINE}-unknown-linux-gnuoldld" exit 0 ;; armelf_linux*) @@ -668,7 +736,7 @@ EOF echo "${UNAME_MACHINE}-unknown-linux-gnuaout" exit 0 ;; - elf32ppc) + elf32ppc | elf32ppclinux) # Determine Lib Version cat >$dummy.c < @@ -695,51 +763,65 @@ EOF if test "$?" = 0 ; then LIBC="libc1" fi - fi + fi rm -f $dummy.c $dummy echo powerpc-unknown-linux-gnu${LIBC} exit 0 ;; + shelf_linux) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; esac if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <$dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main + cat <$dummy.s + .data + \$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main + main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main EOF LIBC="" $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then - ./$dummy - case "$?" in - 7) + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; - 15) + 1-0) UNAME_MACHINE="alphaev5" ;; - 14) + 1-1) UNAME_MACHINE="alphaev56" ;; - 10) + 1-101) UNAME_MACHINE="alphapca56" ;; - 16) + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; esac objdump --private-headers $dummy | \ @@ -753,6 +835,7 @@ EOF elif test "${UNAME_MACHINE}" = "mips" ; then cat >$dummy.c < /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { @@ -768,6 +851,8 @@ EOF EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy + elif test "${UNAME_MACHINE}" = "s390"; then + echo s390-ibm-linux && exit 0 else # Either a pre-BFD a.out linker (linux-gnuoldld) # or one that does not give us useful --help. @@ -789,6 +874,7 @@ EOF cat >$dummy.c < #ifdef __cplusplus +#include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { @@ -860,7 +946,11 @@ EOF echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; + i?86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; pc:*:*:*) + # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp @@ -974,8 +1064,26 @@ EOF *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; *:QNX:*:4*) - echo i386-qnx-qnx${UNAME_VERSION} + echo i386-pc-qnx + exit 0 ;; + NSR-W:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; esac @@ -1116,6 +1224,47 @@ then esac fi -#echo '(Unable to guess system type)' 1>&2 +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess version = $version + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "version='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.sub b/config.sub index 28426bb..cb86fe1 100755 --- a/config.sub +++ b/config.sub @@ -1,6 +1,10 @@ #! /bin/sh # Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +# Free Software Foundation, Inc. + +version='2000-05-31' + # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. @@ -25,6 +29,9 @@ # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. +# Written by Per Bothner . +# Please send patches to . +# # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. @@ -45,30 +52,61 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi +me=`echo "$0" | sed -e 's,.*/,,'` -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -V, --version print version number, then exit" + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case "$1" in + --version | --vers* | -V ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + exec >&2 + echo "$me: invalid option $1" + echo "$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - linux-gnu*) + nto-qnx* | linux-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -169,15 +207,18 @@ case $basic_machine in tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ + | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ - | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \ + | hppa64 \ + | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ + | alphaev6[78] \ | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ | mips64vr5000 | miprs64vr5000el | mcore \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ - | thumb | d10v | fr30) + | thumb | d10v | fr30 | avr) basic_machine=$basic_machine-unknown ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) @@ -201,8 +242,11 @@ case $basic_machine in | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ - | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \ - | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \ + | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | hppa2.0n-* | hppa64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ + | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ @@ -210,9 +254,10 @@ case $basic_machine in | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ | mipstx39-* | mipstx39el-* | mcore-* \ - | f301-* | armv*-* | t3e-* \ + | f301-* | armv*-* | s390-* | sv1-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ - | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* ) + | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ + | bs2000-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -464,9 +509,6 @@ case $basic_machine in basic_machine=i386-unknown os=-mingw32 ;; - i386-qnx | qnx) - basic_machine=i386-qnx - ;; iris | iris4d) basic_machine=mips-sgi case $os in @@ -513,6 +555,10 @@ case $basic_machine in mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; monitor) basic_machine=m68k-rom68k os=-coff @@ -585,6 +631,9 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -617,7 +666,7 @@ case $basic_machine in pentium | p5 | k5 | k6 | nexen) basic_machine=i586-pc ;; - pentiumpro | p6 | 6x86) + pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) @@ -626,7 +675,7 @@ case $basic_machine in pentium-* | p5-* | k5-* | k6-* | nexen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumpro-* | p6-* | 6x86-*) + pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) @@ -729,6 +778,10 @@ case $basic_machine in sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; symmetry) basic_machine=i386-sequent os=-dynix @@ -918,12 +971,25 @@ case $os in | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*) + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit*) # Remember, each alternative MUST END IN *, to match a version number. ;; + -qnx*) + case $basic_machine in + x86-* | i[34567]86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ - | -macos* | -mpw* | -magic* | -mon960* | -lnews*) + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` @@ -940,6 +1006,9 @@ case $os in -opened*) os=-openedition ;; + -wince*) + os=-wince + ;; -osfrose*) os=-osfrose ;; @@ -964,6 +1033,9 @@ case $os in -ns2 ) os=-nextstep2 ;; + -nsk) + os=-nsk + ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` @@ -977,9 +1049,6 @@ case $os in -oss*) os=-sysv3 ;; - -qnx) - os=-qnx4 - ;; -svr4) os=-sysv4 ;; @@ -1230,3 +1299,11 @@ case $basic_machine in esac echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "version='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure index c30481c..63f377f 100755 --- a/configure +++ b/configure @@ -720,16 +720,17 @@ EOF "with_menubars" | \ "with_scrollbars" | \ - "with_dialogs" | \ + "with_dialogs" | \ "with_widgets" ) case "$val" in l | lu | luc | luci | lucid ) val=lucid ;; m | mo | mot | moti | motif ) val=motif ;; a | at | ath | athe | athen | athena ) val=athena ;; - n | no | non | none ) val=no ;; + n | no | non | none ) val=no ;; + y | ye | yes ) val=yes ;; * ) (echo "$progname: Usage error:" echo " " "The \`--$optname' option must have one of these values: - \`lucid', \`motif', \`athena', or \`no'." + \`lucid', \`motif', \`athena', \`yes', or \`no'." echo " Use \`$progname --help' to show usage.") >&2 && exit 1 ;; esac eval "$opt=\"$val\"" @@ -831,7 +832,7 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1 fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:835: checking whether ln -s works" >&5 +echo "configure:836: checking whether ln -s works" >&5 rm -f conftestdata if ln -s X conftestdata 2>/dev/null @@ -1096,7 +1097,7 @@ EOF echo $ac_n "checking "host system type"""... $ac_c" 1>&6 -echo "configure:1100: checking "host system type"" >&5 +echo "configure:1101: checking "host system type"" >&5 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"` configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` @@ -1128,6 +1129,7 @@ case "$canonical" in clipper-* ) machine=clipper ;; arm* ) machine=arm ;; ns32k-* ) machine=ns32000 ;; + s390-* ) machine=s390 ;; esac case "$canonical" in @@ -1591,7 +1593,7 @@ xe_save_CFLAGS="$CFLAGS" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1595: checking for $ac_word" >&5 +echo "configure:1597: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1618,7 +1620,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1622: checking for $ac_word" >&5 +echo "configure:1624: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1666,7 +1668,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1670: checking for $ac_word" >&5 +echo "configure:1672: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1695,7 +1697,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1699: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1701: 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' @@ -1708,12 +1710,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 1712 "configure" +#line 1714 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1741,19 +1743,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1745: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1747: 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:1750: checking whether we are using GNU C" >&5 +echo "configure:1752: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1771,7 +1773,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1775: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1777: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1804,7 +1806,7 @@ if test "$with_gcc" = "no" -a "$GCC" = "yes"; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1808: checking for $ac_word" >&5 +echo "configure:1810: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1831,7 +1833,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1835: checking for $ac_word" >&5 +echo "configure:1837: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1879,7 +1881,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1883: checking for $ac_word" >&5 +echo "configure:1885: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1908,7 +1910,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1912: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1914: 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' @@ -1921,12 +1923,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 1925 "configure" +#line 1927 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1954,19 +1956,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1958: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1960: 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:1963: checking whether we are using GNU C" >&5 +echo "configure:1965: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1972: \"$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 @@ -1984,7 +1986,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1988: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1990: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -2017,7 +2019,7 @@ elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2021: checking for $ac_word" >&5 +echo "configure:2023: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2044,7 +2046,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2048: checking for $ac_word" >&5 +echo "configure:2050: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2092,7 +2094,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2096: checking for $ac_word" >&5 +echo "configure:2098: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2121,7 +2123,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2125: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2127: 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' @@ -2134,12 +2136,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 2138 "configure" +#line 2140 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2167,19 +2169,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2171: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2173: 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:2176: checking whether we are using GNU C" >&5 +echo "configure:2178: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2185: \"$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 @@ -2197,7 +2199,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2201: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2203: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -2234,7 +2236,7 @@ test -n "$CPP" -a -d "$CPP" && CPP= test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2238: checking how to run the C preprocessor" >&5 +echo "configure:2240: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2247,13 +2249,13 @@ if test -z "$CPP"; then # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2264,13 +2266,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2281,13 +2283,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2313,9 +2315,9 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:2317: checking for AIX" >&5 +echo "configure:2319: checking for AIX" >&5 cat > conftest.$ac_ext < $srcdir/conffoo.h <&6 -echo "configure:2348: checking for a working inclusion macro" >&5 -cat > conftest.$ac_ext < -#define CONFFOO_H_PATH $srcdir -#define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file) -#include CONFFOO_INCLUDE(conffoo.h) - -; return 0; } -EOF -if { (eval echo configure:2362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""direct" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF - Defining SMART_INCLUDE_INDIRECTIONS = 0 -EOF -cat >> confdefs.h <<\EOF -#define SMART_INCLUDE_INDIRECTIONS 0 -EOF -} - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext < -#define SMART_INCLUDE(path,file) GLUE_INCLUDE(path,file) -#define CONFFOO_H_PATH $srcdir -#define CONFFOO_INCLUDE(file) SMART_INCLUDE(CONFFOO_H_PATH,file) -#include CONFFOO_INCLUDE(conffoo.h) - -; return 0; } -EOF -if { (eval echo configure:2390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""simple" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF - Defining SMART_INCLUDE_INDIRECTIONS = 1 -EOF -cat >> confdefs.h <<\EOF -#define SMART_INCLUDE_INDIRECTIONS 1 -EOF -} - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext < -#define GLUE_INCLUDE_1(path,file) GLUE_INCLUDE_2(path,file) -#define SMART_INCLUDE(path,file) GLUE_INCLUDE_1(path,file) -#define CONFFOO_H_PATH $srcdir -#define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file) -#include CONFFOO_INCLUDE(conffoo.h) - -; return 0; } -EOF -if { (eval echo configure:2419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""double" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF - Defining SMART_INCLUDE_INDIRECTIONS = 2 -EOF -cat >> confdefs.h <<\EOF -#define SMART_INCLUDE_INDIRECTIONS 2 -EOF -} - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - { echo "configure: error: Cannot define a proper SMART_INCLUDE macro. Please report." 1>&2; exit 1; } -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* -rm -f $srcdir/conffoo.h - - echo $ac_n "checking for GNU libc""... $ac_c" 1>&6 -echo "configure:2445: checking for GNU libc" >&5 +echo "configure:2348: checking for GNU libc" >&5 cat > conftest.$ac_ext < int main() { @@ -2455,7 +2358,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* have_glibc=yes else @@ -2532,7 +2435,7 @@ EOF esac cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -2746,7 +2649,7 @@ if test "$pdump" = "yes"; then start_files= libs_standard= unexec= - lib_gcc= + lib_gcc= fi test "$extra_verbose" = "yes" && \ @@ -2760,7 +2663,7 @@ esac test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc" -test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" && if test "$extra_verbose" = "yes"; then echo " Appending \"-std\" to \$c_switch_site"; fi +test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" && if test "$extra_verbose" = "yes"; then echo " Appending \"-std1\" to \$c_switch_site"; fi if test "$cflags_specified" = "no"; then if test "$GCC" = "yes"; then @@ -2780,7 +2683,7 @@ fi if test "$GCC" = "yes"; then echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6 -echo "configure:2784: checking for buggy gcc versions" >&5 +echo "configure:2687: checking for buggy gcc versions" >&5 GCC_VERSION=`$CC --version` case `uname -s`:`uname -m`:$GCC_VERSION in *:sun4*:2.8.1|*:sun4*:egcs-2.90.*) @@ -2903,7 +2806,7 @@ test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" && if test "$extra_v fi echo $ac_n "checking for dynodump""... $ac_c" 1>&6 -echo "configure:2907: checking for dynodump" >&5 +echo "configure:2810: checking for dynodump" >&5 if test "$unexec" != "unexsol2.o"; then echo "$ac_t""no" 1>&6 else @@ -2941,12 +2844,12 @@ if test "$unexec" = "unexaix.o"; then done echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6 -echo "configure:2945: checking for terminateAndUnload in -lC" >&5 +echo "configure:2848: checking for terminateAndUnload in -lC" >&5 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'` xe_check_libs=" -lC " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3065,7 +2968,7 @@ fi if test "$add_runtime_path" = "yes"; then echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 -echo "configure:3069: checking "for runtime libraries flag"" >&5 +echo "configure:2972: checking "for runtime libraries flag"" >&5 case "$opsys" in sol2 ) dash_r="-R" ;; decosf* | linux* | irix*) dash_r="-rpath " ;; @@ -3087,14 +2990,14 @@ if test "$GCC" = "yes"; then done fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* dash_r="$try_dash_r" else @@ -3196,10 +3099,10 @@ else fi after_morecore_hook_exists=yes echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 -echo "configure:3200: checking for malloc_set_state" >&5 +echo "configure:3103: checking for malloc_set_state" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_malloc_set_state=yes" else @@ -3242,16 +3145,16 @@ doug_lea_malloc=no fi echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 -echo "configure:3246: checking whether __after_morecore_hook exists" >&5 +echo "configure:3149: checking whether __after_morecore_hook exists" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -3307,7 +3210,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3311: checking for $ac_word" >&5 +echo "configure:3214: checking for $ac_word" >&5 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -3362,7 +3265,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # 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:3366: checking for a BSD compatible install" >&5 +echo "configure:3269: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -3416,7 +3319,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3420: checking for $ac_word" >&5 +echo "configure:3323: checking for $ac_word" >&5 if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. @@ -3448,15 +3351,15 @@ for ac_hdr in a.out.h cygwin/version.h fcntl.h inttypes.h libgen.h l do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3452: checking for $ac_hdr" >&5 +echo "configure:3355: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3486,10 +3389,10 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3490: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3393: checking for sys/wait.h that is POSIX.1 compatible" >&5 cat > conftest.$ac_ext < #include @@ -3505,7 +3408,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3529,10 +3432,10 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3533: checking for ANSI C header files" >&5 +echo "configure:3436: checking for ANSI C header files" >&5 cat > conftest.$ac_ext < #include @@ -3540,7 +3443,7 @@ cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3557,7 +3460,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3575,7 +3478,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3593,7 +3496,7 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3604,7 +3507,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:3511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -3630,10 +3533,10 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3634: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3537: checking whether time.h and sys/time.h may both be included" >&5 cat > conftest.$ac_ext < #include @@ -3642,7 +3545,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3666,10 +3569,10 @@ EOF fi echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:3670: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo "configure:3573: checking for sys_siglist declaration in signal.h or unistd.h" >&5 cat > conftest.$ac_ext < #include @@ -3681,7 +3584,7 @@ int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:3685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -3706,9 +3609,9 @@ fi echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6 -echo "configure:3710: checking for struct utimbuf" >&5 +echo "configure:3613: checking for struct utimbuf" >&5 cat > conftest.$ac_ext < @@ -3727,7 +3630,7 @@ int main() { static struct utimbuf x; x.actime = x.modtime; ; return 0; } EOF -if { (eval echo configure:3731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3634: \"$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 @@ -3747,10 +3650,10 @@ fi rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3751: checking return type of signal handlers" >&5 +echo "configure:3654: checking return type of signal handlers" >&5 cat > conftest.$ac_ext < #include @@ -3767,7 +3670,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3789,10 +3692,10 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3793: checking for size_t" >&5 +echo "configure:3696: checking for size_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3823,10 +3726,10 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3827: checking for pid_t" >&5 +echo "configure:3730: checking for pid_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3857,10 +3760,10 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3861: checking for uid_t in sys/types.h" >&5 +echo "configure:3764: checking for uid_t in sys/types.h" >&5 cat > conftest.$ac_ext < EOF @@ -3896,10 +3799,10 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3900: checking for mode_t" >&5 +echo "configure:3803: checking for mode_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3930,10 +3833,10 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3934: checking for off_t" >&5 +echo "configure:3837: checking for off_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3964,10 +3867,10 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3968: checking for ssize_t" >&5 +echo "configure:3871: checking for ssize_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3998,10 +3901,71 @@ EOF fi +echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 +echo "configure:3906: checking for socklen_t" >&5 +cat > conftest.$ac_ext < +socklen_t x; + +int main() { + +; return 0; } +EOF +if { (eval echo configure:3917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + +cat > conftest.$ac_ext < +int accept (int, struct sockaddr *, size_t *); + +int main() { + +; return 0; } +EOF +if { (eval echo configure:3935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + +echo "$ac_t""size_t" 1>&6 +{ test "$extra_verbose" = "yes" && cat << \EOF + Defining socklen_t = size_t +EOF +cat >> confdefs.h <<\EOF +#define socklen_t size_t +EOF +} + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + +echo "$ac_t""int" 1>&6 +{ test "$extra_verbose" = "yes" && cat << \EOF + Defining socklen_t = int +EOF +cat >> confdefs.h <<\EOF +#define socklen_t int +EOF +} + +fi +rm -f conftest* +fi +rm -f conftest* + echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:4003: checking for struct timeval" >&5 +echo "configure:3967: checking for struct timeval" >&5 cat > conftest.$ac_ext < @@ -4017,7 +3981,7 @@ int main() { static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } EOF -if { (eval echo configure:4021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 HAVE_TIMEVAL=yes @@ -4039,10 +4003,10 @@ fi rm -f conftest* echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4043: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4007: checking whether struct tm is in sys/time.h or time.h" >&5 cat > conftest.$ac_ext < #include @@ -4050,7 +4014,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:4054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4074,10 +4038,10 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:4078: checking for tm_zone in struct tm" >&5 +echo "configure:4042: checking for tm_zone in struct tm" >&5 cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -4085,7 +4049,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:4089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -4108,10 +4072,10 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:4112: checking for tzname" >&5 +echo "configure:4076: checking for tzname" >&5 cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -4121,7 +4085,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:4125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -4147,16 +4111,16 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4151: checking for working const" >&5 +echo "configure:4115: checking for working const" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4224,7 +4188,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:4228: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:4192: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` cat > conftestmake <<\EOF @@ -4249,12 +4213,12 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4253: checking whether byte ordering is bigendian" >&5 +echo "configure:4217: checking whether byte ordering is bigendian" >&5 ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -4265,11 +4229,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -4280,7 +4244,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4297,7 +4261,7 @@ fi rm -f conftest* if test $ac_cv_c_bigendian = unknown; then cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_bigendian=no else @@ -4337,10 +4301,10 @@ fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:4341: checking size of short" >&5 +echo "configure:4305: checking size of short" >&5 cat > conftest.$ac_ext < main() @@ -4351,7 +4315,7 @@ main() exit(0); } EOF -if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_short=`cat conftestval` else @@ -4379,10 +4343,10 @@ if test "$ac_cv_sizeof_short" = 0; then exit 1 fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:4383: checking size of int" >&5 +echo "configure:4347: checking size of int" >&5 cat > conftest.$ac_ext < main() @@ -4393,7 +4357,7 @@ main() exit(0); } EOF -if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_int=`cat conftestval` else @@ -4415,10 +4379,10 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:4419: checking size of long" >&5 +echo "configure:4383: checking size of long" >&5 cat > conftest.$ac_ext < main() @@ -4429,7 +4393,7 @@ main() exit(0); } EOF -if { (eval echo configure:4433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long=`cat conftestval` else @@ -4451,10 +4415,10 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:4455: checking size of long long" >&5 +echo "configure:4419: checking size of long long" >&5 cat > conftest.$ac_ext < main() @@ -4465,7 +4429,7 @@ main() exit(0); } EOF -if { (eval echo configure:4469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4433: \"$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 @@ -4487,10 +4451,10 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:4491: checking size of void *" >&5 +echo "configure:4455: checking size of void *" >&5 cat > conftest.$ac_ext < main() @@ -4501,7 +4465,7 @@ main() exit(0); } EOF -if { (eval echo configure:4505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4469: \"$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 @@ -4524,7 +4488,7 @@ EOF echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:4528: checking for long file names" >&5 +echo "configure:4492: 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: @@ -4570,10 +4534,10 @@ fi echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4574: checking for sin" >&5 +echo "configure:4538: checking for sin" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -4614,12 +4578,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:4618: checking for sin in -lm" >&5 +echo "configure:4582: checking for sin in -lm" >&5 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` xe_check_libs=" -lm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4674,14 +4638,14 @@ EOF cat > conftest.$ac_ext < int main() { return atanh(1.0) + asinh(1.0) + acosh(1.0); ; return 0; } EOF -if { (eval echo configure:4685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_INVERSE_HYPERBOLIC @@ -4698,14 +4662,14 @@ fi rm -f conftest* echo "checking type of mail spool file locking" 1>&6 -echo "configure:4702: checking type of mail spool file locking" >&5 +echo "configure:4666: checking type of mail spool file locking" >&5 for ac_func in lockf flock do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4706: checking for $ac_func" >&5 +echo "configure:4670: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4758,6 +4722,12 @@ done test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking +if test -z "$mail_locking"; then + case "$opsys" in cygwin* | mingw*) + mail_locking=pop ;; + esac +fi + if test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining MAIL_LOCK_LOCKF EOF @@ -4782,6 +4752,9 @@ cat >> confdefs.h <<\EOF EOF } +elif test "$mail_locking" = "pop"; then + with_pop=yes + mail_locking= else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF Defining MAIL_LOCK_DOT EOF @@ -4801,12 +4774,12 @@ test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \ case "$opsys" in decosf*) echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 -echo "configure:4805: checking for cma_open in -lpthreads" >&5 +echo "configure:4778: checking for cma_open in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lpthreads " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4853,7 +4826,7 @@ fi esac echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 -echo "configure:4857: checking whether the -xildoff compiler flag is required" >&5 +echo "configure:4830: 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; @@ -4865,7 +4838,7 @@ fi if test "$opsys" = "sol2"; then if test "$os_release" -ge 56; then echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6 -echo "configure:4869: checking for \"-z ignore\" linker flag" >&5 +echo "configure:4842: 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 ;; @@ -4876,7 +4849,7 @@ fi echo "checking "for specified window system"" 1>&6 -echo "configure:4880: checking "for specified window system"" >&5 +echo "configure:4853: checking "for specified window system"" >&5 if test "$with_x11" != "no"; then test "$x_includes $x_libraries" != "NONE NONE" && \ @@ -4909,7 +4882,7 @@ if test "$with_x11" != "no"; then # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:4913: checking for X" >&5 +echo "configure:4886: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4969,12 +4942,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5043,14 +5016,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -5159,17 +5132,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:5163: checking whether -R must be followed by a space" >&5 +echo "configure:5136: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -5185,14 +5158,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -5228,12 +5201,12 @@ ac_cv_lib_dnet_dnet_ntoa=no else echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:5232: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:5205: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5268,12 +5241,12 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:5272: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:5245: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet_stub " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5313,10 +5286,10 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:5317: checking for gethostbyname" >&5 +echo "configure:5290: checking for gethostbyname" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -5360,12 +5333,12 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:5364: checking for gethostbyname in -lnsl" >&5 +echo "configure:5337: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` xe_check_libs=" -lnsl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5406,10 +5379,10 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:5410: checking for connect" >&5 +echo "configure:5383: checking for connect" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -5455,12 +5428,12 @@ fi xe_msg_checking="for connect in -lsocket" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5459: checking "$xe_msg_checking"" >&5 +echo "configure:5432: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocket $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5495,10 +5468,10 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:5499: checking for remove" >&5 +echo "configure:5472: checking for remove" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -5542,12 +5515,12 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:5546: checking for remove in -lposix" >&5 +echo "configure:5519: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` xe_check_libs=" -lposix " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5582,10 +5555,10 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:5586: checking for shmat" >&5 +echo "configure:5559: checking for shmat" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -5629,12 +5602,12 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:5633: checking for shmat in -lipc" >&5 +echo "configure:5606: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` xe_check_libs=" -lipc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5681,12 +5654,12 @@ fi xe_msg_checking="for IceConnectionNumber in -lICE" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5685: checking "$xe_msg_checking"" >&5 +echo "configure:5658: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` xe_check_libs=" -lICE $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5866,7 +5839,7 @@ EOF echo "checking for X defines extracted by xmkmf" 1>&6 -echo "configure:5870: checking for X defines extracted by xmkmf" >&5 +echo "configure:5843: checking for X defines extracted by xmkmf" >&5 rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -5881,32 +5854,47 @@ EOF cd .. rm -fr conftestdir for word in $xmkmf_defines; do - case "$word" in - -D*=* ) ;; - -D* ) word=`echo '' $word | sed -e 's:^ *-D::'` - { test "$extra_verbose" = "yes" && cat << EOF - Defining $word + case "$word" in -D* ) + sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'` + case "$word" in + -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;; + * ) val=1 ;; + esac + if grep "^#define $sym " confdefs.h >/dev/null; then :; else + if test "$val" = "1" + then { test "$extra_verbose" = "yes" && cat << EOF + Defining $sym EOF cat >> confdefs.h <> confdefs.h <&6 -echo "configure:5902: checking for X11/Intrinsic.h" >&5 +echo "configure:5890: checking for X11/Intrinsic.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5930,12 +5918,12 @@ fi echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:5934: checking for XOpenDisplay in -lX11" >&5 +echo "configure:5922: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5971,12 +5959,12 @@ fi xe_msg_checking="for XGetFontProperty in -lX11" test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5975: checking "$xe_msg_checking"" >&5 +echo "configure:5963: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 -b i486-linuxaout" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6014,12 +6002,12 @@ fi echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:6018: checking for XShapeSelectInput in -lXext" >&5 +echo "configure:6006: checking for XShapeSelectInput in -lXext" >&5 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'` xe_check_libs=" -lXext " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6053,12 +6041,12 @@ fi echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 -echo "configure:6057: checking for XtOpenDisplay in -lXt" >&5 +echo "configure:6045: checking for XtOpenDisplay in -lXt" >&5 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lXt " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6092,14 +6080,14 @@ fi echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:6096: checking the version of X11 being used" >&5 +echo "configure:6084: checking the version of X11 being used" >&5 cat > conftest.$ac_ext < int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; } EOF -if { (eval echo configure:6103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest foobar; x11_release=$? else @@ -6123,10 +6111,10 @@ EOF for ac_func in XConvertCase do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6127: checking for $ac_func" >&5 +echo "configure:6115: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6181,15 +6169,15 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6185: checking for $ac_hdr" >&5 +echo "configure:6173: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6220,7 +6208,7 @@ done echo $ac_n "checking for XFree86""... $ac_c" 1>&6 -echo "configure:6224: checking for XFree86" >&5 +echo "configure:6212: checking for XFree86" >&5 if test -d "/usr/X386/include" -o \ -f "/etc/XF86Config" -o \ -f "/etc/X11/XF86Config" -o \ @@ -6240,12 +6228,12 @@ EOF test -z "$with_xmu" && { echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 -echo "configure:6244: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 +echo "configure:6232: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'` xe_check_libs=" -lXmu " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6295,19 +6283,19 @@ EOF echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:6299: checking for main in -lXbsd" >&5 +echo "configure:6287: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lXbsd " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6344,22 +6332,22 @@ fi fi if test "$with_msw" != "no"; then echo "checking for MS-Windows" 1>&6 -echo "configure:6348: checking for MS-Windows" >&5 +echo "configure:6336: checking for MS-Windows" >&5 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 -echo "configure:6351: checking for main in -lgdi32" >&5 +echo "configure:6339: checking for main in -lgdi32" >&5 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdi32 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6389,7 +6377,7 @@ EOF } install_pp="$blddir/lib-src/installexe.sh" - libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool" && if test "$extra_verbose" = "yes"; then echo " Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool\" to \$libs_system"; fi + libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool" && if test "$extra_verbose" = "yes"; then echo " Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool\" to \$libs_system"; fi test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" && if test "$extra_verbose" = "yes"; then echo " Appending \"msw\" to \$dragndrop_proto"; fi if test "$window_system" != x11; then window_system=msw @@ -6425,12 +6413,12 @@ EOF fi fi cat > conftest.$ac_ext < int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; } EOF -if { (eval echo configure:6434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6422: \"$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 @@ -6505,7 +6493,7 @@ case "$x_libraries" in *X11R4* ) esac echo "checking for WM_COMMAND option" 1>&6 -echo "configure:6509: checking for WM_COMMAND option" >&5; +echo "configure:6497: checking for WM_COMMAND option" >&5; if test "$with_wmcommand" != "no"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_WMCOMMAND @@ -6520,15 +6508,15 @@ fi test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6 -echo "configure:6524: checking for X11/Xauth.h" >&5 +echo "configure:6512: checking for X11/Xauth.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6551,12 +6539,12 @@ fi } test -z "$with_xauth" && { echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 -echo "configure:6555: checking for XauGetAuthByAddr in -lXau" >&5 +echo "configure:6543: checking for XauGetAuthByAddr in -lXau" >&5 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'` xe_check_libs=" -lXau " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6612,15 +6600,15 @@ if test "$with_tooltalk" != "no" ; then for dir in "" "Tt/" "desktop/" ; do ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6 -echo "configure:6616: checking for ${dir}tt_c.h" >&5 +echo "configure:6604: checking for ${dir}tt_c.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6656,12 +6644,12 @@ if test "$with_tooltalk" != "no" ; then xe_msg_checking="for tt_message_create in -ltt" test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6660: checking "$xe_msg_checking"" >&5 +echo "configure:6648: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'` xe_check_libs=" -ltt $extra_libs" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6729,15 +6717,15 @@ fi test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6 -echo "configure:6733: checking for Dt/Dt.h" >&5 +echo "configure:6721: checking for Dt/Dt.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6760,12 +6748,12 @@ fi } test -z "$with_cde" && { echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 -echo "configure:6764: checking for DtDndDragStart in -lDtSvc" >&5 +echo "configure:6752: checking for DtDndDragStart in -lDtSvc" >&5 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'` xe_check_libs=" -lDtSvc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6845,7 +6833,7 @@ EOF fi echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6 -echo "configure:6849: checking if drag and drop API is needed" >&5 +echo "configure:6837: checking if drag and drop API is needed" >&5 if test "$with_dragndrop" != "no" ; then if test -n "$dragndrop_proto" ; then with_dragndrop=yes @@ -6866,18 +6854,18 @@ EOF fi echo "checking for LDAP" 1>&6 -echo "configure:6870: checking for LDAP" >&5 +echo "configure:6858: 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:6873: checking for ldap.h" >&5 +echo "configure:6861: checking for ldap.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6900,15 +6888,15 @@ fi } test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for lber.h""... $ac_c" 1>&6 -echo "configure:6904: checking for lber.h" >&5 +echo "configure:6892: checking for lber.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6932,12 +6920,12 @@ fi if test "$with_ldap" != "no"; then echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6 -echo "configure:6936: checking for ldap_search in -lldap" >&5 +echo "configure:6924: checking for ldap_search in -lldap" >&5 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6973,12 +6961,12 @@ fi 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:6977: checking "$xe_msg_checking"" >&5 +echo "configure:6965: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7014,12 +7002,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:7018: checking "$xe_msg_checking"" >&5 +echo "configure:7006: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber -lkrb" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7055,12 +7043,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:7059: checking "$xe_msg_checking"" >&5 +echo "configure:7047: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber -lkrb -ldes" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7122,10 +7110,10 @@ EOF for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7126: checking for $ac_func" >&5 +echo "configure:7114: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7177,97 +7165,22 @@ done fi -echo "checking for PostgreSQL" 1>&6 -echo "configure:7182: checking for PostgreSQL" >&5 -postgres_h_path="" -postgres_includes_found=no -save_c_switch_site="$c_switch_site" - if test "$with_postgresql" != "no"; then - ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6 -echo "configure:7190: checking for libpq-fe.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - postgres_includes_found=yes -else - echo "$ac_t""no" 1>&6 -fi - -fi - -if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \ - -d "/usr/local/pgsql/include"; then - c_switch_site="$c_switch_site -I/usr/local/pgsql/include" - ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6 -echo "configure:7225: checking for libpq-fe.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - postgres_includes_found=yes -else - echo "$ac_t""no" 1>&6 -fi + echo "checking for PostgreSQL" 1>&6 +echo "configure:7171: checking for PostgreSQL" >&5 - if test "$postgres_includes_found" != "yes"; then - postgres_h_path="/usr/local/pgsql/include" - fi - c_switch_site="$save_c_switch_site" -fi -if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \ - -d "/usr/include/pgsql"; then - c_switch_site="$c_switch_site -I/usr/include/pgsql" - ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6 -echo "configure:7263: checking for libpq-fe.h" >&5 + for header_dir in "" "pgsql/" "postgresql/"; do + ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6 +echo "configure:7176: checking for ${header_dir}libpq-fe.h" >&5 cat > conftest.$ac_ext < +#include <${header_dir}libpq-fe.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7282,64 +7195,21 @@ fi rm -f conftest* if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - postgres_includes_found=yes + libpq_fe_h_file=${header_dir}libpq-fe.h; break else echo "$ac_t""no" 1>&6 fi - if test "$postgres_includes_found" = "yes"; then - postgres_h_path="pgsql" - fi - c_switch_site="$save_c_switch_site" - fi -if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \ - -d "/usr/include/postgresql"; then - c_switch_site="$c_switch_site -I/usr/include/postgresql" - ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6 -echo "configure:7301: checking for libpq-fe.h" >&5 - -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - postgres_includes_found=yes -else - echo "$ac_t""no" 1>&6 -fi - - if test "$postgres_includes_found" = "yes"; then - postgres_h_path="postgresql" -fi - c_switch_site="$save_c_switch_site" -fi + done -if test "$postgres_includes_found" = "yes"; then - + test -n "$libpq_fe_h_file" && { echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6 -echo "configure:7338: checking for PQconnectdb in -lpq" >&5 +echo "configure:7208: checking for PQconnectdb in -lpq" >&5 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'` xe_check_libs=" -lpq " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7364,23 +7234,31 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - with_postgresql=yes + have_libpq=yes else echo "$ac_t""no" 1>&6 -with_postgresql=no fi + } -fi -if test "$with_postgresql" = "yes"; then - + if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then + with_postgresql=yes + { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_POSTGRESQL +EOF +cat >> confdefs.h <<\EOF +#define HAVE_POSTGRESQL 1 +EOF +} + + echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6 -echo "configure:7379: checking for PQconnectStart in -lpq" >&5 +echo "configure:7257: checking for PQconnectStart in -lpq" >&5 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'` xe_check_libs=" -lpq " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7405,61 +7283,49 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 - with_postgresqlv7=yes + with_postgresqlv7=yes; + { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_POSTGRESQLV7 +EOF +cat >> confdefs.h <<\EOF +#define HAVE_POSTGRESQLV7 1 +EOF +} + else echo "$ac_t""no" 1>&6 -with_postgresqlv7=no fi -fi -if test "$with_postgresql" = "yes"; then - if test -n "$postgres_h_path"; then - { test "$extra_verbose" = "yes" && cat << EOF - Defining POSTGRES_H_PATH = $postgres_h_path + { test "$extra_verbose" = "yes" && cat << EOF + Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file" EOF cat >> confdefs.h <> confdefs.h <<\EOF -#define HAVE_POSTGRESQL 1 -EOF -} - - if test "$with_postgresqlv7" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_POSTGRESQLV7 -EOF -cat >> confdefs.h <<\EOF -#define HAVE_POSTGRESQLV7 1 -EOF -} - - fi - LIBS="-lpq $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lpq\" to \$LIBS"; fi - extra_objs="$extra_objs postgresql.o" && if test "$extra_verbose" = "yes"; then + LIBS="-lpq $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lpq\" to \$LIBS"; fi + extra_objs="$extra_objs postgresql.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"postgresql.o\"" fi + elif test "$with_postgresql" = "yes"; then + { echo "Error:" "Required PostgreSQL support cannot be provided. Check --site-prefixes." >&2; exit 1; } + fi fi if test "$window_system" != "none"; then echo "checking for graphics libraries" 1>&6 -echo "configure:7455: checking for graphics libraries" >&5 +echo "configure:7321: checking for graphics libraries" >&5 xpm_problem="" if test -z "$with_xpm"; then echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6 -echo "configure:7460: checking for Xpm - no older than 3.4f" >&5 +echo "configure:7326: checking for Xpm - no older than 3.4f" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext < @@ -7468,7 +7334,7 @@ echo "configure:7460: checking for Xpm - no older than 3.4f" >&5 XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;} EOF -if { (eval echo configure:7472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest dummy_arg; xpm_status=$?; if test "$xpm_status" = "0"; then @@ -7510,17 +7376,17 @@ EOF libs_x="-lXpm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6 -echo "configure:7514: checking for \"FOR_MSW\" xpm" >&5 +echo "configure:7380: checking for \"FOR_MSW\" xpm" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* xpm_for_msw=no else @@ -7546,15 +7412,15 @@ EOF test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for compface.h""... $ac_c" 1>&6 -echo "configure:7550: checking for compface.h" >&5 +echo "configure:7416: checking for compface.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7577,12 +7443,12 @@ fi } test -z "$with_xface" && { echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:7581: checking for UnGenFace in -lcompface" >&5 +echo "configure:7447: checking for UnGenFace in -lcompface" >&5 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'` xe_check_libs=" -lcompface " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7645,12 +7511,12 @@ EOF if test "$with_png $with_tiff" != "no no"; then echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6 -echo "configure:7649: checking for inflate in -lc" >&5 +echo "configure:7515: checking for inflate in -lc" >&5 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7680,12 +7546,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:7684: checking for inflate in -lz" >&5 +echo "configure:7550: checking for inflate in -lz" >&5 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lz " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7715,12 +7581,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 -echo "configure:7719: checking for inflate in -lgz" >&5 +echo "configure:7585: checking for inflate in -lgz" >&5 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lgz " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7761,15 +7627,15 @@ fi test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 -echo "configure:7765: checking for jpeglib.h" >&5 +echo "configure:7631: checking for jpeglib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7792,12 +7658,12 @@ fi } test -z "$with_jpeg" && { echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 -echo "configure:7796: checking for jpeg_destroy_decompress in -ljpeg" >&5 +echo "configure:7662: checking for jpeg_destroy_decompress in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'` xe_check_libs=" -ljpeg " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7844,10 +7710,10 @@ EOF png_problem="" test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 -echo "configure:7848: checking for pow" >&5 +echo "configure:7714: checking for pow" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pow=yes" else @@ -7891,15 +7757,15 @@ fi } test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:7895: checking for png.h" >&5 +echo "configure:7761: checking for png.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7922,12 +7788,12 @@ fi } test -z "$with_png" && { echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:7926: checking for png_read_image in -lpng" >&5 +echo "configure:7792: checking for png_read_image in -lpng" >&5 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'` xe_check_libs=" -lpng " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7961,10 +7827,10 @@ fi } if test -z "$with_png"; then echo $ac_n "checking for workable png version information""... $ac_c" 1>&6 -echo "configure:7965: checking for workable png version information" >&5 +echo "configure:7831: checking for workable png version information" >&5 xe_check_libs="-lpng -lz" cat > conftest.$ac_ext < int main(int c, char **v) { @@ -7972,7 +7838,7 @@ echo "configure:7965: checking for workable png version information" >&5 if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1; return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;} EOF -if { (eval echo configure:7976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest dummy_arg; png_status=$?; if test "$png_status" = "0"; then @@ -8015,15 +7881,15 @@ EOF test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:8019: checking for tiffio.h" >&5 +echo "configure:7885: checking for tiffio.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8046,12 +7912,12 @@ fi } test -z "$with_tiff" && { echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6 -echo "configure:8050: checking for TIFFClientOpen in -ltiff" >&5 +echo "configure:7916: checking for TIFFClientOpen in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'` xe_check_libs=" -ltiff " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8101,10 +7967,10 @@ fi if test "$with_x11" = "yes"; then echo "checking for X11 graphics libraries" 1>&6 -echo "configure:8105: checking for X11 graphics libraries" >&5 +echo "configure:7971: checking for X11 graphics libraries" >&5 echo "checking for the Athena widgets" 1>&6 -echo "configure:8108: checking for the Athena widgets" >&5 +echo "configure:7974: checking for the Athena widgets" >&5 case "$with_athena" in "xaw" | "") athena_variant=Xaw athena_3d=no ;; @@ -8118,12 +7984,12 @@ echo "configure:8108: checking for the Athena widgets" >&5 if test "$athena_3d" = "no"; then echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:8122: checking for XawScrollbarSetThumb in -l$athena_variant" >&5 +echo "configure:7988: checking for XawScrollbarSetThumb in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8150,12 +8016,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:8154: checking for threeDClassRec in -l$athena_variant" >&5 +echo "configure:8020: checking for threeDClassRec in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8197,12 +8063,12 @@ fi else echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:8201: checking for threeDClassRec in -l$athena_variant" >&5 +echo "configure:8067: checking for threeDClassRec in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8231,12 +8097,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6 -echo "configure:8235: checking for threeDClassRec in -lXaw" >&5 +echo "configure:8101: checking for threeDClassRec in -lXaw" >&5 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'` xe_check_libs=" -lXaw " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8278,15 +8144,15 @@ fi if test "$athena_3d" = "no"; then ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8282: checking for X11/Xaw/ThreeD.h" >&5 +echo "configure:8148: checking for X11/Xaw/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8306,15 +8172,15 @@ else echo "$ac_t""no" 1>&6 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6 -echo "configure:8310: checking for X11/Xaw/XawInit.h" >&5 +echo "configure:8176: checking for X11/Xaw/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8340,15 +8206,15 @@ fi else ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6 -echo "configure:8344: checking for X11/$athena_variant/XawInit.h" >&5 +echo "configure:8210: checking for X11/$athena_variant/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8365,15 +8231,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8369: checking for X11/$athena_variant/ThreeD.h" >&5 +echo "configure:8235: checking for X11/$athena_variant/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8401,15 +8267,15 @@ fi if test -z "$athena_h_path"; then ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6 -echo "configure:8405: checking for $athena_variant/XawInit.h" >&5 +echo "configure:8271: checking for $athena_variant/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8426,15 +8292,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8430: checking for $athena_variant/ThreeD.h" >&5 +echo "configure:8296: checking for $athena_variant/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8463,15 +8329,15 @@ fi if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6 -echo "configure:8467: checking for X11/Xaw3d/XawInit.h" >&5 +echo "configure:8333: checking for X11/Xaw3d/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8488,15 +8354,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8492: checking for X11/Xaw3d/ThreeD.h" >&5 +echo "configure:8358: checking for X11/Xaw3d/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8528,15 +8394,15 @@ fi if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6 -echo "configure:8532: checking for Xaw3d/XawInit.h" >&5 +echo "configure:8398: checking for Xaw3d/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8553,15 +8419,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8557: checking for Xaw3d/ThreeD.h" >&5 +echo "configure:8423: checking for Xaw3d/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8593,15 +8459,15 @@ fi if test -z "$athena_h_path"; then ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8597: checking for X11/Xaw/ThreeD.h" >&5 +echo "configure:8463: checking for X11/Xaw/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8636,15 +8502,15 @@ fi ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:8640: checking for Xm/Xm.h" >&5 +echo "configure:8506: checking for Xm/Xm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8661,12 +8527,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6 -echo "configure:8665: checking for XmStringFree in -lXm" >&5 +echo "configure:8531: checking for XmStringFree in -lXm" >&5 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8706,9 +8572,9 @@ fi if test "$have_motif" = "yes"; then echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 -echo "configure:8710: checking for Lesstif" >&5 +echo "configure:8576: checking for Lesstif" >&5 cat > conftest.$ac_ext < #ifdef LESSTIF_VERSION @@ -8762,11 +8628,83 @@ case "$all_widgets" in libs_x="-l$athena_lib $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-l$athena_lib\" to \$libs_x"; fi - { test "$extra_verbose" = "yes" && cat << EOF - Defining ATHENA_H_PATH = $athena_h_path + { test "$extra_verbose" = "yes" && cat << EOF + Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h" +EOF +cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <<\EOF EOF } + need_athena="yes" if test "$athena_3d" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF @@ -9041,7 +8980,7 @@ fi if test "$with_mule" = "yes" ; then echo "checking for Mule-related features" 1>&6 -echo "configure:9045: checking for Mule-related features" >&5 +echo "configure:8984: checking for Mule-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining MULE EOF @@ -9082,15 +9021,15 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9086: checking for $ac_hdr" >&5 +echo "configure:9025: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9121,12 +9060,12 @@ done echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:9125: checking for strerror in -lintl" >&5 +echo "configure:9064: checking for strerror in -lintl" >&5 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'` xe_check_libs=" -lintl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9197,18 +9136,18 @@ EOF fi echo "checking for Mule input methods" 1>&6 -echo "configure:9201: checking for Mule input methods" >&5 +echo "configure:9140: checking for Mule input methods" >&5 case "$with_xim" in "" | "yes" ) echo "checking for XIM" 1>&6 -echo "configure:9204: checking for XIM" >&5 +echo "configure:9143: checking for XIM" >&5 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6 -echo "configure:9207: checking for XOpenIM in -lX11" >&5 +echo "configure:9146: checking for XOpenIM in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9243,12 +9182,12 @@ fi if test "$have_motif $have_lesstif" = "yes no"; then echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:9247: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:9186: checking for XmImMbLookupString in -lXm" >&5 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9324,15 +9263,15 @@ EOF if test "$with_xfs" = "yes" ; then echo "checking for XFontSet" 1>&6 -echo "configure:9328: checking for XFontSet" >&5 +echo "configure:9267: checking for XFontSet" >&5 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:9331: checking for XmbDrawString in -lX11" >&5 +echo "configure:9270: checking for XmbDrawString in -lX11" >&5 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9383,15 +9322,15 @@ EOF test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6 -echo "configure:9387: checking for wnn/jllib.h" >&5 +echo "configure:9326: checking for wnn/jllib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9416,10 +9355,10 @@ fi for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9420: checking for $ac_func" >&5 +echo "configure:9359: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9471,12 +9410,12 @@ done test "$ac_cv_func_crypt" != "yes" && { echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:9475: checking for crypt in -lcrypt" >&5 +echo "configure:9414: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` xe_check_libs=" -lcrypt " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9522,12 +9461,12 @@ fi if test -z "$with_wnn" -o "$with_wnn" = "yes"; then echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6 -echo "configure:9526: checking for jl_dic_list_e in -lwnn" >&5 +echo "configure:9465: checking for jl_dic_list_e in -lwnn" >&5 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9556,12 +9495,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6 -echo "configure:9560: checking for jl_dic_list_e in -lwnn4" >&5 +echo "configure:9499: checking for jl_dic_list_e in -lwnn4" >&5 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn4 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9590,12 +9529,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6 -echo "configure:9594: checking for jl_dic_list_e in -lwnn6" >&5 +echo "configure:9533: checking for jl_dic_list_e in -lwnn6" >&5 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn6 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9624,12 +9563,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6 -echo "configure:9628: checking for dic_list_e in -lwnn6_fromsrc" >&5 +echo "configure:9567: checking for dic_list_e in -lwnn6_fromsrc" >&5 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn6_fromsrc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9688,12 +9627,12 @@ EOF if test "$with_wnn6" != "no"; then echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6 -echo "configure:9692: checking for jl_fi_dic_list in -l$libwnn" >&5 +echo "configure:9631: checking for jl_fi_dic_list in -l$libwnn" >&5 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'` xe_check_libs=" -l$libwnn " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9739,15 +9678,15 @@ EOF if test "$with_canna" != "no"; then ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:9743: checking for canna/jrkanji.h" >&5 +echo "configure:9682: checking for canna/jrkanji.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9774,15 +9713,15 @@ fi c_switch_site="$c_switch_site -I/usr/local/canna/include" ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:9778: checking for canna/jrkanji.h" >&5 +echo "configure:9717: checking for canna/jrkanji.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9810,15 +9749,15 @@ fi test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6 -echo "configure:9814: checking for canna/RK.h" >&5 +echo "configure:9753: checking for canna/RK.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9841,12 +9780,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:9845: checking for RkBgnBun in -lRKC" >&5 +echo "configure:9784: checking for RkBgnBun in -lRKC" >&5 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'` xe_check_libs=" -lRKC " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9880,12 +9819,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:9884: checking for jrKanjiControl in -lcanna" >&5 +echo "configure:9823: checking for jrKanjiControl in -lcanna" >&5 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'` xe_check_libs=" -lcanna " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9945,12 +9884,12 @@ if test "$need_motif" = "yes" ; then libs_x="-lXm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXm\" to \$libs_x"; fi echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6 -echo "configure:9949: checking for layout_object_getvalue in -li18n" >&5 +echo "configure:9888: checking for layout_object_getvalue in -li18n" >&5 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'` xe_check_libs=" -li18n " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10047,10 +9986,10 @@ fi for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10051: checking for $ac_func" >&5 +echo "configure:9990: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10108,10 +10047,10 @@ extra_objs="$extra_objs realpath.o" && if test "$extra_verbose" = "yes"; then for ac_func in getloadavg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10112: checking for $ac_func" >&5 +echo "configure:10051: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10170,12 +10109,12 @@ then echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:10174: checking for kstat_open in -lkstat" >&5 +echo "configure:10113: checking for kstat_open in -lkstat" >&5 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lkstat " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10220,12 +10159,12 @@ fi echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 -echo "configure:10224: checking for kvm_read in -lkvm" >&5 +echo "configure:10163: checking for kvm_read in -lkvm" >&5 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'` xe_check_libs=" -lkvm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10270,16 +10209,16 @@ fi fi echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:10274: checking whether netdb declares h_errno" >&5 +echo "configure:10213: checking whether netdb declares h_errno" >&5 cat > conftest.$ac_ext < int main() { return h_errno; ; return 0; } EOF -if { (eval echo configure:10283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -10299,16 +10238,16 @@ fi rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:10303: checking for sigsetjmp" >&5 +echo "configure:10242: checking for sigsetjmp" >&5 cat > conftest.$ac_ext < int main() { sigjmp_buf bar; sigsetjmp (bar, 0); ; return 0; } EOF -if { (eval echo configure:10312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10251: \"$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 @@ -10328,11 +10267,11 @@ fi rm -f conftest* echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:10332: checking whether localtime caches TZ" >&5 +echo "configure:10271: checking whether localtime caches TZ" >&5 if test "$ac_cv_func_tzset" = "yes"; then cat > conftest.$ac_ext < #if STDC_HEADERS @@ -10367,7 +10306,7 @@ main() exit (0); } EOF -if { (eval echo configure:10371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then emacs_cv_localtime_cache=no else @@ -10397,9 +10336,9 @@ fi if test "$HAVE_TIMEVAL" = "yes"; then echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6 -echo "configure:10401: checking whether gettimeofday accepts one or two arguments" >&5 +echo "configure:10340: checking whether gettimeofday accepts one or two arguments" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""two" 1>&6 else @@ -10442,19 +10381,19 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:10446: checking for inline" >&5 +echo "configure:10385: checking for inline" >&5 ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -10494,17 +10433,17 @@ test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inli # 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:10498: checking for working alloca.h" >&5 +echo "configure:10437: checking for working alloca.h" >&5 cat > conftest.$ac_ext < int main() { -void *p = alloca(2 * sizeof(int)); +char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:10508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -10528,10 +10467,10 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:10532: checking for alloca" >&5 +echo "configure:10471: checking for alloca" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -10598,10 +10537,10 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:10602: checking whether alloca needs Cray hooks" >&5 +echo "configure:10541: checking whether alloca needs Cray hooks" >&5 cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10629: checking for $ac_func" >&5 +echo "configure:10568: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10681,10 +10620,10 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:10685: checking stack direction for C alloca" >&5 +echo "configure:10624: checking stack direction for C alloca" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_stack_direction=1 else @@ -10732,15 +10671,15 @@ test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" && if test "$extra_verbos ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:10736: checking for vfork.h" >&5 +echo "configure:10675: checking for vfork.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10768,10 +10707,10 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:10772: checking for working vfork" >&5 +echo "configure:10711: checking for working vfork" >&5 cat > conftest.$ac_ext < @@ -10866,7 +10805,7 @@ main() { } } EOF -if { (eval echo configure:10870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_vfork_works=yes else @@ -10892,10 +10831,10 @@ fi echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:10896: checking for working strcoll" >&5 +echo "configure:10835: checking for working strcoll" >&5 cat > conftest.$ac_ext < main () @@ -10905,7 +10844,7 @@ main () strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:10909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_strcoll_works=yes else @@ -10933,10 +10872,10 @@ fi for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10937: checking for $ac_func" >&5 +echo "configure:10876: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10987,10 +10926,10 @@ fi done echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:10991: checking whether getpgrp takes no argument" >&5 +echo "configure:10930: checking whether getpgrp takes no argument" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_getpgrp_void=yes else @@ -11072,10 +11011,10 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11076: checking for working mmap" >&5 +echo "configure:11015: checking for working mmap" >&5 case "$opsys" in ultrix* ) have_mmap=no ;; *) cat > conftest.$ac_ext < #include @@ -11108,7 +11047,7 @@ int main (int argc, char *argv[]) return 1; } EOF -if { (eval echo configure:11112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:11051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then have_mmap=yes else @@ -11134,9 +11073,9 @@ test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no if test "$rel_alloc $have_mmap" = "default yes"; then if test "$doug_lea_malloc" = "yes"; then echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6 -echo "configure:11138: checking for M_MMAP_THRESHOLD" >&5 +echo "configure:11077: checking for M_MMAP_THRESHOLD" >&5 cat > conftest.$ac_ext < int main() { @@ -11148,7 +11087,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:11152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rel_alloc=no; echo "$ac_t""yes" 1>&6; else @@ -11173,15 +11112,15 @@ EOF ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:11177: checking for termios.h" >&5 +echo "configure:11116: checking for termios.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11224,15 +11163,15 @@ else echo "$ac_t""no" 1>&6 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termio.h""... $ac_c" 1>&6 -echo "configure:11228: checking for termio.h" >&5 +echo "configure:11167: checking for termio.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11264,10 +11203,10 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:11268: checking for socket" >&5 +echo "configure:11207: checking for socket" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -11305,15 +11244,15 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6 -echo "configure:11309: checking for netinet/in.h" >&5 +echo "configure:11248: checking for netinet/in.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11330,15 +11269,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6 -echo "configure:11334: checking for arpa/inet.h" >&5 +echo "configure:11273: checking for arpa/inet.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11363,9 +11302,9 @@ EOF } echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:11367: checking "for sun_len member in struct sockaddr_un"" >&5 +echo "configure:11306: checking "for sun_len member in struct sockaddr_un"" >&5 cat > conftest.$ac_ext < @@ -11376,7 +11315,7 @@ int main() { static struct sockaddr_un x; x.sun_len = 1; ; return 0; } EOF -if { (eval echo configure:11380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SOCKADDR_SUN_LEN @@ -11394,9 +11333,9 @@ else fi rm -f conftest* echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 -echo "configure:11398: checking "for ip_mreq struct in netinet/in.h"" >&5 +echo "configure:11337: checking "for ip_mreq struct in netinet/in.h"" >&5 cat > conftest.$ac_ext < @@ -11406,7 +11345,7 @@ int main() { static struct ip_mreq x; ; return 0; } EOF -if { (eval echo configure:11410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MULTICAST @@ -11437,10 +11376,10 @@ fi echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:11441: checking for msgget" >&5 +echo "configure:11380: checking for msgget" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_msgget=yes" else @@ -11478,15 +11417,15 @@ if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6 -echo "configure:11482: checking for sys/ipc.h" >&5 +echo "configure:11421: checking for sys/ipc.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11503,15 +11442,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6 -echo "configure:11507: checking for sys/msg.h" >&5 +echo "configure:11446: checking for sys/msg.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11549,15 +11488,15 @@ fi ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:11553: checking for dirent.h" >&5 +echo "configure:11492: checking for dirent.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11584,15 +11523,15 @@ else echo "$ac_t""no" 1>&6 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6 -echo "configure:11588: checking for sys/dir.h" >&5 +echo "configure:11527: checking for sys/dir.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11625,15 +11564,15 @@ fi ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:11629: checking for nlist.h" >&5 +echo "configure:11568: checking for nlist.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11663,22 +11602,22 @@ fi echo "checking "for sound support"" 1>&6 -echo "configure:11667: checking "for sound support"" >&5 +echo "configure:11606: checking "for sound support"" >&5 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes if test "$with_native_sound" != "no"; then if test -n "$native_sound_lib"; then ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6 -echo "configure:11674: checking for multimedia/audio_device.h" >&5 +echo "configure:11613: checking for multimedia/audio_device.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11726,12 +11665,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:11730: checking for ALopenport in -laudio" >&5 +echo "configure:11669: checking for ALopenport in -laudio" >&5 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11773,12 +11712,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:11777: checking for AOpenAudio in -lAlib" >&5 +echo "configure:11716: checking for AOpenAudio in -lAlib" >&5 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'` xe_check_libs=" -lAlib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11827,15 +11766,15 @@ fi for dir in "machine" "sys" "linux"; do ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6 -echo "configure:11831: checking for ${dir}/soundcard.h" >&5 +echo "configure:11770: checking for ${dir}/soundcard.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11871,6 +11810,13 @@ fi done fi + if test -z "$sound_found"; then + if test "$with_msw" = "yes"; then + sound_found=yes + native_sound_lib= + fi + fi + test "$sound_found" = "yes" && with_native_sound=yes fi @@ -11889,15 +11835,15 @@ fi if test "$with_nas_sound" != "no"; then ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6 -echo "configure:11893: checking for audio/audiolib.h" >&5 +echo "configure:11839: checking for audio/audiolib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11915,12 +11861,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6 -echo "configure:11919: checking for AuOpenServer in -laudio" >&5 +echo "configure:11865: checking for AuOpenServer in -laudio" >&5 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11970,7 +11916,7 @@ EOF fi libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi cat > conftest.$ac_ext < EOF @@ -12001,7 +11947,7 @@ if test "$with_esd_sound" != "no"; then # Extract the first word of "esd-config", so it can be a program name with args. set dummy esd-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12005: checking for $ac_word" >&5 +echo "configure:11951: checking for $ac_word" >&5 if test -n "$have_esd_config"; then ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test. @@ -12030,10 +11976,10 @@ fi c_switch_site="$c_switch_site `esd-config --cflags`" && if test "$extra_verbose" = "yes"; then echo " Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi LIBS="`esd-config --libs` $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"`esd-config --libs`\" to \$LIBS"; fi echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6 -echo "configure:12034: checking for esd_play_stream" >&5 +echo "configure:11980: checking for esd_play_stream" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_esd_play_stream=yes" else @@ -12107,7 +12053,7 @@ test -z "$with_tty" && with_tty=yes if test "$with_tty" = "yes" ; then echo "checking for TTY-related features" 1>&6 -echo "configure:12111: checking for TTY-related features" >&5 +echo "configure:12057: checking for TTY-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_TTY EOF @@ -12123,12 +12069,12 @@ EOF if test -z "$with_ncurses"; then echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:12127: checking for tgetent in -lncurses" >&5 +echo "configure:12073: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lncurses " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12172,15 +12118,15 @@ EOF ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:12176: checking for ncurses/curses.h" >&5 +echo "configure:12122: checking for ncurses/curses.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12202,15 +12148,15 @@ fi ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6 -echo "configure:12206: checking for ncurses/term.h" >&5 +echo "configure:12152: checking for ncurses/term.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12240,15 +12186,15 @@ fi c_switch_site="$c_switch_site -I/usr/include/ncurses" ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:12244: checking for ncurses/curses.h" >&5 +echo "configure:12190: checking for ncurses/curses.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12283,12 +12229,12 @@ fi for lib in curses termlib termcap; do echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:12287: checking for tgetent in -l$lib" >&5 +echo "configure:12233: checking for tgetent in -l$lib" >&5 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -l$lib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12330,12 +12276,12 @@ fi else echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:12334: checking for tgetent in -lcurses" >&5 +echo "configure:12280: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lcurses " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12364,12 +12310,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:12368: checking for tgetent in -ltermcap" >&5 +echo "configure:12314: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -ltermcap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12428,15 +12374,15 @@ EOF test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gpm.h""... $ac_c" 1>&6 -echo "configure:12432: checking for gpm.h" >&5 +echo "configure:12378: checking for gpm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12459,12 +12405,12 @@ fi } test -z "$with_gpm" && { echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:12463: checking for Gpm_Open in -lgpm" >&5 +echo "configure:12409: checking for Gpm_Open in -lgpm" >&5 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgpm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12525,20 +12471,20 @@ test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \ != "no no no" && echo "checking for database support" 1>&6 -echo "configure:12529: checking for database support" >&5 +echo "configure:12475: checking for database support" >&5 if test "$with_database_gdbm $with_database_dbm" != "no no"; then ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6 -echo "configure:12534: checking for ndbm.h" >&5 +echo "configure:12480: checking for ndbm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12568,12 +12514,12 @@ fi if test "$with_database_gdbm" != "no"; then echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:12572: checking for dbm_open in -lgdbm" >&5 +echo "configure:12518: checking for dbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdbm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12612,10 +12558,10 @@ fi if test "$with_database_dbm" != "no"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:12616: checking for dbm_open" >&5 +echo "configure:12562: checking for dbm_open" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -12657,12 +12603,12 @@ else echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:12661: checking for dbm_open in -ldbm" >&5 +echo "configure:12607: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -ldbm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12714,10 +12660,10 @@ EOF if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6 -echo "configure:12718: checking for Berkeley db.h" >&5 +echo "configure:12664: checking for Berkeley db.h" >&5 for header in "db/db.h" "db.h"; do cat > conftest.$ac_ext < @@ -12739,7 +12685,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_file="$header"; break else @@ -12755,9 +12701,9 @@ rm -f conftest* if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6 -echo "configure:12759: checking for Berkeley DB version" >&5 +echo "configure:12705: checking for Berkeley DB version" >&5 cat > conftest.$ac_ext < #if DB_VERSION_MAJOR > 1 @@ -12776,10 +12722,10 @@ fi rm -f conftest* echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6 -echo "configure:12780: checking for $dbfunc" >&5 +echo "configure:12726: checking for $dbfunc" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$dbfunc=yes" else @@ -12821,12 +12767,12 @@ else echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6 -echo "configure:12825: checking for $dbfunc in -ldb" >&5 +echo "configure:12771: checking for $dbfunc in -ldb" >&5 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'` xe_check_libs=" -ldb " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12901,12 +12847,12 @@ fi if test "$with_socks" = "yes"; then echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:12905: checking for SOCKSinit in -lsocks" >&5 +echo "configure:12851: checking for SOCKSinit in -lsocks" >&5 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocks " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12972,19 +12918,22 @@ fi if test "$with_modules" != "no"; then echo "checking for module support" 1>&6 -echo "configure:12976: checking for module support" >&5 +echo "configure:12922: checking for module support" >&5 - ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` + if test "$with_msw" = "yes"; then + have_dl=yes; + else + ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:12980: checking for dlfcn.h" >&5 +echo "configure:12929: checking for dlfcn.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13000,14 +12949,14 @@ rm -f conftest* if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:13006: checking for dlopen in -ldl" >&5 +echo "configure:12955: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -ldl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13037,12 +12986,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 -echo "configure:13041: checking for dlopen in -lc" >&5 +echo "configure:12990: checking for dlopen in -lc" >&5 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13080,8 +13029,8 @@ else echo "$ac_t""no" 1>&6 fi - if test -n "$have_dl"; then - { test "$extra_verbose" = "yes" && cat << \EOF + if test -n "$have_dl"; then + { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_DLOPEN EOF cat >> confdefs.h <<\EOF @@ -13089,15 +13038,15 @@ cat >> confdefs.h <<\EOF EOF } - else - + else + echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:13096: checking for shl_load in -ldld" >&5 +echo "configure:13045: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13123,7 +13072,7 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 libdl=dld have_dl=yes; - { test "$extra_verbose" = "yes" && cat << \EOF + { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SHL_LOAD EOF cat >> confdefs.h <<\EOF @@ -13135,12 +13084,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:13139: checking for dld_init in -ldld" >&5 +echo "configure:13088: checking for dld_init in -ldld" >&5 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13166,7 +13115,7 @@ xe_check_libs="" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 libdl=dld have_dl=yes; - { test "$extra_verbose" = "yes" && cat << \EOF + { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_DLD_INIT EOF cat >> confdefs.h <<\EOF @@ -13182,8 +13131,8 @@ fi fi - fi - + fi + fi if test -n "$have_dl"; then dll_ld= @@ -13196,7 +13145,7 @@ xehost=$canonical xealias=$internal_configuration echo "checking how to build dynamic libraries for ${xehost}" 1>&6 -echo "configure:13200: checking how to build dynamic libraries for ${xehost}" >&5 +echo "configure:13149: checking how to build dynamic libraries for ${xehost}" >&5 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts. case "$xehost" in *-*-linux-gnu*) ;; @@ -13224,9 +13173,9 @@ if test "$GCC" = "yes"; then XEGCC=yes else echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:13228: checking checking whether we are using GNU C" >&5 +echo "configure:13177: checking checking whether we are using GNU C" >&5 cat > conftest.$ac_ext <&6 -echo "configure:13252: checking how to produce PIC code" >&5 +echo "configure:13201: checking how to produce PIC code" >&5 wl= can_build_shared=yes @@ -13269,6 +13218,9 @@ if test "$XEGCC" = yes; then # like `-m68040'. dll_cflags='-m68020 -resident32 -malways-restore-a4' ;; + *cygwin* | *mingw* ) + # PIC is the default + ;; *) dll_cflags='-fPIC' ;; @@ -13341,18 +13293,18 @@ if test -n "$dll_cflags"; then # Check to make sure the dll_cflags actually works. echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6 -echo "configure:13345: checking if PIC flag ${dll_cflags} really works" >&5 +echo "configure:13297: checking if PIC flag ${dll_cflags} really works" >&5 save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $dll_cflags -DPIC" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also @@ -13383,7 +13335,7 @@ cc_produces_so=no xldf= xcldf= echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6 -echo "configure:13387: checking if C compiler can produce shared libraries" >&5 +echo "configure:13339: checking if C compiler can produce shared libraries" >&5 if test "$XEGCC" = yes; then xcldf="-shared" xldf="-shared" @@ -13434,14 +13386,14 @@ if test -n "$xcldf"; then xe_libs= ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cc_produces_so=yes else @@ -13466,7 +13418,7 @@ if test -z "$LTLD"; then if test "$XEGCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:13470: checking for ld used by GCC" >&5 +echo "configure:13422: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -13491,7 +13443,7 @@ echo "configure:13470: checking for ld used by GCC" >&5 esac else echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:13495: checking for GNU ld" >&5 +echo "configure:13447: checking for GNU ld" >&5 fi if test -z "$LTLD"; then @@ -13529,7 +13481,7 @@ ld_dynamic_link_flags= # Check to see if it really is or isn't GNU ld. echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6 -echo "configure:13533: checking if the linker is GNU ld" >&5 +echo "configure:13485: checking if the linker is GNU ld" >&5 # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LTLD -v 2>&1 &5; then xe_gnu_ld=yes @@ -13557,7 +13509,7 @@ else # OK - only NOW do we futz about with ld. # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6 -echo "configure:13561: checking whether the linker supports shared libraries" >&5 +echo "configure:13513: checking whether the linker supports shared libraries" >&5 dll_ld=$CC dll_ldflags=$LDFLAGS ld_shlibs=yes @@ -13772,10 +13724,10 @@ EOF for ac_func in dlerror _dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13776: checking for $ac_func" >&5 +echo "configure:13728: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13837,11 +13789,11 @@ done fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:13797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -14488,7 +14440,7 @@ if test "$with_x11" = "yes"; then echo " - Handling WM_COMMAND properly." fi fi -if test "$have_xaw" = "yes"; then +if test "$need_athena" = "yes"; then echo " Compiling in support for the Athena widget set:" echo " - Athena headers location: $athena_h_path" echo " - Athena library to link: $athena_lib" @@ -14581,12 +14533,8 @@ test "$with_database_gdbm" = yes && echo " Compiling in support for GNU DBM." test "$with_ldap" = yes && echo " Compiling in support for LDAP." if test "$with_postgresql" = yes; then echo " Compiling in support for PostgreSQL." - if test "$with_postgresqlv7" = yes; then - echo " - Using PostgreSQL V7 bindings." - fi - if test -n "$postgres_h_path"; then - echo " - PostgreSQL headers location: $postgres_h_path" - fi + echo " - Using PostgreSQL header file: $libpq_fe_h_file" + test "$with_postgresqlv7" = yes && echo " - Using PostgreSQL V7 bindings." fi echo " @@ -14611,7 +14559,7 @@ Mail:" test "$with_pop" = yes && echo " Compiling in support for POP mail retrieval." test "$with_kerberos" = yes && echo " Compiling in support for Kerberos POP authentication." test "$with_hesiod" = yes && echo " Compiling in support for Hesiod POP server access." -echo " Compiling in support for \"$mail_locking\" mail spool file locking method." +test -n "$mail_locking" && echo " Compiling in support for \"$mail_locking\" mail spool file locking method." echo " Other Features:" diff --git a/configure.in b/configure.in index 1cbb4d2..34c5136 100644 --- a/configure.in +++ b/configure.in @@ -789,15 +789,16 @@ The default is to autodetect all sound support."]) dnl Has the user specified the toolkit(s) to use for GUI elements? "with_menubars" | \ "with_scrollbars" | \ - "with_dialogs" | \ + "with_dialogs" | \ "with_widgets" ) case "$val" in l | lu | luc | luci | lucid ) val=lucid ;; m | mo | mot | moti | motif ) val=motif ;; a | at | ath | athe | athen | athena ) val=athena ;; - n | no | non | none ) val=no ;; + n | no | non | none ) val=no ;; + y | ye | yes ) val=yes ;; * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: - \`lucid', \`motif', \`athena', or \`no'."]) ;; + \`lucid', \`motif', \`athena', \`yes', or \`no'."]) ;; esac eval "$opt=\"$val\"" ;; @@ -1094,6 +1095,7 @@ case "$canonical" in clipper-* ) machine=clipper ;; arm* ) machine=arm ;; ns32k-* ) machine=ns32000 ;; + s390-* ) machine=s390 ;; esac dnl Straightforward OS determination @@ -1655,37 +1657,7 @@ dnl -------------------------------------------------------------------- AC_AIX dnl Defines _ALL_SOURCE on AIX. -dnl Determine which SMART_INCLUDE macro will work for this system -cat > $srcdir/conffoo.h < -#define CONFFOO_H_PATH $srcdir -#define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file) -#include CONFFOO_INCLUDE(conffoo.h) -], [ AC_MSG_RESULT(direct); AC_DEFINE(SMART_INCLUDE_INDIRECTIONS,0) ], -AC_TRY_COMPILE(,[ -#define GLUE_INCLUDE(path,file) <##path##/##file##> -#define SMART_INCLUDE(path,file) GLUE_INCLUDE(path,file) -#define CONFFOO_H_PATH $srcdir -#define CONFFOO_INCLUDE(file) SMART_INCLUDE(CONFFOO_H_PATH,file) -#include CONFFOO_INCLUDE(conffoo.h) -], [ AC_MSG_RESULT(simple); AC_DEFINE(SMART_INCLUDE_INDIRECTIONS,1) ], -AC_TRY_COMPILE(,[ -#define GLUE_INCLUDE_2(path,file) <##path##/##file##> -#define GLUE_INCLUDE_1(path,file) GLUE_INCLUDE_2(path,file) -#define SMART_INCLUDE(path,file) GLUE_INCLUDE_1(path,file) -#define CONFFOO_H_PATH $srcdir -#define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file) -#include CONFFOO_INCLUDE(conffoo.h) -], [ AC_MSG_RESULT(double); AC_DEFINE(SMART_INCLUDE_INDIRECTIONS,2) ], - AC_MSG_ERROR([Cannot define a proper SMART_INCLUDE macro. Please report.])))) -rm -f $srcdir/conffoo.h - - -dnl We want feature macros defined here and in config.h.in, so that +dnl We want feature macros defined here *and* in config.h.in, so that dnl the compilation environment at configure time and compile time agree. AC_MSG_CHECKING(for GNU libc) @@ -1861,7 +1833,7 @@ if test "$pdump" = "yes"; then start_files= libs_standard= unexec= - lib_gcc= + lib_gcc= fi dnl For debugging... @@ -1883,8 +1855,8 @@ dnl Non-ordinary link usually requires -lc test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc" dnl Compiler-specific hacks -dnl DEC C requires -std -test "$__DECC" = "yes" && XE_APPEND(-std, c_switch_site) +dnl DEC C `-std1' means ANSI C mode +test "$__DECC" = "yes" && XE_APPEND(-std1, c_switch_site) dnl Calculalate value of CFLAGS: dnl Use either command line flag, environment var, or autodetection @@ -2380,6 +2352,19 @@ AC_TYPE_MODE_T AC_TYPE_OFF_T AC_CHECK_TYPE(ssize_t, int) +dnl check for Unix98 socklen_t +AC_MSG_CHECKING(for socklen_t) +AC_TRY_COMPILE([#include +socklen_t x; +],[],[AC_MSG_RESULT(yes)],[ +AC_TRY_COMPILE([#include +int accept (int, struct sockaddr *, size_t *); +],[],[ +AC_MSG_RESULT(size_t) +AC_DEFINE(socklen_t,size_t)], [ +AC_MSG_RESULT(int) +AC_DEFINE(socklen_t,int)])]) + AC_MSG_CHECKING(for struct timeval) AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME #include @@ -2443,9 +2428,18 @@ dnl The mail_use_xxx variables are set according to the s&m headers. test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking +if test -z "$mail_locking"; then + case "$opsys" in cygwin* | mingw*) + mail_locking=pop ;; + esac +fi + if test "$mail_locking" = "lockf"; then AC_DEFINE(MAIL_LOCK_LOCKF) elif test "$mail_locking" = "flock"; then AC_DEFINE(MAIL_LOCK_FLOCK) elif test "$mail_locking" = "locking"; then AC_DEFINE(MAIL_LOCK_LOCKING) +elif test "$mail_locking" = "pop"; then + with_pop=yes + mail_locking= else mail_locking="dot-locking"; AC_DEFINE(MAIL_LOCK_DOT) fi test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \ @@ -2623,10 +2617,19 @@ EOF cd .. rm -fr conftestdir for word in $xmkmf_defines; do - case "$word" in - -D*=* ) ;; - -D* ) word=`echo '' $word | sed -e 's:^ *-D::'` - AC_DEFINE_UNQUOTED($word) ;; + case "$word" in -D* ) + sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'` + case "$word" in + -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;; + * ) val=1 ;; + esac +dnl Avoid re-AC_DEFINE-ing xmkmf symbols we've already defined above. + if grep "^#define $sym " confdefs.h >/dev/null; then :; else + if test "$val" = "1" + then AC_DEFINE_UNQUOTED($sym) + else AC_DEFINE_UNQUOTED($sym,$val) + fi + fi ;; esac done fi @@ -2714,7 +2717,7 @@ if test "$with_msw" != "no"; then if test "$with_msw" = "yes"; then AC_DEFINE(HAVE_MS_WINDOWS) install_pp="$blddir/lib-src/installexe.sh" - XE_APPEND(-lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool, libs_system) + XE_APPEND(-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool, libs_system) test "$with_dragndrop" != no && XE_APPEND(msw, dragndrop_proto) if test "$window_system" != x11; then window_system=msw @@ -2947,67 +2950,35 @@ if test "$with_ldap" = "yes"; then fi dnl Autodetect PostgreSQL -dnl The default installation location (non-Linux) is /usr/local/pgsql; -dnl a different prefix can be selected at build/install time. If PostgreSQL -dnl is installed into a different prefix, that prefix must be specified in -dnl in the --site-prefixes flag. -dnl The default RPM-based Linux installation location is /usr. -AC_CHECKING(for PostgreSQL) -postgres_h_path="" -postgres_includes_found=no -save_c_switch_site="$c_switch_site" - -dnl First, test standard location and site prefixes only: +dnl On many Linux systems, PostgreSQL is packaged to be installed in /usr; +dnl in this case, configure will easily detect it there. +dnl +dnl If PostgreSQL is installed into a different prefix, +dnl (such as the default /usr/local/pgsql when building from source), +dnl that prefix must be specified using the --site-prefixes flag. if test "$with_postgresql" != "no"; then - AC_CHECK_HEADER(libpq-fe.h,postgres_includes_found=yes) -fi + AC_CHECKING(for PostgreSQL) -dnl Otherwise, test different known headers locations on linux: -if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \ - -d "/usr/local/pgsql/include"; then - c_switch_site="$c_switch_site -I/usr/local/pgsql/include" - AC_CHECK_HEADER(libpq-fe.h,postgres_includes_found=yes) - if test "$postgres_includes_found" != "yes"; then - postgres_h_path="/usr/local/pgsql/include" - fi - c_switch_site="$save_c_switch_site" -fi -if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \ - -d "/usr/include/pgsql"; then - c_switch_site="$c_switch_site -I/usr/include/pgsql" - AC_CHECK_HEADER(libpq-fe.h,postgres_includes_found=yes) - if test "$postgres_includes_found" = "yes"; then - postgres_h_path="pgsql" - fi - c_switch_site="$save_c_switch_site" - fi -if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \ - -d "/usr/include/postgresql"; then - c_switch_site="$c_switch_site -I/usr/include/postgresql" - AC_CHECK_HEADER(libpq-fe.h,postgres_includes_found=yes) - if test "$postgres_includes_found" = "yes"; then - postgres_h_path="postgresql" -fi - c_switch_site="$save_c_switch_site" -fi +dnl Look for these standard header file locations, known to be used on Linux + for header_dir in "" "pgsql/" "postgresql/"; do + AC_CHECK_HEADER(${header_dir}libpq-fe.h, + libpq_fe_h_file=${header_dir}libpq-fe.h; break) + done -dnl Finally, check if we can link with libpq: -if test "$postgres_includes_found" = "yes"; then - AC_CHECK_LIB(pq,PQconnectdb,with_postgresql=yes,with_postgresql=no) -fi -if test "$with_postgresql" = "yes"; then - AC_CHECK_LIB(pq,PQconnectStart,with_postgresqlv7=yes,with_postgresqlv7=no) -fi -if test "$with_postgresql" = "yes"; then - if test -n "$postgres_h_path"; then - AC_DEFINE_UNQUOTED(POSTGRES_H_PATH, $postgres_h_path) - fi - AC_DEFINE(HAVE_POSTGRESQL) - if test "$with_postgresqlv7" = "yes"; then - AC_DEFINE(HAVE_POSTGRESQLV7) - fi - XE_PREPEND(-lpq, LIBS) - XE_ADD_OBJS(postgresql.o) + test -n "$libpq_fe_h_file" && { AC_CHECK_LIB(pq,PQconnectdb,have_libpq=yes) } + + if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then + with_postgresql=yes + AC_DEFINE(HAVE_POSTGRESQL) + AC_CHECK_LIB(pq,PQconnectStart, [ + with_postgresqlv7=yes; + AC_DEFINE(HAVE_POSTGRESQLV7)]) + AC_DEFINE_UNQUOTED(LIBPQ_FE_H_FILE, "$libpq_fe_h_file") + XE_PREPEND(-lpq, LIBS) + XE_ADD_OBJS(postgresql.o) + elif test "$with_postgresql" = "yes"; then + XE_DIE("Required PostgreSQL support cannot be provided. Check --site-prefixes.") + fi fi dnl ---------------------- @@ -3308,12 +3279,24 @@ case "$all_widgets" in dnl Add the Athena widget library we located earlier XE_PREPEND(-l$athena_lib, libs_x) - dnl Export the path for lwlib, used to build and include the headers - dnl from the right place later on. - AC_DEFINE_UNQUOTED(ATHENA_H_PATH, $athena_h_path) + dnl Tell lwlib where to find the Athena header files. + dnl Many people have tried to create a `smart' way of doing this, + dnl but all have failed. Before changing the following ugly definitions, + dnl consult the veterans of many a battle. + AC_DEFINE_UNQUOTED(ATHENA_Scrollbar_h_,"$athena_h_path/Scrollbar.h") + AC_DEFINE_UNQUOTED(ATHENA_Dialog_h_,"$athena_h_path/Dialog.h") + AC_DEFINE_UNQUOTED(ATHENA_Form_h_,"$athena_h_path/Form.h") + AC_DEFINE_UNQUOTED(ATHENA_Command_h_,"$athena_h_path/Command.h") + AC_DEFINE_UNQUOTED(ATHENA_Label_h_,"$athena_h_path/Label.h") + AC_DEFINE_UNQUOTED(ATHENA_LabelP_h_,"$athena_h_path/LabelP.h") + AC_DEFINE_UNQUOTED(ATHENA_Toggle_h_,"$athena_h_path/Toggle.h") + AC_DEFINE_UNQUOTED(ATHENA_ToggleP_h_,"$athena_h_path/ToggleP.h") + AC_DEFINE_UNQUOTED(ATHENA_AsciiText_h_,"$athena_h_path/AsciiText.h") + AC_DEFINE_UNQUOTED(ATHENA_XawInit_h_,"$athena_h_path/XawInit.h") AC_DEFINE(LWLIB_USES_ATHENA) AC_DEFINE(NEED_ATHENA) + need_athena="yes" if test "$athena_3d" = "yes"; then AC_DEFINE(HAVE_ATHENA_3D) @@ -3833,6 +3816,14 @@ if test "$with_native_sound" != "no"; then done fi + dnl Win32 Native uses native sound + if test -z "$sound_found"; then + if test "$with_msw" = "yes"; then + sound_found=yes + native_sound_lib= + fi + fi + test "$sound_found" = "yes" && with_native_sound=yes fi @@ -4080,20 +4071,25 @@ dnl autodetect dll support if test "$with_modules" != "no"; then AC_CHECKING(for module support) - dnl Find headers and libraries - AC_CHECK_HEADER(dlfcn.h, [ - AC_CHECK_LIB(dl, dlopen, [ have_dl=yes libdl=dl], [ - AC_CHECK_LIB(c, dlopen, [ have_dl=yes ])])]) - if test -n "$have_dl"; then - AC_DEFINE(HAVE_DLOPEN) + dnl Check for MS-Windows + if test "$with_msw" = "yes"; then + have_dl=yes; else - AC_CHECK_LIB(dld, shl_load, [ - libdl=dld have_dl=yes; - AC_DEFINE(HAVE_SHL_LOAD)], [ - AC_CHECK_LIB(dld, dld_init, [ - libdl=dld have_dl=yes; - AC_DEFINE(HAVE_DLD_INIT)])]) - fi + dnl Find headers and libraries + AC_CHECK_HEADER(dlfcn.h, [ + AC_CHECK_LIB(dl, dlopen, [ have_dl=yes libdl=dl], [ + AC_CHECK_LIB(c, dlopen, [ have_dl=yes ])])]) + if test -n "$have_dl"; then + AC_DEFINE(HAVE_DLOPEN) + else + AC_CHECK_LIB(dld, shl_load, [ + libdl=dld have_dl=yes; + AC_DEFINE(HAVE_SHL_LOAD)], [ + AC_CHECK_LIB(dld, dld_init, [ + libdl=dld have_dl=yes; + AC_DEFINE(HAVE_DLD_INIT)])]) + fi + fi dnl end !MS-Windows if test -n "$have_dl"; then dnl XE_SHLIB_STUFF (in aclocal.m4) defines $can_build_shared @@ -4550,7 +4546,7 @@ if test "$with_x11" = "yes"; then echo " - Handling WM_COMMAND properly." fi fi -if test "$have_xaw" = "yes"; then +if test "$need_athena" = "yes"; then echo " Compiling in support for the Athena widget set:" echo " - Athena headers location: $athena_h_path" echo " - Athena library to link: $athena_lib" @@ -4643,12 +4639,8 @@ test "$with_database_gdbm" = yes && echo " Compiling in support for GNU DBM." test "$with_ldap" = yes && echo " Compiling in support for LDAP." if test "$with_postgresql" = yes; then echo " Compiling in support for PostgreSQL." - if test "$with_postgresqlv7" = yes; then - echo " - Using PostgreSQL V7 bindings." - fi - if test -n "$postgres_h_path"; then - echo " - PostgreSQL headers location: $postgres_h_path" - fi + echo " - Using PostgreSQL header file: $libpq_fe_h_file" + test "$with_postgresqlv7" = yes && echo " - Using PostgreSQL V7 bindings." fi echo " @@ -4673,7 +4665,7 @@ Mail:" test "$with_pop" = yes && echo " Compiling in support for POP mail retrieval." test "$with_kerberos" = yes && echo " Compiling in support for Kerberos POP authentication." test "$with_hesiod" = yes && echo " Compiling in support for Hesiod POP server access." -echo " Compiling in support for \"$mail_locking\" mail spool file locking method." +test -n "$mail_locking" && echo " Compiling in support for \"$mail_locking\" mail spool file locking method." echo " Other Features:" diff --git a/configure.usage b/configure.usage index 89c648e..7f44263 100644 --- a/configure.usage +++ b/configure.usage @@ -9,31 +9,38 @@ The option `--without-FEATURE' is a synonym for `--with-FEATURE=no'. Options marked with a (*) are auto-detected. +Many features require external packages to be installed first. +Get them from ftp://ftp.xemacs.org/pub/xemacs/aux. + Use colons (or quoted spaces) to separate directory names in option values which are PATHs (i.e. lists of directories). +The results of configure tests are saved in config.log, which is useful +for diagnosing problems. + + General options: --help Issue this usage message. ---verbose Display the results of configure tests. ---extra-verbose Display even more information, useful for debugging. +--verbose Accepted but ignored. +--extra-verbose Display more information, useful for debugging. Compilation options: ---compiler=prog C compiler to use. +--compiler=PROG C compiler to use --with-gcc (*) Use GCC to compile XEmacs. --without-gcc Don't use GCC to compile XEmacs. --cflags=FLAGS Compiler flags (such as -O) ---cpp=prog C preprocessor to use (e.g. /usr/ccs/lib/cpp or cc -E) +--cpp=PROG C preprocessor to use (e.g. /usr/ccs/lib/cpp or cc -E) --cppflags=FLAGS C preprocessor flags (e.g. -I/foo or -Dfoo=bar) --libs=LIBS Additional libraries (e.g. -lfoo) --ldflags=FLAGS Additional linker flags (e.g. -L/foo) ---site-includes=PATH List of directories to search first for header files. ---site-libraries=PATH List of directories to search first for libraries. +--site-includes=PATH List of directories to search first for header files +--site-libraries=PATH List of directories to search first for libraries --site-prefixes=PATH List of directories to search for include/ and lib/ subdirectories, just after 'site-includes' and - 'site-libraries'. + 'site-libraries' --site-runtime-libraries=PATH List of ALL directories to search for dynamically linked libraries at run time. @@ -47,9 +54,8 @@ Compilation options: Installation options: --prefix=DIR Install files below DIR. Defaults to `/usr/local'. ---with-prefix Compile the value of --prefix into the executable. - Defaults to `yes'. ---without-prefix Don't compile the value of --prefix into the executable. +--with-prefix=no Don't compile the value of --prefix into the + executable. Window-system options: @@ -58,8 +64,10 @@ Window-system options: --without-x11 Don't support X. --x-includes=DIR Search for X header files in DIR. --x-libraries=DIR Search for X libraries in DIR. ---without-toolbars Don't compile with any toolbar support. ---without-wmcommand Compile without realized leader window which will +--with-msw (*) Support MS Windows as a window system (only under + Cygwin and MinGW). +--with-toolbars=no Don't compile with any toolbar support. +--with-wmcommand=no Compile without realized leader window which will keep the WM_COMMAND property. --with-athena=TYPE Use TYPE Athena widgets (xaw, 3d, next, 95, or xpm) @@ -74,59 +82,59 @@ Window-system options: --with-widgets=TYPE Use TYPE widgets (motif, athena, or no). Motif widgets will be used if Motif can be found. Other widget types are currently unsupported. ---with-dragndrop (*) Compile in the generic drag and drop API. This is +--with-dragndrop Compile in the generic drag and drop API. This is automatically added if one of the drag and drop protocols is found (currently CDE, OffiX, MSWindows). *WARNING* The Drag'n'drop support is under development and is considered experimental. ---with-cde (*) Compile in support for CDE drag and drop. ---with-offix (*) Compile in support for OffiX drag and drop. +--with-cde Compile in support for CDE drag and drop. +--with-offix Compile in support for OffiX drag and drop. *WARNING* If you compile in OffiX, you may not be able to use multiple X displays success- fully. If the two servers are from different vendors, the results may be unpredictable. ---without-xmu (*) For those unfortunates whose vendors don't ship Xmu. +--with-xmu=no (*) For those unfortunates whose vendors don't ship Xmu. --external-widget Compile with external widget support. -TTY options: +TTY (character terminal) options: ---without-tty Don't support TTY-s. +--with-tty=no Don't support ttys. --with-ncurses (*) Use the ncurses library for tty support. ---with-gpm (*) Compile in support for General Purpose Mouse. +--with-gpm (*) Compile in GPM mouse support for ttys. Image options: ---with-xpm (*) Compile with support for XPM files. - It is highly recommended that you obtain XPM - (version 3.4h or better) if you don't already - have it. Get it from the XEmacs FTP site. ---with-xface (*) Compile with support for X-Face mail header - conversion. Requires the compface library. - Get it from the XEmacs FTP site. ---without-gif Compile without the built-in support for GIF image - conversion. ---with-jpeg (*) Compile with support for JPEG image conversion. - Requires libjpeg from the Independent JPEG Group. - Get it from the XEmacs FTP site. ---with-png (*) Compile with support for PNG image conversion. - Requires libpng. Get it from the XEmacs FTP site. ---with-tiff (*) Compile with support for TIFF image conversion. - Requires Sam Lefflier's libtiff library. - Get if from the XEmacs FTP site. +--with-xpm (*) Compile with support for XPM images. PRACTICALLY + REQUIRED. Although this library is nonstandard and + a real hassle to build, many basic things (e.g. + toolbars) depend on it, and you will run into + many problems without it. +--with-png (*) Compile with support for PNG images. Recommended + because the images on the About page are not viewable + without it. +--with-jpeg (*) Compile with support for JPEG images. Useful if + you are using a mail, news reader, or web browser + in XEmacs, so that JPEG images can be displayed. +--with-tiff (*) Compile with support for TIFF images. Possibly + useful, for the same reason as JPEG images. +--with-xface (*) Compile with support for X-Face mail headers. + Requires the compface package. Of doubtful + usefulness. +--with-gif=no Compile without the (builtin) support for GIF images. Sound options: --with-sound=TYPE,[TYPE],... Compile with native sound support. - Valid types are `native', `nas' and `esd'. - Prefix a type with 'no' to disable. - The first option can be `none' or `all'. - `none' is a synonym for `nonative,nonas,noesd'. - `all' is a synonym for native,nas,esd or `all'. - The default is to autodetect all sound support. + Valid types are `native', `nas' and `esd'. + Prefix a type with 'no' to disable. + The first option can be `none' or `all'. + `none' is a synonym for `nonative,nonas,noesd'. + `all' is a synonym for native,nas,esd or `all'. + The default is to autodetect all sound support. --native-sound-lib=LIB Native sound support library. Needed on Suns with --with-sound=both because both sound libraries are called libaudio. @@ -137,10 +145,8 @@ Database options: --with-database=TYPE (*) Compile with database support. Valid types are `no' or a comma-separated list of one or more of `berkdb' and either `dbm' or `gnudbm'. ---with-ldap (*) Compile with support for the LDAP protocol (requires - installed LDAP libraries on the system). ---with-postgresql (*) Compile with support for the PostgreSQL RDBMS (requires - installed PostreSQL libraries on the system). +--with-ldap (*) Compile with support for the LDAP protocol. +--with-postgresql (*) Compile with support for the PostgreSQL RDBMS. Mail options: @@ -148,9 +154,9 @@ Mail options: --mail-locking=TYPE (*) Specify the locking to be used by movemail to prevent concurrent updates of mail spool files. Valid types are `lockf', `flock', and `dot'. ---with-pop support POP for mail retrieval ---with-kerberos support Kerberos-authenticated POP ---with-hesiod support Hesiod to get the POP server host +--with-pop Support POP for mail retrieval. +--with-kerberos Support Kerberos-authenticated POP. +--with-hesiod Support Hesiod to get the POP server host. Additional features: @@ -160,8 +166,8 @@ Additional features: development environment. --with-socks Compile with support for SOCKS (an Internet proxy). --with-dnet (*) Compile with support for DECnet. ---with-modules Compile in experimental support for dynamically - loaded libraries (Dynamic Shared Objects). +--with-modules Compile in experimental support for dynamically + loaded libraries (Dynamic Shared Objects). --with-site-lisp=yes Allow for a site-lisp directory in the XEmacs hierarchy searched before the installation packages. --with-site-modules=no Disable site-modules directory in the XEmacs hierarchy, @@ -183,9 +189,9 @@ Additional features: and localdir files in case run-time searching for them fails. --moduledir=DIR Directory to install dynamic modules in. ---pdump New, experimental, non-working, don't-sue-me-if- - your-house-collapses-and-your-wife-goes-away, - portable dumper. +--pdump New, experimental, non-working, don't-sue-me-if- + your-house-collapses-and-your-wife-leaves-you, + portable dumper. Internationalization options: @@ -204,8 +210,7 @@ Internationalization options: used in conjunction with Mule support). --with-wnn (*) Compile with support for WNN (a multi-language input method used in conjunction with Mule support). ---with-wnn6 (*) Compile with support for the comercial package WNN - version 6 +--with-wnn6 (*) Compile with support for the commercial package WNN6. --with-i18n3 Compile with I18N level 3 (support for message translation). This doesn't currently work. --with-xfs Compile with XFontSet support for bilingual menubar. @@ -263,17 +268,18 @@ If successful, configure leaves its status in config.status. If unsuccessful after disturbing the status quo, it removes config.status. The configure script also recognizes some environment variables, each -of which is equivalent to a corresponding configure flag. A specified -configure flag always overrides the environment variable. - -envvar configure flag ------ -------------- -CC --compiler -CPP --cpp -CFLAGS --cflags -CPPFLAGS --cppflags -LDFLAGS --ldflags -LIBS --libs -LD_RUN_PATH --site-runtime-libraries +of which is equivalent to a corresponding configure flag. Configure +flags take precedence over environment variables, if both are specified. + +environment corresponding +variable configure flag +----------- -------------- +CC --compiler +CPP --cpp +CFLAGS --cflags +CPPFLAGS --cppflags +LDFLAGS --ldflags +LIBS --libs +LD_RUN_PATH --site-runtime-libraries For more details on the install process, consult the INSTALL file. diff --git a/etc/NEWS b/etc/NEWS index 0f586dd..39d5e6d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -205,23 +205,43 @@ environment's mail spool locking conventions. When you're using a binary kit, set the `mail-lock-method' variable at startup, or the EMACSLOCKMETHOD environment variable. -** New command-line switches -user-init-file and -user-init-directory. -These can be used to specify alternate locations for what is normally -~/.emacs and ~/.xemacs. +** Init file will move to ~/.xemacs/init.el. -Moreover, -user (which used to only work in unpredictable ways) -is now equivalent to --user-init-file ~/.emacs -user-init-directory ~/.xemacs. +If `~/.xemacs/init.el' exists, XEmacs will prefer it over `~/.emacs' +as an init file. The file may be byte-compiled as +`~/.xemacs/init.elc'. + +Future versions of XEmacs will stop supporting `~/.emacs' as an init +file. XEmacs offers automatic migration upon startup. + +** Custom file will move to ~/.xemacs/custom.el. + +Whereas customize settings were formerly stored in the regular init +file, XEmacs now prefers them to be in a separate file +`~/.xemacs/custom.el', completely under automatic control. This +change goes with the migration of the init file, and XEmacs offers +automatic migration upon startup. ** Init file may be called .emacs.el. -Like in GNU Emacs 20.4 and on, you can now name the XEmacs init file -`.emacs.el'. Formerly the name had to be `.emacs'. If you use the -name `.emacs.el', you can byte-compile the file in the usual way. +For the time being, like in GNU Emacs 20.4 and on, you can now name +the XEmacs init file `.emacs.el'. Formerly the name had to be +`.emacs'. If you use the name `.emacs.el', you can byte-compile the +file in the usual way. If both `.emacs' and `.emacs.el' exist, the latter file is the one that is used. +** New command-line switches -user-init-file and -user-init-directory. +These can be used to specify alternate locations for what is normally +~/.emacs and ~/.xemacs. + +Moreover, -user (which used to only work in unpredictable ways) +is now equivalent to -user-init-file ~/.xemacs/init.el +-user-init-directory ~/.xemacs. or -user-init-file +~/.emacs -user-init-directory ~/.xemacs, whichever init +file comes first. + ** New variable `mswindows-meta-activates-menu'. If you set this variable to nil then pressing and releasing the Alt key under MS-Windows will no longer activate the menubar. The default diff --git a/info/internals.info b/info/internals.info index 32108ed..e7379aa 100644 --- a/info/internals.info +++ b/info/internals.info @@ -46,7 +46,7 @@ internals.info-4: 143504 internals.info-5: 193454 internals.info-6: 243017 internals.info-7: 286634 -internals.info-8: 335500 +internals.info-8: 335501  Tag Table: (Indirect) @@ -156,34 +156,34 @@ Node: Internal Mule Encodings309491 Node: Internal String Encoding311321 Node: Internal Character Encoding313466 Node: CCL315190 -Node: The Lisp Reader and Compiler321942 -Node: Lstreams322155 -Node: Creating an Lstream323186 -Node: Lstream Types324413 -Node: Lstream Functions324665 -Node: Lstream Methods328231 -Node: Consoles; Devices; Frames; Windows331373 -Node: Introduction to Consoles; Devices; Frames; Windows331688 -Node: Point334221 -Node: Window Hierarchy335500 -Node: The Window Object339948 -Node: The Redisplay Mechanism343385 -Node: Critical Redisplay Sections344177 -Node: Line Start Cache345164 -Node: Redisplay Piece by Piece348400 -Node: Extents350437 -Node: Introduction to Extents350971 -Node: Extent Ordering352113 -Node: Format of the Extent Info353354 -Node: Zero-Length Extents355241 -Node: Mathematics of Extent Ordering356639 -Node: Extent Fragments361396 -Node: Faces362482 -Node: Glyphs362598 -Node: Specifiers365615 -Node: Menus365744 -Node: Subprocesses368002 -Node: Interface to X Windows369978 -Node: Index370149 +Node: The Lisp Reader and Compiler321943 +Node: Lstreams322156 +Node: Creating an Lstream323187 +Node: Lstream Types324414 +Node: Lstream Functions324666 +Node: Lstream Methods328232 +Node: Consoles; Devices; Frames; Windows331374 +Node: Introduction to Consoles; Devices; Frames; Windows331689 +Node: Point334222 +Node: Window Hierarchy335501 +Node: The Window Object339949 +Node: The Redisplay Mechanism343386 +Node: Critical Redisplay Sections344178 +Node: Line Start Cache345165 +Node: Redisplay Piece by Piece348401 +Node: Extents350438 +Node: Introduction to Extents350972 +Node: Extent Ordering352114 +Node: Format of the Extent Info353355 +Node: Zero-Length Extents355242 +Node: Mathematics of Extent Ordering356640 +Node: Extent Fragments361397 +Node: Faces362483 +Node: Glyphs362599 +Node: Specifiers365616 +Node: Menus365745 +Node: Subprocesses368003 +Node: Interface to X Windows369979 +Node: Index370150  End Tag Table diff --git a/info/internals.info-7 b/info/internals.info-7 index 90d5872..8f3633d 100644 --- a/info/internals.info-7 +++ b/info/internals.info-7 @@ -242,7 +242,7 @@ elsewhere. buffer positions in them as integers, and every time text is inserted or deleted, these positions must be updated. In order to minimize the amount of shuffling that needs to be done, the positions in markers and -extents (there's one per marker, two per extent) and stored in Meminds. +extents (there's one per marker, two per extent) are stored in Meminds. This means that they only need to be moved when the text is physically moved in memory; since the gap structure tries to minimize this, it also minimizes the number of marker and extent indices that need to be @@ -733,7 +733,7 @@ CCL other encoded/decoded data has been written out. This is not used for charset CCL programs. - REGISTER: 0..7 -- refered by RRR or rrr + REGISTER: 0..7 -- referred by RRR or rrr OPERATOR BIT FIELD (27-bit): XXXXXXXXXXXXXXX RRR TTTTT TTTTT (5-bit): operator type diff --git a/info/lispref.info b/info/lispref.info index d3cf890..d679dc0 100644 --- a/info/lispref.info +++ b/info/lispref.info @@ -62,15 +62,15 @@ lispref.info-8: 340452 lispref.info-9: 388779 lispref.info-10: 438231 lispref.info-11: 486459 -lispref.info-12: 536231 -lispref.info-13: 584131 -lispref.info-14: 632354 -lispref.info-15: 680608 -lispref.info-16: 726800 -lispref.info-17: 775533 -lispref.info-18: 825531 -lispref.info-19: 875222 -lispref.info-20: 924063 +lispref.info-12: 536230 +lispref.info-13: 584130 +lispref.info-14: 632353 +lispref.info-15: 680607 +lispref.info-16: 726799 +lispref.info-17: 775532 +lispref.info-18: 825530 +lispref.info-19: 875221 +lispref.info-20: 924062 lispref.info-21: 973599 lispref.info-22: 1021180 lispref.info-23: 1067504 @@ -87,17 +87,17 @@ lispref.info-33: 1553489 lispref.info-34: 1594822 lispref.info-35: 1641127 lispref.info-36: 1690344 -lispref.info-37: 1727314 -lispref.info-38: 1776244 -lispref.info-39: 1826065 -lispref.info-40: 1872992 -lispref.info-41: 1921089 -lispref.info-42: 1969206 -lispref.info-43: 2017513 -lispref.info-44: 2066217 -lispref.info-45: 2115779 -lispref.info-46: 2158365 -lispref.info-47: 2187578 +lispref.info-37: 1727315 +lispref.info-38: 1776245 +lispref.info-39: 1826066 +lispref.info-40: 1872993 +lispref.info-41: 1921090 +lispref.info-42: 1969207 +lispref.info-43: 2017600 +lispref.info-44: 2066304 +lispref.info-45: 2115864 +lispref.info-46: 2158450 +lispref.info-47: 2187663  Tag Table: (Indirect) @@ -319,156 +319,156 @@ Node: Splicing into Lists520074 Node: Type Keywords521909 Node: Loading525429 Node: How Programs Do Loading527104 -Node: Autoload536231 -Node: Repeated Loading542310 -Node: Named Features544423 -Node: Unloading550855 -Node: Hooks for Loading553011 -Node: Byte Compilation553728 -Node: Speed of Byte-Code555645 -Node: Compilation Functions556852 -Node: Docs and Compilation563240 -Node: Dynamic Loading565893 -Node: Eval During Compile568257 -Node: Compiled-Function Objects569522 -Node: Disassembly574320 -Node: Debugging581574 -Node: Debugger582986 -Node: Error Debugging584131 -Node: Infinite Loops586884 -Node: Function Debugging588128 -Node: Explicit Debug590918 -Node: Using Debugger591689 -Node: Debugger Commands593551 -Node: Invoking the Debugger597868 -Node: Internals of Debugger601783 -Node: Syntax Errors606670 -Node: Excess Open607918 -Node: Excess Close609793 -Node: Compilation Errors611214 -Node: Edebug612502 -Node: Using Edebug614610 -Node: Instrumenting617307 -Node: Edebug Execution Modes620796 -Node: Jumping623906 -Node: Edebug Misc626249 -Node: Breakpoints627638 -Node: Global Break Condition630444 -Node: Embedded Breakpoints631399 -Node: Trapping Errors632354 -Node: Edebug Views634430 -Node: Edebug Eval636395 -Node: Eval List637572 -Node: Reading in Edebug640957 -Node: Printing in Edebug641756 -Node: Tracing643471 -Node: Coverage Testing645357 -Node: The Outside Context647398 -Node: Checking Whether to Stop648347 -Node: Edebug Display Update648994 -Node: Edebug Recursive Edit651017 -Node: Instrumenting Macro Calls652672 -Node: Specification List655154 -Node: Backtracking664565 -Node: Debugging Backquote666503 -Node: Specification Examples670209 -Node: Edebug Options672276 -Node: Read and Print677613 -Node: Streams Intro678590 -Node: Input Streams680608 -Node: Input Functions685509 -Node: Output Streams687569 -Node: Output Functions691620 -Node: Output Variables695920 -Node: Minibuffers700719 -Node: Intro to Minibuffers701871 -Node: Text from Minibuffer704059 -Node: Object from Minibuffer709145 -Node: Minibuffer History713240 -Node: Completion716219 -Node: Basic Completion718194 -Node: Minibuffer Completion723223 -Node: Completion Commands726800 -Node: High-Level Completion731457 -Node: Reading File Names736199 -Node: Programmed Completion739891 -Node: Yes-or-No Queries742273 -Node: Multiple Queries748010 -Node: Reading a Password752077 -Node: Minibuffer Misc753414 -Node: Command Loop758284 -Node: Command Overview759628 -Node: Defining Commands762906 -Node: Using Interactive763654 -Node: Interactive Codes768427 -Node: Interactive Examples774219 -Node: Interactive Call775533 -Node: Command Loop Info780934 -Node: Events785913 -Node: Event Types787373 -Node: Event Contents789296 -Node: Event Predicates793772 -Node: Accessing Mouse Event Positions795097 -Node: Frame-Level Event Position Info795796 -Node: Window-Level Event Position Info796836 -Node: Event Text Position Info798600 -Node: Event Glyph Position Info801092 -Node: Event Toolbar Position Info802415 -Node: Other Event Position Info803086 -Node: Accessing Other Event Info803495 -Node: Working With Events805115 -Node: Converting Events811103 -Node: Reading Input814055 -Node: Key Sequence Input815057 -Node: Reading One Event817011 -Node: Dispatching an Event819828 -Node: Quoted Character Input820279 -Node: Peeking and Discarding821627 -Node: Waiting825531 -Node: Quitting827839 -Node: Prefix Command Arguments832247 -Node: Recursive Editing837334 -Node: Disabling Commands842130 -Node: Command History844198 -Node: Keyboard Macros845935 -Node: Keymaps848152 -Node: Keymap Terminology849729 -Node: Format of Keymaps852658 -Node: Creating Keymaps853069 -Node: Inheritance and Keymaps855148 -Node: Key Sequences857520 -Node: Prefix Keys862316 -Node: Active Keymaps865901 -Node: Key Lookup875222 -Node: Functions for Key Lookup880385 -Node: Changing Key Bindings886082 -Node: Key Binding Commands892979 -Node: Scanning Keymaps895044 -Node: Other Keymap Functions903555 -Node: Menus904177 -Node: Menu Format904769 -Node: Menubar Format913415 -Node: Menubar914040 -Node: Modifying Menus917153 -Node: Menu Filters922167 -Node: Pop-Up Menus924063 -Node: Menu Accelerators926268 -Node: Creating Menu Accelerators927024 -Node: Keyboard Menu Traversal928384 -Node: Menu Accelerator Functions929111 -Node: Buffers Menu932188 -Node: Dialog Boxes933482 -Node: Dialog Box Format933649 -Node: Dialog Box Functions935074 -Node: Toolbar935471 -Node: Toolbar Intro935906 -Node: Creating Toolbar938306 -Node: Toolbar Descriptor Format939223 -Node: Specifying the Toolbar943720 -Node: Other Toolbar Variables947325 -Node: Gutter951751 -Node: Gutter Intro952340 -Node: Creating Gutter954343 +Node: Autoload536230 +Node: Repeated Loading542309 +Node: Named Features544422 +Node: Unloading550854 +Node: Hooks for Loading553010 +Node: Byte Compilation553727 +Node: Speed of Byte-Code555644 +Node: Compilation Functions556851 +Node: Docs and Compilation563239 +Node: Dynamic Loading565892 +Node: Eval During Compile568256 +Node: Compiled-Function Objects569521 +Node: Disassembly574319 +Node: Debugging581573 +Node: Debugger582985 +Node: Error Debugging584130 +Node: Infinite Loops586883 +Node: Function Debugging588127 +Node: Explicit Debug590917 +Node: Using Debugger591688 +Node: Debugger Commands593550 +Node: Invoking the Debugger597867 +Node: Internals of Debugger601782 +Node: Syntax Errors606669 +Node: Excess Open607917 +Node: Excess Close609792 +Node: Compilation Errors611213 +Node: Edebug612501 +Node: Using Edebug614609 +Node: Instrumenting617306 +Node: Edebug Execution Modes620795 +Node: Jumping623905 +Node: Edebug Misc626248 +Node: Breakpoints627637 +Node: Global Break Condition630443 +Node: Embedded Breakpoints631398 +Node: Trapping Errors632353 +Node: Edebug Views634429 +Node: Edebug Eval636394 +Node: Eval List637571 +Node: Reading in Edebug640956 +Node: Printing in Edebug641755 +Node: Tracing643470 +Node: Coverage Testing645356 +Node: The Outside Context647397 +Node: Checking Whether to Stop648346 +Node: Edebug Display Update648993 +Node: Edebug Recursive Edit651016 +Node: Instrumenting Macro Calls652671 +Node: Specification List655153 +Node: Backtracking664564 +Node: Debugging Backquote666502 +Node: Specification Examples670208 +Node: Edebug Options672275 +Node: Read and Print677612 +Node: Streams Intro678589 +Node: Input Streams680607 +Node: Input Functions685508 +Node: Output Streams687568 +Node: Output Functions691619 +Node: Output Variables695919 +Node: Minibuffers700718 +Node: Intro to Minibuffers701870 +Node: Text from Minibuffer704058 +Node: Object from Minibuffer709144 +Node: Minibuffer History713239 +Node: Completion716218 +Node: Basic Completion718193 +Node: Minibuffer Completion723222 +Node: Completion Commands726799 +Node: High-Level Completion731456 +Node: Reading File Names736198 +Node: Programmed Completion739890 +Node: Yes-or-No Queries742272 +Node: Multiple Queries748009 +Node: Reading a Password752076 +Node: Minibuffer Misc753413 +Node: Command Loop758283 +Node: Command Overview759627 +Node: Defining Commands762905 +Node: Using Interactive763653 +Node: Interactive Codes768426 +Node: Interactive Examples774218 +Node: Interactive Call775532 +Node: Command Loop Info780933 +Node: Events785912 +Node: Event Types787372 +Node: Event Contents789295 +Node: Event Predicates793771 +Node: Accessing Mouse Event Positions795096 +Node: Frame-Level Event Position Info795795 +Node: Window-Level Event Position Info796835 +Node: Event Text Position Info798599 +Node: Event Glyph Position Info801091 +Node: Event Toolbar Position Info802414 +Node: Other Event Position Info803085 +Node: Accessing Other Event Info803494 +Node: Working With Events805114 +Node: Converting Events811102 +Node: Reading Input814054 +Node: Key Sequence Input815056 +Node: Reading One Event817010 +Node: Dispatching an Event819827 +Node: Quoted Character Input820278 +Node: Peeking and Discarding821626 +Node: Waiting825530 +Node: Quitting827838 +Node: Prefix Command Arguments832246 +Node: Recursive Editing837333 +Node: Disabling Commands842129 +Node: Command History844197 +Node: Keyboard Macros845934 +Node: Keymaps848151 +Node: Keymap Terminology849728 +Node: Format of Keymaps852657 +Node: Creating Keymaps853068 +Node: Inheritance and Keymaps855147 +Node: Key Sequences857519 +Node: Prefix Keys862315 +Node: Active Keymaps865900 +Node: Key Lookup875221 +Node: Functions for Key Lookup880384 +Node: Changing Key Bindings886081 +Node: Key Binding Commands892978 +Node: Scanning Keymaps895043 +Node: Other Keymap Functions903554 +Node: Menus904176 +Node: Menu Format904768 +Node: Menubar Format913414 +Node: Menubar914039 +Node: Modifying Menus917152 +Node: Menu Filters922166 +Node: Pop-Up Menus924062 +Node: Menu Accelerators926267 +Node: Creating Menu Accelerators927023 +Node: Keyboard Menu Traversal928383 +Node: Menu Accelerator Functions929110 +Node: Buffers Menu932187 +Node: Dialog Boxes933481 +Node: Dialog Box Format933648 +Node: Dialog Box Functions935073 +Node: Toolbar935470 +Node: Toolbar Intro935905 +Node: Creating Toolbar938305 +Node: Toolbar Descriptor Format939222 +Node: Specifying the Toolbar943719 +Node: Other Toolbar Variables947324 +Node: Gutter951750 +Node: Gutter Intro952339 +Node: Creating Gutter954342 Node: Gutter Descriptor Format957225 Node: Specifying a Gutter961682 Node: Other Gutter Variables965215 @@ -738,180 +738,180 @@ Node: Color Convenience Functions1696971 Node: Glyphs1698024 Node: Glyph Functions1699625 Node: Creating Glyphs1700032 -Node: Glyph Properties1712671 -Node: Glyph Convenience Functions1721838 -Node: Glyph Dimensions1725785 -Node: Images1726865 -Node: Image Specifiers1727314 -Node: Image Instantiator Conversion1742660 -Node: Image Instances1744025 -Node: Image Instance Types1744776 -Node: Image Instance Functions1747539 -Node: Glyph Types1754590 -Node: Mouse Pointer1756362 -Node: Redisplay Glyphs1759365 -Node: Subwindows1760398 -Node: Annotations1760641 -Node: Annotation Basics1761657 -Node: Annotation Primitives1765595 -Node: Annotation Properties1766924 -Node: Locating Annotations1769964 -Node: Margin Primitives1770801 -Node: Annotation Hooks1772695 -Node: Display1773355 -Node: Refresh Screen1774333 -Node: Truncation1776244 -Node: The Echo Area1778769 -Node: Warnings1785204 -Node: Invisible Text1789640 -Node: Selective Display1792219 -Node: Overlay Arrow1796345 -Node: Temporary Displays1797698 -Node: Blinking1801819 -Node: Usual Display1804004 -Node: Display Tables1806553 -Node: Display Table Format1807357 -Node: Active Display Table1808799 -Node: Character Descriptors1812794 -Node: Beeping1813551 -Node: Hash Tables1818317 -Node: Introduction to Hash Tables1818925 -Node: Working With Hash Tables1824948 -Node: Weak Hash Tables1826065 -Node: Range Tables1827864 -Node: Introduction to Range Tables1828553 -Node: Working With Range Tables1828984 -Node: Databases1829869 -Node: Connecting to a Database1830168 -Node: Working With a Database1831259 -Node: Other Database Functions1832117 -Node: Processes1832691 -Node: Subprocess Creation1834915 -Node: Synchronous Processes1838204 -Node: MS-DOS Subprocesses1844922 -Node: Asynchronous Processes1845996 -Node: Deleting Processes1849709 -Node: Process Information1851580 -Node: Input to Processes1855506 -Node: Signals to Processes1857796 -Node: Output from Processes1862216 -Node: Process Buffers1863028 -Node: Filter Functions1865895 -Node: Accepting Output1871465 -Node: Sentinels1872992 -Node: Process Window Size1876482 -Node: Transaction Queues1876831 -Node: Network1878529 -Node: System Interface1880363 -Node: Starting Up1881633 -Node: Start-up Summary1882227 -Node: Init File1885781 -Node: Terminal-Specific1888162 -Node: Command Line Arguments1891321 -Node: Getting Out1894810 -Node: Killing XEmacs1895379 -Node: Suspending XEmacs1897048 -Node: System Environment1900390 -Node: User Identification1907057 -Node: Time of Day1910586 -Node: Time Conversion1913373 -Node: Timers1918413 -Node: Terminal Input1920586 -Node: Input Modes1921089 -Node: Translating Input1923502 -Node: Recording Input1927667 -Node: Terminal Output1929767 -Node: Flow Control1933390 -Node: Batch Mode1937182 -Node: X-Windows1938564 -Node: X Selections1939435 -Node: X Server1941645 -Node: Resources1942096 -Node: Server Data1947405 -Node: Grabs1948612 -Node: X Miscellaneous1950192 -Node: ToolTalk Support1952577 -Node: XEmacs ToolTalk API Summary1952794 -Node: Sending Messages1954094 -Node: Example of Sending Messages1954345 -Node: Elisp Interface for Sending Messages1955407 -Node: Receiving Messages1961799 -Node: Example of Receiving Messages1962022 -Node: Elisp Interface for Receiving Messages1962858 -Node: LDAP Support1966683 -Node: Building XEmacs with LDAP support1967177 -Node: XEmacs LDAP API1968154 -Node: LDAP Variables1969206 -Node: The High-Level LDAP API1971806 -Node: The Low-Level LDAP API1975269 -Node: The LDAP Lisp Object1976100 -Node: Opening and Closing a LDAP Connection1976653 -Node: Low-level Operations on a LDAP Server1978453 -Node: LDAP Internationalization1981147 -Node: LDAP Internationalization Variables1982052 -Node: Encoder/Decoder Functions1983781 -Node: Syntax of Search Filters1984820 -Node: PostgreSQL Support1986118 -Node: Building XEmacs with PostgreSQL support1986513 -Node: XEmacs PostgreSQL libpq API1987780 -Node: libpq Lisp Variables1989655 -Node: libpq Lisp Symbols and DataTypes1992619 -Node: Synchronous Interface Functions2005859 -Node: Asynchronous Interface Functions2010350 -Node: Large Object Support2013851 -Node: Other libpq Functions2014478 -Node: Unimplemented libpq Functions2017513 -Node: XEmacs PostgreSQL libpq Examples2022832 -Node: Internationalization2028923 -Node: I18N Levels 1 and 22029266 -Node: I18N Level 32029972 -Node: Level 3 Basics2030253 -Node: Level 3 Primitives2031086 -Node: Dynamic Messaging2032692 -Node: Domain Specification2033155 -Node: Documentation String Extraction2035058 -Node: I18N Level 42035976 -Node: MULE2036168 -Node: Internationalization Terminology2037217 -Node: Charsets2049416 -Node: Charset Properties2050112 -Node: Basic Charset Functions2054827 -Node: Charset Property Functions2057008 -Node: Predefined Charsets2059050 -Node: MULE Characters2061970 -Node: Composite Characters2062817 -Node: Coding Systems2064077 -Node: Coding System Types2066217 -Node: ISO 20222070201 -Node: EOL Conversion2082478 -Node: Coding System Properties2083650 -Node: Basic Coding System Functions2087967 -Node: Coding System Property Functions2090001 -Node: Encoding and Decoding Text2090559 -Node: Detection of Textual Encoding2091695 -Node: Big5 and Shift-JIS Functions2093231 -Node: Predefined Coding Systems2094357 -Node: CCL2106451 -Node: CCL Syntax2109555 -Node: CCL Statements2111131 -Node: CCL Expressions2115779 -Node: Calling CCL2118318 -Node: CCL Examples2121307 -Node: Category Tables2121444 -Node: Tips2123802 -Node: Style Tips2124443 -Node: Compilation Tips2133962 -Node: Documentation Tips2135876 -Node: Comment Tips2141385 -Node: Library Headers2144387 -Node: Building XEmacs and Object Allocation2148359 -Node: Building XEmacs2149242 -Node: Pure Storage2155577 -Node: Garbage Collection2158365 -Node: Standard Errors2169504 -Node: Standard Buffer-Local Variables2173713 -Node: Standard Keymaps2176346 -Node: Standard Hooks2180078 -Node: Index2187578 +Node: Glyph Properties1712672 +Node: Glyph Convenience Functions1721839 +Node: Glyph Dimensions1725786 +Node: Images1726866 +Node: Image Specifiers1727315 +Node: Image Instantiator Conversion1742661 +Node: Image Instances1744026 +Node: Image Instance Types1744777 +Node: Image Instance Functions1747540 +Node: Glyph Types1754591 +Node: Mouse Pointer1756363 +Node: Redisplay Glyphs1759366 +Node: Subwindows1760399 +Node: Annotations1760642 +Node: Annotation Basics1761658 +Node: Annotation Primitives1765596 +Node: Annotation Properties1766925 +Node: Locating Annotations1769965 +Node: Margin Primitives1770802 +Node: Annotation Hooks1772696 +Node: Display1773356 +Node: Refresh Screen1774334 +Node: Truncation1776245 +Node: The Echo Area1778770 +Node: Warnings1785205 +Node: Invisible Text1789641 +Node: Selective Display1792220 +Node: Overlay Arrow1796346 +Node: Temporary Displays1797699 +Node: Blinking1801820 +Node: Usual Display1804005 +Node: Display Tables1806554 +Node: Display Table Format1807358 +Node: Active Display Table1808800 +Node: Character Descriptors1812795 +Node: Beeping1813552 +Node: Hash Tables1818318 +Node: Introduction to Hash Tables1818926 +Node: Working With Hash Tables1824949 +Node: Weak Hash Tables1826066 +Node: Range Tables1827865 +Node: Introduction to Range Tables1828554 +Node: Working With Range Tables1828985 +Node: Databases1829870 +Node: Connecting to a Database1830169 +Node: Working With a Database1831260 +Node: Other Database Functions1832118 +Node: Processes1832692 +Node: Subprocess Creation1834916 +Node: Synchronous Processes1838205 +Node: MS-DOS Subprocesses1844923 +Node: Asynchronous Processes1845997 +Node: Deleting Processes1849710 +Node: Process Information1851581 +Node: Input to Processes1855507 +Node: Signals to Processes1857797 +Node: Output from Processes1862217 +Node: Process Buffers1863029 +Node: Filter Functions1865896 +Node: Accepting Output1871466 +Node: Sentinels1872993 +Node: Process Window Size1876483 +Node: Transaction Queues1876832 +Node: Network1878530 +Node: System Interface1880364 +Node: Starting Up1881634 +Node: Start-up Summary1882228 +Node: Init File1885782 +Node: Terminal-Specific1888163 +Node: Command Line Arguments1891322 +Node: Getting Out1894811 +Node: Killing XEmacs1895380 +Node: Suspending XEmacs1897049 +Node: System Environment1900391 +Node: User Identification1907058 +Node: Time of Day1910587 +Node: Time Conversion1913374 +Node: Timers1918414 +Node: Terminal Input1920587 +Node: Input Modes1921090 +Node: Translating Input1923503 +Node: Recording Input1927668 +Node: Terminal Output1929768 +Node: Flow Control1933391 +Node: Batch Mode1937183 +Node: X-Windows1938565 +Node: X Selections1939436 +Node: X Server1941646 +Node: Resources1942097 +Node: Server Data1947406 +Node: Grabs1948613 +Node: X Miscellaneous1950193 +Node: ToolTalk Support1952578 +Node: XEmacs ToolTalk API Summary1952795 +Node: Sending Messages1954095 +Node: Example of Sending Messages1954346 +Node: Elisp Interface for Sending Messages1955408 +Node: Receiving Messages1961800 +Node: Example of Receiving Messages1962023 +Node: Elisp Interface for Receiving Messages1962859 +Node: LDAP Support1966684 +Node: Building XEmacs with LDAP support1967178 +Node: XEmacs LDAP API1968155 +Node: LDAP Variables1969207 +Node: The High-Level LDAP API1971807 +Node: The Low-Level LDAP API1975270 +Node: The LDAP Lisp Object1976101 +Node: Opening and Closing a LDAP Connection1976654 +Node: Low-level Operations on a LDAP Server1978454 +Node: LDAP Internationalization1981148 +Node: LDAP Internationalization Variables1982053 +Node: Encoder/Decoder Functions1983782 +Node: Syntax of Search Filters1984821 +Node: PostgreSQL Support1986119 +Node: Building XEmacs with PostgreSQL support1986514 +Node: XEmacs PostgreSQL libpq API1987861 +Node: libpq Lisp Variables1989740 +Node: libpq Lisp Symbols and DataTypes1992704 +Node: Synchronous Interface Functions2005944 +Node: Asynchronous Interface Functions2010435 +Node: Large Object Support2013938 +Node: Other libpq Functions2014565 +Node: Unimplemented libpq Functions2017600 +Node: XEmacs PostgreSQL libpq Examples2022919 +Node: Internationalization2029010 +Node: I18N Levels 1 and 22029353 +Node: I18N Level 32030059 +Node: Level 3 Basics2030340 +Node: Level 3 Primitives2031173 +Node: Dynamic Messaging2032779 +Node: Domain Specification2033242 +Node: Documentation String Extraction2035145 +Node: I18N Level 42036063 +Node: MULE2036255 +Node: Internationalization Terminology2037304 +Node: Charsets2049503 +Node: Charset Properties2050199 +Node: Basic Charset Functions2054914 +Node: Charset Property Functions2057095 +Node: Predefined Charsets2059137 +Node: MULE Characters2062057 +Node: Composite Characters2062904 +Node: Coding Systems2064164 +Node: Coding System Types2066304 +Node: ISO 20222070288 +Node: EOL Conversion2082563 +Node: Coding System Properties2083735 +Node: Basic Coding System Functions2088052 +Node: Coding System Property Functions2090086 +Node: Encoding and Decoding Text2090644 +Node: Detection of Textual Encoding2091780 +Node: Big5 and Shift-JIS Functions2093316 +Node: Predefined Coding Systems2094442 +Node: CCL2106536 +Node: CCL Syntax2109640 +Node: CCL Statements2111216 +Node: CCL Expressions2115864 +Node: Calling CCL2118403 +Node: CCL Examples2121392 +Node: Category Tables2121529 +Node: Tips2123887 +Node: Style Tips2124528 +Node: Compilation Tips2134047 +Node: Documentation Tips2135961 +Node: Comment Tips2141470 +Node: Library Headers2144472 +Node: Building XEmacs and Object Allocation2148444 +Node: Building XEmacs2149327 +Node: Pure Storage2155662 +Node: Garbage Collection2158450 +Node: Standard Errors2169589 +Node: Standard Buffer-Local Variables2173798 +Node: Standard Keymaps2176431 +Node: Standard Hooks2180163 +Node: Index2187663  End Tag Table diff --git a/info/lispref.info-11 b/info/lispref.info-11 index 318c530..1780b0a 100644 --- a/info/lispref.info-11 +++ b/info/lispref.info-11 @@ -1201,7 +1201,7 @@ these facilities call the `load' function to do the work. function to search through `load-path'.) It searches for FILENAME through PATH-LIST, expanded by one of the optional SUFFIXES (string of suffixes separated by `:'s), checking for access MODE - (0|1|2|4 = exists|executable|writeable|readable), default readable. + (0|1|2|4 = exists|executable|writable|readable), default readable. `locate-file' keeps hash tables of the directories it searches through, in order to speed things up. It tries valiantly to not diff --git a/info/lispref.info-20 b/info/lispref.info-20 index 240c4a3..4f618d5 100644 --- a/info/lispref.info-20 +++ b/info/lispref.info-20 @@ -792,7 +792,7 @@ Creating Gutter Valid gutter-size instantiators are either integers or the special symbol `autodetect'. If a gutter-size is set to `autodetect' them - the size of the gutter will be adjusted to just accomodate the + the size of the gutter will be adjusted to just accommodate the gutters contents. `autodetect' only works for top and bottom gutters. @@ -811,7 +811,7 @@ Creating Gutter Valid gutter-visible instantiators are t, nil or a list of symbols. If a gutter-visible instantiator is set to a list of - symbols, and the correspondong gutter specification is a + symbols, and the corresponding gutter specification is a property-list strings, then elements of the gutter specification will only be visible if the corresponding symbol occurs in the gutter-visible instantiator. diff --git a/info/lispref.info-36 b/info/lispref.info-36 index c9d855f..e7c1c13 100644 --- a/info/lispref.info-36 +++ b/info/lispref.info-36 @@ -429,7 +429,7 @@ Creating Glyphs pointer used over the modeline, etc. Do an apropos over `*-pointer-glyph' to find all of them. (Note also that you can temporarily set the mouse pointer to some specific shape - by using `set-frame-pointer', which takes an image instace, + by using `set-frame-pointer', which takes an image instance, as obtained from calling `glyph-image-instance' on a glyph of type `pointer' - either one of the above-mentioned variables or one you created yourself. (See below for what it means to diff --git a/info/lispref.info-42 b/info/lispref.info-42 index d2188b4..8185761 100644 --- a/info/lispref.info-42 +++ b/info/lispref.info-42 @@ -478,20 +478,23 @@ File: lispref.info, Node: Building XEmacs with PostgreSQL support, Next: XEmac Building XEmacs with PostgreSQL support ======================================= - XEmacs PostgreSQL support requires linking to the PostgreSQL libpq.so + XEmacs PostgreSQL support requires linking to the PostgreSQL libpq library. Describing how to build and install PostgreSQL is beyond the -scope of this document, see the PostgreSQL manual for details. +scope of this document. See the PostgreSQL manual for details. If you have installed XEmacs from one of the binary kits on (), or are using an XEmacs binary from a CD ROM, -you should have XEmacs PostgreSQL support by default. If you are -building XEmacs from source on a Linux system with PostgreSQL installed -into the default location, it should be autodetected when you run -configure. If you have installed PostgreSQL into its non-Linux default -location, `/usr/local/pgsql', you must specify -`--site-prefixes=/usr/local/pgsql' when you run configure. If you -installed PostgreSQL into another location, use that instead of -`/usr/local/pgsql' when specifying `--site-prefixes'. +you may have XEmacs PostgreSQL support by default. `M-x +describe-installation' will tell you if you do. + + If you are building XEmacs from source, you need to install +PostgreSQL first. On some systems, PostgreSQL will come pre-installed +in /usr. In this case, it should be autodetected when you run +configure. If PostgreSQL is installed into its default location, +`/usr/local/pgsql', you must specify `--site-prefixes=/usr/local/pgsql' +when you run configure. If PostgreSQL is installed into another +location, use that instead of `/usr/local/pgsql' when specifying +`--site-prefixes'. As of XEmacs 21.2, PostgreSQL versions 6.5.3 and 7.0 are supported. XEmacs Lisp support for V7.0 is somewhat more extensive than support for @@ -503,7 +506,7 @@ File: lispref.info, Node: XEmacs PostgreSQL libpq API, Next: XEmacs PostgreSQL XEmacs PostgreSQL libpq API =========================== - XEmacs PostgreSQL API is intended to be a policy-free, low-level + The XEmacs PostgreSQL API is intended to be a policy-free, low-level binding to libpq. The intent is to provide all the basic functionality and then let high level Lisp code decide its own policies. @@ -1184,8 +1187,8 @@ complete calling sequences. Compatibility note: this function is only available with libpq-7.0. - Function: PQsetenvPoll conn - Check an asynchronous enviroment variables transfer for completion. - CONN A database connection object. + Check an asynchronous environment variables transfer for + completion. CONN A database connection object. Compatibility note: this function is only available with libpq-7.0. diff --git a/info/lispref.info-44 b/info/lispref.info-44 index d539962..b3a5f6a 100644 --- a/info/lispref.info-44 +++ b/info/lispref.info-44 @@ -246,7 +246,7 @@ the registers G0-G3 by use of an "escape sequence" of the form: where I is an intermediate character or characters in the range 0x20 - 0x3F, and F, from the range 0x30-0x7Fm is the final character identifying this charset. (Final characters in the range 0x30-0x3F are -reserved for private use and will never have a publically registered +reserved for private use and will never have a publicly registered meaning.) Then that register is "invoked" to either GL or GR, either diff --git a/info/new-users-guide.info b/info/new-users-guide.info index d488dc7..1f01bd3 100644 --- a/info/new-users-guide.info +++ b/info/new-users-guide.info @@ -20,7 +20,7 @@ preserved on all copies. Indirect: new-users-guide.info-1: 635 new-users-guide.info-2: 50468 -new-users-guide.info-3: 100027 +new-users-guide.info-3: 100029  Tag Table: (Indirect) @@ -54,23 +54,23 @@ Node: The Help Menu51156 Node: Modes56122 Node: Major Modes57038 Node: Minor Modes60987 -Node: Files65081 -Node: File Names65803 -Node: Visiting67606 -Node: Saving Files69730 -Node: Other Customizations73107 -Node: Setting Variables75583 -Node: Init File78792 -Node: Select and Move84262 -Node: Selecting Text85216 -Node: Mouse86729 -Node: Region Operation88054 -Node: Moving Text89314 -Node: Accumulating text90554 -Node: Search and Replace92874 -Node: Key Index96738 -Node: Command Index100027 -Node: Variable Index104129 -Node: Concept Index104706 +Node: Files65082 +Node: File Names65804 +Node: Visiting67607 +Node: Saving Files69731 +Node: Other Customizations73108 +Node: Setting Variables75584 +Node: Init File78793 +Node: Select and Move84263 +Node: Selecting Text85217 +Node: Mouse86730 +Node: Region Operation88055 +Node: Moving Text89315 +Node: Accumulating text90555 +Node: Search and Replace92876 +Node: Key Index96740 +Node: Command Index100029 +Node: Variable Index104131 +Node: Concept Index104708  End Tag Table diff --git a/info/new-users-guide.info-1 b/info/new-users-guide.info-1 index 399b63e..a3e72a5 100644 --- a/info/new-users-guide.info-1 +++ b/info/new-users-guide.info-1 @@ -900,7 +900,7 @@ given in parenthesis. You can also invoke these commands by typing `M-x Move the cursor forward one word (`forward-word'). `M-b' - Move the cursor backword one word (`backward-word'). + Move the cursor backward one word (`backward-word'). `M-<' Move the cursor to the top of the buffer (`beginning-of-buffer'). diff --git a/info/new-users-guide.info-2 b/info/new-users-guide.info-2 index b3f386b..858df8e 100644 --- a/info/new-users-guide.info-2 +++ b/info/new-users-guide.info-2 @@ -368,7 +368,7 @@ auto-save-mode line-number-mode After you enable this mode, the line number at which your cursor is - present will be displayed continously in the mode line. + present will be displayed continuously in the mode line. blink-paren To enable this command, just type @@ -1063,8 +1063,8 @@ many buffers: `M-x insert-buffer' Insert contents of specified buffer into current buffer at point. - This command will prompt you for a buffername which you want to be - copied into the current buffer at the location of the cursor. + This command will prompt you for a buffer name which you want to + be copied into the current buffer at the location of the cursor. `M-x append-to-file' This command will prompt you for a filename and append the region diff --git a/info/xemacs-faq.info b/info/xemacs-faq.info index 3b7ffdf..38b167d 100644 --- a/info/xemacs-faq.info +++ b/info/xemacs-faq.info @@ -9,10 +9,10 @@ END-INFO-DIR-ENTRY  Indirect: xemacs-faq.info-1: 205 -xemacs-faq.info-2: 50086 -xemacs-faq.info-3: 99259 -xemacs-faq.info-4: 149253 -xemacs-faq.info-5: 196332 +xemacs-faq.info-2: 50085 +xemacs-faq.info-3: 99258 +xemacs-faq.info-4: 149252 +xemacs-faq.info-5: 196331  Tag Table: (Indirect) @@ -42,224 +42,224 @@ Node: Q1.3.132003 Node: Q1.3.235919 Node: Q1.3.336474 Node: Q1.3.436715 -Node: Q1.3.537504 -Node: Q1.3.639919 -Node: Q1.3.741456 -Node: Q1.4.142391 -Node: Q1.4.243253 -Node: Q1.4.343594 -Node: Q1.4.444013 -Node: Q1.4.545553 -Node: Q1.4.645857 -Node: Installation46850 -Node: Q2.0.149213 -Node: Q2.0.250086 -Node: Q2.0.357538 -Node: Q2.0.458836 -Node: Q2.0.559428 -Node: Q2.0.659796 -Node: Q2.0.760177 -Node: Q2.0.860558 -Node: Q2.0.962135 -Node: Q2.0.1063573 -Node: Q2.0.1164417 -Node: Q2.0.1265358 -Node: Q2.1.166880 -Node: Q2.1.269622 -Node: Q2.1.370799 -Node: Q2.1.472092 -Node: Q2.1.572891 -Node: Q2.1.673253 -Node: Q2.1.773730 -Node: Q2.1.874083 -Node: Q2.1.975617 -Node: Q2.1.1076039 -Node: Q2.1.1176796 -Node: Q2.1.1277661 -Node: Q2.1.1378616 -Node: Q2.1.1479647 -Node: Q2.1.1580758 -Node: Q2.1.1687790 -Node: Q2.1.1788484 -Node: Q2.1.1889081 -Node: Q2.1.1989208 -Node: Q2.1.2089738 -Node: Q2.1.2190120 -Node: Q2.1.2290313 -Node: Q2.1.2391610 -Node: Q2.1.2492278 -Node: Customization92734 -Node: Q3.0.197572 -Node: Q3.0.298278 -Node: Q3.0.398842 -Node: Q3.0.499259 -Node: Q3.0.5100092 -Node: Q3.0.6100873 -Node: Q3.0.7101453 -Node: Q3.0.8102117 -Node: Q3.0.9103075 -Node: Q3.1.1103636 -Node: Q3.1.2104373 -Node: Q3.1.3104804 -Node: Q3.1.4104993 -Node: Q3.1.5105182 -Node: Q3.1.6105566 -Node: Q3.1.7106275 -Node: Q3.1.8108499 -Node: Q3.2.1109041 -Node: Q3.2.2110694 -Node: Q3.2.3111493 -Node: Q3.2.4112095 -Node: Q3.2.5113129 -Node: Q3.2.6113596 -Node: Q3.3.1114521 -Node: Q3.3.2114951 -Node: Q3.3.3115582 -Node: Q3.3.4115963 -Node: Q3.3.5117064 -Node: Q3.4.1118558 -Node: Q3.4.2119201 -Node: Q3.5.1119713 -Node: Q3.5.2121162 -Node: Q3.5.3121580 -Node: Q3.5.4122418 -Node: Q3.5.5123250 -Node: Q3.5.6124390 -Node: Q3.5.7125380 -Node: Q3.5.8126820 -Node: Q3.5.9127567 -Node: Q3.5.10128347 -Node: Q3.5.11128983 -Node: Q3.6.1129536 -Node: Q3.6.2130281 -Node: Q3.6.3130709 -Node: Q3.7.1131209 -Node: Q3.7.2132097 -Node: Q3.7.3132756 -Node: Q3.7.4133178 -Node: Q3.7.5133521 -Node: Q3.7.6133989 -Node: Q3.7.7134704 -Node: Q3.7.8135724 -Node: Q3.8.1136143 -Node: Q3.8.2136603 -Node: Q3.8.3137066 -Node: Q3.8.4137672 -Node: Q3.8.5138391 -Node: Q3.9.1139176 -Node: Q3.9.2140116 -Node: Q3.9.3140714 -Node: Q3.9.4141376 -Node: Q3.10.1142255 -Node: Q3.10.2143073 -Node: Q3.10.3144078 -Node: Q3.10.4144806 -Node: Q3.10.5145189 -Node: Subsystems146241 -Node: Q4.0.1148728 -Node: Q4.0.2149253 -Node: Q4.0.3149811 -Node: Q4.0.4150132 -Node: Q4.0.5150374 -Node: Q4.0.6150605 -Node: Q4.0.7151193 -Node: Q4.0.8151518 -Node: Q4.0.9152745 -Node: Q4.0.10154783 -Node: Q4.0.11155272 -Node: Q4.0.12156150 -Node: Q4.1.1157123 -Node: Q4.1.2157526 -Node: Q4.1.3157853 -Node: Q4.2.1158162 -Node: Q4.2.2158792 -Node: Q4.2.3159032 -Node: Q4.2.4159576 -Node: Q4.3.1160229 -Node: Q4.3.2160813 -Node: Q4.3.3162294 -Node: Q4.3.4162566 -Node: Q4.3.5163243 -Node: Q4.4.1163871 -Node: Q4.4.2165357 -Node: Q4.5.1166561 -Node: Q4.6.1167330 -Node: Q4.7.1172590 -Node: Q4.7.2173545 -Node: Q4.7.3173842 -Node: Q4.7.4174028 -Node: Q4.7.5174912 -Node: Q4.7.6176553 -Node: Miscellaneous176842 -Node: Q5.0.1180259 -Node: Q5.0.2180998 -Node: Q5.0.3181852 -Node: Q5.0.4182554 -Node: Q5.0.5183493 -Node: Q5.0.6185473 -Node: Q5.0.7186130 -Node: Q5.0.8186735 -Node: Q5.0.9187254 -Node: Q5.0.10187768 -Node: Q5.0.11188016 -Node: Q5.0.12188554 -Node: Q5.0.13189471 -Node: Q5.0.14190155 -Node: Q5.0.15190920 -Node: Q5.0.16191217 -Node: Q5.0.17191729 -Node: Q5.0.18191994 -Node: Q5.0.19192188 -Node: Q5.0.20192612 -Node: Q5.1.1193527 -Node: Q5.1.2195596 -Node: Q5.1.3196332 -Node: Q5.1.4199726 -Node: Q5.1.5200261 -Node: Q5.1.6202385 -Node: Q5.1.7203871 -Node: Q5.1.8205472 -Node: Q5.1.9206024 -Node: Q5.1.10206909 -Node: Q5.1.11208040 -Node: Q5.2.1208589 -Node: Q5.2.2209159 -Node: Q5.2.3209576 -Node: Q5.2.4209811 -Node: Q5.3.1210721 -Node: Q5.3.2211942 -Node: Q5.3.3212718 -Node: Q5.3.4213202 -Node: Q5.3.5213869 -Node: Q5.3.6214738 -Node: Q5.3.7214983 -Node: Q5.3.8217173 -Node: Q5.3.9217420 -Node: Q5.3.10218373 -Node: Q5.3.11220457 -Node: Q5.3.12222048 -Node: MS Windows223322 -Node: Q6.0.1224799 -Node: Q6.0.2225546 -Node: Q6.0.3226011 -Node: Q6.0.4226291 -Node: Q6.1.1228570 -Node: Q6.1.2229441 -Node: Q6.1.3229722 -Node: Q6.1.4230004 -Node: Q6.1.5230382 -Node: Q6.1.6231214 -Node: Q6.2.1231798 -Node: Q6.2.2232699 -Node: Q6.2.3233111 -Node: Q6.3.1233400 -Node: Q6.3.2234494 -Node: Q6.3.3237675 -Node: Q6.4.1237944 -Node: Current Events239032 -Node: Q7.0.1239686 -Node: Q7.0.2240325 -Node: Q7.0.3241398 -Node: Q7.0.4241626 +Node: Q1.3.537503 +Node: Q1.3.639918 +Node: Q1.3.741455 +Node: Q1.4.142390 +Node: Q1.4.243252 +Node: Q1.4.343593 +Node: Q1.4.444012 +Node: Q1.4.545552 +Node: Q1.4.645856 +Node: Installation46849 +Node: Q2.0.149212 +Node: Q2.0.250085 +Node: Q2.0.357537 +Node: Q2.0.458835 +Node: Q2.0.559427 +Node: Q2.0.659795 +Node: Q2.0.760176 +Node: Q2.0.860557 +Node: Q2.0.962134 +Node: Q2.0.1063572 +Node: Q2.0.1164416 +Node: Q2.0.1265357 +Node: Q2.1.166879 +Node: Q2.1.269621 +Node: Q2.1.370798 +Node: Q2.1.472091 +Node: Q2.1.572890 +Node: Q2.1.673252 +Node: Q2.1.773729 +Node: Q2.1.874082 +Node: Q2.1.975616 +Node: Q2.1.1076038 +Node: Q2.1.1176795 +Node: Q2.1.1277660 +Node: Q2.1.1378615 +Node: Q2.1.1479646 +Node: Q2.1.1580757 +Node: Q2.1.1687789 +Node: Q2.1.1788483 +Node: Q2.1.1889080 +Node: Q2.1.1989207 +Node: Q2.1.2089737 +Node: Q2.1.2190119 +Node: Q2.1.2290312 +Node: Q2.1.2391609 +Node: Q2.1.2492277 +Node: Customization92733 +Node: Q3.0.197571 +Node: Q3.0.298277 +Node: Q3.0.398841 +Node: Q3.0.499258 +Node: Q3.0.5100091 +Node: Q3.0.6100872 +Node: Q3.0.7101452 +Node: Q3.0.8102116 +Node: Q3.0.9103074 +Node: Q3.1.1103635 +Node: Q3.1.2104372 +Node: Q3.1.3104803 +Node: Q3.1.4104992 +Node: Q3.1.5105181 +Node: Q3.1.6105565 +Node: Q3.1.7106274 +Node: Q3.1.8108498 +Node: Q3.2.1109040 +Node: Q3.2.2110693 +Node: Q3.2.3111492 +Node: Q3.2.4112094 +Node: Q3.2.5113128 +Node: Q3.2.6113595 +Node: Q3.3.1114520 +Node: Q3.3.2114950 +Node: Q3.3.3115581 +Node: Q3.3.4115962 +Node: Q3.3.5117063 +Node: Q3.4.1118557 +Node: Q3.4.2119200 +Node: Q3.5.1119712 +Node: Q3.5.2121161 +Node: Q3.5.3121579 +Node: Q3.5.4122417 +Node: Q3.5.5123249 +Node: Q3.5.6124389 +Node: Q3.5.7125379 +Node: Q3.5.8126819 +Node: Q3.5.9127566 +Node: Q3.5.10128346 +Node: Q3.5.11128982 +Node: Q3.6.1129535 +Node: Q3.6.2130280 +Node: Q3.6.3130708 +Node: Q3.7.1131208 +Node: Q3.7.2132096 +Node: Q3.7.3132755 +Node: Q3.7.4133177 +Node: Q3.7.5133520 +Node: Q3.7.6133988 +Node: Q3.7.7134703 +Node: Q3.7.8135723 +Node: Q3.8.1136142 +Node: Q3.8.2136602 +Node: Q3.8.3137065 +Node: Q3.8.4137671 +Node: Q3.8.5138390 +Node: Q3.9.1139175 +Node: Q3.9.2140115 +Node: Q3.9.3140713 +Node: Q3.9.4141375 +Node: Q3.10.1142254 +Node: Q3.10.2143072 +Node: Q3.10.3144077 +Node: Q3.10.4144805 +Node: Q3.10.5145188 +Node: Subsystems146240 +Node: Q4.0.1148727 +Node: Q4.0.2149252 +Node: Q4.0.3149810 +Node: Q4.0.4150131 +Node: Q4.0.5150373 +Node: Q4.0.6150604 +Node: Q4.0.7151192 +Node: Q4.0.8151517 +Node: Q4.0.9152744 +Node: Q4.0.10154782 +Node: Q4.0.11155271 +Node: Q4.0.12156149 +Node: Q4.1.1157122 +Node: Q4.1.2157525 +Node: Q4.1.3157852 +Node: Q4.2.1158161 +Node: Q4.2.2158791 +Node: Q4.2.3159031 +Node: Q4.2.4159575 +Node: Q4.3.1160228 +Node: Q4.3.2160812 +Node: Q4.3.3162293 +Node: Q4.3.4162565 +Node: Q4.3.5163242 +Node: Q4.4.1163870 +Node: Q4.4.2165356 +Node: Q4.5.1166560 +Node: Q4.6.1167329 +Node: Q4.7.1172589 +Node: Q4.7.2173544 +Node: Q4.7.3173841 +Node: Q4.7.4174027 +Node: Q4.7.5174911 +Node: Q4.7.6176552 +Node: Miscellaneous176841 +Node: Q5.0.1180258 +Node: Q5.0.2180997 +Node: Q5.0.3181851 +Node: Q5.0.4182553 +Node: Q5.0.5183492 +Node: Q5.0.6185472 +Node: Q5.0.7186129 +Node: Q5.0.8186734 +Node: Q5.0.9187253 +Node: Q5.0.10187767 +Node: Q5.0.11188015 +Node: Q5.0.12188553 +Node: Q5.0.13189470 +Node: Q5.0.14190154 +Node: Q5.0.15190919 +Node: Q5.0.16191216 +Node: Q5.0.17191728 +Node: Q5.0.18191993 +Node: Q5.0.19192187 +Node: Q5.0.20192611 +Node: Q5.1.1193526 +Node: Q5.1.2195595 +Node: Q5.1.3196331 +Node: Q5.1.4199725 +Node: Q5.1.5200260 +Node: Q5.1.6202384 +Node: Q5.1.7203870 +Node: Q5.1.8205471 +Node: Q5.1.9206023 +Node: Q5.1.10206908 +Node: Q5.1.11208039 +Node: Q5.2.1208588 +Node: Q5.2.2209158 +Node: Q5.2.3209575 +Node: Q5.2.4209810 +Node: Q5.3.1210720 +Node: Q5.3.2211941 +Node: Q5.3.3212717 +Node: Q5.3.4213201 +Node: Q5.3.5213868 +Node: Q5.3.6214737 +Node: Q5.3.7214982 +Node: Q5.3.8217172 +Node: Q5.3.9217419 +Node: Q5.3.10218372 +Node: Q5.3.11220456 +Node: Q5.3.12222047 +Node: MS Windows223321 +Node: Q6.0.1224798 +Node: Q6.0.2225545 +Node: Q6.0.3226010 +Node: Q6.0.4226290 +Node: Q6.1.1228569 +Node: Q6.1.2229440 +Node: Q6.1.3229895 +Node: Q6.1.4230177 +Node: Q6.1.5230555 +Node: Q6.1.6231423 +Node: Q6.2.1233729 +Node: Q6.2.2234630 +Node: Q6.2.3235042 +Node: Q6.3.1235331 +Node: Q6.3.2236425 +Node: Q6.3.3239606 +Node: Q6.4.1239875 +Node: Current Events241210 +Node: Q7.0.1241864 +Node: Q7.0.2242503 +Node: Q7.0.3243576 +Node: Q7.0.4243804  End Tag Table diff --git a/info/xemacs-faq.info-1 b/info/xemacs-faq.info-1 index 7b40d6a..a37306e 100644 --- a/info/xemacs-faq.info-1 +++ b/info/xemacs-faq.info-1 @@ -926,7 +926,7 @@ it, add to your `Emacs' file entries like this: Emacs*XlwMenu.resourceLabels: True Emacs*XlwMenu.file.labelString: Fichier - Emacs*XlwMenu.openInOtherWindow.labelString: In anderem Fenster offnen + Emacs*XlwMenu.openInOtherWindow.labelString: In anderem Fenster oeffnen The name of the resource is derived from the non-localized entry by removing punctuation and capitalizing as above. diff --git a/info/xemacs-faq.info-5 b/info/xemacs-faq.info-5 index 9007a77..86f5ec9 100644 --- a/info/xemacs-faq.info-5 +++ b/info/xemacs-faq.info-5 @@ -877,8 +877,10 @@ File: xemacs-faq.info, Node: Q6.1.2, Next: Q6.1.3, Prev: Q6.1.1, Up: MS Wind Q6.1.2: What compiler do I need to compile XEmacs? -------------------------------------------------- - You need Visual C++ 4.2 or 5.0, with the exception of the Cygwin -port, which uses Gcc. + You need Visual C++ 4.2, 5.0, or 6.0, with the exception of the +Cygwin port, which uses Gcc. There is also a MINGW32 port of XEmacs +(using Gcc, but using native libraries rather than the Cygwin +libraries). #### More information about this should be provided.  File: xemacs-faq.info, Node: Q6.1.3, Next: Q6.1.4, Prev: Q6.1.2, Up: MS Windows @@ -911,8 +913,8 @@ Some problems to watch out for: * make sure HOME is set. This controls where you `.emacs' file comes from; - * CYGWIN32 needs to be set to tty for process support work. e.g. - CYGWIN32=tty; + * CYGWIN needs to be set to tty for process support work. e.g. + CYGWIN=tty; (use CYGWIN32=tty under b19 and older.) * picking up some other grep or other unix like tools can kill configure; @@ -935,14 +937,52 @@ Q6.1.6: What do I need for Cygwin? `http://sourceware.cygnus.com/cygwin/' - You will need version b19 or later. + You will need version b19 or later. The latest current version is +1.1.1. Other common versions you will see are b20.1. - You will also need the X libraries. There are libraries at -`http://dao.gsfc.nasa.gov/software/grads/win32/X11R6.3/', but these are -not b19 compatible. You can get b19 X11R6.3 binaries, as well as -pre-built ncurses and graphic libraries, from: + Another location, one of the mirror sites of the site just mentioned, +is usually a last faster: + + `ftp://ftp.freesoftware.com/pub/sourceware/cygwin/' + + You can obtain the latest version (currently 1.1.1) from the +`latest/' subdirectory of either of the above two just-mentioned URL's. + + *WARNING: The version of GCC supplied under `latest/', as of June +6th, 2000, does not appear to work. It generates loads of spurious +preprocessor warnings and errors, which makes it impossible to compile +XEmacs with it.* + + You will also need the X libraries. You can get them on the XEmacs +FTP site at + + `ftp://ftp.xemacs.org/pub/xemacs/aux/cygwin/' + + You will find b19 and b20 versions of the X libraries, plus b19 and +b20 versions of stuff that should go into `/usr/local/', donated by +Andy Piper. This includes pre-built versions of various graphics +libraries, such as PNG, JPEG, TIFF, and XPM. (Remember, GIF support is +built-in to XEmacs.) - `ftp://ftp.parallax.co.uk/pub/andyp/'. + (X libraries for v1 and beyond of Cygwin can be found on the Cygwin +site itself - look in the `xfree/' subdirectory.) + + _NOTE:_ There are two versions of the XPM library provided in Andy's +packets. Once is for building with X support, and the other for +building without. The X version should work if you're building with +both X and Windows support. The two files are called `libXpm-X.a' and +`libXpm-noX.a' respectively, and you must symlink the appropriate one +to `libXpm.a'. *CAREFUL:* By default, the non-X version is symlinked +in. If you then configure XEmacs with X, you won't run into problems +until you start compiling `events.c', at which point you'll get strange +and decidedly non-obvious errors. + + Please see `http://www.xemacs.freeserve.co.uk/' (Andy Piper's home +page) for more information. + + BTW There are also libraries at +`http://dao.gsfc.nasa.gov/software/grads/win32/X11R6.3/', but these are +not b19 compatible, and may in fact be native-compiled.  File: xemacs-faq.info, Node: Q6.2.1, Next: Q6.2.2, Prev: Q6.1.6, Up: MS Windows @@ -1114,12 +1154,18 @@ memory addresses that can conflict with those needed by the dumped XEmacs executable. In this instance XEmacs will fail to start without any explanation. Note that this is extremely machine specific. - Work is being done on fixes for 21.1.* that will make more -intelligent guesses about which memory addresses will be free and so -this should cure the problem for most people. + 21.1.10 includes a fix for this that makes more intelligent guesses +about which memory addresses will be free, and this should cure the +problem for most people. Unfortunately, no binary is yet available for +this version. Check back periodically at + + `ftp://ftp.xemacs.org/pub/xemacs/binaries/'. 21.2 implements "portable dumping" which will eliminate the problem -altogether. +altogether. You might have better luck with the 21.2 beta binary, +available at + + `ftp://ftp.xemacs.org/pub/xemacs/beta/binaries/'.  File: xemacs-faq.info, Node: Current Events, Prev: MS Windows, Up: Top diff --git a/info/xemacs.info b/info/xemacs.info index e7754f9..12c76de 100644 --- a/info/xemacs.info +++ b/info/xemacs.info @@ -32,390 +32,390 @@ translation approved by the author instead of in the original English.  Indirect: xemacs.info-1: 1350 -xemacs.info-2: 48915 -xemacs.info-3: 98487 -xemacs.info-4: 147631 -xemacs.info-5: 197228 -xemacs.info-6: 246668 -xemacs.info-7: 296605 -xemacs.info-8: 343420 -xemacs.info-9: 392044 -xemacs.info-10: 441144 -xemacs.info-11: 489787 -xemacs.info-12: 539726 -xemacs.info-13: 581524 -xemacs.info-14: 631267 -xemacs.info-15: 680901 -xemacs.info-16: 730886 -xemacs.info-17: 780057 -xemacs.info-18: 826008 -xemacs.info-19: 856894 -xemacs.info-20: 888547 -xemacs.info-21: 937894 -xemacs.info-22: 980480 +xemacs.info-2: 48878 +xemacs.info-3: 98489 +xemacs.info-4: 147823 +xemacs.info-5: 197420 +xemacs.info-6: 246860 +xemacs.info-7: 296797 +xemacs.info-8: 343612 +xemacs.info-9: 392237 +xemacs.info-10: 441337 +xemacs.info-11: 489981 +xemacs.info-12: 539920 +xemacs.info-13: 581720 +xemacs.info-14: 631497 +xemacs.info-15: 681144 +xemacs.info-16: 730284 +xemacs.info-17: 778697 +xemacs.info-18: 826295 +xemacs.info-19: 857208 +xemacs.info-20: 888862 +xemacs.info-21: 938210 +xemacs.info-22: 980796  Tag Table: (Indirect) Node: Top1350 -Node: License22810 -Node: Distrib36092 -Node: Intro37756 -Node: Frame40627 -Node: Point44571 -Node: Echo Area46538 -Node: Mode Line48915 -Node: XEmacs under X53346 -Node: Keystrokes56523 -Node: Intro to Keystrokes57367 -Node: Representing Keystrokes59470 -Node: Key Sequences60827 -Node: String Key Sequences64167 -Node: Meta Key64550 -Node: Super and Hyper Keys66023 -Node: Character Representation72268 -Node: Commands73288 -Node: Pull-down Menus76137 -Node: File Menu79486 -Node: Edit Menu83308 -Node: Apps Menu85691 -Node: Options Menu86181 -Node: Buffers Menu90161 -Node: Tools Menu90468 -Node: Help Menu90959 -Node: Menu Customization91360 -Node: Entering Emacs95590 -Node: Exiting98487 -Node: Command Switches102960 -Node: Startup Paths112147 -Node: Basic119484 -Node: Inserting Text120892 -Node: Moving Point123888 -Node: Erasing127494 -Node: Basic Files128799 -Node: Basic Help130721 -Node: Blank Lines131316 -Node: Continuation Lines132892 -Node: Position Info134559 -Node: Arguments137975 -Node: Undo142074 -Node: Minibuffer145021 -Node: Minibuffer File147631 -Node: Minibuffer Edit149436 -Node: Completion152377 -Node: Completion Example154308 -Node: Completion Commands155403 -Node: Strict Completion158379 -Node: Completion Options160160 -Node: Minibuffer History161668 -Node: Repetition164852 -Node: M-x167697 -Node: Help172791 -Node: Help Summary174201 -Node: Key Help176987 -Node: Name Help177946 -Node: Apropos180591 -Node: Library Keywords183710 -Node: Help Mode186031 -Node: Misc Help186528 -Node: Mark189677 -Node: Setting Mark191531 -Node: Using Region194653 -Node: Marking Objects195390 -Node: Mark Ring197228 -Node: Mouse Selection198944 -Node: Additional Mouse Operations200951 -Node: Killing205155 -Node: Yanking210791 -Node: Kill Ring211594 -Node: Appending Kills213196 -Node: Earlier Kills215233 -Node: Using X Selections217846 -Node: X Clipboard Selection219096 -Node: X Selection Commands221273 -Node: X Cut Buffers222359 -Node: Active Regions223718 -Node: Accumulating Text228298 -Node: Rectangles231371 -Node: Registers234890 -Node: RegPos236344 -Node: RegText237500 -Node: RegRect238606 -Node: RegConfig239485 -Node: RegNumbers240425 -Node: RegFiles241143 -Node: Bookmarks241801 -Node: Display245173 -Node: Scrolling246668 -Node: Horizontal Scrolling250811 -Node: Selective Display252006 -Node: Display Vars253225 -Node: Search255903 -Node: Incremental Search257096 -Node: Non-Incremental Search266023 -Node: Word Search267465 -Node: Regexp Search269083 -Node: Regexps270619 -Node: Search Case280920 -Node: Replace281701 -Node: Unconditional Replace282649 -Node: Regexp Replace283784 -Node: Replacement and Case284719 -Node: Query Replace285699 -Node: Other Repeating Search288926 -Node: Fixit290181 -Node: Kill Errors290761 -Node: Transpose292094 -Node: Fixing Case294498 -Node: Spelling295144 -Node: Files296605 -Node: File Names297915 -Node: Visiting302252 -Node: Saving308938 -Node: Backup313861 -Node: Backup Names315257 -Node: Backup Deletion316740 -Node: Backup Copying317890 -Node: Interlocking319596 -Node: Reverting323724 -Node: Auto Save325636 -Node: Auto Save Files326603 -Node: Auto Save Control328444 -Node: Recover330282 -Node: Version Control331437 -Node: Concepts of VC333475 -Node: Editing with VC335085 -Node: Variables for Check-in/out340341 -Node: Log Entries342240 -Node: Change Logs and VC343420 -Node: Old Versions346687 -Node: VC Status348690 -Node: Renaming and VC350404 -Node: Snapshots351083 -Node: Making Snapshots351584 -Node: Snapshot Caveats352877 -Node: Version Headers354686 -Node: ListDir357385 -Node: Comparing Files359434 -Node: Dired360967 -Node: Dired Enter361638 -Node: Dired Edit362463 -Node: Dired Deletion364210 -Node: Dired Immed367433 -Node: Misc File Ops368709 -Node: Buffers371197 -Node: Select Buffer373355 -Node: List Buffers375150 -Node: Misc Buffer376908 -Node: Kill Buffer378551 -Node: Several Buffers379681 -Node: Windows383547 -Node: Basic Window384258 -Node: Split Window385977 -Node: Other Window388110 -Node: Pop Up Window390539 -Node: Change Window392044 -Node: Mule394952 -Node: Mule Intro396215 -Node: Language Environments397231 -Node: Input Methods399338 -Node: Select Input Method403058 -Node: Coding Systems405213 -Node: Recognize Coding409399 -Node: Specify Coding412725 -Node: Major Modes417656 -Node: Choosing Modes419875 -Node: Indentation422265 -Node: Indentation Commands424360 -Node: Tab Stops427089 -Node: Just Spaces428938 -Node: Text429753 -Node: Text Mode431736 -Node: Nroff Mode433815 -Node: TeX Mode435458 -Node: TeX Editing437710 -Node: TeX Print441144 -Node: Outline Mode444363 -Node: Outline Format445844 -Node: Outline Motion448644 -Node: Outline Visibility450197 -Node: Words453118 -Node: Sentences456065 -Node: Paragraphs458261 -Node: Pages460549 -Node: Filling463149 -Node: Auto Fill463720 -Node: Fill Commands465867 -Node: Fill Prefix468032 -Node: Case470220 -Node: Programs472248 -Node: Program Modes474797 -Node: Lists477029 -Node: Defuns482869 -Node: Grinding485522 -Node: Basic Indent486150 -Node: Multi-line Indent488171 -Node: Lisp Indent489787 -Node: C Indent493237 -Node: Matching498477 -Node: Comments499999 -Node: Balanced Editing506451 -Node: Lisp Completion507465 -Node: Documentation508480 -Node: Change Log509719 -Node: Tags512297 -Node: Tag Syntax513946 -Node: Create Tags Table517890 -Node: Etags Regexps521950 -Node: Select Tags Table526608 -Node: Find Tag530381 -Node: Tags Search533345 -Node: List Tags536801 -Node: Fortran537830 -Node: Fortran Motion538906 -Node: Fortran Indent539726 -Node: ForIndent Commands540411 -Node: ForIndent Num541556 -Node: ForIndent Conv542830 -Node: ForIndent Vars543606 -Node: Fortran Comments544774 -Node: Fortran Columns548372 -Node: Fortran Abbrev549795 -Node: Asm Mode550704 -Node: Running551256 -Node: Compilation552226 -Node: Lisp Modes557076 -Node: Lisp Libraries558349 -Node: Loading558903 -Node: Compiling Libraries563363 -Node: Mocklisp566254 -Node: Lisp Eval566931 -Node: Lisp Debug570571 -Node: Lisp Interaction575996 -Node: External Lisp577351 -Node: Packages579425 -Node: Package Terminology580166 -Node: Using Packages581524 -Node: Building Packages590383 -Node: Abbrevs592905 -Node: Defining Abbrevs595105 -Node: Expanding Abbrevs597552 -Node: Editing Abbrevs600254 -Node: Saving Abbrevs602127 -Node: Dynamic Abbrevs604067 -Node: Picture605369 -Node: Basic Picture607802 -Node: Insert in Picture610087 -Node: Tabs in Picture611509 -Node: Rectangles in Picture613030 -Node: Sending Mail614938 -Node: Mail Format616649 -Node: Mail Headers617999 -Node: Mail Mode624407 -Node: Reading Mail628020 -Node: Calendar/Diary629595 -Node: Calendar Motion631267 -Node: Calendar Unit Motion632150 -Node: Move to Beginning or End634473 -Node: Specified Dates635606 -Node: Scroll Calendar636494 -Node: Mark and Region638285 -Node: General Calendar640191 -Node: LaTeX Calendar641799 -Node: Holidays643813 -Node: Sunrise/Sunset646915 -Node: Lunar Phases649958 -Node: Other Calendars651343 -Node: Calendar Systems652830 -Node: To Other Calendar655941 -Node: From Other Calendar657932 -Node: Mayan Calendar660237 -Node: Diary663432 -Node: Diary Commands665181 -Node: Format of Diary File668487 -Node: Date Formats671357 -Node: Adding to Diary673931 -Node: Special Diary Entries675562 -Node: Calendar Customization680901 -Node: Calendar Customizing681763 -Node: Holiday Customizing684982 -Node: Date Display Format691450 -Node: Time Display Format692408 -Node: Daylight Savings693546 -Node: Diary Customizing696734 -Node: Hebrew/Islamic Entries701355 -Node: Fancy Diary Display704695 -Node: Included Diary Files706592 -Node: Sexp Diary Entries707573 -Node: Appt Customizing712663 -Node: Sorting713709 -Node: Shell718515 -Node: Single Shell719808 -Node: Interactive Shell721407 -Node: Shell Mode725172 -Node: Terminal emulator727663 -Node: Term Mode729972 -Node: Paging in Term730886 -Node: Narrowing731684 -Node: Hardcopy733634 -Node: Recursive Edit734606 -Node: Dissociated Press737593 -Node: CONX740156 -Node: Amusements741180 -Node: Emulation741660 -Node: Customization743504 -Node: Minor Modes745349 -Node: Variables746981 -Node: Examining748937 -Node: Easy Customization750398 -Node: Customization Groups751412 -Node: Changing an Option754341 -Node: Face Customization760597 -Node: Specific Customization762361 -Node: Edit Options764968 -Node: Locals766552 -Node: File Variables769731 -Node: Keyboard Macros774285 -Node: Basic Kbd Macro776456 -Node: Save Kbd Macro778388 -Node: Kbd Macro Query780057 -Node: Key Bindings781999 -Node: Keymaps782873 -Node: Rebinding786723 -Node: Interactive Rebinding787422 -Node: Programmatic Rebinding789614 -Node: Key Bindings Using Strings792421 -Node: Disabling794048 -Node: Syntax795820 -Node: Syntax Entry796701 -Node: Syntax Change800785 -Node: Init File802954 -Node: Init Syntax804459 -Node: Init Examples806811 -Node: Terminal Init811001 -Node: Audible Bell812711 -Node: Faces816142 -Node: Frame Components820984 -Node: X Resources821429 -Node: Geometry Resources823088 -Node: Iconic Resources825536 -Node: Resource List826008 -Node: Face Resources832515 -Node: Widgets836192 -Node: Menubar Resources837131 -Node: Quitting838064 -Node: Lossage841042 -Node: Stuck Recursive841686 -Node: Screen Garbled842392 -Node: Text Garbled843526 -Node: Unasked-for Search844165 -Node: Emergency Escape844950 -Node: Total Frustration846729 -Node: Bugs847360 -Node: Glossary856894 -Node: Manifesto888547 -Node: Key Index912023 -Node: Command Index937894 -Node: Variable Index980480 -Node: Concept Index996566 +Node: License22773 +Node: Distrib36055 +Node: Intro37719 +Node: Frame40590 +Node: Point44534 +Node: Echo Area46501 +Node: Mode Line48878 +Node: XEmacs under X53309 +Node: Keystrokes56486 +Node: Intro to Keystrokes57330 +Node: Representing Keystrokes59433 +Node: Key Sequences60790 +Node: String Key Sequences64131 +Node: Meta Key64514 +Node: Super and Hyper Keys65987 +Node: Character Representation72232 +Node: Commands73252 +Node: Pull-down Menus76101 +Node: File Menu79450 +Node: Edit Menu83272 +Node: Apps Menu85655 +Node: Options Menu86145 +Node: Buffers Menu90163 +Node: Tools Menu90470 +Node: Help Menu90961 +Node: Menu Customization91362 +Node: Entering Emacs95592 +Node: Exiting98489 +Node: Command Switches102962 +Node: Startup Paths112326 +Node: Basic119675 +Node: Inserting Text121084 +Node: Moving Point124080 +Node: Erasing127686 +Node: Basic Files128991 +Node: Basic Help130913 +Node: Blank Lines131508 +Node: Continuation Lines133084 +Node: Position Info134751 +Node: Arguments138167 +Node: Undo142266 +Node: Minibuffer145213 +Node: Minibuffer File147823 +Node: Minibuffer Edit149628 +Node: Completion152569 +Node: Completion Example154500 +Node: Completion Commands155595 +Node: Strict Completion158571 +Node: Completion Options160352 +Node: Minibuffer History161860 +Node: Repetition165044 +Node: M-x167889 +Node: Help172983 +Node: Help Summary174393 +Node: Key Help177179 +Node: Name Help178138 +Node: Apropos180783 +Node: Library Keywords183902 +Node: Help Mode186223 +Node: Misc Help186720 +Node: Mark189869 +Node: Setting Mark191723 +Node: Using Region194845 +Node: Marking Objects195582 +Node: Mark Ring197420 +Node: Mouse Selection199136 +Node: Additional Mouse Operations201143 +Node: Killing205347 +Node: Yanking210983 +Node: Kill Ring211786 +Node: Appending Kills213388 +Node: Earlier Kills215425 +Node: Using X Selections218038 +Node: X Clipboard Selection219288 +Node: X Selection Commands221465 +Node: X Cut Buffers222551 +Node: Active Regions223910 +Node: Accumulating Text228490 +Node: Rectangles231563 +Node: Registers235082 +Node: RegPos236536 +Node: RegText237692 +Node: RegRect238798 +Node: RegConfig239677 +Node: RegNumbers240617 +Node: RegFiles241335 +Node: Bookmarks241993 +Node: Display245365 +Node: Scrolling246860 +Node: Horizontal Scrolling251003 +Node: Selective Display252198 +Node: Display Vars253417 +Node: Search256095 +Node: Incremental Search257288 +Node: Non-Incremental Search266215 +Node: Word Search267657 +Node: Regexp Search269275 +Node: Regexps270811 +Node: Search Case281112 +Node: Replace281893 +Node: Unconditional Replace282841 +Node: Regexp Replace283976 +Node: Replacement and Case284911 +Node: Query Replace285891 +Node: Other Repeating Search289118 +Node: Fixit290373 +Node: Kill Errors290953 +Node: Transpose292286 +Node: Fixing Case294690 +Node: Spelling295336 +Node: Files296797 +Node: File Names298107 +Node: Visiting302444 +Node: Saving309130 +Node: Backup314053 +Node: Backup Names315449 +Node: Backup Deletion316932 +Node: Backup Copying318082 +Node: Interlocking319788 +Node: Reverting323916 +Node: Auto Save325828 +Node: Auto Save Files326795 +Node: Auto Save Control328636 +Node: Recover330474 +Node: Version Control331629 +Node: Concepts of VC333667 +Node: Editing with VC335277 +Node: Variables for Check-in/out340533 +Node: Log Entries342432 +Node: Change Logs and VC343612 +Node: Old Versions346879 +Node: VC Status348882 +Node: Renaming and VC350596 +Node: Snapshots351275 +Node: Making Snapshots351776 +Node: Snapshot Caveats353069 +Node: Version Headers354878 +Node: ListDir357577 +Node: Comparing Files359626 +Node: Dired361159 +Node: Dired Enter361830 +Node: Dired Edit362655 +Node: Dired Deletion364402 +Node: Dired Immed367625 +Node: Misc File Ops368901 +Node: Buffers371389 +Node: Select Buffer373547 +Node: List Buffers375342 +Node: Misc Buffer377100 +Node: Kill Buffer378743 +Node: Several Buffers379873 +Node: Windows383740 +Node: Basic Window384451 +Node: Split Window386170 +Node: Other Window388303 +Node: Pop Up Window390732 +Node: Change Window392237 +Node: Mule395145 +Node: Mule Intro396408 +Node: Language Environments397424 +Node: Input Methods399531 +Node: Select Input Method403251 +Node: Coding Systems405406 +Node: Recognize Coding409592 +Node: Specify Coding412918 +Node: Major Modes417849 +Node: Choosing Modes420068 +Node: Indentation422458 +Node: Indentation Commands424553 +Node: Tab Stops427282 +Node: Just Spaces429131 +Node: Text429946 +Node: Text Mode431929 +Node: Nroff Mode434008 +Node: TeX Mode435651 +Node: TeX Editing437903 +Node: TeX Print441337 +Node: Outline Mode444556 +Node: Outline Format446037 +Node: Outline Motion448837 +Node: Outline Visibility450390 +Node: Words453311 +Node: Sentences456258 +Node: Paragraphs458454 +Node: Pages460742 +Node: Filling463342 +Node: Auto Fill463913 +Node: Fill Commands466060 +Node: Fill Prefix468225 +Node: Case470413 +Node: Programs472441 +Node: Program Modes474991 +Node: Lists477223 +Node: Defuns483063 +Node: Grinding485716 +Node: Basic Indent486344 +Node: Multi-line Indent488365 +Node: Lisp Indent489981 +Node: C Indent493431 +Node: Matching498671 +Node: Comments500193 +Node: Balanced Editing506645 +Node: Lisp Completion507659 +Node: Documentation508674 +Node: Change Log509913 +Node: Tags512491 +Node: Tag Syntax514140 +Node: Create Tags Table518084 +Node: Etags Regexps522144 +Node: Select Tags Table526802 +Node: Find Tag530575 +Node: Tags Search533539 +Node: List Tags536995 +Node: Fortran538024 +Node: Fortran Motion539100 +Node: Fortran Indent539920 +Node: ForIndent Commands540605 +Node: ForIndent Num541750 +Node: ForIndent Conv543024 +Node: ForIndent Vars543800 +Node: Fortran Comments544968 +Node: Fortran Columns548566 +Node: Fortran Abbrev549989 +Node: Asm Mode550898 +Node: Running551450 +Node: Compilation552420 +Node: Lisp Modes557270 +Node: Lisp Libraries558543 +Node: Loading559097 +Node: Compiling Libraries563557 +Node: Mocklisp566448 +Node: Lisp Eval567125 +Node: Lisp Debug570765 +Node: Lisp Interaction576192 +Node: External Lisp577547 +Node: Packages579621 +Node: Package Terminology580362 +Node: Using Packages581720 +Node: Building Packages590598 +Node: Abbrevs593120 +Node: Defining Abbrevs595320 +Node: Expanding Abbrevs597767 +Node: Editing Abbrevs600469 +Node: Saving Abbrevs602342 +Node: Dynamic Abbrevs604297 +Node: Picture605599 +Node: Basic Picture608032 +Node: Insert in Picture610317 +Node: Tabs in Picture611739 +Node: Rectangles in Picture613260 +Node: Sending Mail615168 +Node: Mail Format616879 +Node: Mail Headers618229 +Node: Mail Mode624637 +Node: Reading Mail628250 +Node: Calendar/Diary629825 +Node: Calendar Motion631497 +Node: Calendar Unit Motion632380 +Node: Move to Beginning or End634703 +Node: Specified Dates635836 +Node: Scroll Calendar636724 +Node: Mark and Region638515 +Node: General Calendar640421 +Node: LaTeX Calendar642029 +Node: Holidays644043 +Node: Sunrise/Sunset647145 +Node: Lunar Phases650184 +Node: Other Calendars651569 +Node: Calendar Systems653056 +Node: To Other Calendar656167 +Node: From Other Calendar658158 +Node: Mayan Calendar660463 +Node: Diary663658 +Node: Diary Commands665407 +Node: Format of Diary File668730 +Node: Date Formats671600 +Node: Adding to Diary674174 +Node: Special Diary Entries675805 +Node: Calendar Customization681144 +Node: Calendar Customizing682006 +Node: Holiday Customizing685241 +Node: Date Display Format691728 +Node: Time Display Format692686 +Node: Daylight Savings693824 +Node: Diary Customizing697012 +Node: Hebrew/Islamic Entries701633 +Node: Fancy Diary Display704973 +Node: Included Diary Files706889 +Node: Sexp Diary Entries707870 +Node: Appt Customizing712960 +Node: Sorting714006 +Node: Shell718812 +Node: Single Shell720105 +Node: Interactive Shell721719 +Node: Shell Mode725484 +Node: Terminal emulator727975 +Node: Term Mode730284 +Node: Paging in Term731198 +Node: Narrowing731996 +Node: Hardcopy733946 +Node: Recursive Edit734918 +Node: Dissociated Press737905 +Node: CONX740468 +Node: Amusements741492 +Node: Emulation741972 +Node: Customization743832 +Node: Minor Modes745648 +Node: Variables747280 +Node: Examining749236 +Node: Easy Customization750697 +Node: Customization Groups751711 +Node: Changing an Option754640 +Node: Face Customization760910 +Node: Specific Customization762674 +Node: Edit Options765281 +Node: Locals766865 +Node: File Variables770044 +Node: Keyboard Macros774594 +Node: Basic Kbd Macro776765 +Node: Save Kbd Macro778697 +Node: Kbd Macro Query780355 +Node: Key Bindings782297 +Node: Keymaps783171 +Node: Rebinding787021 +Node: Interactive Rebinding787720 +Node: Programmatic Rebinding789909 +Node: Key Bindings Using Strings792716 +Node: Disabling794343 +Node: Syntax796122 +Node: Syntax Entry797003 +Node: Syntax Change801087 +Node: Init File803256 +Node: Init Syntax804720 +Node: Init Examples807071 +Node: Terminal Init811261 +Node: Audible Bell812998 +Node: Faces816429 +Node: Frame Components821271 +Node: X Resources821716 +Node: Geometry Resources823375 +Node: Iconic Resources825823 +Node: Resource List826295 +Node: Face Resources832802 +Node: Widgets836479 +Node: Menubar Resources837418 +Node: Quitting838351 +Node: Lossage841329 +Node: Stuck Recursive841973 +Node: Screen Garbled842679 +Node: Text Garbled843813 +Node: Unasked-for Search844452 +Node: Emergency Escape845237 +Node: Total Frustration847016 +Node: Bugs847647 +Node: Glossary857208 +Node: Manifesto888862 +Node: Key Index912339 +Node: Command Index938210 +Node: Variable Index980796 +Node: Concept Index996882  End Tag Table diff --git a/info/xemacs.info-1 b/info/xemacs.info-1 index 95651c9..378b1c7 100644 --- a/info/xemacs.info-1 +++ b/info/xemacs.info-1 @@ -492,8 +492,7 @@ Customization By changing them, you can "redefine keys". * Syntax:: The syntax table controls how words and expressions are parsed. -* Init File:: How to write common customizations in the `.emacs' - file. +* Init File:: How to write common customizations in the init file. * Audible Bell:: Changing how XEmacs sounds the bell. * Faces:: Changing the fonts and colors of a region of text. * X Resources:: X resources controlling various aspects of the @@ -527,7 +526,7 @@ The Syntax Table * Entry: Syntax Entry. What the syntax table records for each character. * Change: Syntax Change. How to change the information. -The Init File, `~/.emacs' +The Init File * Init Syntax:: Syntax of constants in Emacs Lisp. * Init Examples:: How to do some things with an init file. diff --git a/info/xemacs.info-10 b/info/xemacs.info-10 index 8ee5310..40b8bfb 100644 --- a/info/xemacs.info-10 +++ b/info/xemacs.info-10 @@ -838,7 +838,7 @@ appear on the screen. There are editing commands to operate on them. * Grinding:: Adjusting indentation to show the nesting. * Matching:: Insertion of a close-delimiter flashes matching open. -* Comments:: Inserting, illing and aligning comments. +* Comments:: Inserting, filling and aligning comments. * Balanced Editing:: Inserting two matching parentheses at once, etc. * Lisp Completion:: Completion on symbol names in Lisp code. * Documentation:: Getting documentation of functions you plan to call. diff --git a/info/xemacs.info-12 b/info/xemacs.info-12 index 7fb18f7..752f67d 100644 --- a/info/xemacs.info-12 +++ b/info/xemacs.info-12 @@ -794,8 +794,8 @@ examine the buffer that was being edited at the time of the error, and you can switch buffers, visit files, and perform any other editing operations. However, the debugger is a recursive editing level (*note Recursive Edit::); it is a good idea to return to the backtrace buffer -and explictly exit the debugger when you don't want to use it any more. -Exiting the debugger kills the backtrace buffer. +and explicitly exit the debugger when you don't want to use it any +more. Exiting the debugger kills the backtrace buffer. The contents of the backtrace buffer show you the functions that are executing and the arguments that were given to them. It also allows you diff --git a/info/xemacs.info-13 b/info/xemacs.info-13 index 2430a9e..7e83eef 100644 --- a/info/xemacs.info-13 +++ b/info/xemacs.info-13 @@ -96,11 +96,13 @@ XEmacs and Installing Packages have some or all of the packages on a local disk, such as a CDROM. If you want to install from a local disk, you must first tell XEmacs where to find the package binaries. This is done by adding a line like the -following to your `.emacs' file: +following to your init file: (setq package-get-remote (cons (list nil "/my/path/to/package/binaries") package-get-remote)) + *Note Init File::. + Here, you'd change `/my/path/to/package/binaries' to be the path to your local package binaries. Next, restart XEmacs, and you're ready to go (advanced users can just re-evaluate the sexp). @@ -580,9 +582,9 @@ specified file. The text stored in the file looks like the output of and reads the specified file, defining abbrevs according to its contents. `M-x quietly-read-abbrev-file' is the same but does not display a message in the echo area; it is actually useful primarily in -the `.emacs' file. If you give an empty argument to either of these -functions, the file name Emacs uses is the value of the variable -`abbrev-file-name', which is by default `"~/.abbrev_defs"'. +the init file. *Note Init File::. If you give an empty argument to +either of these functions, the file name Emacs uses is the value of the +variable `abbrev-file-name', which is by default `"~/.abbrev_defs"'. Emacs offers to save abbrevs automatically if you have changed any of them, whenever it offers to save all files (for `C-x s' or `C-x C-c'). @@ -1062,7 +1064,7 @@ use the command `M-x merge-mail-aliases'. The `rebuild-mail-aliases' command is similar, but deletes existing aliases first. If you want multiple addresses separated by a string other than `,' -(a comma), then set the variable `mail-alias-seperator-string' to it. +(a comma), then set the variable `mail-alias-separator-string' to it. This has to be a comma bracketed by whitespace if you want any kind of reasonable behavior. diff --git a/info/xemacs.info-14 b/info/xemacs.info-14 index 447d49b..d071965 100644 --- a/info/xemacs.info-14 +++ b/info/xemacs.info-14 @@ -519,8 +519,8 @@ for daylight savings time_. *Note Daylight Savings::, for how daylight savings time is determined. As a user, you might find it convenient to set the calendar location -variables for your usual physical location in your `.emacs' file. And -when you install Emacs on a machine, you can create a `default.el' file +variables for your usual physical location in your init file. And when +you install Emacs on a machine, you can create a `default.el' file which sets them properly for the typical location of most users of that machine. *Note Init File::. @@ -975,10 +975,10 @@ date, independently of the calendar display, and optionally for the next few days as well; the variable `number-of-diary-entries' specifies how many days to include (*note Customization::). - If you put `(diary)' in your `.emacs' file, this automatically -displays a window with the day's diary entries, when you enter Emacs. -The mode line of the displayed window shows the date and any holidays -that fall on that date. + If you put `(diary)' in your init file, this automatically displays +a window with the day's diary entries, when you enter Emacs. *Note +Init File::. The mode line of the displayed window shows the date and +any holidays that fall on that date. Many users like to receive notice of events in their diary as email. To send such mail to yourself, use the command `M-x diff --git a/info/xemacs.info-15 b/info/xemacs.info-15 index d9656f6..08b6d30 100644 --- a/info/xemacs.info-15 +++ b/info/xemacs.info-15 @@ -61,14 +61,14 @@ Customizing the Calendar If you set the variable `view-diary-entries-initially' to `t', calling up the calendar automatically displays the diary entries for the current date as well. The diary dates appear only if the current -date is visible. If you add both of the following lines to your -`.emacs' file: +date is visible. If you add both of the following lines to your init +file: (setq view-diary-entries-initially t) (calendar) this displays both the calendar and diary windows whenever you start -Emacs. +Emacs. *Note Init File::. Similarly, if you set the variable `view-calendar-holidays-initially' to `t', entering the calendar @@ -207,10 +207,12 @@ a string. For example, suppose you want to add Bastille Day, celebrated in France on July 14. You can do this by adding the following line to -your `.emacs' file: +your init file: (setq other-holidays '((holiday-fixed 7 14 "Bastille Day"))) + *Note Init File::. + The holiday form `(holiday-fixed 7 14 "Bastille Day")' specifies the fourteenth day of the seventh month (July). @@ -603,10 +605,12 @@ such days to be shown in the fancy diary buffer, set the variable If you use the fancy diary display, you can use the normal hook `list-diary-entries-hook' to sort each day's diary entries by their -time of day. Add this line to your `.emacs' file: +time of day. Add this line to your init file: (add-hook 'list-diary-entries-hook 'sort-diary-entries t) + *Note Init File::. + For each day, this sorts diary entries that begin with a recognizable time of day according to their times. Diary entries without times come first within each day. @@ -978,7 +982,7 @@ variable when you start XEmacs. If the file name does not specify a directory, the directories in the list `exec-path' are searched; this list is initialized based on the `PATH' environment variable when you start XEmacs. You can override either or both of these default -initializations in your `.emacs' file. +initializations in your init file. *Note Init File::. When you use `M-!' and `M-|', XEmacs has to wait until the shell command completes. You can quit with `C-g'; that terminates the shell @@ -1175,32 +1179,3 @@ examining your input. Instead, if you use a programmable shell, you can have it tell Term what the current directory is. This is done automatically by bash for version 1.15 and later. - -File: xemacs.info, Node: Term Mode, Next: Paging in Term, Prev: Terminal emulator, Up: Shell - -Term Mode ---------- - - Term uses Term mode, which has two input modes: In line mode, Term -basically acts like Shell mode. *Note Shell Mode::. In Char mode, -each character is sent directly to the inferior subshell, except for -the Term escape character, normally `C-c'. - - To switch between line and char mode, use these commands: - findex term-char-mode - -`C-c C-k' - Switch to line mode. Do nothing if already in line mode. - -`C-c C-j' - Switch to char mode. Do nothing if already in char mode. - - The following commands are only available in Char mode: -`C-c C-c' - Send a literal to the sub-shell. - -`C-c C-x' - A prefix command to conveniently access the global commands. - For example, `C-c C-x o' invokes the global binding of `C-x o', - which is normally `other-window'. - diff --git a/info/xemacs.info-16 b/info/xemacs.info-16 index 65c07fe..8058de2 100644 --- a/info/xemacs.info-16 +++ b/info/xemacs.info-16 @@ -30,6 +30,35 @@ versions, except that the sections entitled "The GNU Manifesto", translation approved by the author instead of in the original English.  +File: xemacs.info, Node: Term Mode, Next: Paging in Term, Prev: Terminal emulator, Up: Shell + +Term Mode +--------- + + Term uses Term mode, which has two input modes: In line mode, Term +basically acts like Shell mode. *Note Shell Mode::. In Char mode, +each character is sent directly to the inferior subshell, except for +the Term escape character, normally `C-c'. + + To switch between line and char mode, use these commands: + findex term-char-mode + +`C-c C-k' + Switch to line mode. Do nothing if already in line mode. + +`C-c C-j' + Switch to char mode. Do nothing if already in char mode. + + The following commands are only available in Char mode: +`C-c C-c' + Send a literal to the sub-shell. + +`C-c C-x' + A prefix command to conveniently access the global commands. + For example, `C-c C-x o' invokes the global binding of `C-x o', + which is normally `other-window'. + + File: xemacs.info, Node: Paging in Term, Prev: Term Mode, Up: Shell Paging in the terminal emulator @@ -303,7 +332,7 @@ Viper (a vi emulator) (viper-mode) - in your `.emacs' file. + in your init file. *Note Init File::. Viper comes with a separate manual that is provided standard with the XEmacs distribution. @@ -342,9 +371,8 @@ you do them in. They are completely lost when you kill the Emacs job, and have no effect on other Emacs jobs you may run at the same time or later. The only way an Emacs job can affect anything outside of it is by writing a file; in particular, the only way to make a customization -`permanent' is to put something in your `.emacs' file or other -appropriate file to do the customization in each session. *Note Init -File::. +`permanent' is to put something in your init file or other appropriate +file to do the customization in each session. *Note Init File::. * Menu: @@ -359,8 +387,7 @@ File::. By changing them, you can "redefine keys". * Syntax:: The syntax table controls how words and expressions are parsed. -* Init File:: How to write common customizations in the `.emacs' - file. +* Init File:: How to write common customizations in the init file. * Audible Bell:: Changing how Emacs sounds the bell. * Faces:: Changing the fonts and colors of a region of text. * Frame Components:: Controlling the presence and positions of the @@ -682,9 +709,10 @@ insert a newline in an editable field, use `C-o' or `C-q C-j', Setting the option changes its value in the current Emacs session; "saving" the value changes it for future sessions as well. This works -by writing code into your `~/.emacs' file so as to set the option -variable again each time you start Emacs. To save the option, invoke -`[State]' and select the `Save for Future Sessions' operation. +by writing code into your init file so as to set the option variable +again each time you start Emacs. *Note Init File::. To save the +option, invoke `[State]' and select the `Save for Future Sessions' +operation. You can also restore the option to its standard value by invoking `[State]' and selecting the `Reset' operation. There are actually @@ -1013,9 +1041,9 @@ long file that contains no page markers and has no local variables list. list. That is inappropriate. Whether you use Auto Fill mode or not is a matter of personal taste, not a matter of the contents of particular files. If you want to use Auto Fill, set up major mode hooks with your -`.emacs' file to turn it on (when appropriate) for you alone (*note -Init File::). Don't try to use a local variable list that would impose -your taste on everyone working with the file. +file file to turn it on (when appropriate) for you alone (*note Init +File::). Don't try to use a local variable list that would impose your +taste on everyone working with the file. XEmacs allows you to specify local variables in the first line of a file, in addition to specifying them in the `Local Variables' section @@ -1143,37 +1171,3 @@ equivalent to plain `C-x (' followed by retyping the whole definition so far. As a consequence it re-executes the macro as previously defined. - -File: xemacs.info, Node: Save Kbd Macro, Next: Kbd Macro Query, Prev: Basic Kbd Macro, Up: Keyboard Macros - -Naming and Saving Keyboard Macros ---------------------------------- - - To save a keyboard macro for longer than until you define the next -one, you must give it a name using `M-x name-last-kbd-macro'. This -reads a name as an argument using the minibuffer and defines that name -to execute the macro. The macro name is a Lisp symbol, and defining it -in this way makes it a valid command name for calling with `M-x' or for -binding a key to with `global-set-key' (*note Keymaps::). If you -specify a name that has a prior definition other than another keyboard -macro, Emacs prints an error message and nothing is changed. - - Once a macro has a command name, you can save its definition in a -file. You can then use it in another editing session. First visit the -file you want to save the definition in. Then use the command: - - M-x insert-kbd-macro MACRONAME - -This inserts some Lisp code that, when executed later, will define the -same macro with the same definition it has now. You need not -understand Lisp code to do this, because `insert-kbd-macro' writes the -Lisp code for you. Then save the file. You can load the file with -`load-file' (*note Lisp Libraries::). If the file you save in is your -initialization file `~/.emacs' (*note Init File::), then the macro will -be defined each time you run Emacs. - - If you give `insert-kbd-macro' a prefix argument, it creates -additional Lisp code to record the keys (if any) that you have bound to -the keyboard macro, so that the macro is reassigned the same keys when -you load the file. - diff --git a/info/xemacs.info-17 b/info/xemacs.info-17 index f4c723b..8326642 100644 --- a/info/xemacs.info-17 +++ b/info/xemacs.info-17 @@ -30,6 +30,40 @@ versions, except that the sections entitled "The GNU Manifesto", translation approved by the author instead of in the original English.  +File: xemacs.info, Node: Save Kbd Macro, Next: Kbd Macro Query, Prev: Basic Kbd Macro, Up: Keyboard Macros + +Naming and Saving Keyboard Macros +--------------------------------- + + To save a keyboard macro for longer than until you define the next +one, you must give it a name using `M-x name-last-kbd-macro'. This +reads a name as an argument using the minibuffer and defines that name +to execute the macro. The macro name is a Lisp symbol, and defining it +in this way makes it a valid command name for calling with `M-x' or for +binding a key to with `global-set-key' (*note Keymaps::). If you +specify a name that has a prior definition other than another keyboard +macro, Emacs prints an error message and nothing is changed. + + Once a macro has a command name, you can save its definition in a +file. You can then use it in another editing session. First visit the +file you want to save the definition in. Then use the command: + + M-x insert-kbd-macro MACRONAME + +This inserts some Lisp code that, when executed later, will define the +same macro with the same definition it has now. You need not +understand Lisp code to do this, because `insert-kbd-macro' writes the +Lisp code for you. Then save the file. You can load the file with +`load-file' (*note Lisp Libraries::). If the file you save in is your +initialization file (*note Init File::), then the macro will be defined +each time you run Emacs. + + If you give `insert-kbd-macro' a prefix argument, it creates +additional Lisp code to record the keys (if any) that you have bound to +the keyboard macro, so that the macro is reassigned the same keys when +you load the file. + + File: xemacs.info, Node: Kbd Macro Query, Prev: Save Kbd Macro, Up: Keyboard Macros Executing Macros With Variations @@ -234,9 +268,9 @@ redefines `C-x 4 $' to run the (fictitious) command `spell-other-window'. The most general way to modify a keymap is the function -`define-key', used in Lisp code (such as your `.emacs' file). -`define-key' takes three arguments: the keymap, the key to modify in -it, and the new definition. *Note Init File::, for an example. +`define-key', used in Lisp code (such as your init file). `define-key' +takes three arguments: the keymap, the key to modify in it, and the new +definition. *Note Init File::, for an example. `substitute-key-definition' is used similarly; it takes three arguments, an old definition, a new definition, and a keymap, and redefines in that keymap all keys that were previously defined with the @@ -382,20 +416,22 @@ beginning users from executing it by accident and being confused. The direct mechanism for disabling a command is to have a non-`nil' `disabled' property on the Lisp symbol for the command. These -properties are normally set by the user's `.emacs' file with Lisp +properties are normally set by the user's init file with Lisp expressions such as: (put 'delete-region 'disabled t) + *Note Init File::. + If the value of the `disabled' property is a string, that string is included in the message printed when the command is used: (put 'delete-region 'disabled "Text deleted this way cannot be yanked back!\n") - You can disable a command either by editing the `.emacs' file -directly or with the command `M-x disable-command', which edits the -`.emacs' file for you. *Note Init File::. + You can disable a command either by editing the init file directly +or with the command `M-x disable-command', which edits the init file +for you. *Note Init File::. When you attempt to invoke a disabled command interactively in Emacs, a window is displayed containing the command's name, its documentation, @@ -403,7 +439,7 @@ and some instructions on what to do next; then Emacs asks for input saying whether to execute the command as requested, enable it and execute, or cancel it. If you decide to enable the command, you are asked whether to do this permanently or just for the current session. -Enabling permanently works by automatically editing your `.emacs' file. +Enabling permanently works by automatically editing your init file. You can use `M-x enable-command' at any time to enable any command permanently. @@ -596,19 +632,20 @@ some English to explain that string if necessary.  File: xemacs.info, Node: Init File, Next: Audible Bell, Prev: Syntax, Up: Customization -The Init File, .emacs -===================== +The Init File +============= - When you start Emacs, it normally loads the file `.emacs' in your -home directory. This file, if it exists, should contain Lisp code. It -is called your initialization file or "init file". Use the command -line switch `-q' to tell Emacs whether to load an init file (*note -Entering Emacs::). Use the command line switch `-user-init-file' -(*note Command Switches::) to tell Emacs to load a different file -instead of `~/.emacs'. + When you start Emacs, it normally loads either `.xemacs/init.el' or +the file `.emacs' (whichever comes first) in your home directory. This +file, if it exists, should contain Lisp code. It is called your +initialization file or "init file". Use the command line switch `-q' +to tell Emacs whether to load an init file (*note Entering Emacs::). +Use the command line switch `-user-init-file' (*note Command +Switches::) to tell Emacs to load a different file instead of +`~/.xemacs/init.el'/`~/.emacs'. - When the `.emacs' file is read, the variable `user-init-file' says -which init file was loaded. + When the init file is read, the variable `user-init-file' says which +init file was loaded. At some sites there is a "default init file", which is the library named `default.el', found via the standard search path for libraries. @@ -618,10 +655,8 @@ whenever you start Emacs. But your init file, if any, is loaded first; if it sets `inhibit-default-init' non-`nil', then `default' is not loaded. - If you have a large amount of code in your `.emacs' file, you should -move it into another file named `SOMETHING.el', byte-compile it (*note -Lisp Libraries::), and load that file from your `.emacs' file using -`load'. + If you have a large amount of code in your init file, you should +byte-compile it to `~/.xemacs/init.elc' or `~/.emacs.elc'. * Menu: @@ -635,16 +670,16 @@ File: xemacs.info, Node: Init Syntax, Next: Init Examples, Up: Init File Init File Syntax ---------------- - The `.emacs' file contains one or more Lisp function call -expressions. Each consists of a function name followed by arguments, -all surrounded by parentheses. For example, `(setq fill-column 60)' -represents a call to the function `setq' which is used to set the -variable `fill-column' (*note Filling::) to 60. + The init file contains one or more Lisp function call expressions. +Each consists of a function name followed by arguments, all surrounded +by parentheses. For example, `(setq fill-column 60)' represents a call +to the function `setq' which is used to set the variable `fill-column' +(*note Filling::) to 60. The second argument to `setq' is an expression for the new value of the variable. This can be a constant, a variable, or a function call -expression. In `.emacs', constants are used most of the time. They -can be: +expression. In the init file, constants are used most of the time. +They can be: Numbers Integers are written in decimal, with an optional initial minus @@ -836,16 +871,16 @@ Thus, terminal types `aaa-48' and `aaa-30-rv' both use the library the full terminal type name. The library's name is constructed by concatenating the value of the -variable `term-file-prefix' and the terminal type. Your `.emacs' file -can prevent the loading of the terminal-specific library by setting -`term-file-prefix' to `nil'. +variable `term-file-prefix' and the terminal type. Your init file can +prevent the loading of the terminal-specific library by setting +`term-file-prefix' to `nil'. *Note Init File::. The value of the variable `term-setup-hook', if not `nil', is called as a function of no arguments at the end of Emacs initialization, after -both your `.emacs' file and any terminal-specific library have been -read. You can set the value in the `.emacs' file to override part of -any of the terminal-specific libraries and to define initializations -for terminals that do not have a library. +both your init file and any terminal-specific library have been read. +*Note Init File::. You can set the value in the init file to override +part of any of the terminal-specific libraries and to define +initializations for terminals that do not have a library.  File: xemacs.info, Node: Audible Bell, Next: Faces, Prev: Init File, Up: Customization diff --git a/info/xemacs.info-18 b/info/xemacs.info-18 index 5be7d83..af83e95 100644 --- a/info/xemacs.info-18 +++ b/info/xemacs.info-18 @@ -671,13 +671,13 @@ the error message the first time the bug happens, so if you can't make it happen again, you can report at least that. Check whether any programs you have loaded into the Lisp world, -including your `.emacs' file, set any variables that may affect the -functioning of Emacs. Also, see whether the problem happens in a -freshly started Emacs without loading your `.emacs' file (start Emacs -with the `-q' switch to prevent loading the init file). If the problem -does NOT occur then, it is essential that we know the contents of any -programs that you must load into the Lisp world in order to cause the -problem to occur. +including your init file, set any variables that may affect the +functioning of Emacs. *Note Init File::. Also, see whether the +problem happens in a freshly started Emacs without loading your init +file (start Emacs with the `-q' switch to prevent loading the init +file). If the problem does NOT occur then, it is essential that we +know the contents of any programs that you must load into the Lisp +world in order to cause the problem to occur. If the problem does depend on an init file or other Lisp programs that are not part of the standard Emacs system, then you should make @@ -714,11 +714,11 @@ using `Meta-' or from the `*scratch*' buffer just after starting Emacs. From then on, all output from Emacs to the terminal will be written in the specified termscript file as well, until the Emacs process is killed. If the problem happens when Emacs starts up, put -this expression into your `.emacs' file so that the termscript file will -be open when Emacs displays the screen for the first time. Be warned: -it is often difficult, and sometimes impossible, to fix a -terminal-dependent bug without access to a terminal of the type that -stimulates the bug. +this expression into your init file so that the termscript file will be +open when Emacs displays the screen for the first time. *Note Init +File::. Be warned: it is often difficult, and sometimes impossible, to +fix a terminal-dependent bug without access to a terminal of the type +that stimulates the bug. The newsgroup `comp.emacs.xemacs' may be used for bug reports, other discussions and requests for assistance. diff --git a/info/xemacs.info-19 b/info/xemacs.info-19 index a4fa596..7140c0f 100644 --- a/info/xemacs.info-19 +++ b/info/xemacs.info-19 @@ -615,7 +615,7 @@ Quoting Read-only Buffer A read-only buffer is one whose text you are not allowed to change. Normally Emacs makes buffers read-only when they contain text which - has a special significance to Emacs, such asDired buffers. + has a special significance to Emacs, such as Dired buffers. Visiting a file that is write-protected also makes a read-only buffer. *Note Buffers::. diff --git a/info/xemacs.info-2 b/info/xemacs.info-2 index e8c6378..8bad2e1 100644 --- a/info/xemacs.info-2 +++ b/info/xemacs.info-2 @@ -323,7 +323,7 @@ sequence must make up a "prefix key sequence". Emacs represents a key sequence as a vector of keystrokes. Thus, the schematic representation of a complete key sequence is as follows: - [(modifier .. modifer keysym) ... (modifier .. modifier keysym)] + [(modifier .. modifier keysym) ... (modifier .. modifier keysym)] Here are some examples of complete key sequences: @@ -928,19 +928,20 @@ Teach Extended Commands alternate binding before the command executes. Syntax Highlighting - You can customize your `.emacs' file to include the font-lock mode - so that when you select this item, the comments will be displayed - in one face, strings in another, reserved words in another, and so - on. When Fonts is selected, different parts of the program will - appear in different Fonts. When Colors is selected, then the - program will be displayed in different colors. Selecting None - causes the program to appear in just one Font and Color. Selecting - Less resets the Fonts and Colors to a fast, minimal set of - decorations. Selecting More resets the Fonts and Colors to a larger - set of decorations. For example, if Less is selected (which is the - default setting) then you might have all comments in green color. - Whereas, if More is selected then a function name in the comments - themselves might appear in a different Color or Font. + You can customize your init file to include the font-lock mode so + that when you select this item, the comments will be displayed in + one face, strings in another, reserved words in another, and so + on. *Note Init File::. When Fonts is selected, different parts of + the program will appear in different Fonts. When Colors is + selected, then the program will be displayed in different colors. + Selecting None causes the program to appear in just one Font and + Color. Selecting Less resets the Fonts and Colors to a fast, + minimal set of decorations. Selecting More resets the Fonts and + Colors to a larger set of decorations. For example, if Less is + selected (which is the default setting) then you might have all + comments in green color. Whereas, if More is selected then a + function name in the comments themselves might appear in a + different Color or Font. Paren Highlighting After selecting Blink from this item, if you place the cursor on a @@ -973,7 +974,7 @@ Buffers Sub-Menus Save Options Selecting this item will save the current settings of your Options - menu to your `.emacs' file. + menu to your init file. *Note Init File::.  File: xemacs.info, Node: Buffers Menu, Next: Tools Menu, Prev: Options Menu, Up: Pull-down Menus diff --git a/info/xemacs.info-20 b/info/xemacs.info-20 index 3a4d9ea..aec371f 100644 --- a/info/xemacs.info-20 +++ b/info/xemacs.info-20 @@ -236,7 +236,7 @@ available person to fix your problem; you are not at the mercy of any individual. With Unix, the price of sources puts this out of consideration for most businesses. With GNU this will be easy. It is still possible for there to be no available competent person, but this -problem cannot be blamed on distibution arrangements. GNU does not +problem cannot be blamed on distribution arrangements. GNU does not eliminate all the world's problems, only some of them. Meanwhile, the users who know nothing about computers need diff --git a/info/xemacs.info-22 b/info/xemacs.info-22 index 7b22577..9e53490 100644 --- a/info/xemacs.info-22 +++ b/info/xemacs.info-22 @@ -222,7 +222,7 @@ Variable Index * lpr-switches: Hardcopy. * mail-abbrev-mailrc-file: Mail Headers. * mail-abbrev-mode-regexp: Mail Headers. -* mail-alias-seperator-string: Mail Headers. +* mail-alias-separator-string: Mail Headers. * mail-archive-file-name: Mail Headers. * mail-header-separator: Mail Format. * mail-mode-hook: Mail Mode. @@ -734,7 +734,7 @@ Concept Index * sexp diary entries: Sexp Diary Entries. * shell commands: Shell. * Shell mode: Shell Mode. -* shift modifer: Representing Keystrokes. +* shift modifier: Representing Keystrokes. * shrinking XEmacs frame: Exiting. * simultaneous editing: Interlocking. * single-file packages: Package Terminology. diff --git a/info/xemacs.info-3 b/info/xemacs.info-3 index 1bc5ee6..a8f9c3b 100644 --- a/info/xemacs.info-3 +++ b/info/xemacs.info-3 @@ -257,7 +257,7 @@ order in which they appear in this table. `-no-init-file' `-q' - Do not load your Emacs init file `~/.emacs'. + Do not load your Emacs init file. *Note Init File::. `-no-site-file' Do not load the site-specific init file `lisp/site-start.el'. @@ -274,7 +274,8 @@ order in which they appear in this table. This is equivalent to `-q -no-site-file -no-early-packages'. `-user-init-file FILE' - Load FILE as your Emacs init file instead of `~/.emacs'. + Load FILE as your Emacs init file instead of + `~/.xemacs/init.el'/`~/.emacs'. `-user-init-directory DIRECTORY' Use DIRECTORY as the location of your early package hierarchies @@ -282,8 +283,10 @@ order in which they appear in this table. `-user USER' `-u USER' - Equivalent to `-user-init-file ~USER/.emacs -user-init-directory - ~USER/.xemacs'. + Equivalent to `-user-init-file ~USER/.xemacs/init.el + -user-init-directory ~USER/.xemacs', or `-user-init-file + ~USER/.emacs -user-init-directory ~USER/.xemacs'. whichever init + file comes first. *Note Init File::. Note that the init file can get access to the command line argument values as the elements of a list in the variable `command-line-args'. @@ -445,8 +448,8 @@ XEmacs paths. Early package hierarchies are at the very front, late ones somewhere in the middle, and last hierarchies are (you guessed it) last. - By default, XEmacs expects an early package hierarchy in the a -subdirectory `.xemacs' of the user's home directory. + By default, XEmacs expects an early package hierarchy in the +subdirectory `.xemacs/xemacs-packages' of the user's home directory. Moreover, XEmacs expects late hierarchies in the subdirectories `site-packages', `mule-packages', and `xemacs-packages' (in that order) @@ -459,7 +462,7 @@ prefer directories found there. By default, XEmacs does not have a pre-configured last package hierarchy. Last hierarchies are primarily for using package hierarchies of outdated versions of XEmacs as a fallback option. For example, it is -possible to run XEmacs 21.0 with the 20.4 package hierarchy as a last +possible to run XEmacs 21 with the 20.4 package hierarchy as a last hierarchy. It is possible to specify at configure-time the location of the @@ -565,7 +568,7 @@ use the tutorial, run Emacs and type `Control-h t' menu. XEmacs comes with many translations of tutorial. If your XEmacs is -with MULE and you set up language environment correctly, XEmacs choses +with MULE and you set up language environment correctly, XEmacs chooses right tutorial when available (*note Language Environments::). If you want specific translation, give `C-h t' a prefix argument, like `C-u C-h t'. diff --git a/info/xemacs.info-4 b/info/xemacs.info-4 index 34adf30..f43814a 100644 --- a/info/xemacs.info-4 +++ b/info/xemacs.info-4 @@ -681,7 +681,7 @@ Help Summary `C-h a REGEXP ' Display a list of functions and variables whose names match REGEXP - (`heper-apropos'). + (`hyper-apropos'). `C-h A REGEXP' Show all commands whose names contain matches for REGEXP @@ -852,7 +852,7 @@ Apropos Show only symbols that are names of commands (`command-apropos'). `M-x apropos REGEXP' - Show all symbols whose names comtain matches for REGEXP. + Show all symbols whose names contain matches for REGEXP. A more sophisticated sort of question to ask is, "What are the commands for working with files?" To ask this question, type `C-h a diff --git a/info/xemacs.info-6 b/info/xemacs.info-6 index dbf16a3..8d7f9e5 100644 --- a/info/xemacs.info-6 +++ b/info/xemacs.info-6 @@ -308,7 +308,7 @@ character, , , or another control character that is special within searches (`C-q', `C-w', `C-r', `C-s', or `C-y'). Sometimes you search for `FOO' and find it, but were actually -looking for a different occurance of it. To move to the next occurrence +looking for a different occurence of it. To move to the next occurrence of the search string, type another `C-s'. Do this as often as necessary. If you overshoot, you can cancel some `C-s' characters with . diff --git a/info/xemacs.info-8 b/info/xemacs.info-8 index 2f1618a..b7e55e2 100644 --- a/info/xemacs.info-8 +++ b/info/xemacs.info-8 @@ -917,10 +917,10 @@ buffer, the following special commands apply to that buffer: Like `d' but move up afterwards instead of down. `s' - Request to save the buffer. An `S' befor the buffer name on a line - indicates the request. Requested saves actually take place when - you use the `x' command. You can request both saving and deletion - for the same buffer. + Request to save the buffer. An `S' before the buffer name on a + line indicates the request. Requested saves actually take place + when you use the `x' command. You can request both saving and + deletion for the same buffer. `~' Mark buffer "unmodified". The command `~' does this immediately diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 4637c5e..9814e9a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -11,6 +11,103 @@ * update-elc.sh (ignore_dirs): Ignore lisp/utf-2000 subdirectory. +2000-07-19 Martin Buchholz + + * XEmacs 21.2.35 is released. + +2000-07-12 Martin Buchholz + + * gnuserv.c: + (handle_internet_request): + (handle_unix_request): + (internet_init): + Use socklen_t instead of int or size_t. + +2000-07-11 Martin Buchholz + + * hexl.c (usage): Use full ANSI C prototypes. + +2000-07-05 Craig Lanning + + * Makefile.in.in (INSTALL_DATA): + * Makefile.in.in (UTILITIES): + * Makefile.in.in (GETOPTDEPS): + * Makefile.in.in (i): + mingw support: don't try to build gnuclient, add + support for building and installing minitar + +2000-06-10 Ben Wing + + * Makefile.in.in (INSTALLABLES_BASE): + * Makefile.in.in (ootags_args): + * Makefile.in.in (yow): + Build i.exe. + Don't build run*.exe. + + * b2m.c: + * b2m.c (main): + * ellcc.c (main): + * etags.c: + * etags.c (main): + * etags.c (get_compressor_from_suffix): + * etags.c (process_file): + * etags.c (readline_internal): + * etags.c (etags_getcwd): + * etags.c (relative_filename): + * etags.c (absolute_filename): + * etags.c (filename_is_absolute): + * etags.c (canonicalize_filename): + * fakemail.c: + * fakemail.c (make_file_preface): + * getopt.c: + * getopt.h: + * gnuclient.c: + * gnuclient.c (filename_expand): + * gnuserv.h: + * gnuserv.h (PATCHLEVEL): + * hexl.c: + * hexl.c (main): + * make-docfile.c: + * make-docfile.c (APPEND_BINARY): + * make-docfile.c (main): + * make-dump-id.c: + * mmencode.c: + * mmencode.c (fromqp): + * mmencode.c (main): + * movemail.c: + * movemail.c (main): + * movemail.c (popmail): + * ootags.c: + * ootags.c (main): + * ootags.c (readline_internal): + * ootags.c (etags_getcwd): + * ootags.c (absolute_filename): + * ootags.c (filename_is_absolute): + * ootags.c (canonicalize_filename): + * pop.c: + * pop.c (DONT_ENCAPSULATE): + * pop.c (pop_open): + * pop.c (socket_connection): + * pop.c (pop_trash): + * profile.c (gettimeofday): + * wakeup.c: + * yow.c (rootrelativepath): + Remove MSDOS support, converting to WIN32_NATIVE where necessary. + WINDOWSNT -> WIN32_NATIVE. + __CYGWIN32__ -> CYGWIN. + DOS_NT -> WIN32_NATIVE. + Remove unused NO_SHORTNAMES. + Changes for removed nt\inc. + +2000-06-07 Ben Wing + + * run.c, run.h, run.rc: Removed. We no longer need these for + building runxemacs.exe, and it's questionable at best whether + rungnuclient.exe was ever used or is even needed. The correct + solution is just to make gnuclient.exe a windows program and + use the gnuattach script to run 'i gnuclient.exe'. Not that + gnuclient currently works under Windows native in any case. + 2000-05-28 Martin Buchholz * XEmacs 21.2.34 is released. diff --git a/lib-src/Makefile.in.in b/lib-src/Makefile.in.in index 44195bd..2a64d1d 100644 --- a/lib-src/Makefile.in.in +++ b/lib-src/Makefile.in.in @@ -75,33 +75,25 @@ INSTALL_DATA = @INSTALL_DATA@ ## Things that a user might actually run, ## which should be installed in bindir. -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE INSTALLABLES_BASE = etags ctags b2m ootags #else INSTALLABLES_BASE = etags ctags b2m gnuclient ootags #endif INSTALLABLE_SCRIPTS = rcs-checkin gnudoit gnuattach #ifdef HAVE_SHLIB -#ifdef HAVE_MS_WINDOWS -INSTALLABLES = $(INSTALLABLES_BASE) runxemacs rungnuclient ellcc -#else INSTALLABLES = $(INSTALLABLES_BASE) ellcc -#endif -#else -#ifdef HAVE_MS_WINDOWS -INSTALLABLES = $(INSTALLABLES_BASE) runxemacs rungnuclient #else INSTALLABLES = $(INSTALLABLES_BASE) #endif -#endif ## Things that Emacs runs internally, or during the build process, ## which should not be installed in bindir. -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE UTILITIES= make-path wakeup profile make-docfile digest-doc \ - sorted-doc movemail cvtmail yow hexl \ - mmencode + sorted-doc movemail cvtmail yow i hexl \ + mmencode minitar #else UTILITIES= make-path wakeup profile make-docfile digest-doc \ sorted-doc movemail cvtmail fakemail yow hexl \ @@ -290,7 +282,7 @@ alloca.o: ${top_srcdir}/src/alloca.c regex.o: ${srcdir}/../src/regex.c ${top_srcdir}/src/regex.h $(CC) -c `echo $(cflags) | sed 's/-Demacs/ /'` \ - -DINHIBIT_STRING_HEADER ${top_srcdir}/src/regex.c + -DINHIBIT_STRING_HEADER ${top_srcdir}/src/regex.c etags_args = $(cflags) -DVERSION='"${version}"' ${srcdir}/etags.c \ $(GETOPTOBJS) regex.o $(ldflags) @@ -305,23 +297,6 @@ ellcc_deps = ${srcdir}/ellcc.c ellcc.h ../src/config.h ellcc: ${ellcc_deps} $(CC) ${ellcc_args} -o $@ -run_args = $(cflags) -DVERSION='"${version}"' ${srcdir}/run.c \ - $(ldflags) -Wl,--subsystem,windows -e _mainCRTStartup -run_deps = ${srcdir}/run.c ${srcdir}/run.h ${srcdir}/run.rc \ - ${srcdir}/../nt/xemacs.ico ${srcdir}/../nt/file.ico \ - ${srcdir}/../nt/lisp.ico - -run: ${run_deps} - windres --include-dir ${srcdir}/../nt -i run.rc -o run_res.o - $(CC) run_res.o ${run_args} -o $@ - strip $@.exe - -runxemacs: run - cp run.exe $@.exe - -rungnuclient: run - cp run.exe $@.exe - ootags_args = $(cflags) -DVERSION='"${version}"' ${srcdir}/ootags.c \ $(GETOPTOBJS) regex.o $(ldflags) ootags_deps = ${srcdir}/ootags.c $(GETOPTDEPS) regex.o ../src/config.h @@ -366,6 +341,12 @@ fakemail: ${srcdir}/fakemail.c ../src/config.h yow: ${srcdir}/yow.c ../src/paths.h $(CC) $(cflags) ${srcdir}/yow.c $(ldflags) -o $@ +i: ${srcdir}/i.c + $(CC) $(cflags) ${srcdir}/i.c $(ldflags) -o $@ + +minitar: ${srcdir}/../nt/minitar.c + $(CC) $(cflags) ${srcdir}/../nt/minitar.c $(ldflags) -lz -o $@ + hexl: ${srcdir}/hexl.c $(CC) $(cflags) ${srcdir}/hexl.c $(ldflags) -o $@ diff --git a/lib-src/b2m.c b/lib-src/b2m.c index d92ea5a..b1941b1 100644 --- a/lib-src/b2m.c +++ b/lib-src/b2m.c @@ -30,7 +30,7 @@ #include #include #include -#ifdef MSDOS +#ifdef WIN32_NATIVE #include #endif @@ -88,17 +88,12 @@ main (int argc, char *argv[]) char *labels = NULL, *p, *today; struct linebuffer data; -#ifdef MSDOS +#ifdef WIN32_NATIVE _fmode = O_BINARY; /* all of files are treated as binary files */ -#if __DJGPP__ > 1 if (!isatty (fileno (stdout))) setmode (fileno (stdout), O_BINARY); if (!isatty (fileno (stdin))) setmode (fileno (stdin), O_BINARY); -#else /* not __DJGPP__ > 1 */ - (stdout)->_flag &= ~_IOTEXT; - (stdin)->_flag &= ~_IOTEXT; -#endif /* not __DJGPP__ > 1 */ #endif progname = argv[0]; diff --git a/lib-src/ellcc.c b/lib-src/ellcc.c index 0207a92..54a2c8b 100644 --- a/lib-src/ellcc.c +++ b/lib-src/ellcc.c @@ -149,7 +149,7 @@ main (int argc, char *argv[]) prog_argc = argc; prog_argv = argv; -#if defined(MSDOS) || defined(WINDOWSNT) +#if defined(WIN32_NATIVE) tmp = strrchr (argv[0], '\\'); if (tmp != (char *)0) tmp++; diff --git a/lib-src/etags.c b/lib-src/etags.c index 6aa6055..d3cff3f 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -59,48 +59,29 @@ char pot_etags_version[] = "@(#) pot revision number is 13.44"; # define _GNU_SOURCE 1 /* enables some compiler checks on GNU */ #endif -#ifdef MSDOS -# undef MSDOS -# define MSDOS TRUE -# include -# include -# include -# ifndef HAVE_CONFIG_H -# define DOS_NT -# include -# endif -#else -# define MSDOS FALSE -#endif /* MSDOS */ - -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE # include # include # include # include # include # define MAXPATHLEN _MAX_PATH -# ifdef HAVE_CONFIG_H -# undef HAVE_NTGUI -# else -# define DOS_NT -# endif /* not HAVE_CONFIG_H */ # ifndef HAVE_GETCWD # define HAVE_GETCWD # endif /* undef HAVE_GETCWD */ -#else /* !WINDOWSNT */ +#else /* !WIN32_NATIVE */ # ifdef STDC_HEADERS # include # include # else extern char *getenv (); # endif -#endif /* !WINDOWSNT */ +#endif /* !WIN32_NATIVE */ #ifdef HAVE_UNISTD_H # include #else -# if defined (HAVE_GETCWD) && !WINDOWSNT +# if defined (HAVE_GETCWD) && !defined (WIN32_NATIVE) extern char *getcwd (char *buf, size_t size); # endif #endif /* HAVE_UNISTD_H */ @@ -889,9 +870,9 @@ main (argc, argv) bool got_err; #endif -#ifdef DOS_NT +#ifdef WIN32_NATIVE _fmode = O_BINARY; /* all of files are treated as binary files */ -#endif /* DOS_NT */ +#endif /* WIN32_NATIVE */ progname = argv[0]; nincluded_files = 0; @@ -1075,12 +1056,12 @@ main (argc, argv) if (streq (tagfile, "-")) { tagf = stdout; -#ifdef DOS_NT +#ifdef WIN32_NATIVE /* Switch redirected `stdout' to binary mode (setting `_fmode' doesn't take effect until after `stdout' is already open). */ if (!isatty (fileno (stdout))) setmode (fileno (stdout), O_BINARY); -#endif /* DOS_NT */ +#endif /* WIN32_NATIVE */ } else tagf = fopen (tagfile, append_to_tagfile ? "a" : "w"); @@ -1210,7 +1191,7 @@ get_compressor_from_suffix (file, extptr) char *slash, *suffix; /* This relies on FN to be after canonicalize_filename, - so we don't need to consider backslashes on DOS_NT. */ + so we don't need to consider backslashes on WIN32_NATIVE. */ slash = etags_strrchr (file, '/'); suffix = etags_strrchr (file, '.'); if (suffix == NULL || suffix < slash) @@ -1220,13 +1201,13 @@ get_compressor_from_suffix (file, extptr) suffix += 1; /* Let those poor souls who live with DOS 8+3 file name limits get some solace by treating foo.cgz as if it were foo.c.gz, etc. - Only the first do loop is run if not MSDOS */ + */ do { for (compr = compressors; compr->suffix != NULL; compr++) if (streq (compr->suffix, suffix)) return compr; - if (!MSDOS) + if (1) /* !MSDOS */ break; /* do it only once: not really a loop */ if (extptr != NULL) *extptr = ++suffix; @@ -1373,22 +1354,7 @@ process_file (file) compressed_name = concat (file, ".", compr->suffix); if (stat (compressed_name, &stat_buf) != 0) { - if (MSDOS) - { - char *suf = compressed_name + strlen (file); - size_t suflen = strlen (compr->suffix) + 1; - for ( ; suf[1]; suf++, suflen--) - { - memmove (suf, suf + 1, suflen); - if (stat (compressed_name, &stat_buf) == 0) - { - real_name = compressed_name; - break; - } - } - if (real_name != NULL) - break; - } /* MSDOS */ + /* XEmacs: delete MSDOS code */ free (compressed_name); compressed_name = NULL; } @@ -5031,7 +4997,7 @@ readline_internal (lbp, stream) if (p > buffer && p[-1] == '\r') { p -= 1; -#ifdef DOS_NT +#ifdef WIN32_NATIVE /* Assume CRLF->LF translation will be performed by Emacs when loading this file, so CRs won't appear in the buffer. It would be cleaner to compensate within Emacs; @@ -5287,19 +5253,6 @@ etags_getcwd () return path; #else /* not HAVE_GETCWD */ -#ifdef MSDOS - char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */ - - getwd (path); - - for (p = path; *p != '\0'; p++) - if (*p == '\\') - *p = '/'; - else - *p = lowcase (*p); - - return strdup (path); -#else /* not MSDOS */ linebuffer path; FILE *pipe; @@ -5310,7 +5263,6 @@ etags_getcwd () pclose (pipe); return path.buffer; -#endif /* not MSDOS */ #endif /* not HAVE_GETCWD */ } @@ -5330,7 +5282,7 @@ relative_filename (file, dir) while (*fp++ == *dp++) continue; fp--, dp--; /* back to the first differing char */ -#ifdef DOS_NT +#ifdef WIN32_NATIVE if (fp == afn && afn[0] != '/') /* cannot build a relative name */ return afn; #endif @@ -5364,7 +5316,7 @@ absolute_filename (file, dir) if (filename_is_absolute (file)) res = savestr (file); -#ifdef DOS_NT +#ifdef WIN32_NATIVE /* We don't support non-absolute file names with a drive letter, like `d:NAME' (it's too much hassle). */ else if (file[1] == ':') @@ -5388,8 +5340,8 @@ absolute_filename (file, dir) while (cp >= res && !filename_is_absolute (cp)); if (cp < res) cp = slashp; /* the absolute name begins with "/.." */ -#ifdef DOS_NT - /* Under MSDOS and NT we get `d:/NAME' as absolute +#ifdef WIN32_NATIVE + /* Under Windows we get `d:/NAME' as absolute file name, so the luser could say `d:/../NAME'. We silently treat this as `d:/NAME'. */ else if (cp[0] != '/') @@ -5444,7 +5396,7 @@ filename_is_absolute (fn) char *fn; { return (fn[0] == '/' -#ifdef DOS_NT +#ifdef WIN32_NATIVE || (isalpha(fn[0]) && fn[1] == ':' && fn[2] == '/') #endif ); @@ -5455,7 +5407,7 @@ static void canonicalize_filename (fn) register char *fn; { -#ifdef DOS_NT +#ifdef WIN32_NATIVE /* Canonicalize drive letter case. */ if (islower (fn[0]) && fn[1] == ':') fn[0] = toupper (fn[0]); diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c index a78036e..0bf4ca4 100644 --- a/lib-src/fakemail.c +++ b/lib-src/fakemail.c @@ -46,14 +46,6 @@ main (int argc, char *argv[]) return 1; } #else /* not BSD 4.2 (or newer) */ -#ifdef MSDOS -int -main (int argc, char *argv[]) -{ - return 0; -} -#else /* not MSDOS */ -/* This conditional contains all the rest of the file. */ /* These are defined in config in some versions. */ @@ -322,7 +314,7 @@ make_file_preface (void) /* the_date has an unwanted newline at the end */ date_length = strlen (the_date) - 1; the_date[date_length] = '\0'; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE temp = "(null)"; #else temp = cuserid ((char *) NULL); @@ -673,5 +665,4 @@ main (int argc, char *argv[]) return close_the_streams (); } -#endif /* not MSDOS */ #endif /* not BSD 4.2 (or newer) */ diff --git a/lib-src/getopt.c b/lib-src/getopt.c index 21231de..51d69cf 100644 --- a/lib-src/getopt.c +++ b/lib-src/getopt.c @@ -73,7 +73,7 @@ USA. */ #endif #endif -#if defined (WIN32) && !defined (__CYGWIN32__) +#if defined (WIN32_NATIVE) && !defined (CYGWIN) /* It's not Unix, really. See? Capital letters. */ #include #undef getpid diff --git a/lib-src/getopt.h b/lib-src/getopt.h index d5ad6a3..6bf8e08 100644 --- a/lib-src/getopt.h +++ b/lib-src/getopt.h @@ -98,7 +98,7 @@ struct option #define required_argument 1 #define optional_argument 2 -#if defined (__GNU_LIBRARY__) || defined (__cplusplus) +#if defined (__GNU_LIBRARY__) || defined (__cplusplus) || defined (CYGWIN) /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ diff --git a/lib-src/gnuclient.c b/lib-src/gnuclient.c index 6d96b47..0f57c85 100644 --- a/lib-src/gnuclient.c +++ b/lib-src/gnuclient.c @@ -27,6 +27,17 @@ Boston, MA 02111-1307, USA. Please mail bugs and suggestions to the XEmacs maintainer. */ +/* #### This file should be a windows-mode, not console-mode program under + Windows. (i.e. its entry point should be WinMain.) gnuattach functionality, + to the extent it's used at all, should be retrieved using a script that + calls the i.exe wrapper program, to obtain stdio handles. + + #### For that matter, both the functionality of gnuclient and gnuserv + should be merged into XEmacs itself using a -remote arg, just like + Netscape and other modern programs. + + --ben */ + /* * This file incorporates new features added by Bob Weiner , * Darrell Kindred and Arup Mukherjee . @@ -48,7 +59,6 @@ static char rcsid [] = "!Header: gnuclient.c,v 2.2 95/12/12 01:39:21 wing nene ! #include #include #include -#define DONT_ENCAPSULATE #include #ifdef HAVE_STRING_H @@ -190,7 +200,7 @@ filename_expand (char *fullpath, char *filename) /* Absolute (unix-style) pathname. Do nothing */ strcat (fullpath, filename); } -#ifdef __CYGWIN32__ +#ifdef CYGWIN else if (filename[0] && filename[0] == '\\' && filename[1] && filename[1] == '\\') { diff --git a/lib-src/gnuserv.c b/lib-src/gnuserv.c index a1e74ab..f792f74 100644 --- a/lib-src/gnuserv.c +++ b/lib-src/gnuserv.c @@ -15,8 +15,8 @@ Please mail bugs and suggestions to the author at the above address. */ -/* HISTORY - * 11-Nov-1990 bristor@simba +/* HISTORY + * 11-Nov-1990 bristor@simba * Added EOT stuff. */ @@ -84,7 +84,7 @@ void ipc_exit (int stat) { msgctl (ipc_qid,IPC_RMID,0); - + if (ipc_wpid != 0) kill (ipc_wpid, SIGKILL); @@ -102,7 +102,7 @@ ipc_handle_signal(int sig) } /* ipc_handle_signal */ -/* +/* ipc_spawn_watchdog -- spawn a watchdog task to clean up the message queue should the server process die. */ @@ -190,7 +190,7 @@ handle_ipc_request (struct msgbuf *msgp) msgctl (ipc_qid, IPC_STAT, &msg_st); strncpy (buf, msgp->mtext, len); buf[len] = '\0'; /* terminate */ - + printf ("%d %s", ipc_qid, buf); fflush (stdout); @@ -210,7 +210,7 @@ handle_ipc_request (struct msgbuf *msgp) /* read in "n/m:" (n=client fd, m=message length) */ - while (offset < (GSERV_BUFSZ-1) && + while (offset < (GSERV_BUFSZ-1) && ((len = read (0, buf + offset, 1)) > 0) && buf[offset] != ':') { @@ -237,7 +237,7 @@ handle_ipc_request (struct msgbuf *msgp) exit (1); } - /* Send this string off, but only if we have enough space */ + /* Send this string off, but only if we have enough space */ if (GSERV_BUFSZ > total) { @@ -291,7 +291,7 @@ echo_request (int s) int len; printf("%d ",s); - + /* read until we get a newline or no characters */ while ((len = recv(s,buf,GSERV_BUFSZ-1,0)) > 0) { buf[len] = '\0'; @@ -309,7 +309,7 @@ echo_request (int s) fprintf(stderr,"%s: unable to recv\n",progname); exit(1); } /* if */ - + } /* echo_request */ @@ -327,7 +327,7 @@ handle_response (void) int result_len; /* read in "n/m:" (n=client fd, m=message length) */ - while (offset < GSERV_BUFSZ && + while (offset < GSERV_BUFSZ && ((len = read(0,buf+offset,1)) > 0) && buf[offset] != ':') { offset += len; @@ -338,7 +338,7 @@ handle_response (void) fprintf(stderr,"%s: unable to read\n",progname); exit(1); } - + /* parse the response from emacs, getting client fd & result length */ buf[offset] = '\0'; sscanf(buf,"%d/%d", &s, &result_len); @@ -371,7 +371,7 @@ handle_response (void) /* send the newline */ buf[1] = '\0'; send_string(s,buf); - close(s); + close(s); } /* handle_response */ #endif /* INTERNET_DOMAIN_SOCKETS || UNIX_DOMAIN_SOCKETS */ @@ -390,9 +390,9 @@ struct entry *permitted_hosts[TABLE_SIZE]; # include static Xauth *server_xauth = NULL; -#endif +#endif -static int +static int timed_read (int fd, char *buf, int max, int timeout, int one_line) { fd_set rmask; @@ -400,13 +400,13 @@ timed_read (int fd, char *buf, int max, int timeout, int one_line) char c = 0; int nbytes = 0; int r; - + tv.tv_sec = timeout; tv.tv_usec = 0; FD_ZERO(&rmask); FD_SET(fd, &rmask); - + do { r = select(fd + 1, &rmask, NULL, NULL, &tv); @@ -444,8 +444,8 @@ timed_read (int fd, char *buf, int max, int timeout, int one_line) return nbytes; } - - + + /* permitted -- return whether a given host is allowed to connect to the server. @@ -456,7 +456,7 @@ permitted (u_long host_addr, int fd) int key; struct entry *entry; - char auth_protocol[128]; + char auth_protocol[128]; char buf[1024]; int auth_data_len; @@ -465,17 +465,17 @@ permitted (u_long host_addr, int fd) /* we are checking permission on a real connection */ /* Read auth protocol name */ - + if (timed_read(fd, auth_protocol, AUTH_NAMESZ, AUTH_TIMEOUT, 1) <= 0) return FALSE; if (strcmp (auth_protocol, DEFAUTH_NAME) && strcmp (auth_protocol, MCOOKIE_NAME)) { - printf ("authentication protocol (%s) from client is invalid...\n", + printf ("authentication protocol (%s) from client is invalid...\n", auth_protocol); printf ("... Was the client an old version of gnuclient/gnudoit?\004\n"); - + return FALSE; } @@ -493,17 +493,17 @@ permitted (u_long host_addr, int fd) if (timed_read(fd, buf, auth_data_len, AUTH_TIMEOUT, 0) != auth_data_len) return FALSE; - + #ifdef AUTH_MAGIC_COOKIE if (server_xauth && server_xauth->data && !memcmp(buf, server_xauth->data, auth_data_len)) { return TRUE; } -#else +#else printf ("client tried Xauth, but server is not compiled with Xauth\n"); #endif - + /* * auth failed, but allow this to fall through to the GNU_SECURE * protocol.... @@ -512,7 +512,7 @@ permitted (u_long host_addr, int fd) printf ("Xauth authentication failed, trying GNU_SECURE auth...\004\n"); } - + /* Other auth protocols go here, and should execute only if the * auth_protocol name matches. */ @@ -521,30 +521,30 @@ permitted (u_long host_addr, int fd) /* Now, try the old GNU_SECURE stuff... */ - + /* First find the hash key */ key = HASH(host_addr) % TABLE_SIZE; - + /* Now check the chain for that hash key */ for(entry=permitted_hosts[key]; entry != NULL; entry=entry->next) - if (host_addr == entry->host_addr) + if (host_addr == entry->host_addr) return(TRUE); - + return(FALSE); } /* permitted */ -/* +/* add_host -- add the given host to the list of permitted hosts, provided it isn't already there. -*/ +*/ static void add_host (u_long host_addr) { int key; struct entry *new_entry; - + if (!permitted(host_addr, -1)) { if ((new_entry = (struct entry *) malloc(sizeof(struct entry))) == NULL) { @@ -578,7 +578,7 @@ setup_table (void) char hostname[HOSTNAMSZ]; u_int host_addr; int i, hosts=0; - + /* Make sure every entry is null */ for (i=0; is_port; - + /* Create the listen socket. */ if ((ls = socket (AF_INET,SOCK_STREAM, 0)) == -1) { @@ -662,7 +662,7 @@ internet_init (void) fprintf(stderr,"%s: unable to create socket\n",progname); exit(1); } /* if */ - + /* Bind the listen address to the socket. */ if (bind(ls,(struct sockaddr *) &server,sizeof(struct sockaddr_in)) == -1) { @@ -672,7 +672,7 @@ internet_init (void) } /* if */ /* Initiate the listen on the socket so remote users - * can connect. + * can connect. */ if (listen(ls,20) == -1) { @@ -694,10 +694,10 @@ static void handle_internet_request (int ls) { int s; - size_t addrlen = sizeof(struct sockaddr_in); + socklen_t addrlen = sizeof (struct sockaddr_in); struct sockaddr_in peer; /* for peer socket address */ - memset((char *)&peer,0,sizeof(struct sockaddr_in)); + memset (&peer, '\0', sizeof (peer)); if ((s = accept(ls,(struct sockaddr *)&peer, &addrlen)) == -1) { @@ -705,7 +705,7 @@ handle_internet_request (int ls) fprintf(stderr,"%s: unable to accept\n",progname); exit(1); } /* if */ - + /* Check that access is allowed - if not return crud to the client */ if (!permitted(peer.sin_addr.s_addr, s)) { @@ -717,7 +717,7 @@ handle_internet_request (int ls) } /* if */ echo_request(s); - + } /* handle_internet_request */ #endif /* INTERNET_DOMAIN_SOCKETS */ @@ -732,7 +732,7 @@ unix_init (void) { int ls; /* socket descriptor */ struct sockaddr_un server; /* unix socket address */ - int bindlen; + socklen_t bindlen; if ((ls = socket(AF_UNIX,SOCK_STREAM, 0)) < 0) { @@ -772,7 +772,7 @@ unix_init (void) #else bindlen = strlen (server.sun_path) + sizeof (server.sun_family); #endif - + if (bind(ls,(struct sockaddr *)&server,bindlen) < 0) { perror(progname); @@ -791,7 +791,7 @@ unix_init (void) /* #### there are also better ways of dealing with this when sigvec() is present. */ #if defined (HAVE_SIGPROCMASK) - { + { sigset_t _mask; sigemptyset (&_mask); sigaddset (&_mask, SIGPIPE); @@ -814,7 +814,7 @@ static void handle_unix_request (int ls) { int s; - size_t len = sizeof(struct sockaddr_un); + socklen_t len = sizeof (struct sockaddr_un); struct sockaddr_un server; /* for unix socket address */ server.sun_family = AF_UNIX; @@ -826,7 +826,7 @@ handle_unix_request (int ls) } /* if */ echo_request(s); - + } /* handle_unix_request */ #endif /* UNIX_DOMAIN_SOCKETS */ @@ -883,8 +883,8 @@ main (int argc, char *argv[]) FD_SET(uls, &rmask); if (ils >= 0) FD_SET(ils, &rmask); - - if (select(max2(fileno(stdin),max2(uls,ils)) + 1, &rmask, + + if (select(max2(fileno(stdin),max2(uls,ils)) + 1, &rmask, (fd_set *)NULL, (fd_set *)NULL, (struct timeval *)NULL) < 0) { perror(progname); diff --git a/lib-src/gnuserv.h b/lib-src/gnuserv.h index df53605..d9298c8 100644 --- a/lib-src/gnuserv.h +++ b/lib-src/gnuserv.h @@ -36,18 +36,13 @@ static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup a #define USE_TMPDIR -#define NO_SHORTNAMES - #define PATCHLEVEL 2 #define NO_SHORTNAMES /* gnuserv should not be compiled using SOCKS */ #define DO_NOT_SOCKSIFY +#define DONT_ENCAPSULATE #include -#undef read -#undef write -#undef open -#undef close #undef signal /* Define the communication method between server and clients: @@ -174,7 +169,7 @@ static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup a */ #ifndef DONT_USE_LITOUT #if !defined(HAVE_TERMIO) && !defined(HAVE_TERMIOS) && !defined(VMS) -#if !defined(MSDOS) && !defined(BSD4_1) +#if !defined(BSD4_1) #define USE_LITOUT #endif #endif diff --git a/lib-src/hexl.c b/lib-src/hexl.c index a6dddd9..b254d85 100644 --- a/lib-src/hexl.c +++ b/lib-src/hexl.c @@ -4,14 +4,16 @@ #include #include -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #include #include #endif #if __STDC__ || defined(STDC_HEADERS) #include +#ifdef HAVE_UNISTD_H #include +#endif #include #endif @@ -142,7 +144,7 @@ main (int argc, char *argv[]) { char buf[18]; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE _setmode (_fileno (stdout), O_BINARY); #endif for (;;) @@ -185,7 +187,7 @@ main (int argc, char *argv[]) } else { -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE _setmode (_fileno (fp), O_BINARY); #endif address = 0; @@ -242,7 +244,7 @@ main (int argc, char *argv[]) } void -usage () +usage (void) { (void) fprintf (stderr, "usage: %s [-de] [-iso]\n", progname); exit (1); diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index d971a11..2ccf4eb 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -46,40 +46,38 @@ Boston, MA 02111-1307, USA. */ #include #if __STDC__ || defined(STDC_HEADERS) #include +#ifdef HAVE_UNISTD_H #include +#endif #include #include #endif -#if defined(MSDOS) || defined(__CYGWIN32__) +#ifdef CYGWIN #include -#endif /* MSDOS */ -#ifdef WINDOWSNT +#endif +#ifdef WIN32_NATIVE #include #include #include #include -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ +#ifndef WIN32_NATIVE #include +#endif /* not WIN32_NATIVE */ -#if defined(DOS_NT) || defined(__CYGWIN32__) +#if defined(WIN32_NATIVE) || defined(CYGWIN) #define READ_TEXT "rt" #define READ_BINARY "rb" #define WRITE_BINARY "wb" #define APPEND_BINARY "ab" -#else /* not DOS_NT */ +#else /* not WIN32_NATIVE */ #define READ_TEXT "r" #define READ_BINARY "r" #define WRITE_BINARY "w" #define APPEND_BINARY "a" -#endif /* not DOS_NT */ - -#ifdef MSDOS -/* s/msdos.h defines this as sys_chdir, but we're not linking with the - file where that function is defined. */ -#undef chdir -#endif +#endif /* not WIN32_NATIVE */ /* Stdio stream for output to the DOC file. */ static FILE *outfile; @@ -191,19 +189,10 @@ main (int argc, char **argv) outfile = stdout; /* Don't put CRs in the DOC file. */ -#ifdef MSDOS - _fmode = O_BINARY; -#if 0 /* Suspicion is that this causes hanging. - So instead we require people to use -o on MSDOS. */ - (stdout)->_flag &= ~_IOTEXT; - _setmode (fileno (stdout), O_BINARY); -#endif - outfile = 0; -#endif /* MSDOS */ -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE _fmode = O_BINARY; _setmode (fileno (stdout), O_BINARY); -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ /* If first two args are -o FILE, output to FILE. */ i = 1; diff --git a/lib-src/make-dump-id.c b/lib-src/make-dump-id.c index 81df7da..6ad213d 100644 --- a/lib-src/make-dump-id.c +++ b/lib-src/make-dump-id.c @@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */ #include #include "../src/systime.h" -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #include /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ diff --git a/lib-src/mmencode.c b/lib-src/mmencode.c index 6287ca2..96fb29b 100644 --- a/lib-src/mmencode.c +++ b/lib-src/mmencode.c @@ -385,7 +385,7 @@ fromqp(FILE *infile, FILE *outfile, char **boundaries, int *boundaryct) putc(c1<<4 | c2, outfile); } } else { -#ifdef MSDOS +#ifdef WIN32_NATIVE if (*s == '\n') putc('\r', outfile); /* insert CR for binary-mode write */ #endif @@ -442,7 +442,8 @@ MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. */ -#ifdef MSDOS +#ifdef WIN32_NATIVE +#include #include #endif @@ -487,7 +488,7 @@ int main(int argc, char *argv[]) exit(-1); } } else { -#ifdef MSDOS +#ifdef WIN32_NATIVE if (encode) fp = fopen(argv[i], "rb"); else @@ -497,16 +498,16 @@ int main(int argc, char *argv[]) } /* else */ #else fp = fopen(argv[i], "r"); -#endif /* MSDOS */ +#endif /* WIN32_NATIVE */ if (!fp) { perror(argv[i]); exit(-1); } } } -#ifdef MSDOS +#ifdef WIN32_NATIVE if (fp == stdin) setmode(fileno(fp), O_BINARY); -#endif /* MSDOS */ +#endif /* WIN32_NATIVE */ if (which == BASE64) { if (encode) { to64(fp, fpo, portablenewlines); diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 6fa783e..7a9dd77 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -69,7 +69,7 @@ Boston, MA 02111-1307, USA. #include #include "../src/sysfile.h" #include "../src/syswait.h" -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE #include "../src/systime.h" #endif #include @@ -87,10 +87,6 @@ extern int optind, opterr; char * strerror (int errnum); #endif /* HAVE_STRERROR */ -#ifdef MSDOS -#undef access -#endif /* MSDOS */ - #ifndef DIRECTORY_SEP #define DIRECTORY_SEP '/' #endif @@ -98,7 +94,7 @@ char * strerror (int errnum); #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) #endif -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #undef access #undef unlink #define fork() 0 @@ -110,7 +106,7 @@ char * strerror (int errnum); properly - make sure it does before you enable this! */ #define DISABLE_DIRECT_ACCESS #include -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ #if defined (HAVE_UNISTD_H) #include @@ -343,7 +339,7 @@ main (int argc, char *argv[]) exit (retcode); } -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE setuid (getuid ()); #endif #endif /* MAIL_USE_POP */ @@ -709,7 +705,7 @@ xmalloc (unsigned int size) #ifdef MAIL_USE_POP -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE #include #include #include @@ -718,7 +714,7 @@ xmalloc (unsigned int size) #include #endif #include -#include +#include "../src/syspwd.h" #define POP_ERROR (-1) #define POP_RETRIEVED (0) @@ -774,7 +770,7 @@ popmail (char *user, char *outfile, char *password) error ("Error in open: %s, %s", strerror (errno), outfile); return (1); } -#if !defined(__CYGWIN32__) && !defined(WINDOWSNT) +#if !defined(CYGWIN) && !defined(WIN32_NATIVE) fchown (mbfi, getuid (), (gid_t) -1); #endif diff --git a/lib-src/ootags.c b/lib-src/ootags.c index 80b4cd0..fbeb766 100644 --- a/lib-src/ootags.c +++ b/lib-src/ootags.c @@ -64,31 +64,18 @@ char pot_etags_version[] = "@(#) pot revision number is 12.28"; # define DEBUG FALSE #endif -#ifdef MSDOS -# include -# include -# include -# ifndef HAVE_CONFIG_H -# define DOS_NT -# include -# endif -#endif /* MSDOS */ - -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE # include # include # include # include # define MAXPATHLEN _MAX_PATH -# ifdef HAVE_CONFIG_H -# undef HAVE_NTGUI -# else -# define DOS_NT +# ifndef HAVE_CONFIG_H # define HAVE_GETCWD # endif /* not HAVE_CONFIG_H */ -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ -#if !defined (WINDOWSNT) && defined (STDC_HEADERS) +#if !defined (WIN32_NATIVE) && defined (STDC_HEADERS) #include #include #endif @@ -870,9 +857,9 @@ main (int argc, char *argv[]) bool got_err; #endif -#ifdef DOS_NT +#ifdef WIN32_NATIVE _fmode = O_BINARY; /* all of files are treated as binary files */ -#endif /* DOS_NT */ +#endif /* WIN32_NATIVE */ progname = argv[0]; nincluded_files = 0; @@ -1064,12 +1051,12 @@ main (int argc, char *argv[]) if (streq (tagfile, "-")) { tagf = stdout; -#ifdef DOS_NT +#ifdef WIN32_NATIVE /* Switch redirected `stdout' to binary mode (setting `_fmode' doesn't take effect until after `stdout' is already open). */ if (!isatty (fileno (stdout))) setmode (fileno (stdout), O_BINARY); -#endif /* DOS_NT */ +#endif /* WIN32_NATIVE */ } else tagf = fopen (tagfile, append_to_tagfile ? "a" : "w"); @@ -4960,7 +4947,7 @@ readline_internal (lbp, stream) if (p > buffer && p[-1] == '\r') { p -= 1; -#ifdef DOS_NT +#ifdef WIN32_NATIVE /* Assume CRLF->LF translation will be performed by Emacs when loading this file, so CRs won't appear in the buffer. It would be cleaner to compensate within Emacs; @@ -5216,19 +5203,6 @@ etags_getcwd () return path; #else /* not HAVE_GETCWD */ -#ifdef MSDOS - char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */ - - getwd (path); - - for (p = path; *p != '\0'; p++) - if (*p == '\\') - *p = '/'; - else - *p = lowcase (*p); - - return strdup (path); -#else /* not MSDOS */ linebuffer path; FILE *pipe; @@ -5239,7 +5213,6 @@ etags_getcwd () pclose (pipe); return path.buffer; -#endif /* not MSDOS */ #endif /* not HAVE_GETCWD */ } @@ -5289,7 +5262,7 @@ absolute_filename (file, dir) if (filename_is_absolute (file)) res = savestr (file); -#ifdef DOS_NT +#ifdef WIN32_NATIVE /* We don't support non-absolute file names with a drive letter, like `d:NAME' (it's too much hassle). */ else if (file[1] == ':') @@ -5313,8 +5286,8 @@ absolute_filename (file, dir) while (cp >= res && !filename_is_absolute (cp)); if (cp < res) cp = slashp; /* the absolute name begins with "/.." */ -#ifdef DOS_NT - /* Under MSDOS and NT we get `d:/NAME' as absolute +#ifdef WIN32_NATIVE + /* Under Windows we get `d:/NAME' as absolute file name, so the luser could say `d:/../NAME'. We silently treat this as `d:/NAME'. */ else if (cp[0] != '/') @@ -5369,7 +5342,7 @@ filename_is_absolute (fn) char *fn; { return (fn[0] == '/' -#ifdef DOS_NT +#ifdef WIN32_NATIVE || (isalpha(fn[0]) && fn[1] == ':' && fn[2] == '/') #endif ); @@ -5380,7 +5353,7 @@ void canonicalize_filename (fn) register char *fn; { -#ifdef DOS_NT +#ifdef WIN32_NATIVE for (; *fn != '\0'; fn++) if (*fn == '\\') *fn = '/'; diff --git a/lib-src/pop.c b/lib-src/pop.c index 0c12cbe..79160eb 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -21,6 +21,7 @@ Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #define NO_SHORTNAMES /* Tell config not to load remap.h */ +#define DONT_ENCAPSULATE #include #else #define MAIL_USE_POP @@ -28,16 +29,8 @@ Boston, MA 02111-1307, USA. */ #ifdef MAIL_USE_POP -#ifdef HAVE_CONFIG_H -/* Cancel these substitutions made in config.h */ -#undef open -#undef read -#undef write -#undef close -#endif - #include -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #include #undef SOCKET_ERROR #define RECV(s,buf,len,flags) recv(s,buf,len,flags) @@ -67,16 +60,22 @@ Boston, MA 02111-1307, USA. */ extern struct servent *hes_getservbyname (/* char *, char * */); #endif -#include +#include "../src/syspwd.h" +#ifndef WIN32_NATIVE #include +#endif #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include +#ifndef WIN32_NATIVE #include +#endif #include "../src/syswait.h" -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE #include "../src/systime.h" #endif #include @@ -103,7 +102,7 @@ extern char *krb_realmofhost (/* char * */); #endif /* ! KRB5 */ #endif /* KERBEROS */ -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE #if !defined(HAVE_H_ERRNO) || !defined(HAVE_CONFIG_H) extern int h_errno; #endif @@ -123,7 +122,7 @@ static char *find_crlf (char *); #define ERROR_MAX 80 /* a pretty arbitrary size */ #define POP_PORT 110 #define KPOP_PORT 1109 -#if defined(WINDOWSNT) || defined(__CYGWIN32__) +#if defined(WIN32_NATIVE) || defined(CYGWIN) #define POP_SERVICE "pop3" /* we don't want the POP2 port! */ #else #define POP_SERVICE "pop" @@ -184,7 +183,7 @@ pop_open (char *host, char *username, char *password, int flags) username = getenv ("USER"); if (! (username && *username)) { -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE username = getlogin (); if (! (username && *username)) { @@ -253,7 +252,7 @@ pop_open (char *host, char *username, char *password, int flags) if ((! password) && (! DONT_NEED_PASSWORD)) { -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE if (! (flags & POP_NO_GETPASS)) { password = getpass ("Enter POP password:"); @@ -932,7 +931,7 @@ pop_quit (popserver server) return (ret); } -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE static int have_winsock = 0; #endif @@ -977,7 +976,7 @@ socket_connection (char *host, int flags) int try_count = 0; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE { WSADATA winsockData; if (WSAStartup (0x101, &winsockData) == 0) @@ -1482,7 +1481,7 @@ pop_trash (popserver server) } } -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE if (have_winsock) WSACleanup (); #endif diff --git a/lib-src/profile.c b/lib-src/profile.c index b0ab560..382996e 100644 --- a/lib-src/profile.c +++ b/lib-src/profile.c @@ -41,7 +41,7 @@ static struct timeval TV1, TV2; static int watch_not_started = 1; /* flag */ static char time_string[30]; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #include /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ void diff --git a/lib-src/run.c b/lib-src/run.c deleted file mode 100644 index b808c4a..0000000 --- a/lib-src/run.c +++ /dev/null @@ -1,715 +0,0 @@ -/* run -- Wrapper program for console mode programs under Windows(TM) - * Copyright (C) 1998 Charles S. Wilson - * - * This program 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 - * of the License, or (at your option) any later version. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/* - * This program is based on the runemacs.c distributed with XEmacs 21.0 - * - * Simple program to start gnu-win32 X11 programs (and native XEmacs) - * with its console window hidden. - * - * This program is provided purely for convenience, since most users will - * use XEmacs in windowing (GUI) mode, and will not want to have an extra - * console window lying around. Ditto for desktop shortcuts to gnu-win32 - * X11 executables. - */ - - -#define WIN32 - -#include -#include -#include -#include -#include -#include - -#include "run.h" - -#if defined(__CYGWIN__) - #include - #include - #include - #include -WinMainCRTStartup() { mainCRTStartup(); } -#else - #include -#endif - - -char buffer[1024]; - -int WINAPI -WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, int nShow) -{ - int wait_for_child = FALSE; - int compact_invocation = FALSE; - DWORD ret_code = 0; - - - char execname[FILENAME_MAX]; - char execpath[MAX_PATH]; - char* argv[MAX_ARGS+1]; /* leave extra slot for compact_invocation argv[0] */ - int argc; - int i; - char exec[MAX_PATH + FILENAME_MAX + 100]; - char cmdline2[MAX_ARGS * MAX_PATH]; - -#ifdef Debug - int j; -#endif - - compact_invocation = get_exec_name_and_path(execname,execpath); - - if (compact_invocation) - { - argv[0] = execname; - argc = parse_cmdline_to_arg_array(&(argv[1]),cmdline); - argc++; - } - else - { - argc = parse_cmdline_to_arg_array(argv,cmdline); - if (argc >= 1) - strcpy(execname,argv[0]); - } - /* at this point, execpath is defined, as are argv[] and execname */ -#ifdef DEBUG - j = sprintf(buffer,"\nexecname : %s\nexecpath : %s\n",execname,execpath); - for (i = 0; i < argc; i++) - j += sprintf(buffer+j,"argv[%d]\t: %s\n",i,argv[i]); - Trace((buffer)); -#endif - - if (execname == NULL) - error("you must supply a program name to run"); - -#if defined(__CYGWIN__) - /* this insures that we search for symlinks before .exe's */ - if (compact_invocation) - strip_exe(execname); -#endif - - process_execname(exec,execname,execpath); - Trace(("exec\t%s\nexecname\t%s\nexecpath\t%s\n", - exec,execname,execpath)); - - wait_for_child = build_cmdline(cmdline2,exec,argc,argv); - Trace((cmdline2)); - - xemacs_special(exec); - ret_code = start_child(cmdline2,wait_for_child); - if (compact_invocation) - for (i = 1; i < argc; i++) // argv[0] was not malloc'ed - free(argv[i]); - else - for (i = 0; i < argc; i++) - free(argv[i]); - return (int) ret_code; -} -int start_child(char* cmdline, int wait_for_child) -{ - STARTUPINFO start; - SECURITY_ATTRIBUTES sec_attrs; - PROCESS_INFORMATION child; - int retval; - - memset (&start, 0, sizeof (start)); - start.cb = sizeof (start); - start.dwFlags = STARTF_USESHOWWINDOW; - start.wShowWindow = SW_HIDE; - - sec_attrs.nLength = sizeof (sec_attrs); - sec_attrs.lpSecurityDescriptor = NULL; - sec_attrs.bInheritHandle = FALSE; - - if (CreateProcess (NULL, cmdline, &sec_attrs, NULL, TRUE, 0, - NULL, NULL, &start, &child)) - { - if (wait_for_child) - { - WaitForSingleObject (child.hProcess, INFINITE); - GetExitCodeProcess (child.hProcess, &retval); - } - CloseHandle (child.hThread); - CloseHandle (child.hProcess); - } - else - error("could not start %s",cmdline); - return retval; -} -void xemacs_special(char* exec) -{ - /* - * if we're trying to run xemacs, AND this file was in %emacs_dir%\bin, - * then set emacs_dir environment variable - */ - char* p; - char* p2; - char exec2[MAX_PATH + FILENAME_MAX + 100]; -#if defined(__CYGWIN__) - char tmp[MAX_PATH + FILENAME_MAX + 100]; -#endif - strcpy(exec2,exec); - /* this depends on short-circuit evaluation */ - if ( ((p = strrchr(exec2,'\\')) && stricmp(p,"\\xemacs") == 0) || - ((p = strrchr(exec2,'/')) && stricmp(p,"/xemacs") == 0) || - ((p = strrchr(exec2,'\\')) && stricmp(p,"\\xemacs.exe") == 0) || - ((p = strrchr(exec2,'/')) && stricmp(p,"/xemacs.exe") == 0) ) - { - if ( ((p2 = strrchr(p, '\\')) && stricmp(p2, "\\bin") == 0) || - ((p2 = strrchr(p, '/')) && stricmp(p2, "/bin") == 0) ) - { - *p2 = '\0'; -#if defined(__CYGWIN__) - CYGWIN_CONV_TO_POSIX_PATH((exec2,tmp)); - strcpy(exec2,tmp); -#else /* NATIVE xemacs DOS-style paths with forward slashes */ - for (p = exec2; *p; p++) - if (*p == '\\') *p = '/'; -#endif - SetEnvironmentVariable ("emacs_dir", exec2); - } - } -} -int build_cmdline(char* new_cmdline, char* exec, int argc, char* argv[]) -{ - int retval = FALSE; - int first_arg = 1; - int i; - int char_cnt = 0; - /* - * look for "-wait" as first true argument; we'll apply that ourselves - */ - if ((argc >= 2) && (stricmp(argv[1],"-wait") == 0)) - { - retval = TRUE; - first_arg++; - } - - char_cnt = strlen(exec); - for (i = first_arg; i < argc; i++) - char_cnt += strlen(argv[i]); - if (char_cnt > MAX_ARGS*MAX_PATH) /* then we ran out of room */ - error("command line too long -\n%s",new_cmdline); - - strcpy(new_cmdline,exec); - for (i = first_arg; i < argc; i++) - { - strcat(new_cmdline," "); - strcat(new_cmdline,argv[i]); - } - return retval; -} -/* process exec_arg : if it - * NATIVE: - * 1) starts with '\\' or '/', it's a root-path and leave it alone - * 2) starts with 'x:\\' or 'x:/', it's a root-path and leave it alone - * 3) starts with '.\\' or './', two possible meanings: - * 1) exec is in the current directory - * 2) exec in same directory as this program - * 4) otherwise, search path (and _prepend_ "." to the path!!!) - * 5) convert all '/' to '\\' - * CYGWIN - * 1) starts with '\\' or '/', it's a root-path and leave it alone - * 2) starts with 'x:\\' or 'x:/', it's a root-path and leave it alone - * 3) starts with '.\\' or './', two possible meanings: - * 1) exec is in the current directory - * 2) exec in same directory as this program - * 4) otherwise, search path (and _prepend_ "." to the path!!!) - * 5) convert to cygwin-style path to resolve symlinks within the pathspec - * 6) check filename: if it's a symlink, resolve it by peeking inside - * 7) convert to win32-style path+filename since we're using Windows - * createProcess() to launch - */ -void process_execname(char *exec, const char* execname,const char* execpath ) -{ - char* orig_pathlist; - char* pathlist; - char exec_tmp[MAX_PATH + FILENAME_MAX + 100]; - char exec_tmp2[MAX_PATH + FILENAME_MAX + 100]; - char buf[MAX_PATH + FILENAME_MAX + 100]; - int i,j; - - /* - * STARTS WITH / or \ - * execpath NOT used - */ - if ((execname[0] == '\\') || (execname[0] == '/')) - { -#if defined(__CYGWIN__) - strcpy(exec_tmp,execname); -#else - exec_tmp[0] = ((char) (_getdrive() + ((int) 'A') - 1)); - exec_tmp[1] = ':'; - exec_tmp[2] = '\0'; - strcat(exec_tmp,execname); -#endif - Trace(("/ -\nexec_tmp\t%s\nexecname\t%s\nexecpath\t%s\n", - exec_tmp,execname,execpath)); - if (! fileExistsMulti(exec_tmp2,NULL,exec_tmp,exts,NUM_EXTENSIONS) ) - { - j = 0; - for (i = 0; i < NUM_EXTENSIONS; i++) - j += sprintf(buf + j," [%d]: %s\n",i+1,exts[i]); - error("Couldn't locate %s\nI tried appending the following " - "extensions: \n%s",exec_tmp,buf); - } - Trace((exec_tmp2)); - } - /* - * STARTS WITH x:\ or x:/ - * execpath NOT used - */ - else if ((strlen(execname) > 3) && // avoid boundary errors - (execname[1] == ':') && - ((execname[2] == '\\') || (execname[2] == '/'))) - { - strcpy(exec_tmp,execname); - Trace(("x: -\nexec_tmp\t%s\nexecname\t%s\nexecpath\t%s\n", - exec_tmp,execname,execpath)); - if (! fileExistsMulti(exec_tmp2,NULL,exec_tmp,exts,NUM_EXTENSIONS) ) - { - j = 0; - for (i = 0; i < NUM_EXTENSIONS; i++) - j += sprintf(buf + j," [%d]: %s\n",i+1,exts[i]); - error("Couldn't locate %s\nI tried appending the following " - "extensions: \n%s",exec_tmp,buf); - } - Trace((exec_tmp2)); - } - /* - * STARTS WITH ./ or .\ - */ - else if ((execname[0] == '.') && - ((execname[1] == '\\') || (execname[1] == '/'))) - { - if (((char*) getcwd(exec_tmp,MAX_PATH))==NULL) - error("can't find current working directory"); - if (! fileExistsMulti(exec_tmp2,exec_tmp,&(execname[2]), - exts,NUM_EXTENSIONS) ) - if (! fileExistsMulti(exec_tmp2,execpath,&(execname[2]), - exts,NUM_EXTENSIONS) ) - { - j = 0; - for (i = 0; i < NUM_EXTENSIONS; i++) - j += sprintf(buf + j," [%d]: %s\n",i+1,exts[i]); - error("Couldn't locate %s\n" - "I looked in the following directories:\n [1]: %s\n [2]: %s\n" - "I also tried appending the following " - "extensions: \n%s",execname,exec_tmp,execpath,buf); - } - Trace((exec_tmp2)); - } - /* - * OTHERWISE, SEARCH PATH (prepend '.' and run.exe's directory) - * can't use fileExistsMulti because we want to search entire path - * for exts[0], then for exts[1], etc. - */ - else - { - orig_pathlist = getenv("PATH"); - if ((pathlist = malloc (strlen(orig_pathlist) - + strlen(".") - + strlen(execpath)+ 3)) == NULL) - error("internal error - out of memory"); - strcpy(pathlist,"."); - strcat(pathlist,SEP_CHARS); - strcat(pathlist,execpath); - strcat(pathlist,SEP_CHARS); - strcat(pathlist,orig_pathlist); - - Trace((pathlist)); - for (i = 0; i < NUM_EXTENSIONS; i++) - { - strcpy(exec_tmp,execname); - strcat(exec_tmp,exts[i]); - pfopen(exec_tmp2,exec_tmp,pathlist); - if (fileExists(NULL,NULL,exec_tmp2)) - break; - exec_tmp2[0] = '\0'; - } - Trace(("exec_tmp\t%s\npathlist\t%s\n",exec_tmp2,pathlist)); - - free(pathlist); - if (exec_tmp2[0] == '\0') - { - j = 0; - for (i = 0; i < NUM_EXTENSIONS; i++) - j += sprintf(buf + j," [%d]: %s\n",i+1,exts[i]); - error("Couldn't find %s anywhere.\n" - "I even looked in the PATH \n" - "I also tried appending the following " - "extensions: \n%s",execname,buf); - } - } -/* - * At this point, we know that exec_tmp2 contains a filename - * and we know that exec_tmp2 exists. - */ -#if defined(__CYGWIN__) - { - struct stat stbuf; - char sym_link_name[MAX_PATH+1]; - char real_name[MAX_PATH+1]; - char dummy[MAX_PATH+1]; - - strcpy(exec_tmp,exec_tmp2); - - CYGWIN_CONV_TO_POSIX_PATH((exec_tmp,sym_link_name)); - Trace((sym_link_name)); - - if (lstat(sym_link_name, &stbuf) == 0) - { - if ((stbuf.st_mode & S_IFLNK) == S_IFLNK) - { - if (readlink(sym_link_name, real_name, sizeof(real_name)) == -1) - error("problem reading symbolic link for %s",exec_tmp); - else - { - // if realname starts with '/' it's a rootpath - if (real_name[0] == '/') - strcpy(exec_tmp2,real_name); - else // otherwise, it's relative to the symlink's location - { - CYGWIN_SPLIT_PATH((sym_link_name,exec_tmp2,dummy)); - if (!endsWith(exec_tmp2,PATH_SEP_CHAR_STR)) - strcat(exec_tmp2,PATH_SEP_CHAR_STR); - strcat(exec_tmp2,real_name); - } - } - } - else /* NOT a symlink */ - strcpy(exec_tmp2, sym_link_name); - } - else - error("can't locate executable - %s",sym_link_name); - } - CYGWIN_CONV_TO_FULL_WIN32_PATH((exec_tmp2,exec)); -#else - strcpy (exec, exec_tmp2); -#endif -} -int endsWith(const char* s1, const char* s2) -{ - int len1; - int len2; - int retval = FALSE; - len1 = strlen(s1); - len2 = strlen(s2); - if (len1 - len2 >= 0) - if (stricmp(&(s1[len1-len2]),s2) == 0) - retval = TRUE; - return retval; -}void strip_exe(char* s) -{ - if ((strlen(s) > 4) && // long enough to have .exe extension - // second part not evaluated (short circuit) if exec_arg too short - (stricmp(&(s[strlen(s)-4]),".exe") == 0)) - s[strlen(s)-4] = '\0'; -} -void error(char* fmt, ...) -{ - char buf[4096]; - int j; - va_list args; - va_start(args, fmt); - j = sprintf(buf, "Error: "); - j += vsprintf(buf + j,fmt,args); - j += sprintf(buf + j,"\n"); - va_end(args); - MessageBox(NULL, buf, "Run.exe", MB_ICONSTOP); - exit(1); -} -void message(char* fmt, ...) -{ - char buf[10000]; - int j; - va_list args; - va_start(args, fmt); - j = vsprintf(buf,fmt,args); - j += sprintf(buf + j,"\n"); - va_end(args); - MessageBox(NULL, buf, "Run.exe Message", MB_ICONSTOP); -} -void Trace_(char* fmt, ...) -{ - char buf[10000]; - int j; - va_list args; - va_start(args, fmt); - j = vsprintf(buf,fmt,args); - j += sprintf(buf + j,"\n"); - va_end(args); - MessageBox(NULL, buf, "Run.exe DEBUG", MB_ICONSTOP); -} -/* - * Uses system info to determine the path used to invoke run - * Also attempts to deduce the target execname if "compact_invocation" - * method was used. - * - * returns TRUE if compact_invocation method was used - * (and target execname was deduced successfully) - * otherwise returns FALSE, and execname == run or run.exe - */ -int get_exec_name_and_path(char* execname, char* execpath) -{ - char modname[MAX_PATH]; - char* tmp_execname; - char* p; - int retval = FALSE; - - if (!GetModuleFileName (NULL, modname, MAX_PATH)) - error("internal error - can't find my own name"); - if ((p = strrchr (modname, '\\')) == NULL) - error("internal error - my own name has no path\n%s",modname); - tmp_execname = p + 1; - p[0] = '\0'; - // if invoked by a name like "runxemacs" then strip off - // the "run" and let "xemacs" be execname. - // To check for this, make that: - // 1) first three chars are "run" - // 2) but the string doesn't end there, or start ".exe" - // Also, set "compact_invocation" TRUE - if ( ((tmp_execname[0] == 'r') || (tmp_execname[0] == 'R')) && - ((tmp_execname[1] == 'u') || (tmp_execname[1] == 'U')) && - ((tmp_execname[2] == 'n') || (tmp_execname[2] == 'N')) && - ((tmp_execname[3] != '.') && (tmp_execname[3] != '\0')) ) - { - tmp_execname += 3; - retval = TRUE; - } - else - tmp_execname = NULL; - - if (tmp_execname == NULL) - strcpy(execname,""); - else - strcpy(execname,tmp_execname); -#if defined(__CYGWIN__) - CYGWIN_CONV_TO_POSIX_PATH((modname,execpath)); -#else - strcpy(execpath,modname); -#endif - return retval; -} -/* - * works like strtok, but: - * double quotes (") suspends tokenizing until closing " reached - * CYGWIN ONLY: - * additionally, backslash escapes next character, even if that - * next character is a delimiter. Or a double quote. - * WARNING: this means that backslash may NOT be a delimiter - */ -char* my_strtok(char* s, const char* delim, char** lasts) -{ - char *spanp; - int c, sc; - char *tok; - - if ((s == NULL) && ((s = *lasts) == NULL)) - return NULL; - /* Skip leading delimiters */ -cont: - c = *s++; - for (spanp = (char *)delim; (sc = *spanp++) != 0;) { - if (c == sc) - goto cont; - } - if (c == 0) { /* no non-delimiter characters */ - *lasts = NULL; - return (NULL); - } - tok = s - 1; - /* - * Scan token (scan for delimiters: s += strcspn(s, delim), sort of). - * Note that delim must have one NUL; we stop if we see that, too. - * If we see a double quote, continue until next double quote, then - * start scanning for delimiters again. - * CYGWIN ONLY: if we see a backslash, just copy next character - - * don't consider it as a delimiter even if it is in delim string. - */ - for (;;) { - /* if this c is ", then scan until we find next " */ - if (c == '\"') - while ((c = *s++) != '\"') - if (c == 0) /* oops, forgot to close the ", clean up & return */ - { - s = NULL; - *lasts = s; - return (tok); - } -#if defined(__CYGWIN__) - if (c == '\\') - { - c = *s++; /* skip the backslash */ - if (c == 0) /* if escaped character is end-of-string, clean up & return */ - { - s = NULL; - *lasts = s; - return (tok); - } - c = *s++; /* otherwise, skip the escaped character */ - } -#endif - spanp = (char *)delim; - do { - if ((sc = *spanp++) == c) { - if (c == 0) - s = NULL; - else - s[-1] = 0; - *lasts = s; - return (tok); - } - } while (sc != 0); - c = *s++; - } - /* NOTREACHED */ -} -int parse_cmdline_to_arg_array(char* argv[MAX_ARGS], char* cmdline) -{ - char seps[] = " \t\n"; - char* token; - int argc = 0; - char* lasts; - - token = my_strtok(cmdline, seps, &lasts); - while ((token != NULL) && (argc < MAX_ARGS)) - { - if ((argv[argc] = malloc(strlen(token)+1)) == NULL) - { - error("internal error - out of memory"); - } - strcpy(argv[argc++],token); - token = my_strtok(NULL,seps,&lasts); - } - if (argc >= MAX_ARGS) - error("too many arguments on commandline\n%s",cmdline); - return argc; -} -/* Taken from pfopen.c by David Engel (5-Jul-97). - * Original comments appear below. Superseded by next comment block. - * - * Written and released to the public domain by David Engel. - * - * This function attempts to open a file which may be in any of - * several directories. It is particularly useful for opening - * configuration files. For example, PROG.EXE can easily open - * PROG.CFG (which is kept in the same directory) by executing: - * - * cfg_file = pfopen("PROG.CFG", "r", getenv("PATH")); - * - * NULL is returned if the file can't be opened. - */ - -/* - * This function attempts to locate a file which may be in any of - * several directories. Unlike the original pfopen, it does not - * return a FILE pointer to the opened file, but rather returns - * the fully-qualified filename of the first match found. Returns - * empty string if not found. - */ -char *pfopen(char *retval, const char *name, const char *dirs) -{ - char *ptr; - char *tdirs; - char returnval[MAX_PATH + FILENAME_MAX + 100]; - int foundit = FALSE; - - returnval[0] = '\0'; - - if (dirs == NULL || dirs[0] == '\0') - return NULL; - - if ((tdirs = malloc(strlen(dirs)+1)) == NULL) - return NULL; - - strcpy(tdirs, dirs); - - for (ptr = strtok(tdirs, SEP_CHARS); (foundit == FALSE) && ptr != NULL; - ptr = strtok(NULL, SEP_CHARS)) - { - foundit = fileExists(returnval,ptr,name); - } - - free(tdirs); - if (!foundit) - retval[0] = '\0'; - else - strcpy(retval,returnval); - return retval; -} -int fileExistsMulti(char* fullname, const char* path, - const char* name_noext, const char* exts[], - const int extcnt) -{ - char tryName[MAX_PATH + FILENAME_MAX]; - int i = 0; - int retval = FALSE; - fullname[0] = '\0'; - for (i = 0; i < extcnt; i++) - { - strcpy(tryName,name_noext); - strcat(tryName,exts[i]); - if (fileExists(fullname, path, tryName) == TRUE) - { - retval = TRUE; - break; - } - fullname[0] = '\0'; - } - return retval; -} -int fileExists(char* fullname, const char* path, const char* name) -{ - int retval = FALSE; - FILE* file; - size_t len; - char work[FILENAME_MAX]; - char work2[MAX_PATH + FILENAME_MAX + 100]; - if (path != NULL) - { - strcpy(work, path); - len = strlen(work); - if (len && work[len-1] != '/' && work[len-1] != '\\') - strcat(work, PATH_SEP_CHAR_STR); - } - else - work[0]='\0'; - - strcat(work, name); -#if defined(__CYGWIN__) - CYGWIN_CONV_TO_POSIX_PATH((work, work2)); -#else - strcpy(work2,work); -#endif - -#ifdef DEBUGALL - Trace(("looking for...\t%s\n",work2)); -#endif - - file = fopen(work2, "rb"); - if (file != NULL) - { - if (fullname != NULL) - strcpy(fullname,work2); - retval = TRUE; - fclose(file); - } - return retval; -} diff --git a/lib-src/run.h b/lib-src/run.h deleted file mode 100644 index 896dc5c..0000000 --- a/lib-src/run.h +++ /dev/null @@ -1,100 +0,0 @@ -// #define DEBUG -// #define DEBUGALL - -// B19 - egcs automatically defines CYGWIN32 but not CYGWIN -// B20 - egcs automatically defines both CYGWIN32 and CYGWIN -// Bfuture - (???) defines CYGWIN but not CYGWIN32 -#if defined(__CYGWIN32__) -#if !defined(__CYGWIN__) - #define B19 - #define __CYGWIN__ -#else - #define B20 -#endif -#else -#if defined(__CYGWIN__) - #define B21 -#endif -#endif -// Now: use __CYGWIN__ to represent any version -// distinguish using B19, B20, or B21 - -#if defined(__CYGWIN__) -#ifdef B19 -#define CYGWIN_ATTACH_HANDLE_TO_FD(a) cygwin32_attach_handle_to_fd a -#define CYGWIN_CONV_TO_FULL_POSIX_PATH(a) cygwin32_conv_to_full_posix_path a -#define CYGWIN_CONV_TO_FULL_WIN32_PATH(a) cygwin32_conv_to_full_win32_path a -#define CYGWIN_CONV_TO_POSIX_PATH(a) cygwin32_conv_to_posix_path a -#define CYGWIN_CONV_TO_WIN32_PATH(a) cygwin32_conv_to_win32_path a -#define CYGWIN_DETACH_DLL(a) cygwin32_detach_dll a -#define CYGWIN_GETSHARED(a) cygwin32_getshared a -#define CYGWIN_INTERNAL(a) cygwin32_internal a -#define CYGWIN_POSIX_PATH_LIST_P(a) cygwin32_posix_path_list_p a -#define CYGWIN_POSIX_TO_WIN32_PATH_LIST(a) cygwin32_posix_to_win32_path_list a -#define CYGWIN_POSIX_TO_WIN32_PATH_LIST_BUF_SIZE(a) cygwin32_posix_to_win32_path_list_buf_size a -#define CYGWIN_SPLIT_PATH(a) cygwin32_split_path a -#define CYGWIN_WIN32_TO_POSIX_PATH_LIST(a) cygwin32_win32_to_posix_path_list a -#define CYGWIN_WIN32_TO_POSIX_PATH_LIST_BUF_SIZE(a) cygwin32_win32_to_posix_path_list_buf_size a -#define CYGWIN_WINPID_TO_PID(a) cygwin32_winpid_to_pid a -#else -#define CYGWIN_ATTACH_HANDLE_TO_FD(a) cygwin_attach_handle_to_fd a -#define CYGWIN_CONV_TO_FULL_POSIX_PATH(a) cygwin_conv_to_full_posix_path a -#define CYGWIN_CONV_TO_FULL_WIN32_PATH(a) cygwin_conv_to_full_win32_path a -#define CYGWIN_CONV_TO_POSIX_PATH(a) cygwin_conv_to_posix_path a -#define CYGWIN_CONV_TO_WIN32_PATH(a) cygwin_conv_to_win32_path a -#define CYGWIN_DETACH_DLL(a) cygwin_detach_dll a -#define CYGWIN_GETSHARED(a) cygwin_getshared a -#define CYGWIN_INTERNAL(a) cygwin_internal a -#define CYGWIN_POSIX_PATH_LIST_P(a) cygwin_posix_path_list_p a -#define CYGWIN_POSIX_TO_WIN32_PATH_LIST(a) cygwin_posix_to_win32_path_list a -#define CYGWIN_POSIX_TO_WIN32_PATH_LIST_BUF_SIZE(a) cygwin_posix_to_win32_path_list_buf_size a -#define CYGWIN_SPLIT_PATH(a) cygwin_split_path a -#define CYGWIN_WIN32_TO_POSIX_PATH_LIST(a) cygwin_win32_to_posix_path_list a -#define CYGWIN_WIN32_TO_POSIX_PATH_LIST_BUF_SIZE(a) cygwin_win32_to_posix_path_list_buf_size a -#define CYGWIN_WINPID_TO_PID(a) cygwin_winpid_to_pid a -#endif -#endif - -#if defined(__CYGWIN__) - #define PATH_SEP_CHAR_STR "/" - #define SEP_CHARS ":" -#else - #define PATH_SEP_CHAR_STR "\\" - #define SEP_CHARS ";" -#endif - -#ifndef RC_INVOKED - -#define MAX_ARGS 20 - -#ifdef DEBUG - #define Trace(x) Trace_ x -#else - #define Trace(x) -#endif - -#define NUM_EXTENSIONS 2 -const char* exts[NUM_EXTENSIONS] = { "", ".exe" }; - -char* pfopen(char *retval, const char *name, const char *dirs); -void error(char* fmt, ...); -void message(char* fmt, ...); -void Trace_(char* fmt, ...); -int get_exec_name_and_path(char* execname, char* execpath); -char* my_strtok(char* s, const char* delim, char** lasts); -int parse_cmdline_to_arg_array(char* argv[MAX_ARGS], char* cmdline); -void strip_exe(char* s); -int start_child(char* cmdline, int wait_for_child); -void xemacs_special(char* exec); -int build_cmdline(char* new_cmdline, char* exec, int argc, char* argv[]); -void process_execname(char *exec, const char* execname, const char* execpath); -int fileExists(char* fullname, const char* path, const char* name); -int endsWith(const char* s1, const char* s2); -int fileExistsMulti(char* fullname, const char* path, - const char* name_noext, const char* exts[], - const int extcnt); - -#endif /* RC_INVOKED */ - - - diff --git a/lib-src/run.rc b/lib-src/run.rc deleted file mode 100644 index 35ec240..0000000 --- a/lib-src/run.rc +++ /dev/null @@ -1,30 +0,0 @@ -XEmacs ICON PRELOAD "xemacs.ico" -XEmacsFile ICON "file.ico" -XEmacsLisp ICON "lisp.ico" - -#include -#include "run.h" - -1 VERSIONINFO -FILEVERSION 1, 1, 4, 0 -PRODUCTVERSION 1, 1, 4, 0 -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_APP -FILESUBTYPE 0 -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "04090000" - BEGIN - VALUE "CompanyName", "Charles S. Wilson\000" - VALUE "FileDescription", "Runs console-mode programs sans console.\000" - VALUE "FileVersion", "1.1.4\000" - VALUE "InternalName", "run\000" - VALUE "LegalCopyright", "Copyright © 1998 Charles S. Wilson\000" - VALUE "OriginalFilename", "run.exe\000" - VALUE "ProductName","run\000" - VALUE "ProductVersion","1.1.4\000" - VALUE "GPL Copyleft", "Released under the GNU General Public License version 2 --------------------------------------- This program is free software; you can redistribute it and/or modify it under the termms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. --------------------------------------- This program 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 this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\000" - END - END -END diff --git a/lib-src/wakeup.c b/lib-src/wakeup.c index 618938e..a971087 100644 --- a/lib-src/wakeup.c +++ b/lib-src/wakeup.c @@ -4,20 +4,22 @@ #if __STDC__ || defined(STDC_HEADERS) #include +#ifdef HAVE_UNISTD_H #include #endif +#endif #include #include -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #define WIN32_LEAN_AND_MEAN #include #undef sleep #define sleep(t) Sleep ((t) * 1000) #define getppid() (0) #undef HAVE_SYS_TIME_H -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ #ifdef TIME_WITH_SYS_TIME #include diff --git a/lib-src/yow.c b/lib-src/yow.c index f5a7e1d..7390373 100644 --- a/lib-src/yow.c +++ b/lib-src/yow.c @@ -33,7 +33,7 @@ void yow (FILE *fp); void setup_yow (FILE *fp); -#ifdef MSDOS +#ifdef WIN32_NATIVE #define rootrelativepath(rel) \ ({\ static char res[BUFSIZE], *p;\ diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9fda9a1..a568ae0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -452,6 +452,284 @@ * files.el (insert-file-contents-literally): Treat file as binary; call file-name-handlers. [sync with Emacs 20.3.10] +2000-07-19 Martin Buchholz + + * XEmacs 21.2.35 is released. + +2000-07-18 Alastair J. Houghton + + * select.el (selection-coercible-types): Initialise. + +2000-07-18 Alastair J. Houghton + + * select.el (own-clipboard): Bug fix. + +2000-07-17 Mike Sperber + + * cus-edit.el (custom-migrate-custom-file): Save init file before + continuing. + +2000-07-16 Mike Sperber + + * startup.el (load-init-file): Remove silly call to + `load-user-custom-file`. + (maybe-migrate-user-init-file): Minor fixes. + +2000-07-16 Martin Buchholz + + * apropos.el (apropos-documentation-check-doc-file): + `doc' variable should be let-bound, as was presumably intended. + + * cus-edit.el (custom-variable-reset-saved): + (custom-variable-reset-standard): + Remove unused variable comment-widget. Twice. + + * toolbar.el (toolbar-blank-press-function): + Add a real defvar with initial value nil and proper docstring. + (press-toolbar-button): No need to check for boundp-ness anymore. + + * rect.el (open-rectangle-line): Remove useless (let) form. + Add defvar for pending-delete-mode. + + * info.el (Info-find-node): This function needs an autoload cookie. + + * mule/mule-x-init.el (x-use-halfwidth-roman-font): + Use let* since the second form referred to the first. + +2000-07-16 Adrian Aichner + + * msw-select.el (mswindows-paste-clipboard): Use `get-clipboard' + instead of removed `mswindows-get-clipboard'. + + +2000-07-15 Alastair J. Houghton + + * select.el (select-convert-from-text): New. + * select.el (select-convert-from-length): New. + * select.el (select-convert-from-integer): New. + * select.el (select-convert-from-identity): New. + * select.el (select-convert-from-filename): New. + * select.el (selection-converter-in-alist): Use them. + New converter functions for X. + + * select.el (get-selection): Removed comment. + + * select.el (own-selection): Removed append code - I thought + I'd already done this, but apparently not... + + * select.el: Changed comment about TIMESTAMP. + + * select.el (select-convert-in): New. + * select.el (select-convert-out): New. + New functions that get used by select.c. + + * select.el (select-buffer-killed-default): New. + * select.el (select-buffer-killed-text): New. + * select.el (selection-buffer-killed-alist): New. + New list and functions that get called if a relevant selection + exists and a buffer gets killed. + + * select.el (select-convert-to-targets): + * select.el (select-convert-to-identity): Removed. + * select.el (select-convert-from-identity): Removed. + * select.el (select-converter-out-alist): + Removed _EMACS_INTERNAL selection type. + + * x-select.el (xselect-kill-buffer-hook): Removed. + * x-select.el (xselect-kill-buffer-hook-1): Removed. + Removed this X-specific nonesense. Use the generic support + in select.el instead. + +2000-07-15 Martin Buchholz + + * mule/mule-category.el (defined-category-hashtable): + Use make-hash-table instead of make-hashtable + + * buff-menu.el: Byte-compiler warning fix. + + * isearch-mode.el (isearch-highlight-all-cleanup): + Remove unused variable `isearch-highlight-all-start'. + + * etags.el (add-to-tag-completion-table): Byte-compiler warning fix. + + * itimer.el (itimer-edit-mode): Byte-compiler warning fixes. + + * cus-dep.el (Custom-make-dependencies): + Add autoload cookie for custom-add-loads to generated custom-load.el. + + * autoload.el (autoload-package-name): Warning suppression. + Move defvar prior to first use. + + * custom.el: Add autoload for custom-declare-face. + Allow `xemacs -no-autoloads -l bytecomp -f batch-byte-compile ...' + * cl.el (cl-hack-byte-compiler): + Allow `xemacs -no-autoloads -l bytecomp -f batch-byte-compile ...' + to work properly. + +2000-07-08 Mike Sperber + + * startup.el (load-home-init-file): Added variable. + (maybe-migrate-user-init-file): Added. + (load-user-init-file): Load custom file if different from init + file. + + * dumped-lisp.el (preloaded-file-list): Added "cus-file" before + "startup." + + * cus-edit.el (custom-migrate-custom-file): Added for migration. + Moved `custom-file'-related code to cus-file.el. + + * cus-file.el: New file. + +2000-04-01 Mike Sperber + + * packages.el (packages-find-package-directories): Added support + for external package hierarchies with in-place installations. + + * find-paths.el (paths-root-in-place-p): Added. + (paths-find-emacs-directory): Added support for external + directories with in-place installations. + (paths-find-site-directory): Ditto. + + * startup.el (find-user-init-file): Also look for + ~/.xemacs/init.elc? in preference to ~/.emacs. + +2000-07-12 Alastair J. Houghton + + * select.el (own-selection): + * select.el (own-clipboard): Changed `append' parameter to + `how-to-use' parameter. + * select.el (own-selection): Removed icky append code. + * select.el (own-selection, get-selection): Removed extra type + checking. + * select.el (selection-appender-alist): + * select.el (selection-converter-{in|out}-alist): Initialise. + * select.el (select-append-to-*): New. + * select.el (select-convert-from-*): New. New functions to append + data and convert data from external type. + +2000-07-12 Stef Epardaud + + * font-lock.el: Javadoc enhancements. + +2000-07-06 Kirill 'Big K' Katsnelson + + * printer.el (generic-print-region): Compose job name from buffer + name. + +2000-07-06 Yoshiki Hayashi + + * font-lock.el (font-lock-fontify-pending-extents): Call + font-lock-fontify-region instead of font-lock-fontify-buffer + to avoid unnecessary progress gauges. + +2000-07-06 Craig Lanning + + * custom-load.el (faces): + + * finder.el (finder-compile-keywords): from Dan Holmsand, make sure + dir is a regex. + + * process.el (call-process-internal): from Dan Holmsand, use binary + coding systems so that jka-compr works. + +2000-07-07 Ben Wing + + * font-lock.el: Undo previous change. Unfortunately, some + files actually use the variables directly in their init code + without quoting them. + +2000-07-07 Ben Wing + + * font-lock.el (defvar font-lock-*-face): Removed. + + * font-lock.el (font-lock-apply-highlight): Bind these face vars + only when necessary. + +2000-06-30 Charles G Waldman + + * cl-macs.el: fix cl-transform-function-property kludge + so that it does not require a random feature. + +2000-06-09 Karl M. Hegbloom + + * files.el (auto-mode-alist): allow .make extension for Makefiles, + as in Linux kernel "Rules.make". + +2000-06-29 Gunnar Evermann + + * build-report.el (build-report): Add autoload cookie. + +2000-06-21 Charles G Waldman + + * package-ui.el (defgroup pui): Correct a misspelling + (pui-toggle-package-delete): Change `seleted' to `selected' + +2000-06-12 Jan Vroonhof + + * package-get.el (package-get-update-base): + (package-get): Use insert-file-contents-literally always. + (package-get-maybe-save-index): + Force coding system for writing to binary. + +2000-06-08 Mike Alexander + + * code-process.el (call-process-region): If there is no coding + system for the process on process-coding-system-alist use the + coding system of the buffer containing the region. + +2000-06-10 Ben Wing + + * cmdloop.el (command-error): + If debug-on-error and noninteractive, output backtrace. + + * files.el (file-relative-name): + Remove MSDOS references. + + * simple.el (line-number): New function, due to non-obvious + behavior/usage of count-lines. + + * simple.el (count-lines): document non-obvious usage to get + line number. + +2000-06-11 Ben Wing + + * faces.el ((featurep 'xpm)): + * x-faces.el (x-init-face-from-resources): + * x-faces.el (x-init-frame-faces): + * x-misc.el (x-init-specifier-from-resources): + * x-misc.el (x-get-resource-and-bogosity-check): + * x-misc.el (x-get-resource-and-maybe-bogosity-check): + * x-mouse.el (x-init-pointer-shape): + * x-scrollbar.el (x-init-scrollbar-from-resources): + Add sixth argument to x-get-resource calls so as to issue warnings + rather than errors on bogus arguments. + +2000-06-05 Ben Wing + + * compat.el: new file. provides a clean, non-intrusive way to + define compatibility functions. + + * process.el (shell-quote-argument): temporary fix for lack + of nt-quote-process-args. #### I need to put back the overall + structure of that mechanism but redo the guts of it using the + extra intelligence in the C code. + +2000-05-28 Adrian Aichner + + * package-info.el (pi-md5sum): Calculate MD5 sum just like + `package-get' does in package-get.el, instead of using external + "md5sum" program. + + * package-get.el (package-get): Insert package file literally to + make checksum calculation work. + +2000-04-18 Hrvoje Niksic + + * code-files.el (convert-mbox-coding-system): Deleted. + (file-coding-system-alist): Removed reference to + convert-mbox-coding-system. + 2000-05-28 Martin Buchholz * XEmacs 21.2.34 is released. @@ -680,7 +958,7 @@ * gutter-items.el (make-search-dialog): Change to new callback-ex api. -2000-04-26 Björn Torkelsson +2000-04-26 Bjrn Torkelsson * help.el: (describe-installation): decode-coding-string is not defined in a non MULE environment. diff --git a/lisp/apropos.el b/lisp/apropos.el index 9dee743..0b535d8 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -377,7 +377,7 @@ Returns list of symbols and documentation found." ;; Finds all documentation related to APROPOS-REGEXP in internal-doc-file-name. (defun apropos-documentation-check-doc-file () - (let (type symbol (sepa 2) sepb beg end) + (let (type symbol (sepa 2) sepb beg end doc) (insert ?\^_) (backward-char) (insert-file-contents (concat doc-directory internal-doc-file-name)) diff --git a/lisp/auto-autoloads.el b/lisp/auto-autoloads.el index 5447edf..0eb08b0 100644 --- a/lisp/auto-autoloads.el +++ b/lisp/auto-autoloads.el @@ -1,6 +1,80 @@ ;;; DO NOT MODIFY THIS FILE (if (featurep 'lisp-autoloads) (error "Already loaded")) +;;;### (autoloads nil "abbrev" "lisp/abbrev.el") + +;;;*** + +;;;### (autoloads (about-xemacs) "about" "lisp/about.el") + +(autoload 'about-xemacs "about" "\ +Describe the True Editor and its minions." t nil) + +;;;*** + +;;;### (autoloads (set-modified-alist modify-alist remove-alist set-alist del-alist put-alist vassoc) "alist" "lisp/alist.el") + +(autoload 'vassoc "alist" "\ +Search VALIST for a vector whose first element is equal to KEY. +See also `assoc'." nil nil) + +(autoload 'put-alist "alist" "\ +Modify ALIST to set VALUE to ITEM. +If there is a pair whose car is ITEM, replace its cdr by VALUE. +If there is not such pair, create new pair (ITEM . VALUE) and +return new alist whose car is the new pair and cdr is ALIST. +[tomo's ELIS like function]" nil nil) + +(autoload 'del-alist "alist" "\ +If there is a pair whose key is ITEM, delete it from ALIST. +[tomo's ELIS emulating function]" nil nil) + +(autoload 'set-alist "alist" "\ +Modify a alist indicated by SYMBOL to set VALUE to ITEM." nil nil) + +(autoload 'remove-alist "alist" "\ +Remove ITEM from the alist indicated by SYMBOL." nil nil) + +(autoload 'modify-alist "alist" "\ +Modify alist DEFAULT into alist MODIFIER." nil nil) + +(autoload 'set-modified-alist "alist" "\ +Modify a value of a symbol SYM into alist MODIFIER. +The symbol SYM should be alist. If it is not bound, +its value regard as nil." nil nil) + +;;;*** + +;;;### (autoloads (apropos-documentation apropos-value apropos apropos-command) "apropos" "lisp/apropos.el") + +(fset 'command-apropos 'apropos-command) + +(autoload 'apropos-command "apropos" "\ +Shows commands (interactively callable functions) that match REGEXP. +With optional prefix ARG or if `apropos-do-all' is non-nil, also show +variables." t nil) + +(autoload 'apropos "apropos" "\ +Show all bound symbols whose names match REGEXP. +With optional prefix ARG or if `apropos-do-all' is non-nil, also show unbound +symbols and key bindings, which is a little more time-consuming. +Returns list of symbols and documentation found." t nil) + +(autoload 'apropos-value "apropos" "\ +Show all symbols whose value's printed image matches REGEXP. +With optional prefix ARG or if `apropos-do-all' is non-nil, also looks +at the function and at the names and values of properties. +Returns list of symbols and values found." t nil) + +(autoload 'apropos-documentation "apropos" "\ +Show symbols whose documentation contain matches for REGEXP. +With optional prefix ARG or if `apropos-do-all' is non-nil, also use +documentation that is not stored in the documentation file and show key +bindings. +Returns list of symbols and documentation found." t nil) + +;;;*** + ;;;### (autoloads (batch-update-one-directory batch-update-directory batch-update-autoloads update-autoloads-from-directory update-autoloads-here update-file-autoloads generate-file-autoloads) "autoload" "lisp/autoload.el") (autoload 'generate-file-autoloads "autoload" "\ @@ -46,6 +120,30 @@ be used only with -batch." nil nil) ;;;*** +;;;### (autoloads nil "buff-menu" "lisp/buff-menu.el") + +(defvar list-buffers-directory nil) + +(make-variable-buffer-local 'list-buffers-directory) + +;;;*** + +;;;### (autoloads (build-report) "build-report" "lisp/build-report.el") + +(autoload 'build-report "build-report" "\ +Initializes a fresh mail composition buffer using `compose-mail' +with the contents of XEmacs Installation file and excerpts from XEmacs +make output and errors and leaves point at the beginning of the mail text. + See also +`compose-mail', `mail-user-agent', +`build-report-destination', +`build-report-keep-regexp', +`build-report-delete-regexp', +`build-report-make-output-file' and +`build-report-installation-file'." t nil) + +;;;*** + ;;;### (autoloads (batch-byte-recompile-directory batch-byte-recompile-directory-norecurse batch-byte-compile-one-file batch-byte-compile display-call-tree byte-compile-sexp byte-compile compile-defun byte-compile-buffer byte-compile-and-load-file byte-compile-file byte-recompile-file byte-recompile-directory byte-force-recompile) "bytecomp" "lisp/bytecomp.el") (autoload 'byte-force-recompile "bytecomp" "\ @@ -138,1679 +236,1654 @@ For example, invoke `xemacs -batch -f batch-byte-recompile-directory .'." nil ni ;;;*** -;;;### (autoloads (pop-tag-mark tags-apropos list-tags tags-query-replace tags-search tags-loop-continue next-file tag-complete-symbol find-tag-other-window find-tag find-tag-at-point visit-tags-table) "etags" "lisp/etags.el") - -(autoload 'visit-tags-table "etags" "\ -Tell tags commands to use tags table file FILE when all else fails. -FILE should be the name of a file created with the `etags' program. -A directory name is ok too; it means file TAGS in that directory." t nil) +;;;### (autoloads (compiler-macroexpand define-compiler-macro ignore-file-errors ignore-errors assert check-type typep deftype cl-struct-setf-expander defstruct define-modify-macro callf2 callf letf* letf rotatef shiftf remf cl-do-pop psetf setf get-setf-method defsetf define-setf-method declare the locally multiple-value-setq multiple-value-bind lexical-let* lexical-let symbol-macrolet macrolet labels flet progv psetq do-all-symbols do-symbols dotimes dolist do* do loop return-from return block etypecase typecase ecase case load-time-value eval-when destructuring-bind function* defmacro* defun* cl-compile-time-init) "cl-macs" "lisp/cl-macs.el") -(autoload 'find-tag-at-point "etags" "\ -*Find tag whose name contains TAGNAME. -Identical to `find-tag' but does not prompt for tag when called interactively; -instead, uses tag around or before point." t nil) +(autoload 'cl-compile-time-init "cl-macs" nil nil nil) -(autoload 'find-tag "etags" "\ -*Find tag whose name contains TAGNAME. - Selects the buffer that the tag is contained in -and puts point at its definition. - If TAGNAME is a null string, the expression in the buffer -around or before point is used as the tag name. - If called interactively with a numeric argument, searches for the next tag -in the tag table that matches the tagname used in the previous find-tag. - If second arg OTHER-WINDOW is non-nil, uses another window to display -the tag. +(autoload 'defun* "cl-macs" "\ +(defun* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a function. +Like normal `defun', except ARGLIST allows full Common Lisp conventions, +and BODY is implicitly surrounded by (block NAME ...)." nil 'macro) -This version of this function supports multiple active tags tables, -and completion. +(autoload 'defmacro* "cl-macs" "\ +(defmacro* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a macro. +Like normal `defmacro', except ARGLIST allows full Common Lisp conventions, +and BODY is implicitly surrounded by (block NAME ...)." nil 'macro) -Variables of note: +(autoload 'function* "cl-macs" "\ +(function* SYMBOL-OR-LAMBDA): introduce a function. +Like normal `function', except that if argument is a lambda form, its +ARGLIST allows full Common Lisp conventions." nil 'macro) - tag-table-alist controls which tables apply to which buffers - tags-file-name a default tags table - tags-build-completion-table controls completion behavior - buffer-tag-table another way of specifying a buffer-local table - make-tags-files-invisible whether tags tables should be very hidden - tag-mark-stack-max how many tags-based hops to remember" t nil) +(autoload 'destructuring-bind "cl-macs" nil nil 'macro) -(autoload 'find-tag-other-window "etags" "\ -*Find tag whose name contains TAGNAME, in another window. - Selects the buffer that the tag is contained in in another window -and puts point at its definition. - If TAGNAME is a null string, the expression in the buffer -around or before point is used as the tag name. - If second arg NEXT is non-nil (interactively, with prefix arg), -searches for the next tag in the tag table -that matches the tagname used in the previous find-tag. +(autoload 'eval-when "cl-macs" "\ +(eval-when (WHEN...) BODY...): control when BODY is evaluated. +If `compile' is in WHEN, BODY is evaluated when compiled at top-level. +If `load' is in WHEN, BODY is evaluated when loaded after top-level compile. +If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level." nil 'macro) -This version of this function supports multiple active tags tables, -and completion. +(autoload 'load-time-value "cl-macs" "\ +Like `progn', but evaluates the body at load time. +The result of the body appears to the compiler as a quoted constant." nil 'macro) -Variables of note: +(autoload 'case "cl-macs" "\ +(case EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value. +Each clause looks like (KEYLIST BODY...). EXPR is evaluated and compared +against each key in each KEYLIST; the corresponding BODY is evaluated. +If no clause succeeds, case returns nil. A single atom may be used in +place of a KEYLIST of one atom. A KEYLIST of `t' or `otherwise' is +allowed only in the final clause, and matches if no other keys match. +Key values are compared by `eql'." nil 'macro) - tag-table-alist controls which tables apply to which buffers - tags-file-name a default tags table - tags-build-completion-table controls completion behavior - buffer-tag-table another way of specifying a buffer-local table - make-tags-files-invisible whether tags tables should be very hidden - tag-mark-stack-max how many tags-based hops to remember" t nil) +(autoload 'ecase "cl-macs" "\ +(ecase EXPR CLAUSES...): like `case', but error if no case fits. +`otherwise'-clauses are not allowed." nil 'macro) -(autoload 'tag-complete-symbol "etags" "\ -The function used to do tags-completion (using 'tag-completion-predicate)." t nil) +(autoload 'typecase "cl-macs" "\ +(typecase EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value. +Each clause looks like (TYPE BODY...). EXPR is evaluated and, if it +satisfies TYPE, the corresponding BODY is evaluated. If no clause succeeds, +typecase returns nil. A TYPE of `t' or `otherwise' is allowed only in the +final clause, and matches if no other keys match." nil 'macro) -(autoload 'next-file "etags" "\ -Select next file among files in current tag table(s). +(autoload 'etypecase "cl-macs" "\ +(etypecase EXPR CLAUSES...): like `typecase', but error if no case fits. +`otherwise'-clauses are not allowed." nil 'macro) -A first argument of t (prefix arg, if interactive) initializes to the -beginning of the list of files in the (first) tags table. If the argument -is neither nil nor t, it is evalled to initialize the list of files. +(autoload 'block "cl-macs" "\ +(block NAME BODY...): define a lexically-scoped block named NAME. +NAME may be any symbol. Code inside the BODY forms can call `return-from' +to jump prematurely out of the block. This differs from `catch' and `throw' +in two respects: First, the NAME is an unevaluated symbol rather than a +quoted symbol or other form; and second, NAME is lexically rather than +dynamically scoped: Only references to it within BODY will work. These +references may appear inside macro expansions, but not inside functions +called from BODY." nil 'macro) -Non-nil second argument NOVISIT means use a temporary buffer -to save time and avoid uninteresting warnings. +(autoload 'return "cl-macs" "\ +(return [RESULT]): return from the block named nil. +This is equivalent to `(return-from nil RESULT)'." nil 'macro) -Value is nil if the file was already visited; -if the file was newly read in, the value is the filename." t nil) +(autoload 'return-from "cl-macs" "\ +(return-from NAME [RESULT]): return from the block named NAME. +This jumps out to the innermost enclosing `(block NAME ...)' form, +returning RESULT from that form (or nil if RESULT is omitted). +This is compatible with Common Lisp, but note that `defun' and +`defmacro' do not create implicit blocks as they do in Common Lisp." nil 'macro) -(autoload 'tags-loop-continue "etags" "\ -Continue last \\[tags-search] or \\[tags-query-replace] command. -Used noninteractively with non-nil argument to begin such a command (the -argument is passed to `next-file', which see). -Two variables control the processing we do on each file: -the value of `tags-loop-scan' is a form to be executed on each file -to see if it is interesting (it returns non-nil if so) -and `tags-loop-operate' is a form to execute to operate on an interesting file -If the latter returns non-nil, we exit; otherwise we scan the next file." t nil) +(autoload 'loop "cl-macs" "\ +(loop CLAUSE...): The Common Lisp `loop' macro. +Valid clauses are: + for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM, + for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR, + for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND, + always COND, never COND, thereis COND, collect EXPR into VAR, + append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR, + count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR, + if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], + unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], + do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR, + finally return EXPR, named NAME." nil 'macro) -(autoload 'tags-search "etags" "\ -Search through all files listed in tags table for match for REGEXP. -Stops when a match is found. -To continue searching for next match, use command \\[tags-loop-continue]. +(autoload 'do "cl-macs" "\ +The Common Lisp `do' loop. +Format is: (do ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro) -See documentation of variable `tag-table-alist'." t nil) +(autoload 'do* "cl-macs" "\ +The Common Lisp `do*' loop. +Format is: (do* ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro) -(autoload 'tags-query-replace "etags" "\ -Query-replace-regexp FROM with TO through all files listed in tags table. -Third arg DELIMITED (prefix arg) means replace only word-delimited matches. -If you exit (\\[keyboard-quit] or ESC), you can resume the query-replace -with the command \\[tags-loop-continue]. +(autoload 'dolist "cl-macs" "\ +(dolist (VAR LIST [RESULT]) BODY...): loop over a list. +Evaluate BODY with VAR bound to each `car' from LIST, in turn. +Then evaluate RESULT to get return value, default nil." nil 'macro) -See documentation of variable `tag-table-alist'." t nil) +(autoload 'dotimes "cl-macs" "\ +(dotimes (VAR COUNT [RESULT]) BODY...): loop a certain number of times. +Evaluate BODY with VAR bound to successive integers from 0, inclusive, +to COUNT, exclusive. Then evaluate RESULT to get return value, default +nil." nil 'macro) -(autoload 'list-tags "etags" "\ -Display list of tags in FILE." t nil) +(autoload 'do-symbols "cl-macs" "\ +(dosymbols (VAR [OBARRAY [RESULT]]) BODY...): loop over all symbols. +Evaluate BODY with VAR bound to each interned symbol, or to each symbol +from OBARRAY." nil 'macro) -(autoload 'tags-apropos "etags" "\ -Display list of all tags in tag table REGEXP matches." t nil) -(define-key esc-map "*" 'pop-tag-mark) +(autoload 'do-all-symbols "cl-macs" nil nil 'macro) -(autoload 'pop-tag-mark "etags" "\ -Go to last tag position. -`find-tag' maintains a mark-stack seperate from the \\[set-mark-command] mark-stack. -This function pops (and moves to) the tag at the top of this stack." t nil) +(autoload 'psetq "cl-macs" "\ +(psetq SYM VAL SYM VAL ...): set SYMs to the values VALs in parallel. +This is like `setq', except that all VAL forms are evaluated (in order) +before assigning any symbols SYM to the corresponding values." nil 'macro) -;;;*** - -;;;### (autoloads (finder-by-keyword) "finder" "lisp/finder.el") +(autoload 'progv "cl-macs" "\ +(progv SYMBOLS VALUES BODY...): bind SYMBOLS to VALUES dynamically in BODY. +The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists. +Each SYMBOL in the first list is bound to the corresponding VALUE in the +second list (or made unbound if VALUES is shorter than SYMBOLS); then the +BODY forms are executed and their result is returned. This is much like +a `let' form, except that the list of symbols can be computed at run-time." nil 'macro) -(autoload 'finder-by-keyword "finder" "\ -Find packages matching a given keyword." t nil) +(autoload 'flet "cl-macs" "\ +(flet ((FUNC ARGLIST BODY...) ...) FORM...): make temporary function defns. +This is an analogue of `let' that operates on the function cell of FUNC +rather than its value cell. The FORMs are evaluated with the specified +function definitions in place, then the definitions are undone (the FUNCs +go back to their previous definitions, or lack thereof)." nil 'macro) -;;;*** - -;;;### (autoloads (font-lock-set-defaults-1 font-lock-fontify-buffer turn-off-font-lock turn-on-font-lock font-lock-mode) "font-lock" "lisp/font-lock.el") +(autoload 'labels "cl-macs" "\ +(labels ((FUNC ARGLIST BODY...) ...) FORM...): make temporary func bindings. +This is like `flet', except the bindings are lexical instead of dynamic. +Unlike `flet', this macro is fully compliant with the Common Lisp standard." nil 'macro) -(defcustom font-lock-auto-fontify t "*Whether font-lock should automatically fontify files as they're loaded.\nThis will only happen if font-lock has fontifying keywords for the major\nmode of the file. You can get finer-grained control over auto-fontification\nby using this variable in combination with `font-lock-mode-enable-list' or\n`font-lock-mode-disable-list'." :type 'boolean :group 'font-lock) +(autoload 'macrolet "cl-macs" "\ +(macrolet ((NAME ARGLIST BODY...) ...) FORM...): make temporary macro defns. +This is like `flet', but for macros instead of functions." nil 'macro) -(defcustom font-lock-mode-enable-list nil "*List of modes to auto-fontify, if `font-lock-auto-fontify' is nil." :type '(repeat (symbol :tag "Mode")) :group 'font-lock) +(autoload 'symbol-macrolet "cl-macs" "\ +(symbol-macrolet ((NAME EXPANSION) ...) FORM...): make symbol macro defns. +Within the body FORMs, references to the variable NAME will be replaced +by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...)." nil 'macro) -(defcustom font-lock-mode-disable-list nil "*List of modes not to auto-fontify, if `font-lock-auto-fontify' is t." :type '(repeat (symbol :tag "Mode")) :group 'font-lock) +(autoload 'lexical-let "cl-macs" "\ +(lexical-let BINDINGS BODY...): like `let', but lexically scoped. +The main visible difference is that lambdas inside BODY will create +lexical closures as in Common Lisp." nil 'macro) -(defcustom font-lock-use-colors '(color) "*Specification for when Font Lock will set up color defaults.\nNormally this should be '(color), meaning that Font Lock will set up\ncolor defaults that are only used on color displays. Set this to nil\nif you don't want Font Lock to set up color defaults at all. This\nshould be one of\n\n-- a list of valid tags, meaning that the color defaults will be used\n when all of the tags apply. (e.g. '(color x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-fonts'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock) +(autoload 'lexical-let* "cl-macs" "\ +(lexical-let* BINDINGS BODY...): like `let*', but lexically scoped. +The main visible difference is that lambdas inside BODY will create +lexical closures as in Common Lisp." nil 'macro) -(defcustom font-lock-use-fonts '(or (mono) (grayscale)) "*Specification for when Font Lock will set up non-color defaults.\n\nNormally this should be '(or (mono) (grayscale)), meaning that Font\nLock will set up non-color defaults that are only used on either mono\nor grayscale displays. Set this to nil if you don't want Font Lock to\nset up non-color defaults at all. This should be one of\n\n-- a list of valid tags, meaning that the non-color defaults will be used\n when all of the tags apply. (e.g. '(grayscale x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-colors'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock) +(autoload 'multiple-value-bind "cl-macs" "\ +(multiple-value-bind (SYM SYM...) FORM BODY): collect multiple return values. +FORM must return a list; the BODY is then executed with the first N elements +of this list bound (`let'-style) to each of the symbols SYM in turn. This +is analogous to the Common Lisp `multiple-value-bind' macro, using lists to +simulate true multiple return values. For compatibility, (values A B C) is +a synonym for (list A B C)." nil 'macro) -(defcustom font-lock-maximum-decoration t "*If non-nil, the maximum decoration level for fontifying.\nIf nil, use the minimum decoration (equivalent to level 0).\nIf t, use the maximum decoration available.\nIf a number, use that level of decoration (or if not available the maximum).\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 2) (c-mode . t) (t . 1))\nmeans use level 2 decoration for buffers in `c++-mode', the maximum decoration\navailable for buffers in `c-mode', and level 1 decoration otherwise." :type '(choice (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1) (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t . t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Decoration" (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1))))) :group 'font-lock) +(autoload 'multiple-value-setq "cl-macs" "\ +(multiple-value-setq (SYM SYM...) FORM): collect multiple return values. +FORM must return a list; the first N elements of this list are stored in +each of the symbols SYM in turn. This is analogous to the Common Lisp +`multiple-value-setq' macro, using lists to simulate true multiple return +values. For compatibility, (values A B C) is a synonym for (list A B C)." nil 'macro) -(define-obsolete-variable-alias 'font-lock-use-maximal-decoration 'font-lock-maximum-decoration) +(autoload 'locally "cl-macs" nil nil 'macro) -(defcustom font-lock-maximum-size (* 250 1024) "*If non-nil, the maximum size for buffers for fontifying.\nOnly buffers less than this can be fontified when Font Lock mode is turned on.\nIf nil, means size is irrelevant.\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 256000) (c-mode . 256000) (rmail-mode . 1048576))\nmeans that the maximum size is 250K for buffers in `c++-mode' or `c-mode', one\nmegabyte for buffers in `rmail-mode', and size is irrelevant otherwise." :type '(choice (const :tag "none" nil) (integer :tag "size") (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Size" (const :tag "none" nil) (integer :tag "size"))))) :group 'font-lock) +(autoload 'the "cl-macs" nil nil 'macro) -(defvar font-lock-keywords nil "\ -A list of the keywords to highlight. -Each element should be of the form: +(autoload 'declare "cl-macs" nil nil 'macro) - MATCHER - (MATCHER . MATCH) - (MATCHER . FACENAME) - (MATCHER . HIGHLIGHT) - (MATCHER HIGHLIGHT ...) - (eval . FORM) +(autoload 'define-setf-method "cl-macs" "\ +(define-setf-method NAME ARGLIST BODY...): define a `setf' method. +This method shows how to handle `setf's to places of the form (NAME ARGS...). +The argument forms ARGS are bound according to ARGLIST, as if NAME were +going to be expanded as a macro, then the BODY forms are executed and must +return a list of five elements: a temporary-variables list, a value-forms +list, a store-variables list (of length one), a store-form, and an access- +form. See `defsetf' for a simpler way to define most setf-methods." nil 'macro) -where HIGHLIGHT should be either MATCH-HIGHLIGHT or MATCH-ANCHORED. +(autoload 'defsetf "cl-macs" "\ +(defsetf NAME FUNC): define a `setf' method. +This macro is an easy-to-use substitute for `define-setf-method' that works +well for simple place forms. In the simple `defsetf' form, `setf's of +the form (setf (NAME ARGS...) VAL) are transformed to function or macro +calls of the form (FUNC ARGS... VAL). Example: (defsetf aref aset). +Alternate form: (defsetf NAME ARGLIST (STORE) BODY...). +Here, the above `setf' call is expanded by binding the argument forms ARGS +according to ARGLIST, binding the value form VAL to STORE, then executing +BODY, which must return a Lisp form that does the necessary `setf' operation. +Actually, ARGLIST and STORE may be bound to temporary variables which are +introduced automatically to preserve proper execution order of the arguments. +Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." nil 'macro) -FORM is an expression, whose value should be a keyword element, -evaluated when the keyword is (first) used in a buffer. This feature -can be used to provide a keyword that can only be generated when Font -Lock mode is actually turned on. +(autoload 'get-setf-method "cl-macs" "\ +Return a list of five values describing the setf-method for PLACE. +PLACE may be any Lisp form which can appear as the PLACE argument to +a macro like `setf' or `incf'." nil nil) -For highlighting single items, typically only MATCH-HIGHLIGHT is required. -However, if an item or (typically) items is to be highlighted following the -instance of another item (the anchor) then MATCH-ANCHORED may be required. - -MATCH-HIGHLIGHT should be of the form: - - (MATCH FACENAME OVERRIDE LAXMATCH) - -Where MATCHER can be either the regexp to search for, a variable -containing the regexp to search for, or the function to call to make -the search (called with one argument, the limit of the search). MATCH -is the subexpression of MATCHER to be highlighted. FACENAME is either -a symbol naming a face, or an expression whose value is the face name -to use. If you want FACENAME to be a symbol that evaluates to a face, -use a form like \"(progn sym)\". - -OVERRIDE and LAXMATCH are flags. If OVERRIDE is t, existing fontification may -be overwritten. If `keep', only parts not already fontified are highlighted. -If `prepend' or `append', existing fontification is merged with the new, in -which the new or existing fontification, respectively, takes precedence. -If LAXMATCH is non-nil, no error is signalled if there is no MATCH in MATCHER. - -For example, an element of the form highlights (if not already highlighted): - - \"\\\\\\=\" Discrete occurrences of \"foo\" in the value of the - variable `font-lock-keyword-face'. - (\"fu\\\\(bar\\\\)\" . 1) Substring \"bar\" within all occurrences of \"fubar\" in - the value of `font-lock-keyword-face'. - (\"fubar\" . fubar-face) Occurrences of \"fubar\" in the value of `fubar-face'. - (\"foo\\\\|bar\" 0 foo-bar-face t) - Occurrences of either \"foo\" or \"bar\" in the value - of `foo-bar-face', even if already highlighted. - -MATCH-ANCHORED should be of the form: - - (MATCHER PRE-MATCH-FORM POST-MATCH-FORM MATCH-HIGHLIGHT ...) - -Where MATCHER is as for MATCH-HIGHLIGHT with one exception; see below. -PRE-MATCH-FORM and POST-MATCH-FORM are evaluated before the first, and after -the last, instance MATCH-ANCHORED's MATCHER is used. Therefore they can be -used to initialize before, and cleanup after, MATCHER is used. Typically, -PRE-MATCH-FORM is used to move to some position relative to the original -MATCHER, before starting with MATCH-ANCHORED's MATCHER. POST-MATCH-FORM might -be used to move, before resuming with MATCH-ANCHORED's parent's MATCHER. - -For example, an element of the form highlights (if not already highlighted): - - (\"\\\\\\=\" (0 anchor-face) (\"\\\\\\=\" nil nil (0 item-face))) - - Discrete occurrences of \"anchor\" in the value of `anchor-face', and subsequent - discrete occurrences of \"item\" (on the same line) in the value of `item-face'. - (Here PRE-MATCH-FORM and POST-MATCH-FORM are nil. Therefore \"item\" is - initially searched for starting from the end of the match of \"anchor\", and - searching for subsequent instance of \"anchor\" resumes from where searching - for \"item\" concluded.) - -The above-mentioned exception is as follows. The limit of the MATCHER search -defaults to the end of the line after PRE-MATCH-FORM is evaluated. -However, if PRE-MATCH-FORM returns a position greater than the position after -PRE-MATCH-FORM is evaluated, that position is used as the limit of the search. -It is generally a bad idea to return a position greater than the end of the -line, i.e., cause the MATCHER search to span lines. - -Note that the MATCH-ANCHORED feature is experimental; in the future, we may -replace it with other ways of providing this functionality. +(autoload 'setf "cl-macs" "\ +(setf PLACE VAL PLACE VAL ...): set each PLACE to the value of its VAL. +This is a generalized version of `setq'; the PLACEs may be symbolic +references such as (car x) or (aref x i), as well as plain symbols. +For example, (setf (cadar x) y) is equivalent to (setcar (cdar x) y). +The return value is the last VAL in the list." nil 'macro) -These regular expressions should not match text which spans lines. While -\\[font-lock-fontify-buffer] handles multi-line patterns correctly, updating -when you edit the buffer does not, since it considers text one line at a time. +(autoload 'psetf "cl-macs" "\ +(psetf PLACE VAL PLACE VAL ...): set PLACEs to the values VALs in parallel. +This is like `setf', except that all VAL forms are evaluated (in order) +before assigning any PLACEs to the corresponding values." nil 'macro) -Be very careful composing regexps for this list; -the wrong pattern can dramatically slow things down!") +(autoload 'cl-do-pop "cl-macs" nil nil nil) -(make-variable-buffer-local 'font-lock-keywords) +(autoload 'remf "cl-macs" "\ +(remf PLACE TAG): remove TAG from property list PLACE. +PLACE may be a symbol, or any generalized variable allowed by `setf'. +The form returns true if TAG was found and removed, nil otherwise." nil 'macro) -(defcustom font-lock-mode nil "Non nil means `font-lock-mode' is on" :group 'font-lock :type 'boolean :initialize 'custom-initialize-default :require 'font-lock :set (function (lambda (var val) (font-lock-mode (or val 0))))) +(autoload 'shiftf "cl-macs" "\ +(shiftf PLACE PLACE... VAL): shift left among PLACEs. +Example: (shiftf A B C) sets A to B, B to C, and returns the old A. +Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro) -(defvar font-lock-mode-hook nil "\ -Function or functions to run on entry to font-lock-mode.") +(autoload 'rotatef "cl-macs" "\ +(rotatef PLACE...): rotate left among PLACEs. +Example: (rotatef A B C) sets A to B, B to C, and C to A. It returns nil. +Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro) -(autoload 'font-lock-mode "font-lock" "\ -Toggle Font Lock Mode. -With arg, turn font-lock mode on if and only if arg is positive. +(autoload 'letf "cl-macs" "\ +(letf ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs. +This is the analogue of `let', but with generalized variables (in the +sense of `setf') for the PLACEs. Each PLACE is set to the corresponding +VALUE, then the BODY forms are executed. On exit, either normally or +because of a `throw' or error, the PLACEs are set back to their original +values. Note that this macro is *not* available in Common Lisp. +As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)', +the PLACE is not modified before executing BODY." nil 'macro) -When Font Lock mode is enabled, text is fontified as you type it: +(autoload 'letf* "cl-macs" "\ +(letf* ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs. +This is the analogue of `let*', but with generalized variables (in the +sense of `setf') for the PLACEs. Each PLACE is set to the corresponding +VALUE, then the BODY forms are executed. On exit, either normally or +because of a `throw' or error, the PLACEs are set back to their original +values. Note that this macro is *not* available in Common Lisp. +As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)', +the PLACE is not modified before executing BODY." nil 'macro) - - Comments are displayed in `font-lock-comment-face'; - - Strings are displayed in `font-lock-string-face'; - - Documentation strings (in Lisp-like languages) are displayed in - `font-lock-doc-string-face'; - - Language keywords (\"reserved words\") are displayed in - `font-lock-keyword-face'; - - Function names in their defining form are displayed in - `font-lock-function-name-face'; - - Variable names in their defining form are displayed in - `font-lock-variable-name-face'; - - Type names are displayed in `font-lock-type-face'; - - References appearing in help files and the like are displayed - in `font-lock-reference-face'; - - Preprocessor declarations are displayed in - `font-lock-preprocessor-face'; +(autoload 'callf "cl-macs" "\ +(callf FUNC PLACE ARGS...): set PLACE to (FUNC PLACE ARGS...). +FUNC should be an unquoted function name. PLACE may be a symbol, +or any generalized variable allowed by `setf'." nil 'macro) - and +(autoload 'callf2 "cl-macs" "\ +(callf2 FUNC ARG1 PLACE ARGS...): set PLACE to (FUNC ARG1 PLACE ARGS...). +Like `callf', but PLACE is the second argument of FUNC, not the first." nil 'macro) - - Certain other expressions are displayed in other faces according - to the value of the variable `font-lock-keywords'. +(autoload 'define-modify-macro "cl-macs" "\ +(define-modify-macro NAME ARGLIST FUNC): define a `setf'-like modify macro. +If NAME is called, it combines its PLACE argument with the other arguments +from ARGLIST using FUNC: (define-modify-macro incf (&optional (n 1)) +)" nil 'macro) -Where modes support different levels of fontification, you can use the variable -`font-lock-maximum-decoration' to specify which level you generally prefer. -When you turn Font Lock mode on/off the buffer is fontified/defontified, though -fontification occurs only if the buffer is less than `font-lock-maximum-size'. -To fontify a buffer without turning on Font Lock mode, and regardless of buffer -size, you can use \\[font-lock-fontify-buffer]. +(autoload 'defstruct "cl-macs" "\ +(defstruct (NAME OPTIONS...) (SLOT SLOT-OPTS...)...): define a struct type. +This macro defines a new Lisp data type called NAME, which contains data +stored in SLOTs. This defines a `make-NAME' constructor, a `copy-NAME' +copier, a `NAME-p' predicate, and setf-able `NAME-SLOT' accessors." nil 'macro) -See the variable `font-lock-keywords' for customization." t nil) +(autoload 'cl-struct-setf-expander "cl-macs" nil nil nil) -(autoload 'turn-on-font-lock "font-lock" "\ -Unconditionally turn on Font Lock mode." nil nil) +(autoload 'deftype "cl-macs" "\ +(deftype NAME ARGLIST BODY...): define NAME as a new data type. +The type name can then be used in `typecase', `check-type', etc." nil 'macro) -(autoload 'turn-off-font-lock "font-lock" "\ -Unconditionally turn off Font Lock mode." nil nil) +(autoload 'typep "cl-macs" "\ +Check that OBJECT is of type TYPE. +TYPE is a Common Lisp-style type specifier." nil nil) -(autoload 'font-lock-fontify-buffer "font-lock" "\ -Fontify the current buffer the way `font-lock-mode' would. -See `font-lock-mode' for details. +(autoload 'check-type "cl-macs" "\ +Verify that FORM is of type TYPE; signal an error if not. +STRING is an optional description of the desired type." nil 'macro) -This can take a while for large buffers." t nil) +(autoload 'assert "cl-macs" "\ +Verify that FORM returns non-nil; signal an error if not. +Second arg SHOW-ARGS means to include arguments of FORM in message. +Other args STRING and ARGS... are arguments to be passed to `error'. +They are not evaluated unless the assertion fails. If STRING is +omitted, a default message listing FORM itself is used." nil 'macro) -(autoload 'font-lock-set-defaults-1 "font-lock" nil nil nil) +(autoload 'ignore-errors "cl-macs" "\ +Execute FORMS; if an error occurs, return nil. +Otherwise, return result of last FORM." nil 'macro) -(add-minor-mode 'font-lock-mode " Font") +(autoload 'ignore-file-errors "cl-macs" "\ +Execute FORMS; if an error of type `file-error' occurs, return nil. +Otherwise, return result of last FORM." nil 'macro) + +(autoload 'define-compiler-macro "cl-macs" "\ +(define-compiler-macro FUNC ARGLIST BODY...): Define a compiler-only macro. +This is like `defmacro', but macro expansion occurs only if the call to +FUNC is compiled (i.e., not interpreted). Compiler macros should be used +for optimizing the way calls to FUNC are compiled; the form returned by +BODY should do the same thing as a call to the normal function called +FUNC, though possibly more efficiently. Note that, like regular macros, +compiler macros are expanded repeatedly until no further expansions are +possible. Unlike regular macros, BODY can decide to \"punt\" and leave the +original function call alone by declaring an initial `&whole foo' parameter +and then returning foo." nil 'macro) + +(autoload 'compiler-macroexpand "cl-macs" nil nil nil) ;;;*** -;;;### (autoloads (gnuserv-start gnuserv-running-p) "gnuserv" "lisp/gnuserv.el") +;;;### (autoloads (batch-remove-old-elc) "cleantree" "lisp/cleantree.el") -(defcustom gnuserv-frame nil "*The frame to be used to display all edited files.\nIf nil, then a new frame is created for each file edited.\nIf t, then the currently selected frame will be used.\nIf a function, then this will be called with a symbol `x' or `tty' as the\nonly argument, and its return value will be interpreted as above." :tag "Gnuserv Frame" :type '(radio (const :tag "Create new frame each time" nil) (const :tag "Use selected frame" t) (function-item :tag "Use main Emacs frame" gnuserv-main-frame-function) (function-item :tag "Use visible frame, otherwise create new" gnuserv-visible-frame-function) (function-item :tag "Create special Gnuserv frame and use it" gnuserv-special-frame-function) (function :tag "Other")) :group 'gnuserv :group 'frames) +(autoload 'batch-remove-old-elc "cleantree" nil nil nil) -(autoload 'gnuserv-running-p "gnuserv" "\ -Return non-nil if a gnuserv process is running from this XEmacs session." nil nil) +;;;*** + +;;;### (autoloads (config-value config-value-hash-table) "config" "lisp/config.el") -(autoload 'gnuserv-start "gnuserv" "\ -Allow this Emacs process to be a server for client processes. -This starts a gnuserv communications subprocess through which -client \"editors\" (gnuclient and gnudoit) can send editing commands to -this Emacs job. See the gnuserv(1) manual page for more details. +(autoload 'config-value-hash-table "config" "\ +Return hash table of configuration parameters and their values." nil nil) -Prefix arg means just kill any existing server communications subprocess." t nil) +(autoload 'config-value "config" "\ +Return the value of the configuration parameter CONFIG_SYMBOL." nil nil) ;;;*** -;;;### (autoloads nil "help-macro" "lisp/help-macro.el") - -(defcustom three-step-help t "*Non-nil means give more info about Help command in three steps.\nThe three steps are simple prompt, prompt with all options,\nand window listing and describing the options.\nA value of nil means skip the middle step, so that\n\\[help-command] \\[help-command] gives the window that lists the options." :type 'boolean :group 'help-appearance) +;;;### (autoloads (Custom-make-dependencies) "cus-dep" "lisp/cus-dep.el") + +(autoload 'Custom-make-dependencies "cus-dep" "\ +Extract custom dependencies from .el files in SUBDIRS. +SUBDIRS is a list of directories. If it is nil, the command-line +arguments are used. If it is a string, only that directory is +processed. This function is especially useful in batch mode. + +Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS" t nil) ;;;*** -;;;### (autoloads (hyper-apropos-popup-menu hyper-apropos-set-variable hyper-set-variable hyper-apropos-read-variable-symbol hyper-describe-function hyper-where-is hyper-describe-variable hyper-describe-face hyper-describe-key-briefly hyper-describe-key hyper-apropos) "hyper-apropos" "lisp/hyper-apropos.el") +;;;### (autoloads (custom-migrate-custom-file customize-menu-create custom-menu-create custom-save-all customize-save-customized customize-browse custom-buffer-create-other-window custom-buffer-create customize-apropos-groups customize-apropos-faces customize-apropos-options customize-apropos customize-saved customize-customized customize-face-other-window customize-face customize-option-other-window customize-changed-options customize-variable customize-other-window customize customize-save-variable customize-set-variable customize-set-value) "cus-edit" "lisp/cus-edit.el") -(autoload 'hyper-apropos "hyper-apropos" "\ -Display lists of functions and variables matching REGEXP -in buffer \"*Hyper Apropos*\". If optional prefix arg is given, then the -value of `hyper-apropos-programming-apropos' is toggled for this search. -See also `hyper-apropos-mode'." t nil) +(autoload 'customize-set-value "cus-edit" "\ +Set VARIABLE to VALUE. VALUE is a Lisp object. -(autoload 'hyper-describe-key "hyper-apropos" nil t nil) +If VARIABLE has a `variable-interactive' property, that is used as if +it were the arg to `interactive' (which see) to interactively read the value. -(autoload 'hyper-describe-key-briefly "hyper-apropos" nil t nil) +If VARIABLE has a `custom-type' property, it must be a widget and the +`:prompt-value' property of that widget will be used for reading the value. -(autoload 'hyper-describe-face "hyper-apropos" "\ -Describe face.. -See also `hyper-apropos' and `hyper-describe-function'." t nil) +If given a prefix (or a COMMENT argument), also prompt for a comment." t nil) -(autoload 'hyper-describe-variable "hyper-apropos" "\ -Hypertext drop-in replacement for `describe-variable'. -See also `hyper-apropos' and `hyper-describe-function'." t nil) +(autoload 'customize-set-variable "cus-edit" "\ +Set the default for VARIABLE to VALUE. VALUE is a Lisp object. -(autoload 'hyper-where-is "hyper-apropos" "\ -Print message listing key sequences that invoke specified command." t nil) +If VARIABLE has a `custom-set' property, that is used for setting +VARIABLE, otherwise `set-default' is used. -(autoload 'hyper-describe-function "hyper-apropos" "\ -Hypertext replacement for `describe-function'. Unlike `describe-function' -in that the symbol under the cursor is the default if it is a function. -See also `hyper-apropos' and `hyper-describe-variable'." t nil) +The `customized-value' property of the VARIABLE will be set to a list +with a quoted VALUE as its sole list member. -(autoload 'hyper-apropos-read-variable-symbol "hyper-apropos" "\ -Hypertext drop-in replacement for `describe-variable'. -See also `hyper-apropos' and `hyper-describe-function'." nil nil) +If VARIABLE has a `variable-interactive' property, that is used as if +it were the arg to `interactive' (which see) to interactively read the value. -(define-obsolete-function-alias 'hypropos-read-variable-symbol 'hyper-apropos-read-variable-symbol) +If VARIABLE has a `custom-type' property, it must be a widget and the +`:prompt-value' property of that widget will be used for reading the value. -(define-obsolete-function-alias 'hypropos-get-doc 'hyper-apropos-get-doc) +If given a prefix (or a COMMENT argument), also prompt for a comment." t nil) -(autoload 'hyper-set-variable "hyper-apropos" nil t nil) +(autoload 'customize-save-variable "cus-edit" "\ +Set the default for VARIABLE to VALUE, and save it for future sessions. +If VARIABLE has a `custom-set' property, that is used for setting +VARIABLE, otherwise `set-default' is used. -(autoload 'hyper-apropos-set-variable "hyper-apropos" "\ -Interactively set the variable on the current line." t nil) +The `customized-value' property of the VARIABLE will be set to a list +with a quoted VALUE as its sole list member. -(define-obsolete-function-alias 'hypropos-set-variable 'hyper-apropos-set-variable) +If VARIABLE has a `variable-interactive' property, that is used as if +it were the arg to `interactive' (which see) to interactively read the value. -(autoload 'hyper-apropos-popup-menu "hyper-apropos" nil t nil) +If VARIABLE has a `custom-type' property, it must be a widget and the +`:prompt-value' property of that widget will be used for reading the value. -(define-obsolete-function-alias 'hypropos-popup-menu 'hyper-apropos-popup-menu) +If given a prefix (or a COMMENT argument), also prompt for a comment." t nil) -;;;*** - -;;;### (autoloads (Info-elisp-ref Info-emacs-key Info-goto-emacs-key-command-node Info-goto-emacs-command-node Info-emacs-command Info-search Info-visit-file Info-goto-node Info-batch-rebuild-dir Info-query info) "info" "lisp/info.el") +(autoload 'customize "cus-edit" "\ +Select a customization buffer which you can use to set user options. +User options are structured into \"groups\". +The default group is `Emacs'." t nil) -(defvar Info-directory-list nil "\ -List of directories to search for Info documentation files. +(defalias 'customize-group 'customize) -The first directory in this list, the \"dir\" file there will become -the (dir)Top node of the Info documentation tree. +(autoload 'customize-other-window "cus-edit" "\ +Customize SYMBOL, which must be a customization group." t nil) -Note: DO NOT use the `customize' interface to change the value of this -variable. Its value is created dynamically on each startup, depending -on XEmacs packages installed on the system. If you want to change the -search path, make the needed modifications on the variable's value -from .emacs. For instance: +(defalias 'customize-group-other-window 'customize-other-window) - (setq Info-directory-list (cons \"~/info\" Info-directory-list))") +(defalias 'customize-option 'customize-variable) -(autoload 'info "info" "\ -Enter Info, the documentation browser. -Optional argument FILE specifies the file to examine; -the default is the top-level directory of Info. +(autoload 'customize-variable "cus-edit" "\ +Customize SYMBOL, which must be a user option variable." t nil) -In interactive use, a prefix argument directs this command -to read a file name from the minibuffer." t nil) +(autoload 'customize-changed-options "cus-edit" "\ +Customize all user option variables whose default values changed recently. +This means, in other words, variables defined with a `:version' keyword." t nil) -(autoload 'Info-query "info" "\ -Enter Info, the documentation browser. Prompt for name of Info file." t nil) +(defalias 'customize-variable-other-window 'customize-option-other-window) -(autoload 'Info-batch-rebuild-dir "info" "\ -(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\"" nil nil) +(autoload 'customize-option-other-window "cus-edit" "\ +Customize SYMBOL, which must be a user option variable. +Show the buffer in another window, but don't select it." t nil) -(autoload 'Info-goto-node "info" "\ -Go to info node named NAME. Give just NODENAME or (FILENAME)NODENAME. -Actually, the following interpretations of NAME are tried in order: - (FILENAME)NODENAME - (FILENAME) (using Top node) - NODENAME (in current file) - TAGNAME (see below) - FILENAME (using Top node) -where TAGNAME is a string that appears in quotes: \"TAGNAME\", in an -annotation for any node of any file. (See `a' and `x' commands.)" t nil) +(autoload 'customize-face "cus-edit" "\ +Customize SYMBOL, which should be a face name or nil. +If SYMBOL is nil, customize all faces." t nil) -(autoload 'Info-visit-file "info" "\ -Directly visit an info file." t nil) +(autoload 'customize-face-other-window "cus-edit" "\ +Show customization buffer for FACE in other window." t nil) -(autoload 'Info-search "info" "\ -Search for REGEXP, starting from point, and select node it's found in." t nil) +(autoload 'customize-customized "cus-edit" "\ +Customize all user options set since the last save in this session." t nil) -(autoload 'Info-emacs-command "info" "\ -Look up an Emacs command in the Emacs manual in the Info system. -This command is designed to be used whether you are already in Info or not." t nil) +(autoload 'customize-saved "cus-edit" "\ +Customize all already saved user options." t nil) -(autoload 'Info-goto-emacs-command-node "info" "\ -Look up an Emacs command in the Emacs manual in the Info system. -This command is designed to be used whether you are already in Info or not." t nil) +(autoload 'customize-apropos "cus-edit" "\ +Customize all user options matching REGEXP. +If ALL is `options', include only options. +If ALL is `faces', include only faces. +If ALL is `groups', include only groups. +If ALL is t (interactively, with prefix arg), include options which are not +user-settable, as well as faces and groups." t nil) -(autoload 'Info-goto-emacs-key-command-node "info" "\ -Look up an Emacs key sequence in the Emacs manual in the Info system. -This command is designed to be used whether you are already in Info or not." t nil) +(autoload 'customize-apropos-options "cus-edit" "\ +Customize all user options matching REGEXP. +With prefix arg, include options which are not user-settable." t nil) -(autoload 'Info-emacs-key "info" "\ -Look up an Emacs key sequence in the Emacs manual in the Info system. -This command is designed to be used whether you are already in Info or not." t nil) +(autoload 'customize-apropos-faces "cus-edit" "\ +Customize all user faces matching REGEXP." t nil) -(autoload 'Info-elisp-ref "info" "\ -Look up an Emacs Lisp function in the Elisp manual in the Info system. -This command is designed to be used whether you are already in Info or not." t nil) +(autoload 'customize-apropos-groups "cus-edit" "\ +Customize all user groups matching REGEXP." t nil) -;;;*** - -;;;### (autoloads nil "itimer-autosave" "lisp/itimer-autosave.el") +(autoload 'custom-buffer-create "cus-edit" "\ +Create a buffer containing OPTIONS. +Optional NAME is the name of the buffer. +OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where +SYMBOL is a customization option, and WIDGET is a widget for editing +that option." nil nil) -;;;*** - -;;;### (autoloads nil "loaddefs" "lisp/loaddefs.el") +(autoload 'custom-buffer-create-other-window "cus-edit" "\ +Create a buffer containing OPTIONS. +Optional NAME is the name of the buffer. +OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where +SYMBOL is a customization option, and WIDGET is a widget for editing +that option." nil nil) -;;;*** - -;;;### (autoloads nil "loadhist" "lisp/loadhist.el") +(autoload 'customize-browse "cus-edit" "\ +Create a tree browser for the customize hierarchy." t nil) -;;;*** - -;;;### (autoloads (mswindows-reset-device-font-menus) "msw-font-menu" "lisp/msw-font-menu.el") +(autoload 'customize-save-customized "cus-edit" "\ +Save all user options which have been set in this session." t nil) -(autoload 'mswindows-reset-device-font-menus "msw-font-menu" "\ -Generates the `Font', `Size', and `Weight' submenus for the Options menu. -This is run the first time that a font-menu is needed for each device. -If you don't like the lazy invocation of this function, you can add it to -`create-device-hook' and that will make the font menus respond more quickly -when they are selected for the first time. If you add fonts to your system, -or if you change your font path, you can call this to re-initialize the menus." nil nil) +(autoload 'custom-save-all "cus-edit" "\ +Save all customizations in `custom-file'." nil nil) -(defun* mswindows-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match mswindows-font-regexp name) (setq family (match-string 1 name)) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match mswindows-font-regexp truename)) (setq family (match-string 1 truename)) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from mswindows-font-menu-font-data (make-vector 5 nil))) (when (string-match mswindows-font-regexp name) (setq weight (match-string 2 name)) (setq size (string-to-int (match-string 4 name)))) (when (string-match mswindows-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (match-string 2 truename))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 4 truename)))) (setq slant (match-string 5 truename))) (vector entry family size weight slant))) +(autoload 'custom-menu-create "cus-edit" "\ +Create menu for customization group SYMBOL. +The menu is in a format applicable to `easy-menu-define'." nil nil) -;;;*** - -;;;### (autoloads (mwheel-install) "mwheel" "lisp/mwheel.el") +(autoload 'customize-menu-create "cus-edit" "\ +Return a customize menu for customization group SYMBOL. +If optional NAME is given, use that as the name of the menu. +Otherwise the menu will be named `Customize'. +The format is suitable for use with `easy-menu-define'." nil nil) -(autoload 'mwheel-install "mwheel" "\ -Enable mouse wheel support." nil nil) +(autoload 'custom-migrate-custom-file "cus-edit" "\ +Migrate custom file from home directory." nil nil) ;;;*** -;;;### (autoloads (package-admin-add-binary-package package-admin-add-single-file-package) "package-admin" "lisp/package-admin.el") +;;;### (autoloads (custom-reset-faces custom-theme-reset-faces custom-theme-face-value custom-theme-set-faces custom-set-faces custom-set-face-update-spec custom-declare-face) "cus-face" "lisp/cus-face.el") -(autoload 'package-admin-add-single-file-package "package-admin" "\ -Install a single file Lisp package into XEmacs package hierarchy. -`file' should be the full path to the lisp file to install. -`destdir' should be a simple directory name. -The optional `pkg-dir' can be used to override the default package hierarchy -\(car (last late-packages))." t nil) +(autoload 'custom-declare-face "cus-face" "\ +Like `defface', but FACE is evaluated as a normal argument." nil nil) -(autoload 'package-admin-add-binary-package "package-admin" "\ -Install a pre-bytecompiled XEmacs package into package hierarchy." t nil) +(autoload 'custom-set-face-update-spec "cus-face" "\ +Customize the FACE for display types matching DISPLAY, merging + in the new items from PLIST" nil nil) -;;;*** - -;;;### (autoloads (package-get-custom package-get-package-provider package-get package-get-dependencies package-get-all package-get-update-all package-get-delete-package package-get-save-base package-get-update-base-from-buffer package-get-update-base package-get-update-base-entry package-get-require-base package-get-download-menu) "package-get" "lisp/package-get.el") +(autoload 'custom-set-faces "cus-face" "\ +Initialize faces according to user preferences. +This asociates the setting with the USER theme. +The arguments should be a list where each entry has the form: -(defvar package-get-base nil "\ -List of packages that are installed at this site. -For each element in the alist, car is the package name and the cdr is -a plist containing information about the package. Typical fields -kept in the plist are: + (FACE SPEC [NOW [COMMENT]]) -version - version of this package -provides - list of symbols provided -requires - list of symbols that are required. - These in turn are provided by other packages. -filename - name of the file. -size - size of the file (aka the bundled package) -md5sum - computed md5 checksum -description - What this package is for. -type - Whether this is a 'binary (default) or 'single file package +SPEC will be stored as the saved value for FACE. If NOW is present +and non-nil, FACE will also be created according to SPEC. +COMMENT is a string comment about FACE. -More fields may be added as needed. An example: - -'( - (name - (version \"\" - file \"filename\" - description \"what this package is about.\" - provides () - requires () - size - md5sum \"\" - file \"filename\" - description \"what this package is about.\" - provides () - requires () - size - md5sum \" Move right after insertion. - C-c ^ Move up after insertion. - C-c . Move down after insertion. - C-c ` Move northwest (nw) after insertion. - C-c ' Move northeast (ne) after insertion. - C-c / Move southwest (sw) after insertion. - C-c \\ Move southeast (se) after insertion. -The current direction is displayed in the modeline. The initial -direction is right. Whitespace is inserted and tabs are changed to -spaces when required by movement. You can move around in the buffer -with these commands: - \\[picture-move-down] Move vertically to SAME column in previous line. - \\[picture-move-up] Move vertically to SAME column in next line. - \\[picture-end-of-line] Move to column following last non-whitespace character. - \\[picture-forward-column] Move right inserting spaces if required. - \\[picture-backward-column] Move left changing tabs to spaces if required. - C-c C-f Move in direction of current picture motion. - C-c C-b Move in opposite direction of current picture motion. - Return Move to beginning of next line. -You can edit tabular text with these commands: - M-Tab Move to column beneath (or at) next interesting character. - `Indents' relative to a previous line. - Tab Move to next stop in tab stop list. - C-c Tab Set tab stops according to context of this line. - With ARG resets tab stops to default (global) value. - See also documentation of variable picture-tab-chars - which defines \"interesting character\". You can manually - change the tab stop list with command \\[edit-tab-stops]. -You can manipulate text with these commands: - C-d Clear (replace) ARG columns after point without moving. - C-c C-d Delete char at point - the command normally assigned to C-d. - \\[picture-backward-clear-column] Clear (replace) ARG columns before point, moving back over them. - \\[picture-clear-line] Clear ARG lines, advancing over them. The cleared - text is saved in the kill ring. - \\[picture-open-line] Open blank line(s) beneath current line. -You can manipulate rectangles with these commands: - C-c C-k Clear (or kill) a rectangle and save it. - C-c C-w Like C-c C-k except rectangle is saved in named register. - C-c C-y Overlay (or insert) currently saved rectangle at point. - C-c C-x Like C-c C-y except rectangle is taken from named register. - \\[copy-rectangle-to-register] Copies a rectangle to a register. - \\[advertised-undo] Can undo effects of rectangle overlay commands - commands if invoked soon enough. -You can return to the previous mode with: - C-c C-c Which also strips trailing whitespace from every line. - Stripping is suppressed by supplying an argument. - -Entry to this mode calls the value of picture-mode-hook if non-nil. +;;;### (autoloads (disassemble) "disass" "lisp/disass.el") -Note that Picture mode commands will work outside of Picture mode, but -they are not defaultly assigned to keys." t nil) - -(defalias 'edit-picture 'picture-mode) +(autoload 'disassemble "disass" "\ +Print disassembled code for OBJECT in (optional) BUFFER. +OBJECT can be a symbol defined as a function, or a function itself +\(a lambda expression or a compiled-function object). +If OBJECT is not already compiled, we compile it, but do not +redefine OBJECT if it is a symbol." t nil) ;;;*** -;;;### (autoloads (clear-rectangle string-rectangle open-rectangle insert-rectangle yank-rectangle kill-rectangle extract-rectangle delete-extract-rectangle delete-rectangle) "rect" "lisp/rect.el") - -(autoload 'delete-rectangle "rect" "\ -Delete the text in the region-rectangle without saving it. -The same range of columns is deleted in each line starting with the line -where the region begins and ending with the line where the region ends. - -When called from a program, the rectangle's corners are START and END. -With a prefix (or FILL) argument, also fill lines where nothing has to be -deleted." t nil) +;;;### (autoloads (standard-display-european standard-display-underline standard-display-graphic standard-display-g1 standard-display-ascii standard-display-default standard-display-8bit make-display-table describe-current-display-table) "disp-table" "lisp/disp-table.el") -(autoload 'delete-extract-rectangle "rect" "\ -Delete the contents of the rectangle with corners at START and END, and -return it as a list of strings, one for each line of the rectangle. - -With an optional FILL argument, also fill lines where nothing has to be -deleted." nil nil) - -(autoload 'extract-rectangle "rect" "\ -Return the contents of the rectangle with corners at START and END, -as a list of strings, one for each line of the rectangle." nil nil) - -(defvar killed-rectangle nil "\ -Rectangle for `yank-rectangle' to insert.") - -(autoload 'kill-rectangle "rect" "\ -Delete the region-rectangle and save it as the last killed one. -You might prefer to use `delete-extract-rectangle' from a program. - -When called from a program, the rectangle's corners are START and END. -With a prefix (or FILL) argument, also fill lines where nothing has to be -deleted." t nil) - -(autoload 'yank-rectangle "rect" "\ -Yank the last killed rectangle with upper left corner at point." t nil) +(autoload 'describe-current-display-table "disp-table" "\ +Describe the display table in use in the selected window and buffer." t nil) -(autoload 'insert-rectangle "rect" "\ -Insert text of RECTANGLE with upper left corner at point. -RECTANGLE's first line is inserted at point, its second -line is inserted at a point vertically under point, etc. -RECTANGLE should be a list of strings. -After this command, the mark is at the upper left corner -and point is at the lower right corner." nil nil) +(autoload 'make-display-table "disp-table" "\ +Return a new, empty display table." nil nil) -(autoload 'open-rectangle "rect" "\ -Blank out the region-rectangle, shifting text right. +(autoload 'standard-display-8bit "disp-table" "\ +Display characters in the range L to H literally." nil nil) -When called from a program, the rectangle's corners are START and END. -With a prefix (or FILL) argument, fill with blanks even if there is no text -on the right side of the rectangle." t nil) +(autoload 'standard-display-default "disp-table" "\ +Display characters in the range L to H using the default notation." nil nil) -(autoload 'string-rectangle "rect" "\ -Insert STRING on each line of the region-rectangle, shifting text right. -The left edge of the rectangle specifies the column for insertion. +(autoload 'standard-display-ascii "disp-table" "\ +Display character C using printable string S." nil nil) -If `pending-delete-mode' is active the string replace the region. -Otherwise this command does not delete or overwrite any existing text. +(autoload 'standard-display-g1 "disp-table" "\ +Display character C as character SC in the g1 character set. +This function assumes that your terminal uses the SO/SI characters; +it is meaningless for an X frame." nil nil) -When called from a program, the rectangle's corners are START and END." t nil) +(autoload 'standard-display-graphic "disp-table" "\ +Display character C as character GC in graphics character set. +This function assumes VT100-compatible escapes; it is meaningless for an +X frame." nil nil) -(autoload 'clear-rectangle "rect" "\ -Blank out the region-rectangle. -The text previously in the region is overwritten with blanks. +(autoload 'standard-display-underline "disp-table" "\ +Display character C as character UC plus underlining." nil nil) -When called from a program, the rectangle's corners are START and END. -With a prefix (or FILL) argument, also fill with blanks the parts of the -rectangle which were empty." t nil) +(autoload 'standard-display-european "disp-table" "\ +Toggle display of European characters encoded with ISO 8859. +When enabled, characters in the range of 160 to 255 display not +as octal escapes, but as accented characters. +With prefix argument, enable European character display iff arg is positive." t nil) ;;;*** -;;;### (autoloads (list-load-path-shadows) "shadow" "lisp/shadow.el") - -(autoload 'list-load-path-shadows "shadow" "\ -Display a list of Emacs Lisp files that shadow other files. - -This function lists potential load-path problems. Directories in the -`load-path' variable are searched, in order, for Emacs Lisp -files. When a previously encountered file name is found again, a -message is displayed indicating that the later file is \"hidden\" by -the earlier. - -For example, suppose `load-path' is set to - -\(\"/usr/gnu/emacs/site-lisp\" \"/usr/gnu/emacs/share/emacs/19.30/lisp\") - -and that each of these directories contains a file called XXX.el. Then -XXX.el in the site-lisp directory is referred to by all of: -\(require 'XXX), (autoload .... \"XXX\"), (load-library \"XXX\") etc. - -The first XXX.el file prevents emacs from seeing the second (unless -the second is loaded explicitly via load-file). - -When not intended, such shadowings can be the source of subtle -problems. For example, the above situation may have arisen because the -XXX package was not distributed with versions of emacs prior to -19.30. An emacs maintainer downloaded XXX from elsewhere and installed -it. Later, XXX was updated and included in the emacs distribution. -Unless the emacs maintainer checks for this, the new version of XXX -will be hidden behind the old (which may no longer work with the new -emacs version). - -This function performs these checks and flags all possible -shadowings. Because a .el file may exist without a corresponding .elc -\(or vice-versa), these suffixes are essentially ignored. A file -XXX.elc in an early directory (that does not contain XXX.el) is -considered to shadow a later file XXX.el, and vice-versa. - -When run interactively, the shadowings (if any) are displayed in a -buffer called `*Shadows*'. Shadowings are located by calling the -\(non-interactive) companion function, `find-emacs-lisp-shadows'." t nil) +;;;### (autoloads nil "easymenu" "lisp/easymenu.el") ;;;*** -;;;### (autoloads (load-default-sounds load-sound-file) "sound" "lisp/sound.el") +;;;### (autoloads (pop-tag-mark tags-apropos list-tags tags-query-replace tags-search tags-loop-continue next-file tag-complete-symbol find-tag-other-window find-tag find-tag-at-point visit-tags-table) "etags" "lisp/etags.el") -(or sound-alist (setq sound-alist '((ready nil) (warp nil)))) +(autoload 'visit-tags-table "etags" "\ +Tell tags commands to use tags table file FILE when all else fails. +FILE should be the name of a file created with the `etags' program. +A directory name is ok too; it means file TAGS in that directory." t nil) -(autoload 'load-sound-file "sound" "\ -Read in an audio-file and add it to the sound-alist. +(autoload 'find-tag-at-point "etags" "\ +*Find tag whose name contains TAGNAME. +Identical to `find-tag' but does not prompt for tag when called interactively; +instead, uses tag around or before point." t nil) -You can only play sound files if you are running on display 0 of the -console of a machine with native sound support or running a NetAudio -server and XEmacs has the necessary sound support compiled in. +(autoload 'find-tag "etags" "\ +*Find tag whose name contains TAGNAME. + Selects the buffer that the tag is contained in +and puts point at its definition. + If TAGNAME is a null string, the expression in the buffer +around or before point is used as the tag name. + If called interactively with a numeric argument, searches for the next tag +in the tag table that matches the tagname used in the previous find-tag. + If second arg OTHER-WINDOW is non-nil, uses another window to display +the tag. -The sound file must be in the Sun/NeXT U-LAW format, except on Linux, -where .wav files are also supported by the sound card drivers." t nil) +This version of this function supports multiple active tags tables, +and completion. -(autoload 'load-default-sounds "sound" "\ -Load and install some sound files as beep-types, using -`load-sound-file'. This only works if you're on display 0 of the -console of a machine with native sound support or running a NetAudio -server and XEmacs has the necessary sound support compiled in." t nil) +Variables of note: -;;;*** - -;;;### (autoloads (ask-user-about-supersession-threat ask-user-about-lock) "userlock" "lisp/userlock.el") + tag-table-alist controls which tables apply to which buffers + tags-file-name a default tags table + tags-build-completion-table controls completion behavior + buffer-tag-table another way of specifying a buffer-local table + make-tags-files-invisible whether tags tables should be very hidden + tag-mark-stack-max how many tags-based hops to remember" t nil) -(autoload 'ask-user-about-lock "userlock" "\ -Ask user what to do when he wants to edit FILE but it is locked by USER. -This function has a choice of three things to do: - do (signal 'file-locked (list FILE USER)) - to refrain from editing the file - return t (grab the lock on the file) - return nil (edit the file even though it is locked). -You can rewrite it to use any criterion you like to choose which one to do." nil nil) +(autoload 'find-tag-other-window "etags" "\ +*Find tag whose name contains TAGNAME, in another window. + Selects the buffer that the tag is contained in in another window +and puts point at its definition. + If TAGNAME is a null string, the expression in the buffer +around or before point is used as the tag name. + If second arg NEXT is non-nil (interactively, with prefix arg), +searches for the next tag in the tag table +that matches the tagname used in the previous find-tag. -(autoload 'ask-user-about-supersession-threat "userlock" "\ -Ask a user who is about to modify an obsolete buffer what to do. -This function has two choices: it can return, in which case the modification -of the buffer will proceed, or it can (signal 'file-supersession (file)), -in which case the proposed buffer modification will not be made. +This version of this function supports multiple active tags tables, +and completion. -You can rewrite this to use any criterion you like to choose which one to do. -The buffer in question is current when this function is called." nil nil) +Variables of note: -;;;*** - -;;;### (autoloads (toggle-truncate-lines auto-view-mode view-major-mode view-mode view-minor-mode view-buffer-other-window view-file-other-window view-buffer view-file) "view-less" "lisp/view-less.el") + tag-table-alist controls which tables apply to which buffers + tags-file-name a default tags table + tags-build-completion-table controls completion behavior + buffer-tag-table another way of specifying a buffer-local table + make-tags-files-invisible whether tags tables should be very hidden + tag-mark-stack-max how many tags-based hops to remember" t nil) -(defvar view-minor-mode-map (let ((map (make-keymap))) (set-keymap-name map 'view-minor-mode-map) (suppress-keymap map) (define-key map "-" 'negative-argument) (define-key map " " 'scroll-up) (define-key map "f" 'scroll-up) (define-key map "b" 'scroll-down) (define-key map 'backspace 'scroll-down) (define-key map 'delete 'scroll-down) (define-key map " " 'view-scroll-lines-up) (define-key map "\n" 'view-scroll-lines-up) (define-key map "e" 'view-scroll-lines-up) (define-key map "j" 'view-scroll-lines-up) (define-key map "y" 'view-scroll-lines-down) (define-key map "k" 'view-scroll-lines-down) (define-key map "d" 'view-scroll-some-lines-up) (define-key map "u" 'view-scroll-some-lines-down) (define-key map "r" 'recenter) (define-key map "t" 'toggle-truncate-lines) (define-key map "N" 'view-buffer) (define-key map "E" 'view-file) (define-key map "P" 'view-buffer) (define-key map "!" 'shell-command) (define-key map "|" 'shell-command-on-region) (define-key map "=" 'what-line) (define-key map "?" 'view-search-backward) (define-key map "h" 'view-mode-describe) (define-key map "s" 'view-repeat-search) (define-key map "n" 'view-repeat-search) (define-key map "/" 'view-search-forward) (define-key map "\\" 'view-search-backward) (define-key map "g" 'view-goto-line) (define-key map "G" 'view-last-windowful) (define-key map "%" 'view-goto-percent) (define-key map "p" 'view-goto-percent) (define-key map "m" 'point-to-register) (define-key map "'" 'register-to-point) (define-key map "C" 'view-cleanup-backspaces) (define-key map "" 'view-quit) (define-key map "" 'view-quit-toggle-ro) (define-key map "q" 'view-quit) map)) +(autoload 'tag-complete-symbol "etags" "\ +The function used to do tags-completion (using 'tag-completion-predicate)." t nil) -(defvar view-mode-map (let ((map (copy-keymap view-minor-mode-map))) (set-keymap-name map 'view-mode-map) map)) +(autoload 'next-file "etags" "\ +Select next file among files in current tag table(s). -(autoload 'view-file "view-less" "\ -Find FILE, enter view mode. With prefix arg OTHER-P, use other window." t nil) +A first argument of t (prefix arg, if interactive) initializes to the +beginning of the list of files in the (first) tags table. If the argument +is neither nil nor t, it is evalled to initialize the list of files. -(autoload 'view-buffer "view-less" "\ -Switch to BUF, enter view mode. With prefix arg use other window." t nil) +Non-nil second argument NOVISIT means use a temporary buffer +to save time and avoid uninteresting warnings. -(autoload 'view-file-other-window "view-less" "\ -Find FILE in other window, and enter view mode." t nil) +Value is nil if the file was already visited; +if the file was newly read in, the value is the filename." t nil) -(autoload 'view-buffer-other-window "view-less" "\ -Switch to BUFFER in another window, and enter view mode." t nil) +(autoload 'tags-loop-continue "etags" "\ +Continue last \\[tags-search] or \\[tags-query-replace] command. +Used noninteractively with non-nil argument to begin such a command (the +argument is passed to `next-file', which see). +Two variables control the processing we do on each file: +the value of `tags-loop-scan' is a form to be executed on each file +to see if it is interesting (it returns non-nil if so) +and `tags-loop-operate' is a form to execute to operate on an interesting file +If the latter returns non-nil, we exit; otherwise we scan the next file." t nil) -(autoload 'view-minor-mode "view-less" "\ -Minor mode for viewing text, with bindings like `less'. -Commands are: -\\ -0..9 prefix args -- prefix minus -\\[scroll-up] page forward -\\[scroll-down] page back -\\[view-scroll-lines-up] scroll prefix-arg lines forward, default 1. -\\[view-scroll-lines-down] scroll prefix-arg lines backward, default 1. -\\[view-scroll-some-lines-down] scroll prefix-arg lines backward, default 10. -\\[view-scroll-some-lines-up] scroll prefix-arg lines forward, default 10. -\\[what-line] print line number -\\[view-mode-describe] print this help message -\\[view-search-forward] regexp search, uses previous string if you just hit RET -\\[view-search-backward] as above but searches backward -\\[view-repeat-search] repeat last search -\\[view-goto-line] goto line prefix-arg, default 1 -\\[view-last-windowful] goto line prefix-arg, default last line -\\[view-goto-percent] goto a position by percentage -\\[toggle-truncate-lines] toggle truncate-lines -\\[view-file] view another file -\\[view-buffer] view another buffer -\\[view-cleanup-backspaces] cleanup backspace constructions -\\[shell-command] execute a shell command -\\[shell-command-on-region] execute a shell command with the region as input -\\[view-quit] exit view-mode, and bury the current buffer. +(autoload 'tags-search "etags" "\ +Search through all files listed in tags table for match for REGEXP. +Stops when a match is found. +To continue searching for next match, use command \\[tags-loop-continue]. -If invoked with the optional (prefix) arg non-nil, view-mode cleans up -backspace constructions. +See documentation of variable `tag-table-alist'." t nil) -More precisely: -\\{view-minor-mode-map}" t nil) +(autoload 'tags-query-replace "etags" "\ +Query-replace-regexp FROM with TO through all files listed in tags table. +Third arg DELIMITED (prefix arg) means replace only word-delimited matches. +If you exit (\\[keyboard-quit] or ESC), you can resume the query-replace +with the command \\[tags-loop-continue]. -(autoload 'view-mode "view-less" "\ -View the current buffer using view-minor-mode. This exists to be 99.9% -compatible with the implementations of `view-mode' in view.el and older -versions of view-less.el." t nil) +See documentation of variable `tag-table-alist'." t nil) -(autoload 'view-major-mode "view-less" "\ -View the current buffer using view-mode, as a major mode. -This function has a nonstandard name because `view-mode' is wrongly -named but is like this for compatibility reasons." t nil) +(autoload 'list-tags "etags" "\ +Display list of tags in FILE." t nil) -(autoload 'auto-view-mode "view-less" "\ -If the file of the current buffer is not writable, call view-mode. -This is meant to be added to `find-file-hooks'." nil nil) +(autoload 'tags-apropos "etags" "\ +Display list of all tags in tag table REGEXP matches." t nil) +(define-key esc-map "*" 'pop-tag-mark) -(autoload 'toggle-truncate-lines "view-less" "\ -Toggles the values of truncate-lines. -Positive prefix arg sets, negative disables." t nil) +(autoload 'pop-tag-mark "etags" "\ +Go to last tag position. +`find-tag' maintains a mark-stack seperate from the \\[set-mark-command] mark-stack. +This function pops (and moves to) the tag at the top of this stack." t nil) ;;;*** -;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse widget-browse-at) "wid-browse" "lisp/wid-browse.el") - -(autoload 'widget-browse-at "wid-browse" "\ -Browse the widget under point." t nil) - -(autoload 'widget-browse "wid-browse" "\ -Create a widget browser for WIDGET." t nil) - -(autoload 'widget-browse-other-window "wid-browse" "\ -Show widget browser for WIDGET in other window." t nil) +;;;### (autoloads (finder-by-keyword) "finder" "lisp/finder.el") -(autoload 'widget-minor-mode "wid-browse" "\ -Togle minor mode for traversing widgets. -With arg, turn widget mode on if and only if arg is positive." t nil) +(autoload 'finder-by-keyword "finder" "\ +Find packages matching a given keyword." t nil) ;;;*** -;;;### (autoloads (widget-delete widget-create widget-prompt-value) "wid-edit" "lisp/wid-edit.el") +;;;### (autoloads (font-lock-set-defaults-1 font-lock-fontify-buffer turn-off-font-lock turn-on-font-lock font-lock-mode) "font-lock" "lisp/font-lock.el") -(autoload 'widget-prompt-value "wid-edit" "\ -Prompt for a value matching WIDGET, using PROMPT. -The current value is assumed to be VALUE, unless UNBOUND is non-nil." nil nil) +(defcustom font-lock-auto-fontify t "*Whether font-lock should automatically fontify files as they're loaded.\nThis will only happen if font-lock has fontifying keywords for the major\nmode of the file. You can get finer-grained control over auto-fontification\nby using this variable in combination with `font-lock-mode-enable-list' or\n`font-lock-mode-disable-list'." :type 'boolean :group 'font-lock) -(autoload 'widget-create "wid-edit" "\ -Create widget of TYPE. -The optional ARGS are additional keyword arguments." nil nil) +(defcustom font-lock-mode-enable-list nil "*List of modes to auto-fontify, if `font-lock-auto-fontify' is nil." :type '(repeat (symbol :tag "Mode")) :group 'font-lock) -(autoload 'widget-delete "wid-edit" "\ -Delete WIDGET." nil nil) +(defcustom font-lock-mode-disable-list nil "*List of modes not to auto-fontify, if `font-lock-auto-fontify' is t." :type '(repeat (symbol :tag "Mode")) :group 'font-lock) -;;;*** - -;;;### (autoloads (x-reset-device-font-menus) "x-font-menu" "lisp/x-font-menu.el") +(defcustom font-lock-use-colors '(color) "*Specification for when Font Lock will set up color defaults.\nNormally this should be '(color), meaning that Font Lock will set up\ncolor defaults that are only used on color displays. Set this to nil\nif you don't want Font Lock to set up color defaults at all. This\nshould be one of\n\n-- a list of valid tags, meaning that the color defaults will be used\n when all of the tags apply. (e.g. '(color x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-fonts'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock) -(autoload 'x-reset-device-font-menus "x-font-menu" "\ -Generates the `Font', `Size', and `Weight' submenus for the Options menu. -This is run the first time that a font-menu is needed for each device. -If you don't like the lazy invocation of this function, you can add it to -`create-device-hook' and that will make the font menus respond more quickly -when they are selected for the first time. If you add fonts to your system, -or if you change your font path, you can call this to re-initialize the menus." nil nil) +(defcustom font-lock-use-fonts '(or (mono) (grayscale)) "*Specification for when Font Lock will set up non-color defaults.\n\nNormally this should be '(or (mono) (grayscale)), meaning that Font\nLock will set up non-color defaults that are only used on either mono\nor grayscale displays. Set this to nil if you don't want Font Lock to\nset up non-color defaults at all. This should be one of\n\n-- a list of valid tags, meaning that the non-color defaults will be used\n when all of the tags apply. (e.g. '(grayscale x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-colors'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock) -(defun* x-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match x-font-regexp-foundry-and-family name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match x-font-regexp-foundry-and-family truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from x-font-menu-font-data (make-vector 5 nil))) (when (string-match x-font-regexp name) (setq weight (capitalize (match-string 1 name))) (setq size (string-to-int (match-string 6 name)))) (when (string-match x-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (capitalize (match-string 1 truename)))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 6 truename)))) (setq slant (capitalize (match-string 2 truename)))) (vector entry family size weight slant))) +(defcustom font-lock-maximum-decoration t "*If non-nil, the maximum decoration level for fontifying.\nIf nil, use the minimum decoration (equivalent to level 0).\nIf t, use the maximum decoration available.\nIf a number, use that level of decoration (or if not available the maximum).\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 2) (c-mode . t) (t . 1))\nmeans use level 2 decoration for buffers in `c++-mode', the maximum decoration\navailable for buffers in `c-mode', and level 1 decoration otherwise." :type '(choice (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1) (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t . t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Decoration" (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1))))) :group 'font-lock) -;;;*** - -;;;### (autoloads (x-win-init-sun) "x-win-sun" "lisp/x-win-sun.el") +(define-obsolete-variable-alias 'font-lock-use-maximal-decoration 'font-lock-maximum-decoration) -(autoload 'x-win-init-sun "x-win-sun" nil nil nil) +(defcustom font-lock-maximum-size (* 250 1024) "*If non-nil, the maximum size for buffers for fontifying.\nOnly buffers less than this can be fontified when Font Lock mode is turned on.\nIf nil, means size is irrelevant.\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 256000) (c-mode . 256000) (rmail-mode . 1048576))\nmeans that the maximum size is 250K for buffers in `c++-mode' or `c-mode', one\nmegabyte for buffers in `rmail-mode', and size is irrelevant otherwise." :type '(choice (const :tag "none" nil) (integer :tag "size") (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Size" (const :tag "none" nil) (integer :tag "size"))))) :group 'font-lock) -;;;*** - -;;;### (autoloads (x-win-init-xfree86) "x-win-xfree86" "lisp/x-win-xfree86.el") +(defvar font-lock-keywords nil "\ +A list defining the keywords for `font-lock-mode' to highlight. + + FONT-LOCK-KEYWORDS := List of FONT-LOCK-FORM's. + + FONT-LOCK-FORM :== MATCHER + | (MATCHER . MATCH) + | (MATCHER . FACE-FORM) + | (MATCHER . HIGHLIGHT) + | (MATCHER HIGHLIGHT ...) + | (eval . FORM) + + MATCHER :== A string containing a regexp. + | A variable containing a regexp to search for. + | A function to call to make the search. + It is called with one arg, the limit of the search, + and should leave MATCH results in the XEmacs global + match data. + + MATCH :== An integer match subexpression number from MATCHER. + + FACE-FORM :== The symbol naming a defined face. + | Expression whos value is the face name to use. If you + want FACE-FORM to be a symbol that evaluates to a face, + use a form like \"(progn sym)\". + + HIGHLIGHT :== MATCH-HIGHLIGHT + | MATCH-ANCHORED + + FORM :== Expression returning a FONT-LOCK-FORM, evaluated when + the FONT-LOCK-FORM is first used in a buffer. This + feature can be used to provide a FONT-LOCK-FORM that + can only be generated when Font Lock mode is actually + turned on. + + MATCH-HIGHLIGHT :== (MATCH FACE-FORM OVERRIDE LAXMATCH) + + OVERRIDE :== t - overwrite existing fontification + | 'keep - only parts not already fontified are + highlighted. + | 'prepend - merge faces, this fontification has + precedence over existing + | 'append - merge faces, existing fontification has + precedence over + this face. + + LAXMATCH :== If non-nil, no error is signalled if there is no MATCH + in MATCHER. + + MATCH-ANCHORED :== (ANCHOR-MATCHER PRE-MATCH-FORM \\ + POST-MATCH-FORM MATCH-HIGHLIGHT ...) + + ANCHOR-MATCHER :== Like a MATCHER, except that the limit of the search + defaults to the end of the line after PRE-MATCH-FORM + is evaluated. However, if PRE-MATCH-FORM returns a + position greater than the end of the line, that + position is used as the limit of the search. It is + generally a bad idea to return a position greater than + the end of the line, i.e., cause the ANCHOR-MATCHER + search to span lines. + + PRE-MATCH-FORM :== Evaluated before the ANCHOR-MATCHER is used, therefore + can be used to initialize before, ANCHOR-MATCHER is + used. Typically, PRE-MATCH-FORM is used to move to + some position relative to the original MATCHER, before + starting with the ANCHOR-MATCHER. + + POST-MATCH-FORM :== Like PRE-MATCH-FORM, but used to clean up after the + ANCHOR-MATCHER. It might be used to move, before + resuming with MATCH-ANCHORED's parent's MATCHER. + +For example, an element of the first form highlights (if not already highlighted): + + \"\\\\\" Discrete occurrences of \"foo\" in the value + of the variable `font-lock-keyword-face'. + + (\"fu\\\\(bar\\\\)\" . 1) Substring \"bar\" within all occurrences of + \"fubar\" in the value of + `font-lock-keyword-face'. + + (\"fubar\" . fubar-face) Occurrences of \"fubar\" in the value of + `fubar-face'. + + (\"foo\\\\|bar\" 0 foo-bar-face t) Occurrences of either \"foo\" or \"bar\" in the + value of `foo-bar-face', even if already + highlighted. + + (fubar-match 1 fubar-face) The first subexpression within all + occurrences of whatever the function + `fubar-match' finds and matches in the value + of `fubar-face'. + + (\"\\\\\" (0 anchor-face) (\"\\\\\" nil nil (0 item-face))) + -------------- --------------- ------------ --- --- ------------- + | | | | | | + MATCHER | ANCHOR-MATCHER | +------+ MATCH-HIGHLIGHT + MATCH-HIGHLIGHT PRE-MATCH-FORM | + POST-MATCH-FORM + + Discrete occurrences of \"anchor\" in the value of `anchor-face', and + subsequent discrete occurrences of \"item\" (on the same line) in the value + of `item-face'. (Here PRE-MATCH-FORM and POST-MATCH-FORM are nil. + Therefore \"item\" is initially searched for starting from the end of the + match of \"anchor\", and searching for subsequent instance of \"anchor\" + resumes from where searching for \"item\" concluded.) -(autoload 'x-win-init-xfree86 "x-win-xfree86" nil nil nil) +For highlighting single items, typically only MATCH-HIGHLIGHT is required. +However, if an item or (typically) several items are to be highlighted +following the instance of another item (the anchor) then MATCH-ANCHORED may be +required. -;;;*** - -;;;### (autoloads nil "abbrev" "lisp\\abbrev.el") +These regular expressions should not match text which spans lines. While +\\[font-lock-fontify-buffer] handles multi-line patterns correctly, updating when you +edit the buffer does not, since it considers text one line at a time. -;;;*** - -;;;### (autoloads (about-xemacs) "about" "lisp\\about.el") +Be very careful composing regexps for this list; the wrong pattern can +dramatically slow things down! +") -(autoload 'about-xemacs "about" "\ -Describe the True Editor and its minions." t nil) +(make-variable-buffer-local 'font-lock-keywords) -;;;*** - -;;;### (autoloads (set-modified-alist modify-alist remove-alist set-alist del-alist put-alist vassoc) "alist" "lisp\\alist.el") +(defcustom font-lock-mode nil "Non nil means `font-lock-mode' is on" :group 'font-lock :type 'boolean :initialize 'custom-initialize-default :require 'font-lock :set (function (lambda (var val) (font-lock-mode (or val 0))))) -(autoload 'vassoc "alist" "\ -Search VALIST for a vector whose first element is equal to KEY. -See also `assoc'." nil nil) +(defvar font-lock-mode-hook nil "\ +Function or functions to run on entry to font-lock-mode.") -(autoload 'put-alist "alist" "\ -Modify ALIST to set VALUE to ITEM. -If there is a pair whose car is ITEM, replace its cdr by VALUE. -If there is not such pair, create new pair (ITEM . VALUE) and -return new alist whose car is the new pair and cdr is ALIST. -[tomo's ELIS like function]" nil nil) +(autoload 'font-lock-mode "font-lock" "\ +Toggle Font Lock Mode. +With arg, turn font-lock mode on if and only if arg is positive. -(autoload 'del-alist "alist" "\ -If there is a pair whose key is ITEM, delete it from ALIST. -[tomo's ELIS emulating function]" nil nil) +When Font Lock mode is enabled, text is fontified as you type it: -(autoload 'set-alist "alist" "\ -Modify a alist indicated by SYMBOL to set VALUE to ITEM." nil nil) + - Comments are displayed in `font-lock-comment-face'; + - Strings are displayed in `font-lock-string-face'; + - Documentation strings (in Lisp-like languages) are displayed in + `font-lock-doc-string-face'; + - Language keywords (\"reserved words\") are displayed in + `font-lock-keyword-face'; + - Function names in their defining form are displayed in + `font-lock-function-name-face'; + - Variable names in their defining form are displayed in + `font-lock-variable-name-face'; + - Type names are displayed in `font-lock-type-face'; + - References appearing in help files and the like are displayed + in `font-lock-reference-face'; + - Preprocessor declarations are displayed in + `font-lock-preprocessor-face'; -(autoload 'remove-alist "alist" "\ -Remove ITEM from the alist indicated by SYMBOL." nil nil) + and -(autoload 'modify-alist "alist" "\ -Modify alist DEFAULT into alist MODIFIER." nil nil) + - Certain other expressions are displayed in other faces according + to the value of the variable `font-lock-keywords'. -(autoload 'set-modified-alist "alist" "\ -Modify a value of a symbol SYM into alist MODIFIER. -The symbol SYM should be alist. If it is not bound, -its value regard as nil." nil nil) +Where modes support different levels of fontification, you can use the variable +`font-lock-maximum-decoration' to specify which level you generally prefer. +When you turn Font Lock mode on/off the buffer is fontified/defontified, though +fontification occurs only if the buffer is less than `font-lock-maximum-size'. +To fontify a buffer without turning on Font Lock mode, and regardless of buffer +size, you can use \\[font-lock-fontify-buffer]. -;;;*** - -;;;### (autoloads (apropos-documentation apropos-value apropos apropos-command) "apropos" "lisp\\apropos.el") +See the variable `font-lock-keywords' for customization." t nil) -(fset 'command-apropos 'apropos-command) +(autoload 'turn-on-font-lock "font-lock" "\ +Unconditionally turn on Font Lock mode." nil nil) -(autoload 'apropos-command "apropos" "\ -Shows commands (interactively callable functions) that match REGEXP. -With optional prefix ARG or if `apropos-do-all' is non-nil, also show -variables." t nil) +(autoload 'turn-off-font-lock "font-lock" "\ +Unconditionally turn off Font Lock mode." nil nil) -(autoload 'apropos "apropos" "\ -Show all bound symbols whose names match REGEXP. -With optional prefix ARG or if `apropos-do-all' is non-nil, also show unbound -symbols and key bindings, which is a little more time-consuming. -Returns list of symbols and documentation found." t nil) +(autoload 'font-lock-fontify-buffer "font-lock" "\ +Fontify the current buffer the way `font-lock-mode' would. +See `font-lock-mode' for details. -(autoload 'apropos-value "apropos" "\ -Show all symbols whose value's printed image matches REGEXP. -With optional prefix ARG or if `apropos-do-all' is non-nil, also looks -at the function and at the names and values of properties. -Returns list of symbols and values found." t nil) +This can take a while for large buffers." t nil) -(autoload 'apropos-documentation "apropos" "\ -Show symbols whose documentation contain matches for REGEXP. -With optional prefix ARG or if `apropos-do-all' is non-nil, also use -documentation that is not stored in the documentation file and show key -bindings. -Returns list of symbols and documentation found." t nil) +(autoload 'font-lock-set-defaults-1 "font-lock" nil nil nil) + +(add-minor-mode 'font-lock-mode " Font") ;;;*** -;;;### (autoloads nil "buff-menu" "lisp\\buff-menu.el") +;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "font-menu" "lisp/font-menu.el") -(defvar list-buffers-directory nil) +(defcustom font-menu-ignore-scaled-fonts nil "*If non-nil, then the font menu will try to show only bitmap fonts." :type 'boolean :group 'font-menu) + +(defcustom font-menu-this-frame-only-p nil "*If non-nil, then changing the default font from the font menu will only\naffect one frame instead of all frames." :type 'boolean :group 'font-menu) -(make-variable-buffer-local 'list-buffers-directory) +(fset 'install-font-menus 'reset-device-font-menus) -;;;*** - -;;;### (autoloads (compiler-macroexpand define-compiler-macro ignore-file-errors ignore-errors assert check-type typep deftype cl-struct-setf-expander defstruct define-modify-macro callf2 callf letf* letf rotatef shiftf remf cl-do-pop psetf setf get-setf-method defsetf define-setf-method declare the locally multiple-value-setq multiple-value-bind lexical-let* lexical-let symbol-macrolet macrolet labels flet progv psetq do-all-symbols do-symbols dotimes dolist do* do loop return-from return block etypecase typecase ecase case load-time-value eval-when destructuring-bind function* defmacro* defun* cl-compile-time-init) "cl-macs" "lisp\\cl-macs.el") +(autoload 'reset-device-font-menus "font-menu" "\ +Generates the `Font', `Size', and `Weight' submenus for the Options menu. +This is run the first time that a font-menu is needed for each device. +If you don't like the lazy invocation of this function, you can add it to +`create-device-hook' and that will make the font menus respond more quickly +when they are selected for the first time. If you add fonts to your system, +or if you change your font path, you can call this to re-initialize the menus." nil nil) -(autoload 'cl-compile-time-init "cl-macs" nil nil nil) +(autoload 'font-menu-family-constructor "font-menu" nil nil nil) -(autoload 'defun* "cl-macs" "\ -(defun* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a function. -Like normal `defun', except ARGLIST allows full Common Lisp conventions, -and BODY is implicitly surrounded by (block NAME ...)." nil 'macro) +(autoload 'font-menu-size-constructor "font-menu" nil nil nil) -(autoload 'defmacro* "cl-macs" "\ -(defmacro* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a macro. -Like normal `defmacro', except ARGLIST allows full Common Lisp conventions, -and BODY is implicitly surrounded by (block NAME ...)." nil 'macro) +(autoload 'font-menu-weight-constructor "font-menu" nil nil nil) -(autoload 'function* "cl-macs" "\ -(function* SYMBOL-OR-LAMBDA): introduce a function. -Like normal `function', except that if argument is a lambda form, its -ARGLIST allows full Common Lisp conventions." nil 'macro) +;;;*** + +;;;### (autoloads (x-font-build-cache font-default-size-for-device font-default-encoding-for-device font-default-registry-for-device font-default-family-for-device font-default-object-for-device font-default-font-for-device font-create-object) "font" "lisp/font.el") -(autoload 'destructuring-bind "cl-macs" nil nil 'macro) +(autoload 'font-create-object "font" nil nil nil) -(autoload 'eval-when "cl-macs" "\ -(eval-when (WHEN...) BODY...): control when BODY is evaluated. -If `compile' is in WHEN, BODY is evaluated when compiled at top-level. -If `load' is in WHEN, BODY is evaluated when loaded after top-level compile. -If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level." nil 'macro) +(autoload 'font-default-font-for-device "font" nil nil nil) -(autoload 'load-time-value "cl-macs" "\ -Like `progn', but evaluates the body at load time. -The result of the body appears to the compiler as a quoted constant." nil 'macro) +(autoload 'font-default-object-for-device "font" nil nil nil) -(autoload 'case "cl-macs" "\ -(case EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value. -Each clause looks like (KEYLIST BODY...). EXPR is evaluated and compared -against each key in each KEYLIST; the corresponding BODY is evaluated. -If no clause succeeds, case returns nil. A single atom may be used in -place of a KEYLIST of one atom. A KEYLIST of `t' or `otherwise' is -allowed only in the final clause, and matches if no other keys match. -Key values are compared by `eql'." nil 'macro) +(autoload 'font-default-family-for-device "font" nil nil nil) -(autoload 'ecase "cl-macs" "\ -(ecase EXPR CLAUSES...): like `case', but error if no case fits. -`otherwise'-clauses are not allowed." nil 'macro) +(autoload 'font-default-registry-for-device "font" nil nil nil) -(autoload 'typecase "cl-macs" "\ -(typecase EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value. -Each clause looks like (TYPE BODY...). EXPR is evaluated and, if it -satisfies TYPE, the corresponding BODY is evaluated. If no clause succeeds, -typecase returns nil. A TYPE of `t' or `otherwise' is allowed only in the -final clause, and matches if no other keys match." nil 'macro) +(autoload 'font-default-encoding-for-device "font" nil nil nil) -(autoload 'etypecase "cl-macs" "\ -(etypecase EXPR CLAUSES...): like `typecase', but error if no case fits. -`otherwise'-clauses are not allowed." nil 'macro) +(autoload 'font-default-size-for-device "font" nil nil nil) -(autoload 'block "cl-macs" "\ -(block NAME BODY...): define a lexically-scoped block named NAME. -NAME may be any symbol. Code inside the BODY forms can call `return-from' -to jump prematurely out of the block. This differs from `catch' and `throw' -in two respects: First, the NAME is an unevaluated symbol rather than a -quoted symbol or other form; and second, NAME is lexically rather than -dynamically scoped: Only references to it within BODY will work. These -references may appear inside macro expansions, but not inside functions -called from BODY." nil 'macro) +(autoload 'x-font-build-cache "font" nil nil nil) -(autoload 'return "cl-macs" "\ -(return [RESULT]): return from the block named nil. -This is equivalent to `(return-from nil RESULT)'." nil 'macro) +;;;*** + +;;;### (autoloads (gnuserv-start gnuserv-running-p) "gnuserv" "lisp/gnuserv.el") -(autoload 'return-from "cl-macs" "\ -(return-from NAME [RESULT]): return from the block named NAME. -This jumps out to the innermost enclosing `(block NAME ...)' form, -returning RESULT from that form (or nil if RESULT is omitted). -This is compatible with Common Lisp, but note that `defun' and -`defmacro' do not create implicit blocks as they do in Common Lisp." nil 'macro) +(defcustom gnuserv-frame nil "*The frame to be used to display all edited files.\nIf nil, then a new frame is created for each file edited.\nIf t, then the currently selected frame will be used.\nIf a function, then this will be called with a symbol `x' or `tty' as the\nonly argument, and its return value will be interpreted as above." :tag "Gnuserv Frame" :type '(radio (const :tag "Create new frame each time" nil) (const :tag "Use selected frame" t) (function-item :tag "Use main Emacs frame" gnuserv-main-frame-function) (function-item :tag "Use visible frame, otherwise create new" gnuserv-visible-frame-function) (function-item :tag "Create special Gnuserv frame and use it" gnuserv-special-frame-function) (function :tag "Other")) :group 'gnuserv :group 'frames) -(autoload 'loop "cl-macs" "\ -(loop CLAUSE...): The Common Lisp `loop' macro. -Valid clauses are: - for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM, - for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR, - for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND, - always COND, never COND, thereis COND, collect EXPR into VAR, - append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR, - count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR, - if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], - unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], - do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR, - finally return EXPR, named NAME." nil 'macro) +(autoload 'gnuserv-running-p "gnuserv" "\ +Return non-nil if a gnuserv process is running from this XEmacs session." nil nil) -(autoload 'do "cl-macs" "\ -The Common Lisp `do' loop. -Format is: (do ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro) +(autoload 'gnuserv-start "gnuserv" "\ +Allow this Emacs process to be a server for client processes. +This starts a gnuserv communications subprocess through which +client \"editors\" (gnuclient and gnudoit) can send editing commands to +this Emacs job. See the gnuserv(1) manual page for more details. -(autoload 'do* "cl-macs" "\ -The Common Lisp `do*' loop. -Format is: (do* ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro) +Prefix arg means just kill any existing server communications subprocess." t nil) -(autoload 'dolist "cl-macs" "\ -(dolist (VAR LIST [RESULT]) BODY...): loop over a list. -Evaluate BODY with VAR bound to each `car' from LIST, in turn. -Then evaluate RESULT to get return value, default nil." nil 'macro) +;;;*** + +;;;### (autoloads nil "help-macro" "lisp/help-macro.el") -(autoload 'dotimes "cl-macs" "\ -(dotimes (VAR COUNT [RESULT]) BODY...): loop a certain number of times. -Evaluate BODY with VAR bound to successive integers from 0, inclusive, -to COUNT, exclusive. Then evaluate RESULT to get return value, default -nil." nil 'macro) +(defcustom three-step-help t "*Non-nil means give more info about Help command in three steps.\nThe three steps are simple prompt, prompt with all options,\nand window listing and describing the options.\nA value of nil means skip the middle step, so that\n\\[help-command] \\[help-command] gives the window that lists the options." :type 'boolean :group 'help-appearance) -(autoload 'do-symbols "cl-macs" "\ -(dosymbols (VAR [OBARRAY [RESULT]]) BODY...): loop over all symbols. -Evaluate BODY with VAR bound to each interned symbol, or to each symbol -from OBARRAY." nil 'macro) +;;;*** + +;;;### (autoloads (hyper-apropos-popup-menu hyper-apropos-set-variable hyper-set-variable hyper-apropos-read-variable-symbol hyper-describe-function hyper-where-is hyper-describe-variable hyper-describe-face hyper-describe-key-briefly hyper-describe-key hyper-apropos) "hyper-apropos" "lisp/hyper-apropos.el") -(autoload 'do-all-symbols "cl-macs" nil nil 'macro) +(autoload 'hyper-apropos "hyper-apropos" "\ +Display lists of functions and variables matching REGEXP +in buffer \"*Hyper Apropos*\". If optional prefix arg is given, then the +value of `hyper-apropos-programming-apropos' is toggled for this search. +See also `hyper-apropos-mode'." t nil) -(autoload 'psetq "cl-macs" "\ -(psetq SYM VAL SYM VAL ...): set SYMs to the values VALs in parallel. -This is like `setq', except that all VAL forms are evaluated (in order) -before assigning any symbols SYM to the corresponding values." nil 'macro) +(autoload 'hyper-describe-key "hyper-apropos" nil t nil) -(autoload 'progv "cl-macs" "\ -(progv SYMBOLS VALUES BODY...): bind SYMBOLS to VALUES dynamically in BODY. -The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists. -Each SYMBOL in the first list is bound to the corresponding VALUE in the -second list (or made unbound if VALUES is shorter than SYMBOLS); then the -BODY forms are executed and their result is returned. This is much like -a `let' form, except that the list of symbols can be computed at run-time." nil 'macro) +(autoload 'hyper-describe-key-briefly "hyper-apropos" nil t nil) -(autoload 'flet "cl-macs" "\ -(flet ((FUNC ARGLIST BODY...) ...) FORM...): make temporary function defns. -This is an analogue of `let' that operates on the function cell of FUNC -rather than its value cell. The FORMs are evaluated with the specified -function definitions in place, then the definitions are undone (the FUNCs -go back to their previous definitions, or lack thereof)." nil 'macro) +(autoload 'hyper-describe-face "hyper-apropos" "\ +Describe face.. +See also `hyper-apropos' and `hyper-describe-function'." t nil) -(autoload 'labels "cl-macs" "\ -(labels ((FUNC ARGLIST BODY...) ...) FORM...): make temporary func bindings. -This is like `flet', except the bindings are lexical instead of dynamic. -Unlike `flet', this macro is fully compliant with the Common Lisp standard." nil 'macro) +(autoload 'hyper-describe-variable "hyper-apropos" "\ +Hypertext drop-in replacement for `describe-variable'. +See also `hyper-apropos' and `hyper-describe-function'." t nil) -(autoload 'macrolet "cl-macs" "\ -(macrolet ((NAME ARGLIST BODY...) ...) FORM...): make temporary macro defns. -This is like `flet', but for macros instead of functions." nil 'macro) +(autoload 'hyper-where-is "hyper-apropos" "\ +Print message listing key sequences that invoke specified command." t nil) -(autoload 'symbol-macrolet "cl-macs" "\ -(symbol-macrolet ((NAME EXPANSION) ...) FORM...): make symbol macro defns. -Within the body FORMs, references to the variable NAME will be replaced -by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...)." nil 'macro) +(autoload 'hyper-describe-function "hyper-apropos" "\ +Hypertext replacement for `describe-function'. Unlike `describe-function' +in that the symbol under the cursor is the default if it is a function. +See also `hyper-apropos' and `hyper-describe-variable'." t nil) -(autoload 'lexical-let "cl-macs" "\ -(lexical-let BINDINGS BODY...): like `let', but lexically scoped. -The main visible difference is that lambdas inside BODY will create -lexical closures as in Common Lisp." nil 'macro) +(autoload 'hyper-apropos-read-variable-symbol "hyper-apropos" "\ +Hypertext drop-in replacement for `describe-variable'. +See also `hyper-apropos' and `hyper-describe-function'." nil nil) -(autoload 'lexical-let* "cl-macs" "\ -(lexical-let* BINDINGS BODY...): like `let*', but lexically scoped. -The main visible difference is that lambdas inside BODY will create -lexical closures as in Common Lisp." nil 'macro) +(define-obsolete-function-alias 'hypropos-read-variable-symbol 'hyper-apropos-read-variable-symbol) -(autoload 'multiple-value-bind "cl-macs" "\ -(multiple-value-bind (SYM SYM...) FORM BODY): collect multiple return values. -FORM must return a list; the BODY is then executed with the first N elements -of this list bound (`let'-style) to each of the symbols SYM in turn. This -is analogous to the Common Lisp `multiple-value-bind' macro, using lists to -simulate true multiple return values. For compatibility, (values A B C) is -a synonym for (list A B C)." nil 'macro) +(define-obsolete-function-alias 'hypropos-get-doc 'hyper-apropos-get-doc) -(autoload 'multiple-value-setq "cl-macs" "\ -(multiple-value-setq (SYM SYM...) FORM): collect multiple return values. -FORM must return a list; the first N elements of this list are stored in -each of the symbols SYM in turn. This is analogous to the Common Lisp -`multiple-value-setq' macro, using lists to simulate true multiple return -values. For compatibility, (values A B C) is a synonym for (list A B C)." nil 'macro) +(autoload 'hyper-set-variable "hyper-apropos" nil t nil) -(autoload 'locally "cl-macs" nil nil 'macro) +(autoload 'hyper-apropos-set-variable "hyper-apropos" "\ +Interactively set the variable on the current line." t nil) -(autoload 'the "cl-macs" nil nil 'macro) +(define-obsolete-function-alias 'hypropos-set-variable 'hyper-apropos-set-variable) -(autoload 'declare "cl-macs" nil nil 'macro) +(autoload 'hyper-apropos-popup-menu "hyper-apropos" nil t nil) -(autoload 'define-setf-method "cl-macs" "\ -(define-setf-method NAME ARGLIST BODY...): define a `setf' method. -This method shows how to handle `setf's to places of the form (NAME ARGS...). -The argument forms ARGS are bound according to ARGLIST, as if NAME were -going to be expanded as a macro, then the BODY forms are executed and must -return a list of five elements: a temporary-variables list, a value-forms -list, a store-variables list (of length one), a store-form, and an access- -form. See `defsetf' for a simpler way to define most setf-methods." nil 'macro) +(define-obsolete-function-alias 'hypropos-popup-menu 'hyper-apropos-popup-menu) -(autoload 'defsetf "cl-macs" "\ -(defsetf NAME FUNC): define a `setf' method. -This macro is an easy-to-use substitute for `define-setf-method' that works -well for simple place forms. In the simple `defsetf' form, `setf's of -the form (setf (NAME ARGS...) VAL) are transformed to function or macro -calls of the form (FUNC ARGS... VAL). Example: (defsetf aref aset). -Alternate form: (defsetf NAME ARGLIST (STORE) BODY...). -Here, the above `setf' call is expanded by binding the argument forms ARGS -according to ARGLIST, binding the value form VAL to STORE, then executing -BODY, which must return a Lisp form that does the necessary `setf' operation. -Actually, ARGLIST and STORE may be bound to temporary variables which are -introduced automatically to preserve proper execution order of the arguments. -Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." nil 'macro) +;;;*** + +;;;### (autoloads (Info-elisp-ref Info-emacs-key Info-goto-emacs-key-command-node Info-goto-emacs-command-node Info-emacs-command Info-search Info-visit-file Info-goto-node Info-batch-rebuild-dir Info-query info) "info" "lisp/info.el") -(autoload 'get-setf-method "cl-macs" "\ -Return a list of five values describing the setf-method for PLACE. -PLACE may be any Lisp form which can appear as the PLACE argument to -a macro like `setf' or `incf'." nil nil) +(defvar Info-directory-list nil "\ +List of directories to search for Info documentation files. -(autoload 'setf "cl-macs" "\ -(setf PLACE VAL PLACE VAL ...): set each PLACE to the value of its VAL. -This is a generalized version of `setq'; the PLACEs may be symbolic -references such as (car x) or (aref x i), as well as plain symbols. -For example, (setf (cadar x) y) is equivalent to (setcar (cdar x) y). -The return value is the last VAL in the list." nil 'macro) +The first directory in this list, the \"dir\" file there will become +the (dir)Top node of the Info documentation tree. -(autoload 'psetf "cl-macs" "\ -(psetf PLACE VAL PLACE VAL ...): set PLACEs to the values VALs in parallel. -This is like `setf', except that all VAL forms are evaluated (in order) -before assigning any PLACEs to the corresponding values." nil 'macro) +Note: DO NOT use the `customize' interface to change the value of this +variable. Its value is created dynamically on each startup, depending +on XEmacs packages installed on the system. If you want to change the +search path, make the needed modifications on the variable's value +from .emacs. For instance: -(autoload 'cl-do-pop "cl-macs" nil nil nil) + (setq Info-directory-list (cons \"~/info\" Info-directory-list))") -(autoload 'remf "cl-macs" "\ -(remf PLACE TAG): remove TAG from property list PLACE. -PLACE may be a symbol, or any generalized variable allowed by `setf'. -The form returns true if TAG was found and removed, nil otherwise." nil 'macro) +(autoload 'info "info" "\ +Enter Info, the documentation browser. +Optional argument FILE specifies the file to examine; +the default is the top-level directory of Info. -(autoload 'shiftf "cl-macs" "\ -(shiftf PLACE PLACE... VAL): shift left among PLACEs. -Example: (shiftf A B C) sets A to B, B to C, and returns the old A. -Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro) +In interactive use, a prefix argument directs this command +to read a file name from the minibuffer." t nil) -(autoload 'rotatef "cl-macs" "\ -(rotatef PLACE...): rotate left among PLACEs. -Example: (rotatef A B C) sets A to B, B to C, and C to A. It returns nil. -Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro) +(autoload 'Info-query "info" "\ +Enter Info, the documentation browser. Prompt for name of Info file." t nil) -(autoload 'letf "cl-macs" "\ -(letf ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs. -This is the analogue of `let', but with generalized variables (in the -sense of `setf') for the PLACEs. Each PLACE is set to the corresponding -VALUE, then the BODY forms are executed. On exit, either normally or -because of a `throw' or error, the PLACEs are set back to their original -values. Note that this macro is *not* available in Common Lisp. -As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)', -the PLACE is not modified before executing BODY." nil 'macro) +(autoload 'Info-batch-rebuild-dir "info" "\ +(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\"" nil nil) -(autoload 'letf* "cl-macs" "\ -(letf* ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs. -This is the analogue of `let*', but with generalized variables (in the -sense of `setf') for the PLACEs. Each PLACE is set to the corresponding -VALUE, then the BODY forms are executed. On exit, either normally or -because of a `throw' or error, the PLACEs are set back to their original -values. Note that this macro is *not* available in Common Lisp. -As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)', -the PLACE is not modified before executing BODY." nil 'macro) +(autoload 'Info-goto-node "info" "\ +Go to info node named NAME. Give just NODENAME or (FILENAME)NODENAME. +Actually, the following interpretations of NAME are tried in order: + (FILENAME)NODENAME + (FILENAME) (using Top node) + NODENAME (in current file) + TAGNAME (see below) + FILENAME (using Top node) +where TAGNAME is a string that appears in quotes: \"TAGNAME\", in an +annotation for any node of any file. (See `a' and `x' commands.)" t nil) -(autoload 'callf "cl-macs" "\ -(callf FUNC PLACE ARGS...): set PLACE to (FUNC PLACE ARGS...). -FUNC should be an unquoted function name. PLACE may be a symbol, -or any generalized variable allowed by `setf'." nil 'macro) +(autoload 'Info-visit-file "info" "\ +Directly visit an info file." t nil) -(autoload 'callf2 "cl-macs" "\ -(callf2 FUNC ARG1 PLACE ARGS...): set PLACE to (FUNC ARG1 PLACE ARGS...). -Like `callf', but PLACE is the second argument of FUNC, not the first." nil 'macro) +(autoload 'Info-search "info" "\ +Search for REGEXP, starting from point, and select node it's found in." t nil) -(autoload 'define-modify-macro "cl-macs" "\ -(define-modify-macro NAME ARGLIST FUNC): define a `setf'-like modify macro. -If NAME is called, it combines its PLACE argument with the other arguments -from ARGLIST using FUNC: (define-modify-macro incf (&optional (n 1)) +)" nil 'macro) +(autoload 'Info-emacs-command "info" "\ +Look up an Emacs command in the Emacs manual in the Info system. +This command is designed to be used whether you are already in Info or not." t nil) -(autoload 'defstruct "cl-macs" "\ -(defstruct (NAME OPTIONS...) (SLOT SLOT-OPTS...)...): define a struct type. -This macro defines a new Lisp data type called NAME, which contains data -stored in SLOTs. This defines a `make-NAME' constructor, a `copy-NAME' -copier, a `NAME-p' predicate, and setf-able `NAME-SLOT' accessors." nil 'macro) +(autoload 'Info-goto-emacs-command-node "info" "\ +Look up an Emacs command in the Emacs manual in the Info system. +This command is designed to be used whether you are already in Info or not." t nil) -(autoload 'cl-struct-setf-expander "cl-macs" nil nil nil) +(autoload 'Info-goto-emacs-key-command-node "info" "\ +Look up an Emacs key sequence in the Emacs manual in the Info system. +This command is designed to be used whether you are already in Info or not." t nil) -(autoload 'deftype "cl-macs" "\ -(deftype NAME ARGLIST BODY...): define NAME as a new data type. -The type name can then be used in `typecase', `check-type', etc." nil 'macro) +(autoload 'Info-emacs-key "info" "\ +Look up an Emacs key sequence in the Emacs manual in the Info system. +This command is designed to be used whether you are already in Info or not." t nil) -(autoload 'typep "cl-macs" "\ -Check that OBJECT is of type TYPE. -TYPE is a Common Lisp-style type specifier." nil nil) +(autoload 'Info-elisp-ref "info" "\ +Look up an Emacs Lisp function in the Elisp manual in the Info system. +This command is designed to be used whether you are already in Info or not." t nil) -(autoload 'check-type "cl-macs" "\ -Verify that FORM is of type TYPE; signal an error if not. -STRING is an optional description of the desired type." nil 'macro) +;;;*** + +;;;### (autoloads nil "itimer-autosave" "lisp/itimer-autosave.el") -(autoload 'assert "cl-macs" "\ -Verify that FORM returns non-nil; signal an error if not. -Second arg SHOW-ARGS means to include arguments of FORM in message. -Other args STRING and ARGS... are arguments to be passed to `error'. -They are not evaluated unless the assertion fails. If STRING is -omitted, a default message listing FORM itself is used." nil 'macro) +;;;*** + +;;;### (autoloads nil "loaddefs" "lisp/loaddefs.el") -(autoload 'ignore-errors "cl-macs" "\ -Execute FORMS; if an error occurs, return nil. -Otherwise, return result of last FORM." nil 'macro) +;;;*** + +;;;### (autoloads nil "loadhist" "lisp/loadhist.el") -(autoload 'ignore-file-errors "cl-macs" "\ -Execute FORMS; if an error of type `file-error' occurs, return nil. -Otherwise, return result of last FORM." nil 'macro) +;;;*** + +;;;### (autoloads (mswindows-reset-device-font-menus) "msw-font-menu" "lisp/msw-font-menu.el") -(autoload 'define-compiler-macro "cl-macs" "\ -(define-compiler-macro FUNC ARGLIST BODY...): Define a compiler-only macro. -This is like `defmacro', but macro expansion occurs only if the call to -FUNC is compiled (i.e., not interpreted). Compiler macros should be used -for optimizing the way calls to FUNC are compiled; the form returned by -BODY should do the same thing as a call to the normal function called -FUNC, though possibly more efficiently. Note that, like regular macros, -compiler macros are expanded repeatedly until no further expansions are -possible. Unlike regular macros, BODY can decide to \"punt\" and leave the -original function call alone by declaring an initial `&whole foo' parameter -and then returning foo." nil 'macro) +(autoload 'mswindows-reset-device-font-menus "msw-font-menu" "\ +Generates the `Font', `Size', and `Weight' submenus for the Options menu. +This is run the first time that a font-menu is needed for each device. +If you don't like the lazy invocation of this function, you can add it to +`create-device-hook' and that will make the font menus respond more quickly +when they are selected for the first time. If you add fonts to your system, +or if you change your font path, you can call this to re-initialize the menus." nil nil) -(autoload 'compiler-macroexpand "cl-macs" nil nil nil) +(defun* mswindows-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match mswindows-font-regexp name) (setq family (match-string 1 name)) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match mswindows-font-regexp truename)) (setq family (match-string 1 truename)) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from mswindows-font-menu-font-data (make-vector 5 nil))) (when (string-match mswindows-font-regexp name) (setq weight (match-string 2 name)) (setq size (string-to-int (match-string 4 name)))) (when (string-match mswindows-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (match-string 2 truename))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 4 truename)))) (setq slant (match-string 5 truename))) (vector entry family size weight slant))) ;;;*** -;;;### (autoloads (batch-remove-old-elc) "cleantree" "lisp\\cleantree.el") +;;;### (autoloads (mwheel-install) "mwheel" "lisp/mwheel.el") -(autoload 'batch-remove-old-elc "cleantree" nil nil nil) +(autoload 'mwheel-install "mwheel" "\ +Enable mouse wheel support." nil nil) ;;;*** -;;;### (autoloads (config-value config-value-hash-table) "config" "lisp\\config.el") +;;;### (autoloads (package-admin-add-binary-package package-admin-add-single-file-package) "package-admin" "lisp/package-admin.el") -(autoload 'config-value-hash-table "config" "\ -Return hash table of configuration parameters and their values." nil nil) +(autoload 'package-admin-add-single-file-package "package-admin" "\ +Install a single file Lisp package into XEmacs package hierarchy. +`file' should be the full path to the lisp file to install. +`destdir' should be a simple directory name. +The optional `pkg-dir' can be used to override the default package hierarchy +\(car (last late-packages))." t nil) -(autoload 'config-value "config" "\ -Return the value of the configuration parameter CONFIG_SYMBOL." nil nil) +(autoload 'package-admin-add-binary-package "package-admin" "\ +Install a pre-bytecompiled XEmacs package into package hierarchy." t nil) ;;;*** -;;;### (autoloads (Custom-make-dependencies) "cus-dep" "lisp\\cus-dep.el") +;;;### (autoloads (package-get-custom package-get-package-provider package-get package-get-dependencies package-get-all package-get-update-all package-get-delete-package package-get-save-base package-get-update-base-from-buffer package-get-update-base package-get-update-base-entry package-get-require-base package-get-download-menu) "package-get" "lisp/package-get.el") -(autoload 'Custom-make-dependencies "cus-dep" "\ -Extract custom dependencies from .el files in SUBDIRS. -SUBDIRS is a list of directories. If it is nil, the command-line -arguments are used. If it is a string, only that directory is -processed. This function is especially useful in batch mode. +(defvar package-get-base nil "\ +List of packages that are installed at this site. +For each element in the alist, car is the package name and the cdr is +a plist containing information about the package. Typical fields +kept in the plist are: -Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS" t nil) +version - version of this package +provides - list of symbols provided +requires - list of symbols that are required. + These in turn are provided by other packages. +filename - name of the file. +size - size of the file (aka the bundled package) +md5sum - computed md5 checksum +description - What this package is for. +type - Whether this is a 'binary (default) or 'single file package -;;;*** - -;;;### (autoloads (customize-menu-create custom-menu-create custom-save-all customize-save-customized customize-browse custom-buffer-create-other-window custom-buffer-create customize-apropos-groups customize-apropos-faces customize-apropos-options customize-apropos customize-saved customize-customized customize-face-other-window customize-face customize-option-other-window customize-changed-options customize-variable customize-other-window customize customize-save-variable customize-set-variable customize-set-value) "cus-edit" "lisp\\cus-edit.el") +More fields may be added as needed. An example: -(autoload 'customize-set-value "cus-edit" "\ -Set VARIABLE to VALUE. VALUE is a Lisp object. +'( + (name + (version \"\" + file \"filename\" + description \"what this package is about.\" + provides () + requires () + size + md5sum \"\" + file \"filename\" + description \"what this package is about.\" + provides () + requires () + size + md5sum \" Move right after insertion. + C-c ^ Move up after insertion. + C-c . Move down after insertion. + C-c ` Move northwest (nw) after insertion. + C-c ' Move northeast (ne) after insertion. + C-c / Move southwest (sw) after insertion. + C-c \\ Move southeast (se) after insertion. +The current direction is displayed in the modeline. The initial +direction is right. Whitespace is inserted and tabs are changed to +spaces when required by movement. You can move around in the buffer +with these commands: + \\[picture-move-down] Move vertically to SAME column in previous line. + \\[picture-move-up] Move vertically to SAME column in next line. + \\[picture-end-of-line] Move to column following last non-whitespace character. + \\[picture-forward-column] Move right inserting spaces if required. + \\[picture-backward-column] Move left changing tabs to spaces if required. + C-c C-f Move in direction of current picture motion. + C-c C-b Move in opposite direction of current picture motion. + Return Move to beginning of next line. +You can edit tabular text with these commands: + M-Tab Move to column beneath (or at) next interesting character. + `Indents' relative to a previous line. + Tab Move to next stop in tab stop list. + C-c Tab Set tab stops according to context of this line. + With ARG resets tab stops to default (global) value. + See also documentation of variable picture-tab-chars + which defines \"interesting character\". You can manually + change the tab stop list with command \\[edit-tab-stops]. +You can manipulate text with these commands: + C-d Clear (replace) ARG columns after point without moving. + C-c C-d Delete char at point - the command normally assigned to C-d. + \\[picture-backward-clear-column] Clear (replace) ARG columns before point, moving back over them. + \\[picture-clear-line] Clear ARG lines, advancing over them. The cleared + text is saved in the kill ring. + \\[picture-open-line] Open blank line(s) beneath current line. +You can manipulate rectangles with these commands: + C-c C-k Clear (or kill) a rectangle and save it. + C-c C-w Like C-c C-k except rectangle is saved in named register. + C-c C-y Overlay (or insert) currently saved rectangle at point. + C-c C-x Like C-c C-y except rectangle is taken from named register. + \\[copy-rectangle-to-register] Copies a rectangle to a register. + \\[advertised-undo] Can undo effects of rectangle overlay commands + commands if invoked soon enough. +You can return to the previous mode with: + C-c C-c Which also strips trailing whitespace from every line. + Stripping is suppressed by supplying an argument. -(autoload 'customize-variable "cus-edit" "\ -Customize SYMBOL, which must be a user option variable." t nil) +Entry to this mode calls the value of picture-mode-hook if non-nil. -(autoload 'customize-changed-options "cus-edit" "\ -Customize all user option variables whose default values changed recently. -This means, in other words, variables defined with a `:version' keyword." t nil) +Note that Picture mode commands will work outside of Picture mode, but +they are not defaultly assigned to keys." t nil) -(defalias 'customize-variable-other-window 'customize-option-other-window) +(defalias 'edit-picture 'picture-mode) -(autoload 'customize-option-other-window "cus-edit" "\ -Customize SYMBOL, which must be a user option variable. -Show the buffer in another window, but don't select it." t nil) +;;;*** + +;;;### (autoloads (clear-rectangle string-rectangle open-rectangle insert-rectangle yank-rectangle kill-rectangle extract-rectangle delete-extract-rectangle delete-rectangle) "rect" "lisp/rect.el") -(autoload 'customize-face "cus-edit" "\ -Customize SYMBOL, which should be a face name or nil. -If SYMBOL is nil, customize all faces." t nil) +(autoload 'delete-rectangle "rect" "\ +Delete the text in the region-rectangle without saving it. +The same range of columns is deleted in each line starting with the line +where the region begins and ending with the line where the region ends. -(autoload 'customize-face-other-window "cus-edit" "\ -Show customization buffer for FACE in other window." t nil) +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, also fill lines where nothing has to be +deleted." t nil) -(autoload 'customize-customized "cus-edit" "\ -Customize all user options set since the last save in this session." t nil) +(autoload 'delete-extract-rectangle "rect" "\ +Delete the contents of the rectangle with corners at START and END, and +return it as a list of strings, one for each line of the rectangle. -(autoload 'customize-saved "cus-edit" "\ -Customize all already saved user options." t nil) +With an optional FILL argument, also fill lines where nothing has to be +deleted." nil nil) -(autoload 'customize-apropos "cus-edit" "\ -Customize all user options matching REGEXP. -If ALL is `options', include only options. -If ALL is `faces', include only faces. -If ALL is `groups', include only groups. -If ALL is t (interactively, with prefix arg), include options which are not -user-settable, as well as faces and groups." t nil) +(autoload 'extract-rectangle "rect" "\ +Return the contents of the rectangle with corners at START and END, +as a list of strings, one for each line of the rectangle." nil nil) -(autoload 'customize-apropos-options "cus-edit" "\ -Customize all user options matching REGEXP. -With prefix arg, include options which are not user-settable." t nil) +(defvar killed-rectangle nil "\ +Rectangle for `yank-rectangle' to insert.") -(autoload 'customize-apropos-faces "cus-edit" "\ -Customize all user faces matching REGEXP." t nil) +(autoload 'kill-rectangle "rect" "\ +Delete the region-rectangle and save it as the last killed one. +You might prefer to use `delete-extract-rectangle' from a program. -(autoload 'customize-apropos-groups "cus-edit" "\ -Customize all user groups matching REGEXP." t nil) +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, also fill lines where nothing has to be +deleted." t nil) -(autoload 'custom-buffer-create "cus-edit" "\ -Create a buffer containing OPTIONS. -Optional NAME is the name of the buffer. -OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where -SYMBOL is a customization option, and WIDGET is a widget for editing -that option." nil nil) +(autoload 'yank-rectangle "rect" "\ +Yank the last killed rectangle with upper left corner at point." t nil) -(autoload 'custom-buffer-create-other-window "cus-edit" "\ -Create a buffer containing OPTIONS. -Optional NAME is the name of the buffer. -OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where -SYMBOL is a customization option, and WIDGET is a widget for editing -that option." nil nil) +(autoload 'insert-rectangle "rect" "\ +Insert text of RECTANGLE with upper left corner at point. +RECTANGLE's first line is inserted at point, its second +line is inserted at a point vertically under point, etc. +RECTANGLE should be a list of strings. +After this command, the mark is at the upper left corner +and point is at the lower right corner." nil nil) -(autoload 'customize-browse "cus-edit" "\ -Create a tree browser for the customize hierarchy." t nil) +(autoload 'open-rectangle "rect" "\ +Blank out the region-rectangle, shifting text right. -(defcustom custom-file "~/.emacs" "File used for storing customization information.\nIf you change this from the default \"~/.emacs\" you need to\nexplicitly load that file for the settings to take effect." :type 'file :group 'customize) +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, fill with blanks even if there is no text +on the right side of the rectangle." t nil) -(autoload 'customize-save-customized "cus-edit" "\ -Save all user options which have been set in this session." t nil) +(autoload 'string-rectangle "rect" "\ +Insert STRING on each line of the region-rectangle, shifting text right. +The left edge of the rectangle specifies the column for insertion. -(autoload 'custom-save-all "cus-edit" "\ -Save all customizations in `custom-file'." nil nil) +If `pending-delete-mode' is active the string replace the region. +Otherwise this command does not delete or overwrite any existing text. + +When called from a program, the rectangle's corners are START and END." t nil) -(autoload 'custom-menu-create "cus-edit" "\ -Create menu for customization group SYMBOL. -The menu is in a format applicable to `easy-menu-define'." nil nil) +(autoload 'clear-rectangle "rect" "\ +Blank out the region-rectangle. +The text previously in the region is overwritten with blanks. -(autoload 'customize-menu-create "cus-edit" "\ -Return a customize menu for customization group SYMBOL. -If optional NAME is given, use that as the name of the menu. -Otherwise the menu will be named `Customize'. -The format is suitable for use with `easy-menu-define'." nil nil) +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, also fill with blanks the parts of the +rectangle which were empty." t nil) ;;;*** -;;;### (autoloads (custom-reset-faces custom-theme-reset-faces custom-theme-face-value custom-theme-set-faces custom-set-faces custom-set-face-update-spec custom-declare-face) "cus-face" "lisp\\cus-face.el") +;;;### (autoloads (list-load-path-shadows) "shadow" "lisp/shadow.el") -(autoload 'custom-declare-face "cus-face" "\ -Like `defface', but FACE is evaluated as a normal argument." nil nil) +(autoload 'list-load-path-shadows "shadow" "\ +Display a list of Emacs Lisp files that shadow other files. -(autoload 'custom-set-face-update-spec "cus-face" "\ -Customize the FACE for display types matching DISPLAY, merging - in the new items from PLIST" nil nil) +This function lists potential load-path problems. Directories in the +`load-path' variable are searched, in order, for Emacs Lisp +files. When a previously encountered file name is found again, a +message is displayed indicating that the later file is \"hidden\" by +the earlier. -(autoload 'custom-set-faces "cus-face" "\ -Initialize faces according to user preferences. -This asociates the setting with the USER theme. -The arguments should be a list where each entry has the form: +For example, suppose `load-path' is set to - (FACE SPEC [NOW [COMMENT]]) +\(\"/usr/gnu/emacs/site-lisp\" \"/usr/gnu/emacs/share/emacs/19.30/lisp\") -SPEC will be stored as the saved value for FACE. If NOW is present -and non-nil, FACE will also be created according to SPEC. -COMMENT is a string comment about FACE. +and that each of these directories contains a file called XXX.el. Then +XXX.el in the site-lisp directory is referred to by all of: +\(require 'XXX), (autoload .... \"XXX\"), (load-library \"XXX\") etc. -See `defface' for the format of SPEC." nil nil) +The first XXX.el file prevents emacs from seeing the second (unless +the second is loaded explicitly via load-file). -(autoload 'custom-theme-set-faces "cus-face" "\ -Initialize faces according to settings specified by args. -Records the settings as belonging to THEME. +When not intended, such shadowings can be the source of subtle +problems. For example, the above situation may have arisen because the +XXX package was not distributed with versions of emacs prior to +19.30. An emacs maintainer downloaded XXX from elsewhere and installed +it. Later, XXX was updated and included in the emacs distribution. +Unless the emacs maintainer checks for this, the new version of XXX +will be hidden behind the old (which may no longer work with the new +emacs version). -See `custom-set-faces' for a description of the arguments ARGS." nil nil) +This function performs these checks and flags all possible +shadowings. Because a .el file may exist without a corresponding .elc +\(or vice-versa), these suffixes are essentially ignored. A file +XXX.elc in an early directory (that does not contain XXX.el) is +considered to shadow a later file XXX.el, and vice-versa. -(autoload 'custom-theme-face-value "cus-face" "\ -Return spec of FACE in THEME if the THEME modifies the -FACE. Nil otherwise." nil nil) +When run interactively, the shadowings (if any) are displayed in a +buffer called `*Shadows*'. Shadowings are located by calling the +\(non-interactive) companion function, `find-emacs-lisp-shadows'." t nil) -(autoload 'custom-theme-reset-faces "cus-face" nil nil nil) +;;;*** + +;;;### (autoloads (load-default-sounds load-sound-file) "sound" "lisp/sound.el") -(autoload 'custom-reset-faces "cus-face" "\ -Reset the value of the face to values previously defined. -Assosiate this setting with the 'user' theme. +(or sound-alist (setq sound-alist '((ready nil) (warp nil)))) -ARGS is defined as for `custom-theme-reset-faces'" nil nil) +(autoload 'load-sound-file "sound" "\ +Read in an audio-file and add it to the sound-alist. + +You can only play sound files if you are running on display 0 of the +console of a machine with native sound support or running a NetAudio +server and XEmacs has the necessary sound support compiled in. + +The sound file must be in the Sun/NeXT U-LAW format, except on Linux, +where .wav files are also supported by the sound card drivers." t nil) + +(autoload 'load-default-sounds "sound" "\ +Load and install some sound files as beep-types, using +`load-sound-file'. This only works if you're on display 0 of the +console of a machine with native sound support or running a NetAudio +server and XEmacs has the necessary sound support compiled in." t nil) ;;;*** -;;;### (autoloads (disassemble) "disass" "lisp\\disass.el") +;;;### (autoloads (ask-user-about-supersession-threat ask-user-about-lock) "userlock" "lisp/userlock.el") -(autoload 'disassemble "disass" "\ -Print disassembled code for OBJECT in (optional) BUFFER. -OBJECT can be a symbol defined as a function, or a function itself -\(a lambda expression or a compiled-function object). -If OBJECT is not already compiled, we compile it, but do not -redefine OBJECT if it is a symbol." t nil) +(autoload 'ask-user-about-lock "userlock" "\ +Ask user what to do when he wants to edit FILE but it is locked by USER. +This function has a choice of three things to do: + do (signal 'file-locked (list FILE USER)) + to refrain from editing the file + return t (grab the lock on the file) + return nil (edit the file even though it is locked). +You can rewrite it to use any criterion you like to choose which one to do." nil nil) + +(autoload 'ask-user-about-supersession-threat "userlock" "\ +Ask a user who is about to modify an obsolete buffer what to do. +This function has two choices: it can return, in which case the modification +of the buffer will proceed, or it can (signal 'file-supersession (file)), +in which case the proposed buffer modification will not be made. + +You can rewrite this to use any criterion you like to choose which one to do. +The buffer in question is current when this function is called." nil nil) ;;;*** -;;;### (autoloads (standard-display-european standard-display-underline standard-display-graphic standard-display-g1 standard-display-ascii standard-display-default standard-display-8bit make-display-table describe-current-display-table) "disp-table" "lisp\\disp-table.el") +;;;### (autoloads (toggle-truncate-lines auto-view-mode view-major-mode view-mode view-minor-mode view-buffer-other-window view-file-other-window view-buffer view-file) "view-less" "lisp/view-less.el") -(autoload 'describe-current-display-table "disp-table" "\ -Describe the display table in use in the selected window and buffer." t nil) +(defvar view-minor-mode-map (let ((map (make-keymap))) (set-keymap-name map 'view-minor-mode-map) (suppress-keymap map) (define-key map "-" 'negative-argument) (define-key map " " 'scroll-up) (define-key map "f" 'scroll-up) (define-key map "b" 'scroll-down) (define-key map 'backspace 'scroll-down) (define-key map 'delete 'scroll-down) (define-key map " " 'view-scroll-lines-up) (define-key map "\n" 'view-scroll-lines-up) (define-key map "e" 'view-scroll-lines-up) (define-key map "j" 'view-scroll-lines-up) (define-key map "y" 'view-scroll-lines-down) (define-key map "k" 'view-scroll-lines-down) (define-key map "d" 'view-scroll-some-lines-up) (define-key map "u" 'view-scroll-some-lines-down) (define-key map "r" 'recenter) (define-key map "t" 'toggle-truncate-lines) (define-key map "N" 'view-buffer) (define-key map "E" 'view-file) (define-key map "P" 'view-buffer) (define-key map "!" 'shell-command) (define-key map "|" 'shell-command-on-region) (define-key map "=" 'what-line) (define-key map "?" 'view-search-backward) (define-key map "h" 'view-mode-describe) (define-key map "s" 'view-repeat-search) (define-key map "n" 'view-repeat-search) (define-key map "/" 'view-search-forward) (define-key map "\\" 'view-search-backward) (define-key map "g" 'view-goto-line) (define-key map "G" 'view-last-windowful) (define-key map "%" 'view-goto-percent) (define-key map "p" 'view-goto-percent) (define-key map "m" 'point-to-register) (define-key map "'" 'register-to-point) (define-key map "C" 'view-cleanup-backspaces) (define-key map "" 'view-quit) (define-key map "" 'view-quit-toggle-ro) (define-key map "q" 'view-quit) map)) -(autoload 'make-display-table "disp-table" "\ -Return a new, empty display table." nil nil) +(defvar view-mode-map (let ((map (copy-keymap view-minor-mode-map))) (set-keymap-name map 'view-mode-map) map)) -(autoload 'standard-display-8bit "disp-table" "\ -Display characters in the range L to H literally." nil nil) +(autoload 'view-file "view-less" "\ +Find FILE, enter view mode. With prefix arg OTHER-P, use other window." t nil) -(autoload 'standard-display-default "disp-table" "\ -Display characters in the range L to H using the default notation." nil nil) +(autoload 'view-buffer "view-less" "\ +Switch to BUF, enter view mode. With prefix arg use other window." t nil) -(autoload 'standard-display-ascii "disp-table" "\ -Display character C using printable string S." nil nil) +(autoload 'view-file-other-window "view-less" "\ +Find FILE in other window, and enter view mode." t nil) -(autoload 'standard-display-g1 "disp-table" "\ -Display character C as character SC in the g1 character set. -This function assumes that your terminal uses the SO/SI characters; -it is meaningless for an X frame." nil nil) +(autoload 'view-buffer-other-window "view-less" "\ +Switch to BUFFER in another window, and enter view mode." t nil) -(autoload 'standard-display-graphic "disp-table" "\ -Display character C as character GC in graphics character set. -This function assumes VT100-compatible escapes; it is meaningless for an -X frame." nil nil) +(autoload 'view-minor-mode "view-less" "\ +Minor mode for viewing text, with bindings like `less'. +Commands are: +\\ +0..9 prefix args +- prefix minus +\\[scroll-up] page forward +\\[scroll-down] page back +\\[view-scroll-lines-up] scroll prefix-arg lines forward, default 1. +\\[view-scroll-lines-down] scroll prefix-arg lines backward, default 1. +\\[view-scroll-some-lines-down] scroll prefix-arg lines backward, default 10. +\\[view-scroll-some-lines-up] scroll prefix-arg lines forward, default 10. +\\[what-line] print line number +\\[view-mode-describe] print this help message +\\[view-search-forward] regexp search, uses previous string if you just hit RET +\\[view-search-backward] as above but searches backward +\\[view-repeat-search] repeat last search +\\[view-goto-line] goto line prefix-arg, default 1 +\\[view-last-windowful] goto line prefix-arg, default last line +\\[view-goto-percent] goto a position by percentage +\\[toggle-truncate-lines] toggle truncate-lines +\\[view-file] view another file +\\[view-buffer] view another buffer +\\[view-cleanup-backspaces] cleanup backspace constructions +\\[shell-command] execute a shell command +\\[shell-command-on-region] execute a shell command with the region as input +\\[view-quit] exit view-mode, and bury the current buffer. -(autoload 'standard-display-underline "disp-table" "\ -Display character C as character UC plus underlining." nil nil) +If invoked with the optional (prefix) arg non-nil, view-mode cleans up +backspace constructions. -(autoload 'standard-display-european "disp-table" "\ -Toggle display of European characters encoded with ISO 8859. -When enabled, characters in the range of 160 to 255 display not -as octal escapes, but as accented characters. -With prefix argument, enable European character display iff arg is positive." t nil) +More precisely: +\\{view-minor-mode-map}" t nil) + +(autoload 'view-mode "view-less" "\ +View the current buffer using view-minor-mode. This exists to be 99.9% +compatible with the implementations of `view-mode' in view.el and older +versions of view-less.el." t nil) + +(autoload 'view-major-mode "view-less" "\ +View the current buffer using view-mode, as a major mode. +This function has a nonstandard name because `view-mode' is wrongly +named but is like this for compatibility reasons." t nil) + +(autoload 'auto-view-mode "view-less" "\ +If the file of the current buffer is not writable, call view-mode. +This is meant to be added to `find-file-hooks'." nil nil) + +(autoload 'toggle-truncate-lines "view-less" "\ +Toggles the values of truncate-lines. +Positive prefix arg sets, negative disables." t nil) ;;;*** -;;;### (autoloads nil "easymenu" "lisp\\easymenu.el") +;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse widget-browse-at) "wid-browse" "lisp/wid-browse.el") + +(autoload 'widget-browse-at "wid-browse" "\ +Browse the widget under point." t nil) + +(autoload 'widget-browse "wid-browse" "\ +Create a widget browser for WIDGET." t nil) + +(autoload 'widget-browse-other-window "wid-browse" "\ +Show widget browser for WIDGET in other window." t nil) + +(autoload 'widget-minor-mode "wid-browse" "\ +Togle minor mode for traversing widgets. +With arg, turn widget mode on if and only if arg is positive." t nil) ;;;*** -;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "font-menu" "lisp\\font-menu.el") +;;;### (autoloads (widget-delete widget-create widget-prompt-value) "wid-edit" "lisp/wid-edit.el") -(defcustom font-menu-ignore-scaled-fonts nil "*If non-nil, then the font menu will try to show only bitmap fonts." :type 'boolean :group 'font-menu) +(autoload 'widget-prompt-value "wid-edit" "\ +Prompt for a value matching WIDGET, using PROMPT. +The current value is assumed to be VALUE, unless UNBOUND is non-nil." nil nil) -(defcustom font-menu-this-frame-only-p nil "*If non-nil, then changing the default font from the font menu will only\naffect one frame instead of all frames." :type 'boolean :group 'font-menu) +(autoload 'widget-create "wid-edit" "\ +Create widget of TYPE. +The optional ARGS are additional keyword arguments." nil nil) -(fset 'install-font-menus 'reset-device-font-menus) +(autoload 'widget-delete "wid-edit" "\ +Delete WIDGET." nil nil) -(autoload 'reset-device-font-menus "font-menu" "\ +;;;*** + +;;;### (autoloads (x-reset-device-font-menus) "x-font-menu" "lisp/x-font-menu.el") + +(autoload 'x-reset-device-font-menus "x-font-menu" "\ Generates the `Font', `Size', and `Weight' submenus for the Options menu. This is run the first time that a font-menu is needed for each device. If you don't like the lazy invocation of this function, you can add it to @@ -1818,31 +1891,19 @@ If you don't like the lazy invocation of this function, you can add it to when they are selected for the first time. If you add fonts to your system, or if you change your font path, you can call this to re-initialize the menus." nil nil) -(autoload 'font-menu-family-constructor "font-menu" nil nil nil) - -(autoload 'font-menu-size-constructor "font-menu" nil nil nil) - -(autoload 'font-menu-weight-constructor "font-menu" nil nil nil) +(defun* x-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match x-font-regexp-foundry-and-family name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match x-font-regexp-foundry-and-family truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from x-font-menu-font-data (make-vector 5 nil))) (when (string-match x-font-regexp name) (setq weight (capitalize (match-string 1 name))) (setq size (string-to-int (match-string 6 name)))) (when (string-match x-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (capitalize (match-string 1 truename)))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 6 truename)))) (setq slant (capitalize (match-string 2 truename)))) (vector entry family size weight slant))) ;;;*** -;;;### (autoloads (x-font-build-cache font-default-size-for-device font-default-encoding-for-device font-default-registry-for-device font-default-family-for-device font-default-object-for-device font-default-font-for-device font-create-object) "font" "lisp\\font.el") - -(autoload 'font-create-object "font" nil nil nil) - -(autoload 'font-default-font-for-device "font" nil nil nil) - -(autoload 'font-default-object-for-device "font" nil nil nil) - -(autoload 'font-default-family-for-device "font" nil nil nil) - -(autoload 'font-default-registry-for-device "font" nil nil nil) +;;;### (autoloads (x-win-init-sun) "x-win-sun" "lisp/x-win-sun.el") -(autoload 'font-default-encoding-for-device "font" nil nil nil) +(autoload 'x-win-init-sun "x-win-sun" nil nil nil) -(autoload 'font-default-size-for-device "font" nil nil nil) +;;;*** + +;;;### (autoloads (x-win-init-xfree86) "x-win-xfree86" "lisp/x-win-xfree86.el") -(autoload 'x-font-build-cache "font" nil nil nil) +(autoload 'x-win-init-xfree86 "x-win-xfree86" nil nil nil) ;;;*** diff --git a/lisp/autoload.el b/lisp/autoload.el index b9b0a60..965d550 100644 --- a/lisp/autoload.el +++ b/lisp/autoload.el @@ -87,6 +87,8 @@ the section of autoloads for a file.") (defvar generate-autoload-section-trailer "\n;;;***\n" "String which indicates the end of the section of autoloads for a file.") +(defvar autoload-package-name nil) + ;;; Forms which have doc-strings which should be printed specially. ;;; A doc-string-elt property of ELT says that (nth ELT FORM) is ;;; the doc-string in FORM. @@ -540,8 +542,6 @@ on the command line." (goto-char (point-max)) (insert "\n(provide '" sym ")\n"))))) -(defvar autoload-package-name nil) - ;; #### this function is almost identical, but subtly different, ;; from batch-update-autoloads. Steve, it's your responsibility to ;; clean this up. The two should be merged, but I'm not sure what diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 3a6df7b..49d09d0 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -356,6 +356,8 @@ in the selected frame." +(eval-when-compile (autoload 'visit-tags-table "etags")) + (defun Buffer-menu-visit-tags-table () "Visit the tags table in the buffer on this line. See `visit-tags-table'." (interactive) diff --git a/lisp/build-report.el b/lisp/build-report.el index 3f89157..26b63bd 100644 --- a/lisp/build-report.el +++ b/lisp/build-report.el @@ -151,6 +151,7 @@ available." (defalias 'mime-edit-insert-binary-file 'mime-editor/insert-binary-file))) +;;;###autoload (defun build-report (&rest args) "Initializes a fresh mail composition buffer using `compose-mail' with the contents of XEmacs Installation file and excerpts from XEmacs diff --git a/lisp/cl-macs.el b/lisp/cl-macs.el index b66b4ea..9a9d3a0 100644 --- a/lisp/cl-macs.el +++ b/lisp/cl-macs.el @@ -81,7 +81,7 @@ #'(lambda (n p f) (list 'put (list 'quote n) (list 'quote p) (list 'function (cons 'lambda f)))))) - (car (or features (setq features (list 'cl-kludge)))))) + 'xemacs)) ;;; Initialization. diff --git a/lisp/cl-seq.el b/lisp/cl-seq.el index 9f1b256..3f0ed88 100644 --- a/lisp/cl-seq.el +++ b/lisp/cl-seq.el @@ -65,6 +65,23 @@ ;;; this file independent from cl-macs. (defmacro cl-parsing-keywords (kwords other-keys &rest body) + "Helper macro for functions with keyword arguments. +This is a temporary solution, until keyword arguments are natively supported. +Declare your function ending with (... &rest cl-keys), then wrap the +function body in a call to `cl-parsing-keywords'. + +KWORDS is a list of keyword definitions. Each definition should be +either a keyword or a list (KEYWORD DEFAULT-VALUE). In the former case, +the default value is nil. The keywords are available in BODY as the name +of the keyword, minus its initial colon and prepended with `cl-'. + +OTHER-KEYS specifies other keywords that are accepted but ignored. It +is either the value 't' (ignore all other keys, equivalent to the +&allow-other-keys argument declaration in Common Lisp) or a list in the +same format as KWORDS. If keywords are given that are not in KWORDS +and not allowed by OTHER-KEYS, an error will normally be signalled; but +the caller can override this by specifying a non-nil value for the +keyword :allow-other-keys (which defaults to t)." (cons 'let* (cons (mapcar diff --git a/lisp/cl.el b/lisp/cl.el index db01cd2..e2ec4c5 100644 --- a/lisp/cl.el +++ b/lisp/cl.el @@ -750,6 +750,8 @@ FUNC is not added if it already appears on the list stored in HOOK." (defun cl-hack-byte-compiler () (if (and (not cl-hacked-flag) (fboundp 'byte-compile-file-form)) (progn + (when (not (fboundp 'cl-compile-time-init)) + (load "cl-macs" nil t)) (cl-compile-time-init) ; in cl-macs.el (setq cl-hacked-flag t)))) diff --git a/lisp/cmdloop.el b/lisp/cmdloop.el index a9ae8b2..215fc8d 100644 --- a/lisp/cmdloop.el +++ b/lisp/cmdloop.el @@ -130,9 +130,10 @@ or go back to just one window (by deleting all but the selected window)." :group 'editing-basics) (defun command-error (error-object) - (let ((inhibit-quit t) - (debug-on-error nil) - (etype (car-safe error-object))) + (let* ((old-debug-on-error debug-on-error) + (inhibit-quit t) + (debug-on-error nil) + (etype (car-safe error-object))) (setq quit-flag nil) (setq standard-output t) (setq standard-input t) @@ -161,7 +162,12 @@ or go back to just one window (by deleting all but the selected window)." (if (noninteractive) (progn - (message "%s exiting." emacs-program-name) + (if old-debug-on-error + (progn + (message "Backtrace:\n\n") + (backtrace) + (message "\n"))) + (message "%s exiting\n." emacs-program-name) (kill-emacs -1))) t)) diff --git a/lisp/code-files.el b/lisp/code-files.el index 87306b8..d854348 100644 --- a/lisp/code-files.el +++ b/lisp/code-files.el @@ -68,7 +68,13 @@ global environment specification.") ("TUTORIAL\\.\\(?:hr\\|pl\\|ro\\)\\'" . iso-8859-2) ;; ("\\.\\(el\\|emacs\\|info\\(-[0-9]+\\)?\\|texi\\)$" . iso-2022-8) ;; ("\\(ChangeLog\\|CHANGES-beta\\)$" . iso-2022-8) - ("/spool/mail/.*$" . convert-mbox-coding-system)) + + ;; This idea is totally broken, and the code didn't work anyway. + ;; Mailboxes should be decoded by mail clients, who actually know + ;; how to deal with them. Otherwise, their contents should be + ;; treated as `binary'. + ;("/spool/mail/.*$" . convert-mbox-coding-system) + ) "Alist to decide a coding system to use for a file I/O operation. The format is ((PATTERN . VAL) ...), where PATTERN is a regular expression matching a file name, @@ -191,22 +197,12 @@ object (the entry specified a coding system)." ((find-coding-system codesys)) )))) -(defun convert-mbox-coding-system (filename visit start end) - "Decoding function for Unix mailboxes. -Does separate detection and decoding on each message, since each -message might be in a different encoding." - (let ((buffer-read-only nil)) - (save-restriction - (narrow-to-region start end) - (goto-char (point-min)) - (while (not (eobp)) - (let ((start (point)) - end) - (forward-char 1) - (if (re-search-forward "^From" nil 'move) - (beginning-of-line)) - (setq end (point)) - (decode-coding-region start end 'undecided)))))) +;; This is completely broken, not only in implementation (does not +;; understand MIME), but in concept -- such high-level decoding should +;; be done by mail readers, not by IO code! + +;(defun convert-mbox-coding-system (filename visit start end) +;... (defun find-coding-system-magic-cookie () "Look for the coding-system magic cookie in the current buffer.\n" diff --git a/lisp/code-process.el b/lisp/code-process.el index 88902b1..a60b620 100644 --- a/lisp/code-process.el +++ b/lisp/code-process.el @@ -125,6 +125,9 @@ you quit again before the process exits." (cond ((consp ret) (setq cs-r (car ret) cs-w (cdr ret))) + ((null ret) + (setq cs-r buffer-file-coding-system + cs-w buffer-file-coding-system)) ((find-coding-system ret) (setq cs-r ret cs-w ret)))) diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el index cf9fa27..fb14885 100644 --- a/lisp/cus-dep.el +++ b/lisp/cus-dep.el @@ -158,7 +158,8 @@ Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS" (with-temp-file cusload-file (insert ";;; " cusload-base-file " --- automatically extracted custom dependencies\n" - "\n;;; Code:\n\n") + "\n;;; Code:\n\n" + "(autoload 'custom-add-loads \"cus-load\")\n\n") (mapatoms (lambda (sym) (let ((members (get sym 'custom-group)) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 30b0c86..681f8bc 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -55,6 +55,7 @@ (require 'cus-load) (require 'cus-start) +(require 'cus-file) ;; Huh? This looks dirty! (put 'custom-define-hook 'custom-type 'hook) @@ -2225,7 +2226,6 @@ Optional EVENT is the location for the menu." "Restore the saved value for the variable being edited by WIDGET." (let* ((symbol (widget-value widget)) (set (or (get symbol 'custom-set) 'set-default)) - (comment-widget (widget-get widget :comment-widget)) (value (get symbol 'saved-value)) (comment (get symbol 'saved-variable-comment))) (cond ((or value comment) @@ -2244,8 +2244,7 @@ Optional EVENT is the location for the menu." (defun custom-variable-reset-standard (widget) "Restore the standard setting for the variable being edited by WIDGET." (let* ((symbol (widget-value widget)) - (set (or (get symbol 'custom-set) 'set-default)) - (comment-widget (widget-get widget :comment-widget))) + (set (or (get symbol 'custom-set) 'set-default))) (if (get symbol 'standard-value) (funcall set symbol (eval (car (get symbol 'standard-value)))) (signal 'error (list "No standard setting known for variable" symbol))) @@ -3239,15 +3238,6 @@ Optional EVENT is the location for the menu." (widget-put widget :custom-state found))) (custom-magic-reset widget)) -;;; The `custom-save-all' Function. -;;;###autoload -(defcustom custom-file "~/.emacs" - "File used for storing customization information. -If you change this from the default \"~/.emacs\" you need to -explicitly load that file for the settings to take effect." - :type 'file - :group 'customize) - (defun custom-save-delete (symbol) "Delete the call to SYMBOL form in `custom-file'. Leave point at the location of the call, or after the last expression." @@ -3594,6 +3584,19 @@ if that value is non-nil." (run-hooks 'custom-mode-hook)) +;;;###autoload +(defun custom-migrate-custom-file (new-custom-file-name) + "Migrate custom file from home directory." + (mapc 'custom-save-delete + '(custom-load-themes custom-reset-variables + custom-set-variables + custom-set-faces + custom-reset-faces)) + (with-current-buffer (find-file-noselect custom-file) + (save-buffer)) + (setq custom-file new-custom-file-name) + (custom-save-all)) + ;;; The End. (provide 'cus-edit) diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 49685ca..cabb6eb 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -60,6 +60,7 @@ (visible-bell sound boolean) (x-allow-sendevents x boolean) (zmacs-regions editing-basics boolean) + (load-home-init-file installation boolean) ;; integer (auto-save-interval auto-save integer) (bell-volume sound integer) diff --git a/lisp/custom-load.el b/lisp/custom-load.el index 21ff01b..1e0645a 100644 --- a/lisp/custom-load.el +++ b/lisp/custom-load.el @@ -2,6 +2,8 @@ ;;; Code: +(autoload 'custom-add-loads "cus-load") + (custom-add-loads 'extensions '("auto-show" "wid-edit")) (custom-add-loads 'info-faces '("info")) (custom-add-loads 'custom-buffer '("cus-edit")) @@ -15,7 +17,7 @@ (custom-add-loads 'menu '("menubar-items")) (custom-add-loads 'minibuffer '("simple" "minibuf")) (custom-add-loads 'log-message '("simple")) -(custom-add-loads 'environment '("frame" "keydefs" "minibuf" "modeline" "window-xemacs" "menubar" "gutter" "toolbar-items" "cus-edit" "gnuserv" "sound" "x-init")) +(custom-add-loads 'environment '("frame" "keydefs" "minibuf" "modeline" "window-xemacs" "menubar" "gutter" "x-init" "toolbar-items" "cus-edit" "gnuserv" "sound")) (custom-add-loads 'sound '("sound")) (custom-add-loads 'pui '("package-ui")) (custom-add-loads 'terminals '("gnuserv")) @@ -43,7 +45,7 @@ (custom-add-loads 'comm '("ldap")) (custom-add-loads 'backup '("files")) (custom-add-loads 'frames '("frame" "window-xemacs" "gui" "gnuserv")) -(custom-add-loads 'customize '("cus-edit" "wid-edit")) +(custom-add-loads 'customize '("wid-edit" "cus-edit")) (custom-add-loads 'custom-browse '("cus-edit")) (custom-add-loads 'abbrev '("abbrev" "files")) (custom-add-loads 'programming '("cus-edit")) @@ -60,8 +62,8 @@ (custom-add-loads 'files '("files")) (custom-add-loads 'build '("build-report")) (custom-add-loads 'font-lock '("font-lock")) -(custom-add-loads 'external '("process2" "cus-edit")) -(custom-add-loads 'development '("process2" "lisp-mode" "cus-edit")) +(custom-add-loads 'external '("process" "cus-edit")) +(custom-add-loads 'development '("process" "lisp-mode" "cus-edit")) (custom-add-loads 'gnuserv '("gnuserv")) (custom-add-loads 'gutter '("gutter" "gutter-items")) (custom-add-loads 'fill-comments '("simple")) @@ -71,16 +73,16 @@ (custom-add-loads 'fill '("simple" "fill")) (custom-add-loads 'custom-magic-faces '("cus-edit")) (custom-add-loads 'display '("toolbar" "scrollbar" "auto-show")) -(custom-add-loads 'faces '("faces" "font" "cus-edit" "font-lock" "hyper-apropos" "info" "wid-edit")) +(custom-add-loads 'faces '("faces" "cus-edit" "font-lock" "font" "hyper-apropos" "info" "wid-edit")) (custom-add-loads 'emacs '("faces" "help" "files" "cus-edit" "package-get")) -(custom-add-loads 'processes '("process2" "gnuserv")) +(custom-add-loads 'processes '("process" "gnuserv")) (custom-add-loads 'hyper-apropos '("hyper-apropos")) (custom-add-loads 'wp '("printer" "cus-edit")) (custom-add-loads 'vc '("files")) (custom-add-loads 'isearch '("isearch-mode")) (custom-add-loads 'font-lock-faces '("font-lock")) (custom-add-loads 'modeline '("modeline")) -(custom-add-loads 'editing '("simple" "abbrev" "fill" "mouse" "dragdrop" "cus-edit")) +(custom-add-loads 'editing '("simple" "abbrev" "fill" "mouse" "cus-edit" "dragdrop")) (custom-add-loads 'matching '("simple" "isearch-mode" "hyper-apropos")) (custom-add-loads 'i18n '("cus-edit")) (custom-add-loads 'info '("toolbar-items" "info")) diff --git a/lisp/custom.el b/lisp/custom.el index 49616dc..29486f5 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -38,10 +38,10 @@ ;;; Code: (eval-when-compile - (load "cl-macs")) + (load "cl-macs" nil t)) -(if (not (fboundp 'defun*)) - (autoload 'defun* "cl-macs")) +(autoload 'custom-declare-face "cus-face") +(autoload 'defun* "cl-macs") (require 'widget) diff --git a/lisp/dumped-lisp.el b/lisp/dumped-lisp.el index 81f698e..73dea36 100644 --- a/lisp/dumped-lisp.el +++ b/lisp/dumped-lisp.el @@ -50,6 +50,7 @@ ;; After fixing, eos/loaddefs-eos and loaddefs appear identical?!! ;; So just make loaddefs-eos go away... ;;(pureload (if (featurep 'sparcworks) "eos/loaddefs-eos" "loaddefs")) + "cus-file" "startup" ; For initialization of ; `emacs-user-extension-dir' "misc" diff --git a/lisp/etags.el b/lisp/etags.el index c3245d7..e71cbe9 100644 --- a/lisp/etags.el +++ b/lisp/etags.el @@ -505,6 +505,7 @@ this buffer uses." ((string-match "\\.scm\\'" filename) 'scheme-mode) (t nil))) + (defvar c-mode-syntax-table) (set-syntax-table (cond ((and (eq file-type 'c-mode) c-mode-syntax-table) c-mode-syntax-table) diff --git a/lisp/faces.el b/lisp/faces.el index d149cb0..156de24 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1761,7 +1761,8 @@ in that frame; otherwise change each frame." (and (featurep 'x) (x-get-resource "backgroundToolBarColor" - "BackgroundToolBarColor" 'string)) + "BackgroundToolBarColor" 'string + nil nil 'warn)) (face-background 'toolbar)))) (purecopy '("foregroundToolBarColor" @@ -1769,7 +1770,8 @@ in that frame; otherwise change each frame." (and (featurep 'x) (x-get-resource "foregroundToolBarColor" - "ForegroundToolBarColor" 'string)) + "ForegroundToolBarColor" 'string + nil nil 'warn)) (face-foreground 'toolbar)))) ))) diff --git a/lisp/files.el b/lisp/files.el index 6712bf6..97bc2fa 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1209,7 +1209,7 @@ run `normal-mode' explicitly." ("\\.m4\\'" . autoconf-mode) ("configure\\.in\\'" . autoconf-mode) ("\\.ml\\'" . lisp-mode) - ("\\.ma?k\\'" . makefile-mode) + ("\\.ma?ke?\\'" . makefile-mode) ("[Mm]akefile\\(\\.\\|\\'\\)" . makefile-mode) ("\\.X\\(defaults\\|environment\\|resources\\|modmap\\)\\'" . xrdb-mode) ;; #### The following three are Unix-specific (but do we care?) @@ -2086,9 +2086,8 @@ If the value is nil, don't make a backup." "Convert FILENAME to be relative to DIRECTORY (default: default-directory). This function returns a relative file name which is equivalent to FILENAME when used with that default directory as the default. -If this is impossible (which can happen on MSDOS and Windows -when the file name and directory use different drive names) -then it returns FILENAME." +If this is impossible (which can happen on MS Windows when the file name +and directory use different drive names) then it returns FILENAME." (save-match-data (let ((fname (expand-file-name filename))) (setq directory (file-name-as-directory diff --git a/lisp/find-paths.el b/lisp/find-paths.el index 9118e94..fdd3cc2 100644 --- a/lisp/find-paths.el +++ b/lisp/find-paths.el @@ -109,6 +109,10 @@ from the search." (paths-file-readable-directory-p (paths-construct-path (list directory "lisp"))) (paths-file-readable-directory-p (paths-construct-path (list directory "etc")))))) +(defun paths-root-in-place-p (root) + "Check if ROOT is an in-place installation root for XEmacs." + (paths-file-readable-directory-p (paths-construct-path (list root "lisp")))) + (defun paths-chase-symlink (file-name) "Chase a symlink until the bitter end." (let ((maybe-symlink (file-symlink-p file-name))) @@ -159,7 +163,8 @@ to EXPAND-FILE-NAME." base)))) (defun paths-find-emacs-directory (roots suffix base - &optional envvar default keep-suffix) + &optional envvar default keep-suffix + in-place-external) "Find a directory in the XEmacs hierarchy. ROOTS must be a list of installation roots. SUFFIX is the subdirectory from there. @@ -168,7 +173,9 @@ ENVVAR is the name of the environment variable that might also specify the directory. DEFAULT is the preferred value. If KEEP-SUFFIX is non-nil, the suffix must be respected in searching -the directory." +the directory. +If IN-PLACE-EXTERNAL is non-nil, the directory might be found outside +an in-place root-hierarchy." (let ((preferred-value (or (and envvar (getenv envvar)) default))) (if (and preferred-value @@ -176,28 +183,39 @@ the directory." (file-name-as-directory preferred-value) (catch 'gotcha (while roots - (let* ((root (car roots)) - ;; installed - (path (paths-construct-emacs-directory root suffix base))) - (if (paths-file-readable-directory-p path) - (throw 'gotcha path) - ;; in-place - (if (null keep-suffix) - (let ((path (paths-construct-emacs-directory root "" base))) - (if (paths-file-readable-directory-p path) - (throw 'gotcha path)))))) + (let ((root (car roots))) + ;; installed + (let ((path (paths-construct-emacs-directory root suffix base))) + (if (paths-file-readable-directory-p path) + (throw 'gotcha path))) + ;; in-place + (if (null keep-suffix) + (let ((path (paths-construct-emacs-directory root "" base))) + (if (paths-file-readable-directory-p path) + (throw 'gotcha path)))) + (if (and in-place-external + (paths-root-in-place-p root)) + (let ((path (paths-construct-emacs-directory + (paths-construct-path '("..") root) + "" base))) + (if (paths-file-readable-directory-p path) + (throw 'gotcha path))))) (setq roots (cdr roots))) nil)))) -(defun paths-find-site-directory (roots base &optional envvar default) - "Find a site-specific directory in the XEmacs hierarchy." +(defun paths-find-site-directory (roots base &optional envvar default in-place-external) + "Find a site-specific directory in the XEmacs hierarchy. +If IN-PLACE-EXTERNAL is non-nil, the directory might be found outside +an in-place root-hierarchy." (paths-find-emacs-directory roots (file-name-as-directory (paths-construct-path (list "lib" emacs-program-name))) base - envvar default)) + envvar default + nil + in-place-external)) (defun paths-find-version-directory (roots base &optional envvar default enforce-version) diff --git a/lisp/finder.el b/lisp/finder.el index 503b7f8..6967e45 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -150,7 +150,9 @@ arguments compiles from `load-path'." (let ((processed nil) (directory-abbrev-alist (append - (mapcar (function (lambda (dir) (cons dir ""))) + (mapcar (function (lambda (dir) + (cons (concat "^" (regexp-quote dir)) + ""))) finder-abbreviate-directory-list) directory-abbrev-alist)) (using-load-path)) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index ce98ccc..297f15d 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -580,25 +580,55 @@ This is normally set via `font-lock-defaults'.") ;; #### barf gag retch. Horrid FSF lossage that we need to ;; keep around for compatibility with font-lock-keywords that -;; forget to properly quote their faces. +;; forget to properly quote their faces. I tried just let-binding +;; them when we eval the face expression, but that failes because +;; some files actually use the variables directly in their init code +;; without quoting them. --ben (defvar font-lock-comment-face 'font-lock-comment-face - "Don't even think of using this.") + "This variable should not be set. +It is present only for horrid FSF compatibility reasons. +The corresponding face should be set using `edit-faces' or the +`set-face-*' functions.") (defvar font-lock-doc-string-face 'font-lock-doc-string-face - "Don't even think of using this.") + "This variable should not be set. +It is present only for horrid FSF compatibility reasons. +The corresponding face should be set using `edit-faces' or the +`set-face-*' functions.") (defvar font-lock-string-face 'font-lock-string-face - "Don't even think of using this.") + "This variable should not be set. +It is present only for horrid FSF compatibility reasons. +The corresponding face should be set using `edit-faces' or the +`set-face-*' functions.") (defvar font-lock-keyword-face 'font-lock-keyword-face - "Don't even think of using this.") + "This variable should not be set. +It is present only for horrid FSF compatibility reasons. +The corresponding face should be set using `edit-faces' or the +`set-face-*' functions.") (defvar font-lock-function-name-face 'font-lock-function-name-face - "Don't even think of using this.") + "This variable should not be set. +It is present only for horrid FSF compatibility reasons. +The corresponding face should be set using `edit-faces' or the +`set-face-*' functions.") (defvar font-lock-variable-name-face 'font-lock-variable-name-face - "Don't even think of using this.") + "This variable should not be set. +It is present only for horrid FSF compatibility reasons. +The corresponding face should be set using `edit-faces' or the +`set-face-*' functions.") (defvar font-lock-type-face 'font-lock-type-face - "Don't even think of using this.") + "This variable should not be set. +It is present only for horrid FSF compatibility reasons. +The corresponding face should be set using `edit-faces' or the +`set-face-*' functions.") (defvar font-lock-reference-face 'font-lock-reference-face - "Don't even think of using this.") + "This variable should not be set. +It is present only for horrid FSF compatibility reasons. +The corresponding face should be set using `edit-faces' or the +`set-face-*' functions.") (defvar font-lock-preprocessor-face 'font-lock-preprocessor-face - "Don't even think of using this.") + "This variable should not be set. +It is present only for horrid FSF compatibility reasons. +The corresponding face should be set using `edit-faces' or the +`set-face-*' functions.") (defconst font-lock-face-list '(font-lock-comment-face @@ -1177,10 +1207,12 @@ buffer modifications are performed or a buffer is reverted.") ;; (if (or change-was-deletion (bobp) ;; (= (preceding-char) ?\n)) ;; (buffer-syntactic-context-flush-cache)) - (if (and (= beg (point-min)) - (= end (point-max))) - (font-lock-fontify-buffer) - (font-lock-fontify-region beg end))) + ;; #### This creates some unnecessary progress gauges. +;; (if (and (= beg (point-min)) +;; (= end (point-max))) +;; (font-lock-fontify-buffer) +;; (font-lock-fontify-region beg end))) + (font-lock-fontify-region beg end)) font-lock-range-table))))))) font-lock-pending-extent-table))) @@ -2490,7 +2522,7 @@ The name is assumed to begin with a capital letter.") (list ;; Javadoc tags - '("@\\(author\\|exception\\|throws\\|deprecated\\|param\\|return\\|see\\|since\\|version\\)\\s " + '("@\\(author\\|deprecated\\|exception\\|throws\\|param\\|return\\|see\\|since\\|version\\|serial\\|serialData\\|serialField\\)\\s " 0 font-lock-keyword-face t) ;; Doc tag - Parameter identifiers diff --git a/lisp/info.el b/lisp/info.el index a4a6df3..b9d4aaf 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -592,6 +592,7 @@ to read a file name from the minibuffer." (bury-buffer (find-file-noselect (car f)))) (setq f (cdr f))))) +;;;###autoload (defun Info-find-node (filename &optional nodename no-going-back tryfile line) "Go to an info node specified as separate FILENAME and NODENAME. Look for a plausible filename, or if not found then look for URL's and diff --git a/lisp/isearch-mode.el b/lisp/isearch-mode.el index 9ad9c45..f42dc35 100644 --- a/lisp/isearch-mode.el +++ b/lisp/isearch-mode.el @@ -1883,8 +1883,7 @@ uppercase letters and `search-caps-disable-folding' is t." ;; buffer. (mapc #'delete-extent isearch-highlight-extents) (setq isearch-highlight-extents nil) - (setq isearch-highlight-all-start nil - isearch-window-end nil + (setq isearch-window-end nil isearch-highlight-last-string nil)) (defun isearch-highlight-all-update () diff --git a/lisp/itimer.el b/lisp/itimer.el index 5c7a839..f4bdbcf 100644 --- a/lisp/itimer.el +++ b/lisp/itimer.el @@ -505,7 +505,7 @@ x start a new itimer tab-stop-list '(22 32 40 60 67)) (abbrev-mode 0) (auto-fill-mode 0) - (buffer-flush-undo (current-buffer)) + (buffer-disable-undo (current-buffer)) (use-local-map itimer-edit-map) (set-syntax-table emacs-lisp-mode-syntax-table)) @@ -714,15 +714,20 @@ x start a new itimer (unwind-protect (condition-case condition-data (save-match-data + ;; Suppress warnings - see comment below. + (defvar last-event-time) + (defvar next-wakeup) + (defvar itimer) + (defvar itimers) + (defvar time-elapsed) (let* ((current-itimer itimer) (quit-flag nil) (inhibit-quit nil) ;; for FSF Emacs timer.el emulation under XEmacs. ;; eldoc expect this to be done, apparently. (this-command nil) - ;; bind these variables so that the - ;; itimer function can't screw with - ;; them. + ;; bind these variables so that the itimer + ;; function can't screw with them. last-event-time next-wakeup itimer itimers time-elapsed) (if (itimer-uses-arguments current-itimer) diff --git a/lisp/msw-select.el b/lisp/msw-select.el index de454df..ff659f9 100644 --- a/lisp/msw-select.el +++ b/lisp/msw-select.el @@ -38,7 +38,7 @@ replacing the active selection if there is one." (interactive "*") (setq last-command nil) (setq this-command 'yank) ; so that yank-pop works. - (let ((clip (mswindows-get-clipboard)) (s (mark-marker)) (e (point-marker))) + (let ((clip (get-clipboard)) (s (mark-marker)) (e (point-marker))) (or clip (error "there is no text on the clipboard")) (if s (if mouse-track-rectangle-p diff --git a/lisp/mule/mule-category.el b/lisp/mule/mule-category.el index 92af2d0..913fc71 100644 --- a/lisp/mule/mule-category.el +++ b/lisp/mule/mule-category.el @@ -35,7 +35,7 @@ ;;; Code: -(defvar defined-category-hashtable (make-hashtable 50)) +(defvar defined-category-hashtable (make-hash-table :size 50)) (defun define-category (designator doc-string) "Make a new category whose designator is DESIGNATOR. diff --git a/lisp/mule/mule-x-init.el b/lisp/mule/mule-x-init.el index b67f7e7..35a08b4 100644 --- a/lisp/mule/mule-x-init.el +++ b/lisp/mule/mule-x-init.el @@ -40,16 +40,16 @@ Traditionally, Asian characters have been displayed so that they occupy exactly twice the screen space of ASCII (`halfwidth') characters. On many systems, e.g. Sun CDE systems, this can only be achieved by using a national variant roman font to display ASCII." - (let ((charset-font-width - (lambda (charset) - (font-instance-width - (face-font-instance 'default (selected-device) charset)))) - - (twice-as-wide - (lambda (cs1 cs2) - (let ((width1 (funcall charset-font-width cs1)) - (width2 (funcall charset-font-width cs2))) - (and width1 width2 (eq (+ width1 width1) width2)))))) + (let* ((charset-font-width + (lambda (charset) + (font-instance-width + (face-font-instance 'default (selected-device) charset)))) + + (twice-as-wide + (lambda (cs1 cs2) + (let ((width1 (funcall charset-font-width cs1)) + (width2 (funcall charset-font-width cs2))) + (and width1 width2 (eq (+ width1 width1) width2)))))) (when (eq 'x (device-type)) (condition-case nil diff --git a/lisp/package-get.el b/lisp/package-get.el index eb395a9..bbb1886 100644 --- a/lisp/package-get.el +++ b/lisp/package-get.el @@ -373,7 +373,8 @@ if different." (unless (and location (file-writable-p location)) (setq location package-get-user-index-filename)) (when (y-or-n-p (concat "Update package index in " location "? ")) - (write-file location)))))) + (let ((coding-system-for-write 'binary)) + (write-file location))))))) ;;;###autoload @@ -399,7 +400,7 @@ Unless FORCE-CURRENT is non-nil never try to update the database." (save-excursion (set-buffer buf) (erase-buffer buf) - (insert-file-contents-internal db-file) + (insert-file-contents-literally db-file) (package-get-update-base-from-buffer buf) (if (file-remote-p db-file) (package-get-maybe-save-index db-file))) @@ -844,9 +845,7 @@ successfully installed but errors occurred during initialization, or ;; Doing it with XEmacs removes the need for an external md5 program (message "Validating checksum for `%s'..." package) (sit-for 0) (with-temp-buffer - ;; What ever happened to i-f-c-literally - (let (file-name-handler-alist) - (insert-file-contents-internal full-package-filename)) + (insert-file-contents-literally full-package-filename) (if (not (string= (md5 (current-buffer)) (package-get-info-prop this-package 'md5sum))) diff --git a/lisp/package-info.el b/lisp/package-info.el index e3be100..6226664 100644 --- a/lisp/package-info.el +++ b/lisp/package-info.el @@ -48,12 +48,11 @@ ; (setq result (md5 (current-buffer)))) ; result)) +;;; APA: Stolen from package-get in package-get.el (defun pi-md5sum (file) (with-temp-buffer - (call-process "md5sum" file t) - (goto-char (point-min)) - (looking-at "[a-z0-9]+") - (buffer-substring (match-beginning 0) (match-end 0)))) + (insert-file-contents-literally file) + (md5 (current-buffer)))) (defun pi-update-key (key value) (save-excursion diff --git a/lisp/package-ui.el b/lisp/package-ui.el index c349ca2..32dce7b 100644 --- a/lisp/package-ui.el +++ b/lisp/package-ui.el @@ -31,7 +31,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defgroup pui nil - "Conventient interface to the package system." + "Convenient interface to the package system." :group 'package-tools :tag "Package User interface" :prefix "pui-") @@ -309,7 +309,7 @@ and whether or not it is up-to-date." (delete pkg-sym pui-deleted-packages)) (setq pui-deleted-packages (cons pkg-sym pui-deleted-packages)) - (setq pui-seleted-packages + (setq pui-selected-packages (delete pkg-sym pui-selected-packages))) (pui-update-package-display extent pkg-sym) )) diff --git a/lisp/packages.el b/lisp/packages.el index 9ecd6db..11162e4 100644 --- a/lisp/packages.el +++ b/lisp/packages.el @@ -350,7 +350,7 @@ This function is basically a wrapper over `locate-file'." ;; make sure paths-find-version-directory and paths-find-site-directory ;; don't both pick up version-independent directories ... (let ((version-directory (paths-find-version-directory roots base nil nil t)) - (site-directory (paths-find-site-directory roots base))) + (site-directory (paths-find-site-directory roots base nil nil t))) (paths-uniq-append (and version-directory (list version-directory)) (and site-directory (list site-directory))))) diff --git a/lisp/printer.el b/lisp/printer.el index ed1ce4d..20211bf 100644 --- a/lisp/printer.el +++ b/lisp/printer.el @@ -159,15 +159,17 @@ PostScript printer. Under MS Windows, the built-in printing support is used." (progn (setq d (make-device 'msprinter printer-name)) (setq f (make-frame - '(name "Test!" - menubar-visible-p nil - has-modeline-p nil - default-toolbar-visible-p nil - default-gutter-visible-p nil - minibuffer none - modeline-shadow-thickness 0 - vertical-scrollbar-visible-p nil - horizontal-scrollbar-visible-p nil) + (list* 'name (concat (substitute ?_ ?. + (buffer-name buf)) + " - XEmacs") + '(menubar-visible-p nil + has-modeline-p nil + default-toolbar-visible-p nil + default-gutter-visible-p nil + minibuffer none + modeline-shadow-thickness 0 + vertical-scrollbar-visible-p nil + horizontal-scrollbar-visible-p nil)) d)) (let* ((w (frame-root-window f)) (vertdpi (cdr (device-system-metric d 'device-dpi))) diff --git a/lisp/process.el b/lisp/process.el index 1fc438a..4605e98 100644 --- a/lisp/process.el +++ b/lisp/process.el @@ -105,8 +105,10 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you (setq infile (expand-file-name infile)) (setq inbuf (generate-new-buffer "*call-process*")) (with-current-buffer inbuf - (insert-file-contents-internal infile nil nil nil nil - coding-system-for-read))) + ;; Make sure this works with jka-compr + (let ((file-name-handler-alist nil)) + (insert-file-contents-internal infile nil nil nil nil + 'binary)))) (let ((stderr (if (consp buffer) (second buffer) t))) (if (consp buffer) (setq buffer (car buffer))) (setq buffer @@ -429,8 +431,14 @@ lost packets." (defun shell-quote-argument (argument) "Quote an argument for passing as argument to an inferior shell." - (if (eq system-type 'windows-nt) - (nt-quote-process-args (list shell-file-name argument)) + (if (and (eq system-type 'windows-nt) + ;; #### this is a temporary hack. a better solution needs + ;; futzing with the c code. i'll do this shortly. + (let ((progname (downcase (file-name-nondirectory + shell-file-name)))) + (or (equal progname "command.com") + (equal progname "cmd.exe")))) + argument ;; Quote everything except POSIX filename characters. ;; This should be safe enough even for really weird shells. (let ((result "") (start 0) end) diff --git a/lisp/rect.el b/lisp/rect.el index 2393182..75ba30c 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -273,12 +273,10 @@ and point is at the lower right corner." (defun open-rectangle-line (startcol endcol fill) - (let (spaces) - (when (= (move-to-column startcol (or fill 'coerce)) startcol) - (unless (and (not fill) - (= (point) (point-at-eol))) - (indent-to endcol))) - )) + (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (unless (and (not fill) + (= (point) (point-at-eol))) + (indent-to endcol)))) ;;;###autoload (defun open-rectangle (start end &optional fill) @@ -308,6 +306,7 @@ Otherwise this command does not delete or overwrite any existing text. When called from a program, the rectangle's corners are START and END." (interactive "*r\nsString rectangle: ") + (defvar pending-delete-mode) (apply-on-rectangle 'string-rectangle-line start end string (and (boundp 'pending-delete-mode) pending-delete-mode))) diff --git a/lisp/select.el b/lisp/select.el index 82788f4..1a9a20a 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -105,24 +105,33 @@ says how to convert the data. If there is no selection an error is signalled." (get-selection type (cdr data-type)) (signal (car err) (cdr err))))) (get-selection-internal type data-type)))) - (when (and (consp text) (symbolp (car text))) - (setq text (cdr text))) - (when (not (stringp text)) - (error "Selection is not a string: %S" text)) text)) ;; FSFmacs calls this `x-set-selection', and reverses the ;; first two arguments (duh ...). This order is more logical. -(defun own-selection (data &optional type append) +(defun own-selection (data &optional type how-to-add data-type) "Make a window-system selection of type TYPE and value DATA. The argument TYPE (default `PRIMARY') says which selection, -and DATA specifies the contents. DATA may be a string, -a symbol, an integer (or a cons of two integers or list of two integers). -If APPEND is non-nil, append the data to the existing selection data. +and DATA specifies the contents. DATA may be any lisp data type +that can be converted using the function corresponding to DATA-TYPE +in `select-converter-alist'---strings are the usual choice, but +other types may be permissible depending on the DATA-TYPE parameter +(if DATA-TYPE is not supplied, the default behaviour is window +system specific, but strings are always accepted). +HOW-TO-ADD may be any of the following: + + 'replace-all or nil -- replace all data in the selection. + 'replace-existing -- replace data for specified DATA-TYPE only. + 'append or t -- append data to existing DATA-TYPE data. + +DATA-TYPE is the window-system specific data type identifier +(see `register-selection-data-type' for more information). The selection may also be a cons of two markers pointing to the same buffer, or an overlay. In these cases, the selection is considered to be the text -between the markers *at whatever time the selection is examined*. +between the markers *at whatever time the selection is examined* (note +that the window system clipboard does not necessarily duplicate this +behaviour - it doesn't on mswindows for example). Thus, editing done in the buffer after you specify the selection can alter the effective value of the selection. @@ -138,32 +147,13 @@ Interactively, the text of the region is used as the selection value." ;; "This is for temporary compatibility with pre-release Emacs 19." ;(if (stringp type) ; (setq type (intern type))) - (or (valid-simple-selection-p data) - (and (vectorp data) - (let ((valid t) - (i (1- (length data)))) - (while (>= i 0) - (or (valid-simple-selection-p (aref data i)) - (setq valid nil)) - (setq i (1- i))) - valid)) - (signal 'error (list "invalid selection" data))) (or type (setq type 'PRIMARY)) - (flet ((own-selection-1 - (type data append) - (when append - (unless (stringp data) - ;; kludge! - (setq data (select-convert-to-text type 'STRING data)) - (if (stringp data) - (setq data (concat (get-selection type) data))))) - (own-selection-internal type data))) - (if (null data) - (disown-selection-internal type) - (own-selection-1 type data append) - (when (and (eq type 'PRIMARY) - selection-sets-clipboard) - (own-selection-internal 'CLIPBOARD data append)))) + (if (null data) + (disown-selection-internal type) + (own-selection-internal type data how-to-add data-type) + (when (and (eq type 'PRIMARY) + selection-sets-clipboard) + (own-selection-internal 'CLIPBOARD data how-to-add data-type))) (cond ((eq type 'PRIMARY) (setq primary-selection-extent (select-make-extent-for-selection @@ -176,7 +166,7 @@ Interactively, the text of the region is used as the selection value." ;; when behaving as the latter, we better not set it, or we will ;; cause unwanted sticky-region behavior in kill-region and friends. (if (interactive-p) - (setq zmacs-region-stays t)) + (setq zmacs-region-stays t)) data) (defun dehilight-selection (selection) @@ -200,9 +190,9 @@ Interactively, the text of the region is used as the selection value." (setq lost-selection-hooks 'dehilight-selection) -(defun own-clipboard (string &optional append) +(defun own-clipboard (string &optional push) "Paste the given string to the window system Clipboard. -If APPEND is non-nil, append the string to the existing contents." +See `interprogram-cut-function' for more information." (own-selection string 'CLIPBOARD)) (defun disown-selection (&optional secondary-p) @@ -306,6 +296,9 @@ secondary selection instead of the primary selection." ;; moved from x-select.el (defun valid-simple-selection-p (data) + "An obsolete function that tests whether something was a valid simple +selection using the old XEmacs selection support. You shouldn't use this +any more, because just about anything could be a valid selection now." (or (stringp data) ;FSFmacs huh?? (symbolp data) (integerp data) @@ -367,11 +360,31 @@ secondary selection instead of the primary selection." (disown-selection nil) ))) + ;;; Functions to convert the selection into various other selection -;;; types. Every selection type that emacs handles is implemented -;;; this way, except for TIMESTAMP, which is a special case. These are -;;; all moved from x-select.el - +;;; types. + +;; These two functions get called by C code... +(defun select-convert-in (selection type value) + "Attempt to convert the specified external VALUE to the specified DATA-TYPE, +for the specified SELECTION. Return nil if this is impossible, or a +suitable internal representation otherwise." + (when value + (let ((handler-fn (cdr (assq type selection-converter-in-alist)))) + (when handler-fn + (apply handler-fn (list selection type value)))))) + +(defun select-convert-out (selection type value) + "Attempt to convert the specified internal VALUE for the specified DATA-TYPE +and SELECTION. Return nil if this is impossible, or a suitable external +representation otherwise." + (when value + (let ((handler-fn (cdr (assq type selection-converter-out-alist)))) + (when handler-fn + (apply handler-fn (list selection type value)))))) + +;; The rest of the functions on this "page" are conversion handlers, +;; append handlers and buffer-kill handlers. (defun select-convert-to-text (selection type value) (cond ((stringp value) value) @@ -397,6 +410,10 @@ secondary selection instead of the primary selection." (buffer-substring (car value) (cdr value))))) (t nil))) +(defun select-convert-from-text (selection type value) + (when (stringp value) + value)) + (defun select-convert-to-string (selection type value) (let ((outval (select-convert-to-text selection type value))) ;; force the string to be not in Compound Text format. @@ -427,6 +444,9 @@ secondary selection instead of the primary selection." (cons (ash value -16) (logand value 65535)) nil))) +(defun select-convert-from-length (selection type value) + (select-convert-to-length selection type value)) + (defun select-convert-to-targets (selection type value) ;; return a vector of atoms, but remove duplicates first. (let* ((all (cons 'TIMESTAMP (mapcar 'car selection-converter-alist))) @@ -434,8 +454,6 @@ secondary selection instead of the primary selection." (while rest (cond ((memq (car rest) (cdr rest)) (setcdr rest (delq (car rest) (cdr rest)))) - ((eq (car (cdr rest)) '_EMACS_INTERNAL) ; shh, it's a secret - (setcdr rest (cdr (cdr rest)))) (t (setq rest (cdr rest))))) (apply 'vector all))) @@ -458,6 +476,10 @@ secondary selection instead of the primary selection." (error "selection is in a killed buffer")))) (t nil))) +(defun select-convert-from-filename (selection type value) + (when (stringp value) + value)) + (defun select-convert-to-charpos (selection type value) (let (a b tmp) (cond ((cond ((extentp value) @@ -575,13 +597,127 @@ secondary selection instead of the primary selection." (and (integerp value) (cons (ash value -16) (logand value 65535)))) +;; Can convert from the following integer representations +;; +;; integer +;; (integer . integer) +;; (integer integer) +;; (list [integer|(integer . integer)]*) +;; (vector [integer|(integer . integer)]*) +;; +;; Cons'd integers get cleaned up a little. + +(defun select-convert-from-integer (selection type value) + (cond ((integerp value) ; Integer + value) + + ((and (consp value) ; (integer . integer) + (integerp (car value)) + (integerp (cdr value))) + (if (eq (car value) 0) + (cdr value) + (if (and (eq (car value) -1) + (< (cdr value) 0)) + (cdr value) + value))) + + ((and (listp value) ; (integer integer) + (eq (length value) 2) + (integerp (car value)) + (integerp (cadr value))) + (if (eq (car value) 0) + (cadr value) + (if (and (eq (car value) -1) + (< (cdr value) 0)) + (- (cadr value)) + (cons (car value) (cadr value))))) + + ((listp value) ; list + (if (cdr value) + (mapcar '(lambda (x) + (select-convert-from-integer selection type x)) + value) + (select-convert-from-integer selection type (car value)))) + + ((vectorp value) ; vector + (if (eq (length value) 1) + (select-convert-from-integer selection type (aref value 0)) + (mapvector '(lambda (x) + (select-convert-from-integer selection type x)) + value))) + + (t nil) + )) + (defun select-convert-to-atom (selection type value) (and (symbolp value) value)) -(defun select-convert-to-identity (selection type value) ; used internally - (vector value)) +;;; CF_xxx conversions +(defun select-convert-from-cf-text (selection type value) + (replace-in-string (if (string-match "\0" value) + (substring value 0 (match-beginning 0)) + value) + "\\(\r\n\\|\n\r\\)" "\n" t)) + +(defun select-convert-to-cf-text (selection type value) + (let ((text (select-convert-to-text selection type value))) + (concat (replace-in-string text "\n" "\r\n" t) "\0"))) + +;;; Appenders +(defun select-append-to-text (selection type value1 value2) + (let ((text1 (select-convert-to-text selection 'STRING value1)) + (text2 (select-convert-to-text selection 'STRING value2))) + (if (and text1 text2) + (concat text1 text2) + nil))) + +(defun select-append-to-string (selection type value1 value2) + (select-append-to-text selection type value1 value2)) + +(defun select-append-to-compound-text (selection type value1 value2) + (select-append-to-text selection type value1 value2)) + +(defun select-append-to-cf-text (selection type value1 value2) + (let ((text1 (select-convert-from-cf-text selection 'CF_TEXT value1)) + (text2 (select-convert-from-cf-text selection 'CF_TEXT value2))) + (if (and text1 text2) + (select-convert-to-cf-text selection type (concat text1 text2)) + nil))) -(setq selection-converter-alist +(defun select-append-default (selection type value1 value2) +;; This appender gets used if the type is "nil" - i.e. default. +;; It should probably have more cases implemented than it does - e.g. +;; appending numbers to strings, etc... + (cond ((and (stringp value1) (stringp value2)) + (select-append-to-string selection 'STRING value1 value2)) + (t nil))) + +;;; Buffer kill handlers + +;; #### Should this function take the text *out* of the buffer that's +;; being killed? Or should it do what the original code did and just +;; destroy the selection? +(defun select-buffer-killed-default (selection type value buffer) +;; This handler gets used if the type is "nil". + (cond ((extentp value) + (unless (eq (extent-object value) buffer) + value)) + ((markerp value) + (unless (eq (marker-buffer value) buffer) + value)) + ((and (consp value) + (markerp (car value)) + (markerp (cdr value))) + (unless (or (eq (marker-buffer (car value)) buffer) + (eq (marker-buffer (cdr value)) buffer)) + value)) + (t value))) + +(defun select-buffer-killed-text (selection type value buffer) + (select-buffer-killed-default selection type value buffer)) + +;; Types listed in here can be selections of XEmacs +(setq selection-converter-out-alist '((TEXT . select-convert-to-text) (STRING . select-convert-to-string) (COMPOUND_TEXT . select-convert-to-compound-text) @@ -600,7 +736,46 @@ secondary selection instead of the primary selection." (NAME . select-convert-to-name) (ATOM . select-convert-to-atom) (INTEGER . select-convert-to-integer) - (_EMACS_INTERNAL . select-convert-to-identity) + (CF_TEXT . select-convert-to-cf-text) )) +;; Types listed here can be selections foreign to XEmacs +(setq selection-converter-in-alist + '(; Specific types that get handled by generic converters + (COMPOUND_TEXT . select-convert-from-text) + (SOURCE_LOC . select-convert-from-text) + (OWNER_OS . select-convert-from-text) + (HOST_NAME . select-convert-from-text) + (USER . select-convert-from-text) + (CLASS . select-convert-from-text) + (NAME . select-convert-from-text) + ; Generic types + (INTEGER . select-convert-from-integer) + (TEXT . select-convert-from-text) + (STRING . select-convert-from-text) + (LENGTH . select-convert-from-length) + (FILE_NAME . select-convert-from-filename) + (CF_TEXT . select-convert-from-cf-text) + )) + +;; Types listed here can be appended by own-selection +(setq selection-appender-alist + '((nil . select-append-default) + (TEXT . select-append-to-text) + (STRING . select-append-to-string) + (COMPOUND_TEXT . select-append-to-compound-text) + (CF_TEXT . select-append-to-cf-text) + )) + +;; Types listed here have buffer-kill handlers +(setq selection-buffer-killed-alist + '((nil . select-buffer-killed-default) + (TEXT . select-buffer-killed-text) + (STRING . select-buffer-killed-text) + (COMPOUND_TEXT . select-buffer-killed-text) + (CF_TEXT . select-buffer-killed-text))) + +;; Lists of types that are coercible (can be converted to other types) +(setq selection-coercible-types '(TEXT STRING COMPOUND_TEXT)) + ;;; select.el ends here diff --git a/lisp/simple.el b/lisp/simple.el index 9ece9ae..f198f8e 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -719,9 +719,18 @@ BUFFER defaults to the current buffer." (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. +;; new in XEmacs 21.2 (not in FSF). +(defun line-number (&optional pos respect-narrowing) + "Return the line number of POS (defaults to point). +If RESPECT-NARROWING is non-nil, then the narrowed line number is returned; +otherwise, the absolute line number is returned. The returned line can always +be given to `goto-line' to get back to the current line." + (if (and pos (/= pos (point))) + (save-excursion + (goto-char pos) + (line-number nil respect-narrowing)) + (1+ (count-lines (if respect-narrowing (point-min) 1) (point-at-bol))))) + (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, @@ -729,7 +738,13 @@ 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. With optional IGNORE-INVISIBLE-LINES-FLAG non-nil, lines collapsed with -selective-display are excluded from the line count." +selective-display are excluded from the line count. + +NOTE: The expression to return the current line number is not obvious: + +(1+ (count-lines 1 (point-at-bol))) + +See also `line-number'." (save-excursion (save-restriction (narrow-to-region start end) diff --git a/lisp/startup.el b/lisp/startup.el index 4d1c751..734e0b4 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -107,17 +107,30 @@ the user's init file.") (defvar user-init-directory-base ".xemacs" "Base of directory where user-installed init files may go.") -(defvar user-init-file-base-list (append - '(".emacs.elc" ".emacs.el" ".emacs") - (and (eq system-type 'windows-nt) - '("_emacs.elc" "_emacs.el" "_emacs"))) - "List of allowed init files. The first one found takes precedence.") - (defvar user-init-directory (file-name-as-directory (paths-construct-path (list "~" user-init-directory-base))) "Directory where user-installed init files may go.") +(defvar user-init-file-base "init.el" + "Default name of the user init file if uncompiled. +This should be used for migration purposes only.") + +(defvar user-init-file-base-list '("init.elc" "init.el") + "List of allowed init files in the user's init directory. +The first one found takes precedence.") + +(defvar user-home-init-file-base-list + (append '(".emacs.elc" ".emacs.el" ".emacs") + (and (eq system-type 'windows-nt) + '("_emacs.elc" "_emacs.el" "_emacs"))) + "List of allowed init files in the user's home directory. +The first one found takes precedence.") + +(defvar load-home-init-file nil + "Non-nil if XEmacs should load the init file from the home directory. +Otherwise, XEmacs will offer migration to the init directory.") + (defvar load-user-init-file-p t "Non-nil if XEmacs should load the user's init file.") @@ -452,6 +465,9 @@ Type ^H^H^H (Control-h Control-h Control-h) to get more help options.\n") (when window-setup-hook (run-hooks 'window-setup-hook)) (setq window-setup-hook nil)) + + (if load-user-init-file-p + (maybe-migrate-user-init-file)) ;;####FSFmacs junk ;; (or menubar-bindings-done ;; (precompute-menubar-bindings)) @@ -535,10 +551,13 @@ Type ^H^H^H (Control-h Control-h Control-h) to get more help options.\n") (string= arg "-user")) (let* ((user (pop args)) (home-user (concat "~" user))) - (setq user-init-file (find-user-init-file home-user) - user-init-directory (file-name-as-directory + (setq user-init-directory (file-name-as-directory (paths-construct-path - (list home-user user-init-directory-base)))))) + (list home-user user-init-directory-base)))) + (setq user-init-file + (find-user-init-file user-init-directory home-user)) + (setq custom-file + (make-custom-file-name user-init-file)))) ((string= arg "-debug-init") (setq init-file-debug t)) ((string= arg "-unmapped") @@ -642,20 +661,88 @@ If this is nil, no message will be displayed.") (setq term (substring term 0 hyphend)) (setq term nil)))))) -(defun find-user-init-file (&optional directory) +(defun find-user-init-directory-init-file (&optional init-directory) + "Determine the user's init file if in the init directory." + (let ((init-directory (or init-directory user-init-directory))) + (catch 'found + (dolist (file user-init-file-base-list) + (let ((expanded (expand-file-name file init-directory))) + (when (file-exists-p expanded) + (throw 'found expanded))))))) + +(defun find-user-home-directory-init-file (&optional home-directory) + "Determine the user's init file if in the home directory." + (let ((home-directory (or home-directory "~"))) + (catch 'found + (dolist (file user-home-init-file-base-list) + (let ((expanded (expand-file-name file home-directory))) + (when (file-exists-p expanded) + (throw 'found expanded)))) + nil))) + +(defun find-user-init-file (&optional init-directory home-directory) "Determine the user's init file." - (unless directory - (setq directory "~")) - (dolist (file user-init-file-base-list) - (let ((expanded (paths-construct-path (list directory file)))) - (when (file-exists-p expanded) - (return expanded))))) + (if load-home-init-file + (find-user-home-directory-init-file home-directory) + (or (find-user-init-directory-init-file init-directory) + (find-user-home-directory-init-file home-directory)))) + +(defun maybe-migrate-user-init-file () + "Ask user if she wants to migrate the init file(s) to new location." + (if (and (not load-home-init-file) + (not (find-user-init-directory-init-file user-init-directory)) + (file-exists-p user-init-file)) + (if (with-output-to-temp-buffer (help-buffer-name nil) + (progn + (princ "XEmacs recommends that the initialization code in +") + (princ user-init-file) + (princ " +be migrated to the ") + (princ user-init-directory) + (princ " directory. XEmacs can +perform the migration automatically. + +After the migration, init.el/init.elc holds user-written +initialization code. Moreover the customize settings will be in +custom.el. + +If you choose not to do this now, XEmacs will not ask you this +question in the future. However, you can still make XEmacs +perform the migration at any time with M-x migrate-user-init-file.") + (show-temp-buffer-in-current-frame standard-output) + (yes-or-no-p-minibuf (concat "Migrate init file to " + user-init-directory + "? ")))) + (migrate-user-init-file) + (customize-save-variable 'load-home-init-file t)))) + +(defun migrate-user-init-file () + "Migrate the init file from the home directory." + (interactive) + (if (not (file-exists-p user-init-directory)) + (progn + (message "Creating %s directory..." user-init-directory) + (make-directory user-init-directory))) + (message "Migrating custom file...") + (custom-migrate-custom-file (make-custom-file-name user-init-file + 'force-new)) + (message "Moving init file...") + (rename-file user-init-file + (expand-file-name user-init-file-base + user-init-directory)) + (message "Migration done.")) (defun load-user-init-file () - "This function actually reads the init file, .emacs." + "This function actually reads the init file." (if (or user-init-file - (setq user-init-file (find-user-init-file))) + (setq user-init-file (find-user-init-file user-init-directory))) (load user-init-file t t t)) + (if (not custom-file) + (setq custom-file (make-custom-file-name user-init-file))) + (if (and (not (string= custom-file user-init-file)) + (file-exists-p custom-file)) + (load custom-file t t t)) (unless inhibit-default-init (let ((inhibit-startup-message nil)) ;; Users are supposed to be told their rights. @@ -683,8 +770,9 @@ If this is nil, no message will be displayed.") (if (eq init-file-debug t) 'startup init-file-debug))) (let ((debug-on-error debug-on-error-initial)) (if (and load-user-init-file-p init-file-debug) - ;; Do this without a condition-case if the user wants to debug. - (load-user-init-file) + (progn + ;; Do this without a condition-case if the user wants to debug. + (load-user-init-file)) (condition-case error (progn (if load-user-init-file-p diff --git a/lisp/toolbar.el b/lisp/toolbar.el index 74d44e7..f92b044 100644 --- a/lisp/toolbar.el +++ b/lisp/toolbar.el @@ -123,6 +123,9 @@ customized through the options menu." (defvar last-pressed-toolbar-button nil) (defvar toolbar-active nil) +(defvar toolbar-blank-press-function nil + "Function to call if a blank area of the toolbar is pressed.") + ;; ;; It really sucks that we also have to tie onto ;; default-mouse-motion-handler to make sliding buttons work right. @@ -143,9 +146,8 @@ an argument if press is over a blank area of the toolbar." (setq last-pressed-toolbar-button button)) ;; Added by Bob Weiner, Motorola Inc., 10/6/95, to handle ;; presses on blank portions of toolbars. - (and (boundp 'toolbar-blank-press-function) - (functionp toolbar-blank-press-function) - (funcall toolbar-blank-press-function event))))) + (when (functionp toolbar-blank-press-function) + (funcall toolbar-blank-press-function event))))) (defun release-and-activate-toolbar-button (event) "Release a toolbar button and activate its callback. diff --git a/lisp/x-faces.el b/lisp/x-faces.el index 491d2c8..c3e35d7 100644 --- a/lisp/x-faces.el +++ b/lisp/x-faces.el @@ -492,11 +492,13 @@ Otherwise, it returns the next larger version of this font that is defined." (or (null locale) (eq locale 'global))) (progn (or fn (setq fn (x-get-resource - "font" "Font" 'string locale))) + "font" "Font" 'string locale nil 'warn))) (or fg (setq fg (x-get-resource - "foreground" "Foreground" 'string locale))) + "foreground" "Foreground" 'string locale nil + 'warn))) (or bg (setq bg (x-get-resource - "background" "Background" 'string locale))))) + "background" "Background" 'string locale nil + 'warn))))) ;; ;; "*cursorColor: foo" is equivalent to setting the background of the ;; text-cursor face. @@ -504,7 +506,8 @@ Otherwise, it returns the next larger version of this font that is defined." (if (and (eq (face-name face) 'text-cursor) (or (null locale) (eq locale 'global))) (setq bg (or (x-get-resource - "cursorColor" "CursorColor" 'string locale) bg))) + "cursorColor" "CursorColor" 'string locale nil 'warn) + bg))) ;; #### should issue warnings? I think this should be ;; done when the instancing actually happens, but I'm not ;; sure how it should actually be dealt with. @@ -735,7 +738,8 @@ Otherwise, it returns the next larger version of this font that is defined." ;; If reverseVideo was specified, swap the foreground and background ;; of the default and modeline faces. ;; - (cond ((car (x-get-resource "reverseVideo" "ReverseVideo" 'boolean frame)) + (cond ((car (x-get-resource "reverseVideo" "ReverseVideo" 'boolean frame + nil 'warn)) ;; First make sure the modeline has fg and bg, inherited from the ;; current default face - for the case where only one is specified, ;; so that invert-face doesn't do something weird. diff --git a/lisp/x-misc.el b/lisp/x-misc.el index 96606bf..f6340bb 100644 --- a/lisp/x-misc.el +++ b/lisp/x-misc.el @@ -66,7 +66,7 @@ a check is done for bogus resource specifications." (let* ((name (caar resource-list)) (class (cdar resource-list)) (resource - (x-get-resource name class type locale nil t))) + (x-get-resource name class type locale nil 'warn))) (if resource (progn (add-spec-to-specifier specifier resource locale) @@ -75,12 +75,12 @@ a check is done for bogus resource specifications." (defun x-get-resource-and-bogosity-check (name class type &optional locale) (x-bogosity-check-resource name class type) - (x-get-resource name class type locale nil t)) + (x-get-resource name class type locale nil 'warn)) (defun x-get-resource-and-maybe-bogosity-check (name class type &optional locale) (if (eq locale 'global) (x-bogosity-check-resource name class type)) - (x-get-resource name class type locale nil t)) + (x-get-resource name class type locale nil 'warn)) ;;; x-misc.el ends here diff --git a/lisp/x-mouse.el b/lisp/x-mouse.el index 8d29570..2d57100 100644 --- a/lisp/x-mouse.el +++ b/lisp/x-mouse.el @@ -100,41 +100,48 @@ to the cut buffer" (if x-pointers-initialized ; only do it when the first device is created nil (set-glyph-image text-pointer-glyph - (or (x-get-resource "textPointer" "Cursor" 'string device) + (or (x-get-resource "textPointer" "Cursor" 'string device nil 'warn) "xterm")) (set-glyph-image selection-pointer-glyph - (or (x-get-resource "selectionPointer" "Cursor" 'string device) + (or (x-get-resource "selectionPointer" "Cursor" 'string device + nil 'warn) "top_left_arrow")) (set-glyph-image nontext-pointer-glyph - (or (x-get-resource "spacePointer" "Cursor" 'string device) + (or (x-get-resource "spacePointer" "Cursor" 'string device nil 'warn) "xterm")) ; was "crosshair" (set-glyph-image modeline-pointer-glyph - (or (x-get-resource "modeLinePointer" "Cursor" 'string device) + (or (x-get-resource "modeLinePointer" "Cursor" 'string device + nil 'warn) ;; "fleur")) "sb_v_double_arrow")) (set-glyph-image gc-pointer-glyph - (or (x-get-resource "gcPointer" "Cursor" 'string device) + (or (x-get-resource "gcPointer" "Cursor" 'string device nil 'warn) "watch")) (when (featurep 'scrollbar) (set-glyph-image scrollbar-pointer-glyph - (or (x-get-resource "scrollbarPointer" "Cursor" 'string device) + (or (x-get-resource "scrollbarPointer" "Cursor" 'string device + nil 'warn) "top_left_arrow"))) (set-glyph-image busy-pointer-glyph - (or (x-get-resource "busyPointer" "Cursor" 'string device) + (or (x-get-resource "busyPointer" "Cursor" 'string device nil 'warn) "watch")) (set-glyph-image toolbar-pointer-glyph - (or (x-get-resource "toolBarPointer" "Cursor" 'string device) + (or (x-get-resource "toolBarPointer" "Cursor" 'string device + nil 'warn) "left_ptr")) (set-glyph-image divider-pointer-glyph - (or (x-get-resource "dividerPointer" "Cursor" 'string device) + (or (x-get-resource "dividerPointer" "Cursor" 'string device + nil 'warn) "sb_h_double_arrow")) (let ((fg - (x-get-resource "pointerColor" "Foreground" 'string device))) + (x-get-resource "pointerColor" "Foreground" 'string device + nil 'warn))) (and fg (set-face-foreground 'pointer fg))) (let ((bg - (x-get-resource "pointerBackground" "Background" 'string device))) + (x-get-resource "pointerBackground" "Background" 'string device + nil 'warn))) (and bg (set-face-background 'pointer bg))) (setq x-pointers-initialized t)) diff --git a/lisp/x-scrollbar.el b/lisp/x-scrollbar.el index 1038320..0479572 100644 --- a/lisp/x-scrollbar.el +++ b/lisp/x-scrollbar.el @@ -80,7 +80,7 @@ ;; Now do ScrollBarPlacement.scrollBarPlacement (let ((case-fold-search t) (resval (x-get-resource "ScrollBarPlacement" "scrollBarPlacement" - 'string locale))) + 'string locale nil 'warn))) (cond ((null resval)) ((string-match "^top[_-]left$" resval) diff --git a/lisp/x-select.el b/lisp/x-select.el index 62ae9a8..3b3a598 100644 --- a/lisp/x-select.el +++ b/lisp/x-select.el @@ -88,36 +88,6 @@ be the text between those markers)." ;(setq x-sent-selection-hooks 'x-notice-selection-failures) -;;; Selections in killed buffers -;;; this function is called by kill-buffer as if it were on the -;;; kill-buffer-hook (though it isn't really). - -(defun xselect-kill-buffer-hook () - ;; Probably the right thing is to write a C function to return a list - ;; of the selections which emacs owns, since it could conceivably own - ;; a user-defined selection type that we've never heard of. - (xselect-kill-buffer-hook-1 'PRIMARY) - (xselect-kill-buffer-hook-1 'SECONDARY) - (xselect-kill-buffer-hook-1 'CLIPBOARD)) - -(defun xselect-kill-buffer-hook-1 (selection) - (let (value) - (if (and (selection-owner-p selection) - (setq value (get-selection-internal selection '_EMACS_INTERNAL)) - ;; The _EMACS_INTERNAL selection type has a converter registered - ;; for it that does no translation. This only works if emacs is - ;; requesting the selection from itself. We could have done this - ;; by writing a C function to return the raw selection data, and - ;; that might be the right way to do this, but this was easy. - (or (and (consp value) - (markerp (car value)) - (eq (current-buffer) (marker-buffer (car value)))) - (and (extent-live-p value) - (eq (current-buffer) (extent-object value))) - (and (extentp value) (not (extent-live-p value))))) - (disown-selection-internal selection)))) - - ;;; Cut Buffer support ;;; FSF name x-get-cut-buffer diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index f2ac1bd..8731e47 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,27 @@ +2000-07-19 Martin Buchholz + + * XEmacs 21.2.35 is released. + +2000-07-09 Martin Buchholz + + * xlwcheckbox.c: + * xlwgauge.h: + * xlwgaugeP.h: + * xlwradio.h: + * xlwradioP.h: + * xlwgauge.c: + * config.h.in: + * xlwradio.c: + * lwlib-Xaw.c: + Replace SMART_INCLUDE with a dumber, but more reliable method. + + * xlwmenu.c (parameterize_string): Fix C++ compilation warnings. + +2000-06-10 Ben Wing + + * lwlib-Xaw.c (xaw_create_label): add sanity check on arg limit. + (xaw_update_one_value): fix crash due to incorrect arg count. + 2000-05-28 Martin Buchholz * XEmacs 21.2.34 is released. diff --git a/lwlib/config.h.in b/lwlib/config.h.in index 7537c20..0a7be10 100644 --- a/lwlib/config.h.in +++ b/lwlib/config.h.in @@ -29,12 +29,18 @@ Boston, MA 02111-1307, USA. */ #undef NEED_ATHENA #undef NEED_LUCID -/* The path to the Athena widgets - the usual value is `X11/Xaw' */ -#undef ATHENA_H_PATH -#ifdef ATHENA_H_PATH -# define ATHENA_INCLUDE(file) SMART_INCLUDE (ATHENA_H_PATH,file) -#else -# define ATHENA_INCLUDE(file) -#endif +/* The exact path to the Athena header files depends on which `flavor' + of Athena is being used - hence configure defines them for us. */ + +#undef ATHENA_Scrollbar_h_ +#undef ATHENA_Dialog_h_ +#undef ATHENA_Form_h_ +#undef ATHENA_Command_h_ +#undef ATHENA_Label_h_ +#undef ATHENA_LabelP_h_ +#undef ATHENA_Toggle_h_ +#undef ATHENA_ToggleP_h_ +#undef ATHENA_AsciiText_h_ +#undef ATHENA_XawInit_h_ #endif /* _LWLIB_CONFIG_H_ */ diff --git a/lwlib/lwlib-Xaw.c b/lwlib/lwlib-Xaw.c index 4cf14de..ff8771a 100644 --- a/lwlib/lwlib-Xaw.c +++ b/lwlib/lwlib-Xaw.c @@ -33,21 +33,21 @@ Boston, MA 02111-1307, USA. */ #include #ifdef LWLIB_SCROLLBARS_ATHENA -#include ATHENA_INCLUDE(Scrollbar.h) +#include ATHENA_Scrollbar_h_ #endif #ifdef LWLIB_DIALOGS_ATHENA -#include ATHENA_INCLUDE(Dialog.h) -#include ATHENA_INCLUDE(Form.h) -#include ATHENA_INCLUDE(Command.h) -#include ATHENA_INCLUDE(Label.h) +#include ATHENA_Dialog_h_ +#include ATHENA_Form_h_ +#include ATHENA_Command_h_ +#include ATHENA_Label_h_ #endif #ifdef LWLIB_WIDGETS_ATHENA -#include ATHENA_INCLUDE(Toggle.h) +#include ATHENA_Toggle_h_ #include "xlwradio.h" #include "xlwcheckbox.h" #include "xlwgauge.h" #ifndef NEED_MOTIF -#include ATHENA_INCLUDE(AsciiText.h) +#include ATHENA_AsciiText_h_ #endif #endif #include @@ -230,7 +230,7 @@ xaw_update_one_value (widget_instance *instance, Widget widget, Arg al [2]; String buf = 0; XtSetArg (al [0], XtNstring, &buf); - XtGetValues (widget, al, 2); + XtGetValues (widget, al, 1); if (val->value) { @@ -791,6 +791,8 @@ xaw_create_label (Widget parent, widget_value* val) /* Do it again for arguments that have no effect until the widget is realized. */ ac = 0; lw_add_value_args_to_args (val, al, &ac); + if (ac > 20) + abort (); /* #### need assert macro in lwlib */ XtSetValues (label, al, ac); return label; diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c index 062a452..bf9bd3a 100644 --- a/lwlib/lwlib.c +++ b/lwlib/lwlib.c @@ -508,7 +508,7 @@ safe_strcmp (const char *s1, const char *s2) return (s1 && s2) ? strcmp (s1, s2) : s1 ? False : !!s2; } -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE static change_type max (change_type i1, change_type i2) { diff --git a/lwlib/xlwcheckbox.c b/lwlib/xlwcheckbox.c index 50f8bb6..7f0585e 100644 --- a/lwlib/xlwcheckbox.c +++ b/lwlib/xlwcheckbox.c @@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA. */ #include #include -#include ATHENA_INCLUDE(XawInit.h) +#include ATHENA_XawInit_h_ #include "../src/xmu.h" #include "xlwcheckboxP.h" diff --git a/lwlib/xlwgauge.c b/lwlib/xlwgauge.c index 3d81e8f..ffd93ab 100644 --- a/lwlib/xlwgauge.c +++ b/lwlib/xlwgauge.c @@ -52,7 +52,7 @@ Boston, MA 02111-1307, USA. */ #include #include #include -#include ATHENA_INCLUDE(XawInit.h) +#include ATHENA_XawInit_h_ #include "xlwgaugeP.h" #include "../src/xmu.h" #ifdef HAVE_XMU diff --git a/lwlib/xlwgauge.h b/lwlib/xlwgauge.h index ad9d12c..876cd24 100644 --- a/lwlib/xlwgauge.h +++ b/lwlib/xlwgauge.h @@ -42,7 +42,7 @@ Boston, MA 02111-1307, USA. */ * ***********************************************************************/ -#include ATHENA_INCLUDE(Label.h) +#include ATHENA_Label_h_ /* Resources: diff --git a/lwlib/xlwgaugeP.h b/lwlib/xlwgaugeP.h index 36de7f7..bc6b19c 100644 --- a/lwlib/xlwgaugeP.h +++ b/lwlib/xlwgaugeP.h @@ -40,7 +40,7 @@ Boston, MA 02111-1307, USA. */ ***********************************************************************/ #include "xlwgauge.h" -#include ATHENA_INCLUDE(LabelP.h) +#include ATHENA_LabelP_h_ /* New fields for the Gauge widget class record */ diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 23d5a45..b903917 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -516,23 +516,21 @@ nameResource[] = 0, XtRImmediate, 0 } }; -/* - * This function looks through string searching for parameter - * inserts of the form: - * %[padding]1 - * padding is space (' ') or dash ('-') characters meaning - * padding to the left or right of the inserted parameter. - * In essence all %1 strings are replaced by value in the return - * value (which the caller is expected to free). - * %% means insert one % (like printf). - * %1 means insert value. - * %-1 means insert value followed by one space. The latter is - * not inserted if value is a zero length string. - */ +/* This function searches STRING for parameter inserts of the form: + %[padding]1 + padding is either space (' ') or dash ('-') meaning + padding to the left or right of the inserted parameter. + In essence, all %1 strings are replaced by VALUE in the return value. + The caller is expected to free the return value using XtFree(). + %% means insert one % (like printf). + %1 means insert VALUE. + %-1 means insert VALUE followed by one space. The latter is + not inserted if VALUE is a zero length string. +*/ static char* parameterize_string (const char *string, const char *value) { - char *percent; + const char *percent; char *result; unsigned int done = 0; unsigned int ntimes; @@ -541,24 +539,25 @@ parameterize_string (const char *string, const char *value) { result = XtMalloc(1); result[0] = '\0'; - return (result); + return result; } if (!value) value = ""; - for (ntimes = 1, result = (char *) string; (percent = strchr(result, '%')); + for (ntimes = 1, percent = string; + (percent = strchr (percent, '%')); ntimes++) - result = &percent[1]; + percent++; result = XtMalloc ((ntimes * strlen(value)) + strlen(string) + 4); result[0] = '\0'; - while ((percent = strchr(string, '%'))) + while ((percent = strchr (string, '%'))) { unsigned int left_pad; unsigned int right_pad; - char *p; + const char *p; if (percent[1] == '%') { /* it's a real % */ diff --git a/lwlib/xlwradio.c b/lwlib/xlwradio.c index 1eabcee..32561c1 100644 --- a/lwlib/xlwradio.c +++ b/lwlib/xlwradio.c @@ -53,7 +53,7 @@ Boston, MA 02111-1307, USA. */ #include #include -#include ATHENA_INCLUDE(XawInit.h) +#include ATHENA_XawInit_h_ #include "../src/xmu.h" #include "xlwradioP.h" diff --git a/lwlib/xlwradio.h b/lwlib/xlwradio.h index d0b8f62..0cffdad 100644 --- a/lwlib/xlwradio.h +++ b/lwlib/xlwradio.h @@ -42,7 +42,7 @@ Boston, MA 02111-1307, USA. */ * ***********************************************************************/ -#include ATHENA_INCLUDE(Toggle.h) +#include ATHENA_Toggle_h_ /* Resources: diff --git a/lwlib/xlwradioP.h b/lwlib/xlwradioP.h index 78ea2cd..e239816 100644 --- a/lwlib/xlwradioP.h +++ b/lwlib/xlwradioP.h @@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */ #define _XawRadioP_h #include "xlwradio.h" -#include ATHENA_INCLUDE(ToggleP.h) +#include ATHENA_ToggleP_h_ /*********************************************************************** * diff --git a/man/ChangeLog b/man/ChangeLog index 94fd8f1..8e69333 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,63 @@ +2000-07-19 Martin Buchholz + + * XEmacs 21.2.35 is released. + +2000-07-10 Martin Buchholz + + * Makefile: rm -f ==> $(RM) + +2000-07-09 Martin Buchholz + + * lispref/postgresql.texi: + - Don't mention ".so" extension. + - Make installation instructions more generic. + - Mention M-x describe-installation. + +2000-07-08 Ben Wing + + * xemacs-faq.texi (Q6.4.1): Update the perennial nonstart under + Windows problem with binary locs and latest info. + +2000-06-17 Adrian Aichner + + * lispref/glyphs.texi: Fix trivial typos. + * lispref/gutter.texi: Ditto. + * lispref/loading.texi: Ditto. + * lispref/postgresql.texi: Ditto. + +2000-06-14 Adrian Aichner + + * internals/internals.texi (Markers and Extents): Fix trivial typo. + +2000-06-11 Adrian Aichner + + * make-stds.texi: Fix trivial typos. + * xemacs-faq.texi: Ditto. + * internals/internals.texi: Ditto. + * new-users-guide/edit.texi: Ditto. + * new-users-guide/modes.texi: Ditto. + * new-users-guide/region.texi: Ditto. + +2000-06-10 Ben Wing + + * xemacs-faq.texi (Q6.1.2): + * xemacs-faq.texi (Q6.1.5): + * xemacs-faq.texi (Q6.1.6): + Corrections for Cygwin, MinGW. + +2000-06-07 Adrian Aichner + + * xemacs/basic.texi: Fix trivial typos. + * xemacs/buffers.texi: Fix trivial typos. + * xemacs/building.texi: Ditto. + * xemacs/glossary.texi: Ditto. + * xemacs/gnu.texi: Ditto. + * xemacs/help.texi: Ditto. + * xemacs/keystrokes.texi: Ditto. + * xemacs/programs.texi: Ditto. + * xemacs/search.texi: Ditto. + * xemacs/sending.texi: Ditto. + 2000-05-28 Martin Buchholz * XEmacs 21.2.34 is released. diff --git a/man/Makefile b/man/Makefile index a270d5a..a6af705 100644 --- a/man/Makefile +++ b/man/Makefile @@ -22,6 +22,7 @@ SHELL = /bin/sh MAKEINFO = makeinfo TEXI2DVI = texi2dvi +RM = rm -f .SUFFIXES: .SUFFIXES: .info .texi .dvi @@ -290,11 +291,11 @@ dvi : $(dvi_files) .PHONY: mostlyclean clean distclean realclean extraclean mostlyclean: - rm -f *.toc *.aux *.log *.op *.cp *.cps *.fn *.fns - rm -f *.ky *.kys *.pg *.pgs *.tp *.tps *.vr *.vrs + $(RM) *.toc *.aux *.log *.op *.cp *.cps *.fn *.fns + $(RM) *.ky *.kys *.pg *.pgs *.tp *.tps *.vr *.vrs clean: mostlyclean - rm -f core *.dvi + $(RM) core *.dvi distclean: clean realclean: distclean extraclean: distclean - rm -f *~ \#* */*~ */\#* + $(RM) *~ \#* */*~ */\#* diff --git a/man/internals/internals.texi b/man/internals/internals.texi index e46d7f2..499bc58 100644 --- a/man/internals/internals.texi +++ b/man/internals/internals.texi @@ -7123,7 +7123,7 @@ elsewhere. buffer positions in them as integers, and every time text is inserted or deleted, these positions must be updated. In order to minimize the amount of shuffling that needs to be done, the positions in markers and -extents (there's one per marker, two per extent) and stored in Meminds. +extents (there's one per marker, two per extent) are stored in Meminds. This means that they only need to be moved when the text is physically moved in memory; since the gap structure tries to minimize this, it also minimizes the number of marker and extent indices that need to be @@ -7611,7 +7611,7 @@ this is the code executed to handle any stuff that needs to be done other encoded/decoded data has been written out. This is not used for charset CCL programs. -REGISTER: 0..7 -- refered by RRR or rrr +REGISTER: 0..7 -- referred by RRR or rrr OPERATOR BIT FIELD (27-bit): XXXXXXXXXXXXXXX RRR TTTTT TTTTT (5-bit): operator type diff --git a/man/lispref/glyphs.texi b/man/lispref/glyphs.texi index 8373674..bf0c043 100644 --- a/man/lispref/glyphs.texi +++ b/man/lispref/glyphs.texi @@ -187,7 +187,7 @@ text, @code{modeline-pointer-glyph} for the pointer used over the modeline, etc. Do an apropos over @code{*-pointer-glyph} to find all of them. (Note also that you can temporarily set the mouse pointer to some specific shape by using @code{set-frame-pointer}, which takes an image -instace, as obtained from calling @code{glyph-image-instance} on a glyph +instance, as obtained from calling @code{glyph-image-instance} on a glyph of type @code{pointer} -- either one of the above-mentioned variables or one you created yourself. (See below for what it means to create a glyph of type @code{pointer}.) This pointer will last only until the diff --git a/man/lispref/gutter.texi b/man/lispref/gutter.texi index 34c8d47..db5882d 100644 --- a/man/lispref/gutter.texi +++ b/man/lispref/gutter.texi @@ -96,7 +96,7 @@ gutter-size specifiers. Valid gutter-size instantiators are either integers or the special symbol @code{autodetect}. If a gutter-size is set to @code{autodetect} -them the size of the gutter will be adjusted to just accomodate the +them the size of the gutter will be adjusted to just accommodate the gutters contents. @code{autodetect} only works for top and bottom gutters. @end defun @@ -117,7 +117,7 @@ always gutter-visible specifiers. Valid gutter-visible instantiators are t, nil or a list of symbols. If a gutter-visible instantiator is set to a list of symbols, and the -correspondong gutter specification is a property-list strings, then +corresponding gutter specification is a property-list strings, then elements of the gutter specification will only be visible if the corresponding symbol occurs in the gutter-visible instantiator. @end defun diff --git a/man/lispref/loading.texi b/man/lispref/loading.texi index c8fc6b4..18bc574 100644 --- a/man/lispref/loading.texi +++ b/man/lispref/loading.texi @@ -199,7 +199,7 @@ and returns the file found (if any). (In fact, @code{load} uses this function to search through @code{load-path}.) It searches for @var{filename} through @var{path-list}, expanded by one of the optional @var{suffixes} (string of suffixes separated by @samp{:}s), checking for -access @var{mode} (0|1|2|4 = exists|executable|writeable|readable), +access @var{mode} (0|1|2|4 = exists|executable|writable|readable), default readable. @code{locate-file} keeps hash tables of the directories it searches diff --git a/man/lispref/mule.texi b/man/lispref/mule.texi index 65e518e..d46ab25 100644 --- a/man/lispref/mule.texi +++ b/man/lispref/mule.texi @@ -791,7 +791,7 @@ of the registers G0-G3 by use of an @dfn{escape sequence} of the form: where @var{I} is an intermediate character or characters in the range 0x20 - 0x3F, and @var{F}, from the range 0x30-0x7Fm is the final character identifying this charset. (Final characters in the range -0x30-0x3F are reserved for private use and will never have a publically +0x30-0x3F are reserved for private use and will never have a publicly registered meaning.) Then that register is @dfn{invoked} to either GL or GR, either diff --git a/man/lispref/postgresql.texi b/man/lispref/postgresql.texi index 982cc95..f565f44 100644 --- a/man/lispref/postgresql.texi +++ b/man/lispref/postgresql.texi @@ -23,19 +23,22 @@ relational database access from Emacs Lisp code. @comment node-name, next, previous, up @section Building XEmacs with PostgreSQL support -XEmacs PostgreSQL support requires linking to the PostgreSQL libpq.so +XEmacs PostgreSQL support requires linking to the PostgreSQL libpq library. Describing how to build and install PostgreSQL is beyond the -scope of this document, see the PostgreSQL manual for details. +scope of this document. See the PostgreSQL manual for details. If you have installed XEmacs from one of the binary kits on (@url{ftp://ftp.xemacs.org/}), or are using an XEmacs binary from a CD -ROM, you should have XEmacs PostgreSQL support by default. If you are -building XEmacs from source on a Linux system with PostgreSQL installed -into the default location, it should be autodetected when you run -configure. If you have installed PostgreSQL into its non-Linux default -location, @file{/usr/local/pgsql}, you must specify +ROM, you may have XEmacs PostgreSQL support by default. @code{M-x +describe-installation} will tell you if you do. + +If you are building XEmacs from source, you need to install PostgreSQL +first. On some systems, PostgreSQL will come pre-installed in /usr. In +this case, it should be autodetected when you run configure. If +PostgreSQL is installed into its default location, +@file{/usr/local/pgsql}, you must specify @code{--site-prefixes=/usr/local/pgsql} when you run configure. If -you installed PostgreSQL into another location, use that instead of +PostgreSQL is installed into another location, use that instead of @file{/usr/local/pgsql} when specifying @code{--site-prefixes}. As of XEmacs 21.2, PostgreSQL versions 6.5.3 and 7.0 are supported. @@ -46,9 +49,9 @@ V6.5. In particular, asynchronous queries are supported. @comment node-name, next, previous, up @section XEmacs PostgreSQL libpq API -XEmacs PostgreSQL API is intended to be a policy-free, low-level binding -to libpq. The intent is to provide all the basic functionality and then -let high level Lisp code decide its own policies. +The XEmacs PostgreSQL API is intended to be a policy-free, low-level +binding to libpq. The intent is to provide all the basic functionality +and then let high level Lisp code decide its own policies. This documentation assumes that the reader has knowledge of SQL, but requires no prior knowledge of libpq. @@ -806,7 +809,7 @@ Compatibility note: this function is only available with libpq-7.0. @end defun @defun PQsetenvPoll conn -Check an asynchronous enviroment variables transfer for completion. +Check an asynchronous environment variables transfer for completion. @var{conn} A database connection object. Compatibility note: this function is only available with libpq-7.0. diff --git a/man/make-stds.texi b/man/make-stds.texi index c7c71ad..746dca5 100644 --- a/man/make-stds.texi +++ b/man/make-stds.texi @@ -507,7 +507,7 @@ And finally, you should set the following variable: @item srcdir The directory for the sources being compiled. The value of this variable is normally inserted by the @code{configure} shell script. -(If you are using Autconf, use @samp{srcdir = @@srcdir@@}.) +(If you are using Autoconf, use @samp{srcdir = @@srcdir@@}.) @end table For example: diff --git a/man/new-users-guide/edit.texi b/man/new-users-guide/edit.texi index 536d32f..022a5df 100644 --- a/man/new-users-guide/edit.texi +++ b/man/new-users-guide/edit.texi @@ -137,7 +137,7 @@ Move the cursor to the end of the line (@code{end-of-line}). Move the cursor forward one word (@code{forward-word}). @item M-b @findex backward-word -Move the cursor backword one word (@code{backward-word}). +Move the cursor backward one word (@code{backward-word}). @item M-< Move the cursor to the top of the buffer (@code{beginning-of-buffer}). @item M-> diff --git a/man/new-users-guide/modes.texi b/man/new-users-guide/modes.texi index 0984134..3009e75 100644 --- a/man/new-users-guide/modes.texi +++ b/man/new-users-guide/modes.texi @@ -228,7 +228,7 @@ case of a system crash. @item line-number-mode @cindex line-number-mode After you enable this mode, the line number at which your cursor is -present will be displayed continously in the mode line. +present will be displayed continuously in the mode line. @item blink-paren @cindex blink-paren diff --git a/man/new-users-guide/region.texi b/man/new-users-guide/region.texi index 841f699..5c27f6a 100644 --- a/man/new-users-guide/region.texi +++ b/man/new-users-guide/region.texi @@ -217,7 +217,7 @@ Copy region into specified buffer, deleting that buffer's old contents. This command will also prompt you for a buffer name. @item M-x insert-buffer Insert contents of specified buffer into current buffer at point. This -command will prompt you for a buffername which you want to be copied +command will prompt you for a buffer name which you want to be copied into the current buffer at the location of the cursor. @item M-x append-to-file This command will prompt you for a filename and append the region to diff --git a/man/xemacs-faq.texi b/man/xemacs-faq.texi index 5d57229..5c9cd6f 100644 --- a/man/xemacs-faq.texi +++ b/man/xemacs-faq.texi @@ -7,7 +7,7 @@ @finalout @titlepage @title XEmacs FAQ -@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2000/04/26 07:18:27 $ +@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2000/07/08 09:14:11 $ @sp 1 @author Tony Rossini @author Ben Wing @@ -1011,7 +1011,7 @@ enable it, add to your @file{Emacs} file entries like this: @example Emacs*XlwMenu.resourceLabels: True Emacs*XlwMenu.file.labelString: Fichier -Emacs*XlwMenu.openInOtherWindow.labelString: In anderem Fenster offnen +Emacs*XlwMenu.openInOtherWindow.labelString: In anderem Fenster oeffnen @end example The name of the resource is derived from the non-localized entry by @@ -6210,8 +6210,10 @@ Unix box, redirected to the server running on your PC). @node Q6.1.2, Q6.1.3, Q6.1.1, MS Windows @unnumberedsubsec Q6.1.2: What compiler do I need to compile XEmacs? -You need Visual C++ 4.2 or 5.0, with the exception of the Cygwin port, -which uses Gcc. +You need Visual C++ 4.2, 5.0, or 6.0, with the exception of the Cygwin +port, which uses Gcc. There is also a MINGW32 port of XEmacs (using +Gcc, but using native libraries rather than the Cygwin libraries). #### +More information about this should be provided. @node Q6.1.3, Q6.1.4, Q6.1.2, MS Windows @@ -6241,8 +6243,8 @@ make sure HOME is set. This controls where you @file{.emacs} file comes from; @item -CYGWIN32 needs to be set to tty for process support -work. e.g. CYGWIN32=tty; +CYGWIN needs to be set to tty for process support work. e.g. CYGWIN=tty; +(use CYGWIN32=tty under b19 and older.) @item picking up some other grep or other unix like tools can kill configure; @@ -6266,16 +6268,56 @@ You can find the Cygwin tools and compiler at: @uref{http://sourceware.cygnus.com/cygwin/} You will need version b19 or later. +The latest current version is 1.1.1. +Other common versions you will see are b20.1. -You will also need the X libraries. There are libraries at +Another location, one of the mirror sites of the site just mentioned, +is usually a last faster: + +@uref{ftp://ftp.freesoftware.com/pub/sourceware/cygwin/} + +You can obtain the latest version (currently 1.1.1) from the +@samp{latest/} subdirectory of either of the above two just-mentioned +URL's. + +@strong{WARNING: The version of GCC supplied under @samp{latest/}, as of +June 6th, 2000, does not appear to work. It generates loads of spurious +preprocessor warnings and errors, which makes it impossible to compile +XEmacs with it.} + +You will also need the X libraries. You can get them on the XEmacs FTP +site at + +@uref{ftp://ftp.xemacs.org/pub/xemacs/aux/cygwin/} + +You will find b19 and b20 versions of the X libraries, plus b19 and b20 +versions of stuff that should go into @samp{/usr/local/}, donated by +Andy Piper. This includes pre-built versions of various graphics libraries, +such as PNG, JPEG, TIFF, and XPM. (Remember, GIF support is built-in to +XEmacs.) + +(X libraries for v1 and beyond of Cygwin can be found on the Cygwin site +itself -- look in the @samp{xfree/} subdirectory.) + +@emph{NOTE:} There are two versions of the XPM library provided in +Andy's packets. Once is for building with X support, and the other for +building without. The X version should work if you're building with +both X and Windows support. The two files are called @file{libXpm-X.a} +and @file{libXpm-noX.a} respectively, and you must symlink the +appropriate one to @file{libXpm.a}. @strong{CAREFUL:} By default, the +non-X version is symlinked in. If you then configure XEmacs with X, +you won't run into problems until you start compiling @file{events.c}, +at which point you'll get strange and decidedly non-obvious errors. + +Please see @uref{http://www.xemacs.freeserve.co.uk/} (Andy Piper's home +page) for more information. + +BTW There are also libraries at @iftex @* @end iftex @uref{http://dao.gsfc.nasa.gov/software/grads/win32/X11R6.3/}, but -these are not b19 compatible. You can get b19 X11R6.3 binaries, as -well as pre-built ncurses and graphic libraries, from: - -@uref{ftp://ftp.parallax.co.uk/pub/andyp/}. +these are not b19 compatible, and may in fact be native-compiled. @node Q6.2.1, Q6.2.2, Q6.1.6, MS Windows @@ -6456,12 +6498,19 @@ memory addresses that can conflict with those needed by the dumped XEmacs executable. In this instance XEmacs will fail to start without any explanation. Note that this is extremely machine specific. -Work is being done on fixes for 21.1.* that will make more intelligent -guesses about which memory addresses will be free and so this should -cure the problem for most people. +21.1.10 includes a fix for this that makes more intelligent guesses +about which memory addresses will be free, and this should cure the +problem for most people. Unfortunately, no binary is yet available for +this version. Check back periodically at + +@uref{ftp://ftp.xemacs.org/pub/xemacs/binaries/}. 21.2 implements "portable dumping" which will eliminate the problem -altogether. +altogether. You might have better luck with the 21.2 beta binary, +available at + +@uref{ftp://ftp.xemacs.org/pub/xemacs/beta/binaries/}. + @node Current Events, , MS Windows, Top @unnumbered 7 What the Future Holds diff --git a/man/xemacs/abbrevs.texi b/man/xemacs/abbrevs.texi index 9f83d33..f7fd2ac 100644 --- a/man/xemacs/abbrevs.texi +++ b/man/xemacs/abbrevs.texi @@ -257,9 +257,10 @@ specified file. The text stored in the file looks like the output of minibuffer and reads the specified file, defining abbrevs according to its contents. @kbd{M-x quietly-read-abbrev-file} is the same but does not display a message in the echo area; it is actually useful primarily -in the @file{.emacs} file. If you give an empty argument to either of -these functions, the file name Emacs uses is the value of the variable -@code{abbrev-file-name}, which is by default @code{"~/.abbrev_defs"}. +in the init file. @xref{Init File}. If you give an empty argument to +either of these functions, the file name Emacs uses is the value of the +variable @code{abbrev-file-name}, which is by default +@code{"~/.abbrev_defs"}. @vindex save-abbrevs Emacs offers to save abbrevs automatically if you have changed any of diff --git a/man/xemacs/basic.texi b/man/xemacs/basic.texi index 2c6f1c6..542d289 100644 --- a/man/xemacs/basic.texi +++ b/man/xemacs/basic.texi @@ -14,7 +14,7 @@ use the tutorial, run Emacs and type @kbd{Control-h t} the @b{Help} menu. XEmacs comes with many translations of tutorial. If your XEmacs is with -MULE and you set up language environment correctly, XEmacs choses right +MULE and you set up language environment correctly, XEmacs chooses right tutorial when available (@pxref{Language Environments}). If you want specific translation, give @kbd{C-h t} a prefix argument, like @kbd{C-u C-h t}. diff --git a/man/xemacs/buffers.texi b/man/xemacs/buffers.texi index d0dd704..a58710b 100644 --- a/man/xemacs/buffers.texi +++ b/man/xemacs/buffers.texi @@ -248,7 +248,7 @@ Synonym for @kbd{d}. @item C-d Like @kbd{d} but move up afterwards instead of down. @item s -Request to save the buffer. An @samp{S} befor the buffer name on a line +Request to save the buffer. An @samp{S} before the buffer name on a line indicates the request. Requested saves actually take place when you use the @kbd{x} command. You can request both saving and deletion for the same buffer. diff --git a/man/xemacs/building.texi b/man/xemacs/building.texi index 1197097..e7d3589 100644 --- a/man/xemacs/building.texi +++ b/man/xemacs/building.texi @@ -480,7 +480,7 @@ examine the buffer that was being edited at the time of the error, and you can switch buffers, visit files, and perform any other editing operations. However, the debugger is a recursive editing level (@pxref{Recursive Edit}); it is a good idea to return to the backtrace -buffer and explictly exit the debugger when you don't want to use it any +buffer and explicitly exit the debugger when you don't want to use it any more. Exiting the debugger kills the backtrace buffer. @cindex current stack frame diff --git a/man/xemacs/calendar.texi b/man/xemacs/calendar.texi index d935a1d..dce562a 100644 --- a/man/xemacs/calendar.texi +++ b/man/xemacs/calendar.texi @@ -571,10 +571,10 @@ your time zone. Emacs displays the times of sunrise and sunset for how daylight savings time is determined. As a user, you might find it convenient to set the calendar location -variables for your usual physical location in your @file{.emacs} file. -And when you install Emacs on a machine, you can create a -@file{default.el} file which sets them properly for the typical location -of most users of that machine. @xref{Init File}. +variables for your usual physical location in your init file. And when +you install Emacs on a machine, you can create a @file{default.el} file +which sets them properly for the typical location of most users of that +machine. @xref{Init File}. @node Lunar Phases, Other Calendars, Sunrise/Sunset, Calendar/Diary @subsection Phases of the Moon @@ -1051,10 +1051,10 @@ date, independently of the calendar display, and optionally for the next few days as well; the variable @code{number-of-diary-entries} specifies how many days to include (@pxref{Customization}). - If you put @code{(diary)} in your @file{.emacs} file, this + If you put @code{(diary)} in your init file, this automatically displays a window with the day's diary entries, when you -enter Emacs. The mode line of the displayed window shows the date and -any holidays that fall on that date. +enter Emacs. @xref{Init File}. The mode line of the displayed window +shows the date and any holidays that fall on that date. @findex diary-mail-entries @vindex diary-mail-days @@ -1403,7 +1403,7 @@ diary suit your personal tastes. @code{t}, calling up the calendar automatically displays the diary entries for the current date as well. The diary dates appear only if the current date is visible. If you add both of the following lines to -your @file{.emacs} file:@refill +your init file:@refill @example (setq view-diary-entries-initially t) @@ -1411,7 +1411,8 @@ your @file{.emacs} file:@refill @end example @noindent -this displays both the calendar and diary windows whenever you start Emacs. +this displays both the calendar and diary windows whenever you start +Emacs. @xref{Init File}. @vindex view-calendar-holidays-initially Similarly, if you set the variable @@ -1585,12 +1586,14 @@ arguments @var{args}. For example, suppose you want to add Bastille Day, celebrated in France on July 14. You can do this by adding the following line -to your @file{.emacs} file: +to your init file: @smallexample (setq other-holidays '((holiday-fixed 7 14 "Bastille Day"))) @end smallexample +@xref{Init File}. + @noindent The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the fourteenth day of the seventh month (July). @@ -2061,13 +2064,15 @@ shown in the fancy diary buffer, set the variable @cindex sorting diary entries If you use the fancy diary display, you can use the normal hook @code{list-diary-entries-hook} to sort each day's diary entries by their -time of day. Add this line to your @file{.emacs} file: +time of day. Add this line to your init file: @findex sort-diary-entries @example (add-hook 'list-diary-entries-hook 'sort-diary-entries t) @end example +@xref{Init File}. + @noindent For each day, this sorts diary entries that begin with a recognizable time of day according to their times. Diary entries without times come diff --git a/man/xemacs/cmdargs.texi b/man/xemacs/cmdargs.texi index fe78398..3863203 100644 --- a/man/xemacs/cmdargs.texi +++ b/man/xemacs/cmdargs.texi @@ -139,7 +139,7 @@ XEmacs as a server (e.g. for gnuserv screens or external client widgets). @item -no-init-file @itemx -q -Do not load your Emacs init file @file{~/.emacs}. +Do not load your Emacs init file. @xref{Init File}. @item -no-site-file Do not load the site-specific init file @file{lisp/site-start.el}. @@ -156,7 +156,8 @@ concerning the package system, @xref{Startup Paths}.) This is equivalent to @samp{-q -no-site-file -no-early-packages}. @item -user-init-file @var{file} -Load @var{file} as your Emacs init file instead of @file{~/.emacs}. +Load @var{file} as your Emacs init file instead of +@file{~/.xemacs/init.el}/@file{~/.emacs}. @item -user-init-directory @var{directory} Use @var{directory} as the location of your early package hierarchies @@ -164,9 +165,10 @@ and the various user-specific initialization files. @item -user @var{user} @itemx -u @var{user} -Equivalent to -@samp{-user-init-file ~@var{user}/.emacs -user-init-directory ~@var{user}/.xemacs}. - +Equivalent to @samp{-user-init-file ~@var{user}/.xemacs/init.el +-user-init-directory ~@var{user}/.xemacs}, or @samp{-user-init-file +~@var{user}/.emacs -user-init-directory ~@var{user}/.xemacs}. whichever +init file comes first. @xref{Init File}. @end table diff --git a/man/xemacs/custom.texi b/man/xemacs/custom.texi index bd54971..71d0aa5 100644 --- a/man/xemacs/custom.texi +++ b/man/xemacs/custom.texi @@ -7,12 +7,12 @@ behavior of Emacs in minor ways. All kinds of customization affect only the particular Emacs job that you -do them in. They are completely lost when you kill the Emacs job, and have -no effect on other Emacs jobs you may run at the same time or later. The -only way an Emacs job can affect anything outside of it is by writing a -file; in particular, the only way to make a customization `permanent' is to -put something in your @file{.emacs} file or other appropriate file to do the -customization in each session. @xref{Init File}. +do them in. They are completely lost when you kill the Emacs job, and +have no effect on other Emacs jobs you may run at the same time or +later. The only way an Emacs job can affect anything outside of it is +by writing a file; in particular, the only way to make a customization +`permanent' is to put something in your init file or other appropriate +file to do the customization in each session. @xref{Init File}. @menu * Minor Modes:: Each minor mode is one feature you can turn on @@ -26,8 +26,7 @@ customization in each session. @xref{Init File}. By changing them, you can "redefine keys". * Syntax:: The syntax table controls how words and expressions are parsed. -* Init File:: How to write common customizations in the @file{.emacs} - file. +* Init File:: How to write common customizations in the init file. * Audible Bell:: Changing how Emacs sounds the bell. * Faces:: Changing the fonts and colors of a region of text. * Frame Components:: Controlling the presence and positions of the @@ -387,10 +386,10 @@ C-j}, @cindex saving option value Setting the option changes its value in the current Emacs session; @dfn{saving} the value changes it for future sessions as well. This -works by writing code into your @file{~/.emacs} file so as to set the -option variable again each time you start Emacs. To save the option, -invoke @samp{[State]} and select the @samp{Save for Future Sessions} -operation. +works by writing code into your init file so as to set the option +variable again each time you start Emacs. @xref{Init File}. To save +the option, invoke @samp{[State]} and select the @samp{Save for Future +Sessions} operation. You can also restore the option to its standard value by invoking @samp{[State]} and selecting the @samp{Reset} operation. There are @@ -750,7 +749,7 @@ long file that contains no page markers and has no local variables list. list. That is inappropriate. Whether you use Auto Fill mode or not is a matter of personal taste, not a matter of the contents of particular files. If you want to use Auto Fill, set up major mode hooks with your -@file{.emacs} file to turn it on (when appropriate) for you alone +file file to turn it on (when appropriate) for you alone (@pxref{Init File}). Don't try to use a local variable list that would impose your taste on everyone working with the file. @@ -912,7 +911,7 @@ macro with the same definition it has now. You need not understand Lisp code to do this, because @code{insert-kbd-macro} writes the Lisp code for you. Then save the file. You can load the file with @code{load-file} (@pxref{Lisp Libraries}). If the file you save in is your initialization file -@file{~/.emacs} (@pxref{Init File}), then the macro will be defined each +(@pxref{Init File}), then the macro will be defined each time you run Emacs. If you give @code{insert-kbd-macro} a prefix argument, it creates @@ -1155,7 +1154,7 @@ redefines @kbd{C-x 4 $} to run the (fictitious) command @findex define-key @findex substitute-key-definition The most general way to modify a keymap is the function -@code{define-key}, used in Lisp code (such as your @file{.emacs} file). +@code{define-key}, used in Lisp code (such as your init file). @code{define-key} takes three arguments: the keymap, the key to modify in it, and the new definition. @xref{Init File}, for an example. @code{substitute-key-definition} is used similarly; it takes three @@ -1327,13 +1326,15 @@ beginning users from executing it by accident and being confused. The direct mechanism for disabling a command is to have a non-@code{nil} @code{disabled} property on the Lisp symbol for the command. These -properties are normally set by the user's @file{.emacs} file with +properties are normally set by the user's init file with Lisp expressions such as: @example (put 'delete-region 'disabled t) @end example +@xref{Init File}. + If the value of the @code{disabled} property is a string, that string is included in the message printed when the command is used: @@ -1344,9 +1345,9 @@ is included in the message printed when the command is used: @findex disable-command @findex enable-command - You can disable a command either by editing the @file{.emacs} file + You can disable a command either by editing the init file directly or with the command @kbd{M-x disable-command}, which edits the -@file{.emacs} file for you. @xref{Init File}. +init file for you. @xref{Init File}. When you attempt to invoke a disabled command interactively in Emacs, a window is displayed containing the command's name, its @@ -1355,7 +1356,7 @@ Emacs asks for input saying whether to execute the command as requested, enable it and execute, or cancel it. If you decide to enable the command, you are asked whether to do this permanently or just for the current session. Enabling permanently works by automatically editing -your @file{.emacs} file. You can use @kbd{M-x enable-command} at any +your init file. You can use @kbd{M-x enable-command} at any time to enable any command permanently. Whether a command is disabled is independent of what key is used to @@ -1532,22 +1533,23 @@ character includes both the string you have to pass to and some English to explain that string if necessary. @node Init File -@section The Init File, .emacs +@section The Init File @cindex init file @cindex Emacs initialization file @cindex key rebinding, permanent @cindex rebinding keys, permanently - When you start Emacs, it normally loads the file @file{.emacs} in your -home directory. This file, if it exists, should contain Lisp code. It -is called your initialization file or @dfn{init file}. Use the command -line switch @samp{-q} to tell Emacs whether to load an -init file (@pxref{Entering Emacs}). Use the command line switch -@samp{-user-init-file} (@pxref{Command Switches}) to tell Emacs to load -a different file instead of @file{~/.emacs}. + When you start Emacs, it normally loads either @file{.xemacs/init.el} +or the file @file{.emacs} (whichever comes first) in your home directory. +This file, if it exists, should contain Lisp code. It is called your +initialization file or @dfn{init file}. Use the command line switch +@samp{-q} to tell Emacs whether to load an init file (@pxref{Entering +Emacs}). Use the command line switch @samp{-user-init-file} +(@pxref{Command Switches}) to tell Emacs to load a different file +instead of @file{~/.xemacs/init.el}/@file{~/.emacs}. -When the @file{.emacs} file is read, the variable @code{user-init-file} -says which init file was loaded. +When the init file is read, the variable @code{user-init-file} says +which init file was loaded. At some sites there is a @dfn{default init file}, which is the library named @file{default.el}, found via the standard search path for @@ -1557,10 +1559,8 @@ loaded whenever you start Emacs. But your init file, if any, is loaded first; if it sets @code{inhibit-default-init} non-@code{nil}, then @file{default} is not loaded. - If you have a large amount of code in your @file{.emacs} file, you -should move it into another file named @file{@var{something}.el}, -byte-compile it (@pxref{Lisp Libraries}), and load that file from your -@file{.emacs} file using @code{load}. + If you have a large amount of code in your init file, you should +byte-compile it to @file{~/.xemacs/init.elc} or @file{~/.emacs.elc}. @menu * Init Syntax:: Syntax of constants in Emacs Lisp. @@ -1571,7 +1571,7 @@ byte-compile it (@pxref{Lisp Libraries}), and load that file from your @node Init Syntax @subsection Init File Syntax - The @file{.emacs} file contains one or more Lisp function call + The init file contains one or more Lisp function call expressions. Each consists of a function name followed by arguments, all surrounded by parentheses. For example, @code{(setq fill-column 60)} represents a call to the function @code{setq} which is @@ -1579,7 +1579,7 @@ used to set the variable @code{fill-column} (@pxref{Filling}) to 60. The second argument to @code{setq} is an expression for the new value of the variable. This can be a constant, a variable, or a function call -expression. In @file{.emacs}, constants are used most of the time. +expression. In the init file, constants are used most of the time. They can be: @table @asis @@ -1813,16 +1813,16 @@ the library @file{term/aaa}. The code in the library can use @vindex term-file-prefix The library's name is constructed by concatenating the value of the -variable @code{term-file-prefix} and the terminal type. Your @file{.emacs} +variable @code{term-file-prefix} and the terminal type. Your init file can prevent the loading of the terminal-specific library by setting -@code{term-file-prefix} to @code{nil}. +@code{term-file-prefix} to @code{nil}. @xref{Init File}. @vindex term-setup-hook The value of the variable @code{term-setup-hook}, if not @code{nil}, is called as a function of no arguments at the end of Emacs initialization, -after both your @file{.emacs} file and any terminal-specific library have -been read. You can set the value in the @file{.emacs} file to override -part of any of the terminal-specific libraries and to define +after both your init file and any terminal-specific library have been +read. @xref{Init File}. You can set the value in the init file to +override part of any of the terminal-specific libraries and to define initializations for terminals that do not have a library.@refill @node Audible Bell diff --git a/man/xemacs/glossary.texi b/man/xemacs/glossary.texi index dd2321f..cc748b6 100644 --- a/man/xemacs/glossary.texi +++ b/man/xemacs/glossary.texi @@ -568,7 +568,7 @@ allow quoting. @xref{Basic,Quoting,Basic Editing}. @item Read-only Buffer A read-only buffer is one whose text you are not allowed to change. Normally Emacs makes buffers read-only when they contain text which -has a special significance to Emacs, such asDired buffers. +has a special significance to Emacs, such as Dired buffers. Visiting a file that is write-protected also makes a read-only buffer. @xref{Buffers}. diff --git a/man/xemacs/gnu.texi b/man/xemacs/gnu.texi index 5762718..adccc81 100644 --- a/man/xemacs/gnu.texi +++ b/man/xemacs/gnu.texi @@ -191,7 +191,7 @@ person to fix your problem; you are not at the mercy of any individual. With Unix, the price of sources puts this out of consideration for most businesses. With GNU this will be easy. It is still possible for there to be no available competent person, but this problem cannot be blamed on -distibution arrangements. GNU does not eliminate all the world's problems, +distribution arrangements. GNU does not eliminate all the world's problems, only some of them. Meanwhile, the users who know nothing about computers need handholding: diff --git a/man/xemacs/help.texi b/man/xemacs/help.texi index 6fa5fd8..3d6f187 100644 --- a/man/xemacs/help.texi +++ b/man/xemacs/help.texi @@ -57,7 +57,7 @@ scroll conveniently with @key{SPC} and @key{DEL} or @key{BS}. @table @kbd @item C-h a @var{regexp} @key{RET} Display a list of functions and variables whose names match @var{regexp} -(@code{heper-apropos}). +(@code{hyper-apropos}). @item C-h A @var{regexp} Show all commands whose names contain matches for @var{regexp} (@code{command-apropos}). @@ -224,7 +224,7 @@ Show only symbols that are names of commands (@code{command-apropos}). @item M-x apropos @var{regexp} -Show all symbols whose names comtain matches for @var{regexp}. +Show all symbols whose names contain matches for @var{regexp}. @end table A more sophisticated sort of question to ask is, ``What are the diff --git a/man/xemacs/keystrokes.texi b/man/xemacs/keystrokes.texi index 319c3bf..f5f43cd 100644 --- a/man/xemacs/keystrokes.texi +++ b/man/xemacs/keystrokes.texi @@ -143,7 +143,7 @@ Pressing the @key{BREAK} key. Release the middle mouse button, while pressing @key{CTRL} and @key{META}. @end table -@cindex shift modifer +@cindex shift modifier Note: As you define keystrokes, you can use the @kbd{shift} key only as a modifier with characters that do not have a second keysym on the same key, such as @kbd{backspace} and @kbd{tab}. It is an error to @@ -163,7 +163,7 @@ sequence must make up a @dfn{prefix key sequence}. schematic representation of a complete key sequence is as follows: @example - [(modifier .. modifer keysym) ... (modifier .. modifier keysym)] + [(modifier .. modifier keysym) ... (modifier .. modifier keysym)] @end example Here are some examples of complete key sequences: diff --git a/man/xemacs/menus.texi b/man/xemacs/menus.texi index 92accd8..d64afe4 100644 --- a/man/xemacs/menus.texi +++ b/man/xemacs/menus.texi @@ -345,19 +345,19 @@ After you select this item, any time you execute a command with alternate binding before the command executes. @item Syntax Highlighting -You can customize your @code{.emacs} file to include the font-lock -mode so that when you select this item, the comments will be -displayed in one face, strings in another, reserved words in another, -and so on. When @b{Fonts} is selected, different parts of the program -will appear in different Fonts. When @b{Colors} is selected, then the -program will be displayed in different colors. Selecting @b{None} -causes the program to appear in just one Font and Color. Selecting -@b{Less} resets the Fonts and Colors to a fast, minimal set of -decorations. Selecting @b{More} resets the Fonts and Colors to a larger -set of decorations. For example, if @b{Less} is selected (which is the -default setting) then you might have all comments in green color. -Whereas, if @b{More} is selected then a function name in the comments -themselves might appear in a different Color or Font.@refill +You can customize your init file to include the font-lock mode so that +when you select this item, the comments will be displayed in one face, +strings in another, reserved words in another, and so on. @xref{Init +File}. When @b{Fonts} is selected, different parts of the program will +appear in different Fonts. When @b{Colors} is selected, then the program +will be displayed in different colors. Selecting @b{None} causes the +program to appear in just one Font and Color. Selecting @b{Less} resets +the Fonts and Colors to a fast, minimal set of decorations. Selecting +@b{More} resets the Fonts and Colors to a larger set of decorations. For +example, if @b{Less} is selected (which is the default setting) then you +might have all comments in green color. Whereas, if @b{More} is +selected then a function name in the comments themselves might appear in +a different Color or Font.@refill @item Paren Highlighting After selecting @b{Blink} from this item, if you place the cursor @@ -390,7 +390,7 @@ available will be selecting that buffer. @item Save Options Selecting this item will save the current settings of your Options -menu to your @code{.emacs} file. +menu to your init file. @xref{Init File}. @end table @node Buffers Menu diff --git a/man/xemacs/misc.texi b/man/xemacs/misc.texi index bbb8c64..d26bc10 100644 --- a/man/xemacs/misc.texi +++ b/man/xemacs/misc.texi @@ -192,7 +192,7 @@ environment variable when you start XEmacs. If the file name does not specify a directory, the directories in the list @code{exec-path} are searched; this list is initialized based on the @code{PATH} environment variable when you start XEmacs. You can override either or both of these -default initializations in your @file{.emacs} file.@refill +default initializations in your init file. @xref{Init File}.@refill When you use @kbd{M-!} and @kbd{M-|}, XEmacs has to wait until the shell command completes. You can quit with @kbd{C-g}; that terminates @@ -740,7 +740,7 @@ To start Viper, put the command (viper-mode) @end example -in your @file{.emacs} file. +in your init file. @xref{Init File}. Viper comes with a separate manual that is provided standard with the XEmacs distribution. diff --git a/man/xemacs/new.texi b/man/xemacs/new.texi index 46f78ec..7ed6ddf 100644 --- a/man/xemacs/new.texi +++ b/man/xemacs/new.texi @@ -13,21 +13,23 @@ XEmacs. XEmacs has a new vi emulation mode called evi mode. To start evi mode in Emacs, type the command @kbd{M-x evi}. If you want Emacs to automatically put you in evi-mode all the time, include this -line in your @file{.emacs} file: +line in your init file: @example (setq term-setup-hook 'evi) @end example @xref{evi Mode} for a brief discussion. +@xref{Init File}. @end ignore @item XEmacs has a new vi emulation mode called ``viper'' mode. To start viper mode in XEmacs, type the command @kbd{M-x viper-mode}. If you want XEmacs to automatically put you in viper-mode all the time, include -this line in your @file{.emacs} file: +this line in your init file: @example (viper-mode) @end example +@xref{Init File}. @item Earlier versions of Emacs only allowed keybindings to ASCII character @@ -267,7 +269,9 @@ commands are invoked only when you are in XEmacs: )) @end example -Of particular interest for use in @file{.emacs} files are: +Alternatively, use @file{.xemacs/init.el} for an init file. @xref{Init File}. + +Of particular interest for use in files are: @itemize @bullet @findex add-menu diff --git a/man/xemacs/packages.texi b/man/xemacs/packages.texi index 8bdcc98..15197a9 100644 --- a/man/xemacs/packages.texi +++ b/man/xemacs/packages.texi @@ -134,13 +134,15 @@ Normally, packages are installed over the network, using EFS already have some or all of the packages on a local disk, such as a CDROM. If you want to install from a local disk, you must first tell XEmacs where to find the package binaries. This is done by adding a line -like the following to your @file{.emacs} file: +like the following to your init file: @example (setq package-get-remote (cons (list nil "/my/path/to/package/binaries") package-get-remote)) @end example +@xref{Init File}. + Here, you'd change @file{/my/path/to/package/binaries} to be the path to your local package binaries. Next, restart XEmacs, and you're ready to go (advanced users can just re-evaluate the sexp). diff --git a/man/xemacs/programs.texi b/man/xemacs/programs.texi index 1d3ac44..9103a2d 100644 --- a/man/xemacs/programs.texi +++ b/man/xemacs/programs.texi @@ -45,7 +45,7 @@ on the screen. There are editing commands to operate on them. * Grinding:: Adjusting indentation to show the nesting. * Matching:: Insertion of a close-delimiter flashes matching open. -* Comments:: Inserting, illing and aligning comments. +* Comments:: Inserting, filling and aligning comments. * Balanced Editing:: Inserting two matching parentheses at once, etc. * Lisp Completion:: Completion on symbol names in Lisp code. * Documentation:: Getting documentation of functions you plan to call. diff --git a/man/xemacs/search.texi b/man/xemacs/search.texi index 62a9d09..ab72126 100644 --- a/man/xemacs/search.texi +++ b/man/xemacs/search.texi @@ -77,7 +77,7 @@ only if the next command you want to type is a printing character, within searches (@kbd{C-q}, @kbd{C-w}, @kbd{C-r}, @kbd{C-s}, or @kbd{C-y}). Sometimes you search for @samp{FOO} and find it, but were actually -looking for a different occurance of it. To move to the next occurrence +looking for a different occurence of it. To move to the next occurrence of the search string, type another @kbd{C-s}. Do this as often as necessary. If you overshoot, you can cancel some @kbd{C-s} characters with @key{DEL}. diff --git a/man/xemacs/sending.texi b/man/xemacs/sending.texi index 5a7eda2..b2d1ae9 100644 --- a/man/xemacs/sending.texi +++ b/man/xemacs/sending.texi @@ -235,9 +235,9 @@ To read in the contents of another @file{.mailrc}-type file from Emacs, use the command @code{M-x merge-mail-aliases}. The @code{rebuild-mail-aliases} command is similar, but deletes existing aliases first. -@vindex mail-alias-seperator-string +@vindex mail-alias-separator-string If you want multiple addresses separated by a string other than @samp{,} -(a comma), then set the variable @code{mail-alias-seperator-string} to +(a comma), then set the variable @code{mail-alias-separator-string} to it. This has to be a comma bracketed by whitespace if you want any kind of reasonable behavior. diff --git a/man/xemacs/startup.texi b/man/xemacs/startup.texi index 3fca5ee..65bc279 100644 --- a/man/xemacs/startup.texi +++ b/man/xemacs/startup.texi @@ -63,8 +63,9 @@ up in the various XEmacs paths. Early package hierarchies are at the very front, late ones somewhere in the middle, and last hierarchies are (you guessed it) last. -By default, XEmacs expects an early package hierarchy in the a -subdirectory @file{.xemacs} of the user's home directory. +By default, XEmacs expects an early package hierarchy in the +subdirectory @file{.xemacs/xemacs-packages} of the user's home +directory. Moreover, XEmacs expects late hierarchies in the subdirectories @file{site-packages}, @file{mule-packages}, and @file{xemacs-packages} @@ -77,7 +78,7 @@ subdirectory and prefer directories found there. By default, XEmacs does not have a pre-configured last package hierarchy. Last hierarchies are primarily for using package hierarchies of outdated versions of XEmacs as a fallback option. For example, it is -possible to run XEmacs 21.0 with the 20.4 package hierarchy as a last +possible to run XEmacs 21 with the 20.4 package hierarchy as a last hierarchy. It is possible to specify at configure-time the location of the various diff --git a/man/xemacs/trouble.texi b/man/xemacs/trouble.texi index 8f4a532..58634d9 100644 --- a/man/xemacs/trouble.texi +++ b/man/xemacs/trouble.texi @@ -332,12 +332,13 @@ note the error message the first time the bug happens, so if you can't make it happen again, you can report at least that. Check whether any programs you have loaded into the Lisp world, including -your @file{.emacs} file, set any variables that may affect the functioning -of Emacs. Also, see whether the problem happens in a freshly started Emacs -without loading your @file{.emacs} file (start Emacs with the @code{-q} switch -to prevent loading the init file). If the problem does @var{not} occur -then, it is essential that we know the contents of any programs that you -must load into the Lisp world in order to cause the problem to occur. +your init file, set any variables that may affect the functioning of +Emacs. @xref{Init File}. Also, see whether the problem happens in a +freshly started Emacs without loading your init file (start Emacs with +the @code{-q} switch to prevent loading the init file). If the problem +does @var{not} occur then, it is essential that we know the contents of +any programs that you must load into the Lisp world in order to cause +the problem to occur. If the problem does depend on an init file or other Lisp programs that are not part of the standard Emacs system, then you should make sure it is @@ -378,15 +379,15 @@ The way to collect this output is to execute the Lisp expression: (open-termscript "~/termscript") @end example -@noindent -using @kbd{Meta-@key{ESC}} or from the @samp{*scratch*} buffer just -after starting Emacs. From then on, all output from Emacs to the terminal -will be written in the specified termscript file as well, until the Emacs -process is killed. If the problem happens when Emacs starts up, put this -expression into your @file{.emacs} file so that the termscript file will -be open when Emacs displays the screen for the first time. Be warned: -it is often difficult, and sometimes impossible, to fix a terminal-dependent -bug without access to a terminal of the type that stimulates the bug.@refill +@noindent using @kbd{Meta-@key{ESC}} or from the @samp{*scratch*} buffer +just after starting Emacs. From then on, all output from Emacs to the +terminal will be written in the specified termscript file as well, until +the Emacs process is killed. If the problem happens when Emacs starts +up, put this expression into your init file so that the termscript file +will be open when Emacs displays the screen for the first time. +@xref{Init File}. Be warned: it is often difficult, and sometimes +impossible, to fix a terminal-dependent bug without access to a terminal +of the type that stimulates the bug.@refill The newsgroup @samp{comp.emacs.xemacs} may be used for bug reports, other discussions and requests for assistance. diff --git a/man/xemacs/xemacs.texi b/man/xemacs/xemacs.texi index dbcc221..8dc6609 100644 --- a/man/xemacs/xemacs.texi +++ b/man/xemacs/xemacs.texi @@ -551,8 +551,7 @@ Customization By changing them, you can "redefine keys". * Syntax:: The syntax table controls how words and expressions are parsed. -* Init File:: How to write common customizations in the @file{.emacs} - file. +* Init File:: How to write common customizations in the init file. * Audible Bell:: Changing how XEmacs sounds the bell. * Faces:: Changing the fonts and colors of a region of text. * X Resources:: X resources controlling various aspects of the @@ -586,7 +585,7 @@ The Syntax Table * Entry: Syntax Entry. What the syntax table records for each character. * Change: Syntax Change. How to change the information. -The Init File, @file{~/.emacs} +The Init File * Init Syntax:: Syntax of constants in Emacs Lisp. * Init Examples:: How to do some things with an init file. diff --git a/modules/base64/Makefile b/modules/base64/Makefile index 4063805..0dde2f3 100644 --- a/modules/base64/Makefile +++ b/modules/base64/Makefile @@ -1,5 +1,4 @@ # -# Sample makefile for a simple Emacs module. # This is slightly more complicated than would normally be the case, # as this makefile has been tailored to work in the Emacs source tree. # For samples of how to compile modules outside of the source tree @@ -8,6 +7,8 @@ # 'installed'. # +SHELL=/bin/sh +RM=rm -f CC=../../lib-src/ellcc CFLAGS=-I. -I../../src LD=$(CC) --mode=link @@ -28,7 +29,7 @@ all: $(MODNAME).ell distclean: clean clean: - rm -f $(MODNAME).ell $(OBJS) base64_i.o base64_i.c + $(RM) $(MODNAME).ell $(OBJS) base64_i.o base64_i.c $(MODNAME).ell: $(OBJS) base64_i.o $(LD) --mod-output=$@ $(OBJS) base64_i.o diff --git a/modules/ldap/Makefile b/modules/ldap/Makefile index 6e775ec..864cea6 100644 --- a/modules/ldap/Makefile +++ b/modules/ldap/Makefile @@ -1,5 +1,4 @@ # -# Sample makefile for a simple Emacs module. # This is slightly more complicated than would normally be the case, # as this makefile has been tailored to work in the Emacs source tree. # For samples of how to compile modules outside of the source tree @@ -8,6 +7,8 @@ # 'installed'. # +SHELL=/bin/sh +RM=rm -f CC=../../lib-src/ellcc CFLAGS=-I. -I../../src LD=$(CC) --mode=link @@ -28,7 +29,7 @@ all: $(MODNAME).ell distclean: clean clean: - rm -f $(MODNAME).ell $(OBJS) eldap_i.o eldap_i.c + $(RM) $(MODNAME).ell $(OBJS) eldap_i.o eldap_i.c $(MODNAME).ell: $(OBJS) eldap_i.o $(LD) --mod-output=$@ $(OBJS) eldap_i.o diff --git a/modules/sample/Makefile b/modules/sample/Makefile index 1e0849c..9fc2f7e 100644 --- a/modules/sample/Makefile +++ b/modules/sample/Makefile @@ -8,6 +8,8 @@ # 'installed'. # +SHELL=/bin/sh +RM=rm -f CC=../../lib-src/ellcc CFLAGS=-I. -I../../src LD=$(CC) --mode=link @@ -28,7 +30,7 @@ all: $(MODNAME).ell distclean: clean clean: - rm -f $(MODNAME).ell $(OBJS) sample_i.o sample_i.c + $(RM) $(MODNAME).ell $(OBJS) sample_i.o sample_i.c $(MODNAME).ell: $(OBJS) sample_i.o $(LD) --mod-output=$@ $(OBJS) sample_i.o diff --git a/modules/zlib/Makefile b/modules/zlib/Makefile index 45076e3..99f4c5e 100644 --- a/modules/zlib/Makefile +++ b/modules/zlib/Makefile @@ -8,6 +8,8 @@ # 'installed'. # +SHELL=/bin/sh +RM=rm -f CC=../../lib-src/ellcc CFLAGS=-I. -I../../src LD=$(CC) --mode=link @@ -28,7 +30,7 @@ all: $(MODNAME).ell distclean: clean clean: - rm -f $(MODNAME).ell $(OBJS) zlib_i.o zlib_i.c + $(RM) $(MODNAME).ell $(OBJS) zlib_i.o zlib_i.c $(MODNAME).ell: $(OBJS) zlib_i.o $(LD) --mod-output=$@ $(OBJS) zlib_i.o diff --git a/nt/ChangeLog b/nt/ChangeLog index 3d55b83..0d92960 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,61 @@ +2000-07-19 Martin Buchholz + + * XEmacs 21.2.35 is released. + +2000-07-14 IKEYAMA Tomonori + + * config.h: Import C++ compilation stuff from src/config.h. + +2000-07-05 Craig Lanning + + * xemacs.rc: Uppercase the id's so that windres will work. + +2000-07-05 Kirill 'Big K' Katsnelson + + * xemacs.mak (TEMACS_LIBS): Added comdlg32.lib + +2000-06-12 Ben Wing + + * config.h (ENCAPSULATE_STAT): + Always encapsulate stat/fstat. Also suggested by Mike Alexander + . + +2000-06-10 Ben Wing + + * config.h: + * config.h (HAVE_GETPAGESIZE): + * config.h (HAVE_GETTIMEOFDAY): + corrections to go along with removed nt/inc. + removed HAVE_FEP. + + * config.inc.samp: + correct graphics lib paths to agree with binaries provided in + ftp aux dir. + + * xemacs.mak (DEPEND): + * xemacs.mak (DEFINES): + * xemacs.mak (LIB_SRC_DEFINES): + * xemacs.mak (minitar): + * xemacs.mak (TEMACS_LFLAGS): + * xemacs.mak (tags): + * xemacs.mak (all): + * xemacs.mak (install): + WINDOWSNT -> WIN32_NATIVE. + Don't build run*.exe. + comments about required ^^. + Added setargv.obj to the list of linked entities, + causing automatic wildcarding of filenames given on the + command line. (As usual, enclose in double quotes to avoid + this.) + +2000-06-07 Ben Wing + + * runemacs.c: Removed. No longer necessary. + + * Makefile.cygwin: Removed. + + * inc\*: Removed. At long-fucking-last! + 2000-05-28 Martin Buchholz * XEmacs 21.2.34 is released. @@ -361,7 +419,7 @@ * XEmacs 21.2.16 is released -1999-05-14 Adrian Aichner <adrian@xemacs.org> +1999-05-14 Adrian Aichner * xemacs.mak (GUNG_HO): Explicitly default to 0. Fix some comment typos. diff --git a/nt/Makefile.cygwin b/nt/Makefile.cygwin deleted file mode 100644 index fdbd61e..0000000 --- a/nt/Makefile.cygwin +++ /dev/null @@ -1,15 +0,0 @@ -MSW_LIBS =-luser32 -lgdi32 -lcomdlg32 -LDFLAGS =-Wl,--subsystem,windows -CFLAGS =-g - -bindir =/usr/local/bin - -INSTALL = /usr/local/src/xemacs-21.0-b42/lib-src/installexe.sh /d/cygnus/h-i386-cygwin32/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 - -runemacs.exe: runemacs.o - $(CC) $(LDFLAGS) runemacs.o $(MSW_LIBS) -o $@ - -install: runemacs.exe - $(INSTALL_PROGRAM) runemacs.exe $(bindir) diff --git a/nt/config.h b/nt/config.h index 48528ef..718e0c7 100644 --- a/nt/config.h +++ b/nt/config.h @@ -157,7 +157,7 @@ Boston, MA 02111-1307, USA. */ #undef WORDS_BIGENDIAN #undef TIME_WITH_SYS_TIME -#define HAVE_SYS_TIME_H +#undef HAVE_SYS_TIME_H #define HAVE_LOCALE_H #ifdef HAVE_X_WINDOWS #define HAVE_X11_LOCALE_H @@ -230,7 +230,10 @@ Boston, MA 02111-1307, USA. */ #undef HAVE_FREXP #undef HAVE_FTIME #undef HAVE_GETHOSTNAME -#undef HAVE_GETPAGESIZE + +#define HAVE_GETPAGESIZE +#define getpagesize() 4096 + #define HAVE_GETTIMEOFDAY #define HAVE_GETWD #undef HAVE_LOGB @@ -559,10 +562,8 @@ on various systems. */ #define ENCAPSULATE_OPEN #define ENCAPSULATE_FOPEN #define ENCAPSULATE_MKDIR - -#if defined (WIN32) && defined (USE_IME) -#define HAVE_FEP -#endif +#define ENCAPSULATE_STAT +#define ENCAPSULATE_FSTAT #if defined (HAVE_SOCKS) && !defined (DO_NOT_SOCKSIFY) #define accept Raccept @@ -601,6 +602,21 @@ on various systems. */ #endif /* compiler understands #pragma warning*/ +#ifndef NOT_C_CODE /* Actually means C or C++ */ +# if defined (__cplusplus) +/* Avoid C++ keywords used as ordinary C identifiers */ +# define class c_class +# define new c_new +# define this c_this +# define catch c_catch +# define not c_not + +# define EXTERN_C extern "C" +# else /* C code */ +# define EXTERN_C extern +# endif +#endif /* C or C++ */ + #define enum_field(enumeration_type) unsigned int /* We want to avoid saving the signal mask if possible, because diff --git a/nt/config.inc.samp b/nt/config.inc.samp index 4946af6..1415865 100644 --- a/nt/config.inc.samp +++ b/nt/config.inc.samp @@ -23,7 +23,7 @@ X11_DIR= # Set this to enable XPM support (virtually mandatory), and specify # the directory containing xpm. HAVE_XPM=1 -XPM_DIR=f:\src\xpm-3.4k +XPM_DIR=c:\src\xpm-3.4k # Set this to enable GIF support. HAVE_GIF=1 @@ -31,16 +31,16 @@ HAVE_GIF=1 # Set this to enable PNG support (virtually mandatory), and specify # the directories containing png and zlib. HAVE_PNG=1 -PNG_DIR=f:\src\libpng-1.0.3 -ZLIB_DIR=f:\src\zlib +PNG_DIR=c:\src\libpng-1.0.5 +ZLIB_DIR=c:\src\zlib-1.1.3 # Set this to enable TIFF support, and specify the directory containing tiff. HAVE_TIFF=0 TIFF_DIR= # Set this to enable JPEG support, and specify the directory containing jpeg. -HAVE_JPEG=0 -JPEG_DIR= +HAVE_JPEG=1 +JPEG_DIR=c:\src\jpeg-6b # Set this to enable XFace support, and specify the directory containing # compface. diff --git a/nt/inc/arpa/inet.h b/nt/inc/arpa/inet.h deleted file mode 100644 index f5d197c..0000000 --- a/nt/inc/arpa/inet.h +++ /dev/null @@ -1 +0,0 @@ -/* null version of - has everything */ diff --git a/nt/inc/netdb.h b/nt/inc/netdb.h deleted file mode 100644 index 5bf232e..0000000 --- a/nt/inc/netdb.h +++ /dev/null @@ -1 +0,0 @@ -/* null version of - has everything */ diff --git a/nt/inc/netinet/in.h b/nt/inc/netinet/in.h deleted file mode 100644 index 46fb0fa..0000000 --- a/nt/inc/netinet/in.h +++ /dev/null @@ -1 +0,0 @@ -/* null version of - has everything */ diff --git a/nt/inc/pwd.h b/nt/inc/pwd.h deleted file mode 100644 index 6202ccd..0000000 --- a/nt/inc/pwd.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _PWD_H_ -#define _PWD_H_ -/* - * pwd.h doesn't exist on NT, so we put together our own. - */ - -struct passwd { - char *pw_name; - char *pw_passwd; - int pw_uid; - int pw_gid; - int pw_quota; - char *pw_gecos; - char *pw_dir; - char *pw_shell; -}; - -#endif /* _PWD_H_ */ diff --git a/nt/inc/sys/dir.h b/nt/inc/sys/dir.h deleted file mode 100644 index ee5fc04..0000000 --- a/nt/inc/sys/dir.h +++ /dev/null @@ -1,75 +0,0 @@ -/* 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: FSF 19.30. */ - -/* - -- definitions for 4.2BSD-compatible directory access - - last edit: 09-Jul-1983 D A Gwyn -*/ - -#ifdef VMS -#ifndef FAB$C_BID -#include -#endif -#ifndef NAM$C_BID -#include -#endif -#ifndef RMS$_SUC -#include -#endif -#include "vms-dir.h" -#endif /* VMS */ - -#define DIRBLKSIZ 512 /* size of directory block */ -#ifdef VMS -#define MAXNAMLEN (DIR$S_NAME + 7) /* 80 plus room for version #. */ -#define MAXFULLSPEC NAM$C_MAXRSS /* Maximum full spec */ -#else -#ifdef WINDOWSNT -#define MAXNAMLEN 255 -#else /* not WINDOWSNT */ -#define MAXNAMLEN 15 /* maximum filename length */ -#endif /* not WINDOWSNT */ -#endif /* VMS */ - /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */ - -struct direct /* data from readdir() */ - { - long d_ino; /* inode number of entry */ - unsigned short d_reclen; /* length of this record */ - unsigned short d_namlen; /* length of string in d_name */ - char d_name[MAXNAMLEN+1]; /* name of file */ - }; - -typedef struct - { - int dd_fd; /* file descriptor */ - int dd_loc; /* offset in block */ - int dd_size; /* amount of valid data */ - char dd_buf[DIRBLKSIZ]; /* directory block */ - } DIR; /* stream data from opendir() */ - -DIR *opendir (const char *filename); -void closedir (DIR *dirp); -struct direct *readdir (DIR *dirp); -struct direct *readdirver (DIR *dirp); -long telldir (DIR *dirp); -void seekdir (DIR *dirp, long loc); - -#define rewinddir( dirp ) seekdir( dirp, 0L ) diff --git a/nt/inc/sys/file.h b/nt/inc/sys/file.h deleted file mode 100644 index 238d83b..0000000 --- a/nt/inc/sys/file.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * sys\file.h doesn't exist on NT - only needed for these constants - */ - -#define F_OK 0 -#ifdef X_OK -#undef X_OK -#endif -#define X_OK 1 -#define W_OK 2 -#define R_OK 4 diff --git a/nt/inc/sys/ioctl.h b/nt/inc/sys/ioctl.h deleted file mode 100644 index dc09578..0000000 --- a/nt/inc/sys/ioctl.h +++ /dev/null @@ -1,5 +0,0 @@ -/* - * sys\ioctl.h doesn't exist on NT...rather than including it conditionally - * in many of the source files, we just extend the include path so that the - * compiler will pick this up empty header instead. - */ diff --git a/nt/inc/sys/param.h b/nt/inc/sys/param.h deleted file mode 100644 index 397c5ff..0000000 --- a/nt/inc/sys/param.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _PARAM_H_ -#define _PARAM_H_ - -/* - * sys\param.h doesn't exist on NT, so we'll make one. - */ - -#define NBPG 4096 - -#endif /* _PARAM_H_ */ diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h deleted file mode 100644 index ee669a1..0000000 --- a/nt/inc/sys/socket.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Workable version of based on winsock.h */ - -#ifndef _SOCKET_H_ -#define _SOCKET_H_ - -/* defeat the multiple include protection */ -#ifdef _WINSOCKAPI_ -#undef _WINSOCKAPI_ -#endif - -#if 0 /* What's wrong with winsock.h version ? - kkm */ -/* avoid clashing with our version of FD_SET if already defined */ -#ifdef FD_SET -#undef FD_SET -#undef FD_CLR -#undef FD_ISSET -#undef FD_ZERO -#endif - -/* allow us to provide our own version of fd_set */ -#define fd_set ws_fd_set -#endif /* 0 */ - -/* avoid duplicate definition of timeval */ -#if defined(HAVE_TIMEVAL) && !defined(__MINGW32__) -#define timeval ws_timeval -#endif - -#include - -#if 0 /* What's wrong with winsock.h version ? - kkm */ -/* revert to our version of FD_SET */ -#undef FD_SET -#undef FD_CLR -#undef FD_ISSET -#undef FD_ZERO -#undef fd_set -#include "nt.h" -#endif /* 0 */ - -#ifdef HAVE_TIMEVAL -#undef timeval -#endif - -/* map winsock error codes to standard names */ -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EINPROGRESS WSAEINPROGRESS -#define EALREADY WSAEALREADY -#define ENOTSOCK WSAENOTSOCK -#define EDESTADDRREQ WSAEDESTADDRREQ -#define EMSGSIZE WSAEMSGSIZE -#define EPROTOTYPE WSAEPROTOTYPE -#define ENOPROTOOPT WSAENOPROTOOPT -#define EPROTONOSUPPORT WSAEPROTONOSUPPORT -#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT -#define EOPNOTSUPP WSAEOPNOTSUPP -#define EPFNOSUPPORT WSAEPFNOSUPPORT -#define EAFNOSUPPORT WSAEAFNOSUPPORT -#define EADDRINUSE WSAEADDRINUSE -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL -#define ENETDOWN WSAENETDOWN -#define ENETUNREACH WSAENETUNREACH -#define ENETRESET WSAENETRESET -#define ECONNABORTED WSAECONNABORTED -#define ECONNRESET WSAECONNRESET -#define ENOBUFS WSAENOBUFS -#define EISCONN WSAEISCONN -#define ENOTCONN WSAENOTCONN -#define ESHUTDOWN WSAESHUTDOWN -#define ETOOMANYREFS WSAETOOMANYREFS -#define ETIMEDOUT WSAETIMEDOUT -#define ECONNREFUSED WSAECONNREFUSED -#define ELOOP WSAELOOP -/* #define ENAMETOOLONG WSAENAMETOOLONG */ -#define EHOSTDOWN WSAEHOSTDOWN -#define EHOSTUNREACH WSAEHOSTUNREACH -/* #define ENOTEMPTY WSAENOTEMPTY */ -#define EPROCLIM WSAEPROCLIM -#define EUSERS WSAEUSERS -#define EDQUOT WSAEDQUOT -#define ESTALE WSAESTALE -#define EREMOTE WSAEREMOTE - -#endif /* _SOCKET_H_ */ - -/* end of socket.h */ diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h deleted file mode 100644 index 5044707..0000000 --- a/nt/inc/sys/time.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * sys/time.h doesn't exist on NT - */ - -#include - -#ifdef __MINGW32__ -#include -#else -struct timeval - { - long tv_sec; /* seconds */ - long tv_usec; /* microseconds */ - }; -#endif - -struct timezone - { - int tz_minuteswest; /* minutes west of Greenwich */ - int tz_dsttime; /* type of dst correction */ - }; - -#ifndef HAVE_X_WINDOWS -/* X11R6 on NT provides the single parameter version of this command */ -void gettimeofday (struct timeval *, struct timezone *); -#endif - -/* end of sys/time.h */ diff --git a/nt/inc/unistd.h b/nt/inc/unistd.h deleted file mode 100644 index c1caa77..0000000 --- a/nt/inc/unistd.h +++ /dev/null @@ -1 +0,0 @@ -/* Fake unistd.h: config.h already provides most of the relevant things. */ diff --git a/nt/runemacs.c b/nt/runemacs.c deleted file mode 100644 index 1b5d3e1..0000000 --- a/nt/runemacs.c +++ /dev/null @@ -1,185 +0,0 @@ -/* - Simple program to start Emacs with its console window hidden. - - This program is provided purely for convenience, since most users will - use Emacs in windowing (GUI) mode, and will not want to have an extra - console window lying around. */ - -/* - You may want to define this if you want to be able to install updated - emacs binaries even when other users are using the current version. - The problem with some file servers (notably Novell) is that an open - file cannot be overwritten, deleted, or even renamed. So if someone - is running emacs.exe already, you cannot install a newer version. - By defining CHOOSE_NEWEST_EXE, you can name your new emacs.exe - something else which matches "emacs*.exe", and runemacs will - automatically select the newest emacs executeable in the bin directory. - (So you'll probably be able to delete the old version some hours/days - later). -*/ - -/* #define CHOOSE_NEWEST_EXE */ - -#define WIN32 - -#include -#include -#include - -#if defined(__CYGWIN32__) -#include -#include -#endif - -int WINAPI -WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, int nShow) -{ - STARTUPINFO start; - SECURITY_ATTRIBUTES sec_attrs; - SECURITY_DESCRIPTOR sec_desc; - PROCESS_INFORMATION child; - int wait_for_child = FALSE; - DWORD ret_code = 0; - char *new_cmdline; - char *basename; - char *p; - char modname[MAX_PATH]; - - if (!GetModuleFileName (NULL, modname, MAX_PATH)) - goto error; - if ((p = strrchr (modname, '\\')) == NULL) - goto error; - - basename = alloca(strlen(p) + 1); - strcpy (basename, p + 1); - - *p = 0; - - new_cmdline = alloca (MAX_PATH + strlen (cmdline) + 1); - strcpy (new_cmdline, modname); - -#ifdef CHOOSE_NEWEST_EXE - { - /* Silly hack to allow new versions to be installed on - server even when current version is in use. */ - - char * best_name = alloca (MAX_PATH + 1); - FILETIME best_time = {0,0}; - WIN32_FIND_DATA wfd; - HANDLE fh; - p = new_cmdline + strlen (new_cmdline); - strcpy (p, "\\xemacs*.exe "); - fh = FindFirstFile (new_cmdline, &wfd); - if (fh == INVALID_HANDLE_VALUE) - goto error; - do - { - if (wfd.ftLastWriteTime.dwHighDateTime > best_time.dwHighDateTime - || (wfd.ftLastWriteTime.dwHighDateTime == best_time.dwHighDateTime - && wfd.ftLastWriteTime.dwLowDateTime > best_time.dwLowDateTime)) - { - best_time = wfd.ftLastWriteTime; - strcpy (best_name, wfd.cFileName); - } - } - while (FindNextFile (fh, &wfd)); - FindClose (fh); - *p++ = '\\'; - strcpy (p, best_name); - strcat (p, " "); - } -#else -#if defined(__CYGWIN32__) - { - struct stat stbuf; - char sym_link_name[MAX_PATH+1], real_name[MAX_PATH+1]; - - strcpy(sym_link_name, new_cmdline); - if (strcmp(basename, "rungnuclient.exe") == 0) - strcat(new_cmdline, "\\gnuclient.exe "); - else if (strcmp(basename, "runemacs.exe") == 0) - { - strcat(sym_link_name, "\\xemacs"); - - if (lstat(sym_link_name, &stbuf) == 0) - { - if ((stbuf.st_mode & S_IFLNK) == S_IFLNK) - { - if (readlink(sym_link_name, real_name, sizeof(real_name)) == -1) - { - MessageBox (NULL, "Error reading symbolic link for xemacs", - "Error", MB_ICONSTOP); - return 1; - } - else - { - strcat(new_cmdline, "\\"); - strcat(new_cmdline, real_name); - strcat(new_cmdline, " "); - } - } - else - strcat(new_cmdline, "\\xemacs "); - } - else - { - MessageBox (NULL, "can't locate XEmacs executable", - "Error", MB_ICONSTOP); - return 1; - } - } - } -#else - if (strcmp(basename, "rungnuclient.exe") == 0) - strcat (new_cmdline, "\\gnuclient.exe "); - else - strcat (new_cmdline, "\\xemacs.exe "); -#endif -#endif - - /* Append original arguments if any; first look for -wait as first - argument, and apply that ourselves. */ - if (strncmp (cmdline, "-wait", 5) == 0) - { - wait_for_child = TRUE; - cmdline += 5; - } - strcat (new_cmdline, cmdline); - - /* Set emacs_dir variable if runemacs was in "%emacs_dir%\bin". */ - if ((p = strrchr (modname, '\\')) && stricmp (p, "\\bin") == 0) - { - *p = 0; - for (p = modname; *p; p++) - if (*p == '\\') *p = '/'; - SetEnvironmentVariable ("emacs_dir", modname); - } - - memset (&start, 0, sizeof (start)); - start.cb = sizeof (start); - start.dwFlags = STARTF_USESHOWWINDOW; - start.wShowWindow = SW_HIDE; - - sec_attrs.nLength = sizeof (sec_attrs); - sec_attrs.lpSecurityDescriptor = NULL; - sec_attrs.bInheritHandle = FALSE; - - if (CreateProcess (NULL, new_cmdline, &sec_attrs, NULL, TRUE, 0, - NULL, NULL, &start, &child)) - { - if (wait_for_child) - { - WaitForSingleObject (child.hProcess, INFINITE); - GetExitCodeProcess (child.hProcess, &ret_code); - } - CloseHandle (child.hThread); - CloseHandle (child.hProcess); - } - else - goto error; - return (int) ret_code; - -error: - MessageBox (NULL, "Could not start XEmacs or gnuclient.", "Error", MB_ICONSTOP); - return 1; -} diff --git a/nt/xemacs.mak b/nt/xemacs.mak index ca54812..bc7c917 100644 --- a/nt/xemacs.mak +++ b/nt/xemacs.mak @@ -297,6 +297,9 @@ DEPEND=0 ! if [if not exist $(OUTDIR)\nul mkdir "$(OUTDIR)"] ! endif # generate an nmake-readable version of depend +# #### here, it doesn't seem to matter if we double ^'s! +# results are the same with all single ^ and all double ^^! +# see comment below. ! if [perl -p -e "s/^\x23ifdef (.+)/!if defined($$1)/; s/^\x23e/!e/;" \ -e "s/([\s=^])([\w\d\.\-^]+\.[ch^])/$$1$(SRC:\=\\)\\$$2/g;" \ -e "s/^(.+)\.o:(.+)/$(OUTDIR:\=\\)\\$$1.obj:$$2 $(NT:\=\\)\\config.inc/;" \ @@ -455,7 +458,7 @@ INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(NT)\inc -I$(SRC) -I$(LWLIB_SRCDIR) DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) \ $(TAGBITS_DEFINES) $(LRECORD_DEFINES) $(UNION_DEFINES) \ $(DUMPER_DEFINES) $(MALLOC_DEFINES) $(QUICK_DEFINES) \ - -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN -DWINDOWSNT -Demacs \ + -DWIN32_LEAN_AND_MEAN -DWIN32_NATIVE -Demacs \ -DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES) #------------------------------------------------------------------------------ @@ -481,7 +484,7 @@ $(SRC)\paths.h: paths.h # lib-src programs -LIB_SRC_DEFINES = -DHAVE_CONFIG_H -DWIN32 -DWINDOWSNT +LIB_SRC_DEFINES = -DHAVE_CONFIG_H -DWIN32_NATIVE # # Creating config.values to be used by config.el @@ -549,18 +552,6 @@ minitar: $(LIB_SRC)/minitar.exe #------------------------------------------------------------------------------ -# runxemacs proglet - -RUNEMACS = $(SRC)\runxemacs.exe - -$(RUNEMACS): $(LIB_SRC)\run.c $(LIB_SRC)\run.res - $(CCV) -I$(LIB_SRC) $(CFLAGS) -Fe$@ -Fo$(LIB_SRC) -Fd$(LIB_SRC)\ $** kernel32.lib user32.lib -link -incremental:no - -$(LIB_SRC)\run.res: $(LIB_SRC)\run.rc - rc -I$(LIB_SRC) -Fo$@ $** - -#------------------------------------------------------------------------------ - # dump-id.c file that contains the dump id $(SRC)\dump-id.c : $(LIB_SRC)/make-dump-id.exe @@ -824,12 +815,12 @@ TEMACS=$(TEMACS_DIR)\temacs.exe TEMACS_BROWSE=$(TEMACS_DIR)\temacs.bsc TEMACS_SRC=$(SRC) TEMACS_LIBS=$(LASTFILE) $(LWLIB) $(X_LIBS) $(MSW_LIBS) \ - oldnames.lib kernel32.lib user32.lib gdi32.lib advapi32.lib \ + oldnames.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib \ shell32.lib wsock32.lib winmm.lib winspool.lib ole32.lib uuid.lib $(LIBC_LIB) TEMACS_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS) -base:0x1000000\ -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows\ -pdb:$(TEMACS_DIR)\temacs.pdb -map:$(TEMACS_DIR)\temacs.map \ - -heap:0x00100000 -nodefaultlib -incremental:no + -heap:0x00100000 -nodefaultlib -incremental:no setargv.obj TEMACS_CPP_FLAGS=-c \ $(CFLAGS) $(INCLUDES) $(DEFINES) $(DEBUG_DEFINES) \ -DEMACS_MAJOR_VERSION=$(emacs_major_version) \ @@ -1104,8 +1095,10 @@ tags: cd $(XEMACS) $(DEL) TAGS set PATH=lib-src;%PATH% -# argh!!! we need two ^^'s to get one ^, but only before a backslash. -# i have no idea why. probably some obscure nmake quoting convention. +# we need to double ^, but only before backslash! Doubling it elsewhere +# causes problems. I don't understand this -- CMD.EXE uses ^ as a quoting +# convention of sorts, but appears to leave it alone inside of double quotes, +# even before \. Could this be nmake interference? etags -a -r "/[ ]*DEF\(VAR\|INE\)_[A-Z_]+[ ]*([ ]*\"\([^^\"]+\)\"/\2/" src\*.c src\*.h lwlib\*.c lwlib\*.h lib-src\*.c lib-src\*.h etags -a -l none -r "/^(def\(var\|un\|alias\|const\|macro\|subst\|struct\|face\|group\|custom\|ine-\(function\|compiler-macro\|[a-z-]+alias\)\)[ ]+'?\([^ ]+\)/\3/" $(tagslisp)\*.el @@ -1370,7 +1363,7 @@ $(PROGNAME) : $(TEMACS) $(TEMACS_DIR)\NEEDTODUMP # use this rule to build the complete system all: installation $(OUTDIR)\nul $(LASTFILE) $(LWLIB) \ - $(LIB_SRC_TOOLS) $(RUNEMACS) $(TEMACS) update-elc $(DOC) $(PROGNAME) \ + $(LIB_SRC_TOOLS) $(TEMACS) update-elc $(DOC) $(PROGNAME) \ update-auto-and-custom info temacs: $(LASTFILE) $(TEMACS) @@ -1387,7 +1380,6 @@ install: all @copy $(LIB_SRC)\DOC "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" @copy $(CONFIG_VALUES) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" @copy $(SRC)\xemacs.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" - @copy $(RUNEMACS) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" @xcopy /e /q $(XEMACS)\etc "$(INSTALL_DIR)\etc\" @xcopy /e /q $(XEMACS)\info "$(INSTALL_DIR)\info\" @xcopy /e /q $(XEMACS)\lisp "$(INSTALL_DIR)\lisp\" diff --git a/nt/xemacs.rc b/nt/xemacs.rc index 3b5cb7e..d39ed5c 100644 --- a/nt/xemacs.rc +++ b/nt/xemacs.rc @@ -2,6 +2,6 @@ 101 DUMP "xemacs.dmp" #endif -XEmacs icon preload "xemacs.ico" -XEmacsFile icon "File.ico" -XEmacsLisp icon "Lisp.ico" +XEmacs ICON PRELOAD "xemacs.ico" +XEmacsFile ICON "File.ico" +XEmacsLisp ICON "Lisp.ico" diff --git a/src/ChangeLog b/src/ChangeLog index 6437973..dd9bc24 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2554,6 +2554,956 @@ (Vcharset_thai_tis620): Likewise. (Vcharset_katakana_jisx0201): Likewise. +2000-07-19 Martin Buchholz + + * XEmacs 21.2.35 is released. + +2000-07-19 Martin Buchholz + + * select-x.c (x_handle_selection_request): + Text selected in xemacs and pasted into xterm failed to appear. + Spelling fixes and cosmetic changes. + +2000-07-18 Kirill 'Big K' Katsnelson + + * event-msw.c (mswindows_drain_windows_queue): Correctly check for + XEmacs frame (fix for doubling chars in dialog boxes). + +2000-07-17 Alastair J. Houghton + + * select.c (select_convert_in, select_convert_out): + Don't call intern() every time. + + * select.c (Qselect_convert_in, Qselect_convert_out): New. + * select.c (vars_of_select): Initialise them. + +2000-07-18 Alastair J. Houghton + + * select.c (selection-coercible-types): New. + + * select.c (own-selection-internal): + * select.c (get-selection-internal): + MULE bug fix - these should default to COMPOUND_TEXT and not + STRING for MULE. I think. + + * select.c (select_convert_out): Use selection-coercible-types + to find types that we can attempt to perform coercions on. + +2000-07-18 Martin Buchholz + + * mule-wnnfns.c: + * mule-canna.c: + Add coding: cookie to identify encoding. + + * mule-canna.c (CANNA_mode_keys): make static. + Use proper prototypes, even for functions of no arguments. + Remove external prototype for Fding(). + + * symsinit.h: Add missing prototype for reinit_vars_of_mule_wnn. + + * select.c (syms_of_select): Add missing DEFSUBR. + +2000-07-18 Alastair J. Houghton + + * select.c (get_selection_internal, own_selection_internal): + Make the type default to STRING, rather than placing a nil type + into Vselection_alist. + +2000-07-17 Alastair J. Houghton + + * gpmevent.c (tty_selection_exists_p): + * gpmevent.c (tty_own_selection): + Updated parameter lists. + +2000-07-15 Alastair J. Houghton + + * select.h (selection-alist): Removed declaration. + + * select.h (get_local_selection): + * select.c (get_local_selection): + Made static. + + * select.h (convert_selection): Removed declaration. + * select.c (convert_selection): Removed. + This function belongs in Lisp. + + * select.h (select_convert_in): Declare. + * select.h (select_convert_out): Declare. + * select.c (select_convert_in): New. + * select.c (select_convert_out): New. + New conversion functions for other files to call. + + * select.h (select_notify_buffer_kill): Declare. + * select.c (select_notify_buffer_kill): New. + New functions that get called from kill-buffer. + + * buffer.c (kill-buffer): Call select_notify_buffer_kill, rather than + X-specific lisp code. + + * select.h: Declare some of the lisp-visible functions for + external use. + + * select.c (clean_local_selection_data): Removed. This was + a disgusting function, and previously should have been in + select-x.c in any case. The functionality is now provided + in select-convert-from-integer (select.el). + + * select.c (available-selection-types): Fixed stupidity where + INTEGER and ATOM got added twice. Also add STRING when we see an + extent. + + * select.c (get-selection-internal): Removed symbol stripping. No + longer causes conversion when data comes from the internal cache. + + * select.c (syms_of_select): Added new functions. + + * select-x.c (motif_clipboard_cb): Use select_convert_out. Rewrote + error checking - previously this called abort! + + * select-x.c (x_own_selection): Changed comment. + + * select-x.c (x_handle_selection_request): Use select_convert_out. + Don't mess with selection-alist; it's an internal variable of select.c. + + * select-x.c (x_get_foreign_selection): Use select_convert_in. + + * select-x.c (x_handle_selection_clear): Use get-selection-timestamp, + rather than messing with selection-alist. + + * select-msw.c (mswindows_get_foreign_selection): + Use TO_INTERNAL_FORMAT rather than hacking. + +2000-07-14 Martin Buchholz + + * process-unix.c (unix_open_multicast_group): + (unix_open_multicast_group): Remove useless casts. + +2000-07-13 Martin Buchholz + + * sound.c (Fplay_sound): Fix `unused variable' warning. + + * emacs.c (main): Use correct type for _environ on SCO5. + +2000-07-12 Alastair J. Houghton + + * console.h (own_selection_method): + * console.h (selection_exists_p_method): + * console.h (available_selection_types_method): New. + * console.h (register_selection_data_type_method): New. + * console.h (selection_data_type_name): New. + + * console-msw.h (mswindows_destroy_selection): Declare it. New + function & alist to track GlobalAlloc()'d handles that need + releasing when the clipboard data gets replaced or emptied. + + * event-msw.c (mswindows_wnd_proc): Call it. + + * lisp.h, general.c (Qappend): New symbol representing a + `how-to-add' mode. + + * select.c (own-selection-internal): + * select.c (selection-exists-p): + * select.c (available-selection-types): New. + * select.c (register-selection-data-type): New. + * select.c (selection-data-type-name): New. New functions to deal + with device-specific selection data formats. + * select.c (selection-converter-out-alist): Renamed. + * select.c (selection-converter-in-alist): New. + * select.c (selection-appender-alist): New. Added new alists. + * select.c (syms_of_select, vars_of_select): Added new symbols & + variables. + * select.c (get_local_selection): Split. + * select.c: Removed spurious type checking - selections may now be + of any type, not just strings. + * select.c (own-selection-internal): + + * select.h, select.c (convert_selection): New. Created + convert_selection() function based on get_local_selection(). + * select.h, select.c (QCF_*): New symbols representing mswindows + clipboard formats. + * select.h, select.c (Qreplace_all, Qreplace_existing): New + symbols representing `how-to-add' modes. + + * select-msw.c (x_sym_p): New. + * select-msw.c (symbol_to_ms_cf): New. + * select-msw.c (ms_cf_to_symbol): New. New functions to deal with + symbols & clipboard formats. Can also handle string names. + * select-msw.c (mswindows_own_selection): + * select-msw.c (mswindows_selection_exists_p): + Added `data-type' parameter. Use it. + * select-msw.c (mswindows_available_selection_types): New. + * select-msw.c (mswindows_register_selection_data_type): New. + * select-msw.c (mswindows_selection_data_type_name): New. + * select-msw.c (mswindows_own_selection): + * select-msw.c (mswindows_get_foreign_selection): + * select-msw.c (mswindows_selection_exists_p): Rewrote. + * select-msw.c (console_create_select_mswindows): Added new methods. + * select-msw.c (mswindows_destroy_selection): New. + * select-msw.c (Vhandle_alist): New list. + * select-msw.c (mswindows_own_selection): + + * select-x.c (x_own_selection): + * select-x.c (x_selection_exists_p): + * select-x.c: Added some comments about maybe using new + functionality. + * select-x.c (x_own_selection): + + * specifier.c: Remove definition of Qappend (now in general.c) + * specifier.c (syms_of_specifier): Remove Qappend. + +2000-07-12 Martin Buchholz + + * config.h.in: Add socklen_t. + + * s/decosf4-0.h: No special compiler flags needed or desired. + In particular, undefine _BSD for DEC OSF 4.0. + +2000-07-07 Kirill 'Big K' Katsnelson + + * redisplay-msw.c (msprinter_frame_output_end): Added. + (console_type_create_redisplay_mswindows): Referred the above. + + * frame.c (setup_frame_without_minibuffer): Do not create a + default minibuffer frame on a printer device. + + * frame-msw.c (apply_dc_geometry): Added. + (msprinter_start_page): + (msprinter_init_frame_3): + (msprinter_eject_page): Use it. + + * console-msw.h (struct msprinter_frame): Added pix_left and top, + and removed residual duplex and orientation properties. + +2000-07-11 Martin Buchholz + + * eval.c (function_argcount): Work around a DEC CC compiler bug. + + * unexalpha.c: Remove system prototypes from C sources! + +2000-07-09 Adrian Aichner + + * eval.c: Remove references to M-x edit-options in DEFUNs for + `defvar' and `defconst'. + +2000-07-09 Martin Buchholz + + * config.h.in: Remove SMART_INCLUDE hackery. + + PostgreSQL hacking: + * config.h.in: Don't use SMART_INCLUDE. + + * postgresql.h: Include libpq-fe.h here. Fix typo. + * inline.c: Simply #include "postgresql.h" + * postgresql.c: + - Don't use SMART_INCLUDE + - Use simply "const". + - Use standard doc string conventions. + - Use correct type for result of PQstatus. + +2000-07-09 Martin Buchholz + + * glyphs-x.c (x_xface_instantiate): Fix C++ compilation warnings. + + C++ compilation changes. + * config.h.in (EXTERN_C): Define. + * config.h.in (not): This is also a C++ keyword. + * unexalpha.c (DEFAULT_ENTRY_ADDRESS): Enable C++ compilation. + * cm.c: Use EXTERN_C. + * redisplay-tty.c: Use EXTERN_C. + * sysdep.c: Use EXTERN_C. Remove Gould support. + +2000-07-09 Martin Buchholz + + * general.c: Remove duplicate definition for Qfunction. + +2000-07-08 Ben Wing + + * device-msw.c (msprinter_init_device): + * device-msw.c (sync_printer_with_devmode): + * device-msw.c (handle_devmode_changes): + * device-msw.c (print_dialog_worker): + * device-msw.c (Fmsprinter_apply_settings): + * device-msw.c (hash_devmode): + * device-msw.c (Fmsprinter_settings_despecialize): + use Qmswindows_tstr, not Qctext. + + * vm-limit.c (check_memory_limits): + avoid infinite loop printing warning messages. + +2000-07-05 Craig Lanning + + * Makefile.in.in: Add support for including the Windows resources + when building with the cygwin and mingw targets. + + * buffer.c: from Dan Holmsand, on Windows $PWD is most likely either + not set or not correct. + (directory_is_current_directory): Don't compile for WIN32_NATIVE. + (init_initial_directory): Don't try to use $PWD on the + WIN32_NATIVE target. + + * s\cygwin32.h: + [[Add -mwindows to eliminate console window.]] not required --ben + (HAVE_NATIVE_SOUND): removed; now handled by configure. + (MAIL_USE_POP): removed; now handled by configure. + + * s\mingw32.h: [[Add -mwindows to eliminate console window.]] not in + C_SWITCH_SYSTEM or it will affect lib-src progs. --ben + (HAVE_NATIVE_SOUND): removed; now handled by configure. + (MAIL_USE_POP): removed; now handled by configure. + (ENCAPSULATE_STAT): from Dan Holmsand, added. + (ENCAPSULATE_FSTAT): from Dan Holmsand, added. + (DIRECTORY_SEP): from Dan Holmsand, use lisp variable instead of + constant string. + (HAVE_TIMEVAL): from Dan Holmsand, added; struct timeval is picked + up from via systime.h. + (HAVE_GETPAGESIZE): from Dan Holmsand, added. + (getpagesize): from Dan Holmsand, added. + Added #endif which was left dangling by Ben's mega patch; added + comment to help prevent this in the future. + + * sysdll.c: added #include for WIN32_NATIVE case. + +2000-07-05 Kirill 'Big K' Katsnelson + + * console-msw.h (struct mswindows_device): Removed unnecessary + cached device geometry values. + Added update_tick and an accessor macro. + (Lisp_Devmode): Added lrecord declaration. + (struct msprinter_device): Contain devmode as a Lisp object. + Added mswindows_get_selected_frame_hwnd(); + + * console.h (struct console_methods): Indentation nitpicking. + + * device-msw.c (mswindows_init_device): Do not initialize geometry + cache. Initialize update tick. + (mswindows_device_system_metrics): Ask the device for its geometry. + (global_free_2_maybe): + (devmode_to_hglobal): + (handle_printer_changes): + (ensure_not_printing): + (print_dialog_worker): + (Fmsprinter_print_setup_dialog): + (Fmsprinter_print_dialog): + (plist_get_margin): + (plist_set_margin): + (Fmsprinter_page_setup_dialog): Added functions. + (sync_printer_with_devmode): + (handle_devmode_changes): + (Fmsprinter_get_settings): + (Fmsprinter_select_settings): + (Fmsprinter_apply_settings): + (allocate_devmode): + (Fmsprinter_settings_copy): + (Fmsprinter_settings_despecialize): + (print_devmode): + (finalize_devmode): + (equal_devmode): + (hash_devmode): Added functions + (syms_of_device_mswindows): Init devmode lrecord class. + + * device.h: Added an exfun for find-device. + + * event-msw.c (mswindows_wnd_proc): Do not update the cached + geometry; although, recreate the device compatible DC. + + * frame-msw.c (mswindows_get_selected_frame_hwnd): Added. + (msprinter_init_frame_3): + (msprinter_frame_property): + (msprinter_internal_frame_property_p): + (msprinter_frame_properties): + (msprinter_set_frame_properties): Removed 'orientation and 'duplex + print job properties (will move to device settings). + + * lisp.h: Added symbols. + + * general.c (syms_of_general): Declared them. + + * hash.c (string_hash): Added. + + * lrecord.h (lrecord_type): Added devmode lrecord type. + +2000-07-02 Mike Sperber + + * s/freebsd.h (INTERRUPTIBLE_OPEN): open *is* interruptible on + FreeBSD 4.0. + +2000-06-07 MORIOKA Tomohiko + + * doprnt.c (emacs_doprnt_1): Fix problem with %0XXd for a negative + integer. + +2000-06-07 MORIOKA Tomohiko + + * data.c (Fstring_to_number): Don't recognize floating point if + base is not 10. + +2000-06-22 Martin Buchholz + + * glyphs-widget.c (tab_control_query_geometry): + (widget_query_geometry): + (button_query_geometry): + * glyphs.c (text_query_geometry): + Enforce type correctness. + +2000-06-18 Martin Buchholz + + * s/decosf4-0.h (_etext): Use portable _etext instead of etext. + * s/decosf4-0.h (_edata): Use portable _edata instead of edata. + +2000-06-17 Martin Buchholz + + * s/decosf4-0.h: Never #include "/usr/include/FOO.h" because this + conflicts with gcc's fixincluded version of FOO.h. + + * glyphs.h (image_instance_geometry): Remove trailing `,' + +2000-06-08 Mike Alexander + + (MAX_SHOVE_BUFFER_SIZE): Change to 512 to match stream buffer size + (shove_thread): Don't write the same output twice + (make_ntpipe_output_stream): Increase priority of shove thread + (ntpipe_shove_writer): Call SwitchToThread to give shove thread a + chance to run + (ntpipe_shove_closer): Don't delete the pipe until we're done with + it. + +2000-06-12 Ben Wing + + * s\mingw32.h (sigset): + * s\windowsnt.h (sigset): + rename msw_ to mswindows_ for consistency with general convention. + +2000-06-12 Ben Wing + + * console-msw.c: + * console-msw.c (mswindows_get_console_hwnd): + * console-msw.c (mswindows_ensure_console_allocated): + * console-msw.c (mswindows_hide_console): + * console-msw.c (mswindows_show_console): + * console-msw.c (mswindows_ensure_console_buffered): + * console-msw.c (mswindows_output_console_string): + * console-msw.c (mswindows_windows9x_p): + * console-msw.h: + * device-msw.c (mswindows_get_workspace_coords): + * device-msw.c (mswindows_device_system_metrics): + * dialog-msw.c (mswindows_popup_dialog_box): + * event-msw.c (mswindows_wnd_proc): + * frame-msw.c (mswindows_size_frame_internal): + * menubar-msw.c (mswindows_translate_menu_or_dialog_item): + * menubar-msw.c (displayable_menu_item): + * menubar-msw.c (mswindows_char_is_accelerator): + * nt.c: + * nt.c (mswindows_sigset): + * nt.c (mswindows_sigrelse): + * nt.c (mswindows_sigpause): + * nt.c (mswindows_raise): + * nt.c (timer_proc): + * ntproc.c: + * ntproc.c (find_child_console): + * ntproc.c (sys_kill): + * print.c: + * print.c (std_handle_out_external): + * process-nt.c (find_child_console): + * process-nt.c (send_signal_the_95_way): + * process-nt.c (ensure_console_window_exists): + * process-nt.c (nt_create_process): + * syssignal.h: + rename msw_ to mswindows_ for consistency with general convention. + + * emacs.c: + * dumper.c: + include nt.h, not syswindows.h. + + * nt.c (mswindows_fstat): + * nt.c (mswindows_stat): + prefix mswindows_ instead of attempting to directly override the + library functions. fix declarations. + + * nt.h: + include syswindows.h. move some sysdep.h stuff here. + + * ntheap.h: + include syswindows.h, not . + + * ntplay.c: + clean up headers. + + * sysdep.c: + clean up headers. + + * sysdep.c (sys_fstat): + * sysdep.c (sys_stat): + call mswindows versions when appropriate. + + * sysdep.h: + move mswin decls to nt.h. + + * syswindows.h: + add long comment describing appropriate use of the various windows + headers. + +2000-06-11 Ben Wing + + * device-x.c: Correct doc string for sixth arg of x-get-resource. + +2000-06-10 Ben Wing + + * Makefile.in.in (release): + Correction to make sure xemacs.exe always dumped when correct. + + * alloca.c: + * balloon_help.c: + [[[[3]]]]: Conditionalize on actual problem, not WINDOWSNT. + + * buffer.c (set_buffer_internal): + [[[[2]]]]: Remove HAVE_FEP code. + + * buffer.c (init_initial_directory): + [3]. + + * bytecode.c: + [[[[4]]]]: limits.h standardly included in lisp.h; remove from + individual files. + + * callproc.c: + * callproc.c (call_process_cleanup): + * callproc.c (Fold_call_process_internal): + * callproc.c (child_setup): + * callproc.c (getenv_internal): + * callproc.c (init_callproc): + * callproc.c (vars_of_callproc): + [[[[1]]]]: WINDOWSNT -> WIN32_NATIVE. + __CYGWIN32__ -> CYGWIN. + DOS_NT -> WIN32_NATIVE. + Remove MSDOS support/references, converting to WIN32_NATIVE + where correct. + __MINGW32__ -> MINGW. + Fix windows.h includes. + Remove bogus HAVE_NTGUI. + + * config.h.in: + [2]. + + * console-msw.c: + mswindows_message_outputted added for use in allowing startup + errors on the console to be seen. + + * console-msw.c (msw_ensure_console_allocated): + * console-msw.c (msw_output_console_string): + * console-msw.c (DHEADER): + * console-msw.c (DOPAQUE_DATA): + * console-msw.c (DEVENT): + * console-msw.c (DCONS): + * console-msw.c (DCONSCDR): + * console-msw.c (DSTRING): + * console-msw.c (DVECTOR): + * console-msw.c (DSYMBOL): + * console-msw.c (DSYMNAME): + Fix warnings. + + * console-stream.c (stream_init_console): + Fix text/binary problems. + + * device-msw.c: + * device-msw.c (mswindows_finish_init_device): + * device-msw.c (mswindows_delete_device): + [1]. + + * device.c (handle_asynch_device_change): + [3]. + + * dgif_lib.c: + * dgif_lib.c (DGifOpenFileName): + * dgif_lib.c (DGifOpenFileHandle): + * dgif_lib.c (DGifGetLine): + * dgif_lib.c (DGifGetPixel): + Added config.h/lisp.h, fix up includes. + [1]. + + * dired-msw.c: + [4]. + + * dired.c: + * dired.c (file_name_completion): + * dired.c (Ffile_attributes): + * dired.c (syms_of_dired): + [1]. + + * dumper.c: + * dumper.c (pdump_file_unmap): + * dumper.c (pdump_load): + [1]. + + * editfns.c: + * editfns.c (Ftemp_directory): + * editfns.c (user_login_name): + * editfns.c (Fuser_real_login_name): + * editfns.c (get_home_directory): + [1]. + + * elhash.c (finish_marking_weak_hash_tables): + [[[[5]]]]: Fix GCC warnings. + + * emacs.c: + * emacs.c (mswindows_handle_hardware_exceptions): + * emacs.c (make_arg_list_1): + * emacs.c (main_1): + * emacs.c (Fkill_emacs): + * emacs.c (Fdump_emacs): + [1]. + Fix problems with nested crashes, add long comment. + + * event-Xt.c (init_event_Xt_late): + [1]. + + * event-msw.c: + * event-msw.c (mswindows_dde_callback): + * event-msw.c (mswindows_handle_sticky_modifiers): + * event-msw.c (mswindows_wnd_proc): + [1]. + [5]. + + * events.c (character_to_event): + [1]. + + * fileio.c: + * fileio.c (Ffile_name_directory): + * fileio.c (Ffile_name_nondirectory): + * fileio.c (directory_file_name): + * fileio.c (Fexpand_file_name): + * fileio.c (Fsubstitute_in_file_name): + * fileio.c (Ffile_name_absolute_p): + * fileio.c (check_executable): + * fileio.c (Ffile_readable_p): + * fileio.c (Ffile_accessible_directory_p): + * fileio.c (Ffile_modes): + * fileio.c (Funix_sync): + * fileio.c (vars_of_fileio): + [1]. [4]. + + [[[[7]]]]: Move CORRECT_DIR_SEPS to s\windowsnt.h. + + Expand getdefdir defn. + Fix bogus rename() comment. + + [[[[6]]]]: Fix Windows includes w.r.t. removed nt\inc. Attempt + to use standard XEmacs include files, e.g. sysfile.h, rather + than system-specific includes. + + * fns.c: + * fns.c (Fsubseq): + [5]. [6]. + + * frame.c (vars_of_frame): + [1]. + + * getloadavg.c: + * getloadavg.c (getloadavg): + [1]. [6]. + #ifdef XEMACS not defined on Cygwin. Remove this; no need for it. + (We don't use it elsewhere in the code; just add a comment.) + + * gif_io.c: + [6]. + Add config.h. + + * glyphs-msw.c: + * glyphs-msw.c (mswindows_resource_instantiate): + [1]. + + * glyphs-x.c (x_native_layout_instantiate): + [5]. + + * gui-msw.c (Fmswindows_shell_execute): + [1]. + + * insdel.c: + [4]. + + * lisp.h: + [4]. [5]. + + * lread.c (locate_file_in_directory_mapper): + [1]. + + * lstream.c: + [4]. + + * mem-limits.h: + * mem-limits.h (get_lim_data): + [1]. + + * menubar-msw.c: + [4]. + + * ndir.h: + [1]. + + * nt.c: + * nt.c (getwd): + * nt.c (closedir): + * nt.c (rva_to_section): + * nt.c (mswindows_executable_type): + [1]. [6]. + Fix closedir() defn. + + * nt.h: + [[[[8]]]]: *_OK defs moved to sysfile.h. + + * ntproc.c: + [6]. [7]. + + * objects-x.c: + [4]. + + * print.c: + * print.c (std_handle_out_external): + [1]. [4]. + + * process-nt.c: + * process-nt.c (nt_create_process): + [6]. + try to fix process quoting somewhat. + + * process-unix.c (unix_create_process): + [1]. + + * process.c: + * process.c (vars_of_process): + Add Vnull_device. + + * process.h: + [1]. + + * realpath.c: + * realpath.c (xrealpath): + [1]. + + * redisplay-tty.c (init_tty_for_redisplay): + [3]. + + * redisplay.c: + [4]. [6]. + + * scrollbar-msw.c: + [4]. + + * sheap.c: + * sheap.c (more_static_core): + * sheap.c (report_sheap_usage): + [5]. [6]. + + * signal.c: + * signal.c (alarm_signal): + [1]. [6]. + + * sound.c: + [6]. + + * strftime.c: + * strftime.c (zone_name): + [1]. [5]. + + * symsinit.h (init_sunpro): + [1]. + + * syscommctrl.h: + commctrl.h not in Cygwin b20.1. + + * sysdep.c: + * sysdep.c (endif): + * sysdep.c (sys_subshell): + * sysdep.c (init_baud_rate): + * sysdep.c (emacs_get_tty): + * sysdep.c (emacs_set_tty): + * sysdep.c (tty_init_sys_modes_on_device): + * sysdep.c (init_system_name): + * sysdep.c (sys_open): + * sysdep.c (interruptible_open): + * sysdep.c (sys_fopen): + * sysdep.c (sys_mkdir): + * sysdep.c (sys_rename): + * sysdep.c (get_process_times_1): + [1]. [6]. + + * sysdep.h: + [1]. + + * sysdir.h: + * sysdir.h (DIRENTRY_NONEMPTY): + [1]. [6]. + + * sysdll.c (dll_init): + * sysdll.h: + [1]. + + * sysfile.h: + [1]. [6]. [8]. + added text/binary defs. + + * sysfloat.h: + [1]. + + * sysproc.h: + * sysproc.h (EDESTADDRREQ): + * sysproc.h (poll_fds_for_input): + [1]. [6]. + + * syspwd.h: + [6]. + + * syssignal.h: + [1]. + + * systime.h: + [1]. [6]. + + * systty.h: + [1]. + + * syswindows.h: + [1]. + Always define WIN32_LEAN_AND_MEAN. + + * unexcw.c (unexec): + [5]. + + * unexec.c: + * unexec.c (copy_text_and_data): + * unexec.c (adjust_lnnoptrs): + [1]. + + * unexnt.c: + * unexnt.c (_start): + [1]. + +2000-06-07 Ben Wing + + * mule-mcpath.c, mule-mcpath.h: Removed. Old, crufty code that + was used only as a model. We've long since extracted any useful + logic or code out of this. (I just did an exhaustive search.) + + * s\msdos.h: Removed. + + * s\windows95.h: Removed. + +2000-06-10 Ben Wing + + * s\cygwin32.h: + [1]. [5]. + Don't use extern with fun defs. + + * s\mingw32.h: + [1]. [7]. + Remove nt\inc include. + Remove getdisk, getdefdir. (The former is unused, the latter + expanded in fileio.h.) + + * s\windowsnt.h: + * s\windowsnt.h (WIN32_NATIVE): + * s\windowsnt.h (HAVE_STRCASECMP): + [1]. [7]. + Add long comment about preprocessor changes. + Remove getdisk, getdefdir. (The former is unused, the latter + expanded in fileio.h.) + +2000-06-10 Ben Wing + + * m\arm.h: + * m\delta.h: + * m\intel386.h: + * m\sequent.h: + * m\template.h: + * m\windowsnt.h: + [1]. + Remove bogus/unused NO_SOCK_SIGIO. + +2000-06-08 Hrvoje Niksic + + * lisp.h (set_string_char): Call set_string_byte with a Bufbyte, + not an Emchar. + +2000-06-04 Mike Sperber + + * casetab.c (set_case_table): For `set-standard-case-table', + actually deposit the new case tables where the rest of XEmacs can + see them. + +2000-06-05 Yoshiki Hayashi + + * data.c (Faset): Don't cast XCHAR() to unsigned char. + +2000-06-05 Ben Wing + + * callproc.c (child_setup): Don't do close_load_descs() under + MS Windows. Put in a comment explaining why. + +2000-05-28 Adrian Aichner + + * process-nt.c: Reverting patch "Fixing nt_create_process for MKS + Toolkit shell" which breaks `kill-compilation' on Windows NT + native, retaining STDERR handling improvements. + +2000-06-01 Andreas Jaeger + + * s/s390.h: Support for S390, based on a patch by Martin + Schwidefsky . + +2000-05-30 Andy Piper + + * window.c (allocate_window): + (make_dummy_parent): + (Fset_window_configuration): use new hashtable type. + + * glyphs.h (IMAGE_UNSPECIFIED_GEOMETRY): + (struct image_instantiator_methods): + (struct Lisp_Image_Instance): make instance geometry signed. + + * glyphs.c (instantiate_image_instantiator): + (image_instance_query_geometry): + (image_instance_layout): + (image_instance_layout): + (query_string_geometry): + (text_query_geometry): + (image_instantiate): + (image_instantiate): + (cache_subwindow_instance_in_frame_maybe): + (subwindow_query_geometry): make instance geometry signed. + + * glyphs-widget.c (widget_query_geometry): + (widget_layout): + (button_query_geometry): + (tree_view_query_geometry): + (tab_control_query_geometry): + (layout_query_geometry): + (layout_layout): + (native_layout_layout): make instance geometry signed. + +2000-05-29 Olivier Galibert + + * lisp.h: Add Qfull_assoc symbol and WEAK_LIST_FULL_ASSOC + constant. + + * general.c (syms_of_general): Add Qfull_assoc symbol. + + * data.c (finish_marking_weak_lists): Mark full-assoc lists + correctly. + (decode_weak_list_type): Decode full-assoc type. + (encode_weak_list_type): Encode full-assoc type. + (Fmake_weak_list): Update doc string. + +2000-05-30 Andy Piper + + * elhash.h (hash_table_weakness): new KEY_VALUE weak hashtable. + + * elhash.c (print_hash_table): new KEY_VALUE weak hashtable. + (decode_hash_table_weakness): ditto. + (Fhash_table_weakness): ditto. + (Fhash_table_type): ditto. + (finish_marking_weak_hash_tables): ditto. + (hash_table_weakness_validate): ditto. + (syms_of_elhash): ditto. + 2000-05-28 Martin Buchholz * XEmacs 21.2.34 is released. diff --git a/src/Makefile.in.in b/src/Makefile.in.in index 48716cc..ef3d9da 100644 --- a/src/Makefile.in.in +++ b/src/Makefile.in.in @@ -138,6 +138,10 @@ X11_libs = $(LIBI18N) sheap_obj=sheap.o #endif +#if defined(MINGW) || defined(CYGWIN) +res_obj=xemacs_res.o +#endif + ## -Demacs is needed to make some files produce the correct version ## for use in Emacs. @@ -191,7 +195,7 @@ objs=\ rangetab.o redisplay.o redisplay-output.o regex.o\ search.o select.o $(sheap_obj) signal.o sound.o\ specifier.o strftime.o symbols.o syntax.o sysdep.o\ - undo.o $(x_objs) widget.o window.o + undo.o $(x_objs) widget.o window.o $(res_obj) obj_rtl = $(objs:.o=.c.rtl) @@ -342,6 +346,7 @@ ${DUMP_TARGET}: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files} update-elc. ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \ $(RM) SATISFIED; exit 0; fi; \ if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \ + @$(RM) $@; \ $(RECURSIVE_MAKE) $@; #else @$(RM) $@ @@ -689,6 +694,9 @@ hpplay.o: ${srcdir}/hpplay.c $(CC) -c -Demacs $(sound_cflags) $(cflags) ${srcdir}/hpplay.c #endif /* HAVE_NATIVE_SOUND */ +xemacs_res.o: ${srcdir}/../nt/xemacs.rc + windres --include-dir ${srcdir}/../nt -i ${srcdir}/../nt/xemacs.rc -o $@ + ## System-specific programs to be made. ## ${other_files}, $(objects_system) and $(objects_machine) ## select which of these should be compiled. */ diff --git a/src/alloca.c b/src/alloca.c index d2f7f0c..bbbcae6 100644 --- a/src/alloca.c +++ b/src/alloca.c @@ -86,7 +86,7 @@ void xfree (pointer); # endif #endif -#ifndef WINDOWSNT +#ifndef NULL #define NULL 0 #endif @@ -103,7 +103,7 @@ void xfree (pointer); #ifndef emacs #define malloc xmalloc #endif -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE extern pointer malloc (); #else extern void *malloc(); diff --git a/src/balloon_help.c b/src/balloon_help.c index f0b95ef..5001c7d 100644 --- a/src/balloon_help.c +++ b/src/balloon_help.c @@ -44,7 +44,7 @@ Boston, MA 02111-1307, USA. */ #include "balloon_help.h" -#ifndef WINDOWSNT +#ifndef max #define max(x,y) (x>y?x:y) #endif diff --git a/src/buffer.c b/src/buffer.c index a53efb9..61fef58 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -84,6 +84,7 @@ Boston, MA 02111-1307, USA. */ #ifdef REGION_CACHE_NEEDS_WORK #include "region-cache.h" #endif +#include "select.h" /* for select_notify_buffer_kill */ #include "specifier.h" #include "syntax.h" #include "sysdep.h" /* for getwd */ @@ -1220,15 +1221,13 @@ with `delete-process'. /* Then run the hooks. */ run_hook (Qkill_buffer_hook); -#ifdef HAVE_X_WINDOWS - /* If an X selection was in this buffer, disown it. - We could have done this by simply adding this function to the - kill-buffer-hook, but the user might mess that up. - */ - if (EQ (Vwindow_system, Qx)) - call0 (intern ("xselect-kill-buffer-hook")); - /* #### generalize me! */ -#endif /* HAVE_X_WINDOWS */ + + /* Inform the selection code that a buffer just got killed. + We do this in C because (a) it's faster, and (b) it needs + to access data internal to select.c that can't be seen from + Lisp (so the Lisp code would just call into C anyway. */ + select_notify_buffer_kill (buf); + unbind_to (speccount, Qnil); UNGCPRO; b = XBUFFER (buf); /* Hypothetical relocating GC. */ @@ -1481,20 +1480,6 @@ set_buffer_internal (struct buffer *b) current_buffer = b; invalidate_current_column (); /* invalidate indentation cache */ -#ifdef HAVE_FEP - if (!noninteractive && initialized) - { - extern Lisp_Object Ffep_force_on (), Ffep_force_off (), Ffep_get_mode (); - - old_buf->fep_mode = Ffep_get_mode (); - - if (!NILP (current_buffer->fep_mode)) - Ffep_force_on (); - else - Ffep_force_off (); - } -#endif /* HAVE_FEP */ - if (old_buf) { /* Put the undo list back in the base buffer, so that it appears @@ -3130,6 +3115,7 @@ handled: } } +#ifndef WIN32_NATIVE /* Is PWD another name for `.' ? */ static int directory_is_current_directory (Extbyte *pwd) @@ -3149,23 +3135,29 @@ directory_is_current_directory (Extbyte *pwd) && dotstat.st_dev == pwdstat.st_dev && pwd_internal_len < MAXPATHLEN); } +#endif void init_initial_directory (void) { /* This function can GC */ +#ifndef WIN32_NATIVE Extbyte *pwd; +#endif initial_directory[0] = 0; /* If PWD is accurate, use it instead of calling getcwd. This is faster when PWD is right, and may avoid a fatal error. */ +#ifndef WIN32_NATIVE if ((pwd = (Extbyte *) getenv ("PWD")) != NULL && directory_is_current_directory (pwd)) strcpy (initial_directory, (char *) pwd); - else if (getcwd (initial_directory, MAXPATHLEN) == NULL) - fatal ("`getcwd' failed: %s\n", strerror (errno)); + else +#endif + if (getcwd (initial_directory, MAXPATHLEN) == NULL) + fatal ("`getcwd' failed: %s\n", strerror (errno)); /* Make sure pwd is DIRECTORY_SEP-terminated. Maybe this should really use some standard subroutine @@ -3180,16 +3172,8 @@ init_initial_directory (void) } } - /* XEmacs change: store buffer's default directory - using preferred (i.e. as defined at compile-time) - directory separator. --marcpa */ -#ifdef DOS_NT -#define CORRECT_DIR_SEPS(s) \ - do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \ - else unixtodos_filename (s); \ - } while (0) - - CORRECT_DIR_SEPS(initial_directory); +#ifdef CORRECT_DIR_SEPS + CORRECT_DIR_SEPS (initial_directory); #endif } diff --git a/src/bytecode.c b/src/bytecode.c index b0ff4e0..b31bc4c 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -56,8 +56,6 @@ by Hallvard: #include "opaque.h" #include "syntax.h" -#include - EXFUN (Ffetch_bytecode, 1); Lisp_Object Qbyte_code, Qcompiled_functionp, Qinvalid_byte_code; diff --git a/src/callproc.c b/src/callproc.c index 1ce04b0..59baf47 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -41,19 +41,19 @@ Boston, MA 02111-1307, USA. */ #include "syssignal.h" /* Always include before systty.h */ #include "systty.h" -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #define _P_NOWAIT 1 /* from process.h */ #include "nt.h" #endif -#ifdef DOS_NT +#ifdef WIN32_NATIVE /* When we are starting external processes we need to know whether they take binary input (no conversion) or text input (\n is converted to \r\n). Similarly for output: if newlines are written as \r\n then it's text process output, otherwise it's binary. */ Lisp_Object Vbinary_process_input; Lisp_Object Vbinary_process_output; -#endif /* DOS_NT */ +#endif /* WIN32_NATIVE */ Lisp_Object Vshell_file_name; @@ -74,7 +74,7 @@ const char *synch_process_death; int synch_process_retcode; /* Clean up when exiting Fcall_process_internal. - On MSDOS, delete the temporary file on any kind of termination. + On Windows, delete the temporary file on any kind of termination. On Unix, kill the process and any children on termination by signal. */ /* Nonzero if this is termination due to exit. */ @@ -113,7 +113,7 @@ call_process_cleanup (Lisp_Object fdpid) /* #### "c-G" -- need non-consing Single-key-description */ message ("Waiting for process to die...(type C-g again to kill it instantly)"); -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE { HANDLE pHandle = OpenProcess (PROCESS_ALL_ACCESS, 0, pid); if (pHandle == NULL) @@ -180,7 +180,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you Lisp_Object infile, buffer, current_dir, display, path; int fd[2]; int filefd; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE HANDLE pHandle; #endif int pid; @@ -349,13 +349,13 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you else if (STRINGP (error_file)) { fd_error = open ((const char *) XSTRING_DATA (error_file), -#ifdef DOS_NT +#ifdef WIN32_NATIVE O_WRONLY | O_TRUNC | O_CREAT | O_TEXT, S_IREAD | S_IWRITE -#else /* not DOS_NT */ +#else /* not WIN32_NATIVE */ O_WRONLY | O_TRUNC | O_CREAT | OPEN_BINARY, CREAT_MODE -#endif /* not DOS_NT */ +#endif /* not WIN32_NATIVE */ ); } @@ -369,7 +369,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you } fork_error = Qnil; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE pid = child_setup (filefd, fd1, fd_error, new_argv, (char *) XSTRING_DATA (current_dir)); if (!INTP (buffer)) @@ -389,7 +389,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you /* Close STDERR into the parent process. We no longer need it. */ if (fd_error >= 0) close (fd_error); -#else /* not WINDOWSNT */ +#else /* not WIN32_NATIVE */ pid = fork (); if (pid == 0) @@ -410,7 +410,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you if (fd_error >= 0) close (fd_error); -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ environ = save_environ; @@ -424,7 +424,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you if (!NILP (fork_error)) signal_error (Qfile_error, fork_error); -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE if (pid < 0) { if (fd[0] >= 0) @@ -502,7 +502,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you break; #if 0 -#ifdef DOS_NT +#ifdef WIN32_NATIVE /* Until we pull out of MULE things like make_decoding_input_stream(), we do the following which is less elegant. --marcpa */ @@ -542,7 +542,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you QUIT; /* Wait for it to terminate, unless it already has. */ -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE wait_for_termination (pHandle); #else wait_for_termination (pid); @@ -602,7 +602,7 @@ relocate_fd (int fd, int min) a decent error from within the child, this should be verified as an executable directory by the parent. */ -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE int #else void @@ -612,21 +612,38 @@ child_setup (int in, int out, int err, char **new_argv, { char **env; char *pwd; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE int cpid; HANDLE handles[4]; -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ #ifdef SET_EMACS_PRIORITY if (emacs_priority != 0) nice (- emacs_priority); #endif -#if !defined (NO_SUBPROCESSES) && !defined (WINDOWSNT) + /* Under Windows, we are not in a child process at all, so we should + not close handles inherited from the parent -- we are the parent + and doing so will screw up all manner of things! Similarly, most + of the rest of the cleanup done in this function is not done + under Windows. + + #### This entire child_setup() function is an utter and complete + piece of shit. I would rewrite it, at the very least splitting + out the Windows and non-Windows stuff into two completely + different functions; but instead I'm trying to make it go away + entirely, using the Lisp definition in process.el. What's left + is to fix up the routines in event-msw.c (and in event-Xt.c and + event-tty.c) to allow for stream devices to be handled correctly. + There isn't much to do, in fact, and I'll fix it shortly. That + way, the Lisp definition can be used non-interactively too. */ +#if !defined (NO_SUBPROCESSES) && !defined (WIN32_NATIVE) /* Close Emacs's descriptors that this process should not have. */ close_process_descs (); #endif /* not NO_SUBPROCESSES */ +#ifndef WIN32_NATIVE close_load_descs (); +#endif /* Note that use of alloca is always safe here. It's obvious for systems that do not have true vfork or that have true (stack) alloca. @@ -721,10 +738,10 @@ child_setup (int in, int out, int err, char **new_argv, *new_env = 0; } -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE prepare_standard_handles (in, out, err, handles); set_process_dir (current_dir); -#else /* not WINDOWSNT */ +#else /* not WIN32_NATIVE */ /* Make sure that in, out, and err are not actually already in descriptors zero, one, or two; this could happen if Emacs is started with its standard in, out, or error closed, as might @@ -755,13 +772,13 @@ child_setup (int in, int out, int err, char **new_argv, for (fd=3; fd<=64; fd++) close (fd); } -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ #ifdef vipc something missing here; #endif /* vipc */ -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* Spawn the child. (See ntproc.c:Spawnve). */ cpid = spawnve (_P_NOWAIT, new_argv[0], (const char* const*)new_argv, (const char* const*)env); @@ -770,7 +787,7 @@ child_setup (int in, int out, int err, char **new_argv, report_file_error ("Spawning child process", Qnil); reset_standard_handles (in, out, err, handles); return cpid; -#else /* not WINDOWSNT */ +#else /* not WIN32_NATIVE */ /* execvp does not accept an environment arg so the only way to pass this environment is to set environ. Our caller is responsible for restoring the ambient value of environ. */ @@ -779,7 +796,7 @@ child_setup (int in, int out, int err, char **new_argv, stdout_out ("Can't exec program %s\n", new_argv[0]); _exit (1); -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ } static int @@ -797,12 +814,12 @@ getenv_internal (const Bufbyte *var, if (STRINGP (entry) && XSTRING_LENGTH (entry) > varlen && XSTRING_BYTE (entry, varlen) == '=' -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* NT environment variables are case insensitive. */ && ! memicmp (XSTRING_DATA (entry), var, varlen) -#else /* not WINDOWSNT */ +#else /* not WIN32_NATIVE */ && ! memcmp (XSTRING_DATA (entry), var, varlen) -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ ) { *value = XSTRING_DATA (entry) + (varlen + 1); @@ -875,10 +892,10 @@ init_callproc (void) { /* Initialize shell-file-name from environment variables or best guess. */ -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE const char *shell = egetenv ("COMSPEC"); if (!shell) shell = "\\WINNT\\system32\\cmd.exe"; -#else /* not WINDOWSNT */ +#else /* not WIN32_NATIVE */ const char *shell = egetenv ("SHELL"); if (!shell) shell = "/bin/sh"; #endif @@ -914,7 +931,7 @@ void vars_of_callproc (void) { /* This function can GC */ -#ifdef DOS_NT +#ifdef WIN32_NATIVE DEFVAR_LISP ("binary-process-input", &Vbinary_process_input /* *If non-nil then new subprocesses are assumed to take binary input. */ ); @@ -924,7 +941,7 @@ vars_of_callproc (void) *If non-nil then new subprocesses are assumed to produce binary output. */ ); Vbinary_process_output = Qnil; -#endif /* DOS_NT */ +#endif /* WIN32_NATIVE */ DEFVAR_LISP ("shell-file-name", &Vshell_file_name /* *File name to load inferior shells from. diff --git a/src/casetab.c b/src/casetab.c index af2d31c..2d52a84 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -189,7 +189,8 @@ static Lisp_Object set_case_table (Lisp_Object table, int standard) { Lisp_Object down, up, canon, eqv, tail = table; - struct buffer *buf = current_buffer; + struct buffer *buf = + standard ? XBUFFER(Vbuffer_defaults) : current_buffer; check_case_table (table); @@ -242,19 +243,17 @@ set_case_table (Lisp_Object table, int standard) Vmirror_ascii_eqv_table = make_mirror_trt_table (eqv); #endif } - else - { - buf->downcase_table = down; - buf->upcase_table = up; - buf->case_canon_table = canon; - buf->case_eqv_table = eqv; + buf->downcase_table = down; + buf->upcase_table = up; + buf->case_canon_table = canon; + buf->case_eqv_table = eqv; #ifdef MULE - buf->mirror_downcase_table = make_mirror_trt_table (down); - buf->mirror_upcase_table = make_mirror_trt_table (up); - buf->mirror_case_canon_table = make_mirror_trt_table (canon); - buf->mirror_case_eqv_table = make_mirror_trt_table (eqv); + buf->mirror_downcase_table = make_mirror_trt_table (down); + buf->mirror_upcase_table = make_mirror_trt_table (up); + buf->mirror_case_canon_table = make_mirror_trt_table (canon); + buf->mirror_case_eqv_table = make_mirror_trt_table (eqv); #endif - } + return table; } diff --git a/src/cm.c b/src/cm.c index 3e5fa89..b54bcc5 100644 --- a/src/cm.c +++ b/src/cm.c @@ -33,14 +33,8 @@ Boston, MA 02111-1307, USA. */ #define EXPENSIVE 2000 -#ifdef __cplusplus -extern "C" { -#endif -extern char *tgoto (const char *cm, int hpos, int vpos); -extern void tputs (const char *, int, void (*)(int)); -#ifdef __cplusplus -} -#endif +EXTERN_C char *tgoto (const char *cm, int hpos, int vpos); +EXTERN_C int tputs (const char *, int, void (*)(int)); static void cmgoto_for_real (struct console *c, int row, int col); diff --git a/src/config.h.in b/src/config.h.in index b1db94c..d17cbd4 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -43,33 +43,6 @@ char *alloca (); #endif #endif /* C code */ - -/* Use SMART_INCLUDE to generate #include statements with variable paths. - - #### WARNING: NEVER EVER PUT A SPACE BETWEEN THE ARGUMENTS OF THE - `SMART_INCLUDE' MACRO: when the simple (direct version) is defined, you - would end up with a space in your header filename. - - Since the effect of macro expansion in #include statements is underspecified - in the C standard, and rarely used in source code, different compilers need - different implementations of SMART_INCLUDE (e.g. gcc 2.5.8 and AIX xlc). -*/ -#undef SMART_INCLUDE_INDIRECTIONS - -#if SMART_INCLUDE_INDIRECTIONS == 0 -# define SMART_INCLUDE(path,file) -#elif SMART_INCLUDE_INDIRECTIONS == 1 -# define GLUE_INCLUDE(path,file) <##path##/##file##> -# define SMART_INCLUDE(path,file) GLUE_INCLUDE(path,file) -#elif SMART_INCLUDE_INDIRECTIONS == 2 -# define GLUE_INCLUDE_2(path,file) <##path##/##file##> -# define GLUE_INCLUDE_1(path,file) GLUE_INCLUDE_2(path,file) -# define SMART_INCLUDE(path,file) GLUE_INCLUDE_1(path,file) -#else -# error SMART_INCLUDE_INDIRECTIONS was not properly defined by configure -#endif - - /* Use this to add code in a structured way to FSF-maintained source files so as to make it obvious where XEmacs changes are. */ #define XEMACS 1 @@ -420,16 +393,10 @@ char *alloca (); /* Does the library define ldap_parse_result () ? */ #undef HAVE_LDAP_PARSE_RESULT -/* Do we wish to link against the PostgreSQL RDBMS run-time library? - */ +/* Do we have PostgreSQL RDBMS support? */ #undef HAVE_POSTGRESQL #undef HAVE_POSTGRESQLV7 -#undef POSTGRES_H_PATH -#if defined POSTGRES_H_PATH -# define POSTGRES_INCLUDE(file) SMART_INCLUDE (POSTGRES_H_PATH,file) -#else -# define POSTGRES_INCLUDE(file) -#endif +#undef LIBPQ_FE_H_FILE /* main PostgreSQL header file */ /* Do you have the Xauth library present? This will add some extra functionality to gnuserv. */ @@ -603,6 +570,7 @@ char *alloca (); #undef off_t #undef uid_t #undef gid_t +#undef socklen_t /* If defined, use unions instead of ints. A few systems (DEC Alpha) seem to require this, probably because something with the int @@ -803,10 +771,6 @@ on various systems. */ # define CANNA_PURESIZE 0 #endif /* not CANNA */ -#if (defined (MSDOS) && defined (FEPCTRL)) || (defined (WIN32) && defined (USE_IME)) -#define HAVE_FEP -#endif - #if defined (HAVE_SOCKS) && !defined (DO_NOT_SOCKSIFY) #define accept Raccept #define bind Rbind @@ -845,13 +809,20 @@ on various systems. */ # define INLINE_HEADER inline extern #endif -#if defined (__cplusplus) && !defined (NOT_C_CODE) +#ifndef NOT_C_CODE /* Actually means C or C++ */ +# if defined (__cplusplus) /* Avoid C++ keywords used as ordinary C identifiers */ -#define class c_class -#define new c_new -#define this c_this -#define catch c_catch -#endif /* C++ */ +# define class c_class +# define new c_new +# define this c_this +# define catch c_catch +# define not c_not + +# define EXTERN_C extern "C" +# else /* C code */ +# define EXTERN_C extern +# endif +#endif /* C or C++ */ /* Strictly speaking, only int or unsigned int are valid types in a bitfield. In practice, we would like to use enums as bitfields. diff --git a/src/console-msw.c b/src/console-msw.c index df68e17..3cd13ac 100644 --- a/src/console-msw.c +++ b/src/console-msw.c @@ -83,7 +83,7 @@ mswindows_initially_selected_for_input (struct console *con) return 1; } -static HWND msw_console_hwnd = 0; +static HWND mswindows_console_hwnd = 0; #define KLUDGE_BUFSIZE 1024 /* buffer size for console window titles */ @@ -125,15 +125,15 @@ GetConsoleHwnd (void) } HWND -msw_get_console_hwnd (void) +mswindows_get_console_hwnd (void) { - if (!msw_console_hwnd) - msw_console_hwnd = GetConsoleHwnd (); - return msw_console_hwnd; + if (!mswindows_console_hwnd) + mswindows_console_hwnd = GetConsoleHwnd (); + return mswindows_console_hwnd; } -int -msw_ensure_console_allocated (void) +static int +mswindows_ensure_console_allocated (void) { HWND fgwin = GetForegroundWindow (); /* stupid mswin api won't let you create the console window @@ -174,15 +174,15 @@ mswindows_canonicalize_device_connection (Lisp_Object connection, } void -msw_hide_console (void) +mswindows_hide_console (void) { - ShowWindow (msw_get_console_hwnd (), SW_HIDE); + ShowWindow (mswindows_get_console_hwnd (), SW_HIDE); } void -msw_show_console (void) +mswindows_show_console (void) { - HWND hwnd = msw_get_console_hwnd (); + HWND hwnd = mswindows_get_console_hwnd (); ShowWindow (hwnd, SW_SHOWNA); /* I tried to raise the window to the top without activating @@ -195,41 +195,44 @@ msw_show_console (void) SWP_NOACTIVATE); } -static int msw_console_buffered = 0; -HANDLE msw_console_buffer; +static int mswindows_console_buffered = 0; +HANDLE mswindows_console_buffer; static void -msw_ensure_console_buffered (void) +mswindows_ensure_console_buffered (void) { - if (!msw_console_buffered) + if (!mswindows_console_buffered) { COORD new_size; new_size.X = 80; new_size.Y = 1000; - msw_ensure_console_allocated (); - msw_console_buffer = + mswindows_ensure_console_allocated (); + mswindows_console_buffer = CreateConsoleScreenBuffer (GENERIC_WRITE, 0, NULL, CONSOLE_TEXTMODE_BUFFER, NULL); - SetConsoleScreenBufferSize (msw_console_buffer, new_size); - SetConsoleActiveScreenBuffer (msw_console_buffer); - msw_console_buffered = 1; + SetConsoleScreenBufferSize (mswindows_console_buffer, new_size); + SetConsoleActiveScreenBuffer (mswindows_console_buffer); + mswindows_console_buffered = 1; } } +int mswindows_message_outputted; + int -msw_output_console_string (CONST Extbyte *str, Extcount len) +mswindows_output_console_string (CONST Extbyte *str, Extcount len) { DWORD num_written; - msw_ensure_console_buffered (); - msw_show_console (); - return WriteConsole (msw_console_buffer, str, len, &num_written, NULL); + mswindows_message_outputted = 1; + mswindows_ensure_console_buffered (); + mswindows_show_console (); + return WriteConsole (mswindows_console_buffer, str, len, &num_written, NULL); } /* Determine if running on Windows 9x and not NT */ int -msw_windows9x_p (void) +mswindows_windows9x_p (void) { return GetVersion () & 0x80000000; } @@ -242,54 +245,63 @@ msw_windows9x_p (void) * Intended for use in the MSVC "Watch" window which doesn't like * the aborts that the error_check_foo() functions can make. */ +struct lrecord_header *DHEADER (Lisp_Object obj); struct lrecord_header * DHEADER (Lisp_Object obj) { return LRECORDP (obj) ? XRECORD_LHEADER (obj) : NULL; } +void *DOPAQUE_DATA (Lisp_Object obj); void * DOPAQUE_DATA (Lisp_Object obj) { return OPAQUEP (obj) ? OPAQUE_DATA (XOPAQUE (obj)) : NULL; } +Lisp_Event *DEVENT (Lisp_Object obj); Lisp_Event * DEVENT (Lisp_Object obj) { return EVENTP (obj) ? XEVENT (obj) : NULL; } +Lisp_Cons *DCONS (Lisp_Object obj); Lisp_Cons * DCONS (Lisp_Object obj) { return CONSP (obj) ? XCONS (obj) : NULL; } +Lisp_Cons *DCONSCDR (Lisp_Object obj); Lisp_Cons * DCONSCDR (Lisp_Object obj) { return (CONSP (obj) && CONSP (XCDR (obj))) ? XCONS (XCDR (obj)) : 0; } +Bufbyte *DSTRING (Lisp_Object obj); Bufbyte * DSTRING (Lisp_Object obj) { return STRINGP (obj) ? XSTRING_DATA (obj) : NULL; } +Lisp_Vector *DVECTOR (Lisp_Object obj); Lisp_Vector * DVECTOR (Lisp_Object obj) { return VECTORP (obj) ? XVECTOR (obj) : NULL; } +Lisp_Symbol *DSYMBOL (Lisp_Object obj); Lisp_Symbol * DSYMBOL (Lisp_Object obj) { return SYMBOLP (obj) ? XSYMBOL (obj) : NULL; } +Bufbyte *DSYMNAME (Lisp_Object obj); Bufbyte * DSYMNAME (Lisp_Object obj) { diff --git a/src/console-msw.h b/src/console-msw.h index eacfbf5..a2eaca5 100644 --- a/src/console-msw.h +++ b/src/console-msw.h @@ -46,7 +46,7 @@ Boston, MA 02111-1307, USA. */ #define XEMACS_CONTROL_CLASS "XEmacsControl" /* - * Console + * Consoles */ DECLARE_CONSOLE_TYPE (mswindows); @@ -59,43 +59,64 @@ struct mswindows_console DECLARE_CONSOLE_TYPE (msprinter); /* - * Device + * Printer settings, aka devmode + */ + +typedef struct Lisp_Devmode +{ + struct lcrecord_header header; + + /* Pointer to the DEVMODE structure */ + DEVMODE* devmode; + + /* Full printer name. It can be longer than devmode->dmDeviceName + can accomodate, so need to keep it separately */ + char* printer_name; + + /* Printer device this object is currently selected in, or Qnil + if not selected */ + Lisp_Object device; + +} Lisp_Devmode; + + +DECLARE_LRECORD (devmode, Lisp_Devmode); +#define XDEVMODE(x) XRECORD (x, devmode, Lisp_Devmode) +#define XSETDEVMODE(x, p) XSETRECORD (x, p, devmode) +#define DEVMODEP(x) RECORDP (x, devmode) +#define CHECK_DEVMODE(x) CHECK_RECORD (x, devmode) +#define CONCHECK_DEVMODE(x) CONCHECK_RECORD (x, devmode) + +#define DEVMODE_SIZE(dm) ((dm)->dmSize + (dm)->dmDriverExtra) +#define XDEVMODE_SIZE(x) ((x)->devmode ? DEVMODE_SIZE((x)->devmode) : 0) + +/* + * Devices */ #define MSW_FONTSIZE (LF_FACESIZE*4+12) struct mswindows_device { - int logpixelsx, logpixelsy; - int planes, cells; - int horzres, vertres; /* Size in pixels */ - int horzsize, vertsize; /* Size in mm */ - int bitspixel; Lisp_Object fontlist; /* List of strings, device fonts */ HDC hcdc; /* Compatible DC */ + DWORD update_tick; /* Used when device is modified through + Windows mwssages, see WM_DISPLAYCHANGE + in event-msw.c */ }; #define DEVICE_MSWINDOWS_DATA(d) DEVICE_TYPE_DATA (d, mswindows) -#define DEVICE_MSWINDOWS_LOGPIXELSX(d) (DEVICE_MSWINDOWS_DATA (d)->logpixelsx) -#define DEVICE_MSWINDOWS_LOGPIXELSY(d) (DEVICE_MSWINDOWS_DATA (d)->logpixelsy) -#define DEVICE_MSWINDOWS_PLANES(d) (DEVICE_MSWINDOWS_DATA (d)->planes) -#define DEVICE_MSWINDOWS_CELLS(d) (DEVICE_MSWINDOWS_DATA (d)->cells) -#define DEVICE_MSWINDOWS_HORZRES(d) (DEVICE_MSWINDOWS_DATA (d)->horzres) -#define DEVICE_MSWINDOWS_VERTRES(d) (DEVICE_MSWINDOWS_DATA (d)->vertres) -#define DEVICE_MSWINDOWS_HORZSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->horzsize) -#define DEVICE_MSWINDOWS_VERTSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->vertsize) -#define DEVICE_MSWINDOWS_BITSPIXEL(d) (DEVICE_MSWINDOWS_DATA (d)->bitspixel) -#define DEVICE_MSWINDOWS_FONTLIST(d) (DEVICE_MSWINDOWS_DATA (d)->fontlist) -#define DEVICE_MSWINDOWS_HCDC(d) (DEVICE_MSWINDOWS_DATA (d)->hcdc) +#define DEVICE_MSWINDOWS_FONTLIST(d) (DEVICE_MSWINDOWS_DATA (d)->fontlist) +#define DEVICE_MSWINDOWS_HCDC(d) (DEVICE_MSWINDOWS_DATA (d)->hcdc) +#define DEVICE_MSWINDOWS_UPDATE_TICK(d) (DEVICE_MSWINDOWS_DATA (d)->update_tick) struct msprinter_device { HDC hdc, hcdc; /* Printer and the comp. DCs */ HANDLE hprinter; - Lisp_Object fontlist; char* name; - DEVMODE *devmode, *devmode_mirror; - size_t devmode_size; + Lisp_Object devmode; + Lisp_Object fontlist; }; #define DEVICE_MSPRINTER_DATA(d) DEVICE_TYPE_DATA (d, msprinter) @@ -105,20 +126,12 @@ struct msprinter_device #define DEVICE_MSPRINTER_FONTLIST(d) (DEVICE_MSPRINTER_DATA (d)->fontlist) #define DEVICE_MSPRINTER_NAME(d) (DEVICE_MSPRINTER_DATA (d)->name) #define DEVICE_MSPRINTER_DEVMODE(d) (DEVICE_MSPRINTER_DATA (d)->devmode) -#define DEVICE_MSPRINTER_DEVMODE_MIRROR(d) \ - (DEVICE_MSPRINTER_DATA (d)->devmode_mirror) -#define DEVICE_MSPRINTER_DEVMODE_SIZE(d) \ - (DEVICE_MSPRINTER_DATA (d)->devmode_size) #define CONSOLE_TYPESYM_MSPRINTER_P(typesym) EQ (typesym, Qmsprinter) #define DEVICE_MSPRINTER_P(dev) CONSOLE_TYPESYM_MSPRINTER_P (DEVICE_TYPE (dev)) #define CHECK_MSPRINTER_DEVICE(z) CHECK_DEVICE_TYPE (z, msprinter) #define CONCHECK_MSPRINTER_DEVICE(z) CONCHECK_DEVICE_TYPE (z, msprinter) -/* Printer functions in device-msw.c */ -DEVMODE* msprinter_get_devmode_copy (struct device *d); -void msprinter_apply_devmode (struct device *d, DEVMODE *devmode); - /* Printer functions in frame-msw.c */ void msprinter_start_page (struct frame *f); @@ -141,7 +154,7 @@ void msprinter_start_page (struct frame *f); } while (0) /* - * Frame + * Frames */ typedef struct { @@ -243,7 +256,7 @@ struct msprinter_frame int left_margin, top_margin, /* All in twips */ right_margin, bottom_margin; int charheight, charwidth; /* As per proplist or -1 if not gven */ - Lisp_Object orientation, duplex; /* nil for printer's default */ + int pix_left, pix_top; /* Calculated in init_frame_*, VP offset */ int job_started : 1; int page_started : 1; }; @@ -255,10 +268,10 @@ struct msprinter_frame #define FRAME_MSPRINTER_BOTTOM_MARGIN(f) (FRAME_MSPRINTER_DATA (f)->bottom_margin) #define FRAME_MSPRINTER_JOB_STARTED(f) (FRAME_MSPRINTER_DATA (f)->job_started) #define FRAME_MSPRINTER_PAGE_STARTED(f) (FRAME_MSPRINTER_DATA (f)->page_started) -#define FRAME_MSPRINTER_ORIENTATION(f) (FRAME_MSPRINTER_DATA (f)->orientation) -#define FRAME_MSPRINTER_DUPLEX(f) (FRAME_MSPRINTER_DATA (f)->duplex) #define FRAME_MSPRINTER_CHARWIDTH(f) (FRAME_MSPRINTER_DATA (f)->charheight) #define FRAME_MSPRINTER_CHARHEIGHT(f) (FRAME_MSPRINTER_DATA (f)->charwidth) +#define FRAME_MSPRINTER_PIXLEFT(f) (FRAME_MSPRINTER_DATA (f)->pix_left) +#define FRAME_MSPRINTER_PIXTOP(f) (FRAME_MSPRINTER_DATA (f)->pix_top) /* * Events @@ -286,6 +299,7 @@ LRESULT WINAPI mswindows_control_wnd_proc (HWND hwnd, void mswindows_redraw_exposed_area (struct frame *f, int x, int y, int width, int height); void mswindows_size_frame_internal (struct frame* f, XEMACS_RECT_WH* dest); +HWND mswindows_get_selected_frame_hwnd (void); void mswindows_enqueue_magic_event (HWND hwnd, UINT msg); /* win32 DDE management library */ @@ -325,17 +339,17 @@ HANDLE get_nt_process_handle (Lisp_Process *p); extern Lisp_Object Vmswindows_frame_being_created; extern Lisp_Object mswindows_frame_being_created; -void msw_get_workspace_coords (RECT *rc); +void mswindows_get_workspace_coords (RECT *rc); -HWND msw_get_console_hwnd (void); -void msw_hide_console (void); -void msw_show_console (void); -int msw_output_console_string (CONST Extbyte *str, Extcount len); +HWND mswindows_get_console_hwnd (void); +void mswindows_hide_console (void); +void mswindows_show_console (void); +int mswindows_output_console_string (CONST Extbyte *str, Extcount len); Lisp_Object mswindows_enumerate_fonts (HDC hdc); -int msw_char_is_accelerator (struct frame *f, Emchar ch); -Bytecount msw_translate_menu_or_dialog_item (Bufbyte *item, Bytecount len, +int mswindows_char_is_accelerator (struct frame *f, Emchar ch); +Bytecount mswindows_translate_menu_or_dialog_item (Bufbyte *item, Bytecount len, Bytecount maxlen, Emchar *accel, Lisp_Object error_name); @@ -348,7 +362,7 @@ Lisp_Object mswindows_handle_toolbar_wm_command (struct frame* f, Lisp_Object mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, LPARAM id); -int msw_windows9x_p (void); +int mswindows_windows9x_p (void); void mswindows_output_last_error (char *frob); diff --git a/src/console-stream.c b/src/console-stream.c index 75d169a..e49ad88 100644 --- a/src/console-stream.c +++ b/src/console-stream.c @@ -69,7 +69,9 @@ stream_init_console (struct console *con, Lisp_Object params) { CHECK_STRING (tty); stream_con->in = stream_con->out = stream_con->err = - fopen ((char *) XSTRING_DATA (tty), "r+"); + /* #### We don't currently do coding-system translation on + this descriptor. */ + fopen ((char *) XSTRING_DATA (tty), READ_PLUS_TEXT); if (!stream_con->in) error ("Unable to open tty %s", XSTRING_DATA (tty)); } diff --git a/src/console.h b/src/console.h index 7c33839..e015b8f 100644 --- a/src/console.h +++ b/src/console.h @@ -93,13 +93,22 @@ struct console_methods void (*delete_device_method) (struct device *); void (*mark_device_method) (struct device *); void (*asynch_device_change_method) (void); - Lisp_Object (*device_system_metrics_method) (struct device *, enum device_metrics); + Lisp_Object (*device_system_metrics_method) (struct device *, + enum device_metrics); unsigned int (*device_implementation_flags_method) (void); - Lisp_Object (*own_selection_method)(Lisp_Object selection_name, Lisp_Object selection_value); - void (*disown_selection_method)(Lisp_Object selection_name, Lisp_Object timeval); - Lisp_Object (*get_foreign_selection_method) (Lisp_Object selection_symbol, - Lisp_Object target_type); - Lisp_Object (*selection_exists_p_method)(Lisp_Object selection_name); + Lisp_Object (*own_selection_method)(Lisp_Object selection_name, + Lisp_Object selection_value, + Lisp_Object how_to_add, + Lisp_Object selection_type); + void (*disown_selection_method)(Lisp_Object selection_name, + Lisp_Object timeval); + Lisp_Object (*get_foreign_selection_method) (Lisp_Object selection_symbol, + Lisp_Object target_type); + Lisp_Object (*selection_exists_p_method)(Lisp_Object selection_name, + Lisp_Object selection_type); + Lisp_Object (*available_selection_types_method)(Lisp_Object selection_name); + Lisp_Object (*register_selection_data_type_method)(Lisp_Object type_name); + Lisp_Object (*selection_data_type_name_method)(Lisp_Object type); /* frame methods */ Lisp_Object *device_specific_frame_props; diff --git a/src/data.c b/src/data.c index d4792d2..79f5607 100644 --- a/src/data.c +++ b/src/data.c @@ -770,7 +770,7 @@ ARRAY may be a vector, bit vector, or string. INDEX starts at 0. { CHECK_CHAR_COERCE_INT (newval); if (idx >= XSTRING_CHAR_LENGTH (array)) goto range_error; - set_string_char (XSTRING (array), idx, (unsigned char) XCHAR (newval)); + set_string_char (XSTRING (array), idx, XCHAR (newval)); bump_string_modiff (array); } else @@ -1744,6 +1744,23 @@ finish_marking_weak_lists (void) } break; + case WEAK_LIST_FULL_ASSOC: + if (!CONSP (elem)) + { + /* just leave bogus elements there */ + need_to_mark_cons = 1; + need_to_mark_elem = 1; + } + else if (marked_p (XCAR (elem)) || + marked_p (XCDR (elem))) + { + need_to_mark_cons = 1; + /* We still need to mark elem and XCAR (elem); + marking elem does both */ + need_to_mark_elem = 1; + } + break; + default: abort (); } @@ -1884,6 +1901,7 @@ decode_weak_list_type (Lisp_Object symbol) if (EQ (symbol, Qold_assoc)) return WEAK_LIST_ASSOC; /* EBOLA ALERT! */ if (EQ (symbol, Qkey_assoc)) return WEAK_LIST_KEY_ASSOC; if (EQ (symbol, Qvalue_assoc)) return WEAK_LIST_VALUE_ASSOC; + if (EQ (symbol, Qfull_assoc)) return WEAK_LIST_FULL_ASSOC; signal_simple_error ("Invalid weak list type", symbol); return WEAK_LIST_SIMPLE; /* not reached */ @@ -1898,6 +1916,7 @@ encode_weak_list_type (enum weak_list_type type) case WEAK_LIST_ASSOC: return Qassoc; case WEAK_LIST_KEY_ASSOC: return Qkey_assoc; case WEAK_LIST_VALUE_ASSOC: return Qvalue_assoc; + case WEAK_LIST_FULL_ASSOC: return Qfull_assoc; default: abort (); } @@ -1936,6 +1955,8 @@ to `simple'. Recognized types are and the car is not pointed to. `value-assoc' Objects in the list disappear if they are conses and the cdr is not pointed to. +`full-assoc' Objects in the list disappear if they are conses + and neither the car nor the cdr is pointed to. */ (type)) { diff --git a/src/device-msw.c b/src/device-msw.c index 76ef314..2d822a6 100644 --- a/src/device-msw.c +++ b/src/device-msw.c @@ -40,7 +40,11 @@ Boston, MA 02111-1307, USA. */ #include "frame.h" #include "sysdep.h" -#if !(defined (__CYGWIN32__) || defined(__MINGW32__)) +/* #### Andy, these includes might break cygwin compilation - kkm*/ +#include +#include + +#if !(defined (CYGWIN) || defined(MINGW)) # include /* For CoInitialize */ #endif @@ -62,7 +66,10 @@ Lisp_Object Vmswindows_downcase_file_names; Lisp_Object Vmswindows_get_true_file_attributes; Lisp_Object Qinit_pre_mswindows_win, Qinit_post_mswindows_win; +Lisp_Object Qdevmodep; +static Lisp_Object allocate_devmode (DEVMODE* src_devmode, int do_copy, + char* src_name, struct device *d); /************************************************************************/ /* helpers */ @@ -99,7 +106,6 @@ build_devicecaps_cons (HDC hdc, int index1, int index2) index2 < 0 ? Qnil : make_int (GetDeviceCaps (hdc, index2))); } - /************************************************************************/ /* display methods */ @@ -119,20 +125,9 @@ mswindows_init_device (struct device *d, Lisp_Object props) d->device_data = xnew_and_zero (struct mswindows_device); hdc = CreateCompatibleDC (NULL); assert (hdc!=NULL); - DEVICE_MSWINDOWS_LOGPIXELSX(d) = GetDeviceCaps(hdc, LOGPIXELSX); - DEVICE_MSWINDOWS_LOGPIXELSY(d) = GetDeviceCaps(hdc, LOGPIXELSY); - DEVICE_MSWINDOWS_PLANES(d) = GetDeviceCaps(hdc, PLANES); - /* #### SIZEPALETTE only valid if RC_PALETTE bit set in RASTERCAPS, - what should we return for a non-palette-based device? */ - DEVICE_MSWINDOWS_CELLS(d) = GetDeviceCaps(hdc, SIZEPALETTE); - DEVICE_MSWINDOWS_HORZRES(d) = GetDeviceCaps(hdc, HORZRES); - DEVICE_MSWINDOWS_VERTRES(d) = GetDeviceCaps(hdc, VERTRES); - DEVICE_MSWINDOWS_HORZSIZE(d) = GetDeviceCaps(hdc, HORZSIZE); - DEVICE_MSWINDOWS_VERTSIZE(d) = GetDeviceCaps(hdc, VERTSIZE); - DEVICE_MSWINDOWS_BITSPIXEL(d) = GetDeviceCaps(hdc, BITSPIXEL); - DEVICE_MSWINDOWS_FONTLIST (d) = mswindows_enumerate_fonts (hdc); - DEVICE_MSWINDOWS_HCDC(d) = hdc; + DEVICE_MSWINDOWS_FONTLIST (d) = mswindows_enumerate_fonts (hdc); + DEVICE_MSWINDOWS_UPDATE_TICK (d) = GetTickCount (); /* Register the main window class */ wc.cbSize = sizeof (WNDCLASSEX); @@ -176,7 +171,7 @@ mswindows_finish_init_device (struct device *d, Lisp_Object props) /* Initialize DDE management library and our related globals. We execute a * dde Open("file") by simulating a drop, so this depends on dnd support. */ #ifdef HAVE_DRAGNDROP -# if !(defined(__CYGWIN32__) || defined(__MINGW32__)) +# if !(defined(CYGWIN) || defined(MINGW)) CoInitialize (NULL); # endif @@ -206,17 +201,17 @@ mswindows_delete_device (struct device *d) DdeFreeStringHandle (mswindows_dde_mlid, mswindows_dde_service); DdeUninitialize (mswindows_dde_mlid); -# if !(defined(__CYGWIN32__) || defined(__MINGW32__)) +# if !(defined(CYGWIN) || defined(MINGW)) CoUninitialize (); # endif #endif DeleteDC (DEVICE_MSWINDOWS_HCDC(d)); - free (d->device_data); + xfree (d->device_data); } void -msw_get_workspace_coords (RECT *rc) +mswindows_get_workspace_coords (RECT *rc) { SystemParametersInfo (SPI_GETWORKAREA, 0, rc, 0); } @@ -231,28 +226,32 @@ static Lisp_Object mswindows_device_system_metrics (struct device *d, enum device_metrics m) { + const HDC hdc = DEVICE_MSWINDOWS_HCDC(d); + switch (m) { case DM_size_device: - return Fcons (make_int (DEVICE_MSWINDOWS_HORZRES(d)), - make_int (DEVICE_MSWINDOWS_VERTRES(d))); + return Fcons (make_int (GetDeviceCaps (hdc, HORZRES)), + make_int (GetDeviceCaps (hdc, VERTRES))); break; case DM_device_dpi: - return Fcons (make_int (DEVICE_MSWINDOWS_LOGPIXELSX(d)), - make_int (DEVICE_MSWINDOWS_LOGPIXELSY(d))); + return Fcons (make_int (GetDeviceCaps (hdc, LOGPIXELSX)), + make_int (GetDeviceCaps (hdc, LOGPIXELSY))); break; case DM_size_device_mm: - return Fcons (make_int (DEVICE_MSWINDOWS_HORZSIZE(d)), - make_int (DEVICE_MSWINDOWS_VERTSIZE(d))); + return Fcons (make_int (GetDeviceCaps (hdc, HORZSIZE)), + make_int (GetDeviceCaps (hdc, VERTSIZE))); break; case DM_num_bit_planes: /* this is what X means by bitplanes therefore we ought to be consistent. num planes is always 1 under mswindows and therefore useless */ - return make_int (DEVICE_MSWINDOWS_BITSPIXEL(d)); + return make_int (GetDeviceCaps (hdc, BITSPIXEL)); break; case DM_num_color_cells: - return make_int (DEVICE_MSWINDOWS_CELLS(d)); + /* #### SIZEPALETTE only valid if RC_PALETTE bit set in RASTERCAPS, + what should we return for a non-palette-based device? */ + return make_int (GetDeviceCaps (hdc, SIZEPALETTE)); break; /*** Colors ***/ @@ -291,7 +290,7 @@ mswindows_device_system_metrics (struct device *d, case DM_size_workspace: { RECT rc; - msw_get_workspace_coords (&rc); + mswindows_get_workspace_coords (&rc); return Fcons (make_int (rc.right - rc.left), make_int (rc.bottom - rc.top)); } @@ -299,7 +298,7 @@ mswindows_device_system_metrics (struct device *d, case DM_offset_workspace: { RECT rc; - msw_get_workspace_coords (&rc); + mswindows_get_workspace_coords (&rc); return Fcons (make_int (rc.left), make_int (rc.top)); } @@ -335,7 +334,7 @@ mswindows_device_implementation_flags (void) /************************************************************************/ -/* printer methods */ +/* printer helpers */ /************************************************************************/ static void @@ -344,58 +343,119 @@ signal_open_printer_error (struct device *d) signal_simple_error ("Failed to open printer", DEVICE_CONNECTION (d)); } -static void -msprinter_init_device (struct device *d, Lisp_Object props) -{ - char* printer_name; - - DEVICE_INFD (d) = DEVICE_OUTFD (d) = -1; - - CHECK_STRING (DEVICE_CONNECTION (d)); - - TO_EXTERNAL_FORMAT (LISP_STRING, DEVICE_CONNECTION (d), - C_STRING_ALLOCA, printer_name, - Qctext); - - d->device_data = xnew_and_zero (struct msprinter_device); +/* Helper function */ +static int +msprinter_init_device_internal (struct device *d, char* printer_name) +{ DEVICE_MSPRINTER_NAME(d) = xstrdup (printer_name); if (!OpenPrinter (printer_name, &DEVICE_MSPRINTER_HPRINTER (d), NULL)) { DEVICE_MSPRINTER_HPRINTER (d) = NULL; - signal_open_printer_error (d); + return 0; } DEVICE_MSPRINTER_HDC (d) = CreateDC ("WINSPOOL", printer_name, NULL, NULL); if (DEVICE_MSPRINTER_HDC (d) == NULL) - signal_open_printer_error (d); + return 0; DEVICE_MSPRINTER_HCDC(d) = CreateCompatibleDC (DEVICE_MSPRINTER_HDC (d)); - /* Determinie DEVMODE size and store the default DEVMODE */ - DEVICE_MSPRINTER_DEVMODE_SIZE(d) = - DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER(d), - printer_name, NULL, NULL, 0); - if (DEVICE_MSPRINTER_DEVMODE_SIZE(d) <= 0) - signal_open_printer_error (d); + DEVICE_CLASS (d) = (GetDeviceCaps (DEVICE_MSPRINTER_HDC (d), BITSPIXEL) + * GetDeviceCaps (DEVICE_MSPRINTER_HDC (d), PLANES) + > 1) ? Qcolor : Qmono; + return 1; +} - DEVICE_MSPRINTER_DEVMODE(d) = - (DEVMODE*) xmalloc (DEVICE_MSPRINTER_DEVMODE_SIZE(d)); - DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER(d), - printer_name, DEVICE_MSPRINTER_DEVMODE(d), - NULL, DM_OUT_BUFFER); +static void +msprinter_delete_device_internal (struct device *d) +{ + if (DEVICE_MSPRINTER_HPRINTER (d)) + ClosePrinter (DEVICE_MSPRINTER_HPRINTER (d)); + if (DEVICE_MSPRINTER_HDC (d)) + DeleteDC (DEVICE_MSPRINTER_HDC (d)); + if (DEVICE_MSPRINTER_HCDC (d)) + DeleteDC (DEVICE_MSPRINTER_HCDC (d)); + if (DEVICE_MSPRINTER_NAME (d)) + xfree (DEVICE_MSPRINTER_NAME (d)); + + DEVICE_MSPRINTER_FONTLIST (d) = Qnil; +} + +static int msprinter_reinit_device (struct device *d, char* devname) +{ + msprinter_delete_device_internal (d); + return msprinter_init_device_internal (d, devname); +} + + +/************************************************************************/ +/* printer methods */ +/************************************************************************/ + +static void +msprinter_init_device (struct device *d, Lisp_Object props) +{ + char* printer_name; + DEVMODE *pdm; + size_t dm_size; + + d->device_data = xnew_and_zero (struct msprinter_device); + + DEVICE_INFD (d) = DEVICE_OUTFD (d) = -1; + DEVICE_MSPRINTER_DEVMODE(d) = Qnil; /* We do not use printer fon list as we do with the display device. Rather, we allow GDI to pick the closest match to the display font. */ DEVICE_MSPRINTER_FONTLIST (d) = Qnil; - DEVICE_CLASS (d) = (GetDeviceCaps (DEVICE_MSPRINTER_HDC (d), BITSPIXEL) - * GetDeviceCaps (DEVICE_MSPRINTER_HDC (d), PLANES) - > 1) ? Qcolor : Qmono; + CHECK_STRING (DEVICE_CONNECTION (d)); + + TO_EXTERNAL_FORMAT (LISP_STRING, DEVICE_CONNECTION (d), + C_STRING_ALLOCA, printer_name, + Qmswindows_tstr); + + if (!msprinter_init_device_internal (d, printer_name)) + signal_open_printer_error (d); + + /* Determinie DEVMODE size and store the default DEVMODE */ + dm_size = DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER(d), + printer_name, NULL, NULL, 0); + if (dm_size <= 0) + signal_open_printer_error (d); + + pdm = (DEVMODE*) xmalloc (dm_size); + DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER(d), + printer_name, pdm, + NULL, DM_OUT_BUFFER); + + assert (DEVMODE_SIZE (pdm) <= dm_size); + + DEVICE_MSPRINTER_DEVMODE(d) = + allocate_devmode (pdm, 0, printer_name, d); + +} + +static void +msprinter_delete_device (struct device *d) +{ + if (d->device_data) + { + msprinter_delete_device_internal (d); + + /* Disassociate the selected devmode with the device */ + if (!NILP (DEVICE_MSPRINTER_DEVMODE (d))) + { + XDEVMODE (DEVICE_MSPRINTER_DEVMODE (d))->device = Qnil; + DEVICE_MSPRINTER_DEVMODE (d) = Qnil; + } + + xfree (d->device_data); + } } static Lisp_Object @@ -434,31 +494,10 @@ msprinter_device_system_metrics (struct device *d, } static void -msprinter_delete_device (struct device *d) -{ - if (d->device_data) - { - if (DEVICE_MSPRINTER_HPRINTER (d)) - ClosePrinter (DEVICE_MSPRINTER_HPRINTER (d)); - if (DEVICE_MSPRINTER_HDC (d)) - DeleteDC (DEVICE_MSPRINTER_HDC (d)); - if (DEVICE_MSPRINTER_HCDC (d)) - DeleteDC (DEVICE_MSPRINTER_HCDC (d)); - if (DEVICE_MSPRINTER_NAME (d)) - free (DEVICE_MSPRINTER_NAME (d)); - if (DEVICE_MSPRINTER_DEVMODE (d)) - free (DEVICE_MSPRINTER_DEVMODE (d)); - if (DEVICE_MSPRINTER_DEVMODE_MIRROR (d)) - free (DEVICE_MSPRINTER_DEVMODE_MIRROR (d)); - - free (d->device_data); - } -} - -static void msprinter_mark_device (struct device *d) { mark_object (DEVICE_MSPRINTER_FONTLIST (d)); + mark_object (DEVICE_MSPRINTER_DEVMODE (d)); } static unsigned int @@ -469,60 +508,644 @@ msprinter_device_implementation_flags (void) | XDEVIMPF_NO_AUTO_REDISPLAY | XDEVIMPF_FRAMELESS_OK ); } - /************************************************************************/ -/* printer external functions */ +/* printer Lisp subroutines */ /************************************************************************/ -/* - * Return a copy of default DEVMODE. The copy returned is in - * a static buffer which will be overwritten by next call. - */ -DEVMODE* -msprinter_get_devmode_copy (struct device *d) +static void +global_free_2_maybe (HGLOBAL hg1, HGLOBAL hg2) { - assert (DEVICE_MSPRINTER_P (d)); - - if (DEVICE_MSPRINTER_DEVMODE_MIRROR(d) == NULL) - DEVICE_MSPRINTER_DEVMODE_MIRROR(d) = - (DEVMODE*) xmalloc (DEVICE_MSPRINTER_DEVMODE_SIZE(d)); - - memcpy (DEVICE_MSPRINTER_DEVMODE_MIRROR(d), - DEVICE_MSPRINTER_DEVMODE(d), - DEVICE_MSPRINTER_DEVMODE_SIZE(d)); + if (hg1 != NULL) + GlobalFree (hg1); + if (hg2 != NULL) + GlobalFree (hg2); +} - return DEVICE_MSPRINTER_DEVMODE_MIRROR(d); +static HGLOBAL +devmode_to_hglobal (Lisp_Devmode *ldm) +{ + HGLOBAL hg = GlobalAlloc (GHND, XDEVMODE_SIZE (ldm)); + memcpy (GlobalLock (hg), ldm->devmode, XDEVMODE_SIZE (ldm)); + GlobalUnlock (hg); + return hg; } -/* - * Apply settings from the DEVMODE. The settings are considered - * incremental to the default DEVMODE, so that changes in the - * passed structure supercede parameters of the printer. - * - * The passed structure is overwritten by the fuction call; - * complete printer settings are returned. - */ -void -msprinter_apply_devmode (struct device *d, DEVMODE *devmode) +/* Returns 0 if the printer has been deleted due to a fatal I/O error, + 1 otherwise. */ +static int +sync_printer_with_devmode (struct device* d, DEVMODE* devmode_in, + DEVMODE* devmode_out, char* devname) { - assert (DEVICE_MSPRINTER_P (d)); + /* Change connection if the device changed */ + if (devname != NULL + && stricmp (devname, DEVICE_MSPRINTER_NAME(d)) != 0) + { + Lisp_Object new_connection = build_ext_string (devname, Qmswindows_tstr); + struct gcpro gcpro1; + + GCPRO1 (new_connection); + DEVICE_CONNECTION (d) = Qnil; + if (!NILP (Ffind_device (new_connection, Qmsprinter))) + { + /* We are in trouble - second msprinter for the same device. + Nothing wrong on the Windows side, just forge a unique + connection name. Use the memory address of d as a unique + suffix. */ + char* new_connext = alloca (strlen (devname + 11)); + sprintf (new_connext, "%s:%X", devname, d->header.uid); + new_connection = build_ext_string (devname, Qmswindows_tstr); + } + DEVICE_CONNECTION (d) = new_connection; + UNGCPRO; + + /* Reinitialize printer. The device can pop off in process */ + if (!msprinter_reinit_device (d, devname)) + { + /* Kaboom! */ + delete_device_internal (d, 1, 0, 1); + return 0; + } + } + /* Apply the new devmode to the printer */ DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER(d), DEVICE_MSPRINTER_NAME(d), - devmode, devmode, + devmode_out, devmode_in, DM_IN_BUFFER | DM_OUT_BUFFER); - /* #### ResetDC fails sometimes, Bill only know s why. + /* #### ResetDC fails sometimes, Bill only knows why. The solution below looks more like a workaround to me, although it might be fine. --kkm */ - if (ResetDC (DEVICE_MSPRINTER_HDC (d), devmode) == NULL) + if (ResetDC (DEVICE_MSPRINTER_HDC (d), devmode_out) == NULL) { DeleteDC (DEVICE_MSPRINTER_HDC (d)); DEVICE_MSPRINTER_HDC (d) = - CreateDC ("WINSPOOL", DEVICE_MSPRINTER_NAME(d), NULL, devmode); + CreateDC ("WINSPOOL", DEVICE_MSPRINTER_NAME(d), NULL, devmode_out); + } + + return 1; +} + +static void +handle_devmode_changes (Lisp_Devmode *ldm, HGLOBAL hDevNames, HGLOBAL hDevMode) +{ + DEVNAMES* devnames = (DEVNAMES*) GlobalLock (hDevNames); + char *new_name = devnames ? (char*)devnames + devnames->wDeviceOffset : NULL; + DEVMODE* devmode = (DEVMODE*) GlobalLock (hDevMode); + + /* Size and name may have changed */ + ldm->devmode = xrealloc (ldm->devmode, DEVMODE_SIZE (devmode)); + if (new_name) + { + if (ldm->printer_name) + xfree (ldm->printer_name); + ldm->printer_name = xstrdup (new_name); + } + + if (!NILP (ldm->device)) + { + /* Apply the new devmode to the printer and get a compete one back */ + struct device *d = XDEVICE (ldm->device); + if (!sync_printer_with_devmode (d, devmode, ldm->devmode, new_name)) + { + global_free_2_maybe (hDevNames, hDevMode); + error ("Printer device initialization I/O error, device deleted."); + } + } + else + { + /* Just copy the devmode structure */ + memcpy (ldm->devmode, devmode, DEVMODE_SIZE (devmode)); + } +} + +static void +ensure_not_printing (struct device *d) +{ + if (!NILP (DEVICE_FRAME_LIST (d))) + { + Lisp_Object device; + XSETDEVICE (device, d); + signal_simple_error ("Cannot change settings while print job is active", + device); + } +} + +static Lisp_Devmode * +decode_devmode (Lisp_Object dev) +{ + if (DEVMODEP (dev)) + return XDEVMODE (dev); + else + { + struct device* d = decode_device (dev); + Lisp_Object device; + XSETDEVICE (device, d); + CHECK_MSPRINTER_DEVICE (device); + ensure_not_printing (d); + return XDEVMODE (DEVICE_MSPRINTER_DEVMODE (d)); + } +} + +/* + * DEV can be either a printer or devmode + * PRINT_P is non-zero for the Print dialog, zero for the + * Page Setup dialog + */ +static Lisp_Object +print_dialog_worker (Lisp_Object dev, int print_p) +{ + Lisp_Devmode *ldm = decode_devmode (dev); + PRINTDLG pd; + + memset (&pd, 0, sizeof (pd)); + pd.lStructSize = sizeof (pd); + pd.hwndOwner = mswindows_get_selected_frame_hwnd (); + pd.hDevMode = devmode_to_hglobal (ldm); + pd.Flags = (PD_NOSELECTION | PD_USEDEVMODECOPIESANDCOLLATE + | (print_p ? 0 : PD_PRINTSETUP)); + pd.nMinPage = 0; + pd.nMaxPage = 0xFFFF; + + if (!PrintDlg (&pd)) + { + global_free_2_maybe (pd.hDevNames, pd.hDevMode); + return Qnil; + } + + handle_devmode_changes (ldm, pd.hDevNames, pd.hDevMode); + + /* Finally, build the resulting plist */ + { + Lisp_Object result = Qnil; + struct gcpro gcpro1; + GCPRO1 (result); + + /* Do consing in reverse order. + Number of copies */ + if (print_p) + result = Fcons (Qcopies, Fcons (make_int (pd.nCopies), result)); + + /* Page range */ + if (print_p && (pd.Flags & PD_PAGENUMS)) + { + result = Fcons (Qto_page, Fcons (make_int (pd.nToPage), result)); + result = Fcons (Qfrom_page, Fcons (make_int (pd.nFromPage), result)); + } + + /* Device name */ + result = Fcons (Qname, + Fcons (build_ext_string (ldm->printer_name, + Qmswindows_tstr), + result)); + UNGCPRO; + + global_free_2_maybe (pd.hDevNames, pd.hDevMode); + return result; + } +} + +DEFUN ("msprinter-print-setup-dialog", Fmsprinter_print_setup_dialog, 1, 1, 0, /* +Invoke Windows standard Printer Setup dialog. +This dialog is usually invoked when the user selects the Printer Setup +command. + +DEVICE must be either an 'msprinter device, or a printer settings +object. The function brings up the Printer Setup dialog, where the user +can select a different printer and/or change printer options. +Connection name can change as a result of selecting a different printer +device. If a printer is specified, then changes are stored into the +settings object currently selected into that printer. If a settings +object is supplied, then changes are recorded into it, and, it it is +selected into a printer, then changes are propagated to that printer +too. + +Return value is nil if the user has canceled the dialog. Otherwise, it +is a new plist, with the following properties: + name Printer device name, even if unchanged by the user. + +The printer device is destroyed and an error is signaled if new printer +is selected by the user, but cannot be initialized. + +See also `msprinter-print-dialog' and `msprinter-page-setup-dialog'. +*/ + (device)) +{ + return print_dialog_worker (device, 0); +} + +DEFUN ("msprinter-print-dialog", Fmsprinter_print_dialog, 1, 1, 0, /* +Invoke Windows standard Print dialog. +This dialog is usually invoked when the user selects the Print command. +After the user presses OK, the program should start actual printout. + +DEVICE must be either an 'msprinter device, or a printer settings +object. The function brings up the Print dialog, where the user can +select a different printer and/or change printer options. Connection +name can change as a result of selecting a different printer device. If +a printer is specified, then changes are stored into the settings object +currently selected into that printer. If a settings object is supplied, +then changes are recorded into it, and, it it is selected into a +printer, then changes are propagated to that printer +too. + +Return value is nil if the user has canceled the dialog. Otherwise, it +is a new plist, with the following properties: + name Printer device name, even if unchanged by the user. + from-page First page to print, 1-based. If not specified by the user, + then this value is not included in the plist. + to-page Last page to print, inclusive, 1-based. If not specified by + the user, then this value is not included in the plist. + copies Number of copies to print. Always returned. + +The DEVICE is destroyed and an error is signaled in case of +initialization problem with the new printer. + +See also `msprinter-setup-print-dialog' and +`msprinter-page-setup-dialog'. +*/ + (device)) +{ + return print_dialog_worker (device, 1); +} + + +static int +plist_get_margin (Lisp_Object plist, Lisp_Object prop) +{ + Lisp_Object val = Fplist_get (plist, prop, make_int (1440)); + if (!INTP (val)) + signal_simple_error ("Margin value must be an integer", val); + + return MulDiv (XINT (val), 100, 144); +} + +static Lisp_Object +plist_set_margin (Lisp_Object plist, Lisp_Object prop, int margin, int mm_p) +{ + Lisp_Object val = make_int (MulDiv (margin, 144, mm_p ? 2450 : 100)); + return Fcons (prop, Fcons (val, plist)); +} + +DEFUN ("msprinter-page-setup-dialog", Fmsprinter_page_setup_dialog, 1, 2, 0, /* +Invoke Windows standard Page Setup dialog. +This dialog is usually invoked in response to Page Setup command, and +used to chose such parameters as page orientation, print margins etc. +Note that this dialog contains the "Printer" button, which invokes +Printer Setup dialog (see `msprinter-print-setup-dialog') so that the +user can update the printer options or even select a different printer +as well. + +DEVICE must be either an 'msprinter device, or a printer settings +object. The function brings up the Page Setup dialog, where the user +can select a different printer and/or change printer options. +Connection name can change as a result of selecting a different printer +device. If a printer is specified, then changes are stored into the +settings object currently selected into that printer. If a settings +object is supplied, then changes are recorded into it, and, it it is +selected into a printer, then changes are propagated to that printer +too. + +PLIST is a plist of job properties; +see `default-msprinter-frame-plist' for the complete list. The plist +is used to initialize the dialog. + +Return value is nil if the user has canceled the dialog. Otherwise, +it is a new plist, containing the new list of properties. + +The DEVICE is destroyed and an error is signaled in case of +initialization problem with the new printer. + +See also `msprinter-print-setup-dialog' and `msprinter-print-dialog'. +*/ + (device, plist)) +{ + Lisp_Devmode *ldm = decode_devmode (device); + PAGESETUPDLG pd; + + memset (&pd, 0, sizeof (pd)); + pd.lStructSize = sizeof (pd); + pd.hwndOwner = mswindows_get_selected_frame_hwnd (); + pd.Flags = PSD_MARGINS; + pd.rtMargin.left = plist_get_margin (plist, Qleft_margin); + pd.rtMargin.top = plist_get_margin (plist, Qtop_margin); + pd.rtMargin.right = plist_get_margin (plist, Qright_margin); + pd.rtMargin.bottom = plist_get_margin (plist, Qbottom_margin); + pd.hDevMode = devmode_to_hglobal (ldm); + + if (!PageSetupDlg (&pd)) + { + global_free_2_maybe (pd.hDevNames, pd.hDevMode); + return Qnil; } + + if (pd.hDevMode) + handle_devmode_changes (ldm, pd.hDevNames, pd.hDevMode); + + /* Finally, build the resulting plist */ + { + Lisp_Object result = Qnil; + int mm_p = pd.Flags & PSD_INHUNDREDTHSOFMILLIMETERS; + result = plist_set_margin (result, Qbottom_margin, pd.rtMargin.bottom, mm_p); + result = plist_set_margin (result, Qright_margin, pd.rtMargin.right, mm_p); + result = plist_set_margin (result, Qtop_margin, pd.rtMargin.top, mm_p); + result = plist_set_margin (result, Qleft_margin, pd.rtMargin.left, mm_p); + return result; + } +} + +DEFUN ("msprinter-get-settings", Fmsprinter_get_settings, 1, 1, 0, /* +Return the settings object currently used by DEVICE. +The object returned is not a copy, but rather a pointer to the +original one. Use `msprinter-settings-copy' to create a copy of it. +*/ + (device)) +{ + struct device *d = decode_device (device); + XSETDEVICE (device, d); + CHECK_MSPRINTER_DEVICE (device); + return DEVICE_MSPRINTER_DEVMODE (d); +} + +DEFUN ("msprinter-select-settings", Fmsprinter_select_settings, 2, 2, 0, /* +Select SETTINGS object into a DEVICE. +The settings from the settings object are immediately applied to the +printer, possibly changing even the target printer itself, and all +future changes are applied synchronously to the printer device and the +selected printer object, until a different settings object is selected +into the same printer. + +A settings object can be selected to no more than one printer at a time. + +If the supplied settings object is not specialized, it is specialized +for the printer immediately upon selection. The object can be +despecialized after it is unselected by calling the function +`msprinter-settings-despecialize'. + +Return value is the previously selected settings object. +*/ + (device, settings)) +{ + Lisp_Devmode *ldm; + struct device *d = decode_device (device); + + struct gcpro gcpro1; + GCPRO1 (settings); + + XSETDEVICE (device, d); + CHECK_MSPRINTER_DEVICE (device); + CHECK_DEVMODE (settings); + ldm = XDEVMODE (settings); + + if (!NILP (ldm->device)) + signal_simple_error ("The object is currently selected into a device", + settings); + + /* If the object being selected is de-specialized, then its + size is perhaps not enough to receive the new devmode. We can ask + for printer's devmode size here, because despecialized settings + cannot force switching to a different printer, as they supply no + printer name at all. */ + if (ldm->printer_name == NULL) + { + size_t dm_size = + DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER(d), + DEVICE_MSPRINTER_NAME(d), NULL, NULL, 0); + if (dm_size <= 0) + signal_simple_error ("Unable to specialize settings, printer error", + device); + + assert (XDEVMODE_SIZE (ldm) <= dm_size); + ldm->devmode = xrealloc (ldm->devmode, dm_size); + } + + /* If we bail out on signal here, no damage is done, except that + the stirage for the DEVMODE structure might be reallocated to + hold a larger one - not a big deal */ + if (!sync_printer_with_devmode (d, ldm->devmode, ldm->devmode, + ldm->printer_name)) + error ("Printer device initialization I/O error, device deleted."); + + if (ldm->printer_name == NULL) + ldm->printer_name = xstrdup (DEVICE_MSPRINTER_NAME(d)); + + { + Lisp_Object old_mode = DEVICE_MSPRINTER_DEVMODE (d); + ldm->device = device; + XDEVMODE (old_mode)->device = Qnil; + DEVICE_MSPRINTER_DEVMODE (d) = settings; + UNGCPRO; + return old_mode; + } +} + +DEFUN ("msprinter-apply-settings", Fmsprinter_apply_settings, 2, 2, 0, /* +Apply settings from a SETTINGS object to a 'msprinter DEVICE. +The settings from the settings object are immediately applied to the +printer, possibly changing even the target printer itself. The SETTING +object is not modified, unlike `msprinter-select-settings', and the +supplied object is not changed. The changes are immediately recorded +into the settings object which is currently selected into the printer +device. + +Return value is the currently selected settings object. +*/ + (device, settings)) +{ + Lisp_Devmode *ldm_current, *ldm_new; + struct device *d = decode_device (device); + + struct gcpro gcpro1; + GCPRO1 (settings); + + XSETDEVICE (device, d); + CHECK_MSPRINTER_DEVICE (device); + CHECK_DEVMODE (settings); + ldm_new = XDEVMODE (settings); + ldm_current = XDEVMODE (DEVICE_MSPRINTER_DEVMODE (d)); + + /* If the supplied devmode is not specialized, then the current + devmode size will always be sufficient, as the printer does + not change. If it is specialized, we must reallocate the cuttent + devmode storage to match with the supplied one, as it has the right + size for the new printer, if it is going to change. The correct + way is to use the largest of the two though, to keep the old + contents unchanged in case of preliminary exit. + */ + if (ldm_new->printer_name) + ldm_current->devmode = + (DEVMODE*) xrealloc (ldm_current->devmode, + max (XDEVMODE_SIZE (ldm_new), + XDEVMODE_SIZE (ldm_current))); + + if (!sync_printer_with_devmode (d, ldm_new->devmode, + ldm_current->devmode, + ldm_new->printer_name)) + error ("Printer device initialization I/O error, device deleted."); + + if (ldm_new->printer_name != NULL) + { + xfree (ldm_current->printer_name); + ldm_current->printer_name = xstrdup (ldm_new->printer_name); + } + + return DEVICE_MSPRINTER_DEVMODE (d); +} + +/************************************************************************/ +/* devmode */ +/************************************************************************/ + +static void +print_devmode (Lisp_Object obj, Lisp_Object printcharfun, + int escapeflag) +{ + char buf[100]; + Lisp_Devmode *dm = XDEVMODE (obj); + if (print_readably) + error ("printing unreadable object #", + dm->header.uid); + write_c_string ("#printer_name) + { + write_c_string (" for \"", printcharfun); + write_c_string (dm->printer_name, printcharfun); + write_c_string ("\"", printcharfun); + } + if (!NILP (dm->device)) + { + write_c_string (" (currently on ", printcharfun); + print_internal (dm->device, printcharfun, 0); + write_c_string (")", printcharfun); + } + sprintf (buf, " 0x%x>", dm->header.uid); + write_c_string (buf, printcharfun); +} + +static void +finalize_devmode (void *header, int for_disksave) +{ + Lisp_Devmode *dm = (Lisp_Devmode *) header; + + if (for_disksave) + { + Lisp_Object devmode; + XSETDEVMODE (devmode, dm); + signal_simple_error ( + "Cannot dump XEmacs containing an msprinter-settings object", + devmode); + } + + assert (NILP (dm->device)); + + if (dm->printer_name) + xfree (dm->printer_name); +} + +static int +equal_devmode (Lisp_Object obj1, Lisp_Object obj2, int depth) +{ + Lisp_Devmode *dm1 = XDEVMODE (obj1); + Lisp_Devmode *dm2 = XDEVMODE (obj2); + + if ((dm1->devmode != NULL) != (dm1->devmode != NULL)) + return 0; + if (dm1->devmode == NULL) + return 1; + if (memcmp (dm1->devmode, dm2->devmode, XDEVMODE_SIZE (dm1)) != 0) + return 0; + if (dm1->printer_name == NULL || dm2->printer_name == NULL) + return 1; + return stricmp (dm1->printer_name, dm2->printer_name) == 0; +} + +static unsigned long +hash_devmode (Lisp_Object obj, int depth) +{ + Lisp_Devmode *dm = XDEVMODE (obj); + + return HASH3 (XDEVMODE_SIZE (dm), + dm->devmode ? memory_hash (dm->devmode, XDEVMODE_SIZE (dm)) + : 0, + dm->printer_name ? string_hash (dm->printer_name) : 0); +} + +DEFINE_LRECORD_IMPLEMENTATION ("msprinter-settings", devmode, + 0/*mark*/, print_devmode, finalize_devmode, + equal_devmode, hash_devmode, 0/*description*/, + Lisp_Devmode); +static Lisp_Object +allocate_devmode (DEVMODE* src_devmode, int do_copy, + char* src_name, struct device *d) +{ + Lisp_Devmode *dm; + Lisp_Object ob; + + dm = alloc_lcrecord_type (Lisp_Devmode, &lrecord_devmode); + + if (d) + XSETDEVICE (dm->device, d); + else + dm->device = Qnil; + + dm->printer_name = src_name ? xstrdup (src_name) : NULL; + + if (src_devmode != NULL && do_copy) + { + dm->devmode = (DEVMODE*) xmalloc (DEVMODE_SIZE (src_devmode)); + memcpy (dm->devmode, src_devmode, DEVMODE_SIZE (src_devmode)); + } + else + { + dm->devmode = src_devmode; + } + + XSETDEVMODE (ob, dm); + return ob; +} + +DEFUN ("msprinter-settings-copy", Fmsprinter_settings_copy, 1, 1, 0, /* +Create and returns an exact copy of a printer settings object. +*/ + (settings)) +{ + Lisp_Devmode *dm; + + CHECK_DEVMODE (settings); + dm = XDEVMODE (settings); + + return allocate_devmode (dm->devmode, 1, dm->printer_name, NULL); +} + +DEFUN ("msprinter-settings-despecialize", Fmsprinter_settings_despecialize, 1, 1, 0, /* +Erase printer-specific settings from a printer settings object. +*/ + (settings)) +{ + Lisp_Devmode *ldm; + DEVMODE *dm; + + CHECK_DEVMODE (settings); + ldm = XDEVMODE (settings); + + if (!NILP (ldm->device)) + signal_simple_error ("The object is currently selected into a device", + settings); + + dm = ldm->devmode; + + /* #### TODO. Either remove references to device specific bins, + paper sizes etc, or signal an error of they are present. */ + + dm->dmDriverExtra = 0; + dm->dmDeviceName[0] = '\0'; + + if (ldm->printer_name) + xfree (ldm->printer_name); + + return Qnil; } @@ -533,6 +1156,17 @@ msprinter_apply_devmode (struct device *d, DEVMODE *devmode) void syms_of_device_mswindows (void) { + INIT_LRECORD_IMPLEMENTATION (devmode); + + DEFSUBR (Fmsprinter_print_setup_dialog); + DEFSUBR (Fmsprinter_print_dialog); + DEFSUBR (Fmsprinter_page_setup_dialog); + DEFSUBR (Fmsprinter_get_settings); + DEFSUBR (Fmsprinter_select_settings); + DEFSUBR (Fmsprinter_apply_settings); + DEFSUBR (Fmsprinter_settings_copy); + DEFSUBR (Fmsprinter_settings_despecialize); + defsymbol (&Qinit_pre_mswindows_win, "init-pre-mswindows-win"); defsymbol (&Qinit_post_mswindows_win, "init-post-mswindows-win"); } diff --git a/src/device-x.c b/src/device-x.c index 27e7daf..cd6c425 100644 --- a/src/device-x.c +++ b/src/device-x.c @@ -1362,7 +1362,7 @@ The fifth arg is the device to search for the resources on. (The resource The sixth arg NOERROR, if non-nil, means do not signal an error if a bogus resource specification was retrieved (e.g. if a non-integer was given when an integer was requested). In this case, a warning is issued - instead. + instead, unless NOERROR is t, in which case no warning is issued. The resource names passed to this function are looked up relative to the locale. diff --git a/src/device.c b/src/device.c index 5d6ebd9..b98df4c 100644 --- a/src/device.c +++ b/src/device.c @@ -1200,12 +1200,12 @@ handle_asynch_device_change (void) /* reset the flag to 0 unless another notification occurred while we were processing this one. Block SIGWINCH during this check to prevent a possible race condition. */ -#ifndef WINDOWSNT +#ifdef SIGWINCH EMACS_BLOCK_SIGNAL (SIGWINCH); #endif if (old_asynch_device_change_pending == asynch_device_change_pending) asynch_device_change_pending = 0; -#ifndef WINDOWSNT +#ifdef SIGWINCH EMACS_UNBLOCK_SIGNAL (SIGWINCH); #endif } diff --git a/src/device.h b/src/device.h index 31f5388..2055be8 100644 --- a/src/device.h +++ b/src/device.h @@ -335,6 +335,7 @@ error_check_device_type (struct device *d, Lisp_Object sym) EXFUN (Fdevice_console, 1); EXFUN (Fdevice_name, 1); +EXFUN (Ffind_device, 2); EXFUN (Fmake_device, 3); EXFUN (Fselected_device, 1); diff --git a/src/dgif_lib.c b/src/dgif_lib.c index b53b85e..1d08478 100644 --- a/src/dgif_lib.c +++ b/src/dgif_lib.c @@ -11,23 +11,10 @@ * 19 Feb 98 - Version 1.2 by Jareth Hein (Support for user specified I/O) * ******************************************************************************/ -#ifdef __MSDOS__ -#include -#include -#include -#include -#else -#include -#include -#endif /* __MSDOS__ */ - -#include -#include -#include +#include +#include "lisp.h" -#ifdef HAVE_FCNTL_H -#include -#endif +#include "sysfile.h" #include "gifrlib.h" @@ -52,11 +39,11 @@ void DGifOpenFileName(GifFileType *GifFile, const char *FileName) FILE *f; if ((f = fopen(FileName, -#ifdef __MSDOS__ +#ifdef WIN32_NATIVE "rb" #else "r" -#endif /* __MSDOS__ */ +#endif /* WIN32_NATIVE */ )) == NULL) GifInternError(GifFile, D_GIF_ERR_OPEN_FAILED); @@ -73,13 +60,13 @@ void DGifOpenFileHandle(GifFileType *GifFile, int FileHandle) { FILE *f; -#ifdef __MSDOS__ +#ifdef WIN32_NATIVE setmode(FileHandle, O_BINARY); /* Make sure it is in binary mode. */ f = fdopen(FileHandle, "rb"); /* Make it into a stream: */ setvbuf(f, NULL, _IOFBF, GIF_FILE_BUFFER_SIZE);/* And inc. stream buffer.*/ #else f = fdopen(FileHandle, "r"); /* Make it into a stream: */ -#endif /* __MSDOS__ */ +#endif /* WIN32_NATIVE */ GifStdIOInit(GifFile, f, -1); DGifInitRead(GifFile); @@ -277,11 +264,11 @@ void DGifGetLine(GifFileType *GifFile, GifPixelType *Line, int LineLen) if (!LineLen) LineLen = GifFile->Image.Width; -#if defined(__MSDOS__) || defined(__GNUC__) +#if defined(WIN32_NATIVE) || defined(__GNUC__) if ((Private->PixelCount -= LineLen) > 0xffff0000UL) #else if ((Private->PixelCount -= LineLen) > 0xffff0000) -#endif /* __MSDOS__ */ +#endif /* WIN32_NATIVE */ { GifInternError(GifFile, D_GIF_ERR_DATA_TOO_BIG); } @@ -310,11 +297,11 @@ void DGifGetPixel(GifFileType *GifFile, GifPixelType Pixel) GifInternError(GifFile, D_GIF_ERR_NOT_READABLE); } -#if defined(__MSDOS__) || defined(__GNUC__) +#if defined(WIN32_NATIVE) || defined(__GNUC__) if (--Private->PixelCount > 0xffff0000UL) #else if (--Private->PixelCount > 0xffff0000) -#endif /* __MSDOS__ */ +#endif /* WIN32_NATIVE */ { GifInternError(GifFile, D_GIF_ERR_DATA_TOO_BIG); } diff --git a/src/dialog-msw.c b/src/dialog-msw.c index c1f3251..ff83db4 100644 --- a/src/dialog-msw.c +++ b/src/dialog-msw.c @@ -389,7 +389,7 @@ mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc) memcpy (trans, XSTRING_DATA (ctext), XSTRING_LENGTH (ctext) + 1); translen = - msw_translate_menu_or_dialog_item (trans, + mswindows_translate_menu_or_dialog_item (trans, XSTRING_LENGTH (ctext), 2 * XSTRING_LENGTH (ctext) + 3, &accel_unused, diff --git a/src/dired-msw.c b/src/dired-msw.c index 80d5ddc..1b20fc6 100644 --- a/src/dired-msw.c +++ b/src/dired-msw.c @@ -75,11 +75,10 @@ Boston, MA 02111-1307, USA. */ #include "buffer.h" #include "regex.h" -#include "sysfile.h" #include "sysdir.h" #include "sysproc.h" +#include "sysfile.h" -#include #include #include /* To make nt.h happy */ diff --git a/src/dired.c b/src/dired.c index 3f992ee..3b2d7ff 100644 --- a/src/dired.c +++ b/src/dired.c @@ -303,11 +303,11 @@ file_name_completion (Lisp_Object file, Lisp_Object directory, int all_flag, CHECK_STRING (file); -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* Filename completion on Windows ignores case, since Windows filesystems do. */ specbind (Qcompletion_ignore_case, Qt); -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ #ifdef FILE_SYSTEM_CASE file = FILE_SYSTEM_CASE (file); @@ -508,7 +508,7 @@ file_name_completion (Lisp_Object file, Lisp_Object directory, int all_flag, /* The *pwent() functions do not exist on NT */ -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE static Lisp_Object user_name_completion (Lisp_Object user, int all_flag, @@ -707,7 +707,7 @@ user_name_completion (Lisp_Object user, int all_flag, int *uniq) return Qt; return Fsubstring (bestmatch, Qzero, make_int (bestmatchsize)); } -#endif /* ! defined WINDOWSNT */ +#endif /* ! defined WIN32_NATIVE */ Lisp_Object @@ -796,7 +796,7 @@ If file does not exist, returns nil. directory = Ffile_name_directory (filename); #endif -#ifdef MSDOS +#if 0 /* #### shouldn't this apply to WIN32_NATIVE and maybe CYGWIN? */ { char *tmpnam = (char *) XSTRING_DATA (Ffile_name_nondirectory (filename)); int l = strlen (tmpnam); @@ -810,7 +810,7 @@ If file does not exist, returns nil. s.st_mode |= S_IEXEC; } } -#endif /* MSDOS */ +#endif switch (s.st_mode & S_IFMT) { @@ -873,7 +873,7 @@ syms_of_dired (void) DEFSUBR (Fdirectory_files); DEFSUBR (Ffile_name_completion); DEFSUBR (Ffile_name_all_completions); -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE DEFSUBR (Fuser_name_completion); DEFSUBR (Fuser_name_completion_1); DEFSUBR (Fuser_name_all_completions); diff --git a/src/dumper.c b/src/dumper.c index 0f42642..c9a74a8 100644 --- a/src/dumper.c +++ b/src/dumper.c @@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" + #include "dump-id.h" #include "specifier.h" #include "alloc.h" @@ -30,10 +31,8 @@ Boston, MA 02111-1307, USA. */ #include "console-stream.h" #include "dumper.h" -#ifdef WINDOWSNT -#define WINDOWS_LEAN_AND_MEAN -#include -#define PATH_MAX MAXPATHLEN +#ifdef WIN32_NATIVE +#include "nt.h" #else #ifdef HAVE_MMAP #include @@ -107,7 +106,7 @@ typedef struct char *pdump_start, *pdump_end; static size_t pdump_length; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE // Handle for the dump file HANDLE pdump_hFile = INVALID_HANDLE_VALUE; // Handle for the file mapping object for the dump file @@ -1110,7 +1109,7 @@ static int pdump_load_finish (void) return 1; } -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* Free the mapped file if we decide we don't want it after all */ static void pdump_file_unmap(void) { @@ -1198,7 +1197,7 @@ static int pdump_resource_get (void) return 1; } -#else /* !WINDOWSNT */ +#else /* !WIN32_NATIVE */ static void *pdump_mallocadr; @@ -1247,7 +1246,7 @@ static int pdump_file_get(const char *path) close (pdump_fd); return 1; } -#endif /* !WINDOWSNT */ +#endif /* !WIN32_NATIVE */ static int pdump_file_try(char *exe_path) @@ -1292,9 +1291,9 @@ static int pdump_file_try(char *exe_path) int pdump_load(const char *argv0) { char exe_path[PATH_MAX]; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE GetModuleFileName (NULL, exe_path, PATH_MAX); -#else /* !WINDOWSNT */ +#else /* !WIN32_NATIVE */ char *w; const char *dir, *p; @@ -1355,7 +1354,7 @@ int pdump_load(const char *argv0) path = p+1; } } -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ if (pdump_file_try (exe_path)) { @@ -1363,7 +1362,7 @@ int pdump_load(const char *argv0) return 1; } -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE if (pdump_resource_get ()) { if (pdump_load_check ()) diff --git a/src/editfns.c b/src/editfns.c index a4ee746..ca3d41e 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -28,9 +28,6 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" -#ifdef HAVE_UNISTD_H -#include -#endif #include "buffer.h" #include "commands.h" @@ -606,20 +603,20 @@ If BUFFER is nil, the current buffer is assumed. DEFUN ("temp-directory", Ftemp_directory, 0, 0, 0, /* Return the pathname to the directory to use for temporary files. -On NT/MSDOS, this is obtained from the TEMP or TMP environment variables, +On MS Windows, this is obtained from the TEMP or TMP environment variables, defaulting to / if they are both undefined. On Unix it is obtained from TMPDIR, with /tmp as the default */ ()) { char *tmpdir; -#if defined(WINDOWSNT) || defined(MSDOS) +#if defined(WIN32_NATIVE) tmpdir = getenv ("TEMP"); if (!tmpdir) tmpdir = getenv ("TMP"); if (!tmpdir) tmpdir = "/"; -#else /* WINDOWSNT || MSDOS */ +#else /* WIN32_NATIVE */ tmpdir = getenv ("TMPDIR"); if (!tmpdir) tmpdir = "/tmp"; @@ -681,7 +678,7 @@ user_login_name (uid_t *uid) char *user_name = getenv ("LOGNAME"); if (!user_name) user_name = getenv ( -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE "USERNAME" /* it's USERNAME on NT */ #else "USER" @@ -692,7 +689,7 @@ user_login_name (uid_t *uid) else { struct passwd *pw = getpwuid (geteuid ()); -#ifdef __CYGWIN32__ +#ifdef CYGWIN /* Since the Cygwin environment may not have an /etc/passwd, return "unknown" instead of the null if the username cannot be determined. @@ -716,14 +713,7 @@ This ignores the environment variables LOGNAME and USER, so it differs from struct passwd *pw = getpwuid (getuid ()); /* #### - I believe this should return nil instead of "unknown" when pw==0 */ -#ifdef MSDOS - /* We let the real user name default to "root" because that's quite - accurate on MSDOG and because it lets Emacs find the init file. - (The DVX libraries override the Djgpp libraries here.) */ - Lisp_Object tem = build_string (pw ? pw->pw_name : "root");/* no gettext */ -#else Lisp_Object tem = build_string (pw ? pw->pw_name : "unknown");/* no gettext */ -#endif return tem; } @@ -840,7 +830,7 @@ get_home_directory (void) { if ((cached_home_directory = (Extbyte *) getenv("HOME")) == NULL) { -#if defined(WINDOWSNT) && !defined(__CYGWIN32__) +#if defined(WIN32_NATIVE) char *homedrive, *homepath; if ((homedrive = getenv("HOMEDRIVE")) != NULL && @@ -880,7 +870,7 @@ get_home_directory (void) output_home_warning = 1; # endif } -#else /* !WINDOWSNT */ +#else /* !WIN32_NATIVE */ /* * Unix, typically. * Using "/" isn't quite right, but what should we do? @@ -889,7 +879,7 @@ get_home_directory (void) */ cached_home_directory = (Extbyte *) "/"; output_home_warning = 1; -#endif /* !WINDOWSNT */ +#endif /* !WIN32_NATIVE */ } if (initialized && output_home_warning) { diff --git a/src/elhash.c b/src/elhash.c index 688018c..5e7bd46 100644 --- a/src/elhash.c +++ b/src/elhash.c @@ -29,13 +29,14 @@ Boston, MA 02111-1307, USA. */ Lisp_Object Qhash_tablep; static Lisp_Object Qhashtable, Qhash_table; -static Lisp_Object Qweakness, Qvalue; +static Lisp_Object Qweakness, Qvalue, Qkey_value; static Lisp_Object Vall_weak_hash_tables; static Lisp_Object Qrehash_size, Qrehash_threshold; static Lisp_Object Q_size, Q_test, Q_weakness, Q_rehash_size, Q_rehash_threshold; /* obsolete as of 19990901 in xemacs-21.2 */ -static Lisp_Object Qweak, Qkey_weak, Qvalue_weak, Qnon_weak, Q_type; +static Lisp_Object Qweak, Qkey_weak, Qvalue_weak, Qkey_value_weak; +static Lisp_Object Qnon_weak, Q_type; typedef struct hentry { @@ -354,6 +355,7 @@ print_hash_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) (ht->weakness == HASH_TABLE_WEAK ? "t" : ht->weakness == HASH_TABLE_KEY_WEAK ? "key" : ht->weakness == HASH_TABLE_VALUE_WEAK ? "value" : + ht->weakness == HASH_TABLE_KEY_VALUE_WEAK ? "key-value" : "you-d-better-not-see-this")); write_c_string (buf, printcharfun); } @@ -542,12 +544,14 @@ hash_table_weakness_validate (Lisp_Object keyword, Lisp_Object value, if (EQ (value, Qnil)) return 1; if (EQ (value, Qt)) return 1; if (EQ (value, Qkey)) return 1; + if (EQ (value, Qkey_value)) return 1; if (EQ (value, Qvalue)) return 1; /* Following values are obsolete as of 19990901 in xemacs-21.2 */ if (EQ (value, Qnon_weak)) return 1; if (EQ (value, Qweak)) return 1; if (EQ (value, Qkey_weak)) return 1; + if (EQ (value, Qkey_value_weak)) return 1; if (EQ (value, Qvalue_weak)) return 1; maybe_signal_simple_error ("Invalid hash table weakness", @@ -561,12 +565,14 @@ decode_hash_table_weakness (Lisp_Object obj) if (EQ (obj, Qnil)) return HASH_TABLE_NON_WEAK; if (EQ (obj, Qt)) return HASH_TABLE_WEAK; if (EQ (obj, Qkey)) return HASH_TABLE_KEY_WEAK; + if (EQ (obj, Qkey_value)) return HASH_TABLE_KEY_VALUE_WEAK; if (EQ (obj, Qvalue)) return HASH_TABLE_VALUE_WEAK; /* Following values are obsolete as of 19990901 in xemacs-21.2 */ if (EQ (obj, Qnon_weak)) return HASH_TABLE_NON_WEAK; if (EQ (obj, Qweak)) return HASH_TABLE_WEAK; if (EQ (obj, Qkey_weak)) return HASH_TABLE_KEY_WEAK; + if (EQ (obj, Qkey_value_weak)) return HASH_TABLE_KEY_VALUE_WEAK; if (EQ (obj, Qvalue_weak)) return HASH_TABLE_VALUE_WEAK; signal_simple_error ("Invalid hash table weakness", obj); @@ -800,7 +806,8 @@ the factor by which to increase the size of the hash table when enlarging. Keyword :rehash-threshold must be a float between 0.0 and 1.0, and specifies the load factor of the hash table which triggers enlarging. -Non-standard keyword :weakness can be `nil' (default), `t', `key' or `value'. +Non-standard keyword :weakness can be `nil' (default), `t', `key', `value' +or `key-value'. A weak hash table is one whose pointers do not count as GC referents: for any key-value pair in the hash table, if the only remaining pointer @@ -820,6 +827,12 @@ that a key-value pair will be removed only if the value remains unmarked outside of weak hash tables. The pair will remain in the hash table if the value is pointed to by something other than a weak hash table, even if the key is not. + +A key-value-weak hash table is similar to a fully-weak hash table except +that a key-value pair will be removed only if the value and the key remain +unmarked outside of weak hash tables. The pair will remain in the +hash table if the value or key are pointed to by something other than a weak +hash table, even if the other is not. */ (int nargs, Lisp_Object *args)) { @@ -1117,6 +1130,7 @@ This can be one of `nil', `t', `key' or `value'. { case HASH_TABLE_WEAK: return Qt; case HASH_TABLE_KEY_WEAK: return Qkey; + case HASH_TABLE_KEY_VALUE_WEAK: return Qkey_value; case HASH_TABLE_VALUE_WEAK: return Qvalue; default: return Qnil; } @@ -1133,6 +1147,7 @@ This can be one of `non-weak', `weak', `key-weak' or `value-weak'. { case HASH_TABLE_WEAK: return Qweak; case HASH_TABLE_KEY_WEAK: return Qkey_weak; + case HASH_TABLE_KEY_VALUE_WEAK: return Qkey_value_weak; case HASH_TABLE_VALUE_WEAK: return Qvalue_weak; default: return Qnon_weak; } @@ -1266,6 +1281,17 @@ finish_marking_weak_hash_tables (void) MARK_OBJ (e->key); break; + case HASH_TABLE_KEY_VALUE_WEAK: + for (; e < sentinel; e++) + if (!HENTRY_CLEAR_P (e)) + { + if (marked_p (e->value)) + MARK_OBJ (e->key); + else if (marked_p (e->key)) + MARK_OBJ (e->value); + } + break; + case HASH_TABLE_KEY_CAR_WEAK: for (; e < sentinel; e++) if (!HENTRY_CLEAR_P (e)) @@ -1458,11 +1484,13 @@ syms_of_elhash (void) defsymbol (&Qhashtable, "hashtable"); defsymbol (&Qweakness, "weakness"); defsymbol (&Qvalue, "value"); + defsymbol (&Qkey_value, "key-value"); defsymbol (&Qrehash_size, "rehash-size"); defsymbol (&Qrehash_threshold, "rehash-threshold"); defsymbol (&Qweak, "weak"); /* obsolete */ defsymbol (&Qkey_weak, "key-weak"); /* obsolete */ + defsymbol (&Qkey_value_weak, "key-value-weak"); /* obsolete */ defsymbol (&Qvalue_weak, "value-weak"); /* obsolete */ defsymbol (&Qnon_weak, "non-weak"); /* obsolete */ diff --git a/src/elhash.h b/src/elhash.h index 3ff3a62..04c1d03 100644 --- a/src/elhash.h +++ b/src/elhash.h @@ -38,6 +38,7 @@ enum hash_table_weakness HASH_TABLE_NON_WEAK, HASH_TABLE_KEY_WEAK, HASH_TABLE_VALUE_WEAK, + HASH_TABLE_KEY_VALUE_WEAK, HASH_TABLE_KEY_CAR_WEAK, HASH_TABLE_VALUE_CAR_WEAK, HASH_TABLE_WEAK diff --git a/src/emacs.c b/src/emacs.c index e1208f2..446f3c9 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -206,8 +206,8 @@ version 18.59 released October 31, 1992. #include TT_C_H_FILE #endif -#if defined (WINDOWSNT) -#include +#if defined (WIN32_NATIVE) +#include "nt.h" #endif /* For PATH_EXEC */ @@ -526,7 +526,9 @@ mswindows_handle_hardware_exceptions (DWORD code) return EXCEPTION_CONTINUE_SEARCH; /* I don't know if this filter is still wrapped in the outer __try, but - it doesn't hurt to have another one. --ben */ + it doesn't hurt to have another one. --ben + And it lets us control more exactly what we really want to do in such + a situation. */ __try { fatal_error_in_progress++; @@ -558,7 +560,38 @@ mswindows_handle_hardware_exceptions (DWORD code) } /* VC++ documentation says that GetExceptionCode() cannot be called inside the filter itself. */ - __except (mswindows_handle_hardware_exceptions (GetExceptionCode ())) {} + + /* __except (mswindows_handle_hardware_exceptions (GetExceptionCode ())) {} + + The line above is original. Unfortunately, when an error is tripped + inside of the handler (e.g. during Fbacktrace()), and the handler for + the handler is invoked, it correctly notices that something is amiss + and it should just return -- but it returns EXCEPTION_CONTINUE_SEARCH, + which causes the debugger to be invoked debugging the handler code in + this function -- and WITH THE STACK UNWOUND so that you see main() + calling mswindows_handle_hardware_exceptions(), calling Fbacktrace(), + and a crash a couple of frames in -- AND NO SIGN OF THE ORIGINAL CRASH! + + There's some real weirdness going on in the stack handling -- unlike + in Unix, where further crashes just keep adding to the stack, it seems + that under the structured-exception-handling, the stack can actually + bounce back and forth between the full stack at the location of the + exception and the unwound stack at the place where the __try clause was + established. I don't completely understand it. What I do know is that + returning EXCEPTION_EXECUTE_HANDLER on nested crash has the effect of + aborting execution of the handler and going back to the outer filter + function, which returns EXCEPTION_CONTINUE_SEARCH and everything is + hunky-dorey -- your debugger sees a crash at the right location with + the right stack. + + I'm leaving in the trickier Unix-like code in the handler; someone who + understands better than me how the stack works in these handlers could + fix it up more. As it is, it works pretty well, so I'm not likely to + touch it more. --ben + */ + + __except (EXCEPTION_EXECUTE_HANDLER) {} + /* pretend we didn't handle this, so that the debugger is invoked and/or the normal GPF box appears. */ @@ -599,7 +632,7 @@ make_arg_list_1 (int argc, char **argv, int skip_args) { if (i == 0 || i > skip_args) { -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE if (i == 0) { /* Do not trust to what crt0 has stuffed into argv[0] */ @@ -697,15 +730,6 @@ Return the directory name in which the Emacs executable was located. # undef RUN_TIME_REMAP #endif -#if defined (MULE) && defined (MSDOS) && defined (EMX) -/* Setup all of files be input/output'ed with binary translation mode. */ -asm (" .text"); -asm ("L_setbinmode:"); -asm (" movl $1, __fmode_bin"); -asm (" ret"); -asm (" .stabs \"___CTOR_LIST__\", 23, 0, 0, L_setbinmode"); -#endif - /* Test whether the next argument in ARGV matches SSTR or a prefix of LSTR (at least MINLEN characters). If so, then if VALPTR is non-null (the argument is supposed to have a value) store in *VALPTR either @@ -827,7 +851,7 @@ main_1 (int argc, char **argv, char **envp, int restart) sort_args (argc, argv); -#if (defined (MSDOS) && defined (EMX)) || defined (WIN32) || defined (_SCO_DS) +#if defined (WIN32_NATIVE) || defined (_SCO_DS) environ = envp; #endif @@ -860,15 +884,6 @@ main_1 (int argc, char **argv, char **envp, int restart) memory_warnings (0, malloc_warning); #endif /* not SYSTEM_MALLOC */ -#ifdef MSDOS - /* We do all file input/output as binary files. When we need to translate - newlines, we do that manually. */ - _fmode = O_BINARY; - (stdin) ->_flag &= ~_IOTEXT; - (stdout)->_flag &= ~_IOTEXT; - (stderr)->_flag &= ~_IOTEXT; -#endif /* MSDOS */ - #ifdef SET_EMACS_PRIORITY if (emacs_priority != 0) nice (-emacs_priority); @@ -1289,7 +1304,7 @@ main_1 (int argc, char **argv, char **envp, int restart) #ifdef HAVE_MSW_C_DIRED syms_of_dired_mswindows (); #endif -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE syms_of_ntproc (); #endif #endif /* HAVE_MS_WINDOWS */ @@ -1342,7 +1357,7 @@ main_1 (int argc, char **argv, char **envp, int restart) #endif #ifdef HAVE_GPM - syms_of_gpmevent (); + syms_of_gpmevent (); #endif #ifdef HAVE_POSTGRESQL @@ -1629,7 +1644,7 @@ main_1 (int argc, char **argv, char **envp, int restart) #ifdef HAVE_SHLIB vars_of_module (); #endif -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE vars_of_nt (); vars_of_ntproc (); #endif @@ -1747,7 +1762,7 @@ main_1 (int argc, char **argv, char **envp, int restart) #endif #ifdef HAVE_GPM - vars_of_gpmevent (); + vars_of_gpmevent (); #endif /* Now initialize any specifier variables. We do this later @@ -2017,7 +2032,7 @@ main_1 (int argc, char **argv, char **envp, int restart) init_initial_directory(); /* get the directory to use for the "*scratch*" buffer, etc. */ -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* * For Win32, call init_environment() now, so that environment/registry * variables will be properly entered into Vprocess_environment. @@ -2032,16 +2047,10 @@ main_1 (int argc, char **argv, char **envp, int restart) first because many of the functions below call egetenv() to get environment variables. */ init_lread (); /* Set up the Lisp reader. */ -#ifdef MSDOS - /* Call early 'cause init_environment needs it. */ - init_dosfns (); - /* Set defaults for several environment variables. */ - init_environment (argc, argv, skip_args); -#endif init_cmdargs (argc, argv, skip_args); /* Create list Vcommand_line_args */ init_buffer (); /* Set default directory of *scratch* buffer */ -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE init_ntproc(); #endif @@ -2097,7 +2106,7 @@ main_1 (int argc, char **argv, char **envp, int restart) Vinvocation_directory = Ffile_name_directory (Vinvocation_directory); } -#if defined(HAVE_SHLIB) && !defined(WINDOWSNT) +#if defined(HAVE_SHLIB) && !defined(WIN32_NATIVE) /* This is Unix only. MS Windows NT has a library call that does The Right Thing on that system. Rumor has it, this must be called for GNU dld in temacs and xemacs. */ @@ -2531,7 +2540,7 @@ main (int argc, char **argv, char **envp) 06/20/96 robertl@dgii.com */ { - extern char *_environ; + extern char **_environ; if ((unsigned) environ == 0) environ=_environ; } @@ -2639,7 +2648,7 @@ all of which are called before XEmacs is actually killed. be too dangerous), and if we get a crash somewhere within this loop, we'll still autosave and won't try this again. */ - LIST_LOOP_DELETING(concons, nextcons, Vconsole_list) + LIST_LOOP_DELETING (concons, nextcons, Vconsole_list) { /* There is very little point in deleting the stream console. It uses stdio, which should flush any buffered output and @@ -2653,6 +2662,14 @@ all of which are called before XEmacs is actually killed. UNGCPRO; +#ifdef HAVE_MS_WINDOWS + /* If we displayed a message on the console and we're exiting due to + init error, then we must allow the user to see this message. */ + if (mswindows_message_outputted && INTP (arg) && XINT (arg) != 0) + Fmswindows_message_box (build_string ("Initialization error"), + Qnil, Qnil); +#endif + shut_down_emacs (0, STRINGP (arg) ? arg : Qnil, 0); #if defined(GNU_MALLOC) @@ -2869,18 +2886,6 @@ and announce itself normally when it is run. UNGCPRO; -#if defined (MSDOS) && defined (EMX) - { - int fd = open ((char *) XSTRING_DATA (intoname), - O_WRONLY|O_CREAT|O_TRUNC, S_IREAD|S_IWRITE); - if (!fd) { - error ("Failure operating on %s", XSTRING_DATA (intoname)); - } else { - _core (fd); - close (fd); - } - } -#else /* not MSDOS and EMX */ { char *intoname_ext; char *symname_ext; @@ -2917,7 +2922,6 @@ and announce itself normally when it is run. #endif #endif /* not PDUMP */ } -#endif /* not MSDOS and EMX */ purify_flag = opurify; @@ -3056,7 +3060,7 @@ static const char *assert_failed_expr; #undef abort /* avoid infinite #define loop... */ -#if defined (WINDOWSNT) && defined (DEBUG_XEMACS) +#if defined (WIN32_NATIVE) && defined (DEBUG_XEMACS) #define enter_debugger() DebugBreak () #else #define enter_debugger() diff --git a/src/eval.c b/src/eval.c index da95e4e..ec6a270 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1057,7 +1057,7 @@ If SYMBOL is buffer-local, its default value is what is set; buffer-local values are not affected. INITVALUE and DOCSTRING are optional. If DOCSTRING starts with *, this variable is identified as a user option. - This means that M-x set-variable and M-x edit-options recognize it. + This means that M-x set-variable recognizes it. If INITVALUE is missing, SYMBOL's value is not set. In lisp-interaction-mode defvar is treated as defconst. @@ -1107,7 +1107,7 @@ If SYMBOL is buffer-local, its default value is what is set; buffer-local values are not affected. DOCSTRING is optional. If DOCSTRING starts with *, this variable is identified as a user option. - This means that M-x set-variable and M-x edit-options recognize it. + This means that M-x set-variable recognizes it. Note: do not use `defconst' for user options in libraries that are not normally loaded, since it is useful for users to be able to specify @@ -3315,9 +3315,11 @@ function_argcount (Lisp_Object function, int function_min_args_p) if (SUBRP (function)) { - return function_min_args_p ? - Fsubr_min_args (function): - Fsubr_max_args (function); + /* Using return with the ?: operator tickles a DEC CC compiler bug. */ + if (function_min_args_p) + return Fsubr_min_args (function); + else + return Fsubr_max_args (function); } else if (COMPILED_FUNCTIONP (function)) { diff --git a/src/event-Xt.c b/src/event-Xt.c index 78b1c40..b9e83bd 100644 --- a/src/event-Xt.c +++ b/src/event-Xt.c @@ -3220,7 +3220,7 @@ init_event_Xt_late (void) /* called when already initialized */ XSetErrorHandler (x_error_handler); XSetIOErrorHandler (x_IO_error_handler); -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE XtAppAddInput (Xt_app_con, signal_event_pipe[0], (XtPointer) (XtInputReadMask /* | XtInputExceptMask */), Xt_what_callback, 0); diff --git a/src/event-msw.c b/src/event-msw.c index 5b7d03b..8f8ecf6 100644 --- a/src/event-msw.c +++ b/src/event-msw.c @@ -69,13 +69,13 @@ Boston, MA 02111-1307, USA. */ #ifdef HAVE_MSG_SELECT #include "sysfile.h" #include "console-tty.h" -#elif defined(__CYGWIN32__) +#elif defined(CYGWIN) typedef unsigned int SOCKET; #endif #include #include -#if !(defined(__CYGWIN32__) || defined(__MINGW32__)) +#if !(defined(CYGWIN) || defined(MINGW)) # include /* For IShellLink */ #endif @@ -471,7 +471,7 @@ init_slurp_stream (void) #define NTPIPE_SHOVE_STREAM_DATA(stream) \ LSTREAM_TYPE_DATA (stream, ntpipe_shove) -#define MAX_SHOVE_BUFFER_SIZE 128 +#define MAX_SHOVE_BUFFER_SIZE 512 struct ntpipe_shove_stream { @@ -505,15 +505,18 @@ shove_thread (LPVOID vparam) InterlockedIncrement (&s->idle_p); WaitForSingleObject (s->hev_thread, INFINITE); - if (s->die_p) - break; - - /* Write passed buffer */ - if (!WriteFile (s->hpipe, s->buffer, s->size, &bytes_written, NULL) - || bytes_written != s->size) + /* Write passed buffer if any */ + if (s->size > 0) { - s->error_p = TRUE; - InterlockedIncrement (&s->die_p); + if (!WriteFile (s->hpipe, s->buffer, s->size, &bytes_written, NULL) + || bytes_written != s->size) + { + s->error_p = TRUE; + InterlockedIncrement (&s->die_p); + } + /* Set size to zero so we won't write it again if the closer sets + die_p and kicks us */ + s->size = 0; } if (s->die_p) @@ -546,6 +549,15 @@ make_ntpipe_output_stream (HANDLE hpipe, LPARAM param) return Qnil; } + /* Set the priority of the thread higher so we don't end up waiting + on it to send things. */ + if (!SetThreadPriority (s->hthread, THREAD_PRIORITY_HIGHEST)) + { + CloseHandle (s->hthread); + Lstream_delete (lstr); + return Qnil; + } + /* hev_thread is an auto-reset event, initially nonsignaled */ s->hev_thread = CreateEvent (NULL, FALSE, FALSE, NULL); @@ -586,6 +598,9 @@ ntpipe_shove_writer (Lstream *stream, const unsigned char *data, size_t size) /* Start output */ InterlockedDecrement (&s->idle_p); SetEvent (s->hev_thread); + /* Give it a chance to run -- this dramatically improves performance + of things like crypt. */ + (void) SwitchToThread (); return size; } @@ -604,14 +619,18 @@ ntpipe_shove_closer (Lstream *stream) /* Force thread stop */ InterlockedIncrement (&s->die_p); - /* Close pipe handle, possibly breaking it */ - CloseHandle (s->hpipe); - - /* Thread will end upon unblocking */ + /* Thread will end upon unblocking. If it's already unblocked this will + do nothing, but the thread won't look at die_p until it's written any + pending output. */ SetEvent (s->hev_thread); /* Wait while thread terminates */ WaitForSingleObject (s->hthread, INFINITE); + + /* Close pipe handle, possibly breaking it */ + CloseHandle (s->hpipe); + + /* Close the thread handle */ CloseHandle (s->hthread); /* Destroy the event */ @@ -1251,14 +1270,20 @@ mswindows_drain_windows_queue (void) while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) { - /* We have to translate messages that are not sent to the main - window. This is so that key presses work ok in things like - edit fields. However, we *musn't* translate message for the - main window as this is handled in the wnd proc. + /* We have to translate messages that are not sent to an XEmacs + frame. This is so that key presses work ok in things like + edit fields. However, we *musn't* translate message for XEmacs + frames as this is handled in the wnd proc. We also have to avoid generating paint magic events for windows that aren't XEmacs frames */ - if (GetWindowLong (msg.hwnd, GWL_STYLE) & (WS_CHILD|WS_POPUP)) + /* GetClassName will truncate a longer class name. By adding one + extra character, we are forcing textual comparison to fail + if the name is longer than XEMACS_CLASS */ + char class_name_buf [sizeof (XEMACS_CLASS) + 2] = ""; + GetClassName (msg.hwnd, class_name_buf, sizeof (class_name_buf) - 1); + if (stricmp (class_name_buf, XEMACS_CLASS) != 0) { + /* Not an XEmacs frame */ TranslateMessage (&msg); } else if (msg.message == WM_PAINT) @@ -1270,8 +1295,8 @@ mswindows_drain_windows_queue (void) assert (msg.wParam == 0); /* Queue a magic event for handling when safe */ - msframe = FRAME_MSWINDOWS_DATA ( - XFRAME (mswindows_find_frame (msg.hwnd))); + msframe = + FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (msg.hwnd))); if (!msframe->paint_pending) { msframe->paint_pending = 1; @@ -1600,7 +1625,7 @@ mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv, if (*end) return DDE_FNOTPROCESSED; -#ifdef __CYGWIN32__ +#ifdef CYGWIN filename = alloca (cygwin32_win32_to_posix_path_list_buf_size (cmd) + 5); strcpy (filename, "file:"); cygwin32_win32_to_posix_path_list (cmd, filename+5); @@ -1755,7 +1780,7 @@ mswindows_handle_sticky_modifiers (WPARAM wParam, LPARAM lParam, This means that we need to distinguish between an auto-repeated key and a key pressed and released a bunch of times. */ - else if (downp && !keyp || + else if ((downp && !keyp) || (downp && keyp && last_downkey && (wParam != last_downkey || /* the "previous key state" bit indicates autorepeat */ @@ -1810,24 +1835,24 @@ do { \ } \ } while (0) - if (wParam == VK_CONTROL && (lParam & 0x1000000) + if ((wParam == VK_CONTROL && (lParam & 0x1000000)) || wParam == VK_RCONTROL) FROB (XEMSW_RCONTROL); - if (wParam == VK_CONTROL && !(lParam & 0x1000000) + if ((wParam == VK_CONTROL && !(lParam & 0x1000000)) || wParam == VK_LCONTROL) FROB (XEMSW_LCONTROL); - if (wParam == VK_SHIFT && (lParam & 0x1000000) + if ((wParam == VK_SHIFT && (lParam & 0x1000000)) || wParam == VK_RSHIFT) FROB (XEMSW_RSHIFT); - if (wParam == VK_SHIFT && !(lParam & 0x1000000) + if ((wParam == VK_SHIFT && !(lParam & 0x1000000)) || wParam == VK_LSHIFT) FROB (XEMSW_LSHIFT); - if (wParam == VK_MENU && (lParam & 0x1000000) + if ((wParam == VK_MENU && (lParam & 0x1000000)) || wParam == VK_RMENU) FROB (XEMSW_RMENU); - if (wParam == VK_MENU && !(lParam & 0x1000000) + if ((wParam == VK_MENU && !(lParam & 0x1000000)) || wParam == VK_LMENU) FROB (XEMSW_LMENU); } @@ -1889,6 +1914,8 @@ clear_sticky_modifiers (void) #ifdef DEBUG_XEMACS +#if 0 + static void output_modifier_keyboard_state (void) { @@ -1919,6 +1946,8 @@ output_modifier_keyboard_state (void) keymap[VK_RSHIFT] & 0x1 ? 1 : 0); } +#endif + /* try to debug the stuck-alt-key problem. #### this happens only inconsistently, and may only happen when using @@ -1971,7 +2000,7 @@ output_alt_keyboard_state (void) * The windows procedure for the window class XEMACS_CLASS */ LRESULT WINAPI -mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +mswindows_wnd_proc (HWND hwnd, UINT message_, WPARAM wParam, LPARAM lParam) { /* Note: Remember to initialize emacs_event and event before use. This code calls code that can GC. You must GCPRO before calling such code. */ @@ -1983,13 +2012,16 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) struct mswindows_frame* msframe; assert (!GetWindowLong (hwnd, GWL_USERDATA)); - switch (message) + switch (message_) { case WM_DESTROYCLIPBOARD: /* We own the clipboard and someone else wants it. Delete our cached copy of the clipboard contents so we'll ask for it from - Windows again when someone does a paste. */ - handle_selection_clear(QCLIPBOARD); + Windows again when someone does a paste, and destroy any memory + objects we hold on the clipboard that are not in the list of types + that Windows will delete itself. */ + mswindows_destroy_selection (QCLIPBOARD); + handle_selection_clear (QCLIPBOARD); break; case WM_ERASEBKGND: @@ -2016,7 +2048,7 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (mswindows_debug_events) { stderr_out ("%s wparam=%d lparam=%d\n", - message == WM_KEYUP ? "WM_KEYUP" : "WM_SYSKEYUP", + message_ == WM_KEYUP ? "WM_KEYUP" : "WM_SYSKEYUP", wParam, (int)lParam); output_alt_keyboard_state (); } @@ -2037,7 +2069,7 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } if (should_set_keymap) - // && (message != WM_SYSKEYUP + // && (message_ != WM_SYSKEYUP // || NILP (Vmenu_accelerator_enabled))) SetKeyboardState (keymap); @@ -2073,7 +2105,7 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (mswindows_debug_events) { stderr_out ("%s wparam=%d lparam=%d\n", - message == WM_KEYDOWN ? "WM_KEYDOWN" : "WM_SYSKEYDOWN", + message_ == WM_KEYDOWN ? "WM_KEYDOWN" : "WM_SYSKEYDOWN", wParam, (int)lParam); output_alt_keyboard_state (); } @@ -2087,7 +2119,7 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) GetKeyboardState (keymap_sticky); if (keymap_sticky[VK_MENU] & 0x80) { - message = WM_SYSKEYDOWN; + message_ = WM_SYSKEYDOWN; /* We have to set the "context bit" so that the TranslateMessage() call below that generates the SYSCHAR message does its thing; see the documentation @@ -2118,7 +2150,7 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) int got_accelerator = 0; msg.hwnd = hwnd; - msg.message = message; + msg.message = message_; msg.wParam = wParam; msg.lParam = lParam; msg.time = GetMessageTime(); @@ -2139,7 +2171,7 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } if (!NILP (Vmenu_accelerator_enabled) && - !(mods & XEMACS_MOD_SHIFT) && message == WM_SYSKEYDOWN) + !(mods & XEMACS_MOD_SHIFT) && message_ == WM_SYSKEYDOWN) potential_accelerator = 1; /* Remove shift modifier from an ascii character */ @@ -2186,7 +2218,7 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) ++mswindows_quit_chars_count; } else if (potential_accelerator && !got_accelerator && - msw_char_is_accelerator (frame, ch)) + mswindows_char_is_accelerator (frame, ch)) { got_accelerator = 1; break; @@ -2218,7 +2250,7 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* Real middle mouse button has nothing to do with emulated one: if one wants to exercise fingers playing chords on the mouse, he is allowed to do that! */ - mswindows_enqueue_mouse_button_event (hwnd, message, + mswindows_enqueue_mouse_button_event (hwnd, message_, MAKEPOINTS (lParam), GetMessageTime()); break; @@ -2533,21 +2565,31 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_DISPLAYCHANGE: { struct device *d; + DWORD message_tick = GetMessageTime (); fobj = mswindows_find_frame (hwnd); frame = XFRAME (fobj); d = XDEVICE (FRAME_DEVICE (frame)); - DEVICE_MSWINDOWS_HORZRES(d) = LOWORD (lParam); - DEVICE_MSWINDOWS_VERTRES(d) = HIWORD (lParam); - DEVICE_MSWINDOWS_BITSPIXEL(d) = wParam; - break; + /* Do this only once per message. XEmacs can receive this message + through as many frames as it currently has open. Message time + will be the same for all these messages. Despite extreme + efficiency, the code below has about one in 4 billion + probability that the HDC is not recreated, provided that + XEmacs is running sufficiently longer than 52 days. */ + if (DEVICE_MSWINDOWS_UPDATE_TICK(d) != message_tick) + { + DEVICE_MSWINDOWS_UPDATE_TICK(d) = message_tick; + DeleteDC (DEVICE_MSWINDOWS_HCDC(d)); + DEVICE_MSWINDOWS_HCDC(d) = CreateCompatibleDC (NULL); + } } + break; /* Misc magic events which only require that the frame be identified */ case WM_SETFOCUS: case WM_KILLFOCUS: - mswindows_enqueue_magic_event (hwnd, message); + mswindows_enqueue_magic_event (hwnd, message_); break; case WM_WINDOWPOSCHANGING: @@ -2696,7 +2738,7 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; #endif - return DefWindowProc (hwnd, message, wParam, lParam); + return DefWindowProc (hwnd, message_, wParam, lParam); /* Bite me - a spurious command. This used to not be able to happen but with the introduction of widgets its now possible. */ @@ -2796,7 +2838,7 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) DragQueryFile ((HANDLE) wParam, i, fname, len+1); /* May be a shell link aka "shortcut" - replace fname if so */ -#if !(defined(__CYGWIN32__) || defined(__MINGW32__)) +#if !(defined(CYGWIN) || defined(MINGW)) /* cygwin doesn't define this COM stuff */ if (!stricmp (fname + strlen (fname) - 4, ".LNK")) { @@ -2833,7 +2875,7 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } #endif -#ifdef __CYGWIN32__ +#ifdef CYGWIN filename = xmalloc (cygwin32_win32_to_posix_path_list_buf_size (fname) + 5); strcpy (filename, "file:"); cygwin32_win32_to_posix_path_list (fname, filename+5); @@ -2858,7 +2900,7 @@ mswindows_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) defproc: default: - return DefWindowProc (hwnd, message, wParam, lParam); + return DefWindowProc (hwnd, message_, wParam, lParam); } return (0); } diff --git a/src/event-stream.c b/src/event-stream.c index e3cbf1f..a4d216c 100644 --- a/src/event-stream.c +++ b/src/event-stream.c @@ -4120,7 +4120,7 @@ Magic events are handled as necessary. soon as a command other than self-insert-command is executed. Programmers can also use the `self-insert-defer-undo' - property to install that behaviour on functions other + property to install that behavior on functions other than `self-insert-command', or to change the magic number 20 to something else. #### DOCUMENT THIS! */ diff --git a/src/events.c b/src/events.c index 325be1e..e74f3ce 100644 --- a/src/events.c +++ b/src/events.c @@ -1009,7 +1009,7 @@ character_to_event (Emchar c, Lisp_Event *event, struct console *con, k = QKbackspace; m &= ~XEMACS_MOD_CONTROL; } -#endif /* defined(HAVE_TTY) && !defined(__CYGWIN32__) */ +#endif /* defined(HAVE_TTY) && !defined(CYGWIN) */ break; } if (c >= 'A' && c <= 'Z') c -= 'A'-'a'; @@ -1018,7 +1018,7 @@ character_to_event (Emchar c, Lisp_Event *event, struct console *con, else if (do_backspace_mapping && CHARP (con->tty_erase_char) && c == XCHAR (con->tty_erase_char)) k = QKbackspace; -#endif /* defined(HAVE_TTY) && !defined(__CYGWIN32__) */ +#endif /* defined(HAVE_TTY) && !defined(CYGWIN) */ else if (c == 127) k = QKdelete; else if (c == ' ') diff --git a/src/fileio.c b/src/fileio.c index c2eb069..e8f7549 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" -#include #include "buffer.h" #include "events.h" @@ -54,24 +53,13 @@ Boston, MA 02111-1307, USA. */ #endif /* HPUX_PRE_8_0 */ #endif /* HPUX */ -#ifdef WINDOWSNT -#define NOMINMAX 1 -#include -#include -#include -#endif /* not WINDOWSNT */ - -#ifdef WINDOWSNT -#define CORRECT_DIR_SEPS(s) \ - do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \ - else unixtodos_filename (s); \ - } while (0) +#ifdef WIN32_NATIVE #define IS_DRIVE(x) isalpha (x) /* Need to lower-case the drive letter, or else expanded filenames will sometimes compare inequal, because `expand-file-name' doesn't always down-case the drive letter. */ #define DRIVE_LETTER(x) tolower (x) -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ int lisp_to_time (Lisp_Object, time_t *); Lisp_Object time_to_lisp (time_t); @@ -432,7 +420,7 @@ Given a Unix syntax file name, returns a string ending in slash. p = beg + XSTRING_LENGTH (file); while (p != beg && !IS_ANY_SEP (p[-1]) -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* only recognize drive specifier at beginning */ && !(p[-1] == ':' && p == beg + 2) #endif @@ -440,14 +428,14 @@ Given a Unix syntax file name, returns a string ending in slash. if (p == beg) return Qnil; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* Expansion of "c:" to drive and default directory. */ /* (NT does the right thing.) */ if (p == beg + 2 && beg[1] == ':') { /* MAXPATHLEN+1 is guaranteed to be enough space for getdefdir. */ Bufbyte *res = (Bufbyte*) alloca (MAXPATHLEN + 1); - if (getdefdir (toupper (*beg) - 'A' + 1, (char *)res)) + if (_getdcwd (toupper (*beg) - 'A' + 1, (char *)res, MAXPATHLEN)) { char *c=((char *) res) + strlen ((char *) res); if (!IS_DIRECTORY_SEP (*c)) @@ -459,7 +447,7 @@ Given a Unix syntax file name, returns a string ending in slash. p = beg + strlen ((char *) beg); } } -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ return make_string (beg, p - beg); } @@ -487,7 +475,7 @@ or the entire name if it contains no slash. end = p = beg + XSTRING_LENGTH (file); while (p != beg && !IS_ANY_SEP (p[-1]) -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* only recognize drive specifier at beginning */ && !(p[-1] == ':' && p == beg + 2) #endif @@ -589,9 +577,9 @@ directory_file_name (const char *src, char *dst) strcpy (dst, src); if (slen > 1 && IS_DIRECTORY_SEP (dst[slen - 1]) -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE && !IS_ANY_SEP (dst[slen - 2]) -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ ) dst[slen - 1] = 0; return 1; @@ -758,15 +746,15 @@ See also the function `substitute-in-file-name'. Bufbyte *newdir, *p, *o; int tlen; Bufbyte *target; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE int drive = 0; int collapse_newdir = 1; #else struct passwd *pw; -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ int length; Lisp_Object handler; -#ifdef __CYGWIN32__ +#ifdef CYGWIN char *user; #endif @@ -808,18 +796,18 @@ See also the function `substitute-in-file-name'. /* Save time in some common cases - as long as default_directory is not relative, it can be canonicalized with name below (if it is needed at all) without requiring it to be expanded now. */ -#ifdef WINDOWSNT - /* Detect MSDOS file names with drive specifiers. */ +#ifdef WIN32_NATIVE + /* Detect Windows file names with drive specifiers. */ && ! (IS_DRIVE (o[0]) && (IS_DEVICE_SEP (o[1]) && IS_DIRECTORY_SEP (o[2]))) /* Detect Windows file names in UNC format. */ && ! (IS_DIRECTORY_SEP (o[0]) && IS_DIRECTORY_SEP (o[1])) -#else /* not WINDOWSNT */ +#else /* not WIN32_NATIVE */ /* Detect Unix absolute file names (/... alone is not absolute on - DOS or Windows). */ + Windows). */ && ! (IS_DIRECTORY_SEP (o[0])) -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ ) { struct gcpro gcpro1; @@ -837,7 +825,7 @@ See also the function `substitute-in-file-name'. into name should be safe during all of this, though. */ nm = XSTRING_DATA (name); -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* We will force directory separators to be either all \ or /, so make a local copy to modify, even if there ends up being no change. */ nm = strcpy ((char *)alloca (strlen ((char *)nm) + 1), (char *)nm); @@ -875,14 +863,14 @@ See also the function `substitute-in-file-name'. "//somedir". */ if (drive && IS_DIRECTORY_SEP (nm[0]) && IS_DIRECTORY_SEP (nm[1])) nm++; -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ /* If nm is absolute, look for /./ or /../ sequences; if none are found, we can probably return right away. We will avoid allocating a new string if name is already fully expanded. */ if ( IS_DIRECTORY_SEP (nm[0]) -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE && (drive || IS_DIRECTORY_SEP (nm[1])) #endif ) @@ -913,7 +901,7 @@ See also the function `substitute-in-file-name'. } if (!lose) { -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* Make sure directories are all separated with / or \ as desired, but avoid allocation of a new string when not required. */ @@ -931,11 +919,11 @@ See also the function `substitute-in-file-name'. XSTRING_DATA (name)[1] = ':'; } return name; -#else /* not WINDOWSNT */ +#else /* not WIN32_NATIVE */ if (nm == XSTRING_DATA (name)) return name; return build_string ((char *) nm); -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ } } @@ -972,7 +960,7 @@ See also the function `substitute-in-file-name'. Qfile_name); nm++; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE collapse_newdir = 0; #endif } @@ -991,7 +979,7 @@ See also the function `substitute-in-file-name'. multiple user profiles users defined, each with its HOME. Therefore, the following should be reworked to handle this case. */ -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* Now if the file given is "~foo/file" and HOME="c:/", then we want the file to be named "c:/file" ("~foo" becomes "c:/"). The variable o has "~foo", so we can use the @@ -1000,8 +988,8 @@ See also the function `substitute-in-file-name'. newdir = (Bufbyte *) get_home_directory(); dostounix_filename (newdir); nm += strlen(o) + 1; -#else /* not WINDOWSNT */ -#ifdef __CYGWIN32__ +#else /* not WIN32_NATIVE */ +#ifdef CYGWIN if ((user = user_login_name (NULL)) != NULL) { /* Does the user login name match the ~name? */ @@ -1013,7 +1001,7 @@ See also the function `substitute-in-file-name'. } if (! newdir) { -#endif /* __CYGWIN32__ */ +#endif /* CYGWIN */ /* Jamie reports that getpwnam() can get wedged by SIGIO/SIGALARM occurring in it. (It can call select()). */ slow_down_interrupts (); @@ -1024,17 +1012,17 @@ See also the function `substitute-in-file-name'. newdir = (Bufbyte *) pw -> pw_dir; nm = p; } -#ifdef __CYGWIN32__ +#ifdef CYGWIN } #endif -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ /* If we don't find a user of that name, leave the name unchanged; don't move nm forward to p. */ } } -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* On DOS and Windows, nm is absolute if a drive name was specified; use the drive's current directory as the prefix if needed. */ if (!newdir && drive) @@ -1043,7 +1031,7 @@ See also the function `substitute-in-file-name'. if (!IS_DIRECTORY_SEP (nm[0])) { newdir = alloca (MAXPATHLEN + 1); - if (!getdefdir (toupper (drive) - 'A' + 1, newdir)) + if (!_getdcwd (toupper (drive) - 'A' + 1, newdir, MAXPATHLEN)) newdir = NULL; } if (!newdir) @@ -1056,13 +1044,13 @@ See also the function `substitute-in-file-name'. newdir[3] = 0; } } -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ /* Finally, if no prefix has been specified and nm is not absolute, then it must be expanded relative to default_directory. */ if (1 -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE /* /... alone is not absolute on DOS and Windows. */ && !IS_DIRECTORY_SEP (nm[0]) #else @@ -1073,12 +1061,12 @@ See also the function `substitute-in-file-name'. newdir = XSTRING_DATA (default_directory); } -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE if (newdir) { /* First ensure newdir is an absolute name. */ if ( - /* Detect MSDOS file names with drive specifiers. */ + /* Detect Windows file names with drive specifiers. */ ! (IS_DRIVE (newdir[0]) && IS_DEVICE_SEP (newdir[1]) && IS_DIRECTORY_SEP (newdir[2])) /* Detect Windows file names in UNC format. */ @@ -1108,7 +1096,7 @@ See also the function `substitute-in-file-name'. newdir = alloca (MAXPATHLEN + 1); if (drive) { - if (!getdefdir (toupper (drive) - 'A' + 1, newdir)) + if (!_getdcwd (toupper (drive) - 'A' + 1, newdir, MAXPATHLEN)) newdir = "/"; } else @@ -1139,7 +1127,7 @@ See also the function `substitute-in-file-name'. newdir = ""; } } -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ if (newdir) { @@ -1147,7 +1135,7 @@ See also the function `substitute-in-file-name'. just // (an incomplete UNC name). */ length = strlen ((char *) newdir); if (length > 1 && IS_DIRECTORY_SEP (newdir[length - 1]) -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE && !(length == 2 && IS_DIRECTORY_SEP (newdir[0])) #endif ) @@ -1164,14 +1152,14 @@ See also the function `substitute-in-file-name'. /* Now concatenate the directory and name to new space in the stack frame */ tlen += strlen ((char *) nm) + 1; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* Add reserved space for drive name. (The Microsoft x86 compiler produces incorrect code if the following two lines are combined.) */ target = (Bufbyte *) alloca (tlen + 2); target += 2; -#else /* not WINDOWSNT */ +#else /* not WIN32_NATIVE */ target = (Bufbyte *) alloca (tlen); -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ *target = 0; if (newdir) @@ -1220,7 +1208,7 @@ See also the function `substitute-in-file-name'. ++o; p += 3; } -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* if drive is set, we're not dealing with an UNC, so multiple dir-seps are redundant (and reportedly cause trouble under win95) */ @@ -1233,7 +1221,7 @@ See also the function `substitute-in-file-name'. } } -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* At last, set drive name, except for network file name. */ if (drive) { @@ -1246,7 +1234,7 @@ See also the function `substitute-in-file-name'. assert (IS_DIRECTORY_SEP (target[0]) && IS_DIRECTORY_SEP (target[1])); } CORRECT_DIR_SEPS (target); -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ return make_string (target, o - target); } @@ -1428,12 +1416,12 @@ If `/~' appears, all of FILENAME through that `/' is discarded. for (p = nm; p != endp; p++) { if ((p[0] == '~' -#if defined (WINDOWSNT) || defined (__CYGWIN32__) +#if defined (WIN32_NATIVE) || defined (CYGWIN) /* // at start of file name is meaningful in WindowsNT systems */ || (IS_DIRECTORY_SEP (p[0]) && p - 1 != nm) -#else /* not (WINDOWSNT || __CYGWIN32__) */ +#else /* not (WIN32_NATIVE || CYGWIN) */ || IS_DIRECTORY_SEP (p[0]) -#endif /* not (WINDOWSNT || __CYGWIN32__) */ +#endif /* not (WIN32_NATIVE || CYGWIN) */ ) && p != nm && (IS_DIRECTORY_SEP (p[-1]))) @@ -1441,7 +1429,7 @@ If `/~' appears, all of FILENAME through that `/' is discarded. nm = p; substituted = 1; } -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* see comment in expand-file-name about drive specifiers */ else if (IS_DRIVE (p[0]) && p[1] == ':' && p > nm && IS_DIRECTORY_SEP (p[-1])) @@ -1449,7 +1437,7 @@ If `/~' appears, all of FILENAME through that `/' is discarded. nm = p; substituted = 1; } -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ } /* See if any variables are substituted into the string @@ -1489,9 +1477,9 @@ If `/~' appears, all of FILENAME through that `/' is discarded. target = (Bufbyte *) alloca (s - o + 1); strncpy ((char *) target, (char *) o, s - o); target[s - o] = 0; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE strupr (target); /* $home == $HOME etc. */ -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ /* Get variable value */ o = (Bufbyte *) egetenv ((char *) target); @@ -1540,9 +1528,9 @@ If `/~' appears, all of FILENAME through that `/' is discarded. target = (Bufbyte *) alloca (s - o + 1); strncpy ((char *) target, (char *) o, s - o); target[s - o] = 0; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE strupr (target); /* $home == $HOME etc. */ -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ /* Get variable value */ o = (Bufbyte *) egetenv ((char *) target); @@ -1559,16 +1547,16 @@ If `/~' appears, all of FILENAME through that `/' is discarded. for (p = xnm; p != x; p++) if ((p[0] == '~' -#if defined (WINDOWSNT) +#if defined (WIN32_NATIVE) || (IS_DIRECTORY_SEP (p[0]) && p - 1 != xnm) -#else /* not WINDOWSNT */ +#else /* not WIN32_NATIVE */ || IS_DIRECTORY_SEP (p[0]) -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ ) /* don't do p[-1] if that would go off the beginning --jwz */ && p != nm && p > xnm && IS_DIRECTORY_SEP (p[-1])) xnm = p; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE else if (IS_DRIVE (p[0]) && p[1] == ':' && p > nm && IS_DIRECTORY_SEP (p[-1])) xnm = p; @@ -1743,7 +1731,7 @@ A prefix arg makes KEEP-TIME non-nil. copyable by us. */ input_file_statable_p = (fstat (ifd, &st) >= 0); -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE if (out_st.st_mode != 0 && st.st_dev == out_st.st_dev && st.st_ino == out_st.st_ino) { @@ -1981,13 +1969,10 @@ This is what happens in interactive use with M-x. INTP (ok_if_already_exists), 0); /* Syncing with FSF 19.34.6 note: FSF does not have conditional code for - WINDOWSNT here; I've removed it. --marcpa */ + WIN32_NATIVE here; I've removed it. --marcpa */ - /* FSFmacs only calls rename() here under BSD 4.1, and calls - link() and unlink() otherwise, but that's bogus. Sometimes - rename() succeeds where link()/unlink() fail, and we have - configure check for rename() and emulate using link()/unlink() - if necessary. */ + /* We have configure check for rename() and emulate using + link()/unlink() if necessary. */ if (0 > rename ((char *) XSTRING_DATA (filename), (char *) XSTRING_DATA (newname))) { @@ -2052,10 +2037,10 @@ This is what happens in interactive use with M-x. /* But FSF #defines link as sys_link which is supplied in nt.c. We can't do that because sysfile.h defines sys_link depending on ENCAPSULATE_LINK. Reverted to previous behavior pending a working fix. (jhar) */ -#if defined(WINDOWSNT) +#if defined(WIN32_NATIVE) /* Windows does not support this operation. */ report_file_error ("Adding new name", Flist (2, &filename)); -#else /* not defined(WINDOWSNT) */ +#else /* not defined(WIN32_NATIVE) */ unlink ((char *) XSTRING_DATA (newname)); if (0 > link ((char *) XSTRING_DATA (filename), @@ -2064,7 +2049,7 @@ This is what happens in interactive use with M-x. report_file_error ("Adding new name", list2 (filename, newname)); } -#endif /* defined(WINDOWSNT) */ +#endif /* defined(WIN32_NATIVE) */ UNGCPRO; return Qnil; @@ -2166,7 +2151,7 @@ On Unix, this is a name starting with a `/' or a `~'. CHECK_STRING (filename); ptr = XSTRING_DATA (filename); return (IS_DIRECTORY_SEP (*ptr) || *ptr == '~' -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE || (IS_DRIVE (*ptr) && ptr[1] == ':' && IS_DIRECTORY_SEP (ptr[2])) #endif ) ? Qt : Qnil; @@ -2177,12 +2162,12 @@ On Unix, this is a name starting with a `/' or a `~'. static int check_executable (char *filename) { -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE struct stat st; if (stat (filename, &st) < 0) return 0; return ((st.st_mode & S_IEXEC) != 0); -#else /* not WINDOWSNT */ +#else /* not WIN32_NATIVE */ #ifdef HAVE_EACCESS return eaccess (filename, 1) >= 0; #else @@ -2191,7 +2176,7 @@ check_executable (char *filename) But Unix doesn't give us a right way to do it. */ return access (filename, 1) >= 0; #endif /* HAVE_EACCESS */ -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ } /* Return nonzero if file FILENAME exists and can be written. */ @@ -2284,14 +2269,14 @@ See also `file-exists-p' and `file-attributes'. if (!NILP (handler)) RETURN_UNGCPRO (call2 (handler, Qfile_readable_p, abspath)); -#if defined(WINDOWSNT) || defined(__CYGWIN32__) +#if defined(WIN32_NATIVE) || defined(CYGWIN) /* Under MS-DOS and Windows, open does not work for directories. */ UNGCPRO; if (access (XSTRING_DATA (abspath), 0) == 0) return Qt; else return Qnil; -#else /* not WINDOWSNT */ +#else /* not WIN32_NATIVE */ { int desc = interruptible_open ((char *) XSTRING_DATA (abspath), O_RDONLY | OPEN_BINARY, 0); UNGCPRO; @@ -2300,7 +2285,7 @@ See also `file-exists-p' and `file-attributes'. close (desc); return Qt; } -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ } /* Having this before file-symlink-p mysteriously caused it to be forgotten @@ -2445,7 +2430,7 @@ searchable directory. return call2 (handler, Qfile_accessible_directory_p, filename); -#if !defined(WINDOWSNT) +#if !defined(WIN32_NATIVE) if (NILP (Ffile_directory_p (filename))) return (Qnil); else @@ -2466,7 +2451,7 @@ searchable directory. UNGCPRO; return tem ? Qnil : Qt; } -#endif /* !defined(WINDOWSNT) */ +#endif /* !defined(WIN32_NATIVE) */ } DEFUN ("file-regular-p", Ffile_regular_p, 1, 1, 0, /* @@ -2526,10 +2511,10 @@ Return mode bits of FILE, as an integer. return Qnil; /* Syncing with FSF 19.34.6 note: not in FSF, #if 0'ed out here. */ #if 0 -#ifdef DOS_NT +#ifdef WIN32_NATIVE if (check_executable (XSTRING_DATA (abspath))) st.st_mode |= S_IEXEC; -#endif /* DOS_NT */ +#endif /* WIN32_NATIVE */ #endif /* 0 */ return make_int (st.st_mode & 07777); @@ -2603,7 +2588,7 @@ Tell Unix to finish all pending disk updates. */ ()) { -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE sync (); #endif return Qnil; @@ -4311,7 +4296,7 @@ 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. */ ); -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE Vdirectory_sep_char = make_char ('\\'); #else Vdirectory_sep_char = make_char ('/'); diff --git a/src/fns.c b/src/fns.c index e3bce63..e7623f4 100644 --- a/src/fns.c +++ b/src/fns.c @@ -36,10 +36,7 @@ Boston, MA 02111-1307, USA. */ #include "lisp.h" -#ifdef HAVE_UNISTD_H -#include -#endif -#include +#include "sysfile.h" #include "buffer.h" #include "bytecode.h" @@ -992,7 +989,11 @@ are copied to the new string. return result; } else - abort (); /* unreachable, since Flength (sequence) did not get an error */ + { + abort (); /* unreachable, since Flength (sequence) did not get + an error */ + return Qnil; + } } diff --git a/src/frame-msw.c b/src/frame-msw.c index 6679792..11809e0 100644 --- a/src/frame-msw.c +++ b/src/frame-msw.c @@ -81,6 +81,21 @@ Lisp_Object Vmswindows_frame_being_created; /*----- DISPLAY FRAME -----*/ /*---------------------------------------------------------------------*/ +HWND +mswindows_get_selected_frame_hwnd (void) +{ + Lisp_Object frame, device; + + device = Ffind_device (Qnil, Qmswindows); + if (NILP (device)) + return NULL; + frame = DEVICE_SELECTED_FRAME (XDEVICE (device)); + if (NILP (frame)) + return NULL; + + return FRAME_MSWINDOWS_HANDLE (XFRAME (frame)); +} + static void mswindows_init_frame_1 (struct frame *f, Lisp_Object props) { @@ -638,7 +653,7 @@ void mswindows_size_frame_internal (struct frame* f, XEMACS_RECT_WH* dest) not restrictive since this will happen later anyway in WM_SIZE. We have to do this after adjusting the rect to account for menubar etc. */ - msw_get_workspace_coords (&ws_rect); + mswindows_get_workspace_coords (&ws_rect); pixel_width = rect.right - rect.left; pixel_height = rect.bottom - rect.top; if (pixel_width > ws_rect.right - ws_rect.left) @@ -718,6 +733,20 @@ mswindows_frame_size_fixed_p (struct frame *f) /*----- PRINTER FRAME -----*/ /*---------------------------------------------------------------------*/ +/* + * With some drvier/os combination (I discovered this with HP drviers + * under W2K), DC geometry is reset upon StartDoc and EndPage + * calls. This is called every time one of these calls is made. + */ +static void +apply_dc_geometry (struct frame* f) +{ + HDC hdc = DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f))); + SetTextAlign (hdc, TA_BASELINE | TA_LEFT | TA_NOUPDATECP); + SetViewportOrgEx (hdc, FRAME_MSPRINTER_PIXLEFT(f), + FRAME_MSPRINTER_PIXTOP(f), NULL); +} + void msprinter_start_page (struct frame *f) { @@ -725,6 +754,7 @@ msprinter_start_page (struct frame *f) { FRAME_MSPRINTER_PAGE_STARTED (f) = 1; StartPage (DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f)))); + apply_dc_geometry (f); } } @@ -764,10 +794,6 @@ msprinter_init_frame_1 (struct frame *f, Lisp_Object props) /* Negative for "uinspecified" */ FRAME_MSPRINTER_CHARWIDTH(f) = -1; FRAME_MSPRINTER_CHARHEIGHT(f) = -1; - - /* nil is for "system default" for these properties. */ - FRAME_MSPRINTER_ORIENTATION(f) = Qnil; - FRAME_MSPRINTER_DUPLEX(f) = Qnil; } static void @@ -778,39 +804,6 @@ msprinter_init_frame_3 (struct frame *f) HDC hdc; int frame_left, frame_top, frame_width, frame_height; - /* Change printer parameters */ - { - DEVMODE* devmode = msprinter_get_devmode_copy (device); - devmode->dmFields = 0; - - if (!NILP (FRAME_MSPRINTER_ORIENTATION(f))) - { - devmode->dmFields = DM_ORIENTATION; - if (EQ (FRAME_MSPRINTER_ORIENTATION(f), Qportrait)) - devmode->dmOrientation = DMORIENT_PORTRAIT; - else if (EQ (FRAME_MSPRINTER_ORIENTATION(f), Qlandscape)) - devmode->dmOrientation = DMORIENT_LANDSCAPE; - else - abort(); - } - - if (!NILP (FRAME_MSPRINTER_DUPLEX(f))) - { - devmode->dmFields = DM_DUPLEX; - if (EQ (FRAME_MSPRINTER_DUPLEX(f), Qnone)) - devmode->dmDuplex = DMDUP_SIMPLEX; - if (EQ (FRAME_MSPRINTER_DUPLEX(f), Qvertical)) - devmode->dmDuplex = DMDUP_VERTICAL; - if (EQ (FRAME_MSPRINTER_DUPLEX(f), Qhorizontal)) - devmode->dmDuplex = DMDUP_HORIZONTAL; - else - abort(); - } - - assert (!FRAME_MSPRINTER_PAGE_STARTED (f)); - msprinter_apply_devmode (device, devmode); - } - /* DC might be recreated in msprinter_apply_devmode, so do not initialize until now */ hdc = DEVICE_MSPRINTER_HDC (device); @@ -874,10 +867,8 @@ msprinter_init_frame_3 (struct frame *f) change_frame_size (f, rows, columns, 0); } - /* Apply DC geometry */ - SetTextAlign (hdc, TA_BASELINE | TA_LEFT | TA_NOUPDATECP); - SetViewportOrgEx (hdc, frame_left, frame_top, NULL); - SetWindowOrgEx (hdc, 0, 0, NULL); + FRAME_MSPRINTER_PIXLEFT(f) = frame_left; + FRAME_MSPRINTER_PIXTOP(f) = frame_top; /* Start print job */ di.cbSize = sizeof (di); @@ -891,6 +882,8 @@ msprinter_init_frame_3 (struct frame *f) if (StartDoc (hdc, &di) <= 0) error ("Cannot start print job"); + apply_dc_geometry (f); + /* Finish frame setup */ FRAME_MSPRINTER_JOB_STARTED (f) = 1; FRAME_VISIBLE_P(f) = 0; @@ -899,12 +892,6 @@ msprinter_init_frame_3 (struct frame *f) static void msprinter_mark_frame (struct frame *f) { - /* NOTE: These need not be marked as long as we allow only c-defined - symbols for their values. Although, marking these is safer than - expensive. [I know a proof to the theorem postulating that a - gator is longer than greener. Ask me. -- kkm] */ - mark_object (FRAME_MSPRINTER_ORIENTATION (f)); - mark_object (FRAME_MSPRINTER_DUPLEX (f)); } static void @@ -934,10 +921,6 @@ msprinter_frame_property (struct frame *f, Lisp_Object property) return make_int (FRAME_MSPRINTER_RIGHT_MARGIN(f)); else if (EQ (Qbottom_margin, property)) return make_int (FRAME_MSPRINTER_BOTTOM_MARGIN(f)); - else if (EQ (Qorientation, property)) - return FRAME_MSPRINTER_ORIENTATION(f); - else if (EQ (Qduplex, property)) - return FRAME_MSPRINTER_DUPLEX(f); else return Qunbound; } @@ -946,16 +929,13 @@ static int msprinter_internal_frame_property_p (struct frame *f, Lisp_Object property) { return (EQ (Qleft_margin, property) || EQ (Qtop_margin, property) || - EQ (Qright_margin, property) || EQ (Qbottom_margin, property) || - EQ (Qorientation, property) || EQ (Qduplex, property)); + EQ (Qright_margin, property) || EQ (Qbottom_margin, property)); } static Lisp_Object msprinter_frame_properties (struct frame *f) { Lisp_Object props = Qnil; - props = cons3 (Qorientation, FRAME_MSPRINTER_ORIENTATION(f), props); - props = cons3 (Qduplex, FRAME_MSPRINTER_DUPLEX(f), props); props = cons3 (Qbottom_margin, make_int (FRAME_MSPRINTER_BOTTOM_MARGIN(f)), props); props = cons3 (Qright_margin, @@ -1022,29 +1002,6 @@ msprinter_set_frame_properties (struct frame *f, Lisp_Object plist) CHECK_NATNUM (val); FRAME_MSPRINTER_BOTTOM_MARGIN(f) = XINT (val); } - else if (EQ (prop, Qorientation)) - { - maybe_error_if_job_active (f); - CHECK_SYMBOL (val); - if (!NILP(val) && - !EQ (val, Qportrait) && - !EQ (val, Qlandscape)) - signal_simple_error ("Page orientation can only be " - "'portrait or 'landscape", val); - FRAME_MSPRINTER_ORIENTATION(f) = val; - } - else if (EQ (prop, Qduplex)) - { - maybe_error_if_job_active (f); - CHECK_SYMBOL (val); - if (!NILP(val) && - !EQ (val, Qnone) && - !EQ (val, Qvertical) && - !EQ (val, Qhorizontal)) - signal_simple_error ("Duplex can only be 'none, " - "'vertical or 'horizontal", val); - FRAME_MSPRINTER_DUPLEX(f) = val; - } } } } @@ -1064,6 +1021,7 @@ msprinter_eject_page (struct frame *f) { FRAME_MSPRINTER_PAGE_STARTED (f) = 0; EndPage (DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f)))); + apply_dc_geometry (f); } } @@ -1212,17 +1170,6 @@ set at any time, except as otherwise noted): (setq default-frame-plist '(height 55 'width 80) default-msprinter-frame-plist '(height nil 'width nil)) - - orientation Printer page orientation. Can be 'nil, - indicating system default, 'portrait - or 'landscape. - - duplex Duplex printing mode, subject to printer - support. Can be 'nil for the device default, - 'none for simplex printing, 'vertical or - 'horizontal for duplex page bound along - the corresponding page direction. - See also `default-frame-plist', which specifies properties which apply to all frames, not just mswindows frames. */ ); diff --git a/src/frame.c b/src/frame.c index 3274458..1bdb698 100644 --- a/src/frame.c +++ b/src/frame.c @@ -268,7 +268,9 @@ setup_frame_without_minibuffer (struct frame *f, Lisp_Object mini_window) FRAME_CONSOLE (XFRAME (XWINDOW (mini_window)->frame)))) error ("frame and minibuffer must be on the same console"); - if (NILP (mini_window)) + /* Do not create a default minibuffer frame on printer devices. */ + if (NILP (mini_window) + && DEVICE_DISPLAY_P (XDEVICE (FRAME_DEVICE (f)))) { struct console *con = XCONSOLE (FRAME_CONSOLE (f)); /* Use default-minibuffer-frame if possible. */ @@ -283,8 +285,13 @@ setup_frame_without_minibuffer (struct frame *f, Lisp_Object mini_window) } /* Install the chosen minibuffer window, with proper buffer. */ - store_minibuf_frame_prop (f, mini_window); - Fset_window_buffer (mini_window, Vminibuffer_zero, Qt); + if (!NILP (mini_window)) + { + store_minibuf_frame_prop (f, mini_window); + Fset_window_buffer (mini_window, Vminibuffer_zero, Qt); + } + else + f->minibuffer_window = Qnil; } /* Make a frame containing only a minibuffer window. */ @@ -3409,7 +3416,7 @@ This is the same format as `modeline-format' with the exception that */ ); /* #### I would change this unilaterally but for the wrath of the Kyles of the world. */ -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE Vframe_title_format = build_string ("%b - XEmacs"); #else Vframe_title_format = build_string ("%S: %b"); diff --git a/src/general.c b/src/general.c index 7ed8d4c..a695b7f 100644 --- a/src/general.c +++ b/src/general.c @@ -36,6 +36,7 @@ Lisp_Object Qactually_requested; Lisp_Object Qafter; Lisp_Object Qall; Lisp_Object Qand; +Lisp_Object Qappend; Lisp_Object Qassoc; Lisp_Object Qat; Lisp_Object Qautodetect; @@ -59,6 +60,7 @@ Lisp_Object Qcolor; Lisp_Object Qcolumns; Lisp_Object Qcommand; Lisp_Object Qconsole; +Lisp_Object Qcopies; Lisp_Object Qcritical; Lisp_Object Qctext; Lisp_Object Qcursor; @@ -84,6 +86,8 @@ Lisp_Object Qface; Lisp_Object Qfile_name; Lisp_Object Qfont; Lisp_Object Qframe; +Lisp_Object Qfrom_page; +Lisp_Object Qfull_assoc; Lisp_Object Qfuncall; Lisp_Object Qfunction; Lisp_Object Qgap_overhead; @@ -178,6 +182,7 @@ Lisp_Object Qtimestamp; Lisp_Object Qtoolbar; Lisp_Object Qtop; Lisp_Object Qtop_margin; +Lisp_Object Qto_page; Lisp_Object Qtty; Lisp_Object Qtype; Lisp_Object Qundecided; @@ -202,6 +207,7 @@ syms_of_general (void) defsymbol (&Qafter, "after"); defsymbol (&Qall, "all"); defsymbol (&Qand, "and"); + defsymbol (&Qappend, "append"); defsymbol (&Qassoc, "assoc"); defsymbol (&Qat, "at"); defsymbol (&Qautodetect, "autodetect"); @@ -225,6 +231,7 @@ syms_of_general (void) defsymbol (&Qcolumns, "columns"); defsymbol (&Qcommand, "command"); defsymbol (&Qconsole, "console"); + defsymbol (&Qcopies, "copies"); defsymbol (&Qcritical, "critical"); defsymbol (&Qctext, "ctext"); defsymbol (&Qcursor, "cursor"); @@ -250,6 +257,9 @@ syms_of_general (void) defsymbol (&Qfile_name, "file-name"); defsymbol (&Qfont, "font"); defsymbol (&Qframe, "frame"); + defsymbol (&Qfrom_page, "from-page"); + defsymbol (&Qfunction, "function"); + defsymbol (&Qfull_assoc, "full-assoc"); defsymbol (&Qfuncall, "funcall"); defsymbol (&Qfunction, "function"); defsymbol (&Qgap_overhead, "gap-overhead"); @@ -344,6 +354,7 @@ syms_of_general (void) defsymbol (&Qtoolbar, "toolbar"); defsymbol (&Qtop, "top"); defsymbol (&Qtop_margin, "top-margin"); + defsymbol (&Qto_page, "to-page"); defsymbol (&Qtty, "tty"); defsymbol (&Qtype, "type"); defsymbol (&Qundecided, "undecided"); diff --git a/src/getloadavg.c b/src/getloadavg.c index af003aa..721f32b 100644 --- a/src/getloadavg.c +++ b/src/getloadavg.c @@ -44,7 +44,6 @@ Boston, MA 02111-1307, USA. */ convex DGUX hpux - MSDOS No-op for MSDOS. NeXT sgi sequent Sequent Dynix 3.x.x (BSD) @@ -52,7 +51,7 @@ Boston, MA 02111-1307, USA. */ sony_news NEWS-OS (works at least for 4.1C) UMAX UMAX4_3 - WIN32 No-op for Windows95/NT. + WIN32_NATIVE No-op for Windows95/NT. __linux__ Linux: assumes /proc filesystem mounted. Support from Michael K. Johnson. __NetBSD__ NetBSD: assumes /kern filesystem mounted. @@ -69,8 +68,11 @@ Boston, MA 02111-1307, USA. */ #include #endif -#ifndef WINDOWSNT -#ifndef __CYGWIN32__ +#include "lisp.h" +#include "sysfile.h" /* for encapsulated open, close, read, write */ + +#ifndef WIN32_NATIVE +#ifndef CYGWIN #include @@ -81,10 +83,6 @@ Boston, MA 02111-1307, USA. */ #include #endif -#ifdef XEMACS -#include "lisp.h" -#include "sysfile.h" /* for encapsulated open, close, read, write */ -#endif /* XEMACS */ /* Exclude all the code except the test program at the end if the system has its own `getloadavg' function. @@ -110,11 +108,9 @@ Boston, MA 02111-1307, USA. */ #define LDAV_CVT(n) (LOAD_AVE_CVT (n) / 100.0) #endif -#ifdef XEMACS #if defined (HAVE_KSTAT_H) #include #endif /* HAVE_KSTAT_H */ -#endif /* XEMACS */ #if !defined (BSD) && defined (ultrix) /* Ultrix behaves like BSD on Vaxen. */ @@ -457,11 +453,9 @@ Boston, MA 02111-1307, USA. */ #include #endif -#ifdef XEMACS #if defined (HAVE_SYS_PSTAT_H) #include #endif /* HAVE_SYS_PSTAT_H (on HPUX) */ -#endif /* XEMACS */ #if defined(HAVE_FCNTL_H) || defined(_POSIX_VERSION) #include @@ -779,7 +773,7 @@ getloadavg (double loadavg[], int nelem) : (load_ave.tl_avenrun.l[0] / (double) load_ave.tl_lscale)); #endif /* OSF_MIPS */ -#if !defined (LDAV_DONE) && (defined (MSDOS) || defined (WIN32)) +#if !defined (LDAV_DONE) && defined (WIN32_NATIVE) #define LDAV_DONE /* A faithful emulation is going to have to be saved for a rainy day. */ @@ -787,7 +781,7 @@ getloadavg (double loadavg[], int nelem) { loadavg[elem] = 0.0; } -#endif /* MSDOS */ +#endif /* WIN32_NATIVE */ #if !defined (LDAV_DONE) && defined (OSF_ALPHA) #define LDAV_DONE @@ -978,4 +972,4 @@ getloadavg (double loadavg[], int nelem) } #endif /*__GNUWIN32__*/ -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ diff --git a/src/gif_io.c b/src/gif_io.c index 0421b4b..b2cabb3 100644 --- a/src/gif_io.c +++ b/src/gif_io.c @@ -1,7 +1,11 @@ +#include + #include #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include "gifrlib.h" #include "sysfile.h" diff --git a/src/glyphs-msw.c b/src/glyphs-msw.c index 1320e03..56c6b65 100644 --- a/src/glyphs-msw.c +++ b/src/glyphs-msw.c @@ -1140,7 +1140,7 @@ typedef struct #define OIC_BANG 32515 #define OIC_NOTE 32516 #define OIC_WINLOGO 32517 -#if defined (__CYGWIN32__) && CYGWIN_VERSION_DLL_MAJOR < 21 +#if defined (CYGWIN) && CYGWIN_VERSION_DLL_MAJOR < 21 #define LR_SHARED 0x8000 #endif #endif @@ -1289,7 +1289,7 @@ mswindows_resource_instantiate (Lisp_Object image_instance, Lisp_Object instanti TO_EXTERNAL_FORMAT (LISP_STRING, file, C_STRING_ALLOCA, f, Qfile_name); -#ifdef __CYGWIN32__ +#ifdef CYGWIN CYGWIN_WIN32_PATH (f, fname); #else fname = f; diff --git a/src/glyphs-widget.c b/src/glyphs-widget.c index d7c8c58..bc3e829 100644 --- a/src/glyphs-widget.c +++ b/src/glyphs-widget.c @@ -375,7 +375,7 @@ update_widget (Lisp_Object widget) provided then use the widget text to calculate sizes. */ static void widget_query_geometry (Lisp_Object image_instance, - unsigned int* width, unsigned int* height, + int* width, int* height, enum image_instance_geometry disp, Lisp_Object domain) { Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance); @@ -410,7 +410,7 @@ widget_query_geometry (Lisp_Object image_instance, domain)); else { - unsigned int w, h; + int w, h; /* Then if we are allowed to resize the widget, make the size the same as the text dimensions. */ @@ -442,7 +442,7 @@ widget_query_geometry (Lisp_Object image_instance, static int widget_layout (Lisp_Object image_instance, - unsigned int width, unsigned int height, Lisp_Object domain) + int width, int height, Lisp_Object domain) { Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance); struct image_instantiator_methods* meths; @@ -698,11 +698,11 @@ widget_post_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, depending on the type of button. */ static void button_query_geometry (Lisp_Object image_instance, - unsigned int* width, unsigned int* height, + int* width, int* height, enum image_instance_geometry disp, Lisp_Object domain) { Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); - unsigned int w, h; + int w, h; query_string_geometry (IMAGE_INSTANCE_WIDGET_TEXT (ii), IMAGE_INSTANCE_WIDGET_FACE (ii), &w, &h, 0, domain); @@ -724,7 +724,7 @@ button_query_geometry (Lisp_Object image_instance, /* tree-view geometry - get the height right */ static void tree_view_query_geometry (Lisp_Object image_instance, - unsigned int* width, unsigned int* height, + int* width, int* height, enum image_instance_geometry disp, Lisp_Object domain) { Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); @@ -751,7 +751,7 @@ tree_view_query_geometry (Lisp_Object image_instance, items and text therin in the tab control. */ static void tab_control_query_geometry (Lisp_Object image_instance, - unsigned int* width, unsigned int* height, + int* width, int* height, enum image_instance_geometry disp, Lisp_Object domain) { Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); @@ -761,7 +761,7 @@ tab_control_query_geometry (Lisp_Object image_instance, LIST_LOOP (rest, items) { - unsigned int h, w; + int h, w; query_string_geometry (XGUI_ITEM (XCAR (rest))->name, IMAGE_INSTANCE_WIDGET_FACE (ii), @@ -995,14 +995,14 @@ layout_post_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, /* Query the geometry of a layout widget. We assume that we can only get here if the size is not already fixed. */ static void -layout_query_geometry (Lisp_Object image_instance, unsigned int* width, - unsigned int* height, enum image_instance_geometry disp, +layout_query_geometry (Lisp_Object image_instance, int* width, + int* height, enum image_instance_geometry disp, Lisp_Object domain) { Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); Lisp_Object items = IMAGE_INSTANCE_LAYOUT_CHILDREN (ii), rest; int maxph = 0, maxpw = 0, nitems = 0, ph_adjust = 0; - unsigned int gheight, gwidth; + int gheight, gwidth; /* If we are not initialized then we won't have any children. */ if (!IMAGE_INSTANCE_INITIALIZED (ii)) @@ -1082,14 +1082,14 @@ layout_query_geometry (Lisp_Object image_instance, unsigned int* width, int layout_layout (Lisp_Object image_instance, - unsigned int width, unsigned int height, Lisp_Object domain) + int width, int height, Lisp_Object domain) { Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); Lisp_Object rest; Lisp_Object items = IMAGE_INSTANCE_LAYOUT_CHILDREN (ii); int x, y, maxph = 0, maxpw = 0, nitems = 0, horiz_spacing, vert_spacing, ph_adjust = 0; - unsigned int gheight, gwidth; + int gheight, gwidth; /* If we are not initialized then we won't have any children. */ if (!IMAGE_INSTANCE_INITIALIZED (ii)) @@ -1215,7 +1215,7 @@ layout_layout (Lisp_Object image_instance, /* Layout subwindows if they are real subwindows. */ static int native_layout_layout (Lisp_Object image_instance, - unsigned int width, unsigned int height, + int width, int height, Lisp_Object domain) { Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance); diff --git a/src/glyphs-x.c b/src/glyphs-x.c index 2b6d350..af515d8 100644 --- a/src/glyphs-x.c +++ b/src/glyphs-x.c @@ -1670,7 +1670,8 @@ x_xface_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, { Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); int i, stattis; - char *p, *bits, *bp; + char *bits, *bp; + const char *p; const char * volatile emsg = 0; const char * volatile dstring; @@ -2547,8 +2548,6 @@ x_native_layout_instantiate (Lisp_Object image_instance, Lisp_Object instantiato Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain) { - Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); - x_widget_instantiate (image_instance, instantiator, pointer_fg, pointer_bg, dest_mask, domain, "layout", 0); } diff --git a/src/glyphs.c b/src/glyphs.c index 689e0db..ad77f82 100644 --- a/src/glyphs.c +++ b/src/glyphs.c @@ -724,10 +724,8 @@ instantiate_image_instantiator (Lisp_Object governing_domain, IMAGE_INSTANCE_LAYOUT_CHANGED (p) = 0; IMAGE_INSTANCE_DIRTYP (p) = 0; - assert ( XIMAGE_INSTANCE_HEIGHT (ii) - != IMAGE_UNSPECIFIED_GEOMETRY - && XIMAGE_INSTANCE_WIDTH (ii) - != IMAGE_UNSPECIFIED_GEOMETRY); + assert ( XIMAGE_INSTANCE_HEIGHT (ii) >= 0 + && XIMAGE_INSTANCE_WIDTH (ii) >= 0 ); ERROR_CHECK_IMAGE_INSTANCE (ii); @@ -1895,7 +1893,7 @@ instance is a mono pixmap; otherwise, the same image instance is returned. special function then just return the width and / or height. */ void image_instance_query_geometry (Lisp_Object image_instance, - unsigned int* width, unsigned int* height, + int* width, int* height, enum image_instance_geometry disp, Lisp_Object domain) { @@ -1930,8 +1928,7 @@ image_instance_query_geometry (Lisp_Object image_instance, want to specifiy something (layout widgets). */ void image_instance_layout (Lisp_Object image_instance, - unsigned int width, unsigned int height, - Lisp_Object domain) + int width, int height, Lisp_Object domain) { Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance); Lisp_Object type; @@ -1951,8 +1948,8 @@ image_instance_layout (Lisp_Object image_instance, || height == IMAGE_UNSPECIFIED_GEOMETRY) { - unsigned int dwidth = IMAGE_UNSPECIFIED_GEOMETRY, - dheight = IMAGE_UNSPECIFIED_GEOMETRY; + int dwidth = IMAGE_UNSPECIFIED_GEOMETRY; + int dheight = IMAGE_UNSPECIFIED_GEOMETRY; /* Get the desired geometry. */ if (meths && HAS_IIFORMAT_METH_P (meths, query_geometry)) @@ -2161,8 +2158,7 @@ string_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, helper that is used elsewhere for calculating text geometry. */ void query_string_geometry (Lisp_Object string, Lisp_Object face, - unsigned int* width, unsigned int* height, - unsigned int* descent, Lisp_Object domain) + int* width, int* height, int* descent, Lisp_Object domain) { struct font_metric_info fm; Charset_ID charsets[NUM_LEADING_BYTES]; @@ -2250,11 +2246,11 @@ query_string_font (Lisp_Object string, Lisp_Object face, Lisp_Object domain) static void text_query_geometry (Lisp_Object image_instance, - unsigned int* width, unsigned int* height, + int* width, int* height, enum image_instance_geometry disp, Lisp_Object domain) { Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); - unsigned int descent = 0; + int descent = 0; query_string_geometry (IMAGE_INSTANCE_TEXT_STRING (ii), IMAGE_INSTANCE_FACE (ii), @@ -3015,13 +3011,16 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec, } else { - Lisp_Object instance; - Lisp_Object subtable; + Lisp_Object instance = Qnil; + Lisp_Object subtable = Qnil; Lisp_Object ls3 = Qnil; Lisp_Object pointer_fg = Qnil; Lisp_Object pointer_bg = Qnil; Lisp_Object governing_domain = get_image_instantiator_governing_domain (instantiator, domain); + struct gcpro gcpro1; + + GCPRO1 (instance); /* We have to put subwindow, widget and text image instances in a per-window cache so that we can see the same glyph in @@ -3146,7 +3145,7 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec, DOMAIN_FRAME (domain))); #endif ERROR_CHECK_IMAGE_INSTANCE (instance); - return instance; + RETURN_UNGCPRO (instance); } abort (); @@ -4150,8 +4149,7 @@ static void cache_subwindow_instance_in_frame_maybe (Lisp_Object instance) { Lisp_Image_Instance* ii = XIMAGE_INSTANCE (instance); - if (image_instance_type_to_mask (IMAGE_INSTANCE_TYPE (ii)) - & (IMAGE_WIDGET_MASK | IMAGE_SUBWINDOW_MASK)) + if (!NILP (DOMAIN_FRAME (IMAGE_INSTANCE_DOMAIN (ii)))) { struct frame* f = DOMAIN_XFRAME (IMAGE_INSTANCE_DOMAIN (ii)); XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)) @@ -4531,8 +4529,8 @@ subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, /* This is just a backup in case no-one has assigned a suitable geometry. #### It should really query the enclose window for geometry. */ static void -subwindow_query_geometry (Lisp_Object image_instance, unsigned int* width, - unsigned int* height, enum image_instance_geometry disp, +subwindow_query_geometry (Lisp_Object image_instance, int* width, + int* height, enum image_instance_geometry disp, Lisp_Object domain) { if (width) *width = 20; diff --git a/src/glyphs.h b/src/glyphs.h index 95fc7f6..a3a9405 100644 --- a/src/glyphs.h +++ b/src/glyphs.h @@ -91,10 +91,11 @@ enum image_instance_geometry IMAGE_GEOMETRY, IMAGE_DESIRED_GEOMETRY, IMAGE_MIN_GEOMETRY, - IMAGE_MAX_GEOMETRY, - IMAGE_UNSPECIFIED_GEOMETRY = ~0 + IMAGE_MAX_GEOMETRY }; +#define IMAGE_UNSPECIFIED_GEOMETRY -1 + #define WIDGET_BORDER_HEIGHT 4 #define WIDGET_BORDER_WIDTH 4 @@ -168,15 +169,14 @@ struct image_instantiator_methods instance. Actual geometry is stored in the appropriate slots in the image instance. */ void (*query_geometry_method) (Lisp_Object image_instance, - unsigned int* width, unsigned int* height, + int* width, int* height, enum image_instance_geometry disp, Lisp_Object domain); /* Layout the instance and its children bounded by the provided dimensions. Returns success or failure. */ int (*layout_method) (Lisp_Object image_instance, - unsigned int width, unsigned int height, - Lisp_Object domain); + int width, int height, Lisp_Object domain); }; /***** Calling an image-instantiator method *****/ @@ -359,14 +359,14 @@ void widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain); void image_instance_query_geometry (Lisp_Object image_instance, - unsigned int* width, unsigned int* height, + int* width, int* height, enum image_instance_geometry disp, Lisp_Object domain); void image_instance_layout (Lisp_Object image_instance, - unsigned int width, unsigned int height, + int width, int height, Lisp_Object domain); int layout_layout (Lisp_Object image_instance, - unsigned int width, unsigned int height, + int width, int height, Lisp_Object domain); int invalidate_glyph_geometry_maybe (Lisp_Object glyph_or_ii, struct window* w); @@ -530,7 +530,7 @@ struct Lisp_Image_Instance Lisp_Object parent; enum image_instance_type type; unsigned int x_offset, y_offset; /* for layout purposes */ - unsigned int width, height, margin_width; + int width, height, margin_width; unsigned long display_hash; /* Hash value representing the structure of the image_instance when it was last displayed. */ @@ -980,8 +980,8 @@ Lisp_Object allocate_glyph (enum glyph_type type, Lisp_Object property, Lisp_Object locale)); void query_string_geometry ( Lisp_Object string, Lisp_Object face, - unsigned int* width, unsigned int* height, - unsigned int* descent, Lisp_Object domain); + int* width, int* height, int* descent, + Lisp_Object domain); Lisp_Object query_string_font (Lisp_Object string, Lisp_Object face, Lisp_Object domain); Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object device); diff --git a/src/gpmevent.c b/src/gpmevent.c index 64df9ab..4c8b809 100644 --- a/src/gpmevent.c +++ b/src/gpmevent.c @@ -309,7 +309,7 @@ tty_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type } static Lisp_Object -tty_selection_exists_p (Lisp_Object selection) +tty_selection_exists_p (Lisp_Object selection, Lisp_Object selection_type) { return (Qt); } @@ -317,7 +317,8 @@ tty_selection_exists_p (Lisp_Object selection) #if 0 static Lisp_Object -tty_own_selection (Lisp_Object selection_name, Lisp_Object selection_value) +tty_own_selection (Lisp_Object selection_name, Lisp_Object selection_value, + Lisp_Object how_to_add, Lisp_Object selection_type) { /* There is no way to do this cleanly - the GPM selection ** 'protocol' (actually the TIOCLINUX ioctl) requires a start and diff --git a/src/gui-msw.c b/src/gui-msw.c index 503c631..db63c2a 100644 --- a/src/gui-msw.c +++ b/src/gui-msw.c @@ -133,7 +133,7 @@ otherwise it is an integer representing a ShowWindow flag: TO_EXTERNAL_FORMAT (LISP_STRING, current_dir, C_STRING_ALLOCA, f, Qfile_name); -#ifdef __CYGWIN32__ +#ifdef CYGWIN CYGWIN_WIN32_PATH (f, path); #else path = f; @@ -145,7 +145,7 @@ otherwise it is an integer representing a ShowWindow flag: TO_EXTERNAL_FORMAT (LISP_STRING, document, C_STRING_ALLOCA, f, Qfile_name); -#ifdef __CYGWIN32__ +#ifdef CYGWIN CYGWIN_WIN32_PATH (f, doc); #else doc = f; diff --git a/src/hash.c b/src/hash.c index 71e3b44..41b9570 100644 --- a/src/hash.c +++ b/src/hash.c @@ -52,6 +52,25 @@ memory_hash (const void *xv, size_t size) return h; } +unsigned long +string_hash (const char *xv) +{ + unsigned int h = 0; + unsigned const char *x = (unsigned const char *) xv; + + if (!x) return 0; + + while (*x) + { + unsigned int g; + h = (h << 4) + *x++; + if ((g = h & 0xf0000000) != 0) + h = (h ^ (g >> 24)) ^ g; + } + + return h; +} + /* Return a suitable size for a hash table, with at least SIZE slots. */ static size_t hash_table_size (size_t requested_size) diff --git a/src/inline.c b/src/inline.c index 24cd10f..916b94f 100644 --- a/src/inline.c +++ b/src/inline.c @@ -69,7 +69,6 @@ Boston, MA 02111-1307, USA. */ #endif #ifdef HAVE_POSTGRESQL -#include POSTGRES_INCLUDE (libpq-fe.h) #include "postgresql.h" #endif diff --git a/src/insdel.c b/src/insdel.c index 8849225..176371d 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -200,7 +200,6 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" -#include #include "buffer.h" #include "device.h" diff --git a/src/lisp.h b/src/lisp.h index 28a47e0..10bc496 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -41,6 +41,7 @@ Boston, MA 02111-1307, USA. */ #include #include /* offsetof */ #include +#include /* ---- Dynamic arrays ---- */ @@ -220,7 +221,7 @@ void xfree (void *); #ifdef USE_ASSERTIONS /* Highly dubious kludge */ /* (thanks, Jamie, I feel better now -- ben) */ -DECLARE_DOESNT_RETURN (assert_failed (const char *, int, const char *)); +void assert_failed (const char *, int, const char *); # define abort() (assert_failed (__FILE__, __LINE__, "abort()")) # define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x)) #else @@ -944,7 +945,7 @@ Bytecount charcount_to_bytecount (const Bufbyte *ptr, Charcount len); #define string_byte_addr(s, i) (&((s)->data[i])) #define set_string_length(s, len) ((void) ((s)->size = (len))) #define set_string_data(s, ptr) ((void) ((s)->data = (ptr))) -#define set_string_byte(s, i, c) ((void) ((s)->data[i] = (c))) +#define set_string_byte(s, i, b) ((void) ((s)->data[i] = (b))) void resize_string (Lisp_String *s, Bytecount pos, Bytecount delta); @@ -966,7 +967,7 @@ void set_string_char (Lisp_String *s, Charcount i, Emchar c); # define string_char_length(s) string_length (s) # define string_char(s, i) ((Emchar) string_byte (s, i)) # define string_char_addr(s, i) string_byte_addr (s, i) -# define set_string_char(s, i, c) set_string_byte (s, i, c) +# define set_string_char(s, i, c) set_string_byte (s, i, (Bufbyte)c) #endif /* not MULE */ @@ -1179,7 +1180,7 @@ XCHAR (Lisp_Object obj) #else -#define XCHAR(x) XCHARVAL (x) +#define XCHAR(x) ((Emchar)XCHARVAL (x)) #endif @@ -1388,7 +1389,10 @@ enum weak_list_type /* element disappears if it's a cons and its car is unmarked. */ WEAK_LIST_KEY_ASSOC, /* element disappears if it's a cons and its cdr is unmarked. */ - WEAK_LIST_VALUE_ASSOC + WEAK_LIST_VALUE_ASSOC, + /* element disappears if it's a cons and neither its car nor + its cdr is marked. */ + WEAK_LIST_FULL_ASSOC }; struct weak_list @@ -1612,7 +1616,7 @@ void signal_quit (void); #define HASH9(a,b,c,d,e,f,g,h,i) (GOOD_HASH * HASH8 (a,b,c,d,e,f,g,h) + (i)) #define LISP_HASH(obj) ((unsigned long) LISP_TO_VOID (obj)) -unsigned long string_hash (const void *xv); +unsigned long string_hash (const char *xv); unsigned long memory_hash (const void *xv, size_t size); unsigned long internal_hash (Lisp_Object obj, int depth); unsigned long internal_array_hash (Lisp_Object *arr, int size, int depth); @@ -2063,6 +2067,7 @@ void stuff_buffered_input (Lisp_Object); /* Defined in console-msw.c */ EXFUN (Fmswindows_message_box, 3); +extern int mswindows_message_outputted; /* Defined in data.c */ DECLARE_DOESNT_RETURN (c_write_error (Lisp_Object)); @@ -2800,7 +2805,7 @@ EXFUN (Fwiden, 1); extern Lisp_Object Q_style, Qabort, Qactually_requested; extern Lisp_Object Qactivate_menubar_hook; -extern Lisp_Object Qafter, Qall, Qand; +extern Lisp_Object Qafter, Qall, Qand, Qappend; extern Lisp_Object Qarith_error, Qarrayp, Qassoc, Qat, Qautodetect, Qautoload; extern Lisp_Object Qbackground, Qbackground_pixmap, Qbad_variable, Qbefore; extern Lisp_Object Qbeginning_of_buffer, Qbig5, Qbinary; @@ -2815,8 +2820,8 @@ extern Lisp_Object Qcenter, Qcircular_list, Qcircular_property_list; extern Lisp_Object Qcoding_system_error; extern Lisp_Object Qcolor, Qcolor_pixmap_image_instance_p; extern Lisp_Object Qcolumns, Qcommand, Qcommandp, Qcompletion_ignore_case; -extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcr, Qcritical; -extern Lisp_Object Qcrlf, Qctext, Qcurrent_menubar, Qctext, Qcursor; +extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcopies, Qcr; +extern Lisp_Object Qcritical, Qcrlf, Qctext, Qcurrent_menubar, Qctext, Qcursor; extern Lisp_Object Qcyclic_variable_indirection, Qdata, Qdead, Qdecode; extern Lisp_Object Qdefault, Qdefun, Qdelete, Qdelq, Qdevice, Qdevice_live_p; extern Lisp_Object Qdialog; @@ -2830,7 +2835,8 @@ extern Lisp_Object Qexternal_debugging_output, Qface, Qfeaturep; extern Lisp_Object Qfile_name, Qfile_error; extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output; extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground; -extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfuncall, Qfunction; +extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfrom_page, Qfull_assoc; +extern Lisp_Object Qfuncall, Qfunction; extern Lisp_Object Qgap_overhead, Qgeneric, Qgeometry, Qglobal, Qheight; extern Lisp_Object Qhelp, Qhighlight, Qhorizontal, Qicon; extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qignore, Qimage, Qinfo; @@ -2876,10 +2882,10 @@ extern Lisp_Object Qsignal, Qsimple, Qsingularity_error, Qsize, Qspace; extern Lisp_Object Qspecifier, Qstandard_input, Qstandard_output, Qstart_open; extern Lisp_Object Qstream, Qstring, Qstring_lessp, Qsubwindow; extern Lisp_Object Qsubwindow_image_instance_p; -extern Lisp_Object Qsymbol, Qsyntax, Qt, Qterminal, Qtest, Qtext; -extern Lisp_Object Qtext_image_instance_p, Qthis_command, Qtimeout, Qtimestamp; -extern Lisp_Object Qtoolbar, Qtop, Qtop_margin, Qtop_level; -extern Lisp_Object Qtrue_list_p, Qtty, Qtype; +extern Lisp_Object Qsymbol, Qsyntax, Qt, Qterminal, Qtest; +extern Lisp_Object Qtext, Qtext_image_instance_p, Qthis_command, Qtimeout; +extern Lisp_Object Qtimestamp, Qtoolbar, Qtop, Qtop_margin, Qtop_level; +extern Lisp_Object Qto_page, Qtrue_list_p, Qtty, Qtype; extern Lisp_Object Qunbound, Qundecided, Qundefined, Qunderflow_error; extern Lisp_Object Qunderline, Qunimplemented, Quser_files_and_directories; extern Lisp_Object Qvalue_assoc, Qvalues; diff --git a/src/lread.c b/src/lread.c index eebde66..fb92e3f 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1029,7 +1029,7 @@ locate_file_in_directory_mapper (char *fn, void *arg) if (closure->storeptr) *closure->storeptr = build_string (fn); -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE /* If we actually opened the file, set close-on-exec flag on the new descriptor so that subprocesses can't whack at it. */ diff --git a/src/lrecord.h b/src/lrecord.h index cbb8517..9801556 100644 --- a/src/lrecord.h +++ b/src/lrecord.h @@ -215,6 +215,7 @@ enum lrecord_type lrecord_type_ldap, lrecord_type_pgconn, lrecord_type_pgresult, + lrecord_type_devmode, lrecord_type_count /* must be last */ }; diff --git a/src/lstream.c b/src/lstream.c index 801a0c1..29427db 100644 --- a/src/lstream.c +++ b/src/lstream.c @@ -26,7 +26,6 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" -#include #include "buffer.h" #include "insdel.h" diff --git a/src/m/arm.h b/src/m/arm.h index fe9b01b..897845a 100644 --- a/src/m/arm.h +++ b/src/m/arm.h @@ -87,12 +87,7 @@ Boston, MA 02111-1307, USA. */ #define TEXT_START 0 #endif /* USG */ - -#ifdef MSDOS -#define NO_REMAP -#endif - -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #define VIRT_ADDR_VARIES #define DATA_END get_data_end () #define DATA_START get_data_start () diff --git a/src/m/delta.h b/src/m/delta.h index 27078f5..a05b005 100644 --- a/src/m/delta.h +++ b/src/m/delta.h @@ -74,20 +74,6 @@ Boston, MA 02111-1307, USA. */ #define NO_REMAP -/* Some really obscure 4.2-based systems (like Sequent DYNIX) - * do not support asynchronous I/O (using SIGIO) on sockets, - * even though it works fine on tty's. If you have one of - * these systems, define the following, and then use it in - * config.h (or elsewhere) to decide when (not) to use SIGIO. - * - * You'd think this would go in an operating-system description file, - * but since it only occurs on some, but not all, BSD systems, the - * reasonable place to select for it is in the machine description - * file. - */ - -/* #define NO_SOCK_SIGIO */ - /* Machine specific stuff */ #define HAVE_PTYS diff --git a/src/m/intel386.h b/src/m/intel386.h index 481fade..da59f6d 100644 --- a/src/m/intel386.h +++ b/src/m/intel386.h @@ -152,10 +152,6 @@ NOTE-END */ #endif /* USG */ #endif /* not XENIX */ -#ifdef MSDOS -#define NO_REMAP -#endif - #ifdef linux /* libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared library, */ /* we cannot get the maximum address for brk */ diff --git a/src/m/nh3000.h b/src/m/nh3000.h index 89ed532..05c8e80 100644 --- a/src/m/nh3000.h +++ b/src/m/nh3000.h @@ -78,17 +78,3 @@ Boston, MA 02111-1307, USA. */ code will not be sharable; but that's better than failing completely. */ #define NO_REMAP - -/* Some really obscure 4.2-based systems (like Sequent DYNIX) - * do not support asynchronous I/O (using SIGIO) on sockets, - * even though it works fine on tty's. If you have one of - * these systems, define the following, and then use it in - * config.h (or elsewhere) to decide when (not) to use SIGIO. - * - * You'd think this would go in an operating-system description file, - * but since it only occurs on some, but not all, BSD systems, the - * reasonable place to select for it is in the machine description - * file. - */ - -/* #define NO_SOCK_SIGIO */ diff --git a/src/m/nh4000.h b/src/m/nh4000.h index 8d9be7f..63b3bbe 100644 --- a/src/m/nh4000.h +++ b/src/m/nh4000.h @@ -77,17 +77,3 @@ Boston, MA 02111-1307, USA. */ code will not be sharable; but that's better than failing completely. */ #define NO_REMAP - -/* Some really obscure 4.2-based systems (like Sequent DYNIX) - * do not support asynchronous I/O (using SIGIO) on sockets, - * even though it works fine on tty's. If you have one of - * these systems, define the following, and then use it in - * config.h (or elsewhere) to decide when (not) to use SIGIO. - * - * You'd think this would go in an operating-system description file, - * but since it only occurs on some, but not all, BSD systems, the - * reasonable place to select for it is in the machine description - * file. - */ - -/* #define NO_SOCK_SIGIO */ diff --git a/src/m/sequent.h b/src/m/sequent.h index e4b7028..95d7f6a 100644 --- a/src/m/sequent.h +++ b/src/m/sequent.h @@ -131,6 +131,7 @@ NOTE-END */ * config.h (or elsewhere) to decide when (not) to use SIGIO. */ +/* Note: This definition not used under XEmacs */ #define NO_SOCK_SIGIO /* Define how to search all pty names. diff --git a/src/m/template.h b/src/m/template.h index dc5c9ea..e6cf3c3 100644 --- a/src/m/template.h +++ b/src/m/template.h @@ -69,21 +69,6 @@ Boston, MA 02111-1307, USA. */ #define NO_REMAP -/* Some really obscure 4.2-based systems (like Sequent DYNIX) - * do not support asynchronous I/O (using SIGIO) on sockets, - * even though it works fine on tty's. If you have one of - * these systems, define the following, and then use it in - * config.h (or elsewhere) to decide when (not) to use SIGIO. - * - * You'd think this would go in an operating-system description file, - * but since it only occurs on some, but not all, BSD systems, the - * reasonable place to select for it is in the machine description - * file. - */ - -#define NO_SOCK_SIGIO - - /* After adding support for a new system, modify the large case statement in the `configure' script to recognize reasonable configuration names, and add a description of the system to diff --git a/src/m/windowsnt.h b/src/m/windowsnt.h index a20bce5..6277d07 100644 --- a/src/m/windowsnt.h +++ b/src/m/windowsnt.h @@ -89,20 +89,6 @@ Boston, MA 02111-1307, USA. */ /* #define NO_REMAP */ -/* Some really obscure 4.2-based systems (like Sequent DYNIX) - * do not support asynchronous I/O (using SIGIO) on sockets, - * even though it works fine on tty's. If you have one of - * these systems, define the following, and then use it in - * config.h (or elsewhere) to decide when (not) to use SIGIO. - * - * You'd think this would go in an operating-system description file, - * but since it only occurs on some, but not all, BSD systems, the - * reasonable place to select for it is in the machine description - * file. - */ - -/* #define NO_SOCK_SIGIO */ - /* After adding support for a new system, modify the large case statement in the `configure' script to recognize reasonable configuration names, and add a description of the system to diff --git a/src/mem-limits.h b/src/mem-limits.h index a7625d0..fb6f16b 100644 --- a/src/mem-limits.h +++ b/src/mem-limits.h @@ -38,10 +38,6 @@ Boston, MA 02111-1307, USA. */ #include #endif -#ifdef MSDOS -#include -#endif - /* Some systems need this before . */ #include @@ -70,16 +66,14 @@ extern int etext, __data_start; weak_symbol (__data_start) #ifndef BSD4_2 #ifndef USG -#ifndef MSDOS -#ifndef WINDOWSNT -#ifndef __CYGWIN32__ +#ifndef WIN32_NATIVE +#ifndef CYGWIN #if defined(__linux__) && defined(powerpc) /*Added Kaoru Fukui*/ #else /*Added Kaoru Fukui*/ #include #endif /*Added by Fukui*/ -#endif /* not __CYGWIN32__ */ -#endif /* not WINDOWSNT */ -#endif /* not MSDOS */ +#endif /* not CYGWIN */ +#endif /* not WIN32_NATIVE */ #endif /* not USG */ #else /* if BSD4_2 */ #include @@ -96,7 +90,7 @@ typedef void *POINTER; typedef char *POINTER; #endif -#ifndef __CYGWIN32__ +#ifndef CYGWIN typedef unsigned long SIZE; #endif @@ -169,7 +163,7 @@ get_lim_data (void) } #else /* not USG */ -#if defined( WINDOWSNT ) +#if defined( WIN32_NATIVE ) static void get_lim_data (void) @@ -181,22 +175,11 @@ get_lim_data (void) #else #if !defined (BSD4_2) && !defined (__osf__) -#ifdef MSDOS -void -get_lim_data (void) -{ - _go32_dpmi_meminfo info; - - _go32_dpmi_get_free_memory_information (&info); - lim_data = info.available_memory; -} -#else /* not MSDOS */ static void get_lim_data (void) { lim_data = vlimit (LIM_DATA, -1); } -#endif /* not MSDOS */ #else /* BSD4_2 */ @@ -213,7 +196,7 @@ get_lim_data (void) #endif } #endif /* BSD4_2 */ -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ #endif /* not USG */ #endif /* not NO_LIM_DATA */ #endif /* not HEAP_IN_DATA */ diff --git a/src/menubar-msw.c b/src/menubar-msw.c index 7d5b4de..33f456a 100644 --- a/src/menubar-msw.c +++ b/src/menubar-msw.c @@ -78,7 +78,6 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" -#include #include "buffer.h" #include "commands.h" @@ -126,7 +125,7 @@ static HMENU top_level_menu; of not hitting an error, maxlen should be >= 2*len + 3. */ Bytecount -msw_translate_menu_or_dialog_item (Bufbyte *item, Bytecount len, +mswindows_translate_menu_or_dialog_item (Bufbyte *item, Bytecount len, Bytecount maxlen, Emchar *accel, Lisp_Object error_name) { @@ -209,7 +208,7 @@ displayable_menu_item (Lisp_Object gui_item, int bar_p, Emchar *accel) /* Left flush part of the string */ ll = gui_item_display_flush_left (gui_item, buf, MAX_MENUITEM_LENGTH); - ll = msw_translate_menu_or_dialog_item ((Bufbyte *) buf, ll, + ll = mswindows_translate_menu_or_dialog_item ((Bufbyte *) buf, ll, MAX_MENUITEM_LENGTH, accel, XGUI_ITEM (gui_item)->name); @@ -668,7 +667,7 @@ menu_cleanup (struct frame *f) } int -msw_char_is_accelerator (struct frame *f, Emchar ch) +mswindows_char_is_accelerator (struct frame *f, Emchar ch) { Lisp_Object hash = FRAME_MSWINDOWS_MENU_HASH_TABLE (f); diff --git a/src/mule-canna.c b/src/mule-canna.c index 3803c9d..249e21d 100644 --- a/src/mule-canna.c +++ b/src/mule-canna.c @@ -1,4 +1,4 @@ -/* CANNA interface +/* CANNA interface -*- coding: euc-jp -*- Copyright (C) 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. @@ -190,6 +190,7 @@ static int IRCP_context; static Lisp_Object storeResults (unsigned char *, int, jrKanjiStatus *); static Lisp_Object kanjiYomiList (int, int); +static Lisp_Object CANNA_mode_keys (void); #ifdef CANNA_MULE static void m2c (unsigned char *, int, unsigned char *); @@ -326,10 +327,9 @@ No separator will be used otherwise. } /* For whatever reason, calling Fding directly from libCanna loses */ -static void call_Fding() +static void +call_Fding (void) { - extern Lisp_Object Fding(); - Fding (Qnil, Qnil, Qnil); } @@ -421,8 +421,7 @@ If nil is specified for each arg, the default value will be used. } else { - extern void (*jrBeepFunc)(); - Lisp_Object CANNA_mode_keys (); + extern void (*jrBeepFunc) (void); jrBeepFunc = call_Fding; @@ -535,7 +534,7 @@ Change Japanese pre-edit mode. return val; } -Lisp_Object +static Lisp_Object CANNA_mode_keys (void) { #define CANNAWORKBUFSIZE 32 diff --git a/src/mule-mcpath.c b/src/mule-mcpath.c deleted file mode 100644 index 9ab81a6..0000000 --- a/src/mule-mcpath.c +++ /dev/null @@ -1,306 +0,0 @@ -/* Support for Non-ASCII Path Name - Copyright (C) 1985, 1986, 1992, 1993, 1995 Free Software Foundation, Inc. - Copyright (C) 1995 Sun Microsystems, Inc. - -This file is part of XEmacs. - -XEmacs is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -XEmacs is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with XEmacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* Synched up with: Mule 2.3. Not in FSF. */ - -/* mcpath.h should be included in config.h */ -#include -#include "lisp.h" - -#include "sysfile.h" -#include "buffer.h" -#include "mule.h" - -Lisp_Object Qpathname_coding_system = 0; - -static void -mcpath_encode_code (Lisp_Coding_System *cp) -{ - Lisp_Object coding_system; - - coding_system = Fsymbol_value (Qpathname_coding_system); - - mule_encode_code (coding_system, cp); - CODE_CNTL (cp) |= CC_END; -} - -static int -mule_encode_path_1 (unsigned char *src, unsigned int srcsize, - unsigned char *dst, unsigned int dstsize) -{ - Lisp_Coding_System code; - - mcpath_encode_code (&code); - if (CODE_TYPE (&code) > MULE_AUTOCONV) - { - unsigned char *buf; - - /* get_conversion_buffer () is not */ - /* re-entrant. */ - buf = (unsigned char *) alloca (MULE_ENCODE_BUF_SIZE (srcsize, &code)); - if (buf) - { - int len; - Lisp_Object dummy = Qnil; - - len = mule_encode (&code, src, buf, srcsize, &dummy); - if (!CODE_CHAR (&code) && len <= dstsize) - { - memcpy (dst, buf, len); - return len; - } - } - } - return -1; /* use original */ -} - -static unsigned char * -mule_decode_path_1 (unsigned char *src, unsigned char *dst, - unsigned int dstsize) -{ - Lisp_Coding_System code; - - mcpath_encode_code (&code); - if (CODE_TYPE (&code) > MULE_AUTOCONV) - { - int len; - unsigned char *buf; - - len = strlen (src) + 1; /* + 1 for '\0' */ - - /* get_conversion_buffer () is not */ - /* re-entrant. */ - buf = (unsigned char *) alloca (MULE_DECODE_BUF_SIZE (len, &code)); - if (buf) - { - CODE_CNTL (&code) |= CC_END; - len = mule_decode (&code, src, buf, len); - if (!CODE_CHAR (&code) && len <= dstsize) - { - memcpy (dst, buf, len); /* len should include '\0' */ - return dst; - } - } - } - return src; -} - -static unsigned char * -mule_decode_path (unsigned char *path, unsigned char ext_path[MC_MAXPATHLEN]) -{ - return - (Qpathname_coding_system - ? mule_decode_path_1 (path, ext_path, MC_MAXPATHLEN) - : path); /* in case of before initialization */ -} - -static unsigned char * -mule_encode_path (unsigned char *path, unsigned char *encode_buffer, - unsigned int size) -{ - int len; - - len = mule_encode_path_1 (path, strlen (path), encode_buffer, size); - if (len > 0) - path = encode_buffer; -#ifdef MSDOS - /* convert the MSDOS style path delimiter to the UNIX style. Note - that now the code is *internal*, so we can simply compare each - character with '\\'. And this operation will alter the contents - of Lisp Object, PATH. */ - { - unsigned char *p = path; - - while (*p) - { - if (*p == '\\') - *p = '/'; - p++; - } - } -#endif /* MSDOS */ - return path; -} - -#if 0 /* example of how they do it (similar junk deleted) ... */ - -int -mc_creat (unsigned char *path, int mode) -{ - unsigned char buffer[MC_MAXPATHLEN]; - return creat (mule_decode_path (path, buffer), mode); -} - -int -mc_readlink (unsigned char *path, unsigned char *buf, int size) -{ - unsigned char buffer[MC_MAXPATHLEN], buffer2[MAXPATHLEN]; - int nread; - - nread = readlink (mule_decode_path (path, buffer), buffer2, MAXPATHLEN); - if (nread > 0) - { - int len; - unsigned char *p; - - len = mule_encode_path_1 (buffer2, nread, buffer, sizeof (buffer)); - if (0 <= len && len <= size) - { - memcpy (buf, buffer, len); - return len; - } - } - return -1; -} - -int -mc_chdir (unsigned char *path) -{ - unsigned char buffer[MC_MAXPATHLEN]; - - path = mule_decode_path (path, buffer); - -#ifdef MSDOS - if ((path[0] != 0) && (path[1] == ':')) - { - int drive = (tolower (path[0]) - 'a'); - if (getdisk () != drive) - setdisk (drive); - } - - /* If path != "/" and path != "a:/" and path ends with slash, remove - it. */ - { - int len = strlen (path); - - if (strcmp (path + 1, ":/") && (len > 1) && (path[len - 1] == '/')) - { - if (path != buffer) /* It is not good to modify original path. */ - { - memcpy (buffer, path, len - 1); /* no need to copy last /. */ - path = buffer; - } - path[len - 1] = 0; - } - } -#endif /* MSDOS */ - - return chdir (path); -} - -#ifdef MSDOS -#ifndef HAVE_GETWD -unsigned char * -mc_getcwd (unsigned char *null, size_t size) -{ - unsigned char buffer[MAXPATHLEN]; - unsigned char *path; - - path = (unsigned char *) getcwd ((char *)buffer, MAXPATHLEN); - if (path) - { - /* here, should be (path == buffer). */ - path = (unsigned char *) xmalloc (MC_MAXPATHLEN); /* MSDOS */ - if (path) - { - int len; - int buffer_length = strlen (buffer) + 1; - - len = mule_encode_path_1 (buffer, buffer_length, path, MC_MAXPATHLEN); - if (len < 0) - { - /* conversion failed. use value that is returned from system. */ - memcpy (path, buffer, buffer_length); - } - } - } - return path; -} -#else /* HAVE_GETWD */ -unsigned char * -mc_getwd (unsigned char path[]) -{ - unsigned char *p; - - p = getwd (path); - if (p) - { - unsigned char buffer[MC_MAXPATHLEN]; - int len; - - len = mule_encode_path_1 (path, strlen (path) + 1, buffer, sizeof buffer); - if (len > 0) - { - memcpy (path, buffer, len); - } - } - return p; -} -#endif /* HAVE_GETWD */ -#endif /* MSDOS */ - -/* In callproc.c, execvp() is called like this: - * execvp (new_argv[0], new_argv); - * following implement depends this. - */ -#ifndef NO_MC_EXECVP -void -mc_execvp (unsigned char *path, unsigned char *argv[]) -{ - unsigned char buffer[MC_MAXPATHLEN]; - argv[0] = path = mule_decode_path (path, buffer); - execvp (path, argv); -} -#endif /* !NO_MC_EXECVP */ - -static DIRENTRY mcpath_directory_entry; -DIRENTRY * -mc_readdir (DIR *d) -{ - SYSTEM_DIRENTRY *sp; - DIRENTRY *dp = &mcpath_directory_entry; - - sp = readdir (d); - if (!sp) return 0; - -#ifndef MSDOS - dp->d_ino = sp->d_ino; -#endif /* MSDOS */ - { /* copy d_name with conversion. */ - int len; - - len = mule_encode_path_1 (sp->d_name, NAMLEN (sp), - dp->d_name, sizeof (dp->d_name) - 1); - if (len < 0) - { - len = NAMLEN (sp); -#ifdef MCPATH_ASSERT - assert (len < sizeof (dp->d_name)); -#endif - memcpy (dp->d_name, sp->d_name, len); - } - dp->d_name[len] = 0; - } - return dp; -} - -#endif /* 0 */ - diff --git a/src/mule-mcpath.h b/src/mule-mcpath.h deleted file mode 100644 index 0033b62..0000000 --- a/src/mule-mcpath.h +++ /dev/null @@ -1,95 +0,0 @@ -/* Support for Non-ASCII Path Name - Copyright (C) 1985, 1986, 1995 Free Software Foundation, Inc. - Copyright (C) 1995 Sun Microsystems, Inc. - -This file is part of XEmacs. - -XEmacs is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -XEmacs is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with XEmacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* Synched up with: Mule 2.3. Not in FSF. */ - -/* This part cannot be surround with #ifdef emacs, because it is needed */ -/* during generate xmakefile. */ -#ifndef MCPATH -# define MCPATH -#endif /* !MCPATH */ - -/* not to confuse while compiling etc/*.c */ -#ifdef emacs -#ifdef MCPATH -# ifndef _MCPATH_H /* enable to include twice */ - -#if 1 - -/* !!! This page is copied from dired.c except that DIRENTRY is - changed to SYSTEM_DIRENTRY. Don't modify this page. */ - -#include -#include -#include - -/* The d_nameln member of a struct dirent includes the '\0' character - on some systems, but not on others. What's worse, you can't tell - at compile-time which one it will be, since it really depends on - the sort of system providing the filesystem you're reading from, - not the system you are running on. Paul Eggert - says this occurs when Emacs is running on a - SunOS 4.1.2 host, reading a directory that is remote-mounted from a - Solaris 2.1 host and is in a native Solaris 2.1 filesystem. - - Since applying strlen to the name always works, we'll just do that. */ -#define NAMLEN(p) strlen (p->d_name) - -#ifdef SYSV_SYSTEM_DIR - -#include -#define SYSTEM_DIRENTRY struct dirent - -#else /* not SYSV_SYSTEM_DIR */ - -#ifdef NONSYSTEM_DIR_LIBRARY -#include "ndir.h" -#else /* not NONSYSTEM_DIR_LIBRARY */ -#ifdef MSDOS -#include -#else -#include -#endif -#endif /* not NONSYSTEM_DIR_LIBRARY */ - -#ifndef MSDOS -#define SYSTEM_DIRENTRY struct direct - -extern DIR *opendir (); -extern struct direct *readdir (); - -#endif /* not MSDOS */ -#endif /* not SYSV_SYSTEM_DIR */ -#endif - - /* maximum buffer size to do conversion. */ -#define MCPATH_BUFSIZ(s) (((s) * 3) + 256) -#define MC_MAXPATHLEN MCPATH_BUFSIZ (MAXPATHLEN) - -#define DIRENTRY struct mcpath_direntry -struct mcpath_direntry -{ - /* emacs 19.28 uses d_ino and d_name. */ -#ifndef MSDOS - int d_ino; -#endif /* not MSDOS */ - unsigned char d_name [MCPATH_BUFSIZ (MAXNAMLEN) + 1]; -}; diff --git a/src/mule-wnnfns.c b/src/mule-wnnfns.c index 50d2840..de2f6bd 100644 --- a/src/mule-wnnfns.c +++ b/src/mule-wnnfns.c @@ -1,4 +1,4 @@ -/* +/* -*- coding: iso-2022-jp -*- Copyright (C) 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. diff --git a/src/ndir.h b/src/ndir.h index 9684594..d05a05e 100644 --- a/src/ndir.h +++ b/src/ndir.h @@ -27,11 +27,11 @@ Boston, MA 02111-1307, USA. */ #define INCLUDED_ndir_h_ #define DIRBLKSIZ 512 /* size of directory block */ -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #define MAXNAMLEN 255 -#else /* not WINDOWSNT */ +#else /* not WIN32_NATIVE */ #define MAXNAMLEN 15 /* maximum filename length */ -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */ struct direct /* data from readdir() */ diff --git a/src/nt.c b/src/nt.c index bf46ba2..04dd422 100644 --- a/src/nt.c +++ b/src/nt.c @@ -25,8 +25,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA /* Sync'ed with Emacs 19.34.6 by Marc Paquette */ #include - -#undef signal #define getwd _getwd #include "lisp.h" #undef getwd @@ -35,22 +33,12 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "syssignal.h" #include "sysproc.h" #include "sysfile.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "syspwd.h" +#include "sysdir.h" #include "syswindows.h" #include "nt.h" -#include #include "ntheap.h" @@ -1075,16 +1063,22 @@ opendir (const char *filename) return dirp; } -void +int closedir (DIR *dirp) { + BOOL retval; + /* If we have a find-handle open, close it. */ if (dir_find_handle != INVALID_HANDLE_VALUE) { - FindClose (dir_find_handle); + retval = FindClose (dir_find_handle); dir_find_handle = INVALID_HANDLE_VALUE; } xfree (dirp); + if (retval) + return 0; + else + return -1; } struct direct * @@ -1236,7 +1230,7 @@ convert_time (FILETIME ft) } #else -#if defined(__MINGW32__) && CYGWIN_VERSION_DLL_MAJOR <= 21 +#if defined(MINGW) && CYGWIN_VERSION_DLL_MAJOR <= 21 #define LowPart u.LowPart #define HighPart u.HighPart #endif @@ -1310,7 +1304,7 @@ convert_time (FILETIME uft) return ret; } #endif -#if defined(__MINGW32__) && CYGWIN_VERSION_DLL_MAJOR <= 21 +#if defined(MINGW) && CYGWIN_VERSION_DLL_MAJOR <= 21 #undef LowPart #undef HighPart #endif @@ -1391,22 +1385,16 @@ generate_inode_val (const char * name) #endif -/* stat has been fixed since MSVC 5.0. - Oh, and do not encapsulater stat for non-MS compilers, too */ -/* #### popineau@ese-metz.fr says they still might be broken. - Oh well... Let's add that `1 ||' condition.... --kkm */ /* #### aichner@ecf.teradyne.com reported that with the library provided stat/fstat, (file-exist "d:\\tmp\\") =>> nil, (file-exist "d:\\tmp") =>> t, when d:\tmp exists. Whenever we opt to use non-encapsulated stat(), this should serve as a compatibility test. --kkm */ -#if 1 || defined(_MSC_VER) && _MSC_VER < 1100 - /* Since stat is encapsulated on Windows NT, we need to encapsulate the equally broken fstat as well. */ -int _cdecl -fstat (int handle, struct stat *buffer) +int +mswindows_fstat (int handle, struct stat *buffer) { int ret; BY_HANDLE_FILE_INFORMATION lpFileInfo; @@ -1441,7 +1429,7 @@ fstat (int handle, struct stat *buffer) replace it with our own. This also allows us to calculate consistent inode values without hacks in the main Emacs code. */ int -stat (const char * path, struct stat * buf) +mswindows_stat (const char * path, struct stat * buf) { char * name; WIN32_FIND_DATA wfd; @@ -1627,7 +1615,6 @@ stat (const char * path, struct stat * buf) return 0; } -#endif /* defined(_MSC_VER) && _MSC_VER < 1100 */ /* From callproc.c */ extern Lisp_Object Vbinary_process_input; @@ -1801,7 +1788,7 @@ unsigned signal_block_mask = 0; /* Signal pending mask: bit set to 1 means sig is pending */ unsigned signal_pending_mask = 0; -msw_sighandler msw_sigset (int nsig, msw_sighandler handler) +mswindows_sighandler mswindows_sigset (int nsig, mswindows_sighandler handler) { /* We delegate some signals to the system function */ if (nsig == SIGFPE || nsig == SIGABRT || nsig == SIGINT) @@ -1815,13 +1802,13 @@ msw_sighandler msw_sigset (int nsig, msw_sighandler handler) /* Store handler ptr */ { - msw_sighandler old_handler = signal_handlers[nsig]; + mswindows_sighandler old_handler = signal_handlers[nsig]; signal_handlers[nsig] = handler; return old_handler; } } -int msw_sighold (int nsig) +int mswindows_sighold (int nsig) { if (nsig < 0 || nsig > SIG_MAX) return errno = EINVAL; @@ -1830,7 +1817,7 @@ int msw_sighold (int nsig) return 0; } -int msw_sigrelse (int nsig) +int mswindows_sigrelse (int nsig) { if (nsig < 0 || nsig > SIG_MAX) return errno = EINVAL; @@ -1838,12 +1825,12 @@ int msw_sigrelse (int nsig) signal_block_mask &= ~sigmask(nsig); if (signal_pending_mask & sigmask(nsig)) - msw_raise (nsig); + mswindows_raise (nsig); return 0; } -int msw_sigpause (int nsig) +int mswindows_sigpause (int nsig) { /* This is currently not called, because the only call to sigpause inside XEmacs is with SIGCHLD @@ -1854,7 +1841,7 @@ int msw_sigpause (int nsig) return 0; } -int msw_raise (int nsig) +int mswindows_raise (int nsig) { /* We delegate some raises to the system routine */ if (nsig == SIGFPE || nsig == SIGABRT || nsig == SIGINT) @@ -1920,7 +1907,7 @@ static void CALLBACK timer_proc (UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2) { /* Just raise a signal indicated by dwUser parameter */ - msw_raise (dwUser); + mswindows_raise (dwUser); } /* Divide time in ms specified by IT by DENOM. Return 1 ms @@ -2072,13 +2059,13 @@ open_output_file (file_data *p_file, const char *filename, unsigned long size) return TRUE; } -#if 1 /* !defined(__MINGW32__) */ +#if 1 /* !defined(MINGW) */ /* Return pointer to section header for section containing the given relative virtual address. */ static IMAGE_SECTION_HEADER * rva_to_section (DWORD rva, IMAGE_NT_HEADERS * nt_header) { - /* Synched with FSF 20.6. We added MINGW32 stuff. */ + /* Synched with FSF 20.6. We added MINGW stuff. */ PIMAGE_SECTION_HEADER section; int i; @@ -2107,7 +2094,7 @@ void mswindows_executable_type (const char * filename, int * is_dos_app, int * is_cygnus_app) { - /* Synched with FSF 20.6. We added MINGW32 stuff and casts. */ + /* Synched with FSF 20.6. We added MINGW stuff and casts. */ file_data executable; char * p; @@ -2143,7 +2130,7 @@ mswindows_executable_type (const char * filename, int * is_dos_app, start with a DOS program stub. Note that 16-bit Windows executables use the OS/2 1.x format. */ -#if 0 /* defined( __MINGW32__ ) */ +#if 0 /* defined( MINGW ) */ /* mingw32 doesn't have enough headers to detect cygwin apps, just do what we can. */ FILHDR * exe_header; diff --git a/src/nt.h b/src/nt.h index edc1333..1362d92 100644 --- a/src/nt.h +++ b/src/nt.h @@ -26,20 +26,14 @@ Boston, MA 02111-1307, USA. */ #ifndef INCLUDED_nt_h_ #define INCLUDED_nt_h_ +#include "syswindows.h" + #ifdef DEBUG_XEMACS #define DebPrint(stuff) _DebPrint stuff #else #define DebPrint(stuff) #endif -#define R_OK 4 -#define W_OK 2 -#ifdef X_OK -#undef X_OK -#endif -#define X_OK 1 -#define F_OK 0 - /* ------------------------------------------------------------------------- */ /* child_process.status values */ @@ -145,4 +139,12 @@ void mswindows_executable_type (const char * filename, int * is_dos_app, /* In process-nt.c */ extern int compare_env (const void *strp1, const void *strp2); +void mswindows_set_errno (unsigned long win32_error); +void mswindows_set_last_errno (void); + +void wait_for_termination (HANDLE pid); + +int mswindows_fstat (int handle, struct stat *buffer); +int mswindows_stat (const char * path, struct stat * buf); + #endif /* INCLUDED_nt_h_ */ diff --git a/src/ntheap.h b/src/ntheap.h index 8760f42..bd36dd4 100644 --- a/src/ntheap.h +++ b/src/ntheap.h @@ -26,7 +26,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #ifndef INCLUDED_ntheap_h_ #define INCLUDED_ntheap_h_ -#include +#include "syswindows.h" /* * Heap related stuff. diff --git a/src/ntplay.c b/src/ntplay.c index c19870d..7804418 100644 --- a/src/ntplay.c +++ b/src/ntplay.c @@ -19,10 +19,10 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.*/ #include -#include -#include "sysfile.h" -#include "syswindows.h" #include "lisp.h" + +#include "sysfile.h" +#include "nt.h" #include "nativesound.h" static int play_sound_data_1 (unsigned char *data, int length, diff --git a/src/ntproc.c b/src/ntproc.c index eebf13f..939baf8 100644 --- a/src/ntproc.c +++ b/src/ntproc.c @@ -24,15 +24,6 @@ Boston, MA 02111-1307, USA. /* Adapted for XEmacs by David Hobley */ /* Synced with FSF Emacs 19.34.6 by Marc Paquette */ -#include -#include -#include -#include -#include -#include - -/* must include CRT headers *before* config.h */ -/* #### I don't believe it - martin */ #include #undef signal #undef wait @@ -41,7 +32,6 @@ Boston, MA 02111-1307, USA. #undef kill #include -#include #ifdef HAVE_A_OUT_H #include #endif @@ -111,7 +101,7 @@ void _DebPrint (const char *fmt, ...) #endif } -/* sys_signal moved to nt.c. It's now called msw_signal... */ +/* sys_signal moved to nt.c. It's now called mswindows_signal... */ /* Defined in which conflicts with the local copy */ #define _P_NOWAIT 1 @@ -791,7 +781,7 @@ find_child_console (HWND hwnd, child_process * cp) GetClassName (hwnd, window_class, sizeof (window_class)); if (strcmp (window_class, - msw_windows9x_p() + mswindows_windows9x_p() ? "tty" : "ConsoleWindowClass") == 0) { @@ -884,7 +874,7 @@ sys_kill (int pid, int sig) if (NILP (Vwin32_start_process_share_console) && cp && cp->hwnd) { #if 1 - if (msw_windows9x_p()) + if (mswindows_windows9x_p()) { /* Another possibility is to try terminating the VDM out-right by @@ -1038,12 +1028,6 @@ set_process_dir (const char * dir) /* Some miscellaneous functions that are Windows specific, but not GUI specific (ie. are applicable in terminal or batch mode as well). */ -/* lifted from fileio.c */ -#define CORRECT_DIR_SEPS(s) \ - do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \ - else unixtodos_filename (s); \ - } while (0) - DEFUN ("win32-short-file-name", Fwin32_short_file_name, 1, 1, "", /* Return the short file name version (8.3) of the full path of FILENAME. If FILENAME does not exist, return nil. diff --git a/src/objects-x.c b/src/objects-x.c index 3889347..5c670d5 100644 --- a/src/objects-x.c +++ b/src/objects-x.c @@ -28,7 +28,6 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" -#include #include "console-x.h" #include "objects-x.h" diff --git a/src/postgresql.c b/src/postgresql.c index d2e92a8..00ca1ae 100644 --- a/src/postgresql.c +++ b/src/postgresql.c @@ -92,7 +92,6 @@ TODO (in rough order of priority): */ #if (EMACS_MAJOR_VERSION == 21) && (EMACS_MINOR_VERSION < 2) #define RUNNING_XEMACS_21_1 1 -#define POSTGRES_INCLUDE(file) #endif /* #define POSTGRES_LO_IMPORT_IS_VOID 1 */ @@ -100,16 +99,12 @@ TODO (in rough order of priority): #include "lisp.h" #include "sysdep.h" #include "buffer.h" - -#include POSTGRES_INCLUDE (libpq-fe.h) #include "postgresql.h" #ifdef RUNNING_XEMACS_21_1 /* handle interface changes */ -#define I_HATE_CONST CONST #define PG_OS_CODING FORMAT_FILENAME #define TO_EXTERNAL_FORMAT(a,from,b,to,c) GET_C_STRING_EXT_DATA_ALLOCA(from,FORMAT_FILENAME,to) #else -#define I_HATE_CONST const #ifdef MULE #define PG_OS_CODING Fget_coding_system(Vpg_coding_system) #else @@ -396,7 +391,7 @@ DEFINE_LRECORD_IMPLEMENTATION ("pgresult", pgresult, /* notices */ static void -xemacs_notice_processor (void *arg, I_HATE_CONST char *msg) +xemacs_notice_processor (void *arg, const char *msg) { warn_when_safe (Qpostgresql, Qnotice, "%s", msg); } @@ -725,7 +720,7 @@ Reset connection to the backend asynchronously. } DEFUN ("pq-reset-poll", Fpq_reset_poll, 1, 1, 0, /* -Poll an asynchronous reset for completion +Poll an asynchronous reset for completion. */ (conn)) { @@ -846,12 +841,12 @@ pq::backend-pid Process ID of backend process return build_ext_string (PQoptions(P), PG_OS_CODING); else if (EQ (field, Qpqstatus)) { - ExecStatusType est; + ConnStatusType cst; /* PQstatus Returns the status of the connection. The status can be CONNECTION_OK or CONNECTION_BAD. ConnStatusType PQstatus(PGconn *conn) */ - switch ((est = PQstatus (P))) + switch ((cst = PQstatus (P))) { case CONNECTION_OK: return Qpg_connection_ok; case CONNECTION_BAD: return Qpg_connection_bad; @@ -864,7 +859,7 @@ pq::backend-pid Process ID of backend process #endif /* HAVE_POSTGRESQLV7 */ default: /* they've added a new field we don't know about */ - error ("Help! Unknown exec status code %08x from backend!", est); + error ("Help! Unknown connection status code %08x from backend!", cst); } } else if (EQ (field, Qpqerrormessage)) @@ -1257,7 +1252,7 @@ Returns the command status string from the SQL command that generated the result } DEFUN ("pq-cmd-tuples", Fpq_cmd_tuples, 1, 1, 0, /* -Returns the number of rows affected by the SQL command +Returns the number of rows affected by the SQL command. */ (result)) { @@ -1309,7 +1304,7 @@ Needs to be called only on a connected database connection. } DEFUN ("pq-is-nonblocking", Fpq_is_nonblocking, 1, 1, 0, /* -Return the blocking status of the database connection +Return the blocking status of the database connection. */ (conn)) { @@ -1323,7 +1318,7 @@ Return the blocking status of the database connection } DEFUN ("pq-flush", Fpq_flush, 1, 1, 0, /* -Force the write buffer to be written (or at least try) +Force the write buffer to be written (or at least try). */ (conn)) { @@ -1543,7 +1538,7 @@ The returned string is *not* null-terminated. if (ret == -1) return Qt; /* done! */ else if (!ret) return Qnil; /* no data yet */ else return Fcons (make_int (ret), - make_ext_string (buffer, ret, PG_OS_CODING)); + make_ext_string ((Extbyte *) buffer, ret, PG_OS_CODING)); } DEFUN ("pq-put-nbytes", Fpq_put_nbytes, 2, 2, 0, /* diff --git a/src/postgresql.h b/src/postgresql.h index 213cea2..acfda83 100644 --- a/src/postgresql.h +++ b/src/postgresql.h @@ -10,10 +10,12 @@ Please send patches to this file to me first before submitting them to xemacs-patches. */ -#ifndef XEMACS_POSTGRESQL_H__ -#define XEMACS_POSTGRESQL_H__ 1 +#ifndef INCLUDED_postgresql_h_ +#define INCLUDED_postgresql_h_ 1 -#define BLCKSZ 8192 /* size of a default Postres disk block */ +#include LIBPQ_FE_H_FILE /* main PostgreSQL header file */ + +#define BLCKSZ 8192 /* size of a default Postgres disk block */ /* This file contains the GCC bug workaround code for the private LRECORD types. @@ -57,4 +59,4 @@ DECLARE_LRECORD (pgresult, Lisp_PGresult); #define CHECK_PGRESULT(x) CHECK_RECORD (x, pgresult) #define CONCHECK_PGRESULT(x) CONCHECK_RECORD (x, pgresult) -#endif /* XEMACS_POSTGRESQL_H__ */ +#endif /* INCLUDED_postgresql_h_ */ diff --git a/src/print.c b/src/print.c index 4d1664f..f98c244 100644 --- a/src/print.c +++ b/src/print.c @@ -38,11 +38,10 @@ Boston, MA 02111-1307, USA. */ #include "insdel.h" #include "lstream.h" #include "sysfile.h" -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #include "console-msw.h" #endif -#include #include /* Define if not in float.h */ #ifndef DBL_DIG @@ -106,7 +105,7 @@ FILE *termscript; /* Stdio stream being used for copy of all output. */ int stdout_needs_newline; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE static int no_useful_stderr; #endif @@ -120,19 +119,19 @@ std_handle_out_external (FILE *stream, Lisp_Object lstream, { if (stream) { -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE if (!no_useful_stderr) no_useful_stderr = GetStdHandle (STD_ERROR_HANDLE) == 0 ? 1 : -1; /* we typically have no useful stdout/stderr under windows if we're being invoked graphically. */ if (!noninteractive || no_useful_stderr > 0) - msw_output_console_string (extptr, extlen); + mswindows_output_console_string (extptr, extlen); else #endif { fwrite (extptr, 1, extlen, stream); -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* Q122442 says that pipes are "treated as files, not as devices", and that this is a feature. Before I found that article, I thought it was a bug. Thanks MS, I feel much @@ -170,7 +169,7 @@ std_handle_out_external (FILE *stream, Lisp_Object lstream, called from fatal_error_signal(). 2) (to be really correct) make a new lstream that outputs using - msw_output_console_string(). */ + mswindows_output_console_string(). */ static int std_handle_out_va (FILE *stream, const char *fmt, va_list args) @@ -934,10 +933,8 @@ float_to_string (char *buf, double data) } #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. +/* Print NUMBER to BUFFER. This is equivalent to sprintf(buffer, + "%ld", number), only much faster. BUFFER should accept 24 bytes. This should suffice for the longest numbers on 64-bit machines, including the `-' sign and the trailing @@ -1559,7 +1556,7 @@ This function can be used as the STREAM argument of Fprint() or the like. Under MS Windows, this writes output to the console window (which is created, if necessary), unless XEmacs is being run noninteractively -(i.e. using the `-batch' argument). +\(i.e. using the `-batch' argument). If you have opened a termscript file (using `open-termscript'), then the output also will be logged to this file. diff --git a/src/process-nt.c b/src/process-nt.c index 5518ccb..cad1d18 100644 --- a/src/process-nt.c +++ b/src/process-nt.c @@ -36,9 +36,7 @@ Boston, MA 02111-1307, USA. */ #include "sysdep.h" #include -#ifdef __MINGW32__ #include -#endif #include #ifdef HAVE_SOCKETS #include @@ -53,7 +51,6 @@ struct nt_process_data HANDLE h_process; DWORD dwProcessId; HWND hwnd; /* console window */ - int need_enable_child_signals; }; /* Control how args are quoted to ensure correct parsing by child @@ -422,7 +419,7 @@ find_child_console (HWND hwnd, struct nt_process_data *cp) GetClassName (hwnd, window_class, sizeof (window_class)); if (strcmp (window_class, - msw_windows9x_p () + mswindows_windows9x_p () ? "tty" : "ConsoleWindowClass") == 0) { @@ -543,7 +540,7 @@ send_signal_the_95_way (struct nt_process_data *cp, int pid, int signo) if (NILP (Vmswindows_start_process_share_console) && cp && cp->hwnd) { #if 1 - if (msw_windows9x_p ()) + if (mswindows_windows9x_p ()) { /* Another possibility is to try terminating the VDM out-right by @@ -681,8 +678,8 @@ signal_cannot_launch (Lisp_Object image_file, DWORD err) static void ensure_console_window_exists (void) { - if (msw_windows9x_p ()) - msw_hide_console (); + if (mswindows_windows9x_p ()) + mswindows_hide_console (); } int @@ -770,7 +767,7 @@ nt_create_process (Lisp_Process *p, /* Duplicate the stdout handle for use as stderr */ DuplicateHandle(GetCurrentProcess(), hprocout, GetCurrentProcess(), - &hprocerr, 0, TRUE, DUPLICATE_SAME_ACCESS); + &hprocerr, 0, TRUE, DUPLICATE_SAME_ACCESS); /* Stupid Win32 allows to create a pipe with *both* ends either inheritable or not. We need process ends inheritable, and local @@ -790,6 +787,7 @@ nt_create_process (Lisp_Process *p, int i; Bufbyte **quoted_args; int is_dos_app, is_cygnus_app; + int is_command_shell; int do_quoting = 0; char escape_char = 0; @@ -804,6 +802,30 @@ nt_create_process (Lisp_Process *p, mswindows_executable_type (XSTRING_DATA (program), &is_dos_app, &is_cygnus_app); + { + /* #### Bleeeeeeeeeeeeeeeeech!!!! The command shells appear to + use '^' as a quote character, at least under NT. #### I haven't + tested 95. If it allows no quoting conventions at all, set + escape_char to 0 and the code below will work. (e.g. NT tolerates + no quoting -- this command + + cmd /c "ls "/Program Files"" + + actually works.) */ + + struct gcpro gcpro1, gcpro2; + Lisp_Object progname = Qnil; + + GCPRO2 (program, progname); + progname = Ffile_name_nondirectory (program); + progname = Fdowncase (progname, Qnil); + + is_command_shell = + internal_equal (progname, build_string ("command.com"), 0) + || internal_equal (progname, build_string ("cmd.exe"), 0); + UNGCPRO; + } + #if 0 /* #### we need to port this. */ /* On Windows 95, if cmdname is a DOS app, we invoke a helper @@ -860,7 +882,7 @@ nt_create_process (Lisp_Process *p, if (INTP (Vmswindows_quote_process_args)) escape_char = (char) XINT (Vmswindows_quote_process_args); else - escape_char = is_cygnus_app ? '"' : '\\'; + escape_char = is_command_shell ? '^' : is_cygnus_app ? '"' : '\\'; } /* do argv... */ @@ -879,7 +901,8 @@ nt_create_process (Lisp_Process *p, if (*p == '"') { /* allow for embedded quotes to be escaped */ - arglen++; + if (escape_char) + arglen++; need_quotes = 1; /* handle the case where the embedded quote is already escaped */ if (escape_char_run > 0) @@ -895,7 +918,7 @@ nt_create_process (Lisp_Process *p, need_quotes = 1; } - if (*p == escape_char && escape_char != '"') + if (escape_char && *p == escape_char && escape_char != '"') escape_char_run++; else escape_char_run = 0; @@ -955,7 +978,7 @@ nt_create_process (Lisp_Process *p, #else for ( ; *p; p++) { - if (*p == '"') + if (escape_char && *p == '"') { /* double preceding escape chars if any */ while (escape_char_run > 0) @@ -968,7 +991,7 @@ nt_create_process (Lisp_Process *p, } *parg++ = *p; - if (*p == escape_char && escape_char != '"') + if (escape_char && *p == escape_char && escape_char != '"') escape_char_run++; else escape_char_run = 0; @@ -1120,7 +1143,7 @@ nt_create_process (Lisp_Process *p, } flags = CREATE_SUSPENDED; - if (msw_windows9x_p ()) + if (mswindows_windows9x_p ()) flags |= (!NILP (Vmswindows_start_process_share_console) ? CREATE_NEW_PROCESS_GROUP : CREATE_NEW_CONSOLE); @@ -1168,18 +1191,12 @@ nt_create_process (Lisp_Process *p, CloseHandle (pi.hProcess); } + if (!windowed) + enable_child_signals (pi.hProcess); + ResumeThread (pi.hThread); CloseHandle (pi.hThread); - /* Remember to enable child signals later if this is not a windowed - app. Can't do it right now because that screws up the MKS Toolkit - shell. */ - if (!windowed) - { - NT_DATA(p)->need_enable_child_signals = 10; - kick_status_notify (); - } - return ((int)pi.dwProcessId); } } @@ -1196,18 +1213,6 @@ static void nt_update_status_if_terminated (Lisp_Process* p) { DWORD exit_code; - - if (NT_DATA(p)->need_enable_child_signals > 1) - { - NT_DATA(p)->need_enable_child_signals -= 1; - kick_status_notify (); - } - else if (NT_DATA(p)->need_enable_child_signals == 1) - { - enable_child_signals(NT_DATA(p)->h_process); - NT_DATA(p)->need_enable_child_signals = 0; - } - if (GetExitCodeProcess (NT_DATA(p)->h_process, &exit_code) && exit_code != STILL_ACTIVE) { @@ -1310,14 +1315,6 @@ nt_kill_child_process (Lisp_Object proc, int signo, { Lisp_Process *p = XPROCESS (proc); - /* Enable child signals if necessary. This may lose the first - but it's better than nothing. */ - if (NT_DATA (p)->need_enable_child_signals > 0) - { - enable_child_signals (NT_DATA(p)->h_process); - NT_DATA (p)->need_enable_child_signals = 0; - } - /* Signal error if SIGNO cannot be sent */ validate_signal_number (signo); diff --git a/src/process-unix.c b/src/process-unix.c index f23a9e7..ebe75c6 100644 --- a/src/process-unix.c +++ b/src/process-unix.c @@ -779,7 +779,7 @@ unix_create_process (Lisp_Process *p, UNIX_DATA(p)->subtty = forkin; { -#if !defined(__CYGWIN32__) +#if !defined(CYGWIN) /* child_setup must clobber environ on systems with true vfork. Protect it from permanent change. */ char **save_environ = environ; @@ -938,7 +938,7 @@ unix_create_process (Lisp_Process *p, } /**** End of child code ****/ /**** Back in parent process ****/ -#if !defined(__CYGWIN32__) +#if !defined(CYGWIN) environ = save_environ; #endif } @@ -1855,7 +1855,7 @@ unix_open_multicast_group (Lisp_Object name, Lisp_Object dest, Lisp_Object port, imr.imr_multiaddr.s_addr = htonl (inet_addr ((char *) XSTRING_DATA (dest))); imr.imr_interface.s_addr = htonl (INADDR_ANY); if (setsockopt (rs, IPPROTO_IP, IP_ADD_MEMBERSHIP, - (char *) &imr, sizeof (struct ip_mreq)) < 0) + &imr, sizeof (struct ip_mreq)) < 0) { close (ws); close (rs); @@ -1921,7 +1921,7 @@ unix_open_multicast_group (Lisp_Object name, Lisp_Object dest, Lisp_Object port, /* scope */ if (setsockopt (ws, IPPROTO_IP, IP_MULTICAST_TTL, - (char *) &thettl, sizeof (thettl)) < 0) + &thettl, sizeof (thettl)) < 0) { close (rs); close (ws); diff --git a/src/process.c b/src/process.c index 774f53a..028cfb4 100644 --- a/src/process.c +++ b/src/process.c @@ -107,6 +107,7 @@ struct hash_table *usid_to_process; Lisp_Object Vprocess_list; extern Lisp_Object Vlisp_EXEC_SUFFIXES; +Lisp_Object Vnull_device; @@ -2075,6 +2076,22 @@ nil means don't delete them until `list-processes' is run. delete_exited_processes = 1; + DEFVAR_CONST_LISP ("null-device", &Vnull_device /* +Name of the null device, which differs from system to system. +The null device is a filename that acts as a sink for arbitrary amounts of +data, which is discarded, or as a source for a zero-length file. +It is available on all the systems that we currently support, but with +different names (typically either `/dev/null' or `nul'). + +Note that there is also a /dev/zero on most modern Unix versions (including +Cygwin), which acts like /dev/null when used as a sink, but as a source +it sends a non-ending stream of zero bytes. It's used most often along +with memory-mapping. We don't provide a Lisp variable for this because +the operations needing this are lower level than what ELisp programs +typically do, and in any case no equivalent exists under native MS Windows. +*/ ); + Vnull_device = build_string (NULL_DEVICE); + DEFVAR_LISP ("process-connection-type", &Vprocess_connection_type /* Control type of device used to communicate with subprocesses. Values are nil to use a pipe, or t or `pty' to use a pty. diff --git a/src/process.h b/src/process.h index bb4f682..ed88beb 100644 --- a/src/process.h +++ b/src/process.h @@ -109,7 +109,7 @@ void kick_status_notify (void); void deactivate_process (Lisp_Object proc); -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE int #else void diff --git a/src/realpath.c b/src/realpath.c index 08d32d7..be14a42 100644 --- a/src/realpath.c +++ b/src/realpath.c @@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA. */ #include #endif -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #include #endif @@ -78,7 +78,7 @@ xrealpath (const char *path, char resolved_path []) strcpy (copy_path, path); path = copy_path; max_path = copy_path + PATH_MAX - 2; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* ** In NT we have two different cases: (1) the path name begins ** with a drive letter, e.g., "C:"; and (2) the path name begins diff --git a/src/redisplay-msw.c b/src/redisplay-msw.c index 10a5a15..f53553e 100644 --- a/src/redisplay-msw.c +++ b/src/redisplay-msw.c @@ -985,6 +985,13 @@ mswindows_frame_output_end (struct frame *f) GdiFlush(); } +/* Printer version is more lightweight. */ +static void +msprinter_frame_output_end (struct frame *f) +{ + GdiFlush(); +} + static int mswindows_flash (struct device *d) { @@ -1377,6 +1384,7 @@ console_type_create_redisplay_mswindows (void) CONSOLE_HAS_METHOD (mswindows, output_pixmap); /* redisplay methods - printer */ + CONSOLE_HAS_METHOD (msprinter, frame_output_end); CONSOLE_INHERITS_METHOD (msprinter, mswindows, text_width); CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_display_block); CONSOLE_INHERITS_METHOD (msprinter, mswindows, divider_height); @@ -1385,7 +1393,6 @@ console_type_create_redisplay_mswindows (void) CONSOLE_INHERITS_METHOD (msprinter, mswindows, clear_region); CONSOLE_INHERITS_METHOD (msprinter, mswindows, clear_frame); CONSOLE_INHERITS_METHOD (msprinter, mswindows, frame_output_begin); - CONSOLE_INHERITS_METHOD (msprinter, mswindows, frame_output_end); CONSOLE_INHERITS_METHOD (msprinter, mswindows, bevel_area); CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_string); CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_pixmap); diff --git a/src/redisplay-tty.c b/src/redisplay-tty.c index 80ce04c..0afc25f 100644 --- a/src/redisplay-tty.c +++ b/src/redisplay-tty.c @@ -53,17 +53,12 @@ Boston, MA 02111-1307, USA. */ invoking them correctly. */ /* # include */ /* # include */ -#ifdef __cplusplus -extern "C" { -#endif -extern int tgetent (const char *, const char *); -extern int tgetflag (const char *); -extern int tgetnum (const char *); -extern char *tgetstr (const char *, char **); -extern void tputs (const char *, int, void (*)(int)); -#ifdef __cplusplus -} -#endif +EXTERN_C int tgetent (const char *, const char *); +EXTERN_C int tgetflag (const char *); +EXTERN_C int tgetnum (const char *); +EXTERN_C char *tgetstr (const char *, char **); +EXTERN_C void tputs (const char *, int, void (*)(int)); + #define FORCE_CURSOR_UPDATE(c) send_string_to_tty_console (c, 0, 0) #define OUTPUTN(c, a, n) \ do { \ @@ -1058,12 +1053,12 @@ init_tty_for_redisplay (struct device *d, char *terminal_type) CONSOLE_TTY_DATA (c)->term_entry_buffer = (char *) xmalloc (2044); bufptr = CONSOLE_TTY_DATA (c)->term_entry_buffer; -#if !defined(WIN32) +#ifdef SIGTTOU /* SIGTT* don't exist under win32 */ EMACS_BLOCK_SIGNAL (SIGTTOU); #endif status = tgetent (entry_buffer, terminal_type); -#if !defined(WIN32) +#ifdef SIGTTOU EMACS_UNBLOCK_SIGNAL (SIGTTOU); #endif #if 0 diff --git a/src/redisplay.c b/src/redisplay.c index 5429848..b5a52b3 100644 --- a/src/redisplay.c +++ b/src/redisplay.c @@ -40,7 +40,6 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" -#include #include "buffer.h" #include "commands.h" @@ -64,11 +63,10 @@ Boston, MA 02111-1307, USA. */ #include "file-coding.h" #endif +#include "sysfile.h" + #ifdef HAVE_TTY #include "console-tty.h" -#ifdef HAVE_UNISTD_H -#include /* for isatty() */ -#endif #endif /* HAVE_TTY */ /* Note: We have to be careful throughout this code to properly handle diff --git a/src/s/cygwin32.h b/src/s/cygwin32.h index dd7e7da..c8673c3 100644 --- a/src/s/cygwin32.h +++ b/src/s/cygwin32.h @@ -20,13 +20,14 @@ Boston, MA 02111-1307, USA. */ /* Building under cygwin * - * The approach I have taken with this port is to use primarily the UNIX - * code base adding stuff that is MS-Windows specific. This works quite - * well, and is in keeping with my perception of the cygwin philosophy. - * Note that if you make changes to this file you do NOT want to define - * WINDOWSNT, I repeat - do not define this, it will break everything - * horribly. What does get defined is HAVE_MS_WINDOWS, but this is - * done by configure and only applies to the window system. + * The approach I have taken with this port is to use primarily the + * UNIX code base adding stuff that is MS-Windows specific. This works + * quite well, and is in keeping with my perception of the cygwin + * philosophy. Note that if you make changes to this file you do NOT + * want to define WIN32_NATIVE (formerly "WINDOWSNT"), I repeat - do + * not define this, it will break everything horribly. What does get + * defined is HAVE_MS_WINDOWS, but this is done by configure and only + * applies to the window system. * * When building make sure your HOME path is unix style - i.e. without * a drive letter. @@ -40,6 +41,9 @@ Boston, MA 02111-1307, USA. */ * Andy Piper 8/1/98 * http://www.xemacs.freeserve.co.uk/ */ +/* Identify ourselves */ +#define CYGWIN + /* cheesy way to determine cygwin version */ #ifndef NOT_C_CODE # include @@ -57,40 +61,41 @@ Boston, MA 02111-1307, USA. */ # endif # endif -extern void cygwin32_win32_to_posix_path_list(const char*, char*); -extern int cygwin32_win32_to_posix_path_list_buf_size(const char*); -extern void cygwin32_posix_to_win32_path_list(const char*, char*); -extern int cygwin32_posix_to_win32_path_list_buf_size(const char*); +void cygwin32_win32_to_posix_path_list (const char*, char*); +int cygwin32_win32_to_posix_path_list_buf_size (const char*); +void cygwin32_posix_to_win32_path_list (const char*, char*); +int cygwin32_posix_to_win32_path_list_buf_size (const char*); # if CYGWIN_VERSION_DLL_MAJOR < 20 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 -#endif +int gettimeofday (struct timeval *tp, struct timezone *tzp); +int gethostname (char* name, int namelen); +char* mktemp (char *); +double logb (double); +void sync (void); +int ioctl (int, int, ...); + /* sys/stat.h */ +int lstat (const char *path, struct stat *buf); + /* unistd.h */ +int readlink (const char *path, void *buf, unsigned int bufsiz); +int symlink (const char *name1, const char *name2); + /* sys/time.h */ +int setitimer (int which, const struct itimerval *value, + struct itimerval *ovalue); +int utimes (char *file, struct timeval *tvp); + +int srandom (unsigned seed); +long random (void); + +# endif /* CYGWIN_VERSION_DLL_MAJOR < 20 */ + +# if CYGWIN_VERSION_DLL_MAJOR <= 20 +char *getpass (const char *prompt); +double logb (double); +# endif /* CYGWIN_VERSION_DLL_MAJOR <= 20 */ -#ifdef HAVE_MS_WINDOWS -#define HAVE_NTGUI -#define HAVE_FACES #endif #ifndef ORDINARY_LINK @@ -123,10 +128,8 @@ extern long random(); #define HAVE_SOCKETS #endif #define OBJECTS_SYSTEM ntplay.o -#define HAVE_NATIVE_SOUND #undef MAIL_USE_SYSTEM_LOCK -#define MAIL_USE_POP /* Define NO_ARG_ARRAY if you cannot take the address of the first of a * group of arguments and treat it as an array of the arguments. */ diff --git a/src/s/decosf4-0.h b/src/s/decosf4-0.h index 316ad9d..245b01e 100644 --- a/src/s/decosf4-0.h +++ b/src/s/decosf4-0.h @@ -2,9 +2,15 @@ #include "decosf3-2.h" +/* etext and edata are only available when compiling in non-ANSI mode, + while _etext and _edata are always available, hence more portable. + This allows `configure --compiler=cc --cflags=-std1' to work. */ +#define etext _etext +#define edata _edata + #ifndef NOT_C_CODE -#include "/usr/include/sys/lc_core.h" -#include "/usr/include/reg_types.h" +#include "sys/lc_core.h" +#include "reg_types.h" #endif /* C code */ #define re_compile_pattern sys_re_compile_pattern @@ -24,11 +30,10 @@ #define regoff_t sys_regoff_t #define regmatch_t sys_regmatch_t -/* A perfectly ordinary link wins again - martin #undef C_SWITCH_SYSTEM #undef LIBS_SYSTEM #undef LIBS_DEBUG -#define ORDINARY_LINK */ +/* #define ORDINARY_LINK */ #undef SYSTEM_MALLOC diff --git a/src/s/freebsd.h b/src/s/freebsd.h index 7a11597..01ddc2f 100644 --- a/src/s/freebsd.h +++ b/src/s/freebsd.h @@ -22,6 +22,8 @@ #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) +#define INTERRUPTIBLE_OPEN + #define LIBS_DEBUG /* FreeBSD 2.2 or later */ #ifndef __FreeBSD_version diff --git a/src/s/mingw32.h b/src/s/mingw32.h index 1454e05..1c50be9 100644 --- a/src/s/mingw32.h +++ b/src/s/mingw32.h @@ -20,25 +20,19 @@ Boston, MA 02111-1307, USA. */ /* based on cygwin32.h by Andy Piper */ -#ifndef WINDOWSNT -#define WINDOWSNT +/* Identify ourselves */ +#ifndef WIN32_NATIVE +#define WIN32_NATIVE #endif -#ifndef DOS_NT -#define DOS_NT /* MSDOS or WINDOWSNT */ -#endif - -#ifdef HAVE_MS_WINDOWS -#define HAVE_NTGUI -#define HAVE_FACES -#endif +#define MINGW #ifndef ORDINARY_LINK #define ORDINARY_LINK #endif -#define C_SWITCH_SYSTEM "-mno-cygwin -Wno-sign-compare -fno-caller-saves -Int/inc -I../nt/inc -DWINDOWSNT" -#define LIBS_SYSTEM "-mno-cygwin -lwinmm -lwsock32" +#define C_SWITCH_SYSTEM "-mno-cygwin -Wno-sign-compare -fno-caller-saves -DWIN32_NATIVE" +#define LIBS_SYSTEM "-mno-cygwin -mwindows -lwinmm -lwsock32" #define WIN32_LEAN_AND_MEAN #define TEXT_START -1 @@ -62,10 +56,8 @@ Boston, MA 02111-1307, USA. */ #define HAVE_SOCKETS /* #endif */ #define OBJECTS_SYSTEM ntplay.o nt.o ntheap.o ntproc.o dired-msw.o -#define HAVE_NATIVE_SOUND #undef MAIL_USE_SYSTEM_LOCK -#define MAIL_USE_POP #define HAVE_MSW_C_DIRED /* Define NO_ARG_ARRAY if you cannot take the address of the first of a @@ -78,6 +70,8 @@ Boston, MA 02111-1307, USA. */ #define ENCAPSULATE_OPEN #define ENCAPSULATE_FOPEN #define ENCAPSULATE_MKDIR +#define ENCAPSULATE_STAT +#define ENCAPSULATE_FSTAT /* Data type of load average, as read out of kmem. */ @@ -134,7 +128,7 @@ Boston, MA 02111-1307, USA. */ /* Define this to be the separator between devices and paths */ #define DEVICE_SEP ':' -#define DIRECTORY_SEP '\\' +#define DIRECTORY_SEP ((char)XCHAR(Vdirectory_sep_char)) /* The null device on Windows NT. */ #define NULL_DEVICE "NUL:" @@ -217,6 +211,10 @@ gid_t getegid (void); #define HAVE_SETITIMER #define HAVE_GETTIMEOFDAY #define HAVE_SELECT +/* systime.h includes winsock.h which defines timeval */ +#define HAVE_TIMEVAL +#define HAVE_GETPAGESIZE +#define getpagesize() 4096 /*#define HAVE_STRUCT_UTIMBUF*/ #ifndef HAVE_H_ERRNO #define HAVE_H_ERRNO @@ -233,10 +231,10 @@ gid_t getegid (void); /* We now have emulation for some signals */ #define HAVE_SIGHOLD -#define sigset(s,h) msw_sigset(s,h) -#define sighold(s) msw_sighold(s) -#define sigrelse(s) msw_sigrelse(s) -#define sigpause(s) msw_sigpause(s) +#define sigset(s,h) mswindows_sigset(s,h) +#define sighold(s) mswindows_sighold(s) +#define sigrelse(s) mswindows_sigrelse(s) +#define sigpause(s) mswindows_sigpause(s) #define signal sigset /* Defines that we need that aren't in the standard signal.h */ @@ -249,11 +247,7 @@ gid_t getegid (void); #ifndef MAXPATHLEN #define MAXPATHLEN _MAX_PATH #endif - -/* For integration with MSDOS support. */ -#define getdisk() (_getdrive () - 1) -#define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN) -#endif +#endif /* !NOT_C_CODE */ /* Define for those source files that do not include enough NT system files. */ @@ -268,5 +262,7 @@ gid_t getegid (void); /* Define process implementation */ #define HAVE_WIN32_PROCESSES -/* ============================================================ */ - +#define CORRECT_DIR_SEPS(s) \ + do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \ + else unixtodos_filename (s); \ + } while (0) diff --git a/src/s/msdos.h b/src/s/msdos.h deleted file mode 100644 index ad8694a..0000000 --- a/src/s/msdos.h +++ /dev/null @@ -1,218 +0,0 @@ -/* System description file for MS-DOS - - Copyright (C) 1993 Free Software Foundation, Inc. - -This file is part of GNU Emacs. - -GNU Emacs 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. - -GNU Emacs 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: FSF 19.31. */ - -/* Note: lots of stuff here was taken from s-msdos.h in demacs. */ - - -/* - * Define symbols to identify the version of Unix this is. - * Define all the symbols that apply correctly. - */ - -/* #define UNIPLUS */ -/* #define USG5 */ -/* #define USG */ -/* #define HPUX */ -/* #define UMAX */ -/* #define BSD4_1 */ -/* #define BSD4_2 */ -/* #define BSD4_3 */ -/* #define BSD */ -#ifndef MSDOS -#define MSDOS -#endif - -#ifdef __GO32__ -#ifndef __DJGPP__ -#define __DJGPP__ 1 /* V2 defines __DJGPP__ == 2 */ -#endif -#else -You lose; /* Emacs for DOS must be compiled with DJGPP */ -#endif - -#define DOS_NT /* MSDOS or WINDOWSNT */ -#undef BSD - -/* SYSTEM_TYPE should indicate the kind of system you are using. - It sets the Lisp variable system-type. */ - -#define SYSTEM_TYPE "ms-dos" - -#define SYMS_SYSTEM syms_of_dosfns();syms_of_msdos() - -/* Letter to use in finding device name of first pty, - if system supports pty's. 'a' means it is /dev/ptya0 */ - -/* #define FIRST_PTY_LETTER 'a' */ - -/* - * Define HAVE_PTYS if the system supports pty devices. - */ - -/* #define HAVE_PTYS */ - -/* MSDOS has dirent.h but doesn't behave otherwise like the SYSV - directory functions. We have special tests for this in - sysdir.h. */ - -#undef SYSV_SYSTEM_DIR - -/* Define this is the compiler understands `volatile'. */ -#define HAVE_VOLATILE - -#define NO_SUBPROCESSES - -/* If your system uses COFF (Common Object File Format) then define the - preprocessor symbol "COFF". */ - -#define COFF - -/* define MAIL_USE_FLOCK if the mailer uses flock - to interlock access to /usr/spool/mail/$USER. - The alternative is that a lock file named - /usr/spool/mail/$USER.lock. */ - -/* #define MAIL_USE_FLOCK */ - -/* Here, on a separate page, add any special hacks needed - to make Emacs work on this system. For example, - you might define certain system call names that don't - exist on your system, or that do different things on - your system and must be used only through an encapsulation - (Which you should place, by convention, in sysdep.c). */ - -/* Avoid incompatibilities between gmalloc.c and system header files - in how to declare valloc. */ -#define GMALLOC_INHIBIT_VALLOC - -/* setjmp and longjmp can safely replace _setjmp and _longjmp, - but they will run slower. */ - -#define _setjmp setjmp -#define _longjmp longjmp - -#if __DJGPP__ < 2 - -#define NO_MODE_T - -/* New chdir () routine. - DJGPP v2.0 and later doesn't need it because its chdir() does - set the drive itself. */ -#ifdef chdir -#undef chdir -#endif -#define chdir sys_chdir - -#define LIBS_SYSTEM "-lpc" /* isn't required in DJGPP v2.0, either */ - -#endif /* __DJGPP__ < 2 */ - -#if __DJGPP__ > 1 - -#define DATA_START (&etext + 1) -#define TEXT_START &start -#define TEXT_END &etext - -#define _NAIVE_DOS_REGS - -#else /* not __DJGPP__ > 1 */ - -/* This somehow needs to be defined even though we use COFF. */ -#define TEXT_START -1 - -#endif /* not __DJGPP__ > 1 */ - -#define ORDINARY_LINK - -/* command.com does not understand `...` so we define this. */ -#define LIB_GCC "-Lgcc" -#define DONT_NEED_ENVIRON -#define SEPCHAR ';' - -#define NULL_DEVICE "nul" -#define EXEC_SUFFIXES ".exe:.com:.bat:" - -#if __DJGPP__ < 2 -#define O_RDONLY 0x0001 -#define O_WRONLY 0x0002 -#define O_RDWR 0x0004 -#define O_CREAT 0x0100 -#define O_TRUNC 0x0200 -#define O_EXCL 0x0400 -#define O_APPEND 0x0800 -#define O_TEXT 0x4000 -#define O_BINARY 0x8000 -#define NO_MATHERR -#endif - -#define HAVE_INVERSE_HYPERBOLIC -#define FLOAT_CHECK_DOMAIN - -/* When $TERM is "internal" then this is substituted: */ -#define INTERNAL_TERMINAL "pc|bios|IBM PC with color display:\ -:co#80:li#25:km:ms:cm=:cl=:ce=:" - -/* Define this to a function (Fdowncase, Fupcase) if your file system - likes that */ -#define FILE_SYSTEM_CASE Fmsdos_downcase_filename - -/* Define this to be the separator between devices and paths */ -#define DEVICE_SEP ':' - -/* We'll support either convention on MSDOG. */ -#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') -#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) - -/* Call init_gettimeofday when TZ changes. */ -#if __DJGPP__ < 2 -#define LOCALTIME_CACHE -#define tzset init_gettimeofday -#endif - -/* Mode line description of a buffer's type. */ -#define MODE_LINE_BINARY_TEXT(buf) (NILP(buf->buffer_file_type) ? "T" : "B") - -/* Do we have POSIX signals? */ -#if __DJGPP__ > 1 -#define POSIX_SIGNALS -#endif - -/* We have (the code to control) a mouse. */ -#define HAVE_MOUSE - -/* We canuse mouse menus. */ -#define HAVE_MENUS - -/* We have support for faces. */ -#define HAVE_FACES - -/* Define one of these for easier conditionals. */ -#ifdef HAVE_X_WINDOWS -/* We need a little extra space, see ../../lisp/loadup.el */ -#define SYSTEM_PURESIZE_EXTRA 15000 -#define HAVE_X11R5 -#define LIBX11_SYSTEM "-lxext -lsys" -#else -/* We need a little extra space, see ../../lisp/loadup.el */ -#define SYSTEM_PURESIZE_EXTRA 85000 -#endif diff --git a/src/s/windows95.h b/src/s/windows95.h deleted file mode 100644 index a6de39f..0000000 --- a/src/s/windows95.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Synched up with: FSF 19.31. */ - -/* System description file for Windows 95. */ - -#include "windowsnt.h" - -#define WINDOWS95 diff --git a/src/s/windowsnt.h b/src/s/windowsnt.h index ed8b98a..6175a2c 100644 --- a/src/s/windowsnt.h +++ b/src/s/windowsnt.h @@ -1,4 +1,4 @@ -/* System description file for Windows NT. +/* System description file for Windows 9x and NT. Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -20,12 +20,73 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: FSF 19.31. */ -#ifndef WINDOWSNT -#define WINDOWSNT -#endif - -#ifndef DOS_NT -#define DOS_NT /* MSDOS or WINDOWSNT */ +/* Capsule summary of different preprocessor flags: + +1. Keep in mind that there are two possible OS environments we are dealing + with -- Cygwin and Native Windows. Cygwin provides a POSIX emulation + layer on top of MS Windows -- in particular, providing the file-system, + process, tty, and signal semantics that are part of a modern, standard + Unix operating system. MS Windows also provides these services, but + through their own API, called Win32. When compiling in a Cygwin + environment, the Win32 API's are also available, and in fact are used + to do native GUI programming. + +2. There are two windowing environments we can target XEmacs for when + running under MS Windows -- Windows native, and X. (It may seem strange + to write an X application under Windows, but there are in fact many X + servers out there running on Windows, and as far as I know there is no + real (or at least, that works well) networking Window-system extension + under MS Windows. Furthermore, if you're porting a Unix application to + Windows and use Cygwin to assist you, it might seem natural to use an + X server to avoid having to port all the code to Windows.) For XEmacs, + there are various reasons people could come up with for why we would + want to keep maintaining X Windows under MS Windows support. + +That gives us four possible build environments. I (Ben) build +regularly on fully-native-everything, Andy builds on Cygwin + MS +Windows + X Windows for windowing. + +The build flags used for these divisions are: + +CYGWIN -- for Cygwin-only stuff. +WIN32_NATIVE -- Win32 native OS-level stuff (files, process, etc.). +HAVE_X_WINDOWS -- for X Windows (regardless of whether under MS Win) +HAVE_MS_WINDOWS -- MS Windows native windowing system (anything related to + the appearance of the graphical screen). + +Finally, there's also the MINGW build environment, which uses GCC +\(similar to Cygwin), but native MS Windows libraries rather than a +POSIX emulation layer (the Cygwin approach). This environment defines +WIN32_NATIVE, but also defines MINGW, which is used mostly because +uses its own include files (related to Cygwin), which have a few +things messed up. + + +Formerly, we had a whole host of flags. Here's the conversion, for porting +code from GNU Emacs and such: + + +WINDOWSNT -> WIN32_NATIVE +WIN32 -> WIN32_NATIVE +_WIN32 -> WIN32_NATIVE +HAVE_WIN32 -> WIN32_NATIVE +DOS_NT -> WIN32_NATIVE +HAVE_NTGUI -> WIN32_NATIVE, unless it ends up already bracketed by this +HAVE_FACES -> always true +MSDOS -> determine whether this code is really specific to MS-DOS (and not + Windows -- e.g. DJGPP code); if so, delete the code; otherwise, + convert to WIN32_NATIVE (we do not support MS-DOS w/DOS Extender + under XEmacs) + +__CYGWIN__ -> CYGWIN +__CYGWIN32__ -> CYGWIN +__MINGW32__ -> MINGW + +*/ + +/* Identify ourselves */ +#ifndef WIN32_NATIVE +#define WIN32_NATIVE #endif /* In case non-Microsoft compiler is used, we fake _MSC_VER */ @@ -167,11 +228,6 @@ typedef int pid_t; #define HAVE_H_ERRNO #define HAVE_STRUCT_UTIMBUF -#ifdef HAVE_NTGUI -#define HAVE_WINDOW_SYSTEM -#define HAVE_FACES -#endif - #define HAVE_STRCASECMP /* Compatibility macros. Some used to be routines in nt.c */ @@ -246,10 +302,10 @@ gid_t getegid (void); /* We now have emulation for some signals */ #define HAVE_SIGHOLD -#define sigset(s,h) msw_sigset(s,h) -#define sighold(s) msw_sighold(s) -#define sigrelse(s) msw_sigrelse(s) -#define sigpause(s) msw_sigpause(s) +#define sigset(s,h) mswindows_sigset(s,h) +#define sighold(s) mswindows_sighold(s) +#define sigrelse(s) mswindows_sigrelse(s) +#define sigpause(s) mswindows_sigpause(s) /* Defines that we need that aren't in the standard signal.h */ #define SIGHUP 1 /* Hang up */ @@ -258,10 +314,6 @@ gid_t getegid (void); #define SIGALRM 14 /* Alarm */ #define SIGPROF 29 /* Profiling timer exp */ -/* For integration with MSDOS support. */ -#define getdisk() (_getdrive () - 1) -#define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN) - /* Defines size_t and alloca (). */ #include @@ -312,3 +364,8 @@ gid_t getegid (void); #define DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS(decl,str,idx) \ __declspec(noreturn) extern void decl PRINTF_ARGS(str,idx) #endif /* MSVC 6.0 */ + +#define CORRECT_DIR_SEPS(s) \ + do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \ + else unixtodos_filename (s); \ + } while (0) diff --git a/src/scrollbar-msw.c b/src/scrollbar-msw.c index 4f5a0fd..dd1caa3 100644 --- a/src/scrollbar-msw.c +++ b/src/scrollbar-msw.c @@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ #include -#include #include "lisp.h" #include "console-msw.h" diff --git a/src/select-msw.c b/src/select-msw.c index 7d11bd9..4aa0aaf 100644 --- a/src/select-msw.c +++ b/src/select-msw.c @@ -24,104 +24,396 @@ Boston, MA 02111-1307, USA. */ Written by Kevin Gallo for FSF Emacs. Rewritten for mswindows by Jonathan Harris, December 1997 for 21.0. - */ - + Hacked by Alastair Houghton, July 2000 for enhanced clipboard support. +*/ #include #include "lisp.h" #include "frame.h" #include "select.h" +#include "opaque.h" +#include "file-coding.h" +#include "buffer.h" #include "console-msw.h" +/* A list of handles that we must release. Not accessible from Lisp. */ +static Lisp_Object Vhandle_alist; + +/* Test if this is an X symbol that we understand */ +static int +x_sym_p (Lisp_Object value) +{ + if (NILP (value) || INTP (value)) + return 0; + + /* Check for some of the X symbols */ + if (EQ (value, QSTRING)) return 1; + if (EQ (value, QTEXT)) return 1; + if (EQ (value, QCOMPOUND_TEXT)) return 1; + + return 0; +} + +/* This converts a Lisp symbol to an MS-Windows clipboard format. + We have symbols for all predefined clipboard formats, but that + doesn't mean we support them all ;-) + The name of this function is actually a lie - it also knows about + integers and strings... */ +static UINT +symbol_to_ms_cf (Lisp_Object value) +{ + /* If it's NIL, we're in trouble. */ + if (NILP (value)) return 0; + + /* If it's an integer, assume it's a format ID */ + if (INTP (value)) return (UINT) (XINT (value)); + + /* If it's a string, register the format(!) */ + if (STRINGP (value)) + return RegisterClipboardFormat (XSTRING_DATA (value)); + + /* Check for Windows clipboard format symbols */ + if (EQ (value, QCF_TEXT)) return CF_TEXT; + if (EQ (value, QCF_BITMAP)) return CF_BITMAP; + if (EQ (value, QCF_METAFILEPICT)) return CF_METAFILEPICT; + if (EQ (value, QCF_SYLK)) return CF_SYLK; + if (EQ (value, QCF_DIF)) return CF_DIF; + if (EQ (value, QCF_TIFF)) return CF_TIFF; + if (EQ (value, QCF_OEMTEXT)) return CF_OEMTEXT; + if (EQ (value, QCF_DIB)) return CF_DIB; + if (EQ (value, QCF_PALETTE)) return CF_PALETTE; + if (EQ (value, QCF_PENDATA)) return CF_PENDATA; + if (EQ (value, QCF_RIFF)) return CF_RIFF; + if (EQ (value, QCF_WAVE)) return CF_WAVE; + if (EQ (value, QCF_UNICODETEXT)) return CF_UNICODETEXT; + if (EQ (value, QCF_ENHMETAFILE)) return CF_ENHMETAFILE; + if (EQ (value, QCF_HDROP)) return CF_HDROP; + if (EQ (value, QCF_LOCALE)) return CF_LOCALE; + if (EQ (value, QCF_OWNERDISPLAY)) return CF_OWNERDISPLAY; + if (EQ (value, QCF_DSPTEXT)) return CF_DSPTEXT; + if (EQ (value, QCF_DSPBITMAP)) return CF_DSPBITMAP; + if (EQ (value, QCF_DSPMETAFILEPICT)) return CF_DSPMETAFILEPICT; + if (EQ (value, QCF_DSPENHMETAFILE)) return CF_DSPENHMETAFILE; + + return 0; +} + +/* This converts an MS-Windows clipboard format to its corresponding + Lisp symbol, or a Lisp integer otherwise. */ +static Lisp_Object +ms_cf_to_symbol (UINT format) +{ + switch (format) + { + case CF_TEXT: return QCF_TEXT; + case CF_BITMAP: return QCF_BITMAP; + case CF_METAFILEPICT: return QCF_METAFILEPICT; + case CF_SYLK: return QCF_SYLK; + case CF_DIF: return QCF_DIF; + case CF_TIFF: return QCF_TIFF; + case CF_OEMTEXT: return QCF_OEMTEXT; + case CF_DIB: return QCF_DIB; + case CF_PALETTE: return QCF_PALETTE; + case CF_PENDATA: return QCF_PENDATA; + case CF_RIFF: return QCF_RIFF; + case CF_WAVE: return QCF_WAVE; + case CF_UNICODETEXT: return QCF_UNICODETEXT; + case CF_ENHMETAFILE: return QCF_ENHMETAFILE; + case CF_HDROP: return QCF_HDROP; + case CF_LOCALE: return QCF_LOCALE; + case CF_OWNERDISPLAY: return QCF_OWNERDISPLAY; + case CF_DSPTEXT: return QCF_DSPTEXT; + case CF_DSPBITMAP: return QCF_DSPBITMAP; + case CF_DSPMETAFILEPICT: return QCF_DSPMETAFILEPICT; + case CF_DSPENHMETAFILE: return QCF_DSPENHMETAFILE; + default: return make_int ((int) format); + } +} + +/* Test if the specified clipboard format is auto-released by the OS. If + not, we must remember the handle on Vhandle_alist, and free it if + the clipboard is emptied or if we set data with the same format. */ +static int +cf_is_autofreed (UINT format) +{ + switch (format) + { + /* This list comes from the SDK documentation */ + case CF_DSPENHMETAFILE: + case CF_DSPMETAFILEPICT: + case CF_ENHMETAFILE: + case CF_BITMAP: + case CF_DSPBITMAP: + case CF_PALETTE: + case CF_DIB: + case CF_DSPTEXT: + case CF_OEMTEXT: + case CF_TEXT: + case CF_UNICODETEXT: + return TRUE; + + default: + return FALSE; + } +} + +/* Do protocol to assert ourself as a selection owner. + + Under mswindows, we: -/* Do protocol to assert ourself as a selection owner. Under mswindows -this is easy, we just set the clipboard. */ + * Only set the clipboard if (eq selection-name 'CLIPBOARD) + + * Check if an X atom name has been passed. If so, convert to CF_TEXT + (or CF_UNICODETEXT) remembering to perform LF -> CR-LF conversion. + + * Otherwise assume the data is formatted appropriately for the data type + that was passed. + + Then set the clipboard as necessary. +*/ static Lisp_Object mswindows_own_selection (Lisp_Object selection_name, - Lisp_Object selection_value) + Lisp_Object selection_value, + Lisp_Object how_to_add, + Lisp_Object selection_type) { - Lisp_Object converted_value = get_local_selection (selection_name, QSTRING); - - if (!NILP (converted_value) && - CONSP (converted_value) && - EQ (XCAR (converted_value), QSTRING) && - /* pure mswindows behaviour only says we can own the selection - if it is the clipboard */ - EQ (selection_name, QCLIPBOARD)) - { - int rawsize, size, i; - unsigned char *src, *dst, *next; - HGLOBAL h = NULL; - struct frame *f = NULL; - struct gcpro gcpro1, gcpro2; - Lisp_Object string = XCDR (converted_value); - - GCPRO2 (converted_value, string); - - CHECK_STRING (string); - - /* Calculate size with LFs converted to CRLFs because - * CF_TEXT format uses CRLF delimited ASCIIZ */ - src = XSTRING_DATA (string); - size = rawsize = XSTRING_LENGTH (string) + 1; - for (i=0; idisplay); - GCPRO3 (local_selection_data, converted_selection, target_symbol); + GCPRO2 (converted_selection, target_symbol); selection_symbol = x_atom_to_symbol (d, event->selection); + target_symbol = x_atom_to_symbol (d, event->target); - local_selection_data = assq_no_quit (selection_symbol, Vselection_alist); - -#if 0 - /* This list isn't user-visible, so it can't "go bad." */ - assert (CONSP (local_selection_data)); - assert (CONSP (XCDR (local_selection_data))); - assert (CONSP (XCDR (XCDR (local_selection_data)))); - assert (NILP (XCDR (XCDR (XCDR (local_selection_data))))); - assert (CONSP (XCAR (XCDR (XCDR (local_selection_data))))); - assert (INTP (XCAR (XCAR (XCDR (XCDR (local_selection_data)))))); - assert (INTP (XCDR (XCAR (XCDR (XCDR (local_selection_data)))))); +#if 0 /* #### MULTIPLE doesn't work yet */ + if (EQ (target_symbol, QMULTIPLE)) + target_symbol = fetch_multiple_target (event); #endif - if (NILP (local_selection_data)) + temp_obj = Fget_selection_timestamp (selection_symbol); + + if (NILP (temp_obj)) { - /* Someone asked for the selection, but we don't have it any more. */ + /* We don't appear to have the selection. */ x_decline_selection_request (event); + goto DONE_LABEL; } - local_selection_time = - * (Time *) XOPAQUE_DATA (XCAR (XCDR (XCDR (local_selection_data)))); - + local_selection_time = * (Time *) XOPAQUE_DATA (temp_obj); + if (event->time != CurrentTime && local_selection_time > event->time) { @@ -592,35 +610,36 @@ x_handle_selection_request (XSelectionRequestEvent *event) goto DONE_LABEL; } + converted_selection = select_convert_out (selection_symbol, + target_symbol, Qnil); + + /* #### Is this the right thing to do? I'm no X expert. -- ajh */ + if (NILP (converted_selection)) + { + /* We don't appear to have a selection in that data type. */ + x_decline_selection_request (event); + goto DONE_LABEL; + } + count = specpdl_depth (); record_unwind_protect (x_selection_request_lisp_error, make_opaque_ptr (event)); - target_symbol = x_atom_to_symbol (d, event->target); -#if 0 /* #### MULTIPLE doesn't work yet */ - if (EQ (target_symbol, QMULTIPLE)) - target_symbol = fetch_multiple_target (event); -#endif - - /* Convert lisp objects back into binary data */ - - converted_selection = - get_local_selection (selection_symbol, target_symbol); - - if (! NILP (converted_selection)) - { - unsigned char *data; - unsigned int size; - int format; - Atom type; - lisp_data_to_selection_data (d, converted_selection, - &data, &type, &size, &format); - - x_reply_selection_request (event, format, data, size, type); - successful_p = Qt; - /* Tell x_selection_request_lisp_error() it's cool. */ event->type = 0; - xfree (data); - } + { + unsigned char *data; + unsigned int size; + int format; + Atom type; + lisp_data_to_selection_data (d, converted_selection, + &data, &type, &size, &format); + + x_reply_selection_request (event, format, data, size, type); + successful_p = Qt; + /* Tell x_selection_request_lisp_error() it's cool. */ + event->type = 0; + xfree (data); + } + unbind_to (count, Qnil); DONE_LABEL: @@ -629,17 +648,15 @@ x_handle_selection_request (XSelectionRequestEvent *event) /* Let random lisp code notice that the selection has been asked for. */ { - Lisp_Object rest; Lisp_Object val = Vx_sent_selection_hooks; if (!UNBOUNDP (val) && !NILP (val)) { + Lisp_Object rest; if (CONSP (val) && !EQ (XCAR (val), Qlambda)) for (rest = val; !NILP (rest); rest = Fcdr (rest)) - call3 (Fcar(rest), selection_symbol, target_symbol, - successful_p); + call3 (Fcar (rest), selection_symbol, target_symbol, successful_p); else - call3 (val, selection_symbol, target_symbol, - successful_p); + call3 (val, selection_symbol, target_symbol, successful_p); } } } @@ -655,18 +672,18 @@ x_handle_selection_clear (XSelectionClearEvent *event) Atom selection = event->selection; Time changed_owner_time = event->time; - Lisp_Object selection_symbol, local_selection_data; + Lisp_Object selection_symbol, local_selection_time_lisp; Time local_selection_time; selection_symbol = x_atom_to_symbol (d, selection); - local_selection_data = assq_no_quit (selection_symbol, Vselection_alist); - - /* Well, we already believe that we don't own it, so that's just fine. */ - if (NILP (local_selection_data)) return; + local_selection_time_lisp = Fget_selection_timestamp (selection_symbol); - local_selection_time = - * (Time *) XOPAQUE_DATA (XCAR (XCDR (XCDR (local_selection_data)))); + /* We don't own the selection, so that's fine. */ + if (NILP (local_selection_time_lisp)) + return; + + local_selection_time = * (Time *) XOPAQUE_DATA (local_selection_time_lisp); /* This SelectionClear is for a selection that we no longer own, so we can disregard it. (That is, we have reasserted the selection since this @@ -920,10 +937,14 @@ x_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type) unbind_to (speccount, Qnil); /* otherwise, the selection is waiting for us on the requested property. */ - return - x_get_window_property_as_lisp_data (display, requestor_window, - target_property, target_type, - selection_atom); + + return select_convert_in (selection_symbol, + target_type, + x_get_window_property_as_lisp_data(display, + requestor_window, + target_property, + target_type, + selection_atom)); } @@ -1123,6 +1144,9 @@ x_get_window_property_as_lisp_data (Display *display, return val; } +/* #### These are going to move into Lisp code(!) with the aid of + some new functions I'm working on - ajh */ + /* These functions convert from the selection data read from the server into something that we can use from elisp, and vice versa. @@ -1467,7 +1491,8 @@ x_disown_selection (Lisp_Object selection, Lisp_Object timeval) } static Lisp_Object -x_selection_exists_p (Lisp_Object selection) +x_selection_exists_p (Lisp_Object selection, + Lisp_Object selection_type) { struct device *d = decode_x_device (Qnil); Display *dpy = DEVICE_X_DISPLAY (d); @@ -1776,5 +1801,7 @@ Xatoms_of_select_x (struct device *d) DEVICE_XATOM_NULL (d) = XInternAtom (D, "NULL", False); DEVICE_XATOM_ATOM_PAIR (d) = XInternAtom (D, "ATOM_PAIR", False); DEVICE_XATOM_COMPOUND_TEXT (d) = XInternAtom (D, "COMPOUND_TEXT", False); + + /* #### I don't like the looks of this... what is it for? - ajh */ DEVICE_XATOM_EMACS_TMP (d) = XInternAtom (D, "_EMACS_TMP_", False); } diff --git a/src/select.c b/src/select.c index 891a45c..e87a7a1 100644 --- a/src/select.c +++ b/src/select.c @@ -26,6 +26,7 @@ Boston, MA 02111-1307, USA. */ #include "buffer.h" #include "device.h" +#include "extents.h" #include "console.h" #include "objects.h" @@ -33,28 +34,47 @@ Boston, MA 02111-1307, USA. */ #include "opaque.h" #include "select.h" +/* X Atoms */ Lisp_Object QPRIMARY, QSECONDARY, QSTRING, QINTEGER, QCLIPBOARD, QTIMESTAMP, QTEXT, QDELETE, QMULTIPLE, QINCR, QEMACS_TMP, QTARGETS, QATOM, QNULL, QATOM_PAIR, QCOMPOUND_TEXT; +/* Windows clipboard formats */ +Lisp_Object QCF_TEXT, QCF_BITMAP, QCF_METAFILEPICT, QCF_SYLK, QCF_DIF, + QCF_TIFF, QCF_OEMTEXT, QCF_DIB, QCF_PALETTE, QCF_PENDATA, QCF_RIFF, + QCF_WAVE, QCF_UNICODETEXT, QCF_ENHMETAFILE, QCF_HDROP, QCF_LOCALE, + QCF_OWNERDISPLAY, QCF_DSPTEXT, QCF_DSPBITMAP, QCF_DSPMETAFILEPICT, + QCF_DSPENHMETAFILE; + +/* Selection strategy symbols */ +Lisp_Object Qreplace_all, Qreplace_existing; + /* "Selection owner couldn't convert selection" */ Lisp_Object Qselection_conversion_error; -/* This is an alist whose CARs are selection-types (whose names are the same - as the names of X Atoms) and whose CDRs are the names of Lisp functions to - call to convert the given Emacs selection value to a string representing - the given selection type. This is for elisp-level extension of the emacs - selection handling. +/* A couple of Lisp functions */ +Lisp_Object Qselect_convert_in, Qselect_convert_out; + +/* These are alists whose CARs are selection-types (whose names are the same + as the names of X Atoms or Windows clipboard formats) and whose CDRs are + the names of Lisp functions to call to convert the given Emacs selection + value to a string representing the given selection type. This is for + elisp-level extension of the emacs selection handling. */ -Lisp_Object Vselection_converter_alist; +Lisp_Object Vselection_converter_out_alist; +Lisp_Object Vselection_converter_in_alist; +Lisp_Object Vselection_appender_alist; +Lisp_Object Vselection_buffer_killed_alist; +Lisp_Object Vselection_coercible_types; Lisp_Object Vlost_selection_hooks; /* This is an association list whose elements are of the form ( selection-name selection-value selection-timestamp ) selection-name is a lisp symbol, whose name is the name of an X Atom. - selection-value is the value that emacs owns for that selection. - It may be any kind of Lisp object. + selection-value is a list of cons pairs that emacs owns for that selection. + Each pair consists of (type . value), where type is nil or a + selection data type, and value is any type of Lisp object. selection-timestamp is the time at which emacs began owning this selection, as a cons of two 16-bit numbers (making a 32 bit time). If there is an entry in this alist, then it can be assumed that emacs owns @@ -64,145 +84,68 @@ Lisp_Object Vlost_selection_hooks; */ Lisp_Object Vselection_alist; -static Lisp_Object -clean_local_selection_data (Lisp_Object obj) -{ - if (CONSP (obj) && - INTP (XCAR (obj)) && - CONSP (XCDR (obj)) && - INTP (XCAR (XCDR (obj))) && - NILP (XCDR (XCDR (obj)))) - obj = Fcons (XCAR (obj), XCDR (obj)); - - if (CONSP (obj) && - INTP (XCAR (obj)) && - INTP (XCDR (obj))) - { - if (XINT (XCAR (obj)) == 0) - return XCDR (obj); - if (XINT (XCAR (obj)) == -1) - return make_int (- XINT (XCDR (obj))); - } - if (VECTORP (obj)) - { - int i; - int len = XVECTOR_LENGTH (obj); - Lisp_Object copy; - if (len == 1) - return clean_local_selection_data (XVECTOR_DATA (obj) [0]); - copy = make_vector (len, Qnil); - for (i = 0; i < len; i++) - XVECTOR_DATA (copy) [i] = - clean_local_selection_data (XVECTOR_DATA (obj) [i]); - return copy; - } - return obj; -} - /* Given a selection-name and desired type, this looks up our local copy of - the selection value and converts it to the type. It returns nil or a - string. This calls random elisp code, and may signal or gc. - */ -Lisp_Object + the selection value and converts it to the type. */ +static Lisp_Object get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type) { - /* This function can GC */ - Lisp_Object handler_fn, value, check; Lisp_Object local_value = assq_no_quit (selection_symbol, Vselection_alist); - if (NILP (local_value)) return Qnil; - - /* TIMESTAMP and MULTIPLE are special cases 'cause that's easiest. */ - if (EQ (target_type, QTIMESTAMP)) + if (!NILP (local_value)) { - handler_fn = Qnil; - value = XCAR (XCDR (XCDR (local_value))); + Lisp_Object value_list = XCAR (XCDR (local_value)); + Lisp_Object value; + + /* First try to find an entry of the appropriate type */ + value = assq_no_quit (target_type, value_list); + + if (!NILP (value)) + return XCDR (value); } -#if 0 /* #### MULTIPLE doesn't work yet and probably never will */ - else if (CONSP (target_type) && - XCAR (target_type) == QMULTIPLE) - { - Lisp_Object pairs = XCDR (target_type); - int len = XVECTOR_LENGTH (pairs); - int i; - /* If the target is MULTIPLE, then target_type looks like - (MULTIPLE . [[SELECTION1 TARGET1] [SELECTION2 TARGET2] ... ]) - We modify the second element of each pair in the vector and - return it as [[SELECTION1 ] [SELECTION2 ] ... ] - */ - for (i = 0; i < len; i++) + return Qnil; +} + +/* #### Should perhaps handle 'MULTIPLE. The code below is now completely + broken due to a re-organization of get_local_selection, but I've left + it here should anyone show an interest - ajh */ +#if 0 + else if (CONSP (target_type) && + XCAR (target_type) == QMULTIPLE) { - Lisp_Object pair = XVECTOR_DATA (pairs) [i]; - XVECTOR_DATA (pair) [1] = - x_get_local_selection (XVECTOR_DATA (pair) [0], - XVECTOR_DATA (pair) [1]); + Lisp_Object pairs = XCDR (target_type); + int len = XVECTOR_LENGTH (pairs); + int i; + /* If the target is MULTIPLE, then target_type looks like + (MULTIPLE . [[SELECTION1 TARGET1] [SELECTION2 TARGET2] ... ]) + We modify the second element of each pair in the vector and + return it as [[SELECTION1 ] [SELECTION2 ] ... ] + */ + for (i = 0; i < len; i++) + { + Lisp_Object pair = XVECTOR_DATA (pairs) [i]; + XVECTOR_DATA (pair) [1] = + x_get_local_selection (XVECTOR_DATA (pair) [0], + XVECTOR_DATA (pair) [1]); + } + return pairs; } - return pairs; - } #endif - else - { - CHECK_SYMBOL (target_type); - handler_fn = Fcdr (Fassq (target_type, Vselection_converter_alist)); - if (NILP (handler_fn)) return Qnil; - value = call3 (handler_fn, - selection_symbol, target_type, - XCAR (XCDR (local_value))); - } - - /* This lets the selection function to return (TYPE . VALUE). For example, - when the selected type is LINE_NUMBER, the returned type is SPAN, not - INTEGER. - */ - check = value; - if (CONSP (value) && SYMBOLP (XCAR (value))) - check = XCDR (value); - - /* Strings, vectors, and symbols are converted to selection data format in - the obvious way. Integers are converted to 16 bit quantities if they're - small enough, otherwise 32 bits are used. - */ - if (STRINGP (check) || - VECTORP (check) || - SYMBOLP (check) || - INTP (check) || - CHARP (check) || - NILP (value)) - return value; - - /* (N . M) or (N M) get turned into a 32 bit quantity. So if you want to - always return a small quantity as 32 bits, your converter routine needs - to return a cons. - */ - else if (CONSP (check) && - INTP (XCAR (check)) && - (INTP (XCDR (check)) || - (CONSP (XCDR (check)) && - INTP (XCAR (XCDR (check))) && - NILP (XCDR (XCDR (check)))))) - return value; - /* Otherwise the lisp converter function returned something unrecognized. - */ - else - signal_error (Qerror, - list3 (build_string - ("unrecognized selection-conversion type"), - handler_fn, - value)); - return Qnil; /* suppress compiler warning */ -} - -DEFUN ("own-selection-internal", Fown_selection_internal, 2, 3, 0, /* -Assert a selection of the given TYPE with the given VALUE. -TYPE is a symbol, typically PRIMARY, SECONDARY, or CLIPBOARD. +DEFUN ("own-selection-internal", Fown_selection_internal, 2, 5, 0, /* +Assert a selection of the given NAME with the given VALUE, and +optional window-system DATA-TYPE. HOW-TO-ADD specifies how the +selection will be combined with any existing selection(s) - see +`own-selection' for more information. +NAME is a symbol, typically PRIMARY, SECONDARY, or CLIPBOARD. VALUE is typically a string, or a cons of two markers, but may be -anything that the functions on selection-converter-alist know about. +anything that the functions on selection-converter-out-alist know about. */ - (selection_name, selection_value, device)) + (selection_name, selection_value, how_to_add, data_type, device)) { - Lisp_Object selection_time, selection_data, prev_value; + Lisp_Object selection_time, selection_data, prev_value = Qnil, + value_list = Qnil; + Lisp_Object prev_real_value = Qnil; struct gcpro gcpro1; CHECK_SYMBOL (selection_name); @@ -211,35 +154,129 @@ anything that the functions on selection-converter-alist know about. if (NILP (device)) device = Fselected_device (Qnil); - /* Now update the local cache */ - selection_data = list3 (selection_name, - selection_value, - Qnil); - GCPRO1 (selection_data); + if (!EQ (how_to_add, Qappend) && !EQ (how_to_add, Qt) + && !EQ (how_to_add, Qreplace_existing) + && !EQ (how_to_add, Qreplace_all) && !NILP (how_to_add)) + error ("how-to-add must be nil, append, replace_all, " + "replace_existing or t."); + +#ifdef MULE + if (NILP (data_type)) + data_type = QCOMPOUND_TEXT; +#else + if (NILP (data_type)) + data_type = QSTRING; +#endif + + /* Examine the how-to-add argument */ + if (EQ (how_to_add, Qreplace_all) || NILP (how_to_add)) + { + Lisp_Object local_selection_data = assq_no_quit (selection_name, + Vselection_alist); - prev_value = assq_no_quit (selection_name, Vselection_alist); - Vselection_alist = Fcons (selection_data, Vselection_alist); + if (!NILP (local_selection_data)) + { + /* Don't use Fdelq() as that may QUIT;. */ + if (EQ (local_selection_data, Fcar (Vselection_alist))) + Vselection_alist = Fcdr (Vselection_alist); + else + { + Lisp_Object rest; + for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) + if (EQ (local_selection_data, Fcar (XCDR (rest)))) + { + XCDR (rest) = Fcdr (XCDR (rest)); + break; + } + } + } + } + else + { + /* Look for a previous value */ + prev_value = assq_no_quit (selection_name, Vselection_alist); + + if (!NILP (prev_value)) + value_list = XCAR (XCDR (prev_value)); + + if (!NILP (value_list)) + prev_real_value = assq_no_quit (data_type, value_list); + } + + /* Append values if necessary */ + if (!NILP (value_list) && (EQ (how_to_add, Qappend) || EQ (how_to_add, Qt))) + { + /* Did we have anything of this type previously? */ + if (!NILP (prev_real_value)) + { + if ((NILP (data_type) && STRINGP (selection_value) + && STRINGP (XCDR (prev_real_value))) + || !NILP (data_type)) + { + Lisp_Object function = assq_no_quit (data_type, + Vselection_appender_alist); + + if (NILP (function)) + error ("cannot append selections of supplied types."); + + function = XCDR (function); + + selection_value = call4 (function, + selection_name, + data_type, + XCDR (prev_real_value), + selection_value); + + if (NILP (selection_value)) + error ("cannot append selections of supplied types."); + } + else + error ("cannot append selections of supplied types."); + } + + selection_data = Fcons (data_type, selection_value); + value_list = Fcons (selection_data, value_list); + } - /* If we already owned the selection, remove the old selection data. - Perhaps we should destructively modify it instead. - Don't use Fdelq() as that may QUIT;. - */ - if (!NILP (prev_value)) + if (!NILP (prev_real_value)) { - Lisp_Object rest; /* we know it's not the CAR, so it's easy. */ - for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) - if (EQ (prev_value, Fcar (XCDR (rest)))) + Lisp_Object rest; /* We know it isn't the CAR, so it's easy. */ + + /* Delete the old type entry from the list */ + for (rest = value_list; !NILP (rest); rest = Fcdr (rest)) + if (EQ (prev_real_value, Fcar (XCDR (rest)))) { XCDR (rest) = Fcdr (XCDR (rest)); break; - } + } + } + else + { + value_list = Fcons (Fcons (data_type, selection_value), + value_list); } + + /* Complete the local cache update; note that we destructively + modify the current list entry if there is one */ + if (NILP (prev_value)) + { + selection_data = list3 (selection_name, value_list, Qnil); + Vselection_alist = Fcons (selection_data, Vselection_alist); + } + else + { + selection_data = prev_value; + Fsetcar (XCDR (selection_data), value_list); + } + + GCPRO1 (selection_data); /* have to do device specific stuff last so that methods can access the selection_alist */ if (HAS_DEVMETH_P (XDEVICE (device), own_selection)) selection_time = DEVMETH (XDEVICE (device), own_selection, - (selection_name, selection_value)); + (selection_name, selection_value, + how_to_add, data_type)); else selection_time = Qnil; @@ -250,12 +287,103 @@ anything that the functions on selection-converter-alist know about. return selection_value; } +DEFUN ("register-selection-data-type", Fregister_selection_data_type, 1,2,0, /* +Register a new selection data type DATA-TYPE, optionally on the specified +DEVICE. Returns the device-specific data type identifier, or nil if the +device does not support this feature or the registration fails. */ + (data_type, device)) +{ + /* Check arguments */ + CHECK_STRING (data_type); + + if (NILP (device)) + device = Fselected_device (Qnil); + + if (HAS_DEVMETH_P (XDEVICE (device), register_selection_data_type)) + return DEVMETH (XDEVICE (device), register_selection_data_type, + (data_type)); + else + return Qnil; +} + +DEFUN ("selection-data-type-name", Fselection_data_type_name, 1, 2, 0, /* +Retrieve the name of the specified selection data type DATA-TYPE, optionally +on the specified DEVICE. Returns either a string or a symbol on success, and +nil if the device does not support this feature or the type is not known. */ + (data_type, device)) +{ + if (NILP (device)) + device = Fselected_device (Qnil); + + if (HAS_DEVMETH_P (XDEVICE (device), selection_data_type_name)) + return DEVMETH (XDEVICE (device), selection_data_type_name, (data_type)); + else + return Qnil; +} + +DEFUN ("available-selection-types", Favailable_selection_types, 1, 2, 0, /* +Retrieve a list of currently available types of selection associated with +the given SELECTION-NAME, optionally on the specified DEVICE. This list +does not take into account any possible conversions that might take place, +so it should be taken as a minimal estimate of what is available. +*/ + (selection_name, device)) +{ + Lisp_Object types = Qnil, rest; + struct gcpro gcpro1; + + CHECK_SYMBOL (selection_name); + + if (NILP (device)) + device = Fselected_device (Qnil); + + GCPRO1 (types); + + /* First check the device */ + if (HAS_DEVMETH_P (XDEVICE (device), available_selection_types)) + types = DEVMETH (XDEVICE (device), available_selection_types, + (selection_name)); + + /* Now look in the list */ + rest = assq_no_quit (selection_name, Vselection_alist); + + if (NILP (rest)) + { + UNGCPRO; + + return types; + } + + /* Examine the types and cons them onto the front of the list */ + for (rest = XCAR (XCDR (rest)); !NILP (rest); rest = XCDR (rest)) + { + Lisp_Object value = XCDR (XCAR (rest)); + Lisp_Object type = XCAR (XCAR (rest)); + + types = Fcons (type, types); + + if ((STRINGP (value) || EXTENTP (value)) + && (NILP (type) || EQ (type, QSTRING) + || EQ (type, QTEXT) || EQ (type, QCOMPOUND_TEXT))) + types = Fcons (QTEXT, Fcons (QCOMPOUND_TEXT, Fcons (QSTRING, types))); + else if (INTP (value) && NILP (type)) + types = Fcons (QINTEGER, types); + else if (SYMBOLP (value) && NILP (type)) + types = Fcons (QATOM, types); + } + + UNGCPRO; + + return types; +} + /* remove a selection from our local copy */ void handle_selection_clear (Lisp_Object selection_symbol) { - Lisp_Object local_selection_data = assq_no_quit (selection_symbol, Vselection_alist); + Lisp_Object local_selection_data = assq_no_quit (selection_symbol, + Vselection_alist); /* Well, we already believe that we don't own it, so that's just fine. */ if (NILP (local_selection_data)) return; @@ -326,26 +454,44 @@ nil is the same as PRIMARY, and t is the same as SECONDARY.) return NILP (Fassq (selection, Vselection_alist)) ? Qnil : Qt; } -DEFUN ("selection-exists-p", Fselection_exists_p, 0, 2, 0, /* +DEFUN ("selection-exists-p", Fselection_exists_p, 0, 3, 0, /* Whether there is an owner for the given Selection. The arg should be the name of the selection in question, typically one of the symbols PRIMARY, SECONDARY, or CLIPBOARD. (For convenience, the symbol nil is the same as PRIMARY, and t is the same as SECONDARY.) +Optionally the DEVICE and the window-system DATA-TYPE may be specified. */ - (selection, device)) + (selection, data_type, device)) { CHECK_SYMBOL (selection); - if (!NILP (Fselection_owner_p (selection))) + if (NILP (data_type) + && !NILP (Fselection_owner_p (selection))) return Qt; if (NILP (device)) device = Fselected_device (Qnil); return HAS_DEVMETH_P (XDEVICE (device), selection_exists_p) ? - DEVMETH (XDEVICE (device), selection_exists_p, (selection)) + DEVMETH (XDEVICE (device), selection_exists_p, (selection, data_type)) : Qnil; } +/* Get the timestamp of the given selection */ +DEFUN ("get-selection-timestamp", Fget_selection_timestamp, 1, 1, 0, /* +Return the timestamp associated with the specified SELECTION, if it exists. +Note that the timestamp is a device-specific object, and may not actually be +visible from Lisp. +*/ + (selection)) +{ + Lisp_Object local_value = assq_no_quit (selection, Vselection_alist); + + if (!NILP (local_value)) + return XCAR (XCDR (XCDR (local_value))); + + return Qnil; +} + /* Request the selection value from the owner. If we are the owner, simply return our selection value. If we are not the owner, this will block until all of the data has arrived. @@ -360,14 +506,22 @@ TEXT or COMPOUND_TEXT, it will be decoded as Compound Text. (selection_symbol, target_type, device)) { /* This function can GC */ - Lisp_Object val = Qnil; - struct gcpro gcpro1, gcpro2; - GCPRO2 (target_type, val); /* we store newly consed data into these */ + Lisp_Object val = Qnil, element = Qnil; + struct gcpro gcpro1, gcpro2, gcpro3; + GCPRO3 (target_type, val, element); CHECK_SYMBOL (selection_symbol); if (NILP (device)) device = Fselected_device (Qnil); +#ifdef MULE + if (NILP (target_type)) + target_type = QCOMPOUND_TEXT; +#else + if (NILP (target_type)) + target_type = QSTRING; +#endif + #if 0 /* #### MULTIPLE doesn't work yet and probably never will */ if (CONSP (target_type) && XCAR (target_type) == QMULTIPLE) @@ -376,9 +530,12 @@ TEXT or COMPOUND_TEXT, it will be decoded as Compound Text. /* So we don't destructively modify this... */ target_type = copy_multiple_data (target_type); } - else #endif - CHECK_SYMBOL (target_type); + + /* Used to check that target_type was a symbol. This is no longer + necessarily the case, because the type might be registered with + the device (in which case target_type would be a device-specific + identifier - probably an integer) - ajh */ val = get_local_selection (selection_symbol, target_type); @@ -387,29 +544,205 @@ TEXT or COMPOUND_TEXT, it will be decoded as Compound Text. val = DEVMETH (XDEVICE (device), get_foreign_selection, (selection_symbol, target_type)); } - else + + if (NILP (val)) { - if (CONSP (val) && SYMBOLP (XCAR (val))) + /* Still nothing. Try coercion. */ + + /* Try looking in selection-coercible-types to see if any of + them are present for this selection. We try them *in order*; + the first for which a conversion succeeds gets returned. */ + EXTERNAL_LIST_LOOP_2 (element, Vselection_coercible_types) { - val = XCDR (val); - if (CONSP (val) && NILP (XCDR (val))) - val = XCAR (val); + val = get_local_selection (selection_symbol, element); + + if (NILP (val)) + continue; + + /* #### Probably should have a Qselection_coercion_alist and a + select-coerce function. */ + val = call3 (Qselect_convert_out, + selection_symbol, target_type, val); + + if (!NILP (val)) + break; } - val = clean_local_selection_data (val); } + + if (NILP (val)) + { + UNGCPRO; + + return Qnil; + } + + /* Used to call clean_local_selection here... but that really belonged + in Lisp (so the equivalent is now built-in to the INTEGER conversion + function select-convert-from-integer) - ajh */ + UNGCPRO; return val; } +/* These two are convenient interfaces to the lisp code in select.el; + this way we can rename them easily rather than having to hunt everywhere. + Also, this gives us access to get_local_selection so that convert_out + can retrieve the internal selection value automatically if passed a + value of Qnil. */ +Lisp_Object +select_convert_in (Lisp_Object selection, + Lisp_Object type, + Lisp_Object value) +{ + return call3 (Qselect_convert_in, selection, type, value); +} + +Lisp_Object +select_convert_out (Lisp_Object selection, + Lisp_Object type, + Lisp_Object value) +{ + if (NILP (value)) + value = get_local_selection (selection, type); + + if (NILP (value)) + { + Lisp_Object element = Qnil, ret; + struct gcpro gcpro1; + GCPRO1 (element); + + { + /* Try looking in selection-coercible-types to see if any of + them are present for this selection. We try them *in order*; + the first for which a conversion succeeds gets returned. */ + EXTERNAL_LIST_LOOP_2 (element, Vselection_coercible_types) + { + value = get_local_selection (selection, element); + + if (NILP (value)) + continue; + + ret = call3 (Qselect_convert_out, selection, type, value); + + if (!NILP (ret)) + { + UNGCPRO; + + return ret; + } + } + } + + UNGCPRO; + + return Qnil; + } + + return call3 (Qselect_convert_out, selection, type, value); +} + + +/* Gets called from kill-buffer; this lets us dispose of buffer-dependent + selections (or alternatively make them independent of the buffer) when + it gets vaped. */ +void +select_notify_buffer_kill (Lisp_Object buffer) +{ + Lisp_Object rest; + struct gcpro gcpro1, gcpro2, gcpro3; + + /* For each element of Vselection_alist */ + for (rest = Vselection_alist; + !NILP (rest);) + { + Lisp_Object selection, values, prev = Qnil; + + selection = XCAR (rest); + + for (values = XCAR (XCDR (selection)); + !NILP (values); + values = XCDR (values)) + { + Lisp_Object value, handler_fn; + + /* Extract the (type . value) pair. */ + value = XCAR (values); + + /* Find the handler function (if any). */ + handler_fn = Fcdr (Fassq (XCAR (value), + Vselection_buffer_killed_alist)); + + if (!NILP (handler_fn)) + { + Lisp_Object newval; + + /* Protect ourselves, just in case some tomfool calls + own-selection from with the buffer-killed handler, then + causes a GC. Just as a note, *don't do this*. */ + GCPRO3 (rest, values, value); + + newval = call4 (handler_fn, XCAR (selection), XCAR (value), + XCDR (value), buffer); + + UNGCPRO; + + /* Set or delete the value (by destructively modifying + the list). */ + if (!NILP (newval)) + { + Fsetcdr (value, newval); + + prev = values; + } + else + { + if (NILP (prev)) + Fsetcar (XCDR (selection), XCDR (values)); + else + Fsetcdr (prev, XCDR (values)); + } + } + else + prev = values; + } + + /* If we have no values for this selection */ + if (NILP (XCAR (XCDR (selection)))) + { + /* Move on to the next element *first* */ + rest = XCDR (rest); + + /* Protect it and disown this selection */ + GCPRO1 (rest); + + Fdisown_selection_internal (XCAR (selection), Qnil, Qnil); + + UNGCPRO; + } + else + rest = XCDR (rest); + } +} + + void syms_of_select (void) { DEFSUBR (Fown_selection_internal); DEFSUBR (Fget_selection_internal); DEFSUBR (Fselection_exists_p); + DEFSUBR (Fget_selection_timestamp); DEFSUBR (Fdisown_selection_internal); DEFSUBR (Fselection_owner_p); + DEFSUBR (Favailable_selection_types); + DEFSUBR (Fregister_selection_data_type); + DEFSUBR (Fselection_data_type_name); + + /* Lisp Functions */ + defsymbol (&Qselect_convert_in, "select-convert-in"); + defsymbol (&Qselect_convert_out, "select-convert-out"); + /* X Atoms */ defsymbol (&QPRIMARY, "PRIMARY"); defsymbol (&QSECONDARY, "SECONDARY"); defsymbol (&QSTRING, "STRING"); @@ -427,6 +760,33 @@ syms_of_select (void) defsymbol (&QCOMPOUND_TEXT, "COMPOUND_TEXT"); defsymbol (&QNULL, "NULL"); + /* Windows formats - these all start with CF_ */ + defsymbol (&QCF_TEXT, "CF_TEXT"); + defsymbol (&QCF_BITMAP, "CF_BITMAP"); + defsymbol (&QCF_METAFILEPICT, "CF_METAFILEPICT"); + defsymbol (&QCF_SYLK, "CF_SYLK"); + defsymbol (&QCF_DIF, "CF_DIF"); + defsymbol (&QCF_TIFF, "CF_TIFF"); + defsymbol (&QCF_OEMTEXT, "CF_OEMTEXT"); + defsymbol (&QCF_DIB, "CF_DIB"); + defsymbol (&QCF_PALETTE, "CF_PALETTE"); + defsymbol (&QCF_PENDATA, "CF_PENDATA"); + defsymbol (&QCF_RIFF, "CF_RIFF"); + defsymbol (&QCF_WAVE, "CF_WAVE"); + defsymbol (&QCF_UNICODETEXT, "CF_UNICODETEXT"); + defsymbol (&QCF_ENHMETAFILE, "CF_ENHMETAFILE"); + defsymbol (&QCF_HDROP, "CF_HDROP"); + defsymbol (&QCF_LOCALE, "CF_LOCALE"); + defsymbol (&QCF_OWNERDISPLAY, "CF_OWNERDISPLAY"); + defsymbol (&QCF_DSPTEXT, "CF_DSPTEXT"); + defsymbol (&QCF_DSPBITMAP, "CF_DSPBITMAP"); + defsymbol (&QCF_DSPMETAFILEPICT, "CF_DSPMETAFILEPICT"); + defsymbol (&QCF_DSPENHMETAFILE, "CF_DSPENHMETAFILE"); + + /* Selection strategies */ + defsymbol (&Qreplace_all, "replace-all"); + defsymbol (&Qreplace_existing, "replace-existing"); + deferror (&Qselection_conversion_error, "selection-conversion-error", "selection-conversion error", Qio_error); @@ -438,14 +798,26 @@ vars_of_select (void) Vselection_alist = Qnil; staticpro (&Vselection_alist); - DEFVAR_LISP ("selection-converter-alist", &Vselection_converter_alist /* + DEFVAR_LISP ("selection-converter-alist", &Vselection_converter_out_alist /* +An alist associating selection-types (such as STRING and TIMESTAMP) with +functions. This is an alias for `selection-converter-out-alist', and should +be considered obsolete. Use the new name instead. */ ); + + DEFVAR_LISP ("selection-converter-out-alist", + &Vselection_converter_out_alist /* An alist associating selection-types (such as STRING and TIMESTAMP) with functions. These functions will be called with three args: the name of the selection (typically PRIMARY, SECONDARY, or CLIPBOARD); a desired type to which the selection should be converted; and the local -selection value (whatever had been passed to `own-selection'). For -historical reasons these functions should return the value to send to -an X server, which should be one of: +selection value (whatever had been passed to `own-selection'). + +The return type of these functions depends upon the device in question; +for mswindows, a string should be returned containing data in the requested +format, or nil to indicate that the conversion could not be done. Additionally, +it is permissible to return a cons of the form (DATA-TYPE . STRING) suggesting +a new data type to use instead. + +For X, the return value should be one of: -- nil (the conversion could not be done) -- a cons of a symbol and any of the following values; the symbol @@ -479,9 +851,50 @@ an X server, which should be one of: -- a vector of integers and/or conses (HIGH . LOW) of integers (Will be converted into a list of 16-bit integers. If the type is not specified, a type of 'INTEGER - will be sent.) */ ); - Vselection_converter_alist = Qnil; + will be sent.) +*/ ); + Vselection_converter_out_alist = Qnil; + + DEFVAR_LISP ("selection-converter-in-alist", + &Vselection_converter_in_alist /* +An alist associating selection-types (such as STRING and TIMESTAMP) with +functions. These functions will be called with three args: the name +of the selection (typically PRIMARY, SECONDARY or CLIPBOARD); the +type from which the selection should be converted; and the selection +value. These functions should return a suitable representation of the +value, or nil to indicate that the conversion was not possible. + +See also `selection-converter-out-alist'. */ ); + Vselection_converter_in_alist = Qnil; + DEFVAR_LISP ("selection-appender-alist", + &Vselection_appender_alist /* +An alist associating selection-types (such as STRING and TIMESTAMP) with +functions. These functions will be called with four args; the name +of the selection (typically PRIMARY, SECONDARY or CLIPBOARD); the type +of the selection; and two selection values. The functions are expected to +return a value representing the catenation of the two values, or nil to +indicate that this was not possible. */ ); + Vselection_appender_alist = Qnil; + + DEFVAR_LISP ("selection-buffer-killed-alist", + &Vselection_buffer_killed_alist /* +An alist associating selection-types (such as STRING and TIMESTAMP) with +functions. These functions will be called whenever a buffer is killed, +with four args: the name of the selection (typically PRIMARY, SECONDARY +or CLIPBOARD); the type of the selection; the value of the selection; and +the buffer that has just been killed. These functions should return a new +selection value, or nil to indicate that the selection value should be +deleted. */ ); + Vselection_buffer_killed_alist = Qnil; + + DEFVAR_LISP ("selection-coercible-types", + &Vselection_coercible_types /* +A list of selection types that are coercible---that is, types that may be +automatically converted to another type. Selection values with types in this +list may be subject to conversion attempts to other types. */ ); + Vselection_coercible_types = Qnil; + DEFVAR_LISP ("lost-selection-hooks", &Vlost_selection_hooks /* A function or functions to be called after we have been notified that we have lost the selection. The function(s) will be called with one @@ -490,4 +903,3 @@ CLIPBOARD). */ ); Vlost_selection_hooks = Qunbound; } - diff --git a/src/select.h b/src/select.h index 9bf4b4e..854d47d 100644 --- a/src/select.h +++ b/src/select.h @@ -23,28 +23,43 @@ Boston, MA 02111-1307, USA. */ #ifndef INCLUDED_select_h_ #define INCLUDED_select_h_ -extern Lisp_Object QPRIMARY, QSECONDARY, QSTRING, QINTEGER, QCLIPBOARD, QTIMESTAMP, - QTEXT, QDELETE, QMULTIPLE, QINCR, QEMACS_TMP, QTARGETS, QATOM, QNULL, - QATOM_PAIR, QCOMPOUND_TEXT; - -/* This is an association list whose elements are of the form - ( selection-name selection-value selection-timestamp ) - selection-name is a lisp symbol, whose name is the name of an X Atom. - selection-value is the value that emacs owns for that selection. - It may be any kind of Lisp object. - selection-timestamp is the time at which emacs began owning this selection, - as a cons of two 16-bit numbers (making a 32 bit time). - If there is an entry in this alist, then it can be assumed that emacs owns - that selection. - The only (eq) parts of this list that are visible from elisp are the - selection-values. - */ -extern Lisp_Object Vselection_alist; +/* X Atoms */ +extern Lisp_Object QPRIMARY, QSECONDARY, QSTRING, QINTEGER, QCLIPBOARD, + QTIMESTAMP, QTEXT, QDELETE, QMULTIPLE, QINCR, QEMACS_TMP, QTARGETS, QATOM, + QNULL, QATOM_PAIR, QCOMPOUND_TEXT; + +/* Windows clipboard formats */ +extern Lisp_Object QCF_TEXT, QCF_BITMAP, QCF_METAFILEPICT, QCF_SYLK, QCF_DIF, + QCF_TIFF, QCF_OEMTEXT, QCF_DIB, QCF_PALETTE, QCF_PENDATA, QCF_RIFF, + QCF_WAVE, QCF_UNICODETEXT, QCF_ENHMETAFILE, QCF_HDROP, QCF_LOCALE, + QCF_OWNERDISPLAY, QCF_DSPTEXT, QCF_DSPBITMAP, QCF_DSPMETAFILEPICT, + QCF_DSPENHMETAFILE; + +/* Selection strategies */ +extern Lisp_Object Qreplace_all, Qreplace_existing, Qappend; /* "Selection owner couldn't convert selection" */ extern Lisp_Object Qselection_conversion_error; -Lisp_Object get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type); +/* Selection input & output */ +Lisp_Object select_convert_in (Lisp_Object selection, + Lisp_Object type, + Lisp_Object value); +Lisp_Object select_convert_out (Lisp_Object selection, + Lisp_Object type, + Lisp_Object value); + +/* Notifications */ void handle_selection_clear (Lisp_Object selection_symbol); +void select_notify_buffer_kill (Lisp_Object buffer); + +/* Lisp functions we export for other files' use */ +EXFUN (Fregister_selection_data_type, 2); +EXFUN (Fselection_data_type_name, 2); +EXFUN (Favailable_selection_types, 2); +EXFUN (Fselection_owner_p, 1); +EXFUN (Fselection_exists_p, 3); +EXFUN (Fget_selection_timestamp, 1); + #endif /* INCLUDED_select_h_ */ diff --git a/src/sheap.c b/src/sheap.c index e2c848c..1d18b8b 100644 --- a/src/sheap.c +++ b/src/sheap.c @@ -19,8 +19,8 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.*/ #include -#include #include "lisp.h" + #include #include @@ -40,6 +40,7 @@ unsigned long static_heap_size=STATIC_HEAP_SIZE; int static_heap_initialized=0; int static_heap_dumped=0; +void* more_static_core ( ptrdiff_t increment ); void* more_static_core ( ptrdiff_t increment ) { int size = (int) increment; @@ -58,7 +59,7 @@ void* more_static_core ( ptrdiff_t increment ) static_heap_ptr=static_heap_base; static_heap_size=STATIC_HEAP_SIZE - (static_heap_base-static_heap_buffer); -#ifdef __CYGWIN32__ +#ifdef CYGWIN sbrk(BLOCKSIZE); /* force space for fork to work */ #endif static_heap_initialized=1; @@ -119,6 +120,7 @@ sheap_adjust_h () fclose (stream); } +void report_sheap_usage (int die_if_pure_storage_exceeded); void report_sheap_usage (int die_if_pure_storage_exceeded) { diff --git a/src/signal.c b/src/signal.c index eb94d9c..67abf86 100644 --- a/src/signal.c +++ b/src/signal.c @@ -31,10 +31,7 @@ Boston, MA 02111-1307, USA. */ #include "syssignal.h" #include "systime.h" -#ifdef HAVE_UNISTD_H -#include -#endif -#include +#include "sysfile.h" /* Set to 1 when a quit-check signal (either a SIGIO interrupt or the asynch. timeout for poll-for-quit) occurs. The QUITP @@ -180,7 +177,7 @@ alarm_signal (int signo) it needs to stay the way it is. */ quit_check_signal_happened = 1; -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE can_break_system_calls = 0; #else /* can_break_system_calls is set when we want to break out of diff --git a/src/sound.c b/src/sound.c index 9bdedb9..550254e 100644 --- a/src/sound.c +++ b/src/sound.c @@ -37,12 +37,10 @@ Boston, MA 02111-1307, USA. */ #include "redisplay.h" #include "sysdep.h" -#ifdef HAVE_UNISTD_H -#include -#endif +#include "sysfile.h" #ifdef HAVE_NATIVE_SOUND -# include +# include "sysproc.h" # include "nativesound.h" #endif @@ -279,7 +277,7 @@ See the variable `sound-alist'. /* variable `sound' is anything that can be a cdr in sound-alist */ Lisp_Object new_volume, pitch, duration, data; int loop_count = 0; - int vol, pit, dur, succes; + int vol, pit, dur; struct device *d = decode_device (device); /* NOTE! You'd better not signal an error in here. */ @@ -335,6 +333,7 @@ See the variable `sound-alist'. { Extbyte *soundext; Extcount soundextlen; + int succes; TO_EXTERNAL_FORMAT (LISP_STRING, sound, ALLOCA, (soundext, soundextlen), Qbinary); @@ -355,6 +354,7 @@ See the variable `sound-alist'. { const Extbyte *soundext; Extcount soundextlen; + int succes; TO_EXTERNAL_FORMAT (LISP_STRING, sound, ALLOCA, (soundext, soundextlen), diff --git a/src/specifier.c b/src/specifier.c index 5338b03..bc0efc1 100644 --- a/src/specifier.c +++ b/src/specifier.c @@ -41,7 +41,7 @@ Boston, MA 02111-1307, USA. */ #include "rangetab.h" Lisp_Object Qspecifierp; -Lisp_Object Qprepend, Qappend, Qremove_tag_set_prepend, Qremove_tag_set_append; +Lisp_Object Qprepend, Qremove_tag_set_prepend, Qremove_tag_set_append; Lisp_Object Qremove_locale, Qremove_locale_type, Qremove_all; Lisp_Object Qfallback; @@ -3229,7 +3229,6 @@ syms_of_specifier (void) /* locales are defined in general.c. */ defsymbol (&Qprepend, "prepend"); - defsymbol (&Qappend, "append"); defsymbol (&Qremove_tag_set_prepend, "remove-tag-set-prepend"); defsymbol (&Qremove_tag_set_append, "remove-tag-set-append"); defsymbol (&Qremove_locale, "remove-locale"); diff --git a/src/strftime.c b/src/strftime.c index 3876617..926806d 100644 --- a/src/strftime.c +++ b/src/strftime.c @@ -94,13 +94,13 @@ time_t mktime (); #endif -#if defined(WINDOWSNT) || defined(__CYGWIN32__) +#if defined(WIN32_NATIVE) || defined(CYGWIN) #include #else #if defined(HAVE_TZNAME) extern char *tzname[2]; #endif -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ #ifdef emacs #define strftime emacs_strftime @@ -233,6 +233,7 @@ mon_week (const struct tm *tm) } #if !defined(HAVE_TM_ZONE) && !defined(HAVE_TZNAME) +char *zone_name (const struct tm *tp); char * zone_name (const struct tm *tp) { diff --git a/src/symsinit.h b/src/symsinit.h index baa3c66..e8a5d62 100644 --- a/src/symsinit.h +++ b/src/symsinit.h @@ -339,6 +339,7 @@ void vars_of_mule_ccl(void); void vars_of_mule_charset (void); void vars_of_file_coding (void); void vars_of_mule_wnn (void); +void reinit_vars_of_mule_wnn (void); void vars_of_nt (void); void vars_of_ntproc (void); void vars_of_objects (void); @@ -433,7 +434,6 @@ void init_buffer (void); void init_callproc (void); void init_console_stream (int reinit); void init_device_tty (void); -void init_dosfns (void); void init_editfns (void); void init_environment (void); void init_event_Xt_late (void); diff --git a/src/syscommctrl.h b/src/syscommctrl.h index 34955a6..45cbb95 100644 --- a/src/syscommctrl.h +++ b/src/syscommctrl.h @@ -28,7 +28,11 @@ Boston, MA 02111-1307, USA. */ #ifndef INCLUDED_syscommctrl_h_ #define INCLUDED_syscommctrl_h_ +#if !defined (CYGWIN_VERSION_DLL_MAJOR) || CYGWIN_VERSION_DLL_MAJOR > 20 +/* Appears to be missing in Cygwin b20.1; requisite includes are in + Windows32/Messages.h and get included automatically with windows.h */ #include +#endif #ifndef TB_SETIMAGELIST #define TB_SETIMAGELIST (WM_USER + 48) diff --git a/src/sysdep.c b/src/sysdep.c index 912b3d1..e027ad2 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -31,9 +31,8 @@ Boston, MA 02111-1307, USA. */ #include -#ifdef WINDOWSNT -#include -#ifdef __MINGW32__ +#ifdef WIN32_NATIVE +#ifdef MINGW #include #else /* should not conflict with "process.h", as per ANSI definition. @@ -45,13 +44,11 @@ Boston, MA 02111-1307, USA. */ which will conflict with the macro defined in lisp.h */ #include <../include/process.h> -#endif /* __MINGW32__ */ -#endif /* WINDOWSNT */ +#endif /* MINGW */ +#endif /* WIN32_NATIVE */ #include "lisp.h" -#include - /* ------------------------------- */ /* basic includes */ /* ------------------------------- */ @@ -81,16 +78,20 @@ Boston, MA 02111-1307, USA. */ #include "syswait.h" #include "sysdir.h" #include "systime.h" -#if defined(WINDOWSNT) || defined(__CYGWIN32__) +#if defined(WIN32_NATIVE) || defined(CYGWIN) #include "syssignal.h" #endif -#ifndef WINDOWSNT + +#include "sysproc.h" + +#ifndef WIN32_NATIVE #include #endif -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #include #include "ntheap.h" +#include "nt.h" #endif /* ------------------------------- */ @@ -233,7 +234,7 @@ wait_without_blocking (void) #endif /* NO_SUBPROCESSES */ -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE void wait_for_termination (HANDLE pHandle) #else void wait_for_termination (int pid) @@ -347,7 +348,7 @@ void wait_for_termination (int pid) Since implementations may add their own error indicators on top, we ignore it by default. */ -#elif defined (WINDOWSNT) +#elif defined (WIN32_NATIVE) int ret = 0, status = 0; if (pHandle == NULL) { @@ -421,7 +422,7 @@ void wait_for_termination (int pid) Try defining BROKEN_WAIT_FOR_SIGNAL. */ EMACS_WAIT_FOR_SIGNAL (SIGCHLD); } -#else /* not HAVE_WAITPID and not WINDOWSNT and (not EMACS_BLOCK_SIGNAL or BROKEN_WAIT_FOR_SIGNAL) */ +#else /* not HAVE_WAITPID and not WIN32_NATIVE and (not EMACS_BLOCK_SIGNAL or BROKEN_WAIT_FOR_SIGNAL) */ /* This approach is kind of cheesy but is guaranteed(?!) to work for all systems. */ while (1) @@ -459,7 +460,7 @@ flush_pending_output (int channel) #endif } -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE /* Set up the terminal at the other end of a pseudo-terminal that we will be controlling an inferior through. It should not echo or do line-editing, since that is done @@ -570,7 +571,7 @@ child_setup_tty (int out) } #endif /* RTU */ } -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ #endif /* not NO_SUBPROCESSES */ @@ -611,7 +612,7 @@ restore_signal_handlers (struct save_signal *saved_handlers) } } -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE pid_t sys_getpid (void) @@ -619,13 +620,13 @@ sys_getpid (void) return abs (getpid ()); } -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ /* Fork a subshell. */ static void sys_subshell (void) { -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE int pid; #endif struct save_signal saved_handlers[5]; @@ -665,13 +666,13 @@ sys_subshell (void) str[len] = 0; xyzzy: -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE pid = fork (); if (pid == -1) error ("Can't spawn subshell"); if (pid == 0) -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ { char *sh = 0; @@ -684,7 +685,7 @@ sys_subshell (void) if (str) sys_chdir (str); -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* Waits for process completion */ if (_spawnlp (_P_WAIT, sh, sh, NULL) != 0) @@ -714,7 +715,7 @@ sys_subshell (void) wait_for_termination (pid); restore_signal_handlers (saved_handlers); -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ } @@ -961,7 +962,7 @@ init_baud_rate (struct device *d) assert (DEVICE_TTY_P (d)); { int input_fd = CONSOLE_TTY_DATA (con)->infd; -#if defined (WINDOWSNT) +#if defined (WIN32_NATIVE) DEVICE_TTY_DATA (d)->ospeed = 15; #elif defined (HAVE_TERMIOS) struct termios sg; @@ -1387,7 +1388,7 @@ disconnect_controlling_terminal (void) /* It's wrong to encase these into #ifdef HAVE_TTY because we need them for child TTY processes. */ /* However, this does break NT support while we don't do child TTY processes */ -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE /* Set *TC to the parameters associated with the terminal FD. Return zero if all's well, or -1 if we ran into an error we @@ -1406,7 +1407,7 @@ emacs_get_tty (int fd, struct emacs_tty *settings) if (ioctl (fd, TCGETA, &settings->main) < 0) return -1; -#elif !defined (WINDOWSNT) +#elif !defined (WIN32_NATIVE) /* I give up - I hope you have the BSD ioctls. */ if (ioctl (fd, TIOCGETP, &settings->main) < 0) return -1; @@ -1480,7 +1481,7 @@ emacs_set_tty (int fd, struct emacs_tty *settings, int flushp) if (ioctl (fd, flushp ? TCSETAF : TCSETAW, &settings->main) < 0) return -1; -#elif !defined (WINDOWSNT) +#elif !defined (WIN32_NATIVE) /* I give up - I hope you have the BSD ioctls. */ if (ioctl (fd, (flushp) ? TIOCSETP : TIOCSETN, &settings->main) < 0) return -1; @@ -1503,7 +1504,7 @@ emacs_set_tty (int fd, struct emacs_tty *settings, int flushp) return 0; } -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ /* ------------------------------------------------------ */ /* Initializing a device */ @@ -1663,14 +1664,14 @@ tty_init_sys_modes_on_device (struct device *d) tty.main.c_iflag &= ~BRKINT; #endif /* AIX */ #else /* if not HAVE_TERMIO */ -#if !defined (WINDOWSNT) +#if !defined (WIN32_NATIVE) con->tty_erase_char = make_char (tty.main.sg_erase); tty.main.sg_flags &= ~(ECHO | CRMOD | XTABS); if (TTY_FLAGS (con).meta_key) tty.main.sg_flags |= ANYP; /* #### should we be using RAW mode here? */ tty.main.sg_flags |= /* interrupt_input ? RAW : */ CBREAK; -#endif /* not WINDOWSNT */ +#endif /* not WIN32_NATIVE */ #endif /* not HAVE_TERMIO */ /* If going to use CBREAK mode, we must request C-g to interrupt @@ -2153,24 +2154,15 @@ hft_reset (struct console *con) #if !defined(HAVE_TEXT_START) && !defined(PDUMP) -#ifdef __cplusplus - extern "C" int _start (void); -#else - extern int _start (void); -#endif +EXTERN_C int _start (void); char * start_of_text (void) { #ifdef TEXT_START - return ((char *) TEXT_START); + return (char *) TEXT_START; #else -#ifdef GOULD - extern csrt (); - return ((char *) csrt); -#else /* not GOULD */ - return ((char *) _start); -#endif /* GOULD */ + return (char *) _start; #endif /* TEXT_START */ } #endif /* !defined(HAVE_TEXT_START) && !defined(PDUMP) */ @@ -2201,7 +2193,7 @@ start_of_text (void) * */ -#if defined(ORDINARY_LINK) && !defined(__MINGW32__) +#if defined(ORDINARY_LINK) && !defined(MINGW) extern char **environ; #endif @@ -2279,15 +2271,10 @@ end_of_data (void) extern Lisp_Object Vsystem_name; -#ifdef HAVE_SOCKETS -# include -# include -#endif /* HAVE_SOCKETS */ - void init_system_name (void) { -#if defined (WINDOWSNT) +#if defined (WIN32_NATIVE) char hostname [MAX_COMPUTERNAME_LENGTH + 1]; size_t size = sizeof (hostname); GetComputerName (hostname, &size); @@ -2525,7 +2512,7 @@ strerror (int errnum) #endif /* ! HAVE_STRERROR */ -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE struct errentry { unsigned long oscode; /* Win32 error */ @@ -2622,7 +2609,7 @@ mswindows_set_last_errno (void) mswindows_set_errno (GetLastError ()); } -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ /************************************************************************/ @@ -2665,7 +2652,7 @@ sys_open (const char *path, int oflag, ...) PATHNAME_CONVERT_OUT (path); -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* Make all handles non-inheritable */ oflag |= _O_NOINHERIT; #endif @@ -2705,7 +2692,7 @@ interruptible_open (const char *path, int oflag, int mode) PATHNAME_CONVERT_OUT (nonreloc); -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* Make all handles non-inheritable */ oflag |= _O_NOINHERIT; #endif @@ -2819,7 +2806,7 @@ FILE * sys_fopen (const char *path, const char *type) { PATHNAME_CONVERT_OUT (path); -#if defined (WINDOWSNT) +#if defined (WIN32_NATIVE) { int fd; int oflag; @@ -2972,7 +2959,7 @@ int sys_mkdir (const char *path, mode_t mode) { PATHNAME_CONVERT_OUT (path); -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE return mkdir (path); #else return mkdir (path, mode); @@ -3120,26 +3107,31 @@ sys_readlink (const char *path, char *buf, size_t bufsiz) } #endif /* ENCAPSULATE_READLINK */ - #ifdef ENCAPSULATE_FSTAT int sys_fstat (int fd, struct stat *buf) { +#ifdef WIN32_NATIVE + return mswindows_fstat (fd, buf); +#else return fstat (fd, buf); +#endif } #endif /* ENCAPSULATE_FSTAT */ - #ifdef ENCAPSULATE_STAT int sys_stat (const char *path, struct stat *buf) { PATHNAME_CONVERT_OUT (path); +#ifdef WIN32_NATIVE + return mswindows_stat (path, buf); +#else return stat (path, buf); +#endif } #endif /* ENCAPSULATE_STAT */ - /****************** file-manipulation calls *****************/ #ifdef ENCAPSULATE_CHMOD @@ -3179,14 +3171,14 @@ sys_rename (const char *old, const char *new) { PATHNAME_CONVERT_OUT (old); PATHNAME_CONVERT_OUT (new); -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* Windows rename fails if NEW exists */ if (rename (old, new) == 0) return 0; if (errno != EEXIST) return -1; unlink (new); -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ return rename (old, new); } #endif /* ENCAPSULATE_RENAME */ @@ -3401,7 +3393,7 @@ static int process_times_available; static int get_process_times_1 (long *user_ticks, long *system_ticks) { -#if defined (_SC_CLK_TCK) || defined (CLK_TCK) && !defined(WINDOWSNT) +#if defined (_SC_CLK_TCK) || defined (CLK_TCK) && !defined(WIN32_NATIVE) /* We have the POSIX times() function available. */ struct tms tttt; times (&tttt); @@ -3543,7 +3535,7 @@ get_random (void) #if !defined (SYS_SIGLIST_DECLARED) && !defined (HAVE_SYS_SIGLIST) -#if defined(WINDOWSNT) || defined(__CYGWIN32__) +#if defined(WIN32_NATIVE) || defined(CYGWIN) const char *sys_siglist[] = { "bum signal!!", diff --git a/src/sysdep.h b/src/sysdep.h index c5476de..0e374c2 100644 --- a/src/sysdep.h +++ b/src/sysdep.h @@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */ #include -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE extern char **environ; #endif @@ -50,10 +50,7 @@ Bufbyte get_eof_char (int fd); /* Wait for subprocess with process id `pid' to terminate and make sure it will get eliminated (not remain forever as a zombie) */ -#ifdef WINDOWSNT -#include -void wait_for_termination (HANDLE pid); -#else +#ifndef WIN32_NATIVE void wait_for_termination (int pid); #endif @@ -168,11 +165,6 @@ int dup2 (int oldd, int newd); const char *strerror (int); #endif -#ifdef WINDOWSNT -void mswindows_set_errno (unsigned long win32_error); -void mswindows_set_last_errno (void); -#endif - int interruptible_open (const char *path, int oflag, int mode); #ifndef HAVE_H_ERRNO diff --git a/src/sysdir.h b/src/sysdir.h index 76f9cd86..0139a8d 100644 --- a/src/sysdir.h +++ b/src/sysdir.h @@ -29,10 +29,11 @@ Boston, MA 02111-1307, USA. */ #ifdef SYSV_SYSTEM_DIR # include +#elif defined (WIN32_NATIVE) +# include +# include "ndir.h" #elif defined (NONSYSTEM_DIR_LIBRARY) # include "ndir.h" -#elif defined (MSDOS) -# include #else # include #endif /* not NONSYSTEM_DIR_LIBRARY */ @@ -58,11 +59,7 @@ Boston, MA 02111-1307, USA. */ Since applying strlen to the name always works, we'll just do that. */ #define NAMLEN(p) strlen (p->d_name) -#ifdef MSDOS -#define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != 0) -#else #define DIRENTRY_NONEMPTY(p) ((p)->d_ino) -#endif /* encapsulation: directory calls */ diff --git a/src/sysdll.c b/src/sysdll.c index 2bcfc67..35e9117 100644 --- a/src/sysdll.c +++ b/src/sysdll.c @@ -216,7 +216,12 @@ dll_variable (dll_handle h, const char *n) { return dld_get_symbol(n); } -#elif defined(_WINDOWS) || defined(WIN32) +#elif defined (WIN32_NATIVE) + +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN + int dll_init (const char *arg) { diff --git a/src/sysdll.h b/src/sysdll.h index ebb8a79..bda610e 100644 --- a/src/sysdll.h +++ b/src/sysdll.h @@ -26,9 +26,9 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA extern "C" { #endif -#if defined(WIN32) +#if defined(WIN32_NATIVE) #define DLLEXPORT __declspec(dllexport) -#elif defined(_WINDOWS) +#elif defined(WIN16) #define DLLEXPORT FAR PASCAL _EXPORT #else #define DLLEXPORT diff --git a/src/sysfile.h b/src/sysfile.h index f573ce3..f5f7490 100644 --- a/src/sysfile.h +++ b/src/sysfile.h @@ -24,9 +24,8 @@ Boston, MA 02111-1307, USA. */ #define INCLUDED_sysfile_h_ #include -#include -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE #include /* does not always imply this */ #endif @@ -44,17 +43,24 @@ Boston, MA 02111-1307, USA. */ #ifndef makedev #include /* some typedefs are used in sys/file.h */ #endif + +#ifndef WIN32_NATIVE #include +#endif + #include + +#ifndef WIN32_NATIVE #include +#endif -#if defined (NeXT) || defined(__CYGWIN32__) +#if defined (NeXT) || defined(CYGWIN) /* what is needed from here? Do others need it too? O_BINARY is in here under cygwin. */ # include #endif /* NeXT */ -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #include #include #endif @@ -95,7 +101,7 @@ Boston, MA 02111-1307, USA. */ #endif #ifndef CREAT_MODE -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #define CREAT_MODE (S_IREAD | S_IWRITE) #else #define CREAT_MODE (0666) @@ -118,6 +124,30 @@ Boston, MA 02111-1307, USA. */ #endif #endif +#ifndef READ_PLUS_TEXT +#ifdef O_TEXT +#define READ_PLUS_TEXT "r+t" +#else +#define READ_PLUS_TEXT "r+" +#endif +#endif + +#ifndef READ_PLUS_BINARY +#ifdef O_BINARY +#define READ_PLUS_BINARY "r+b" +#else +#define READ_PLUS_BINARY "r+" +#endif +#endif + +#ifndef WRITE_TEXT +#ifdef O_TEXT +#define WRITE_TEXT "wt" +#else +#define WRITE_TEXT "w" +#endif +#endif + #ifndef WRITE_BINARY #ifdef O_BINARY #define WRITE_BINARY "wb" @@ -223,8 +253,21 @@ Boston, MA 02111-1307, USA. */ # define MAXPATHLEN 1024 #endif +/* The following definitions are needed under Windows, at least */ #ifndef X_OK -# define X_OK 01 +# define X_OK 1 +#endif + +#ifndef R_OK +# define R_OK 4 +#endif + +#ifndef W_OK +# define W_OK 2 +#endif + +#ifndef F_OK +# define F_OK 0 #endif #ifndef FD_CLOEXEC diff --git a/src/sysfloat.h b/src/sysfloat.h index 8f6b539..d80094a 100644 --- a/src/sysfloat.h +++ b/src/sysfloat.h @@ -37,8 +37,7 @@ Boston, MA 02111-1307, USA. */ # define _NMAXLDBL THIS_FILENAME ## _nmaxldbl # endif -#if defined(MSDOS) || (defined(LINUX) && \ - !(defined (__GLIBC__) && (__GLIBC__ >= 2))) +#if defined(LINUX) && !(defined (__GLIBC__) && (__GLIBC__ >= 2)) /* These are redefined (correctly, but differently) in values.h. */ #undef INTBITS #undef LONGBITS @@ -47,7 +46,7 @@ Boston, MA 02111-1307, USA. */ #include -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* A quirky way to obtain logb prototype */ #include #define logb _logb diff --git a/src/sysproc.h b/src/sysproc.h index 217f580..f8302e2 100644 --- a/src/sysproc.h +++ b/src/sysproc.h @@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA. */ #include "systime.h" /* necessary for sys/resource.h; also gets the FD_* defines on some systems. */ -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE #include #endif @@ -37,17 +37,61 @@ Boston, MA 02111-1307, USA. */ #ifdef HAVE_SOCKETS /* TCP connection support, if kernel can do it */ # include /* AJK */ -# include -# include -# include -# include -#ifdef NEED_NET_ERRNO_H -#include -#endif /* NEED_NET_ERRNO_H */ +# ifndef WIN32_NATIVE +# include +# include +# include +# include +# endif +# ifdef NEED_NET_ERRNO_H +# include +# endif /* NEED_NET_ERRNO_H */ #elif defined (SKTPAIR) # include #endif /* HAVE_SOCKETS */ +#ifdef WIN32_NATIVE +/* Note: winsock.h already included in systime.h above */ +/* map winsock error codes to standard names */ +#define EWOULDBLOCK WSAEWOULDBLOCK +#define EINPROGRESS WSAEINPROGRESS +#define EALREADY WSAEALREADY +#define ENOTSOCK WSAENOTSOCK +#define EDESTADDRREQ WSAEDESTADDRREQ +#define EMSGSIZE WSAEMSGSIZE +#define EPROTOTYPE WSAEPROTOTYPE +#define ENOPROTOOPT WSAENOPROTOOPT +#define EPROTONOSUPPORT WSAEPROTONOSUPPORT +#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT +#define EOPNOTSUPP WSAEOPNOTSUPP +#define EPFNOSUPPORT WSAEPFNOSUPPORT +#define EAFNOSUPPORT WSAEAFNOSUPPORT +#define EADDRINUSE WSAEADDRINUSE +#define EADDRNOTAVAIL WSAEADDRNOTAVAIL +#define ENETDOWN WSAENETDOWN +#define ENETUNREACH WSAENETUNREACH +#define ENETRESET WSAENETRESET +#define ECONNABORTED WSAECONNABORTED +#define ECONNRESET WSAECONNRESET +#define ENOBUFS WSAENOBUFS +#define EISCONN WSAEISCONN +#define ENOTCONN WSAENOTCONN +#define ESHUTDOWN WSAESHUTDOWN +#define ETOOMANYREFS WSAETOOMANYREFS +#define ETIMEDOUT WSAETIMEDOUT +#define ECONNREFUSED WSAECONNREFUSED +#define ELOOP WSAELOOP +/* #define ENAMETOOLONG WSAENAMETOOLONG */ +#define EHOSTDOWN WSAEHOSTDOWN +#define EHOSTUNREACH WSAEHOSTUNREACH +/* #define ENOTEMPTY WSAENOTEMPTY */ +#define EPROCLIM WSAEPROCLIM +#define EUSERS WSAEUSERS +#define EDQUOT WSAEDQUOT +#define ESTALE WSAESTALE +#define EREMOTE WSAEREMOTE +#endif /* WIN32_NATIVE */ + /* On some systems, e.g. DGUX, inet_addr returns a 'struct in_addr'. */ #ifdef HAVE_BROKEN_INET_ADDR # define IN_ADDR struct in_addr @@ -101,10 +145,4 @@ Boston, MA 02111-1307, USA. */ int poll_fds_for_input (SELECT_TYPE mask); -#ifdef MSDOS -/* #include */ -/* Damn that local process.h! Instead we can define P_WAIT ourselves. */ -#define P_WAIT 1 -#endif - #endif /* INCLUDED_sysproc_h_ */ diff --git a/src/syspwd.h b/src/syspwd.h index 510234e..e3698ce 100644 --- a/src/syspwd.h +++ b/src/syspwd.h @@ -19,5 +19,21 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not really in FSF. */ -#include +#ifndef WIN32_NATIVE +# include + +#else /* WIN32_NATIVE */ + +struct passwd { + char *pw_name; + char *pw_passwd; + int pw_uid; + int pw_gid; + int pw_quota; + char *pw_gecos; + char *pw_dir; + char *pw_shell; +}; + +#endif /* WIN32_NATIVE */ diff --git a/src/syssignal.h b/src/syssignal.h index cacf07b..f0be8d1 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -212,7 +212,7 @@ signal_handler_t sys_do_signal (int signal_number, signal_handler_t action); #ifdef BSD #define EMACS_KILLPG(gid, signo) killpg (gid, signo) #else -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #define EMACS_KILLPG(gid, signo) kill (gid, signo) #else #define EMACS_KILLPG(gid, signo) kill (-(gid), signo) @@ -234,14 +234,14 @@ extern const char *sys_siglist[]; SIGTYPE memory_warning_signal (int sig); #endif -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE /* Prototypes for signal functions, see nt.c */ -typedef void (__cdecl *msw_sighandler) (int); -msw_sighandler msw_sigset (int sig, msw_sighandler handler); -int msw_sighold (int nsig); -int msw_sigrelse (int nsig); -int msw_sigpause (int nsig); -int msw_raise (int nsig); -#endif /* _WIN32 */ +typedef void (__cdecl *mswindows_sighandler) (int); +mswindows_sighandler mswindows_sigset (int sig, mswindows_sighandler handler); +int mswindows_sighold (int nsig); +int mswindows_sigrelse (int nsig); +int mswindows_sigpause (int nsig); +int mswindows_raise (int nsig); +#endif /* WIN32_NATIVE */ #endif /* INCLUDED_syssignal_h_ */ diff --git a/src/systime.h b/src/systime.h index 159139f..e51ac51 100644 --- a/src/systime.h +++ b/src/systime.h @@ -24,14 +24,14 @@ Boston, MA 02111-1307, USA. */ #define INCLUDED_systime_h_ #ifdef TIME_WITH_SYS_TIME -#include -#include +# include +# include #else -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif #endif /* select() is supposed to be (Unix98) defined in sys/time.h, @@ -41,17 +41,33 @@ Boston, MA 02111-1307, USA. */ #include #endif -#if defined(WINDOWSNT) && defined(HAVE_X_WINDOWS) +#ifdef WIN32_NATIVE + +/* This defines struct timeval */ +#include + +struct timezone + { + int tz_minuteswest; /* minutes west of Greenwich */ + int tz_dsttime; /* type of dst correction */ + }; + +#ifdef HAVE_X_WINDOWS /* Provides gettimeofday etc */ #include #include -#endif +#else +/* X11R6 on NT provides the single parameter version of this command */ +void gettimeofday (struct timeval *, struct timezone *); +#endif /* HAVE_X_WINDOWS */ + +#endif /* WIN32_NATIVE */ #ifdef HAVE_UTIME_H # include #endif -#if defined(HAVE_TZNAME) && !defined(WINDOWSNT) && !defined(__CYGWIN32__) +#if defined(HAVE_TZNAME) && !defined(WIN32_NATIVE) && !defined(CYGWIN) #ifndef tzname /* For SGI. */ extern char *tzname[]; /* RS6000 and others want it this way. */ #endif @@ -217,7 +233,7 @@ int set_file_times (char *filename, EMACS_TIME atime, EMACS_TIME mtime); void get_process_times (double *user_time, double *system_time, double *real_time); -#if defined(WINDOWSNT) || defined(BROKEN_CYGWIN) || defined(__MINGW32__) +#if defined(WIN32_NATIVE) || defined(BROKEN_CYGWIN) /* setitimer emulation for Win32 (see nt.c) */ @@ -233,6 +249,6 @@ int setitimer (int kind, const struct itimerval* itnew, #define ITIMER_REAL 1 #define ITIMER_PROF 2 -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ #endif /* INCLUDED_systime_h_ */ diff --git a/src/systty.h b/src/systty.h index 67015e8..c15906e 100644 --- a/src/systty.h +++ b/src/systty.h @@ -94,9 +94,9 @@ Boston, MA 02111-1307, USA. */ # include # endif -#elif defined (DOS_NT) +#elif defined (WIN32_NATIVE) -/***** (3) The MSDOS/NT way *****/ +/***** (3) The WIN32_NATIVE way *****/ /* Nothing doing */ @@ -124,7 +124,7 @@ Boston, MA 02111-1307, USA. */ /* Generally useful to include this file: */ /* But Sun OS has broken include files and doesn't want it included */ -#if !defined (DOS_NT) && !defined (WIN32) && !defined (SUNOS4) +#if !defined (WIN32_NATIVE) && !defined (SUNOS4) # include #endif /* UNIPLUS systems may have FIONREAD. */ @@ -333,7 +333,7 @@ Boston, MA 02111-1307, USA. */ No big loss -- it just means that ^Z won't work right if we're run from sh. */ # define EMACS_SET_PROCESS_GROUP(pg) -#elif defined(__MINGW32__) +#elif defined(MINGW) # define EMACS_SEPARATE_PROCESS_GROUP() #else /* Under NeXTstep, a process group of 0 is not the same as specifying @@ -384,11 +384,11 @@ struct emacs_tty { #ifdef HAVE_TERMIO struct termio main; #else /* !HAVE_TERMIO */ -#ifdef DOS_NT +#ifdef WIN32_NATIVE int main; -#else /* not DOS_NT */ +#else /* not WIN32_NATIVE */ struct sgttyb main; -#endif /* not DOS_NT */ +#endif /* not WIN32_NATIVE */ #endif /* !HAVE_TERMIO */ #endif /* !HAVE_TCATTR */ @@ -428,11 +428,11 @@ int emacs_set_tty (int fd, struct emacs_tty *settings, int flushp); #define EMACS_TTY_TABS_OK(p) (((p)->main.c_oflag & TABDLY) != TAB3) #else /* neither HAVE_TERMIO nor HAVE_TERMIOS */ -#ifdef DOS_NT +#ifdef WIN32_NATIVE #define EMACS_TTY_TABS_OK(p) 0 -#else /* not DOS_NT */ +#else /* not WIN32_NATIVE */ #define EMACS_TTY_TABS_OK(p) (((p)->main.sg_flags & XTABS) != XTABS) -#endif /* not DOS_NT */ +#endif /* not WIN32_NATIVE */ #endif /* not def HAVE_TERMIO */ #endif /* not def HAVE_TERMIOS */ diff --git a/src/syswindows.h b/src/syswindows.h index 51063e4..e4389c7 100644 --- a/src/syswindows.h +++ b/src/syswindows.h @@ -29,9 +29,35 @@ Boston, MA 02111-1307, USA. */ #ifndef INCLUDED_syswindows_h_ #define INCLUDED_syswindows_h_ +/* Note that there are currently FOUR different general + Windows-related include files in src! + + Uses are approximately: + + syswindows.h: Mostly a wrapper around , including missing + defines as necessary. Also includes stuff needed on both Cygwin and + native Windows, regardless of window system chosen. + + console-msw.h: Used on both Cygwin and native Windows, but only when + native window system (as opposed to X) chosen. + + nt.h: [will be renamed to win32.h] Used only on native Windows, and + regardless of window system chosen -- but used on both purely native + Windows (s/windowsnt.h) and MinGW (s/mingw32.h). + + ntheap.h: Used only on native Windows and only when standard dumping + mechanism (unexnt.c) used. + + All of the last three files include the first. +*/ + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include -#if (defined (__CYGWIN32__) || defined(__MINGW32__)) && \ +#if (defined (CYGWIN) || defined(MINGW)) && \ CYGWIN_VERSION_DLL_MAJOR < 21 extern BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ); extern BOOL WINAPI PlaySound(LPCSTR,HMODULE,DWORD); @@ -74,7 +100,7 @@ extern BOOL WINAPI PlaySound(LPCSTR,HMODULE,DWORD); #endif /* windows.h defines. */ -#if defined (__CYGWIN32__) && (CYGWIN_VERSION_DLL_MAJOR < 20) +#if defined (CYGWIN) && (CYGWIN_VERSION_DLL_MAJOR < 20) typedef NMHDR *LPNMHDR; #endif diff --git a/src/unexalpha.c b/src/unexalpha.c index 9602c10..b8705f9 100644 --- a/src/unexalpha.c +++ b/src/unexalpha.c @@ -55,8 +55,6 @@ static void mark_x (char *); if (lseek (_fd, _position, L_SET) != _position) \ fatal_unexec (_error_message, _error_arg); -void *sbrk(); - #define EEOF -1 static struct scnhdr *text_section; @@ -83,12 +81,13 @@ struct headers { }; - /* Define name of label for entry point for the dumped executable. */ #ifndef DEFAULT_ENTRY_ADDRESS #define DEFAULT_ENTRY_ADDRESS __start #endif +EXTERN_C int DEFAULT_ENTRY_ADDRESS (void); + int unexec (char *new_name, char *a_name, @@ -208,7 +207,6 @@ unexec (char *new_name, char *a_name, nhdr.aout.bsize = 0; if (entry_address == 0) { - extern int DEFAULT_ENTRY_ADDRESS (void); nhdr.aout.entry = (unsigned long)DEFAULT_ENTRY_ADDRESS; } else diff --git a/src/unexcw.c b/src/unexcw.c index 7b3db7c..8312e20 100644 --- a/src/unexcw.c +++ b/src/unexcw.c @@ -82,6 +82,9 @@ if (lseek(a_out, 0, SEEK_CUR) != a) \ exit(-1); \ } +void +unexec (char *out_name, char *in_name, void *start_data, + void * d1, void * d2); /* Dump out .data and .bss sections into a new executable. */ void unexec (char *out_name, char *in_name, void *start_data, void * d1, void * d2) diff --git a/src/unexec.c b/src/unexec.c index ae2f945..fae0162 100644 --- a/src/unexec.c +++ b/src/unexec.c @@ -209,33 +209,7 @@ pointer looks like an int) but not on all machines. int need_coff_header = 1; #include /* The location might be a poor assumption */ #else -#ifdef MSDOS -#if __DJGPP__ > 1 -#include /* for O_RDONLY, O_RDWR */ -#endif -#include -#define filehdr external_filehdr -#define scnhdr external_scnhdr -#define syment external_syment -#define auxent external_auxent -#define n_numaux e_numaux -#define n_type e_type -struct aouthdr -{ - unsigned short magic; /* type of file */ - unsigned short vstamp; /* version stamp */ - unsigned long tsize; /* text size in bytes, padded to FW bdry*/ - unsigned long dsize; /* initialized data " " */ - unsigned long bsize; /* uninitialized data " " */ - unsigned long entry; /* entry pt. */ - unsigned long text_start;/* base of text used for this file */ - unsigned long data_start;/* base of data used for this file */ -}; - - -#else /* not MSDOS */ #include -#endif /* not MSDOS */ #endif /* not COFF_ENCAPSULATE */ /* Define getpagesize if the system does not. @@ -911,14 +885,6 @@ copy_text_and_data (int new, int a_out) #else /* COFF, but not USG_SHARED_LIBRARIES */ -#ifdef MSDOS -#if __DJGPP__ >= 2 - /* Dump the original table of exception handlers, not the one - where our exception hooks are registered. */ - __djgpp_exception_toggle (); -#endif -#endif - lseek (new, (long) text_scnptr, 0); ptr = (char *) f_ohdr.text_start; #ifdef HEADER_INCL_IN_TEXT @@ -933,13 +899,6 @@ copy_text_and_data (int new, int a_out) end = ptr + f_ohdr.dsize; write_segment (new, ptr, end); -#ifdef MSDOS -#if __DJGPP__ >= 2 - /* Restore our exception hooks. */ - __djgpp_exception_toggle (); -#endif -#endif - #endif /* USG_SHARED_LIBRARIES */ #else /* if not COFF */ @@ -1221,11 +1180,7 @@ adjust_lnnoptrs (writedesc, readdesc, new_name) if (!lnnoptr || !f_hdr.f_symptr) return 0; -#ifdef MSDOS - if ((new = writedesc) < 0) -#else if ((new = open (new_name, O_RDWR)) < 0) -#endif { PERROR (new_name); return -1; @@ -1247,9 +1202,7 @@ adjust_lnnoptrs (writedesc, readdesc, new_name) } } } -#ifndef MSDOS close (new); -#endif return 0; } diff --git a/src/unexnt.c b/src/unexnt.c index d10f745..77cf487 100644 --- a/src/unexnt.c +++ b/src/unexnt.c @@ -103,13 +103,6 @@ DWORD data_size = UNINIT_LONG; PUCHAR bss_start = UNINIT_PTR; DWORD bss_size = UNINIT_LONG; -#ifdef HAVE_NTGUI -HINSTANCE hinst = NULL; -HINSTANCE hprevinst = NULL; -LPSTR lpCmdLine = ""; -int nCmdShow = 0; -#endif /* HAVE_NTGUI */ - /* Startup code for running on NT. When we are running as the dumped version, we need to bootstrap our heap and .bss section into our address space before we can actually hand off control to the startup @@ -163,7 +156,7 @@ _start (void) hit and fix all the weirdities this causes us, the better --kkm */ #if 0 /* The default behavior is to treat files as binary and patch up - text files appropriately, in accordance with the MSDOS code. */ + text files appropriately. */ _fmode = O_BINARY; #endif @@ -173,14 +166,6 @@ _start (void) SetConsoleCtrlHandler ((PHANDLER_ROUTINE) ctrl_c_handler, TRUE); #endif - /* Invoke the NT CRT startup routine now that our housecleaning - is finished. */ -#ifdef HAVE_NTGUI - /* determine WinMain args like crt0.c does */ - hinst = GetModuleHandle(NULL); - lpCmdLine = GetCommandLine(); - nCmdShow = SW_SHOWDEFAULT; -#endif mainCRTStartup (); } diff --git a/src/vm-limit.c b/src/vm-limit.c index b6c7dda..357e5c0 100644 --- a/src/vm-limit.c +++ b/src/vm-limit.c @@ -57,6 +57,7 @@ check_memory_limits (void) POINTER cp; unsigned long five_percent; unsigned long data_size; + void (*save_warn_fun) (const char *); if (lim_data == 0) get_lim_data (); @@ -67,36 +68,43 @@ check_memory_limits (void) data_size = (char *) cp - (char *) data_space_start; if (warn_function) - switch (warnlevel) - { - case 0: - if (data_size > five_percent * 15) - { - warnlevel++; - (*warn_function) ("Warning: past 75% of memory limit"); - } - break; - - case 1: - if (data_size > five_percent * 17) - { - warnlevel++; - (*warn_function) ("Warning: past 85% of memory limit"); - } - break; - - case 2: - if (data_size > five_percent * 19) - { - warnlevel++; - (*warn_function) ("Warning: past 95% of memory limit"); - } - break; - - default: - (*warn_function) ("Warning: past acceptable memory limits"); - break; - } + { + /* temporarily reset the warn_function to 0 or we will get infinite + looping. */ + save_warn_fun = warn_function; + warn_function = 0; + switch (warnlevel) + { + case 0: + if (data_size > five_percent * 15) + { + warnlevel++; + (*warn_function) ("Warning: past 75% of memory limit"); + } + break; + + case 1: + if (data_size > five_percent * 17) + { + warnlevel++; + (*warn_function) ("Warning: past 85% of memory limit"); + } + break; + + case 2: + if (data_size > five_percent * 19) + { + warnlevel++; + (*warn_function) ("Warning: past 95% of memory limit"); + } + break; + + default: + (*warn_function) ("Warning: past acceptable memory limits"); + break; + } + warn_function = save_warn_fun; + } /* If we go down below 70% full, issue another 75% warning when we go up again. */ diff --git a/src/window.c b/src/window.c index c3e511f..b981c91 100644 --- a/src/window.c +++ b/src/window.c @@ -282,7 +282,7 @@ allocate_window (void) p->glyph_cachels = Dynarr_new (glyph_cachel); p->line_start_cache = Dynarr_new (line_start_cache); p->subwindow_instance_cache = make_lisp_hash_table (30, - HASH_TABLE_KEY_WEAK, + HASH_TABLE_KEY_VALUE_WEAK, HASH_TABLE_EQUAL); p->line_cache_last_updated = Qzero; INIT_DISP_VARIABLE (last_point_x, 0); @@ -3519,7 +3519,7 @@ make_dummy_parent (Lisp_Object window) p->glyph_cachels = Dynarr_new (glyph_cachel); p->subwindow_instance_cache = make_lisp_hash_table (30, - HASH_TABLE_KEY_WEAK, + HASH_TABLE_KEY_VALUE_WEAK, HASH_TABLE_EQUAL); /* Put new into window structure in place of window */ @@ -5369,7 +5369,7 @@ by `current-window-configuration' (which see). it up as needed. */ w->subwindow_instance_cache = make_lisp_hash_table (30, - HASH_TABLE_KEY_WEAK, + HASH_TABLE_KEY_VALUE_WEAK, HASH_TABLE_EQUAL); SET_LAST_MODIFIED (w, 1); SET_LAST_FACECHANGE (w); diff --git a/tests/ChangeLog b/tests/ChangeLog index 821a5a1..b86d41a 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,11 @@ +2000-07-19 Martin Buchholz + + * XEmacs 21.2.35 is released. + +2000-06-17 Martin Buchholz + + * automated/database-tests.el: Remove any previous .pag, .dir files. + 2000-05-28 Martin Buchholz * XEmacs 21.2.34 is released. diff --git a/tests/automated/database-tests.el b/tests/automated/database-tests.el index 3c489a8..84955eb 100644 --- a/tests/automated/database-tests.el +++ b/tests/automated/database-tests.el @@ -37,7 +37,10 @@ (require 'test-harness)))) (flet ((delete-database-files (filename) - (dolist (fn (list filename (concat filename ".db"))) + (dolist (fn (list filename + (concat filename ".db") + (concat filename ".pag") + (concat filename ".dir"))) (ignore-file-errors (delete-file fn)))) (test-database (db) diff --git a/version.sh b/version.sh index 44b7645..e616054 100644 --- a/version.sh +++ b/version.sh @@ -2,8 +2,8 @@ emacs_is_beta=t emacs_major_version=21 emacs_minor_version=2 -emacs_beta_version=34 -xemacs_codename="Molpe" +emacs_beta_version=35 +xemacs_codename="Nike" infodock_major_version=4 infodock_minor_version=0 infodock_build_version=8