Mercurial > hg > xemacs-beta
changeset 373:6240c7796c7a r21-2b2
Import from CVS: tag r21-2b2
line wrap: on
line diff
--- a/CHANGES-beta Mon Aug 13 11:03:09 2007 +0200 +++ b/CHANGES-beta Mon Aug 13 11:04:06 2007 +0200 @@ -1,4 +1,16 @@ -*- indented-text -*- +to 21.2 beta2 "Aether" +-- Synched with 21.0-pre14 "Poitou" +-- isearch improvements from Hrvoje Niksic +-- bytecompiler fix from Martin Buccholz +-- shadow.el speedup from Martin Buchholz +-- clash detection update from Jan Vroonhof +-- Indirect buffers from Hrvoje Niksic +-- ~user completion cleanup from Greg Klanderman +-- New face property from Didier Verna +-- ~user completion and fixes from Greg Klanderman +-- casefiddle.c speedup from Martin Buchholz + to 21.2 beta1 "Aeolus" -- Synch with 21.0-pre6 -- Removal of ancient obsolete symbols courtesy of Altrasoft
--- a/ChangeLog Mon Aug 13 11:03:09 2007 +0200 +++ b/ChangeLog Mon Aug 13 11:04:06 2007 +0200 @@ -1,3 +1,86 @@ +1998-09-29 SL Baur <steve@altair.xemacs.org> + + * XEmacs 21.2-beta2 is released. + +1998-09-09 Gunnar Evermann <Gunnar.Evermann@nats.informatik.uni-hamburg.de> + + * lwlib/xlwmenu.c: + * lwlib/xlwscrollbar: fix for Motif >=2.0 + Patch provided by Glenn Barry <gtb@eng.sun.com> + + * PROBLEMS: XEmacs 21.0 now works on HP-UX 11.0 + +1998-09-02 Andy Piper <andyp@parallax.co.uk> + + * configure.in: check for cygwin32/version.h. + +1998-08-31 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * PROBLEMS: Added AIX 4.3 note. + + * configure.in: Better detection of AIX 4.3. + AIX xlc can do -g and -Ox at the same time. + +1998-09-05 SL Baur <steve@altair.xemacs.org> + + * etc/check_cygwin_setup.sh: grammar fix. + +1998-09-02 Andy Piper <andyp@parallax.co.uk> + + * etc/check_cygwin_setup.sh: fix a couple of buglets. + +1998-08-23 Adrian Aichner <aichner@ecf.teradyne.com> + + * etc/sample.emacs: Enable sound support on mswindows devices. + +1998-08-17 P. E. Jareth Hein <jareth@camelot.co.jp> + + * configure.in: Alter configure so that it checks for mismatched PNG + header/libs, screams a little louder on old/mismatched library + conditions for both PNG and XPM, stop screaming if png is not found and + no window-system is selected, and fixed a bug in the XPM checking. + +1998-08-06 Adrian Aichner <aichner@ecf.teradyne.com> + + * etc/TUTORIAL.de: Fixing typos and grammatical errors. Fixing + inconsistent usage of RET, <Return>, and <return> (only using + <Return> now). Changing TUTORIAL to TUTORIAL.de throughout + itself. Adding english equivalent to german translation of all + concepts used in TUTORIAL.de. + +1998-08-07 P. E. Jareth Hein <jareth@camelot.co.jp> + + * configure.usage (--without-gif): Modify text to reflect status + of GIF support + +1998-08-04 P. E. Jareth Hein <jareth@camelot.co.jp> + + * configure.in: add back in the support for the in-core GIF + code, change the required PNG library version to 1.0.2, and add + a warning if PNG not found, since PNG images are now distributed + as part of the core. Also minor wording changes in things reported + to the user. + +1998-07-28 Kai Haberzettl <khaberz@synnet.de> + + * BETA: Update mailing-list address for build-reports + +1998-08-01 SL Baur <steve@altair.xemacs.org> + + * Makefile.in (TAGS tags): Add variable `tagslisp' so a TAGS file + can built that includes package lisp. + +1998-07-23 Martin Buchholz <martin@xemacs.org> + + * configure.in: + - support multiple flavors of alpha, (XEmacs treats them identically) + - Fix AC_TRY_RUN so that actions have access to $? + - Identify DEC C compilers. Add default optimization CFLAGS and + always use -std. + - Use an extensible method for adding support for future compilers. + - Have SunPro C use that same extensible method. + - Make sol2 always use `-R', Linux and DEC OSF always use `-rpath' + 1998-07-19 SL Baur <steve@altair.xemacs.org> * XEmacs 21.2-beta1 is released.
--- a/INSTALL Mon Aug 13 11:03:09 2007 +0200 +++ b/INSTALL Mon Aug 13 11:04:06 2007 +0200 @@ -80,7 +80,7 @@ packages `mule-base' and `egg-its'. By default, packages will be searched for in the path -~/.xemacs::$prefix/lib/xemacs-${version}/mule-packages:$prefix/lib/xemacs/mule-packages:$prefix/lib/xemacs-${version}/packages:$prefix/lib/xemacs/packages +~/.xemacs::$prefix/lib/xemacs-${version}/mule-packages:$prefix/lib/xemacs/mule-packages:$prefix/lib/xemacs-${version}/xemacs-packages:$prefix/lib/xemacs/xemacs-packages This may be changed by specifying a different value with the --package-path configuration option.
--- a/Makefile.in Mon Aug 13 11:03:09 2007 +0200 +++ b/Makefile.in Mon Aug 13 11:04:06 2007 +0200 @@ -598,6 +598,7 @@ cd ./lwlib && chmod u+w *.[ch] Makefile.in.in PRUNE_VC = -name SCCS -prune -o -name RCS -prune -o -name CVS -prune -o +tagslisp = lisp TAGS tags: FRC.tags @echo "If you don't have a copy of etags around, then do 'make lib-src' first." $(RM) ${srcdir}/TAGS @@ -606,7 +607,7 @@ PATH=`$(pwd)`/lib-src:$$PATH ; export PATH; cd ${srcdir} && \ find src lwlib lib-src ${PRUNE_VC} -name '*.[ch]' -print | \ xargs etags -a -r '/[ ]*DEF\(VAR\|INE\)_[A-Z_]+[ ]*([ ]*"\([^"]+\)"/\2/'; \ - find lisp ${PRUNE_VC} -name '*.el' -print | \ + find ${tagslisp} ${PRUNE_VC} -name '*.el' -print | \ xargs etags -a -l none -r "/^(def\\(var\\|un\\|alias\\|const\\|macro\\)[ ]+'?\\([^ ]+\\)/\\2/" ## We have automated tests!
--- a/PROBLEMS Mon Aug 13 11:03:09 2007 +0200 +++ b/PROBLEMS Mon Aug 13 11:04:06 2007 +0200 @@ -2,7 +2,7 @@ This file describes various problems that have been encountered in compiling, installing and running XEmacs. It has been updated for -XEmacs 21.2. +XEmacs 21.0. This file is rather large, but we have tried to sort the entries by their respective relevance for XEmacs, but may have not succeeded @@ -29,7 +29,8 @@ * Problems with building XEmacs =============================== -** Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using +** General +*** Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using `-fno-strength-reduce'. gcc will generate incorrect code otherwise. This bug is present in at @@ -38,7 +39,7 @@ This problem is known to be fixed in egcs (or pgcc) 1.0 or later. -** Don't use -O2 with gcc 2.7.2 under Intel architectures without also +*** Don't use -O2 with gcc 2.7.2 under Intel architectures without also using `-fno-caller-saves'. gcc will generate incorrect code otherwise. This bug is still @@ -48,7 +49,16 @@ This problem is known to be fixed in egcs (or pgcc) 1.0 or later. -** Excessive optimization with pgcc can break XEmacs +*** When using gcc, you get the error message "undefined symbol __fixunsdfsi". +When using gcc, you get the error message "undefined symbol __main". + +This means that you need to link with the gcc library. It may be called +"gcc-gnulib" or "libgcc.a"; figure out where it is, and define LIB_GCC in +config.h to point to it. + +It may also work to use the GCC version of `ld' instead of the standard one. + +*** Excessive optimization with pgcc can break XEmacs It has been reported on some systems that compiling with -O6 can lead to XEmacs failures. The workaround is to use a lower optimization @@ -59,28 +69,21 @@ extensively and no sign of breakage has been seen on systems using glibc-2. -** `compress' and `uncompress' not found and XFree86 +*** src/Makefile and lib-src/Makefile are truncated--most of the file missing. -XFree86 installs a very old version of libz.a by default ahead of where -more modern version of libz might be installed. This will cause problems -when attempting to link against libMagick. The fix is to remove the old -libz.a in the X11 binary directory. +This can happen if configure uses GNU sed version 2.03. That version +had a bug. GNU sed version 2.05 works properly. -** Excessive optimization on AIX 4.2 can lead to compiler failure. +*** When compiling with X11, you get "undefined symbol _XtStrings". -Valdis.Kletnieks@vt.edu writes: - At least at the b34 level, and the latest-and-greatest IBM xlc - (3.1.4.4), there are problems with -O3. I haven't investigated - further. - -** Sed problems on Solaris 2.5 +This means that you are trying to link emacs against the X11r4 version of +libXt.a, but you have compiled either Emacs or the code in the lwlib +subdirectory with the X11r5 header files. That doesn't work. -There have been reports of Sun sed truncating very lines in the -Makefile during configuration. The workaround is to use GNU sed or, -even better, think of a better way to generate Makefile, and send us a -patch. :-) +Remember, you can't compile lwlib for r4 and emacs for r5, or vice versa. +They must be in sync. -** test-distrib says that the distribution has been clobbered +*** test-distrib says that the distribution has been clobbered or, temacs prints "Command key out of range 0-127" or, temacs runs and dumps xemacs, but xemacs totally fails to work. or, temacs gets errors dumping xemacs @@ -100,12 +103,162 @@ This will rebuild all the needed .elc files. -** `Error: No ExtNode to pop!' on Linux systems with Lesstif. +*** `compress' and `uncompress' not found and XFree86 + +XFree86 installs a very old version of libz.a by default ahead of where +more modern version of libz might be installed. This will cause problems +when attempting to link against libMagick. The fix is to remove the old +libz.a in the X11 binary directory. + + +** AIX +*** On AIX 4.3, you must specify --with-dialogs=athena with configure + +*** On AIX, you get this compiler error message: + + Processing include file ./XMenuInt.h + 1501-106: (S) Include file X11/Xlib.h not found. + +This means your system was installed with only the X11 runtime i.d +libraries. You have to find your sipo (bootable tape) and install +X11Dev... with smit. + +*** On AIX 4.1.2, linker error messages such as + ld: 0711-212 SEVERE ERROR: Symbol .__quous, found in the global symbol table + of archive /usr/lib/libIM.a, was not defined in archive member shr.o. + +This is a problem in libIM.a. You can work around it by executing +these shell commands in the src subdirectory of the directory where +you build Emacs: + + cp /usr/lib/libIM.a . + chmod 664 libIM.a + ranlib libIM.a + +Then change -lIM to ./libIM.a in the command to link temacs (in +Makefile). + +*** Excessive optimization on AIX 4.2 can lead to compiler failure. + +Valdis.Kletnieks@vt.edu writes: + At least at the b34 level, and the latest-and-greatest IBM xlc + (3.1.4.4), there are problems with -O3. I haven't investigated + further. + + +** SunOS/Solaris +*** Link failure when using acc on a Sun. + +To use acc, you need additional options just before the libraries, such as + + /usr/lang/SC2.0.1/values-Xt.o -L/usr/lang/SC2.0.1/cg87 -L/usr/lang/SC2.0.1 + +and you need to add -lansi just before -lc. + +The precise file names depend on the compiler version, so we +cannot easily arrange to supply them. + +*** Problems finding X11 libraries on Solaris with Openwindows + +Some users have reported problems in this area. The reported solution +is to define the environment variable OPENWINHOME, even if you must set +it to `/usr/openwin'. + +*** Sed problems on Solaris 2.5 + +There have been reports of Sun sed truncating very lines in the +Makefile during configuration. The workaround is to use GNU sed or, +even better, think of a better way to generate Makefile, and send us a +patch. :-) + +*** On Solaris 2 I get undefined symbols from libcurses.a. + +You probably have /usr/ucblib/ on your LD_LIBRARY_PATH. Do the link with +LD_LIBRARY_PATH unset. Generally, avoid using any ucb* stuff when +building XEmacs. + +*** On Solaris 2 I cannot make alloc.o, glyphs.o or process.o. + +The SparcWorks C compiler may have difficulty building those modules +with optimization level -xO4. Try using only "-fast" optimization +for just those modules. (Or use gcc). + +*** Solaris 2.3 /bin/sh coredumps during configuration. + +This only occurs if you have LANG != C. This is a known bug with +/bin/sh fixed by installing Patch-ID# 101613-01. Or, you can use +bash, as a workaround. + +*** On SunOS, you get linker errors + ld: Undefined symbol + _get_wmShellWidgetClass + _get_applicationShellWidgetClass + +The fix to this is to install patch 100573 for OpenWindows 3.0 +or link libXmu statically. + +*** On Sunos 4, you get the error ld: Undefined symbol __lib_version. + +This is the result of using cc or gcc with the shared library meant +for acc (the Sunpro compiler). Check your LD_LIBRARY_PATH and delete +/usr/lang/SC2.0.1 or some similar directory. + +*** Undefined symbols when linking on Sunos 4.1. + +If you get the undefined symbols _atowc _wcslen, _iswprint, _iswspace, +_iswcntrl, _wcscpy, and _wcsncpy, then you need to add -lXwchar after +-lXaw in the command that links temacs. + +This problem seems to arise only when the international language +extensions to X11R5 are installed. + +*** On a Sun running SunOS 4.1.1, you get this error message from GNU ld: + + /lib/libc.a(_Q_sub.o): Undefined symbol __Q_get_rp_rd referenced from text segment + +The problem is in the Sun shared C library, not in GNU ld. + +The solution is to install Patch-ID# 100267-03 from Sun. + +*** SunOS 4.1.2: undefined symbol _get_wmShellWidgetClass + + Apparently the version of libXmu.so.a that Sun ships is hosed: it's missing + some stuff that is in libXmu.a (the static version). Sun has a patch for + this, but a workaround is to use the static version of libXmu, by changing + the link command from "-lXmu" to "-Bstatic -lXmu -Bdynamic". If you have + OpenWindows 3.0, ask Sun for these patches: + 100512-02 4.1.x OpenWindows 3.0 libXt Jumbo patch + 100573-03 4.1.x OpenWindows 3.0 undefined symbols with shared libXmu + +*** Random other SunOS 4.1.[12] link errors. + + The X headers and libraries that Sun ships in /usr/{include,lib}/X11 are + broken. Use the ones in /usr/openwin/{include,lib} instead. + +** Linux +*** Under Linux, you get "too many arguments to function `getpgrp'". + +You have probably installed LessTiff under `/usr/local' and `libXm.so' +could not be found when linking `getpgrp()' test program, making XEmacs +think that `getpgrp()' takes an argument. Try adding `/usr/local/lib' +in `/etc/ld.so.conf' and run `ldconfig'. Then run XEmacs's `configure' +again. As with all problems of this type, reading the config.log file +generated from configure and seeing the log of how the test failed can +prove enlightening. + +*** `Error: No ExtNode to pop!' on Linux systems with Lesstif. This error message has been observed with lesstif-0.75a. It does not appear to cause any harm. -** Linking with -rpath on IRIX. +*** xemacs: can't resolve symbol '__malloc_hook' + +This is a Linux problem where you've compiled the XEmacs binary on a libc +5.4 with version higher than 5.4.19 and attempted to run the binary against +an earlier version. The solution is to upgrade your old library. + +** IRIX +*** Linking with -rpath on IRIX. Darrell Kindred <dkindred@cmu.edu> writes: There are a couple of problems [with use of -rpath with Irix ld], though: @@ -126,35 +279,42 @@ or --site-runtime-libraries, you must use --use-gcc=no, or configure will fail. -** On Irix 6.3, the SGI ld quits with segmentation fault when linking temacs +*** On Irix 6.3, the SGI ld quits with segmentation fault when linking temacs This occurs if you use the SGI linker version 7.1. Installing the patch SG0001872 fixes this problem. -** xemacs: can't resolve symbol '__malloc_hook' +*** On Irix 6.0, make tries (and fails) to build a program named unexelfsgi + +A compiler bug inserts spaces into the string "unexelfsgi . o" +in src/Makefile. Edit src/Makefile, after configure is run, +find that string, and take out the spaces. + +Compiler fixes in Irix 6.0.1 should eliminate this problem. -This is a Linux problem where you've compiled the XEmacs binary on a libc -5.4 with version higher than 5.4.19 and attempted to run the binary against -an earlier version. The solution is to upgrade your old library. +*** On Irix 5.2, unexelfsgi.c can't find cmplrs/stsupport.h. -** Compilation errors on VMS. - -Sorry, XEmacs does not work under VMS. You might consider working on -the port if you really want to have XEmacs work under VMS. +The file cmplrs/stsupport.h was included in the wrong file set in the +Irix 5.2 distribution. You can find it in the optional fileset +compiler_dev, or copy it from some other Irix 5.2 system. A kludgy +workaround is to change unexelfsgi.c to include sym.h instead of +syms.h. -** On Solaris 2 I get undefined symbols from libcurses.a. +*** Coredumping in Irix 6.2 -You probably have /usr/ucblib/ on your LD_LIBRARY_PATH. Do the link with -LD_LIBRARY_PATH unset. Generally, avoid using any ucb* stuff when -building XEmacs. +Pete Forman <gsez020@compo.bedford.waii.com> writes: +A problem noted by myself and others (I've lost the references) was +that XEmacs coredumped when the cut or copy toolbar buttons were +pressed. This has been fixed by loading the SGI patchset (Feb 98) +without having to recompile XEmacs. -** On Solaris 2 I cannot make alloc.o, glyphs.o or process.o. +My versions are XEmacs 20.3 (problem first noted in 19.15) and IRIX +6.2, compiled using -n32. I'd guess that the relevant individual +patch was "SG0002580: multiple fixes for X libraries". SGI recommends +that the complete patch set be installed rather than parts of it. -The SparcWorks C compiler may have difficulty building those modules -with optimization level -xO4. Try using only "-fast" optimization -for just those modules. (Or use gcc). - -** On Digital UNIX, the DEC C compiler might have a problem compiling +** Digital UNIX/OSF/VMS +*** On Digital UNIX, the DEC C compiler might have a problem compiling some files. In particular, src/extents.c and src/faces.c might cause the DEC C @@ -167,7 +327,19 @@ A related compiler bug has been fixed by the DEC compiler team. The new versions of the compiler should run fine. -** On HPUX, the HP C compiler might have a problem compiling some files +*** Under some versions of OSF XEmacs runs fine if built without +optimization but will crash randomly if built with optimization. + +Using 'cc -g' is not sufficient to eliminate all optimization. Try +'cc -g -O0' instead. + +*** Compilation errors on VMS. + +Sorry, XEmacs does not work under VMS. You might consider working on +the port if you really want to have XEmacs work under VMS. + +** HP-UX +*** On HPUX, the HP C compiler might have a problem compiling some files with optimization. Richard Cognot <cognot@ensg.u-nancy.fr> writes: @@ -181,30 +353,30 @@ remember the patch numbers. I think potential XEmacs builders on HP should be warned about this. -** I don't have `xmkmf' and `imake' on my HP. +*** I don't have `xmkmf' and `imake' on my HP. You can get these standard X tools by anonymous FTP to hpcvaaz.cv.hp.com. Essentially all X programs need these. -** On HP-UX, problems with make +*** On HP-UX, problems with make Marcus Thiessel <marcus_thiessel@hp.com> Some releases of XEmacs (e.g. 20.4) require GNU make to build successfully. You don't need GNU make when building 21.x. -** On HP-UX 9.05 XEmacs won't compile or coredump during the build. +*** On HP-UX 9.05 XEmacs won't compile or coredump during the build. Marcus Thiessel <marcus_thiessel@hp.com> This might be a sed problem. For your own safety make sure to use GNU sed while dumping XEmacs. -** On HP-UX 11.0 XEmacs causes excessive X11 errors when running. +*** On HP-UX 11.0 XEmacs causes excessive X11 errors when running. Marcus Thiessel <marcus_thiessel@hp.com> - Unfortunately, XEmacs releases don't work with Motif2.1. It + Unfortunately, XEmacs releases <21.0 don't work with Motif2.1. It will compile but you will get excessive X11 errors like xemacs: X Error of failed request: BadGC (invalid GC parameter) @@ -218,34 +390,8 @@ Make sure /usr/lib/Motif1.2_R6/libXm.sl is a link to /usr/lib/Motif1.2_R6/libXm.3. -** Solaris 2.3 /bin/sh coredumps during configuration. - -This only occurs if you have LANG != C. This is a known bug with -/bin/sh fixed by installing Patch-ID# 101613-01. Or, you can use -bash, as a workaround. - -** On Irix 6.0, make tries (and fails) to build a program named unexelfsgi - -A compiler bug inserts spaces into the string "unexelfsgi . o" -in src/Makefile. Edit src/Makefile, after configure is run, -find that string, and take out the spaces. - -Compiler fixes in Irix 6.0.1 should eliminate this problem. - -** Coredumping in Irix 6.2 - -Pete Forman <gsez020@compo.bedford.waii.com> writes: -A problem noted by myself and others (I've lost the references) was -that XEmacs coredumped when the cut or copy toolbar buttons were -pressed. This has been fixed by loading the SGI patchset (Feb 98) -without having to recompile XEmacs. - -My versions are XEmacs 20.3 (problem first noted in 19.15) and IRIX -6.2, compiled using -n32. I'd guess that the relevant individual -patch was "SG0002580: multiple fixes for X libraries". SGI recommends -that the complete patch set be installed rather than parts of it. - -** Native cc on SCO OpenServer 5 is now OK. Icc may still throw you +** SCO OpenServer +*** Native cc on SCO OpenServer 5 is now OK. Icc may still throw you a curve. Here is what Robert Lipe <robertl@arnet.com> says: Unlike XEmacs 19.13, building with the native cc on SCO OpenServer 5 @@ -309,180 +455,21 @@ the emacstrs.sco is a suitable candidate for /usr/lib/keyboard/strings to take advantage of the keyboard map in emacskeys.sco. -Note: Much of the above entry is probably not valid for XEmacs 21.2 +Note: Much of the above entry is probably not valid for XEmacs 21.0 and later. -** Under some versions of OSF XEmacs runs fine if built without -optimization but will crash randomly if built with optimization. -Using 'cc -g' is not sufficient to eliminate all optimization. Try -'cc -g -O0' instead. - -** On SunOS, you get linker errors - ld: Undefined symbol - _get_wmShellWidgetClass - _get_applicationShellWidgetClass - -The fix to this is to install patch 100573 for OpenWindows 3.0 -or link libXmu statically. - -** On Sunos 4, you get the error ld: Undefined symbol __lib_version. - -This is the result of using cc or gcc with the shared library meant -for acc (the Sunpro compiler). Check your LD_LIBRARY_PATH and delete -/usr/lang/SC2.0.1 or some similar directory. - -** On AIX 4.1.2, linker error messages such as - ld: 0711-212 SEVERE ERROR: Symbol .__quous, found in the global symbol table - of archive /usr/lib/libIM.a, was not defined in archive member shr.o. - -This is a problem in libIM.a. You can work around it by executing -these shell commands in the src subdirectory of the directory where -you build Emacs: - - cp /usr/lib/libIM.a . - chmod 664 libIM.a - ranlib libIM.a - -Then change -lIM to ./libIM.a in the command to link temacs (in -Makefile). - -** On Irix 5.2, unexelfsgi.c can't find cmplrs/stsupport.h. - -The file cmplrs/stsupport.h was included in the wrong file set in the -Irix 5.2 distribution. You can find it in the optional fileset -compiler_dev, or copy it from some other Irix 5.2 system. A kludgy -workaround is to change unexelfsgi.c to include sym.h instead of -syms.h. -** Link failure when using acc on a Sun. - -To use acc, you need additional options just before the libraries, such as - - /usr/lang/SC2.0.1/values-Xt.o -L/usr/lang/SC2.0.1/cg87 -L/usr/lang/SC2.0.1 - -and you need to add -lansi just before -lc. - -The precise file names depend on the compiler version, so we -cannot easily arrange to supply them. - -** Link failure on IBM AIX 1.3 ptf 0013. - -There is a real duplicate definition of the function `_slibc_free' in -the library /lib/libc_s.a (just do nm on it to verify). The -workaround/fix is: - - cd /lib - ar xv libc_s.a NLtmtime.o - ar dv libc_s.a NLtmtime.o - -** Undefined symbols when linking on Sunos 4.1. - -If you get the undefined symbols _atowc _wcslen, _iswprint, _iswspace, -_iswcntrl, _wcscpy, and _wcsncpy, then you need to add -lXwchar after --lXaw in the command that links temacs. - -This problem seems to arise only when the international language -extensions to X11R5 are installed. - -** src/Makefile and lib-src/Makefile are truncated--most of the file missing. - -This can happen if configure uses GNU sed version 2.03. That version -had a bug. GNU sed version 2.05 works properly. - -** On AIX, you get this compiler error message: - - Processing include file ./XMenuInt.h - 1501-106: (S) Include file X11/Xlib.h not found. - -This means your system was installed with only the X11 runtime i.d -libraries. You have to find your sipo (bootable tape) and install -X11Dev... with smit. - -** C-z just refreshes the screen instead of suspending Emacs. +* Problems with running XEmacs +============================== +** General +*** C-z just refreshes the screen instead of suspending Emacs. You are probably using a shell that doesn't support job control, even though the system itself is capable of it. Try using a different shell. -** On a Sun running SunOS 4.1.1, you get this error message from GNU ld: - - /lib/libc.a(_Q_sub.o): Undefined symbol __Q_get_rp_rd referenced from text segment - -The problem is in the Sun shared C library, not in GNU ld. - -The solution is to install Patch-ID# 100267-03 from Sun. - -** SunOS 4.1.2: undefined symbol _get_wmShellWidgetClass - - Apparently the version of libXmu.so.a that Sun ships is hosed: it's missing - some stuff that is in libXmu.a (the static version). Sun has a patch for - this, but a workaround is to use the static version of libXmu, by changing - the link command from "-lXmu" to "-Bstatic -lXmu -Bdynamic". If you have - OpenWindows 3.0, ask Sun for these patches: - 100512-02 4.1.x OpenWindows 3.0 libXt Jumbo patch - 100573-03 4.1.x OpenWindows 3.0 undefined symbols with shared libXmu - -** Random other SunOS 4.1.[12] link errors. - - The X headers and libraries that Sun ships in /usr/{include,lib}/X11 are - broken. Use the ones in /usr/openwin/{include,lib} instead. - -** When using gcc, you get the error message "undefined symbol __fixunsdfsi". -When using gcc, you get the error message "undefined symbol __main". - -This means that you need to link with the gcc library. It may be called -"gcc-gnulib" or "libgcc.a"; figure out where it is, and define LIB_GCC in -config.h to point to it. - -It may also work to use the GCC version of `ld' instead of the standard one. - -** When compiling with X11, you get "undefined symbol _XtStrings". - -This means that you are trying to link emacs against the X11r4 version of -libXt.a, but you have compiled either Emacs or the code in the lwlib -subdirectory with the X11r5 header files. That doesn't work. - -Remember, you can't compile lwlib for r4 and emacs for r5, or vice versa. -They must be in sync. - -** Problems finding X11 libraries on Solaris with Openwindows - -Some users have reported problems in this area. The reported solution -is to define the environment variable OPENWINHOME, even if you must set -it to `/usr/openwin'. - -** Under Linux, you get "too many arguments to function `getpgrp'". - -You have probably installed LessTiff under `/usr/local' and `libXm.so' -could not be found when linking `getpgrp()' test program, making XEmacs -think that `getpgrp()' takes an argument. Try adding `/usr/local/lib' -in `/etc/ld.so.conf' and run `ldconfig'. Then run XEmacs's `configure' -again. As with all problems of this type, reading the config.log file -generated from configure and seeing the log of how the test failed can -prove enlightening. - - -* Problems with running XEmacs -============================== -** On Solaris 2.6, XEmacs dumps core when exiting. - -This happens if you're XEmacs is running on the same machine as the X -server, and the optimized memory transport has been turned on by -setting the environment variable XSUNTRANSPORT. The crash occurs -during the call to XCloseDisplay. - -If this describes your situation, you need to undefine the -XSUNTRANSPORT environment variable. - -** `C-z', or `M-x suspend-emacs' hangs instead of suspending. - -If you build with `gpm' support on Linux, you cannot suspend XEmacs -because gpm installs a buggy SIGTSTP handler. Either compile with -`--with-gpm=no', or don't suspend XEmacs on the Linux console until -this bug is fixed. - -** You type Control-H (Backspace) expecting to delete characters. +*** You type Control-H (Backspace) expecting to delete characters. Emacs has traditionally used Control-H for help; unfortunately this interferes with its use as Backspace on TTY's. One way to solve this @@ -497,7 +484,7 @@ Note that you can probably also access help using F1. -** Mail agents (VM, Gnus, rmail) cannot get new mail +*** Mail agents (VM, Gnus, rmail) cannot get new mail rmail and VM get new mail from /usr/spool/mail/$USER using a program called `movemail'. This program interlocks with /bin/mail using the @@ -527,30 +514,12 @@ mode of the installed copy; changing the group and mode of the build directory copy is ineffective. -** XEmacs crashes on Digital Unix within font-lock, or when dealing -with large compilation buffers. - -The default stack size under Digital Unix is rather small (2M as -opposed to Solaris 8M), hosing the regexp code, which uses alloca() -extensively, overflowing the stack when complex regexps are used. -Workarounds: - -1) Increase your stack size, using `ulimit -s 8192' or a (t)csh - equivalent; - -2) Recompile regex.c with REGEX_MALLOC defined. - -** On Solaris, C-x doesn't get through to Emacs when you use the console. - -This is a Solaris feature (at least on Intel x86 cpus). Type C-r -C-r C-t, to toggle whether C-x gets through to Emacs. - -** VM appears to hang in large folders. +*** VM appears to hang in large folders. This is normal (trust us) when upgrading to VM-6.22 from earlier versions. Let VM finish what it is doing and all will be well. -** Changes made to .el files do not take effect. +*** Changes made to .el files do not take effect. You may have forgotten to recompile them into .elc files. Then the old .elc files will be loaded, and your changes will not be seen. To @@ -560,7 +529,7 @@ Note that you will get a warning when loading a .elc file that is older than the corresponding .el file. -** Things which should be bold or italic (such as the initial +*** Things which should be bold or italic (such as the initial copyright notice) are not. The fonts of the "bold" and "italic" faces are generated from the font @@ -583,7 +552,7 @@ should use those forms. See the man pages for X(1), xlsfonts(1), and xfontsel(1). -** The dumped Emacs crashes when run, trying to write pure data. +*** The dumped Emacs crashes when run, trying to write pure data. Two causes have been seen for such problems. @@ -598,43 +567,14 @@ not initialized are not supposed to be pure. On these systems you may need to add "#define static" to the m- or the s- file. -** Reading and writing files is very very slow. +*** Reading and writing files is very very slow. Try evaluating the form (setq lock-directory nil) and see if that helps. There is a problem with file-locking on some systems (possibly related to NFS) that I don't understand. Please send mail to the address xemacs@xemacs.org if you figure this one out. -** The Emacs window disappears when you type M-q. - -Some versions of the Open Look window manager interpret M-q as a quit -command for whatever window you are typing at. If you want to use -Emacs with that window manager, you should try to configure the window -manager to use some other command. You can disable the -shortcut keys entirely by adding this line to ~/.OWdefaults: - - OpenWindows.WindowMenuAccelerators: False - -** The `Alt' key doesn't behave as `Meta' when running DECwindows. - -The default DEC keyboard mapping has the Alt keys set up to generate the -keysym `Multi_key', which has a meaning to xemacs which is distinct from that -of the `Meta_L' and `Meta-R' keysyms. A second problem is that certain keys -have the Mod2 modifier attached to them for no adequately explored reason. -The correct fix is to pass this file to xmodmap upon starting X: - - clear mod2 - keysym Multi_key = Alt_L - add mod1 = Alt_L - add mod1 = Alt_R - -** The Compose key on a DEC keyboard does not work as Meta key. - -This shell command should fix it: - - xmodmap -e 'keycode 0xb1 = Meta_L' - -** When emacs starts up, I get lots of warnings about unknown keysyms. +*** When emacs starts up, I get lots of warnings about unknown keysyms. If you are running the prebuilt binaries, the Motif library expects to find certain thing in the XKeysymDB file. This file is normally in /usr/lib/X11/ @@ -644,25 +584,14 @@ too old. There is a copy of the MIT X11R5 XKeysymDB file in the emacs `etc' directory. Try using that one. -** My X resources used to work, and now some of them are being ignored. +*** My X resources used to work, and now some of them are being ignored. Check the resources in .../etc/Emacs.ad (which is the same as the file sample.Xdefaults). Perhaps some of the default resources built in to emacs are now overriding your existing resources. Copy and edit the resources in Emacs.ad as necessary. -** I get complaints about the mapping of my HP keyboard at startup, -but I haven't changed anything. - -The default HP keymap is set up to have Mod1 assigned to two different keys: -Meta_L and Mode_switch (even though there is not actually a Mode_switch key on -the keyboard -- it uses an "imaginary" keycode.) There actually is a reason -for this, but it's not a good one. The correct fix is to execute this command -upon starting X: - - xmodmap -e 'remove mod1 = Mode_switch' - -** I have focus problems when I use `M-o' to switch to another screen +*** I have focus problems when I use `M-o' to switch to another screen without using the mouse. The focus issues with a program like XEmacs, which has multiple @@ -687,7 +616,7 @@ behavior. Implementing such policy is the responsibility of the window manager itself, it is not legal for a client to do this.) -** Emacs spontaneously displays "I-search: " at the bottom of the screen. +*** Emacs spontaneously displays "I-search: " at the bottom of the screen. This means that Control-S/Control-Q (XON/XOFF) "flow control" is being used. C-s/C-q flow control is bad for Emacs editors because it takes @@ -771,7 +700,7 @@ will not make Emacs worse for properly designed systems for the sake of inferior systems. -** Control-S and Control-Q commands are ignored completely. +*** Control-S and Control-Q commands are ignored completely. For some reason, your system is using brain-damaged C-s/C-q flow control despite Emacs's attempts to turn it off. Perhaps your @@ -786,7 +715,7 @@ into C-s and C-q using keyboard-translate-table. The example above shows how to do this with C-^ and C-\. -** Control-S and Control-Q commands are ignored completely on a net +*** Control-S and Control-Q commands are ignored completely on a net connection. Some versions of rlogin (and possibly telnet) do not pass flow @@ -813,7 +742,7 @@ See the entry about spontaneous display of I-search (above) for more info. -** TTY redisplay is slow. +*** TTY redisplay is slow. XEmacs has fairly new TTY redisplay support (beginning from 19.12), which doesn't include some basic TTY optimizations -- like using @@ -824,7 +753,7 @@ If you are interested in fixing this, please let us know at <xemacs@xemacs.org>. -** Screen is updated wrong, but only on one kind of terminal. +*** Screen is updated wrong, but only on one kind of terminal. This could mean that the termcap entry you are using for that terminal is wrong, or it could mean that Emacs has a bug handing the @@ -863,7 +792,157 @@ termcap.c, terminfo.c, tparam.c, cm.c, redisplay-tty.c, redisplay-output.c, or redisplay.c. -** Your Delete key sends a Backspace to the terminal, using an AIXterm. +*** My buffers are full of \000 characters or otherwise corrupt. + +Some compilers have trouble with gmalloc.c and ralloc.c; try recompiling +without optimization. If that doesn't work, try recompiling with +SYSTEM_MALLOC defined, and/or with REL_ALLOC undefined. + +*** A position you specified in .Xdefaults is ignored, using twm. + +twm normally ignores "program-specified" positions. +You can tell it to obey them with this command in your `.twmrc' file: + + UsePPosition "on" #allow clents to request a position + +*** With M-x enable-flow-control, you need to type C-\ twice to do +incremental search--a single C-\ gets no response. + +This has been traced to communicating with your machine via kermit, +with C-\ as the kermit escape character. One solution is to use +another escape character in kermit. One user did + + set escape-character 17 + +in his .kermrc file, to make C-q the kermit escape character. + +*** The Motif version of Emacs paints the screen a solid color. + +This has been observed to result from the following X resource: + + Emacs*default.attributeFont: -*-courier-medium-r-*-*-*-140-*-*-*-*-iso8859-* + +That the resource has this effect indicates a bug in something, but we +do not yet know what. If it is an Emacs bug, we hope someone can +explain what the bug is so we can fix it. In the mean time, removing +the resource prevents the problem. + +*** After running emacs once, subsequent invocations crash. + +Some versions of SVR4 have a serious bug in the implementation of the +mmap () system call in the kernel; this causes emacs to run correctly +the first time, and then crash when run a second time. + +Contact your vendor and ask for the mmap bug fix; in the mean time, +you may be able to work around the problem by adding a line to your +operating system description file (whose name is reported by the +configure script) that reads: +#define SYSTEM_MALLOC +This makes Emacs use memory less efficiently, but seems to work around +the kernel bug. + +*** Inability to send an Alt-modified key, when Emacs is communicating +directly with an X server. + +If you have tried to bind an Alt-modified key as a command, and it +does not work to type the command, the first thing you should check is +whether the key is getting through to Emacs. To do this, type C-h c +followed by the Alt-modified key. C-h c should say what kind of event +it read. If it says it read an Alt-modified key, then make sure you +have made the key binding correctly. + +If C-h c reports an event that doesn't have the Alt modifier, it may +be because your X server has no key for the Alt modifier. The X +server that comes from MIT does not set up the Alt modifier by +default. + +If your keyboard has keys named Alt, you can enable them as follows: + + xmodmap -e 'add mod2 = Alt_L' + xmodmap -e 'add mod2 = Alt_R' + +If the keyboard has just one key named Alt, then only one of those +commands is needed. The modifier `mod2' is a reasonable choice if you +are using an unmodified MIT version of X. Otherwise, choose any +modifier bit not otherwise used. + +If your keyboard does not have keys named Alt, you can use some other +keys. Use the keysym command in xmodmap to turn a function key (or +some other 'spare' key) into Alt_L or into Alt_R, and then use the +commands show above to make them modifier keys. + +Note that if you have Alt keys but no Meta keys, Emacs translates Alt +into Meta. This is because of the great importance of Meta in Emacs. + +*** In Shell mode, you get a ^M at the end of every line. + +This happens to people who use tcsh, because it is trying to be too +smart. It sees that the Shell uses terminal type `unknown' and turns +on the flag to output ^M at the end of each line. You can fix the +problem by adding this to your .cshrc file: + + if ($?EMACS) then + if ($EMACS == "t") then + unset edit + stty -icrnl -onlcr -echo susp ^Z + endif + endif + +*** An error message such as `X protocol error: BadMatch (invalid +parameter attributes) on protocol request 93'. + +This comes from having an invalid X resource, such as + emacs*Cursor: black +(which is invalid because it specifies a color name for something +that isn't a color.) + +The fix is to correct your X resources. + +*** Once you pull down a menu from the menubar, it won't go away. + +It has been claimed that this is caused by a bug in certain very old +(1990?) versions of the twm window manager. It doesn't happen with +recent vintages, or with other window managers. + +*** Emacs ignores the "help" key when running OLWM. + +OLWM grabs the help key, and retransmits it to the appropriate client +using XSendEvent. Allowing emacs to react to synthetic events is a +security hole, so this is turned off by default. You can enable it by +setting the variable x-allow-sendevents to t. You can also cause fix +this by telling OLWM to not grab the help key, with the null binding +"OpenWindows.KeyboardCommand.Help:". + +*** Programs running under terminal emulator do not recognize `emacs' +terminal type. + +The cause of this is a shell startup file that sets the TERMCAP +environment variable. The terminal emulator uses that variable to +provide the information on the special terminal type that Emacs +emulates. + +Rewrite your shell startup file so that it does not change TERMCAP +in such a case. You could use the following conditional which sets +it only if it is undefined. + + if ( ! ${?TERMCAP} ) setenv TERMCAP ~/my-termcap-file + +Or you could set TERMCAP only when you set TERM--which should not +happen in a non-login shell. + +*** The popup menu appears at the buttom/right of my screen. + +You probably have something like the following in your ~/.Xdefaults + + Emacs.geometry: 81x56--9--1 + +Use the following instead + + Emacs*EmacsFrame.geometry: 81x56--9--1 + + +** AIX +*** Your Delete key sends a Backspace to the terminal, using an AIXterm. The solution is to include in your .Xdefaults the lines: @@ -872,51 +951,47 @@ This makes your Backspace key send DEL (ASCII 127). -** With certain fonts, when the cursor appears on a character, the -character doesn't appear--you get a solid box instead. +*** On AIX 4, some programs fail when run in a Shell buffer +with an error message like No terminfo entry for "unknown". -One user on a Linux system reported that this problem went away with -installation of a new X server. The failing server was XFree86 3.1.1. -XFree86 3.1.2 works. +On AIX, many terminal type definitions are not installed by default. +`unknown' is one of them. Install the "Special Generic Terminal +Definitions" to make them defined. -** On SunOS 4.1.3, Emacs unpredictably crashes in _yp_dobind_soft. +*** On AIX, you get this message when running Emacs: -This happens if you configure Emacs specifying just `sparc-sun-sunos4' -on a system that is version 4.1.3. You must specify the precise -version number (or let configure figure out the configuration, which -it can do perfectly well for SunOS). + Could not load program emacs + Symbol smtcheckinit in csh is undefined + Error was: Exec format error -** On Irix, I don't see the toolbar icons and I'm getting lots of -entries in the warnings buffer. +or this one: -SGI ships a really old Xpm library in /usr/lib which does not work at -all well with XEmacs. The solution is to install your own copy of the -latest version of Xpm somewhere and then use the --site-includes and ---site-libraries flags to tell configure where to find it. + Could not load program .emacs + Symbol _system_con in csh is undefined + Symbol _fp_trapsta in csh is undefined + Error was: Exec format error -** On HPUX, you get "poll: Interrupted system call" message in the -window where XEmacs was launched. +These can happen when you try to run on AIX 3.2.5 a program that was +compiled with 3.2.4. The fix is to recompile. -Richard Cognot <cognot@ensg.u-nancy.fr> writes: +*** Trouble using ptys on AIX. + +People often install the pty devices on AIX incorrectly. +Use `smit pty' to reinstall them properly. + - I get a very strange problem when linking libc.a dynamically: every - event (mouse, keyboard, expose...) results in a "poll: Interrupted - system call" message in the window where XEmacs was - launched. Forcing a static link of libc.a alone by adding - /usr/lib/libc.a at the end of the link line solves this. Note that - my 9.07 build of 19.14b17 and my (old) build of 19.13 both exhibit - the same behaviour. I've tried various hpux patches to no avail. If - this problem cannot be solved before the release date, binary kits - for HP *must* be linked statically against libc, otherwise this - problem will show up. (This is directed at whoever will volunteer - for this kit, as I won't be available to do it, unless 19.14 gets - delayed until mid-june ;-). I think this problem will be an FAQ soon - after the release otherwise. +** SunOS/Solaris +*** The Emacs window disappears when you type M-q. -Note: The above entry is probably not valid for XEmacs 21.2 and -later. +Some versions of the Open Look window manager interpret M-q as a quit +command for whatever window you are typing at. If you want to use +Emacs with that window manager, you should try to configure the window +manager to use some other command. You can disable the +shortcut keys entirely by adding this line to ~/.OWdefaults: -** When Emacs tries to ring the bell, you get an error like + OpenWindows.WindowMenuAccelerators: False + +*** When Emacs tries to ring the bell, you get an error like audio: sst_open: SETQSIZE" Invalid argument audio: sst_close: SETREG MMR2, Invalid argument @@ -932,114 +1007,22 @@ called fixincludes that creates new versions of some system include files that use this obsolete feature. -** My buffers are full of \000 characters or otherwise corrupt. - -Some compilers have trouble with gmalloc.c and ralloc.c; try recompiling -without optimization. If that doesn't work, try recompiling with -SYSTEM_MALLOC defined, and/or with REL_ALLOC undefined. - -** On AIX 4, some programs fail when run in a Shell buffer -with an error message like No terminfo entry for "unknown". - -On AIX, many terminal type definitions are not installed by default. -`unknown' is one of them. Install the "Special Generic Terminal -Definitions" to make them defined. - -** Emacs exits with "X protocol error" when run with an X server for -Windows. - -A certain X server for Windows had a bug which caused this. -Supposedly the newer 32-bit version of this server doesn't have the -problem. - -** A position you specified in .Xdefaults is ignored, using twm. - -twm normally ignores "program-specified" positions. -You can tell it to obey them with this command in your `.twmrc' file: +*** On Solaris 2.6, XEmacs dumps core when exiting. - UsePPosition "on" #allow clents to request a position - -** The right Alt key works wrong on German HP keyboards (and perhaps - other non-English HP keyboards too). - -This is because HPUX defines the modifiers wrong in X. Here is a -shell script to fix the problem; be sure that it is run after VUE -configures the X server. - - xmodmap 2> /dev/null - << EOF - keysym Alt_L = Meta_L - keysym Alt_R = Meta_R - EOF - - xmodmap - << EOF - clear mod1 - keysym Mode_switch = NoSymbol - add mod1 = Meta_L - keysym Meta_R = Mode_switch - add mod2 = Mode_switch - EOF - -** Trouble using ptys on IRIX, or running out of ptys. - -The program mkpts (which may be in `/usr/adm' or `/usr/sbin') needs to -be set-UID to root, or non-root programs like Emacs will not be able -to allocate ptys reliably. +This happens if you're XEmacs is running on the same machine as the X +server, and the optimized memory transport has been turned on by +setting the environment variable XSUNTRANSPORT. The crash occurs +during the call to XCloseDisplay. -** Motif dialog boxes lose on Irix. - -Larry Auton <lda@control.att.com> writes: -Beware of not specifying - - --with-dialogs=athena - -if it builds with the motif dialogs [boom!] you're a dead man. - -** Beware of the default image & graphics library on Irix +If this describes your situation, you need to undefine the +XSUNTRANSPORT environment variable. -Richard Cognot <cognot@ensg.u-nancy.fr> writes: -You *have* to compile your own jpeg lib. The one delivered with SGI -systems is a C++ lib, which apparently XEmacs cannot cope with. - -** Slow startup on Linux. - -People using systems based on the Linux kernel sometimes report that -startup takes 10 to 15 seconds longer than `usual'. - -This is because Emacs looks up the host name when it starts. -Normally, this takes negligible time; the extra delay is due to -improper system configuration. This problem can occur for both -networked and non-networked machines. - -Here is how to fix the configuration. It requires being root. +*** On Solaris, C-x doesn't get through to Emacs when you use the console. -*** Networked Case - -First, make sure the files `/etc/hosts' and `/etc/host.conf' both -exist. The first line in the `/etc/hosts' file should look like this -(replace HOSTNAME with your host name): - - 127.0.0.1 localhost HOSTNAME - -Also make sure that the `/etc/host.conf' files contains the following -lines: - - order hosts, bind - multi on +This is a Solaris feature (at least on Intel x86 cpus). Type C-r +C-r C-t, to toggle whether C-x gets through to Emacs. -Any changes, permanent and temporary, to the host name should be -indicated in the `/etc/hosts' file, since it acts a limited local -database of addresses and names (e.g., some SLIP connections -dynamically allocate ip addresses). - -*** Non-Networked Case - -The solution described in the networked case applies here as well. -However, if you never intend to network your machine, you can use a -simpler solution: create an empty `/etc/host.conf' file. The command -`touch /etc/host.conf' suffices to create the file. The `/etc/hosts' -file is not necessary with this approach. - -** On Solaris 2.4, Dired hangs and C-g does not work. Or Emacs hangs +*** On Solaris 2.4, Dired hangs and C-g does not work. Or Emacs hangs forever waiting for termination of a subprocess that is a zombie. casper@fwi.uva.nl says the problem is in X11R6. Rebuild libX11.so @@ -1081,61 +1064,14 @@ `-DXTHREAD*' flags and `-lthread' entries from lib/X11/Makefile and typing 'make install' in that directory also seemed to work. -** With M-x enable-flow-control, you need to type C-\ twice to do -incremental search--a single C-\ gets no response. - -This has been traced to communicating with your machine via kermit, -with C-\ as the kermit escape character. One solution is to use -another escape character in kermit. One user did - - set escape-character 17 - -in his .kermrc file, to make C-q the kermit escape character. - -** The Motif version of Emacs paints the screen a solid color. - -This has been observed to result from the following X resource: - - Emacs*default.attributeFont: -*-courier-medium-r-*-*-*-140-*-*-*-*-iso8859-* - -That the resource has this effect indicates a bug in something, but we -do not yet know what. If it is an Emacs bug, we hope someone can -explain what the bug is so we can fix it. In the mean time, removing -the resource prevents the problem. - -** Regular expressions matching bugs on SCO systems. +*** On SunOS 4.1.3, Emacs unpredictably crashes in _yp_dobind_soft. -On SCO, there are problems in regexp matching when Emacs is compiled -with the system compiler. The compiler version is "Microsoft C -version 6", SCO 4.2.0h Dev Sys Maintenance Supplement 01/06/93; Quick -C Compiler Version 1.00.46 (Beta). The solution is to compile with -GCC. - -** In Shell mode, you get a ^M at the end of every line. - -This happens to people who use tcsh, because it is trying to be too -smart. It sees that the Shell uses terminal type `unknown' and turns -on the flag to output ^M at the end of each line. You can fix the -problem by adding this to your .cshrc file: +This happens if you configure Emacs specifying just `sparc-sun-sunos4' +on a system that is version 4.1.3. You must specify the precise +version number (or let configure figure out the configuration, which +it can do perfectly well for SunOS). - if ($?EMACS) then - if ($EMACS == "t") then - unset edit - stty -icrnl -onlcr -echo susp ^Z - endif - endif - -** An error message such as `X protocol error: BadMatch (invalid -parameter attributes) on protocol request 93'. - -This comes from having an invalid X resource, such as - emacs*Cursor: black -(which is invalid because it specifies a color name for something -that isn't a color.) - -The fix is to correct your X resources. - -** Mail is lost when sent to local aliases. +*** Mail is lost when sent to local aliases. Many emacs mail user agents (VM and rmail, for instance) use the sendmail.el library. This library can arrange for mail to be @@ -1162,95 +1098,7 @@ IDA sendmail on vixen.cso.uiuc.edu in /pub: sendmail-5.67b+IDA-1.5.tar.gz -** On AIX, you get this message when running Emacs: - - Could not load program emacs - Symbol smtcheckinit in csh is undefined - Error was: Exec format error - -or this one: - - Could not load program .emacs - Symbol _system_con in csh is undefined - Symbol _fp_trapsta in csh is undefined - Error was: Exec format error - -These can happen when you try to run on AIX 3.2.5 a program that was -compiled with 3.2.4. The fix is to recompile. - -** After running emacs once, subsequent invocations crash. - -Some versions of SVR4 have a serious bug in the implementation of the -mmap () system call in the kernel; this causes emacs to run correctly -the first time, and then crash when run a second time. - -Contact your vendor and ask for the mmap bug fix; in the mean time, -you may be able to work around the problem by adding a line to your -operating system description file (whose name is reported by the -configure script) that reads: -#define SYSTEM_MALLOC -This makes Emacs use memory less efficiently, but seems to work around -the kernel bug. - -** Inability to send an Alt-modified key, when Emacs is communicating -directly with an X server. - -If you have tried to bind an Alt-modified key as a command, and it -does not work to type the command, the first thing you should check is -whether the key is getting through to Emacs. To do this, type C-h c -followed by the Alt-modified key. C-h c should say what kind of event -it read. If it says it read an Alt-modified key, then make sure you -have made the key binding correctly. - -If C-h c reports an event that doesn't have the Alt modifier, it may -be because your X server has no key for the Alt modifier. The X -server that comes from MIT does not set up the Alt modifier by -default. - -If your keyboard has keys named Alt, you can enable them as follows: - - xmodmap -e 'add mod2 = Alt_L' - xmodmap -e 'add mod2 = Alt_R' - -If the keyboard has just one key named Alt, then only one of those -commands is needed. The modifier `mod2' is a reasonable choice if you -are using an unmodified MIT version of X. Otherwise, choose any -modifier bit not otherwise used. - -If your keyboard does not have keys named Alt, you can use some other -keys. Use the keysym command in xmodmap to turn a function key (or -some other 'spare' key) into Alt_L or into Alt_R, and then use the -commands show above to make them modifier keys. - -Note that if you have Alt keys but no Meta keys, Emacs translates Alt -into Meta. This is because of the great importance of Meta in Emacs. - -** `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 -file system. HP/UX responds this way if it tries to swap in a page and -does not get a response from the server within a timeout whose default -value is just ten seconds. - -If this happens to you, extend the timeout period. - -** `expand-file-name' fails to work on any but the machine you dumped -Emacs on. - -On Ultrix, if you use any of the functions which look up information -in the passwd database before dumping Emacs (say, by using -expand-file-name in site-init.el), then those functions will not work -in the dumped Emacs on any host but the one Emacs was dumped on. - -The solution? Don't use expand-file-name in site-init.el, or in -anything it loads. Yuck - some solution. - -I'm not sure why this happens; if you can find out exactly what is -going on, and perhaps find a fix or a workaround, please let us know. -Perhaps the YP functions cache some information, the cache is included -in the dumped Emacs, and is then inaccurate on any other host. - -** Emacs fails to understand most Internet host names, even though +*** Emacs fails to understand most Internet host names, even though the names work properly with other programs on the same system. Emacs won't work with X-windows if the value of DISPLAY is HOSTNAME:0. Gnus can't make contact with the specified host for nntp. @@ -1285,12 +1133,216 @@ #define LIBS_SYSTEM -lresolv -lfoo -lbar -** Trouble using ptys on AIX. +*** With process-connection-type set to t, each line of subprocess +output is terminated with a ^M, making ange-ftp and GNUS not work. + +On SunOS systems, this problem has been seen to be a result of an +incomplete installation of gcc 2.2 which allowed some non-ANSI +compatible include files into the compilation. In particular this +affected virtually all ioctl() calls. + + +** Linux +*** `C-z', or `M-x suspend-emacs' hangs instead of suspending. + +If you build with `gpm' support on Linux, you cannot suspend XEmacs +because gpm installs a buggy SIGTSTP handler. Either compile with +`--with-gpm=no', or don't suspend XEmacs on the Linux console until +this bug is fixed. + +*** With certain fonts, when the cursor appears on a character, the +character doesn't appear--you get a solid box instead. + +One user on a Linux system reported that this problem went away with +installation of a new X server. The failing server was XFree86 3.1.1. +XFree86 3.1.2 works. + +*** Slow startup on Linux. + +People using systems based on the Linux kernel sometimes report that +startup takes 10 to 15 seconds longer than `usual'. + +This is because Emacs looks up the host name when it starts. +Normally, this takes negligible time; the extra delay is due to +improper system configuration. This problem can occur for both +networked and non-networked machines. + +Here is how to fix the configuration. It requires being root. + +**** Networked Case + +First, make sure the files `/etc/hosts' and `/etc/host.conf' both +exist. The first line in the `/etc/hosts' file should look like this +(replace HOSTNAME with your host name): + + 127.0.0.1 localhost HOSTNAME + +Also make sure that the `/etc/host.conf' files contains the following +lines: + + order hosts, bind + multi on + +Any changes, permanent and temporary, to the host name should be +indicated in the `/etc/hosts' file, since it acts a limited local +database of addresses and names (e.g., some SLIP connections +dynamically allocate ip addresses). + +**** Non-Networked Case + +The solution described in the networked case applies here as well. +However, if you never intend to network your machine, you can use a +simpler solution: create an empty `/etc/host.conf' file. The command +`touch /etc/host.conf' suffices to create the file. The `/etc/hosts' +file is not necessary with this approach. + + +** IRIX +*** On Irix, I don't see the toolbar icons and I'm getting lots of +entries in the warnings buffer. + +SGI ships a really old Xpm library in /usr/lib which does not work at +all well with XEmacs. The solution is to install your own copy of the +latest version of Xpm somewhere and then use the --site-includes and +--site-libraries flags to tell configure where to find it. + +*** Trouble using ptys on IRIX, or running out of ptys. + +The program mkpts (which may be in `/usr/adm' or `/usr/sbin') needs to +be set-UID to root, or non-root programs like Emacs will not be able +to allocate ptys reliably. + +*** Motif dialog boxes lose on Irix. + +Larry Auton <lda@control.att.com> writes: +Beware of not specifying + + --with-dialogs=athena + +if it builds with the motif dialogs [boom!] you're a dead man. + +*** Beware of the default image & graphics library on Irix + +Richard Cognot <cognot@ensg.u-nancy.fr> writes: + +You *have* to compile your own jpeg lib. The one delivered with SGI +systems is a C++ lib, which apparently XEmacs cannot cope with. + + +** Digital UNIX/OSF/VMS/Ultrix +*** XEmacs crashes on Digital Unix within font-lock, or when dealing +with large compilation buffers. + +The default stack size under Digital Unix is rather small (2M as +opposed to Solaris 8M), hosing the regexp code, which uses alloca() +extensively, overflowing the stack when complex regexps are used. +Workarounds: -People often install the pty devices on AIX incorrectly. -Use `smit pty' to reinstall them properly. +1) Increase your stack size, using `ulimit -s 8192' or a (t)csh + equivalent; + +2) Recompile regex.c with REGEX_MALLOC defined. + +*** The `Alt' key doesn't behave as `Meta' when running DECwindows. + +The default DEC keyboard mapping has the Alt keys set up to generate the +keysym `Multi_key', which has a meaning to xemacs which is distinct from that +of the `Meta_L' and `Meta-R' keysyms. A second problem is that certain keys +have the Mod2 modifier attached to them for no adequately explored reason. +The correct fix is to pass this file to xmodmap upon starting X: + + clear mod2 + keysym Multi_key = Alt_L + add mod1 = Alt_L + add mod1 = Alt_R + +*** The Compose key on a DEC keyboard does not work as Meta key. + +This shell command should fix it: + + xmodmap -e 'keycode 0xb1 = Meta_L' + +*** `expand-file-name' fails to work on any but the machine you dumped +Emacs on. + +On Ultrix, if you use any of the functions which look up information +in the passwd database before dumping Emacs (say, by using +expand-file-name in site-init.el), then those functions will not work +in the dumped Emacs on any host but the one Emacs was dumped on. + +The solution? Don't use expand-file-name in site-init.el, or in +anything it loads. Yuck - some solution. + +I'm not sure why this happens; if you can find out exactly what is +going on, and perhaps find a fix or a workaround, please let us know. +Perhaps the YP functions cache some information, the cache is included +in the dumped Emacs, and is then inaccurate on any other host. + + +** HP-UX +*** I get complaints about the mapping of my HP keyboard at startup, +but I haven't changed anything. + +The default HP keymap is set up to have Mod1 assigned to two different keys: +Meta_L and Mode_switch (even though there is not actually a Mode_switch key on +the keyboard -- it uses an "imaginary" keycode.) There actually is a reason +for this, but it's not a good one. The correct fix is to execute this command +upon starting X: + + xmodmap -e 'remove mod1 = Mode_switch' -** Shell mode on HP/UX gives the message, "`tty`: Ambiguous". +*** On HP-UX, you get "poll: Interrupted system call" message in the +window where XEmacs was launched. + +Richard Cognot <cognot@ensg.u-nancy.fr> writes: + + I get a very strange problem when linking libc.a dynamically: every + event (mouse, keyboard, expose...) results in a "poll: Interrupted + system call" message in the window where XEmacs was + launched. Forcing a static link of libc.a alone by adding + /usr/lib/libc.a at the end of the link line solves this. Note that + my 9.07 build of 19.14b17 and my (old) build of 19.13 both exhibit + the same behaviour. I've tried various hpux patches to no avail. If + this problem cannot be solved before the release date, binary kits + for HP *must* be linked statically against libc, otherwise this + problem will show up. (This is directed at whoever will volunteer + for this kit, as I won't be available to do it, unless 19.14 gets + delayed until mid-june ;-). I think this problem will be an FAQ soon + after the release otherwise. + +Note: The above entry is probably not valid for XEmacs 21.0 and +later. + +*** The right Alt key works wrong on German HP keyboards (and perhaps + other non-English HP keyboards too). + +This is because HP-UX defines the modifiers wrong in X. Here is a +shell script to fix the problem; be sure that it is run after VUE +configures the X server. + + xmodmap 2> /dev/null - << EOF + keysym Alt_L = Meta_L + keysym Alt_R = Meta_R + EOF + + xmodmap - << EOF + clear mod1 + keysym Mode_switch = NoSymbol + add mod1 = Meta_L + keysym Meta_R = Mode_switch + add mod2 = Mode_switch + EOF + +*** `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 +file system. HP-UX responds this way if it tries to swap in a page and +does not get a response from the server within a timeout whose default +value is just ten seconds. + +If this happens to you, extend the timeout period. + +*** Shell mode on HP-UX gives the message, "`tty`: Ambiguous". christos@theory.tn.cornell.edu says: @@ -1311,51 +1363,31 @@ Even better, move things that set up terminal sections out of .cshrc and into .login. -** With process-connection-type set to t, each line of subprocess -output is terminated with a ^M, making ange-ftp and GNUS not work. -On SunOS systems, this problem has been seen to be a result of an -incomplete installation of gcc 2.2 which allowed some non-ANSI -compatible include files into the compilation. In particular this -affected virtually all ioctl() calls. +** SCO +*** Regular expressions matching bugs on SCO systems. -** Once you pull down a menu from the menubar, it won't go away. - -It has been claimed that this is caused by a bug in certain very old -(1990?) versions of the twm window manager. It doesn't happen with -recent vintages, or with other window managers. - -** Emacs ignores the "help" key when running OLWM. +On SCO, there are problems in regexp matching when Emacs is compiled +with the system compiler. The compiler version is "Microsoft C +version 6", SCO 4.2.0h Dev Sys Maintenance Supplement 01/06/93; Quick +C Compiler Version 1.00.46 (Beta). The solution is to compile with +GCC. -OLWM grabs the help key, and retransmits it to the appropriate client -using XSendEvent. Allowing emacs to react to synthetic events is a -security hole, so this is turned off by default. You can enable it by -setting the variable x-allow-sendevents to t. You can also cause fix -this by telling OLWM to not grab the help key, with the null binding -"OpenWindows.KeyboardCommand.Help:". -** Programs running under terminal emulator do not recognize `emacs' -terminal type. +** Windows +*** Emacs exits with "X protocol error" when run with an X server for +Windows. -The cause of this is a shell startup file that sets the TERMCAP -environment variable. The terminal emulator uses that variable to -provide the information on the special terminal type that Emacs -emulates. +A certain X server for Windows had a bug which caused this. +Supposedly the newer 32-bit version of this server doesn't have the +problem. -Rewrite your shell startup file so that it does not change TERMCAP -in such a case. You could use the following conditional which sets -it only if it is undefined. - - if ( ! ${?TERMCAP} ) setenv TERMCAP ~/my-termcap-file - -Or you could set TERMCAP only when you set TERM--which should not -happen in a non-login shell. * Compatibility problems (with Emacs 18, GNU Emacs, or previous XEmacs/lemacs) ============================================================================== -** "Symbol's value as variable is void: unread-command-char". +*** "Symbol's value as variable is void: unread-command-char". "Wrong type argument: arrayp, #<keymap 143 entries>" "Wrong type argument: stringp, [#<keypress-event return>]"
--- a/configure Mon Aug 13 11:03:09 2007 +0200 +++ b/configure Mon Aug 13 11:04:06 2007 +0200 @@ -999,7 +999,7 @@ case "$canonical" in sparc-*-* ) machine=sparc ;; - alpha-*-* ) machine=alpha ;; + alpha*-*-* ) machine=alpha ;; vax-*-* ) machine=vax ;; mips-dec-* ) machine=pmax ;; mips-sgi-* ) machine=iris4d ;; @@ -1034,9 +1034,9 @@ *-*-aix3.1* ) opsys=aix3-1 ;; *-*-aix3.2.5 ) opsys=aix3-2-5 ;; *-*-aix3* ) opsys=aix3-2 ;; - *-*-aix4.2* ) opsys=aix4-2 ;; + *-*-aix4.0* ) opsys=aix4 ;; *-*-aix4.1* ) opsys=aix4-1 ;; - *-*-aix4* ) opsys=aix4 ;; + *-*-aix4* ) opsys=aix4-2 ;; *-gnu* ) opsys=gnu ;; *-*-bsd4.[01] ) opsys=bsd4-1 ;; @@ -2081,31 +2081,35 @@ } -echo $ac_n "checking whether we are using SunPro C""... $ac_c" 1>&6 -echo "configure:2086: checking whether we are using SunPro C" >&5 -cat > conftest.$ac_ext <<EOF -#line 2088 "configure" -#include "confdefs.h" - -int main() { -#ifndef __SUNPRO_C -#error Not a SunPro compiler :-( -******* ======= ******** &&&&&&&& -#endif - -; return 0; } -EOF -if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - __sunpro_c=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - __sunpro_c=no -fi -rm -f conftest* -echo "$ac_t""$__sunpro_c" 1>&6 + +cat > conftest.$ac_ext <<EOF +#line 2087 "configure" +#include "confdefs.h" +int main () { +#if defined __SUNPRO_C +return 11; +#elif defined __DECC +return 12; +#else +return 0; +#endif +} +EOF +if { (eval echo configure:2099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +then + : +else + conftest_rc="$?" + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + case "$conftest_rc" in + 11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;; + 12) echo "You appear to be using the DEC C compiler." ; __DECC=yes ;; +esac +fi +rm -fr conftest* + @@ -2277,20 +2281,24 @@ 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 + if test "$cflags_specified" = "no"; then if test "$GCC" = "yes"; then CFLAGS="-g -O3 -Wall -Wno-switch" test "$opsys $machine" = "cygwin32 intel386" && \ CFLAGS="-g -O2 -Wall -Wno-switch" - elif test "$__sunpro_c" = "yes"; then + elif test "$__SUNPRO_C" = "yes"; then case "$opsys" in sol2 ) CFLAGS="-v -xO4" ;; sunos4* ) CFLAGS="-xO2";; esac + elif test "$__DECC" = "yes"; then + CFLAGS="-O3" elif test "$CC" = "xlc"; then - CFLAGS="-O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000" - else - CFLAGS="-O" ; fi + CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000" + else + CFLAGS="-O" ; fi fi @@ -2357,7 +2365,7 @@ fi echo $ac_n "checking for dynodump""... $ac_c" 1>&6 -echo "configure:2361: checking for dynodump" >&5 +echo "configure:2369: checking for dynodump" >&5 if test "$unexec" != "unexsol2.o"; then echo "$ac_t""no" 1>&6 else @@ -2395,12 +2403,12 @@ done echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6 -echo "configure:2399: checking for terminateAndUnload in -lC" >&5 +echo "configure:2407: checking for terminateAndUnload in -lC" >&5 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'` xe_check_libs=" -lC " cat > conftest.$ac_ext <<EOF -#line 2404 "configure" +#line 2412 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2411,7 +2419,7 @@ terminateAndUnload() ; return 0; } EOF -if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2488,18 +2496,22 @@ if test "$dynamic" = "no"; then add_runtime_path=no elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes else case "$opsys" in - sol2 | irix* | *bsd* ) add_runtime_path=yes ;; + sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;; * ) add_runtime_path=no ;; esac fi if test "$add_runtime_path" = "yes"; then echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 -echo "configure:2499: checking "for runtime libraries flag"" >&5 - dash_r="" - for try_dash_r in "-R" "-R " "-rpath "; do - xe_check_libs="${try_dash_r}/no/such/file-or-directory" - +echo "configure:2507: checking "for runtime libraries flag"" >&5 + case "$opsys" in + sol2 ) dash_r = "-R" ;; + decosf* | linux* ) dash_r = "-rpath " ;; + *) + dash_r="" + for try_dash_r in "-R" "-R " "-rpath "; do + xe_check_libs="${try_dash_r}/no/such/file-or-directory" + if test "$GCC" = "yes"; then set x $xe_check_libs; shift; xe_check_libs="" while test -n "$1"; do @@ -2512,15 +2524,15 @@ shift done fi - cat > conftest.$ac_ext <<EOF -#line 2517 "configure" -#include "confdefs.h" - -int main() { - -; return 0; } -EOF -if { (eval echo configure:2524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + cat > conftest.$ac_ext <<EOF +#line 2529 "configure" +#include "confdefs.h" + +int main() { + +; return 0; } +EOF +if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* dash_r="$try_dash_r" else @@ -2528,9 +2540,10 @@ cat conftest.$ac_ext >&5 fi rm -f conftest* - xe_check_libs="" - test -n "$dash_r" && break - done + xe_check_libs="" + test -n "$dash_r" && break + done ;; + esac if test -n "$dash_r"; then echo "$ac_t"""\"${dash_r}\""" 1>&6 else echo "$ac_t""NONE" 1>&6 @@ -2620,10 +2633,10 @@ fi after_morecore_hook_exists=yes echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6 -echo "configure:2624: checking for malloc_get_state" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2627 "configure" +echo "configure:2637: checking for malloc_get_state" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2640 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char malloc_get_state(); below. */ @@ -2646,7 +2659,7 @@ ; return 0; } EOF -if { (eval echo configure:2650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_malloc_get_state=yes" else @@ -2666,10 +2679,10 @@ fi echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 -echo "configure:2670: checking for malloc_set_state" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2673 "configure" +echo "configure:2683: checking for malloc_set_state" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2686 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char malloc_set_state(); below. */ @@ -2692,7 +2705,7 @@ ; return 0; } EOF -if { (eval echo configure:2696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_malloc_set_state=yes" else @@ -2712,16 +2725,16 @@ fi echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 -echo "configure:2716: checking whether __after_morecore_hook exists" >&5 -cat > conftest.$ac_ext <<EOF -#line 2718 "configure" +echo "configure:2729: checking whether __after_morecore_hook exists" >&5 +cat > conftest.$ac_ext <<EOF +#line 2731 "configure" #include "confdefs.h" extern void (* __after_morecore_hook)(); int main() { __after_morecore_hook = 0 ; return 0; } EOF -if { (eval echo configure:2725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2780,7 +2793,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2784: checking for $ac_word" >&5 +echo "configure:2797: checking for $ac_word" >&5 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -2833,7 +2846,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:2837: checking for a BSD compatible install" >&5 +echo "configure:2850: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" @@ -2884,7 +2897,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2888: checking for $ac_word" >&5 +echo "configure:2901: checking for $ac_word" >&5 if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. @@ -2915,15 +2928,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2919: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2922 "configure" +echo "configure:2932: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2935 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2952,19 +2965,19 @@ fi done -for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h +for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin32/version.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2960: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 2963 "configure" +echo "configure:2973: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 2976 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2997,15 +3010,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3001: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3004 "configure" +echo "configure:3014: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3017 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3035,10 +3048,10 @@ done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3039: checking for sys/wait.h that is POSIX.1 compatible" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3042 "configure" +echo "configure:3052: checking for sys/wait.h that is POSIX.1 compatible" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3055 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/wait.h> @@ -3054,7 +3067,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3078,10 +3091,10 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3082: checking for ANSI C header files" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3085 "configure" +echo "configure:3095: checking for ANSI C header files" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3098 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -3089,7 +3102,7 @@ #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3106,7 +3119,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 3110 "configure" +#line 3123 "configure" #include "confdefs.h" #include <string.h> EOF @@ -3124,7 +3137,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 3128 "configure" +#line 3141 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -3142,7 +3155,7 @@ if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. cat > conftest.$ac_ext <<EOF -#line 3146 "configure" +#line 3159 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3153,10 +3166,11 @@ exit (0); } EOF -if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -3178,10 +3192,10 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3182: checking whether time.h and sys/time.h may both be included" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3185 "configure" +echo "configure:3196: checking whether time.h and sys/time.h may both be included" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3199 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -3190,7 +3204,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3214,10 +3228,10 @@ fi echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:3218: checking for sys_siglist declaration in signal.h or unistd.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3221 "configure" +echo "configure:3232: checking for sys_siglist declaration in signal.h or unistd.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3235 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -3229,7 +3243,7 @@ char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:3233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -3254,9 +3268,9 @@ echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6 -echo "configure:3258: checking for struct utimbuf" >&5 -cat > conftest.$ac_ext <<EOF -#line 3260 "configure" +echo "configure:3272: checking for struct utimbuf" >&5 +cat > conftest.$ac_ext <<EOF +#line 3274 "configure" #include "confdefs.h" #ifdef TIME_WITH_SYS_TIME #include <sys/time.h> @@ -3275,7 +3289,7 @@ static struct utimbuf x; x.actime = x.modtime; ; return 0; } EOF -if { (eval echo configure:3279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3293: \"$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 @@ -3295,10 +3309,10 @@ rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3299: checking return type of signal handlers" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3302 "configure" +echo "configure:3313: checking return type of signal handlers" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3316 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -3315,7 +3329,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3337,10 +3351,10 @@ echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3341: checking for size_t" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3344 "configure" +echo "configure:3355: checking for size_t" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3358 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3371,10 +3385,10 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3375: checking for pid_t" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3378 "configure" +echo "configure:3389: checking for pid_t" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3392 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3405,10 +3419,10 @@ fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3409: checking for uid_t in sys/types.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3412 "configure" +echo "configure:3423: checking for uid_t in sys/types.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3426 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -3444,10 +3458,10 @@ fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3448: checking for mode_t" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3451 "configure" +echo "configure:3462: checking for mode_t" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3465 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3478,10 +3492,10 @@ fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3482: checking for off_t" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3485 "configure" +echo "configure:3496: checking for off_t" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3499 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3513,9 +3527,9 @@ echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:3517: checking for struct timeval" >&5 -cat > conftest.$ac_ext <<EOF -#line 3519 "configure" +echo "configure:3531: checking for struct timeval" >&5 +cat > conftest.$ac_ext <<EOF +#line 3533 "configure" #include "confdefs.h" #ifdef TIME_WITH_SYS_TIME #include <sys/time.h> @@ -3531,7 +3545,7 @@ static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } EOF -if { (eval echo configure:3535: \"$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* echo "$ac_t""yes" 1>&6 HAVE_TIMEVAL=yes @@ -3553,10 +3567,10 @@ rm -f conftest* echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3557: checking whether struct tm is in sys/time.h or time.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3560 "configure" +echo "configure:3571: checking whether struct tm is in sys/time.h or time.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3574 "configure" #include "confdefs.h" #include <sys/types.h> #include <time.h> @@ -3564,7 +3578,7 @@ struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3588,10 +3602,10 @@ fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3592: checking for tm_zone in struct tm" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3595 "configure" +echo "configure:3606: checking for tm_zone in struct tm" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3609 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_cv_struct_tm> @@ -3599,7 +3613,7 @@ struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:3603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -3622,10 +3636,10 @@ else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3626: checking for tzname" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3629 "configure" +echo "configure:3640: checking for tzname" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3643 "configure" #include "confdefs.h" #include <time.h> #ifndef tzname /* For SGI. */ @@ -3635,7 +3649,7 @@ atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -3661,10 +3675,10 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3665: checking for working const" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3668 "configure" +echo "configure:3679: checking for working const" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3682 "configure" #include "confdefs.h" int main() { @@ -3713,7 +3727,7 @@ ; return 0; } EOF -if { (eval echo configure:3717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3738,7 +3752,7 @@ echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:3742: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:3756: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` cat > conftestmake <<\EOF @@ -3763,12 +3777,12 @@ echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3767: checking whether byte ordering is bigendian" >&5 +echo "configure:3781: checking whether byte ordering is bigendian" >&5 ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext <<EOF -#line 3772 "configure" +#line 3786 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -3779,11 +3793,11 @@ #endif ; return 0; } EOF -if { (eval echo configure:3783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext <<EOF -#line 3787 "configure" +#line 3801 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -3794,7 +3808,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:3798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3811,7 +3825,7 @@ rm -f conftest* if test $ac_cv_c_bigendian = unknown; then cat > conftest.$ac_ext <<EOF -#line 3815 "configure" +#line 3829 "configure" #include "confdefs.h" main () { /* Are we little or big endian? From Harbison&Steele. */ @@ -3824,10 +3838,11 @@ exit (u.c[sizeof (long) - 1] == 1); } EOF -if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_bigendian=no else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -3850,10 +3865,10 @@ echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:3854: checking size of short" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3857 "configure" +echo "configure:3869: checking size of short" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3872 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3864,10 +3879,11 @@ exit(0); } EOF -if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_short=`cat conftestval` else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -3891,10 +3907,10 @@ exit 1 fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:3895: checking size of int" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3898 "configure" +echo "configure:3911: checking size of int" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3914 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3905,10 +3921,11 @@ exit(0); } EOF -if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_int=`cat conftestval` else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -3926,10 +3943,10 @@ echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:3930: checking size of long" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3933 "configure" +echo "configure:3947: checking size of long" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3950 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3940,10 +3957,11 @@ exit(0); } EOF -if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long=`cat conftestval` else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -3961,10 +3979,10 @@ echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:3965: checking size of long long" >&5 - -cat > conftest.$ac_ext <<EOF -#line 3968 "configure" +echo "configure:3983: checking size of long long" >&5 + +cat > conftest.$ac_ext <<EOF +#line 3986 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -3975,10 +3993,11 @@ exit(0); } EOF -if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:3997: \"$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 + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -3996,10 +4015,10 @@ echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:4000: checking size of void *" >&5 - -cat > conftest.$ac_ext <<EOF -#line 4003 "configure" +echo "configure:4019: checking size of void *" >&5 + +cat > conftest.$ac_ext <<EOF +#line 4022 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -4010,10 +4029,11 @@ exit(0); } EOF -if { (eval echo configure:4014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:4033: \"$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 + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -4032,7 +4052,7 @@ echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:4036: checking for long file names" >&5 +echo "configure:4056: 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: @@ -4079,12 +4099,12 @@ echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:4083: checking for sin in -lm" >&5 +echo "configure:4103: checking for sin in -lm" >&5 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` xe_check_libs=" -lm " cat > conftest.$ac_ext <<EOF -#line 4088 "configure" +#line 4108 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4095,7 +4115,7 @@ sin() ; return 0; } EOF -if { (eval echo configure:4099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4137,14 +4157,14 @@ cat > conftest.$ac_ext <<EOF -#line 4141 "configure" +#line 4161 "configure" #include "confdefs.h" #include <math.h> int main() { return atanh(1.0) + asinh(1.0) + acosh(1.0); ; return 0; } EOF -if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_INVERSE_HYPERBOLIC @@ -4161,7 +4181,7 @@ rm -f conftest* echo "checking type of mail spool file locking" 1>&6 -echo "configure:4165: checking type of mail spool file locking" >&5 +echo "configure:4185: checking type of mail spool file locking" >&5 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf if test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF @@ -4185,12 +4205,12 @@ echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:4189: checking for kstat_open in -lkstat" >&5 +echo "configure:4209: checking for kstat_open in -lkstat" >&5 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lkstat " cat > conftest.$ac_ext <<EOF -#line 4194 "configure" +#line 4214 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4201,7 +4221,7 @@ kstat_open() ; return 0; } EOF -if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4235,12 +4255,12 @@ echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 -echo "configure:4239: checking for kvm_read in -lkvm" >&5 +echo "configure:4259: checking for kvm_read in -lkvm" >&5 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'` xe_check_libs=" -lkvm " cat > conftest.$ac_ext <<EOF -#line 4244 "configure" +#line 4264 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4251,7 +4271,7 @@ kvm_read() ; return 0; } EOF -if { (eval echo configure:4255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4286,12 +4306,12 @@ case "$opsys" in decosf*) echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 -echo "configure:4290: checking for cma_open in -lpthreads" >&5 +echo "configure:4310: checking for cma_open in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lpthreads " cat > conftest.$ac_ext <<EOF -#line 4295 "configure" +#line 4315 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4302,7 +4322,7 @@ cma_open() ; return 0; } EOF -if { (eval echo configure:4306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4338,7 +4358,7 @@ esac echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 -echo "configure:4342: checking whether the -xildoff compiler flag is required" >&5 +echo "configure:4362: 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; @@ -4349,7 +4369,7 @@ if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6 -echo "configure:4353: checking for \"-z ignore\" linker flag" >&5 +echo "configure:4373: 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 ;; @@ -4359,7 +4379,7 @@ echo "checking "for specified window system"" 1>&6 -echo "configure:4363: checking "for specified window system"" >&5 +echo "configure:4383: checking "for specified window system"" >&5 if test "$with_x11" != "no"; then test "$x_includes $x_libraries" != "NONE NONE" && \ @@ -4392,7 +4412,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:4396: checking for X" >&5 +echo "configure:4416: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4452,12 +4472,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext <<EOF -#line 4456 "configure" +#line 4476 "configure" #include "confdefs.h" #include <$x_direct_test_include> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4526,14 +4546,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <<EOF -#line 4530 "configure" +#line 4550 "configure" #include "confdefs.h" int main() { ${x_direct_test_function}() ; return 0; } EOF -if { (eval echo configure:4537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -4642,17 +4662,17 @@ case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:4646: checking whether -R must be followed by a space" >&5 +echo "configure:4666: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <<EOF -#line 4649 "configure" -#include "confdefs.h" - -int main() { - -; return 0; } -EOF -if { (eval echo configure:4656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +#line 4669 "configure" +#include "confdefs.h" + +int main() { + +; return 0; } +EOF +if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_nospace=yes else @@ -4668,14 +4688,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <<EOF -#line 4672 "configure" -#include "confdefs.h" - -int main() { - -; return 0; } -EOF -if { (eval echo configure:4679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +#line 4692 "configure" +#include "confdefs.h" + +int main() { + +; return 0; } +EOF +if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_space=yes else @@ -4711,12 +4731,12 @@ else echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:4715: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:4735: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet " cat > conftest.$ac_ext <<EOF -#line 4720 "configure" +#line 4740 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4727,7 +4747,7 @@ dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4751,12 +4771,12 @@ if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:4755: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:4775: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet_stub " cat > conftest.$ac_ext <<EOF -#line 4760 "configure" +#line 4780 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4767,7 +4787,7 @@ dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4796,10 +4816,10 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:4800: checking for gethostbyname" >&5 - -cat > conftest.$ac_ext <<EOF -#line 4803 "configure" +echo "configure:4820: checking for gethostbyname" >&5 + +cat > conftest.$ac_ext <<EOF +#line 4823 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname(); below. */ @@ -4822,7 +4842,7 @@ ; return 0; } EOF -if { (eval echo configure:4826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -4843,12 +4863,12 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:4847: checking for gethostbyname in -lnsl" >&5 +echo "configure:4867: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` xe_check_libs=" -lnsl " cat > conftest.$ac_ext <<EOF -#line 4852 "configure" +#line 4872 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4859,7 +4879,7 @@ gethostbyname() ; return 0; } EOF -if { (eval echo configure:4863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4889,10 +4909,10 @@ # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:4893: checking for connect" >&5 - -cat > conftest.$ac_ext <<EOF -#line 4896 "configure" +echo "configure:4913: checking for connect" >&5 + +cat > conftest.$ac_ext <<EOF +#line 4916 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect(); below. */ @@ -4915,7 +4935,7 @@ ; return 0; } EOF -if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -4938,12 +4958,12 @@ xe_msg_checking="for connect in -lsocket" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:4942: checking "$xe_msg_checking"" >&5 +echo "configure:4962: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocket $X_EXTRA_LIBS" cat > conftest.$ac_ext <<EOF -#line 4947 "configure" +#line 4967 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4954,7 +4974,7 @@ connect() ; return 0; } EOF -if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4978,10 +4998,10 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:4982: checking for remove" >&5 - -cat > conftest.$ac_ext <<EOF -#line 4985 "configure" +echo "configure:5002: checking for remove" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5005 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove(); below. */ @@ -5004,7 +5024,7 @@ ; return 0; } EOF -if { (eval echo configure:5008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -5025,12 +5045,12 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:5029: checking for remove in -lposix" >&5 +echo "configure:5049: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` xe_check_libs=" -lposix " cat > conftest.$ac_ext <<EOF -#line 5034 "configure" +#line 5054 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5041,7 +5061,7 @@ remove() ; return 0; } EOF -if { (eval echo configure:5045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5065,10 +5085,10 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:5069: checking for shmat" >&5 - -cat > conftest.$ac_ext <<EOF -#line 5072 "configure" +echo "configure:5089: checking for shmat" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5092 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat(); below. */ @@ -5091,7 +5111,7 @@ ; return 0; } EOF -if { (eval echo configure:5095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -5112,12 +5132,12 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:5116: checking for shmat in -lipc" >&5 +echo "configure:5136: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` xe_check_libs=" -lipc " cat > conftest.$ac_ext <<EOF -#line 5121 "configure" +#line 5141 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5128,7 +5148,7 @@ shmat() ; return 0; } EOF -if { (eval echo configure:5132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5162,12 +5182,12 @@ # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:5166: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:5186: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` xe_check_libs=" -lICE " cat > conftest.$ac_ext <<EOF -#line 5171 "configure" +#line 5191 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5178,7 +5198,7 @@ IceConnectionNumber() ; return 0; } EOF -if { (eval echo configure:5182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5253,6 +5273,8 @@ break; fi done + if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS -L/usr/shlib" && if test "$extra_verbose" = "yes"; then echo " Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi + ld_switch_x_site="$X_LIBS" @@ -5345,7 +5367,7 @@ echo "checking for X defines extracted by xmkmf" 1>&6 -echo "configure:5349: checking for X defines extracted by xmkmf" >&5 +echo "configure:5371: checking for X defines extracted by xmkmf" >&5 rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -5377,15 +5399,15 @@ ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6 -echo "configure:5381: checking for X11/Intrinsic.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 5384 "configure" +echo "configure:5403: checking for X11/Intrinsic.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5406 "configure" #include "confdefs.h" #include <X11/Intrinsic.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5409,12 +5431,12 @@ echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:5413: checking for XOpenDisplay in -lX11" >&5 +echo "configure:5435: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <<EOF -#line 5418 "configure" +#line 5440 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5425,7 +5447,7 @@ XOpenDisplay() ; return 0; } EOF -if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5450,12 +5472,12 @@ xe_msg_checking="for XGetFontProperty in -lX11" test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5454: checking "$xe_msg_checking"" >&5 +echo "configure:5476: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 -b i486-linuxaout" cat > conftest.$ac_ext <<EOF -#line 5459 "configure" +#line 5481 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5466,7 +5488,7 @@ XGetFontProperty() ; return 0; } EOF -if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5493,12 +5515,12 @@ echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:5497: checking for XShapeSelectInput in -lXext" >&5 +echo "configure:5519: checking for XShapeSelectInput in -lXext" >&5 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'` xe_check_libs=" -lXext " cat > conftest.$ac_ext <<EOF -#line 5502 "configure" +#line 5524 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5509,7 +5531,7 @@ XShapeSelectInput() ; return 0; } EOF -if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5532,12 +5554,12 @@ echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 -echo "configure:5536: checking for XtOpenDisplay in -lXt" >&5 +echo "configure:5558: checking for XtOpenDisplay in -lXt" >&5 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lXt " cat > conftest.$ac_ext <<EOF -#line 5541 "configure" +#line 5563 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5548,7 +5570,7 @@ XtOpenDisplay() ; return 0; } EOF -if { (eval echo configure:5552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5571,17 +5593,18 @@ echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:5575: checking the version of X11 being used" >&5 +echo "configure:5597: checking the version of X11 being used" >&5 cat > conftest.$ac_ext <<EOF -#line 5577 "configure" +#line 5599 "configure" #include "confdefs.h" #include <X11/Intrinsic.h> int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; } EOF -if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:5604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest foobar; x11_release=$? else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -5602,15 +5625,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5606: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 5609 "configure" +echo "configure:5629: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5632 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5641,7 +5664,7 @@ echo $ac_n "checking for XFree86""... $ac_c" 1>&6 -echo "configure:5645: checking for XFree86" >&5 +echo "configure:5668: checking for XFree86" >&5 if test -d "/usr/X386/include" -o \ -f "/etc/XF86Config" -o \ -f "/etc/X11/XF86Config" -o \ @@ -5661,12 +5684,12 @@ test -z "$with_xmu" && { echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 -echo "configure:5665: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 +echo "configure:5688: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'` xe_check_libs=" -lXmu " cat > conftest.$ac_ext <<EOF -#line 5670 "configure" +#line 5693 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5677,7 +5700,7 @@ XmuReadBitmapDataFromFile() ; return 0; } EOF -if { (eval echo configure:5681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5716,19 +5739,19 @@ echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:5720: checking for main in -lXbsd" >&5 +echo "configure:5743: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lXbsd " cat > conftest.$ac_ext <<EOF -#line 5725 "configure" +#line 5748 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5765,22 +5788,22 @@ fi if test "$with_msw" != "no"; then echo "checking for MS-Windows" 1>&6 -echo "configure:5769: checking for MS-Windows" >&5 +echo "configure:5792: checking for MS-Windows" >&5 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 -echo "configure:5772: checking for main in -lgdi32" >&5 +echo "configure:5795: checking for main in -lgdi32" >&5 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdi32 " cat > conftest.$ac_ext <<EOF -#line 5777 "configure" +#line 5800 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5844,12 +5867,12 @@ fi fi cat > conftest.$ac_ext <<EOF -#line 5848 "configure" +#line 5871 "configure" #include "confdefs.h" #include <fcntl.h> int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; } EOF -if { (eval echo configure:5853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:5876: \"$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 @@ -5860,6 +5883,7 @@ } else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi @@ -5927,7 +5951,7 @@ esac echo "checking for session-management option" 1>&6 -echo "configure:5931: checking for session-management option" >&5; +echo "configure:5955: checking for session-management option" >&5; if test "$with_session" != "no"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SESSION @@ -5942,15 +5966,15 @@ test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6 -echo "configure:5946: checking for X11/Xauth.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 5949 "configure" +echo "configure:5970: checking for X11/Xauth.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 5973 "configure" #include "confdefs.h" #include <X11/Xauth.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5973,12 +5997,12 @@ } test -z "$with_xauth" && { echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 -echo "configure:5977: checking for XauGetAuthByAddr in -lXau" >&5 +echo "configure:6001: checking for XauGetAuthByAddr in -lXau" >&5 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'` xe_check_libs=" -lXau " cat > conftest.$ac_ext <<EOF -#line 5982 "configure" +#line 6006 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5989,7 +6013,7 @@ XauGetAuthByAddr() ; return 0; } EOF -if { (eval echo configure:5993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6034,15 +6058,15 @@ for dir in "" "Tt/" "desktop/" ; do ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6 -echo "configure:6038: checking for ${dir}tt_c.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6041 "configure" +echo "configure:6062: checking for ${dir}tt_c.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6065 "configure" #include "confdefs.h" #include <${dir}tt_c.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6078,12 +6102,12 @@ xe_msg_checking="for tt_message_create in -ltt" test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6082: checking "$xe_msg_checking"" >&5 +echo "configure:6106: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'` xe_check_libs=" -ltt $extra_libs" cat > conftest.$ac_ext <<EOF -#line 6087 "configure" +#line 6111 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6094,7 +6118,7 @@ tt_message_create() ; return 0; } EOF -if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6151,15 +6175,15 @@ test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6 -echo "configure:6155: checking for Dt/Dt.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6158 "configure" +echo "configure:6179: checking for Dt/Dt.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6182 "configure" #include "confdefs.h" #include <Dt/Dt.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6182,12 +6206,12 @@ } test -z "$with_cde" && { echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 -echo "configure:6186: checking for DtDndDragStart in -lDtSvc" >&5 +echo "configure:6210: checking for DtDndDragStart in -lDtSvc" >&5 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'` xe_check_libs=" -lDtSvc " cat > conftest.$ac_ext <<EOF -#line 6191 "configure" +#line 6215 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6198,7 +6222,7 @@ DtDndDragStart() ; return 0; } EOF -if { (eval echo configure:6202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6267,7 +6291,7 @@ fi echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6 -echo "configure:6271: checking if drag and drop API is needed" >&5 +echo "configure:6295: checking if drag and drop API is needed" >&5 if test "$with_dragndrop" != "no" ; then if test -n "$dragndrop_proto" ; then with_dragndrop=yes @@ -6288,18 +6312,18 @@ fi echo "checking for LDAP" 1>&6 -echo "configure:6292: checking for LDAP" >&5 +echo "configure:6316: 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:6295: checking for ldap.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6298 "configure" +echo "configure:6319: checking for ldap.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6322 "configure" #include "confdefs.h" #include <ldap.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6322,15 +6346,15 @@ } test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for lber.h""... $ac_c" 1>&6 -echo "configure:6326: checking for lber.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6329 "configure" +echo "configure:6350: checking for lber.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6353 "configure" #include "confdefs.h" #include <lber.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6356,12 +6380,12 @@ xe_msg_checking="for ldap_open in -lldap" test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6360: checking "$xe_msg_checking"" >&5 +echo "configure:6384: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber" cat > conftest.$ac_ext <<EOF -#line 6365 "configure" +#line 6389 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6372,7 +6396,7 @@ ldap_open() ; return 0; } EOF -if { (eval echo configure:6376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6395,12 +6419,12 @@ } test "$with_umich_ldap" = "no" && { echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6 -echo "configure:6399: checking for ldap_set_option in -lldap10" >&5 +echo "configure:6423: checking for ldap_set_option in -lldap10" >&5 ac_lib_var=`echo ldap10'_'ldap_set_option | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap10 " cat > conftest.$ac_ext <<EOF -#line 6404 "configure" +#line 6428 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6411,7 +6435,7 @@ ldap_set_option() ; return 0; } EOF -if { (eval echo configure:6415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6475,14 +6499,15 @@ if test "$window_system" != "none"; then echo "checking for graphics libraries" 1>&6 -echo "configure:6479: checking for graphics libraries" >&5 - - if test -z "$with_xpm"; then +echo "configure:6503: 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:6483: checking for Xpm - no older than 3.4f" >&5 +echo "configure:6508: checking for Xpm - no older than 3.4f" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext <<EOF -#line 6486 "configure" +#line 6511 "configure" #include "confdefs.h" #include <X11/xpm.h> int main(int c, char **v) { @@ -6490,27 +6515,28 @@ XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;} EOF -if { (eval echo configure:6494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:6519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest dummy_arg; xpm_status=$?; - if test "$?" = "0"; then + if test "$xpm_status" = "0"; then with_xpm=yes; else with_xpm=no; - if test "$?" = "1"; then + if test "$xpm_status" = "1"; then xpm_problem="Xpm library version and header file version don't match!" - elif test "$?" = "2"; then + elif test "$xpm_status" = "2"; then xpm_problem="Xpm library version is too old!" else xpm_problem="Internal xpm detection logic error!" fi echo " -*** WARNING *** $problem +*** WARNING *** $xpm_problem I'm not touching that with a 10-foot pole! If you really want to use the installed version of Xpm, rerun - configure --with-xpm=yes, but don't blame me if XEmacs crashes!" + configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!" fi else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -6531,17 +6557,17 @@ libs_x="-lXpm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6 -echo "configure:6535: checking for \"FOR_MSW\" xpm" >&5 +echo "configure:6561: checking for \"FOR_MSW\" xpm" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext <<EOF -#line 6538 "configure" +#line 6564 "configure" #include "confdefs.h" int main() { XpmCreatePixmapFromData() ; return 0; } EOF -if { (eval echo configure:6545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* xpm_for_msw=no else @@ -6565,15 +6591,30 @@ fi fi + if test "$with_gif" != "no"; then + with_gif="yes" + { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_GIF +EOF +cat >> confdefs.h <<\EOF +#define HAVE_GIF 1 +EOF +} + + extra_objs="$extra_objs dgif_lib.o gif_io.o" && if test "$extra_verbose" = "yes"; then + echo " xemacs will be linked with \"dgif_lib.o gif_io.o\"" + fi + fi + if test "$with_png $with_tiff" != "no no"; then echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6 -echo "configure:6572: checking for inflate in -lc" >&5 +echo "configure:6613: checking for inflate in -lc" >&5 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <<EOF -#line 6577 "configure" +#line 6618 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6584,7 +6625,7 @@ inflate() ; return 0; } EOF -if { (eval echo configure:6588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6603,12 +6644,12 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:6607: checking for inflate in -lz" >&5 +echo "configure:6648: checking for inflate in -lz" >&5 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lz " cat > conftest.$ac_ext <<EOF -#line 6612 "configure" +#line 6653 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6619,7 +6660,7 @@ inflate() ; return 0; } EOF -if { (eval echo configure:6623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6638,12 +6679,12 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 -echo "configure:6642: checking for inflate in -lgz" >&5 +echo "configure:6683: checking for inflate in -lgz" >&5 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lgz " cat > conftest.$ac_ext <<EOF -#line 6647 "configure" +#line 6688 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6654,7 +6695,7 @@ inflate() ; return 0; } EOF -if { (eval echo configure:6658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6682,102 +6723,17 @@ fi - echo $ac_n "checking for gifreader""... $ac_c" 1>&6 -echo "configure:6687: checking for gifreader" >&5 - test -z "$with_gif" && { ac_safe=`echo "gifrlib.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for gifrlib.h""... $ac_c" 1>&6 -echo "configure:6690: checking for gifrlib.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6693 "configure" -#include "confdefs.h" -#include <gifrlib.h> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_gif=no -fi - } - test -z "$with_gif" && { -echo $ac_n "checking for GetGifError in -lgifreader""... $ac_c" 1>&6 -echo "configure:6721: checking for GetGifError in -lgifreader" >&5 -ac_lib_var=`echo gifreader'_'GetGifError | sed 'y%./+-%__p_%'` - -xe_check_libs=" -lgifreader " -cat > conftest.$ac_ext <<EOF -#line 6726 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char GetGifError(); - -int main() { -GetGifError() -; return 0; } -EOF -if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -xe_check_libs="" - -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -with_gif=no -fi - - } - test -z "$with_gif" && with_gif=yes - if test "$with_gif" = "yes"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_GIF -EOF -cat >> confdefs.h <<\EOF -#define HAVE_GIF 1 -EOF -} - - libs_x="-lgifreader $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lgifreader\" to \$libs_x"; fi - 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:6773: checking for jpeglib.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6776 "configure" +echo "configure:6729: checking for jpeglib.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6732 "configure" #include "confdefs.h" #include <jpeglib.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6800,12 +6756,12 @@ } test -z "$with_jpeg" && { echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 -echo "configure:6804: checking for jpeg_destroy_decompress in -ljpeg" >&5 +echo "configure:6760: checking for jpeg_destroy_decompress in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'` xe_check_libs=" -ljpeg " cat > conftest.$ac_ext <<EOF -#line 6809 "configure" +#line 6765 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6816,7 +6772,7 @@ jpeg_destroy_decompress() ; return 0; } EOF -if { (eval echo configure:6820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6850,34 +6806,12 @@ libs_x="-ljpeg $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ljpeg\" to \$libs_x"; fi fi - if test -z "$with_png"; then - echo $ac_n "checking for png.h - no older than 0.96""... $ac_c" 1>&6 -echo "configure:6856: checking for png.h - no older than 0.96" >&5 - cat > conftest.$ac_ext <<EOF -#line 6858 "configure" -#include "confdefs.h" -#include <png.h> -#if PNG_LIBPNG_VER >= 96 -yes -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - rm -rf conftest* - echo "$ac_t""no" 1>&6; with_png=no -fi -rm -f conftest* - - fi + png_problem="" test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 -echo "configure:6878: checking for pow" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6881 "configure" +echo "configure:6812: checking for pow" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6815 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char pow(); below. */ @@ -6900,7 +6834,7 @@ ; return 0; } EOF -if { (eval echo configure:6904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pow=yes" else @@ -6919,14 +6853,45 @@ with_png=no 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:6859: checking for png.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6862 "configure" +#include "confdefs.h" +#include <png.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:6867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +with_png=no +fi + } test -z "$with_png" && { echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:6925: checking for png_read_image in -lpng" >&5 +echo "configure:6890: checking for png_read_image in -lpng" >&5 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'` xe_check_libs=" -lpng " cat > conftest.$ac_ext <<EOF -#line 6930 "configure" +#line 6895 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6937,7 +6902,7 @@ png_read_image() ; return 0; } EOF -if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6958,7 +6923,48 @@ fi } - test -z "$with_png" && with_png=yes + if test -z "$with_png"; then + echo $ac_n "checking for workable png version information""... $ac_c" 1>&6 +echo "configure:6929: checking for workable png version information" >&5 + xe_check_libs="-lpng -lz" + cat > conftest.$ac_ext <<EOF +#line 6932 "configure" +#include "confdefs.h" +#include <png.h> + int main(int c, char **v) { + if (c == 1) return 0; + if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1; + return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;} +EOF +if { (eval echo configure:6940: \"$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 + with_png=yes; + else + with_png=no; + if test "$png_status" = "1"; then + png_problem="PNG library version and header file don't match!" + elif test "$png_status" = "2"; then + png_problem="PNG library version too old (pre 1.0.2)!" + fi + echo " +*** WARNING *** $png_problem + I'm not touching that with a 10-foot pole! + If you really want to use the installed version of libPNG, rerun + configure and add '--with-png=yes', but don't blame me if XEmacs crashes!" + fi +else + conftest_rc="$?" + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + with_png=no +fi +rm -fr conftest* + xe_check_libs= + echo "$ac_t""$with_png" 1>&6 + fi if test "$with_png" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_PNG @@ -6973,15 +6979,15 @@ test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:6977: checking for tiffio.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 6980 "configure" +echo "configure:6983: checking for tiffio.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 6986 "configure" #include "confdefs.h" #include <tiffio.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7004,12 +7010,12 @@ } test -z "$with_tiff" && { echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6 -echo "configure:7008: checking for TIFFClientOpen in -ltiff" >&5 +echo "configure:7014: checking for TIFFClientOpen in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'` xe_check_libs=" -ltiff " cat > conftest.$ac_ext <<EOF -#line 7013 "configure" +#line 7019 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7020,7 +7026,7 @@ TIFFClientOpen() ; return 0; } EOF -if { (eval echo configure:7024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7059,19 +7065,19 @@ if test "$with_x11" = "yes"; then echo "checking for X11 graphics libraries" 1>&6 -echo "configure:7063: checking for X11 graphics libraries" >&5 +echo "configure:7069: checking for X11 graphics libraries" >&5 test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for compface.h""... $ac_c" 1>&6 -echo "configure:7067: checking for compface.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7070 "configure" +echo "configure:7073: checking for compface.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7076 "configure" #include "confdefs.h" #include <compface.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7094,12 +7100,12 @@ } test -z "$with_xface" && { echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:7098: checking for UnGenFace in -lcompface" >&5 +echo "configure:7104: checking for UnGenFace in -lcompface" >&5 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'` xe_check_libs=" -lcompface " cat > conftest.$ac_ext <<EOF -#line 7103 "configure" +#line 7109 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7110,7 +7116,7 @@ UnGenFace() ; return 0; } EOF -if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7146,12 +7152,12 @@ echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6 -echo "configure:7150: checking for XawScrollbarSetThumb in -lXaw" >&5 +echo "configure:7156: checking for XawScrollbarSetThumb in -lXaw" >&5 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` xe_check_libs=" -lXaw " cat > conftest.$ac_ext <<EOF -#line 7155 "configure" +#line 7161 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7162,7 +7168,7 @@ XawScrollbarSetThumb() ; return 0; } EOF -if { (eval echo configure:7166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7186,15 +7192,15 @@ ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:7190: checking for Xm/Xm.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7193 "configure" +echo "configure:7196: checking for Xm/Xm.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7199 "configure" #include "confdefs.h" #include <Xm/Xm.h> 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; } +{ (eval echo configure:7204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7211,12 +7217,12 @@ echo "$ac_t""yes" 1>&6 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6 -echo "configure:7215: checking for XmStringFree in -lXm" >&5 +echo "configure:7221: checking for XmStringFree in -lXm" >&5 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <<EOF -#line 7220 "configure" +#line 7226 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7227,7 +7233,7 @@ XmStringFree() ; return 0; } EOF -if { (eval echo configure:7231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7256,9 +7262,9 @@ if test "$have_motif" = "yes"; then echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 -echo "configure:7260: checking for Lesstif" >&5 +echo "configure:7266: checking for Lesstif" >&5 cat > conftest.$ac_ext <<EOF -#line 7262 "configure" +#line 7268 "configure" #include "confdefs.h" #include <Xm/Xm.h> #ifdef LESSTIF_VERSION @@ -7542,7 +7548,7 @@ if test "$with_mule" = "yes" ; then echo "checking for Mule-related features" 1>&6 -echo "configure:7546: checking for Mule-related features" >&5 +echo "configure:7552: checking for Mule-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining MULE EOF @@ -7567,15 +7573,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7571: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7574 "configure" +echo "configure:7577: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7580 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7606,12 +7612,12 @@ echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:7610: checking for strerror in -lintl" >&5 +echo "configure:7616: checking for strerror in -lintl" >&5 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'` xe_check_libs=" -lintl " cat > conftest.$ac_ext <<EOF -#line 7615 "configure" +#line 7621 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7622,7 +7628,7 @@ strerror() ; return 0; } EOF -if { (eval echo configure:7626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7655,19 +7661,19 @@ echo "checking for Mule input methods" 1>&6 -echo "configure:7659: checking for Mule input methods" >&5 +echo "configure:7665: checking for Mule input methods" >&5 case "$with_xim" in "" | "yes" ) echo "checking for XIM" 1>&6 -echo "configure:7662: checking for XIM" >&5 +echo "configure:7668: checking for XIM" >&5 if test "$have_lesstif" = "yes"; then with_xim=xlib else echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:7666: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:7672: checking for XmImMbLookupString in -lXm" >&5 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <<EOF -#line 7671 "configure" +#line 7677 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7678,7 +7684,7 @@ XmImMbLookupString() ; return 0; } EOF -if { (eval echo configure:7682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7744,15 +7750,15 @@ if test "$with_xfs" = "yes" ; then echo "checking for XFontSet" 1>&6 -echo "configure:7748: checking for XFontSet" >&5 +echo "configure:7754: checking for XFontSet" >&5 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:7751: checking for XmbDrawString in -lX11" >&5 +echo "configure:7757: checking for XmbDrawString in -lX11" >&5 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <<EOF -#line 7756 "configure" +#line 7762 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7763,7 +7769,7 @@ XmbDrawString() ; return 0; } EOF -if { (eval echo configure:7767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7803,15 +7809,15 @@ test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6 -echo "configure:7807: checking for wnn/jllib.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7810 "configure" +echo "configure:7813: checking for wnn/jllib.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7816 "configure" #include "confdefs.h" #include <wnn/jllib.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7836,10 +7842,10 @@ for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7840: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 7843 "configure" +echo "configure:7846: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 7849 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7862,7 +7868,7 @@ ; return 0; } EOF -if { (eval echo configure:7866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7891,12 +7897,12 @@ test "$ac_cv_func_crypt" != "yes" && { echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:7895: checking for crypt in -lcrypt" >&5 +echo "configure:7901: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` xe_check_libs=" -lcrypt " cat > conftest.$ac_ext <<EOF -#line 7900 "configure" +#line 7906 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7907,7 +7913,7 @@ crypt() ; return 0; } EOF -if { (eval echo configure:7911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7941,12 +7947,12 @@ fi test -z "$with_wnn" && { echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6 -echo "configure:7945: checking for jl_dic_list_e in -lwnn" >&5 +echo "configure:7951: checking for jl_dic_list_e in -lwnn" >&5 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn " cat > conftest.$ac_ext <<EOF -#line 7950 "configure" +#line 7956 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7957,7 +7963,7 @@ jl_dic_list_e() ; return 0; } EOF -if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7995,12 +8001,12 @@ if test "$with_wnn6" != "no"; then echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6 -echo "configure:7999: checking for jl_fi_dic_list in -lwnn" >&5 +echo "configure:8005: checking for jl_fi_dic_list in -lwnn" >&5 ac_lib_var=`echo wnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn " cat > conftest.$ac_ext <<EOF -#line 8004 "configure" +#line 8010 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8011,7 +8017,7 @@ jl_fi_dic_list() ; return 0; } EOF -if { (eval echo configure:8015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8046,15 +8052,15 @@ if test "$with_canna" != "no"; then ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:8050: checking for canna/jrkanji.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8053 "configure" +echo "configure:8056: checking for canna/jrkanji.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8059 "configure" #include "confdefs.h" #include <canna/jrkanji.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8081,15 +8087,15 @@ c_switch_site="$c_switch_site -I/usr/local/canna/include" ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:8085: checking for canna/jrkanji.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8088 "configure" +echo "configure:8091: checking for canna/jrkanji.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8094 "configure" #include "confdefs.h" #include <canna/jrkanji.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8117,15 +8123,15 @@ test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6 -echo "configure:8121: checking for canna/RK.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8124 "configure" +echo "configure:8127: checking for canna/RK.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8130 "configure" #include "confdefs.h" #include <canna/RK.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8148,12 +8154,12 @@ } test -z "$with_canna" && { echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:8152: checking for RkBgnBun in -lRKC" >&5 +echo "configure:8158: checking for RkBgnBun in -lRKC" >&5 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'` xe_check_libs=" -lRKC " cat > conftest.$ac_ext <<EOF -#line 8157 "configure" +#line 8163 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8164,7 +8170,7 @@ RkBgnBun() ; return 0; } EOF -if { (eval echo configure:8168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8187,12 +8193,12 @@ } test -z "$with_canna" && { echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:8191: checking for jrKanjiControl in -lcanna" >&5 +echo "configure:8197: checking for jrKanjiControl in -lcanna" >&5 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'` xe_check_libs=" -lcanna " cat > conftest.$ac_ext <<EOF -#line 8196 "configure" +#line 8202 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8203,7 +8209,7 @@ jrKanjiControl() ; return 0; } EOF -if { (eval echo configure:8207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8252,12 +8258,12 @@ libs_x="-lXm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXm\" to \$libs_x"; fi echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6 -echo "configure:8256: checking for layout_object_getvalue in -li18n" >&5 +echo "configure:8262: checking for layout_object_getvalue in -li18n" >&5 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'` xe_check_libs=" -li18n " cat > conftest.$ac_ext <<EOF -#line 8261 "configure" +#line 8267 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8268,7 +8274,7 @@ layout_object_getvalue() ; return 0; } EOF -if { (eval echo configure:8272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8354,10 +8360,10 @@ for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8358: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8361 "configure" +echo "configure:8364: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8367 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8380,7 +8386,7 @@ ; return 0; } EOF -if { (eval echo configure:8384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8417,10 +8423,10 @@ for ac_func in realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8421: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8424 "configure" +echo "configure:8427: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8430 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8443,7 +8449,7 @@ ; return 0; } EOF -if { (eval echo configure:8447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8476,16 +8482,16 @@ esac echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:8480: checking whether netdb declares h_errno" >&5 -cat > conftest.$ac_ext <<EOF -#line 8482 "configure" +echo "configure:8486: checking whether netdb declares h_errno" >&5 +cat > conftest.$ac_ext <<EOF +#line 8488 "configure" #include "confdefs.h" #include <netdb.h> int main() { return h_errno; ; return 0; } EOF -if { (eval echo configure:8489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -8505,16 +8511,16 @@ rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:8509: checking for sigsetjmp" >&5 -cat > conftest.$ac_ext <<EOF -#line 8511 "configure" +echo "configure:8515: checking for sigsetjmp" >&5 +cat > conftest.$ac_ext <<EOF +#line 8517 "configure" #include "confdefs.h" #include <setjmp.h> int main() { sigjmp_buf bar; sigsetjmp (bar, 0); ; return 0; } EOF -if { (eval echo configure:8518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8524: \"$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 @@ -8534,11 +8540,11 @@ rm -f conftest* echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:8538: checking whether localtime caches TZ" >&5 +echo "configure:8544: checking whether localtime caches TZ" >&5 if test "$ac_cv_func_tzset" = "yes"; then cat > conftest.$ac_ext <<EOF -#line 8542 "configure" +#line 8548 "configure" #include "confdefs.h" #include <time.h> #if STDC_HEADERS @@ -8573,10 +8579,11 @@ exit (0); } EOF -if { (eval echo configure:8577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then emacs_cv_localtime_cache=no else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -8602,9 +8609,9 @@ if test "$HAVE_TIMEVAL" = "yes"; then echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6 -echo "configure:8606: checking whether gettimeofday accepts one or two arguments" >&5 -cat > conftest.$ac_ext <<EOF -#line 8608 "configure" +echo "configure:8613: checking whether gettimeofday accepts one or two arguments" >&5 +cat > conftest.$ac_ext <<EOF +#line 8615 "configure" #include "confdefs.h" #ifdef TIME_WITH_SYS_TIME @@ -8626,7 +8633,7 @@ ; return 0; } EOF -if { (eval echo configure:8630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""two" 1>&6 else @@ -8648,19 +8655,19 @@ echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:8652: checking for inline" >&5 +echo "configure:8659: checking for inline" >&5 ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 8657 "configure" +#line 8664 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:8664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -8710,17 +8717,17 @@ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:8714: checking for working alloca.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8717 "configure" +echo "configure:8721: checking for working alloca.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8724 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:8724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -8744,10 +8751,10 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:8748: checking for alloca" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8751 "configure" +echo "configure:8755: checking for alloca" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8758 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -8770,7 +8777,7 @@ char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:8774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -8809,10 +8816,10 @@ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:8813: checking whether alloca needs Cray hooks" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8816 "configure" +echo "configure:8820: checking whether alloca needs Cray hooks" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8823 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -8836,10 +8843,10 @@ if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8840: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8843 "configure" +echo "configure:8847: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8850 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -8862,7 +8869,7 @@ ; return 0; } EOF -if { (eval echo configure:8866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8892,10 +8899,10 @@ fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:8896: checking stack direction for C alloca" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8899 "configure" +echo "configure:8903: checking stack direction for C alloca" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8906 "configure" #include "confdefs.h" find_stack_direction () { @@ -8914,10 +8921,11 @@ exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:8918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:8925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_stack_direction=1 else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -8942,15 +8950,15 @@ ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:8946: checking for vfork.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8949 "configure" +echo "configure:8954: checking for vfork.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8957 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -8978,10 +8986,10 @@ fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:8982: checking for working vfork" >&5 - -cat > conftest.$ac_ext <<EOF -#line 8985 "configure" +echo "configure:8990: checking for working vfork" >&5 + +cat > conftest.$ac_ext <<EOF +#line 8993 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -9076,10 +9084,11 @@ } } EOF -if { (eval echo configure:9080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:9088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_vfork_works=yes else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -9101,10 +9110,10 @@ echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:9105: checking for working strcoll" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9108 "configure" +echo "configure:9114: checking for working strcoll" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9117 "configure" #include "confdefs.h" #include <string.h> main () @@ -9114,10 +9123,11 @@ strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:9118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:9127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_strcoll_works=yes else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -9141,10 +9151,10 @@ for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9145: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9148 "configure" +echo "configure:9155: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9158 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -9167,7 +9177,7 @@ ; return 0; } EOF -if { (eval echo configure:9171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9195,10 +9205,10 @@ done echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:9199: checking whether getpgrp takes no argument" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9202 "configure" +echo "configure:9209: checking whether getpgrp takes no argument" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9212 "configure" #include "confdefs.h" /* @@ -9253,10 +9263,11 @@ } EOF -if { (eval echo configure:9257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:9267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_getpgrp_void=yes else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -9279,10 +9290,10 @@ echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:9283: checking for working mmap" >&5 +echo "configure:9294: checking for working mmap" >&5 case "$opsys" in ultrix* ) have_mmap=no ;; *) cat > conftest.$ac_ext <<EOF -#line 9286 "configure" +#line 9297 "configure" #include "confdefs.h" #include <stdio.h> #include <unistd.h> @@ -9315,10 +9326,11 @@ return 1; } EOF -if { (eval echo configure:9319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:9330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then have_mmap=yes else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -9335,6 +9347,271 @@ EOF } +for ac_hdr in unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:9355: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9358 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:9363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + { test "$extra_verbose" = "yes" && cat << EOF + Defining $ac_tr_hdr +EOF +cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF +} + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in getpagesize +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:9395: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9398 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:9421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + { test "$extra_verbose" = "yes" && cat << EOF + Defining $ac_tr_func +EOF +cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF +} + +else + echo "$ac_t""no" 1>&6 +fi +done + +echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +echo "configure:9449: checking for working mmap" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9452 "configure" +#include "confdefs.h" + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the filesystem buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propogated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ +#include <sys/types.h> +#include <fcntl.h> +#include <sys/mman.h> + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include <unistd.h> +# endif + +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +#ifdef __cplusplus +extern "C" { void *malloc(unsigned); } +#else +char *malloc(); +#endif + +int +main() +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + data2 = malloc(2 * pagesize); + if (!data2) + exit(1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + /* + * Finally, make sure that changes to the mapped area + * do not percolate back to the file as seen by read(). + * (This is a bug on some variants of i386 svr4.0.) + */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = malloc(pagesize); + if (!data3) + exit(1); + if (read(fd, data3, pagesize) != pagesize) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit(1); + close(fd); + unlink("conftestmmap"); + exit(0); +} + +EOF +if { (eval echo configure:9592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +then + ac_cv_func_mmap_fixed_mapped=yes +else + conftest_rc="$?" + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_mmap_fixed_mapped=no +fi +rm -fr conftest* + +echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_MMAP +EOF +cat >> confdefs.h <<\EOF +#define HAVE_MMAP 1 +EOF +} + +fi + test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no test "$rel_alloc" = "default" -a "$have_mmap" = "yes" && rel_alloc=yes @@ -9349,15 +9626,15 @@ ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:9353: checking for termios.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9356 "configure" +echo "configure:9630: checking for termios.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9633 "configure" #include "confdefs.h" #include <termios.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9400,15 +9677,15 @@ echo "$ac_t""no" 1>&6 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termio.h""... $ac_c" 1>&6 -echo "configure:9404: checking for termio.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9407 "configure" +echo "configure:9681: checking for termio.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9684 "configure" #include "confdefs.h" #include <termio.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9440,10 +9717,10 @@ echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:9444: checking for socket" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9447 "configure" +echo "configure:9721: checking for socket" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9724 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char socket(); below. */ @@ -9466,7 +9743,7 @@ ; return 0; } EOF -if { (eval echo configure:9470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -9481,15 +9758,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6 -echo "configure:9485: checking for netinet/in.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9488 "configure" +echo "configure:9762: checking for netinet/in.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9765 "configure" #include "confdefs.h" #include <netinet/in.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9506,15 +9783,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6 -echo "configure:9510: checking for arpa/inet.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9513 "configure" +echo "configure:9787: checking for arpa/inet.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9790 "configure" #include "confdefs.h" #include <arpa/inet.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9539,9 +9816,9 @@ } echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:9543: checking "for sun_len member in struct sockaddr_un"" >&5 +echo "configure:9820: checking "for sun_len member in struct sockaddr_un"" >&5 cat > conftest.$ac_ext <<EOF -#line 9545 "configure" +#line 9822 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9552,7 +9829,7 @@ static struct sockaddr_un x; x.sun_len = 1; ; return 0; } EOF -if { (eval echo configure:9556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SOCKADDR_SUN_LEN @@ -9570,9 +9847,9 @@ fi rm -f conftest* echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 -echo "configure:9574: checking "for ip_mreq struct in netinet/in.h"" >&5 +echo "configure:9851: checking "for ip_mreq struct in netinet/in.h"" >&5 cat > conftest.$ac_ext <<EOF -#line 9576 "configure" +#line 9853 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9582,7 +9859,7 @@ static struct ip_mreq x; ; return 0; } EOF -if { (eval echo configure:9586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MULTICAST @@ -9613,10 +9890,10 @@ echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:9617: checking for msgget" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9620 "configure" +echo "configure:9894: checking for msgget" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9897 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char msgget(); below. */ @@ -9639,7 +9916,7 @@ ; return 0; } EOF -if { (eval echo configure:9643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_msgget=yes" else @@ -9654,15 +9931,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6 -echo "configure:9658: checking for sys/ipc.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9661 "configure" +echo "configure:9935: checking for sys/ipc.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9938 "configure" #include "confdefs.h" #include <sys/ipc.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9679,15 +9956,15 @@ echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6 -echo "configure:9683: checking for sys/msg.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9686 "configure" +echo "configure:9960: checking for sys/msg.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 9963 "configure" #include "confdefs.h" #include <sys/msg.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9725,15 +10002,15 @@ ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:9729: checking for dirent.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9732 "configure" +echo "configure:10006: checking for dirent.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10009 "configure" #include "confdefs.h" #include <dirent.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9760,15 +10037,15 @@ echo "$ac_t""no" 1>&6 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6 -echo "configure:9764: checking for sys/dir.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9767 "configure" +echo "configure:10041: checking for sys/dir.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10044 "configure" #include "confdefs.h" #include <sys/dir.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9801,15 +10078,15 @@ ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:9805: checking for nlist.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9808 "configure" +echo "configure:10082: checking for nlist.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10085 "configure" #include "confdefs.h" #include <nlist.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9839,7 +10116,7 @@ echo "checking "for sound support"" 1>&6 -echo "configure:9843: checking "for sound support"" >&5 +echo "configure:10120: checking "for sound support"" >&5 case "$with_sound" in native | both ) with_native_sound=yes;; nas | no ) with_native_sound=no;; @@ -9850,15 +10127,15 @@ if test -n "$native_sound_lib"; then ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6 -echo "configure:9854: checking for multimedia/audio_device.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 9857 "configure" +echo "configure:10131: checking for multimedia/audio_device.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10134 "configure" #include "confdefs.h" #include <multimedia/audio_device.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -9906,12 +10183,12 @@ if test -z "$native_sound_lib"; then echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:9910: checking for ALopenport in -laudio" >&5 +echo "configure:10187: checking for ALopenport in -laudio" >&5 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <<EOF -#line 9915 "configure" +#line 10192 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9922,7 +10199,7 @@ ALopenport() ; return 0; } EOF -if { (eval echo configure:9926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9953,12 +10230,12 @@ if test -z "$native_sound_lib"; then echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:9957: checking for AOpenAudio in -lAlib" >&5 +echo "configure:10234: checking for AOpenAudio in -lAlib" >&5 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'` xe_check_libs=" -lAlib " cat > conftest.$ac_ext <<EOF -#line 9962 "configure" +#line 10239 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9969,7 +10246,7 @@ AOpenAudio() ; return 0; } EOF -if { (eval echo configure:9973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10007,15 +10284,15 @@ for dir in "machine" "sys" "linux"; do ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6 -echo "configure:10011: checking for ${dir}/soundcard.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10014 "configure" +echo "configure:10288: checking for ${dir}/soundcard.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10291 "configure" #include "confdefs.h" #include <${dir}/soundcard.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10085,7 +10362,7 @@ fi libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi cat > conftest.$ac_ext <<EOF -#line 10089 "configure" +#line 10366 "configure" #include "confdefs.h" #include <audio/Xtutil.h> EOF @@ -10112,7 +10389,7 @@ if test "$with_tty" = "yes" ; then echo "checking for TTY-related features" 1>&6 -echo "configure:10116: checking for TTY-related features" >&5 +echo "configure:10393: checking for TTY-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_TTY EOF @@ -10128,12 +10405,12 @@ if test -z "$with_ncurses"; then echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:10132: checking for tgetent in -lncurses" >&5 +echo "configure:10409: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lncurses " cat > conftest.$ac_ext <<EOF -#line 10137 "configure" +#line 10414 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10144,7 +10421,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:10148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10177,15 +10454,15 @@ ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:10181: checking for ncurses/curses.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10184 "configure" +echo "configure:10458: checking for ncurses/curses.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10461 "configure" #include "confdefs.h" #include <ncurses/curses.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10207,15 +10484,15 @@ ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6 -echo "configure:10211: checking for ncurses/term.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10214 "configure" +echo "configure:10488: checking for ncurses/term.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10491 "configure" #include "confdefs.h" #include <ncurses/term.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10245,15 +10522,15 @@ c_switch_site="$c_switch_site -I/usr/include/ncurses" ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:10249: checking for ncurses/curses.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10252 "configure" +echo "configure:10526: checking for ncurses/curses.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10529 "configure" #include "confdefs.h" #include <ncurses/curses.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10288,12 +10565,12 @@ for lib in curses termlib termcap; do echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:10292: checking for tgetent in -l$lib" >&5 +echo "configure:10569: checking for tgetent in -l$lib" >&5 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -l$lib " cat > conftest.$ac_ext <<EOF -#line 10297 "configure" +#line 10574 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10304,7 +10581,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:10308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10335,12 +10612,12 @@ else echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:10339: checking for tgetent in -lcurses" >&5 +echo "configure:10616: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lcurses " cat > conftest.$ac_ext <<EOF -#line 10344 "configure" +#line 10621 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10351,7 +10628,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:10355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10369,12 +10646,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:10373: checking for tgetent in -ltermcap" >&5 +echo "configure:10650: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -ltermcap " cat > conftest.$ac_ext <<EOF -#line 10378 "configure" +#line 10655 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10385,7 +10662,7 @@ tgetent() ; return 0; } EOF -if { (eval echo configure:10389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10433,15 +10710,15 @@ test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gpm.h""... $ac_c" 1>&6 -echo "configure:10437: checking for gpm.h" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10440 "configure" +echo "configure:10714: checking for gpm.h" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10717 "configure" #include "confdefs.h" #include <gpm.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10464,12 +10741,12 @@ } test -z "$with_gpm" && { echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:10468: checking for Gpm_Open in -lgpm" >&5 +echo "configure:10745: checking for Gpm_Open in -lgpm" >&5 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgpm " cat > conftest.$ac_ext <<EOF -#line 10473 "configure" +#line 10750 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10480,7 +10757,7 @@ Gpm_Open() ; return 0; } EOF -if { (eval echo configure:10484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10529,22 +10806,22 @@ echo "checking for database support" 1>&6 -echo "configure:10533: checking for database support" >&5 +echo "configure:10810: checking for database support" >&5 if test "$with_database_gnudbm" != "no"; then for ac_hdr in ndbm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10540: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10543 "configure" +echo "configure:10817: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10820 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -10576,12 +10853,12 @@ if test "$have_ndbm_h" = "yes"; then echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:10580: checking for dbm_open in -lgdbm" >&5 +echo "configure:10857: checking for dbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdbm " cat > conftest.$ac_ext <<EOF -#line 10585 "configure" +#line 10862 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10592,7 +10869,7 @@ dbm_open() ; return 0; } EOF -if { (eval echo configure:10596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10615,10 +10892,10 @@ fi if test "$with_database_gnudbm" != "yes"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:10619: checking for dbm_open" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10622 "configure" +echo "configure:10896: checking for dbm_open" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10899 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dbm_open(); below. */ @@ -10641,7 +10918,7 @@ ; return 0; } EOF -if { (eval echo configure:10645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -10677,10 +10954,10 @@ if test "$with_database_dbm" != "no"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:10681: checking for dbm_open" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10684 "configure" +echo "configure:10958: checking for dbm_open" >&5 + +cat > conftest.$ac_ext <<EOF +#line 10961 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dbm_open(); below. */ @@ -10703,7 +10980,7 @@ ; return 0; } EOF -if { (eval echo configure:10707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -10724,12 +11001,12 @@ if test "$need_libdbm" != "no"; then echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:10728: checking for dbm_open in -ldbm" >&5 +echo "configure:11005: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -ldbm " cat > conftest.$ac_ext <<EOF -#line 10733 "configure" +#line 11010 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10740,7 +11017,7 @@ dbm_open() ; return 0; } EOF -if { (eval echo configure:10744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10777,10 +11054,10 @@ if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6 -echo "configure:10781: checking for Berkeley db.h" >&5 +echo "configure:11058: checking for Berkeley db.h" >&5 for path in "db/db.h" "db.h"; do cat > conftest.$ac_ext <<EOF -#line 10784 "configure" +#line 11061 "configure" #include "confdefs.h" #ifdef HAVE_INTTYPES_H #define __BIT_TYPES_DEFINED__ @@ -10798,7 +11075,7 @@ ; return 0; } EOF -if { (eval echo configure:10802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_path="$path"; break else @@ -10807,16 +11084,16 @@ fi rm -f conftest* done - if test -z "$db_h_path" + if test -z "$db_h_path" then echo "$ac_t""no" 1>&6; with_database_berkdb=no else echo "$ac_t""$db_h_path" 1>&6 fi if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6 -echo "configure:10818: checking for Berkeley DB version" >&5 +echo "configure:11095: checking for Berkeley DB version" >&5 cat > conftest.$ac_ext <<EOF -#line 10820 "configure" +#line 11097 "configure" #include "confdefs.h" #include <$db_h_path> #if DB_VERSION_MAJOR > 1 @@ -10835,10 +11112,10 @@ rm -f conftest* echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6 -echo "configure:10839: checking for $dbfunc" >&5 - -cat > conftest.$ac_ext <<EOF -#line 10842 "configure" +echo "configure:11116: checking for $dbfunc" >&5 + +cat > conftest.$ac_ext <<EOF +#line 11119 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $dbfunc(); below. */ @@ -10861,7 +11138,7 @@ ; return 0; } EOF -if { (eval echo configure:10865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$dbfunc=yes" else @@ -10880,12 +11157,12 @@ echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6 -echo "configure:10884: checking for $dbfunc in -ldb" >&5 +echo "configure:11161: checking for $dbfunc in -ldb" >&5 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'` xe_check_libs=" -ldb " cat > conftest.$ac_ext <<EOF -#line 10889 "configure" +#line 11166 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10896,7 +11173,7 @@ $dbfunc() ; return 0; } EOF -if { (eval echo configure:10900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10960,12 +11237,12 @@ if test "$with_socks" = "yes"; then echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:10964: checking for SOCKSinit in -lsocks" >&5 +echo "configure:11241: checking for SOCKSinit in -lsocks" >&5 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocks " cat > conftest.$ac_ext <<EOF -#line 10969 "configure" +#line 11246 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -10976,7 +11253,7 @@ SOCKSinit() ; return 0; } EOF -if { (eval echo configure:10980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11033,15 +11310,15 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11037: checking for $ac_hdr" >&5 - -cat > conftest.$ac_ext <<EOF -#line 11040 "configure" +echo "configure:11314: checking for $ac_hdr" >&5 + +cat > conftest.$ac_ext <<EOF +#line 11317 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -11072,12 +11349,12 @@ test -z "$with_shlib" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:11076: checking for dlopen in -ldl" >&5 +echo "configure:11353: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -ldl " cat > conftest.$ac_ext <<EOF -#line 11081 "configure" +#line 11358 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -11088,7 +11365,7 @@ dlopen() ; return 0; } EOF -if { (eval echo configure:11092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11117,12 +11394,12 @@ } test -z "$with_shlib" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6 -echo "configure:11121: checking for _dlopen in -lc" >&5 +echo "configure:11398: checking for _dlopen in -lc" >&5 ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <<EOF -#line 11126 "configure" +#line 11403 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -11133,7 +11410,7 @@ _dlopen() ; return 0; } EOF -if { (eval echo configure:11137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11162,12 +11439,12 @@ } test -z "$with_shlib" && test ! -z "$have_dlfcn" && { echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 -echo "configure:11166: checking for dlopen in -lc" >&5 +echo "configure:11443: checking for dlopen in -lc" >&5 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <<EOF -#line 11171 "configure" +#line 11448 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -11178,7 +11455,7 @@ dlopen() ; return 0; } EOF -if { (eval echo configure:11182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11207,12 +11484,12 @@ } test -z "$with_shlib" && { echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:11211: checking for shl_load in -ldld" >&5 +echo "configure:11488: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <<EOF -#line 11216 "configure" +#line 11493 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -11223,7 +11500,7 @@ shl_load() ; return 0; } EOF -if { (eval echo configure:11227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11252,12 +11529,12 @@ } test -z "$with_shlib" && { echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:11256: checking for dld_init in -ldld" >&5 +echo "configure:11533: checking for dld_init in -ldld" >&5 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <<EOF -#line 11261 "configure" +#line 11538 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -11268,7 +11545,7 @@ dld_init() ; return 0; } EOF -if { (eval echo configure:11272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11318,7 +11595,7 @@ dll_oflags="-o " echo $ac_n "checking how to build a shared library""... $ac_c" 1>&6 -echo "configure:11322: checking how to build a shared library" >&5 +echo "configure:11599: checking how to build a shared library" >&5 case `uname -rs` in UNIX_SV*|UNIX_System_V*) dll_lflags="-G" @@ -11409,10 +11686,10 @@ for ac_func in dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11413: checking for $ac_func" >&5 - -cat > conftest.$ac_ext <<EOF -#line 11416 "configure" +echo "configure:11690: checking for $ac_func" >&5 + +cat > conftest.$ac_ext <<EOF +#line 11693 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -11435,7 +11712,7 @@ ; return 0; } EOF -if { (eval echo configure:11439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11471,14 +11748,15 @@ fi cat > conftest.$ac_ext <<EOF -#line 11475 "configure" +#line 11752 "configure" #include "confdefs.h" int main(int c,char *v[]){return 0;} EOF -if { (eval echo configure:11479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5 +if { (eval echo configure:11756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else + conftest_rc="$?" echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* @@ -11615,7 +11893,7 @@ echo "source $srcdir/src/gdbinit" > src/gdbinit fi -if test "$__sunpro_c" = "yes"; then +if test "$__SUNPRO_C" = "yes"; then echo "creating .sbinit"; echo "" ( echo "# For use with Sun WorkShop's Source browser." echo "# See sbquery(1) and sbinit(4) for more information" @@ -12035,15 +12313,31 @@ elif test "$with_x11" = yes; then echo " --------------------------------------------------------------------" echo " WARNING: Compiling without XPM support." - echo " WARNING: You should strongly considering installing XPM." + if test "$xpm_problem" != ""; then + echo " Reason: $xpm_problem" + fi + echo " WARNING: You should strongly consider installing XPM." echo " WARNING: Otherwise toolbars and other graphics will look suboptimal." + echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)" echo " --------------------------------------------------------------------" fi +if test "$with_png" = yes; then + echo " Compiling in support for PNG image handling." +elif test "$window_system" != "none"; then + echo " --------------------------------------------------------------------" + echo " WARNING: Compiling without PNG image support." + if test "$png_problem" != ""; then + echo " Reason: $png_problem" + fi + echo " WARNING: You should strongly consider installing the PNG libraries." + echo " WARNING: Otherwise certain images and glyphs may not display." + echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)" + echo " --------------------------------------------------------------------" +fi +test "$with_gif" = yes && echo " Compiling in support for (builtin) GIF image handling." +test "$with_jpeg" = yes && echo " Compiling in support for JPEG image handling." +test "$with_tiff" = yes && echo " Compiling in support for TIFF image handling." test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." -test "$with_gif" = yes && echo " Compiling in support for GIF image conversion." -test "$with_jpeg" = yes && echo " Compiling in support for JPEG image conversion." -test "$with_png" = yes && echo " Compiling in support for PNG image conversion." -test "$with_tiff" = yes && echo " Compiling in support for TIFF image conversion." case "$with_sound" in nas ) echo " Compiling in network sound (NAS) support." ;; native ) echo " Compiling in native sound support." ;;
--- a/configure.in Mon Aug 13 11:03:09 2007 +0200 +++ b/configure.in Mon Aug 13 11:04:06 2007 +0200 @@ -79,11 +79,12 @@ #include "confdefs.h" [$1] EOF -if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit) 2>&AC_FD_CC +if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit $?) 2>&AC_FD_CC then dnl Do not remove the temporary files here, so they can be examined. ifelse([$2], , :, [$2]) else + conftest_rc="$?" echo "configure: failed program was:" >&AC_FD_CC cat conftest.$ac_ext >&AC_FD_CC ifelse([$3], , , [ rm -fr conftest* @@ -1019,7 +1020,7 @@ dnl Straightforward machine determination case "$canonical" in sparc-*-* ) machine=sparc ;; - alpha-*-* ) machine=alpha ;; + alpha*-*-* ) machine=alpha ;; vax-*-* ) machine=vax ;; mips-dec-* ) machine=pmax ;; mips-sgi-* ) machine=iris4d ;; @@ -1058,9 +1059,9 @@ *-*-aix3.1* ) opsys=aix3-1 ;; *-*-aix3.2.5 ) opsys=aix3-2-5 ;; *-*-aix3* ) opsys=aix3-2 ;; - *-*-aix4.2* ) opsys=aix4-2 ;; + *-*-aix4.0* ) opsys=aix4 ;; *-*-aix4.1* ) opsys=aix4-1 ;; - *-*-aix4* ) opsys=aix4 ;; + *-*-aix4* ) opsys=aix4-2 ;; dnl Other generic OSes *-gnu* ) opsys=gnu ;; @@ -1594,13 +1595,24 @@ dnl Well. then why not fix fucking pop? test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE) -AC_MSG_CHECKING(whether we are using SunPro C) -AC_TRY_COMPILE([],[#ifndef __SUNPRO_C -#error Not a SunPro compiler :-( -******* ======= ******** &&&&&&&& + +dnl Identify compilers to enable compiler-specific hacks. +dnl Add support for other compilers HERE! +dnl GCC is already identified elsewhere. +AC_TRY_RUN([int main () { +#if defined __SUNPRO_C +return 11; +#elif defined __DECC +return 12; +#else +return 0; #endif -], __sunpro_c=yes, __sunpro_c=no) -AC_MSG_RESULT($__sunpro_c) +}], [], +[case "$conftest_rc" in + 11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;; + 12) echo "You appear to be using the DEC C compiler." ; __DECC=yes ;; +esac]) + dnl case "$canonical" in dnl *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;; @@ -1726,6 +1738,10 @@ 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 Calculalate value of CFLAGS: dnl Use either command line flag, environment var, or autodetection if test "$cflags_specified" = "no"; then @@ -1739,15 +1755,17 @@ dnl cygwin can't cope with -O3 test "$opsys $machine" = "cygwin32 intel386" && \ CFLAGS="-g -O2 -Wall -Wno-switch" - elif test "$__sunpro_c" = "yes"; then + elif test "$__SUNPRO_C" = "yes"; then case "$opsys" in sol2 ) CFLAGS="-v -xO4" ;; sunos4* ) CFLAGS="-xO2";; esac + elif test "$__DECC" = "yes"; then + CFLAGS="-O3" elif test "$CC" = "xlc"; then - CFLAGS="-O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000" + CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000" + dnl ### Add optimal CFLAGS support for other compilers HERE! else - dnl ### Add tests for other compilers here... CFLAGS="-O" ;dnl The only POSIX-approved flag fi fi @@ -1889,7 +1907,7 @@ if test "$dynamic" = "no"; then add_runtime_path=no elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes else case "$opsys" in - sol2 | irix* | *bsd* ) add_runtime_path=yes ;; + sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;; * ) add_runtime_path=no ;; esac fi @@ -1898,14 +1916,19 @@ dnl Try to autodetect runtime library flag (usually -R), dnl and whether it works (or at least does no harm) AC_MSG_CHECKING("for runtime libraries flag") - dash_r="" - for try_dash_r in "-R" "-R " "-rpath "; do - xe_check_libs="${try_dash_r}/no/such/file-or-directory" - XE_PROTECT_LINKER_FLAGS(xe_check_libs) - AC_TRY_LINK(, , dash_r="$try_dash_r") - xe_check_libs="" - test -n "$dash_r" && break - done + case "$opsys" in + sol2 ) dash_r = "-R" ;; + decosf* | linux* ) dash_r = "-rpath " ;; + *) + dash_r="" + for try_dash_r in "-R" "-R " "-rpath "; do + xe_check_libs="${try_dash_r}/no/such/file-or-directory" + XE_PROTECT_LINKER_FLAGS(xe_check_libs) + AC_TRY_LINK(, , dash_r="$try_dash_r") + xe_check_libs="" + test -n "$dash_r" && break + done ;; + esac if test -n "$dash_r"; then AC_MSG_RESULT("\"${dash_r}\"") else AC_MSG_RESULT(NONE) @@ -2058,7 +2081,7 @@ dnl checks for header files AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) -AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h) +AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h cygwin32/version.h) AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h) AC_HEADER_SYS_WAIT AC_HEADER_STDC @@ -2281,6 +2304,9 @@ fi done + dnl Avoid version mismatch for shared library libXm.so on osf4 + if test "$GCC" = yes -a -d /usr/shlib; then XE_APPEND(-L/usr/shlib, X_LIBS); fi + ld_switch_x_site="$X_LIBS" XE_COMPUTE_RUNPATH() @@ -2651,6 +2677,7 @@ AC_CHECKING(for graphics libraries) dnl Autodetect Xpm + xpm_problem="" if test -z "$with_xpm"; then AC_MSG_CHECKING(for Xpm - no older than 3.4f) xe_check_libs=-lXpm @@ -2660,22 +2687,22 @@ XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;}], [./conftest dummy_arg; xpm_status=$?; - if test "$?" = "0"; then + if test "$xpm_status" = "0"; then with_xpm=yes; else with_xpm=no; - if test "$?" = "1"; then + if test "$xpm_status" = "1"; then xpm_problem="Xpm library version and header file version don't match!" - elif test "$?" = "2"; then + elif test "$xpm_status" = "2"; then xpm_problem="Xpm library version is too old!" else xpm_problem="Internal xpm detection logic error!" fi echo " -*** WARNING *** $problem +*** WARNING *** $xpm_problem I'm not touching that with a 10-foot pole! If you really want to use the installed version of Xpm, rerun - configure --with-xpm=yes, but don't blame me if XEmacs crashes!" + configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!" fi], [with_xpm=no]) xe_check_libs= @@ -2696,6 +2723,15 @@ fi fi + dnl For a brief period we had the GIF code split out into a separate library, + dnl but patent problems, etc. sort of squashed that idea. + dnl We default to building with builtin GIF decoding + if test "$with_gif" != "no"; then + with_gif="yes" + AC_DEFINE(HAVE_GIF) + XE_ADD_OBJS(dgif_lib.o gif_io.o) + fi + dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime dnl So we always search for libz compression support. if test "$with_png $with_tiff" != "no no"; then @@ -2704,16 +2740,6 @@ AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])]) fi - dnl Autodetect GIFlib - AC_MSG_CHECKING(for gifreader) - test -z "$with_gif" && { AC_CHECK_HEADER(gifrlib.h, ,with_gif=no) } - test -z "$with_gif" && { AC_CHECK_LIB(gifreader, GetGifError,[:] ,with_gif=no) } - test -z "$with_gif" && with_gif=yes - if test "$with_gif" = "yes"; then - AC_DEFINE(HAVE_GIF) - XE_PREPEND(-lgifreader, libs_x) - fi - dnl autodetect JPEG test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) } test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) } @@ -2724,18 +2750,38 @@ fi dnl autodetect PNG + png_problem="" + test -z "$with_png" && { AC_CHECK_FUNC(pow, ,with_png=no) } + test -z "$with_png" && { AC_CHECK_HEADER(png.h, ,with_png=no) } + test -z "$with_png" && { AC_CHECK_LIB(png, png_read_image,[:],with_png=no) } if test -z "$with_png"; then - AC_MSG_CHECKING(for png.h - no older than 0.96) - AC_EGREP_CPP(yes, -[#include <png.h> -#if PNG_LIBPNG_VER >= 96 -yes -#endif -], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); with_png=no]) + AC_MSG_CHECKING(for workable png version information) + xe_check_libs="-lpng -lz" + AC_TRY_RUN([#include <png.h> + int main(int c, char **v) { + if (c == 1) return 0; + if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1; + return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}], + [./conftest dummy_arg; png_status=$?; + if test "$png_status" = "0"; then + with_png=yes; + else + with_png=no; + if test "$png_status" = "1"; then + png_problem="PNG library version and header file don't match!" + elif test "$png_status" = "2"; then + png_problem="PNG library version too old (pre 1.0.2)!" + fi + echo " +*** WARNING *** $png_problem + I'm not touching that with a 10-foot pole! + If you really want to use the installed version of libPNG, rerun + configure and add '--with-png=yes', but don't blame me if XEmacs crashes!" + fi], + [with_png=no]) + xe_check_libs= + AC_MSG_RESULT($with_png) fi - test -z "$with_png" && { AC_CHECK_FUNC(pow, ,with_png=no) } - test -z "$with_png" && { AC_CHECK_LIB(png, png_read_image,[:],with_png=no) } - test -z "$with_png" && with_png=yes if test "$with_png" = "yes"; then AC_DEFINE(HAVE_PNG) XE_PREPEND(-lpng, libs_x) @@ -2752,7 +2798,7 @@ fi dnl ---------------------- -dnl Graphics libraries +dnl X-Specific Graphics libraries dnl ---------------------- if test "$with_x11" = "yes"; then @@ -3181,6 +3227,7 @@ esac AC_MSG_RESULT($have_mmap) test "$have_mmap" = "yes" && AC_DEFINE(HAVE_MMAP) +AC_FUNC_MMAP dnl rel_alloc requires either GNU malloc or system malloc with mmap dnl We only turn rel_alloc on by default if mmap is available. @@ -3467,7 +3514,7 @@ #include <$path> ],[], db_h_path="$path"; break) done - if test -z "$db_h_path" + if test -z "$db_h_path" then AC_MSG_RESULT(no); with_database_berkdb=no else AC_MSG_RESULT($db_h_path) fi @@ -3623,7 +3670,7 @@ fi dnl Create top level .sbinit for Sun compilers -if test "$__sunpro_c" = "yes"; then +if test "$__SUNPRO_C" = "yes"; then echo "creating .sbinit"; echo "" ( echo "# For use with Sun WorkShop's Source browser." echo "# See sbquery(1) and sbinit(4) for more information" @@ -3899,15 +3946,31 @@ elif test "$with_x11" = yes; then echo " --------------------------------------------------------------------" echo " WARNING: Compiling without XPM support." - echo " WARNING: You should strongly considering installing XPM." + if test "$xpm_problem" != ""; then + echo " Reason: $xpm_problem" + fi + echo " WARNING: You should strongly consider installing XPM." echo " WARNING: Otherwise toolbars and other graphics will look suboptimal." + echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)" echo " --------------------------------------------------------------------" fi +if test "$with_png" = yes; then + echo " Compiling in support for PNG image handling." +elif test "$window_system" != "none"; then + echo " --------------------------------------------------------------------" + echo " WARNING: Compiling without PNG image support." + if test "$png_problem" != ""; then + echo " Reason: $png_problem" + fi + echo " WARNING: You should strongly consider installing the PNG libraries." + echo " WARNING: Otherwise certain images and glyphs may not display." + echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)" + echo " --------------------------------------------------------------------" +fi +test "$with_gif" = yes && echo " Compiling in support for (builtin) GIF image handling." +test "$with_jpeg" = yes && echo " Compiling in support for JPEG image handling." +test "$with_tiff" = yes && echo " Compiling in support for TIFF image handling." test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." -test "$with_gif" = yes && echo " Compiling in support for GIF image conversion." -test "$with_jpeg" = yes && echo " Compiling in support for JPEG image conversion." -test "$with_png" = yes && echo " Compiling in support for PNG image conversion." -test "$with_tiff" = yes && echo " Compiling in support for TIFF image conversion." case "$with_sound" in nas ) echo " Compiling in network sound (NAS) support." ;; native ) echo " Compiling in native sound support." ;;
--- a/configure.usage Mon Aug 13 11:03:09 2007 +0200 +++ b/configure.usage Mon Aug 13 11:04:06 2007 +0200 @@ -97,9 +97,8 @@ --with-xface (*) Compile with support for X-Face mail header conversion. Requires the compface library. Get it from the XEmacs FTP site. ---with-gif (*) Compile with support for GIF image conversion. - Requires GifLib 3.1 or greater. 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.
--- a/etc/BETA Mon Aug 13 11:03:09 2007 +0200 +++ b/etc/BETA Mon Aug 13 11:04:06 2007 +0200 @@ -197,7 +197,7 @@ After you have verified that you have a functional editor, fire up your favorite mail program and send a build report to -xemacs-beta@xemacs.org. The build report should include +xemacs-build-reports@xemacs.org. The build report should include 1. Your hardware configuration (OS version, etc.)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/MYTHOLOGY Mon Aug 13 11:04:06 2007 +0200 @@ -0,0 +1,25 @@ +Reference: Robert W. Brockway, Myth from the Ice Age to Mickey Mouse + + A collective definition of myth composed of many theories might be + framed by the following paraphrase: + + Myths are stories, usually, about gods and other supernatural + beings. They are often stories of origins, how the world and + everything in it came to be in illo tempore. They are usually + strongly structured and their meaning is only discerned by + linguistic analysis. Sometimes they are public dreams which, like + private dreams, emerge from the unconscious mind. Indeed, they + often reveal the archetypes of the collective unconscious. They + are symbolic and metaphorical. They orient people to the + metaphysical dimension, explain the origins and nature of the + cosmos, validate social issues, and, on the psychological plane, + address themselves to the innermost depths of the psyche. Some of + them are explanatory, being prescientific attempts to interpret + the natural world. As such, they are usually functional and are + the science of primitive peoples. Often, they are enacted in + rituals. Religious myths are sacred histories, and distinguished + from the profane. But, being semiotic expressions, they are a + "disease of language." They are both individual and social in + scope, but they are first and foremost stories. + +
--- a/etc/NEWS Mon Aug 13 11:03:09 2007 +0200 +++ b/etc/NEWS Mon Aug 13 11:04:06 2007 +0200 @@ -32,8 +32,32 @@ * Changes in XEmacs 21.2 ======================== -None yet. + +*** You can now create an "indirect buffer", like in GNU Emacs. An +indirect buffer shares its text with another buffer ("base buffer"), +but has its own major mode, local variables, extents, and narrowing. +An indirect buffer has a name of its own, distinct from those of the +base buffer and all other buffers. An indirect buffer cannot itself +be visiting a file (though its base buffer can be). The base buffer +cannot itself be indirect. + +Use (make-indirect-buffer BASE-BUFFER NAME) to make an indirect buffer +named NAME whose base is BASE-BUFFER. If BASE-BUFFER is an indirect +buffer, its base buffer is used as the base for the new buffer. +You can make an indirect buffer current, or switch to it in a window, +just as you would a non-indirect buffer. + +The function `buffer-base-buffer', given an indirect buffer, returns +its base buffer. It returns nil when given an ordinary buffer (not +indirect). `buffer-indirect-children' returns a list of the indirect +children of a base buffer. + +#### The library `noutline' has versions of Outline mode and Outline +minor mode which let you display different parts of the outline in +different indirect buffers. + + * Changes in XEmacs 21.0 ========================
--- a/etc/TUTORIAL.de Mon Aug 13 11:03:09 2007 +0200 +++ b/etc/TUTORIAL.de Mon Aug 13 11:04:06 2007 +0200 @@ -110,7 +110,7 @@ Nun versuche ein weiteres C-f um in die nächste Zeile zu gelangen. Wenn Du Dich am Anfang oder Ende aus dem Bildschirm bewegst, schiebt -sich der Text ins Blickfeld. Diesen Vorgang nennt man rollen oder +sich der Text ins Blickfeld. Diesen Vorgang nennt man Rollen oder "scrolling". Er erlaubt Emacs den Textzeiger an die gewünschte Stelle zu bringen, ohne ihn aus dem Bildschirmfenster zu bewegen. @@ -148,9 +148,9 @@ für Satz weiterbewegen. Obwohl sich ihr Verhalten unterscheidet, erscheint es natürlich. -Die Stelle des Textzeigers im Text wird auch "Punkt" genannt. Der -Textzeiger auf dem Bildschirm zeigt an welchem Punkt im Text sich -dieser befindet. +Die Stelle des Textzeigers im Text wird auch Punkt oder "point" +genannt. Der Textzeiger auf dem Bildschirm zeigt an welchem Punkt im +Text sich dieser befindet. Hier ist eine Zusammenfassung der einfachen Befehle zur Bewegung des Textzeigers, inklusive der Befehle zur wort- und satzweisen Bewegung: @@ -187,7 +187,7 @@ Dann verwende C-v wiederholt um hierher zurück zu kommen. >> Versuche jetzt M-> um ans Ende der Übungen zu springen. - Benutzte M-v widerholt um hierher zurück zu gelangen. + Benutzte M-v wiederholt um hierher zurück zu gelangen. Du kannst den Textzeiger auch mit den Pfeil-Tasten bewegen, falls Deine Tastatur solche besitzt. Wir empfehlen das Erlernen von C-b, @@ -195,7 +195,7 @@ Tastaturen. Zweitens wirst Du herausfinden, wenn Du einige Übung mit Emacs bekommst, daß es schneller ist die CTRL-Tasten zu drücken als die Pfeil-Tasten (weil Du Deine Hände nicht aus dem normalen -Fingersatz bringen mußt). Drittens: Hast Du die Versendung der CTRL +Fingersatz bringen mußt). Drittens: Hast Du die Verwendung der CTRL Befehle erst zu Deiner Gewohnheit gemacht, wird es ein Leichtes weitere Bewegungs-Befehle zu erlernen. @@ -226,7 +226,7 @@ entsprechendes Argument geben. Verwendest Du das X Window System, so befindet sich wahrscheinlich ein -rechteckiger Balken, Scrollbar oder Rollbalken genannt, rechts neben +rechteckiger Balken, Rollbalken oder "scrollbar" genannt, rechts neben dem Emacs-Fenster. Du kannst den Text auch durch Manipulieren dieses Rollbalkens mit der Maus rollen. @@ -242,8 +242,8 @@ ------------------------------------------- An einem X-Terminal wirst Du es wahrscheinlich einfacher finden die -Tasten des Tastenfeldes zur Textzeiger Steuerung zu gebrauchen. Die -Links, Rechts, Auf und Ab Pfeil Tasten steuern in die erwartete +Tasten des Tastenfeldes zur Textzeiger-Steuerung zu gebrauchen. Die +Links, Rechts, Auf und Ab Pfeil-Tasten steuern in die erwartete Richtung; sie funktionieren exakt wie C-b, C-f, C-p und C-n, sind aber leichter zu tippen und zu merken. Du kannst auch C-Links und C-Rechts verwenden um wortweise zu springen. C-Auf und C-Ab bewegen den @@ -264,9 +264,9 @@ * WENN EMACS HÄNGT ------------------ -Wenn Emacs auf Deine Befehle nicht mehr reagiert, kannst Du den -Befehle risikolos mit C-g unterbrechen. Mit C-g kann man Befehle -abbrechen, die zu lange dauern. +Wenn Emacs auf Deine Befehle nicht mehr reagiert, kannst Du den Befehl +risikolos mit C-g unterbrechen. Mit C-g kann man Befehle abbrechen, +die zu lange dauern. Du kannst mit C-g auch ein numerisches Argument oder einen teilweise eingegebenen Befehl, den Du nicht mehr ausführen willst, verwerfen. @@ -367,7 +367,7 @@ >> Geh an den Anfang einer Zeile und tippe <Delete>. Dies fügt die Zeile an die vorhergehende an. ->> Tippe <Return> um den Newline-Zeichen wieder einzufügen. +>> Tippe <Return> um das Newline-Zeichen wieder einzufügen. Denke daran, daß die meisten Emacs-Befehle mittels eines Arguments wiederholt werden können; Ein Textzeichen wird mittels Argument @@ -393,12 +393,12 @@ CONTROL-Taste, aber das kümmert uns nicht). C-k und M-k verhalten sich zueinander wie C-e und M-e zu Zeilen und Sätzen. -Wenn Du mehr als ein Zeichen auf einmal löschst, speichert sie -Emacs, damit Du sie wieder abrufen kannst. Den gelöschten Text -zurückzuholen nennt man "yanking". Du kannst den gelöschten Text an -der selben oder an einer anderen Textstelle zurückholen. Der Text -kann mehrere Male zurückgeholt geholt werden um Mehrfachkopien -anzulegen. Der Zurückhol-Befehl ist C-y. +Wenn Du mehr als ein Zeichen auf einmal löschst, speichert sie Emacs, +damit Du sie wieder abrufen kannst. Den gelöschten Text zurückzuholen +nennt man "yanking". Du kannst den gelöschten Text an der selben oder +an einer anderen Textstelle zurückholen. Der Text kann mehrere Male +zurückgeholt werden um Mehrfachkopien anzulegen. Der Zurückhol-Befehl +ist C-y. Beachte daß der Unterschied zwischen Entfernen ("Killing") und Löschen ("Deleting") darin besteht, daß gelöschte Teile zurückgeholt werden @@ -442,8 +442,8 @@ zurückgeholten Text durch früher gelöschten Text ersetzten. Tippst Du M-y wieder und wieder, holst Du früher und früher Gelöschtes zurück. Hast Du den gewünschten Text erreicht, brauchst Du nichts weiter zu -tun um diesen zu behalten. Fahre mit mit Deiner Arbeit fort und laß -den zurückgeholten Text wo er ist. +tun um diesen zu behalten. Fahre mit Deiner Arbeit fort und laß den +zurückgeholten Text wo er ist. Verwendest Du M-y oft genug, kehrst Du an den Anfang zurück (der letzte Löschvorgang). @@ -505,9 +505,9 @@ Fehler waren. Nahe dem unteren Ende des Bildschirms siehst Du eine Zeile die mit -Bindestrichen beginnt und endet und den Text "Emacs: TUTORIAL" +Bindestrichen beginnt und endet und den Text "XEmacs: TUTORIAL.de" enthält. Dieser Teil des Bildschirms zeigt immer den Namen der -besuchten Datei. Zur Zeit besuchst Du eine Datei namens "TUTORIAL", +besuchten Datei. Zur Zeit besuchst Du eine Datei namens "TUTORIAL.de", welche Deine persönliche Kopie des Emacs Tutorials ist. Was immer für eine Datei Du findest, ihr Name wird immer an dieser Stelle erscheinen. @@ -560,7 +560,7 @@ sollte das System abstürzen. >> Tippe C-x C-s um Deine Kopie des tutorials zu sichern. - Dies sollte "Wrote ...TUTORIAL" am Fuß des Bildschirms ausgeben. + Dies sollte "Wrote ...TUTORIAL.de" am Fuß des Bildschirms ausgeben. ACHTUNG: Auf manchen Systemen wird C-x C-s den Bildschirm anhalten und Du wirst keine weitere Ausgabe von Emacs sehen. Dies bedeutet, daß @@ -592,7 +592,7 @@ <Return>. Dann füge etwas Text ein, bearbeite ihn und sichere die Datei "foo" mit C-x C-s. - Schließlich tippe C-x C-f TUTORIAL <Return> um zum Tutorial zurück + Schließlich tippe C-x C-f TUTORIAL.de <Return> um zum Tutorial zurück zu gelangen. Emacs hält den Text jeder Datei in einem Objekt namens "buffer". Das @@ -628,20 +628,20 @@ willst. >> Füge eine Text-Zeile ein, dann tippe C-x s. - Du wirst gefragt, ob Du den Buffer namens TUTORIAL speichern + Du wirst gefragt, ob Du den Buffer namens TUTORIAL.de speichern willst. * VERWENDUNG DES MENÜS ---------------------- -An einem X-Terminal wirst Du eine Menüleiste am oberen Ende des Emacs +An einem X-Terminal wirst Du eine Menüleiste am oberen Ende des Emacs- Fensters bemerken. Mit der Menüleiste kannst Du die allgemeinsten Emacs-Befehle, wie "Finde Datei" ("find file"), erreichen. Du wirst -dies anfänglich einfacher finden, da Du dir die notwendigen -Tastenkombinationen der Befehle nicht merken mußt. Bist Du einmal -mit Emacs vertraut, wird es ein Leichtes sein die Kommandos zu -benutzen, da jeder Menüeintrag, der einer Tastenkombination -entspricht, diese auch anzeigt. +dies anfänglich einfacher finden, da Du Dir die notwendigen Tasten- +kombinationen der Befehle nicht merken mußt. Bist Du einmal mit Emacs +vertraut, wird es ein Leichtes sein die Kommandos zu benutzen, da +jeder Menüeintrag, der einer Tastenkombination entspricht, diese auch +anzeigt. Beachte, daß es viele Menüeinträge ohne entsprechende Tastensequenz gibt. So listet z.B. das Buffers-Menü die verfügbaren Buffer in @@ -669,7 +669,7 @@ Verwende "Paste" im Edit-Menü um Text vom X Clipboard zurückzuholen. Die mittlere Maustaste wird häufig verwendet um sichtbare Objekte auf -dem Bildschirm auszuwählen. Wenn Du z.B. "Info" (die Online Emacs +dem Bildschirm auszuwählen. Wenn Du z.B. "Info" (die Emacs Online Dokumentation) mit C-h i oder über das Help-Menü aufrufst, kannst Du einer hervorgehobenen Verknüpfung durch Klicken der mittleren Maustaste folgen. Ganz ähnlich, wenn Du einen Dateinamen eingibst @@ -694,7 +694,7 @@ (eXtend) Befehl. Davon gibt es zwei Ausführungen: C-x Zeichenerweiterung eXtend. Gefolgt von einer - Tastaturkombination. + Tastenkombination. M-x Namenserweiterung eXtend. Gefolgt von einer ausgeschriebenen Befehlsbezeichnung. @@ -709,7 +709,7 @@ Mit C-z kann man Emacs vorübergehend verlassen -- so daß Du später zur gleichen Sitzung zurückkehren kannst. -Auf Systemen, die dies unterstützen sendet C-z Emacs "in den +Auf Systemen, die dies unterstützen, sendet C-z Emacs "in den Hintergrund"; man kehrt zur Shell zurück, ohne daß der Emacs-Prozeß beendet wird. In den gebräuchlichsten Shells kann man zu Emacs mit `fg' oder `%emacs' zurückkehren. @@ -725,7 +725,7 @@ E-mail-Programme, oder andere Erweiterungen, die das Aussetzen von Emacs nicht korrekt handhaben können, benutzt wird. Normalerweise ist es besser Emacs mit C-z auszusetzen statt ihn zu beenden, wenn -man das System nicht verlassen will,. +man das System nicht verlassen will. Es gibt viele C-x-Befehle. Hier ist eine Liste der bereits erlernten: @@ -753,7 +753,7 @@ Beachte wie diese Zeile sich veraendert hat: Du hast das Wort v-e-r-a-e-n-d-e-r-t mit "geaendert" ersetzt wo immer es nach der - anfänglichen Textzeiger Position auftrat. + anfänglichen Textzeiger-Position auftrat. * AUTOMATISCHE SICHERUNG @@ -764,14 +764,14 @@ gehen. Um Dich davor zu schützen, schreibt Emacs regelmäßig eine Autosave-Datei für jede Datei, die Du bearbeitest. Autosave-Dateien beginnen und enden mit "#"; wenn Deine Datei z.B. "hello.c" heißt, so -heißt die auto-save Datei "#hello.c#". Sicherst Du die Datei, so +heißt ihre auto-save Datei "#hello.c#". Sicherst Du die Datei, so löscht Emacs die entsprechende auto-save Datei. Nach einem Computerabsturz kannst Du die automatisch gesicherten Änderungen nach dem normalen Finden der Datei (Deiner Datei, nicht der Autosave-Datei) durch Eintippen von M-x -recover-file<return> zurückholen. Wenn Du nach der Bestätigung -gefragt wirst, tippst Du yes<return> um die Änderungen in der +recover-file<Return> zurückholen. Wenn Du nach der Bestätigung +gefragt wirst, tippst Du yes<Return> um die Änderungen in der Autosave-Datei wiederherzustellen. @@ -789,7 +789,7 @@ Die Zeile über der echo area wird "mode line" genannt. Die Moduszeile zeigt etwa folgendes: ---**-XEmacs: TUTORIAL (Fundamental)--L670--58%---------------- +--**-XEmacs: TUTORIAL.de (Fundamental)--L791--67%---------------- Diese Zeile gibt nützliche Information über den Zustand von Emacs und dem Text, den Du bearbeitest. @@ -817,7 +817,7 @@ "Fundamental" steht. Jeder Hauptmodus ändert das Verhalten einiger Befehle. So gibt es -z.B. Befehle zum Erstellen von Kommentaren in Programmen und da diese +z.B. Befehle zum Erstellen von Kommentaren in Programmen. Da diese in jeder Programmiersprache unterschiedlich aussehen, muß jeder Hauptmodus diese Kommentare entsprechend vorbereiten. Jeder Hauptmodus trägt den Namen eines entsprechenden Erweiterungsbefehls, so @@ -899,7 +899,7 @@ Wenn Du C-s tippt, wirst Du den String "I-search" in der echo area bemerken. Dies bedeutet, daß Emacs im inkrementellen Suchmodus auf -Deine Eingabe wartet. <RET> bricht die Suche ab. +Deine Eingabe wartet. <Return> bricht die Suche ab. >> Nun tippe C-s um die Suche einzuleiten. LANGSAM, Buchstabe für Buchstabe, tippe das Wort 'Textzeiger', mit Pausen dazwischen, @@ -909,7 +909,7 @@ zu suchen. >> Nun tippe <Delete> viermal und schau wie sich der Textzeiger bewegt. ->> Tippe <RET> zum Abbrechen der Suche. +>> Tippe <Return> zum Abbrechen der Suche. Hast Du gesehen was passiert? Emacs, in der inkrementellen Suche, versucht zu dem String zu springen, den Du bisher getippt hast. Um @@ -1054,7 +1054,7 @@ dies wirklich nicht tun, beschwere Dich also beim System Administrator. In der Zwischenzeit, wenn C-h keine Mitteilung bezüglich Hilfe am Fuß des Emacs-Fensters anzeigt, versuche M-x help -RET zu tippen.) +<Return> zu tippen.) Die einfachste Hilfe-Einrichtung ist C-h c. Tippe C-h, ein c und einen Befehls-Buchstaben oder eine Sequenz davon und Emacs gibt Dir @@ -1065,7 +1065,7 @@ C-p runs the command previous-line -Dies teils Dir den "Namen der Funktion" mit. Funktions-Namen werden +Dies teilt Dir den "Namen der Funktion" mit. Funktions-Namen werden hauptsächlich zum Spezialisieren und Erweitern von Emacs verwendet. Aber da die Funktions-Namen etwas darüber aussagen was der Befehl tut, können Sie auch als sehr kurze Dokumentation dienen -- genug um Dich @@ -1079,11 +1079,11 @@ >> Tippe C-h k C-p. -Dies zeigt die Dokumentation der Funktion, als auch ihren Namen, in -einem eigenen Emacs-Fenster. Wenn Du mit dem Lesen fertig bist, tippe -C-x 1 um den Hilfetext loszuwerden. Du mußt dies nicht gleich tun. -Du kannst etwas bearbeiten, das sich auf den Hilfetext bezieht und -dann C-x 1 tippen. +Dies zeigt sowohl die Dokumentation der Funktion, als auch ihren +Namen, in einem eigenen Emacs-Fenster. Wenn Du mit dem Lesen fertig +bist, tippe C-x 1 um den Hilfetext loszuwerden. Du mußt dies nicht +gleich tun. Du kannst etwas bearbeiten, das sich auf den Hilfetext +bezieht und dann C-x 1 tippen. Hier sind einige andere nützliche C-h Möglichkeiten: @@ -1120,7 +1120,7 @@ verwende C-z. (Unter X ikonifiziert dies den aktuellen Emacs-Rahmen.) Dieses Tutorial sollte für Anfänger verständlich sein, hast Du etwas -Unklares gefunden, schiebe die Schuld nicht auf Dich - beschwere Dich! +Unklares gefunden, schiebe die Schuld nicht auf Dich -- beschwere Dich! ANFERTIGEN VON KOPIEN
--- a/etc/check_cygwin_setup.sh Mon Aug 13 11:03:09 2007 +0200 +++ b/etc/check_cygwin_setup.sh Mon Aug 13 11:04:06 2007 +0200 @@ -23,17 +23,17 @@ OSversion="`uname -v | sed 's/^\(.\).*$/\1/'`" shell=`type sh | sed 's/sh is //'` -distdir=`dirname $shell` +distdir=`dirname $shell | sed 's!^//\(.\)/\(.*\)!\1:/\2!'` echo "cygwin installed in $distdir" echo "checking paths ..." if [ ! -d "/bin" ]; then - echo "You don't have /bin would like to mount cygwin as /bin ?" + echo "You don't have a /bin directory. Would you like to mount cygwin as /bin ?" if yorn; then mkdir /bin - mount -b /bin $distdir + mount -b $distdir /bin fi elif [ "$distdir" != "/bin" ]; then echo "Warning: you have /bin but it's not the cygwin installation."
--- a/etc/sample.emacs Mon Aug 13 11:03:09 2007 +0200 +++ b/etc/sample.emacs Mon Aug 13 11:04:06 2007 +0200 @@ -97,13 +97,14 @@ (setq ispell-extra-args '("-W" "3")) (cond ((or (not (fboundp 'device-type)) - (equal (device-type) 'x)) - ;; Code which applies only when running emacs under X goes here. - ;; (We check whether the function `device-type' exists - ;; before using it. In versions before 19.12, there - ;; was no such function. If it doesn't exist, we - ;; simply assume we're running under X -- versions before - ;; 19.12 only supported X.) + (equal (device-type) 'x) + (equal (device-type) 'mswindows)) + ;; Code which applies only when running emacs under X or + ;; MicroSoft Windows goes here. (We check whether the + ;; function `device-type' exists before using it. In + ;; versions before 19.12, there was no such function. + ;; If it doesn't exist, we simply assume we're running + ;; under X -- versions before 19.12 only supported X.) ;; Remove the binding of C-x C-c, which normally exits emacs. ;; It's easy to hit this by mistake, and that can be annoying. @@ -153,7 +154,10 @@ ;; standard beep only works with some X servers; many servers ;; completely ignore those parameters.) ;; - (cond ((string-match ":0" (getenv "DISPLAY")) + (cond ((or (and (getenv "DISPLAY") + (string-match ":0" (getenv "DISPLAY"))) + (and (eq (console-type) 'mswindows) + (device-sound-enabled-p))) (load-default-sounds)) (t (setq bell-volume 40)
--- a/lib-src/ChangeLog Mon Aug 13 11:03:09 2007 +0200 +++ b/lib-src/ChangeLog Mon Aug 13 11:04:06 2007 +0200 @@ -1,3 +1,13 @@ +1998-09-29 SL Baur <steve@altair.xemacs.org> + + * XEmacs 21.2-beta2 is released. + +1998-09-08 Raymond Toy <toy@rtp.ericsson.se> + + * gnuclient.c (filename_expand): Added better recognition of + absolute pathnames for CYGWIN. Convert absolute pathnames with + drive letters to something xemacs can handle. + 1998-07-19 SL Baur <steve@altair.xemacs.org> * XEmacs 21.2-beta1 is released.
--- a/lib-src/gnuclient.c Mon Aug 13 11:03:09 2007 +0200 +++ b/lib-src/gnuclient.c Mon Aug 13 11:04:06 2007 +0200 @@ -179,8 +179,37 @@ fullpath[0] = '\0'; - if (filename[0] && filename[0] != '/') - { /* relative filename */ + if (filename[0] && filename[0] == '/') + { + /* Absolute (unix-style) pathname. Do nothing */ + strcat (fullpath, filename); + } +#ifdef __CYGWIN32__ + else if (filename[0] && filename[0] == '\\' && + filename[1] && filename[1] == '\\') + { + /* This path includes the server name (something like + "\\server\path"), so we assume it's absolute. Do nothing to + it. */ + strcat (fullpath, filename); + } + else if (filename[0] && + filename[1] && filename[1] == ':' && + filename[2] && filename[2] == '\\') + { + /* Absolute pathname with drive letter. Convert "<drive>:" + to "//<drive>/". */ + strcat (fullpath, "//"); + strncat (fullpath, filename, 1); + strcat (fullpath, &filename[2]); + } +#endif + else + { + /* Assume relative Unix style path. Get the current directory + and prepend it. FIXME: need to fix the case of DOS paths like + "\foo", where we need to get the current drive. */ + strcat (fullpath, get_current_working_directory ()); len = strlen (fullpath); @@ -188,10 +217,7 @@ ; /* yep */ else strcat (fullpath, "/"); /* nope, append trailing slash */ - } /* if */ - - strcat (fullpath,filename); - + } } /* filename_expand */ /* Encase the string in quotes, escape all the backslashes and quotes
--- a/lisp/ChangeLog Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/ChangeLog Mon Aug 13 11:04:06 2007 +0200 @@ -1,3 +1,317 @@ +1998-09-29 SL Baur <steve@altair.xemacs.org> + + * XEmacs 21.2-beta2 is released. + +1998-08-14 Jan Vroonhof <vroonhof@math.ethz.ch> + + * files.el (auto-mode-alist): Enhanced regexp for perl-mode + +1998-09-22 Karl M. Hegbloom <karlheg@bittersweet.inetarena.com> + + * info.el (Info-mode): Document page turning by double clicks in + docstring so `M-x describe-mode' will display it. + +1998-09-20 Karl M. Hegbloom <karlheg@bittersweet.inetarena.com> + + * info.el (Info-mouse-track-double-click-hook): Use character + widths to calculate a border region where double clicking does + page turning, and return `nil' by default so other hooks, such as + region highlighting, will be run. + +1998-09-29 Colin Rafferty <colin@xemacs.org> + + * sound.el (default-sound-directory-list): Initialize with all the + "sounds" directories in `data-directory-list'. It used to just be + the first one. + + * packages.el (locate-data-directory-list): Created. This gives + the list of matching directories, unlike `locate-data-directory', + which just gives the first one. + +1998-09-26 Jan Vroonhof <vroonhof@math.ethz.ch> + + * minibuf.el (read-from-minibuffer): No longer bind help-form but + make a binding in the local keymap until help-char handling is + improved. + + * help.el (help-keymap-with-help-key): Provide keymap with help + binding. + (help-print-help-form): New helper function. + +1998-09-23 Hrvoje Niksic <hniksic@srce.hr> + + * isearch-mode.el (isearch-highlight): set-extent-endpoints can + move extent to another buffer; no need to create a new extent. + (isearch-fix-case): New function. + (isearch-search-and-update): Use it. + +1998-09-22 Hrvoje Niksic <hniksic@srce.hr> + + * isearch-mode.el (isearch-mode): Use overriding-local-map to set + the keymap, not minor-mode-map-alist. + (isearch-done): Restore overriding-local-map. + +1998-09-21 Martin Buchholz <martin@xemacs.org> + + * bytecomp.el (byte-compile-buffer-substring): + Fix for: (byte-compile (defun f () (buffer-substring))) + ==> ** buffer-substring called with 3 args, but requires 0-3 + - new code not only works, but is more readable, too. + +1998-09-20 Jonathan Harris <jhar@tardis.ed.ac.uk> + + * msw-faces.el (mswindows-init-device-faces): Don't try to + specify a default font at this late stage. Do try to force + creation of the default face font so that if it fails we get + an error now instead of a crash at frame creation. + + mswindows-font-canonicalize-name, mswindows-make-font-unbold, + mswindows-make-font-unitalic: Canonical default weight + changed from "Normal" to "Regular". + + mswindows-make-font-bold / -bold-italic: Supplied device was + not being passed into call to mswindows-find-smaller-font. + +1998-09-10 Björn Torkelsson <torkel@hpc2n.umu.se> + + * package-get.el (package-get-remote): Fix the path where to find + the packages on xemacs.org. + +1998-09-08 Hrvoje Niksic <hniksic@srce.hr> + + * about.el (about-maintainer-info): Update Ben's entry. + +1998-09-24 Martin Buchholz <martin@xemacs.org> + + * lisp/shadow.el (find-emacs-lisp-shadows): + - `member' was being called on lists of length 2000! + - Replace with hashtables. + - Replace hand-coded loops with (dolist) + - Fix comment typo + +1998-09-20 Darryl Okahata <darrylo@sr.hp.com> + + * packages.el: Added new function, `package-delete-name', to + delete existing packages from the installed package database + (`packages-package-list'). Also added the "pkginfo" directory + to `packages-special-base-regexp', so that the pkginfo directory + would not get added to `late-packages'. + + * package-admin.el: Added ability to delete an installed package + (added low-level function, `package-admin-delete-package'). + Understands how to use the pkginfo/MANIFEST.<package> file to + delete the package. When installing a package, will also + create a MANIFEST.* file if one is not provided by the + package. If the MANIFEST.* doesn't exist when deleting a + package, the functions will fall back to attempting to delete + any package-specific lisp directory. + + * package-get.el: Moved some functions to package-admin.el. + Added interactive function `package-get-delete-package', for + use by users for deleting a package. + + Also modified to not require the prescence of efs. + +1998-09-22 Hrvoje Niksic <hniksic@srce.hr> + + * files.el (find-file-noselect): Handle all signals, kill the + buffer and resignal. + +1998-09-23 SL Baur <steve@altair.xemacs.org> + + * cl-macs.el (glyph-image): Add setf method. + +1998-09-06 Darryl Okahata <darrylo@sr.hp.com> + + * package-get.el: Fixed broken EFS downloading. Also, look for + .tar.gz files first, in preference over .tgz files. + + * package-ui.el: Fix display of package version numbers. + +1998-08-27 Jan Vroonhof <vroonhof@math.ethz.ch> + + * x-font-menu.el (font-menu-set-font): Add "pt" units to size + argument. + +1998-09-03 Darryl Okahata <darrylo@sr.hp.com> + + * list-mode.el: `display-completion-list': added new/optional + keyword `:completion-string', which allows the programmer to + change the "Possible completions are:" prompt. + + * menubar-items.el: Added new pulldown menu-pick to start up the + visual package browser/installer: + + Options->Customize->List Packages + + * package-admin.el: Added hooks for installing under both Unix + and MS Windows. Does additional error checking. No longer + calls "add-big-package.sh" to install packages under Unix; now + calls gunzip & tar directly. + + * package-get.el: Added ability to install packages from files + on a local disk/CDROM. Now deletes any existing package lisp + directory. Does completion on available packages when + querying for package names. Will also search for .tgz files + in addition for .tar.gz files. Tries to reload + auto-autoloads, as a convenience when loading new packages, + and also tries to add any new package paths to `load-path'. + Changed all occurences of `concat' to use `expand-file-name'. + + * package-ui.el: New file which implements the main visual + package browser/installer, which is started via a menu pick or + M-x pui-list packages. + +1998-09-03 Hrvoje Niksic <hniksic@srce.hr> + + * startup.el (load-init-file): spelling fix. + +1998-09-02 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * startup.el (normal-top-level): Load auto-autoload files + covariantly with their precedence. + +1998-08-26 Jan Vroonhof <vroonhof@math.ethz.ch> + + * menubar-items.el (default-menubar): Remove "Font Weight" + option, there is currently no custom equivalent.. Customize-faces + is "Edit faces". + + * x-font-menu.el (font-menu-set-font): Use customize to set + default face. + + * faces.el (face-spec-update-all-matching): New function. + + * cus-face.el (custom-set-face-update-spec): New function. + Interface to customize faces from elisp. + + (custom-face-value-create): Show the customized settings if set + but not saved. + +1998-08-26 Jan Vroonhof <vroonhof@math.ethz.ch> + + (custom-face-value-create): Show the customized settings if set + but not saved. + +1998-08-31 Hrvoje Niksic <hniksic@srce.hr> + + * keydefs.el (global-map): Add FSF 20.3 binding of + query-replace-regexp. + +1998-08-21 Greg Klanderman <greg@alphatech.com> + + * minibuf.el (read-file-name-internal-1): use + user-name-completion-1 instead of user-name-completion. + +1998-08-19 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * loadup.el: + * make-docfile.el: + * update-elc.el: Don't set `source-directory' (now defunct as a + global variable) no more. + + * packages.el (packages-list-autoloads): Made `source-directory' + (now defunct as a global variable) a parameter. + +1998-08-13 Carsten Leonhardt <leo@arioch.oche.de> + + * about.el (about-hackers): new email + +1998-08-16 SL Baur <steve@altair.xemacs.org> + + * lisp-mode.el (with-string-as-buffer-contents): Set indentation. + +1998-07-17 Didier Verna <verna@inf.enst.fr> + + * faces.el (set-face-property): + (set-face-dim-p): + (face-dim-p): updated the doc strings now that the dim property isn't + tty-specific. + (face-equal): the dim property is now a common one. + + * cus-face.el (custom-face-attributes): New face attribute: `dim' + Renamed the `stipple' attribute to `background-pixmap'. + (custom-face-background-pixmap): make custom-face-stipple an + obsolete alias for this. + +1998-08-11 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * find-paths.el (paths-file-readable-directory-p): Created and + used. + + * loadup.el: Don't set inhibit-... flags from run-temacs. + +1998-08-06 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * packages.el (packages-data-path-depth): Added and used. + +1998-08-05 Charles G. Waldman <cgw@pgt.com> + + * about.el: + - Change .xpm to .png, delete "zcat" section. + - cosmetic fix in the 'marcpa' entry. + + * etc/photos + - convert all .xpm.Z to .png + - rename mrb to martin + - rename mcook-m to mcookm + +1998-07-31 Martin Buchholz <martin@xemacs.org> + + * x-init.el (x-initialize-compose): Add support for + dead-circumflex as YET ANOTHER NAME for that dead key. + +1998-08-05 Colin Rafferty <colin@xemacs.org> + + * setup-paths.el (paths-construct-exec-path): Made the + last-packages really be last. + (paths-construct-data-directory-list): Ditto. + +1998-08-01 Kai Haberzettl <khaberz@synnet.de> + + * startup.el(startup-splash-frame-body): + Update Copyright notice in splash screen + +1998-07-20 Greg Klanderman <greg@alphatech.com> + + * minibuf.el (read-file-name-internal-1): do ~user completion. + +1998-07-22 Jan Vroonhof <vroonhof@math.ethz.ch> + + * font-lock.el (font-lock-fontify-glumped-region): Add guard + aginst destroyed extents + +1998-07-24 Greg Klanderman <greg@alphatech.com> + + * package-get.el (package-get): add `install-dir' argument. + +1998-07-20 John Jones <jj@asu.edu> + + * package-get.el: calls to package-get-update-all will only + update packages which are already installed. + +1998-07-23 SL Baur <steve@altair.xemacs.org> + + * autoload.el (update-file-autoloads): Ensure autoloads buffer is + writable. + +1998-07-20 Colin Rafferty <colin@xemacs.org> + + * about.el (about-hackers): Correct my email. + +1998-07-20 Kai Haberzettl <khaberz@synnet.de> + + * about.el (about-hackers): new email-address. + +1998-07-25 SL Baur <steve@altair.xemacs.org> + + * minibuf.el (read-number): Don't let `input-error' condition + escape. + +1998-07-20 Greg Klanderman <greg@alphatech.com> + + * about.el (about-hackers): use my `email-for-life' address. + 1998-07-19 SL Baur <steve@altair.xemacs.org> * XEmacs 21.2-beta1 is released.
--- a/lisp/about.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/about.el Mon Aug 13 11:04:06 2007 +0200 @@ -50,7 +50,7 @@ ;; People in this list have their individual links from the main page, ;; or from the `Legion' page. If they have an image, it should be -;; named after the CAR of the list element (baw -> baw.xpm). +;; named after the CAR of the list element (baw -> baw.png). ;; ;; If you add to this list, you'll want to update ;; `about-maintainer-info' (and maybe `about-hackers'. @@ -58,13 +58,14 @@ '((ajc "Andrew Cosgriff" "ajc@bing.wattle.id.au") (baw "Barry Warsaw" "bwarsaw@python.org") (bw "Bob Weiner" "weiner@altrasoft.com") + (chr "Christian Nybø" "chr@mediascience.no") (cthomp "Chuck Thompson" "cthomp@xemacs.org") (dmoore "David Moore" "dmoore@ucsd.edu") (dkindred "Darrell Kindred" "dkindred@cmu.edu") (dv "Didier Verna" "verna@inf.enst.fr") (hniksic "Hrvoje Niksic" "hniksic@srce.hr") (jareth "Jareth Hein" "jareth@camelot.co.jp") - (jason "Jason Mastaler" "jason@mastaler.com") + (jason "Jason Mastaler" "jason@xemacs.org") (jens "Jens Lautenbacher" "jens@lemcbed.lem.uni-karlsruhe.de") (jmiller "Jeff Miller" "jmiller@smart.net") (juhp "Jens-Ulrik Holger Petersen" "petersen@kurims.kyoto-u.ac.jp") @@ -87,7 +88,7 @@ (slb "SL Baur" "steve@xemacs.org") (stig "Jonathan Stigelman" "stig@hackvan.com") (stigb "Stig Bjorlykke" "stigb@tihlde.hist.no") - (thiessel "Marcus Thiessel" "thiessel@rhrk.uni-kl.de") + (thiessel "Marcus Thiessel" "marcus_thiessel@hp.com") (vladimir "Vladimir Ivanovic" "vladimir@mri.com") (wing "Ben Wing" "ben@xemacs.org") (wmperry "William Perry" "wmperry@aventail.com")) @@ -99,8 +100,11 @@ (defvar about-url-alist '((ajc . "http://www-personal.monash.edu.au/~ajc/") (altrasoft . "http://www.altrasoft.com/") + (ben . "http://www.666.com/ben/") + (ben-xemacs . "http://www.666.com/xemacs/") (baw . "http://www.python.org/~bwarsaw/") (cc-mode . "http://www.python.org/ftp/emacs/") + (chr . "http://www.xemacs.org/faq/") (dkindred . "http://www.cs.cmu.edu/People/dkindred/me.html") (dmoore . "http://oj.egbt.org/dmoore/") (jason . "http://www.mastaler.com/") @@ -209,7 +213,7 @@ (let* ((emacs-short-version (format "%d.%d" emacs-major-version emacs-minor-version)) - (emacs-about-version (format "version %s; Apr 1998" + (emacs-about-version (format "version %s; Aug 1998" emacs-short-version))) (widget-insert (about-center emacs-about-version)) (widget-create 'link :help-echo "The latest NEWS of XEmacs" @@ -529,45 +533,22 @@ (if (memq (device-class) '(color grayscale)) "" "m") - ".xpm") + ".png") (locate-data-directory "photos"))) (data nil)) - (unless (file-exists-p file) - ;; Maybe the file is compressed? - (setq file (concat file ".Z")) - (if (file-exists-p file) - ;; Decompress it. - (condition-case nil - (let ((buffer (get-buffer-create " *image*"))) - (unwind-protect - (save-excursion - (message "Uncompressing image...") - (set-buffer buffer) - (erase-buffer) - (let ((coding-system-for-read 'binary) - (coding-system-for-write 'binary)) - (insert-file-contents-literally file) - (call-process-region (point-min) (point-max) - "zcat" t t nil) - (setq data - (buffer-substring (point-min) (point-max)))) - (message "Uncompressing image... done")) - (kill-buffer buffer))) - (error (setq data 'error))) - (setq file nil))) (setq glyph (cond ((stringp data) (make-glyph - (if (featurep 'xpm) - `([xpm :data ,data] + (if (featurep 'png) + `([png :data ,data] [string :data "[Image]"]) `([string :data "[Image]"])))) ((eq data 'error) (make-glyph [string :data "[Error]"])) (file (make-glyph - (if (featurep 'xpm) - `([xpm :file ,file] + (if (featurep 'png) + `([png :file ,file] [string :data "[Image]"]) `([string :data "[Image]"])))) (t @@ -607,26 +588,21 @@ Volunteer.\n")) (hniksic (widget-insert "\ -Hrvoje is currently a student at the Faculty of Electrical -Engineering and Computing in Zagreb, Croatia. He works part-time -at SRCE, where he helps run the network machines. In his free time he -is helping develop free software (especially XEmacs, as well as GNU -software) and is writing his own -- he has written a small network -mirroring utility Wget, see ") - (about-url-link 'wget "Download Wget") - (widget-insert ".\n")) +Hrvoje is a student at the Faculty of Electrical Engineering and +Computing in Zagreb, Croatia, working part-time at system administration +at SRCE. His hobby is hacking free software, particularly XEmacs and +GNU Wget, the latter being his very own creation. + +His contribution to XEmacs consists of a multitude of hours spent +adding new features and bugs, and fixing old ones. He dreams of +writing a home page.\n")) (wing (widget-insert "\ -I'm not a thug -- I just play one on video. -My roommate says I'm a San Francisco \"Mission Critter\".\n\n" - (about-with-face "Gory stuff follows:" 'italic) - "\n -In 1992 I left a stuffy East-Coast university, set out into the real -world, and ended up a co-founder of Pearl Software. As part of this -company, I became the principal architect of Win-Emacs, a port of -Lucid Emacs to Microsoft Windows and Windows NT (for more info, e-mail -to info@pearlsoft.com). +I began my Emacs life in 1992 as the co-founder of the now defunct +Pearl Software. As part of this company, I became the principal +architect of Win-Emacs, an early port of Lucid Emacs to Microsoft +Windows and Windows NT. Since April 1993, I've worked on XEmacs as a contractor for various companies, changing hats faster than Ronald Reagan's hair color (oops, @@ -637,8 +613,19 @@ manual), and being a general nuisance ... er, brainstormer for many of the new features of XEmacs. -Recently I took a job at Dimension X, where I'm working on a -Java-based toolkit for developing VRML applications.\n")) +Alas, life has not been good to me recently. This former San Francisco +\"Mission Critter\" was exiled to \"Stroller Valley\" and, after a brief +stint developing a Java-based VRML toolkit for the now also defunct +Dimension X, I developed insidious hand and neck problems, and I was +forced to quit working. Since then, I have been learning how to interact +with the computer by using foot pedals and by dictating text to other +people. Recently I completed Architecting XEmacs, a web site about the +future of XEmacs.\n\n") + (widget-insert "Architecting XEmacs: ") + (about-url-link 'ben-xemacs "Find the miracles in store for XEmacs") + (widget-insert "\nBen's home page: ") + (about-url-link 'ben "Visit Ben's page") + (widget-insert "\n")) (cthomp (widget-insert "\ Chuck, through being in the wrong place at the right time, has gotten @@ -781,7 +768,7 @@ system written in Modula3:\n") (about-url-link 'marcpa "Visit POWER 911") (widget-insert "\ -Previously, I worked at Softimage Inc., now a Microsoft company +\n\nPreviously, I worked at Softimage Inc., now a Microsoft company \(eeekkk!), as a UNIX system administrator. This is where I've been converted to NT. @@ -830,13 +817,12 @@ (widget-insert ".\n")) (thiessel (widget-insert "\ -On May 1, 1996 he started working at University of Kaiserslautern in -the field of computer aided analog circuit design. His -responsibilities include the development and design of a CAD-Tool for -analog integrated circuits with special emphasis on distributed -software concepts. +Worked at University of Kaiserslautern where he took part in the +development and design of a CAD framework for analog integrated +circuits with special emphasis on distributed software concepts. He +has now joined HP as technical consultant. -When all the daily hacking is done he tries to take care of XEmacs +For XEmacs he does beta testing and tries to take care of XEmacs website at ") (about-url-link 'xemacs "Visit XEmacs web site") (widget-insert ".\n")) @@ -997,6 +983,16 @@ Roman history and enjoys making trips to Italy, where he was born, and seeing the sights") (widget-insert ".\n")) + (chr + (widget-insert "\ +Maintainer of the XEmacs FAQ and proud author of `zap-up-to-char'. + +Christian is a student at the Norwegian School of Economics and +Business Administration in Bergen, Norway. He used to work for an +internet startup called New Media Science, doing scripting and +violation of HTML DTD's. After graduation, spring 1999, he'll be +looking for a job involving lisp programming, French and Russian.") + (widget-insert ".\n")) )) ;; Setup the buffer for a maintainer. @@ -1041,7 +1037,7 @@ (format "<%s>\n%s\n" address shortinfo)))) (defun about-hackers (&rest ignore) - (unless (about-get-buffer "*About Hackers*") + (unless (about-get-buffer "*About Contributors*") (let ((title "Other Contributors to XEmacs")) (widget-insert (about-center title) @@ -1206,6 +1202,8 @@ Originator and maintainer of the gnus.org domain.\n") (about-show-linked-info 'jmiller "\ Beta tester and last hacker of calendar.\n") + (about-show-linked-info 'chr "\ +Maintainer of the XEmacs FAQ and proud author of `zap-up-to-char'.\n") (flet ((print-short (name addr &optional shortinfo) (concat (about-with-face name 'italic) (about-tabs name) @@ -1349,7 +1347,7 @@ (print-short "Michael Guenther" "michaelg@igor.stuttgart.netsurf.de") (print-short "Dipankar Gupta" "dg@hplb.hpl.hp.com") (print-short "Markus Gutschke" "gutschk@GOEDEL.UNI-MUENSTER.DE") - (print-short "Kai Haberzettl" "khaberz@privat.circular.de") + (print-short "Kai Haberzettl" "khaberz@synnet.de") (print-short "Adam Hammer" "hammer@cs.purdue.edu") (print-short "Magnus Hammerin" "magnush@epact.se") (print-short "ChangGil Han" "cghan@phys401.phys.pusan.ac.kr") @@ -1384,7 +1382,7 @@ (print-short "Gregor Kennedy" "gregork@dadd.ti.com") (print-short "Michael Kifer" "kifer@cs.sunysb.edu") (print-short "Yasuhiko Kiuchi" "kiuchi@dsp.ksp.fujixerox.co.jp") - (print-short "Greg Klanderman" "greg@alphatech.com") + (print-short "Greg Klanderman" "greg.klanderman@alum.mit.edu") (print-short "Valdis Kletnieks" "Valdis.Kletnieks@vt.edu") (print-short "Rob Kooper" "kooper@cc.gatech.edu") (print-short "Peter Skov Knudsen" "knu@dde.dk") @@ -1392,7 +1390,7 @@ (print-short "Maximilien Lincourt" "max@toonboom.com") (print-short "Mats Larsson" "Mats.Larsson@uab.ericsson.se") (print-short "Simon Leinen" "simon@instrumatic.ch") - (print-short "Carsten Leonhardt" "leo@arioch.tng.oche.de") + (print-short "Carsten Leonhardt" "leo@arioch.oche.de") (print-short "James LewisMoss" "moss@cs.sc.edu") (print-short "Mats Lidell" "mats.lidell@contactor.se") (print-short "Matt Liggett" "mliggett@seven.ucs.indiana.edu") @@ -1430,7 +1428,6 @@ (print-short "Andy Norman" "ange@hplb.hpl.hp.com") (print-short "Joe Nuspl" "nuspl@sequent.com") (print-short "Kim Nyberg" "kny@tekla.fi") - (print-short "Christian Nybø" "chr@mediascience.no") (print-short "Kevin Oberman" "oberman@es.net") (print-short "David Ofelt" "ofelt@getalife.Stanford.EDU") (print-short "Alexandre Oliva" "oliva@dcc.unicamp.br") @@ -1446,7 +1443,7 @@ (print-short "Frederic Poncin" "fp@info.ucl.ac.be") (print-short "E. Rehmi Post" "rehmi@asylum.sf.ca.us") (print-short "Martin Pottendorfer" "Martin.Pottendorfer@aut.alcatel.at") - (print-short "Colin Rafferty" "craffert@ml.com") + (print-short "Colin Rafferty" "colin@xemacs.org") (print-short "Rick Rankin" "Rick_Rankin-P15254@email.mot.com") (print-short "Paul M Reilly" "pmr@pajato.com") (print-short "Jack Repenning" "jackr@sgi.com") @@ -1469,6 +1466,7 @@ (print-short "Cotton Seed" "cottons@cybercom.net") (print-short "Axel Seibert" "seiberta@informatik.tu-muenchen.de") (print-short "Odd-Magne Sekkingstad" "oddms@ii.uib.no") + (print-short "Gregory Neil Shapiro" "gshapiro@sendmail.org") (print-short "Justin Sheehy" "justin@linus.mitre.org") (print-short "John Shen" "zfs60@cas.org") (print-short "Murata Shuuichirou" "mrt@mickey.ai.kyutech.ac.jp") @@ -1504,6 +1502,7 @@ (print-short "Peter B. West" "p.west@uq.net.au") (print-short "Rod Whitby" "rwhitby@asc.corp.mot.com") (print-short "Rich Williams" "rdw@hplb.hpl.hp.com") + (print-short "Raymond Wiker" "raymond@orion.no") (print-short "Peter Windle" "peterw@SDL.UG.EDS.COM") (print-short "David C Worenklein" "dcw@gcm.com") (print-short "Takeshi Yamada" "yamada@sylvie.kecl.ntt.jp")
--- a/lisp/auto-autoloads.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/auto-autoloads.el Mon Aug 13 11:04:06 2007 +0200 @@ -1214,7 +1214,9 @@ Uses `package-get-base' to determine just what is required and what package provides that functionality. If VERSION is nil, retrieves latest version. Optional argument FETCHED-PACKAGES is used to keep -track of packages already fetched." t nil) +track of packages already fetched. + +Returns nil upon error." t nil) (autoload 'package-get "package-get" "\ Fetch PACKAGE from remote site. @@ -1223,6 +1225,8 @@ package is already installed. Valid values for CONFLICT are: 'always always retrieve the package even if it is already installed 'never do not retrieve the package if it is installed. +INSTALL-DIR, if non-nil, specifies the package directory where +fetched packages should be installed. The value of `package-get-base' is used to determine what files should be retrieved. The value of `package-get-remote' is used to determine @@ -1231,7 +1235,11 @@ Once the package is retrieved, its md5 checksum is computed. If that sum does not match that stored in `package-get-base' for this version -of the package, an error is signalled." t nil) +of the package, an error is signalled. + +Returns `t' upon success, the symbol `error' if the package was +successfully installed but errors occurred during initialization, or +`nil' upon error." t nil) (autoload 'package-get-package-provider "package-get" "\ Search for a package that provides SYM and return the name and @@ -1244,6 +1252,23 @@ ;;;*** +;;;### (autoloads (pui-list-packages pui-add-install-directory) "package-ui" "lisp/package-ui.el") + +(autoload 'pui-add-install-directory "package-ui" "\ +Add a new package binary directory to the head of `package-get-remote'. +Note that no provision is made for saving any changes made by this function. +It exists mainly as a convenience for one-time package installations from +disk." t nil) + +(autoload 'pui-list-packages "package-ui" "\ +List all packages and package information. +The package name, version, and description are displayed. From the displayed +buffer, the user can see which packages are installed, which are not, and +which are out-of-date (a newer version is available). The user can then +select packages for installation via the keyboard or mouse." t nil) + +;;;*** + ;;;### (autoloads (picture-mode) "picture" "lisp/picture.el") (autoload 'picture-mode "picture" "\
--- a/lisp/autoload.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/autoload.el Mon Aug 13 11:04:06 2007 +0200 @@ -375,6 +375,8 @@ (let ((find-file-hooks nil)) (set-buffer (or (get-file-buffer generated-autoload-file) (find-file-noselect generated-autoload-file)))) + ;; Make sure we can scribble in it. + (setq buffer-read-only nil) ;; First delete all sections for this file. (goto-char (point-min)) (while (search-forward generate-autoload-section-header nil t)
--- a/lisp/bytecomp.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/bytecomp.el Mon Aug 13 11:04:06 2007 +0200 @@ -3125,15 +3125,15 @@ (t (byte-compile-normal-call form))))) (defun byte-compile-buffer-substring (form) - (let ((len (length form))) - ;; buffer-substring used to take exactly two args, but now takes 0-3. - ;; convert 0-2 to two args and use special bytecode operand. - ;; convert 3 args to a normal call. - (cond ((= len 1) (setq form (append form '(nil nil))) - (= len 2) (setq form (append form '(nil))))) - (cond ((= len 3) (byte-compile-two-args form)) - ((= len 4) (byte-compile-normal-call form)) - (t (byte-compile-subr-wrong-args form "0-3"))))) + ;; buffer-substring used to take exactly two args, but now takes 0-3. + ;; convert 0-2 to two args and use special bytecode operand. + ;; convert 3 args to a normal call. + (case (length (cdr form)) + (0 (byte-compile-two-args (append form '(nil nil)))) + (1 (byte-compile-two-args (append form '(nil)))) + (2 (byte-compile-two-args form)) + (3 (byte-compile-normal-call form)) + (t (byte-compile-subr-wrong-args form "0-3")))) (defun byte-compile-list (form) (let ((count (length (cdr form))))
--- a/lisp/cl-macs.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/cl-macs.el Mon Aug 13 11:04:06 2007 +0200 @@ -1731,6 +1731,8 @@ ;; Avoid adding various face and glyph functions. (defsetf frame-selected-window (&optional f) (v) `(set-frame-selected-window ,f ,v)) +(defsetf glyph-image (glyph &optional domain) (i) + (list 'set-glyph-image glyph i domain)) (defsetf itimer-function set-itimer-function) (defsetf itimer-function-arguments set-itimer-function-arguments) (defsetf itimer-is-idle set-itimer-is-idle)
--- a/lisp/cus-edit.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/cus-edit.el Mon Aug 13 11:04:06 2007 +0200 @@ -2288,7 +2288,8 @@ (unless (widget-get widget :custom-form) (widget-put widget :custom-form custom-face-default-form)) (let* ((symbol (widget-value widget)) - (spec (or (get symbol 'saved-face) + (spec (or (get symbol 'customized-face) + (get symbol 'saved-face) (get symbol 'face-defface-spec) ;; Attempt to construct it. (list (list t (face-custom-attributes-get
--- a/lisp/cus-face.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/cus-face.el Mon Aug 13 11:04:06 2007 +0200 @@ -67,13 +67,17 @@ :help-echo "\ Text size (e.g. 9pt or 2mm).") custom-set-face-font-size custom-face-font-size) - (:stipple (editable-field :format "Stipple: %v" - :help-echo "Name of background bitmap file.") - set-face-stipple custom-face-stipple) (:family (editable-field :format "Font Family: %v" :help-echo "\ Name of font family to use (e.g. times).") custom-set-face-font-family custom-face-font-family) + (:background-pixmap (editable-field :format "Background pixmap: %v" + :help-echo "\ +Name of background pixmap file.") + set-face-background-pixmap custom-face-background-pixmap) + (:dim (toggle :format "%[Dim%]: %v\n" + :help-echo "Control whether the text should be dimmed.") + set-face-dim-p face-dim-p) (:bold (toggle :format "%[Bold%]: %v\n" :help-echo "Control whether a bold font should be used.") custom-set-face-bold custom-face-bold) @@ -85,7 +89,6 @@ :help-echo "\ Control whether the text should be underlined.") set-face-underline-p face-underline-p) - ;; #### Should make it work on X (:strikethru (toggle :format "%[Strikethru%]: %v\n" :help-echo "\ Control whether the text should be strikethru.") @@ -146,6 +149,14 @@ (error nil))) result)) +(defsubst custom-face-get-spec (symbol) + (or (get symbol 'customized-face) + (get symbol 'saved-face) + (get symbol 'face-defface-spec) + ;; Attempt to construct it. + (list (list t (face-custom-attributes-get + symbol (selected-frame)))))) + (defun custom-set-face-bold (face value &optional frame) "Set the bold property of FACE to VALUE." (if value @@ -178,8 +189,8 @@ (fontobj (font-create-object font))) (font-italic-p fontobj))) -(defun custom-face-stipple (face &rest args) - "Return the name of the stipple file used for FACE." +(defun custom-face-background-pixmap (face &rest args) + "Return the name of the background pixmap file used for FACE." (let ((image (apply 'specifier-instance (face-background-pixmap face) args))) (and image @@ -215,6 +226,14 @@ (fontobj (font-create-object font))) (font-family fontobj))) +(defun custom-set-face-update-spec (face display plist) + "Customize the FACE for display types matching DISPLAY, merging + in the new items from PLIST" + (let ((spec (face-spec-update-all-matching (custom-face-get-spec face) + display plist))) + (put face 'customized-face spec) + (face-spec-set face spec))) + ;;; Initializing. ;;;###autoload
--- a/lisp/custom-load.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/custom-load.el Mon Aug 13 11:04:06 2007 +0200 @@ -72,7 +72,8 @@ (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 'packages '("package-get-custom")) +(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"))
--- a/lisp/faces.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/faces.el Mon Aug 13 11:04:06 2007 +0200 @@ -318,7 +318,6 @@ For valid instantiators, see `face-boolean-specifier-p'. dim Dim all text covered by this face. - Only used by faces on TTY devices. For valid instantiators, see `face-boolean-specifier-p'. blinking Blink all text covered by this face. @@ -690,12 +689,12 @@ (set-face-property face 'highlight highlight-p locale tag-set how-to-add)) (defun face-dim-p (face &optional domain default no-fallback) - "Return t if FACE is dimmed in DOMAIN (TTY domains only). + "Return t if FACE is dimmed in DOMAIN. See `face-property-instance' for the semantics of the DOMAIN argument." (face-property-instance face 'dim domain default no-fallback)) (defun set-face-dim-p (face dim-p &optional locale tag-set how-to-add) - "Change whether FACE is dimmed in LOCALE (TTY locales only). + "Change whether FACE is dimmed in LOCALE. DIM-P is normally a face-boolean instantiator; see `face-boolean-specifier-p'. See `set-face-property' for the semantics of the LOCALE, TAG-SET, and @@ -750,9 +749,10 @@ (if (not (valid-specifier-domain-p domain)) (error "Invalid specifier domain")) (let ((device (dfw-device domain)) - (common-props '(foreground background font display-table underline)) + (common-props '(foreground background font display-table underline + dim)) (win-props '(background-pixmap strikethru)) - (tty-props '(highlight dim blinking reverse))) + (tty-props '(highlight blinking reverse))) ;; First check the properties which are used in common between the ;; x and tty devices. Then, check those properties specific to @@ -1256,6 +1256,39 @@ (setq default-custom-frame-properties (extract-custom-frame-properties (selected-frame)))))) +(defun face-spec-update-all-matching (spec display plist) + "Update all entries in the face spec that could match display to +have the entries from the new plist and return the new spec" + (mapcar + (lambda (e) + (let ((entries (car e)) + (options (cadr e)) + (match t) + dplist + (new-options plist) + ) + (unless (eq display t) + (mapc (lambda (arg) + (setq dplist (plist-put dplist (car arg) (cadr arg)))) + display)) + (unless (eq entries t) + (mapc (lambda (arg) + (setq match (and match (eq (cadr arg) + (plist-get + dplist (car arg) + (cadr arg)))))) + entries)) + (if (not match) + e + (while new-options + (setq options + (plist-put options (car new-options) (cadr new-options))) + (setq new-options (cddr new-options))) + (list entries options)))) + (copy-sequence spec))) + + + (defun face-spec-set-match-display (display &optional frame) "Return non-nil if DISPLAY matches FRAME. DISPLAY is part of a spec such as can be used in `defface'.
--- a/lisp/files.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/files.el Mon Aug 13 11:04:06 2007 +0200 @@ -976,65 +976,69 @@ ;;; (message "Symbolic link to file in buffer %s" ;;; (buffer-name linked-buf)))) (setq buf (create-file-buffer filename)) - (set-buffer-major-mode buf) - (set-buffer buf) - (erase-buffer) - (if rawfile - (condition-case () - (insert-file-contents-literally filename t) - (file-error - (when (and (file-exists-p filename) - (not (file-readable-p filename))) - (kill-buffer buf) - (signal 'file-error (list "File is not readable" filename))) - ;; Unconditionally set error - (setq error t))) - (condition-case () - (insert-file-contents filename t) - (file-error - (when (and (file-exists-p filename) - (not (file-readable-p filename))) - (kill-buffer buf) - (signal 'file-error (list "File is not readable" filename))) - ;; Run find-file-not-found-hooks until one returns non-nil. - (or (run-hook-with-args-until-success 'find-file-not-found-hooks) - ;; If they fail too, set error. - (setq error t))))) - ;; Find the file's truename, and maybe use that as visited name. - ;; automatically computed in XEmacs, unless jka-compr was used! - (unless buffer-file-truename - (setq buffer-file-truename truename)) - (setq buffer-file-number number) - ;; On VMS, we may want to remember which directory in a search list - ;; the file was found in. - (and (eq system-type 'vax-vms) - (let (logical) - (if (string-match ":" (file-name-directory filename)) - (setq logical (substring (file-name-directory filename) - 0 (match-beginning 0)))) - (not (member logical find-file-not-true-dirname-list))) - (setq buffer-file-name buffer-file-truename)) - (and find-file-use-truenames - ;; This should be in C. Put pathname abbreviations that have - ;; been explicitly requested back into the pathname. Most - ;; importantly, strip out automounter /tmp_mnt directories so - ;; that auto-save will work - (setq buffer-file-name (abbreviate-file-name buffer-file-name))) - ;; Set buffer's default directory to that of the file. - (setq default-directory (file-name-directory buffer-file-name)) - ;; Turn off backup files for certain file names. Since - ;; this is a permanent local, the major mode won't eliminate it. - (and (not (funcall backup-enable-predicate buffer-file-name)) - (progn - (make-local-variable 'backup-inhibited) - (setq backup-inhibited t))) - (if rawfile - ;; #### FSF 20.3 sets buffer-file-coding-system to - ;; `no-conversion' here. Should we copy? It also makes - ;; `find-file-literally' a local variable and sets it to t. - nil - (after-find-file error (not nowarn)) - (setq buf (current-buffer))))) + ;; Catch various signals, such as QUIT, and kill the buffer + ;; in that case. + (condition-case data + (progn + (set-buffer-major-mode buf) + (set-buffer buf) + (erase-buffer) + (condition-case () + (if rawfile + (insert-file-contents-literally filename t) + (insert-file-contents filename t)) + (file-error + (when (and (file-exists-p filename) + (not (file-readable-p filename))) + (signal 'file-error (list "File is not readable" filename))) + (if rawfile + ;; Unconditionally set error + (setq error t) + (or + ;; Run find-file-not-found-hooks until one returns non-nil. + (run-hook-with-args-until-success 'find-file-not-found-hooks) + ;; If they fail too, set error. + (setq error t))))) + ;; Find the file's truename, and maybe use that as visited name. + ;; automatically computed in XEmacs, unless jka-compr was used! + (unless buffer-file-truename + (setq buffer-file-truename truename)) + (setq buffer-file-number number) + ;; On VMS, we may want to remember which directory in + ;; a search list the file was found in. + (and (eq system-type 'vax-vms) + (let (logical) + (if (string-match ":" (file-name-directory filename)) + (setq logical (substring (file-name-directory filename) + 0 (match-beginning 0)))) + (not (member logical find-file-not-true-dirname-list))) + (setq buffer-file-name buffer-file-truename)) + (and find-file-use-truenames + ;; This should be in C. Put pathname + ;; abbreviations that have been explicitly + ;; requested back into the pathname. Most + ;; importantly, strip out automounter /tmp_mnt + ;; directories so that auto-save will work + (setq buffer-file-name (abbreviate-file-name buffer-file-name))) + ;; Set buffer's default directory to that of the file. + (setq default-directory (file-name-directory buffer-file-name)) + ;; Turn off backup files for certain file names. Since + ;; this is a permanent local, the major mode won't eliminate it. + (and (not (funcall backup-enable-predicate buffer-file-name)) + (progn + (make-local-variable 'backup-inhibited) + (setq backup-inhibited t))) + (if rawfile + ;; #### FSF 20.3 sets buffer-file-coding-system to + ;; `no-conversion' here. Should we copy? It also + ;; makes `find-file-literally' a local variable + ;; and sets it to t. + nil + (after-find-file error (not nowarn)) + (setq buf (current-buffer)))) + (t + (kill-buffer buf) + (signal (car data) (cdr data)))))) buf))) ;; FSF has `insert-file-literally' and `find-file-literally' here. @@ -1154,7 +1158,7 @@ ("\\.[fF]90\\'" . f90-mode) ;;; Less common extensions come here ;;; so more common ones above are found faster. - ("\\.p[lm]\\'" . perl-mode) + ("\\.\\([pP][Llm]\\|al\\)\\'" . perl-mode) ("\\.py\\'" . python-mode) ("\\.texi\\(nfo\\)?\\'" . texinfo-mode) ("\\.ad[abs]\\'" . ada-mode)
--- a/lisp/find-paths.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/find-paths.el Mon Aug 13 11:04:06 2007 +0200 @@ -62,7 +62,7 @@ (let ((directory (file-name-as-directory (expand-file-name (car directories))))) - (if (file-directory-p directory) + (if (paths-file-readable-directory-p directory) (let ((raw-entries (if (equal 0 max-depth) '() @@ -88,6 +88,11 @@ (setq directories (cdr directories))) path)) +(defun paths-file-readable-directory-p (filename) + "Check if filename is a readable directory." + (and (file-directory-p filename) + (file-readable-p filename))) + (defun paths-find-recursive-load-path (directories &optional max-depth) "Construct a recursive load path underneath DIRECTORIES." (paths-find-recursive-path directories @@ -97,13 +102,13 @@ "Check if DIRECTORY is a plausible installation root for XEmacs." (or ;; installed - (file-directory-p (paths-construct-path (list directory - "lib" - emacs-program-name))) + (paths-file-readable-directory-p (paths-construct-path (list directory + "lib" + emacs-program-name))) ;; in-place or windows-nt (and - (file-directory-p (paths-construct-path (list directory "lisp"))) - (file-directory-p (paths-construct-path (list directory "etc")))))) + (paths-file-readable-directory-p (paths-construct-path (list directory "lisp"))) + (paths-file-readable-directory-p (paths-construct-path (list directory "etc")))))) (defun paths-chase-symlink (file-name) "Chase a symlink until the bitter end." @@ -168,19 +173,19 @@ (let ((preferred-value (or (and envvar (getenv envvar)) default))) (if (and preferred-value - (file-directory-p preferred-value)) + (paths-file-readable-directory-p preferred-value)) (file-name-as-directory preferred-value) (catch 'gotcha (while roots (let* ((root (car roots)) ;; installed (path (paths-construct-emacs-directory root suffix base))) - (if (file-directory-p path) + (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 (file-directory-p path) + (if (paths-file-readable-directory-p path) (throw 'gotcha path)))))) (setq roots (cdr roots))) nil)))) @@ -230,7 +235,7 @@ "Return the directories among DIRECTORIES." (let ((reverse-directories '())) (while directories - (if (file-directory-p (car directories)) + (if (paths-file-readable-directory-p (car directories)) (setq reverse-directories (cons (car directories) reverse-directories)))
--- a/lisp/font-lock.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/font-lock.el Mon Aug 13 11:04:06 2007 +0200 @@ -1073,8 +1073,9 @@ ;; region as fontified; otherwise, the same error might get signaled ;; after every command. (unwind-protect - ;; buffer may be deleted. - (if (buffer-live-p (extent-object font-lock-old-extent)) + ;; buffer/extent may be deleted. + (if (and (extent-live-p font-lock-old-extent) + (buffer-live-p (extent-object font-lock-old-extent))) (save-excursion (set-buffer (extent-object font-lock-old-extent)) (font-lock-after-change-function-1
--- a/lisp/font.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/font.el Mon Aug 13 11:04:06 2007 +0200 @@ -776,7 +776,7 @@ ;;; A maximal mswindows font spec looks like: ;;; Courier New:Bold Italic:10:underline strikeout:western ;;; Missing parts of the font spec should be filled in with these values: -;;; Courier New:Normal:10::western +;;; Courier New:Regular:10::western ;; "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*:[a-zA-Z 0-9]*$" (defvar font-mswindows-font-regexp (let
--- a/lisp/help.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/help.el Mon Aug 13 11:04:06 2007 +0200 @@ -1416,4 +1416,25 @@ (if cmd (princ " "))))) (terpri)))))) +;; Stop gap for 21.0 untill we do help-char etc properly. +(defun help-keymap-with-help-key (keymap form) + "Return a copy of KEYMAP with an help-key binding according to help-char + invoking FORM like help-form. An existing binding is not overridden. + If FORM is nil then no binding is made." + (let ((map (copy-keymap keymap)) + (key (if (characterp help-char) + (vector (character-to-event help-char)) + help-char))) + (when (and form key (not (lookup-key map key))) + (define-key map key + `(lambda () (interactive) (help-print-help-form ,form)))) + map)) + +(defun help-print-help-form (form) + (let ((string (eval form))) + (if (stringp string) + (with-displaying-help-buffer + (insert string))))) + + ;;; help.el ends here
--- a/lisp/info.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/info.el Mon Aug 13 11:04:06 2007 +0200 @@ -2614,39 +2614,20 @@ (if (/= click-count 2) ;; Return nil so any other hooks are performed. nil - (let* ((x (event-x-pixel event)) - (y (event-y-pixel event)) - (w (window-pixel-width (event-window event))) - (h (window-pixel-height (event-window event))) - (w/3 (/ w 3)) - (w/2 (/ w 2)) - (h/4 (/ h 4))) + (let* ((fw (face-width 'default)) + (fh (face-height 'default)) + (x (/ (event-x-pixel event) fw)) + (y (/ (event-y-pixel event) fw)) + (w (/ (window-pixel-width (event-window event)) fw)) + (h (/ (window-pixel-height (event-window event)) fh)) + (bx 3) + (by 2)) (cond - ;; In the top 1/4 and inside the middle 1/3 - ((and (<= y h/4) - (and (>= x w/3) (<= x (+ w/3 w/3)))) - (Info-up) - t) - ;; In the bottom 1/4 and inside the middle 1/3 - ((and (>= y (+ h/4 h/4 h/4)) - (and (>= x w/3) (<= x (+ w/3 w/3)))) - (Info-nth-menu-item 1) - t) - ;; In the lower 3/4 and the right 1/2 - ;; OR in the upper 1/4 and the right 1/3 - ((or (and (>= y h/4) (>= x w/2)) - (and (< y h/4) (>= x (+ w/3 w/3)))) - (Info-next) - t) - ;; In the lower 3/4 and the left 1/2 - ;; OR in the upper 1/4 and the left 1/3 - ((or (and (>= y h/4) (< x w/2)) - (and (< y h/4) (<= x w/3))) - (Info-prev) - t) - ;; This shouldn't happen. - (t - (error "event out of bounds: %s %s" x y)))))) + ((<= y by) (Info-up) t) + ((>= y (- h by)) (Info-nth-menu-item 1) t) + ((<= x bx) (Info-prev) t) + ((>= x (- w bx)) (Info-next) t) + (t nil))))) (defvar Info-mode-map nil "Keymap containing Info commands.") @@ -2742,10 +2723,16 @@ TAB Go to next cross-reference. Meta-TAB Go to previous ref. Mouse commands: -Left Button Set point. +Left Button Set point (usual text-mode functionality) Middle Button Click on a highlighted node reference to go to it. Right Button Pop up a menu of applicable Info commands. +Left Button Double Click in window edges: + Top edge: Go up to the parent node, like `u'. + Left edge: Go to the previous node, like `p'. + Right edge: Go to the next node, like `n'. + Bottom edge: Follow first menu item, like `1'. + Advanced commands: g Move to node, file, or annotation tag specified by name. Examples: `g Rectangles' `g (Emacs)Rectangles' `g Emacs'.
--- a/lisp/isearch-mode.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/isearch-mode.el Mon Aug 13 11:04:06 2007 +0200 @@ -459,10 +459,9 @@ isearch-opoint (point) isearch-window-configuration (current-window-configuration) - ;; #### - don't do this statically: isearch-mode must be FIRST in - ;; the minor-mode-map-alist -- Stig - minor-mode-map-alist (cons (cons 'isearch-mode isearch-mode-map) - minor-mode-map-alist) + ;; #### Should we remember the old value of + ;; overriding-local-map? + overriding-local-map isearch-mode-map isearch-selected-frame (selected-frame) isearch-mode (gettext " Isearch") @@ -541,8 +540,9 @@ ;; in the buffer we frobbed them in. But only if the buffer ;; is still alive. (set-buffer isearch-buffer) - (setq minor-mode-map-alist (delq (assoc 'isearch-mode minor-mode-map-alist) - minor-mode-map-alist)) + ;; #### Should we restore the old value of + ;; overriding-local-map? + (setq overriding-local-map nil) ;; Use remove-hook instead of just setting it to our saved value ;; in case some process filter has created a buffer and modified ;; the pre-command-hook in that buffer... yeah, this is obscure, @@ -936,6 +936,20 @@ (interactive) (isearch-yank (x-get-clipboard))) +(defun isearch-fix-case () + (if (and isearch-case-fold-search search-caps-disable-folding) + (setq isearch-case-fold-search (isearch-no-upper-case-p isearch-string))) + (setq isearch-mode (if case-fold-search + (if isearch-case-fold-search + " Isearch" ;As God Intended Mode + " ISeARch") ;Warn about evil case via StuDLYcAps. + "Isearch" +; (if isearch-case-fold-search +; " isearch" ;Presumably case-sensitive losers +; ;will notice this 1-char difference. +; " Isearch") ;Weenie mode. + ))) + (defun isearch-search-and-update () ;; Do the search and update the display. (if (and (not isearch-success) @@ -951,12 +965,15 @@ ;; long as the match does not extend past search origin. (if (and (not isearch-forward) (not isearch-adjusted) (condition-case () - (looking-at (if isearch-regexp isearch-string - (regexp-quote isearch-string))) + (progn + (isearch-fix-case) + (let ((case-fold-search isearch-case-fold-search)) + (looking-at (if isearch-regexp isearch-string + (regexp-quote isearch-string))))) (error nil)) - (or isearch-yank-flag - (<= (match-end 0) - (min isearch-opoint isearch-barrier)))) + (or isearch-yank-flag + (<= (match-end 0) + (min isearch-opoint isearch-barrier)))) (setq isearch-success t isearch-invalid-regexp nil isearch-other-end (match-end 0)) @@ -1460,12 +1477,9 @@ (if (null isearch-highlight) nil ;; make sure isearch-extent is in the current buffer - (cond ((not (extentp isearch-extent)) - (isearch-make-extent begin end)) - ((not (eq (extent-object isearch-extent) (current-buffer))) - (delete-extent isearch-extent) - (isearch-make-extent begin end))) - (set-extent-endpoints isearch-extent begin end))) + (or (extentp isearch-extent) + (isearch-make-extent begin end)) + (set-extent-endpoints isearch-extent begin end (current-buffer)))) (defun isearch-dehighlight (totally) (if (and isearch-highlight isearch-extent) @@ -1485,19 +1499,7 @@ (defun isearch-search () ;; Do the search with the current search string. (isearch-message nil t) - (if (and isearch-case-fold-search search-caps-disable-folding) - (setq isearch-case-fold-search (isearch-no-upper-case-p isearch-string))) - - (setq isearch-mode (if case-fold-search - (if isearch-case-fold-search - " Isearch" ;As God Intended Mode - " ISeARch") ;Warn about evil case via StuDLYcAps. - "Isearch" -; (if isearch-case-fold-search -; " isearch" ;Presumably case-sensitive losers -; ;will notice this 1-char difference. -; " Isearch") ;Weenie mode. - )) + (isearch-fix-case) (condition-case lossage (let ((inhibit-quit nil) (case-fold-search isearch-case-fold-search))
--- a/lisp/keydefs.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/keydefs.el Mon Aug 13 11:04:06 2007 +0200 @@ -452,10 +452,10 @@ - +(define-key global-map "\M-%" 'query-replace) - -(define-key global-map "\M-%" 'query-replace) +;; FSF v20 binding +(define-key global-map [(control meta %)] 'query-replace-regexp) ; autoloaded
--- a/lisp/lisp-mode.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/lisp-mode.el Mon Aug 13 11:04:06 2007 +0200 @@ -766,6 +766,7 @@ (put 'unwind-protect 'lisp-indent-function 1) (put 'save-current-buffer 'lisp-indent-function 0) (put 'with-current-buffer 'lisp-indent-function 1) +(put 'with-string-as-buffer-contents 'lisp-indent-function 1) (put 'with-temp-file 'lisp-indent-function 1) (put 'with-temp-buffer 'lisp-indent-function 0) (put 'with-output-to-string 'lisp-indent-function 0)
--- a/lisp/list-mode.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/list-mode.el Mon Aug 13 11:04:06 2007 +0200 @@ -284,6 +284,7 @@ :user-data :reference-buffer (:help-string completion-default-help-string) + (:completion-string "Possible completions are:") :window-width) () (let ((old-buffer (current-buffer)) @@ -341,7 +342,8 @@ (if (/= (% count cols) 0) ; want ceiling... (1+ (/ count cols)) (/ count cols))))))) - (princ (gettext "Possible completions are:")) + (if (stringp cl-completion-string) + (princ (gettext cl-completion-string))) (let ((tail completions) (r 0) (regexp-string
--- a/lisp/loadup.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/loadup.el Mon Aug 13 11:04:06 2007 +0200 @@ -64,7 +64,6 @@ ;; the package path. ;; #### This code is duplicated in two other places. (let ((temp-path (expand-file-name "." (car load-path)))) - (setq source-directory temp-path) (setq load-path (nconc (mapcar #'(lambda (i) (concat i "/")) (directory-files temp-path t "^[^-.]" @@ -183,19 +182,16 @@ (dump-emacs (if (featurep 'infodock) "infodock" "xemacs") "temacs") (kill-emacs)) +;; Avoid error if user loads some more libraries now. +(setq purify-flag nil) + (when (member "run-temacs" command-line-args) (message "\nBootstrapping from temacs...") - (setq purify-flag nil) - (setq inhibit-early-packages t) - (setq inhibit-autoloads t) ;; Remove all args up to and including "run-temacs" (apply #'run-emacs-from-temacs (cdr (member "run-temacs" command-line-args))) ;; run-emacs-from-temacs doesn't actually return anyway. (kill-emacs)) -;; Avoid error if user loads some more libraries now. -(setq purify-flag nil) - ;; XEmacs change ;; If you are using 'recompile', then you should have used -l loadup-el.el ;; so that the .el files always get loaded (the .elc files may be out-of-
--- a/lisp/make-docfile.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/make-docfile.el Mon Aug 13 11:04:06 2007 +0200 @@ -81,8 +81,6 @@ ;; Then process the autoloads (setq autoload-file-name "auto-autoloads.elc") -(setq source-directory (concat default-directory "../lisp")) -;; (print (concat "Source directory: " source-directory)) (load "find-paths.el") (load "packages.el") (load "setup-paths.el")
--- a/lisp/menubar-items.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/menubar-items.el Mon Aug 13 11:04:06 2007 +0200 @@ -232,6 +232,7 @@ ["Set..." customize-customized] ["Apropos..." customize-apropos] ["Browse..." customize-browse] + ["List Packages" pui-list-packages] ["Update Packages" package-get-custom]) ("Editing Options" ["Overstrike" @@ -800,10 +801,10 @@ (fboundp 'browse-url-grail))] ) "-----" - ["Browse Faces..." (customize-face nil)] + ["Edit Faces..." (customize-face nil)] ("Font" :filter font-menu-family-constructor) ("Size" :filter font-menu-size-constructor) - ("Weight" :filter font-menu-weight-constructor) +; ("Weight" :filter font-menu-weight-constructor) "-----" ["Save Options" customize-save-customized] )
--- a/lisp/minibuf.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/minibuf.el Mon Aug 13 11:04:06 2007 +0200 @@ -243,6 +243,7 @@ (delete-region (point-min) (point))) (insert ?~)) + (defvar read-file-name-map (let ((map (make-sparse-keymap 'read-file-name-map))) (set-keymap-parents map (list minibuffer-local-completion-map)) @@ -447,12 +448,14 @@ (insert initial-contents) (setq current-minibuffer-contents initial-contents current-minibuffer-point (point)))) - (use-local-map (or keymap minibuffer-local-map)) + (use-local-map (help-keymap-with-help-key + (or keymap minibuffer-local-map) + minibuffer-help-form)) (let ((mouse-grabbed-buffer (and minibuffer-smart-completion-tracking-behavior (current-buffer))) (current-prefix-arg current-prefix-arg) - (help-form minibuffer-help-form) +;; (help-form minibuffer-help-form) (minibuffer-history-variable (cond ((not _history_) 'minibuffer-history) ((consp _history_) @@ -1452,6 +1455,7 @@ (read-from-minibuffer prompt (if num (prin1-to-string num)) nil t t)) ;no history + (input-error nil) (invalid-read-syntax nil) (end-of-file nil))) (or (funcall pred num) (beep))) @@ -1669,7 +1673,7 @@ 'read-directory-name-internal)) -;; Environment-variable completion hack +;; Environment-variable and ~username completion hack (defun read-file-name-internal-1 (string dir action completer) (if (not (string-match "\\([^$]\\|\\`\\)\\(\\$\\$\\)*\\$\\([A-Za-z0-9_]*\\|{[^}]*\\)\\'" @@ -1677,14 +1681,38 @@ ;; Not doing environment-variable completion hack (let* ((orig (if (equal string "") nil string)) (sstring (if orig (substitute-in-file-name string) string)) - (specdir (if orig (file-name-directory sstring) nil))) - (funcall completer - action - orig - sstring - specdir - (if specdir (expand-file-name specdir dir) dir) - (if orig (file-name-nondirectory sstring) string))) + (specdir (if orig (file-name-directory sstring) nil)) + (name (if orig (file-name-nondirectory sstring) string)) + (direct (if specdir (expand-file-name specdir dir) dir))) + ;; ~username completion + (if (and (fboundp 'user-name-completion-1) + (string-match "^[~]" name)) + (let ((user (substring name 1))) + (cond ((eq action 'lambda) + (file-directory-p name)) + ((eq action 't) + ;; all completions + (mapcar #'(lambda (p) (concat "~" p)) + (user-name-all-completions user))) + (t;; 'nil + ;; complete + (let* ((val+uniq (user-name-completion-1 user)) + (val (car val+uniq)) + (uniq (cdr val+uniq))) + (cond ((stringp val) + (if uniq + (file-name-as-directory (concat "~" val)) + (concat "~" val))) + ((eq val t) + (file-name-as-directory name)) + (t nil)))))) + (funcall completer + action + orig + sstring + specdir + direct + name))) ;; An odd number of trailing $'s (let* ((start (match-beginning 3)) (env (substring string
--- a/lisp/msw-faces.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/msw-faces.el Mon Aug 13 11:04:06 2007 +0200 @@ -26,15 +26,14 @@ ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. -;; This file does the magic to parse mswindows font names, and make sure that the -;; default and modeline attributes of new frames are specified enough. +;; This file does the magic to parse mswindows font names, and make sure that +;; the default and modeline attributes of new frames are specified enough. -;;; ensure that the default face has some reasonable fallbacks if nothing -;;; else is specified. +;;; Force creation of the default face font so that if it fails we get an +;;; error now instead of a crash at frame creation. (defun mswindows-init-device-faces (device) - (set-face-font 'default - '((mswindows default) . "Courier New:Regular:10") 'global) - ) + (unless (face-font-instance 'default device) + (error "Can't find a suitable default font"))) (defun mswindows-init-frame-faces (frame) @@ -48,12 +47,12 @@ ;;; A minimal mswindows font spec looks like: ;;; Courier New ;;; A maximal mswindows font spec looks like: -;;; Courier New:Bold Italic:10:underline strikeout:western +;;; Courier New:Bold Italic:10:underline strikeout:Western ;;; Missing parts of the font spec should be filled in with these values: -;;; Courier New:Normal:10::western +;;; Courier New:Regular:10::Western (defun mswindows-font-canonicalize-name (font) - "Given a mswindows font or font specification, this returns its -specification in canonical form." + "Given a mswindows font or font name, this returns its name in +canonical form." (if (or (font-instance-p font) (stringp font)) (let ((name (if (font-instance-p font) @@ -63,14 +62,14 @@ "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*:[a-zA-Z 0-9]*$" name) name) ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*$" - name) (concat name ":western")) + name) (concat name ":Western")) ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+$" name) - (concat name "::western")) + (concat name "::Western")) ((string-match "^[a-zA-Z ]+:[a-zA-Z ]*$" name) - (concat name ":10::western")) + (concat name ":10::Western")) ((string-match "^[a-zA-Z ]+$" name) - (concat name ":Normal:10::western")) - (t "Courier New:Normal:10::western"))))) + (concat name ":Regular:10::Western")) + (t "Courier New:Regular:10::Western"))))) (defun mswindows-make-font-bold (font &optional device) "Given a mswindows font specification, this attempts to make a bold font. @@ -88,7 +87,7 @@ ; makes it the same width (maybe at the expense of making it one pixel shorter) (if (font-instance-p newfont) (if (> (font-instance-width newfont) oldwidth) - (mswindows-find-smaller-font newfont) + (mswindows-find-smaller-font newfont device) newfont)))))) (defun mswindows-make-font-unbold (font &optional device) @@ -99,7 +98,7 @@ (string-match "^[a-zA-Z ]+:\\([a-zA-Z ]*\\):" name) (make-font-instance (concat (substring name 0 (match-beginning 1)) - "Normal" (substring name (match-end 1))) + "Regular" (substring name (match-end 1))) device t)))) (defun mswindows-make-font-italic (font &optional device) @@ -121,7 +120,7 @@ (string-match "^[a-zA-Z ]+:\\([a-zA-Z ]*\\):" name) (make-font-instance (concat (substring name 0 (match-beginning 1)) - "Normal" (substring name (match-end 1))) + "Regular" (substring name (match-end 1))) device t)))) (defun mswindows-make-font-bold-italic (font &optional device) @@ -140,7 +139,7 @@ ; makes it the same width (maybe at the expense of making it one pixel shorter) (if (font-instance-p newfont) (if (> (font-instance-width newfont) oldwidth) - (mswindows-find-smaller-font newfont) + (mswindows-find-smaller-font newfont device) newfont)))))) (defun mswindows-find-smaller-font (font &optional device)
--- a/lisp/package-admin.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/package-admin.el Mon Aug 13 11:04:06 2007 +0200 @@ -38,6 +38,70 @@ (defvar package-admin-temp-buffer "*Package Output*" "Temporary buffer where output of backend commands is saved.") +(defvar package-admin-install-function 'package-admin-default-install-function + "The function to call to install a package. +Three args are passed: FILENAME PKG-DIR BUF +Install package FILENAME into directory PKG-DIR, with any messages output +to buffer BUF.") + +(defvar package-admin-error-messages '( + "No space left on device" + "No such file or directory" + "Filename too long" + "Read-only file system" + "File too large" + "Too many open files" + "Not enough space" + "Permission denied" + "Input/output error" + "Out of memory" + "Unable to create directory" + "Directory checksum error" + "Cannot exclusively open file" + "corrupted file" + "incomplete .* tree" + "Bad table" + "corrupt input" + "invalid compressed data" + "too many leaves in Huffman tree" + "not a valid zip file" + "first entry not deflated or stored" + "encrypted file --" + "unexpected end of file" + ) + "Regular expressions of possible error messages. +After each package extraction, the `package-admin-temp-buffer' buffer is +scanned for these messages. An error code is returned if one of these are +found. + +This is awful, but it exists because error return codes aren't reliable +under MS Windows.") + +(defvar package-admin-tar-filename-regexps + '( + ;; GNU tar: + ;; drwxrwxr-x john/doe 123 1997-02-18 15:48 pathname + "\\S-+\\s-+[-a-z0-9_/]+\\s-+[0-9]+\\s-+[-0-9]+\\s-+[0-9:]+\\s-+\\(\\S-.*\\)" + ;; HP-UX & SunOS tar: + ;; rwxrwxr-x 501/501 123 Feb 18 15:46 1997 pathname + ;; Solaris tar (phooey!): + ;; rwxrwxr-x501/501 123 Feb 18 15:46 1997 pathname + ;; AIX tar: + ;; -rw-r--r-- 147 1019 32919 Mar 26 12:00:09 1992 pathname + "\\S-+\\s-*[-a-z0-9_]+[/ ][-a-z0-9_]+\\s-+[0-9]+\\s-+[a-z][a-z][a-z]\\s-+[0-9]+\\s-+[0-9:]+\\s-+[0-9]+\\s-+\\(\\S-.*\\)" + + ;; djtar: + ;; drwx Aug 31 02:01:41 1998 123 pathname + "\\S-+\\s-+[a-z][a-z][a-z]\\s-+[0-9]+\\s-+[0-9:]+\\s-+[0-9]+\\s-+[0-9]+\\s-+\\(\\S-.*\\)" + + ) + "List of regexps to use to search for tar filenames. +Note that \"\\(\" and \"\\)\" must be used to delimit the pathname (as +match #1). Don't put \"^\" to match the beginning of the line; this +is already implicit, as `looking-at' is used. Filenames can, +unfortunately, contain spaces, so be careful in constructing any +regexps.") + ;;;###autoload (defun package-admin-add-single-file-package (file destdir &optional pkg-dir) "Install a single file Lisp package into XEmacs package hierarchy. @@ -57,23 +121,356 @@ ;; rest of command line follows package-admin-xemacs file destination))) -;;;###autoload -(defun package-admin-add-binary-package (file &optional pkg-dir) - "Install a pre-bytecompiled XEmacs package into package hierarchy." - (interactive "fPackage tarball: ") +(defun package-admin-install-function-mswindows (file pkg-dir buf) + "Install function for mswindows" + (let ( (default-directory pkg-dir) ) + (call-process "djtar" nil buf t "-x" file) + )) + +(defun package-admin-default-install-function (file pkg-dir buf) + "Default function to install a package. +Install package FILENAME into directory PKG-DIR, with any messages output +to buffer BUF." + (let (filename) + (setq filename (expand-file-name file pkg-dir)) + ;; Don't assume GNU tar. + (if (shell-command (concat "gunzip -c " filename " | tar xvf -") buf) + 0 + 1) + )) + +; (call-process "add-big-package.sh" +; nil +; buf +; t +; ;; rest of command line follows +; package-admin-xemacs file pkg-dir)) + +(defun package-admin-get-install-dir (pkg-dir) (when (null pkg-dir) (when (or (not (listp late-packages)) (not late-packages)) (error "No package path")) (setq pkg-dir (car (last late-packages)))) + pkg-dir + ) - (let ((buf (get-buffer-create package-admin-temp-buffer))) - (call-process "add-big-package.sh" - nil - buf - t - ;; rest of command line follows - package-admin-xemacs file pkg-dir))) +(defun package-admin-get-manifest-file (pkg-topdir package) + "Return the name of the MANIFEST file for package PACKAGE. +Note that PACKAGE is a symbol, and not a string." + (let (dir) + (setq dir (expand-file-name "pkginfo" pkg-topdir)) + (expand-file-name (concat "MANIFEST." (symbol-name package)) dir) + )) + +(defun package-admin-check-manifest (pkg-outbuf pkg-topdir) + "Check for a MANIFEST.<package> file in the package distribution. +If it doesn't exist, create and write one. +PKG-OUTBUF is the buffer that holds the output from `tar', and PKG-TOPDIR +is the top-level directory under which the package was installed." + (let ( (manifest-buf " *pkg-manifest*") + old-case-fold-search regexp package-name pathname regexps) + ;; Save and restore the case-fold-search status. + ;; We do this in case we have to screw with it (as it the case of + ;; case-insensitive filesystems such as MS Windows). + (setq old-case-fold-search case-fold-search) + (unwind-protect + (save-excursion ;; Probably redundant. + (set-buffer (get-buffer pkg-outbuf)) ;; Probably already the + ;; current buffer. + (goto-char (point-min)) + + ;; Make filenames case-insensitive, if necessary + (if (eq system-type 'windows-nt) + (setq case-fold-search t)) + + ;; We really should compute the regexp. + ;; However, directory-sep-char is currently broken, but we need + ;; functional code *NOW*. + (setq regexp "\\bpkginfo[\\/]MANIFEST\\...*") + + ;; Look for the manifest. + (if (not (re-search-forward regexp nil t)) + (progn + ;; We didn't find a manifest. Make one. + + ;; Yuk. We weren't passed the package name, and so we have + ;; to dig for it. Look for it as the subdirectory name below + ;; "lisp", "man", "info", or "etc". + ;; Here, we don't use a single regexp because we want to search + ;; the directories for a package name in a particular order. + ;; The problem is that packages could have directories like + ;; "etc/sounds/" or "etc/photos/" and we don't want to get + ;; these confused with the actual package name (although, in + ;; the case of "etc/sounds/", it's probably correct). + (if (catch 'done + (let ( (dirs '("lisp" "info" "man" "etc")) rexp) + (while dirs + (setq rexp (concat "\\b" (car dirs) + "[\\/]\\([^\\/]+\\)[\//]")) + (if (re-search-forward rexp nil t) + (throw 'done t)) + (setq dirs (cdr dirs)) + ))) + (progn + (setq package-name (buffer-substring (match-beginning 1) + (match-end 1))) + + ;; Get and erase the manifest buffer + (setq manifest-buf (get-buffer-create manifest-buf)) + (buffer-disable-undo manifest-buf) + (erase-buffer manifest-buf) + + ;; Now, scan through the output buffer, looking for + ;; file and directory names. + (goto-char (point-min)) + ;; for each line ... + (while (< (point) (point-max)) + (beginning-of-line) + (setq pathname nil) + + ;; scan through the regexps, looking for a pathname + (if (catch 'found-path + (setq regexps package-admin-tar-filename-regexps) + (while regexps + (if (looking-at (car regexps)) + (progn + (setq pathname + (buffer-substring + (match-beginning 1) + (match-end 1))) + (throw 'found-path t) + )) + (setq regexps (cdr regexps)) + ) + ) + (progn + ;; found a pathname -- add it to the manifest + ;; buffer + (save-excursion + (set-buffer manifest-buf) + (goto-char (point-max)) + (insert pathname "\n") + ) + )) + (forward-line 1) + ) + + ;; Processed all lines. + ;; Now, create the file, pkginfo/MANIFEST.<pkgname> + + ;; We use `expand-file-name' instead of `concat', + ;; for portability. + (setq pathname (expand-file-name "pkginfo" + pkg-topdir)) + ;; Create pkginfo, if necessary + (if (not (file-directory-p pathname)) + (make-directory pathname)) + (setq pathname (expand-file-name + (concat "MANIFEST." package-name) + pathname)) + (save-excursion + (set-buffer manifest-buf) + ;; Put the files in sorted order + (sort-lines nil (point-min) (point-max)) + ;; Write the file. + ;; Note that using `write-region' *BYPASSES* any check + ;; to see if XEmacs is currently editing/visiting the + ;; file. + (write-region (point-min) (point-max) pathname) + ) + (kill-buffer manifest-buf) + ) + (progn + ;; We can't determine the package name from an extracted + ;; file in the tar output buffer. + )) + )) + ) + ;; Restore old case-fold-search status + (setq case-fold-search old-case-fold-search)) + )) + +;;;###autoload +(defun package-admin-add-binary-package (file &optional pkg-dir) + "Install a pre-bytecompiled XEmacs package into package hierarchy." + (interactive "fPackage tarball: ") + (let ((buf (get-buffer-create package-admin-temp-buffer)) + (status 1) + start err-list + ) + (setq pkg-dir (package-admin-get-install-dir pkg-dir)) + ;; Insure that the current directory doesn't change + (save-excursion + (set-buffer buf) + (setq default-directory pkg-dir) + (setq case-fold-search t) + (buffer-disable-undo) + (goto-char (setq start (point-max))) + (if (= 0 (setq status (funcall package-admin-install-function + file pkg-dir buf))) + (progn + ;; First, check for errors. + ;; We can't necessarily rely upon process error codes. + (catch 'done + (goto-char start) + (setq err-list package-admin-error-messages) + (while err-list + (if (re-search-forward (car err-list) nil t) + (progn + (setq status 1) + (throw 'done nil) + )) + (setq err-list (cdr err-list)) + ) + ) + ;; Make sure that the MANIFEST file exists + (package-admin-check-manifest buf pkg-dir) + )) + ) + status + )) + +(defun package-admin-rmtree (directory) + "Delete a directory and all of its contents, recursively. +This is a feeble attempt at making a portable rmdir." + (let ( (orig-default-directory default-directory) files dirs dir) + (unwind-protect + (progn + (setq directory (file-name-as-directory directory)) + (setq files (directory-files directory nil nil nil t)) + (setq dirs (directory-files directory nil nil nil 'dirs)) + (while dirs + (setq dir (car dirs)) + (if (file-symlink-p dir) ;; just in case, handle symlinks + (delete-file dir) + (if (not (or (string-equal dir ".") (string-equal dir ".."))) + (package-admin-rmtree (expand-file-name dir directory)))) + (setq dirs (cdr dirs)) + ) + (setq default-directory directory) + (condition-case err + (progn + (while files + (delete-file (car files)) + (setq files (cdr files)) + ) + (delete-directory directory) + ) + (file-error + (message "%s: %s: \"%s\"" (nth 1 err) (nth 2 err) (nth 3 err))) + ) + ) + (progn + (setq default-directory orig-default-directory) + )) + )) + +(defun package-admin-get-lispdir (pkg-topdir package) + (let (package-lispdir) + (if (and (setq package-lispdir (expand-file-name "lisp" pkg-topdir)) + (setq package-lispdir (expand-file-name (symbol-name package) + package-lispdir)) + (file-accessible-directory-p package-lispdir)) + package-lispdir) + )) + +(defun package-admin-delete-binary-package (package pkg-topdir) + "Delete a binary installation of PACKAGE below directory PKG-TOPDIR. +PACKAGE is a symbol, not a string." + (let ( (tmpbuf " *pkg-manifest*") manifest-file package-lispdir dirs file) + (if (not pkg-topdir) + (setq pkg-topdir (package-admin-get-install-dir nil))) + (setq manifest-file (package-admin-get-manifest-file pkg-topdir package)) + (if (file-exists-p manifest-file) + (progn + ;; The manifest file exists! Use it to delete the old distribution. + (message "Removing old files for package \"%s\" ..." package) + (sit-for 0) + (setq tmpbuf (get-buffer-create tmpbuf)) + (save-excursion + (set-buffer tmpbuf) + (buffer-disable-undo tmpbuf) + (erase-buffer tmpbuf) + (insert-file-contents manifest-file) + (goto-char (point-min)) + ;; For each entry in the MANIFEST ... + (while (< (point) (point-max)) + (beginning-of-line) + (setq file (expand-file-name (buffer-substring + (point) + (save-excursion (end-of-line) + (point))) + pkg-topdir)) + (if (file-directory-p file) + ;; Keep a record of each directory + (setq dirs (cons file dirs)) + (progn + ;; Delete each file. + ;; Make sure that the file is writable. + ;; (This is important under MS Windows.) + (set-file-modes file 438) ;; 438 -> #o666 + (delete-file file) + )) + (forward-line 1) + ) + ;; Delete empty directories. + (if dirs + (let ( (orig-default-directory default-directory) + directory files file ) + ;; Make sure we preserve the existing `default-directory'. + (unwind-protect + (progn + ;; Warning: destructive sort! + (setq dirs (nreverse (sort dirs 'string<))) + ;; For each directory ... + (while dirs + (setq directory (file-name-as-directory (car dirs))) + (setq files (directory-files directory)) + ;; Delete the directory if it's empty. + (if (catch 'done + (while files + (setq file (car files)) + (if (and (not (string= file ".")) + (not (string= file ".."))) + (throw 'done nil)) + (setq files (cdr files)) + ) + t) + (delete-directory directory)) + (setq dirs (cdr dirs)) + ) + ) + (setq default-directory orig-default-directory) + ))) + ) + (kill-buffer tmpbuf) + ;; Delete the MANIFEST file + (set-file-modes manifest-file 438) ;; 438 -> #o666 + (delete-file manifest-file) + (message "Removing old files for package \"%s\" ... done" package) + ) + (progn + ;; The manifest file doesn't exist. Fallback to just deleting the + ;; package-specific lisp directory, if it exists. + ;; + ;; Delete old lisp directory, if any + ;; Gads, this is ugly. However, we're not supposed to use `concat' + ;; in the name of portability. + (if (setq package-lispdir (package-admin-get-lispdir pkg-topdir + package)) + (progn + (message "Removing old lisp directory \"%s\" ..." + package-lispdir) + (sit-for 0) + (package-admin-rmtree package-lispdir) + (message "Removing old lisp directory \"%s\" ... done" + package-lispdir) + )) + )) + ;; Delete the package from the database of installed packages. + (package-delete-name package) + )) (provide 'package-admin)
--- a/lisp/package-get-base.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/package-get-base.el Mon Aug 13 11:04:06 2007 +0200 @@ -1,1463 +1,1540 @@ (setq package-get-base -'((eudc +'((bbdb (standards-version 1.0 - version "1.09" - author-version "1.09" - date "1998-06-30" - build-date "1998-06-30" + version "1.01" + author-version "2.0" + date "1998-07-19" + build-date "1998-09-19" + maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" + distribution stable + priority medium + category "comm" + dump nil + description "The Big Brother Data Base" + filename "bbdb-1.01-pkg.tar.gz" + md5sum "95ab2746d9cf3a105cab61eb65ecd64d" + size 274056 + provides (bbdb) + requires (bbdb edit-utils gnus mh-e rmail supercite vm tm apel mail-lib xemacs-base) + type regular +)) +(eudc + (standards-version 1.0 + version "1.22" + author-version "1.21" + date "1998-08-22" + build-date "1998-09-19" maintainer "Oscar Figueiredo <Oscar.Figueiredo@epfl.ch>" distribution stable priority low category "comm" dump nil description "Emacs Unified Directory Client (LDAP, PH)." - filename "eudc-1.09-pkg.tar.gz" - md5sum "517bfd3112700fd3dcfc59e02bbb0b12" - size 40867 + filename "eudc-1.22-pkg.tar.gz" + md5sum "25cd2405e5adcf796923f206d55cd3d6" + size 45221 provides (eudc eudc-ldap eudc-ph) requires (fsf-compat xemacs-base) type regular )) (footnote (standards-version 1.0 - version "1.03" + version "1.06" author-version "0.18x" - date "1998-06-01" - build-date "1998-06-01" + date "1998-08-27" + build-date "1998-09-19" maintainer "SL Baur <steve@xemacs.org>" distribution stable priority low category "comm" dump nil description "Footnoting in mail message editing modes." - filename "footnote-1.03-pkg.tar.gz" - md5sum "bea3aa23b37988f690fa56ba8cc11e92" - size 18199 + filename "footnote-1.06-pkg.tar.gz" + md5sum "796323a84d97bade70a5d78fd9076a2e" + size 13551 provides (footnote) requires (mail-lib xemacs-base) type regular )) (gnats (standards-version 1.0 - version "1.03" + version "1.06" author-version "3.101" - date "1998-04-06" - build-date "1998-04-17" + date "1998-08-01" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority high category "comm" dump nil description "XEmacs bug reports." - filename "gnats-1.03-pkg.tar.gz" - md5sum "2b8f3a25baa78ffd23927ac5bb5777b5" - size 126412 + filename "gnats-1.06-pkg.tar.gz" + md5sum "5759d3cdefcc57f7a36c2f30a5868abe" + size 186656 provides (gnats gnats-admin send-pr) requires (mail-lib xemacs-base) type regular )) (gnus (standards-version 1.0 - version "1.21" - author-version "5.6.23" - date "1998-07-06" - build-date "1998-07-09" + version "1.28" + author-version "5.6.43x1" + date "1998-09-05" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "comm" dump nil description "The Gnus Newsreader and Mailreader." - filename "gnus-1.21-pkg.tar.gz" - md5sum "6d58f34293ec00bbd297a6abb98fe2e9" - size 1693384 + filename "gnus-1.28-pkg.tar.gz" + md5sum "fc47129ff589191a7361d2eac494bde6" + size 1871939 provides (gnus message) requires (gnus w3 mh-e mailcrypt rmail mail-lib xemacs-base) type regular )) +(irchat + (standards-version 1.0 + version "1.01" + author-version "980625-2" + date "oc + key " + build-date "1998-09-19" + maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" + distribution stable + priority medium + category "comm" + dump nil + description "ZENIRC IRC Client." + filename "irchat-1.01-pkg.tar.gz" + md5sum "c94bd691cb42e5ba23fbfe26daea2dc8" + size 169192 + provides (irchat) + requires () + type regular +)) (mailcrypt (standards-version 1.0 - version "1.04" + version "1.05" author-version "3.4" date "1998-01-24" - build-date "1998-06-14" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "comm" dump nil description "Support for messaging encryption with PGP." - filename "mailcrypt-1.04-pkg.tar.gz" - md5sum "66601a110f1499d3c6f815f806e43a71" - size 66937 + filename "mailcrypt-1.05-pkg.tar.gz" + md5sum "9ae0b8a3dd2c9b308024813fef24cc3c" + size 88944 provides (mailcrypt) requires (gnus vm mail-lib xemacs-base) type regular )) (mew (standards-version 1.0 - version "1.0" + version "1.01" author-version "1.93b38" date "1998-06-21" - build-date "1998-06-21" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution contrib priority low category "comm" dump nil description "Messaging in an Emacs World." - filename "mew-1.0-pkg.tar.gz" - md5sum "be366b8dd9495ecb7b3b6a7a46563faa" - size 441775 + filename "mew-1.01-pkg.tar.gz" + md5sum "769d0647f7a411a8026aab4bf56d93c6" + size 523578 provides (mew) requires (mew) type regular )) (mh-e (standards-version 1.0 - version "1.05" + version "1.07" author-version "21.0" - date "1998-01-24" - build-date "1998-06-14" + date "1998-07-12" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution contrib priority low category "comm" dump nil description "Front end support for MH." - filename "mh-e-1.05-pkg.tar.gz" - md5sum "62b8598c55698c74ddfe71e874f0fe5e" - size 129257 + filename "mh-e-1.07-pkg.tar.gz" + md5sum "d9ac55c06077c00a4db554dcc6e41dea" + size 178838 provides (mh-e) requires (mail-lib xemacs-base) type regular )) (net-utils (standards-version 1.0 - version "1.08" + version "1.09" author-version "21.0" date "1998-07-01" - build-date "1998-07-09" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "comm" dump nil description "Miscellaneous Networking Utilities." - filename "net-utils-1.08-pkg.tar.gz" - md5sum "2591eca88f5ea04272012e479ea8665c" - size 107983 + filename "net-utils-1.09-pkg.tar.gz" + md5sum "597c6bc3aac41b64768d4eb7ae167805" + size 115926 provides (ilisp-browse-cltl2 emacsbug feedmail metamail net-utils rcompile shadowfile webjump webster-www) requires (w3 efs mail-lib xemacs-base) type single )) +(gnus + (standards-version 1.0 + version "1.01" + author-version "0.31" + date "1998-09-08" + build-date "1998-09-19" + maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" + distribution unstable + priority medium + category "comm" + dump nil + description "The Gnus Newsreader and Mailreader." + filename "pgnus-1.01-pkg.tar.gz" + md5sum "2725e2f5f52079a1966f6e2195aab479" + size 1969810 + provides (gnus message) + requires (pgnus w3 mh-e mailcrypt rmail mail-lib xemacs-base) + type regular +)) (rmail (standards-version 1.0 - version "1.04" + version "1.06" author-version "21.0" date "1998-06-28" - build-date "1998-07-09" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution contrib priority low category "comm" dump nil description "An obsolete Emacs mailer." - filename "rmail-1.04-pkg.tar.gz" - md5sum "5a4fc73565cb0e9ea62d6b0665ccb013" - size 85711 + filename "rmail-1.06-pkg.tar.gz" + md5sum "cc42e7660a4eb911b8cbc151f331c36b" + size 96472 provides (rmail rmailsum) requires (tm apel mail-lib xemacs-base) type regular )) (supercite (standards-version 1.0 - version "1.07" - author-version "3.55x" - date "1998-05-07" - build-date "1998-06-14" + version "1.09" + author-version "3.55x2" + date "1998-08-9" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "comm" dump nil description "An Emacs citation tool for News & Mail messages." - filename "supercite-1.07-pkg.tar.gz" - md5sum "c1ef998b1819e6b19efd10bf0e48534c" - size 71084 + filename "supercite-1.09-pkg.tar.gz" + md5sum "3b2758fd09e036b9c7ce258d0ee61d5a" + size 98926 provides (supercite) requires (mail-lib xemacs-base) type regular )) (tm (standards-version 1.0 - version "1.09" + version "1.13" author-version "21.0" - date "1998-06-09" - build-date "1998-07-09" + date "1998-08-27" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "comm" dump nil description "Emacs MIME support." - filename "tm-1.09-pkg.tar.gz" - md5sum "a5697117fc719a9c5a74a62f6b812101" - size 253269 + filename "tm-1.13-pkg.tar.gz" + md5sum "ba0feda4e61c1006c8e17c641de0b6d2" + size 336736 provides (tm tm-edit tm-view mime-setup) requires (gnus mh-e rmail vm mailcrypt mail-lib apel xemacs-base) type regular )) (vm (standards-version 1.0 - version "1.09" - author-version "6.53" - date "1998-06-26" - build-date "1998-07-09" + version "1.11" + author-version "6.62" + date "1998-09-19" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "comm" - dump t + dump nil description "An Emacs mailer." - filename "vm-1.09-pkg.tar.gz" - md5sum "a3dd4a14155abf835275120c62ca82fd" - size 514307 + filename "vm-1.11-pkg.tar.gz" + md5sum "56e65cbfb38283de030195b33f80be1b" + size 503615 provides (vm) requires (mail-lib xemacs-base) type regular )) (w3 (standards-version 1.0 - version "1.06" - author-version "4.0pre18" - date "1998-05-01" - build-date "1998-05-02" + version "1.09" + author-version "4.0pre23" + date "1998-07-18" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution experimental priority high category "comm" dump nil description "A Web browser." - filename "w3-1.06-pkg.tar.gz" - md5sum "fea5098f9e8dd5b3b82e3ebe7d447b9c" - size 581731 + filename "w3-1.09-pkg.tar.gz" + md5sum "ceb4e1e0d9e11102b1ff2a5cb7b77d0f" + size 638496 provides (w3 url) requires (w3 mail-lib xemacs-base) type regular )) +(zenirc + (standards-version 1.0 + version "1.01" + author-version "2.112" + date "1998-08-15" + build-date "1998-09-19" + maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" + distribution stable + priority medium + category "comm" + dump nil + description "ZENIRC IRC Client." + filename "zenirc-1.01-pkg.tar.gz" + md5sum "558723a7d70b1608a046068444f5045f" + size 290655 + provides (zenirc) + requires (zenirc) + type regular +)) (cookie (standards-version 1.0 - version "1.07" - author-version "21.0b36" + version "1.08" + author-version "21.0" date "1998-04-07" - build-date "1998-04-17" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "games" dump nil description "Spook and Yow (Zippy quotes)." - filename "cookie-1.07-pkg.tar.gz" - md5sum "df97f80082395667a0e23eda8f68b8dd" - size 34184 + filename "cookie-1.08-pkg.tar.gz" + md5sum "aa71e9df700ad89eb803d1100af331dd" + size 34274 provides (cookie1 yow) requires (xemacs-base) type regular )) (games (standards-version 1.0 - version "1.05" + version "1.06" author-version "1.04" date "1998-06-04" - build-date "1998-07-09" + build-date "1998-09-19" maintainer "Glynn Clements <glynn@sensei.co.uk>" distribution stable priority low category "games" dump nil description "Tetris, Sokoban, and Snake." - filename "games-1.05-pkg.tar.gz" - md5sum "2b856bc25a05ad32400bdd947fec6231" - size 32000 + filename "games-1.06-pkg.tar.gz" + md5sum "6db6e872cdcce09b3e9b1e3425dcc20a" + size 31993 provides (gamegrid snake tetris sokoban) requires (xemacs-base) type regular )) (mine (standards-version 1.0 - version "1.05" - author-version "1.8x1" - date "1998-03-31" - build-date "1998-04-04" + version "1.08" + author-version "1.9" + date "1998-05-09" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "games" dump nil description "Minehunt Game." - filename "mine-1.05-pkg.tar.gz" - md5sum "330cd395304f600487b748d466993e06" - size 67568 + filename "mine-1.08-pkg.tar.gz" + md5sum "468ed5ccd1b86cd91572a901e156e7e2" + size 66924 provides (xmine) requires (xemacs-base) type regular )) (misc-games (standards-version 1.0 - version "1.06" - author-version "21.0b35" + version "1.07" + author-version "21.0" date "1998-03-22" - build-date "1998-04-04" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "games" dump nil description "Other amusements and diversions." - filename "misc-games-1.06-pkg.tar.gz" - md5sum "48d883e7e6092c227b476386ece41672" - size 165586 + filename "misc-games-1.07-pkg.tar.gz" + md5sum "c7898266da95831f5797e849f740fd4c" + size 175489 provides (decipher gomoku hanoi life morse rot13) requires (xemacs-base) type single )) (Sun (standards-version 1.0 - version "1.05" - author-version "21.0b35" - date "1998-03-06" - build-date "1998-04-04" + version "1.08" + author-version "21.0" + date "1998-07-25" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution sun priority low category "libs" - dump t + dump nil description "Support for Sparcworks." - filename "Sun-1.05-pkg.tar.gz" - md5sum "70a776046ea5b12d08ca7276484f6139" - size 63826 + filename "Sun-1.08-pkg.tar.gz" + md5sum "faeaa48c2700604e5742b7a509b2a154" + size 72951 provides (sccs eos-browser eos-common eos-debugger eos-debugger eos-editor eos-init eos-load eos-menubar eos-toolbar sunpro) requires (cc-mode xemacs-base) type regular )) (apel (standards-version 1.0 - version "1.04" + version "1.06" author-version "3.3" - date "1998-01-24" - build-date "1998-04-04" + date "1998-07-23" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution mule priority high category "libs" dump nil description "A Portable Emacs Library. Used by XEmacs MIME support." - filename "apel-1.04-pkg.tar.gz" - md5sum "7082f6eaa80bfef9e655e1c603ff68d3" - size 34597 + filename "apel-1.06-pkg.tar.gz" + md5sum "56aabd95da4333887bfd9134f5cbe6ac" + size 38742 provides (atype emu-20 emu-e19 emu-x20 emu-xemacs emu file-detect filename install mule-caesar path-util richtext std11-parse std11 tinyrich) requires (fsf-compat xemacs-base) type regular )) (dired (standards-version 1.0 - version "1.01" + version "1.02" author-version "7.9" date "1998-05-05" - build-date "1998-05-05" + build-date "1998-09-19" maintainer "Mike Sperber <sperber@informatik.uni-tuebingen.de>" distribution stable priority medium category "libs" dump nil description "Manage file systems." - filename "dired-1.01-pkg.tar.gz" - md5sum "d9748d8e8af8a63095aaaab9924987ef" - size 187526 + filename "dired-1.02-pkg.tar.gz" + md5sum "fd009a9bcff0f9a14d9f51665fe9c685" + size 197926 provides (diff dired) requires (xemacs-base) type regular )) (edebug (standards-version 1.0 - version "1.04" - author-version "21.0b35" + version "1.05" + author-version "21.0" date "1998-03-12" - build-date "1998-04-04" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "libs" dump nil description "An Emacs Lisp debugger." - filename "edebug-1.04-pkg.tar.gz" - md5sum "d4a46e9bee361d60cb079731e5b152e9" - size 118141 + filename "edebug-1.05-pkg.tar.gz" + md5sum "26ff707c557ce5ae53317f391897dde9" + size 113971 provides (edebug cl-read cust-print eval-reg cl-specs) requires (xemacs-base) type regular )) (efs (standards-version 1.0 - version "1.08" - author-version "1.16x1" - date "1998-03-21" - build-date "1998-04-04" + version "1.10" + author-version "1.17" + date "1998-08-23" + build-date "1998-09-19" maintainer "Mike Sperber <sperber@informatik.uni-tuebingen.de>" distribution stable priority medium category "libs" dump nil description "Treat files on remote systems the same as local files." - filename "efs-1.08-pkg.tar.gz" - md5sum "1ec45851fe72d06d32a6f941877ae544" - size 347544 + filename "efs-1.10-pkg.tar.gz" + md5sum "5f4fdf921b2800eb5dc0de6241253419" + size 363608 provides (efs) requires (xemacs-base vm dired) type regular )) (fsf-compat (standards-version 1.0 - version "1.0" - author-version "21.0b39" + version "1.02" + author-version "21.0" date "1998-03-25" - build-date "1998-05-06" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution mule priority high category "libs" dump nil description "FSF Emacs compatibility files." - filename "fsf-compat-1.0-pkg.tar.gz" - md5sum "71351ff26a69b341015612d9b88dfc55" - size 16083 + filename "fsf-compat-1.02-pkg.tar.gz" + md5sum "3beb2ba9863cbee8a857acf5af00a8e8" + size 18208 provides (overlay thingatpt timer) requires () type single )) (mail-lib (standards-version 1.0 - version "1.16" + version "1.17" author-version "21.0" date "1998-06-08" - build-date "1998-06-14" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "libs" dump nil description "Fundamental lisp files for providing email support." - filename "mail-lib-1.16-pkg.tar.gz" - md5sum "8466339df937c3e7dc4176df85987cf3" - size 120230 + filename "mail-lib-1.17-pkg.tar.gz" + md5sum "efe51eec9acce37695c5fb092dabb079" + size 127025 provides (browse-url highlight-headers mail-abbrevs mail-extr mail-utils reporter rfc822 rmail-mini rmailout sendmail smtpmail) requires (xemacs-base) type regular )) (sounds-au (standards-version 1.0 - version "1.02" + version "1.03" author-version "21.0" date "1998-06-30" - build-date "1998-07-09" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority high category "libs" dump nil description "XEmacs Sun sound files." - filename "sounds-au-1.02-pkg.tar.gz" - md5sum "061ab67267c7cdfe37472141130d19ff" - size 125736 + filename "sounds-au-1.03-pkg.tar.gz" + md5sum "9ae6e0154c4fce763cfd453e98f94682" + size 125773 provides () requires () type regular )) (sounds-wav (standards-version 1.0 - version "1.02" + version "1.03" author-version "21.0" date "1998-06-30" - build-date "1998-07-09" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority high category "libs" dump nil description "XEmacs Microsoft sound files." - filename "sounds-wav-1.02-pkg.tar.gz" - md5sum "c970808088c408bfd780dc8466a848b3" - size 148621 + filename "sounds-wav-1.03-pkg.tar.gz" + md5sum "15a8c6e740202d0c7542c5ebc2837838" + size 148595 provides () requires () type regular )) (tooltalk (standards-version 1.0 - version "1.04" - author-version "21.0b35" - date "1998-01-24" - build-date "1998-04-04" + version "1.07" + author-version "21.0" + date "1998-07-25" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution contrib priority low category "libs" - dump t + dump nil description "Support for building with Tooltalk." - filename "tooltalk-1.04-pkg.tar.gz" - md5sum "60ea390c4aa203ea26d66ddb2f3ad99f" - size 9245 + filename "tooltalk-1.07-pkg.tar.gz" + md5sum "d9a97f43212d794ceebc964dc563dd17" + size 9213 provides () requires () type regular )) (xemacs-base (standards-version 1.0 - version "1.21" + version "1.24" author-version "21.0" - date "1998-07-02" - build-date "1998-07-09" + date "1998-08-06" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution mule priority high category "libs" dump nil description "Fundamental XEmacs support, you almost certainly need this." - filename "xemacs-base-1.21-pkg.tar.gz" - md5sum "1807f3591bc644c52d41bf472cd30bfc" - size 458268 + filename "xemacs-base-1.24-pkg.tar.gz" + md5sum "505536311107548faff51c7a4510ad08" + size 456033 provides (add-log advice annotations assoc case-table chistory comint-xemacs comint compile debug ebuff-menu echistory edmacro ehelp electric enriched env facemenu ffap helper imenu iso-syntax macros novice outline overlay passwd pp regi ring shell skeleton sort thing time-stamp timezone xbm-button xpm-button) requires () type regular )) (xemacs-devel (standards-version 1.0 - version "1.13" + version "1.16" author-version "21.0" - date "1998-06-15" - build-date "1998-06-19" + date "1998-08-19" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "libs" dump nil description "Emacs Lisp developer support." - filename "xemacs-devel-1.13-pkg.tar.gz" - md5sum "3bec2cd2b955fa86617335ad14480e1a" - size 78840 + filename "xemacs-devel-1.16-pkg.tar.gz" + md5sum "e5b592061957f041afcd45ed5ecc30cf" + size 85457 provides (docref eldoc elp find-func hide-copyleft ielm regexp-opt trace) requires (xemacs-base) type single )) (edict (standards-version 1.0 - version "1.03" + version "1.05" author-version "0.9.8" - date "1998-06-29" - build-date "1998-07-09" + date "1998-07-23" + build-date "1998-09-19" maintainer "Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>" distribution mule priority high category "mule" dump nil description "Lisp Interface to EDICT, Kanji Dictionary" - filename "edict-1.03-pkg.tar.gz" - md5sum "0f317174ab3e163780f26c6fcfe0eccb" - size 94823 + filename "edict-1.05-pkg.tar.gz" + md5sum "f3b0db7eb896cbbb0409d04d1f02ebbe" + size 75070 provides (dui-registry dui edict-edit edict-english edict-japanese edict-morphology edict-test edict ts-mode) requires (mule-base xemacs-base) type regular )) (egg-its (standards-version 1.0 - version "1.05" + version "1.10" author-version "21.0" - date "1998-06-20" - build-date "1998-07-09" + date "1998-08-11" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution mule priority high category "mule" dump t description "Wnn (4.2 and 6) support. SJ3 support." - filename "egg-its-1.05-pkg.tar.gz" - md5sum "ef131233410ea57fad940b40cb3c786c" - size 259670 + filename "egg-its-1.10-pkg.tar.gz" + md5sum "2eb3fb60b3cfb1f3d7b63bd8a95426a6" + size 255348 provides (egg-cnpinyin egg-cnzhuyin egg-cwnn-leim egg-jisx0201 egg-jsymbol egg-kwnn-leim egg-leim egg-sj3-client egg-sj3-leim egg-sj3 egg-wnn egg) - requires (leim mule-base xemacs-base) + requires (leim mule-base fsf-compat xemacs-base) type regular )) (leim (standards-version 1.0 - version "1.07" - author-version "21.0b36" - date "1998-04-09" - build-date "1998-04-17" + version "1.09" + author-version "21.0" + date "1998-07-23" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution mule priority medium category "mule" dump nil description "Quail. All non-English and non-Japanese language support." - filename "leim-1.07-pkg.tar.gz" - md5sum "91ef40389a36d7236ce3e9536c5097e1" - size 1744016 + filename "leim-1.09-pkg.tar.gz" + md5sum "dab730405c3843bd2a14a9821a46d1cf" + size 1742759 provides () requires (mule-base fsf-compat xemacs-base) type regular )) (locale (standards-version 1.0 - version "1.04" - author-version "21.0b35" - date "1998-03-01" - build-date "1998-04-04" + version "1.09" + author-version "21.0" + date "1998-07-24" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution mule priority high category "mule" dump nil description "Localized menubars and localized splash screens." - filename "locale-1.04-pkg.tar.gz" - md5sum "5d6dd1391ac017f4f210a810db2541cb" - size 34651 + filename "locale-1.09-pkg.tar.gz" + md5sum "c5d2bb5bcd35e8f2f3033b5ef03398fe" + size 32872 provides () requires (mule-base) type regular )) (mule-base (standards-version 1.0 - version "1.19" + version "1.22" author-version "21.0" - date "1998-07-09" - build-date "1998-07-09" + date "1998-08-12" + build-date "1998-09-19" maintainer "SL Baur <steve@altair.xemacs.org>" distribution mule priority high category "mule" dump t description "Basic Mule support, required for building with Mule." - filename "mule-base-1.19-pkg.tar.gz" - md5sum "ac5ed26ee38de23d3591c37a283bc7b5" - size 488988 + filename "mule-base-1.22-pkg.tar.gz" + md5sum "82741caa8f936d8e007b3adf1e9c63c2" + size 519183 provides (canna-leim canna char-table china-util cyril-util isearch-ext japan-util ccl can-n-egg mule-help) requires (fsf-compat xemacs-base) type regular )) (skk (standards-version 1.0 - version "1.06" + version "1.09" author-version "10.38" - date "1998-04-28" - build-date "1998-05-01" + date "1998-07-23" + build-date "1998-09-19" maintainer "SL Baur <steve@altair.xemacs.org>" distribution mule priority medium category "mule" dump t description "Japanese Language Input Method." - filename "skk-1.06-pkg.tar.gz" - md5sum "ccc92c60519be92efef3c40696897ef7" - size 1467006 + filename "skk-1.09-pkg.tar.gz" + md5sum "21b1d3bb5bdfe939fb629719b67c68ac" + size 1524350 provides (skk skk-tut) requires (viper mule-base xemacs-base) type regular )) (calc (standards-version 1.0 - version "1.05" - author-version "2.02fX1" - date "1998-02-27" - build-date "1998-06-14" + version "1.08" + author-version "2.02fX3" + date "1998-07-25" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "oa" dump nil description "Emacs calculator" - filename "calc-1.05-pkg.tar.gz" - md5sum "cc170d1a19718a152144dfd0a66f6865" - size 1165091 + filename "calc-1.08-pkg.tar.gz" + md5sum "b5ffe11d94688709d4131c9d39541866" + size 1609129 provides (calc) requires () type regular )) (calendar (standards-version 1.0 - version "1.04" + version "1.07" author-version "21.0" - date "1998-06-19" - build-date "1998-07-09" + date "1998-09-01" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "oa" dump nil description "Calendar and diary support." - filename "calendar-1.04-pkg.tar.gz" - md5sum "c0955508d51af1524ca8ef6687b362f1" - size 239851 + filename "calendar-1.07-pkg.tar.gz" + md5sum "61f7aafd5d103ed66cca835ed3583abe" + size 251917 provides (appt cal-dst cal-french cal-mayan cal-x cal-xemacs calendar diary-ins diary-lib holidays lunar solar) requires (xemacs-base) type regular )) (edit-utils (standards-version 1.0 - version "1.24" + version "1.30" author-version "21.0" - date "1998-06-13" - build-date "1998-06-14" + date "1998-09-18" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority high category "oa" dump nil description "Miscellaneous editor extensions, you probably need this." - filename "edit-utils-1.24-pkg.tar.gz" - md5sum "0b7136586f8b47e9b000bcf08f9b75a0" - size 584396 + filename "edit-utils-1.30-pkg.tar.gz" + md5sum "9ed576dd1f01cd57a9f0b699cdce36fe" + size 595610 provides (abbrevlist atomic-extents avoid backup-dir balloon-help big-menubar blink-cursor blink-paren bookmark compare-w completion dabbrev desktop detached-minibuf edit-toolbar fast-lock file-part floating-toolbar flow-ctrl foldout func-menu hippie-exp icomplete id-select info-look iswitchb lazy-lock lazy-shot live-icon man mic-paren paren popper mode-motion+ outl-mouse page-ext blink-paren paren permanent-buffers recent-files redo reportmail rsz-minibuf saveconfsavehist saveplace scroll-in-place tempo toolbar-utils tree-menu uniquify where-was-i-db) requires (xemacs-base) type single )) (forms (standards-version 1.0 - version "1.06" + version "1.07" author-version "2.10" date "1998-01-25" - build-date "1998-06-14" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution contrib priority low category "oa" dump nil description "Forms editing support (obsolete, use Widget instead)." - filename "forms-1.06-pkg.tar.gz" - md5sum "ebee64ebf564f934e15fed3503e3b15e" - size 39948 + filename "forms-1.07-pkg.tar.gz" + md5sum "5efd98c58eb5ba6dce1e1a1e4059238d" + size 47896 provides (forms forms-mode) requires () type regular )) (frame-icon (standards-version 1.0 - version "1.02" - author-version "21.0b35" - date "1998-02-26" - build-date "1998-04-04" + version "1.04" + author-version "21.0" + date "1998-07-14" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution contrib priority low category "oa" dump nil description "Set up mode-specific icons for each frame under XEmacs" - filename "frame-icon-1.02-pkg.tar.gz" - md5sum "82d098425df2fd7e3a7e7d16c9a9e12b" - size 33568 + filename "frame-icon-1.04-pkg.tar.gz" + md5sum "60c726b43b7dc20fcdd585796697e497" + size 33753 provides (forms forms-mode) requires () type regular )) (hm--html-menus (standards-version 1.0 - version "1.06" + version "1.07" author-version "5.9" date "1998-01-25" - build-date "1998-06-14" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "oa" dump nil description "HTML editing." - filename "hm--html-menus-1.06-pkg.tar.gz" - md5sum "2570d8211b63c2edcc114ec3560a075f" - size 147168 + filename "hm--html-menus-1.07-pkg.tar.gz" + md5sum "d90b6994d7d0868800b76042a6080bc5" + size 173431 provides (adapt hm--date hm--html-configuration hm--html-drag-and-drop hm--html-indentation hm--html-keys hm--html-menu hm--html-mode hm--html-not-standard hm--html html-view tmpl-minor-mode) requires (xemacs-base) type regular )) (ispell (standards-version 1.0 - version "1.08" - author-version "3.0x1" - date "1998-04-01" - build-date "1998-04-04" + version "1.10" + author-version "3.0x2" + date "1998-09-06" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "oa" dump nil description "Spell-checking with GNU ispell." - filename "ispell-1.08-pkg.tar.gz" - md5sum "54cd76987a472eca72c24592a10756d6" - size 64990 + filename "ispell-1.10-pkg.tar.gz" + md5sum "f3b4ea8328648fde2ef6837e42e0e656" + size 66285 provides (ispell) requires () type regular )) (pc (standards-version 1.0 - version "1.10" - author-version "21.0b38" - date "1998-04-22" - build-date "1998-04-26" + version "1.12" + author-version "21.0" + date "1998-07-25" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "oa" dump nil description "PC style interface emulation." - filename "pc-1.10-pkg.tar.gz" - md5sum "e750bebcb0d2b7632796b1c6c4fc4c16" - size 16004 + filename "pc-1.12-pkg.tar.gz" + md5sum "7d0860e82e54ddbd3467980df674f447" + size 17497 provides (delbs fusion pc-select pending-del s-region) requires (xemacs-base) type regular )) (psgml (standards-version 1.0 - version "1.08" + version "1.09" author-version "1.01" date "1998-07-06" - build-date "1998-07-09" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "oa" dump nil description "Validated HTML/SGML editing." - filename "psgml-1.08-pkg.tar.gz" - md5sum "757842225e4d3e9841bf6de1d3fdbbc4" - size 419252 + filename "psgml-1.09-pkg.tar.gz" + md5sum "86bc71c63fc2e278717b4d91debfa2eb" + size 427133 provides (psgml sgml) requires (edit-utils) type regular )) (sgml (standards-version 1.0 - version "1.01" - author-version "21.0b35" + version "1.02" + author-version "21.0" date "1998-01-25" - build-date "1998-04-04" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution contrib priority low category "oa" dump nil description "SGML/Linuxdoc-SGML editing." - filename "sgml-1.01-pkg.tar.gz" - md5sum "4e7039730eb4399c09b1a85d1758381c" - size 26874 + filename "sgml-1.02-pkg.tar.gz" + md5sum "8e959375437e34425058fe348a9f0143" + size 29523 provides (sgml linuxdoc-sgml) requires (xemacs-base) type regular )) (slider (standards-version 1.0 - version "1.05" - author-version "0.3" - date "1998-01-25" - build-date "1998-04-04" + version "1.07" + author-version "0.3x1" + date "1998-08-13" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution experimental priority low category "oa" dump nil description "User interface tool." - filename "slider-1.05-pkg.tar.gz" - md5sum "67b376e5b886a78f5094eb13c61ff8ec" - size 12116 + filename "slider-1.07-pkg.tar.gz" + md5sum "ebfea81a8d3d52550e76ae4efb5e5399" + size 12174 provides (slider color-selector) requires () type regular )) (speedbar (standards-version 1.0 - version "1.05" + version "1.06" author-version "0.6.2" date "1998-02-07" - build-date "1998-04-04" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "oa" dump nil description "??? Document me." - filename "speedbar-1.05-pkg.tar.gz" - md5sum "8a988bada9d09dac0e934f0859f88613" - size 95018 + filename "speedbar-1.06-pkg.tar.gz" + md5sum "533b3c4dbfd82d44ed1243c3e285920a" + size 65542 provides (speedbar) requires (xemacs-base) type regular )) (strokes (standards-version 1.0 - version "1.01" - author-version "21.0b35" + version "1.02" + author-version "21.0" date "1998-01-25" - build-date "1998-04-04" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "oa" dump nil description "Mouse enhancement utility." - filename "strokes-1.01-pkg.tar.gz" - md5sum "a160a62e0570fc69f3c03b6ee1693fcd" - size 43743 + filename "strokes-1.02-pkg.tar.gz" + md5sum "016516c550b4369a40f666f3dda9afcb" + size 42765 provides (strokes) requires (text-modes edit-utils mail-lib xemacs-base) type regular )) (text-modes (standards-version 1.0 - version "1.08" + version "1.10" author-version "21.0" - date "1998-07-03" - build-date "1998-07-09" + date "1998-08-29" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority high category "oa" dump nil description "Miscellaneous support for editing text files." - filename "text-modes-1.08-pkg.tar.gz" - md5sum "7334a90ddbcedec459caecf8e0314bad" - size 171811 + filename "text-modes-1.10-pkg.tar.gz" + md5sum "732ecc924eff930b5674453588c0bd2c" + size 204272 provides (autoinsert crontab-edit filladapt fold-isearch folding image-mode iso-acc iso-ascii iso-cvt iso-insert iso-swed swedish tabify whitespace-mode winmgr-mode xpm-mode xrdb-mode) - requires (fsf-compat xemacs-base) + requires (ispell fsf-compat xemacs-base) type regular )) (time (standards-version 1.0 - version "1.04" + version "1.05" author-version "1.17" date "1998-04-24" - build-date "1998-04-26" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "oa" dump nil description "Display time & date on the modeline." - filename "time-1.04-pkg.tar.gz" - md5sum "e25caf29cf9684887460d9cd124639d4" - size 19905 + filename "time-1.05-pkg.tar.gz" + md5sum "b6a082e80e20a4caceed5f30826a4b22" + size 19932 provides (time) requires (xemacs-base) type regular )) (eterm (standards-version 1.0 - version "1.05" + version "1.06" author-version "21.0" date "1998-06-28" - build-date "1998-07-09" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "os" dump nil description "Terminal emulation." - filename "eterm-1.05-pkg.tar.gz" - md5sum "0c1660a9a8426077534caf84762e7ec1" - size 144233 + filename "eterm-1.06-pkg.tar.gz" + md5sum "086de2e838a20a30d67c4f4bb99171d2" + size 110620 provides (eterm) requires (xemacs-base) type regular )) (igrep (standards-version 1.0 - version "1.01" - author-version "21.0b35" - date "1998-01-24" - build-date "1998-04-04" + version "1.03" + author-version "2.83" + date "1998-08-11" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "os" dump nil description "Enhanced front-end for Grep." - filename "igrep-1.01-pkg.tar.gz" - md5sum "e50e3a5ac2d6ca5eea67d7f664dee406" - size 13971 + filename "igrep-1.03-pkg.tar.gz" + md5sum "9a8946cef1c03e74d78382447bc345eb" + size 15263 provides (igrep) requires (dired xemacs-base) type regular )) (ilisp (standards-version 1.0 - version "1.04" + version "1.05" author-version "5.8" date "1998-01-24" - build-date "1998-06-14" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "os" dump nil description "Front-end for Inferior Lisp." - filename "ilisp-1.04-pkg.tar.gz" - md5sum "1fa1b08bd6b7cc3c71f512ad412e1b24" - size 223559 + filename "ilisp-1.05-pkg.tar.gz" + md5sum "a21c63df2265048e3f0fd4e290ee732f" + size 272263 provides (ilisp completer) requires (xemacs-base) type regular )) (os-utils (standards-version 1.0 - version "1.08" + version "1.10" author-version "21.0" - date "1998-06-07" - build-date "1998-06-14" + date "1998-07-14" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "os" dump nil description "Miscellaneous O/S utilities." - filename "os-utils-1.08-pkg.tar.gz" - md5sum "9fdcc24ee2d83c6d214f4afa1f41c617" - size 229921 + filename "os-utils-1.10-pkg.tar.gz" + md5sum "d2f6b6f8d3f2dcfb024a0e601d3e81cf" + size 224824 provides (archive-mode background crypt crypt++ inf-lisp jka-compr lpr mchat ps-print tar-mode telnet terminal uncompress) requires (xemacs-base) type single )) (view-process (standards-version 1.0 - version "1.03" + version "1.04" author-version "2.4" date "1998-01-24" - build-date "1998-04-04" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "os" dump nil description "A Unix process browsing tool." - filename "view-process-1.03-pkg.tar.gz" - md5sum "96bcf35e325034ee3c37563fecfe623d" - size 59886 + filename "view-process-1.04-pkg.tar.gz" + md5sum "3ad505fa09f8300c034e7c44ab211d15" + size 62718 provides (view-process-mode) requires (xemacs-base) type regular )) (ada (standards-version 1.0 - version "1.03" + version "1.04" author-version "2.27" date "1998-01-24" - build-date "1998-04-04" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "prog" dump nil description "Ada language support." - filename "ada-1.03-pkg.tar.gz" - md5sum "661f8c0ac17fe447f8cc0e54f753704d" - size 54323 + filename "ada-1.04-pkg.tar.gz" + md5sum "3eb8dc6d057fd9e3c2248f40df0c34f0" + size 55190 provides (ada-mode ada-stmt) requires () type regular )) (c-support (standards-version 1.0 - version "1.07" - author-version "21.0b35" + version "1.08" + author-version "21.0" date "1998-03-25" - build-date "1998-04-04" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution contrib priority low category "prog" dump nil description "Basic single-file add-ons for editing C code." - filename "c-support-1.07-pkg.tar.gz" - md5sum "771e606d76e18922efb6559e101c7ecf" - size 68651 + filename "c-support-1.08-pkg.tar.gz" + md5sum "e03535f146371f8fa3ea440ecdb18f55" + size 73625 provides (c-comment-edit cmacexp ctypes hideif hideshow) requires (cc-mode xemacs-base) type regular )) (cc-mode (standards-version 1.0 - version "1.11" + version "1.12" author-version "5.22" date "1998-03-05" - build-date "1998-06-14" + build-date "1998-09-19" maintainer "Barry Warsaw <cc-mode-help@python.org>" distribution stable priority medium category "prog" dump nil description "C, C++ and Java language support." - filename "cc-mode-1.11-pkg.tar.gz" - md5sum "dadf89d5a4dfbee90d0168831a33150f" - size 151138 + filename "cc-mode-1.12-pkg.tar.gz" + md5sum "47a0d9fe2c0753985fa65596b68b8db6" + size 191141 provides (cc-mode) requires (xemacs-base) type regular )) (debug (standards-version 1.0 - version "1.04" + version "1.05" author-version "21.0" date "1998-07-09" - build-date "1998-07-09" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution contrib priority low category "prog" dump nil description "GUD, gdb, dbx debugging support." - filename "debug-1.04-pkg.tar.gz" - md5sum "f881ca1a0593d218ca6a0e19dd10d8a0" - size 90350 + filename "debug-1.05-pkg.tar.gz" + md5sum "bbb9783b4e81cd085adcf2e383cd4fe7" + size 91169 provides (dbx gdb-highlight gdb gdbsrc gud history) requires (xemacs-base) type regular )) (ediff (standards-version 1.0 - version "1.08" - author-version "2.70.1" + version "1.10" + author-version "2.70.2" date "1998-04-27" - build-date "1998-05-15" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "prog" dump nil description "Interface over GNU patch." - filename "ediff-1.08-pkg.tar.gz" - md5sum "d73e47087119a6cb7d5b4f71fdba8b72" - size 243042 + filename "ediff-1.10-pkg.tar.gz" + md5sum "a2b4d368c71a21e32660f061f1b52086" + size 274999 provides (ediff) requires (pcl-cvs dired xemacs-base) type regular )) (emerge (standards-version 1.0 - version "1.02" - author-version "21.0b36" + version "1.03" + author-version "21.0" date "1998-04-07" - build-date "1998-04-17" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "prog" dump nil description "Another interface over GNU patch." - filename "emerge-1.02-pkg.tar.gz" - md5sum "6f7687196172109d6014346d5ead6d3a" - size 60940 + filename "emerge-1.03-pkg.tar.gz" + md5sum "2ca964df916ec1f0b0a3f12a85e6741c" + size 60474 provides (emerge) requires () type regular )) (jde (standards-version 1.0 - version "1.04" + version "1.05" author-version "2.05" date "1998-07-09" - build-date "1998-07-09" + build-date "1998-09-19" maintainer "Andy Piper <andyp@parallax.co.uk>" distribution stable priority medium category "prog" dump nil description "Java language and development support." - filename "jde-1.04-pkg.tar.gz" - md5sum "97b90e88928033f405005a9441b7e141" - size 126784 + filename "jde-1.05-pkg.tar.gz" + md5sum "fa4444d0c5cbfef6d3f14e4ed04faef7" + size 129630 provides (jde) requires (cc-mode debug speedbar edit-utils mail-lib xemacs-base) type regular )) (pcl-cvs (standards-version 1.0 - version "1.11" + version "1.12" author-version "21.0" date "1998-06-18" - build-date "1998-07-09" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "prog" dump nil description "CVS frontend." - filename "pcl-cvs-1.11-pkg.tar.gz" - md5sum "7592786d2734d87778915e50561c472d" - size 141698 + filename "pcl-cvs-1.12-pkg.tar.gz" + md5sum "f69a484d2d8c7c829793f0a12c89ec91" + size 159090 provides (pcl-cvs dll elib-node generic-sc) requires (xemacs-base) type regular )) (prog-modes (standards-version 1.0 - version "1.06" + version "1.10" author-version "21.0" - date "1998-05-04" - build-date "1998-07-09" + date "1998-09-04" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "prog" dump nil description "Support for various programming languages." - filename "prog-modes-1.06-pkg.tar.gz" - md5sum "38d494e334b846fe735f45d573759ed9" - size 539915 + filename "prog-modes-1.10-pkg.tar.gz" + md5sum "61e1d86aba5774f74a5611b1eb7cf62c" + size 548374 provides (autoconf-mode cperl-mode eiffel3 f90 fortran ksh-mode m4-mode makefile perl-mode postscript python-mode rexx-mode simula-mode tcl teco verilog-mod) requires (mail-lib xemacs-base) type regular )) (scheme (standards-version 1.0 - version "1.03" - author-version "21.0b36" + version "1.04" + author-version "21.0" date "1998-04-11" - build-date "1998-04-17" + build-date "1998-09-19" maintainer "Karl M. Hegbloom <karlheg@bittersweet.inetarena.com>" distribution contrib priority low category "prog" dump nil description "Front-end support for Inferior Scheme." - filename "scheme-1.03-pkg.tar.gz" - md5sum "f22026713da1be70eba93f8d59700499" - size 36833 + filename "scheme-1.04-pkg.tar.gz" + md5sum "0815a048274697b7213604e02db0c2a9" + size 39734 provides (scheme xscheme cmuscheme cmuscheme48) requires (xemacs-base) type regular )) (sh-script (standards-version 1.0 - version "1.05" + version "1.06" author-version "2.0e" date "1998-05-12" - build-date "1998-05-15" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "prog" dump nil description "Support for editing shell scripts." - filename "sh-script-1.05-pkg.tar.gz" - md5sum "8462bd33b9edc71da72ebd134b8a77c6" - size 33785 + filename "sh-script-1.06-pkg.tar.gz" + md5sum "b87b528df00464cbe1533ffdde81cd8e" + size 34485 provides (sh-script executable) requires (xemacs-base) type regular )) (vc-cc (standards-version 1.0 - version "1.04" + version "1.08" author-version "21.0" - date "1998-06-30" - build-date "1998-07-09" + date "1998-07-24" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution contrib priority low category "prog" - dump t + dump nil description "Version Control for ClearCase (UnFree) systems." - filename "vc-cc-1.04-pkg.tar.gz" - md5sum "07557cc75c0b2aafc5966cca1c0a22e2" - size 96262 + filename "vc-cc-1.08-pkg.tar.gz" + md5sum "81e1ce88b7389e872d732441a5fdb29f" + size 97261 provides (vc) requires (dired xemacs-base) type regular )) (vc (standards-version 1.0 - version "1.09" - author-version "21.0b42" - date "1998-05-30" - build-date "1998-06-01" + version "1.12" + author-version "21.0" + date "1998-08-05" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "prog" - dump t + dump nil description "Version Control for Free systems." - filename "vc-1.09-pkg.tar.gz" - md5sum "233d46c01ab9e5052395cf730420f41d" - size 83688 + filename "vc-1.12-pkg.tar.gz" + md5sum "bf42fcd4d4dd78b5514e0d56e21082fc" + size 83630 provides (vc) requires (dired xemacs-base) type regular )) (vhdl (standards-version 1.0 - version "1.04" + version "1.05" author-version "2.74" date "1998-01-24" - build-date "1998-06-14" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "prog" dump nil description "Support for VHDL." - filename "vhdl-1.04-pkg.tar.gz" - md5sum "8de144972dd6f33bcdd43314e6e6564d" - size 54169 + filename "vhdl-1.05-pkg.tar.gz" + md5sum "486c16af86f0901d5c5385479b5c0e6a" + size 65812 provides (vhdl-mode) requires () type regular )) (auctex (standards-version 1.0 - version "1.08" + version "1.12" author-version "9.7p" - date "1998-04-10" - build-date "1998-04-17" + date "1998-08-05" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority medium category "wp" dump nil description "Basic TeX/LaTeX support." - filename "auctex-1.08-pkg.tar.gz" - md5sum "e79c956bd2a7cfc086d91c399667c2ef" - size 305607 + filename "auctex-1.12-pkg.tar.gz" + md5sum "a2826368828e89f0113401a38a49082b" + size 364768 provides (auc-old bib-cite font-latex latex multi-prompt tex-buf tex-info tex-jp tex-site tex) requires (xemacs-base) type regular )) (crisp (standards-version 1.0 - version "1.04" - author-version "1.33" - date "1998-01-24" - build-date "1998-07-09" + version "1.07" + author-version "1.34" + date "1998-08-18" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "wp" dump nil description "Crisp/Brief emulation." - filename "crisp-1.04-pkg.tar.gz" - md5sum "2a51917984d7556019b1b20ff85a9feb" - size 10189 + filename "crisp-1.07-pkg.tar.gz" + md5sum "1c8ef81e2dce5a0f0f2625dd66fcbcfb" + size 10273 provides (crisp scroll-lock) requires () type regular )) (edt (standards-version 1.0 - version "1.04" - author-version "21.0b36" + version "1.05" + author-version "21.0" date "1998-04-07" - build-date "1998-04-17" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution contrib priority low category "wp" dump nil description "DEC EDIT/EDT emulation." - filename "edt-1.04-pkg.tar.gz" - md5sum "fabfedc63988de7296eae068d8b78ae0" - size 46095 + filename "edt-1.05-pkg.tar.gz" + md5sum "c2d94f654e748bc3170d21f699faee5d" + size 48534 provides (edt) requires (xemacs-base) type regular )) (reftex (standards-version 1.0 - version "1.04" - author-version "3.22" - date "1998-03-21" - build-date "1998-04-04" + version "1.07" + author-version "3.38" + date "1998-08-11" + build-date "1998-09-19" maintainer "Carsten Dominik <dominik@strw.LeidenUniv.nl>" distribution stable priority medium category "wp" dump nil description "Emacs support for LaTeX cross-references, citations.." - filename "reftex-1.04-pkg.tar.gz" - md5sum "817a50763a3e909449a93780f662723c" - size 141810 + filename "reftex-1.07-pkg.tar.gz" + md5sum "cb821b60e394f6a285d2a43617384c79" + size 200286 provides (reftex) requires (fsf-compat xemacs-base) type regular )) (texinfo (standards-version 1.0 - version "1.09" + version "1.12" author-version "21.0" - date "1998-07-01" - build-date "1998-07-09" + date "1998-07-20" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority high category "wp" dump nil description "XEmacs TeXinfo support." - filename "texinfo-1.09-pkg.tar.gz" - md5sum "7ab1fa9774456869027cfc0846d8f3fc" - size 127683 + filename "texinfo-1.12-pkg.tar.gz" + md5sum "ec1ff24ddc7c2e3dd0c121717a6ea6c1" + size 134975 provides (makeinfo tex-mode texinfmt texinfo texnfo-tex texnfo-upd) requires (xemacs-base) type regular )) (textools (standards-version 1.0 - version "1.05" - author-version "21.0b38" + version "1.06" + author-version "21.0" date "1998-04-29" - build-date "1998-05-01" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stabl priority medium category "wp" dump nil description "Miscellaneous TeX support." - filename "textools-1.05-pkg.tar.gz" - md5sum "4b0a417849ca270ed498c1e9c9aaa07b" - size 79125 + filename "textools-1.06-pkg.tar.gz" + md5sum "6805183aa443242b45689ffe6e46855f" + size 83197 provides (bib-mode bibtex refer-to-bibtex) requires (xemacs-base) type single )) (tpu (standards-version 1.0 - version "1.04" - author-version "21.0b35" - date "1998-01-24" - build-date "1998-04-04" - maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" - distribution mule - priority high + version "1.06" + author-version "4.2X" + date "1998-07-23" + build-date "1998-09-19" + maintainer "Kevin Oberman <oberman@es.net>" + distribution normal + priority medium category "wp" dump nil description "DEC EDIT/TPU support." - filename "tpu-1.04-pkg.tar.gz" - md5sum "f45c9f761d6a88b2d3bdb4a4af2abf25" - size 57425 + filename "tpu-1.06-pkg.tar.gz" + md5sum "cd777d6be222b85810927858d88fd642" + size 59897 provides (tpu) requires () type regular )) (viper (standards-version 1.0 - version "1.08" + version "1.09" author-version "3.03" date "1998-02-25" - build-date "1998-06-01" + build-date "1998-09-19" maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>" distribution stable priority low category "wp" dump nil description "VI emulation support." - filename "viper-1.08-pkg.tar.gz" - md5sum "f36b7e49bda79a19d7beeeeb6092bedd" - size 261090 + filename "viper-1.09-pkg.tar.gz" + md5sum "1636a0aece86e5713e8587eea92c81c8" + size 318061 provides (viper) requires (xemacs-base) type regular
--- a/lisp/package-get.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/package-get.el Mon Aug 13 11:04:06 2007 +0200 @@ -149,27 +149,70 @@ "*Where to store temporary files for staging.") (defvar package-get-remote - '( - ("ftp.xemacs.org" "/pub/xemacs/beta/xemacs-21.0/packages/binary-packages") - ("ftp.xemacs.org" "/pub/xemacs/beta/xemacs-21.0/packages/single-file-packages") - ("ftp.xemacs.org" "/pub/xemacs/package")) + '(("ftp.xemacs.org" "/pub/xemacs/packages")) "*List of remote sites to contact for downloading packages. List format is '(site-name directory-on-site). Each site is tried in -order until the package is found.") +order until the package is found. As a special case, `site-name' can be +`nil', in which case `directory-on-site' is treated as a local directory.") (defvar package-get-remove-copy nil "*After copying and installing a package, if this is T, then remove the copy. Otherwise, keep it around.") +(defun package-get-interactive-package-query (get-version package-symbol) + "Perform interactive querying for package and optional version. +Query for a version if GET-VERSION is non-nil. Return package name as +a symbol instead of a string if PACKAGE-SYMBOL is non-nil. +The return value is suitable for direct passing to `interactive'." + (let ( (table (mapcar '(lambda (item) + (let ( (name (symbol-name (car item))) ) + (cons name name) + )) + package-get-base)) + package package-symbol default-version version) + (save-window-excursion + (setq package (completing-read "Package: " table nil t)) + (setq package-symbol (intern package)) + (if get-version + (progn + (setq default-version + (package-get-info-prop + (package-get-info-version + (package-get-info-find-package package-get-base + package-symbol) nil) + 'version)) + (while (string= + (setq version (read-string "Version: " default-version)) + "") + ) + (if package-symbol + (list package-symbol version) + (list package version)) + ) + (if package-symbol + (list package-symbol) + (list package))) + ))) + +;;;###autoload +(defun package-get-delete-package (package &optional pkg-topdir) + "Delete an installation of PACKAGE below directory PKG-TOPDIR. +PACKAGE is a symbol, not a string. +This is just an interactive wrapper for `package-admin-delete-binary-package'." + (interactive (package-get-interactive-package-query nil t)) + (package-admin-delete-binary-package package pkg-topdir)) + ;;;###autoload (defun package-get-update-all () "Fetch and install the latest versions of all currently installed packages." (interactive) ;; Load a fresh copy - (mapcar (lambda (pkg) - (package-get-all - (car pkg) nil)) - packages-package-list)) + (catch 'exit + (mapcar (lambda (pkg) + (if (not (package-get (car pkg) nil 'never)) + (throw 'exit nil) ;; Bail out if error detected + )) + packages-package-list))) ;;;###autoload (defun package-get-all (package version &optional fetched-packages) @@ -177,48 +220,100 @@ Uses `package-get-base' to determine just what is required and what package provides that functionality. If VERSION is nil, retrieves latest version. Optional argument FETCHED-PACKAGES is used to keep -track of packages already fetched." - (interactive "sPackage: \nsVersion: ") +track of packages already fetched. + +Returns nil upon error." + (interactive (package-get-interactive-package-query t nil)) (let* ((the-package (package-get-info-find-package package-get-base package)) (this-package (package-get-info-version the-package version)) (this-requires (package-get-info-prop this-package 'requires)) ) - (setq version (package-get-info-prop this-package 'version)) - (unless (package-get-installedp package version) - (package-get package version)) - (setq fetched-packages - (append (list package) - (package-get-info-prop this-package 'provides) - fetched-packages)) - ;; grab everything that this package requires plus recursively - ;; grab everything that the requires require. Keep track - ;; in `fetched-packages' the list of things provided -- this - ;; keeps us from going into a loop - (while this-requires - (if (not (member (car this-requires) fetched-packages)) - (let* ((reqd-package (package-get-package-provider - (car this-requires))) - (reqd-version (cadr reqd-package)) - (reqd-name (car reqd-package))) - (if (null reqd-name) - (error "Unable to find a provider for %s" (car this-requires))) - (setq fetched-packages - (package-get-all reqd-name reqd-version fetched-packages))) - ) - (setq this-requires (cdr this-requires))) + (catch 'exit + (setq version (package-get-info-prop this-package 'version)) + (unless (package-get-installedp package version) + (if (not (package-get package version)) + (progn + (setq fetched-packages nil) + (throw 'exit nil)))) + (setq fetched-packages + (append (list package) + (package-get-info-prop this-package 'provides) + fetched-packages)) + ;; grab everything that this package requires plus recursively + ;; grab everything that the requires require. Keep track + ;; in `fetched-packages' the list of things provided -- this + ;; keeps us from going into a loop + (while this-requires + (if (not (member (car this-requires) fetched-packages)) + (let* ((reqd-package (package-get-package-provider + (car this-requires))) + (reqd-version (cadr reqd-package)) + (reqd-name (car reqd-package))) + (if (null reqd-name) + (error "Unable to find a provider for %s" + (car this-requires))) + (if (not (setq fetched-packages + (package-get-all reqd-name reqd-version + fetched-packages))) + (throw 'exit nil))) + ) + (setq this-requires (cdr this-requires))) + ) fetched-packages )) +(defun package-get-load-package-file (lispdir file) + (let (pathname) + (setq pathname (expand-file-name file lispdir)) + (condition-case err + (progn + (load pathname t) + t) + (t + (message "Error loading package file \"%s\" %s!" pathname err) + nil)) + )) + +(defun package-get-init-package (lispdir) + "Initialize the package. +This really assumes that the package has never been loaded. Updating +a newer package can cause problems, due to old, obsolete functions in +the old package. + +Return `t' upon complete success, `nil' if any errors occurred." + (progn + (if (and lispdir + (file-accessible-directory-p lispdir)) + (progn + ;; Add lispdir to load-path if it doesn't already exist. + ;; NOTE: this does not take symlinks, etc., into account. + (if (let ( (dirs load-path) ) + (catch 'done + (while dirs + (if (string-equal (car dirs) lispdir) + (throw 'done nil)) + (setq dirs (cdr dirs)) + ) + t)) + (setq load-path (cons lispdir load-path))) + (if (not (package-get-load-package-file lispdir "auto-autoloads")) + (package-get-load-package-file lispdir "_pkg")) + t) + nil) + )) + ;;;###autoload -(defun package-get (package &optional version conflict) +(defun package-get (package &optional version conflict install-dir) "Fetch PACKAGE from remote site. Optional arguments VERSION indicates which version to retrieve, nil means most recent version. CONFLICT indicates what happens if the package is already installed. Valid values for CONFLICT are: 'always always retrieve the package even if it is already installed 'never do not retrieve the package if it is installed. +INSTALL-DIR, if non-nil, specifies the package directory where +fetched packages should be installed. The value of `package-get-base' is used to determine what files should be retrieved. The value of `package-get-remote' is used to determine @@ -227,59 +322,158 @@ Once the package is retrieved, its md5 checksum is computed. If that sum does not match that stored in `package-get-base' for this version -of the package, an error is signalled." - (interactive "xPackage List: ") +of the package, an error is signalled. + +Returns `t' upon success, the symbol `error' if the package was +successfully installed but errors occurred during initialization, or +`nil' upon error." + (interactive (package-get-interactive-package-query nil t)) (let* ((this-package (package-get-info-version (package-get-info-find-package package-get-base package) version)) (found nil) (search-dirs package-get-remote) - (filename (package-get-info-prop this-package 'filename))) + (base-filename (package-get-info-prop this-package 'filename)) + (package-status t) + filenames full-package-filename) (if (null this-package) (error "Couldn't find package %s with version %s" package version)) - (if (null filename) + (if (null base-filename) (error "No filename associated with package %s, version %s" package version)) + (if (null install-dir) + (setq install-dir (package-admin-get-install-dir nil))) + + ;; Contrive a list of possible package filenames. + ;; Ugly. Is there a better way to do this? + (setq filenames (cons base-filename nil)) + (if (string-match "^\\(..*\\)\.tar\.gz$" base-filename) + (setq filenames (append filenames + (list (concat (match-string 1 base-filename) + ".tgz"))))) + (setq version (package-get-info-prop this-package 'version)) (unless (and (eq conflict 'never) (package-get-installedp package version)) - ;; Find the package from search list in package-get-remote + ;; Find the package from the search list in package-get-remote ;; and copy it into the staging directory. Then validate ;; the checksum. Finally, install the package. - (while (and search-dirs - (not (file-exists-p (package-get-staging-dir filename)))) - (if (file-exists-p (package-get-remote-filename - (car search-dirs) filename)) - (copy-file (package-get-remote-filename (car search-dirs) filename) - (package-get-staging-dir filename)) - (setq search-dirs (cdr search-dirs)) + (catch 'done + (let (search-filenames current-dir-entry host dir current-filename + dest-filename) + ;; In each search directory ... + (while search-dirs + (setq current-dir-entry (car search-dirs) + host (car current-dir-entry) + dir (car (cdr current-dir-entry)) + search-filenames filenames + ) + + ;; Look for one of the possible package filenames ... + (while search-filenames + (setq current-filename (car search-filenames) + dest-filename (package-get-staging-dir current-filename)) + (cond + ;; No host means look on the current system. + ( (null host) + (setq full-package-filename + (substitute-in-file-name + (expand-file-name current-filename + (file-name-as-directory dir)))) + ) + + ;; If it's already on the disk locally, and the size is + ;; greater than zero ... + ( (and (file-exists-p dest-filename) + (let (attrs) + ;; file-attributes could return -1 for LARGE files, + ;; but, hopefully, packages won't be that large. + (and (setq attrs (file-attributes dest-filename)) + (> (nth 7 attrs) 0)))) + (setq full-package-filename dest-filename) + ) + + ;; If the file exists on the remote system ... + ( (file-exists-p (package-get-remote-filename + current-dir-entry current-filename)) + ;; Get it + (setq full-package-filename dest-filename) + (message "Retrieving package `%s' ..." + current-filename) + (sit-for 0) + (copy-file (package-get-remote-filename current-dir-entry + current-filename) + full-package-filename t) + ) + ) + + ;; If we found it, we're done. + (if (and full-package-filename + (file-exists-p full-package-filename)) + (throw 'done nil)) + ;; Didn't find it. Try the next possible filename. + (setq search-filenames (cdr search-filenames)) + ) + ;; Try looking in the next possible directory ... + (setq search-dirs (cdr search-dirs)) + ) )) - (if (not (file-exists-p (package-get-staging-dir filename))) - (error "Unable to find file %s" filename)) + + (if (or (not full-package-filename) + (not (file-exists-p full-package-filename))) + (error "Unable to find file %s" base-filename)) ;; Validate the md5 checksum ;; 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 (package-get-staging-dir filename))) + (insert-file-contents-internal full-package-filename)) (if (not (string= (md5 (current-buffer)) (package-get-info-prop this-package 'md5sum))) - (error "Package %s does not match md5 checksum" filename))) - (message "Retrieved package %s" filename) (sit-for 0) + (error "Package %s does not match md5 checksum" base-filename))) + + (package-admin-delete-binary-package package install-dir) + + (message "Installing package `%s' ..." package) (sit-for 0) (let ((status - (package-admin-add-binary-package - (package-get-staging-dir filename)))) - (when (not (= status 0)) - (message "Package failed.") - (switch-to-buffer package-admin-temp-buffer))) - (sit-for 0) - (message "Added package") (sit-for 0) + (package-admin-add-binary-package full-package-filename + install-dir))) + (if (= status 0) + (progn + ;; clear messages so that only messages from + ;; package-get-init-package are seen, below. + (clear-message) + (if (package-get-init-package (package-admin-get-lispdir + install-dir package)) + (progn + (message "Added package `%s'" package) + (sit-for 0) + ) + (progn + ;; display message only if there isn't already one. + (if (not (current-message)) + (progn + (message "Added package `%s' (errors occurred)" + package) + (sit-for 0) + )) + (if package-status + (setq package-status 'errors)) + )) + ) + (message "Installation of package %s failed." base-filename) + (sit-for 0) + (switch-to-buffer package-admin-temp-buffer) + (setq package-status nil) + )) (setq found t)) (if (and found package-get-remove-copy) - (delete-file (package-get-staging-dir filename))) + (delete-file full-package-filename)) + package-status )) (defun package-get-info-find-package (which name) @@ -304,7 +498,7 @@ `package-get-info-find-package'. If VERSION is nil, then return the first (aka most recent) version. Use `package-get-info-find-prop' to retrieve a particular property from the value returned by this." - (interactive "xPackage Info: \nsVersion: ") + (interactive (package-get-interactive-package-query t t)) (while (and version package (not (string= (plist-get (car package) 'version) version))) (setq package (cdr package))) (if package (car package))) @@ -345,10 +539,11 @@ (interactive "FPackage filename: ") (if (not (file-exists-p package-get-dir)) (make-directory package-get-dir)) - (concat - (file-name-as-directory package-get-dir) - (file-name-nondirectory (or (nth 2 (efs-ftp-path filename)) filename)))) - + (expand-file-name + (file-name-nondirectory (or (and (fboundp 'efs-ftp-path) + (nth 2 (efs-ftp-path filename))) + filename)) + (file-name-as-directory package-get-dir))) (defun package-get-remote-filename (search filename) "Return FILENAME as a remote filename. @@ -458,10 +653,12 @@ (let ((custom-buffer (find-file-noselect (or (package-get-file-installed-p "package-get-custom.el") - (concat (file-name-directory - (package-get-file-installed-p - "package-get-base.el")) - "package-get-custom.el")))) + (expand-file-name + "package-get-custom.el" + (file-name-directory + (package-get-file-installed-p + "package-get-base.el")) + )))) (pkg-groups nil)) ;; clear existing stuff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/package-ui.el Mon Aug 13 11:04:06 2007 +0200 @@ -0,0 +1,483 @@ +;;; package-ui.el --- + +;; Copyright (C) 1998 by Darryl Okahata + +;; Author: Darryl Okahata <darrylo@sr.hp.com> +;; Keywords: internal + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: Not in FSF + +(require 'package-get) ;; which, in turn, requires 'package-admin + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; User-changeable variables: +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defvar pui-up-to-date-package-face nil + "The face to use for packages that are up-to-date.") + +(defvar pui-selected-package-face (get-face 'bold) + "The face to use for selected packages. +Set this to `nil' to use the `default' face.") + +(defvar pui-outdated-package-face (get-face 'red) + "The face to use for outdated packages. +Set this to `nil' to use the `default' face.") + +(defvar pui-uninstalled-package-face (get-face 'italic) + "The face to use for uninstalled packages. +Set this to `nil' to use the `default' face.") + +(defvar pui-list-verbose t + "If non-nil, display verbose info in the package list buffer.") + +(defvar pui-info-buffer "*Packages*" + "Buffer to use for displaying package information.") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; End of user-changeable variables. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defvar pui-selected-packages nil + "The list of user-selected packages to install.") + +(defvar pui-display-keymap + (let ((m (make-keymap))) + (suppress-keymap m) + (set-keymap-name m 'pui-display-keymap) + (define-key m "q" 'pui-quit) + (define-key m "g" 'pui-list-packages) + (define-key m " " 'pui-display-info) + (define-key m "?" 'pui-help) + (define-key m "v" 'pui-toggle-verbosity-redisplay) + (define-key m "d" 'pui-toggle-verbosity-redisplay) + (define-key m [return] 'pui-toggle-package-key) + (define-key m "x" 'pui-install-selected-packages) + (define-key m "I" 'pui-install-selected-packages) + (define-key m "n" 'next-line) + (define-key m "+" 'next-line) + (define-key m "p" 'previous-line) + (define-key m "-" 'previous-line) + m) + "Keymap to use in the `pui-info-buffer' buffer") + +(defvar pui-package-keymap + (let ((m (make-sparse-keymap))) + (set-keymap-name m 'pui-package-keymap) + (define-key m 'button2 'pui-toggle-package-event) + (define-key m 'button3 'pui-toggle-package-event) + m) + "Keymap to use over package names/descriptions.") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; End of variables + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Configuration routines + +(defun pui-directory-exists (dir) + "Check to see if DIR exists in `package-get-remote'." + (let (found) + (mapcar '(lambda (item) + (if (and (null (car item)) + (string-equal (file-name-as-directory (car (cdr item))) + (file-name-as-directory dir))) + (setq found t)) + ) package-get-remote) + found + )) + +(defun pui-package-dir-list (buffer) + "In BUFFER, format the list of package binary paths." + (let ( (count 1) paths sys dir) + (set-buffer buffer) + (buffer-disable-undo buffer) + (erase-buffer buffer) + (insert "Existing package binary paths:\n\n") + (setq paths package-get-remote) + (while paths + (setq sys (car (car paths)) + dir (car (cdr (car paths)))) + (insert (format "%2s. " count)) + (if (null sys) + (insert dir) + (insert sys ":" dir)) + (insert "\n") + (setq count (1+ count)) + (setq paths (cdr paths)) + ) + (insert "\nThese are the places that will be searched for package binaries.\n") + (goto-char (point-min)) + )) + +;;;###autoload +(defun pui-add-install-directory (dir) + "Add a new package binary directory to the head of `package-get-remote'. +Note that no provision is made for saving any changes made by this function. +It exists mainly as a convenience for one-time package installations from +disk." + (interactive (let ( (tmpbuf (get-buffer-create + "*Existing Package Binary Paths*")) + dir) + (save-window-excursion + (save-excursion + (unwind-protect + (progn + (pui-package-dir-list tmpbuf) + (display-buffer tmpbuf) + (setq dir (read-directory-name + "New package binary directory to add? " + nil nil t)) + ) + (kill-buffer tmpbuf) + ))) + (list dir) + )) + (progn + (if (not (pui-directory-exists dir)) + (progn + (setq package-get-remote (cons (list nil dir) package-get-remote)) + (message "Package directory \"%s\" added." dir) + ) + (message "Directory \"%s\" already exists in `package-get-remote'." dir)) + )) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Package list/installer routines + +(defun pui-quit () + (interactive) + (kill-buffer nil)) + +(defun pui-help () + (interactive) + (let ( (help-buffer (get-buffer-create "*Help*")) ) + (display-buffer help-buffer t) + (save-window-excursion + (set-buffer help-buffer) + (buffer-disable-undo help-buffer) + (erase-buffer help-buffer) + (insert (pui-help-string)) + ) + )) + +(defun pui-package-symbol-char (pkg-sym version) + (progn + (if (package-get-info-find-package packages-package-list pkg-sym) + (if (package-get-installedp pkg-sym version) + (list " " pui-up-to-date-package-face) + (list "*" pui-outdated-package-face)) + (list "-" pui-uninstalled-package-face)) + )) + +(defun pui-update-package-display (extent &optional pkg-sym version) + "Update the package status for EXTENT. +If PKG-SYM or VERSION are not given, they are read from the extent. +These are used to determine whether or not the package is installed, +and whether or not it is up-to-date." + (let (buffer-read-only disp sym-char) + (if (not pkg-sym) + (setq pkg-sym (extent-property extent 'pui-package))) + (if (not version) + (setq version (package-get-info-prop (extent-property extent 'pui-info) + 'version))) + (if (member pkg-sym pui-selected-packages) + (progn + (if pui-selected-package-face + (set-extent-face extent (get-face pui-selected-package-face)) + (set-extent-face extent (get-face 'default))) + (setq sym-char "+") + ) + (progn + (setq disp (pui-package-symbol-char pkg-sym version)) + (setq sym-char (car disp)) + (if (cdr disp) + (set-extent-face extent (car (cdr disp))) + (set-extent-face extent (get-face 'default))) + )) + (save-excursion + (goto-char (extent-start-position extent)) + (delete-char 1) + (insert sym-char) + (set-buffer-modified-p nil) + ) + )) + +(defun pui-toggle-package (extent) + (let (pkg-sym) + (setq pkg-sym (extent-property extent 'pui-package)) + (if (member pkg-sym pui-selected-packages) + (setq pui-selected-packages + (delete pkg-sym pui-selected-packages)) + (setq pui-selected-packages + (cons pkg-sym pui-selected-packages))) + (pui-update-package-display extent pkg-sym) + )) + +(defun pui-toggle-package-key () + "Select/unselect package for installation, using the keyboard." + (interactive) + (let (extent) + (if (setq extent (extent-at (point) (current-buffer) 'pui)) + (progn + (pui-toggle-package extent) + (forward-line 1) + ) + (error "No package under cursor!")) + )) + +(defun pui-toggle-package-event (event) + "Select/unselect package for installation, using the mouse." + (interactive "e") + (let* ( (ep (event-point event)) + (buffer (window-buffer (event-window event))) + (extent (extent-at ep buffer 'pui-package)) + ) + (pui-toggle-package extent) + )) + +(defun pui-toggle-verbosity-redisplay () + "Toggle verbose package info." + (interactive) + (progn + (setq pui-list-verbose (not pui-list-verbose)) + (pui-list-packages) + )) + +(defun pui-install-selected-packages () + "Install selected packages." + (interactive) + (let ( (tmpbuf "*Packages-To-Install*") do-install) + (if pui-selected-packages + (progn + ;; Don't change window config when asking the user if he really + ;; wants to install the packages. We do this to avoid messing up + ;; the window configuration if errors occur (we don't want to + ;; display random buffers in addition to the error buffer, if + ;; errors occur, which would normally be caused by display-buffer). + (save-window-excursion + (with-output-to-temp-buffer tmpbuf + (display-completion-list (sort + (mapcar '(lambda (pkg) + (symbol-name pkg) + ) + pui-selected-packages) + 'string<) + :activate-callback nil + :help-string "Packages selected for installation:\n" + :completion-string t + )) + (setq tmpbuf (get-buffer-create tmpbuf)) + (display-buffer tmpbuf) + (setq do-install (y-or-n-p "Install these packages? ")) + (kill-buffer tmpbuf) + ) + (if do-install + (progn + (save-excursion + ;; Clear old temp buffer history + (set-buffer (get-buffer-create package-admin-temp-buffer)) + (buffer-disable-undo package-admin-temp-buffer) + (erase-buffer package-admin-temp-buffer) + ) + (message "Installing selected packages ...") (sit-for 0) + (if (catch 'done + (mapcar (lambda (pkg) + (if (not (package-get-all pkg nil)) + (throw 'done nil))) + pui-selected-packages) + t) + (progn + (pui-list-packages) + (message "Packages installed") + )) + ) + (clear-message) + ) + ) + (error "No packages have been selected!")) + )) + +(defun pui-help-echo (extent &optional force-update) + "Display additional package info in the modeline. +EXTENT determines the package to display (the package information is +attached to the extent as properties)." + (let (pkg-sym info inst-ver auth-ver date maintainer) + (if (or force-update (not (current-message)) + (string-match ".*: .*: " (current-message)) + ) + (progn + (setq pkg-sym (extent-property extent 'pui-package) + info (extent-property extent 'pui-info) + inst-ver (package-get-key pkg-sym :version) + auth-ver (package-get-info-prop info 'author-version) + date (package-get-info-prop info 'date) + maintainer (package-get-info-prop info 'maintainer)) + (if (not inst-ver) + (setq inst-ver "")) + (if pui-list-verbose + (format "Author version: %-8s %11s: %s" + auth-ver date maintainer) + (format "%-6s: %-8s %11s: %s" + inst-ver auth-ver date maintainer)) + )) + )) + +(defun pui-display-info (&optional no-error) + "Display additional package info in the modeline. +Designed to be called interactively (from a keypress)." + (interactive) + (let (extent) + (save-excursion + (beginning-of-line) + (if (setq extent (extent-at (point) (current-buffer) 'pui)) + (message (pui-help-echo extent t)) + (if no-error + (clear-message nil) + (error "No package under cursor!"))) + ))) + +(defun pui-help-string () + "Return the help string for the package-info buffer. +This is not a defconst because of the call to substitute-command-keys." + (save-excursion + (set-buffer (get-buffer pui-info-buffer)) + (substitute-command-keys +"Symbols in the leftmost column: + + + The package is marked for installation. + - The package has not been installed. + * The currently installed package is old, and a newer version is + available. + +Useful keys: + + `\\[pui-toggle-package-key]' to select/unselect the current package for installation. + `\\[pui-install-selected-packages]' to install selected packages. + `\\[pui-display-info]' to display additional information about the package in the modeline. + `\\[pui-list-packages]' to refresh the package list. + `\\[pui-toggle-verbosity-redisplay]' to toggle between a verbose and non-verbose display. + `\\[pui-quit]' to kill this buffer. +") + )) + +;;;###autoload +(defun pui-list-packages () + "List all packages and package information. +The package name, version, and description are displayed. From the displayed +buffer, the user can see which packages are installed, which are not, and +which are out-of-date (a newer version is available). The user can then +select packages for installation via the keyboard or mouse." + (interactive) + (let ( (outbuf (get-buffer-create pui-info-buffer)) + (sep-string "===============================================================================\n") + start ) + (message "Creating package list ...") (sit-for 0) + (set-buffer outbuf) + (setq buffer-read-only nil) + (buffer-disable-undo outbuf) + (erase-buffer outbuf) + (use-local-map pui-display-keymap) + (if pui-list-verbose + (insert " Latest Installed + Package name Vers. Vers. Description +") + (insert " Latest + Package name Vers. Description +")) + (insert sep-string) + (setq start (point)) + (mapcar '(lambda (pkg) + (let (pkg-sym info version desc + b e extent current-vers disp) + (setq pkg-sym (car pkg) + info (package-get-info-version (cdr pkg) nil)) + (setq version (package-get-info-prop info 'version) + desc (package-get-info-prop info 'description)) + + (setq disp (pui-package-symbol-char pkg-sym + version)) + (setq b (point)) + (if pui-list-verbose + (progn + (setq current-vers (package-get-key pkg-sym :version)) + (cond + ( (not current-vers) + (setq current-vers "-----") ) + ( (stringp current-vers) + (setq current-vers + (format "%.2f" + (string-to-number current-vers))) ) + ( (numberp current-vers) + (setq current-vers (format "%.2f" current-vers)) ) + ) + (insert + (format "%s %-15s %-5.2f %-5s %s\n" + (car disp) pkg-sym + (if (stringp version) + (string-to-number version) + version) + current-vers desc)) +;; (insert +;; (format "\t\t %-12s %s\n" +;; (package-get-info-prop info 'author-version) +;; (package-get-info-prop info 'date) +;; )) + ) + (insert (format "%s %-15s %-5s %s\n" + (car disp) + pkg-sym version desc))) + (save-excursion + (setq e (progn + (forward-line -1) + (end-of-line) + (point))) + ) + (setq extent (make-extent b e)) + (if (cdr disp) + (set-extent-face extent (car (cdr disp))) + (set-extent-face extent (get-face 'default))) + (set-extent-property extent 'highlight t) + (set-extent-property extent 'pui t) + (set-extent-property extent 'pui-package pkg-sym) + (set-extent-property extent 'pui-info info) + (set-extent-property extent 'help-echo 'pui-help-echo) + (set-extent-property extent 'keymap pui-package-keymap) + )) (sort (copy-sequence package-get-base) + '(lambda (a b) + (string< (symbol-name (car a)) + (symbol-name (car b))) + ))) + (insert sep-string) + (insert (pui-help-string)) + (set-buffer-modified-p nil) + (setq buffer-read-only t) + (pop-to-buffer outbuf) + (delete-other-windows) + (goto-char start) + (setq pui-selected-packages nil) ; Reset list + (clear-message) +; (message (substitute-command-keys "Press `\\[pui-help]' for help.")) + )) + +(provide 'package-ui) + +;;; package-ui.el ends here
--- a/lisp/packages.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/packages.el Mon Aug 13 11:04:06 2007 +0200 @@ -63,6 +63,9 @@ (defvar packages-load-path-depth 1 "Depth of load-path search in package hierarchies.") +(defvar packages-data-path-depth 1 + "Depth of data-path search in package hierarchies.") + (defvar early-packages nil "Packages early in the load path.") @@ -133,6 +136,18 @@ version name (cdr pkg))) (t t)))) +(defun package-delete-name (name) + (let (pkg) + ;; Delete ALL versions of package. + ;; This is pretty memory-intensive, as we use copy-alist when deleting + ;; package entries, to prevent side-effects in functions that call this + ;; one. + (while (setq pkg (assq name packages-package-list)) + (setq packages-package-list (delete pkg (copy-alist + packages-package-list))) + ) + )) + ;;; Build time stuff (defvar autoload-file-name "auto-autoloads.el" @@ -220,14 +235,10 @@ (setq path (cdr path))) autoloads)) -(defun packages-list-autoloads () +(defun packages-list-autoloads (source-directory) "List autoload files in (what will be) the normal lisp search path. This function is used during build to find where the global symbol files so they can be perused for their useful information." - ;; Source directory may not be initialized yet. - ;; (print (prin1-to-string load-path)) - (if (null source-directory) - (setq source-directory (car load-path))) (let ((files (directory-files (file-name-as-directory source-directory) t ".*")) file autolist) @@ -294,6 +305,23 @@ ;; Data-directory is really a list now. Provide something to search it for ;; directories. +(defun locate-data-directory-list (name &optional dir-list) + "Locate the matching list of directories in a search path DIR-LIST. +If no DIR-LIST is supplied, it defaults to `data-directory-list'." + (unless dir-list + (setq dir-list data-directory-list)) + (let (found found-dir found-dir-list) + (while dir-list + (setq found (file-name-as-directory (concat (car dir-list) name)) + found-dir (file-directory-p found)) + (and found-dir + (setq found-dir-list (cons found found-dir-list))) + (setq dir-list (cdr dir-list))) + (nreverse found-dir-list))) + +;; Data-directory is really a list now. Provide something to search it for +;; a directory. + (defun locate-data-directory (name &optional dir-list) "Locate a directory in a search path DIR-LIST (a list of directories). If no DIR-LIST is supplied, it defaults to `data-directory-list'." @@ -331,7 +359,7 @@ (and version-directory (list version-directory)) (and site-directory (list site-directory))))) -(defvar packages-special-base-regexp "^\\(etc\\|info\\|lisp\\|lib-src\\|bin\\)$" +(defvar packages-special-base-regexp "^\\(etc\\|info\\|lisp\\|lib-src\\|bin\\|pkginfo\\)$" "Special subdirectories of packages.") (defvar packages-no-package-hierarchy-regexp @@ -445,16 +473,25 @@ packages-load-path-depth)) (defun packages-find-package-exec-path (packages) + "Construct the exec-path component for packages. +PACKAGES is a list of package directories." (packages-find-package-library-path packages (list (paths-construct-path (list "bin" system-configuration)) "lib-src"))) (defun packages-find-package-info-path (packages) + "Construct the info-path component for packages. +PACKAGES is a list of package directories." (packages-find-package-library-path packages '("info"))) (defun packages-find-package-data-path (packages) - (packages-find-package-library-path packages '("etc"))) + "Construct the data-path component for packages. +PACKAGES is a list of package directories." + (paths-find-recursive-load-path + (packages-find-package-library-path packages + '("etc")) + packages-data-path-depth)) ;; Loading package initialization files
--- a/lisp/setup-paths.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/setup-paths.el Mon Aug 13 11:04:06 2007 +0200 @@ -137,12 +137,12 @@ (paths-decode-directory-path path-envval 'drop-empties))) (packages-find-package-exec-path early-packages) (packages-find-package-exec-path late-packages) - (packages-find-package-exec-path last-packages) (let ((emacspath-envval (getenv "EMACSPATH"))) (and emacspath-envval (split-path emacspath-envval))) (and exec-directory - (list exec-directory)))) + (list exec-directory)) + (packages-find-package-exec-path last-packages))) (defun paths-find-data-directory (roots) "Find the data directory." @@ -154,7 +154,7 @@ (append (packages-find-package-data-path early-packages) (packages-find-package-data-path late-packages) - (packages-find-package-data-path last-packages) - (list data-directory))) + (list data-directory) + (packages-find-package-data-path last-packages))) ;;; setup-paths.el ends here
--- a/lisp/shadow.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/shadow.el Mon Aug 13 11:04:06 2007 +0200 @@ -6,9 +6,9 @@ ;; Keywords: lisp ;; Created: 15 December 1995 -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; 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. @@ -51,6 +51,8 @@ ;; Thanks to Francesco Potorti` <pot@cnuce.cnr.it> for suggestions, ;; rewritings & speedups. +;; 1998-08-15 Martin Buchholz: Speed up using hashtables instead of lists. + ;;; Code: (defun find-emacs-lisp-shadows (&optional path) @@ -64,50 +66,49 @@ See the documentation for `list-load-path-shadows' for further information." - (or path (setq path load-path)) - - (let (true-names ; List of dirs considered. - shadows ; List of shadowings, to be returned. - files ; File names ever seen, with dirs. + (let (shadows ; List of shadowings, to be returned. dir ; The dir being currently scanned. curr-files ; This dir's Emacs Lisp files. orig-dir ; Where the file was first seen. - files-seen-this-dir ; Files seen so far in this dir. - file) ; The current file. - + (file-dirs + (make-hashtable 2000 'equal)) ; File names ever seen, with dirs. + (true-names + (make-hashtable 50 'equal)) ; Dirs ever considered. + (files-seen-this-dir + (make-hashtable 100 'equal)) ; Files seen so far in this dir. + ) - (while path + (dolist (path-elt (or path load-path)) - (setq dir (file-truename (or (car path) "."))) - (if (member dir true-names) + (setq dir (file-truename (or path-elt "."))) + (if (gethash dir true-names) ;; We have already considered this PATH redundant directory. - ;; Show the redundancy if we are interactiver, unless the PATH + ;; Show the redundancy if we are interactive, unless the PATH ;; dir is nil or "." (these redundant directories are just a ;; result of the current working directory, and are therefore ;; not always redundant). (or noninteractive - (and (car path) - (not (string= (car path) ".")) - (message "Ignoring redundant directory %s" (car path)))) - - (setq true-names (append true-names (list dir))) - (setq dir (or (car path) ".")) + (and path-elt + (not (string= path-elt ".")) + (message "Ignoring redundant directory %s" path-elt))) + + (puthash dir t true-names) + (setq dir (or path-elt ".")) (setq curr-files (if (file-accessible-directory-p dir) (directory-files dir nil ".\\.elc?$" t))) (and curr-files (not noninteractive) (message "Checking %d files in %s..." (length curr-files) dir)) - (setq files-seen-this-dir nil) + (clrhash files-seen-this-dir) - (while curr-files + (dolist (file curr-files) - (setq file (car curr-files)) (setq file (substring file 0 (if (string= (substring file -1) "c") -4 -3))) ;; FILE now contains the current file name, with no suffix. - (unless (or (member file files-seen-this-dir) + (unless (or (gethash file files-seen-this-dir) ;; Ignore these files. (member file '("subdirs" @@ -119,22 +120,19 @@ ;; File has not been seen yet in this directory. ;; This test prevents us declaring that XXX.el shadows ;; XXX.elc (or vice-versa) when they are in the same directory. - (setq files-seen-this-dir (cons file files-seen-this-dir)) + (puthash file t files-seen-this-dir) - (if (setq orig-dir (assoc file files)) + (if (setq orig-dir (gethash file file-dirs)) ;; This file was seen before, we have a shadowing. (setq shadows - (append shadows - (list (concat (file-name-as-directory (cdr orig-dir)) - file) - (concat (file-name-as-directory dir) - file)))) + (nconc shadows + (list (concat (file-name-as-directory orig-dir) + file) + (concat (file-name-as-directory dir) + file)))) ;; Not seen before, add it to the list of seen files. - (setq files (cons (cons file dir) files)))) - - (setq curr-files (cdr curr-files)))) - (setq path (cdr path))) + (puthash file dir file-dirs)))))) ;; Return the list of shadowings. shadows))
--- a/lisp/sound.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/sound.el Mon Aug 13 11:04:06 2007 +0200 @@ -113,7 +113,7 @@ :group 'sound :type 'string) -(defcustom default-sound-directory-list ( list default-sound-directory ) +(defcustom default-sound-directory-list (locate-data-directory-list "sounds") "List of directories which to search for sound files" :group 'sound
--- a/lisp/startup.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/startup.el Mon Aug 13 11:04:06 2007 +0200 @@ -402,10 +402,10 @@ (if (not inhibit-autoloads) (progn - (packages-load-package-auto-autoloads last-package-load-path) + (if (not inhibit-early-packages) + (packages-load-package-auto-autoloads early-package-load-path)) (packages-load-package-auto-autoloads late-package-load-path) - (if (not inhibit-early-packages) - (packages-load-package-auto-autoloads early-package-load-path)))) + (packages-load-package-auto-autoloads last-package-load-path))) (unwind-protect (command-line) @@ -680,7 +680,7 @@ (message "Error in init file: %s" (error-message-string error)) (display-warning 'initialization (format "\ -An error has occured while loading %s: +An error has occurred while loading %s: %s @@ -935,7 +935,7 @@ " to see what this means.\n"))) `( "\n")) (face bold-italic "\ -Copyright (C) 1985-1997 Free Software Foundation, Inc. +Copyright (C) 1985-1998 Free Software Foundation, Inc. Copyright (C) 1990-1994 Lucid, Inc. Copyright (C) 1993-1997 Sun Microsystems, Inc. All Rights Reserved. Copyright (C) 1994-1996 Board of Trustees, University of Illinois
--- a/lisp/update-elc.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/update-elc.el Mon Aug 13 11:04:06 2007 +0200 @@ -71,7 +71,7 @@ (load "setup-paths.el") (load "dump-paths.el") -(let ((autol (packages-list-autoloads))) +(let ((autol (packages-list-autoloads (concat default-directory "../lisp")))) ;; (print (prin1-to-string autol)) (while autol (let ((src (car autol)))
--- a/lisp/x-font-menu.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/x-font-menu.el Mon Aug 13 11:04:06 2007 +0200 @@ -466,15 +466,18 @@ (from-size (aref font-data 2)) (from-weight (aref font-data 3)) (from-slant (aref font-data 4)) - new-default-face-font) + new-default-face-font + new-props) (unless from-family (signal 'error '("couldn't parse font name for default face"))) - (setq new-default-face-font - (font-menu-load-font (or family from-family) - (or weight from-weight) - (or size from-size) - from-slant - font-menu-preferred-resolution)) + (when weight + (signal 'error '("Setting weight currently not supported"))) +; (setq new-default-face-font +; (font-menu-load-font (or family from-family) +; (or weight from-weight) +; (or size from-size) +; from-slant +; font-menu-preferred-resolution)) (dolist (face (delq 'default (face-list))) (when (face-font-instance face) (message "Changing font of `%s'..." face) @@ -487,10 +490,16 @@ (sit-for 1))))) ;; Set the default face's font after hacking the other faces, so that ;; the frame size doesn't change until we are all done. - - ;;; WMP - we need to honor font-menu-this-frame-only-p here! - (set-face-font 'default new-default-face-font - (and font-menu-this-frame-only-p (selected-frame))) + + (when (and family (not (equal family from-family))) + (setq new-props (append (list :family family) new-props))) + (when (and size (not (equal size from-size))) + (setq new-props (append (list :size (concat (int-to-string + (/ size 10)) "pt")) new-props))) + (custom-set-face-update-spec 'default '((type x)) new-props) + ;;; WMP - we need to honor font-menu-this-frame-only-p here! +; (set-face-font 'default new-default-face-font +; (and font-menu-this-frame-only-p (selected-frame))) (message "Font %s" (face-font-name 'default))))
--- a/lisp/x-init.el Mon Aug 13 11:03:09 2007 +0200 +++ b/lisp/x-init.el Mon Aug 13 11:04:06 2007 +0200 @@ -208,6 +208,7 @@ (x-define-dead-key dead-cedilla compose-cedilla-map) (x-define-dead-key dead-diaeresis compose-diaeresis-map) (x-define-dead-key dead-circum compose-circumflex-map) + (x-define-dead-key dead-circumflex compose-circumflex-map) (x-define-dead-key dead-tilde compose-tilde-map) )
--- a/lwlib/xlwmenu.c Mon Aug 13 11:03:09 2007 +0200 +++ b/lwlib/xlwmenu.c Mon Aug 13 11:04:06 2007 +0200 @@ -444,6 +444,7 @@ newstring = XmStringLtoRCreate (newchars, XmFONTLIST_DEFAULT_TAG); XmStringExtent (mw->menu.font_list, newstring, &width, &height); XmStringFree (newstring); + XtFree (chars); return width; #else # ifdef USE_XFONTSET @@ -891,6 +892,9 @@ } } x += string_draw_range (mw, window, x, y, gc, chars, s, i); +#ifdef NEED_MOTIF + XtFree (chars); +#endif } static void @@ -2803,13 +2807,31 @@ xgcv.fill_style = FillOpaqueStippled; xgcv.foreground = mw->menu.top_shadow_color; xgcv.background = mw->core.background_pixel; +/* xgcv.stipple = mw->menu.top_shadow_pixmap; gtb */ +#ifdef NEED_MOTIF + if (mw->menu.top_shadow_pixmap && + mw->menu.top_shadow_pixmap != XmUNSPECIFIED_PIXMAP) + xgcv.stipple = mw->menu.top_shadow_pixmap; + else + xgcv.stipple = 0; +#else xgcv.stipple = mw->menu.top_shadow_pixmap; +#endif /* NEED_MOTIF */ pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0); mw->menu.shadow_top_gc = XtGetGC((Widget)mw, GCForeground|GCBackground|pm, &xgcv); xgcv.foreground = mw->menu.bottom_shadow_color; +/* xgcv.stipple = mw->menu.bottom_shadow_pixmap; gtb */ +#ifdef NEED_MOTIF + if (mw->menu.top_shadow_pixmap && + mw->menu.top_shadow_pixmap != XmUNSPECIFIED_PIXMAP) + xgcv.stipple = mw->menu.bottom_shadow_pixmap; + else + xgcv.stipple = 0; +#else xgcv.stipple = mw->menu.bottom_shadow_pixmap; +#endif /* NEED_MOTIF */ pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0); mw->menu.shadow_bottom_gc = XtGetGC ((Widget)mw, GCForeground|GCBackground|pm, &xgcv);
--- a/lwlib/xlwscrollbar.c Mon Aug 13 11:03:09 2007 +0200 +++ b/lwlib/xlwscrollbar.c Mon Aug 13 11:04:06 2007 +0200 @@ -485,6 +485,12 @@ } /*-------------------------- GC and Pixel allocation --------------------*/ +#ifdef NEED_MOTIF +#ifndef XmUNSPECIFIED_PIXMAP +#define XmUNSPECIFIED_PIXMAP 2 +#endif +#endif /* NEED_MOTIF */ + static GC get_gc (XlwScrollBarWidget w, Pixel fg, Pixel bg, Pixmap pm) { @@ -506,8 +512,19 @@ values.background = bg; values.fill_style = FillOpaqueStippled; values.stipple = pm; +/* mask = GCForeground | GCBackground | + (pm == None ? 0 : GCStipple | GCFillStyle); gtb */ +#ifdef NEED_MOTIF + if (pm != None && pm != 0 && pm != XmUNSPECIFIED_PIXMAP) + values.stipple = pm; + else + values.stipple = None; +#else + values.stipple = pm; +#endif /* NEED_MOTIF */ mask = GCForeground | GCBackground | - (pm == None ? 0 : GCStipple | GCFillStyle); + (values.stipple == None ? 0 : GCStipple | GCFillStyle); + return XtGetGC((Widget) w, mask, &values); }
--- a/man/ChangeLog Mon Aug 13 11:03:09 2007 +0200 +++ b/man/ChangeLog Mon Aug 13 11:04:06 2007 +0200 @@ -1,3 +1,52 @@ +1998-09-29 SL Baur <steve@altair.xemacs.org> + + * XEmacs 21.2-beta2 is released. + +1998-09-20 Hrvoje Niksic <hniksic@srce.hr> + + * lispref/customize.texi: New file. + +1998-09-09 Hrvoje Niksic <hniksic@srce.hr> + + * internals/internals.texi (Coding for Mule): New node and + section. + +1998-09-03 Darryl Okahata <darrylo@sr.hp.com> + + * xemacs/packages.texi: Document manually installing binary packages. + +1998-09-02 Jeff Miller <jmiller@smart.net> + + * Synch calendar.texi with Emacs 20.3 + +1998-09-03 Darryl Okahata <darrylo@sr.hp.com> + + * xemacs/packages.texi: Correct and update package documentation. + Updated the package installation section to mention the visual + package browser/installer. + +1998-08-31 Hrvoje Niksic <hniksic@srce.hr> + + * lispref/buffers.texi (Indirect Buffers): Update with XEmacs + specifics. + +1998-08-21 Greg Klanderman <greg@alphatech.com> + + * lispref/files.texi (User Name Completion): new section. + +1998-07-23 Adrian Aichner <aichner@ecf.teradyne.com> + + * xemacs/packages.texi (Packages): Changing @itemize @emph to + @itemize @bullet (this is what all other files included in + xemacs.texi use) to fix error in texi2dvi (GNU Texinfo 3.12) 0.8. + +1998-07-20 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * xemacs/startup.texi: Small fixes, suggested by Hrvoje. + + * xemacs/xemacs.texi: + * xemacs/packages.texi: More packages documentation. + 1998-07-19 SL Baur <steve@altair.xemacs.org> * XEmacs 21.2-beta1 is released.
--- a/man/internals/internals.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/internals/internals.texi Mon Aug 13 11:04:06 2007 +0200 @@ -598,6 +598,8 @@ version 20.1 released September 17, 1997. @item version 20.2 released September 20, 1997. +@item +version 20.3 released August 19, 1998. @end itemize @node XEmacs @@ -1654,6 +1656,7 @@ * General Coding Rules:: * Writing Lisp Primitives:: * Adding Global Lisp Variables:: +* Coding for Mule:: * Techniques for XEmacs Developers:: @end menu @@ -1754,7 +1757,7 @@ @{ val = Feval (XCAR (args)); if (!NILP (val)) - break; + break; args = XCDR (args); @} @@ -2024,6 +2027,352 @@ Lisp object, and you will be the one who's unhappy when you can't figure out how your variable got overwritten. +@node Coding for Mule +@section Coding for Mule +@cindex Coding for Mule + +Although Mule support is not compiled by default in XEmacs, many people +are using it, and we consider it crucial that new code works correctly +with multibyte characters. This is not hard; it is only a matter of +following several simple user-interface guidelines. Even if you never +compile with Mule, with a little practice you will find it quite easy +to code Mule-correctly. + +Note that these guidelines are not necessarily tied to the current Mule +implementation; they are also a good idea to follow on the grounds of +code generalization for future I18N work. + +@menu +* Character-Related Data Types:: +* Working With Character and Byte Positions:: +* Conversion of External Data:: +* General Guidelines for Writing Mule-Aware Code:: +* An Example of Mule-Aware Code:: +@end menu + +@node Character-Related Data Types +@subsection Character-Related Data Types + +First, we will list the basic character-related datatypes used by +XEmacs. Note that the separate @code{typedef}s are not required for the +code to work (all of them boil down to @code{unsigned char} or +@code{int}), but they improve clarity of code a great deal, because one +glance at the declaration can tell the intended use of the variable. + +@table @code +@item Emchar +@cindex Emchar +An @code{Emchar} holds a single Emacs character. + +Obviously, the equality between characters and bytes is lost in the Mule +world. Characters can be represented by one or more bytes in the +buffer, and @code{Emchar} is the C type large enough to hold any +character. + +Without Mule support, an @code{Emchar} is equivalent to an +@code{unsigned char}. + +@item Bufbyte +@cindex Bufbyte +The data representing the text in a buffer or string is logically a set +of @code{Bufbyte}s. + +XEmacs does not work with character formats all the time; when reading +characters from the outside, it decodes them to an internal format, and +likewise encodes them when writing. @code{Bufbyte} (in fact +@code{unsigned char}) is the basic unit of XEmacs internal buffers and +strings format. + +One character can correspond to one or more @code{Bufbyte}s. In the +current implementation, an ASCII character is represented by the same +@code{Bufbyte}, and extended characters are represented by a sequence of +@code{Bufbyte}s. + +Without Mule support, a @code{Bufbyte} is equivalent to an +@code{Emchar}. + +@item Bufpos +@itemx Charcount +A @code{Bufpos} represents a character position in a buffer or string. +A @code{Charcount} represents a number (count) of characters. +Logically, subtracting two @code{Bufpos} values yields a +@code{Charcount} value. Although all of these are @code{typedef}ed to +@code{int}, we use them in preference to @code{int} to make it clear +what sort of position is being used. + +@code{Bufpos} and @code{Charcount} values are the only ones that are +ever visible to Lisp. + +@item Bytind +@itemx Bytecount +A @code{Bytind} represents a byte position in a buffer or string. A +@code{Bytecount} represents the distance between two positions in bytes. +The relationship between @code{Bytind} and @code{Bytecount} is the same +as the relationship between @code{Bufpos} and @code{Charcount}. + +@item Extbyte +@itemx Extcount +When dealing with the outside world, XEmacs works with @code{Extbyte}s, +which are equivalent to @code{unsigned char}. Obviously, an +@code{Extcount} is the distance between two @code{Extbyte}s. Extbytes +and Extcounts are not all that frequent in XEmacs code. +@end table + +@node Working With Character and Byte Positions +@subsection Working With Character and Byte Positions + +Now that we have defined the basic character-related types, we can look +at the macros and functions designed for work with them and for +conversion between them. Most of these macros are defined in +@file{buffer.h}, and we don't discuss all of them here, but only the +most important ones. Examining the existing code is the best way to +learn about them. + +@table @code +@item MAX_EMCHAR_LEN +This preprocessor constant is the maximum number of buffer bytes per +Emacs character, i.e. the byte length of an @code{Emchar}. It is useful +when allocating temporary strings to keep a known number of characters. +For instance: + +@example +@group +@{ + Charcount cclen; + ... + @{ + /* Allocate place for @var{cclen} characters. */ + Bufbyte *tmp_buf = (Bufbyte *)alloca (cclen * MAX_EMCHAR_LEN); +... +@end group +@end example + +If you followed the previous section, you can guess that, logically, +multiplying a @code{Charcount} value with @code{MAX_EMCHAR_LEN} produces +a @code{Bytecount} value. + +In the current Mule implementation, @code{MAX_EMCHAR_LEN} equals 4. +Without Mule, it is 1. + +@item charptr_emchar +@item set_charptr_emchar +@code{charptr_emchar} macro takes a @code{Bufbyte} pointer and returns +the underlying @code{Emchar}. If it were a function, its prototype +would be: + +@example +Emchar charptr_emchar (Bufbyte *p); +@end example + +@code{set_charptr_emchar} stores an @code{Emchar} to the specified byte +position. It returns the number of bytes stored: + +@example +Bytecount set_charptr_emchar (Bufbyte *p, Emchar c); +@end example + +It is important to note that @code{set_charptr_emchar} is safe only for +appending a character at the end of a buffer, not for overwriting a +character in the middle. This is because the width of characters +varies, and @code{set_charptr_emchar} cannot resize the string if it +writes, say, a two-byte character where a single-byte character used to +reside. + +A typical use of @code{set_charptr_emchar} can be demonstrated by this +example, which copies characters from buffer @var{buf} to a temporary +string of Bufbytes. + +@example +@group +@{ + Bufpos pos; + for (pos = beg; pos < end; pos++) + @{ + Emchar c = BUF_FETCH_CHAR (buf, pos); + p += set_charptr_emchar (buf, c); + @} +@} +@end group +@end example + +Note how @code{set_charptr_emchar} is used to store the @code{Emchar} +and increment the counter, at the same time. + +@item INC_CHARPTR +@itemx DEC_CHARPTR +These two macros increment and decrement a @code{Bufbyte} pointer, +respectively. The pointer needs to be correctly positioned at the +beginning of a valid character position. + +Without Mule support, @code{INC_CHARPTR (p)} and @code{DEC_CHARPTR (p)} +simply expand to @code{p++} and @code{p--}, respectively. + +@item bytecount_to_charcount +Given a pointer to a text string and a length in bytes, return the +equivalent length in characters. + +@example +Charcount bytecount_to_charcount (Bufbyte *p, Bytecount bc); +@end example + +@item charcount_to_bytecount +Given a pointer to a text string and a length in characters, return the +equivalent length in bytes. + +@example +Bytecount charcount_to_bytecount (Bufbyte *p, Charcount cc); +@end example + +@item charptr_n_addr +Return a pointer to the beginning of the character offset @var{cc} (in +characters) from @var{p}. + +@example +Bufbyte *charptr_n_addr (Bufbyte *p, Charcount cc); +@end example +@end table + +@node Conversion of External Data +@subsection Conversion of External Data + +When an external function, such as a C library function, returns a +@code{char} pointer, you should never treat it as @code{Bufbyte}. This +is because these returned strings may contain 8bit characters which can +be misinterpreted by XEmacs, and cause a crash. Instead, you should use +a conversion macro. Many different conversion macros are defined in +@file{buffer.h}, so I will try to order them logically, by direction and +by format. + +Thus the basic conversion macros are @code{GET_CHARPTR_INT_DATA_ALLOCA} +and @code{GET_CHARPTR_EXT_DATA_ALLOCA}. The former is used to convert +external data to internal format, and the latter is used to convert the +other way around. The arguments each of these receives are @var{ptr} +(pointer to the text in external format), @var{len} (length of texts in +bytes), @var{fmt} (format of the external text), @var{ptr_out} (lvalue +to which new text should be copied), and @var{len_out} (lvalue which +will be assigned the length of the internal text in bytes). The +resulting text is stored to a stack-allocated buffer. If the text +doesn't need changing, these macros will do nothing, except for setting +@var{len_out}. + +Currently meaningful formats are @code{FORMAT_BINARY}, +@code{FORMAT_FILENAME}, @code{FORMAT_OS}, and @code{FORMAT_CTEXT}. + +The two macros above take many arguments which makes them unwieldy. For +this reason, several convenience macros are defined with obvious +functionality, but accepting less arguments: + +@table @code +@item GET_C_CHARPTR_EXT_DATA_ALLOCA +@itemx GET_C_CHARPTR_INT_DATA_ALLOCA +These two macros work on ``C char pointers'', which are zero-terminated, +and thus do not need @var{len} or @var{len_out} parameters. + +@item GET_STRING_EXT_DATA_ALLOCA +@itemx GET_C_STRING_EXT_DATA_ALLOCA +These two macros work on Lisp strings, thus also not needing a @var{len} +parameter. However, @code{GET_STRING_EXT_DATA_ALLOCA} still provides a +@var{len_out} parameter. Note that for Lisp strings only one conversion +direction makes sense. + +@item GET_C_CHARPTR_EXT_BINARY_DATA_ALLOCA +@itemx GET_C_CHARPTR_EXT_FILENAME_DATA_ALLOCA +@itemx GET_C_CHARPTR_EXT_CTEXT_DATA_ALLOCA +@itemx ... +These macros are a combination of the above, but with the @var{fmt} +argument encoded into the name of the macro. +@end table + +@node General Guidelines for Writing Mule-Aware Code +@subsection General Guidelines for Writing Mule-Aware Code + +This section contains some general guidance on how to write Mule-aware +code, as well as some pitfalls you should avoid. + +@table @emph +@item Never use @code{char} and @code{char *}. +In XEmacs, the use of @code{char} and @code{char *} is almost always a +mistake. If you want to manipulate an Emacs character from ``C'', use +@code{Emchar}. If you want to examine a specific octet in the internal +format, use @code{Bufbyte}. If you want a Lisp-visible character, use a +@code{Lisp_Object} and @code{make_char}. If you want a pointer to move +through the internal text, use @code{Bufbyte *}. Also note that you +almost certainly do not need @code{Emchar *}. + +@item Be careful not to confuse @code{Charcount}, @code{Bytecount}, and @code{Bufpos}. +The whole point of using different types is to avoid confusion about the +use of certain variables. Lest this effect be nullified, you need to be +careful about using the right types. + +@item Always convert external data +It is extremely important to always convert external data, because +XEmacs can crash if unexpected 8bit sequences are copied to its internal +buffers literally. + +This means that when a system function, such as @code{readdir}, returns +a string, you need to convert it using one of the conversion macros +described in the previous chapter, before passing it further to Lisp. +In the case of @code{readdir}, you would use the +@code{GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA} macro. + +Also note that many internal functions, such as @code{make_string}, +accept Bufbytes, which removes the need for them to convert the data +they receive. This increases efficiency because that way external data +needs to be decoded only once, when it is read. After that, it is +passed around in internal format. +@end table + +@node An Example of Mule-Aware Code +@subsection An Example of Mule-Aware Code + +As an example of Mule-aware code, we shall will analyze the +@code{string} function, which conses up a Lisp string from the character +arguments it receives. Here is the definition, pasted from +@code{alloc.c}: + +@example +@group +DEFUN ("string", Fstring, 0, MANY, 0, /* +Concatenate all the argument characters and make the result a string. +*/ + (int nargs, Lisp_Object *args)) +@{ + Bufbyte *storage = alloca_array (Bufbyte, nargs * MAX_EMCHAR_LEN); + Bufbyte *p = storage; + + for (; nargs; nargs--, args++) + @{ + Lisp_Object lisp_char = *args; + CHECK_CHAR_COERCE_INT (lisp_char); + p += set_charptr_emchar (p, XCHAR (lisp_char)); + @} + return make_string (storage, p - storage); +@} +@end group +@end example + +Now we can analyze the source line by line. + +Obviously, string will be as long as there are arguments to the +function. This is why we allocate @code{MAX_EMCHAR_LEN} * @var{nargs} +bytes on the stack, i.e. the worst-case number of bytes for @var{nargs} +@code{Emchar}s to fit in the string. + +Then, the loop checks that each element is a character, converting +integers in the process. Like many other functions in XEmacs, this +function silently accepts integers where characters are expected, for +historical and compatibility reasons. Unless you know what you are +doing, @code{CHECK_CHAR} will also suffice. @code{XCHAR (lisp_char)} +extracts the @code{Emchar} from the @code{Lisp_Object}, and +@code{set_charptr_emchar} stores it to storage, increasing @code{p} in +the process. + +Other instructing examples of correct coding under Mule can be found all +over XEmacs code. For starters, I recommend +@code{Fnormalize_menu_item_name} in @file{menubar.c}. After you have +understood this section of the manual and studied the examples, you can +proceed writing new Mule-aware code. + @node Techniques for XEmacs Developers @section Techniques for XEmacs Developers
--- a/man/lispref/buffers.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/buffers.texi Mon Aug 13 11:04:06 2007 +0200 @@ -890,27 +890,28 @@ An @dfn{indirect buffer} shares the text of some other buffer, which is called the @dfn{base buffer} of the indirect buffer. In some ways it is the analogue, for buffers, of a symbolic link among files. The base -buffer may not itself be an indirect buffer. +buffer may not itself be an indirect buffer. One base buffer may have +several @dfn{indirect children}. The text of the indirect buffer is always identical to the text of its base buffer; changes made by editing either one are visible immediately -in the other. This includes the text properties as well as the characters -themselves. +in the other. But in all other respects, the indirect buffer and its base buffer are completely separate. They have different names, different values of -point, different narrowing, different markers and overlays (though -inserting or deleting text in either buffer relocates the markers and -overlays for both), different major modes, and different local -variables. +point and mark, different narrowing, different markers and extents +(though inserting or deleting text in either buffer relocates the +markers and extents for both), different major modes, and different +local variables. Unlike in FSF Emacs, XEmacs indirect buffers do not +automatically share text properties among themselves and their base +buffer. An indirect buffer cannot visit a file, but its base buffer can. If you try to save the indirect buffer, that actually works by saving the base buffer. Killing an indirect buffer has no effect on its base buffer. Killing -the base buffer effectively kills the indirect buffer in that it cannot -ever again be the current buffer. +the base buffer kills all its indirect children. @deffn Command make-indirect-buffer base-buffer name This creates an indirect buffer named @var{name} whose base buffer @@ -919,11 +920,39 @@ If @var{base-buffer} is an indirect buffer, its base buffer is used as the base for the new buffer. + +@example +@group +(make-indirect-buffer "*scratch*" "indirect") + @result{} #<buffer "indirect"> +@end group +@end example @end deffn -@defun buffer-base-buffer buffer +@defun buffer-base-buffer &optional buffer This function returns the base buffer of @var{buffer}. If @var{buffer} is not indirect, the value is @code{nil}. Otherwise, the value is -another buffer, which is never an indirect buffer. +another buffer, which is never an indirect buffer. If @var{buffer} is +not supplied, it defaults to the current buffer. + +@example +@group +(buffer-base-buffer (get-buffer "indirect")) + @result{} #<buffer "*scratch*"> +@end group +@end example @end defun +@defun buffer-indirect-children &optional buffer +This function returns a list of all indirect buffers whose base buffer +is @var{buffer}. If @var{buffer} is indirect, the return value will +always be nil; see @code{make-indirect-buffer}. If @var{buffer} is not +supplied, it defaults to the current buffer. + +@example +@group +(buffer-indirect-children (get-buffer "*scratch*")) + @result{} (#<buffer "indirect">) +@end group +@end example +@end defun
--- a/man/lispref/commands.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/commands.texi Mon Aug 13 11:04:06 2007 +0200 @@ -834,7 +834,7 @@ also specify the modifier keys that were held down at the time. @item misc-user event - A menu item was selected, the scrollbar was used, or a drag or a drop occured. + A menu item was selected, the scrollbar was used, or a drag or a drop occurred. @item process event Input is available on a process. @@ -1388,7 +1388,7 @@ @end group @group -;; @r{Create a simmilar button-release event.} +;; @r{Create a similar button-release event.} (make-event 'button-release `(button 1 modifiers (meta) x ,x y ,x)) @result{} #<buttonup-event meta-button1up> @end group
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/lispref/customize.texi Mon Aug 13 11:04:06 2007 +0200 @@ -0,0 +1,750 @@ +@c -*-texinfo-*- +@c This is part of the XEmacs Lisp Reference Manual. +@c Copyright (C) 1997, 1998 Free Software Foundation, Inc. +@c See the file lispref.texi for copying conditions. +@setfilename ../info/customize +@node Customization, , , Top +@chapter Writing Customization Definitions + + This chapter describes how to declare user options for customization, +and also customization groups for classifying them. We use the term +@dfn{customization item} to include both kinds of customization +definitions---as well as face definitions. + +@menu +* Common Keywords:: +* Group Definitions:: +* Variable Definitions:: +* Customization Types:: +@end menu + +@node Common Keywords +@section Common Keywords for All Kinds of Items + + All kinds of customization declarations (for variables and groups, and +for faces) accept keyword arguments for specifying various information. +This section describes some keywords that apply to all kinds. + + All of these keywords, except @code{:tag}, can be used more than once +in a given item. Each use of the keyword has an independent effect. +The keyword @code{:tag} is an exception because any given item can only +display one name. + +@table @code +@item :tag @var{name} +Use @var{name}, a string, instead of the item's name, to label the item +in customization menus and buffers. + +@item :group @var{group} +Put this customization item in group @var{group}. When you use +@code{:group} in a @code{defgroup}, it makes the new group a subgroup of +@var{group}. + +If you use this keyword more than once, you can put a single item into +more than one group. Displaying any of those groups will show this +item. Be careful not to overdo this! + +@item :link @var{link-data} +Include an external link after the documentation string for this item. +This is a sentence containing an active field which references some +other documentation. + +There are three alternatives you can use for @var{link-data}: + +@table @code +@item (custom-manual @var{info-node}) +Link to an Info node; @var{info-node} is a string which specifies the +node name, as in @code{"(emacs)Top"}. The link appears as +@samp{[manual]} in the customization buffer. + +@item (info-link @var{info-node}) +Like @code{custom-manual} except that the link appears +in the customization buffer with the Info node name. + +@item (url-link @var{url}) +Link to a web page; @var{url} is a string which specifies the @sc{url}. +The link appears in the customization buffer as @var{url}. +@end table + +You can specify the text to use in the customization buffer by adding +@code{:tag @var{name}} after the first element of the @var{link-data}; +for example, @code{(info-link :tag "foo" "(emacs)Top")} makes a link to +the Emacs manual which appears in the buffer as @samp{foo}. + +An item can have more than one external link; however, most items have +none at all. + +@item :load @var{file} +Load file @var{file} (a string) before displaying this customization +item. Loading is done with @code{load-library}, and only if the file is +not already loaded. + +@item :require @var{feature} +Require feature @var{feature} (a symbol) when installing a value for +this item (an option or a face) that was saved using the customization +feature. This is done by calling @code{require}. + +The most common reason to use @code{:require} is when a variable enables +a feature such as a minor mode, and just setting the variable won't have +any effect unless the code which implements the mode is loaded. +@end table + +@node Group Definitions +@section Defining Custom Groups + + Each Emacs Lisp package should have one main customization group which +contains all the options, faces and other groups in the package. If the +package has a small number of options and faces, use just one group and +put everything in it. When there are more than twelve or so options and +faces, then you should structure them into subgroups, and put the +subgroups under the package's main customization group. It is OK to +put some of the options and faces in the package's main group alongside +the subgroups. + + The package's main or only group should be a member of one or more of +the standard customization groups. (To display the full list of them, +use @kbd{M-x customize}.) Choose one or more of them (but not too +many), and add your group to each of them using the @code{:group} +keyword. + + The way to declare new customization groups is with @code{defgroup}. + +@tindex defgroup +@defmac defgroup group members doc [keyword value]... +Declare @var{group} as a customization group containing @var{members}. +Do not quote the symbol @var{group}. The argument @var{doc} specifies +the documentation string for the group. + +The argument @var{members} is a list specifying an initial set of +customization items to be members of the group. However, most often +@var{members} is @code{nil}, and you specify the group's members by +using the @code{:group} keyword when defining those members. + +If you want to specify group members through @var{members}, each element +should have the form @code{(@var{name} @var{widget})}. Here @var{name} +is a symbol, and @var{widget} is a widget type for editing that symbol. +Useful widgets are @code{custom-variable} for a variable, +@code{custom-face} for a face, and @code{custom-group} for a group. + +In addition to the common keywords (@pxref{Common Keywords}), you can +use this keyword in @code{defgroup}: + +@table @code +@item :prefix @var{prefix} +If the name of an item in the group starts with @var{prefix}, then the +tag for that item is constructed (by default) by omitting @var{prefix}. + +One group can have any number of prefixes. +@end table +@end defmac + +@c Doesn't apply to XEmacs +@c +@c The prefix-discarding feature is currently turned off, which means +@c that @code{:prefix} currently has no effect. We did this because we +@c found that discarding the specified prefixes often led to confusing +@c names for options. This happened because the people who wrote the +@c @code{defgroup} definitions for various groups added @code{:prefix} +@c keywords whenever they make logical sense---that is, whenever the +@c variables in the library have a common prefix. + +@c In order to obtain good results with @code{:prefix}, it would be +@c necessary to check the specific effects of discarding a particular +@c prefix, given the specific items in a group and their names and +@c documentation. If the resulting text is not clear, then @code{:prefix} +@c should not be used in that case. + +@c It should be possible to recheck all the customization groups, delete +@c the @code{:prefix} specifications which give unclear results, and then +@c turn this feature back on, if someone would like to do the work. + +@node Variable Definitions +@section Defining Customization Variables + + Use @code{defcustom} to declare user-editable variables. + +@tindex defcustom +@defmac defcustom option default doc [keyword value]... +Declare @var{option} as a customizable user option variable. Do not +quote @var{option}. The argument @var{doc} specifies the documentation +string for the variable. + +If @var{option} is void, @code{defcustom} initializes it to +@var{default}. @var{default} should be an expression to compute the +value; be careful in writing it, because it can be evaluated on more +than one occasion. + +The following additional keywords are defined: + +@table @code +@item :type @var{type} +Use @var{type} as the data type for this option. It specifies which +values are legitimate, and how to display the value. +@xref{Customization Types}, for more information. + +@item :options @var{list} +Specify @var{list} as the list of reasonable values for use in this +option. + +Currently this is meaningful only when the type is @code{hook}. In that +case, the elements of @var{list} should be functions that are useful as +elements of the hook value. The user is not restricted to using only +these functions, but they are offered as convenient alternatives. + +@item :version @var{version} +This option specifies that the variable was first introduced, or its +default value was changed, in Emacs version @var{version}. The value +@var{version} must be a string. For example, + +@example +(defcustom foo-max 34 + "*Maximum number of foo's allowed." + :type 'integer + :group 'foo + :version "20.3") +@end example + +@item :set @var{setfunction} +Specify @var{setfunction} as the way to change the value of this option. +The function @var{setfunction} should take two arguments, a symbol and +the new value, and should do whatever is necessary to update the value +properly for this option (which may not mean simply setting the option +as a Lisp variable). The default for @var{setfunction} is +@code{set-default}. + +@item :get @var{getfunction} +Specify @var{getfunction} as the way to extract the value of this +option. The function @var{getfunction} should take one argument, a +symbol, and should return the ``current value'' for that symbol (which +need not be the symbol's Lisp value). The default is +@code{default-value}. + +@item :initialize @var{function} +@var{function} should be a function used to initialize the variable when +the @code{defcustom} is evaluated. It should take two arguments, the +symbol and value. Here are some predefined functions meant for use in +this way: + +@table @code +@item custom-initialize-set +Use the variable's @code{:set} function to initialize the variable, but +do not reinitialize it if it is already non-void. This is the default +@code{:initialize} function. + +@item custom-initialize-default +Like @code{custom-initialize-set}, but use the function +@code{set-default} to set the variable, instead of the variable's +@code{:set} function. This is the usual choice for a variable whose +@code{:set} function enables or disables a minor mode; with this choice, +defining the variable will not call the minor mode function, but +customizing the variable will do so. + +@item custom-initialize-reset +Always use the @code{:set} function to initialize the variable. If the +variable is already non-void, reset it by calling the @code{:set} +function using the current value (returned by the @code{:get} method). + +@item custom-initialize-changed +Use the @code{:set} function to initialize the variable, if it is +already set or has been customized; otherwise, just use +@code{set-default}. +@end table +@end table +@end defmac + + The @code{:require} option is useful for an option that turns on the +operation of a certain feature. Assuming that the package is coded to +check the value of the option, you still need to arrange for the package +to be loaded. You can do that with @code{:require}. @xref{Common +Keywords}. Here is an example, from the library @file{paren.el}: + +@example +(defcustom show-paren-mode nil + "Toggle Show Paren mode@enddots{}" + :set (lambda (symbol value) + (show-paren-mode (or value 0))) + :initialize 'custom-initialize-default + :type 'boolean + :group 'paren-showing + :require 'paren) +@end example + +@ignore +Use @code{custom-add-option} to specify that a specific function is +useful as an member of a hook. + +@defun custom-add-option symbol option +To the variable @var{symbol} add @var{option}. + +If @var{symbol} is a hook variable, @var{option} should be a hook +member. For other types variables, the effect is undefined." +@end defun +@end ignore + +Internally, @code{defcustom} uses the symbol property +@code{standard-value} to record the expression for the default value, +and @code{saved-value} to record the value saved by the user with the +customization buffer. The @code{saved-value} property is actually a +list whose car is an expression which evaluates to the value. + +@node Customization Types +@section Customization Types + + When you define a user option with @code{defcustom}, you must specify +its @dfn{customization type}. That is a Lisp object which describes (1) +which values are legitimate and (2) how to display the value in the +customization buffer for editing. + + You specify the customization type in @code{defcustom} with the +@code{:type} keyword. The argument of @code{:type} is evaluated; since +types that vary at run time are rarely useful, normally you use a quoted +constant. For example: + +@example +(defcustom diff-command "diff" + "*The command to use to run diff." + :type '(string) + :group 'diff) +@end example + + In general, a customization type is a list whose first element is a +symbol, one of the customization type names defined in the following +sections. After this symbol come a number of arguments, depending on +the symbol. Between the type symbol and its arguments, you can +optionally write keyword-value pairs (@pxref{Type Keywords}). + + Some of the type symbols do not use any arguments; those are called +@dfn{simple types}. For a simple type, if you do not use any +keyword-value pairs, you can omit the parentheses around the type +symbol. For example just @code{string} as a customization type is +equivalent to @code{(string)}. + +@menu +* Simple Types:: +* Composite Types:: +* Splicing into Lists:: +* Type Keywords:: +@end menu + +@node Simple Types +@subsection Simple Types + + This section describes all the simple customization types. + +@table @code +@item sexp +The value may be any Lisp object that can be printed and read back. You +can use @code{sexp} as a fall-back for any option, if you don't want to +take the time to work out a more specific type to use. + +@item integer +The value must be an integer, and is represented textually +in the customization buffer. + +@item number +The value must be a number, and is represented textually in the +customization buffer. + +@item string +The value must be a string, and the customization buffer shows just the +contents, with no delimiting @samp{"} characters and no quoting with +@samp{\}. + +@item regexp +Like @code{string} except that the string must be a valid regular +expression. + +@item character +The value must be a character code. A character code is actually an +integer, but this type shows the value by inserting the character in the +buffer, rather than by showing the number. + +@item file +The value must be a file name, and you can do completion with +@kbd{M-@key{TAB}}. + +@item (file :must-match t) +The value must be a file name for an existing file, and you can do +completion with @kbd{M-@key{TAB}}. + +@item directory +The value must be a directory name, and you can do completion with +@kbd{M-@key{TAB}}. + +@item symbol +The value must be a symbol. It appears in the customization buffer as +the name of the symbol. + +@item function +The value must be either a lambda expression or a function name. When +it is a function name, you can do completion with @kbd{M-@key{TAB}}. + +@item variable +The value must be a variable name, and you can do completion with +@kbd{M-@key{TAB}}. + +@item face +The value must be a symbol which is a face name. + +@item boolean +The value is boolean---either @code{nil} or @code{t}. Note that by +using @code{choice} and @code{const} together (see the next section), +you can specify that the value must be @code{nil} or @code{t}, but also +specify the text to describe each value in a way that fits the specific +meaning of the alternative. +@end table + +@node Composite Types +@subsection Composite Types + + When none of the simple types is appropriate, you can use composite +types, which build new types from other types. Here are several ways of +doing that: + +@table @code +@item (restricted-sexp :match-alternatives @var{criteria}) +The value may be any Lisp object that satisfies one of @var{criteria}. +@var{criteria} should be a list, and each elements should be +one of these possibilities: + +@itemize @bullet +@item +A predicate---that is, a function of one argument that returns non-@code{nil} +if the argument fits a certain type. This means that objects of that type +are acceptable. + +@item +A quoted constant---that is, @code{'@var{object}}. This means that +@var{object} itself is an acceptable value. +@end itemize + +For example, + +@example +(restricted-sexp :match-alternatives (integerp 't 'nil)) +@end example + +@noindent +allows integers, @code{t} and @code{nil} as legitimate values. + +The customization buffer shows all legitimate values using their read +syntax, and the user edits them textually. + +@item (cons @var{car-type} @var{cdr-type}) +The value must be a cons cell, its @sc{car} must fit @var{car-type}, and +its @sc{cdr} must fit @var{cdr-type}. For example, @code{(cons string +symbol)} is a customization type which matches values such as +@code{("foo" . foo)}. + +In the customization buffer, the @sc{car} and the @sc{cdr} are +displayed and edited separately, each according to the type +that you specify for it. + +@item (list @var{element-types}@dots{}) +The value must be a list with exactly as many elements as the +@var{element-types} you have specified; and each element must fit the +corresponding @var{element-type}. + +For example, @code{(list integer string function)} describes a list of +three elements; the first element must be an integer, the second a +string, and the third a function. + +In the customization buffer, the each element is displayed and edited +separately, according to the type specified for it. + +@item (vector @var{element-types}@dots{}) +Like @code{list} except that the value must be a vector instead of a +list. The elements work the same as in @code{list}. + +@item (choice @var{alternative-types}...) +The value must fit at least one of @var{alternative-types}. +For example, @code{(choice integer string)} allows either an +integer or a string. + +In the customization buffer, the user selects one of the alternatives +using a menu, and can then edit the value in the usual way for that +alternative. + +Normally the strings in this menu are determined automatically from the +choices; however, you can specify different strings for the menu by +including the @code{:tag} keyword in the alternatives. For example, if +an integer stands for a number of spaces, while a string is text to use +verbatim, you might write the customization type this way, + +@smallexample +(choice (integer :tag "Number of spaces") + (string :tag "Literal text")) +@end smallexample + +@noindent +so that the menu offers @samp{Number of spaces} and @samp{Literal Text}. + +In any alternative for which @code{nil} is not a valid value, other than +a @code{const}, you should specify a valid default for that alternative +using the @code{:value} keyword. @xref{Type Keywords}. + +@item (const @var{value}) +The value must be @var{value}---nothing else is allowed. + +The main use of @code{const} is inside of @code{choice}. For example, +@code{(choice integer (const nil))} allows either an integer or +@code{nil}. + +@code{:tag} is often used with @code{const}, inside of @code{choice}. +For example, + +@smallexample +(choice (const :tag "Yes" t) + (const :tag "No" nil) + (const :tag "Ask" foo)) +@end smallexample + +@item (function-item @var{function}) +Like @code{const}, but used for values which are functions. This +displays the documentation string as well as the function name. +The documentation string is either the one you specify with +@code{:doc}, or @var{function}'s own documentation string. + +@item (variable-item @var{variable}) +Like @code{const}, but used for values which are variable names. This +displays the documentation string as well as the variable name. The +documentation string is either the one you specify with @code{:doc}, or +@var{variable}'s own documentation string. + +@item (set @var{elements}@dots{}) +The value must be a list and each element of the list must be one of the +@var{elements} specified. This appears in the customization buffer as a +checklist. + +@item (repeat @var{element-type}) +The value must be a list and each element of the list must fit the type +@var{element-type}. This appears in the customization buffer as a +list of elements, with @samp{[INS]} and @samp{[DEL]} buttons for adding +more elements or removing elements. +@end table + +@node Splicing into Lists +@subsection Splicing into Lists + + The @code{:inline} feature lets you splice a variable number of +elements into the middle of a list or vector. You use it in a +@code{set}, @code{choice} or @code{repeat} type which appears among the +element-types of a @code{list} or @code{vector}. + + Normally, each of the element-types in a @code{list} or @code{vector} +describes one and only one element of the list or vector. Thus, if an +element-type is a @code{repeat}, that specifies a list of unspecified +length which appears as one element. + + But when the element-type uses @code{:inline}, the value it matches is +merged directly into the containing sequence. For example, if it +matches a list with three elements, those become three elements of the +overall sequence. This is analogous to using @samp{,@@} in the backquote +construct. + + For example, to specify a list whose first element must be @code{t} +and whose remaining arguments should be zero or more of @code{foo} and +@code{bar}, use this customization type: + +@example +(list (const t) (set :inline t foo bar)) +@end example + +@noindent +This matches values such as @code{(t)}, @code{(t foo)}, @code{(t bar)} +and @code{(t foo bar)}. + + When the element-type is a @code{choice}, you use @code{:inline} not +in the @code{choice} itself, but in (some of) the alternatives of the +@code{choice}. For example, to match a list which must start with a +file name, followed either by the symbol @code{t} or two strings, use +this customization type: + +@example +(list file + (choice (const t) + (list :inline t string string))) +@end example + +@noindent +If the user chooses the first alternative in the choice, then the +overall list has two elements and the second element is @code{t}. If +the user chooses the second alternative, then the overall list has three +elements and the second and third must be strings. + +@node Type Keywords +@subsection Type Keywords + +You can specify keyword-argument pairs in a customization type after the +type name symbol. Here are the keywords you can use, and their +meanings: + +@table @code +@item :value @var{default} +This is used for a type that appears as an alternative inside of +@code{choice}; it specifies the default value to use, at first, if and +when the user selects this alternative with the menu in the +customization buffer. + +Of course, if the actual value of the option fits this alternative, it +will appear showing the actual value, not @var{default}. + +If @code{nil} is not a valid value for the alternative, then it is +essential to specify a valid default with @code{:value}. + +@item :format @var{format-string} +This string will be inserted in the buffer to represent the value +corresponding to the type. The following @samp{%} escapes are available +for use in @var{format-string}: + +@table @samp +@item %[@var{button}%] +Display the text @var{button} marked as a button. The @code{:action} +attribute specifies what the button will do if the user invokes it; +its value is a function which takes two arguments---the widget which +the button appears in, and the event. + +There is no way to specify two different buttons with different +actions. + +@item %@{@var{sample}%@} +Show @var{sample} in a special face specified by @code{:sample-face}. + +@item %v +Substitute the item's value. How the value is represented depends on +the kind of item, and (for variables) on the customization type. + +@item %d +Substitute the item's documentation string. + +@item %h +Like @samp{%d}, but if the documentation string is more than one line, +add an active field to control whether to show all of it or just the +first line. + +@item %t +Substitute the tag here. You specify the tag with the @code{:tag} +keyword. + +@item %% +Display a literal @samp{%}. +@end table + +@item :action @var{action} +Perform @var{action} if the user clicks on a button. + +@item :button-face @var{face} +Use the face @var{face} (a face name or a list of face names) for button +text displayed with @samp{%[@dots{}%]}. + +@item :button-prefix @var{prefix} +@itemx :button-suffix @var{suffix} +These specify the text to display before and after a button. +Each can be: + +@table @asis +@item @code{nil} +No text is inserted. + +@item a string +The string is inserted literally. + +@item a symbol +The symbol's value is used. +@end table + +@item :tag @var{tag} +Use @var{tag} (a string) as the tag for the value (or part of the value) +that corresponds to this type. + +@item :doc @var{doc} +Use @var{doc} as the documentation string for this value (or part of the +value) that corresponds to this type. In order for this to work, you +must specify a value for @code{:format}, and use @samp{%d} or @samp{%h} +in that value. + +The usual reason to specify a documentation string for a type is to +provide more information about the meanings of alternatives inside a +@code{:choice} type or the parts of some other composite type. + +@item :help-echo @var{motion-doc} +When you move to this item with @code{widget-forward} or +@code{widget-backward}, it will display the string @var{motion-doc} +in the echo area. + +@item :match @var{function} +Specify how to decide whether a value matches the type. The +corresponding value, @var{function}, should be a function that accepts +two arguments, a widget and a value; it should return non-@code{nil} if +the value is acceptable. + +@ignore +@item :indent @var{columns} +Indent this item by @var{columns} columns. The indentation is used for +@samp{%n}, and automatically for group names, for checklists and radio +buttons, and for editable lists. It affects the whole of the +item except for the first line. + +@item :offset @var{columns} +An integer indicating how many extra spaces to indent the subitems of +this item. By default, subitems are indented the same as their parent. + +@item :extra-offset +An integer indicating how many extra spaces to add to this item's +indentation, compared to its parent. + +@item :notify +A function called each time the item or a subitem is changed. The +function is called with two or three arguments. The first argument is +the item itself, the second argument is the item that was changed, and +the third argument is the event leading to the change, if any. + +@item :menu-tag +Tag used in the menu when the widget is used as an option in a +@code{menu-choice} widget. + +@item :menu-tag-get +Function used for finding the tag when the widget is used as an option +in a @code{menu-choice} widget. By default, the tag used will be either the +@code{:menu-tag} or @code{:tag} property if present, or the @code{princ} +representation of the @code{:value} property if not. + +@item :validate +A function which takes a widget as an argument, and return nil if the +widgets current value is valid for the widget. Otherwise, it should +return the widget containing the invalid data, and set that widgets +@code{:error} property to a string explaining the error. + +You can use the function @code{widget-children-validate} for this job; +it tests that all children of @var{widget} are valid. + +@item :tab-order +Specify the order in which widgets are traversed with +@code{widget-forward} or @code{widget-backward}. This is only partially +implemented. + +@enumerate a +@item +Widgets with tabbing order @code{-1} are ignored. + +@item +(Unimplemented) When on a widget with tabbing order @var{n}, go to the +next widget in the buffer with tabbing order @var{n+1} or @code{nil}, +whichever comes first. + +@item +When on a widget with no tabbing order specified, go to the next widget +in the buffer with a positive tabbing order, or @code{nil} +@end enumerate + +@item :parent +The parent of a nested widget (e.g. a @code{menu-choice} item or an +element of a @code{editable-list} widget). + +@item :sibling-args +This keyword is only used for members of a @code{radio-button-choice} or +@code{checklist}. The value should be a list of extra keyword +arguments, which will be used when creating the @code{radio-button} or +@code{checkbox} associated with this item. +@end ignore +@end table
--- a/man/lispref/display.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/display.texi Mon Aug 13 11:04:06 2007 +0200 @@ -359,7 +359,7 @@ across several lines. Here is an example of how a warning is displayed: @example -(1) (initialization/error) An error has occured while loading ~/.emacs: +(1) (initialization/error) An error has occurred while loading ~/.emacs: Symbol's value as variable is void: bogus-variable @@ -499,11 +499,11 @@ @table @code @item @var{atom} -A character is invisible if its @code{invisible} propery value +A character is invisible if its @code{invisible} property value is @var{atom} or if it is a list with @var{atom} as a member. @item (@var{atom} . t) -A character is invisible if its @code{invisible} propery value +A character is invisible if its @code{invisible} property value is @var{atom} or if it is a list with @var{atom} as a member. Moreover, if this character is at the end of a line and is followed by a visible newline, it displays an ellipsis.
--- a/man/lispref/dragndrop.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/dragndrop.texi Mon Aug 13 11:04:06 2007 +0200 @@ -12,7 +12,7 @@ interface may change! The current implementation is considered experimental. Drag'n'drop is a way to transfer information between multiple applications. -To do this serveral GUIs define their own protocols. Examples are OffiX, CDE, +To do this several GUIs define their own protocols. Examples are OffiX, CDE, Motif, KDE, MSWindows, GNOME, and many more. To catch all these protocols, XEmacs provides a generic API. @@ -32,7 +32,7 @@ @section Supported Protocols The current release of XEmacs only support a small set of Drag'n'drop -protocols. Some of these only support limited options avaiable in the API. +protocols. Some of these only support limited options available in the API. @menu * OffiX DND:: A generic X based protocol. @@ -63,7 +63,7 @@ XEmacs supports both MIME and URL drags and drops using this API. No application interaction is possible while dragging is in progress. -For infomation about the OffiX project have a look at http://leb.net/~offix/ +For information about the OffiX project have a look at http://leb.net/~offix/ @node CDE dt @subsection CDE dt @@ -110,7 +110,7 @@ @code{experimental-dragdrop-drop-functions} for a function that can handle the dropped data. -To modify the drop behaviour, the user can modify the variable +To modify the drop behavior, the user can modify the variable @code{experimental-dragdrop-drop-functions}. Each element of this list specifies a possible handler for dropped data. The first one that can handle the data will return @code{t} and exit. Another possibility is to set a
--- a/man/lispref/edebug-inc.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/edebug-inc.texi Mon Aug 13 11:04:06 2007 +0200 @@ -355,7 +355,7 @@ is instrumented. It does this by calling @code{edebug-on-entry} and then switching to @code{go} mode. -Although the automatic instrumentating is convenient, it is not +Although the automatic instrumentation is convenient, it is not later automatically uninstrumented. @item h @@ -1411,7 +1411,7 @@ @cindex backquote (Edebug) Backquote (@kbd{`}) is a macro that results in an expression that may or may not be evaluated. It is often used to simplify the definition of a -macro to return an expression that is evaluted, but Edebug does not know +macro to return an expression that is evaluated, but Edebug does not know when this is the case. However, the forms inside unquotes (@code{,} and @code{,@@}) are evaluated and Edebug instruments them.
--- a/man/lispref/edebug.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/edebug.texi Mon Aug 13 11:04:06 2007 +0200 @@ -147,7 +147,7 @@ sometimes. There is a bug in window updating when there is both a trace buffer -and an evaluation list - the source buffer doesnt get displayed. +and an evaluation list - the source buffer doesn't get displayed. @item Killing and reinserting an instrumented definition or parts of
--- a/man/lispref/errors.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/errors.texi Mon Aug 13 11:04:06 2007 +0200 @@ -125,8 +125,6 @@ @item setting-constant @code{"Attempt to set a constant symbol"}@* -The values of the symbols @code{nil} and @code{t} -may not be changed.@* @xref{Constant Variables, , Variables that Never Change}. @c XEmacs feature @@ -142,10 +140,6 @@ @item undefined-keystroke-sequence @code{"Undefined keystroke sequence"}@* -@c XEmacs feature -@item underflow-error -@code{"Arithmetic underflow error"}@* - @ignore FSF Emacs only @item undefined-color @code{"Undefined color"}@*
--- a/man/lispref/files.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/files.texi Mon Aug 13 11:04:06 2007 +0200 @@ -1240,6 +1240,7 @@ * File Name Expansion:: Converting relative file names to absolute ones. * Unique File Names:: Generating names for temporary files. * File Name Completion:: Finding the completions for a given file name. +* User Name Completion:: Finding the completions for a given user name. @end menu @node File Name Components @@ -1763,6 +1764,41 @@ @end example @end defopt +@node User Name Completion +@subsection User Name Completion +@cindex user name completion subroutines +@cindex completion, user name + + This section describes low-level subroutines for completing a user +name. For other completion functions, see @ref{Completion}. + +@defun user-name-all-completions partial-username +This function returns a list of all possible completions for a user +whose name starts with @var{partial-username}. The order of the +completions is unpredictable and conveys no useful information. + +The argument @var{partial-username} must be a partial user name +containing no tilde character and no slash. +@end defun + +@defun user-name-completion username +This function completes the user name @var{username}. It returns the +longest prefix common to all user names that start with @var{username}. + +If only one match exists and @var{username} matches it exactly, the +function returns @code{t}. The function returns @code{nil} if no user +name starting with @var{username} exists. +@end defun + +@defun user-name-completion-1 username +This function completes the user name @var{username}, like +@code{user-name-completion}, differing only in the return value. +This function returns the cons of the completion returned by +@code{user-name-completion}, and a boolean indicating whether that +completion was unique. +@end defun + + @node Contents of Directories @section Contents of Directories @cindex directory-oriented functions
--- a/man/lispref/lispref.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/lispref.texi Mon Aug 13 11:04:06 2007 +0200 @@ -140,6 +140,7 @@ * Functions:: A function is a Lisp program that can be invoked from other functions. * Macros:: Macros are a way to extend the Lisp language. +* Customization:: Writing customization declarations. * Loading:: Reading files of Lisp code into Lisp. * Byte Compilation:: Compilation makes programs run faster. @@ -1144,6 +1145,7 @@ @include variables.texi @include functions.texi @include macros.texi +@include customize.texi @include loading.texi @include compile.texi
--- a/man/lispref/menus.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/menus.texi Mon Aug 13 11:04:06 2007 +0200 @@ -644,7 +644,7 @@ way that should be familiar to users of any of a certain family of popular PC operating systems. -This behaviour can be changed by modifying the bindings in +This behavior can be changed by modifying the bindings in menu-accelerator-map. At this point, the online help is your best bet for more information about how to modify the menu traversal keys. @@ -685,7 +685,7 @@ @defvar menu-accelerator-modifiers A list of modifier keys which must be pressed in addition to a valid menu accelerator in order for the top level menu to be activated in response to -a keystroke. The default value of @code{(meta)} mirrors the useage of the alt key +a keystroke. The default value of @code{(meta)} mirrors the usage of the alt key as a menu accelerator in popular PC operating systems. The modifier keys in @var{menu-accelerator-modifiers} must match exactly the
--- a/man/lispref/modes.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/modes.texi Mon Aug 13 11:04:06 2007 +0200 @@ -634,7 +634,7 @@ @end defvar @defvar interpreter-mode-alist -This variable specifes major modes to use for scripts that specify a +This variable specifies major modes to use for scripts that specify a command interpreter in an @samp{#!} line. Its value is a list of elements of the form @code{(@var{interpreter} . @var{mode})}; for example, @code{("perl" . perl-mode)} is one element present by default.
--- a/man/lispref/objects.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/objects.texi Mon Aug 13 11:04:06 2007 +0200 @@ -2202,7 +2202,7 @@ NOTE: Under XEmacs 19, characters are really just integers, and thus characters and integers are @code{eq}. Under XEmacs 20, it was -necessary to preserve remants of this in function such as @code{old-eq} +necessary to preserve remnants of this in function such as @code{old-eq} in order to maintain byte-code compatibility. Byte code compiled under any Emacs 19 will automatically have calls to @code{eq} mapped to @code{old-eq} when executed under XEmacs 20.
--- a/man/lispref/os.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/os.texi Mon Aug 13 11:04:06 2007 +0200 @@ -1540,7 +1540,7 @@ This function is used to open a @dfn{termscript file} that will record all the characters sent by XEmacs to the terminal. (If there are multiple tty or stream devices, all characters sent to all such devices -are recorded.) The funcion returns @code{nil}. Termscript files are +are recorded.) The function returns @code{nil}. Termscript files are useful for investigating problems where XEmacs garbles the screen, problems that are due to incorrect Termcap entries or to undesirable settings of terminal options more often than to actual XEmacs bugs.
--- a/man/lispref/positions.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/positions.texi Mon Aug 13 11:04:06 2007 +0200 @@ -901,7 +901,7 @@ If @var{body} changes the current buffer, @code{save-restriction} still restores the restrictions on the original buffer (the buffer whose -restructions it saved from), but it does not restore the identity of the +restrictions it saved from), but it does not restore the identity of the current buffer. @code{save-restriction} does @emph{not} restore point and the mark; use
--- a/man/lispref/searching.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/searching.texi Mon Aug 13 11:04:06 2007 +0200 @@ -263,7 +263,7 @@ @cindex @samp{?} in regexp is a quantifying suffix operator similar to @samp{*}, except that the preceding expression can match either once or not at all. For example, -@samp{ca?r} matches @samp{car} or @samp{cr}, but does not match anyhing +@samp{ca?r} matches @samp{car} or @samp{cr}, but does not match anything else. @item *? @@ -1096,7 +1096,7 @@ If @var{count} is zero, then the value is the position of the start of the entire match. Otherwise, @var{count} specifies a subexpression in -the regular expresion, and the value of the function is the starting +the regular expression, and the value of the function is the starting position of the match for that subexpression. The value is @code{nil} for a subexpression inside a @samp{\|}
--- a/man/lispref/tooltalk.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/tooltalk.texi Mon Aug 13 11:04:06 2007 +0200 @@ -225,7 +225,7 @@ @defun create-tooltalk-message Create a new ToolTalk message. The message's session attribute is -initialized to the default session. Other attributes can be intialized +initialized to the default session. Other attributes can be initialized with @code{set-tooltalk-message-attribute}. @code{make-tooltalk-message} is the preferred way to create and initialize a message.
--- a/man/lispref/variables.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/lispref/variables.texi Mon Aug 13 11:04:06 2007 +0200 @@ -95,10 +95,12 @@ @vindex t @kindex setting-constant - XEmacs Lisp has two special symbols, @code{nil} and @code{t}, that -always evaluate to themselves. These symbols cannot be rebound, nor can -their value cells be changed. An attempt to change the value of -@code{nil} or @code{t} signals a @code{setting-constant} error. +In XEmacs Lisp, some symbols always evaluate to themselves: the two +special symbols @code{nil} and @code{t}, as well as @dfn{keyword +symbols}, that is, symbols whose name begins with the character +@samp{@code{:}}. These symbols cannot be rebound, nor can their value +cells be changed. An attempt to change the value of @code{nil} or +@code{t} signals a @code{setting-constant} error. @example @group @@ -433,7 +435,7 @@ If the first character of @var{doc-string} is @samp{*}, it means that this variable is considered a user option. This lets users set the -variable conventiently using the commands @code{set-variable} and +variable conveniently using the commands @code{set-variable} and @code{edit-options}. For example, this form defines @code{foo} but does not set its value:
--- a/man/xemacs/calendar.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/xemacs/calendar.texi Mon Aug 13 11:04:06 2007 +0200 @@ -194,7 +194,7 @@ @kindex . @r{(Calendar mode)} @findex calendar-goto-today - You can return to today's date with @kbd{.} + You can return to today's date with @kbd{.}@: (@code{calendar-goto-today}). @node Scroll Calendar, Mark and Region, Calendar Motion, Calendar/Diary @@ -393,7 +393,7 @@ (@code{cal-tex-cursor-year}). @item t Y Generate a sideways-printing calendar for one year -(@code{cal-tex-cursor-landscape-year}). +(@code{cal-tex-cursor-year-landscape}). @item t f y Generate a Filofax-style calendar for one year (@code{cal-tex-cursor-filofax-year}). @@ -480,7 +480,7 @@ @findex list-holidays The command @kbd{M-x list-holidays} displays the list of holidays for a range of years. This function asks you for the starting and stopping -years, and allows you to chose all the holidays or one of several +years, and allows you to choose all the holidays or one of several categories of holidays. You can use this command even if you don't have a calendar window. @@ -998,6 +998,8 @@ Print hard copy of the diary display as it appears. @item M-x diary Display all diary entries for today's date. +@item M-x diary-mail-entries +Mail yourself email reminders about upcoming diary entries. @end table @kindex d @r{(Calendar mode)} @@ -1054,6 +1056,14 @@ enter Emacs. 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 + Many users like to receive notice of events in their diary as email. +To send such mail to yourself, use the command @kbd{M-x +diary-mail-entries}. A prefix argument specifies how many days +(starting with today) to check; otherwise, the variable +@code{diary-mail-days} says how many days. + @node Format of Diary File, Date Formats, Diary Commands, Diary @subsection The Diary File @cindex diary file @@ -1216,10 +1226,6 @@ All of the above commands make marking diary entries by default. To make a nonmarking diary entry, give a numeric argument to the command. For example, @kbd{C-u i w} makes a nonmarking weekly diary entry. - - All of the above commands make marking diary entries. If you want the diary -entry to be nonmarking, give a prefix argument to the command. For example, -@kbd{C-u i w} makes a nonmarking, weekly diary entry. When you modify the diary file, be sure to save the file before exiting Emacs. @@ -1760,9 +1766,9 @@ The values should be @code{nil} if your area does not use daylight savings time. - Emacs uses these expressions to determine the start and end dates of -daylight savings time as holidays and for correcting times of day in the -solar and lunar calculations. + Emacs uses these expressions to determine the starting date of +daylight savings time for the holiday list and for correcting times of +day in the solar and lunar calculations. The values for Cambridge, Massachusetts are as follows: @@ -1774,7 +1780,7 @@ @end example @noindent -i.e., the first 0th day (Sunday) of the fourth month (April) in +That is, the first 0th day (Sunday) of the fourth month (April) in the year specified by @code{year}, and the last Sunday of the tenth month (October) of that year. If daylight savings time were changed to start on October 1, you would set @@ -1809,10 +1815,10 @@ @c @vindex calendar-daylight-savings-starts-time too long! @vindex calendar-daylight-savings-ends-time - The variable @code{calendar-daylight-savings-starts-time} and the -variable @code{calendar-daylight-savings-ends-time} specify the number -of minutes after midnight local time when the transition to and from -daylight savings time should occur. For Cambridge, both variables' + The two variables @code{calendar-daylight-savings-starts-time} and +@code{calendar-daylight-savings-ends-time} specify the number of minutes +after midnight local time when the transition to and from daylight +savings time should occur. For Cambridge, Massachusetts both variables' values are 120. @node Diary Customizing
--- a/man/xemacs/packages.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/xemacs/packages.texi Mon Aug 13 11:04:06 2007 +0200 @@ -1,7 +1,7 @@ @node Packages, Abbrevs, Running, Top @comment node-name, next, previous, up -@section Introduction to XEmacs Packages +@section Packages @cindex packages The XEmacs 21 distribution comes only with a very basic set of @@ -12,16 +12,27 @@ This gives an installer the ability to tailor an XEmacs installation for local needs with safe removal of unnecessary code. +@menu +* Package Terminology:: Understanding different kinds of packages. +* Using Packages:: How to install and use packages. +* Building Packages:: Building packages from sources. +@end menu + +@node Package Terminology, Using Packages, , Packages +@comment node-name, next, previous, up + @subsection Package Flavors There are two main flavors of packages. -@itemize @emph +@itemize @bullet @item Regular Packages +@cindex regular packages A regular package is one in which multiple files are involved and one may not in general safely remove any of them. @item Single-File Packages +@cindex single-file packages A single-file package is an aggregate collection of thematically related but otherwise independent lisp files. These files are bundled together for download convenience and individual files may deleted at @@ -37,17 +48,272 @@ bytecompiled lisp and creating tarballs for distribution. @subsection Binary Packages +@cindex binary packages Binary packages may be installed directly into an XEmacs package hierarchy. @subsection Source Packages - +@cindex source packages Source packages contain all of the Package author's (where appropriate in regular packages) source code plus all of the files necessary to build distribution tarballs (Unix Tar format files and gzipped for space savings). -@subsection Prerequisites for building Source Packages +@node Using Packages, Building Packages, Package Terminology, Packages +@comment node-name, next, previous, up + +@subsection Getting Started + +When you first download XEmacs 21, you will usually first grab the +@dfn{core distribution}, +@cindex core distribution +a file called +@file{xemacs-21.0.tar.gz}. (Replace the @t{21.0} by the current version +number.) The core distribution contains the sources of XEmacs and a +minimal set of Emacs Lisp files, which are in the subdirectory named +@file{lisp}. This subdirectory used to contain all Emacs Lisp files +distributed with XEmacs. Now, to conserve disk space, most +non-essential packages were made optional. + +@subsection Choosing the Packages You Need + +The available packages can currently be found in the same ftp directory +where you grabbed the core distribition from, and are located in the +subdirectory @file{packages/binary-packages}. Package file names follow +the naming convention @file{<package-name>-<version>-pkg.tar.gz}. + +If you have EFS @ref{(EFS)}, packages can be installed over the network. +Alternatively, if you have copies of the packages locally, you can +install packages from a local disk or CDROM. + +The file @file{etc/PACKAGES} in the core distribution contains a list of +the packages available at the time of the XEmacs release. Packages are +also listed on the @code{Options} menu under: + +@example + Options->Customize->Emacs->Packages +@end example + +However, don't select any of these menu picks unless you actually want +to install the given package (and have properly configured your system +to do so). + +You can also get a list of available packages, and whether or not they +are installed, using the visual package browser and installer. You can +access it via the menus: + +@example + Options->Customize->List Packages +@end example + +Or, you can get to it via the keyboard: + +@example +M-x pui-list-packages +@end example + +Hint to system administrators of multi-user systems: it might be a good +idea to install all packages and not interfere with the wishes of your +users. + +@subsection XEmacs and Installing Packages + +Normally, packages are installed over the network, using EFS +@ref{(EFS)}. However, you may not have network access, or you may +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: + +@example +(setq package-get-remote (cons (list nil "/my/path/to/package/binaries") + package-get-remote)) +@end example + +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). + +If you are installing from a temporary, one-time directory, you can also +add these directory names to @code{package-get-remote} using: + +@example + M-x pui-add-install-directory +@end example + +Note, however, that any directories added using this function are not +saved; this information will be lost when you quit XEmacs. + +If you're going to install over the network, you only have to insure +that EFS @ref{(EFS)} works, and that it can get outside a firewall, if +you happen to be behind one. You shouldn't have to do anything else; +XEmacs already knows where to go. + +The easiest way to install a package is to use the visual package +browser and installer, using the menu pick: + +@example + Options->Customize->List Packages +@end example + +You can also access it using the keyboard: + +@example +M-x pui-list-packages +@end example + +The visual package browser will then display a list of all packages. +Help information will be displayed at the very bottom of the buffer; you +may have to scroll down to see it. You can also press @kbd{?} to get +the same help. From this buffer, you can tell the package status by the +character in the first column: + +@table @kbd +@item - +The package has not been installed. +@item * +The package has been installed, but a newer version is available. The +current version is out-of-date. +@item + +The package has been marked for installation/update. +@end table + +If there is no character in the first column, the package has been +installed and is up-to-date. + +From here, you can select or unselect packages for installation using +the @key{RET} key, or using the @kbd{Mouse-2} or @kbd{Mouse-3} buttons. +Once you've finished selecting the packages, you can press the @kbd{x} +key to actually install the packages. Note that you will have to +restart XEmacs for XEmacs to recognize any new packages. + +Key summary: + +@table @kbd +@item ? +Display simple help. +@item @key{RET} +@itemx @key{Mouse-2} +@itemx @key{Mouse-3} +Toggle between selecting and unselecting a package for installation. +@item x +Install selected packages. +@item @key{SPC} +View, in the minibuffer, additional information about the package, such +as the package date (not the build date) and the package author. Moving +the mouse over a package name will also do the same thing. +@item v +Toggle between verbose and non-verbose package display. +@item g +Refresh the package display. +@item q +Kill the package buffer. +@end table + +Moving the mouse over a package will also cause additional information +about the package to be displayed in the minibuffer. + +@subsection Other package installation interfaces + +For an alternative package interface, you can select packages from the +customize menus, under: + +@example + Options->Customize->Emacs->Packages-> ... +@end example + +Set their state to on, and then do: + +@example + Options->Customize->Update Packages +@end example + +This will automatically retrieve the packages you have selected from the +XEmacs ftp site or your local disk, and install them into +XEmacs. Additionally it will update any packages you already have +installed to the newest version. Note that if a package is newly +installed you will have to restart XEmacs for the change to take effect. + +You can also install packages using a semi-manual interface: + +@example +M-x package-get-all <return> +@end example + +Enter the name of the package (e.g., @code{prog-modes}), and XEmacs +will search for the latest version (as listed in the lisp file +@file{lisp/package-get-base.el}), and install it and any packages that +it depends upon. + +@subsection Manual Binary Package Installation + +Pre-compiled, binary packages can be installed in either a system +package directory (this is determined when XEmacs is compiled), or in a +subdirectory off your @file{$HOME} directory: + +@example +~/.xemacs/packages +@end example + +XEmacs does not have to be running to install binary packages, although +XEmacs will not know about any newly-installed packages until you +restart XEmacs. Note, however, that installing a newer version of a +package while XEmacs is running could cause strange errors in XEmacs; +it's best to exit XEmacs before upgrading an existing package. + +To install binary packages manually: + +@enumerate +@item +Download the package(s) that you want to install. Each binary package +will typically be a gzip'd tarball. + +@item +Decide where to install the packages: in the system package directory, +or in @file{~/.xemacs/packages}. If you want to install the +packages in the system package directory, make sure you can write into +that directory. If you want to install in your @file{$HOME} directory, +create the directory, @file{~/.xemacs/packages}. + +@item +Next, @code{cd} to the directory under which you want to install the +package(s). + +@item +From this directory, uncompress and extract each of the gzip'd tarballs +that you downloaded in step 1. Unix and Cygnus cygwin users will +typically do this using the commands: + +@example + gunzip < package.tar.gz | tar xvf - +@end example + +Above, replace @file{package.tar.gz} with the filename of the +package that you downloaded in step 1. + +Of course, if you use GNU @code{tar}, you could also use: + +@example + tar xvzf package.tar.gz +@end example + +@comment What about native MS Windows users??? + +@item +That's it. Quit and restart XEmacs to get it to recognize any new or +changed packages. + +@end enumerate + +@node Building Packages, , Using Packages, Packages +@comment node-name, next, previous, up + +Source packages are available from the @file{packages/source-packages} +subdirectory of your favorite XEmacs distribution site. Alternatively, +they are available via CVS from @file{cvs.xemacs.org}. Look at +@file{http://cvs.xemacs.org} for instructions. + +@subsection Prerequisites for Building Source Packages You must have GNU @code{cp}, GNU @code{install} (or a BSD compatible @code{install} program) GNU @code{make} (3.75 or later preferred), @@ -58,7 +324,7 @@ available from the XEmacs FTP site from the same place you obtained your source package distributions. -@subsection What you can do with Source Packages +@subsection What You Can Do With Source Packages NB: A global build operation doesn't exist yet as of 13 January 1998. @@ -66,7 +332,7 @@ for installation into your own XEmacs installations or for distributing to others. -Supported operations from Make are: +Supported operations from @file{make} are: @table @code @item clean
--- a/man/xemacs/startup.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/xemacs/startup.texi Mon Aug 13 11:04:06 2007 +0200 @@ -8,7 +8,7 @@ XEmacs deals with a multitude of files during operation. These files are spread over many directories, and XEmacs determines the location of most of these directories at startup and organizes them into various -paths. (A @emph{path}, +paths. (A @dfn{path}, @cindex path for the purposes of this section, is simply a list of directories which XEmacs searches successively in order to locate a file.) @@ -30,12 +30,12 @@ XEmacs will always respect directory options passed to @code{configure}. However, if it cannot locate a directory at the configured place, it will initiate a search for the directory in any of a number of -@emph{hierachies} rooted under a directory which XEmacs assumes contain +@dfn{hierachies} rooted under a directory which XEmacs assumes contain parts of the XEmacs installation; it may locate several such hierarchies and search across them. (Typically, there are just one or two hierarchies: the hierarchy where XEmacs was or will be installed, and the one where it is being built.) Such a directory containing a -hierarchy is called a @emph{root}. +hierarchy is called a @dfn{root}. @cindex root of a hierarchy Whenever this section refers to a directory using the shorthand @code{<root>}, it means that XEmacs searches for it under all @@ -53,8 +53,8 @@ Hence, they play a prominent role in the various paths XEmacs sets up. XEmacs locates packages in any of a number of package hierarchies. -Package hierarchies fall into three groups: @emph{early}, @emph{late}, -and @emph{last}, +Package hierarchies fall into three groups: @dfn{early}, @dfn{late}, +and @dfn{last}, @cindex early package hierarchies @cindex late package hierarchies @cindex last package hierarchies @@ -69,16 +69,16 @@ Moreover, XEmacs expects late hierarchies in the subdirectories @file{site-packages}, @file{mule-packages}, and @file{xemacs-packages} (in that order) of the @file{<root>/lib/xemacs} subdirectory of one of -the installation hierarchies. (If you run in-place, these are directr +the installation hierarchies. (If you run in-place, these are direct subdirectories of the build directory.) Furthermore, XEmacs will also search these subdirectories in the @file{<root>/lib/xemacs-<VERSION>} 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 with the 20.4 package hierarchy -as a last hierarchy. +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 +hierarchy. It is possible to specify at configure-time the location of the various package hierarchies with the @code{--package-path} option to configure. @@ -103,17 +103,20 @@ Here is a list of the various directories and paths XEmacs tries to locate during startup. XEmacs distinguishes between directories and -paths specific to @emph{version}, @emph{site}, and @emph{architecture} +paths specific to @dfn{version}, @dfn{site}, and @dfn{architecture} when looking for them. @table @code @item version-specific +@cindex version-specific directories directories are specific to the version of XEmacs they belong to and typically reside under @file{<root>/lib/xemacs-<VERSION>}. @item site-specific +@cindex site-specific directories directories are independent of the version of XEmacs they belong to and typically reside under @file{<root>/lib/xemacs} @item architecture-specific +@cindex architecture-specific directories directories are specific both to the version of XEmacs and the architecture it runs on and typically reside under @file{<root>/lib/xemacs-<VERSION>/<ARCHITECTURE>}. @@ -177,7 +180,7 @@ directories of the environment variables @code{PATH} @vindex PATH and @code{EMACSPATH}. -@vindex EMCSPATH +@vindex EMACSPATH @item doc-directory @vindex doc-directory
--- a/man/xemacs/xemacs.texi Mon Aug 13 11:03:09 2007 +0200 +++ b/man/xemacs/xemacs.texi Mon Aug 13 11:04:06 2007 +0200 @@ -93,7 +93,7 @@ XEmacs is the extensible, customizable, self-documenting real-time display editor. This Info file describes how to edit with Emacs and some of how to customize it, but not how to extend it. It -corresponds to XEmacs version 20.0. +corresponds to XEmacs version 21.0. This manual is intended as a detailed reference to XEmacs. If you are looking for an introductory manual, see the New User's @@ -497,7 +497,11 @@ * Mocklisp:: Converting Mocklisp to Lisp so XEmacs can run it. Packages + * Packages:: Introduction to XEmacs Packages. +* Package Terminology:: Understanding different kinds of packages. +* Using Packages:: How to install and use packages. +* Building Packages:: Building packages from sources. Abbrevs
--- a/nt/ChangeLog Mon Aug 13 11:03:09 2007 +0200 +++ b/nt/ChangeLog Mon Aug 13 11:04:06 2007 +0200 @@ -1,3 +1,59 @@ +1998-09-29 SL Baur <steve@altair.xemacs.org> + + * XEmacs 21.2-beta2 is released. + +1998-09-19 Adrian Aichner <aichner@ecf.teradyne.com> + + * tiff.mak: New file provided by Charles Wilson + <cwilson@ee.gatech.edu> + + * README: Update provided by Charles Wilson + <cwilson@ee.gatech.edu>. Documenting use of the newly + introduced tiff.mak. Renumbering subsequent build instruction + items. + +1998-09-20 Jonathan Harris <jhar@tardis.ed.ac.uk> + + * PROBLEMS: New file. + + * xemacs.mak: Install the PROBLEMS file in the root directory of + the XEmacs installation. + +1998-08-31 Jonathan Harris <jhar@tardis.ed.ac.uk> + + * xemacs.mak: Detect failure to supply PNG_DIR or XLIB_DIR + when building with PNG support. + +1998-08-31 Jonathan Harris <jhar@tardis.ed.ac.uk> + + * README: Document the PNG, ZLIB, JPEG, TIFF and GIF build + options. + +1998-08-12 Jeff Sparkes <jsparkes@internetivity.com> + + * xemacs.mak: Link in GIF, fix HAVE_JPEG default. + +1998-08-09 Jonathan Harris <jhar@tardis.ed.ac.uk> + + * xemacs.mak (install): Win95 fixes: + DOS mkdir doesn't create intermediate directories. xcopy does + so use it to create the install and lock directories. + Removed trailing backslashes from copy commands since DOS + copy doesn't like them. + +1998-08-05 Charles G. Waldman <cgw@pgt.com> + + * xemacs.mak: change "copy" to "xcopy" in install target + +1998-08-04 Jeff Sparkes <jsparkes@internetivity.com> + + * xemacs.mak: Link in PNG, TIFF and JPEG in native build. + +1998-08-04 Jonathan Harris <jhar@tardis.ed.ac.uk> + + * README: XEmacs has been successfully built with MSVC 4.0. + Mention the vcvars32.bat file installed with the MSVC tools. + 1998-07-19 SL Baur <steve@altair.xemacs.org> * XEmacs 21.2-beta1 is released.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nt/PROBLEMS Mon Aug 13 11:04:06 2007 +0200 @@ -0,0 +1,177 @@ + -*- mode:outline -*- + +This file describes various problems that have been encountered in +running XEmacs on Windows 95, 98 and NT. It has been updated for +XEmacs 21.0. + +This is the first release of XEmacs on Windows. In testing it has +proved to be extremely stable in general use (but see the gnus and +subprocess problems below), but not all features or packages work +correctly yet. + +Use `C-c C-f' to move to the next equal level of outline, and +`C-c C-b' to move to previous equal level. `C-h m' will give more +info about the Outline mode. + +Also, Try finding the things you need using one of the search commands +XEmacs provides (e.g. `C-s'). + +General advice: + Remember your .emacs file! ~\.emacs is your Emacs init file. If + you observe strange problems, invoke XEmacs with the `-q' option + and see if you can repeat the problem. + + +* Problems with running XEmacs +============================== +** Conflicts with FSF NTEmacs + +Depending on how it is installed, FSF NTEmacs may setup various EMACS* +variables in your environment. The presence of these variables may +cause XEmacs to fail at startup, cause you to see corrupted +doc-strings, or cause other random problems. + +You should remove these variables from your environment. These +variables are not required to run FSF NTEmacs if you start it by +running emacs.bat. + +** XEmacs can't find my .emacs file + +XEmacs looks for your .emacs in your "home" directory. XEmacs decides +that your "home" directory is, in order of preference: + +- The value of the HOME environment variable, if the variable exists. +- The value of the HOMEDRIVE and HOMEPATH environment variables, if + these variables both exist. +- The directory that XEmacs was started from. + +** XEmacs can't find any packages + +The directory tree under which XEmacs looks for your packages is set +at compile-time, and defaults to C:\Program Files\XEmacs\Packages. The +variable configure-package-path holds the actual value that was +compiled into your copy of XEmacs. + +The compile-time default location can be overridden by the +EMACSPACKAGEPATH environment variable or by the +SOFTWARE\GNU\XEmacs\EMACSPACKAGEPATH registry entry. You should check +that these variables, if they exist, point to the actual location of +your package tree. + +** XEmacs sometimes crashes when using gnus + +This is a known bug in this release of XEmacs on Windows. + +If you want to use gnus anyway, you should minimize any possible data +loss by saving any modified buffers before you start and ensuring that +you haven't set gnus-use-dribble-file to nil or disabled the normal +XEmacs auto-save mechanism. + +** XEmacs doesn't die when shutting down Windows 95 or 98 + +When shutting down Windows 95 or 98 you may see a dialog that says + "xemacs / You must quit this program before you quit Windows". +It is safe to + "Click OK to quit the program and Windows", +but you won't be offered a chance to save any modified XEmacs buffers. + +* Look and feel +=============== +** Key bindings + +The C-z, C-x, C-c, and C-v keystrokes have traditional uses in both +emacs and Windows programs. XEmacs binds these keys to their +traditional emacs uses, and provides Windows 3.x style bindings for +the Cut, Copy and Paste functions. + + Function XEmacs binding + -------- -------------- + Undo C-_ + Cut C-Insert + Copy C-Insert + Paste Sh-Del + +You can rebind keys to make XEmacs more Windows-compatible; for +example, to bind C-z to undo: + + (global-set-key [(control z)] 'undo) + +Rebindind C-x and C-c is trickier because by default these are prefix +keys in XEmacs. See the "Key Bindings" node in the XEmacs manual. + +** Behaviour of selected regions + +Selected regions behave differently in XEmacs from typical Windows +programs. The pc-select package provides various functions to enable +the standard Windows behaviour for selected regions (eg mark via +shift-arrow, self-inserting deletes region, etc). + +** Limitations on the use of the AltGr key. + +In some locale and OS combinations you can't generate M-AltGr-key or +C-M-AltGr-key sequences at all. + +To generate C-AltGr-key or C-M-AltGr-key sequences you must use the +right-hand Control key and you must press it *after* AltGr. + +These limitations arise from fundamental problems in the way that the +win32 API reports AltGr key events. There isn't anything that XEmacs +can do to work round these problems that it isn't already doing. + +You may want to create alternative bindings if any of the standard +XEmacs bindings require you to use some combination of Control or Meta +and AltGr. + + +* Features not fully supported in this release +============================================== +** Limited support for subprocesses + +Attempting to use call-process to run a 16bit program gives a +"Spawning child process: Exec format error". For example shell-command +fails under Windows 95 and 98 if you use command.com or any other +16bit program as your shell. + +XEmacs may incorrectly quote your call-process command if it contains +double quotes, backslashes or spaces. + +start-process and functions that rely on it are supported under Windows 95, +98 and NT. However, starting a 16bit program that requires keyboard input +may cause XEmacs to hang or crash under Windows 95 and 98, and will leave +the orphaned 16bit program consuming all available CPU time. + +Sending signals to subprocesses started by call-process or by +start-process fails with a "Cannot send signal to process" error under +Windows 95 and 98. As a side effect of this, quitting XEmacs while it +is still running subprocesses causes it to crash under Windows 95 and +98. + +** Changing fonts from the Options menu + +The "Font" and "Size" entries on the Options menu don't work yet. This +will be fixed in a future release. In the meantime, you can either +change face fonts with customize or manually; for example: + + (set-face-font 'default "Lucida Console:Regular:10::Western") + (set-face-font 'modeline "MS Sans Serif:Regular:10::Western") + +Font weight and style and character set must be supplied in English as +above. Common weights and styles are "Regular", "Regular Italic", +"Bold" and "Bold Italic". Common character sets are "Western", +"Central European" and "OEM/DOS". + +Windows 95 only comes with one fixed-width font that is suitable for +use by XEmacs, namely "Courier New". + +** No MULE support + +This release of XEmacs on Windows does not contain MULE support. MULE +support has not been a priority for the XEmacs on Windows developers. + +** Printing + +This release of XEmacs on Windows does not support printing natively. + +You can use the lpr-command and lpr-switches variables to specify an +external print program. +
--- a/nt/README Mon Aug 13 11:03:09 2007 +0200 +++ b/nt/README Mon Aug 13 11:04:06 2007 +0200 @@ -10,11 +10,15 @@ To get it working you will need: -1. You will need Visual C++ V4.2 or later to compile everything. Personally we - have tested V4.2 and V5.0. +1. You will need Visual C++ V4.0 or later to compile everything. Personally we + have tested V4.0, V4.2 and V5.0. Note that Visual C++ assumes a couple of environment variables INCLUDE and LIB to be set which specify the location of the includes and libraries. - At this point you can select X or Win32 native support. + Your PATH environment variable also needs to include the DevStudio vc\bin + and sharedide\bin directories. + Visual C++ V5.0 installs a batch file called vcvars32.bat in + c:\Program Files\DevStudio\VC\bin\ (or wherever you installed it) that you + can run before building to set up all of these environment variables. 2. Grab the latest XEmacs source from ftp.xemacs.org if necessary. All Win32 support is in the nt\ subdirectory. You'll also need the xemacs-base @@ -22,41 +26,72 @@ want at least the edit-utils, text-utils, cc-mode and prog-utils packages. Unpack the packages into, say, "c:\Program Files\XEmacs\packages". +3. At this point you can select X or Win32 native GUI support. If you want to build for native GUI: -1. If you want XPM and toolbar support grab the latest version of the xpm - sources (xpm-3.4k.tar.gz at time of writing) and unpack them somewhere. +1. If you want XPM image and toolbar support grab the latest version of the + xpm sources (xpm-3.4k.tar.gz at time of writing) and unpack them somewhere. Copy nt\xpm.mak from the xemacs sources to the lib subdirectory of the - xpm sources, cd to that directory and build xpm with `nmake -f xpm.mak`. + xpm sources, cd to that directory and build xpm with 'nmake -f xpm.mak'. + +2. You probably also want PNG image support. Grab the latest versions of zlib + and libpng (zlib-1.1.3 and libpng-1.0.2 at time of writing), unpack them + somewhere and read the respective READMEs for details on how to build them. + The following build procedure works for zlib-1.1.3 and libpng-1.0.2: + + cd to the zlib directory, type 'copy msdos\makefile.w32 Makefile' and + then type 'nmake'. + + cd to the libpng directory, rename or move the zlib directory to ..\zlib + and type 'nmake -f scripts\makefile.w32'. -2. cd to the nt subdirectory of the xemacs distribution and build xemacs: +3. If you want TIFF support, grap the latest version of libtiff (tiff-v3.4 + at time of writing) and unpack it somewhere. Copy nt\tiff.mak from the + xemacs sources to the contrib\winnt subdirectory of the tiff sources, + cd to that directory and build libtiff with 'nmake -f tiff.mak'. Note: + tiff.mak has only been verified to work under WinNT, not Win95 or 98. + However, the lastest distribution of libtiff includes a + contrib\win95\makefile.w95; that might work. + +4. If you want JPEG support grab the latest version of jpegsrc (jpeg-6b at + time of writing) and read the README for details on how to build it. + +5. cd to the nt subdirectory of the xemacs distribution and build xemacs: `nmake install -f xemacs.mak`, but read on before hitting Enter. -3. If you're building with XPM support, add this to the nmake command line: - HAVE_XPM=1 XPM_DIR="x:\location\of\your\xpm\source\tree" +6. If you're building with XPM support, add this to the nmake command line: + HAVE_XPM=1 XPM_DIR="x:\location\of\your\xpm\sources" + and similarly for JPEG and TIFF support. -4. By default, XEmacs will look for packages in + If you're building with PNG support, add this to the nmake command line: + HAVE_PNG=1 PNG_DIR="x:\location\of\your\png\sources" + ZLIB_DIR="x:\location\of\your\zlib\sources" + + If you want to build with GIF support, add this to the nmake command line: + HAVE_GIF=1 + +7. By default, XEmacs will look for packages in "c:\Program Files\XEmacs\packages". If you want it to look elsewhere, add this to the nmake command line: PACKAGEPATH="x:\\location\\of\\your\\packages" Note the doubled-up backslashes in that path. If you want to change the package path after you've already built XEmacs, delete the file - .\obj\emacs.obj and rebuild with the new value of PACKAGEPATH. + .\obj\emacs.obj before rebuilding with the new value of PACKAGEPATH. -5. By default, XEmacs will be installed in directories under the directory +8. By default, XEmacs will be installed in directories under the directory "c:\Program Files\XEmacs\XEmacs-21.0". If you want to install it elsewhere, add this to the nmake command line: INSTALL_DIR="x:\your\installation\directory" -6. Now you can press Enter. nmake will build temacs, the DOC file, update the +9. Now you can press Enter. nmake will build temacs, the DOC file, update the elc's, dump xemacs and install the relevant files in the directories under - the installation directory. Unless you set INSTALL_DIR in step 5 above, the - file that you should run to start XEmacs will be installed as + the installation directory. Unless you set INSTALL_DIR above, the file that + you should run to start XEmacs will be installed as "c:\Program Files\XEmacs\XEmacs-21.0\i386-pc-win32\runemacs.exe". You may want to create a shortcut to that file from your Desktop or Start Menu. -7. The build process always creates debugging and "Source Browser" information +10. The build process always creates debugging and "Source Browser" information in the source tree for use with MS DevStudio. If you actually want to debug XEmacs you should run XEmacs from the source directory instead of from the installation directory. You should probably also build a debug version of
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nt/tiff.mak Mon Aug 13 11:04:06 2007 +0200 @@ -0,0 +1,156 @@ +# +# TIFF makefile for Microsoft nmake +# +!if !defined(DEBUG_XEMACS) +DEBUG_XEMACS=0 +!endif + +!if $(DEBUG_XEMACS) +OPT=-Od -Zi +!else +OPT=-O2 -G5 +!endif + +WARN_CPP_FLAGS = -W3 +CFLAGS=-nologo -DFOR_MSW $(WARN_CPP_FLAGS) $(OPT) -c + +OUTDIR=.\WinRel +OBJDIR=.\WinRel +# the following is because fax3sm.c references "tiff.h" and "tif_fax3.h", +# under the assumption that those header files are in the same directory +# as fax3sm.c But, since we're using a special fax3sm.c file, and we +# can't be sure the user has patch to change "xx" to "..\..\libtiff\xx", +# let's just copy these header files to this directory. (Symbolic links +# would be _so_ nice) +NEED_FOR_COMPILE= tiff.h tif_fax3.h + +CPP=cl.exe +CPP_PROJ= /GX /YX /I "." /I ".." /D "WIN32" /D "NDEBUG" /D\ + "_WINDOWS" /FR$(OBJDIR)/ /Fp$(OUTDIR)/"libtiff.pch" $(CFLAGS) + +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o$(OUTDIR)/libtiff.bsc + +LIB32=lib.exe +LIB32_FLAGS=/NOLOGO /OUT:$(OUTDIR)\libtiff.lib +DEF_FLAGS= +DEF_FILE= + +BSC32_SBRS= \ + $(OBJDIR)\tif_jpeg.sbr \ + $(OBJDIR)\tif_dirinfo.sbr \ + $(OBJDIR)\tif_win32.sbr \ + $(OBJDIR)\tif_flush.sbr \ + $(OBJDIR)\tif_thunder.sbr \ + $(OBJDIR)\tif_compress.sbr \ + $(OBJDIR)\tif_print.sbr \ + $(OBJDIR)\tif_dirread.sbr \ + $(OBJDIR)\tif_getimage.sbr \ + $(OBJDIR)\tif_fax3.sbr \ + $(OBJDIR)\tif_version.sbr \ + $(OBJDIR)\tif_codec.sbr \ + $(OBJDIR)\tif_dir.sbr \ + $(OBJDIR)\tif_predict.sbr \ + $(OBJDIR)\tif_close.sbr \ + $(OBJDIR)\tif_dumpmode.sbr \ + $(OBJDIR)\tif_aux.sbr \ + $(OBJDIR)\tif_error.sbr \ + $(OBJDIR)\tif_lzw.sbr \ + $(OBJDIR)\tif_zip.sbr \ + $(OBJDIR)\tif_read.sbr \ + $(OBJDIR)\tif_packbits.sbr \ + $(OBJDIR)\tif_swab.sbr \ + $(OBJDIR)\tif_dirwrite.sbr \ + $(OBJDIR)\tif_open.sbr \ + $(OBJDIR)\tif_warning.sbr \ + $(OBJDIR)\tif_tile.sbr \ + $(OBJDIR)\tif_strip.sbr \ + $(OBJDIR)\tif_next.sbr \ + $(OBJDIR)\tif_write.sbr \ + $(OBJDIR)\fax3sm.sbr + +LIB32_OBJS= \ + $(OBJDIR)\tif_jpeg.obj \ + $(OBJDIR)\tif_dirinfo.obj \ + $(OBJDIR)\tif_win32.obj \ + $(OBJDIR)\tif_flush.obj \ + $(OBJDIR)\tif_thunder.obj \ + $(OBJDIR)\tif_compress.obj \ + $(OBJDIR)\tif_print.obj \ + $(OBJDIR)\tif_dirread.obj \ + $(OBJDIR)\tif_getimage.obj \ + $(OBJDIR)\tif_fax3.obj \ + $(OBJDIR)\tif_version.obj \ + $(OBJDIR)\tif_codec.obj \ + $(OBJDIR)\tif_dir.obj \ + $(OBJDIR)\tif_predict.obj \ + $(OBJDIR)\tif_close.obj \ + $(OBJDIR)\tif_dumpmode.obj \ + $(OBJDIR)\tif_aux.obj \ + $(OBJDIR)\tif_error.obj \ + $(OBJDIR)\tif_lzw.obj \ + $(OBJDIR)\tif_zip.obj \ + $(OBJDIR)\tif_read.obj \ + $(OBJDIR)\tif_packbits.obj \ + $(OBJDIR)\tif_swab.obj \ + $(OBJDIR)\tif_dirwrite.obj \ + $(OBJDIR)\tif_open.obj \ + $(OBJDIR)\tif_warning.obj \ + $(OBJDIR)\tif_tile.obj \ + $(OBJDIR)\tif_strip.obj \ + $(OBJDIR)\tif_next.obj \ + $(OBJDIR)\tif_write.obj \ + $(OBJDIR)\fax3sm.obj + +# nmake rule + +.SUFFIXES: +.SUFFIXES: .c .obj + +{..\..\libtiff}.c{$(OBJDIR)}.obj: + $(CPP) $(CPP_PROJ) $< -Fo$@ + + +ALL : $(OUTDIR)/libtiff.lib $(OUTDIR)/libtiff.bsc + +clean : + -del tiff.h + -del tif_fax3.h + -del t4.h + -del tiffcomp.h + -del tiffconf.h + -del tiffio.h + -del ..\..\libtiff\libtiff.lib + -del *.pdb + -del $(OBJDIR)\*.obj + -del $(OBJDIR)\*.sbr + -del $(OUTDIR)\libtiff.lib + -del $(OUTDIR)\libtiff.bsc + -del $(OUTDIR)\libtiff.pch + -rmdir $(OUTDIR) + +tiff.h : + if not exist ./tiff.h copy ..\..\libtiff\tiff.h . +tif_fax3.h : + if not exist ./tif_fax3.h copy ..\..\libtiff\tif_fax3.h . + +$(OUTDIR) : $(NEED_FOR_COMPILE) + if not exist $(OUTDIR)/nul mkdir $(OUTDIR) + +$(OUTDIR)/libtiff.bsc : $(OUTDIR) $(BSC32_SBRS) + $(BSC32) @<< + $(BSC32_FLAGS) $(BSC32_SBRS) +<< + +$(OUTDIR)/libtiff.lib : $(OUTDIR) $(DEF_FILE) $(LIB32_OBJS) + $(LIB32) @<< + $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) +<< + copy $(OUTDIR)\libtiff.lib ..\..\libtiff\libtiff.lib + +DEP_FAX3S=\ + ..\..\libtiff\tiff.h \ + ..\..\libtiff\tif_fax3.h +$(OBJDIR)/fax3sm.obj : $(DEP_FAX3S) $(OBJDIR) + $(CPP) $(CPP_PROJ) .\fax3sm.c -Fo$@ +
--- a/nt/xemacs.mak Mon Aug 13 11:03:09 2007 +0200 +++ b/nt/xemacs.mak Mon Aug 13 11:04:06 2007 +0200 @@ -82,6 +82,18 @@ !if !defined(HAVE_XPM) HAVE_XPM=0 !endif +!if !defined(HAVE_PNG) +HAVE_PNG=0 +!endif +!if !defined(HAVE_TIFF) +HAVE_TIFF=0 +!endif +!if !defined(HAVE_JPEG) +HAVE_JPEG=0 +!endif +!if !defined(HAVE_GIF) +HAVE_GIF=1 +!endif !if !defined(HAVE_TOOLBARS) HAVE_TOOLBARS=$(HAVE_XPM) !endif @@ -152,6 +164,38 @@ !message Specified XPM directory does not contain "$(XPM_DIR)\lib\Xpm.lib" CONFIG_ERROR=1 !endif +!if $(HAVE_MSW) && $(HAVE_PNG) && !defined(PNG_DIR) +!message Please specify root directory for your PNG installation: PNG_DIR=path +CONFIG_ERROR=1 +!endif +!if $(HAVE_MSW) && $(HAVE_PNG) && defined(PNG_DIR) && !exist("$(PNG_DIR)\libpng.lib") +!message Specified PNG directory does not contain "$(PNG_DIR)\libpng.lib" +CONFIG_ERROR=1 +!endif +!if $(HAVE_MSW) && $(HAVE_PNG) && !defined(ZLIB_DIR) +!message Please specify root directory for your ZLIB installation: ZLIB_DIR=path +CONFIG_ERROR=1 +!endif +!if $(HAVE_MSW) && $(HAVE_PNG) && defined(ZLIB_DIR) && !exist("$(ZLIB_DIR)\zlib.lib") +!message Specified ZLIB directory does not contain "$(ZLIB_DIR)\zlib.lib" +CONFIG_ERROR=1 +!endif +!if $(HAVE_MSW) && $(HAVE_TIFF) && !defined(TIFF_DIR) +!message Please specify root directory for your TIFF installation: TIFF_DIR=path +CONFIG_ERROR=1 +!endif +!if $(HAVE_MSW) && $(HAVE_TIFF) && !exist("$(TIFF_DIR)\libtiff\libtiff.lib") +!message Specified TIFF directory does not contain "$(TIFF_DIR)\libtiff\libtiff.lib" +CONFIG_ERROR=1 +!endif +!if $(HAVE_MSW) && $(HAVE_JPEG) && !defined(JPEG_DIR) +!message Please specify root directory for your JPEG installation: JPEG_DIR=path +CONFIG_ERROR=1 +!endif +!if $(HAVE_MSW) && $(HAVE_JPEG) && !exist("$(JPEG_DIR)\libjpeg.lib") +!message Specified JPEG directory does not contain "$(JPEG_DIR)\libjpeg.lib" +CONFIG_ERROR=1 +!endif !if $(HAVE_MSW) && $(HAVE_TOOLBARS) && !$(HAVE_XPM) !error Toolbars require XPM support CONFIG_ERROR=1 @@ -195,6 +239,18 @@ !if $(HAVE_XPM) !message Compiling in support for XPM images. !endif +!if $(HAVE_GIF) +!message Compiling in support for GIF images. +!endif +!if $(HAVE_PNG) +!message Compiling in support for PNG images. +!endif +!if $(HAVE_TIFF) +!message Compiling in support for TIFF images. +!endif +!if $(HAVE_JPEG) +!message Compiling in support for JPEG images. +!endif !if $(HAVE_TOOLBARS) !message Compiling in support for toolbars. !endif @@ -266,6 +322,26 @@ MSW_INCLUDES=$(MSW_INCLUDES) -I"$(XPM_DIR)" -I"$(XPM_DIR)\lib" MSW_LIBS=$(MSW_LIBS) "$(XPM_DIR)\lib\Xpm.lib" !endif +!if $(HAVE_GIF) +MSW_DEFINES=$(MSW_DEFINES) -DHAVE_GIF +MSW_GIF_SRC=$(XEMACS)\src\dgif_lib.c $(XEMACS)\src\gif_io.c +MSW_GIF_OBJ=$(OUTDIR)\dgif_lib.obj $(OUTDIR)\gif_io.obj +!endif +!if $(HAVE_PNG) +MSW_DEFINES=$(MSW_DEFINES) -DHAVE_PNG +MSW_INCLUDES=$(MSW_INCLUDES) -I"$(PNG_DIR)" -I"$(ZLIB_DIR)" +MSW_LIBS=$(MSW_LIBS) "$(PNG_DIR)\libpng.lib" "$(ZLIB_DIR)\zlib.lib" +!endif +!if $(HAVE_TIFF) +MSW_DEFINES=$(MSW_DEFINES) -DHAVE_TIFF +MSW_INCLUDES=$(MSW_INCLUDES) -I"$(TIFF_DIR)\libtiff" +MSW_LIBS=$(MSW_LIBS) "$(TIFF_DIR)\libtiff\libtiff.lib" +!endif +!if $(HAVE_JPEG) +MSW_DEFINES=$(MSW_DEFINES) -DHAVE_JPEG +MSW_INCLUDES=$(MSW_INCLUDES) -I"$(JPEG_DIR)" +MSW_LIBS=$(MSW_LIBS) "$(JPEG_DIR)\libjpeg.lib" +!endif !if $(HAVE_TOOLBARS) MSW_DEFINES=$(MSW_DEFINES) -DHAVE_TOOLBARS MSW_TOOLBAR_SRC=$(XEMACS)\src\toolbar.c $(XEMACS)\src\toolbar-msw.c @@ -584,7 +660,8 @@ $(XEMACS)\src\select-msw.c \ $(MSW_C_DIRED_SRC) \ $(MSW_TOOLBAR_SRC) \ - $(MSW_DIALOG_SRC) + $(MSW_DIALOG_SRC) \ + $(MSW_GIF_SRC) !endif !if $(HAVE_MULE) @@ -670,10 +747,10 @@ $(OUTDIR)\select-msw.obj \ $(MSW_C_DIRED_OBJ) \ $(MSW_TOOLBAR_OBJ) \ - $(MSW_DIALOG_OBJ) + $(MSW_DIALOG_OBJ) \ + $(MSW_GIF_OBJ) !endif - !if $(HAVE_MULE) TEMACS_MULE_OBJS=\ $(OUTDIR)\input-method-xlib.obj \ @@ -867,21 +944,19 @@ temacs: $(TEMACS) # use this rule to install the system -install: all "$(INSTALL_DIR)\nul" "$(INSTALL_DIR)\lock\nul" +install: all + @echo Installing in $(INSTALL_DIR) ... + @xcopy /q PROBLEMS "$(INSTALL_DIR)\" + @xcopy /q README "$(INSTALL_DIR)\lock\" + @del "$(INSTALL_DIR)\lock\README" @xcopy /q $(LIB_SRC)\*.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\" - @copy $(LIB_SRC)\DOC "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\" - @copy $(XEMACS)\src\xemacs.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\" - @copy $(RUNEMACS) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\" + @copy $(LIB_SRC)\DOC "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" + @copy $(XEMACS)\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\" -"$(INSTALL_DIR)\nul": - -@mkdir "$(INSTALL_DIR)" - -"$(INSTALL_DIR)\lock\nul": "$(INSTALL_DIR)\nul" - -@mkdir "$(INSTALL_DIR)\lock" - distclean: del *.bak del *.orig
--- a/src/ChangeLog Mon Aug 13 11:03:09 2007 +0200 +++ b/src/ChangeLog Mon Aug 13 11:04:06 2007 +0200 @@ -1,3 +1,432 @@ +1998-09-29 SL Baur <steve@altair.xemacs.org> + + * XEmacs 21.2-beta2 is released. + +1998-09-27 P. E. Jareth Hein <jareth@camelot.co.jp> + + * regex.c (re_match_2_internal): Add in code to reset lowest_active_reg + to prevent memory corruption in the case of jumping out of a series of + nested match patterns. This is a rather brute force approach, though. + +1998-09-02 Andy Piper <andyp@parallax.co.uk> + + * config.h.in: ditto. + + * s/cygwin32.h: rearrange declarations to cope with cygwin + b20. Include cygwin32/version.h if it exists. + +1998-09-20 Jonathan Harris <jhar@tardis.ed.ac.uk> + + * device-msw.c (mswindows_init_device): Call new + mswindows_enumerate_fonts() function in objects-msw.c instead + of font_enum_callback_1() to enumerate fonts. + + font_enum_callback_1() and _2() moved to objects-msw.c. + + * faces.c (complex_vars_of_faces): Make the mswindows default + face font fully specified and provide some fallbacks. + + * objects-msw.c: font_enum_callback_1() and _2() moved here + from objects-msw.c. Obtain the enumerated font's character + sets by table lookup instead of using the locale-specific + string provided by Windows. + + New public non-method mswindows_enumerate_fonts() that fills + in the supplied mswindows device's font list. + + mswindows_initialize_font_instance: Use the supplied name + variable instead of f->name when signalling errors. Match font + weights and character sets using lookup tables which handle + spaces instead of by frobbing. + +1998-09-20 Jonathan Harris <jhar@tardis.ed.ac.uk> + + * process-nt.c: Define an arbitrary limit, FRAGMENT_CODE_SIZE, + on the size of code fragments passed to run_in_other_process. + + run_in_other_process(): Use FRAGMENT_CODE_SIZE to determine + the amount of memory to allocate in the other process. + + Removed sigkill_code_end(), sigint_code_end() and + sig_enable_code_end() since they are now redundant. + + send_signal() and enable_child_signals(): Don't try to work + out the end of the code fragments passed to + run_in_other_process() + +1998-09-10 Kazuyuki IENAGA <ienaga@jsys.co.jp> + + * src/s/freebsd.h: Added __ELF__ and compiler/liker flags for + FreeBSD-current. + + * src/unexelf.c: Partially synched with FSF's 20.3. + +1998-09-10 Hrvoje Niksic <hniksic@srce.hr> + + * insdel.c (signal_after_change): Map across indirect buffers + here, and not in the upper-level functions. + (signal_first_change): Don't check for Armageddon. + (signal_before_change): Map across indirect buffers here. + (prepare_to_modify_buffer): ...and here. + +1998-09-09 Hrvoje Niksic <hniksic@srce.hr> + + * insdel.c (signal_after_change): Add return value. + (buffer_insert_string_1): Use it. + (buffer_delete_range): Ditto. + (buffer_replace_char): Ditto. + (cancel_multiple_change): Map the indirect buffers. + +1998-09-06 Hrvoje Niksic <hniksic@srce.hr> + + * insdel.c (init_buffer_text): Remove INDIRECT_P parameter. + (uninit_buffer_text): Ditto. + + * buffer.c (Fmake_indirect_buffer): Implement stricter + error-checking. + +1998-09-04 Hrvoje Niksic <hniksic@srce.hr> + + * insdel.c (change_function_restore): Reverse order of + function-call and assignment. + (first_change_hook_restore): Ditto. + + * extents.c (mark_extent_auxiliary): Mark them. + (Fset_extent_property): Set them. + (Fextent_property): Get them. + (Fextent_properties): Ditto. + (vars_of_extents): Set their default. + + * extents.h (struct extent_auxiliary): Add before_change_functions + and after_change_functions. + + * insdel.c (signal_before_change): Use it. + (signal_after_change): Ditto. + + * extents.c (report_extent_modification): New function. + + * insdel.c (signal_before_change): Don't check for Armageddon. + (signal_after_change): Ditto. + +1998-09-11 Gunnar Evermann <Gunnar.Evermann@nats.informatik.uni-hamburg.de> + + * redisplay.c (redisplay_window): make sure a new starting point + is chosen if it somehow got moved from the beginning of the line + -- this can happen because Fwiden was called recently. + + * window.c (Fset_window_start): set start_at_line_beg correctly + (Fset_window_buffer): Ditto + +1998-09-06 Hrvoje Niksic <hniksic@srce.hr> + + * insdel.c (init_buffer_text): Remove INDIRECT_P parameter. + (uninit_buffer_text): Ditto. + + * buffer.c (Fmake_indirect_buffer): Implement stricter + error-checking. + +1998-05-14 Jan Vroonhof <vroonhof@math.ethz.ch> + + * emacs.c (main_1): Removed references to *vars_of_filelock. + + * lisp.h: Added Fsystem_name. + + * filelock.c: Replaced by version from FSF 20.2. Now implements + locking by using symlinks which is NFS safe. However keep the + GCPRO's in lock_file and the calls to callx_in_buffer like our old + version (and of course use ansi C, acessor macros, etc). + +1998-09-06 Jan Vroonhof <vroonhof@math.ethz.ch> + + * process-unix.c (unix_create_process): Reset SIGHUP handler to + SIG_DFL. We now try to conserve any inherted SIG_IGN settings + in init_signals_very_early. However these should not be passed + on to children attached to the new pty. + +1998-08-28 Andy Piper <andyp@parallax.co.uk> + + * glyphs-eimage.c (png_instantiate_unwind): clean up eimage after use. + +1998-09-07 Jonathan Harris <jhar@tardis.ed.ac.uk> + + * fileio.c (file-name-directory, file_name_as_directory): + Don't call CORRECT_DIR_SEPS, even when #defined WINDOWSNT. + +1998-09-02 Andy Piper <andyp@parallax.co.uk> + + * emacs.c (main_1): init_ralloc() if initialised and we have REL_ALLOC + + * ralloc.c: uncomment __morecore. + +1998-09-92 Jonathan Harris <jhar@tardis.ed.ac.uk> + + * event-msw.c(winsock_writer): Supply a dummy 4th argument to + WriteFile() to fix a winsock 1.x bug on Win95. + +1998-08-28 Hrvoje Niksic <hniksic@srce.hr> + + * event-Xt.c (emacs_Xt_mapping_action): Check for device being + deleted. + (x_event_to_emacs_event): Ditto. + (emacs_Xt_handle_focus_event): Ditto. + (emacs_Xt_handle_magic_event): Ditto. + + * console-x.h (struct x_device): New flag being_deleted. + (DEVICE_X_BEING_DELETED): New macro. + + * device-x.c (x_IO_error_handler): Throw to top-level instead of + returning. Before doing that, set the being_deleted flag on the + device. + +1998-08-27 Hrvoje Niksic <hniksic@srce.hr> + + * device-x.c (x-seppuku-on-epipe): Removed. + +1998-08-26 Gunnar Evermann <Gunnar.Evermann@nats.informatik.uni-hamburg.de> + + * frame-x.c (x_delete_frame): Flush the X output buffer after + calling XtDestroyWidget to ensure that the windows are really + killed right now. + +1998-08-26 Hrvoje Niksic <hniksic@srce.hr> + + * menubar-x.c (my_run_hook): New unused function. + (pre_activate_callback): Use run_hook for Qactivate_menubar_hook, + since we ignore the results of the contained functions anyway. + +1998-08-26 P. E. Jareth Hein <jareth@camelot.co.jp> + + * glyphs-eimage.c (gif_instantiate): Fix a crash in handling + interlaced GIF files that are smaller than 4 lines high... + +1998-08-31 Hrvoje Niksic <hniksic@srce.hr> + + * buffer.c (map_over_sharing_buffers): Deleted. + + * insdel.c (MAP_INDIRECT_BUFFERS): Move to buffer.h. + + * buffer.c (Fkill_buffer): Keep indirect_children updated while + killing them. + +1998-08-31 Hrvoje Niksic <hniksic@srce.hr> + + * insdel.c (buffer_insert_string_1): Advance the point bytind in + all the buffers. + (buffer_delete_range): Ditto. + + * marker.c (init_buffer_markers): Set point-marker to the value of + point in an indirect buffer. + +1998-08-30 Hrvoje Niksic <hniksic@srce.hr> + + * undo.c (undo_prelude): Test last-undo-buffer against base + buffer. + + * insdel.c (MAP_INDIRECT_BUFFERS): Use it. + + * buffer.h (BUFFER_BASE_BUFFER): New macro. + +1998-08-30 Hrvoje Niksic <hniksic@srce.hr> + + * insdel.c (init_buffer_text): Initialize it here. + + * line-number.c: Address line_number_cache through buffer->text. + + * buffer.c (mark_buffer): Mark line number cache. + + * bufslots.h (line_number_cache): Move to struct buffer_text. + + * insdel.c (buffer_insert_string_1): Propagate signals and changes + across the children buffers. + (buffer_delete_range): Ditto. + (buffer_replace_char): Ditto. + (gap_left): Ditto. + (gap_right): Ditto. + + * insdel.c (MAP_INDIRECT_BUFFERS): New macro. + + * buffer.c (Fmake_indirect_buffer): Uncomment. + +1998-08-31 Hrvoje Niksic <hniksic@srce.hr> + + * macros.c (Fend_kbd_macro): Remove trailing period from error + message. + (Fexecute_kbd_macro): Ditto. + +1998-08-21 Greg Klanderman <greg@alphatech.com> + + * dired.c (Fuser_name_completion): remove optional 2nd argument. + (Fuser_name_completion_1): new function to return uniqueness + indication in addition to the user name completion. + (user_name_completion): change type of `uniq' argument. + +1998-08-19 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de> + + * lread.c (vars_of_lread): Removed `source-directory' variable. + +1998-08-22 Hrvoje Niksic <hniksic@srce.hr> + + * fileio.c (Ffile_readable_p): Apply the DOS/Windows logic to + Cygwin. + +1998-08-19 SL Baur <steve@altair.xemacs.org> + + * dired.c (vars_of_dired): Fix misapplied patch. + +1998-08-16 Martin Buchholz <martin@xemacs.org> + + * fns.c (Fremrassq, remrassq_no_quit): + A XCAR that should have been an XCDR turned Fremrassq into Fremassq + +1998-07-17 Didier Verna <verna@inf.enst.fr> + + * redisplay-x.c (x_get_gc): returns a GC with a FillStipple fill + style as foreground GC for faces that have the `dim' property. + (x_output_string): when the `dim' face property is set, + ensure the gray pixmap has been created, and get a proper + foreground GC to draw the text. + +1998-08-09 Jonathan Harris <jhar@tardis.ed.ac.uk> + + * event-msw.c (mswindows_wnd_proc): Workaround for a Win95 bug: + Manually track the state of the left and right Ctrl and Alt + modifiers. + +1998-08-07 Matt Stupple <matts@tibco.com> + + * ntproc.c: don't wait on char_consumed at thread entry. + Additionally, to get the 'process' marked as finished, ensure + that the CHILD_ACTIVE macro returns false, so before exiting + close char_avail and set it to NULL, and close other handles + to reduce handle leak problems. + +1998-08-09 Jonathan Harris <jhar@tardis.ed.ac.uk> + + * menubar-msw.c (displayable_menu_item): take account of menu + depth when deciding whether to try to display accelerators. + +1998-08-04 Andy Piper <andyp@parallax.co.uk> + + * event-msw.c: use MsgWaitForMultipleObjects if there are no + subprocesses. + + * glyphs-msw.c: fix a couple of potential handle leaks. + +1998-08-04 P. E. Jareth Hein <jareth@camelot.co.jp> + + * dgif_lib.c gif_io.c gifrlib.h: New files to put GIF + *decoding ONLY* back into the core. + * glyphs-eimage.c: Change referenced header file for GIF + reading to point to the incore version. + +1998-07-20 Martin Buchholz <martin@xemacs.org> + + * casefiddle.c (casify_object): + Change algorithm from O(N**2) to O(N). + Code cleanup. + Doc string cleanup. + +1998-07-22 Greg Klanderman <greg@alphatech.com> + + * dired.c (file_name_completion_unwind): don't leak the cons. + +1998-07-20 Greg Klanderman <greg@alphatech.com> + + * dired.c (Fuser_name_completion): new function. + (Fuser_name_all_completions): new function. + (user_name_completion): new function. + (syms_of_dired): 2 new DEFSUBRs. + (vars_of_dired): initialize user name cache vars. + +1998-07-29 P. E. Jareth Hein <jareth@camelot.co.jp> + + * glyphs-eimage.c (png_instantiate): Add proper handling for background + colors taken from the default face. Also correct a thinko in + transparency (not alpha) handling. + +1998-07-23 Martin Buchholz <martin@xemacs.org> + + * s/decosf4-0.h: Use a perfectly ordinary link. Nuke BSD crap. + * unexalpha.c: ANSI C-ize. Clean compiler warnings. + * lread.c (Fload_internal): Be very careful with printfs of + size_t's + * gui-x.c (menu_name_to_accelerator): tolower wants an `int' + argument. + +1998-07-27 Gunnar Evermann <Gunnar.Evermann@nats.informatik.uni-hamburg.de> + + * callint.c (Fcall_interactively): GCPRO prompt string before + passing it to Fread_key_sequence + +1998-07-27 SL Baur <steve@altair.xemacs.org> + + * keymap.c (vars_of_keymap): Initialize Vkey_translation_map and + Vvertical_divider_map. + + * mule-canna.c (vars_of_mule_canna): Initialize every symbol to + Qnil or 0, none were initialized prior to this change. + + Rename misnamed `V' prefixed integer variables: + Vcanna_empty_info, Vcanna_through_info, Vcanna_underline, + Vcanna_inhibit_hankakukana, Vcanna_henkan_length, Vcanna_henkan_revPos, + Vcanna_henkan_revLen, Vcanna_ichiran_length, Vcanna_ichiran_revPos, + Vcanna_ichiran_revLen. + + Rename misnamed `V' prefixed integer variables and initialize + properly in the vars_of routine. + Vcanna_mode_AlphaMode, Vcanna_mode_EmptyMode, Vcanna_mode_KigoMode, + Vcanna_mode_YomiMode, Vcanna_mode_JishuMode, Vcanna_mode_TankouhoMode, + Vcanna_mode_IchiranMode, Vcanna_mode_YesNoMode, Vcanna_mode_OnOffMode, + Vcanna_mode_AdjustBunsetsuMode, Vcanna_mode_ChikujiYomiMode, + Vcanna_mode_ChikujiTanMode, Vcanna_mode_HenkanMode, + Vcanna_mode_HenkanNyuryokuMode, Vcanna_mode_ZenHiraHenkanMode, + Vcanna_mode_HanHiraHenkanMode, Vcanna_mode_ZenKataHenkanMode, + Vcanna_mode_HanKataHenkanMode, Vcanna_mode_HanKataHenkanMode, + Vcanna_mode_ZenAlphaHenkanMode, Vcanna_mode_HanAlphaHenkanMode, + Vcanna_mode_ZenHiraKakuteiMode, Vcanna_mode_HanHiraKakuteiMode, + Vcanna_mode_ZenKataKakuteiMode, Vcanna_mode_HanKataKakuteiMode, + Vcanna_mode_ZenAlphaKakuteiMode, Vcanna_mode_HanAlphaKakuteiMode, + Vcanna_mode_HexMode, Vcanna_mode_BushuMode, Vcanna_mode_ExtendMode, + Vcanna_mode_RussianMode, Vcanna_mode_GreekMode, Vcanna_mode_LineMode, + Vcanna_mode_ChangingServerMode, Vcanna_mode_HenkanMethodMode, + Vcanna_mode_DeleteDicMode, Vcanna_mode_TourokuMode, + Vcanna_mode_TourokuEmptyMode, Vcanna_mode_TourokuHinshiMode, + Vcanna_mode_TourokuDicMode, Vcanna_mode_QuotedInsertMode, + Vcanna_mode_BubunMuhenkanMode, Vcanna_mode_MountDicMode, + Vcanna_fn_SelfInsert, Vcanna_fn_FunctionalInsert, + Vcanna_fn_QuotedInsert, Vcanna_fn_JapaneseMode, Vcanna_fn_AlphaMode, + Vcanna_fn_HenkanNyuryokuMode, Vcanna_fn_Forward, Vcanna_fn_Backward, + Vcanna_fn_Next, Vcanna_fn_Prev, Vcanna_fn_BeginningOfLine, + Vcanna_fn_EndOfLine, Vcanna_fn_DeleteNext, Vcanna_fn_DeletePrevious, + Vcanna_fn_KillToEndOfLine, Vcanna_fn_Henkan, Vcanna_fn_Kakutei, + Vcanna_fn_Extend, Vcanna_fn_Shrink, Vcanna_fn_AdjustBunsetsu, + Vcanna_fn_Quit, Vcanna_fn_ConvertAsHex, Vcanna_fn_ConvertAsBushu, + Vcanna_fn_KouhoIchiran, Vcanna_fn_BubunMuhenkan, Vcanna_fn_Zenkaku, + Vcanna_fn_Hankaku, Vcanna_fn_ExtendMode, Vcanna_fn_ToUpper, + Vcanna_fn_Capitalize, Vcanna_fn_ToLower, Vcanna_fn_Hiragana, + Vcanna_fn_Katakana, Vcanna_fn_Romaji, Vcanna_fn_BaseHiragana, + Vcanna_fn_BaseKatakana, Vcanna_fn_BaseEisu, Vcanna_fn_BaseZenkaku, + Vcanna_fn_BaseHankaku, Vcanna_fn_BaseKana, Vcanna_fn_BaseKakutei, + Vcanna_fn_BaseHenkan, Vcanna_fn_BaseHiraKataToggle, + Vcanna_fn_BaseZenHanToggle, Vcanna_fn_BaseKanaEisuToggle, + Vcanna_fn_BaseKakuteiHenkanToggle, Vcanna_fn_BaseRotateForward, + Vcanna_fn_BaseRotateBackward, Vcanna_fn_Touroku, Vcanna_fn_HexMode, + Vcanna_fn_BushuMode, Vcanna_fn_KigouMode, Vcanna_fn_Mark, + Vcanna_fn_TemporalMode, Vcanna_key_Nfer, Vcanna_key_Xfer, + Vcanna_key_Up, Vcanna_key_Left, Vcanna_key_Right, Vcanna_key_Down, + Vcanna_key_Insert, Vcanna_key_Rollup, Vcanna_key_Rolldown, + Vcanna_key_Home, Vcanna_key_Help, Vcanna_key_KP_Key, + Vcanna_key_Shift_Nfer, Vcanna_key_Shift_Xfer, Vcanna_key_Shift_Up, + Vcanna_key_Shift_Left, Vcanna_key_Shift_Right, Vcanna_key_Shift_Down, + Vcanna_key_Cntrl_Nfer, Vcanna_key_Cntrl_Xfer, Vcanna_key_Cntrl_Up, + Vcanna_key_Cntrl_Left, Vcanna_key_Cntrl_Right, Vcanna_key_Cntrl_Down + +1998-07-16 Jan Vroonhof <vroonhof@math.ethz.ch> + + * event-Xt.c (x_to_emacs_keysym): Return nil for modifier keysyms. + (x_event_to_emacs_event): Let x_to_emacs_keysym check for modifier + keys thus no longer considering all keysyms on a key. + 1998-07-19 SL Baur <steve@altair.xemacs.org> * XEmacs 21.2-beta1 is released.
--- a/src/buffer.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/buffer.c Mon Aug 13 11:04:06 2007 +0200 @@ -232,6 +232,8 @@ #undef MARKED_SLOT ((markobj) (buf->extent_info)); + if (buf->text) + ((markobj) (buf->text->line_number_cache)); /* Don't mark normally through the children slot. (Actually, in this case, it doesn't matter.) */ @@ -614,12 +616,11 @@ b->text = &b->own_text; b->base_buffer = 0; b->indirect_children = Qnil; - init_buffer_text (b, 0); + init_buffer_text (b); return finish_init_buffer (b, name); } -#if 0 /* #### implement this! Need various changes in insdel.c */ DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, 2, 2, "bMake indirect buffer (to buffer): \nBName of indirect buffer: ", /* Create and return an indirect buffer for buffer BASE, named NAME. @@ -631,44 +632,40 @@ */ (base_buffer, name)) { - Lisp_Object buf; - REGISTER struct buffer *b; + /* This function can GC */ + + /* #### The above interactive specification is totally bogus, + because it offers an existing buffer as default answer to the + second question. However, the second argument may not BE an + existing buffer! */ + struct buffer *b; + + base_buffer = get_buffer (base_buffer, 1); #ifdef I18N3 /* #### Doc string should indicate that the buffer name will get translated. */ #endif - + CHECK_STRING (name); name = LISP_GETTEXT (name); - buf = Fget_buffer (name); - if (!NILP (buf)) - error ("Buffer name `%s' is in use", XSTRING_DATA (name)); - - base_buffer = Fget_buffer (base_buffer); - if (NILP (base_buffer)) - error ("No such buffer: `%s'", XSTRING_DATA (XBUFFER (base_buffer)->name)); - + if (!NILP (Fget_buffer (name))) + signal_simple_error ("Buffer name already in use", name); if (XSTRING_LENGTH (name) == 0) error ("Empty string for buffer name is not allowed"); b = allocate_buffer (); - if (XBUFFER (base_buffer)->base_buffer) - b->base_buffer = XBUFFER (base_buffer)->base_buffer; - else - b->base_buffer = XBUFFER (base_buffer); + b->base_buffer = BUFFER_BASE_BUFFER (XBUFFER (base_buffer)); /* Use the base buffer's text object. */ b->text = b->base_buffer->text; b->indirect_children = Qnil; - XSETBUFFER (buf, b); b->base_buffer->indirect_children = - Fcons (buf, b->base_buffer->indirect_children); - init_buffer_text (b, 1); + Fcons (make_buffer (b), b->base_buffer->indirect_children); + init_buffer_text (b); return finish_init_buffer (b, name); } -#endif /* 0 */ @@ -814,41 +811,6 @@ return Fcopy_sequence (buf->indirect_children); } -/* Map MAPFUN over all buffers that share the same text as BUF - (this includes BUF). Pass two arguments to MAPFUN: a buffer, - and CLOSURE. If any invocation of MAPFUN returns non-zero, - halt immediately and return that value. Otherwise, continue - the mapping to the end and return 0. */ - -int -map_over_sharing_buffers (struct buffer *buf, - int (*mapfun) (struct buffer *buf, void *closure), - void *closure) -{ - int result; - Lisp_Object tail; - - if (buf->base_buffer) - { - buf = buf->base_buffer; - assert (!buf->base_buffer); - } - - result = (mapfun) (buf, closure); - if (result) - return result; - - LIST_LOOP (tail, buf->indirect_children) - { - Lisp_Object buffer = XCAR (tail); - result = (mapfun) (XBUFFER (buffer), closure); - if (result) - return result; - } - - return 0; -} - DEFUN ("buffer-local-variables", Fbuffer_local_variables, 0, 1, 0, /* Return an alist of variables that are buffer-local in BUFFER. Most elements look like (SYMBOL . VALUE), describing one variable. @@ -1287,7 +1249,12 @@ GCPRO1 (buf); LIST_LOOP (rest, b->indirect_children) - Fkill_buffer (XCAR (rest)); + { + Fkill_buffer (XCAR (rest)); + /* Keep indirect_children updated in case a + query-function/hook throws. */ + b->indirect_children = XCDR (rest); + } UNGCPRO; } @@ -1372,7 +1339,7 @@ kill_buffer_local_variables (b); b->name = Qnil; - uninit_buffer_text (b, !!b->base_buffer); + uninit_buffer_text (b); b->undo_list = Qnil; uninit_buffer_extents (b); if (b->base_buffer) @@ -1869,9 +1836,7 @@ DEFSUBR (Fget_buffer); DEFSUBR (Fget_file_buffer); DEFSUBR (Fget_buffer_create); -#if 0 DEFSUBR (Fmake_indirect_buffer); -#endif DEFSUBR (Fgenerate_new_buffer_name); DEFSUBR (Fbuffer_name);
--- a/src/buffer.h Mon Aug 13 11:03:09 2007 +0200 +++ b/src/buffer.h Mon Aug 13 11:04:06 2007 +0200 @@ -102,6 +102,10 @@ Bytind mule_bytind_cache[16]; #endif + /* Similar to the above, we keep track of positions for which line + number has last been calculated. See line-number.c. */ + Lisp_Object line_number_cache; + /* Change data that goes with the text. */ struct buffer_text_change_data *changes; @@ -233,6 +237,23 @@ x = wrong_type_argument (Qbuffer_live_p, (x)); \ } while (0) +#define BUFFER_BASE_BUFFER(b) ((b)->base_buffer ? (b)->base_buffer : (b)) + +/* Map over buffers sharing the same text as MPS_BUF. MPS_BUFVAR is a + variable that gets the buffer values (beginning with the base + buffer, then the children), and MPS_BUFCONS should be a temporary + Lisp_Object variable. */ +#define MAP_INDIRECT_BUFFERS(mps_buf, mps_bufvar, mps_bufcons) \ +for (mps_bufcons = Qunbound, \ + mps_bufvar = BUFFER_BASE_BUFFER (mps_buf); \ + UNBOUNDP (mps_bufcons) ? \ + (mps_bufcons = mps_bufvar->indirect_children, \ + 1) \ + : (!NILP (mps_bufcons) \ + && (mps_bufvar = XBUFFER (XCAR (mps_bufcons)), 1) \ + && (mps_bufcons = XCDR (mps_bufcons), 1)); \ + ) + /* NOTE: In all the following macros, we follow these rules concerning multiple evaluation of the arguments:
--- a/src/bufslots.h Mon Aug 13 11:03:09 2007 +0200 +++ b/src/bufslots.h Mon Aug 13 11:04:06 2007 +0200 @@ -241,7 +241,3 @@ the next few times we add a new slot. */ MARKED_SLOT (extra1, extra2, extra3); #endif - /* The cache of positions for whilch line number has last been - calculated. See line-number.c. */ - MARKED_SLOT (line_number_cache); -
--- a/src/callint.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/callint.c Mon Aug 13 11:04:06 2007 +0200 @@ -715,7 +715,14 @@ } case 'k': /* Key sequence (vector of events) */ { - Lisp_Object tem = Fread_key_sequence (PROMPT (), Qnil, Qnil); + struct gcpro ngcpro1; + Lisp_Object tem; + Lisp_Object key_prompt = PROMPT (); + + NGCPRO1(key_prompt); + tem = Fread_key_sequence (key_prompt, Qnil, Qnil); + NUNGCPRO; + visargs[argnum] = Fkey_description (tem); /* The following makes `describe-key' not work with extent-local keymaps and such; and anyway, it's @@ -728,7 +735,14 @@ case 'K': /* Key sequence (vector of events), no automatic downcasing */ { - Lisp_Object tem = Fread_key_sequence (PROMPT (), Qnil, Qt); + struct gcpro ngcpro1; + Lisp_Object tem; + Lisp_Object key_prompt = PROMPT (); + + NGCPRO1(key_prompt); + tem = Fread_key_sequence (key_prompt, Qnil, Qt); + NUNGCPRO; + visargs[argnum] = Fkey_description (tem); /* The following makes `describe-key' not work with extent-local keymaps and such; and anyway, it's
--- a/src/casefiddle.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/casefiddle.c Mon Aug 13 11:04:06 2007 +0200 @@ -1,5 +1,5 @@ /* XEmacs case conversion functions. - Copyright (C) 1985, 1992, 1993, 1994 Free Software Foundation, Inc. + Copyright (C) 1985, 1992, 1993, 1994, 1997, 1998 Free Software Foundation, Inc. This file is part of XEmacs. @@ -18,13 +18,12 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Synched up with: FSF 19.34. */ +/* Synched up with: FSF 19.34, but substantially rewritten by Martin. */ #include <config.h> #include "lisp.h" #include "buffer.h" -#include "commands.h" #include "insdel.h" #include "syntax.h" @@ -34,100 +33,117 @@ casify_object (enum case_action flag, Lisp_Object obj, Lisp_Object buffer) { struct buffer *buf = decode_buffer (buffer, 0); - REGISTER int inword = (flag == CASE_DOWN); - struct Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->mirror_syntax_table); + + retry: + + if (CHAR_OR_CHAR_INTP (obj)) + { + Emchar c; + CHECK_CHAR_COERCE_INT (obj); + c = XCHAR (obj); + c = (flag == CASE_DOWN) ? DOWNCASE (buf, c) : UPCASE (buf, c); + return make_char (c); + } - while (1) + if (STRINGP (obj)) { - if (CHAR_OR_CHAR_INTP (obj)) + struct Lisp_Char_Table *syntax_table = + XCHAR_TABLE (buf->mirror_syntax_table); + Bufbyte *storage = + alloca_array (Bufbyte, XSTRING_LENGTH (obj) * MAX_EMCHAR_LEN); + Bufbyte *newp = storage; + Bufbyte *oldp = XSTRING_DATA (obj); + int wordp = 0, wordp_prev; + + while (*oldp) { - Emchar c; - CHECK_CHAR_COERCE_INT (obj); - c = XCHAR (obj); - if (IN_TRT_TABLE_DOMAIN (c)) + Emchar c = charptr_emchar (oldp); + switch (flag) { - if (inword) - obj = make_char (DOWNCASE (buf, c)); - else if (!UPPERCASEP (buf, c)) - obj = make_char (UPCASE1 (buf, c)); + case CASE_UP: + c = UPCASE (buf, c); + break; + case CASE_DOWN: + c = DOWNCASE (buf, c); + break; + case CASE_CAPITALIZE: + case CASE_CAPITALIZE_UP: + wordp_prev = wordp; + wordp = WORD_SYNTAX_P (syntax_table, c); + if (!wordp) break; + if (wordp_prev) + { + if (flag == CASE_CAPITALIZE) + c = DOWNCASE (buf, c); + } + else + c = UPCASE (buf, c); + break; } - return obj; + + newp += set_charptr_emchar (newp, c); + INC_CHARPTR (oldp); } - if (STRINGP (obj)) - { - Charcount i; - Charcount len = XSTRING_CHAR_LENGTH (obj); - obj = Fcopy_sequence (obj); - for (i = 0; i < len; i++) - { - Emchar c = string_char (XSTRING (obj), i); - if (inword && flag != CASE_CAPITALIZE_UP) - c = DOWNCASE (buf, c); - else if (!UPPERCASEP (buf, c) - && (!inword || flag != CASE_CAPITALIZE_UP)) - c = UPCASE1 (buf, c); - set_string_char (XSTRING (obj), i, c); - if ((int) flag >= (int) CASE_CAPITALIZE) - inword = WORD_SYNTAX_P (syntax_table, c); - } - return obj; - } - obj = wrong_type_argument (Qchar_or_string_p, obj); + + return make_string (storage, newp - storage); } + + obj = wrong_type_argument (Qchar_or_string_p, obj); + goto retry; } DEFUN ("upcase", Fupcase, 1, 2, 0, /* -Convert argument to upper case and return that. -The argument may be a character or string. The result has the same type. -The argument object is not altered--the value is a copy. +Convert OBJECT to upper case and return that. +OBJECT may be a character or string. The result has the same type. +OBJECT is not altered--the value is a copy. See also `capitalize', `downcase' and `upcase-initials'. Optional second arg BUFFER specifies which buffer's case tables to use, and defaults to the current buffer. */ - (obj, buffer)) + (object, buffer)) { - return casify_object (CASE_UP, obj, buffer); + return casify_object (CASE_UP, object, buffer); } DEFUN ("downcase", Fdowncase, 1, 2, 0, /* -Convert argument to lower case and return that. -The argument may be a character or string. The result has the same type. -The argument object is not altered--the value is a copy. +Convert OBJECT to lower case and return that. +OBJECT may be a character or string. The result has the same type. +OBJECT is not altered--the value is a copy. Optional second arg BUFFER specifies which buffer's case tables to use, and defaults to the current buffer. */ - (obj, buffer)) + (object, buffer)) { - return casify_object (CASE_DOWN, obj, buffer); + return casify_object (CASE_DOWN, object, buffer); } DEFUN ("capitalize", Fcapitalize, 1, 2, 0, /* -Convert argument to capitalized form and return that. +Convert OBJECT to capitalized form and return that. This means that each word's first character is upper case and the rest is lower case. -The argument may be a character or string. The result has the same type. -The argument object is not altered--the value is a copy. +OBJECT may be a character or string. The result has the same type. +OBJECT is not altered--the value is a copy. Optional second arg BUFFER specifies which buffer's case tables to use, and defaults to the current buffer. */ - (obj, buffer)) + (object, buffer)) { - return casify_object (CASE_CAPITALIZE, obj, buffer); + return casify_object (CASE_CAPITALIZE, object, buffer); } -/* Like Fcapitalize but change only the initials. */ +/* Like Fcapitalize but change only the initial characters. */ DEFUN ("upcase-initials", Fupcase_initials, 1, 2, 0, /* -Convert the initial of each word in the argument to upper case. +Convert the initial of each word in OBJECT to upper case. Do not change the other letters of each word. -The argument may be a character or string. The result has the same type. -The argument object is not altered--the value is a copy. +OBJECT may be a character or string. The result has the same type. +OBJECT is not altered--the value is a copy. Optional second arg BUFFER specifies which buffer's case tables to use, and defaults to the current buffer. */ - (obj, buffer)) + (object, buffer)) { - return casify_object (CASE_CAPITALIZE_UP, obj, buffer); + return casify_object (CASE_CAPITALIZE_UP, object, buffer); } /* flag is CASE_UP, CASE_DOWN or CASE_CAPITALIZE or CASE_CAPITALIZE_UP. @@ -140,9 +156,10 @@ /* This function can GC */ REGISTER Bufpos i; Bufpos start, end; - REGISTER int inword = (flag == CASE_DOWN); struct Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->mirror_syntax_table); int mccount; + Emchar oldc, c; + int wordp = 0, wordp_prev; if (EQ (b, e)) /* Not modifying because nothing marked */ @@ -155,25 +172,38 @@ for (i = start; i < end; i++) { - Emchar c = BUF_FETCH_CHAR (buf, i); - Emchar oldc = c; - - if (inword && flag != CASE_CAPITALIZE_UP) - c = DOWNCASE (buf, c); - else if (!UPPERCASEP (buf, c) - && (!inword || flag != CASE_CAPITALIZE_UP)) - c = UPCASE1 (buf, c); + c = oldc = BUF_FETCH_CHAR (buf, i); - if (oldc != c) + switch (flag) { - buffer_replace_char (buf, i, c, 1, (i == start)); - BUF_MODIFF (buf)++; + case CASE_UP: + c = UPCASE (buf, oldc); + break; + case CASE_DOWN: + c = DOWNCASE (buf, oldc); + break; + case CASE_CAPITALIZE: + case CASE_CAPITALIZE_UP: + /* !!#### need to revalidate the start and end pointers in case + the buffer was changed */ + wordp_prev = wordp; + wordp = WORD_SYNTAX_P (syntax_table, c); + if (!wordp) continue; + if (wordp_prev) + { + if (flag == CASE_CAPITALIZE) + c = DOWNCASE (buf, c); + } + else + c = UPCASE (buf, c); + break; } - /* !!#### need to revalidate the start and end pointers in case - the buffer was changed */ - if ((int) flag >= (int) CASE_CAPITALIZE) - inword = WORD_SYNTAX_P (syntax_table, c); + + if (oldc == c) continue; + buffer_replace_char (buf, i, c, 1, (i == start)); + BUF_MODIFF (buf)++; } + end_multiple_change (buf, mccount); }
--- a/src/config.h.in Mon Aug 13 11:03:09 2007 +0200 +++ b/src/config.h.in Mon Aug 13 11:04:06 2007 +0200 @@ -194,6 +194,7 @@ #undef HAVE_ULIMIT_H #undef HAVE_X11_XLOCALE_H #undef HAVE_LINUX_VERSION_H +#undef HAVE_CYGWIN32_VERSION_H #undef HAVE_INTTYPES_H #undef HAVE_SYS_UN_H #undef HAVE_A_OUT_H
--- a/src/console-msw.h Mon Aug 13 11:03:09 2007 +0200 +++ b/src/console-msw.h Mon Aug 13 11:04:06 2007 +0200 @@ -251,4 +251,6 @@ extern Lisp_Object Vmswindows_frame_being_created; extern Lisp_Object mswindows_frame_being_created; +void mswindows_enumerate_fonts (struct device *d); + #endif /* _XEMACS_CONSOLE_MSW_H_ */
--- a/src/console-x.h Mon Aug 13 11:03:09 2007 +0200 +++ b/src/console-x.h Mon Aug 13 11:04:06 2007 +0200 @@ -70,6 +70,9 @@ /* The X connection of this device. */ Display *display; + /* Set by x_IO_error_handler(). */ + int being_deleted; + /* Xt application info. */ Widget Xt_app_shell; @@ -184,6 +187,7 @@ #define FRAME_X_DISPLAY(f) (DEVICE_X_DISPLAY (XDEVICE (f->device))) #define DEVICE_X_DISPLAY(d) (DEVICE_X_DATA (d)->display) +#define DEVICE_X_BEING_DELETED(d) (DEVICE_X_DATA (d)->being_deleted) #define DEVICE_X_VISUAL(d) (DEVICE_X_DATA (d)->visual) #define DEVICE_X_DEPTH(d) (DEVICE_X_DATA (d)->depth) #define DEVICE_X_COLORMAP(d) (DEVICE_X_DATA (d)->device_cmap)
--- a/src/device-msw.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/device-msw.c Mon Aug 13 11:04:06 2007 +0200 @@ -39,13 +39,6 @@ #include "frame.h" #include "sysdep.h" -#ifndef __CYGWIN32__ -#include <commctrl.h> -#else -#define FONTENUMPROC FONTENUMEXPROC -#define ntmTm ntmentm -#endif - /* win32 DDE management library globals */ #ifdef HAVE_DRAGNDROP DWORD mswindows_dde_mlid; @@ -65,77 +58,11 @@ Lisp_Object Qinit_pre_mswindows_win, Qinit_post_mswindows_win; -struct font_enum_t -{ - HDC hdc; - struct device *d; -}; - /************************************************************************/ /* helpers */ /************************************************************************/ -static int CALLBACK -font_enum_callback_2 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, - int FontType, struct font_enum_t *font_enum) -{ - struct mswindows_font_enum *fontlist, **fonthead; - char fontname[MSW_FONTSIZE]; - - /* The enumerated font weights are not to be trusted because: - * a) lpelfe->elfStyle is only filled in for TrueType fonts. - * b) Not all Bold and Italic styles of all fonts (inluding some Vector, - * Truetype and Raster fonts) are enumerated. - * I guess that fonts for which Bold and Italic styles are generated - * 'on-the-fly' are not enumerated. It would be overly restrictive to - * disallow Bold And Italic weights for these fonts, so we just leave - * weights unspecified. This means that we have to weed out duplicates of - * those fonts that do get enumerated with different weights. */ - - if (FontType == 0 /*vector*/ || FontType == TRUETYPE_FONTTYPE) - /* Scalable, so leave pointsize blank */ - sprintf (fontname, "%s::::%s", lpelfe->elfLogFont.lfFaceName, - lpelfe->elfScript); - else - /* Formula for pointsize->height from LOGFONT docs in Platform SDK */ - sprintf (fontname, "%s::%d::%s", lpelfe->elfLogFont.lfFaceName, - MulDiv (lpntme->ntmTm.tmHeight - lpntme->ntmTm.tmInternalLeading, - 72, DEVICE_MSWINDOWS_LOGPIXELSY (font_enum->d)), - lpelfe->elfScript); - - fonthead = &DEVICE_MSWINDOWS_FONTLIST (font_enum->d); - fontlist = *fonthead; - while (fontlist) - if (!strcmp (fontname, fontlist->fontname)) - return 1; /* found a duplicate */ - else - fontlist = fontlist->next; - - /* Insert entry at head */ - fontlist = *fonthead; - *fonthead = xmalloc (sizeof (struct mswindows_font_enum)); - if (*fonthead == NULL) - { - *fonthead = fontlist; - return 0; - } - strcpy ((*fonthead)->fontname, fontname); - (*fonthead)->next = fontlist; - return 1; -} - -static int CALLBACK -font_enum_callback_1 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, - int FontType, struct font_enum_t *font_enum) -{ - /* This function gets called once per facename per character set. - * We call a second callback to enumerate the fonts in each facename */ - return EnumFontFamiliesEx (font_enum->hdc, &lpelfe->elfLogFont, - (FONTENUMPROC) font_enum_callback_2, - (LPARAM) font_enum, 0); -} - static Lisp_Object build_syscolor_string (int index) { @@ -182,8 +109,6 @@ { WNDCLASSEX wc; HDC hdc; - LOGFONT logfont; - struct font_enum_t font_enum; DEVICE_CLASS (d) = Qcolor; DEVICE_INFD (d) = DEVICE_OUTFD (d) = -1; @@ -204,16 +129,9 @@ DEVICE_MSWINDOWS_HORZSIZE(d) = GetDeviceCaps(hdc, HORZSIZE); DEVICE_MSWINDOWS_VERTSIZE(d) = GetDeviceCaps(hdc, VERTSIZE); DEVICE_MSWINDOWS_BITSPIXEL(d) = GetDeviceCaps(hdc, BITSPIXEL); + DeleteDC (hdc); - DEVICE_MSWINDOWS_FONTLIST (d) = NULL; - logfont.lfCharSet = DEFAULT_CHARSET; - logfont.lfFaceName[0] = '\0'; - logfont.lfPitchAndFamily = DEFAULT_PITCH; - font_enum.hdc = hdc; - font_enum.d = d; - EnumFontFamiliesEx (hdc, &logfont, (FONTENUMPROC) font_enum_callback_1, - (LPARAM) (&font_enum), 0); - DeleteDC (hdc); + mswindows_enumerate_fonts (d); /* Register the main window class */ wc.cbSize = sizeof (WNDCLASSEX);
--- a/src/device-x.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/device-x.c Mon Aug 13 11:04:06 2007 +0200 @@ -62,9 +62,6 @@ Lisp_Object Qx_error; Lisp_Object Qinit_pre_x_win, Qinit_post_x_win; -/* $B@ZJ"(B, n. Japanese ritual suicide. */ -int x_seppuku_on_epipe; - /* The application class of Emacs. */ Lisp_Object Vx_emacs_application_class; @@ -880,10 +877,8 @@ Lisp_Object dev; struct device *d = get_device_from_display_1 (disp); - if (d) - XSETDEVICE (dev, d); - else - dev = Qnil; + assert (d != NULL); + XSETDEVICE (dev, d); if (NILP (find_nonminibuffer_frame_not_on_device (dev))) { @@ -903,31 +898,24 @@ { warn_when_safe (Qx, Qcritical, - "I/O Error %d (%s) on display connection \"%s\"\n" - " after %lu requests (%lu known processed) with " - "%d events remaining.\n", + "I/O Error %d (%s) on display connection\n" + " \"%s\" after after %lu requests (%lu known processed)\n" + " with %d events remaining.\n" + " Throwing to top level.\n", errno, strerror (errno), DisplayString (disp), NextRequest (disp) - 1, LastKnownRequestProcessed (disp), QLength (disp)); } + /* According to X specs, we should not return from this function, or + Xlib might just decide to exit(). So we mark the offending + console for deletion and throw to top level. */ if (d) enqueue_magic_eval_event (io_error_delete_device, dev); + DEVICE_X_BEING_DELETED (d) = 1; + Fthrow (Qtop_level, Qnil); - /* CvE, July 16, 1996, XEmacs 19.14 */ - /* Test for broken pipe error, which indicates X-server has gone down */ - if (errno == EPIPE && x_seppuku_on_epipe) - { - /* Most probably X-server has gone down: Avoid infinite loop by just */ - /* exiting */ - /* slb: This sounds really, really dangerous to do by default, so */ - /* I'm adding a guard to avoid doing this as default behavior */ - stderr_out( "\n\nXEmacs exiting on broken pipe (errno %d, %s)\n", - errno, strerror(errno)); - exit(errno); - } - - return 0; + RETURN_NOT_REACHED (0); } DEFUN ("x-debug-mode", Fx_debug_mode, 1, 2, 0, /* @@ -1734,14 +1722,6 @@ */ ); Vx_initial_argv_list = Qnil; - DEFVAR_BOOL ("x-seppuku-on-epipe", &x_seppuku_on_epipe /* -When non-nil, terminate XEmacs immediately on SIGPIPE from the X server. -XEmacs doesn't terminate properly on some systems. -When this variable is non-nil, XEmacs will commit immediate suicide -when it gets a sigpipe from the X Server. -*/ ); - x_seppuku_on_epipe = 0; - #if defined(MULE) && (defined(LWLIB_MENUBARS_MOTIF) || defined(HAVE_XIM) || defined (USE_XFONTSET)) DEFVAR_LISP ("x-app-defaults-directory", &Vx_app_defaults_directory /* Used by the Lisp code to communicate to the low level X initialization
--- a/src/device.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/device.c Mon Aug 13 11:04:06 2007 +0200 @@ -817,6 +817,9 @@ void io_error_delete_device (Lisp_Object device) { + /* Note: it's the console that should get deleted, but + delete_device_internal() contains a hack that also deletes the + console when called from this function. */ delete_device_internal (XDEVICE (device), 1, 0, 1); }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/dgif_lib.c Mon Aug 13 11:04:06 2007 +0200 @@ -0,0 +1,965 @@ +/****************************************************************************** +* "Gif-Lib" - Yet another gif library. * +* * +* Written by: Gershon Elber IBM PC Ver 1.1, Aug. 1990 * +******************************************************************************* +* The kernel of the GIF Decoding process can be found here. * +******************************************************************************* +* History: * +* 16 Jun 89 - Version 1.0 by Gershon Elber. * +* 3 Sep 90 - Version 1.1 by Gershon Elber (Support for Gif89, Unique names). * +* 19 Feb 98 - Version 1.2 by Jareth Hein (Support for user specified I/O) * +******************************************************************************/ + +#ifdef __MSDOS__ +#include <io.h> +#include <alloc.h> +#include <stdlib.h> +#include <sys\stat.h> +#else +#include <sys/types.h> +#include <sys/stat.h> +#endif /* __MSDOS__ */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#endif + +#include "gifrlib.h" + +#define PROGRAM_NAME "GIFLIB" + + +static void DGifGetWord(GifFileType *GifFile, int *Word); +static void DGifSetupDecompress(GifFileType *GifFile); +static void DGifDecompressLine(GifFileType *GifFile, GifPixelType *Line, + int LineLen); +static int DGifGetPrefixChar(unsigned int *Prefix, int Code, int ClearCode); +static void DGifDecompressInput(GifFileType *GifFile, int *Code); +static void DGifBufferedInput(GifFileType *GifFile, GifByteType *NextByte); + +/****************************************************************************** +* Open a new gif file for read, given by its name. * +* Returns GifFileType pointer dynamically allocated which serves as the gif * +* info record. * +******************************************************************************/ +void DGifOpenFileName(GifFileType *GifFile, const char *FileName) +{ + FILE *f; + + if ((f = fopen(FileName, +#ifdef __MSDOS__ + "rb" +#else + "r" +#endif /* __MSDOS__ */ + )) == NULL) + GifInternError(GifFile, D_GIF_ERR_OPEN_FAILED); + + GifStdIOInit(GifFile, f, -1); + DGifInitRead(GifFile); +} + +/****************************************************************************** +* Update a new gif file, given its file handle. * +* Returns GifFileType pointer dynamically allocated which serves as the gif * +* info record. * +******************************************************************************/ +void DGifOpenFileHandle(GifFileType *GifFile, int FileHandle) +{ + FILE *f; + +#ifdef __MSDOS__ + 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__ */ + + GifStdIOInit(GifFile, f, -1); + DGifInitRead(GifFile); +} + +/****************************************************************************** +* Update a new gif file, given its file handle. * +* Returns GifFileType pointer dynamically allocated which serves as the gif * +* info record. _GifError is cleared if succesfull. * +******************************************************************************/ +void DGifInitRead(GifFileType *GifFile) +{ + GifByteType Buf[GIF_STAMP_LEN+1]; + GifFilePrivateType *Private; + + if ((Private = (GifFilePrivateType *) malloc(sizeof(GifFilePrivateType))) + == NULL) { + GifInternError(GifFile, D_GIF_ERR_NOT_ENOUGH_MEM); + } + memset(Private, '\0', sizeof(GifFilePrivateType)); + GifFile->Private = (VoidPtr) Private; + + Private->FileState = 0; /* Make sure bit 0 = 0 (File open for read). */ + + /* Lets see if this is a GIF file: */ + GifRead(Buf, GIF_STAMP_LEN, GifFile); + + /* The GIF Version number is ignored at this time. Maybe we should do */ + /* something more useful with it. */ + Buf[GIF_STAMP_LEN] = 0; + if (strncmp(GIF_STAMP, Buf, GIF_VERSION_POS) != 0) { + GifInternError(GifFile, D_GIF_ERR_NOT_GIF_FILE); + } + + DGifGetScreenDesc(GifFile); +} + +/****************************************************************************** +* This routine should be called before any other DGif calls. Note that * +* this routine is called automatically from DGif file open routines. * +******************************************************************************/ +void DGifGetScreenDesc(GifFileType *GifFile) +{ + int i, BitsPerPixel; + GifByteType Buf[3]; + GifFilePrivateType *Private = (GifFilePrivateType*) GifFile->Private; + + if (!IS_READABLE(Private)) { + /* This file was NOT open for reading: */ + GifInternError(GifFile, D_GIF_ERR_NOT_READABLE); + } + + /* Put the screen descriptor into the file: */ + DGifGetWord(GifFile, &GifFile->SWidth); + DGifGetWord(GifFile, &GifFile->SHeight); + + GifRead(Buf, 3, GifFile); + GifFile->SColorResolution = (((Buf[0] & 0x70) + 1) >> 4) + 1; + BitsPerPixel = (Buf[0] & 0x07) + 1; + GifFile->SBackGroundColor = Buf[1]; + if (Buf[0] & 0x80) { /* Do we have global color map? */ + + GifFile->SColorMap = MakeMapObject(1 << BitsPerPixel, NULL); + + /* Get the global color map: */ + for (i = 0; i < GifFile->SColorMap->ColorCount; i++) { + GifRead(Buf, 3, GifFile); + GifFile->SColorMap->Colors[i].Red = Buf[0]; + GifFile->SColorMap->Colors[i].Green = Buf[1]; + GifFile->SColorMap->Colors[i].Blue = Buf[2]; + } + } else { + /* We should always have a colormap */ + GifFile->SColorMap = MakeMapObject(2, NULL); + GifFile->SColorMap->Colors[0].Red = 0; + GifFile->SColorMap->Colors[0].Green = 0; + GifFile->SColorMap->Colors[0].Blue = 0; + GifFile->SColorMap->Colors[1].Red = 0xff; + GifFile->SColorMap->Colors[1].Green = 0xff; + GifFile->SColorMap->Colors[1].Blue = 0xff; + } +} + +/****************************************************************************** +* This routine should be called before any attemp to read an image. * +******************************************************************************/ +void DGifGetRecordType(GifFileType *GifFile, GifRecordType *Type) +{ + GifByteType Buf; + GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private; + + if (!IS_READABLE(Private)) { + /* This file was NOT open for reading: */ + GifInternError(GifFile, D_GIF_ERR_NOT_READABLE); + } + + GifRead(&Buf, 1, GifFile); + + switch (Buf) { + case ',': + *Type = IMAGE_DESC_RECORD_TYPE; + break; + case '!': + *Type = EXTENSION_RECORD_TYPE; + break; + case ';': + *Type = TERMINATE_RECORD_TYPE; + break; + default: + *Type = UNDEFINED_RECORD_TYPE; + GifInternError(GifFile, D_GIF_ERR_WRONG_RECORD); + } +} + +/****************************************************************************** +* This routine should be called before any attemp to read an image. * +* Note it is assumed the Image desc. header (',') has been read. * +******************************************************************************/ +void DGifGetImageDesc(GifFileType *GifFile) +{ + int i, BitsPerPixel; + GifByteType Buf[3]; + GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private; + + if (!IS_READABLE(Private)) { + /* This file was NOT open for reading: */ + GifInternError(GifFile, D_GIF_ERR_NOT_READABLE); + } + + DGifGetWord(GifFile, &GifFile->Image.Left); + DGifGetWord(GifFile, &GifFile->Image.Top); + DGifGetWord(GifFile, &GifFile->Image.Width); + DGifGetWord(GifFile, &GifFile->Image.Height); + + GifRead(Buf, 1, GifFile); + BitsPerPixel = (Buf[0] & 0x07) + 1; + GifFile->Image.Interlace = (Buf[0] & 0x40); + if (Buf[0] & 0x80) { /* Does this image have local color map? */ + + if (GifFile->Image.ColorMap && GifFile->SavedImages == NULL) + FreeMapObject(GifFile->Image.ColorMap); + + GifFile->Image.ColorMap = MakeMapObject(1 << BitsPerPixel, NULL); + + /* Get the image local color map: */ + for (i = 0; i < GifFile->Image.ColorMap->ColorCount; i++) { + GifRead(Buf, 3, GifFile); + GifFile->Image.ColorMap->Colors[i].Red = Buf[0]; + GifFile->Image.ColorMap->Colors[i].Green = Buf[1]; + GifFile->Image.ColorMap->Colors[i].Blue = Buf[2]; + } + } + + if (GifFile->SavedImages) { + SavedImage *sp; + + if ((GifFile->SavedImages = (SavedImage *)realloc(GifFile->SavedImages, + sizeof(SavedImage) * (GifFile->ImageCount + 1))) == NULL) { + GifInternError(GifFile, D_GIF_ERR_NOT_ENOUGH_MEM); + } + + sp = &GifFile->SavedImages[GifFile->ImageCount]; + memcpy(&sp->ImageDesc, &GifFile->Image, sizeof(GifImageDesc)); + if (GifFile->Image.ColorMap) + { + sp->ImageDesc.ColorMap = + MakeMapObject (GifFile->Image.ColorMap->ColorCount, + GifFile->Image.ColorMap->Colors); + } + sp->RasterBits = (GifPixelType *)NULL; + sp->ExtensionBlockCount = 0; + sp->ExtensionBlocks = (ExtensionBlock *)NULL; + } + + GifFile->ImageCount++; + + Private->PixelCount = (long) GifFile->Image.Width * + (long) GifFile->Image.Height; + + DGifSetupDecompress(GifFile); /* Reset decompress algorithm parameters. */ +} + +/****************************************************************************** +* Get one full scanned line (Line) of length LineLen from GIF file. * +******************************************************************************/ +void DGifGetLine(GifFileType *GifFile, GifPixelType *Line, int LineLen) +{ + GifByteType *Dummy; + GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private; + + if (!IS_READABLE(Private)) { + /* This file was NOT open for reading: */ + GifInternError(GifFile, D_GIF_ERR_NOT_READABLE); + } + + if (!LineLen) LineLen = GifFile->Image.Width; + +#if defined(__MSDOS__) || defined(__GNUC__) + if ((Private->PixelCount -= LineLen) > 0xffff0000UL) +#else + if ((Private->PixelCount -= LineLen) > 0xffff0000) +#endif /* __MSDOS__ */ + { + GifInternError(GifFile, D_GIF_ERR_DATA_TOO_BIG); + } + + DGifDecompressLine(GifFile, Line, LineLen); + if (Private->PixelCount == 0) { + /* We probably would not be called any more, so lets clean */ + /* everything before we return: need to flush out all rest of */ + /* image until empty block (size 0) detected. We use GetCodeNext.*/ + do + DGifGetCodeNext(GifFile, &Dummy); + while (Dummy != NULL); + } +} + +/****************************************************************************** +* Put one pixel (Pixel) into GIF file. * +******************************************************************************/ +void DGifGetPixel(GifFileType *GifFile, GifPixelType Pixel) +{ + GifByteType *Dummy; + GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private; + + if (!IS_READABLE(Private)) { + /* This file was NOT open for reading: */ + GifInternError(GifFile, D_GIF_ERR_NOT_READABLE); + } + +#if defined(__MSDOS__) || defined(__GNUC__) + if (--Private->PixelCount > 0xffff0000UL) +#else + if (--Private->PixelCount > 0xffff0000) +#endif /* __MSDOS__ */ + { + GifInternError(GifFile, D_GIF_ERR_DATA_TOO_BIG); + } + + DGifDecompressLine(GifFile, &Pixel, 1); + if (Private->PixelCount == 0) { + /* We probably would not be called any more, so lets clean */ + /* everything before we return: need to flush out all rest of */ + /* image until empty block (size 0) detected. We use GetCodeNext.*/ + do + DGifGetCodeNext(GifFile, &Dummy); + while (Dummy != NULL); + } +} + +/****************************************************************************** +* Get an extension block (see GIF manual) from gif file. This routine only * +* returns the first data block, and DGifGetExtensionNext shouldbe called * +* after this one until NULL extension is returned. * +* The Extension should NOT be freed by the user (not dynamically allocated).* +* Note it is assumed the Extension desc. header ('!') has been read. * +******************************************************************************/ +void DGifGetExtension(GifFileType *GifFile, int *ExtCode, + GifByteType **Extension) +{ + GifByteType Buf; + GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private; + + if (!IS_READABLE(Private)) { + /* This file was NOT open for reading: */ + GifInternError(GifFile, D_GIF_ERR_NOT_READABLE); + } + + GifRead(&Buf, 1, GifFile); + *ExtCode = Buf; + + DGifGetExtensionNext(GifFile, Extension); +} + +/****************************************************************************** +* Get a following extension block (see GIF manual) from gif file. This * +* routine sould be called until NULL Extension is returned. * +* The Extension should NOT be freed by the user (not dynamically allocated).* +******************************************************************************/ +void DGifGetExtensionNext(GifFileType *GifFile, GifByteType **Extension) +{ + GifByteType Buf; + GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private; + + GifRead(&Buf, 1, GifFile); + if (Buf > 0) { + *Extension = Private->Buf; /* Use private unused buffer. */ + (*Extension)[0] = Buf; /* Pascal strings notation (pos. 0 is len.). */ + GifRead(&((*Extension)[1]), Buf, GifFile); + } + else + *Extension = NULL; +} + +/****************************************************************************** +* This routine should be called second to last, to close the GIF file. * +******************************************************************************/ +int DGifCloseFile(GifFileType *GifFile) +{ + GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private; + + if (GifFile == NULL) return -1; + + if (!IS_READABLE(Private)) + { + /* This file was NOT open for reading: */ + GifInternError(GifFile, D_GIF_ERR_NOT_READABLE); + } + + if (GifClose (GifFile)) + { + GifInternError(GifFile, D_GIF_ERR_CLOSE_FAILED); + } + return 0; +} + +/****************************************************************************** +* Get 2 bytes (word) from the given file: * +******************************************************************************/ +static void DGifGetWord(GifFileType *GifFile, int *Word) +{ + unsigned char c[2]; + + GifRead(c, 2, GifFile); + + *Word = (((unsigned int) c[1]) << 8) + c[0]; +} + +/****************************************************************************** +* Get the image code in compressed form. his routine can be called if the * +* information needed to be piped out as is. Obviously this is much faster * +* than decoding and encoding again. This routine should be followed by calls * +* to DGifGetCodeNext, until NULL block is returned. * +* The block should NOT be freed by the user (not dynamically allocated). * +******************************************************************************/ +void DGifGetCode(GifFileType *GifFile, int *CodeSize, GifByteType **CodeBlock) +{ + GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private; + + if (!IS_READABLE(Private)) { + /* This file was NOT open for reading: */ + GifInternError(GifFile, D_GIF_ERR_NOT_READABLE); + } + + *CodeSize = Private->BitsPerPixel; + + DGifGetCodeNext(GifFile, CodeBlock); +} + +/****************************************************************************** +* Continue to get the image code in compressed form. This routine should be * +* called until NULL block is returned. * +* The block should NOT be freed by the user (not dynamically allocated). * +******************************************************************************/ +void DGifGetCodeNext(GifFileType *GifFile, GifByteType **CodeBlock) +{ + GifByteType Buf; + GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private; + + GifRead(&Buf, 1, GifFile); + + if (Buf > 0) { + *CodeBlock = Private->Buf; /* Use private unused buffer. */ + (*CodeBlock)[0] = Buf; /* Pascal strings notation (pos. 0 is len.). */ + GifRead(&((*CodeBlock)[1]), Buf, GifFile); + } + else { + *CodeBlock = NULL; + Private->Buf[0] = 0; /* Make sure the buffer is empty! */ + Private->PixelCount = 0; /* And local info. indicate image read. */ + } + +} + +/****************************************************************************** +* Setup the LZ decompression for this image: * +******************************************************************************/ +static void DGifSetupDecompress(GifFileType *GifFile) +{ + int i, BitsPerPixel; + GifByteType CodeSize; + unsigned int *Prefix; + GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private; + + GifRead(&CodeSize, 1, GifFile); /* Read Code size from file. */ + BitsPerPixel = CodeSize; + + Private->Buf[0] = 0; /* Input Buffer empty. */ + Private->BitsPerPixel = BitsPerPixel; + Private->ClearCode = (1 << BitsPerPixel); + Private->EOFCode = Private->ClearCode + 1; + Private->RunningCode = Private->EOFCode + 1; + Private->RunningBits = BitsPerPixel + 1; /* Number of bits per code. */ + Private->MaxCode1 = 1 << Private->RunningBits; /* Max. code + 1. */ + Private->StackPtr = 0; /* No pixels on the pixel stack. */ + Private->LastCode = NO_SUCH_CODE; + Private->CrntShiftState = 0; /* No information in CrntShiftDWord. */ + Private->CrntShiftDWord = 0; + + Prefix = Private->Prefix; + for (i = 0; i <= LZ_MAX_CODE; i++) Prefix[i] = NO_SUCH_CODE; +} + +/****************************************************************************** +* The LZ decompression routine: * +* This version decompress the given gif file into Line of length LineLen. * +* This routine can be called few times (one per scan line, for example), in * +* order the complete the whole image. * +******************************************************************************/ +static void DGifDecompressLine(GifFileType *GifFile, GifPixelType *Line, + int LineLen) +{ + int i = 0, j, CrntCode, EOFCode, ClearCode, CrntPrefix, LastCode, StackPtr; + GifByteType *Stack, *Suffix; + unsigned int *Prefix; + GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private; + + StackPtr = Private->StackPtr; + Prefix = Private->Prefix; + Suffix = Private->Suffix; + Stack = Private->Stack; + EOFCode = Private->EOFCode; + ClearCode = Private->ClearCode; + LastCode = Private->LastCode; + + CrntPrefix = 0; + if (StackPtr != 0) { + /* Let pop the stack off before continueing to read the gif file: */ + while (StackPtr != 0 && i < LineLen) Line[i++] = Stack[--StackPtr]; + } + + while (i < LineLen) { /* Decode LineLen items. */ + DGifDecompressInput(GifFile, &CrntCode); + + if (CrntCode == EOFCode) { + /* Note however that usually we will not be here as we will stop */ + /* decoding as soon as we got all the pixel, or EOF code will */ + /* not be read at all, and DGifGetLine/Pixel clean everything. */ + if (i != LineLen - 1 || Private->PixelCount != 0) { + GifInternError(GifFile, D_GIF_ERR_EOF_TOO_SOON); + } + i++; + } + else if (CrntCode == ClearCode) { + /* We need to start over again: */ + for (j = 0; j <= LZ_MAX_CODE; j++) Prefix[j] = NO_SUCH_CODE; + Private->RunningCode = Private->EOFCode + 1; + Private->RunningBits = Private->BitsPerPixel + 1; + Private->MaxCode1 = 1 << Private->RunningBits; + LastCode = Private->LastCode = NO_SUCH_CODE; + } + else { + /* Its regular code - if in pixel range simply add it to output */ + /* stream, otherwise trace to codes linked list until the prefix */ + /* is in pixel range: */ + if (CrntCode < ClearCode) { + /* This is simple - its pixel scalar, so add it to output: */ + Line[i++] = CrntCode; + } + else { + /* Its a code to needed to be traced: trace the linked list */ + /* until the prefix is a pixel, while pushing the suffix */ + /* pixels on our stack. If we done, pop the stack in reverse */ + /* (thats what stack is good for!) order to output. */ + if (Prefix[CrntCode] == NO_SUCH_CODE) { + /* Only allowed if CrntCode is exactly the running code: */ + /* In that case CrntCode = XXXCode, CrntCode or the */ + /* prefix code is last code and the suffix char is */ + /* exactly the prefix of last code! */ + if (CrntCode == Private->RunningCode - 2) { + CrntPrefix = LastCode; + Suffix[Private->RunningCode - 2] = + Stack[StackPtr++] = DGifGetPrefixChar(Prefix, + LastCode, ClearCode); + } + else { + GifInternError(GifFile, D_GIF_ERR_IMAGE_DEFECT); + } + } + else + CrntPrefix = CrntCode; + + /* Now (if image is O.K.) we should not get an NO_SUCH_CODE */ + /* During the trace. As we might loop forever, in case of */ + /* defective image, we count the number of loops we trace */ + /* and stop if we got LZ_MAX_CODE. obviously we can not */ + /* loop more than that. */ + j = 0; + while (j++ <= LZ_MAX_CODE && + CrntPrefix > ClearCode && + CrntPrefix <= LZ_MAX_CODE) { + Stack[StackPtr++] = Suffix[CrntPrefix]; + CrntPrefix = Prefix[CrntPrefix]; + } + if (j >= LZ_MAX_CODE || CrntPrefix > LZ_MAX_CODE) { + GifInternError(GifFile, D_GIF_ERR_IMAGE_DEFECT); + } + /* Push the last character on stack: */ + Stack[StackPtr++] = CrntPrefix; + + /* Now lets pop all the stack into output: */ + while (StackPtr != 0 && i < LineLen) + Line[i++] = Stack[--StackPtr]; + } + if (LastCode != NO_SUCH_CODE) { + Prefix[Private->RunningCode - 2] = LastCode; + + if (CrntCode == Private->RunningCode - 2) { + /* Only allowed if CrntCode is exactly the running code: */ + /* In that case CrntCode = XXXCode, CrntCode or the */ + /* prefix code is last code and the suffix char is */ + /* exactly the prefix of last code! */ + Suffix[Private->RunningCode - 2] = + DGifGetPrefixChar(Prefix, LastCode, ClearCode); + } + else { + Suffix[Private->RunningCode - 2] = + DGifGetPrefixChar(Prefix, CrntCode, ClearCode); + } + } + LastCode = CrntCode; + } + } + + Private->LastCode = LastCode; + Private->StackPtr = StackPtr; +} + +/****************************************************************************** +* Routine to trace the Prefixes linked list until we get a prefix which is * +* not code, but a pixel value (less than ClearCode). Returns that pixel value.* +* If image is defective, we might loop here forever, so we limit the loops to * +* the maximum possible if image O.k. - LZ_MAX_CODE times. * +******************************************************************************/ +static int DGifGetPrefixChar(unsigned int *Prefix, int Code, int ClearCode) +{ + int i = 0; + + while (Code > ClearCode && i++ <= LZ_MAX_CODE) Code = Prefix[Code]; + return Code; +} + +/****************************************************************************** +* Interface for accessing the LZ codes directly. Set Code to the real code * +* (12bits), or to -1 if EOF code is returned. * +******************************************************************************/ +void DGifGetLZCodes(GifFileType *GifFile, int *Code) +{ + GifByteType *CodeBlock; + GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private; + + if (!IS_READABLE(Private)) { + /* This file was NOT open for reading: */ + GifInternError(GifFile, D_GIF_ERR_NOT_READABLE); + } + + DGifDecompressInput(GifFile, Code); + + if (*Code == Private->EOFCode) { + /* Skip rest of codes (hopefully only NULL terminating block): */ + do + DGifGetCodeNext(GifFile, &CodeBlock); + while (CodeBlock != NULL); + + *Code = -1; + } + else if (*Code == Private->ClearCode) { + /* We need to start over again: */ + Private->RunningCode = Private->EOFCode + 1; + Private->RunningBits = Private->BitsPerPixel + 1; + Private->MaxCode1 = 1 << Private->RunningBits; + } +} + +/****************************************************************************** +* The LZ decompression input routine: * +* This routine is responsable for the decompression of the bit stream from * +* 8 bits (bytes) packets, into the real codes. * +* Returns GIF_OK if read succesfully. * +******************************************************************************/ +static void DGifDecompressInput(GifFileType *GifFile, int *Code) +{ + GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private; + GifByteType NextByte; + static unsigned int CodeMasks[] = { + 0x0000, 0x0001, 0x0003, 0x0007, + 0x000f, 0x001f, 0x003f, 0x007f, + 0x00ff, 0x01ff, 0x03ff, 0x07ff, + 0x0fff + }; + + while (Private->CrntShiftState < Private->RunningBits) { + /* Needs to get more bytes from input stream for next code: */ + DGifBufferedInput(GifFile, &NextByte); + Private->CrntShiftDWord |= + ((unsigned long) NextByte) << Private->CrntShiftState; + Private->CrntShiftState += 8; + } + *Code = Private->CrntShiftDWord & CodeMasks[Private->RunningBits]; + + Private->CrntShiftDWord >>= Private->RunningBits; + Private->CrntShiftState -= Private->RunningBits; + + /* If code cannt fit into RunningBits bits, must raise its size. Note */ + /* however that codes above 4095 are used for special signaling. */ + if (++Private->RunningCode > Private->MaxCode1 && + Private->RunningBits < LZ_BITS) { + Private->MaxCode1 <<= 1; + Private->RunningBits++; + } +} + +/****************************************************************************** +* This routines read one gif data block at a time and buffers it internally * +* so that the decompression routine could access it. * +* The routine returns the next byte from its internal buffer (or read next * +* block in if buffer empty) * +******************************************************************************/ +static void DGifBufferedInput(GifFileType *GifFile, GifByteType *NextByte) +{ + GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private; + GifByteType *Buf = Private->Buf; + + if (Buf[0] == 0) { + /* Needs to read the next buffer - this one is empty: */ + GifRead(Buf, 1, GifFile); + GifRead((Buf + 1), Buf[0], GifFile); + *NextByte = Buf[1]; + Buf[1] = 2; /* We use now the second place as last char read! */ + Buf[0]--; + } + else { + *NextByte = Buf[Buf[1]++]; + Buf[0]--; + } +} + +/****************************************************************************** +* This routine reads an entire GIF into core, hanging all its state info off * +* the GifFileType pointer. Call DGifOpenFileName() or DGifOpenFileHandle() * +* first to initialize I/O. Its inverse is EGifSpew(). * +******************************************************************************/ +void DGifSlurp(GifFileType *GifFile) +{ + int ImageSize; + GifRecordType RecordType; + SavedImage *sp; + GifByteType *ExtData; + + /* Some versions of malloc dislike 0-length requests */ + GifFile->SavedImages = (SavedImage *)malloc(sizeof(SavedImage)); + memset(GifFile->SavedImages, 0, sizeof(SavedImage)); + sp = &GifFile->SavedImages[0]; + + do { + DGifGetRecordType(GifFile, &RecordType); + + switch (RecordType) { + case IMAGE_DESC_RECORD_TYPE: + DGifGetImageDesc(GifFile); + + sp = &GifFile->SavedImages[GifFile->ImageCount-1]; + ImageSize = sp->ImageDesc.Width * sp->ImageDesc.Height; + + sp->RasterBits + = (GifPixelType*) malloc(ImageSize * sizeof(GifPixelType)); + + DGifGetLine(GifFile, sp->RasterBits, ImageSize); + break; + + case EXTENSION_RECORD_TYPE: + DGifGetExtension(GifFile,&sp->Function,&ExtData); + + do { + if (AddExtensionBlock(sp, ExtData[0], ExtData+1) == GIF_ERROR) + GifInternError(GifFile, D_GIF_ERR_NOT_ENOUGH_MEM); + DGifGetExtensionNext(GifFile, &ExtData); + } while (ExtData != NULL); + break; + + case TERMINATE_RECORD_TYPE: + break; + + default: /* Should be trapped by DGifGetRecordType */ + break; + } + } while (RecordType != TERMINATE_RECORD_TYPE); +} + +/****************************************************************************** +* Extension record functions * +******************************************************************************/ + +void MakeExtension(SavedImage *New, int Function) +{ + New->Function = Function; + /* + * Someday we might have to deal with multiple extensions. + */ +} + +int AddExtensionBlock(SavedImage *New, int Len, GifByteType *data) +{ + int size; + ExtensionBlock *ep; + + if (New->ExtensionBlocks == NULL) + New->ExtensionBlocks = (ExtensionBlock *)malloc(sizeof(ExtensionBlock)); + else + New->ExtensionBlocks = + (ExtensionBlock *)realloc(New->ExtensionBlocks, + sizeof(ExtensionBlock) * (New->ExtensionBlockCount + 1)); + + if (New->ExtensionBlocks == NULL) + return(GIF_ERROR); + + ep = &New->ExtensionBlocks[New->ExtensionBlockCount++]; + ep->ByteCount = Len; + size = Len * sizeof(GifByteType); + ep->Bytes = (GifByteType *)malloc(size); + memcpy(ep->Bytes, data, size); + return(GIF_OK); +} + +void FreeExtension(SavedImage *Image) +{ + ExtensionBlock *ep; + + for (ep = Image->ExtensionBlocks; + ep < Image->ExtensionBlocks + Image->ExtensionBlockCount; + ep++) + (void) free((char *)ep->Bytes); + free((char *)Image->ExtensionBlocks); + Image->ExtensionBlocks = NULL; +} + +/****************************************************************************** +* Image block allocation functions * +******************************************************************************/ +SavedImage *MakeSavedImage(GifFileType *GifFile, SavedImage *CopyFrom) +/* + * Append an image block to the SavedImages array + */ +{ + SavedImage *sp; + + if (GifFile->SavedImages == NULL) + GifFile->SavedImages = (SavedImage *)malloc(sizeof(SavedImage)); + else + GifFile->SavedImages = (SavedImage *)realloc(GifFile->SavedImages, + sizeof(SavedImage) * (GifFile->ImageCount+1)); + + if (GifFile->SavedImages == NULL) + return((SavedImage *)NULL); + else + { + sp = &GifFile->SavedImages[GifFile->ImageCount++]; + memset((char *)sp, '\0', sizeof(SavedImage)); + + if (CopyFrom) + { + memcpy((char *)sp, CopyFrom, sizeof(SavedImage)); + + /* + * Make our own allocated copies of the heap fields in the + * copied record. This guards against potential aliasing + * problems. + */ + + /* first, the local color map */ + if (sp->ImageDesc.ColorMap) + sp->ImageDesc.ColorMap = + MakeMapObject(CopyFrom->ImageDesc.ColorMap->ColorCount, + CopyFrom->ImageDesc.ColorMap->Colors); + + /* next, the raster */ + sp->RasterBits = (char *)malloc(sizeof(GifPixelType) + * CopyFrom->ImageDesc.Height + * CopyFrom->ImageDesc.Width); + memcpy(sp->RasterBits, + CopyFrom->RasterBits, + sizeof(GifPixelType) + * CopyFrom->ImageDesc.Height + * CopyFrom->ImageDesc.Width); + + /* finally, the extension blocks */ + if (sp->ExtensionBlocks) + { + sp->ExtensionBlocks + = (ExtensionBlock*)malloc(sizeof(ExtensionBlock) + * CopyFrom->ExtensionBlockCount); + memcpy(sp->ExtensionBlocks, + CopyFrom->ExtensionBlocks, + sizeof(ExtensionBlock) + * CopyFrom->ExtensionBlockCount); + + /* + * For the moment, the actual blocks can take their + * chances with free(). We'll fix this later. + */ + } + } + + return(sp); + } +} + +void FreeSavedImages(GifFileType *GifFile) +{ + SavedImage *sp; + + for (sp = GifFile->SavedImages; + sp < GifFile->SavedImages + GifFile->ImageCount; + sp++) + { + if (sp->ImageDesc.ColorMap) + FreeMapObject(sp->ImageDesc.ColorMap); + + if (sp->RasterBits) + free((char *)sp->RasterBits); + + if (sp->ExtensionBlocks) + FreeExtension(sp); + } + free((char *) GifFile->SavedImages); +} + +/****************************************************************************** +* Miscellaneous utility functions * +******************************************************************************/ + +int BitSize(int n) +/* return smallest bitfield size n will fit in */ +{ + register int i; + + for (i = 1; i <= 8; i++) + if ((1 << i) >= n) + break; + return(i); +} + +/****************************************************************************** +* Color map object functions * +******************************************************************************/ + +ColorMapObject *MakeMapObject(int ColorCount, GifColorType *ColorMap) +/* + * Allocate a color map of given size; initialize with contents of + * ColorMap if that pointer is non-NULL. + */ +{ + ColorMapObject *Object; + + if (ColorCount != (1 << BitSize(ColorCount))) + return((ColorMapObject *)NULL); + + Object = (ColorMapObject *)malloc(sizeof(ColorMapObject)); + if (Object == (ColorMapObject *)NULL) + return((ColorMapObject *)NULL); + + Object->Colors = (GifColorType *)calloc(ColorCount, sizeof(GifColorType)); + if (Object->Colors == (GifColorType *)NULL) + return((ColorMapObject *)NULL); + + Object->ColorCount = ColorCount; + Object->BitsPerPixel = BitSize(ColorCount); + + if (ColorMap) + memcpy((char *)Object->Colors, + (char *)ColorMap, ColorCount * sizeof(GifColorType)); + + return(Object); +} + +void FreeMapObject(ColorMapObject *Object) +/* + * Free a color map object + */ +{ + free(Object->Colors); + free(Object); +}
--- a/src/dired.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/dired.c Mon Aug 13 11:04:06 2007 +0200 @@ -30,6 +30,8 @@ #include "opaque.h" #include "sysfile.h" #include "sysdir.h" +#include "systime.h" +#include "syspwd.h" Lisp_Object Vcompletion_ignored_extensions; Lisp_Object Qdirectory_files; @@ -294,11 +296,12 @@ DIR *d; Lisp_Object obj = XCAR (locative); - if (NILP (obj)) - return Qnil; - d = (DIR *)get_opaque_ptr (obj); - closedir (d); - free_opaque_ptr (obj); + if (!NILP (obj)) + { + d = (DIR *)get_opaque_ptr (obj); + closedir (d); + free_opaque_ptr (obj); + } free_cons (XCONS (locative)); return Qnil; } @@ -528,6 +531,252 @@ } +static Lisp_Object user_name_completion (Lisp_Object user, + int all_flag, + int *uniq); + +DEFUN ("user-name-completion", Fuser_name_completion, 1, 1, 0, /* +Complete user name USER. + +Returns the longest string common to all user names that start +with USER. If there is only one and USER matches it exactly, +returns t. Returns nil if there is no user name starting with USER. +*/ + (user)) +{ + return user_name_completion (user, 0, NULL); +} + +DEFUN ("user-name-completion-1", Fuser_name_completion_1, 1, 1, 0, /* +Complete user name USER. + +This function is identical to `user-name-completion', except that +the cons of the completion and an indication of whether the +completion was unique is returned. + +The car of the returned value is the longest string common to all +user names that start with USER. If there is only one and USER +matches it exactly, the car is t. The car is nil if there is no +user name starting with USER. The cdr of the result is non-nil +if and only if the completion returned in the car was unique. +*/ + (user)) +{ + int uniq; + Lisp_Object completed; + + completed = user_name_completion (user, 0, &uniq); + return Fcons (completed, uniq ? Qt : Qnil); +} + +DEFUN ("user-name-all-completions", Fuser_name_all_completions, 1, 1, 0, /* +Return a list of all completions of user name USER. +These are all user names which begin with USER. +*/ + (user)) +{ + return user_name_completion (user, 1, NULL); +} + +static Lisp_Object +user_name_completion_unwind (Lisp_Object locative) +{ + Lisp_Object obj1 = XCAR (locative); + Lisp_Object obj2 = XCDR (locative); + char **cache; + int clen, i; + + + if (!NILP (obj1) && !NILP (obj2)) + { + /* clean up if interrupted building cache */ + cache = *(char ***)get_opaque_ptr (obj1); + clen = *(int *)get_opaque_ptr (obj2); + free_opaque_ptr (obj1); + free_opaque_ptr (obj2); + for (i = 0; i < clen; i++) + free (cache[i]); + free (cache); + } + + free_cons (XCONS (locative)); + endpwent (); + + return Qnil; +} + +static char **user_cache; +static int user_cache_len; +static int user_cache_max; +static long user_cache_time; + +#define USER_CACHE_REBUILD (24*60*60) /* 1 day, in seconds */ + +static Lisp_Object +user_name_completion (Lisp_Object user, int all_flag, int *uniq) +{ + /* This function can GC */ + struct passwd *pw; + int matchcount = 0; + Lisp_Object bestmatch = Qnil; + Charcount bestmatchsize = 0; + int speccount = specpdl_depth (); + int i, cmax, clen; + char **cache; + Charcount user_name_length; + Lisp_Object locative; + EMACS_TIME t; + struct gcpro gcpro1, gcpro2; + + GCPRO2 (user, bestmatch); + + CHECK_STRING (user); + + user_name_length = XSTRING_CHAR_LENGTH (user); + + /* Cache user name lookups because it tends to be quite slow. + * Rebuild the cache occasionally to catch changes */ + EMACS_GET_TIME (t); + if (user_cache && + EMACS_SECS (t) - user_cache_time > USER_CACHE_REBUILD) + { + for (i = 0; i < user_cache_len; i++) + free (user_cache[i]); + free (user_cache); + user_cache = NULL; + user_cache_len = 0; + user_cache_max = 0; + } + + if (user_cache == NULL || user_cache_max <= 0) + { + cmax = 200; + clen = 0; + cache = (char **) malloc (cmax*sizeof (char *)); + + setpwent (); + locative = noseeum_cons (Qnil, Qnil); + XCAR (locative) = make_opaque_ptr ((void *) &cache); + XCDR (locative) = make_opaque_ptr ((void *) &clen); + record_unwind_protect (user_name_completion_unwind, locative); + /* #### may need to slow down interrupts around call to getpwent + * below. at least the call to getpwnam in Fuser_full_name + * is documented as needing it on irix. */ + while ((pw = getpwent ())) + { + if (clen >= cmax) + { + cmax *= 2; + cache = (char **) realloc (cache, cmax*sizeof (char *)); + } + + QUIT; + + cache[clen++] = strdup (pw->pw_name); + } + free_opaque_ptr (XCAR (locative)); + free_opaque_ptr (XCDR (locative)); + XCAR (locative) = Qnil; + XCDR (locative) = Qnil; + + unbind_to (speccount, Qnil); /* free locative cons, endpwent() */ + + user_cache_max = cmax; + user_cache_len = clen; + user_cache = cache; + user_cache_time = EMACS_SECS (t); + } + + for (i = 0; i < user_cache_len; i++) + { + Bytecount len; + /* scmp() works in chars, not bytes, so we have to compute this: */ + Charcount cclen; + Bufbyte *d_name; + + d_name = (Bufbyte *) user_cache[i]; + len = strlen (d_name); + cclen = bytecount_to_charcount (d_name, len); + + QUIT; + + if (cclen < user_name_length || + 0 <= scmp (d_name, XSTRING_DATA (user), user_name_length)) + continue; + + matchcount++; /* count matching completions */ + + if (all_flag || NILP (bestmatch)) + { + Lisp_Object name = Qnil; + struct gcpro ngcpro1; + NGCPRO1 (name); + /* This is a possible completion */ + name = make_string (d_name, len); + if (all_flag) + { + bestmatch = Fcons (name, bestmatch); + } + else + { + bestmatch = name; + bestmatchsize = XSTRING_CHAR_LENGTH (name); + } + NUNGCPRO; + } + else + { + Charcount compare = min (bestmatchsize, cclen); + Bufbyte *p1 = XSTRING_DATA (bestmatch); + Bufbyte *p2 = d_name; + Charcount matchsize = scmp (p1, p2, compare); + + if (matchsize < 0) + matchsize = compare; + if (completion_ignore_case) + { + /* If this is an exact match except for case, + use it as the best match rather than one that is not + an exact match. This way, we get the case pattern + of the actual match. */ + if ((matchsize == cclen + && matchsize < XSTRING_CHAR_LENGTH (bestmatch)) + || + /* If there is no exact match ignoring case, + prefer a match that does not change the case + of the input. */ + (((matchsize == cclen) + == + (matchsize == XSTRING_CHAR_LENGTH (bestmatch))) + /* If there is more than one exact match aside from + case, and one of them is exact including case, + prefer that one. */ + && 0 > scmp_1 (p2, XSTRING_DATA (user), + user_name_length, 0) + && 0 <= scmp_1 (p1, XSTRING_DATA (user), + user_name_length, 0))) + { + bestmatch = make_string (d_name, len); + } + } + + bestmatchsize = matchsize; + } + } + + UNGCPRO; + + if (uniq) + *uniq = (matchcount == 1); + + if (all_flag || NILP (bestmatch)) + return bestmatch; + if (matchcount == 1 && bestmatchsize == user_name_length) + return Qt; + return Fsubstring (bestmatch, Qzero, make_int (bestmatchsize)); +} + + Lisp_Object make_directory_hash_table (CONST char *path) { @@ -689,6 +938,9 @@ DEFSUBR (Fdirectory_files); DEFSUBR (Ffile_name_completion); DEFSUBR (Ffile_name_all_completions); + DEFSUBR (Fuser_name_completion); + DEFSUBR (Fuser_name_completion_1); + DEFSUBR (Fuser_name_all_completions); DEFSUBR (Ffile_attributes); } @@ -703,4 +955,8 @@ `file-name-all-completions'. */ ); Vcompletion_ignored_extensions = Qnil; + + user_cache = NULL; + user_cache_len = 0; + user_cache_max = 0; }
--- a/src/emacs.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/emacs.c Mon Aug 13 11:04:06 2007 +0200 @@ -612,6 +612,9 @@ #if defined (HAVE_MMAP) && defined (REL_ALLOC) /* ralloc can only be used if using the GNU memory allocator. */ init_ralloc (); +#elif defined (REL_ALLOC) && !defined(DOUG_LEA_MALLOC) + if (initialized) + init_ralloc(); #endif #ifdef HAVE_SOCKS @@ -1278,9 +1281,6 @@ vars_of_extents (); vars_of_faces (); vars_of_fileio (); -#ifdef CLASH_DETECTION - vars_of_filelock (); -#endif vars_of_floatfns (); vars_of_font_lock (); vars_of_frame (); @@ -1535,10 +1535,6 @@ might depend on all sorts of things; I'm not sure. */ complex_vars_of_emacs (); -#ifdef CLASH_DETECTION - complex_vars_of_filelock (); -#endif /* CLASH_DETECTION */ - /* This creates a couple of basic keymaps and depends on Lisp hashtables and Ffset() (both of which depend on some variables initialized in the vars_of_*() section) and possibly other
--- a/src/event-Xt.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/event-Xt.c Mon Aug 13 11:04:06 2007 +0200 @@ -658,6 +658,9 @@ emacs_Xt_mapping_action (Widget w, XEvent* event) { struct device *d = get_device_from_display (event->xany.display); + + if (DEVICE_X_BEING_DELETED (d)) + return; #if 0 /* nyet. Now this is handled by Xt. */ XRefreshKeyboardMapping (&event->xmapping); @@ -769,7 +772,7 @@ /* simple_p means don't try too hard (ASCII only) */ { KeySym keysym = 0; - + #ifdef HAVE_XIM int len; char buffer[64]; @@ -794,7 +797,8 @@ than passing in 0) to avoid crashes on German IRIX */ char dummy[256]; XLookupString (event, dummy, 200, &keysym, 0); - return x_keysym_to_emacs_keysym (keysym, simple_p); + return (IsModifierKey (keysym) || keysym == XK_Mode_switch ) + ? Qnil : x_keysym_to_emacs_keysym (keysym, simple_p); } #endif /* ! XIM_MOTIF */ @@ -843,7 +847,8 @@ { case XLookupKeySym: case XLookupBoth: - return x_keysym_to_emacs_keysym (keysym, simple_p); + return (IsModifierKey (keysym) || keysym == XK_Mode_switch ) + ? Qnil : x_keysym_to_emacs_keysym (keysym, simple_p); case XLookupChars: { @@ -921,6 +926,10 @@ struct device *d = get_device_from_display (display); struct x_device *xd = DEVICE_X_DATA (d); + if (DEVICE_X_BEING_DELETED (d)) + /* #### Uh, is this 0 correct? */ + return 0; + set_last_server_timestamp (d, x_event); switch (x_event->type) @@ -983,20 +992,16 @@ { Lisp_Object keysym; XKeyEvent *ev = &x_event->xkey; - KeyCode keycode = ev->keycode; - - if (x_key_is_modifier_p (keycode, d)) /* it's a modifier key */ - return 0; - /* This used to compute the frame from the given X window and store it here, but we really don't care about the frame. */ emacs_event->channel = DEVICE_CONSOLE (d); keysym = x_to_emacs_keysym (&x_event->xkey, 0); - /* If the emacs keysym is nil, then that means that the - X keysym was NoSymbol, which probably means that - we're in the midst of reading a Multi_key sequence, - or a "dead" key prefix, or XIM input. Ignore it. */ + /* If the emacs keysym is nil, then that means that the X + keysym was either a Modifier or NoSymbol, which + probably means that we're in the midst of reading a + Multi_key sequence, or a "dead" key prefix, or XIM + input. Ignore it. */ if (NILP (keysym)) return 0; @@ -1337,14 +1342,17 @@ void emacs_Xt_handle_focus_event (XEvent *event) { + struct device *d = get_device_from_display (event->xany.display); + struct frame *f; + + if (DEVICE_X_BEING_DELETED (d)) + return; + /* * It's curious that we're using x_any_window_to_frame() instead * of x_window_to_frame(). I don't know what the impact of this is. */ - - struct frame *f = - x_any_window_to_frame (get_device_from_display (event->xany.display), - event->xfocus.window); + f = x_any_window_to_frame (d, event->xfocus.window); if (!f) /* focus events are sometimes generated just before a frame is destroyed. */ @@ -1511,7 +1519,7 @@ XEvent *event = &emacs_event->event.magic.underlying_x_event; struct frame *f = XFRAME (EVENT_CHANNEL (emacs_event)); - if (!FRAME_LIVE_P (f)) + if (!FRAME_LIVE_P (f) || DEVICE_X_BEING_DELETED (XDEVICE (FRAME_DEVICE (f)))) return; switch (event->type)
--- a/src/event-msw.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/event-msw.c Mon Aug 13 11:04:06 2007 +0200 @@ -98,6 +98,7 @@ #ifdef HAVE_MSG_SELECT extern SELECT_TYPE input_wait_mask, non_fake_input_wait_mask; extern SELECT_TYPE process_only_mask, tty_only_mask; +SELECT_TYPE zero_mask; extern int signal_event_pipe_initialized; int windows_fd; #endif @@ -727,8 +728,11 @@ { ResetEvent (str->ov.hEvent); - - if (WriteFile ((HANDLE)str->s, data, size, NULL, &str->ov) + + /* Docs indicate that 4th parameter to WriteFile can be NULL since this is + * an overlapped operation. This fails on Win95 with winsock 1.x so we + * supply a spare address which is ignored by Win95 anyway. Sheesh. */ + if (WriteFile ((HANDLE)str->s, data, size, (LPDWORD)&str->buffer, &str->ov) || GetLastError() == ERROR_IO_PENDING) str->pending_p = 1; else @@ -1294,6 +1298,29 @@ EMACS_TIME_TO_SELECT_TIME (sometime, select_time_to_block); pointer_to_this = &select_time_to_block; } + + /* select() is slow and buggy so if we don't have any processes + just wait as normal */ + if (memcmp (&process_only_mask, &zero_mask, sizeof(SELECT_TYPE))==0) + { + /* Now try getting a message or process event */ + active = MsgWaitForMultipleObjects (0, mswindows_waitable_handles, + FALSE, badly_p ? INFINITE : 0, + QS_ALLINPUT); + + if (active == WAIT_TIMEOUT) + { + /* No luck trying - just return what we've already got */ + return; + } + else if (active == WAIT_OBJECT_0) + { + /* Got your message, thanks */ + mswindows_drain_windows_queue (); + continue; + } + } + active = select (MAXDESC, &temp_mask, 0, 0, pointer_to_this); if (active == 0) @@ -1572,8 +1599,37 @@ mswindows_enqueue_misc_user_event (fobj, Qeval, list3 (Qdelete_frame, fobj, Qt)); break; + case WM_KEYUP: + case WM_SYSKEYUP: + /* See Win95 comment under WM_KEYDOWN */ + { + BYTE keymap[256]; + + if (wParam == VK_CONTROL) + { + GetKeyboardState (keymap); + keymap [(lParam & 0x1000000) ? VK_RCONTROL : VK_LCONTROL] &= ~0x80; + SetKeyboardState (keymap); + } + else if (wParam == VK_MENU) + { + GetKeyboardState (keymap); + keymap [(lParam & 0x1000000) ? VK_RMENU : VK_LMENU] &= ~0x80; + SetKeyboardState (keymap); + } + }; + goto defproc; + case WM_KEYDOWN: case WM_SYSKEYDOWN: + /* In some locales the right-hand Alt key is labelled AltGr. This key + * should produce alternative charcaters when combined with another key. + * eg on a German keyboard pressing AltGr+q should produce '@'. + * AltGr generates exactly the same keystrokes as LCtrl+RAlt. But if + * TranslateMessage() is called with *any* combination of Ctrl+Alt down, + * it translates as if AltGr were down. + * We get round this by removing all modifiers from the keymap before + * calling TranslateMessage() unless AltGr is *really* down. */ { BYTE keymap[256]; int has_AltGr = mswindows_current_layout_has_AltGr (); @@ -1583,7 +1639,7 @@ GetKeyboardState (keymap); mods = mswindows_modifier_state (keymap, has_AltGr); - /* Handle those keys that TranslateMessage won't generate a WM_CHAR for */ + /* Handle those keys for which TranslateMessage won't generate a WM_CHAR */ if (!NILP (keysym = mswindows_key_to_emacs_keysym(wParam, mods))) mswindows_enqueue_keypress_event (hwnd, keysym, mods); else @@ -1591,12 +1647,21 @@ int quit_ch = CONSOLE_QUIT_CHAR (XCONSOLE (mswindows_find_console (hwnd))); BYTE keymap_orig[256]; MSG msg = { hwnd, message, wParam, lParam, GetMessageTime(), (GetMessagePos()) }; + + /* GetKeyboardState() does not work as documented on Win95. We have + * to loosely track Left and Right modifiers on behalf of the OS, + * without screwing up Windows NT which tracks them properly. */ + if (wParam == VK_CONTROL) + keymap [(lParam & 0x1000000) ? VK_RCONTROL : VK_LCONTROL] |= 0x80; + else if (wParam == VK_MENU) + keymap [(lParam & 0x1000000) ? VK_RMENU : VK_LMENU] |= 0x80; + memcpy (keymap_orig, keymap, 256); /* Remove shift modifier from an ascii character */ mods &= ~MOD_SHIFT; - /* Clear control and alt modifiers out of the keymap */ + /* Clear control and alt modifiers unless AltGr is pressed */ keymap [VK_RCONTROL] = 0; keymap [VK_LMENU] = 0; if (!has_AltGr || !(keymap [VK_LCONTROL] & 0x80) || !(keymap [VK_RMENU] & 0x80)) @@ -1608,7 +1673,7 @@ } SetKeyboardState (keymap); - /* Have some WM_[SYS]CHARS in the queue */ + /* Maybe generate some WM_[SYS]CHARs in the queue */ TranslateMessage (&msg); while (PeekMessage (&msg, hwnd, WM_CHAR, WM_CHAR, PM_REMOVE) @@ -2778,9 +2843,7 @@ windows_fd = open("/dev/windows", O_RDONLY | O_NONBLOCK, 0); assert (windows_fd>=0); FD_SET (windows_fd, &input_wait_mask); - /* for some reason I get blocks on the signal event pipe, which is - bad... - signal_event_pipe_initialized = 0; */ + FD_ZERO(&zero_mask); #endif event_stream = mswindows_event_stream;
--- a/src/extents.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/extents.c Mon Aug 13 11:04:06 2007 +0200 @@ -921,6 +921,8 @@ ((markobj) (data->read_only)); ((markobj) (data->mouse_face)); ((markobj) (data->initial_redisplay_function)); + ((markobj) (data->before_change_functions)); + ((markobj) (data->after_change_functions)); return data->parent; } @@ -3156,6 +3158,8 @@ || EQ (prop, Qpriority) || EQ (prop, Qface) || EQ (prop, Qinitial_redisplay_function) + || EQ (prop, Qafter_change_functions) + || EQ (prop, Qbefore_change_functions) || EQ (prop, Qmouse_face) || EQ (prop, Qhighlight) || EQ (prop, Qbegin_glyph_layout) @@ -4602,6 +4606,105 @@ ME_END_CLOSED | ME_MIGHT_MODIFY_EXTENTS); } +/* ------------------------------- */ +/* report_extent_modification() */ +/* ------------------------------- */ +struct report_extent_modification_closure { + Lisp_Object buffer; + Bufpos start, end; + int afterp; + int speccount; +}; + +/* This juggling with the pointer to another file's global variable is + kind of yucky. Perhaps I should just export the variable. */ +static int *inside_change_hook_pointer; + +static Lisp_Object +report_extent_modification_restore (Lisp_Object buffer) +{ + *inside_change_hook_pointer = 0; + if (current_buffer != XBUFFER (buffer)) + Fset_buffer (buffer); + return Qnil; +} + +static int +report_extent_modification_mapper (EXTENT extent, void *arg) +{ + struct report_extent_modification_closure *closure = + (struct report_extent_modification_closure *)arg; + Lisp_Object exobj, startobj, endobj; + Lisp_Object hook = (closure->afterp + ? extent_after_change_functions (extent) + : extent_before_change_functions (extent)); + if (NILP (hook)) + return 0; + + XSETEXTENT (exobj, extent); + XSETINT (startobj, closure->start); + XSETINT (endobj, closure->end); + + /* Now that we are sure to call elisp, set up an unwind-protect so + inside_change_hook gets restored in case we throw. Also record + the current buffer, in case we change it. Do the recording only + once. */ + if (closure->speccount == -1) + { + closure->speccount = specpdl_depth (); + record_unwind_protect (report_extent_modification_restore, + Fcurrent_buffer ()); + } + + /* The functions will expect closure->buffer to be the current + buffer, so change it if it isn't. */ + if (current_buffer != XBUFFER (closure->buffer)) + Fset_buffer (closure->buffer); + + /* #### It's a shame that we can't use any of the existing run_hook* + functions here. This is so because all of them work with + symbols, to be able to retrieve default values of local hooks. + <sigh> */ + + if (!CONSP (hook) || EQ (XCAR (hook), Qlambda)) + call3 (hook, exobj, startobj, endobj); + else + { + Lisp_Object tail; + EXTERNAL_LIST_LOOP (tail, hook) + call3 (XCAR (tail), exobj, startobj, endobj); + } + return 0; +} + +void +report_extent_modification (Lisp_Object buffer, Bufpos start, Bufpos end, + int *inside, int afterp) +{ + struct report_extent_modification_closure closure; + + closure.buffer = buffer; + closure.start = start; + closure.end = end; + closure.afterp = afterp; + closure.speccount = -1; + + inside_change_hook_pointer = inside; + *inside = 1; + + map_extents (start, end, report_extent_modification_mapper, (void *)&closure, + buffer, NULL, ME_MIGHT_CALL_ELISP); + + if (closure.speccount == -1) + *inside = 0; + else + { + /* We mustn't unbind when closure.speccount != -1 because + map_extents_bytind has already done that. */ + assert (*inside == 0); + } +} + /************************************************************************/ /* extent properties */ @@ -5201,6 +5304,10 @@ Fset_extent_face (extent, value); else if (EQ (property, Qinitial_redisplay_function)) Fset_extent_initial_redisplay_function (extent, value); + else if (EQ (property, Qbefore_change_functions)) + set_extent_before_change_functions (e, value); + else if (EQ (property, Qafter_change_functions)) + set_extent_after_change_functions (e, value); else if (EQ (property, Qmouse_face)) Fset_extent_mouse_face (extent, value); /* Obsolete: */ @@ -5306,6 +5413,10 @@ return Fextent_face (extent); else if (EQ (property, Qinitial_redisplay_function)) return extent_initial_redisplay_function (e); + else if (EQ (property, Qbefore_change_functions)) + return extent_before_change_functions (e); + else if (EQ (property, Qafter_change_functions)) + return extent_after_change_functions (e); else if (EQ (property, Qmouse_face)) return Fextent_mouse_face (extent); /* Obsolete: */ @@ -5382,6 +5493,14 @@ result = cons3 (Qinitial_redisplay_function, extent_initial_redisplay_function (anc), result); + if (!NILP (extent_before_change_functions (anc))) + result = cons3 (Qbefore_change_functions, + extent_before_change_functions (anc), result); + + if (!NILP (extent_after_change_functions (anc))) + result = cons3 (Qafter_change_functions, + extent_after_change_functions (anc), result); + if (!NILP (extent_invisible (anc))) result = cons3 (Qinvisible, extent_invisible (anc), result); @@ -6723,6 +6842,8 @@ extent_auxiliary_defaults.read_only = Qnil; extent_auxiliary_defaults.mouse_face = Qnil; extent_auxiliary_defaults.initial_redisplay_function = Qnil; + extent_auxiliary_defaults.before_change_functions = Qnil; + extent_auxiliary_defaults.after_change_functions = Qnil; } void
--- a/src/extents.h Mon Aug 13 11:03:09 2007 +0200 +++ b/src/extents.h Mon Aug 13 11:04:06 2007 +0200 @@ -82,17 +82,14 @@ unsigned int has_aux :1; /* 6 extent has an aux. structure */ unsigned int start_open :1; /* 7 insertion behavior at start */ unsigned int end_open :1; /* 8 insertion behavior at end */ - unsigned int unused9 :1; /* 9 unused */ - unsigned int unique :1; /* 10 there may be only one attached */ - unsigned int duplicable :1; /* 11 copied to strings by kill/undo */ - unsigned int REPLICATING :1; /* 12 invoke old extent-replica behav.*/ - /* Not used any more */ - unsigned int detachable :1; /* 13 extent detaches if text deleted */ - unsigned int internal :1; /* 14 used by map-extents etc. */ - unsigned int in_red_event :1; /* 15 An event has been spawned for + unsigned int unique :1; /* 9 there may be only one attached */ + unsigned int duplicable :1; /* 10 copied to strings by kill/undo */ + unsigned int detachable :1; /* 11 extent detaches if text deleted */ + unsigned int internal :1; /* 12 used by map-extents etc. */ + unsigned int in_red_event :1; /* 13 An event has been spawned for initial redisplay. - Not exported to the lisp level */ - unsigned int unused16 :1; /* 16 unused */ + (not exported to lisp) */ + unsigned int unused16 :1; /* 16 unused bits */ /* --- Adding more flags will cause the extent struct to grow by another word. It's not clear that this would make a difference, however, because on 32-bit machines things tend to get allocated in chunks @@ -139,6 +136,7 @@ Lisp_Object read_only; Lisp_Object mouse_face; Lisp_Object initial_redisplay_function; + Lisp_Object before_change_functions, after_change_functions; int priority; }; @@ -230,6 +228,8 @@ #define extent_read_only(e) extent_aux_field (e, read_only) #define extent_mouse_face(e) extent_aux_field (e, mouse_face) #define extent_initial_redisplay_function(e) extent_aux_field (e, initial_redisplay_function) +#define extent_before_change_functions(e) extent_aux_field (e, before_change_functions) +#define extent_after_change_functions(e) extent_aux_field (e, after_change_functions) #define set_extent_begin_glyph(e, value) \ set_extent_aux_field (e, begin_glyph, value) @@ -246,6 +246,10 @@ /* Use Fset_extent_initial_redisplay_function unless you know what you're doing */ #define set_extent_initial_redisplay_function(e, value) \ set_extent_aux_field (e, initial_redisplay_function, value) +#define set_extent_before_change_functions(e, value) \ + set_extent_aux_field (e, before_change_functions, value) +#define set_extent_after_change_functions(e, value) \ + set_extent_aux_field (e, after_change_functions, value) #define extent_face(e) extent_normal_field (e, face) #define extent_begin_glyph_layout(e) extent_normal_field (e, begin_glyph_layout) @@ -366,6 +370,7 @@ Bytind opoint, Bytecount length); void process_extents_for_deletion (Lisp_Object object, Bytind from, Bytind to, int destroy_them); +void report_extent_modification (Lisp_Object, Bufpos, Bufpos, int *, int); void set_extent_glyph (EXTENT extent, Lisp_Object glyph, int endp, glyph_layout layout);
--- a/src/faces.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/faces.c Mon Aug 13 11:04:06 2007 +0200 @@ -1919,8 +1919,12 @@ inst_list); #endif /* HAVE_TTY */ #ifdef HAVE_MS_WINDOWS - inst_list = Fcons (Fcons (list1 (Qmswindows), build_string ("Courier New")), - inst_list); + inst_list = Fcons (Fcons (list1 (Qmswindows), + build_string ("Fixedsys:Regular:9::Western")), inst_list); + inst_list = Fcons (Fcons (list1 (Qmswindows), + build_string ("Courier:Regular:10::Western")), inst_list); + inst_list = Fcons (Fcons (list1 (Qmswindows), + build_string ("Courier New:Regular:10::Western")), inst_list); #endif /* HAVE_MS_WINDOWS */ set_specifier_fallback (Fget (Vdefault_face, Qfont, Qnil), inst_list); }
--- a/src/fileio.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/fileio.c Mon Aug 13 11:04:06 2007 +0200 @@ -454,13 +454,16 @@ Bufbyte *res = alloca (MAXPATHLEN + 1); if (getdefdir (toupper (*beg) - 'A' + 1, res)) { - if (!IS_DIRECTORY_SEP (res[strlen ((char *) res) - 1])) - strcat ((char *) res, "/"); + char *c=((char *) res) + strlen ((char *) res); + if (!IS_DIRECTORY_SEP (*c)) + { + *c++ = DIRECTORY_SEP; + *c = '\0'; + } beg = res; p = beg + strlen ((char *) beg); } } - CORRECT_DIR_SEPS (beg); #endif /* WINDOWSNT */ return make_string (beg, p - beg); } @@ -544,9 +547,6 @@ out[size + 1] = '\0'; } } -#ifdef WINDOWSNT - CORRECT_DIR_SEPS (out); -#endif return out; } @@ -608,9 +608,6 @@ ) dst[slen - 1] = 0; #endif /* APOLLO */ -#ifdef WINDOWSNT - CORRECT_DIR_SEPS (dst); -#endif /* WINDOWSNT */ return 1; } @@ -2288,7 +2285,7 @@ if (!NILP (handler)) RETURN_UNGCPRO (call2 (handler, Qfile_readable_p, abspath)); -#ifdef WINDOWSNT +#if defined(WINDOWSNT) || defined(__CYGWIN32__) /* Under MS-DOS and Windows, open does not work for directories. */ UNGCPRO; if (access (XSTRING_DATA (abspath), 0) == 0)
--- a/src/filelock.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/filelock.c Mon Aug 13 11:04:06 2007 +0200 @@ -1,24 +1,23 @@ -/* Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994 - Free Software Foundation, Inc. +/* Copyright (C) 1985, 86, 87, 93, 94, 96 Free Software Foundation, Inc. -This file is part of XEmacs. +This file is part of GNU Emacs. -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. +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. -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. +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 +along with GNU Emacs; 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. */ +/* Synced with FSF 20.2 */ #include <config.h> #include "lisp.h" @@ -31,169 +30,271 @@ #include "syspwd.h" #include "syssignal.h" /* for kill */ -#ifndef CLASH_DETECTION -#error CLASH_DETECTION is not defined?? -#endif - -/* FSFmacs uses char *lock_dir and char *superlock_file instead of - the Lisp variables we use. */ - -/* The name of the directory in which we keep lock files, with a '/' - appended. */ -Lisp_Object Vlock_directory; - -#if 0 /* FSFmacs */ -/* Look in startup.el */ -/* The name of the file in the lock directory which is used to - arbitrate access to the entire directory. */ -#define SUPERLOCK_NAME "!!!SuperLock!!!" -#endif - -/* The name of the superlock file. This is SUPERLOCK_NAME appended to - Vlock_directory. */ -Lisp_Object Vsuperlock_file, Vconfigure_superlock_file; - Lisp_Object Qask_user_about_supersession_threat; Lisp_Object Qask_user_about_lock; -static void lock_superlock (CONST char *lfname); -static int lock_file_1 (CONST char *lfname, int mode); -static int lock_if_free (CONST char *lfname); -static int current_lock_owner (CONST char *); -static int current_lock_owner_1 (CONST char *); - -/* Set LOCK to the name of the lock file for the filename FILE. - char *LOCK; Lisp_Object FILE; - - MAKE_LOCK_NAME assumes you have already verified that Vlock_directory - is a string. */ - -#ifndef HAVE_LONG_FILE_NAMES +#ifdef CLASH_DETECTION + +/* The strategy: to lock a file FN, create a symlink .#FN in FN's + directory, with link data `user@host.pid'. This avoids a single + mount (== failure) point for lock files. -#define MAKE_LOCK_NAME(lock, file) \ - (lock = (char *) alloca (14 + XSTRING_LENGTH (Vlock_directory) + 1), \ - fill_in_lock_short_file_name (lock, (file))) + When the host in the lock data is the current host, we can check if + the pid is valid with kill. + + Otherwise, we could look at a separate file that maps hostnames to + reboot times to see if the remote pid can possibly be valid, since we + don't want Emacs to have to communicate via pipes or sockets or + whatever to other processes, either locally or remotely; rms says + that's too unreliable. Hence the separate file, which could + theoretically be updated by daemons running separately -- but this + whole idea is unimplemented; in practice, at least in our + environment, it seems such stale locks arise fairly infrequently, and + Emacs' standard methods of dealing with clashes suffice. -static void -fill_in_lock_short_file_name (REGISTER char *lockfile, REGISTER Lisp_Object fn) -{ - REGISTER union - { - unsigned int word [2]; - unsigned char byte [8]; - } crc; - REGISTER unsigned char *p, new; - - CHECK_STRING (Vlock_directory); - - /* 7-bytes cyclic code for burst correction on byte-by-byte basis. - the used polynomial is D^7 + D^6 + D^3 +1. pot@cnuce.cnr.it */ - - crc.word[0] = crc.word[1] = 0; + We use symlinks instead of normal files because (1) they can be + stored more efficiently on the filesystem, since the kernel knows + they will be small, and (2) all the info about the lock can be read + in a single system call (readlink). Although we could use regular + files to be useful on old systems lacking symlinks, nowadays + virtually all such systems are probably single-user anyway, so it + didn't seem worth the complication. - for (p = XSTRING_DATA (fn); new = *p++; ) - { - new += crc.byte[6]; - crc.byte[6] = crc.byte[5] + new; - crc.byte[5] = crc.byte[4]; - crc.byte[4] = crc.byte[3]; - crc.byte[3] = crc.byte[2] + new; - crc.byte[2] = crc.byte[1]; - crc.byte[1] = crc.byte[0]; - crc.byte[0] = new; - } + Similarly, we don't worry about a possible 14-character limit on + file names, because those are all the same systems that don't have + symlinks. + + This is compatible with the locking scheme used by Interleaf (which + has contributed this implementation for Emacs), and was designed by + Ethan Jacobson, Kimbo Mundy, and others. + + --karl@cs.umb.edu/karl@hq.ileaf.com. */ - { - int need_slash = 0; + +/* Here is the structure that stores information about a lock. */ - /* in case lock-directory doesn't end in / */ - if (XSTRING_BYTE (Vlock_directory, - XSTRING_LENGTH (Vlock_directory) - 1) != '/') - need_slash = 1; +typedef struct +{ + char *user; + char *host; + unsigned long pid; +} lock_info_type; - sprintf (lockfile, "%s%s%.2x%.2x%.2x%.2x%.2x%.2x%.2x", - (char *) XSTRING_DATA (Vlock_directory), - need_slash ? "/" : "", - crc.byte[0], crc.byte[1], crc.byte[2], crc.byte[3], - crc.byte[4], crc.byte[5], crc.byte[6]); - } -} +/* When we read the info back, we might need this much more, + enough for decimal representation plus null. */ +#define LOCK_PID_MAX (4 * sizeof (unsigned long)) -#else /* defined HAVE_LONG_FILE_NAMES */ +/* Free the two dynamically-allocated pieces in PTR. */ +#define FREE_LOCK_INFO(i) do { xfree ((i).user); xfree ((i).host); } while (0) -/* +2 for terminating null and possible extra slash */ -#define MAKE_LOCK_NAME(lock, file) \ - (lock = (char *) alloca (XSTRING_LENGTH (file) + \ - XSTRING_LENGTH (Vlock_directory) + 2), \ +/* Write the name of the lock file for FN into LFNAME. Length will be + that of FN plus two more for the leading `.#' plus one for the null. */ +#define MAKE_LOCK_NAME(lock, file) \ + (lock = (char *) alloca (XSTRING_LENGTH(file) + 2 + 1), \ fill_in_lock_file_name (lock, (file))) static void -fill_in_lock_file_name (REGISTER char *lockfile, REGISTER Lisp_Object fn) - /* fn must be a Lisp_String! */ +fill_in_lock_file_name (lockfile, fn) + register char *lockfile; + register Lisp_Object fn; { - REGISTER char *p; + register char *p; + + strcpy (lockfile, XSTRING_DATA(fn)); + + /* Shift the nondirectory part of the file name (including the null) + right two characters. Here is one of the places where we'd have to + do something to support 14-character-max file names. */ + for (p = lockfile + strlen (lockfile); p != lockfile && *p != '/'; p--) + p[2] = *p; + + /* Insert the `.#'. */ + p[1] = '.'; + p[2] = '#'; +} + +/* Lock the lock file named LFNAME. + If FORCE is nonzero, we do so even if it is already locked. + Return 1 if successful, 0 if not. */ - CHECK_STRING (Vlock_directory); +static int +lock_file_1 (char *lfname,int force) +{ + register int err; + char *user_name; + char *host_name; + char *lock_info_str; + + if (STRINGP (Fuser_login_name (Qnil))) + user_name = (char *)XSTRING_DATA((Fuser_login_name (Qnil))); + else + user_name = ""; + if (STRINGP (Fsystem_name ())) + host_name = (char *)XSTRING_DATA((Fsystem_name ())); + else + host_name = ""; + lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name) + + LOCK_PID_MAX + 5); - strcpy (lockfile, (char *) XSTRING_DATA (Vlock_directory)); + sprintf (lock_info_str, "%s@%s.%lu", user_name, host_name, + (unsigned long) getpid ()); - p = lockfile + strlen (lockfile); + err = symlink (lock_info_str, lfname); + if (errno == EEXIST && force) + { + unlink (lfname); + err = symlink (lock_info_str, lfname); + } + + return err == 0; +} + +/* Return 0 if nobody owns the lock file LFNAME or the lock is obsolete, + 1 if another process owns it (and set OWNER (if non-null) to info), + 2 if the current process owns it, + or -1 if something is wrong with the locking mechanism. */ - if (p == lockfile /* lock-directory is empty?? */ - || *(p - 1) != '/') /* in case lock-directory doesn't end in / */ +static int +current_lock_owner (lock_info_type *owner, char *lfname) +{ +#ifndef index + extern char *rindex (), *index (); +#endif + int o, p, len, ret; + int local_owner = 0; + char *at, *dot; + char *lfinfo = 0; + int bufsize = 50; + /* Read arbitrarily-long contents of symlink. Similar code in + file-symlink-p in fileio.c. */ + do { - *p = '/'; - p++; + bufsize *= 2; + lfinfo = (char *) xrealloc (lfinfo, bufsize); + len = readlink (lfname, lfinfo, bufsize); + } + while (len >= bufsize); + + /* If nonexistent lock file, all is well; otherwise, got strange error. */ + if (len == -1) + { + xfree (lfinfo); + return errno == ENOENT ? 0 : -1; } - strcpy (p, (char *) XSTRING_DATA (fn)); - - for (; *p; p++) + /* Link info exists, so `len' is its length. Null terminate. */ + lfinfo[len] = 0; + + /* Even if the caller doesn't want the owner info, we still have to + read it to determine return value, so allocate it. */ + if (!owner) { - if (*p == '/') - *p = '!'; + owner = (lock_info_type *) alloca (sizeof (lock_info_type)); + local_owner = 1; } -} -#endif /* !defined HAVE_LONG_FILE_NAMES */ + + /* Parse USER@HOST.PID. If can't parse, return -1. */ + /* The USER is everything before the first @. */ + at = index (lfinfo, '@'); + dot = rindex (lfinfo, '.'); + if (!at || !dot) { + xfree (lfinfo); + return -1; + } + len = at - lfinfo; + owner->user = (char *) xmalloc (len + 1); + strncpy (owner->user, lfinfo, len); + owner->user[len] = 0; + + /* The PID is everything after the last `.'. */ + owner->pid = atoi (dot + 1); + + /* The host is everything in between. */ + len = dot - at - 1; + owner->host = (char *) xmalloc (len + 1); + strncpy (owner->host, at + 1, len); + owner->host[len] = 0; -static Lisp_Object -lock_file_owner_name (CONST char *lfname) + /* We're done looking at the link info. */ + xfree (lfinfo); + + /* On current host? */ + if (STRINGP (Fsystem_name ()) + && strcmp (owner->host, XSTRING_DATA(Fsystem_name ())) == 0) + { + if (owner->pid == getpid ()) + ret = 2; /* We own it. */ + else if (owner->pid > 0 + && (kill (owner->pid, 0) >= 0 || errno == EPERM)) + ret = 1; /* An existing process on this machine owns it. */ + /* The owner process is dead or has a strange pid (<=0), so try to + zap the lockfile. */ + else if (unlink (lfname) < 0) + ret = -1; + else + ret = 0; + } + else + { /* If we wanted to support the check for stale locks on remote machines, + here's where we'd do it. */ + ret = 1; + } + + /* Avoid garbage. */ + if (local_owner || ret <= 0) + { + FREE_LOCK_INFO (*owner); + } + return ret; +} + +/* Lock the lock named LFNAME if possible. + Return 0 in that case. + Return positive if some other process owns the lock, and info about + that process in CLASHER. + Return -1 if cannot lock for any other reason. */ + +static int +lock_if_free (lock_info_type *clasher, char *lfname) { - struct stat s; - struct passwd *the_pw = 0; + if (lock_file_1 (lfname, 0) == 0) + { + int locker; - if (lstat (lfname, &s) == 0) - the_pw = getpwuid (s.st_uid); - return (the_pw == 0 ? Qnil : build_string (the_pw->pw_name)); + if (errno != EEXIST) + return -1; + + locker = current_lock_owner (clasher, lfname); + if (locker == 2) + { + FREE_LOCK_INFO (*clasher); + return 0; /* We ourselves locked it. */ + } + else if (locker == 1) + return 1; /* Someone else has it. */ + + return -1; /* Something's wrong. */ + } + return 0; } - -/* lock_file locks file fn, +/* lock_file locks file FN, meaning it serves notice on the world that you intend to edit that file. This should be done only when about to modify a file-visiting buffer previously unmodified. - Do not (normally) call lock_buffer for a buffer already modified, + Do not (normally) call this for a buffer already modified, as either the file is already locked, or the user has already decided to go ahead without locking. - When lock_buffer returns, either the lock is locked for us, + When this returns, either the lock is locked for us, or the user has said to go ahead without locking. - If the file is locked by someone else, lock_buffer calls + If the file is locked by someone else, this calls ask-user-about-lock (a Lisp function) with two arguments, - the file name and the name of the user who did the locking. + the file name and info about the user who did the locking. This function can signal an error, or return t meaning take away the lock, or return nil meaning ignore the lock. */ -/* The lock file name is the file name with "/" replaced by "!" - and put in the Emacs lock directory. */ -/* (ie., /ka/king/junk.tex -> /!/!ka!king!junk.tex). */ - -/* If HAVE_LONG_FILE_NAMES is not defined, the lock file name is the hex - representation of a 14-bytes CRC generated from the file name - and put in the Emacs lock directory (not very nice, but it works). - (ie., /ka/king/junk.tex -> /!/12a82c62f1c6da). */ - void lock_file (Lisp_Object fn) { @@ -201,16 +302,14 @@ /* dmoore - and can destroy current_buffer and all sorts of other mean nasty things with pointy teeth. If you call this make sure you protect things right. */ + /* Somebody updated the code in this function and removed the previous + comment. -slb */ - REGISTER Lisp_Object attack, orig_fn; - REGISTER char *lfname; - struct gcpro gcpro1, gcpro2; - Lisp_Object subject_buf = Qnil; - - if (NILP (Vlock_directory) || NILP (Vsuperlock_file)) - return; - CHECK_STRING (fn); - CHECK_STRING (Vlock_directory); + register Lisp_Object attack, orig_fn; + register char *lfname, *locker; + lock_info_type lock_info; + struct gcpro gcpro1,gcpro2; + Lisp_Object subject_buf; GCPRO2 (fn, subject_buf); orig_fn = fn; @@ -221,29 +320,34 @@ /* See if this file is visited and has changed on disk since it was visited. */ - subject_buf = Fget_file_buffer (fn); - if (!NILP (subject_buf) - && NILP (Fverify_visited_file_modtime (subject_buf)) - && !NILP (Ffile_exists_p (fn))) - call1_in_buffer (XBUFFER (subject_buf), - Qask_user_about_supersession_threat, fn); + { + subject_buf = get_truename_buffer (orig_fn); + if (!NILP (subject_buf) + && NILP (Fverify_visited_file_modtime (subject_buf)) + && !NILP (Ffile_exists_p (fn))) + call1_in_buffer (XBUFFER(subject_buf), + Qask_user_about_supersession_threat, fn); + } /* Try to lock the lock. */ - if (lock_if_free (lfname) <= 0) - /* Return now if we have locked it, or if lock dir does not exist */ + if (lock_if_free (&lock_info, lfname) <= 0) + /* Return now if we have locked it, or if lock creation failed */ goto done; /* Else consider breaking the lock */ + locker = (char *) alloca (strlen (lock_info.user) + strlen (lock_info.host) + + LOCK_PID_MAX + 9); + sprintf (locker, "%s@%s (pid %lu)", lock_info.user, lock_info.host, + lock_info.pid); + FREE_LOCK_INFO (lock_info); + attack = call2_in_buffer (BUFFERP (subject_buf) ? XBUFFER (subject_buf) : - current_buffer, Qask_user_about_lock, fn, - lock_file_owner_name (lfname)); + current_buffer, Qask_user_about_lock , fn, + build_string (locker)); if (!NILP (attack)) /* User says take the lock */ { - CHECK_STRING (Vsuperlock_file); - lock_superlock (lfname); - lock_file_1 (lfname, O_WRONLY); - unlink ((char *) XSTRING_DATA (Vsuperlock_file)); + lock_file_1 (lfname, 1); goto done; } /* User says ignore the lock */ @@ -251,197 +355,46 @@ UNGCPRO; } - -/* Lock the lock file named LFNAME. - If MODE is O_WRONLY, we do so even if it is already locked. - If MODE is O_WRONLY | O_EXCL | O_CREAT, we do so only if it is free. - Return 1 if successful, 0 if not. */ - -static int -lock_file_1 (CONST char *lfname, int mode) -{ - REGISTER int fd; - char buf[20]; - - if ((fd = open (lfname, mode, 0666)) >= 0) - { -#if defined(WINDOWSNT) - chmod(lfname, _S_IREAD|_S_IWRITE); -#elif defined(USG) - chmod (lfname, 0666); -#else - fchmod (fd, 0666); -#endif - sprintf (buf, "%ld ", (long) getpid ()); - write (fd, buf, strlen (buf)); - close (fd); - return 1; - } - else - return 0; -} - -/* Lock the lock named LFNAME if possible. - Return 0 in that case. - Return positive if lock is really locked by someone else. - Return -1 if cannot lock for any other reason. */ - -static int -lock_if_free (CONST char *lfname) -{ - REGISTER int clasher; - - while (lock_file_1 (lfname, O_WRONLY | O_EXCL | O_CREAT) == 0) - { - if (errno != EEXIST) - return -1; - clasher = current_lock_owner (lfname); - if (clasher != 0) - if (clasher != getpid ()) - return (clasher); - else return (0); - /* Try again to lock it */ - } - return 0; -} - -/* Return the pid of the process that claims to own the lock file LFNAME, - or 0 if nobody does or the lock is obsolete, - or -1 if something is wrong with the locking mechanism. */ - -static int -current_lock_owner (CONST char *lfname) -{ - int owner = current_lock_owner_1 (lfname); - if (owner == 0 && errno == ENOENT) - return (0); - /* Is it locked by a process that exists? */ - if (owner != 0 && (kill (owner, 0) >= 0 || errno == EPERM)) - return (owner); - if (unlink (lfname) < 0) - return (-1); - return (0); -} - -static int -current_lock_owner_1 (CONST char *lfname) -{ - REGISTER int fd; - char buf[20]; - int tem; - - fd = open (lfname, O_RDONLY, 0666); - if (fd < 0) - return 0; - tem = read (fd, buf, sizeof buf); - close (fd); - return (tem <= 0 ? 0 : atoi (buf)); -} - - void unlock_file (Lisp_Object fn) { - /* This function can GC. */ - /* dmoore - and can destroy current_buffer and all sorts of other - mean nasty things with pointy teeth. If you call this make sure - you protect things right. */ - - REGISTER char *lfname; - if (NILP (Vlock_directory) || NILP (Vsuperlock_file)) return; - CHECK_STRING (fn); - CHECK_STRING (Vlock_directory); - CHECK_STRING (Vsuperlock_file); + register char *lfname; fn = Fexpand_file_name (fn, Qnil); MAKE_LOCK_NAME (lfname, fn); - lock_superlock (lfname); - - if (current_lock_owner_1 (lfname) == getpid ()) + if (current_lock_owner (0, lfname) == 2) unlink (lfname); - - unlink ((char *) XSTRING_DATA (Vsuperlock_file)); -} - -static void -lock_superlock (CONST char *lfname) -{ - REGISTER int i, fd; - DIR *lockdir; - - for (i = -20; i < 0 && - (fd = open ((char *) XSTRING_DATA (Vsuperlock_file), - O_WRONLY | O_EXCL | O_CREAT, 0666)) < 0; - i++) - { - if (errno != EEXIST) - return; - - /* This seems to be necessary to prevent Emacs from hanging when the - competing process has already deleted the superlock, but it's still - in the NFS cache. So we force NFS to synchronize the cache. */ - lockdir = opendir ((char *) XSTRING_DATA (Vlock_directory)); - if (lockdir) - closedir (lockdir); - - emacs_sleep (1); - } - if (fd >= 0) - { -#if defined(WINDOWSNT) - chmod(lfname, _S_IREAD|_S_IWRITE); -#elif defined(USG) - chmod ((char *) XSTRING_DATA (Vsuperlock_file), 0666); -#else - fchmod (fd, 0666); -#endif - write (fd, lfname, strlen (lfname)); - close (fd); - } } void -unlock_all_files (void) +unlock_all_files () { - /* This function can GC. */ + register Lisp_Object tail; + register struct buffer *b; - Lisp_Object tail; - REGISTER struct buffer *b; - struct gcpro gcpro1; - - GCPRO1 (tail); - for (tail = Vbuffer_alist; GC_CONSP (tail); - tail = XCDR (tail)) + for (tail = Vbuffer_alist; GC_CONSP (tail); tail = XCDR (tail)) { b = XBUFFER (XCDR (XCAR (tail))); - if (STRINGP (b->file_truename) && - BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) + if (STRINGP (b->file_truename) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) unlock_file (b->file_truename); } - UNGCPRO; } - -DEFUN ("lock-buffer", Flock_buffer, 0, 1, 0, /* -Lock FILE, if current buffer is modified. -FILE defaults to current buffer's visited file, +DEFUN ("lock-buffer", Flock_buffer, 0, 1, 0, /* + Lock FILE, if current buffer is modified.\n\ +FILE defaults to current buffer's visited file,\n\ or else nothing is done if current buffer isn't visiting a file. */ - (fn)) + (file)) { - /* This function can GC */ - /* dmoore - and can destroy current_buffer and all sorts of other - mean nasty things with pointy teeth. If you call this make sure - you protect things right. */ - - if (NILP (fn)) - fn = current_buffer->file_truename; - CHECK_STRING (fn); + if (NILP (file)) + file = current_buffer->file_truename; + CHECK_STRING (file); if (BUF_SAVE_MODIFF (current_buffer) < BUF_MODIFF (current_buffer) - && !NILP (fn)) - lock_file (fn); + && !NILP (file)) + lock_file (file); return Qnil; } @@ -462,9 +415,9 @@ return Qnil; } - /* Unlock the file visited in buffer BUFFER. */ + void unlock_buffer (struct buffer *buffer) { @@ -478,32 +431,37 @@ } DEFUN ("file-locked-p", Ffile_locked_p, 0, 1, 0, /* -Return nil if the FILENAME is not locked, + Return nil if the FILENAME is not locked,\n\ t if it is locked by you, else a string of the name of the locker. */ - (fn)) + (filename)) { - /* This function can GC */ - REGISTER char *lfname; + Lisp_Object ret; + register char *lfname; int owner; + lock_info_type locker; - if (NILP (Vlock_directory) || NILP (Vsuperlock_file)) - return Qnil; - CHECK_STRING (Vlock_directory); + filename = Fexpand_file_name (filename, Qnil); + + MAKE_LOCK_NAME (lfname, filename); - fn = Fexpand_file_name (fn, Qnil); - - MAKE_LOCK_NAME (lfname, fn); - - owner = current_lock_owner (lfname); + owner = current_lock_owner (&locker, lfname); if (owner <= 0) - return Qnil; - else if (owner == getpid ()) - return Qt; + ret = Qnil; + else if (owner == 2) + ret = Qt; + else + ret = build_string (locker.user); - return lock_file_owner_name (lfname); + if (owner > 0) + FREE_LOCK_INFO (locker); + + return ret; } + +/* Initialization functions. */ + void syms_of_filelock (void) { @@ -517,30 +475,5 @@ defsymbol (&Qask_user_about_lock, "ask-user-about-lock"); } -void -vars_of_filelock (void) -{ - DEFVAR_LISP ("lock-directory", &Vlock_directory /* -Don't change this -*/ ); - Vlock_directory = Qnil; - DEFVAR_LISP ("superlock-file", &Vsuperlock_file /* -Don't change this -*/ ); - Vsuperlock_file = Qnil; -} -void -complex_vars_of_filelock (void) -{ - DEFVAR_LISP ("configure-superlock-file", &Vconfigure_superlock_file /* -For internal use by the build procedure only. -configure's idea of what SUPERLOCK-FILE will be. -*/ ); -#ifdef PATH_SUPERLOCK - Vconfigure_superlock_file = build_string (PATH_SUPERLOCK); -#else - Vconfigure_superlock_file = Qnil; -#endif - /* All the rest done dynamically by startup.el */ -} +#endif /* CLASH_DETECTION */
--- a/src/fns.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/fns.c Mon Aug 13 11:04:06 2007 +0200 @@ -1688,7 +1688,7 @@ REGISTER Lisp_Object elt, tem; CONCHECK_CONS (tail); elt = XCAR (tail); - if (CONSP (elt) && (tem = XCAR (elt), EQ_WITH_EBOLA_NOTICE (value, tem))) + if (CONSP (elt) && (tem = XCDR (elt), EQ_WITH_EBOLA_NOTICE (value, tem))) { if (NILP (prev)) list = XCDR (tail); @@ -1715,7 +1715,7 @@ { REGISTER Lisp_Object elt, tem; elt = XCAR (tail); - if (CONSP (elt) && (tem = XCAR (elt), EQ_WITH_EBOLA_NOTICE (value, tem))) + if (CONSP (elt) && (tem = XCDR (elt), EQ_WITH_EBOLA_NOTICE (value, tem))) { if (NILP (prev)) list = XCDR (tail);
--- a/src/frame-x.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/frame-x.c Mon Aug 13 11:04:06 2007 +0200 @@ -2651,6 +2651,7 @@ } #else XtDestroyWidget (w); + XFlush (XtDisplay(w)); /* make sure the windows are really gone! */ #endif /* EXTERNAL_WIDGET */ if (FRAME_X_GEOM_FREE_ME_PLEASE (f))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gif_io.c Mon Aug 13 11:04:06 2007 +0200 @@ -0,0 +1,259 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include "gifrlib.h" + +/****************************************************************************** +* Set up the GifFileType structure for use. This must be called first in any * +* client program. Then, if custom IO or Error functions are desired, call * +* GifSetIOFunc/GifSetErrorFunc, then call EGifInitWrite. Else call * +* EGifOpenFileName or EGifOpenFileHandle for standard IO functions. * +* If setup fails, a NULL pointer is returned. * +******************************************************************************/ +GifFileType *GifSetup(void) +{ + GifIODataType *GifIO; + GifFileType *GifFile; + + if ((GifFile = (GifFileType *) malloc(sizeof(GifFileType))) == NULL) + return NULL; + memset(GifFile, '\0', sizeof(GifFileType)); + if ((GifIO = (GifIODataType *) malloc(sizeof(GifIODataType))) == NULL) { + free((char *) GifFile); + return NULL; + } + memset(GifIO, '\0', sizeof(GifIODataType)); + GifFile->GifIO = GifIO; + return GifFile; +} + +void GifFree(GifFileType *GifFile) +{ + GifFilePrivateType *Private; + + if (GifFile == NULL) return; + + Private = (GifFilePrivateType *) GifFile->Private; + + if (GifFile->SavedImages) + FreeSavedImages(GifFile); + if (GifFile->Image.ColorMap) + FreeMapObject(GifFile->Image.ColorMap); + if (GifFile->SColorMap) + FreeMapObject(GifFile->SColorMap); + if (Private) + { + free(Private); + } + if (GifFile->GifIO) + free(GifFile->GifIO); + free(GifFile); +} + +/**************************************************************************** +* Install the specified ReadFunction into the GifFile specified. * +****************************************************************************/ +void GifSetReadFunc(GifFileType *GifFile, Gif_rw_func ReadFunc, VoidPtr data) +{ + GifIODataType *GifIO = (GifIODataType *)GifFile->GifIO; + GifIO->ReadFunc = ReadFunc; + GifIO->ReadFunc_data = data; +} + +/**************************************************************************** +* Install the specified WriteFunction into the GifFile specified. * +****************************************************************************/ +void GifSetWriteFunc(GifFileType *GifFile, Gif_rw_func WriteFunc, VoidPtr data) +{ + GifIODataType *GifIO = (GifIODataType *)GifFile->GifIO; + GifIO->WriteFunc = WriteFunc; + GifIO->WriteFunc_data = data; +} + +/**************************************************************************** +* Install the specified CloseFunction into the GifFile specified. * +****************************************************************************/ +void GifSetCloseFunc(GifFileType *GifFile, Gif_close_func CloseFunc, VoidPtr data) +{ + GifIODataType *GifIO = (GifIODataType *)GifFile->GifIO; + GifIO->CloseFunc = CloseFunc; + GifIO->CloseFunc_data = data; +} + +/**************************************************************************** +* Install the standard IO funcs into the GifFile, including the FILE info * +****************************************************************************/ +void GifStdIOInit(GifFileType *GifFile, FILE *file, int filehandle) +{ + GifStdIODataType *IOData; + + if ((IOData = (GifStdIODataType*)malloc(sizeof(GifStdIODataType))) == NULL) + GifInternError(GifFile, GIF_ERR_NOT_ENOUGH_MEM); + IOData->File = file; + IOData->FileHandle = filehandle; + GifSetReadFunc(GifFile, GifStdRead, IOData); + GifSetWriteFunc(GifFile, GifStdWrite, IOData); + GifSetCloseFunc(GifFile, GifStdFileClose, IOData); +} + +size_t GifStdRead(GifByteType *buf, size_t size, VoidPtr method_data) +{ + GifStdIODataType *IOtype = (GifStdIODataType*)method_data; + return (fread(buf, 1, size, IOtype->File)); +} + +size_t GifStdWrite(GifByteType *buf, size_t size, VoidPtr method_data) +{ + GifStdIODataType *IOtype = (GifStdIODataType*)method_data; + return (fwrite(buf, 1, size, IOtype->File)); +} + +int GifStdFileClose(VoidPtr method_data) +{ + int ret; + GifStdIODataType *IOtype = (GifStdIODataType*)method_data; + ret = fclose(IOtype->File); + if (ret == 0 && IOtype->FileHandle != -1) + ret = close(IOtype->FileHandle); + return ret; +} + +void GifRead(GifByteType *buf, size_t size, GifFileType *GifFile) +{ + GifIODataType *GifIO = (GifIODataType*)GifFile->GifIO; + if ((*(GifIO->ReadFunc))(buf, size, GifIO->ReadFunc_data) != size) + GifError(GifFile, "Read error!"); +} + +void GifWrite(GifByteType *buf, size_t size, GifFileType *GifFile) +{ + GifIODataType *GifIO = (GifIODataType*)GifFile->GifIO; + if ((*(GifIO->WriteFunc))(buf, size, GifIO->WriteFunc_data) != size) + GifError(GifFile, "Write error!"); +} + +int GifClose(GifFileType *GifFile) +{ + GifIODataType *GifIO = (GifIODataType*)GifFile->GifIO; + return ((*(GifIO->CloseFunc))(GifIO->CloseFunc_data)); +} + +static char *GifErrorString[14] = { + "Failed to open given file", /* D_GIF_ERR_OPEN_FAILED */ + "Failed to read from given file", /* D_GIF_ERR_READ_FAILED */ + "Given file is NOT a GIF file", /* D_GIF_ERR_NOT_GIF_FILE */ + "No Screen Descriptor detected", /* D_GIF_ERR_NO_SCRN_DSCR */ + "No Image Descriptor detected", /* D_GIF_ERR_NO_IMAG_DSCR */ + "No global or local color map", /* D_GIF_ERR_NO_COLOR_MAP */ + "Wrong record type detected", /* D_GIF_ERR_WRONG_RECORD */ + "#Pixels bigger than Width * Height", /* D_GIF_ERR_DATA_TOO_BIG */ + "Fail to allocate required memory", /* D_GIF_ERR_NOT_ENOUGH_MEM */ + "Failed to close given file", /* D_GIF_ERR_CLOSE_FAILED */ + "Given file was not opened for read", /* D_GIF_ERR_CLOSE_FAILED */ + "Image is defective, decoding aborted", /* D_GIF_ERR_IMAGE_DEFECT */ + "Image EOF detected before image complete", /* D_GIF_ERR_EOF_TOO_SOON */ + "Undefined error!", +}; + +const char *GetGifError(int error); + +/***************************************************************************** +* Get the last GIF error in human-readable form. * +*****************************************************************************/ +const char *GetGifError(int error) +{ + char *Err; + + switch(error) { + case D_GIF_ERR_OPEN_FAILED: + Err = GifErrorString[0]; + break; + case D_GIF_ERR_READ_FAILED: + Err = GifErrorString[1]; + break; + case D_GIF_ERR_NOT_GIF_FILE: + Err = GifErrorString[2]; + break; + case D_GIF_ERR_NO_SCRN_DSCR: + Err = GifErrorString[3]; + break; + case D_GIF_ERR_NO_IMAG_DSCR: + Err = GifErrorString[4]; + break; + case D_GIF_ERR_NO_COLOR_MAP: + Err = GifErrorString[5]; + break; + case D_GIF_ERR_WRONG_RECORD: + Err = GifErrorString[6]; + break; + case D_GIF_ERR_DATA_TOO_BIG: + Err = GifErrorString[7]; + break; + case D_GIF_ERR_NOT_ENOUGH_MEM: + Err = GifErrorString[8]; + break; + case D_GIF_ERR_CLOSE_FAILED: + Err = GifErrorString[9]; + break; + case D_GIF_ERR_NOT_READABLE: + Err = GifErrorString[10]; + break; + case D_GIF_ERR_IMAGE_DEFECT: + Err = GifErrorString[11]; + break; + case D_GIF_ERR_EOF_TOO_SOON: + Err = GifErrorString[12]; + break; + default: + Err = GifErrorString[13]; + break; + } + return Err; +} + +/****************************** +* These are called internally * +******************************/ +void GifError(GifFileType *GifFile, const char *err_str) +{ + GifIODataType *GifIO = (GifIODataType*)GifFile->GifIO; + if (GifIO->ErrorFunc) + (*(GifIO->ErrorFunc))(err_str, GifIO->ErrorFunc_data); + else + fprintf(stderr, "GIF FATAL ERROR: %s", err_str); + exit(-10); +} + +void GifWarning(GifFileType *GifFile, const char *err_str) +{ + GifIODataType *GifIO = (GifIODataType*)GifFile->GifIO; + if (GifIO->WarningFunc) + (*(GifIO->WarningFunc))(err_str, GifIO->WarningFunc_data); +} + +void GifInternError(GifFileType *GifFile, int error_num) +{ + const char *ErrStr = GetGifError(error_num); + GifError(GifFile, ErrStr); +} + +void GifInternWarning(GifFileType *GifFile, int error_num) +{ + const char *ErrStr = GetGifError(error_num); + GifWarning(GifFile, ErrStr); +} + +void GifSetErrorFunc(GifFileType *GifFile, Gif_error_func ErrorFunc, VoidPtr data) +{ + GifIODataType *GifIO = (GifIODataType *)GifFile->GifIO; + GifIO->ErrorFunc = ErrorFunc; + GifIO->ErrorFunc_data = data; +} + +void GifSetWarningFunc(GifFileType *GifFile, Gif_error_func WarningFunc, VoidPtr data) +{ + GifIODataType *GifIO = (GifIODataType *)GifFile->GifIO; + GifIO->WarningFunc = WarningFunc; + GifIO->WarningFunc_data = data; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gifrlib.h Mon Aug 13 11:04:06 2007 +0200 @@ -0,0 +1,272 @@ +/****************************************************************************** +* In order to make life a little bit easier when using the GIF file format, * +* this library was written, and which does all the dirty work... * +* * +* Written by Gershon Elber, Jun. 1989 * +* Hacks by Eric S. Raymond, Sep. 1992 * +* and Jareth Hein, Jan. 1998 * +******************************************************************************* +* History: * +* 14 Jun 89 - Version 1.0 by Gershon Elber. * +* 3 Sep 90 - Version 1.1 by Gershon Elber (Support for Gif89, Unique names). * +* 15 Sep 90 - Version 2.0 by Eric S. Raymond (Changes to suoport GIF slurp) * +* 26 Jun 96 - Version 3.0 by Eric S. Raymond (Full GIF89 support) * +* 19 Jan 98 - Version 3.1 by Jareth Hein (Support for user-defined I/O). * +******************************************************************************/ + +#ifndef GIF_LIB_H +#define GIF_LIB_H + +#define GIF_ERROR 0 +#define GIF_OK 1 + +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + +#ifndef NULL +#define NULL 0 +#endif /* NULL */ + +#define GIF_FILE_BUFFER_SIZE 16384 /* Files uses bigger buffers than usual. */ + +typedef int GifBooleanType; +typedef unsigned char GifPixelType; +typedef unsigned char * GifRowType; +typedef unsigned char GifByteType; + +#ifdef SYSV +#define VoidPtr char * +#else +#define VoidPtr void * +#endif /* SYSV */ + +typedef struct GifColorType { + GifByteType Red, Green, Blue; +} GifColorType; + +typedef struct ColorMapObject +{ + int ColorCount; + int BitsPerPixel; + GifColorType *Colors; /* on malloc(3) heap */ +} +ColorMapObject; + +typedef struct GifImageDesc { + int Left, Top, Width, Height, /* Current image dimensions. */ + Interlace; /* Sequential/Interlaced lines. */ + ColorMapObject *ColorMap; /* The local color map */ +} GifImageDesc; + +/* I/O operations. If you roll your own, they need to be semantically equivilent to + fread/fwrite, with an additional paramater to hold data local to your method. */ +typedef size_t (*Gif_rw_func)(GifByteType *buffer, size_t size, VoidPtr method_data); +/* Finish up stream. Non-zero return indicates failure */ +typedef int (*Gif_close_func)(VoidPtr close_data); +/* Error handling function */ +typedef void (*Gif_error_func)(const char *string, VoidPtr error_data); + +typedef struct GifFileType { + int SWidth, SHeight, /* Screen dimensions. */ + SColorResolution, /* How many colors can we generate? */ + SBackGroundColor; /* I hope you understand this one... */ + ColorMapObject *SColorMap; /* NULL if it doesn't exist. */ + int ImageCount; /* Number of current image */ + GifImageDesc Image; /* Block describing current image */ + struct SavedImage *SavedImages; /* Use this to accumulate file state */ + VoidPtr Private; /* Don't mess with this! */ + VoidPtr GifIO; /* Contains all information for I/O */ +} GifFileType; + +typedef enum { + UNDEFINED_RECORD_TYPE, + SCREEN_DESC_RECORD_TYPE, + IMAGE_DESC_RECORD_TYPE, /* Begin with ',' */ + EXTENSION_RECORD_TYPE, /* Begin with '!' */ + TERMINATE_RECORD_TYPE /* Begin with ';' */ +} GifRecordType; + +/****************************************************************************** +* GIF89 extension function codes * +******************************************************************************/ + +#define COMMENT_EXT_FUNC_CODE 0xfe /* comment */ +#define GRAPHICS_EXT_FUNC_CODE 0xf9 /* graphics control */ +#define PLAINTEXT_EXT_FUNC_CODE 0x01 /* plaintext */ +#define APPLICATION_EXT_FUNC_CODE 0xff /* application block */ + +/****************************************************************************** +* IO related routines. Defined in gif_io.c * +******************************************************************************/ +GifFileType *GifSetup(void); +void GifFree(GifFileType *GifFile); +void GifSetReadFunc (GifFileType *GifFile, Gif_rw_func func, VoidPtr data); +void GifSetWriteFunc(GifFileType *GifFile, Gif_rw_func func, VoidPtr data); +void GifSetCloseFunc(GifFileType *GifFile, Gif_close_func func, VoidPtr data); + +/****************************************************************************** +* O.K., here are the routines one can access in order to decode GIF file: * +******************************************************************************/ + +void DGifOpenFileName(GifFileType *GifFile, const char *GifFileName); +void DGifOpenFileHandle(GifFileType *GifFile, int GifFileHandle); +void DGifInitRead(GifFileType *GifFile); +void DGifSlurp(GifFileType *GifFile); +void DGifGetScreenDesc(GifFileType *GifFile); +void DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); +void DGifGetImageDesc(GifFileType *GifFile); +void DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); +void DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); +void DGifGetComment(GifFileType *GifFile, char *GifComment); +void DGifGetExtension(GifFileType *GifFile, int *GifExtCode, + GifByteType **GifExtension); +void DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension); +void DGifGetCode(GifFileType *GifFile, int *GifCodeSize, + GifByteType **GifCodeBlock); +void DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); +void DGifGetLZCodes(GifFileType *GifFile, int *GifCode); +int DGifCloseFile(GifFileType *GifFile); + +#define D_GIF_ERR_OPEN_FAILED 101 /* And DGif possible errors. */ +#define D_GIF_ERR_READ_FAILED 102 +#define D_GIF_ERR_NOT_GIF_FILE 103 +#define D_GIF_ERR_NO_SCRN_DSCR 104 +#define D_GIF_ERR_NO_IMAG_DSCR 105 +#define D_GIF_ERR_NO_COLOR_MAP 106 +#define D_GIF_ERR_WRONG_RECORD 107 +#define D_GIF_ERR_DATA_TOO_BIG 108 +#define GIF_ERR_NOT_ENOUGH_MEM 109 +#define D_GIF_ERR_NOT_ENOUGH_MEM 109 +#define D_GIF_ERR_CLOSE_FAILED 110 +#define D_GIF_ERR_NOT_READABLE 111 +#define D_GIF_ERR_IMAGE_DEFECT 112 +#define D_GIF_ERR_EOF_TOO_SOON 113 + +/****************************************************************************** +* O.K., here are the error routines * +******************************************************************************/ +extern void GifSetErrorFunc(GifFileType *GifFile, Gif_error_func func, VoidPtr data); +extern void GifSetWarningFunc(GifFileType *GifFile, Gif_error_func func, VoidPtr data); +extern void GifInternError(GifFileType *GifFile, int errnum); +extern void GifInternWarning(GifFileType *GifFile, int errnum); +extern void GifError(GifFileType *GifFile, const char *err_str); +extern void GifWarning(GifFileType *GifFile, const char *err_str); + +/***************************************************************************** + * + * Everything below this point is new after version 1.2, supporting `slurp + * mode' for doing I/O in two big belts with all the image-bashing in core. + * + *****************************************************************************/ + +/****************************************************************************** +* Support for the in-core structures allocation (slurp mode). * +******************************************************************************/ + +/* This is the in-core version of an extension record */ +typedef struct { + int ByteCount; + char *Bytes; /* on malloc(3) heap */ +} ExtensionBlock; + +/* This holds an image header, its unpacked raster bits, and extensions */ +typedef struct SavedImage { + GifImageDesc ImageDesc; + + char *RasterBits; /* on malloc(3) heap */ + + int Function; + int ExtensionBlockCount; + ExtensionBlock *ExtensionBlocks; /* on malloc(3) heap */ +} SavedImage; + +extern void ApplyTranslation(SavedImage *Image, GifPixelType Translation[]); + +extern void MakeExtension(SavedImage *New, int Function); +extern int AddExtensionBlock(SavedImage *New, int Length, GifByteType *data); +extern void FreeExtension(SavedImage *Image); + +extern SavedImage *MakeSavedImage(GifFileType *GifFile, SavedImage *CopyFrom); +extern void FreeSavedImages(GifFileType *GifFile); + +/* Common defines used by encode/decode functions */ + +#define COMMENT_EXT_FUNC_CODE 0xfe /* Extension function code for comment. */ +#define GIF_STAMP "GIFVER" /* First chars in file - GIF stamp. */ +#define GIF_STAMP_LEN sizeof(GIF_STAMP) - 1 +#define GIF_VERSION_POS 3 /* Version first character in stamp. */ +#define GIF87_STAMP "GIF87a" /* First chars in file - GIF stamp. */ +#define GIF89_STAMP "GIF89a" /* First chars in file - GIF stamp. */ + +#define LZ_MAX_CODE 4095 /* Biggest code possible in 12 bits. */ +#define LZ_BITS 12 + +#define FILE_STATE_READ 0x01 +#define FILE_STATE_WRITE 0x01 +#define FILE_STATE_SCREEN 0x02 +#define FILE_STATE_IMAGE 0x04 + +#define FLUSH_OUTPUT 4096 /* Impossible code, to signal flush. */ +#define FIRST_CODE 4097 /* Impossible code, to signal first. */ +#define NO_SUCH_CODE 4098 /* Impossible code, to signal empty. */ + +#define IS_READABLE(Private) (!(Private->FileState & FILE_STATE_READ)) +#define IS_WRITEABLE(Private) (Private->FileState & FILE_STATE_WRITE) + +typedef struct GifFilePrivateType { + int FileState, + BitsPerPixel, /* Bits per pixel (Codes uses at list this + 1). */ + ClearCode, /* The CLEAR LZ code. */ + EOFCode, /* The EOF LZ code. */ + RunningCode, /* The next code algorithm can generate. */ + RunningBits,/* The number of bits required to represent RunningCode. */ + MaxCode1, /* 1 bigger than max. possible code, in RunningBits bits. */ + LastCode, /* The code before the current code. */ + CrntCode, /* Current algorithm code. */ + StackPtr, /* For character stack (see below). */ + CrntShiftState; /* Number of bits in CrntShiftDWord. */ + unsigned long CrntShiftDWord; /* For bytes decomposition into codes. */ + unsigned long PixelCount; /* Number of pixels in image. */ + GifByteType Buf[256]; /* Compressed input is buffered here. */ + GifByteType Stack[LZ_MAX_CODE]; /* Decoded pixels are stacked here. */ + GifByteType Suffix[LZ_MAX_CODE+1]; /* So we can trace the codes. */ + unsigned int Prefix[LZ_MAX_CODE+1]; +} GifFilePrivateType; + +typedef struct GifIODataType { + Gif_rw_func ReadFunc, WriteFunc; /* Pointers to the functions that will do the I/O */ + Gif_close_func CloseFunc; + VoidPtr ReadFunc_data; /* data to be passed to the read function */ + VoidPtr WriteFunc_data; /* data to be passed to the write function */ + VoidPtr CloseFunc_data; /* data to be passed to the close function */ + Gif_error_func ErrorFunc; /* MUST NOT RETURN (use lng_jmp or exit)! */ + Gif_error_func WarningFunc; /* For warning messages (can be ignored) */ + VoidPtr ErrorFunc_data; + VoidPtr WarningFunc_data; +} GifIODataType; + +typedef struct GifStdIODataType { + FILE *File; + int FileHandle; +} GifStdIODataType; + +/* Install StdIO funcs on FILE into GifFile */ +void GifStdIOInit(GifFileType *GifFile, FILE *file, int filehandle); + +/* Error checking reads, writes and closes */ +void GifRead(GifByteType *buf, size_t size, GifFileType *GifFile); +void GifWrite(GifByteType *buf, size_t size, GifFileType *GifFile); +int GifClose(GifFileType *GifFile); + +/* The default Read and Write functions for files */ +size_t GifStdRead(GifByteType *buf, size_t size, VoidPtr method_data); +size_t GifStdWrite(GifByteType *buf, size_t size, VoidPtr method_data); +int GifStdFileClose(VoidPtr method_data); + +ColorMapObject *MakeMapObject(int ColorCount, GifColorType *ColorMap); +void FreeMapObject(ColorMapObject *Object); + + +#endif /* GIF_LIB_H */
--- a/src/glyphs-eimage.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/glyphs-eimage.c Mon Aug 13 11:04:06 2007 +0200 @@ -49,6 +49,7 @@ #include "lstream.h" #include "console.h" #include "device.h" +#include "faces.h" #include "glyphs.h" #include "objects.h" @@ -516,7 +517,7 @@ * GIF * **********************************************************************/ -#include <gifrlib.h> +#include "gifrlib.h" static void gif_validate (Lisp_Object instantiator) @@ -697,8 +698,12 @@ eip = unwind.eimage; for (i = 0; i < height; i++) { - if (interlace && row >= height) - row = InterlacedOffset[++pass]; + if (interlace) + if (row >= height) { + row = InterlacedOffset[++pass]; + while (row > height) + row = InterlacedOffset[++pass]; + } eip = unwind.eimage + (row * width * 3); for (j = 0; j < width; j++) { @@ -812,6 +817,8 @@ if (data->instream) fclose (data->instream); + if (data->eimage) xfree(data->eimage); + return Qnil; } @@ -902,6 +909,42 @@ for (y = 0; y < height; y++) row_pointers[y] = unwind.eimage + (width * 3 * y); + { + /* if the png specifies a background chunk, go ahead and + use it, else use what we can get from the default face. */ + png_color_16 my_background, *image_background; + Lisp_Object bkgd = Qnil; + + my_background.red = 0x7fff; + my_background.green = 0x7fff; + my_background.blue = 0x7fff; + bkgd = FACE_BACKGROUND (Vdefault_face, domain); + if (!COLOR_INSTANCEP (bkgd)) + { + warn_when_safe (Qpng, Qinfo, "Couldn't get background color!"); + } + else + { + struct Lisp_Color_Instance *c; + Lisp_Object rgblist; + + c = XCOLOR_INSTANCE (bkgd); + rgblist = MAYBE_LISP_DEVMETH (XDEVICE (c->device), + color_instance_rgb_components, + (c)); + my_background.red = XINT (XCAR (rgblist)); + my_background.green = XINT (XCAR (XCDR (rgblist))); + my_background.blue = XINT (XCAR (XCDR (XCDR (rgblist)))); + } + + if (png_get_bKGD (png_ptr, info_ptr, &image_background)) + png_set_background (png_ptr, image_background, + PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); + else + png_set_background (png_ptr, &my_background, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); + } + /* Now that we're using EImage, ask for 8bit RGB triples for any type of image*/ /* convert palatte images to full RGB */ @@ -914,12 +957,6 @@ /* we can't handle alpha values */ if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) png_set_strip_alpha (png_ptr); - /* rip out any transparancy layers/colors */ - if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) - { - png_set_expand (png_ptr); - png_set_strip_alpha (png_ptr); - } /* tell libpng to strip 16 bit depth files down to 8 bits */ if (info_ptr->bit_depth == 16) png_set_strip_16 (png_ptr); @@ -932,25 +969,6 @@ png_set_packing (png_ptr); } -#if 1 /* tests? or permanent? */ - { - /* if the png specifies a background chunk, go ahead and - use it */ - png_color_16 my_background, *image_background; - - /* ### how do I get the background of the current frame? */ - my_background.red = 0x7fff; - my_background.green = 0x7fff; - my_background.blue = 0x7fff; - - if (png_get_bKGD (png_ptr, info_ptr, &image_background)) - png_set_background (png_ptr, image_background, - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); - else - png_set_background (png_ptr, &my_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); - } -#endif png_read_image (png_ptr, row_pointers); png_read_end (png_ptr, info_ptr);
--- a/src/glyphs-msw.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/glyphs-msw.c Mon Aug 13 11:04:06 2007 +0200 @@ -521,6 +521,8 @@ IMAGE_INSTANCE_PIXMAP_HEIGHT (ii), SRCCOPY)) { + DeleteObject (newbmp); + DeleteDC (hdcDst); return 0; } @@ -553,6 +555,8 @@ IMAGE_INSTANCE_PIXMAP_HEIGHT (ii), SRCCOPY)) { + DeleteObject (newmask); + DeleteDC (hdcDst); return NULL; }
--- a/src/glyphs-x.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/glyphs-x.c Mon Aug 13 11:04:06 2007 +0200 @@ -39,6 +39,7 @@ Many changes for color work and optimizations by Jareth Hein for 21.0 Switch of GIF/JPEG/PNG to new EImage intermediate code by Jareth Hein for 21.0 TIFF code by Jareth Hein for 21.0 + GIF/JPEG/PNG/TIFF code moved to new glyph-eimage.c for 21.0 TODO: Convert images.el to C and stick it in here?
--- a/src/glyphs.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/glyphs.c Mon Aug 13 11:04:06 2007 +0200 @@ -2366,15 +2366,17 @@ instanced as `mono-pixmap', `color-pixmap', or `pointer'.) 'gif (A GIF87 or GIF89 image; only if GIF support was compiled into this - XEmacs. Can be instanced as `color-pixmap'.) + XEmacs. NOTE: only the first frame of animated gifs will be displayed. + Can be instanced as `color-pixmap'.) 'jpeg (A JPEG image; only if JPEG support was compiled into this XEmacs. Can be instanced as `color-pixmap'.) 'png - (A PNG/GIF24 image; only if PNG support was compiled into this XEmacs. + (A PNG image; only if PNG support was compiled into this XEmacs. Can be instanced as `color-pixmap'.) 'tiff - (A TIFF image; not currently implemented.) + (A TIFF image; only if TIFF support was compiled into this XEmacs. + Can be instanced as `color-pixmap'.) 'cursor-font (One of the standard cursor-font names, such as "watch" or "right_ptr" under X. Under X, this is, more specifically, any
--- a/src/gui-x.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/gui-x.c Mon Aug 13 11:04:06 2007 +0200 @@ -324,8 +324,11 @@ ++name; if (!(*name)) return Qnil; - if (*name=='_'&&*(name+1)) - return make_char (tolower(*(name+1))); + if (*name=='_' && *(name+1)) + { + int accelerator = (int) (unsigned char) (*(name+1)); + return make_char (tolower (accelerator)); + } } ++name; }
--- a/src/insdel.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/insdel.c Mon Aug 13 11:04:06 2007 +0200 @@ -1657,6 +1657,8 @@ Bufbyte *to, *from; Bytecount i; Bytind new_s1; + struct buffer *mbuf; + Lisp_Object bufcons; from = BUF_GPT_ADDR (buf); to = from + BUF_GAP_SIZE (buf); @@ -1708,13 +1710,22 @@ /* Adjust markers, and buffer data structure, to put the gap at POS. POS is where the loop above stopped, which may be what was specified or may be where a quit was detected. */ - adjust_markers (buf, pos, BI_BUF_GPT (buf), BUF_GAP_SIZE (buf)); - adjust_extents (make_buffer (buf), pos, BI_BUF_GPT (buf), - BUF_GAP_SIZE (buf)); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + adjust_markers (mbuf, pos, BI_BUF_GPT (mbuf), BUF_GAP_SIZE (mbuf)); + } + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + adjust_extents (make_buffer (mbuf), pos, BI_BUF_GPT (mbuf), + BUF_GAP_SIZE (mbuf)); + } SET_BI_BUF_GPT (buf, pos); SET_GAP_SENTINEL (buf); #ifdef ERROR_CHECK_EXTENTS - sledgehammer_extent_check (make_buffer (buf)); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + sledgehammer_extent_check (make_buffer (mbuf)); + } #endif QUIT; } @@ -1725,6 +1736,8 @@ Bufbyte *to, *from; Bytecount i; Bytind new_s1; + struct buffer *mbuf; + Lisp_Object bufcons; to = BUF_GPT_ADDR (buf); from = to + BUF_GAP_SIZE (buf); @@ -1775,13 +1788,22 @@ { int gsize = BUF_GAP_SIZE (buf); - adjust_markers (buf, BI_BUF_GPT (buf) + gsize, pos + gsize, - gsize); - adjust_extents (make_buffer (buf), BI_BUF_GPT (buf) + gsize, pos + gsize, - - gsize); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + adjust_markers (mbuf, BI_BUF_GPT (mbuf) + gsize, pos + gsize, - gsize); + } + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + adjust_extents (make_buffer (mbuf), BI_BUF_GPT (mbuf) + gsize, + pos + gsize, - gsize); + } SET_BI_BUF_GPT (buf, pos); SET_GAP_SENTINEL (buf); #ifdef ERROR_CHECK_EXTENTS - sledgehammer_extent_check (make_buffer (buf)); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + sledgehammer_extent_check (make_buffer (mbuf)); + } #endif } if (pos == BI_BUF_Z (buf)) @@ -2080,8 +2102,10 @@ static Lisp_Object change_function_restore (Lisp_Object buffer) { + /* We should first reset the variable and then change the buffer, + because Fset_buffer() can throw. */ + inside_change_hook = 0; Fset_buffer (buffer); - inside_change_hook = 0; return Qnil; } @@ -2090,8 +2114,8 @@ static Lisp_Object first_change_hook_restore (Lisp_Object buffer) { + in_first_change = 0; Fset_buffer (buffer); - in_first_change = 0; return Qnil; } @@ -2106,8 +2130,7 @@ if (!in_first_change) { - if (!preparing_for_armageddon && - !NILP (symbol_value_in_buffer (Qfirst_change_hook, buffer))) + if (!NILP (symbol_value_in_buffer (Qfirst_change_hook, buffer))) { int speccount = specpdl_depth (); record_unwind_protect (first_change_hook_restore, buffer); @@ -2126,11 +2149,13 @@ signal_before_change (struct buffer *buf, Bufpos start, Bufpos end) { /* This function can GC */ - Lisp_Object buffer; - XSETBUFFER (buffer, buf); + struct buffer *mbuf; + Lisp_Object bufcons; if (!inside_change_hook) { + Lisp_Object buffer; + /* Are we in a multiple-change session? */ if (buf->text->changes->in_multiple_change && buf->text->changes->mc_begin != 0) @@ -2159,35 +2184,46 @@ /* If buffer is unmodified, run a special hook for that case. */ if (BUF_SAVE_MODIFF (buf) >= BUF_MODIFF (buf)) - signal_first_change (buf); + { + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + signal_first_change (mbuf); + } + } /* Now in any case run the before-change-functions if any. */ - if (!preparing_for_armageddon && - (!NILP (symbol_value_in_buffer (Qbefore_change_functions, buffer)) || - /* Obsolete, for compatibility */ - !NILP (symbol_value_in_buffer (Qbefore_change_function, buffer)))) + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) { - int speccount = specpdl_depth (); - record_unwind_protect (change_function_restore, Fcurrent_buffer ()); - set_buffer_internal (buf); - inside_change_hook = 1; - va_run_hook_with_args (Qbefore_change_functions, 2, - make_int (start), make_int (end)); - /* Obsolete, for compatibility */ - va_run_hook_with_args (Qbefore_change_function, 2, - make_int (start), make_int (end)); - unbind_to (speccount, Qnil); + XSETBUFFER (buffer, mbuf); + if (!NILP (symbol_value_in_buffer (Qbefore_change_functions, buffer)) + /* Obsolete, for compatibility */ + || !NILP (symbol_value_in_buffer (Qbefore_change_function, buffer))) + { + int speccount = specpdl_depth (); + record_unwind_protect (change_function_restore, Fcurrent_buffer ()); + set_buffer_internal (buf); + inside_change_hook = 1; + va_run_hook_with_args (Qbefore_change_functions, 2, + make_int (start), make_int (end)); + /* Obsolete, for compatibility */ + va_run_hook_with_args (Qbefore_change_function, 2, + make_int (start), make_int (end)); + unbind_to (speccount, Qnil); + } + } + + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + XSETBUFFER (buffer, mbuf); + report_extent_modification (buffer, start, end, + &inside_change_hook, 0); } /* Only now do we indicate that the before-change-functions have been called, in case some function throws out. */ buf->text->changes->mc_begin_signaled = 1; } - - /* #### At this point we should map over extents calling - modification-hooks, insert-before-hooks and insert-after-hooks - of relevant extents */ } /* Signal a change immediately after it happens. @@ -2201,15 +2237,25 @@ Bufpos new_end) { /* This function can GC */ - Lisp_Object buffer; - XSETBUFFER (buffer, buf); - - /* always do this. */ - buffer_signal_changed_region (buf, start, new_end); - font_lock_maybe_update_syntactic_caches (buf, start, orig_end, new_end); + struct buffer *mbuf; + Lisp_Object bufcons; + + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + /* always do this. */ + buffer_signal_changed_region (mbuf, start, new_end); + } + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + /* #### This seems inefficient. Wouldn't it be better to just + keep one cache per base buffer? */ + font_lock_maybe_update_syntactic_caches (mbuf, start, orig_end, new_end); + } if (!inside_change_hook) { + Lisp_Object buffer; + if (buf->text->changes->in_multiple_change && buf->text->changes->mc_begin != 0) { @@ -2221,30 +2267,38 @@ return; /* after-change-functions signalled when all changes done */ } - if (!preparing_for_armageddon && - (!NILP (symbol_value_in_buffer (Qafter_change_functions, buffer)) || - /* Obsolete, for compatibility */ - !NILP (symbol_value_in_buffer (Qafter_change_function, buffer)))) + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) { - int speccount = specpdl_depth (); - record_unwind_protect (change_function_restore, Fcurrent_buffer ()); - set_buffer_internal (buf); - inside_change_hook = 1; - /* The actual after-change functions take slightly - different arguments than what we were passed. */ - va_run_hook_with_args (Qafter_change_functions, 3, - make_int (start), make_int (new_end), - make_int (orig_end - start)); - /* Obsolete, for compatibility */ - va_run_hook_with_args (Qafter_change_function, 3, - make_int (start), make_int (new_end), - make_int (orig_end - start)); - unbind_to (speccount, Qnil); + XSETBUFFER (buffer, mbuf); + + if (!NILP (symbol_value_in_buffer (Qafter_change_functions, buffer)) + /* Obsolete, for compatibility */ + || !NILP (symbol_value_in_buffer (Qafter_change_function, buffer))) + { + int speccount = specpdl_depth (); + record_unwind_protect (change_function_restore, Fcurrent_buffer ()); + set_buffer_internal (buf); + inside_change_hook = 1; + /* The actual after-change functions take slightly + different arguments than what we were passed. */ + va_run_hook_with_args (Qafter_change_functions, 3, + make_int (start), make_int (new_end), + make_int (orig_end - start)); + /* Obsolete, for compatibility */ + va_run_hook_with_args (Qafter_change_function, 3, + make_int (start), make_int (new_end), + make_int (orig_end - start)); + unbind_to (speccount, Qnil); + } + } + + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + XSETBUFFER (buffer, mbuf); + report_extent_modification (buffer, start, new_end, + &inside_change_hook, 1); } } - - /* #### At this point we should map over extents calling - some sort of modification hooks of relevant extents */ } /* Call this if you're about to change the region of BUFFER from START @@ -2260,10 +2314,14 @@ /* dmoore - This function can also kill the buffer buf, the current buffer, and do anything it pleases. So if you call it, be careful. */ - Lisp_Object buffer; + struct buffer *mbuf; + Lisp_Object buffer, bufcons; struct gcpro gcpro1; - barf_if_buffer_read_only (buf, start, end); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + barf_if_buffer_read_only (mbuf, start, end); + } /* if this is the first modification, see about locking the buffer's file */ @@ -2307,7 +2365,10 @@ Vdeactivate_mark = Qt; #endif - buf->point_before_scroll = Qnil; + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + mbuf->point_before_scroll = Qnil; + } } @@ -2367,6 +2428,8 @@ Bytind ind; Charcount cclen; int move_point = 0; + struct buffer *mbuf; + Lisp_Object bufcons; /* Defensive steps just in case a buffer gets deleted and a calling function doesn't notice it. */ @@ -2391,7 +2454,8 @@ if ((length + BUF_Z (buf)) > EMACS_INT_MAX) error ("Maximum buffer size exceeded"); - /* theoretically not necessary -- caller should GCPRO */ + /* theoretically not necessary -- caller should GCPRO. + #### buffer_insert_from_buffer_1() doesn't! */ GCPRO1 (reloc); prepare_to_modify_buffer (buf, pos, pos, !(flags & INSDEL_NO_LOCKING)); @@ -2433,7 +2497,11 @@ insert_invalidate_line_number_cache (buf, pos, nonreloc + offset, length); - record_insert (buf, pos, cclen); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + record_insert (mbuf, pos, cclen); + } + BUF_MODIFF (buf)++; MARK_BUFFERS_CHANGED; @@ -2445,7 +2513,10 @@ SET_BUF_GAP_SIZE (buf, BUF_GAP_SIZE (buf) - length); SET_BI_BUF_GPT (buf, BI_BUF_GPT (buf) + length); - SET_BOTH_BUF_ZV (buf, BUF_ZV (buf) + cclen, BI_BUF_ZV (buf) + length); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + SET_BOTH_BUF_ZV (mbuf, BUF_ZV (mbuf) + cclen, BI_BUF_ZV (mbuf) + length); + } SET_BOTH_BUF_Z (buf, BUF_Z (buf) + cclen, BI_BUF_Z (buf) + length); SET_GAP_SENTINEL (buf); @@ -2453,29 +2524,48 @@ buffer_mule_signal_inserted_region (buf, pos, length, cclen); #endif - process_extents_for_insertion (make_buffer (buf), ind, length); - /* We know the gap is at IND so the cast is OK. */ - adjust_markers_for_insert (buf, (Memind) ind, length); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + process_extents_for_insertion (make_buffer (mbuf), ind, length); + } + + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + /* We know the gap is at IND so the cast is OK. */ + adjust_markers_for_insert (mbuf, (Memind) ind, length); + } /* Point logically doesn't move, but may need to be adjusted because it's a byte index. point-marker doesn't change because it's a memory index. */ - if (BI_BUF_PT (buf) > ind) - JUST_SET_POINT (buf, BUF_PT (buf) + cclen, BI_BUF_PT (buf) + length); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + if (BI_BUF_PT (mbuf) > ind) + JUST_SET_POINT (mbuf, BUF_PT (mbuf) + cclen, + BI_BUF_PT (mbuf) + length); + } /* Well, point might move. */ if (move_point) BI_BUF_SET_PT (buf, ind + length); if (STRINGP (reloc)) - splice_in_string_extents (reloc, buf, ind, length, offset); + { + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + splice_in_string_extents (reloc, mbuf, ind, length, offset); + } + } if (flags & INSDEL_BEFORE_MARKERS) { - /* ind - 1 is correct because the FROM argument is exclusive. - I formerly used DEC_BYTIND() but that caused problems at the - beginning of the buffer. */ - adjust_markers (buf, ind - 1, ind, length); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + /* ind - 1 is correct because the FROM argument is exclusive. + I formerly used DEC_BYTIND() but that caused problems at the + beginning of the buffer. */ + adjust_markers (mbuf, ind - 1, ind, length); + } } signal_after_change (buf, pos, pos, pos + cclen); @@ -2507,7 +2597,9 @@ int flags) { /* This function can GC */ +#ifdef ERROR_CHECK_TYPECHECK assert (STRINGP (str)); +#endif return buffer_insert_string_1 (buf, pos, 0, str, 0, XSTRING_LENGTH (str), flags); @@ -2520,7 +2612,6 @@ int flags) { /* This function can GC */ - CONST char *translated = GETTEXT (s); return buffer_insert_string_1 (buf, pos, (CONST Bufbyte *) translated, Qnil, 0, strlen (translated), flags); @@ -2532,9 +2623,7 @@ { /* This function can GC */ Bufbyte str[MAX_EMCHAR_LEN]; - Bytecount len; - - len = set_charptr_emchar (str, ch); + Bytecount len = set_charptr_emchar (str, ch); return buffer_insert_string_1 (buf, pos, str, Qnil, 0, len, flags); } @@ -2573,7 +2662,8 @@ Bytind bi_from, bi_to; Bytecount bc_numdel; EMACS_INT shortage; - Lisp_Object bufobj; + struct buffer *mbuf; + Lisp_Object bufcons; /* Defensive steps just in case a buffer gets deleted and a calling function doesn't notice it. */ @@ -2604,8 +2694,6 @@ if ((numdel = to - from) <= 0) return; - XSETBUFFER (bufobj, buf); - /* Redisplay needs to know if a newline was in the deleted region. If we've already marked the changed region as having a deleted newline there is no use in performing the check. */ @@ -2613,7 +2701,12 @@ { scan_buffer (buf, '\n', from, to, 1, &shortage, 1); if (!shortage) - buf->changes->newline_was_deleted = 1; + { + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + mbuf->changes->newline_was_deleted = 1; + } + } } bi_from = bufpos_to_bytind (buf, from); @@ -2627,49 +2720,70 @@ { /* avoid moving the gap just to delete from the bottom. */ - record_delete (buf, from, numdel); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + record_delete (mbuf, from, numdel); + } BUF_MODIFF (buf)++; MARK_BUFFERS_CHANGED; - /* ### Point used to be modified here, but this causes problems with MULE, - as point is used to calculate bytinds, and if the offset in bc_numdel causes - point to move to a non first-byte location, causing some other function to - throw an assertion in ASSERT_VALID_BYTIND. I've moved the code to right after - the other movements and adjustments, but before the gap is moved. - -- jh 970813 */ + /* #### Point used to be modified here, but this causes problems + with MULE, as point is used to calculate bytinds, and if the + offset in bc_numdel causes point to move to a non first-byte + location, causing some other function to throw an assertion + in ASSERT_VALID_BYTIND. I've moved the code to right after + the other movements and adjustments, but before the gap is + moved. -- jh 970813 */ /* Detach any extents that are completely within the range [FROM, TO], if the extents are detachable. - This must come AFTER record_delete(), so that the appropriate extents - will be present to be recorded, and BEFORE the gap size is increased, - as otherwise we will be confused about where the extents end. */ - process_extents_for_deletion (bufobj, bi_from, bi_to, 0); - - /* Relocate all markers pointing into the new, larger gap - to point at the end of the text before the gap. */ - adjust_markers (buf, - (bi_to + BUF_GAP_SIZE (buf)), - (bi_to + BUF_GAP_SIZE (buf)), - (- bc_numdel)); - - /* Relocate any extent endpoints just like markers. */ - adjust_extents_for_deletion (bufobj, bi_from, bi_to, - BUF_GAP_SIZE (buf), bc_numdel, 0); - - /* Relocate point as if it were a marker. */ - if (bi_from < BI_BUF_PT (buf)) + This must come AFTER record_delete(), so that the appropriate + extents will be present to be recorded, and BEFORE the gap + size is increased, as otherwise we will be confused about + where the extents end. */ + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + process_extents_for_deletion (make_buffer (mbuf), bi_from, bi_to, 0); + } + + /* Relocate all markers pointing into the new, larger gap to + point at the end of the text before the gap. */ + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) { - if (BI_BUF_PT (buf) < bi_to) - JUST_SET_POINT (buf, from, bi_from); - else - JUST_SET_POINT (buf, BUF_PT (buf) - numdel, - BI_BUF_PT (buf) - bc_numdel); + adjust_markers (mbuf, + (bi_to + BUF_GAP_SIZE (mbuf)), + (bi_to + BUF_GAP_SIZE (mbuf)), + (- bc_numdel)); + } + + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + /* Relocate any extent endpoints just like markers. */ + adjust_extents_for_deletion (make_buffer (mbuf), bi_from, bi_to, + BUF_GAP_SIZE (mbuf), bc_numdel, 0); + } + + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + /* Relocate point as if it were a marker. */ + if (bi_from < BI_BUF_PT (mbuf)) + { + if (BI_BUF_PT (mbuf) < bi_to) + JUST_SET_POINT (mbuf, from, bi_from); + else + JUST_SET_POINT (mbuf, BUF_PT (mbuf) - numdel, + BI_BUF_PT (mbuf) - bc_numdel); + } } SET_BUF_END_GAP_SIZE (buf, BUF_END_GAP_SIZE (buf) + bc_numdel); - SET_BOTH_BUF_ZV (buf, BUF_ZV (buf) - numdel, BI_BUF_ZV (buf) - bc_numdel); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + SET_BOTH_BUF_ZV (mbuf, BUF_ZV (mbuf) - numdel, + BI_BUF_ZV (mbuf) - bc_numdel); + } SET_BOTH_BUF_Z (buf, BUF_Z (buf) - numdel, BI_BUF_Z (buf) - bc_numdel); SET_GAP_SENTINEL (buf); } @@ -2681,16 +2795,20 @@ if (bi_from > BI_BUF_GPT (buf)) gap_right (buf, bi_from); - record_delete (buf, from, numdel); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + record_delete (mbuf, from, numdel); + } BUF_MODIFF (buf)++; MARK_BUFFERS_CHANGED; - /* ### Point used to be modified here, but this causes problems with MULE, - as point is used to calculate bytinds, and if the offset in bc_numdel causes - point to move to a non first-byte location, causing some other function to - throw an assertion in ASSERT_VALID_BYTIND. I've moved the code to right after - the other movements and adjustments, but before the gap is moved. - -- jh 970813 */ + /* #### Point used to be modified here, but this causes problems + with MULE, as point is used to calculate bytinds, and if the + offset in bc_numdel causes point to move to a non first-byte + location, causing some other function to throw an assertion + in ASSERT_VALID_BYTIND. I've moved the code to right after + the other movements and adjustments, but before the gap is + moved. -- jh 970813 */ /* Detach any extents that are completely within the range [FROM, TO], if the extents are detachable. @@ -2698,31 +2816,48 @@ This must come AFTER record_delete(), so that the appropriate extents will be present to be recorded, and BEFORE the gap size is increased, as otherwise we will be confused about where the extents end. */ - process_extents_for_deletion (bufobj, bi_from, bi_to, 0); - - /* Relocate all markers pointing into the new, larger gap - to point at the end of the text before the gap. */ - adjust_markers (buf, - (bi_to + BUF_GAP_SIZE (buf)), - (bi_to + BUF_GAP_SIZE (buf)), - (- bc_numdel - BUF_GAP_SIZE (buf))); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + process_extents_for_deletion (make_buffer (mbuf), bi_from, bi_to, 0); + } + + /* Relocate all markers pointing into the new, larger gap to + point at the end of the text before the gap. */ + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + adjust_markers (mbuf, + (bi_to + BUF_GAP_SIZE (mbuf)), + (bi_to + BUF_GAP_SIZE (mbuf)), + (- bc_numdel - BUF_GAP_SIZE (mbuf))); + } /* Relocate any extent endpoints just like markers. */ - adjust_extents_for_deletion (bufobj, bi_from, bi_to, BUF_GAP_SIZE (buf), - bc_numdel, BUF_GAP_SIZE (buf)); - - /* Relocate point as if it were a marker. */ - if (bi_from < BI_BUF_PT (buf)) + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + adjust_extents_for_deletion (make_buffer (mbuf), bi_from, bi_to, + BUF_GAP_SIZE (mbuf), + bc_numdel, BUF_GAP_SIZE (mbuf)); + } + + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) { - if (BI_BUF_PT (buf) < bi_to) - JUST_SET_POINT (buf, from, bi_from); - else - JUST_SET_POINT (buf, BUF_PT (buf) - numdel, - BI_BUF_PT (buf) - bc_numdel); + /* Relocate point as if it were a marker. */ + if (bi_from < BI_BUF_PT (mbuf)) + { + if (BI_BUF_PT (mbuf) < bi_to) + JUST_SET_POINT (mbuf, from, bi_from); + else + JUST_SET_POINT (mbuf, BUF_PT (mbuf) - numdel, + BI_BUF_PT (mbuf) - bc_numdel); + } } SET_BUF_GAP_SIZE (buf, BUF_GAP_SIZE (buf) + bc_numdel); - SET_BOTH_BUF_ZV (buf, BUF_ZV (buf) - numdel, BI_BUF_ZV (buf) - bc_numdel); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + SET_BOTH_BUF_ZV (mbuf, BUF_ZV (mbuf) - numdel, + BI_BUF_ZV (mbuf) - bc_numdel); + } SET_BOTH_BUF_Z (buf, BUF_Z (buf) - numdel, BI_BUF_Z (buf) - bc_numdel); SET_BI_BUF_GPT (buf, bi_from); SET_GAP_SENTINEL (buf); @@ -2733,7 +2868,10 @@ #endif #ifdef ERROR_CHECK_EXTENTS - sledgehammer_extent_check (bufobj); + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + sledgehammer_extent_check (make_buffer (mbuf)); + } #endif signal_after_change (buf, from, to, from); @@ -2747,7 +2885,7 @@ /* Replace the character at POS in buffer B with CH. */ void -buffer_replace_char (struct buffer *b, Bufpos pos, Emchar ch, +buffer_replace_char (struct buffer *buf, Bufpos pos, Emchar ch, int not_real_change, int force_lock_check) { /* This function can GC */ @@ -2757,42 +2895,54 @@ /* Defensive steps just in case a buffer gets deleted and a calling function doesn't notice it. */ - if (!BUFFER_LIVE_P (b)) + if (!BUFFER_LIVE_P (buf)) return; - curlen = BUF_CHARPTR_COPY_CHAR (b, pos, curstr); + curlen = BUF_CHARPTR_COPY_CHAR (buf, pos, curstr); newlen = set_charptr_emchar (newstr, ch); if (curlen == newlen) { + struct buffer *mbuf; + Lisp_Object bufcons; + /* then we can just replace the text. */ - prepare_to_modify_buffer (b, pos, pos + 1, + prepare_to_modify_buffer (buf, pos, pos + 1, !not_real_change || force_lock_check); /* Defensive steps in case the before-change-functions fuck around */ - if (!BUFFER_LIVE_P (b)) + if (!BUFFER_LIVE_P (buf)) /* Bad bad pre-change function. */ return; /* Make args be valid again. prepare_to_modify_buffer() might have modified the buffer. */ - if (pos < BUF_BEGV (b)) - pos = BUF_BEGV (b); - if (pos >= BUF_ZV (b)) - pos = BUF_ZV (b) - 1; - if (pos < BUF_BEGV (b)) + if (pos < BUF_BEGV (buf)) + pos = BUF_BEGV (buf); + if (pos >= BUF_ZV (buf)) + pos = BUF_ZV (buf) - 1; + if (pos < BUF_BEGV (buf)) /* no more characters in buffer! */ return; - if (BUF_FETCH_CHAR (b, pos) == '\n') - b->changes->newline_was_deleted = 1; + if (BUF_FETCH_CHAR (buf, pos) == '\n') + { + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + mbuf->changes->newline_was_deleted = 1; + } + } MARK_BUFFERS_CHANGED; if (!not_real_change) { - record_change (b, pos, 1); - BUF_MODIFF (b)++; + MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons) + { + record_change (mbuf, pos, 1); + } + BUF_MODIFF (buf)++; } - memcpy (BUF_BYTE_ADDRESS (b, pos), newstr, newlen); - signal_after_change (b, pos, pos + 1, pos + 1); + memcpy (BUF_BYTE_ADDRESS (buf, pos), newstr, newlen); + + signal_after_change (buf, pos, pos + 1, pos + 1); /* We do not have to adjust the Mule data; we just replaced a character with another of the same number of bytes. */ @@ -2807,21 +2957,21 @@ * point. Point will drift backward by one position and stay * there otherwise. */ - int movepoint = (pos == BUF_PT (b) - 1); - - buffer_delete_range (b, pos, pos + 1, 0); + int movepoint = (pos == BUF_PT (buf) - 1); + + buffer_delete_range (buf, pos, pos + 1, 0); /* Defensive steps in case the before-change-functions fuck around */ - if (!BUFFER_LIVE_P (b)) + if (!BUFFER_LIVE_P (buf)) /* Bad bad pre-change function. */ return; /* Make args be valid again. prepare_to_modify_buffer() might have modified the buffer. */ - if (pos < BUF_BEGV (b)) - pos = BUF_BEGV (b); - if (pos >= BUF_ZV (b)) - pos = BUF_ZV (b) - 1; - if (pos < BUF_BEGV (b)) + if (pos < BUF_BEGV (buf)) + pos = BUF_BEGV (buf); + if (pos >= BUF_ZV (buf)) + pos = BUF_ZV (buf) - 1; + if (pos < BUF_BEGV (buf)) /* no more characters in buffer! */ return; /* @@ -2829,7 +2979,7 @@ * insertion, which we must do if the deletion moved point * backward so that it now equals the insertion point. */ - buffer_insert_string_1 (b, (movepoint ? -1 : pos), + buffer_insert_string_1 (buf, (movepoint ? -1 : pos), newstr, Qnil, 0, newlen, 0); } } @@ -3085,9 +3235,9 @@ } void -init_buffer_text (struct buffer *b, int indirect_p) +init_buffer_text (struct buffer *b) { - if (!indirect_p) + if (!b->base_buffer) { SET_BUF_GAP_SIZE (b, 20); BUFFER_ALLOC (b->text->beg, BUF_GAP_SIZE (b) + BUF_END_SENTINEL_SIZE); @@ -3115,6 +3265,7 @@ } } #endif /* MULE */ + b->text->line_number_cache = Qnil; BUF_MODIFF (b) = 1; BUF_SAVE_MODIFF (b) = 1; @@ -3145,9 +3296,9 @@ } void -uninit_buffer_text (struct buffer *b, int indirect_p) +uninit_buffer_text (struct buffer *b) { - if (!indirect_p) + if (!b->base_buffer) { BUFFER_FREE (b->text->beg); xfree (b->text->changes);
--- a/src/insdel.h Mon Aug 13 11:03:09 2007 +0200 +++ b/src/insdel.h Mon Aug 13 11:04:06 2007 +0200 @@ -156,7 +156,7 @@ void barf_if_buffer_read_only (struct buffer *buf, Bufpos from, Bufpos to); -void init_buffer_text (struct buffer *b, int indirect_p); -void uninit_buffer_text (struct buffer *b, int indirect_p); +void init_buffer_text (struct buffer *b); +void uninit_buffer_text (struct buffer *b); #endif /* _XEMACS_INSDEL_H_ */
--- a/src/keymap.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/keymap.c Mon Aug 13 11:04:06 2007 +0200 @@ -4325,10 +4325,12 @@ This keymap works like `function-key-map', but comes after that, and applies even for keys that have ordinary bindings. */ ); + Vkey_translation_map = Qnil; DEFVAR_LISP ("vertical-divider-map", &Vvertical_divider_map /* Keymap which handles mouse clicks over vertical dividers. */ ); + Vvertical_divider_map = Qnil; DEFVAR_INT ("keymap-tick", &keymap_tick /* Incremented for each change to any keymap.
--- a/src/line-number.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/line-number.c Mon Aug 13 11:04:06 2007 +0200 @@ -74,8 +74,8 @@ #define LINE_NUMBER_LARGE_STRING 256 /* To be used only when you *know* the cache has been allocated! */ -#define LINE_NUMBER_RING(b) (XCAR ((b)->line_number_cache)) -#define LINE_NUMBER_BEGV(b) (XCDR ((b)->line_number_cache)) +#define LINE_NUMBER_RING(b) (XCAR ((b)->text->line_number_cache)) +#define LINE_NUMBER_BEGV(b) (XCDR ((b)->text->line_number_cache)) /* Initialize the cache. Cache is (in pseudo-BNF): @@ -89,12 +89,12 @@ Line number cache should never, ever, be visible to Lisp (because destructively modifying its elements can cause crashes.) Debug it - using debug_print (current_buffer->last_number_cache). */ + using debug_print (current_buffer->text->last_number_cache). */ static void allocate_line_number_cache (struct buffer *b) { - b->line_number_cache = Fcons (make_vector (LINE_NUMBER_RING_SIZE, Qnil), - Qzero); + b->text->line_number_cache = Fcons (make_vector (LINE_NUMBER_RING_SIZE, Qnil), + Qzero); narrow_line_number_cache (b); } @@ -103,7 +103,7 @@ void narrow_line_number_cache (struct buffer *b) { - if (NILP (b->line_number_cache)) + if (NILP (b->text->line_number_cache)) return; if (BUF_BEG (b) == BUF_BEGV (b)) @@ -161,7 +161,7 @@ insert_invalidate_line_number_cache (struct buffer *b, Bufpos pos, CONST Bufbyte *nonreloc, Bytecount length) { - if (NILP (b->line_number_cache)) + if (NILP (b->text->line_number_cache)) return; if (length > LINE_NUMBER_LARGE_STRING @@ -182,7 +182,7 @@ void delete_invalidate_line_number_cache (struct buffer *b, Bufpos from, Bufpos to) { - if (NILP (b->line_number_cache)) + if (NILP (b->text->line_number_cache)) return; if ((to - from) > LINE_NUMBER_LARGE_STRING) @@ -280,7 +280,7 @@ if (cachep) { - if (NILP (b->line_number_cache)) + if (NILP (b->text->line_number_cache)) allocate_line_number_cache (b); /* If we don't know the line number of BUF_BEGV, calculate it now. */ if (XINT (LINE_NUMBER_BEGV (b)) == -1)
--- a/src/lisp.h Mon Aug 13 11:03:09 2007 +0200 +++ b/src/lisp.h Mon Aug 13 11:04:06 2007 +0200 @@ -2689,6 +2689,7 @@ EXFUN (Fsymbol_name, 1); EXFUN (Fsymbol_plist, 1); EXFUN (Fsymbol_value, 1); +EXFUN (Fsystem_name, 0); EXFUN (Fthrow, 2); EXFUN (Ftimes, MANY); EXFUN (Ftruncate, 1);
--- a/src/lread.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/lread.c Mon Aug 13 11:04:06 2007 +0200 @@ -91,9 +91,6 @@ /* Whether Fload_internal() should ignore .elc files when no suffix is given */ int load_ignore_elc_files; -/* Directory in which the sources were found. */ -Lisp_Object Vsource_directory; - /* Search path for files to be loaded. */ Lisp_Object Vload_path; @@ -796,10 +793,11 @@ if (purify_flag && noninteractive) { if (EQ (last_file_loaded, file)) - message_append (" (%d)", purespace_usage() - pure_usage); + message_append (" (%ld)", + (unsigned long) (purespace_usage() - pure_usage)); else - message ("Loading %s ...done (%d)", XSTRING_DATA (file), - purespace_usage() - pure_usage); + message ("Loading %s ...done (%ld)", XSTRING_DATA (file), + (unsigned long) (purespace_usage() - pure_usage)); } /*#endif / * DEBUG_XEMACS */ @@ -3153,12 +3151,6 @@ */ ); load_force_doc_strings = 0; - DEFVAR_LISP ("source-directory", &Vsource_directory /* -Directory in which XEmacs sources were found when XEmacs was built. -You cannot count on them to still be there! -*/ ); - Vsource_directory = Qnil; - /* See read_escape(). */ #if 0 /* Used to be named `puke-on-fsf-keys' */
--- a/src/macros.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/macros.c Mon Aug 13 11:04:06 2007 +0200 @@ -105,7 +105,7 @@ int repeat; if (NILP (con->defining_kbd_macro)) - error ("Not defining kbd macro."); + error ("Not defining kbd macro"); if (NILP (arg)) repeat = -1; @@ -275,7 +275,7 @@ final = indirect_function (macro, 1); if (!STRINGP (final) && !VECTORP (final)) - error ("Keyboard macros must be strings or vectors."); + error ("Keyboard macros must be strings or vectors"); tem = Fcons (Vexecuting_macro, make_int (executing_macro_index)); record_unwind_protect (pop_kbd_macro, tem);
--- a/src/marker.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/marker.c Mon Aug 13 11:04:06 2007 +0200 @@ -523,7 +523,10 @@ b->mark = Fmake_marker (); BUF_MARKERS (b) = 0; b->point_marker = Fmake_marker (); - Fset_marker (b->point_marker, make_int (1), buf); + Fset_marker (b->point_marker, + /* For indirect buffers, point is already set. */ + b->base_buffer ? make_int (BUF_PT (b)) : make_int (1), + buf); } void
--- a/src/menubar-msw.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/menubar-msw.c Mon Aug 13 11:04:06 2007 +0200 @@ -123,7 +123,7 @@ * "Left Flush\tRight Flush" */ static char* -displayable_menu_item (struct gui_item* pgui_item) +displayable_menu_item (struct gui_item* pgui_item, int bar_p) { /* We construct the name in a static buffer. That's fine, beause menu items longer than 128 chars are probably programming errors, @@ -135,12 +135,15 @@ /* Left flush part of the string */ ll = gui_item_display_flush_left (pgui_item, buf, MAX_MENUITEM_LENGTH); - /* Right flush part */ - assert (MAX_MENUITEM_LENGTH > ll + 1); - lr = gui_item_display_flush_right (pgui_item, buf + ll + 1, - MAX_MENUITEM_LENGTH - ll - 1); - if (lr) - buf [ll] = '\t'; + /* Right flush part, unless we're at the top-level where it's not allowed */ + if (!bar_p) + { + assert (MAX_MENUITEM_LENGTH > ll + 1); + lr = gui_item_display_flush_right (pgui_item, buf + ll + 1, + MAX_MENUITEM_LENGTH - ll - 1); + if (lr) + buf [ll] = '\t'; + } return buf; } @@ -223,7 +226,8 @@ static void populate_menu_add_item (HMENU menu, Lisp_Object path, - Lisp_Object hash_tab, Lisp_Object item, int flush_right) + Lisp_Object hash_tab, Lisp_Object item, + int flush_right, int bar_p) { MENUITEMINFO item_info; @@ -271,7 +275,7 @@ submenu = create_empty_popup_menu(); item_info.fMask |= MIIM_SUBMENU; - item_info.dwTypeData = displayable_menu_item (&gui_item); + item_info.dwTypeData = displayable_menu_item (&gui_item, bar_p); item_info.hSubMenu = submenu; if (!(item_info.fState & MFS_GRAYED)) @@ -332,13 +336,13 @@ item_info.wID = (UINT) XINT(id); item_info.fType |= MFT_STRING; - item_info.dwTypeData = displayable_menu_item (&gui_item); + item_info.dwTypeData = displayable_menu_item (&gui_item, bar_p); UNGCPRO; /* gui_item */ } else { - signal_simple_error ("Mailformed menu item descriptor", item); + signal_simple_error ("Malformed menu item descriptor", item); } if (flush_right) @@ -408,7 +412,7 @@ } else if (populate_p) populate_menu_add_item (menu, path, hash_tab, - XCAR (item_desc), flush_right); + XCAR (item_desc), flush_right, bar_p); else checksum = HASH2 (checksum, checksum_menu_item (XCAR (item_desc)));
--- a/src/menubar-x.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/menubar-x.c Mon Aug 13 11:04:06 2007 +0200 @@ -333,6 +333,33 @@ } #endif /* LWLIB_MENUBARS_LUCID || LWLIB_MENUBARS_MOTIF */ +#if 0 +/* #### Sort of a hack needed to process Vactivate_menubar_hook + correctly wrt buffer-local values. A correct solution would + involve adding a callback mechanism to run_hook(). This function + is currently unused. */ +static int +my_run_hook (Lisp_Object hooksym, int allow_global_p) +{ + /* This function can GC */ + Lisp_Object tail; + Lisp_Object value = Fsymbol_value (hooksym); + int changes = 0; + + if (!NILP (value) && (!CONSP (value) || EQ (XCAR (value), Qlambda))) + return !EQ (call0 (value), Qt); + + EXTERNAL_LIST_LOOP (tail, value) + { + if (allow_global_p && EQ (XCAR (tail), Qt)) + changes |= my_run_hook (Fdefault_value (hooksym), 0); + if (!EQ (call0 (XCAR (tail)), Qt)) + changes = 1; + } + return changes; +} +#endif + /* The order in which callbacks are run is funny to say the least. It's sometimes tricky to avoid running a callback twice, and to @@ -358,12 +385,9 @@ pre_activate_callback (Widget widget, LWLIB_ID id, XtPointer client_data) { /* This function can GC */ - struct gcpro gcpro1; struct device *d = get_device_from_display (XtDisplay (widget)); struct frame *f = x_any_window_to_frame (d, XtWindow (widget)); - Lisp_Object rest = Qnil; Lisp_Object frame; - int any_changes = 0; int count; /* set in lwlib to the time stamp associated with the most recent menu @@ -418,24 +442,17 @@ replace_widget_value_tree (hack_wv, wv->contents); free_popup_widget_value_tree (wv); } + else if (!POPUP_DATAP (FRAME_MENUBAR_DATA (f))) + return; else { - if (!POPUP_DATAP (FRAME_MENUBAR_DATA (f))) - return; +#if 0 /* Unused, see comment below. */ + int any_changes; + /* #### - this menubar update mechanism is expensively anti-social and the activate-menubar-hook is now mostly obsolete. */ - /* make the activate-menubar-hook be a list of functions, not a single - function, just to simplify things. */ - if (!NILP (Vactivate_menubar_hook) && - (!CONSP (Vactivate_menubar_hook) || - EQ (XCAR (Vactivate_menubar_hook), Qlambda))) - Vactivate_menubar_hook = Fcons (Vactivate_menubar_hook, Qnil); + any_changes = my_run_hook (Qactivate_menubar_hook, 1); - GCPRO1 (rest); - for (rest = Vactivate_menubar_hook; !NILP (rest); rest = Fcdr (rest)) - if (!EQ (call0 (XCAR (rest)), Qt)) - any_changes = 1; -#if 0 /* #### - It is necessary to *ALWAYS* call set_frame_menubar() now that incremental menus are implemented. If a subtree of a menu has been updated incrementally (a destructive operation), then that subtree @@ -446,12 +463,14 @@ that an INCREMENTAL_TYPE widget_value can be recreated... Hmmmmm. */ if (any_changes || !XFRAME_MENUBAR_DATA (f)->menubar_contents_up_to_date) + set_frame_menubar (f, 1, 0); +#else + run_hook (Qactivate_menubar_hook); + set_frame_menubar (f, 1, 0); #endif - set_frame_menubar (f, 1, 0); DEVICE_X_MOUSE_TIMESTAMP (XDEVICE (FRAME_DEVICE (f))) = DEVICE_X_GLOBAL_MOUSE_TIMESTAMP (XDEVICE (FRAME_DEVICE (f))) = x_focus_timestamp_really_sucks_fix_me_better; - UNGCPRO; } }
--- a/src/mule-canna.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/mule-canna.c Mon Aug 13 11:04:06 2007 +0200 @@ -169,21 +169,21 @@ static unsigned char buf[KEYTOSTRSIZE]; static char **warning; -static int Vcanna_empty_info, Vcanna_through_info; -static int Vcanna_underline; -static int Vcanna_inhibit_hankakukana; +static int canna_empty_info, canna_through_info; +static int canna_underline; +static int canna_inhibit_hankakukana; static Lisp_Object Vcanna_kakutei_string; static Lisp_Object Vcanna_kakutei_yomi; static Lisp_Object Vcanna_kakutei_romaji; static Lisp_Object Vcanna_henkan_string; -static int Vcanna_henkan_length; -static int Vcanna_henkan_revPos; -static int Vcanna_henkan_revLen; +static int canna_henkan_length; +static int canna_henkan_revPos; +static int canna_henkan_revLen; static Lisp_Object Vcanna_ichiran_string; -static int Vcanna_ichiran_length; -static int Vcanna_ichiran_revPos; -static int Vcanna_ichiran_revLen; +static int canna_ichiran_length; +static int canna_ichiran_revPos; +static int canna_ichiran_revLen; static Lisp_Object Vcanna_mode_string; static int IRCP_context; @@ -259,21 +259,21 @@ { Vcanna_henkan_string = make_string (ks->echoStr, ks->length); #ifndef CANNA_MULE - Vcanna_henkan_length = ks->length; - Vcanna_henkan_revPos = ks->revPos; - Vcanna_henkan_revLen = ks->revLen; + canna_henkan_length = ks->length; + canna_henkan_revPos = ks->revPos; + canna_henkan_revLen = ks->revLen; #else /* CANNA_MULE */ - if (Vcanna_underline) + if (canna_underline) { - Vcanna_henkan_length = mule_strlen (ks->echoStr,ks->length); - Vcanna_henkan_revPos = mule_strlen (ks->echoStr,ks->revPos); - Vcanna_henkan_revLen = mule_strlen (ks->echoStr+ks->revPos,ks->revLen); + canna_henkan_length = mule_strlen (ks->echoStr,ks->length); + canna_henkan_revPos = mule_strlen (ks->echoStr,ks->revPos); + canna_henkan_revLen = mule_strlen (ks->echoStr+ks->revPos,ks->revLen); } else { count_char (ks->echoStr, ks->length, ks->revPos, ks->revLen, - &Vcanna_henkan_length, &Vcanna_henkan_revPos, - &Vcanna_henkan_revLen); + &canna_henkan_length, &canna_henkan_revPos, + &canna_henkan_revLen); } #endif /* CANNA_MULE */ } @@ -284,13 +284,13 @@ { Vcanna_ichiran_string = make_string (ks->gline.line, ks->gline.length); #ifndef CANNA_MULE - Vcanna_ichiran_length = ks->gline.length; - Vcanna_ichiran_revPos = ks->gline.revPos; - Vcanna_ichiran_revLen = ks->gline.revLen; + canna_ichiran_length = ks->gline.length; + canna_ichiran_revPos = ks->gline.revPos; + canna_ichiran_revLen = ks->gline.revLen; #else /* CANNA_MULE */ count_char (ks->gline.line, ks->gline.length, - ks->gline.revPos, ks->gline.revLen, &Vcanna_ichiran_length, - &Vcanna_ichiran_revPos, &Vcanna_ichiran_revLen); + ks->gline.revPos, ks->gline.revLen, &canna_ichiran_length, + &canna_ichiran_revPos, &canna_ichiran_revLen); #endif /* CANNA_MULE */ } @@ -302,8 +302,8 @@ } /* ¤½¤Î¾¤Î¾ðÊó */ - Vcanna_empty_info = (ks->info & KanjiEmptyInfo) ? 1 : 0; - Vcanna_through_info = (ks->info & KanjiThroughInfo) ? 1 : 0; + canna_empty_info = (ks->info & KanjiEmptyInfo) ? 1 : 0; + canna_through_info = (ks->info & KanjiThroughInfo) ? 1 : 0; } return val; @@ -440,7 +440,7 @@ jrKanjiControl (0, KC_INHIBITHANKAKUKANA, (char *) 1); #else /* mule ¤À¤Ã¤¿¤éȾ³Ñ¥«¥¿¥«¥Ê¤â»È¤¨¤ë */ - if (Vcanna_inhibit_hankakukana) + if (canna_inhibit_hankakukana) jrKanjiControl (0, KC_INHIBITHANKAKUKANA, (char *) 1); #endif jrKanjiControl (0, KC_YOMIINFO, (char *) 2); /* ¢¨£²: ¥í¡¼¥Þ»ú¤Þ¤ÇÊÖ¤¹ */ @@ -872,150 +872,149 @@ /* variables below this line is constants of Canna */ -static int Vcanna_mode_AlphaMode = IROHA_MODE_AlphaMode; -static int Vcanna_mode_EmptyMode = IROHA_MODE_EmptyMode; -static int Vcanna_mode_KigoMode = IROHA_MODE_KigoMode; -static int Vcanna_mode_YomiMode = IROHA_MODE_YomiMode; -static int Vcanna_mode_JishuMode = IROHA_MODE_JishuMode; -static int Vcanna_mode_TankouhoMode = IROHA_MODE_TankouhoMode; -static int Vcanna_mode_IchiranMode = IROHA_MODE_IchiranMode; -static int Vcanna_mode_YesNoMode = IROHA_MODE_YesNoMode; -static int Vcanna_mode_OnOffMode = IROHA_MODE_OnOffMode; +static int canna_mode_AlphaMode; +static int canna_mode_EmptyMode; +static int canna_mode_KigoMode; +static int canna_mode_YomiMode; +static int canna_mode_JishuMode; +static int canna_mode_TankouhoMode; +static int canna_mode_IchiranMode; +static int canna_mode_YesNoMode; +static int canna_mode_OnOffMode; #ifdef CANNA_MODE_AdjustBunsetsuMode -static int Vcanna_mode_AdjustBunsetsuMode = CANNA_MODE_AdjustBunsetsuMode; +static int canna_mode_AdjustBunsetsuMode; #endif #ifdef CANNA_MODE_ChikujiYomiMode -static int Vcanna_mode_ChikujiYomiMode = CANNA_MODE_ChikujiYomiMode; -static int Vcanna_mode_ChikujiTanMode = CANNA_MODE_ChikujiTanMode; +static int canna_mode_ChikujiYomiMode; +static int canna_mode_ChikujiTanMode; #endif -static int Vcanna_mode_HenkanMode = IROHA_MODE_HenkanMode; +static int canna_mode_HenkanMode; #ifdef CANNA_MODE_HenkanNyuryokuMode -static int Vcanna_mode_HenkanNyuryokuMode = CANNA_MODE_HenkanNyuryokuMode; +static int canna_mode_HenkanNyuryokuMode; #endif #ifdef CANNA_MODE_ZenHiraHenkanMode -static int Vcanna_mode_ZenHiraHenkanMode = CANNA_MODE_ZenHiraHenkanMode; +static int canna_mode_ZenHiraHenkanMode; #ifdef CANNA_MODE_HanHiraHenkanMode -static int Vcanna_mode_HanHiraHenkanMode = CANNA_MODE_HanHiraHenkanMode; +static int canna_mode_HanHiraHenkanMode; #endif -static int Vcanna_mode_ZenKataHenkanMode = CANNA_MODE_ZenKataHenkanMode; -static int Vcanna_mode_HanKataHenkanMode = CANNA_MODE_HanKataHenkanMode; -static int Vcanna_mode_ZenAlphaHenkanMode = CANNA_MODE_ZenAlphaHenkanMode; -static int Vcanna_mode_HanAlphaHenkanMode = CANNA_MODE_HanAlphaHenkanMode; +static int canna_mode_ZenKataHenkanMode; +static int canna_mode_HanKataHenkanMode; +static int canna_mode_ZenAlphaHenkanMode; +static int canna_mode_HanAlphaHenkanMode; #endif -static int Vcanna_mode_ZenHiraKakuteiMode = IROHA_MODE_ZenHiraKakuteiMode; +static int canna_mode_ZenHiraKakuteiMode; #ifdef CANNA_MODE_HanHiraKakuteiMode -static int Vcanna_mode_HanHiraKakuteiMode = CANNA_MODE_HanHiraKakuteiMode; +static int canna_mode_HanHiraKakuteiMode; #endif -static int Vcanna_mode_ZenKataKakuteiMode = IROHA_MODE_ZenKataKakuteiMode; -static int Vcanna_mode_HanKataKakuteiMode = IROHA_MODE_HanKataKakuteiMode; -static int Vcanna_mode_ZenAlphaKakuteiMode = IROHA_MODE_ZenAlphaKakuteiMode; -static int Vcanna_mode_HanAlphaKakuteiMode = IROHA_MODE_HanAlphaKakuteiMode; -static int Vcanna_mode_HexMode = IROHA_MODE_HexMode; -static int Vcanna_mode_BushuMode = IROHA_MODE_BushuMode; -static int Vcanna_mode_ExtendMode = IROHA_MODE_ExtendMode; -static int Vcanna_mode_RussianMode = IROHA_MODE_RussianMode; -static int Vcanna_mode_GreekMode = IROHA_MODE_GreekMode; -static int Vcanna_mode_LineMode = IROHA_MODE_LineMode; -static int Vcanna_mode_ChangingServerMode = IROHA_MODE_ChangingServerMode; -static int Vcanna_mode_HenkanMethodMode = IROHA_MODE_HenkanMethodMode; -static int Vcanna_mode_DeleteDicMode = IROHA_MODE_DeleteDicMode; -static int Vcanna_mode_TourokuMode = IROHA_MODE_TourokuMode; -static int Vcanna_mode_TourokuEmptyMode = IROHA_MODE_TourokuEmptyMode; -static int Vcanna_mode_TourokuHinshiMode = IROHA_MODE_TourokuHinshiMode; -static int Vcanna_mode_TourokuDicMode = IROHA_MODE_TourokuDicMode; -static int Vcanna_mode_QuotedInsertMode = IROHA_MODE_QuotedInsertMode; -static int Vcanna_mode_BubunMuhenkanMode = IROHA_MODE_BubunMuhenkanMode; -static int Vcanna_mode_MountDicMode = IROHA_MODE_MountDicMode; +static int canna_mode_ZenKataKakuteiMode; +static int canna_mode_HanKataKakuteiMode; +static int canna_mode_ZenAlphaKakuteiMode; +static int canna_mode_HanAlphaKakuteiMode; +static int canna_mode_HexMode; +static int canna_mode_BushuMode; +static int canna_mode_ExtendMode; +static int canna_mode_RussianMode; +static int canna_mode_GreekMode; +static int canna_mode_LineMode; +static int canna_mode_ChangingServerMode; +static int canna_mode_HenkanMethodMode; +static int canna_mode_DeleteDicMode; +static int canna_mode_TourokuMode; +static int canna_mode_TourokuEmptyMode; +static int canna_mode_TourokuHinshiMode; +static int canna_mode_TourokuDicMode; +static int canna_mode_QuotedInsertMode; +static int canna_mode_BubunMuhenkanMode; +static int canna_mode_MountDicMode; -static int Vcanna_fn_SelfInsert = IROHA_FN_SelfInsert; -static int Vcanna_fn_FunctionalInsert = IROHA_FN_FunctionalInsert; -static int Vcanna_fn_QuotedInsert = IROHA_FN_QuotedInsert; -static int Vcanna_fn_JapaneseMode = IROHA_FN_JapaneseMode; -static int Vcanna_fn_AlphaMode = IROHA_FN_AlphaMode; -static int Vcanna_fn_HenkanNyuryokuMode = IROHA_FN_HenkanNyuryokuMode; -static int Vcanna_fn_Forward = IROHA_FN_Forward; -static int Vcanna_fn_Backward = IROHA_FN_Backward; -static int Vcanna_fn_Next = IROHA_FN_Next; -static int Vcanna_fn_Prev = IROHA_FN_Prev; -static int Vcanna_fn_BeginningOfLine = IROHA_FN_BeginningOfLine; -static int Vcanna_fn_EndOfLine = IROHA_FN_EndOfLine; -static int Vcanna_fn_DeleteNext = IROHA_FN_DeleteNext; -static int Vcanna_fn_DeletePrevious = IROHA_FN_DeletePrevious; -static int Vcanna_fn_KillToEndOfLine = IROHA_FN_KillToEndOfLine; -static int Vcanna_fn_Henkan = IROHA_FN_Henkan; -static int Vcanna_fn_Kakutei = IROHA_FN_Kakutei; -static int Vcanna_fn_Extend = IROHA_FN_Extend; -static int Vcanna_fn_Shrink = IROHA_FN_Shrink; +static int canna_fn_SelfInsert; +static int canna_fn_FunctionalInsert; +static int canna_fn_QuotedInsert; +static int canna_fn_JapaneseMode; +static int canna_fn_AlphaMode; +static int canna_fn_HenkanNyuryokuMode; +static int canna_fn_Forward; +static int canna_fn_Backward; +static int canna_fn_Next; +static int canna_fn_Prev; +static int canna_fn_BeginningOfLine; +static int canna_fn_EndOfLine; +static int canna_fn_DeleteNext; +static int canna_fn_DeletePrevious; +static int canna_fn_KillToEndOfLine; +static int canna_fn_Henkan; +static int canna_fn_Kakutei; +static int canna_fn_Extend; +static int canna_fn_Shrink; #ifdef CANNA_FN_AdjustBunsetsu -static int Vcanna_fn_AdjustBunsetsu = CANNA_FN_AdjustBunsetsu; +static int canna_fn_AdjustBunsetsu; #endif -static int Vcanna_fn_Quit = IROHA_FN_Quit; -static int Vcanna_fn_ConvertAsHex = IROHA_FN_ConvertAsHex; -static int Vcanna_fn_ConvertAsBushu = IROHA_FN_ConvertAsBushu; -static int Vcanna_fn_KouhoIchiran = IROHA_FN_KouhoIchiran; -static int Vcanna_fn_BubunMuhenkan = IROHA_FN_BubunMuhenkan; -static int Vcanna_fn_Zenkaku = IROHA_FN_Zenkaku; -static int Vcanna_fn_Hankaku = IROHA_FN_Hankaku; -static int Vcanna_fn_ToUpper = IROHA_FN_ToUpper; -static int Vcanna_fn_Capitalize = IROHA_FN_Capitalize; -static int Vcanna_fn_ToLower = IROHA_FN_ToLower; -static int Vcanna_fn_Hiragana = IROHA_FN_Hiragana; -static int Vcanna_fn_Katakana = IROHA_FN_Katakana; -static int Vcanna_fn_Romaji = IROHA_FN_Romaji; +static int canna_fn_Quit; +static int canna_fn_ConvertAsHex; +static int canna_fn_ConvertAsBushu; +static int canna_fn_KouhoIchiran; +static int canna_fn_BubunMuhenkan; +static int canna_fn_Zenkaku; +static int canna_fn_Hankaku; +static int canna_fn_ToUpper; +static int canna_fn_Capitalize; +static int canna_fn_ToLower; +static int canna_fn_Hiragana; +static int canna_fn_Katakana; +static int canna_fn_Romaji; #ifdef CANNA_FN_BaseHiragana -static int Vcanna_fn_BaseHiragana = CANNA_FN_BaseHiragana; -static int Vcanna_fn_BaseKatakana = CANNA_FN_BaseKatakana; -static int Vcanna_fn_BaseEisu = CANNA_FN_BaseEisu; -static int Vcanna_fn_BaseZenkaku = CANNA_FN_BaseZenkaku; -static int Vcanna_fn_BaseHankaku = CANNA_FN_BaseHankaku; -static int Vcanna_fn_BaseKana = CANNA_FN_BaseKana; -static int Vcanna_fn_BaseKakutei = CANNA_FN_BaseKakutei; -static int Vcanna_fn_BaseHenkan = CANNA_FN_BaseHenkan; -static int Vcanna_fn_BaseHiraKataToggle = CANNA_FN_BaseHiraKataToggle; -static int Vcanna_fn_BaseZenHanToggle = CANNA_FN_BaseZenHanToggle; -static int Vcanna_fn_BaseKanaEisuToggle = CANNA_FN_BaseKanaEisuToggle; -static int Vcanna_fn_BaseKakuteiHenkanToggle = - CANNA_FN_BaseKakuteiHenkanToggle; -static int Vcanna_fn_BaseRotateForward = CANNA_FN_BaseRotateForward; -static int Vcanna_fn_BaseRotateBackward = CANNA_FN_BaseRotateBackward; +static int canna_fn_BaseHiragana; +static int canna_fn_BaseKatakana; +static int canna_fn_BaseEisu; +static int canna_fn_BaseZenkaku; +static int canna_fn_BaseHankaku; +static int canna_fn_BaseKana; +static int canna_fn_BaseKakutei; +static int canna_fn_BaseHenkan; +static int canna_fn_BaseHiraKataToggle; +static int canna_fn_BaseZenHanToggle; +static int canna_fn_BaseKanaEisuToggle; +static int canna_fn_BaseKakuteiHenkanToggle; +static int canna_fn_BaseRotateForward; +static int canna_fn_BaseRotateBackward; #endif -static int Vcanna_fn_ExtendMode = IROHA_FN_ExtendMode; -static int Vcanna_fn_Touroku = IROHA_FN_Touroku; -static int Vcanna_fn_HexMode = IROHA_FN_HexMode; -static int Vcanna_fn_BushuMode = IROHA_FN_BushuMode; -static int Vcanna_fn_KigouMode = IROHA_FN_KigouMode; +static int canna_fn_ExtendMode; +static int canna_fn_Touroku; +static int canna_fn_HexMode; +static int canna_fn_BushuMode; +static int canna_fn_KigouMode; #ifdef CANNA_FN_Mark -static int Vcanna_fn_Mark = CANNA_FN_Mark; +static int canna_fn_Mark; #endif #ifdef CANNA_FN_TemporalMode -static int Vcanna_fn_TemporalMode = CANNA_FN_TemporalMode; +static int canna_fn_TemporalMode; #endif -static int Vcanna_key_Nfer = IROHA_KEY_Nfer; -static int Vcanna_key_Xfer = IROHA_KEY_Xfer; -static int Vcanna_key_Up = IROHA_KEY_Up; -static int Vcanna_key_Left = IROHA_KEY_Left; -static int Vcanna_key_Right = IROHA_KEY_Right; -static int Vcanna_key_Down = IROHA_KEY_Down; -static int Vcanna_key_Insert = IROHA_KEY_Insert; -static int Vcanna_key_Rollup = IROHA_KEY_Rollup; -static int Vcanna_key_Rolldown = IROHA_KEY_Rolldown; -static int Vcanna_key_Home = IROHA_KEY_Home; -static int Vcanna_key_Help = IROHA_KEY_Help; -static int Vcanna_key_KP_Key = IROHA_KEY_KP_Key; -static int Vcanna_key_Shift_Nfer = IROHA_KEY_Shift_Nfer; -static int Vcanna_key_Shift_Xfer = IROHA_KEY_Shift_Xfer; -static int Vcanna_key_Shift_Up = IROHA_KEY_Shift_Up; -static int Vcanna_key_Shift_Left = IROHA_KEY_Shift_Left; -static int Vcanna_key_Shift_Right = IROHA_KEY_Shift_Right; -static int Vcanna_key_Shift_Down = IROHA_KEY_Shift_Down; -static int Vcanna_key_Cntrl_Nfer = IROHA_KEY_Cntrl_Nfer; -static int Vcanna_key_Cntrl_Xfer = IROHA_KEY_Cntrl_Xfer; -static int Vcanna_key_Cntrl_Up = IROHA_KEY_Cntrl_Up; -static int Vcanna_key_Cntrl_Left = IROHA_KEY_Cntrl_Left; -static int Vcanna_key_Cntrl_Right = IROHA_KEY_Cntrl_Right; -static int Vcanna_key_Cntrl_Down = IROHA_KEY_Cntrl_Down; +static int canna_key_Nfer; +static int canna_key_Xfer; +static int canna_key_Up; +static int canna_key_Left; +static int canna_key_Right; +static int canna_key_Down; +static int canna_key_Insert; +static int canna_key_Rollup; +static int canna_key_Rolldown; +static int canna_key_Home; +static int canna_key_Help; +static int canna_key_KP_Key; +static int canna_key_Shift_Nfer; +static int canna_key_Shift_Xfer; +static int canna_key_Shift_Up; +static int canna_key_Shift_Left; +static int canna_key_Shift_Right; +static int canna_key_Shift_Down; +static int canna_key_Cntrl_Nfer; +static int canna_key_Cntrl_Xfer; +static int canna_key_Cntrl_Up; +static int canna_key_Cntrl_Left; +static int canna_key_Cntrl_Right; +static int canna_key_Cntrl_Down; Lisp_Object VCANNA; /* by MORIOKA Tomohiko <morioka@jaist.ac.jp> 1996/6/7 */ @@ -1052,464 +1051,721 @@ DEFVAR_LISP ("canna-kakutei-string", &Vcanna_kakutei_string /* */ ); + Vcanna_kakutei_string = Qnil; + DEFVAR_LISP ("canna-kakutei-yomi", &Vcanna_kakutei_yomi /* */ ); + Vcanna_kakutei_yomi = Qnil; + DEFVAR_LISP ("canna-kakutei-romaji", &Vcanna_kakutei_romaji /* */ ); + Vcanna_kakutei_romaji = Qnil; + DEFVAR_LISP ("canna-henkan-string", &Vcanna_henkan_string /* */ ); - DEFVAR_INT ("canna-henkan-length", &Vcanna_henkan_length /* + Vcanna_henkan_string = Qnil; + + DEFVAR_INT ("canna-henkan-length", &canna_henkan_length /* */ ); - DEFVAR_INT ("canna-henkan-revpos", &Vcanna_henkan_revPos /* + canna_henkan_length = 0; + + DEFVAR_INT ("canna-henkan-revpos", &canna_henkan_revPos /* */ ); - DEFVAR_INT ("canna-henkan-revlen", &Vcanna_henkan_revLen /* + canna_henkan_revPos = 0; + + DEFVAR_INT ("canna-henkan-revlen", &canna_henkan_revLen /* */ ); + canna_henkan_revLen = 0; + DEFVAR_LISP ("canna-ichiran-string", &Vcanna_ichiran_string /* */ ); - DEFVAR_INT ("canna-ichiran-length", &Vcanna_ichiran_length /* + Vcanna_ichiran_string = Qnil; + + DEFVAR_INT ("canna-ichiran-length", &canna_ichiran_length /* */ ); - DEFVAR_INT ("canna-ichiran-revpos", &Vcanna_ichiran_revPos /* + canna_ichiran_length = 0; + + DEFVAR_INT ("canna-ichiran-revpos", &canna_ichiran_revPos /* */ ); - DEFVAR_INT ("canna-ichiran-revlen", &Vcanna_ichiran_revLen /* + canna_ichiran_revPos = 0; + + DEFVAR_INT ("canna-ichiran-revlen", &canna_ichiran_revLen /* */ ); + canna_ichiran_revLen = 0; + DEFVAR_LISP ("canna-mode-string", &Vcanna_mode_string /* */ ); + Vcanna_mode_string = Qnil; - DEFVAR_BOOL ("canna-empty-info", &Vcanna_empty_info /* + DEFVAR_BOOL ("canna-empty-info", &canna_empty_info /* For canna */ ); - DEFVAR_BOOL ("canna-through-info", &Vcanna_through_info /* + canna_empty_info = 0; + + DEFVAR_BOOL ("canna-through-info", &canna_through_info /* For canna */ ); - DEFVAR_BOOL ("canna-underline", &Vcanna_underline /* + canna_through_info = 0; + + DEFVAR_BOOL ("canna-underline", &canna_underline /* For canna */ ); - DEFVAR_BOOL ("canna-inhibit-hankakukana", &Vcanna_inhibit_hankakukana /* + canna_underline = 0; + + DEFVAR_BOOL ("canna-inhibit-hankakukana", &canna_inhibit_hankakukana /* For canna */ ); + canna_inhibit_hankakukana = 0; - DEFVAR_INT ("canna-mode-alpha-mode", &Vcanna_mode_AlphaMode /* + DEFVAR_INT ("canna-mode-alpha-mode", &canna_mode_AlphaMode /* */ ); - DEFVAR_INT ("canna-mode-empty-mode", &Vcanna_mode_EmptyMode /* + canna_mode_AlphaMode = IROHA_MODE_AlphaMode; + + DEFVAR_INT ("canna-mode-empty-mode", &canna_mode_EmptyMode /* */ ); - DEFVAR_INT ("canna-mode-kigo-mode", &Vcanna_mode_KigoMode /* + canna_mode_EmptyMode = IROHA_MODE_EmptyMode; + + DEFVAR_INT ("canna-mode-kigo-mode", &canna_mode_KigoMode /* */ ); - DEFVAR_INT ("canna-mode-yomi-mode", &Vcanna_mode_YomiMode /* + canna_mode_KigoMode = IROHA_MODE_KigoMode; + + DEFVAR_INT ("canna-mode-yomi-mode", &canna_mode_YomiMode /* */ ); - DEFVAR_INT ("canna-mode-jishu-mode", &Vcanna_mode_JishuMode /* + canna_mode_YomiMode = IROHA_MODE_YomiMode; -*/ ); - DEFVAR_INT ("canna-mode-tankouho-mode", &Vcanna_mode_TankouhoMode /* + DEFVAR_INT ("canna-mode-jishu-mode", &canna_mode_JishuMode /* */ ); - DEFVAR_INT ("canna-mode-ichiran-mode", &Vcanna_mode_IchiranMode /* + canna_mode_JishuMode = IROHA_MODE_JishuMode; + + DEFVAR_INT ("canna-mode-tankouho-mode", &canna_mode_TankouhoMode /* */ ); - DEFVAR_INT ("canna-mode-yes-no-mode", &Vcanna_mode_YesNoMode /* + canna_mode_TankouhoMode = IROHA_MODE_TankouhoMode; + + DEFVAR_INT ("canna-mode-ichiran-mode", &canna_mode_IchiranMode /* */ ); - DEFVAR_INT ("canna-mode-on-off-mode", &Vcanna_mode_OnOffMode /* + canna_mode_IchiranMode = IROHA_MODE_IchiranMode; + + DEFVAR_INT ("canna-mode-yes-no-mode", &canna_mode_YesNoMode /* */ ); + canna_mode_YesNoMode = IROHA_MODE_YesNoMode; + + DEFVAR_INT ("canna-mode-on-off-mode", &canna_mode_OnOffMode /* + +*/ ); + canna_mode_OnOffMode = IROHA_MODE_OnOffMode; + #ifdef CANNA_MODE_AdjustBunsetsuMode DEFVAR_INT ("canna-mode-adjust-bunsetsu-mode", - &Vcanna_mode_AdjustBunsetsuMode /* + &canna_mode_AdjustBunsetsuMode /* */ ); + canna_mode_AdjustBunsetsuMode = CANNA_MODE_AdjustBunsetsuMode; #endif #ifdef CANNA_MODE_ChikujiYomiMode - DEFVAR_INT ("canna-mode-chikuji-yomi-mode", &Vcanna_mode_ChikujiYomiMode /* + DEFVAR_INT ("canna-mode-chikuji-yomi-mode", &canna_mode_ChikujiYomiMode /* */ ); + canna_mode_ChikujiYomiMode = CANNA_MODE_ChikujiYomiMode; + DEFVAR_INT ("canna-mode-chikuji-bunsetsu-mode", - &Vcanna_mode_ChikujiTanMode /* + &canna_mode_ChikujiTanMode /* */ ); + canna_mode_ChikujiTanMode = CANNA_MODE_ChikujiTanMode; #endif - DEFVAR_INT ("canna-mode-henkan-mode", &Vcanna_mode_HenkanMode /* + DEFVAR_INT ("canna-mode-henkan-mode", &canna_mode_HenkanMode /* */ ); + canna_mode_HenkanMode = IROHA_MODE_HenkanMode; + #ifdef CANNA_MODE_HenkanNyuryokuMode DEFVAR_INT ("canna-mode-henkan-nyuuryoku-mode", - &Vcanna_mode_HenkanNyuryokuMode /* + &canna_mode_HenkanNyuryokuMode /* */ ); + canna_mode_HenkanNyuryokuMode = CANNA_MODE_HenkanNyuryokuMode; #endif #ifdef CANNA_MODE_ZenHiraHenkanMode DEFVAR_INT ("canna-mode-zen-hira-henkan-mode", - &Vcanna_mode_ZenHiraHenkanMode /* + &canna_mode_ZenHiraHenkanMode /* */ ); + canna_mode_ZenHiraHenkanMode = CANNA_MODE_ZenHiraHenkanMode; #ifdef CANNA_MODE_HanHiraHenkanMode DEFVAR_INT ("canna-mode-han-hira-henkan-mode", - &Vcanna_mode_HanHiraHenkanMode /* + &canna_mode_HanHiraHenkanMode /* */ ); + canna_mode_HanHiraHenkanMode = CANNA_MODE_HanHiraHenkanMode; #endif DEFVAR_INT ("canna-mode-zen-kata-henkan-mode", - &Vcanna_mode_ZenKataHenkanMode /* + &canna_mode_ZenKataHenkanMode /* */ ); + canna_mode_ZenKataHenkanMode = CANNA_MODE_ZenKataHenkanMode; + DEFVAR_INT ("canna-mode-han-kata-henkan-mode", - &Vcanna_mode_HanKataHenkanMode /* + &canna_mode_HanKataHenkanMode /* + +*/ ); + canna_mode_HanKataHenkanMode = CANNA_MODE_HanKataHenkanMode; + + DEFVAR_INT ("canna-mode-zen-alpha-henkan-mode", + &canna_mode_ZenAlphaHenkanMode /* */ ); - DEFVAR_INT ("canna-mode-zen-alpha-henkan-mode", - &Vcanna_mode_ZenAlphaHenkanMode /* + canna_mode_ZenAlphaHenkanMode = CANNA_MODE_ZenAlphaHenkanMode; + + DEFVAR_INT ("canna-mode-han-alpha-henkan-mode", + &canna_mode_HanAlphaHenkanMode /* */ ); - DEFVAR_INT ("canna-mode-han-alpha-henkan-mode", - &Vcanna_mode_HanAlphaHenkanMode /* - -*/ ); + canna_mode_HanAlphaHenkanMode = CANNA_MODE_HanAlphaHenkanMode; #endif DEFVAR_INT ("canna-mode-zen-hira-kakutei-mode", - &Vcanna_mode_ZenHiraKakuteiMode /* + &canna_mode_ZenHiraKakuteiMode /* */ ); + canna_mode_ZenHiraKakuteiMode = IROHA_MODE_ZenHiraKakuteiMode; #ifdef CANNA_MODE_HanHiraKakuteiMode DEFVAR_INT ("canna-mode-han-hira-kakutei-mode", - &Vcanna_mode_HanHiraKakuteiMode /* + &canna_mode_HanHiraKakuteiMode /* + +*/ ); + canna_mode_HanHiraKakuteiMode = CANNA_MODE_HanHiraKakuteiMode; +#endif + DEFVAR_INT ("canna-mode-zen-kata-kakutei-mode", + &canna_mode_ZenKataKakuteiMode /* */ ); -#endif - DEFVAR_INT ("canna-mode-zen-kata-kakutei-mode", - &Vcanna_mode_ZenKataKakuteiMode /* + canna_mode_ZenKataKakuteiMode = IROHA_MODE_ZenKataKakuteiMode; + + DEFVAR_INT ("canna-mode-han-kata-kakutei-mode", + &canna_mode_HanKataKakuteiMode /* + +*/ ); + canna_mode_HanKataKakuteiMode = IROHA_MODE_HanKataKakuteiMode; + + DEFVAR_INT ("canna-mode-zen-alpha-kakutei-mode", + &canna_mode_ZenAlphaKakuteiMode /* */ ); - DEFVAR_INT ("canna-mode-han-kata-kakutei-mode", - &Vcanna_mode_HanKataKakuteiMode /* + canna_mode_ZenAlphaKakuteiMode = IROHA_MODE_ZenAlphaKakuteiMode; + + DEFVAR_INT ("canna-mode-han-alpha-kakutei-mode", + &canna_mode_HanAlphaKakuteiMode /* */ ); - DEFVAR_INT ("canna-mode-zen-alpha-kakutei-mode", - &Vcanna_mode_ZenAlphaKakuteiMode /* + canna_mode_HanAlphaKakuteiMode = IROHA_MODE_HanAlphaKakuteiMode; + + DEFVAR_INT ("canna-mode-hex-mode", &canna_mode_HexMode /* + +*/ ); + canna_mode_HexMode = IROHA_MODE_HexMode; + + DEFVAR_INT ("canna-mode-bushu-mode", &canna_mode_BushuMode /* */ ); - DEFVAR_INT ("canna-mode-han-alpha-kakutei-mode", - &Vcanna_mode_HanAlphaKakuteiMode /* + canna_mode_BushuMode = IROHA_MODE_BushuMode; + + DEFVAR_INT ("canna-mode-extend-mode", &canna_mode_ExtendMode /* */ ); - DEFVAR_INT ("canna-mode-hex-mode", &Vcanna_mode_HexMode /* + canna_mode_ExtendMode = IROHA_MODE_ExtendMode; + + DEFVAR_INT ("canna-mode-russian-mode", &canna_mode_RussianMode /* */ ); - DEFVAR_INT ("canna-mode-bushu-mode", &Vcanna_mode_BushuMode /* + canna_mode_RussianMode = IROHA_MODE_RussianMode; + + DEFVAR_INT ("canna-mode-greek-mode", &canna_mode_GreekMode /* */ ); - DEFVAR_INT ("canna-mode-extend-mode", &Vcanna_mode_ExtendMode /* + canna_mode_GreekMode = IROHA_MODE_GreekMode; + + DEFVAR_INT ("canna-mode-line-mode", &canna_mode_LineMode /* */ ); - DEFVAR_INT ("canna-mode-russian-mode", &Vcanna_mode_RussianMode /* + canna_mode_LineMode = IROHA_MODE_LineMode; -*/ ); - DEFVAR_INT ("canna-mode-greek-mode", &Vcanna_mode_GreekMode /* + DEFVAR_INT ("canna-mode-changing-server-mode", + &canna_mode_ChangingServerMode /* */ ); - DEFVAR_INT ("canna-mode-line-mode", &Vcanna_mode_LineMode /* + canna_mode_ChangingServerMode = IROHA_MODE_ChangingServerMode; + + DEFVAR_INT ("canna-mode-henkan-method-mode", + &canna_mode_HenkanMethodMode /* */ ); - DEFVAR_INT ("canna-mode-changing-server-mode", - &Vcanna_mode_ChangingServerMode /* + canna_mode_HenkanMethodMode = IROHA_MODE_HenkanMethodMode; + + DEFVAR_INT ("canna-mode-delete-dic-mode", &canna_mode_DeleteDicMode /* */ ); - DEFVAR_INT ("canna-mode-henkan-method-mode", - &Vcanna_mode_HenkanMethodMode /* + canna_mode_DeleteDicMode = IROHA_MODE_DeleteDicMode; + + DEFVAR_INT ("canna-mode-touroku-mode", &canna_mode_TourokuMode /* */ ); - DEFVAR_INT ("canna-mode-delete-dic-mode", &Vcanna_mode_DeleteDicMode /* + canna_mode_TourokuMode = IROHA_MODE_TourokuMode; + + DEFVAR_INT ("canna-mode-touroku-empty-mode", + &canna_mode_TourokuEmptyMode /* */ ); - DEFVAR_INT ("canna-mode-touroku-mode", &Vcanna_mode_TourokuMode /* + canna_mode_TourokuEmptyMode = IROHA_MODE_TourokuEmptyMode; + + DEFVAR_INT ("canna-mode-touroku-hinshi-mode", + &canna_mode_TourokuHinshiMode /* */ ); - DEFVAR_INT ("canna-mode-touroku-empty-mode", - &Vcanna_mode_TourokuEmptyMode /* + canna_mode_TourokuHinshiMode = IROHA_MODE_TourokuHinshiMode; + + DEFVAR_INT ("canna-mode-touroku-dic-mode", &canna_mode_TourokuDicMode /* */ ); - DEFVAR_INT ("canna-mode-touroku-hinshi-mode", - &Vcanna_mode_TourokuHinshiMode /* + canna_mode_TourokuDicMode = IROHA_MODE_TourokuDicMode; + + DEFVAR_INT ("canna-mode-quoted-insert-mode", + &canna_mode_QuotedInsertMode /* */ ); - DEFVAR_INT ("canna-mode-touroku-dic-mode", &Vcanna_mode_TourokuDicMode /* + canna_mode_QuotedInsertMode = IROHA_MODE_QuotedInsertMode; + + DEFVAR_INT ("canna-mode-bubun-muhenkan-mode", + &canna_mode_BubunMuhenkanMode /* */ ); - DEFVAR_INT ("canna-mode-quoted-insert-mode", - &Vcanna_mode_QuotedInsertMode /* + canna_mode_BubunMuhenkanMode = IROHA_MODE_BubunMuhenkanMode; + + DEFVAR_INT ("canna-mode-mount-dic-mode", &canna_mode_MountDicMode /* */ ); - DEFVAR_INT ("canna-mode-bubun-muhenkan-mode", - &Vcanna_mode_BubunMuhenkanMode /* + canna_mode_MountDicMode = IROHA_MODE_MountDicMode; + + DEFVAR_INT ("canna-func-self-insert", &canna_fn_SelfInsert /* */ ); - DEFVAR_INT ("canna-mode-mount-dic-mode", &Vcanna_mode_MountDicMode /* + canna_fn_SelfInsert = IROHA_FN_SelfInsert; + + DEFVAR_INT ("canna-func-functional-insert", &canna_fn_FunctionalInsert /* + +*/ ); + canna_fn_FunctionalInsert = IROHA_FN_FunctionalInsert; + + DEFVAR_INT ("canna-func-quoted-insert", &canna_fn_QuotedInsert /* */ ); + canna_fn_QuotedInsert = IROHA_FN_QuotedInsert; - DEFVAR_INT ("canna-func-self-insert", &Vcanna_fn_SelfInsert /* + DEFVAR_INT ("canna-func-japanese-mode", &canna_fn_JapaneseMode /* */ ); - DEFVAR_INT ("canna-func-functional-insert", &Vcanna_fn_FunctionalInsert /* + canna_fn_JapaneseMode = IROHA_FN_JapaneseMode; + + DEFVAR_INT ("canna-func-alpha-mode", &canna_fn_AlphaMode /* */ ); - DEFVAR_INT ("canna-func-quoted-insert", &Vcanna_fn_QuotedInsert /* + canna_fn_AlphaMode = IROHA_FN_AlphaMode; + + DEFVAR_INT ("canna-func-henkan-nyuryoku-mode", + &canna_fn_HenkanNyuryokuMode /* */ ); - DEFVAR_INT ("canna-func-japanese-mode", &Vcanna_fn_JapaneseMode /* + canna_fn_HenkanNyuryokuMode = IROHA_FN_HenkanNyuryokuMode; -*/ ); - DEFVAR_INT ("canna-func-alpha-mode", &Vcanna_fn_AlphaMode /* + DEFVAR_INT ("canna-func-forward", &canna_fn_Forward /* */ ); - DEFVAR_INT ("canna-func-henkan-nyuryoku-mode", - &Vcanna_fn_HenkanNyuryokuMode /* + canna_fn_Forward = IROHA_FN_Forward; + + DEFVAR_INT ("canna-func-backward", &canna_fn_Backward /* */ ); - DEFVAR_INT ("canna-func-forward", &Vcanna_fn_Forward /* + canna_fn_Backward = IROHA_FN_Backward; + + DEFVAR_INT ("canna-func-next", &canna_fn_Next /* */ ); - DEFVAR_INT ("canna-func-backward", &Vcanna_fn_Backward /* + canna_fn_Next = IROHA_FN_Next; + + DEFVAR_INT ("canna-func-previous", &canna_fn_Prev /* */ ); - DEFVAR_INT ("canna-func-next", &Vcanna_fn_Next /* + canna_fn_Prev = IROHA_FN_Prev; + + DEFVAR_INT ("canna-func-beginning-of-line", &canna_fn_BeginningOfLine /* */ ); - DEFVAR_INT ("canna-func-previous", &Vcanna_fn_Prev /* + canna_fn_BeginningOfLine = IROHA_FN_BeginningOfLine; + + DEFVAR_INT ("canna-func-end-of-line", &canna_fn_EndOfLine /* */ ); - DEFVAR_INT ("canna-func-beginning-of-line", &Vcanna_fn_BeginningOfLine /* + canna_fn_EndOfLine = IROHA_FN_EndOfLine; + + DEFVAR_INT ("canna-func-delete-next", &canna_fn_DeleteNext /* */ ); - DEFVAR_INT ("canna-func-end-of-line", &Vcanna_fn_EndOfLine /* + canna_fn_DeleteNext = IROHA_FN_DeleteNext; + + DEFVAR_INT ("canna-func-delete_previous", &canna_fn_DeletePrevious /* */ ); - DEFVAR_INT ("canna-func-delete-next", &Vcanna_fn_DeleteNext /* + canna_fn_DeletePrevious = IROHA_FN_DeletePrevious; + + DEFVAR_INT ("canna-func-kill-to-end-of-line", &canna_fn_KillToEndOfLine /* */ ); - DEFVAR_INT ("canna-func-delete_previous", &Vcanna_fn_DeletePrevious /* + canna_fn_KillToEndOfLine = IROHA_FN_KillToEndOfLine; + + DEFVAR_INT ("canna-func-henkan", &canna_fn_Henkan /* */ ); - DEFVAR_INT ("canna-func-kill-to-end-of-line", &Vcanna_fn_KillToEndOfLine /* + canna_fn_Henkan = IROHA_FN_Henkan; + + DEFVAR_INT ("canna-func-kakutei", &canna_fn_Kakutei /* */ ); - DEFVAR_INT ("canna-func-henkan", &Vcanna_fn_Henkan /* + canna_fn_Kakutei = IROHA_FN_Kakutei; + + DEFVAR_INT ("canna-func-extend", &canna_fn_Extend /* */ ); - DEFVAR_INT ("canna-func-kakutei", &Vcanna_fn_Kakutei /* + canna_fn_Extend = IROHA_FN_Extend; + + DEFVAR_INT ("canna-func-shrink", &canna_fn_Shrink /* */ ); - DEFVAR_INT ("canna-func-extend", &Vcanna_fn_Extend /* + canna_fn_Shrink = IROHA_FN_Shrink; -*/ ); - DEFVAR_INT ("canna-func-shrink", &Vcanna_fn_Shrink /* +#ifdef CANNA_FN_AdjustBunsetsu + DEFVAR_INT ("canna-func-adjust-bunsetsu", &canna_fn_AdjustBunsetsu /* */ ); -#ifdef CANNA_FN_AdjustBunsetsu - DEFVAR_INT ("canna-func-adjust-bunsetsu", &Vcanna_fn_AdjustBunsetsu /* + canna_fn_AdjustBunsetsu = CANNA_FN_AdjustBunsetsu; +#endif + DEFVAR_INT ("canna-func-quit", &canna_fn_Quit /* */ ); -#endif - DEFVAR_INT ("canna-func-quit", &Vcanna_fn_Quit /* + canna_fn_Quit = IROHA_FN_Quit; + + DEFVAR_INT ("canna-func-convert-as-hex", &canna_fn_ConvertAsHex /* */ ); - DEFVAR_INT ("canna-func-convert-as-hex", &Vcanna_fn_ConvertAsHex /* + canna_fn_ConvertAsHex = IROHA_FN_ConvertAsHex; + + DEFVAR_INT ("canna-func-convert-as-bushu", &canna_fn_ConvertAsBushu /* */ ); - DEFVAR_INT ("canna-func-convert-as-bushu", &Vcanna_fn_ConvertAsBushu /* + canna_fn_ConvertAsBushu = IROHA_FN_ConvertAsBushu; + + DEFVAR_INT ("canna-func-kouho-ichiran", &canna_fn_KouhoIchiran /* */ ); - DEFVAR_INT ("canna-func-kouho-ichiran", &Vcanna_fn_KouhoIchiran /* + canna_fn_KouhoIchiran = IROHA_FN_KouhoIchiran; + + DEFVAR_INT ("canna-func-bubun-muhenkan", &canna_fn_BubunMuhenkan /* */ ); - DEFVAR_INT ("canna-func-bubun-muhenkan", &Vcanna_fn_BubunMuhenkan /* + canna_fn_BubunMuhenkan = IROHA_FN_BubunMuhenkan; -*/ ); - DEFVAR_INT ("canna-func-zenkaku", &Vcanna_fn_Zenkaku /* + DEFVAR_INT ("canna-func-zenkaku", &canna_fn_Zenkaku /* */ ); - DEFVAR_INT ("canna-func-hankaku", &Vcanna_fn_Hankaku /* + canna_fn_Zenkaku = IROHA_FN_Zenkaku; + + DEFVAR_INT ("canna-func-hankaku", &canna_fn_Hankaku /* */ ); - DEFVAR_INT ("canna-func-to-upper", &Vcanna_fn_ToUpper /* + canna_fn_Hankaku = IROHA_FN_Hankaku; + + DEFVAR_INT ("canna-func-to-upper", &canna_fn_ToUpper /* */ ); - DEFVAR_INT ("canna-func-capitalize", &Vcanna_fn_Capitalize /* + canna_fn_ToUpper = IROHA_FN_ToUpper; + + DEFVAR_INT ("canna-func-capitalize", &canna_fn_Capitalize /* */ ); - DEFVAR_INT ("canna-func-to-lower", &Vcanna_fn_ToLower /* + canna_fn_Capitalize = IROHA_FN_Capitalize; + + DEFVAR_INT ("canna-func-to-lower", &canna_fn_ToLower /* */ ); - DEFVAR_INT ("canna-func-hiragana", &Vcanna_fn_Hiragana /* + canna_fn_ToLower = IROHA_FN_ToLower; + + DEFVAR_INT ("canna-func-hiragana", &canna_fn_Hiragana /* */ ); - DEFVAR_INT ("canna-func-katakana", &Vcanna_fn_Katakana /* + canna_fn_Hiragana = IROHA_FN_Hiragana; + + DEFVAR_INT ("canna-func-katakana", &canna_fn_Katakana /* */ ); - DEFVAR_INT ("canna-func-romaji", &Vcanna_fn_Romaji /* + canna_fn_Katakana = IROHA_FN_Katakana; + + DEFVAR_INT ("canna-func-romaji", &canna_fn_Romaji /* */ ); + canna_fn_Romaji = IROHA_FN_Romaji; + #ifdef CANNA_FN_BaseHiragana - DEFVAR_INT ("canna-func-base-hiragana", &Vcanna_fn_BaseHiragana /* + DEFVAR_INT ("canna-func-base-hiragana", &canna_fn_BaseHiragana /* */ ); - DEFVAR_INT ("canna-func-base-katakana", &Vcanna_fn_BaseKatakana /* + canna_fn_BaseHiragana = CANNA_FN_BaseHiragana; + + DEFVAR_INT ("canna-func-base-katakana", &canna_fn_BaseKatakana /* */ ); - DEFVAR_INT ("canna-func-base-eisu", &Vcanna_fn_BaseEisu /* + canna_fn_BaseKatakana = CANNA_FN_BaseKatakana; + + DEFVAR_INT ("canna-func-base-eisu", &canna_fn_BaseEisu /* */ ); - DEFVAR_INT ("canna-func-base-zenkaku", &Vcanna_fn_BaseZenkaku /* + canna_fn_BaseEisu = CANNA_FN_BaseEisu; + + DEFVAR_INT ("canna-func-base-zenkaku", &canna_fn_BaseZenkaku /* */ ); - DEFVAR_INT ("canna-func-base-hankaku", &Vcanna_fn_BaseHankaku /* + canna_fn_BaseZenkaku = CANNA_FN_BaseZenkaku; + + DEFVAR_INT ("canna-func-base-hankaku", &canna_fn_BaseHankaku /* */ ); - DEFVAR_INT ("canna-func-base-kana", &Vcanna_fn_BaseKana /* + canna_fn_BaseHankaku = CANNA_FN_BaseHankaku; + + DEFVAR_INT ("canna-func-base-kana", &canna_fn_BaseKana /* */ ); - DEFVAR_INT ("canna-func-base-kakutei", &Vcanna_fn_BaseKakutei /* + canna_fn_BaseKana = CANNA_FN_BaseKana; + + DEFVAR_INT ("canna-func-base-kakutei", &canna_fn_BaseKakutei /* */ ); - DEFVAR_INT ("canna-func-base-henkan", &Vcanna_fn_BaseHenkan /* + canna_fn_BaseKakutei = CANNA_FN_BaseKakutei; + + DEFVAR_INT ("canna-func-base-henkan", &canna_fn_BaseHenkan /* */ ); + canna_fn_BaseHenkan = CANNA_FN_BaseHenkan; + DEFVAR_INT ("canna-func-base-hiragana-katakana-toggle", - &Vcanna_fn_BaseHiraKataToggle /* + &canna_fn_BaseHiraKataToggle /* */ ); + canna_fn_BaseHiraKataToggle = CANNA_FN_BaseHiraKataToggle; + DEFVAR_INT ("canna-func-base-zenkaku-hankaku-toggle", - &Vcanna_fn_BaseZenHanToggle /* + &canna_fn_BaseZenHanToggle /* */ ); + canna_fn_BaseZenHanToggle = CANNA_FN_BaseZenHanToggle; + DEFVAR_INT ("canna-func-base-kana-eisu-toggle", - &Vcanna_fn_BaseKanaEisuToggle /* + &canna_fn_BaseKanaEisuToggle /* */ ); + canna_fn_BaseKanaEisuToggle = CANNA_FN_BaseKanaEisuToggle; + DEFVAR_INT ("canna-func-base-kakutei-henkan-toggle", - &Vcanna_fn_BaseKakuteiHenkanToggle /* + &canna_fn_BaseKakuteiHenkanToggle /* */ ); + canna_fn_BaseKakuteiHenkanToggle = CANNA_FN_BaseKakuteiHenkanToggle; + DEFVAR_INT ("canna-func-base-rotate-forward", - &Vcanna_fn_BaseRotateForward /* + &canna_fn_BaseRotateForward /* */ ); + canna_fn_BaseRotateForward = CANNA_FN_BaseRotateForward; + DEFVAR_INT ("canna-func-base-rotate-backward", - &Vcanna_fn_BaseRotateBackward /* + &canna_fn_BaseRotateBackward /* */ ); + canna_fn_BaseRotateBackward = CANNA_FN_BaseRotateBackward; + #endif - DEFVAR_INT ("canna-func-extend-mode", &Vcanna_fn_ExtendMode /* + DEFVAR_INT ("canna-func-extend-mode", &canna_fn_ExtendMode /* */ ); - DEFVAR_INT ("canna-func-touroku", &Vcanna_fn_Touroku /* + canna_fn_ExtendMode = IROHA_FN_ExtendMode; + + DEFVAR_INT ("canna-func-touroku", &canna_fn_Touroku /* */ ); - DEFVAR_INT ("canna-func-hex-mode", &Vcanna_fn_HexMode /* + canna_fn_Touroku = IROHA_FN_Touroku; + + DEFVAR_INT ("canna-func-hex-mode", &canna_fn_HexMode /* */ ); - DEFVAR_INT ("canna-func-bushu-mode", &Vcanna_fn_BushuMode /* + canna_fn_HexMode = IROHA_FN_HexMode; + + DEFVAR_INT ("canna-func-bushu-mode", &canna_fn_BushuMode /* */ ); - DEFVAR_INT ("canna-func-kigo-mode", &Vcanna_fn_KigouMode /* + canna_fn_BushuMode = IROHA_FN_BushuMode; + + DEFVAR_INT ("canna-func-kigo-mode", &canna_fn_KigouMode /* + +*/ ); + canna_fn_KigouMode = IROHA_FN_KigouMode; + +#ifdef CANNA_FN_Mark + DEFVAR_INT ("canna-func-mark", &canna_fn_Mark /* */ ); -#ifdef CANNA_FN_Mark - DEFVAR_INT ("canna-func-mark", &Vcanna_fn_Mark /* - -*/ ); + canna_fn_Mark = CANNA_FN_Mark; #endif #ifdef CANNA_FN_TemporalMode - DEFVAR_INT ("canna-func-temporal-mode", &Vcanna_fn_TemporalMode /* + DEFVAR_INT ("canna-func-temporal-mode", &canna_fn_TemporalMode /* */ ); + canna_fn_TemporalMode = CANNA_FN_TemporalMode; #endif - DEFVAR_INT ("canna-key-nfer", &Vcanna_key_Nfer /* + DEFVAR_INT ("canna-key-nfer", &canna_key_Nfer /* + +*/ ); + canna_key_Nfer = IROHA_KEY_Nfer; + + DEFVAR_INT ("canna-key-xfer", &canna_key_Xfer /* */ ); - DEFVAR_INT ("canna-key-xfer", &Vcanna_key_Xfer /* + canna_key_Xfer = IROHA_KEY_Xfer; + + DEFVAR_INT ("canna-key-up", &canna_key_Up /* */ ); - DEFVAR_INT ("canna-key-up", &Vcanna_key_Up /* + canna_key_Up = IROHA_KEY_Up; + + DEFVAR_INT ("canna-key-left", &canna_key_Left /* */ ); - DEFVAR_INT ("canna-key-left", &Vcanna_key_Left /* + canna_key_Left = IROHA_KEY_Left; + + DEFVAR_INT ("canna-key-right", &canna_key_Right /* */ ); - DEFVAR_INT ("canna-key-right", &Vcanna_key_Right /* + canna_key_Right = IROHA_KEY_Right; -*/ ); - DEFVAR_INT ("canna-key-down", &Vcanna_key_Down /* + DEFVAR_INT ("canna-key-down", &canna_key_Down /* */ ); - DEFVAR_INT ("canna-key-insert", &Vcanna_key_Insert /* + canna_key_Down = IROHA_KEY_Down; + + DEFVAR_INT ("canna-key-insert", &canna_key_Insert /* */ ); - DEFVAR_INT ("canna-key-rollup", &Vcanna_key_Rollup /* + canna_key_Insert = IROHA_KEY_Insert; + + DEFVAR_INT ("canna-key-rollup", &canna_key_Rollup /* */ ); - DEFVAR_INT ("canna-key-rolldown", &Vcanna_key_Rolldown /* + canna_key_Rollup = IROHA_KEY_Rollup; + + DEFVAR_INT ("canna-key-rolldown", &canna_key_Rolldown /* */ ); - DEFVAR_INT ("canna-key-home", &Vcanna_key_Home /* + canna_key_Rolldown = IROHA_KEY_Rolldown; + + DEFVAR_INT ("canna-key-home", &canna_key_Home /* */ ); - DEFVAR_INT ("canna-key-help", &Vcanna_key_Help /* + canna_key_Home = IROHA_KEY_Home; + + DEFVAR_INT ("canna-key-help", &canna_key_Help /* */ ); - DEFVAR_INT ("canna-key-kp-key", &Vcanna_key_KP_Key /* + canna_key_Help = IROHA_KEY_Help; + + DEFVAR_INT ("canna-key-kp-key", &canna_key_KP_Key /* */ ); - DEFVAR_INT ("canna-key-shift-nfer", &Vcanna_key_Shift_Nfer /* + canna_key_KP_Key = IROHA_KEY_KP_Key; + + DEFVAR_INT ("canna-key-shift-nfer", &canna_key_Shift_Nfer /* */ ); - DEFVAR_INT ("canna-key-shift-xfer", &Vcanna_key_Shift_Xfer /* + canna_key_Shift_Nfer = IROHA_KEY_Shift_Nfer; + + DEFVAR_INT ("canna-key-shift-xfer", &canna_key_Shift_Xfer /* */ ); - DEFVAR_INT ("canna-key-shift-up", &Vcanna_key_Shift_Up /* + canna_key_Shift_Xfer = IROHA_KEY_Shift_Xfer; + + DEFVAR_INT ("canna-key-shift-up", &canna_key_Shift_Up /* */ ); - DEFVAR_INT ("canna-key-shift-left", &Vcanna_key_Shift_Left /* + canna_key_Shift_Up = IROHA_KEY_Shift_Up; + + DEFVAR_INT ("canna-key-shift-left", &canna_key_Shift_Left /* */ ); - DEFVAR_INT ("canna-key-shift-right", &Vcanna_key_Shift_Right /* + canna_key_Shift_Left = IROHA_KEY_Shift_Left; + + DEFVAR_INT ("canna-key-shift-right", &canna_key_Shift_Right /* */ ); - DEFVAR_INT ("canna-key-shift-down", &Vcanna_key_Shift_Down /* + canna_key_Shift_Right = IROHA_KEY_Shift_Right; + + DEFVAR_INT ("canna-key-shift-down", &canna_key_Shift_Down /* */ ); - DEFVAR_INT ("canna-key-control-nfer", &Vcanna_key_Cntrl_Nfer /* + canna_key_Shift_Down = IROHA_KEY_Shift_Down; + + DEFVAR_INT ("canna-key-control-nfer", &canna_key_Cntrl_Nfer /* */ ); - DEFVAR_INT ("canna-key-control-xfer", &Vcanna_key_Cntrl_Xfer /* + canna_key_Cntrl_Nfer = IROHA_KEY_Cntrl_Nfer; + + DEFVAR_INT ("canna-key-control-xfer", &canna_key_Cntrl_Xfer /* */ ); - DEFVAR_INT ("canna-key-control-up", &Vcanna_key_Cntrl_Up /* + canna_key_Cntrl_Xfer = IROHA_KEY_Cntrl_Xfer; + + DEFVAR_INT ("canna-key-control-up", &canna_key_Cntrl_Up /* */ ); - DEFVAR_INT ("canna-key-control-left", &Vcanna_key_Cntrl_Left /* + canna_key_Cntrl_Up = IROHA_KEY_Cntrl_Up; + + DEFVAR_INT ("canna-key-control-left", &canna_key_Cntrl_Left /* */ ); - DEFVAR_INT ("canna-key-control-right", &Vcanna_key_Cntrl_Right /* + canna_key_Cntrl_Left = IROHA_KEY_Cntrl_Left; + + DEFVAR_INT ("canna-key-control-right", &canna_key_Cntrl_Right /* */ ); - DEFVAR_INT ("canna-key-control-down", &Vcanna_key_Cntrl_Down /* + canna_key_Cntrl_Right = IROHA_KEY_Cntrl_Right; + + DEFVAR_INT ("canna-key-control-down", &canna_key_Cntrl_Down /* */ ); + canna_key_Cntrl_Down = IROHA_KEY_Cntrl_Down; Fprovide(intern("CANNA")); }
--- a/src/ntproc.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/ntproc.c Mon Aug 13 11:04:06 2007 +0200 @@ -132,6 +132,8 @@ xzero (*cp); cp->fd = -1; cp->pid = -1; + if (cp->procinfo.hProcess) + CloseHandle(cp->procinfo.hProcess); cp->procinfo.hProcess = NULL; cp->status = STATUS_READ_ERROR; @@ -234,10 +236,19 @@ /* Our identity */ cp = (child_process *)arg; - /* We have to wait for the go-ahead before we can start */ + /* <matts@tibco.com> - I think the test below is wrong - we don't + want to wait for someone to signal char_consumed, as we haven't + read anything for them to consume yet! */ + + /* if (cp == NULL || WaitForSingleObject (cp->char_consumed, INFINITE) != WAIT_OBJECT_0) - return 1; + */ + + if (cp == NULL) + { + return 1; + } for (;;) { @@ -255,7 +266,28 @@ } if (rc == STATUS_READ_ERROR) - return 1; + { + /* We are finished, so clean up handles and set to NULL so + that CHILD_ACTIVE will see what is going on */ + if (cp->char_avail) { + CloseHandle (cp->char_avail); + cp->char_avail = NULL; + } + if (cp->thrd) { + CloseHandle (cp->thrd); + cp->thrd = NULL; + } + if (cp->char_consumed) { + CloseHandle(cp->char_consumed); + cp->char_consumed = NULL; + } + if (cp->procinfo.hProcess) + { + CloseHandle (cp->procinfo.hProcess); + cp->procinfo.hProcess=NULL; + } + return 1; + } /* If the read died, the child has died so let the thread die */ if (rc == STATUS_READ_FAILED) @@ -269,6 +301,26 @@ break; } } + /* We are finished, so clean up handles and set to NULL so that + CHILD_ACTIVE will see what is going on */ + if (cp->char_avail) { + CloseHandle (cp->char_avail); + cp->char_avail = NULL; + } + if (cp->thrd) { + CloseHandle (cp->thrd); + cp->thrd = NULL; + } + if (cp->char_consumed) { + CloseHandle(cp->char_consumed); + cp->char_consumed = NULL; + } + if (cp->procinfo.hProcess) + { + CloseHandle (cp->procinfo.hProcess); + cp->procinfo.hProcess=NULL; + } + return 0; } @@ -325,6 +377,11 @@ cp->pid = (int) cp->procinfo.dwProcessId; + CloseHandle (cp->procinfo.hThread); + CloseHandle (cp->procinfo.hProcess); + cp->procinfo.hThread=NULL; + cp->procinfo.hProcess=NULL; + /* Hack for Windows 95, which assigns large (ie negative) pids */ if (cp->pid < 0) cp->pid = -cp->pid;
--- a/src/objects-msw.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/objects-msw.c Mon Aug 13 11:04:06 2007 +0200 @@ -51,12 +51,14 @@ #ifdef __CYGWIN32__ #define stricmp strcasecmp +#define FONTENUMPROC FONTENUMEXPROC +#define ntmTm ntmentm #endif typedef struct colormap_t { - char *name; - COLORREF colorref; + CONST char *name; + CONST COLORREF colorref; } colormap_t; /* Colors from X11R6 "XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp" */ @@ -721,6 +723,58 @@ {"LightGreen" , PALETTERGB (144, 238, 144) } }; + +typedef struct fontmap_t +{ + CONST char *name; + CONST int value; +} fontmap_t; + +/* Default weight first, preferred names listed before synonyms */ +static CONST fontmap_t fontweight_map[] = +{ + {"Regular" , FW_REGULAR}, /* The standard font weight */ + {"Thin" , FW_THIN}, + {"Extra Light" , FW_EXTRALIGHT}, + {"Ultra Light" , FW_ULTRALIGHT}, + {"Light" , FW_LIGHT}, + {"Normal" , FW_NORMAL}, + {"Medium" , FW_MEDIUM}, + {"Semi Bold" , FW_SEMIBOLD}, + {"Demi Bold" , FW_DEMIBOLD}, + {"Bold" , FW_BOLD}, /* The standard bold font weight */ + {"Extra Bold" , FW_EXTRABOLD}, + {"Ultra Bold" , FW_ULTRABOLD}, + {"Heavy" , FW_HEAVY}, + {"Black" , FW_BLACK} +}; + +/* Default charset first, no synonyms allowed because these names are + * matched against the names reported by win32 by match_font() */ +static CONST fontmap_t charset_map[] = +{ + {"Western" , ANSI_CHARSET}, + {"Symbol" , SYMBOL_CHARSET}, + {"Shift JIS" , SHIFTJIS_CHARSET}, /* #### Name to be verified */ + {"GB2312" , GB2312_CHARSET}, /* #### Name to be verified */ + {"Hanguel" , HANGEUL_CHARSET}, + {"Chinese Big 5" , CHINESEBIG5_CHARSET}, /* #### Name to be verified */ +#if (WINVER >= 0x0400) + {"Johab" , JOHAB_CHARSET}, /* #### Name to be verified */ + {"Hebrew" , HEBREW_CHARSET}, /* #### Name to be verified */ + {"Arabic" , ARABIC_CHARSET}, /* #### Name to be verified */ + {"Greek" , GREEK_CHARSET}, + {"Turkish" , TURKISH_CHARSET}, + {"Vietnamese" , VIETNAMESE_CHARSET}, /* #### Name to be verified */ + {"Thai" , THAI_CHARSET}, /* #### Name to be verified */ + {"Central European" , EASTEUROPE_CHARSET}, + {"Cyrillic" , RUSSIAN_CHARSET}, + {"Mac" , MAC_CHARSET}, + {"Baltic" , BALTIC_CHARSET}, +#endif + {"OEM/DOS" , OEM_CHARSET} +}; + /************************************************************************/ /* helpers */ @@ -872,6 +926,120 @@ return 1; } + + + + +/************************************************************************/ +/* exports */ +/************************************************************************/ + +struct font_enum_t +{ + HDC hdc; + struct device *d; +}; + +static int CALLBACK +font_enum_callback_2 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, + int FontType, struct font_enum_t *font_enum) +{ + struct mswindows_font_enum *fontlist, **fonthead; + char fontname[MSW_FONTSIZE]; + int i; + + /* + * The enumerated font weights are not to be trusted because: + * a) lpelfe->elfStyle is only filled in for TrueType fonts. + * b) Not all Bold and Italic styles of all fonts (inluding some Vector, + * Truetype and Raster fonts) are enumerated. + * I guess that fonts for which Bold and Italic styles are generated + * 'on-the-fly' are not enumerated. It would be overly restrictive to + * disallow Bold And Italic weights for these fonts, so we just leave + * weights unspecified. This means that we have to weed out duplicates of + * those fonts that do get enumerated with different weights. + */ + if (FontType == 0 /*vector*/ || FontType == TRUETYPE_FONTTYPE) + /* Scalable, so leave pointsize blank */ + sprintf (fontname, "%s::::", lpelfe->elfLogFont.lfFaceName); + else + /* Formula for pointsize->height from LOGFONT docs in Platform SDK */ + sprintf (fontname, "%s::%d::", lpelfe->elfLogFont.lfFaceName, + MulDiv (lpntme->ntmTm.tmHeight - lpntme->ntmTm.tmInternalLeading, + 72, DEVICE_MSWINDOWS_LOGPIXELSY (font_enum->d))); + + /* + * The enumerated font character set strings are not to be trusted because + * lpelfe->elfScript is returned in the host language and not in English. + * We can't know a priori the translations of "Western", "Central European" + * etc into the host language, so we must use English. The same argument + * applies to the font weight string when matching fonts. + */ + for (i=0; i<countof (charset_map); i++) + if (lpelfe->elfLogFont.lfCharSet == charset_map[i].value) + { + strcat (fontname, charset_map[i].name); + break; + } + if (i==countof (charset_map)) + strcpy (fontname, charset_map[0].name); + + /* Check that the new font is not a duplicate */ + fonthead = &DEVICE_MSWINDOWS_FONTLIST (font_enum->d); + fontlist = *fonthead; + while (fontlist) + if (!strcmp (fontname, fontlist->fontname)) + return 1; /* found a duplicate */ + else + fontlist = fontlist->next; + + /* Insert entry at head */ + fontlist = *fonthead; + *fonthead = xmalloc (sizeof (struct mswindows_font_enum)); + if (*fonthead == NULL) + { + *fonthead = fontlist; + return 0; + } + strcpy ((*fonthead)->fontname, fontname); + (*fonthead)->next = fontlist; + return 1; +} + +static int CALLBACK +font_enum_callback_1 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, + int FontType, struct font_enum_t *font_enum) +{ + /* This function gets called once per facename per character set. + * We call a second callback to enumerate the fonts in each facename */ + return EnumFontFamiliesEx (font_enum->hdc, &lpelfe->elfLogFont, + (FONTENUMPROC) font_enum_callback_2, + (LPARAM) font_enum, 0); +} + +/* + * Enumerate the available fonts. Called by mswindows_init_device(). + * Fills in the device's device-type-specfic fontlist. + */ +void +mswindows_enumerate_fonts (struct device *d) +{ + HDC hdc = CreateCompatibleDC (NULL); + LOGFONT logfont; + struct font_enum_t font_enum; + + assert (hdc!=NULL); + logfont.lfCharSet = DEFAULT_CHARSET; + logfont.lfFaceName[0] = '\0'; + logfont.lfPitchAndFamily = DEFAULT_PITCH; + font_enum.hdc = hdc; + font_enum.d = d; + DEVICE_MSWINDOWS_FONTLIST (d) = NULL; + EnumFontFamiliesEx (hdc, &logfont, (FONTENUMPROC) font_enum_callback_1, + (LPARAM) (&font_enum), 0); + DeleteDC (hdc); +} + /************************************************************************/ /* methods */ @@ -970,19 +1138,23 @@ } } + static int mswindows_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object name, Lisp_Object device, Error_behavior errb) { CONST char *extname; LOGFONT logfont; - int fields; + int fields, i; int pt; char fontname[LF_FACESIZE], weight[LF_FACESIZE], *style, points[8]; char effects[LF_FACESIZE], charset[LF_FACESIZE]; char *c; - - GET_C_STRING_CTEXT_DATA_ALLOCA (f->name, extname); + HDC hdc; + HFONT holdfont; + TEXTMETRIC metrics; + + extname = XSTRING_DATA (name); /* * mswindows fonts look like: @@ -1003,12 +1175,12 @@ /* This function is implemented in a fairly ad-hoc manner. * The general idea is to validate and canonicalize each of the above fields * at the same time as we build up the win32 LOGFONT structure. This enables - * us to use math_font() on a canonicalized font string to check the + * us to use match_font() on a canonicalized font string to check the * availability of the requested font */ - if (fields<0) + if (fields < 0) { - maybe_signal_simple_error ("Invalid font", f->name, Qfont, errb); + maybe_signal_simple_error ("Invalid font", name, Qfont, errb); return (0); } @@ -1019,13 +1191,13 @@ } else { - maybe_signal_simple_error ("Must specify a font name", f->name, Qfont, errb); + maybe_signal_simple_error ("Must specify a font name", name, Qfont, errb); return (0); } /* weight */ if (fields < 2) - strcpy (weight, "Regular"); + strcpy (weight, fontweight_map[0].name); /* Maybe split weight into weight and style */ if ((c=strchr(weight, ' '))) @@ -1036,36 +1208,25 @@ else style = NULL; -#define FROB(wgt) \ - if (stricmp (weight, #wgt) == 0) \ - logfont.lfWeight = FW_##wgt - - FROB (REGULAR); - else FROB (THIN); - else FROB (EXTRALIGHT); - else FROB (ULTRALIGHT); - else FROB (LIGHT); - else FROB (NORMAL); - else FROB (MEDIUM); - else FROB (SEMIBOLD); - else FROB (DEMIBOLD); - else FROB (BOLD); - else FROB (EXTRABOLD); - else FROB (ULTRABOLD); - else FROB (HEAVY); - else FROB (BLACK); - else if (!style) + for (i=0; i<countof (fontweight_map); i++) + if (!stricmp (weight, fontweight_map[i].name)) + { + logfont.lfWeight = fontweight_map[i].value; + break; + } + if (i == countof (fontweight_map)) /* No matching weight */ { - logfont.lfWeight = FW_REGULAR; - style = weight; /* May have specified style without weight */ + if (!style) + { + logfont.lfWeight = FW_REGULAR; + style = weight; /* May have specified style without weight */ + } + else + { + maybe_signal_simple_error ("Invalid font weight", name, Qfont, errb); + return (0); + } } - else - { - maybe_signal_simple_error ("Invalid font weight", f->name, Qfont, errb); - return (0); - } - -#undef FROB if (style) { @@ -1074,7 +1235,7 @@ logfont.lfItalic = TRUE; else { - maybe_signal_simple_error ("Invalid font weight or style", f->name, Qfont, errb); + maybe_signal_simple_error ("Invalid font weight or style", name, Qfont, errb); return (0); } @@ -1089,12 +1250,12 @@ pt = 10; /* #### Should we reject strings that don't specify a size? */ else if ((pt=atoi(points)) == 0) { - maybe_signal_simple_error ("Invalid font pointsize", f->name, Qfont, errb); + maybe_signal_simple_error ("Invalid font pointsize", name, Qfont, errb); return (0); } /* Formula for pointsize->height from LOGFONT docs in MSVC5 Platform SDK */ - logfont.lfHeight = -MulDiv(pt, DEVICE_MSWINDOWS_LOGPIXELSY(XDEVICE (device)), 72); + logfont.lfHeight = -MulDiv(pt, DEVICE_MSWINDOWS_LOGPIXELSY (XDEVICE (device)), 72); logfont.lfWidth = 0; /* Effects */ @@ -1119,8 +1280,7 @@ logfont.lfStrikeOut = TRUE; else { - maybe_signal_simple_error ("Invalid font effect", f->name, - Qfont, errb); + maybe_signal_simple_error ("Invalid font effect", name, Qfont, errb); return (0); } @@ -1132,7 +1292,7 @@ logfont.lfStrikeOut = TRUE; else { - maybe_signal_simple_error ("Invalid font effect", f->name, + maybe_signal_simple_error ("Invalid font effect", name, Qfont, errb); return (0); } @@ -1152,63 +1312,50 @@ else effects[0] = '\0'; -#define FROB(cs) \ - else if (stricmp (charset, #cs) == 0) \ - logfont.lfCharSet = cs##_CHARSET - - /* Charset aliases. Hangeul = Hangul is defined in windows.h. - We do not use the name "russian", only "cyrillic", as it is - the common name of this charset, used in other languages - than Russian. */ -#define CYRILLIC_CHARSET RUSSIAN_CHARSET -#define CENTRALEUROPEAN_CHARSET EASTEUROPE_CHARSET -#define CENTRALEUROPEAN_CHARSET EASTEUROPE_CHARSET - + /* Charset */ /* charset can be specified even if earlier fields havn't been */ - if ((fields < 5) && (c=strchr (extname, ':')) && (c=strchr (c+1, ':')) && - (c=strchr (c+1, ':')) && (c=strchr (c+1, ':'))) - { - strncpy (charset, c+1, LF_FACESIZE); - charset[LF_FACESIZE-1] = '\0'; - } - else - charset[0] = '\0'; - - if (charset[0] == '\0' || (stricmp (charset, "ansi") == 0) || - (stricmp (charset, "western") == 0)) + if (fields < 5) { - logfont.lfCharSet = ANSI_CHARSET; - strcpy (charset, "western"); + if ((c=strchr (extname, ':')) && (c=strchr (c+1, ':')) && + (c=strchr (c+1, ':')) && (c=strchr (c+1, ':'))) + { + strncpy (charset, c+1, LF_FACESIZE); + charset[LF_FACESIZE-1] = '\0'; + } + else + strcpy (charset, charset_map[0].name); } - FROB (SYMBOL); - FROB (SHIFTJIS); - FROB (GB2312); - FROB (HANGEUL); - FROB (CHINESEBIG5); - FROB (JOHAB); - FROB (HEBREW); - FROB (ARABIC); - FROB (GREEK); - FROB (TURKISH); - FROB (THAI); - FROB (EASTEUROPE); - FROB (CENTRALEUROPEAN); - FROB (CYRILLIC); - FROB (MAC); - FROB (BALTIC); - else if (stricmp (charset, "oem/dos") == 0) - logfont.lfCharSet = OEM_CHARSET; - else + + for (i=0; i<countof (charset_map); i++) + if (!stricmp (charset, charset_map[i].name)) + { + logfont.lfCharSet = charset_map[i].value; + break; + } + + if (i == countof (charset_map)) /* No matching charset */ { - maybe_signal_simple_error ("Invalid charset", f->name, Qfont, errb); + maybe_signal_simple_error ("Invalid charset", name, Qfont, errb); return 0; } -#undef FROB + /* Misc crud */ + logfont.lfEscapement = logfont.lfOrientation = 0; +#if 1 + logfont.lfOutPrecision = OUT_DEFAULT_PRECIS; + logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS; + logfont.lfQuality = DEFAULT_QUALITY; +#else + logfont.lfOutPrecision = OUT_STROKE_PRECIS; + logfont.lfClipPrecision = CLIP_STROKE_PRECIS; + logfont.lfQuality = PROOF_QUALITY; +#endif + /* Default to monospaced if the specified fontname doesn't exist. */ + logfont.lfPitchAndFamily = FF_MODERN; /* Windows will silently substitute a default font if the fontname * specifies a non-existent font. So we check the font against the device's - * list of font patterns to make sure that at least one of them matches */ + * list of font patterns to make sure that at least one of them matches. */ { struct mswindows_font_enum *fontlist; char truename[MSW_FONTSIZE]; @@ -1223,58 +1370,37 @@ } if (!done) { - maybe_signal_simple_error ("No matching font", f->name, Qfont, errb); + maybe_signal_simple_error ("No matching font", name, Qfont, errb); return 0; } } - /* Misc crud */ - logfont.lfEscapement = logfont.lfOrientation = 0; -#if 1 - logfont.lfOutPrecision = OUT_DEFAULT_PRECIS; - logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS; - logfont.lfQuality = DEFAULT_QUALITY; -#else - logfont.lfOutPrecision = OUT_STROKE_PRECIS; - logfont.lfClipPrecision = CLIP_STROKE_PRECIS; - logfont.lfQuality = PROOF_QUALITY; -#endif - /* Default to monospaced if the specified fontname doesn't exist. - * The match_font calls above should mean that this can't happen. */ - logfont.lfPitchAndFamily = FF_MODERN; - if ((f->data = CreateFontIndirect(&logfont)) == NULL) { - maybe_signal_simple_error ("Couldn't create font", f->name, Qfont, errb); + maybe_signal_simple_error ("Couldn't create font", name, Qfont, errb); return 0; } - { - HDC hdc; - HFONT holdfont; - TEXTMETRIC metrics; - - hdc = CreateCompatibleDC (NULL); - if (hdc) - { - holdfont = SelectObject(hdc, f->data); - if (holdfont) - { - GetTextMetrics (hdc, &metrics); - SelectObject(hdc, holdfont); - DeleteDC (hdc); - f->width = (unsigned short) metrics.tmAveCharWidth; - f->height = (unsigned short) metrics.tmHeight; - f->ascent = (unsigned short) metrics.tmAscent; - f->descent = (unsigned short) metrics.tmDescent; - f->proportional_p = (metrics.tmPitchAndFamily & TMPF_FIXED_PITCH); - return 1; - } - DeleteDC (hdc); - } - mswindows_finalize_font_instance (f); - maybe_signal_simple_error ("Couldn't map font", f->name, Qfont, errb); - } + hdc = CreateCompatibleDC (NULL); + if (hdc) + { + holdfont = SelectObject(hdc, f->data); + if (holdfont) + { + GetTextMetrics (hdc, &metrics); + SelectObject(hdc, holdfont); + DeleteDC (hdc); + f->width = (unsigned short) metrics.tmAveCharWidth; + f->height = (unsigned short) metrics.tmHeight; + f->ascent = (unsigned short) metrics.tmAscent; + f->descent = (unsigned short) metrics.tmDescent; + f->proportional_p = (metrics.tmPitchAndFamily & TMPF_FIXED_PITCH); + return 1; + } + DeleteDC (hdc); + } + mswindows_finalize_font_instance (f); + maybe_signal_simple_error ("Couldn't map font", name, Qfont, errb); return 0; }
--- a/src/process-nt.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/process-nt.c Mon Aug 13 11:04:06 2007 +0200 @@ -39,6 +39,9 @@ #include <winsock.h> #endif +/* Arbitrary size limit for code fragments passed to run_in_other_process */ +#define FRAGMENT_CODE_SIZE 32 + /* Bound by winnt.el */ Lisp_Object Qnt_quote_process_args; @@ -143,8 +146,8 @@ /* * Run ROUTINE in the context of process determined by H_PROCESS. The - * routine is passed the address of DATA as parameter. CODE_END is the - * address immediately after ROUTINE's code. DATA_SIZE is the size of + * routine is passed the address of DATA as parameter. The ROUTINE must + * not be longer than ROUTINE_CODE_SIZE bytes. DATA_SIZE is the size of * DATA structure. * * Note that the code must be positionally independent, and compiled @@ -157,11 +160,11 @@ */ static DWORD run_in_other_process (HANDLE h_process, - LPTHREAD_START_ROUTINE routine, LPVOID code_end, + LPTHREAD_START_ROUTINE routine, LPVOID data, size_t data_size) { process_memory pm; - size_t code_size = (LPBYTE)code_end - (LPBYTE)routine; + CONST size_t code_size = FRAGMENT_CODE_SIZE; /* Need at most 3 extra bytes of memory, for data alignment */ size_t total_size = code_size + data_size + 3; LPVOID remote_data; @@ -223,6 +226,11 @@ * SIGKILL, SIGTERM, SIGQUIT, SIGHUP - These four translate to ExitProcess * executed by the remote process * SIGINT - The remote process is sent CTRL_BREAK_EVENT + * + * The MSVC5.0 compiler feels free to re-order functions within a + * compilation unit, so we have no way of finding out the size of the + * following functions. Therefore these functions must not be larger than + * FRAGMENT_CODE_SIZE. */ /* @@ -240,12 +248,6 @@ return 1; } -/* Watermark in code space */ -static void -sigkill_code_end (void) -{ -} - /* * Sending break or control c */ @@ -261,12 +263,6 @@ return (*data->adr_GenerateConsoleCtrlEvent) (data->event, 0); } -/* Watermark in code space */ -static void -sigint_code_end (void) -{ -} - /* * Enabling signals */ @@ -282,12 +278,6 @@ return 1; } -/* Watermark in code space */ -static void -sig_enable_code_end (void) -{ -} - /* * Send signal SIGNO to process H_PROCESS. * Return nonzero if successful. @@ -316,8 +306,7 @@ sigkill_data d; d.adr_ExitProcess = GetProcAddress (h_kernel, "ExitProcess"); assert (d.adr_ExitProcess); - retval = run_in_other_process (h_process, - sigkill_proc, sigkill_code_end, + retval = run_in_other_process (h_process, sigkill_proc, &d, sizeof (d)); break; } @@ -328,8 +317,7 @@ GetProcAddress (h_kernel, "GenerateConsoleCtrlEvent"); assert (d.adr_GenerateConsoleCtrlEvent); d.event = CTRL_C_EVENT; - retval = run_in_other_process (h_process, - sigint_proc, sigint_code_end, + retval = run_in_other_process (h_process, sigint_proc, &d, sizeof (d)); break; } @@ -353,8 +341,7 @@ d.adr_SetConsoleCtrlHandler = GetProcAddress (h_kernel, "SetConsoleCtrlHandler"); assert (d.adr_SetConsoleCtrlHandler); - run_in_other_process (h_process, - sig_enable_proc, sig_enable_code_end, + run_in_other_process (h_process, sig_enable_proc, &d, sizeof (d)); }
--- a/src/process-unix.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/process-unix.c Mon Aug 13 11:04:06 2007 +0200 @@ -920,12 +920,14 @@ EMACS_SET_TTY_PROCESS_GROUP (xforkin, &piddly); } -# ifdef AIX /* On AIX, we've disabled SIGHUP above once we start a child on a pty. Now reenable it in the child, so it - will die when we want it to. */ + will die when we want it to. + JV: This needs to be done ALWAYS as we might have inherited + a SIG_IGN handling from our parent (nohup) and we are in new + process group. + */ signal (SIGHUP, SIG_DFL); -# endif /* AIX */ } #endif /* HAVE_PTYS */
--- a/src/ralloc.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/ralloc.c Mon Aug 13 11:04:06 2007 +0200 @@ -1108,7 +1108,9 @@ /* The hook `malloc' uses for the function which gets more space from the system. */ -/* extern POINTER (*__morecore) (long size); */ +#ifndef DOUG_LEA_MALLOC +extern POINTER (*__morecore) (long size); +#endif /* Initialize various things for memory allocation. */
--- a/src/redisplay-x.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/redisplay-x.c Mon Aug 13 11:04:06 2007 +0200 @@ -693,8 +693,18 @@ mask |= GCBackground; } - if (IMAGE_INSTANCEP (bg_pmap) - && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (bg_pmap))) + /* This special case comes from a request to draw text with a face which has + the dim property. We'll use a stippled foreground GC. */ + if (EQ (bg_pmap, Qdim)) + { + assert (DEVICE_X_GRAY_PIXMAP (d) != None); + + gcv.fill_style = FillStippled; + gcv.stipple = DEVICE_X_GRAY_PIXMAP (d); + mask |= (GCFillStyle | GCStipple); + } + else if (IMAGE_INSTANCEP (bg_pmap) + && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (bg_pmap))) { if (XIMAGE_INSTANCE_PIXMAP_DEPTH (bg_pmap) == 0) { @@ -915,6 +925,18 @@ if (cursor && cursor_cachel && focus && NILP (bar_cursor_value)) gc = x_get_gc (d, font, cursor_cachel->foreground, cursor_cachel->background, Qnil, Qnil); + else if (cachel->dim) + { + /* Ensure the gray bitmap exists */ + if (DEVICE_X_GRAY_PIXMAP (d) == None) + DEVICE_X_GRAY_PIXMAP (d) = + XCreateBitmapFromData (dpy, x_win, (char *)gray_bits, + gray_width, gray_height); + + /* Request a GC with the gray stipple pixmap to draw dimmed text */ + gc = x_get_gc (d, font, cachel->foreground, cachel->background, + Qdim, Qnil); + } else gc = x_get_gc (d, font, cachel->foreground, cachel->background, Qnil, Qnil);
--- a/src/redisplay.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/redisplay.c Mon Aug 13 11:04:06 2007 +0200 @@ -5066,7 +5066,10 @@ temporary change to the echo area. */ && !(MINI_WINDOW_P (w) && f->buffers_changed) && !f->frame_changed - && !truncation_changed) + && !truncation_changed + /* check whether start is really at the begining of a line GE */ + && (!w->start_at_line_beg || beginning_of_line_p (b, startp)) + ) { /* Check if the cursor has actually moved. */ if (EQ (Fmarker_buffer (w->last_point[CURRENT_DISP]), w->buffer)
--- a/src/regex.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/regex.c Mon Aug 13 11:04:06 2007 +0200 @@ -4857,8 +4857,16 @@ highest_active_reg = NO_HIGHEST_ACTIVE_REG; } else - highest_active_reg = r; - } + { + highest_active_reg = r; + + /* 98/9/21 jhod: We've also gotta set lowest_active_reg, don't we? */ + r = 1; + while (r < highest_active_reg && !IS_ACTIVE(reg_info[r])) + r++; + lowest_active_reg = r; + } + } /* If just failed to match something this time around with a group that's operated on by a repetition operator, try to
--- a/src/s/cygwin32.h Mon Aug 13 11:03:09 2007 +0200 +++ b/src/s/cygwin32.h Mon Aug 13 11:04:06 2007 +0200 @@ -71,15 +71,21 @@ /* cheesy way to determine cygwin version */ #ifndef NOT_C_CODE #include <signal.h> +#ifdef HAVE_CYGWIN32_VERSION_H +#include <cygwin32/version.h> +#else #ifdef SIGIO #define CYGWIN_B19 #else #define BROKEN_CYGWIN #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*); +#ifndef CYGWIN_DLL_VERSION_MAJOR struct timeval; struct timezone; struct itimerval; @@ -102,6 +108,14 @@ extern int srandom( unsigned seed); extern long random(); + +#define SND_ASYNC 1 +#define SND_NODEFAULT 2 +#define SND_MEMORY 4 +#define SND_FILENAME 0x2000L +#define VK_APPS 0x5D +#define SIF_TRACKPOS 0x0010 +#endif #endif #ifdef HAVE_MS_WINDOWS @@ -117,12 +131,10 @@ #define LIBS_SYSTEM -lwinmm #define ICC_BAR_CLASSES 4 -#define SIF_TRACKPOS 0x0010 #define FW_BLACK FW_HEAVY #define FW_ULTRABOLD FW_EXTRABOLD #define FW_DEMIBOLD FW_SEMIBOLD #define FW_ULTRALIGHT FW_EXTRALIGHT -#define VK_APPS 0x5D #define APPCMD_FILTERINITS 0x20L #define CBF_FAIL_SELFCONNECTIONS 0x1000 #define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000 @@ -130,10 +142,6 @@ #define CBF_FAIL_POKES 0x10000 #define CBF_FAIL_REQUESTS 0x20000 #define SZDDESYS_TOPIC "System" -#define SND_ASYNC 1 -#define SND_NODEFAULT 2 -#define SND_MEMORY 4 -#define SND_FILENAME 0x2000L #define JOHAB_CHARSET 130 #define MAC_CHARSET 77
--- a/src/s/decosf4-0.h Mon Aug 13 11:03:09 2007 +0200 +++ b/src/s/decosf4-0.h Mon Aug 13 11:04:06 2007 +0200 @@ -24,14 +24,19 @@ #define regoff_t sys_regoff_t #define regmatch_t sys_regmatch_t +/* A perfectly ordinary link wins again - martin */ #undef C_SWITCH_SYSTEM -#define C_SWITCH_SYSTEM "-D_BSD" +#undef LIBS_SYSTEM +#undef LIBS_DEBUG +#define ORDINARY_LINK #define SYSTEM_MALLOC +#if 0 /* martin */ /* Some V4.0* versions before V4.0B don't detect rename properly. */ #ifndef HAVE_RENAME #define HAVE_RENAME #endif #define LIBS_DEBUG +#endif /* 0 */
--- a/src/s/freebsd.h Mon Aug 13 11:03:09 2007 +0200 +++ b/src/s/freebsd.h Mon Aug 13 11:04:06 2007 +0200 @@ -49,6 +49,20 @@ #define LIBS_TERMCAP "-ltermcap" +#ifdef __ELF__ /* since from 3.0-CURRENT(maybe 19980831 or later) */ +#ifndef NOT_C_CODE +#include <stddef.h> +#endif +#define LD_SWITCH_SYSTEM +#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o +#define UNEXEC unexelf.o +#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o +#define LINKER "$(CC) -nostdlib" +#undef LIB_GCC +#define LIB_GCC + +#else /* not __ELF__ */ + #ifndef NO_SHARED_LIBS #if 0 /* mrb */ #define LIB_GCC "-lgcc" @@ -79,6 +93,8 @@ #endif /* __FreeBSD__ */ #endif /* NO_SHARED_LIBS */ +#endif /* not __ELF__ */ + #define HAVE_GETLOADAVG /* #define NO_TERMIO */ /* detected in configure */ #define DECLARE_GETPWUID_WITH_UID_T
--- a/src/undo.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/undo.c Mon Aug 13 11:04:06 2007 +0200 @@ -75,7 +75,9 @@ if (EQ (b->undo_list, Qt)) return (0); - if (NILP (last_undo_buffer) || b != XBUFFER (last_undo_buffer)) + if (NILP (last_undo_buffer) + || (BUFFER_BASE_BUFFER (b) + != BUFFER_BASE_BUFFER (XBUFFER (last_undo_buffer)))) { undo_boundary (b); XSETBUFFER (last_undo_buffer, b);
--- a/src/unexalpha.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/unexalpha.c Mon Aug 13 11:04:06 2007 +0200 @@ -92,9 +92,11 @@ #define DEFAULT_ENTRY_ADDRESS __start #endif -unexec (new_name, a_name, data_start, bss_start, entry_address) - char *new_name, *a_name; - unsigned long data_start, bss_start, entry_address; +int +unexec (char *new_name, char *a_name, + unsigned long data_start, + unsigned long bss_start, + unsigned long entry_address) { int new, old; char * oldptr; @@ -102,7 +104,6 @@ struct stat stat; long pagesize, brk; long newsyms, symrel; - int nread; int i; long vaddr, scnptr; #define BUFSIZE 8192 @@ -365,15 +366,15 @@ */ - -update_dynamic_symbols (old, new_name, new, newsyms, nsyms, symoff, stroff) - char *old; /* Pointer to old executable */ - char *new_name; /* Name of new executable */ - int new; /* File descriptor for new executable */ - long newsyms; /* Offset of Symbol table in new executable */ - int nsyms; /* Number of symbol table entries */ - long symoff; /* Offset of External Symbols in old file */ - long stroff; /* Offset of string table in old file */ +int +update_dynamic_symbols ( + char *old, /* Pointer to old executable */ + char *new_name, /* Name of new executable */ + int new, /* File descriptor for new executable */ + long newsyms, /* Offset of Symbol table in new executable */ + int nsyms, /* Number of symbol table entries */ + long symoff, /* Offset of External Symbols in old file */ + long stroff) /* Offset of string table in old file */ { long i; int found = 0;
--- a/src/unexelf.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/unexelf.c Mon Aug 13 11:04:06 2007 +0200 @@ -866,7 +866,9 @@ for (; symp < symendp; symp ++) if (strcmp ((char *) (symnames + symp->st_name), "_end") == 0 - || strcmp ((char *) (symnames + symp->st_name), "_edata") == 0) + || strcmp ((char *) (symnames + symp->st_name), "end") == 0 + || strcmp ((char *) (symnames + symp->st_name), "_edata") == 0 + || strcmp ((char *) (symnames + symp->st_name), "edata") == 0) memcpy (&symp->st_value, &new_bss_addr, sizeof (new_bss_addr)); }
--- a/src/window.c Mon Aug 13 11:03:09 2007 +0200 +++ b/src/window.c Mon Aug 13 11:04:06 2007 +0200 @@ -1633,7 +1633,9 @@ CHECK_INT_COERCE_MARKER (pos); set_marker_restricted (w->start[CURRENT_DISP], pos, w->buffer); /* this is not right, but much easier than doing what is right. */ - w->start_at_line_beg = 0; + /* w->start_at_line_beg = 0; */ + /* WTF is the above supposed to mean? GE */ + w->start_at_line_beg = beginning_of_line_p (XBUFFER (w->buffer), XINT (pos)); if (NILP (noforce)) w->force_start = 1; w->redo_modeline = 1; @@ -3163,7 +3165,9 @@ make_int (XBUFFER (buffer)->last_window_start), buffer); Fset_marker (w->sb_point, w->start[CURRENT_DISP], buffer); - w->start_at_line_beg = 0; + /* set start_at_line_beg correctly. GE */ + w->start_at_line_beg = beginning_of_line_p (XBUFFER (buffer), + XBUFFER (buffer)->last_window_start); w->force_start = 0; /* Lucid fix */ SET_LAST_MODIFIED (w, 1); SET_LAST_FACECHANGE (w);
--- a/version.sh Mon Aug 13 11:03:09 2007 +0200 +++ b/version.sh Mon Aug 13 11:04:06 2007 +0200 @@ -1,8 +1,8 @@ #!/bin/sh emacs_major_version=21 emacs_minor_version=2 -emacs_beta_version=1 -xemacs_codename="Aeolus" +emacs_beta_version=2 +xemacs_codename="Aether" infodock_major_version=4 infodock_minor_version=0 infodock_build_version=1