XEmacs 21.2.28 "Hermes".
authortomo <tomo>
Tue, 2 May 2000 08:52:42 +0000 (08:52 +0000)
committertomo <tomo>
Tue, 2 May 2000 08:52:42 +0000 (08:52 +0000)
380 files changed:
CHANGES-beta
ChangeLog
configure
configure.in
etc/BETA
etc/NEWS
info/cl.info
info/emodules.info
info/internals.info
info/internals.info-1
info/internals.info-2
info/lispref.info
info/lispref.info-1
info/lispref.info-3
info/lispref.info-4
info/lispref.info-6
info/new-users-guide.info
info/widget.info
info/xemacs-faq.info
info/xemacs-faq.info-1
info/xemacs-faq.info-2
info/xemacs.info
info/xemacs.info-2
lib-src/ChangeLog
lib-src/cvtmail.c
lib-src/ellcc.c
lib-src/fakemail.c
lib-src/getopt.h
lib-src/gnuclient.c
lib-src/gnuserv.c
lib-src/gnuslib.c
lib-src/hexl.c
lib-src/make-docfile.c
lib-src/make-msgfile.lex
lib-src/movemail.c
lib-src/sorted-doc.c
lib-src/yow.c
lisp/ChangeLog
lisp/about.el
lisp/auto-save.el
lisp/byte-optimize.el
lisp/bytecomp.el
lisp/cl-extra.el
lisp/cl-macs.el
lisp/code-process.el
lisp/coding.el
lisp/cus-edit.el
lisp/custom.el
lisp/device.el
lisp/dumped-lisp.el
lisp/easymenu.el
lisp/etags.el
lisp/faces.el
lisp/files.el
lisp/fill.el
lisp/font-menu.el
lisp/frame.el
lisp/gutter-items.el
lisp/help.el
lisp/hyper-apropos.el
lisp/info.el
lisp/isearch-mode.el
lisp/itimer.el
lisp/loadup.el
lisp/menubar-items.el
lisp/minibuf.el
lisp/modeline.el
lisp/mouse.el
lisp/msw-glyphs.el
lisp/mule/english.el
lisp/mule/european.el
lisp/mule/mule-category.el
lisp/mule/mule-cmds.el
lisp/mule/mule-init.el
lisp/mule/vietnamese.el
lisp/obsolete.el
lisp/package-admin.el
lisp/package-get.el
lisp/package-ui.el
lisp/process.el
lisp/rect.el
lisp/scrollbar.el
lisp/simple.el
lisp/startup.el
lisp/term/pc-win.el
lisp/term/scoansi.el
lisp/version.el
lisp/wid-edit.el
lisp/window.el
lwlib/ChangeLog
lwlib/lwlib-Xaw.h
lwlib/lwlib-Xm.h
lwlib/lwlib-internal.h
lwlib/lwlib-utils.h
lwlib/lwlib.h
lwlib/xlwgauge.c
lwlib/xlwmenu.h
lwlib/xlwmenuP.h
lwlib/xlwscrollbar.h
lwlib/xlwtabs.c
man/ChangeLog
man/cl.texi
man/emodules.texi
man/internals/internals.texi
man/lispref/commands.texi
man/lispref/consoles-devices.texi
man/lispref/customize.texi
man/lispref/dialog.texi
man/lispref/extents.texi
man/lispref/faces.texi
man/lispref/glyphs.texi
man/lispref/keymaps.texi
man/lispref/lispref.texi
man/lispref/lists.texi
man/lispref/markers.texi
man/lispref/menus.texi
man/lispref/mule.texi
man/lispref/objects.texi
man/lispref/specifiers.texi
man/lispref/strings.texi
man/lispref/toolbar.texi
man/lispref/tooltalk.texi
man/lispref/x-windows.texi
man/new-users-guide/custom2.texi
man/new-users-guide/help.texi
man/new-users-guide/modes.texi
man/widget.texi
man/xemacs-faq.texi
man/xemacs/abbrevs.texi
man/xemacs/buffers.texi
man/xemacs/custom.texi
man/xemacs/keystrokes.texi
man/xemacs/new.texi
man/xemacs/packages.texi
man/xemacs/programs.texi
man/xemacs/sending.texi
nt/ChangeLog
nt/config.h
nt/xemacs.mak
nt/xpm.mak
src/.dbxrc
src/ChangeLog
src/ChangeLog.2
src/EmacsFrame.c
src/EmacsFrame.h
src/EmacsFrameP.h
src/EmacsManager.c
src/EmacsManager.h
src/EmacsManagerP.h
src/EmacsShell-sub.c
src/EmacsShell.h
src/EmacsShellP.h
src/ExternalClient.c
src/ExternalClient.h
src/ExternalClientP.h
src/ExternalShell.c
src/ExternalShell.h
src/ExternalShellP.h
src/Makefile.in.in
src/abbrev.c
src/alloc.c
src/backtrace.h
src/balloon-x.c
src/balloon_help.h
src/bitmaps.h
src/blocktype.h
src/broken-sun.h
src/buffer.c
src/buffer.h
src/bytecode.c
src/bytecode.h
src/callint.c
src/callproc.c
src/casefiddle.c
src/chartab.c
src/chartab.h
src/cm.h
src/cmds.c
src/commands.h
src/config.h.in
src/console-msw.c
src/console-msw.h
src/console-stream.h
src/console-tty.c
src/console-tty.h
src/console-x.c
src/console-x.h
src/console.c
src/console.h
src/data.c
src/database.c
src/database.h
src/debug.h
src/depend
src/device-msw.c
src/device-x.c
src/device.c
src/device.h
src/dialog-msw.c
src/dired-msw.c
src/dired.c
src/doc.c
src/doprnt.c
src/dragdrop.h
src/dynarr.c
src/editfns.c
src/eldap.c
src/eldap.h
src/elhash.c
src/elhash.h
src/emacs.c
src/emodules.c
src/emodules.h
src/eval.c
src/event-Xt.c
src/event-msw.c
src/event-stream.c
src/event-tty.c
src/event-unixoid.c
src/events.c
src/events.h
src/extents.c
src/extents.h
src/extw-Xlib.h
src/extw-Xt.h
src/faces.c
src/faces.h
src/file-coding.c
src/file-coding.h
src/fileio.c
src/floatfns.c
src/fns.c
src/font-lock.c
src/frame-msw.c
src/frame-x.c
src/frame.c
src/frame.h
src/general.c
src/getloadavg.c
src/getpagesize.h
src/gifrlib.h
src/glyphs-eimage.c
src/glyphs-msw.c
src/glyphs-msw.h
src/glyphs-widget.c
src/glyphs-x.c
src/glyphs-x.h
src/glyphs.c
src/glyphs.h
src/gmalloc.c
src/gpmevent.c
src/gpmevent.h
src/gui-msw.c
src/gui-x.c
src/gui-x.h
src/gui.c
src/gui.h
src/gutter.c
src/gutter.h
src/hash.h
src/imgproc.h
src/indent.c
src/input-method-motif.c
src/input-method-xlib.c
src/insdel.c
src/insdel.h
src/iso-wide.h
src/keymap.c
src/keymap.h
src/libsst.h
src/libst.h
src/line-number.h
src/lisp.h
src/lread.c
src/lrecord.h
src/lstream.c
src/lstream.h
src/macros.h
src/marker.c
src/mem-limits.h
src/menubar-msw.c
src/menubar-msw.h
src/menubar-x.c
src/menubar.c
src/menubar.h
src/minibuf.c
src/miscplay.h
src/mule-ccl.c
src/mule-ccl.h
src/mule-charset.c
src/mule-charset.h
src/mule.c
src/nas.c
src/ndir.h
src/nt.c
src/nt.h
src/ntheap.c
src/ntheap.h
src/ntproc.c
src/objects-msw.c
src/objects-msw.h
src/objects-tty.c
src/objects-tty.h
src/objects-x.c
src/objects-x.h
src/objects.c
src/objects.h
src/offix-types.h
src/offix.h
src/opaque.c
src/opaque.h
src/print.c
src/process-nt.c
src/process-unix.c
src/process.c
src/process.h
src/procimpl.h
src/ralloc.c
src/rangetab.c
src/rangetab.h
src/realpath.c
src/redisplay-msw.c
src/redisplay-output.c
src/redisplay-tty.c
src/redisplay-x.c
src/redisplay.c
src/redisplay.h
src/regex.c
src/regex.h
src/s/cygwin32.h
src/s/windowsnt.h
src/scrollbar-msw.h
src/scrollbar-x.h
src/scrollbar.c
src/scrollbar.h
src/search.c
src/select-x.c
src/select.c
src/select.h
src/sound.c
src/specifier.c
src/specifier.h
src/symbols.c
src/symeval.h
src/symsinit.h
src/syntax.c
src/syntax.h
src/sysdep.c
src/sysdep.h
src/sysdir.h
src/sysdll.h
src/sysfile.h
src/sysfloat.h
src/sysproc.h
src/syssignal.h
src/systime.h
src/systty.h
src/syswait.h
src/toolbar-msw.c
src/toolbar-x.c
src/toolbar.h
src/tooltalk.c
src/tooltalk.h
src/undo.c
src/unexec.c
src/unexelfsgi.c
src/unexnt.c
src/window.c
src/window.h
src/xgccache.h
src/xintrinsic.h
src/xintrinsicp.h
src/xmmanagerp.h
src/xmprimitivep.h
src/xmu.h
tests/ChangeLog
tests/automated/lisp-tests.el
tests/automated/mule-tests.el
tests/automated/symbol-tests.el
version.sh

index d46ad3a..18edb09 100644 (file)
@@ -1,3 +1,35 @@
+to 21.2.28 "Hermes"
+-- Add configure support for NetWinders, Sean MacLennan
+-- Make the "Load .emacs" menu item work again, Kirill Katsnelson
+-- Make --without-x work again.
+-- Detect Xaw3d and friends using #include <Xaw3d/FOO.h>
+-- Experimental Drag-N-Drop now defaults to "no" until there is again
+   active development.
+-- SGI dumping fixes should make XEmacs work again on Irix 6.
+-- More warning flags on by default when building with gcc.
+-- process coding changes, Kirill Katsnelson
+-- help now knows how to print macro arglists, Yoshiki Hayashi
+-- Windows printing support, Kirill Katsnelson
+-- Obscure crash fixes, Martin Buchholz
+-- Memory leak fixes, Martin Buchholz
+-- We now always use our own realpath(), never the system-provided one.
+-- More gutter/tab widget changes, Andy Piper
+-- Crash fix when using dead processes, Gunnar Evermann (fix PR#1061)
+-- Pdump stability fixes, Olivier Galibert
+-- New coding system alias implementation, Ben Wing and Martin Buchholz
+-- New internal data conversion infrastructure, Ben Wing and Martin Buchholz
+-- IPv6 support, URA Hiroshi
+-- Runtime Athena mismatch warnings added, Daniel Pittman
+-- Removal of old MSDOS support, Kirill Katsnelson
+-- Correctly define Latin-3 and Latin-4 character syntax as "w".
+-- Auto-define all X-defined keysyms as self-inserting, not just Latin-1.
+-- Workaround egcs-20000131 c++ compiler bug
+-- Byte-optimize (length "foo") to 3.
+-- (define-key ctl-x-4-map "p" global-map) no longer causes stack overflow crash.
+-- Partially implement dontusethis-set-symbol-value-handler.
+-- Fix bug: (getf nil t t) ==> Lisp nesting exceeds `max-lisp-eval-depth'
+-- lib-src partially C++ized, Zack Weinberg.
+
 to 21.2.27 "Hera"
 -- Dynamic layout for widgets from Andy Piper
 -- config.sub, config.guess major upgrade, Marcus Thiessel
 to 21.2.27 "Hera"
 -- Dynamic layout for widgets from Andy Piper
 -- config.sub, config.guess major upgrade, Marcus Thiessel
index 690a98e..1bb1ff2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,53 @@
+2000-02-07  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.28 is released.
+
+2000-01-27  URA Hiroshi <ura@hiru.aoba.yokohama.jp>
+       * configure.in: added getaddrinfo and getnameinfo to AC_FUNC.
+
+2000-01-26  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in: Backout the /etc/ld.so.conf patch of 2000-01-18.
+
+2000-01-24  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in: Always use our own realpath(), not the system one.
+
+2000-01-25  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in: Default Drag-N-Drop to "no"
+
+1999-12-28  Max Matveev  <max@melbourne.sgi.com>
+
+       * configure.in: add new machine type for IRIX 6.[2-5] to
+       switch from using unexelf.o to unexelfsgi.o for just those
+       versions of IRIX.
+       In the ideal world it would be handled by the s/irix6-0.h but
+       since machine config is included AFTER OS config, I had to add a
+       new machine type.
+
+2000-01-22  Andy Piper  <andy@xemacs.org>
+
+       * configure.in: add winspool to windows libraries.
+
+2000-01-22  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in: Add more warnings to default gcc flags.
+
+2000-01-20  Daniel Pittman  <daniel@danann.net>
+
+       * configure.in: Find Athena headers hidden in even more obscure
+       places. That is, search Xaw3D/ as well as X11/Xaw3D/.
+
+2000-01-19  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in: Add support for NetWinders.
+       Patch by Sean MacLennan <seanm@netwinder.org>
+
+2000-01-18  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in: Use /etc/ld.so.conf at link-time, if available.
+
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
index d57c721..09b367e 100755 (executable)
--- a/configure
+++ b/configure
@@ -264,6 +264,7 @@ with_tty=""
 use_union_type="no"
 with_dnet=""
 pdump="no"
 use_union_type="no"
 with_dnet=""
 pdump="no"
+with_dragndrop="no"
 
 
 
 
 
 
@@ -831,7 +832,7 @@ echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
 fi
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:835: checking whether ln -s works" >&5
+echo "configure:836: checking whether ln -s works" >&5
 
 rm -f conftestdata
 if ln -s X conftestdata 2>/dev/null
 
 rm -f conftestdata
 if ln -s X conftestdata 2>/dev/null
@@ -1048,6 +1049,9 @@ if test "${debug:=$beta}" = "yes"; then
   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"debug.o\""
  fi
   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"debug.o\""
  fi
+  extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"tests.o\""
+ fi
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining DEBUG_XEMACS
 EOF
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining DEBUG_XEMACS
 EOF
@@ -1076,7 +1080,7 @@ EOF
 
 
 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
 
 
 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
-echo "configure:1080: checking "host system type"" >&5
+echo "configure:1084: checking "host system type"" >&5
 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
@@ -1094,6 +1098,7 @@ case "$canonical" in
   alpha*-*-*       ) machine=alpha ;;
   vax-*-*          ) machine=vax ;;
   mips-dec-*       ) machine=pmax ;;
   alpha*-*-*       ) machine=alpha ;;
   vax-*-*          ) machine=vax ;;
   mips-dec-*       ) machine=pmax ;;
+  mips-sgi-irix6*  ) machine=iris6d ;;
   mips-sgi-*       ) machine=iris4d ;;
   mips*-linux      ) machine=mips ;;
   romp-ibm-*       ) machine=ibmrt ;;
   mips-sgi-*       ) machine=iris4d ;;
   mips*-linux      ) machine=mips ;;
   romp-ibm-*       ) machine=ibmrt ;;
@@ -1106,6 +1111,7 @@ case "$canonical" in
   mips-sony-*      ) machine=news-risc ;;
   clipper-*        ) machine=clipper ;;
   arm-*            ) machine=arm ;;
   mips-sony-*      ) machine=news-risc ;;
   clipper-*        ) machine=clipper ;;
   arm-*            ) machine=arm ;;
+  armv34lb-*   ) machine=arm ;;
   ns32k-*          ) machine=ns32000 ;;
 esac
 
   ns32k-*          ) machine=ns32000 ;;
 esac
 
@@ -1570,7 +1576,7 @@ xe_save_CFLAGS="$CFLAGS"
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1574: checking for $ac_word" >&5
+echo "configure:1580: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1597,7 +1603,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1601: checking for $ac_word" >&5
+echo "configure:1607: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1645,7 +1651,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1649: checking for $ac_word" >&5
+echo "configure:1655: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1674,7 +1680,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1678: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1684: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
@@ -1687,12 +1693,12 @@ cross_compiling=no
 
 cat > conftest.$ac_ext << EOF
 
 
 cat > conftest.$ac_ext << EOF
 
-#line 1691 "configure"
+#line 1697 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1720,19 +1726,19 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1730: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1729: checking whether we are using GNU C" >&5
+echo "configure:1735: checking whether we are using GNU C" >&5
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1750,7 +1756,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1754: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1760: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1783,7 +1789,7 @@ if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1787: checking for $ac_word" >&5
+echo "configure:1793: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1810,7 +1816,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1814: checking for $ac_word" >&5
+echo "configure:1820: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1858,7 +1864,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1862: checking for $ac_word" >&5
+echo "configure:1868: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1887,7 +1893,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1891: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1897: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
@@ -1900,12 +1906,12 @@ cross_compiling=no
 
 cat > conftest.$ac_ext << EOF
 
 
 cat > conftest.$ac_ext << EOF
 
-#line 1904 "configure"
+#line 1910 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1933,19 +1939,19 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1943: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1942: checking whether we are using GNU C" >&5
+echo "configure:1948: checking whether we are using GNU C" >&5
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1963,7 +1969,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1967: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1973: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1996,7 +2002,7 @@ elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2000: checking for $ac_word" >&5
+echo "configure:2006: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2023,7 +2029,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2027: checking for $ac_word" >&5
+echo "configure:2033: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2071,7 +2077,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2075: checking for $ac_word" >&5
+echo "configure:2081: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2100,7 +2106,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2104: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2110: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
 
 ac_ext=c
 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
@@ -2113,12 +2119,12 @@ cross_compiling=no
 
 cat > conftest.$ac_ext << EOF
 
 
 cat > conftest.$ac_ext << EOF
 
-#line 2117 "configure"
+#line 2123 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -2146,19 +2152,19 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2150: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2156: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2155: checking whether we are using GNU C" >&5
+echo "configure:2161: checking whether we are using GNU C" >&5
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -2176,7 +2182,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2180: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2186: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -2213,7 +2219,7 @@ test -n "$CPP" -a -d "$CPP" && CPP=
 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2217: checking how to run the C preprocessor" >&5
+echo "configure:2223: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -2226,13 +2232,13 @@ if test -z "$CPP"; then
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 2230 "configure"
+#line 2236 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -2243,13 +2249,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 2247 "configure"
+#line 2253 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -2260,13 +2266,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 2264 "configure"
+#line 2270 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -2291,9 +2297,9 @@ echo "$ac_t""$CPP" 1>&6
 
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:2295: checking for AIX" >&5
+echo "configure:2301: checking for AIX" >&5
 cat > conftest.$ac_ext <<EOF
 cat > conftest.$ac_ext <<EOF
-#line 2297 "configure"
+#line 2303 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -2320,9 +2326,9 @@ rm -f conftest*
 
 
 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
-echo "configure:2324: checking for GNU libc" >&5
+echo "configure:2330: checking for GNU libc" >&5
 cat > conftest.$ac_ext <<EOF
 cat > conftest.$ac_ext <<EOF
-#line 2326 "configure"
+#line 2332 "configure"
 #include "confdefs.h"
 #include <features.h>
 int main() {
 #include "confdefs.h"
 #include <features.h>
 int main() {
@@ -2334,7 +2340,7 @@ int main() {
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   have_glibc=yes
 else
   rm -rf conftest*
   have_glibc=yes
 else
@@ -2356,7 +2362,7 @@ EOF
 
 
 cat > conftest.$ac_ext <<EOF
 
 
 cat > conftest.$ac_ext <<EOF
-#line 2360 "configure"
+#line 2366 "configure"
 #include "confdefs.h"
 int main () {
 #if defined __SUNPRO_C
 #include "confdefs.h"
 int main () {
 #if defined __SUNPRO_C
@@ -2368,7 +2374,7 @@ return 0;
 #endif
 }
 EOF
 #endif
 }
 EOF
-if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   :
 else
 then
   :
 else
@@ -2576,7 +2582,7 @@ test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extr
 
 if test "$cflags_specified" = "no"; then
       if   test "$GCC" = "yes"; then
 
 if test "$cflags_specified" = "no"; then
       if   test "$GCC" = "yes"; then
-    CFLAGS="-g -O3 -Wall -Wno-switch"
+    CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
               elif test "$__SUNPRO_C" = "yes"; then
     case "$opsys" in
       sol2    ) CFLAGS="-v -xO4" ;;
               elif test "$__SUNPRO_C" = "yes"; then
     case "$opsys" in
       sol2    ) CFLAGS="-v -xO4" ;;
@@ -2654,7 +2660,7 @@ test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$ext
  fi
 
 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
  fi
 
 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
-echo "configure:2658: checking for dynodump" >&5
+echo "configure:2664: checking for dynodump" >&5
 if test "$unexec" != "unexsol2.o"; then
   echo "$ac_t""no" 1>&6
 else
 if test "$unexec" != "unexsol2.o"; then
   echo "$ac_t""no" 1>&6
 else
@@ -2692,12 +2698,12 @@ if test "$unexec" = "unexaix.o"; then
   done
   
 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
   done
   
 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
-echo "configure:2696: checking for terminateAndUnload in -lC" >&5
+echo "configure:2702: checking for terminateAndUnload in -lC" >&5
 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lC "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lC "
 cat > conftest.$ac_ext <<EOF
-#line 2701 "configure"
+#line 2707 "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
 #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
@@ -2708,7 +2714,7 @@ int main() {
 terminateAndUnload()
 ; return 0; }
 EOF
 terminateAndUnload()
 ; return 0; }
 EOF
-if { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2792,7 +2798,7 @@ fi
 
 
 for dir in "/usr/ccs/lib"; do
 
 
 for dir in "/usr/ccs/lib"; do
-  test -d "$dir" && ld_switch_site="$ld_switch_site -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_site"; fi
+  test -d "$dir" && ld_switch_system="$ld_switch_system -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_system"; fi
 done
 
 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
 done
 
 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
@@ -2802,7 +2808,11 @@ if test -n "$site_runtime_libraries"; then
 fi
 
 
 fi
 
 
-if   test "$dynamic" = "no"; then add_runtime_path=no
+
+
+
+if test -n "$add_runtime_path"; then :;
+elif 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* | decosf* ) add_runtime_path=yes ;;
 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
 else case "$opsys" in
        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
@@ -2812,7 +2822,7 @@ fi
 
 if test "$add_runtime_path" = "yes"; then
       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
 
 if test "$add_runtime_path" = "yes"; then
       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
-echo "configure:2816: checking "for runtime libraries flag"" >&5
+echo "configure:2826: checking "for runtime libraries flag"" >&5
   case "$opsys" in
     sol2 ) dash_r="-R" ;;
     decosf* | linux* | irix*) dash_r="-rpath " ;;
   case "$opsys" in
     sol2 ) dash_r="-R" ;;
     decosf* | linux* | irix*) dash_r="-rpath " ;;
@@ -2834,14 +2844,14 @@ if test "$GCC" = "yes"; then
   done
 fi
         cat > conftest.$ac_ext <<EOF
   done
 fi
         cat > conftest.$ac_ext <<EOF
-#line 2838 "configure"
+#line 2848 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   dash_r="$try_dash_r"
 else
   rm -rf conftest*
   dash_r="$try_dash_r"
 else
@@ -2943,10 +2953,10 @@ else
 fi
 after_morecore_hook_exists=yes
 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
 fi
 after_morecore_hook_exists=yes
 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
-echo "configure:2947: checking for malloc_get_state" >&5
+echo "configure:2957: checking for malloc_get_state" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
+#line 2960 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char malloc_get_state(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char malloc_get_state(); below.  */
@@ -2969,7 +2979,7 @@ malloc_get_state();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_malloc_get_state=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_malloc_get_state=yes"
 else
@@ -2989,10 +2999,10 @@ doug_lea_malloc=no
 fi
 
 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
-echo "configure:2993: checking for malloc_set_state" >&5
+echo "configure:3003: checking for malloc_set_state" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 2996 "configure"
+#line 3006 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char malloc_set_state(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char malloc_set_state(); below.  */
@@ -3015,7 +3025,7 @@ malloc_set_state();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:3019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_malloc_set_state=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_malloc_set_state=yes"
 else
@@ -3035,16 +3045,16 @@ doug_lea_malloc=no
 fi
 
 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
-echo "configure:3039: checking whether __after_morecore_hook exists" >&5
+echo "configure:3049: checking whether __after_morecore_hook exists" >&5
 cat > conftest.$ac_ext <<EOF
 cat > conftest.$ac_ext <<EOF
-#line 3041 "configure"
+#line 3051 "configure"
 #include "confdefs.h"
 extern void (* __after_morecore_hook)();
 int main() {
 __after_morecore_hook = 0
 ; return 0; }
 EOF
 #include "confdefs.h"
 extern void (* __after_morecore_hook)();
 int main() {
 __after_morecore_hook = 0
 ; return 0; }
 EOF
-if { (eval echo configure:3048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
@@ -3103,7 +3113,7 @@ fi
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 # 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:3107: checking for $ac_word" >&5
+echo "configure:3117: checking for $ac_word" >&5
 
 if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 
 if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -3158,7 +3168,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
 # 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:3162: checking for a BSD compatible install" >&5
+echo "configure:3172: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 
   IFS="${IFS=  }"; ac_save_IFS="$IFS"; IFS=":"
 if test -z "$INSTALL"; then
 
   IFS="${IFS=  }"; ac_save_IFS="$IFS"; IFS=":"
@@ -3212,7 +3222,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 # 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:3216: checking for $ac_word" >&5
+echo "configure:3226: checking for $ac_word" >&5
 
 if test -n "$YACC"; then
   ac_cv_prog_YACC="$YACC" # Let the user override the test.
 
 if test -n "$YACC"; then
   ac_cv_prog_YACC="$YACC" # Let the user override the test.
@@ -3244,15 +3254,15 @@ for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3248: checking for $ac_hdr" >&5
+echo "configure:3258: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3251 "configure"
+#line 3261 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3285,15 +3295,15 @@ for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3289: checking for $ac_hdr" >&5
+echo "configure:3299: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3292 "configure"
+#line 3302 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3326,15 +3336,15 @@ for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3330: checking for $ac_hdr" >&5
+echo "configure:3340: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3333 "configure"
+#line 3343 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3364,10 +3374,10 @@ fi
 done
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
 done
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:3368: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:3378: checking for sys/wait.h that is POSIX.1 compatible" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3371 "configure"
+#line 3381 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -3383,7 +3393,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:3387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -3407,10 +3417,10 @@ EOF
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3411: checking for ANSI C header files" >&5
+echo "configure:3421: checking for ANSI C header files" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3414 "configure"
+#line 3424 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3418,7 +3428,7 @@ cat > conftest.$ac_ext <<EOF
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3435,7 +3445,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
 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 3439 "configure"
+#line 3449 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -3453,7 +3463,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
 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 3457 "configure"
+#line 3467 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3471,7 +3481,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
 cat > conftest.$ac_ext <<EOF
 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 3475 "configure"
+#line 3485 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3482,7 +3492,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
 exit (0); }
 
 EOF
-if { (eval echo configure:3486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:3496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   :
 else
 then
   :
 else
@@ -3508,10 +3518,10 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3512: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3522: checking whether time.h and sys/time.h may both be included" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3515 "configure"
+#line 3525 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -3520,7 +3530,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:3524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -3544,10 +3554,10 @@ EOF
 fi
 
 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:3548: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+echo "configure:3558: checking for sys_siglist declaration in signal.h or unistd.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3551 "configure"
+#line 3561 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3559,7 +3569,7 @@ int main() {
 char *msg = *(sys_siglist + 1);
 ; return 0; }
 EOF
 char *msg = *(sys_siglist + 1);
 ; return 0; }
 EOF
-if { (eval echo configure:3563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_decl_sys_siglist=yes
 else
   rm -rf conftest*
   ac_cv_decl_sys_siglist=yes
 else
@@ -3584,9 +3594,9 @@ fi
 
 
 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
-echo "configure:3588: checking for struct utimbuf" >&5
+echo "configure:3598: checking for struct utimbuf" >&5
 cat > conftest.$ac_ext <<EOF
 cat > conftest.$ac_ext <<EOF
-#line 3590 "configure"
+#line 3600 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -3605,7 +3615,7 @@ int main() {
 static struct utimbuf x; x.actime = x.modtime;
 ; return 0; }
 EOF
 static struct utimbuf x; x.actime = x.modtime;
 ; return 0; }
 EOF
-if { (eval echo configure:3609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3619: \"$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
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
@@ -3625,10 +3635,10 @@ fi
 rm -f conftest*
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
 rm -f conftest*
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3629: checking return type of signal handlers" >&5
+echo "configure:3639: checking return type of signal handlers" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3632 "configure"
+#line 3642 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3645,7 +3655,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3667,10 +3677,10 @@ EOF
 
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3671: checking for size_t" >&5
+echo "configure:3681: checking for size_t" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3674 "configure"
+#line 3684 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3701,10 +3711,10 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3705: checking for pid_t" >&5
+echo "configure:3715: checking for pid_t" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3708 "configure"
+#line 3718 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3735,10 +3745,10 @@ EOF
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3739: checking for uid_t in sys/types.h" >&5
+echo "configure:3749: checking for uid_t in sys/types.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3742 "configure"
+#line 3752 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -3774,10 +3784,10 @@ EOF
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3778: checking for mode_t" >&5
+echo "configure:3788: checking for mode_t" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3781 "configure"
+#line 3791 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3808,10 +3818,10 @@ EOF
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3812: checking for off_t" >&5
+echo "configure:3822: checking for off_t" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3815 "configure"
+#line 3825 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3842,10 +3852,10 @@ EOF
 fi
 
 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:3846: checking for ssize_t" >&5
+echo "configure:3856: checking for ssize_t" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3849 "configure"
+#line 3859 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3877,9 +3887,9 @@ fi
 
 
 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
-echo "configure:3881: checking for struct timeval" >&5
+echo "configure:3891: checking for struct timeval" >&5
 cat > conftest.$ac_ext <<EOF
 cat > conftest.$ac_ext <<EOF
-#line 3883 "configure"
+#line 3893 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -3895,7 +3905,7 @@ int main() {
 static struct timeval x; x.tv_sec = x.tv_usec;
 ; return 0; }
 EOF
 static struct timeval x; x.tv_sec = x.tv_usec;
 ; return 0; }
 EOF
-if { (eval echo configure:3899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
   HAVE_TIMEVAL=yes
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
   HAVE_TIMEVAL=yes
@@ -3917,10 +3927,10 @@ fi
 rm -f conftest*
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
 rm -f conftest*
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:3921: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:3931: checking whether struct tm is in sys/time.h or time.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3924 "configure"
+#line 3934 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -3928,7 +3938,7 @@ int main() {
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:3932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -3952,10 +3962,10 @@ EOF
 fi
 
 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:3956: checking for tm_zone in struct tm" >&5
+echo "configure:3966: checking for tm_zone in struct tm" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3959 "configure"
+#line 3969 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
@@ -3963,7 +3973,7 @@ int main() {
 struct tm tm; tm.tm_zone;
 ; return 0; }
 EOF
 struct tm tm; tm.tm_zone;
 ; return 0; }
 EOF
-if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm_zone=yes
 else
   rm -rf conftest*
   ac_cv_struct_tm_zone=yes
 else
@@ -3986,10 +3996,10 @@ EOF
 
 else
   echo $ac_n "checking for tzname""... $ac_c" 1>&6
 
 else
   echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:3990: checking for tzname" >&5
+echo "configure:4000: checking for tzname" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 3993 "configure"
+#line 4003 "configure"
 #include "confdefs.h"
 #include <time.h>
 #ifndef tzname /* For SGI.  */
 #include "confdefs.h"
 #include <time.h>
 #ifndef tzname /* For SGI.  */
@@ -3999,7 +4009,7 @@ int main() {
 atoi(*tzname);
 ; return 0; }
 EOF
 atoi(*tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
@@ -4025,10 +4035,10 @@ fi
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:4029: checking for working const" >&5
+echo "configure:4039: checking for working const" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 4032 "configure"
+#line 4042 "configure"
 #include "confdefs.h"
 
 int main() {
 #include "confdefs.h"
 
 int main() {
@@ -4077,7 +4087,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:4081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -4102,7 +4112,7 @@ fi
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:4106: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:4116: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 
 cat > conftestmake <<\EOF
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 
 cat > conftestmake <<\EOF
@@ -4127,12 +4137,12 @@ fi
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:4131: checking whether byte ordering is bigendian" >&5
+echo "configure:4141: 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
 
 ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 4136 "configure"
+#line 4146 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -4143,11 +4153,11 @@ int main() {
 #endif
 ; return 0; }
 EOF
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4157: \"$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
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 4151 "configure"
+#line 4161 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -4158,7 +4168,7 @@ int main() {
 #endif
 ; return 0; }
 EOF
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:4162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -4175,7 +4185,7 @@ fi
 rm -f conftest*
 if test $ac_cv_c_bigendian = unknown; then
 cat > conftest.$ac_ext <<EOF
 rm -f conftest*
 if test $ac_cv_c_bigendian = unknown; then
 cat > conftest.$ac_ext <<EOF
-#line 4179 "configure"
+#line 4189 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -4188,7 +4198,7 @@ main () {
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:4192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_c_bigendian=no
 else
 then
   ac_cv_c_bigendian=no
 else
@@ -4215,10 +4225,10 @@ fi
 
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
 
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:4219: checking size of short" >&5
+echo "configure:4229: checking size of short" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 4222 "configure"
+#line 4232 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4229,7 +4239,7 @@ main()
   exit(0);
 }
 EOF
   exit(0);
 }
 EOF
-if { (eval echo configure:4233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -4257,10 +4267,10 @@ if test "$ac_cv_sizeof_short" = 0; then
   exit 1
 fi
 echo $ac_n "checking size of int""... $ac_c" 1>&6
   exit 1
 fi
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:4261: checking size of int" >&5
+echo "configure:4271: checking size of int" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 4264 "configure"
+#line 4274 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4271,7 +4281,7 @@ main()
   exit(0);
 }
 EOF
   exit(0);
 }
 EOF
-if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -4293,10 +4303,10 @@ EOF
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:4297: checking size of long" >&5
+echo "configure:4307: checking size of long" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 4300 "configure"
+#line 4310 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4307,7 +4317,7 @@ main()
   exit(0);
 }
 EOF
   exit(0);
 }
 EOF
-if { (eval echo configure:4311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -4329,10 +4339,10 @@ EOF
 
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
 
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:4333: checking size of long long" >&5
+echo "configure:4343: checking size of long long" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 4336 "configure"
+#line 4346 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4343,7 +4353,7 @@ main()
   exit(0);
 }
 EOF
   exit(0);
 }
 EOF
-if { (eval echo configure:4347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4357: \"$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
 then
   ac_cv_sizeof_long_long=`cat conftestval`
 else
@@ -4365,10 +4375,10 @@ EOF
 
 
 echo $ac_n "checking size of void *""... $ac_c" 1>&6
 
 
 echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:4369: checking size of void *" >&5
+echo "configure:4379: checking size of void *" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 4372 "configure"
+#line 4382 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -4379,7 +4389,7 @@ main()
   exit(0);
 }
 EOF
   exit(0);
 }
 EOF
-if { (eval echo configure:4383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4393: \"$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
 then
   ac_cv_sizeof_void_p=`cat conftestval`
 else
@@ -4402,7 +4412,7 @@ EOF
 
 
 echo $ac_n "checking for long file names""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:4406: checking for long file names" >&5
+echo "configure:4416: 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:
 
 ac_cv_sys_long_file_names=yes
 # Test for long file names in all the places we know might matter:
@@ -4448,10 +4458,10 @@ fi
 
 
 echo $ac_n "checking for sin""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for sin""... $ac_c" 1>&6
-echo "configure:4452: checking for sin" >&5
+echo "configure:4462: checking for sin" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 4455 "configure"
+#line 4465 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char sin(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char sin(); below.  */
@@ -4474,7 +4484,7 @@ sin();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:4478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_sin=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_sin=yes"
 else
@@ -4492,12 +4502,12 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:4496: checking for sin in -lm" >&5
+echo "configure:4506: checking for sin in -lm" >&5
 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lm "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lm "
 cat > conftest.$ac_ext <<EOF
-#line 4501 "configure"
+#line 4511 "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
 #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
@@ -4508,7 +4518,7 @@ int main() {
 sin()
 ; return 0; }
 EOF
 sin()
 ; return 0; }
 EOF
-if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4552,14 +4562,14 @@ EOF
 
 
 cat > conftest.$ac_ext <<EOF
 
 
 cat > conftest.$ac_ext <<EOF
-#line 4556 "configure"
+#line 4566 "configure"
 #include "confdefs.h"
 #include <math.h>
 int main() {
 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
 ; return 0; }
 EOF
 #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:4563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_INVERSE_HYPERBOLIC
   rm -rf conftest*
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_INVERSE_HYPERBOLIC
@@ -4576,14 +4586,14 @@ fi
 rm -f conftest*
 
 echo "checking type of mail spool file locking" 1>&6
 rm -f conftest*
 
 echo "checking type of mail spool file locking" 1>&6
-echo "configure:4580: checking type of mail spool file locking" >&5
+echo "configure:4590: checking type of mail spool file locking" >&5
 for ac_func in lockf flock
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 for ac_func in lockf flock
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4584: checking for $ac_func" >&5
+echo "configure:4594: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 4587 "configure"
+#line 4597 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4606,7 +4616,7 @@ $ac_func();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:4610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4679,12 +4689,12 @@ test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
 case "$opsys" in decosf*)
   
 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
 case "$opsys" in decosf*)
   
 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
-echo "configure:4683: checking for cma_open in -lpthreads" >&5
+echo "configure:4693: 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
 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lpthreads "
 cat > conftest.$ac_ext <<EOF
-#line 4688 "configure"
+#line 4698 "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
 #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
@@ -4695,7 +4705,7 @@ int main() {
 cma_open()
 ; return 0; }
 EOF
 cma_open()
 ; return 0; }
 EOF
-if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4731,7 +4741,7 @@ fi
 esac
 
 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
 esac
 
 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
-echo "configure:4735: checking whether the -xildoff compiler flag is required" >&5
+echo "configure:4745: 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;
 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;
@@ -4742,7 +4752,7 @@ fi
 
 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
 
 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:4746: checking for \"-z ignore\" linker flag" >&5
+echo "configure:4756: 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 ;;
   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 ;;
@@ -4752,7 +4762,7 @@ fi
 
 
 echo "checking "for specified window system"" 1>&6
 
 
 echo "checking "for specified window system"" 1>&6
-echo "configure:4756: checking "for specified window system"" >&5
+echo "configure:4766: checking "for specified window system"" >&5
 
 if test "$with_x11" != "no"; then
     test "$x_includes $x_libraries" != "NONE NONE" && \
 
 if test "$with_x11" != "no"; then
     test "$x_includes $x_libraries" != "NONE NONE" && \
@@ -4785,7 +4795,7 @@ if test "$with_x11" != "no"; then
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
 # 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:4789: checking for X" >&5
+echo "configure:4799: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -4845,12 +4855,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 4849 "configure"
+#line 4859 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4919,14 +4929,14 @@ if test "$ac_x_libraries" = NO; then
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4923 "configure"
+#line 4933 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:4930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -5035,17 +5045,17 @@ else
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
     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:5039: checking whether -R must be followed by a space" >&5
+echo "configure:5049: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 5042 "configure"
+#line 5052 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -5061,14 +5071,14 @@ rm -f conftest*
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 5065 "configure"
+#line 5075 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -5104,12 +5114,12 @@ ac_cv_lib_dnet_dnet_ntoa=no
 else
 
 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
 else
 
 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:5108: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:5118: 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
 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldnet "
 cat > conftest.$ac_ext <<EOF
-#line 5113 "configure"
+#line 5123 "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
 #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
@@ -5120,7 +5130,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:5124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5144,12 +5154,12 @@ fi
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       
 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
     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:5148: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:5158: 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
 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldnet_stub "
 cat > conftest.$ac_ext <<EOF
-#line 5153 "configure"
+#line 5163 "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
 #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
@@ -5160,7 +5170,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:5164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5189,10 +5199,10 @@ fi
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey@clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
     # 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:5193: checking for gethostbyname" >&5
+echo "configure:5203: checking for gethostbyname" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 5196 "configure"
+#line 5206 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -5215,7 +5225,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:5219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -5236,12 +5246,12 @@ fi
     if test $ac_cv_func_gethostbyname = no; then
       
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
     if test $ac_cv_func_gethostbyname = no; then
       
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:5240: checking for gethostbyname in -lnsl" >&5
+echo "configure:5250: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lnsl "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lnsl "
 cat > conftest.$ac_ext <<EOF
-#line 5245 "configure"
+#line 5255 "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
 #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
@@ -5252,7 +5262,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:5256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5282,10 +5292,10 @@ fi
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
     # -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:5286: checking for connect" >&5
+echo "configure:5296: checking for connect" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 5289 "configure"
+#line 5299 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -5308,7 +5318,7 @@ connect();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:5312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -5331,12 +5341,12 @@ fi
 xe_msg_checking="for connect in -lsocket"
 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
 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:5335: checking "$xe_msg_checking"" >&5
+echo "configure:5345: 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
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5340 "configure"
+#line 5350 "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
 #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
@@ -5347,7 +5357,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:5351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5371,10 +5381,10 @@ fi
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:5375: checking for remove" >&5
+echo "configure:5385: checking for remove" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 5378 "configure"
+#line 5388 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -5397,7 +5407,7 @@ remove();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:5401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -5418,12 +5428,12 @@ fi
     if test $ac_cv_func_remove = no; then
       
 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
     if test $ac_cv_func_remove = no; then
       
 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:5422: checking for remove in -lposix" >&5
+echo "configure:5432: checking for remove in -lposix" >&5
 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lposix "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lposix "
 cat > conftest.$ac_ext <<EOF
-#line 5427 "configure"
+#line 5437 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5434,7 +5444,7 @@ int main() {
 remove()
 ; return 0; }
 EOF
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:5438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5458,10 +5468,10 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:5462: checking for shmat" >&5
+echo "configure:5472: checking for shmat" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 5465 "configure"
+#line 5475 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -5484,7 +5494,7 @@ shmat();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:5488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -5505,12 +5515,12 @@ fi
     if test $ac_cv_func_shmat = no; then
       
 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
     if test $ac_cv_func_shmat = no; then
       
 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:5509: checking for shmat in -lipc" >&5
+echo "configure:5519: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lipc "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lipc "
 cat > conftest.$ac_ext <<EOF
-#line 5514 "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
 #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
@@ -5521,7 +5531,7 @@ int main() {
 shmat()
 ; return 0; }
 EOF
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5557,12 +5567,12 @@ fi
 xe_msg_checking="for IceConnectionNumber in -lICE"
 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
 xe_msg_checking="for IceConnectionNumber in -lICE"
 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:5561: checking "$xe_msg_checking"" >&5
+echo "configure:5571: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lICE $X_EXTRA_LIBS"
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lICE $X_EXTRA_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5566 "configure"
+#line 5576 "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
 #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
@@ -5573,7 +5583,7 @@ int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:5577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5742,7 +5752,7 @@ EOF
 
 
     echo "checking for X defines extracted by xmkmf" 1>&6
 
 
     echo "checking for X defines extracted by xmkmf" 1>&6
-echo "configure:5746: checking for X defines extracted by xmkmf" >&5
+echo "configure:5756: checking for X defines extracted by xmkmf" >&5
   rm -fr conftestdir
   if mkdir conftestdir; then
     cd conftestdir
   rm -fr conftestdir
   if mkdir conftestdir; then
     cd conftestdir
@@ -5774,15 +5784,15 @@ EOF
 
     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
 
     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
-echo "configure:5778: checking for X11/Intrinsic.h" >&5
+echo "configure:5788: checking for X11/Intrinsic.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 5781 "configure"
+#line 5791 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5806,12 +5816,12 @@ fi
 
       
 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
 
       
 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:5810: checking for XOpenDisplay in -lX11" >&5
+echo "configure:5820: checking for XOpenDisplay in -lX11" >&5
 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
-#line 5815 "configure"
+#line 5825 "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
 #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
@@ -5822,7 +5832,7 @@ int main() {
 XOpenDisplay()
 ; return 0; }
 EOF
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:5826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5847,12 +5857,12 @@ fi
 xe_msg_checking="for XGetFontProperty in -lX11"
 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
 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:5851: checking "$xe_msg_checking"" >&5
+echo "configure:5861: 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
 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 -b i486-linuxaout"
 cat > conftest.$ac_ext <<EOF
-#line 5856 "configure"
+#line 5866 "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
 #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
@@ -5863,7 +5873,7 @@ int main() {
 XGetFontProperty()
 ; return 0; }
 EOF
 XGetFontProperty()
 ; return 0; }
 EOF
-if { (eval echo configure:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5890,12 +5900,12 @@ fi
 
     
 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
 
     
 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
-echo "configure:5894: checking for XShapeSelectInput in -lXext" >&5
+echo "configure:5904: checking for XShapeSelectInput in -lXext" >&5
 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXext "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXext "
 cat > conftest.$ac_ext <<EOF
-#line 5899 "configure"
+#line 5909 "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
 #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
@@ -5906,7 +5916,7 @@ int main() {
 XShapeSelectInput()
 ; return 0; }
 EOF
 XShapeSelectInput()
 ; return 0; }
 EOF
-if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5929,12 +5939,12 @@ fi
 
     
 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
 
     
 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
-echo "configure:5933: checking for XtOpenDisplay in -lXt" >&5
+echo "configure:5943: checking for XtOpenDisplay in -lXt" >&5
 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXt "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXt "
 cat > conftest.$ac_ext <<EOF
-#line 5938 "configure"
+#line 5948 "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
 #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
@@ -5945,7 +5955,7 @@ int main() {
 XtOpenDisplay()
 ; return 0; }
 EOF
 XtOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:5949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5968,14 +5978,14 @@ fi
 
 
   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
 
 
   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
-echo "configure:5972: checking the version of X11 being used" >&5
+echo "configure:5982: checking the version of X11 being used" >&5
   cat > conftest.$ac_ext <<EOF
   cat > conftest.$ac_ext <<EOF
-#line 5974 "configure"
+#line 5984 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
 EOF
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
 EOF
-if { (eval echo configure:5979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:5989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ./conftest foobar; x11_release=$?
 else
 then
   ./conftest foobar; x11_release=$?
 else
@@ -6000,15 +6010,15 @@ EOF
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6004: checking for $ac_hdr" >&5
+echo "configure:6014: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 6007 "configure"
+#line 6017 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6039,7 +6049,7 @@ done
 
 
     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
 
 
     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
-echo "configure:6043: checking for XFree86" >&5
+echo "configure:6053: checking for XFree86" >&5
   if test -d "/usr/X386/include" -o \
           -f "/etc/XF86Config"    -o \
          -f "/etc/X11/XF86Config" -o \
   if test -d "/usr/X386/include" -o \
           -f "/etc/XF86Config"    -o \
          -f "/etc/X11/XF86Config" -o \
@@ -6059,12 +6069,12 @@ EOF
 
     test -z "$with_xmu" && { 
 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
 
     test -z "$with_xmu" && { 
 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
-echo "configure:6063: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
+echo "configure:6073: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXmu "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXmu "
 cat > conftest.$ac_ext <<EOF
-#line 6068 "configure"
+#line 6078 "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
 #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
@@ -6075,7 +6085,7 @@ int main() {
 XmuReadBitmapDataFromFile()
 ; return 0; }
 EOF
 XmuReadBitmapDataFromFile()
 ; return 0; }
 EOF
-if { (eval echo configure:6079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6114,19 +6124,19 @@ EOF
 
       
 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
 
       
 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:6118: checking for main in -lXbsd" >&5
+echo "configure:6128: checking for main in -lXbsd" >&5
 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXbsd "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXbsd "
 cat > conftest.$ac_ext <<EOF
-#line 6123 "configure"
+#line 6133 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:6130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6163,22 +6173,22 @@ fi
 fi 
 if test "$with_msw" != "no"; then
   echo "checking for MS-Windows" 1>&6
 fi 
 if test "$with_msw" != "no"; then
   echo "checking for MS-Windows" 1>&6
-echo "configure:6167: checking for MS-Windows" >&5
+echo "configure:6177: checking for MS-Windows" >&5
   
 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
   
 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
-echo "configure:6170: checking for main in -lgdi32" >&5
+echo "configure:6180: checking for main in -lgdi32" >&5
 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgdi32 "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgdi32 "
 cat > conftest.$ac_ext <<EOF
-#line 6175 "configure"
+#line 6185 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:6182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6208,7 +6218,7 @@ EOF
 }
 
     install_pp="$blddir/lib-src/installexe.sh"
 }
 
     install_pp="$blddir/lib-src/installexe.sh"
-    libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
+    libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool\" to \$libs_system"; fi
     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
     if test "$window_system" != x11; then
        window_system=msw
     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
     if test "$window_system" != x11; then
        window_system=msw
@@ -6244,12 +6254,12 @@ EOF
  fi
     fi
         cat > conftest.$ac_ext <<EOF
  fi
     fi
         cat > conftest.$ac_ext <<EOF
-#line 6248 "configure"
+#line 6258 "configure"
 #include "confdefs.h"
 #include <fcntl.h>
     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
 EOF
 #include "confdefs.h"
 #include <fcntl.h>
     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
 EOF
-if { (eval echo configure:6253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:6263: \"$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
 then
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_MSG_SELECT
@@ -6325,7 +6335,7 @@ case "$x_libraries" in *X11R4* )
 esac
 
 echo "checking for WM_COMMAND option" 1>&6
 esac
 
 echo "checking for WM_COMMAND option" 1>&6
-echo "configure:6329: checking for WM_COMMAND option" >&5;
+echo "configure:6339: checking for WM_COMMAND option" >&5;
 if test "$with_wmcommand" != "no"; then
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_WMCOMMAND
 if test "$with_wmcommand" != "no"; then
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_WMCOMMAND
@@ -6340,15 +6350,15 @@ fi
 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
 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:6344: checking for X11/Xauth.h" >&5
+echo "configure:6354: checking for X11/Xauth.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 6347 "configure"
+#line 6357 "configure"
 #include "confdefs.h"
 #include <X11/Xauth.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/Xauth.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6371,12 +6381,12 @@ fi
  }
 test -z "$with_xauth" && { 
 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
  }
 test -z "$with_xauth" && { 
 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
-echo "configure:6375: checking for XauGetAuthByAddr in -lXau" >&5
+echo "configure:6385: checking for XauGetAuthByAddr in -lXau" >&5
 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXau "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXau "
 cat > conftest.$ac_ext <<EOF
-#line 6380 "configure"
+#line 6390 "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
 #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
@@ -6387,7 +6397,7 @@ int main() {
 XauGetAuthByAddr()
 ; return 0; }
 EOF
 XauGetAuthByAddr()
 ; return 0; }
 EOF
-if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6432,15 +6442,15 @@ if test "$with_tooltalk" != "no" ; then
       for dir in "" "Tt/" "desktop/" ; do
     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
       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:6436: checking for ${dir}tt_c.h" >&5
+echo "configure:6446: checking for ${dir}tt_c.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 6439 "configure"
+#line 6449 "configure"
 #include "confdefs.h"
 #include <${dir}tt_c.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <${dir}tt_c.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6476,12 +6486,12 @@ if test "$with_tooltalk" != "no" ; then
 xe_msg_checking="for tt_message_create in -ltt"
 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
 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:6480: checking "$xe_msg_checking"" >&5
+echo "configure:6490: 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
 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ltt $extra_libs"
 cat > conftest.$ac_ext <<EOF
-#line 6485 "configure"
+#line 6495 "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
 #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
@@ -6492,7 +6502,7 @@ int main() {
 tt_message_create()
 ; return 0; }
 EOF
 tt_message_create()
 ; return 0; }
 EOF
-if { (eval echo configure:6496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6549,15 +6559,15 @@ fi
 
 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
 
 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:6553: checking for Dt/Dt.h" >&5
+echo "configure:6563: checking for Dt/Dt.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 6556 "configure"
+#line 6566 "configure"
 #include "confdefs.h"
 #include <Dt/Dt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <Dt/Dt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6580,12 +6590,12 @@ fi
  }
 test -z "$with_cde" && { 
 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
  }
 test -z "$with_cde" && { 
 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
-echo "configure:6584: checking for DtDndDragStart in -lDtSvc" >&5
+echo "configure:6594: checking for DtDndDragStart in -lDtSvc" >&5
 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lDtSvc "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lDtSvc "
 cat > conftest.$ac_ext <<EOF
-#line 6589 "configure"
+#line 6599 "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
 #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
@@ -6596,7 +6606,7 @@ int main() {
 DtDndDragStart()
 ; return 0; }
 EOF
 DtDndDragStart()
 ; return 0; }
 EOF
-if { (eval echo configure:6600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6665,7 +6675,7 @@ EOF
 fi
 
 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
-echo "configure:6669: checking if drag and drop API is needed" >&5
+echo "configure:6679: checking if drag and drop API is needed" >&5
 if test "$with_dragndrop" != "no" ; then
   if test -n "$dragndrop_proto" ; then
     with_dragndrop=yes
 if test "$with_dragndrop" != "no" ; then
   if test -n "$dragndrop_proto" ; then
     with_dragndrop=yes
@@ -6686,18 +6696,18 @@ EOF
 fi
 
 echo "checking for LDAP" 1>&6
 fi
 
 echo "checking for LDAP" 1>&6
-echo "configure:6690: checking for LDAP" >&5
+echo "configure:6700: 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
 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:6693: checking for ldap.h" >&5
+echo "configure:6703: checking for ldap.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 6696 "configure"
+#line 6706 "configure"
 #include "confdefs.h"
 #include <ldap.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <ldap.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6720,15 +6730,15 @@ fi
  }
 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
  }
 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:6724: checking for lber.h" >&5
+echo "configure:6734: checking for lber.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 6727 "configure"
+#line 6737 "configure"
 #include "confdefs.h"
 #include <lber.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <lber.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6752,12 +6762,12 @@ fi
 if test "$with_ldap" != "no"; then
   
 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
 if test "$with_ldap" != "no"; then
   
 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
-echo "configure:6756: checking for ldap_search in -lldap" >&5
+echo "configure:6766: checking for ldap_search in -lldap" >&5
 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lldap "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lldap "
 cat > conftest.$ac_ext <<EOF
-#line 6761 "configure"
+#line 6771 "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
 #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
@@ -6768,7 +6778,7 @@ int main() {
 ldap_search()
 ; return 0; }
 EOF
 ldap_search()
 ; return 0; }
 EOF
-if { (eval echo configure:6772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6793,12 +6803,12 @@ fi
 xe_msg_checking="for ldap_open in -lldap"
 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
 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:6797: checking "$xe_msg_checking"" >&5
+echo "configure:6807: 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
 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lldap -llber"
 cat > conftest.$ac_ext <<EOF
-#line 6802 "configure"
+#line 6812 "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
 #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
@@ -6809,7 +6819,7 @@ int main() {
 ldap_open()
 ; return 0; }
 EOF
 ldap_open()
 ; return 0; }
 EOF
-if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6834,12 +6844,12 @@ fi
 xe_msg_checking="for ldap_open in -lldap"
 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
 xe_msg_checking="for ldap_open in -lldap"
 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:6838: checking "$xe_msg_checking"" >&5
+echo "configure:6848: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lldap -llber -lkrb"
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lldap -llber -lkrb"
 cat > conftest.$ac_ext <<EOF
-#line 6843 "configure"
+#line 6853 "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
 #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
@@ -6850,7 +6860,7 @@ int main() {
 ldap_open()
 ; return 0; }
 EOF
 ldap_open()
 ; return 0; }
 EOF
-if { (eval echo configure:6854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6875,12 +6885,12 @@ fi
 xe_msg_checking="for ldap_open in -lldap"
 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
 xe_msg_checking="for ldap_open in -lldap"
 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:6879: checking "$xe_msg_checking"" >&5
+echo "configure:6889: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lldap -llber -lkrb -ldes"
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lldap -llber -lkrb -ldes"
 cat > conftest.$ac_ext <<EOF
-#line 6884 "configure"
+#line 6894 "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
 #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
@@ -6891,7 +6901,7 @@ int main() {
 ldap_open()
 ; return 0; }
 EOF
 ldap_open()
 ; return 0; }
 EOF
-if { (eval echo configure:6895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6942,10 +6952,10 @@ EOF
   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6946: checking for $ac_func" >&5
+echo "configure:6956: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 6949 "configure"
+#line 6959 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6968,7 +6978,7 @@ $ac_func();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:6972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7000,15 +7010,15 @@ fi
 
 if test "$window_system" != "none"; then
   echo "checking for graphics libraries" 1>&6
 
 if test "$window_system" != "none"; then
   echo "checking for graphics libraries" 1>&6
-echo "configure:7004: checking for graphics libraries" >&5
+echo "configure:7014: 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
 
     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:7009: checking for Xpm - no older than 3.4f" >&5
+echo "configure:7019: checking for Xpm - no older than 3.4f" >&5
     xe_check_libs=-lXpm
     cat > conftest.$ac_ext <<EOF
     xe_check_libs=-lXpm
     cat > conftest.$ac_ext <<EOF
-#line 7012 "configure"
+#line 7022 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
     int main(int c, char **v) {
 #include "confdefs.h"
 #include <X11/xpm.h>
     int main(int c, char **v) {
@@ -7016,7 +7026,7 @@ echo "configure:7009: checking for Xpm - no older than 3.4f" >&5
       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
       XpmIncludeVersion < 30406 ? 2 : 0 ;}
 EOF
       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
       XpmIncludeVersion < 30406 ? 2 : 0 ;}
 EOF
-if { (eval echo configure:7020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:7030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ./conftest dummy_arg; xpm_status=$?;
       if test "$xpm_status" = "0"; then
 then
   ./conftest dummy_arg; xpm_status=$?;
       if test "$xpm_status" = "0"; then
@@ -7058,17 +7068,17 @@ EOF
 
     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
 
     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:7062: checking for \"FOR_MSW\" xpm" >&5
+echo "configure:7072: checking for \"FOR_MSW\" xpm" >&5
     xe_check_libs=-lXpm
     cat > conftest.$ac_ext <<EOF
     xe_check_libs=-lXpm
     cat > conftest.$ac_ext <<EOF
-#line 7065 "configure"
+#line 7075 "configure"
 #include "confdefs.h"
 
 int main() {
 XpmCreatePixmapFromData()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 XpmCreatePixmapFromData()
 ; return 0; }
 EOF
-if { (eval echo configure:7072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   xpm_for_msw=no
 else
   rm -rf conftest*
   xpm_for_msw=no
 else
@@ -7094,15 +7104,15 @@ EOF
 
     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
 
     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:7098: checking for compface.h" >&5
+echo "configure:7108: checking for compface.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 7101 "configure"
+#line 7111 "configure"
 #include "confdefs.h"
 #include <compface.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <compface.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7125,12 +7135,12 @@ fi
  }
   test -z "$with_xface" && { 
 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
  }
   test -z "$with_xface" && { 
 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
-echo "configure:7129: checking for UnGenFace in -lcompface" >&5
+echo "configure:7139: checking for UnGenFace in -lcompface" >&5
 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcompface "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcompface "
 cat > conftest.$ac_ext <<EOF
-#line 7134 "configure"
+#line 7144 "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
 #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
@@ -7141,7 +7151,7 @@ int main() {
 UnGenFace()
 ; return 0; }
 EOF
 UnGenFace()
 ; return 0; }
 EOF
-if { (eval echo configure:7145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7193,12 +7203,12 @@ EOF
       if test "$with_png $with_tiff" != "no no"; then
     
 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
       if test "$with_png $with_tiff" != "no no"; then
     
 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
-echo "configure:7197: checking for inflate in -lc" >&5
+echo "configure:7207: checking for inflate in -lc" >&5
 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lc "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lc "
 cat > conftest.$ac_ext <<EOF
-#line 7202 "configure"
+#line 7212 "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
 #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
@@ -7209,7 +7219,7 @@ int main() {
 inflate()
 ; return 0; }
 EOF
 inflate()
 ; return 0; }
 EOF
-if { (eval echo configure:7213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7228,12 +7238,12 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
-echo "configure:7232: checking for inflate in -lz" >&5
+echo "configure:7242: checking for inflate in -lz" >&5
 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lz "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lz "
 cat > conftest.$ac_ext <<EOF
-#line 7237 "configure"
+#line 7247 "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
 #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
@@ -7244,7 +7254,7 @@ int main() {
 inflate()
 ; return 0; }
 EOF
 inflate()
 ; return 0; }
 EOF
-if { (eval echo configure:7248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7263,12 +7273,12 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
-echo "configure:7267: checking for inflate in -lgz" >&5
+echo "configure:7277: checking for inflate in -lgz" >&5
 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgz "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgz "
 cat > conftest.$ac_ext <<EOF
-#line 7272 "configure"
+#line 7282 "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
 #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
@@ -7279,7 +7289,7 @@ int main() {
 inflate()
 ; return 0; }
 EOF
 inflate()
 ; return 0; }
 EOF
-if { (eval echo configure:7283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7309,15 +7319,15 @@ fi
 
     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
 
     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:7313: checking for jpeglib.h" >&5
+echo "configure:7323: checking for jpeglib.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 7316 "configure"
+#line 7326 "configure"
 #include "confdefs.h"
 #include <jpeglib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <jpeglib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7340,12 +7350,12 @@ fi
  }
   test -z "$with_jpeg" && { 
 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
  }
   test -z "$with_jpeg" && { 
 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
-echo "configure:7344: checking for jpeg_destroy_decompress in -ljpeg" >&5
+echo "configure:7354: 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
 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ljpeg "
 cat > conftest.$ac_ext <<EOF
-#line 7349 "configure"
+#line 7359 "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
 #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
@@ -7356,7 +7366,7 @@ int main() {
 jpeg_destroy_decompress()
 ; return 0; }
 EOF
 jpeg_destroy_decompress()
 ; return 0; }
 EOF
-if { (eval echo configure:7360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7392,10 +7402,10 @@ EOF
 
     png_problem=""
   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
 
     png_problem=""
   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
-echo "configure:7396: checking for pow" >&5
+echo "configure:7406: checking for pow" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 7399 "configure"
+#line 7409 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pow(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pow(); below.  */
@@ -7418,7 +7428,7 @@ pow();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:7422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_pow=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_pow=yes"
 else
@@ -7439,15 +7449,15 @@ fi
  }
   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for png.h""... $ac_c" 1>&6
  }
   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:7443: checking for png.h" >&5
+echo "configure:7453: checking for png.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 7446 "configure"
+#line 7456 "configure"
 #include "confdefs.h"
 #include <png.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <png.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7470,12 +7480,12 @@ fi
  }
   test -z "$with_png" && { 
 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
  }
   test -z "$with_png" && { 
 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
-echo "configure:7474: checking for png_read_image in -lpng" >&5
+echo "configure:7484: 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
 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lpng "
 cat > conftest.$ac_ext <<EOF
-#line 7479 "configure"
+#line 7489 "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
 #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
@@ -7486,7 +7496,7 @@ int main() {
 png_read_image()
 ; return 0; }
 EOF
 png_read_image()
 ; return 0; }
 EOF
-if { (eval echo configure:7490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7509,10 +7519,10 @@ fi
  }
   if test -z "$with_png"; then
     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
  }
   if test -z "$with_png"; then
     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
-echo "configure:7513: checking for workable png version information" >&5
+echo "configure:7523: checking for workable png version information" >&5
     xe_check_libs="-lpng -lz"
     cat > conftest.$ac_ext <<EOF
     xe_check_libs="-lpng -lz"
     cat > conftest.$ac_ext <<EOF
-#line 7516 "configure"
+#line 7526 "configure"
 #include "confdefs.h"
 #include <png.h>
     int main(int c, char **v) {
 #include "confdefs.h"
 #include <png.h>
     int main(int c, char **v) {
@@ -7520,7 +7530,7 @@ echo "configure:7513: checking for workable png version information" >&5
     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
 EOF
     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
 EOF
-if { (eval echo configure:7524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:7534: \"$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
 then
   ./conftest dummy_arg; png_status=$?;
       if test "$png_status" = "0"; then
@@ -7563,15 +7573,15 @@ EOF
 
     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
 
     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:7567: checking for tiffio.h" >&5
+echo "configure:7577: checking for tiffio.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 7570 "configure"
+#line 7580 "configure"
 #include "confdefs.h"
 #include <tiffio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <tiffio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7575: \"$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 | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7594,12 +7604,12 @@ fi
  }
   test -z "$with_tiff" && { 
 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
  }
   test -z "$with_tiff" && { 
 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
-echo "configure:7598: checking for TIFFClientOpen in -ltiff" >&5
+echo "configure:7608: checking for TIFFClientOpen in -ltiff" >&5
 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ltiff "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ltiff "
 cat > conftest.$ac_ext <<EOF
-#line 7603 "configure"
+#line 7613 "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
 #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
@@ -7610,7 +7620,7 @@ int main() {
 TIFFClientOpen()
 ; return 0; }
 EOF
 TIFFClientOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:7614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7649,10 +7659,10 @@ fi
 if test "$with_x11" = "yes"; then
 
   echo "checking for X11 graphics libraries" 1>&6
 if test "$with_x11" = "yes"; then
 
   echo "checking for X11 graphics libraries" 1>&6
-echo "configure:7653: checking for X11 graphics libraries" >&5
+echo "configure:7663: checking for X11 graphics libraries" >&5
 
   echo "checking for the Athena widgets" 1>&6
 
   echo "checking for the Athena widgets" 1>&6
-echo "configure:7656: checking for the Athena widgets" >&5
+echo "configure:7666: checking for the Athena widgets" >&5
 
     case "$with_athena" in
         "xaw" | "")    athena_variant=Xaw      athena_3d=no  ;;
 
     case "$with_athena" in
         "xaw" | "")    athena_variant=Xaw      athena_3d=no  ;;
@@ -7666,12 +7676,12 @@ echo "configure:7656: checking for the Athena widgets" >&5
     if test "$athena_3d" = "no"; then
     
 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
     if test "$athena_3d" = "no"; then
     
 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
-echo "configure:7670: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
+echo "configure:7680: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$athena_variant "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$athena_variant "
 cat > conftest.$ac_ext <<EOF
-#line 7675 "configure"
+#line 7685 "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
 #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
@@ -7682,7 +7692,7 @@ int main() {
 XawScrollbarSetThumb()
 ; return 0; }
 EOF
 XawScrollbarSetThumb()
 ; return 0; }
 EOF
-if { (eval echo configure:7686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7698,12 +7708,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
   echo "$ac_t""yes" 1>&6
           
 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
   echo "$ac_t""yes" 1>&6
           
 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
-echo "configure:7702: checking for threeDClassRec in -l$athena_variant" >&5
+echo "configure:7712: checking for threeDClassRec in -l$athena_variant" >&5
 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$athena_variant "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$athena_variant "
 cat > conftest.$ac_ext <<EOF
-#line 7707 "configure"
+#line 7717 "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
 #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
@@ -7714,7 +7724,7 @@ int main() {
 threeDClassRec()
 ; return 0; }
 EOF
 threeDClassRec()
 ; return 0; }
 EOF
-if { (eval echo configure:7718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7745,12 +7755,12 @@ fi
   else
         
 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
   else
         
 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
-echo "configure:7749: checking for threeDClassRec in -l$athena_variant" >&5
+echo "configure:7759: checking for threeDClassRec in -l$athena_variant" >&5
 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$athena_variant "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$athena_variant "
 cat > conftest.$ac_ext <<EOF
-#line 7754 "configure"
+#line 7764 "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
 #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
@@ -7761,7 +7771,7 @@ int main() {
 threeDClassRec()
 ; return 0; }
 EOF
 threeDClassRec()
 ; return 0; }
 EOF
-if { (eval echo configure:7765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7779,12 +7789,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
-echo "configure:7783: checking for threeDClassRec in -lXaw" >&5
+echo "configure:7793: checking for threeDClassRec in -lXaw" >&5
 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXaw "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXaw "
 cat > conftest.$ac_ext <<EOF
-#line 7788 "configure"
+#line 7798 "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
 #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
@@ -7795,7 +7805,7 @@ int main() {
 threeDClassRec()
 ; return 0; }
 EOF
 threeDClassRec()
 ; return 0; }
 EOF
-if { (eval echo configure:7799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7826,15 +7836,15 @@ fi
     if test "$athena_3d" = "no"; then
     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
     if test "$athena_3d" = "no"; then
     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
-echo "configure:7830: checking for X11/Xaw/ThreeD.h" >&5
+echo "configure:7840: checking for X11/Xaw/ThreeD.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 7833 "configure"
+#line 7843 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/Xaw/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7854,15 +7864,15 @@ else
   echo "$ac_t""no" 1>&6
 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
   echo "$ac_t""no" 1>&6
 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
-echo "configure:7858: checking for X11/Xaw/XawInit.h" >&5
+echo "configure:7868: checking for X11/Xaw/XawInit.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 7861 "configure"
+#line 7871 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/XawInit.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/Xaw/XawInit.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7888,15 +7898,15 @@ fi
   else
             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
   else
             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
-echo "configure:7892: checking for X11/$athena_variant/XawInit.h" >&5
+echo "configure:7902: checking for X11/$athena_variant/XawInit.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 7895 "configure"
+#line 7905 "configure"
 #include "confdefs.h"
 #include <X11/$athena_variant/XawInit.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/$athena_variant/XawInit.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7913,15 +7923,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
-echo "configure:7917: checking for X11/$athena_variant/ThreeD.h" >&5
+echo "configure:7927: checking for X11/$athena_variant/ThreeD.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 7920 "configure"
+#line 7930 "configure"
 #include "confdefs.h"
 #include <X11/$athena_variant/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/$athena_variant/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7946,18 +7956,80 @@ else
 fi
 
 
 fi
 
 
+        if test -z "$athena_h_path"; then
+      ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
+echo "configure:7963: checking for $athena_variant/XawInit.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7966 "configure"
+#include "confdefs.h"
+#include <$athena_variant/XawInit.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
+echo "configure:7988: checking for $athena_variant/ThreeD.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7991 "configure"
+#include "confdefs.h"
+#include <$athena_variant/ThreeD.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  athena_h_path=$athena_variant
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    fi
+
         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
-echo "configure:7953: checking for X11/Xaw3d/XawInit.h" >&5
+echo "configure:8025: checking for X11/Xaw3d/XawInit.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 7956 "configure"
+#line 8028 "configure"
 #include "confdefs.h"
 #include <X11/Xaw3d/XawInit.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/Xaw3d/XawInit.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7974,15 +8046,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
-echo "configure:7978: checking for X11/Xaw3d/ThreeD.h" >&5
+echo "configure:8050: checking for X11/Xaw3d/ThreeD.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 7981 "configure"
+#line 8053 "configure"
 #include "confdefs.h"
 #include <X11/Xaw3d/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/Xaw3d/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8011,18 +8083,83 @@ fi
 
     fi
 
 
     fi
 
+        if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
+      ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
+echo "configure:8090: checking for Xaw3d/XawInit.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8093 "configure"
+#include "confdefs.h"
+#include <Xaw3d/XawInit.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
+echo "configure:8115: checking for Xaw3d/ThreeD.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8118 "configure"
+#include "confdefs.h"
+#include <Xaw3d/ThreeD.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+            echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
+            athena_h_path=Xaw3d
+          
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    fi
+
             if test -z "$athena_h_path"; then
       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
             if test -z "$athena_h_path"; then
       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
-echo "configure:8018: checking for X11/Xaw/ThreeD.h" >&5
+echo "configure:8155: checking for X11/Xaw/ThreeD.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 8021 "configure"
+#line 8158 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <X11/Xaw/ThreeD.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8057,15 +8194,15 @@ fi
 
     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
 
     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:8061: checking for Xm/Xm.h" >&5
+echo "configure:8198: checking for Xm/Xm.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 8064 "configure"
+#line 8201 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8082,12 +8219,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   
 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
   echo "$ac_t""yes" 1>&6
   
 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
-echo "configure:8086: checking for XmStringFree in -lXm" >&5
+echo "configure:8223: checking for XmStringFree in -lXm" >&5
 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXm "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXm "
 cat > conftest.$ac_ext <<EOF
-#line 8091 "configure"
+#line 8228 "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
 #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
@@ -8098,7 +8235,7 @@ int main() {
 XmStringFree()
 ; return 0; }
 EOF
 XmStringFree()
 ; return 0; }
 EOF
-if { (eval echo configure:8102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8127,9 +8264,9 @@ fi
 
   if test "$have_motif" = "yes"; then
         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
 
   if test "$have_motif" = "yes"; then
         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
-echo "configure:8131: checking for Lesstif" >&5
+echo "configure:8268: checking for Lesstif" >&5
     cat > conftest.$ac_ext <<EOF
     cat > conftest.$ac_ext <<EOF
-#line 8133 "configure"
+#line 8270 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 #ifdef LESSTIF_VERSION
 #include "confdefs.h"
 #include <Xm/Xm.h>
 #ifdef LESSTIF_VERSION
@@ -8351,7 +8488,7 @@ cat >> confdefs.h <<\EOF
 EOF
 }
 
 EOF
 }
 
-test "$with_widgets"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
+test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_WIDGETS
 EOF
 cat >> confdefs.h <<\EOF
     Defining HAVE_WIDGETS
 EOF
 cat >> confdefs.h <<\EOF
@@ -8410,30 +8547,30 @@ EOF
 }
 
 
 }
 
 
-test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
+test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"menubar.o\""
  fi
    echo "    xemacs will be linked with \"menubar.o\""
  fi
-test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
+test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"scrollbar.o\""
  fi
    echo "    xemacs will be linked with \"scrollbar.o\""
  fi
-test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
+test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"dialog.o\""
  fi
    echo "    xemacs will be linked with \"dialog.o\""
  fi
-test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
+test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"toolbar.o\""
  fi
 
 if test "$with_x11" = "yes"; then
    echo "    xemacs will be linked with \"toolbar.o\""
  fi
 
 if test "$with_x11" = "yes"; then
-  test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
+  test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"menubar-x.o\""
  fi
    echo "    xemacs will be linked with \"menubar-x.o\""
  fi
-  test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
+  test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"scrollbar-x.o\""
  fi
    echo "    xemacs will be linked with \"scrollbar-x.o\""
  fi
-  test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
+  test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"dialog-x.o\""
  fi
    echo "    xemacs will be linked with \"dialog-x.o\""
  fi
-  test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
+  test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"toolbar-x.o\""
  fi
   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"toolbar-x.o\""
  fi
   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
@@ -8462,7 +8599,7 @@ fi
 
 if test "$with_mule" = "yes" ; then
   echo "checking for Mule-related features" 1>&6
 
 if test "$with_mule" = "yes" ; then
   echo "checking for Mule-related features" 1>&6
-echo "configure:8466: checking for Mule-related features" >&5
+echo "configure:8603: checking for Mule-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining MULE
 EOF
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining MULE
 EOF
@@ -8487,15 +8624,15 @@ EOF
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8491: checking for $ac_hdr" >&5
+echo "configure:8628: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 8494 "configure"
+#line 8631 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8526,12 +8663,12 @@ done
 
   
 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
 
   
 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
-echo "configure:8530: checking for strerror in -lintl" >&5
+echo "configure:8667: checking for strerror in -lintl" >&5
 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lintl "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lintl "
 cat > conftest.$ac_ext <<EOF
-#line 8535 "configure"
+#line 8672 "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
 #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
@@ -8542,7 +8679,7 @@ int main() {
 strerror()
 ; return 0; }
 EOF
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:8546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8575,18 +8712,18 @@ fi
 
 
   echo "checking for Mule input methods" 1>&6
 
 
   echo "checking for Mule input methods" 1>&6
-echo "configure:8579: checking for Mule input methods" >&5
+echo "configure:8716: checking for Mule input methods" >&5
         case "$with_xim" in "" | "yes" )
     echo "checking for XIM" 1>&6
         case "$with_xim" in "" | "yes" )
     echo "checking for XIM" 1>&6
-echo "configure:8582: checking for XIM" >&5
+echo "configure:8719: checking for XIM" >&5
     
 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
     
 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
-echo "configure:8585: checking for XOpenIM in -lX11" >&5
+echo "configure:8722: checking for XOpenIM in -lX11" >&5
 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
-#line 8590 "configure"
+#line 8727 "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
 #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
@@ -8597,7 +8734,7 @@ int main() {
 XOpenIM()
 ; return 0; }
 EOF
 XOpenIM()
 ; return 0; }
 EOF
-if { (eval echo configure:8601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8621,12 +8758,12 @@ fi
         if test "$have_motif $have_lesstif" = "yes no"; then
       
 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
         if test "$have_motif $have_lesstif" = "yes no"; then
       
 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
-echo "configure:8625: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:8762: checking for XmImMbLookupString in -lXm" >&5
 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXm "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXm "
 cat > conftest.$ac_ext <<EOF
-#line 8630 "configure"
+#line 8767 "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
 #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
@@ -8637,7 +8774,7 @@ int main() {
 XmImMbLookupString()
 ; return 0; }
 EOF
 XmImMbLookupString()
 ; return 0; }
 EOF
-if { (eval echo configure:8641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8702,15 +8839,15 @@ EOF
 
     if test "$with_xfs" = "yes" ; then
     echo "checking for XFontSet" 1>&6
 
     if test "$with_xfs" = "yes" ; then
     echo "checking for XFontSet" 1>&6
-echo "configure:8706: checking for XFontSet" >&5
+echo "configure:8843: checking for XFontSet" >&5
     
 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
     
 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
-echo "configure:8709: checking for XmbDrawString in -lX11" >&5
+echo "configure:8846: checking for XmbDrawString in -lX11" >&5
 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
-#line 8714 "configure"
+#line 8851 "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
 #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
@@ -8721,7 +8858,7 @@ int main() {
 XmbDrawString()
 ; return 0; }
 EOF
 XmbDrawString()
 ; return 0; }
 EOF
-if { (eval echo configure:8725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8761,15 +8898,15 @@ EOF
     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
     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:8765: checking for wnn/jllib.h" >&5
+echo "configure:8902: checking for wnn/jllib.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 8768 "configure"
+#line 8905 "configure"
 #include "confdefs.h"
 #include <wnn/jllib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <wnn/jllib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8794,10 +8931,10 @@ fi
     for ac_func in crypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
     for ac_func in crypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8798: checking for $ac_func" >&5
+echo "configure:8935: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 8801 "configure"
+#line 8938 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8820,7 +8957,7 @@ $ac_func();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:8824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -8849,12 +8986,12 @@ done
 
     test "$ac_cv_func_crypt" != "yes" && { 
 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
 
     test "$ac_cv_func_crypt" != "yes" && { 
 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:8853: checking for crypt in -lcrypt" >&5
+echo "configure:8990: checking for crypt in -lcrypt" >&5
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcrypt "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcrypt "
 cat > conftest.$ac_ext <<EOF
-#line 8858 "configure"
+#line 8995 "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
 #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
@@ -8865,7 +9002,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:8869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8900,12 +9037,12 @@ fi
     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
     
 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
     
 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
-echo "configure:8904: checking for jl_dic_list_e in -lwnn" >&5
+echo "configure:9041: 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
 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn "
 cat > conftest.$ac_ext <<EOF
-#line 8909 "configure"
+#line 9046 "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
 #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
@@ -8916,7 +9053,7 @@ int main() {
 jl_dic_list_e()
 ; return 0; }
 EOF
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:8920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8934,12 +9071,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
-echo "configure:8938: checking for jl_dic_list_e in -lwnn4" >&5
+echo "configure:9075: checking for jl_dic_list_e in -lwnn4" >&5
 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn4 "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn4 "
 cat > conftest.$ac_ext <<EOF
-#line 8943 "configure"
+#line 9080 "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
 #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
@@ -8950,7 +9087,7 @@ int main() {
 jl_dic_list_e()
 ; return 0; }
 EOF
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:8954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8968,12 +9105,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
-echo "configure:8972: checking for jl_dic_list_e in -lwnn6" >&5
+echo "configure:9109: checking for jl_dic_list_e in -lwnn6" >&5
 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn6 "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn6 "
 cat > conftest.$ac_ext <<EOF
-#line 8977 "configure"
+#line 9114 "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
 #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
@@ -8984,7 +9121,7 @@ int main() {
 jl_dic_list_e()
 ; return 0; }
 EOF
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:8988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9002,12 +9139,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
-echo "configure:9006: checking for dic_list_e in -lwnn6_fromsrc" >&5
+echo "configure:9143: checking for dic_list_e in -lwnn6_fromsrc" >&5
 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn6_fromsrc "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lwnn6_fromsrc "
 cat > conftest.$ac_ext <<EOF
-#line 9011 "configure"
+#line 9148 "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
 #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
@@ -9018,7 +9155,7 @@ int main() {
 dic_list_e()
 ; return 0; }
 EOF
 dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:9022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9066,12 +9203,12 @@ EOF
     if test "$with_wnn6" != "no"; then
       
 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
     if test "$with_wnn6" != "no"; then
       
 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
-echo "configure:9070: checking for jl_fi_dic_list in -l$libwnn" >&5
+echo "configure:9207: checking for jl_fi_dic_list in -l$libwnn" >&5
 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$libwnn "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$libwnn "
 cat > conftest.$ac_ext <<EOF
-#line 9075 "configure"
+#line 9212 "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
 #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
@@ -9082,7 +9219,7 @@ int main() {
 jl_fi_dic_list()
 ; return 0; }
 EOF
 jl_fi_dic_list()
 ; return 0; }
 EOF
-if { (eval echo configure:9086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9117,15 +9254,15 @@ EOF
   if test "$with_canna" != "no"; then
     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
   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:9121: checking for canna/jrkanji.h" >&5
+echo "configure:9258: checking for canna/jrkanji.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 9124 "configure"
+#line 9261 "configure"
 #include "confdefs.h"
 #include <canna/jrkanji.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <canna/jrkanji.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9152,15 +9289,15 @@ fi
     c_switch_site="$c_switch_site -I/usr/local/canna/include"
     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
     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:9156: checking for canna/jrkanji.h" >&5
+echo "configure:9293: checking for canna/jrkanji.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 9159 "configure"
+#line 9296 "configure"
 #include "confdefs.h"
 #include <canna/jrkanji.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <canna/jrkanji.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9188,15 +9325,15 @@ fi
 
   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
 
   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:9192: checking for canna/RK.h" >&5
+echo "configure:9329: checking for canna/RK.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 9195 "configure"
+#line 9332 "configure"
 #include "confdefs.h"
 #include <canna/RK.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <canna/RK.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9219,12 +9356,12 @@ fi
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
-echo "configure:9223: checking for RkBgnBun in -lRKC" >&5
+echo "configure:9360: checking for RkBgnBun in -lRKC" >&5
 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lRKC "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lRKC "
 cat > conftest.$ac_ext <<EOF
-#line 9228 "configure"
+#line 9365 "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
 #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
@@ -9235,7 +9372,7 @@ int main() {
 RkBgnBun()
 ; return 0; }
 EOF
 RkBgnBun()
 ; return 0; }
 EOF
-if { (eval echo configure:9239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9258,12 +9395,12 @@ fi
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
-echo "configure:9262: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:9399: checking for jrKanjiControl in -lcanna" >&5
 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcanna "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcanna "
 cat > conftest.$ac_ext <<EOF
-#line 9267 "configure"
+#line 9404 "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
 #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
@@ -9274,7 +9411,7 @@ int main() {
 jrKanjiControl()
 ; return 0; }
 EOF
 jrKanjiControl()
 ; return 0; }
 EOF
-if { (eval echo configure:9278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9323,12 +9460,12 @@ if test "$need_motif" = "yes" ; then
   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
     
 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
   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:9327: checking for layout_object_getvalue in -li18n" >&5
+echo "configure:9464: 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
 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -li18n "
 cat > conftest.$ac_ext <<EOF
-#line 9332 "configure"
+#line 9469 "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
 #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
@@ -9339,7 +9476,7 @@ int main() {
 layout_object_getvalue()
 ; return 0; }
 EOF
 layout_object_getvalue()
 ; return 0; }
 EOF
-if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9422,13 +9559,13 @@ fi
 
 fi
 
 
 fi
 
-for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
+for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9429: checking for $ac_func" >&5
+echo "configure:9566: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 9432 "configure"
+#line 9569 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9451,7 +9588,7 @@ $ac_func();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:9455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -9479,85 +9616,17 @@ fi
 done
 
 
 done
 
 
-
-case "$opsys" in
-  linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
-   echo "    xemacs will be linked with \"realpath.o\""
- fi ;;
-  * )
-    case "$canonical" in
-      *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
+extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"realpath.o\""
    echo "    xemacs will be linked with \"realpath.o\""
- fi ;;
-      * ) for ac_func in realpath
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9496: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9499 "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:9522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  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
-
-         test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
-   echo "    xemacs will be linked with \"realpath.o\""
- fi ;;
-    esac ;;
-esac
+ fi
 
 for ac_func in getloadavg
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 
 for ac_func in getloadavg
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9558: checking for $ac_func" >&5
+echo "configure:9627: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 9561 "configure"
+#line 9630 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9580,7 +9649,7 @@ $ac_func();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:9584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -9616,12 +9685,12 @@ then
 
     
 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
 
     
 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
-echo "configure:9620: checking for kstat_open in -lkstat" >&5
+echo "configure:9689: 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
 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lkstat "
 cat > conftest.$ac_ext <<EOF
-#line 9625 "configure"
+#line 9694 "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
 #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
@@ -9632,7 +9701,7 @@ int main() {
 kstat_open()
 ; return 0; }
 EOF
 kstat_open()
 ; return 0; }
 EOF
-if { (eval echo configure:9636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9666,12 +9735,12 @@ fi
 
     
 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
 
     
 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
-echo "configure:9670: checking for kvm_read in -lkvm" >&5
+echo "configure:9739: 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
 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lkvm "
 cat > conftest.$ac_ext <<EOF
-#line 9675 "configure"
+#line 9744 "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
 #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
@@ -9682,7 +9751,7 @@ int main() {
 kvm_read()
 ; return 0; }
 EOF
 kvm_read()
 ; return 0; }
 EOF
-if { (eval echo configure:9686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9716,16 +9785,16 @@ fi
 fi
 
 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
-echo "configure:9720: checking whether netdb declares h_errno" >&5
+echo "configure:9789: checking whether netdb declares h_errno" >&5
 cat > conftest.$ac_ext <<EOF
 cat > conftest.$ac_ext <<EOF
-#line 9722 "configure"
+#line 9791 "configure"
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 return h_errno;
 ; return 0; }
 EOF
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 return h_errno;
 ; return 0; }
 EOF
-if { (eval echo configure:9729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
@@ -9745,16 +9814,16 @@ fi
 rm -f conftest*
 
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
 rm -f conftest*
 
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:9749: checking for sigsetjmp" >&5
+echo "configure:9818: checking for sigsetjmp" >&5
 cat > conftest.$ac_ext <<EOF
 cat > conftest.$ac_ext <<EOF
-#line 9751 "configure"
+#line 9820 "configure"
 #include "confdefs.h"
 #include <setjmp.h>
 int main() {
 sigjmp_buf bar; sigsetjmp (bar, 0);
 ; return 0; }
 EOF
 #include "confdefs.h"
 #include <setjmp.h>
 int main() {
 sigjmp_buf bar; sigsetjmp (bar, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:9758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9827: \"$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
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
    { test "$extra_verbose" = "yes" && cat << \EOF
@@ -9774,11 +9843,11 @@ fi
 rm -f conftest*
 
 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
 rm -f conftest*
 
 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
-echo "configure:9778: checking whether localtime caches TZ" >&5
+echo "configure:9847: checking whether localtime caches TZ" >&5
 
 if test "$ac_cv_func_tzset" = "yes"; then
 cat > conftest.$ac_ext <<EOF
 
 if test "$ac_cv_func_tzset" = "yes"; then
 cat > conftest.$ac_ext <<EOF
-#line 9782 "configure"
+#line 9851 "configure"
 #include "confdefs.h"
 #include <time.h>
 #if STDC_HEADERS
 #include "confdefs.h"
 #include <time.h>
 #if STDC_HEADERS
@@ -9813,7 +9882,7 @@ main()
   exit (0);
 }
 EOF
   exit (0);
 }
 EOF
-if { (eval echo configure:9817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:9886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   emacs_cv_localtime_cache=no
 else
 then
   emacs_cv_localtime_cache=no
 else
@@ -9843,9 +9912,9 @@ fi
 
 if test "$HAVE_TIMEVAL" = "yes"; then
 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
 
 if test "$HAVE_TIMEVAL" = "yes"; then
 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
-echo "configure:9847: checking whether gettimeofday accepts one or two arguments" >&5
+echo "configure:9916: checking whether gettimeofday accepts one or two arguments" >&5
 cat > conftest.$ac_ext <<EOF
 cat > conftest.$ac_ext <<EOF
-#line 9849 "configure"
+#line 9918 "configure"
 #include "confdefs.h"
 
 #ifdef TIME_WITH_SYS_TIME
 #include "confdefs.h"
 
 #ifdef TIME_WITH_SYS_TIME
@@ -9867,7 +9936,7 @@ int main() {
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:9871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""two" 1>&6
 else
   rm -rf conftest*
   echo "$ac_t""two" 1>&6
 else
@@ -9889,19 +9958,19 @@ fi
 
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:9893: checking for inline" >&5
+echo "configure:9962: checking for inline" >&5
 
 ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
 
 ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 9898 "configure"
+#line 9967 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:9905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
 # 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
 # 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:9955: checking for working alloca.h" >&5
+echo "configure:10024: checking for working alloca.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 9958 "configure"
+#line 10027 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:9965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -9985,10 +10054,10 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:9989: checking for alloca" >&5
+echo "configure:10058: checking for alloca" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 9992 "configure"
+#line 10061 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -10016,7 +10085,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:10020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -10055,10 +10124,10 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:10059: checking whether alloca needs Cray hooks" >&5
+echo "configure:10128: checking whether alloca needs Cray hooks" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10062 "configure"
+#line 10131 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -10082,10 +10151,10 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 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:10086: checking for $ac_func" >&5
+echo "configure:10155: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10089 "configure"
+#line 10158 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -10108,7 +10177,7 @@ $ac_func();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:10112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -10138,10 +10207,10 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:10142: checking stack direction for C alloca" >&5
+echo "configure:10211: checking stack direction for C alloca" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10145 "configure"
+#line 10214 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -10160,7 +10229,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:10164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_c_stack_direction=1
 else
 then
   ac_cv_c_stack_direction=1
 else
@@ -10189,15 +10258,15 @@ test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbos
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:10193: checking for vfork.h" >&5
+echo "configure:10262: checking for vfork.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10196 "configure"
+#line 10265 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10225,10 +10294,10 @@ else
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:10229: checking for working vfork" >&5
+echo "configure:10298: checking for working vfork" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10232 "configure"
+#line 10301 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -10323,7 +10392,7 @@ main() {
   }
 }
 EOF
   }
 }
 EOF
-if { (eval echo configure:10327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_func_vfork_works=yes
 else
 then
   ac_cv_func_vfork_works=yes
 else
 
 
 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:10353: checking for working strcoll" >&5
+echo "configure:10422: checking for working strcoll" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10356 "configure"
+#line 10425 "configure"
 #include "confdefs.h"
 #include <string.h>
 main ()
 #include "confdefs.h"
 #include <string.h>
 main ()
@@ -10362,7 +10431,7 @@ main ()
        strcoll ("123", "456") >= 0);
 }
 EOF
        strcoll ("123", "456") >= 0);
 }
 EOF
-if { (eval echo configure:10366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_func_strcoll_works=yes
 else
 then
   ac_cv_func_strcoll_works=yes
 else
 for ac_func in getpgrp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 for ac_func in getpgrp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10394: checking for $ac_func" >&5
+echo "configure:10463: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10397 "configure"
+#line 10466 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -10416,7 +10485,7 @@ $ac_func();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:10420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
 done
 
 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
 done
 
 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:10448: checking whether getpgrp takes no argument" >&5
+echo "configure:10517: checking whether getpgrp takes no argument" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10451 "configure"
+#line 10520 "configure"
 #include "confdefs.h"
 
 /*
 #include "confdefs.h"
 
 /*
@@ -10502,7 +10571,7 @@ main()
 }
 
 EOF
 }
 
 EOF
-if { (eval echo configure:10506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   ac_cv_func_getpgrp_void=yes
 else
 then
   ac_cv_func_getpgrp_void=yes
 else
 
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:10533: checking for working mmap" >&5
+echo "configure:10602: checking for working mmap" >&5
 case "$opsys" in ultrix* ) have_mmap=no ;; *)
 cat > conftest.$ac_ext <<EOF
 case "$opsys" in ultrix* ) have_mmap=no ;; *)
 cat > conftest.$ac_ext <<EOF
-#line 10536 "configure"
+#line 10605 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <unistd.h>
 #include "confdefs.h"
 #include <stdio.h>
 #include <unistd.h>
@@ -10565,7 +10634,7 @@ int main (int argc, char *argv[])
   return 1;
 }
 EOF
   return 1;
 }
 EOF
-if { (eval echo configure:10569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   have_mmap=yes
 else
 then
   have_mmap=yes
 else
@@ -10600,15 +10669,15 @@ EOF
 
 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
 
 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
-echo "configure:10604: checking for termios.h" >&5
+echo "configure:10673: checking for termios.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10607 "configure"
+#line 10676 "configure"
 #include "confdefs.h"
 #include <termios.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <termios.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10651,15 +10720,15 @@ else
   echo "$ac_t""no" 1>&6
 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
   echo "$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:10655: checking for termio.h" >&5
+echo "configure:10724: checking for termio.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10658 "configure"
+#line 10727 "configure"
 #include "confdefs.h"
 #include <termio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <termio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 
 
 echo $ac_n "checking for socket""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:10695: checking for socket" >&5
+echo "configure:10764: checking for socket" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10698 "configure"
+#line 10767 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -10717,7 +10786,7 @@ socket();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:10721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -10732,15 +10801,15 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
   echo "$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:10736: checking for netinet/in.h" >&5
+echo "configure:10805: checking for netinet/in.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10739 "configure"
+#line 10808 "configure"
 #include "confdefs.h"
 #include <netinet/in.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <netinet/in.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10757,15 +10826,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
   echo "$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:10761: checking for arpa/inet.h" >&5
+echo "configure:10830: checking for arpa/inet.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10764 "configure"
+#line 10833 "configure"
 #include "confdefs.h"
 #include <arpa/inet.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <arpa/inet.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10790,9 +10859,9 @@ EOF
 }
 
       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
 }
 
       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
-echo "configure:10794: checking "for sun_len member in struct sockaddr_un"" >&5
+echo "configure:10863: checking "for sun_len member in struct sockaddr_un"" >&5
       cat > conftest.$ac_ext <<EOF
       cat > conftest.$ac_ext <<EOF
-#line 10796 "configure"
+#line 10865 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -10803,7 +10872,7 @@ int main() {
 static struct sockaddr_un x; x.sun_len = 1;
 ; return 0; }
 EOF
 static struct sockaddr_un x; x.sun_len = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:10807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_SOCKADDR_SUN_LEN
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_SOCKADDR_SUN_LEN
@@ -10821,9 +10890,9 @@ else
 fi
 rm -f conftest*
       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
 fi
 rm -f conftest*
       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
-echo "configure:10825: checking "for ip_mreq struct in netinet/in.h"" >&5
+echo "configure:10894: checking "for ip_mreq struct in netinet/in.h"" >&5
       cat > conftest.$ac_ext <<EOF
       cat > conftest.$ac_ext <<EOF
-#line 10827 "configure"
+#line 10896 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -10833,7 +10902,7 @@ int main() {
 static struct ip_mreq x;
 ; return 0; }
 EOF
 static struct ip_mreq x;
 ; return 0; }
 EOF
-if { (eval echo configure:10837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_MULTICAST
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_MULTICAST
 
 
 echo $ac_n "checking for msgget""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for msgget""... $ac_c" 1>&6
-echo "configure:10868: checking for msgget" >&5
+echo "configure:10937: checking for msgget" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10871 "configure"
+#line 10940 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char msgget(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char msgget(); below.  */
@@ -10890,7 +10959,7 @@ msgget();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:10894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_msgget=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_msgget=yes"
 else
@@ -10905,15 +10974,15 @@ if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
   echo "$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:10909: checking for sys/ipc.h" >&5
+echo "configure:10978: checking for sys/ipc.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10912 "configure"
+#line 10981 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10930,15 +10999,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
   echo "$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:10934: checking for sys/msg.h" >&5
+echo "configure:11003: checking for sys/msg.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10937 "configure"
+#line 11006 "configure"
 #include "confdefs.h"
 #include <sys/msg.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <sys/msg.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 
 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
 
 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
-echo "configure:10980: checking for dirent.h" >&5
+echo "configure:11049: checking for dirent.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 10983 "configure"
+#line 11052 "configure"
 #include "confdefs.h"
 #include <dirent.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <dirent.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -11011,15 +11080,15 @@ else
   echo "$ac_t""no" 1>&6
 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
   echo "$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:11015: checking for sys/dir.h" >&5
+echo "configure:11084: checking for sys/dir.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 11018 "configure"
+#line 11087 "configure"
 #include "confdefs.h"
 #include <sys/dir.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <sys/dir.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 
 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
 
 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
-echo "configure:11056: checking for nlist.h" >&5
+echo "configure:11125: checking for nlist.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 11059 "configure"
+#line 11128 "configure"
 #include "confdefs.h"
 #include <nlist.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <nlist.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 
 
 echo "checking "for sound support"" 1>&6
 
 
 echo "checking "for sound support"" 1>&6
-echo "configure:11094: checking "for sound support"" >&5
+echo "configure:11163: checking "for sound support"" >&5
 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
 
 if test "$with_native_sound" != "no"; then
     if test -n "$native_sound_lib"; then
     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
 
 if test "$with_native_sound" != "no"; then
     if test -n "$native_sound_lib"; then
     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
-echo "configure:11101: checking for multimedia/audio_device.h" >&5
+echo "configure:11170: checking for multimedia/audio_device.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 11104 "configure"
+#line 11173 "configure"
 #include "confdefs.h"
 #include <multimedia/audio_device.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <multimedia/audio_device.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
       if test -z "$native_sound_lib"; then
         
 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
       if test -z "$native_sound_lib"; then
         
 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
-echo "configure:11157: checking for ALopenport in -laudio" >&5
+echo "configure:11226: checking for ALopenport in -laudio" >&5
 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -laudio "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -laudio "
 cat > conftest.$ac_ext <<EOF
-#line 11162 "configure"
+#line 11231 "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
 #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
@@ -11169,7 +11238,7 @@ int main() {
 ALopenport()
 ; return 0; }
 EOF
 ALopenport()
 ; return 0; }
 EOF
-if { (eval echo configure:11173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
       if test -z "$native_sound_lib"; then
        
 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
       if test -z "$native_sound_lib"; then
        
 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
-echo "configure:11204: checking for AOpenAudio in -lAlib" >&5
+echo "configure:11273: checking for AOpenAudio in -lAlib" >&5
 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lAlib "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lAlib "
 cat > conftest.$ac_ext <<EOF
-#line 11209 "configure"
+#line 11278 "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
 #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
@@ -11216,7 +11285,7 @@ int main() {
 AOpenAudio()
 ; return 0; }
 EOF
 AOpenAudio()
 ; return 0; }
 EOF
-if { (eval echo configure:11220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
     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
     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:11258: checking for ${dir}/soundcard.h" >&5
+echo "configure:11327: checking for ${dir}/soundcard.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 11261 "configure"
+#line 11330 "configure"
 #include "confdefs.h"
 #include <${dir}/soundcard.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <${dir}/soundcard.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 if test "$with_nas_sound" != "no"; then
   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
 if test "$with_nas_sound" != "no"; then
   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
-echo "configure:11320: checking for audio/audiolib.h" >&5
+echo "configure:11389: checking for audio/audiolib.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 11323 "configure"
+#line 11392 "configure"
 #include "confdefs.h"
 #include <audio/audiolib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <audio/audiolib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -11342,12 +11411,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   
     
 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
   
     
 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
-echo "configure:11346: checking for AuOpenServer in -laudio" >&5
+echo "configure:11415: checking for AuOpenServer in -laudio" >&5
 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -laudio "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -laudio "
 cat > conftest.$ac_ext <<EOF
-#line 11351 "configure"
+#line 11420 "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
 #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
@@ -11358,7 +11427,7 @@ int main() {
 AuOpenServer()
 ; return 0; }
 EOF
 AuOpenServer()
 ; return 0; }
 EOF
-if { (eval echo configure:11362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11397,7 +11466,7 @@ EOF
  fi
     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
             cat > conftest.$ac_ext <<EOF
  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 11401 "configure"
+#line 11470 "configure"
 #include "confdefs.h"
 #include <audio/Xtutil.h>
 EOF
 #include "confdefs.h"
 #include <audio/Xtutil.h>
 EOF
@@ -11428,7 +11497,7 @@ if test "$with_esd_sound" != "no"; then
   # Extract the first word of "esd-config", so it can be a program name with args.
 set dummy esd-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   # Extract the first word of "esd-config", so it can be a program name with args.
 set dummy esd-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:11432: checking for $ac_word" >&5
+echo "configure:11501: checking for $ac_word" >&5
 
 if test -n "$have_esd_config"; then
   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
 
 if test -n "$have_esd_config"; then
   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
     c_switch_site="$c_switch_site `esd-config --cflags`" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi
     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
     c_switch_site="$c_switch_site `esd-config --cflags`" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi
     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
-echo "configure:11461: checking for esd_play_stream" >&5
+echo "configure:11530: checking for esd_play_stream" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 11464 "configure"
+#line 11533 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char esd_play_stream(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char esd_play_stream(); below.  */
@@ -11483,7 +11552,7 @@ esd_play_stream();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:11487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_esd_play_stream=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_esd_play_stream=yes"
 else
@@ -11534,7 +11603,7 @@ test -z "$with_tty" && with_tty=yes
 
 if test "$with_tty" = "yes"  ; then
   echo "checking for TTY-related features" 1>&6
 
 if test "$with_tty" = "yes"  ; then
   echo "checking for TTY-related features" 1>&6
-echo "configure:11538: checking for TTY-related features" >&5
+echo "configure:11607: checking for TTY-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_TTY
 EOF
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_TTY
 EOF
@@ -11550,12 +11619,12 @@ EOF
     if test -z "$with_ncurses"; then
     
 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
     if test -z "$with_ncurses"; then
     
 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:11554: checking for tgetent in -lncurses" >&5
+echo "configure:11623: checking for tgetent in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lncurses "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lncurses "
 cat > conftest.$ac_ext <<EOF
-#line 11559 "configure"
+#line 11628 "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
 #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
@@ -11566,7 +11635,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:11570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11599,15 +11668,15 @@ EOF
 
     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
 
     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:11603: checking for ncurses/curses.h" >&5
+echo "configure:11672: checking for ncurses/curses.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 11606 "configure"
+#line 11675 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 
     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
 
     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
-echo "configure:11633: checking for ncurses/term.h" >&5
+echo "configure:11702: checking for ncurses/term.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 11636 "configure"
+#line 11705 "configure"
 #include "confdefs.h"
 #include <ncurses/term.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <ncurses/term.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
       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
       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:11671: checking for ncurses/curses.h" >&5
+echo "configure:11740: checking for ncurses/curses.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 11674 "configure"
+#line 11743 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
        for lib in curses termlib termcap; do
          
 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
        for lib in curses termlib termcap; do
          
 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
-echo "configure:11714: checking for tgetent in -l$lib" >&5
+echo "configure:11783: 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
 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -l$lib "
 cat > conftest.$ac_ext <<EOF
-#line 11719 "configure"
+#line 11788 "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
 #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
@@ -11726,7 +11795,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:11730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
       else
        
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
       else
        
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:11761: checking for tgetent in -lcurses" >&5
+echo "configure:11830: checking for tgetent in -lcurses" >&5
 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcurses "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcurses "
 cat > conftest.$ac_ext <<EOF
-#line 11766 "configure"
+#line 11835 "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
 #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
@@ -11773,7 +11842,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:11777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11791,12 +11860,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:11795: checking for tgetent in -ltermcap" >&5
+echo "configure:11864: checking for tgetent in -ltermcap" >&5
 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ltermcap "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ltermcap "
 cat > conftest.$ac_ext <<EOF
-#line 11800 "configure"
+#line 11869 "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
 #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
@@ -11807,7 +11876,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:11811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11855,15 +11924,15 @@ EOF
 
     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
 
     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:11859: checking for gpm.h" >&5
+echo "configure:11928: checking for gpm.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 11862 "configure"
+#line 11931 "configure"
 #include "confdefs.h"
 #include <gpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <gpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
  }
   test -z "$with_gpm" && { 
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
  }
   test -z "$with_gpm" && { 
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:11890: checking for Gpm_Open in -lgpm" >&5
+echo "configure:11959: 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
 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgpm "
 cat > conftest.$ac_ext <<EOF
-#line 11895 "configure"
+#line 11964 "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
 #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
@@ -11902,7 +11971,7 @@ int main() {
 Gpm_Open()
 ; return 0; }
 EOF
 Gpm_Open()
 ; return 0; }
 EOF
-if { (eval echo configure:11906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11952,20 +12021,20 @@ test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event
 
 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
   != "no no no" && echo "checking for database support" 1>&6
 
 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
   != "no no no" && echo "checking for database support" 1>&6
-echo "configure:11956: checking for database support" >&5
+echo "configure:12025: checking for database support" >&5
 
 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
 
 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
-echo "configure:11961: checking for ndbm.h" >&5
+echo "configure:12030: checking for ndbm.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 11964 "configure"
+#line 12033 "configure"
 #include "confdefs.h"
 #include <ndbm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <ndbm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 if test "$with_database_gdbm" != "no"; then
   
 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
 if test "$with_database_gdbm" != "no"; then
   
 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
-echo "configure:11999: checking for dbm_open in -lgdbm" >&5
+echo "configure:12068: 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
 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lgdbm "
 cat > conftest.$ac_ext <<EOF
-#line 12004 "configure"
+#line 12073 "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
 #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
@@ -12011,7 +12080,7 @@ int main() {
 dbm_open()
 ; return 0; }
 EOF
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:12015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
 
 if test "$with_database_dbm" != "no"; then
   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
 
 if test "$with_database_dbm" != "no"; then
   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:12043: checking for dbm_open" >&5
+echo "configure:12112: checking for dbm_open" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 12046 "configure"
+#line 12115 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -12065,7 +12134,7 @@ dbm_open();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:12069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -12084,12 +12153,12 @@ else
 
     
 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
 
     
 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:12088: checking for dbm_open in -ldbm" >&5
+echo "configure:12157: 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
 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldbm "
 cat > conftest.$ac_ext <<EOF
-#line 12093 "configure"
+#line 12162 "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
 #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
@@ -12100,7 +12169,7 @@ int main() {
 dbm_open()
 ; return 0; }
 EOF
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:12104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12141,10 +12210,10 @@ EOF
 
 if test "$with_database_berkdb" != "no"; then
   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
 
 if test "$with_database_berkdb" != "no"; then
   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
-echo "configure:12145: checking for Berkeley db.h" >&5
+echo "configure:12214: checking for Berkeley db.h" >&5
   for path in "db/db.h" "db.h"; do
     cat > conftest.$ac_ext <<EOF
   for path in "db/db.h" "db.h"; do
     cat > conftest.$ac_ext <<EOF
-#line 12148 "configure"
+#line 12217 "configure"
 #include "confdefs.h"
 #ifdef HAVE_INTTYPES_H
 #define __BIT_TYPES_DEFINED__
 #include "confdefs.h"
 #ifdef HAVE_INTTYPES_H
 #define __BIT_TYPES_DEFINED__
@@ -12162,7 +12231,7 @@ int main() {
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:12166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:12235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   db_h_path="$path"; break
 else
   rm -rf conftest*
   db_h_path="$path"; break
 else
@@ -12178,9 +12247,9 @@ rm -f conftest*
 
   if test "$with_database_berkdb" != "no"; then
     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
 
   if test "$with_database_berkdb" != "no"; then
     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
-echo "configure:12182: checking for Berkeley DB version" >&5
+echo "configure:12251: checking for Berkeley DB version" >&5
     cat > conftest.$ac_ext <<EOF
     cat > conftest.$ac_ext <<EOF
-#line 12184 "configure"
+#line 12253 "configure"
 #include "confdefs.h"
 #include <$db_h_path>
 #if DB_VERSION_MAJOR > 1
 #include "confdefs.h"
 #include <$db_h_path>
 #if DB_VERSION_MAJOR > 1
 rm -f conftest*
 
     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
 rm -f conftest*
 
     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
-echo "configure:12203: checking for $dbfunc" >&5
+echo "configure:12272: checking for $dbfunc" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 12206 "configure"
+#line 12275 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $dbfunc(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $dbfunc(); below.  */
@@ -12225,7 +12294,7 @@ $dbfunc();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:12229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$dbfunc=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_$dbfunc=yes"
 else
@@ -12244,12 +12313,12 @@ else
 
     
 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
 
     
 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
-echo "configure:12248: checking for $dbfunc in -ldb" >&5
+echo "configure:12317: checking for $dbfunc in -ldb" >&5
 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldb "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldb "
 cat > conftest.$ac_ext <<EOF
-#line 12253 "configure"
+#line 12322 "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
 #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
@@ -12260,7 +12329,7 @@ int main() {
 $dbfunc()
 ; return 0; }
 EOF
 $dbfunc()
 ; return 0; }
 EOF
-if { (eval echo configure:12264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
 if test "$with_socks" = "yes"; then
   
 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
 if test "$with_socks" = "yes"; then
   
 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
-echo "configure:12328: checking for SOCKSinit in -lsocks" >&5
+echo "configure:12397: checking for SOCKSinit in -lsocks" >&5
 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lsocks "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lsocks "
 cat > conftest.$ac_ext <<EOF
-#line 12333 "configure"
+#line 12402 "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
 #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
@@ -12340,7 +12409,7 @@ int main() {
 SOCKSinit()
 ; return 0; }
 EOF
 SOCKSinit()
 ; return 0; }
 EOF
-if { (eval echo configure:12344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
 
 if test "$with_modules" != "no"; then
   echo "checking for module support" 1>&6
 
 if test "$with_modules" != "no"; then
   echo "checking for module support" 1>&6
-echo "configure:12399: checking for module support" >&5
+echo "configure:12468: checking for module support" >&5
 
     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
 
     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:12403: checking for dlfcn.h" >&5
+echo "configure:12472: checking for dlfcn.h" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 12406 "configure"
+#line 12475 "configure"
 #include "confdefs.h"
 #include <dlfcn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <dlfcn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -12425,12 +12494,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   
     
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
   
     
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:12429: checking for dlopen in -ldl" >&5
+echo "configure:12498: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldl "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldl "
 cat > conftest.$ac_ext <<EOF
-#line 12434 "configure"
+#line 12503 "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
 #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
@@ -12441,7 +12510,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:12445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12460,12 +12529,12 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
-echo "configure:12464: checking for dlopen in -lc" >&5
+echo "configure:12533: checking for dlopen in -lc" >&5
 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lc "
 cat > conftest.$ac_ext <<EOF
 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lc "
 cat > conftest.$ac_ext <<EOF
-#line 12469 "configure"
+#line 12538 "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
 #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
@@ -12476,7 +12545,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:12480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12515,12 +12584,12 @@ EOF
   else
     
 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
   else
     
 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:12519: checking for shl_load in -ldld" >&5
+echo "configure:12588: 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
 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldld "
 cat > conftest.$ac_ext <<EOF
-#line 12524 "configure"
+#line 12593 "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
 #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
@@ -12531,7 +12600,7 @@ int main() {
 shl_load()
 ; return 0; }
 EOF
 shl_load()
 ; return 0; }
 EOF
-if { (eval echo configure:12535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12558,12 +12627,12 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
-echo "configure:12562: checking for dld_init in -ldld" >&5
+echo "configure:12631: 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
 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ldld "
 cat > conftest.$ac_ext <<EOF
-#line 12567 "configure"
+#line 12636 "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
 #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
@@ -12574,7 +12643,7 @@ int main() {
 dld_init()
 ; return 0; }
 EOF
 dld_init()
 ; return 0; }
 EOF
-if { (eval echo configure:12578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12619,7 +12688,7 @@ xehost=$canonical
 xealias=$internal_configuration
 
 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
 xealias=$internal_configuration
 
 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
-echo "configure:12623: checking how to build dynamic libraries for ${xehost}" >&5
+echo "configure:12692: checking how to build dynamic libraries for ${xehost}" >&5
 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
 case "$xehost" in
 *-*-linux-gnu*) ;;
 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
 case "$xehost" in
 *-*-linux-gnu*) ;;
@@ -12647,9 +12716,9 @@ if test "$GCC" = "yes"; then
   XEGCC=yes
 else
   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
   XEGCC=yes
 else
   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:12651: checking checking whether we are using GNU C" >&5
+echo "configure:12720: checking checking whether we are using GNU C" >&5
   cat > conftest.$ac_ext <<EOF
   cat > conftest.$ac_ext <<EOF
-#line 12653 "configure"
+#line 12722 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -12671,7 +12740,7 @@ rm -f conftest*
 fi
 
 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
-echo "configure:12675: checking how to produce PIC code" >&5
+echo "configure:12744: checking how to produce PIC code" >&5
 wl=
 
 can_build_shared=yes
 wl=
 
 can_build_shared=yes
@@ -12764,18 +12833,18 @@ if test -n "$dll_cflags"; then
   
   # Check to make sure the dll_cflags actually works.
   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
   
   # Check to make sure the dll_cflags actually works.
   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
-echo "configure:12768: checking if PIC flag ${dll_cflags} really works" >&5
+echo "configure:12837: checking if PIC flag ${dll_cflags} really works" >&5
   save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS $dll_cflags -DPIC"
   cat > conftest.$ac_ext <<EOF
   save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS $dll_cflags -DPIC"
   cat > conftest.$ac_ext <<EOF
-#line 12772 "configure"
+#line 12841 "configure"
 #include "confdefs.h"
 
 int main() {
 int x=0;
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 int x=0;
 ; return 0; }
 EOF
-if { (eval echo configure:12779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:12848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
   rm -rf conftest*
   
     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
@@ -12806,7 +12875,7 @@ cc_produces_so=no
 xldf=
 xcldf=
 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
 xldf=
 xcldf=
 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
-echo "configure:12810: checking if C compiler can produce shared libraries" >&5
+echo "configure:12879: checking if C compiler can produce shared libraries" >&5
 if test "$XEGCC" = yes; then
   xcldf="-shared"
   xldf="-shared"
 if test "$XEGCC" = yes; then
   xcldf="-shared"
   xldf="-shared"
@@ -12857,14 +12926,14 @@ if test -n "$xcldf"; then
   xe_libs=
   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
   cat > conftest.$ac_ext <<EOF
   xe_libs=
   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
   cat > conftest.$ac_ext <<EOF
-#line 12861 "configure"
+#line 12930 "configure"
 #include "confdefs.h"
 
 int main() {
 int x=0;
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 int x=0;
 ; return 0; }
 EOF
-if { (eval echo configure:12868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cc_produces_so=yes
 else
   rm -rf conftest*
   cc_produces_so=yes
 else
@@ -12889,7 +12958,7 @@ if test -z "$LTLD"; then
   if test "$XEGCC" = yes; then
     # Check if gcc -print-prog-name=ld gives a path.
     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
   if test "$XEGCC" = yes; then
     # Check if gcc -print-prog-name=ld gives a path.
     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:12893: checking for ld used by GCC" >&5
+echo "configure:12962: checking for ld used by GCC" >&5
     ac_prog=`($CC -print-prog-name=ld) 2>&5`
     case "$ac_prog" in
     # Accept absolute paths.
     ac_prog=`($CC -print-prog-name=ld) 2>&5`
     case "$ac_prog" in
     # Accept absolute paths.
@@ -12914,7 +12983,7 @@ echo "configure:12893: checking for ld used by GCC" >&5
     esac
   else
     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
     esac
   else
     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:12918: checking for GNU ld" >&5
+echo "configure:12987: checking for GNU ld" >&5
   fi
 
   if test -z "$LTLD"; then
   fi
 
   if test -z "$LTLD"; then
@@ -12952,7 +13021,7 @@ ld_dynamic_link_flags=
 
 # Check to see if it really is or isn't GNU ld.
 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
 
 # Check to see if it really is or isn't GNU ld.
 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
-echo "configure:12956: checking if the linker is GNU ld" >&5
+echo "configure:13025: checking if the linker is GNU ld" >&5
 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
   xe_gnu_ld=yes
 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
   xe_gnu_ld=yes
@@ -12979,7 +13048,7 @@ else
   # OK - only NOW do we futz about with ld.
   # See if the linker supports building shared libraries.
   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
   # OK - only NOW do we futz about with ld.
   # See if the linker supports building shared libraries.
   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
-echo "configure:12983: checking whether the linker supports shared libraries" >&5
+echo "configure:13052: checking whether the linker supports shared libraries" >&5
   dll_ld=$CC
   dll_ldflags=$LDFLAGS
   ld_shlibs=yes
   dll_ld=$CC
   dll_ldflags=$LDFLAGS
   ld_shlibs=yes
@@ -13194,10 +13263,10 @@ EOF
     for ac_func in dlerror _dlerror
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
     for ac_func in dlerror _dlerror
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13198: checking for $ac_func" >&5
+echo "configure:13267: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
 
 cat > conftest.$ac_ext <<EOF
-#line 13201 "configure"
+#line 13270 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -13220,7 +13289,7 @@ $ac_func();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:13224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -13259,11 +13328,11 @@ done
 fi
 
 cat > conftest.$ac_ext <<EOF
 fi
 
 cat > conftest.$ac_ext <<EOF
-#line 13263 "configure"
+#line 13332 "configure"
 #include "confdefs.h"
 int main(int c,char *v[]){return 0;}
 EOF
 #include "confdefs.h"
 int main(int c,char *v[]){return 0;}
 EOF
-if { (eval echo configure:13267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:13336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
 then
   :
 else
 then
   :
 else
index 792a5ba..97863cc 100644 (file)
@@ -389,6 +389,8 @@ with_tty=""
 use_union_type="no"
 with_dnet=""
 pdump="no"
 use_union_type="no"
 with_dnet=""
 pdump="no"
+dnl dragndrop is still experimental.  When it is stable, comment out the following line:
+with_dragndrop="no"
 
 dnl ------------------
 dnl Options Processing
 
 dnl ------------------
 dnl Options Processing
@@ -1020,6 +1022,7 @@ dnl debug implies other options
 if test "${debug:=$beta}" = "yes"; then
   use_assertions=yes memory_usage_stats=yes
   XE_ADD_OBJS(debug.o)
 if test "${debug:=$beta}" = "yes"; then
   use_assertions=yes memory_usage_stats=yes
   XE_ADD_OBJS(debug.o)
+  XE_ADD_OBJS(tests.o)
   AC_DEFINE(DEBUG_XEMACS)
 fi
 test "$use_assertions"     = "yes" && AC_DEFINE(USE_ASSERTIONS)
   AC_DEFINE(DEBUG_XEMACS)
 fi
 test "$use_assertions"     = "yes" && AC_DEFINE(USE_ASSERTIONS)
@@ -1071,6 +1074,7 @@ case "$canonical" in
   alpha*-*-*       ) machine=alpha ;;
   vax-*-*          ) machine=vax ;;
   mips-dec-*       ) machine=pmax ;;
   alpha*-*-*       ) machine=alpha ;;
   vax-*-*          ) machine=vax ;;
   mips-dec-*       ) machine=pmax ;;
+  mips-sgi-irix6*  ) machine=iris6d ;;
   mips-sgi-*       ) machine=iris4d ;;
   mips*-linux      ) machine=mips ;;
   romp-ibm-*       ) machine=ibmrt ;;
   mips-sgi-*       ) machine=iris4d ;;
   mips*-linux      ) machine=mips ;;
   romp-ibm-*       ) machine=ibmrt ;;
@@ -1083,6 +1087,7 @@ case "$canonical" in
   mips-sony-*      ) machine=news-risc ;;
   clipper-*        ) machine=clipper ;;
   arm-*            ) machine=arm ;;
   mips-sony-*      ) machine=news-risc ;;
   clipper-*        ) machine=clipper ;;
   arm-*            ) machine=arm ;;
+  armv[34][lb]-*   ) machine=arm ;;
   ns32k-*          ) machine=ns32000 ;;
 esac
 
   ns32k-*          ) machine=ns32000 ;;
 esac
 
@@ -1816,7 +1821,7 @@ if test "$cflags_specified" = "no"; then
   dnl Following values of CFLAGS are known to work well.
   dnl Should we take debugging options into consideration?
   if   test "$GCC" = "yes"; then
   dnl Following values of CFLAGS are known to work well.
   dnl Should we take debugging options into consideration?
   if   test "$GCC" = "yes"; then
-    CFLAGS="-g -O3 -Wall -Wno-switch"
+    CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
     dnl I'm not convinced this is a good idea any more. -sb
     dnl test "$opsys $machine" = "linux intel386" && \
     dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
     dnl I'm not convinced this is a good idea any more. -sb
     dnl test "$opsys $machine" = "linux intel386" && \
     dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
@@ -1978,7 +1983,7 @@ dnl fi
 
 dnl Extra system-specific library directories - please add to list
 for dir in "/usr/ccs/lib"; do
 
 dnl Extra system-specific library directories - please add to list
 for dir in "/usr/ccs/lib"; do
-  test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_site)
+  test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_system)
 done
 
 dnl --site-runtime-libraries (multiple dirs)
 done
 
 dnl --site-runtime-libraries (multiple dirs)
@@ -1988,11 +1993,31 @@ if test -n "$site_runtime_libraries"; then
   export LD_RUN_PATH
 fi
 
   export LD_RUN_PATH
 fi
 
+dnl Linux systems have dynamic runtime library directories listed in
+dnl /etc/ld.so.conf.  Since those are used at run time, it seems pretty
+dnl safe to use them at link time, and less controversial than forcing
+dnl the run-time to use the link-time libraries.  This also helps avoid
+dnl mismatches between the link-time and run-time libraries.
+
+dnl #### Unfortunately, there are horrible libc4 and libc5 libraries 
+dnl listed in /etc/ld.so.conf on some systems, and including them on 
+dnl the link path leads to linking in utterly broken libc's.  
+dnl There are many clever ways of approaching this problem, 
+dnl but finding out that actually works...
+
+dnl if test -z "$LD_RUN_PATH" -a -r "/etc/ld.so.conf"; then
+dnl   for dir in `cat /etc/ld.so.conf`; do
+dnl     test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_system)
+dnl   done
+dnl   add_runtime_path=no
+dnl fi
+
 dnl -------------------------------------
 dnl Compute runtime library path
 dnl -------------------------------------
 
 dnl -------------------------------------
 dnl Compute runtime library path
 dnl -------------------------------------
 
-if   test "$dynamic" = "no"; then add_runtime_path=no
+if test -n "$add_runtime_path"; then :;
+elif 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* | decosf* ) add_runtime_path=yes ;;
 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
 else case "$opsys" in
        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
@@ -2537,7 +2562,7 @@ if test "$with_msw" != "no"; then
   if test "$with_msw" = "yes"; then
     AC_DEFINE(HAVE_MS_WINDOWS)
     install_pp="$blddir/lib-src/installexe.sh"
   if test "$with_msw" = "yes"; then
     AC_DEFINE(HAVE_MS_WINDOWS)
     install_pp="$blddir/lib-src/installexe.sh"
-    XE_APPEND(-lshell32 -lgdi32 -luser32 -lcomctl32, libs_system)
+    XE_APPEND(-lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool, libs_system)
     test "$with_dragndrop" != no && XE_APPEND(msw, dragndrop_proto)
     if test "$window_system" != x11; then
        window_system=msw
     test "$with_dragndrop" != no && XE_APPEND(msw, dragndrop_proto)
     if test "$window_system" != x11; then
        window_system=msw
@@ -2965,6 +2990,13 @@ if test "$with_x11" = "yes"; then
       AC_CHECK_HEADER(X11/$athena_variant/ThreeD.h,
         athena_h_path=X11/$athena_variant,))
 
       AC_CHECK_HEADER(X11/$athena_variant/ThreeD.h,
         athena_h_path=X11/$athena_variant,))
 
+    dnl Is the variant specific header directory directly under include?
+    if test -z "$athena_h_path"; then
+      AC_CHECK_HEADER($athena_variant/XawInit.h,
+        AC_CHECK_HEADER($athena_variant/ThreeD.h,
+          athena_h_path=$athena_variant,))
+    fi
+
     dnl If we couldn't find the specific variant, try the generic Athena 3d headers
     if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
       AC_CHECK_HEADER(X11/Xaw3d/XawInit.h,
     dnl If we couldn't find the specific variant, try the generic Athena 3d headers
     if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
       AC_CHECK_HEADER(X11/Xaw3d/XawInit.h,
@@ -2975,6 +3007,16 @@ if test "$with_x11" = "yes"; then
           ],))
     fi
 
           ],))
     fi
 
+    dnl Also generic 3d headers directly under include dir
+    if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
+      AC_CHECK_HEADER(Xaw3d/XawInit.h,
+        AC_CHECK_HEADER(Xaw3d/ThreeD.h,
+          [
+            AC_MSG_WARN("Assuming that Xaw3d headers are suitable for $athena_variant.")
+            athena_h_path=Xaw3d
+          ],))
+    fi
+
     dnl If nothing yet found, see if Xaw is a 3d header set...
     dnl We AC_MSG_WARN if we fail because I am all out of ideas...
     if test -z "$athena_h_path"; then
     dnl If nothing yet found, see if Xaw is a 3d header set...
     dnl We AC_MSG_WARN if we fail because I am all out of ideas...
     if test -z "$athena_h_path"; then
@@ -3101,7 +3143,7 @@ test "$with_menubars"   != "no"    && AC_DEFINE(HAVE_MENUBARS)
 test "$with_scrollbars" != "no"    && AC_DEFINE(HAVE_SCROLLBARS)
 test "$with_dialogs"    != "no"    && AC_DEFINE(HAVE_DIALOGS)
 test "$with_toolbars"   != "no"    && AC_DEFINE(HAVE_TOOLBARS)
 test "$with_scrollbars" != "no"    && AC_DEFINE(HAVE_SCROLLBARS)
 test "$with_dialogs"    != "no"    && AC_DEFINE(HAVE_DIALOGS)
 test "$with_toolbars"   != "no"    && AC_DEFINE(HAVE_TOOLBARS)
-test "$with_widgets"   != "no"    && AC_DEFINE(HAVE_WIDGETS)
+test "$with_widgets"    != "no"    && AC_DEFINE(HAVE_WIDGETS)
 
 test "$with_menubars"   = "lucid"  && AC_DEFINE(LWLIB_MENUBARS_LUCID)
 test "$with_scrollbars" = "lucid"  && AC_DEFINE(LWLIB_SCROLLBARS_LUCID)
 
 test "$with_menubars"   = "lucid"  && AC_DEFINE(LWLIB_MENUBARS_LUCID)
 test "$with_scrollbars" = "lucid"  && AC_DEFINE(LWLIB_SCROLLBARS_LUCID)
@@ -3111,16 +3153,16 @@ test "$with_scrollbars" = "motif"  && AC_DEFINE(LWLIB_SCROLLBARS_MOTIF)
 test "$with_dialogs"    = "motif"  && AC_DEFINE(LWLIB_DIALOGS_MOTIF)
 test "$with_widgets"    = "motif"  && AC_DEFINE(LWLIB_WIDGETS_MOTIF)
 
 test "$with_dialogs"    = "motif"  && AC_DEFINE(LWLIB_DIALOGS_MOTIF)
 test "$with_widgets"    = "motif"  && AC_DEFINE(LWLIB_WIDGETS_MOTIF)
 
-test "$with_menubars"   != "no"      && XE_ADD_OBJS(menubar.o)
-test "$with_scrollbars" != "no"      && XE_ADD_OBJS(scrollbar.o)
-test "$with_dialogs"    != "no"      && XE_ADD_OBJS(dialog.o)
-test "$with_toolbars"   != "no"      && XE_ADD_OBJS(toolbar.o)
+test "$with_menubars"   != "no"    && XE_ADD_OBJS(menubar.o)
+test "$with_scrollbars" != "no"    && XE_ADD_OBJS(scrollbar.o)
+test "$with_dialogs"    != "no"    && XE_ADD_OBJS(dialog.o)
+test "$with_toolbars"   != "no"    && XE_ADD_OBJS(toolbar.o)
 
 if test "$with_x11" = "yes"; then
 
 if test "$with_x11" = "yes"; then
-  test "$with_menubars"   != "no"      && XE_ADD_OBJS(menubar-x.o)
-  test "$with_scrollbars" != "no"      && XE_ADD_OBJS(scrollbar-x.o)
-  test "$with_dialogs"    != "no"      && XE_ADD_OBJS(dialog-x.o)
-  test "$with_toolbars"   != "no"      && XE_ADD_OBJS(toolbar-x.o)
+  test "$with_menubars"   != "no"  && XE_ADD_OBJS(menubar-x.o)
+  test "$with_scrollbars" != "no"  && XE_ADD_OBJS(scrollbar-x.o)
+  test "$with_dialogs"    != "no"  && XE_ADD_OBJS(dialog-x.o)
+  test "$with_toolbars"   != "no"  && XE_ADD_OBJS(toolbar-x.o)
   test "$all_widgets" != "no no no no no" && XE_ADD_OBJS(gui-x.o)
 fi
 
   test "$all_widgets" != "no no no no no" && XE_ADD_OBJS(gui-x.o)
 fi
 
@@ -3263,25 +3305,10 @@ if test "$need_motif" = "yes" ; then
   XE_COMPUTE_RUNPATH()
 fi
 
   XE_COMPUTE_RUNPATH()
 fi
 
-AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask)
-
-dnl realpath is buggy on linux, decosf and aix4
+AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask)
 
 
-dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP.
-dnl The realpath in ELF linux libc's is O.K.
-dnl For example, call realpath on a file thirty-five or so directories deep
-dnl and you get ELOOP even if no symlinks at all are involved.
-dnl Reports as of 11/1997 indicate BSDi has problems too.
-dnl The realpath() in UnixWare2.1.3 could not get any pathname fragment in error condition.
-case "$opsys" in
-  linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) XE_ADD_OBJS(realpath.o) ;;
-  * )
-    case "$canonical" in
-      *-*-sysv4.2uw2* ) XE_ADD_OBJS(realpath.o) ;;
-      * ) AC_CHECK_FUNCS(realpath)
-         test "$ac_cv_func_realpath" != "yes" && XE_ADD_OBJS(realpath.o) ;;
-    esac ;;
-esac
+dnl Use our own realpath always.
+XE_ADD_OBJS(realpath.o)
 
 dnl Check whether the system provides getloadavg (Solaris 7 has it)
 AC_CHECK_FUNCS(getloadavg)
 
 dnl Check whether the system provides getloadavg (Solaris 7 has it)
 AC_CHECK_FUNCS(getloadavg)
index b5babd1..af0b29a 100644 (file)
--- a/etc/BETA
+++ b/etc/BETA
@@ -325,7 +325,7 @@ xemacs-21.0 -vanilla -batch -l cus-dep \
 To bytecompile both of these files the command is:
 
 xemacs-21.0 -vanilla -batch -f batch-byte-compile \
 To bytecompile both of these files the command is:
 
 xemacs-21.0 -vanilla -batch -f batch-byte-compile \
-       lisp-utils/auto-autoloads.el lisp-utils/custom-laod.el
+       lisp-utils/auto-autoloads.el lisp-utils/custom-load.el
 
 ** Building XEmacs and XEmacs packages from scratch
 ===================================================
 
 ** Building XEmacs and XEmacs packages from scratch
 ===================================================
index 1c58518..ee6e827 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -33,13 +33,14 @@ file.
 * Changes in XEmacs 21.2
 ========================
 
 * Changes in XEmacs 21.2
 ========================
 
-** `delete-key-deletes-forward' now defaults to t.
+** The delete key now deletes forward by default.
 
 
-`delete-key-deletes-forward' is the variable that regulates the
-behaviour of the delete key on the systems that offer both a backspace
-and a delete key.  If set to nil, the key labeled "Delete" will delete
-backward.  If set to non-nil, the "Delete" key will delete forward,
-except on keyboards where a "Backspace" key is not provided.
+This is regulated by the variable `delete-key-deletes-forward', which
+now defaults to t.  `delete-key-deletes-forward' takes effect only on
+the systems that offer both a backspace and a delete key.  If set to
+nil, the key labeled "Delete" will always delete backward.  If set to
+non-nil, the "Delete" key will delete forward, except on keyboards
+where a "Backspace" key is not provided (e.g. old DEC keyboards.)
 
 Unless our implementation has bugs, the only reason why you would want
 to set `delete-key-deletes-forward' to nil is if you want to use the
 
 Unless our implementation has bugs, the only reason why you would want
 to set `delete-key-deletes-forward' to nil is if you want to use the
@@ -59,6 +60,28 @@ The new behavior affects all functions performing interactive
 searches, like `zap-to-char', `list-matching-lines', `tags-search'
 etc.  The incremental search facility has always behaved that way.
 
 searches, like `zap-to-char', `list-matching-lines', `tags-search'
 etc.  The incremental search facility has always behaved that way.
 
+** Incremental search will now highlight all visible matches, making
+it easier to anticipate where consecutive C-s or C-r will place the
+point.  If you want to disable the feature, set
+`isearch-highlight-all-matches' to nil.
+
+** You can now use the buffer tabs to switch between buffers.  The
+tabs are located between the toolbar and the uppermost window, in a
+location called "gutter".  If you dislike the buffer tabs, you can
+disable them by specifying:
+
+    (set-specifier default-gutter-visible-p nil)
+
+in your `.emacs'.  You can change the location of the gutter with
+`set-default-gutter-position', however currently only MS-Windows
+supports tab widgets with orientations other than vertical..
+
+** When you press RET at a minibuffer prompt that provides a default
+value, the value is stored in history instead of an empty line.  Also,
+you can now edit the default value by pressing the down arrow,
+accessing the logical "future" value.  Not all minibuffer prompts have
+yet been converted to support this feature.
+
 ** The rectangle functions have been almost completely rewritten in
 order to avoid inserting undesirable spaces, notably at the end of
 lines.  Two typical examples of the old behavior were
 ** The rectangle functions have been almost completely rewritten in
 order to avoid inserting undesirable spaces, notably at the end of
 lines.  Two typical examples of the old behavior were
@@ -72,15 +95,10 @@ As a side effect, the FORCE argument to `move-to-column' now
 understands the special value `coerce', which means that the line
 should not be filled if it is too short to reach the desired column.
 
 understands the special value `coerce', which means that the line
 should not be filled if it is too short to reach the desired column.
 
-** Incremental search will now highlight all visible matches, making
-it easier to anticipate where consecutive C-s or C-r will place the
-point.  If you want to disable the feature, set
-`isearch-highlight-all-matches' to nil.
-
-** You can now customize and save comments for faces and variables.
-In Custom buffers, a new menu entry allows you to add and edit a
-comment.  Comments for variables can also be assigned by calling
-`customize-set-(value|variable)' with a prefix argument.
+** Customize now supports adding comments about your face and variable
+settings using a new menu entry.  Comments for variables can also be
+assigned by calling `customize-set-(value|variable)' with a prefix
+argument.
 
 ** XEmacs now locates the early package hierarchies at
 ~/.xemacs/mule-packages/ and ~/.xemacs/xemacs-packages/.  Previously,
 
 ** XEmacs now locates the early package hierarchies at
 ~/.xemacs/mule-packages/ and ~/.xemacs/xemacs-packages/.  Previously,
@@ -163,15 +181,20 @@ is now equivalent to
 If you set this variable to nil then pressing the Alt key under
 MS-Windows will no longer activate the menubar. The default is t.
 
 If you set this variable to nil then pressing the Alt key under
 MS-Windows will no longer activate the menubar. The default is t.
 
+** Pixel-based scrolling has been implemented. 
+By default this will attempt to scroll in increments equal to the
+height of the default face. Set `window-pixel-scroll-increment' to
+modify this behaviour.
+
 ** Etags changes.
 
 *** In DOS, etags looks for file.cgz if it cannot find file.c.
 
 *** New option --ignore-case-regex is an alternative to --regex.  It is now
 possible to bind a regexp to a language, by prepending the regexp with
 ** Etags changes.
 
 *** In DOS, etags looks for file.cgz if it cannot find file.c.
 
 *** New option --ignore-case-regex is an alternative to --regex.  It is now
 possible to bind a regexp to a language, by prepending the regexp with
-{lang}, where lang is one of the languages that `etags --help' prints out.
-This feature is useful especially for regex files, where each line contains
-a regular expression.  The manual contains details.
+{lang}, where lang is one of the languages that `etags --help' prints
+out.  This feature is useful especially for regex files, where each
+line contains a regular expression.  The manual contains details.
 
 *** In C and derived languages, etags creates tags for function
 declarations when given the --declarations option.
 
 *** In C and derived languages, etags creates tags for function
 declarations when given the --declarations option.
@@ -201,7 +224,7 @@ for PSWrap.
 * Lisp and internal changes in XEmacs 21.2
 ==========================================
 
 * Lisp and internal changes in XEmacs 21.2
 ==========================================
 
-** A new portable dumper is available.
+** A new portable dumper is available for beta testing.
 
 Olivier Galibert has written a portable dumper for XEmacs, based on
 initial work by Kyle Jones.  Normally, XEmacs C sources link into an
 
 Olivier Galibert has written a portable dumper for XEmacs, based on
 initial work by Kyle Jones.  Normally, XEmacs C sources link into an
@@ -224,6 +247,10 @@ modified to not expect `temacs' producing an `xemacs' executable.  You
 can try it out by simply running `src/temacs'.  If it starts without
 failure, the portable dumping worked.
 
 can try it out by simply running `src/temacs'.  If it starts without
 failure, the portable dumping worked.
 
+#### NOTE: the portable dumper is not really usable yet, because the
+state of built-in variables is not yet saved.  Olivier promised to fix
+it.  Nag, nag.
+
 ** Much effort has been invested to make XEmacs Lisp faster:
 
 *** Many basic lisp operations are now faster.
 ** Much effort has been invested to make XEmacs Lisp faster:
 
 *** Many basic lisp operations are now faster.
@@ -267,15 +294,22 @@ are implemented as native window-system widgets.  Thus you can embed
 buttons, scrollbars, combo boxes, edit fields and progress gauges in a
 buffer.  As a side effect subwindow support now works once again.
 
 buttons, scrollbars, combo boxes, edit fields and progress gauges in a
 buffer.  As a side effect subwindow support now works once again.
 
-All of this is still very experimental.  This feature is currently
-more complete under MS-Windows.
+All of this is still fairly experimental and there is no
+documentation. The current APIs might change in a future version of
+XEmacs.  Some widgets are only available under MS-Windows. See the
+file glyphs-test.el in the XEmacs src distribution for examples of
+usage.
 
 
-** user-init-directory is now an absolute, unexpanded path.
-Previously, `user-init-directory' used to be relative to
-(concat "~" init-file-user).  This turned out to be too complicated
-for most packages (and some core Lisp files) to use correctly.
+The buffers-tab functionality and progress gauge have been implemented
+using this feature.
 
 
-Also, `init-file-user' has been obsoleted in the process.
+** `user-init-file' and `user-init-directory' are now absolute
+file/directory names.  Previously, both variables used to be relative
+to (concat "~" init-file-user).  This turned out to be too complicated
+for most packages (and some core Lisp files) to use correctly.  Also,
+the `init-file-user' variable has been obsoleted in the process.
+
+The user-visible options like `-u' have not changed their behaviour.
 
 ** XEmacs finally has an automated test suite!
 Although this is not yet very sophisticated, it is already responsible
 
 ** XEmacs finally has an automated test suite!
 Although this is not yet very sophisticated, it is already responsible
@@ -312,6 +346,42 @@ friendlier, but actually faster than checking for C-g.
 `base64-encode-region', `base64-encode-string', `base64-decode-region'
 and `base64-decode-string'.
 
 `base64-encode-region', `base64-encode-string', `base64-decode-region'
 and `base64-decode-string'.
 
+** The functions `read-string', `read-expression', `eval-minibuffer',
+`read-variable', `read-command', `read-function', `read-number',
+`read-shell-command', `read-from-minibuffer', and `completing-read'
+now take an additional argument which specifies the default value.  If
+this argument is non-nil, it should be a string; that string is used
+in two ways:
+
+  It is returned if the user enters empty input.
+  It is available through the history command M-n.
+
+** LDAP changes.
+
+*** The LDAP interface now consists of two layers, a low-level layer
+that closely matches the LDAP C API, and a more convenient
+higher-level set of functions.
+
+*** The low-level functions that used to be named *-internal are now
+named more simply: `ldap-open', `ldap-close', `ldap-search-basic',
+`ldap-add', and `ldap-modify'.  They should be used directly for very
+specific purposes (such as multiple operations on a connection) only.
+
+*** The higher-level functions provide a more convenient way to access
+LDAP directories hiding the subtleties of handling the connection,
+translating arguments and ensuring compliance with LDAP
+internationalization rules and formats (currently partly implemented
+only.)  This layer provides atomic operations for searches,
+modification, addition and deletion of multiple entries at once:
+`ldap-search-entries', `ldap-add-entries', `ldap-delete-entries', and
+`ldap-modify-entries'.
+
+*** To maintain compatibility with previous code, the now obsolete
+function `ldap-search' is now merely a wrapper that calls either
+`ldap-search-basic' or `ldap-search-entries'.  Please don't use the
+`ldap-search' function in your new programs -- a direct call to one of
+the two replacements is more efficient and unambiguous.
+
 ** The arguments to `locate-file' are now more Lisp-like.  As before,
 the usage is:
 
 ** The arguments to `locate-file' are now more Lisp-like.  As before,
 the usage is:
 
index fdd0642..555ceba 100644 (file)
@@ -29,11 +29,11 @@ the original English.
 \1f
 Indirect:
 cl.info-1: 1164
 \1f
 Indirect:
 cl.info-1: 1164
-cl.info-2: 46335
-cl.info-3: 89116
-cl.info-4: 138874
-cl.info-5: 176870
-cl.info-6: 219475
+cl.info-2: 46306
+cl.info-3: 89087
+cl.info-4: 138385
+cl.info-5: 176381
+cl.info-6: 218986
 \1f
 Tag Table:
 (Indirect)
 \1f
 Tag Table:
 (Indirect)
@@ -43,64 +43,64 @@ Node: Usage\7f4995
 Node: Organization\7f5645
 Node: Installation\7f7468
 Node: Naming Conventions\7f8621
 Node: Organization\7f5645
 Node: Installation\7f7468
 Node: Naming Conventions\7f8621
-Node: Program Structure\7f10760
-Node: Argument Lists\7f11228
-Node: Time of Evaluation\7f21011
-Node: Function Aliases\7f26991
-Node: Predicates\7f27575
-Node: Type Predicates\7f27895
-Node: Equality Predicates\7f32937
-Node: Control Structure\7f35713
-Node: Assignment\7f36517
-Node: Generalized Variables\7f37758
-Node: Basic Setf\7f39065
-Node: Modify Macros\7f46335
-Node: Customizing Setf\7f53544
-Node: Variable Bindings\7f60833
-Node: Dynamic Bindings\7f61414
-Node: Lexical Bindings\7f62304
-Node: Function Bindings\7f66408
-Node: Macro Bindings\7f68795
-Node: Conditionals\7f71718
-Node: Blocks and Exits\7f74801
-Node: Iteration\7f77857
-Node: Loop Facility\7f83330
-Node: Loop Basics\7f84257
-Node: Loop Examples\7f86857
-Node: For Clauses\7f89116
-Node: Iteration Clauses\7f100993
-Node: Accumulation Clauses\7f102834
-Node: Other Clauses\7f105178
-Node: Multiple Values\7f111247
-Node: Macros\7f113140
-Node: Declarations\7f116358
-Node: Symbols\7f124850
-Node: Property Lists\7f125150
-Node: Creating Symbols\7f128351
-Node: Numbers\7f130429
-Node: Predicates on Numbers\7f130909
-Node: Numerical Functions\7f131938
-Node: Random Numbers\7f136165
-Node: Implementation Parameters\7f138874
-Node: Sequences\7f142446
-Node: Sequence Basics\7f143119
-Node: Mapping over Sequences\7f146697
-Node: Sequence Functions\7f152551
-Node: Searching Sequences\7f158726
-Node: Sorting Sequences\7f161763
-Node: Lists\7f164311
-Node: List Functions\7f164736
-Node: Substitution of Expressions\7f168999
-Node: Lists as Sets\7f170885
-Node: Association Lists\7f174947
-Node: Hash Tables\7f176650
-Node: Structures\7f176870
-Node: Assertions\7f191653
-Node: Efficiency Concerns\7f194596
-Node: Common Lisp Compatibility\7f200923
-Node: Old CL Compatibility\7f204079
-Node: Porting Common Lisp\7f208462
-Node: Function Index\7f219475
-Node: Variable Index\7f230738
+Node: Program Structure\7f10748
+Node: Argument Lists\7f11216
+Node: Time of Evaluation\7f20999
+Node: Function Aliases\7f26979
+Node: Predicates\7f27563
+Node: Type Predicates\7f27883
+Node: Equality Predicates\7f32925
+Node: Control Structure\7f35701
+Node: Assignment\7f36505
+Node: Generalized Variables\7f37746
+Node: Basic Setf\7f39053
+Node: Modify Macros\7f46306
+Node: Customizing Setf\7f53515
+Node: Variable Bindings\7f60804
+Node: Dynamic Bindings\7f61385
+Node: Lexical Bindings\7f62275
+Node: Function Bindings\7f66379
+Node: Macro Bindings\7f68766
+Node: Conditionals\7f71689
+Node: Blocks and Exits\7f74772
+Node: Iteration\7f77828
+Node: Loop Facility\7f83301
+Node: Loop Basics\7f84228
+Node: Loop Examples\7f86828
+Node: For Clauses\7f89087
+Node: Iteration Clauses\7f100964
+Node: Accumulation Clauses\7f102805
+Node: Other Clauses\7f105149
+Node: Multiple Values\7f111218
+Node: Macros\7f113111
+Node: Declarations\7f116329
+Node: Symbols\7f124821
+Node: Property Lists\7f125113
+Node: Creating Symbols\7f127862
+Node: Numbers\7f129940
+Node: Predicates on Numbers\7f130420
+Node: Numerical Functions\7f131449
+Node: Random Numbers\7f135676
+Node: Implementation Parameters\7f138385
+Node: Sequences\7f141957
+Node: Sequence Basics\7f142630
+Node: Mapping over Sequences\7f146208
+Node: Sequence Functions\7f152062
+Node: Searching Sequences\7f158237
+Node: Sorting Sequences\7f161274
+Node: Lists\7f163822
+Node: List Functions\7f164247
+Node: Substitution of Expressions\7f168510
+Node: Lists as Sets\7f170396
+Node: Association Lists\7f174458
+Node: Hash Tables\7f176161
+Node: Structures\7f176381
+Node: Assertions\7f191164
+Node: Efficiency Concerns\7f194107
+Node: Common Lisp Compatibility\7f200434
+Node: Old CL Compatibility\7f203590
+Node: Porting Common Lisp\7f207973
+Node: Function Index\7f218986
+Node: Variable Index\7f230192
 \1f
 End Tag Table
 \1f
 End Tag Table
index 9b95d11..3ec19ca 100644 (file)
@@ -84,7 +84,7 @@ ways than you can imagine, it does have its short-comings.
    Firstly, Elisp is an interpreted language, and this has serious speed
 implications.  Like all other interpreted languages (like Java), Elisp
 is often suitable only for certain types of application or extension.
    Firstly, Elisp is an interpreted language, and this has serious speed
 implications.  Like all other interpreted languages (like Java), Elisp
 is often suitable only for certain types of application or extension.
-So although Elisp is a general purpose language, and very ligh level,
+So although Elisp is a general purpose language, and very high level,
 there are times when it is desirable to descend to a lower level
 compiled language for speed purposes.
 
 there are times when it is desirable to descend to a lower level
 compiled language for speed purposes.
 
index c3f6ad1..50efcfe 100644 (file)
@@ -3,7 +3,7 @@ internals/internals.texi.
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
-* Internals: (internals).      XEmacs Internals Manual.
+* Internals: (internals).       XEmacs Internals Manual.
 END-INFO-DIR-ENTRY
 
    Copyright (C) 1992 - 1996 Ben Wing.  Copyright (C) 1996, 1997 Sun
 END-INFO-DIR-ENTRY
 
    Copyright (C) 1992 - 1996 Ben Wing.  Copyright (C) 1996, 1997 Sun
@@ -39,141 +39,141 @@ Foundation instead of in the original English.
 
 \1f
 Indirect:
 
 \1f
 Indirect:
-internals.info-1: 1770
-internals.info-2: 45926
-internals.info-3: 92999
-internals.info-4: 141367
-internals.info-5: 183398
-internals.info-6: 232819
-internals.info-7: 281549
-internals.info-8: 331006
+internals.info-1: 1776
+internals.info-2: 45928
+internals.info-3: 93572
+internals.info-4: 141935
+internals.info-5: 183963
+internals.info-6: 233381
+internals.info-7: 282110
+internals.info-8: 331561
 \1f
 Tag Table:
 (Indirect)
 \1f
 Tag Table:
 (Indirect)
-Node: Top\7f1770
-Node: A History of Emacs\7f6352
-Node: Through Version 18\7f7877
-Node: Lucid Emacs\7f11298
-Node: GNU Emacs 19\7f14316
-Node: GNU Emacs 20\7f16499
-Node: XEmacs\7f16926
-Node: XEmacs From the Outside\7f20105
-Node: The Lisp Language\7f21873
-Node: XEmacs From the Perspective of Building\7f31418
-Node: XEmacs From the Inside\7f37543
-Node: The XEmacs Object System (Abstractly Speaking)\7f45926
+Node: Top\7f1776
+Node: A History of Emacs\7f6358
+Node: Through Version 18\7f7883
+Node: Lucid Emacs\7f11304
+Node: GNU Emacs 19\7f14322
+Node: GNU Emacs 20\7f16505
+Node: XEmacs\7f16932
+Node: XEmacs From the Outside\7f20111
+Node: The Lisp Language\7f21878
+Node: XEmacs From the Perspective of Building\7f31420
+Node: XEmacs From the Inside\7f37545
+Node: The XEmacs Object System (Abstractly Speaking)\7f45928
 Node: How Lisp Objects Are Represented in C\7f60014
 Node: How Lisp Objects Are Represented in C\7f60014
-Node: Rules When Writing New C Code\7f68576
-Node: General Coding Rules\7f69380
-Node: Writing Lisp Primitives\7f74540
-Node: Adding Global Lisp Variables\7f85709
-Node: Coding for Mule\7f89347
-Node: Character-Related Data Types\7f90326
-Node: Working With Character and Byte Positions\7f92999
-Node: Conversion to and from External Data\7f96749
-Node: General Guidelines for Writing Mule-Aware Code\7f101630
-Node: An Example of Mule-Aware Code\7f103661
-Node: Techniques for XEmacs Developers\7f105648
-Node: A Summary of the Various XEmacs Modules\7f109415
-Node: Low-Level Modules\7f110235
-Node: Basic Lisp Modules\7f117757
-Node: Modules for Standard Editing Operations\7f126081
-Node: Editor-Level Control Flow Modules\7f131969
-Node: Modules for the Basic Displayable Lisp Objects\7f135416
-Node: Modules for other Display-Related Lisp Objects\7f137938
-Node: Modules for the Redisplay Mechanism\7f139016
-Node: Modules for Interfacing with the File System\7f141367
-Node: Modules for Other Aspects of the Lisp Interpreter and Object System\7f145065
-Node: Modules for Interfacing with the Operating System\7f150519
-Node: Modules for Interfacing with X Windows\7f158180
-Node: Modules for Internationalization\7f161616
-Node: Allocation of Objects in XEmacs Lisp\7f164253
-Node: Introduction to Allocation\7f164807
-Node: Garbage Collection\7f170270
-Node: GCPROing\7f173223
-Node: Garbage Collection - Step by Step\7f180034
-Node: Invocation\7f180426
-Node: garbage_collect_1\7f183398
-Node: mark_object\7f192878
-Node: gc_sweep\7f194690
-Node: sweep_lcrecords_1\7f199753
-Node: compact_string_chars\7f200748
-Node: sweep_strings\7f202928
-Node: sweep_bit_vectors_1\7f203893
-Node: Integers and Characters\7f204569
-Node: Allocation from Frob Blocks\7f205321
-Node: lrecords\7f206925
-Node: Low-level allocation\7f219387
-Node: Pure Space\7f223555
-Node: Cons\7f223730
-Node: Vector\7f224446
-Node: Bit Vector\7f225023
-Node: Symbol\7f225516
-Node: Marker\7f226085
-Node: String\7f226640
-Node: Compiled Function\7f230255
-Node: Events and the Event Loop\7f230424
-Node: Introduction to Events\7f230903
-Node: Main Loop\7f232819
-Node: Specifics of the Event Gathering Mechanism\7f236395
-Node: Specifics About the Emacs Event\7f248848
-Node: The Event Stream Callback Routines\7f249103
-Node: Other Event Loop Functions\7f249348
-Node: Converting Events\7f250488
-Node: Dispatching Events; The Command Builder\7f251097
-Node: Evaluation; Stack Frames; Bindings\7f251332
-Node: Evaluation\7f251674
-Node: Dynamic Binding; The specbinding Stack; Unwind-Protects\7f258214
-Node: Simple Special Forms\7f260598
-Node: Catch and Throw\7f261380
-Node: Symbols and Variables\7f263955
-Node: Introduction to Symbols\7f264219
-Node: Obarrays\7f265257
-Node: Symbol Values\7f268790
-Node: Buffers and Textual Representation\7f271078
-Node: Introduction to Buffers\7f271736
-Node: The Text in a Buffer\7f274399
-Node: Buffer Lists\7f281549
-Node: Markers and Extents\7f283500
-Node: Bufbytes and Emchars\7f285765
-Node: The Buffer Object\7f285980
-Node: MULE Character Sets and Encodings\7f289460
-Node: Character Sets\7f290522
-Node: Encodings\7f293965
-Node: Japanese EUC (Extended Unix Code)\7f295032
-Node: JIS7\7f295846
-Node: Internal Mule Encodings\7f297196
-Node: Internal String Encoding\7f299026
-Node: Internal Character Encoding\7f301139
-Node: CCL\7f302863
-Node: The Lisp Reader and Compiler\7f309615
-Node: Lstreams\7f309828
-Node: Creating an Lstream\7f310859
-Node: Lstream Types\7f312069
-Node: Lstream Functions\7f312321
-Node: Lstream Methods\7f315890
-Node: Consoles; Devices; Frames; Windows\7f319033
-Node: Introduction to Consoles; Devices; Frames; Windows\7f319348
-Node: Point\7f321840
-Node: Window Hierarchy\7f323119
-Node: The Window Object\7f327569
-Node: The Redisplay Mechanism\7f331006
-Node: Critical Redisplay Sections\7f331798
-Node: Line Start Cache\7f332753
-Node: Redisplay Piece by Piece\7f335990
-Node: Extents\7f338026
-Node: Introduction to Extents\7f338564
-Node: Extent Ordering\7f339690
-Node: Format of the Extent Info\7f340931
-Node: Zero-Length Extents\7f342819
-Node: Mathematics of Extent Ordering\7f344217
-Node: Extent Fragments\7f348974
-Node: Faces\7f350061
-Node: Glyphs\7f350177
-Node: Specifiers\7f353195
-Node: Menus\7f353324
-Node: Subprocesses\7f355582
-Node: Interface to X Windows\7f357558
-Node: Index\7f357729
+Node: Rules When Writing New C Code\7f68572
+Node: General Coding Rules\7f69376
+Node: Writing Lisp Primitives\7f75113
+Node: Adding Global Lisp Variables\7f86282
+Node: Coding for Mule\7f89920
+Node: Character-Related Data Types\7f90899
+Node: Working With Character and Byte Positions\7f93572
+Node: Conversion to and from External Data\7f97322
+Node: General Guidelines for Writing Mule-Aware Code\7f102203
+Node: An Example of Mule-Aware Code\7f104234
+Node: Techniques for XEmacs Developers\7f106221
+Node: A Summary of the Various XEmacs Modules\7f109988
+Node: Low-Level Modules\7f110808
+Node: Basic Lisp Modules\7f118330
+Node: Modules for Standard Editing Operations\7f126651
+Node: Editor-Level Control Flow Modules\7f132539
+Node: Modules for the Basic Displayable Lisp Objects\7f135985
+Node: Modules for other Display-Related Lisp Objects\7f138507
+Node: Modules for the Redisplay Mechanism\7f139584
+Node: Modules for Interfacing with the File System\7f141935
+Node: Modules for Other Aspects of the Lisp Interpreter and Object System\7f145633
+Node: Modules for Interfacing with the Operating System\7f151086
+Node: Modules for Interfacing with X Windows\7f158747
+Node: Modules for Internationalization\7f162183
+Node: Allocation of Objects in XEmacs Lisp\7f164820
+Node: Introduction to Allocation\7f165374
+Node: Garbage Collection\7f170836
+Node: GCPROing\7f173789
+Node: Garbage Collection - Step by Step\7f180599
+Node: Invocation\7f180991
+Node: garbage_collect_1\7f183963
+Node: mark_object\7f193443
+Node: gc_sweep\7f195255
+Node: sweep_lcrecords_1\7f200318
+Node: compact_string_chars\7f201313
+Node: sweep_strings\7f203493
+Node: sweep_bit_vectors_1\7f204458
+Node: Integers and Characters\7f205134
+Node: Allocation from Frob Blocks\7f205886
+Node: lrecords\7f207490
+Node: Low-level allocation\7f219952
+Node: Pure Space\7f224120
+Node: Cons\7f224295
+Node: Vector\7f225011
+Node: Bit Vector\7f225588
+Node: Symbol\7f226081
+Node: Marker\7f226650
+Node: String\7f227205
+Node: Compiled Function\7f230818
+Node: Events and the Event Loop\7f230987
+Node: Introduction to Events\7f231466
+Node: Main Loop\7f233381
+Node: Specifics of the Event Gathering Mechanism\7f236956
+Node: Specifics About the Emacs Event\7f249409
+Node: The Event Stream Callback Routines\7f249664
+Node: Other Event Loop Functions\7f249909
+Node: Converting Events\7f251049
+Node: Dispatching Events; The Command Builder\7f251658
+Node: Evaluation; Stack Frames; Bindings\7f251893
+Node: Evaluation\7f252235
+Node: Dynamic Binding; The specbinding Stack; Unwind-Protects\7f258775
+Node: Simple Special Forms\7f261159
+Node: Catch and Throw\7f261941
+Node: Symbols and Variables\7f264516
+Node: Introduction to Symbols\7f264780
+Node: Obarrays\7f265818
+Node: Symbol Values\7f269351
+Node: Buffers and Textual Representation\7f271639
+Node: Introduction to Buffers\7f272297
+Node: The Text in a Buffer\7f274960
+Node: Buffer Lists\7f282110
+Node: Markers and Extents\7f284061
+Node: Bufbytes and Emchars\7f286326
+Node: The Buffer Object\7f286541
+Node: MULE Character Sets and Encodings\7f290021
+Node: Character Sets\7f291083
+Node: Encodings\7f294526
+Node: Japanese EUC (Extended Unix Code)\7f295593
+Node: JIS7\7f296407
+Node: Internal Mule Encodings\7f297757
+Node: Internal String Encoding\7f299587
+Node: Internal Character Encoding\7f301700
+Node: CCL\7f303424
+Node: The Lisp Reader and Compiler\7f310176
+Node: Lstreams\7f310389
+Node: Creating an Lstream\7f311420
+Node: Lstream Types\7f312630
+Node: Lstream Functions\7f312882
+Node: Lstream Methods\7f316448
+Node: Consoles; Devices; Frames; Windows\7f319590
+Node: Introduction to Consoles; Devices; Frames; Windows\7f319905
+Node: Point\7f322397
+Node: Window Hierarchy\7f323676
+Node: The Window Object\7f328124
+Node: The Redisplay Mechanism\7f331561
+Node: Critical Redisplay Sections\7f332353
+Node: Line Start Cache\7f333308
+Node: Redisplay Piece by Piece\7f336544
+Node: Extents\7f338580
+Node: Introduction to Extents\7f339118
+Node: Extent Ordering\7f340244
+Node: Format of the Extent Info\7f341485
+Node: Zero-Length Extents\7f343372
+Node: Mathematics of Extent Ordering\7f344770
+Node: Extent Fragments\7f349527
+Node: Faces\7f350613
+Node: Glyphs\7f350729
+Node: Specifiers\7f353747
+Node: Menus\7f353876
+Node: Subprocesses\7f356134
+Node: Interface to X Windows\7f358110
+Node: Index\7f358281
 \1f
 End Tag Table
 \1f
 End Tag Table
index 5768b91..c385b18 100644 (file)
@@ -3,7 +3,7 @@ internals/internals.texi.
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
-* Internals: (internals).      XEmacs Internals Manual.
+* Internals: (internals).       XEmacs Internals Manual.
 END-INFO-DIR-ENTRY
 
    Copyright (C) 1992 - 1996 Ben Wing.  Copyright (C) 1996, 1997 Sun
 END-INFO-DIR-ENTRY
 
    Copyright (C) 1992 - 1996 Ben Wing.  Copyright (C) 1996, 1997 Sun
@@ -595,8 +595,8 @@ Some of these objects (in particular windows and frames) have
 displayable representations, and XEmacs provides a function
 `redisplay()' that ensures that the display of all such objects matches
 their internal state.  Most of the time, a standard Lisp environment is
 displayable representations, and XEmacs provides a function
 `redisplay()' that ensures that the display of all such objects matches
 their internal state.  Most of the time, a standard Lisp environment is
-in a "read-eval-print" loop - i.e. "read some Lisp code, execute it,
-and print the results".  XEmacs has a similar loop:
+in a "read-eval-print" loop--i.e. "read some Lisp code, execute it, and
+print the results".  XEmacs has a similar loop:
 
    * read an event
 
 
    * read an event
 
@@ -739,7 +739,7 @@ between C and Lisp:
      installed by the top-level event loop, is executed; this prints
      out the error and continues.) Routines can also specify cleanup
      code (called an "unwind-protect") that will be called when control
      installed by the top-level event loop, is executed; this prints
      out the error and continues.) Routines can also specify cleanup
      code (called an "unwind-protect") that will be called when control
-     exits from a block of code, no matter how that exit occurs - i.e.
+     exits from a block of code, no matter how that exit occurs--i.e.
      even if a function deeply nested below it causes a non-local exit
      back to the top level.
 
      even if a function deeply nested below it causes a non-local exit
      back to the top level.
 
@@ -753,8 +753,8 @@ between C and Lisp:
      "see" the local variable you declared.  This is actually
      considered a bug in Emacs Lisp and in all other early dialects of
      Lisp, and was corrected in Common Lisp. (In Common Lisp, you can
      "see" the local variable you declared.  This is actually
      considered a bug in Emacs Lisp and in all other early dialects of
      Lisp, and was corrected in Common Lisp. (In Common Lisp, you can
-     still declare dynamically scoped variables if you want to - they
-     are sometimes useful - but variables by default are "lexically
+     still declare dynamically scoped variables if you want to--they
+     are sometimes useful--but variables by default are "lexically
      scoped" as in C.)
 
    For those familiar with Lisp, Emacs Lisp is modelled after MacLisp,
      scoped" as in C.)
 
    For those familiar with Lisp, Emacs Lisp is modelled after MacLisp,
index 0ae8e55..e69dc42 100644 (file)
@@ -3,7 +3,7 @@ internals/internals.texi.
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
-* Internals: (internals).      XEmacs Internals Manual.
+* Internals: (internals).       XEmacs Internals Manual.
 END-INFO-DIR-ENTRY
 
    Copyright (C) 1992 - 1996 Ben Wing.  Copyright (C) 1996, 1997 Sun
 END-INFO-DIR-ENTRY
 
    Copyright (C) 1992 - 1996 Ben Wing.  Copyright (C) 1996, 1997 Sun
@@ -71,18 +71,18 @@ internal operations.)
      like integers in many ways but are logically considered text
      rather than numbers and have a different read syntax. (the read
      syntax for a char contains the char itself or some textual
      like integers in many ways but are logically considered text
      rather than numbers and have a different read syntax. (the read
      syntax for a char contains the char itself or some textual
-     encoding of it - for example, a Japanese Kanji character might be
-     encoded as `^[$(B#&^[(B' using the ISO-2022 encoding standard -
-     rather than the numerical representation of the char; this way, if
-     the mapping between chars and integers changes, which is quite
-     possible for Kanji characters and other extended characters, the
-     same character will still be created.  Note that some primitives
-     confuse chars and integers.  The worst culprit is `eq', which
-     makes a special exception and considers a char to be `eq' to its
-     integer equivalent, even though in no other case are objects of two
-     different types `eq'.  The reason for this monstrosity is
-     compatibility with existing code; the separation of char from
-     integer came fairly recently.)
+     encoding of it--for example, a Japanese Kanji character might be
+     encoded as `^[$(B#&^[(B' using the ISO-2022 encoding
+     standard--rather than the numerical representation of the char;
+     this way, if the mapping between chars and integers changes, which
+     is quite possible for Kanji characters and other extended
+     characters, the same character will still be created.  Note that
+     some primitives confuse chars and integers.  The worst culprit is
+     `eq', which makes a special exception and considers a char to be
+     `eq' to its integer equivalent, even though in no other case are
+     objects of two different types `eq'.  The reason for this
+     monstrosity is compatibility with existing code; the separation of
+     char from integer came fairly recently.)
 
 `symbol'
      An object that contains Lisp objects and is referred to by name;
 
 `symbol'
      An object that contains Lisp objects and is referred to by name;
@@ -415,10 +415,10 @@ chars, the lower 28 bits contain the value of the integer or char; for
 all others, the lower 28 bits contain a pointer.  The mark bit is used
 during garbage-collection, and is always 0 when garbage collection is
 not happening. (The way that garbage collection works, basically, is
 all others, the lower 28 bits contain a pointer.  The mark bit is used
 during garbage-collection, and is always 0 when garbage collection is
 not happening. (The way that garbage collection works, basically, is
-that it loops over all places where Lisp objects could exist - this
+that it loops over all places where Lisp objects could exist--this
 includes all global variables in C that contain Lisp objects [including
 `Vobarray', the C equivalent of `obarray'; through this, all Lisp
 includes all global variables in C that contain Lisp objects [including
 `Vobarray', the C equivalent of `obarray'; through this, all Lisp
-variables will get marked], plus various other places - and recursively
+variables will get marked], plus various other places--and recursively
 scans through the Lisp objects, marking each object it finds by setting
 the mark bit.  Then it goes through the lists of all objects allocated,
 freeing the ones that are not marked and turning off the mark bit of
 scans through the Lisp objects, marking each object it finds by setting
 the mark bit.  Then it goes through the lists of all objects allocated,
 freeing the ones that are not marked and turning off the mark bit of
@@ -522,10 +522,10 @@ that don't, a more complicated definition is selected by defining
 `EXPLICIT_SIGN_EXTEND'.
 
    Note that when `ERROR_CHECK_TYPECHECK' is defined, the extractor
 `EXPLICIT_SIGN_EXTEND'.
 
    Note that when `ERROR_CHECK_TYPECHECK' is defined, the extractor
-macros become more complicated - they check the tag bits and/or the
-type field in the first four bytes of a record type to ensure that the
+macros become more complicated--they check the tag bits and/or the type
+field in the first four bytes of a record type to ensure that the
 object is really of the correct type.  This is great for catching places
 object is really of the correct type.  This is great for catching places
-where an incorrect type is being dereferenced - this typically results
+where an incorrect type is being dereferenced--this typically results
 in a pointer being dereferenced as the wrong type of structure, with
 unpredictable (and sometimes not easily traceable) results.
 
 in a pointer being dereferenced as the wrong type of structure, with
 unpredictable (and sometimes not easily traceable) results.
 
@@ -607,6 +607,15 @@ included before any other header files (including system header files)
 to ensure that certain tricks played by various `s/' and `m/' files
 work out correctly.
 
 to ensure that certain tricks played by various `s/' and `m/' files
 work out correctly.
 
+   When including header files, always use angle brackets, not double
+quotes, except when the file to be included is in the same directory as
+the including file.  If either file is a generated file, then that is
+not likely to be the case.  In order to understand why we have this
+rule, imagine what happens when you do a build in the source directory
+using `./configure' and another build in another directory using
+`../work/configure'.  There will be two different `config.h' files.
+Which one will be used if you `#include "config.h"'?
+
    *All global and static variables that are to be modifiable must be
 declared uninitialized.*  This means that you may not use the "declare
 with initializer" form for these variables, such as `int some_variable
    *All global and static variables that are to be modifiable must be
 declared uninitialized.*  This means that you may not use the "declare
 with initializer" form for these variables, such as `int some_variable
@@ -616,7 +625,7 @@ so that it becomes part of the (unmodifiable) code segment in the
 dumped executable.  This allows this memory to be shared among multiple
 running XEmacs processes.  XEmacs is careful to place as much constant
 data as possible into initialized variables (in particular, into what's
 dumped executable.  This allows this memory to be shared among multiple
 running XEmacs processes.  XEmacs is careful to place as much constant
 data as possible into initialized variables (in particular, into what's
-called the "pure space" - see below) during the `temacs' phase.
+called the "pure space"--see below) during the `temacs' phase.
 
    *Please note:* This kludge only works on a few systems nowadays, and
 is rapidly becoming irrelevant because most modern operating systems
 
    *Please note:* This kludge only works on a few systems nowadays, and
 is rapidly becoming irrelevant because most modern operating systems
@@ -645,10 +654,10 @@ them.  This awful kludge has been removed in XEmacs because
    The C source code makes heavy use of C preprocessor macros.  One
 popular macro style is:
 
    The C source code makes heavy use of C preprocessor macros.  One
 popular macro style is:
 
-     #define FOO(var, value) do {              \
-       Lisp_Object FOO_value = (value);        \
-       ... /* compute using FOO_value */       \
-       (var) = bar;                            \
+     #define FOO(var, value) do {           \
+       Lisp_Object FOO_value = (value);      \
+       ... /* compute using FOO_value */     \
+       (var) = bar;                          \
      } while (0)
 
    The `do {...} while (0)' is a standard trick to allow FOO to have
      } while (0)
 
    The `do {...} while (0)' is a standard trick to allow FOO to have
index da8e934..87a898d 100644 (file)
@@ -52,838 +52,838 @@ Foundation instead of in the original English.
 \1f
 Indirect:
 lispref.info-1: 2366
 \1f
 Indirect:
 lispref.info-1: 2366
-lispref.info-2: 48385
-lispref.info-3: 96924
-lispref.info-4: 146766
-lispref.info-5: 195600
-lispref.info-6: 243285
-lispref.info-7: 291568
-lispref.info-8: 340704
-lispref.info-9: 387518
-lispref.info-10: 436970
-lispref.info-11: 485198
-lispref.info-12: 534963
-lispref.info-13: 582862
-lispref.info-14: 631085
-lispref.info-15: 679339
-lispref.info-16: 729095
-lispref.info-17: 777846
-lispref.info-18: 824696
-lispref.info-19: 871747
-lispref.info-20: 920477
-lispref.info-21: 969899
-lispref.info-22: 1016818
-lispref.info-23: 1063845
-lispref.info-24: 1113244
-lispref.info-25: 1162926
-lispref.info-26: 1212836
-lispref.info-27: 1262059
-lispref.info-28: 1310826
-lispref.info-29: 1360263
-lispref.info-30: 1401598
-lispref.info-31: 1450741
-lispref.info-32: 1499954
-lispref.info-33: 1549528
-lispref.info-34: 1597705
-lispref.info-35: 1643337
-lispref.info-36: 1684653
-lispref.info-37: 1729594
-lispref.info-38: 1779281
-lispref.info-39: 1828385
-lispref.info-40: 1877789
-lispref.info-41: 1927673
-lispref.info-42: 1976664
-lispref.info-43: 2020556
-lispref.info-44: 2058892
+lispref.info-2: 48386
+lispref.info-3: 96925
+lispref.info-4: 146765
+lispref.info-5: 195599
+lispref.info-6: 243284
+lispref.info-7: 291562
+lispref.info-8: 340698
+lispref.info-9: 387512
+lispref.info-10: 436964
+lispref.info-11: 485192
+lispref.info-12: 534964
+lispref.info-13: 582863
+lispref.info-14: 631086
+lispref.info-15: 679340
+lispref.info-16: 729096
+lispref.info-17: 777847
+lispref.info-18: 824752
+lispref.info-19: 872135
+lispref.info-20: 920976
+lispref.info-21: 970569
+lispref.info-22: 1017488
+lispref.info-23: 1064515
+lispref.info-24: 1113914
+lispref.info-25: 1163596
+lispref.info-26: 1213506
+lispref.info-27: 1262729
+lispref.info-28: 1311495
+lispref.info-29: 1360931
+lispref.info-30: 1402266
+lispref.info-31: 1451409
+lispref.info-32: 1500622
+lispref.info-33: 1550196
+lispref.info-34: 1598675
+lispref.info-35: 1644357
+lispref.info-36: 1686356
+lispref.info-37: 1731296
+lispref.info-38: 1780983
+lispref.info-39: 1830087
+lispref.info-40: 1879491
+lispref.info-41: 1928817
+lispref.info-42: 1977518
+lispref.info-43: 2022945
+lispref.info-44: 2061281
 \1f
 Tag Table:
 (Indirect)
 Node: Top\7f2366
 \1f
 Tag Table:
 (Indirect)
 Node: Top\7f2366
-Node: Copying\7f48385
-Node: Introduction\7f67543
-Node: Caveats\7f69134
-Node: Lisp History\7f70865
-Node: Conventions\7f72121
-Node: Some Terms\7f72936
-Node: nil and t\7f73657
-Node: Evaluation Notation\7f75334
-Node: Printing Notation\7f76247
-Node: Error Messages\7f77121
-Node: Buffer Text Notation\7f77562
-Node: Format of Descriptions\7f78437
-Node: A Sample Function Description\7f79291
-Node: A Sample Variable Description\7f83277
-Node: Acknowledgements\7f84185
-Node: Lisp Data Types\7f86163
-Node: Printed Representation\7f88718
-Node: Comments\7f90760
-Node: Primitive Types\7f91657
-Node: Programming Types\7f93316
-Node: Integer Type\7f95268
-Node: Floating Point Type\7f96305
-Node: Character Type\7f96924
-Node: Symbol Type\7f104830
-Node: Sequence Type\7f107525
-Node: Cons Cell Type\7f109044
-Node: Dotted Pair Notation\7f113528
-Node: Association List Type\7f115649
-Node: Array Type\7f116532
-Node: String Type\7f117998
-Node: Vector Type\7f120679
-Node: Bit Vector Type\7f121451
-Node: Function Type\7f122313
-Node: Macro Type\7f123426
-Node: Primitive Function Type\7f124123
-Node: Compiled-Function Type\7f125649
-Node: Autoload Type\7f126203
-Node: Char Table Type\7f127217
-Node: Hash Table Type\7f127391
-Node: Range Table Type\7f128546
-Node: Weak List Type\7f129399
-Node: Editing Types\7f129549
-Node: Buffer Type\7f131176
-Node: Marker Type\7f133203
-Node: Extent Type\7f133927
-Node: Window Type\7f135195
-Node: Frame Type\7f136606
-Node: Device Type\7f137401
-Node: Console Type\7f138227
-Node: Window Configuration Type\7f139428
-Node: Event Type\7f140126
-Node: Process Type\7f140290
-Node: Stream Type\7f141325
-Node: Keymap Type\7f142448
-Node: Syntax Table Type\7f142986
-Node: Display Table Type\7f144009
-Node: Database Type\7f144448
-Node: Charset Type\7f144614
-Node: Coding System Type\7f144778
-Node: ToolTalk Message Type\7f144962
-Node: ToolTalk Pattern Type\7f145161
-Node: Window-System Types\7f145333
-Node: Face Type\7f146479
-Node: Glyph Type\7f146610
-Node: Specifier Type\7f146766
-Node: Font Instance Type\7f146939
-Node: Color Instance Type\7f147129
-Node: Image Instance Type\7f147326
-Node: Toolbar Button Type\7f147524
-Node: Subwindow Type\7f147717
-Node: X Resource Type\7f147896
-Node: Type Predicates\7f148049
-Node: Equality Predicates\7f157178
-Node: Numbers\7f161983
-Node: Integer Basics\7f163438
-Node: Float Basics\7f165787
-Node: Predicates on Numbers\7f167529
-Node: Comparison of Numbers\7f169162
-Node: Numeric Conversions\7f172983
-Node: Arithmetic Operations\7f174449
-Node: Rounding Operations\7f179914
-Node: Bitwise Operations\7f181019
-Node: Math Functions\7f190065
-Node: Random Numbers\7f192381
-Node: Strings and Characters\7f194147
-Node: String Basics\7f195600
-Node: Predicates for Strings\7f198018
-Node: Creating Strings\7f198781
-Node: Predicates for Characters\7f204098
-Node: Character Codes\7f205169
-Node: Text Comparison\7f206582
-Node: String Conversion\7f209944
-Node: Modifying Strings\7f213620
-Node: String Properties\7f214261
-Node: Formatting Strings\7f214904
-Node: Character Case\7f224522
-Node: Case Tables\7f227668
-Node: Char Tables\7f231566
-Node: Char Table Types\7f232958
-Node: Working With Char Tables\7f234533
-Node: Lists\7f236482
-Node: Cons Cells\7f237605
-Node: Lists as Boxes\7f238941
-Node: List-related Predicates\7f241583
-Node: List Elements\7f243285
-Node: Building Lists\7f248314
-Node: Modifying Lists\7f254306
-Node: Setcar\7f255118
-Node: Setcdr\7f257539
-Node: Rearrangement\7f260050
-Node: Sets And Lists\7f265636
-Node: Association Lists\7f269864
-Ref: Association Lists-Footnote-1\7f279159
-Node: Property Lists\7f279364
-Node: Working With Normal Plists\7f280912
-Node: Working With Lax Plists\7f283180
-Node: Converting Plists To/From Alists\7f285420
-Node: Weak Lists\7f286768
-Node: Sequences Arrays Vectors\7f288932
-Node: Sequence Functions\7f291568
-Node: Arrays\7f295227
-Node: Array Functions\7f298291
-Node: Vectors\7f300824
-Node: Vector Functions\7f302322
-Node: Bit Vectors\7f304893
-Node: Bit Vector Functions\7f305738
-Node: Symbols\7f307988
-Node: Symbol Components\7f309037
-Node: Definitions\7f313210
-Node: Creating Symbols\7f315435
-Node: Symbol Properties\7f322469
-Node: Plists and Alists\7f323985
-Node: Symbol Plists\7f325734
-Node: Other Plists\7f327543
-Node: Evaluation\7f329321
-Node: Intro Eval\7f330126
-Ref: Intro Eval-Footnote-1\7f333479
-Node: Eval\7f333614
-Node: Forms\7f338032
-Node: Self-Evaluating Forms\7f339191
-Node: Symbol Forms\7f340704
-Node: Classifying Lists\7f341621
-Node: Function Indirection\7f342377
-Node: Function Forms\7f345488
-Node: Macro Forms\7f346485
-Node: Special Forms\7f348085
-Node: Autoloading\7f350394
-Node: Quoting\7f350892
-Node: Control Structures\7f352253
-Node: Sequencing\7f353873
-Node: Conditionals\7f356738
-Node: Combining Conditions\7f360161
-Node: Iteration\7f363431
-Node: Nonlocal Exits\7f365210
-Node: Catch and Throw\7f365912
-Node: Examples of Catch\7f369751
-Node: Errors\7f371770
-Node: Signaling Errors\7f373259
-Node: Processing of Errors\7f377998
-Node: Handling Errors\7f380277
-Node: Error Symbols\7f387518
-Node: Cleanups\7f391474
-Node: Variables\7f395252
-Node: Global Variables\7f397021
-Node: Constant Variables\7f398097
-Node: Local Variables\7f398723
-Node: Void Variables\7f403660
-Node: Defining Variables\7f407176
-Node: Accessing Variables\7f414340
-Node: Setting Variables\7f415765
-Node: Variable Scoping\7f420284
-Node: Scope\7f421883
-Node: Extent\7f423408
-Node: Impl of Scope\7f424887
-Node: Using Scoping\7f426850
-Node: Buffer-Local Variables\7f428372
-Node: Intro to Buffer-Local\7f429208
-Node: Creating Buffer-Local\7f431751
-Node: Default Value\7f436970
-Node: Variable Aliases\7f440113
-Node: Functions\7f441898
-Node: What Is a Function\7f442992
-Node: Lambda Expressions\7f447038
-Node: Lambda Components\7f447948
-Node: Simple Lambda\7f449780
-Node: Argument List\7f451437
-Node: Function Documentation\7f455165
-Node: Function Names\7f457107
-Node: Defining Functions\7f459680
-Node: Calling Functions\7f462720
-Node: Mapping Functions\7f466569
-Node: Anonymous Functions\7f469257
-Node: Function Cells\7f472502
-Node: Inline Functions\7f477312
-Node: Related Topics\7f479122
-Node: Macros\7f480175
-Node: Simple Macro\7f481459
-Node: Expansion\7f482194
-Node: Compiling Macros\7f485198
-Node: Defining Macros\7f487034
-Node: Backquote\7f488351
-Node: Problems with Macros\7f490748
-Node: Argument Evaluation\7f491443
-Node: Surprising Local Vars\7f494358
-Node: Eval During Expansion\7f496426
-Node: Repeated Expansion\7f498119
-Node: Customization\7f500035
-Node: Common Keywords\7f500504
-Node: Group Definitions\7f503349
-Node: Variable Definitions\7f505541
-Node: Customization Types\7f510524
-Node: Simple Types\7f511959
-Node: Composite Types\7f514116
-Node: Splicing into Lists\7f518806
-Node: Type Keywords\7f520641
-Node: Loading\7f524161
-Node: How Programs Do Loading\7f525836
-Node: Autoload\7f534963
-Node: Repeated Loading\7f541042
-Node: Named Features\7f543155
-Node: Unloading\7f549587
-Node: Hooks for Loading\7f551743
-Node: Byte Compilation\7f552460
-Node: Speed of Byte-Code\7f554377
-Node: Compilation Functions\7f555584
-Node: Docs and Compilation\7f561971
-Node: Dynamic Loading\7f564624
-Node: Eval During Compile\7f566988
-Node: Compiled-Function Objects\7f568253
-Node: Disassembly\7f573051
-Node: Debugging\7f580305
-Node: Debugger\7f581717
-Node: Error Debugging\7f582862
-Node: Infinite Loops\7f585615
-Node: Function Debugging\7f586859
-Node: Explicit Debug\7f589649
-Node: Using Debugger\7f590420
-Node: Debugger Commands\7f592282
-Node: Invoking the Debugger\7f596599
-Node: Internals of Debugger\7f600514
-Node: Syntax Errors\7f605401
-Node: Excess Open\7f606649
-Node: Excess Close\7f608524
-Node: Compilation Errors\7f609945
-Node: Edebug\7f611233
-Node: Using Edebug\7f613341
-Node: Instrumenting\7f616038
-Node: Edebug Execution Modes\7f619527
-Node: Jumping\7f622637
-Node: Edebug Misc\7f624980
-Node: Breakpoints\7f626369
-Node: Global Break Condition\7f629175
-Node: Embedded Breakpoints\7f630130
-Node: Trapping Errors\7f631085
-Node: Edebug Views\7f633161
-Node: Edebug Eval\7f635126
-Node: Eval List\7f636303
-Node: Reading in Edebug\7f639688
-Node: Printing in Edebug\7f640487
-Node: Tracing\7f642202
-Node: Coverage Testing\7f644088
-Node: The Outside Context\7f646129
-Node: Checking Whether to Stop\7f647078
-Node: Edebug Display Update\7f647725
-Node: Edebug Recursive Edit\7f649748
-Node: Instrumenting Macro Calls\7f651403
-Node: Specification List\7f653885
-Node: Backtracking\7f663296
-Node: Debugging Backquote\7f665234
-Node: Specification Examples\7f668940
-Node: Edebug Options\7f671007
-Node: Read and Print\7f676344
-Node: Streams Intro\7f677321
-Node: Input Streams\7f679339
-Node: Input Functions\7f684240
-Node: Output Streams\7f686300
-Node: Output Functions\7f690351
-Node: Output Variables\7f694651
-Node: Minibuffers\7f699450
-Node: Intro to Minibuffers\7f700602
-Node: Text from Minibuffer\7f702790
-Node: Object from Minibuffer\7f707665
-Node: Minibuffer History\7f710892
-Node: Completion\7f713871
-Node: Basic Completion\7f715846
-Node: Minibuffer Completion\7f720875
-Node: Completion Commands\7f724452
-Node: High-Level Completion\7f729095
-Node: Reading File Names\7f733119
-Node: Programmed Completion\7f736803
-Node: Yes-or-No Queries\7f739185
-Node: Multiple Queries\7f744922
-Node: Reading a Password\7f748989
-Node: Minibuffer Misc\7f750326
-Node: Command Loop\7f755196
-Node: Command Overview\7f756540
-Node: Defining Commands\7f759818
-Node: Using Interactive\7f760566
-Node: Interactive Codes\7f765339
-Node: Interactive Examples\7f771131
-Node: Interactive Call\7f772445
-Node: Command Loop Info\7f777846
-Node: Events\7f782825
-Node: Event Types\7f784285
-Node: Event Contents\7f786208
-Node: Event Predicates\7f790684
-Node: Accessing Mouse Event Positions\7f792009
-Node: Frame-Level Event Position Info\7f792708
-Node: Window-Level Event Position Info\7f793748
-Node: Event Text Position Info\7f795512
-Node: Event Glyph Position Info\7f798004
-Node: Event Toolbar Position Info\7f799327
-Node: Other Event Position Info\7f799998
-Node: Accessing Other Event Info\7f800407
-Node: Working With Events\7f802027
-Node: Converting Events\7f808015
+Node: Copying\7f48386
+Node: Introduction\7f67544
+Node: Caveats\7f69135
+Node: Lisp History\7f70866
+Node: Conventions\7f72122
+Node: Some Terms\7f72937
+Node: nil and t\7f73658
+Node: Evaluation Notation\7f75335
+Node: Printing Notation\7f76248
+Node: Error Messages\7f77122
+Node: Buffer Text Notation\7f77563
+Node: Format of Descriptions\7f78438
+Node: A Sample Function Description\7f79292
+Node: A Sample Variable Description\7f83278
+Node: Acknowledgements\7f84186
+Node: Lisp Data Types\7f86164
+Node: Printed Representation\7f88719
+Node: Comments\7f90761
+Node: Primitive Types\7f91658
+Node: Programming Types\7f93317
+Node: Integer Type\7f95269
+Node: Floating Point Type\7f96306
+Node: Character Type\7f96925
+Node: Symbol Type\7f104829
+Node: Sequence Type\7f107524
+Node: Cons Cell Type\7f109043
+Node: Dotted Pair Notation\7f113527
+Node: Association List Type\7f115648
+Node: Array Type\7f116531
+Node: String Type\7f117997
+Node: Vector Type\7f120678
+Node: Bit Vector Type\7f121450
+Node: Function Type\7f122312
+Node: Macro Type\7f123425
+Node: Primitive Function Type\7f124122
+Node: Compiled-Function Type\7f125648
+Node: Autoload Type\7f126202
+Node: Char Table Type\7f127216
+Node: Hash Table Type\7f127390
+Node: Range Table Type\7f128545
+Node: Weak List Type\7f129398
+Node: Editing Types\7f129548
+Node: Buffer Type\7f131175
+Node: Marker Type\7f133202
+Node: Extent Type\7f133926
+Node: Window Type\7f135194
+Node: Frame Type\7f136605
+Node: Device Type\7f137400
+Node: Console Type\7f138226
+Node: Window Configuration Type\7f139427
+Node: Event Type\7f140125
+Node: Process Type\7f140289
+Node: Stream Type\7f141324
+Node: Keymap Type\7f142447
+Node: Syntax Table Type\7f142985
+Node: Display Table Type\7f144008
+Node: Database Type\7f144447
+Node: Charset Type\7f144613
+Node: Coding System Type\7f144777
+Node: ToolTalk Message Type\7f144961
+Node: ToolTalk Pattern Type\7f145160
+Node: Window-System Types\7f145332
+Node: Face Type\7f146478
+Node: Glyph Type\7f146609
+Node: Specifier Type\7f146765
+Node: Font Instance Type\7f146938
+Node: Color Instance Type\7f147128
+Node: Image Instance Type\7f147325
+Node: Toolbar Button Type\7f147523
+Node: Subwindow Type\7f147716
+Node: X Resource Type\7f147895
+Node: Type Predicates\7f148048
+Node: Equality Predicates\7f157177
+Node: Numbers\7f161982
+Node: Integer Basics\7f163437
+Node: Float Basics\7f165786
+Node: Predicates on Numbers\7f167528
+Node: Comparison of Numbers\7f169161
+Node: Numeric Conversions\7f172982
+Node: Arithmetic Operations\7f174448
+Node: Rounding Operations\7f179913
+Node: Bitwise Operations\7f181018
+Node: Math Functions\7f190064
+Node: Random Numbers\7f192380
+Node: Strings and Characters\7f194146
+Node: String Basics\7f195599
+Node: Predicates for Strings\7f198017
+Node: Creating Strings\7f198780
+Node: Predicates for Characters\7f204097
+Node: Character Codes\7f205168
+Node: Text Comparison\7f206581
+Node: String Conversion\7f209943
+Node: Modifying Strings\7f213619
+Node: String Properties\7f214260
+Node: Formatting Strings\7f214903
+Node: Character Case\7f224521
+Node: Case Tables\7f227667
+Node: Char Tables\7f231565
+Node: Char Table Types\7f232957
+Node: Working With Char Tables\7f234532
+Node: Lists\7f236481
+Node: Cons Cells\7f237604
+Node: Lists as Boxes\7f238940
+Node: List-related Predicates\7f241582
+Node: List Elements\7f243284
+Node: Building Lists\7f248313
+Node: Modifying Lists\7f254305
+Node: Setcar\7f255117
+Node: Setcdr\7f257538
+Node: Rearrangement\7f260049
+Node: Sets And Lists\7f265635
+Node: Association Lists\7f269863
+Ref: Association Lists-Footnote-1\7f279154
+Node: Property Lists\7f279359
+Node: Working With Normal Plists\7f280907
+Node: Working With Lax Plists\7f283175
+Node: Converting Plists To/From Alists\7f285415
+Node: Weak Lists\7f286763
+Node: Sequences Arrays Vectors\7f288926
+Node: Sequence Functions\7f291562
+Node: Arrays\7f295221
+Node: Array Functions\7f298285
+Node: Vectors\7f300818
+Node: Vector Functions\7f302316
+Node: Bit Vectors\7f304887
+Node: Bit Vector Functions\7f305732
+Node: Symbols\7f307982
+Node: Symbol Components\7f309031
+Node: Definitions\7f313204
+Node: Creating Symbols\7f315429
+Node: Symbol Properties\7f322463
+Node: Plists and Alists\7f323979
+Node: Symbol Plists\7f325728
+Node: Other Plists\7f327537
+Node: Evaluation\7f329315
+Node: Intro Eval\7f330120
+Ref: Intro Eval-Footnote-1\7f333473
+Node: Eval\7f333608
+Node: Forms\7f338026
+Node: Self-Evaluating Forms\7f339185
+Node: Symbol Forms\7f340698
+Node: Classifying Lists\7f341615
+Node: Function Indirection\7f342371
+Node: Function Forms\7f345482
+Node: Macro Forms\7f346479
+Node: Special Forms\7f348079
+Node: Autoloading\7f350388
+Node: Quoting\7f350886
+Node: Control Structures\7f352247
+Node: Sequencing\7f353867
+Node: Conditionals\7f356732
+Node: Combining Conditions\7f360155
+Node: Iteration\7f363425
+Node: Nonlocal Exits\7f365204
+Node: Catch and Throw\7f365906
+Node: Examples of Catch\7f369745
+Node: Errors\7f371764
+Node: Signaling Errors\7f373253
+Node: Processing of Errors\7f377992
+Node: Handling Errors\7f380271
+Node: Error Symbols\7f387512
+Node: Cleanups\7f391468
+Node: Variables\7f395246
+Node: Global Variables\7f397015
+Node: Constant Variables\7f398091
+Node: Local Variables\7f398717
+Node: Void Variables\7f403654
+Node: Defining Variables\7f407170
+Node: Accessing Variables\7f414334
+Node: Setting Variables\7f415759
+Node: Variable Scoping\7f420278
+Node: Scope\7f421877
+Node: Extent\7f423402
+Node: Impl of Scope\7f424881
+Node: Using Scoping\7f426844
+Node: Buffer-Local Variables\7f428366
+Node: Intro to Buffer-Local\7f429202
+Node: Creating Buffer-Local\7f431745
+Node: Default Value\7f436964
+Node: Variable Aliases\7f440107
+Node: Functions\7f441892
+Node: What Is a Function\7f442986
+Node: Lambda Expressions\7f447032
+Node: Lambda Components\7f447942
+Node: Simple Lambda\7f449774
+Node: Argument List\7f451431
+Node: Function Documentation\7f455159
+Node: Function Names\7f457101
+Node: Defining Functions\7f459674
+Node: Calling Functions\7f462714
+Node: Mapping Functions\7f466563
+Node: Anonymous Functions\7f469251
+Node: Function Cells\7f472496
+Node: Inline Functions\7f477306
+Node: Related Topics\7f479116
+Node: Macros\7f480169
+Node: Simple Macro\7f481453
+Node: Expansion\7f482188
+Node: Compiling Macros\7f485192
+Node: Defining Macros\7f487028
+Node: Backquote\7f488345
+Node: Problems with Macros\7f490742
+Node: Argument Evaluation\7f491437
+Node: Surprising Local Vars\7f494352
+Node: Eval During Expansion\7f496420
+Node: Repeated Expansion\7f498113
+Node: Customization\7f500029
+Node: Common Keywords\7f500498
+Node: Group Definitions\7f503343
+Node: Variable Definitions\7f505535
+Node: Customization Types\7f510525
+Node: Simple Types\7f511960
+Node: Composite Types\7f514117
+Node: Splicing into Lists\7f518807
+Node: Type Keywords\7f520642
+Node: Loading\7f524162
+Node: How Programs Do Loading\7f525837
+Node: Autoload\7f534964
+Node: Repeated Loading\7f541043
+Node: Named Features\7f543156
+Node: Unloading\7f549588
+Node: Hooks for Loading\7f551744
+Node: Byte Compilation\7f552461
+Node: Speed of Byte-Code\7f554378
+Node: Compilation Functions\7f555585
+Node: Docs and Compilation\7f561972
+Node: Dynamic Loading\7f564625
+Node: Eval During Compile\7f566989
+Node: Compiled-Function Objects\7f568254
+Node: Disassembly\7f573052
+Node: Debugging\7f580306
+Node: Debugger\7f581718
+Node: Error Debugging\7f582863
+Node: Infinite Loops\7f585616
+Node: Function Debugging\7f586860
+Node: Explicit Debug\7f589650
+Node: Using Debugger\7f590421
+Node: Debugger Commands\7f592283
+Node: Invoking the Debugger\7f596600
+Node: Internals of Debugger\7f600515
+Node: Syntax Errors\7f605402
+Node: Excess Open\7f606650
+Node: Excess Close\7f608525
+Node: Compilation Errors\7f609946
+Node: Edebug\7f611234
+Node: Using Edebug\7f613342
+Node: Instrumenting\7f616039
+Node: Edebug Execution Modes\7f619528
+Node: Jumping\7f622638
+Node: Edebug Misc\7f624981
+Node: Breakpoints\7f626370
+Node: Global Break Condition\7f629176
+Node: Embedded Breakpoints\7f630131
+Node: Trapping Errors\7f631086
+Node: Edebug Views\7f633162
+Node: Edebug Eval\7f635127
+Node: Eval List\7f636304
+Node: Reading in Edebug\7f639689
+Node: Printing in Edebug\7f640488
+Node: Tracing\7f642203
+Node: Coverage Testing\7f644089
+Node: The Outside Context\7f646130
+Node: Checking Whether to Stop\7f647079
+Node: Edebug Display Update\7f647726
+Node: Edebug Recursive Edit\7f649749
+Node: Instrumenting Macro Calls\7f651404
+Node: Specification List\7f653886
+Node: Backtracking\7f663297
+Node: Debugging Backquote\7f665235
+Node: Specification Examples\7f668941
+Node: Edebug Options\7f671008
+Node: Read and Print\7f676345
+Node: Streams Intro\7f677322
+Node: Input Streams\7f679340
+Node: Input Functions\7f684241
+Node: Output Streams\7f686301
+Node: Output Functions\7f690352
+Node: Output Variables\7f694652
+Node: Minibuffers\7f699451
+Node: Intro to Minibuffers\7f700603
+Node: Text from Minibuffer\7f702791
+Node: Object from Minibuffer\7f707666
+Node: Minibuffer History\7f710893
+Node: Completion\7f713872
+Node: Basic Completion\7f715847
+Node: Minibuffer Completion\7f720876
+Node: Completion Commands\7f724453
+Node: High-Level Completion\7f729096
+Node: Reading File Names\7f733120
+Node: Programmed Completion\7f736804
+Node: Yes-or-No Queries\7f739186
+Node: Multiple Queries\7f744923
+Node: Reading a Password\7f748990
+Node: Minibuffer Misc\7f750327
+Node: Command Loop\7f755197
+Node: Command Overview\7f756541
+Node: Defining Commands\7f759819
+Node: Using Interactive\7f760567
+Node: Interactive Codes\7f765340
+Node: Interactive Examples\7f771132
+Node: Interactive Call\7f772446
+Node: Command Loop Info\7f777847
+Node: Events\7f782826
+Node: Event Types\7f784286
+Node: Event Contents\7f786209
+Node: Event Predicates\7f790685
+Node: Accessing Mouse Event Positions\7f792010
+Node: Frame-Level Event Position Info\7f792709
+Node: Window-Level Event Position Info\7f793749
+Node: Event Text Position Info\7f795513
+Node: Event Glyph Position Info\7f798005
+Node: Event Toolbar Position Info\7f799328
+Node: Other Event Position Info\7f799999
+Node: Accessing Other Event Info\7f800408
+Node: Working With Events\7f802028
+Node: Converting Events\7f808016
 Node: Reading Input\7f810968
 Node: Key Sequence Input\7f811970
 Node: Reading One Event\7f813924
 Node: Reading Input\7f810968
 Node: Key Sequence Input\7f811970
 Node: Reading One Event\7f813924
-Node: Dispatching an Event\7f816685
-Node: Quoted Character Input\7f817136
-Node: Peeking and Discarding\7f818484
-Node: Waiting\7f822388
-Node: Quitting\7f824696
-Node: Prefix Command Arguments\7f829104
-Node: Recursive Editing\7f834191
-Node: Disabling Commands\7f838987
-Node: Command History\7f841055
-Node: Keyboard Macros\7f842792
-Node: Keymaps\7f845009
-Node: Keymap Terminology\7f846586
-Node: Format of Keymaps\7f849515
-Node: Creating Keymaps\7f849926
-Node: Inheritance and Keymaps\7f852005
-Node: Key Sequences\7f854377
-Node: Prefix Keys\7f858947
-Node: Active Keymaps\7f862532
-Node: Key Lookup\7f871747
-Node: Functions for Key Lookup\7f876910
-Node: Changing Key Bindings\7f882607
-Node: Key Binding Commands\7f889504
-Node: Scanning Keymaps\7f891569
-Node: Other Keymap Functions\7f900080
-Node: Menus\7f900702
-Node: Menu Format\7f901244
-Node: Menubar Format\7f909829
-Node: Menubar\7f910454
-Node: Modifying Menus\7f913567
-Node: Menu Filters\7f918581
-Node: Pop-Up Menus\7f920477
-Node: Menu Accelerators\7f922682
-Node: Creating Menu Accelerators\7f923404
-Node: Keyboard Menu Traversal\7f924722
-Node: Menu Accelerator Functions\7f925449
-Node: Buffers Menu\7f928484
-Node: Dialog Boxes\7f929778
-Node: Dialog Box Format\7f929945
-Node: Dialog Box Functions\7f931315
-Node: Toolbar\7f931712
-Node: Toolbar Intro\7f932037
-Node: Toolbar Descriptor Format\7f934447
-Node: Specifying the Toolbar\7f938941
-Node: Other Toolbar Variables\7f942546
-Node: Scrollbars\7f946973
-Node: Drag and Drop\7f947109
-Node: Supported Protocols\7f948185
-Node: OffiX DND\7f948688
-Node: CDE dt\7f949695
-Node: MSWindows OLE\7f950286
-Node: Loose ends\7f950457
-Node: Drop Interface\7f950849
-Node: Drag Interface\7f951871
-Node: Modes\7f952045
-Node: Major Modes\7f952996
-Node: Major Mode Conventions\7f955911
-Node: Example Major Modes\7f961866
-Node: Auto Major Mode\7f969899
-Node: Mode Help\7f977347
-Node: Derived Modes\7f978448
-Node: Minor Modes\7f980639
-Node: Minor Mode Conventions\7f981941
-Node: Keymaps and Minor Modes\7f984804
-Node: Modeline Format\7f985639
-Node: Modeline Data\7f987407
-Node: Modeline Variables\7f991677
-Node: %-Constructs\7f996393
-Node: Hooks\7f999304
-Node: Documentation\7f1006066
-Node: Documentation Basics\7f1007489
-Node: Accessing Documentation\7f1010539
-Node: Keys in Documentation\7f1016818
-Node: Describing Characters\7f1020297
-Node: Help Functions\7f1022646
-Node: Obsoleteness\7f1029097
-Node: Files\7f1032091
-Node: Visiting Files\7f1034016
-Node: Visiting Functions\7f1035521
-Node: Subroutines of Visiting\7f1040568
-Node: Saving Buffers\7f1042641
-Node: Reading from Files\7f1048734
-Node: Writing to Files\7f1050891
-Node: File Locks\7f1053608
-Node: Information about Files\7f1056661
-Node: Testing Accessibility\7f1057422
-Node: Kinds of Files\7f1061162
-Node: Truenames\7f1062843
-Node: File Attributes\7f1063845
-Node: Changing File Attributes\7f1068984
-Node: File Names\7f1074390
-Node: File Name Components\7f1075999
-Node: Directory Names\7f1079100
-Node: Relative File Names\7f1082553
-Node: File Name Expansion\7f1083631
-Node: Unique File Names\7f1087538
-Node: File Name Completion\7f1089153
-Node: User Name Completion\7f1091814
-Node: Contents of Directories\7f1093154
-Node: Create/Delete Dirs\7f1096467
-Node: Magic File Names\7f1097573
-Node: Partial Files\7f1103203
-Node: Intro to Partial Files\7f1103431
-Node: Creating a Partial File\7f1104671
-Node: Detached Partial Files\7f1105606
-Node: Format Conversion\7f1106728
-Node: Files and MS-DOS\7f1113244
-Node: Backups and Auto-Saving\7f1115308
-Node: Backup Files\7f1115983
-Node: Making Backups\7f1117380
-Node: Rename or Copy\7f1120129
-Node: Numbered Backups\7f1122622
-Node: Backup Names\7f1124866
-Node: Auto-Saving\7f1128158
-Node: Reverting\7f1136300
-Node: Buffers\7f1139458
-Node: Buffer Basics\7f1140875
-Node: Current Buffer\7f1142928
-Node: Buffer Names\7f1147616
-Node: Buffer File Name\7f1150821
-Node: Buffer Modification\7f1154940
-Node: Modification Time\7f1157133
-Node: Read Only Buffers\7f1160508
-Node: The Buffer List\7f1162926
-Node: Creating Buffers\7f1167756
-Node: Killing Buffers\7f1169902
-Node: Indirect Buffers\7f1173633
-Node: Windows\7f1176205
-Node: Basic Windows\7f1177683
-Node: Splitting Windows\7f1180781
-Node: Deleting Windows\7f1187670
-Node: Selecting Windows\7f1190350
-Node: Cyclic Window Ordering\7f1193479
-Node: Buffers and Windows\7f1198103
-Node: Displaying Buffers\7f1199944
-Node: Choosing Window\7f1205120
-Node: Window Point\7f1212836
-Node: Window Start\7f1214882
-Node: Vertical Scrolling\7f1219372
-Node: Horizontal Scrolling\7f1225509
-Node: Size of Window\7f1229018
-Node: Position of Window\7f1233736
-Node: Resizing Windows\7f1235976
-Node: Window Configurations\7f1241405
-Node: Frames\7f1244830
-Node: Creating Frames\7f1246599
-Node: Frame Properties\7f1247940
-Node: Property Access\7f1248756
-Node: Initial Properties\7f1249605
-Node: X Frame Properties\7f1252091
-Node: Size and Position\7f1256725
-Node: Frame Name\7f1258721
-Node: Frame Titles\7f1259635
-Node: Deleting Frames\7f1261459
-Node: Finding All Frames\7f1262059
-Node: Frames and Windows\7f1264053
-Node: Minibuffers and Frames\7f1265758
-Node: Input Focus\7f1266676
-Node: Visibility of Frames\7f1269753
-Node: Raising and Lowering\7f1271672
-Node: Frame Configurations\7f1274048
-Node: Frame Hooks\7f1274642
-Node: Consoles and Devices\7f1276447
-Node: Basic Console Functions\7f1279191
-Node: Basic Device Functions\7f1279614
-Node: Console Types and Device Classes\7f1280330
-Node: Connecting to a Console or Device\7f1282527
-Node: The Selected Console and Device\7f1284690
-Node: Console and Device I/O\7f1285716
-Node: Positions\7f1286480
-Node: Point\7f1287449
-Node: Motion\7f1290539
-Node: Character Motion\7f1291306
-Node: Word Motion\7f1293543
-Node: Buffer End Motion\7f1295044
-Node: Text Lines\7f1296541
-Node: Screen Lines\7f1301136
-Node: List Motion\7f1305199
-Node: Skipping Characters\7f1308607
-Node: Excursions\7f1310826
-Node: Narrowing\7f1313858
-Node: Markers\7f1319183
-Node: Overview of Markers\7f1320089
-Node: Predicates on Markers\7f1324781
-Node: Creating Markers\7f1326027
-Node: Information from Markers\7f1330064
-Node: Changing Markers\7f1331162
-Node: The Mark\7f1332540
-Node: The Region\7f1341034
-Node: Text\7f1346721
-Node: Near Point\7f1349420
-Node: Buffer Contents\7f1353607
-Node: Comparing Text\7f1355013
-Node: Insertion\7f1356421
-Node: Commands for Insertion\7f1360263
-Node: Deletion\7f1363219
-Node: User-Level Deletion\7f1366814
-Node: The Kill Ring\7f1370975
-Node: Kill Ring Concepts\7f1373149
-Node: Kill Functions\7f1374203
-Node: Yank Commands\7f1376108
-Node: Low-Level Kill Ring\7f1377979
-Node: Internals of Kill Ring\7f1380765
-Node: Undo\7f1383545
-Node: Maintaining Undo\7f1387874
-Node: Filling\7f1390494
-Node: Margins\7f1396488
-Node: Auto Filling\7f1400417
-Node: Sorting\7f1401598
-Node: Columns\7f1410898
-Node: Indentation\7f1413414
-Node: Primitive Indent\7f1414193
-Node: Mode-Specific Indent\7f1415437
-Node: Region Indent\7f1417948
-Node: Relative Indent\7f1420896
-Node: Indent Tabs\7f1423278
-Node: Motion by Indent\7f1424599
-Node: Case Changes\7f1425378
-Node: Text Properties\7f1428629
-Node: Examining Properties\7f1430442
-Node: Changing Properties\7f1432309
-Node: Property Search\7f1435900
-Node: Special Properties\7f1440611
-Node: Saving Properties\7f1440892
-Node: Substitution\7f1444034
-Node: Registers\7f1447304
-Node: Transposition\7f1449847
-Node: Change Hooks\7f1450741
-Node: Transformations\7f1452781
-Node: Searching and Matching\7f1457166
-Node: String Search\7f1458297
-Node: Regular Expressions\7f1463021
-Node: Syntax of Regexps\7f1464388
-Node: Regexp Example\7f1478767
-Node: Regexp Search\7f1480937
-Node: POSIX Regexps\7f1487025
-Node: Search and Replace\7f1488860
-Node: Match Data\7f1492225
-Node: Simple Match Data\7f1493355
-Node: Replacing Match\7f1497620
-Node: Entire Match Data\7f1499954
-Node: Saving Match Data\7f1501945
-Node: Searching and Case\7f1503326
-Node: Standard Regexps\7f1505360
-Node: Syntax Tables\7f1507558
-Node: Syntax Basics\7f1508672
-Node: Syntax Descriptors\7f1511644
-Node: Syntax Class Table\7f1513494
-Node: Syntax Flags\7f1519532
-Node: Syntax Table Functions\7f1522749
-Node: Motion and Syntax\7f1526613
-Node: Parsing Expressions\7f1528065
-Node: Standard Syntax Tables\7f1534134
-Node: Syntax Table Internals\7f1534978
-Node: Abbrevs\7f1536004
-Node: Abbrev Mode\7f1537807
-Node: Abbrev Tables\7f1538527
-Node: Defining Abbrevs\7f1540060
-Node: Abbrev Files\7f1541965
-Node: Abbrev Expansion\7f1543738
-Node: Standard Abbrev Tables\7f1548369
-Node: Extents\7f1549528
-Node: Intro to Extents\7f1550771
-Node: Creating and Modifying Extents\7f1554765
-Node: Extent Endpoints\7f1556272
-Node: Finding Extents\7f1559535
-Node: Mapping Over Extents\7f1563284
-Node: Extent Properties\7f1569401
-Node: Detached Extents\7f1579545
-Node: Extent Parents\7f1581404
-Node: Duplicable Extents\7f1583099
-Node: Extents and Events\7f1586320
-Node: Atomic Extents\7f1588227
-Node: Specifiers\7f1588674
-Node: Introduction to Specifiers\7f1590481
-Node: Specifiers In-Depth\7f1592791
-Node: Specifier Instancing\7f1597705
-Node: Specifier Types\7f1600967
-Node: Adding Specifications\7f1606041
-Node: Retrieving Specifications\7f1615403
-Node: Specifier Tag Functions\7f1619138
-Node: Specifier Instancing Functions\7f1622372
-Node: Specifier Example\7f1625779
-Node: Creating Specifiers\7f1628885
-Node: Specifier Validation Functions\7f1631134
-Node: Other Specification Functions\7f1633518
-Node: Faces and Window-System Objects\7f1637337
-Node: Faces\7f1637661
-Node: Merging Faces\7f1639278
-Node: Basic Face Functions\7f1641239
-Node: Face Properties\7f1643337
-Node: Face Convenience Functions\7f1652896
-Node: Other Face Display Functions\7f1656026
-Node: Fonts\7f1656839
-Node: Font Specifiers\7f1657540
-Node: Font Instances\7f1657781
-Node: Font Instance Names\7f1658748
-Node: Font Instance Size\7f1659589
-Node: Font Instance Characteristics\7f1660875
-Node: Font Convenience Functions\7f1662044
-Node: Colors\7f1663334
-Node: Color Specifiers\7f1663774
-Node: Color Instances\7f1664001
-Node: Color Instance Properties\7f1664745
-Node: Color Convenience Functions\7f1665371
-Node: Glyphs\7f1666424
-Node: Glyph Functions\7f1668016
-Node: Creating Glyphs\7f1668423
-Node: Glyph Properties\7f1670010
-Node: Glyph Convenience Functions\7f1679177
-Node: Glyph Dimensions\7f1683124
-Node: Images\7f1684204
-Node: Image Specifiers\7f1684653
-Node: Image Instantiator Conversion\7f1696075
-Node: Image Instances\7f1697440
-Node: Image Instance Types\7f1698191
-Node: Image Instance Functions\7f1700846
-Node: Glyph Types\7f1705415
-Node: Mouse Pointer\7f1707187
-Node: Redisplay Glyphs\7f1710190
-Node: Subwindows\7f1711223
-Node: Annotations\7f1711466
-Node: Annotation Basics\7f1712482
-Node: Annotation Primitives\7f1716420
-Node: Annotation Properties\7f1717749
-Node: Locating Annotations\7f1720789
-Node: Margin Primitives\7f1721626
-Node: Annotation Hooks\7f1723520
-Node: Display\7f1724180
-Node: Refresh Screen\7f1725158
-Node: Truncation\7f1727069
-Node: The Echo Area\7f1729594
-Node: Warnings\7f1736029
-Node: Invisible Text\7f1740465
-Node: Selective Display\7f1743044
-Node: Overlay Arrow\7f1747170
-Node: Temporary Displays\7f1748523
-Node: Blinking\7f1752644
-Node: Usual Display\7f1754829
-Node: Display Tables\7f1757378
-Node: Display Table Format\7f1758182
-Node: Active Display Table\7f1759624
-Node: Character Descriptors\7f1760816
-Node: Beeping\7f1761573
-Node: Hash Tables\7f1766339
-Node: Introduction to Hash Tables\7f1766947
-Node: Working With Hash Tables\7f1772970
-Node: Weak Hash Tables\7f1774087
-Node: Range Tables\7f1775886
-Node: Introduction to Range Tables\7f1776575
-Node: Working With Range Tables\7f1777006
-Node: Databases\7f1777891
-Node: Connecting to a Database\7f1778190
-Node: Working With a Database\7f1779281
-Node: Other Database Functions\7f1780139
-Node: Processes\7f1780713
-Node: Subprocess Creation\7f1782937
-Node: Synchronous Processes\7f1786226
-Node: MS-DOS Subprocesses\7f1792944
-Node: Asynchronous Processes\7f1794018
-Node: Deleting Processes\7f1797731
-Node: Process Information\7f1799602
-Node: Input to Processes\7f1803528
-Node: Signals to Processes\7f1805818
-Node: Output from Processes\7f1810238
-Node: Process Buffers\7f1811050
-Node: Filter Functions\7f1813917
-Node: Accepting Output\7f1819487
-Node: Sentinels\7f1821014
-Node: Process Window Size\7f1824504
-Node: Transaction Queues\7f1824853
-Node: Network\7f1826551
-Node: System Interface\7f1828385
-Node: Starting Up\7f1829655
-Node: Start-up Summary\7f1830249
-Node: Init File\7f1833803
-Node: Terminal-Specific\7f1836184
-Node: Command Line Arguments\7f1839343
-Node: Getting Out\7f1842832
-Node: Killing XEmacs\7f1843401
-Node: Suspending XEmacs\7f1845070
-Node: System Environment\7f1848412
-Node: User Identification\7f1855079
-Node: Time of Day\7f1858608
-Node: Time Conversion\7f1861395
-Node: Timers\7f1866435
-Node: Terminal Input\7f1868608
-Node: Input Modes\7f1869111
-Node: Translating Input\7f1871524
-Node: Recording Input\7f1875689
-Node: Terminal Output\7f1877789
-Node: Flow Control\7f1881412
-Node: Batch Mode\7f1885204
-Node: X-Windows\7f1886586
-Node: X Selections\7f1887398
-Node: X Server\7f1889608
-Node: Resources\7f1890009
-Node: Server Data\7f1895150
-Node: Grabs\7f1896357
-Node: X Miscellaneous\7f1897938
-Node: ToolTalk Support\7f1900323
-Node: XEmacs ToolTalk API Summary\7f1900540
-Node: Sending Messages\7f1901840
-Node: Example of Sending Messages\7f1902091
-Node: Elisp Interface for Sending Messages\7f1903153
-Node: Receiving Messages\7f1909546
-Node: Example of Receiving Messages\7f1909769
-Node: Elisp Interface for Receiving Messages\7f1910605
-Node: LDAP Support\7f1914430
-Node: Building XEmacs with LDAP support\7f1914926
-Node: XEmacs LDAP API\7f1915904
-Node: LDAP Variables\7f1916634
-Node: The High-Level LDAP API\7f1919110
-Node: The Low-Level LDAP API\7f1920215
-Node: The LDAP Lisp Object\7f1920489
-Node: Opening and Closing a LDAP Connection\7f1921042
-Node: Searching on a LDAP Server (Low-level)\7f1922825
-Node: Syntax of Search Filters\7f1924218
-Node: Internationalization\7f1925516
-Node: I18N Levels 1 and 2\7f1925853
-Node: I18N Level 3\7f1926559
-Node: Level 3 Basics\7f1926840
-Node: Level 3 Primitives\7f1927673
-Node: Dynamic Messaging\7f1929279
-Node: Domain Specification\7f1929742
-Node: Documentation String Extraction\7f1931645
-Node: I18N Level 4\7f1932563
-Node: MULE\7f1932755
-Node: Internationalization Terminology\7f1933866
-Node: Charsets\7f1942405
-Node: Charset Properties\7f1943101
-Node: Basic Charset Functions\7f1947787
-Node: Charset Property Functions\7f1949968
-Node: Predefined Charsets\7f1952011
-Node: MULE Characters\7f1954931
-Node: Composite Characters\7f1955778
-Node: ISO 2022\7f1957032
-Node: Coding Systems\7f1962754
-Node: Coding System Types\7f1964676
-Node: EOL Conversion\7f1966495
-Node: Coding System Properties\7f1967678
-Node: Basic Coding System Functions\7f1971530
-Node: Coding System Property Functions\7f1973434
-Node: Encoding and Decoding Text\7f1973992
-Node: Detection of Textual Encoding\7f1975128
-Node: Big5 and Shift-JIS Functions\7f1976664
-Node: CCL\7f1977752
-Node: CCL Syntax\7f1980856
-Node: CCL Statements\7f1982444
-Node: CCL Expressions\7f1987092
-Node: Calling CCL\7f1989631
-Node: CCL Examples\7f1992620
-Node: Category Tables\7f1992757
-Node: Tips\7f1995116
-Node: Style Tips\7f1995757
-Node: Compilation Tips\7f2005276
-Node: Documentation Tips\7f2007190
-Node: Comment Tips\7f2012699
-Node: Library Headers\7f2015701
-Node: Building XEmacs and Object Allocation\7f2019673
-Node: Building XEmacs\7f2020556
-Node: Pure Storage\7f2026891
-Node: Garbage Collection\7f2029679
-Node: Standard Errors\7f2040818
-Node: Standard Buffer-Local Variables\7f2045027
-Node: Standard Keymaps\7f2047660
-Node: Standard Hooks\7f2051392
-Node: Index\7f2058892
+Node: Dispatching an Event\7f816741
+Node: Quoted Character Input\7f817192
+Node: Peeking and Discarding\7f818540
+Node: Waiting\7f822444
+Node: Quitting\7f824752
+Node: Prefix Command Arguments\7f829160
+Node: Recursive Editing\7f834247
+Node: Disabling Commands\7f839043
+Node: Command History\7f841111
+Node: Keyboard Macros\7f842848
+Node: Keymaps\7f845065
+Node: Keymap Terminology\7f846642
+Node: Format of Keymaps\7f849571
+Node: Creating Keymaps\7f849982
+Node: Inheritance and Keymaps\7f852061
+Node: Key Sequences\7f854433
+Node: Prefix Keys\7f859229
+Node: Active Keymaps\7f862814
+Node: Key Lookup\7f872135
+Node: Functions for Key Lookup\7f877298
+Node: Changing Key Bindings\7f882995
+Node: Key Binding Commands\7f889892
+Node: Scanning Keymaps\7f891957
+Node: Other Keymap Functions\7f900468
+Node: Menus\7f901090
+Node: Menu Format\7f901682
+Node: Menubar Format\7f910328
+Node: Menubar\7f910953
+Node: Modifying Menus\7f914066
+Node: Menu Filters\7f919080
+Node: Pop-Up Menus\7f920976
+Node: Menu Accelerators\7f923181
+Node: Creating Menu Accelerators\7f923937
+Node: Keyboard Menu Traversal\7f925297
+Node: Menu Accelerator Functions\7f926024
+Node: Buffers Menu\7f929101
+Node: Dialog Boxes\7f930395
+Node: Dialog Box Format\7f930562
+Node: Dialog Box Functions\7f931987
+Node: Toolbar\7f932384
+Node: Toolbar Intro\7f932709
+Node: Toolbar Descriptor Format\7f935118
+Node: Specifying the Toolbar\7f939612
+Node: Other Toolbar Variables\7f943217
+Node: Scrollbars\7f947643
+Node: Drag and Drop\7f947779
+Node: Supported Protocols\7f948855
+Node: OffiX DND\7f949358
+Node: CDE dt\7f950365
+Node: MSWindows OLE\7f950956
+Node: Loose ends\7f951127
+Node: Drop Interface\7f951519
+Node: Drag Interface\7f952541
+Node: Modes\7f952715
+Node: Major Modes\7f953666
+Node: Major Mode Conventions\7f956581
+Node: Example Major Modes\7f962536
+Node: Auto Major Mode\7f970569
+Node: Mode Help\7f978017
+Node: Derived Modes\7f979118
+Node: Minor Modes\7f981309
+Node: Minor Mode Conventions\7f982611
+Node: Keymaps and Minor Modes\7f985474
+Node: Modeline Format\7f986309
+Node: Modeline Data\7f988077
+Node: Modeline Variables\7f992347
+Node: %-Constructs\7f997063
+Node: Hooks\7f999974
+Node: Documentation\7f1006736
+Node: Documentation Basics\7f1008159
+Node: Accessing Documentation\7f1011209
+Node: Keys in Documentation\7f1017488
+Node: Describing Characters\7f1020967
+Node: Help Functions\7f1023316
+Node: Obsoleteness\7f1029767
+Node: Files\7f1032761
+Node: Visiting Files\7f1034686
+Node: Visiting Functions\7f1036191
+Node: Subroutines of Visiting\7f1041238
+Node: Saving Buffers\7f1043311
+Node: Reading from Files\7f1049404
+Node: Writing to Files\7f1051561
+Node: File Locks\7f1054278
+Node: Information about Files\7f1057331
+Node: Testing Accessibility\7f1058092
+Node: Kinds of Files\7f1061832
+Node: Truenames\7f1063513
+Node: File Attributes\7f1064515
+Node: Changing File Attributes\7f1069654
+Node: File Names\7f1075060
+Node: File Name Components\7f1076669
+Node: Directory Names\7f1079770
+Node: Relative File Names\7f1083223
+Node: File Name Expansion\7f1084301
+Node: Unique File Names\7f1088208
+Node: File Name Completion\7f1089823
+Node: User Name Completion\7f1092484
+Node: Contents of Directories\7f1093824
+Node: Create/Delete Dirs\7f1097137
+Node: Magic File Names\7f1098243
+Node: Partial Files\7f1103873
+Node: Intro to Partial Files\7f1104101
+Node: Creating a Partial File\7f1105341
+Node: Detached Partial Files\7f1106276
+Node: Format Conversion\7f1107398
+Node: Files and MS-DOS\7f1113914
+Node: Backups and Auto-Saving\7f1115978
+Node: Backup Files\7f1116653
+Node: Making Backups\7f1118050
+Node: Rename or Copy\7f1120799
+Node: Numbered Backups\7f1123292
+Node: Backup Names\7f1125536
+Node: Auto-Saving\7f1128828
+Node: Reverting\7f1136970
+Node: Buffers\7f1140128
+Node: Buffer Basics\7f1141545
+Node: Current Buffer\7f1143598
+Node: Buffer Names\7f1148286
+Node: Buffer File Name\7f1151491
+Node: Buffer Modification\7f1155610
+Node: Modification Time\7f1157803
+Node: Read Only Buffers\7f1161178
+Node: The Buffer List\7f1163596
+Node: Creating Buffers\7f1168426
+Node: Killing Buffers\7f1170572
+Node: Indirect Buffers\7f1174303
+Node: Windows\7f1176875
+Node: Basic Windows\7f1178353
+Node: Splitting Windows\7f1181451
+Node: Deleting Windows\7f1188340
+Node: Selecting Windows\7f1191020
+Node: Cyclic Window Ordering\7f1194149
+Node: Buffers and Windows\7f1198773
+Node: Displaying Buffers\7f1200614
+Node: Choosing Window\7f1205790
+Node: Window Point\7f1213506
+Node: Window Start\7f1215552
+Node: Vertical Scrolling\7f1220042
+Node: Horizontal Scrolling\7f1226179
+Node: Size of Window\7f1229688
+Node: Position of Window\7f1234406
+Node: Resizing Windows\7f1236646
+Node: Window Configurations\7f1242075
+Node: Frames\7f1245500
+Node: Creating Frames\7f1247269
+Node: Frame Properties\7f1248610
+Node: Property Access\7f1249426
+Node: Initial Properties\7f1250275
+Node: X Frame Properties\7f1252761
+Node: Size and Position\7f1257395
+Node: Frame Name\7f1259391
+Node: Frame Titles\7f1260305
+Node: Deleting Frames\7f1262129
+Node: Finding All Frames\7f1262729
+Node: Frames and Windows\7f1264723
+Node: Minibuffers and Frames\7f1266428
+Node: Input Focus\7f1267346
+Node: Visibility of Frames\7f1270423
+Node: Raising and Lowering\7f1272342
+Node: Frame Configurations\7f1274718
+Node: Frame Hooks\7f1275312
+Node: Consoles and Devices\7f1277117
+Node: Basic Console Functions\7f1279860
+Node: Basic Device Functions\7f1280283
+Node: Console Types and Device Classes\7f1280999
+Node: Connecting to a Console or Device\7f1283196
+Node: The Selected Console and Device\7f1285359
+Node: Console and Device I/O\7f1286385
+Node: Positions\7f1287149
+Node: Point\7f1288118
+Node: Motion\7f1291208
+Node: Character Motion\7f1291975
+Node: Word Motion\7f1294212
+Node: Buffer End Motion\7f1295713
+Node: Text Lines\7f1297210
+Node: Screen Lines\7f1301805
+Node: List Motion\7f1305868
+Node: Skipping Characters\7f1309276
+Node: Excursions\7f1311495
+Node: Narrowing\7f1314527
+Node: Markers\7f1319852
+Node: Overview of Markers\7f1320758
+Node: Predicates on Markers\7f1325450
+Node: Creating Markers\7f1326696
+Node: Information from Markers\7f1330733
+Node: Changing Markers\7f1331831
+Node: The Mark\7f1333209
+Node: The Region\7f1341703
+Node: Text\7f1347389
+Node: Near Point\7f1350088
+Node: Buffer Contents\7f1354275
+Node: Comparing Text\7f1355681
+Node: Insertion\7f1357089
+Node: Commands for Insertion\7f1360931
+Node: Deletion\7f1363887
+Node: User-Level Deletion\7f1367482
+Node: The Kill Ring\7f1371643
+Node: Kill Ring Concepts\7f1373817
+Node: Kill Functions\7f1374871
+Node: Yank Commands\7f1376776
+Node: Low-Level Kill Ring\7f1378647
+Node: Internals of Kill Ring\7f1381433
+Node: Undo\7f1384213
+Node: Maintaining Undo\7f1388542
+Node: Filling\7f1391162
+Node: Margins\7f1397156
+Node: Auto Filling\7f1401085
+Node: Sorting\7f1402266
+Node: Columns\7f1411566
+Node: Indentation\7f1414082
+Node: Primitive Indent\7f1414861
+Node: Mode-Specific Indent\7f1416105
+Node: Region Indent\7f1418616
+Node: Relative Indent\7f1421564
+Node: Indent Tabs\7f1423946
+Node: Motion by Indent\7f1425267
+Node: Case Changes\7f1426046
+Node: Text Properties\7f1429297
+Node: Examining Properties\7f1431110
+Node: Changing Properties\7f1432977
+Node: Property Search\7f1436568
+Node: Special Properties\7f1441279
+Node: Saving Properties\7f1441560
+Node: Substitution\7f1444702
+Node: Registers\7f1447972
+Node: Transposition\7f1450515
+Node: Change Hooks\7f1451409
+Node: Transformations\7f1453449
+Node: Searching and Matching\7f1457834
+Node: String Search\7f1458965
+Node: Regular Expressions\7f1463689
+Node: Syntax of Regexps\7f1465056
+Node: Regexp Example\7f1479435
+Node: Regexp Search\7f1481605
+Node: POSIX Regexps\7f1487693
+Node: Search and Replace\7f1489528
+Node: Match Data\7f1492893
+Node: Simple Match Data\7f1494023
+Node: Replacing Match\7f1498288
+Node: Entire Match Data\7f1500622
+Node: Saving Match Data\7f1502613
+Node: Searching and Case\7f1503994
+Node: Standard Regexps\7f1506028
+Node: Syntax Tables\7f1508226
+Node: Syntax Basics\7f1509340
+Node: Syntax Descriptors\7f1512312
+Node: Syntax Class Table\7f1514162
+Node: Syntax Flags\7f1520200
+Node: Syntax Table Functions\7f1523417
+Node: Motion and Syntax\7f1527281
+Node: Parsing Expressions\7f1528733
+Node: Standard Syntax Tables\7f1534802
+Node: Syntax Table Internals\7f1535646
+Node: Abbrevs\7f1536672
+Node: Abbrev Mode\7f1538475
+Node: Abbrev Tables\7f1539195
+Node: Defining Abbrevs\7f1540728
+Node: Abbrev Files\7f1542633
+Node: Abbrev Expansion\7f1544406
+Node: Standard Abbrev Tables\7f1549037
+Node: Extents\7f1550196
+Node: Intro to Extents\7f1551439
+Node: Creating and Modifying Extents\7f1555433
+Node: Extent Endpoints\7f1556940
+Node: Finding Extents\7f1560203
+Node: Mapping Over Extents\7f1563951
+Node: Extent Properties\7f1570068
+Node: Detached Extents\7f1580212
+Node: Extent Parents\7f1582071
+Node: Duplicable Extents\7f1583765
+Node: Extents and Events\7f1586986
+Node: Atomic Extents\7f1588893
+Node: Specifiers\7f1589340
+Node: Introduction to Specifiers\7f1591453
+Node: Specifiers In-Depth\7f1593763
+Node: Specifier Instancing\7f1598675
+Node: Specifier Types\7f1601937
+Node: Adding Specifications\7f1607011
+Node: Retrieving Specifications\7f1616373
+Node: Specifier Tag Functions\7f1620108
+Node: Specifier Instancing Functions\7f1623342
+Node: Specifier Example\7f1626749
+Node: Creating Specifiers\7f1629905
+Node: Specifier Validation Functions\7f1632154
+Node: Other Specification Functions\7f1634538
+Node: Faces and Window-System Objects\7f1638357
+Node: Faces\7f1638681
+Node: Merging Faces\7f1640298
+Node: Basic Face Functions\7f1642259
+Node: Face Properties\7f1644357
+Node: Face Convenience Functions\7f1654599
+Node: Other Face Display Functions\7f1657729
+Node: Fonts\7f1658542
+Node: Font Specifiers\7f1659243
+Node: Font Instances\7f1659484
+Node: Font Instance Names\7f1660451
+Node: Font Instance Size\7f1661292
+Node: Font Instance Characteristics\7f1662578
+Node: Font Convenience Functions\7f1663747
+Node: Colors\7f1665037
+Node: Color Specifiers\7f1665477
+Node: Color Instances\7f1665704
+Node: Color Instance Properties\7f1666448
+Node: Color Convenience Functions\7f1667074
+Node: Glyphs\7f1668127
+Node: Glyph Functions\7f1669719
+Node: Creating Glyphs\7f1670126
+Node: Glyph Properties\7f1671713
+Node: Glyph Convenience Functions\7f1680880
+Node: Glyph Dimensions\7f1684827
+Node: Images\7f1685907
+Node: Image Specifiers\7f1686356
+Node: Image Instantiator Conversion\7f1697777
+Node: Image Instances\7f1699142
+Node: Image Instance Types\7f1699893
+Node: Image Instance Functions\7f1702548
+Node: Glyph Types\7f1707117
+Node: Mouse Pointer\7f1708889
+Node: Redisplay Glyphs\7f1711892
+Node: Subwindows\7f1712925
+Node: Annotations\7f1713168
+Node: Annotation Basics\7f1714184
+Node: Annotation Primitives\7f1718122
+Node: Annotation Properties\7f1719451
+Node: Locating Annotations\7f1722491
+Node: Margin Primitives\7f1723328
+Node: Annotation Hooks\7f1725222
+Node: Display\7f1725882
+Node: Refresh Screen\7f1726860
+Node: Truncation\7f1728771
+Node: The Echo Area\7f1731296
+Node: Warnings\7f1737731
+Node: Invisible Text\7f1742167
+Node: Selective Display\7f1744746
+Node: Overlay Arrow\7f1748872
+Node: Temporary Displays\7f1750225
+Node: Blinking\7f1754346
+Node: Usual Display\7f1756531
+Node: Display Tables\7f1759080
+Node: Display Table Format\7f1759884
+Node: Active Display Table\7f1761326
+Node: Character Descriptors\7f1762518
+Node: Beeping\7f1763275
+Node: Hash Tables\7f1768041
+Node: Introduction to Hash Tables\7f1768649
+Node: Working With Hash Tables\7f1774672
+Node: Weak Hash Tables\7f1775789
+Node: Range Tables\7f1777588
+Node: Introduction to Range Tables\7f1778277
+Node: Working With Range Tables\7f1778708
+Node: Databases\7f1779593
+Node: Connecting to a Database\7f1779892
+Node: Working With a Database\7f1780983
+Node: Other Database Functions\7f1781841
+Node: Processes\7f1782415
+Node: Subprocess Creation\7f1784639
+Node: Synchronous Processes\7f1787928
+Node: MS-DOS Subprocesses\7f1794646
+Node: Asynchronous Processes\7f1795720
+Node: Deleting Processes\7f1799433
+Node: Process Information\7f1801304
+Node: Input to Processes\7f1805230
+Node: Signals to Processes\7f1807520
+Node: Output from Processes\7f1811940
+Node: Process Buffers\7f1812752
+Node: Filter Functions\7f1815619
+Node: Accepting Output\7f1821189
+Node: Sentinels\7f1822716
+Node: Process Window Size\7f1826206
+Node: Transaction Queues\7f1826555
+Node: Network\7f1828253
+Node: System Interface\7f1830087
+Node: Starting Up\7f1831357
+Node: Start-up Summary\7f1831951
+Node: Init File\7f1835505
+Node: Terminal-Specific\7f1837886
+Node: Command Line Arguments\7f1841045
+Node: Getting Out\7f1844534
+Node: Killing XEmacs\7f1845103
+Node: Suspending XEmacs\7f1846772
+Node: System Environment\7f1850114
+Node: User Identification\7f1856781
+Node: Time of Day\7f1860310
+Node: Time Conversion\7f1863097
+Node: Timers\7f1868137
+Node: Terminal Input\7f1870310
+Node: Input Modes\7f1870813
+Node: Translating Input\7f1873226
+Node: Recording Input\7f1877391
+Node: Terminal Output\7f1879491
+Node: Flow Control\7f1883114
+Node: Batch Mode\7f1886906
+Node: X-Windows\7f1888288
+Node: X Selections\7f1889159
+Node: X Server\7f1891369
+Node: Resources\7f1891820
+Node: Server Data\7f1897129
+Node: Grabs\7f1898336
+Node: X Miscellaneous\7f1899916
+Node: ToolTalk Support\7f1902301
+Node: XEmacs ToolTalk API Summary\7f1902518
+Node: Sending Messages\7f1903818
+Node: Example of Sending Messages\7f1904069
+Node: Elisp Interface for Sending Messages\7f1905131
+Node: Receiving Messages\7f1911523
+Node: Example of Receiving Messages\7f1911746
+Node: Elisp Interface for Receiving Messages\7f1912582
+Node: LDAP Support\7f1916407
+Node: Building XEmacs with LDAP support\7f1916903
+Node: XEmacs LDAP API\7f1917881
+Node: LDAP Variables\7f1918611
+Node: The High-Level LDAP API\7f1921087
+Node: The Low-Level LDAP API\7f1922192
+Node: The LDAP Lisp Object\7f1922466
+Node: Opening and Closing a LDAP Connection\7f1923019
+Node: Searching on a LDAP Server (Low-level)\7f1924802
+Node: Syntax of Search Filters\7f1926195
+Node: Internationalization\7f1927493
+Node: I18N Levels 1 and 2\7f1927830
+Node: I18N Level 3\7f1928536
+Node: Level 3 Basics\7f1928817
+Node: Level 3 Primitives\7f1929650
+Node: Dynamic Messaging\7f1931256
+Node: Domain Specification\7f1931719
+Node: Documentation String Extraction\7f1933622
+Node: I18N Level 4\7f1934540
+Node: MULE\7f1934732
+Node: Internationalization Terminology\7f1935843
+Node: Charsets\7f1944377
+Node: Charset Properties\7f1945073
+Node: Basic Charset Functions\7f1949759
+Node: Charset Property Functions\7f1951940
+Node: Predefined Charsets\7f1953982
+Node: MULE Characters\7f1956902
+Node: Composite Characters\7f1957749
+Node: ISO 2022\7f1959003
+Node: Coding Systems\7f1965145
+Node: Coding System Types\7f1967066
+Node: EOL Conversion\7f1968885
+Node: Coding System Properties\7f1970068
+Node: Basic Coding System Functions\7f1973920
+Node: Coding System Property Functions\7f1975824
+Node: Encoding and Decoding Text\7f1976382
+Node: Detection of Textual Encoding\7f1977518
+Node: Big5 and Shift-JIS Functions\7f1979054
+Node: CCL\7f1980142
+Node: CCL Syntax\7f1983246
+Node: CCL Statements\7f1984834
+Node: CCL Expressions\7f1989482
+Node: Calling CCL\7f1992021
+Node: CCL Examples\7f1995010
+Node: Category Tables\7f1995147
+Node: Tips\7f1997505
+Node: Style Tips\7f1998146
+Node: Compilation Tips\7f2007665
+Node: Documentation Tips\7f2009579
+Node: Comment Tips\7f2015088
+Node: Library Headers\7f2018090
+Node: Building XEmacs and Object Allocation\7f2022062
+Node: Building XEmacs\7f2022945
+Node: Pure Storage\7f2029280
+Node: Garbage Collection\7f2032068
+Node: Standard Errors\7f2043207
+Node: Standard Buffer-Local Variables\7f2047416
+Node: Standard Keymaps\7f2050049
+Node: Standard Hooks\7f2053781
+Node: Index\7f2061281
 \1f
 End Tag Table
 \1f
 End Tag Table
index dfc2f71..cfc1fa8 100644 (file)
@@ -217,7 +217,7 @@ Editing Types
 
 * Buffer Type::             The basic object of editing.
 * Window Type::             What makes buffers visible.
 
 * Buffer Type::             The basic object of editing.
 * Window Type::             What makes buffers visible.
-* Window Configuration Type::Save what the screen looks like.
+* Window Configuration Type:: Save what the screen looks like.
 * Marker Type::             A position in a buffer.
 * Process Type::            A process running on the underlying OS.
 * Stream Type::             Receive or send characters.
 * Marker Type::             A position in a buffer.
 * Process Type::            A process running on the underlying OS.
 * Stream Type::             Receive or send characters.
@@ -238,7 +238,7 @@ Numbers
 
 Strings and Characters
 
 
 Strings and Characters
 
-* Basics: String Basics.      Basic properties of strings and characters.
+* String Basics::             Basic properties of strings and characters.
 * Predicates for Strings::    Testing whether an object is a string or char.
 * Creating Strings::          Functions to allocate new strings.
 * Predicates for Characters:: Testing whether an object is a character.
 * Predicates for Strings::    Testing whether an object is a string or char.
 * Creating Strings::          Functions to allocate new strings.
 * Predicates for Characters:: Testing whether an object is a character.
index bb82c59..837bb60 100644 (file)
@@ -71,7 +71,7 @@ confoundance disease".  In particular, many functions such as `eq',
 `old-memq', etc.) that pretend like characters are integers are the
 same.  Byte code compiled under any version 19 Emacs will have all such
 functions mapped to their `old-' equivalents when the byte code is read
 `old-memq', etc.) that pretend like characters are integers are the
 same.  Byte code compiled under any version 19 Emacs will have all such
 functions mapped to their `old-' equivalents when the byte code is read
-into XEmacs 20.  This is to preserve compatibility - Emacs 19 converts
+into XEmacs 20.  This is to preserve compatibility--Emacs 19 converts
 all constant characters to the equivalent integer during
 byte-compilation, and thus there is no other way to preserve byte-code
 compatibility even if the code has specifically been written with the
 all constant characters to the equivalent integer during
 byte-compilation, and thus there is no other way to preserve byte-code
 compatibility even if the code has specifically been written with the
@@ -81,7 +81,7 @@ distinction between characters and integers in mind.
 code".  For example, the character `A' is represented as the
 integer 65, following the standard ASCII representation of characters.
 If XEmacs was not compiled with MULE support, the range of this integer
 code".  For example, the character `A' is represented as the
 integer 65, following the standard ASCII representation of characters.
 If XEmacs was not compiled with MULE support, the range of this integer
-will always be 0 to 255 - eight bits, or one byte. (Integers outside
+will always be 0 to 255--eight bits, or one byte. (Integers outside
 this range are accepted but silently truncated; however, you should
 most decidedly _not_ rely on this, because it will not work under
 XEmacs with MULE support.)  When MULE support is present, the range of
 this range are accepted but silently truncated; however, you should
 most decidedly _not_ rely on this, because it will not work under
 XEmacs with MULE support.)  When MULE support is present, the range of
index 6f65791..7c10dcf 100644 (file)
@@ -1464,7 +1464,7 @@ Lisp programs use strings more often than individual characters.
 
 * Menu:
 
 
 * Menu:
 
-* Basics: String Basics.      Basic properties of strings and characters.
+* String Basics::             Basic properties of strings and characters.
 * Predicates for Strings::    Testing whether an object is a string or char.
 * Creating Strings::          Functions to allocate new strings.
 * Predicates for Characters:: Testing whether an object is a character.
 * Predicates for Strings::    Testing whether an object is a string or char.
 * Creating Strings::          Functions to allocate new strings.
 * Predicates for Characters:: Testing whether an object is a character.
index f65d3dc..1145cac 100644 (file)
@@ -950,7 +950,7 @@ of property lists and association lists.
 
  - Function: remassoc key alist
      This function deletes by side effect any associations with key KEY
 
  - Function: remassoc key alist
      This function deletes by side effect any associations with key KEY
-     in ALIST - i.e. it removes any elements from ALIST whose `car' is
+     in ALIST--i.e. it removes any elements from ALIST whose `car' is
      `equal' to KEY.  The modified ALIST is returned.
 
      If the first member of ALIST has a `car' that is `equal' to KEY,
      `equal' to KEY.  The modified ALIST is returned.
 
      If the first member of ALIST has a `car' that is `equal' to KEY,
@@ -960,7 +960,7 @@ of property lists and association lists.
 
  - Function: remassq key alist
      This function deletes by side effect any associations with key KEY
 
  - Function: remassq key alist
      This function deletes by side effect any associations with key KEY
-     in ALIST - i.e. it removes any elements from ALIST whose `car' is
+     in ALIST--i.e. it removes any elements from ALIST whose `car' is
      `eq' to KEY.  The modified ALIST is returned.
 
      This function is exactly like `remassoc', but comparisons between
      `eq' to KEY.  The modified ALIST is returned.
 
      This function is exactly like `remassoc', but comparisons between
@@ -968,7 +968,7 @@ of property lists and association lists.
 
  - Function: remrassoc value alist
      This function deletes by side effect any associations with value
 
  - Function: remrassoc value alist
      This function deletes by side effect any associations with value
-     VALUE in ALIST - i.e. it removes any elements from ALIST whose
+     VALUE in ALIST--i.e. it removes any elements from ALIST whose
      `cdr' is `equal' to VALUE.  The modified ALIST is returned.
 
      If the first member of ALIST has a `car' that is `equal' to VALUE,
      `cdr' is `equal' to VALUE.  The modified ALIST is returned.
 
      If the first member of ALIST has a `car' that is `equal' to VALUE,
@@ -983,7 +983,7 @@ of property lists and association lists.
 
  - Function: remrassq value alist
      This function deletes by side effect any associations with value
 
  - Function: remrassq value alist
      This function deletes by side effect any associations with value
-     VALUE in ALIST - i.e. it removes any elements from ALIST whose
+     VALUE in ALIST--i.e. it removes any elements from ALIST whose
      `cdr' is `eq' to VALUE.  The modified ALIST is returned.
 
      This function is exactly like `remrassoc', but comparisons between
      `cdr' is `eq' to VALUE.  The modified ALIST is returned.
 
      This function is exactly like `remrassoc', but comparisons between
@@ -1236,7 +1236,7 @@ lists of another function's buffers or markers.  When that function is
 done with the elements, they will automatically disappear from the list.
 
    Weak lists are used internally, for example, to manage the list
 done with the elements, they will automatically disappear from the list.
 
    Weak lists are used internally, for example, to manage the list
-holding the children of an extent - an extent that is unused but has a
+holding the children of an extent--an extent that is unused but has a
 parent will still be reclaimed, and will automatically be removed from
 its parent's list of children.
 
 parent will still be reclaimed, and will automatically be removed from
 its parent's list of children.
 
index a88cba6..d488dc7 100644 (file)
@@ -20,7 +20,7 @@ preserved on all copies.
 Indirect:
 new-users-guide.info-1: 635
 new-users-guide.info-2: 50468
 Indirect:
 new-users-guide.info-1: 635
 new-users-guide.info-2: 50468
-new-users-guide.info-3: 99970
+new-users-guide.info-3: 100027
 \1f
 Tag Table:
 (Indirect)
 \1f
 Tag Table:
 (Indirect)
@@ -51,26 +51,26 @@ Node: Customizing key Bindings\7f41489
 Node: Customizing Menus\7f44979
 Node: Help\7f50468
 Node: The Help Menu\7f51156
 Node: Customizing Menus\7f44979
 Node: Help\7f50468
 Node: The Help Menu\7f51156
-Node: Modes\7f56081
-Node: Major Modes\7f56997
-Node: Minor Modes\7f60946
-Node: Files\7f65032
-Node: File Names\7f65754
-Node: Visiting\7f67557
-Node: Saving Files\7f69681
-Node: Other Customizations\7f73058
-Node: Setting Variables\7f75526
-Node: Init File\7f78735
-Node: Select and Move\7f84205
-Node: Selecting Text\7f85159
-Node: Mouse\7f86672
-Node: Region Operation\7f87997
-Node: Moving Text\7f89257
-Node: Accumulating text\7f90497
-Node: Search and Replace\7f92817
-Node: Key Index\7f96681
-Node: Command Index\7f99970
-Node: Variable Index\7f104072
-Node: Concept Index\7f104649
+Node: Modes\7f56122
+Node: Major Modes\7f57038
+Node: Minor Modes\7f60987
+Node: Files\7f65081
+Node: File Names\7f65803
+Node: Visiting\7f67606
+Node: Saving Files\7f69730
+Node: Other Customizations\7f73107
+Node: Setting Variables\7f75583
+Node: Init File\7f78792
+Node: Select and Move\7f84262
+Node: Selecting Text\7f85216
+Node: Mouse\7f86729
+Node: Region Operation\7f88054
+Node: Moving Text\7f89314
+Node: Accumulating text\7f90554
+Node: Search and Replace\7f92874
+Node: Key Index\7f96738
+Node: Command Index\7f100027
+Node: Variable Index\7f104129
+Node: Concept Index\7f104706
 \1f
 End Tag Table
 \1f
 End Tag Table
index 1ee1532..652d4f1 100644 (file)
@@ -3,7 +3,7 @@ widget.texi.
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
-* Widgets: (widget).           The Emacs Widget Library.
+* Widgets: (widget).            The Emacs Widget Library.
 END-INFO-DIR-ENTRY
 
 \1f
 END-INFO-DIR-ENTRY
 
 \1f
@@ -291,69 +291,69 @@ User Interface::).
        (make-local-variable 'widget-example-repeat)
        (widget-insert "Here is some documentation.\n\nName: ")
        (widget-create 'editable-field
        (make-local-variable 'widget-example-repeat)
        (widget-insert "Here is some documentation.\n\nName: ")
        (widget-create 'editable-field
-                :size 13
-                "My Name")
+                      :size 13
+                      "My Name")
        (widget-create 'menu-choice
        (widget-create 'menu-choice
-                :tag "Choose"
-                :value "This"
-                :help-echo "Choose me, please!"
-                :notify (lambda (widget &rest ignore)
-                          (message "%s is a good choice!"
-                                   (widget-value widget)))
-                '(item :tag "This option" :value "This")
-                '(choice-item "That option")
-                '(editable-field :menu-tag "No option" "Thus option"))
+                      :tag "Choose"
+                      :value "This"
+                      :help-echo "Choose me, please!"
+                      :notify (lambda (widget &rest ignore)
+                                (message "%s is a good choice!"
+                                         (widget-value widget)))
+                      '(item :tag "This option" :value "This")
+                      '(choice-item "That option")
+                      '(editable-field :menu-tag "No option" "Thus option"))
        (widget-insert "Address: ")
        (widget-create 'editable-field
        (widget-insert "Address: ")
        (widget-create 'editable-field
-                "Some Place\nIn some City\nSome country.")
+                      "Some Place\nIn some City\nSome country.")
        (widget-insert "\nSee also ")
        (widget-create 'link
        (widget-insert "\nSee also ")
        (widget-create 'link
-                :notify (lambda (&rest ignore)
-                          (widget-value-set widget-example-repeat
-                                            '("En" "To" "Tre"))
-                          (widget-setup))
-                "other work")
+                      :notify (lambda (&rest ignore)
+                                (widget-value-set widget-example-repeat
+                                                  '("En" "To" "Tre"))
+                                (widget-setup))
+                      "other work")
        (widget-insert " for more information.\n\nNumbers: count to three below\n")
        (setq widget-example-repeat
        (widget-insert " for more information.\n\nNumbers: count to three below\n")
        (setq widget-example-repeat
-       (widget-create 'editable-list
-                      :entry-format "%i %d %v"
-                      :notify (lambda (widget &rest ignore)
-                                (let ((old (widget-get widget
-                                                       ':example-length))
-                                      (new (length (widget-value widget))))
-                                  (unless (eq old new)
-                                    (widget-put widget ':example-length new)
-                                    (message "You can count to %d." new))))
-                      :value '("One" "Eh, two?" "Five!")
-                      '(editable-field :value "three")))
+             (widget-create 'editable-list
+                            :entry-format "%i %d %v"
+                            :notify (lambda (widget &rest ignore)
+                                      (let ((old (widget-get widget
+                                                             ':example-length))
+                                            (new (length (widget-value widget))))
+                                        (unless (eq old new)
+                                          (widget-put widget ':example-length new)
+                                          (message "You can count to %d." new))))
+                            :value '("One" "Eh, two?" "Five!")
+                            '(editable-field :value "three")))
        (widget-insert "\n\nSelect multiple:\n\n")
        (widget-create 'checkbox t)
        (widget-insert " This\n")
        (widget-create 'checkbox nil)
        (widget-insert " That\n")
        (widget-create 'checkbox
        (widget-insert "\n\nSelect multiple:\n\n")
        (widget-create 'checkbox t)
        (widget-insert " This\n")
        (widget-create 'checkbox nil)
        (widget-insert " That\n")
        (widget-create 'checkbox
-                :notify (lambda (&rest ignore) (message "Tickle"))
-                t)
+                      :notify (lambda (&rest ignore) (message "Tickle"))
+                      t)
        (widget-insert " Thus\n\nSelect one:\n\n")
        (widget-create 'radio-button-choice
        (widget-insert " Thus\n\nSelect one:\n\n")
        (widget-create 'radio-button-choice
-                :value "One"
-                :notify (lambda (widget &rest ignore)
-                          (message "You selected %s"
-                                   (widget-value widget)))
-                '(item "One") '(item "Another One.") '(item "A Final One."))
+                      :value "One"
+                      :notify (lambda (widget &rest ignore)
+                                (message "You selected %s"
+                                         (widget-value widget)))
+                      '(item "One") '(item "Another One.") '(item "A Final One."))
        (widget-insert "\n")
        (widget-create 'push-button
        (widget-insert "\n")
        (widget-create 'push-button
-                :notify (lambda (&rest ignore)
-                          (if (= (length (widget-value widget-example-repeat))
-                                 3)
-                              (message "Congratulation!")
-                            (error "Three was the count!")))
-                "Apply Form")
+                      :notify (lambda (&rest ignore)
+                                (if (= (length (widget-value widget-example-repeat))
+                                       3)
+                                    (message "Congratulation!")
+                                  (error "Three was the count!")))
+                      "Apply Form")
        (widget-insert " ")
        (widget-create 'push-button
        (widget-insert " ")
        (widget-create 'push-button
-                :notify (lambda (&rest ignore)
-                          (widget-example))
-                "Reset Form")
+                      :notify (lambda (&rest ignore)
+                                (widget-example))
+                      "Reset Form")
        (widget-insert "\n")
        (use-local-map widget-keymap)
        (widget-setup))
        (widget-insert "\n")
        (use-local-map widget-keymap)
        (widget-setup))
@@ -1515,37 +1515,37 @@ Wishlist
 
 \1f
 Tag Table:
 
 \1f
 Tag Table:
-Node: Top\7f201
-Node: Introduction\7f581
-Node: User Interface\7f4064
-Node: Programming Example\7f8959
-Node: Setting Up the Buffer\7f12276
-Node: Basic Types\7f13993
-Node: link\7f20038
-Node: url-link\7f20552
-Node: info-link\7f20864
-Node: push-button\7f21155
-Node: editable-field\7f21728
-Node: text\7f23067
-Node: menu-choice\7f23365
-Node: radio-button-choice\7f24218
-Node: item\7f25785
-Node: choice-item\7f26173
-Node: toggle\7f26671
-Node: checkbox\7f27408
-Node: checklist\7f27714
-Node: editable-list\7f29158
-Node: group\7f30340
-Node: Sexp Types\7f30627
-Node: constants\7f30940
-Node: generic\7f32019
-Node: atoms\7f32552
-Node: composite\7f34499
-Node: Widget Properties\7f36969
-Node: Defining New Widgets\7f40034
-Node: Widget Browser\7f45334
-Node: Widget Minor Mode\7f46192
-Node: Utilities\7f46749
-Node: Widget Wishlist\7f47230
+Node: Top\7f211
+Node: Introduction\7f591
+Node: User Interface\7f4074
+Node: Programming Example\7f8969
+Node: Setting Up the Buffer\7f13119
+Node: Basic Types\7f14836
+Node: link\7f20881
+Node: url-link\7f21395
+Node: info-link\7f21707
+Node: push-button\7f21998
+Node: editable-field\7f22571
+Node: text\7f23910
+Node: menu-choice\7f24208
+Node: radio-button-choice\7f25061
+Node: item\7f26628
+Node: choice-item\7f27016
+Node: toggle\7f27514
+Node: checkbox\7f28251
+Node: checklist\7f28557
+Node: editable-list\7f30001
+Node: group\7f31183
+Node: Sexp Types\7f31470
+Node: constants\7f31783
+Node: generic\7f32862
+Node: atoms\7f33395
+Node: composite\7f35342
+Node: Widget Properties\7f37812
+Node: Defining New Widgets\7f40877
+Node: Widget Browser\7f46177
+Node: Widget Minor Mode\7f47035
+Node: Utilities\7f47592
+Node: Widget Wishlist\7f48073
 \1f
 End Tag Table
 \1f
 End Tag Table
index b49967c..246c340 100644 (file)
@@ -3,262 +3,262 @@ xemacs-faq.texi.
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
-* FAQ: (xemacs-faq).           XEmacs FAQ.
+* FAQ: (xemacs-faq).            XEmacs FAQ.
 END-INFO-DIR-ENTRY
 
 \1f
 Indirect:
 END-INFO-DIR-ENTRY
 
 \1f
 Indirect:
-xemacs-faq.info-1: 195
-xemacs-faq.info-2: 49906
-xemacs-faq.info-3: 99720
-xemacs-faq.info-4: 149713
-xemacs-faq.info-5: 199295
+xemacs-faq.info-1: 205
+xemacs-faq.info-2: 50061
+xemacs-faq.info-3: 99308
+xemacs-faq.info-4: 149302
+xemacs-faq.info-5: 196381
 \1f
 Tag Table:
 (Indirect)
 \1f
 Tag Table:
 (Indirect)
-Node: Top\7f195
-Node: Introduction\7f16541
-Node: Q1.0.1\7f19944
-Node: Q1.0.2\7f20480
-Node: Q1.0.3\7f20975
-Node: Q1.0.4\7f21237
-Node: Q1.0.5\7f22687
-Node: Q1.0.6\7f23376
-Node: Q1.0.7\7f24382
-Node: Q1.0.8\7f24631
-Node: Q1.0.9\7f24846
-Node: Q1.0.10\7f25124
-Node: Q1.0.11\7f25367
-Node: Q1.0.12\7f25802
-Node: Q1.0.13\7f26170
-Node: Q1.0.14\7f26419
-Node: Q1.1.1\7f26893
-Node: Q1.1.2\7f27970
-Node: Q1.1.3\7f28363
-Node: Q1.2.1\7f29314
-Node: Q1.2.2\7f30370
-Node: Q1.2.3\7f30804
-Node: Q1.3.1\7f31888
-Node: Q1.3.2\7f35806
-Node: Q1.3.3\7f36361
-Node: Q1.3.4\7f36602
-Node: Q1.3.5\7f37366
-Node: Q1.3.6\7f39781
-Node: Q1.3.7\7f41276
-Node: Q1.4.1\7f42211
-Node: Q1.4.2\7f43073
-Node: Q1.4.3\7f43414
-Node: Q1.4.4\7f43833
-Node: Q1.4.5\7f45373
-Node: Q1.4.6\7f45677
-Node: Installation\7f46670
-Node: Q2.0.1\7f49033
-Node: Q2.0.2\7f49906
-Node: Q2.0.3\7f57109
-Node: Q2.0.4\7f58407
-Node: Q2.0.5\7f58999
-Node: Q2.0.6\7f59367
-Node: Q2.0.7\7f59748
-Node: Q2.0.8\7f60129
-Node: Q2.0.9\7f61707
-Node: Q2.0.10\7f63145
-Node: Q2.0.11\7f63989
-Node: Q2.0.12\7f64930
-Node: Q2.1.1\7f66452
-Node: Q2.1.2\7f69194
-Node: Q2.1.3\7f70371
-Node: Q2.1.4\7f71664
-Node: Q2.1.5\7f72463
-Node: Q2.1.6\7f72825
-Node: Q2.1.7\7f73302
-Node: Q2.1.8\7f73655
-Node: Q2.1.9\7f75171
-Node: Q2.1.10\7f75593
-Node: Q2.1.11\7f76350
-Node: Q2.1.12\7f77215
-Node: Q2.1.13\7f78170
-Node: Q2.1.14\7f79201
-Node: Q2.1.15\7f80312
-Node: Q2.1.16\7f87344
-Node: Q2.1.17\7f88038
-Node: Q2.1.18\7f88635
-Node: Q2.1.19\7f88762
-Node: Q2.1.20\7f89292
-Node: Q2.1.21\7f89674
-Node: Q2.1.22\7f89867
-Node: Q2.1.23\7f91164
-Node: Q2.1.24\7f91832
-Node: Customization\7f92362
-Node: Q3.0.1\7f97200
-Node: Q3.0.2\7f97906
-Node: Q3.0.3\7f98470
-Node: Q3.0.4\7f98887
-Node: Q3.0.5\7f99720
-Node: Q3.0.6\7f100501
-Node: Q3.0.7\7f101081
-Node: Q3.0.8\7f101745
-Node: Q3.0.9\7f102591
-Node: Q3.1.1\7f103152
-Node: Q3.1.2\7f103889
-Node: Q3.1.3\7f104320
-Node: Q3.1.4\7f104509
-Node: Q3.1.5\7f104698
-Node: Q3.1.6\7f105082
-Node: Q3.1.7\7f105763
-Node: Q3.1.8\7f107987
-Node: Q3.2.1\7f108529
-Node: Q3.2.2\7f109937
-Node: Q3.2.3\7f110736
-Node: Q3.2.4\7f111338
-Node: Q3.2.5\7f112372
-Node: Q3.2.6\7f112839
-Node: Q3.3.1\7f113801
-Node: Q3.3.2\7f114194
-Node: Q3.3.3\7f114825
-Node: Q3.3.4\7f115206
-Node: Q3.3.5\7f116300
-Node: Q3.4.1\7f117794
-Node: Q3.4.2\7f118437
-Node: Q3.5.1\7f118949
-Node: Q3.5.2\7f120403
-Node: Q3.5.3\7f120821
-Node: Q3.5.4\7f121661
-Node: Q3.5.5\7f122493
-Node: Q3.5.6\7f123633
-Node: Q3.5.7\7f124623
-Node: Q3.5.8\7f125975
-Node: Q3.5.9\7f126722
-Node: Q3.5.10\7f127502
-Node: Q3.5.11\7f128138
-Node: Q3.6.1\7f128691
-Node: Q3.6.2\7f129431
-Node: Q3.6.3\7f129859
-Node: Q3.7.1\7f130359
-Node: Q3.7.2\7f131247
-Node: Q3.7.3\7f131906
-Node: Q3.7.4\7f132328
-Node: Q3.7.5\7f132671
-Node: Q3.7.6\7f133139
-Node: Q3.7.7\7f133854
-Node: Q3.7.8\7f134874
-Node: Q3.8.1\7f135293
-Node: Q3.8.2\7f135753
-Node: Q3.8.3\7f136216
-Node: Q3.8.4\7f136822
-Node: Q3.8.5\7f137541
-Node: Q3.9.1\7f138326
-Node: Q3.9.2\7f139266
-Node: Q3.9.3\7f139864
-Node: Q3.9.4\7f140526
-Node: Q3.10.1\7f141405
-Node: Q3.10.2\7f142223
-Node: Q3.10.3\7f143228
-Node: Q3.10.4\7f143956
-Node: Q3.10.5\7f144339
-Node: Subsystems\7f145349
-Node: Q4.0.1\7f147836
-Node: Q4.0.2\7f148361
-Node: Q4.0.3\7f148919
-Node: Q4.0.4\7f149240
-Node: Q4.0.5\7f149482
-Node: Q4.0.6\7f149713
-Node: Q4.0.7\7f150294
-Node: Q4.0.8\7f150619
-Node: Q4.0.9\7f151846
-Node: Q4.0.10\7f153884
-Node: Q4.0.11\7f154338
-Node: Q4.0.12\7f155188
-Node: Q4.1.1\7f156161
-Node: Q4.1.2\7f156564
-Node: Q4.1.3\7f156891
-Node: Q4.2.1\7f157200
-Node: Q4.2.2\7f157830
-Node: Q4.2.3\7f158070
-Node: Q4.2.4\7f158614
-Node: Q4.3.1\7f159267
-Node: Q4.3.2\7f159851
-Node: Q4.3.3\7f161332
-Node: Q4.3.4\7f161604
-Node: Q4.3.5\7f162281
-Node: Q4.4.1\7f162909
-Node: Q4.4.2\7f164395
-Node: Q4.5.1\7f165599
-Node: Q4.6.1\7f166368
-Node: Q4.7.1\7f171628
-Node: Q4.7.2\7f172583
-Node: Q4.7.3\7f172880
-Node: Q4.7.4\7f173066
-Node: Q4.7.5\7f173950
-Node: Q4.7.6\7f175592
-Node: Miscellaneous\7f175881
-Node: Q5.0.1\7f179298
-Node: Q5.0.2\7f180032
-Node: Q5.0.3\7f180886
-Node: Q5.0.4\7f181588
-Node: Q5.0.5\7f182527
-Node: Q5.0.6\7f184507
-Node: Q5.0.7\7f185164
-Node: Q5.0.8\7f185769
-Node: Q5.0.9\7f186288
-Node: Q5.0.10\7f186802
-Node: Q5.0.11\7f187050
-Node: Q5.0.12\7f187588
-Node: Q5.0.13\7f188505
-Node: Q5.0.14\7f189189
-Node: Q5.0.15\7f189954
-Node: Q5.0.16\7f190251
-Node: Q5.0.17\7f190763
-Node: Q5.0.18\7f191028
-Node: Q5.0.19\7f191222
-Node: Q5.0.20\7f191646
-Node: Q5.1.1\7f192561
-Node: Q5.1.2\7f194630
-Node: Q5.1.3\7f195366
-Node: Q5.1.4\7f198760
-Node: Q5.1.5\7f199295
-Node: Q5.1.6\7f201389
-Node: Q5.1.7\7f202778
-Node: Q5.1.8\7f204379
-Node: Q5.1.9\7f204931
-Node: Q5.1.10\7f205816
-Node: Q5.1.11\7f206947
-Node: Q5.2.1\7f207496
-Node: Q5.2.2\7f208067
-Node: Q5.2.3\7f208484
-Node: Q5.2.4\7f208719
-Node: Q5.3.1\7f209629
-Node: Q5.3.2\7f210850
-Node: Q5.3.3\7f211626
-Node: Q5.3.4\7f212110
-Node: Q5.3.5\7f212777
-Node: Q5.3.6\7f213646
-Node: Q5.3.7\7f213891
-Node: Q5.3.8\7f216081
-Node: Q5.3.9\7f216328
-Node: Q5.3.10\7f217281
-Node: Q5.3.11\7f219365
-Node: Q5.3.12\7f220914
-Node: MS Windows\7f222188
-Node: Q6.0.1\7f223519
-Node: Q6.0.2\7f224266
-Node: Q6.0.3\7f224731
-Node: Q6.0.4\7f225011
-Node: Q6.1.1\7f227292
-Node: Q6.1.2\7f228163
-Node: Q6.1.3\7f228444
-Node: Q6.1.4\7f228726
-Node: Q6.1.5\7f229104
-Node: Q6.1.6\7f229936
-Node: Q6.2.1\7f230520
-Node: Q6.2.2\7f231421
-Node: Q6.2.3\7f231822
-Node: Q6.3.1\7f232111
-Node: Q6.3.2\7f233205
-Node: Q6.3.3\7f236386
-Node: Current Events\7f236640
-Node: Q7.0.1\7f237294
-Node: Q7.0.2\7f237933
-Node: Q7.0.3\7f239007
-Node: Q7.0.4\7f239235
+Node: Top\7f205
+Node: Introduction\7f16631
+Node: Q1.0.1\7f20034
+Node: Q1.0.2\7f20570
+Node: Q1.0.3\7f21065
+Node: Q1.0.4\7f21327
+Node: Q1.0.5\7f22777
+Node: Q1.0.6\7f23466
+Node: Q1.0.7\7f24472
+Node: Q1.0.8\7f24721
+Node: Q1.0.9\7f24936
+Node: Q1.0.10\7f25214
+Node: Q1.0.11\7f25457
+Node: Q1.0.12\7f25892
+Node: Q1.0.13\7f26260
+Node: Q1.0.14\7f26509
+Node: Q1.1.1\7f26983
+Node: Q1.1.2\7f28060
+Node: Q1.1.3\7f28453
+Node: Q1.2.1\7f29404
+Node: Q1.2.2\7f30460
+Node: Q1.2.3\7f30894
+Node: Q1.3.1\7f31978
+Node: Q1.3.2\7f35894
+Node: Q1.3.3\7f36449
+Node: Q1.3.4\7f36690
+Node: Q1.3.5\7f37479
+Node: Q1.3.6\7f39894
+Node: Q1.3.7\7f41431
+Node: Q1.4.1\7f42366
+Node: Q1.4.2\7f43228
+Node: Q1.4.3\7f43569
+Node: Q1.4.4\7f43988
+Node: Q1.4.5\7f45528
+Node: Q1.4.6\7f45832
+Node: Installation\7f46825
+Node: Q2.0.1\7f49188
+Node: Q2.0.2\7f50061
+Node: Q2.0.3\7f57513
+Node: Q2.0.4\7f58811
+Node: Q2.0.5\7f59403
+Node: Q2.0.6\7f59771
+Node: Q2.0.7\7f60152
+Node: Q2.0.8\7f60533
+Node: Q2.0.9\7f62110
+Node: Q2.0.10\7f63548
+Node: Q2.0.11\7f64392
+Node: Q2.0.12\7f65333
+Node: Q2.1.1\7f66855
+Node: Q2.1.2\7f69597
+Node: Q2.1.3\7f70774
+Node: Q2.1.4\7f72067
+Node: Q2.1.5\7f72866
+Node: Q2.1.6\7f73228
+Node: Q2.1.7\7f73705
+Node: Q2.1.8\7f74058
+Node: Q2.1.9\7f75592
+Node: Q2.1.10\7f76014
+Node: Q2.1.11\7f76771
+Node: Q2.1.12\7f77636
+Node: Q2.1.13\7f78591
+Node: Q2.1.14\7f79622
+Node: Q2.1.15\7f80733
+Node: Q2.1.16\7f87765
+Node: Q2.1.17\7f88459
+Node: Q2.1.18\7f89056
+Node: Q2.1.19\7f89183
+Node: Q2.1.20\7f89713
+Node: Q2.1.21\7f90095
+Node: Q2.1.22\7f90288
+Node: Q2.1.23\7f91585
+Node: Q2.1.24\7f92253
+Node: Customization\7f92783
+Node: Q3.0.1\7f97621
+Node: Q3.0.2\7f98327
+Node: Q3.0.3\7f98891
+Node: Q3.0.4\7f99308
+Node: Q3.0.5\7f100141
+Node: Q3.0.6\7f100922
+Node: Q3.0.7\7f101502
+Node: Q3.0.8\7f102166
+Node: Q3.0.9\7f103124
+Node: Q3.1.1\7f103685
+Node: Q3.1.2\7f104422
+Node: Q3.1.3\7f104853
+Node: Q3.1.4\7f105042
+Node: Q3.1.5\7f105231
+Node: Q3.1.6\7f105615
+Node: Q3.1.7\7f106324
+Node: Q3.1.8\7f108548
+Node: Q3.2.1\7f109090
+Node: Q3.2.2\7f110743
+Node: Q3.2.3\7f111542
+Node: Q3.2.4\7f112144
+Node: Q3.2.5\7f113178
+Node: Q3.2.6\7f113645
+Node: Q3.3.1\7f114607
+Node: Q3.3.2\7f115000
+Node: Q3.3.3\7f115631
+Node: Q3.3.4\7f116012
+Node: Q3.3.5\7f117113
+Node: Q3.4.1\7f118607
+Node: Q3.4.2\7f119250
+Node: Q3.5.1\7f119762
+Node: Q3.5.2\7f121211
+Node: Q3.5.3\7f121629
+Node: Q3.5.4\7f122467
+Node: Q3.5.5\7f123299
+Node: Q3.5.6\7f124439
+Node: Q3.5.7\7f125429
+Node: Q3.5.8\7f126869
+Node: Q3.5.9\7f127616
+Node: Q3.5.10\7f128396
+Node: Q3.5.11\7f129032
+Node: Q3.6.1\7f129585
+Node: Q3.6.2\7f130330
+Node: Q3.6.3\7f130758
+Node: Q3.7.1\7f131258
+Node: Q3.7.2\7f132146
+Node: Q3.7.3\7f132805
+Node: Q3.7.4\7f133227
+Node: Q3.7.5\7f133570
+Node: Q3.7.6\7f134038
+Node: Q3.7.7\7f134753
+Node: Q3.7.8\7f135773
+Node: Q3.8.1\7f136192
+Node: Q3.8.2\7f136652
+Node: Q3.8.3\7f137115
+Node: Q3.8.4\7f137721
+Node: Q3.8.5\7f138440
+Node: Q3.9.1\7f139225
+Node: Q3.9.2\7f140165
+Node: Q3.9.3\7f140763
+Node: Q3.9.4\7f141425
+Node: Q3.10.1\7f142304
+Node: Q3.10.2\7f143122
+Node: Q3.10.3\7f144127
+Node: Q3.10.4\7f144855
+Node: Q3.10.5\7f145238
+Node: Subsystems\7f146290
+Node: Q4.0.1\7f148777
+Node: Q4.0.2\7f149302
+Node: Q4.0.3\7f149860
+Node: Q4.0.4\7f150181
+Node: Q4.0.5\7f150423
+Node: Q4.0.6\7f150654
+Node: Q4.0.7\7f151242
+Node: Q4.0.8\7f151567
+Node: Q4.0.9\7f152794
+Node: Q4.0.10\7f154832
+Node: Q4.0.11\7f155321
+Node: Q4.0.12\7f156199
+Node: Q4.1.1\7f157172
+Node: Q4.1.2\7f157575
+Node: Q4.1.3\7f157902
+Node: Q4.2.1\7f158211
+Node: Q4.2.2\7f158841
+Node: Q4.2.3\7f159081
+Node: Q4.2.4\7f159625
+Node: Q4.3.1\7f160278
+Node: Q4.3.2\7f160862
+Node: Q4.3.3\7f162343
+Node: Q4.3.4\7f162615
+Node: Q4.3.5\7f163292
+Node: Q4.4.1\7f163920
+Node: Q4.4.2\7f165406
+Node: Q4.5.1\7f166610
+Node: Q4.6.1\7f167379
+Node: Q4.7.1\7f172639
+Node: Q4.7.2\7f173594
+Node: Q4.7.3\7f173891
+Node: Q4.7.4\7f174077
+Node: Q4.7.5\7f174961
+Node: Q4.7.6\7f176602
+Node: Miscellaneous\7f176891
+Node: Q5.0.1\7f180308
+Node: Q5.0.2\7f181047
+Node: Q5.0.3\7f181901
+Node: Q5.0.4\7f182603
+Node: Q5.0.5\7f183542
+Node: Q5.0.6\7f185522
+Node: Q5.0.7\7f186179
+Node: Q5.0.8\7f186784
+Node: Q5.0.9\7f187303
+Node: Q5.0.10\7f187817
+Node: Q5.0.11\7f188065
+Node: Q5.0.12\7f188603
+Node: Q5.0.13\7f189520
+Node: Q5.0.14\7f190204
+Node: Q5.0.15\7f190969
+Node: Q5.0.16\7f191266
+Node: Q5.0.17\7f191778
+Node: Q5.0.18\7f192043
+Node: Q5.0.19\7f192237
+Node: Q5.0.20\7f192661
+Node: Q5.1.1\7f193576
+Node: Q5.1.2\7f195645
+Node: Q5.1.3\7f196381
+Node: Q5.1.4\7f199775
+Node: Q5.1.5\7f200310
+Node: Q5.1.6\7f202434
+Node: Q5.1.7\7f203920
+Node: Q5.1.8\7f205521
+Node: Q5.1.9\7f206073
+Node: Q5.1.10\7f206958
+Node: Q5.1.11\7f208089
+Node: Q5.2.1\7f208638
+Node: Q5.2.2\7f209208
+Node: Q5.2.3\7f209625
+Node: Q5.2.4\7f209860
+Node: Q5.3.1\7f210770
+Node: Q5.3.2\7f211991
+Node: Q5.3.3\7f212767
+Node: Q5.3.4\7f213251
+Node: Q5.3.5\7f213918
+Node: Q5.3.6\7f214787
+Node: Q5.3.7\7f215032
+Node: Q5.3.8\7f217222
+Node: Q5.3.9\7f217469
+Node: Q5.3.10\7f218422
+Node: Q5.3.11\7f220506
+Node: Q5.3.12\7f222097
+Node: MS Windows\7f223371
+Node: Q6.0.1\7f224777
+Node: Q6.0.2\7f225524
+Node: Q6.0.3\7f225989
+Node: Q6.0.4\7f226269
+Node: Q6.1.1\7f228548
+Node: Q6.1.2\7f229419
+Node: Q6.1.3\7f229700
+Node: Q6.1.4\7f229982
+Node: Q6.1.5\7f230360
+Node: Q6.1.6\7f231192
+Node: Q6.2.1\7f231776
+Node: Q6.2.2\7f232677
+Node: Q6.2.3\7f233089
+Node: Q6.3.1\7f233378
+Node: Q6.3.2\7f234472
+Node: Q6.3.3\7f237653
+Node: Current Events\7f237907
+Node: Q7.0.1\7f238561
+Node: Q7.0.2\7f239200
+Node: Q7.0.3\7f240273
+Node: Q7.0.4\7f240501
 \1f
 End Tag Table
 \1f
 End Tag Table
index 1b14b52..3393000 100644 (file)
@@ -3,7 +3,7 @@ xemacs-faq.texi.
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
-* FAQ: (xemacs-faq).           XEmacs FAQ.
+* FAQ: (xemacs-faq).            XEmacs FAQ.
 END-INFO-DIR-ENTRY
 
 \1f
 END-INFO-DIR-ENTRY
 
 \1f
@@ -329,28 +329,28 @@ Miscellaneous:
 XEmacs on MS Windows
 
 General Info:
 XEmacs on MS Windows
 
 General Info:
-* Q6.0.1::     What is the status of the XEmacs port to Windows?
-* Q6.0.2::     What flavors of MS Windows are supported?
-* Q6.0.3::     Are binary kits available?
-* Q6.0.4::     Does XEmacs on MS Windows require an X server to run?
+* Q6.0.1::      What is the status of the XEmacs port to Windows?
+* Q6.0.2::      What flavors of MS Windows are supported?
+* Q6.0.3::      Are binary kits available?
+* Q6.0.4::      Does XEmacs on MS Windows require an X server to run?
 
 Building XEmacs on MS Windows:
 
 Building XEmacs on MS Windows:
-* Q6.1.1::     I decided to run with X.  Where do I get an X server?
-* Q6.1.2::     What compiler do I need to compile XEmacs?
-* Q6.1.3::     How do I compile for the native port?
-* Q6.1.4::     How do I compile for the X port?
-* Q6.1.5::     How do I compile for Cygnus' Cygwin?
-* Q6.1.6::     What do I need for Cygwin?
+* Q6.1.1::      I decided to run with X.  Where do I get an X server?
+* Q6.1.2::      What compiler do I need to compile XEmacs?
+* Q6.1.3::      How do I compile for the native port?
+* Q6.1.4::      How do I compile for the X port?
+* Q6.1.5::      How do I compile for Cygnus' Cygwin?
+* Q6.1.6::      What do I need for Cygwin?
 
 Customization and User Interface:
 
 Customization and User Interface:
-* Q6.2.1::     How will the port cope with differences in the Windows user interface?
-* Q6.2.2::     How do I change fonts in XEmacs on MS Windows?
-* Q6.2.3::     Where do I put my `.emacs' file?
+* Q6.2.1::      How will the port cope with differences in the Windows user interface?
+* Q6.2.2::      How do I change fonts in XEmacs on MS Windows?
+* Q6.2.3::      Where do I put my `.emacs' file?
 
 Miscellaneous:
 
 Miscellaneous:
-* Q6.3.1::     Will XEmacs rename all the win32-* symbols to w32-*?
-* Q6.3.2::     What are the differences between the various MS Windows emacsen?
-* Q6.3.3::     What is the porting team doing at the moment?
+* Q6.3.1::      Will XEmacs rename all the win32-* symbols to w32-*?
+* Q6.3.2::      What are the differences between the various MS Windows emacsen?
+* Q6.3.3::      What is the porting team doing at the moment?
 
 Current Events:
 
 
 Current Events:
 
@@ -860,7 +860,7 @@ for your convenience.
      integers are the same.  Byte code compiled under any version 19
      Emacs will have all such functions mapped to their `old-'
      equivalents when the byte code is read into XEmacs 20.  This is to
      integers are the same.  Byte code compiled under any version 19
      Emacs will have all such functions mapped to their `old-'
      equivalents when the byte code is read into XEmacs 20.  This is to
-     preserve compatibility - Emacs 19 converts all constant characters
+     preserve compatibility--Emacs 19 converts all constant characters
      to the equivalent integer during byte-compilation, and thus there
      is no other way to preserve byte-code compatibility even if the
      code has specifically been written with the distinction between
      to the equivalent integer during byte-compilation, and thus there
      is no other way to preserve byte-code compatibility even if the
      code has specifically been written with the distinction between
@@ -870,7 +870,7 @@ for your convenience.
      code".  For example, the character `A' is represented as the
      integer 65, following the standard ASCII representation of
      characters.  If XEmacs was not compiled with MULE support, the
      code".  For example, the character `A' is represented as the
      integer 65, following the standard ASCII representation of
      characters.  If XEmacs was not compiled with MULE support, the
-     range of this integer will always be 0 to 255 - eight bits, or one
+     range of this integer will always be 0 to 255--eight bits, or one
      byte. (Integers outside this range are accepted but silently
      truncated; however, you should most decidedly _not_ rely on this,
      because it will not work under XEmacs with MULE support.)  When
      byte. (Integers outside this range are accepted but silently
      truncated; however, you should most decidedly _not_ rely on this,
      because it will not work under XEmacs with MULE support.)  When
@@ -922,9 +922,9 @@ currently work.  The first release of XEmacs 20 will _not_ support it.
 However, menubar localization _does_ work, even in 19.14.  To enable
 it, add to your `Emacs' file entries like this:
 
 However, menubar localization _does_ work, even in 19.14.  To enable
 it, add to your `Emacs' file entries like this:
 
-     Emacs*XlwMenu.resourceLabels:                     True
-     Emacs*XlwMenu.file.labelString:                   Fichier
-     Emacs*XlwMenu.openInOtherWindow.labelString:      In anderem Fenster offnen
+     Emacs*XlwMenu.resourceLabels:                   True
+     Emacs*XlwMenu.file.labelString:                 Fichier
+     Emacs*XlwMenu.openInOtherWindow.labelString:    In anderem Fenster offnen
 
    The name of the resource is derived from the non-localized entry by
 removing punctuation and capitalizing as above.
 
    The name of the resource is derived from the non-localized entry by
 removing punctuation and capitalizing as above.
@@ -1013,12 +1013,12 @@ Q1.3.6: How do I portably code for MULE/XEmacs 20?
               (cond ((boundp 'MULE)
                      ;; for original Mule
                      )
               (cond ((boundp 'MULE)
                      ;; for original Mule
                      )
-                 ((string-match "XEmacs" emacs-version)
-                  ;; for XEmacs with Mule
-                  )
-                 (t
-                  ;; for next version of Emacs
-                  ))
+                    ((string-match "XEmacs" emacs-version)
+                     ;; for XEmacs with Mule
+                     )
+                    (t
+                     ;; for next version of Emacs
+                     ))
             ;; for old emacs variants
             )
 
             ;; for old emacs variants
             )
 
index a759c37..b07abd2 100644 (file)
@@ -3,7 +3,7 @@ xemacs-faq.texi.
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
-* FAQ: (xemacs-faq).           XEmacs FAQ.
+* FAQ: (xemacs-faq).            XEmacs FAQ.
 END-INFO-DIR-ENTRY
 
 \1f
 END-INFO-DIR-ENTRY
 
 \1f
@@ -30,75 +30,75 @@ still stands true.
 
      Now examine the space used by directory:
 
 
      Now examine the space used by directory:
 
-     0 /usr/local/bin/xemacs
-     2048      /usr/local/bin/xemacs-19.13
+     0       /usr/local/bin/xemacs
+     2048    /usr/local/bin/xemacs-19.13
      
      
-     1546      /usr/local/lib/xemacs-19.13/i486-miranova-sco3.2v4.2
-     1158      /usr/local/lib/xemacs-19.13/i486-unknown-linux1.2.13
+     1546    /usr/local/lib/xemacs-19.13/i486-miranova-sco3.2v4.2
+     1158    /usr/local/lib/xemacs-19.13/i486-unknown-linux1.2.13
 
      You need to keep these.  XEmacs isn't stripped by default in
      installation, you should consider stripping.  That will save you
      about 5MB right there.
 
 
      You need to keep these.  XEmacs isn't stripped by default in
      installation, you should consider stripping.  That will save you
      about 5MB right there.
 
-     207       /usr/local/lib/xemacs-19.13/etc/w3
-     122       /usr/local/lib/xemacs-19.13/etc/sounds
-     18        /usr/local/lib/xemacs-19.13/etc/sparcworks
-     159       /usr/local/lib/xemacs-19.13/etc/vm
-     6 /usr/local/lib/xemacs-19.13/etc/e
-     21        /usr/local/lib/xemacs-19.13/etc/eos
-     172       /usr/local/lib/xemacs-19.13/etc/toolbar
-     61        /usr/local/lib/xemacs-19.13/etc/ns
-     43        /usr/local/lib/xemacs-19.13/etc/gnus
+     207     /usr/local/lib/xemacs-19.13/etc/w3
+     122     /usr/local/lib/xemacs-19.13/etc/sounds
+     18      /usr/local/lib/xemacs-19.13/etc/sparcworks
+     159     /usr/local/lib/xemacs-19.13/etc/vm
+     6       /usr/local/lib/xemacs-19.13/etc/e
+     21      /usr/local/lib/xemacs-19.13/etc/eos
+     172     /usr/local/lib/xemacs-19.13/etc/toolbar
+     61      /usr/local/lib/xemacs-19.13/etc/ns
+     43      /usr/local/lib/xemacs-19.13/etc/gnus
 
      These are support directories for various packages.  In general
      they match a directory under
      ./xemacs-19.13/lib/xemacs-19.13/lisp/.  If you do not require the
      package, you may delete or gzip the support too.
 
 
      These are support directories for various packages.  In general
      they match a directory under
      ./xemacs-19.13/lib/xemacs-19.13/lisp/.  If you do not require the
      package, you may delete or gzip the support too.
 
-     1959      /usr/local/lib/xemacs-19.13/etc
-     175       /usr/local/lib/xemacs-19.13/lisp/bytecomp
-     340       /usr/local/lib/xemacs-19.13/lisp/calendar
-     342       /usr/local/lib/xemacs-19.13/lisp/comint
-     517       /usr/local/lib/xemacs-19.13/lisp/dired
-     42        /usr/local/lib/xemacs-19.13/lisp/electric
-     212       /usr/local/lib/xemacs-19.13/lisp/emulators
-     238       /usr/local/lib/xemacs-19.13/lisp/energize
-     289       /usr/local/lib/xemacs-19.13/lisp/gnus
-     457       /usr/local/lib/xemacs-19.13/lisp/ilisp
-     1439      /usr/local/lib/xemacs-19.13/lisp/modes
-     2276      /usr/local/lib/xemacs-19.13/lisp/packages
-     1040      /usr/local/lib/xemacs-19.13/lisp/prim
-     176       /usr/local/lib/xemacs-19.13/lisp/pcl-cvs
-     154       /usr/local/lib/xemacs-19.13/lisp/rmail
-     3 /usr/local/lib/xemacs-19.13/lisp/epoch
-     45        /usr/local/lib/xemacs-19.13/lisp/term
-     860       /usr/local/lib/xemacs-19.13/lisp/utils
-     851       /usr/local/lib/xemacs-19.13/lisp/vm
-     13        /usr/local/lib/xemacs-19.13/lisp/vms
-     157       /usr/local/lib/xemacs-19.13/lisp/x11
-     19        /usr/local/lib/xemacs-19.13/lisp/tooltalk
-     14        /usr/local/lib/xemacs-19.13/lisp/sunpro
-     291       /usr/local/lib/xemacs-19.13/lisp/games
-     198       /usr/local/lib/xemacs-19.13/lisp/edebug
-     619       /usr/local/lib/xemacs-19.13/lisp/w3
-     229       /usr/local/lib/xemacs-19.13/lisp/eos
-     55        /usr/local/lib/xemacs-19.13/lisp/iso
-     59        /usr/local/lib/xemacs-19.13/lisp/mailcrypt
-     187       /usr/local/lib/xemacs-19.13/lisp/eterm
-     356       /usr/local/lib/xemacs-19.13/lisp/ediff
-     408       /usr/local/lib/xemacs-19.13/lisp/hyperbole/kotl
-     1262      /usr/local/lib/xemacs-19.13/lisp/hyperbole
-     247       /usr/local/lib/xemacs-19.13/lisp/hm--html-menus
-     161       /usr/local/lib/xemacs-19.13/lisp/mh-e
-     299       /usr/local/lib/xemacs-19.13/lisp/viper
-     53        /usr/local/lib/xemacs-19.13/lisp/oobr/tree-x
-     4 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/DocWindow.nib
-     3 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/InfoPanel.nib
-     3 /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/TreeView.nib
-     11        /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj
-     53        /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx
-     466       /usr/local/lib/xemacs-19.13/lisp/oobr
-     14142     /usr/local/lib/xemacs-19.13/lisp
+     1959    /usr/local/lib/xemacs-19.13/etc
+     175     /usr/local/lib/xemacs-19.13/lisp/bytecomp
+     340     /usr/local/lib/xemacs-19.13/lisp/calendar
+     342     /usr/local/lib/xemacs-19.13/lisp/comint
+     517     /usr/local/lib/xemacs-19.13/lisp/dired
+     42      /usr/local/lib/xemacs-19.13/lisp/electric
+     212     /usr/local/lib/xemacs-19.13/lisp/emulators
+     238     /usr/local/lib/xemacs-19.13/lisp/energize
+     289     /usr/local/lib/xemacs-19.13/lisp/gnus
+     457     /usr/local/lib/xemacs-19.13/lisp/ilisp
+     1439    /usr/local/lib/xemacs-19.13/lisp/modes
+     2276    /usr/local/lib/xemacs-19.13/lisp/packages
+     1040    /usr/local/lib/xemacs-19.13/lisp/prim
+     176     /usr/local/lib/xemacs-19.13/lisp/pcl-cvs
+     154     /usr/local/lib/xemacs-19.13/lisp/rmail
+     3       /usr/local/lib/xemacs-19.13/lisp/epoch
+     45      /usr/local/lib/xemacs-19.13/lisp/term
+     860     /usr/local/lib/xemacs-19.13/lisp/utils
+     851     /usr/local/lib/xemacs-19.13/lisp/vm
+     13      /usr/local/lib/xemacs-19.13/lisp/vms
+     157     /usr/local/lib/xemacs-19.13/lisp/x11
+     19      /usr/local/lib/xemacs-19.13/lisp/tooltalk
+     14      /usr/local/lib/xemacs-19.13/lisp/sunpro
+     291     /usr/local/lib/xemacs-19.13/lisp/games
+     198     /usr/local/lib/xemacs-19.13/lisp/edebug
+     619     /usr/local/lib/xemacs-19.13/lisp/w3
+     229     /usr/local/lib/xemacs-19.13/lisp/eos
+     55      /usr/local/lib/xemacs-19.13/lisp/iso
+     59      /usr/local/lib/xemacs-19.13/lisp/mailcrypt
+     187     /usr/local/lib/xemacs-19.13/lisp/eterm
+     356     /usr/local/lib/xemacs-19.13/lisp/ediff
+     408     /usr/local/lib/xemacs-19.13/lisp/hyperbole/kotl
+     1262    /usr/local/lib/xemacs-19.13/lisp/hyperbole
+     247     /usr/local/lib/xemacs-19.13/lisp/hm--html-menus
+     161     /usr/local/lib/xemacs-19.13/lisp/mh-e
+     299     /usr/local/lib/xemacs-19.13/lisp/viper
+     53      /usr/local/lib/xemacs-19.13/lisp/oobr/tree-x
+     4       /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/DocWindow.nib
+     3       /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/InfoPanel.nib
+     3       /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/TreeView.nib
+     11      /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj
+     53      /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx
+     466     /usr/local/lib/xemacs-19.13/lisp/oobr
+     14142   /usr/local/lib/xemacs-19.13/lisp
 
      These are all Emacs Lisp source code and bytecompiled object code.
      You may safely gzip everything named *.el here.  You may remove
 
      These are all Emacs Lisp source code and bytecompiled object code.
      You may safely gzip everything named *.el here.  You may remove
@@ -124,13 +124,13 @@ still stands true.
      definitely do *not* want to delete, although certain packages can
      be removed from them if you do not use them.
 
      definitely do *not* want to delete, although certain packages can
      be removed from them if you do not use them.
 
-          1972 /usr/local/lib/xemacs-19.13/info
+          1972    /usr/local/lib/xemacs-19.13/info
 
      These are online texinfo sources.  You may either gzip them or
      remove them.  In either case, `C-h i' (info mode) will no longer
      work.
 
 
      These are online texinfo sources.  You may either gzip them or
      remove them.  In either case, `C-h i' (info mode) will no longer
      work.
 
-          20778        /usr/local/lib/xemacs-19.13
+          20778   /usr/local/lib/xemacs-19.13
 
      The 20MB achieved is less than half of what the full distribution
      takes up, *and* can be achieved without deleting a single file.
 
      The 20MB achieved is less than half of what the full distribution
      takes up, *and* can be achieved without deleting a single file.
@@ -270,7 +270,7 @@ ELF libraries are out of date.  You have the following options:
      `_h_errno^@' with `h_errno^@^@'.  Any version of Emacs will
      suffice.  If you don't understand how to do this, don't do it.
 
      `_h_errno^@' with `h_errno^@^@'.  Any version of Emacs will
      suffice.  If you don't understand how to do this, don't do it.
 
-  3. Rebuild XEmacs yourself - any working ELF version of libc should be
+  3. Rebuild XEmacs yourself--any working ELF version of libc should be
      O.K.
 
    Hrvoje Niksic <hniksic@xemacs.org> writes:
      O.K.
 
    Hrvoje Niksic <hniksic@xemacs.org> writes:
@@ -633,10 +633,10 @@ Q2.1.8: got (wrong-type-argument color-instance-p nil)
      color backgrounds and foregrounds into your
      `.../app-defaults/Emacs' like:
 
      color backgrounds and foregrounds into your
      `.../app-defaults/Emacs' like:
 
-          *Foreground: Black   ;everything will be of black on grey95,
-          *Background: Grey95  ;unless otherwise specified.
-          *cursorColor:        Red3    ;red3 cursor with grey95 border.
-          *pointerColor:       Red3    ;red3 pointer with grey95 border.
+          *Foreground:    Black   ;everything will be of black on grey95,
+          *Background:    Grey95  ;unless otherwise specified.
+          *cursorColor:   Red3    ;red3 cursor with grey95 border.
+          *pointerColor:  Red3    ;red3 pointer with grey95 border.
 
    Natalie Kershaw adds:
 
 
    Natalie Kershaw adds:
 
@@ -1250,28 +1250,3 @@ works fine!! How strange.
 
    Use `setq-default' instead, since `tab-width' is all-buffer-local.
 
 
    Use `setq-default' instead, since `tab-width' is all-buffer-local.
 
-\1f
-File: xemacs-faq.info,  Node: Q3.0.4,  Next: Q3.0.5,  Prev: Q3.0.3,  Up: Customization
-
-Q3.0.4: How can I add directories to the `load-path'?
------------------------------------------------------
-
-   Here are two ways to do that, one that puts your directories at the
-front of the load-path, the other at the end:
-
-     ;;; Add things at the beginning of the load-path, do not add
-     ;;; duplicate directories:
-     (pushnew "bar" load-path :test 'equal)
-     
-     (pushnew "foo" load-path :test 'equal)
-     
-     ;;; Add things at the end, unconditionally
-     (setq load-path (nconc load-path '("foo" "bar")))
-
-   keith (k.p.) hanlan <keithh@nortel.ca> writes:
-
-     To add directories using Unix shell metacharacters use
-     `expand-file-name' like this:
-
-          (push (expand-file-name "~keithh/.emacsdir") load-path)
-
index a64f7fc..10ff1ba 100644 (file)
@@ -33,25 +33,25 @@ translation approved by the author instead of in the original English.
 Indirect:
 xemacs.info-1: 1350
 xemacs.info-2: 47935
 Indirect:
 xemacs.info-1: 1350
 xemacs.info-2: 47935
-xemacs.info-3: 95892
-xemacs.info-4: 144418
-xemacs.info-5: 189682
-xemacs.info-6: 237752
-xemacs.info-7: 286779
-xemacs.info-8: 336120
-xemacs.info-9: 383861
-xemacs.info-10: 433167
-xemacs.info-11: 483000
-xemacs.info-12: 532860
-xemacs.info-13: 581970
-xemacs.info-14: 631330
-xemacs.info-15: 681149
-xemacs.info-16: 729643
-xemacs.info-17: 778293
-xemacs.info-18: 827922
-xemacs.info-19: 872280
-xemacs.info-20: 920951
-xemacs.info-21: 962858
+xemacs.info-3: 95913
+xemacs.info-4: 144439
+xemacs.info-5: 189703
+xemacs.info-6: 237773
+xemacs.info-7: 286800
+xemacs.info-8: 336141
+xemacs.info-9: 383895
+xemacs.info-10: 433201
+xemacs.info-11: 483034
+xemacs.info-12: 532929
+xemacs.info-13: 582109
+xemacs.info-14: 631472
+xemacs.info-15: 681291
+xemacs.info-16: 729785
+xemacs.info-17: 778484
+xemacs.info-18: 828140
+xemacs.info-19: 872498
+xemacs.info-20: 921169
+xemacs.info-21: 963076
 \1f
 Tag Table:
 (Indirect)
 \1f
 Tag Table:
 (Indirect)
@@ -71,337 +71,337 @@ Node: Key Sequences\7f59847
 Node: String Key Sequences\7f63187
 Node: Meta Key\7f63570
 Node: Super and Hyper Keys\7f65043
 Node: String Key Sequences\7f63187
 Node: Meta Key\7f63570
 Node: Super and Hyper Keys\7f65043
-Node: Character Representation\7f71267
-Node: Commands\7f72287
-Node: Pull-down Menus\7f75136
-Node: File Menu\7f78485
-Node: Edit Menu\7f82307
-Node: Apps Menu\7f84690
-Node: Options Menu\7f85180
-Node: Buffers Menu\7f89160
-Node: Tools Menu\7f89467
-Node: Help Menu\7f89958
-Node: Menu Customization\7f90359
-Node: Entering Emacs\7f94589
-Node: Exiting\7f95892
-Node: Command Switches\7f98983
-Node: Startup Paths\7f108170
-Node: Basic\7f115750
-Node: Blank Lines\7f125228
-Node: Continuation Lines\7f126654
-Node: Position Info\7f128086
-Node: Arguments\7f131219
-Node: Undo\7f134356
-Node: Minibuffer\7f137303
-Node: Minibuffer File\7f139913
-Node: Minibuffer Edit\7f141718
-Node: Completion\7f144418
-Node: Completion Example\7f146349
-Node: Completion Commands\7f147443
-Node: Strict Completion\7f150099
-Node: Completion Options\7f151880
-Node: Minibuffer History\7f153174
-Node: Repetition\7f156358
-Node: M-x\7f159191
-Node: Help\7f164285
-Node: Mark\7f174204
-Node: Setting Mark\7f176058
-Node: Using Region\7f179180
-Node: Marking Objects\7f179917
-Node: Mark Ring\7f181755
-Node: Mouse Selection\7f183471
-Node: Additional Mouse Operations\7f185478
-Node: Killing\7f189682
-Node: Yanking\7f195318
-Node: Kill Ring\7f196121
-Node: Appending Kills\7f197723
-Node: Earlier Kills\7f199760
-Node: Using X Selections\7f202373
-Node: X Clipboard Selection\7f203623
-Node: X Selection Commands\7f205800
-Node: X Cut Buffers\7f206886
-Node: Active Regions\7f208245
-Node: Accumulating Text\7f212825
-Node: Rectangles\7f215898
-Node: Registers\7f219417
-Node: RegPos\7f220871
-Node: RegText\7f222027
-Node: RegRect\7f223133
-Node: RegConfig\7f224012
-Node: RegNumbers\7f224952
-Node: RegFiles\7f225670
-Node: Bookmarks\7f226328
-Node: Display\7f229700
-Node: Scrolling\7f231195
-Node: Horizontal Scrolling\7f235338
-Node: Selective Display\7f236533
-Node: Display Vars\7f237752
-Node: Search\7f240430
-Node: Incremental Search\7f241623
-Node: Non-Incremental Search\7f250550
-Node: Word Search\7f251992
-Node: Regexp Search\7f253610
-Node: Regexps\7f255146
-Node: Search Case\7f265447
-Node: Replace\7f266228
-Node: Unconditional Replace\7f267176
-Node: Regexp Replace\7f268311
-Node: Replacement and Case\7f269246
-Node: Query Replace\7f270226
-Node: Other Repeating Search\7f273453
-Node: Fixit\7f274708
-Node: Kill Errors\7f275288
-Node: Transpose\7f276621
-Node: Fixing Case\7f279025
-Node: Spelling\7f279671
-Node: Files\7f281132
-Node: File Names\7f282442
-Node: Visiting\7f286779
-Node: Saving\7f293465
-Node: Backup\7f298388
-Node: Backup Names\7f299784
-Node: Backup Deletion\7f301267
-Node: Backup Copying\7f302426
-Node: Interlocking\7f304132
-Node: Reverting\7f308260
-Node: Auto Save\7f310172
-Node: Auto Save Files\7f311139
-Node: Auto Save Control\7f312980
-Node: Recover\7f314818
-Node: Version Control\7f315973
-Node: Concepts of VC\7f318011
-Node: Editing with VC\7f319621
-Node: Variables for Check-in/out\7f324877
-Node: Log Entries\7f326776
-Node: Change Logs and VC\7f327956
-Node: Old Versions\7f331223
-Node: VC Status\7f333226
-Node: Renaming and VC\7f334940
-Node: Snapshots\7f335619
-Node: Making Snapshots\7f336120
-Node: Snapshot Caveats\7f337413
-Node: Version Headers\7f339222
-Node: ListDir\7f341921
-Node: Comparing Files\7f343970
-Node: Dired\7f345503
-Node: Dired Enter\7f346174
-Node: Dired Edit\7f346999
-Node: Dired Deletion\7f348746
-Node: Dired Immed\7f351969
-Node: Misc File Ops\7f353245
-Node: Buffers\7f355733
-Node: Select Buffer\7f357891
-Node: List Buffers\7f359686
-Node: Misc Buffer\7f361431
-Node: Kill Buffer\7f363074
-Node: Several Buffers\7f364204
-Node: Windows\7f368070
-Node: Basic Window\7f368781
-Node: Split Window\7f370500
-Node: Other Window\7f372633
-Node: Pop Up Window\7f375062
-Node: Change Window\7f376567
-Node: Mule\7f379475
-Node: Mule Intro\7f380738
-Node: Language Environments\7f381754
-Node: Input Methods\7f383861
-Node: Select Input Method\7f387581
-Node: Coding Systems\7f389736
-Node: Recognize Coding\7f393922
-Node: Specify Coding\7f397248
-Node: Major Modes\7f402179
-Node: Choosing Modes\7f404398
-Node: Indentation\7f406788
-Node: Indentation Commands\7f408883
-Node: Tab Stops\7f411612
-Node: Just Spaces\7f413461
-Node: Text\7f414276
-Node: Text Mode\7f416259
-Node: Nroff Mode\7f418338
-Node: TeX Mode\7f419981
-Node: TeX Editing\7f422233
-Node: TeX Print\7f425667
-Node: Outline Mode\7f428886
-Node: Outline Format\7f430367
-Node: Outline Motion\7f433167
-Node: Outline Visibility\7f434720
-Node: Words\7f437641
-Node: Sentences\7f440588
-Node: Paragraphs\7f442784
-Node: Pages\7f445072
-Node: Filling\7f447672
-Node: Auto Fill\7f448243
-Node: Fill Commands\7f450390
-Node: Fill Prefix\7f452555
-Node: Case\7f454743
-Node: Programs\7f456771
-Node: Program Modes\7f459320
-Node: Lists\7f461552
-Node: Defuns\7f467392
-Node: Grinding\7f470045
-Node: Basic Indent\7f470673
-Node: Multi-line Indent\7f472694
-Node: Lisp Indent\7f474310
-Node: C Indent\7f477760
-Node: Matching\7f483000
-Node: Comments\7f484522
-Node: Balanced Editing\7f490974
-Node: Lisp Completion\7f491988
-Node: Documentation\7f493003
-Node: Change Log\7f494242
-Node: Tags\7f496820
-Node: Tag Syntax\7f498469
-Node: Create Tags Table\7f502413
-Node: Etags Regexps\7f506473
-Node: Select Tags Table\7f511131
-Node: Find Tag\7f514869
-Node: Tags Search\7f517833
-Node: List Tags\7f521289
-Node: Fortran\7f522318
-Node: Fortran Motion\7f523394
-Node: Fortran Indent\7f524214
-Node: ForIndent Commands\7f524899
-Node: ForIndent Num\7f526044
-Node: ForIndent Conv\7f527318
-Node: ForIndent Vars\7f528094
-Node: Fortran Comments\7f529262
-Node: Fortran Columns\7f532860
-Node: Fortran Abbrev\7f534283
-Node: Asm Mode\7f535192
-Node: Running\7f535744
-Node: Compilation\7f536714
-Node: Lisp Modes\7f541564
-Node: Lisp Libraries\7f542837
-Node: Loading\7f543391
-Node: Compiling Libraries\7f547851
-Node: Mocklisp\7f550742
-Node: Lisp Eval\7f551419
-Node: Lisp Debug\7f555059
-Node: Lisp Interaction\7f560484
-Node: External Lisp\7f561839
-Node: Packages\7f563913
-Node: Package Terminology\7f564654
-Node: Using Packages\7f566012
-Node: Building Packages\7f574801
-Node: Abbrevs\7f577323
-Node: Defining Abbrevs\7f579523
-Node: Expanding Abbrevs\7f581970
-Node: Editing Abbrevs\7f584672
-Node: Saving Abbrevs\7f586540
-Node: Dynamic Abbrevs\7f588480
-Node: Picture\7f589782
-Node: Basic Picture\7f592215
-Node: Insert in Picture\7f594500
-Node: Tabs in Picture\7f595922
-Node: Rectangles in Picture\7f597443
-Node: Sending Mail\7f599351
-Node: Mail Format\7f601062
-Node: Mail Headers\7f602412
-Node: Mail Mode\7f608822
-Node: Reading Mail\7f612435
-Node: Calendar/Diary\7f614010
-Node: Calendar Motion\7f615682
-Node: Calendar Unit Motion\7f616565
-Node: Move to Beginning or End\7f618888
-Node: Specified Dates\7f620021
-Node: Scroll Calendar\7f620909
-Node: Mark and Region\7f622700
-Node: General Calendar\7f624606
-Node: LaTeX Calendar\7f626214
-Node: Holidays\7f628228
-Node: Sunrise/Sunset\7f631330
-Node: Lunar Phases\7f634373
-Node: Other Calendars\7f635758
-Node: Calendar Systems\7f637245
-Node: To Other Calendar\7f640356
-Node: From Other Calendar\7f642347
-Node: Mayan Calendar\7f644652
-Node: Diary\7f647847
-Node: Diary Commands\7f649596
-Node: Format of Diary File\7f652902
-Node: Date Formats\7f655772
-Node: Adding to Diary\7f658346
-Node: Special Diary Entries\7f659977
-Node: Calendar Customization\7f665316
-Node: Calendar Customizing\7f666178
-Node: Holiday Customizing\7f669397
-Node: Date Display Format\7f675865
-Node: Time Display Format\7f676823
-Node: Daylight Savings\7f677961
-Node: Diary Customizing\7f681149
-Node: Hebrew/Islamic Entries\7f685770
-Node: Fancy Diary Display\7f689110
-Node: Included Diary Files\7f691007
-Node: Sexp Diary Entries\7f691988
-Node: Appt Customizing\7f697078
-Node: Sorting\7f698124
-Node: Shell\7f702930
-Node: Single Shell\7f704223
-Node: Interactive Shell\7f705822
-Node: Shell Mode\7f709587
-Node: Terminal emulator\7f712078
-Node: Term Mode\7f714387
-Node: Paging in Term\7f715301
-Node: Narrowing\7f716099
-Node: Hardcopy\7f718049
-Node: Recursive Edit\7f719021
-Node: Dissociated Press\7f722008
-Node: CONX\7f724571
-Node: Amusements\7f725595
-Node: Emulation\7f726075
-Node: Customization\7f727919
-Node: Minor Modes\7f729643
-Node: Variables\7f731275
-Node: Examining\7f733231
-Node: Easy Customization\7f734692
-Node: Customization Groups\7f735706
-Node: Changing an Option\7f738635
-Node: Face Customization\7f744891
-Node: Specific Customization\7f746655
-Node: Edit Options\7f749262
-Node: Locals\7f750846
-Node: File Variables\7f754025
-Node: Keyboard Macros\7f758551
-Node: Basic Kbd Macro\7f760722
-Node: Save Kbd Macro\7f762654
-Node: Kbd Macro Query\7f764323
-Node: Key Bindings\7f766265
-Node: Keymaps\7f767139
-Node: Rebinding\7f770989
-Node: Interactive Rebinding\7f771688
-Node: Programmatic Rebinding\7f773880
-Node: Key Bindings Using Strings\7f776687
-Node: Disabling\7f778293
-Node: Syntax\7f780065
-Node: Syntax Entry\7f780946
-Node: Syntax Change\7f785030
-Node: Init File\7f787199
-Node: Init Syntax\7f788704
-Node: Init Examples\7f791056
-Node: Terminal Init\7f795246
-Node: Audible Bell\7f796956
-Node: Faces\7f800387
-Node: X Resources\7f805224
-Node: Geometry Resources\7f806845
-Node: Iconic Resources\7f809293
-Node: Resource List\7f809765
-Node: Face Resources\7f816272
-Node: Widgets\7f819949
-Node: Menubar Resources\7f820888
-Node: Quitting\7f821821
-Node: Lossage\7f824799
-Node: Stuck Recursive\7f825443
-Node: Screen Garbled\7f826149
-Node: Text Garbled\7f827283
-Node: Unasked-for Search\7f827922
-Node: Emergency Escape\7f828707
-Node: Total Frustration\7f830486
-Node: Bugs\7f831117
-Node: Glossary\7f840651
-Node: Manifesto\7f872280
-Node: Key Index\7f895756
-Node: Command Index\7f920951
-Node: Variable Index\7f962858
-Node: Concept Index\7f978995
+Node: Character Representation\7f71288
+Node: Commands\7f72308
+Node: Pull-down Menus\7f75157
+Node: File Menu\7f78506
+Node: Edit Menu\7f82328
+Node: Apps Menu\7f84711
+Node: Options Menu\7f85201
+Node: Buffers Menu\7f89181
+Node: Tools Menu\7f89488
+Node: Help Menu\7f89979
+Node: Menu Customization\7f90380
+Node: Entering Emacs\7f94610
+Node: Exiting\7f95913
+Node: Command Switches\7f99004
+Node: Startup Paths\7f108191
+Node: Basic\7f115771
+Node: Blank Lines\7f125249
+Node: Continuation Lines\7f126675
+Node: Position Info\7f128107
+Node: Arguments\7f131240
+Node: Undo\7f134377
+Node: Minibuffer\7f137324
+Node: Minibuffer File\7f139934
+Node: Minibuffer Edit\7f141739
+Node: Completion\7f144439
+Node: Completion Example\7f146370
+Node: Completion Commands\7f147464
+Node: Strict Completion\7f150120
+Node: Completion Options\7f151901
+Node: Minibuffer History\7f153195
+Node: Repetition\7f156379
+Node: M-x\7f159212
+Node: Help\7f164306
+Node: Mark\7f174225
+Node: Setting Mark\7f176079
+Node: Using Region\7f179201
+Node: Marking Objects\7f179938
+Node: Mark Ring\7f181776
+Node: Mouse Selection\7f183492
+Node: Additional Mouse Operations\7f185499
+Node: Killing\7f189703
+Node: Yanking\7f195339
+Node: Kill Ring\7f196142
+Node: Appending Kills\7f197744
+Node: Earlier Kills\7f199781
+Node: Using X Selections\7f202394
+Node: X Clipboard Selection\7f203644
+Node: X Selection Commands\7f205821
+Node: X Cut Buffers\7f206907
+Node: Active Regions\7f208266
+Node: Accumulating Text\7f212846
+Node: Rectangles\7f215919
+Node: Registers\7f219438
+Node: RegPos\7f220892
+Node: RegText\7f222048
+Node: RegRect\7f223154
+Node: RegConfig\7f224033
+Node: RegNumbers\7f224973
+Node: RegFiles\7f225691
+Node: Bookmarks\7f226349
+Node: Display\7f229721
+Node: Scrolling\7f231216
+Node: Horizontal Scrolling\7f235359
+Node: Selective Display\7f236554
+Node: Display Vars\7f237773
+Node: Search\7f240451
+Node: Incremental Search\7f241644
+Node: Non-Incremental Search\7f250571
+Node: Word Search\7f252013
+Node: Regexp Search\7f253631
+Node: Regexps\7f255167
+Node: Search Case\7f265468
+Node: Replace\7f266249
+Node: Unconditional Replace\7f267197
+Node: Regexp Replace\7f268332
+Node: Replacement and Case\7f269267
+Node: Query Replace\7f270247
+Node: Other Repeating Search\7f273474
+Node: Fixit\7f274729
+Node: Kill Errors\7f275309
+Node: Transpose\7f276642
+Node: Fixing Case\7f279046
+Node: Spelling\7f279692
+Node: Files\7f281153
+Node: File Names\7f282463
+Node: Visiting\7f286800
+Node: Saving\7f293486
+Node: Backup\7f298409
+Node: Backup Names\7f299805
+Node: Backup Deletion\7f301288
+Node: Backup Copying\7f302447
+Node: Interlocking\7f304153
+Node: Reverting\7f308281
+Node: Auto Save\7f310193
+Node: Auto Save Files\7f311160
+Node: Auto Save Control\7f313001
+Node: Recover\7f314839
+Node: Version Control\7f315994
+Node: Concepts of VC\7f318032
+Node: Editing with VC\7f319642
+Node: Variables for Check-in/out\7f324898
+Node: Log Entries\7f326797
+Node: Change Logs and VC\7f327977
+Node: Old Versions\7f331244
+Node: VC Status\7f333247
+Node: Renaming and VC\7f334961
+Node: Snapshots\7f335640
+Node: Making Snapshots\7f336141
+Node: Snapshot Caveats\7f337434
+Node: Version Headers\7f339243
+Node: ListDir\7f341942
+Node: Comparing Files\7f343991
+Node: Dired\7f345524
+Node: Dired Enter\7f346195
+Node: Dired Edit\7f347020
+Node: Dired Deletion\7f348767
+Node: Dired Immed\7f351990
+Node: Misc File Ops\7f353266
+Node: Buffers\7f355754
+Node: Select Buffer\7f357912
+Node: List Buffers\7f359707
+Node: Misc Buffer\7f361465
+Node: Kill Buffer\7f363108
+Node: Several Buffers\7f364238
+Node: Windows\7f368104
+Node: Basic Window\7f368815
+Node: Split Window\7f370534
+Node: Other Window\7f372667
+Node: Pop Up Window\7f375096
+Node: Change Window\7f376601
+Node: Mule\7f379509
+Node: Mule Intro\7f380772
+Node: Language Environments\7f381788
+Node: Input Methods\7f383895
+Node: Select Input Method\7f387615
+Node: Coding Systems\7f389770
+Node: Recognize Coding\7f393956
+Node: Specify Coding\7f397282
+Node: Major Modes\7f402213
+Node: Choosing Modes\7f404432
+Node: Indentation\7f406822
+Node: Indentation Commands\7f408917
+Node: Tab Stops\7f411646
+Node: Just Spaces\7f413495
+Node: Text\7f414310
+Node: Text Mode\7f416293
+Node: Nroff Mode\7f418372
+Node: TeX Mode\7f420015
+Node: TeX Editing\7f422267
+Node: TeX Print\7f425701
+Node: Outline Mode\7f428920
+Node: Outline Format\7f430401
+Node: Outline Motion\7f433201
+Node: Outline Visibility\7f434754
+Node: Words\7f437675
+Node: Sentences\7f440622
+Node: Paragraphs\7f442818
+Node: Pages\7f445106
+Node: Filling\7f447706
+Node: Auto Fill\7f448277
+Node: Fill Commands\7f450424
+Node: Fill Prefix\7f452589
+Node: Case\7f454777
+Node: Programs\7f456805
+Node: Program Modes\7f459354
+Node: Lists\7f461586
+Node: Defuns\7f467426
+Node: Grinding\7f470079
+Node: Basic Indent\7f470707
+Node: Multi-line Indent\7f472728
+Node: Lisp Indent\7f474344
+Node: C Indent\7f477794
+Node: Matching\7f483034
+Node: Comments\7f484556
+Node: Balanced Editing\7f491008
+Node: Lisp Completion\7f492022
+Node: Documentation\7f493037
+Node: Change Log\7f494276
+Node: Tags\7f496854
+Node: Tag Syntax\7f498503
+Node: Create Tags Table\7f502447
+Node: Etags Regexps\7f506507
+Node: Select Tags Table\7f511165
+Node: Find Tag\7f514938
+Node: Tags Search\7f517902
+Node: List Tags\7f521358
+Node: Fortran\7f522387
+Node: Fortran Motion\7f523463
+Node: Fortran Indent\7f524283
+Node: ForIndent Commands\7f524968
+Node: ForIndent Num\7f526113
+Node: ForIndent Conv\7f527387
+Node: ForIndent Vars\7f528163
+Node: Fortran Comments\7f529331
+Node: Fortran Columns\7f532929
+Node: Fortran Abbrev\7f534352
+Node: Asm Mode\7f535261
+Node: Running\7f535813
+Node: Compilation\7f536783
+Node: Lisp Modes\7f541633
+Node: Lisp Libraries\7f542906
+Node: Loading\7f543460
+Node: Compiling Libraries\7f547920
+Node: Mocklisp\7f550811
+Node: Lisp Eval\7f551488
+Node: Lisp Debug\7f555128
+Node: Lisp Interaction\7f560553
+Node: External Lisp\7f561908
+Node: Packages\7f563982
+Node: Package Terminology\7f564723
+Node: Using Packages\7f566081
+Node: Building Packages\7f574940
+Node: Abbrevs\7f577462
+Node: Defining Abbrevs\7f579662
+Node: Expanding Abbrevs\7f582109
+Node: Editing Abbrevs\7f584811
+Node: Saving Abbrevs\7f586684
+Node: Dynamic Abbrevs\7f588624
+Node: Picture\7f589926
+Node: Basic Picture\7f592359
+Node: Insert in Picture\7f594644
+Node: Tabs in Picture\7f596066
+Node: Rectangles in Picture\7f597587
+Node: Sending Mail\7f599495
+Node: Mail Format\7f601206
+Node: Mail Headers\7f602556
+Node: Mail Mode\7f608964
+Node: Reading Mail\7f612577
+Node: Calendar/Diary\7f614152
+Node: Calendar Motion\7f615824
+Node: Calendar Unit Motion\7f616707
+Node: Move to Beginning or End\7f619030
+Node: Specified Dates\7f620163
+Node: Scroll Calendar\7f621051
+Node: Mark and Region\7f622842
+Node: General Calendar\7f624748
+Node: LaTeX Calendar\7f626356
+Node: Holidays\7f628370
+Node: Sunrise/Sunset\7f631472
+Node: Lunar Phases\7f634515
+Node: Other Calendars\7f635900
+Node: Calendar Systems\7f637387
+Node: To Other Calendar\7f640498
+Node: From Other Calendar\7f642489
+Node: Mayan Calendar\7f644794
+Node: Diary\7f647989
+Node: Diary Commands\7f649738
+Node: Format of Diary File\7f653044
+Node: Date Formats\7f655914
+Node: Adding to Diary\7f658488
+Node: Special Diary Entries\7f660119
+Node: Calendar Customization\7f665458
+Node: Calendar Customizing\7f666320
+Node: Holiday Customizing\7f669539
+Node: Date Display Format\7f676007
+Node: Time Display Format\7f676965
+Node: Daylight Savings\7f678103
+Node: Diary Customizing\7f681291
+Node: Hebrew/Islamic Entries\7f685912
+Node: Fancy Diary Display\7f689252
+Node: Included Diary Files\7f691149
+Node: Sexp Diary Entries\7f692130
+Node: Appt Customizing\7f697220
+Node: Sorting\7f698266
+Node: Shell\7f703072
+Node: Single Shell\7f704365
+Node: Interactive Shell\7f705964
+Node: Shell Mode\7f709729
+Node: Terminal emulator\7f712220
+Node: Term Mode\7f714529
+Node: Paging in Term\7f715443
+Node: Narrowing\7f716241
+Node: Hardcopy\7f718191
+Node: Recursive Edit\7f719163
+Node: Dissociated Press\7f722150
+Node: CONX\7f724713
+Node: Amusements\7f725737
+Node: Emulation\7f726217
+Node: Customization\7f728061
+Node: Minor Modes\7f729785
+Node: Variables\7f731417
+Node: Examining\7f733373
+Node: Easy Customization\7f734834
+Node: Customization Groups\7f735848
+Node: Changing an Option\7f738777
+Node: Face Customization\7f745033
+Node: Specific Customization\7f746797
+Node: Edit Options\7f749404
+Node: Locals\7f750988
+Node: File Variables\7f754167
+Node: Keyboard Macros\7f758721
+Node: Basic Kbd Macro\7f760892
+Node: Save Kbd Macro\7f762824
+Node: Kbd Macro Query\7f764493
+Node: Key Bindings\7f766435
+Node: Keymaps\7f767309
+Node: Rebinding\7f771159
+Node: Interactive Rebinding\7f771858
+Node: Programmatic Rebinding\7f774050
+Node: Key Bindings Using Strings\7f776857
+Node: Disabling\7f778484
+Node: Syntax\7f780256
+Node: Syntax Entry\7f781137
+Node: Syntax Change\7f785221
+Node: Init File\7f787390
+Node: Init Syntax\7f788895
+Node: Init Examples\7f791247
+Node: Terminal Init\7f795437
+Node: Audible Bell\7f797147
+Node: Faces\7f800578
+Node: X Resources\7f805415
+Node: Geometry Resources\7f807063
+Node: Iconic Resources\7f809511
+Node: Resource List\7f809983
+Node: Face Resources\7f816490
+Node: Widgets\7f820167
+Node: Menubar Resources\7f821106
+Node: Quitting\7f822039
+Node: Lossage\7f825017
+Node: Stuck Recursive\7f825661
+Node: Screen Garbled\7f826367
+Node: Text Garbled\7f827501
+Node: Unasked-for Search\7f828140
+Node: Emergency Escape\7f828925
+Node: Total Frustration\7f830704
+Node: Bugs\7f831335
+Node: Glossary\7f840869
+Node: Manifesto\7f872498
+Node: Key Index\7f895974
+Node: Command Index\7f921169
+Node: Variable Index\7f963076
+Node: Concept Index\7f979213
 \1f
 End Tag Table
 \1f
 End Tag Table
index 40909ac..8c5ccaa 100644 (file)
@@ -444,9 +444,9 @@ following:
 
    Create a file called `~/.xmodmap'.  In this file, place the lines
 
 
    Create a file called `~/.xmodmap'.  In this file, place the lines
 
-       remove Lock = Caps_Lock
-       keysym Caps_Lock = Super_L
-       add Mod2 = Super_L
+             remove Lock = Caps_Lock
+             keysym Caps_Lock = Super_L
+             add Mod2 = Super_L
 
    The first line says that the key that is currently called `Caps_Lock'
 should no longer behave as a "lock" key.  The second line says that
 
    The first line says that the key that is currently called `Caps_Lock'
 should no longer behave as a "lock" key.  The second line says that
index 6b90ddb..354d52c 100644 (file)
@@ -1,3 +1,24 @@
+2000-02-07  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.28 is released.
+
+2000-02-06  Martin Buchholz  <martin@xemacs.org>
+
+       * getopt.h:
+       * fakemail.c:
+       * gnuslib.c:
+       * sorted-doc.c:
+       * yow.c:
+       * cvtmail.c:
+       * movemail.c:
+       * gnuclient.c:
+       ANSIfy. Use coding standards for function definitions.
+       Make C++-compilable. Modified from patch by Zack Weinberg.
+
+2000-01-26  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * hexl.c: Removed MSDOS code; set binary I/O flags for NT.
+
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
index 6bdcaf1..7c689b8 100644 (file)
@@ -41,8 +41,8 @@ Boston, MA 02111-1307, USA.  */
 #include <string.h>
 #include <stdlib.h>
 
 #include <string.h>
 #include <stdlib.h>
 
-static void *xmalloc (unsigned int);
-static void *xrealloc (char *ptr, unsigned int);
+static void *xmalloc (size_t);
+static void *xrealloc (void *, size_t);
 static void skip_to_lf (FILE *stream);
 static void fatal (CONST char *s1, CONST char *s2);
 static void error (CONST char *s1, CONST char *s2);
 static void skip_to_lf (FILE *stream);
 static void fatal (CONST char *s1, CONST char *s2);
 static void error (CONST char *s1, CONST char *s2);
@@ -111,8 +111,7 @@ main (int argc, char *argv[])
 }
 
 static void
 }
 
 static void
-skip_to_lf (stream)
-     FILE *stream;
+skip_to_lf (FILE *stream)
 {
   register int c;
   while ((c = getc(stream)) != '\n')
 {
   register int c;
   while ((c = getc(stream)) != '\n')
@@ -120,21 +119,18 @@ skip_to_lf (stream)
 }
 
 static void *
 }
 
 static void *
-xmalloc (size)
-     unsigned size;
+xmalloc (size_t size)
 {
 {
-  char *result = (char *) malloc (size);
+  void *result = malloc (size);
   if (!result)
     fatal ("virtual memory exhausted", 0);
   return result;
 }
 
 static void *
   if (!result)
     fatal ("virtual memory exhausted", 0);
   return result;
 }
 
 static void *
-xrealloc (ptr, size)
-     char *ptr;
-     unsigned size;
+xrealloc (void *ptr, size_t size)
 {
 {
-  char *result = (char *) realloc (ptr, size);
+  void *result = realloc (ptr, size);
   if (!result)
     fatal ("virtual memory exhausted", 0);
   return result;
   if (!result)
     fatal ("virtual memory exhausted", 0);
   return result;
index 5168a11..c8bfb8c 100644 (file)
@@ -359,7 +359,7 @@ add_to_argv (CONST char *str)
       switch (sm)
         {
         case 0: /* Start of case - string leading whitespace */
       switch (sm)
         {
         case 0: /* Start of case - string leading whitespace */
-          if (isspace (*str))
+          if (isspace ((unsigned char) *str))
             str++;
           else
             {
             str++;
           else
             {
@@ -369,7 +369,7 @@ add_to_argv (CONST char *str)
           break;
 
         case 1: /* Non-whitespace character. Mark the start */
           break;
 
         case 1: /* Non-whitespace character. Mark the start */
-          if (isspace (*str))
+          if (isspace ((unsigned char) *str))
             {
               /* Reached the end of the argument. Add it. */
               int l = str-s;
             {
               /* Reached the end of the argument. Add it. */
               int l = str-s;
index 63ac5d5..8467c02 100644 (file)
@@ -116,7 +116,7 @@ typedef struct stream_record *stream_list;
 
 struct linebuffer
 {
 
 struct linebuffer
 {
-  long size;
+  size_t size;
   char *buffer;
 };
 
   char *buffer;
 };
 
@@ -190,20 +190,20 @@ fatal (CONST char *s1, CONST char *s2)
 
 /* Like malloc but get fatal error if memory is exhausted.  */
 
 
 /* Like malloc but get fatal error if memory is exhausted.  */
 
-static char *
+static void *
 xmalloc (size_t size)
 {
 xmalloc (size_t size)
 {
-  char *result = (char *) malloc (size);
-  if (result == ((char *) NULL))
+  void *result = malloc (size);
+  if (result == NULL)
     fatal ("virtual memory exhausted", (char *) 0);
   return result;
 }
 
     fatal ("virtual memory exhausted", (char *) 0);
   return result;
 }
 
-static char *
-xrealloc (char *ptr, size_t size)
+static void *
+xrealloc (void *ptr, size_t size)
 {
 {
-  char *result = realloc (ptr, ((unsigned) size));
-  if (result == ((char *) NULL))
+  void *result = realloc (ptr, size);
+  if (result == NULL)
     fatal ("virtual memory exhausted", (char *) 0);
   return result;
 }
     fatal ("virtual memory exhausted", (char *) 0);
   return result;
 }
@@ -214,7 +214,7 @@ static void
 init_linebuffer (struct linebuffer *linebuffer)
 {
   linebuffer->size = INITIAL_LINE_SIZE;
 init_linebuffer (struct linebuffer *linebuffer)
 {
   linebuffer->size = INITIAL_LINE_SIZE;
-  linebuffer->buffer = ((char *) xmalloc (INITIAL_LINE_SIZE));
+  linebuffer->buffer = (char *) xmalloc (INITIAL_LINE_SIZE);
 }
 
 /* Read a line of text from `stream' into `linebuffer'.
 }
 
 /* Read a line of text from `stream' into `linebuffer'.
@@ -234,8 +234,7 @@ readline (struct linebuffer *linebuffer, FILE *stream)
       if (p == end)
        {
          linebuffer->size *= 2;
       if (p == end)
        {
          linebuffer->size *= 2;
-         buffer = ((char *) xrealloc ((char *) buffer,
-                                      (size_t) (linebuffer->size)));
+         buffer = (char *) xrealloc (buffer, linebuffer->size);
          p = buffer + (p - linebuffer->buffer);
          end = buffer + linebuffer->size;
          linebuffer->buffer = buffer;
          p = buffer + (p - linebuffer->buffer);
          end = buffer + linebuffer->size;
          linebuffer->buffer = buffer;
@@ -279,7 +278,7 @@ static boolean
 has_keyword (char *field)
 {
   char *ignored;
 has_keyword (char *field)
 {
   char *ignored;
-  return (get_keyword (field, &ignored) != ((char *) NULL));
+  return (get_keyword (field, &ignored) != (char *) NULL);
 }
 
 static char *
 }
 
 static char *
@@ -400,7 +399,7 @@ open_a_file (char *name)
   if (the_stream != ((FILE *) NULL))
     {
       add_a_stream (the_stream, my_fclose);
   if (the_stream != ((FILE *) NULL))
     {
       add_a_stream (the_stream, my_fclose);
-      if (the_user == ((char *) NULL))
+      if (the_user == (char *) NULL)
        file_preface = make_file_preface ();
       write_line_list (file_preface, the_stream);
       return true;
        file_preface = make_file_preface ();
       write_line_list (file_preface, the_stream);
       return true;
@@ -645,8 +644,8 @@ main (int argc, char *argv[])
 
   my_name = MY_NAME;
   the_streams = ((stream_list) NULL);
 
   my_name = MY_NAME;
   the_streams = ((stream_list) NULL);
-  the_date = ((char *) NULL);
-  the_user = ((char *) NULL);
+  the_date = (char *) NULL;
+  the_user = (char *) NULL;
 
   the_header = read_header ();
   command_line = alloc_string ((size_t) (name_length +
 
   the_header = read_header ();
   command_line = alloc_string ((size_t) (name_length +
@@ -656,7 +655,7 @@ main (int argc, char *argv[])
 
   the_pipe = popen (command_line, "w");
   if (the_pipe == ((FILE *) NULL))
 
   the_pipe = popen (command_line, "w");
   if (the_pipe == ((FILE *) NULL))
-    fatal ("cannot open pipe to real mailer", (char *) 0);
+    fatal ("cannot open pipe to real mailer", (char *) NULL);
 
   add_a_stream (the_pipe, pclose);
 
 
   add_a_stream (the_pipe, pclose);
 
index 69256fd..d5ad6a3 100644 (file)
@@ -98,15 +98,14 @@ struct option
 #define required_argument      1
 #define optional_argument      2
 
 #define required_argument      1
 #define optional_argument      2
 
-#if defined (__STDC__) && __STDC__
-#ifdef __GNU_LIBRARY__
+#if defined (__GNU_LIBRARY__) || defined (__cplusplus)
 /* Many other libraries have conflicting prototypes for getopt, with
    differences in the consts, in stdlib.h.  To avoid compilation
    errors, only prototype getopt for the GNU C library.  */
 extern int getopt (int argc, char *const *argv, const char *shortopts);
 /* Many other libraries have conflicting prototypes for getopt, with
    differences in the consts, in stdlib.h.  To avoid compilation
    errors, only prototype getopt for the GNU C library.  */
 extern int getopt (int argc, char *const *argv, const char *shortopts);
-#else /* not __GNU_LIBRARY__ */
+#else /* not __GNU_LIBRARY__ || C++ */
 extern int getopt ();
 extern int getopt ();
-#endif /* __GNU_LIBRARY__ */
+#endif /* __GNU_LIBRARY__ || C++ */
 extern int getopt_long (int argc, char *const *argv, const char *shortopts,
                        const struct option *longopts, int *longind);
 extern int getopt_long_only (int argc, char *const *argv,
 extern int getopt_long (int argc, char *const *argv, const char *shortopts,
                        const struct option *longopts, int *longind);
 extern int getopt_long_only (int argc, char *const *argv,
@@ -118,13 +117,6 @@ extern int _getopt_internal (int argc, char *const *argv,
                             const char *shortopts,
                             const struct option *longopts, int *longind,
                             int long_only);
                             const char *shortopts,
                             const struct option *longopts, int *longind,
                             int long_only);
-#else /* not __STDC__ */
-extern int getopt ();
-extern int getopt_long ();
-extern int getopt_long_only ();
-
-extern int _getopt_internal ();
-#endif /* __STDC__ */
 
 #ifdef __cplusplus
 }
 
 #ifdef __cplusplus
 }
index 1902691..1954be4 100644 (file)
@@ -291,14 +291,14 @@ clean_string (CONST char *s)
   over = 1;                                                               \
 } while (0)
 
   over = 1;                                                               \
 } while (0)
 
-/* A strdup immitation. */
+/* A strdup imitation. */
 static char *
 my_strdup (CONST char *s)
 {
 static char *
 my_strdup (CONST char *s)
 {
-  char *new = malloc (strlen (s) + 1);
-  if (new)
-    strcpy (new, s);
-  return new;
+  char *new_s = (char *) malloc (strlen (s) + 1);
+  if (new_s)
+    strcpy (new_s, s);
+  return new_s;
 }
 
 int
 }
 
 int
@@ -660,7 +660,7 @@ main (int argc, char *argv[])
            }
          filename_expand (fullpath, argv[i]);
 #ifdef INTERNET_DOMAIN_SOCKETS
            }
          filename_expand (fullpath, argv[i]);
 #ifdef INTERNET_DOMAIN_SOCKETS
-         path = malloc (strlen (remotepath) + strlen (fullpath) + 1);
+         path = (char *) malloc (strlen (remotepath) + strlen (fullpath) + 1);
          sprintf (path, "%s%s", remotepath, fullpath);
 #else
          path = my_strdup (fullpath);
          sprintf (path, "%s%s", remotepath, fullpath);
 #else
          path = my_strdup (fullpath);
index 6b1364e..a1e74ab 100644 (file)
@@ -699,7 +699,7 @@ handle_internet_request (int ls)
 
   memset((char *)&peer,0,sizeof(struct sockaddr_in));
 
 
   memset((char *)&peer,0,sizeof(struct sockaddr_in));
 
-  if ((s = accept(ls,(struct sockaddr *)&peer, (void *) &addrlen)) == -1)
+  if ((s = accept(ls,(struct sockaddr *)&peer, &addrlen)) == -1)
     {
       perror(progname);
       fprintf(stderr,"%s: unable to accept\n",progname);
     {
       perror(progname);
       fprintf(stderr,"%s: unable to accept\n",progname);
@@ -819,7 +819,7 @@ handle_unix_request (int ls)
 
   server.sun_family = AF_UNIX;
 
 
   server.sun_family = AF_UNIX;
 
-  if ((s = accept(ls,(struct sockaddr *)&server, (void *)&len)) < 0)
+  if ((s = accept(ls,(struct sockaddr *)&server, &len)) < 0)
     {
       perror(progname);
       fprintf(stderr,"%s: unable to accept\n",progname);
     {
       perror(progname);
       fprintf(stderr,"%s: unable to accept\n",progname);
index a30f9f9..9022d48 100644 (file)
@@ -76,10 +76,8 @@ char *tmpdir = NULL;
 
 char *progname = NULL;
 
 
 char *progname = NULL;
 
-int make_connection(hostarg, portarg, s)
-     char *hostarg;
-     int portarg;
-     int *s;
+int
+make_connection (char *hostarg, int portarg, int *s)
 {
 #ifdef INTERNET_DOMAIN_SOCKETS
   char *ptr;
 {
 #ifdef INTERNET_DOMAIN_SOCKETS
   char *ptr;
@@ -130,7 +128,8 @@ int make_connection(hostarg, portarg, s)
   connect_to_ipc_server -- establish connection with server process via SYSV IPC
                           Returns msqid for server if successful.
 */
   connect_to_ipc_server -- establish connection with server process via SYSV IPC
                           Returns msqid for server if successful.
 */
-static int connect_to_ipc_server (void)
+static int
+connect_to_ipc_server (void)
 {
   int s;                       /* connected msqid */
   key_t key;                   /* message key */
 {
   int s;                       /* connected msqid */
   key_t key;                   /* message key */
@@ -160,10 +159,8 @@ static int connect_to_ipc_server (void)
   disconnect_from_ipc_server -- inform the server that sending has finished,
                                 and wait for its reply.
 */
   disconnect_from_ipc_server -- inform the server that sending has finished,
                                 and wait for its reply.
 */
-void disconnect_from_ipc_server(s,msgp,echo)
-     int s;
-     struct msgbuf *msgp;
-     int echo;
+void
+disconnect_from_ipc_server (int s, struct msgbuf *msgp, int echo)
 {
   int len;                     /* length of received message */
 
 {
   int len;                     /* length of received message */
 
@@ -196,9 +193,8 @@ void disconnect_from_ipc_server(s,msgp,echo)
 /*
   send_string -- send string to socket.
 */
 /*
   send_string -- send string to socket.
 */
-void send_string(s,msg)
-     int s;
-     CONST char *msg;
+void
+send_string (int s, CONST char *msg)
 {
 #if 0
   if (send(s,msg,strlen(msg),0) < 0) {
 {
 #if 0
   if (send(s,msg,strlen(msg),0) < 0) {
@@ -227,7 +223,8 @@ void send_string(s,msg)
 /*
   read_line -- read a \n terminated line from a socket
 */
 /*
   read_line -- read a \n terminated line from a socket
 */
-int read_line(int s, char *dest)
+int
+read_line (int s, char *dest)
 {
   int length;
   int offset=0;
 {
   int length;
   int offset=0;
@@ -252,7 +249,8 @@ int read_line(int s, char *dest)
                            domain socket. Returns socket descriptor for server
                            if successful.
 */
                            domain socket. Returns socket descriptor for server
                            if successful.
 */
-static int connect_to_unix_server (void)
+static int
+connect_to_unix_server (void)
 {
   int s;                       /* connected socket descriptor */
   struct sockaddr_un server;   /* for unix connections */
 {
   int s;                       /* connected socket descriptor */
   struct sockaddr_un server;   /* for unix connections */
@@ -286,8 +284,8 @@ static int connect_to_unix_server (void)
   internet_addr -- return the internet addr of the hostname or
                    internet address passed. Return -1 on error.
 */
   internet_addr -- return the internet addr of the hostname or
                    internet address passed. Return -1 on error.
 */
-int internet_addr(host)
-     char *host;
+int
+internet_addr (char *host)
 {
   struct hostent *hp;          /* pointer to host info for remote host */
   IN_ADDR numeric_addr;                /* host address */
 {
   struct hostent *hp;          /* pointer to host info for remote host */
   IN_ADDR numeric_addr;                /* host address */
@@ -314,7 +312,8 @@ static Xauth *server_xauth = NULL;
                                an internet domain socket. Returns socket
                                descriptor for server if successful.
 */
                                an internet domain socket. Returns socket
                                descriptor for server if successful.
 */
-static int connect_to_internet_server (char *serverhost, u_short port)
+static int
+connect_to_internet_server (char *serverhost, u_short port)
 {
   int s;                               /* connected socket descriptor */
   struct servent *sp;                  /* pointer to service information */
 {
   int s;                               /* connected socket descriptor */
   struct servent *sp;                  /* pointer to service information */
@@ -395,9 +394,8 @@ static int connect_to_internet_server (char *serverhost, u_short port)
   disconnect_from_server -- inform the server that sending has finished, and wait for
                             its reply.
 */
   disconnect_from_server -- inform the server that sending has finished, and wait for
                             its reply.
 */
-void disconnect_from_server(s,echo)
-     int s;
-     int echo;
+void
+disconnect_from_server (int s, int echo)
 {
 #if 0
   char buffer[REPLYSIZ+1];
 {
 #if 0
   char buffer[REPLYSIZ+1];
index 8d7f308..a6dddd9 100644 (file)
@@ -4,7 +4,8 @@
 
 #include <stdio.h>
 #include <ctype.h>
 
 #include <stdio.h>
 #include <ctype.h>
-#ifdef MSDOS
+#ifdef WINDOWSNT
+#include <io.h>
 #include <fcntl.h>
 #endif
 
 #include <fcntl.h>
 #endif
 
@@ -141,9 +142,8 @@ main (int argc, char *argv[])
        {
          char buf[18];
 
        {
          char buf[18];
 
-#ifdef MSDOS
-         (stdout)->_flag &= ~_IOTEXT; /* print binary */
-         _setmode (fileno (stdout), O_BINARY);
+#ifdef WINDOWSNT
+         _setmode (_fileno (stdout), O_BINARY);
 #endif
          for (;;)
            {
 #endif
          for (;;)
            {
@@ -185,9 +185,8 @@ main (int argc, char *argv[])
        }
       else
        {
        }
       else
        {
-#ifdef MSDOS
-         (fp)->_flag &= ~_IOTEXT; /* read binary */
-         _setmode (fileno (fp), O_BINARY);
+#ifdef WINDOWSNT
+         _setmode (_fileno (fp), O_BINARY);
 #endif
          address = 0;
          string[0] = ' ';
 #endif
          address = 0;
          string[0] = ' ';
index 930990e..cc55e8c 100644 (file)
@@ -915,7 +915,7 @@ scan_lisp_file (CONST char *filename, CONST char *mode)
              /* Skip until the first newline; remember the two previous chars. */
              while (c != '\n' && c >= 0)
                {
              /* Skip until the first newline; remember the two previous chars. */
              while (c != '\n' && c >= 0)
                {
-                 /* ### Kludge -- Ignore any ESC x x ISO2022 sequences */
+                 /* #### Kludge -- Ignore any ESC x x ISO2022 sequences */
                  if (c == 27)
                    {
                      getc (infile);
                  if (c == 27)
                    {
                      getc (infile);
index 21a050a..da47307 100644 (file)
@@ -223,7 +223,7 @@ Boston, MA 02111-1307, USA.  */
      "string" ... ;###translate
 
    where the magic token ";###translate" on a line means that the string 
      "string" ... ;###translate
 
    where the magic token ";###translate" on a line means that the string 
-   constant on this line should go into the message catalog.  This is analagous
+   constant on this line should go into the message catalog.  This is analogous
    to the magic ";###autoload" comments, and to the magic comments used in the
    EPSF structuring conventions.
 
    to the magic ";###autoload" comments, and to the magic comments used in the
    EPSF structuring conventions.
 
index 12f180a..941ada9 100644 (file)
@@ -150,7 +150,7 @@ static long *xmalloc (unsigned int);
 #ifdef MAIL_USE_POP
 static int popmail (char *, char *, char *);
 static int pop_retr (popserver server, int msgno,
 #ifdef MAIL_USE_POP
 static int popmail (char *, char *, char *);
 static int pop_retr (popserver server, int msgno,
-                    int (*action)(char *, FILE *), void *arg);
+                    int (*action)(char *, FILE *), FILE *arg);
 static int mbx_write (char *, FILE *);
 static int mbx_delimit_begin (FILE *);
 static int mbx_delimit_end (FILE *);
 static int mbx_write (char *, FILE *);
 static int mbx_delimit_begin (FILE *);
 static int mbx_delimit_end (FILE *);
@@ -771,7 +771,7 @@ popmail (char *user, char *outfile, char *password)
       return (1);
     }
 #if !defined(__CYGWIN32__) && !defined(WINDOWSNT)
       return (1);
     }
 #if !defined(__CYGWIN32__) && !defined(WINDOWSNT)
-  fchown (mbfi, getuid (), -1);
+  fchown (mbfi, getuid (), (gid_t) -1);
 #endif
 
   if ((mbf = fdopen (mbfi, "wb")) == NULL)
 #endif
 
   if ((mbf = fdopen (mbfi, "wb")) == NULL)
@@ -863,7 +863,7 @@ popmail (char *user, char *outfile, char *password)
 }
 
 static int
 }
 
 static int
-pop_retr (popserver server, int msgno, int (*action)(char *, FILE *), void *arg)
+pop_retr (popserver server, int msgno, int (*action)(char *, FILE *), FILE *arg)
 {
   char *line;
   int ret;
 {
   char *line;
   int ret;
index 4b82143..0b77c45 100644 (file)
 
 #include <stdio.h>
 #include <ctype.h>
 
 #include <stdio.h>
 #include <ctype.h>
-#if __STDC__ || defined(STDC_HEADERS)
-# include <stdlib.h> /* for qsort() and malloc() */
-# include <string.h>
-static void *xmalloc (int);
-# ifndef CONST
-#  define CONST const
-# endif
-#else
-extern char *malloc ();
-static void *xmalloc ();
-# ifndef CONST
-#  define CONST
-# endif
+#include <stdlib.h> /* for qsort() and malloc() */
+#include <string.h>
+static void *xmalloc (size_t);
+#ifndef CONST
+# define CONST const
 #endif
 
 #define NUL    '\0'
 #endif
 
 #define NUL    '\0'
@@ -31,9 +23,9 @@ static void *xmalloc ();
 
 #define DEBUG 0
 
 
 #define DEBUG 0
 
-typedef struct line LINE;
+typedef struct LINE LINE;
 
 
-struct line
+struct LINE
 {
   LINE *next;                  /* ptr to next or NULL */
   char *line;                  /* text of the line */
 {
   LINE *next;                  /* ptr to next or NULL */
   char *line;                  /* text of the line */
@@ -72,9 +64,9 @@ fatal (char *s1, char *s2)
 /* Like malloc but get fatal error if memory is exhausted.  */
 
 static void *
 /* Like malloc but get fatal error if memory is exhausted.  */
 
 static void *
-xmalloc (int size)
+xmalloc (size_t size)
 {
 {
-  char *result = malloc ((unsigned)size);
+  void *result = malloc (size);
   if (result == NULL)
     fatal ("%s", "virtual memory exhausted");
   return result;
   if (result == NULL)
     fatal ("%s", "virtual memory exhausted");
   return result;
@@ -83,9 +75,9 @@ xmalloc (int size)
 static char *
 strsav (char *str)
 {
 static char *
 strsav (char *str)
 {
-  char *buf = xmalloc (strlen (str) + 1);
-  (void) strcpy (buf, str);
-  return (buf);
+  char *buf = (char *) xmalloc (strlen (str) + 1);
+  strcpy (buf, str);
+  return buf;
 }
 
 /* Comparison function for qsort to call.  */
 }
 
 /* Comparison function for qsort to call.  */
index 79d4635..f5a7e1d 100644 (file)
@@ -91,8 +91,7 @@ static long header_len;
 
 /* Sets len and header_len */
 void
 
 /* Sets len and header_len */
 void
-setup_yow(fp)
-     FILE *fp;
+setup_yow (FILE *fp)
 {
   int c;
 
 {
   int c;
 
@@ -120,8 +119,7 @@ setup_yow(fp)
 
 /* go to a random place in the file and print the quotation there */
 void
 
 /* go to a random place in the file and print the quotation there */
 void
-yow (fp)
-     FILE *fp;
+yow (FILE *fp)
 {
   long offset;
   int c, i = 0;
 {
   long offset;
   int c, i = 0;
index 5af0a45..739317e 100644 (file)
@@ -1,3 +1,180 @@
+2000-02-07  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.28 is released.
+
+2000-02-07  Martin Buchholz  <martin@xemacs.org>
+
+       * cl-extra.el (getf): Just call `get', never `get*'.
+       Make arglist match docstring.
+       Fix bug: (getf nil t t) ==> Lisp nesting exceeds `max-lisp-eval-depth'
+       * cl-macs.el (get* compiler macro): Simply replace `get*' by `get'.
+       * byte-optimize.el: remove references to `get*'.
+
+2000-02-06  Martin Buchholz  <martin@xemacs.org>
+
+       * mule/european.el: Add syntax information for Latin3 and Latin4.
+
+2000-02-02  Martin Buchholz  <martin@xemacs.org>
+
+       * byte-optimize.el: Byte-optimize (length "foo")
+
+2000-02-03   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * window.el (shrink-window-if-larger-than-buffer): Rewrite full
+       width check using `window-leftmost-p' and `window-rightmost-p'.
+
+2000-02-02  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * wid-edit.el (widget-match-inline): An atom never matches a
+          list.  
+
+2000-01-29  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * modeline.el: Consolidated 'x and 'mswindows specification under
+       'win tag.
+
+2000-01-29  Andy Piper  <andy@xemacs.org>
+
+       * gutter-items.el: (format-buffers-tab-line): Try and be
+       intelligent about buffer naming when we have duplicates.
+
+2000-01-29  Andy Piper  <andy@xemacs.org>
+
+       * gutter-items.el (gutter-visible-p): Make sure the gutter gets
+       updated when it becomes visible.
+
+2000-01-26  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * bytecomp.el (byte-compile-insert-header): Properly set coding
+       system under MULE and file-coding.
+
+2000-01-28  Martin Buchholz  <martin@xemacs.org>
+
+       * coding.el (dontusethis-set-value-file-name-coding-system-handler): 
+       (dontusethis-set-value-terminal-coding-system-handler): 
+       (dontusethis-set-value-keyboard-coding-system-handler): 
+       Never undefine coding system aliases.  Emergency fix for gnus.
+
+2000-01-26  Hrvoje Niksic  <hniksic@iskon.hr>
+
+       * files.el (abbreviate-file-name): Use directory-sep-char instead
+       of hard-coded "/".
+
+2000-01-27  Hrvoje Niksic  <hniksic@iskon.hr>
+
+       * startup.el (user-init-file-base-list): New variable, replacing
+       user-init-file-base.
+       (find-user-init-file): New function.
+       (command-line-early): Use it.
+       (load-user-init-file): Ditto.
+
+2000-01-26  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * gutter-items.el (update-tab-in-gutter): Use proper locale when
+       calling valid-image-instantiator-format-p
+
+2000-01-26  Hrvoje Niksic  <hniksic@iskon.hr>
+
+       * isearch-mode.el (isearch-mode): The variable is
+       isearch-unhidden-extents, not isearch-opened-extents.
+
+2000-01-26  Hrvoje Niksic  <hniksic@iskon.hr>
+
+       * minibuf.el (next-history-element): Modify error message if a
+       default value is available.
+
+2000-01-26  Martin Buchholz  <martin@xemacs.org>
+
+       * bytecomp.el (byte-compile-file): Don't unconditionally write
+       .elc files in binary - might contain non-Latin1.
+
+2000-01-24  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * process.el (shell-quote-argument): Use (nt-quote-process-args)
+       for windows-nt.
+
+       * version.el: 
+       * startup.el (user-init-file-base): 
+       * process.el (call-process-region): 
+       * files.el (make-backup-file-name): 
+       (backup-file-name-p): 
+       (file-relative-name): 
+       (abbreviate-file-name): 
+       (set-auto-mode): 
+       * code-process.el (call-process-region): Removed unnecessary
+       branching on 'windows-nt and 'ms-dos system types. Phased 'ms-dos
+       support out of the universe.
+
+       * process.el:
+       * code-process.el: 
+       * bytecomp.el (byte-compile-file): Removed reference to
+       buffer-file-type, and commented usage of binary-process-output
+       NTEmacs variables.
+
+2000-01-24  Yoshiki Hayashi  <yoshiki@xemacs.org>
+
+       * help.el (function-arglist): Add case for macro.
+
+2000-01-22  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * cus-edit.el (custom-display): Removed "MS-DOS" and added Windows
+       printers.
+       (custom-display): Added a menu for printer/display tags.
+
+       * frame.el (frame-type):
+       * device.el (device-type): Added 'msprinter to the doc string, and
+       removed 'pc -- it is not going to be implemented ever.
+       (call-device-method): Fixed docstring typo.
+       Defined specifier tags 'printer and 'display.
+
+2000-01-22  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * lisp/itimer.el (itimer-run-expired-timers): (consp
+         last-command-event-time) instead of (consp
+         'last-command-event-time).
+
+2000-01-21  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * msw-glyphs.el: Removed obsolete commentary.
+
+2000-01-21  Hrvoje Niksic  <hniksic@iskon.hr>
+
+       * minibuf.el (read-file-name): Use abbreviate-file-name to produce
+       better default value.
+
+2000-01-21  Hrvoje Niksic  <hniksic@iskon.hr>
+
+       * minibuf.el (read-expression): Add a DEFAULT-VALUE argument.
+       (read-string): Ditto.
+       (eval-minibuffer): Ditto.
+       (read-command): Ditto.
+       (read-function): Ditto.
+       (read-variable): Ditto.
+       (read-number): Ditto.
+       (read-shell-command): Ditto.
+       (read-number): Record history.
+
+2000-01-20  Yoshiki Hayashi  <yoshiki@xemacs.org>
+
+       * etags.el (find-tag-tag): Use DEFAULT of completing-read.
+
+2000-01-20  Yoshiki Hayashi  <yoshiki@xemacs.org>
+
+       * faces.el (startup-initialize-custom-faces): New function.
+       Reset all faces created during auto-autoloads loading time
+       by defface.
+       * startup.el (command-line): Call it.
+
+2000-01-19  Yoshiki Hayashi  <yoshiki@xemacs.org>
+
+       * about.el (about-hackers): Add myself to contributors list.
+
+2000-01-12  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * menubar-items.el (maybe-add-init-button): Removed an argument in
+       a call to load-user-init-file, as the function managed to lose its
+       formal parameter a few betas ago.
+
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
@@ -4964,7 +5141,7 @@ Sat Apr 24 1998  Andy Piper  <andyp@parallax.co.uk>
        * frame.el (get-frame-for-buffer-default-instance-limit):
        defcustom it for options menu handling.
 
        * frame.el (get-frame-for-buffer-default-instance-limit):
        defcustom it for options menu handling.
 
-       * font-lock.el (font-lock-mode): defcustom and autolaod the variable
+       * font-lock.el (font-lock-mode): defcustom and autoload the variable
        font-lock-mode for options menu handling.
 
        * cus-start.el: added Custom properties to overwrite-mode for
        font-lock-mode for options menu handling.
 
        * cus-start.el: added Custom properties to overwrite-mode for
index fa41b5e..47f7768 100644 (file)
@@ -1358,6 +1358,7 @@ above.  We couldn't have done it without them.\n\n"
        (print-short "ChangGil Han" "cghan@phys401.phys.pusan.ac.kr")
        (print-short "Derek Harding" "dharding@lssec.bt.co.uk")
        (print-short "Michael Harnois" "mharnois@sbt.net")
        (print-short "ChangGil Han" "cghan@phys401.phys.pusan.ac.kr")
        (print-short "Derek Harding" "dharding@lssec.bt.co.uk")
        (print-short "Michael Harnois" "mharnois@sbt.net")
+       (print-short "Yoshiki Hayashi" "yoshiki@xemacs.org")
        (print-short "John Haxby" "J.Haxby@isode.com")
        (print-short "Karl M. Hegbloom" "karlheg@inetarena.com")
        (print-short "Benedikt Heinen" "beh@icemark.thenet.ch")
        (print-short "John Haxby" "J.Haxby@isode.com")
        (print-short "Karl M. Hegbloom" "karlheg@inetarena.com")
        (print-short "Benedikt Heinen" "beh@icemark.thenet.ch")
index ec7fdae..f061f67 100644 (file)
@@ -373,7 +373,7 @@ Hashed files are not understood, see `auto-save-hash-p'."
   ;; save file in the same directory as FILENAME.  But if this
   ;; directory is not writable, use auto-save-directory-fallback.
   ;; FILENAME is assumed to be in non-directory form (no trailing slash).
   ;; save file in the same directory as FILENAME.  But if this
   ;; directory is not writable, use auto-save-directory-fallback.
   ;; FILENAME is assumed to be in non-directory form (no trailing slash).
-  ;; It may be a name without a directory part (pesumably it really
+  ;; It may be a name without a directory part (presumably it really
   ;; comes from a buffer name then), the fallback is used then.
   ;; Optional PREFIX is string to use instead of "#" to prefix name.
   (let ((directory (file-name-directory filename)))
   ;; comes from a buffer name then), the fallback is used then.
   ;; Optional PREFIX is string to use instead of "#" to prefix name.
   (let ((directory (file-name-directory filename)))
index 4c57efb..6c4847e 100644 (file)
@@ -19,7 +19,7 @@
 ;; General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
 ;; 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 
+;; 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.
 
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
@@ -32,7 +32,7 @@
 ;; You can, however, make a faster pig."
 ;;
 ;; Or, to put it another way, the emacs byte compiler is a VW Bug.  This code
 ;; You can, however, make a faster pig."
 ;;
 ;; Or, to put it another way, the emacs byte compiler is a VW Bug.  This code
-;; makes it be a VW Bug with fuel injection and a turbocharger...  You're 
+;; makes it be a VW Bug with fuel injection and a turbocharger...  You're
 ;; still not going to make it go faster than 70 mph, but it might be easier
 ;; to get it there.
 ;;
 ;; still not going to make it go faster than 70 mph, but it might be easier
 ;; to get it there.
 ;;
 ;; Simple defsubsts often produce forms like
 ;;    (let ((v1 (f1)) (v2 (f2)) ...)
 ;;       (FN v1 v2 ...))
 ;; Simple defsubsts often produce forms like
 ;;    (let ((v1 (f1)) (v2 (f2)) ...)
 ;;       (FN v1 v2 ...))
-;; It would be nice if we could optimize this to 
+;; It would be nice if we could optimize this to
 ;;    (FN (f1) (f2) ...)
 ;; but we can't unless FN is dynamically-safe (it might be dynamically
 ;; referring to the bindings that the lambda arglist established.)
 ;; One of the uncountable lossages introduced by dynamic scope...
 ;;
 ;;    (FN (f1) (f2) ...)
 ;; but we can't unless FN is dynamically-safe (it might be dynamically
 ;; referring to the bindings that the lambda arglist established.)
 ;; One of the uncountable lossages introduced by dynamic scope...
 ;;
-;; Maybe there should be a control-structure that says "turn on 
+;; Maybe there should be a control-structure that says "turn on
 ;; fast-and-loose type-assumptive optimizations here."  Then when
 ;; we see a form like (car foo) we can from then on assume that
 ;; the variable foo is of type cons, and optimize based on that.
 ;; fast-and-loose type-assumptive optimizations here."  Then when
 ;; we see a form like (car foo) we can from then on assume that
 ;; the variable foo is of type cons, and optimize based on that.
-;; But, this won't win much because of (you guessed it) dynamic 
+;; But, this won't win much because of (you guessed it) dynamic
 ;; scope.  Anything down the stack could change the value.
 ;; (Another reason it doesn't work is that it is perfectly valid
 ;; to call car with a null argument.)  A better approach might
 ;; scope.  Anything down the stack could change the value.
 ;; (Another reason it doesn't work is that it is perfectly valid
 ;; to call car with a null argument.)  A better approach might
 ;;
 ;; However, if there was even a single let-binding around the COND,
 ;; it could not be byte-compiled, because there would be an "unbind"
 ;;
 ;; However, if there was even a single let-binding around the COND,
 ;; it could not be byte-compiled, because there would be an "unbind"
-;; byte-op between the final "call" and "return."  Adding a 
+;; byte-op between the final "call" and "return."  Adding a
 ;; Bunbind_all byteop would fix this.
 ;;
 ;;   (defun foo (x y z) ... (foo a b c))
 ;; Bunbind_all byteop would fix this.
 ;;
 ;;   (defun foo (x y z) ... (foo a b c))
 ;;
 ;; Wouldn't it be nice if Emacs Lisp had lexical scope.
 ;;
 ;;
 ;; Wouldn't it be nice if Emacs Lisp had lexical scope.
 ;;
-;; Idea: the form (lexical-scope) in a file means that the file may be 
-;; compiled lexically.  This proclamation is file-local.  Then, within 
+;; Idea: the form (lexical-scope) in a file means that the file may be
+;; compiled lexically.  This proclamation is file-local.  Then, within
 ;; that file, "let" would establish lexical bindings, and "let-dynamic"
 ;; would do things the old way.  (Or we could use CL "declare" forms.)
 ;; We'd have to notice defvars and defconsts, since those variables should
 ;; that file, "let" would establish lexical bindings, and "let-dynamic"
 ;; would do things the old way.  (Or we could use CL "declare" forms.)
 ;; We'd have to notice defvars and defconsts, since those variables should
 ;; in the file being compiled (doing a boundp check isn't good enough.)
 ;; Fdefvar() would have to be modified to add something to the plist.
 ;;
 ;; in the file being compiled (doing a boundp check isn't good enough.)
 ;; Fdefvar() would have to be modified to add something to the plist.
 ;;
-;; A major disadvantage of this scheme is that the interpreter and compiler 
-;; would have different semantics for files compiled with (dynamic-scope).  
+;; A major disadvantage of this scheme is that the interpreter and compiler
+;; would have different semantics for files compiled with (dynamic-scope).
 ;; Since this would be a file-local optimization, there would be no way to
 ;; Since this would be a file-local optimization, there would be no way to
-;; modify the interpreter to obey this (unless the loader was hacked 
+;; modify the interpreter to obey this (unless the loader was hacked
 ;; in some grody way, but that's a really bad idea.)
 ;;
 ;; HA!  RMS removed the following paragraph from his version of
 ;; byte-optimize.el.
 ;;
 ;; Really the Right Thing is to make lexical scope the default across
 ;; in some grody way, but that's a really bad idea.)
 ;;
 ;; HA!  RMS removed the following paragraph from his version of
 ;; byte-optimize.el.
 ;;
 ;; Really the Right Thing is to make lexical scope the default across
-;; the board, in the interpreter and compiler, and just FIX all of 
+;; the board, in the interpreter and compiler, and just FIX all of
 ;; the code that relies on dynamic scope of non-defvarred variables.
 
 ;; Other things to consider:
 ;; the code that relies on dynamic scope of non-defvarred variables.
 
 ;; Other things to consider:
 ;; error free also they may act as true-constants.
 
 ;;(disassemble #'(lambda (x) (and (point) (foo))))
 ;; error free also they may act as true-constants.
 
 ;;(disassemble #'(lambda (x) (and (point) (foo))))
-;; When 
+;; When
 ;;   - all but one arguments to a function are constant
 ;;   - the non-constant argument is an if-expression (cond-expression?)
 ;; then the outer function can be distributed.  If the guarding
 ;;   - all but one arguments to a function are constant
 ;;   - the non-constant argument is an if-expression (cond-expression?)
 ;; then the outer function can be distributed.  If the guarding
          (cons fn (cdr form)))))))
 
 ;;; ((lambda ...) ...)
          (cons fn (cdr form)))))))
 
 ;;; ((lambda ...) ...)
-;;; 
+;;;
 (defun byte-compile-unfold-lambda (form &optional name)
   (or name (setq name "anonymous lambda"))
   (let ((lambda (car form))
 (defun byte-compile-unfold-lambda (form &optional name)
   (or name (setq name "anonymous lambda"))
   (let ((lambda (car form))
                (byte-compile-warn
                 "attempt to open-code %s with too many arguments" name))
            form)
                (byte-compile-warn
                 "attempt to open-code %s with too many arguments" name))
            form)
-       (let ((newform 
+       (let ((newform
               (if bindings
                   (cons 'let (cons (nreverse bindings) body))
                 (cons 'progn body))))
               (if bindings
                   (cons 'let (cons (nreverse bindings) body))
                 (cons 'progn body))))
             (cons (byte-optimize-form (nth 1 form) t)
               (cons (byte-optimize-form (nth 2 form) for-effect)
                     (byte-optimize-body (cdr (cdr (cdr form))) t)))))
             (cons (byte-optimize-form (nth 1 form) t)
               (cons (byte-optimize-form (nth 2 form) for-effect)
                     (byte-optimize-body (cdr (cdr (cdr form))) t)))))
-         
+
          ((memq fn '(save-excursion save-restriction save-current-buffer))
           ;; those subrs which have an implicit progn; it's not quite good
           ;; enough to treat these like normal function calls.
           ;; This can turn (save-excursion ...) into (save-excursion) which
           ;; will be optimized away in the lap-optimize pass.
           (cons fn (byte-optimize-body (cdr form) for-effect)))
          ((memq fn '(save-excursion save-restriction save-current-buffer))
           ;; those subrs which have an implicit progn; it's not quite good
           ;; enough to treat these like normal function calls.
           ;; This can turn (save-excursion ...) into (save-excursion) which
           ;; will be optimized away in the lap-optimize pass.
           (cons fn (byte-optimize-body (cdr form) for-effect)))
-         
+
          ((eq fn 'with-output-to-temp-buffer)
           ;; this is just like the above, except for the first argument.
           (cons fn
             (cons
              (byte-optimize-form (nth 1 form) nil)
              (byte-optimize-body (cdr (cdr form)) for-effect))))
          ((eq fn 'with-output-to-temp-buffer)
           ;; this is just like the above, except for the first argument.
           (cons fn
             (cons
              (byte-optimize-form (nth 1 form) nil)
              (byte-optimize-body (cdr (cdr form)) for-effect))))
-         
+
          ((eq fn 'if)
           (cons fn
             (cons (byte-optimize-form (nth 1 form) nil)
               (cons
                (byte-optimize-form (nth 2 form) for-effect)
                (byte-optimize-body (nthcdr 3 form) for-effect)))))
          ((eq fn 'if)
           (cons fn
             (cons (byte-optimize-form (nth 1 form) nil)
               (cons
                (byte-optimize-form (nth 2 form) for-effect)
                (byte-optimize-body (nthcdr 3 form) for-effect)))))
-         
+
          ((memq fn '(and or))  ; remember, and/or are control structures.
           ;; take forms off the back until we can't any more.
           ;; In the future it could conceivably be a problem that the
          ((memq fn '(and or))  ; remember, and/or are control structures.
           ;; take forms off the back until we can't any more.
           ;; In the future it could conceivably be a problem that the
           (byte-compile-warn "misplaced interactive spec: %s"
                              (prin1-to-string form))
           nil)
           (byte-compile-warn "misplaced interactive spec: %s"
                              (prin1-to-string form))
           nil)
-         
+
          ((memq fn '(defun defmacro function
                      condition-case save-window-excursion))
           ;; These forms are compiled as constants or by breaking out
          ((memq fn '(defun defmacro function
                      condition-case save-window-excursion))
           ;; These forms are compiled as constants or by breaking out
           (cons fn
                 (cons (byte-optimize-form (nth 1 form) for-effect)
                       (cdr (cdr form)))))
           (cons fn
                 (cons (byte-optimize-form (nth 1 form) for-effect)
                       (cdr (cdr form)))))
-          
+
          ((eq fn 'catch)
           ;; the body of a catch is compiled (and thus optimized) as a
           ;; top-level form, so don't do it here.  The tag is never
          ((eq fn 'catch)
           ;; the body of a catch is compiled (and thus optimized) as a
           ;; top-level form, so don't do it here.  The tag is never
                    (setq form (macroexpand form
                                            byte-compile-macro-environment))))
           (byte-optimize-form form for-effect))
                    (setq form (macroexpand form
                                            byte-compile-macro-environment))))
           (byte-optimize-form form for-effect))
-         
+
          ((not (symbolp fn))
           (or (eq 'mocklisp (car-safe fn)) ; ha!
               (byte-compile-warn "%s is a malformed function"
          ((not (symbolp fn))
           (or (eq 'mocklisp (car-safe fn)) ; ha!
               (byte-compile-warn "%s is a malformed function"
           ;; appending a nil here might not be necessary, but it can't hurt.
           (byte-optimize-form
            (cons 'progn (append (cdr form) '(nil))) t))
           ;; appending a nil here might not be necessary, but it can't hurt.
           (byte-optimize-form
            (cons 'progn (append (cdr form) '(nil))) t))
-         
+
          (t
           ;; Otherwise, no args can be considered to be for-effect,
           ;; even if the called function is for-effect, because we
          (t
           ;; Otherwise, no args can be considered to be for-effect,
           ;; even if the called function is for-effect, because we
         ((keywordp ,form))))
 
 ;; If the function is being called with constant numeric args,
         ((keywordp ,form))))
 
 ;; If the function is being called with constant numeric args,
-;; evaluate as much as possible at compile-time.  This optimizer 
+;; evaluate as much as possible at compile-time.  This optimizer
 ;; assumes that the function is associative, like + or *.
 (defun byte-optimize-associative-math (form)
   (let ((args nil)
 ;; assumes that the function is associative, like + or *.
 (defun byte-optimize-associative-math (form)
   (let ((args nil)
                                (cons (/ (nth 1 form) last)
                                      (butlast (cdr (cdr form)))))
                     last nil))))
                                (cons (/ (nth 1 form) last)
                                      (butlast (cdr (cdr form)))))
                     last nil))))
-    (cond 
+    (cond
 ;;;      ((null (cdr (cdr form)))
 ;;;       (nth 1 form))
          ((eq (nth 1 form) 0)
 ;;;      ((null (cdr (cdr form)))
 ;;;       (nth 1 form))
          ((eq (nth 1 form) 0)
 (put 'stringp 'byte-optimizer 'byte-optimize-predicate)
 (put 'string< 'byte-optimizer 'byte-optimize-predicate)
 (put 'string-lessp 'byte-optimizer 'byte-optimize-predicate)
 (put 'stringp 'byte-optimizer 'byte-optimize-predicate)
 (put 'string< 'byte-optimizer 'byte-optimize-predicate)
 (put 'string-lessp 'byte-optimizer 'byte-optimize-predicate)
+(put 'length 'byte-optimizer 'byte-optimize-predicate)
 
 (put 'logand 'byte-optimizer 'byte-optimize-logmumble)
 (put 'logior 'byte-optimizer 'byte-optimize-logmumble)
 
 (put 'logand 'byte-optimizer 'byte-optimize-logmumble)
 (put 'logior 'byte-optimizer 'byte-optimize-logmumble)
 (put 'cdr-safe 'byte-optimizer 'byte-optimize-predicate)
 
 
 (put 'cdr-safe 'byte-optimizer 'byte-optimize-predicate)
 
 
-;; I'm not convinced that this is necessary.  Doesn't the optimizer loop 
+;; I'm not convinced that this is necessary.  Doesn't the optimizer loop
 ;; take care of this? - Jamie
 ;; I think this may some times be necessary to reduce eg. (quote 5) to 5,
 ;; so arithmetic optimizers recognize the numeric constant.  - Hallvard
 ;; take care of this? - Jamie
 ;; I think this may some times be necessary to reduce eg. (quote 5) to 5,
 ;; so arithmetic optimizers recognize the numeric constant.  - Hallvard
 ;; Remove any reason for avoiding `char-before'.
 (defun byte-optimize-char-before (form)
   `(char-after (1- ,(or (nth 1 form) '(point))) ,@(cdr (cdr form))))
 ;; Remove any reason for avoiding `char-before'.
 (defun byte-optimize-char-before (form)
   `(char-after (1- ,(or (nth 1 form) '(point))) ,@(cdr (cdr form))))
-     
+
 (put 'char-before 'byte-optimizer 'byte-optimize-char-before)
 
 ;; byte-compile-negation-optimizer lives in bytecomp.el
 (put 'char-before 'byte-optimizer 'byte-optimize-char-before)
 
 ;; byte-compile-negation-optimizer lives in bytecomp.el
        (setq form (list 'cdr form)))
       form)))
 \f
        (setq form (list 'cdr form)))
       form)))
 \f
-;;; enumerating those functions which need not be called if the returned 
+;;; enumerating those functions which need not be called if the returned
 ;;; value is not used.  That is, something like
 ;;;    (progn (list (something-with-side-effects) (yow))
 ;;;           (foo))
 ;;; value is not used.  That is, something like
 ;;;    (progn (list (something-with-side-effects) (yow))
 ;;;           (foo))
         length log log10 logand logb logior lognot logxor lsh
         marker-buffer max member memq min mod
         next-window nth nthcdr number-to-string
         length log log10 logand logb logior lognot logxor lsh
         marker-buffer max member memq min mod
         next-window nth nthcdr number-to-string
-        parse-colon-path previous-window
+        parse-colon-path plist-get previous-window
         radians-to-degrees rassq regexp-quote reverse round
         sin sqrt string< string= string-equal string-lessp string-to-char
         string-to-int string-to-number substring symbol-plist
         radians-to-degrees rassq regexp-quote reverse round
         sin sqrt string< string= string-equal string-lessp string-to-char
         string-to-int string-to-number substring symbol-plist
         abs expt signum last butlast ldiff
         pairlis gcd lcm
         isqrt floor* ceiling* truncate* round* mod* rem* subseq
         abs expt signum last butlast ldiff
         pairlis gcd lcm
         isqrt floor* ceiling* truncate* round* mod* rem* subseq
-        list-length get* getf
+        list-length getf
         ))
       (side-effect-and-error-free-fns
        '(arrayp atom
         ))
       (side-effect-and-error-free-fns
        '(arrayp atom
     byte-current-buffer byte-interactive-p))
 
 (defconst byte-compile-side-effect-free-ops
     byte-current-buffer byte-interactive-p))
 
 (defconst byte-compile-side-effect-free-ops
-  (nconc 
+  (nconc
    '(byte-varref byte-nth byte-memq byte-car byte-cdr byte-length byte-aref
      byte-symbol-value byte-get byte-concat2 byte-concat3 byte-sub1 byte-add1
      byte-eqlsign byte-gtr byte-lss byte-leq byte-geq byte-diff byte-negate
    '(byte-varref byte-nth byte-memq byte-car byte-cdr byte-length byte-aref
      byte-symbol-value byte-get byte-concat2 byte-concat3 byte-sub1 byte-add1
      byte-eqlsign byte-gtr byte-lss byte-leq byte-geq byte-diff byte-negate
 ;;;    varbind pop-up-windows
 ;;;    not
 ;;;
 ;;;    varbind pop-up-windows
 ;;;    not
 ;;;
-;;; we break the program, because it will appear that pop-up-windows and 
+;;; we break the program, because it will appear that pop-up-windows and
 ;;; old-pop-ups are not EQ when really they are.  So we have to know what
 ;;; the BOOL variables are, and not perform this optimization on them.
 ;;;
 ;;; old-pop-ups are not EQ when really they are.  So we have to know what
 ;;; the BOOL variables are, and not perform this optimization on them.
 ;;;
              ;; goto-X-if-non-nil goto-Y X:  -->  goto-Y-if-nil     X:
              ;;
              ;; it is wrong to do the same thing for the -else-pop variants.
              ;; goto-X-if-non-nil goto-Y X:  -->  goto-Y-if-nil     X:
              ;;
              ;; it is wrong to do the same thing for the -else-pop variants.
-             ;; 
+             ;;
              ((and (or (eq 'byte-goto-if-nil (car lap0))
                        (eq 'byte-goto-if-not-nil (car lap0)))  ; gotoX
                    (eq 'byte-goto (car lap1))                  ; gotoY
              ((and (or (eq 'byte-goto-if-nil (car lap0))
                        (eq 'byte-goto-if-not-nil (car lap0)))  ; gotoX
                    (eq 'byte-goto (car lap1))                  ; gotoY
                                   str (concat str " %s")
                                   i (1+ i))))
                 (if opt-p
                                   str (concat str " %s")
                                   i (1+ i))))
                 (if opt-p
-                    (let ((tagstr 
+                    (let ((tagstr
                            (if (eq 'TAG (car (car tmp)))
                                (format "%d:" (car (cdr (car tmp))))
                              (or (car tmp) ""))))
                            (if (eq 'TAG (car (car tmp)))
                                (format "%d:" (car (cdr (car tmp))))
                              (or (car tmp) ""))))
                                     (byte-goto-if-not-nil-else-pop .
                                      byte-goto-if-nil-else-pop))))
                        newtag)
                                     (byte-goto-if-not-nil-else-pop .
                                      byte-goto-if-nil-else-pop))))
                        newtag)
-                 
+
                  (nth 1 newtag)
                  )
                 (setcdr tmp (cons (setcdr lap0 newtag) (cdr tmp)))
                  (nth 1 newtag)
                  )
                 (setcdr tmp (cons (setcdr lap0 newtag) (cdr tmp)))
index 727ba8a..e3b7318 100644 (file)
@@ -1522,11 +1522,7 @@ With prefix arg (noninteractively: 2nd arg), load the file after compiling."
        (unless byte-compile-overwrite-file
          (ignore-file-errors (delete-file target-file)))
        (if (file-writable-p target-file)
        (unless byte-compile-overwrite-file
          (ignore-file-errors (delete-file target-file)))
        (if (file-writable-p target-file)
-           (progn
-             (when (memq system-type '(ms-dos windows-nt))
-               (defvar buffer-file-type)
-               (setq buffer-file-type t))
-             (write-region 1 (point-max) target-file))
+           (write-region 1 (point-max) target-file)
          ;; This is just to give a better error message than write-region
          (signal 'file-error
                  (list "Opening output file"
          ;; This is just to give a better error message than write-region
          (signal 'file-error
                  (list "Opening output file"
@@ -1749,16 +1745,17 @@ With argument, insert value in current buffer after the form."
   ;; extended characters are output properly and distinguished properly.
   ;; Otherwise, use `raw-text' for maximum portability with non-Mule
   ;; Emacsen.
   ;; extended characters are output properly and distinguished properly.
   ;; Otherwise, use `raw-text' for maximum portability with non-Mule
   ;; Emacsen.
-  (when (featurep 'mule)
+  (when (featurep '(or mule file-coding))
     (defvar buffer-file-coding-system)
     (defvar buffer-file-coding-system)
-    (if (save-excursion
-         (set-buffer byte-compile-inbuffer)
-         (goto-char (point-min))
-         ;; mrb- There must be a better way than skip-chars-forward
-         (skip-chars-forward (concat (char-to-string 0) "-"
-                                     (char-to-string 255)))
-         (eq (point) (point-max)))
-       (setq buffer-file-coding-system 'raw-text)
+    (if (or (featurep '(not mule)) ;; Don't scan buffer if we are not muleized
+           (save-excursion
+             (set-buffer byte-compile-inbuffer)
+             (goto-char (point-min))
+             ;; mrb- There must be a better way than skip-chars-forward
+             (skip-chars-forward (concat (char-to-string 0) "-"
+                                         (char-to-string 255)))
+             (eq (point) (point-max))))
+       (setq buffer-file-coding-system 'raw-text-unix)
       (insert "(require 'mule)\n;;;###coding system: escape-quoted\n")
       (setq buffer-file-coding-system 'escape-quoted)
       ;; #### Lazy loading not yet implemented for MULE files
       (insert "(require 'mule)\n;;;###coding system: escape-quoted\n")
       (setq buffer-file-coding-system 'escape-quoted)
       ;; #### Lazy loading not yet implemented for MULE files
@@ -1967,7 +1964,7 @@ list that represents a doc string reference.
               (while (if (setq form (cdr form))
                          (byte-compile-constp (car form))))
               (null form)))
               (while (if (setq form (cdr form))
                          (byte-compile-constp (car form))))
               (null form)))
-       ;; eval the macro autoload into the compilation enviroment
+       ;; eval the macro autoload into the compilation environment
        (eval form))
 
     (if name
        (eval form))
 
     (if name
index ea99b9d..cac76f9 100644 (file)
@@ -639,12 +639,11 @@ argument VECP, this copies vectors as well as conses."
 ;; XEmacs: our `get' groks DEFAULT.
 (defalias 'get* 'get)
 
 ;; XEmacs: our `get' groks DEFAULT.
 (defalias 'get* 'get)
 
-(defun getf (plist tag &optional def)
-  "Search PROPLIST for property PROPNAME; return its value or DEFAULT.
-PROPLIST is a list of the sort returned by `symbol-plist'."
+(defun getf (plist property &optional default)
+  "Search PLIST for property PROPERTY; return its value or DEFAULT.
+PLIST is a list of the sort returned by `symbol-plist'."
   (setplist '--cl-getf-symbol-- plist)
   (setplist '--cl-getf-symbol-- plist)
-  (or (get '--cl-getf-symbol-- tag)
-      (and def (get* '--cl-getf-symbol-- tag def))))
+  (get '--cl-getf-symbol-- property default))
 
 (defun cl-set-getf (plist tag val)
   (let ((p plist))
 
 (defun cl-set-getf (plist tag val)
   (let ((p plist))
index 04e2f97..744ecc6 100644 (file)
@@ -2744,10 +2744,8 @@ surrounded by (block NAME ...)."
       (setq form (list 'cons (car args) form)))
     form))
 
       (setq form (list 'cons (car args) form)))
     form))
 
-(define-compiler-macro get* (sym prop &optional def)
-  (if def
-      (list 'getf (list 'symbol-plist sym) prop def)
-    (list 'get sym prop)))
+(define-compiler-macro get* (sym prop &optional default)
+  (list 'get sym prop default))
 
 (define-compiler-macro typep (&whole form val type)
   (if (cl-const-expr-p type)
 
 (define-compiler-macro typep (&whole form val type)
   (if (cl-const-expr-p type)
@@ -2795,7 +2793,7 @@ surrounded by (block NAME ...)."
 ;                  abs expt signum last butlast ldiff
 ;                  pairlis gcd lcm
 ;                  isqrt floor* ceiling* truncate* round* mod* rem* subseq
 ;                  abs expt signum last butlast ldiff
 ;                  pairlis gcd lcm
 ;                  isqrt floor* ceiling* truncate* round* mod* rem* subseq
-;                  list-length get* getf))
+;                  list-length getf))
 ;  (put fun 'side-effect-free t))
 
 ;;; Things that are side-effect-and-error-free.  Moved to byte-optimize.el
 ;  (put fun 'side-effect-free t))
 
 ;;; Things that are side-effect-and-error-free.  Moved to byte-optimize.el
index 526639d..88902b1 100644 (file)
 
 ;;; Code:
 
 
 ;;; Code:
 
-(eval-when-compile
-  (defvar buffer-file-type)
-  (defvar binary-process-output))
-
 (defvar process-coding-system-alist nil
   "Alist to decide a coding system to use for a process I/O operation.
 The format is ((PATTERN . VAL) ...),
 (defvar process-coding-system-alist nil
   "Alist to decide a coding system to use for a process I/O operation.
 The format is ((PATTERN . VAL) ...),
@@ -112,8 +108,7 @@ If you quit, the process is first killed with SIGINT, then with SIGKILL if
 you quit again before the process exits."
   (let ((temp
         (make-temp-name
 you quit again before the process exits."
   (let ((temp
         (make-temp-name
-         (concat (file-name-as-directory (temp-directory))
-                 (if (memq system-type '(ms-dos windows-nt)) "em" "emacs")))))
+         (concat (file-name-as-directory (temp-directory)) "emacs"))))
     (unwind-protect
        (let (cs-r cs-w)
          (let (ret)
     (unwind-protect
        (let (cs-r cs-w)
          (let (ret)
@@ -137,10 +132,7 @@ you quit again before the process exits."
                 (or coding-system-for-read cs-r))
                (coding-system-for-write
                 (or coding-system-for-write cs-w)))
                 (or coding-system-for-read cs-r))
                (coding-system-for-write
                 (or coding-system-for-write cs-w)))
-           (if (memq system-type '(ms-dos windows-nt))
-               (let ((buffer-file-type binary-process-output))
-                 (write-region start end temp nil 'silent))
-             (write-region start end temp nil 'silent))
+           (write-region start end temp nil 'silent)
            (if deletep (delete-region start end))
            (apply #'call-process program temp buffer displayp args)))
       (ignore-file-errors (delete-file temp)))))
            (if deletep (delete-region start end))
            (apply #'call-process program temp buffer displayp args)))
       (ignore-file-errors (delete-file temp)))))
@@ -257,4 +249,4 @@ lost packets."
           (or coding-system-for-write cs-w)))
       (open-network-stream-internal name buffer host service protocol))))
 
           (or coding-system-for-write cs-w)))
       (open-network-stream-internal name buffer host service protocol))))
 
-;;; mule-process.el ends here
+;;; code-process.el ends here
index d47e0a3..96056d4 100644 (file)
@@ -21,7 +21,7 @@
 ;; General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
 ;; 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 
+;; 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.
 
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
@@ -182,9 +182,9 @@ Does not modify STR.  Returns the encoded string on successful conversion."
   "Return the base coding system of CODING-SYSTEM."
   (if (not (coding-system-eol-type coding-system))
       coding-system
   "Return the base coding system of CODING-SYSTEM."
   (if (not (coding-system-eol-type coding-system))
       coding-system
-    (find-coding-system 
+    (find-coding-system
      (intern
      (intern
-      (substring 
+      (substring
        (symbol-name (coding-system-name coding-system))
        0
        (string-match "-unix$\\|-dos$\\|-mac$"
        (symbol-name (coding-system-name coding-system))
        0
        (string-match "-unix$\\|-dos$\\|-mac$"
@@ -197,11 +197,41 @@ Does not modify STR.  Returns the encoded string on successful conversion."
  "Automatic conversion."
  '(mnemonic "Auto"))
 
  "Automatic conversion."
  '(mnemonic "Auto"))
 
-;; these are so that gnus and friends work when not mule
-(or (featurep 'mule)
-    (progn
-      (copy-coding-system 'undecided 'iso-8859-1)
-      (copy-coding-system 'undecided 'iso-8859-2)))
+;;; Make certain variables equivalent to coding-system aliases
+(defun dontusethis-set-value-file-name-coding-system-handler (sym args fun harg handlers)
+  (define-coding-system-alias 'file-name (or (car args) 'binary)))
+
+(dontusethis-set-symbol-value-handler
+ 'file-name-coding-system
+ 'set-value
+ 'dontusethis-set-value-file-name-coding-system-handler)
+
+(defun dontusethis-set-value-terminal-coding-system-handler (sym args fun harg handlers)
+  (define-coding-system-alias 'terminal (or (car args) 'binary)))
+
+(dontusethis-set-symbol-value-handler
+ 'terminal-coding-system
+ 'set-value
+ 'dontusethis-set-value-terminal-coding-system-handler)
+
+(defun dontusethis-set-value-keyboard-coding-system-handler (sym args fun harg handlers)
+  (define-coding-system-alias 'keyboard (or (car args) 'binary)))
+
+(dontusethis-set-symbol-value-handler
+ 'keyboard-coding-system
+ 'set-value
+ 'dontusethis-set-value-keyboard-coding-system-handler)
+
+(unless (boundp 'file-name-coding-system)
+  (setq file-name-coding-system nil))
+
+(when (not (featurep 'mule))
+  ;; these are so that gnus and friends work when not mule
+  (copy-coding-system 'undecided 'iso-8859-1)
+  (copy-coding-system 'undecided 'iso-8859-2)
+
+  (define-coding-system-alias 'ctext 'binary))
+
 
 ;; compatibility for old XEmacsen (don't use it)
 (copy-coding-system 'undecided 'automatic-conversion)
 
 ;; compatibility for old XEmacsen (don't use it)
 (copy-coding-system 'undecided 'automatic-conversion)
index 734725f..30b0c86 100644 (file)
@@ -399,7 +399,7 @@ This only has an effect when `custom-unlispify-tag-names' or
     (custom-unlispify-menu-entry symbol t)))
 
 (defun custom-prefix-add (symbol prefixes)
     (custom-unlispify-menu-entry symbol t)))
 
 (defun custom-prefix-add (symbol prefixes)
-  ;; Addd SYMBOL to list of ignored PREFIXES.
+  ;; Add SYMBOL to list of ignored PREFIXES.
   (cons (or (get symbol 'custom-prefix)
            (concat (symbol-name symbol) "-"))
        prefixes))
   (cons (or (get symbol 'custom-prefix)
            (concat (symbol-name symbol) "-"))
        prefixes))
@@ -1247,7 +1247,7 @@ item in another window.\n\n"))
 
 (defun custom-browse-insert-prefix (prefix)
   "Insert PREFIX.  On XEmacs convert it to line graphics."
 
 (defun custom-browse-insert-prefix (prefix)
   "Insert PREFIX.  On XEmacs convert it to line graphics."
-  ;; ### Unfinished.
+  ;; #### Unfinished.
   (if nil ; (string-match "XEmacs" emacs-version)
       (progn
        (insert "*")
   (if nil ; (string-match "XEmacs" emacs-version)
       (progn
        (insert "*")
@@ -1985,7 +1985,7 @@ Otherwise, look up symbol in `custom-guess-type-alist'."
        (widget-put widget :custom-magic magic)
        (push magic buttons))
       ;; Insert documentation.
        (widget-put widget :custom-magic magic)
        (push magic buttons))
       ;; Insert documentation.
-      ;; ### NOTE: this is ugly!!!! I need to do update the :buttons property
+      ;; #### NOTE: this is ugly!!!! I need to do update the :buttons property
       ;; before the call to `widget-default-format-handler'. Otherwise, I
       ;; loose my current `buttons'. This function shouldn't be called like
       ;; this anyway. The doc string widget should be added like the others.
       ;; before the call to `widget-default-format-handler'. Otherwise, I
       ;; loose my current `buttons'. This function shouldn't be called like
       ;; this anyway. The doc string widget should be added like the others.
@@ -2308,19 +2308,33 @@ OS/2 Presentation Manager")
                                           pm)
                                    (const :format "MSWindows "
                                           :sibling-args (:help-echo "\
                                           pm)
                                    (const :format "MSWindows "
                                           :sibling-args (:help-echo "\
-Windows NT/95/97")
+Microsoft Windows, displays")
                                           mswindows)
                                           mswindows)
-                                   (const :format "DOS "
+                                   (const :format "MSPrinter "
                                           :sibling-args (:help-echo "\
                                           :sibling-args (:help-echo "\
-Plain MS-DOS")
-                                          pc)
+Microsoft Windows, printers")
+                                          msprinter)
                                    (const :format "TTY%n"
                                           :sibling-args (:help-echo "\
 Plain text terminals")
                                           tty)))
                  (group :sibling-args (:help-echo "\
                                    (const :format "TTY%n"
                                           :sibling-args (:help-echo "\
 Plain text terminals")
                                           tty)))
                  (group :sibling-args (:help-echo "\
+Only match display or printer devices")
+                        (const :format "Output: "
+                               class)
+                        (checklist :inline t
+                                   :offset 0
+                                   (const :format "Display "
+                                          :sibling-args (:help-echo "\
+Match display devices")
+                                          display)
+                                   (const :format "Printer%n"
+                                          :sibling-args (:help-echo "\
+Match printer devices")
+                                          printer)))
+                 (group :sibling-args (:help-echo "\
 Only match the frames with the specified color support")
 Only match the frames with the specified color support")
-                        (const :format "Class: "
+                        (const :format "Color support: "
                                class)
                         (checklist :inline t
                                    :offset 0
                                class)
                         (checklist :inline t
                                    :offset 0
@@ -3279,7 +3293,7 @@ Leave point at the location of the call, or after the last expression."
                      (princ "\n '(")
                      (prin1 symbol)
                      (princ " ")
                      (princ "\n '(")
                      (prin1 symbol)
                      (princ " ")
-                     ;; This comment stuf is in the way ####
+                     ;; This comment stuff is in the way ####
                      ;; Is (eq (third spec) (car saved-value)) ????
                      ;; (prin1 (third spec))
                      (prin1 (car (get symbol 'saved-value)))
                      ;; Is (eq (third spec) (car saved-value)) ????
                      ;; (prin1 (third spec))
                      (prin1 (car (get symbol 'saved-value)))
index 316e925..fa7d2b1 100644 (file)
@@ -572,7 +572,7 @@ BODY is as with custom-theme-load-themes."
 (defun custom-theme-value (theme theme-spec-list)
   "Determine the value for THEME defined by THEME-SPEC-LIST.
 Returns (list value) if found. Nil otherwise."
 (defun custom-theme-value (theme theme-spec-list)
   "Determine the value for THEME defined by THEME-SPEC-LIST.
 Returns (list value) if found. Nil otherwise."
-  ;; Note we do _NOT_ singal an error if the theme is unkown
+  ;; Note we do _NOT_ signal an error if the theme is unknown
   ;; it might have gone away without the user knowing.
   (let ((theme-or-lower (memq theme (cons 'user custom-loaded-themes)))
         value)
   ;; it might have gone away without the user knowing.
   (let ((theme-or-lower (memq theme (cons 'user custom-loaded-themes)))
         value)
index 06bac1c..8468f33 100644 (file)
 
 ;;; Code:
 
 
 ;;; Code:
 
+;;; Initialization
+
+; Specifier tag 'printer which matches printers
+(define-specifier-tag 'printer (function device-printer-p))
+
+; Specifier tag 'display which matches displays
+(define-specifier-tag 'display (function
+                               (lambda (device)
+                                 (not (device-printer-p device)))))
+
+;;; Functions
+
 (defun device-list ()
   "Return a list of all devices."
   (apply 'nconc (mapcar 'console-device-list (console-list))))
 (defun device-list ()
   "Return a list of all devices."
   (apply 'nconc (mapcar 'console-device-list (console-list))))
@@ -41,8 +53,8 @@ This is equivalent to the type of the device's console.
 Value is `tty' for a tty device (a character-only terminal),
 `x' for a device that is a screen on an X display,
 `ns' for a device that is a NeXTstep connection (not yet implemented),
 Value is `tty' for a tty device (a character-only terminal),
 `x' for a device that is a screen on an X display,
 `ns' for a device that is a NeXTstep connection (not yet implemented),
-`mswindows' for a device that is a Windows or Windows NT connection,
-`pc' for a device that is a direct-write MS-DOS screen (not yet implemented),
+`mswindows' for a device that is a MS Windows workstation,
+`msprinter' for a device that is a MS Windows printer connection,
 `stream' for a stream device (which acts like a stdio stream), and
 `dead' for a deleted device."
   (or device (setq device (selected-device)))
 `stream' for a stream device (which acts like a stdio stream), and
 `dead' for a deleted device."
   (or device (setq device (selected-device)))
@@ -108,7 +120,7 @@ the toolbar, glyphs, etc."
 
 (defun call-device-method (name device &rest args)
   "Call a DEVICE-specific function with the generic name NAME.
 
 (defun call-device-method (name device &rest args)
   "Call a DEVICE-specific function with the generic name NAME.
-If DEVICE is not provide the selected device is used."
+If DEVICE is not provided then the selected device is used."
   (or device (setq device (selected-device)))
   (or (symbolp name) (error "function name must be a symbol"))
   (let ((devmeth (intern (concat (symbol-name 
   (or device (setq device (selected-device)))
   (or (symbolp name) (error "function name must be a symbol"))
   (let ((devmeth (intern (concat (symbol-name 
index d1f445b..9e95510 100644 (file)
@@ -32,7 +32,7 @@
        "events"
        "text-props"
        "process" ;; This is bad. network-streams may not be defined.
        "events"
        "text-props"
        "process" ;; This is bad. network-streams may not be defined.
-       (when-feature multicast "multicast") ; #+network-streams implicitely true
+       (when-feature multicast "multicast") ; #+network-streams implicitly true
        "frame"                 ; move up here cause some stuff needs it here
        "map-ynp"
        "simple"
        "frame"                 ; move up here cause some stuff needs it here
        "map-ynp"
        "simple"
index 906b51d..8059470 100644 (file)
@@ -24,7 +24,7 @@
 ;; 02111-1307, USA.
 
 ;;; Synched up with: Not synched with FSF but coordinated with the FSF
 ;; 02111-1307, USA.
 
 ;;; Synched up with: Not synched with FSF but coordinated with the FSF
-;;;                  easymenu maintor for compatability with FSF 20.4.
+;;;                  easymenu maintor for compatibility with FSF 20.4.
 ;;; Please: Coordinate changes with Inge Frick <inge@nada.kth.se>
 
 ;; Commentary:
 ;;; Please: Coordinate changes with Inge Frick <inge@nada.kth.se>
 
 ;; Commentary:
index f727c19..3414298 100644 (file)
@@ -598,11 +598,8 @@ Make it buffer-local in a mode hook.  The function is called with no
               (format "%s(default %s) " prompt default)
             prompt)
           tag-completion-table 'tag-completion-predicate nil nil
               (format "%s(default %s) " prompt default)
             prompt)
           tag-completion-table 'tag-completion-predicate nil nil
-          'find-tag-history))
-    (if (string-equal tag-name "")
-       ;; #### - This is a really LAME way of doing it!  --Stig
-       default                 ;indicate exact symbol match
-      tag-name)))
+          'find-tag-history default))
+    tag-name))
 
 (defvar last-tag-data nil
   "Information for continuing a tag search.
 
 (defvar last-tag-data nil
   "Information for continuing a tag search.
index 265ce26..4fa87b9 100644 (file)
@@ -1360,6 +1360,24 @@ If FRAME is nil or omitted, initialize them for all frames."
                 (get-custom-frame-properties frame))
     (initialize-custom-faces frame)))
 
                 (get-custom-frame-properties frame))
     (initialize-custom-faces frame)))
 
+(defun startup-initialize-custom-faces ()
+  "Reset faces created by defface.  Only called at startup.
+Don't use this function in your program."
+  (when default-custom-frame-properties
+    ;; Reset default value to the actual frame, not stream.
+    (setq default-custom-frame-properties
+         (extract-custom-frame-properties (selected-frame)))
+    ;; like initialize-custom-faces but removes property first.
+    (mapc (lambda (symbol)
+           (let ((spec (or (get symbol 'saved-face)
+                           (get symbol 'face-defface-spec))))
+             (when spec
+               ;; Reset faces created during auto-autoloads loading.
+               (reset-face symbol)
+               ;; And set it according to the spec.
+               (face-display-set symbol spec nil))))
+         (face-list))))
+
 \f
 (defun make-empty-face (name &optional doc-string temporary)
   "Like `make-face', but doesn't query the resource database."
 \f
 (defun make-empty-face (name &optional doc-string temporary)
   "Like `make-face', but doesn't query the resource database."
@@ -1521,7 +1539,7 @@ you want to add code to do stuff like this, use the create-device-hook."
   ;; It's unreasonable to expect to be able to make a font italic all
   ;; the time.  For many languages, italic is an alien concept.
   ;; Basically, because italic is not a globally meaningful concept,
   ;; It's unreasonable to expect to be able to make a font italic all
   ;; the time.  For many languages, italic is an alien concept.
   ;; Basically, because italic is not a globally meaningful concept,
-  ;; the use of the italic face should really be oboleted.
+  ;; the use of the italic face should really be obsoleted.
 
   ;; I disagree with above.  In many languages, the concept of capital
   ;; letters is just as alien, and yet we use them.  Italic is here to
 
   ;; I disagree with above.  In many languages, the concept of capital
   ;; letters is just as alien, and yet we use them.  Italic is here to
index f59d54f..2b8a77d 100644 (file)
@@ -794,29 +794,36 @@ If optional argument HACK-HOMEDIR is non-nil, then this also substitutes
          (setq tail (cdr tail))))
       (when hack-homedir
        ;; Compute and save the abbreviated homedir name.
          (setq tail (cdr tail))))
       (when hack-homedir
        ;; Compute and save the abbreviated homedir name.
-       ;; We defer computing this until the first time it's needed, to
-       ;; give time for directory-abbrev-alist to be set properly.
-       ;; We include a slash at the end, to avoid spurious matches
-       ;; such as `/usr/foobar' when the home dir is `/usr/foo'.
+       ;; We defer computing this until the first time it's needed,
+       ;; to give time for directory-abbrev-alist to be set properly.
+       ;; We include the separator at the end, to avoid spurious
+       ;; matches such as `/usr/foobar' when the home dir is
+       ;; `/usr/foo'.
        (or abbreviated-home-dir
            (setq abbreviated-home-dir
                  (let ((abbreviated-home-dir "$foo"))
        (or abbreviated-home-dir
            (setq abbreviated-home-dir
                  (let ((abbreviated-home-dir "$foo"))
-                   (concat "\\`" (regexp-quote (abbreviate-file-name
-                                                (expand-file-name "~")))
-                           "\\(/\\|\\'\\)"))))
+                   (concat "\\`"
+                           (regexp-quote
+                            (abbreviate-file-name (expand-file-name "~")))
+                           "\\("
+                           (regexp-quote (string directory-sep-char))
+                           "\\|\\'\\)"))))
        ;; If FILENAME starts with the abbreviated homedir,
        ;; make it start with `~' instead.
        (if (and (string-match abbreviated-home-dir filename)
                 ;; If the home dir is just /, don't change it.
        ;; If FILENAME starts with the abbreviated homedir,
        ;; make it start with `~' instead.
        (if (and (string-match abbreviated-home-dir filename)
                 ;; If the home dir is just /, don't change it.
-                (not (and (= (match-end 0) 1) ;#### unix-specific
-                          (= (aref filename 0) ?/)))
-                (not (and (memq system-type '(ms-dos windows-nt))
+                (not (and (= (match-end 0) 1)
+                          (= (aref filename 0) directory-sep-char)))
+                (not (and (eq system-type 'windows-nt)
                           (save-match-data
                           (save-match-data
-                            (string-match "^[a-zA-Z]:/$" filename)))))
+                            (string-match (concat "\\`[a-zA-Z]:"
+                                                  (regexp-quote
+                                                   (string directory-sep-char))
+                                                  "\\'")
+                                          filename)))))
            (setq filename
                  (concat "~"
            (setq filename
                  (concat "~"
-                         (substring filename
-                                    (match-beginning 1) (match-end 1))
+                         (match-string 1 filename)
                          (substring filename (match-end 0))))))
       filename)))
 
                          (substring filename (match-end 0))))))
       filename)))
 
@@ -1312,9 +1319,15 @@ and we don't even do that unless it would come from the file name."
             (setq keep-going nil)
             (let ((alist auto-mode-alist)
                   (mode nil))
             (setq keep-going nil)
             (let ((alist auto-mode-alist)
                   (mode nil))
+
               ;; Find first matching alist entry.
               ;; Find first matching alist entry.
+
+             ;; #### This is incorrect. In NT, case sensitivity is a volume
+             ;; property. For instance, NFS mounts *are* case sensitive.
+             ;; Need internal function (file-name-case-sensitive f), F
+             ;; being file or directory name. - kkm
              (let ((case-fold-search
              (let ((case-fold-search
-                    (memq system-type '(windows-nt))))
+                    (eq system-type 'windows-nt)))
                (while (and (not mode) alist)
                  (if (string-match (car (car alist)) name)
                      (if (and (consp (cdr (car alist)))
                (while (and (not mode) alist)
                  (if (string-match (car (car alist)) name)
                      (if (and (consp (cdr (car alist)))
@@ -1872,7 +1885,7 @@ of the new file to agree with the old modes."
                        (let ((delete-old-versions
                               ;; If have old versions to maybe delete,
                               ;; ask the user to confirm now, before doing anything.
                        (let ((delete-old-versions
                               ;; If have old versions to maybe delete,
                               ;; ask the user to confirm now, before doing anything.
-                              ;; But don't actually delete til later.
+                              ;; But don't actually delete till later.
                               (and targets
                                    (or (eq delete-old-versions t)
                                        (eq delete-old-versions nil))
                               (and targets
                                    (or (eq delete-old-versions t)
                                        (eq delete-old-versions nil))
@@ -1990,21 +2003,13 @@ the value is \"\"."
 (defun make-backup-file-name (file)
   "Create the non-numeric backup file name for FILE.
 This is a separate function so you can redefine it for customization."
 (defun make-backup-file-name (file)
   "Create the non-numeric backup file name for FILE.
 This is a separate function so you can redefine it for customization."
-  (if (eq system-type 'ms-dos)
-      (let ((fn (file-name-nondirectory file)))
-       (concat (file-name-directory file)
-               (if (string-match "\\([^.]*\\)\\(\\..*\\)?" fn)
-                   (substring fn 0 (match-end 1)))
-               ".bak"))
-    (concat file "~")))
+    (concat file "~"))
 
 (defun backup-file-name-p (file)
   "Return non-nil if FILE is a backup file name (numeric or not).
 This is a separate function so you can redefine it for customization.
 You may need to redefine `file-name-sans-versions' as well."
 
 (defun backup-file-name-p (file)
   "Return non-nil if FILE is a backup file name (numeric or not).
 This is a separate function so you can redefine it for customization.
 You may need to redefine `file-name-sans-versions' as well."
-  (if (eq system-type 'ms-dos)
-      (string-match "\\.bak\\'" file)
-      (string-match "~\\'" file)))
+  (string-match "~\\'" file))
 
 ;; This is used in various files.
 ;; The usage of bv-length is not very clean,
 
 ;; This is used in various files.
 ;; The usage of bv-length is not very clean,
@@ -2084,7 +2089,7 @@ then it returns FILENAME."
                       (expand-file-name (or directory default-directory))))
       ;; On Microsoft OSes, if FILENAME and DIRECTORY have different
       ;; drive names, they can't be relative, so return the absolute name.
                       (expand-file-name (or directory default-directory))))
       ;; On Microsoft OSes, if FILENAME and DIRECTORY have different
       ;; drive names, they can't be relative, so return the absolute name.
-      (if (and (memq system-type '(ms-dos windows-nt))
+      (if (and (eq system-type 'windows-nt)
               (not (string-equal (substring fname  0 2)
                                  (substring directory 0 2))))
          filename
               (not (string-equal (substring fname  0 2)
                                  (substring directory 0 2))))
          filename
@@ -2685,7 +2690,7 @@ non-nil, it is called instead of rereading visited file contents."
                                      file-name)))
             (run-hooks 'before-revert-hook)
             ;; If file was backed up but has changed since,
                                      file-name)))
             (run-hooks 'before-revert-hook)
             ;; If file was backed up but has changed since,
-            ;; we shd make another backup.
+            ;; we should make another backup.
             (and (not auto-save-p)
                  (not (verify-visited-file-modtime (current-buffer)))
                  (setq buffer-backed-up nil))
             (and (not auto-save-p)
                  (not (verify-visited-file-modtime (current-buffer)))
                  (setq buffer-backed-up nil))
@@ -3136,6 +3141,8 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
        (funcall handler 'insert-directory file switches
                 wildcard full-directory-p)
       (cond
        (funcall handler 'insert-directory file switches
                 wildcard full-directory-p)
       (cond
+       ;; #### mswindows-insert-directory should be called
+       ;; nt-insert-directory - kkm.
        ((and (fboundp 'mswindows-insert-directory)
             (eq system-type 'windows-nt))
        (mswindows-insert-directory file switches wildcard full-directory-p))
        ((and (fboundp 'mswindows-insert-directory)
             (eq system-type 'windows-nt))
        (mswindows-insert-directory file switches wildcard full-directory-p))
index 181bcc8..a1eafa1 100644 (file)
@@ -383,7 +383,7 @@ space does not end a sentence, so don't break a line there."
          (skip-chars-forward " \t")
          ;; Then change all newlines to spaces.
          ;;; 97/3/14 jhod: Kinsoku change
          (skip-chars-forward " \t")
          ;; Then change all newlines to spaces.
          ;;; 97/3/14 jhod: Kinsoku change
-         ;; Spacing is not necessary for charcters of no word-separater.
+         ;; Spacing is not necessary for characters of no word-separator.
          ;; The regexp word-across-newline is used for this check.
          (defvar word-across-newline)
          (if (not (and (featurep 'mule)
          ;; The regexp word-across-newline is used for this check.
          (defvar word-across-newline)
          (if (not (and (featurep 'mule)
index e22202f..aa46c4c 100644 (file)
@@ -42,7 +42,7 @@
 ;;; were always selectable, and selecting them would set the size to be the
 ;;; closest size to the current font's size.
 ;;;
 ;;; were always selectable, and selecting them would set the size to be the
 ;;; closest size to the current font's size.
 ;;;
-;;; This attempts to change all other faces in an analagous way to the change
+;;; This attempts to change all other faces in an analogous way to the change
 ;;; that was made to the default face; if it can't, it will skip over the face.
 ;;; However, this could leave incongruous font sizes around, which may cause
 ;;; some nonreversibility problems if further changes are made.  Perhaps it
 ;;; that was made to the default face; if it can't, it will skip over the face.
 ;;; However, this could leave incongruous font sizes around, which may cause
 ;;; some nonreversibility problems if further changes are made.  Perhaps it
index 1b98fe3..2e40d57 100644 (file)
@@ -571,8 +571,8 @@ This is equivalent to the type of the frame's device.
 Value is `tty' for a tty frame (a character-only terminal),
 `x' for a frame that is an X window,
 `ns' for a frame that is a NeXTstep window (not yet implemented),
 Value is `tty' for a tty frame (a character-only terminal),
 `x' for a frame that is an X window,
 `ns' for a frame that is a NeXTstep window (not yet implemented),
-`mswindows' for a frame that is a Windows NT or Windows 95/97 window,
-`pc' for a frame that is a direct-write MS-DOS frame (not yet implemented),
+`mswindows' for a frame that is a MS Windows desktop window,
+`msprinter' for a frame that is a MS Windows print job,
 `stream' for a stream frame (which acts like a stdio stream), and
 `dead' for a deleted frame."
   (or frame (setq frame (selected-frame)))
 `stream' for a stream frame (which acts like a stdio stream), and
 `dead' for a deleted frame."
   (or frame (setq frame (selected-frame)))
index 46b137f..7f50e18 100644 (file)
   "Input from the gutters."
   :group 'environment)
 
   "Input from the gutters."
   :group 'environment)
 
+(defvar gutter-buffers-tab nil
+  "A tab widget in the gutter for displaying buffers.
+Do not set this. Use `glyph-image-instance' and
+`set-image-instance-property' to change the properties of the tab.")
+
 (defcustom gutter-visible-p 
   (specifier-instance default-gutter-visible-p)
   "Whether the default gutter is globally visible. This option can be
 (defcustom gutter-visible-p 
   (specifier-instance default-gutter-visible-p)
   "Whether the default gutter is globally visible. This option can be
@@ -38,12 +43,8 @@ customized through the options menu."
   :type 'boolean
   :set #'(lambda (var val)
           (set-specifier default-gutter-visible-p val)
   :type 'boolean
   :set #'(lambda (var val)
           (set-specifier default-gutter-visible-p val)
-          (setq gutter-visible-p val)))
-
-(defvar gutter-buffers-tab nil
-  "A tab widget in the gutter for displaying buffers.
-Do not set this. Use `glyph-image-instance' and
-`set-image-instance-property' to change the properties of the tab.")
+          (setq gutter-visible-p val)
+          (when gutter-buffers-tab (update-tab-in-gutter))))
 
 (defcustom default-gutter-position
   (default-gutter-position)
 
 (defcustom default-gutter-position
   (default-gutter-position)
@@ -193,8 +194,12 @@ This just returns the buffer's name, optionally truncated."
   (let ((len (specifier-instance buffers-tab-default-buffer-line-length)))
     (if (and (> len 0)
             (> (length (buffer-name buffer)) len))
   (let ((len (specifier-instance buffers-tab-default-buffer-line-length)))
     (if (and (> len 0)
             (> (length (buffer-name buffer)) len))
-       (concat (substring (buffer-name buffer) 
-                          0 (- len 3)) "...")
+       (if (string-match ".*<.>$" (buffer-name buffer))
+           (concat (substring (buffer-name buffer) 
+                              0 (- len 6)) "..."
+                              (substring (buffer-name buffer) -3))
+         (concat (substring (buffer-name buffer)
+                            0 (- len 3)) "..."))
       (buffer-name buffer))))
 
 (defsubst build-buffers-tab-internal (buffers)
       (buffer-name buffer))))
 
 (defsubst build-buffers-tab-internal (buffers)
@@ -282,7 +287,7 @@ items by redefining the function `format-buffers-menu-line'."
                   (eq (default-gutter-position)
                       gutter-buffers-tab-orientation))
        (add-tab-to-gutter))
                   (eq (default-gutter-position)
                       gutter-buffers-tab-orientation))
        (add-tab-to-gutter))
-      (when (valid-image-instantiator-format-p 'tab-control)
+      (when (valid-image-instantiator-format-p 'tab-control locale)
        (let ((inst (glyph-image-instance 
                     gutter-buffers-tab
                     (when (framep frame-or-buffer)
        (let ((inst (glyph-image-instance 
                     gutter-buffers-tab
                     (when (framep frame-or-buffer)
@@ -335,7 +340,7 @@ This just removes the progress gauge and calls quit."
   (make-glyph
    (vector 'progress-gauge
           :pixel-height (- progress-glyph-height 8)
   (make-glyph
    (vector 'progress-gauge
           :pixel-height (- progress-glyph-height 8)
-          :pixel-width 250
+          :pixel-width 50
           :descriptor "Progress")))
 
 (defvar progress-text-glyph
           :descriptor "Progress")))
 
 (defvar progress-text-glyph
index 8651aab..e2a7a0d 100644 (file)
@@ -1018,24 +1018,27 @@ For example:
 
 This function is used by `describe-function-1' to list function
 arguments in the standard Lisp style."
 
 This function is used by `describe-function-1' to list function
 arguments in the standard Lisp style."
-  (let* ((fndef (indirect-function function))
+  (let* ((fnc (indirect-function function))
+        (fndef (if (eq (car-safe fnc) 'macro)
+                   (cdr fnc)
+                 fnc))
         (arglist
         (arglist
-        (cond ((compiled-function-p fndef)
-               (compiled-function-arglist fndef))
-              ((eq (car-safe fndef) 'lambda)
-               (nth 1 fndef))
-              ((subrp fndef)
-               (let* ((doc (documentation function))
-                      (args (and (string-match
-                                  "[\n\t ]*\narguments: ?(\\(.*\\))\n?\\'"
-                                  doc)
-                                 (match-string 1 doc))))
-                 ;; If there are no arguments documented for the
-                 ;; subr, rather don't print anything.
-                 (cond ((null args) t)
-                       ((equal args "") nil)
-                       (args))))
-              (t t))))
+         (cond ((compiled-function-p fndef)
+                (compiled-function-arglist fndef))
+               ((eq (car-safe fndef) 'lambda)
+                (nth 1 fndef))
+               ((subrp fndef)
+                (let* ((doc (documentation function))
+                       (args (and (string-match
+                                   "[\n\t ]*\narguments: ?(\\(.*\\))\n?\\'"
+                                   doc)
+                                  (match-string 1 doc))))
+                  ;; If there are no arguments documented for the
+                  ;; subr, rather don't print anything.
+                  (cond ((null args) t)
+                        ((equal args "") nil)
+                        (args))))
+               (t t))))
     (cond ((listp arglist)
           (prin1-to-string
            (cons function (mapcar (lambda (arg)
     (cond ((listp arglist)
           (prin1-to-string
            (cons function (mapcar (lambda (arg)
@@ -1423,7 +1426,7 @@ after the listing is made.)"
                (if cmd (princ " ")))))
          (terpri))))))
 
                (if cmd (princ " ")))))
          (terpri))))))
 
-;; Stop gap for 21.0 untill we do help-char etc properly.
+;; Stop gap for 21.0 until 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.
 (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.
index a9c4d34..7725839 100644 (file)
@@ -58,7 +58,7 @@
 ;; Massive changes by Christoph Wedler <wedler@fmi.uni-passau.de>
 ;; Some changes for XEmacs 20.3 by hniksic
 
 ;; Massive changes by Christoph Wedler <wedler@fmi.uni-passau.de>
 ;; Some changes for XEmacs 20.3 by hniksic
 
-;; ### The maintainer is supposed to be stig, but I haven't seen him
+;; #### The maintainer is supposed to be stig, but I haven't seen him
 ;; around for ages.  The real maintainer for the moment is Hrvoje
 ;; Niksic <hniksic@xemacs.org>.
 
 ;; around for ages.  The real maintainer for the moment is Hrvoje
 ;; Niksic <hniksic@xemacs.org>.
 
index d90df95..344adf4 100644 (file)
@@ -1684,7 +1684,7 @@ annotation for any node of any file.  (See `a' and `x' commands.)"
 
 ;; Return the node name in the buffer following point.
 ;; ALLOWEDCHARS, if non-nil, goes within [...] to make a regexp
 
 ;; Return the node name in the buffer following point.
 ;; ALLOWEDCHARS, if non-nil, goes within [...] to make a regexp
-;; saying which chas may appear in the node name.
+;; saying which chars may appear in the node name.
 (defun Info-following-node-name (&optional allowedchars)
   (skip-chars-forward " \t")
   (buffer-substring
 (defun Info-following-node-name (&optional allowedchars)
   (skip-chars-forward " \t")
   (buffer-substring
index 3eef6c9..9ad9c45 100644 (file)
@@ -533,7 +533,7 @@ is treated as a regexp.  See \\[isearch-forward] for more info."
          isearch-opoint (point)
          search-ring-yank-pointer nil
          regexp-search-ring-yank-pointer nil
          isearch-opoint (point)
          search-ring-yank-pointer nil
          regexp-search-ring-yank-pointer nil
-         isearch-opened-extents nil
+         isearch-unhidden-extents nil
          isearch-window-configuration (current-window-configuration)
 
          ;; #### What we really need is a buffer-local
          isearch-window-configuration (current-window-configuration)
 
          ;; #### What we really need is a buffer-local
@@ -1339,7 +1339,7 @@ If there is no completion possible, say so and continue searching."
 (defun isearch-top-state ()
   (let ((cmd (car isearch-cmds)))
     ;; #### Grr, this is so error-prone.  If you add something to
 (defun isearch-top-state ()
   (let ((cmd (car isearch-cmds)))
     ;; #### Grr, this is so error-prone.  If you add something to
-    ;; isearch-push-state, don't forget to update this.  I thout I'd
+    ;; isearch-push-state, don't forget to update this.  I thought I'd
     ;; make a list of variables, and just do (mapcar* #'set vars
     ;; values), but the (point) thing would spoil it, leaving to more
     ;; complication.
     ;; make a list of variables, and just do (mapcar* #'set vars
     ;; values), but the (point) thing would spoil it, leaving to more
     ;; complication.
@@ -1604,7 +1604,7 @@ If there is no completion possible, say so and continue searching."
 
 (defun isearch-make-extent (begin end)
   (let ((x (make-extent begin end (current-buffer))))
 
 (defun isearch-make-extent (begin end)
   (let ((x (make-extent begin end (current-buffer))))
-    ;; make the isearch extent always take prescedence over any mouse-
+    ;; make the isearch extent always take precedence over any mouse-
     ;; highlighted extents we may be passing through, since isearch, being
     ;; modal, is more interesting (there's nothing they could do with a
     ;; mouse-highlighted extent while in the midst of a search anyway).
     ;; highlighted extents we may be passing through, since isearch, being
     ;; modal, is more interesting (there's nothing they could do with a
     ;; mouse-highlighted extent while in the midst of a search anyway).
@@ -1914,7 +1914,7 @@ uppercase letters and `search-caps-disable-folding' is t."
 
           ;; It would be nice if we didn't have to do this; however,
           ;; window-start doesn't support a GUARANTEE flag, so we must
 
           ;; It would be nice if we didn't have to do this; however,
           ;; window-start doesn't support a GUARANTEE flag, so we must
-          ;; force redisplay to get the correct valye for start and end
+          ;; force redisplay to get the correct value for start and end
           ;; of window.
           (sit-for 0)
 
           ;; of window.
           (sit-for 0)
 
index 32f93ff..5c7a839 100644 (file)
@@ -48,7 +48,7 @@
 ;;
 ;; See the doc strings of these functions for more information.
 \f
 ;;
 ;; See the doc strings of these functions for more information.
 \f
-(defvar itimer-version "1.08"
+(defvar itimer-version "1.09"
   "Version number of the itimer package.")
 
 (defvar itimer-list nil
   "Version number of the itimer package.")
 
 (defvar itimer-list nil
@@ -673,7 +673,7 @@ x      start a new itimer
        (inhibit-quit t))
     (setq next-wakeup 600)
     (cond ((and (boundp 'last-command-event-time)
        (inhibit-quit t))
     (setq next-wakeup 600)
     (cond ((and (boundp 'last-command-event-time)
-               (consp 'last-command-event-time))
+               (consp last-command-event-time))
           (setq last-event-time last-command-event-time
                 idle-time (itimer-time-difference (current-time)
                                                   last-event-time)))
           (setq last-event-time last-command-event-time
                 idle-time (itimer-time-difference (current-time)
                                                   last-event-time)))
index f29dac8..6190d5e 100644 (file)
@@ -51,7 +51,7 @@
 (call-with-condition-handler 'really-early-error-handler
     #'(lambda ()
 
 (call-with-condition-handler 'really-early-error-handler
     #'(lambda ()
 
-       ;; Initializa Installation-string.  We do it before loading
+       ;; Initialize Installation-string.  We do it before loading
        ;; anything so that dumped code can make use of its value.
        (setq Installation-string
              (save-current-buffer
        ;; anything so that dumped code can make use of its value.
        (setq Installation-string
              (save-current-buffer
index 4439044..cab09aa 100644 (file)
        ["Update Package Index" package-get-update-base]
        ["List & Install" pui-list-packages]
        ["Update Installed Packages" package-get-update-all]
        ["Update Package Index" package-get-update-base]
        ["List & Install" pui-list-packages]
        ["Update Installed Packages" package-get-update-all]
-       ;; hack-o-matic, we can't force a laod of package-base here
+       ;; hack-o-matic, we can't force a load of package-base here
        ;; since it triggers dialog box interactions which we can't
        ;; since it triggers dialog box interactions which we can't
-       ;; deal while using a menu
+       ;; deal with while using a menu
        ("Using Custom" 
        :filter (lambda (&rest junk)
                  (if package-get-base
        ("Using Custom" 
        :filter (lambda (&rest junk)
                  (if package-get-base
        ["Color Printing"
        (cond (ps-print-color-p
               (customize-set-variable 'ps-print-color-p nil)
        ["Color Printing"
        (cond (ps-print-color-p
               (customize-set-variable 'ps-print-color-p nil)
-              ;; I'm wondering whether all this muck is usefull.
+              ;; I'm wondering whether all this muck is useful.
               (and (boundp 'original-face-background)
                    original-face-background
                    (set-face-background 'default original-face-background)))
               (and (boundp 'original-face-background)
                    original-face-background
                    (set-face-background 'default original-face-background)))
@@ -995,7 +995,7 @@ Adds `Load .emacs' button to menubar when starting up with -q."
     (add-menu-button nil
                     ["Load .emacs"
                      (progn (delete-menu-item '("Load .emacs"))
     (add-menu-button nil
                     ["Load .emacs"
                      (progn (delete-menu-item '("Load .emacs"))
-                            (load-user-init-file (user-login-name)))
+                            (load-user-init-file))
                      ]
                     "Help"))
    (t nil)))
                      ]
                     "Help"))
    (t nil)))
@@ -1252,10 +1252,10 @@ This groups buffers by major mode.  It only really makes sense if
                                   (list 'buffer-menu-write-file name) t)
                           (vector "Delete Buffer" (list 'kill-buffer name)
                                   t)))
                                   (list 'buffer-menu-write-file name) t)
                           (vector "Delete Buffer" (list 'kill-buffer name)
                                   t)))
-            ;; ### We don't want buffer names to be translated,
-            ;; ### so we put the buffer name in the suffix.
-            ;; ### Also, avoid losing with non-ASCII buffer names.
-            ;; ### We still lose, however, if complex-buffers-menu-p. --mrb
+            ;; #### We don't want buffer names to be translated,
+            ;; #### so we put the buffer name in the suffix.
+            ;; #### Also, avoid losing with non-ASCII buffer names.
+            ;; #### We still lose, however, if complex-buffers-menu-p. --mrb
             (vector ""
                     (list buffers-menu-switch-to-buffer-function
                           (buffer-name buffer))
             (vector ""
                     (list buffers-menu-switch-to-buffer-function
                           (buffer-name buffer))
@@ -1416,7 +1416,7 @@ See the function `popup-menu' for a description of menu syntax.")
 (make-variable-buffer-local 'mode-popup-menu)
 
 ;; In an effort to avoid massive menu clutter, this mostly worthless menu is
 (make-variable-buffer-local 'mode-popup-menu)
 
 ;; In an effort to avoid massive menu clutter, this mostly worthless menu is
-;; superceded by any local popup menu...
+;; superseded by any local popup menu...
 (setq-default mode-popup-menu default-popup-menu)
 
 (defvar activate-popup-menu-hook nil
 (setq-default mode-popup-menu default-popup-menu)
 
 (defvar activate-popup-menu-hook nil
index af83e9c..c997510 100644 (file)
@@ -1326,7 +1326,10 @@ If N is negative, find the previous or Nth previous match."
     (let ((narg (- minibuffer-history-position n))
          (minimum (if minibuffer-default -1 0)))
       (cond ((< narg minimum)
     (let ((narg (- minibuffer-history-position n))
          (minimum (if minibuffer-default -1 0)))
       (cond ((< narg minimum)
-            (error "No following item in %s" minibuffer-history-variable))
+            (error (if minibuffer-default
+                       "No following item in %s"
+                     "No following item in %s; no default available")
+                   minibuffer-history-variable))
            ((> narg (length (symbol-value minibuffer-history-variable)))
             (error "No preceding item in %s" minibuffer-history-variable)))
       (erase-buffer)
            ((> narg (length (symbol-value minibuffer-history-variable)))
             (error "No preceding item in %s" minibuffer-history-variable)))
       (erase-buffer)
@@ -1377,11 +1380,14 @@ If N is negative, find the previous or Nth previous match."
 ;;;;                reading various things from a minibuffer            ;;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ;;;;                reading various things from a minibuffer            ;;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defun read-expression (prompt &optional initial-contents history)
-  "Return a Lisp object read using the minibuffer.
-Prompt with PROMPT.  If non-nil, optional second arg INITIAL-CONTENTS
-is a string to insert in the minibuffer before reading.
-Third arg HISTORY, if non-nil, specifies a history list."
+(defun read-expression (prompt &optional initial-contents history default-value)
+  "Return a Lisp object read using the minibuffer, prompting with PROMPT.
+If non-nil, optional second arg INITIAL-CONTENTS is a string to insert
+ in the minibuffer before reading.
+Third arg HISTORY, if non-nil, specifies a history list.
+Fourth arg DEFAULT-VALUE is the default value.  If non-nil, it is used
+ for history command, and as the value to return if the user enters the
+ empty string."
   (let ((minibuffer-history-sexp-flag t)
        ;; Semi-kludge to get around M-x C-x o M-ESC trying to do completion.
        (minibuffer-completion-table nil))
   (let ((minibuffer-history-sexp-flag t)
        ;; Semi-kludge to get around M-x C-x o M-ESC trying to do completion.
        (minibuffer-completion-table nil))
@@ -1390,50 +1396,57 @@ Third arg HISTORY, if non-nil, specifies a history list."
                          read-expression-map
                          t
                          (or history 'read-expression-history)
                          read-expression-map
                          t
                          (or history 'read-expression-history)
-                         lisp-mode-abbrev-table)))
+                         lisp-mode-abbrev-table
+                         default-value)))
 
 
-(defun read-string (prompt &optional initial-contents history)
+(defun read-string (prompt &optional initial-contents history default-value)
   "Return a string from the minibuffer, prompting with string PROMPT.
 If non-nil, optional second arg INITIAL-CONTENTS is a string to insert
   "Return a string from the minibuffer, prompting with string PROMPT.
 If non-nil, optional second arg INITIAL-CONTENTS is a string to insert
-in the minibuffer before reading.
-Third arg HISTORY, if non-nil, specifies a history list."
+ in the minibuffer before reading.
+Third arg HISTORY, if non-nil, specifies a history list.
+Fourth arg DEFAULT-VALUE is the default value.  If non-nil, it is used
+ for history command, and as the value to return if the user enters the
+ empty string."
   (let ((minibuffer-completion-table nil))
     (read-from-minibuffer prompt
                          initial-contents
                          minibuffer-local-map
   (let ((minibuffer-completion-table nil))
     (read-from-minibuffer prompt
                          initial-contents
                          minibuffer-local-map
-                         nil history)))
+                         nil history nil default-value)))
 
 
-(defun eval-minibuffer (prompt &optional initial-contents history)
+(defun eval-minibuffer (prompt &optional initial-contents history default-value)
   "Return value of Lisp expression read using the minibuffer.
 Prompt with PROMPT.  If non-nil, optional second arg INITIAL-CONTENTS
 is a string to insert in the minibuffer before reading.
   "Return value of Lisp expression read using the minibuffer.
 Prompt with PROMPT.  If non-nil, optional second arg INITIAL-CONTENTS
 is a string to insert in the minibuffer before reading.
-Third arg HISTORY, if non-nil, specifies a history list."
-  (eval (read-expression prompt initial-contents history)))
+Third arg HISTORY, if non-nil, specifies a history list.
+Fourth arg DEFAULT-VALUE is the default value.  If non-nil, it is used
+ for history command, and as the value to return if the user enters the
+ empty string."
+  (eval (read-expression prompt initial-contents history default-value)))
 
 ;; The name `command-history' is already taken
 (defvar read-command-history '())
 
 
 ;; The name `command-history' is already taken
 (defvar read-command-history '())
 
-(defun read-command (prompt)
+(defun read-command (prompt &optional default-value)
   "Read the name of a command and return as a symbol.
   "Read the name of a command and return as a symbol.
-Prompts with PROMPT."
+Prompts with PROMPT.  By default, return DEFAULT-VALUE."
   (intern (completing-read prompt obarray 'commandp t nil
                           ;; 'command-history is not right here: that's a
                           ;; list of evalable forms, not a history list.
                           'read-command-history
   (intern (completing-read prompt obarray 'commandp t nil
                           ;; 'command-history is not right here: that's a
                           ;; list of evalable forms, not a history list.
                           'read-command-history
-                          )))
+                          default-value)))
 
 
-(defun read-function (prompt)
+(defun read-function (prompt &optional default-value)
   "Read the name of a function and return as a symbol.
   "Read the name of a function and return as a symbol.
-Prompts with PROMPT."
+Prompts with PROMPT.  By default, return DEFAULT-VALUE."
   (intern (completing-read prompt obarray 'fboundp t nil
   (intern (completing-read prompt obarray 'fboundp t nil
-                          'function-history)))
+                          'function-history default-value)))
 
 
-(defun read-variable (prompt)
+(defun read-variable (prompt &optional default-value)
   "Read the name of a user variable and return it as a symbol.
   "Read the name of a user variable and return it as a symbol.
-Prompts with PROMPT.
+Prompts with PROMPT.  By default, return DEFAULT-VALUE.
 A user variable is one whose documentation starts with a `*' character."
   (intern (completing-read prompt obarray 'user-variable-p t nil
 A user variable is one whose documentation starts with a `*' character."
   (intern (completing-read prompt obarray 'user-variable-p t nil
-                          'variable-history)))
+                          'variable-history default-value)))
 
 (defun read-buffer (prompt &optional default require-match)
   "Read the name of a buffer and return as a string.
 
 (defun read-buffer (prompt &optional default require-match)
   "Read the name of a buffer and return as a string.
@@ -1471,8 +1484,12 @@ only existing buffer names are allowed."
         (buffer-name result)
       result)))
 
         (buffer-name result)
       result)))
 
-(defun read-number (prompt &optional integers-only)
-  "Read a number from the minibuffer."
+(defun read-number (prompt &optional integers-only default-value)
+  "Read a number from the minibuffer, prompting with PROMPT.
+If optional second argument INTEGERS-ONLY is non-nil, accept
+ only integer input.
+If DEFAULT-VALUE is non-nil, return that if user enters an empty
+ line."
   (let ((pred (if integers-only 'integerp 'numberp))
        num)
     (while (not (funcall pred num))
   (let ((pred (if integers-only 'integerp 'numberp))
        num)
     (while (not (funcall pred num))
@@ -1480,19 +1497,20 @@ only existing buffer names are allowed."
                    (let ((minibuffer-completion-table nil))
                      (read-from-minibuffer
                       prompt (if num (prin1-to-string num)) nil t
                    (let ((minibuffer-completion-table nil))
                      (read-from-minibuffer
                       prompt (if num (prin1-to-string num)) nil t
-                      t)) ;no history
+                      nil nil default-value))
                  (input-error nil)
                  (invalid-read-syntax nil)
                  (end-of-file nil)))
       (or (funcall pred num) (beep)))
     num))
 
                  (input-error nil)
                  (invalid-read-syntax nil)
                  (end-of-file nil)))
       (or (funcall pred num) (beep)))
     num))
 
-(defun read-shell-command (prompt &optional initial-input history)
+(defun read-shell-command (prompt &optional initial-input history default-value)
   "Just like read-string, but uses read-shell-command-map:
 \\{read-shell-command-map}"
   (let ((minibuffer-completion-table nil))
     (read-from-minibuffer prompt initial-input read-shell-command-map
   "Just like read-string, but uses read-shell-command-map:
 \\{read-shell-command-map}"
   (let ((minibuffer-completion-table nil))
     (read-from-minibuffer prompt initial-input read-shell-command-map
-                         nil (or history 'shell-command-history))))
+                         nil (or history 'shell-command-history)
+                         nil default-value)))
 
 \f
 ;;; This read-file-name stuff probably belongs in files.el
 
 \f
 ;;; This read-file-name stuff probably belongs in files.el
@@ -1659,15 +1677,20 @@ Default name to DEFAULT if user enters a null string.
   used.)
 Fourth arg MUST-MATCH non-nil means require existing file's name.
  Non-nil and non-t means also require confirmation after completion.
   used.)
 Fourth arg MUST-MATCH non-nil means require existing file's name.
  Non-nil and non-t means also require confirmation after completion.
-Fifth arg INITIAL-CONTENTS specifies text to start with.
+Fifth arg INITIAL-CONTENTS specifies text to start with.  If this is not
+ specified, and `insert-default-directory' is non-nil, DIR or the current
+ directory will be used.
 Sixth arg HISTORY specifies the history list to use.  Default is
  `file-name-history'.
 DIR defaults to current buffer's directory default."
   (read-file-name-1
    (or history 'file-name-history)
    prompt dir (or default
 Sixth arg HISTORY specifies the history list to use.  Default is
  `file-name-history'.
 DIR defaults to current buffer's directory default."
   (read-file-name-1
    (or history 'file-name-history)
    prompt dir (or default
-                 (if initial-contents (expand-file-name initial-contents dir)
-                   buffer-file-name))
+                 (and initial-contents
+                      (abbreviate-file-name (expand-file-name
+                                             initial-contents dir) t))
+                 (and buffer-file-truename
+                      (abbreviate-file-name buffer-file-name t)))
    must-match initial-contents
    ;; A separate function (not an anonymous lambda-expression)
    ;; and passed as a symbol because of disgusting kludges in various
    must-match initial-contents
    ;; A separate function (not an anonymous lambda-expression)
    ;; and passed as a symbol because of disgusting kludges in various
index 778d2c9..08886a9 100644 (file)
@@ -293,13 +293,9 @@ the buffer of the window whose modeline was clicked upon.")
 (make-face 'modeline-mousable "Face for mousable portions of the modeline.")
 (set-face-parent 'modeline-mousable 'modeline nil '(default))
 (when (featurep 'window-system)
 (make-face 'modeline-mousable "Face for mousable portions of the modeline.")
 (set-face-parent 'modeline-mousable 'modeline nil '(default))
 (when (featurep 'window-system)
-  (set-face-foreground 'modeline-mousable
-                      '(((default color x) . "firebrick")
-                        ((default color mswindows) . "firebrick"))
-                        'global))
-(when (featurep 'x)
-  (set-face-font 'modeline-mousable [bold] nil '(default mono x))
-  (set-face-font 'modeline-mousable [bold] nil '(default grayscale x)))
+  (set-face-foreground 'modeline-mousable "firebrick" nil '(default color win))
+  (set-face-font 'modeline-mousable [bold] nil '(default mono win))
+  (set-face-font 'modeline-mousable [bold] nil '(default grayscale win)))
 
 (defmacro make-modeline-command-wrapper (command)
   `#'(lambda (event)
 
 (defmacro make-modeline-command-wrapper (command)
   `#'(lambda (event)
@@ -333,12 +329,8 @@ in the list takes precedence.")
 (set-face-parent 'modeline-mousable-minor-mode 'modeline-mousable nil
                 '(default))
 (when (featurep 'window-system)
 (set-face-parent 'modeline-mousable-minor-mode 'modeline-mousable nil
                 '(default))
 (when (featurep 'window-system)
-  (set-face-foreground 'modeline-mousable-minor-mode
-                      '(((default color x) . "green4")
-                        ((default color x) . "forestgreen")
-                        ((default color mswindows) . "green4")
-                        ((default color mswindows) . "forestgreen"))
-                      'global))
+  (set-face-foreground 'modeline-mousable-minor-mode '("green4" "forestgreen")
+                      nil '(default color win)))
 
 (defvar modeline-mousable-minor-mode-extent (make-extent nil nil)
   ;; alliteration at its finest.
 
 (defvar modeline-mousable-minor-mode-extent (make-extent nil nil)
   ;; alliteration at its finest.
@@ -538,13 +530,9 @@ parentheses on the modeline."
           "Face for the buffer ID string in the modeline.")
 (set-face-parent 'modeline-buffer-id 'modeline nil '(default))
 (when (featurep 'window-system)
           "Face for the buffer ID string in the modeline.")
 (set-face-parent 'modeline-buffer-id 'modeline nil '(default))
 (when (featurep 'window-system)
-  (set-face-foreground 'modeline-buffer-id
-                      '(((default color x) . "blue4")
-                        ((default color mswindows) . "blue4"))
-                      'global))
-(when (featurep 'x)
-  (set-face-font 'modeline-buffer-id [bold-italic] nil '(default mono x))
-  (set-face-font 'modeline-buffer-id [bold-italic] nil '(default grayscale x)))
+  (set-face-foreground 'modeline-buffer-id "blue4" nil '(default color win))
+  (set-face-font 'modeline-buffer-id [bold-italic] nil '(default mono win))
+  (set-face-font 'modeline-buffer-id [bold-italic] nil '(default grayscale win)))
 (when (featurep 'tty)
   (set-face-font 'modeline-buffer-id [bold-italic] nil '(default tty)))
 
 (when (featurep 'tty)
   (set-face-font 'modeline-buffer-id [bold-italic] nil '(default tty)))
 
index 4a0a22c..9cdab7b 100644 (file)
@@ -1383,7 +1383,7 @@ and `mode-motion-hook'."
         ;; vars is a list of glyph variables to check for a pointer
         ;; value.
         (vars (cond
         ;; vars is a list of glyph variables to check for a pointer
         ;; value.
         (vars (cond
-               ;; Checking if button is non-nil is not sufficent
+               ;; Checking if button is non-nil is not sufficient
                ;; since the pointer could be over a blank portion
                ;; of the toolbar.
                ((event-over-toolbar-p event)
                ;; since the pointer could be over a blank portion
                ;; of the toolbar.
                ((event-over-toolbar-p event)
@@ -1525,10 +1525,10 @@ other mouse buttons."
                 (setq last-timestamp (event-timestamp event))
                 ;; Enlarge the window, calculating change in characters
                 ;; of default font. Do not let the window to become
                 (setq last-timestamp (event-timestamp event))
                 ;; Enlarge the window, calculating change in characters
                 ;; of default font. Do not let the window to become
-                ;; less than alolwed minimum (not because that's critical
+                ;; less than allowed minimum (not because that's critical
                 ;; for the code performance, just the visual effect is
                 ;; better: when cursor goes to the left of the next left
                 ;; for the code performance, just the visual effect is
                 ;; better: when cursor goes to the left of the next left
-                ;; divider, the vindow being resized shrinks to minimal
+                ;; divider, the window being resized shrinks to minimal
                 ;; size.
                 (enlarge-window (max (- window-min-width (window-width window))
                                      (/ (- (event-x-pixel event) old-right)
                 ;; size.
                 (enlarge-window (max (- window-min-width (window-width window))
                                      (/ (- (event-x-pixel event) old-right)
@@ -1538,7 +1538,7 @@ other mouse buttons."
                 ;; if the change caused more than two windows to resize
                 ;; (shifting the whole stack right is ugly), or if the
                 ;; left window side has slipped (right side cannot be
                 ;; if the change caused more than two windows to resize
                 ;; (shifting the whole stack right is ugly), or if the
                 ;; left window side has slipped (right side cannot be
-                ;; moved any funrther to the right, so enlarge-window
+                ;; moved any further to the right, so enlarge-window
                 ;; plays bad games with the left edge.
                 (if (or (/= (count-windows) (length old-edges-all-windows))
                         (/= old-left (car (window-pixel-edges window)))
                 ;; plays bad games with the left edge.
                 (if (or (/= (count-windows) (length old-edges-all-windows))
                         (/= old-left (car (window-pixel-edges window)))
index 56904f3..aa4db3e 100644 (file)
 
 ;;; Commentary:
 
 
 ;;; Commentary:
 
-;; This file contains temporary definitions for 'mswindows glyphs.
-;; Since there currently is no image support, the glyps are defined
-;; TTY-style. This file has to be removed or reworked completely
-;; when we have images.
+;; Initialization code for MS Windows glyphs.
 
 
-;; This file is dumped with XEmacs.
+;; This file is dumped with XEmacs (when MS Windows support is
+;; compiled in).
 
 ;;; Code:
 
 
 ;;; Code:
 
index 640a472..7675830 100644 (file)
@@ -26,7 +26,7 @@
 
 ;; We need nothing special to support English on Emacs.  Selecting
 ;; English as a language environment is one of the ways to reset
 
 ;; We need nothing special to support English on Emacs.  Selecting
 ;; English as a language environment is one of the ways to reset
-;; various multilingual environment to the original settting.
+;; various multilingual environment to the original setting.
 
 ;;; Code
 
 
 ;;; Code
 
index 54a3ca3..f94e13e 100644 (file)
@@ -27,6 +27,8 @@
 
 ;; For Europeans, five character sets ISO8859-1,2,3,4,9 are supported.
 
 
 ;; For Europeans, five character sets ISO8859-1,2,3,4,9 are supported.
 
+;; #### latin.el would be a better name for this file.
+
 ;;; Code:
 
 ;; For syntax of Latin-1 characters.
 ;;; Code:
 
 ;; For syntax of Latin-1 characters.
 (modify-syntax-entry ?\e,BW\e(B ".")
 (modify-syntax-entry ?\e,Bw\e(B ".")
 
 (modify-syntax-entry ?\e,BW\e(B ".")
 (modify-syntax-entry ?\e,Bw\e(B ".")
 
+;; For syntax of Latin-3
+(loop for c in '(?\e,C!\e(B ?\e,C&\e(B ?\e,C)\e(B ?\e,C*\e(B ?\e,C+\e(B ?\e,C,\e(B ?\e,C/\e(B ?\e,C1\e(B ?\e,C5\e(B ?\e,C6\e(B ?\e,C:\e(B ?\e,C;\e(B ?\e,C<\e(B ?\e,C?\e(B)
+  do (modify-syntax-entry c "w"))
+
+(loop for c from 64 to 126
+  do (modify-syntax-entry (make-char 'latin-iso8859-3 c) "w"))
+
+(modify-syntax-entry (make-char 'latin-iso8859-3 32) "w") ; no-break space
+(modify-syntax-entry ?\e,CW\e(B ".")
+(modify-syntax-entry ?\e,Cw\e(B ".")
+
+;; For syntax of Latin-4
+(loop for c in '(?\e,D!\e(B ?\e,D"\e(B ?\e,D#\e(B ?\e,D%\e(B ?\e,D&\e(B ?\e,D)\e(B ?\e,D*\e(B ?\e,D+\e(B ?\e,D,\e(B ?\e,D.\e(B ?\e,D1\e(B ?\e,D3\e(B ?\e,D5\e(B ?\e,D6\e(B ?\e,D9\e(B ?\e,D:\e(B ?\e,D;\e(B ?\e,D<\e(B ?\e,D=\e(B ?\e,D>\e(B ?\e,D?\e(B)
+  do (modify-syntax-entry c "w"))
+
+(loop for c from 64 to 126
+  do (modify-syntax-entry (make-char 'latin-iso8859-4 c) "w"))
+
+(modify-syntax-entry (make-char 'latin-iso8859-4 32) "w") ; no-break space
+(modify-syntax-entry ?\e,DW\e(B ".")
+(modify-syntax-entry ?\e,Dw\e(B ".")
+
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; EUROPEANS
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; EUROPEANS
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
index 160c91d..92af2d0 100644 (file)
@@ -121,7 +121,7 @@ The categories are given by their designators."
          (setq a (1+ a)))
        (nreverse list)))))
 
          (setq a (1+ a)))
        (nreverse list)))))
 
-;; implimented in c, file chartab.c (97/3/14 jhod@po.iijnet.or.jp)
+;; implemented in c, file chartab.c (97/3/14 jhod@po.iijnet.or.jp)
 ;(defun char-in-category-p (char category &optional table)
 ;  "Return non-nil if CHAR is in CATEGORY.
 ;TABLE defaults to the current buffer's category table.
 ;(defun char-in-category-p (char category &optional table)
 ;  "Return non-nil if CHAR is in CATEGORY.
 ;TABLE defaults to the current buffer's category table.
index ddc1a39..4ae3c49 100644 (file)
@@ -1439,7 +1439,7 @@ It can be retrieved with `(get-char-code-property CHAR PROPNAME)'."
 ;;               (memq (char-charset char) safe-charsets))
 ;;       ;; We must find the encoded string of CHAR.  But, just encoding
 ;;       ;; CHAR will put extra control sequences (usually to designate
 ;;               (memq (char-charset char) safe-charsets))
 ;;       ;; We must find the encoded string of CHAR.  But, just encoding
 ;;       ;; CHAR will put extra control sequences (usually to designate
-;;       ;; ASCII charaset) at the tail if type of CODING is ISO 2022.
+;;       ;; ASCII charset) at the tail if type of CODING is ISO 2022.
 ;;       ;; To exclude such tailing bytes, we at first encode one-char
 ;;       ;; string and two-char string, then check how many bytes at the
 ;;       ;; tail of both encoded strings are the same.
 ;;       ;; To exclude such tailing bytes, we at first encode one-char
 ;;       ;; string and two-char string, then check how many bytes at the
 ;;       ;; tail of both encoded strings are the same.
index baf9c57..c587e46 100644 (file)
@@ -116,7 +116,7 @@ then `set-language-environment' is called with LANGUAGE-ENVIRONMENT.")
        (setenv "LC_MESSAGES" "C")
        (setenv "LC_TIME"     "C"))))
   
        (setenv "LC_MESSAGES" "C")
        (setenv "LC_TIME"     "C"))))
   
-  ;; Register avairable input methods by loading LEIM list file.
+  ;; Register available input methods by loading LEIM list file.
   (load "leim-list.el" 'noerror 'nomessage 'nosuffix)
   )
 
   (load "leim-list.el" 'noerror 'nomessage 'nosuffix)
   )
 
index 5a9dd33..e25c833 100644 (file)
@@ -289,7 +289,7 @@ Both tables are indexed by the position code of Vietnamese characters.")
                (features viet-util)
                (sample-text . "Vietnamese (Ti\e,1*\e(Bng Vi\e,1.\e(Bt)     Ch\e,1`\e(Bo b\e,1U\e(Bn")
                (documentation . "\
                (features viet-util)
                (sample-text . "Vietnamese (Ti\e,1*\e(Bng Vi\e,1.\e(Bt)     Ch\e,1`\e(Bo b\e,1U\e(Bn")
                (documentation . "\
-For Vietnamese, Emacs uses special charasets internally.
+For Vietnamese, Emacs uses special charsets internally.
 They can be decoded from and encoded to VISCC, VSCII, and VIQR.
 Current setting put higher priority to the coding system VISCII than VSCII.
 If you prefer VSCII, please do: (prefer-coding-system 'vietnamese-vscii)")
 They can be decoded from and encoded to VISCC, VSCII, and VIQR.
 Current setting put higher priority to the coding system VISCII than VSCII.
 If you prefer VSCII, please do: (prefer-coding-system 'vietnamese-vscii)")
index 4dc0fe5..335a016 100644 (file)
@@ -353,7 +353,7 @@ Multibyte characters are concerned."
       (setq idx (1+ idx) i (1+ i)))
     string))
 
       (setq idx (1+ idx) i (1+ i)))
     string))
 
-;; ### This function is not compatible with FSF in some cases.  Hard
+;; #### This function is not compatible with FSF in some cases.  Hard
 ;; to fix, because it is hard to trace the logic of the FSF function.
 ;; In case we need the exact behavior, we can always copy the FSF
 ;; version, which is very long and does lots of unnecessary stuff.
 ;; to fix, because it is hard to trace the logic of the FSF function.
 ;; In case we need the exact behavior, we can always copy the FSF
 ;; version, which is very long and does lots of unnecessary stuff.
index aff6025..5b732c5 100644 (file)
@@ -166,7 +166,7 @@ or return a location appropriate for the package otherwise."
                 (setq autoload-dir (feature-file package-feature))
                 (setq autoload-dir (file-name-directory autoload-dir))
                 (member autoload-dir late-package-load-path))
                 (setq autoload-dir (feature-file package-feature))
                 (setq autoload-dir (file-name-directory autoload-dir))
                 (member autoload-dir late-package-load-path))
-       ;; Find the corresonding entry in late-package
+       ;; Find the corresponding entry in late-package
        (setq pkg-dir
              (car-safe (member-if (lambda (h)
                           (string-match (concat "^" (regexp-quote h))
        (setq pkg-dir
              (car-safe (member-if (lambda (h)
                           (string-match (concat "^" (regexp-quote h))
index c308d83..b84b4a7 100644 (file)
@@ -32,7 +32,7 @@
 ;;     Retrieve a package and any other required packages from an archive
 ;;
 ;;
 ;;     Retrieve a package and any other required packages from an archive
 ;;
 ;;
-;; Note (JV): Most of this no longer aplies!
+;; Note (JV): Most of this no longer applies!
 ;;
 ;; The idea:
 ;;     A new XEmacs lisp-only release is generated with the following steps:
 ;;
 ;; The idea:
 ;;     A new XEmacs lisp-only release is generated with the following steps:
@@ -451,7 +451,7 @@ used interactively, for example from a mail or news buffer."
                                          "package-get DB verification? ")))))
                       (t nil)))))
           (error "Package-get PGP signature failed to verify"))
                                          "package-get DB verification? ")))))
                       (t nil)))))
           (error "Package-get PGP signature failed to verify"))
-      ;; ToDo: We shoud call package-get-maybe-save-index on the region
+      ;; ToDo: We should call package-get-maybe-save-index on the region
       (package-get-update-base-entries content-beg content-end)
       (message "Updated package-get database"))))
 
       (package-get-update-base-entries content-beg content-end)
       (message "Updated package-get database"))))
 
index 4f948c7..f471ae0 100644 (file)
@@ -535,7 +535,7 @@ Designed to be called interactively (from a keypress)."
     (set-buffer (event-buffer event))
     (goto-char (event-point event))
     (popup-menu pui-menu event)
     (set-buffer (event-buffer event))
     (goto-char (event-point event))
     (popup-menu pui-menu event)
-    ;; I agreee with dired.el this is seriously bogus.
+    ;; I agree with dired.el - this is seriously bogus.
     (while (popup-menu-up-p)
       (dispatch-event (next-event)))))
 
     (while (popup-menu-up-p)
       (dispatch-event (next-event)))))
 
index db05e32..0c7b46a 100644 (file)
@@ -33,9 +33,6 @@
 ;;; Code:
 
 \f
 ;;; Code:
 
 \f
-(defvar binary-process-output)
-(defvar buffer-file-type)
-
 (defgroup processes nil
   "Process, subshell, compilation, and job control support."
   :group 'external
 (defgroup processes nil
   "Process, subshell, compilation, and job control support."
   :group 'external
@@ -115,14 +112,10 @@ If you quit, the process is first killed with SIGINT, then with SIGKILL if
 you quit again before the process exits."
   (let ((temp
         (make-temp-name
 you quit again before the process exits."
   (let ((temp
         (make-temp-name
-         (concat (file-name-as-directory (temp-directory))
-                 (if (memq system-type '(ms-dos windows-nt)) "em" "emacs")))))
+         (concat (file-name-as-directory (temp-directory)) "emacs"))))
     (unwind-protect
        (progn
     (unwind-protect
        (progn
-         (if (memq system-type '(ms-dos windows-nt))
-             (let ((buffer-file-type binary-process-output))
-               (write-region start end temp nil 'silent))
-           (write-region start end temp nil 'silent))
+         (write-region start end temp nil 'silent)
          (if deletep (delete-region start end))
          (apply #'call-process program temp buffer displayp args))
       (ignore-file-errors (delete-file temp)))))
          (if deletep (delete-region start end))
          (apply #'call-process program temp buffer displayp args))
       (ignore-file-errors (delete-file temp)))))
@@ -327,20 +320,17 @@ lost packets."
 
 (defun shell-quote-argument (argument)
   "Quote an argument for passing as argument to an inferior shell."
 
 (defun shell-quote-argument (argument)
   "Quote an argument for passing as argument to an inferior shell."
-  (if (eq system-type 'ms-dos)
-      ;; MS-DOS shells don't have quoting, so don't do any.
-      argument
-    (if (eq system-type 'windows-nt)
-       (concat "\"" argument "\"")
-      ;; Quote everything except POSIX filename characters.
-      ;; This should be safe enough even for really weird shells.
-      (let ((result "") (start 0) end)
-       (while (string-match "[^-0-9a-zA-Z_./]" argument start)
-         (setq end (match-beginning 0)
-               result (concat result (substring argument start end)
-                              "\\" (substring argument end (1+ end)))
-               start (1+ end)))
-       (concat result (substring argument start))))))
+  (if (eq system-type 'windows-nt)
+      (nt-quote-process-args (list shell-file-name argument))
+    ;; Quote everything except POSIX filename characters.
+    ;; This should be safe enough even for really weird shells.
+    (let ((result "") (start 0) end)
+      (while (string-match "[^-0-9a-zA-Z_./]" argument start)
+       (setq end (match-beginning 0)
+             result (concat result (substring argument start end)
+                            "\\" (substring argument end (1+ end)))
+             start (1+ end)))
+      (concat result (substring argument start)))))
 
 (defun shell-command-to-string (command)
   "Execute shell command COMMAND and return its output as a string."
 
 (defun shell-command-to-string (command)
   "Execute shell command COMMAND and return its output as a string."
index 757a254..f70149f 100644 (file)
@@ -29,7 +29,7 @@
 ;; This package provides the operations on rectangles that are documented
 ;; in the XEmacs Reference Manual.
 
 ;; This package provides the operations on rectangles that are documented
 ;; in the XEmacs Reference Manual.
 
-;; ### NOTE: this file has been almost completely rewritten by Didier Verna
+;; #### NOTE: this file has been almost completely rewritten by Didier Verna
 ;; <verna@inf.enst.fr>, Jul 99. The purpose of this rewrite is to be less
 ;; intrusive and fill lines with whitespaces only when needed. A few functions
 ;; are untouched though, as noted above their definition.
 ;; <verna@inf.enst.fr>, Jul 99. The purpose of this rewrite is to be less
 ;; intrusive and fill lines with whitespaces only when needed. A few functions
 ;; are untouched though, as noted above their definition.
@@ -37,7 +37,7 @@
 
 ;;; Code:
 
 
 ;;; Code:
 
-;; ### NOTE: this function is untouched, but not used anymore.
+;; #### NOTE: this function is untouched, but not used anymore.
 ;; `apply-on-rectangle' is used instead. It's still there because it's
 ;; documented so people might use it in their code, so I've decided not to
 ;; touch it. --dv
 ;; `apply-on-rectangle' is used instead. It's still there because it's
 ;; documented so people might use it in their code, so I've decided not to
 ;; touch it. --dv
@@ -204,7 +204,7 @@ as a list of strings, one for each line of the rectangle."
     (apply-on-rectangle 'extract-rectangle-line start end lines)
     (nreverse (cdr lines))))
 
     (apply-on-rectangle 'extract-rectangle-line start end lines)
     (nreverse (cdr lines))))
 
-;; ### NOTE: this is actually the only function that needs to do complicated
+;; #### NOTE: this is actually the only function that needs to do complicated
 ;; stuff like what's happening in `operate-on-rectangle', because the buffer
 ;; might be read-only. --dv
 (defun extract-rectangle-line (startcol endcol lines)
 ;; stuff like what's happening in `operate-on-rectangle', because the buffer
 ;; might be read-only. --dv
 (defun extract-rectangle-line (startcol endcol lines)
index 3e83e2d..a24705b 100644 (file)
@@ -55,7 +55,7 @@ This variable can be customized through the options menu."
 ;; vertical scrollbar functions
 ;;
 
 ;; vertical scrollbar functions
 ;;
 
-;;; ### Move functions from C into Lisp here!
+;;; #### Move functions from C into Lisp here!
 
 ;;
 ;; horizontal scrollbar functions
 
 ;;
 ;; horizontal scrollbar functions
index 6fa92b3..19a6eec 100644 (file)
@@ -3630,7 +3630,7 @@ as the second argument.")
 ;;                                            --hniksic
 (defcustom log-message-ignore-regexps
   '(;; Note: adding entries to this list slows down messaging
 ;;                                            --hniksic
 (defcustom log-message-ignore-regexps
   '(;; Note: adding entries to this list slows down messaging
-    ;; significantly.  Wherever possible, use message lables.
+    ;; significantly.  Wherever possible, use message labels.
 
     ;; Often-seen messages
     "\\`\\'"                           ; empty message
 
     ;; Often-seen messages
     "\\`\\'"                           ; empty message
index 0f28447..8a2f11a 100644 (file)
@@ -107,10 +107,11 @@ the user's init file.")
 (defvar user-init-directory-base ".xemacs"
   "Base of directory where user-installed init files may go.")
 
 (defvar user-init-directory-base ".xemacs"
   "Base of directory where user-installed init files may go.")
 
-(defvar user-init-file-base (cond
-                            ((eq system-type 'ms-dos) "_emacs")
-                            (t ".emacs"))
-  "Base of init file.")
+(defvar user-init-file-base-list (append
+                                 '(".emacs.elc" ".emacs.el" ".emacs")
+                                 (and (eq system-type 'windows-nt)
+                                      '("_emacs.elc" "_emacs.el" "_emacs")))
+  "List of allowed init files.  The first one found takes precedence.")
 
 (defvar user-init-directory
   (file-name-as-directory
 
 (defvar user-init-directory
   (file-name-as-directory
@@ -530,11 +531,10 @@ Type ^H^H^H (Control-h Control-h Control-h) to get more help options.\n")
            (string= arg "-user"))
        (let* ((user (pop args))
               (home-user (concat "~" user)))
            (string= arg "-user"))
        (let* ((user (pop args))
               (home-user (concat "~" user)))
-         (setq user-init-file
-               (paths-construct-path (list home-user user-init-file-base)))
-         (setq user-init-directory
-               (file-name-as-directory
-                (paths-construct-path (list home-user user-init-directory-base))))))
+         (setq user-init-file (find-user-init-file home-user)
+               user-init-directory (file-name-as-directory
+                                    (paths-construct-path
+                                     (list home-user user-init-directory-base))))))
        ((string= arg "-debug-init")
        (setq init-file-debug t))
        ((string= arg "-unmapped")
        ((string= arg "-debug-init")
        (setq init-file-debug t))
        ((string= arg "-unmapped")
@@ -589,6 +589,11 @@ If this is nil, no message will be displayed.")
       ;; and deletes the stdio device.
       (frame-initialize))
 
       ;; and deletes the stdio device.
       (frame-initialize))
 
+    ;; Reinitialize faces if necessary.  This function changes face if
+    ;; it is created during auto-autoloads loading.  Otherwise, it
+    ;; does nothing.
+    (startup-initialize-custom-faces)
+
     ;;
     ;; We have normality, I repeat, we have normality.  Anything you still
     ;; can't cope with is therefore your own problem.  (And we don't need
     ;;
     ;; We have normality, I repeat, we have normality.  Anything you still
     ;; can't cope with is therefore your own problem.  (And we don't need
@@ -633,11 +638,19 @@ If this is nil, no message will be displayed.")
            (setq term (substring term 0 hyphend))
          (setq term nil))))))
 
            (setq term (substring term 0 hyphend))
          (setq term nil))))))
 
+(defun find-user-init-file (&optional directory)
+  "Determine the user's init file."
+  (unless directory
+    (setq directory "~"))
+  (dolist (file user-init-file-base-list)
+    (let ((expanded (paths-construct-path (list directory file))))
+      (when (file-exists-p expanded)
+       (return expanded)))))
+
 (defun load-user-init-file ()
   "This function actually reads the init file, .emacs."
   (if (not user-init-file)
 (defun load-user-init-file ()
   "This function actually reads the init file, .emacs."
   (if (not user-init-file)
-      (setq user-init-file
-           (paths-construct-path (list "~" user-init-file-base))))
+      (setq user-init-file (find-user-init-file)))
   (load user-init-file t t t)
   (unless inhibit-default-init
     (let ((inhibit-startup-message nil))
   (load user-init-file t t t)
   (unless inhibit-default-init
     (let ((inhibit-startup-message nil))
@@ -1017,7 +1030,7 @@ Copyright (C) 1995-1996 Ben Wing\n"))
              (1+ indice )))
       )))
 
              (1+ indice )))
       )))
 
-;; ### This function now returns the (possibly nil) timeout circulating the
+;; #### This function now returns the (possibly nil) timeout circulating the
 ;; splash-frame elements
 (defun display-splash-frame ()
   (let ((logo xemacs-logo)
 ;; splash-frame elements
 (defun display-splash-frame ()
   (let ((logo xemacs-logo)
index d8da970..a20d00c 100644 (file)
 ;; We have only one font, so...
 (add-hook 'before-init-hook 'msdos-face-setup)
 ;; ---------------------------------------------------------------------------
 ;; We have only one font, so...
 (add-hook 'before-init-hook 'msdos-face-setup)
 ;; ---------------------------------------------------------------------------
-;; More or less useful immitations of certain X-functions.  A lot of the
+;; More or less useful imitations of certain X-functions.  A lot of the
 ;; values returned are questionable, but usually only the form of the
 ;; returned value matters.  Also, by the way, recall that `ignore' is
 ;; a useful function for returning 'nil regardless of argument.
 ;; values returned are questionable, but usually only the form of the
 ;; returned value matters.  Also, by the way, recall that `ignore' is
 ;; a useful function for returning 'nil regardless of argument.
index 6d324f7..dd31d02 100644 (file)
@@ -22,7 +22,7 @@
 
 ;; HISTORY
 ;;    jkj - Jan 18, 1993: Created.
 
 ;; HISTORY
 ;;    jkj - Jan 18, 1993: Created.
-;;    jkj - Nov 18, 1993: Mdified to work with Emacs 19.21
+;;    jkj - Nov 18, 1993: Modified to work with Emacs 19.21
 
 ;;
 ;; First of all, the normal cursor movement keys. Some of these, if not
 
 ;;
 ;; First of all, the normal cursor movement keys. Some of these, if not
index 914ec3a..d913142 100644 (file)
@@ -131,10 +131,9 @@ argument are optional. Only the Non-nil arguments are used in the test."
 ;; `what(1)' can extract from the executable or a core file.  We don't
 ;; actually need this to be pointed to from lisp; pure objects can't
 ;; be GCed.
 ;; `what(1)' can extract from the executable or a core file.  We don't
 ;; actually need this to be pointed to from lisp; pure objects can't
 ;; be GCed.
-(or (memq system-type '(windows-nt ms-dos))
-    (purecopy (concat "\n@" "(#)" (emacs-version)
-                     "\n@" "(#)" "Configuration: "
-                     system-configuration "\n")))
+(purecopy (concat "\n@" "(#)" (emacs-version)
+                 "\n@" "(#)" "Configuration: "
+                 system-configuration "\n"))
 
 ;;Local variables:
 ;;version-control: never
 
 ;;Local variables:
 ;;version-control: never
index 64a3979..4507542 100644 (file)
@@ -1,6 +1,6 @@
 ;;; wid-edit.el --- Functions for creating and using widgets.
 ;;
 ;;; wid-edit.el --- Functions for creating and using widgets.
 ;;
-;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Maintainer: Hrvoje Niksic <hniksic@xemacs.org>
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Maintainer: Hrvoje Niksic <hniksic@xemacs.org>
@@ -601,7 +601,7 @@ ARGS are passed as extra arguments to the function."
   ;; In WIDGET, match the start of VALS.
   (cond ((widget-get widget :inline)
         (widget-apply widget :match-inline vals))
   ;; In WIDGET, match the start of VALS.
   (cond ((widget-get widget :inline)
         (widget-apply widget :match-inline vals))
-       ((and vals
+       ((and (listp vals)
              (widget-apply widget :match (car vals)))
         (cons (list (car vals)) (cdr vals)))
        (t nil)))
              (widget-apply widget :match (car vals)))
         (cons (list (car vals)) (cdr vals)))
        (t nil)))
@@ -2521,7 +2521,7 @@ when he invoked the menu."
     found))
 
 (defun widget-checklist-match-up (args vals)
     found))
 
 (defun widget-checklist-match-up (args vals)
-  ;; Rerturn the first type from ARGS that matches VALS.
+  ;; Return the first type from ARGS that matches VALS.
   (let (current found)
     (while (and args (null found))
       (setq current (car args)
   (let (current found)
     (while (and args (null found))
       (setq current (car args)
@@ -2543,7 +2543,7 @@ when he invoked the menu."
     result))
 
 (defun widget-checklist-validate (widget)
     result))
 
 (defun widget-checklist-validate (widget)
-  ;; Ticked chilren must be valid.
+  ;; Ticked children must be valid.
   (let ((children (widget-get widget :children))
        child button found)
     (while (and children (not found))
   (let ((children (widget-get widget :children))
        child button found)
     (while (and children (not found))
index faac28f..c60b931 100644 (file)
@@ -295,8 +295,8 @@ or if the window is the only window of its frame."
                        (select-frame frame))))
               ;; check to make sure that the window is the full width
               ;; of the frame
                        (select-frame frame))))
               ;; check to make sure that the window is the full width
               ;; of the frame
-              (eq (nth 2 edges)
-                  (frame-pixel-width))
+              (window-leftmost-p window)
+              (window-rightmost-p window)
               (zerop (nth 0 edges))
               ;; The whole buffer must be visible.
               (pos-visible-in-window-p (point-min) window)
               (zerop (nth 0 edges))
               ;; The whole buffer must be visible.
               (pos-visible-in-window-p (point-min) window)
index 8e6ab44..36da340 100644 (file)
@@ -1,3 +1,26 @@
+2000-02-07  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.28 is released.
+
+2000-01-25  Andy Piper  <andy@xemacs.org>
+
+       * xlwtabs.c (TabsChangeManaged): Make sure we unmanage the hilight
+       widget as well.
+
+2000-01-28  Martin Buchholz  <martin@xemacs.org>
+
+       * xlwgauge.c (GaugeConvert): bcopy ==> memcpy
+
+2000-01-24  Andy Piper  <andy@xemacs.org>
+
+       * xlwtabs.c (XawTabsSetTop): Unhighlight before changing the
+       stacking order.
+       (XawTabsSetHighlight): Don't unhighlight here.
+
+2000-01-22  Martin Buchholz  <martin@xemacs.org>
+
+       * *.h: Use consistent C-standards-approved guard macro names.
+
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
index 67c71f9..4562448 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef LWLIB_XAW_H
-#define LWLIB_XAW_H
+#ifndef INCLUDED_lwlib_Xaw_h_
+#define INCLUDED_lwlib_Xaw_h_
 
 #include "lwlib-internal.h"
 
 
 #include "lwlib-internal.h"
 
@@ -31,4 +31,4 @@ xaw_popup_menu (Widget widget, XEvent *event);
 void
 xaw_pop_instance (widget_instance* instance, Boolean up);
 
 void
 xaw_pop_instance (widget_instance* instance, Boolean up);
 
-#endif /* LWLIB_XAW_H */
+#endif /* INCLUDED_lwlib_Xaw_h_ */
index b030a51..13e48b0 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef LWLIB_XM_H
-#define LWLIB_XM_H
+#ifndef INCLUDED_lwlib_Xm_h_
+#define INCLUDED_lwlib_Xm_h_
 
 #include "lwlib-internal.h"
 
 
 #include "lwlib-internal.h"
 
@@ -36,4 +36,4 @@ xm_pop_instance (widget_instance* instance, Boolean up);
 
 extern Widget first_child (Widget);    /* garbage */
 
 
 extern Widget first_child (Widget);    /* garbage */
 
-#endif /* LWLIB_XM_H */
+#endif /* INCLUDED_lwlib_Xm_h_ */
index 1c6ffd9..df3d66d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef LWLIB_INTERNAL_H
-#define LWLIB_INTERNAL_H
+#ifndef INCLUDED_lwlib_internal_h_
+#define INCLUDED_lwlib_internal_h_
 
 #include "lwlib.h"
 
 
 #include "lwlib.h"
 
@@ -55,5 +55,4 @@ lw_get_widget_value_for_widget (widget_instance* instance, Widget w);
 
 widget_info *lw_get_widget_info (LWLIB_ID id);
 
 
 widget_info *lw_get_widget_info (LWLIB_ID id);
 
-#endif /* LWLIB_INTERNAL_H */
-
+#endif /* INCLUDED_lwlib_internal_h_ */
index 3163a5a..a4d56dd 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _LWLIB_UTILS_H_
-#define _LWLIB_UTILS_H_
+#ifndef INCLUDED_lwlib_utils_h_
+#define INCLUDED_lwlib_utils_h_
 
 void destroy_all_children (Widget widget);
 void XtNoClearRefreshWidget (Widget);
 
 void destroy_all_children (Widget widget);
 void XtNoClearRefreshWidget (Widget);
@@ -21,4 +21,5 @@ void XtSafelyDestroyWidget (Widget);
 #ifdef USE_DEBUG_MALLOC
 #include <dmalloc.h>
 #endif
 #ifdef USE_DEBUG_MALLOC
 #include <dmalloc.h>
 #endif
-#endif /* _LWLIB_UTILS_H_ */
+
+#endif /* INCLUDED_lwlib_utils_h_ */
index 882348d..9e4b20b 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef LWLIB_H
-#define LWLIB_H
+#ifndef INCLUDED_lwlib_h_
+#define INCLUDED_lwlib_h_
 
 #undef CONST
 
 
 #undef CONST
 
@@ -235,4 +235,4 @@ void lw_set_keyboard_focus (Widget parent, Widget w);
  /* Silly Energize hack to invert the "sheet" button */
 void lw_show_busy (Widget w, Boolean busy);
 
  /* Silly Energize hack to invert the "sheet" button */
 void lw_show_busy (Widget w, Boolean busy);
 
-#endif /* LWLIB_H */
+#endif /* INCLUDED_lwlib_h_ */
index 8808ca5..db08040 100644 (file)
@@ -668,7 +668,7 @@ GaugeConvert (Widget        w,
          *rval++ = XA_INTEGER ;
          *rval++ = XA_STRING ;
          *rval++ = XA_TEXT(XtDisplay(w)) ;
          *rval++ = XA_INTEGER ;
          *rval++ = XA_STRING ;
          *rval++ = XA_TEXT(XtDisplay(w)) ;
-         bcopy((char *)stdTargets, (char *)rval, stdLength*sizeof(Atom)) ;
+         memcpy((char *)rval, (char *)stdTargets, stdLength*sizeof(Atom)) ;
          XtFree((char*) stdTargets) ;
          *format = 8*sizeof(Atom) ;    /* TODO: needed? */
          return True ;
          XtFree((char*) stdTargets) ;
          *format = 8*sizeof(Atom) ;    /* TODO: needed? */
          return True ;
index f799fc5..24d9635 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _XlwMenu_h
-#define _XlwMenu_h
+#ifndef INCLUDED_xlwmenu_h_
+#define INCLUDED_xlwmenu_h_
 
 /***********************************************************************
  *
 
 /***********************************************************************
  *
@@ -90,4 +90,4 @@ void xlw_kill_menus (widget_value *val);
 widget_value *xlw_get_entries (int allp);
 int xlw_menu_level (void);
 
 widget_value *xlw_get_entries (int allp);
 int xlw_menu_level (void);
 
-#endif /* _XlwMenu_h */
+#endif /* INCLUDED_xlwmenu_h_ */
index 9b87463..49989a3 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _XlwMenuP_h
-#define _XlwMenuP_h
+#ifndef INCLUDED_xlwmenuP_h_
+#define INCLUDED_xlwmenuP_h_
 
 #include "xlwmenu.h"
 #include <X11/CoreP.h>
 
 #include "xlwmenu.h"
 #include <X11/CoreP.h>
@@ -117,4 +117,4 @@ typedef struct _XlwMenuClassRec
 /* Class pointer. */
 extern XlwMenuClassRec xlwMenuClassRec;
 
 /* Class pointer. */
 extern XlwMenuClassRec xlwMenuClassRec;
 
-#endif /* _XlwMenuP_h */
+#endif /* INCLUDED_xlwmenuP_h_ */
index 1dd4b1b..1d4b7af 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Created by Douglas Keller <dkeller@vnet.ibm.com> */
 
 
 /* Created by Douglas Keller <dkeller@vnet.ibm.com> */
 
-#ifndef _XlwScrollbar_h
-#define _XlwScrollbar_h
+#ifndef INCLUDED_xlwscrollbar_h_
+#define INCLUDED_xlwscrollbar_h_
 
 #include <X11/Core.h>
 
 
 #include <X11/Core.h>
 
@@ -140,4 +140,4 @@ void XlwScrollBarGetValues(Widget widget, int *value, int *sliderSize,
 void XlwScrollBarSetValues(Widget widget, int value, int sliderSize,
                           int increment, int pageIncrement, Boolean notify);
 
 void XlwScrollBarSetValues(Widget widget, int value, int sliderSize,
                           int increment, int pageIncrement, Boolean notify);
 
-#endif
+#endif /* INCLUDED_xlwscrollbar_h_ */
index 5ef2acb..303d149 100644 (file)
@@ -980,6 +980,12 @@ TabsChangeManaged(Widget w)
          tw->tabs.topWidget->core.being_destroyed ) )
       tw->tabs.topWidget = NULL ;
 
          tw->tabs.topWidget->core.being_destroyed ) )
       tw->tabs.topWidget = NULL ;
 
+    /* Check whether the highlight tab is still valid. */
+    if( tw->tabs.hilight != NULL &&
+        ( !XtIsManaged(tw->tabs.hilight) ||
+         tw->tabs.hilight->core.being_destroyed ) )
+      tw->tabs.hilight = NULL ;
+
     GetPreferredSizes(tw) ;
     MakeSizeRequest(tw) ;
 
     GetPreferredSizes(tw) ;
     MakeSizeRequest(tw) ;
 
@@ -1255,6 +1261,7 @@ XawTabsSetTop(Widget w, Bool callCallbacks)
        if( !XtIsRealized(w) ) {
          tw->tabs.topWidget = w ;
          tw->tabs.needs_layout = True ;
        if( !XtIsRealized(w) ) {
          tw->tabs.topWidget = w ;
          tw->tabs.needs_layout = True ;
+         tw->tabs.hilight = NULL; /* The highlight tab might disappear. */
          return ;
        }
 
          return ;
        }
 
@@ -1265,6 +1272,14 @@ XawTabsSetTop(Widget w, Bool callCallbacks)
 #endif
 
        tab = (TabsConstraints) w->core.constraints ;
 #endif
 
        tab = (TabsConstraints) w->core.constraints ;
+
+       /* Unhighlight before we start messing with the stacking order. */
+       if( tw->tabs.hilight != NULL )
+         {
+           DrawHighlight(tw, tw->tabs.hilight, True) ;
+           tw->tabs.hilight = NULL;
+         }
+
        if( tab->tabs.row == 0 )
        {
          /* Easy case; undraw current top, undraw new top, assign new
        if( tab->tabs.row == 0 )
        {
          /* Easy case; undraw current top, undraw new top, assign new
@@ -1307,8 +1322,6 @@ XawTabsSetHighlight(Widget t, Widget w)
 
        if( XtIsRealized(t) && w != tw->tabs.hilight )
        {
 
        if( XtIsRealized(t) && w != tw->tabs.hilight )
        {
-         if( tw->tabs.hilight != NULL )
-           DrawHighlight(tw, tw->tabs.hilight, True) ;
          if( w != NULL )
            DrawHighlight(tw, w, False) ;
        }
          if( w != NULL )
            DrawHighlight(tw, w, False) ;
        }
index cefb9e8..63f736f 100644 (file)
@@ -1,3 +1,71 @@
+2000-02-07  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.28 is released.
+
+2000-02-07  Martin Buchholz  <martin@xemacs.org>
+
+       * cl.texi: Remove (or replace by `get') references to `get*'.
+
+2000-01-25  Yoshiki Hayashi  <yoshiki@xemacs.org>
+
+       * widget.texi:
+       * internals/internals.texi:
+       * lispref/commands.texi:
+       * lispref/consoles-devices.texi:
+       * lispref/customize.texi:
+       * lispref/dialog.texi:
+       * lispref/extents.texi:
+       * lispref/faces.texi:
+       * lispref/glyphs.texi:
+       * lispref/keymaps.texi:
+       * lispref/lists.texi:
+       * lispref/markers.texi:
+       * lispref/menus.texi:
+       * lispref/mule.texi:
+       * lispref/objects.texi:
+       * lispref/specifiers.texi:
+       * lispref/toolbar.texi:
+       * lispref/tooltalk.texi:
+       * lispref/x-windows.texi:
+       * new-users-guide/custom2.texi:
+       * new-users-guide/help.texi:
+       * new-users-guide/modes.texi:
+       * xemacs/abbrevs.texi:
+       * xemacs/buffers.texi:
+       * xemacs/custom.texi:
+       * xemacs/help.texi:
+       * xemacs/keystrokes.texi:
+       * xemacs/mini.texi:
+       * xemacs/new.texi:
+       * xemacs/packages.texi:
+       * xemacs/programs.texi:
+       * xemacs/sending.texi:
+       Change ' -- ' to '---' since Texinfo formats --- to --.
+       Untabify.  TeX doesn't like TAB.
+
+2000-01-27  Sandra Wambold  <wambold@xemacs.org>
+
+       * xemacs-faq.texi (Q6.2.2): updated font instructions to include
+       21.2.*
+
+2000-01-25  Yoshiki Hayashi  <yoshiki@xemacs.org>
+
+       * xemacs-faq.texi: Untabify.
+       
+2000-01-22  Martin Buchholz  <martin@xemacs.org>
+
+       * internals/internals.texi (General Coding Rules): Document why we
+       #include <config.h>
+
+2000-01-21  Yoshiki Hayashi  <yoshiki@xemacs.org>
+
+       * xemacs-faq.texi: Change ' -- ' to '---'.
+       
+2000-01-19  Yoshiki Hayashi  <yoshiki@xemacs.org>
+
+       * lispref/faces.texi (Face Properties): Document
+       remove-face-property.
+
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
index 2561564..8250898 100644 (file)
@@ -295,10 +295,10 @@ the Emacs name:
 
 @example
 defun*        defsubst*     defmacro*     function*
 
 @example
 defun*        defsubst*     defmacro*     function*
-member*       assoc*        rassoc*       get*
-remove*       delete*       mapcar*       sort*
-floor*        ceiling*      truncate*     round*
-mod*          rem*          random*
+member*       assoc*        rassoc*       remove*
+delete*       mapcar*       sort*         floor*
+ceiling*      truncate*     round*        mod*
+rem*          random*
 @end example
 
 Internal function and variable names in the package are prefixed
 @end example
 
 Internal function and variable names in the package are prefixed
@@ -1084,8 +1084,8 @@ car                 cdr                 caar .. cddddr
 nth                 rest                first .. tenth
 aref                elt                 nthcdr
 symbol-function     symbol-value        symbol-plist
 nth                 rest                first .. tenth
 aref                elt                 nthcdr
 symbol-function     symbol-value        symbol-plist
-get                 get*                getf
-gethash             subseq
+get                 getf                gethash
+subseq
 @end smallexample
 
 @noindent
 @end smallexample
 
 @noindent
@@ -3297,7 +3297,7 @@ This package defines several symbol-related features that were
 missing from Emacs Lisp.
 
 @menu
 missing from Emacs Lisp.
 
 @menu
-* Property Lists::       `get*', `remprop', `getf', `remf'
+* Property Lists::       `remprop', `getf', `remf'
 * Creating Symbols::     `gensym', `gentemp'
 @end menu
 
 * Creating Symbols::     `gensym', `gentemp'
 @end menu
 
@@ -3310,17 +3310,6 @@ and @code{put} for operating on properties attached to symbols.
 There are also functions for working with property lists as
 first-class data structures not attached to particular symbols.
 
 There are also functions for working with property lists as
 first-class data structures not attached to particular symbols.
 
-@defun get* symbol property &optional default
-This function is like @code{get}, except that if the property is
-not found, the @var{default} argument provides the return value.
-(The Emacs Lisp @code{get} function always uses @code{nil} as
-the default; this package's @code{get*} is equivalent to Common
-Lisp's @code{get}.)
-
-The @code{get*} function is @code{setf}-able; when used in this
-fashion, the @var{default} argument is allowed but ignored.
-@end defun
-
 @defun remprop symbol property
 This function removes the entry for @var{property} from the property
 list of @var{symbol}.  It returns a true value if the property was
 @defun remprop symbol property
 This function removes the entry for @var{property} from the property
 list of @var{symbol}.  It returns a true value if the property was
@@ -3357,11 +3346,11 @@ pair onto the list if the property is not yet present.
 (put sym prop val)  @equiv{}  (setf (getf (symbol-plist sym) prop) val)
 @end example
 
 (put sym prop val)  @equiv{}  (setf (getf (symbol-plist sym) prop) val)
 @end example
 
-The @code{get} and @code{get*} functions are also @code{setf}-able.
-The fact that @code{default} is ignored can sometimes be useful:
+The @code{get} function is also @code{setf}-able.  The fact that
+@code{default} is ignored can sometimes be useful:
 
 @example
 
 @example
-(incf (get* 'foo 'usage-count 0))
+(incf (get 'foo 'usage-count 0))
 @end example
 
 Here, symbol @code{foo}'s @code{usage-count} property is incremented
 @end example
 
 Here, symbol @code{foo}'s @code{usage-count} property is incremented
@@ -4653,7 +4642,7 @@ corresponding value is changed to the stored value.  If @var{key}
 does not already exist, a new entry is added to the table and the
 table is reallocated to a larger size if necessary.  The @var{default}
 argument is allowed but ignored in this case.  The situation is
 does not already exist, a new entry is added to the table and the
 table is reallocated to a larger size if necessary.  The @var{default}
 argument is allowed but ignored in this case.  The situation is
-exactly analogous to that of @code{get*}; @pxref{Property Lists}.
+exactly analogous to that of @code{get}; @pxref{Property Lists}.
 @end defun
 
 @defun remhash key table
 @end defun
 
 @defun remhash key table
index 3ec9d63..2e52fa2 100644 (file)
@@ -160,7 +160,7 @@ ways than you can imagine, it does have its short-comings.
   Firstly, Elisp is an interpreted language, and this has serious speed
 implications.  Like all other interpreted languages (like Java), Elisp
 is often suitable only for certain types of application or extension.
   Firstly, Elisp is an interpreted language, and this has serious speed
 implications.  Like all other interpreted languages (like Java), Elisp
 is often suitable only for certain types of application or extension.
-So although Elisp is a general purpose language, and very ligh level,
+So although Elisp is a general purpose language, and very high level,
 there are times when it is desirable to descend to a lower level compiled 
 language for speed purposes.
 
 there are times when it is desirable to descend to a lower level compiled 
 language for speed purposes.
 
index 81b32d4..92819b7 100644 (file)
@@ -7,7 +7,7 @@
 @ifinfo
 @dircategory XEmacs Editor
 @direntry
 @ifinfo
 @dircategory XEmacs Editor
 @direntry
-* Internals: (internals).      XEmacs Internals Manual.
+* Internals: (internals).       XEmacs Internals Manual.
 @end direntry
 
 Copyright @copyright{} 1992 - 1996 Ben Wing.
 @end direntry
 
 Copyright @copyright{} 1992 - 1996 Ben Wing.
@@ -700,7 +700,7 @@ Some of these objects (in particular windows and frames) have
 displayable representations, and XEmacs provides a function
 @code{redisplay()} that ensures that the display of all such objects
 matches their internal state.  Most of the time, a standard Lisp
 displayable representations, and XEmacs provides a function
 @code{redisplay()} that ensures that the display of all such objects
 matches their internal state.  Most of the time, a standard Lisp
-environment is in a @dfn{read-eval-print} loop -- i.e. ``read some Lisp
+environment is in a @dfn{read-eval-print} loop---i.e. ``read some Lisp
 code, execute it, and print the results''.  XEmacs has a similar loop:
 
 @itemize @bullet
 code, execute it, and print the results''.  XEmacs has a similar loop:
 
 @itemize @bullet
@@ -875,7 +875,7 @@ a default handler, generally installed by the top-level event loop, is
 executed; this prints out the error and continues.) Routines can also
 specify cleanup code (called an @dfn{unwind-protect}) that will be
 called when control exits from a block of code, no matter how that exit
 executed; this prints out the error and continues.) Routines can also
 specify cleanup code (called an @dfn{unwind-protect}) that will be
 called when control exits from a block of code, no matter how that exit
-occurs -- i.e. even if a function deeply nested below it causes a
+occurs---i.e. even if a function deeply nested below it causes a
 non-local exit back to the top level.
 
 Note that this facility has appeared in some recent vintages of C, in
 non-local exit back to the top level.
 
 Note that this facility has appeared in some recent vintages of C, in
@@ -889,7 +889,7 @@ call another function, that subfunction can ``see'' the local variable
 you declared.  This is actually considered a bug in Emacs Lisp and in
 all other early dialects of Lisp, and was corrected in Common Lisp. (In
 Common Lisp, you can still declare dynamically scoped variables if you
 you declared.  This is actually considered a bug in Emacs Lisp and in
 all other early dialects of Lisp, and was corrected in Common Lisp. (In
 Common Lisp, you can still declare dynamically scoped variables if you
-want to -- they are sometimes useful -- but variables by default are
+want to---they are sometimes useful---but variables by default are
 @dfn{lexically scoped} as in C.)
 @end enumerate
 
 @dfn{lexically scoped} as in C.)
 @end enumerate
 
@@ -1247,9 +1247,9 @@ most other data structures in Lisp.
 An object representing a single character of text; chars behave like
 integers in many ways but are logically considered text rather than
 numbers and have a different read syntax. (the read syntax for a char
 An object representing a single character of text; chars behave like
 integers in many ways but are logically considered text rather than
 numbers and have a different read syntax. (the read syntax for a char
-contains the char itself or some textual encoding of it -- for example,
+contains the char itself or some textual encoding of it---for example,
 a Japanese Kanji character might be encoded as @samp{^[$(B#&^[(B} using the
 a Japanese Kanji character might be encoded as @samp{^[$(B#&^[(B} using the
-ISO-2022 encoding standard -- rather than the numerical representation
+ISO-2022 encoding standard---rather than the numerical representation
 of the char; this way, if the mapping between chars and integers
 changes, which is quite possible for Kanji characters and other extended
 characters, the same character will still be created.  Note that some
 of the char; this way, if the mapping between chars and integers
 changes, which is quite possible for Kanji characters and other extended
 characters, the same character will still be created.  Note that some
@@ -1601,10 +1601,10 @@ the lower 28 bits contain the value of the integer or char; for all
 others, the lower 28 bits contain a pointer.  The mark bit is used
 during garbage-collection, and is always 0 when garbage collection is
 not happening. (The way that garbage collection works, basically, is that it
 others, the lower 28 bits contain a pointer.  The mark bit is used
 during garbage-collection, and is always 0 when garbage collection is
 not happening. (The way that garbage collection works, basically, is that it
-loops over all places where Lisp objects could exist -- this includes
+loops over all places where Lisp objects could exist---this includes
 all global variables in C that contain Lisp objects [including
 @code{Vobarray}, the C equivalent of @code{obarray}; through this, all
 all global variables in C that contain Lisp objects [including
 @code{Vobarray}, the C equivalent of @code{obarray}; through this, all
-Lisp variables will get marked], plus various other places -- and
+Lisp variables will get marked], plus various other places---and
 recursively scans through the Lisp objects, marking each object it finds
 by setting the mark bit.  Then it goes through the lists of all objects
 allocated, freeing the ones that are not marked and turning off the mark
 recursively scans through the Lisp objects, marking each object it finds
 by setting the mark bit.  Then it goes through the lists of all objects
 allocated, freeing the ones that are not marked and turning off the mark
@@ -1718,10 +1718,10 @@ complicated definition is selected by defining
 @code{EXPLICIT_SIGN_EXTEND}.
 
 Note that when @code{ERROR_CHECK_TYPECHECK} is defined, the extractor
 @code{EXPLICIT_SIGN_EXTEND}.
 
 Note that when @code{ERROR_CHECK_TYPECHECK} is defined, the extractor
-macros become more complicated -- they check the tag bits and/or the
+macros become more complicated---they check the tag bits and/or the
 type field in the first four bytes of a record type to ensure that the
 object is really of the correct type.  This is great for catching places
 type field in the first four bytes of a record type to ensure that the
 object is really of the correct type.  This is great for catching places
-where an incorrect type is being dereferenced -- this typically results
+where an incorrect type is being dereferenced---this typically results
 in a pointer being dereferenced as the wrong type of structure, with
 unpredictable (and sometimes not easily traceable) results.
 
 in a pointer being dereferenced as the wrong type of structure, with
 unpredictable (and sometimes not easily traceable) results.
 
@@ -1798,6 +1798,15 @@ must always be included before any other header files (including
 system header files) to ensure that certain tricks played by various
 @file{s/} and @file{m/} files work out correctly.
 
 system header files) to ensure that certain tricks played by various
 @file{s/} and @file{m/} files work out correctly.
 
+When including header files, always use angle brackets, not double
+quotes, except when the file to be included is in the same directory as
+the including file.  If either file is a generated file, then that is
+not likely to be the case.  In order to understand why we have this
+rule, imagine what happens when you do a build in the source directory
+using @samp{./configure} and another build in another directory using
+@samp{../work/configure}.  There will be two different @file{config.h}
+files.  Which one will be used if you @samp{#include "config.h"}?
+
 @strong{All global and static variables that are to be modifiable must
 be declared uninitialized.}  This means that you may not use the
 ``declare with initializer'' form for these variables, such as @code{int
 @strong{All global and static variables that are to be modifiable must
 be declared uninitialized.}  This means that you may not use the
 ``declare with initializer'' form for these variables, such as @code{int
@@ -1807,7 +1816,7 @@ segment is re-mapped so that it becomes part of the (unmodifiable) code
 segment in the dumped executable.  This allows this memory to be shared
 among multiple running XEmacs processes.  XEmacs is careful to place as
 much constant data as possible into initialized variables (in
 segment in the dumped executable.  This allows this memory to be shared
 among multiple running XEmacs processes.  XEmacs is careful to place as
 much constant data as possible into initialized variables (in
-particular, into what's called the @dfn{pure space} -- see below) during
+particular, into what's called the @dfn{pure space}---see below) during
 the @file{temacs} phase.
 
 @cindex copy-on-write
 the @file{temacs} phase.
 
 @cindex copy-on-write
@@ -1842,10 +1851,10 @@ The C source code makes heavy use of C preprocessor macros.  One popular
 macro style is:
 
 @example
 macro style is:
 
 @example
-#define FOO(var, value) do @{          \
-  Lisp_Object FOO_value = (value);     \
-  ... /* compute using FOO_value */    \
-  (var) = bar;                         \
+#define FOO(var, value) do @{           \
+  Lisp_Object FOO_value = (value);      \
+  ... /* compute using FOO_value */     \
+  (var) = bar;                          \
 @} while (0)
 @end example
 
 @} while (0)
 @end example
 
@@ -2983,7 +2992,7 @@ the structure itself is defined elsewhere) should be placed into the
 typedefs section as necessary.
 
 @file{lrecord.h} contains the basic structures and macros that implement
 typedefs section as necessary.
 
 @file{lrecord.h} contains the basic structures and macros that implement
-all record-type Lisp objects -- i.e. all objects whose type is a field
+all record-type Lisp objects---i.e. all objects whose type is a field
 in their C structure, which includes all objects except the few most
 basic ones.
 
 in their C structure, which includes all objects except the few most
 basic ones.
 
@@ -3019,7 +3028,7 @@ particular types of objects using a standardized interface of
 type-specific methods.  This scheme is a fundamental principle of
 object-oriented programming and is heavily used throughout XEmacs.  The
 great advantage of this is that it allows for a clean separation of
 type-specific methods.  This scheme is a fundamental principle of
 object-oriented programming and is heavily used throughout XEmacs.  The
 great advantage of this is that it allows for a clean separation of
-functionality into different modules -- new classes of Lisp objects, new
+functionality into different modules---new classes of Lisp objects, new
 event interfaces, new device types, new stream interfaces, etc. can be
 added transparently without affecting code anywhere else in XEmacs.
 Because the different subsystems are divided into general and specific
 event interfaces, new device types, new stream interfaces, etc. can be
 added transparently without affecting code anywhere else in XEmacs.
 Because the different subsystems are divided into general and specific
@@ -3110,7 +3119,7 @@ symeval.h
 @file{symbols.c} implements the handling of symbols, obarrays, and
 retrieving the values of symbols.  Much of the code is devoted to
 handling the special @dfn{symbol-value-magic} objects that define
 @file{symbols.c} implements the handling of symbols, obarrays, and
 retrieving the values of symbols.  Much of the code is devoted to
 handling the special @dfn{symbol-value-magic} objects that define
-special types of variables -- this includes buffer-local variables,
+special types of variables---this includes buffer-local variables,
 variable aliases, variables that forward into C variables, etc.  This
 module is initialized extremely early (right after @file{alloc.c}),
 because it is here that the basic symbols @code{t} and @code{nil} are
 variable aliases, variables that forward into C variables, etc.  This
 module is initialized extremely early (right after @file{alloc.c}),
 because it is here that the basic symbols @code{t} and @code{nil} are
@@ -3389,7 +3398,7 @@ keyboard.c
 @end example
 
 @file{keyboard.c} contains functions that implement the actual editor
 @end example
 
 @file{keyboard.c} contains functions that implement the actual editor
-command loop -- i.e. the event loop that cyclically retrieves and
+command loop---i.e. the event loop that cyclically retrieves and
 dispatches events.  This code is also rather tricky, just like
 @file{event-stream.c}.
 
 dispatches events.  This code is also rather tricky, just like
 @file{event-stream.c}.
 
@@ -3557,7 +3566,7 @@ toolbar.h
 font-lock.c
 @end example
 
 font-lock.c
 @end example
 
-This file provides C support for syntax highlighting -- i.e.
+This file provides C support for syntax highlighting---i.e.
 highlighting different syntactic constructs of a source file in
 different colors, for easy reading.  The C support is provided so that
 this is fast.
 highlighting different syntactic constructs of a source file in
 different colors, for easy reading.  The C support is provided so that
 this is fast.
@@ -3862,7 +3871,7 @@ Opaque objects can also have an arbitrary @dfn{mark method} associated
 with them, in case the block of memory contains other Lisp objects that
 need to be marked for garbage-collection purposes. (If you need other
 object methods, such as a finalize method, you should just go ahead and
 with them, in case the block of memory contains other Lisp objects that
 need to be marked for garbage-collection purposes. (If you need other
 object methods, such as a finalize method, you should just go ahead and
-create a new Lisp object type -- it's not hard.)
+create a new Lisp object type---it's not hard.)
 
 
 
 
 
 
@@ -4439,7 +4448,7 @@ With the exception of vectors, objects in this category are allocated in
 @dfn{frob blocks}, i.e. large blocks of memory that are subdivided into
 individual objects.  This saves a lot on malloc overhead, since there
 are typically quite a lot of these objects around, and the objects are
 @dfn{frob blocks}, i.e. large blocks of memory that are subdivided into
 individual objects.  This saves a lot on malloc overhead, since there
 are typically quite a lot of these objects around, and the objects are
-small.  (A cons, for example, occupies 8 bytes on 32-bit machines -- 4
+small.  (A cons, for example, occupies 8 bytes on 32-bit machines---4
 bytes for each of the two objects it contains.) Vectors are individually
 @code{malloc()}ed since they are of variable size.  (It would be
 possible, and desirable, to allocate vectors of certain small sizes out
 bytes for each of the two objects it contains.) Vectors are individually
 @code{malloc()}ed since they are of variable size.  (It would be
 possible, and desirable, to allocate vectors of certain small sizes out
@@ -4629,7 +4638,7 @@ local @code{gcpro} variable pointing to the first @code{gcpro} variable
 in the next enclosing stack frame.  Each @code{GCPRO}ed thing is an
 lvalue, and the @code{struct gcpro} local variable contains a pointer to
 this lvalue.  This is why things will mess up badly if you don't pair up
 in the next enclosing stack frame.  Each @code{GCPRO}ed thing is an
 lvalue, and the @code{struct gcpro} local variable contains a pointer to
 this lvalue.  This is why things will mess up badly if you don't pair up
-the @code{GCPRO}s and @code{UNGCPRO}s -- you will end up with
+the @code{GCPRO}s and @code{UNGCPRO}s---you will end up with
 @code{gcprolist}s containing pointers to @code{struct gcpro}s or local
 @code{Lisp_Object} variables in no-longer-active stack frames.
 
 @code{gcprolist}s containing pointers to @code{struct gcpro}s or local
 @code{Lisp_Object} variables in no-longer-active stack frames.
 
@@ -5667,8 +5676,8 @@ to fit into a string-chars block.  Such strings, called @dfn{big
 strings}, are all @code{malloc()}ed as their own block. (#### Although it
 would make more sense for the threshold for big strings to be somewhat
 lower, e.g. 1/2 or 1/4 the size of a string-chars block.  It seems that
 strings}, are all @code{malloc()}ed as their own block. (#### Although it
 would make more sense for the threshold for big strings to be somewhat
 lower, e.g. 1/2 or 1/4 the size of a string-chars block.  It seems that
-this was indeed the case formerly -- indeed, the threshold was set at
-1/8 -- but Mly forgot about this when rewriting things for 19.8.)
+this was indeed the case formerly---indeed, the threshold was set at
+1/8---but Mly forgot about this when rewriting things for 19.8.)
 
 Note also that the string data in string-chars blocks is padded as
 necessary so that proper alignment constraints on the @code{struct
 
 Note also that the string data in string-chars blocks is padded as
 necessary so that proper alignment constraints on the @code{struct
@@ -5747,7 +5756,7 @@ which provides an abstract layer on top of the system-dependent
 nature of the most basic events that are received.  Part of the
 complex nature of the XEmacs event collection process involves
 converting from the operating-system events into the proper
 nature of the most basic events that are received.  Part of the
 complex nature of the XEmacs event collection process involves
 converting from the operating-system events into the proper
-Emacs events -- there may not be a one-to-one correspondence.
+Emacs events---there may not be a one-to-one correspondence.
 
   Emacs events are documented in @file{events.h}; I'll discuss them
 later.
 
   Emacs events are documented in @file{events.h}; I'll discuss them
 later.
@@ -5772,7 +5781,7 @@ constructs full key sequences is called the @dfn{command builder}.
 This is documented elsewhere.
 
   The guts of the command loop are in @code{command_loop_1()}.  This
 This is documented elsewhere.
 
   The guts of the command loop are in @code{command_loop_1()}.  This
-function doesn't catch errors, though -- that's the job of
+function doesn't catch errors, though---that's the job of
 @code{command_loop_2()}, which is a condition-case (i.e. error-trapping)
 wrapper around @code{command_loop_1()}.  @code{command_loop_1()} never
 returns, but may get thrown out of.
 @code{command_loop_2()}, which is a condition-case (i.e. error-trapping)
 wrapper around @code{command_loop_1()}.  @code{command_loop_1()} never
 returns, but may get thrown out of.
@@ -7492,8 +7501,8 @@ value is -1 for EOF or error.
 @deftypefn Macro void Lstream_ungetc (Lstream *@var{stream}, int @var{c})
 Push one byte back onto the input queue.  This will be the next byte
 read from the stream.  Any number of bytes can be pushed back and will
 @deftypefn Macro void Lstream_ungetc (Lstream *@var{stream}, int @var{c})
 Push one byte back onto the input queue.  This will be the next byte
 read from the stream.  Any number of bytes can be pushed back and will
-be read in the reverse order they were pushed back -- most recent
-first. (This is necessary for consistency -- if there are a number of
+be read in the reverse order they were pushed back---most recent
+first. (This is necessary for consistency---if there are a number of
 bytes that have been unread and I read and unread a byte, it needs to be
 the first to be read again.) This is a macro and so it is very
 efficient.  The @var{c} argument is only evaluated once but the @var{stream}
 bytes that have been unread and I read and unread a byte, it needs to be
 the first to be read again.) This is a macro and so it is very
 efficient.  The @var{c} argument is only evaluated once but the @var{stream}
@@ -7531,7 +7540,7 @@ Close the stream.  All data will be flushed out.
 @deftypefun void Lstream_reopen (Lstream *@var{stream})
 Reopen a closed stream.  This enables I/O on it again.  This is not
 meant to be called except from a wrapper routine that reinitializes
 @deftypefun void Lstream_reopen (Lstream *@var{stream})
 Reopen a closed stream.  This enables I/O on it again.  This is not
 meant to be called except from a wrapper routine that reinitializes
-variables and such -- the close routine may well have freed some
+variables and such---the close routine may well have freed some
 necessary storage structures, for example.
 @end deftypefun
 
 necessary storage structures, for example.
 @end deftypefun
 
@@ -7577,7 +7586,7 @@ Rewind the stream.  If this is @code{NULL}, the stream is not seekable.
 @end deftypefn
 
 @deftypefn {Lstream Method} int seekable_p (Lstream *@var{stream})
 @end deftypefn
 
 @deftypefn {Lstream Method} int seekable_p (Lstream *@var{stream})
-Indicate whether this stream is seekable -- i.e. it can be rewound.
+Indicate whether this stream is seekable---i.e. it can be rewound.
 This method is ignored if the stream does not have a rewind method.  If
 this method is not present, the result is determined by whether a rewind
 method is present.
 This method is ignored if the stream does not have a rewind method.  If
 this method is not present, the result is determined by whether a rewind
 method is present.
@@ -7746,7 +7755,7 @@ means ``side-by-side'' and @dfn{vertically-arrayed} means
 @item
 Leaf windows also have markers in their @code{start} (the
 first buffer position displayed in the window) and @code{pointm}
 @item
 Leaf windows also have markers in their @code{start} (the
 first buffer position displayed in the window) and @code{pointm}
-(the window's stashed value of @code{point} -- see above) fields,
+(the window's stashed value of @code{point}---see above) fields,
 while combination windows have nil in these fields.
 
 @item
 while combination windows have nil in these fields.
 
 @item
@@ -7762,7 +7771,7 @@ does nothing except set a special @code{dead} bit to 1 and clear out the
 GC purposes.
 
 @item
 GC purposes.
 
 @item
-Most frames actually have two top-level windows -- one for the
+Most frames actually have two top-level windows---one for the
 minibuffer and one (the @dfn{root}) for everything else.  The modeline
 (if present) separates these two.  The @code{next} field of the root
 points to the minibuffer, and the @code{prev} field of the minibuffer
 minibuffer and one (the @dfn{root}) for everything else.  The modeline
 (if present) separates these two.  The @code{next} field of the root
 points to the minibuffer, and the @code{prev} field of the minibuffer
@@ -7983,7 +7992,7 @@ scrolling around viewing a buffer there is a high probability that this
 is sufficient to always provide the needed information.  The second
 thing we can do is be smart about invalidating the cache.
 
 is sufficient to always provide the needed information.  The second
 thing we can do is be smart about invalidating the cache.
 
-  TODO -- Be smart about invalidating the cache.  Potential places:
+  TODO---Be smart about invalidating the cache.  Potential places:
 
 @itemize @bullet
 @item
 
 @itemize @bullet
 @item
@@ -8125,7 +8134,7 @@ all occurrences of ``display order'' and ``e-order'', ``less than'' and
   An extent-info structure consists of a list of the buffer or string's
 extents and a @dfn{stack of extents} that lists all of the extents over
 a particular position.  The stack-of-extents info is used for
   An extent-info structure consists of a list of the buffer or string's
 extents and a @dfn{stack of extents} that lists all of the extents over
 a particular position.  The stack-of-extents info is used for
-optimization purposes -- it basically caches some info that might
+optimization purposes---it basically caches some info that might
 be expensive to compute.  Certain otherwise hard computations are easy
 given the stack of extents over a particular position, and if the
 stack of extents over a nearby position is known (because it was
 be expensive to compute.  Certain otherwise hard computations are easy
 given the stack of extents over a particular position, and if the
 stack of extents over a nearby position is known (because it was
@@ -8327,7 +8336,7 @@ and thus is in @math{S}, and thus @math{F2 >= F}.
 
   An extent fragment is a structure that holds data about the run that
 contains a particular buffer position (if the buffer position is at the
 
   An extent fragment is a structure that holds data about the run that
 contains a particular buffer position (if the buffer position is at the
-junction of two runs, the run after the position is used) -- the
+junction of two runs, the run after the position is used)---the
 beginning and end of the run, a list of all of the extents in that run,
 the @dfn{merged face} that results from merging all of the faces
 corresponding to those extents, the begin and end glyphs at the
 beginning and end of the run, a list of all of the extents in that run,
 the @dfn{merged face} that results from merging all of the faces
 corresponding to those extents, the begin and end glyphs at the
@@ -8377,7 +8386,7 @@ cached on a window basis.
 Any action on a glyph first consults the cache before actually
 instantiating a widget.
 
 Any action on a glyph first consults the cache before actually
 instantiating a widget.
 
-@section Widget-Glyphs in the MS-WIndows Environment
+@section Widget-Glyphs in the MS-Windows Environment
 
 To Do
 
 
 To Do
 
index 9fc3616..d68d1b4 100644 (file)
@@ -1456,7 +1456,7 @@ and other ways of representing keys.  These are useful when working with
 This function converts a numeric @sc{ascii} value to an event structure,
 replete with modifier bits.  @var{ch} is the character to convert, and
 @var{event} is the event object to fill in.  This function contains
 This function converts a numeric @sc{ascii} value to an event structure,
 replete with modifier bits.  @var{ch} is the character to convert, and
 @var{event} is the event object to fill in.  This function contains
-knowledge about what the codes ``mean'' -- for example, the number 9 is
+knowledge about what the codes ``mean''---for example, the number 9 is
 converted to the character @key{Tab}, not the distinct character
 @key{Control-I}.
 
 converted to the character @key{Tab}, not the distinct character
 @key{Control-I}.
 
@@ -1632,13 +1632,13 @@ convenience; it is equivalent to the Lisp code
 
 @lisp
 @group
 
 @lisp
 @group
-       (while (progn
-                (next-event event)
-                (not (or (key-press-event-p event)
-                         (button-press-event-p event)
-                         (button-release-event-p event)
-                         (menu-event-p event))))
-          (dispatch-event event))
+        (while (progn
+                 (next-event event)
+                 (not (or (key-press-event-p event)
+                          (button-press-event-p event)
+                          (button-release-event-p event)
+                          (menu-event-p event))))
+           (dispatch-event event))
 @end group
 @end lisp
 
 @end group
 @end lisp
 
index 9f52610..def33d0 100644 (file)
@@ -11,7 +11,7 @@
   A @dfn{console} is an object representing a single input connection
 to XEmacs, such as an X display or a TTY connection.  It is possible
 for XEmacs to have frames on multiple consoles at once (even on
   A @dfn{console} is an object representing a single input connection
 to XEmacs, such as an X display or a TTY connection.  It is possible
 for XEmacs to have frames on multiple consoles at once (even on
-heterogeneous types -- you can simultaneously have a frame on an
+heterogeneous types---you can simultaneously have a frame on an
 X display and a TTY connection).  Normally, there is only one
 console in existence.
 
 X display and a TTY connection).  Normally, there is only one
 console in existence.
 
index 6d7a3a5..4c2c260 100644 (file)
@@ -262,7 +262,7 @@ Keywords}.  Here is an example, from the library @file{paren.el}:
 (defcustom show-paren-mode nil
   "Toggle Show Paren mode@enddots{}"
   :set (lambda (symbol value)
 (defcustom show-paren-mode nil
   "Toggle Show Paren mode@enddots{}"
   :set (lambda (symbol value)
-        (show-paren-mode (or value 0)))
+         (show-paren-mode (or value 0)))
   :initialize 'custom-initialize-default
   :type 'boolean
   :group 'paren-showing
   :initialize 'custom-initialize-default
   :type 'boolean
   :group 'paren-showing
index 1156308..7aba6fb 100644 (file)
@@ -44,15 +44,15 @@ that all following buttons should be flushright instead of flushleft.
 The syntax, more precisely:
 
 @example
 The syntax, more precisely:
 
 @example
-   form                :=  <something to pass to `eval'>
-   command     :=  <a symbol or string, to pass to `call-interactively'>
-   callback    :=  command | form
-   active-p    :=  <t, nil, or a form to evaluate to decide whether this
-                   button should be selectable>
-   name                :=  <string>
-   partition   :=  'nil'
-   button      :=  '['  name callback active-p ']'
-   dialog      :=  '(' name [ button ]+ [ partition [ button ]+ ] ')'
+   form         :=  <something to pass to `eval'>
+   command      :=  <a symbol or string, to pass to `call-interactively'>
+   callback     :=  command | form
+   active-p     :=  <t, nil, or a form to evaluate to decide whether this
+                    button should be selectable>
+   name         :=  <string>
+   partition    :=  'nil'
+   button       :=  '['  name callback active-p ']'
+   dialog       :=  '(' name [ button ]+ [ partition [ button ]+ ] ')'
 @end example
 
 @node Dialog Box Functions
 @end example
 
 @node Dialog Box Functions
index 150c00a..e332f78 100644 (file)
@@ -286,7 +286,7 @@ control.
 
   The following low-level functions are provided for explicitly
 traversing the extents in a buffer according to the display order.
 
   The following low-level functions are provided for explicitly
 traversing the extents in a buffer according to the display order.
-These functions are mostly intended for debugging -- in normal
+These functions are mostly intended for debugging---in normal
 operation, you should probably use @code{mapcar-extents} or
 @code{map-extents}, or loop using the @var{before} argument to
 @code{extent-at}, rather than creating a loop using @code{next-extent}.
 operation, you should probably use @code{mapcar-extents} or
 @code{map-extents}, or loop using the @var{before} argument to
 @code{extent-at}, rather than creating a loop using @code{next-extent}.
@@ -778,7 +778,7 @@ become visible again.)
   It is possible for an extent's parent to itself have a parent,
 and so on.  Through this, a whole tree of extents can be created,
 all deriving their properties from one root extent.  Note, however,
   It is possible for an extent's parent to itself have a parent,
 and so on.  Through this, a whole tree of extents can be created,
 all deriving their properties from one root extent.  Note, however,
-that you cannot create an inheritance loop -- this is explicitly
+that you cannot create an inheritance loop---this is explicitly
 disallowed.
 
   Parent extents are used to implement the extents over the modeline.
 disallowed.
 
   Parent extents are used to implement the extents over the modeline.
index 8a6b0ae..9afd173 100644 (file)
@@ -248,6 +248,21 @@ specifier, it will automatically be converted into a @code{generic}
 specifier.
 @end defun
 
 specifier.
 @end defun
 
+@defun remove-face-property face property &optional local tag-set exact-p
+This function removes a property of a @var{face}.
+
+For built-in properties, this is analogous to @code{remove-specifier}.
+For more information, @xref{Other Specification Functions}.
+
+When @var{property} is not a built-in property, this function will just
+remove its value if @var{locale} is @code{nil} or @code{all}.  However,
+if @var{locale} is other than that, this function will attempt to remove
+@var{value} as the instantiator for the given @var{locale} with
+@code{remove-specifier}.  If the value of the property is not a
+specifier, it will be converted into a @code{generic} specifier
+automatically.
+@end defun
+
 @defun face-property face property &optional locale
 This function returns @var{face}'s value of the given @var{property}.
 
 @defun face-property face property &optional locale
 This function returns @var{face}'s value of the given @var{property}.
 
index c2e2b06..1c71406 100644 (file)
@@ -429,7 +429,7 @@ for experimentation purposes.  @xref{Specifiers}.
   Image instantiators come in many formats: @code{xbm}, @code{xpm},
 @code{gif}, @code{jpeg}, etc.  This describes the format of the data
 describing the image.  The resulting image instances also come in many
   Image instantiators come in many formats: @code{xbm}, @code{xpm},
 @code{gif}, @code{jpeg}, etc.  This describes the format of the data
 describing the image.  The resulting image instances also come in many
-types -- @code{mono-pixmap}, @code{color-pixmap}, @code{text},
+types---@code{mono-pixmap}, @code{color-pixmap}, @code{text},
 @code{pointer}, etc.  This refers to the behavior of the image and the
 sorts of places it can appear. (For example, a color-pixmap image has
 fixed colors specified for it, while a mono-pixmap image comes in two
 @code{pointer}, etc.  This refers to the behavior of the image and the
 sorts of places it can appear. (For example, a color-pixmap image has
 fixed colors specified for it, while a mono-pixmap image comes in two
index e7ea2a7..f727df8 100644 (file)
@@ -279,23 +279,23 @@ elements of this vector may also be keysyms if they have no modifiers.
 That is, the @kbd{A} keystroke is represented by all of these forms:
 
 @example
 That is, the @kbd{A} keystroke is represented by all of these forms:
 
 @example
-       A       ?A      65      (A)     (?A)    (65)
-       [A]     [?A]    [65]    [(A)]   [(?A)]  [(65)]
+        A       ?A      65      (A)     (?A)    (65)
+        [A]     [?A]    [65]    [(A)]   [(?A)]  [(65)]
 @end example
 @end example
-          
+           
 the @kbd{control-a} keystroke is represented by these forms:
 
 @example
 the @kbd{control-a} keystroke is represented by these forms:
 
 @example
-       (control A)     (control ?A)    (control 65)
-       [(control A)]   [(control ?A)]  [(control 65)]
+        (control A)     (control ?A)    (control 65)
+        [(control A)]   [(control ?A)]  [(control 65)]
 @end example
 
 the key sequence @kbd{control-c control-a} is represented by these
 forms:
 
 @example
 @end example
 
 the key sequence @kbd{control-c control-a} is represented by these
 forms:
 
 @example
-       [(control c) (control a)]       [(control ?c) (control ?a)]
-       [(control 99) (control 65)]     etc.
+        [(control c) (control a)]       [(control ?c) (control ?a)]
+        [(control 99) (control 65)]     etc.
 @end example
 
   Mouse button clicks work just like keypresses: @code{(control
 @end example
 
   Mouse button clicks work just like keypresses: @code{(control
@@ -319,26 +319,26 @@ actually bind both of those key sequences.  Likewise for the following
 pairs:
 
 @example
 pairs:
 
 @example
-               control h       backspace
-               control i       tab
-               control m       return
-               control j       linefeed
-               control [       escape
-               control @@      control space
+                control h       backspace
+                control i       tab
+                control m       return
+                control j       linefeed
+                control [       escape
+                control @@      control space
 @end example
 
   After binding a command to two key sequences with a form like
 
 @example
 @end example
 
   After binding a command to two key sequences with a form like
 
 @example
-       (define-key global-map "\^X\^I" 'command-1)
+        (define-key global-map "\^X\^I" 'command-1)
 @end example
 
 @noindent
 it is possible to redefine only one of those sequences like so:
 
 @example
 @end example
 
 @noindent
 it is possible to redefine only one of those sequences like so:
 
 @example
-       (define-key global-map [(control x) (control i)] 'command-2)
-       (define-key global-map [(control x) tab] 'command-3)
+        (define-key global-map [(control x) (control i)] 'command-2)
+        (define-key global-map [(control x) tab] 'command-3)
 @end example
 
   Of course, all of this applies only when running under a window
 @end example
 
   Of course, all of this applies only when running under a window
@@ -614,22 +614,22 @@ of entries, including one prefix key, @kbd{C-x}.
 @result{} #<keymap lisp-interaction-mode-map 5 entries 0x558>
 (describe-bindings-internal (current-local-map))
 @result{}  ; @r{Inserted into the buffer:}
 @result{} #<keymap lisp-interaction-mode-map 5 entries 0x558>
 (describe-bindings-internal (current-local-map))
 @result{}  ; @r{Inserted into the buffer:}
-backspace      backward-delete-char-untabify
-linefeed       eval-print-last-sexp
-delete         delete-char
-C-j            eval-print-last-sexp
-C-x            << Prefix Command >>
-M-tab          lisp-complete-symbol
-M-;            lisp-indent-for-comment
-M-C-i          lisp-complete-symbol
-M-C-q          indent-sexp
-M-C-x          eval-defun
-Alt-backspace  backward-kill-sexp
-Alt-delete     kill-sexp
+backspace       backward-delete-char-untabify
+linefeed        eval-print-last-sexp
+delete          delete-char
+C-j             eval-print-last-sexp
+C-x             << Prefix Command >>
+M-tab           lisp-complete-symbol
+M-;             lisp-indent-for-comment
+M-C-i           lisp-complete-symbol
+M-C-q           indent-sexp
+M-C-x           eval-defun
+Alt-backspace   backward-kill-sexp
+Alt-delete      kill-sexp
 @end group
 
 @group
 @end group
 
 @group
-C-x x          edebug-defun
+C-x x           edebug-defun
 @end group
 @end example
 @end defun
 @end group
 @end example
 @end defun
index 2024291..8b22bcf 100644 (file)
@@ -287,7 +287,7 @@ Editing Types
 
 * Buffer Type::             The basic object of editing.
 * Window Type::             What makes buffers visible.
 
 * Buffer Type::             The basic object of editing.
 * Window Type::             What makes buffers visible.
-* Window Configuration Type::Save what the screen looks like.
+* Window Configuration Type:: Save what the screen looks like.
 * Marker Type::             A position in a buffer.
 * Process Type::            A process running on the underlying OS.
 * Stream Type::             Receive or send characters.
 * Marker Type::             A position in a buffer.
 * Process Type::            A process running on the underlying OS.
 * Stream Type::             Receive or send characters.
@@ -308,7 +308,7 @@ Numbers
 
 Strings and Characters
 
 
 Strings and Characters
 
-* Basics: String Basics.      Basic properties of strings and characters.
+* String Basics::             Basic properties of strings and characters.
 * Predicates for Strings::    Testing whether an object is a string or char.
 * Creating Strings::          Functions to allocate new strings.
 * Predicates for Characters:: Testing whether an object is a character.
 * Predicates for Strings::    Testing whether an object is a string or char.
 * Creating Strings::          Functions to allocate new strings.
 * Predicates for Characters:: Testing whether an object is a character.
index 1abd504..d708b8e 100644 (file)
@@ -1448,7 +1448,7 @@ becomes clearer if the association is written in dotted pair notation:
 
 @defun remassoc key alist
 This function deletes by side effect any associations with key @var{key}
 
 @defun remassoc key alist
 This function deletes by side effect any associations with key @var{key}
-in @var{alist} -- i.e. it removes any elements from @var{alist} whose
+in @var{alist}---i.e. it removes any elements from @var{alist} whose
 @code{car} is @code{equal} to @var{key}.  The modified @var{alist} is
 returned.
 
 @code{car} is @code{equal} to @var{key}.  The modified @var{alist} is
 returned.
 
@@ -1460,7 +1460,7 @@ value of @code{foo}.
 
 @defun remassq key alist
 This function deletes by side effect any associations with key @var{key}
 
 @defun remassq key alist
 This function deletes by side effect any associations with key @var{key}
-in @var{alist} -- i.e. it removes any elements from @var{alist} whose
+in @var{alist}---i.e. it removes any elements from @var{alist} whose
 @code{car} is @code{eq} to @var{key}.  The modified @var{alist} is
 returned.
 
 @code{car} is @code{eq} to @var{key}.  The modified @var{alist} is
 returned.
 
@@ -1471,7 +1471,7 @@ This function is exactly like @code{remassoc}, but comparisons between
 
 @defun remrassoc value alist
 This function deletes by side effect any associations with value @var{value}
 
 @defun remrassoc value alist
 This function deletes by side effect any associations with value @var{value}
-in @var{alist} -- i.e. it removes any elements from @var{alist} whose
+in @var{alist}---i.e. it removes any elements from @var{alist} whose
 @code{cdr} is @code{equal} to @var{value}.  The modified @var{alist} is
 returned.
 
 @code{cdr} is @code{equal} to @var{value}.  The modified @var{alist} is
 returned.
 
@@ -1488,7 +1488,7 @@ based on its value instead of its key.
 
 @defun remrassq value alist
 This function deletes by side effect any associations with value @var{value}
 
 @defun remrassq value alist
 This function deletes by side effect any associations with value @var{value}
-in @var{alist} -- i.e. it removes any elements from @var{alist} whose
+in @var{alist}---i.e. it removes any elements from @var{alist} whose
 @code{cdr} is @code{eq} to @var{value}.  The modified @var{alist} is
 returned.
 
 @code{cdr} is @code{eq} to @var{value}.  The modified @var{alist} is
 returned.
 
@@ -1771,7 +1771,7 @@ lists of another function's buffers or markers.  When that function is
 done with the elements, they will automatically disappear from the list.
 
 Weak lists are used internally, for example, to manage the list holding
 done with the elements, they will automatically disappear from the list.
 
 Weak lists are used internally, for example, to manage the list holding
-the children of an extent -- an extent that is unused but has a parent
+the children of an extent---an extent that is unused but has a parent
 will still be reclaimed, and will automatically be removed from its
 parent's list of children.
 
 will still be reclaimed, and will automatically be removed from its
 parent's list of children.
 
index e157e8f..44920a8 100644 (file)
@@ -667,7 +667,7 @@ described here.
   When @code{zmacs-regions} is non-@code{nil} (this is the default), the
 concept of an @dfn{active region} exists.  The region is active when the
 corresponding mark is active.  Note that only one active region at a
   When @code{zmacs-regions} is non-@code{nil} (this is the default), the
 concept of an @dfn{active region} exists.  The region is active when the
 corresponding mark is active.  Note that only one active region at a
-time can exist -- i.e. only one buffer's region is active at a time.
+time can exist---i.e. only one buffer's region is active at a time.
 @xref{The Mark}, for more information about active regions.
 
 @defopt zmacs-regions
 @xref{The Mark}, for more information about active regions.
 
 @defopt zmacs-regions
index 3a815dd..7f6e158 100644 (file)
@@ -9,14 +9,14 @@
 @cindex menu
 
 @menu
 @cindex menu
 
 @menu
-* Menu Format::                Format of a menu description.
-* Menubar Format::     How to specify a menubar.
-* Menubar::            Functions for controlling the menubar.
-* Modifying Menus::    Modifying a menu description.
-* Pop-Up Menus::       Functions for specifying pop-up menus.
-* Menu Filters::       Filter functions for the default menubar.
-* Menu Accelerators::  Using and controlling menu accelerator keys
-* Buffers Menu::       The menu that displays the list of buffers.
+* Menu Format::         Format of a menu description.
+* Menubar Format::      How to specify a menubar.
+* Menubar::             Functions for controlling the menubar.
+* Modifying Menus::     Modifying a menu description.
+* Pop-Up Menus::        Functions for specifying pop-up menus.
+* Menu Filters::        Filter functions for the default menubar.
+* Menu Accelerators::   Using and controlling menu accelerator keys
+* Buffers Menu::        The menu that displays the list of buffers.
 @end menu
 
 @node Menu Format
 @end menu
 
 @node Menu Format
@@ -241,9 +241,9 @@ For example:
 
 @example
  ("File"
 
 @example
  ("File"
-  :filter file-menu-filter     ; file-menu-filter is a function that takes
-                               ; one argument (a list of menu items) and
-                               ; returns a list of menu items
+  :filter file-menu-filter      ; file-menu-filter is a function that takes
+                                ; one argument (a list of menu items) and
+                                ; returns a list of menu items
   [ "Save As..."    write-file]
   [ "Revert Buffer" revert-buffer :active (buffer-modified-p) ]
   [ "Read Only"     toggle-read-only :style toggle :selected buffer-read-only ]
   [ "Save As..."    write-file]
   [ "Revert Buffer" revert-buffer :active (buffer-modified-p) ]
   [ "Read Only"     toggle-read-only :style toggle :selected buffer-read-only ]
@@ -600,10 +600,10 @@ submenu of another menu.  An accelerator key for a menu item is used to
 activate that item.
 
 @menu
 activate that item.
 
 @menu
-* Creating Menu Accelerators:: How to add accelerator keys to a menu.
-* Keyboard Menu Traversal::    How to use and modify the keys which are used
-                               to traverse the menu structure.
-* Menu Accelerator Functions:: Functions for working with menu accelerators.
+* Creating Menu Accelerators::  How to add accelerator keys to a menu.
+* Keyboard Menu Traversal::     How to use and modify the keys which are used
+                                to traverse the menu structure.
+* Menu Accelerator Functions::  Functions for working with menu accelerators.
 @end menu
 
 @node Creating Menu Accelerators
 @end menu
 
 @node Creating Menu Accelerators
@@ -620,9 +620,9 @@ For example, the command
 
 @example
 (add-submenu nil '("%_Test"
 
 @example
 (add-submenu nil '("%_Test"
-                  ["One" (insert "1") :accelerator ?1 :active t]
-                  ["%_Two" (insert "2")]
-                  ["%_3" (insert "3")]))
+                   ["One" (insert "1") :accelerator ?1 :active t]
+                   ["%_Two" (insert "2")]
+                   ["%_3" (insert "3")]))
 @end example
 
 will add a new menu to the top level menubar.  The new menu can be reached
 @end example
 
 will add a new menu to the top level menubar.  The new menu can be reached
@@ -708,9 +708,9 @@ The default value is @code{nil}.
 (setq menu-accelerator-modifiers '(meta control))
 (setq menu-accelerator-enabled 'menu-force)
 (add-submenu nil '("%_Test"
 (setq menu-accelerator-modifiers '(meta control))
 (setq menu-accelerator-enabled 'menu-force)
 (add-submenu nil '("%_Test"
-                  ["One" (insert "1") :accelerator ?1 :active t]
-                  ["%_Two" (insert "2")]
-                  ["%_3" (insert "3")]))
+                   ["One" (insert "1") :accelerator ?1 :active t]
+                   ["%_Two" (insert "2")]
+                   ["%_3" (insert "3")]))
 @end example
 
 will add the menu "Test" to the top level menubar.  Pressing C-x followed by
 @end example
 
 will add the menu "Test" to the top level menubar.  Pressing C-x followed by
index 89242e1..cae4960 100644 (file)
@@ -43,7 +43,7 @@ ways, although the basic shape will be the same.
   In some cases, the differences will be significant enough that it is
 actually possible to identify two or more distinct shapes that both
 represent the same character.  For example, the lowercase letters
   In some cases, the differences will be significant enough that it is
 actually possible to identify two or more distinct shapes that both
 represent the same character.  For example, the lowercase letters
-@samp{a} and @samp{g} each have two distinct possible shapes -- the
+@samp{a} and @samp{g} each have two distinct possible shapes---the
 @samp{a} can optionally have a curved tail projecting off the top, and
 the @samp{g} can be formed either of two loops, or of one loop and a
 tail hanging off the bottom.  Such distinct possible shapes of a
 @samp{a} can optionally have a curved tail projecting off the top, and
 the @samp{g} can be formed either of two loops, or of one loop and a
 tail hanging off the bottom.  Such distinct possible shapes of a
@@ -51,7 +51,7 @@ character are called @dfn{glyphs}.  The important characteristic of two
 glyphs making up the same character is that the choice between one or
 the other is purely stylistic and has no linguistic effect on a word
 (this is the reason why a capital @samp{A} and lowercase @samp{a}
 glyphs making up the same character is that the choice between one or
 the other is purely stylistic and has no linguistic effect on a word
 (this is the reason why a capital @samp{A} and lowercase @samp{a}
-are different characters rather than different glyphs -- e.g.
+are different characters rather than different glyphs---e.g.
 @samp{Aspen} is a city while @samp{aspen} is a kind of tree).
 
   Note that @dfn{character} and @dfn{glyph} are used differently
 @samp{Aspen} is a city while @samp{aspen} is a kind of tree).
 
   Note that @dfn{character} and @dfn{glyph} are used differently
@@ -74,7 +74,7 @@ particular ordering.  ASCII, for example, places letters in their
 numbers before letters, etc.  Note that for many of the Asian character
 sets, there is no natural ordering of the characters.  The actual
 orderings are based on one or more salient characteristic, of which
 numbers before letters, etc.  Note that for many of the Asian character
 sets, there is no natural ordering of the characters.  The actual
 orderings are based on one or more salient characteristic, of which
-there are many to choose from -- e.g. number of strokes, common
+there are many to choose from---e.g. number of strokes, common
 radicals, phonetic ordering, etc.
 
   The set of numbers assigned to any particular character are called
 radicals, phonetic ordering, etc.
 
   The set of numbers assigned to any particular character are called
@@ -105,11 +105,11 @@ directly. (This is the case with ASCII, and as a result, most people do
 not understand the difference between a character set and an encoding.)
 This is not possible, however, if more than one character set is to be
 used in the encoding.  For example, printed Japanese text typically
 not understand the difference between a character set and an encoding.)
 This is not possible, however, if more than one character set is to be
 used in the encoding.  For example, printed Japanese text typically
-requires characters from multiple character sets -- ASCII, JISX0208, and
+requires characters from multiple character sets---ASCII, JISX0208, and
 JISX0212, to be specific.  Each of these is indexed using one or more
 position codes in the range 33 through 126, so the position codes could
 not be used directly or there would be no way to tell which character
 JISX0212, to be specific.  Each of these is indexed using one or more
 position codes in the range 33 through 126, so the position codes could
 not be used directly or there would be no way to tell which character
-was meant.  Different Japanese encodings handle this differently -- JIS
+was meant.  Different Japanese encodings handle this differently---JIS
 uses special escape characters to denote different character sets; EUC
 sets the high bit of the position codes for JISX0208 and JISX0212, and
 puts a special extra byte before each JISX0212 character; etc. (JIS,
 uses special escape characters to denote different character sets; EUC
 sets the high bit of the position codes for JISX0208 and JISX0212, and
 puts a special extra byte before each JISX0212 character; etc. (JIS,
@@ -366,7 +366,7 @@ TTY mode) of @var{charset}.
 @end defun
 
 @defun charset-direction charset
 @end defun
 
 @defun charset-direction charset
-This function returns the display direction of @var{charset} -- either
+This function returns the display direction of @var{charset}---either
 @code{l2r} or @code{r2l}.
 @end defun
 
 @code{l2r} or @code{r2l}.
 @end defun
 
@@ -555,10 +555,10 @@ register of charset can be invoked into.
 
 @example
 @group
 
 @example
 @group
-       C0: 0x00 - 0x1F
-       GL: 0x20 - 0x7F
-       C1: 0x80 - 0x9F
-       GR: 0xA0 - 0xFF
+        C0: 0x00 - 0x1F
+        GL: 0x20 - 0x7F
+        C1: 0x80 - 0x9F
+        GR: 0xA0 - 0xFF
 @end group
 @end example
 
 @end group
 @end example
 
@@ -571,7 +571,7 @@ ISO 2022 distinguishes 7-bit environments and 8-bit environments.  In
 Charset designation is done by escape sequences of the form:
 
 @example
 Charset designation is done by escape sequences of the form:
 
 @example
-       ESC [@var{I}] @var{I} @var{F}
+        ESC [@var{I}] @var{I} @var{F}
 @end example
 
 where @var{I} is an intermediate character in the range 0x20 - 0x2F, and
 @end example
 
 where @var{I} is an intermediate character in the range 0x20 - 0x2F, and
@@ -581,32 +581,32 @@ The meaning of intermediate characters are:
 
 @example
 @group
 
 @example
 @group
-       $ [0x24]: indicate charset of dimension 2 (94x94 or 96x96).
-       ( [0x28]: designate to G0 a 94-charset whose final byte is @var{F}.
-       ) [0x29]: designate to G1 a 94-charset whose final byte is @var{F}.
-       * [0x2A]: designate to G2 a 94-charset whose final byte is @var{F}.
-       + [0x2B]: designate to G3 a 94-charset whose final byte is @var{F}.
-       - [0x2D]: designate to G1 a 96-charset whose final byte is @var{F}.
-       . [0x2E]: designate to G2 a 96-charset whose final byte is @var{F}.
-       / [0x2F]: designate to G3 a 96-charset whose final byte is @var{F}.
+        $ [0x24]: indicate charset of dimension 2 (94x94 or 96x96).
+        ( [0x28]: designate to G0 a 94-charset whose final byte is @var{F}.
+        ) [0x29]: designate to G1 a 94-charset whose final byte is @var{F}.
+        * [0x2A]: designate to G2 a 94-charset whose final byte is @var{F}.
+        + [0x2B]: designate to G3 a 94-charset whose final byte is @var{F}.
+        - [0x2D]: designate to G1 a 96-charset whose final byte is @var{F}.
+        . [0x2E]: designate to G2 a 96-charset whose final byte is @var{F}.
+        / [0x2F]: designate to G3 a 96-charset whose final byte is @var{F}.
 @end group
 @end example
 
 The following rule is not allowed in ISO 2022 but can be used in Mule.
 
 @example
 @end group
 @end example
 
 The following rule is not allowed in ISO 2022 but can be used in Mule.
 
 @example
-       , [0x2C]: designate to G0 a 96-charset whose final byte is @var{F}.
+        , [0x2C]: designate to G0 a 96-charset whose final byte is @var{F}.
 @end example
 
 Here are examples of designations:
 
 @example
 @group
 @end example
 
 Here are examples of designations:
 
 @example
 @group
-       ESC ( B :              designate to G0 ASCII
-       ESC - A :              designate to G1 Latin-1
-       ESC $ ( A or ESC $ A : designate to G0 GB2312
-       ESC $ ( B or ESC $ B : designate to G0 JISX0208
-       ESC $ ) C :            designate to G1 KSC5601
+        ESC ( B :              designate to G0 ASCII
+        ESC - A :              designate to G1 Latin-1
+        ESC $ ( A or ESC $ A : designate to G0 GB2312
+        ESC $ ( B or ESC $ B : designate to G0 JISX0208
+        ESC $ ) C :            designate to G1 KSC5601
 @end group
 @end example
 
 @end group
 @end example
 
@@ -618,21 +618,21 @@ Single Shift (one character only).
 Locking Shift is done as follows:
 
 @example
 Locking Shift is done as follows:
 
 @example
-       LS0 or SI (0x0F): invoke G0 into GL
-       LS1 or SO (0x0E): invoke G1 into GL
-       LS2:  invoke G2 into GL
-       LS3:  invoke G3 into GL
-       LS1R: invoke G1 into GR
-       LS2R: invoke G2 into GR
-       LS3R: invoke G3 into GR
+        LS0 or SI (0x0F): invoke G0 into GL
+        LS1 or SO (0x0E): invoke G1 into GL
+        LS2:  invoke G2 into GL
+        LS3:  invoke G3 into GL
+        LS1R: invoke G1 into GR
+        LS2R: invoke G2 into GR
+        LS3R: invoke G3 into GR
 @end example
 
 Single Shift is done as follows:
 
 @example
 @group
 @end example
 
 Single Shift is done as follows:
 
 @example
 @group
-       SS2 or ESC N: invoke G2 into GL
-       SS3 or ESC O: invoke G3 into GL
+        SS2 or ESC N: invoke G2 into GL
+        SS3 or ESC O: invoke G3 into GL
 @end group
 @end example
 
 @end group
 @end example
 
@@ -678,51 +678,51 @@ Here are several examples:
 @example
 @group
 junet -- Coding system used in JUNET.
 @example
 @group
 junet -- Coding system used in JUNET.
-       1. G0 <- ASCII, G1..3 <- never used
-       2. Yes.
-       3. Yes.
-       4. Yes.
-       5. 7-bit environment
-       6. No.
-       7. Use ASCII
-       8. Use JISX0208-1983
+        1. G0 <- ASCII, G1..3 <- never used
+        2. Yes.
+        3. Yes.
+        4. Yes.
+        5. 7-bit environment
+        6. No.
+        7. Use ASCII
+        8. Use JISX0208-1983
 @end group
 
 @group
 ctext -- Compound Text
 @end group
 
 @group
 ctext -- Compound Text
-       1. G0 <- ASCII, G1 <- Latin-1, G2,3 <- never used
-       2. No.
-       3. No.
-       4. Yes.
-       5. 8-bit environment
-       6. No.
-       7. Use ASCII
-       8. Use JISX0208-1983
+        1. G0 <- ASCII, G1 <- Latin-1, G2,3 <- never used
+        2. No.
+        3. No.
+        4. Yes.
+        5. 8-bit environment
+        6. No.
+        7. Use ASCII
+        8. Use JISX0208-1983
 @end group
 
 @group
 euc-china -- Chinese EUC.  Although many people call this
 as "GB encoding", the name may cause misunderstanding.
 @end group
 
 @group
 euc-china -- Chinese EUC.  Although many people call this
 as "GB encoding", the name may cause misunderstanding.
-       1. G0 <- ASCII, G1 <- GB2312, G2,3 <- never used
-       2. No.
-       3. Yes.
-       4. Yes.
-       5. 8-bit environment
-       6. No.
-       7. Use ASCII
-       8. Use JISX0208-1983
+        1. G0 <- ASCII, G1 <- GB2312, G2,3 <- never used
+        2. No.
+        3. Yes.
+        4. Yes.
+        5. 8-bit environment
+        6. No.
+        7. Use ASCII
+        8. Use JISX0208-1983
 @end group
 
 @group
 korean-mail -- Coding system used in Korean network.
 @end group
 
 @group
 korean-mail -- Coding system used in Korean network.
-       1. G0 <- ASCII, G1 <- KSC5601, G2,3 <- never used
-       2. No.
-       3. Yes.
-       4. Yes.
-       5. 7-bit environment
-       6. Yes.
-       7. No.
-       8. No.
+        1. G0 <- ASCII, G1 <- KSC5601, G2,3 <- never used
+        2. No.
+        3. Yes.
+        4. Yes.
+        5. 7-bit environment
+        6. Yes.
+        7. No.
+        8. No.
 @end group
 @end example
 
 @end group
 @end example
 
@@ -740,7 +740,7 @@ when it is written out to a file or process.
 
 For example, many ISO-2022-compliant coding systems (such as Compound
 Text, which is used for inter-client data under the X Window System) use
 
 For example, many ISO-2022-compliant coding systems (such as Compound
 Text, which is used for inter-client data under the X Window System) use
-escape sequences to switch between different charsets -- Japanese Kanji,
+escape sequences to switch between different charsets---Japanese Kanji,
 for example, is invoked with @samp{ESC $ ( B}; ASCII is invoked with
 @samp{ESC ( B}; and Cyrillic is invoked with @samp{ESC - L}.  See
 @code{make-coding-system} for more information.
 for example, is invoked with @samp{ESC $ ( B}; ASCII is invoked with
 @samp{ESC ( B}; and Cyrillic is invoked with @samp{ESC - L}.  See
 @code{make-coding-system} for more information.
@@ -1447,7 +1447,7 @@ This section is not yet written.
 
   A category table is a type of char table used for keeping track of
 categories.  Categories are used for classifying characters for use in
 
   A category table is a type of char table used for keeping track of
 categories.  Categories are used for classifying characters for use in
-regexps -- you can refer to a category rather than having to use a
+regexps---you can refer to a category rather than having to use a
 complicated [] expression (and category lookups are significantly
 faster).
 
 complicated [] expression (and category lookups are significantly
 faster).
 
index a809171..320c41e 100644 (file)
@@ -363,7 +363,7 @@ confoundance disease}.  In particular, many functions such as @code{eq},
 are integers are the same.  Byte code compiled under any version 19
 Emacs will have all such functions mapped to their @code{old-} equivalents
 when the byte code is read into XEmacs 20.  This is to preserve
 are integers are the same.  Byte code compiled under any version 19
 Emacs will have all such functions mapped to their @code{old-} equivalents
 when the byte code is read into XEmacs 20.  This is to preserve
-compatibility -- Emacs 19 converts all constant characters to the equivalent
+compatibility---Emacs 19 converts all constant characters to the equivalent
 integer during byte-compilation, and thus there is no other way to preserve
 byte-code compatibility even if the code has specifically been written
 with the distinction between characters and integers in mind.
 integer during byte-compilation, and thus there is no other way to preserve
 byte-code compatibility even if the code has specifically been written
 with the distinction between characters and integers in mind.
@@ -372,7 +372,7 @@ with the distinction between characters and integers in mind.
 code}.  For example, the character @kbd{A} is represented as the
 @w{integer 65}, following the standard @sc{ascii} representation of
 characters.  If XEmacs was not compiled with @sc{mule} support, the
 code}.  For example, the character @kbd{A} is represented as the
 @w{integer 65}, following the standard @sc{ascii} representation of
 characters.  If XEmacs was not compiled with @sc{mule} support, the
-range of this integer will always be 0 to 255 -- eight bits, or one
+range of this integer will always be 0 to 255---eight bits, or one
 byte. (Integers outside this range are accepted but silently truncated;
 however, you should most decidedly @emph{not} rely on this, because it
 will not work under XEmacs with @sc{mule} support.)  When @sc{mule}
 byte. (Integers outside this range are accepted but silently truncated;
 however, you should most decidedly @emph{not} rely on this, because it
 will not work under XEmacs with @sc{mule} support.)  When @sc{mule}
index 6efb83f..89bd121 100644 (file)
@@ -22,27 +22,27 @@ This function returns non-@code{nil} if @var{object} is a specifier.
 @end defun
 
 @menu
 @end defun
 
 @menu
-* Introduction to Specifiers:: Specifiers provide a clean way for
-                               display and other properties to vary
-                               (under user control) in a wide variety
-                               of contexts.
-* Specifiers In-Depth::                Gory details about specifier innards.
-* Specifier Instancing::       Instancing means obtaining the ``value'' of
-                               a specifier in a particular context.
-* Specifier Types::            Specifiers come in different flavors.
-* Adding Specifications::      Specifications control a specifier's ``value''
-                               by giving conditions under which a
-                               particular value is valid.
-* Retrieving Specifications::  Querying a specifier's specifications.
-* Specifier Tag Functions::    Working with specifier tags.
+* Introduction to Specifiers::  Specifiers provide a clean way for
+                                display and other properties to vary
+                                (under user control) in a wide variety
+                                of contexts.
+* Specifiers In-Depth::         Gory details about specifier innards.
+* Specifier Instancing::        Instancing means obtaining the ``value'' of
+                                a specifier in a particular context.
+* Specifier Types::             Specifiers come in different flavors.
+* Adding Specifications::       Specifications control a specifier's ``value''
+                                by giving conditions under which a
+                                particular value is valid.
+* Retrieving Specifications::   Querying a specifier's specifications.
+* Specifier Tag Functions::     Working with specifier tags.
 * Specifier Instancing Functions::
 * Specifier Instancing Functions::
-                               Functions to instance a specifier.
-* Specifier Example::          Making all this stuff clearer.
-* Creating Specifiers::                Creating specifiers for your own use.
+                                Functions to instance a specifier.
+* Specifier Example::           Making all this stuff clearer.
+* Creating Specifiers::         Creating specifiers for your own use.
 * Specifier Validation Functions::
 * Specifier Validation Functions::
-                               Validating the components of a specifier.
+                                Validating the components of a specifier.
 * Other Specification Functions::
 * Other Specification Functions::
-                               Other ways of working with specifications.
+                                Other ways of working with specifications.
 @end menu
 
 @node Introduction to Specifiers
 @end menu
 
 @node Introduction to Specifiers
@@ -169,7 +169,7 @@ devices of the associated type or class (@pxref{Consoles and Devices}).
 User-defined tags may be defined, with an optional predicate specified.
 An application can create its own tag, use it to mark all its
 instantiators, and be fairly confident that it will not interfere with
 User-defined tags may be defined, with an optional predicate specified.
 An application can create its own tag, use it to mark all its
 instantiators, and be fairly confident that it will not interfere with
-other applications that modify the same specifier -- Functions that add
+other applications that modify the same specifier---Functions that add
 a specification to a specifier usually only overwrite existing
 inst-pairs with the same tag set as was given, and a particular tag or
 tag set can be specified when removing instantiators.
 a specification to a specifier usually only overwrite existing
 inst-pairs with the same tag set as was given, and a particular tag or
 tag set can be specified when removing instantiators.
@@ -196,7 +196,7 @@ under X is usually a wildcard specification that may resolve to
 different font names, with possibly different foundries, widths, etc.,
 on different devices), the extra properties of that font on that
 device, etc.  Furthermore, this conversion (called @dfn{instantiation})
 different font names, with possibly different foundries, widths, etc.,
 on different devices), the extra properties of that font on that
 device, etc.  Furthermore, this conversion (called @dfn{instantiation})
-might fail -- a font or color might not exist on a particular device,
+might fail---a font or color might not exist on a particular device,
 for example.
 
 @node Specifier Instancing
 for example.
 
 @node Specifier Instancing
@@ -861,9 +861,9 @@ First, let's retrieve the specifier:
     @result{}   ((#<buffer "device.c"> (nil . "forest green"))
                  (#<window on "Makefile" 0x8a2b> (nil . "hot pink"))
                  (#<x-frame "emacs" 0x4ac> (nil . "puke orange")
     @result{}   ((#<buffer "device.c"> (nil . "forest green"))
                  (#<window on "Makefile" 0x8a2b> (nil . "hot pink"))
                  (#<x-frame "emacs" 0x4ac> (nil . "puke orange")
-                                          (nil . "moccasin"))
+                                           (nil . "moccasin"))
                  (#<x-frame "VM" 0x4ac> (nil . "magenta"))
                  (#<x-frame "VM" 0x4ac> (nil . "magenta"))
-                (global ((tty) . "cyan") (nil . "white"))
+                 (global ((tty) . "cyan") (nil . "white"))
                 )
 @end example
 
                 )
 @end example
 
@@ -890,7 +890,7 @@ The result is arrived at like this:
 @enumerate
 @item
 First, we look for a specification matching the buffer displayed in the
 @enumerate
 @item
 First, we look for a specification matching the buffer displayed in the
-window, i.e. @samp{*scratch}.  There are none, so we proceed.
+window, i.e. @samp{*scratch*}.  There are none, so we proceed.
 @item
 Then, we look for a specification matching the window itself.  Again, there
 are none.
 @item
 Then, we look for a specification matching the window itself.  Again, there
 are none.
index 260509c..94b49a0 100644 (file)
@@ -18,7 +18,7 @@ XEmacs Lisp has many functions expressly for manipulating them.  XEmacs
 Lisp programs use strings more often than individual characters.
 
 @menu
 Lisp programs use strings more often than individual characters.
 
 @menu
-* Basics: String Basics.      Basic properties of strings and characters.
+* String Basics::             Basic properties of strings and characters.
 * Predicates for Strings::    Testing whether an object is a string or char.
 * Creating Strings::          Functions to allocate new strings.
 * Predicates for Characters:: Testing whether an object is a character.
 * Predicates for Strings::    Testing whether an object is a string or char.
 * Creating Strings::          Functions to allocate new strings.
 * Predicates for Characters:: Testing whether an object is a character.
index 7e31f0a..4a72742 100644 (file)
@@ -18,7 +18,7 @@
 @section Toolbar Intro
 
 A @dfn{toolbar} is a bar of icons displayed along one edge of a frame.
 @section Toolbar Intro
 
 A @dfn{toolbar} is a bar of icons displayed along one edge of a frame.
-You can view a toolbar as a series of menu shortcuts -- the most
+You can view a toolbar as a series of menu shortcuts---the most
 common menu options can be accessed with a single click rather than
 a series of clicks and/or drags to select the option from a menu.
 Consistent with this, a help string (called the @dfn{help-echo})
 common menu options can be accessed with a single click rather than
 a series of clicks and/or drags to select the option from a menu.
 Consistent with this, a help string (called the @dfn{help-echo})
@@ -346,7 +346,7 @@ set the left toolbar width to 0 for a particular buffer (or if that
 buffer does not specify a left toolbar or has a nil value specified for
 @code{left-toolbar-visible-p}), you will find that, when that buffer is
 displayed in the selected window, the window will have a width of 86 or
 buffer does not specify a left toolbar or has a nil value specified for
 @code{left-toolbar-visible-p}), you will find that, when that buffer is
 displayed in the selected window, the window will have a width of 86 or
-87 characters -- the frame is sized for a 68-pixel left toolbar but the
+87 characters---the frame is sized for a 68-pixel left toolbar but the
 selected window specifies that the left toolbar is not visible, so it is
 expanded to take up the slack.
 
 selected window specifies that the left toolbar is not visible, so it is
 expanded to take up the slack.
 
index d309307..0140d16 100644 (file)
@@ -138,7 +138,7 @@ always a good idea to get rid of it with
 Send a reply to this message.  The second argument can be @code{reply},
 @code{reject} or @code{fail}; the default is @code{reply}.  Before
 sending a reply, all message arguments whose mode is @code{TT_INOUT} or
 Send a reply to this message.  The second argument can be @code{reply},
 @code{reject} or @code{fail}; the default is @code{reply}.  Before
 sending a reply, all message arguments whose mode is @code{TT_INOUT} or
-@code{TT_OUT} should have been filled in -- see
+@code{TT_OUT} should have been filled in---see
 @code{set-tooltalk-message-attribute}.
 @refill
 @end defun
 @code{set-tooltalk-message-attribute}.
 @refill
 @end defun
index c40ab14..1cadf17 100644 (file)
@@ -18,9 +18,9 @@ However, there are some features of the X Window System that do not
 generalize well, and they are covered specially here.
 
 @menu
 generalize well, and they are covered specially here.
 
 @menu
-* X Selections::               Transferring text to and from other X clients.
-* X Server::                   Information about the X server connected to
-                                 a particular device.
+* X Selections::                Transferring text to and from other X clients.
+* X Server::                    Information about the X server connected to
+                                  a particular device.
 * X Miscellaneous::             Other X-specific functions and variables.
 @end menu
 
 * X Miscellaneous::             Other X-specific functions and variables.
 @end menu
 
@@ -86,9 +86,9 @@ This section describes how to access and change the overall status of
 the X server XEmacs is using.
 
 @menu
 the X server XEmacs is using.
 
 @menu
-* Resources::                  Getting resource values from the server.
-* Server Data::                        Getting info about the X server.
-* Grabs::                      Restricting access to the server by other apps.
+* Resources::                   Getting resource values from the server.
+* Server Data::                 Getting info about the X server.
+* Grabs::                       Restricting access to the server by other apps.
 @end menu
 
 @node Resources
 @end menu
 
 @node Resources
@@ -161,8 +161,8 @@ is an interface to a C call something like
 
 @example
     @code{XrmGetResource (db, "xemacs.buffer.@var{buffer-name}.foreground",
 
 @example
     @code{XrmGetResource (db, "xemacs.buffer.@var{buffer-name}.foreground",
-                       "Emacs.EmacsLocaleType.EmacsBuffer.Foreground",
-                       "String");}
+                        "Emacs.EmacsLocaleType.EmacsBuffer.Foreground",
+                        "String");}
 @end example
 
 @item
 @end example
 
 @item
@@ -176,8 +176,8 @@ is an interface to a C call something like
 @example
 
     @code{XrmGetResource (db, "xemacs.frame.@var{frame-name}.foreground",
 @example
 
     @code{XrmGetResource (db, "xemacs.frame.@var{frame-name}.foreground",
-                       "Emacs.EmacsLocaleType.EmacsFrame.Foreground",
-                       "String");}
+                        "Emacs.EmacsLocaleType.EmacsFrame.Foreground",
+                        "String");}
 @end example
 
 @item
 @end example
 
 @item
@@ -191,8 +191,8 @@ is an interface to a C call something like
 
 @example
     @code{XrmGetResource (db, "xemacs.device.@var{device-name}.foreground",
 
 @example
     @code{XrmGetResource (db, "xemacs.device.@var{device-name}.foreground",
-                       "Emacs.EmacsLocaleType.EmacsDevice.Foreground",
-                       "String");}
+                        "Emacs.EmacsLocaleType.EmacsDevice.Foreground",
+                        "String");}
 @end example
 
 @item
 @end example
 
 @item
@@ -206,8 +206,8 @@ is an interface to a C call something like
 
 @example
     @code{XrmGetResource (db, "xemacs.foreground",
 
 @example
     @code{XrmGetResource (db, "xemacs.foreground",
-                       "Emacs.Foreground",
-                       "String");}
+                        "Emacs.Foreground",
+                        "String");}
 @end example
 @end enumerate
 
 @end example
 @end enumerate
 
@@ -278,7 +278,7 @@ from previous versions of XEmacs, which returned @code{StaticGray},
 @defun x-grab-keyboard &optional device
 This function grabs the keyboard on the given device (defaulting to the
 selected one).  So long as the keyboard is grabbed, all keyboard events
 @defun x-grab-keyboard &optional device
 This function grabs the keyboard on the given device (defaulting to the
 selected one).  So long as the keyboard is grabbed, all keyboard events
-will be delivered to XEmacs -- it is not possible for other X clients to
+will be delivered to XEmacs---it is not possible for other X clients to
 eavesdrop on them.  Ungrab the keyboard with @code{x-ungrab-keyboard}
 (use an @code{unwind-protect}).  Returns @code{t} if the grab was
 successful; @code{nil} otherwise.
 eavesdrop on them.  Ungrab the keyboard with @code{x-ungrab-keyboard}
 (use an @code{unwind-protect}).  Returns @code{t} if the grab was
 successful; @code{nil} otherwise.
index 76d83c0..de40787 100644 (file)
@@ -46,7 +46,7 @@ statements do.
 (add-hook 'texinfo-mode-hook    'turn-on-font-lock)
 
 ;;; enables the font-lock mode in C Mode
 (add-hook 'texinfo-mode-hook    'turn-on-font-lock)
 
 ;;; enables the font-lock mode in C Mode
-(add-hook 'c-mode-hook         'turn-on-font-lock)
+(add-hook 'c-mode-hook          'turn-on-font-lock)
 @end example
 
 To turn on the font-lock mode in other Major Modes like emacs-lisp, just
 @end example
 
 To turn on the font-lock mode in other Major Modes like emacs-lisp, just
index 5225804..40e9129 100644 (file)
@@ -98,13 +98,13 @@ particular buffer also. For example, if you are in "Texinfo" mode, part
 of your list will contain:
 
 @example
 of your list will contain:
 
 @example
-C-c C-c n      texinfo-insert-@@node
-C-c C-c o      texinfo-insert-@@noindent
-C-c C-c s      texinfo-insert-@@samp
-C-c C-c t      texinfo-insert-@@table
-C-c C-c v      texinfo-insert-@@var
-C-c C-c x      texinfo-insert-@@example
-C-c C-c @{     texinfo-insert-braces
+C-c C-c n       texinfo-insert-@@node
+C-c C-c o       texinfo-insert-@@noindent
+C-c C-c s       texinfo-insert-@@samp
+C-c C-c t       texinfo-insert-@@table
+C-c C-c v       texinfo-insert-@@var
+C-c C-c x       texinfo-insert-@@example
+C-c C-c @{      texinfo-insert-braces
 @end example
 @noindent
 These keybindings apply only to "Texinfo" mode. @xref{Modes}, for more
 @end example
 @noindent
 These keybindings apply only to "Texinfo" mode. @xref{Modes}, for more
index 81f5c41..0984134 100644 (file)
@@ -175,7 +175,7 @@ file. The following example shows how to enable the font-lock mode when
 the major mode is c-mode. 
 
 @example
 the major mode is c-mode. 
 
 @example
-(add-hook 'c-mode-hook         'turn-on-font-lock)
+(add-hook 'c-mode-hook          'turn-on-font-lock)
 @end example
 
 @noindent
 @end example
 
 @noindent
index ecf9f33..46f6bd1 100644 (file)
@@ -12,7 +12,7 @@
 @ifinfo
 @dircategory XEmacs Editor
 @direntry
 @ifinfo
 @dircategory XEmacs Editor
 @direntry
-* Widgets: (widget).           The Emacs Widget Library.
+* Widgets: (widget).            The Emacs Widget Library.
 @end direntry
 @end ifinfo
 
 @end direntry
 @end ifinfo
 
@@ -298,69 +298,69 @@ Interface}).
   (make-local-variable 'widget-example-repeat)
   (widget-insert "Here is some documentation.\n\nName: ")
   (widget-create 'editable-field
   (make-local-variable 'widget-example-repeat)
   (widget-insert "Here is some documentation.\n\nName: ")
   (widget-create 'editable-field
-                :size 13
-                "My Name")
+                 :size 13
+                 "My Name")
   (widget-create 'menu-choice
   (widget-create 'menu-choice
-                :tag "Choose"
-                :value "This"
-                :help-echo "Choose me, please!"
-                :notify (lambda (widget &rest ignore)
-                          (message "%s is a good choice!"
-                                   (widget-value widget)))
-                '(item :tag "This option" :value "This")
-                '(choice-item "That option")
-                '(editable-field :menu-tag "No option" "Thus option"))
+                 :tag "Choose"
+                 :value "This"
+                 :help-echo "Choose me, please!"
+                 :notify (lambda (widget &rest ignore)
+                           (message "%s is a good choice!"
+                                    (widget-value widget)))
+                 '(item :tag "This option" :value "This")
+                 '(choice-item "That option")
+                 '(editable-field :menu-tag "No option" "Thus option"))
   (widget-insert "Address: ")
   (widget-create 'editable-field
   (widget-insert "Address: ")
   (widget-create 'editable-field
-                "Some Place\nIn some City\nSome country.")
+                 "Some Place\nIn some City\nSome country.")
   (widget-insert "\nSee also ")
   (widget-create 'link
   (widget-insert "\nSee also ")
   (widget-create 'link
-                :notify (lambda (&rest ignore)
-                          (widget-value-set widget-example-repeat 
-                                            '("En" "To" "Tre"))
-                          (widget-setup))
-                "other work")
+                 :notify (lambda (&rest ignore)
+                           (widget-value-set widget-example-repeat 
+                                             '("En" "To" "Tre"))
+                           (widget-setup))
+                 "other work")
   (widget-insert " for more information.\n\nNumbers: count to three below\n")
   (setq widget-example-repeat
   (widget-insert " for more information.\n\nNumbers: count to three below\n")
   (setq widget-example-repeat
-       (widget-create 'editable-list
-                      :entry-format "%i %d %v"
-                      :notify (lambda (widget &rest ignore)
-                                (let ((old (widget-get widget
-                                                       ':example-length))
-                                      (new (length (widget-value widget))))
-                                  (unless (eq old new)
-                                    (widget-put widget ':example-length new)
-                                    (message "You can count to %d." new))))
-                      :value '("One" "Eh, two?" "Five!")
-                      '(editable-field :value "three")))
+        (widget-create 'editable-list
+                       :entry-format "%i %d %v"
+                       :notify (lambda (widget &rest ignore)
+                                 (let ((old (widget-get widget
+                                                        ':example-length))
+                                       (new (length (widget-value widget))))
+                                   (unless (eq old new)
+                                     (widget-put widget ':example-length new)
+                                     (message "You can count to %d." new))))
+                       :value '("One" "Eh, two?" "Five!")
+                       '(editable-field :value "three")))
   (widget-insert "\n\nSelect multiple:\n\n")
   (widget-create 'checkbox t)
   (widget-insert " This\n")
   (widget-create 'checkbox nil)
   (widget-insert " That\n")
   (widget-create 'checkbox
   (widget-insert "\n\nSelect multiple:\n\n")
   (widget-create 'checkbox t)
   (widget-insert " This\n")
   (widget-create 'checkbox nil)
   (widget-insert " That\n")
   (widget-create 'checkbox
-                :notify (lambda (&rest ignore) (message "Tickle"))
-                t)
+                 :notify (lambda (&rest ignore) (message "Tickle"))
+                 t)
   (widget-insert " Thus\n\nSelect one:\n\n")
   (widget-create 'radio-button-choice
   (widget-insert " Thus\n\nSelect one:\n\n")
   (widget-create 'radio-button-choice
-                :value "One"
-                :notify (lambda (widget &rest ignore)
-                          (message "You selected %s"
-                                   (widget-value widget)))
-                '(item "One") '(item "Another One.") '(item "A Final One."))
+                 :value "One"
+                 :notify (lambda (widget &rest ignore)
+                           (message "You selected %s"
+                                    (widget-value widget)))
+                 '(item "One") '(item "Another One.") '(item "A Final One."))
   (widget-insert "\n")
   (widget-create 'push-button
   (widget-insert "\n")
   (widget-create 'push-button
-                :notify (lambda (&rest ignore) 
-                          (if (= (length (widget-value widget-example-repeat))
-                                 3)
-                              (message "Congratulation!")
-                            (error "Three was the count!")))
-                "Apply Form")
+                 :notify (lambda (&rest ignore) 
+                           (if (= (length (widget-value widget-example-repeat))
+                                  3)
+                               (message "Congratulation!")
+                             (error "Three was the count!")))
+                 "Apply Form")
   (widget-insert " ")
   (widget-create 'push-button
   (widget-insert " ")
   (widget-create 'push-button
-                :notify (lambda (&rest ignore)
-                          (widget-example))
-                "Reset Form")
+                 :notify (lambda (&rest ignore)
+                           (widget-example))
+                 "Reset Form")
   (widget-insert "\n")
   (use-local-map widget-keymap)
   (widget-setup))
   (widget-insert "\n")
   (use-local-map widget-keymap)
   (widget-setup))
index 96e935b..7197ea8 100644 (file)
@@ -7,7 +7,7 @@
 @finalout
 @titlepage
 @title XEmacs FAQ
 @finalout
 @titlepage
 @title XEmacs FAQ
-@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2000/01/16 13:41:45 $
+@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2000/01/27 17:11:28 $
 @sp 1
 @author Tony Rossini <rossini@@biostat.washington.edu>
 @author Ben Wing <ben@@xemacs.org>
 @sp 1
 @author Tony Rossini <rossini@@biostat.washington.edu>
 @author Ben Wing <ben@@xemacs.org>
@@ -22,7 +22,7 @@
 @ifinfo
 @dircategory XEmacs Editor
 @direntry
 @ifinfo
 @dircategory XEmacs Editor
 @direntry
-* FAQ: (xemacs-faq).           XEmacs FAQ.
+* FAQ: (xemacs-faq).            XEmacs FAQ.
 @end direntry
 @end ifinfo
 
 @end direntry
 @end ifinfo
 
@@ -380,28 +380,28 @@ Miscellaneous:
 XEmacs on MS Windows
 
 General Info:
 XEmacs on MS Windows
 
 General Info:
-* Q6.0.1::     What is the status of the XEmacs port to Windows?
-* Q6.0.2::     What flavors of MS Windows are supported?
-* Q6.0.3::     Are binary kits available?
-* Q6.0.4::     Does XEmacs on MS Windows require an X server to run?
+* Q6.0.1::      What is the status of the XEmacs port to Windows?
+* Q6.0.2::      What flavors of MS Windows are supported?
+* Q6.0.3::      Are binary kits available?
+* Q6.0.4::      Does XEmacs on MS Windows require an X server to run?
 
 Building XEmacs on MS Windows:
 
 Building XEmacs on MS Windows:
-* Q6.1.1::     I decided to run with X.  Where do I get an X server?
-* Q6.1.2::     What compiler do I need to compile XEmacs?
-* Q6.1.3::     How do I compile for the native port?
-* Q6.1.4::     How do I compile for the X port?
-* Q6.1.5::     How do I compile for Cygnus' Cygwin?
-* Q6.1.6::     What do I need for Cygwin?
+* Q6.1.1::      I decided to run with X.  Where do I get an X server?
+* Q6.1.2::      What compiler do I need to compile XEmacs?
+* Q6.1.3::      How do I compile for the native port?
+* Q6.1.4::      How do I compile for the X port?
+* Q6.1.5::      How do I compile for Cygnus' Cygwin?
+* Q6.1.6::      What do I need for Cygwin?
 
 Customization and User Interface:
 
 Customization and User Interface:
-* Q6.2.1::     How will the port cope with differences in the Windows user interface?
-* Q6.2.2::     How do I change fonts in XEmacs on MS Windows?
-* Q6.2.3::     Where do I put my @file{.emacs} file?
+* Q6.2.1::      How will the port cope with differences in the Windows user interface?
+* Q6.2.2::      How do I change fonts in XEmacs on MS Windows?
+* Q6.2.3::      Where do I put my @file{.emacs} file?
 
 Miscellaneous:
 
 Miscellaneous:
-* Q6.3.1::     Will XEmacs rename all the win32-* symbols to w32-*?
-* Q6.3.2::     What are the differences between the various MS Windows emacsen?
-* Q6.3.3::     What is the porting team doing at the moment?
+* Q6.3.1::      Will XEmacs rename all the win32-* symbols to w32-*?
+* Q6.3.2::      What are the differences between the various MS Windows emacsen?
+* Q6.3.3::      What is the porting team doing at the moment?
 
 Current Events:
 
 
 Current Events:
 
@@ -953,7 +953,7 @@ confoundance disease}.  In particular, many functions such as @code{eq},
 are integers are the same.  Byte code compiled under any version 19
 Emacs will have all such functions mapped to their @code{old-} equivalents
 when the byte code is read into XEmacs 20.  This is to preserve
 are integers are the same.  Byte code compiled under any version 19
 Emacs will have all such functions mapped to their @code{old-} equivalents
 when the byte code is read into XEmacs 20.  This is to preserve
-compatibility -- Emacs 19 converts all constant characters to the equivalent
+compatibility---Emacs 19 converts all constant characters to the equivalent
 integer during byte-compilation, and thus there is no other way to preserve
 byte-code compatibility even if the code has specifically been written
 with the distinction between characters and integers in mind.
 integer during byte-compilation, and thus there is no other way to preserve
 byte-code compatibility even if the code has specifically been written
 with the distinction between characters and integers in mind.
@@ -962,7 +962,7 @@ with the distinction between characters and integers in mind.
 code}.  For example, the character @kbd{A} is represented as the
 @w{integer 65}, following the standard @sc{ascii} representation of
 characters.  If XEmacs was not compiled with @sc{mule} support, the
 code}.  For example, the character @kbd{A} is represented as the
 @w{integer 65}, following the standard @sc{ascii} representation of
 characters.  If XEmacs was not compiled with @sc{mule} support, the
-range of this integer will always be 0 to 255 -- eight bits, or one
+range of this integer will always be 0 to 255---eight bits, or one
 byte. (Integers outside this range are accepted but silently truncated;
 however, you should most decidedly @emph{not} rely on this, because it
 will not work under XEmacs with @sc{mule} support.)  When @sc{mule}
 byte. (Integers outside this range are accepted but silently truncated;
 however, you should most decidedly @emph{not} rely on this, because it
 will not work under XEmacs with @sc{mule} support.)  When @sc{mule}
@@ -1007,9 +1007,9 @@ it.  However, menubar localization @emph{does} work, even in 19.14.  To
 enable it, add to your @file{Emacs} file entries like this:
 
 @example
 enable it, add to your @file{Emacs} file entries like this:
 
 @example
-Emacs*XlwMenu.resourceLabels:                  True
-Emacs*XlwMenu.file.labelString:                        Fichier
-Emacs*XlwMenu.openInOtherWindow.labelString:   In anderem Fenster offnen
+Emacs*XlwMenu.resourceLabels:                   True
+Emacs*XlwMenu.file.labelString:                 Fichier
+Emacs*XlwMenu.openInOtherWindow.labelString:    In anderem Fenster offnen
 @end example
 
 The name of the resource is derived from the non-localized entry by
 @end example
 
 The name of the resource is derived from the non-localized entry by
@@ -1104,12 +1104,12 @@ Following is a sample to distinguish mule variants:
     (cond ((boundp 'MULE)
            ;; for original Mule
            )
     (cond ((boundp 'MULE)
            ;; for original Mule
            )
-         ((string-match "XEmacs" emacs-version)
-          ;; for XEmacs with Mule
-          )
-         (t
-          ;; for next version of Emacs
-          ))
+          ((string-match "XEmacs" emacs-version)
+           ;; for XEmacs with Mule
+           )
+          (t
+           ;; for next version of Emacs
+           ))
   ;; for old emacs variants
   )
 @end lisp
   ;; for old emacs variants
   )
 @end lisp
@@ -1354,11 +1354,11 @@ out ways to reduce the disk requirements if desired.
 Now examine the space used by directory:
 
 @format
 Now examine the space used by directory:
 
 @format
-0      /usr/local/bin/xemacs
-2048   /usr/local/bin/xemacs-19.13
+0       /usr/local/bin/xemacs
+2048    /usr/local/bin/xemacs-19.13
 
 
-1546   /usr/local/lib/xemacs-19.13/i486-miranova-sco3.2v4.2
-1158   /usr/local/lib/xemacs-19.13/i486-unknown-linux1.2.13
+1546    /usr/local/lib/xemacs-19.13/i486-miranova-sco3.2v4.2
+1158    /usr/local/lib/xemacs-19.13/i486-unknown-linux1.2.13
 @end format
 
 You need to keep these.  XEmacs isn't stripped by default in
 @end format
 
 You need to keep these.  XEmacs isn't stripped by default in
@@ -1366,15 +1366,15 @@ installation, you should consider stripping.  That will save you about
 5MB right there.
 
 @format
 5MB right there.
 
 @format
-207    /usr/local/lib/xemacs-19.13/etc/w3
-122    /usr/local/lib/xemacs-19.13/etc/sounds
-18     /usr/local/lib/xemacs-19.13/etc/sparcworks
-159    /usr/local/lib/xemacs-19.13/etc/vm
-6      /usr/local/lib/xemacs-19.13/etc/e
-21     /usr/local/lib/xemacs-19.13/etc/eos
-172    /usr/local/lib/xemacs-19.13/etc/toolbar
-61     /usr/local/lib/xemacs-19.13/etc/ns
-43     /usr/local/lib/xemacs-19.13/etc/gnus
+207     /usr/local/lib/xemacs-19.13/etc/w3
+122     /usr/local/lib/xemacs-19.13/etc/sounds
+18      /usr/local/lib/xemacs-19.13/etc/sparcworks
+159     /usr/local/lib/xemacs-19.13/etc/vm
+6       /usr/local/lib/xemacs-19.13/etc/e
+21      /usr/local/lib/xemacs-19.13/etc/eos
+172     /usr/local/lib/xemacs-19.13/etc/toolbar
+61      /usr/local/lib/xemacs-19.13/etc/ns
+43      /usr/local/lib/xemacs-19.13/etc/gnus
 @end format
 
 These are support directories for various packages.  In general they
 @end format
 
 These are support directories for various packages.  In general they
@@ -1382,50 +1382,50 @@ match a directory under ./xemacs-19.13/lib/xemacs-19.13/lisp/.  If you
 do not require the package, you may delete or gzip the support too.
 
 @format
 do not require the package, you may delete or gzip the support too.
 
 @format
-1959   /usr/local/lib/xemacs-19.13/etc
-175    /usr/local/lib/xemacs-19.13/lisp/bytecomp
-340    /usr/local/lib/xemacs-19.13/lisp/calendar
-342    /usr/local/lib/xemacs-19.13/lisp/comint
-517    /usr/local/lib/xemacs-19.13/lisp/dired
-42     /usr/local/lib/xemacs-19.13/lisp/electric
-212    /usr/local/lib/xemacs-19.13/lisp/emulators
-238    /usr/local/lib/xemacs-19.13/lisp/energize
-289    /usr/local/lib/xemacs-19.13/lisp/gnus
-457    /usr/local/lib/xemacs-19.13/lisp/ilisp
-1439   /usr/local/lib/xemacs-19.13/lisp/modes
-2276   /usr/local/lib/xemacs-19.13/lisp/packages
-1040   /usr/local/lib/xemacs-19.13/lisp/prim
-176    /usr/local/lib/xemacs-19.13/lisp/pcl-cvs
-154    /usr/local/lib/xemacs-19.13/lisp/rmail
-3      /usr/local/lib/xemacs-19.13/lisp/epoch
-45     /usr/local/lib/xemacs-19.13/lisp/term
-860    /usr/local/lib/xemacs-19.13/lisp/utils
-851    /usr/local/lib/xemacs-19.13/lisp/vm
-13     /usr/local/lib/xemacs-19.13/lisp/vms
-157    /usr/local/lib/xemacs-19.13/lisp/x11
-19     /usr/local/lib/xemacs-19.13/lisp/tooltalk
-14     /usr/local/lib/xemacs-19.13/lisp/sunpro
-291    /usr/local/lib/xemacs-19.13/lisp/games
-198    /usr/local/lib/xemacs-19.13/lisp/edebug
-619    /usr/local/lib/xemacs-19.13/lisp/w3
-229    /usr/local/lib/xemacs-19.13/lisp/eos
-55     /usr/local/lib/xemacs-19.13/lisp/iso
-59     /usr/local/lib/xemacs-19.13/lisp/mailcrypt
-187    /usr/local/lib/xemacs-19.13/lisp/eterm
-356    /usr/local/lib/xemacs-19.13/lisp/ediff
-408    /usr/local/lib/xemacs-19.13/lisp/hyperbole/kotl
-1262   /usr/local/lib/xemacs-19.13/lisp/hyperbole
-247    /usr/local/lib/xemacs-19.13/lisp/hm--html-menus
-161    /usr/local/lib/xemacs-19.13/lisp/mh-e
-299    /usr/local/lib/xemacs-19.13/lisp/viper
-53     /usr/local/lib/xemacs-19.13/lisp/oobr/tree-x
-4      /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/DocWindow.nib
-3      /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/InfoPanel.nib
-3      /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/TreeView.nib
-11     /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj
-53     /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx
-466    /usr/local/lib/xemacs-19.13/lisp/oobr
-14142  /usr/local/lib/xemacs-19.13/lisp
+1959    /usr/local/lib/xemacs-19.13/etc
+175     /usr/local/lib/xemacs-19.13/lisp/bytecomp
+340     /usr/local/lib/xemacs-19.13/lisp/calendar
+342     /usr/local/lib/xemacs-19.13/lisp/comint
+517     /usr/local/lib/xemacs-19.13/lisp/dired
+42      /usr/local/lib/xemacs-19.13/lisp/electric
+212     /usr/local/lib/xemacs-19.13/lisp/emulators
+238     /usr/local/lib/xemacs-19.13/lisp/energize
+289     /usr/local/lib/xemacs-19.13/lisp/gnus
+457     /usr/local/lib/xemacs-19.13/lisp/ilisp
+1439    /usr/local/lib/xemacs-19.13/lisp/modes
+2276    /usr/local/lib/xemacs-19.13/lisp/packages
+1040    /usr/local/lib/xemacs-19.13/lisp/prim
+176     /usr/local/lib/xemacs-19.13/lisp/pcl-cvs
+154     /usr/local/lib/xemacs-19.13/lisp/rmail
+3       /usr/local/lib/xemacs-19.13/lisp/epoch
+45      /usr/local/lib/xemacs-19.13/lisp/term
+860     /usr/local/lib/xemacs-19.13/lisp/utils
+851     /usr/local/lib/xemacs-19.13/lisp/vm
+13      /usr/local/lib/xemacs-19.13/lisp/vms
+157     /usr/local/lib/xemacs-19.13/lisp/x11
+19      /usr/local/lib/xemacs-19.13/lisp/tooltalk
+14      /usr/local/lib/xemacs-19.13/lisp/sunpro
+291     /usr/local/lib/xemacs-19.13/lisp/games
+198     /usr/local/lib/xemacs-19.13/lisp/edebug
+619     /usr/local/lib/xemacs-19.13/lisp/w3
+229     /usr/local/lib/xemacs-19.13/lisp/eos
+55      /usr/local/lib/xemacs-19.13/lisp/iso
+59      /usr/local/lib/xemacs-19.13/lisp/mailcrypt
+187     /usr/local/lib/xemacs-19.13/lisp/eterm
+356     /usr/local/lib/xemacs-19.13/lisp/ediff
+408     /usr/local/lib/xemacs-19.13/lisp/hyperbole/kotl
+1262    /usr/local/lib/xemacs-19.13/lisp/hyperbole
+247     /usr/local/lib/xemacs-19.13/lisp/hm--html-menus
+161     /usr/local/lib/xemacs-19.13/lisp/mh-e
+299     /usr/local/lib/xemacs-19.13/lisp/viper
+53      /usr/local/lib/xemacs-19.13/lisp/oobr/tree-x
+4       /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/DocWindow.nib
+3       /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/InfoPanel.nib
+3       /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj/TreeView.nib
+11      /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx/English.lproj
+53      /usr/local/lib/xemacs-19.13/lisp/oobr/tree-nx
+466     /usr/local/lib/xemacs-19.13/lisp/oobr
+14142   /usr/local/lib/xemacs-19.13/lisp
 @end format
 
 These are all Emacs Lisp source code and bytecompiled object code.  You
 @end format
 
 These are all Emacs Lisp source code and bytecompiled object code.  You
@@ -1451,14 +1451,14 @@ directories you definitely do @strong{not} want to delete, although
 certain packages can be removed from them if you do not use them.
 
 @example
 certain packages can be removed from them if you do not use them.
 
 @example
-1972   /usr/local/lib/xemacs-19.13/info
+1972    /usr/local/lib/xemacs-19.13/info
 @end example
 
 These are online texinfo sources.  You may either gzip them or remove
 them.  In either case, @kbd{C-h i} (info mode) will no longer work.
 
 @example
 @end example
 
 These are online texinfo sources.  You may either gzip them or remove
 them.  In either case, @kbd{C-h i} (info mode) will no longer work.
 
 @example
-20778  /usr/local/lib/xemacs-19.13
+20778   /usr/local/lib/xemacs-19.13
 @end example
 
 The 20MB achieved is less than half of what the full distribution takes up,
 @end example
 
 The 20MB achieved is less than half of what the full distribution takes up,
@@ -1608,7 +1608,7 @@ Patch the XEmacs binary by replacing all occurrences of
 suffice.  If you don't understand how to do this, don't do it.
 
 @item
 suffice.  If you don't understand how to do this, don't do it.
 
 @item
-Rebuild XEmacs yourself -- any working ELF version of libc should be
+Rebuild XEmacs yourself---any working ELF version of libc should be
 O.K.
 @end enumerate
 
 O.K.
 @end enumerate
 
@@ -2005,10 +2005,10 @@ backgrounds and foregrounds into your @file{.../app-defaults/Emacs}
 like:
 
 @example
 like:
 
 @example
-*Foreground:   Black   ;everything will be of black on grey95,
-*Background:   Grey95  ;unless otherwise specified.
-*cursorColor:  Red3    ;red3 cursor with grey95 border.
-*pointerColor: Red3    ;red3 pointer with grey95 border.
+*Foreground:    Black   ;everything will be of black on grey95,
+*Background:    Grey95  ;unless otherwise specified.
+*cursorColor:   Red3    ;red3 cursor with grey95 border.
+*pointerColor:  Red3    ;red3 pointer with grey95 border.
 @end example
 @end quotation
 
 @end example
 @end quotation
 
@@ -2736,14 +2736,14 @@ Implement the above as well as set the following in your @file{.emacs}
 (setq default-minibuffer-frame
       (make-frame
        '(minibuffer only
 (setq default-minibuffer-frame
       (make-frame
        '(minibuffer only
-                   width 86
-                   height 1
-                   menubar-visible-p nil
-                   default-toolbar-visible-p nil
-                   name "minibuffer"
-                   top -2
-                   left -2
-                   has-modeline-p nil)))
+                    width 86
+                    height 1
+                    menubar-visible-p nil
+                    default-toolbar-visible-p nil
+                    name "minibuffer"
+                    top -2
+                    left -2
+                    has-modeline-p nil)))
 (frame-notice-user-settings)
 @end lisp
 
 (frame-notice-user-settings)
 @end lisp
 
@@ -2829,7 +2829,7 @@ A more sophisticated title might be:
 @lisp
 (setq frame-title-format
       '("%S: " (buffer-file-name "%f"
 @lisp
 (setq frame-title-format
       '("%S: " (buffer-file-name "%f"
-                                (dired-directory dired-directory "%b"))))
+                                 (dired-directory dired-directory "%b"))))
 @end lisp
 
 That is, use the file name, or the dired-directory, or the buffer name.
 @end lisp
 
 That is, use the file name, or the dired-directory, or the buffer name.
@@ -2913,24 +2913,24 @@ Like this:
 (set-face-background 'default      "bisque") ; frame background
 (set-face-foreground 'default      "black") ; normal text
 (set-face-background 'zmacs-region "red") ; When selecting w/
 (set-face-background 'default      "bisque") ; frame background
 (set-face-foreground 'default      "black") ; normal text
 (set-face-background 'zmacs-region "red") ; When selecting w/
-                                       ; mouse
+                                        ; mouse
 (set-face-foreground 'zmacs-region "yellow")
 (set-face-font       'default      "*courier-bold-r*120-100-100*")
 (set-face-background 'highlight    "blue") ; Ie when selecting
 (set-face-foreground 'zmacs-region "yellow")
 (set-face-font       'default      "*courier-bold-r*120-100-100*")
 (set-face-background 'highlight    "blue") ; Ie when selecting
-                                       ; buffers
+                                        ; buffers
 (set-face-foreground 'highlight    "yellow")
 (set-face-background 'modeline     "blue") ; Line at bottom
 (set-face-foreground 'highlight    "yellow")
 (set-face-background 'modeline     "blue") ; Line at bottom
-                                       ; of buffer
+                                        ; of buffer
 (set-face-foreground 'modeline     "white")
 (set-face-font       'modeline     "*bold-r-normal*140-100-100*")
 (set-face-background 'isearch      "yellow") ; When highlighting
 (set-face-foreground 'modeline     "white")
 (set-face-font       'modeline     "*bold-r-normal*140-100-100*")
 (set-face-background 'isearch      "yellow") ; When highlighting
-                                       ; while searching
+                                        ; while searching
 (set-face-foreground 'isearch      "red")
 (setq x-pointer-foreground-color   "black") ; Adds to bg color,
 (set-face-foreground 'isearch      "red")
 (setq x-pointer-foreground-color   "black") ; Adds to bg color,
-                                       ; so keep black
+                                        ; so keep black
 (setq x-pointer-background-color   "blue") ; This is color
 (setq x-pointer-background-color   "blue") ; This is color
-                                       ; you really
-                                       ; want ptr/crsr
+                                        ; you really
+                                        ; want ptr/crsr
 @end lisp
 
 @node Q3.2.2, Q3.2.3, Q3.2.1, Customization
 @end lisp
 
 @node Q3.2.2, Q3.2.3, Q3.2.1, Customization
@@ -3106,7 +3106,7 @@ mode:
 
 @lisp
 (add-hook 'TeX-mode-hook
 
 @lisp
 (add-hook 'TeX-mode-hook
-         '(lambda () (setq fume-display-in-modeline-p nil)))
+          '(lambda () (setq fume-display-in-modeline-p nil)))
 @end lisp
 
 @email{dhughes@@origin-at.co.uk, David Hughes} writes:
 @end lisp
 
 @email{dhughes@@origin-at.co.uk, David Hughes} writes:
@@ -3221,8 +3221,8 @@ For the FAQ example you could use:
 @lisp
 (global-set-key [(control ?.)]
   (lambda () (interactive) (scroll-up 1)))
 @lisp
 (global-set-key [(control ?.)]
   (lambda () (interactive) (scroll-up 1)))
-(global-set-key [(control ?            ;)]
-                         (lambda () (interactive) (scroll-up -1)))
+(global-set-key [(control ?;)]
+  (lambda () (interactive) (scroll-up -1)))
 @end lisp
 
 This is fine if you only need a few functions within the lambda body.
 @end lisp
 
 This is fine if you only need a few functions within the lambda body.
@@ -3256,7 +3256,7 @@ Add the following (Thanks to @email{mly@@adoc.xerox.com, Richard Mlynarik} and
   (scroll-down 1))
 
 (global-set-key [(control ?.)] 'scroll-up-one-line) ; C-.
   (scroll-down 1))
 
 (global-set-key [(control ?.)] 'scroll-up-one-line) ; C-.
-(global-set-key [(control ?            ;)] 'scroll-down-one-line) ; C-;
+(global-set-key [(control ?;)] 'scroll-down-one-line) ; C-;
 @end lisp
 
 The key point is that you can only bind simple functions to keys; you
 @end lisp
 
 The key point is that you can only bind simple functions to keys; you
@@ -3373,7 +3373,7 @@ xmodmap, e.g.
 @c hey, show some respect, willya -- there's xkeycaps, isn't there? --
 @c chr ;)
 @example
 @c hey, show some respect, willya -- there's xkeycaps, isn't there? --
 @c chr ;)
 @example
-       xmodmap -e 'keycode 0xff20 = Multi_key'
+        xmodmap -e 'keycode 0xff20 = Multi_key'
 @end example
 
 You will need to pick an appropriate keycode. Use xev to find out the
 @end example
 
 You will need to pick an appropriate keycode. Use xev to find out the
@@ -3384,9 +3384,9 @@ define the right `Windows' key as Multi_key'.]
 
 Once you have Multi_key defined, you can use e.g.
 @example
 
 Once you have Multi_key defined, you can use e.g.
 @example
-       Multi a '       => Ã¡
-       Multi e "       => Ã«
-       Multi c ,       => Ã§
+        Multi a '       => Ã¡
+        Multi e "       => Ã«
+        Multi c ,       => Ã§
 @end example
 
 etc.
 @end example
 
 etc.
@@ -3394,9 +3394,9 @@ etc.
 Also, recent versions of XFree86 define various AltGr-<key>
 combinations as dead keys, i.e.
 @example
 Also, recent versions of XFree86 define various AltGr-<key>
 combinations as dead keys, i.e.
 @example
-       AltGr [         => dead_diaeresis
-       AltGr ]         => dead_tilde
-       AltGr ;         => dead_acute
+        AltGr [         => dead_diaeresis
+        AltGr ]         => dead_tilde
+        AltGr ;         => dead_acute
 @end example
 etc.
 
 @end example
 etc.
 
@@ -3516,7 +3516,7 @@ Select from the @code{Options} menu
 You can use a color to make it stand out better:
 
 @example
 You can use a color to make it stand out better:
 
 @example
-Emacs*cursorColor:     Red
+Emacs*cursorColor:      Red
 @end example
 
 @node Q3.6.2, Q3.6.3, Q3.6.1, Customization
 @end example
 
 @node Q3.6.2, Q3.6.3, Q3.6.1, Customization
@@ -3949,18 +3949,18 @@ off like this:
   (interactive "_P")
   (let ((zmacs-region-stays t))
     (if (interactive-p)
   (interactive "_P")
   (let ((zmacs-region-stays t))
     (if (interactive-p)
-       (condition-case nil
-           ad-do-it
-         (end-of-buffer (goto-char (point-max))))
+        (condition-case nil
+            ad-do-it
+          (end-of-buffer (goto-char (point-max))))
       ad-do-it)))
 
 (defadvice scroll-down (around scroll-down freeze)
   (interactive "_P")
   (let ((zmacs-region-stays t))
     (if (interactive-p)
       ad-do-it)))
 
 (defadvice scroll-down (around scroll-down freeze)
   (interactive "_P")
   (let ((zmacs-region-stays t))
     (if (interactive-p)
-       (condition-case nil
-           ad-do-it
-         (beginning-of-buffer (goto-char (point-min))))
+        (condition-case nil
+            ad-do-it
+          (beginning-of-buffer (goto-char (point-min))))
       ad-do-it)))
 @end lisp
 
       ad-do-it)))
 @end lisp
 
@@ -4088,7 +4088,7 @@ Set @code{vm-reply-ignored-addresses} to a list, like
 @lisp
 (setq vm-reply-ignored-addresses
       '("wing@@nuspl@@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com"
 @lisp
 (setq vm-reply-ignored-addresses
       '("wing@@nuspl@@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com"
-       "wing@@netcom.com" "wing@@xemacs.org"))
+        "wing@@netcom.com" "wing@@xemacs.org"))
 @end lisp
 
 Note that each string is a regular expression.
 @end lisp
 
 Note that each string is a regular expression.
@@ -4195,7 +4195,7 @@ John.@email{Cooper@@Eng.Sun.COM, John S Cooper} writes:
 
 @quotation
 @lisp
 
 @quotation
 @lisp
-                                       ; Don't use multiple frames
+                                        ; Don't use multiple frames
 (setq vm-frame-per-composition nil)
 (setq vm-frame-per-folder nil)
 (setq vm-frame-per-edit nil)
 (setq vm-frame-per-composition nil)
 (setq vm-frame-per-folder nil)
 (setq vm-frame-per-edit nil)
@@ -4210,7 +4210,7 @@ For mh-e use the following:
 
 @lisp
 (add-hook 'mh-show-mode-hook '(lambda ()
 
 @lisp
 (add-hook 'mh-show-mode-hook '(lambda ()
-                               (smiley-region (point-min)
+                                (smiley-region (point-min)
                                                (point-max))))
 @end lisp
 
                                                (point-max))))
 @end lisp
 
@@ -4812,7 +4812,7 @@ additional package.
 Each package bundled with XEmacs means more work for the maintainers,
 whether they want it or not.  If you are ready to take over the
 maintenance responsibilities for the package you port, be sure to say
 Each package bundled with XEmacs means more work for the maintainers,
 whether they want it or not.  If you are ready to take over the
 maintenance responsibilities for the package you port, be sure to say
-so -- we will more likely include it.
+so---we will more likely include it.
 
 @item
 The package simply hasn't been noted by the XEmacs development.  If
 
 @item
 The package simply hasn't been noted by the XEmacs development.  If
@@ -4906,8 +4906,8 @@ on.  This can be done by @kbd{M-x font-lock-mode}, or by having XEmacs
 automatically start it by adding lines like:
 
 @lisp
 automatically start it by adding lines like:
 
 @lisp
-(add-hook 'emacs-lisp-mode-hook        'turn-on-font-lock)
-(add-hook 'dired-mode-hook     'turn-on-font-lock)
+(add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
+(add-hook 'dired-mode-hook      'turn-on-font-lock)
 @end lisp
 
 to your @file{.emacs}.  See the file @file{etc/sample.emacs} for more
 @end lisp
 
 to your @file{.emacs}.  See the file @file{etc/sample.emacs} for more
@@ -5431,7 +5431,7 @@ user-variable temporarily, use @code{let}:
 
 @lisp
 (let ((case-fold-search nil))
 
 @lisp
 (let ((case-fold-search nil))
-  ...                                  ; code with searches that must be case-sensitive
+  ...                                   ; code with searches that must be case-sensitive
   ...)
 @end lisp
 
   ...)
 @end lisp
 
@@ -5496,7 +5496,7 @@ unbound.  The correct thing is to do it like this:
 
 @lisp
 (defun my-function (whatever)
 
 @lisp
 (defun my-function (whatever)
-  (let (a)                             ; default initialization is to nil
+  (let (a)                              ; default initialization is to nil
     ... build a large list ...
     ... and exit, unbinding `a' in the process  ...)
 @end lisp
     ... build a large list ...
     ... and exit, unbinding `a' in the process  ...)
 @end lisp
@@ -5509,11 +5509,11 @@ Note that even global variables should not be @code{setq}ed without
 The reason for the warning is the following:
 
 @lisp
 The reason for the warning is the following:
 
 @lisp
-(defun flurgoze nil)                   ; ok, global internal variable
+(defun flurgoze nil)                    ; ok, global internal variable
 ...
 
 ...
 
-(setq flurghoze t)                     ; ops!  a typo, but semantically correct.
-                                       ; however, the byte-compiler warns.
+(setq flurghoze t)                      ; ops!  a typo, but semantically correct.
+                                        ; however, the byte-compiler warns.
 
 While compiling toplevel forms:
 ** assignment to free variable flurghoze
 
 While compiling toplevel forms:
 ** assignment to free variable flurghoze
@@ -5653,7 +5653,7 @@ Add the following line to your @file{.emacs}:
 (setq sound-alist nil)
 @end lisp
 
 (setq sound-alist nil)
 @end lisp
 
-That will make your XEmacs totally silent -- even the default ding sound
+That will make your XEmacs totally silent---even the default ding sound
 (TTY beep on TTY-s) will be gone.
 
 Starting with XEmacs-20.2 you can also change these with Customize.
 (TTY beep on TTY-s) will be gone.
 
 Starting with XEmacs-20.2 you can also change these with Customize.
@@ -5750,7 +5750,7 @@ have a look at your @file{.emacs} file.  You will probably have a line
 like:
 
 @lisp
 like:
 
 @lisp
-(add-hook 'postscript-mode-hook        'turn-on-font-lock)
+(add-hook 'postscript-mode-hook 'turn-on-font-lock)
 @end lisp
 
 Take it out, restart XEmacs, and it won't try to fontify your postscript
 @end lisp
 
 Take it out, restart XEmacs, and it won't try to fontify your postscript
@@ -5989,8 +5989,8 @@ You use something like:
 
 @lisp
 (setq Info-directory-list (cons
 
 @lisp
 (setq Info-directory-list (cons
-                          (expand-file-name "~/info")
-                          Info-default-directory-list))
+                           (expand-file-name "~/info")
+                           Info-default-directory-list))
 @end lisp
 
 @email{davidm@@prism.kla.com, David Masterson} writes:
 @end lisp
 
 @email{davidm@@prism.kla.com, David Masterson} writes:
@@ -6080,28 +6080,28 @@ port of XEmacs.
 @menu
 
 General Info
 @menu
 
 General Info
-* Q6.0.1::     What is the status of the XEmacs port to Windows?
-* Q6.0.2::     What flavors of MS Windows are supported?
+* Q6.0.1::      What is the status of the XEmacs port to Windows?
+* Q6.0.2::      What flavors of MS Windows are supported?
 * Q6.0.3::      Where are the XEmacs on MS Windows binaries?
 * Q6.0.3::      Where are the XEmacs on MS Windows binaries?
-* Q6.0.4::     Does XEmacs on MS Windows require an X server to run?
+* Q6.0.4::      Does XEmacs on MS Windows require an X server to run?
 
 Building XEmacs on MS Windows
 
 Building XEmacs on MS Windows
-* Q6.1.1::     I decided to run with X.  Where do I get an X server?
-* Q6.1.2::     What compiler do I need to compile XEmacs?
-* Q6.1.3::     How do I compile for the native port?
-* Q6.1.4::     How do I compile for the X port?
-* Q6.1.5::     How do I compile for Cygnus' Cygwin?
-* Q6.1.6::     What do I need for Cygwin?
+* Q6.1.1::      I decided to run with X.  Where do I get an X server?
+* Q6.1.2::      What compiler do I need to compile XEmacs?
+* Q6.1.3::      How do I compile for the native port?
+* Q6.1.4::      How do I compile for the X port?
+* Q6.1.5::      How do I compile for Cygnus' Cygwin?
+* Q6.1.6::      What do I need for Cygwin?
 
 Customization and User Interface
 
 Customization and User Interface
-* Q6.2.1::     How will the port cope with differences in the Windows user interface?
-* Q6.2.2::     How do I change fonts in XEmacs on MS Windows?
-* Q6.2.3::     Where do I put my @file{.emacs} file?
+* Q6.2.1::      How will the port cope with differences in the Windows user interface?
+* Q6.2.2::      How do I change fonts in XEmacs on MS Windows?
+* Q6.2.3::      Where do I put my @file{.emacs} file?
 
 Miscellaneous
 
 Miscellaneous
-* Q6.3.1::     Will XEmacs rename all the win32-* symbols to w32-*?
-* Q6.3.2::     What are the differences between the various MS Windows emacsen?
-* Q6.3.3::     What is the porting team doing at the moment?
+* Q6.3.1::      Will XEmacs rename all the win32-* symbols to w32-*?
+* Q6.3.2::      What are the differences between the various MS Windows emacsen?
+* Q6.3.3::      What is the porting team doing at the moment?
 
 @end menu
 
 
 @end menu
 
@@ -6143,7 +6143,7 @@ Short answer: No.
 Long answer: XEmacs can be built in several ways in the MS Windows
 environment, some of them requiring an X server and some not.
 
 Long answer: XEmacs can be built in several ways in the MS Windows
 environment, some of them requiring an X server and some not.
 
-One is what we call the "X" port -- it requires X libraries to build
+One is what we call the "X" port---it requires X libraries to build
 and an X server to run.  Internally it uses the Xt event loop and
 makes use of X toolkits.  Its look is quite un-Windowsy, but it works
 reliably and supports all of the graphical features of Unix XEmacs.
 and an X server to run.  Internally it uses the Xt event loop and
 makes use of X toolkits.  Its look is quite un-Windowsy, but it works
 reliably and supports all of the graphical features of Unix XEmacs.
@@ -6161,7 +6161,7 @@ advantage of Cygnus emulation library under Win32, which enables it to
 reuse much of the Unix XEmacs code base, such as processes and network
 support, or internal select() mechanisms.
 
 reuse much of the Unix XEmacs code base, such as processes and network
 support, or internal select() mechanisms.
 
-Cygwin port supports all display types -- TTY, X & MS gui, and can be
+Cygwin port supports all display types---TTY, X & MS gui, and can be
 built with support for all three.  If you build with ms gui support
 then the Cygwin version uses the majority of the msw code, which is
 mostly related to display.  If you want to build with X support you
 built with support for all three.  If you build with ms gui support
 then the Cygwin version uses the majority of the msw code, which is
 mostly related to display.  If you want to build with X support you
@@ -6295,8 +6295,8 @@ default in the MS Windows environment.
 @node Q6.2.2, Q6.2.3, Q6.2.1, MS Windows
 @unnumberedsubsec Q6.2.2: How do I change fonts in XEmacs on MS Windows?
 
 @node Q6.2.2, Q6.2.3, Q6.2.1, MS Windows
 @unnumberedsubsec Q6.2.2: How do I change fonts in XEmacs on MS Windows?
 
-You can change font manually, but not from the menubar, yet. For
-example:
+In 21.2.*, use the font menu.  In 21.1.*, you can change font
+manually. For example:
 
 @display
     (set-face-font 'default "Lucida Console:Regular:10")
 
 @display
     (set-face-font 'default "Lucida Console:Regular:10")
@@ -6482,7 +6482,7 @@ increased MIME support, and many, many synches with GNU Emacs 20.
 The XEmacs/Mule support has been only seriously tested in a Japanese
 locale, and no doubt many problems still remain.  The support for
 ISO-Latin-1 and Japanese is fairly strong.  MULE support comes at a
 The XEmacs/Mule support has been only seriously tested in a Japanese
 locale, and no doubt many problems still remain.  The support for
 ISO-Latin-1 and Japanese is fairly strong.  MULE support comes at a
-price -- about a 30% slowdown from 19.16.  We're making progress on
+price---about a 30% slowdown from 19.16.  We're making progress on
 improving performance and XEmacs 20.3 compiled without Mule (which is
 the default) is definitely faster than XEmacs 19.16.
 
 improving performance and XEmacs 20.3 compiled without Mule (which is
 the default) is definitely faster than XEmacs 19.16.
 
index e1afef7..9f83d33 100644 (file)
@@ -186,9 +186,9 @@ Edit a list of abbrevs; you can add, alter, or remove definitions.
 
 @example
 (lisp-mode-abbrev-table)
 
 @example
 (lisp-mode-abbrev-table)
-"dk"          0    "define-key"
+"dk"           0    "define-key"
 (global-abbrev-table)
 (global-abbrev-table)
-"dfn"         0    "definition"
+"dfn"          0    "definition"
 @end example
 
 @noindent
 @end example
 
 @noindent
index c6dcc9a..d0dd704 100644 (file)
@@ -117,14 +117,14 @@ buffer list:@refill
  MR Buffer         Size  Mode           File
  -- ------         ----  ----           ----
 .*  emacs.tex      383402 Texinfo       /u2/emacs/man/emacs.tex
  MR Buffer         Size  Mode           File
  -- ------         ----  ----           ----
 .*  emacs.tex      383402 Texinfo       /u2/emacs/man/emacs.tex
-    *Help*         1287  Fundamental   
+    *Help*         1287  Fundamental    
     files.el       23076 Emacs-Lisp     /u2/emacs/lisp/files.el
   % RMAIL          64042 RMAIL          /u/rms/RMAIL
     files.el       23076 Emacs-Lisp     /u2/emacs/lisp/files.el
   % RMAIL          64042 RMAIL          /u/rms/RMAIL
- *% man            747   Dired         /u2/emacs/man/
+ *% man            747   Dired          /u2/emacs/man/
     net.emacs      343885 Fundamental   /u/rms/net.emacs
     fileio.c       27691 C              /u2/emacs/src/fileio.c
     NEWS           67340 Text           /u2/emacs/etc/NEWS
     net.emacs      343885 Fundamental   /u/rms/net.emacs
     fileio.c       27691 C              /u2/emacs/src/fileio.c
     NEWS           67340 Text           /u2/emacs/etc/NEWS
-    *scratch*     0     Lisp Interaction
+    *scratch*      0     Lisp Interaction
 @end smallexample
 
 @noindent
 @end smallexample
 
 @noindent
index bcb9764..ffb5a27 100644 (file)
@@ -30,7 +30,7 @@ customization in each session.  @xref{Init File}.
                      file.
 * Audible Bell::    Changing how Emacs sounds the bell. 
 * Faces::           Changing the fonts and colors of a region of text. 
                      file.
 * Audible Bell::    Changing how Emacs sounds the bell. 
 * Faces::           Changing the fonts and colors of a region of text. 
-* X Resources::            X resources controlling various aspects of the
+* X Resources::     X resources controlling various aspects of the
                      behavior of XEmacs.
 @end menu
 
                      behavior of XEmacs.
 @end menu
 
@@ -761,16 +761,16 @@ XEmacs uses the information between them to determine what the major
 mode and variable settings should be.  For example, these are all legal:
 
 @example
 mode and variable settings should be.  For example, these are all legal:
 
 @example
-       ;;; -*- mode: emacs-lisp -*-
-       ;;; -*- mode: postscript; version-control: never -*-
-       ;;; -*- tags-file-name: "/foo/bar/TAGS" -*-
+        ;;; -*- mode: emacs-lisp -*-
+        ;;; -*- mode: postscript; version-control: never -*-
+        ;;; -*- tags-file-name: "/foo/bar/TAGS" -*-
 @end example
 
 For historical reasons, the syntax @code{`-*- modename -*-'} is allowed
 as well; for example, you can use:
 
 @example
 @end example
 
 For historical reasons, the syntax @code{`-*- modename -*-'} is allowed
 as well; for example, you can use:
 
 @example
-       ;;; -*- emacs-lisp -*-
+        ;;; -*- emacs-lisp -*-
 @end example
 
 @vindex enable-local-variables
 @end example
 
 @vindex enable-local-variables
@@ -1232,13 +1232,13 @@ Here are some examples of programmatically binding keys:
 @example
 
 ;;;  Bind @code{my-command} to @key{f1}
 @example
 
 ;;;  Bind @code{my-command} to @key{f1}
-(global-set-key 'f1 'my-command)               
+(global-set-key 'f1 'my-command)                
 
 ;;;  Bind @code{my-command} to @kbd{Shift-f1}
 (global-set-key '(shift f1) 'my-command)
 
 ;;; Bind @code{my-command} to @kbd{C-c Shift-f1}
 
 ;;;  Bind @code{my-command} to @kbd{Shift-f1}
 (global-set-key '(shift f1) 'my-command)
 
 ;;; Bind @code{my-command} to @kbd{C-c Shift-f1}
-(global-set-key '[(control c) (shift f1)] 'my-command) 
+(global-set-key '[(control c) (shift f1)] 'my-command)  
 
 ;;; Bind @code{my-command} to the middle mouse button.
 (global-set-key 'button2 'my-command)
 
 ;;; Bind @code{my-command} to the middle mouse button.
 (global-set-key 'button2 'my-command)
@@ -1288,14 +1288,14 @@ sequences.
 After binding a command to two key sequences with a form like:
 
 @example
 After binding a command to two key sequences with a form like:
 
 @example
-       (define-key global-map "\^X\^I" 'command-1)
+        (define-key global-map "\^X\^I" 'command-1)
 @end example
 
 it is possible to redefine only one of those sequences like so:
 
 @example
 @end example
 
 it is possible to redefine only one of those sequences like so:
 
 @example
-       (define-key global-map [(control x) (control i)] 'command-2)
-       (define-key global-map [(control x) tab] 'command-3)
+        (define-key global-map [(control x) (control i)] 'command-2)
+        (define-key global-map [(control x) tab] 'command-3)
 @end example
 
 This applies only when running under a window system.  If you are
 @end example
 
 This applies only when running under a window system.  If you are
@@ -1918,16 +1918,16 @@ The Emacs command loop catches an error
 @item undefined-key
 You type a key that is undefined
 
 @item undefined-key
 You type a key that is undefined
 
-@item undefined-click  
+@item undefined-click
 You use an undefined mouse-click combination
 
 You use an undefined mouse-click combination
 
-@item no-completion    
+@item no-completion
 Completion was not possible
 
 Completion was not possible
 
-@item y-or-n-p         
+@item y-or-n-p
 You type something other than the required @code{y} or @code{n}
 
 You type something other than the required @code{y} or @code{n}
 
-@item yes-or-no-p      
+@item yes-or-no-p       
 You type something other than @code{yes} or @code{no}
 @end table
 
 You type something other than @code{yes} or @code{no}
 @end table
 
@@ -2066,7 +2066,7 @@ run both variants.
 Starting with XEmacs 21, XEmacs uses the class @samp{XEmacs} if it finds
 any XEmacs resources in the resource database when the X connection is
 initialized.  Otherwise, it will use the class @samp{Emacs} for
 Starting with XEmacs 21, XEmacs uses the class @samp{XEmacs} if it finds
 any XEmacs resources in the resource database when the X connection is
 initialized.  Otherwise, it will use the class @samp{Emacs} for
-backwards compatability.  The variable @var{x-emacs-application-class}
+backwards compatibility.  The variable @var{x-emacs-application-class}
 may be consulted to determine the application class being used.
 
 The examples in this section assume the application class is @samp{Emacs}.
 may be consulted to determine the application class being used.
 
 The examples in this section assume the application class is @samp{Emacs}.
@@ -2098,11 +2098,11 @@ Emacs*FRAME-NAME.parameter: value
 
 @menu
 * Geometry Resources::     Controlling the size and position of frames.
 
 @menu
 * Geometry Resources::     Controlling the size and position of frames.
-* Iconic Resources::      Controlling whether frames come up iconic.
-* Resource List::         List of resources settable on a frame or device.
-* Face Resources::        Controlling faces using resources.
-* Widgets::               The widget hierarchy for XEmacs.
-* Menubar Resources::     Specifying resources for the menubar.
+* Iconic Resources::       Controlling whether frames come up iconic.
+* Resource List::          List of resources settable on a frame or device.
+* Face Resources::         Controlling faces using resources.
+* Widgets::                The widget hierarchy for XEmacs.
+* Menubar Resources::      Specifying resources for the menubar.
 @end menu
 
 @node Geometry Resources
 @end menu
 
 @node Geometry Resources
index 743b699..319c3bf 100644 (file)
@@ -169,9 +169,9 @@ schematic representation of a complete key sequence is as follows:
   Here are some examples of complete key sequences:
 
 @table @kbd
   Here are some examples of complete key sequences:
 
 @table @kbd
-@item [(control c) (control a)]        
+@item [(control c) (control a)]
 Typing @kbd{C-c} followed by @kbd{C-a}
 Typing @kbd{C-c} followed by @kbd{C-a}
-@item [(control c) (control 65)]       
+@item [(control c) (control 65)]
 Typing @kbd{C-c} followed by @kbd{C-a}. (Using the ASCII code
 for the character `a')@refill
 @item [(control c) (break)]
 Typing @kbd{C-c} followed by @kbd{C-a}. (Using the ASCII code
 for the character `a')@refill
 @item [(control c) (break)]
@@ -299,9 +299,9 @@ do the following:
   Create a file called @code{~/.xmodmap}.  In this file, place the lines
 
 @example
   Create a file called @code{~/.xmodmap}.  In this file, place the lines
 
 @example
-       remove Lock = Caps_Lock
-       keysym Caps_Lock = Super_L
-       add Mod2 = Super_L
+        remove Lock = Caps_Lock
+        keysym Caps_Lock = Super_L
+        add Mod2 = Super_L
 @end example
 
 The first line says that the key that is currently called @code{Caps_Lock}
 @end example
 
 The first line says that the key that is currently called @code{Caps_Lock}
index 1557dd5..46f78ec 100644 (file)
@@ -240,8 +240,8 @@ commands are invoked only when you are in XEmacs:
        ))
 
 (cond ((and (string-match "XEmacs" emacs-version)
        ))
 
 (cond ((and (string-match "XEmacs" emacs-version)
-           (or (> emacs-major-version 19)
-               (>= emacs-minor-version 12)))
+            (or (> emacs-major-version 19)
+                (>= emacs-minor-version 12)))
        ;;
        ;; Code which requires XEmacs version 19.12 or newer goes here
        ;;
        ;;
        ;; Code which requires XEmacs version 19.12 or newer goes here
        ;;
@@ -254,7 +254,7 @@ commands are invoked only when you are in XEmacs:
        ))
 
 (cond ((and (not (string-match "Lucid" emacs-version))
        ))
 
 (cond ((and (not (string-match "Lucid" emacs-version))
-           (= emacs-major-version 19))
+            (= emacs-major-version 19))
        ;;
        ;; Code specific to FSF Emacs 19 (not XEmacs) goes here
        ;;
        ;;
        ;; Code specific to FSF Emacs 19 (not XEmacs) goes here
        ;;
@@ -321,20 +321,20 @@ should be used.
 XEmacs has the following new default function keybindings:
 
 @table @kbd
 XEmacs has the following new default function keybindings:
 
 @table @kbd
-@item @key{HELP}       
+@item @key{HELP}
 Same as @kbd{C-h}.
 
 Same as @kbd{C-h}.
 
-@item @key{UNDO}       
+@item @key{UNDO}
 Same as @kbd{M-x undo}.
 
 Same as @kbd{M-x undo}.
 
-@item @key{CUT}        
+@item @key{CUT}
 Same as the Cut menu item; that is, it copies the selected text to
 the X Clipboard selection.
 
 Same as the Cut menu item; that is, it copies the selected text to
 the X Clipboard selection.
 
-@item @key{COPY}       
+@item @key{COPY}
 Same as the Copy menu item.
 
 Same as the Copy menu item.
 
-@item @key{PASTE}      
+@item @key{PASTE}
 Same as the Paste menu item.
 
 @item @key{PGUP}
 Same as the Paste menu item.
 
 @item @key{PGUP}
@@ -352,7 +352,7 @@ Same as @kbd{M->}.
 @item @key{LEFT-ARROW}
 Same as the function @code{backward-char}.
 
 @item @key{LEFT-ARROW}
 Same as the function @code{backward-char}.
 
-@item @key{RIGHT-ARROW}        
+@item @key{RIGHT-ARROW}
 Same as the function @code{forward-char}.
 
 @item @key{UP-ARROW}
 Same as the function @code{forward-char}.
 
 @item @key{UP-ARROW}
index b147f9a..8bdcc98 100644 (file)
@@ -91,7 +91,7 @@ the packages available at the time of the XEmacs release.  Packages are
 also listed on the @code{Options} menu under:
 
 @example
 also listed on the @code{Options} menu under:
 
 @example
-       Options->Customize->Emacs->Packages
+        Options->Customize->Emacs->Packages
 @end example
 
 However, don't select any of these menu picks unless you actually want 
 @end example
 
 However, don't select any of these menu picks unless you actually want 
@@ -103,7 +103,7 @@ are installed, using the visual package browser and installer.  You can
 access it via the menus:
 
 @example
 access it via the menus:
 
 @example
-       Options->Manage Packages->List & Install
+        Options->Manage Packages->List & Install
 @end example
 
 Or, you can get to it via the keyboard:
 @end example
 
 Or, you can get to it via the keyboard:
@@ -149,7 +149,7 @@ If you are installing from a temporary, one-time directory, you can also
 add these directory names to @code{package-get-remote} using:
 
 @example
 add these directory names to @code{package-get-remote} using:
 
 @example
-       M-x pui-add-install-directory
+        M-x pui-add-install-directory
 @end example
 
 Note, however, that any directories added using this function are not
 @end example
 
 Note, however, that any directories added using this function are not
@@ -165,11 +165,11 @@ The easiest way to install a package is to use the visual package
 browser and installer, using the menu pick:
 
 @example
 browser and installer, using the menu pick:
 
 @example
-       Options->Manage Packages->List & Install
+        Options->Manage Packages->List & Install
 @end example
 or
 @example
 @end example
 or
 @example
-       Options->Manage Packages->Using Custom->Select-> ...
+        Options->Manage Packages->Using Custom->Select-> ...
 @end example
 
 You can also access it using the keyboard:
 @end example
 
 You can also access it using the keyboard:
@@ -236,17 +236,17 @@ For an alternative package interface, you can select packages from the
 customize menus, under:
 
 @example
 customize menus, under:
 
 @example
-       Options->Customize->Emacs->Packages-> ...
+        Options->Customize->Emacs->Packages-> ...
 @end example
 or
 @example
 @end example
 or
 @example
-       Options->Manage Packages->Using Custom->Select-> ...
+        Options->Manage Packages->Using Custom->Select-> ...
 @end example
 
 Set their state to on, and then do:
 
 @example
 @end example
 
 Set their state to on, and then do:
 
 @example
-       Options->Manage Packages->Using Custom->Update Packages
+        Options->Manage Packages->Using Custom->Update Packages
 @end example
 
 This will automatically retrieve the packages you have selected from the
 @end example
 
 This will automatically retrieve the packages you have selected from the
@@ -313,7 +313,7 @@ that you downloaded in step 1.  Unix and Cygnus cygwin users will
 typically do this using the commands:
 
 @example
 typically do this using the commands:
 
 @example
-       gunzip < package.tar.gz | tar xvf -
+        gunzip < package.tar.gz | tar xvf -
 @end example
 
 Above, replace @file{package.tar.gz} with the filename of the
 @end example
 
 Above, replace @file{package.tar.gz} with the filename of the
@@ -322,7 +322,7 @@ package that you downloaded in step 1.
 Of course, if you use GNU @code{tar}, you could also use:
 
 @example
 Of course, if you use GNU @code{tar}, you could also use:
 
 @example
-       tar xvzf package.tar.gz
+        tar xvzf package.tar.gz
 @end example
 
 @comment What about native MS Windows users???
 @end example
 
 @comment What about native MS Windows users???
index ded2af4..1d3ac44 100644 (file)
@@ -1424,11 +1424,11 @@ For example:
 
 @example
   (setq tag-table-alist
 
 @example
   (setq tag-table-alist
-       '(("/usr/src/public/perl/" . "/usr/src/public/perl/perl-3.0/")
-         ("\\.el$" . "/usr/local/emacs/src/")
-         ("/jbw/gnu/" . "/usr15/degree/stud/jbw/gnu/")
-         ("" . "/usr/local/emacs/src/")
-         ))
+        '(("/usr/src/public/perl/" . "/usr/src/public/perl/perl-3.0/")
+          ("\\.el$" . "/usr/local/emacs/src/")
+          ("/jbw/gnu/" . "/usr15/degree/stud/jbw/gnu/")
+          ("" . "/usr/local/emacs/src/")
+          ))
 @end example
 
 The example defines the tags table alist in the following way:
 @end example
 
 The example defines the tags table alist in the following way:
@@ -1540,15 +1540,15 @@ Variables of note include the following:
 @table @kbd
 @item tag-table-alist
 Controls which tables apply to which buffers.
 @table @kbd
 @item tag-table-alist
 Controls which tables apply to which buffers.
-@item tags-file-name           
+@item tags-file-name
 Stores a default tags table.
 Stores a default tags table.
-@item tags-build-completion-table   
+@item tags-build-completion-table
 Controls completion behavior.
 Controls completion behavior.
-@item buffer-tag-table         
+@item buffer-tag-table
 Specifies a buffer-local table.
 Specifies a buffer-local table.
-@item make-tags-files-invisible        
+@item make-tags-files-invisible
 Sets whether tags tables should be very hidden.
 Sets whether tags tables should be very hidden.
-@item tag-mark-stack-max               
+@item tag-mark-stack-max
 Specifies how many tags-based hops to remember.
 @end table
 
 Specifies how many tags-based hops to remember.
 @end table
 
index dda833f..5a7eda2 100644 (file)
@@ -174,7 +174,7 @@ you type a word-delimiter at the end of an abbreviation.
 In this version of Emacs, what you see is what you get: in contrast to
 some other versions, no abbreviations are expanded after you have sent the
 mail.  This means you don't suffer the annoyance of having the system do
 In this version of Emacs, what you see is what you get: in contrast to
 some other versions, no abbreviations are expanded after you have sent the
 mail.  This means you don't suffer the annoyance of having the system do
-things behind your back --- if the system rewrites an address you typed,
+things behind your back---if the system rewrites an address you typed,
 you know it immediately, instead of after the mail has been sent and
 it's too late to do anything about it.  For example, you will never
 again be in trouble because you forgot to delete an old alias from your
 you know it immediately, instead of after the mail has been sent and
 it's too late to do anything about it.  For example, you will never
 again be in trouble because you forgot to delete an old alias from your
index dcf8740..5145ee7 100644 (file)
@@ -1,3 +1,47 @@
+2000-02-07  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.28 is released.
+
+2000-02-03  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * Xpm.def: New file, required to build Xpm.dll.
+
+       * Xpm.mak: Use DEBUG instead of DEBUG_XEMACS - this library is not
+       xemacs-specific. Initialize to DEBUG_XEMACS if specified for
+       compatibility.
+       Build DLL instead of static LIB when USE_CRTDLL=1 is given to
+       make.
+
+       * xemacs.mak: Introduced USE_SYSTEM_MALLOC and USE_CRTDLL.
+       Do not build lastfile.lib when neither unexec not gmalloc are
+       used.
+
+       * config.h: Deleted GNU_MALLOC and SYSTEM_MALLOC, as they are set
+       in makefile.
+
+2000-01-26  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * xemacs.mak (DOC_SRC9): Added tests.c ...
+       (TEMACS_DEBUG_OBJS): ... and tests.obj
+       ($(DOC)): Tweaked a bit, for `nmake docfile' unconditionally
+       rebuild the docfile.
+
+2000-01-22  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * xemacs.mak (docfile): Added shortcut target.
+
+2000-01-19  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * xemacs.mak (TEMACS_LIBS): Added winspool.lib
+
+2000-01-20  Martin Buchholz  <martin@xemacs.org>
+
+       * xemacs.mak (dump-xemacs): Remove redundant EMACSBOOTSTRAPMODULEPATH.
+
+2000-01-18  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * xemacs.mak: Patch of 01/13 got in corrupted, fixed.
+
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
 
        * xemacs.mak: Add rules to build & install minitar.
 
 
        * xemacs.mak: Add rules to build & install minitar.
 
+2000-01-03  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * config.h: Fix stuff related to mail locking.
+
 1999-12-31  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.26 is released.
 1999-12-31  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.26 is released.
index 7571782..aa27727 100644 (file)
@@ -67,12 +67,6 @@ Boston, MA 02111-1307, USA.  */
    numbers. */
 #undef LISP_FLOAT_TYPE
 
    numbers. */
 #undef LISP_FLOAT_TYPE
 
-/* Define GNU_MALLOC if you want to use the *new* GNU memory allocator. */
-#define GNU_MALLOC
-
-/* Define USE_SYSTEM_MALLOC if you forcing the use of it. */
-#undef USE_SYSTEM_MALLOC
-
 /* Define HAVE_TTY if you want TTY support compiled in. */
 #undef HAVE_TTY
 
 /* Define HAVE_TTY if you want TTY support compiled in. */
 #undef HAVE_TTY
 
@@ -336,6 +330,20 @@ Boston, MA 02111-1307, USA.  */
 
 #endif /* DEBUG_XEMACS */
 
 
 #endif /* DEBUG_XEMACS */
 
+/* Define convenient conditionally defined assertion macros. */
+#ifdef ERROR_CHECK_TYPECHECK
+#define type_checking_assert(assertion) assert (assertion)
+#else
+#define type_checking_assert(assertion)
+#endif
+
+#ifdef ERROR_CHECK_BUFPOS
+#define bufpos_checking_assert(assertion) assert (assertion)
+#else
+#define bufpos_checking_assert(assertion)
+#endif
+
+
 /* Define MEMORY_USAGE_STATS if you want extra code compiled in to
    determine where XEmacs's memory is going. */
 #undef MEMORY_USAGE_STATS
 /* Define MEMORY_USAGE_STATS if you want extra code compiled in to
    determine where XEmacs's memory is going. */
 #undef MEMORY_USAGE_STATS
index e04f1c3..19bed41 100644 (file)
@@ -145,6 +145,16 @@ USE_PORTABLE_DUMPER=0
 GUNG_HO=0
 !endif
 
 GUNG_HO=0
 !endif
 
+# A little bit of adhockery. Default to use system malloc and
+# DLL version of the C runtime library when using portable
+# dumping. These are the optimal settings.
+!if !defined(USE_SYSTEM_MALLOC)
+USE_SYSTEM_MALLOC=$(USE_PORTABLE_DUMPER)
+!endif
+!if !defined(USE_CRTDLL)
+USE_CRTDLL=$(USE_PORTABLE_DUMPER)
+!endif
+
 #
 # System configuration
 #
 #
 # System configuration
 #
@@ -171,6 +181,19 @@ CONFIG_ERROR=0
 !message Cannot build InfoDock without InfoDock sources
 CONFIG_ERROR=1
 !endif
 !message Cannot build InfoDock without InfoDock sources
 CONFIG_ERROR=1
 !endif
+!if !$(USE_PORTABLE_DUMPER) && $(USE_SYSTEM_MALLOC)
+!message Cannot use system allocator when dumping old way, use portable dumper.
+CONFIG_ERROR=1
+!endif
+!if !$(USE_PORTABLE_DUMPER) && $(USE_CRTDLL)
+!message Cannot use C runtime DLL when dumping old way, use portable dumper.
+CONFIG_ERROR=1
+!endif
+!if !$(USE_SYSTEM_MALLOC) && $(USE_CRTDLL)
+!message GNU malloc currently cannot be used with CRT DLL.
+!message [[[Developer note: If you want to fix it, read Q112297 first]]]  ####
+CONFIG_ERROR=1
+!endif
 !if !$(HAVE_MSW) && !$(HAVE_X)
 !message Please specify at least one HAVE_MSW=1 and/or HAVE_X=1
 CONFIG_ERROR=1
 !if !$(HAVE_MSW) && !$(HAVE_X)
 !message Please specify at least one HAVE_MSW=1 and/or HAVE_X=1
 CONFIG_ERROR=1
@@ -265,7 +288,20 @@ OPT=-Od -Zi
 OPT=-O2 -G5
 !endif
 
 OPT=-O2 -G5
 !endif
 
-CFLAGS=-nologo -W3 $(OPT)
+!if $(USE_CRTDLL)
+!if $(DEBUG_XEMACS)
+C_LIBFLAG=-MDd
+LIBC_LIB=msvcrtd.lib
+!else
+C_LIBFLAG=-MD
+LIBC_LIB=msvcrt.lib
+!endif
+!else
+C_LIBFLAG=-ML
+LIBC_LIB=libc.lib
+!endif
+
+CFLAGS=-nologo -W3 $(OPT) $(C_LIBFLAG)
 
 !if $(HAVE_X)
 X_DEFINES=-DHAVE_X_WINDOWS
 
 !if $(HAVE_X)
 X_DEFINES=-DHAVE_X_WINDOWS
@@ -347,11 +383,17 @@ TAGBITS_DEFINES=-DUSE_MINIMAL_TAGBITS
 LRECORD_DEFINES=-DUSE_INDEXED_LRECORD_IMPLEMENTATION
 !endif
 !if $(USE_UNION_TYPE)
 LRECORD_DEFINES=-DUSE_INDEXED_LRECORD_IMPLEMENTATION
 !endif
 !if $(USE_UNION_TYPE)
+UNION_DEFINES=-DUSE_UNION_TYPE
+!endif
+
 !if $(USE_PORTABLE_DUMPER)
 DUMPER_DEFINES=-DPDUMP
 !endif
 
 !if $(USE_PORTABLE_DUMPER)
 DUMPER_DEFINES=-DPDUMP
 !endif
 
-UNION_DEFINES=-DUSE_UNION_TYPE
+!if $(USE_SYSTEM_MALLOC)
+MALLOC_DEFINES=-DSYSTEM_MALLOC
+!else
+MALLOC_DEFINES=-DGNU_MALLOC
 !endif
 
 # Hard-coded paths
 !endif
 
 # Hard-coded paths
@@ -369,7 +411,8 @@ PATH_DEFINES=-DPATH_PREFIX=\"$(PATH_PREFIX)\"
 INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(XEMACS)\nt\inc -I$(XEMACS)\src -I$(XEMACS)\lwlib
 
 DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) \
 INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(XEMACS)\nt\inc -I$(XEMACS)\src -I$(XEMACS)\lwlib
 
 DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) \
-       $(TAGBITS_DEFINES) $(LRECORD_DEFINES) $(UNION_DEFINES) $(DUMPER_DEFINES)\
+       $(TAGBITS_DEFINES) $(LRECORD_DEFINES) $(UNION_DEFINES) \
+       $(DUMPER_DEFINES) $(MALLOC_DEFINES) \
        -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN -DWINDOWSNT -Demacs \
        -DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES)
 
        -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN -DWINDOWSNT -Demacs \
        -DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES)
 
@@ -474,6 +517,8 @@ $(LIB_SRC)\run.res: $(LIB_SRC)\run.rc
 
 # LASTFILE Library
 
 
 # LASTFILE Library
 
+!if !$(USE_SYSTEM_MALLOC) || !$(USE_PORTABLE_DUMPER)
+
 LASTFILE=$(OUTDIR)\lastfile.lib
 LASTFILE_SRC=$(XEMACS)\src
 LASTFILE_FLAGS=$(CFLAGS) $(INCLUDES) -Fo$@ -Fd$* -c
 LASTFILE=$(OUTDIR)\lastfile.lib
 LASTFILE_SRC=$(XEMACS)\src
 LASTFILE_FLAGS=$(CFLAGS) $(INCLUDES) -Fo$@ -Fd$* -c
@@ -486,6 +531,8 @@ $(LASTFILE): $(XEMACS_INCLUDES) $(LASTFILE_OBJS)
 $(OUTDIR)\lastfile.obj:        $(LASTFILE_SRC)\lastfile.c
         $(CCV) $(LASTFILE_FLAGS) $**
 
 $(OUTDIR)\lastfile.obj:        $(LASTFILE_SRC)\lastfile.c
         $(CCV) $(LASTFILE_FLAGS) $**
 
+!endif
+
 #------------------------------------------------------------------------------
 
 !if $(HAVE_X)
 #------------------------------------------------------------------------------
 
 !if $(HAVE_X)
@@ -575,12 +622,10 @@ DOC_SRC2=\
 DOC_SRC3=\
  $(XEMACS)\src\font-lock.c \
  $(XEMACS)\src\frame.c \
 DOC_SRC3=\
  $(XEMACS)\src\font-lock.c \
  $(XEMACS)\src\frame.c \
- $(XEMACS)\src\free-hook.c \
  $(XEMACS)\src\general.c \
  $(XEMACS)\src\glyphs.c \
  $(XEMACS)\src\glyphs-eimage.c \
  $(XEMACS)\src\glyphs-widget.c \
  $(XEMACS)\src\general.c \
  $(XEMACS)\src\glyphs.c \
  $(XEMACS)\src\glyphs-eimage.c \
  $(XEMACS)\src\glyphs-widget.c \
- $(XEMACS)\src\gmalloc.c \
  $(XEMACS)\src\gui.c  \
  $(XEMACS)\src\gutter.c \
  $(XEMACS)\src\hash.c \
  $(XEMACS)\src\gui.c  \
  $(XEMACS)\src\gutter.c \
  $(XEMACS)\src\hash.c \
@@ -599,7 +644,6 @@ DOC_SRC4=\
  $(XEMACS)\src\menubar.c \
  $(XEMACS)\src\minibuf.c \
  $(XEMACS)\src\nt.c \
  $(XEMACS)\src\menubar.c \
  $(XEMACS)\src\minibuf.c \
  $(XEMACS)\src\nt.c \
- $(XEMACS)\src\ntheap.c \
  $(XEMACS)\src\ntplay.c \
  $(XEMACS)\src\ntproc.c \
  $(XEMACS)\src\objects.c \
  $(XEMACS)\src\ntplay.c \
  $(XEMACS)\src\ntproc.c \
  $(XEMACS)\src\objects.c \
@@ -627,8 +671,6 @@ DOC_SRC5=\
  $(XEMACS)\src\termcap.c  \
  $(XEMACS)\src\tparam.c \
  $(XEMACS)\src\undo.c \
  $(XEMACS)\src\termcap.c  \
  $(XEMACS)\src\tparam.c \
  $(XEMACS)\src\undo.c \
- $(XEMACS)\src\unexnt.c \
- $(XEMACS)\src\vm-limit.c \
  $(XEMACS)\src\window.c \
  $(XEMACS)\src\widget.c
 
  $(XEMACS)\src\window.c \
  $(XEMACS)\src\widget.c
 
@@ -688,7 +730,21 @@ DOC_SRC8=\
 
 !if $(DEBUG_XEMACS)
 DOC_SRC9=\
 
 !if $(DEBUG_XEMACS)
 DOC_SRC9=\
- $(XEMACS)\src\debug.c
+ $(XEMACS)\src\debug.c \
+ $(XEMACS)\src\tests.c
+!endif
+
+!if !$(USE_SYSTEM_MALLOC)
+DOC_SRC10=\
+ $(XEMACS)\src\free-hook.c \
+ $(XEMACS)\src\gmalloc.c \
+ $(XEMACS)\src\ntheap.c \
+ $(XEMACS)\src\vm-limit.c
+!endif
+
+!if !$(USE_PORTABLE_DUMPER)
+DOC_SRC11=\
+ $(XEMACS)\src\unexnt.c
 !endif
 
 #------------------------------------------------------------------------------
 !endif
 
 #------------------------------------------------------------------------------
@@ -700,18 +756,22 @@ DOC_SRC9=\
 EMACS_BETA_VERSION=-DEMACS_BETA_VERSION=$(emacs_beta_version)
 !ENDIF
 
 EMACS_BETA_VERSION=-DEMACS_BETA_VERSION=$(emacs_beta_version)
 !ENDIF
 
+!if !$(USE_PORTABLE_DUMPER)
+TEMACS_ENTRYPOINT=-entry:_start 
+!endif
+
 TEMACS_DIR=$(XEMACS)\src
 TEMACS=$(TEMACS_DIR)\temacs.exe
 TEMACS_BROWSE=$(TEMACS_DIR)\temacs.bsc
 TEMACS_SRC=$(XEMACS)\src
 TEMACS_LIBS=$(LASTFILE) $(LWLIB) $(X_LIBS) $(MSW_LIBS) \
 TEMACS_DIR=$(XEMACS)\src
 TEMACS=$(TEMACS_DIR)\temacs.exe
 TEMACS_BROWSE=$(TEMACS_DIR)\temacs.bsc
 TEMACS_SRC=$(XEMACS)\src
 TEMACS_LIBS=$(LASTFILE) $(LWLIB) $(X_LIBS) $(MSW_LIBS) \
- kernel32.lib user32.lib gdi32.lib advapi32.lib \
- shell32.lib wsock32.lib winmm.lib libc.lib
+ oldnames.lib kernel32.lib user32.lib gdi32.lib advapi32.lib \
+ shell32.lib wsock32.lib winmm.lib winspool.lib $(LIBC_LIB)
 TEMACS_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS) -base:0x1000000\
 TEMACS_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS) -base:0x1000000\
- -stack:0x800000 -entry:_start -subsystem:console\
+ -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:console\
  -pdb:$(TEMACS_DIR)\temacs.pdb -map:$(TEMACS_DIR)\temacs.map \
  -pdb:$(TEMACS_DIR)\temacs.pdb -map:$(TEMACS_DIR)\temacs.map \
- -heap:0x00100000 -out:$@
-TEMACS_CPP_FLAGS=-ML -c \
+ -heap:0x00100000 -out:$@ -nodefaultlib
+TEMACS_CPP_FLAGS=-c \
  $(CFLAGS) $(INCLUDES) $(DEFINES) $(DEBUG_DEFINES) \
  -DEMACS_MAJOR_VERSION=$(emacs_major_version) \
  -DEMACS_MINOR_VERSION=$(emacs_minor_version) \
  $(CFLAGS) $(INCLUDES) $(DEFINES) $(DEBUG_DEFINES) \
  -DEMACS_MAJOR_VERSION=$(emacs_major_version) \
  -DEMACS_MINOR_VERSION=$(emacs_minor_version) \
@@ -777,7 +837,21 @@ TEMACS_MULE_OBJS=\
 
 !if $(DEBUG_XEMACS)
 TEMACS_DEBUG_OBJS=\
 
 !if $(DEBUG_XEMACS)
 TEMACS_DEBUG_OBJS=\
-       $(OUTDIR)\debug.obj
+       $(OUTDIR)\debug.obj \
+       $(OUTDIR)\tests.obj
+!endif
+
+!if !$(USE_SYSTEM_MALLOC)
+TEMACS_ALLOC_OBJS=\
+       $(OUTDIR)\free-hook.obj \
+       $(OUTDIR)\gmalloc.obj \
+       $(OUTDIR)\ntheap.obj \
+       $(OUTDIR)\vm-limit.obj
+!endif
+
+!if !$(USE_PORTABLE_DUMPER)
+TEMACS_DUMP_OBJS=\
+       $(OUTDIR)\unexnt.obj
 !endif
 
 TEMACS_OBJS= \
 !endif
 
 TEMACS_OBJS= \
@@ -786,6 +860,8 @@ TEMACS_OBJS= \
        $(TEMACS_CODING_OBJS)\
        $(TEMACS_MULE_OBJS)\
        $(TEMACS_DEBUG_OBJS)\
        $(TEMACS_CODING_OBJS)\
        $(TEMACS_MULE_OBJS)\
        $(TEMACS_DEBUG_OBJS)\
+       $(TEMACS_ALLOC_OBJS)\
+       $(TEMACS_DUMP_OBJS)\
        $(OUTDIR)\abbrev.obj \
        $(OUTDIR)\alloc.obj \
        $(OUTDIR)\alloca.obj \
        $(OUTDIR)\abbrev.obj \
        $(OUTDIR)\alloc.obj \
        $(OUTDIR)\alloca.obj \
@@ -823,12 +899,10 @@ TEMACS_OBJS= \
        $(OUTDIR)\fns.obj \
        $(OUTDIR)\font-lock.obj \
        $(OUTDIR)\frame.obj \
        $(OUTDIR)\fns.obj \
        $(OUTDIR)\font-lock.obj \
        $(OUTDIR)\frame.obj \
-       $(OUTDIR)\free-hook.obj \
        $(OUTDIR)\general.obj \
        $(OUTDIR)\glyphs.obj \
        $(OUTDIR)\glyphs-eimage.obj \
        $(OUTDIR)\glyphs-widget.obj \
        $(OUTDIR)\general.obj \
        $(OUTDIR)\glyphs.obj \
        $(OUTDIR)\glyphs-eimage.obj \
        $(OUTDIR)\glyphs-widget.obj \
-       $(OUTDIR)\gmalloc.obj \
        $(OUTDIR)\gui.obj \
        $(OUTDIR)\gutter.obj \
        $(OUTDIR)\hash.obj \
        $(OUTDIR)\gui.obj \
        $(OUTDIR)\gutter.obj \
        $(OUTDIR)\hash.obj \
@@ -846,7 +920,6 @@ TEMACS_OBJS= \
        $(OUTDIR)\md5.obj \
        $(OUTDIR)\minibuf.obj \
        $(OUTDIR)\nt.obj \
        $(OUTDIR)\md5.obj \
        $(OUTDIR)\minibuf.obj \
        $(OUTDIR)\nt.obj \
-       $(OUTDIR)\ntheap.obj \
        $(OUTDIR)\ntplay.obj \
        $(OUTDIR)\ntproc.obj \
        $(OUTDIR)\objects.obj \
        $(OUTDIR)\ntplay.obj \
        $(OUTDIR)\ntproc.obj \
        $(OUTDIR)\objects.obj \
@@ -872,8 +945,6 @@ TEMACS_OBJS= \
        $(OUTDIR)\sysdep.obj \
        $(OUTDIR)\tparam.obj \
        $(OUTDIR)\undo.obj \
        $(OUTDIR)\sysdep.obj \
        $(OUTDIR)\tparam.obj \
        $(OUTDIR)\undo.obj \
-       $(OUTDIR)\unexnt.obj \
-       $(OUTDIR)\vm-limit.obj \
        $(OUTDIR)\widget.obj \
        $(OUTDIR)\window.obj \
        $(OUTDIR)\xemacs.res
        $(OUTDIR)\widget.obj \
        $(OUTDIR)\window.obj \
        $(OUTDIR)\xemacs.res
@@ -912,6 +983,9 @@ $(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS)
        bscmake -nologo -o$(TEMACS_BROWSE) @bscmake.tmp
        @$(DEL) bscmake.tmp
 !endif
        bscmake -nologo -o$(TEMACS_BROWSE) @bscmake.tmp
        @$(DEL) bscmake.tmp
 !endif
+!if $(USE_PORTABLE_DUMPER)
+       @if exist $(TEMACS_DIR)\xemacs.dmp del $(TEMACS_DIR)\xemacs.dmp
+!endif
        link.exe @<<
   $(TEMACS_LFLAGS) $(TEMACS_OBJS) $(TEMACS_LIBS)
 <<
        link.exe @<<
   $(TEMACS_LFLAGS) $(TEMACS_OBJS) $(TEMACS_LIBS)
 <<
@@ -1148,8 +1222,15 @@ if exist "$(MAKEINFO)" goto test_done
 
 LOADPATH=$(LISP)
 
 
 LOADPATH=$(LISP)
 
+# Rebuild docfile target
+docfile ::
+       if exist $(DOC) del $(DOC)
+docfile :: $(DOC)
+
 $(DOC): $(LIB_SRC)\make-docfile.exe
 $(DOC): $(LIB_SRC)\make-docfile.exe
-       $(DEL) $(DOC)
+       if exist $(DOC) del $(DOC)
+       set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH)
+       set EMACSBOOTSTRAPMODULEPATH=$(MODULES)
        $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages
        $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC1)
        $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC2)
        $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages
        $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC1)
        $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC2)
@@ -1160,23 +1241,27 @@ $(DOC): $(LIB_SRC)\make-docfile.exe
        $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC7)
        $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC8)
        $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC9)
        $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC7)
        $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC8)
        $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC9)
+       $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC10)
+       $(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC11)
 
 update-elc:
 
 update-elc:
-       set EMACSBOOTSTRAPMODULEPATH=$(MODULES)
        set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH)
        set EMACSBOOTSTRAPMODULEPATH=$(MODULES)
        $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\update-elc.el
 
 # This rule dumps xemacs and then possibly spawns sub-make if PURESPACE
 # requirements have changed.
        set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH)
        set EMACSBOOTSTRAPMODULEPATH=$(MODULES)
        $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\update-elc.el
 
 # This rule dumps xemacs and then possibly spawns sub-make if PURESPACE
 # requirements have changed.
-dump-xemacs: $(TEMACS)
+dump-xemacs: temacs
        @echo >$(TEMACS_DIR)\SATISFIED
        cd $(TEMACS_DIR)
        set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH)
        @echo >$(TEMACS_DIR)\SATISFIED
        cd $(TEMACS_DIR)
        set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH)
+       set EMACSBOOTSTRAPMODULEPATH=$(MODULES)
        -1 $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\loadup.el dump
        -1 $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\loadup.el dump
+!if $(USE_PORTABLE_DUMPER)
+       copy temacs.exe xemacs.exe
+!endif
        cd $(NT)
        @if not exist $(TEMACS_DIR)\SATISFIED nmake -nologo -f xemacs.mak $@
        cd $(NT)
        @if not exist $(TEMACS_DIR)\SATISFIED nmake -nologo -f xemacs.mak $@
-
 #------------------------------------------------------------------------------
 
 # use this rule to build the complete system
 #------------------------------------------------------------------------------
 
 # use this rule to build the complete system
@@ -1254,6 +1339,11 @@ depend:
        perl ./make-src-depend > depend.tmp
        perl -MFile::Compare -e "compare('depend.tmp', 'depend') && rename('depend.tmp', 'depend') or unlink('depend.tmp')"
 
        perl ./make-src-depend > depend.tmp
        perl -MFile::Compare -e "compare('depend.tmp', 'depend') && rename('depend.tmp', 'depend') or unlink('depend.tmp')"
 
+installation::
+       @if exist $(XEMACS)\Installation del $(XEMACS)\Installation
+
+installation:: $(XEMACS)\Installation
+
 $(XEMACS)\Installation:
        @type > $(XEMACS)\Installation <<
 !if defined(OS)
 $(XEMACS)\Installation:
        @type > $(XEMACS)\Installation <<
 !if defined(OS)
@@ -1345,6 +1435,12 @@ XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename:"=\") configured for `$(EMACS_
 !if $(USE_PORTABLE_DUMPER)
   Using portable dumper.
 !endif
 !if $(USE_PORTABLE_DUMPER)
   Using portable dumper.
 !endif
+!if $(USE_SYSTEM_MALLOC)
+  Using system malloc.
+!endif
+!if $(USE_CRTDLL)
+  Using DLL version of C runtime library
+!endif
 !if $(DEBUG_XEMACS)
   Compiling in extra debug checks. XEmacs will be slow!
 !endif
 !if $(DEBUG_XEMACS)
   Compiling in extra debug checks. XEmacs will be slow!
 !endif
index 1ebdb88..2adc736 100644 (file)
@@ -1,21 +1,44 @@
 #
 # XPM Makefile for Microsoft NMAKE without X libraries
 #
 #
 # XPM Makefile for Microsoft NMAKE without X libraries
 #
+!if !defined(DEBUG)
+!if defined(DEBUG_XEMACS)
+DEBUG=$(DEBUG_XEMACS)
+!else
+DEBUG=0
+!endif
+!endif
 
 
-!if !defined(DEBUG_XEMACS)
-DEBUG_XEMACS=0
+!if !defined(USE_CRTDLL)
+USE_CRTDLL=0
 !endif
 
 !endif
 
-!if $(DEBUG_XEMACS)
+!if $(DEBUG)
 OPT=-Od -Zi
 OPT=-Od -Zi
+LINK_DEBUG=-debug
+!else
+OPT=-Ox
+!endif
+
+!if $(USE_CRTDLL)
+!if $(DEBUG)
+C_LIBFLAG=-MDd
 !else
 !else
-OPT=-O2 -G5 -Zi
+C_LIBFLAG=-MD
+!endif
+!else
+!if $(DEBUG)
+C_LIBFLAG=-MLd
+!else
+C_LIBFLAG=-ML
+!endif
 !endif
 
 WARN_CPP_FLAGS = -W3
 
 CC=cl
 !endif
 
 WARN_CPP_FLAGS = -W3
 
 CC=cl
-CFLAGS=-nologo -DFOR_MSW $(WARN_CPP_FLAGS) $(OPT) $(INCLUDES) -Fo$@ -c
+CFLAGS=-nologo -DFOR_MSW $(C_LIBFLAG) $(WARN_CPP_FLAGS) \
+       $(OPT) $(INCLUDES) -c
 
 OBJS= data.obj create.obj misc.obj rgb.obj scan.obj parse.obj hashtab.obj \
       WrFFrI.obj RdFToI.obj CrIFrDat.obj CrDatFrI.obj \
 
 OBJS= data.obj create.obj misc.obj rgb.obj scan.obj parse.obj hashtab.obj \
       WrFFrI.obj RdFToI.obj CrIFrDat.obj CrDatFrI.obj \
@@ -29,8 +52,8 @@ OBJS= data.obj create.obj misc.obj rgb.obj scan.obj parse.obj hashtab.obj \
 .SUFFIXES:
 .SUFFIXES:     .c
 
 .SUFFIXES:
 .SUFFIXES:     .c
 
-.c.obj:
-       $(CC) $(CFLAGS) $< -Fo$@
+.c.obj::
+       $(CC) $(CFLAGS) $<
 
 
 # targets
 
 
 # targets
@@ -44,4 +67,9 @@ all: ..\X11\xpm.h Xpm.lib
        mkdir ..\X11
 
 Xpm.lib: $(OBJS)
        mkdir ..\X11
 
 Xpm.lib: $(OBJS)
-       link.exe -lib -nologo -out:$@ $(OBJS)
+!if $(USE_CRTDLL)
+# Target is ok, link builds lib as a side effect.
+       link -nologo -dll -def:xpm.def -out:Xpm.dll gdi32.lib $(OBJS) 
+!else
+       lib -nologo -out:$@ $(OBJS)
+!endif
index 4653a31..3969701 100644 (file)
@@ -39,6 +39,8 @@
 # So we simulate the gdb algorithm by doing it ourselves here.
 if test -r $HOME/.dbxrc; then . $HOME/.dbxrc; fi
 
 # So we simulate the gdb algorithm by doing it ourselves here.
 if test -r $HOME/.dbxrc; then . $HOME/.dbxrc; fi
 
+dbxenv language_mode ansic
+
 ignore POLL
 ignore IO
 
 ignore POLL
 ignore IO
 
@@ -64,7 +66,7 @@ function ldp {
 
 # A bug in dbx prevents string variables from having values beginning with `-'!!
 function XEmacsInit {
 
 # A bug in dbx prevents string variables from having values beginning with `-'!!
 function XEmacsInit {
-  function ToInt { eval "$1=\$[(int) $1]"; }
+  function ToInt { eval "$1=\$[(int) \`alloc.c\`$1]"; }
   ToInt dbg_USE_UNION_TYPE
   ToInt Lisp_Type_Int
   ToInt Lisp_Type_Char
   ToInt dbg_USE_UNION_TYPE
   ToInt Lisp_Type_Int
   ToInt Lisp_Type_Char
@@ -75,7 +77,7 @@ function XEmacsInit {
   ToInt Lisp_Type_Record
   ToInt dbg_valbits
   ToInt dbg_gctypebits
   ToInt Lisp_Type_Record
   ToInt dbg_valbits
   ToInt dbg_gctypebits
-  function ToLong { eval "$1=\$[(unsigned long) $1]"; }
+  function ToLong { eval "$1=\$[(\`alloc.c\`unsigned long) \`alloc.c\`$1]"; }
   ToLong dbg_valmask
   ToLong dbg_typemask
   xemacs_initted=yes
   ToLong dbg_valmask
   ToLong dbg_typemask
   xemacs_initted=yes
@@ -98,11 +100,11 @@ function decode_object {
     # Repeat after me... dbx sux, dbx sux, dbx sux...
     # Allow both `pobj Qnil' and `pobj 0x82746834' to work
     case $(whatis $1) in
     # Repeat after me... dbx sux, dbx sux, dbx sux...
     # Allow both `pobj Qnil' and `pobj 0x82746834' to work
     case $(whatis $1) in
-      *Lisp_Object*) obj="$[(unsigned long)(($1).i)]";;
-      *) obj="$[(unsigned long)($1)]";;
+      *Lisp_Object*) obj="$[(`alloc.c`unsigned long)(($1).i)]";;
+      *) obj="$[(`alloc.c`unsigned long)($1)]";;
     esac
   else
     esac
   else
-    obj="$[(unsigned long)($1)]";
+    obj="$[(`alloc.c`unsigned long)($1)]";
   fi
   if test $[(int)($obj & 1)] = 1; then
     # It's an int
   fi
   if test $[(int)($obj & 1)] = 1; then
     # It's an int
@@ -121,7 +123,7 @@ function decode_object {
 
   if test $type = $Lisp_Type_Record; then
     typeset lheader="((struct lrecord_header *) $val)"
 
   if test $type = $Lisp_Type_Record; then
     typeset lheader="((struct lrecord_header *) $val)"
-    imp=$[(void*)(lrecord_implementations_table[$lheader->type])]
+    imp=$[(void*)(`alloc.c`lrecord_implementations_table[$lheader->type])]
   else
     imp="0xdeadbeef"
   fi
   else
     imp="0xdeadbeef"
   fi
index cb61c20..1bc0d94 100644 (file)
@@ -1,3 +1,839 @@
+2000-02-07  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.28 is released.
+
+2000-02-06  Martin Buchholz  <martin@xemacs.org>
+
+       * event-Xt.c (x_keysym_to_character): New.
+       (maybe_define_x_key_as_self_inserting_character): New.
+       (x_has_keysym): New.
+       Auto-define all keys on the keyboard as self-insert-key.
+
+2000-02-02  Martin Buchholz  <martin@xemacs.org>
+
+       * menubar.c (vars_of_menubar): A small code simplification.
+
+       * minibuf.c (echo_area_append): Workaround egcs-20000131 c++ compiler bug
+
+       * ExternalShell.c: 
+       * ExternalClient.c: 
+       * EmacsShell-sub.c: 
+       * EmacsManager.c: 
+       * EmacsFrame.c: 
+       Use consistent style for specifying X resources.
+
+       * symbols.c (Fset): Further implement SYMVAL_LISP_MAGIC.
+       This makes (dontusethis-set-symbol-value-handler) actually usable.
+
+       * lrecord.h (lrecord_decription_type):
+       * alloc.c (pdump_register_sub): 
+       (pdump_dump_data): 
+       (pdump_reloc_one): 
+       Add XD_LISP_OBJECT_ARRAY to describe multiple Lisp_Objects.
+       Comply with XEmacs coding style.
+       All lrecord descriptions updated to use XD_LISP_OBJECT with 2
+       args, and XD_LISP_OBJECT_ARRAY with 3 args.
+
+       * keymap.c (Faccessible_keymaps): 
+       Make (accessible-keymaps map "\C-h") do the Right Thing.
+       Make (accessible-keymaps map []) do the Right Thing.
+       Make (accessible-keymaps map "") do the Right Thing.
+       (check_keymap_definition_loop): New function.
+       (keymap_store_internal): Keep luser from shooting self in foot,
+         via (define-key ctl-x-4-map "p" global-map).
+       Remove fullness slot from struct Lisp_Keymap, since hash tables
+       are now reliable.
+       (print_keymap): Remove 'Yuck' factor by simply printing "size %d".
+
+2000-01-30  Martin Buchholz  <martin@xemacs.org>
+
+       * redisplay.c (init_redisplay): Fix small memory leak.
+       * elhash.h: 
+       * elhash.c (pdump_reorganize_hash_table): 
+       Rename from reorganize_hash_table. Change prototype.
+       Reuse the original memory for hentries.  Save 100k.
+       * alloc.c (PDUMP_READ): new macro.
+       * alloc.c (pdump_load): Replace LISP_TO_VOID with higher-level macros.
+       * alloc.c: No need to #ifndef before #undef.
+
+       * print.c: Allow debug_print() to print readably by modifying
+       debug_print_readably.  Use consistent variable names.
+
+       * .dbxrc: Try to get things to work even if stopped in a function
+       without source available by explicitly specifying source files.
+2000-02-03  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * unexnt.c (_start): Removed bogus code which caused loading heap
+       from differrent executable file.
+       Removed bogus assignment to _fmode, which caused inconsistencies.
+
+2000-02-03  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * s\windowsnt.h: Removed lots of #if 0 blocks of Emacs heritage.
+       Have spawnve encapsulation regard DONT_ENCAPSULATE.
+       Do not preliminary `#define signal sigset'.
+
+       * systime.h: Do not prototype environ on windows nt and cygwin,
+       this conflicts with system header.
+
+       * syssignal.h: Use correct define for WINDOWSNT
+
+       * sysdep.h: Do not prototype environ on windows nt, this conflicts
+       with system header.
+
+       * sysdep.c (near start of file): Fixed commentary and rearranged
+       ifdefs in readable order.
+       (NEED_STARTS): Do not force NEED_STARTS when PDUMPing.
+       (start_of_text):
+       (end_of_text): 
+       (end_of_data): Do not compile in if using PDUMP.
+
+       * symsinit.h: Protptyped vars_of_nt().
+
+       * ntproc.c (windows9x_p): Added, instead of os_subtype.
+       (find_child_console): Use it.
+       (sys_kill): Use it.
+
+       * ntheap.h: Do not extern os_subtype.
+
+       * ntheap.c (cache_system_info): Do not cache unneeded:
+       nt_major_version, nt_minor_version and os_subtype.
+       (recreate_heap): Do not compile in when PDUMPing.
+
+       * nt.c (geteuid and friends): Use the new varibale
+       nt_fake_unix_uid, instead of hashing fake uid out of NT RID.
+       (init_user_info): Removed the above mentioned hackery.
+       (fstat, stat): Do not compile in if using MSVC 5.0 and above -
+       stat has been fixed in the C runtime.
+       (vars_of_nt): Added, defined the nt_fake_unix_uid variable there.
+       
+       * file-coding.c (struct file_coding_dump): Do not define
+       ucs_to_mule_table in the struct if not MULE.
+       (struct struct lrecord_description fcd_description_1): Do not dump
+       the above.
+
+       * emacs.c (main_1): Call vars_of_nt().
+       (right before Fdump_emacs_data): Don't need lastfile if using both
+       portabe dumper and system malloc.
+
+       * alloc.c (Fmemory_limit): Conditionalized out.
+       (pdump): Use OPEN_BINARY for the portable dump file.
+       (pdump_load): Ditto.
+
+2000-02-02  Mike Alexander  <mta@arbortext.com>
+
+       * nt.c (convert_time): Set tm_isdst before calling mktime and
+       avoid calling it at all if the compiler supports 64 bit integers.
+       Also initialize utc_base_ft before using it.
+
+2000-02-03   Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
+
+       * frame.c (change_frame_size_1): Take f->internal_border_width
+       into consideration when calculating the width of the frame.
+
+2000-02-01  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * window.c (frame_min_height):
+       (frame_size_valid_p):
+       (frame_pixsize_valid_p): Added.
+       (check_frame_size): Generalized.
+
+       * window.h: Prototyped the above.
+
+       * lisp.h:
+       * general.c: Added Qbottom_margin, Qduplex, Qlandscape,
+       Qleft_margin, Qorientation, Qportrait, Qright_margin, Qtop_margin.
+       Deleted Vwin32_* and Vbinary_process_* unused variables.
+
+       * device-msw.c (msprinter_init_device): Do not get printer font
+       list; Added DEVMODE functions.
+
+       * frame-msw.c: Added lots of printer code.
+
+       * faces.c: Moved 'left-margin and 'right-margin defsymbols to
+       general.c.
+
+       * console-msw.h: Added more msprinter device private slots.     
+
+2000-02-01  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * event-msw.c (key_needs_default_processing_p): Added.
+       (mswindows_wnd_proc, WM_KEYUP, KEYDOWN): Call it.
+
+2000-01-29  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * glyphs.c (image_instance_layout): Mark image instance as clean
+       after layout.
+       (glyph_dirty_p): Removed redundant function.
+       (invalidate_glyph_geometry_maybe): Added.
+       (update_glyph_cachel_data): Call it.
+
+       * glyphs.h: Prototyped it.
+
+       * redisplay.c (add_glyph_rune): Call it.
+       (redisplay_window): Reset glyphs cachels when frame faces has
+       changed, thus forcing recomputation of built-in border glyphs.
+
+2000-01-30  Martin Buchholz  <martin@xemacs.org>
+
+       * Makefile.in.in: Make portable dumper and purify play well together.
+       Add imperfect, but better than nothing, support for pdump.
+       Remove xemacs.dmp when temacs is re-generated.
+       Don't ignore errors when dumping xemacs.
+
+       * symbols.c (maybe_call_magic_handler): Remove one magic number.
+
+2000-01-28  Andy Piper  <andy@xemacs.org>
+
+       * frame.c (allocate_frame_core): Use new Fset_window_buffer signature.
+       (setup_normal_frame): ditto.
+       (setup_frame_without_minibuffer): ditto.
+       (setup_minibuffer_frame): ditto.
+       (delete_frame_internal): ditto.
+       (Fmake_frame_invisible): ditto.
+       (Ficonify_frame): ditto.
+
+       * window.h: change Fset_window_buffer signature.
+
+       * window.c (Fsplit_window): Use new Fset_window_buffer signature.
+       (Fset_window_buffer): allow recording of buffer if the window is
+       the selected window.
+       (window_loop): Use new Fset_window signature.
+
+2000-01-23  Daniel Pittman  <daniel@danann.net>
+
+       * config.h.in: Added template for `HAVE_ATHENA_3D'
+
+2000-01-29  Andy Piper  <andy@xemacs.org>
+
+       * glyphs-x.c (x_resize_subwindow): Try and catch bogus resizes.
+
+       * gutter.c (output_gutter): Don't output if the window isn't live.
+
+2000-01-28  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * glyphs-msw.c (mswindows_unmap_subwindow): Fix of corrupted patch
+       of 01/12/00: Moved SetFocus back here where it belongs.
+
+2000-01-23  Andy Piper  <andy@xemacs.org>
+
+       * s/cygwin32.h: declare printer things.
+
+2000-01-26  Andy Piper  <andy@xemacs.org>
+
+       * select.c (Fown_selection_internal): GCPRO bug fix from Mike
+       Alexander.
+
+2000-01-24  Andy Piper  <andy@xemacs.org>
+
+       * glyphs-msw.c (mswindows_locate_pixmap_file): Expand filename.
+       (mswindows_button_instantiate): Make sure glyph is a pixmap.
+
+       * glyphs-widget.c (widget_instantiate): Avoid shadows.
+
+       * frame-msw.c (msprinter_init_frame_3): Nuke warning.
+
+       * glyphs-msw.c: (mswindows_string_to_color): remove declaration.
+
+       * redisplay-msw.c (mswindows_output_cursor): Avoid shadows.
+       (mswindows_output_display_block): Avoid local shadows.
+
+       * event-msw.c (mswindows_enqueue_magic_event): Avoid shadows.
+       (mswindows_enqueue_mouse_button_event): ditto.
+       (mswindows_handle_gui_wm_command): remove declaration.
+
+       * console-msw.c (mswindows_canonicalize_console_connection): Avoid
+       warnings.
+
+       * console-msw.h: Avoid shadows.
+       (mswindows_get_toolbar_button_text):
+       (emacs_mswindows_create_stream_pair):
+       (emacs_mswindows_delete_stream_pair):
+       (mswindows_handle_toolbar_wm_command): declare.
+
+       * device-msw.c (build_syscolor_string): Avoid shadows.
+
+2000-01-23  Andy Piper  <andy@xemacs.org>
+
+       * glyphs-widget.c (widget_instantiate): reverse the items for
+       layouts so that children are in the expected order.
+
+2000-01-28  Martin Buchholz  <martin@xemacs.org>
+
+       * ralloc.c: safe_bcopy ==> memmove
+       * gmalloc.c: Remove MEMMOVE_MISSING conditional code.
+       * s/msdos.h: Remove BCOPY macros.
+       * insdel.c (gap_right): Remove BCOPY conditional code.
+       * insdel.c (gap_left): Remove BCOPY conditional code.
+       XEmacs demands a working ANSI C compiler - hence memmove.
+
+       * regex.c (regex_compile): Remove accidental use of trigraphs.
+
+2000-01-27  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * event-msw.c (mswindows_enqueue_misc_user_event): Initialize
+       event timestamp.
+
+2000-01-26  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * event-msw.c (mswindows_drain_windows_queue): Added the
+       parameter.
+       (mswindows_need_event): Commented the call to
+       mswindows_drain_windows_queue().
+       (emacs_mswindows_quit_p): Lookup the windows for keyboard messages
+       only.
+
+       * console-msw.h: Moved a few function prototypes here from
+       event-msw.c. 
+
+       * gui-msw.c (mswindows_handle_gui_wm_command): Changed the ID
+       parameter from unsigned short to unsigned long.
+       (Fmswindows_shell_execute): Added return value.
+
+2000-01-27  URA Hiroshi <ura@hiru.aoba.yokohama.jp>
+
+       * sysdep.c (init_system_name): 
+         process-unix.c (unix_canonicalized_host_name): 
+       Don't call freeaddrinfo() if getaddrinfo() fails.
+
+       * process-unix.c (unix_open_unix_network_stream):
+       Moved the code to get a port # into address loop.
+
+2000-01-27  Martin Buchholz  <martin@xemacs.org>
+
+       * buffer.c (reinit_vars_of_buffer): 
+       The right place to initialize conversion_in_dynarr and
+       conversion_out_dynarr.
+
+       * alloc.c (pdump): Use the real open() till sys_open() is functional.
+
+       * process-unix.c (unix_canonicalize_host_name): Muleize.
+       (unix_open_network_stream): Muleize.
+
+       * buffer.h: Fix up prototypes for ralloc.c functions.
+
+2000-01-27  URA Hiroshi <ura@hiru.aoba.yokohama.jp>
+       * config.h.in: added HAVE_GETADDRINFO and HAVE_GETNAMEINFO
+       * sysdep.c: In init_system_name(), add code to use getaddrinfo()
+               instead of gethostbyname()
+       * process-unix.c: In unix_canonicalize_host_name() and
+               unix_open_network_stream(), add code to use getaddrinfo()
+               instead of gethostbyname().
+
+2000-01-27  Daniel Pittman <daniel@danann.net>
+
+       * device-x.c (x_init_device): Warn at run-time if using Athena 3d
+       libs when built with flat Athena.
+
+2000-01-27  Martin Buchholz  <martin@xemacs.org>
+
+       * ralloc.c: Replace SIZE (conflicts with Windows headers) with size_t.
+       Use coding standards for function prototypes.
+
+2000-01-25  Martin Buchholz  <martin@xemacs.org>
+
+       * dialog-msw.c (push_lisp_string_as_unicode):
+       * doc.c (unparesseuxify_doc_string):
+       * dired.c (Fuser_name_completion_1):
+       * dired.c (Fuser_name_all_completions):
+       * dired.c (free_user_cache):
+       * dired.c (user_name_completion):
+       * console-x.c (get_display_arg_connection):
+       * minibuf.c (clear_echo_area_internal):
+       * minibuf.c (echo_area_append):
+       * eldap.c (Fldap_open):
+       * eldap.c (Fldap_search_internal):
+       * frame-x.c (x_set_frame_text_value):
+       * frame-x.c (x_set_frame_properties):
+       * frame-x.c (x_create_widgets):
+       * redisplay-tty.c (term_get_fkeys_1):
+       * objects-x.c (x_parse_nearest_color):
+       * objects-x.c (x_valid_color_name_p):
+       * objects-x.c (x_initialize_font_instance):
+       * objects-x.c (x_list_fonts):
+       * objects-x.c (x_find_charset_font):
+       * tooltalk.c (Fadd_tooltalk_message_arg):
+       * tooltalk.c (Fadd_tooltalk_pattern_attribute):
+       * tooltalk.c (Fadd_tooltalk_pattern_arg):
+       * process-unix.c (unix_create_process):
+       * ntproc.c (sys_spawnve):
+       * sound.c (Fplay_sound_file):
+       * sound.c (Fplay_sound):
+       * buffer.c (init_initial_directory):
+       * buffer.c (init_buffer):
+       * editfns.c (init_editfns):
+       * editfns.c (Ftemp_directory):
+       * editfns.c (Fuser_full_name):
+       * editfns.c (uncache_home_directory):
+       * editfns.c (get_home_directory):
+       * editfns.c (Fuser_home_directory):
+       * editfns.c (Fformat_time_string):
+       * editfns.c (Fcurrent_time_string):
+       * gui-x.c (button_item_to_widget_value):
+       * database.c (Fopen_database):
+       * event-Xt.c (x_to_emacs_keysym):
+       * event-Xt.c (x_event_to_emacs_event):
+       * event-Xt.c (describe_event_window):
+       * event-msw.c (mswindows_wnd_proc):
+       * glyphs-eimage.c (jpeg_instantiate):
+       * glyphs-eimage.c (gif_instantiate):
+       * glyphs-eimage.c (png_instantiate):
+       * glyphs-eimage.c (tiff_instantiate):
+       * glyphs-x.c (xbm_instantiate_1):
+       * glyphs-x.c (x_xbm_instantiate):
+       * glyphs-x.c (x_xface_instantiate):
+       * glyphs-x.c (autodetect_instantiate):
+       * glyphs-x.c (cursor_font_instantiate):
+       * glyphs-x.c (x_widget_instantiate):
+       * glyphs-x.c (x_widget_set_property):
+       * glyphs-x.c (x_widget_property):
+       * glyphs-x.c (BUILD_GLYPH_INST):
+       * print.c (write_string_to_stdio_stream):
+       * print.c (output_string):
+       * print.c (Falternate_debugging_output):
+       * print.c (Fexternal_debugging_output):
+       * glyphs-msw.c (extract_xpm_color_names):
+       * glyphs-msw.c (mswindows_xpm_instantiate):
+       * glyphs-msw.c (bmp_instantiate):
+       * glyphs-msw.c (resource_name_to_resource):
+       * glyphs-msw.c (mswindows_resource_instantiate):
+       * glyphs-msw.c (xbm_instantiate_1):
+       * glyphs-msw.c (mswindows_xbm_instantiate):
+       * glyphs-msw.c (mswindows_xface_instantiate):
+       * glyphs-msw.c (mswindows_widget_instantiate):
+       * glyphs-msw.c (add_tree_item):
+       * glyphs-msw.c (add_tab_item):
+       * glyphs-msw.c (mswindows_combo_box_instantiate):
+       * glyphs-msw.c (mswindows_widget_property):
+       * glyphs-msw.c (mswindows_combo_box_property):
+       * glyphs-msw.c (mswindows_widget_set_property):
+       * console.c (stuff_buffered_input):
+       * objects-msw.c (mswindows_initialize_color_instance):
+       * objects-msw.c (mswindows_valid_color_name_p):
+       * objects-msw.c (mswindows_list_fonts):
+       * objects-msw.c (mswindows_font_instance_truename):
+       * bytecode.c (optimize_compiled_function):
+       * select-x.c (symbol_to_x_atom):
+       * select-x.c (x_atom_to_symbol):
+       * select-x.c (hack_motif_clipboard_selection):
+       * select-x.c (selection_data_to_lisp_data):
+       * select-x.c (lisp_data_to_selection_data):
+       * select-x.c (Fx_get_cutbuffer_internal):
+       * select-x.c (Fx_store_cutbuffer_internal):
+       * buffer.h (TO_EXTERNAL_FORMAT): New function.
+       * buffer.h (TO_INTERNAL_FORMAT): New function.
+       * emacs.c (make_arg_list_1):
+       * emacs.c (make_argc_argv):
+       * emacs.c (main_1):
+       * emacs.c (Fdump_emacs):
+       * emacs.c (split_string_by_emchar_1):
+       * file-coding.h:
+       * lisp.h:
+       * lstream.h:
+       * symsinit.h:
+       * device-x.c (x_init_device):
+       * device-x.c (Fx_valid_keysym_name_p):
+       * device-x.c (Fx_get_font_path):
+       * device-x.c (Fx_set_font_path):
+       * glyphs.c (bitmap_to_lisp_data):
+       * glyphs.c (pixmap_to_lisp_data):
+       * alloc.c (make_ext_string): Use coding system arguments.  Update
+       all callers.
+       * alloc.c (build_string):
+       * callproc.c (child_setup):
+       * callproc.c (init_callproc):
+       * fileio.c (lisp_strerror):
+       * fileio.c (directory_file_name):
+       * fileio.c (Fexpand_file_name):
+       * fileio.c (Ffile_truename):
+       * fileio.c (Fsysnetunam):
+       * fileio.c (Fdo_auto_save):
+       * sysdep.c (sys_readdir):
+       * tests.c: New file.  Allow adding C tests.
+       Replace GET_* macros with a more comprehensible and flexible
+       interface, TO_INTERNAL_FORMAT() and TO_EXTERNAL_FORMAT().
+       Modify all calls.
+       Any coding system can be used to do format conversion.
+       Eliminate enum external_data_format.
+       Eliminate convert_to_external_format.
+       Eliminate convert_to_internal_format.
+       Make sure file-name, keyboard, terminal, and ctext are always
+       defined as coding systems or aliases.  Make
+       file-name-coding-system, terminal-coding-system, and
+       keyboard-coding-system magical variables that are equivalent to
+       defining the corresponding coding system aliases.
+       
+       * file-coding.c (Fcoding_system_canonical_name_p): New function.
+       * file-coding.c (Fcoding_system_alias_p): New function.
+       * file-coding.c (Fcoding_system_aliasee): New function.
+       * file-coding.c (append_suffix_to_symbol): New function.
+       * file-coding.c (dangling_coding_system_alias_p): New function.
+       * file-coding.c (Ffind_coding_system):
+       * file-coding.c (Fcopy_coding_system):
+       * file-coding.c (encode_coding_no_conversion):
+       * file-coding.c (syms_of_file_coding):
+       * file-coding.c (vars_of_file_coding):
+       Rewrite coding system alias code.
+       Allow nested aliases, like symbolic links.
+       Allow redefinition of coding system aliases.
+       Prevent existence of dangling coding system aliases.
+
+       * dired.c (Fuser_name_completion_1):
+       * dired.c (Fuser_name_all_completions):
+       A crash would happen if user did QUIT in the middle of building
+       user_name_cache.  Remove redundant code in mainline and unwind_protect.
+
+       * lisp.h:
+       * dynarr.c (Dynarr_min_size): Make static.  Increase value to 8.
+
+       * lstream.c (make_fixed_buffer_input_stream): Take a void *, not
+       an unsigned char *.  Update all callers.
+
+2000-01-26  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * callproc.c (Fcall_process_internal): Ignore Vbinary-process_output.
+
+2000-01-25  Martin Buchholz  <martin@xemacs.org>
+
+       * elhash.c (hentry_description): Use more portable definition.
+       (resize_hash_table): Initialize new hentries using
+       xnew_array_and_zero, thereby simplifying the code.
+
+       * mule-charset.c (make_charset): Make sure entire object is
+       intialized, to avoid Purify warnings.
+
+       * alloc.c (resize_string): Fix unlikely crash with big strings.
+
+2000-01-24  Martin Buchholz  <martin@xemacs.org>
+
+       * realpath.c (xrealpath): 
+       Don't call getwd().
+
+2000-01-25  Martin Buchholz  <martin@xemacs.org>
+
+       * lread.c (read_bit_vector): Fix memory leak reading literal bit vectors.
+
+1999-12-28  Max Matveev  <max@melbourne.sgi.com>
+
+       * unexelfsgi.c (unexec): Change the way we decide which segment
+       should be extended.
+
+       Assumption that .bss section should be outside the PT_LOADable
+       segment. On IRIX with version 6.2 and above, .bss (or .sbss, if
+       it's present) is inside the 'data' segment. This would fail the
+       test which was used to find a segment to grow and cover new
+       heap. Instead of this assumption, I created another one - on IRIX
+       the segment to grow should start below .bss and it's address
+       should extent above the end of .bss. Once this segment is
+       identified, it's grown to accommodate the new heap and new
+       zero-length .bss section is added at the end of .data2.
+
+2000-01-25  Martin Buchholz  <martin@xemacs.org>
+
+       * eval.c (Feval): Wrong number of arguments should use original
+       function, not the indirect_function version of it.
+
+2000-01-24  Yoshiki Hayashi  <yoshiki@xemacs.org>
+
+       * glyphs-x.c (x_button_instantiate): Don't add image if
+       it is not a pixmap.
+       (x_locate_pixmap_file): Call Fexpand_file_name when file name
+       is relative.
+
+2000-01-21  Yoshiki Hayashi  <yoshiki@xemacs.org>
+
+       * symeval.h (DEFVAR_LISP_MAGIC): Remove semicolon after macro
+       declaration.
+       (DEFVAR_INT_MAGIC): Ditto.
+       (DEFVAR_BOOL_MAGIC): Ditto.
+       * glyphs.h: Reindent backslash.
+
+2000-01-24  Martin Buchholz  <martin@xemacs.org>
+
+       * glyphs-widget.c (layout_query_geometry): 
+       (layout_layout): Use correct types for gheight, gwidth.
+
+2000-01-24  Martin Buchholz  <martin@xemacs.org>
+
+       * EmacsManager.c (QueryGeometry): Purified.
+
+2000-01-23  Martin Buchholz  <martin@xemacs.org>
+
+       * alloc.c (make_float): Make sure entire object is intialized, to
+       avoid Purify warnings.
+       (pdump_register_sub): Remove useless assignment.
+       (pdump): Use xmalloc, not malloc.
+       (pdump_load): Use xmalloc, not malloc.
+
+2000-01-23  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * callproc.c: 
+       * dired-msw.c: 
+       * fileio.c: 
+       * process-nt.c: 
+       * redisplay-msw.c: 
+       * sysdep.c: Removed redundant #include <windows.h>
+
+2000-01-22  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * frame.c (delete_frame_internal): Do not delete device when its
+       implementation so declares.
+       (delete_frame_internal): Set device selected frame to nil when
+       last frame goes away. 
+
+       * device-msw.c (msprinter_device_system_metrics): Implemented.
+       (mswindows_device_system_metrics): Added 'device-dpi property.
+
+       * device.c: (Fdevice_printer_p): Added.
+       Added 'offset-workspace device metric.
+
+       * console.h (device_metrics): Declared DM_offset_workspace.
+
+2000-01-23  Martin Buchholz  <martin@xemacs.org>
+
+       * fileio.c (Ffile_truename): Remove pointless and confusing
+       initialization of elen.
+
+       * glyphs-widget.c: Compiler warning fixes.
+
+2000-01-23  Gunnar Evermann  <ge204@eng.cam.ac.uk>
+
+       * process.h (PROCESS_LIVE_P): Modify to take a Lisp_Process
+       instead of a Lisp_Object as argument to make it consistent with
+       the other LIVE_P macros.
+       (CHECK_LIVE_PROCESS): New macro.
+
+       * process.c: Declare Qprocess_live_p.
+       (Fprocess_live_p): New function.
+       (create_process): Use PROCESS_LIVE_P.
+       (read_process_output): Ditto.
+       (set_process_filter): Ditto.
+       (Fdelete_process): Ditto.
+       (kill_buffer_processes): Ditto
+       (process_send_signal): Use CHECK_LIVE_PROCESS.
+       (Fprocess_input_coding_system): Check whether process is still
+       alive (fix PR#1061).
+       (Fprocess_output_coding_system): Ditto.
+       (Fprocess_coding_system): Ditto.
+       (Fset_process_input_coding_system): Ditto.
+       (Fset_process_output_coding_system): Ditto.
+
+2000-01-23  Andy Piper  <andy@xemacs.org>
+
+       * glyphs.h (struct Lisp_Image_Instance): change format by unifying
+       layout and widget.
+
+       * glyphs.c (mark_image_instance): take into account changed
+       image_instance format.
+       (image_instance_equal): ditto.
+       (image_instance_hash): ditto.
+
+       * glyphs-widget.c (widget_instantiate): Incorporate layout
+       instantiation here. Delay layout of the layout until later.
+       (layout_instantiate): deleted.
+       (layout_query_geometry): new function. get the geometry of a
+       layout.
+       (layout_layout): layout a layout dynamically.
+       (image_instantiator_widget): New function - splitting up
+       image_instantiator_format_create_glyphs_widget for netwinder
+       compilation.
+       (image_instantiator_buttons):
+       (image_instantiator_edit_fields):
+       (image_instantiator_combo_box):
+       (image_instantiator_scrollbar):
+       (image_instantiator_progress_guage):
+       (image_instantiator_tree_view):
+       (image_instantiator_tab_control):
+       (image_instantiator_labels):
+       (image_instantiator_layout): ditto.
+       (image_instantiator_format_create_glyphs_widget): Call preceeding
+       functions.
+
+2000-01-22  Martin Buchholz  <martin@xemacs.org>
+
+       * process.c (Fset_process_coding_system):
+       * device-x.c (Fx_keysym_hash_table): 
+       Docstring fixes.
+
+       * lstream.c (Lstream_write): Return documented value, not 0.
+
+       * fileio.c (directory_file_name): 
+       (Fsubstitute_in_file_name): 
+       (Fsubstitute_insert_file_contents_internal): 
+       (Fwrite_region_internal):
+       * emacs.c:
+       * sysdep.c:
+       * getloadavg.c: 
+       * systty.h:
+       Remove vestigial APOLLO-conditional code.
+
+2000-01-21  Martin Buchholz  <martin@xemacs.org>
+
+       * getpagesize.h: Add guard macros.
+       * libsst.h: Add guard macros.
+       * libst.h: Add guard macros.
+       * line-number.h: Add guard macros.
+       * ndir.h: Add guard macros.
+       * sysfloat.h: Add guard macros.
+       * sysfile.h: Add guard macros.
+       * sysproc.h: Add guard macros.
+       * syswait.h: Add guard macros.
+       * xintrinsic.h: Add guard macros.
+       * xintrinsicp.h: Add guard macros.
+       * xmmanager.h: Add guard macros.
+       * xmmanagerp.h: Add guard macros.
+       * xmprimitive.h: Add guard macros.
+       * xmu.h: Add guard macros.
+       * gpmevent.h: Add copyright statement. Add guard macros.
+       * miscplay.h: Add guard macros.
+       * *.h: Use consistent C-standards-approved guard macro names.
+
+       * opaque.c (make_opaque): Switch parameter order. 
+       * opaque.h (make_opaque): Switch parameter order.
+       Update all callers.
+       * buffer.h (MAKE_MIRROR_TRT_TABLE): Use symbolic constant OPAQUE_CLEAR.
+
+       * config.h.in (type_checking_assert): Added.
+       (bufpos_checking_assert): Added.
+
+2000-01-21  Martin Buchholz  <martin@xemacs.org>
+
+       * alloc.c: Harmless pdump changes.
+       - Use countof().
+       - spell alignment correctly.
+       * sysdep.c: Use countof()
+
+2000-01-20  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * console.c (create_console): Use CONMETH_OR_GIVEN when calling
+       initially_selected_for_input() console method, default to 0.
+       (semi_canonicalize_console_connection): Try to delegate to
+       canonicalize_console_connection if no such console method.
+       (canonicalize_console_connection): Vice versa.
+       (print_console): Do not print nil connection.
+
+       * console.h (XDEVIMPF_IS_A_PRINTER): Added.
+       (XDEVIMPF_NO_AUTO_REDISPLAY): Added.
+       (XDEVIMPF_FRAMELESS_OK): Added.
+       (CONSOLE_INHERITS_METHOD): Added.
+
+       * console-msw.c (mswindows_canonicalize_console_connection):
+       Added.
+       (mswindows_canonicalize_device_connection): Added.
+
+       * console-msw.h (struct msprinter_device): Added this struct and
+       accessor macros.
+       (mswindows_device): Made fontlist a lisp object.
+
+       * device.c (semi_canonicalize_device_connection):  Try to delegate
+       to canonicalize_device_connection if no such console method.
+       (canonicalize_device_connection): Vice versa.
+       (print_device): Do not print nil connection.
+
+       * device-msw.c (mswindows_init_device): Call InitCommonControls
+       when have widgets.
+       (mswindows_delete_device): Removed fontlist deallocation.
+       (mswindows_mark_device): Added.
+
+       * events.c (event_equal): Added abort() at unreached code.
+       (event_hash): Ditto.
+
+       * faces.c (complex_vars_of_faces): Added Qmsprinter to the list of
+       fallback tags of Windows devices.
+
+       * general.c (syms_of_general): Initialized Qmsprinter.
+
+       * gutter.c (complex_vars_of_gutters): Added Qmsprinter to the list
+       of fallback tags of Windows devices.
+
+       * lisp.h: Declared Qmsprinter.
+
+       * objects-msw.c (font_enum_callback_2): Rewrote to build lisp list
+       of strings.
+       (mswindows_list_fonts): Ditto.
+       (mswindows_enumerate_fonts): Removed dependency on XDEVICE, so
+       that it can be used by both mswindows and msprinter devices.
+       (initialize_font_instance): Added.
+       (mswindows_initialize_font_instance): Use it.
+       (msprinter_initialize_font_instance): Added.
+
+       * redisplay.c (redisplay_device): Added the parameter AUTOMATIC
+       and implementation flags check.
+       (redisplay_without_hooks): Changed the call to the above.
+       (Fredraw_device): Ditto.
+       (Fredisplay_device): Ditto.
+
+       * redisplay-msw.c (get_frame_dc): Implemented.
+       (get_frame_compdc): Implemented.
+       (many functions): Use the two functions above to get device
+       contexts, ether for a window or a printer.
+
+2000-01-21  Olivier Galibert  <galibert@pobox.com>
+
+       * symbols.c (reinit_symbols_once_early): Put Qzero/Qnull_pointer
+       initialization here.
+       (init_symbols_once_early): Call it.
+       * emacs.c (main_1): Call it.
+       * symsinit.h: Declare it.
+
+2000-01-19  Olivier Galibert  <galibert@pobox.com>
+
+       * alloc.c: Use a lrecord_header * in the backtrace instead of a
+       Lisp_Object.
+       (pdump_backtrace): Ditto.
+       (pdump_register_object): Ditto.  Cleanup use of the pointers.
+       (pdump_get_entry): Abort if trying to register a null pointer.
+       (pdump_dump_data): Cleanup types when relocating.
+       (pdump_dump_staticvec): Cleanup types w.r.t the reloc table.
+       (pdump_dump_rtables): Remove bad casts.
+       (pdump_load): Cleanup relocation w.r.t union type.  Use a
+       Lisp_Object instead of a EMACS_INT for the hashtable
+       reorganization.
+
+2000-01-20  Martin Buchholz  <martin@xemacs.org>
+
+       * emacs.c (main_1): Rearrange morass of #ifdef's for correctness.
+
+       * callproc.c (call_process_cleanup): Isolate WINDOWSNT code for clarity.
+
+       * EmacsManager.c (GeometryManager): Avoid use of CPP for clarity.
+
+       * *.[ch]: global-replace 's/_of_xselect/_of_select_x/g' *.[ch]
+
+2000-01-17  Kirill 'Big K' Katsnelson  <kkm@dtmx.com>
+
+       * faces.h (FACE_STRIKETHRU_P): Added.
+
+       * glyphs-msw.c (mswindows_widget_hfont): Implemented, to take care
+       of font variants.
+
+       * redisplay-msw.c (mswindows_apply_face_effects): Deleted.
+       (mswindows_set_dc_font): New function, aware of font variants,
+       separated from mswindows_update_dc.
+
+       * objects-msw.h (struct mswindows_font_instance_data): Added
+       definition.
+
+       * objects-msw.c (mswindows_finalize_font_instance): Delete all
+       cached fonts and the data structure.
+       (mswindows_initialize_font_instance): Added creation of font data
+       structure.
+       (mswindows_print_font_instance): Print at least something.
+       (mswindows_create_font_variant): Implemented.
+       (mswindows_get_hfont): Implemented.
+
+2000-01-13  Fabrice Popineau  <Fabrice.Popineau@supelec.fr>
+
+       * dired-msw.c: permute "sysdir.h" with "sysfile.h" because of
+       prototyping problem with msvc.
+
+       * emacs.c (main_1): added syms_of_gui_mswindows() call
+
+       * gui-msw.c: added "mswindows-shell-execute" lisp subr and
+       syms_of_gui_mswindows() function
+
+       * symsinit.h: added the prototype for syms_of_gui_mswindows()
+
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
index c480ddf..eb3af59 100644 (file)
        (CCL_ReadMultibyteCharacter, CCL_WriteMultibyteCharacter): New
        macros for CCL Commands.
        (EXCMD): New macro.
        (CCL_ReadMultibyteCharacter, CCL_WriteMultibyteCharacter): New
        macros for CCL Commands.
        (EXCMD): New macro.
-       (ccl_driver): New case lable `CCL_Extention'.
+       (ccl_driver): New case label `CCL_Extension'.
        (setup_ccl_program): Initialize the member `private_state' of CCL.
 
 1999-07-08  Katsumi Yamaoka <yamaoka@jpl.org>
        (setup_ccl_program): Initialize the member `private_state' of CCL.
 
 1999-07-08  Katsumi Yamaoka <yamaoka@jpl.org>
@@ -7721,7 +7721,7 @@ Wed May 27, 1998  Darryl Okahata  <darrylo@sr.hp.com>
 
        * emacs.c: Rearrange NT initialization order so that
        environment/registry variables will be properly entered into
 
        * emacs.c: Rearrange NT initialization order so that
        environment/registry variables will be properly entered into
-       Vprocess_enviroment.
+       Vprocess_environment.
 
        * fileio.c: replaced egetenv("HOME") with calls to the new
          get_home_directory().
 
        * fileio.c: replaced egetenv("HOME") with calls to the new
          get_home_directory().
index 2051ae4..78ac737 100644 (file)
@@ -57,110 +57,141 @@ emacs_Xt_mapping_action (Widget w, XEvent* event);
 #undef XtOffset
 #define XtOffset(p_type,field) \
        ((Cardinal) (((char *) (&(((p_type)0)->field))) - ((char *)0)))
 #undef XtOffset
 #define XtOffset(p_type,field) \
        ((Cardinal) (((char *) (&(((p_type)0)->field))) - ((char *)0)))
-#define offset(field) XtOffset(EmacsFrame, emacs_frame.field)
+#define offset(field) XtOffset (EmacsFrame, emacs_frame.field)
 
 static XtResource resources[] = {
 
 static XtResource resources[] = {
-  {XtNgeometry, XtCGeometry, XtRString, sizeof(String),
-     offset (geometry), XtRString, (XtPointer) 0},
-  {XtNiconic, XtCIconic, XtRBoolean, sizeof(Boolean),
-     offset (iconic), XtRImmediate, (XtPointer) False},
-
-  {XtNemacsFrame, XtCEmacsFrame, XtRPointer, sizeof (XtPointer),
-     offset (frame), XtRImmediate, 0},
-  {XtNmenubar, XtCMenubar, XtRBoolean, sizeof (Boolean),
-     offset (menubar_p), XtRImmediate, (XtPointer) True},
-  {XtNinitiallyUnmapped, XtCInitiallyUnmapped, XtRBoolean, sizeof (Boolean),
-     offset (initially_unmapped), XtRImmediate, (XtPointer) False},
-  {XtNminibuffer, XtCMinibuffer, XtRBoolean, sizeof (Boolean),
-     offset (minibuffer), XtRImmediate, (XtPointer) True},
-  {XtNunsplittable, XtCUnsplittable, XtRBoolean, sizeof (Boolean),
-     offset (unsplittable), XtRImmediate, (XtPointer) False},
-  {XtNinternalBorderWidth, XtCInternalBorderWidth, XtRInt, sizeof (int),
-     offset (internal_border_width), XtRImmediate, (XtPointer)4},
+  { XtNgeometry, XtCGeometry,
+    XtRString, sizeof (String),
+    offset (geometry), XtRString, (XtPointer) 0 },
+  { XtNiconic, XtCIconic,
+    XtRBoolean, sizeof (Boolean),
+    offset (iconic), XtRImmediate, (XtPointer) False },
+
+  { XtNemacsFrame, XtCEmacsFrame,
+    XtRPointer, sizeof (XtPointer),
+    offset (frame), XtRImmediate, 0 },
+  { XtNmenubar, XtCMenubar,
+    XtRBoolean, sizeof (Boolean),
+    offset (menubar_p), XtRImmediate, (XtPointer) True },
+  { XtNinitiallyUnmapped, XtCInitiallyUnmapped,
+    XtRBoolean, sizeof (Boolean),
+    offset (initially_unmapped), XtRImmediate, (XtPointer) False },
+  { XtNminibuffer, XtCMinibuffer,
+    XtRBoolean, sizeof (Boolean),
+    offset (minibuffer), XtRImmediate, (XtPointer) True },
+  { XtNunsplittable, XtCUnsplittable,
+    XtRBoolean, sizeof (Boolean),
+    offset (unsplittable), XtRImmediate, (XtPointer) False },
+  { XtNinternalBorderWidth, XtCInternalBorderWidth,
+    XtRInt, sizeof (int),
+    offset (internal_border_width), XtRImmediate, (XtPointer)4 },
 #ifdef HAVE_SCROLLBARS
 #ifdef HAVE_SCROLLBARS
-  {XtNscrollBarWidth, XtCScrollBarWidth, XtRInt, sizeof (int),
-     offset (scrollbar_width), XtRImmediate, (XtPointer)-1},
-  {XtNscrollBarHeight, XtCScrollBarHeight, XtRInt, sizeof (int),
-     offset (scrollbar_height), XtRImmediate, (XtPointer)-1},
-  {XtNscrollBarPlacement, XtCScrollBarPlacement, XtRScrollBarPlacement,
-      sizeof(unsigned char), offset(scrollbar_placement), XtRImmediate,
+  { XtNscrollBarWidth, XtCScrollBarWidth,
+    XtRInt, sizeof (int),
+    offset (scrollbar_width), XtRImmediate, (XtPointer)-1 },
+  { XtNscrollBarHeight, XtCScrollBarHeight,
+    XtRInt, sizeof (int),
+    offset (scrollbar_height), XtRImmediate, (XtPointer)-1 },
+  { XtNscrollBarPlacement, XtCScrollBarPlacement,
+    XtRScrollBarPlacement, sizeof (unsigned char),
+    offset (scrollbar_placement), XtRImmediate,
 #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \
     defined (LWLIB_SCROLLBARS_ATHENA3D)
 #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \
     defined (LWLIB_SCROLLBARS_ATHENA3D)
-      (XtPointer) XtBOTTOM_RIGHT
+    (XtPointer) XtBOTTOM_RIGHT
 #else
 #else
-      (XtPointer) XtBOTTOM_LEFT
+    (XtPointer) XtBOTTOM_LEFT
 #endif
   },
 #endif /* HAVE_SCROLLBARS */
 #endif
   },
 #endif /* HAVE_SCROLLBARS */
+
 #ifdef HAVE_TOOLBARS
 #ifdef HAVE_TOOLBARS
-  {XtNtopToolBarHeight, XtCTopToolBarHeight, XtRInt, sizeof (int),
-     offset (top_toolbar_height), XtRImmediate, (XtPointer)-1},
-  {XtNbottomToolBarHeight, XtCBottomToolBarHeight, XtRInt, sizeof (int),
-     offset (bottom_toolbar_height), XtRImmediate, (XtPointer)-1},
-  {XtNleftToolBarWidth, XtCLeftToolBarWidth, XtRInt, sizeof (int),
-     offset (left_toolbar_width), XtRImmediate, (XtPointer)-1},
-  {XtNrightToolBarWidth, XtCRightToolBarWidth, XtRInt, sizeof (int),
-     offset (right_toolbar_width), XtRImmediate, (XtPointer)-1},
-  {XtNtopToolBarBorderWidth, XtCTopToolBarBorderWidth, XtRInt,
-     sizeof (int),
-     offset (top_toolbar_border_width), XtRImmediate, (XtPointer)-1},
-  {XtNbottomToolBarBorderWidth, XtCBottomToolBarBorderWidth, XtRInt,
-     sizeof (int),
-     offset (bottom_toolbar_border_width), XtRImmediate, (XtPointer)-1},
-  {XtNleftToolBarBorderWidth, XtCLeftToolBarBorderWidth, XtRInt,
-     sizeof (int),
-     offset (left_toolbar_border_width), XtRImmediate, (XtPointer)-1},
-  {XtNrightToolBarBorderWidth, XtCRightToolBarBorderWidth, XtRInt,
-     sizeof (int),
-     offset (right_toolbar_border_width), XtRImmediate, (XtPointer)-1},
-  {XtNtopToolBarShadowColor, XtCTopToolBarShadowColor, XtRPixel, sizeof(Pixel),
-     offset(top_toolbar_shadow_pixel), XtRString, (XtPointer) "#000000"},
-  {XtNbottomToolBarShadowColor, XtCBottomToolBarShadowColor, XtRPixel,
-     sizeof(Pixel), offset(bottom_toolbar_shadow_pixel), XtRString, (XtPointer) "#000000"},
-  {XtNbackgroundToolBarColor, XtCBackgroundToolBarColor, XtRPixel,
-     sizeof(Pixel), offset(background_toolbar_pixel), XtRImmediate,
-     (XtPointer)-1},
-  {XtNforegroundToolBarColor, XtCForegroundToolBarColor, XtRPixel,
-     sizeof(Pixel), offset(foreground_toolbar_pixel), XtRImmediate,
-     (XtPointer)-1},
-  {XtNtopToolBarShadowPixmap, XtCTopToolBarShadowPixmap, XtRPixmap,
-     sizeof (Pixmap), offset(top_toolbar_shadow_pixmap), XtRImmediate,
-     (XtPointer)None},
-  {XtNbottomToolBarShadowPixmap, XtCBottomToolBarShadowPixmap, XtRPixmap,
-     sizeof (Pixmap), offset(bottom_toolbar_shadow_pixmap), XtRImmediate,
-     (XtPointer)None},
-  {XtNtoolBarShadowThickness, XtCToolBarShadowThickness, XtRDimension,
-     sizeof (Dimension), offset (toolbar_shadow_thickness), XtRImmediate,
-     (XtPointer)2},
+  { XtNtopToolBarHeight, XtCTopToolBarHeight,
+    XtRInt, sizeof (int),
+    offset (top_toolbar_height), XtRImmediate, (XtPointer)-1 },
+  { XtNbottomToolBarHeight, XtCBottomToolBarHeight,
+    XtRInt, sizeof (int),
+    offset (bottom_toolbar_height), XtRImmediate, (XtPointer)-1 },
+  { XtNleftToolBarWidth, XtCLeftToolBarWidth,
+    XtRInt, sizeof (int),
+    offset (left_toolbar_width), XtRImmediate, (XtPointer)-1 },
+  { XtNrightToolBarWidth, XtCRightToolBarWidth,
+    XtRInt, sizeof (int),
+    offset (right_toolbar_width), XtRImmediate, (XtPointer)-1 },
+  { XtNtopToolBarBorderWidth, XtCTopToolBarBorderWidth,
+    XtRInt, sizeof (int),
+    offset (top_toolbar_border_width), XtRImmediate, (XtPointer)-1 },
+  { XtNbottomToolBarBorderWidth, XtCBottomToolBarBorderWidth,
+    XtRInt, sizeof (int),
+    offset (bottom_toolbar_border_width), XtRImmediate, (XtPointer)-1 },
+  { XtNleftToolBarBorderWidth, XtCLeftToolBarBorderWidth,
+    XtRInt, sizeof (int),
+    offset (left_toolbar_border_width), XtRImmediate, (XtPointer)-1 },
+  { XtNrightToolBarBorderWidth, XtCRightToolBarBorderWidth,
+    XtRInt, sizeof (int),
+    offset (right_toolbar_border_width), XtRImmediate, (XtPointer)-1 },
+  { XtNtopToolBarShadowColor, XtCTopToolBarShadowColor,
+    XtRPixel, sizeof (Pixel),
+    offset(top_toolbar_shadow_pixel), XtRString, (XtPointer) "#000000" },
+  { XtNbottomToolBarShadowColor, XtCBottomToolBarShadowColor,
+    XtRPixel, sizeof (Pixel),
+    offset (bottom_toolbar_shadow_pixel), XtRString, (XtPointer) "#000000" },
+  { XtNbackgroundToolBarColor, XtCBackgroundToolBarColor,
+    XtRPixel, sizeof (Pixel),
+    offset (background_toolbar_pixel), XtRImmediate, (XtPointer)-1 },
+  { XtNforegroundToolBarColor, XtCForegroundToolBarColor,
+    XtRPixel, sizeof (Pixel),
+    offset (foreground_toolbar_pixel), XtRImmediate, (XtPointer)-1 },
+  { XtNtopToolBarShadowPixmap, XtCTopToolBarShadowPixmap,
+    XtRPixmap, sizeof (Pixmap),
+    offset (top_toolbar_shadow_pixmap), XtRImmediate, (XtPointer)None },
+  { XtNbottomToolBarShadowPixmap, XtCBottomToolBarShadowPixmap,
+    XtRPixmap, sizeof (Pixmap),
+    offset (bottom_toolbar_shadow_pixmap), XtRImmediate, (XtPointer)None },
+  { XtNtoolBarShadowThickness, XtCToolBarShadowThickness,
+    XtRDimension, sizeof (Dimension),
+    offset (toolbar_shadow_thickness), XtRImmediate, (XtPointer)2 },
 #endif /* HAVE_TOOLBARS */
 #endif /* HAVE_TOOLBARS */
-  {XtNinterline, XtCInterline, XtRInt, sizeof (int),
-     offset (interline), XtRImmediate, (XtPointer)0},
+
+  { XtNinterline, XtCInterline,
+    XtRInt, sizeof (int),
+    offset (interline), XtRImmediate, (XtPointer)0 },
   {
 #ifdef I18N4
   {
 #ifdef I18N4
-    XtNfontSet, XtCFontSet, XtRFontSet,    sizeof(XFontSet),
+    XtNfontSet, XtCFontSet,
+    XtRFontSet, sizeof (XFontSet),
 #else
 #else
-    XtNfont,    XtCFont,    XtRFontStruct, sizeof(XFontStruct *),
+    XtNfont, XtCFont,
+    XtRFontStruct, sizeof (XFontStruct *),
 #endif
     offset(font), XtRImmediate, (XtPointer)0
   },
 #endif
     offset(font), XtRImmediate, (XtPointer)0
   },
-  {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
-     offset(foreground_pixel), XtRString, (XtPointer) "Black"},
-  {XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel),
-     offset(background_pixel), XtRString, (XtPointer) "Gray80"},
-  {XtNcursorColor, XtCForeground, XtRPixel, sizeof(Pixel),
-     offset(cursor_color), XtRString, (XtPointer) "XtDefaultForeground"},
-  {XtNbarCursor, XtCBarCursor, XtRBoolean, sizeof (Boolean),
-     offset (bar_cursor), XtRImmediate, (XtPointer)0},
-  {XtNvisualBell, XtCVisualBell, XtRBoolean, sizeof (Boolean),
-     offset (visual_bell), XtRImmediate, (XtPointer)0},
-  {XtNbellVolume, XtCBellVolume, XtRInt, sizeof (int),
-     offset (bell_volume), XtRImmediate, (XtPointer)0},
-  {XtNuseBackingStore, XtCUseBackingStore, XtRBoolean, sizeof (Boolean),
-     offset (use_backing_store), XtRImmediate, (XtPointer)0},
-  {XtNpreferredWidth, XtCPreferredWidth, XtRDimension, sizeof (Dimension),
-     offset (preferred_width), XtRImmediate, (XtPointer)0},
-  {XtNpreferredHeight, XtCPreferredHeight, XtRDimension, sizeof (Dimension),
-     offset (preferred_height), XtRImmediate, (XtPointer)0},
+  { XtNforeground, XtCForeground,
+    XtRPixel, sizeof (Pixel),
+    offset(foreground_pixel), XtRString, (XtPointer) "Black" },
+  { XtNbackground, XtCBackground,
+    XtRPixel, sizeof (Pixel),
+    offset(background_pixel), XtRString, (XtPointer) "Gray80" },
+  { XtNcursorColor, XtCForeground,
+    XtRPixel, sizeof (Pixel),
+    offset(cursor_color), XtRString, (XtPointer) "XtDefaultForeground" },
+  { XtNbarCursor, XtCBarCursor,
+    XtRBoolean, sizeof (Boolean),
+    offset (bar_cursor), XtRImmediate, (XtPointer)0 },
+  { XtNvisualBell, XtCVisualBell,
+    XtRBoolean, sizeof (Boolean),
+    offset (visual_bell), XtRImmediate, (XtPointer)0 },
+  { XtNbellVolume, XtCBellVolume,
+    XtRInt, sizeof (int),
+    offset (bell_volume), XtRImmediate, (XtPointer)0 },
+  { XtNuseBackingStore, XtCUseBackingStore,
+    XtRBoolean, sizeof (Boolean),
+    offset (use_backing_store), XtRImmediate, (XtPointer)0 },
+  { XtNpreferredWidth, XtCPreferredWidth,
+    XtRDimension, sizeof (Dimension),
+    offset (preferred_width), XtRImmediate, (XtPointer)0 },
+  { XtNpreferredHeight, XtCPreferredHeight,
+    XtRDimension, sizeof (Dimension),
+    offset (preferred_height), XtRImmediate, (XtPointer)0 },
 };
 
 #undef offset
 };
 
 #undef offset
@@ -191,7 +222,7 @@ EmacsFrameClassRec emacsFrameClassRec = {
     /* superclass              */      &widgetClassRec,
 #endif
     /* class_name              */      "EmacsFrame",
     /* superclass              */      &widgetClassRec,
 #endif
     /* class_name              */      "EmacsFrame",
-    /* widget_size             */      sizeof(EmacsFrameRec),
+    /* widget_size             */      sizeof (EmacsFrameRec),
     /* class_initialize                */      EmacsFrameClassInitialize,
     /* class_part_initialize   */      0,
     /* class_inited            */      FALSE,
     /* class_initialize                */      EmacsFrameClassInitialize,
     /* class_part_initialize   */      0,
     /* class_inited            */      FALSE,
@@ -201,7 +232,7 @@ EmacsFrameClassRec emacsFrameClassRec = {
     /* actions                 */      emacsFrameActionsTable,
     /* num_actions             */      XtNumber (emacsFrameActionsTable),
     /* resources               */      resources,
     /* actions                 */      emacsFrameActionsTable,
     /* num_actions             */      XtNumber (emacsFrameActionsTable),
     /* resources               */      resources,
-    /* resource_count          */      XtNumber(resources),
+    /* resource_count          */      XtNumber (resources),
     /* xrm_class               */      NULLQUARK,
     /* compress_motion         */      TRUE,
     /* compress_exposure       */      TRUE,
     /* xrm_class               */      NULLQUARK,
     /* compress_motion         */      TRUE,
     /* compress_exposure       */      TRUE,
@@ -549,7 +580,7 @@ EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request,
 }
 
 /* Xt string-to-scrollbar-placement converter */
 }
 
 /* Xt string-to-scrollbar-placement converter */
-/* ### Convert this to a `new-style' converter (See XtAddTypeConverter) */
+/* #### Convert this to a `new-style' converter (See XtAddTypeConverter) */
 
 /* This variable cannot be a stack variable. */
 static unsigned char cvt_string_scrollbar_placement;
 
 /* This variable cannot be a stack variable. */
 static unsigned char cvt_string_scrollbar_placement;
index 79d62e7..3855988 100644 (file)
@@ -21,8 +21,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _EmacsFrame_h
-#define _EmacsFrame_h
+#ifndef INCLUDED_EmacsFrame_h_
+#define INCLUDED_EmacsFrame_h_
 
 #ifndef XtNminibuffer
 #define XtNminibuffer "minibuffer"
 
 #ifndef XtNminibuffer
 #define XtNminibuffer "minibuffer"
@@ -347,4 +347,4 @@ extern struct _DisplayContext* display_context;
 void EmacsFrameRecomputeCellSize (Widget widget);
 void EmacsFrameSetCharSize (Widget widget, int rows, int cols);
 
 void EmacsFrameRecomputeCellSize (Widget widget);
 void EmacsFrameSetCharSize (Widget widget, int rows, int cols);
 
-#endif /* _EmacsFrame_h */
+#endif /* INCLUDED_EmacsFrame_h_ */
index df7f0ad..377132e 100644 (file)
@@ -21,8 +21,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _EmacsFrameP_h
-#define _EmacsFrameP_h
+#ifndef INCLUDED_EmacsFrameP_h_
+#define INCLUDED_EmacsFrameP_h_
 
 #include "xintrinsicp.h"
 #include <X11/CoreP.h>
 
 #include "xintrinsicp.h"
 #include <X11/CoreP.h>
@@ -109,6 +109,4 @@ typedef struct _EmacsFrameClassRec {        /* full class record declaration */
 
 extern EmacsFrameClassRec emacsFrameClassRec;   /* class pointer */
 
 
 extern EmacsFrameClassRec emacsFrameClassRec;   /* class pointer */
 
-
-
-#endif /* _EmacsFrameP_h */
+#endif /* INCLUDED_EmacsFrameP_h_ */
index 2d02f8d..800801e 100644 (file)
@@ -37,12 +37,15 @@ Boston, MA 02111-1307, USA.  */
 
 static XtResource resources[] = {
 #define offset(field) XtOffset(EmacsManagerWidget, emacs_manager.field)
 
 static XtResource resources[] = {
 #define offset(field) XtOffset(EmacsManagerWidget, emacs_manager.field)
-  { XtNresizeCallback, XtCCallback, XtRCallback, sizeof(XtCallbackList),
-      offset(resize_callback), XtRImmediate, (XtPointer) 0 },
-  { XtNqueryGeometryCallback, XtCCallback, XtRCallback, sizeof(XtCallbackList),
-      offset(query_geometry_callback), XtRImmediate, (XtPointer) 0 },
-  { XtNuserData, XtCUserData, XtRPointer, sizeof(XtPointer),
-      offset(user_data), XtRImmediate, (XtPointer) 0 },
+  { XtNresizeCallback, XtCCallback,
+    XtRCallback, sizeof (XtCallbackList),
+    offset(resize_callback), XtRImmediate, (XtPointer) 0 },
+  { XtNqueryGeometryCallback, XtCCallback,
+    XtRCallback, sizeof (XtCallbackList),
+    offset(query_geometry_callback), XtRImmediate, (XtPointer) 0 },
+  { XtNuserData, XtCUserData,
+    XtRPointer, sizeof (XtPointer),
+    offset(user_data), XtRImmediate, (XtPointer) 0 },
 };
 
 /****************************************************************
 };
 
 /****************************************************************
@@ -71,7 +74,7 @@ EmacsManagerClassRec emacsManagerClassRec = {
     /* superclass         */    (WidgetClass) &compositeClassRec,
 #endif
     /* class_name         */    "EmacsManager",
     /* superclass         */    (WidgetClass) &compositeClassRec,
 #endif
     /* class_name         */    "EmacsManager",
-    /* widget_size        */    sizeof(EmacsManagerRec),
+    /* widget_size        */    sizeof (EmacsManagerRec),
     /* class_initialize   */    ClassInitialize,
     /* class_part_init    */   NULL,
     /* class_inited       */   FALSE,
     /* class_initialize   */    ClassInitialize,
     /* class_part_init    */   NULL,
     /* class_inited       */   FALSE,
@@ -147,17 +150,17 @@ QueryGeometry (Widget w, XtWidgetGeometry *request, XtWidgetGeometry *reply)
 {
   EmacsManagerWidget emw = (EmacsManagerWidget) w;
   EmacsManagerQueryGeometryStruct struc;
 {
   EmacsManagerWidget emw = (EmacsManagerWidget) w;
   EmacsManagerQueryGeometryStruct struc;
-  int mask = request->request_mode & (CWWidth | CWHeight);
+  int request_mode = request->request_mode;
 
 
-  struc.request_mode = mask;
-  if (mask & CWWidth)  struc.proposed_width  = request->width;
-  if (mask & CWHeight) struc.proposed_height = request->height;
+  struc.request_mode = request_mode;
+  struc.proposed_width  = (request_mode & CWWidth)  ? request->width  : 0;
+  struc.proposed_height = (request_mode & CWHeight) ? request->height : 0;
   XtCallCallbackList (w, emw->emacs_manager.query_geometry_callback, &struc);
   reply->request_mode = CWWidth | CWHeight;
   reply->width  = struc.proposed_width;
   reply->height = struc.proposed_height;
   XtCallCallbackList (w, emw->emacs_manager.query_geometry_callback, &struc);
   reply->request_mode = CWWidth | CWHeight;
   reply->width  = struc.proposed_width;
   reply->height = struc.proposed_height;
-  if (((mask & CWWidth)  && (request->width  != reply->width)) ||
-      ((mask & CWHeight) && (request->height != reply->height)))
+  if (((request_mode & CWWidth)  && (request->width  != reply->width)) ||
+      ((request_mode & CWHeight) && (request->height != reply->height)))
     return XtGeometryAlmost;
   return XtGeometryYes;
 }
     return XtGeometryAlmost;
   return XtGeometryYes;
 }
@@ -177,23 +180,21 @@ static XtGeometryResult
 GeometryManager (Widget w, XtWidgetGeometry *request, XtWidgetGeometry *reply)
 {
   /* Sure, any changes are fine. */
 GeometryManager (Widget w, XtWidgetGeometry *request, XtWidgetGeometry *reply)
 {
   /* Sure, any changes are fine. */
-#define COPY(field, mask) \
-  if (request->request_mode & mask) w->core.field = request->field
 
 
+#ifdef LWLIB_MENUBARS_MOTIF
   /* The Motif menubar will merrily request a new size every time a
      child is added or deleted.  Blow it off because it doesn't know
      what it's talking about. */
   /* The Motif menubar will merrily request a new size every time a
      child is added or deleted.  Blow it off because it doesn't know
      what it's talking about. */
-#ifdef LWLIB_MENUBARS_MOTIF
-  if (!(XtClass (w) == xmRowColumnWidgetClass))
+  if (XtClass (w) != xmRowColumnWidgetClass)
 #endif /* LWLIB_MENUBARS_MOTIF */
     {
 #endif /* LWLIB_MENUBARS_MOTIF */
     {
-      COPY (width, CWWidth);
-      COPY (height, CWHeight);
+      if (request->request_mode & CWWidth)  w->core.width  = request->width;
+      if (request->request_mode & CWHeight) w->core.height = request->height;
     }
     }
-  COPY (border_width, CWBorderWidth);
-  COPY (x, CWX);
-  COPY (y, CWY);
-#undef COPY
+  if (request->request_mode & CWBorderWidth)
+    w->core.border_width = request->border_width;
+  if (request->request_mode & CWX) w->core.x = request->x;
+  if (request->request_mode & CWY) w->core.y = request->y;
 
   return XtGeometryYes;
 }
 
   return XtGeometryYes;
 }
@@ -203,13 +204,13 @@ ChangeManaged (Widget w)
 {
   if (!XtIsRealized (w))
     {
 {
   if (!XtIsRealized (w))
     {
-      XtWidgetGeometry req, repl;
+      XtWidgetGeometry request, reply;
 
       /* find out how big we'd like to be ... */
 
 
       /* find out how big we'd like to be ... */
 
-      req.request_mode = 0;
-      XtQueryGeometry (w, &req, &repl);
-      EmacsManagerChangeSize (w, repl.width, repl.height);
+      request.request_mode = 0;
+      XtQueryGeometry (w, &request, &reply);
+      EmacsManagerChangeSize (w, reply.width, reply.height);
     }
 }
 
     }
 }
 
index 4fe91e4..6214591 100644 (file)
@@ -23,8 +23,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Written by Ben Wing. */
 
 
 /* Written by Ben Wing. */
 
-#ifndef _EmacsManager_h
-#define _EmacsManager_h
+#ifndef INCLUDED_EmacsManager_h_
+#define INCLUDED_EmacsManager_h_
 
 #ifndef XtNresizeCallback
 #define XtNresizeCallback "resizeCallback"
 
 #ifndef XtNresizeCallback
 #define XtNresizeCallback "resizeCallback"
@@ -59,4 +59,4 @@ typedef struct
 
 void EmacsManagerChangeSize (Widget w, Dimension width, Dimension height);
 
 
 void EmacsManagerChangeSize (Widget w, Dimension width, Dimension height);
 
-#endif /* _EmacsManager_h */
+#endif /* INCLUDED_EmacsManager_h_ */
index d46b177..7c068a7 100644 (file)
@@ -23,8 +23,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Written by Ben Wing. */
 
 
 /* Written by Ben Wing. */
 
-#ifndef _EmacsManagerP_h
-#define _EmacsManagerP_h
+#ifndef INCLUDED_EmacsManagerP_h_
+#define INCLUDED_EmacsManagerP_h_
 
 
 #include "xintrinsicp.h"
 
 
 #include "xintrinsicp.h"
@@ -65,4 +65,4 @@ typedef struct _EmacsManagerRec {     /* full instance record */
 
 extern EmacsManagerClassRec emacsManagerClassRec;       /* class pointer */
 
 
 extern EmacsManagerClassRec emacsManagerClassRec;       /* class pointer */
 
-#endif /* _EmacsManagerP_h */
+#endif /* INCLUDED_EmacsManagerP_h_ */
index 4abacff..490530b 100644 (file)
@@ -137,26 +137,32 @@ static XtResource resources[] = {
      the default values for X and Y, for no obvious reason.  This
      causes Shell to indicate that the defaults of (0,0) were
      program-specified, instead of letting the WM do what it wants. */
      the default values for X and Y, for no obvious reason.  This
      causes Shell to indicate that the defaults of (0,0) were
      program-specified, instead of letting the WM do what it wants. */
-  {XtNx, XtCPosition, XtRPosition, sizeof(Position),
-     coreoffset (x), XtRImmediate, (XtPointer)BIGSIZE},
-  {XtNy, XtCPosition, XtRPosition, sizeof(Position),
-     coreoffset (y), XtRImmediate, (XtPointer)BIGSIZE},
+  { XtNx, XtCPosition,
+    XtRPosition, sizeof (Position),
+    coreoffset (x), XtRImmediate, (XtPointer)BIGSIZE },
+  { XtNy, XtCPosition,
+    XtRPosition, sizeof (Position),
+    coreoffset (y), XtRImmediate, (XtPointer)BIGSIZE },
 #endif
 #endif
-  { XtNwidthCells, XtCWidthCells, XtRInt, sizeof(int),
-      offset (width_cells), XtRImmediate, (XtPointer)0},
-  { XtNheightCells, XtCHeightCells, XtRInt, sizeof(int),
-      offset (height_cells), XtRImmediate, (XtPointer)0},
-  { XtNminWidthCells, XtCMinWidthCells, XtRInt, sizeof(int),
-      offset (min_width_cells), XtRImmediate, (XtPointer)0},
-  { XtNminHeightCells, XtCMinHeightCells, XtRInt, sizeof(int),
-      offset (min_height_cells), XtRImmediate, (XtPointer)0},
+  { XtNwidthCells, XtCWidthCells,
+    XtRInt, sizeof (int),
+    offset (width_cells), XtRImmediate, (XtPointer)0 },
+  { XtNheightCells, XtCHeightCells,
+    XtRInt, sizeof (int),
+    offset (height_cells), XtRImmediate, (XtPointer)0 },
+  { XtNminWidthCells, XtCMinWidthCells,
+    XtRInt, sizeof (int),
+    offset (min_width_cells), XtRImmediate, (XtPointer)0 },
+  { XtNminHeightCells, XtCMinHeightCells,
+    XtRInt, sizeof (int),
+    offset (min_height_cells), XtRImmediate, (XtPointer)0 },
 };
 
 static CompositeClassExtensionRec compositeClassExtRec = {
     NULL,
     NULLQUARK,
     XtCompositeExtensionVersion,
 };
 
 static CompositeClassExtensionRec compositeClassExtRec = {
     NULL,
     NULLQUARK,
     XtCompositeExtensionVersion,
-    sizeof(CompositeClassExtensionRec),
+    sizeof (CompositeClassExtensionRec),
     TRUE,
 };
 
     TRUE,
 };
 
@@ -164,7 +170,7 @@ static ShellClassExtensionRec shellClassExtRec = {
     NULL,
     NULLQUARK,
     XtShellExtensionVersion,
     NULL,
     NULLQUARK,
     XtShellExtensionVersion,
-    sizeof(ShellClassExtensionRec),
+    sizeof (ShellClassExtensionRec),
     RootGeometryManager
 };
 
     RootGeometryManager
 };
 
@@ -174,7 +180,7 @@ EMACS_SHELL_CLASS_REC_TYPE EMACS_SHELL_CLASS_REC = {
        */
     /* superclass        */    (WidgetClass) &SUPERCLASS_CLASS_REC,
     /* class_name        */    (String) EMACS_SHELL_CLASS_NAME,
        */
     /* superclass        */    (WidgetClass) &SUPERCLASS_CLASS_REC,
     /* class_name        */    (String) EMACS_SHELL_CLASS_NAME,
-    /* size              */    sizeof(EMACS_SHELL_REC),
+    /* size              */    sizeof (EMACS_SHELL_REC),
     /* Class Initializer  */   NULL,
     /* class_part_initialize*/ NULL, /* XtInheritClassPartInitialize, */
     /* Class init'ed ?   */    FALSE,
     /* Class Initializer  */   NULL,
     /* class_part_initialize*/ NULL, /* XtInheritClassPartInitialize, */
     /* Class init'ed ?   */    FALSE,
index 4804afb..ddd831c 100644 (file)
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Written by Ben Wing, May, 1994. */
 
 
 /* Written by Ben Wing, May, 1994. */
 
-#ifndef _EmacsShell_h
-#define _EmacsShell_h
+#ifndef INCLUDED_EmacsShell_h_
+#define INCLUDED_EmacsShell_h_
 
 #ifndef XtNwidthCells
 #define XtNwidthCells "widthCells"
 
 #ifndef XtNwidthCells
 #define XtNwidthCells "widthCells"
@@ -68,4 +68,4 @@ void EmacsShellSetSizeUserSpecified (Widget gw);
 void EmacsShellSetPositionUserSpecified (Widget gw);
 void EmacsShellSmashIconicHint (Widget shell, int iconic_p);
 
 void EmacsShellSetPositionUserSpecified (Widget gw);
 void EmacsShellSmashIconicHint (Widget shell, int iconic_p);
 
-#endif /* _EmacsShell_h */
+#endif /* INCLUDED_EmacsShell_h_ */
index 4587f4a..3eef066 100644 (file)
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Written by Ben Wing, May, 1994. */
 
 
 /* Written by Ben Wing, May, 1994. */
 
-#ifndef _EmacsShellP_h
-#define _EmacsShellP_h
+#ifndef INCLUDED_EmacsShellP_h_
+#define INCLUDED_EmacsShellP_h_
 
 #include "xintrinsic.h"
 #include <X11/ShellP.h>
 
 #include "xintrinsic.h"
 #include <X11/ShellP.h>
@@ -99,4 +99,4 @@ typedef struct _TransientEmacsShellRec {      /* full instance record */
 /* class pointer */
 extern TransientEmacsShellClassRec transientEmacsShellClassRec;
 
 /* class pointer */
 extern TransientEmacsShellClassRec transientEmacsShellClassRec;
 
-#endif /* _EmacsShellP_h */
+#endif /* INCLUDED_EmacsShellP_h_ */
index 00dc380..b73b75d 100644 (file)
@@ -77,24 +77,30 @@ static int (*error_old_handler)(Display *, XErrorEvent *);
 
 static XtResource resources[] = {
 #define offset(field) XtOffset(ExternalClientWidget, externalClient.field)
 
 static XtResource resources[] = {
 #define offset(field) XtOffset(ExternalClientWidget, externalClient.field)
-  { XtNshellTimeout, XtCShellTimeout, XtRInt, sizeof(int),
-      offset(shell_timeout), XtRImmediate,(XtPointer)DEFAULT_WM_TIMEOUT},
-  { XtNdeadShell, XtCDeadShell, XtRBoolean, sizeof(Boolean),
-      offset(dead_shell), XtRImmediate, (XtPointer)False},
+  { XtNshellTimeout, XtCShellTimeout,
+    XtRInt, sizeof (int),
+    offset(shell_timeout), XtRImmediate,(XtPointer)DEFAULT_WM_TIMEOUT },
+  { XtNdeadShell, XtCDeadShell,
+    XtRBoolean, sizeof (Boolean),
+    offset(dead_shell), XtRImmediate, (XtPointer)False },
 #ifdef EXTW_USES_MOTIF
 #ifdef EXTW_USES_MOTIF
-  { XmNnavigationType, XmCNavigationType, XmRNavigationType,
-      sizeof(XmNavigationType), XtOffset(ExternalClientWidget,
-      primitive.navigation_type), XtRImmediate,
-      (XtPointer)XmTAB_GROUP},
+  { XmNnavigationType, XmCNavigationType,
+    XmRNavigationType, sizeof (XmNavigationType),
+    XtOffset (ExternalClientWidget, primitive.navigation_type),
+    XtRImmediate, (XtPointer)XmTAB_GROUP },
 #endif
 #endif
-  { XtNemacsProcID, XtCEmacsProcID, XtRString, sizeof(String),
-      offset(emacs_procid), XtRImmediate, (XtPointer)NULL},
-  { XtNshellReadyCallback, XtCCallback, XtRCallback, sizeof(XtCallbackList),
-      offset(shell_ready_callback), XtRImmediate, (XtPointer)NULL},
-  { XtNshellName, XtCShellName, XtRString, sizeof(String),
-      offset(shell_name), XtRImmediate, (XtPointer)NULL},
-  { XtNuseToolTalk, XtCUseToolTalk, XtRBoolean, sizeof(Boolean),
-      offset(use_tooltalk), XtRImmediate, (XtPointer)False}
+  { XtNemacsProcID, XtCEmacsProcID,
+    XtRString, sizeof (String),
+    offset(emacs_procid), XtRImmediate, (XtPointer)NULL },
+  { XtNshellReadyCallback, XtCCallback,
+    XtRCallback, sizeof (XtCallbackList),
+    offset(shell_ready_callback), XtRImmediate, (XtPointer)NULL },
+  { XtNshellName, XtCShellName,
+    XtRString, sizeof (String),
+    offset(shell_name), XtRImmediate, (XtPointer)NULL },
+  { XtNuseToolTalk, XtCUseToolTalk,
+    XtRBoolean, sizeof (Boolean),
+    offset(use_tooltalk), XtRImmediate, (XtPointer)False }
 };
 
 static XtActionsRec actions[] = {
 };
 
 static XtActionsRec actions[] = {
@@ -114,13 +120,13 @@ ExternalClientClassRec externalClientClassRec = {
     /* superclass        */    (WidgetClass) &coreClassRec,
 #endif
     /* class_name        */    "ExternalClient",
     /* superclass        */    (WidgetClass) &coreClassRec,
 #endif
     /* class_name        */    "ExternalClient",
-    /* size              */    sizeof(ExternalClientRec),
+    /* size              */    sizeof (ExternalClientRec),
     /* Class Initializer  */   NULL,
     /* class_part_initialize*/ NULL, /* XtInheritClassPartInitialize, */
     /* Class init'ed ?   */    FALSE,
     /* initialize        */    externalClientInitialize,
     /* initialize_notify  */   NULL,
     /* Class Initializer  */   NULL,
     /* class_part_initialize*/ NULL, /* XtInheritClassPartInitialize, */
     /* Class init'ed ?   */    FALSE,
     /* initialize        */    externalClientInitialize,
     /* initialize_notify  */   NULL,
-    /* realize           */    externalClientRealize, 
+    /* realize           */    externalClientRealize,
     /* actions           */    actions,
     /* num_actions       */    XtNumber (actions),
     /* resources         */    resources,
     /* actions           */    actions,
     /* num_actions       */    XtNumber (actions),
     /* resources         */    resources,
@@ -134,9 +140,9 @@ ExternalClientClassRec externalClientClassRec = {
     /* resize            */    XtInheritResize,
     /* expose            */    NULL,
     /* set_values        */    NULL, /* XtInheritSetValues, */
     /* resize            */    XtInheritResize,
     /* expose            */    NULL,
     /* set_values        */    NULL, /* XtInheritSetValues, */
-    /* set_values_hook   */    NULL,                   
-    /* set_values_almost  */   XtInheritSetValuesAlmost,  
-    /* get_values_hook   */    NULL,                   
+    /* set_values_hook   */    NULL,
+    /* set_values_almost  */   XtInheritSetValuesAlmost,
+    /* get_values_hook   */    NULL,
     /* accept_focus      */    NULL,
     /* intrinsics version */   XtVersion,
     /* callback offsets          */    NULL,
     /* accept_focus      */    NULL,
     /* intrinsics version */   XtVersion,
     /* callback offsets          */    NULL,
@@ -186,7 +192,7 @@ externalClientInitialize (Widget req, Widget new, ArgList args,
      -- BPW
 
   */
      -- BPW
 
   */
-    
+
   XtOverrideTranslations (new,
                          XtParseTranslationTable ("None<Key>Tab:\n"
                                                   "<FocusIn>:focusIn()\n"
   XtOverrideTranslations (new,
                          XtParseTranslationTable ("None<Key>Tab:\n"
                                                   "<FocusIn>:focusIn()\n"
@@ -195,7 +201,7 @@ externalClientInitialize (Widget req, Widget new, ArgList args,
                                                   "<Leave>:leave()\n"));
 
 #endif
                                                   "<Leave>:leave()\n"));
 
 #endif
-  
+
   XtAddEventHandler (new, 0, TRUE, EventHandler, (XtPointer) NULL);
 
   ecw->externalClient.shell_ready = False;
   XtAddEventHandler (new, 0, TRUE, EventHandler, (XtPointer) NULL);
 
   ecw->externalClient.shell_ready = False;
@@ -214,7 +220,7 @@ static Tt_callback_action
 tt_callback(Tt_message m, Tt_pattern p)
 {
   ExternalClientWidget ecw = (ExternalClientWidget)tt_message_user (m, 0);
 tt_callback(Tt_message m, Tt_pattern p)
 {
   ExternalClientWidget ecw = (ExternalClientWidget)tt_message_user (m, 0);
-  
+
   switch (tt_message_state(m))
     {
     case TT_FAILED:
   switch (tt_message_state(m))
     {
     case TT_FAILED:
@@ -226,7 +232,7 @@ tt_callback(Tt_message m, Tt_pattern p)
                          ecw->externalClient.shell_ready_callback, NULL);
       break;
     }
                          ecw->externalClient.shell_ready_callback, NULL);
       break;
     }
-  
+
   tt_message_destroy (m);
   return TT_CALLBACK_PROCESSED;
 }
   tt_message_destroy (m);
   return TT_CALLBACK_PROCESSED;
 }
@@ -241,7 +247,7 @@ send_tooltalk_handshake (ExternalClientWidget ecw, Window win, char *name)
   tt_message_class_set (m, TT_REQUEST);
   tt_message_arg_add (m, TT_IN, "string", name);
   tt_message_iarg_add (m, TT_IN, "int", win);
   tt_message_class_set (m, TT_REQUEST);
   tt_message_arg_add (m, TT_IN, "string", name);
   tt_message_iarg_add (m, TT_IN, "int", win);
-  tt_message_arg_add (m, TT_OUT, "string", NULL); 
+  tt_message_arg_add (m, TT_OUT, "string", NULL);
   tt_message_user_set (m, 0, (void *)ecw);
   tt_message_callback_add (m, tt_callback);
   if (ecw->externalClient.emacs_procid)
   tt_message_user_set (m, 0, (void *)ecw);
   tt_message_callback_add (m, tt_callback);
   if (ecw->externalClient.emacs_procid)
@@ -261,8 +267,8 @@ static void
 externalClientRealize (Widget w, XtValueMask *vm, XSetWindowAttributes *attrs)
 {
   ExternalClientWidget ecw = (ExternalClientWidget)w;
 externalClientRealize (Widget w, XtValueMask *vm, XSetWindowAttributes *attrs)
 {
   ExternalClientWidget ecw = (ExternalClientWidget)w;
-  
-#ifdef EXTW_USES_MOTIF  
+
+#ifdef EXTW_USES_MOTIF
   (*xmPrimitiveWidgetClass->core_class.realize) (w, vm, attrs);
 #else
   (*coreWidgetClass->core_class.realize) (w, vm, attrs);
   (*xmPrimitiveWidgetClass->core_class.realize) (w, vm, attrs);
 #else
   (*coreWidgetClass->core_class.realize) (w, vm, attrs);
@@ -278,7 +284,7 @@ externalClientRealize (Widget w, XtValueMask *vm, XSetWindowAttributes *attrs)
       XSync (XtDisplay (w), False);
       send_tooltalk_handshake (ecw, XtWindow (w), XtName (w));
     }
       XSync (XtDisplay (w), False);
       send_tooltalk_handshake (ecw, XtWindow (w), XtName (w));
     }
-#endif  
+#endif
 }
 
 
 }
 
 
@@ -314,7 +320,7 @@ remove_ww (Window win)
 {
   struct ww_list *w1, *w2;
   Widget wid = 0;
 {
   struct ww_list *w1, *w2;
   Widget wid = 0;
-  
+
   for (w1=ww_list, w2=w1->next; w2; w1=w2, w2=w2->next)
     if (w2->win == win)
       {
   for (w1=ww_list, w2=w1->next; w2; w1=w2, w2=w2->next)
     if (w2->win == win)
       {
@@ -366,7 +372,7 @@ end_connection (ExternalClientWidget w)
   XSetWindowAttributes xswa;
   XtValueMask mask;
   Widget wid = (Widget) w;
   XSetWindowAttributes xswa;
   XtValueMask mask;
   Widget wid = (Widget) w;
-  
+
   w->externalClient.shell_ready = False;
   XtRemoveEventHandler (wid, w->externalClient.event_mask,
                        FALSE, MaskableEventHandler, (XtPointer) NULL);
   w->externalClient.shell_ready = False;
   XtRemoveEventHandler (wid, w->externalClient.event_mask,
                        FALSE, MaskableEventHandler, (XtPointer) NULL);
@@ -379,7 +385,7 @@ static int
 my_error_handler (Display *display, XErrorEvent *xev)
 {
   Widget wid;
 my_error_handler (Display *display, XErrorEvent *xev)
 {
   Widget wid;
-  
+
   if (xev->error_code != BadWindow)
     goto call_old;
   wid = remove_ww (xev->resourceid);
   if (xev->error_code != BadWindow)
     goto call_old;
   wid = remove_ww (xev->resourceid);
@@ -388,7 +394,7 @@ my_error_handler (Display *display, XErrorEvent *xev)
       end_connection ((ExternalClientWidget) wid);
       return 0;
     }
       end_connection ((ExternalClientWidget) wid);
       return 0;
     }
-  
+
  call_old:
   return error_old_handler (display, xev);
 }
  call_old:
   return error_old_handler (display, xev);
 }
@@ -399,7 +405,7 @@ MaskableEventHandler (Widget wid, XtPointer closure, XEvent *event,
      /* closure and continue_to_dispatch unused */
 {
   ExternalClientWidget w = (ExternalClientWidget) wid;
      /* closure and continue_to_dispatch unused */
 {
   ExternalClientWidget w = (ExternalClientWidget) wid;
-  
+
   if (w->externalClient.shell_ready)
     {
       if (event->type == KeyPress || event->type == KeyRelease ||
   if (w->externalClient.shell_ready)
     {
       if (event->type == KeyPress || event->type == KeyRelease ||
@@ -421,7 +427,7 @@ MaskableEventHandler (Widget wid, XtPointer closure, XEvent *event,
       XSync (XtDisplay (wid), 0); /* make sure that any BadWindow errors
                                     (meaning the server died) get handled
                                     before XSendEvent is called again. */
       XSync (XtDisplay (wid), 0); /* make sure that any BadWindow errors
                                     (meaning the server died) get handled
                                     before XSendEvent is called again. */
-      
+
     }
 }
 
     }
 }
 
@@ -431,7 +437,7 @@ EventHandler (Widget wid, XtPointer closure, XEvent *event,
      /* closure and continue_to_dispatch unused */
 {
   ExternalClientWidget w = (ExternalClientWidget) wid;
      /* closure and continue_to_dispatch unused */
 {
   ExternalClientWidget w = (ExternalClientWidget) wid;
-  
+
   if (w->core.window != event->xany.window)
     {
       XtAppErrorMsg (XtWidgetToApplicationContext (wid),
   if (w->core.window != event->xany.window)
     {
       XtAppErrorMsg (XtWidgetToApplicationContext (wid),
@@ -440,41 +446,41 @@ EventHandler (Widget wid, XtPointer closure, XEvent *event,
                     (String *)NULL, (Cardinal *)NULL);
       return;
     }
                     (String *)NULL, (Cardinal *)NULL);
       return;
     }
-  
+
   if (event->type == ClientMessage &&
       event->xclient.message_type == a_EXTW_NOTIFY &&
       event->xclient.data.l[0] == extw_shell_send)
     switch (event->xclient.data.l[1])
       {
   if (event->type == ClientMessage &&
       event->xclient.message_type == a_EXTW_NOTIFY &&
       event->xclient.data.l[0] == extw_shell_send)
     switch (event->xclient.data.l[1])
       {
-       
+
       case extw_notify_qg:
        /* shell is alive again. */
       case extw_notify_qg:
        /* shell is alive again. */
-       
+
        w->externalClient.dead_shell = False;
        break;
        w->externalClient.dead_shell = False;
        break;
-       
+
       case extw_notify_gm:
        {
          XtWidgetGeometry xwg, xwg_return;
          XtGeometryResult result;
       case extw_notify_gm:
        {
          XtWidgetGeometry xwg, xwg_return;
          XtGeometryResult result;
-         
+
          extw_get_geometry_value (XtDisplay (wid), XtWindow (wid),
                                   a_EXTW_GEOMETRY_MANAGER, &xwg);
          result = XtMakeGeometryRequest (wid, &xwg, &xwg_return);
          extw_get_geometry_value (XtDisplay (wid), XtWindow (wid),
                                   a_EXTW_GEOMETRY_MANAGER, &xwg);
          result = XtMakeGeometryRequest (wid, &xwg, &xwg_return);
-         
+
          extw_send_geometry_value (XtDisplay (wid), XtWindow (wid),
                                    a_EXTW_GEOMETRY_MANAGER, extw_notify_gm,
                                    result == XtGeometryAlmost ? &xwg_return :
                                    NULL, result);
          break;
        }
          extw_send_geometry_value (XtDisplay (wid), XtWindow (wid),
                                    a_EXTW_GEOMETRY_MANAGER, extw_notify_gm,
                                    result == XtGeometryAlmost ? &xwg_return :
                                    NULL, result);
          break;
        }
-       
+
       case extw_notify_init:
        w->externalClient.shell_ready = True;
        w->externalClient.event_window = event->xclient.data.l[2];
        w->externalClient.event_mask = event->xclient.data.l[3];
        add_ww (w->externalClient.event_window, (Widget) w);
       case extw_notify_init:
        w->externalClient.shell_ready = True;
        w->externalClient.event_window = event->xclient.data.l[2];
        w->externalClient.event_mask = event->xclient.data.l[3];
        add_ww (w->externalClient.event_window, (Widget) w);
-       
+
        XtAddEventHandler (wid, w->externalClient.event_mask,
                           FALSE, MaskableEventHandler, (XtPointer) NULL);
 #ifdef EXTW_USES_MOTIF
        XtAddEventHandler (wid, w->externalClient.event_mask,
                           FALSE, MaskableEventHandler, (XtPointer) NULL);
 #ifdef EXTW_USES_MOTIF
@@ -487,12 +493,12 @@ EventHandler (Widget wid, XtPointer closure, XEvent *event,
                0, 0);
 #endif
        break;
                0, 0);
 #endif
        break;
-       
+
       case extw_notify_end:
        end_connection (w);
        remove_ww (w->externalClient.event_window);
        break;
       case extw_notify_end:
        end_connection (w);
        remove_ww (w->externalClient.event_window);
        break;
-       
+
       case extw_notify_set_focus:
 #ifdef EXTW_USES_MOTIF
        XmProcessTraversal (wid, XmTRAVERSE_CURRENT);
       case extw_notify_set_focus:
 #ifdef EXTW_USES_MOTIF
        XmProcessTraversal (wid, XmTRAVERSE_CURRENT);
@@ -500,7 +506,7 @@ EventHandler (Widget wid, XtPointer closure, XEvent *event,
        XtSetKeyboardFocus (wid, None);
 #endif
        break;
        XtSetKeyboardFocus (wid, None);
 #endif
        break;
-       
+
       }
 }
 
       }
 }
 
@@ -508,7 +514,7 @@ static void Destroy(wid)
      Widget wid;
 {
   ExternalClientWidget w = (ExternalClientWidget)wid;
      Widget wid;
 {
   ExternalClientWidget w = (ExternalClientWidget)wid;
-  
+
   NOTIFY(w, extw_notify_end, 0, 0, 0);
 }
 
   NOTIFY(w, extw_notify_end, 0, 0, 0);
 }
 
@@ -521,14 +527,14 @@ static XtGeometryResult QueryGeometry(gw, request, reply)
   unsigned long request_num;
   Display *display = XtDisplay(gw);
   XtWidgetGeometry req = *request; /* don't modify caller's structure */
   unsigned long request_num;
   Display *display = XtDisplay(gw);
   XtWidgetGeometry req = *request; /* don't modify caller's structure */
-  
+
   if (!XtIsRealized((Widget)w) || !w->externalClient.shell_ready)
     return XtGeometryYes;
   if (!XtIsRealized((Widget)w) || !w->externalClient.shell_ready)
     return XtGeometryYes;
-  
+
   if (w->externalClient.dead_shell == TRUE)
     /* The shell is sick. */
     return XtGeometryNo;
   if (w->externalClient.dead_shell == TRUE)
     /* The shell is sick. */
     return XtGeometryNo;
-  
+
   req.sibling = None;
   req.request_mode &= ~CWSibling;
   request_num = NextRequest(display);
   req.sibling = None;
   req.request_mode &= ~CWSibling;
   request_num = NextRequest(display);
@@ -554,7 +560,7 @@ static void ExternalClientFocusIn (Widget w, XEvent *event, String *params,
                                Cardinal *num_params)
 {
   ExternalClientWidget ecw = (ExternalClientWidget) w;
                                Cardinal *num_params)
 {
   ExternalClientWidget ecw = (ExternalClientWidget) w;
-  
+
   if (event->xfocus.send_event && !ecw->externalClient.has_focus) {
     ecw->externalClient.has_focus = True;
     NOTIFY(ecw, extw_notify_focus_in, 0, 0, 0);
   if (event->xfocus.send_event && !ecw->externalClient.has_focus) {
     ecw->externalClient.has_focus = True;
     NOTIFY(ecw, extw_notify_focus_in, 0, 0, 0);
@@ -568,7 +574,7 @@ static void ExternalClientFocusOut (Widget w, XEvent *event, String *params,
                                 Cardinal *num_params)
 {
   ExternalClientWidget ecw = (ExternalClientWidget) w;
                                 Cardinal *num_params)
 {
   ExternalClientWidget ecw = (ExternalClientWidget) w;
-  
+
   if (event->xfocus.send_event && ecw->externalClient.has_focus) {
     ecw->externalClient.has_focus = False;
     NOTIFY(ecw, extw_notify_focus_out, 0, 0, 0);
   if (event->xfocus.send_event && ecw->externalClient.has_focus) {
     ecw->externalClient.has_focus = False;
     NOTIFY(ecw, extw_notify_focus_out, 0, 0, 0);
@@ -582,7 +588,7 @@ static void ExternalClientEnter (Widget w, XEvent *event, String *params,
                              Cardinal *num_params)
 {
   ExternalClientWidget ecw = (ExternalClientWidget) w;
                              Cardinal *num_params)
 {
   ExternalClientWidget ecw = (ExternalClientWidget) w;
-  
+
   if (
 #ifdef EXTW_USES_MOTIF
       _XmGetFocusPolicy (w) != XmEXPLICIT &&
   if (
 #ifdef EXTW_USES_MOTIF
       _XmGetFocusPolicy (w) != XmEXPLICIT &&
@@ -601,7 +607,7 @@ static void ExternalClientLeave (Widget w, XEvent *event, String *params,
                              Cardinal *num_params)
 {
   ExternalClientWidget ecw = (ExternalClientWidget) w;
                              Cardinal *num_params)
 {
   ExternalClientWidget ecw = (ExternalClientWidget) w;
-  
+
   if (
 #ifdef EXTW_USES_MOTIF
       _XmGetFocusPolicy (w) != XmEXPLICIT &&
   if (
 #ifdef EXTW_USES_MOTIF
       _XmGetFocusPolicy (w) != XmEXPLICIT &&
index e1b0fc4..1678954 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA. */
 
 /* Written by Ben Wing. */
 
 
 /* Written by Ben Wing. */
 
-#ifndef _ExternalClient_h
-#define _ExternalClient_h
+#ifndef INCLUDED_ExternalClient_h_
+#define INCLUDED_ExternalClient_h_
 
 #ifndef XtNshellTimeout
 #define XtNshellTimeout "shellTimeout"
 
 #ifndef XtNshellTimeout
 #define XtNshellTimeout "shellTimeout"
@@ -71,4 +71,4 @@ extern WidgetClass externalClientWidgetClass;
 void ExternalClientInitialize   (Display *display, Window win);
 void ExternalClientEventHandler (Display *display, Window win, XEvent *event);
 
 void ExternalClientInitialize   (Display *display, Window win);
 void ExternalClientEventHandler (Display *display, Window win, XEvent *event);
 
-#endif /* _ExternalClient_h */
+#endif /* INCLUDED_ExternalClient_h_ */
index 257d6b2..3bb5878 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA. */
 
 /* Written by Ben Wing. */
 
 
 /* Written by Ben Wing. */
 
-#ifndef _ExternalClientP_h
-#define _ExternalClientP_h
+#ifndef INCLUDED_ExternalClientP_h_
+#define INCLUDED_ExternalClientP_h_
 
 #include "ExternalClient.h"
 #ifdef EXTW_USES_MOTIF
 
 #include "ExternalClient.h"
 #ifdef EXTW_USES_MOTIF
@@ -63,4 +63,4 @@ typedef struct _ExternalClientRec {   /* full instance record */
 
 extern ExternalClientClassRec externalClientClassRec;   /* class pointer */
 
 
 extern ExternalClientClassRec externalClientClassRec;   /* class pointer */
 
-#endif /* _ExternalClientP_h */
+#endif /* INCLUDED_ExternalClientP_h_ */
index 941a10d..9c8a7ed 100644 (file)
@@ -171,19 +171,22 @@ void ExternalShellUnrealize (Widget w);
 
 static XtResource resources[] = {
 #define offset(field) XtOffset(ExternalShellWidget, externalShell.field)
 
 static XtResource resources[] = {
 #define offset(field) XtOffset(ExternalShellWidget, externalShell.field)
-  { XtNwindow, XtCWindow, XtRWindow, sizeof (Window),
-      offset (external_window), XtRImmediate, (XtPointer)0},
-  { XtNclientTimeout, XtCClientTimeout, XtRInt, sizeof(int),
-      offset(client_timeout), XtRImmediate,(XtPointer)DEFAULT_WM_TIMEOUT},
-  { XtNdeadClient, XtCDeadClient, XtRBoolean, sizeof(Boolean),
-      offset(dead_client), XtRImmediate, (XtPointer)False},
+  { XtNwindow, XtCWindow,
+    XtRWindow, sizeof (Window),
+    offset (external_window), XtRImmediate, (XtPointer)0 },
+  { XtNclientTimeout, XtCClientTimeout,
+    XtRInt, sizeof (int),
+    offset(client_timeout), XtRImmediate,(XtPointer)DEFAULT_WM_TIMEOUT },
+  { XtNdeadClient, XtCDeadClient,
+    XtRBoolean, sizeof (Boolean),
+    offset(dead_client), XtRImmediate, (XtPointer)False },
 };
 
 static CompositeClassExtensionRec compositeClassExtRec = {
     NULL,
     NULLQUARK,
     XtCompositeExtensionVersion,
 };
 
 static CompositeClassExtensionRec compositeClassExtRec = {
     NULL,
     NULLQUARK,
     XtCompositeExtensionVersion,
-    sizeof(CompositeClassExtensionRec),
+    sizeof (CompositeClassExtensionRec),
     TRUE,
 };
 
     TRUE,
 };
 
@@ -191,7 +194,7 @@ static ShellClassExtensionRec shellClassExtRec = {
     NULL,
     NULLQUARK,
     XtShellExtensionVersion,
     NULL,
     NULLQUARK,
     XtShellExtensionVersion,
-    sizeof(ShellClassExtensionRec),
+    sizeof (ShellClassExtensionRec),
     ExternalShellRootGeometryManager
 };
 
     ExternalShellRootGeometryManager
 };
 
@@ -201,7 +204,7 @@ ExternalShellClassRec externalShellClassRec = {
        */
     /* superclass        */    (WidgetClass) &shellClassRec,
     /* class_name        */    "ExternalShell",
        */
     /* superclass        */    (WidgetClass) &shellClassRec,
     /* class_name        */    "ExternalShell",
-    /* size              */    sizeof(ExternalShellRec),
+    /* size              */    sizeof (ExternalShellRec),
     /* Class Initializer  */   NULL,
     /* class_part_initialize*/ NULL, /* XtInheritClassPartInitialize, */
     /* Class init'ed ?   */    FALSE,
     /* Class Initializer  */   NULL,
     /* class_part_initialize*/ NULL, /* XtInheritClassPartInitialize, */
     /* Class init'ed ?   */    FALSE,
@@ -221,9 +224,9 @@ ExternalShellClassRec externalShellClassRec = {
     /* resize            */    XtInheritResize,
     /* expose            */    NULL,
     /* set_values        */    NULL, /* XtInheritSetValues, */
     /* resize            */    XtInheritResize,
     /* expose            */    NULL,
     /* set_values        */    NULL, /* XtInheritSetValues, */
-    /* set_values_hook   */    NULL,                   
-    /* set_values_almost  */   XtInheritSetValuesAlmost,  
-    /* get_values_hook   */    NULL,                   
+    /* set_values_hook   */    NULL,
+    /* set_values_almost  */   XtInheritSetValuesAlmost,
+    /* get_values_hook   */    NULL,
     /* accept_focus      */    NULL,
     /* intrinsics version */   XtVersion,
     /* callback offsets          */    NULL,
     /* accept_focus      */    NULL,
     /* intrinsics version */   XtVersion,
     /* callback offsets          */    NULL,
@@ -319,7 +322,7 @@ static void EventHandler(wid, closure, event, continue_to_dispatch)
 
     case extw_notify_focus_in: {
       XFocusChangeEvent evnt;
 
     case extw_notify_focus_in: {
       XFocusChangeEvent evnt;
-      
+
       evnt.type = FocusIn;
       evnt.serial = LastKnownRequestProcessed (XtDisplay (wid));
       evnt.send_event = True;
       evnt.type = FocusIn;
       evnt.serial = LastKnownRequestProcessed (XtDisplay (wid));
       evnt.send_event = True;
@@ -334,10 +337,10 @@ static void EventHandler(wid, closure, event, continue_to_dispatch)
 #endif
       break;
     }
 #endif
       break;
     }
-      
+
     case extw_notify_focus_out: {
       XFocusChangeEvent evnt;
     case extw_notify_focus_out: {
       XFocusChangeEvent evnt;
-      
+
       evnt.type = FocusOut;
       evnt.serial = LastKnownRequestProcessed (XtDisplay (wid));
       evnt.send_event = True;
       evnt.type = FocusOut;
       evnt.serial = LastKnownRequestProcessed (XtDisplay (wid));
       evnt.send_event = True;
@@ -368,11 +371,11 @@ GetGeometry (Widget W, Widget child)
     int x, y, win_gravity = -1, flag;
     XSizeHints hints;
     Window win = w->externalShell.external_window;
     int x, y, win_gravity = -1, flag;
     XSizeHints hints;
     Window win = w->externalShell.external_window;
-    
+
     {
       Window dummy_root;
       unsigned int dummy_bd_width, dummy_depth, width, height;
     {
       Window dummy_root;
       unsigned int dummy_bd_width, dummy_depth, width, height;
-      
+
       /* determine the existing size of the window. */
       XGetGeometry(XtDisplay(W), win, &dummy_root, &x, &y, &width,
                   &height, &dummy_bd_width, &dummy_depth);
       /* determine the existing size of the window. */
       XGetGeometry(XtDisplay(W), win, &dummy_root, &x, &y, &width,
                   &height, &dummy_bd_width, &dummy_depth);
@@ -466,8 +469,8 @@ static void ExternalShellRealize (Widget wid, Mask *vmask,
                            w->core.background_pixmap =
                                (*childP)->core.background_pixmap;
                    } else {
                            w->core.background_pixmap =
                                (*childP)->core.background_pixmap;
                    } else {
-                       attr->background_pixel = 
-                           w->core.background_pixel = 
+                       attr->background_pixel =
+                           w->core.background_pixel =
                                (*childP)->core.background_pixel;
                    }
                    break;
                                (*childP)->core.background_pixel;
                    }
                    break;
index 54c49b9..2d60244 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA. */
 
 /* Written by Ben Wing, September 1993. */
 
 
 /* Written by Ben Wing, September 1993. */
 
-#ifndef _ExternalShell_h
-#define _ExternalShell_h
+#ifndef INCLUDED_ExternalShell_h_
+#define INCLUDED_ExternalShell_h_
 
 #ifndef XtNwindow
 #define XtNwindow "window"
 
 #ifndef XtNwindow
 #define XtNwindow "window"
@@ -54,4 +54,4 @@ void ExternalShellUnrealize(Widget w);
 
 #define is_external_shell(w) (XtClass (w) == externalShellWidgetClass)
 
 
 #define is_external_shell(w) (XtClass (w) == externalShellWidgetClass)
 
-#endif /* _ExternalShell_h */
+#endif /* INCLUDED_ExternalShell_h_ */
index 7fd9f76..fc11eaa 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA. */
 
 /* Written by Ben Wing, September 1993. */
 
 
 /* Written by Ben Wing, September 1993. */
 
-#ifndef _ExternalShellP_h
-#define _ExternalShellP_h
+#ifndef INCLUDED_ExternalShellP_h_
+#define INCLUDED_ExternalShellP_h_
 
 #include "xintrinsic.h"
 #include <X11/ShellP.h>
 
 #include "xintrinsic.h"
 #include <X11/ShellP.h>
@@ -56,4 +56,4 @@ typedef struct _ExternalShellRec {    /* full instance record */
 
 extern ExternalShellClassRec externalShellClassRec;     /* class pointer */
 
 
 extern ExternalShellClassRec externalShellClassRec;     /* class pointer */
 
-#endif /* _ExternalShellP_h */
+#endif /* INCLUDED_ExternalShellP_h_ */
index 21d04e1..ba45163 100644 (file)
@@ -117,7 +117,7 @@ $(lwlib_libs) :
        cd ../lwlib && $(RECURSIVE_MAKE)
 
 x_objs=balloon_help.o balloon-x.o console-x.o device-x.o event-Xt.o frame-x.o\
        cd ../lwlib && $(RECURSIVE_MAKE)
 
 x_objs=balloon_help.o balloon-x.o console-x.o device-x.o event-Xt.o frame-x.o\
- glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o  
+ glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o
 
 #ifdef AIX4
 LIBI18N = -li18n
 
 #ifdef AIX4
 LIBI18N = -li18n
@@ -236,37 +236,37 @@ external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
 #   define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output
 extw_link_beg = $(CC) -shared
 extw_link_mid = -Xlinker -z -Xlinker text -o
 #   define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output
 extw_link_beg = $(CC) -shared
 extw_link_mid = -Xlinker -z -Xlinker text -o
-extw_link_end = 
+extw_link_end =
 ## I cannot figure out how to do shared a.out libraries, so just punt.
 #  elif !defined (LINUX) || defined (__ELF__)
 #   define EXTW_LINK(objs, output) $(CC) -shared objs -o output
 extw_link_beg = $(CC) -shared
 extw_link_mid = -o
 ## I cannot figure out how to do shared a.out libraries, so just punt.
 #  elif !defined (LINUX) || defined (__ELF__)
 #   define EXTW_LINK(objs, output) $(CC) -shared objs -o output
 extw_link_beg = $(CC) -shared
 extw_link_mid = -o
-extw_link_end = 
+extw_link_end =
 #  endif
 # elif defined (USG5)
 #  if defined (IRIX)
 #   define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations objs -o output
 #  endif
 # elif defined (USG5)
 #  if defined (IRIX)
 #   define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations objs -o output
-extw_link_beg = $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations 
-extw_link_mid =  -o 
-extw_link_end = 
+extw_link_beg = $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations
+extw_link_mid =  -o
+extw_link_end =
 #  else /* not IRIX */
 #   define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output
 extw_link_beg = $(CC) -G
 extw_link_mid = -z text -o
 #  else /* not IRIX */
 #   define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output
 extw_link_beg = $(CC) -G
 extw_link_mid = -z text -o
-extw_link_end = 
+extw_link_end =
 #  endif /* not IRIX */
 # else /* not USG5 */
 #  if defined (DEC_ALPHA) && defined (OSF1)
 #   define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES)
 #  endif /* not IRIX */
 # else /* not USG5 */
 #  if defined (DEC_ALPHA) && defined (OSF1)
 #   define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES)
-extw_link_beg = $(LD) $(ldflags) $(ld_switch_shared) -d 
-extw_link_mid = -o 
+extw_link_beg = $(LD) $(ldflags) $(ld_switch_shared) -d
+extw_link_mid = -o
 extw_link_end = $(LIBES)
 #  else /* !(DEC_ALPHA && OSF1) */
 #   define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output
 extw_link_beg = $(LD) -dc
 extw_link_mid = -assert pure-text -o
 extw_link_end = $(LIBES)
 #  else /* !(DEC_ALPHA && OSF1) */
 #   define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output
 extw_link_beg = $(LD) -dc
 extw_link_mid = -assert pure-text -o
-extw_link_end = 
+extw_link_end =
 #  endif /* !(DEC_ALPHA && OSF1) */
 # endif /* not USG5 */
 
 #  endif /* !(DEC_ALPHA && OSF1) */
 # endif /* not USG5 */
 
@@ -351,13 +351,16 @@ ${PROGNAME}: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp
        if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \
        $(RECURSIVE_MAKE) $@;
 #else
        if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \
        $(RECURSIVE_MAKE) $@;
 #else
-       @$(RM) $@
-       -${dump_temacs}
+       @$(RM) $@ xemacs.dmp
+       ${dump_temacs}
+#ifdef PDUMP
+       @mv temacs $@
+#endif
        @echo "Testing for Lisp shadows ..."
        @./${PROGNAME} -batch -vanilla -f list-load-path-shadows
 #endif
 
        @echo "Testing for Lisp shadows ..."
        @./${PROGNAME} -batch -vanilla -f list-load-path-shadows
 #endif
 
-fastdump: temacs 
+fastdump: temacs
        @$(RM) ${PROGNAME} && touch SATISFIED
        -${dump_temacs}
        @./${PROGNAME} -batch -vanilla -f list-load-path-shadows
        @$(RM) ${PROGNAME} && touch SATISFIED
        -${dump_temacs}
        @./${PROGNAME} -batch -vanilla -f list-load-path-shadows
@@ -451,6 +454,9 @@ temacs_link_args=\
 
 temacs: $(temacs_deps)
        $(LD) $(temacs_link_args)
 
 temacs: $(temacs_deps)
        $(LD) $(temacs_link_args)
+#ifdef PDUMP
+       @$(RM) xemacs.dmp
+#endif
 
 .PHONY : run-temacs
 
 
 .PHONY : run-temacs
 
@@ -501,8 +507,13 @@ debug-temacs: temacs
 ##
 ## Purify
 PURIFY_PROG  = purify
 ##
 ## Purify
 PURIFY_PROG  = purify
-PURIFY_FLAGS = -chain-length=32 -ignore-signals=SIGPOLL -threads=yes \
+PURIFY_FLAGS =\
+#ifdef PDUMP
+ -search-mmaps=yes\
+#endif
+ -chain-length=32 -ignore-signals=SIGPOLL -threads=yes\
  -cache-dir=./purecache -always-use-cache-dir=yes
  -cache-dir=./purecache -always-use-cache-dir=yes
+
 PURIFY_LIBS  = -lpthread
 puremacs: $(temacs_deps)
        $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS)
 PURIFY_LIBS  = -lpthread
 puremacs: $(temacs_deps)
        $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS)
index 80f08ad..30b5993 100644 (file)
@@ -77,9 +77,9 @@ Lisp_Object Vpre_abbrev_expand_hook, Qpre_abbrev_expand_hook;
 \f
 struct abbrev_match_mapper_closure {
   struct buffer *buf;
 \f
 struct abbrev_match_mapper_closure {
   struct buffer *buf;
-  struct Lisp_Char_Table *chartab;
+  Lisp_Char_Table *chartab;
   Charcount point, maxlen;
   Charcount point, maxlen;
-  struct Lisp_Symbol *found;
+  Lisp_Symbol *found;
 };
 
 /* For use by abbrev_match(): Match SYMBOL's name against buffer text
 };
 
 /* For use by abbrev_match(): Match SYMBOL's name against buffer text
@@ -91,8 +91,8 @@ abbrev_match_mapper (Lisp_Object symbol, void *arg)
   struct abbrev_match_mapper_closure *closure =
     (struct abbrev_match_mapper_closure *)arg;
   Charcount abbrev_length;
   struct abbrev_match_mapper_closure *closure =
     (struct abbrev_match_mapper_closure *)arg;
   Charcount abbrev_length;
-  struct Lisp_Symbol *sym = XSYMBOL (symbol);
-  struct Lisp_String *abbrev;
+  Lisp_Symbol *sym = XSYMBOL (symbol);
+  Lisp_String *abbrev;
 
   /* symbol_value should be OK here, because abbrevs are not expected
      to contain any SYMBOL_MAGIC stuff.  */
 
   /* symbol_value should be OK here, because abbrevs are not expected
      to contain any SYMBOL_MAGIC stuff.  */
@@ -147,7 +147,7 @@ abbrev_match_mapper (Lisp_Object symbol, void *arg)
 
 /* Match the buffer text against names of symbols in obarray.  Returns
    the matching symbol, or 0 if not found.  */
 
 /* Match the buffer text against names of symbols in obarray.  Returns
    the matching symbol, or 0 if not found.  */
-static struct Lisp_Symbol *
+static Lisp_Symbol *
 abbrev_match (struct buffer *buf, Lisp_Object obarray)
 {
   struct abbrev_match_mapper_closure closure;
 abbrev_match (struct buffer *buf, Lisp_Object obarray)
 {
   struct abbrev_match_mapper_closure closure;
@@ -175,7 +175,7 @@ abbrev_match (struct buffer *buf, Lisp_Object obarray)
    This speed difference should be unnoticeable, though.  I have tested
    the degenerated cases of thousands of abbrevs being defined, and
    abbrev_match() was still fast enough for normal operation.  */
    This speed difference should be unnoticeable, though.  I have tested
    the degenerated cases of thousands of abbrevs being defined, and
    abbrev_match() was still fast enough for normal operation.  */
-static struct Lisp_Symbol *
+static Lisp_Symbol *
 abbrev_oblookup (struct buffer *buf, Lisp_Object obarray)
 {
   Bufpos wordstart, wordend;
 abbrev_oblookup (struct buffer *buf, Lisp_Object obarray)
 {
   Bufpos wordstart, wordend;
@@ -282,10 +282,10 @@ If no abbrev matched, but `pre-abbrev-expand-hook' changed the buffer,
   Bufpos point;                        /* position of point */
   Bufpos abbrev_start;         /* position of abbreviation beginning */
 
   Bufpos point;                        /* position of point */
   Bufpos abbrev_start;         /* position of abbreviation beginning */
 
-  struct Lisp_Symbol *(*fun) (struct buffer *, Lisp_Object);
+  Lisp_Symbol *(*fun) (struct buffer *, Lisp_Object);
 
 
-  struct Lisp_Symbol *abbrev_symbol;
-  struct Lisp_String *abbrev_string;
+  Lisp_Symbol *abbrev_symbol;
+  Lisp_String *abbrev_string;
   Lisp_Object expansion, count, hook;
   Charcount abbrev_length;
   int lccount, uccount;
   Lisp_Object expansion, count, hook;
   Charcount abbrev_length;
   int lccount, uccount;
index ca864f2..0dfc959 100644 (file)
@@ -270,10 +270,7 @@ memory_full (void)
 
 /* like malloc and realloc but check for no memory left, and block input. */
 
 
 /* like malloc and realloc but check for no memory left, and block input. */
 
-#ifdef xmalloc
 #undef xmalloc
 #undef xmalloc
-#endif
-
 void *
 xmalloc (size_t size)
 {
 void *
 xmalloc (size_t size)
 {
@@ -283,10 +280,7 @@ xmalloc (size_t size)
   return val;
 }
 
   return val;
 }
 
-#ifdef xcalloc
 #undef xcalloc
 #undef xcalloc
-#endif
-
 static void *
 xcalloc (size_t nelem, size_t elsize)
 {
 static void *
 xcalloc (size_t nelem, size_t elsize)
 {
@@ -302,10 +296,7 @@ xmalloc_and_zero (size_t size)
   return xcalloc (size, sizeof (char));
 }
 
   return xcalloc (size, sizeof (char));
 }
 
-#ifdef xrealloc
 #undef xrealloc
 #undef xrealloc
-#endif
-
 void *
 xrealloc (void *block, size_t size)
 {
 void *
 xrealloc (void *block, size_t size)
 {
@@ -364,10 +355,7 @@ deadbeef_memory (void *ptr, size_t size)
 
 #endif /* !ERROR_CHECK_GC */
 
 
 #endif /* !ERROR_CHECK_GC */
 
-#ifdef xstrdup
 #undef xstrdup
 #undef xstrdup
-#endif
-
 char *
 xstrdup (CONST char *str)
 {
 char *
 xstrdup (CONST char *str)
 {
@@ -522,6 +510,15 @@ unsigned char lrecord_coding_system;
 #endif
 #endif
 
 #endif
 #endif
 
+#if !((defined HAVE_X_WINDOWS) && \
+      (defined (HAVE_MENUBARS)   || \
+       defined (HAVE_SCROLLBARS) || \
+       defined (HAVE_DIALOGS)    || \
+       defined (HAVE_TOOLBARS)   || \
+       defined (HAVE_WIDGETS)))
+unsigned char lrecord_popup_data;
+#endif
+
 #ifndef HAVE_TOOLBARS
 unsigned char lrecord_toolbar_button;
 #endif
 #ifndef HAVE_TOOLBARS
 unsigned char lrecord_toolbar_button;
 #endif
@@ -580,9 +577,9 @@ dbg_eq (Lisp_Object obj1, Lisp_Object obj2)
    pointer to the actual string data, which is stored in structures of
    type struct string_chars_block.  Each string_chars_block consists
    of a pointer to a struct Lisp_String, followed by the data for that
    pointer to the actual string data, which is stored in structures of
    type struct string_chars_block.  Each string_chars_block consists
    of a pointer to a struct Lisp_String, followed by the data for that
-   string, followed by another pointer to a struct Lisp_String,
-   followed by the data for that string, etc.  At GC time, the data in
-   these blocks is compacted by searching sequentially through all the
+   string, followed by another pointer to a Lisp_String, followed by
+   the data for that string, etc.  At GC time, the data in these
+   blocks is compacted by searching sequentially through all the
    blocks and compressing out any holes created by unmarked strings.
    Strings that are more than a certain size (bigger than the size of
    a string_chars_block, although something like half as big might
    blocks and compressing out any holes created by unmarked strings.
    Strings that are more than a certain size (bigger than the size of
    a string_chars_block, although something like half as big might
@@ -696,8 +693,7 @@ dbg_eq (Lisp_Object obj1, Lisp_Object obj2)
    varies depending on type) of them already on the list.
    This way, we ensure that an object that gets freed will
    remain free for the next 1000 (or whatever) times that
    varies depending on type) of them already on the list.
    This way, we ensure that an object that gets freed will
    remain free for the next 1000 (or whatever) times that
-   an object of that type is allocated.
-*/
+   an object of that type is allocated.  */
 
 #ifndef MALLOC_OVERHEAD
 #ifdef GNU_MALLOC
 
 #ifndef MALLOC_OVERHEAD
 #ifdef GNU_MALLOC
@@ -926,7 +922,7 @@ do { FREE_FIXED_TYPE (type, structtype, ptr);                       \
 /*                        Cons allocation                              */
 /************************************************************************/
 
 /*                        Cons allocation                              */
 /************************************************************************/
 
-DECLARE_FIXED_TYPE_ALLOC (cons, struct Lisp_Cons);
+DECLARE_FIXED_TYPE_ALLOC (cons, Lisp_Cons);
 /* conses are used and freed so often that we set this really high */
 /* #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_cons 20000 */
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_cons 2000
 /* conses are used and freed so often that we set this really high */
 /* #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_cons 20000 */
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_cons 2000
@@ -955,7 +951,8 @@ cons_equal (Lisp_Object ob1, Lisp_Object ob2, int depth)
 }
 
 static const struct lrecord_description cons_description[] = {
 }
 
 static const struct lrecord_description cons_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Cons, car), 2 },
+  { XD_LISP_OBJECT, offsetof (Lisp_Cons, car) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Cons, cdr) },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -969,7 +966,7 @@ DEFINE_BASIC_LRECORD_IMPLEMENTATION ("cons", cons,
                                      */
                                     0,
                                     cons_description,
                                      */
                                     0,
                                     cons_description,
-                                    struct Lisp_Cons);
+                                    Lisp_Cons);
 
 DEFUN ("cons", Fcons, 2, 2, 0, /*
 Create a new cons, give it CAR and CDR as components, and return it.
 
 DEFUN ("cons", Fcons, 2, 2, 0, /*
 Create a new cons, give it CAR and CDR as components, and return it.
@@ -978,9 +975,9 @@ Create a new cons, give it CAR and CDR as components, and return it.
 {
   /* This cannot GC. */
   Lisp_Object val;
 {
   /* This cannot GC. */
   Lisp_Object val;
-  struct Lisp_Cons *c;
+  Lisp_Cons *c;
 
 
-  ALLOCATE_FIXED_TYPE (cons, struct Lisp_Cons, c);
+  ALLOCATE_FIXED_TYPE (cons, Lisp_Cons, c);
   set_lheader_implementation (&(c->lheader), &lrecord_cons);
   XSETCONS (val, c);
   c->car = car;
   set_lheader_implementation (&(c->lheader), &lrecord_cons);
   XSETCONS (val, c);
   c->car = car;
@@ -995,9 +992,9 @@ Lisp_Object
 noseeum_cons (Lisp_Object car, Lisp_Object cdr)
 {
   Lisp_Object val;
 noseeum_cons (Lisp_Object car, Lisp_Object cdr)
 {
   Lisp_Object val;
-  struct Lisp_Cons *c;
+  Lisp_Cons *c;
 
 
-  NOSEEUM_ALLOCATE_FIXED_TYPE (cons, struct Lisp_Cons, c);
+  NOSEEUM_ALLOCATE_FIXED_TYPE (cons, Lisp_Cons, c);
   set_lheader_implementation (&(c->lheader), &lrecord_cons);
   XSETCONS (val, c);
   XCAR (val) = car;
   set_lheader_implementation (&(c->lheader), &lrecord_cons);
   XSETCONS (val, c);
   XCAR (val) = car;
@@ -1100,16 +1097,21 @@ Return a new list of length LENGTH, with each element being INIT.
 
 #ifdef LISP_FLOAT_TYPE
 
 
 #ifdef LISP_FLOAT_TYPE
 
-DECLARE_FIXED_TYPE_ALLOC (float, struct Lisp_Float);
+DECLARE_FIXED_TYPE_ALLOC (float, Lisp_Float);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_float 1000
 
 Lisp_Object
 make_float (double float_value)
 {
   Lisp_Object val;
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_float 1000
 
 Lisp_Object
 make_float (double float_value)
 {
   Lisp_Object val;
-  struct Lisp_Float *f;
+  Lisp_Float *f;
+
+  ALLOCATE_FIXED_TYPE (float, Lisp_Float, f);
+
+  /* Avoid dump-time `uninitialized memory read' purify warnings. */
+  if (sizeof (struct lrecord_header) + sizeof (double) != sizeof (*f))
+    xzero (*f);
 
 
-  ALLOCATE_FIXED_TYPE (float, struct Lisp_Float, f);
   set_lheader_implementation (&(f->lheader), &lrecord_float);
   float_data (f) = float_value;
   XSETFLOAT (val, f);
   set_lheader_implementation (&(f->lheader), &lrecord_float);
   float_data (f) = float_value;
   XSETFLOAT (val, f);
@@ -1160,8 +1162,8 @@ vector_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 }
 
 static const struct lrecord_description vector_description[] = {
 }
 
 static const struct lrecord_description vector_description[] = {
-  { XD_LONG,        offsetof(struct Lisp_Vector, size) },
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Vector, contents), XD_INDIRECT(0, 0) },
+  { XD_LONG,              offsetof (Lisp_Vector, size) },
+  { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Vector, contents), XD_INDIRECT(0, 0) },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -1341,7 +1343,7 @@ vector8 (Lisp_Object obj0, Lisp_Object obj1, Lisp_Object obj2,
 static Lisp_Object all_bit_vectors;
 
 /* #### should allocate `small' bit vectors from a frob-block */
 static Lisp_Object all_bit_vectors;
 
 /* #### should allocate `small' bit vectors from a frob-block */
-static struct Lisp_Bit_Vector *
+static Lisp_Bit_Vector *
 make_bit_vector_internal (size_t sizei)
 {
   size_t num_longs = BIT_VECTOR_LONG_STORAGE (sizei);
 make_bit_vector_internal (size_t sizei)
 {
   size_t num_longs = BIT_VECTOR_LONG_STORAGE (sizei);
@@ -1363,7 +1365,7 @@ make_bit_vector_internal (size_t sizei)
 Lisp_Object
 make_bit_vector (size_t length, Lisp_Object init)
 {
 Lisp_Object
 make_bit_vector (size_t length, Lisp_Object init)
 {
-  struct Lisp_Bit_Vector *p = make_bit_vector_internal (length);
+  Lisp_Bit_Vector *p = make_bit_vector_internal (length);
   size_t num_longs = BIT_VECTOR_LONG_STORAGE (length);
 
   CHECK_BIT (init);
   size_t num_longs = BIT_VECTOR_LONG_STORAGE (length);
 
   CHECK_BIT (init);
@@ -1583,7 +1585,7 @@ This is terrible behavior which is retained for compatibility with old
 /*                         Symbol allocation                           */
 /************************************************************************/
 
 /*                         Symbol allocation                           */
 /************************************************************************/
 
-DECLARE_FIXED_TYPE_ALLOC (symbol, struct Lisp_Symbol);
+DECLARE_FIXED_TYPE_ALLOC (symbol, Lisp_Symbol);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_symbol 1000
 
 DEFUN ("make-symbol", Fmake_symbol, 1, 1, 0, /*
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_symbol 1000
 
 DEFUN ("make-symbol", Fmake_symbol, 1, 1, 0, /*
@@ -1593,11 +1595,11 @@ Its value and function definition are void, and its property list is nil.
        (name))
 {
   Lisp_Object val;
        (name))
 {
   Lisp_Object val;
-  struct Lisp_Symbol *p;
+  Lisp_Symbol *p;
 
   CHECK_STRING (name);
 
 
   CHECK_STRING (name);
 
-  ALLOCATE_FIXED_TYPE (symbol, struct Lisp_Symbol, p);
+  ALLOCATE_FIXED_TYPE (symbol, Lisp_Symbol, p);
   set_lheader_implementation (&(p->lheader), &lrecord_symbol);
   p->name     = XSTRING (name);
   p->plist    = Qnil;
   set_lheader_implementation (&(p->lheader), &lrecord_symbol);
   p->name     = XSTRING (name);
   p->plist    = Qnil;
@@ -1642,16 +1644,16 @@ allocate_extent (void)
 /*                        Event allocation                             */
 /************************************************************************/
 
 /*                        Event allocation                             */
 /************************************************************************/
 
-DECLARE_FIXED_TYPE_ALLOC (event, struct Lisp_Event);
+DECLARE_FIXED_TYPE_ALLOC (event, Lisp_Event);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_event 1000
 
 Lisp_Object
 allocate_event (void)
 {
   Lisp_Object val;
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_event 1000
 
 Lisp_Object
 allocate_event (void)
 {
   Lisp_Object val;
-  struct Lisp_Event *e;
+  Lisp_Event *e;
 
 
-  ALLOCATE_FIXED_TYPE (event, struct Lisp_Event, e);
+  ALLOCATE_FIXED_TYPE (event, Lisp_Event, e);
   set_lheader_implementation (&(e->lheader), &lrecord_event);
 
   XSETEVENT (val, e);
   set_lheader_implementation (&(e->lheader), &lrecord_event);
 
   XSETEVENT (val, e);
@@ -1663,7 +1665,7 @@ allocate_event (void)
 /*                      Marker allocation                              */
 /************************************************************************/
 
 /*                      Marker allocation                              */
 /************************************************************************/
 
-DECLARE_FIXED_TYPE_ALLOC (marker, struct Lisp_Marker);
+DECLARE_FIXED_TYPE_ALLOC (marker, Lisp_Marker);
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_marker 1000
 
 DEFUN ("make-marker", Fmake_marker, 0, 0, 0, /*
 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_marker 1000
 
 DEFUN ("make-marker", Fmake_marker, 0, 0, 0, /*
@@ -1672,9 +1674,9 @@ Return a new marker which does not point at any place.
        ())
 {
   Lisp_Object val;
        ())
 {
   Lisp_Object val;
-  struct Lisp_Marker *p;
+  Lisp_Marker *p;
 
 
-  ALLOCATE_FIXED_TYPE (marker, struct Lisp_Marker, p);
+  ALLOCATE_FIXED_TYPE (marker, Lisp_Marker, p);
   set_lheader_implementation (&(p->lheader), &lrecord_marker);
   p->buffer = 0;
   p->memind = 0;
   set_lheader_implementation (&(p->lheader), &lrecord_marker);
   p->buffer = 0;
   p->memind = 0;
@@ -1689,9 +1691,9 @@ Lisp_Object
 noseeum_make_marker (void)
 {
   Lisp_Object val;
 noseeum_make_marker (void)
 {
   Lisp_Object val;
-  struct Lisp_Marker *p;
+  Lisp_Marker *p;
 
 
-  NOSEEUM_ALLOCATE_FIXED_TYPE (marker, struct Lisp_Marker, p);
+  NOSEEUM_ALLOCATE_FIXED_TYPE (marker, Lisp_Marker, p);
   set_lheader_implementation (&(p->lheader), &lrecord_marker);
   p->buffer = 0;
   p->memind = 0;
   set_lheader_implementation (&(p->lheader), &lrecord_marker);
   p->buffer = 0;
   p->memind = 0;
@@ -1744,9 +1746,9 @@ string_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 }
 
 static const struct lrecord_description string_description[] = {
 }
 
 static const struct lrecord_description string_description[] = {
-  { XD_BYTECOUNT,       offsetof(Lisp_String, size) },
-  { XD_OPAQUE_DATA_PTR, offsetof(Lisp_String, data), XD_INDIRECT(0, 1) },
-  { XD_LISP_OBJECT,     offsetof(Lisp_String, plist), 1 },
+  { XD_BYTECOUNT,       offsetof (Lisp_String, size) },
+  { XD_OPAQUE_DATA_PTR, offsetof (Lisp_String, data), XD_INDIRECT(0, 1) },
+  { XD_LISP_OBJECT,     offsetof (Lisp_String, plist) },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -1930,16 +1932,19 @@ resize_string (Lisp_String *s, Bytecount pos, Bytecount delta)
     {
       if (BIG_STRING_FULLSIZE_P (newfullsize))
        {
     {
       if (BIG_STRING_FULLSIZE_P (newfullsize))
        {
-         /* Both strings are big.  We can just realloc(). */
+         /* Both strings are big.  We can just realloc().
+            But careful!  If the string is shrinking, we have to
+            memmove() _before_ realloc(), and if growing, we have to
+            memmove() _after_ realloc() - otherwise the access is
+            illegal, and we might crash. */
+         Bytecount len = string_length (s) + 1 - pos;
+
+         if (delta < 0 && pos >= 0)
+           memmove (string_data (s) + pos + delta, string_data (s) + pos, len);
          set_string_data (s, (Bufbyte *) xrealloc (string_data (s),
                                                    string_length (s) + delta + 1));
          set_string_data (s, (Bufbyte *) xrealloc (string_data (s),
                                                    string_length (s) + delta + 1));
-         if (pos >= 0)
-           {
-             Bufbyte *addroff = pos + string_data (s);
-
-             memmove (addroff + delta, addroff,
-                      string_length (s) + 1 - pos);
-           }
+         if (delta > 0 && pos >= 0)
+           memmove (string_data (s) + pos + delta, string_data (s) + pos, len);
        }
       else /* String has been demoted from BIG_STRING. */
        {
        }
       else /* String has been demoted from BIG_STRING. */
        {
@@ -2124,13 +2129,13 @@ make_string (CONST Bufbyte *contents, Bytecount length)
    and convert it into a Lisp string. */
 Lisp_Object
 make_ext_string (CONST Extbyte *contents, EMACS_INT length,
    and convert it into a Lisp string. */
 Lisp_Object
 make_ext_string (CONST Extbyte *contents, EMACS_INT length,
-                enum external_data_format fmt)
+                Lisp_Object coding_system)
 {
 {
-  Bufbyte *intstr;
-  Bytecount intlen;
-
-  GET_CHARPTR_INT_DATA_ALLOCA (contents, length, fmt, intstr, intlen);
-  return make_string (intstr, intlen);
+  Lisp_Object string;
+  TO_INTERNAL_FORMAT (DATA, (contents, length),
+                     LISP_STRING, string,
+                     coding_system);
+  return string;
 }
 
 Lisp_Object
 }
 
 Lisp_Object
@@ -2141,10 +2146,11 @@ build_string (CONST char *str)
 }
 
 Lisp_Object
 }
 
 Lisp_Object
-build_ext_string (CONST char *str, enum external_data_format fmt)
+build_ext_string (CONST char *str, Lisp_Object coding_system)
 {
   /* Some strlen's crash and burn if passed null. */
 {
   /* Some strlen's crash and burn if passed null. */
-  return make_ext_string ((CONST Extbyte *) str, (str ? strlen(str) : 0), fmt);
+  return make_ext_string ((CONST Extbyte *) str, (str ? strlen(str) : 0),
+                         coding_system);
 }
 
 Lisp_Object
 }
 
 Lisp_Object
@@ -2406,7 +2412,8 @@ staticpro_nodump (Lisp_Object *varaddress)
 }
 
 /* Not "static" because of linker lossage on some systems */
 }
 
 /* Not "static" because of linker lossage on some systems */
-struct {
+struct
+{
   void *data;
   const struct struct_description *desc;
 } dumpstructvec[200];
   void *data;
   const struct struct_description *desc;
 } dumpstructvec[200];
@@ -2632,7 +2639,7 @@ sweep_lcrecords_1 (struct lcrecord_header **prev, int *used)
            UNMARK_RECORD_HEADER (h);
          num_used++;
          /* total_size += n->implementation->size_in_bytes (h);*/
            UNMARK_RECORD_HEADER (h);
          num_used++;
          /* total_size += n->implementation->size_in_bytes (h);*/
-         /* ### May modify header->next on a C_READONLY lcrecord */
+         /* #### May modify header->next on a C_READONLY lcrecord */
          prev = &(header->next);
          header = *prev;
          tick_lcrecord_stats (h, 0);
          prev = &(header->next);
          header = *prev;
          tick_lcrecord_stats (h, 0);
@@ -2677,7 +2684,7 @@ sweep_bit_vectors_1 (Lisp_Object *prev,
            STRETCHY_STRUCT_SIZEOF (Lisp_Bit_Vector, bits,
                                    BIT_VECTOR_LONG_STORAGE (len));
          num_used++;
            STRETCHY_STRUCT_SIZEOF (Lisp_Bit_Vector, bits,
                                    BIT_VECTOR_LONG_STORAGE (len));
          num_used++;
-         /* ### May modify next on a C_READONLY bitvector */
+         /* #### May modify next on a C_READONLY bitvector */
          prev = &(bit_vector_next (v));
          bit_vector = *prev;
        }
          prev = &(bit_vector_next (v));
          bit_vector = *prev;
        }
@@ -2837,12 +2844,12 @@ sweep_conses (void)
 #define UNMARK_cons(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
 #define ADDITIONAL_FREE_cons(ptr)
 
 #define UNMARK_cons(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
 #define ADDITIONAL_FREE_cons(ptr)
 
-  SWEEP_FIXED_TYPE_BLOCK (cons, struct Lisp_Cons);
+  SWEEP_FIXED_TYPE_BLOCK (cons, Lisp_Cons);
 }
 
 /* Explicitly free a cons cell.  */
 void
 }
 
 /* Explicitly free a cons cell.  */
 void
-free_cons (struct Lisp_Cons *ptr)
+free_cons (Lisp_Cons *ptr)
 {
 #ifdef ERROR_CHECK_GC
   /* If the CAR is not an int, then it will be a pointer, which will
 {
 #ifdef ERROR_CHECK_GC
   /* If the CAR is not an int, then it will be a pointer, which will
@@ -2856,7 +2863,7 @@ free_cons (struct Lisp_Cons *ptr)
 #endif /* ERROR_CHECK_GC */
 
 #ifndef ALLOC_NO_POOLS
 #endif /* ERROR_CHECK_GC */
 
 #ifndef ALLOC_NO_POOLS
-  FREE_FIXED_TYPE_WHEN_NOT_IN_GC (cons, struct Lisp_Cons, ptr);
+  FREE_FIXED_TYPE_WHEN_NOT_IN_GC (cons, Lisp_Cons, ptr);
 #endif /* ALLOC_NO_POOLS */
 }
 
 #endif /* ALLOC_NO_POOLS */
 }
 
@@ -2912,7 +2919,7 @@ sweep_floats (void)
 #define UNMARK_float(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
 #define ADDITIONAL_FREE_float(ptr)
 
 #define UNMARK_float(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
 #define ADDITIONAL_FREE_float(ptr)
 
-  SWEEP_FIXED_TYPE_BLOCK (float, struct Lisp_Float);
+  SWEEP_FIXED_TYPE_BLOCK (float, Lisp_Float);
 }
 #endif /* LISP_FLOAT_TYPE */
 
 }
 #endif /* LISP_FLOAT_TYPE */
 
@@ -2922,7 +2929,7 @@ sweep_symbols (void)
 #define UNMARK_symbol(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
 #define ADDITIONAL_FREE_symbol(ptr)
 
 #define UNMARK_symbol(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
 #define ADDITIONAL_FREE_symbol(ptr)
 
-  SWEEP_FIXED_TYPE_BLOCK (symbol, struct Lisp_Symbol);
+  SWEEP_FIXED_TYPE_BLOCK (symbol, Lisp_Symbol);
 }
 
 static void
 }
 
 static void
@@ -2940,7 +2947,7 @@ sweep_events (void)
 #define UNMARK_event(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
 #define ADDITIONAL_FREE_event(ptr)
 
 #define UNMARK_event(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
 #define ADDITIONAL_FREE_event(ptr)
 
-  SWEEP_FIXED_TYPE_BLOCK (event, struct Lisp_Event);
+  SWEEP_FIXED_TYPE_BLOCK (event, Lisp_Event);
 }
 
 static void
 }
 
 static void
@@ -2953,12 +2960,12 @@ sweep_markers (void)
        unchain_marker (tem);                                           \
      } while (0)
 
        unchain_marker (tem);                                           \
      } while (0)
 
-  SWEEP_FIXED_TYPE_BLOCK (marker, struct Lisp_Marker);
+  SWEEP_FIXED_TYPE_BLOCK (marker, Lisp_Marker);
 }
 
 /* Explicitly free a marker.  */
 void
 }
 
 /* Explicitly free a marker.  */
 void
-free_marker (struct Lisp_Marker *ptr)
+free_marker (Lisp_Marker *ptr)
 {
 #ifdef ERROR_CHECK_GC
   /* Perhaps this will catch freeing an already-freed marker. */
 {
 #ifdef ERROR_CHECK_GC
   /* Perhaps this will catch freeing an already-freed marker. */
@@ -2968,7 +2975,7 @@ free_marker (struct Lisp_Marker *ptr)
 #endif /* ERROR_CHECK_GC */
 
 #ifndef ALLOC_NO_POOLS
 #endif /* ERROR_CHECK_GC */
 
 #ifndef ALLOC_NO_POOLS
-  FREE_FIXED_TYPE_WHEN_NOT_IN_GC (marker, struct Lisp_Marker, ptr);
+  FREE_FIXED_TYPE_WHEN_NOT_IN_GC (marker, Lisp_Marker, ptr);
 #endif /* ALLOC_NO_POOLS */
 }
 \f
 #endif /* ALLOC_NO_POOLS */
 }
 \f
@@ -3264,19 +3271,20 @@ gc_sweep (void)
   {
     int i;
     char *p = pdump_rt_list;
   {
     int i;
     char *p = pdump_rt_list;
-    if(p)
-      for(;;)
+    if (p)
+      for (;;)
        {
          pdump_reloc_table *rt = (pdump_reloc_table *)p;
          p += sizeof (pdump_reloc_table);
        {
          pdump_reloc_table *rt = (pdump_reloc_table *)p;
          p += sizeof (pdump_reloc_table);
-         if (rt->desc) {
-           for (i=0; i<rt->count; i++)
-             {
-               UNMARK_RECORD_HEADER ((struct lrecord_header *)(*(EMACS_INT *)p));
-               p += sizeof (EMACS_INT);
-             }
-         } else
-           break;
+         if (rt->desc)
+           {
+             for (i=0; i<rt->count; i++)
+               {
+                 UNMARK_RECORD_HEADER ((struct lrecord_header *)(*(EMACS_INT *)p));
+                 p += sizeof (EMACS_INT);
+               }
+           } else
+             break;
        }
   }
 #endif
        }
   }
 #endif
@@ -3294,7 +3302,7 @@ disksave_object_finalization (void)
      results of old evaluation don't look like potential problems.
      But first we set some notable variables to nil and do one more GC,
      to turn those strings into garbage.
      results of old evaluation don't look like potential problems.
      But first we set some notable variables to nil and do one more GC,
      to turn those strings into garbage.
-   */
+  */
 
   /* Yeah, this list is pretty ad-hoc... */
   Vprocess_environment = Qnil;
 
   /* Yeah, this list is pretty ad-hoc... */
   Vprocess_environment = Qnil;
@@ -3330,10 +3338,11 @@ disksave_object_finalization (void)
        int count = sizeof (scb->string_chars) - scb->pos;
 
        assert (count >= 0 && count < STRING_CHARS_BLOCK_SIZE);
        int count = sizeof (scb->string_chars) - scb->pos;
 
        assert (count >= 0 && count < STRING_CHARS_BLOCK_SIZE);
-       if (count != 0) {
-         /* from the block's fill ptr to the end */
-         memset ((scb->string_chars + scb->pos), 0, count);
-       }
+       if (count != 0)
+         {
+           /* from the block's fill ptr to the end */
+           memset ((scb->string_chars + scb->pos), 0, count);
+         }
       }
   }
 
       }
   }
 
@@ -3753,6 +3762,7 @@ If this value exceeds `gc-cons-threshold', a garbage collection happens.
   return make_int (consing_since_gc);
 }
 
   return make_int (consing_since_gc);
 }
 
+#if 0
 DEFUN ("memory-limit", Fmemory_limit, 0, 0, "", /*
 Return the address of the last byte Emacs has allocated, divided by 1024.
 This may be helpful in debugging Emacs's memory usage.
 DEFUN ("memory-limit", Fmemory_limit, 0, 0, "", /*
 Return the address of the last byte Emacs has allocated, divided by 1024.
 This may be helpful in debugging Emacs's memory usage.
@@ -3762,7 +3772,7 @@ The value is divided by 1024 to make sure it will fit in a lisp integer.
 {
   return make_int ((EMACS_INT) sbrk (0) / 1024);
 }
 {
   return make_int ((EMACS_INT) sbrk (0) / 1024);
 }
-
+#endif
 
 \f
 int
 
 \f
 int
@@ -4038,7 +4048,9 @@ syms_of_alloc (void)
   DEFSUBR (Fmake_marker);
   DEFSUBR (Fpurecopy);
   DEFSUBR (Fgarbage_collect);
   DEFSUBR (Fmake_marker);
   DEFSUBR (Fpurecopy);
   DEFSUBR (Fgarbage_collect);
+#if 0
   DEFSUBR (Fmemory_limit);
   DEFSUBR (Fmemory_limit);
+#endif
   DEFSUBR (Fconsing_since_gc);
 }
 
   DEFSUBR (Fconsing_since_gc);
 }
 
@@ -4236,8 +4248,11 @@ pdump_make_hash (const void *obj)
 static pdump_entry_list_elmt *
 pdump_get_entry (const void *obj)
 {
 static pdump_entry_list_elmt *
 pdump_get_entry (const void *obj)
 {
-  int pos = pdump_make_hash(obj);
+  int pos = pdump_make_hash (obj);
   pdump_entry_list_elmt *e;
   pdump_entry_list_elmt *e;
+
+  assert (obj != 0);
+
   while ((e = pdump_hash[pos]) != 0)
     {
       if (e->obj == obj)
   while ((e = pdump_hash[pos]) != 0)
     {
       if (e->obj == obj)
@@ -4267,7 +4282,7 @@ pdump_add_entry (pdump_entry_list *list, const void *obj, size_t size, int count
        pos = 0;
     }
 
        pos = 0;
     }
 
-  e = malloc (sizeof (pdump_entry_list_elmt));
+  e = xnew (pdump_entry_list_elmt);
 
   e->next = list->first;
   e->obj = obj;
 
   e->next = list->first;
   e->obj = obj;
@@ -4280,18 +4295,18 @@ pdump_add_entry (pdump_entry_list *list, const void *obj, size_t size, int count
   pdump_hash[pos] = e;
 
   align = align_table[size & 255];
   pdump_hash[pos] = e;
 
   align = align_table[size & 255];
-  if (align<2 && is_lrecord)
+  if (align < 2 && is_lrecord)
     align = 2;
 
     align = 2;
 
-  if(align < list->align)
+  if (align < list->align)
     list->align = align;
 }
 
 static pdump_entry_list *
     list->align = align;
 }
 
 static pdump_entry_list *
-pdump_get_entry_list(const struct struct_description *sdesc)
+pdump_get_entry_list (const struct struct_description *sdesc)
 {
   int i;
 {
   int i;
-  for(i=0; i<pdump_struct_table.count; i++)
+  for (i=0; i<pdump_struct_table.count; i++)
     if (pdump_struct_table.list[i].sdesc == sdesc)
       return &pdump_struct_table.list[i].list;
 
     if (pdump_struct_table.list[i].sdesc == sdesc)
       return &pdump_struct_table.list[i].list;
 
@@ -4301,8 +4316,9 @@ pdump_get_entry_list(const struct struct_description *sdesc)
        pdump_struct_table.size = 10;
       else
        pdump_struct_table.size = pdump_struct_table.size * 2;
        pdump_struct_table.size = 10;
       else
        pdump_struct_table.size = pdump_struct_table.size * 2;
-      pdump_struct_table.list = xrealloc (pdump_struct_table.list,
-                                         pdump_struct_table.size*sizeof (pdump_struct_list_elmt));
+      pdump_struct_table.list = (pdump_struct_list_elmt *)
+       xrealloc (pdump_struct_table.list,
+                 pdump_struct_table.size * sizeof (pdump_struct_list_elmt));
     }
   pdump_struct_table.list[pdump_struct_table.count].list.first = 0;
   pdump_struct_table.list[pdump_struct_table.count].list.align = 8;
     }
   pdump_struct_table.list[pdump_struct_table.count].list.first = 0;
   pdump_struct_table.list[pdump_struct_table.count].list.align = 8;
@@ -4312,8 +4328,9 @@ pdump_get_entry_list(const struct struct_description *sdesc)
   return &pdump_struct_table.list[pdump_struct_table.count++].list;
 }
 
   return &pdump_struct_table.list[pdump_struct_table.count++].list;
 }
 
-static struct {
-  Lisp_Object obj;
+static struct
+{
+  struct lrecord_header *obj;
   int position;
   int offset;
 } backtrace[65536];
   int position;
   int offset;
 } backtrace[65536];
@@ -4331,7 +4348,7 @@ static void pdump_backtrace (void)
       else
        {
          fprintf (stderr, "  - %s (%d, %d)\n",
       else
        {
          fprintf (stderr, "  - %s (%d, %d)\n",
-                  XRECORD_LHEADER_IMPLEMENTATION (backtrace[i].obj)->name,
+                  LHEADER_IMPLEMENTATION (backtrace[i].obj)->name,
                   backtrace[i].position,
                   backtrace[i].offset);
        }
                   backtrace[i].position,
                   backtrace[i].offset);
        }
@@ -4351,24 +4368,25 @@ pdump_get_indirect_count (EMACS_INT code, const struct lrecord_description *ides
   int delta = XD_INDIRECT_DELTA (code);
 
   irdata = ((char *)idata) + idesc[line].offset;
   int delta = XD_INDIRECT_DELTA (code);
 
   irdata = ((char *)idata) + idesc[line].offset;
-  switch (idesc[line].type) {
-  case XD_SIZE_T:
-    count = *(size_t *)irdata;
-    break;
-  case XD_INT:
-    count = *(int *)irdata;
-    break;
-  case XD_LONG:
-    count = *(long *)irdata;
-    break;
-  case XD_BYTECOUNT:
-    count = *(Bytecount *)irdata;
-    break;
-  default:
-    fprintf (stderr, "Unsupported count type : %d (line = %d, code=%ld)\n", idesc[line].type, line, (long)code);
-    pdump_backtrace ();
-    abort ();
-  }
+  switch (idesc[line].type)
+    {
+    case XD_SIZE_T:
+      count = *(size_t *)irdata;
+      break;
+    case XD_INT:
+      count = *(int *)irdata;
+      break;
+    case XD_LONG:
+      count = *(long *)irdata;
+      break;
+    case XD_BYTECOUNT:
+      count = *(Bytecount *)irdata;
+      break;
+    default:
+      fprintf (stderr, "Unsupported count type : %d (line = %d, code=%ld)\n", idesc[line].type, line, (long)code);
+      pdump_backtrace ();
+      abort ();
+    }
   count += delta;
   return count;
 }
   count += delta;
   return count;
 }
@@ -4377,20 +4395,20 @@ static void
 pdump_register_sub (const void *data, const struct lrecord_description *desc, int me)
 {
   int pos;
 pdump_register_sub (const void *data, const struct lrecord_description *desc, int me)
 {
   int pos;
-  const void *rdata;
 
  restart:
   for (pos = 0; desc[pos].type != XD_END; pos++)
     {
 
  restart:
   for (pos = 0; desc[pos].type != XD_END; pos++)
     {
+      const void *rdata = (const char *)data + desc[pos].offset;
+
       backtrace[me].position = pos;
       backtrace[me].offset = desc[pos].offset;
 
       backtrace[me].position = pos;
       backtrace[me].offset = desc[pos].offset;
 
-      rdata = ((const char *)data) + desc[pos].offset;
-      switch(desc[pos].type)
+      switch (desc[pos].type)
        {
        case XD_SPECIFIER_END:
          pos = 0;
        {
        case XD_SPECIFIER_END:
          pos = 0;
-         desc = ((const struct Lisp_Specifier *)data)->methods->extra_description;
+         desc = ((const Lisp_Specifier *)data)->methods->extra_description;
          goto restart;
        case XD_SIZE_T:
        case XD_INT:
          goto restart;
        case XD_SIZE_T:
        case XD_INT:
@@ -4403,7 +4421,7 @@ pdump_register_sub (const void *data, const struct lrecord_description *desc, in
        case XD_OPAQUE_DATA_PTR:
          {
            EMACS_INT count = desc[pos].data1;
        case XD_OPAQUE_DATA_PTR:
          {
            EMACS_INT count = desc[pos].data1;
-           if (XD_IS_INDIRECT(count))
+           if (XD_IS_INDIRECT (count))
              count = pdump_get_indirect_count (count, desc, data);
 
            pdump_add_entry (&pdump_opaque_data_list,
              count = pdump_get_indirect_count (count, desc, data);
 
            pdump_add_entry (&pdump_opaque_data_list,
@@ -4429,18 +4447,29 @@ pdump_register_sub (const void *data, const struct lrecord_description *desc, in
          }
        case XD_LISP_OBJECT:
          {
          }
        case XD_LISP_OBJECT:
          {
-           EMACS_INT count = desc[pos].data1;
+           const Lisp_Object *pobj = (const Lisp_Object *)rdata;
+
+           assert (desc[pos].data1 == 0);
+
+           backtrace[me].offset = (const char *)pobj - (const char *)data;
+           pdump_register_object (*pobj);
+           break;
+         }
+       case XD_LISP_OBJECT_ARRAY:
+         {
            int i;
            int i;
+           EMACS_INT count = desc[pos].data1;
            if (XD_IS_INDIRECT (count))
              count = pdump_get_indirect_count (count, desc, data);
 
            if (XD_IS_INDIRECT (count))
              count = pdump_get_indirect_count (count, desc, data);
 
-           for(i=0;i<count;i++) {
-             const Lisp_Object *pobj = ((const Lisp_Object *)rdata) + i;
-             Lisp_Object dobj = *pobj;
+           for (i = 0; i < count; i++)
+             {
+               const Lisp_Object *pobj = ((const Lisp_Object *)rdata) + i;
+               Lisp_Object dobj = *pobj;
 
 
-             backtrace[me].offset = (const char *)pobj - (const char *)data;
-             pdump_register_object (dobj);
-           }
+               backtrace[me].offset = (const char *)pobj - (const char *)data;
+               pdump_register_object (dobj);
+             }
            break;
          }
        case XD_STRUCT_PTR:
            break;
          }
        case XD_STRUCT_PTR:
@@ -4448,12 +4477,13 @@ pdump_register_sub (const void *data, const struct lrecord_description *desc, in
            EMACS_INT count = desc[pos].data1;
            const struct struct_description *sdesc = desc[pos].data2;
            const char *dobj = *(const char **)rdata;
            EMACS_INT count = desc[pos].data1;
            const struct struct_description *sdesc = desc[pos].data2;
            const char *dobj = *(const char **)rdata;
-           if (dobj) {
-             if (XD_IS_INDIRECT (count))
-               count = pdump_get_indirect_count (count, desc, data);
+           if (dobj)
+             {
+               if (XD_IS_INDIRECT (count))
+                 count = pdump_get_indirect_count (count, desc, data);
 
 
-             pdump_register_struct (dobj, sdesc, count);
-           }
+               pdump_register_struct (dobj, sdesc, count);
+             }
            break;
          }
        default:
            break;
          }
        default:
@@ -4467,12 +4497,19 @@ pdump_register_sub (const void *data, const struct lrecord_description *desc, in
 static void
 pdump_register_object (Lisp_Object obj)
 {
 static void
 pdump_register_object (Lisp_Object obj)
 {
-  if (!obj ||
-      !POINTER_TYPE_P (XTYPE (obj)) ||
-      pdump_get_entry (XRECORD_LHEADER (obj)))
+  struct lrecord_header *objh;
+
+  if (!POINTER_TYPE_P (XTYPE (obj)))
     return;
 
     return;
 
-  if (XRECORD_LHEADER_IMPLEMENTATION (obj)->description)
+  objh = XRECORD_LHEADER (obj);
+  if (!objh)
+    return;
+
+  if (pdump_get_entry (objh))
+    return;
+
+  if (LHEADER_IMPLEMENTATION (objh)->description)
     {
       int me = depth++;
       if (me>65536)
     {
       int me = depth++;
       if (me>65536)
@@ -4480,26 +4517,26 @@ pdump_register_object (Lisp_Object obj)
          fprintf (stderr, "Backtrace overflow, loop ?\n");
          abort ();
        }
          fprintf (stderr, "Backtrace overflow, loop ?\n");
          abort ();
        }
-      backtrace[me].obj = obj;
+      backtrace[me].obj = objh;
       backtrace[me].position = 0;
       backtrace[me].offset = 0;
 
       backtrace[me].position = 0;
       backtrace[me].offset = 0;
 
-      pdump_add_entry (pdump_object_table + XRECORD_LHEADER (obj)->type,
-                      XRECORD_LHEADER (obj),
-                      XRECORD_LHEADER_IMPLEMENTATION (obj)->static_size ?
-                      XRECORD_LHEADER_IMPLEMENTATION (obj)->static_size :
-                      XRECORD_LHEADER_IMPLEMENTATION (obj)->size_in_bytes_method (XRECORD_LHEADER (obj)),
+      pdump_add_entry (pdump_object_table + objh->type,
+                      objh,
+                      LHEADER_IMPLEMENTATION (objh)->static_size ?
+                      LHEADER_IMPLEMENTATION (objh)->static_size :
+                      LHEADER_IMPLEMENTATION (objh)->size_in_bytes_method (objh),
                       1,
                       1);
                       1,
                       1);
-      pdump_register_sub (XRECORD_LHEADER (obj),
-                         XRECORD_LHEADER_IMPLEMENTATION (obj)->description,
+      pdump_register_sub (objh,
+                         LHEADER_IMPLEMENTATION (objh)->description,
                          me);
       --depth;
     }
   else
     {
                          me);
       --depth;
     }
   else
     {
-      pdump_alert_undump_object[XRECORD_LHEADER (obj)->type]++;
-      fprintf (stderr, "Undumpable object type : %s\n", XRECORD_LHEADER_IMPLEMENTATION (obj)->name);
+      pdump_alert_undump_object[objh->type]++;
+      fprintf (stderr, "Undumpable object type : %s\n", LHEADER_IMPLEMENTATION (objh)->name);
       pdump_backtrace ();
     }
 }
       pdump_backtrace ();
     }
 }
@@ -4543,7 +4580,6 @@ pdump_dump_data (pdump_entry_list_elmt *elmt, const struct lrecord_description *
   if (desc)
     {
       int pos, i;
   if (desc)
     {
       int pos, i;
-      void *rdata;
       memcpy (pdump_buf, elmt->obj, size*count);
 
       for (i=0; i<count; i++)
       memcpy (pdump_buf, elmt->obj, size*count);
 
       for (i=0; i<count; i++)
@@ -4552,12 +4588,11 @@ pdump_dump_data (pdump_entry_list_elmt *elmt, const struct lrecord_description *
        restart:
          for (pos = 0; desc[pos].type != XD_END; pos++)
            {
        restart:
          for (pos = 0; desc[pos].type != XD_END; pos++)
            {
-             rdata = cur + desc[pos].offset;
+             void *rdata = cur + desc[pos].offset;
              switch (desc[pos].type)
                {
                case XD_SPECIFIER_END:
              switch (desc[pos].type)
                {
                case XD_SPECIFIER_END:
-                 pos = 0;
-                 desc = ((const struct Lisp_Specifier *)(elmt->obj))->methods->extra_description;
+                 desc = ((const Lisp_Specifier *)(elmt->obj))->methods->extra_description;
                  goto restart;
                case XD_SIZE_T:
                case XD_INT:
                  goto restart;
                case XD_SIZE_T:
                case XD_INT:
@@ -4595,9 +4630,9 @@ pdump_dump_data (pdump_entry_list_elmt *elmt, const struct lrecord_description *
                  {
                    Lisp_Object obj = *(Lisp_Object *)rdata;
                    pdump_entry_list_elmt *elmt1;
                  {
                    Lisp_Object obj = *(Lisp_Object *)rdata;
                    pdump_entry_list_elmt *elmt1;
-                   for(;;)
+                   for (;;)
                      {
                      {
-                       elmt1 = pdump_get_entry (XRECORD_LHEADER(obj));
+                       elmt1 = pdump_get_entry (XRECORD_LHEADER (obj));
                        if (elmt1)
                          break;
                        obj = *(Lisp_Object *)(desc[pos].offset + (char *)(XRECORD_LHEADER (obj)));
                        if (elmt1)
                          break;
                        obj = *(Lisp_Object *)(desc[pos].offset + (char *)(XRECORD_LHEADER (obj)));
@@ -4607,17 +4642,28 @@ pdump_dump_data (pdump_entry_list_elmt *elmt, const struct lrecord_description *
                  }
                case XD_LISP_OBJECT:
                  {
                  }
                case XD_LISP_OBJECT:
                  {
+                   Lisp_Object *pobj = (Lisp_Object *) rdata;
+
+                   assert (desc[pos].data1 == 0);
+
+                   if (POINTER_TYPE_P (XTYPE (*pobj)) && XRECORD_LHEADER (*pobj))
+                     *(EMACS_INT *)pobj =
+                       pdump_get_entry (XRECORD_LHEADER (*pobj))->save_offset;
+                   break;
+                 }
+               case XD_LISP_OBJECT_ARRAY:
+                 {
                    EMACS_INT count = desc[pos].data1;
                    int i;
                    if (XD_IS_INDIRECT (count))
                      count = pdump_get_indirect_count (count, desc, elmt->obj);
 
                    EMACS_INT count = desc[pos].data1;
                    int i;
                    if (XD_IS_INDIRECT (count))
                      count = pdump_get_indirect_count (count, desc, elmt->obj);
 
-                   for(i=0; i<count; i++)
+                   for (i=0; i<count; i++)
                      {
                        Lisp_Object *pobj = ((Lisp_Object *)rdata) + i;
                      {
                        Lisp_Object *pobj = ((Lisp_Object *)rdata) + i;
-                       Lisp_Object dobj = *pobj;
-                       if (dobj && POINTER_TYPE_P (XTYPE (dobj)))
-                         *pobj = pdump_get_entry (XRECORD_LHEADER (dobj))->save_offset;
+                       if (POINTER_TYPE_P (XTYPE (*pobj)) && XRECORD_LHEADER (*pobj))
+                         *(EMACS_INT *)pobj =
+                           pdump_get_entry (XRECORD_LHEADER (*pobj))->save_offset;
                      }
                    break;
                  }
                      }
                    break;
                  }
@@ -4644,61 +4690,74 @@ static void
 pdump_reloc_one (void *data, EMACS_INT delta, const struct lrecord_description *desc)
 {
   int pos;
 pdump_reloc_one (void *data, EMACS_INT delta, const struct lrecord_description *desc)
 {
   int pos;
-  void *rdata;
 
 
-  restart:
+ restart:
   for (pos = 0; desc[pos].type != XD_END; pos++)
     {
   for (pos = 0; desc[pos].type != XD_END; pos++)
     {
-      rdata = ((char *)data) + desc[pos].offset;
-      switch (desc[pos].type) {
-      case XD_SPECIFIER_END:
-       pos = 0;
-       desc = ((const struct Lisp_Specifier *)data)->methods->extra_description;
-       goto restart;
-      case XD_SIZE_T:
-      case XD_INT:
-      case XD_LONG:
-      case XD_BYTECOUNT:
-      case XD_INT_RESET:
-       break;
-      case XD_OPAQUE_DATA_PTR:
-      case XD_C_STRING:
-      case XD_STRUCT_PTR:
-      case XD_LO_LINK:
+      void *rdata = (char *)data + desc[pos].offset;
+      switch (desc[pos].type)
        {
        {
-         EMACS_INT ptr = *(EMACS_INT *)rdata;
-         if (ptr)
-           *(EMACS_INT *)rdata = ptr+delta;
+       case XD_SPECIFIER_END:
+         pos = 0;
+         desc = ((const Lisp_Specifier *)data)->methods->extra_description;
+         goto restart;
+       case XD_SIZE_T:
+       case XD_INT:
+       case XD_LONG:
+       case XD_BYTECOUNT:
+       case XD_INT_RESET:
          break;
          break;
-       }
-      case XD_LISP_OBJECT:
-      case XD_LO_RESET_NIL:
-       {
-         EMACS_INT count = desc[pos].data1;
-         int i;
-         if (XD_IS_INDIRECT (count))
-           count = pdump_get_indirect_count (count, desc, data);
+       case XD_OPAQUE_DATA_PTR:
+       case XD_C_STRING:
+       case XD_STRUCT_PTR:
+       case XD_LO_LINK:
+         {
+           EMACS_INT ptr = *(EMACS_INT *)rdata;
+           if (ptr)
+             *(EMACS_INT *)rdata = ptr+delta;
+           break;
+         }
+       case XD_LISP_OBJECT:
+         {
+           Lisp_Object *pobj = (Lisp_Object *) rdata;
 
 
-         for (i=0; i<count; i++)
-           {
-             Lisp_Object *pobj = ((Lisp_Object *)rdata) + i;
-             Lisp_Object dobj = *pobj;
-             if (dobj && POINTER_TYPE_P (XTYPE (dobj)))
-               *pobj = dobj + delta;
-           }
-         break;
-       }
-      case XD_DOC_STRING:
-       {
-         EMACS_INT str = *(EMACS_INT *)rdata;
-         if (str > 0)
-           *(EMACS_INT *)rdata = str + delta;
-         break;
-       }
-      default:
-       fprintf (stderr, "Unsupported dump type : %d\n", desc[pos].type);
-       abort ();
-      };
+           assert (desc[pos].data1 == 0);
+
+           if (POINTER_TYPE_P (XTYPE (*pobj))
+               && ! EQ (*pobj, Qnull_pointer))
+             XSETOBJ (*pobj, XTYPE (*pobj), (char *) XPNTR (*pobj) + delta);
+
+           break;
+         }
+       case XD_LISP_OBJECT_ARRAY:
+       case XD_LO_RESET_NIL:
+         {
+           EMACS_INT count = desc[pos].data1;
+           int i;
+           if (XD_IS_INDIRECT (count))
+             count = pdump_get_indirect_count (count, desc, data);
+
+           for (i=0; i<count; i++)
+             {
+               Lisp_Object *pobj = (Lisp_Object *) rdata + i;
+
+               if (POINTER_TYPE_P (XTYPE (*pobj))
+                   && ! EQ (*pobj, Qnull_pointer))
+                 XSETOBJ (*pobj, XTYPE (*pobj), (char *) XPNTR (*pobj) + delta);
+             }
+           break;
+         }
+       case XD_DOC_STRING:
+         {
+           EMACS_INT str = *(EMACS_INT *)rdata;
+           if (str > 0)
+             *(EMACS_INT *)rdata = str + delta;
+           break;
+         }
+       default:
+         fprintf (stderr, "Unsupported dump type : %d\n", desc[pos].type);
+         abort ();
+       };
     }
 }
 
     }
 }
 
@@ -4713,7 +4772,7 @@ pdump_allocate_offset (pdump_entry_list_elmt *elmt, const struct lrecord_descrip
 }
 
 static void
 }
 
 static void
-pdump_scan_by_alignement (void (*f)(pdump_entry_list_elmt *, const struct lrecord_description *))
+pdump_scan_by_alignment (void (*f)(pdump_entry_list_elmt *, const struct lrecord_description *))
 {
   int align, i;
   const struct lrecord_description *idesc;
 {
   int align, i;
   const struct lrecord_description *idesc;
@@ -4735,15 +4794,16 @@ pdump_scan_by_alignement (void (*f)(pdump_entry_list_elmt *, const struct lrecor
          }
 
       for (i=0; i<pdump_struct_table.count; i++)
          }
 
       for (i=0; i<pdump_struct_table.count; i++)
-       if (pdump_struct_table.list[i].list.align == align) {
-         elmt = pdump_struct_table.list[i].list.first;
-         idesc = pdump_struct_table.list[i].sdesc->description;
-         while (elmt)
-           {
-             f (elmt, idesc);
-             elmt = elmt->next;
-           }
-       }
+       if (pdump_struct_table.list[i].list.align == align)
+         {
+           elmt = pdump_struct_table.list[i].list.first;
+           idesc = pdump_struct_table.list[i].sdesc->description;
+           while (elmt)
+             {
+               f (elmt, idesc);
+               elmt = elmt->next;
+             }
+         }
 
       elmt = pdump_opaque_data_list.first;
       while (elmt)
 
       elmt = pdump_opaque_data_list.first;
       while (elmt)
@@ -4758,17 +4818,17 @@ pdump_scan_by_alignement (void (*f)(pdump_entry_list_elmt *, const struct lrecor
 static void
 pdump_dump_staticvec (void)
 {
 static void
 pdump_dump_staticvec (void)
 {
-  Lisp_Object *reloc = malloc (staticidx*sizeof (Lisp_Object));
+  EMACS_INT *reloc = xnew_array (EMACS_INT, staticidx);
   int i;
   write (pdump_fd, staticvec, staticidx*sizeof (Lisp_Object *));
 
   int i;
   write (pdump_fd, staticvec, staticidx*sizeof (Lisp_Object *));
 
-  for(i=0; i<staticidx; i++)
+  for (i=0; i<staticidx; i++)
     {
       Lisp_Object obj = *staticvec[i];
     {
       Lisp_Object obj = *staticvec[i];
-      if (obj && POINTER_TYPE_P (XTYPE (obj)))
+      if (POINTER_TYPE_P (XTYPE (obj)))
        reloc[i] = pdump_get_entry (XRECORD_LHEADER (obj))->save_offset;
       else
        reloc[i] = pdump_get_entry (XRECORD_LHEADER (obj))->save_offset;
       else
-       reloc[i] = obj;
+       reloc[i] = *(EMACS_INT *)(staticvec[i]);
     }
   write (pdump_fd, reloc, staticidx*sizeof (Lisp_Object));
   free (reloc);
     }
   write (pdump_fd, reloc, staticidx*sizeof (Lisp_Object));
   free (reloc);
@@ -4784,7 +4844,7 @@ pdump_dump_structvec (void)
       write (pdump_fd, &(dumpstructvec[i].data), sizeof (void *));
       adr = pdump_get_entry (*(void **)(dumpstructvec[i].data))->save_offset;
       write (pdump_fd, &adr, sizeof (adr));
       write (pdump_fd, &(dumpstructvec[i].data), sizeof (void *));
       adr = pdump_get_entry (*(void **)(dumpstructvec[i].data))->save_offset;
       write (pdump_fd, &adr, sizeof (adr));
-  }
+    }
 }
 
 static void
 }
 
 static void
@@ -4803,18 +4863,18 @@ pdump_dump_rtables (void)
   for (i=0; i<=last_lrecord_type_index_assigned; i++)
     {
       elmt = pdump_object_table[i].first;
   for (i=0; i<=last_lrecord_type_index_assigned; i++)
     {
       elmt = pdump_object_table[i].first;
-      if(!elmt)
+      if (!elmt)
        continue;
       rt.desc = lrecord_implementations_table[i]->description;
       rt.count = pdump_object_table[i].count;
       write (pdump_fd, &rt, sizeof (rt));
       while (elmt)
        {
        continue;
       rt.desc = lrecord_implementations_table[i]->description;
       rt.count = pdump_object_table[i].count;
       write (pdump_fd, &rt, sizeof (rt));
       while (elmt)
        {
-         EMACS_INT rdata = pdump_get_entry (XRECORD_LHEADER (elmt->obj))->save_offset;
+         EMACS_INT rdata = pdump_get_entry (elmt->obj)->save_offset;
          write (pdump_fd, &rdata, sizeof (rdata));
          elmt = elmt->next;
        }
          write (pdump_fd, &rdata, sizeof (rdata));
          elmt = elmt->next;
        }
-  }
+    }
 
   rt.desc = 0;
   rt.count = 0;
 
   rt.desc = 0;
   rt.count = 0;
@@ -4828,11 +4888,12 @@ pdump_dump_rtables (void)
       write (pdump_fd, &rt, sizeof (rt));
       while (elmt)
        {
       write (pdump_fd, &rt, sizeof (rt));
       while (elmt)
        {
-         EMACS_INT rdata = pdump_get_entry (XRECORD_LHEADER (elmt->obj))->save_offset;
-         for (j=0; j<elmt->count; j++) {
-           write (pdump_fd, &rdata, sizeof (rdata));
-           rdata += elmt->size;
-         }
+         EMACS_INT rdata = pdump_get_entry (elmt->obj)->save_offset;
+         for (j=0; j<elmt->count; j++)
+           {
+             write (pdump_fd, &rdata, sizeof (rdata));
+             rdata += elmt->size;
+           }
          elmt = elmt->next;
        }
     }
          elmt = elmt->next;
        }
     }
@@ -4851,7 +4912,7 @@ pdump_dump_wired (void)
 
   for (i=0; i<pdump_wireidx; i++)
     {
 
   for (i=0; i<pdump_wireidx; i++)
     {
-      Lisp_Object obj = pdump_get_entry (XRECORD_LHEADER (*(pdump_wirevec[i])))->save_offset;
+      EMACS_INT obj = pdump_get_entry (XRECORD_LHEADER (*(pdump_wirevec[i])))->save_offset;
       write (pdump_fd, &pdump_wirevec[i], sizeof (pdump_wirevec[i]));
       write (pdump_fd, &obj, sizeof (obj));
     }
       write (pdump_fd, &pdump_wirevec[i], sizeof (pdump_wirevec[i]));
       write (pdump_fd, &obj, sizeof (obj));
     }
@@ -4862,7 +4923,7 @@ pdump_dump_wired (void)
       pdump_entry_list_elmt *elmt;
       EMACS_INT res;
 
       pdump_entry_list_elmt *elmt;
       EMACS_INT res;
 
-      for(;;)
+      for (;;)
        {
          const struct lrecord_description *desc;
          int pos;
        {
          const struct lrecord_description *desc;
          int pos;
@@ -4900,8 +4961,7 @@ pdump (void)
   Vterminal_frame   = Qnil;
   Vterminal_device  = Qnil;
 
   Vterminal_frame   = Qnil;
   Vterminal_device  = Qnil;
 
-  pdump_hash = malloc (PDUMP_HASHSIZE*sizeof (pdump_entry_list_elmt *));
-  memset (pdump_hash, 0, PDUMP_HASHSIZE*sizeof (pdump_entry_list_elmt *));
+  pdump_hash = xnew_array_and_zero (pdump_entry_list_elmt *, PDUMP_HASHSIZE);
 
   for (i=0; i<=last_lrecord_type_index_assigned; i++)
     {
 
   for (i=0; i<=last_lrecord_type_index_assigned; i++)
     {
@@ -4924,7 +4984,7 @@ pdump (void)
     pdump_register_object (*pdump_wirevec[i]);
 
   none = 1;
     pdump_register_object (*pdump_wirevec[i]);
 
   none = 1;
-  for(i=0;i<=last_lrecord_type_index_assigned;i++)
+  for (i=0; i<=last_lrecord_type_index_assigned; i++)
     if (pdump_alert_undump_object[i])
       {
        if (none)
     if (pdump_alert_undump_object[i])
       {
        if (none)
@@ -4947,17 +5007,20 @@ pdump (void)
   cur_offset = 256;
   max_size = 0;
 
   cur_offset = 256;
   max_size = 0;
 
-  pdump_scan_by_alignement (pdump_allocate_offset);
+  pdump_scan_by_alignment (pdump_allocate_offset);
   pdump_qnil = pdump_get_entry (XRECORD_LHEADER (Qnil));
 
   pdump_qnil = pdump_get_entry (XRECORD_LHEADER (Qnil));
 
-  pdump_buf = malloc (max_size);
-  pdump_fd = open ("xemacs.dmp", O_WRONLY|O_CREAT|O_TRUNC, 0666);
+  pdump_buf = xmalloc (max_size);
+  /* Avoid use of the `open' macro.  We want the real function. */
+#undef open
+  pdump_fd = open ("xemacs.dmp",
+                  O_WRONLY | O_CREAT | O_TRUNC | OPEN_BINARY, 0666);
   hd.stab_offset = (cur_offset + 3) & ~3;
 
   write (pdump_fd, &hd, sizeof (hd));
   lseek (pdump_fd, 256, SEEK_SET);
 
   hd.stab_offset = (cur_offset + 3) & ~3;
 
   write (pdump_fd, &hd, sizeof (hd));
   lseek (pdump_fd, 256, SEEK_SET);
 
-  pdump_scan_by_alignement (pdump_dump_data);
+  pdump_scan_by_alignment (pdump_dump_data);
 
   lseek (pdump_fd, hd.stab_offset, SEEK_SET);
 
 
   lseek (pdump_fd, hd.stab_offset, SEEK_SET);
 
@@ -4986,9 +5049,11 @@ pdump_load (void)
   EMACS_INT delta;
   EMACS_INT count;
 
   EMACS_INT delta;
   EMACS_INT count;
 
+#define PDUMP_READ(p, type) (p = (char*) (((type *) p) + 1), *((type *) p - 1))
+
   pdump_start = pdump_end = 0;
 
   pdump_start = pdump_end = 0;
 
-  pdump_fd = open ("xemacs.dmp", O_RDONLY);
+  pdump_fd = open ("xemacs.dmp", O_RDONLY | OPEN_BINARY);
   if (pdump_fd<0)
     return 0;
 
   if (pdump_fd<0)
     return 0;
 
@@ -4996,15 +5061,15 @@ pdump_load (void)
   lseek (pdump_fd, 0, SEEK_SET);
 
 #ifdef HAVE_MMAP
   lseek (pdump_fd, 0, SEEK_SET);
 
 #ifdef HAVE_MMAP
-  pdump_start = mmap (0, length, PROT_READ|PROT_WRITE, MAP_PRIVATE, pdump_fd, 0);
+  pdump_start = (char *) mmap (0, length, PROT_READ|PROT_WRITE, MAP_PRIVATE, pdump_fd, 0);
   if (pdump_start == MAP_FAILED)
     pdump_start = 0;
 #endif
 
   if (!pdump_start)
     {
   if (pdump_start == MAP_FAILED)
     pdump_start = 0;
 #endif
 
   if (!pdump_start)
     {
-      pdump_start = (void *)((((unsigned long)(malloc(length+255))) + 255) & ~255);
-      read(pdump_fd, pdump_start, length);
+      pdump_start = (char *)((((unsigned long)(xmalloc(length+255))) + 255) & ~255);
+      read (pdump_fd, pdump_start, length);
     }
 
   close (pdump_fd);
     }
 
   close (pdump_fd);
@@ -5012,7 +5077,7 @@ pdump_load (void)
   pdump_end = pdump_start + length;
 
   staticidx = ((dump_header *)(pdump_start))->nb_staticpro;
   pdump_end = pdump_start + length;
 
   staticidx = ((dump_header *)(pdump_start))->nb_staticpro;
-  last_lrecord_type_index_assigned = ((dump_header *)(pdump_start))->last_type;
+  last_lrecord_type_index_assigned = ((dump_header *)pdump_start)->last_type;
   delta = ((EMACS_INT)pdump_start) - ((dump_header *)pdump_start)->reloc_address;
   p = pdump_start + ((dump_header *)pdump_start)->stab_offset;
 
   delta = ((EMACS_INT)pdump_start) - ((dump_header *)pdump_start)->reloc_address;
   p = pdump_start + ((dump_header *)pdump_start)->stab_offset;
 
@@ -5021,20 +5086,17 @@ pdump_load (void)
   p += staticidx*sizeof (Lisp_Object *);
   for (i=0; i<staticidx; i++)
     {
   p += staticidx*sizeof (Lisp_Object *);
   for (i=0; i<staticidx; i++)
     {
-      Lisp_Object obj = *(Lisp_Object *)p;
-      p += sizeof (Lisp_Object);
-      if (obj && POINTER_TYPE_P (XTYPE (obj)))
-       obj += delta;
+      Lisp_Object obj = PDUMP_READ (p, Lisp_Object);
+      if (POINTER_TYPE_P (XTYPE (obj)))
+       XSETOBJ (obj, XTYPE (obj), (char *) XPNTR (obj) + delta);
       *staticvec[i] = obj;
     }
 
   /* Put back the dumpstructs */
   for (i=0; i<((dump_header *)pdump_start)->nb_structdmp; i++)
     {
       *staticvec[i] = obj;
     }
 
   /* Put back the dumpstructs */
   for (i=0; i<((dump_header *)pdump_start)->nb_structdmp; i++)
     {
-      void **adr = *(void **)p;
-      p += sizeof (void *);
-      *adr = (void *)((*(EMACS_INT *)p) + delta);
-      p += sizeof (EMACS_INT);
+      void **adr = PDUMP_READ (p, void **);
+      *adr = (void *) (PDUMP_READ (p, char *) + delta);
     }
 
   /* Put back the lrecord_implementations_table */
     }
 
   /* Put back the lrecord_implementations_table */
@@ -5042,7 +5104,7 @@ pdump_load (void)
   p += sizeof (lrecord_implementations_table);
 
   /* Give back their numbers to the lrecord implementations */
   p += sizeof (lrecord_implementations_table);
 
   /* Give back their numbers to the lrecord implementations */
-  for (i=0; i<sizeof(lrecord_implementations_table)/sizeof(lrecord_implementations_table[0]); i++)
+  for (i = 0; i < countof (lrecord_implementations_table); i++)
     if (lrecord_implementations_table[i])
       {
        *(lrecord_implementations_table[i]->lrecord_type_index) = i;
     if (lrecord_implementations_table[i])
       {
        *(lrecord_implementations_table[i]->lrecord_type_index) = i;
@@ -5052,63 +5114,54 @@ pdump_load (void)
   /* Do the relocations */
   pdump_rt_list = p;
   count = 2;
   /* Do the relocations */
   pdump_rt_list = p;
   count = 2;
-  for(;;)
+  for (;;)
     {
     {
-      pdump_reloc_table *rt = (pdump_reloc_table *)p;
-      p += sizeof (pdump_reloc_table);
-      if (rt->desc) {
-       for (i=0; i<rt->count; i++)
-         {
-           EMACS_INT adr = delta + *(EMACS_INT *)p;
-           *(EMACS_INT *)p = adr;
-           pdump_reloc_one ((void *)adr, delta, rt->desc);
-           p += sizeof (EMACS_INT);
-         }
-      } else
-       if(!(--count))
-         break;
+      pdump_reloc_table rt = PDUMP_READ (p, pdump_reloc_table);
+      if (rt.desc)
+       {
+         for (i=0; i < rt.count; i++)
+           {
+             char *adr = delta + *(char **)p;
+             *(char **)p = adr;
+             pdump_reloc_one (adr, delta, rt.desc);
+             p += sizeof (char *);
+           }
+       } else
+         if (!(--count))
+           break;
     }
 
   /* Put the pdump_wire variables in place */
     }
 
   /* Put the pdump_wire variables in place */
-  count = *(EMACS_INT *)p;
-  p += sizeof(EMACS_INT);
+  count = PDUMP_READ (p, EMACS_INT);
 
   for (i=0; i<count; i++)
     {
 
   for (i=0; i<count; i++)
     {
-      Lisp_Object *var, obj;
-      var = *(Lisp_Object **)p;
-      p += sizeof (Lisp_Object *);
+      Lisp_Object *var = PDUMP_READ (p, Lisp_Object *);
+      Lisp_Object  obj = PDUMP_READ (p, Lisp_Object);
 
 
-      obj = *(Lisp_Object *)p;
-      p += sizeof (Lisp_Object);
+      if (POINTER_TYPE_P (XTYPE (obj)))
+       XSETOBJ (obj, XTYPE (obj), (char *) XPNTR (obj) + delta);
 
 
-      if (obj && POINTER_TYPE_P (XTYPE (obj)))
-       obj += delta;
       *var = obj;
     }
 
   /* Final cleanups */
   /*   reorganize hash tables */
   p = pdump_rt_list;
       *var = obj;
     }
 
   /* Final cleanups */
   /*   reorganize hash tables */
   p = pdump_rt_list;
-  for(;;)
+  for (;;)
     {
     {
-      pdump_reloc_table *rt = (pdump_reloc_table *)p;
-      p += sizeof (pdump_reloc_table);
-      if (!rt->desc)
+      pdump_reloc_table rt = PDUMP_READ (p, pdump_reloc_table);
+      if (!rt.desc)
        break;
        break;
-      if (rt->desc == hash_table_description)
+      if (rt.desc == hash_table_description)
        {
        {
-         for (i=0; i<rt->count; i++)
-           {
-             struct Lisp_Hash_Table *ht = XHASH_TABLE (*(EMACS_INT *)p);
-             reorganize_hash_table (ht);
-             p += sizeof (EMACS_INT);
-           }
+         for (i=0; i < rt.count; i++)
+           pdump_reorganize_hash_table (PDUMP_READ (p, Lisp_Object));
          break;
        } else
          break;
        } else
-         p += sizeof (EMACS_INT)*rt->count;
+         p += sizeof (Lisp_Object) * rt.count;
     }
   return 1;
 }
 
     }
   return 1;
 }
 
-#endif
+#endif /* PDUMP */
index 126ac25..fba7130 100644 (file)
@@ -30,8 +30,8 @@ Boston, MA 02111-1307, USA.  */
    Mly (probably) or JWZ: Some changes.
  */
 
    Mly (probably) or JWZ: Some changes.
  */
 
-#ifndef _XEMACS_BACKTRACE_H_
-#define _XEMACS_BACKTRACE_H_
+#ifndef INCLUDED_backtrace_h_
+#define INCLUDED_backtrace_h_
 
 #include <setjmp.h>
 
 
 #include <setjmp.h>
 
@@ -158,7 +158,7 @@ extern int specpdl_size;
   Lisp_Object SB_symbol = (symbol_object);                             \
   Lisp_Object SB_newval = (value_object);                              \
   Lisp_Object SB_oldval;                                               \
   Lisp_Object SB_symbol = (symbol_object);                             \
   Lisp_Object SB_newval = (value_object);                              \
   Lisp_Object SB_oldval;                                               \
-  struct Lisp_Symbol *SB_sym;                                          \
+  Lisp_Symbol *SB_sym;                                                 \
                                                                        \
   SPECPDL_RESERVE (1);                                                 \
                                                                        \
                                                                        \
   SPECPDL_RESERVE (1);                                                 \
                                                                        \
@@ -168,7 +168,7 @@ extern int specpdl_size;
                                                                        \
   if (!SYMBOL_VALUE_MAGIC_P (SB_oldval) || UNBOUNDP (SB_oldval))       \
     {                                                                  \
                                                                        \
   if (!SYMBOL_VALUE_MAGIC_P (SB_oldval) || UNBOUNDP (SB_oldval))       \
     {                                                                  \
-      /* ### the following test will go away when we have a constant   \
+      /* #### the following test will go away when we have a constant  \
          symbol magic object */                                                \
       if (EQ (SB_symbol, Qnil) ||                                      \
          EQ (SB_symbol, Qt)   ||                                       \
          symbol magic object */                                                \
       if (EQ (SB_symbol, Qnil) ||                                      \
          EQ (SB_symbol, Qt)   ||                                       \
@@ -197,7 +197,7 @@ extern int specpdl_size;
 #define SPECBIND_FAST_UNSAFE(symbol_object, value_object) do {         \
   Lisp_Object SFU_symbol = (symbol_object);                            \
   Lisp_Object SFU_newval = (value_object);                             \
 #define SPECBIND_FAST_UNSAFE(symbol_object, value_object) do {         \
   Lisp_Object SFU_symbol = (symbol_object);                            \
   Lisp_Object SFU_newval = (value_object);                             \
-  struct Lisp_Symbol *SFU_sym = XSYMBOL (SFU_symbol);                  \
+  Lisp_Symbol *SFU_sym   = XSYMBOL (SFU_symbol);                       \
   Lisp_Object SFU_oldval = SFU_sym->value;                             \
   if (!SYMBOL_VALUE_MAGIC_P (SFU_oldval) || UNBOUNDP (SFU_oldval))     \
     {                                                                  \
   Lisp_Object SFU_oldval = SFU_sym->value;                             \
   if (!SYMBOL_VALUE_MAGIC_P (SFU_oldval) || UNBOUNDP (SFU_oldval))     \
     {                                                                  \
@@ -230,7 +230,7 @@ extern int specpdl_size;
   int UNBIND_TO_count = (count);                       \
   while (specpdl_depth_counter != UNBIND_TO_count)     \
     {                                                  \
   int UNBIND_TO_count = (count);                       \
   while (specpdl_depth_counter != UNBIND_TO_count)     \
     {                                                  \
-      struct Lisp_Symbol *sym;                         \
+      Lisp_Symbol *sym;                                        \
       --specpdl_ptr;                                   \
       --specpdl_depth_counter;                         \
                                                        \
       --specpdl_ptr;                                   \
       --specpdl_depth_counter;                         \
                                                        \
@@ -255,7 +255,7 @@ extern int specpdl_size;
   int UNBIND_TO_count = (count);                       \
   while (specpdl_depth_counter != UNBIND_TO_count)     \
     {                                                  \
   int UNBIND_TO_count = (count);                       \
   while (specpdl_depth_counter != UNBIND_TO_count)     \
     {                                                  \
-      struct Lisp_Symbol *sym;                         \
+      Lisp_Symbol *sym;                                        \
       --specpdl_ptr;                                   \
       --specpdl_depth_counter;                         \
                                                        \
       --specpdl_ptr;                                   \
       --specpdl_depth_counter;                         \
                                                        \
@@ -288,7 +288,7 @@ extern int specpdl_size;
   int UNBIND_TO_count = (count);                               \
   while (specpdl_depth_counter != UNBIND_TO_count)             \
     {                                                          \
   int UNBIND_TO_count = (count);                               \
   while (specpdl_depth_counter != UNBIND_TO_count)             \
     {                                                          \
-      struct Lisp_Symbol *sym;                                 \
+      Lisp_Symbol *sym;                                                \
       --specpdl_ptr;                                           \
       --specpdl_depth_counter;                                 \
                                                                \
       --specpdl_ptr;                                           \
       --specpdl_depth_counter;                                 \
                                                                \
@@ -315,7 +315,7 @@ extern int specpdl_size;
 #define FSET_FAST_UNSAFE(sym, newval) do {                             \
   Lisp_Object FFU_sym = (sym);                                         \
   Lisp_Object FFU_newval = (newval);                                   \
 #define FSET_FAST_UNSAFE(sym, newval) do {                             \
   Lisp_Object FFU_sym = (sym);                                         \
   Lisp_Object FFU_newval = (newval);                                   \
-  struct Lisp_Symbol *FFU_symbol = XSYMBOL (FFU_sym);                  \
+  Lisp_Symbol *FFU_symbol = XSYMBOL (FFU_sym);                         \
   Lisp_Object FFU_oldval = FFU_symbol->value;                          \
   if (!SYMBOL_VALUE_MAGIC_P (FFU_oldval) || UNBOUNDP (FFU_oldval))     \
     FFU_symbol->value = FFU_newval;                                    \
   Lisp_Object FFU_oldval = FFU_symbol->value;                          \
   if (!SYMBOL_VALUE_MAGIC_P (FFU_oldval) || UNBOUNDP (FFU_oldval))     \
     FFU_symbol->value = FFU_newval;                                    \
@@ -323,4 +323,4 @@ extern int specpdl_size;
     Fset (FFU_sym, FFU_newval);                                                \
 } while (0)
 
     Fset (FFU_sym, FFU_newval);                                                \
 } while (0)
 
-#endif /* _XEMACS_BACKTRACE_H_ */
+#endif /* INCLUDED_backtrace_h_ */
index 69e1a82..523ddc3 100644 (file)
@@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA.  */
 
 #include "balloon_help.h"
 
 
 #include "balloon_help.h"
 
-/* ### start of hack */
+/* #### start of hack */
 
 static unsigned long
 alloc_color (Display* dpy, CONST char* colorname, int light)
 
 static unsigned long
 alloc_color (Display* dpy, CONST char* colorname, int light)
@@ -99,7 +99,7 @@ init (void)
     }
 }
 
     }
 }
 
-/* ### end of hack */
+/* #### end of hack */
 
 DEFUN ("show-balloon-help", Fshow_balloon_help, 1, 1, 0, /*
 Show balloon help.
 
 DEFUN ("show-balloon-help", Fshow_balloon_help, 1, 1, 0, /*
 Show balloon help.
index 8e82602..4498ab1 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef BALLOON_HELP_H
-#define BALLOON_HELP_H
+#ifndef INCLUDED_balloon_help_h_
+#define INCLUDED_balloon_help_h_
 
 #include "xintrinsic.h"
 
 
 #include "xintrinsic.h"
 
@@ -33,4 +33,4 @@ void balloon_help_show (CONST char* text);
 void balloon_help_hide (void);
 void balloon_help_move_to_pointer (void);
 
 void balloon_help_hide (void);
 void balloon_help_move_to_pointer (void);
 
-#endif /* BALLOON_HELP_H */
+#endif /* INCLUDED_balloon_help_h_ */
index 955c10e..e66f103 100644 (file)
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.  */
    JWZ (?): 1992?.
  */
 
    JWZ (?): 1992?.
  */
 
-#ifndef _XEMACS_BITMAPS_H_
-#define _XEMACS_BITMAPS_H_
+#ifndef INCLUDED_bitmaps_h_
+#define INCLUDED_bitmaps_h_
 
 #if 0
 /* A gnu, like on the back of the emacs manual, for icons. */
 
 #if 0
 /* A gnu, like on the back of the emacs manual, for icons. */
@@ -164,4 +164,4 @@ static unsigned char default1_stipple_bits[] = {
    0x00, 0x00, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00};
 #endif
 
    0x00, 0x00, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00};
 #endif
 
-#endif /* _XEMACS_BITMAPS_H_ */
+#endif /* INCLUDED_bitmaps_h_ */
index c4f9b24..3d3c9fa 100644 (file)
@@ -26,8 +26,8 @@ Boston, MA 02111-1307, USA.
    Ben Wing: December 1994, for 19.12.
  */
 
    Ben Wing: December 1994, for 19.12.
  */
 
-#ifndef _XEMACS_BLOCKTYPE_H_
-#define _XEMACS_BLOCKTYPE_H_
+#ifndef INCLUDED_blocktype_h_
+#define INCLUDED_blocktype_h_
 
 #define Blocktype_declare(type)                                      \
   type *free;                                                        \
 
 #define Blocktype_declare(type)                                      \
   type *free;                                                        \
@@ -42,4 +42,4 @@ void Blocktype_free (void *bbb, void *el);
   (structype *) Blocktype_newf (sizeof(*(((structype *) NULL)->free)))
 #define Blocktype_alloc(b) (Blocktype_allocf (b), (b)->tempel)
 
   (structype *) Blocktype_newf (sizeof(*(((structype *) NULL)->free)))
 #define Blocktype_alloc(b) (Blocktype_allocf (b), (b)->tempel)
 
-#endif /* _XEMACS_BLOCKTYPE_H_ */
+#endif /* INCLUDED_blocktype_h_ */
index 2bf0429..eef4e80 100644 (file)
@@ -25,8 +25,8 @@ Boston, MA 02111-1307, USA.  */
 /* Sun's standard and GCC's header files leave out prototypes for
    all sorts of functions. */
 
 /* Sun's standard and GCC's header files leave out prototypes for
    all sorts of functions. */
 
-#ifndef _XEMACS_BROKEN_SUN_H_
-#define _XEMACS_BROKEN_SUN_H_
+#ifndef INCLUDED_broken_sun_h_
+#define INCLUDED_broken_sun_h_
 
 #ifdef __GNUC__
 #include <stdlib.h>
 
 #ifdef __GNUC__
 #include <stdlib.h>
@@ -164,4 +164,4 @@ int srandom (int seed);
 
 #endif /* __GNUC__ */
 
 
 #endif /* __GNUC__ */
 
-#endif /* _XEMACS_BROKEN_SUN_H_ */
+#endif /* INCLUDED_broken_sun_h_ */
index 19d6345..b7c18f9 100644 (file)
@@ -74,8 +74,12 @@ Boston, MA 02111-1307, USA.  */
 #include "elhash.h"
 #include "extents.h"
 #include "faces.h"
 #include "elhash.h"
 #include "extents.h"
 #include "faces.h"
+#ifdef FILE_CODING
+#include "file-coding.h"
+#endif
 #include "frame.h"
 #include "insdel.h"
 #include "frame.h"
 #include "insdel.h"
+#include "lstream.h"
 #include "process.h"            /* for kill_buffer_processes */
 #ifdef REGION_CACHE_NEEDS_WORK
 #include "region-cache.h"
 #include "process.h"            /* for kill_buffer_processes */
 #ifdef REGION_CACHE_NEEDS_WORK
 #include "region-cache.h"
@@ -1410,7 +1414,7 @@ buffer.  See `other-buffer' for more information.
   f->buffer_alist = lynk;
 
   va_run_hook_with_args (Qrecord_buffer_hook, 1, buffer);
   f->buffer_alist = lynk;
 
   va_run_hook_with_args (Qrecord_buffer_hook, 1, buffer);
-  
+
   return Qnil;
 }
 
   return Qnil;
 }
 
@@ -1805,6 +1809,342 @@ represents all the memory concerned.
 
 #endif /* MEMORY_USAGE_STATS */
 
 
 #endif /* MEMORY_USAGE_STATS */
 
+\f
+/************************************************************************/
+/*           Implement TO_EXTERNAL_FORMAT, TO_INTERNAL_FORMAT           */
+/************************************************************************/
+
+/* This implementation should probably be elsewhere, but it can't be
+   in file-coding.c since that file is only available if FILE_CODING
+   is defined. */
+#ifdef FILE_CODING
+static int
+coding_system_is_binary (Lisp_Object coding_system)
+{
+  Lisp_Coding_System *cs = XCODING_SYSTEM (coding_system);
+  return
+    (CODING_SYSTEM_TYPE (cs) == CODESYS_NO_CONVERSION &&
+     CODING_SYSTEM_EOL_TYPE (cs) == EOL_LF &&
+     EQ (CODING_SYSTEM_POST_READ_CONVERSION (cs), Qnil) &&
+     EQ (CODING_SYSTEM_PRE_WRITE_CONVERSION (cs), Qnil));
+}
+#else
+#define coding_system_is_binary(coding_system) 1
+#endif
+
+static Extbyte_dynarr *conversion_out_dynarr;
+static Bufbyte_dynarr *conversion_in_dynarr;
+
+static int dfc_convert_to_external_format_in_use;
+static int dfc_convert_to_internal_format_in_use;
+
+static Lisp_Object
+dfc_convert_to_external_format_reset_in_use (Lisp_Object value)
+{
+  dfc_convert_to_external_format_in_use = XINT (value);
+  return Qnil;
+}
+
+static Lisp_Object
+dfc_convert_to_internal_format_reset_in_use (Lisp_Object value)
+{
+  dfc_convert_to_internal_format_in_use = XINT (value);
+  return Qnil;
+}
+
+void
+dfc_convert_to_external_format (dfc_conversion_type source_type,
+                               dfc_conversion_data *source,
+#ifdef FILE_CODING
+                               Lisp_Object coding_system,
+#endif
+                               dfc_conversion_type sink_type,
+                               dfc_conversion_data *sink)
+{
+  int count = specpdl_depth ();
+
+  type_checking_assert
+    (((source_type == DFC_TYPE_DATA) ||
+      (source_type == DFC_TYPE_LISP_LSTREAM && LSTREAMP (source->lisp_object)) ||
+      (source_type == DFC_TYPE_LISP_STRING && STRINGP (source->lisp_object)))
+     &&
+     ((sink_type == DFC_TYPE_DATA) ||
+      (sink_type == DFC_TYPE_LISP_LSTREAM && LSTREAMP (source->lisp_object))));
+
+  if (dfc_convert_to_external_format_in_use != 0)
+    error ("Can't call a conversion function from a conversion function");
+  else
+    dfc_convert_to_external_format_in_use = 1;
+
+  record_unwind_protect (dfc_convert_to_external_format_reset_in_use,
+                        Qzero);
+
+#ifdef FILE_CODING
+  coding_system = Fget_coding_system (coding_system);
+#endif
+
+  Dynarr_reset (conversion_out_dynarr);
+
+  /* Here we optimize in the case where the coding system does no
+     conversion. However, we don't want to optimize in case the source
+     or sink is an lstream, since writing to an lstream can cause a
+     garbage collection, and this could be problematic if the source
+     is a lisp string. */
+  if (source_type != DFC_TYPE_LISP_LSTREAM &&
+      sink_type   != DFC_TYPE_LISP_LSTREAM &&
+      coding_system_is_binary (coding_system))
+    {
+      const Bufbyte *ptr;
+      Bytecount len;
+
+      if (source_type == DFC_TYPE_LISP_STRING)
+       {
+         ptr = XSTRING_DATA   (source->lisp_object);
+         len = XSTRING_LENGTH (source->lisp_object);
+       }
+      else
+       {
+         ptr = (Bufbyte *) source->data.ptr;
+         len = source->data.len;
+       }
+
+#ifdef MULE
+      {
+       const Bufbyte *end;
+       for (end = ptr + len; ptr < end;)
+         {
+           Bufbyte c =
+             (BYTE_ASCII_P (*ptr))                ? *ptr :
+             (*ptr == LEADING_BYTE_CONTROL_1)     ? (*(ptr+1) - 0x20) :
+             (*ptr == LEADING_BYTE_LATIN_ISO8859_1) ? (*(ptr+1)) :
+             '~';
+
+           Dynarr_add (conversion_out_dynarr, (Extbyte) c);
+           INC_CHARPTR (ptr);
+         }
+       bufpos_checking_assert (ptr == end);
+      }
+#else
+      Dynarr_add_many (conversion_out_dynarr, ptr, len);
+#endif
+
+    }
+  else
+    {
+      Lisp_Object streams_to_delete[3];
+      int delete_count = 0;
+      Lisp_Object instream, outstream;
+      Lstream *reader, *writer;
+      struct gcpro gcpro1, gcpro2;
+
+      if (source_type == DFC_TYPE_LISP_LSTREAM)
+       instream = source->lisp_object;
+      else if (source_type == DFC_TYPE_DATA)
+       streams_to_delete[delete_count++] = instream =
+         make_fixed_buffer_input_stream (source->data.ptr, source->data.len);
+      else
+       {
+         type_checking_assert (source_type == DFC_TYPE_LISP_STRING);
+         streams_to_delete[delete_count++] = instream =
+           make_lisp_string_input_stream (source->lisp_object, 0, -1);
+       }
+
+      if (sink_type == DFC_TYPE_LISP_LSTREAM)
+       outstream = sink->lisp_object;
+      else
+       {
+         type_checking_assert (sink_type == DFC_TYPE_DATA);
+         streams_to_delete[delete_count++] = outstream =
+           make_dynarr_output_stream
+           ((unsigned_char_dynarr *) conversion_out_dynarr);
+       }
+
+#ifdef FILE_CODING
+      streams_to_delete[delete_count++] = outstream =
+       make_encoding_output_stream (XLSTREAM (outstream), coding_system);
+#endif
+
+      reader = XLSTREAM (instream);
+      writer = XLSTREAM (outstream);
+      /* decoding_stream will gc-protect outstream */
+      GCPRO2 (instream, outstream);
+
+      while (1)
+        {
+          ssize_t size_in_bytes;
+         char tempbuf[1024]; /* some random amount */
+
+         size_in_bytes = Lstream_read (reader, tempbuf, sizeof (tempbuf));
+
+          if (size_in_bytes == 0)
+            break;
+         else if (size_in_bytes < 0)
+           error ("Error converting to external format");
+
+         size_in_bytes = Lstream_write (writer, tempbuf, size_in_bytes);
+
+         if (size_in_bytes <= 0)
+           error ("Error converting to external format");
+        }
+
+      /* Closing writer will close any stream at the other end of writer. */
+      Lstream_close (writer);
+      Lstream_close (reader);
+      UNGCPRO;
+
+      /* The idea is that this function will create no garbage. */
+      while (delete_count)
+       Lstream_delete (XLSTREAM (streams_to_delete [--delete_count]));
+    }
+
+  unbind_to (count, Qnil);
+
+  if (sink_type != DFC_TYPE_LISP_LSTREAM)
+    {
+      sink->data.len = Dynarr_length (conversion_out_dynarr);
+      Dynarr_add (conversion_out_dynarr, 0);
+      sink->data.ptr = Dynarr_atp (conversion_out_dynarr, 0);
+    }
+}
+
+void
+dfc_convert_to_internal_format (dfc_conversion_type source_type,
+                               dfc_conversion_data *source,
+#ifdef FILE_CODING
+                               Lisp_Object coding_system,
+#endif
+                               dfc_conversion_type sink_type,
+                               dfc_conversion_data *sink)
+{
+  int count = specpdl_depth ();
+
+  type_checking_assert
+    ((source_type == DFC_TYPE_DATA ||
+      source_type == DFC_TYPE_LISP_LSTREAM)
+    &&
+    (sink_type   == DFC_TYPE_DATA ||
+     sink_type   == DFC_TYPE_LISP_LSTREAM));
+
+  if (dfc_convert_to_internal_format_in_use != 0)
+    error ("Can't call a conversion function from a conversion function");
+  else
+    dfc_convert_to_internal_format_in_use = 1;
+
+  record_unwind_protect (dfc_convert_to_internal_format_reset_in_use,
+                        Qzero);
+
+#ifdef FILE_CODING
+  coding_system = Fget_coding_system (coding_system);
+#endif
+
+  Dynarr_reset (conversion_in_dynarr);
+
+  if (source_type != DFC_TYPE_LISP_LSTREAM &&
+      sink_type   != DFC_TYPE_LISP_LSTREAM &&
+      coding_system_is_binary (coding_system))
+    {
+#ifdef MULE
+      const Bufbyte *ptr = (const Bufbyte *) source->data.ptr;
+      Bytecount len = source->data.len;
+      const Bufbyte *end = ptr + len;
+
+      for (; ptr < end; ptr++)
+        {
+          Extbyte c = *ptr;
+
+         if (BYTE_ASCII_P (c))
+           Dynarr_add (conversion_in_dynarr, c);
+         else if (BYTE_C1_P (c))
+           {
+             Dynarr_add (conversion_in_dynarr, LEADING_BYTE_CONTROL_1);
+             Dynarr_add (conversion_in_dynarr, c + 0x20);
+           }
+         else
+           {
+             Dynarr_add (conversion_in_dynarr, LEADING_BYTE_LATIN_ISO8859_1);
+             Dynarr_add (conversion_in_dynarr, c);
+           }
+        }
+#else
+      Dynarr_add_many (conversion_in_dynarr, source->data.ptr, source->data.len);
+#endif
+    }
+  else
+    {
+      Lisp_Object streams_to_delete[3];
+      int delete_count = 0;
+      Lisp_Object instream, outstream;
+      Lstream *reader, *writer;
+      struct gcpro gcpro1, gcpro2;
+
+      if (source_type == DFC_TYPE_LISP_LSTREAM)
+       instream = source->lisp_object;
+      else
+       {
+         type_checking_assert (source_type == DFC_TYPE_DATA);
+         streams_to_delete[delete_count++] = instream =
+           make_fixed_buffer_input_stream (source->data.ptr, source->data.len);
+       }
+
+      if (sink_type == DFC_TYPE_LISP_LSTREAM)
+       outstream = sink->lisp_object;
+      else
+       {
+         type_checking_assert (sink_type == DFC_TYPE_DATA);
+         streams_to_delete[delete_count++] = outstream =
+           make_dynarr_output_stream
+           ((unsigned_char_dynarr *) conversion_in_dynarr);
+       }
+
+#ifdef FILE_CODING
+      streams_to_delete[delete_count++] = outstream =
+       make_decoding_output_stream (XLSTREAM (outstream), coding_system);
+#endif
+
+      reader = XLSTREAM (instream);
+      writer = XLSTREAM (outstream);
+      /* outstream will gc-protect its sink stream, if necessary */
+      GCPRO2 (instream, outstream);
+
+      while (1)
+        {
+          ssize_t size_in_bytes;
+         char tempbuf[1024]; /* some random amount */
+
+         size_in_bytes = Lstream_read (reader, tempbuf, sizeof (tempbuf));
+
+          if (size_in_bytes == 0)
+            break;
+         else if (size_in_bytes < 0)
+           error ("Error converting to internal format");
+
+         size_in_bytes = Lstream_write (writer, tempbuf, size_in_bytes);
+
+         if (size_in_bytes <= 0)
+           error ("Error converting to internal format");
+        }
+
+      /* Closing writer will close any stream at the other end of writer. */
+      Lstream_close (writer);
+      Lstream_close (reader);
+      UNGCPRO;
+
+      /* The idea is that this function will create no garbage. */
+      while (delete_count)
+       Lstream_delete (XLSTREAM (streams_to_delete [--delete_count]));
+    }
+
+  unbind_to (count, Qnil);
+
+  if (sink_type != DFC_TYPE_LISP_LSTREAM)
+    {
+      sink->data.len = Dynarr_length (conversion_in_dynarr);
+      Dynarr_add (conversion_in_dynarr, 0); /* remember to zero-terminate! */
+      sink->data.ptr = Dynarr_atp (conversion_in_dynarr, 0);
+    }
+}
+\f
+
 void
 syms_of_buffer (void)
 {
 void
 syms_of_buffer (void)
 {
@@ -1879,6 +2219,9 @@ syms_of_buffer (void)
 void
 reinit_vars_of_buffer (void)
 {
 void
 reinit_vars_of_buffer (void)
 {
+  conversion_in_dynarr  = Dynarr_new (Bufbyte);
+  conversion_out_dynarr = Dynarr_new (Extbyte);
+
   staticpro_nodump (&Vbuffer_alist);
   Vbuffer_alist = Qnil;
   current_buffer = 0;
   staticpro_nodump (&Vbuffer_alist);
   Vbuffer_alist = Qnil;
   current_buffer = 0;
@@ -2233,7 +2576,7 @@ reinit_complex_vars_of_buffer (void)
 
 
 static const struct lrecord_description buffer_slots_description_1[] = {
 
 
 static const struct lrecord_description buffer_slots_description_1[] = {
-  { XD_LISP_OBJECT, 0, BUFFER_SLOTS_COUNT },
+  { XD_LISP_OBJECT_ARRAY, 0, BUFFER_SLOTS_COUNT },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -2255,7 +2598,7 @@ complex_vars_of_buffer (void)
   buffer_local_symbols_saved_slots = &syms->BUFFER_SLOTS_FIRST_NAME;
   dumpstruct (&buffer_defaults_saved_slots,      &buffer_slots_description);
   dumpstruct (&buffer_local_symbols_saved_slots, &buffer_slots_description);
   buffer_local_symbols_saved_slots = &syms->BUFFER_SLOTS_FIRST_NAME;
   dumpstruct (&buffer_defaults_saved_slots,      &buffer_slots_description);
   dumpstruct (&buffer_local_symbols_saved_slots, &buffer_slots_description);
-  
+
   DEFVAR_BUFFER_DEFAULTS ("default-modeline-format", modeline_format /*
 Default value of `modeline-format' for buffers that don't override it.
 This is the same as (default-value 'modeline-format).
   DEFVAR_BUFFER_DEFAULTS ("default-modeline-format", modeline_format /*
 Default value of `modeline-format' for buffers that don't override it.
 This is the same as (default-value 'modeline-format).
@@ -2748,19 +3091,22 @@ handled:
 
 /* Is PWD another name for `.' ? */
 static int
 
 /* Is PWD another name for `.' ? */
 static int
-directory_is_current_directory (char *pwd)
+directory_is_current_directory (Extbyte *pwd)
 {
   Bufbyte *pwd_internal;
 {
   Bufbyte *pwd_internal;
+  Bytecount pwd_internal_len;
   struct stat dotstat, pwdstat;
 
   struct stat dotstat, pwdstat;
 
-  GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA (pwd, pwd_internal);
+  TO_INTERNAL_FORMAT (DATA, (pwd, strlen ((char *)pwd) + 1),
+                     ALLOCA, (pwd_internal, pwd_internal_len),
+                     Qfile_name);
 
   return (IS_DIRECTORY_SEP (*pwd_internal)
          && stat ((char *) pwd_internal, &pwdstat) == 0
          && stat (".", &dotstat) == 0
          && dotstat.st_ino == pwdstat.st_ino
          && dotstat.st_dev == pwdstat.st_dev
 
   return (IS_DIRECTORY_SEP (*pwd_internal)
          && stat ((char *) pwd_internal, &pwdstat) == 0
          && stat (".", &dotstat) == 0
          && dotstat.st_ino == pwdstat.st_ino
          && dotstat.st_dev == pwdstat.st_dev
-         && (int) strlen ((char *) pwd_internal) < MAXPATHLEN);
+         && pwd_internal_len < MAXPATHLEN);
 }
 
 void
 }
 
 void
@@ -2768,15 +3114,15 @@ init_initial_directory (void)
 {
   /* This function can GC */
 
 {
   /* This function can GC */
 
-  char *pwd;
+  Extbyte *pwd;
 
   initial_directory[0] = 0;
 
   /* If PWD is accurate, use it instead of calling getcwd.  This is faster
      when PWD is right, and may avoid a fatal error.  */
 
   initial_directory[0] = 0;
 
   /* If PWD is accurate, use it instead of calling getcwd.  This is faster
      when PWD is right, and may avoid a fatal error.  */
-  if ((pwd = getenv ("PWD")) != NULL
+  if ((pwd = (Extbyte *) getenv ("PWD")) != NULL
       && directory_is_current_directory (pwd))
       && directory_is_current_directory (pwd))
-    strcpy (initial_directory, pwd);
+    strcpy (initial_directory, (char *) pwd);
   else if (getcwd (initial_directory, MAXPATHLEN) == NULL)
     fatal ("`getcwd' failed: %s\n", strerror (errno));
 
   else if (getcwd (initial_directory, MAXPATHLEN) == NULL)
     fatal ("`getcwd' failed: %s\n", strerror (errno));
 
@@ -2814,7 +3160,7 @@ init_buffer (void)
   Fset_buffer (Fget_buffer_create (QSscratch));
 
   current_buffer->directory =
   Fset_buffer (Fget_buffer_create (QSscratch));
 
   current_buffer->directory =
-    build_ext_string (initial_directory, FORMAT_FILENAME);
+    build_ext_string (initial_directory, Qfile_name);
 
 #if 0 /* FSFmacs */
   /* #### is this correct? */
 
 #if 0 /* FSFmacs */
   /* #### is this correct? */
index f533083..ae4de31 100644 (file)
@@ -29,8 +29,8 @@ Boston, MA 02111-1307, USA.  */
    Ben Wing: almost completely rewritten for Mule, 19.12.
  */
 
    Ben Wing: almost completely rewritten for Mule, 19.12.
  */
 
-#ifndef _XEMACS_BUFFER_H_
-#define _XEMACS_BUFFER_H_
+#ifndef INCLUDED_buffer_h_
+#define INCLUDED_buffer_h_
 
 #ifdef MULE
 #include "mule-charset.h"
 
 #ifdef MULE
 #include "mule-charset.h"
@@ -166,7 +166,7 @@ struct buffer
   /* The markers that refer to this buffer.  This is actually a single
      marker -- successive elements in its marker `chain' are the other
      markers referring to this buffer */
   /* The markers that refer to this buffer.  This is actually a single
      marker -- successive elements in its marker `chain' are the other
      markers referring to this buffer */
-  struct Lisp_Marker *markers;
+  Lisp_Marker *markers;
 
   /* The buffer's extent info.  This is its own type, an extent-info
      object (done this way for ease in marking / finalizing). */
 
   /* The buffer's extent info.  This is its own type, an extent-info
      object (done this way for ease in marking / finalizing). */
@@ -1038,304 +1038,270 @@ Bufpos bytind_to_bufpos (struct buffer *buf, Bytind x);
 #define BUF_CHARPTR_COPY_CHAR(buf, pos, str) \
   BI_BUF_CHARPTR_COPY_CHAR (buf, bufpos_to_bytind (buf, pos), str)
 
 #define BUF_CHARPTR_COPY_CHAR(buf, pos, str) \
   BI_BUF_CHARPTR_COPY_CHAR (buf, bufpos_to_bytind (buf, pos), str)
 
-
-
 \f
 /************************************************************************/
 \f
 /************************************************************************/
-/*                                                                     */
-/*                 working with externally-formatted data              */
-/*                                                                     */
+/*                                                                      */
+/*         Converting between internal and external format              */
+/*                                                                      */
 /************************************************************************/
 /************************************************************************/
+/*
+  All client code should use only the two macros
+
+  TO_EXTERNAL_FORMAT (source_type, source, sink_type, sink, coding_system)
+  TO_INTERNAL_FORMAT (source_type, source, sink_type, sink, coding_system)
+
+  Typical use is
+
+  TO_EXTERNAL_FORMAT (DATA, (ptr, len),
+                      LISP_BUFFER, buffer,
+                     Qfile_name);
+
+  The source or sink can be specified in one of these ways:
+
+  DATA,   (ptr, len),    // input data is a fixed buffer of size len
+  ALLOCA, (ptr, len),    // output data is in a alloca()ed buffer of size len
+  MALLOC, (ptr, len),    // output data is in a malloc()ed buffer of size len
+  C_STRING_ALLOCA, ptr,  // equivalent to ALLOCA (ptr, len_ignored) on output.
+  C_STRING_MALLOC, ptr,  // equivalent to MALLOC (ptr, len_ignored) on output.
+  C_STRING,     ptr,     // equivalent to DATA, (ptr, strlen (ptr) + 1) on input
+  LISP_STRING,  string,  // input or output is a Lisp_Object of type string
+  LISP_BUFFER,  buffer,  // output is written to (point) in lisp buffer
+  LISP_LSTREAM, lstream, // input or output is a Lisp_Object of type lstream
+  LISP_OPAQUE,  object,  // input or output is a Lisp_Object of type opaque
+
+  When specifying the sink, use lvalues, since the macro will assign to them,
+  except when the sink is an lstream or a lisp buffer.
+
+  The macros accept the kinds of sources and sinks appropriate for
+  internal and external data representation.  See the type_checking_assert
+  macros below for the actual allowed types.
+
+  Since some sources and sinks use one argument (a Lisp_Object) to
+  specify them, while others take a (pointer, length) pair, we use
+  some C preprocessor trickery to allow pair arguments to be specified
+  by parenthesizing them, as in the examples above.
+
+  Anything prefixed by dfc_ (`data format conversion') is private.
+  They are only used to implement these macros.
+
+  Using C_STRING* is appropriate for using with external APIs that take
+  null-terminated strings.  For internal data, we should try to be
+  '\0'-clean - i.e. allow arbitrary data to contain embedded '\0'.
+
+  Sometime in the future we might allow output to C_STRING_ALLOCA or
+  C_STRING_MALLOC _only_ with TO_EXTERNAL_FORMAT(), not
+  TO_INTERNAL_FORMAT().  */
+
+#define TO_EXTERNAL_FORMAT(source_type, source, sink_type, sink, coding_system)        \
+do {                                                                           \
+  dfc_conversion_type dfc_simplified_source_type;                              \
+  dfc_conversion_type dfc_simplified_sink_type;                                        \
+  dfc_conversion_data dfc_source;                                              \
+  dfc_conversion_data dfc_sink;                                                        \
+                                                                               \
+  type_checking_assert                                                         \
+    ((DFC_TYPE_##source_type == DFC_TYPE_DATA ||                               \
+      DFC_TYPE_##source_type == DFC_TYPE_C_STRING ||                           \
+      DFC_TYPE_##source_type == DFC_TYPE_LISP_STRING ||                                \
+      DFC_TYPE_##source_type == DFC_TYPE_LISP_OPAQUE ||                                \
+      DFC_TYPE_##source_type == DFC_TYPE_LISP_LSTREAM)                         \
+    &&                                                                         \
+     (DFC_TYPE_##sink_type == DFC_TYPE_ALLOCA ||                               \
+      DFC_TYPE_##sink_type == DFC_TYPE_MALLOC ||                               \
+      DFC_TYPE_##sink_type == DFC_TYPE_C_STRING_ALLOCA ||                      \
+      DFC_TYPE_##sink_type == DFC_TYPE_C_STRING_MALLOC ||                      \
+      DFC_TYPE_##sink_type == DFC_TYPE_LISP_LSTREAM ||                         \
+      DFC_TYPE_##sink_type == DFC_TYPE_LISP_OPAQUE));                          \
+                                                                               \
+  DFC_SOURCE_##source_type##_TO_ARGS (source);                                 \
+  DFC_SINK_##sink_type##_TO_ARGS     (sink);                                   \
+                                                                               \
+  DFC_CONVERT_TO_EXTERNAL_FORMAT (dfc_simplified_source_type, &dfc_source,     \
+                                 coding_system,                                \
+                                 dfc_simplified_sink_type,   &dfc_sink);       \
+                                                                               \
+  DFC_##sink_type##_USE_CONVERTED_DATA (sink);                                 \
+} while (0)
 
 
-/* Sometimes strings need to be converted into one or another
-   external format, for passing to a library function. (Note
-   that we encapsulate and automatically convert the arguments
-   of some functions, but not others.) At times this conversion
-   also has to go the other way -- i.e. when we get external-
-   format strings back from a library function.
-*/
+#define TO_INTERNAL_FORMAT(source_type, source, sink_type, sink, coding_system)        \
+do {                                                                           \
+  dfc_conversion_type dfc_simplified_source_type;                              \
+  dfc_conversion_type dfc_simplified_sink_type;                                        \
+  dfc_conversion_data dfc_source;                                              \
+  dfc_conversion_data dfc_sink;                                                        \
+                                                                               \
+  type_checking_assert                                                         \
+    ((DFC_TYPE_##source_type == DFC_TYPE_DATA ||                               \
+      DFC_TYPE_##source_type == DFC_TYPE_C_STRING ||                           \
+      DFC_TYPE_##source_type == DFC_TYPE_LISP_OPAQUE ||                                \
+      DFC_TYPE_##source_type == DFC_TYPE_LISP_LSTREAM)                         \
+     &&                                                                                \
+     (DFC_TYPE_##sink_type == DFC_TYPE_ALLOCA ||                               \
+      DFC_TYPE_##sink_type == DFC_TYPE_MALLOC ||                               \
+      DFC_TYPE_##sink_type == DFC_TYPE_C_STRING_ALLOCA ||                      \
+      DFC_TYPE_##sink_type == DFC_TYPE_C_STRING_MALLOC ||                      \
+      DFC_TYPE_##sink_type == DFC_TYPE_LISP_STRING ||                          \
+      DFC_TYPE_##sink_type == DFC_TYPE_LISP_LSTREAM ||                         \
+      DFC_TYPE_##sink_type == DFC_TYPE_LISP_BUFFER));                          \
+                                                                               \
+  DFC_SOURCE_##source_type##_TO_ARGS (source);                                 \
+  DFC_SINK_##sink_type##_TO_ARGS     (sink);                                   \
+                                                                               \
+  DFC_CONVERT_TO_INTERNAL_FORMAT (dfc_simplified_source_type, &dfc_source,     \
+                                 coding_system,                                \
+                                 dfc_simplified_sink_type,   &dfc_sink);       \
+                                                                               \
+  DFC_##sink_type##_USE_CONVERTED_DATA (sink);                                 \
+} while (0)
 
 #ifdef FILE_CODING
 
 #ifdef FILE_CODING
+#define DFC_CONVERT_TO_EXTERNAL_FORMAT dfc_convert_to_external_format
+#define DFC_CONVERT_TO_INTERNAL_FORMAT dfc_convert_to_internal_format
+#else
+/* ignore coding_system argument */
+#define DFC_CONVERT_TO_EXTERNAL_FORMAT(a, b, coding_system, c, d) \
+ dfc_convert_to_external_format (a, b, c, d)
+#define DFC_CONVERT_TO_INTERNAL_FORMAT(a, b, coding_system, c, d) \
+ dfc_convert_to_internal_format (a, b, c, d)
+#endif
 
 
-/* WARNING: These use a static buffer.  This can lead to disaster if
-   these functions are not used *very* carefully.  Under normal
-   circumstances, do not call these functions; call the front ends
-   below. */
-
-Extbyte *convert_to_external_format (CONST Bufbyte *ptr,
-                                    Bytecount len,
-                                    Extcount *len_out,
-                                    enum external_data_format fmt);
-Bufbyte *convert_from_external_format (CONST Extbyte *ptr,
-                                      Extcount len,
-                                      Bytecount *len_out,
-                                      enum external_data_format fmt);
-
-#else /* ! MULE */
-
-#define convert_to_external_format(ptr, len, len_out, fmt) \
-     (*(len_out) = (int) (len), (Extbyte *) (ptr))
-#define convert_from_external_format(ptr, len, len_out, fmt) \
-     (*(len_out) = (Bytecount) (len), (Bufbyte *) (ptr))
-
-#endif /* ! MULE */
-
-/* In all of the following macros we use the following general principles:
-
-   -- Functions that work with charptr's accept two sorts of charptr's:
-
-      a) Pointers to memory with a length specified.  The pointer will be
-         fundamentally of type `unsigned char *' (although labelled
-        as `Bufbyte *' for internal-format data and `Extbyte *' for
-        external-format data) and the length will be fundamentally of
-        type `int' (although labelled as `Bytecount' for internal-format
-        data and `Extcount' for external-format data).  The length is
-        always a count in bytes.
-      b) Zero-terminated pointers; no length specified.  The pointer
-         is of type `char *', whether the data pointed to is internal-format
-        or external-format.  These sorts of pointers are available for
-        convenience in working with C library functions and literal
-        strings.  In general you should use these sorts of pointers only
-        to interface to library routines and not for general manipulation,
-        as you are liable to lose embedded nulls and such.  This could
-        be a big problem for routines that want Unicode-formatted data,
-        which is likely to have lots of embedded nulls in it.
-        (In the real world, though, external Unicode data will be UTF-8,
-        which will not have embedded nulls and is ASCII-compatible - martin)
-
-   -- Functions that work with Lisp strings accept strings as Lisp Objects
-      (as opposed to the `struct Lisp_String *' for some of the other
-      string accessors).  This is for convenience in working with the
-      functions, as otherwise you will almost always have to call
-      XSTRING() on the object.
-
-   -- Functions that work with charptr's are not guaranteed to copy
-      their data into alloca()ed space.  Functions that work with
-      Lisp strings are, however.  The reason is that Lisp strings can
-      be relocated any time a GC happens, and it could happen at some
-      rather unexpected times.  The internal-external conversion is
-      rarely done in time-critical functions, and so the slight
-      extra time required for alloca() and copy is well-worth the
-      safety of knowing your string data won't be relocated out from
-      under you.
-      */
-
-
-/* Maybe convert charptr's data into ext-format and store the result in
-   alloca()'ed space.
-
-   You may wonder why this is written in this fashion and not as a
-   function call.  With a little trickery it could certainly be
-   written this way, but it won't work because of those DAMN GCC WANKERS
-   who couldn't be bothered to handle alloca() properly on the x86
-   architecture. (If you put a call to alloca() in the argument to
-   a function call, the stack space gets allocated right in the
-   middle of the arguments to the function call and you are unbelievably
-   hosed.) */
+typedef union
+{
+  struct { const void *ptr; size_t len; } data;
+  Lisp_Object lisp_object;
+} dfc_conversion_data;
 
 
-#ifdef MULE
+enum dfc_conversion_type
+{
+  DFC_TYPE_DATA,
+  DFC_TYPE_ALLOCA,
+  DFC_TYPE_MALLOC,
+  DFC_TYPE_C_STRING,
+  DFC_TYPE_C_STRING_ALLOCA,
+  DFC_TYPE_C_STRING_MALLOC,
+  DFC_TYPE_LISP_STRING,
+  DFC_TYPE_LISP_LSTREAM,
+  DFC_TYPE_LISP_OPAQUE,
+  DFC_TYPE_LISP_BUFFER
+};
+typedef enum dfc_conversion_type dfc_conversion_type;
 
 
-#define GET_CHARPTR_EXT_DATA_ALLOCA(ptr, len, fmt, ptr_out, len_out) do        \
-{                                                                      \
-  Bytecount gceda_len_in = (Bytecount) (len);                          \
-  Extcount  gceda_len_out;                                             \
-  CONST Bufbyte *gceda_ptr_in = (ptr);                                 \
-  Extbyte *gceda_ptr_out =                                             \
-    convert_to_external_format (gceda_ptr_in, gceda_len_in,            \
-                               &gceda_len_out, fmt);                   \
-  /* If the new string is identical to the old (will be the case most  \
-     of the time), just return the same string back.  This saves       \
-     on alloca()ing, which can be useful on C alloca() machines and    \
-     on stack-space-challenged environments. */                                \
-                                                                       \
-  if (gceda_len_in == gceda_len_out &&                                 \
-      !memcmp (gceda_ptr_in, gceda_ptr_out, gceda_len_out))            \
-    {                                                                  \
-      (ptr_out) = (Extbyte *) gceda_ptr_in;                            \
-    }                                                                  \
-  else                                                                 \
-    {                                                                  \
-      (ptr_out) = (Extbyte *) alloca (1 + gceda_len_out);              \
-      memcpy ((void *) ptr_out, gceda_ptr_out, 1 + gceda_len_out);     \
-    }                                                                  \
-  (len_out) = gceda_len_out;                                           \
+/* WARNING: These use a static buffer.  This can lead to disaster if
+   these functions are not used *very* carefully.  Another reason to only use
+   TO_EXTERNAL_FORMATf() and TO_INTERNAL_FORMAT(). */
+void
+dfc_convert_to_external_format (dfc_conversion_type source_type,
+                               dfc_conversion_data *source,
+#ifdef FILE_CODING
+                               Lisp_Object coding_system,
+#endif
+                               dfc_conversion_type sink_type,
+                               dfc_conversion_data *sink);
+void
+dfc_convert_to_internal_format (dfc_conversion_type source_type,
+                               dfc_conversion_data *source,
+#ifdef FILE_CODING
+                               Lisp_Object coding_system,
+#endif
+                               dfc_conversion_type sink_type,
+                               dfc_conversion_data *sink);
+/* CPP Trickery */
+#define DFC_CPP_CAR(x,y) (x)
+#define DFC_CPP_CDR(x,y) (y)
+
+/* Convert `source' to args for dfc_convert_to_*_format() */
+#define DFC_SOURCE_DATA_TO_ARGS(val) do {              \
+  dfc_source.data.ptr = DFC_CPP_CAR val;               \
+  dfc_source.data.len = DFC_CPP_CDR val;               \
+  dfc_simplified_source_type = DFC_TYPE_DATA;          \
 } while (0)
 } while (0)
-
-#else /* ! MULE */
-
-#define GET_CHARPTR_EXT_DATA_ALLOCA(ptr, len, fmt, ptr_out, len_out) do        \
-{                                      \
-  (ptr_out) = (Extbyte *) (ptr);       \
-  (len_out) = (Extcount) (len);                \
+#define DFC_SOURCE_C_STRING_TO_ARGS(val) do {          \
+  dfc_source.data.len =                                        \
+    strlen ((char *) (dfc_source.data.ptr = (val)));   \
+  dfc_simplified_source_type = DFC_TYPE_DATA;          \
 } while (0)
 } while (0)
-
-#endif /* ! MULE */
-
-#define GET_C_CHARPTR_EXT_DATA_ALLOCA(ptr, fmt, ptr_out) do    \
-{                                                              \
-  Extcount gcceda_ignored_len;                                 \
-  CONST Bufbyte *gcceda_ptr_in = (CONST Bufbyte *) (ptr);      \
-  Extbyte *gcceda_ptr_out;                                     \
-                                                               \
-  GET_CHARPTR_EXT_DATA_ALLOCA (gcceda_ptr_in,                  \
-                              strlen ((char *) gcceda_ptr_in), \
-                              fmt,                             \
-                              gcceda_ptr_out,                  \
-                              gcceda_ignored_len);             \
-  (ptr_out) = (char *) gcceda_ptr_out;                         \
+#define DFC_SOURCE_LISP_STRING_TO_ARGS(val) do {       \
+  Lisp_Object dfc_slsta = (val);                       \
+  type_checking_assert (STRINGP (dfc_slsta));          \
+  dfc_source.lisp_object = dfc_slsta;                  \
+  dfc_simplified_source_type = DFC_TYPE_LISP_STRING;   \
 } while (0)
 } while (0)
-
-#define GET_C_CHARPTR_EXT_BINARY_DATA_ALLOCA(ptr, ptr_out) \
-  GET_C_CHARPTR_EXT_DATA_ALLOCA (ptr, FORMAT_BINARY, ptr_out)
-#define GET_CHARPTR_EXT_BINARY_DATA_ALLOCA(ptr, len, ptr_out, len_out) \
-  GET_CHARPTR_EXT_DATA_ALLOCA (ptr, len, FORMAT_BINARY, ptr_out, len_out)
-
-#define GET_C_CHARPTR_EXT_FILENAME_DATA_ALLOCA(ptr, ptr_out) \
-  GET_C_CHARPTR_EXT_DATA_ALLOCA (ptr, FORMAT_FILENAME, ptr_out)
-#define GET_CHARPTR_EXT_FILENAME_DATA_ALLOCA(ptr, len, ptr_out, len_out) \
-  GET_CHARPTR_EXT_DATA_ALLOCA (ptr, len, FORMAT_FILENAME, ptr_out, len_out)
-
-#define GET_C_CHARPTR_EXT_CTEXT_DATA_ALLOCA(ptr, ptr_out) \
-  GET_C_CHARPTR_EXT_DATA_ALLOCA (ptr, FORMAT_CTEXT, ptr_out)
-#define GET_CHARPTR_EXT_CTEXT_DATA_ALLOCA(ptr, len, ptr_out, len_out) \
-  GET_CHARPTR_EXT_DATA_ALLOCA (ptr, len, FORMAT_CTEXT, ptr_out, len_out)
-
-/* Maybe convert external charptr's data into internal format and store
-   the result in alloca()'ed space.
-
-   You may wonder why this is written in this fashion and not as a
-   function call.  With a little trickery it could certainly be
-   written this way, but it won't work because of those DAMN GCC WANKERS
-   who couldn't be bothered to handle alloca() properly on the x86
-   architecture. (If you put a call to alloca() in the argument to
-   a function call, the stack space gets allocated right in the
-   middle of the arguments to the function call and you are unbelievably
-   hosed.) */
-
-#ifdef MULE
-
-#define GET_CHARPTR_INT_DATA_ALLOCA(ptr, len, fmt, ptr_out, len_out) do        \
-{                                                                      \
-  Extcount gcida_len_in = (Extcount) (len);                            \
-  Bytecount gcida_len_out;                                             \
-  CONST Extbyte *gcida_ptr_in = (ptr);                                 \
-  Bufbyte *gcida_ptr_out =                                             \
-    convert_from_external_format (gcida_ptr_in, gcida_len_in,          \
-                                 &gcida_len_out, fmt);                 \
-  /* If the new string is identical to the old (will be the case most  \
-     of the time), just return the same string back.  This saves       \
-     on alloca()ing, which can be useful on C alloca() machines and    \
-     on stack-space-challenged environments. */                                \
-                                                                       \
-  if (gcida_len_in == gcida_len_out &&                                 \
-      !memcmp (gcida_ptr_in, gcida_ptr_out, gcida_len_out))            \
-    {                                                                  \
-      (ptr_out) = (Bufbyte *) gcida_ptr_in;                            \
-    }                                                                  \
-  else                                                                 \
-    {                                                                  \
-      (ptr_out) = (Extbyte *) alloca (1 + gcida_len_out);              \
-      memcpy ((void *) ptr_out, gcida_ptr_out, 1 + gcida_len_out);     \
-    }                                                                  \
-  (len_out) = gcida_len_out;                                           \
+#define DFC_SOURCE_LISP_LSTREAM_TO_ARGS(val) do {      \
+  Lisp_Object dfc_sllta = (val);                       \
+  type_checking_assert (LSTREAMP (dfc_sllta));         \
+  dfc_source.lisp_object = dfc_sllta;                  \
+  dfc_simplified_source_type = DFC_TYPE_LISP_LSTREAM;  \
 } while (0)
 } while (0)
-
-#else /* ! MULE */
-
-#define GET_CHARPTR_INT_DATA_ALLOCA(ptr, len, fmt, ptr_out, len_out) do \
-{                                      \
-  (ptr_out) = (Bufbyte *) (ptr);       \
-  (len_out) = (Bytecount) (len);       \
+#define DFC_SOURCE_LISP_OPAQUE_TO_ARGS(val) do {       \
+  Lisp_Opaque *dfc_slota = XOPAQUE (val);              \
+  dfc_source.data.ptr = OPAQUE_DATA (dfc_slota);       \
+  dfc_source.data.len = OPAQUE_SIZE (dfc_slota);       \
+  dfc_simplified_source_type = DFC_TYPE_DATA;          \
 } while (0)
 
 } while (0)
 
-#endif /* ! MULE */
-
-#define GET_C_CHARPTR_INT_DATA_ALLOCA(ptr, fmt, ptr_out) do    \
-{                                                              \
-  Bytecount gccida_ignored_len;                                        \
-  CONST Extbyte *gccida_ptr_in = (CONST Extbyte *) (ptr);      \
-  Bufbyte *gccida_ptr_out;                                     \
-                                                               \
-  GET_CHARPTR_INT_DATA_ALLOCA (gccida_ptr_in,                  \
-                              strlen ((char *) gccida_ptr_in), \
-                              fmt,                             \
-                              gccida_ptr_out,                  \
-                              gccida_ignored_len);             \
-  (ptr_out) = gccida_ptr_out;                                  \
+/* Convert `sink' to args for dfc_convert_to_*_format() */
+#define DFC_SINK_ALLOCA_TO_ARGS(val)           \
+  dfc_simplified_sink_type = DFC_TYPE_DATA
+#define DFC_SINK_C_STRING_ALLOCA_TO_ARGS(val)  \
+  dfc_simplified_sink_type = DFC_TYPE_DATA
+#define DFC_SINK_MALLOC_TO_ARGS(val)           \
+  dfc_simplified_sink_type = DFC_TYPE_DATA
+#define DFC_SINK_C_STRING_MALLOC_TO_ARGS(val)  \
+  dfc_simplified_sink_type = DFC_TYPE_DATA
+#define DFC_SINK_LISP_STRING_TO_ARGS(val)      \
+  dfc_simplified_sink_type = DFC_TYPE_DATA
+#define DFC_SINK_LISP_OPAQUE_TO_ARGS(val)      \
+  dfc_simplified_sink_type = DFC_TYPE_DATA
+#define DFC_SINK_LISP_LSTREAM_TO_ARGS(val) do {                \
+  Lisp_Object dfc_sllta = (val);                       \
+  type_checking_assert (LSTREAMP (dfc_sllta));         \
+  dfc_sink.lisp_object = dfc_sllta;                    \
+  dfc_simplified_sink_type = DFC_TYPE_LISP_LSTREAM;    \
 } while (0)
 } while (0)
-
-#define GET_C_CHARPTR_INT_BINARY_DATA_ALLOCA(ptr, ptr_out)     \
-  GET_C_CHARPTR_INT_DATA_ALLOCA (ptr, FORMAT_BINARY, ptr_out)
-#define GET_CHARPTR_INT_BINARY_DATA_ALLOCA(ptr, len, ptr_out, len_out) \
-  GET_CHARPTR_INT_DATA_ALLOCA (ptr, len, FORMAT_BINARY, ptr_out, len_out)
-
-#define GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA(ptr, ptr_out)   \
-  GET_C_CHARPTR_INT_DATA_ALLOCA (ptr, FORMAT_FILENAME, ptr_out)
-#define GET_CHARPTR_INT_FILENAME_DATA_ALLOCA(ptr, len, ptr_out, len_out) \
-  GET_CHARPTR_INT_DATA_ALLOCA (ptr, len, FORMAT_FILENAME, ptr_out, len_out)
-
-#define GET_C_CHARPTR_INT_CTEXT_DATA_ALLOCA(ptr, ptr_out)      \
-  GET_C_CHARPTR_INT_DATA_ALLOCA (ptr, FORMAT_CTEXT, ptr_out)
-#define GET_CHARPTR_INT_CTEXT_DATA_ALLOCA(ptr, len, ptr_out, len_out) \
-  GET_CHARPTR_INT_DATA_ALLOCA (ptr, len, FORMAT_CTEXT, ptr_out, len_out)
-
-
-/* Maybe convert Lisp string's data into ext-format and store the result in
-   alloca()'ed space.
-
-   You may wonder why this is written in this fashion and not as a
-   function call.  With a little trickery it could certainly be
-   written this way, but it won't work because of those DAMN GCC WANKERS
-   who couldn't be bothered to handle alloca() properly on the x86
-   architecture. (If you put a call to alloca() in the argument to
-   a function call, the stack space gets allocated right in the
-   middle of the arguments to the function call and you are unbelievably
-   hosed.) */
-
-#define GET_STRING_EXT_DATA_ALLOCA(s, fmt, ptr_out, len_out) do        \
-{                                                              \
-  Extcount gseda_len_out;                                      \
-  struct Lisp_String *gseda_s = XSTRING (s);                   \
-  Extbyte * gseda_ptr_out =                                    \
-    convert_to_external_format (string_data (gseda_s),         \
-                               string_length (gseda_s),        \
-                               &gseda_len_out, fmt);           \
-  (ptr_out) = (Extbyte *) alloca (1 + gseda_len_out);          \
-  memcpy ((void *) ptr_out, gseda_ptr_out, 1 + gseda_len_out); \
-  (len_out) = gseda_len_out;                                   \
+#define DFC_SINK_LISP_BUFFER_TO_ARGS(val) do {         \
+  struct buffer *dfc_slbta = XBUFFER (val);            \
+  dfc_sink.lisp_object =                               \
+    make_lisp_buffer_output_stream                     \
+    (dfc_slbta, BUF_PT (dfc_slbta), 0);                        \
+  dfc_simplified_sink_type = DFC_TYPE_LISP_LSTREAM;    \
 } while (0)
 
 } while (0)
 
-
-#define GET_C_STRING_EXT_DATA_ALLOCA(s, fmt, ptr_out) do       \
-{                                                              \
-  Extcount gcseda_ignored_len;                                 \
-  Extbyte *gcseda_ptr_out;                                     \
-                                                               \
-  GET_STRING_EXT_DATA_ALLOCA (s, fmt, gcseda_ptr_out,          \
-                             gcseda_ignored_len);              \
-  (ptr_out) = (char *) gcseda_ptr_out;                         \
+/* Assign to the `sink' lvalue(s) using the converted data. */
+#define DFC_ALLOCA_USE_CONVERTED_DATA(sink) do {                       \
+  void * dfc_sink_ret = alloca (dfc_sink.data.len + 1);                        \
+  memcpy (dfc_sink_ret, dfc_sink.data.ptr, dfc_sink.data.len + 1);     \
+  (DFC_CPP_CAR sink) = (unsigned char *) dfc_sink_ret;                 \
+  (DFC_CPP_CDR sink) = dfc_sink.data.len;                              \
 } while (0)
 } while (0)
-
-#define GET_STRING_BINARY_DATA_ALLOCA(s, ptr_out, len_out)     \
-  GET_STRING_EXT_DATA_ALLOCA (s, FORMAT_BINARY, ptr_out, len_out)
-#define GET_C_STRING_BINARY_DATA_ALLOCA(s, ptr_out)            \
-  GET_C_STRING_EXT_DATA_ALLOCA (s, FORMAT_BINARY, ptr_out)
-
-#define GET_STRING_FILENAME_DATA_ALLOCA(s, ptr_out, len_out)   \
-  GET_STRING_EXT_DATA_ALLOCA (s, FORMAT_FILENAME, ptr_out, len_out)
-#define GET_C_STRING_FILENAME_DATA_ALLOCA(s, ptr_out)          \
-  GET_C_STRING_EXT_DATA_ALLOCA (s, FORMAT_FILENAME, ptr_out)
-
-#define GET_STRING_OS_DATA_ALLOCA(s, ptr_out, len_out)         \
-  GET_STRING_EXT_DATA_ALLOCA (s, FORMAT_OS, ptr_out, len_out)
-#define GET_C_STRING_OS_DATA_ALLOCA(s, ptr_out)                        \
-  GET_C_STRING_EXT_DATA_ALLOCA (s, FORMAT_OS, ptr_out)
-
-#define GET_STRING_CTEXT_DATA_ALLOCA(s, ptr_out, len_out)      \
-  GET_STRING_EXT_DATA_ALLOCA (s, FORMAT_CTEXT, ptr_out, len_out)
-#define GET_C_STRING_CTEXT_DATA_ALLOCA(s, ptr_out)             \
-  GET_C_STRING_EXT_DATA_ALLOCA (s, FORMAT_CTEXT, ptr_out)
-
+#define DFC_MALLOC_USE_CONVERTED_DATA(sink) do {                       \
+  void * dfc_sink_ret = xmalloc (dfc_sink.data.len + 1);               \
+  memcpy (dfc_sink_ret, dfc_sink.data.ptr, dfc_sink.data.len + 1);     \
+  (DFC_CPP_CAR sink) = (unsigned char *) dfc_sink_ret;                 \
+  (DFC_CPP_CDR sink) = dfc_sink.data.len;                              \
+} while (0)
+#define DFC_C_STRING_ALLOCA_USE_CONVERTED_DATA(sink) do {              \
+  void * dfc_sink_ret = alloca (dfc_sink.data.len + 1);                        \
+  memcpy (dfc_sink_ret, dfc_sink.data.ptr, dfc_sink.data.len + 1);     \
+  (sink) = (char *) dfc_sink_ret;                                      \
+} while (0)
+#define DFC_C_STRING_MALLOC_USE_CONVERTED_DATA(sink) do {              \
+  void * dfc_sink_ret = xmalloc (dfc_sink.data.len + 1);               \
+  memcpy (dfc_sink_ret, dfc_sink.data.ptr, dfc_sink.data.len + 1);     \
+  (sink) = (char *) dfc_sink_ret;                                      \
+} while (0)
+#define DFC_LISP_STRING_USE_CONVERTED_DATA(sink) \
+  sink = make_string ((Bufbyte *) dfc_sink.data.ptr, dfc_sink.data.len)
+#define DFC_LISP_OPAQUE_USE_CONVERTED_DATA(sink) \
+  sink = make_opaque (dfc_sink.data.ptr, dfc_sink.data.len)
+#define DFC_LISP_LSTREAM_USE_CONVERTED_DATA(sink) /* data already used */
+#define DFC_LISP_BUFFER_USE_CONVERTED_DATA(sink) \
+  Lstream_delete (XLSTREAM (dfc_sink.lisp_object))
+
+/* Someday we might want to distinguish between Qnative and Qfile_name
+   by using coding-system aliases, but for now it suffices to have
+   these be identical.  Qnative can be used as the coding_system
+   argument to TO_EXTERNAL_FORMAT() and TO_INTERNAL_FORMAT(). */
+#define Qnative Qfile_name
 
 \f
 /************************************************************************/
 
 \f
 /************************************************************************/
@@ -1568,8 +1534,8 @@ extern struct buffer buffer_local_flags;
 
 #ifdef REL_ALLOC
 
 
 #ifdef REL_ALLOC
 
-char *r_alloc (unsigned char **, unsigned long);
-char *r_re_alloc (unsigned char **, unsigned long);
+char *r_alloc (unsigned char **, size_t);
+char *r_re_alloc (unsigned char **, size_t);
 void r_alloc_free (unsigned char **);
 
 #define BUFFER_ALLOC(data, size) \
 void r_alloc_free (unsigned char **);
 
 #define BUFFER_ALLOC(data, size) \
@@ -1708,7 +1674,7 @@ int map_over_sharing_buffers (struct buffer *buf,
   set_string_char (XSTRING (table), (Charcount) ch1, ch2)
 
 #ifdef MULE
   set_string_char (XSTRING (table), (Charcount) ch1, ch2)
 
 #ifdef MULE
-# define MAKE_MIRROR_TRT_TABLE() make_opaque (256, 0)
+# define MAKE_MIRROR_TRT_TABLE() make_opaque (OPAQUE_CLEAR, 256)
 # define MIRROR_TRT_TABLE_AS_STRING(table) ((Bufbyte *) XOPAQUE_DATA (table))
 # define MIRROR_TRT_TABLE_CHAR_1(table, ch) \
   ((Emchar) (MIRROR_TRT_TABLE_AS_STRING (table)[ch]))
 # define MIRROR_TRT_TABLE_AS_STRING(table) ((Bufbyte *) XOPAQUE_DATA (table))
 # define MIRROR_TRT_TABLE_CHAR_1(table, ch) \
   ((Emchar) (MIRROR_TRT_TABLE_AS_STRING (table)[ch]))
@@ -1794,4 +1760,4 @@ UPCASE (struct buffer *buf, Emchar ch)
 
 #define DOWNCASE(buf, ch) DOWNCASE_TABLE_OF (buf, ch)
 
 
 #define DOWNCASE(buf, ch) DOWNCASE_TABLE_OF (buf, ch)
 
-#endif /* _XEMACS_BUFFER_H_ */
+#endif /* INCLUDED_buffer_h_ */
index 9058be8..e670665 100644 (file)
@@ -686,7 +686,7 @@ execute_optimized_program (CONST Opbyte *program,
        do_varset:
        {
          Lisp_Object symbol = constants_data[n];
        do_varset:
        {
          Lisp_Object symbol = constants_data[n];
-         struct Lisp_Symbol *symbol_ptr = XSYMBOL (symbol);
+         Lisp_Symbol *symbol_ptr = XSYMBOL (symbol);
          Lisp_Object old_value = symbol_ptr->value;
          Lisp_Object new_value = POP;
          if (!SYMBOL_VALUE_MAGIC_P (old_value) || UNBOUNDP (old_value))
          Lisp_Object old_value = symbol_ptr->value;
          Lisp_Object new_value = POP;
          if (!SYMBOL_VALUE_MAGIC_P (old_value) || UNBOUNDP (old_value))
@@ -707,7 +707,7 @@ execute_optimized_program (CONST Opbyte *program,
        do_varbind:
        {
          Lisp_Object symbol = constants_data[n];
        do_varbind:
        {
          Lisp_Object symbol = constants_data[n];
-         struct Lisp_Symbol *symbol_ptr = XSYMBOL (symbol);
+         Lisp_Symbol *symbol_ptr = XSYMBOL (symbol);
          Lisp_Object old_value = symbol_ptr->value;
          Lisp_Object new_value = POP;
          if (!SYMBOL_VALUE_MAGIC_P (old_value) || UNBOUNDP (old_value))
          Lisp_Object old_value = symbol_ptr->value;
          Lisp_Object new_value = POP;
          if (!SYMBOL_VALUE_MAGIC_P (old_value) || UNBOUNDP (old_value))
@@ -1894,8 +1894,7 @@ optimize_compiled_function (Lisp_Object compiled_function)
                          program, &program_length, &varbind_count);
       f->specpdl_depth = XINT (Flength (f->arglist)) + varbind_count;
       f->instructions =
                          program, &program_length, &varbind_count);
       f->specpdl_depth = XINT (Flength (f->arglist)) + varbind_count;
       f->instructions =
-       make_opaque (program_length * sizeof (Opbyte),
-                    (CONST void *) program);
+       make_opaque (program, program_length * sizeof (Opbyte));
     }
 
   assert (OPAQUEP (f->instructions));
     }
 
   assert (OPAQUEP (f->instructions));
@@ -2024,9 +2023,12 @@ compiled_function_hash (Lisp_Object obj, int depth)
 }
 
 static const struct lrecord_description compiled_function_description[] = {
 }
 
 static const struct lrecord_description compiled_function_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Compiled_Function, instructions), 4 },
+  { XD_LISP_OBJECT, offsetof (Lisp_Compiled_Function, instructions) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Compiled_Function, constants) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Compiled_Function, arglist) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Compiled_Function, doc_and_interactive) },
 #ifdef COMPILED_FUNCTION_ANNOTATION_HACK
 #ifdef COMPILED_FUNCTION_ANNOTATION_HACK
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Compiled_Function, annotated), 1 },
+  { XD_LISP_OBJECT, offsetof (Lisp_Compiled_Function, annotated) },
 #endif
   { XD_END }
 };
 #endif
   { XD_END }
 };
index 71674ec..e52b56b 100644 (file)
@@ -27,8 +27,8 @@ Boston, MA 02111-1307, USA.  */
    Jon Reid: some changes for I18N3 (domain, etc), for 19.8.
  */
 
    Jon Reid: some changes for I18N3 (domain, etc), for 19.8.
  */
 
-#ifndef _XEMACS_BYTECODE_H_
-#define _XEMACS_BYTECODE_H_
+#ifndef INCLUDED_bytecode_h_
+#define INCLUDED_bytecode_h_
 
 /* Meanings of slots in a Lisp_Compiled_Function.
    Don't use these!  For backward compatibility only.  */
 
 /* Meanings of slots in a Lisp_Compiled_Function.
    Don't use these!  For backward compatibility only.  */
@@ -119,5 +119,5 @@ extern Lisp_Object Qbyte_code;
     neither     -                   : (*  559 0)  =   0 = 3530
 */
 
     neither     -                   : (*  559 0)  =   0 = 3530
 */
 
-#endif /* _XEMACS_BYTECODE_H_ */
+#endif /* INCLUDED_bytecode_h_ */
 
 
index 2e6832a..adc4160 100644 (file)
@@ -167,8 +167,8 @@ Quote EXPR if it is not self quoting.
 static Lisp_Object
 quotify_args (Lisp_Object expr)
 {
 static Lisp_Object
 quotify_args (Lisp_Object expr)
 {
-  REGISTER Lisp_Object tail;
-  REGISTER struct Lisp_Cons *ptr;
+  Lisp_Object tail;
+  Lisp_Cons *ptr;
   for (tail = expr; CONSP (tail); tail = ptr->cdr)
     {
       ptr = XCONS (tail);
   for (tail = expr; CONSP (tail); tail = ptr->cdr)
     {
       ptr = XCONS (tail);
index 8694b38..54ec8d0 100644 (file)
@@ -43,7 +43,6 @@ Boston, MA 02111-1307, USA.  */
 
 #ifdef WINDOWSNT
 #define _P_NOWAIT 1    /* from process.h */
 
 #ifdef WINDOWSNT
 #define _P_NOWAIT 1    /* from process.h */
-#include <windows.h>
 #include "nt.h"
 #endif
 
 #include "nt.h"
 #endif
 
@@ -102,11 +101,8 @@ call_process_kill (Lisp_Object fdpid)
 static Lisp_Object
 call_process_cleanup (Lisp_Object fdpid)
 {
 static Lisp_Object
 call_process_cleanup (Lisp_Object fdpid)
 {
-  int fd = XINT (Fcar (fdpid));
+  int fd  = XINT (Fcar (fdpid));
   int pid = XINT (Fcdr (fdpid));
   int pid = XINT (Fcdr (fdpid));
-#ifdef WINDOWSNT
-  HANDLE pHandle;
-#endif
 
   if (!call_process_exited &&
       EMACS_KILLPG (pid, SIGINT) == 0)
 
   if (!call_process_exited &&
       EMACS_KILLPG (pid, SIGINT) == 0)
@@ -118,13 +114,14 @@ call_process_cleanup (Lisp_Object fdpid)
     message ("Waiting for process to die...(type C-g again to kill it instantly)");
 
 #ifdef WINDOWSNT
     message ("Waiting for process to die...(type C-g again to kill it instantly)");
 
 #ifdef WINDOWSNT
-    pHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
-    if (pHandle == NULL)
-      {
+    {
+      HANDLE pHandle = OpenProcess (PROCESS_ALL_ACCESS, 0, pid);
+      if (pHandle == NULL)
        warn_when_safe (Qprocess, Qwarning,
                        "cannot open process (PID %d) for cleanup", pid);
        warn_when_safe (Qprocess, Qwarning,
                        "cannot open process (PID %d) for cleanup", pid);
-      }
-    wait_for_termination (pHandle);
+      else
+       wait_for_termination (pHandle);
+    }
 #else
     wait_for_termination (pid);
 #endif
 #else
     wait_for_termination (pid);
 #endif
@@ -504,10 +501,12 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you
        if (nread == 0)
          break;
 
        if (nread == 0)
          break;
 
+#if 0
 #ifdef DOS_NT
        /* Until we pull out of MULE things like
          make_decoding_input_stream(), we do the following which is
          less elegant. --marcpa */
 #ifdef DOS_NT
        /* Until we pull out of MULE things like
          make_decoding_input_stream(), we do the following which is
          less elegant. --marcpa */
+       /* We did. -- kkm */
        {
         int lf_count = 0;
         if (NILP (Vbinary_process_output)) {
        {
         int lf_count = 0;
         if (NILP (Vbinary_process_output)) {
@@ -515,6 +514,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you
          }
        }
 #endif
          }
        }
 #endif
+#endif
 
        total_read += nread;
 
 
        total_read += nread;
 
@@ -684,9 +684,10 @@ child_setup (int in, int out, int err, char **new_argv,
     {
       char **ep = env;
       char *envvar_external;
     {
       char **ep = env;
       char *envvar_external;
-      Bufbyte *envvar_internal = XSTRING_DATA (XCAR (tail));
 
 
-      GET_C_CHARPTR_EXT_FILENAME_DATA_ALLOCA (envvar_internal, envvar_external);
+      TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (tail),
+                         C_STRING_ALLOCA, envvar_external,
+                         Qfile_name);
 
       /* See if envvar_external duplicates any string already in the env.
         If so, don't put it in.
 
       /* See if envvar_external duplicates any string already in the env.
         If so, don't put it in.
@@ -868,10 +869,8 @@ init_callproc (void)
     char **envp;
     Vprocess_environment = Qnil;
     for (envp = environ; envp && *envp; envp++)
     char **envp;
     Vprocess_environment = Qnil;
     for (envp = environ; envp && *envp; envp++)
-      {
-       Vprocess_environment = Fcons (build_ext_string (*envp, FORMAT_OS),
-                                     Vprocess_environment);
-      }
+      Vprocess_environment =
+       Fcons (build_ext_string (*envp, Qfile_name), Vprocess_environment);
   }
 
   {
   }
 
   {
index b8a9d1c..88fe83e 100644 (file)
@@ -47,8 +47,7 @@ casify_object (enum case_action flag, Lisp_Object obj, Lisp_Object buffer)
 
   if (STRINGP (obj))
     {
 
   if (STRINGP (obj))
     {
-      struct Lisp_Char_Table *syntax_table =
-       XCHAR_TABLE (buf->mirror_syntax_table);
+      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 *storage =
        alloca_array (Bufbyte, XSTRING_LENGTH (obj) * MAX_EMCHAR_LEN);
       Bufbyte *newp = storage;
@@ -156,7 +155,7 @@ casify_region_internal (enum case_action flag, Lisp_Object b, Lisp_Object e,
   /* This function can GC */
   REGISTER Bufpos i;
   Bufpos start, end;
   /* This function can GC */
   REGISTER Bufpos i;
   Bufpos start, end;
-  struct Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->mirror_syntax_table);
+  Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->mirror_syntax_table);
   int mccount;
   Emchar oldc, c;
   int wordp = 0, wordp_prev;
   int mccount;
   Emchar oldc, c;
   int wordp = 0, wordp_prev;
index 475c87f..f78a17b 100644 (file)
@@ -97,7 +97,7 @@ Lisp_Object Vword_combining_categories, Vword_separating_categories;
 static Lisp_Object
 mark_char_table_entry (Lisp_Object obj)
 {
 static Lisp_Object
 mark_char_table_entry (Lisp_Object obj)
 {
-  struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (obj);
+  Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (obj);
   int i;
 
   for (i = 0; i < 96; i++)
   int i;
 
   for (i = 0; i < 96; i++)
@@ -110,8 +110,8 @@ mark_char_table_entry (Lisp_Object obj)
 static int
 char_table_entry_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
 static int
 char_table_entry_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  struct Lisp_Char_Table_Entry *cte1 = XCHAR_TABLE_ENTRY (obj1);
-  struct Lisp_Char_Table_Entry *cte2 = XCHAR_TABLE_ENTRY (obj2);
+  Lisp_Char_Table_Entry *cte1 = XCHAR_TABLE_ENTRY (obj1);
+  Lisp_Char_Table_Entry *cte2 = XCHAR_TABLE_ENTRY (obj2);
   int i;
 
   for (i = 0; i < 96; i++)
   int i;
 
   for (i = 0; i < 96; i++)
@@ -124,13 +124,13 @@ char_table_entry_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 static unsigned long
 char_table_entry_hash (Lisp_Object obj, int depth)
 {
 static unsigned long
 char_table_entry_hash (Lisp_Object obj, int depth)
 {
-  struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (obj);
+  Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (obj);
 
   return internal_array_hash (cte->level2, 96, depth);
 }
 
 static const struct lrecord_description char_table_entry_description[] = {
 
   return internal_array_hash (cte->level2, 96, depth);
 }
 
 static const struct lrecord_description char_table_entry_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Table_Entry, level2), 96 },
+  { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Char_Table_Entry, level2), 96 },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -139,13 +139,13 @@ DEFINE_LRECORD_IMPLEMENTATION ("char-table-entry", char_table_entry,
                               0, char_table_entry_equal,
                               char_table_entry_hash,
                               char_table_entry_description,
                               0, char_table_entry_equal,
                               char_table_entry_hash,
                               char_table_entry_description,
-                              struct Lisp_Char_Table_Entry);
+                              Lisp_Char_Table_Entry);
 #endif /* MULE */
 
 static Lisp_Object
 mark_char_table (Lisp_Object obj)
 {
 #endif /* MULE */
 
 static Lisp_Object
 mark_char_table (Lisp_Object obj)
 {
-  struct Lisp_Char_Table *ct = XCHAR_TABLE (obj);
+  Lisp_Char_Table *ct = XCHAR_TABLE (obj);
   int i;
 
   for (i = 0; i < NUM_ASCII_CHARS; i++)
   int i;
 
   for (i = 0; i < NUM_ASCII_CHARS; i++)
@@ -241,7 +241,7 @@ print_chartab_range (Emchar first, Emchar last, Lisp_Object val,
 static void
 print_chartab_charset_row (Lisp_Object charset,
                           int row,
 static void
 print_chartab_charset_row (Lisp_Object charset,
                           int row,
-                          struct Lisp_Char_Table_Entry *cte,
+                          Lisp_Char_Table_Entry *cte,
                           Lisp_Object printcharfun)
 {
   int i;
                           Lisp_Object printcharfun)
 {
   int i;
@@ -289,7 +289,7 @@ print_chartab_charset_row (Lisp_Object charset,
 
 static void
 print_chartab_two_byte_charset (Lisp_Object charset,
 
 static void
 print_chartab_two_byte_charset (Lisp_Object charset,
-                               struct Lisp_Char_Table_Entry *cte,
+                               Lisp_Char_Table_Entry *cte,
                                Lisp_Object printcharfun)
 {
   int i;
                                Lisp_Object printcharfun)
 {
   int i;
@@ -319,7 +319,7 @@ print_chartab_two_byte_charset (Lisp_Object charset,
 static void
 print_char_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
 static void
 print_char_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
-  struct Lisp_Char_Table *ct = XCHAR_TABLE (obj);
+  Lisp_Char_Table *ct = XCHAR_TABLE (obj);
   char buf[200];
 
   sprintf (buf, "#s(char-table type %s data (",
   char buf[200];
 
   sprintf (buf, "#s(char-table type %s data (",
@@ -377,7 +377,7 @@ print_char_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
          }
        else
          {
          }
        else
          {
-           struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (ann);
+           Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (ann);
            if (XCHARSET_DIMENSION (charset) == 1)
              print_chartab_charset_row (charset, -1, cte, printcharfun);
            else
            if (XCHARSET_DIMENSION (charset) == 1)
              print_chartab_charset_row (charset, -1, cte, printcharfun);
            else
@@ -393,8 +393,8 @@ print_char_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 static int
 char_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
 static int
 char_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  struct Lisp_Char_Table *ct1 = XCHAR_TABLE (obj1);
-  struct Lisp_Char_Table *ct2 = XCHAR_TABLE (obj2);
+  Lisp_Char_Table *ct1 = XCHAR_TABLE (obj1);
+  Lisp_Char_Table *ct2 = XCHAR_TABLE (obj2);
   int i;
 
   if (CHAR_TABLE_TYPE (ct1) != CHAR_TABLE_TYPE (ct2))
   int i;
 
   if (CHAR_TABLE_TYPE (ct1) != CHAR_TABLE_TYPE (ct2))
@@ -416,7 +416,7 @@ char_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 static unsigned long
 char_table_hash (Lisp_Object obj, int depth)
 {
 static unsigned long
 char_table_hash (Lisp_Object obj, int depth)
 {
-  struct Lisp_Char_Table *ct = XCHAR_TABLE (obj);
+  Lisp_Char_Table *ct = XCHAR_TABLE (obj);
   unsigned long hashval = internal_array_hash (ct->ascii, NUM_ASCII_CHARS,
                                               depth);
 #ifdef MULE
   unsigned long hashval = internal_array_hash (ct->ascii, NUM_ASCII_CHARS,
                                               depth);
 #ifdef MULE
@@ -427,12 +427,12 @@ char_table_hash (Lisp_Object obj, int depth)
 }
 
 static const struct lrecord_description char_table_description[] = {
 }
 
 static const struct lrecord_description char_table_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Table, ascii), NUM_ASCII_CHARS },
+  { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Char_Table, ascii), NUM_ASCII_CHARS },
 #ifdef MULE
 #ifdef MULE
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Table, level1), NUM_LEADING_BYTES },
+  { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Char_Table, level1), NUM_LEADING_BYTES },
 #endif
 #endif
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Table, mirror_table), 1 },
-  { XD_LO_LINK,     offsetof(struct Lisp_Char_Table, next_table) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Char_Table, mirror_table) },
+  { XD_LO_LINK,     offsetof (Lisp_Char_Table, next_table) },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -440,7 +440,7 @@ DEFINE_LRECORD_IMPLEMENTATION ("char-table", char_table,
                                mark_char_table, print_char_table, 0,
                               char_table_equal, char_table_hash,
                               char_table_description,
                                mark_char_table, print_char_table, 0,
                               char_table_equal, char_table_hash,
                               char_table_description,
-                              struct Lisp_Char_Table);
+                              Lisp_Char_Table);
 
 DEFUN ("char-table-p", Fchar_table_p, 1, 1, 0, /*
 Return non-nil if OBJECT is a char table.
 
 DEFUN ("char-table-p", Fchar_table_p, 1, 1, 0, /*
 Return non-nil if OBJECT is a char table.
@@ -543,7 +543,7 @@ See `valid-char-table-type-p'.
 }
 
 void
 }
 
 void
-fill_char_table (struct Lisp_Char_Table *ct, Lisp_Object value)
+fill_char_table (Lisp_Char_Table *ct, Lisp_Object value)
 {
   int i;
 
 {
   int i;
 
@@ -563,7 +563,7 @@ Reset a char table to its default state.
 */
        (table))
 {
 */
        (table))
 {
-  struct Lisp_Char_Table *ct;
+  Lisp_Char_Table *ct;
 
   CHECK_CHAR_TABLE (table);
   ct = XCHAR_TABLE (table);
 
   CHECK_CHAR_TABLE (table);
   ct = XCHAR_TABLE (table);
@@ -599,11 +599,11 @@ and 'syntax.  See `valid-char-table-type-p'.
 */
        (type))
 {
 */
        (type))
 {
-  struct Lisp_Char_Table *ct;
+  Lisp_Char_Table *ct;
   Lisp_Object obj;
   enum char_table_type ty = symbol_to_char_table_type (type);
 
   Lisp_Object obj;
   enum char_table_type ty = symbol_to_char_table_type (type);
 
-  ct = alloc_lcrecord_type (struct Lisp_Char_Table, &lrecord_char_table);
+  ct = alloc_lcrecord_type (Lisp_Char_Table, &lrecord_char_table);
   ct->type = ty;
   if (ty == CHAR_TABLE_TYPE_SYNTAX)
     {
   ct->type = ty;
   if (ty == CHAR_TABLE_TYPE_SYNTAX)
     {
@@ -631,9 +631,8 @@ make_char_table_entry (Lisp_Object initval)
 {
   Lisp_Object obj;
   int i;
 {
   Lisp_Object obj;
   int i;
-  struct Lisp_Char_Table_Entry *cte =
-    alloc_lcrecord_type (struct Lisp_Char_Table_Entry,
-                        &lrecord_char_table_entry);
+  Lisp_Char_Table_Entry *cte =
+    alloc_lcrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry);
 
   for (i = 0; i < 96; i++)
     cte->level2[i] = initval;
 
   for (i = 0; i < 96; i++)
     cte->level2[i] = initval;
@@ -645,12 +644,11 @@ make_char_table_entry (Lisp_Object initval)
 static Lisp_Object
 copy_char_table_entry (Lisp_Object entry)
 {
 static Lisp_Object
 copy_char_table_entry (Lisp_Object entry)
 {
-  struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (entry);
+  Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (entry);
   Lisp_Object obj;
   int i;
   Lisp_Object obj;
   int i;
-  struct Lisp_Char_Table_Entry *ctenew =
-    alloc_lcrecord_type (struct Lisp_Char_Table_Entry,
-                        &lrecord_char_table_entry);
+  Lisp_Char_Table_Entry *ctenew =
+    alloc_lcrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry);
 
   for (i = 0; i < 96; i++)
     {
 
   for (i = 0; i < 96; i++)
     {
@@ -674,13 +672,13 @@ as OLD-TABLE.  The values will not themselves be copied.
 */
        (old_table))
 {
 */
        (old_table))
 {
-  struct Lisp_Char_Table *ct, *ctnew;
+  Lisp_Char_Table *ct, *ctnew;
   Lisp_Object obj;
   int i;
 
   CHECK_CHAR_TABLE (old_table);
   ct = XCHAR_TABLE (old_table);
   Lisp_Object obj;
   int i;
 
   CHECK_CHAR_TABLE (old_table);
   ct = XCHAR_TABLE (old_table);
-  ctnew = alloc_lcrecord_type (struct Lisp_Char_Table, &lrecord_char_table);
+  ctnew = alloc_lcrecord_type (Lisp_Char_Table, &lrecord_char_table);
   ctnew->type = ct->type;
 
   for (i = 0; i < NUM_ASCII_CHARS; i++)
   ctnew->type = ct->type;
 
   for (i = 0; i < NUM_ASCII_CHARS; i++)
@@ -735,7 +733,7 @@ decode_char_table_range (Lisp_Object range, struct chartab_range *outrange)
 #else /* MULE */
   else if (VECTORP (range))
     {
 #else /* MULE */
   else if (VECTORP (range))
     {
-      struct Lisp_Vector *vec = XVECTOR (range);
+      Lisp_Vector *vec = XVECTOR (range);
       Lisp_Object *elts = vector_data (vec);
       if (vector_length (vec) != 2)
        signal_simple_error ("Length of charset row vector must be 2",
       Lisp_Object *elts = vector_data (vec);
       if (vector_length (vec) != 2)
        signal_simple_error ("Length of charset row vector must be 2",
@@ -775,7 +773,7 @@ decode_char_table_range (Lisp_Object range, struct chartab_range *outrange)
 
 /* called from CHAR_TABLE_VALUE(). */
 Lisp_Object
 
 /* called from CHAR_TABLE_VALUE(). */
 Lisp_Object
-get_non_ascii_char_table_value (struct Lisp_Char_Table *ct, int leading_byte,
+get_non_ascii_char_table_value (Lisp_Char_Table *ct, int leading_byte,
                               Emchar c)
 {
   Lisp_Object val;
                               Emchar c)
 {
   Lisp_Object val;
@@ -786,7 +784,7 @@ get_non_ascii_char_table_value (struct Lisp_Char_Table *ct, int leading_byte,
   val = ct->level1[leading_byte - MIN_LEADING_BYTE];
   if (CHAR_TABLE_ENTRYP (val))
     {
   val = ct->level1[leading_byte - MIN_LEADING_BYTE];
   if (CHAR_TABLE_ENTRYP (val))
     {
-      struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val);
+      Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val);
       val = cte->level2[byte1 - 32];
       if (CHAR_TABLE_ENTRYP (val))
        {
       val = cte->level2[byte1 - 32];
       if (CHAR_TABLE_ENTRYP (val))
        {
@@ -803,7 +801,7 @@ get_non_ascii_char_table_value (struct Lisp_Char_Table *ct, int leading_byte,
 #endif /* MULE */
 
 Lisp_Object
 #endif /* MULE */
 
 Lisp_Object
-get_char_table (Emchar ch, struct Lisp_Char_Table *ct)
+get_char_table (Emchar ch, Lisp_Char_Table *ct)
 {
 #ifdef MULE
   {
 {
 #ifdef MULE
   {
@@ -823,7 +821,7 @@ get_char_table (Emchar ch, struct Lisp_Char_Table *ct)
        val = ct->level1[lb];
        if (CHAR_TABLE_ENTRYP (val))
          {
        val = ct->level1[lb];
        if (CHAR_TABLE_ENTRYP (val))
          {
-           struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val);
+           Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val);
            val = cte->level2[byte1 - 32];
            if (CHAR_TABLE_ENTRYP (val))
              {
            val = cte->level2[byte1 - 32];
            if (CHAR_TABLE_ENTRYP (val))
              {
@@ -848,7 +846,7 @@ Find value for char CH in TABLE.
 */
        (ch, table))
 {
 */
        (ch, table))
 {
-  struct Lisp_Char_Table *ct;
+  Lisp_Char_Table *ct;
 
   CHECK_CHAR_TABLE (table);
   ct = XCHAR_TABLE (table);
 
   CHECK_CHAR_TABLE (table);
   ct = XCHAR_TABLE (table);
@@ -863,7 +861,7 @@ If there is more than one value, return MULTI (defaults to nil).
 */
        (range, table, multi))
 {
 */
        (range, table, multi))
 {
-  struct Lisp_Char_Table *ct;
+  Lisp_Char_Table *ct;
   struct chartab_range rainj;
 
   if (CHAR_OR_CHAR_INTP (range))
   struct chartab_range rainj;
 
   if (CHAR_OR_CHAR_INTP (range))
@@ -1048,7 +1046,7 @@ Signal an error if VALUE is not a valid value for CHAR-TABLE-TYPE.
 /* Assign VAL to all characters in RANGE in char table CT. */
 
 void
 /* Assign VAL to all characters in RANGE in char table CT. */
 
 void
-put_char_table (struct Lisp_Char_Table *ct, struct chartab_range *range,
+put_char_table (Lisp_Char_Table *ct, struct chartab_range *range,
                Lisp_Object val)
 {
   switch (range->type)
                Lisp_Object val)
 {
   switch (range->type)
@@ -1081,7 +1079,7 @@ put_char_table (struct Lisp_Char_Table *ct, struct chartab_range *range,
 
     case CHARTAB_RANGE_ROW:
       {
 
     case CHARTAB_RANGE_ROW:
       {
-       struct Lisp_Char_Table_Entry *cte;
+       Lisp_Char_Table_Entry *cte;
        int lb = XCHARSET_LEADING_BYTE (range->charset) - MIN_LEADING_BYTE;
        /* make sure that there is a separate entry for the row. */
        if (!CHAR_TABLE_ENTRYP (ct->level1[lb]))
        int lb = XCHARSET_LEADING_BYTE (range->charset) - MIN_LEADING_BYTE;
        /* make sure that there is a separate entry for the row. */
        if (!CHAR_TABLE_ENTRYP (ct->level1[lb]))
@@ -1105,7 +1103,7 @@ put_char_table (struct Lisp_Char_Table *ct, struct chartab_range *range,
          ct->ascii[byte1 + 128] = val;
        else
          {
          ct->ascii[byte1 + 128] = val;
        else
          {
-           struct Lisp_Char_Table_Entry *cte;
+           Lisp_Char_Table_Entry *cte;
            int lb = XCHARSET_LEADING_BYTE (charset) - MIN_LEADING_BYTE;
            /* make sure that there is a separate entry for the row. */
            if (!CHAR_TABLE_ENTRYP (ct->level1[lb]))
            int lb = XCHARSET_LEADING_BYTE (charset) - MIN_LEADING_BYTE;
            /* make sure that there is a separate entry for the row. */
            if (!CHAR_TABLE_ENTRYP (ct->level1[lb]))
@@ -1156,7 +1154,7 @@ See `valid-char-table-type-p'.
 */
        (range, val, table))
 {
 */
        (range, val, table))
 {
-  struct Lisp_Char_Table *ct;
+  Lisp_Char_Table *ct;
   struct chartab_range rainj;
 
   CHECK_CHAR_TABLE (table);
   struct chartab_range rainj;
 
   CHECK_CHAR_TABLE (table);
@@ -1171,7 +1169,7 @@ See `valid-char-table-type-p'.
 /* Map FN over the ASCII chars in CT. */
 
 static int
 /* Map FN over the ASCII chars in CT. */
 
 static int
-map_over_charset_ascii (struct Lisp_Char_Table *ct,
+map_over_charset_ascii (Lisp_Char_Table *ct,
                        int (*fn) (struct chartab_range *range,
                                   Lisp_Object val, void *arg),
                        void *arg)
                        int (*fn) (struct chartab_range *range,
                                   Lisp_Object val, void *arg),
                        void *arg)
@@ -1201,7 +1199,7 @@ map_over_charset_ascii (struct Lisp_Char_Table *ct,
 /* Map FN over the Control-1 chars in CT. */
 
 static int
 /* Map FN over the Control-1 chars in CT. */
 
 static int
-map_over_charset_control_1 (struct Lisp_Char_Table *ct,
+map_over_charset_control_1 (Lisp_Char_Table *ct,
                            int (*fn) (struct chartab_range *range,
                                       Lisp_Object val, void *arg),
                            void *arg)
                            int (*fn) (struct chartab_range *range,
                                       Lisp_Object val, void *arg),
                            void *arg)
@@ -1227,7 +1225,7 @@ map_over_charset_control_1 (struct Lisp_Char_Table *ct,
    CTE specifies the char table entry for CHARSET. */
 
 static int
    CTE specifies the char table entry for CHARSET. */
 
 static int
-map_over_charset_row (struct Lisp_Char_Table_Entry *cte,
+map_over_charset_row (Lisp_Char_Table_Entry *cte,
                      Lisp_Object charset, int row,
                      int (*fn) (struct chartab_range *range,
                                 Lisp_Object val, void *arg),
                      Lisp_Object charset, int row,
                      int (*fn) (struct chartab_range *range,
                                 Lisp_Object val, void *arg),
@@ -1267,7 +1265,7 @@ map_over_charset_row (struct Lisp_Char_Table_Entry *cte,
 
 
 static int
 
 
 static int
-map_over_other_charset (struct Lisp_Char_Table *ct, int lb,
+map_over_other_charset (Lisp_Char_Table *ct, int lb,
                        int (*fn) (struct chartab_range *range,
                                   Lisp_Object val, void *arg),
                        void *arg)
                        int (*fn) (struct chartab_range *range,
                                   Lisp_Object val, void *arg),
                        void *arg)
@@ -1290,7 +1288,7 @@ map_over_other_charset (struct Lisp_Char_Table *ct, int lb,
     }
 
   {
     }
 
   {
-    struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val);
+    Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val);
     int charset94_p = (XCHARSET_CHARS (charset) == 94);
     int start = charset94_p ?  33 :  32;
     int stop  = charset94_p ? 127 : 128;
     int charset94_p = (XCHARSET_CHARS (charset) == 94);
     int start = charset94_p ?  33 :  32;
     int stop  = charset94_p ? 127 : 128;
@@ -1324,7 +1322,7 @@ map_over_other_charset (struct Lisp_Char_Table *ct, int lb,
    becomes the return value of map_char_table(). */
 
 int
    becomes the return value of map_char_table(). */
 
 int
-map_char_table (struct Lisp_Char_Table *ct,
+map_char_table (Lisp_Char_Table *ct,
                struct chartab_range *range,
                int (*fn) (struct chartab_range *range,
                           Lisp_Object val, void *arg),
                struct chartab_range *range,
                int (*fn) (struct chartab_range *range,
                           Lisp_Object val, void *arg),
@@ -1451,7 +1449,7 @@ the entire table.
 */
        (function, table, range))
 {
 */
        (function, table, range))
 {
-  struct Lisp_Char_Table *ct;
+  Lisp_Char_Table *ct;
   struct slow_map_char_table_arg slarg;
   struct gcpro gcpro1, gcpro2;
   struct chartab_range rainj;
   struct slow_map_char_table_arg slarg;
   struct gcpro gcpro1, gcpro2;
   struct chartab_range rainj;
@@ -1619,7 +1617,7 @@ check_category_char (Emchar ch, Lisp_Object table,
                     unsigned int designator, unsigned int not)
 {
   REGISTER Lisp_Object temp;
                     unsigned int designator, unsigned int not)
 {
   REGISTER Lisp_Object temp;
-  struct Lisp_Char_Table *ctbl;
+  Lisp_Char_Table *ctbl;
 #ifdef ERROR_CHECK_TYPECHECK
   if (NILP (Fcategory_table_p (table)))
     signal_simple_error ("Expected category table", table);
 #ifdef ERROR_CHECK_TYPECHECK
   if (NILP (Fcategory_table_p (table)))
     signal_simple_error ("Expected category table", table);
index 7ae8051..98901fa 100644 (file)
@@ -24,8 +24,8 @@ Boston, MA 02111-1307, USA.  */
    This file was written independently of the FSF implementation,
    and is not compatible. */
 
    This file was written independently of the FSF implementation,
    and is not compatible. */
 
-#ifndef _MULE_CHARTAB_H
-#define _MULE_CHARTAB_H
+#ifndef INCLUDED_chartab_h_
+#define INCLUDED_chartab_h_
 
 /************************************************************************/
 /*                               Char Tables                            */
 
 /************************************************************************/
 /*                               Char Tables                            */
@@ -37,14 +37,6 @@ Boston, MA 02111-1307, USA.  */
 
 #ifdef MULE
 
 
 #ifdef MULE
 
-DECLARE_LRECORD (char_table_entry, struct Lisp_Char_Table_Entry);
-#define XCHAR_TABLE_ENTRY(x) \
-  XRECORD (x, char_table_entry, struct Lisp_Char_Table_Entry)
-#define XSETCHAR_TABLE_ENTRY(x, p) XSETRECORD (x, p, char_table_entry)
-#define CHAR_TABLE_ENTRYP(x) RECORDP (x, char_table_entry)
-/* #define CHECK_CHAR_TABLE_ENTRY(x) CHECK_RECORD (x, char_table_entry)
-   char table entries should never escape to Lisp */
-
 struct Lisp_Char_Table_Entry
 {
   struct lcrecord_header header;
 struct Lisp_Char_Table_Entry
 {
   struct lcrecord_header header;
@@ -54,19 +46,17 @@ struct Lisp_Char_Table_Entry
      variable-size and add an offset value into this structure. */
   Lisp_Object level2[96];
 };
      variable-size and add an offset value into this structure. */
   Lisp_Object level2[96];
 };
+typedef struct Lisp_Char_Table_Entry Lisp_Char_Table_Entry;
 
 
-#endif /* MULE */
-
-DECLARE_LRECORD (char_table, struct Lisp_Char_Table);
-#define XCHAR_TABLE(x) \
-  XRECORD (x, char_table, struct Lisp_Char_Table)
-#define XSETCHAR_TABLE(x, p) XSETRECORD (x, p, char_table)
-#define CHAR_TABLEP(x) RECORDP (x, char_table)
-#define CHECK_CHAR_TABLE(x) CHECK_RECORD (x, char_table)
-#define CONCHECK_CHAR_TABLE(x) CONCHECK_RECORD (x, char_table)
+DECLARE_LRECORD (char_table_entry, Lisp_Char_Table_Entry);
+#define XCHAR_TABLE_ENTRY(x) \
+  XRECORD (x, char_table_entry, Lisp_Char_Table_Entry)
+#define XSETCHAR_TABLE_ENTRY(x, p) XSETRECORD (x, p, char_table_entry)
+#define CHAR_TABLE_ENTRYP(x) RECORDP (x, char_table_entry)
+/* #define CHECK_CHAR_TABLE_ENTRY(x) CHECK_RECORD (x, char_table_entry)
+   char table entries should never escape to Lisp */
 
 
-#define CHAR_TABLE_TYPE(ct) ((ct)->type)
-#define XCHAR_TABLE_TYPE(ct) CHAR_TABLE_TYPE (XCHAR_TABLE (ct))
+#endif /* MULE */
 
 enum char_table_type
 {
 
 enum char_table_type
 {
@@ -127,17 +117,28 @@ struct Lisp_Char_Table
   Lisp_Object mirror_table;
   Lisp_Object next_table; /* DO NOT mark through this. */
 };
   Lisp_Object mirror_table;
   Lisp_Object next_table; /* DO NOT mark through this. */
 };
+typedef struct Lisp_Char_Table Lisp_Char_Table;
+
+DECLARE_LRECORD (char_table, Lisp_Char_Table);
+#define XCHAR_TABLE(x) XRECORD (x, char_table, Lisp_Char_Table)
+#define XSETCHAR_TABLE(x, p) XSETRECORD (x, p, char_table)
+#define CHAR_TABLEP(x) RECORDP (x, char_table)
+#define CHECK_CHAR_TABLE(x) CHECK_RECORD (x, char_table)
+#define CONCHECK_CHAR_TABLE(x) CONCHECK_RECORD (x, char_table)
+
+#define CHAR_TABLE_TYPE(ct) ((ct)->type)
+#define XCHAR_TABLE_TYPE(ct) CHAR_TABLE_TYPE (XCHAR_TABLE (ct))
 
 #ifdef MULE
 
 
 #ifdef MULE
 
-Lisp_Object get_non_ascii_char_table_value (struct Lisp_Char_Table *ct,
-                                          int leading_byte,
-                                          Emchar c);
+Lisp_Object get_non_ascii_char_table_value (Lisp_Char_Table *ct,
+                                           int leading_byte,
+                                           Emchar c);
 
 INLINE Lisp_Object
 
 INLINE Lisp_Object
-CHAR_TABLE_NON_ASCII_VALUE_UNSAFE (struct Lisp_Char_Table *ct, Emchar ch);
+CHAR_TABLE_NON_ASCII_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch);
 INLINE Lisp_Object
 INLINE Lisp_Object
-CHAR_TABLE_NON_ASCII_VALUE_UNSAFE (struct Lisp_Char_Table *ct, Emchar ch)
+CHAR_TABLE_NON_ASCII_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch)
 {
   unsigned char lb = CHAR_LEADING_BYTE (ch);
   if (!CHAR_TABLE_ENTRYP ((ct)->level1[lb - MIN_LEADING_BYTE]))
 {
   unsigned char lb = CHAR_LEADING_BYTE (ch);
   if (!CHAR_TABLE_ENTRYP ((ct)->level1[lb - MIN_LEADING_BYTE]))
@@ -175,11 +176,11 @@ struct chartab_range
   int row;
 };
 
   int row;
 };
 
-void fill_char_table (struct Lisp_Char_Table *ct, Lisp_Object value);
-void put_char_table (struct Lisp_Char_Table *ct, struct chartab_range *range,
+void fill_char_table (Lisp_Char_Table *ct, Lisp_Object value);
+void put_char_table (Lisp_Char_Table *ct, struct chartab_range *range,
                     Lisp_Object val);
                     Lisp_Object val);
-Lisp_Object get_char_table (Emchar, struct Lisp_Char_Table *);
-int map_char_table (struct Lisp_Char_Table *ct,
+Lisp_Object get_char_table (Emchar, Lisp_Char_Table *);
+int map_char_table (Lisp_Char_Table *ct,
                    struct chartab_range *range,
                    int (*fn) (struct chartab_range *range,
                               Lisp_Object val, void *arg),
                    struct chartab_range *range,
                    int (*fn) (struct chartab_range *range,
                               Lisp_Object val, void *arg),
@@ -229,4 +230,4 @@ extern Lisp_Object Vstandard_category_table;
 
 #endif /* MULE */
 
 
 #endif /* MULE */
 
-#endif /* _MULE_CHARTAB_H */
+#endif /* INCLUDED_chartab_h_ */
index 0442b20..3a70891 100644 (file)
--- a/src/cm.h
+++ b/src/cm.h
@@ -23,8 +23,8 @@ Boston, MA 02111-1307, USA.  */
 /* #### Chuck -- This file should be deleted.  I'm not deleting it yet
    because there might be something you want out of it. */
 
 /* #### Chuck -- This file should be deleted.  I'm not deleting it yet
    because there might be something you want out of it. */
 
-#ifndef _XEMACS_CM_H_
-#define _XEMACS_CM_H_
+#ifndef INCLUDED_cm_h_
+#define INCLUDED_cm_h_
 
 /* Holds the minimum and maximum costs for the parametrized capabilities.  */
 struct parmcap
 
 /* Holds the minimum and maximum costs for the parametrized capabilities.  */
 struct parmcap
@@ -181,4 +181,4 @@ void cmgoto (int, int);
 void Wcm_clear (void);
 int Wcm_init (void);
 
 void Wcm_clear (void);
 int Wcm_init (void);
 
-#endif /* _XEMACS_CM_H_ */
+#endif /* INCLUDED_cm_h_ */
index 8e68640..5470341 100644 (file)
@@ -327,7 +327,7 @@ internal_self_insert (Emchar c1, int noautofill)
   REGISTER enum syntaxcode synt;
   REGISTER Emchar c2;
   Lisp_Object overwrite;
   REGISTER enum syntaxcode synt;
   REGISTER Emchar c2;
   Lisp_Object overwrite;
-  struct Lisp_Char_Table *syntax_table;
+  Lisp_Char_Table *syntax_table;
   struct buffer *buf = current_buffer;
   int tab_width;
 
   struct buffer *buf = current_buffer;
   int tab_width;
 
index 3fcfcda..0c1d755 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: FSF 19.30. */
 
 
 /* Synched up with: FSF 19.30. */
 
-#ifndef _XEMACS_COMMANDS_H_
-#define _XEMACS_COMMANDS_H_
+#ifndef INCLUDED_commands_h_
+#define INCLUDED_commands_h_
 
 #if 0 /* FSFmacs */
 #define Ctl(c) ((c)&037)
 
 #if 0 /* FSFmacs */
 #define Ctl(c) ((c)&037)
@@ -125,4 +125,4 @@ Lisp_Object zmacs_region_buffer (void);
 
 extern Lisp_Object Vthis_command_keys; /* event-stream.c */
 
 
 extern Lisp_Object Vthis_command_keys; /* event-stream.c */
 
-#endif /* _XEMACS_COMMANDS_H_ */
+#endif /* INCLUDED_commands_h_ */
index 2b131ac..b7d25c0 100644 (file)
@@ -267,7 +267,9 @@ char *alloca();
 #undef HAVE_FPATHCONF
 #undef HAVE_FREXP
 #undef HAVE_FTIME
 #undef HAVE_FPATHCONF
 #undef HAVE_FREXP
 #undef HAVE_FTIME
+#undef HAVE_GETADDRINFO
 #undef HAVE_GETHOSTNAME
 #undef HAVE_GETHOSTNAME
+#undef HAVE_GETNAMEINFO
 #undef HAVE_GETPAGESIZE
 #undef HAVE_GETTIMEOFDAY
 #undef HAVE_GETWD
 #undef HAVE_GETPAGESIZE
 #undef HAVE_GETTIMEOFDAY
 #undef HAVE_GETWD
@@ -400,17 +402,32 @@ char *alloca();
 /* Check the entire extent structure of a buffer each time an extent
    change is done, and do other extent-related checks. */
 #undef ERROR_CHECK_EXTENTS
 /* Check the entire extent structure of a buffer each time an extent
    change is done, and do other extent-related checks. */
 #undef ERROR_CHECK_EXTENTS
+
 /* Make sure that all X... macros are dereferencing the correct type,
    and that all XSET... macros (as much as possible) are setting the
    correct type of structure.  Highly recommended for all
    development work. */
 #undef ERROR_CHECK_TYPECHECK
 /* Make sure that all X... macros are dereferencing the correct type,
    and that all XSET... macros (as much as possible) are setting the
    correct type of structure.  Highly recommended for all
    development work. */
 #undef ERROR_CHECK_TYPECHECK
+#ifdef ERROR_CHECK_TYPECHECK
+#define type_checking_assert(assertion) assert (assertion)
+#else
+#define type_checking_assert(assertion)
+#endif
+
 /* Make sure valid buffer positions are passed to BUF_* macros. */
 #undef ERROR_CHECK_BUFPOS
 /* Make sure valid buffer positions are passed to BUF_* macros. */
 #undef ERROR_CHECK_BUFPOS
+#ifdef ERROR_CHECK_BUFPOS
+#define bufpos_checking_assert(assertion) assert (assertion)
+#else
+#define bufpos_checking_assert(assertion)
+#endif
+
 /* Attempt to catch bugs related to garbage collection (e.g. not GCPRO'ing). */
 #undef ERROR_CHECK_GC
 /* Attempt to catch bugs related to garbage collection (e.g. not GCPRO'ing). */
 #undef ERROR_CHECK_GC
+
 /* Attempt to catch freeing of a non-malloc()ed block, heap corruption, etc. */
 #undef ERROR_CHECK_MALLOC
 /* Attempt to catch freeing of a non-malloc()ed block, heap corruption, etc. */
 #undef ERROR_CHECK_MALLOC
+
 /* Minor sanity checking of the bytecode interpreter.  Useful for
    debugging the byte compiler.  */
 #undef ERROR_CHECK_BYTE_CODE
 /* Minor sanity checking of the bytecode interpreter.  Useful for
    debugging the byte compiler.  */
 #undef ERROR_CHECK_BYTE_CODE
@@ -612,6 +629,7 @@ extern "C" {
 #undef LWLIB_TABS_LUCID
 #undef LWLIB_WIDGETS_MOTIF
 #undef LWLIB_WIDGETS_ATHENA
 #undef LWLIB_TABS_LUCID
 #undef LWLIB_WIDGETS_MOTIF
 #undef LWLIB_WIDGETS_ATHENA
+#undef HAVE_ATHENA_3D
 
 /* Other things that can be disabled by configure. */
 #undef HAVE_MENUBARS
 
 /* Other things that can be disabled by configure. */
 #undef HAVE_MENUBARS
index 3370b56..8d15ccc 100644 (file)
@@ -31,9 +31,12 @@ Boston, MA 02111-1307, USA.  */
 
 #include "console-msw.h"
 
 
 #include "console-msw.h"
 
-
 DEFINE_CONSOLE_TYPE (mswindows);
 DEFINE_CONSOLE_TYPE (mswindows);
+DEFINE_CONSOLE_TYPE (msprinter);
 
 
+/************************************************************************/
+/*                       mswindows console methods                      */
+/************************************************************************/
 
 static int
 mswindows_initially_selected_for_input (struct console *con)
 
 static int
 mswindows_initially_selected_for_input (struct console *con)
@@ -41,7 +44,32 @@ mswindows_initially_selected_for_input (struct console *con)
   return 1;
 }
 
   return 1;
 }
 
+static Lisp_Object
+mswindows_canonicalize_console_connection (Lisp_Object connection,
+                                          Error_behavior errb)
+{
+  /* Do not allow more than one mswindows device, by explicitly
+     requiring that CONNECTION is nil, the only allowed connection in
+     Windows. */
+  if (!NILP (connection))
+    {
+      if (ERRB_EQ (errb, ERROR_ME))
+       signal_simple_error
+         ("Invalid (non-nil) connection for mswindows device/console",
+          connection);
+      else
+       return Qunbound;
+    }
+
+  return Qnil;
+}
 
 
+static Lisp_Object
+mswindows_canonicalize_device_connection (Lisp_Object connection,
+                                         Error_behavior errb)
+{
+  return mswindows_canonicalize_console_connection (connection, errb);
+}
 
 \f
 /************************************************************************/
 
 \f
 /************************************************************************/
@@ -63,16 +91,19 @@ console_type_create_mswindows (void)
 /*  CONSOLE_HAS_METHOD (mswindows, mark_console); */
   CONSOLE_HAS_METHOD (mswindows, initially_selected_for_input);
 /*  CONSOLE_HAS_METHOD (mswindows, delete_console); */
 /*  CONSOLE_HAS_METHOD (mswindows, mark_console); */
   CONSOLE_HAS_METHOD (mswindows, initially_selected_for_input);
 /*  CONSOLE_HAS_METHOD (mswindows, delete_console); */
-/*  CONSOLE_HAS_METHOD (mswindows, canonicalize_console_connection); */
-/*  CONSOLE_HAS_METHOD (mswindows, canonicalize_device_connection); */
+  CONSOLE_HAS_METHOD (mswindows, canonicalize_console_connection);
+  CONSOLE_HAS_METHOD (mswindows, canonicalize_device_connection);
 /*  CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_console_connection); */
 /*  CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_device_connection); */
 /*  CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_console_connection); */
 /*  CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_device_connection); */
+
+  INITIALIZE_CONSOLE_TYPE (msprinter, "msprinter", "console-msprinter-p");
 }
 
 void
 reinit_console_type_create_mswindows (void)
 {
   REINITIALIZE_CONSOLE_TYPE (mswindows);
 }
 
 void
 reinit_console_type_create_mswindows (void)
 {
   REINITIALIZE_CONSOLE_TYPE (mswindows);
+  REINITIALIZE_CONSOLE_TYPE (msprinter);
 }
 
 void
 }
 
 void
@@ -102,19 +133,19 @@ DOPAQUE_DATA (Lisp_Object obj)
   return OPAQUEP (obj) ? OPAQUE_DATA (XOPAQUE (obj)) : NULL;
 }
 
   return OPAQUEP (obj) ? OPAQUE_DATA (XOPAQUE (obj)) : NULL;
 }
 
-struct Lisp_Event *
+Lisp_Event *
 DEVENT (Lisp_Object obj)
 {
   return EVENTP (obj) ? XEVENT (obj) : NULL;
 }
 
 DEVENT (Lisp_Object obj)
 {
   return EVENTP (obj) ? XEVENT (obj) : NULL;
 }
 
-struct Lisp_Cons *
+Lisp_Cons *
 DCONS (Lisp_Object obj)
 {
   return CONSP (obj) ? XCONS (obj) : NULL;
 }
 
 DCONS (Lisp_Object obj)
 {
   return CONSP (obj) ? XCONS (obj) : NULL;
 }
 
-struct Lisp_Cons *
+Lisp_Cons *
 DCONSCDR (Lisp_Object obj)
 {
   return (CONSP (obj) && CONSP (XCDR (obj))) ? XCONS (XCDR (obj)) : 0;
 DCONSCDR (Lisp_Object obj)
 {
   return (CONSP (obj) && CONSP (XCDR (obj))) ? XCONS (XCDR (obj)) : 0;
@@ -126,13 +157,13 @@ DSTRING (Lisp_Object obj)
   return STRINGP (obj) ? XSTRING_DATA (obj) : NULL;
 }
 
   return STRINGP (obj) ? XSTRING_DATA (obj) : NULL;
 }
 
-struct Lisp_Vector *
+Lisp_Vector *
 DVECTOR (Lisp_Object obj)
 {
   return VECTORP (obj) ? XVECTOR (obj) : NULL;
 }
 
 DVECTOR (Lisp_Object obj)
 {
   return VECTORP (obj) ? XVECTOR (obj) : NULL;
 }
 
-struct Lisp_Symbol *
+Lisp_Symbol *
 DSYMBOL (Lisp_Object obj)
 {
   return SYMBOLP (obj) ? XSYMBOL (obj) : NULL;
 DSYMBOL (Lisp_Object obj)
 {
   return SYMBOLP (obj) ? XSYMBOL (obj) : NULL;
@@ -144,4 +175,4 @@ DSYMNAME (Lisp_Object obj)
   return SYMBOLP (obj) ? string_data (XSYMBOL (obj)->name) : NULL;
 }
 
   return SYMBOLP (obj) ? string_data (XSYMBOL (obj)->name) : NULL;
 }
 
-#endif
+#endif /* DEBUG_XEMACS */
index f3a6c3b..fe28e64 100644 (file)
@@ -29,8 +29,8 @@ Boston, MA 02111-1307, USA.  */
    Rewritten for mswindows by Jonathan Harris, November 1997 for 21.0.
  */
 
    Rewritten for mswindows by Jonathan Harris, November 1997 for 21.0.
  */
 
-#ifndef _XEMACS_CONSOLE_MSW_H_
-#define _XEMACS_CONSOLE_MSW_H_
+#ifndef INCLUDED_console_msw_h_
+#define INCLUDED_console_msw_h_
 
 #include "console.h"
 #ifdef CONST                   /* I suspect this is safe */
 
 #include "console.h"
 #ifdef CONST                   /* I suspect this is safe */
@@ -80,6 +80,7 @@ struct mswindows_console
   int infd, outfd;
 };
 
   int infd, outfd;
 };
 
+DECLARE_CONSOLE_TYPE (msprinter);
 
 /*
  * Device
 
 /*
  * Device
@@ -87,12 +88,6 @@ struct mswindows_console
 
 #define MSW_FONTSIZE (LF_FACESIZE*4+12)
 
 
 #define MSW_FONTSIZE (LF_FACESIZE*4+12)
 
-struct mswindows_font_enum
-{
-  char fontname[MSW_FONTSIZE];
-  struct mswindows_font_enum *next;
-};
-
 struct mswindows_device
 {
   int logpixelsx, logpixelsy;
 struct mswindows_device
 {
   int logpixelsx, logpixelsy;
@@ -100,7 +95,7 @@ struct mswindows_device
   int horzres, vertres;                /* Size in pixels */
   int horzsize, vertsize;      /* Size in mm */
   int bitspixel;
   int horzres, vertres;                /* Size in pixels */
   int horzsize, vertsize;      /* Size in mm */
   int bitspixel;
-  struct mswindows_font_enum *fontlist;
+  Lisp_Object fontlist;                /* List of strings, device fonts */
 };
 
 #define DEVICE_MSWINDOWS_DATA(d) DEVICE_TYPE_DATA (d, mswindows)
 };
 
 #define DEVICE_MSWINDOWS_DATA(d) DEVICE_TYPE_DATA (d, mswindows)
@@ -115,6 +110,35 @@ struct mswindows_device
 #define DEVICE_MSWINDOWS_BITSPIXEL(d)  (DEVICE_MSWINDOWS_DATA (d)->bitspixel)
 #define DEVICE_MSWINDOWS_FONTLIST(d)   (DEVICE_MSWINDOWS_DATA (d)->fontlist)
 
 #define DEVICE_MSWINDOWS_BITSPIXEL(d)  (DEVICE_MSWINDOWS_DATA (d)->bitspixel)
 #define DEVICE_MSWINDOWS_FONTLIST(d)   (DEVICE_MSWINDOWS_DATA (d)->fontlist)
 
+struct msprinter_device
+{
+  HDC hdc;
+  HANDLE hprinter;
+  Lisp_Object fontlist;
+  char* name;
+  DEVMODE *devmode, *devmode_mirror;
+  size_t devmode_size;
+};
+
+#define DEVICE_MSPRINTER_DATA(d) DEVICE_TYPE_DATA (d, msprinter)
+#define DEVICE_MSPRINTER_HDC(d)        (DEVICE_MSPRINTER_DATA (d)->hdc)
+#define DEVICE_MSPRINTER_HPRINTER(d)   (DEVICE_MSPRINTER_DATA (d)->hprinter)
+#define DEVICE_MSPRINTER_FONTLIST(d)   (DEVICE_MSPRINTER_DATA (d)->fontlist)
+#define DEVICE_MSPRINTER_NAME(d)       (DEVICE_MSPRINTER_DATA (d)->name)
+#define DEVICE_MSPRINTER_DEVMODE(d)    (DEVICE_MSPRINTER_DATA (d)->devmode)
+#define DEVICE_MSPRINTER_DEVMODE_MIRROR(d) \
+       (DEVICE_MSPRINTER_DATA (d)->devmode_mirror)
+#define DEVICE_MSPRINTER_DEVMODE_SIZE(d) \
+       (DEVICE_MSPRINTER_DATA (d)->devmode_size)
+
+#define CONSOLE_TYPESYM_MSPRINTER_P(typesym) EQ (typesym, Qmsprinter)
+#define DEVICE_MSPRINTER_P(dev) CONSOLE_TYPESYM_MSPRINTER_P (DEVICE_TYPE (dev))
+#define CHECK_MSPRINTER_DEVICE(z) CHECK_DEVICE_TYPE (z, msprinter)
+#define CONCHECK_MSPRINTER_DEVICE(z) CONCHECK_DEVICE_TYPE (z, msprinter)
+
+/* Printer functions */
+DEVMODE* msprinter_get_devmode_copy (struct device *d);
+void msprinter_apply_devmode (struct device *d, DEVMODE *devmode);
 
 /*
  * Frame
 
 /*
  * Frame
@@ -206,6 +230,31 @@ struct mswindows_frame
 #define XWL_COUNT      1       /* Number of LONGs that we use */
 #define MSWINDOWS_WINDOW_EXTRA_BYTES   (XWL_COUNT*4)
 
 #define XWL_COUNT      1       /* Number of LONGs that we use */
 #define MSWINDOWS_WINDOW_EXTRA_BYTES   (XWL_COUNT*4)
 
+/*
+ * Printer frame, aka printer job
+ */
+
+struct msprinter_frame
+{
+  HDC hcdc;                            /* Compatoble DC */
+  int left_margin, top_margin,         /* All in twips */
+    right_margin, bottom_margin;
+  int charheight, charwidth;           /* As per proplist or -1 if not gven */
+  Lisp_Object orientation, duplex;     /* nil for printer's default */
+  int job_started : 1;
+};
+
+#define FRAME_MSPRINTER_DATA(f) FRAME_TYPE_DATA (f, msprinter)
+#define FRAME_MSPRINTER_LEFT_MARGIN(f)  (FRAME_MSPRINTER_DATA (f)->left_margin)
+#define FRAME_MSPRINTER_RIGHT_MARGIN(f)         (FRAME_MSPRINTER_DATA (f)->top_margin)
+#define FRAME_MSPRINTER_TOP_MARGIN(f)   (FRAME_MSPRINTER_DATA (f)->right_margin)
+#define FRAME_MSPRINTER_BOTTOM_MARGIN(f) (FRAME_MSPRINTER_DATA (f)->bottom_margin)
+#define FRAME_MSPRINTER_CDC(f)          (FRAME_MSPRINTER_DATA (f)->hcdc)
+#define FRAME_MSPRINTER_JOB_STARTED(f)  (FRAME_MSPRINTER_DATA (f)->job_started)
+#define FRAME_MSPRINTER_ORIENTATION(f)  (FRAME_MSPRINTER_DATA (f)->orientation)
+#define FRAME_MSPRINTER_DUPLEX(f)       (FRAME_MSPRINTER_DATA (f)->duplex)
+#define FRAME_MSPRINTER_CHARWIDTH(f)    (FRAME_MSPRINTER_DATA (f)->charheight)
+#define FRAME_MSPRINTER_CHARHEIGHT(f)   (FRAME_MSPRINTER_DATA (f)->charwidth)
 
 /*
  * Events
 
 /*
  * Events
@@ -233,7 +282,7 @@ LRESULT WINAPI mswindows_control_wnd_proc (HWND hwnd,
 void mswindows_redraw_exposed_area (struct frame *f, int x, int y, 
                                    int width, int height);
 void mswindows_size_frame_internal (struct frame* f, XEMACS_RECT_WH* dest);
 void mswindows_redraw_exposed_area (struct frame *f, int x, int y, 
                                    int width, int height);
 void mswindows_size_frame_internal (struct frame* f, XEMACS_RECT_WH* dest);
-void mswindows_enqueue_magic_event (HWND hwnd, UINT message);
+void mswindows_enqueue_magic_event (HWND hwnd, UINT msg);
 
 /* win32 DDE management library */
 #define MSWINDOWS_DDE_ITEM_OPEN "Open"
 
 /* win32 DDE management library */
 #define MSWINDOWS_DDE_ITEM_OPEN "Open"
@@ -248,19 +297,42 @@ HDDEDATA CALLBACK mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv,
 void mswindows_enqueue_misc_user_event (Lisp_Object channel,
                                        Lisp_Object function,
                                        Lisp_Object object);
 void mswindows_enqueue_misc_user_event (Lisp_Object channel,
                                        Lisp_Object function,
                                        Lisp_Object object);
-Lisp_Object mswindows_cancel_dispatch_event (struct Lisp_Event* event);
+Lisp_Object mswindows_cancel_dispatch_event (Lisp_Event* event);
 Lisp_Object mswindows_pump_outstanding_events (void);
 Lisp_Object mswindows_protect_modal_loop (Lisp_Object (*bfun) (Lisp_Object barg),
                                          Lisp_Object barg);
 void mswindows_unmodalize_signal_maybe (void);
 
 Lisp_Object mswindows_pump_outstanding_events (void);
 Lisp_Object mswindows_protect_modal_loop (Lisp_Object (*bfun) (Lisp_Object barg),
                                          Lisp_Object barg);
 void mswindows_unmodalize_signal_maybe (void);
 
+#ifdef HAVE_TOOLBARS
+Lisp_Object
+mswindows_get_toolbar_button_text ( struct frame* f, int command_id );
+Lisp_Object
+mswindows_handle_toolbar_wm_command (struct frame* f, HWND ctrl, WORD id);
+#endif
+Lisp_Object
+mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, DWORD id);
+COLORREF mswindows_string_to_color (CONST char *name);
+USID emacs_mswindows_create_stream_pair (void* inhandle, void* outhandle,
+                                        Lisp_Object* instream,
+                                        Lisp_Object* outstream,
+                                        int flags);
+USID emacs_mswindows_delete_stream_pair (Lisp_Object instream,
+                                        Lisp_Object outstream);
+
 #ifdef HAVE_WIN32_PROCESSES
 #ifdef HAVE_WIN32_PROCESSES
-HANDLE get_nt_process_handle (struct Lisp_Process *p);
+HANDLE get_nt_process_handle (Lisp_Process *p);
 #endif
 
 extern Lisp_Object Vmswindows_frame_being_created;
 extern Lisp_Object mswindows_frame_being_created;
 
 #endif
 
 extern Lisp_Object Vmswindows_frame_being_created;
 extern Lisp_Object mswindows_frame_being_created;
 
-void mswindows_enumerate_fonts (struct device *d);
+Lisp_Object mswindows_enumerate_fonts (HDC hdc);
+
+Lisp_Object mswindows_get_toolbar_button_text (struct frame* f,
+                                              int command_id);
+Lisp_Object mswindows_handle_toolbar_wm_command (struct frame* f,
+                                                HWND ctrl, WORD id);
+Lisp_Object mswindows_handle_gui_wm_command (struct frame* f,
+                                            HWND ctrl, DWORD id);
 
 
-#endif /* _XEMACS_CONSOLE_MSW_H_ */
+#endif /* INCLUDED_console_msw_h_ */
index e70165c..a82bd99 100644 (file)
@@ -23,8 +23,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Written by Ben Wing. */
 
 
 /* Written by Ben Wing. */
 
-#ifndef _XEMACS_CONSOLE_STREAM_H_
-#define _XEMACS_CONSOLE_STREAM_H_
+#ifndef INCLUDED_console_stream_h_
+#define INCLUDED_console_stream_h_
 
 #include "console.h"
 
 
 #include "console.h"
 
@@ -50,4 +50,4 @@ Lisp_Object stream_semi_canonicalize_device_connection(Lisp_Object,
                                                       Error_behavior);
 Lisp_Object stream_canonicalize_device_connection(Lisp_Object,
                                                  Error_behavior);
                                                       Error_behavior);
 Lisp_Object stream_canonicalize_device_connection(Lisp_Object,
                                                  Error_behavior);
-#endif /* _XEMACS_CONSOLE_STREAM_H_ */
+#endif /* INCLUDED_console_stream_h_ */
index 12fc504..c8912fb 100644 (file)
@@ -283,7 +283,7 @@ CODESYS defaults to the value of `terminal-coding-system'.
   return Qnil;
 }
 
   return Qnil;
 }
 
-/* ### Move this function to lisp */
+/* #### Move this function to lisp */
 DEFUN ("set-console-tty-coding-system", Fset_console_tty_coding_system,
        0, 2, 0, /*
 Set the input and output coding systems of tty console CONSOLE to CODESYS.
 DEFUN ("set-console-tty-coding-system", Fset_console_tty_coding_system,
        0, 2, 0, /*
 Set the input and output coding systems of tty console CONSOLE to CODESYS.
index a7bbd2b..024eaf5 100644 (file)
@@ -29,8 +29,8 @@ Boston, MA 02111-1307, USA.  */
    have more than one device on a TTY console, the output stuff
    will have to get separated out. */
 
    have more than one device on a TTY console, the output stuff
    will have to get separated out. */
 
-#ifndef _XEMACS_CONSOLE_TTY_H_
-#define _XEMACS_CONSOLE_TTY_H_
+#ifndef INCLUDED_console_tty_h_
+#define INCLUDED_console_tty_h_
 
 #include "console.h"
 #include "syssignal.h" /* Always include before systty.h */
 
 #include "console.h"
 #include "syssignal.h" /* Always include before systty.h */
@@ -289,4 +289,4 @@ Lisp_Object tty_canonicalize_device_connection (Lisp_Object connection,
                                                Error_behavior errb);
 struct console * tty_find_console_from_fd (int fd);
 
                                                Error_behavior errb);
 struct console * tty_find_console_from_fd (int fd);
 
-#endif /* _XEMACS_CONSOLE_TTY_H_ */
+#endif /* INCLUDED_console_tty_h_ */
index 2470521..05d9ac3 100644 (file)
@@ -140,12 +140,12 @@ get_display_arg_connection (void)
       /* assert: display_arg is only set if we found the display
         arg earlier so we can't fail to find it now. */
       assert (disp_name != NULL);
       /* assert: display_arg is only set if we found the display
         arg earlier so we can't fail to find it now. */
       assert (disp_name != NULL);
-      conn = build_ext_string (disp_name, FORMAT_CTEXT);
+      conn = build_ext_string (disp_name, Qctext);
       free_argc_argv (argv);
       return conn;
     }
   else
       free_argc_argv (argv);
       return conn;
     }
   else
-    return build_ext_string (XDisplayName (0), FORMAT_CTEXT);
+    return build_ext_string (XDisplayName (0), Qctext);
 }
 
 /* "semi-canonicalize" means convert to a nicer form for printing, but
 }
 
 /* "semi-canonicalize" means convert to a nicer form for printing, but
index cbf0161..e4f9c19 100644 (file)
@@ -29,8 +29,8 @@ Boston, MA 02111-1307, USA.  */
       multi-device work by Chuck Thompson).
  */
 
       multi-device work by Chuck Thompson).
  */
 
-#ifndef _XEMACS_CONSOLE_X_H_
-#define _XEMACS_CONSOLE_X_H_
+#ifndef INCLUDED_console_x_h_
+#define INCLUDED_console_x_h_
 
 #ifdef HAVE_X_WINDOWS
 
 
 #ifdef HAVE_X_WINDOWS
 
@@ -95,7 +95,7 @@ struct x_device
   Atom Xatom_WM_TAKE_FOCUS;
   Atom Xatom_WM_STATE;
 
   Atom Xatom_WM_TAKE_FOCUS;
   Atom Xatom_WM_STATE;
 
-  /* allocated in Xatoms_of_xselect in xselect.c */
+  /* allocated in Xatoms_of_select_x in xselect.c */
   Atom Xatom_CLIPBOARD;
   Atom Xatom_TIMESTAMP;
   Atom Xatom_TEXT;
   Atom Xatom_CLIPBOARD;
   Atom Xatom_TIMESTAMP;
   Atom Xatom_TEXT;
@@ -213,7 +213,7 @@ struct x_device
 #define DEVICE_XATOM_WM_TAKE_FOCUS(d)   (DEVICE_X_DATA (d)->Xatom_WM_TAKE_FOCUS)
 #define DEVICE_XATOM_WM_STATE(d)        (DEVICE_X_DATA (d)->Xatom_WM_STATE)
 
 #define DEVICE_XATOM_WM_TAKE_FOCUS(d)   (DEVICE_X_DATA (d)->Xatom_WM_TAKE_FOCUS)
 #define DEVICE_XATOM_WM_STATE(d)        (DEVICE_X_DATA (d)->Xatom_WM_STATE)
 
-/* allocated in Xatoms_of_xselect in xselect.c */
+/* allocated in Xatoms_of_select_x in xselect.c */
 #define DEVICE_XATOM_CLIPBOARD(d)      (DEVICE_X_DATA (d)->Xatom_CLIPBOARD)
 #define DEVICE_XATOM_TIMESTAMP(d)      (DEVICE_X_DATA (d)->Xatom_TIMESTAMP)
 #define DEVICE_XATOM_TEXT(d)           (DEVICE_X_DATA (d)->Xatom_TEXT)
 #define DEVICE_XATOM_CLIPBOARD(d)      (DEVICE_X_DATA (d)->Xatom_CLIPBOARD)
 #define DEVICE_XATOM_TIMESTAMP(d)      (DEVICE_X_DATA (d)->Xatom_TIMESTAMP)
 #define DEVICE_XATOM_TEXT(d)           (DEVICE_X_DATA (d)->Xatom_TEXT)
@@ -398,7 +398,7 @@ void x_handle_selection_request (XSelectionRequestEvent *event);
 void x_handle_selection_clear (XSelectionClearEvent *event);
 void x_handle_property_notify (XPropertyEvent *event);
 
 void x_handle_selection_clear (XSelectionClearEvent *event);
 void x_handle_property_notify (XPropertyEvent *event);
 
-void Xatoms_of_xselect (struct device *d);
+void Xatoms_of_select_x (struct device *d);
 void Xatoms_of_objects_x (struct device *d);
 
 void x_wm_set_shell_iconic_p (Widget shell, int iconic_p);
 void Xatoms_of_objects_x (struct device *d);
 
 void x_wm_set_shell_iconic_p (Widget shell, int iconic_p);
@@ -419,7 +419,7 @@ void x_output_string (struct window *w, struct display_line *dl,
                      int start_pixpos, int width, face_index findex,
                      int cursor, int cursor_start, int cursor_width,
                      int cursor_height);
                      int start_pixpos, int width, face_index findex,
                      int cursor, int cursor_start, int cursor_width,
                      int cursor_height);
-void x_output_x_pixmap (struct frame *f, struct Lisp_Image_Instance *p,
+void x_output_x_pixmap (struct frame *f, Lisp_Image_Instance *p,
                        int x, int y, int xoffset, int yoffset,
                        int width, int height,
                        unsigned long fg, unsigned long bg,
                        int x, int y, int xoffset, int yoffset,
                        int width, int height,
                        unsigned long fg, unsigned long bg,
@@ -492,4 +492,5 @@ extern int in_specifier_change_function;
 extern Lisp_Object Vx_initial_argv_list; /* #### ugh! */
 
 #endif /* HAVE_X_WINDOWS */
 extern Lisp_Object Vx_initial_argv_list; /* #### ugh! */
 
 #endif /* HAVE_X_WINDOWS */
-#endif /* _XEMACS_DEVICE_X_H_ */
+
+#endif /* INCLUDED_console_x_h_ */
index 00c1f13..ae16eaa 100644 (file)
@@ -129,7 +129,7 @@ print_console (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
   sprintf (buf, "#<%s-console", !CONSOLE_LIVE_P (con) ? "dead" :
           CONSOLE_TYPE_NAME (con));
   write_c_string (buf, printcharfun);
   sprintf (buf, "#<%s-console", !CONSOLE_LIVE_P (con) ? "dead" :
           CONSOLE_TYPE_NAME (con));
   write_c_string (buf, printcharfun);
-  if (CONSOLE_LIVE_P (con))
+  if (CONSOLE_LIVE_P (con) && !NILP (CONSOLE_CONNECTION (con)))
     {
       write_c_string (" on ", printcharfun);
       print_internal (CONSOLE_CONNECTION (con), printcharfun, 1);
     {
       write_c_string (" on ", printcharfun);
       print_internal (CONSOLE_CONNECTION (con), printcharfun, 1);
@@ -355,16 +355,24 @@ static Lisp_Object
 semi_canonicalize_console_connection (struct console_methods *meths,
                                      Lisp_Object name, Error_behavior errb)
 {
 semi_canonicalize_console_connection (struct console_methods *meths,
                                      Lisp_Object name, Error_behavior errb)
 {
-  return CONTYPE_METH_OR_GIVEN (meths, semi_canonicalize_console_connection,
-                               (name, errb), name);
+  if (HAS_CONTYPE_METH_P (meths, semi_canonicalize_console_connection))
+    return CONTYPE_METH (meths, semi_canonicalize_console_connection,
+                        (name, errb));
+  else
+    return CONTYPE_METH_OR_GIVEN (meths, canonicalize_console_connection,
+                                 (name, errb), name);
 }
 
 static Lisp_Object
 canonicalize_console_connection (struct console_methods *meths,
                                 Lisp_Object name, Error_behavior errb)
 {
 }
 
 static Lisp_Object
 canonicalize_console_connection (struct console_methods *meths,
                                 Lisp_Object name, Error_behavior errb)
 {
-  return CONTYPE_METH_OR_GIVEN (meths, canonicalize_console_connection,
-                               (name, errb), name);
+  if (HAS_CONTYPE_METH_P (meths, canonicalize_console_connection))
+    return CONTYPE_METH (meths, canonicalize_console_connection,
+                        (name, errb));
+  else
+    return CONTYPE_METH_OR_GIVEN (meths, semi_canonicalize_console_connection,
+                                 (name, errb), name);
 }
 
 static Lisp_Object
 }
 
 static Lisp_Object
@@ -488,7 +496,7 @@ create_console (Lisp_Object name, Lisp_Object type, Lisp_Object connection,
   /* Do it this way so that the console list is in order of creation */
   Vconsole_list = nconc2 (Vconsole_list, Fcons (console, Qnil));
 
   /* Do it this way so that the console list is in order of creation */
   Vconsole_list = nconc2 (Vconsole_list, Fcons (console, Qnil));
 
-  if (CONMETH (con, initially_selected_for_input, (con)))
+  if (CONMETH_OR_GIVEN (con, initially_selected_for_input, (con), 0))
     event_stream_select_console (con);
 
   UNGCPRO;
     event_stream_select_console (con);
 
   UNGCPRO;
@@ -878,7 +886,9 @@ stuff_buffered_input (Lisp_Object stuffstring)
       Extcount count;
       Extbyte *p;
 
       Extcount count;
       Extbyte *p;
 
-      GET_STRING_EXT_DATA_ALLOCA (stuffstring, FORMAT_KEYBOARD, p, count);
+      TO_EXTERNAL_FORMAT (LISP_STRING, stuffstring,
+                         ALLOCA, (p, count),
+                         Qkeyboard);
       while (count-- > 0)
        stuff_char (XCONSOLE (Vcontrolling_terminal), *p++);
       stuff_char (XCONSOLE (Vcontrolling_terminal), '\n');
       while (count-- > 0)
        stuff_char (XCONSOLE (Vcontrolling_terminal), *p++);
       stuff_char (XCONSOLE (Vcontrolling_terminal), '\n');
@@ -1099,34 +1109,35 @@ syms_of_console (void)
 }
 
 static const struct lrecord_description cte_description_1[] = {
 }
 
 static const struct lrecord_description cte_description_1[] = {
-  { XD_LISP_OBJECT, offsetof(console_type_entry, symbol), 1 },
-  { XD_STRUCT_PTR,  offsetof(console_type_entry, meths), 1, &console_methods_description },
+  { XD_LISP_OBJECT, offsetof (console_type_entry, symbol) },
+  { XD_STRUCT_PTR,  offsetof (console_type_entry, meths), 1, &console_methods_description },
   { XD_END }
 };
 
 static const struct struct_description cte_description = {
   { XD_END }
 };
 
 static const struct struct_description cte_description = {
-  sizeof(console_type_entry),
+  sizeof (console_type_entry),
   cte_description_1
 };
 
 static const struct lrecord_description cted_description_1[] = {
   cte_description_1
 };
 
 static const struct lrecord_description cted_description_1[] = {
-  XD_DYNARR_DESC(console_type_entry_dynarr, &cte_description),
+  XD_DYNARR_DESC (console_type_entry_dynarr, &cte_description),
   { XD_END }
 };
 
 const struct struct_description cted_description = {
   { XD_END }
 };
 
 const struct struct_description cted_description = {
-  sizeof(console_type_entry_dynarr),
+  sizeof (console_type_entry_dynarr),
   cted_description_1
 };
 
 static const struct lrecord_description console_methods_description_1[] = {
   cted_description_1
 };
 
 static const struct lrecord_description console_methods_description_1[] = {
-  { XD_LISP_OBJECT, offsetof(struct console_methods, symbol), 2 },
-  { XD_LISP_OBJECT, offsetof(struct console_methods, image_conversion_list), 1 },
+  { XD_LISP_OBJECT, offsetof (struct console_methods, symbol) },
+  { XD_LISP_OBJECT, offsetof (struct console_methods, predicate_symbol) },
+  { XD_LISP_OBJECT, offsetof (struct console_methods, image_conversion_list) },
   { XD_END }
 };
 
 const struct struct_description console_methods_description = {
   { XD_END }
 };
 
 const struct struct_description console_methods_description = {
-  sizeof(struct console_methods),
+  sizeof (struct console_methods),
   console_methods_description_1
 };
 
   console_methods_description_1
 };
 
@@ -1321,7 +1332,7 @@ reinit_complex_vars_of_console (void)
 
 
 static const struct lrecord_description console_slots_description_1[] = {
 
 
 static const struct lrecord_description console_slots_description_1[] = {
-  { XD_LISP_OBJECT, 0, CONSOLE_SLOTS_COUNT },
+  { XD_LISP_OBJECT_ARRAY, 0, CONSOLE_SLOTS_COUNT },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -1373,7 +1384,7 @@ were a prefix key, typing `ESC O P x' would return
 */ );
 
 #ifdef HAVE_TTY
 */ );
 
 #ifdef HAVE_TTY
-  /* ### Should this somehow go to TTY data?  How do we make it
+  /* #### Should this somehow go to TTY data?  How do we make it
      accessible from Lisp, then?  */
   DEFVAR_CONSOLE_LOCAL ("tty-erase-char", tty_erase_char /*
 The ERASE character as set by the user with stty.
      accessible from Lisp, then?  */
   DEFVAR_CONSOLE_LOCAL ("tty-erase-char", tty_erase_char /*
 The ERASE character as set by the user with stty.
index ffee406..9975bcd 100644 (file)
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Written by Ben Wing. */
 
 
 /* Written by Ben Wing. */
 
-#ifndef _XEMACS_CONSOLE_H_
-#define _XEMACS_CONSOLE_H_
+#ifndef INCLUDED_console_h_
+#define INCLUDED_console_h_
 
 /* Devices and consoles are similar entities.  The idea is that
    a console represents a physical keyboard/mouse/other-input-source
 
 /* Devices and consoles are similar entities.  The idea is that
    a console represents a physical keyboard/mouse/other-input-source
@@ -55,9 +55,9 @@ enum device_metrics
   DM_font_menubar, DM_font_dialog, DM_size_cursor, DM_size_scrollbar,
   DM_size_menu, DM_size_toolbar, DM_size_toolbar_button,
   DM_size_toolbar_border, DM_size_icon, DM_size_icon_small, DM_size_device,
   DM_font_menubar, DM_font_dialog, DM_size_cursor, DM_size_scrollbar,
   DM_size_menu, DM_size_toolbar, DM_size_toolbar_button,
   DM_size_toolbar_border, DM_size_icon, DM_size_icon_small, DM_size_device,
-  DM_size_workspace, DM_size_device_mm, DM_device_dpi, DM_num_bit_planes,
-  DM_num_color_cells, DM_mouse_buttons, DM_swap_buttons, DM_show_sounds,
-  DM_slow_device, DM_security
+  DM_size_workspace, DM_offset_workspace, DM_size_device_mm, DM_device_dpi,
+  DM_num_bit_planes, DM_num_color_cells, DM_mouse_buttons, DM_swap_buttons,
+  DM_show_sounds, DM_slow_device, DM_security
 };
 
 extern const struct struct_description cted_description;
 };
 
 extern const struct struct_description cted_description;
@@ -170,37 +170,36 @@ struct console_methods
                                int cursor, int cursor_start, int cursor_width,
                                int cursor_height);
   /* color methods */
                                int cursor, int cursor_start, int cursor_width,
                                int cursor_height);
   /* color methods */
-  int (*initialize_color_instance_method) (struct Lisp_Color_Instance *,
+  int (*initialize_color_instance_method) (Lisp_Color_Instance *,
                                           Lisp_Object name,
                                           Lisp_Object device,
                                           Error_behavior errb);
                                           Lisp_Object name,
                                           Lisp_Object device,
                                           Error_behavior errb);
-  void (*mark_color_instance_method) (struct Lisp_Color_Instance *);
-  void (*print_color_instance_method) (struct Lisp_Color_Instance *,
+  void (*mark_color_instance_method) (Lisp_Color_Instance *);
+  void (*print_color_instance_method) (Lisp_Color_Instance *,
                                       Lisp_Object printcharfun,
                                       int escapeflag);
                                       Lisp_Object printcharfun,
                                       int escapeflag);
-  void (*finalize_color_instance_method) (struct Lisp_Color_Instance *);
-  int (*color_instance_equal_method) (struct Lisp_Color_Instance *,
-                                     struct Lisp_Color_Instance *,
+  void (*finalize_color_instance_method) (Lisp_Color_Instance *);
+  int (*color_instance_equal_method) (Lisp_Color_Instance *,
+                                     Lisp_Color_Instance *,
                                      int depth);
                                      int depth);
-  unsigned long (*color_instance_hash_method) (struct Lisp_Color_Instance *,
+  unsigned long (*color_instance_hash_method) (Lisp_Color_Instance *,
                                               int depth);
                                               int depth);
-  Lisp_Object (*color_instance_rgb_components_method)
-    (struct Lisp_Color_Instance *);
+  Lisp_Object (*color_instance_rgb_components_method) (Lisp_Color_Instance *);
   int (*valid_color_name_p_method) (struct device *, Lisp_Object color);
 
   /* font methods */
   int (*valid_color_name_p_method) (struct device *, Lisp_Object color);
 
   /* font methods */
-  int (*initialize_font_instance_method) (struct Lisp_Font_Instance *,
+  int (*initialize_font_instance_method) (Lisp_Font_Instance *,
                                          Lisp_Object name,
                                          Lisp_Object device,
                                          Error_behavior errb);
                                          Lisp_Object name,
                                          Lisp_Object device,
                                          Error_behavior errb);
-  void (*mark_font_instance_method) (struct Lisp_Font_Instance *);
-  void (*print_font_instance_method) (struct Lisp_Font_Instance *,
+  void (*mark_font_instance_method) (Lisp_Font_Instance *);
+  void (*print_font_instance_method) (Lisp_Font_Instance *,
                                      Lisp_Object printcharfun,
                                      int escapeflag);
                                      Lisp_Object printcharfun,
                                      int escapeflag);
-  void (*finalize_font_instance_method) (struct Lisp_Font_Instance *);
-  Lisp_Object (*font_instance_truename_method) (struct Lisp_Font_Instance *,
+  void (*finalize_font_instance_method) (Lisp_Font_Instance *);
+  Lisp_Object (*font_instance_truename_method) (Lisp_Font_Instance *,
                                                Error_behavior errb);
                                                Error_behavior errb);
-  Lisp_Object (*font_instance_properties_method) (struct Lisp_Font_Instance *);
+  Lisp_Object (*font_instance_properties_method) (Lisp_Font_Instance *);
   Lisp_Object (*list_fonts_method) (Lisp_Object pattern,
                                    Lisp_Object device);
   Lisp_Object (*find_charset_font_method) (Lisp_Object device,
   Lisp_Object (*list_fonts_method) (Lisp_Object pattern,
                                    Lisp_Object device);
   Lisp_Object (*find_charset_font_method) (Lisp_Object device,
@@ -214,22 +213,22 @@ struct console_methods
                                           Bytecount length);
 
   /* image methods */
                                           Bytecount length);
 
   /* image methods */
-  void (*mark_image_instance_method) (struct Lisp_Image_Instance *);
-  void (*print_image_instance_method) (struct Lisp_Image_Instance *,
+  void (*mark_image_instance_method) (Lisp_Image_Instance *);
+  void (*print_image_instance_method) (Lisp_Image_Instance *,
                                       Lisp_Object printcharfun,
                                       int escapeflag);
                                       Lisp_Object printcharfun,
                                       int escapeflag);
-  void (*finalize_image_instance_method) (struct Lisp_Image_Instance *);
-  void (*unmap_subwindow_method) (struct Lisp_Image_Instance *);
-  void (*map_subwindow_method) (struct Lisp_Image_Instance *, int x, int y,
+  void (*finalize_image_instance_method) (Lisp_Image_Instance *);
+  void (*unmap_subwindow_method) (Lisp_Image_Instance *);
+  void (*map_subwindow_method) (Lisp_Image_Instance *, int x, int y,
                                struct display_glyph_area* dga);
                                struct display_glyph_area* dga);
-  void (*resize_subwindow_method) (struct Lisp_Image_Instance *, int w, int h);
-  void (*update_subwindow_method) (struct Lisp_Image_Instance *);
-  int (*image_instance_equal_method) (struct Lisp_Image_Instance *,
-                                     struct Lisp_Image_Instance *,
+  void (*resize_subwindow_method) (Lisp_Image_Instance *, int w, int h);
+  void (*update_subwindow_method) (Lisp_Image_Instance *);
+  int (*image_instance_equal_method) (Lisp_Image_Instance *,
+                                     Lisp_Image_Instance *,
                                      int depth);
                                      int depth);
-  unsigned long (*image_instance_hash_method) (struct Lisp_Image_Instance *,
+  unsigned long (*image_instance_hash_method) (Lisp_Image_Instance *,
                                               int depth);
                                               int depth);
-  void (*init_image_instance_from_eimage_method) (struct Lisp_Image_Instance *ii,
+  void (*init_image_instance_from_eimage_method) (Lisp_Image_Instance *ii,
                                                  int width, int height,
                                                  int slices,
                                                  unsigned char *eimage,
                                                  int width, int height,
                                                  int slices,
                                                  unsigned char *eimage,
@@ -289,8 +288,18 @@ struct console_methods
 /*
  * Constants returned by device_implementation_flags_method
  */
 /*
  * Constants returned by device_implementation_flags_method
  */
+
 /* Set when device uses pixel-based geometry */
 /* Set when device uses pixel-based geometry */
-#define XDEVIMPF_PIXEL_GEOMETRY          0x00000001L
+#define XDEVIMPF_PIXEL_GEOMETRY            0x00000001L
+
+/* Indicates that the device is a printer */
+#define XDEVIMPF_IS_A_PRINTER      0x00000002L
+
+/* Do not automatically redisplay this device */
+#define XDEVIMPF_NO_AUTO_REDISPLAY  0x00000004L
+
+/* Do not delete the device when last frame's gone */
+#define XDEVIMPF_FRAMELESS_OK      0x00000008L
 
 
 #define CONSOLE_TYPE_NAME(c) ((c)->conmeths->name)
 
 
 #define CONSOLE_TYPE_NAME(c) ((c)->conmeths->name)
@@ -375,6 +384,11 @@ struct console_methods * type##_console_methods
 #define CONSOLE_HAS_METHOD(type, m) \
   (type##_console_methods->m##_method = type##_##m)
 
 #define CONSOLE_HAS_METHOD(type, m) \
   (type##_console_methods->m##_method = type##_##m)
 
+/* Declare that console-type TYPE inherits method M
+   implementation from console-type FROMTYPE */
+#define CONSOLE_INHERITS_METHOD(type, fromtype, m) \
+  (type##_console_methods->m##_method = fromtype##_##m)
+
 struct console
 {
   struct lcrecord_header header;
 struct console
 {
   struct lcrecord_header header;
@@ -576,4 +590,4 @@ void io_error_delete_console (Lisp_Object console);
 void set_console_last_nonminibuf_frame (struct console *con,
                                        Lisp_Object frame);
 
 void set_console_last_nonminibuf_frame (struct console *con,
                                        Lisp_Object frame);
 
-#endif /* _XEMACS_CONSOLE_H_ */
+#endif /* INCLUDED_console_h_ */
index 5ae8feb..8036e19 100644 (file)
@@ -1620,8 +1620,8 @@ make_weak_list (enum weak_list_type type)
 }
 
 static const struct lrecord_description weak_list_description[] = {
 }
 
 static const struct lrecord_description weak_list_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct weak_list, list), 1 },
-  { XD_LO_LINK,     offsetof(struct weak_list, next_weak) },
+  { XD_LISP_OBJECT, offsetof (struct weak_list, list) },
+  { XD_LO_LINK,     offsetof (struct weak_list, next_weak) },
   { XD_END }
 };
 
   { XD_END }
 };
 
index b710015..d6edc87 100644 (file)
@@ -75,9 +75,6 @@ Lisp_Object Vdatabase_coding_system;
 
 Lisp_Object Qdatabasep;
 
 
 Lisp_Object Qdatabasep;
 
-struct Lisp_Database;
-typedef struct Lisp_Database Lisp_Database;
-
 typedef struct
 {
   Lisp_Object (*get_subtype) (Lisp_Database *);
 typedef struct
 {
   Lisp_Object (*get_subtype) (Lisp_Database *);
@@ -489,7 +486,7 @@ berkdb_map (Lisp_Database *db, Lisp_Object func)
        status == 0;
        status = dbp->seq (dbp, &keydatum, &valdatum, R_NEXT))
     {
        status == 0;
        status = dbp->seq (dbp, &keydatum, &valdatum, R_NEXT))
     {
-      /* ### Needs mule-izing */
+      /* #### Needs mule-izing */
       key = make_string ((Bufbyte *) keydatum.data, keydatum.size);
       val = make_string ((Bufbyte *) valdatum.data, valdatum.size);
       call2 (func, key, val);
       key = make_string ((Bufbyte *) keydatum.data, keydatum.size);
       val = make_string ((Bufbyte *) valdatum.data, valdatum.size);
       call2 (func, key, val);
@@ -502,12 +499,12 @@ berkdb_map (Lisp_Database *db, Lisp_Object func)
     status = dbp->cursor (dbp, NULL, &dbcp, 0);
 #else
     status = dbp->cursor (dbp, NULL, &dbcp);
     status = dbp->cursor (dbp, NULL, &dbcp, 0);
 #else
     status = dbp->cursor (dbp, NULL, &dbcp);
-#endif   
+#endif
     for (status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_FIRST);
         status == 0;
         status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_NEXT))
       {
     for (status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_FIRST);
         status == 0;
         status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_NEXT))
       {
-       /* ### Needs mule-izing */
+       /* #### Needs mule-izing */
        key = make_string ((Bufbyte *) keydatum.data, keydatum.size);
        val = make_string ((Bufbyte *) valdatum.data, valdatum.size);
        call2 (func, key, val);
        key = make_string ((Bufbyte *) keydatum.data, keydatum.size);
        val = make_string ((Bufbyte *) valdatum.data, valdatum.size);
        call2 (func, key, val);
@@ -581,7 +578,9 @@ and defaults to 0755.
   file = Fexpand_file_name (file, Qnil);
   UNGCPRO;
 
   file = Fexpand_file_name (file, Qnil);
   UNGCPRO;
 
-  GET_C_CHARPTR_EXT_FILENAME_DATA_ALLOCA (XSTRING_DATA (file), filename);
+  TO_EXTERNAL_FORMAT (LISP_STRING, file,
+                     C_STRING_ALLOCA, filename,
+                     Qfile_name);
 
   if (NILP (access_))
     {
 
   if (NILP (access_))
     {
index d9555ca..42589ff 100644 (file)
@@ -21,9 +21,10 @@ Boston, MA 02111-1307, USA.  */
 /* This file is only necessary to get INLINE handling correct.
    See inline.c  */
 
 /* This file is only necessary to get INLINE handling correct.
    See inline.c  */
 
-#ifndef _XEMACS_DATABASE_H
-#define _XEMACS_DATABASE_H
+#ifndef INCLUDED_database_h_
+#define INCLUDED_database_h_
 
 
-DECLARE_LRECORD (database, struct Lisp_Database);
+typedef struct Lisp_Database Lisp_Database;
+DECLARE_LRECORD (database, Lisp_Database);
 
 
-#endif
+#endif /* INCLUDED_database_h_ */
index 6bee237..00c6f48 100644 (file)
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Written by Chuck Thompson */
 
 
 /* Written by Chuck Thompson */
 
-#ifndef _XEMACS_DEBUG_H_
-#define _XEMACS_DEBUG_H_
+#ifndef INCLUDED_debug_h_
+#define INCLUDED_debug_h_
 
 #define DEBUG_STDERR   1
 #define DEBUG_ABORT    2
 
 #define DEBUG_STDERR   1
 #define DEBUG_ABORT    2
@@ -76,4 +76,4 @@ extern struct debug_classes active_debug_classes;
 
 #endif /* !DEBUG_XEMACS */
 
 
 #endif /* !DEBUG_XEMACS */
 
-#endif /* _XEMACS_DEBUG_H_ */
+#endif /* INCLUDED_debug_h_ */
index 3993f28..286957d 100644 (file)
@@ -66,7 +66,7 @@ alloc.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h chartab.h conslots
 alloca.o: config.h
 balloon_help.o: balloon_help.h config.h xintrinsic.h
 blocktype.o: $(LISP_H) blocktype.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
 alloca.o: config.h
 balloon_help.o: balloon_help.h config.h xintrinsic.h
 blocktype.o: $(LISP_H) blocktype.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-buffer.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h conslots.h console.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syntax.h sysdep.h sysfile.h toolbar.h window.h winslots.h
+buffer.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h conslots.h console.h device.h elhash.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syntax.h sysdep.h sysfile.h toolbar.h window.h winslots.h
 bytecode.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h chartab.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h symeval.h symsinit.h syntax.h
 callint.o: $(LISP_H) buffer.h bufslots.h bytecode.h commands.h events.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h symeval.h symsinit.h systime.h window.h winslots.h
 callproc.o: $(LISP_H) buffer.h bufslots.h commands.h file-coding.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h nt.h process.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h window.h winslots.h
 bytecode.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h chartab.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h symeval.h symsinit.h syntax.h
 callint.o: $(LISP_H) buffer.h bufslots.h bytecode.h commands.h events.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h symeval.h symsinit.h systime.h window.h winslots.h
 callproc.o: $(LISP_H) buffer.h bufslots.h commands.h file-coding.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h nt.h process.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h window.h winslots.h
@@ -105,7 +105,7 @@ event-unixoid.o: $(LISP_H) conslots.h console-stream.h console-tty.h console.h d
 events.o: $(LISP_H) buffer.h bufslots.h conslots.h console-tty.h console-x.h console.h device.h events-mod.h events.h extents.h frame.h frameslots.h glyphs.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h xintrinsic.h
 extents.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h debug.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h
 faces.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
 events.o: $(LISP_H) buffer.h bufslots.h conslots.h console-tty.h console-x.h console.h device.h events-mod.h events.h extents.h frame.h frameslots.h glyphs.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h xintrinsic.h
 extents.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h debug.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h
 faces.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
-file-coding.o: $(LISP_H) buffer.h bufslots.h chartab.h elhash.h file-coding.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-ccl.h mule-charset.h symeval.h symsinit.h
+file-coding.o: $(LISP_H) buffer.h bufslots.h chartab.h elhash.h file-coding.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-ccl.h mule-charset.h opaque.h symeval.h symsinit.h
 fileio.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h ndir.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h systime.h toolbar.h window.h winslots.h
 filelock.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h ndir.h paths.h symeval.h symsinit.h sysdir.h sysfile.h syspwd.h syssignal.h
 filemode.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysfile.h
 fileio.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h ndir.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h systime.h toolbar.h window.h winslots.h
 filelock.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h ndir.h paths.h symeval.h symsinit.h sysdir.h sysfile.h syspwd.h syssignal.h
 filemode.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysfile.h
@@ -189,6 +189,7 @@ sysdep.o: $(LISP_H) buffer.h bufslots.h conslots.h console-stream.h console-tty.
 sysdll.o: config.h sysdll.h
 termcap.o: $(LISP_H) conslots.h console.h device.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
 terminfo.o: config.h
 sysdll.o: config.h sysdll.h
 termcap.o: $(LISP_H) conslots.h console.h device.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
 terminfo.o: config.h
+tests.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h opaque.h symeval.h symsinit.h
 toolbar.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
 tooltalk.o: $(LISP_H) buffer.h bufslots.h elhash.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h process.h symeval.h symsinit.h tooltalk.h
 tparam.o: config.h
 toolbar.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
 tooltalk.o: $(LISP_H) buffer.h bufslots.h elhash.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h process.h symeval.h symsinit.h tooltalk.h
 tparam.o: config.h
index 18231ba..67d08ad 100644 (file)
@@ -39,6 +39,8 @@ Boston, MA 02111-1307, USA.  */
 #include "frame.h"
 #include "sysdep.h"
 
 #include "frame.h"
 #include "sysdep.h"
 
+#include <winspool.h>
+
 /* win32 DDE management library globals */
 #ifdef HAVE_DRAGNDROP
 DWORD mswindows_dde_mlid;
 /* win32 DDE management library globals */
 #ifdef HAVE_DRAGNDROP
 DWORD mswindows_dde_mlid;
@@ -64,15 +66,15 @@ Lisp_Object Qinit_pre_mswindows_win, Qinit_post_mswindows_win;
 /************************************************************************/
 
 static Lisp_Object
 /************************************************************************/
 
 static Lisp_Object
-build_syscolor_string (int index)
+build_syscolor_string (int idx)
 {
   DWORD clr;
   char buf[16];
 
 {
   DWORD clr;
   char buf[16];
 
-  if (index < 0)
+  if (idx < 0)
     return Qnil;
 
     return Qnil;
 
-  clr = GetSysColor (index);
+  clr = GetSysColor (idx);
   sprintf (buf, "#%02X%02X%02X",
           GetRValue (clr),
           GetGValue (clr),
   sprintf (buf, "#%02X%02X%02X",
           GetRValue (clr),
           GetGValue (clr),
@@ -98,10 +100,17 @@ build_sysmetrics_cons (int index1, int index2)
                index2 < 0 ? Qnil : make_int (GetSystemMetrics (index2)));
 }
 
                index2 < 0 ? Qnil : make_int (GetSystemMetrics (index2)));
 }
 
+static Lisp_Object
+build_devicecaps_cons (HDC hdc, int index1, int index2)
+{
+  return Fcons (index1 < 0 ? Qnil : make_int (GetDeviceCaps (hdc, index1)),
+               index2 < 0 ? Qnil : make_int (GetDeviceCaps (hdc, index2)));
+}
+
 
 \f
 /************************************************************************/
 
 \f
 /************************************************************************/
-/*                               methods                                */
+/*                          display methods                             */
 /************************************************************************/
 
 static void
 /************************************************************************/
 
 static void
@@ -129,9 +138,9 @@ mswindows_init_device (struct device *d, Lisp_Object props)
   DEVICE_MSWINDOWS_HORZSIZE(d) = GetDeviceCaps(hdc, HORZSIZE);
   DEVICE_MSWINDOWS_VERTSIZE(d) = GetDeviceCaps(hdc, VERTSIZE);
   DEVICE_MSWINDOWS_BITSPIXEL(d) = GetDeviceCaps(hdc, BITSPIXEL);
   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) = mswindows_enumerate_fonts (hdc);
 
 
-  mswindows_enumerate_fonts (d);
+  DeleteDC (hdc);
 
   /* Register the main window class */
   wc.cbSize = sizeof (WNDCLASSEX);
 
   /* Register the main window class */
   wc.cbSize = sizeof (WNDCLASSEX);
@@ -164,7 +173,7 @@ mswindows_init_device (struct device *d, Lisp_Object props)
   RegisterClassEx (&wc);
 #endif
 
   RegisterClassEx (&wc);
 #endif
 
-#ifdef HAVE_TOOLBARS
+#if defined (HAVE_TOOLBARS) || defined (HAVE_WIDGETS)
   InitCommonControls ();
 #endif
 }
   InitCommonControls ();
 #endif
 }
@@ -191,16 +200,6 @@ mswindows_finish_init_device (struct device *d, Lisp_Object props)
 static void
 mswindows_delete_device (struct device *d)
 {
 static void
 mswindows_delete_device (struct device *d)
 {
-  struct mswindows_font_enum *fontlist, *next;
-
-  fontlist = DEVICE_MSWINDOWS_FONTLIST (d);
-  while (fontlist)
-    {
-      next = fontlist->next;
-      free (fontlist);
-      fontlist = next;
-    }
-
 #ifdef HAVE_DRAGNDROP
   DdeNameService (mswindows_dde_mlid, 0L, 0L, DNS_REGISTER);
   DdeUninitialize (mswindows_dde_mlid);
 #ifdef HAVE_DRAGNDROP
   DdeNameService (mswindows_dde_mlid, 0L, 0L, DNS_REGISTER);
   DdeUninitialize (mswindows_dde_mlid);
@@ -209,6 +208,12 @@ mswindows_delete_device (struct device *d)
   free (d->device_data);
 }
 
   free (d->device_data);
 }
 
+static void
+mswindows_mark_device (struct device *d)
+{
+  mark_object (DEVICE_MSWINDOWS_FONTLIST (d));
+}
+
 static Lisp_Object
 mswindows_device_system_metrics (struct device *d,
                                 enum device_metrics m)
 static Lisp_Object
 mswindows_device_system_metrics (struct device *d,
                                 enum device_metrics m)
@@ -219,6 +224,10 @@ mswindows_device_system_metrics (struct device *d,
       return Fcons (make_int (DEVICE_MSWINDOWS_HORZRES(d)),
                    make_int (DEVICE_MSWINDOWS_VERTRES(d)));
       break;
       return Fcons (make_int (DEVICE_MSWINDOWS_HORZRES(d)),
                    make_int (DEVICE_MSWINDOWS_VERTRES(d)));
       break;
+    case DM_device_dpi:
+      return Fcons (make_int (DEVICE_MSWINDOWS_LOGPIXELSX(d)),
+                   make_int (DEVICE_MSWINDOWS_LOGPIXELSY(d)));
+      break;
     case DM_size_device_mm:
       return Fcons (make_int (DEVICE_MSWINDOWS_HORZSIZE(d)),
                    make_int (DEVICE_MSWINDOWS_VERTSIZE(d)));
     case DM_size_device_mm:
       return Fcons (make_int (DEVICE_MSWINDOWS_HORZSIZE(d)),
                    make_int (DEVICE_MSWINDOWS_VERTSIZE(d)));
@@ -305,6 +314,184 @@ mswindows_device_implementation_flags (void)
 
 \f
 /************************************************************************/
 
 \f
 /************************************************************************/
+/*                          printer methods                             */
+/************************************************************************/
+
+static void
+signal_open_printer_error (struct device *d)
+{
+  signal_simple_error ("Failed to open printer", DEVICE_CONNECTION (d));
+}
+
+static void
+msprinter_init_device (struct device *d, Lisp_Object props)
+{
+  char* printer_name;
+
+  DEVICE_INFD (d) = DEVICE_OUTFD (d) = -1;
+
+  CHECK_STRING (DEVICE_CONNECTION (d));
+
+  TO_EXTERNAL_FORMAT (LISP_STRING, DEVICE_CONNECTION (d),
+                     C_STRING_ALLOCA, printer_name,
+                     Qctext);
+
+  d->device_data = xnew_and_zero (struct msprinter_device);
+
+  DEVICE_MSPRINTER_NAME(d) = xstrdup (printer_name);
+
+  if (!OpenPrinter (printer_name, &DEVICE_MSPRINTER_HPRINTER (d), NULL))
+    {
+      DEVICE_MSPRINTER_HPRINTER (d) = NULL;
+      signal_open_printer_error (d);
+    }
+
+  DEVICE_MSPRINTER_HDC (d) = CreateDC ("WINSPOOL", printer_name,
+                                      NULL, NULL);
+  if (DEVICE_MSPRINTER_HDC (d) == NULL)
+    signal_open_printer_error (d);
+
+  /* Determinie DEVMODE size and store the default DEVMODE */
+  DEVICE_MSPRINTER_DEVMODE_SIZE(d) = 
+    DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER(d),
+                       printer_name, NULL, NULL, 0);
+  if (DEVICE_MSPRINTER_DEVMODE_SIZE(d) <= 0)
+    signal_open_printer_error (d);
+
+  DEVICE_MSPRINTER_DEVMODE(d) = xmalloc (DEVICE_MSPRINTER_DEVMODE_SIZE(d));
+  DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER(d),
+                     printer_name, DEVICE_MSPRINTER_DEVMODE(d),
+                     NULL, DM_OUT_BUFFER);
+
+  /* We do not use printer fon list as we do with the display
+     device. Rather, we allow GDI to pick the closest match to the
+     display font. */
+  DEVICE_MSPRINTER_FONTLIST (d) = Qnil;
+
+  DEVICE_CLASS (d) = (GetDeviceCaps (DEVICE_MSPRINTER_HDC (d), BITSPIXEL)
+                     * GetDeviceCaps (DEVICE_MSPRINTER_HDC (d), PLANES)
+                     > 1) ? Qcolor : Qmono;
+}
+
+static Lisp_Object
+msprinter_device_system_metrics (struct device *d,
+                                enum device_metrics m)
+{
+  switch (m)
+    {
+      /* Device sizes - pixel and mm */
+#define FROB(met, index1, index2)                      \
+    case DM_##met:                                     \
+      return build_devicecaps_cons                     \
+         (DEVICE_MSPRINTER_HDC(d), index1, index2);
+
+      FROB (size_device, PHYSICALWIDTH, PHYSICALHEIGHT);
+      FROB (size_device_mm, HORZSIZE, VERTSIZE);
+      FROB (size_workspace, HORZRES, VERTRES);
+      FROB (offset_workspace, PHYSICALOFFSETX, PHYSICALOFFSETY);
+      FROB (device_dpi, LOGPIXELSX, LOGPIXELSY);
+#undef FROB
+
+    case DM_num_bit_planes:
+      /* this is what X means by bitplanes therefore we ought to be
+         consistent. num planes is always 1 under mswindows and
+         therefore useless */
+      return make_int (GetDeviceCaps (DEVICE_MSPRINTER_HDC(d), BITSPIXEL));
+
+    case DM_num_color_cells:   /* Prnters are non-palette devices */
+    case DM_slow_device:       /* Animation would be a really bad idea */
+    case DM_security:          /* Not provided by windows */
+      return Qzero;
+    }
+
+  /* Do not know such property */
+  return Qunbound;
+}
+
+static void
+msprinter_delete_device (struct device *d)
+{
+  if (d->device_data)
+    {
+      if (DEVICE_MSPRINTER_HPRINTER (d))
+       ClosePrinter (DEVICE_MSPRINTER_HPRINTER (d));
+      if (DEVICE_MSPRINTER_HDC (d))
+       DeleteDC (DEVICE_MSPRINTER_HDC (d));
+      if (DEVICE_MSPRINTER_NAME (d))
+       free (DEVICE_MSPRINTER_NAME (d));
+      if (DEVICE_MSPRINTER_DEVMODE (d))
+       free (DEVICE_MSPRINTER_DEVMODE (d));
+      if (DEVICE_MSPRINTER_DEVMODE_MIRROR (d))
+       free (DEVICE_MSPRINTER_DEVMODE_MIRROR (d));
+
+      free (d->device_data);
+    }
+}
+
+static void
+msprinter_mark_device (struct device *d)
+{
+  mark_object (DEVICE_MSPRINTER_FONTLIST (d));
+}
+
+static unsigned int
+msprinter_device_implementation_flags (void)
+{
+  return (  XDEVIMPF_PIXEL_GEOMETRY
+         | XDEVIMPF_IS_A_PRINTER
+         | XDEVIMPF_NO_AUTO_REDISPLAY
+         | XDEVIMPF_FRAMELESS_OK );
+}
+
+\f
+/************************************************************************/
+/*                      printer external functions                      */
+/************************************************************************/
+
+/* 
+ * Return a copy of default DEVMODE. The copy returned is in
+ * a static buffer which will be overwritten by next call.
+ */
+DEVMODE*
+msprinter_get_devmode_copy (struct device *d)
+{
+  assert (DEVICE_MSPRINTER_P (d));
+
+  if (DEVICE_MSPRINTER_DEVMODE_MIRROR(d) == NULL)
+    DEVICE_MSPRINTER_DEVMODE_MIRROR(d) = 
+      xmalloc (DEVICE_MSPRINTER_DEVMODE_SIZE(d));
+
+  memcpy (DEVICE_MSPRINTER_DEVMODE_MIRROR(d),
+         DEVICE_MSPRINTER_DEVMODE(d),
+         DEVICE_MSPRINTER_DEVMODE_SIZE(d));
+
+  return DEVICE_MSPRINTER_DEVMODE_MIRROR(d);
+}
+
+/*
+ * Apply settings from the DEVMODE. The settings are considered
+ * incremental to the default DEVMODE, so that changes in the
+ * passed structure supercede parameters of the printer.
+ *
+ * The passed structure is overwritten by the fuction call;
+ * complete printer settings are returned.
+ */
+void
+msprinter_apply_devmode (struct device *d, DEVMODE *devmode)
+{
+  assert (DEVICE_MSPRINTER_P (d));
+
+  DocumentProperties (NULL,
+                     DEVICE_MSPRINTER_HPRINTER(d),
+                     DEVICE_MSPRINTER_NAME(d),
+                     devmode, devmode,
+                     DM_IN_BUFFER | DM_OUT_BUFFER);
+
+  ResetDC (DEVICE_MSPRINTER_HDC (d), devmode);
+}
+
+\f
+/************************************************************************/
 /*                            initialization                            */
 /************************************************************************/
 
 /*                            initialization                            */
 /************************************************************************/
 
@@ -320,12 +507,19 @@ console_type_create_device_mswindows (void)
 {
   CONSOLE_HAS_METHOD (mswindows, init_device);
   CONSOLE_HAS_METHOD (mswindows, finish_init_device);
 {
   CONSOLE_HAS_METHOD (mswindows, init_device);
   CONSOLE_HAS_METHOD (mswindows, finish_init_device);
-/*  CONSOLE_HAS_METHOD (mswindows, mark_device); */
+  CONSOLE_HAS_METHOD (mswindows, mark_device);
   CONSOLE_HAS_METHOD (mswindows, delete_device);
   CONSOLE_HAS_METHOD (mswindows, device_system_metrics);
   CONSOLE_HAS_METHOD (mswindows, device_implementation_flags);
   CONSOLE_HAS_METHOD (mswindows, delete_device);
   CONSOLE_HAS_METHOD (mswindows, device_system_metrics);
   CONSOLE_HAS_METHOD (mswindows, device_implementation_flags);
+
+  CONSOLE_HAS_METHOD (msprinter, init_device);
+  CONSOLE_HAS_METHOD (msprinter, mark_device);
+  CONSOLE_HAS_METHOD (msprinter, delete_device);
+  CONSOLE_HAS_METHOD (msprinter, device_system_metrics);
+  CONSOLE_HAS_METHOD (msprinter, device_implementation_flags);
 }
 
 }
 
+
 void
 vars_of_device_mswindows (void)
 {
 void
 vars_of_device_mswindows (void)
 {
index a1a8196..8b29038 100644 (file)
@@ -50,6 +50,10 @@ Boston, MA 02111-1307, USA.  */
 #include "sysfile.h"
 #include "systime.h"
 
 #include "sysfile.h"
 #include "systime.h"
 
+#if defined(HAVE_DLOPEN) && defined(LWLIB_USES_ATHENA) && !defined(HAVE_ATHENA_3D)
+#include "sysdll.h"
+#endif /* HAVE_DLOPEN and LWLIB_USES_ATHENA and not HAVE_ATHENA_3D */
+
 #ifdef HAVE_OFFIX_DND
 #include "offix.h"
 #endif
 #ifdef HAVE_OFFIX_DND
 #include "offix.h"
 #endif
@@ -466,6 +470,78 @@ x_init_device (struct device *d, Lisp_Object props)
   /* */
   int best_visual_found = 0;
 
   /* */
   int best_visual_found = 0;
 
+#if defined(HAVE_DLOPEN) && defined(LWLIB_USES_ATHENA) && !defined(HAVE_ATHENA_3D)
+  /*
+   * In order to avoid the lossage with flat Athena widgets dynamically
+   * linking to one of the ThreeD variants, using the dynamic symbol helpers
+   * to look for symbols that shouldn't be there and refusing to run if they
+   * are seems a less toxic idea than having XEmacs crash when we try and
+   * use a subclass of a widget that has changed size.
+   *
+   * It's ugly, I know, and not going to work everywhere. It seems better to
+   * do our damnedest to try and tell the user what to expect rather than
+   * simply blow up though.
+   *
+   * All the ThreeD variants I have access to define the following function
+   * symbols in the shared library. The flat Xaw library does not define them:
+   *
+   * Xaw3dComputeBottomShadowRGB
+   * Xaw3dComputeTopShadowRGB
+   *
+   * So far only Linux has shown this problem. This seems to be portable to
+   * all the distributions (certainly all the ones I checked - Debian and
+   * Redhat)
+   *
+   * This will only work, sadly, with dlopen() -- the other dynamic linkers
+   * are simply not capable of doing what is needed. :/
+   */
+
+  {
+    /* Get a dll handle to the main process. */
+    dll_handle xaw_dll_handle = dll_open (NULL);
+
+    /* Did that fail?  If so, continue without error.
+     * We could die here but, well, that's unfriendly and all -- plus I feel
+     * better about some crashing somewhere rather than preventing a perfectly
+     * good configuration working just because dll_open failed.
+     */
+    if (xaw_dll_handle != NULL)
+      {
+       /* Look for the Xaw3d function */
+       dll_func xaw_function_handle =
+         dll_function (xaw_dll_handle, "Xaw3dComputeTopShadowRGB");
+
+       /* If we found it, warn the user in big, nasty, unfriendly letters */
+       if (xaw_function_handle != NULL)
+         {
+           warn_when_safe (Qdevice, Qerror, "\n"
+"It seems that XEmacs is built dynamically linked to the flat Athena widget\n"
+"library but it finds a 3D Athena variant with the same name at runtime.\n"
+"\n"
+"This WILL cause your XEmacs process to dump core at some point.\n"
+"You should not continue to use this binary without resolving this issue.\n"
+"\n"
+"This can be solved with the xaw-wrappers package under Debian\n"
+"(register XEmacs as incompatible with all 3d widget sets, see\n"
+"update-xaw-wrappers(8) and .../doc/xaw-wrappers/README.packagers).  It\n"
+"can be verified by checking the runtime path in /etc/ld.so.conf and by\n"
+"using `ldd /path/to/xemacs' under other Linux distributions.  One\n"
+"solution is to use LD_PRELOAD or LD_LIBRARY_PATH to force ld.so to\n"
+"load the flat Athena widget library instead of the aliased 3D widget\n"
+"library (see ld.so(8) for use of these environment variables).\n\n"
+                           );
+
+         }
+
+       /* Otherwise release the handle to the library
+        * No error catch here; I can't think of a way to recover anyhow.
+        */
+       dll_close (xaw_dll_handle);
+      }
+  }
+#endif /* HAVE_DLOPEN and LWLIB_USES_ATHENA and not HAVE_ATHENA_3D */
+
+
   XSETDEVICE (device, d);
   display = DEVICE_CONNECTION (d);
 
   XSETDEVICE (device, d);
   display = DEVICE_CONNECTION (d);
 
@@ -473,7 +549,9 @@ x_init_device (struct device *d, Lisp_Object props)
 
   make_argc_argv (Vx_initial_argv_list, &argc, &argv);
 
 
   make_argc_argv (Vx_initial_argv_list, &argc, &argv);
 
-  GET_C_STRING_CTEXT_DATA_ALLOCA (display, disp_name);
+  TO_EXTERNAL_FORMAT (LISP_STRING, display,
+                     C_STRING_ALLOCA, disp_name,
+                     Qctext);
 
   /*
    * Break apart the old XtOpenDisplay call into XOpenDisplay and
 
   /*
    * Break apart the old XtOpenDisplay call into XOpenDisplay and
@@ -495,7 +573,9 @@ x_init_device (struct device *d, Lisp_Object props)
 
   if (STRINGP (Vx_emacs_application_class) &&
       XSTRING_LENGTH (Vx_emacs_application_class) > 0)
 
   if (STRINGP (Vx_emacs_application_class) &&
       XSTRING_LENGTH (Vx_emacs_application_class) > 0)
-    GET_C_STRING_CTEXT_DATA_ALLOCA (Vx_emacs_application_class, app_class);
+    TO_EXTERNAL_FORMAT (LISP_STRING, Vx_emacs_application_class,
+                       C_STRING_ALLOCA, app_class,
+                       Qctext);
   else
     {
       app_class = (NILP (Vx_emacs_application_class)  &&
   else
     {
       app_class = (NILP (Vx_emacs_application_class)  &&
@@ -537,7 +617,9 @@ x_init_device (struct device *d, Lisp_Object props)
     if (STRINGP (Vx_app_defaults_directory) &&
        XSTRING_LENGTH (Vx_app_defaults_directory) > 0)
       {
     if (STRINGP (Vx_app_defaults_directory) &&
        XSTRING_LENGTH (Vx_app_defaults_directory) > 0)
       {
-       GET_C_STRING_FILENAME_DATA_ALLOCA(Vx_app_defaults_directory, data_dir);
+       TO_EXTERNAL_FORMAT (LISP_STRING, Vx_app_defaults_directory,
+                           C_STRING_ALLOCA, data_dir,
+                           Qfile_name);
        path = (char *)alloca (strlen (data_dir) + strlen (locale) + 7);
        sprintf (path, "%s%s/Emacs", data_dir, locale);
        if (!access (path, R_OK))
        path = (char *)alloca (strlen (data_dir) + strlen (locale) + 7);
        sprintf (path, "%s%s/Emacs", data_dir, locale);
        if (!access (path, R_OK))
@@ -545,7 +627,9 @@ x_init_device (struct device *d, Lisp_Object props)
       }
     else if (STRINGP (Vdata_directory) && XSTRING_LENGTH (Vdata_directory) > 0)
       {
       }
     else if (STRINGP (Vdata_directory) && XSTRING_LENGTH (Vdata_directory) > 0)
       {
-       GET_C_STRING_FILENAME_DATA_ALLOCA (Vdata_directory, data_dir);
+       TO_EXTERNAL_FORMAT (LISP_STRING, Vdata_directory,
+                           C_STRING_ALLOCA, data_dir,
+                           Qfile_name);
        path = (char *)alloca (strlen (data_dir) + 13 + strlen (locale) + 7);
        sprintf (path, "%sapp-defaults/%s/Emacs", data_dir, locale);
        if (!access (path, R_OK))
        path = (char *)alloca (strlen (data_dir) + 13 + strlen (locale) + 7);
        sprintf (path, "%sapp-defaults/%s/Emacs", data_dir, locale);
        if (!access (path, R_OK))
@@ -655,7 +739,7 @@ x_init_device (struct device *d, Lisp_Object props)
        else
          {
            /* We have to create a matching colormap anyway...
        else
          {
            /* We have to create a matching colormap anyway...
-              ### think about using standard colormaps (need the Xmu libs?) */
+              #### think about using standard colormaps (need the Xmu libs?) */
            cmap = XCreateColormap(dpy, RootWindow(dpy, screen), visual, AllocNone);
            XInstallColormap(dpy, cmap);
          }
            cmap = XCreateColormap(dpy, RootWindow(dpy, screen), visual, AllocNone);
            XInstallColormap(dpy, cmap);
          }
@@ -730,7 +814,7 @@ x_init_device (struct device *d, Lisp_Object props)
   DEVICE_X_GC_CACHE (d) = make_gc_cache (dpy, XtWindow(app_shell));
   DEVICE_X_GRAY_PIXMAP (d) = None;
   Xatoms_of_device_x (d);
   DEVICE_X_GC_CACHE (d) = make_gc_cache (dpy, XtWindow(app_shell));
   DEVICE_X_GRAY_PIXMAP (d) = None;
   Xatoms_of_device_x (d);
-  Xatoms_of_xselect (d);
+  Xatoms_of_select_x (d);
   Xatoms_of_objects_x (d);
   x_init_device_class (d);
 
   Xatoms_of_objects_x (d);
   x_init_device_class (d);
 
@@ -1603,14 +1687,16 @@ Valid keysyms are listed in the files /usr/include/X11/keysymdef.h and in
   CONST char *keysym_ext;
 
   CHECK_STRING (keysym);
   CONST char *keysym_ext;
 
   CHECK_STRING (keysym);
-  GET_C_STRING_CTEXT_DATA_ALLOCA (keysym, keysym_ext);
+  TO_EXTERNAL_FORMAT (LISP_STRING, keysym,
+                     C_STRING_ALLOCA, keysym_ext,
+                     Qctext);
 
   return XStringToKeysym (keysym_ext) ? Qt : Qnil;
 }
 
 DEFUN ("x-keysym-hash-table", Fx_keysym_hash_table, 0, 1, 0, /*
 
   return XStringToKeysym (keysym_ext) ? Qt : Qnil;
 }
 
 DEFUN ("x-keysym-hash-table", Fx_keysym_hash_table, 0, 1, 0, /*
-Return a hash table which contains a hash key for all keysyms which
-name keys on the keyboard.  See `x-keysym-on-keyboard-p'.
+Return a hash table containing a key for all keysyms on DEVICE.
+DEVICE must be an X11 display device.  See `x-keysym-on-keyboard-p'.
 */
        (device))
 {
 */
        (device))
 {
@@ -1812,7 +1898,8 @@ See also `x-set-font-path'.
 
   while (ndirs_return--)
       font_path = Fcons (build_ext_string (directories[ndirs_return],
 
   while (ndirs_return--)
       font_path = Fcons (build_ext_string (directories[ndirs_return],
-                                           FORMAT_FILENAME), font_path);
+                                           Qfile_name),
+                        font_path);
 
   return font_path;
 }
 
   return font_path;
 }
@@ -1848,7 +1935,9 @@ See also `x-get-font-path'.
 
   EXTERNAL_LIST_LOOP (path_entry, font_path)
     {
 
   EXTERNAL_LIST_LOOP (path_entry, font_path)
     {
-      GET_C_STRING_FILENAME_DATA_ALLOCA (XCAR (path_entry), directories[i++]);
+      TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (path_entry),
+                         C_STRING_ALLOCA, directories[i++],
+                         Qfile_name);
     }
 
   expect_x_error (dpy);
     }
 
   expect_x_error (dpy);
index a080d09..2de9fed 100644 (file)
@@ -68,9 +68,9 @@ Lisp_Object
   Qfont_menubar, Qfont_dialog, Qsize_cursor, Qsize_scrollbar,
   Qsize_menu, Qsize_toolbar, Qsize_toolbar_button,
   Qsize_toolbar_border, Qsize_icon, Qsize_icon_small, Qsize_device,
   Qfont_menubar, Qfont_dialog, Qsize_cursor, Qsize_scrollbar,
   Qsize_menu, Qsize_toolbar, Qsize_toolbar_button,
   Qsize_toolbar_border, Qsize_icon, Qsize_icon_small, Qsize_device,
-  Qsize_workspace, Qsize_device_mm, Qdevice_dpi, Qnum_bit_planes,
-  Qnum_color_cells, Qmouse_buttons, Qswap_buttons, Qshow_sounds,
-  Qslow_device, Qsecurity;
+  Qsize_workspace, Qoffset_workspace, Qsize_device_mm, Qdevice_dpi,
+  Qnum_bit_planes, Qnum_color_cells, Qmouse_buttons, Qswap_buttons,
+  Qshow_sounds, Qslow_device, Qsecurity;
 
 Lisp_Object Qdevicep, Qdevice_live_p;
 Lisp_Object Qcreate_device_hook;
 
 Lisp_Object Qdevicep, Qdevice_live_p;
 Lisp_Object Qcreate_device_hook;
@@ -125,7 +125,7 @@ print_device (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
   sprintf (buf, "#<%s-device", !DEVICE_LIVE_P (d) ? "dead" :
           DEVICE_TYPE_NAME (d));
   write_c_string (buf, printcharfun);
   sprintf (buf, "#<%s-device", !DEVICE_LIVE_P (d) ? "dead" :
           DEVICE_TYPE_NAME (d));
   write_c_string (buf, printcharfun);
-  if (DEVICE_LIVE_P (d))
+  if (DEVICE_LIVE_P (d) && !NILP (DEVICE_CONNECTION (d)))
     {
       write_c_string (" on ", printcharfun);
       print_internal (DEVICE_CONNECTION (d), printcharfun, 1);
     {
       write_c_string (" on ", printcharfun);
       print_internal (DEVICE_CONNECTION (d), printcharfun, 1);
@@ -386,16 +386,24 @@ static Lisp_Object
 semi_canonicalize_device_connection (struct console_methods *meths,
                                     Lisp_Object name, Error_behavior errb)
 {
 semi_canonicalize_device_connection (struct console_methods *meths,
                                     Lisp_Object name, Error_behavior errb)
 {
-  return CONTYPE_METH_OR_GIVEN (meths, semi_canonicalize_device_connection,
-                               (name, errb), name);
+  if (HAS_CONTYPE_METH_P (meths, semi_canonicalize_device_connection))
+    return CONTYPE_METH (meths, semi_canonicalize_device_connection,
+                        (name, errb));
+  else
+    return CONTYPE_METH_OR_GIVEN (meths, canonicalize_device_connection,
+                                 (name, errb), name);
 }
 
 static Lisp_Object
 canonicalize_device_connection (struct console_methods *meths,
                                Lisp_Object name, Error_behavior errb)
 {
 }
 
 static Lisp_Object
 canonicalize_device_connection (struct console_methods *meths,
                                Lisp_Object name, Error_behavior errb)
 {
-  return CONTYPE_METH_OR_GIVEN (meths, canonicalize_device_connection,
-                               (name, errb), name);
+  if (HAS_CONTYPE_METH_P (meths, canonicalize_device_connection))
+    return CONTYPE_METH (meths, canonicalize_device_connection,
+                        (name, errb));
+  else
+    return CONTYPE_METH_OR_GIVEN (meths, semi_canonicalize_device_connection,
+                                 (name, errb), name);
 }
 
 static Lisp_Object
 }
 
 static Lisp_Object
@@ -911,6 +919,17 @@ Return the output baud rate of DEVICE.
   return make_int (DEVICE_BAUD_RATE (decode_device (device)));
 }
 
   return make_int (DEVICE_BAUD_RATE (decode_device (device)));
 }
 
+DEFUN ("device-printer-p", Fdevice_printer_p, 0, 1, 0, /*
+Return t if DEVICE is a printer, nil if it is a display. DEVICE defaults
+to selected device if omitted, and must be live if specified.
+*/
+       (device))
+{
+  return (MAYBE_INT_DEVMETH (decode_device (device),
+                            device_implementation_flags, ())
+         & XDEVIMPF_IS_A_PRINTER) ? Qt : Qnil;
+}
+
 DEFUN ("device-system-metric", Fdevice_system_metric, 1, 3, 0, /*
 Get a metric for DEVICE as provided by the system.
 
 DEFUN ("device-system-metric", Fdevice_system_metric, 1, 3, 0, /*
 Get a metric for DEVICE as provided by the system.
 
@@ -966,11 +985,14 @@ size-toolbar-button   Toolbar button size.
 size-toolbar-border   Toolbar border width and height.
 size-icon             Icon dimensions.
 size-icon-small       Small icon dimensions.
 size-toolbar-border   Toolbar border width and height.
 size-icon             Icon dimensions.
 size-icon-small       Small icon dimensions.
-size-device           Device screen size in pixels.
-size-workspace        Workspace size in pixels. This can be less than the
-                      above if window manager has decorations which
-                      effectively shrink the area remaining for application
-                      windows.
+size-device           Device screen or paper size in pixels.
+size-workspace        Workspace size in pixels. This can be less than or
+                      equal to the above. For diplays, this is the area
+                      available to applications less window manager 
+                      decorations. For printers, this is the size of
+                      printable area.
+offset-workspace      Offset of workspace area from the top left corner
+                      of screen or paper.
 size-device-mm        Device screen size in millimeters.
 device-dpi            Device resolution, in dots per inch.
 num-bit-planes        Integer, number of device bit planes.
 size-device-mm        Device screen size in millimeters.
 device-dpi            Device resolution, in dots per inch.
 num-bit-planes        Integer, number of device bit planes.
@@ -1027,6 +1049,7 @@ security              Non-zero if user environment is secure.
   FROB (size_icon_small);
   FROB (size_device);
   FROB (size_workspace);
   FROB (size_icon_small);
   FROB (size_device);
   FROB (size_workspace);
+  FROB (offset_workspace);
   FROB (size_device_mm);
   FROB (device_dpi);
   FROB (num_bit_planes);
   FROB (size_device_mm);
   FROB (device_dpi);
   FROB (num_bit_planes);
@@ -1089,6 +1112,7 @@ DEVICE defaults to selected device when omitted.
   FROB (size_icon_small);
   FROB (size_device);
   FROB (size_workspace);
   FROB (size_icon_small);
   FROB (size_device);
   FROB (size_workspace);
+  FROB (offset_workspace);
   FROB (size_device_mm);
   FROB (device_dpi);
   FROB (num_bit_planes);
   FROB (size_device_mm);
   FROB (device_dpi);
   FROB (num_bit_planes);
@@ -1246,6 +1270,7 @@ syms_of_device (void)
   DEFSUBR (Fset_device_baud_rate);
   DEFSUBR (Fdevice_baud_rate);
   DEFSUBR (Fdomain_device_type);
   DEFSUBR (Fset_device_baud_rate);
   DEFSUBR (Fdevice_baud_rate);
   DEFSUBR (Fdomain_device_type);
+  DEFSUBR (Fdevice_printer_p);
 
   defsymbol (&Qdevicep, "devicep");
   defsymbol (&Qdevice_live_p, "device-live-p");
 
   defsymbol (&Qdevicep, "devicep");
   defsymbol (&Qdevice_live_p, "device-live-p");
@@ -1285,6 +1310,7 @@ syms_of_device (void)
   defsymbol (&Qsize_icon_small, "size-icon-small");
   defsymbol (&Qsize_device, "size-device");
   defsymbol (&Qsize_workspace, "size-workspace");
   defsymbol (&Qsize_icon_small, "size-icon-small");
   defsymbol (&Qsize_device, "size-device");
   defsymbol (&Qsize_workspace, "size-workspace");
+  defsymbol (&Qoffset_workspace, "offset-workspace");
   defsymbol (&Qsize_device_mm, "size-device-mm");
   defsymbol (&Qnum_bit_planes, "num-bit-planes");
   defsymbol (&Qnum_color_cells, "num-color-cells");
   defsymbol (&Qsize_device_mm, "size-device-mm");
   defsymbol (&Qnum_bit_planes, "num-bit-planes");
   defsymbol (&Qnum_color_cells, "num-color-cells");
index b144afa..8dd7d29 100644 (file)
@@ -24,8 +24,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Written by Chuck Thompson and Ben Wing. */
 
 
 /* Written by Chuck Thompson and Ben Wing. */
 
-#ifndef _XEMACS_DEVICE_H_
-#define _XEMACS_DEVICE_H_
+#ifndef INCLUDED_device_h_
+#define INCLUDED_device_h_
 
 #include "console.h"
 
 
 #include "console.h"
 
@@ -420,4 +420,4 @@ void set_device_selected_frame (struct device *d, Lisp_Object frame);
 Lisp_Object domain_device_type (Lisp_Object domain);
 int window_system_pixelated_geometry (Lisp_Object domain);
 
 Lisp_Object domain_device_type (Lisp_Object domain);
 int window_system_pixelated_geometry (Lisp_Object domain);
 
-#endif /* _XEMACS_DEVICE_H_ */
+#endif /* INCLUDED_device_h_ */
index b5dea45..279cd36 100644 (file)
@@ -159,8 +159,9 @@ push_lisp_string_as_unicode (unsigned_char_dynarr* dynarr, Lisp_Object string)
   Charcount length = XSTRING_CHAR_LENGTH (string);
   LPWSTR uni_string;
 
   Charcount length = XSTRING_CHAR_LENGTH (string);
   LPWSTR uni_string;
 
-  GET_C_CHARPTR_EXT_DATA_ALLOCA (XSTRING_DATA (string),
-                                FORMAT_OS, mbcs_string);
+  TO_EXTERNAL_FORMAT (LISP_STRING, string,
+                     C_STRING_ALLOCA, mbcs_string,
+                     Qnative);
   uni_string = alloca_array (WCHAR, length + 1);
   length = MultiByteToWideChar (CP_ACP, 0, mbcs_string, -1,
                                uni_string, sizeof(WCHAR) * (length + 1));
   uni_string = alloca_array (WCHAR, length + 1);
   length = MultiByteToWideChar (CP_ACP, 0, mbcs_string, -1,
                                uni_string, sizeof(WCHAR) * (length + 1));
@@ -344,7 +345,7 @@ mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc)
     for (i = 0; i < Dynarr_length (dialog_items); ++i)
       {
        Lisp_Object* gui_item = Dynarr_atp (dialog_items, i);
     for (i = 0; i < Dynarr_length (dialog_items); ++i)
       {
        Lisp_Object* gui_item = Dynarr_atp (dialog_items, i);
-       struct Lisp_Gui_Item *pgui_item = XGUI_ITEM (*gui_item);
+       Lisp_Gui_Item *pgui_item = XGUI_ITEM (*gui_item);
 
        item_tem.style = (WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON
                          | (gui_item_active_p (*gui_item) ? 0 : WS_DISABLED));
 
        item_tem.style = (WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON
                          | (gui_item_active_p (*gui_item) ? 0 : WS_DISABLED));
index a090f2b..80d5ddc 100644 (file)
@@ -75,11 +75,10 @@ Boston, MA 02111-1307, USA.  */
 #include "buffer.h"
 #include "regex.h"
 
 #include "buffer.h"
 #include "regex.h"
 
-#include "sysdir.h"
 #include "sysfile.h"
 #include "sysfile.h"
+#include "sysdir.h"
 #include "sysproc.h"
 
 #include "sysproc.h"
 
-#include <windows.h>
 #include <limits.h>
 #include <time.h>
 
 #include <limits.h>
 #include <time.h>
 
index e247ac5..b7077e3 100644 (file)
@@ -542,9 +542,7 @@ if and only if the completion returned in the car was unique.
        (user))
 {
   int uniq;
        (user))
 {
   int uniq;
-  Lisp_Object completed;
-
-  completed = user_name_completion (user, 0, &uniq);
+  Lisp_Object completed = user_name_completion (user, 0, &uniq);
   return Fcons (completed, uniq ? Qt : Qnil);
 }
 
   return Fcons (completed, uniq ? Qt : Qnil);
 }
 
@@ -557,8 +555,15 @@ These are all user names which begin with USER.
   return user_name_completion (user, 1, NULL);
 }
 
   return user_name_completion (user, 1, NULL);
 }
 
-struct user_cache {
-  Bufbyte **data;
+struct user_name
+{
+  Bufbyte *ptr;
+  size_t len;
+};
+
+struct user_cache
+{
+  struct user_name *user_names;
   int length;
   int size;
   EMACS_TIME last_rebuild_time;
   int length;
   int size;
   EMACS_TIME last_rebuild_time;
@@ -570,27 +575,26 @@ free_user_cache (struct user_cache *cache)
 {
   int i;
   for (i = 0; i < cache->length; i++)
 {
   int i;
   for (i = 0; i < cache->length; i++)
-    xfree (cache->data[i]);
-  xfree (cache->data);
+    xfree (cache->user_names[i].ptr);
+  xfree (cache->user_names);
+  xzero (*cache);
 }
 
 static Lisp_Object
 }
 
 static Lisp_Object
-user_name_completion_unwind (Lisp_Object locative)
+user_name_completion_unwind (Lisp_Object cache_incomplete_p)
 {
 {
-  int interrupted = !NILP (XCAR (locative));
+  endpwent ();
+  speed_up_interrupts ();
 
 
-  if (interrupted)
-    {
-      endpwent ();
-      speed_up_interrupts ();
-      free_user_cache (&user_cache);
-    }
-  free_cons (XCONS (locative));
+  if (! NILP (XCAR (cache_incomplete_p)))
+    free_user_cache (&user_cache);
+
+  free_cons (XCONS (cache_incomplete_p));
 
   return Qnil;
 }
 
 
   return Qnil;
 }
 
-#define  USER_CACHE_REBUILD  (24*60*60)  /* 1 day, in seconds */
+#define  USER_CACHE_TTL  (24*60*60)  /* Time to live: 1 day, in seconds */
 
 static Lisp_Object
 user_name_completion (Lisp_Object user, int all_flag, int *uniq)
 
 static Lisp_Object
 user_name_completion (Lisp_Object user, int all_flag, int *uniq)
@@ -599,7 +603,6 @@ user_name_completion (Lisp_Object user, int all_flag, int *uniq)
   int matchcount = 0;
   Lisp_Object bestmatch = Qnil;
   Charcount bestmatchsize = 0;
   int matchcount = 0;
   Lisp_Object bestmatch = Qnil;
   Charcount bestmatchsize = 0;
-  int speccount = specpdl_depth ();
   Charcount user_name_length;
   EMACS_TIME t;
   int i;
   Charcount user_name_length;
   EMACS_TIME t;
   int i;
@@ -614,42 +617,42 @@ user_name_completion (Lisp_Object user, int all_flag, int *uniq)
   /* Cache user name lookups because it tends to be quite slow.
    * Rebuild the cache occasionally to catch changes */
   EMACS_GET_TIME (t);
   /* 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.data  &&
+  if (user_cache.user_names &&
       (EMACS_SECS (t) - EMACS_SECS (user_cache.last_rebuild_time)
       (EMACS_SECS (t) - EMACS_SECS (user_cache.last_rebuild_time)
-       > USER_CACHE_REBUILD))
-    {
-      free_user_cache (&user_cache);
-      xzero (user_cache);
-    }
+       > USER_CACHE_TTL))
+    free_user_cache (&user_cache);
 
 
-  if (!user_cache.data)
+  if (!user_cache.user_names)
     {
       struct passwd *pwd;
     {
       struct passwd *pwd;
-      Lisp_Object locative = noseeum_cons (Qt, Qnil);
+      Lisp_Object cache_incomplete_p = noseeum_cons (Qt, Qnil);
+      int speccount = specpdl_depth ();
+
       slow_down_interrupts ();
       setpwent ();
       slow_down_interrupts ();
       setpwent ();
-      record_unwind_protect (user_name_completion_unwind, locative);
+      record_unwind_protect (user_name_completion_unwind, cache_incomplete_p);
       while ((pwd = getpwent ()))
         {
       while ((pwd = getpwent ()))
         {
-         Bufbyte *pwuser;
           QUIT;
           QUIT;
-         DO_REALLOC (user_cache.data, user_cache.size,
-                     user_cache.length + 1, Bufbyte *);
-         GET_C_CHARPTR_INT_DATA_ALLOCA (pwd->pw_name, FORMAT_OS, pwuser);
-          user_cache.data[user_cache.length++] =
-           (Bufbyte *) xstrdup ((char *) pwuser);
+         DO_REALLOC (user_cache.user_names, user_cache.size,
+                     user_cache.length + 1, struct user_name);
+         TO_INTERNAL_FORMAT (C_STRING, pwd->pw_name,
+                             MALLOC,
+                             (user_cache.user_names[user_cache.length].ptr,
+                              user_cache.user_names[user_cache.length].len),
+                             Qnative);
+         user_cache.length++;
         }
         }
-      endpwent ();
-      speed_up_interrupts ();
-      XCAR (locative) = Qnil;
-      unbind_to (speccount, Qnil); /* free locative cons */
+      XCAR (cache_incomplete_p) = Qnil;
+      unbind_to (speccount, Qnil);
+
       EMACS_GET_TIME (user_cache.last_rebuild_time);
     }
 
   for (i = 0; i < user_cache.length; i++)
     {
       EMACS_GET_TIME (user_cache.last_rebuild_time);
     }
 
   for (i = 0; i < user_cache.length; i++)
     {
-      Bufbyte *u_name = user_cache.data[i];
-      Bytecount len = strlen ((char *) u_name);
+      Bufbyte *u_name = user_cache.user_names[i].ptr;
+      Bytecount len   = user_cache.user_names[i].len;
       /* scmp() works in chars, not bytes, so we have to compute this: */
       Charcount cclen = bytecount_to_charcount (u_name, len);
 
       /* scmp() works in chars, not bytes, so we have to compute this: */
       Charcount cclen = bytecount_to_charcount (u_name, len);
 
index 8174a02..9cf7e8b 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -138,7 +138,7 @@ unparesseuxify_doc_string (int fd, EMACS_INT position,
     }
 
   /* #### mrb: following STILL completely broken */
     }
 
   /* #### mrb: following STILL completely broken */
-  return_me = make_ext_string ((Bufbyte *) buffer, to - buffer, FORMAT_BINARY);
+  return_me = make_ext_string ((Bufbyte *) buffer, to - buffer, Qbinary);
 
  done:
   if (buffer != buf) /* We must have allocated buffer above */
 
  done:
   if (buffer != buf) /* We must have allocated buffer above */
@@ -284,7 +284,7 @@ string is passed through `substitute-command-keys'.
   else if (COMPILED_FUNCTIONP (fun))
     {
       Lisp_Object tem;
   else if (COMPILED_FUNCTIONP (fun))
     {
       Lisp_Object tem;
-      struct Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun);
+      Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun);
       if (! (f->flags.documentationp))
         return Qnil;
       tem = compiled_function_documentation (f);
       if (! (f->flags.documentationp))
         return Qnil;
       tem = compiled_function_documentation (f);
@@ -573,8 +573,7 @@ when doc strings are referred to in the dumped Emacs.
                    {
                       /* Compiled-Function objects sometimes have
                          slots for it.  */
                    {
                       /* Compiled-Function objects sometimes have
                          slots for it.  */
-                      struct Lisp_Compiled_Function *f =
-                       XCOMPILED_FUNCTION (fun);
+                      Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun);
 
                      /* This compiled-function object must have a
                         slot for the docstring, since we've found a
 
                      /* This compiled-function object must have a
                         slot for the docstring, since we've found a
@@ -640,7 +639,7 @@ static int
 kludgily_ignore_lost_doc_p (Lisp_Object sym)
 {
 # define kludge_prefix "ad-Orig-"
 kludgily_ignore_lost_doc_p (Lisp_Object sym)
 {
 # define kludge_prefix "ad-Orig-"
-  struct Lisp_String *name = XSYMBOL (sym)->name;
+  Lisp_String *name = XSYMBOL (sym)->name;
   return (string_length (name) > (Bytecount) (sizeof (kludge_prefix)) &&
          !strncmp ((char *) string_data (name), kludge_prefix,
                    sizeof (kludge_prefix) - 1));
   return (string_length (name) > (Bytecount) (sizeof (kludge_prefix)) &&
          !strncmp ((char *) string_data (name), kludge_prefix,
                    sizeof (kludge_prefix) - 1));
@@ -684,7 +683,7 @@ verify_doc_mapper (Lisp_Object sym, void *arg)
        }
       else if (COMPILED_FUNCTIONP (fun))
        {
        }
       else if (COMPILED_FUNCTIONP (fun))
        {
-          struct Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun);
+          Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun);
           if (! (f->flags.documentationp))
             doc = -1;
           else
           if (! (f->flags.documentationp))
             doc = -1;
           else
@@ -886,7 +885,7 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int
        case '{':
        case '<':
          {
        case '{':
        case '<':
          {
-           /* ### jump to label `subst_string|subst' crosses
+           /* #### jump to label `subst_string|subst' crosses
                initialization of `buffer|_buf' */
            Lisp_Object buffer;
            struct buffer *buf_;
                initialization of `buffer|_buf' */
            Lisp_Object buffer;
            struct buffer *buf_;
index b0ed31c..8b5744c 100644 (file)
@@ -538,7 +538,7 @@ emacs_doprnt_1 (Lisp_Object stream, CONST Bufbyte *format_nonreloc,
          else
            {
              Lisp_Object obj = largs[spec->argnum - 1];
          else
            {
              Lisp_Object obj = largs[spec->argnum - 1];
-             struct Lisp_String *ls;
+             Lisp_String *ls;
 
              if (ch == 'S')
                {
 
              if (ch == 'S')
                {
index 4ad3227..99928c7 100644 (file)
@@ -21,8 +21,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_DRAGDROP_H_
-#define _XEMACS_DRAGDROP_H_
+#ifndef INCLUDED_dragdrop_h_
+#define INCLUDED_dragdrop_h_
 
 /* Drag'n'Drop data types known by XEmacs */
 extern Lisp_Object Qdragdrop_MIME;
 
 /* Drag'n'Drop data types known by XEmacs */
 extern Lisp_Object Qdragdrop_MIME;
@@ -37,4 +37,4 @@ char *dnd_url_hexify_string (const char *s, const char *m);
 /* emacs interface */
 void syms_of_dragdrop (void);
 
 /* emacs interface */
 void syms_of_dragdrop (void);
 
-#endif /* _XEMACS_DRAGDROP_H_ */
+#endif /* INCLUDED_dragdrop_h_ */
index 02f4343..da51455 100644 (file)
@@ -101,15 +101,14 @@ Use the following functions/macros:
 Use the following global variable:
 
    Dynarr_min_size
 Use the following global variable:
 
    Dynarr_min_size
-      Minimum allowable size for a dynamic array when it is resized.  The
-      default is 32 and does not normally need to be changed.
+      Minimum allowable size for a dynamic array when it is resized.
 
 */
 
 #include <config.h>
 #include "lisp.h"
 
 
 */
 
 #include <config.h>
 #include "lisp.h"
 
-int Dynarr_min_size = 1;
+static int Dynarr_min_size = 8;
 
 static void
 Dynarr_realloc (Dynarr *dy, int new_size)
 
 static void
 Dynarr_realloc (Dynarr *dy, int new_size)
index 6866bef..2b06aec 100644 (file)
@@ -96,7 +96,7 @@ init_editfns (void)
   if ((p = getenv ("NAME")))
     /* I don't think it's the right thing to do the ampersand
        modification on NAME.  Not that it matters anymore...  -hniksic */
   if ((p = getenv ("NAME")))
     /* I don't think it's the right thing to do the ampersand
        modification on NAME.  Not that it matters anymore...  -hniksic */
-    Vuser_full_name = build_ext_string (p, FORMAT_OS);
+    Vuser_full_name = build_ext_string (p, Qnative);
   else
     Vuser_full_name = Fuser_full_name (Qnil);
 }
   else
     Vuser_full_name = Fuser_full_name (Qnil);
 }
@@ -131,7 +131,7 @@ An empty string will return the constant `nil'.
 */
        (str))
 {
 */
        (str))
 {
-  struct Lisp_String *p;
+  Lisp_String *p;
   CHECK_STRING (str);
 
   p = XSTRING (str);
   CHECK_STRING (str);
 
   p = XSTRING (str);
@@ -625,7 +625,7 @@ On Unix it is obtained from TMPDIR, with /tmp as the default
    tmpdir = "/tmp";
 #endif
 
    tmpdir = "/tmp";
 #endif
 
-  return build_ext_string (tmpdir, FORMAT_FILENAME);
+  return build_ext_string (tmpdir, Qfile_name);
 }
 
 DEFUN ("user-login-name", Fuser_login_name, 0, 1, 0, /*
 }
 
 DEFUN ("user-login-name", Fuser_login_name, 0, 1, 0, /*
@@ -768,7 +768,9 @@ value of `user-full-name' is returned.
 
       /* Fuck me.  getpwnam() can call select() and (under IRIX at least)
         things get wedged if a SIGIO arrives during this time. */
 
       /* Fuck me.  getpwnam() can call select() and (under IRIX at least)
         things get wedged if a SIGIO arrives during this time. */
-      GET_C_STRING_OS_DATA_ALLOCA (user_name, user_name_ext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, user_name,
+                         C_STRING_ALLOCA, user_name_ext,
+                         Qnative);
       slow_down_interrupts ();
       pw = (struct passwd *) getpwnam (user_name_ext);
       speed_up_interrupts ();
       slow_down_interrupts ();
       pw = (struct passwd *) getpwnam (user_name_ext);
       speed_up_interrupts ();
@@ -786,7 +788,7 @@ value of `user-full-name' is returned.
   tem = ((!NILP (user) && !pw)
         ? Qnil
         : make_ext_string ((Extbyte *) p, (q ? q - p : strlen (p)),
   tem = ((!NILP (user) && !pw)
         ? Qnil
         : make_ext_string ((Extbyte *) p, (q ? q - p : strlen (p)),
-                           FORMAT_OS));
+                           Qnative));
 
 #ifdef AMPERSAND_FULL_NAME
   if (!NILP (tem))
 
 #ifdef AMPERSAND_FULL_NAME
   if (!NILP (tem))
@@ -811,7 +813,7 @@ value of `user-full-name' is returned.
   return tem;
 }
 
   return tem;
 }
 
-static char *cached_home_directory;
+static Extbyte *cached_home_directory;
 
 void
 uncache_home_directory (void)
 
 void
 uncache_home_directory (void)
@@ -821,24 +823,27 @@ uncache_home_directory (void)
 }
 
 /* Returns the home directory, in external format */
 }
 
 /* Returns the home directory, in external format */
-char *
+Extbyte *
 get_home_directory (void)
 {
   int output_home_warning = 0;
 
   if (cached_home_directory == NULL)
     {
 get_home_directory (void)
 {
   int output_home_warning = 0;
 
   if (cached_home_directory == NULL)
     {
-      if ((cached_home_directory = getenv("HOME")) == NULL)
+      if ((cached_home_directory = (Extbyte *) getenv("HOME")) == NULL)
        {
 #if defined(WINDOWSNT) && !defined(__CYGWIN32__)
        {
 #if defined(WINDOWSNT) && !defined(__CYGWIN32__)
-         char  *homedrive, *homepath;
+         char *homedrive, *homepath;
 
          if ((homedrive = getenv("HOMEDRIVE")) != NULL &&
              (homepath = getenv("HOMEPATH")) != NULL)
            {
              cached_home_directory =
 
          if ((homedrive = getenv("HOMEDRIVE")) != NULL &&
              (homepath = getenv("HOMEPATH")) != NULL)
            {
              cached_home_directory =
-               (char *) xmalloc(strlen(homedrive) + strlen(homepath) + 1);
-             sprintf(cached_home_directory, "%s%s", homedrive, homepath);
+               (Extbyte *) xmalloc (strlen (homedrive) +
+                                    strlen (homepath) + 1);
+             sprintf((char *) cached_home_directory, "%s%s",
+                     homedrive,
+                     homepath);
            }
          else
            {
            }
          else
            {
@@ -861,7 +866,7 @@ get_home_directory (void)
              /*
               * This is NT Emacs behavior
               */
              /*
               * This is NT Emacs behavior
               */
-             cached_home_directory = "C:\\";
+             cached_home_directory = (Extbyte *) "C:\\";
              output_home_warning = 1;
 # endif
            }
              output_home_warning = 1;
 # endif
            }
@@ -872,7 +877,7 @@ get_home_directory (void)
           * We probably should try to extract pw_dir from /etc/passwd,
           * before falling back to this.
           */
           * We probably should try to extract pw_dir from /etc/passwd,
           * before falling back to this.
           */
-         cached_home_directory = "/";
+         cached_home_directory = (Extbyte *) "/";
          output_home_warning = 1;
 #endif /* !WINDOWSNT */
        }
          output_home_warning = 1;
 #endif /* !WINDOWSNT */
        }
@@ -895,11 +900,11 @@ Return the user's home directory, as a string.
 */
        ())
 {
 */
        ())
 {
-  char *path = get_home_directory ();
+  Extbyte *path = get_home_directory ();
 
   return path == NULL ? Qnil :
     Fexpand_file_name (Fsubstitute_in_file_name
 
   return path == NULL ? Qnil :
     Fexpand_file_name (Fsubstitute_in_file_name
-                      (build_ext_string (path, FORMAT_FILENAME)),
+                      (build_ext_string ((char *) path, Qfile_name)),
                       Qnil);
 }
 
                       Qnil);
 }
 
@@ -1071,7 +1076,7 @@ characters appearing in the day and month names may be incorrect.
                          (CONST char *) XSTRING_DATA (format_string),
                          localtime (&value))
          || !*buf)
                          (CONST char *) XSTRING_DATA (format_string),
                          localtime (&value))
          || !*buf)
-       return build_ext_string (buf, FORMAT_BINARY);
+       return build_ext_string (buf, Qbinary);
       /* If buffer was too small, make it bigger.  */
       size *= 2;
     }
       /* If buffer was too small, make it bigger.  */
       size *= 2;
     }
@@ -1225,7 +1230,7 @@ and from `file-attributes'.
   strncpy (buf, tem, 24);
   buf[24] = 0;
 
   strncpy (buf, tem, 24);
   buf[24] = 0;
 
-  return build_ext_string (buf, FORMAT_BINARY);
+  return build_ext_string (buf, Qbinary);
 }
 
 #define TM_YEAR_ORIGIN 1900
 }
 
 #define TM_YEAR_ORIGIN 1900
@@ -1819,7 +1824,7 @@ Returns the number of substitutions performed.
   mc_count = begin_multiple_change (buf, pos, stop);
   if (STRINGP (table))
     {
   mc_count = begin_multiple_change (buf, pos, stop);
   if (STRINGP (table))
     {
-      struct Lisp_String *stable = XSTRING (table);
+      Lisp_String *stable = XSTRING (table);
       Charcount size = string_char_length (stable);
 #ifdef MULE
       /* Under Mule, string_char(n) is O(n), so for large tables or
       Charcount size = string_char_length (stable);
 #ifdef MULE
       /* Under Mule, string_char(n) is O(n), so for large tables or
@@ -1899,7 +1904,7 @@ Returns the number of substitutions performed.
           && (XCHAR_TABLE_TYPE (table) == CHAR_TABLE_TYPE_GENERIC
               || XCHAR_TABLE_TYPE (table) == CHAR_TABLE_TYPE_CHAR))
     {
           && (XCHAR_TABLE_TYPE (table) == CHAR_TABLE_TYPE_GENERIC
               || XCHAR_TABLE_TYPE (table) == CHAR_TABLE_TYPE_CHAR))
     {
-      struct Lisp_Char_Table *ctable = XCHAR_TABLE (table);
+      Lisp_Char_Table *ctable = XCHAR_TABLE (table);
 
       for (; pos < stop && (oc = BUF_FETCH_CHAR (buf, pos), 1); pos++)
        {
 
       for (; pos < stop && (oc = BUF_FETCH_CHAR (buf, pos), 1); pos++)
        {
index a0dd5f7..1f8e2c7 100644 (file)
@@ -89,7 +89,7 @@ signal_ldap_error (LDAP *ld, LDAPMessage *res, int ldap_err)
 /************************************************************************/
 
 static Lisp_Object
 /************************************************************************/
 
 static Lisp_Object
-make_ldap (struct Lisp_LDAP *ldap)
+make_ldap (Lisp_LDAP *ldap)
 {
   Lisp_Object lisp_ldap;
   XSETLDAP (lisp_ldap, ldap);
 {
   Lisp_Object lisp_ldap;
   XSETLDAP (lisp_ldap, ldap);
@@ -107,7 +107,7 @@ print_ldap (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
   char buf[32];
 
 {
   char buf[32];
 
-  struct Lisp_LDAP *ldap = XLDAP (obj);
+  Lisp_LDAP *ldap = XLDAP (obj);
 
   if (print_readably)
     error ("printing unreadable object #<ldap %s>",
 
   if (print_readably)
     error ("printing unreadable object #<ldap %s>",
@@ -121,11 +121,10 @@ print_ldap (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
   write_c_string (buf, printcharfun);
 }
 
   write_c_string (buf, printcharfun);
 }
 
-static struct Lisp_LDAP *
+static Lisp_LDAP *
 allocate_ldap (void)
 {
 allocate_ldap (void)
 {
-  struct Lisp_LDAP *ldap =
-    alloc_lcrecord_type (struct Lisp_LDAP, &lrecord_ldap);
+  Lisp_LDAP *ldap = alloc_lcrecord_type (Lisp_LDAP, &lrecord_ldap);
 
   ldap->ld = NULL;
   ldap->host = Qnil;
 
   ldap->ld = NULL;
   ldap->host = Qnil;
@@ -135,7 +134,7 @@ allocate_ldap (void)
 static void
 finalize_ldap (void *header, int for_disksave)
 {
 static void
 finalize_ldap (void *header, int for_disksave)
 {
-  struct Lisp_LDAP *ldap = (struct Lisp_LDAP *) header;
+  Lisp_LDAP *ldap = (Lisp_LDAP *) header;
 
   if (for_disksave)
     signal_simple_error ("Can't dump an emacs containing LDAP objects",
 
   if (for_disksave)
     signal_simple_error ("Can't dump an emacs containing LDAP objects",
@@ -148,7 +147,7 @@ finalize_ldap (void *header, int for_disksave)
 
 DEFINE_LRECORD_IMPLEMENTATION ("ldap", ldap,
                                mark_ldap, print_ldap, finalize_ldap,
 
 DEFINE_LRECORD_IMPLEMENTATION ("ldap", ldap,
                                mark_ldap, print_ldap, finalize_ldap,
-                               NULL, NULL, 0, struct Lisp_LDAP);
+                               NULL, NULL, 0, Lisp_LDAP);
 
 
 
 
 
 
@@ -205,7 +204,7 @@ the LDAP library XEmacs was compiled with: `simple', `krbv41' and `krbv42'.
        (host, plist))
 {
   /* This function can GC */
        (host, plist))
 {
   /* This function can GC */
-  struct Lisp_LDAP *ldap;
+  Lisp_LDAP *ldap;
   LDAP *ld;
   int  ldap_port = 0;
   int  ldap_auth = LDAP_AUTH_SIMPLE;
   LDAP *ld;
   int  ldap_port = 0;
   int  ldap_auth = LDAP_AUTH_SIMPLE;
@@ -248,13 +247,17 @@ the LDAP library XEmacs was compiled with: `simple', `krbv41' and `krbv42'.
       else if (EQ (keyword, Qbinddn))
         {
           CHECK_STRING (value);
       else if (EQ (keyword, Qbinddn))
         {
           CHECK_STRING (value);
-          GET_C_STRING_OS_DATA_ALLOCA (value, ldap_binddn);
+         TO_EXTERNAL_FORMAT (LISP_STRING, value,
+                             C_STRING_ALLOCA, ldap_binddn,
+                             Qnative);
         }
       /* Password */
       else if (EQ (keyword, Qpasswd))
         {
           CHECK_STRING (value);
         }
       /* Password */
       else if (EQ (keyword, Qpasswd))
         {
           CHECK_STRING (value);
-          GET_C_STRING_OS_DATA_ALLOCA (value, ldap_passwd);
+         TO_EXTERNAL_FORMAT (LISP_STRING, value,
+                             C_STRING_ALLOCA, ldap_passwd,
+                             Qnative);
         }
       /* Deref */
       else if (EQ (keyword, Qderef))
         }
       /* Deref */
       else if (EQ (keyword, Qderef))
@@ -346,7 +349,7 @@ Close an LDAP connection.
 */
       (ldap))
 {
 */
       (ldap))
 {
-  struct Lisp_LDAP *lldap;
+  Lisp_LDAP *lldap;
   CHECK_LIVE_LDAP (ldap);
   lldap = XLDAP (ldap);
   ldap_unbind (lldap->ld);
   CHECK_LIVE_LDAP (ldap);
   lldap = XLDAP (ldap);
   ldap_unbind (lldap->ld);
@@ -463,7 +466,9 @@ entry according to the value of WITHDN.
        {
          Lisp_Object current = XCAR (attrs);
          CHECK_STRING (current);
        {
          Lisp_Object current = XCAR (attrs);
          CHECK_STRING (current);
-          GET_C_STRING_OS_DATA_ALLOCA (current, ldap_attributes[i]);
+         TO_EXTERNAL_FORMAT (LISP_STRING, current,
+                             C_STRING_ALLOCA, ldap_attributes[i],
+                             Qnative);
          ++i;
        }
       ldap_attributes[i] = NULL;
          ++i;
        }
       ldap_attributes[i] = NULL;
@@ -512,13 +517,13 @@ entry according to the value of WITHDN.
           dn = ldap_get_dn (ld, e);
           if (dn == NULL)
             signal_ldap_error (ld, e, 0);
           dn = ldap_get_dn (ld, e);
           if (dn == NULL)
             signal_ldap_error (ld, e, 0);
-          entry = Fcons (build_ext_string (dn, FORMAT_OS), Qnil);
+          entry = Fcons (build_ext_string (dn, Qnative), Qnil);
         }
       for (a= ldap_first_attribute (ld, e, &ptr);
            a != NULL;
            a = ldap_next_attribute (ld, e, ptr) )
         {
         }
       for (a= ldap_first_attribute (ld, e, &ptr);
            a != NULL;
            a = ldap_next_attribute (ld, e, ptr) )
         {
-          list = Fcons (build_ext_string (a, FORMAT_OS), Qnil);
+          list = Fcons (build_ext_string (a, Qnative), Qnil);
           unwind.vals = ldap_get_values_len (ld, e, a);
           if (unwind.vals != NULL)
             {
           unwind.vals = ldap_get_values_len (ld, e, a);
           if (unwind.vals != NULL)
             {
@@ -526,7 +531,7 @@ entry according to the value of WITHDN.
                 {
                   list = Fcons (make_ext_string (unwind.vals[i]->bv_val,
                                                  unwind.vals[i]->bv_len,
                 {
                   list = Fcons (make_ext_string (unwind.vals[i]->bv_val,
                                                  unwind.vals[i]->bv_len,
-                                                 FORMAT_OS),
+                                                 Qnative),
                                 list);
                 }
             }
                                 list);
                 }
             }
index 788f88e..5d869c3 100644 (file)
@@ -18,8 +18,8 @@ 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.  */
 
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#ifndef _XEMACS_ELDAP_H_
-#define _XEMACS_ELDAP_H_
+#ifndef INCLUDED_eldap_h_
+#define INCLUDED_eldap_h_
 
 #include <lber.h>
 #include <ldap.h>
 
 #include <lber.h>
 #include <ldap.h>
@@ -38,10 +38,11 @@ struct Lisp_LDAP
   /* Name of the host we connected to */
   Lisp_Object host;
 };
   /* Name of the host we connected to */
   Lisp_Object host;
 };
+typedef struct Lisp_LDAP Lisp_LDAP;
 
 
 
 
-DECLARE_LRECORD (ldap, struct Lisp_LDAP);
-#define XLDAP(x) XRECORD (x, ldap, struct Lisp_LDAP)
+DECLARE_LRECORD (ldap, Lisp_LDAP);
+#define XLDAP(x) XRECORD (x, ldap, Lisp_LDAP)
 #define XSETLDAP(x, p) XSETRECORD (x, p, ldap)
 #define LDAPP(x) RECORDP (x, ldap)
 #define CHECK_LDAP(x) CHECK_RECORD (x, ldap)
 #define XSETLDAP(x, p) XSETRECORD (x, p, ldap)
 #define LDAPP(x) RECORDP (x, ldap)
 #define CHECK_LDAP(x) CHECK_RECORD (x, ldap)
@@ -69,4 +70,4 @@ Lisp_Object Fldap_search_internal (Lisp_Object ldap,
                                    Lisp_Object attrsonly,
                                    Lisp_Object withdn);
 
                                    Lisp_Object attrsonly,
                                    Lisp_Object withdn);
 
-#endif /* _XEMACS_ELDAP_H_ */
+#endif /* INCLUDED_eldap_h_ */
index 397f65d..426f804 100644 (file)
@@ -59,7 +59,6 @@ struct Lisp_Hash_Table
   Lisp_Object next_weak;     /* Used to chain together all of the weak
                                hash tables.  Don't mark through this. */
 };
   Lisp_Object next_weak;     /* Used to chain together all of the weak
                                hash tables.  Don't mark through this. */
 };
-typedef struct Lisp_Hash_Table Lisp_Hash_Table;
 
 #define HENTRY_CLEAR_P(hentry) ((*(EMACS_UINT*)(&((hentry)->key))) == 0)
 #define CLEAR_HENTRY(hentry)   \
 
 #define HENTRY_CLEAR_P(hentry) ((*(EMACS_UINT*)(&((hentry)->key))) == 0)
 #define CLEAR_HENTRY(hentry)   \
@@ -374,19 +373,20 @@ finalize_hash_table (void *header, int for_disksave)
 }
 
 static const struct lrecord_description hentry_description_1[] = {
 }
 
 static const struct lrecord_description hentry_description_1[] = {
-  { XD_LISP_OBJECT, offsetof(hentry, key), 2 },
+  { XD_LISP_OBJECT, offsetof (hentry, key) },
+  { XD_LISP_OBJECT, offsetof (hentry, value) },
   { XD_END }
 };
 
 static const struct struct_description hentry_description = {
   { XD_END }
 };
 
 static const struct struct_description hentry_description = {
-  sizeof(hentry),
+  sizeof (hentry),
   hentry_description_1
 };
 
 const struct lrecord_description hash_table_description[] = {
   hentry_description_1
 };
 
 const struct lrecord_description hash_table_description[] = {
-  { XD_SIZE_T,     offsetof(Lisp_Hash_Table, size) },
-  { XD_STRUCT_PTR, offsetof(Lisp_Hash_Table, hentries), XD_INDIRECT(0, 1), &hentry_description },
-  { XD_LO_LINK,    offsetof(Lisp_Hash_Table, next_weak) },
+  { XD_SIZE_T,     offsetof (Lisp_Hash_Table, size) },
+  { XD_STRUCT_PTR, offsetof (Lisp_Hash_Table, hentries), XD_INDIRECT(0, 1), &hentry_description },
+  { XD_LO_LINK,    offsetof (Lisp_Hash_Table, next_weak) },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -883,7 +883,7 @@ The keys and values will not themselves be copied.
 static void
 resize_hash_table (Lisp_Hash_Table *ht, size_t new_size)
 {
 static void
 resize_hash_table (Lisp_Hash_Table *ht, size_t new_size)
 {
-  hentry *old_entries, *new_entries, *old_sentinel, *new_sentinel, *e;
+  hentry *old_entries, *new_entries, *sentinel, *e;
   size_t old_size;
 
   old_size = ht->size;
   size_t old_size;
 
   old_size = ht->size;
@@ -891,18 +891,12 @@ resize_hash_table (Lisp_Hash_Table *ht, size_t new_size)
 
   old_entries = ht->hentries;
 
 
   old_entries = ht->hentries;
 
-  ht->hentries = xnew_array (hentry, new_size + 1);
+  ht->hentries = xnew_array_and_zero (hentry, new_size + 1);
   new_entries = ht->hentries;
 
   new_entries = ht->hentries;
 
-  old_sentinel = old_entries + old_size;
-  new_sentinel = new_entries + new_size;
-
-  for (e = new_entries; e <= new_sentinel; e++)
-    CLEAR_HENTRY (e);
-
   compute_hash_table_derived_values (ht);
 
   compute_hash_table_derived_values (ht);
 
-  for (e = old_entries; e < old_sentinel; e++)
+  for (e = old_entries, sentinel = e + old_size; e < sentinel; e++)
     if (!HENTRY_CLEAR_P (e))
       {
        hentry *probe = new_entries + HASH_CODE (e->key, ht);
     if (!HENTRY_CLEAR_P (e))
       {
        hentry *probe = new_entries + HASH_CODE (e->key, ht);
@@ -915,10 +909,28 @@ resize_hash_table (Lisp_Hash_Table *ht, size_t new_size)
     xfree (old_entries);
 }
 
     xfree (old_entries);
 }
 
+/* After a hash table has been saved to disk and later restored by the
+   portable dumper, it contains the same objects, but their addresses
+   and thus their HASH_CODEs have changed. */
 void
 void
-reorganize_hash_table (Lisp_Hash_Table *ht)
+pdump_reorganize_hash_table (Lisp_Object hash_table)
 {
 {
-  resize_hash_table (ht, ht->size);
+  CONST Lisp_Hash_Table *ht = xhash_table (hash_table);
+  hentry *new_entries = xnew_array_and_zero (hentry, ht->size + 1);
+  hentry *e, *sentinel;
+
+  for (e = ht->hentries, sentinel = e + ht->size; e < sentinel; e++)
+    if (!HENTRY_CLEAR_P (e))
+      {
+       hentry *probe = new_entries + HASH_CODE (e->key, ht);
+       LINEAR_PROBING_LOOP (probe, new_entries, ht->size)
+         ;
+       *probe = *e;
+      }
+
+  memcpy (ht->hentries, new_entries, ht->size * sizeof (hentry));
+
+  xfree (new_entries);
 }
 
 static void
 }
 
 static void
index e780626..3ff3a62 100644 (file)
@@ -20,12 +20,14 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_ELHASH_H_
-#define _XEMACS_ELHASH_H_
+#ifndef INCLUDED_elhash_h_
+#define INCLUDED_elhash_h_
 
 
-DECLARE_LRECORD (hash_table, struct Lisp_Hash_Table);
+typedef struct Lisp_Hash_Table Lisp_Hash_Table;
 
 
-#define XHASH_TABLE(x) XRECORD (x, hash_table, struct Lisp_Hash_Table)
+DECLARE_LRECORD (hash_table, Lisp_Hash_Table);
+
+#define XHASH_TABLE(x) XRECORD (x, hash_table, Lisp_Hash_Table)
 #define XSETHASH_TABLE(x, p) XSETRECORD (x, p, hash_table)
 #define HASH_TABLEP(x) RECORDP (x, hash_table)
 #define CHECK_HASH_TABLE(x) CHECK_RECORD (x, hash_table)
 #define XSETHASH_TABLE(x, p) XSETRECORD (x, p, hash_table)
 #define HASH_TABLEP(x) RECORDP (x, hash_table)
 #define CHECK_HASH_TABLE(x) CHECK_RECORD (x, hash_table)
@@ -63,8 +65,6 @@ typedef unsigned long (*hash_table_hash_function_t) (Lisp_Object obj);
 typedef int (*maphash_function_t) (Lisp_Object key, Lisp_Object value,
                                   void* extra_arg);
 
 typedef int (*maphash_function_t) (Lisp_Object key, Lisp_Object value,
                                   void* extra_arg);
 
-struct Lisp_Hash_Table;
-
 Lisp_Object make_general_lisp_hash_table (enum hash_table_test test,
                                          size_t size,
                                          double rehash_size,
 Lisp_Object make_general_lisp_hash_table (enum hash_table_test test,
                                          size_t size,
                                          double rehash_size,
@@ -84,6 +84,6 @@ void elisp_map_remhash (maphash_function_t predicate,
 int finish_marking_weak_hash_tables (void);
 void prune_weak_hash_tables (void);
 
 int finish_marking_weak_hash_tables (void);
 void prune_weak_hash_tables (void);
 
-void reorganize_hash_table (struct Lisp_Hash_Table *ht);
+void pdump_reorganize_hash_table (Lisp_Object);
 
 
-#endif /* _XEMACS_ELHASH_H_ */
+#endif /* INCLUDED_elhash_h_ */
index 4312190..cb03ac4 100644 (file)
@@ -61,12 +61,6 @@ Boston, MA 02111-1307, USA.  */
 #include TT_C_H_PATH
 #endif
 
 #include TT_C_H_PATH
 #endif
 
-#ifdef APOLLO
-#ifndef APOLLO_SR10
-#include <default_acl.h>
-#endif
-#endif
-
 #if defined (WINDOWSNT)
 #include <windows.h>
 #endif
 #if defined (WINDOWSNT)
 #include <windows.h>
 #endif
@@ -371,7 +365,7 @@ make_arg_list_1 (int argc, char **argv, int skip_args)
              /* Do not trust to what crt0 has stuffed into argv[0] */
              char full_exe_path [MAX_PATH];
              GetModuleFileName (NULL, full_exe_path, MAX_PATH);
              /* Do not trust to what crt0 has stuffed into argv[0] */
              char full_exe_path [MAX_PATH];
              GetModuleFileName (NULL, full_exe_path, MAX_PATH);
-             result = Fcons (build_ext_string (full_exe_path, FORMAT_FILENAME),
+             result = Fcons (build_ext_string (full_exe_path, Qfile_name),
                              result);
 #if defined(HAVE_SHLIB)
              (void)dll_init(full_exe_path);
                              result);
 #if defined(HAVE_SHLIB)
              (void)dll_init(full_exe_path);
@@ -379,7 +373,8 @@ make_arg_list_1 (int argc, char **argv, int skip_args)
            }
          else
 #endif
            }
          else
 #endif
-           result = Fcons (build_ext_string (argv [i], FORMAT_FILENAME), result);
+           result = Fcons (build_ext_string (argv [i], Qfile_name),
+                           result);
        }
     }
   return result;
        }
     }
   return result;
@@ -406,7 +401,9 @@ make_argc_argv (Lisp_Object argv_list, int *argc, char ***argv)
       CONST char *temp;
       CHECK_STRING (XCAR (next));
 
       CONST char *temp;
       CHECK_STRING (XCAR (next));
 
-      GET_C_STRING_EXT_DATA_ALLOCA (XCAR (next), FORMAT_OS, temp);
+      TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (next),
+                         C_STRING_ALLOCA, temp,
+                         Qnative);
       (*argv) [i] = xstrdup (temp);
     }
   (*argv) [n] = 0;
       (*argv) [i] = xstrdup (temp);
     }
   (*argv) [n] = 0;
@@ -620,15 +617,6 @@ main_1 (int argc, char **argv, char **envp, int restart)
 
   clearerr (stdin);
 
 
   clearerr (stdin);
 
-#ifdef APOLLO
-#ifndef APOLLO_SR10
-  /* If USE_DOMAIN_ACLS environment variable exists,
-     use ACLs rather than UNIX modes. */
-  if (egetenv ("USE_DOMAIN_ACLS"))
-    default_acl (USE_DEFACL);
-#endif
-#endif /* APOLLO */
-
 #if defined (HAVE_MMAP) && defined (REL_ALLOC)
   /* ralloc can only be used if using the GNU memory allocator. */
   init_ralloc ();
 #if defined (HAVE_MMAP) && defined (REL_ALLOC)
   /* ralloc can only be used if using the GNU memory allocator. */
   init_ralloc ();
@@ -910,9 +898,6 @@ main_1 (int argc, char **argv, char **envp, int restart)
 
       syms_of_abbrev ();
       syms_of_alloc ();
 
       syms_of_abbrev ();
       syms_of_alloc ();
-#ifdef HAVE_X_WINDOWS
-      syms_of_balloon_x ();
-#endif
       syms_of_buffer ();
       syms_of_bytecode ();
       syms_of_callint ();
       syms_of_buffer ();
       syms_of_bytecode ();
       syms_of_callint ();
@@ -926,6 +911,7 @@ main_1 (int argc, char **argv, char **envp, int restart)
       syms_of_data ();
 #ifdef DEBUG_XEMACS
       syms_of_debug ();
       syms_of_data ();
 #ifdef DEBUG_XEMACS
       syms_of_debug ();
+      syms_of_tests ();
 #endif /* DEBUG_XEMACS */
       syms_of_device ();
 #ifdef HAVE_DIALOGS
 #endif /* DEBUG_XEMACS */
       syms_of_device ();
 #ifdef HAVE_DIALOGS
@@ -1018,6 +1004,7 @@ main_1 (int argc, char **argv, char **envp, int restart)
 #endif
 
 #ifdef HAVE_X_WINDOWS
 #endif
 
 #ifdef HAVE_X_WINDOWS
+      syms_of_balloon_x ();
       syms_of_device_x ();
 #ifdef HAVE_DIALOGS
       syms_of_dialog_x ();
       syms_of_device_x ();
 #ifdef HAVE_DIALOGS
       syms_of_dialog_x ();
@@ -1028,7 +1015,7 @@ main_1 (int argc, char **argv, char **envp, int restart)
 #ifdef HAVE_MENUBARS
       syms_of_menubar_x ();
 #endif
 #ifdef HAVE_MENUBARS
       syms_of_menubar_x ();
 #endif
-      syms_of_xselect ();
+      syms_of_select_x ();
 #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS)
       syms_of_gui_x ();
 #endif
 #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS)
       syms_of_gui_x ();
 #endif
@@ -1046,6 +1033,7 @@ main_1 (int argc, char **argv, char **envp, int restart)
       syms_of_objects_mswindows ();
       syms_of_select_mswindows ();
       syms_of_glyphs_mswindows ();
       syms_of_objects_mswindows ();
       syms_of_select_mswindows ();
       syms_of_glyphs_mswindows ();
+      syms_of_gui_mswindows ();
 #ifdef HAVE_MENUBARS
       syms_of_menubar_mswindows ();
 #endif
 #ifdef HAVE_MENUBARS
       syms_of_menubar_mswindows ();
 #endif
@@ -1315,9 +1303,6 @@ main_1 (int argc, char **argv, char **envp, int restart)
 
       vars_of_abbrev ();
       vars_of_alloc ();
 
       vars_of_abbrev ();
       vars_of_alloc ();
-#ifdef HAVE_X_WINDOWS
-      vars_of_balloon_x ();
-#endif
       vars_of_buffer ();
       vars_of_bytecode ();
       vars_of_callint ();
       vars_of_buffer ();
       vars_of_bytecode ();
       vars_of_callint ();
@@ -1329,6 +1314,7 @@ main_1 (int argc, char **argv, char **envp, int restart)
       vars_of_data ();
 #ifdef DEBUG_XEMACS
       vars_of_debug ();
       vars_of_data ();
 #ifdef DEBUG_XEMACS
       vars_of_debug ();
+      vars_of_tests ();
 #endif
       vars_of_console_stream ();
       vars_of_device ();
 #endif
       vars_of_console_stream ();
       vars_of_device ();
@@ -1396,6 +1382,7 @@ main_1 (int argc, char **argv, char **envp, int restart)
       vars_of_module ();
 #endif
 #ifdef WINDOWSNT
       vars_of_module ();
 #endif
 #ifdef WINDOWSNT
+      vars_of_nt ();
       vars_of_ntproc ();
 #endif
       vars_of_objects ();
       vars_of_ntproc ();
 #endif
       vars_of_objects ();
@@ -1437,6 +1424,7 @@ main_1 (int argc, char **argv, char **envp, int restart)
 #endif
 
 #ifdef HAVE_X_WINDOWS
 #endif
 
 #ifdef HAVE_X_WINDOWS
+      vars_of_balloon_x ();
       vars_of_device_x ();
 #ifdef HAVE_DIALOGS
       vars_of_dialog_x ();
       vars_of_device_x ();
 #ifdef HAVE_DIALOGS
       vars_of_dialog_x ();
@@ -1447,14 +1435,14 @@ main_1 (int argc, char **argv, char **envp, int restart)
       vars_of_menubar_x ();
 #endif
       vars_of_objects_x ();
       vars_of_menubar_x ();
 #endif
       vars_of_objects_x ();
-      vars_of_xselect ();
+      vars_of_select_x ();
 #ifdef HAVE_SCROLLBARS
       vars_of_scrollbar_x ();
 #endif
 #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS)
       vars_of_gui_x ();
 #endif
 #ifdef HAVE_SCROLLBARS
       vars_of_scrollbar_x ();
 #endif
 #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS)
       vars_of_gui_x ();
 #endif
-#endif
+#endif /* HAVE_X_WINDOWS */
 
 #ifdef HAVE_MS_WINDOWS
       vars_of_device_mswindows ();
 
 #ifdef HAVE_MS_WINDOWS
       vars_of_device_mswindows ();
@@ -1559,7 +1547,7 @@ main_1 (int argc, char **argv, char **envp, int restart)
         earlier.  The second may also depend on the first. */
       complex_vars_of_mule_charset ();
 #endif
         earlier.  The second may also depend on the first. */
       complex_vars_of_mule_charset ();
 #endif
-#if defined(FILE_CODING)
+#ifdef FILE_CODING
       complex_vars_of_file_coding ();
 #endif
 
       complex_vars_of_file_coding ();
 #endif
 
@@ -1644,6 +1632,7 @@ main_1 (int argc, char **argv, char **envp, int restart)
 #ifdef PDUMP
     } else if (!restart) {
       reinit_alloc_once_early ();
 #ifdef PDUMP
     } else if (!restart) {
       reinit_alloc_once_early ();
+      reinit_symbols_once_early ();
       reinit_opaque_once_early ();
 
       reinit_console_type_create_stream ();
       reinit_opaque_once_early ();
 
       reinit_console_type_create_stream ();
@@ -1720,7 +1709,6 @@ main_1 (int argc, char **argv, char **envp, int restart)
       reinit_vars_of_print ();
       reinit_vars_of_redisplay ();
       reinit_vars_of_search ();
       reinit_vars_of_print ();
       reinit_vars_of_redisplay ();
       reinit_vars_of_search ();
-      reinit_vars_of_scrollbar_x ();
       reinit_vars_of_undo ();
       reinit_vars_of_window ();
 
       reinit_vars_of_undo ();
       reinit_vars_of_window ();
 
@@ -1730,17 +1718,17 @@ main_1 (int argc, char **argv, char **envp, int restart)
 
 #ifdef HAVE_X_WINDOWS
       reinit_vars_of_device_x ();
 
 #ifdef HAVE_X_WINDOWS
       reinit_vars_of_device_x ();
-#endif
 #ifdef HAVE_SCROLLBARS
       reinit_vars_of_scrollbar_x ();
 #ifdef HAVE_SCROLLBARS
       reinit_vars_of_scrollbar_x ();
+#endif
 #ifdef HAVE_MENUBARS
       reinit_vars_of_menubar_x ();
 #endif
 #ifdef HAVE_MENUBARS
       reinit_vars_of_menubar_x ();
 #endif
-      reinit_vars_of_xselect ();
+      reinit_vars_of_select_x ();
 #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS)
       reinit_vars_of_gui_x ();
 #endif
 #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS)
       reinit_vars_of_gui_x ();
 #endif
-#endif
+#endif /* HAVE_X_WINDOWS */
 
 #if defined(MULE) && defined(HAVE_WNN)
       reinit_vars_of_mule_wnn ();
 
 #if defined(MULE) && defined(HAVE_WNN)
       reinit_vars_of_mule_wnn ();
@@ -1749,7 +1737,7 @@ main_1 (int argc, char **argv, char **envp, int restart)
       reinit_complex_vars_of_buffer ();
       reinit_complex_vars_of_console ();
       reinit_complex_vars_of_minibuf ();
       reinit_complex_vars_of_buffer ();
       reinit_complex_vars_of_console ();
       reinit_complex_vars_of_minibuf ();
-#endif
+#endif /* PDUMP */
     }
 
 
     }
 
 
@@ -2170,16 +2158,17 @@ Do not call this.  It will reinitialize your XEmacs.  You'll be sorry.
   /* Need to convert the orig_invoc_name and all of the arguments
      to external format. */
 
   /* Need to convert the orig_invoc_name and all of the arguments
      to external format. */
 
-  GET_STRING_EXT_DATA_ALLOCA (orig_invoc_name, FORMAT_OS, wampum,
-                             namesize);
+  TO_EXTERNAL_FORMAT (LISP_STRING, orig_invoc_name,
+                     ALLOCA, (wampum, namesize),
+                     Qnative);
   namesize++;
 
   for (ac = 0, total_len = namesize; ac < nargs; ac++)
     {
       CHECK_STRING (args[ac]);
   namesize++;
 
   for (ac = 0, total_len = namesize; ac < nargs; ac++)
     {
       CHECK_STRING (args[ac]);
-      GET_STRING_EXT_DATA_ALLOCA (args[ac], FORMAT_OS,
-                                 wampum_all[ac],
-                                 wampum_all_len[ac]);
+      TO_EXTERNAL_FORMAT (LISP_STRING, args[ac],
+                         ALLOCA, (wampum_all[ac], wampum_all_len[ac]),
+                         Qnative);
       wampum_all_len[ac]++;
       total_len += wampum_all_len[ac];
     }
       wampum_all_len[ac]++;
       total_len += wampum_all_len[ac];
     }
@@ -2540,10 +2529,10 @@ shut_down_emacs (int sig, Lisp_Object stuff)
 
 \f
 #ifndef CANNOT_DUMP
 
 \f
 #ifndef CANNOT_DUMP
-/* Nothing like this can be implemented on an Apollo.
-   What a loss!  */
 
 
+#if !defined(PDUMP) || !defined(SYSTEM_MALLOC)
 extern char my_edata[];
 extern char my_edata[];
+#endif
 
 #ifdef HAVE_SHM
 
 
 #ifdef HAVE_SHM
 
@@ -2660,9 +2649,14 @@ and announce itself normally when it is run.
     char *intoname_ext;
     char *symname_ext;
 
     char *intoname_ext;
     char *symname_ext;
 
-    GET_C_STRING_FILENAME_DATA_ALLOCA (intoname, intoname_ext);
+    TO_EXTERNAL_FORMAT (LISP_STRING, intoname,
+                       C_STRING_ALLOCA, intoname_ext,
+                       Qfile_name);
+
     if (STRINGP (symname))
     if (STRINGP (symname))
-      GET_C_STRING_FILENAME_DATA_ALLOCA (symname, symname_ext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, symname,
+                         C_STRING_ALLOCA, symname_ext,
+                         Qfile_name);
     else
       symname_ext = 0;
 
     else
       symname_ext = 0;
 
@@ -2733,27 +2727,26 @@ split_string_by_emchar_1 (CONST Bufbyte *string, Bytecount size,
 }
 
 /* The same as the above, except PATH is an external C string (it is
 }
 
 /* The same as the above, except PATH is an external C string (it is
-   converted as FORMAT_FILENAME), and sepchar is hardcoded to SEPCHAR
+   converted using Qfile_name), and sepchar is hardcoded to SEPCHAR
    (':' or whatever).  */
 Lisp_Object
 decode_path (CONST char *path)
 {
    (':' or whatever).  */
 Lisp_Object
 decode_path (CONST char *path)
 {
-  int len;
+  Bytecount newlen;
   Bufbyte *newpath;
   if (!path)
     return Qnil;
 
   Bufbyte *newpath;
   if (!path)
     return Qnil;
 
-  GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA (path, newpath);
+  TO_INTERNAL_FORMAT (C_STRING, path, ALLOCA, (newpath, newlen), Qfile_name);
 
 
-  len = strlen ((const char *) newpath);
   /* #### Does this make sense?  It certainly does for
      decode_env_path(), but it looks dubious here.  Does any code
      depend on decode_path("") returning nil instead of an empty
      string?  */
   /* #### Does this make sense?  It certainly does for
      decode_env_path(), but it looks dubious here.  Does any code
      depend on decode_path("") returning nil instead of an empty
      string?  */
-  if (!len)
+  if (!newlen)
     return Qnil;
 
     return Qnil;
 
-  return split_string_by_emchar_1 (newpath, (Bytecount)len, SEPCHAR);
+  return split_string_by_emchar_1 (newpath, newlen, SEPCHAR);
 }
 
 Lisp_Object
 }
 
 Lisp_Object
index 3f33e0a..b6ad9ba 100644 (file)
@@ -213,9 +213,9 @@ find_make_module (CONST char *mod, CONST char *name, CONST char *ver, int mof)
    * not previously loaded.
    */
   if (modules == (emodules_list *)0)
    * not previously loaded.
    */
   if (modules == (emodules_list *)0)
-    modules = (emodules_list *)xmalloc (sizeof(emodules_list));
+    modules = (emodules_list *) xmalloc (sizeof (emodules_list));
   modnum++;
   modnum++;
-  modules = (emodules_list *) xrealloc (modules, modnum * sizeof(emodules_list));
+  modules = (emodules_list *) xrealloc (modules, modnum * sizeof (emodules_list));
 
   fs = modnum - 1;
   memset (&modules[fs], 0, sizeof(emodules_list));
 
   fs = modnum - 1;
   memset (&modules[fs], 0, sizeof(emodules_list));
@@ -482,7 +482,7 @@ emodules_doc_subr(CONST char *symname, CONST char *doc)
 {
   Bytecount len = strlen (symname);
   Lisp_Object sym = oblookup (Vobarray, (CONST Bufbyte *)symname, len);
 {
   Bytecount len = strlen (symname);
   Lisp_Object sym = oblookup (Vobarray, (CONST Bufbyte *)symname, len);
-  struct Lisp_Subr *subr;
+  Lisp_Subr *subr;
 
   if (SYMBOLP(sym))
     {
 
   if (SYMBOLP(sym))
     {
index 9cfd639..575da9f 100644 (file)
@@ -83,4 +83,3 @@ extern void emodules_doc_sym (CONST char *objname, CONST char *docstr);
 #endif /* EMODULES_GATHER_VERSION */
 
 #endif /* EMODULES_HDR */
 #endif /* EMODULES_GATHER_VERSION */
 
 #endif /* EMODULES_HDR */
-
index e2768e7..962fab8 100644 (file)
@@ -295,7 +295,7 @@ print_subr (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 }
 
 static const struct lrecord_description subr_description[] = {
 }
 
 static const struct lrecord_description subr_description[] = {
-  { XD_DOC_STRING, offsetof(Lisp_Subr, doc)    },
+  { XD_DOC_STRING, offsetof (Lisp_Subr, doc) },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -1482,7 +1482,7 @@ If BODYFORM exits nonlocally, the UNWINDFORMS are executed anyway.
 static Lisp_Object
 condition_bind_unwind (Lisp_Object loser)
 {
 static Lisp_Object
 condition_bind_unwind (Lisp_Object loser)
 {
-  struct Lisp_Cons *victim;
+  Lisp_Cons *victim;
   /* ((handler-fun . handler-args) ... other handlers) */
   Lisp_Object tem = XCAR (loser);
 
   /* ((handler-fun . handler-args) ... other handlers) */
   Lisp_Object tem = XCAR (loser);
 
@@ -1504,7 +1504,7 @@ condition_bind_unwind (Lisp_Object loser)
 static Lisp_Object
 condition_case_unwind (Lisp_Object loser)
 {
 static Lisp_Object
 condition_case_unwind (Lisp_Object loser)
 {
-  struct Lisp_Cons *victim;
+  Lisp_Cons *victim;
 
   /* ((<unbound> . clauses) ... other handlers */
   victim = XCONS (XCAR (loser));
 
   /* ((<unbound> . clauses) ... other handlers */
   victim = XCONS (XCAR (loser));
@@ -2740,7 +2740,7 @@ this does nothing and returns nil.
       /* Attempt to avoid consing identical (string=) pure strings. */
       file = Fsymbol_name (Fintern (file, Qnil));
     }
       /* Attempt to avoid consing identical (string=) pure strings. */
       file = Fsymbol_name (Fintern (file, Qnil));
     }
-  
+
   return Ffset (function, Fcons (Qautoload, list4 (file,
                                                   docstring,
                                                   interactive,
   return Ffset (function, Fcons (Qautoload, list4 (file,
                                                   docstring,
                                                   interactive,
@@ -3006,7 +3006,7 @@ Evaluate FORM and return its value.
       else
        {
        wrong_number_of_arguments:
       else
        {
        wrong_number_of_arguments:
-         val = signal_wrong_number_of_arguments_error (fun, nargs);
+         val = signal_wrong_number_of_arguments_error (original_fun, nargs);
        }
     }
   else if (COMPILED_FUNCTIONP (fun))
        }
     }
   else if (COMPILED_FUNCTIONP (fun))
@@ -4463,7 +4463,7 @@ specbind_unwind_local (Lisp_Object ovalue)
 {
   Lisp_Object current = Fcurrent_buffer ();
   Lisp_Object symbol = specpdl_ptr->symbol;
 {
   Lisp_Object current = Fcurrent_buffer ();
   Lisp_Object symbol = specpdl_ptr->symbol;
-  struct Lisp_Cons *victim = XCONS (ovalue);
+  Lisp_Cons *victim = XCONS (ovalue);
   Lisp_Object buf = get_buffer (victim->car, 0);
   ovalue = victim->cdr;
 
   Lisp_Object buf = get_buffer (victim->car, 0);
   ovalue = victim->cdr;
 
@@ -4617,7 +4617,7 @@ unbind_to_hairy (int count)
        {
          /* We checked symbol for validity when we specbound it,
             so only need to call Fset if symbol has magic value.  */
        {
          /* We checked symbol for validity when we specbound it,
             so only need to call Fset if symbol has magic value.  */
-         struct Lisp_Symbol *sym = XSYMBOL (specpdl_ptr->symbol);
+         Lisp_Symbol *sym = XSYMBOL (specpdl_ptr->symbol);
          if (!SYMBOL_VALUE_MAGIC_P (sym->value))
            sym->value = specpdl_ptr->old_value;
          else
          if (!SYMBOL_VALUE_MAGIC_P (sym->value))
            sym->value = specpdl_ptr->old_value;
          else
index 46161af..e1d7006 100644 (file)
@@ -121,7 +121,7 @@ static CONST String x_fallback_resources[] =
 
 static Lisp_Object x_keysym_to_emacs_keysym (KeySym keysym, int simple_p);
 void emacs_Xt_mapping_action (Widget w, XEvent *event);
 
 static Lisp_Object x_keysym_to_emacs_keysym (KeySym keysym, int simple_p);
 void emacs_Xt_mapping_action (Widget w, XEvent *event);
-void debug_process_finalization (struct Lisp_Process *p);
+void debug_process_finalization (Lisp_Process *p);
 void emacs_Xt_event_handler (Widget wid, XtPointer closure, XEvent *event,
                             Boolean *continue_to_dispatch);
 
 void emacs_Xt_event_handler (Widget wid, XtPointer closure, XEvent *event,
                             Boolean *continue_to_dispatch);
 
@@ -175,6 +175,198 @@ Lisp_Object Qsans_modifiers;
    use a pop-up-window instead.)
  */
 
    use a pop-up-window instead.)
  */
 
+/* For every key on the keyboard that has a known character correspondence,
+   we define the ascii-character property of the keysym, and make the
+   default binding for the key be self-insert-command.
+
+   The following magic is basically intimate knowledge of X11/keysymdef.h.
+   The keysym mappings defined by X11 are based on the iso8859 standards,
+   except for Cyrillic and Greek.
+
+   In a non-Mule world, a user can still have a multi-lingual editor, by doing
+   (set-face-font "...-iso8859-2" (current-buffer))
+   for all their Latin-2 buffers, etc.  */
+
+static Lisp_Object
+x_keysym_to_character (KeySym keysym)
+{
+#ifdef MULE
+  Lisp_Object charset = Qzero;
+#define USE_CHARSET(var,cs) \
+  ((var) = CHARSET_BY_LEADING_BYTE (LEADING_BYTE_##cs))
+#else
+#define USE_CHARSET(var,lb)
+#endif /* MULE */
+  int code = 0;
+
+  if ((keysym & 0xff) < 0xa0)
+    return Qnil;
+
+  switch (keysym >> 8)
+    {
+    case 0: /* ASCII + Latin1 */
+      USE_CHARSET (charset, LATIN_ISO8859_1);
+      code = keysym & 0x7f;
+      break;
+    case 1: /* Latin2 */
+      USE_CHARSET (charset, LATIN_ISO8859_2);
+      code = keysym & 0x7f;
+      break;
+    case 2: /* Latin3 */
+      USE_CHARSET (charset, LATIN_ISO8859_3);
+      code = keysym & 0x7f;
+      break;
+    case 3: /* Latin4 */
+      USE_CHARSET (charset, LATIN_ISO8859_4);
+      code = keysym & 0x7f;
+      break;
+    case 4: /* Katakana */
+      USE_CHARSET (charset, KATAKANA_JISX0201);
+      if ((keysym & 0xff) > 0xa0)
+       code = keysym & 0x7f;
+      break;
+    case 5: /* Arabic */
+      USE_CHARSET (charset, ARABIC_ISO8859_6);
+      code = keysym & 0x7f;
+      break;
+    case 6: /* Cyrillic */
+      {
+       static unsigned char const cyrillic[] = /* 0x20 - 0x7f */
+       {0x00, 0x72, 0x73, 0x71, 0x74, 0x75, 0x76, 0x77,
+        0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x00, 0x7e, 0x7f,
+        0x70, 0x22, 0x23, 0x21, 0x24, 0x25, 0x26, 0x27,
+        0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x00, 0x2e, 0x2f,
+        0x6e, 0x50, 0x51, 0x66, 0x54, 0x55, 0x64, 0x53,
+        0x65, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e,
+        0x5f, 0x6f, 0x60, 0x61, 0x62, 0x63, 0x56, 0x52,
+        0x6c, 0x6b, 0x57, 0x68, 0x6d, 0x69, 0x67, 0x6a,
+        0x4e, 0x30, 0x31, 0x46, 0x34, 0x35, 0x44, 0x33,
+        0x45, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e,
+        0x3f, 0x4f, 0x40, 0x41, 0x42, 0x43, 0x36, 0x32,
+        0x4c, 0x4b, 0x37, 0x48, 0x4d, 0x49, 0x47, 0x4a};
+       USE_CHARSET (charset, CYRILLIC_ISO8859_5);
+       code = cyrillic[(keysym & 0x7f) - 0x20];
+       break;
+      }
+    case 7: /* Greek */
+      {
+       static unsigned char const greek[] = /* 0x20 - 0x7f */
+       {0x00, 0x36, 0x38, 0x39, 0x3a, 0x5a, 0x00, 0x3c,
+        0x3e, 0x5b, 0x00, 0x3f, 0x00, 0x00, 0x35, 0x2f,
+        0x00, 0x5c, 0x5d, 0x5e, 0x5f, 0x7a, 0x40, 0x7c,
+        0x7d, 0x7b, 0x60, 0x7e, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
+        0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
+        0x50, 0x51, 0x53, 0x00, 0x54, 0x55, 0x56, 0x57,
+        0x58, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+        0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
+        0x70, 0x71, 0x73, 0x72, 0x74, 0x75, 0x76, 0x77,
+        0x78, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+       USE_CHARSET (charset, GREEK_ISO8859_7);
+       code = greek[(keysym & 0x7f) - 0x20];
+       break;
+      }
+    case 8: /* Technical */
+      break;
+    case 9: /* Special */
+      break;
+    case 10: /* Publishing */
+      break;
+    case 11: /* APL */
+      break;
+    case 12: /* Hebrew */
+      USE_CHARSET (charset, HEBREW_ISO8859_8);
+      code = keysym & 0x7f;
+      break;
+    case 13: /* Thai */
+      /* #### This needs to deal with character composition. */
+      USE_CHARSET (charset, THAI_TIS620);
+      code = keysym & 0x7f;
+      break;
+    case 14: /* Korean Hangul */
+      break;
+    case 19: /* Latin 9 - ISO8859-15 - unsupported charset. */
+      break;
+    case 32: /* Currency */
+      break;
+    default:
+      break;
+    }
+
+  if (code == 0)
+    return Qnil;
+
+#ifdef MULE
+  return make_char (MAKE_CHAR (charset, code, 0));
+#else
+  return make_char (code + 0x80);
+#endif
+}
+
+/* #### The way that keysym correspondence to characters should work:
+   - a Lisp_Event should contain a keysym AND a character slot.
+   - keybindings are tried with the keysym.  If no binding can be found,
+   and there is a corresponding character, call self-insert-command.
+
+   #### Nuke x-iso8859-1.el.
+   #### Nuke the Qascii_character property.
+   #### Nuke Vcharacter_set_property.
+*/
+static void
+maybe_define_x_key_as_self_inserting_character (KeySym keysym, Lisp_Object symbol)
+{
+  Lisp_Object character = x_keysym_to_character (keysym);
+
+  if (CHARP (character))
+    {
+      extern Lisp_Object Vcurrent_global_map;
+      extern Lisp_Object Qascii_character;
+      Fput (symbol, Qascii_character, character);
+      if (NILP (Flookup_key (Vcurrent_global_map, symbol, Qnil)))
+       Fdefine_key (Vcurrent_global_map, symbol, Qself_insert_command);
+    }
+}
+
+static void
+x_has_keysym (KeySym keysym, Lisp_Object hash_table, int with_modifiers)
+{
+  KeySym upper_lower[2];
+  int j;
+
+  if (keysym < 0x80) /* Optimize for ASCII keysyms */
+    return;
+  /* If you do:  xmodmap -e 'keysym NN = scaron'
+     and then press (Shift scaron), X11 will return the different
+     keysym Scaron, but  xmodmap -pke  might not even mention Scaron.
+     So we `register' both scaron and Scaron. */
+  XConvertCase (keysym, &upper_lower[0], &upper_lower[1]);
+
+  for (j = 0; j < (upper_lower[0] == upper_lower[1] ? 1 : 2); j++)
+    {
+      char *name;
+      keysym = upper_lower[j];
+
+      name = XKeysymToString (keysym);
+      if (name)
+       {
+         /* X guarantees NAME to be in the Host Portable Character Encoding */
+         Lisp_Object sym = x_keysym_to_emacs_keysym (keysym, 0);
+         Lisp_Object new_value = with_modifiers ? Qt : Qsans_modifiers;
+         Lisp_Object old_value = Fgethash (sym, hash_table, Qnil);
+
+         if (! EQ (old_value, new_value)
+             && ! (EQ (old_value, Qsans_modifiers) &&
+                   EQ (new_value, Qt)))
+           {
+             maybe_define_x_key_as_self_inserting_character (keysym, sym);
+             Fputhash (build_ext_string (name, Qbinary), new_value, hash_table);
+             Fputhash (sym, new_value, hash_table);
+           }
+       }
+    }
+}
+
 static void
 x_reset_key_mapping (struct device *d)
 {
 static void
 x_reset_key_mapping (struct device *d)
 {
@@ -212,29 +404,13 @@ x_reset_key_mapping (struct device *d)
       if (keysym[0] == NoSymbol)
        continue;
 
       if (keysym[0] == NoSymbol)
        continue;
 
-      {
-       char *name = XKeysymToString (keysym[0]);
-       Lisp_Object sym = x_keysym_to_emacs_keysym (keysym[0], 0);
-       if (name)
-         {
-           Fputhash (build_string (name), Qsans_modifiers, hash_table);
-           Fputhash (sym, Qsans_modifiers, hash_table);
-         }
-      }
+      x_has_keysym (keysym[0], hash_table, 0);
 
       for (j = 1; j < keysyms_per_code; j++)
        {
          if (keysym[j] != keysym[0] &&
              keysym[j] != NoSymbol)
 
       for (j = 1; j < keysyms_per_code; j++)
        {
          if (keysym[j] != keysym[0] &&
              keysym[j] != NoSymbol)
-           {
-             char *name = XKeysymToString (keysym[j]);
-             Lisp_Object sym = x_keysym_to_emacs_keysym (keysym[j], 0);
-             if (name && NILP (Fgethash (sym, hash_table, Qnil)))
-               {
-                 Fputhash (build_string (name), Qt, hash_table);
-                 Fputhash (sym, Qt, hash_table);
-               }
-           }
+           x_has_keysym (keysym[j], hash_table, 1);
        }
     }
 }
        }
     }
 }
@@ -860,10 +1036,9 @@ x_to_emacs_keysym (XKeyPressedEvent *event, int simple_p)
        Lstream *istr;
        struct gcpro gcpro1, gcpro2;
 
        Lstream *istr;
        struct gcpro gcpro1, gcpro2;
 
-       fb_instream =
-          make_fixed_buffer_input_stream ((unsigned char *) bufptr, len);
+       fb_instream = make_fixed_buffer_input_stream (bufptr, len);
 
 
-        /* ### Use Fget_coding_system (Vcomposed_input_coding_system) */
+        /* #### Use Fget_coding_system (Vcomposed_input_coding_system) */
        instream =
          make_decoding_input_stream (XLSTREAM (fb_instream),
                                      Fget_coding_system (Qundecided));
        instream =
          make_decoding_input_stream (XLSTREAM (fb_instream),
                                      Fget_coding_system (Qundecided));
@@ -874,7 +1049,7 @@ x_to_emacs_keysym (XKeyPressedEvent *event, int simple_p)
         while ((ch = Lstream_get_emchar (istr)) != EOF)
           {
             Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
         while ((ch = Lstream_get_emchar (istr)) != EOF)
           {
             Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
-           struct Lisp_Event *ev = XEVENT (emacs_event);
+           Lisp_Event *ev          = XEVENT (emacs_event);
             ev->channel                    = DEVICE_CONSOLE (d);
             ev->event_type         = key_press_event;
             ev->timestamp          = event->time;
             ev->channel                    = DEVICE_CONSOLE (d);
             ev->event_type         = key_press_event;
             ev->timestamp          = event->time;
@@ -921,7 +1096,7 @@ set_last_server_timestamp (struct device *d, XEvent *x_event)
 }
 
 static int
 }
 
 static int
-x_event_to_emacs_event (XEvent *x_event, struct Lisp_Event *emacs_event)
+x_event_to_emacs_event (XEvent *x_event, Lisp_Event *emacs_event)
 {
   Display *display    = x_event->xany.display;
   struct device *d    = get_device_from_display (display);
 {
   Display *display    = x_event->xany.display;
   struct device *d    = get_device_from_display (display);
@@ -1191,7 +1366,7 @@ x_event_to_emacs_event (XEvent *x_event, struct Lisp_Event *emacs_event)
                                            make_string ((Bufbyte *)"8bit", 4),
                                            make_ext_string ((Extbyte *)data,
                                                             strlen((char *)data),
                                            make_string ((Bufbyte *)"8bit", 4),
                                            make_ext_string ((Extbyte *)data,
                                                             strlen((char *)data),
-                                                            FORMAT_CTEXT) ) );
+                                                            Qctext) ) );
                break;
              case DndMIME:
                /* we have to parse this in some way to extract
                break;
              case DndMIME:
                /* we have to parse this in some way to extract
@@ -1204,7 +1379,7 @@ x_event_to_emacs_event (XEvent *x_event, struct Lisp_Event *emacs_event)
                l_type = Qdragdrop_MIME;
                l_dndlist = list1 ( make_ext_string ((Extbyte *)data,
                                                     strlen((char *)data),
                l_type = Qdragdrop_MIME;
                l_dndlist = list1 ( make_ext_string ((Extbyte *)data,
                                                     strlen((char *)data),
-                                                    FORMAT_BINARY) );
+                                                    Qbinary) );
                break;
              case DndFile:
              case DndDir:
                break;
              case DndFile:
              case DndDir:
@@ -1225,7 +1400,7 @@ x_event_to_emacs_event (XEvent *x_event, struct Lisp_Event *emacs_event)
                   and escaping again will break them (cause % is unsave) */
                l_dndlist = list1 ( make_ext_string ((Extbyte *)data,
                                                     strlen ((char *)data),
                   and escaping again will break them (cause % is unsave) */
                l_dndlist = list1 ( make_ext_string ((Extbyte *)data,
                                                     strlen ((char *)data),
-                                                    FORMAT_FILENAME) );
+                                                    Qfile_name) );
                l_type = Qdragdrop_URL;
                break;
              default: /* Unknown, RawData and any other type */
                l_type = Qdragdrop_URL;
                break;
              default: /* Unknown, RawData and any other type */
@@ -1233,7 +1408,7 @@ x_event_to_emacs_event (XEvent *x_event, struct Lisp_Event *emacs_event)
                                            make_string ((Bufbyte *)"8bit", 4),
                                            make_ext_string ((Extbyte *)data,
                                                             size,
                                            make_string ((Bufbyte *)"8bit", 4),
                                            make_ext_string ((Extbyte *)data,
                                                             size,
-                                                            FORMAT_BINARY) ) );
+                                                            Qbinary) ) );
                l_type = Qdragdrop_MIME;
                break;
              }
                l_type = Qdragdrop_MIME;
                break;
              }
@@ -1541,7 +1716,7 @@ handle_client_message (struct frame *f, XEvent *event)
 }
 
 static void
 }
 
 static void
-emacs_Xt_handle_magic_event (struct Lisp_Event *emacs_event)
+emacs_Xt_handle_magic_event (Lisp_Event *emacs_event)
 {
   /* This function can GC */
   XEvent *event = &emacs_event->event.magic.underlying_x_event;
 {
   /* This function can GC */
   XEvent *event = &emacs_event->event.magic.underlying_x_event;
@@ -1782,7 +1957,7 @@ emacs_Xt_remove_timeout (int id)
 }
 
 static void
 }
 
 static void
-Xt_timeout_to_emacs_event (struct Lisp_Event *emacs_event)
+Xt_timeout_to_emacs_event (Lisp_Event *emacs_event)
 {
   struct Xt_timeout *timeout = completed_timeouts;
   assert (timeout);
 {
   struct Xt_timeout *timeout = completed_timeouts;
   assert (timeout);
@@ -1949,7 +2124,7 @@ unselect_filedesc (int fd)
 }
 
 static void
 }
 
 static void
-emacs_Xt_select_process (struct Lisp_Process *p)
+emacs_Xt_select_process (Lisp_Process *p)
 {
   Lisp_Object process;
   int infd = event_stream_unixoid_select_process (p);
 {
   Lisp_Object process;
   int infd = event_stream_unixoid_select_process (p);
@@ -1959,7 +2134,7 @@ emacs_Xt_select_process (struct Lisp_Process *p)
 }
 
 static void
 }
 
 static void
-emacs_Xt_unselect_process (struct Lisp_Process *p)
+emacs_Xt_unselect_process (Lisp_Process *p)
 {
   int infd = event_stream_unixoid_unselect_process (p);
 
 {
   int infd = event_stream_unixoid_unselect_process (p);
 
@@ -1988,7 +2163,7 @@ emacs_Xt_delete_stream_pair (Lisp_Object instream, Lisp_Object outstream)
    If we've still got pointers to it in this file, we're gonna lose hard.
  */
 void
    If we've still got pointers to it in this file, we're gonna lose hard.
  */
 void
-debug_process_finalization (struct Lisp_Process *p)
+debug_process_finalization (Lisp_Process *p)
 {
 #if 0 /* #### */
   int i;
 {
 #if 0 /* #### */
   int i;
@@ -2008,7 +2183,7 @@ debug_process_finalization (struct Lisp_Process *p)
 }
 
 static void
 }
 
 static void
-Xt_process_to_emacs_event (struct Lisp_Event *emacs_event)
+Xt_process_to_emacs_event (Lisp_Event *emacs_event)
 {
   int i;
 
 {
   int i;
 
@@ -2068,7 +2243,7 @@ emacs_Xt_unselect_console (struct console *con)
    to be deleted.) */
 
 static int
    to be deleted.) */
 
 static int
-Xt_tty_to_emacs_event (struct Lisp_Event *emacs_event)
+Xt_tty_to_emacs_event (Lisp_Event *emacs_event)
 {
   int i;
 
 {
   int i;
 
@@ -2114,7 +2289,7 @@ describe_event_window (Window window, Display *display)
       char *buf = alloca_array (char, XSTRING_LENGTH (f->name) + 4);
       sprintf (buf, " \"%s\"", XSTRING_DATA (f->name));
       write_string_to_stdio_stream (stderr, 0, (Bufbyte *) buf, 0,
       char *buf = alloca_array (char, XSTRING_LENGTH (f->name) + 4);
       sprintf (buf, " \"%s\"", XSTRING_DATA (f->name));
       write_string_to_stdio_stream (stderr, 0, (Bufbyte *) buf, 0,
-                                   strlen (buf), FORMAT_TERMINAL);
+                                   strlen (buf), Qterminal);
     }
   stderr_out ("\n");
 }
     }
   stderr_out ("\n");
 }
@@ -2353,7 +2528,7 @@ signal_special_Xt_user_event (Lisp_Object channel, Lisp_Object function,
 }
 
 static void
 }
 
 static void
-emacs_Xt_next_event (struct Lisp_Event *emacs_event)
+emacs_Xt_next_event (Lisp_Event *emacs_event)
 {
  we_didnt_get_an_event:
 
 {
  we_didnt_get_an_event:
 
@@ -2738,10 +2913,10 @@ emacs_Xt_event_pending_p (int user_p)
    the '#if 0'.  Note, however, that I got "unknown structure"
    errors when I tried this. */
 XtConvertArgRec Const colorConvertArgs[] = {
    the '#if 0'.  Note, however, that I got "unknown structure"
    errors when I tried this. */
 XtConvertArgRec Const colorConvertArgs[] = {
-  {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.screen),
-   sizeof(Screen *)},
-  {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.colormap),
-   sizeof(Colormap)}
+  { XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.screen),
+    sizeof (Screen *) },
+  { XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.colormap),
+    sizeof (Colormap) }
 };
 
 #endif
 };
 
 #endif
@@ -2891,6 +3066,7 @@ syms_of_event_Xt (void)
 {
   defsymbol (&Qkey_mapping, "key-mapping");
   defsymbol (&Qsans_modifiers, "sans-modifiers");
 {
   defsymbol (&Qkey_mapping, "key-mapping");
   defsymbol (&Qsans_modifiers, "sans-modifiers");
+  defsymbol (&Qself_insert_command, "self-insert-command");
 }
 
 void
 }
 
 void
index d8c07f1..c5c3d2f 100644 (file)
@@ -90,13 +90,6 @@ typedef NMHDR *LPNMHDR;
 /* Timer ID used for button2 emulation */
 #define BUTTON_2_TIMER_ID 1
 
 /* Timer ID used for button2 emulation */
 #define BUTTON_2_TIMER_ID 1
 
-extern Lisp_Object
-mswindows_get_toolbar_button_text (struct frame* f, int command_id);
-extern Lisp_Object
-mswindows_handle_toolbar_wm_command (struct frame* f, HWND ctrl, WORD id);
-extern Lisp_Object
-mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, WORD id);
-
 static Lisp_Object mswindows_find_frame (HWND hwnd);
 static Lisp_Object mswindows_find_console (HWND hwnd);
 static Lisp_Object mswindows_key_to_emacs_keysym (int mswindows_key, int mods,
 static Lisp_Object mswindows_find_frame (HWND hwnd);
 static Lisp_Object mswindows_find_console (HWND hwnd);
 static Lisp_Object mswindows_key_to_emacs_keysym (int mswindows_key, int mods,
@@ -860,7 +853,7 @@ init_winsock_stream (void)
 /************************************************************************/
 
 static int
 /************************************************************************/
 
 static int
-mswindows_user_event_p (struct Lisp_Event* sevt)
+mswindows_user_event_p (Lisp_Event* sevt)
 {
   return (sevt->event_type == key_press_event
          || sevt->event_type == button_press_event
 {
   return (sevt->event_type == key_press_event
          || sevt->event_type == button_press_event
@@ -896,10 +889,11 @@ mswindows_enqueue_misc_user_event (Lisp_Object channel, Lisp_Object function,
                                   Lisp_Object object)
 {
   Lisp_Object event = Fmake_event (Qnil, Qnil);
                                   Lisp_Object object)
 {
   Lisp_Object event = Fmake_event (Qnil, Qnil);
-  struct Lisp_Event* e = XEVENT (event);
+  Lisp_Event* e = XEVENT (event);
 
   e->event_type = misc_user_event;
   e->channel = channel;
 
   e->event_type = misc_user_event;
   e->channel = channel;
+  e->timestamp = GetTickCount ();
   e->event.misc.function = function;
   e->event.misc.object = object;
 
   e->event.misc.function = function;
   e->event.misc.object = object;
 
@@ -907,24 +901,24 @@ mswindows_enqueue_misc_user_event (Lisp_Object channel, Lisp_Object function,
 }
 
 void
 }
 
 void
-mswindows_enqueue_magic_event (HWND hwnd, UINT message)
+mswindows_enqueue_magic_event (HWND hwnd, UINT msg)
 {
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
 {
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
-  struct Lisp_Event* event = XEVENT (emacs_event);
+  Lisp_Event* event = XEVENT (emacs_event);
 
   event->channel = hwnd ? mswindows_find_frame (hwnd) : Qnil;
   event->timestamp = GetMessageTime();
   event->event_type = magic_event;
 
   event->channel = hwnd ? mswindows_find_frame (hwnd) : Qnil;
   event->timestamp = GetMessageTime();
   event->event_type = magic_event;
-  EVENT_MSWINDOWS_MAGIC_TYPE (event) = message;
+  EVENT_MSWINDOWS_MAGIC_TYPE (event) = msg;
 
   mswindows_enqueue_dispatch_event (emacs_event);
 }
 
 static void
 
   mswindows_enqueue_dispatch_event (emacs_event);
 }
 
 static void
-mswindows_enqueue_process_event (struct Lisp_Process* p)
+mswindows_enqueue_process_event (Lisp_Process* p)
 {
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
 {
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
-  struct Lisp_Event* event = XEVENT (emacs_event);
+  Lisp_Event* event = XEVENT (emacs_event);
   Lisp_Object process;
   XSETPROCESS (process, p);
 
   Lisp_Object process;
   XSETPROCESS (process, p);
 
@@ -936,7 +930,7 @@ mswindows_enqueue_process_event (struct Lisp_Process* p)
 }
 
 static void
 }
 
 static void
-mswindows_enqueue_mouse_button_event (HWND hwnd, UINT message, POINTS where, DWORD when)
+mswindows_enqueue_mouse_button_event (HWND hwnd, UINT msg, POINTS where, DWORD when)
 {
 
   /* We always use last message time, because mouse button
 {
 
   /* We always use last message time, because mouse button
@@ -944,19 +938,19 @@ mswindows_enqueue_mouse_button_event (HWND hwnd, UINT message, POINTS where, DWO
      recognition will fail */
 
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
      recognition will fail */
 
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
-  struct Lisp_Event* event = XEVENT(emacs_event);
+  Lisp_Event* event = XEVENT(emacs_event);
 
   event->channel = mswindows_find_frame(hwnd);
   event->timestamp = when;
   event->event.button.button =
 
   event->channel = mswindows_find_frame(hwnd);
   event->timestamp = when;
   event->event.button.button =
-    (message==WM_LBUTTONDOWN || message==WM_LBUTTONUP) ? 1 :
-    ((message==WM_RBUTTONDOWN || message==WM_RBUTTONUP) ? 3 : 2);
+    (msg==WM_LBUTTONDOWN || msg==WM_LBUTTONUP) ? 1 :
+    ((msg==WM_RBUTTONDOWN || msg==WM_RBUTTONUP) ? 3 : 2);
   event->event.button.x = where.x;
   event->event.button.y = where.y;
   event->event.button.modifiers = mswindows_modifier_state (NULL, 0);
 
   event->event.button.x = where.x;
   event->event.button.y = where.y;
   event->event.button.modifiers = mswindows_modifier_state (NULL, 0);
 
-  if (message==WM_LBUTTONDOWN || message==WM_MBUTTONDOWN ||
-      message==WM_RBUTTONDOWN)
+  if (msg==WM_LBUTTONDOWN || msg==WM_MBUTTONDOWN ||
+      msg==WM_RBUTTONDOWN)
     {
       event->event_type = button_press_event;
       SetCapture (hwnd);
     {
       event->event_type = button_press_event;
       SetCapture (hwnd);
@@ -981,7 +975,7 @@ static void
 mswindows_enqueue_keypress_event (HWND hwnd, Lisp_Object keysym, int mods)
 {
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
 mswindows_enqueue_keypress_event (HWND hwnd, Lisp_Object keysym, int mods)
 {
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
-  struct Lisp_Event* event = XEVENT(emacs_event);
+  Lisp_Event* event = XEVENT(emacs_event);
 
   event->channel = mswindows_find_console(hwnd);
   event->timestamp = GetMessageTime();
 
   event->channel = mswindows_find_console(hwnd);
   event->timestamp = GetMessageTime();
@@ -999,7 +993,7 @@ static Lisp_Object
 mswindows_dequeue_dispatch_event ()
 {
   Lisp_Object event;
 mswindows_dequeue_dispatch_event ()
 {
   Lisp_Object event;
-  struct Lisp_Event* sevt;
+  Lisp_Event* sevt;
 
   assert (!NILP(mswindows_u_dispatch_event_queue) ||
          !NILP(mswindows_s_dispatch_event_queue));
 
   assert (!NILP(mswindows_u_dispatch_event_queue) ||
          !NILP(mswindows_s_dispatch_event_queue));
@@ -1033,7 +1027,7 @@ mswindows_dequeue_dispatch_event ()
  */
 
 Lisp_Object
  */
 
 Lisp_Object
-mswindows_cancel_dispatch_event (struct Lisp_Event *match)
+mswindows_cancel_dispatch_event (Lisp_Event *match)
 {
   Lisp_Object event;
   Lisp_Object previous_event = Qnil;
 {
   Lisp_Object event;
   Lisp_Object previous_event = Qnil;
@@ -1048,7 +1042,7 @@ mswindows_cancel_dispatch_event (struct Lisp_Event *match)
 
   EVENT_CHAIN_LOOP (event, *head)
     {
 
   EVENT_CHAIN_LOOP (event, *head)
     {
-      struct Lisp_Event *e = XEVENT (event);
+      Lisp_Event *e = XEVENT (event);
       if ((e->event_type == match->event_type) &&
          ((e->event_type == timeout_event) ?
           (e->event.timeout.interval_id == match->event.timeout.interval_id) :
       if ((e->event_type == match->event_type) &&
          ((e->event_type == timeout_event) ?
           (e->event.timeout.interval_id == match->event.timeout.interval_id) :
@@ -1231,17 +1225,29 @@ mswindows_pump_outstanding_events (void)
   return result;
 }
 
   return result;
 }
 
+/*
+ * KEYBOARD_ONLY_P is set to non-zero when we are called from
+ * QUITP, and are interesting in keyboard messages only.
+ */
 static void
 static void
-mswindows_drain_windows_queue ()
+mswindows_drain_windows_queue (int keyboard_only_till_quit_char_p)
 {
   MSG msg;
 {
   MSG msg;
-  while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
+
+  /* Minimize the hassle of misordered events by not fetching
+     past quit char if called from QUITP; */
+  while (!(keyboard_only_till_quit_char_p &&
+          mswindows_quit_chars_count > 0) &&
+        PeekMessage (&msg, NULL,
+                     keyboard_only_till_quit_char_p ? WM_KEYFIRST : 0,
+                     keyboard_only_till_quit_char_p ? WM_KEYLAST : 0,
+                     PM_REMOVE))
     {
     {
-      /* we have to translate messages that are not sent to the main
-         window. this is so that key presses work ok in things like
-         edit fields. however, we *musn't* translate message for the
+      /* We have to translate messages that are not sent to the main
+         window. This is so that key presses work ok in things like
+         edit fields. However, we *musn't* translate message for the
          main window as this is handled in the wnd proc. */
          main window as this is handled in the wnd proc. */
-      if ( GetWindowLong (msg.hwnd, GWL_STYLE) & WS_CHILD )
+      if (GetWindowLong (msg.hwnd, GWL_STYLE) & WS_CHILD)
        {
          TranslateMessage (&msg);
        }
        {
          TranslateMessage (&msg);
        }
@@ -1308,9 +1314,13 @@ mswindows_need_event (int badly_p)
       return;
     }
 
       return;
     }
 
+#if 0
   /* Have to drain Windows message queue first, otherwise, we may miss
      quit char when called from quit_p */
   /* Have to drain Windows message queue first, otherwise, we may miss
      quit char when called from quit_p */
+  /* #### This is, ehm, not quite true -- this function is not
+     called from quit_p. --kkm */
   mswindows_drain_windows_queue ();
   mswindows_drain_windows_queue ();
+#endif
 
   while (NILP (mswindows_u_dispatch_event_queue)
         && NILP (mswindows_s_dispatch_event_queue))
 
   while (NILP (mswindows_u_dispatch_event_queue)
         && NILP (mswindows_s_dispatch_event_queue))
@@ -1341,7 +1351,7 @@ mswindows_need_event (int badly_p)
        {
          if (FD_ISSET (windows_fd, &temp_mask))
            {
        {
          if (FD_ISSET (windows_fd, &temp_mask))
            {
-             mswindows_drain_windows_queue ();
+             mswindows_drain_windows_queue (0);
            }
 #ifdef HAVE_TTY
          /* Look for a TTY event */
            }
 #ifdef HAVE_TTY
          /* Look for a TTY event */
@@ -1354,7 +1364,7 @@ mswindows_need_event (int badly_p)
                {
                  struct console *c = tty_find_console_from_fd (i);
                  Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
                {
                  struct console *c = tty_find_console_from_fd (i);
                  Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
-                 struct Lisp_Event* event = XEVENT (emacs_event);
+                 Lisp_Event* event = XEVENT (emacs_event);
 
                  assert (c);
                  if (read_event_from_tty_or_stream_desc (event, c, i))
 
                  assert (c);
                  if (read_event_from_tty_or_stream_desc (event, c, i))
@@ -1372,7 +1382,7 @@ mswindows_need_event (int badly_p)
                {
                  if (FD_ISSET (i, &process_only_mask))
                    {
                {
                  if (FD_ISSET (i, &process_only_mask))
                    {
-                     struct Lisp_Process *p =
+                     Lisp_Process *p =
                        get_process_from_usid (FD_TO_USID(i));
 
                      mswindows_enqueue_process_event (p);
                        get_process_from_usid (FD_TO_USID(i));
 
                      mswindows_enqueue_process_event (p);
@@ -1422,13 +1432,13 @@ mswindows_need_event (int badly_p)
     else if (active == WAIT_OBJECT_0 + mswindows_waitable_count)
       {
        /* Got your message, thanks */
     else if (active == WAIT_OBJECT_0 + mswindows_waitable_count)
       {
        /* Got your message, thanks */
-       mswindows_drain_windows_queue ();
+       mswindows_drain_windows_queue (0);
       }
     else
       {
        int ix = active - WAIT_OBJECT_0;
        /* First, try to find which process' output has signaled */
       }
     else
       {
        int ix = active - WAIT_OBJECT_0;
        /* First, try to find which process' output has signaled */
-       struct Lisp_Process *p =
+       Lisp_Process *p =
          get_process_from_usid (HANDLE_TO_USID (mswindows_waitable_handles[ix]));
        if (p != NULL)
          {
          get_process_from_usid (HANDLE_TO_USID (mswindows_waitable_handles[ix]));
        if (p != NULL)
          {
@@ -1463,7 +1473,7 @@ static void CALLBACK
 mswindows_wm_timer_callback (HWND hwnd, UINT umsg, UINT id_timer, DWORD dwtime)
 {
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
 mswindows_wm_timer_callback (HWND hwnd, UINT umsg, UINT id_timer, DWORD dwtime)
 {
   Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
-  struct Lisp_Event *event = XEVENT (emacs_event);
+  Lisp_Event *event = XEVENT (emacs_event);
 
   if (KillTimer (NULL, id_timer))
     --mswindows_pending_timers_count;
 
   if (KillTimer (NULL, id_timer))
     --mswindows_pending_timers_count;
@@ -1521,7 +1531,7 @@ mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv,
           Lisp_Object l_dndlist = Qnil;
          Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
          Lisp_Object frmcons, devcons, concons;
           Lisp_Object l_dndlist = Qnil;
          Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
          Lisp_Object frmcons, devcons, concons;
-         struct Lisp_Event *event = XEVENT (emacs_event);
+         Lisp_Event *event = XEVENT (emacs_event);
 
          DdeGetData (hdata, cmd, len, 0);
          cmd[len] = '\0';
 
          DdeGetData (hdata, cmd, len, 0);
          cmd[len] = '\0';
@@ -1599,6 +1609,19 @@ mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv,
 #endif
 
 /*
 #endif
 
 /*
+ * Returns 1 if a key is a real modifier or special key, which 
+ * is better handled by DefWindowProc
+ */
+static int
+key_needs_default_processing_p (UINT vkey)
+{
+  if (mswindows_meta_activates_menu && vkey == VK_MENU)
+    return 1;
+
+  return 0;
+}
+
+/*
  * The windows procedure for the window class XEMACS_CLASS
  */
 LRESULT WINAPI
  * The windows procedure for the window class XEMACS_CLASS
  */
 LRESULT WINAPI
@@ -1609,7 +1632,7 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
   Lisp_Object emacs_event = Qnil;
   Lisp_Object fobj = Qnil;
 
   Lisp_Object emacs_event = Qnil;
   Lisp_Object fobj = Qnil;
 
-  struct Lisp_Event *event;
+  Lisp_Event *event;
   struct frame *frame;
   struct mswindows_frame* msframe;
 
   struct frame *frame;
   struct mswindows_frame* msframe;
 
@@ -1653,7 +1676,10 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
          SetKeyboardState (keymap);
        }
     };
          SetKeyboardState (keymap);
        }
     };
-    goto defproc;
+    if (key_needs_default_processing_p (wParam))
+      goto defproc;
+    else
+      break;
 
   case WM_KEYDOWN:
   case WM_SYSKEYDOWN:
 
   case WM_KEYDOWN:
   case WM_SYSKEYDOWN:
@@ -1709,7 +1735,8 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
          /* Clear control and alt modifiers unless AltGr is pressed */
          keymap [VK_RCONTROL] = 0;
          keymap [VK_LMENU] = 0;
          /* 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))
+         if (!has_AltGr || !(keymap [VK_LCONTROL] & 0x80)
+             || !(keymap [VK_RMENU] & 0x80))
            {
              keymap [VK_LCONTROL] = 0;
              keymap [VK_CONTROL] = 0;
            {
              keymap [VK_LCONTROL] = 0;
              keymap [VK_CONTROL] = 0;
@@ -1745,10 +1772,10 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
          SetKeyboardState (keymap_orig);
        } /* else */
     }
          SetKeyboardState (keymap_orig);
        } /* else */
     }
-    /* F10 causes menu activation by default. We do not want this */
-    if (wParam != VK_F10 && (mswindows_meta_activates_menu || wParam != VK_MENU))
+    if (key_needs_default_processing_p (wParam))
       goto defproc;
       goto defproc;
-    break;
+    else
+      break;
 
   case WM_MBUTTONDOWN:
   case WM_MBUTTONUP:
 
   case WM_MBUTTONDOWN:
   case WM_MBUTTONUP:
@@ -1964,8 +1991,9 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
            {
              /* I think this is safe since the text will only go away
                  when the toolbar does...*/
            {
              /* I think this is safe since the text will only go away
                  when the toolbar does...*/
-             GET_C_STRING_EXT_DATA_ALLOCA (btext, FORMAT_OS,
-                                           tttext->lpszText);
+             TO_EXTERNAL_FORMAT (LISP_STRING, btext,
+                                 C_STRING_ALLOCA, tttext->lpszText,
+                                 Qnative);
            }
 #endif
        }
            }
 #endif
        }
@@ -1980,11 +2008,11 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
       else if (nmhdr->code == TCN_SELCHANGE)
        {
          TC_ITEM item;
       else if (nmhdr->code == TCN_SELCHANGE)
        {
          TC_ITEM item;
-         int index = SendMessage (nmhdr->hwndFrom, TCM_GETCURSEL, 0, 0);
+         int idx = SendMessage (nmhdr->hwndFrom, TCM_GETCURSEL, 0, 0);
          frame = XFRAME (mswindows_find_frame (hwnd));
 
          item.mask = TCIF_PARAM;
          frame = XFRAME (mswindows_find_frame (hwnd));
 
          item.mask = TCIF_PARAM;
-         SendMessage (nmhdr->hwndFrom, TCM_GETITEM, (WPARAM)index,
+         SendMessage (nmhdr->hwndFrom, TCM_GETITEM, (WPARAM)idx,
                       (LPARAM)&item);
 
          mswindows_handle_gui_wm_command (frame, 0, item.lParam);
                       (LPARAM)&item);
 
          mswindows_handle_gui_wm_command (frame, 0, item.lParam);
@@ -2615,7 +2643,7 @@ emacs_mswindows_add_timeout (EMACS_TIME thyme)
 static void
 emacs_mswindows_remove_timeout (int id)
 {
 static void
 emacs_mswindows_remove_timeout (int id)
 {
-  struct Lisp_Event match_against;
+  Lisp_Event match_against;
   Lisp_Object emacs_event;
 
   if (KillTimer (NULL, id))
   Lisp_Object emacs_event;
 
   if (KillTimer (NULL, id))
@@ -2651,7 +2679,7 @@ emacs_mswindows_event_pending_p (int user_p)
  * Return the next event
  */
 static void
  * Return the next event
  */
 static void
-emacs_mswindows_next_event (struct Lisp_Event *emacs_event)
+emacs_mswindows_next_event (Lisp_Event *emacs_event)
 {
   Lisp_Object event, event2;
 
 {
   Lisp_Object event, event2;
 
@@ -2667,7 +2695,7 @@ emacs_mswindows_next_event (struct Lisp_Event *emacs_event)
  * Handle a magic event off the dispatch queue.
  */
 static void
  * Handle a magic event off the dispatch queue.
  */
 static void
-emacs_mswindows_handle_magic_event (struct Lisp_Event *emacs_event)
+emacs_mswindows_handle_magic_event (Lisp_Event *emacs_event)
 {
   switch (EVENT_MSWINDOWS_MAGIC_TYPE(emacs_event))
     {
 {
   switch (EVENT_MSWINDOWS_MAGIC_TYPE(emacs_event))
     {
@@ -2721,7 +2749,7 @@ emacs_mswindows_handle_magic_event (struct Lisp_Event *emacs_event)
 
 #ifndef HAVE_MSG_SELECT
 static HANDLE
 
 #ifndef HAVE_MSG_SELECT
 static HANDLE
-get_process_input_waitable (struct Lisp_Process *process)
+get_process_input_waitable (Lisp_Process *process)
 {
   Lisp_Object instr, outstr, p;
   XSETPROCESS (p, process);
 {
   Lisp_Object instr, outstr, p;
   XSETPROCESS (p, process);
@@ -2737,7 +2765,7 @@ get_process_input_waitable (struct Lisp_Process *process)
 }
 
 static void
 }
 
 static void
-emacs_mswindows_select_process (struct Lisp_Process *process)
+emacs_mswindows_select_process (Lisp_Process *process)
 {
   HANDLE hev = get_process_input_waitable (process);
 
 {
   HANDLE hev = get_process_input_waitable (process);
 
@@ -2762,7 +2790,7 @@ emacs_mswindows_select_process (struct Lisp_Process *process)
 }
 
 static void
 }
 
 static void
-emacs_mswindows_unselect_process (struct Lisp_Process *process)
+emacs_mswindows_unselect_process (Lisp_Process *process)
 {
   /* Process handle is removed in the event loop as soon
      as it is signaled, so don't bother here about it */
 {
   /* Process handle is removed in the event loop as soon
      as it is signaled, so don't bother here about it */
@@ -2796,38 +2824,37 @@ emacs_mswindows_unselect_console (struct console *con)
 static void
 emacs_mswindows_quit_p (void)
 {
 static void
 emacs_mswindows_quit_p (void)
 {
-  MSG msg;
-
   /* Quit cannot happen in modal loop: all program
      input is dedicated to Windows. */
   if (mswindows_in_modal_loop)
     return;
 
   /* Quit cannot happen in modal loop: all program
      input is dedicated to Windows. */
   if (mswindows_in_modal_loop)
     return;
 
-  /* Drain windows queue. This sets up number of quit characters in the queue
-   * (and also processes wm focus change, move, resize, etc messages).
-   * We don't want to process WM_PAINT messages because this function can be
-   * called from almost anywhere and the windows' states may be changing. */
-  while (PeekMessage (&msg, NULL, 0, WM_PAINT-1, PM_REMOVE) ||
-        PeekMessage (&msg, NULL, WM_PAINT+1, WM_USER-1, PM_REMOVE))
-      DispatchMessage (&msg);
+  /* Drain windows queue. This sets up number of quit characters in
+     the queue */
+  mswindows_drain_windows_queue (1);
 
   if (mswindows_quit_chars_count > 0)
     {
       /* Yes there's a hidden one... Throw it away */
 
   if (mswindows_quit_chars_count > 0)
     {
       /* Yes there's a hidden one... Throw it away */
-      struct Lisp_Event match_against;
+      Lisp_Event match_against;
       Lisp_Object emacs_event;
       Lisp_Object emacs_event;
+      int critical_p = 0;
 
       match_against.event_type = key_press_event;
       match_against.event.key.modifiers = FAKE_MOD_QUIT;
 
 
       match_against.event_type = key_press_event;
       match_against.event.key.modifiers = FAKE_MOD_QUIT;
 
-      emacs_event = mswindows_cancel_dispatch_event (&match_against);
-      assert (!NILP (emacs_event));
+      while (mswindows_quit_chars_count-- > 0)
+       {
+         emacs_event = mswindows_cancel_dispatch_event (&match_against);
+         assert (!NILP (emacs_event));
+         
+         if (XEVENT(emacs_event)->event.key.modifiers & MOD_SHIFT)
+           critical_p = 1;
 
 
-      Vquit_flag = (XEVENT(emacs_event)->event.key.modifiers & MOD_SHIFT
-                   ? Qcritical : Qt);
+         Fdeallocate_event(emacs_event);
+       }
 
 
-      Fdeallocate_event(emacs_event);
-      --mswindows_quit_chars_count;
+      Vquit_flag = critical_p ? Qcritical : Qt;
     }
 }
 
     }
 }
 
@@ -2939,7 +2966,7 @@ emacs_mswindows_delete_stream_pair (Lisp_Object instream,
    If we've still got pointers to it in this file, we're gonna lose hard.
  */
 void
    If we've still got pointers to it in this file, we're gonna lose hard.
  */
 void
-debug_process_finalization (struct Lisp_Process *p)
+debug_process_finalization (Lisp_Process *p)
 {
 #if 0 /* #### */
   Lisp_Object instr, outstr;
 {
 #if 0 /* #### */
   Lisp_Object instr, outstr;
@@ -2976,9 +3003,9 @@ reinit_vars_of_event_mswindows (void)
   mswindows_event_stream->unselect_console_cb  = emacs_mswindows_unselect_console;
 #ifdef HAVE_MSG_SELECT
   mswindows_event_stream->select_process_cb    =
   mswindows_event_stream->unselect_console_cb  = emacs_mswindows_unselect_console;
 #ifdef HAVE_MSG_SELECT
   mswindows_event_stream->select_process_cb    =
-    (void (*)(struct Lisp_Process*))event_stream_unixoid_select_process;
+    (void (*)(Lisp_Process*))event_stream_unixoid_select_process;
   mswindows_event_stream->unselect_process_cb  =
   mswindows_event_stream->unselect_process_cb  =
-    (void (*)(struct Lisp_Process*))event_stream_unixoid_unselect_process;
+    (void (*)(Lisp_Process*))event_stream_unixoid_unselect_process;
   mswindows_event_stream->create_stream_pair_cb = event_stream_unixoid_create_stream_pair;
   mswindows_event_stream->delete_stream_pair_cb = event_stream_unixoid_delete_stream_pair;
 #else
   mswindows_event_stream->create_stream_pair_cb = event_stream_unixoid_create_stream_pair;
   mswindows_event_stream->delete_stream_pair_cb = event_stream_unixoid_delete_stream_pair;
 #else
index 6cd03cd..5680725 100644 (file)
@@ -508,7 +508,7 @@ event_stream_event_pending_p (int user)
 }
 
 static int
 }
 
 static int
-maybe_read_quit_event (struct Lisp_Event *event)
+maybe_read_quit_event (Lisp_Event *event)
 {
   /* A C-g that came from `sigint_happened' will always come from the
      controlling terminal.  If that doesn't exist, however, then the
 {
   /* A C-g that came from `sigint_happened' will always come from the
      controlling terminal.  If that doesn't exist, however, then the
@@ -535,7 +535,7 @@ maybe_read_quit_event (struct Lisp_Event *event)
 }
 
 void
 }
 
 void
-event_stream_next_event (struct Lisp_Event *event)
+event_stream_next_event (Lisp_Event *event)
 {
   Lisp_Object event_obj;
 
 {
   Lisp_Object event_obj;
 
@@ -579,7 +579,7 @@ event_stream_next_event (struct Lisp_Event *event)
 }
 
 void
 }
 
 void
-event_stream_handle_magic_event (struct Lisp_Event *event)
+event_stream_handle_magic_event (Lisp_Event *event)
 {
   check_event_stream_ok (EVENT_STREAM_READ);
   event_stream->handle_magic_event_cb (event);
 {
   check_event_stream_ok (EVENT_STREAM_READ);
   event_stream->handle_magic_event_cb (event);
@@ -622,7 +622,7 @@ event_stream_unselect_console (struct console *con)
 }
 
 void
 }
 
 void
-event_stream_select_process (struct Lisp_Process *proc)
+event_stream_select_process (Lisp_Process *proc)
 {
   check_event_stream_ok (EVENT_STREAM_PROCESS);
   if (!get_process_selected_p (proc))
 {
   check_event_stream_ok (EVENT_STREAM_PROCESS);
   if (!get_process_selected_p (proc))
@@ -633,7 +633,7 @@ event_stream_select_process (struct Lisp_Process *proc)
 }
 
 void
 }
 
 void
-event_stream_unselect_process (struct Lisp_Process *proc)
+event_stream_unselect_process (Lisp_Process *proc)
 {
   check_event_stream_ok (EVENT_STREAM_PROCESS);
   if (get_process_selected_p (proc))
 {
   check_event_stream_ok (EVENT_STREAM_PROCESS);
   if (get_process_selected_p (proc))
@@ -797,7 +797,7 @@ maybe_kbd_translate (Lisp_Object event)
        }
       else if (CHARP (traduit))
        {
        }
       else if (CHARP (traduit))
        {
-         struct Lisp_Event ev2;
+         Lisp_Event ev2;
 
          /* This used to call Fcharacter_to_event() directly into EVENT,
             but that can eradicate timestamps and other such stuff.
 
          /* This used to call Fcharacter_to_event() directly into EVENT,
             but that can eradicate timestamps and other such stuff.
@@ -1106,7 +1106,7 @@ static Lisp_Object Vtimeout_free_list;
 static Lisp_Object
 mark_timeout (Lisp_Object obj)
 {
 static Lisp_Object
 mark_timeout (Lisp_Object obj)
 {
-  struct Lisp_Timeout *tm = XTIMEOUT (obj);
+  Lisp_Timeout *tm = XTIMEOUT (obj);
   mark_object (tm->function);
   return tm->object;
 }
   mark_object (tm->function);
   return tm->object;
 }
@@ -1115,7 +1115,7 @@ mark_timeout (Lisp_Object obj)
 static void
 print_timeout (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
 static void
 print_timeout (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
-  CONST struct Lisp_Timeout *t = XTIMEOUT (obj);
+  CONST Lisp_Timeout *t = XTIMEOUT (obj);
   char buf[64];
 
   sprintf (buf, "#<INTERNAL OBJECT (XEmacs bug?) (timeout) 0x%lx>",
   char buf[64];
 
   sprintf (buf, "#<INTERNAL OBJECT (XEmacs bug?) (timeout) 0x%lx>",
@@ -1124,13 +1124,14 @@ print_timeout (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 }
 
 static const struct lrecord_description timeout_description[] = {
 }
 
 static const struct lrecord_description timeout_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Timeout, function), 2 },
+  { XD_LISP_OBJECT, offsetof (Lisp_Timeout, function) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Timeout, object) },
   { XD_END }
 };
 
 DEFINE_LRECORD_IMPLEMENTATION ("timeout", timeout,
                               mark_timeout, print_timeout,
   { XD_END }
 };
 
 DEFINE_LRECORD_IMPLEMENTATION ("timeout", timeout,
                               mark_timeout, print_timeout,
-                              0, 0, 0, timeout_description, struct Lisp_Timeout);
+                              0, 0, 0, timeout_description, Lisp_Timeout);
 
 /* Generate a timeout and return its ID. */
 
 
 /* Generate a timeout and return its ID. */
 
@@ -1141,7 +1142,7 @@ event_stream_generate_wakeup (unsigned int milliseconds,
                              int async_p)
 {
   Lisp_Object op = allocate_managed_lcrecord (Vtimeout_free_list);
                              int async_p)
 {
   Lisp_Object op = allocate_managed_lcrecord (Vtimeout_free_list);
-  struct Lisp_Timeout *timeout = XTIMEOUT (op);
+  Lisp_Timeout *timeout = XTIMEOUT (op);
   EMACS_TIME current_time;
   EMACS_TIME interval;
 
   EMACS_TIME current_time;
   EMACS_TIME interval;
 
@@ -1190,7 +1191,7 @@ event_stream_resignal_wakeup (int interval_id, int async_p,
                              Lisp_Object *function, Lisp_Object *object)
 {
   Lisp_Object op = Qnil, rest;
                              Lisp_Object *function, Lisp_Object *object)
 {
   Lisp_Object op = Qnil, rest;
-  struct Lisp_Timeout *timeout;
+  Lisp_Timeout *timeout;
   Lisp_Object *timeout_list;
   struct gcpro gcpro1;
   int id;
   Lisp_Object *timeout_list;
   struct gcpro gcpro1;
   int id;
@@ -1263,7 +1264,7 @@ event_stream_resignal_wakeup (int interval_id, int async_p,
 void
 event_stream_disable_wakeup (int id, int async_p)
 {
 void
 event_stream_disable_wakeup (int id, int async_p)
 {
-  struct Lisp_Timeout *timeout = 0;
+  Lisp_Timeout *timeout = 0;
   Lisp_Object rest;
   Lisp_Object *timeout_list;
 
   Lisp_Object rest;
   Lisp_Object *timeout_list;
 
@@ -1298,7 +1299,7 @@ event_stream_disable_wakeup (int id, int async_p)
 static int
 event_stream_wakeup_pending_p (int id, int async_p)
 {
 static int
 event_stream_wakeup_pending_p (int id, int async_p)
 {
-  struct Lisp_Timeout *timeout;
+  Lisp_Timeout *timeout;
   Lisp_Object rest;
   Lisp_Object timeout_list;
   int found = 0;
   Lisp_Object rest;
   Lisp_Object timeout_list;
   int found = 0;
@@ -2015,7 +2016,7 @@ next_event_internal (Lisp_Object target_event, int allow_queued)
     }
   else
     {
     }
   else
     {
-      struct Lisp_Event *e = XEVENT (target_event);
+      Lisp_Event *e = XEVENT (target_event);
 
       /* The command_event_queue was empty.  Wait for an event. */
       event_stream_next_event (e);
 
       /* The command_event_queue was empty.  Wait for an event. */
       event_stream_next_event (e);
@@ -3037,7 +3038,7 @@ execute_internal_event (Lisp_Object event)
 
     case timeout_event:
       {
 
     case timeout_event:
       {
-       struct Lisp_Event *e = XEVENT (event);
+       Lisp_Event *e = XEVENT (event);
        if (!NILP (e->event.timeout.function))
          call1 (e->event.timeout.function,
                 e->event.timeout.object);
        if (!NILP (e->event.timeout.function))
          call1 (e->event.timeout.function,
                 e->event.timeout.object);
@@ -3769,7 +3770,7 @@ command_builder_find_leaf (struct command_builder *builder,
           || (CHAR_OR_CHAR_INTP (key->keysym)
               && ((c = XCHAR_OR_CHAR_INT (key->keysym)), c >= 'A' && c <= 'Z')))
         {
           || (CHAR_OR_CHAR_INTP (key->keysym)
               && ((c = XCHAR_OR_CHAR_INT (key->keysym)), c >= 'A' && c <= 'Z')))
         {
-          struct Lisp_Event terminal_copy = *XEVENT (terminal);
+          Lisp_Event terminal_copy = *XEVENT (terminal);
 
           if (key->modifiers & MOD_SHIFT)
             key->modifiers &= (~ MOD_SHIFT);
 
           if (key->modifiers & MOD_SHIFT)
             key->modifiers &= (~ MOD_SHIFT);
@@ -4162,7 +4163,7 @@ lookup_command_event (struct command_builder *command_builder,
     if (EVENTP (recent)
        && event_matches_key_specifier_p (XEVENT (recent), Vmeta_prefix_char))
       {
     if (EVENTP (recent)
        && event_matches_key_specifier_p (XEVENT (recent), Vmeta_prefix_char))
       {
-       struct Lisp_Event *e;
+       Lisp_Event *e;
        /* When we see a sequence like "ESC x", pretend we really saw "M-x".
           DoubleThink the recent-keys and this-command-keys as well. */
 
        /* When we see a sequence like "ESC x", pretend we really saw "M-x".
           DoubleThink the recent-keys and this-command-keys as well. */
 
@@ -4229,7 +4230,7 @@ lookup_command_event (struct command_builder *command_builder,
          }
        else if (!NILP (Vquit_flag)) {
          Lisp_Object quit_event = Fmake_event(Qnil, Qnil);
          }
        else if (!NILP (Vquit_flag)) {
          Lisp_Object quit_event = Fmake_event(Qnil, Qnil);
-         struct Lisp_Event *e = XEVENT (quit_event);
+         Lisp_Event *e = XEVENT (quit_event);
          /* if quit happened during menu acceleration, pretend we read it */
          struct console *con = XCONSOLE (Fselected_console ());
          int ch = CONSOLE_QUIT_CHAR (con);
          /* if quit happened during menu acceleration, pretend we read it */
          struct console *con = XCONSOLE (Fselected_console ());
          int ch = CONSOLE_QUIT_CHAR (con);
@@ -4400,7 +4401,7 @@ post_command_hook (void)
 #if 0
   /* If the last command deleted the frame, `win' might be nil.
      It seems safest to do nothing in this case. */
 #if 0
   /* If the last command deleted the frame, `win' might be nil.
      It seems safest to do nothing in this case. */
-  /* ### This doesn't really fix the problem,
+  /* #### This doesn't really fix the problem,
      if delete-frame is called by some hook */
   if (NILP (win))
     return;
      if delete-frame is called by some hook */
   if (NILP (win))
     return;
@@ -4479,7 +4480,7 @@ Magic events are handled as necessary.
 {
   /* This function can GC */
   struct command_builder *command_builder;
 {
   /* This function can GC */
   struct command_builder *command_builder;
-  struct Lisp_Event *ev;
+  Lisp_Event *ev;
   Lisp_Object console;
   Lisp_Object channel;
 
   Lisp_Object console;
   Lisp_Object channel;
 
@@ -4976,7 +4977,7 @@ reinit_vars_of_event_stream (void)
   recent_keys_ring_index = 0;
   recent_keys_ring_size = 100;
   num_input_chars = 0;
   recent_keys_ring_index = 0;
   recent_keys_ring_size = 100;
   num_input_chars = 0;
-  Vtimeout_free_list = make_lcrecord_list (sizeof (struct Lisp_Timeout),
+  Vtimeout_free_list = make_lcrecord_list (sizeof (Lisp_Timeout),
                                           &lrecord_timeout);
   staticpro_nodump (&Vtimeout_free_list);
   the_low_level_timeout_blocktype =
                                           &lrecord_timeout);
   staticpro_nodump (&Vtimeout_free_list);
   the_low_level_timeout_blocktype =
index 0437604..93fb928 100644 (file)
@@ -64,7 +64,7 @@ emacs_tty_remove_timeout (int id)
 }
 
 static void
 }
 
 static void
-tty_timeout_to_emacs_event (struct Lisp_Event *emacs_event)
+tty_timeout_to_emacs_event (Lisp_Event *emacs_event)
 {
   emacs_event->event_type = timeout_event;
   /* timeout events have nil as channel */
 {
   emacs_event->event_type = timeout_event;
   /* timeout events have nil as channel */
@@ -112,7 +112,7 @@ tty_find_console_from_fd (int fd)
 }
 
 static void
 }
 
 static void
-emacs_tty_next_event (struct Lisp_Event *emacs_event)
+emacs_tty_next_event (Lisp_Event *emacs_event)
 {
   while (1)
     {
 {
   while (1)
     {
@@ -156,8 +156,7 @@ emacs_tty_next_event (struct Lisp_Event *emacs_event)
              if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &process_only_mask))
                {
                  Lisp_Object process;
              if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &process_only_mask))
                {
                  Lisp_Object process;
-                 struct Lisp_Process *p =
-                   get_process_from_usid (FD_TO_USID(i));
+                 Lisp_Process *p = get_process_from_usid (FD_TO_USID(i));
 
                  assert (p);
                  XSETPROCESS (process, p);
 
                  assert (p);
                  XSETPROCESS (process, p);
@@ -188,20 +187,20 @@ emacs_tty_next_event (struct Lisp_Event *emacs_event)
 }
 
 static void
 }
 
 static void
-emacs_tty_handle_magic_event (struct Lisp_Event *emacs_event)
+emacs_tty_handle_magic_event (Lisp_Event *emacs_event)
 {
   /* Nothing to do currently */
 }
 
 \f
 static void
 {
   /* Nothing to do currently */
 }
 
 \f
 static void
-emacs_tty_select_process (struct Lisp_Process *process)
+emacs_tty_select_process (Lisp_Process *process)
 {
   event_stream_unixoid_select_process (process);
 }
 
 static void
 {
   event_stream_unixoid_select_process (process);
 }
 
 static void
-emacs_tty_unselect_process (struct Lisp_Process *process)
+emacs_tty_unselect_process (Lisp_Process *process)
 {
   event_stream_unixoid_unselect_process (process);
 }
 {
   event_stream_unixoid_unselect_process (process);
 }
index 9033ebf..1bfd82c 100644 (file)
@@ -71,7 +71,7 @@ int signal_event_pipe_initialized;
 int fake_event_occurred;
 
 int
 int fake_event_occurred;
 
 int
-read_event_from_tty_or_stream_desc (struct Lisp_Event *event,
+read_event_from_tty_or_stream_desc (Lisp_Event *event,
                                    struct console *con, int fd)
 {
   unsigned char ch;
                                    struct console *con, int fd)
 {
   unsigned char ch;
@@ -174,7 +174,7 @@ event_stream_unixoid_unselect_console (struct console *con)
 }
 
 static int
 }
 
 static int
-get_process_infd (struct Lisp_Process *p)
+get_process_infd (Lisp_Process *p)
 {
   Lisp_Object instr, outstr;
   get_process_streams (p, &instr, &outstr);
 {
   Lisp_Object instr, outstr;
   get_process_streams (p, &instr, &outstr);
@@ -183,7 +183,7 @@ get_process_infd (struct Lisp_Process *p)
 }
 
 int
 }
 
 int
-event_stream_unixoid_select_process (struct Lisp_Process *proc)
+event_stream_unixoid_select_process (Lisp_Process *proc)
 {
   int infd = get_process_infd (proc);
 
 {
   int infd = get_process_infd (proc);
 
@@ -194,7 +194,7 @@ event_stream_unixoid_select_process (struct Lisp_Process *proc)
 }
 
 int
 }
 
 int
-event_stream_unixoid_unselect_process (struct Lisp_Process *proc)
+event_stream_unixoid_unselect_process (Lisp_Process *proc)
 {
   int infd = get_process_infd (proc);
 
 {
   int infd = get_process_infd (proc);
 
index e08ded9..f4648f5 100644 (file)
@@ -81,9 +81,9 @@ static void
 deinitialize_event (Lisp_Object ev)
 {
   int i;
 deinitialize_event (Lisp_Object ev)
 {
   int i;
-  struct Lisp_Event *event = XEVENT (ev);
+  Lisp_Event *event = XEVENT (ev);
 
 
-  for (i = 0; i < (int) (sizeof (struct Lisp_Event) / sizeof (int)); i++)
+  for (i = 0; i < (int) (sizeof (Lisp_Event) / sizeof (int)); i++)
     ((int *) event) [i] = 0xdeadbeef;
   event->event_type = dead_event;
   event->channel = Qnil;
     ((int *) event) [i] = 0xdeadbeef;
   event->event_type = dead_event;
   event->channel = Qnil;
@@ -93,7 +93,7 @@ deinitialize_event (Lisp_Object ev)
 
 /* Set everything to zero or nil so that it's predictable. */
 void
 
 /* Set everything to zero or nil so that it's predictable. */
 void
-zero_event (struct Lisp_Event *e)
+zero_event (Lisp_Event *e)
 {
   xzero (*e);
   set_lheader_implementation (&(e->lheader), &lrecord_event);
 {
   xzero (*e);
   set_lheader_implementation (&(e->lheader), &lrecord_event);
@@ -105,7 +105,7 @@ zero_event (struct Lisp_Event *e)
 static Lisp_Object
 mark_event (Lisp_Object obj)
 {
 static Lisp_Object
 mark_event (Lisp_Object obj)
 {
-  struct Lisp_Event *event = XEVENT (obj);
+  Lisp_Event *event = XEVENT (obj);
 
   switch (event->event_type)
     {
 
   switch (event->event_type)
     {
@@ -221,8 +221,8 @@ print_event (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 static int
 event_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
 static int
 event_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  struct Lisp_Event *e1 = XEVENT (obj1);
-  struct Lisp_Event *e2 = XEVENT (obj2);
+  Lisp_Event *e1 = XEVENT (obj1);
+  Lisp_Event *e2 = XEVENT (obj2);
 
   if (e1->event_type != e2->event_type) return 0;
   if (!EQ (e1->channel, e2->channel)) return 0;
 
   if (e1->event_type != e2->event_type) return 0;
   if (!EQ (e1->channel, e2->channel)) return 0;
@@ -293,8 +293,9 @@ event_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
        if (CONSOLE_MSWINDOWS_P (con))
          return (!memcmp(&e1->event.magic.underlying_mswindows_event,
                          &e2->event.magic.underlying_mswindows_event,
        if (CONSOLE_MSWINDOWS_P (con))
          return (!memcmp(&e1->event.magic.underlying_mswindows_event,
                          &e2->event.magic.underlying_mswindows_event,
-                         sizeof(union magic_data)));
+                         sizeof (union magic_data)));
 #endif
 #endif
+       abort ();
        return 1; /* not reached */
       }
 
        return 1; /* not reached */
       }
 
@@ -307,7 +308,7 @@ event_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 static unsigned long
 event_hash (Lisp_Object obj, int depth)
 {
 static unsigned long
 event_hash (Lisp_Object obj, int depth)
 {
-  struct Lisp_Event *e = XEVENT (obj);
+  Lisp_Event *e = XEVENT (obj);
   unsigned long hash;
 
   hash = HASH2 (e->event_type, LISP_HASH (e->channel));
   unsigned long hash;
 
   hash = HASH2 (e->event_type, LISP_HASH (e->channel));
@@ -360,6 +361,8 @@ event_hash (Lisp_Object obj, int depth)
        if (CONSOLE_MSWINDOWS_P (con))
          return HASH2 (hash, e->event.magic.underlying_mswindows_event);
 #endif
        if (CONSOLE_MSWINDOWS_P (con))
          return HASH2 (hash, e->event.magic.underlying_mswindows_event);
 #endif
+       abort ();
+       return 0;
       }
 
     case empty_event:
       }
 
     case empty_event:
@@ -375,7 +378,7 @@ event_hash (Lisp_Object obj, int depth)
 
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("event", event,
                                     mark_event, print_event, 0, event_equal,
 
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("event", event,
                                     mark_event, print_event, 0, event_equal,
-                                    event_hash, 0, struct Lisp_Event);
+                                    event_hash, 0, Lisp_Event);
 
 \f
 DEFUN ("make-event", Fmake_event, 0, 2, 0, /*
 
 \f
 DEFUN ("make-event", Fmake_event, 0, 2, 0, /*
@@ -428,7 +431,7 @@ WARNING: the event object returned may be a reused one; see the function
 {
   Lisp_Object tail, keyword, value;
   Lisp_Object event = Qnil;
 {
   Lisp_Object tail, keyword, value;
   Lisp_Object event = Qnil;
-  struct Lisp_Event *e;
+  Lisp_Event *e;
   EMACS_INT coord_x = 0, coord_y = 0;
   struct gcpro gcpro1;
 
   EMACS_INT coord_x = 0, coord_y = 0;
   struct gcpro gcpro1;
 
@@ -970,7 +973,7 @@ command_event_p (Lisp_Object event)
 
 
 void
 
 
 void
-character_to_event (Emchar c, struct Lisp_Event *event, struct console *con,
+character_to_event (Emchar c, Lisp_Event *event, struct console *con,
                    int use_console_meta_flag, int do_backspace_mapping)
 {
   Lisp_Object k = Qnil;
                    int use_console_meta_flag, int do_backspace_mapping)
 {
   Lisp_Object k = Qnil;
@@ -1039,17 +1042,18 @@ character_to_event (Emchar c, struct Lisp_Event *event, struct console *con,
   event->event.key.modifiers = m;
 }
 
   event->event.key.modifiers = m;
 }
 
-
 /* This variable controls what character name -> character code mapping
    we are using.  Window-system-specific code sets this to some symbol,
    and we use that symbol as the plist key to convert keysyms into 8-bit
    codes.  In this way one can have several character sets predefined and
    switch them by changing this.
 /* This variable controls what character name -> character code mapping
    we are using.  Window-system-specific code sets this to some symbol,
    and we use that symbol as the plist key to convert keysyms into 8-bit
    codes.  In this way one can have several character sets predefined and
    switch them by changing this.
+
+   #### This is utterly bogus and should be removed.
  */
 Lisp_Object Vcharacter_set_property;
 
 Emchar
  */
 Lisp_Object Vcharacter_set_property;
 
 Emchar
-event_to_character (struct Lisp_Event *event,
+event_to_character (Lisp_Event *event,
                    int allow_extra_modifiers,
                    int allow_meta,
                    int allow_non_ascii)
                    int allow_extra_modifiers,
                    int allow_meta,
                    int allow_non_ascii)
@@ -1226,7 +1230,7 @@ key_sequence_to_event_chain (Lisp_Object seq)
 }
 
 void
 }
 
 void
-format_event_object (char *buf, struct Lisp_Event *event, int brief)
+format_event_object (char *buf, Lisp_Event *event, int brief)
 {
   int mouse_p = 0;
   int mod = 0;
 {
   int mouse_p = 0;
   int mod = 0;
@@ -1329,7 +1333,7 @@ format_event_object (char *buf, struct Lisp_Event *event, int brief)
        }
       else
        {
        }
       else
        {
-         struct Lisp_String *name = XSYMBOL (key)->name;
+         Lisp_String *name = XSYMBOL (key)->name;
          memcpy (buf, string_data (name), string_length (name) + 1);
          str += string_length (name);
        }
          memcpy (buf, string_data (name), string_length (name) + 1);
          str += string_length (name);
        }
@@ -1365,7 +1369,7 @@ The `next-event' field is changed by calling `set-next-event'.
 */
         (event))
 {
 */
         (event))
 {
-  struct Lisp_Event *e;
+  Lisp_Event *e;
   CHECK_LIVE_EVENT (event);
 
   return XEVENT_NEXT (event);
   CHECK_LIVE_EVENT (event);
 
   return XEVENT_NEXT (event);
@@ -2105,7 +2109,7 @@ This is in the form of a property list (alternating keyword/value pairs).
        (event))
 {
   Lisp_Object props = Qnil;
        (event))
 {
   Lisp_Object props = Qnil;
-  struct Lisp_Event *e;
+  Lisp_Event *e;
   struct gcpro gcpro1;
 
   CHECK_LIVE_EVENT (event);
   struct gcpro gcpro1;
 
   CHECK_LIVE_EVENT (event);
index 266505d..3174fe8 100644 (file)
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_EVENTS_H_
-#define _XEMACS_EVENTS_H_
+#ifndef INCLUDED_events_h_
+#define INCLUDED_events_h_
 
 #include "systime.h"
 
 
 #include "systime.h"
 
@@ -40,7 +40,8 @@ Boston, MA 02111-1307, USA.  */
    multiple heterogeneous machines, X11 and SunView, or X11 and NeXT, for
    example, then it will be necessary to construct an event_stream structure
    that can cope with the given types.  Currently, the only implemented
    multiple heterogeneous machines, X11 and SunView, or X11 and NeXT, for
    example, then it will be necessary to construct an event_stream structure
    that can cope with the given types.  Currently, the only implemented
-   event_streams are for dumb-ttys, and for X11 plus dumb-ttys.
+   event_streams are for dumb-ttys, and for X11 plus dumb-ttys,
+   and for mswindows.
 
    To implement this for one window system is relatively simple.
    To implement this for multiple window systems is trickier and may
 
    To implement this for one window system is relatively simple.
    To implement this for multiple window systems is trickier and may
@@ -275,9 +276,9 @@ Boston, MA 02111-1307, USA.  */
   The Create stream pair function is passed two void* values, which identify
   process-dependent 'handles'. The process implementation uses these handles
   to communicate with child processes. The function must be prepared to receive
   The Create stream pair function is passed two void* values, which identify
   process-dependent 'handles'. The process implementation uses these handles
   to communicate with child processes. The function must be prepared to receive
-  handle types of any process implementation. Since there only one process
+  handle types of any process implementation. Since only one process
   implementation exists in a particular XEmacs configuration, preprocessing
   implementation exists in a particular XEmacs configuration, preprocessing
-  is a mean of compiling in the support for the code which deals with particular
+  is a means of compiling in the support for the code which deals with particular
   handle types.
 
   For example, a unixoid type loop, which relies on file descriptors, may be
   handle types.
 
   For example, a unixoid type loop, which relies on file descriptors, may be
@@ -316,20 +317,17 @@ Boston, MA 02111-1307, USA.  */
 #define USID_DONTHASH ((USID)0)
 
 \f
 #define USID_DONTHASH ((USID)0)
 
 \f
-struct Lisp_Event;
-struct Lisp_Process;
-
 struct event_stream
 {
   int  (*event_pending_p)      (int);
 struct event_stream
 {
   int  (*event_pending_p)      (int);
-  void (*next_event_cb)                (struct Lisp_Event *);
-  void (*handle_magic_event_cb)        (struct Lisp_Event *);
+  void (*next_event_cb)                (Lisp_Event *);
+  void (*handle_magic_event_cb)        (Lisp_Event *);
   int  (*add_timeout_cb)       (EMACS_TIME);
   void (*remove_timeout_cb)    (int);
   void (*select_console_cb)    (struct console *);
   void (*unselect_console_cb)  (struct console *);
   int  (*add_timeout_cb)       (EMACS_TIME);
   void (*remove_timeout_cb)    (int);
   void (*select_console_cb)    (struct console *);
   void (*unselect_console_cb)  (struct console *);
-  void (*select_process_cb)    (struct Lisp_Process *);
-  void (*unselect_process_cb)  (struct Lisp_Process *);
+  void (*select_process_cb)    (Lisp_Process *);
+  void (*unselect_process_cb)  (Lisp_Process *);
   void (*quit_p_cb)            (void);
   USID (*create_stream_pair_cb) (void* /* inhandle*/, void* /*outhandle*/ ,
                                 Lisp_Object* /* instream */,
   void (*quit_p_cb)            (void);
   USID (*create_stream_pair_cb) (void* /* inhandle*/, void* /*outhandle*/ ,
                                 Lisp_Object* /* instream */,
@@ -450,9 +448,10 @@ struct Lisp_Timeout
                                   should the one after that
                                   occur? */
 };
                                   should the one after that
                                   occur? */
 };
+typedef struct Lisp_Timeout Lisp_Timeout;
 
 
-DECLARE_LRECORD (timeout, struct Lisp_Timeout);
-#define XTIMEOUT(x) XRECORD (x, timeout, struct Lisp_Timeout)
+DECLARE_LRECORD (timeout, Lisp_Timeout);
+#define XTIMEOUT(x) XRECORD (x, timeout, Lisp_Timeout)
 #define XSETTIMEOUT(x, p) XSETRECORD (x, p, timeout)
 #define TIMEOUTP(x) RECORDP (x, timeout)
 #define CHECK_TIMEOUT(x) CHECK_RECORD (x, timeout)
 #define XSETTIMEOUT(x, p) XSETRECORD (x, p, timeout)
 #define TIMEOUTP(x) RECORDP (x, timeout)
 #define CHECK_TIMEOUT(x) CHECK_RECORD (x, timeout)
@@ -485,8 +484,8 @@ struct Lisp_Event
     } event;
 };
 
     } event;
 };
 
-DECLARE_LRECORD (event, struct Lisp_Event);
-#define XEVENT(x) XRECORD (x, event, struct Lisp_Event)
+DECLARE_LRECORD (event, Lisp_Event);
+#define XEVENT(x) XRECORD (x, event, Lisp_Event)
 #define XSETEVENT(x, p) XSETRECORD (x, p, event)
 #define EVENTP(x) RECORDP (x, event)
 #define CHECK_EVENT(x) CHECK_RECORD (x, event)
 #define XSETEVENT(x, p) XSETRECORD (x, p, event)
 #define EVENTP(x) RECORDP (x, event)
 #define CHECK_EVENT(x) CHECK_RECORD (x, event)
@@ -543,12 +542,12 @@ extern Lisp_Object Qcancel_mode_internal;
 #define KEYSYM(x) (intern (x))
 
 /* from events.c */
 #define KEYSYM(x) (intern (x))
 
 /* from events.c */
-void format_event_object (char *buf, struct Lisp_Event *e, int brief);
-void character_to_event (Emchar c, struct Lisp_Event *event,
+void format_event_object (char *buf, Lisp_Event *e, int brief);
+void character_to_event (Emchar c, Lisp_Event *event,
                         struct console *con,
                         int use_console_meta_flag,
                         int do_backspace_mapping);
                         struct console *con,
                         int use_console_meta_flag,
                         int do_backspace_mapping);
-void zero_event (struct Lisp_Event *e);
+void zero_event (Lisp_Event *e);
 void deallocate_event_chain (Lisp_Object event);
 Lisp_Object event_chain_tail (Lisp_Object event);
 void enqueue_event (Lisp_Object event, Lisp_Object *head, Lisp_Object *tail);
 void deallocate_event_chain (Lisp_Object event);
 Lisp_Object event_chain_tail (Lisp_Object event);
 void enqueue_event (Lisp_Object event, Lisp_Object *head, Lisp_Object *tail);
@@ -565,17 +564,19 @@ Lisp_Object copy_event_chain (Lisp_Object event_chain);
 /* True if this is a non-internal event
    (keyboard press, menu, scrollbar, mouse button) */
 int command_event_p (Lisp_Object event);
 /* True if this is a non-internal event
    (keyboard press, menu, scrollbar, mouse button) */
 int command_event_p (Lisp_Object event);
+void define_self_inserting_symbol (Lisp_Object, Lisp_Object);
+Emchar event_to_character (Lisp_Event *, int, int, int);
 struct console *event_console_or_selected (Lisp_Object event);
 
 /* from event-stream.c */
 Lisp_Object allocate_command_builder (Lisp_Object console);
 void enqueue_magic_eval_event (void (*fun) (Lisp_Object), Lisp_Object object);
 struct console *event_console_or_selected (Lisp_Object event);
 
 /* from event-stream.c */
 Lisp_Object allocate_command_builder (Lisp_Object console);
 void enqueue_magic_eval_event (void (*fun) (Lisp_Object), Lisp_Object object);
-void event_stream_next_event (struct Lisp_Event *event);
-void event_stream_handle_magic_event (struct Lisp_Event *event);
+void event_stream_next_event (Lisp_Event *event);
+void event_stream_handle_magic_event (Lisp_Event *event);
 void event_stream_select_console   (struct console *con);
 void event_stream_unselect_console (struct console *con);
 void event_stream_select_console   (struct console *con);
 void event_stream_unselect_console (struct console *con);
-void event_stream_select_process   (struct Lisp_Process *proc);
-void event_stream_unselect_process (struct Lisp_Process *proc);
+void event_stream_select_process   (Lisp_Process *proc);
+void event_stream_unselect_process (Lisp_Process *proc);
 USID event_stream_create_stream_pair (void* inhandle, void* outhandle,
                Lisp_Object* instream, Lisp_Object* outstream, int flags);
 USID event_stream_delete_stream_pair (Lisp_Object instream, Lisp_Object outstream);
 USID event_stream_create_stream_pair (void* inhandle, void* outhandle,
                Lisp_Object* instream, Lisp_Object* outstream, int flags);
 USID event_stream_delete_stream_pair (Lisp_Object instream, Lisp_Object outstream);
@@ -638,9 +639,9 @@ extern int fake_event_occurred;
 
 int event_stream_unixoid_select_console   (struct console *con);
 int event_stream_unixoid_unselect_console (struct console *con);
 
 int event_stream_unixoid_select_console   (struct console *con);
 int event_stream_unixoid_unselect_console (struct console *con);
-int event_stream_unixoid_select_process   (struct Lisp_Process *proc);
-int event_stream_unixoid_unselect_process (struct Lisp_Process *proc);
-int read_event_from_tty_or_stream_desc (struct Lisp_Event *event,
+int event_stream_unixoid_select_process   (Lisp_Process *proc);
+int event_stream_unixoid_unselect_process (Lisp_Process *proc);
+int read_event_from_tty_or_stream_desc (Lisp_Event *event,
                                        struct console *con, int fd);
 USID event_stream_unixoid_create_stream_pair (void* inhandle, void* outhandle,
                                             Lisp_Object* instream,
                                        struct console *con, int fd);
 USID event_stream_unixoid_create_stream_pair (void* inhandle, void* outhandle,
                                             Lisp_Object* instream,
@@ -660,4 +661,4 @@ USID event_stream_unixoid_delete_stream_pair (Lisp_Object instream,
 
 #endif /* emacs */
 
 
 #endif /* emacs */
 
-#endif /* _XEMACS_EVENTS_H_ */
+#endif /* INCLUDED_events_h_ */
index bb5fa40..11cba96 100644 (file)
@@ -887,8 +887,8 @@ static Extent_List *
 allocate_extent_list (void)
 {
   Extent_List *el = xnew (Extent_List);
 allocate_extent_list (void)
 {
   Extent_List *el = xnew (Extent_List);
-  el->start = make_gap_array (sizeof(EXTENT));
-  el->end = make_gap_array (sizeof(EXTENT));
+  el->start = make_gap_array (sizeof (EXTENT));
+  el->end = make_gap_array (sizeof (EXTENT));
   el->markers = 0;
   return el;
 }
   el->markers = 0;
   return el;
 }
@@ -2922,8 +2922,9 @@ static int extent_remprop (Lisp_Object obj, Lisp_Object prop);
 static Lisp_Object extent_plist (Lisp_Object obj);
 
 static const struct lrecord_description extent_description[] = {
 static Lisp_Object extent_plist (Lisp_Object obj);
 
 static const struct lrecord_description extent_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct extent, object), 2 },
-  { XD_LISP_OBJECT, offsetof(struct extent, plist), 1 },
+  { XD_LISP_OBJECT, offsetof (struct extent, object) },
+  { XD_LISP_OBJECT, offsetof (struct extent, flags.face) },
+  { XD_LISP_OBJECT, offsetof (struct extent, plist) },
   { XD_END }
 };
 
   { XD_END }
 };
 
index 2a2ab9d..94d9152 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_EXTENTS_H_
-#define _XEMACS_EXTENTS_H_
+#ifndef INCLUDED_extents_h_
+#define INCLUDED_extents_h_
 
 DECLARE_LRECORD (extent, struct extent);
 #define XEXTENT(x) XRECORD (x, extent, struct extent)
 
 DECLARE_LRECORD (extent, struct extent);
 #define XEXTENT(x) XRECORD (x, extent, struct extent)
@@ -397,4 +397,4 @@ int compute_buffer_extent_usage (struct buffer *b,
 
 #endif /* emacs */
 
 
 #endif /* emacs */
 
-#endif /* _XEMACS_EXTENTS_H_ */
+#endif /* INCLUDED_extents_h_ */
index da9e8a5..c77f018 100644 (file)
@@ -17,8 +17,8 @@ Boston, MA 02111-1307, USA. */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _EXTW_XLIB_H_
-#define _EXTW_XLIB_H_
+#ifndef INCLUDED_extw_Xlib_h_
+#define INCLUDED_extw_Xlib_h_
 
 #define extw_shell_send 0
 #define extw_client_send 1
 
 #define extw_shell_send 0
 #define extw_client_send 1
@@ -48,4 +48,4 @@ void extw_initialize_atoms(Display *display);
 void extw_send_notify_3(Display *display, Window win, en_extw_notify type,
                        long data0, long data1, long data2);
 
 void extw_send_notify_3(Display *display, Window win, en_extw_notify type,
                        long data0, long data1, long data2);
 
-#endif /* _EXTW_XLIB_H_ */
+#endif /* INCLUDED_extw_Xlib_h_ */
index ffea0ea..594149e 100644 (file)
@@ -19,8 +19,8 @@ Boston, MA 02111-1307, USA. */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _EXTW_XT_H_
-#define _EXTW_XT_H_
+#ifndef INCLUDED_extw_Xt_h_
+#define INCLUDED_extw_Xt_h_
 
 #include "extw-Xlib.h"
 
 
 #include "extw-Xlib.h"
 
@@ -41,4 +41,4 @@ Bool extw_wait_for_response(Widget w, XEvent *event, unsigned long request_num,
                            en_extw_notify type, unsigned long timeout);
 
 
                            en_extw_notify type, unsigned long timeout);
 
 
-#endif /* _EXTW_XT_H_ */
+#endif /* INCLUDED_extw_Xt_h_ */
index 0c678f2..417f170 100644 (file)
@@ -57,9 +57,8 @@ Lisp_Object Vdefault_face, Vmodeline_face, Vgui_element_face;
 Lisp_Object Vleft_margin_face, Vright_margin_face, Vtext_cursor_face;
 Lisp_Object Vpointer_face, Vvertical_divider_face, Vtoolbar_face, Vwidget_face;
 
 Lisp_Object Vleft_margin_face, Vright_margin_face, Vtext_cursor_face;
 Lisp_Object Vpointer_face, Vvertical_divider_face, Vtoolbar_face, Vwidget_face;
 
-/* Qdefault, Qhighlight defined in general.c */
-Lisp_Object Qmodeline, Qgui_element, Qleft_margin, Qright_margin, Qtext_cursor;
-Lisp_Object Qvertical_divider;
+/* Qdefault, Qhighlight, Qleft_margin, Qright_margin defined in general.c */
+Lisp_Object Qmodeline, Qgui_element, Qtext_cursor, Qvertical_divider;
 
 /* In the old implementation Vface_list was a list of the face names,
    not the faces themselves.  We now distinguish between permanent and
 
 /* In the old implementation Vface_list was a list of the face names,
    not the faces themselves.  We now distinguish between permanent and
@@ -75,7 +74,7 @@ Lisp_Object Vbuilt_in_face_specifiers;
 static Lisp_Object
 mark_face (Lisp_Object obj)
 {
 static Lisp_Object
 mark_face (Lisp_Object obj)
 {
-  struct Lisp_Face *face =  XFACE (obj);
+  Lisp_Face *face =  XFACE (obj);
 
   mark_object (face->name);
   mark_object (face->doc_string);
 
   mark_object (face->name);
   mark_object (face->doc_string);
@@ -100,7 +99,7 @@ mark_face (Lisp_Object obj)
 static void
 print_face (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
 static void
 print_face (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
-  struct Lisp_Face *face = XFACE (obj);
+  Lisp_Face *face = XFACE (obj);
 
   if (print_readably)
     {
 
   if (print_readably)
     {
@@ -130,8 +129,8 @@ print_face (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 static int
 face_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
 static int
 face_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  struct Lisp_Face *f1 = XFACE (obj1);
-  struct Lisp_Face *f2 = XFACE (obj2);
+  Lisp_Face *f1 = XFACE (obj1);
+  Lisp_Face *f2 = XFACE (obj2);
 
   depth++;
 
 
   depth++;
 
@@ -154,7 +153,7 @@ face_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 static unsigned long
 face_hash (Lisp_Object obj, int depth)
 {
 static unsigned long
 face_hash (Lisp_Object obj, int depth)
 {
-  struct Lisp_Face *f = XFACE (obj);
+  Lisp_Face *f = XFACE (obj);
 
   depth++;
 
 
   depth++;
 
@@ -168,7 +167,7 @@ face_hash (Lisp_Object obj, int depth)
 static Lisp_Object
 face_getprop (Lisp_Object obj, Lisp_Object prop)
 {
 static Lisp_Object
 face_getprop (Lisp_Object obj, Lisp_Object prop)
 {
-  struct Lisp_Face *f = XFACE (obj);
+  Lisp_Face *f = XFACE (obj);
 
   return
     (EQ (prop, Qforeground)       ? f->foreground        :
 
   return
     (EQ (prop, Qforeground)       ? f->foreground        :
@@ -189,7 +188,7 @@ face_getprop (Lisp_Object obj, Lisp_Object prop)
 static int
 face_putprop (Lisp_Object obj, Lisp_Object prop, Lisp_Object value)
 {
 static int
 face_putprop (Lisp_Object obj, Lisp_Object prop, Lisp_Object value)
 {
-  struct Lisp_Face *f = XFACE (obj);
+  Lisp_Face *f = XFACE (obj);
 
   if (EQ (prop, Qforeground)        ||
       EQ (prop, Qbackground)        ||
 
   if (EQ (prop, Qforeground)        ||
       EQ (prop, Qbackground)        ||
@@ -219,7 +218,7 @@ face_putprop (Lisp_Object obj, Lisp_Object prop, Lisp_Object value)
 static int
 face_remprop (Lisp_Object obj, Lisp_Object prop)
 {
 static int
 face_remprop (Lisp_Object obj, Lisp_Object prop)
 {
-  struct Lisp_Face *f = XFACE (obj);
+  Lisp_Face *f = XFACE (obj);
 
   if (EQ (prop, Qforeground)        ||
       EQ (prop, Qbackground)        ||
 
   if (EQ (prop, Qforeground)        ||
       EQ (prop, Qbackground)        ||
@@ -246,7 +245,7 @@ face_remprop (Lisp_Object obj, Lisp_Object prop)
 static Lisp_Object
 face_plist (Lisp_Object obj)
 {
 static Lisp_Object
 face_plist (Lisp_Object obj)
 {
-  struct Lisp_Face *face = XFACE (obj);
+  Lisp_Face *face = XFACE (obj);
   Lisp_Object result = face->plist;
 
   result = cons3 (Qreverse,          face->reverse,           result);
   Lisp_Object result = face->plist;
 
   result = cons3 (Qreverse,          face->reverse,           result);
@@ -265,8 +264,21 @@ face_plist (Lisp_Object obj)
 }
 
 static const struct lrecord_description face_description[] = {
 }
 
 static const struct lrecord_description face_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Face, name),       2 },
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Face, foreground), 13 },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, name) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, doc_string) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, foreground) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, background) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, font) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, display_table) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, background_pixmap) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, underline) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, strikethru) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, highlight) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, dim) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, blinking) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, reverse) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, plist) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Face, charsets_warned_about) },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -274,7 +286,7 @@ DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("face", face,
                                          mark_face, print_face, 0, face_equal,
                                          face_hash, face_description, face_getprop,
                                          face_putprop, face_remprop,
                                          mark_face, print_face, 0, face_equal,
                                          face_hash, face_description, face_getprop,
                                          face_putprop, face_remprop,
-                                         face_plist, struct Lisp_Face);
+                                         face_plist, Lisp_Face);
 \f
 /************************************************************************/
 /*                             face read syntax                         */
 \f
 /************************************************************************/
 /*                             face read syntax                         */
@@ -340,7 +352,7 @@ face_instantiate (Lisp_Object data)
  ****************************************************************************/
 
 static void
  ****************************************************************************/
 
 static void
-reset_face (struct Lisp_Face *f)
+reset_face (Lisp_Face *f)
 {
   f->name = Qnil;
   f->doc_string = Qnil;
 {
   f->name = Qnil;
   f->doc_string = Qnil;
@@ -360,11 +372,10 @@ reset_face (struct Lisp_Face *f)
   f->charsets_warned_about = Qnil;
 }
 
   f->charsets_warned_about = Qnil;
 }
 
-static struct Lisp_Face *
+static Lisp_Face *
 allocate_face (void)
 {
 allocate_face (void)
 {
-  struct Lisp_Face *result =
-    alloc_lcrecord_type (struct Lisp_Face, &lrecord_face);
+  Lisp_Face *result = alloc_lcrecord_type (Lisp_Face, &lrecord_face);
 
   reset_face (result);
   return result;
 
   reset_face (result);
   return result;
@@ -759,7 +770,7 @@ If TEMPORARY is non-nil, this face will cease to exist if not in use.
        (name, doc_string, temporary))
 {
   /* This function can GC if initialized is non-zero */
        (name, doc_string, temporary))
 {
   /* This function can GC if initialized is non-zero */
-  struct Lisp_Face *f;
+  Lisp_Face *f;
   Lisp_Object face;
 
   CHECK_SYMBOL (name);
   Lisp_Object face;
 
   CHECK_SYMBOL (name);
@@ -1127,7 +1138,7 @@ face_cachel_charset_font_metric_info (struct face_cachel *cachel,
        {
          Lisp_Object charset = CHARSET_BY_LEADING_BYTE (i + MIN_LEADING_BYTE);
          Lisp_Object font_instance = FACE_CACHEL_FONT (cachel, charset);
        {
          Lisp_Object charset = CHARSET_BY_LEADING_BYTE (i + MIN_LEADING_BYTE);
          Lisp_Object font_instance = FACE_CACHEL_FONT (cachel, charset);
-         struct Lisp_Font_Instance *fi = XFONT_INSTANCE (font_instance);
+         Lisp_Font_Instance *fi = XFONT_INSTANCE (font_instance);
 
          assert (CHARSETP (charset));
          assert (FONT_INSTANCEP (font_instance));
 
          assert (CHARSETP (charset));
          assert (FONT_INSTANCEP (font_instance));
@@ -1679,7 +1690,7 @@ LOCALE, TAG-SET, EXACT-P, and HOW-TO-ADD are as in `copy-specifier'.
 */
        (old_face, new_name, locale, tag_set, exact_p, how_to_add))
 {
 */
        (old_face, new_name, locale, tag_set, exact_p, how_to_add))
 {
-  struct Lisp_Face *fold, *fnew;
+  Lisp_Face *fold, *fnew;
   Lisp_Object new_face = Qnil;
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
 
   Lisp_Object new_face = Qnil;
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
 
@@ -1741,11 +1752,9 @@ LOCALE, TAG-SET, EXACT-P, and HOW-TO-ADD are as in `copy-specifier'.
 void
 syms_of_faces (void)
 {
 void
 syms_of_faces (void)
 {
-  /* Qdefault & Qwidget defined in general.c */
+  /* Qdefault, Qwidget, Qleft_margin, Qright_margin defined in general.c */
   defsymbol (&Qmodeline, "modeline");
   defsymbol (&Qgui_element, "gui-element");
   defsymbol (&Qmodeline, "modeline");
   defsymbol (&Qgui_element, "gui-element");
-  defsymbol (&Qleft_margin, "left-margin");
-  defsymbol (&Qright_margin, "right-margin");
   defsymbol (&Qtext_cursor, "text-cursor");
   defsymbol (&Qvertical_divider, "vertical-divider");
 
   defsymbol (&Qtext_cursor, "text-cursor");
   defsymbol (&Qvertical_divider, "vertical-divider");
 
@@ -1867,6 +1876,8 @@ complex_vars_of_faces (void)
     bg_fb = acons (list1 (Qtty), Fvector (0, 0), bg_fb);
 #endif
 #ifdef HAVE_MS_WINDOWS
     bg_fb = acons (list1 (Qtty), Fvector (0, 0), bg_fb);
 #endif
 #ifdef HAVE_MS_WINDOWS
+    fg_fb = acons (list1 (Qmsprinter), build_string ("black"), fg_fb);
+    bg_fb = acons (list1 (Qmsprinter), build_string ("white"), bg_fb);
     fg_fb = acons (list1 (Qmswindows), build_string ("black"), fg_fb);
     bg_fb = acons (list1 (Qmswindows), build_string ("white"), bg_fb);
 #endif
     fg_fb = acons (list1 (Qmswindows), build_string ("black"), fg_fb);
     bg_fb = acons (list1 (Qmswindows), build_string ("white"), bg_fb);
 #endif
@@ -1913,6 +1924,12 @@ complex_vars_of_faces (void)
                       inst_list);
 #endif /* HAVE_TTY */
 #ifdef HAVE_MS_WINDOWS
                       inst_list);
 #endif /* HAVE_TTY */
 #ifdef HAVE_MS_WINDOWS
+    /* Fixedsys does not exist for printers */
+    inst_list = Fcons (Fcons (list1 (Qmsprinter),
+                      build_string ("Courier:Regular:10::Western")), inst_list);
+    inst_list = Fcons (Fcons (list1 (Qmsprinter),
+                      build_string ("Courier New:Regular:10::Western")), inst_list);
+
     inst_list = Fcons (Fcons (list1 (Qmswindows),
                       build_string ("Fixedsys:Regular:9::Western")), inst_list);
     inst_list = Fcons (Fcons (list1 (Qmswindows),
     inst_list = Fcons (Fcons (list1 (Qmswindows),
                       build_string ("Fixedsys:Regular:9::Western")), inst_list);
     inst_list = Fcons (Fcons (list1 (Qmswindows),
@@ -1956,6 +1973,8 @@ complex_vars_of_faces (void)
     bg_fb = acons (list1 (Qtty), Fvector (0, 0), bg_fb);
 #endif
 #ifdef HAVE_MS_WINDOWS
     bg_fb = acons (list1 (Qtty), Fvector (0, 0), bg_fb);
 #endif
 #ifdef HAVE_MS_WINDOWS
+    fg_fb = acons (list1 (Qmsprinter), build_string ("black"), fg_fb);
+    bg_fb = acons (list1 (Qmsprinter), build_string ("white"), bg_fb);
     fg_fb = acons (list1 (Qmswindows), build_string ("black"), fg_fb);
     bg_fb = acons (list1 (Qmswindows), build_string ("Gray75"), bg_fb);
 #endif
     fg_fb = acons (list1 (Qmswindows), build_string ("black"), fg_fb);
     bg_fb = acons (list1 (Qmswindows), build_string ("Gray75"), bg_fb);
 #endif
index 2814f49..fa4a85a 100644 (file)
@@ -21,14 +21,14 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_FACES_H_
-#define _XEMACS_FACES_H_
+#ifndef INCLUDED_faces_h_
+#define INCLUDED_faces_h_
 
 #include "buffer.h" /* for NUM_LEADING_BYTES */
 
 
 #include "buffer.h" /* for NUM_LEADING_BYTES */
 
-/* a struct Lisp_Face is the C object corresponding to a face.  There
-   is one of these per face.  It basically contains all of the specifiers
-   for the built-in face properties, plus the plist of user-specified
+/* a Lisp_Face is the C object corresponding to a face.  There is one
+   of these per face.  It basically contains all of the specifiers for
+   the built-in face properties, plus the plist of user-specified
    properties. */
 
 struct Lisp_Face
    properties. */
 
 struct Lisp_Face
@@ -222,8 +222,8 @@ struct face_cachel
   unsigned char font_updated[NUM_LEADING_BYTES];
 };
 
   unsigned char font_updated[NUM_LEADING_BYTES];
 };
 
-DECLARE_LRECORD (face, struct Lisp_Face);
-#define XFACE(x) XRECORD (x, face, struct Lisp_Face)
+DECLARE_LRECORD (face, Lisp_Face);
+#define XFACE(x) XRECORD (x, face, Lisp_Face)
 #define XSETFACE(x, p) XSETRECORD (x, p, face)
 #define FACEP(x) RECORDP (x, face)
 #define CHECK_FACE(x) CHECK_RECORD (x, face)
 #define XSETFACE(x, p) XSETRECORD (x, p, face)
 #define FACEP(x) RECORDP (x, face)
 #define CHECK_FACE(x) CHECK_RECORD (x, face)
@@ -358,6 +358,8 @@ Lisp_Object face_property_matching_instance (Lisp_Object face,
   FACE_PROPERTY_INSTANCE (face, Qbackground_pixmap, domain, 0, Qzero)
 #define FACE_UNDERLINE_P(face, domain)                                 \
   (!NILP (FACE_PROPERTY_INSTANCE (face, Qunderline, domain, 0, Qzero)))
   FACE_PROPERTY_INSTANCE (face, Qbackground_pixmap, domain, 0, Qzero)
 #define FACE_UNDERLINE_P(face, domain)                                 \
   (!NILP (FACE_PROPERTY_INSTANCE (face, Qunderline, domain, 0, Qzero)))
+#define FACE_STRIKETHRU_P(face, domain)                                        \
+  (!NILP (FACE_PROPERTY_INSTANCE (face, Qstrikethru, domain, 0, Qzero)))
 #define FACE_HIGHLIGHT_P(face, domain)                                 \
   (!NILP (FACE_PROPERTY_INSTANCE (face, Qhighlight, domain, 0, Qzero)))
 #define FACE_DIM_P(face, domain)                                       \
 #define FACE_HIGHLIGHT_P(face, domain)                                 \
   (!NILP (FACE_PROPERTY_INSTANCE (face, Qhighlight, domain, 0, Qzero)))
 #define FACE_DIM_P(face, domain)                                       \
@@ -367,4 +369,4 @@ Lisp_Object face_property_matching_instance (Lisp_Object face,
 #define FACE_REVERSE_P(face, domain)                                   \
   (!NILP (FACE_PROPERTY_INSTANCE (face, Qreverse, domain, 0, Qzero)))
 
 #define FACE_REVERSE_P(face, domain)                                   \
   (!NILP (FACE_PROPERTY_INSTANCE (face, Qreverse, domain, 0, Qzero)))
 
-#endif /* _XEMACS_FACES_H_ */
+#endif /* INCLUDED_faces_h_ */
index 921d48f..78afa01 100644 (file)
@@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA.  */
 #include "elhash.h"
 #include "insdel.h"
 #include "lstream.h"
 #include "elhash.h"
 #include "insdel.h"
 #include "lstream.h"
+#include "opaque.h"
 #ifdef MULE
 #include "mule-ccl.h"
 #include "chartab.h"
 #ifdef MULE
 #include "mule-ccl.h"
 #include "chartab.h"
@@ -57,17 +58,21 @@ struct file_coding_dump {
      This describes a permutation of the possible coding categories. */
   int coding_category_by_priority[CODING_CATEGORY_LAST + 1];
 
      This describes a permutation of the possible coding categories. */
   int coding_category_by_priority[CODING_CATEGORY_LAST + 1];
 
+#ifdef MULE
   Lisp_Object ucs_to_mule_table[65536];
   Lisp_Object ucs_to_mule_table[65536];
+#endif
 } *fcd;
 
 static const struct lrecord_description fcd_description_1[] = {
 } *fcd;
 
 static const struct lrecord_description fcd_description_1[] = {
-  { XD_LISP_OBJECT, offsetof(struct file_coding_dump, coding_category_system), CODING_CATEGORY_LAST + 1 },
-  { XD_LISP_OBJECT, offsetof(struct file_coding_dump, ucs_to_mule_table),      65536 },
+  { XD_LISP_OBJECT_ARRAY, offsetof (struct file_coding_dump, coding_category_system), CODING_CATEGORY_LAST + 1 },
+#ifdef MULE
+  { XD_LISP_OBJECT_ARRAY, offsetof (struct file_coding_dump, ucs_to_mule_table), 65536 },
+#endif
   { XD_END }
 };
 
 static const struct struct_description fcd_description = {
   { XD_END }
 };
 
 static const struct struct_description fcd_description = {
-  sizeof(struct file_coding_dump),
+  sizeof (struct file_coding_dump),
   fcd_description_1
 };
 
   fcd_description_1
 };
 
@@ -92,7 +97,7 @@ Lisp_Object Qforce_g0_on_output, Qforce_g1_on_output;
 Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output;
 Lisp_Object Qno_iso6429;
 Lisp_Object Qinput_charset_conversion, Qoutput_charset_conversion;
 Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output;
 Lisp_Object Qno_iso6429;
 Lisp_Object Qinput_charset_conversion, Qoutput_charset_conversion;
-Lisp_Object Qctext, Qescape_quoted;
+Lisp_Object Qescape_quoted;
 Lisp_Object Qshort, Qno_ascii_eol, Qno_ascii_cntl, Qseven, Qlock_shift;
 #endif
 Lisp_Object Qencode, Qdecode;
 Lisp_Object Qshort, Qno_ascii_eol, Qno_ascii_cntl, Qseven, Qlock_shift;
 #endif
 Lisp_Object Qencode, Qdecode;
@@ -247,22 +252,22 @@ typedef struct
 } codesys_prop_dynarr;
 
 static const struct lrecord_description codesys_prop_description_1[] = {
 } codesys_prop_dynarr;
 
 static const struct lrecord_description codesys_prop_description_1[] = {
-  { XD_LISP_OBJECT, offsetof(codesys_prop, sym), 1 },
+  { XD_LISP_OBJECT, offsetof (codesys_prop, sym) },
   { XD_END }
 };
 
 static const struct struct_description codesys_prop_description = {
   { XD_END }
 };
 
 static const struct struct_description codesys_prop_description = {
-  sizeof(codesys_prop),
+  sizeof (codesys_prop),
   codesys_prop_description_1
 };
 
 static const struct lrecord_description codesys_prop_dynarr_description_1[] = {
   codesys_prop_description_1
 };
 
 static const struct lrecord_description codesys_prop_dynarr_description_1[] = {
-  XD_DYNARR_DESC(codesys_prop_dynarr, &codesys_prop_description),
+  XD_DYNARR_DESC (codesys_prop_dynarr, &codesys_prop_description),
   { XD_END }
 };
 
 static const struct struct_description codesys_prop_dynarr_description = {
   { XD_END }
 };
 
 static const struct struct_description codesys_prop_dynarr_description = {
-  sizeof(codesys_prop_dynarr),
+  sizeof (codesys_prop_dynarr),
   codesys_prop_dynarr_description_1
 };
 
   codesys_prop_dynarr_description_1
 };
 
@@ -286,35 +291,42 @@ static void finalize_coding_system (void *header, int for_disksave);
 
 #ifdef MULE
 static const struct lrecord_description ccs_description_1[] = {
 
 #ifdef MULE
 static const struct lrecord_description ccs_description_1[] = {
-  { XD_LISP_OBJECT, offsetof(charset_conversion_spec, from_charset), 2 },
+  { XD_LISP_OBJECT, offsetof (charset_conversion_spec, from_charset) },
+  { XD_LISP_OBJECT, offsetof (charset_conversion_spec, to_charset) },
   { XD_END }
 };
 
 static const struct struct_description ccs_description = {
   { XD_END }
 };
 
 static const struct struct_description ccs_description = {
-  sizeof(charset_conversion_spec),
+  sizeof (charset_conversion_spec),
   ccs_description_1
 };
 
 static const struct lrecord_description ccsd_description_1[] = {
   ccs_description_1
 };
 
 static const struct lrecord_description ccsd_description_1[] = {
-  XD_DYNARR_DESC(charset_conversion_spec_dynarr, &ccs_description),
+  XD_DYNARR_DESC (charset_conversion_spec_dynarr, &ccs_description),
   { XD_END }
 };
 
 static const struct struct_description ccsd_description = {
   { XD_END }
 };
 
 static const struct struct_description ccsd_description = {
-  sizeof(charset_conversion_spec_dynarr),
+  sizeof (charset_conversion_spec_dynarr),
   ccsd_description_1
 };
 #endif
 
 static const struct lrecord_description coding_system_description[] = {
   ccsd_description_1
 };
 #endif
 
 static const struct lrecord_description coding_system_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, name), 2 },
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, mnemonic), 3 },
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, eol_lf), 3 },
+  { XD_LISP_OBJECT, offsetof (Lisp_Coding_System, name) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Coding_System, doc_string) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Coding_System, mnemonic) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Coding_System, post_read_conversion) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Coding_System, pre_write_conversion) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Coding_System, eol_lf) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Coding_System, eol_crlf) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Coding_System, eol_cr) },
 #ifdef MULE
 #ifdef MULE
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, iso2022.initial_charset), 4 },
-  { XD_STRUCT_PTR,  offsetof(struct Lisp_Coding_System, iso2022.input_conv),  1, &ccsd_description },
-  { XD_STRUCT_PTR,  offsetof(struct Lisp_Coding_System, iso2022.output_conv), 1, &ccsd_description },
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, ccl.decode), 2 },
+  { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Coding_System, iso2022.initial_charset), 4 },
+  { XD_STRUCT_PTR,  offsetof (Lisp_Coding_System, iso2022.input_conv),  1, &ccsd_description },
+  { XD_STRUCT_PTR,  offsetof (Lisp_Coding_System, iso2022.output_conv), 1, &ccsd_description },
+  { XD_LISP_OBJECT, offsetof (Lisp_Coding_System, ccl.decode) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Coding_System, ccl.encode) },
 #endif
   { XD_END }
 };
 #endif
   { XD_END }
 };
@@ -323,7 +335,7 @@ DEFINE_LRECORD_IMPLEMENTATION ("coding-system", coding_system,
                               mark_coding_system, print_coding_system,
                               finalize_coding_system,
                               0, 0, coding_system_description,
                               mark_coding_system, print_coding_system,
                               finalize_coding_system,
                               0, 0, coding_system_description,
-                              struct Lisp_Coding_System);
+                              Lisp_Coding_System);
 
 static Lisp_Object
 mark_coding_system (Lisp_Object obj)
 
 static Lisp_Object
 mark_coding_system (Lisp_Object obj)
@@ -529,15 +541,21 @@ associated coding system object is returned.
 */
        (coding_system_or_name))
 {
 */
        (coding_system_or_name))
 {
-  if (CODING_SYSTEMP (coding_system_or_name))
-    return coding_system_or_name;
-
   if (NILP (coding_system_or_name))
     coding_system_or_name = Qbinary;
   if (NILP (coding_system_or_name))
     coding_system_or_name = Qbinary;
+  else if (CODING_SYSTEMP (coding_system_or_name))
+    return coding_system_or_name;
   else
     CHECK_SYMBOL (coding_system_or_name);
 
   else
     CHECK_SYMBOL (coding_system_or_name);
 
-  return Fgethash (coding_system_or_name, Vcoding_system_hash_table, Qnil);
+  while (1)
+    {
+      coding_system_or_name =
+       Fgethash (coding_system_or_name, Vcoding_system_hash_table, Qnil);
+
+      if (CODING_SYSTEMP (coding_system_or_name) || NILP (coding_system_or_name))
+       return coding_system_or_name;
+    }
 }
 
 DEFUN ("get-coding-system", Fget_coding_system, 1, 1, 0, /*
 }
 
 DEFUN ("get-coding-system", Fget_coding_system, 1, 1, 0, /*
@@ -1024,34 +1042,160 @@ be created.
   return new_coding_system;
 }
 
   return new_coding_system;
 }
 
+DEFUN ("coding-system-canonical-name-p", Fcoding_system_canonical_name_p, 1, 1, 0, /*
+Return t if OBJECT names a coding system, and is not a coding system alias.
+*/
+       (object))
+{
+  return CODING_SYSTEMP (Fgethash (object, Vcoding_system_hash_table, Qnil))
+    ? Qt : Qnil;
+}
+
+DEFUN ("coding-system-alias-p", Fcoding_system_alias_p, 1, 1, 0, /*
+Return t if OBJECT is a coding system alias.
+All coding system aliases are created by `define-coding-system-alias'.
+*/
+       (object))
+{
+  return SYMBOLP (Fgethash (object, Vcoding_system_hash_table, Qzero))
+    ? Qt : Qnil;
+}
+
+DEFUN ("coding-system-aliasee", Fcoding_system_aliasee, 1, 1, 0, /*
+Return the coding-system symbol for which symbol ALIAS is an alias.
+*/
+       (alias))
+{
+  Lisp_Object aliasee = Fgethash (alias, Vcoding_system_hash_table, Qnil);
+  if (SYMBOLP (aliasee))
+    return aliasee;
+  else
+    signal_simple_error ("Symbol is not a coding system alias", alias);
+}
+
+static Lisp_Object
+append_suffix_to_symbol (Lisp_Object symbol, const char *ascii_string)
+{
+  return Fintern (concat2 (Fsymbol_name (symbol), build_string (ascii_string)),
+                 Qnil);
+}
+
+/* A maphash function, for removing dangling coding system aliases. */
+static int
+dangling_coding_system_alias_p (Lisp_Object alias,
+                               Lisp_Object aliasee,
+                               void *dangling_aliases)
+{
+  if (SYMBOLP (aliasee)
+      && NILP (Fgethash (aliasee, Vcoding_system_hash_table, Qnil)))
+    {
+      (*(int *) dangling_aliases)++;
+      return 1;
+    }
+  else
+    return 0;
+}
+
 DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, 2, 2, 0, /*
 DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, 2, 2, 0, /*
-Define symbol ALIAS as an alias for coding system CODING-SYSTEM.
+Define symbol ALIAS as an alias for coding system ALIASEE.
+
+You can use this function to redefine an alias that has already been defined,
+but you cannot redefine a name which is the canonical name for a coding system.
+\(a canonical name of a coding system is what is returned when you call
+`coding-system-name' on a coding system).
+
+ALIASEE itself can be an alias, which allows you to define nested aliases.
+
+You are forbidden, however, from creating alias loops or `dangling' aliases.
+These will be detected, and an error will be signaled if you attempt to do so.
+
+If ALIASEE is nil, then ALIAS will simply be undefined.
+
+See also `coding-system-alias-p', `coding-system-aliasee',
+and `coding-system-canonical-name-p'.
 */
 */
-       (alias, coding_system))
+       (alias, aliasee))
 {
 {
+  Lisp_Object real_coding_system, probe;
+
   CHECK_SYMBOL (alias);
   CHECK_SYMBOL (alias);
-  if (!NILP (Ffind_coding_system (alias)))
-    signal_simple_error ("Symbol already names a coding system", alias);
-  coding_system = Fget_coding_system (coding_system);
-  Fputhash (alias, coding_system, Vcoding_system_hash_table);
 
 
-  /* Set up aliases for subsidiaries. */
-  if (XCODING_SYSTEM_EOL_TYPE (coding_system) == EOL_AUTODETECT)
+  if (!NILP (Fcoding_system_canonical_name_p (alias)))
+    signal_simple_error
+      ("Symbol is the canonical name of a coding system and cannot be redefined",
+       alias);
+
+  if (NILP (aliasee))
+    {
+      Lisp_Object subsidiary_unix = append_suffix_to_symbol (alias, "-unix");
+      Lisp_Object subsidiary_dos  = append_suffix_to_symbol (alias, "-dos");
+      Lisp_Object subsidiary_mac  = append_suffix_to_symbol (alias, "-mac");
+
+      Fremhash (alias, Vcoding_system_hash_table);
+
+      /* Undefine subsidiary aliases,
+        presumably created by a previous call to this function */
+      if (! NILP (Fcoding_system_alias_p (subsidiary_unix)) &&
+         ! NILP (Fcoding_system_alias_p (subsidiary_dos))  &&
+         ! NILP (Fcoding_system_alias_p (subsidiary_mac)))
+       {
+         Fdefine_coding_system_alias (subsidiary_unix, Qnil);
+         Fdefine_coding_system_alias (subsidiary_dos,  Qnil);
+         Fdefine_coding_system_alias (subsidiary_mac,  Qnil);
+       }
+
+      /* Undefine dangling coding system aliases. */
+      {
+       int dangling_aliases;
+
+       do {
+         dangling_aliases = 0;
+         elisp_map_remhash (dangling_coding_system_alias_p,
+                            Vcoding_system_hash_table,
+                            &dangling_aliases);
+       } while (dangling_aliases > 0);
+      }
+
+      return Qnil;
+    }
+
+  if (CODING_SYSTEMP (aliasee))
+    aliasee = XCODING_SYSTEM_NAME (aliasee);
+
+  /* Checks that aliasee names a coding-system */
+  real_coding_system = Fget_coding_system (aliasee);
+
+  /* Check for coding system alias loops */
+  if (EQ (alias, aliasee))
+    alias_loop: signal_simple_error_2
+      ("Attempt to create a coding system alias loop", alias, aliasee);
+
+  for (probe = aliasee;
+       SYMBOLP (probe);
+       probe = Fgethash (probe, Vcoding_system_hash_table, Qzero))
     {
     {
-      Lisp_Object str;
-      XSETSTRING (str, symbol_name (XSYMBOL (alias)));
-#define FROB(type, name)                                                       \
-      do {                                                                     \
-       Lisp_Object subsidiary = XCODING_SYSTEM_EOL_##type (coding_system);     \
-       if (!NILP (subsidiary))                                                 \
-         Fdefine_coding_system_alias                                           \
-           (Fintern (concat2 (str, build_string (name)), Qnil), subsidiary);   \
-      } while (0)
-      FROB (LF,   "-unix");
-      FROB (CRLF, "-dos");
-      FROB (CR,   "-mac");
-#undef FROB
+      if (EQ (probe, alias))
+       goto alias_loop;
     }
     }
+
+  Fputhash (alias, aliasee, Vcoding_system_hash_table);
+
+  /* Set up aliases for subsidiaries.
+     #### There must be a better way to handle subsidiary coding systems. */
+  {
+    static const char *suffixes[] = { "-unix", "-dos", "-mac" };
+    int i;
+    for (i = 0; i < countof (suffixes); i++)
+      {
+       Lisp_Object alias_subsidiary =
+         append_suffix_to_symbol (alias, suffixes[i]);
+       Lisp_Object aliasee_subsidiary =
+         append_suffix_to_symbol (aliasee, suffixes[i]);
+
+       if (! NILP (Ffind_coding_system (aliasee_subsidiary)))
+         Fdefine_coding_system_alias (alias_subsidiary, aliasee_subsidiary);
+      }
+  }
   /* FSF return value is a vector of [ALIAS-unix ALIAS-dos ALIAS-mac],
      but it doesn't look intentional, so I'd rather return something
      meaningful or nothing at all. */
   /* FSF return value is a vector of [ALIAS-unix ALIAS-dos ALIAS-mac],
      but it doesn't look intentional, so I'd rather return something
      meaningful or nothing at all. */
@@ -5405,163 +5549,7 @@ encode_coding_no_conversion (Lstream *encoding, CONST unsigned char *src,
 }
 
 \f
 }
 
 \f
-/************************************************************************/
-/*                   Simple internal/external functions                 */
-/************************************************************************/
-
-static Extbyte_dynarr *conversion_out_dynarr;
-static Bufbyte_dynarr *conversion_in_dynarr;
-
-/* Determine coding system from coding format */
-
-/* #### not correct for all values of `fmt'! */
-static Lisp_Object
-external_data_format_to_coding_system (enum external_data_format fmt)
-{
-  switch (fmt)
-    {
-    case FORMAT_FILENAME:
-    case FORMAT_TERMINAL:
-      if (EQ (Vfile_name_coding_system, Qnil) ||
-         EQ (Vfile_name_coding_system, Qbinary))
-       return Qnil;
-      else
-       return Fget_coding_system (Vfile_name_coding_system);
-#ifdef MULE
-    case FORMAT_CTEXT:
-      return Fget_coding_system (Qctext);
-#endif
-    default:
-      return Qnil;
-    }
-}
-
-Extbyte *
-convert_to_external_format (CONST Bufbyte *ptr,
-                           Bytecount len,
-                           Extcount *len_out,
-                           enum external_data_format fmt)
-{
-  Lisp_Object coding_system = external_data_format_to_coding_system (fmt);
-
-  if (!conversion_out_dynarr)
-    conversion_out_dynarr = Dynarr_new (Extbyte);
-  else
-    Dynarr_reset (conversion_out_dynarr);
-
-  if (NILP (coding_system))
-    {
-      CONST Bufbyte *end = ptr + len;
-
-      for (; ptr < end;)
-        {
-          Bufbyte c =
-            (BYTE_ASCII_P (*ptr))                 ? *ptr :
-            (*ptr == LEADING_BYTE_CONTROL_1)      ? (*(ptr+1) - 0x20) :
-            (*ptr == LEADING_BYTE_LATIN_ISO8859_1) ? (*(ptr+1)) :
-            '~';
-
-          Dynarr_add (conversion_out_dynarr, (Extbyte) c);
-          INC_CHARPTR (ptr);
-        }
-
-#ifdef ERROR_CHECK_BUFPOS
-      assert (ptr == end);
-#endif
-    }
-  else
-    {
-      Lisp_Object instream, outstream, da_outstream;
-      Lstream *istr, *ostr;
-      struct gcpro gcpro1, gcpro2, gcpro3;
-      char tempbuf[1024]; /* some random amount */
-
-      instream = make_fixed_buffer_input_stream ((unsigned char *) ptr, len);
-      da_outstream = make_dynarr_output_stream
-        ((unsigned_char_dynarr *) conversion_out_dynarr);
-      outstream =
-        make_encoding_output_stream (XLSTREAM (da_outstream), coding_system);
-      istr = XLSTREAM (instream);
-      ostr = XLSTREAM (outstream);
-      GCPRO3 (instream, outstream, da_outstream);
-      while (1)
-        {
-          ssize_t size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf));
-          if (!size_in_bytes)
-            break;
-          Lstream_write (ostr, tempbuf, size_in_bytes);
-        }
-      Lstream_close (istr);
-      Lstream_close (ostr);
-      UNGCPRO;
-      Lstream_delete (istr);
-      Lstream_delete (ostr);
-      Lstream_delete (XLSTREAM (da_outstream));
-    }
-
-  *len_out = Dynarr_length (conversion_out_dynarr);
-  Dynarr_add (conversion_out_dynarr, 0); /* remember to zero-terminate! */
-  return Dynarr_atp (conversion_out_dynarr, 0);
-}
-
-Bufbyte *
-convert_from_external_format (CONST Extbyte *ptr,
-                             Extcount len,
-                             Bytecount *len_out,
-                             enum external_data_format fmt)
-{
-  Lisp_Object coding_system = external_data_format_to_coding_system (fmt);
-
-  if (!conversion_in_dynarr)
-    conversion_in_dynarr = Dynarr_new (Bufbyte);
-  else
-    Dynarr_reset (conversion_in_dynarr);
-
-  if (NILP (coding_system))
-    {
-      CONST Extbyte *end = ptr + len;
-      for (; ptr < end; ptr++)
-        {
-          Extbyte c = *ptr;
-          DECODE_ADD_BINARY_CHAR (c, conversion_in_dynarr);
-        }
-    }
-  else
-    {
-      Lisp_Object instream, outstream, da_outstream;
-      Lstream *istr, *ostr;
-      struct gcpro gcpro1, gcpro2, gcpro3;
-      char tempbuf[1024]; /* some random amount */
-
-      instream = make_fixed_buffer_input_stream ((unsigned char *) ptr, len);
-      da_outstream = make_dynarr_output_stream
-        ((unsigned_char_dynarr *) conversion_in_dynarr);
-      outstream =
-        make_decoding_output_stream (XLSTREAM (da_outstream), coding_system);
-      istr = XLSTREAM (instream);
-      ostr = XLSTREAM (outstream);
-      GCPRO3 (instream, outstream, da_outstream);
-      while (1)
-        {
-          ssize_t size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf));
-          if (!size_in_bytes)
-            break;
-          Lstream_write (ostr, tempbuf, size_in_bytes);
-        }
-      Lstream_close (istr);
-      Lstream_close (ostr);
-      UNGCPRO;
-      Lstream_delete (istr);
-      Lstream_delete (ostr);
-      Lstream_delete (XLSTREAM (da_outstream));
-    }
 
 
-  *len_out = Dynarr_length (conversion_in_dynarr);
-  Dynarr_add (conversion_in_dynarr, 0); /* remember to zero-terminate! */
-  return Dynarr_atp (conversion_in_dynarr, 0);
-}
-
-\f
 /************************************************************************/
 /*                             Initialization                           */
 /************************************************************************/
 /************************************************************************/
 /*                             Initialization                           */
 /************************************************************************/
@@ -5579,6 +5567,9 @@ syms_of_file_coding (void)
   DEFSUBR (Fcoding_system_name);
   DEFSUBR (Fmake_coding_system);
   DEFSUBR (Fcopy_coding_system);
   DEFSUBR (Fcoding_system_name);
   DEFSUBR (Fmake_coding_system);
   DEFSUBR (Fcopy_coding_system);
+  DEFSUBR (Fcoding_system_canonical_name_p);
+  DEFSUBR (Fcoding_system_alias_p);
+  DEFSUBR (Fcoding_system_aliasee);
   DEFSUBR (Fdefine_coding_system_alias);
   DEFSUBR (Fsubsidiary_coding_system);
 
   DEFSUBR (Fdefine_coding_system_alias);
   DEFSUBR (Fsubsidiary_coding_system);
 
@@ -5654,7 +5645,6 @@ syms_of_file_coding (void)
   defsymbol (&Qdecode, "decode");
 
 #ifdef MULE
   defsymbol (&Qdecode, "decode");
 
 #ifdef MULE
-  defsymbol (&Qctext, "ctext");
   defsymbol (&coding_category_symbol[CODING_CATEGORY_SHIFT_JIS],
             "shift-jis");
   defsymbol (&coding_category_symbol[CODING_CATEGORY_BIG5],
   defsymbol (&coding_category_symbol[CODING_CATEGORY_SHIFT_JIS],
             "shift-jis");
   defsymbol (&coding_category_symbol[CODING_CATEGORY_BIG5],
@@ -5728,24 +5718,24 @@ Not used under a windowing system.
   Vterminal_coding_system = Qnil;
 
   DEFVAR_LISP ("coding-system-for-read", &Vcoding_system_for_read /*
   Vterminal_coding_system = Qnil;
 
   DEFVAR_LISP ("coding-system-for-read", &Vcoding_system_for_read /*
-Overriding coding system used when writing a file or process.
-You should *bind* this, not set it.  If this is non-nil, it specifies
-the coding system that will be used when a file or process is read
-in, and overrides `buffer-file-coding-system-for-read',
+Overriding coding system used when reading from a file or process.
+You should bind this variable with `let', but do not set it globally.
+If this is non-nil, it specifies the coding system that will be used
+to decode input on read operations, such as from a file or process.
+It overrides `buffer-file-coding-system-for-read',
 `insert-file-contents-pre-hook', etc.  Use those variables instead of
 `insert-file-contents-pre-hook', etc.  Use those variables instead of
-this one for permanent changes to the environment.
-*/ );
+this one for permanent changes to the environment.  */ );
   Vcoding_system_for_read = Qnil;
 
   DEFVAR_LISP ("coding-system-for-write",
                &Vcoding_system_for_write /*
   Vcoding_system_for_read = Qnil;
 
   DEFVAR_LISP ("coding-system-for-write",
                &Vcoding_system_for_write /*
-Overriding coding system used when writing a file or process.
-You should *bind* this, not set it.  If this is non-nil, it specifies
-the coding system that will be used when a file or process is wrote
-in, and overrides `buffer-file-coding-system',
-`write-region-pre-hook', etc.  Use those variables instead of this one
-for permanent changes to the environment.
-*/ );
+Overriding coding system used when writing to a file or process.
+You should bind this variable with `let', but do not set it globally.
+If this is non-nil, it specifies the coding system that will be used
+to encode output for write operations, such as to a file or process.
+It overrides `buffer-file-coding-system', `write-region-pre-hook', etc.
+Use those variables instead of this one for permanent changes to the
+environment.  */ );
   Vcoding_system_for_write = Qnil;
 
   DEFVAR_LISP ("file-name-coding-system", &Vfile_name_coding_system /*
   Vcoding_system_for_write = Qnil;
 
   DEFVAR_LISP ("file-name-coding-system", &Vfile_name_coding_system /*
@@ -5824,6 +5814,11 @@ complex_vars_of_file_coding (void)
 
   Fdefine_coding_system_alias (Qno_conversion, Qraw_text);
 
 
   Fdefine_coding_system_alias (Qno_conversion, Qraw_text);
 
+  Fdefine_coding_system_alias (Qfile_name, Qbinary);
+
+  Fdefine_coding_system_alias (Qterminal, Qbinary);
+  Fdefine_coding_system_alias (Qkeyboard, Qbinary);
+
   /* Need this for bootstrapping */
   fcd->coding_category_system[CODING_CATEGORY_NO_CONVERSION] =
     Fget_coding_system (Qraw_text);
   /* Need this for bootstrapping */
   fcd->coding_category_system[CODING_CATEGORY_NO_CONVERSION] =
     Fget_coding_system (Qraw_text);
index ff70465..69345b3 100644 (file)
@@ -24,14 +24,14 @@ Boston, MA 02111-1307, USA.  */
 /* 91.10.09 written by K.Handa <handa@etl.go.jp> */
 /* Rewritten by Ben Wing <ben@xemacs.org>. */
 
 /* 91.10.09 written by K.Handa <handa@etl.go.jp> */
 /* Rewritten by Ben Wing <ben@xemacs.org>. */
 
-#ifndef _XEMACS_MULE_CODING_H_
-#define _XEMACS_MULE_CODING_H_
+#ifndef INCLUDED_file_coding_h_
+#define INCLUDED_file_coding_h_
 
 struct decoding_stream;
 struct encoding_stream;
 
 /* Coding system types.  These go into the TYPE field of a
 
 struct decoding_stream;
 struct encoding_stream;
 
 /* Coding system types.  These go into the TYPE field of a
-   struct Lisp_Coding_System. */
+   Lisp_Coding_System. */
 
 enum coding_system_type
 {
 
 enum coding_system_type
 {
@@ -84,7 +84,8 @@ struct Lisp_Coding_System
   struct lcrecord_header header;
 
   /* Name and doc string of this coding system. */
   struct lcrecord_header header;
 
   /* Name and doc string of this coding system. */
-  Lisp_Object name, doc_string;
+  Lisp_Object name;
+  Lisp_Object doc_string;
 
   /* This is the major type of the coding system -- one of Big5, ISO2022,
      Shift-JIS, etc.  See the constants above. */
 
   /* This is the major type of the coding system -- one of Big5, ISO2022,
      Shift-JIS, etc.  See the constants above. */
@@ -94,14 +95,17 @@ struct Lisp_Coding_System
      system is active for a particular buffer. */
   Lisp_Object mnemonic;
 
      system is active for a particular buffer. */
   Lisp_Object mnemonic;
 
-  Lisp_Object post_read_conversion, pre_write_conversion;
+  Lisp_Object post_read_conversion;
+  Lisp_Object pre_write_conversion;
 
   eol_type_t eol_type;
 
   /* Subsidiary coding systems that specify a particular type of EOL
      marking, rather than autodetecting it.  These will only be non-nil
      if (eol_type == EOL_AUTODETECT). */
 
   eol_type_t eol_type;
 
   /* Subsidiary coding systems that specify a particular type of EOL
      marking, rather than autodetecting it.  These will only be non-nil
      if (eol_type == EOL_AUTODETECT). */
-  Lisp_Object eol_lf, eol_crlf, eol_cr;
+  Lisp_Object eol_lf;
+  Lisp_Object eol_crlf;
+  Lisp_Object eol_cr;
 #ifdef MULE
   struct
   {
 #ifdef MULE
   struct
   {
@@ -130,14 +134,15 @@ struct Lisp_Coding_System
   {
     /* For a CCL coding system, these specify the CCL programs used for
        decoding (input) and encoding (output). */
   {
     /* For a CCL coding system, these specify the CCL programs used for
        decoding (input) and encoding (output). */
-    Lisp_Object decode, encode;
+    Lisp_Object decode;
+    Lisp_Object encode;
   } ccl;
 #endif
 };
 typedef struct Lisp_Coding_System Lisp_Coding_System;
 
   } ccl;
 #endif
 };
 typedef struct Lisp_Coding_System Lisp_Coding_System;
 
-DECLARE_LRECORD (coding_system, struct Lisp_Coding_System);
-#define XCODING_SYSTEM(x) XRECORD (x, coding_system, struct Lisp_Coding_System)
+DECLARE_LRECORD (coding_system, Lisp_Coding_System);
+#define XCODING_SYSTEM(x) XRECORD (x, coding_system, Lisp_Coding_System)
 #define XSETCODING_SYSTEM(x, p) XSETRECORD (x, p, coding_system)
 #define CODING_SYSTEMP(x) RECORDP (x, coding_system)
 #define CHECK_CODING_SYSTEM(x) CHECK_RECORD (x, coding_system)
 #define XSETCODING_SYSTEM(x, p) XSETRECORD (x, p, coding_system)
 #define CODING_SYSTEMP(x) RECORDP (x, coding_system)
 #define CHECK_CODING_SYSTEM(x) CHECK_RECORD (x, coding_system)
@@ -251,7 +256,7 @@ EXFUN (Fsubsidiary_coding_system, 2);
 extern Lisp_Object Qucs4, Qutf8;
 extern Lisp_Object Qbig5, Qccl, Qcharset_g0;
 extern Lisp_Object Qcharset_g1, Qcharset_g2, Qcharset_g3, Qcoding_system_error;
 extern Lisp_Object Qucs4, Qutf8;
 extern Lisp_Object Qbig5, Qccl, Qcharset_g0;
 extern Lisp_Object Qcharset_g1, Qcharset_g2, Qcharset_g3, Qcoding_system_error;
-extern Lisp_Object Qcoding_systemp, Qcr, Qcrlf, Qctext, Qdecode, Qencode;
+extern Lisp_Object Qcoding_systemp, Qcr, Qcrlf, Qdecode, Qencode;
 extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qescape_quoted;
 extern Lisp_Object Qforce_g0_on_output, Qforce_g1_on_output;
 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output;
 extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qescape_quoted;
 extern Lisp_Object Qforce_g0_on_output, Qforce_g1_on_output;
 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output;
@@ -515,5 +520,6 @@ void determine_real_coding_system (Lstream *stream, Lisp_Object *codesys_in_out,
 #define BUFBYTE_FIRST_BYTE_P(c) ((c) < 0xA0)
 #define BUFBYTE_LEADING_BYTE_P(c) BYTE_C1_P (c)
 #endif /* not MULE */
 #define BUFBYTE_FIRST_BYTE_P(c) ((c) < 0xA0)
 #define BUFBYTE_LEADING_BYTE_P(c) BYTE_C1_P (c)
 #endif /* not MULE */
-#endif /* _XEMACS_MULE_CODING_H_ */
+
+#endif /* INCLUDED_file_coding_h_ */
 
 
index 015cd00..01cf988 100644 (file)
@@ -56,7 +56,6 @@ Boston, MA 02111-1307, USA.  */
 
 #ifdef WINDOWSNT
 #define NOMINMAX 1
 
 #ifdef WINDOWSNT
 #define NOMINMAX 1
-#include <windows.h>
 #include <direct.h>
 #include <fcntl.h>
 #include <stdlib.h>
 #include <direct.h>
 #include <fcntl.h>
 #include <stdlib.h>
@@ -240,7 +239,7 @@ maybe_signal_double_file_error_2 (CONST char *string1, CONST char *string2,
 Lisp_Object
 lisp_strerror (int errnum)
 {
 Lisp_Object
 lisp_strerror (int errnum)
 {
-  return build_ext_string (strerror (errnum), FORMAT_NATIVE);
+  return build_ext_string (strerror (errnum), Qnative);
 }
 
 static Lisp_Object
 }
 
 static Lisp_Object
@@ -584,18 +583,10 @@ except for (file-name-as-directory \"\") => \"./\".
 static int
 directory_file_name (CONST char *src, char *dst)
 {
 static int
 directory_file_name (CONST char *src, char *dst)
 {
-  long slen;
-
-  slen = strlen (src);
+  long slen = strlen (src);
   /* Process as Unix format: just remove any final slash.
      But leave "/" unchanged; do not change it to "".  */
   strcpy (dst, src);
   /* Process as Unix format: just remove any final slash.
      But leave "/" unchanged; do not change it to "".  */
   strcpy (dst, src);
-#ifdef APOLLO
-  /* Handle // as root for apollo's.  */
-  if ((slen > 2 && dst[slen - 1] == '/')
-      || (slen > 1 && dst[0] != '/' && dst[slen - 1] == '/'))
-    dst[slen - 1] = 0;
-#else
   if (slen > 1
       && IS_DIRECTORY_SEP (dst[slen - 1])
 #ifdef WINDOWSNT
   if (slen > 1
       && IS_DIRECTORY_SEP (dst[slen - 1])
 #ifdef WINDOWSNT
@@ -603,7 +594,6 @@ directory_file_name (CONST char *src, char *dst)
 #endif /* WINDOWSNT */
       )
     dst[slen - 1] = 0;
 #endif /* WINDOWSNT */
       )
     dst[slen - 1] = 0;
-#endif /* APOLLO */
   return 1;
 }
 
   return 1;
 }
 
@@ -977,12 +967,14 @@ See also the function `substitute-in-file-name'.
       if (IS_DIRECTORY_SEP (nm[1])
          || nm[1] == 0)        /* ~ by itself */
        {
       if (IS_DIRECTORY_SEP (nm[1])
          || nm[1] == 0)        /* ~ by itself */
        {
-         char * newdir_external = get_home_directory ();
+         Extbyte *newdir_external = get_home_directory ();
 
          if (newdir_external == NULL)
            newdir = (Bufbyte *) "";
          else
 
          if (newdir_external == NULL)
            newdir = (Bufbyte *) "";
          else
-           GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA (newdir_external, newdir);
+           TO_INTERNAL_FORMAT (C_STRING, newdir_external,
+                               C_STRING_ALLOCA, (* ((char **) &newdir)),
+                               Qfile_name);
 
          nm++;
 #ifdef WINDOWSNT
 
          nm++;
 #ifdef WINDOWSNT
@@ -1301,9 +1293,11 @@ No component of the resulting pathname will be a symbolic link, as
     char resolved_path[MAXPATHLEN];
     Extbyte *path;
     Extbyte *p;
     char resolved_path[MAXPATHLEN];
     Extbyte *path;
     Extbyte *p;
-    Extcount elen = XSTRING_LENGTH (expanded_name);
+    Extcount elen;
 
 
-    GET_STRING_FILENAME_DATA_ALLOCA (expanded_name,path,elen);
+    TO_EXTERNAL_FORMAT (LISP_STRING, expanded_name,
+                       ALLOCA, (path, elen),
+                       Qfile_name);
     p = path;
     if (elen > MAXPATHLEN)
       goto toolong;
     p = path;
     if (elen > MAXPATHLEN)
       goto toolong;
@@ -1374,7 +1368,7 @@ No component of the resulting pathname will be a symbolic link, as
          resolved_path[rlen + 1] = 0;
          rlen = rlen + 1;
        }
          resolved_path[rlen + 1] = 0;
          rlen = rlen + 1;
        }
-      return make_ext_string ((Bufbyte *) resolved_path, rlen, FORMAT_BINARY);
+      return make_ext_string ((Bufbyte *) resolved_path, rlen, Qbinary);
     }
 
   toolong:
     }
 
   toolong:
@@ -1425,13 +1419,12 @@ If `/~' appears, all of FILENAME through that `/' is discarded.
   for (p = nm; p != endp; p++)
     {
       if ((p[0] == '~'
   for (p = nm; p != endp; p++)
     {
       if ((p[0] == '~'
-#if defined (APOLLO) || defined (WINDOWSNT) || defined (__CYGWIN32__)
-          /* // at start of file name is meaningful in Apollo and
-             WindowsNT systems */
+#if defined (WINDOWSNT) || defined (__CYGWIN32__)
+          /* // at start of file name is meaningful in WindowsNT systems */
           || (IS_DIRECTORY_SEP (p[0]) && p - 1 != nm)
           || (IS_DIRECTORY_SEP (p[0]) && p - 1 != nm)
-#else /* not (APOLLO || WINDOWSNT || __CYGWIN32__) */
+#else /* not (WINDOWSNT || __CYGWIN32__) */
           || IS_DIRECTORY_SEP (p[0])
           || IS_DIRECTORY_SEP (p[0])
-#endif /* not (APOLLO || WINDOWSNT || __CYGWIN32__) */
+#endif /* not (WINDOWSNT || __CYGWIN32__) */
           )
          && p != nm
          && (IS_DIRECTORY_SEP (p[-1])))
           )
          && p != nm
          && (IS_DIRECTORY_SEP (p[-1])))
@@ -1557,11 +1550,11 @@ If `/~' appears, all of FILENAME through that `/' is discarded.
 
   for (p = xnm; p != x; p++)
     if ((p[0] == '~'
 
   for (p = xnm; p != x; p++)
     if ((p[0] == '~'
-#if defined (APOLLO) || defined (WINDOWSNT)
+#if defined (WINDOWSNT)
         || (IS_DIRECTORY_SEP (p[0]) && p - 1 != xnm)
         || (IS_DIRECTORY_SEP (p[0]) && p - 1 != xnm)
-#else /* not (APOLLO || WINDOWSNT) */
+#else /* not WINDOWSNT */
         || IS_DIRECTORY_SEP (p[0])
         || IS_DIRECTORY_SEP (p[0])
-#endif /* APOLLO || WINDOWSNT */
+#endif /* not WINDOWSNT */
         )
        /* don't do p[-1] if that would go off the beginning --jwz */
        && p != nm && p > xnm && IS_DIRECTORY_SEP (p[-1]))
         )
        /* don't do p[-1] if that would go off the beginning --jwz */
        && p != nm && p > xnm && IS_DIRECTORY_SEP (p[-1]))
@@ -2132,26 +2125,21 @@ Open a network connection to PATH using LOGIN as the login string.
        (path, login))
 {
   int netresult;
        (path, login))
 {
   int netresult;
+  const char *path_ext;
+  const char *login_ext;
 
   CHECK_STRING (path);
   CHECK_STRING (login);
 
   /* netunam, being a strange-o system call only used once, is not
      encapsulated. */
 
   CHECK_STRING (path);
   CHECK_STRING (login);
 
   /* netunam, being a strange-o system call only used once, is not
      encapsulated. */
-  {
-    char *path_ext;
-    char *login_ext;
 
 
-    GET_C_STRING_FILENAME_DATA_ALLOCA (path, path_ext);
-    GET_C_STRING_EXT_DATA_ALLOCA (login, FORMAT_OS, login_ext);
+  TO_EXTERNAL_FORMAT (LISP_STRING, path,  C_STRING_ALLOCA, path_ext,  Qfile_name);
+  TO_EXTERNAL_FORMAT (LISP_STRING, login, C_STRING_ALLOCA, login_ext, Qnative);
 
 
-    netresult = netunam (path_ext, login_ext);
-  }
+  netresult = netunam (path_ext, login_ext);
 
 
-  if (netresult == -1)
-    return Qnil;
-  else
-    return Qt;
+  return netresult == -1 ? Qnil : Qt;
 }
 #endif /* HPUX_NET */
 \f
 }
 #endif /* HPUX_NET */
 \f
@@ -2737,15 +2725,7 @@ positions), even in Mule. (Fixing this is very difficult.)
 
   fd = -1;
 
 
   fd = -1;
 
-  if (
-#ifndef APOLLO
-      (stat ((char *) XSTRING_DATA (filename), &st) < 0)
-#else /* APOLLO */
-      /* Don't even bother with interruptible_open.  APOLLO sucks. */
-      ((fd = open ((char *) XSTRING_DATA (filename), O_RDONLY | OPEN_BINARY, 0)) < 0
-       || fstat (fd, &st) < 0)
-#endif /* APOLLO */
-      )
+  if (stat ((char *) XSTRING_DATA (filename), &st) < 0)
     {
       if (fd >= 0) close (fd);
     badopen:
     {
       if (fd >= 0) close (fd);
     badopen:
@@ -3029,9 +3009,6 @@ positions), even in Mule. (Fixing this is very difficult.)
     {
       if (!EQ (buf->undo_list, Qt))
        buf->undo_list = Qnil;
     {
       if (!EQ (buf->undo_list, Qt))
        buf->undo_list = Qnil;
-#ifdef APOLLO
-      stat ((char *) XSTRING_DATA (filename), &st);
-#endif
       if (NILP (handler))
        {
          buf->modtime = st.st_mtime;
       if (NILP (handler))
        {
          buf->modtime = st.st_mtime;
@@ -3337,21 +3314,11 @@ to the value of CODESYS.  If this is nil, no code conversion occurs.
       }
 #endif /* HAVE_FSYNC */
 
       }
 #endif /* HAVE_FSYNC */
 
-    /* Spurious "file has changed on disk" warnings have been
-       observed on Suns as well.
-       It seems that `close' can change the modtime, under nfs.
-
-       (This has supposedly been fixed in Sunos 4,
-       but who knows about all the other machines with NFS?)  */
-    /* On VMS and APOLLO, must do the stat after the close
-       since closing changes the modtime.  */
-    /* As it does on Windows too - kkm */
-    /* The spurious warnings appear on Linux too.  Rather than handling
-       this on a per-system basis, unconditionally do the stat after the close - cgw */
-
-#if 0 /* !defined (WINDOWSNT) */  /* !defined (VMS) && !defined (APOLLO) */
-    fstat (desc, &st);
-#endif
+    /* Spurious "file has changed on disk" warnings used to be seen on
+       systems where close() can change the modtime.  This is known to
+       happen on various NFS file systems, on Windows, and on Linux.
+       Rather than handling this on a per-system basis, we
+       unconditionally do the stat() after the close(). */
 
     /* NFS can report a write failure now.  */
     if (close (desc) < 0)
 
     /* NFS can report a write failure now.  */
     if (close (desc) < 0)
@@ -3367,9 +3334,7 @@ to the value of CODESYS.  If this is nil, no code conversion occurs.
     unbind_to (speccount, Qnil);
   }
 
     unbind_to (speccount, Qnil);
   }
 
-  /* # if defined (WINDOWSNT) */ /* defined (VMS) || defined (APOLLO) */
   stat ((char *) XSTRING_DATA (fn), &st);
   stat ((char *) XSTRING_DATA (fn), &st);
-  /* #endif */
 
 #ifdef CLASH_DETECTION
   if (!auto_saving)
 
 #ifdef CLASH_DETECTION
   if (!auto_saving)
@@ -4021,18 +3986,19 @@ Non-nil second argument means save only current buffer.
                  CONST Extbyte *auto_save_file_name_ext;
                  Extcount auto_save_file_name_ext_len;
 
                  CONST Extbyte *auto_save_file_name_ext;
                  Extcount auto_save_file_name_ext_len;
 
-                 GET_STRING_FILENAME_DATA_ALLOCA
-                   (b->auto_save_file_name,
-                    auto_save_file_name_ext,
-                    auto_save_file_name_ext_len);
+                 TO_EXTERNAL_FORMAT (LISP_STRING, b->auto_save_file_name,
+                                     ALLOCA, (auto_save_file_name_ext,
+                                              auto_save_file_name_ext_len),
+                                     Qfile_name);
                  if (!NILP (b->filename))
                    {
                      CONST Extbyte *filename_ext;
                      Extcount filename_ext_len;
 
                  if (!NILP (b->filename))
                    {
                      CONST Extbyte *filename_ext;
                      Extcount filename_ext_len;
 
-                     GET_STRING_FILENAME_DATA_ALLOCA (b->filename,
-                                                      filename_ext,
-                                                      filename_ext_len);
+                     TO_EXTERNAL_FORMAT (LISP_STRING, b->filename,
+                                         ALLOCA, (filename_ext,
+                                                  filename_ext_len),
+                                         Qfile_name);
                      write (listdesc, filename_ext, filename_ext_len);
                    }
                  write (listdesc, "\n", 1);
                      write (listdesc, filename_ext, filename_ext_len);
                    }
                  write (listdesc, "\n", 1);
index 21c819d..d27de65 100644 (file)
@@ -190,7 +190,7 @@ static const struct lrecord_description float_description[] = {
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("float", float,
                                     mark_float, print_float, 0, float_equal,
                                     float_hash, float_description,
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("float", float,
                                     mark_float, print_float, 0, float_equal,
                                     float_hash, float_description,
-                                    struct Lisp_Float);
+                                    Lisp_Float);
 \f
 /* Extract a Lisp number as a `double', or signal an error.  */
 
 \f
 /* Extract a Lisp number as a `double', or signal an error.  */
 
index 403e6ea..8a832a2 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -70,7 +70,7 @@ static void
 print_bit_vector (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
   size_t i;
 print_bit_vector (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
   size_t i;
-  struct Lisp_Bit_Vector *v = XBIT_VECTOR (obj);
+  Lisp_Bit_Vector *v = XBIT_VECTOR (obj);
   size_t len = bit_vector_length (v);
   size_t last = len;
 
   size_t len = bit_vector_length (v);
   size_t last = len;
 
@@ -92,8 +92,8 @@ print_bit_vector (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 static int
 bit_vector_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
 static int
 bit_vector_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  struct Lisp_Bit_Vector *v1 = XBIT_VECTOR (obj1);
-  struct Lisp_Bit_Vector *v2 = XBIT_VECTOR (obj2);
+  Lisp_Bit_Vector *v1 = XBIT_VECTOR (obj1);
+  Lisp_Bit_Vector *v2 = XBIT_VECTOR (obj2);
 
   return ((bit_vector_length (v1) == bit_vector_length (v2)) &&
          !memcmp (v1->bits, v2->bits,
 
   return ((bit_vector_length (v1) == bit_vector_length (v2)) &&
          !memcmp (v1->bits, v2->bits,
@@ -104,7 +104,7 @@ bit_vector_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 static unsigned long
 bit_vector_hash (Lisp_Object obj, int depth)
 {
 static unsigned long
 bit_vector_hash (Lisp_Object obj, int depth)
 {
-  struct Lisp_Bit_Vector *v = XBIT_VECTOR (obj);
+  Lisp_Bit_Vector *v = XBIT_VECTOR (obj);
   return HASH2 (bit_vector_length (v),
                memory_hash (v->bits,
                             BIT_VECTOR_LONG_STORAGE (bit_vector_length (v)) *
   return HASH2 (bit_vector_length (v),
                memory_hash (v->bits,
                             BIT_VECTOR_LONG_STORAGE (bit_vector_length (v)) *
@@ -112,7 +112,7 @@ bit_vector_hash (Lisp_Object obj, int depth)
 }
 
 static const struct lrecord_description bit_vector_description[] = {
 }
 
 static const struct lrecord_description bit_vector_description[] = {
-  { XD_LISP_OBJECT, offsetof(Lisp_Bit_Vector, next), 1 },
+  { XD_LISP_OBJECT, offsetof (Lisp_Bit_Vector, next) },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -121,7 +121,7 @@ DEFINE_BASIC_LRECORD_IMPLEMENTATION ("bit-vector", bit_vector,
                                     mark_bit_vector, print_bit_vector, 0,
                                     bit_vector_equal, bit_vector_hash,
                                     bit_vector_description,
                                     mark_bit_vector, print_bit_vector, 0,
                                     bit_vector_equal, bit_vector_hash,
                                     bit_vector_description,
-                                    struct Lisp_Bit_Vector);
+                                    Lisp_Bit_Vector);
 \f
 DEFUN ("identity", Fidentity, 1, 1, 0, /*
 Return the argument unchanged.
 \f
 DEFUN ("identity", Fidentity, 1, 1, 0, /*
 Return the argument unchanged.
@@ -184,7 +184,7 @@ length_with_bytecode_hack (Lisp_Object seq)
     return XINT (Flength (seq));
   else
     {
     return XINT (Flength (seq));
   else
     {
-      struct Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (seq);
+      Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (seq);
 
       return (f->flags.interactivep ? COMPILED_INTERACTIVE :
              f->flags.domainp      ? COMPILED_DOMAIN :
 
       return (f->flags.interactivep ? COMPILED_INTERACTIVE :
              f->flags.domainp      ? COMPILED_DOMAIN :
@@ -268,7 +268,7 @@ Symbols are also allowed; their print names are used instead.
        (s1, s2))
 {
   Bytecount len;
        (s1, s2))
 {
   Bytecount len;
-  struct Lisp_String *p1, *p2;
+  Lisp_String *p1, *p2;
 
   if (SYMBOLP (s1))
     p1 = XSYMBOL (s1)->name;
 
   if (SYMBOLP (s1))
     p1 = XSYMBOL (s1)->name;
@@ -315,7 +315,7 @@ may be solved.
 */
        (s1, s2))
 {
 */
        (s1, s2))
 {
-  struct Lisp_String *p1, *p2;
+  Lisp_String *p1, *p2;
   Charcount end, len2;
   int i;
 
   Charcount end, len2;
   int i;
 
@@ -394,7 +394,7 @@ of the string are changed (e.g. with `aset').  It wraps around occasionally.
 */
        (string))
 {
 */
        (string))
 {
-  struct Lisp_String *s;
+  Lisp_String *s;
 
   CHECK_STRING (string);
   s = XSTRING (string);
 
   CHECK_STRING (string);
   s = XSTRING (string);
@@ -407,7 +407,7 @@ of the string are changed (e.g. with `aset').  It wraps around occasionally.
 void
 bump_string_modiff (Lisp_Object str)
 {
 void
 bump_string_modiff (Lisp_Object str)
 {
-  struct Lisp_String *s = XSTRING (str);
+  Lisp_String *s = XSTRING (str);
   Lisp_Object *ptr = &s->plist;
 
 #ifdef I18N3
   Lisp_Object *ptr = &s->plist;
 
 #ifdef I18N3
@@ -2601,7 +2601,7 @@ symbol_remprop (Lisp_Object symbol, Lisp_Object propname)
 
 
 static Lisp_Object *
 
 
 static Lisp_Object *
-string_plist_ptr (struct Lisp_String *s)
+string_plist_ptr (Lisp_String *s)
 {
   Lisp_Object *ptr = &s->plist;
 
 {
   Lisp_Object *ptr = &s->plist;
 
@@ -2613,7 +2613,7 @@ string_plist_ptr (struct Lisp_String *s)
 }
 
 static Lisp_Object
 }
 
 static Lisp_Object
-string_getprop (struct Lisp_String *s, Lisp_Object property,
+string_getprop (Lisp_String *s, Lisp_Object property,
                Lisp_Object default_)
 {
   Lisp_Object val = external_plist_get (string_plist_ptr (s), property, 0,
                Lisp_Object default_)
 {
   Lisp_Object val = external_plist_get (string_plist_ptr (s), property, 0,
@@ -2622,20 +2622,20 @@ string_getprop (struct Lisp_String *s, Lisp_Object property,
 }
 
 static void
 }
 
 static void
-string_putprop (struct Lisp_String *s, Lisp_Object property,
+string_putprop (Lisp_String *s, Lisp_Object property,
                Lisp_Object value)
 {
   external_plist_put (string_plist_ptr (s), property, value, 0, ERROR_ME);
 }
 
 static int
                Lisp_Object value)
 {
   external_plist_put (string_plist_ptr (s), property, value, 0, ERROR_ME);
 }
 
 static int
-string_remprop (struct Lisp_String *s, Lisp_Object property)
+string_remprop (Lisp_String *s, Lisp_Object property)
 {
   return external_remprop (string_plist_ptr (s), property, 0, ERROR_ME);
 }
 
 static Lisp_Object
 {
   return external_remprop (string_plist_ptr (s), property, 0, ERROR_ME);
 }
 
 static Lisp_Object
-string_plist (struct Lisp_String *s)
+string_plist (Lisp_String *s)
 {
   return *string_plist_ptr (s);
 }
 {
   return *string_plist_ptr (s);
 }
@@ -2872,7 +2872,7 @@ ARRAY is a vector, bit vector, or string.
  retry:
   if (STRINGP (array))
     {
  retry:
   if (STRINGP (array))
     {
-      struct Lisp_String *s = XSTRING (array);
+      Lisp_String *s = XSTRING (array);
       Bytecount old_bytecount = string_length (s);
       Bytecount new_bytecount;
       Bytecount item_bytecount;
       Bytecount old_bytecount = string_length (s);
       Bytecount new_bytecount;
       Bytecount item_bytecount;
@@ -2906,7 +2906,7 @@ ARRAY is a vector, bit vector, or string.
     }
   else if (BIT_VECTORP (array))
     {
     }
   else if (BIT_VECTORP (array))
     {
-      struct Lisp_Bit_Vector *v = XBIT_VECTOR (array);
+      Lisp_Bit_Vector *v = XBIT_VECTOR (array);
       int len = bit_vector_length (v);
       int bit;
       CHECK_BIT (item);
       int len = bit_vector_length (v);
       int bit;
       CHECK_BIT (item);
@@ -3159,7 +3159,7 @@ mapcar1 (size_t leni, Lisp_Object *vals,
     }
   else if (BIT_VECTORP (sequence))
     {
     }
   else if (BIT_VECTORP (sequence))
     {
-      struct Lisp_Bit_Vector *v = XBIT_VECTOR (sequence);
+      Lisp_Bit_Vector *v = XBIT_VECTOR (sequence);
       for (i = 0; i < leni; i++)
        {
          args[1] = make_int (bit_vector_bit (v, i));
       for (i = 0; i < leni; i++)
        {
          args[1] = make_int (bit_vector_bit (v, i));
index 0debfda..53ea416 100644 (file)
@@ -414,8 +414,7 @@ static void
 find_context (struct buffer *buf, Bufpos pt)
 {
   /* This function can GC */
 find_context (struct buffer *buf, Bufpos pt)
 {
   /* This function can GC */
-  struct Lisp_Char_Table *mirrortab =
-    XCHAR_TABLE (buf->mirror_syntax_table);
+  Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
   Lisp_Object syntaxtab = buf->syntax_table;
   Emchar prev_c, c;
   Bufpos target = pt;
   Lisp_Object syntaxtab = buf->syntax_table;
   Emchar prev_c, c;
   Bufpos target = pt;
index 6eaac63..d86dc40 100644 (file)
@@ -70,12 +70,17 @@ Boston, MA 02111-1307, USA.  */
 
 /* Default properties to use when creating frames.  */
 Lisp_Object Vdefault_mswindows_frame_plist;
 
 /* Default properties to use when creating frames.  */
 Lisp_Object Vdefault_mswindows_frame_plist;
+Lisp_Object Vdefault_msprinter_frame_plist;
 Lisp_Object Vmswindows_use_system_frame_size_defaults;
 
 /* This does not need to be GC protected, as it holds a
    frame Lisp_Object already protected by Fmake_frame */
 Lisp_Object Vmswindows_frame_being_created;
 
 Lisp_Object Vmswindows_use_system_frame_size_defaults;
 
 /* This does not need to be GC protected, as it holds a
    frame Lisp_Object already protected by Fmake_frame */
 Lisp_Object Vmswindows_frame_being_created;
 
+/*---------------------------------------------------------------------*/
+/*-----                    DISPLAY FRAME                          -----*/
+/*---------------------------------------------------------------------*/
+
 static void
 mswindows_init_frame_1 (struct frame *f, Lisp_Object props)
 {
 static void
 mswindows_init_frame_1 (struct frame *f, Lisp_Object props)
 {
@@ -594,7 +599,8 @@ mswindows_set_frame_properties (struct frame *f, Lisp_Object plist)
      bugs (and is more consistent with X) so I am going to reenable it.
      --andyp */
   if ( FRAME_PIXWIDTH (f) && FRAME_PIXHEIGHT (f)
      bugs (and is more consistent with X) so I am going to reenable it.
      --andyp */
   if ( FRAME_PIXWIDTH (f) && FRAME_PIXHEIGHT (f)
-       && (width_specified_p || height_specified_p || x_specified_p || y_specified_p))
+       && (width_specified_p || height_specified_p
+          || x_specified_p || y_specified_p))
     {
       XEMACS_RECT_WH dest = { x, y, width, height };
 
     {
       XEMACS_RECT_WH dest = { x, y, width, height };
 
@@ -699,10 +705,343 @@ mswindows_frame_size_fixed_p (struct frame *f)
   return IsZoomed (FRAME_MSWINDOWS_HANDLE (f));
 }
 
   return IsZoomed (FRAME_MSWINDOWS_HANDLE (f));
 }
 
+/*---------------------------------------------------------------------*/
+/*-----                    PRINTER FRAME                          -----*/
+/*---------------------------------------------------------------------*/
+
+EXFUN (Fset_frame_properties, 2);
+
+static void
+error_frame_unsizable (struct frame *f)
+{
+  Lisp_Object frame;
+  XSETFRAME (frame, f);
+  signal_simple_error ("Cannot resize frame (margins)"
+                      " after print job has started.", frame);
+}
+
+static void
+maybe_error_if_job_active (struct frame *f)
+{
+  if (FRAME_MSPRINTER_JOB_STARTED (f))
+    error_frame_unsizable (f);
+}
+
+static void
+msprinter_init_frame_1 (struct frame *f, Lisp_Object props)
+{
+  HDC hdc = DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f)));
+  Lisp_Object frame_obj = Qnil;
+
+  /* Make sure this is the only frame on device. Windows printer can
+     handle only one job at a time. */
+  if (!NILP (DEVICE_FRAME_LIST (XDEVICE (FRAME_DEVICE (f)))))
+    error ("Only one frame (print job) at a time is allowed on "
+          "this printer device.");
+
+  f->frame_data = xnew_and_zero (struct msprinter_frame);
+
+  /* Default margin size is 1" = 1440 twips */
+  FRAME_MSPRINTER_TOP_MARGIN(f) = 1440;
+  FRAME_MSPRINTER_BOTTOM_MARGIN(f) = 1440;
+  FRAME_MSPRINTER_LEFT_MARGIN(f) = 1440;
+  FRAME_MSPRINTER_RIGHT_MARGIN(f) = 1440;
+
+  /* Negative for "uinspecified" */
+  FRAME_MSPRINTER_CHARWIDTH(f) = -1;
+  FRAME_MSPRINTER_CHARHEIGHT(f) = -1;
+
+  /* nil is for "system default" for these properties. */
+  FRAME_MSPRINTER_ORIENTATION(f) = Qnil;
+  FRAME_MSPRINTER_DUPLEX(f) = Qnil;
+}
+
+static void
+msprinter_init_frame_3 (struct frame *f)
+{
+  DOCINFO di;
+  struct device *device = XDEVICE (FRAME_DEVICE (f));
+  HDC hdc = DEVICE_MSPRINTER_HDC (device);
+  int frame_left, frame_top, frame_width, frame_height;
+
+  /* Change printer parameters */
+  {
+    DEVMODE* devmode = msprinter_get_devmode_copy (device);
+    devmode->dmFields = 0;
+
+    if (!NILP (FRAME_MSPRINTER_ORIENTATION(f)))
+      {
+       devmode->dmFields = DM_ORIENTATION;
+       if (EQ (FRAME_MSPRINTER_ORIENTATION(f), Qportrait))
+         devmode->dmOrientation = DMORIENT_PORTRAIT;
+       else if (EQ (FRAME_MSPRINTER_ORIENTATION(f), Qlandscape))
+         devmode->dmOrientation = DMORIENT_LANDSCAPE;
+       else
+         abort();
+      }
+
+    if (!NILP (FRAME_MSPRINTER_DUPLEX(f)))
+      {
+       devmode->dmFields = DM_DUPLEX;
+       if (EQ (FRAME_MSPRINTER_DUPLEX(f), Qnone))
+         devmode->dmDuplex = DMDUP_SIMPLEX;
+       if (EQ (FRAME_MSPRINTER_DUPLEX(f), Qvertical))
+         devmode->dmDuplex = DMDUP_VERTICAL;
+       if (EQ (FRAME_MSPRINTER_DUPLEX(f), Qhorizontal))
+         devmode->dmDuplex = DMDUP_HORIZONTAL;
+       else
+         abort();
+      }
+
+    msprinter_apply_devmode (device, devmode);
+  }
+
+  /* Compute geometry properties */
+  frame_left = (MulDiv (GetDeviceCaps (hdc, LOGPIXELSX),
+                       FRAME_MSPRINTER_LEFT_MARGIN(f), 1440)
+               - GetDeviceCaps (hdc, PHYSICALOFFSETX));
+  
+  if (FRAME_MSPRINTER_CHARWIDTH(f) > 0)
+    {
+      char_to_real_pixel_size (f, FRAME_MSPRINTER_CHARWIDTH(f), 0,
+                              &frame_width, NULL);
+      FRAME_MSPRINTER_RIGHT_MARGIN(f) = 
+       MulDiv (GetDeviceCaps (hdc, PHYSICALWIDTH)
+               - (frame_left + frame_width), 1440,
+               GetDeviceCaps (hdc, LOGPIXELSX));
+    }          
+  else
+    frame_width = (GetDeviceCaps (hdc, PHYSICALWIDTH)
+                  - frame_left
+                  - MulDiv (GetDeviceCaps (hdc, LOGPIXELSX),
+                            FRAME_MSPRINTER_RIGHT_MARGIN(f), 1440));
+
+  frame_top = (MulDiv (GetDeviceCaps (hdc, LOGPIXELSY),
+                      FRAME_MSPRINTER_TOP_MARGIN(f), 1440)
+              - GetDeviceCaps (hdc, PHYSICALOFFSETY));
+
+  if (FRAME_MSPRINTER_CHARHEIGHT(f) > 0)
+    {
+      char_to_real_pixel_size (f, 0, FRAME_MSPRINTER_CHARHEIGHT(f),
+                              NULL, &frame_height);
+
+      FRAME_MSPRINTER_BOTTOM_MARGIN(f) = 
+       MulDiv (GetDeviceCaps (hdc, PHYSICALHEIGHT)
+               - (frame_top + frame_height), 1440,
+               GetDeviceCaps (hdc, LOGPIXELSY));
+    }          
+  else
+    frame_height = (GetDeviceCaps (hdc, PHYSICALHEIGHT)
+                   - frame_top
+                   - MulDiv (GetDeviceCaps (hdc, LOGPIXELSY),
+                             FRAME_MSPRINTER_BOTTOM_MARGIN(f), 1440));
+
+  /* Geometry sanity checks */
+  if (!frame_pixsize_valid_p (f, frame_width, frame_height))
+    error ("Area inside print margins has shrunk to naught.");
+
+  if (frame_left < 0
+      || frame_top < 0
+      || frame_left + frame_width > GetDeviceCaps (hdc, HORZRES)
+      || frame_top + frame_height > GetDeviceCaps (hdc, VERTRES))
+    error ("Print area is ouside of the printer's hardware printable area.");
+
+  /* Apply XEmacs frame geometry and layout windows */
+  {
+    int rows, columns;
+    FRAME_PIXWIDTH(f) = frame_width;
+    FRAME_PIXHEIGHT(f) = frame_height;
+    pixel_to_char_size (f, frame_width, frame_height, &columns, &rows);
+    change_frame_size (f, rows, columns, 0);
+  }
+
+  /* Apply DC geometry */
+  SetTextAlign (hdc, TA_BASELINE | TA_LEFT | TA_NOUPDATECP);
+  SetViewportOrgEx (hdc, frame_left, frame_top, NULL);
+  SetWindowOrgEx (hdc, 0, 0, NULL);
+
+  /* Start print job */
+  di.cbSize = sizeof (di);
+  di.lpszDocName = (STRINGP(f->name)
+                   ? (char*) XSTRING_DATA(f->name)
+                   : "XEmacs print document");
+  di.lpszOutput = NULL;
+  di.lpszDatatype = NULL;
+  di.fwType = 0;
+
+  if (StartDoc (hdc, &di) <= 0)
+    error ("Cannot start print job");
+
+  /* Finish frame setup */
+  FRAME_MSPRINTER_CDC(f) = CreateCompatibleDC (hdc);
+  FRAME_MSPRINTER_JOB_STARTED (f) = 1;
+  FRAME_VISIBLE_P(f) = 0;
+}
+
+static void
+msprinter_mark_frame (struct frame *f)
+{
+  /* NOTE: These need not be marked as long as we allow only c-defined
+     symbols for their values.  Although, marking these is safer than
+     expensive.  [I know a proof to the theorem postulating that a
+     gator is longer than greener. Ask me. -- kkm] */
+  mark_object (FRAME_MSPRINTER_ORIENTATION (f));
+  mark_object (FRAME_MSPRINTER_DUPLEX (f));
+}
+
+static void
+msprinter_delete_frame (struct frame *f)
+{
+  if (f->frame_data)
+    {
+      if (FRAME_MSPRINTER_JOB_STARTED (f))
+       EndDoc (DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f))));
+      if (FRAME_MSPRINTER_CDC(f))
+       DeleteDC(FRAME_MSPRINTER_CDC(f));
+      xfree (f->frame_data);
+    }
+
+  f->frame_data = 0;
+}
+
+static Lisp_Object
+msprinter_frame_property (struct frame *f, Lisp_Object property)
+{
+  if (EQ (Qleft_margin, property))
+    return make_int (FRAME_MSPRINTER_LEFT_MARGIN(f));
+  else if (EQ (Qtop_margin, property))
+    return make_int (FRAME_MSPRINTER_TOP_MARGIN(f));
+  if (EQ (Qright_margin, property))
+    return make_int (FRAME_MSPRINTER_RIGHT_MARGIN(f));
+  else if (EQ (Qbottom_margin, property))
+    return make_int (FRAME_MSPRINTER_BOTTOM_MARGIN(f));
+  else if (EQ (Qorientation, property))
+    return FRAME_MSPRINTER_ORIENTATION(f);
+  else if (EQ (Qduplex, property))
+    return FRAME_MSPRINTER_DUPLEX(f);
+  else
+    return Qunbound;
+}
+
+static int
+msprinter_internal_frame_property_p (struct frame *f, Lisp_Object property)
+{
+  return (EQ (Qleft_margin, property) || EQ (Qtop_margin, property) ||
+         EQ (Qright_margin, property) || EQ (Qbottom_margin, property) ||
+         EQ (Qorientation, property) || EQ (Qduplex, property));
+}
+
+static Lisp_Object
+msprinter_frame_properties (struct frame *f)
+{
+  Lisp_Object props = Qnil;
+  props = cons3 (Qorientation, FRAME_MSPRINTER_ORIENTATION(f), props);
+  props = cons3 (Qduplex, FRAME_MSPRINTER_DUPLEX(f), props);
+  props = cons3 (Qbottom_margin,
+                make_int (FRAME_MSPRINTER_BOTTOM_MARGIN(f)), props);
+  props = cons3 (Qright_margin,
+                make_int (FRAME_MSPRINTER_RIGHT_MARGIN(f)), props);
+  props = cons3 (Qtop_margin,
+                make_int (FRAME_MSPRINTER_TOP_MARGIN(f)), props);
+  props = cons3 (Qleft_margin,
+                make_int (FRAME_MSPRINTER_LEFT_MARGIN(f)), props);
+  return props;
+}
+
+static void
+msprinter_set_frame_properties (struct frame *f, Lisp_Object plist)
+{
+  BOOL size_changed_p = FALSE;
+  Lisp_Object tail;
+
+  /* Extract the properties from plist */
+  for (tail = plist; !NILP (tail); tail = Fcdr (Fcdr (tail)))
+    {
+      Lisp_Object prop = Fcar (tail);
+      Lisp_Object val = Fcar (Fcdr (tail));
+
+      if (SYMBOLP (prop))
+       {
+         if (EQ (prop, Qwidth))
+           {
+             maybe_error_if_job_active (f);
+             if (!NILP (val))
+               {
+                 CHECK_NATNUM (val);
+                 FRAME_MSPRINTER_CHARWIDTH(f) = XINT (val);
+               }
+           }
+         if (EQ (prop, Qheight))
+           {
+             maybe_error_if_job_active (f);
+             if (!NILP (val))
+               {
+                 CHECK_NATNUM (val);
+                 FRAME_MSPRINTER_CHARHEIGHT(f) = XINT (val);
+               }
+           }
+         else if (EQ (prop, Qleft_margin))
+           {
+             maybe_error_if_job_active (f);
+             CHECK_NATNUM (val);
+             FRAME_MSPRINTER_LEFT_MARGIN(f) = XINT (val);
+           }
+         else if (EQ (prop, Qtop_margin))
+           {
+             maybe_error_if_job_active (f);
+             CHECK_NATNUM (val);
+             FRAME_MSPRINTER_TOP_MARGIN(f) = XINT (val);
+           }
+         else if (EQ (prop, Qright_margin))
+           {
+             maybe_error_if_job_active (f);
+             CHECK_NATNUM (val);
+             FRAME_MSPRINTER_RIGHT_MARGIN(f) = XINT (val);
+           }
+         else if (EQ (prop, Qbottom_margin))
+           {
+             maybe_error_if_job_active (f);
+             CHECK_NATNUM (val);
+             FRAME_MSPRINTER_BOTTOM_MARGIN(f) = XINT (val);
+           }
+         else if (EQ (prop, Qorientation))
+           {
+             maybe_error_if_job_active (f);
+             CHECK_SYMBOL (val);
+             if (!NILP(val) &&
+                 !EQ (val, Qportrait) &&
+                 !EQ (val, Qlandscape))
+               signal_simple_error ("Page orientation can only be "
+                                    "'portrait or 'landscape", val);
+             FRAME_MSPRINTER_ORIENTATION(f) = val;
+           }
+         else if (EQ (prop, Qduplex))
+           {
+             maybe_error_if_job_active (f);
+             CHECK_SYMBOL (val);
+             if (!NILP(val) &&
+                 !EQ (val, Qnone) &&
+                 !EQ (val, Qvertical) &&
+                 !EQ (val, Qhorizontal))
+               signal_simple_error ("Duplex can only be 'none, "
+                                    "'vertical or 'horizontal", val);
+             FRAME_MSPRINTER_DUPLEX(f) = val;
+           }
+       }
+    }
+}
+
+static void
+msprinter_set_frame_size (struct frame *f, int width, int height)
+{
+  /* We're absolutely unsizeable */
+  error_frame_unsizable (f);
+}
+
 void
 console_type_create_frame_mswindows (void)
 {
 void
 console_type_create_frame_mswindows (void)
 {
-  /* frame methods */
+  /* Display frames */
   CONSOLE_HAS_METHOD (mswindows, init_frame_1);
   CONSOLE_HAS_METHOD (mswindows, init_frame_2); 
   CONSOLE_HAS_METHOD (mswindows, init_frame_3);
   CONSOLE_HAS_METHOD (mswindows, init_frame_1);
   CONSOLE_HAS_METHOD (mswindows, init_frame_2); 
   CONSOLE_HAS_METHOD (mswindows, init_frame_3);
@@ -733,6 +1072,17 @@ console_type_create_frame_mswindows (void)
   CONSOLE_HAS_METHOD (mswindows, get_frame_parent);
   CONSOLE_HAS_METHOD (mswindows, update_frame_external_traits);
   CONSOLE_HAS_METHOD (mswindows, frame_size_fixed_p);
   CONSOLE_HAS_METHOD (mswindows, get_frame_parent);
   CONSOLE_HAS_METHOD (mswindows, update_frame_external_traits);
   CONSOLE_HAS_METHOD (mswindows, frame_size_fixed_p);
+
+  /* Printer frames, aka print jobs */
+  CONSOLE_HAS_METHOD (msprinter, init_frame_1);
+  CONSOLE_HAS_METHOD (msprinter, init_frame_3);
+  CONSOLE_HAS_METHOD (msprinter, mark_frame);
+  CONSOLE_HAS_METHOD (msprinter, delete_frame);
+  CONSOLE_HAS_METHOD (msprinter, frame_property);
+  CONSOLE_HAS_METHOD (msprinter, internal_frame_property_p);
+  CONSOLE_HAS_METHOD (msprinter, frame_properties);
+  CONSOLE_HAS_METHOD (msprinter, set_frame_properties);
+  CONSOLE_HAS_METHOD (msprinter, set_frame_size);
 }
 
 void
 }
 
 void
@@ -799,4 +1149,54 @@ to all frames, not just mswindows frames.
 
   mswindows_console_methods->device_specific_frame_props =
     &Vdefault_mswindows_frame_plist;
 
   mswindows_console_methods->device_specific_frame_props =
     &Vdefault_mswindows_frame_plist;
+
+  DEFVAR_LISP ("default-msprinter-frame-plist", &Vdefault_msprinter_frame_plist /*
+Plist of default frame-creation properties for msprinter print job frames.
+These override what is specified in `default-frame-plist', but are
+overridden by the arguments to the particular call to `make-frame'.
+
+Note: In many cases, properties of a frame are available as specifiers
+instead of through the frame-properties mechanism.
+
+Here is a list of recognized frame properties, other than those
+documented in `set-frame-properties' (they can be queried and
+set at any time, except as otherwise noted):
+
+  left-margin                   Margin of the page, in twips. Twip is a
+  top-margin                   typographical unit of measurement,
+  right-margin                  equal to 1/1440 of an inch, or 1/20 of a
+  bottom-margin                        point, and roughly equal to 7/400 of a
+                               millimeter. If not specifified, each margin
+                               defaults to one inch (25.4 mm).
+
+     MARGINS NOTE. right-margin and bottom-margin are overridden by
+       the height and width properties. If you want to specify size
+       of the printable area in character, as with the rest of XEmacs,
+       use these properties. If height and/or width are nil, then
+       corresponding margin setting is taken into account. If you
+       specify height and/or width in `default-frame-plist', but still
+       want to specify right/bottom margins, set height/width in this
+       plist to nil, as in this example:
+
+         (setq default-frame-plist '(height 55 'width 80)
+               default-msprinter-frame-plist '(height nil 'width nil))
+
+
+  orientation                   Printer page orientation. Can be 'nil,
+                               indicating system default, 'portrait
+                               or 'landscape.
+
+  duplex                       Duplex printing mode, subject to printer
+                               support. Can be 'nil for the device default,
+                               'none for simplex printing, 'vertical or
+                               'horizontal for duplex page bound along
+                               the corresponding page direction.
+
+See also `default-frame-plist', which specifies properties which apply
+to all frames, not just mswindows frames.
+*/ );
+  Vdefault_msprinter_frame_plist = Qnil;
+
+  msprinter_console_methods->device_specific_frame_props =
+    &Vdefault_msprinter_frame_plist;
 }
 }
index 906a6b1..9a25460 100644 (file)
@@ -113,7 +113,7 @@ x_any_window_to_frame (struct device *d, Window wdesc)
 
   /* We used to map over all frames here and then map over all widgets
      belonging to that frame. However it turns out that this was very fragile
 
   /* We used to map over all frames here and then map over all widgets
      belonging to that frame. However it turns out that this was very fragile
-     as it requires our display stuctures to be in sync _and_ that the 
+     as it requires our display stuctures to be in sync _and_ that the
      loop is told about every new widget somebody adds. Therefore we
      now let Xt find it for us (which does a bottom-up search which
      could even be faster) */
      loop is told about every new widget somebody adds. Therefore we
      now let Xt find it for us (which does a bottom-up search which
      could even be faster) */
@@ -661,13 +661,15 @@ x_set_frame_text_value (struct frame *f, Bufbyte *value,
       {
         CONST char * tmp;
         encoding = DEVICE_XATOM_COMPOUND_TEXT (XDEVICE (FRAME_DEVICE (f)));
       {
         CONST char * tmp;
         encoding = DEVICE_XATOM_COMPOUND_TEXT (XDEVICE (FRAME_DEVICE (f)));
-        GET_C_CHARPTR_EXT_CTEXT_DATA_ALLOCA ((CONST char *) value, tmp);
+       TO_EXTERNAL_FORMAT (C_STRING, value,
+                           C_STRING_ALLOCA, tmp,
+                           Qctext);
         new_XtValue = (String) tmp;
         break;
       }
 #endif /* MULE */
 
         new_XtValue = (String) tmp;
         break;
       }
 #endif /* MULE */
 
-  /* ### Caching is device-independent - belongs in update_frame_title. */
+  /* #### Caching is device-independent - belongs in update_frame_title. */
   Xt_GET_VALUE (FRAME_X_SHELL_WIDGET (f), Xt_resource_name, &old_XtValue);
   if (!old_XtValue || strcmp (new_XtValue, old_XtValue))
     {
   Xt_GET_VALUE (FRAME_X_SHELL_WIDGET (f), Xt_resource_name, &old_XtValue);
   if (!old_XtValue || strcmp (new_XtValue, old_XtValue))
     {
@@ -763,13 +765,17 @@ x_set_frame_properties (struct frame *f, Lisp_Object plist)
          if (XSTRING_LENGTH (prop) == 0)
            continue;
 
          if (XSTRING_LENGTH (prop) == 0)
            continue;
 
-         GET_C_STRING_CTEXT_DATA_ALLOCA (prop, extprop);
+         TO_EXTERNAL_FORMAT (LISP_STRING, prop,
+                             C_STRING_ALLOCA, extprop,
+                             Qctext);
          if (STRINGP (val))
            {
              CONST Extbyte *extval;
              Extcount extvallen;
 
          if (STRINGP (val))
            {
              CONST Extbyte *extval;
              Extcount extvallen;
 
-             GET_STRING_CTEXT_DATA_ALLOCA (val, extval, extvallen);
+             TO_EXTERNAL_FORMAT (LISP_STRING, val,
+                                 ALLOCA, (extval, extvallen),
+                                 Qctext);
              XtVaSetValues (w, XtVaTypedArg, extprop,
                             XtRString, extval, extvallen + 1,
                             (XtArgVal) NULL);
              XtVaSetValues (w, XtVaTypedArg, extprop,
                             XtRString, extval, extvallen + 1,
                             (XtArgVal) NULL);
@@ -1103,7 +1109,7 @@ WARNING: can only handle plain/text and file: transfers!
       unsigned int modifier = 0, state = 0;
       char *Ctext;
       int numItems = 0, textlen = 0, pos = 0;
       unsigned int modifier = 0, state = 0;
       char *Ctext;
       int numItems = 0, textlen = 0, pos = 0;
-      struct Lisp_Event *lisp_event = XEVENT(event);
+      Lisp_Event *lisp_event = XEVENT (event);
       Lisp_Object item = Qnil;
       struct gcpro gcpro1;
 
       Lisp_Object item = Qnil;
       struct gcpro gcpro1;
 
@@ -1255,7 +1261,7 @@ x_cde_transfer_callback (Widget widget, XtPointer clientData,
        {
          filePath = transferInfo->dropData->data.files[ii];
          hurl = dnd_url_hexify_string ((char *)filePath, "file:");
        {
          filePath = transferInfo->dropData->data.files[ii];
          hurl = dnd_url_hexify_string ((char *)filePath, "file:");
-          /* ### Mule-izing required */
+          /* #### Mule-izing required */
          l_data = Fcons (make_string ((Bufbyte* )hurl,
                                       strlen (hurl)),
                          l_data);
          l_data = Fcons (make_string ((Bufbyte* )hurl,
                                       strlen (hurl)),
                          l_data);
@@ -1330,7 +1336,7 @@ The type defaults to DndText (4).
       char *dnd_data = NULL;
       unsigned long dnd_len = 0;
       int dnd_typ = DndText, dnd_dealloc = 0;
       char *dnd_data = NULL;
       unsigned long dnd_len = 0;
       int dnd_typ = DndText, dnd_dealloc = 0;
-      struct Lisp_Event *lisp_event = XEVENT(event);
+      Lisp_Event *lisp_event = XEVENT (event);
 
       /* only drag if this is really a press */
       if (EVENT_TYPE(lisp_event) != button_press_event)
 
       /* only drag if this is really a press */
       if (EVENT_TYPE(lisp_event) != button_press_event)
@@ -1866,7 +1872,9 @@ x_create_widgets (struct frame *f, Lisp_Object lisp_window_id,
 #endif
 
   if (STRINGP (f->name))
 #endif
 
   if (STRINGP (f->name))
-    GET_C_STRING_CTEXT_DATA_ALLOCA (f->name, name);
+    TO_EXTERNAL_FORMAT (LISP_STRING, f->name,
+                       C_STRING_ALLOCA, name,
+                       Qctext);
   else
     name = "emacs";
 
   else
     name = "emacs";
 
@@ -2664,7 +2672,7 @@ x_delete_frame (struct frame *f)
 #else
   XtDestroyWidget (FRAME_X_SHELL_WIDGET (f));
   /* make sure the windows are really gone! */
 #else
   XtDestroyWidget (FRAME_X_SHELL_WIDGET (f));
   /* make sure the windows are really gone! */
-  /* ### Is this REALLY necessary? */
+  /* #### Is this REALLY necessary? */
   XFlush (dpy);
 #endif /* EXTERNAL_WIDGET */
 
   XFlush (dpy);
 #endif /* EXTERNAL_WIDGET */
 
index ccdb8ab..a17ea93 100644 (file)
@@ -226,7 +226,7 @@ allocate_frame_core (Lisp_Object device)
        a space), try to find another one.  */
     if (string_char (XSTRING (Fbuffer_name (buf)), 0) == ' ')
       buf = Fother_buffer (buf, Qnil, Qnil);
        a space), try to find another one.  */
     if (string_char (XSTRING (Fbuffer_name (buf)), 0) == ' ')
       buf = Fother_buffer (buf, Qnil, Qnil);
-    Fset_window_buffer (root_window, buf);
+    Fset_window_buffer (root_window, buf, Qnil);
   }
 
   return f;
   }
 
   return f;
@@ -249,7 +249,7 @@ setup_normal_frame (struct frame *f)
   f->has_minibuffer = 1;
 
   XWINDOW (mini_window)->buffer = Qt;
   f->has_minibuffer = 1;
 
   XWINDOW (mini_window)->buffer = Qt;
-  Fset_window_buffer (mini_window, Vminibuffer_zero);
+  Fset_window_buffer (mini_window, Vminibuffer_zero, Qt);
 }
 
 /* Make a frame using a separate minibuffer window on another frame.
 }
 
 /* Make a frame using a separate minibuffer window on another frame.
@@ -286,7 +286,7 @@ setup_frame_without_minibuffer (struct frame *f, Lisp_Object mini_window)
 
   /* Install the chosen minibuffer window, with proper buffer.  */
   store_minibuf_frame_prop (f, mini_window);
 
   /* Install the chosen minibuffer window, with proper buffer.  */
   store_minibuf_frame_prop (f, mini_window);
-  Fset_window_buffer (mini_window, Vminibuffer_zero);
+  Fset_window_buffer (mini_window, Vminibuffer_zero, Qt);
 }
 
 /* Make a frame containing only a minibuffer window.  */
 }
 
 /* Make a frame containing only a minibuffer window.  */
@@ -316,7 +316,7 @@ setup_minibuffer_frame (struct frame *f)
 
   /* Put the proper buffer in that window.  */
 
 
   /* Put the proper buffer in that window.  */
 
-  Fset_window_buffer (mini_window, Vminibuffer_zero);
+  Fset_window_buffer (mini_window, Vminibuffer_zero, Qt);
 }
 
 static Lisp_Object
 }
 
 static Lisp_Object
@@ -1322,7 +1322,9 @@ delete_frame_internal (struct frame *f, int force,
   console = DEVICE_CONSOLE (d);
   con = XCONSOLE (console);
 
   console = DEVICE_CONSOLE (d);
   con = XCONSOLE (console);
 
-  if (!called_from_delete_device)
+  if (!called_from_delete_device &&
+      !(MAYBE_INT_DEVMETH (d, device_implementation_flags, ())
+       & XDEVIMPF_FRAMELESS_OK))
     {
       /* If we're deleting the only non-minibuffer frame on the
         device, delete the device. */
     {
       /* If we're deleting the only non-minibuffer frame on the
         device, delete the device. */
@@ -1508,7 +1510,7 @@ delete_frame_internal (struct frame *f, int force,
                    next_frame_internal (frame, Qt, device,
                                         called_from_delete_device);
                if (NILP (next_f) || EQ (next_f, frame))
                    next_frame_internal (frame, Qt, device,
                                         called_from_delete_device);
                if (NILP (next_f) || EQ (next_f, frame))
-                 ;
+                 set_device_selected_frame (d, Qnil);
                else
                  set_device_selected_frame (d, next_f);
            }
                else
                  set_device_selected_frame (d, next_f);
            }
@@ -1523,7 +1525,7 @@ delete_frame_internal (struct frame *f, int force,
     {
       struct frame *sel_frame = selected_frame ();
       Fset_window_buffer (sel_frame->minibuffer_window,
     {
       struct frame *sel_frame = selected_frame ();
       Fset_window_buffer (sel_frame->minibuffer_window,
-                         XWINDOW (minibuf_window)->buffer);
+                         XWINDOW (minibuf_window)->buffer, Qt);
       minibuf_window = sel_frame->minibuffer_window;
 
       /* If the dying minibuffer window was selected,
       minibuf_window = sel_frame->minibuffer_window;
 
       /* If the dying minibuffer window was selected,
@@ -1929,7 +1931,7 @@ you may do so.
   if (EQ (f->minibuffer_window, minibuf_window))
     {
       Fset_window_buffer (sel_frame->minibuffer_window,
   if (EQ (f->minibuffer_window, minibuf_window))
     {
       Fset_window_buffer (sel_frame->minibuffer_window,
-                         XWINDOW (minibuf_window)->buffer);
+                         XWINDOW (minibuf_window)->buffer, Qt);
       minibuf_window = sel_frame->minibuffer_window;
     }
 
       minibuf_window = sel_frame->minibuffer_window;
     }
 
@@ -1955,7 +1957,7 @@ If omitted, FRAME defaults to the currently selected frame.
   if (EQ (f->minibuffer_window, minibuf_window))
     {
       Fset_window_buffer (sel_frame->minibuffer_window,
   if (EQ (f->minibuffer_window, minibuf_window))
     {
       Fset_window_buffer (sel_frame->minibuffer_window,
-                         XWINDOW (minibuf_window)->buffer);
+                         XWINDOW (minibuf_window)->buffer, Qt);
       minibuf_window = sel_frame->minibuffer_window;
     }
 
       minibuf_window = sel_frame->minibuffer_window;
     }
 
@@ -2142,7 +2144,7 @@ dissect_as_face_setting (Lisp_Object sym, Lisp_Object *face_out,
                         Lisp_Object *face_prop_out)
 {
   Lisp_Object list = Vbuilt_in_face_specifiers;
                         Lisp_Object *face_prop_out)
 {
   Lisp_Object list = Vbuilt_in_face_specifiers;
-  struct Lisp_String *s;
+  Lisp_String *s;
 
   if (!SYMBOLP (sym))
     return 0;
 
   if (!SYMBOLP (sym))
     return 0;
@@ -2152,7 +2154,7 @@ dissect_as_face_setting (Lisp_Object sym, Lisp_Object *face_out,
   while (!NILP (list))
     {
       Lisp_Object prop = Fcar (list);
   while (!NILP (list))
     {
       Lisp_Object prop = Fcar (list);
-      struct Lisp_String *prop_name;
+      Lisp_String *prop_name;
 
       if (!SYMBOLP (prop))
        continue;
 
       if (!SYMBOLP (prop))
        continue;
@@ -2849,14 +2851,16 @@ change_frame_size_1 (struct frame *f, int newheight, int newwidth)
     - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f)
     - 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f);
 
     - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f)
     - 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f);
 
+  new_pixwidth += 2 * f->internal_border_width;
+
   /* Adjust the width for the end glyph which may be a different width
      than the default character width. */
   {
     int adjustment, trunc_width, cont_width;
 
   /* Adjust the width for the end glyph which may be a different width
      than the default character width. */
   {
     int adjustment, trunc_width, cont_width;
 
-    trunc_width = glyph_width (Vtruncation_glyph, 
+    trunc_width = glyph_width (Vtruncation_glyph,
                               FRAME_SELECTED_WINDOW (f));
                               FRAME_SELECTED_WINDOW (f));
-    cont_width = glyph_width (Vcontinuation_glyph, 
+    cont_width = glyph_width (Vcontinuation_glyph,
                              FRAME_SELECTED_WINDOW (f));
     adjustment = max (trunc_width, cont_width);
     adjustment = max (adjustment, font_width);
                              FRAME_SELECTED_WINDOW (f));
     adjustment = max (trunc_width, cont_width);
     adjustment = max (adjustment, font_width);
index c8ec325..93669da 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: FSF 19.30. */
 
 
 /* Synched up with: FSF 19.30. */
 
-#ifndef _XEMACS_FRAME_H_
-#define _XEMACS_FRAME_H_
+#ifndef INCLUDED_frame_h_
+#define INCLUDED_frame_h_
 
 #ifdef HAVE_SCROLLBARS
 #include "scrollbar.h"
 
 #ifdef HAVE_SCROLLBARS
 #include "scrollbar.h"
@@ -779,4 +779,4 @@ void invalidate_vertical_divider_cache_in_frame (struct frame *f);
 
 void init_frame (void);
 
 
 void init_frame (void);
 
-#endif /* _XEMACS_FRAME_H_ */
+#endif /* INCLUDED_frame_h_ */
index 9676b6d..e783a6d 100644 (file)
@@ -44,6 +44,7 @@ Lisp_Object Qbinary;
 Lisp_Object Qbitmap;
 Lisp_Object Qboolean;
 Lisp_Object Qbottom;
 Lisp_Object Qbitmap;
 Lisp_Object Qboolean;
 Lisp_Object Qbottom;
+Lisp_Object Qbottom_margin;
 Lisp_Object Qbuffer;
 Lisp_Object Qbutton;
 Lisp_Object Qcenter;
 Lisp_Object Qbuffer;
 Lisp_Object Qbutton;
 Lisp_Object Qcenter;
@@ -57,6 +58,7 @@ Lisp_Object Qcolumns;
 Lisp_Object Qcommand;
 Lisp_Object Qconsole;
 Lisp_Object Qcritical;
 Lisp_Object Qcommand;
 Lisp_Object Qconsole;
 Lisp_Object Qcritical;
+Lisp_Object Qctext;
 Lisp_Object Qcursor;
 Lisp_Object Qdata;
 Lisp_Object Qdead;
 Lisp_Object Qcursor;
 Lisp_Object Qdata;
 Lisp_Object Qdead;
@@ -67,6 +69,7 @@ Lisp_Object Qdevice;
 Lisp_Object Qdimension;
 Lisp_Object Qdisplay;
 Lisp_Object Qdoc_string;
 Lisp_Object Qdimension;
 Lisp_Object Qdisplay;
 Lisp_Object Qdoc_string;
+Lisp_Object Qduplex;
 Lisp_Object Qdynarr_overhead;
 Lisp_Object Qempty;
 Lisp_Object Qeq;
 Lisp_Object Qdynarr_overhead;
 Lisp_Object Qempty;
 Lisp_Object Qeq;
@@ -75,6 +78,7 @@ Lisp_Object Qequal;
 Lisp_Object Qeval;
 Lisp_Object Qextents;
 Lisp_Object Qface;
 Lisp_Object Qeval;
 Lisp_Object Qextents;
 Lisp_Object Qface;
+Lisp_Object Qfile_name;
 Lisp_Object Qfont;
 Lisp_Object Qframe;
 Lisp_Object Qfunction;
 Lisp_Object Qfont;
 Lisp_Object Qframe;
 Lisp_Object Qfunction;
@@ -95,8 +99,11 @@ Lisp_Object Qinteger;
 Lisp_Object Qinternal;
 Lisp_Object Qkey;
 Lisp_Object Qkey_assoc;
 Lisp_Object Qinternal;
 Lisp_Object Qkey;
 Lisp_Object Qkey_assoc;
+Lisp_Object Qkeyboard;
 Lisp_Object Qkeymap;
 Lisp_Object Qkeymap;
+Lisp_Object Qlandscape;
 Lisp_Object Qleft;
 Lisp_Object Qleft;
+Lisp_Object Qleft_margin;
 Lisp_Object Qlist;
 Lisp_Object Qmagic;
 Lisp_Object Qmalloc_overhead;
 Lisp_Object Qlist;
 Lisp_Object Qmagic;
 Lisp_Object Qmalloc_overhead;
@@ -107,6 +114,7 @@ Lisp_Object Qmessage;
 Lisp_Object Qminus;
 Lisp_Object Qmodifiers;
 Lisp_Object Qmotion;
 Lisp_Object Qminus;
 Lisp_Object Qmodifiers;
 Lisp_Object Qmotion;
+Lisp_Object Qmsprinter;
 Lisp_Object Qmswindows;
 Lisp_Object Qname;
 Lisp_Object Qnone;
 Lisp_Object Qmswindows;
 Lisp_Object Qname;
 Lisp_Object Qnone;
@@ -121,9 +129,11 @@ Lisp_Object Qold_rassoc;
 Lisp_Object Qold_rassq;
 Lisp_Object Qonly;
 Lisp_Object Qor;
 Lisp_Object Qold_rassq;
 Lisp_Object Qonly;
 Lisp_Object Qor;
+Lisp_Object Qorientation;
 Lisp_Object Qother;
 Lisp_Object Qpointer;
 Lisp_Object Qpopup;
 Lisp_Object Qother;
 Lisp_Object Qpointer;
 Lisp_Object Qpopup;
+Lisp_Object Qportrait;
 Lisp_Object Qprint;
 Lisp_Object Qprocess;
 Lisp_Object Qprovide;
 Lisp_Object Qprint;
 Lisp_Object Qprocess;
 Lisp_Object Qprovide;
@@ -134,6 +144,7 @@ Lisp_Object Qresource;
 Lisp_Object Qreturn;
 Lisp_Object Qreverse;
 Lisp_Object Qright;
 Lisp_Object Qreturn;
 Lisp_Object Qreverse;
 Lisp_Object Qright;
+Lisp_Object Qright_margin;
 Lisp_Object Qsearch;
 Lisp_Object Qselected;
 Lisp_Object Qsignal;
 Lisp_Object Qsearch;
 Lisp_Object Qselected;
 Lisp_Object Qsignal;
@@ -145,12 +156,14 @@ Lisp_Object Qstream;
 Lisp_Object Qstring;
 Lisp_Object Qsymbol;
 Lisp_Object Qsyntax;
 Lisp_Object Qstring;
 Lisp_Object Qsymbol;
 Lisp_Object Qsyntax;
+Lisp_Object Qterminal;
 Lisp_Object Qtest;
 Lisp_Object Qtext;
 Lisp_Object Qtimeout;
 Lisp_Object Qtimestamp;
 Lisp_Object Qtoolbar;
 Lisp_Object Qtop;
 Lisp_Object Qtest;
 Lisp_Object Qtext;
 Lisp_Object Qtimeout;
 Lisp_Object Qtimestamp;
 Lisp_Object Qtoolbar;
 Lisp_Object Qtop;
+Lisp_Object Qtop_margin;
 Lisp_Object Qtty;
 Lisp_Object Qtype;
 Lisp_Object Qundecided;
 Lisp_Object Qtty;
 Lisp_Object Qtype;
 Lisp_Object Qundecided;
@@ -182,6 +195,7 @@ syms_of_general (void)
   defsymbol (&Qbitmap, "bitmap");
   defsymbol (&Qboolean, "boolean");
   defsymbol (&Qbottom, "bottom");
   defsymbol (&Qbitmap, "bitmap");
   defsymbol (&Qboolean, "boolean");
   defsymbol (&Qbottom, "bottom");
+  defsymbol (&Qbottom_margin, "bottom-margin");
   defsymbol (&Qbuffer, "buffer");
   defsymbol (&Qbutton, "button");
   defsymbol (&Qcategory, "category");
   defsymbol (&Qbuffer, "buffer");
   defsymbol (&Qbutton, "button");
   defsymbol (&Qcategory, "category");
@@ -195,6 +209,7 @@ syms_of_general (void)
   defsymbol (&Qcommand, "command");
   defsymbol (&Qconsole, "console");
   defsymbol (&Qcritical, "critical");
   defsymbol (&Qcommand, "command");
   defsymbol (&Qconsole, "console");
   defsymbol (&Qcritical, "critical");
+  defsymbol (&Qctext, "ctext");
   defsymbol (&Qcursor, "cursor");
   defsymbol (&Qdata, "data");
   defsymbol (&Qdead, "dead");
   defsymbol (&Qcursor, "cursor");
   defsymbol (&Qdata, "data");
   defsymbol (&Qdead, "dead");
@@ -205,6 +220,7 @@ syms_of_general (void)
   defsymbol (&Qdimension, "dimension");
   defsymbol (&Qdisplay, "display");
   defsymbol (&Qdoc_string, "doc-string");
   defsymbol (&Qdimension, "dimension");
   defsymbol (&Qdisplay, "display");
   defsymbol (&Qdoc_string, "doc-string");
+  defsymbol (&Qduplex, "duplex");
   defsymbol (&Qdynarr_overhead, "dynarr-overhead");
   defsymbol (&Qempty, "empty");
   defsymbol (&Qeq, "eq");
   defsymbol (&Qdynarr_overhead, "dynarr-overhead");
   defsymbol (&Qempty, "empty");
   defsymbol (&Qeq, "eq");
@@ -213,6 +229,7 @@ syms_of_general (void)
   defsymbol (&Qeval, "eval");
   defsymbol (&Qextents, "extents");
   defsymbol (&Qface, "face");
   defsymbol (&Qeval, "eval");
   defsymbol (&Qextents, "extents");
   defsymbol (&Qface, "face");
+  defsymbol (&Qfile_name, "file-name");
   defsymbol (&Qfont, "font");
   defsymbol (&Qframe, "frame");
   defsymbol (&Qfunction, "function");
   defsymbol (&Qfont, "font");
   defsymbol (&Qframe, "frame");
   defsymbol (&Qfunction, "function");
@@ -233,8 +250,11 @@ syms_of_general (void)
   defsymbol (&Qinternal, "internal");
   defsymbol (&Qkey, "key");
   defsymbol (&Qkey_assoc, "key-assoc");
   defsymbol (&Qinternal, "internal");
   defsymbol (&Qkey, "key");
   defsymbol (&Qkey_assoc, "key-assoc");
+  defsymbol (&Qkeyboard, "keyboard");
   defsymbol (&Qkeymap, "keymap");
   defsymbol (&Qkeymap, "keymap");
+  defsymbol (&Qlandscape, "landscape");
   defsymbol (&Qleft, "left");
   defsymbol (&Qleft, "left");
+  defsymbol (&Qleft_margin, "left-margin");
   defsymbol (&Qlist, "list");
   defsymbol (&Qmagic, "magic");
   defsymbol (&Qmalloc_overhead, "malloc-overhead");
   defsymbol (&Qlist, "list");
   defsymbol (&Qmagic, "magic");
   defsymbol (&Qmalloc_overhead, "malloc-overhead");
@@ -245,6 +265,7 @@ syms_of_general (void)
   defsymbol (&Qminus, "-");
   defsymbol (&Qmodifiers, "modifiers");
   defsymbol (&Qmotion, "motion");
   defsymbol (&Qminus, "-");
   defsymbol (&Qmodifiers, "modifiers");
   defsymbol (&Qmotion, "motion");
+  defsymbol (&Qmsprinter, "msprinter");
   defsymbol (&Qmswindows, "mswindows");
   defsymbol (&Qname, "name");
   defsymbol (&Qnone, "none");
   defsymbol (&Qmswindows, "mswindows");
   defsymbol (&Qname, "name");
   defsymbol (&Qnone, "none");
@@ -259,9 +280,11 @@ syms_of_general (void)
   defsymbol (&Qold_rassq, "old-rassq");
   defsymbol (&Qonly, "only");
   defsymbol (&Qor, "or");
   defsymbol (&Qold_rassq, "old-rassq");
   defsymbol (&Qonly, "only");
   defsymbol (&Qor, "or");
+  defsymbol (&Qorientation, "orientation");
   defsymbol (&Qother, "other");
   defsymbol (&Qpointer, "pointer");
   defsymbol (&Qpopup, "popup");
   defsymbol (&Qother, "other");
   defsymbol (&Qpointer, "pointer");
   defsymbol (&Qpopup, "popup");
+  defsymbol (&Qportrait, "portrait");
   defsymbol (&Qprint, "print");
   defsymbol (&Qprocess, "process");
   defsymbol (&Qprovide, "provide");
   defsymbol (&Qprint, "print");
   defsymbol (&Qprocess, "process");
   defsymbol (&Qprovide, "provide");
@@ -272,6 +295,7 @@ syms_of_general (void)
   defsymbol (&Qreturn, "return");
   defsymbol (&Qreverse, "reverse");
   defsymbol (&Qright, "right");
   defsymbol (&Qreturn, "return");
   defsymbol (&Qreverse, "reverse");
   defsymbol (&Qright, "right");
+  defsymbol (&Qright_margin, "right-margin");
   defsymbol (&Qsearch, "search");
   defsymbol (&Qselected, "selected");
   defsymbol (&Qsignal, "signal");
   defsymbol (&Qsearch, "search");
   defsymbol (&Qselected, "selected");
   defsymbol (&Qsignal, "signal");
@@ -283,12 +307,14 @@ syms_of_general (void)
   defsymbol (&Qstring, "string");
   defsymbol (&Qsymbol, "symbol");
   defsymbol (&Qsyntax, "syntax");
   defsymbol (&Qstring, "string");
   defsymbol (&Qsymbol, "symbol");
   defsymbol (&Qsyntax, "syntax");
+  defsymbol (&Qterminal, "terminal");
   defsymbol (&Qtest, "test");
   defsymbol (&Qtext, "text");
   defsymbol (&Qtimeout, "timeout");
   defsymbol (&Qtimestamp, "timestamp");
   defsymbol (&Qtoolbar, "toolbar");
   defsymbol (&Qtop, "top");
   defsymbol (&Qtest, "test");
   defsymbol (&Qtext, "text");
   defsymbol (&Qtimeout, "timeout");
   defsymbol (&Qtimestamp, "timestamp");
   defsymbol (&Qtoolbar, "toolbar");
   defsymbol (&Qtop, "top");
+  defsymbol (&Qtop_margin, "top-margin");
   defsymbol (&Qtty, "tty");
   defsymbol (&Qtype, "type");
   defsymbol (&Qundecided, "undecided");
   defsymbol (&Qtty, "tty");
   defsymbol (&Qtype, "type");
   defsymbol (&Qundecided, "undecided");
index 98de5bb..af003aa 100644 (file)
@@ -768,31 +768,6 @@ getloadavg (double loadavg[], int nelem)
     loadavg[elem++] = load_info.fifteen_minute;
 #endif /* DGUX */
 
     loadavg[elem++] = load_info.fifteen_minute;
 #endif /* DGUX */
 
-#if !defined (LDAV_DONE) && defined (apollo)
-#define LDAV_DONE
-/* Apollo code from lisch@mentorg.com (Ray Lischner).
-
-   This system call is not documented.  The load average is obtained as
-   three long integers, for the load average over the past minute,
-   five minutes, and fifteen minutes.  Each value is a scaled integer,
-   with 16 bits of integer part and 16 bits of fraction part.
-
-   I'm not sure which operating system first supported this system call,
-   but I know that SR10.2 supports it.  */
-
-  extern void proc1_$get_loadav ();
-  unsigned long load_ave[3];
-
-  proc1_$get_loadav (load_ave);
-
-  if (nelem > 0)
-    loadavg[elem++] = load_ave[0] / 65536.0;
-  if (nelem > 1)
-    loadavg[elem++] = load_ave[1] / 65536.0;
-  if (nelem > 2)
-    loadavg[elem++] = load_ave[2] / 65536.0;
-#endif /* apollo */
-
 #if !defined (LDAV_DONE) && defined (OSF_MIPS)
 #define LDAV_DONE
 
 #if !defined (LDAV_DONE) && defined (OSF_MIPS)
 #define LDAV_DONE
 
index afef122..ae694dd 100644 (file)
@@ -17,6 +17,9 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: FSF 19.30. */
 
 
 /* Synched up with: FSF 19.30. */
 
+#ifndef INCLUDED_getpagesize_h_
+#define INCLUDED_getpagesize_h_
+
 /* Emulate getpagesize on systems that lack it.  */
 
 #if 0
 /* Emulate getpagesize on systems that lack it.  */
 
 #if 0
@@ -64,3 +67,4 @@ static size_t getpagesize() { return( 4096 ); }
 #endif /* _SC_PAGESIZE */
 #endif /* not HAVE_GETPAGESIZE */
 
 #endif /* _SC_PAGESIZE */
 #endif /* not HAVE_GETPAGESIZE */
 
+#endif /* INCLUDED_getpagesize_h_ */
index 7532001..292a5a4 100644 (file)
@@ -14,8 +14,8 @@
 * 19 Jan 98 - Version 3.1 by Jareth Hein (Support for user-defined I/O).      *
 ******************************************************************************/
 
 * 19 Jan 98 - Version 3.1 by Jareth Hein (Support for user-defined I/O).      *
 ******************************************************************************/
 
-#ifndef GIF_LIB_H
-#define GIF_LIB_H
+#ifndef INCLUDED_gifrlib_h_
+#define INCLUDED_gifrlib_h_
 
 #define        GIF_ERROR       0
 #define GIF_OK         1
 
 #define        GIF_ERROR       0
 #define GIF_OK         1
@@ -264,5 +264,4 @@ int GifStdFileClose(VoidPtr method_data);
 ColorMapObject *MakeMapObject(int ColorCount, GifColorType *ColorMap);
 void FreeMapObject(ColorMapObject *Object);
 
 ColorMapObject *MakeMapObject(int ColorCount, GifColorType *ColorMap);
 void FreeMapObject(ColorMapObject *Object);
 
-
-#endif /* GIF_LIB_H */
+#endif /* INCLUDED_gifrlib_h_ */
index 0cb977a..970038d 100644 (file)
@@ -314,7 +314,7 @@ jpeg_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                  Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                  int dest_mask, Lisp_Object domain)
 {
                  Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                  int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   /* It is OK for the unwind data to be local to this function,
      because the unwind-protect is always executed when this
      stack frame is still valid. */
   /* It is OK for the unwind data to be local to this function,
      because the unwind-protect is always executed when this
      stack frame is still valid. */
@@ -378,7 +378,7 @@ jpeg_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
     /* #### This is a definite problem under Mule due to the amount of
        stack data it might allocate.  Need to be able to convert and
        write out to a file. */
     /* #### This is a definite problem under Mule due to the amount of
        stack data it might allocate.  Need to be able to convert and
        write out to a file. */
-    GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len);
+    TO_EXTERNAL_FORMAT (LISP_STRING, data, ALLOCA, (bytes, len), Qbinary);
     jpeg_memory_src (&cinfo, (JOCTET *) bytes, len);
   }
 
     jpeg_memory_src (&cinfo, (JOCTET *) bytes, len);
   }
 
@@ -599,7 +599,7 @@ gif_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                 int dest_mask, Lisp_Object domain)
 {
                 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                 int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   /* It is OK for the unwind data to be local to this function,
      because the unwind-protect is always executed when this
      stack frame is still valid. */
   /* It is OK for the unwind data to be local to this function,
      because the unwind-protect is always executed when this
      stack frame is still valid. */
@@ -623,7 +623,7 @@ gif_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
     assert (!NILP (data));
 
     if (!(unwind.giffile = GifSetup()))
     assert (!NILP (data));
 
     if (!(unwind.giffile = GifSetup()))
-      signal_image_error ("Insufficent memory to instantiate GIF image", instantiator);
+      signal_image_error ("Insufficient memory to instantiate GIF image", instantiator);
 
     /* set up error facilities */
     if (setjmp(gif_err.setjmp_buffer))
 
     /* set up error facilities */
     if (setjmp(gif_err.setjmp_buffer))
@@ -636,7 +636,7 @@ gif_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
       }
     GifSetErrorFunc(unwind.giffile, (Gif_error_func)gif_error_func, (VoidPtr)&gif_err);
 
       }
     GifSetErrorFunc(unwind.giffile, (Gif_error_func)gif_error_func, (VoidPtr)&gif_err);
 
-    GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len);
+    TO_EXTERNAL_FORMAT (LISP_STRING, data, ALLOCA, (bytes, len), Qbinary);
     mem_struct.bytes = bytes;
     mem_struct.len = len;
     mem_struct.index = 0;
     mem_struct.bytes = bytes;
     mem_struct.len = len;
     mem_struct.index = 0;
@@ -844,7 +844,7 @@ png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                 int dest_mask, Lisp_Object domain)
 {
                 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                 int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   struct png_unwind_data unwind;
   int speccount = specpdl_depth ();
   int height, width;
   struct png_unwind_data unwind;
   int speccount = specpdl_depth ();
   int height, width;
@@ -900,7 +900,7 @@ png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 
     /* #### This is a definite problem under Mule due to the amount of
        stack data it might allocate.  Need to think about using Lstreams */
 
     /* #### This is a definite problem under Mule due to the amount of
        stack data it might allocate.  Need to think about using Lstreams */
-    GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len);
+    TO_EXTERNAL_FORMAT (LISP_STRING, data, ALLOCA, (bytes, len), Qbinary);
     tbr.bytes = bytes;
     tbr.len = len;
     tbr.index = 0;
     tbr.bytes = bytes;
     tbr.len = len;
     tbr.index = 0;
@@ -942,7 +942,7 @@ png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
        }
       else
        {
        }
       else
        {
-         struct Lisp_Color_Instance *c;
+         Lisp_Color_Instance *c;
          Lisp_Object rgblist;
 
          c = XCOLOR_INSTANCE (bkgd);
          Lisp_Object rgblist;
 
          c = XCOLOR_INSTANCE (bkgd);
@@ -1212,7 +1212,7 @@ tiff_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                  Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                  int dest_mask, Lisp_Object domain)
 {
                  Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                  int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   tiff_memory_storage mem_struct;
   /* It is OK for the unwind data to be local to this function,
      because the unwind-protect is always executed when this
   tiff_memory_storage mem_struct;
   /* It is OK for the unwind data to be local to this function,
      because the unwind-protect is always executed when this
@@ -1247,7 +1247,9 @@ tiff_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 
     /* #### This is a definite problem under Mule due to the amount of
        stack data it might allocate.  Think about Lstreams... */
 
     /* #### This is a definite problem under Mule due to the amount of
        stack data it might allocate.  Think about Lstreams... */
-    GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len);
+    TO_EXTERNAL_FORMAT (LISP_STRING, data,
+                       ALLOCA, (bytes, len),
+                       Qbinary);
     mem_struct.bytes = bytes;
     mem_struct.len = len;
     mem_struct.index = 0;
     mem_struct.bytes = bytes;
     mem_struct.len = len;
     mem_struct.index = 0;
@@ -1258,13 +1260,13 @@ tiff_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                                  tiff_memory_seek, tiff_memory_close, tiff_memory_size,
                                  tiff_map_noop, tiff_unmap_noop);
     if (!unwind.tiff)
                                  tiff_memory_seek, tiff_memory_close, tiff_memory_size,
                                  tiff_map_noop, tiff_unmap_noop);
     if (!unwind.tiff)
-      signal_image_error ("Insufficent memory to instantiate TIFF image", instantiator);
+      signal_image_error ("Insufficient memory to instantiate TIFF image", instantiator);
 
     TIFFGetField (unwind.tiff, TIFFTAG_IMAGEWIDTH, &width);
     TIFFGetField (unwind.tiff, TIFFTAG_IMAGELENGTH, &height);
     unwind.eimage = (unsigned char *) xmalloc (width * height * 3);
 
 
     TIFFGetField (unwind.tiff, TIFFTAG_IMAGEWIDTH, &width);
     TIFFGetField (unwind.tiff, TIFFTAG_IMAGELENGTH, &height);
     unwind.eimage = (unsigned char *) xmalloc (width * height * 3);
 
-    /* ### This is little more than proof-of-concept/function testing.
+    /* #### This is little more than proof-of-concept/function testing.
        It needs to be reimplemented via scanline reads for both memory
        compactness. */
     raster = (uint32*) _TIFFmalloc (width * height * sizeof (uint32));
        It needs to be reimplemented via scanline reads for both memory
        compactness. */
     raster = (uint32*) _TIFFmalloc (width * height * sizeof (uint32));
index cbe62a1..609b167 100644 (file)
@@ -98,15 +98,13 @@ Lisp_Object Q_resource_type, Q_resource_id;
 Lisp_Object Qmswindows_resource;
 
 static void
 Lisp_Object Qmswindows_resource;
 
 static void
-mswindows_initialize_dibitmap_image_instance (struct Lisp_Image_Instance *ii,
+mswindows_initialize_dibitmap_image_instance (Lisp_Image_Instance *ii,
                                             int slices,
                                             enum image_instance_type type);
 static void
                                             int slices,
                                             enum image_instance_type type);
 static void
-mswindows_initialize_image_instance_mask (struct Lisp_Image_Instance* image,
+mswindows_initialize_image_instance_mask (Lisp_Image_Instance* image,
                                          struct frame* f);
 
                                          struct frame* f);
 
-COLORREF mswindows_string_to_color (CONST char *name);
-
 #define BPLINE(width) ((int)(~3UL & (unsigned long)((width) +3)))
 
 /************************************************************************/
 #define BPLINE(width) ((int)(~3UL & (unsigned long)((width) +3)))
 
 /************************************************************************/
@@ -259,7 +257,7 @@ mswindows_locate_pixmap_file (Lisp_Object name)
         (IS_DIRECTORY_SEP(XSTRING_BYTE (name, 2)))))))
     {
       if (!NILP (Ffile_readable_p (name)))
         (IS_DIRECTORY_SEP(XSTRING_BYTE (name, 2)))))))
     {
       if (!NILP (Ffile_readable_p (name)))
-       return name;
+       return Fexpand_file_name (name, Qnil);
       else
        return Qnil;
     }
       else
        return Qnil;
     }
@@ -286,7 +284,7 @@ mswindows_locate_pixmap_file (Lisp_Object name)
    in the error message. */
 
 static void
    in the error message. */
 
 static void
-init_image_instance_from_dibitmap (struct Lisp_Image_Instance *ii,
+init_image_instance_from_dibitmap (Lisp_Image_Instance *ii,
                                   BITMAPINFO *bmp_info,
                                   int dest_mask,
                                   void *bmp_data,
                                   BITMAPINFO *bmp_info,
                                   int dest_mask,
                                   void *bmp_data,
@@ -360,7 +358,7 @@ init_image_instance_from_dibitmap (struct Lisp_Image_Instance *ii,
 }
 
 static void
 }
 
 static void
-image_instance_add_dibitmap (struct Lisp_Image_Instance *ii,
+image_instance_add_dibitmap (Lisp_Image_Instance *ii,
                             BITMAPINFO *bmp_info,
                             void *bmp_data,
                             int bmp_bits,
                             BITMAPINFO *bmp_info,
                             void *bmp_data,
                             int bmp_bits,
@@ -387,7 +385,7 @@ image_instance_add_dibitmap (struct Lisp_Image_Instance *ii,
 }
 
 static void
 }
 
 static void
-mswindows_init_image_instance_from_eimage (struct Lisp_Image_Instance *ii,
+mswindows_init_image_instance_from_eimage (Lisp_Image_Instance *ii,
                                           int width, int height,
                                           int slices,
                                           unsigned char *eimage,
                                           int width, int height,
                                           int slices,
                                           unsigned char *eimage,
@@ -454,7 +452,7 @@ static void set_mono_pixel ( unsigned char* bits,
 }
 
 static void
 }
 
 static void
-mswindows_initialize_image_instance_mask (struct Lisp_Image_Instance* image,
+mswindows_initialize_image_instance_mask (Lisp_Image_Instance* image,
                                          struct frame* f)
 {
   HBITMAP mask;
                                          struct frame* f)
 {
   HBITMAP mask;
@@ -565,7 +563,7 @@ mswindows_initialize_image_instance_mask (struct Lisp_Image_Instance* image,
 }
 
 void
 }
 
 void
-mswindows_initialize_image_instance_icon (struct Lisp_Image_Instance* image,
+mswindows_initialize_image_instance_icon (Lisp_Image_Instance* image,
                                          int cursor)
 {
   ICONINFO x_icon;
                                          int cursor)
 {
   ICONINFO x_icon;
@@ -582,7 +580,7 @@ mswindows_initialize_image_instance_icon (struct Lisp_Image_Instance* image,
 }
 
 HBITMAP
 }
 
 HBITMAP
-mswindows_create_resized_bitmap (struct Lisp_Image_Instance* ii,
+mswindows_create_resized_bitmap (Lisp_Image_Instance* ii,
                                 struct frame* f,
                                 int newx, int newy)
 {
                                 struct frame* f,
                                 int newx, int newy)
 {
@@ -616,7 +614,7 @@ mswindows_create_resized_bitmap (struct Lisp_Image_Instance* ii,
 }
 
 HBITMAP
 }
 
 HBITMAP
-mswindows_create_resized_mask (struct Lisp_Image_Instance* ii,
+mswindows_create_resized_mask (Lisp_Image_Instance* ii,
                               struct frame* f,
                               int newx, int newy)
 {
                               struct frame* f,
                               int newx, int newy)
 {
@@ -654,7 +652,7 @@ mswindows_create_resized_mask (struct Lisp_Image_Instance* ii,
 }
 
 int
 }
 
 int
-mswindows_resize_dibitmap_instance (struct Lisp_Image_Instance* ii,
+mswindows_resize_dibitmap_instance (Lisp_Image_Instance* ii,
                                    struct frame* f,
                                    int newx, int newy)
 {
                                    struct frame* f,
                                    int newx, int newy)
 {
@@ -742,7 +740,9 @@ extract_xpm_color_names (Lisp_Object device,
       colortbl[j].color =
        COLOR_INSTANCE_MSWINDOWS_COLOR (XCOLOR_INSTANCE (XCDR (cons)));
 
       colortbl[j].color =
        COLOR_INSTANCE_MSWINDOWS_COLOR (XCOLOR_INSTANCE (XCDR (cons)));
 
-      GET_C_STRING_OS_DATA_ALLOCA (XCAR (cons), colortbl[j].name);
+      TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (cons),
+                         C_STRING_ALLOCA, colortbl[j].name,
+                         Qnative);
       colortbl[j].name = xstrdup (colortbl[j].name); /* mustn't lose this when we return */
       free_cons (XCONS (cons));
       cons = results;
       colortbl[j].name = xstrdup (colortbl[j].name); /* mustn't lose this when we return */
       free_cons (XCONS (cons));
       cons = results;
@@ -906,7 +906,7 @@ mswindows_xpm_instantiate (Lisp_Object image_instance,
                           Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                           int dest_mask, Lisp_Object domain)
 {
                           Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                           int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   CONST Extbyte                *bytes;
   Extcount             len;
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   CONST Extbyte                *bytes;
   Extcount             len;
@@ -927,7 +927,9 @@ mswindows_xpm_instantiate (Lisp_Object image_instance,
 
   assert (!NILP (data));
 
 
   assert (!NILP (data));
 
-  GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len);
+  TO_EXTERNAL_FORMAT (LISP_STRING, data,
+                     ALLOCA, (bytes, len),
+                     Qbinary);
 
   /* in case we have color symbols */
   color_symbols = extract_xpm_color_names (device, domain,
 
   /* in case we have color symbols */
   color_symbols = extract_xpm_color_names (device, domain,
@@ -996,7 +998,7 @@ bmp_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                 int dest_mask, Lisp_Object domain)
 {
                 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                 int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   CONST Extbyte                *bytes;
   Extcount             len;
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   CONST Extbyte                *bytes;
   Extcount             len;
@@ -1011,7 +1013,9 @@ bmp_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 
   assert (!NILP (data));
 
 
   assert (!NILP (data));
 
-  GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len);
+  TO_EXTERNAL_FORMAT (LISP_STRING, data,
+                     ALLOCA, (bytes, len),
+                     Qbinary);
 
   /* Then slurp the image into memory, decoding along the way.
      The result is the image in a simple one-byte-per-pixel
 
   /* Then slurp the image into memory, decoding along the way.
      The result is the image in a simple one-byte-per-pixel
@@ -1185,7 +1189,9 @@ static int resource_name_to_resource (Lisp_Object name, int type)
 
   do {
     Extbyte* nm=0;
 
   do {
     Extbyte* nm=0;
-    GET_C_STRING_OS_DATA_ALLOCA (name, nm);
+    TO_EXTERNAL_FORMAT (LISP_STRING, name,
+                       C_STRING_ALLOCA, nm,
+                       Qnative);
       if (!strcasecmp ((char*)res->name, nm))
       return res->resource_id;
   } while ((++res)->name);
       if (!strcasecmp ((char*)res->name, nm))
       return res->resource_id;
   } while ((++res)->name);
@@ -1210,7 +1216,7 @@ mswindows_resource_instantiate (Lisp_Object image_instance, Lisp_Object instanti
                    Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                    int dest_mask, Lisp_Object domain)
 {
                    Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                    int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   unsigned int type = 0;
   HANDLE himage = NULL;
   LPCTSTR resid=0;
   unsigned int type = 0;
   HANDLE himage = NULL;
   LPCTSTR resid=0;
@@ -1245,7 +1251,9 @@ mswindows_resource_instantiate (Lisp_Object image_instance, Lisp_Object instanti
   if (!NILP (file))
     {
       Extbyte* f=0;
   if (!NILP (file))
     {
       Extbyte* f=0;
-      GET_C_STRING_FILENAME_DATA_ALLOCA (file, f);
+      TO_EXTERNAL_FORMAT (LISP_STRING, file,
+                         C_STRING_ALLOCA, f,
+                         Qfile_name);
 #ifdef __CYGWIN32__
       CYGWIN_WIN32_PATH (f, fname);
 #else
 #ifdef __CYGWIN32__
       CYGWIN_WIN32_PATH (f, fname);
 #else
@@ -1262,7 +1270,9 @@ mswindows_resource_instantiate (Lisp_Object image_instance, Lisp_Object instanti
                                                           type));
 
          if (!resid)
                                                           type));
 
          if (!resid)
-           GET_C_STRING_OS_DATA_ALLOCA (resource_id, resid);
+           TO_EXTERNAL_FORMAT (LISP_STRING, resource_id,
+                               C_STRING_ALLOCA, resid,
+                               Qnative);
        }
     }
   else if (!(resid = MAKEINTRESOURCE (resource_name_to_resource (resource_id,
        }
     }
   else if (!(resid = MAKEINTRESOURCE (resource_name_to_resource (resource_id,
@@ -1711,7 +1721,7 @@ xbm_create_bitmap_from_data (HDC hdc, char *data,
    image instance accordingly. */
 
 static void
    image instance accordingly. */
 
 static void
-init_image_instance_from_xbm_inline (struct Lisp_Image_Instance *ii,
+init_image_instance_from_xbm_inline (Lisp_Image_Instance *ii,
                                     int width, int height,
                                     /* Note that data is in ext-format! */
                                     CONST char *bits,
                                     int width, int height,
                                     /* Note that data is in ext-format! */
                                     CONST char *bits,
@@ -1847,25 +1857,26 @@ xbm_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator,
 {
   Lisp_Object mask_data = find_keyword_in_vector (instantiator, Q_mask_data);
   Lisp_Object mask_file = find_keyword_in_vector (instantiator, Q_mask_file);
 {
   Lisp_Object mask_data = find_keyword_in_vector (instantiator, Q_mask_data);
   Lisp_Object mask_file = find_keyword_in_vector (instantiator, Q_mask_file);
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   struct frame* f = XFRAME (DEVICE_SELECTED_FRAME
                            (XDEVICE (IMAGE_INSTANCE_DEVICE (ii))));
   HDC hdc = FRAME_MSWINDOWS_CDC (f);
   HBITMAP mask = 0;
   struct frame* f = XFRAME (DEVICE_SELECTED_FRAME
                            (XDEVICE (IMAGE_INSTANCE_DEVICE (ii))));
   HDC hdc = FRAME_MSWINDOWS_CDC (f);
   HBITMAP mask = 0;
-  CONST char *gcc_may_you_rot_in_hell;
 
   if (!NILP (mask_data))
     {
 
   if (!NILP (mask_data))
     {
-      GET_C_STRING_BINARY_DATA_ALLOCA (XCAR (XCDR (XCDR (mask_data))),
-                                      gcc_may_you_rot_in_hell);
-      mask =
-       xbm_create_bitmap_from_data ( hdc,
-                                     (unsigned char *)
-                                     gcc_may_you_rot_in_hell,
-                                     XINT (XCAR (mask_data)),
-                                     XINT (XCAR (XCDR (mask_data))), FALSE,
-                                     PALETTERGB (0,0,0),
-                                     PALETTERGB (255,255,255));
+      CONST char *ext_data;
+
+      TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (XCDR (XCDR (mask_data))),
+                         C_STRING_ALLOCA, ext_data,
+                         Qbinary);
+      mask = xbm_create_bitmap_from_data (hdc,
+                                         (unsigned char *) ext_data,
+                                         XINT (XCAR (mask_data)),
+                                         XINT (XCAR (XCDR (mask_data))),
+                                         FALSE,
+                                         PALETTERGB (0,0,0),
+                                         PALETTERGB (255,255,255));
     }
 
   init_image_instance_from_xbm_inline (ii, width, height, bits,
     }
 
   init_image_instance_from_xbm_inline (ii, width, height, bits,
@@ -1882,16 +1893,17 @@ mswindows_xbm_instantiate (Lisp_Object image_instance,
                           int dest_mask, Lisp_Object domain)
 {
   Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
                           int dest_mask, Lisp_Object domain)
 {
   Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
-  CONST char *gcc_go_home;
+  CONST char *ext_data;
 
   assert (!NILP (data));
 
 
   assert (!NILP (data));
 
-  GET_C_STRING_BINARY_DATA_ALLOCA (XCAR (XCDR (XCDR (data))),
-                                  gcc_go_home);
+  TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (XCDR (XCDR (data))),
+                     C_STRING_ALLOCA, ext_data,
+                     Qbinary);
 
   xbm_instantiate_1 (image_instance, instantiator, pointer_fg,
                     pointer_bg, dest_mask, XINT (XCAR (data)),
 
   xbm_instantiate_1 (image_instance, instantiator, pointer_fg,
                     pointer_bg, dest_mask, XINT (XCAR (data)),
-                    XINT (XCAR (XCDR (data))), gcc_go_home);
+                    XINT (XCAR (XCDR (data))), ext_data);
 }
 
 #ifdef HAVE_XFACE
 }
 
 #ifdef HAVE_XFACE
@@ -1931,7 +1943,9 @@ mswindows_xface_instantiate (Lisp_Object image_instance, Lisp_Object instantiato
 
   assert (!NILP (data));
 
 
   assert (!NILP (data));
 
-  GET_C_STRING_BINARY_DATA_ALLOCA (data, dstring);
+  TO_EXTERNAL_FORMAT (LISP_STRING, data,
+                     C_STRING_ALLOCA, dstring,
+                     Qbinary);
 
   if ((p = strchr (dstring, ':')))
     {
 
   if ((p = strchr (dstring, ':')))
     {
@@ -1987,7 +2001,7 @@ mswindows_xface_instantiate (Lisp_Object image_instance, Lisp_Object instantiato
 /************************************************************************/
 
 static void
 /************************************************************************/
 
 static void
-mswindows_print_image_instance (struct Lisp_Image_Instance *p,
+mswindows_print_image_instance (Lisp_Image_Instance *p,
                                Lisp_Object printcharfun,
                                int escapeflag)
 {
                                Lisp_Object printcharfun,
                                int escapeflag)
 {
@@ -2020,7 +2034,7 @@ extern int debug_widget_instances;
 #endif
 
 static void
 #endif
 
 static void
-mswindows_finalize_image_instance (struct Lisp_Image_Instance *p)
+mswindows_finalize_image_instance (Lisp_Image_Instance *p)
 {
   if (DEVICE_LIVE_P (XDEVICE (p->device)))
     {
 {
   if (DEVICE_LIVE_P (XDEVICE (p->device)))
     {
@@ -2076,10 +2090,23 @@ mswindows_finalize_image_instance (struct Lisp_Image_Instance *p)
 /*                      subwindow and widget support                      */
 /************************************************************************/
 
 /*                      subwindow and widget support                      */
 /************************************************************************/
 
+static HFONT
+mswindows_widget_hfont (Lisp_Image_Instance *p,
+                       Lisp_Object domain)
+{
+  Lisp_Object face = IMAGE_INSTANCE_WIDGET_FACE (p);
+  int under = FACE_UNDERLINE_P (face, domain);
+  int strike = FACE_STRIKETHRU_P (face, domain);
+  Lisp_Object font = query_string_font (IMAGE_INSTANCE_WIDGET_TEXT (p),
+                                       face, domain);
+
+  return mswindows_get_hfont (XFONT_INSTANCE (font), under, strike);
+}
+
 /* unmap the image if it is a widget. This is used by redisplay via
    redisplay_unmap_subwindows */
 static void
 /* unmap the image if it is a widget. This is used by redisplay via
    redisplay_unmap_subwindows */
 static void
-mswindows_unmap_subwindow (struct Lisp_Image_Instance *p)
+mswindows_unmap_subwindow (Lisp_Image_Instance *p)
 {
   if (IMAGE_INSTANCE_SUBWINDOW_ID (p))
     {
 {
   if (IMAGE_INSTANCE_SUBWINDOW_ID (p))
     {
@@ -2088,16 +2115,17 @@ mswindows_unmap_subwindow (struct Lisp_Image_Instance *p)
                    0, 0, 0, 0,
                    SWP_HIDEWINDOW | SWP_NOMOVE | SWP_NOSIZE
                    | SWP_NOSENDCHANGING);
                    0, 0, 0, 0,
                    SWP_HIDEWINDOW | SWP_NOMOVE | SWP_NOSIZE
                    | SWP_NOSENDCHANGING);
+      if (GetFocus() == WIDGET_INSTANCE_MSWINDOWS_HANDLE (p))
+       SetFocus (GetParent (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p)));
     }
 }
 
 /* map the subwindow. This is used by redisplay via
    redisplay_output_subwindow */
 static void
     }
 }
 
 /* map the subwindow. This is used by redisplay via
    redisplay_output_subwindow */
 static void
-mswindows_map_subwindow (struct Lisp_Image_Instance *p, int x, int y,
+mswindows_map_subwindow (Lisp_Image_Instance *p, int x, int y,
                         struct display_glyph_area* dga)
 {
                         struct display_glyph_area* dga)
 {
-      SetFocus (GetParent (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p)));
   /* move the window before mapping it ... */
   SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p),
                NULL,
   /* move the window before mapping it ... */
   SetWindowPos (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (p),
                NULL,
@@ -2121,7 +2149,7 @@ mswindows_map_subwindow (struct Lisp_Image_Instance *p, int x, int y,
 
 /* resize the subwindow instance */
 static void
 
 /* resize the subwindow instance */
 static void
-mswindows_resize_subwindow (struct Lisp_Image_Instance* ii, int w, int h)
+mswindows_resize_subwindow (Lisp_Image_Instance* ii, int w, int h)
 {
   /* Set the size of the control .... */
   SetWindowPos (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii),
 {
   /* Set the size of the control .... */
   SetWindowPos (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii),
@@ -2134,7 +2162,7 @@ mswindows_resize_subwindow (struct Lisp_Image_Instance* ii, int w, int h)
 /* when you click on a widget you may activate another widget this
    needs to be checked and all appropriate widgets updated */
 static void
 /* when you click on a widget you may activate another widget this
    needs to be checked and all appropriate widgets updated */
 static void
-mswindows_update_subwindow (struct Lisp_Image_Instance *p)
+mswindows_update_subwindow (Lisp_Image_Instance *p)
 {
   /* Now do widget specific updates. */
   if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET)
 {
   /* Now do widget specific updates. */
   if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET)
@@ -2153,11 +2181,8 @@ mswindows_update_subwindow (struct Lisp_Image_Instance *p)
       /* set the widget font from the widget face */
       SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p),
                   WM_SETFONT,
       /* set the widget font from the widget face */
       SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p),
                   WM_SETFONT,
-                  (WPARAM)FONT_INSTANCE_MSWINDOWS_HFONT
-                  (XFONT_INSTANCE (query_string_font 
-                                   (IMAGE_INSTANCE_WIDGET_TEXT (p),
-                                    IMAGE_INSTANCE_WIDGET_FACE (p),
-                                    IMAGE_INSTANCE_SUBWINDOW_FRAME (p)))),
+                  (WPARAM) mswindows_widget_hfont
+                       (p, IMAGE_INSTANCE_SUBWINDOW_FRAME (p)),
                   MAKELPARAM (TRUE, 0));
     }
 }
                   MAKELPARAM (TRUE, 0));
     }
 }
@@ -2191,7 +2216,7 @@ mswindows_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instant
                                 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                                 int dest_mask, Lisp_Object domain)
 {
                                 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                                 int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   struct device* d = XDEVICE (device);
   Lisp_Object frame = FW_FRAME (domain);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   struct device* d = XDEVICE (device);
   Lisp_Object frame = FW_FRAME (domain);
@@ -2243,8 +2268,8 @@ mswindows_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instant
 }
 
 static int
 }
 
 static int
-mswindows_image_instance_equal (struct Lisp_Image_Instance *p1,
-                               struct Lisp_Image_Instance *p2, int depth)
+mswindows_image_instance_equal (Lisp_Image_Instance *p1,
+                               Lisp_Image_Instance *p2, int depth)
 {
   switch (IMAGE_INSTANCE_TYPE (p1))
     {
 {
   switch (IMAGE_INSTANCE_TYPE (p1))
     {
@@ -2264,7 +2289,7 @@ mswindows_image_instance_equal (struct Lisp_Image_Instance *p1,
 }
 
 static unsigned long
 }
 
 static unsigned long
-mswindows_image_instance_hash (struct Lisp_Image_Instance *p, int depth)
+mswindows_image_instance_hash (Lisp_Image_Instance *p, int depth)
 {
   switch (IMAGE_INSTANCE_TYPE (p))
     {
 {
   switch (IMAGE_INSTANCE_TYPE (p))
     {
@@ -2285,7 +2310,7 @@ mswindows_image_instance_hash (struct Lisp_Image_Instance *p, int depth)
    methods are called. */
 
 static void
    methods are called. */
 
 static void
-mswindows_initialize_dibitmap_image_instance (struct Lisp_Image_Instance *ii,
+mswindows_initialize_dibitmap_image_instance (Lisp_Image_Instance *ii,
                                              int slices,
                                              enum image_instance_type type)
 {
                                              int slices,
                                              enum image_instance_type type)
 {
@@ -2315,7 +2340,7 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat
                              CONST char* class, int flags, int exflags)
 {
   /* this function can call lisp */
                              CONST char* class, int flags, int exflags)
 {
   /* this function can call lisp */
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii), style;
   struct device* d = XDEVICE (device);
   Lisp_Object frame = FW_FRAME (domain);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii), style;
   struct device* d = XDEVICE (device);
   Lisp_Object frame = FW_FRAME (domain);
@@ -2323,7 +2348,7 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat
   HWND wnd;
   int id = 0xffff;
   Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
   HWND wnd;
   int id = 0xffff;
   Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
-  struct Lisp_Gui_Item* pgui = XGUI_ITEM (gui);
+  Lisp_Gui_Item* pgui = XGUI_ITEM (gui);
 
   if (!DEVICE_MSWINDOWS_P (d))
     signal_simple_error ("Not an mswindows device", device);
 
   if (!DEVICE_MSWINDOWS_P (d))
     signal_simple_error ("Not an mswindows device", device);
@@ -2339,7 +2364,9 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat
     }
 
   if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)))
     }
 
   if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)))
-    GET_C_STRING_OS_DATA_ALLOCA (IMAGE_INSTANCE_WIDGET_TEXT (ii), nm);
+    TO_EXTERNAL_FORMAT (LISP_STRING, IMAGE_INSTANCE_WIDGET_TEXT (ii),
+                       C_STRING_ALLOCA, nm,
+                       Qnative);
 
   /* allocate space for the clip window and then allocate the clip window */
   ii->data = xnew_and_zero (struct mswindows_subwindow_data);
 
   /* allocate space for the clip window and then allocate the clip window */
   ii->data = xnew_and_zero (struct mswindows_subwindow_data);
@@ -2386,11 +2413,7 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat
   SetWindowLong (wnd, GWL_USERDATA, (LONG)LISP_TO_VOID(image_instance));
   /* set the widget font from the widget face */
   SendMessage (wnd, WM_SETFONT,
   SetWindowLong (wnd, GWL_USERDATA, (LONG)LISP_TO_VOID(image_instance));
   /* set the widget font from the widget face */
   SendMessage (wnd, WM_SETFONT,
-              (WPARAM)FONT_INSTANCE_MSWINDOWS_HFONT
-              (XFONT_INSTANCE (query_string_font
-                               (IMAGE_INSTANCE_WIDGET_TEXT (ii),
-                                IMAGE_INSTANCE_WIDGET_FACE (ii),
-                                domain))),
+              (WPARAM) mswindows_widget_hfont (ii, domain),
               MAKELPARAM (TRUE, 0));
 }
 
               MAKELPARAM (TRUE, 0));
 }
 
@@ -2406,14 +2429,14 @@ mswindows_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiat
                              int dest_mask, Lisp_Object domain)
 {
   /* this function can call lisp */
                              int dest_mask, Lisp_Object domain)
 {
   /* this function can call lisp */
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   HWND wnd;
   int flags = WS_TABSTOP;/* BS_NOTIFY #### is needed to get exotic feedback
                            only. Since we seem to want nothing beyond BN_CLICK,
                            the style is perhaps not necessary -- kkm */
   Lisp_Object style;
   Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
   HWND wnd;
   int flags = WS_TABSTOP;/* BS_NOTIFY #### is needed to get exotic feedback
                            only. Since we seem to want nothing beyond BN_CLICK,
                            the style is perhaps not necessary -- kkm */
   Lisp_Object style;
   Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
-  struct Lisp_Gui_Item* pgui = XGUI_ITEM (gui);
+  Lisp_Gui_Item* pgui = XGUI_ITEM (gui);
   Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image);
 
   if (!NILP (glyph))
   Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image);
 
   if (!NILP (glyph))
@@ -2444,7 +2467,7 @@ mswindows_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiat
     }
 
   mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
     }
 
   mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
-                               pointer_bg, dest_mask, domain, "BUTTON", 
+                               pointer_bg, dest_mask, domain, "BUTTON",
                                flags, 0);
 
   wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
                                flags, 0);
 
   wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
@@ -2454,7 +2477,9 @@ mswindows_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiat
   else
     SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
   /* add the image if one was given */
   else
     SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
   /* add the image if one was given */
-  if (!NILP (glyph) && IMAGE_INSTANCEP (glyph))
+  if (!NILP (glyph) && IMAGE_INSTANCEP (glyph)
+      &&
+      IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (glyph)))
     {
       SendMessage (wnd, BM_SETIMAGE,
                   (WPARAM) (XIMAGE_INSTANCE_MSWINDOWS_BITMAP (glyph) ?
     {
       SendMessage (wnd, BM_SETIMAGE,
                   (WPARAM) (XIMAGE_INSTANCE_MSWINDOWS_BITMAP (glyph) ?
@@ -2484,7 +2509,7 @@ mswindows_progress_gauge_instantiate (Lisp_Object image_instance, Lisp_Object in
                                int dest_mask, Lisp_Object domain)
 {
   HWND wnd;
                                int dest_mask, Lisp_Object domain)
 {
   HWND wnd;
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
                                pointer_bg, dest_mask, domain, PROGRESS_CLASS,
                                WS_BORDER | PBS_SMOOTH, WS_EX_CLIENTEDGE);
   mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
                                pointer_bg, dest_mask, domain, PROGRESS_CLASS,
                                WS_BORDER | PBS_SMOOTH, WS_EX_CLIENTEDGE);
@@ -2525,11 +2550,14 @@ static HTREEITEM add_tree_item (Lisp_Object image_instance,
     {
       tvitem.item.lParam = mswindows_register_gui_item (item, domain);
       tvitem.item.mask |= TVIF_PARAM;
     {
       tvitem.item.lParam = mswindows_register_gui_item (item, domain);
       tvitem.item.mask |= TVIF_PARAM;
-      GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (item)->name,
-                                  tvitem.item.pszText);
+      TO_EXTERNAL_FORMAT (LISP_STRING, XGUI_ITEM (item)->name,
+                         C_STRING_ALLOCA, tvitem.item.pszText,
+                         Qnative);
     }
   else
     }
   else
-    GET_C_STRING_OS_DATA_ALLOCA (item, tvitem.item.pszText);
+    TO_EXTERNAL_FORMAT (LISP_STRING, item,
+                       C_STRING_ALLOCA, tvitem.item.pszText,
+                       Qnative);
 
   tvitem.item.cchTextMax = strlen (tvitem.item.pszText);
 
 
   tvitem.item.cchTextMax = strlen (tvitem.item.pszText);
 
@@ -2566,7 +2594,7 @@ mswindows_tree_view_instantiate (Lisp_Object image_instance, Lisp_Object instant
   Lisp_Object rest;
   HWND wnd;
   HTREEITEM parent;
   Lisp_Object rest;
   HWND wnd;
   HTREEITEM parent;
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
                                pointer_bg, dest_mask, domain, WC_TREEVIEW,
                                WS_TABSTOP | WS_BORDER | PBS_SMOOTH
   mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
                                pointer_bg, dest_mask, domain, WC_TREEVIEW,
                                WS_TABSTOP | WS_BORDER | PBS_SMOOTH
@@ -2604,13 +2632,16 @@ static TC_ITEM* add_tab_item (Lisp_Object image_instance,
     {
       tvitem.lParam = mswindows_register_gui_item (item, domain);
       tvitem.mask |= TCIF_PARAM;
     {
       tvitem.lParam = mswindows_register_gui_item (item, domain);
       tvitem.mask |= TCIF_PARAM;
-      GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (item)->name,
-                                  tvitem.pszText);
+      TO_EXTERNAL_FORMAT (LISP_STRING, XGUI_ITEM (item)->name,
+                         C_STRING_ALLOCA, tvitem.pszText,
+                         Qnative);
     }
   else
     {
       CHECK_STRING (item);
     }
   else
     {
       CHECK_STRING (item);
-      GET_C_STRING_OS_DATA_ALLOCA (item, tvitem.pszText);
+      TO_EXTERNAL_FORMAT (LISP_STRING, item,
+                         C_STRING_ALLOCA, tvitem.pszText,
+                         Qnative);
     }
 
   tvitem.cchTextMax = strlen (tvitem.pszText);
     }
 
   tvitem.cchTextMax = strlen (tvitem.pszText);
@@ -2630,7 +2661,7 @@ mswindows_tab_control_instantiate (Lisp_Object image_instance, Lisp_Object insta
   Lisp_Object rest;
   HWND wnd;
   int i = 0;
   Lisp_Object rest;
   HWND wnd;
   int i = 0;
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object orient = find_keyword_in_vector (instantiator, Q_orientation);
   unsigned int flags = WS_TABSTOP;
 
   Lisp_Object orient = find_keyword_in_vector (instantiator, Q_orientation);
   unsigned int flags = WS_TABSTOP;
 
@@ -2662,7 +2693,7 @@ static Lisp_Object
 mswindows_tab_control_set_property (Lisp_Object image_instance, Lisp_Object prop,
                                    Lisp_Object val)
 {
 mswindows_tab_control_set_property (Lisp_Object image_instance, Lisp_Object prop,
                                    Lisp_Object val)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
 
   if (EQ (prop, Q_items))
     {
 
   if (EQ (prop, Q_items))
     {
@@ -2719,7 +2750,7 @@ mswindows_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instant
                             Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                             int dest_mask, Lisp_Object domain)
 {
                             Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                             int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   HANDLE wnd;
   Lisp_Object rest;
   Lisp_Object data = Fplist_get (find_keyword_in_vector (instantiator, Q_properties),
   HANDLE wnd;
   Lisp_Object rest;
   Lisp_Object data = Fplist_get (find_keyword_in_vector (instantiator, Q_properties),
@@ -2741,7 +2772,7 @@ mswindows_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instant
 
   height = (height + WIDGET_BORDER_HEIGHT * 2 ) * len;
   IMAGE_INSTANCE_HEIGHT (ii) = height;
 
   height = (height + WIDGET_BORDER_HEIGHT * 2 ) * len;
   IMAGE_INSTANCE_HEIGHT (ii) = height;
-  
+
   /* Now create the widget. */
   mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
                                pointer_bg, dest_mask, domain, "COMBOBOX",
   /* Now create the widget. */
   mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
                                pointer_bg, dest_mask, domain, "COMBOBOX",
@@ -2750,7 +2781,7 @@ mswindows_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instant
                                | CBS_HASSTRINGS | WS_VSCROLL,
                                WS_EX_CLIENTEDGE);
   /* Reset the height. layout will probably do this safely, but better make sure. */
                                | CBS_HASSTRINGS | WS_VSCROLL,
                                WS_EX_CLIENTEDGE);
   /* Reset the height. layout will probably do this safely, but better make sure. */
-  image_instance_layout (image_instance, 
+  image_instance_layout (image_instance,
                         IMAGE_UNSPECIFIED_GEOMETRY,
                         IMAGE_UNSPECIFIED_GEOMETRY,
                         domain);
                         IMAGE_UNSPECIFIED_GEOMETRY,
                         IMAGE_UNSPECIFIED_GEOMETRY,
                         domain);
@@ -2761,7 +2792,9 @@ mswindows_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instant
   LIST_LOOP (rest, Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), Q_items, Qnil))
     {
       Extbyte* lparam;
   LIST_LOOP (rest, Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), Q_items, Qnil))
     {
       Extbyte* lparam;
-      GET_C_STRING_OS_DATA_ALLOCA (XCAR (rest), lparam);
+      TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (rest),
+                         C_STRING_ALLOCA, lparam,
+                         Qnative);
       if (SendMessage (wnd, CB_ADDSTRING, 0, (LPARAM)lparam) == CB_ERR)
        signal_simple_error ("error adding combo entries", instantiator);
     }
       if (SendMessage (wnd, CB_ADDSTRING, 0, (LPARAM)lparam) == CB_ERR)
        signal_simple_error ("error adding combo entries", instantiator);
     }
@@ -2771,7 +2804,7 @@ mswindows_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instant
 static Lisp_Object
 mswindows_widget_property (Lisp_Object image_instance, Lisp_Object prop)
 {
 static Lisp_Object
 mswindows_widget_property (Lisp_Object image_instance, Lisp_Object prop)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   HANDLE wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
   /* get the text from a control */
   if (EQ (prop, Q_text))
   HANDLE wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
   /* get the text from a control */
   if (EQ (prop, Q_text))
@@ -2780,7 +2813,7 @@ mswindows_widget_property (Lisp_Object image_instance, Lisp_Object prop)
       Extbyte* buf =alloca (len+1);
 
       SendMessage (wnd, WM_GETTEXT, (WPARAM)len+1, (LPARAM) buf);
       Extbyte* buf =alloca (len+1);
 
       SendMessage (wnd, WM_GETTEXT, (WPARAM)len+1, (LPARAM) buf);
-      return build_ext_string (buf, FORMAT_OS);
+      return build_ext_string (buf, Qnative);
     }
   return Qunbound;
 }
     }
   return Qunbound;
 }
@@ -2789,7 +2822,7 @@ mswindows_widget_property (Lisp_Object image_instance, Lisp_Object prop)
 static Lisp_Object
 mswindows_button_property (Lisp_Object image_instance, Lisp_Object prop)
 {
 static Lisp_Object
 mswindows_button_property (Lisp_Object image_instance, Lisp_Object prop)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   HANDLE wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
   /* check the state of a button */
   if (EQ (prop, Q_selected))
   HANDLE wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
   /* check the state of a button */
   if (EQ (prop, Q_selected))
@@ -2806,7 +2839,7 @@ mswindows_button_property (Lisp_Object image_instance, Lisp_Object prop)
 static Lisp_Object
 mswindows_combo_box_property (Lisp_Object image_instance, Lisp_Object prop)
 {
 static Lisp_Object
 mswindows_combo_box_property (Lisp_Object image_instance, Lisp_Object prop)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   HANDLE wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
   /* get the text from a control */
   if (EQ (prop, Q_text))
   HANDLE wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
   /* get the text from a control */
   if (EQ (prop, Q_text))
@@ -2815,7 +2848,7 @@ mswindows_combo_box_property (Lisp_Object image_instance, Lisp_Object prop)
       Extcount len = SendMessage (wnd, CB_GETLBTEXTLEN, (WPARAM)item, 0);
       Extbyte* buf = alloca (len+1);
       SendMessage (wnd, CB_GETLBTEXT, (WPARAM)item, (LPARAM)buf);
       Extcount len = SendMessage (wnd, CB_GETLBTEXTLEN, (WPARAM)item, 0);
       Extbyte* buf = alloca (len+1);
       SendMessage (wnd, CB_GETLBTEXT, (WPARAM)item, (LPARAM)buf);
-      return build_ext_string (buf, FORMAT_OS);
+      return build_ext_string (buf, Qnative);
     }
   return Qunbound;
 }
     }
   return Qunbound;
 }
@@ -2825,13 +2858,15 @@ static Lisp_Object
 mswindows_widget_set_property (Lisp_Object image_instance, Lisp_Object prop,
                               Lisp_Object val)
 {
 mswindows_widget_set_property (Lisp_Object image_instance, Lisp_Object prop,
                               Lisp_Object val)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
 
   if (EQ (prop, Q_text))
     {
       Extbyte* lparam=0;
       CHECK_STRING (val);
 
   if (EQ (prop, Q_text))
     {
       Extbyte* lparam=0;
       CHECK_STRING (val);
-      GET_C_STRING_OS_DATA_ALLOCA (val, lparam);
+      TO_EXTERNAL_FORMAT (LISP_STRING, val,
+                         C_STRING_ALLOCA, lparam,
+                         Qnative);
       SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii),
                   WM_SETTEXT, 0, (LPARAM)lparam);
       /* We don't return Qt here so that other widget methods can be
       SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii),
                   WM_SETTEXT, 0, (LPARAM)lparam);
       /* We don't return Qt here so that other widget methods can be
@@ -2845,7 +2880,7 @@ static Lisp_Object
 mswindows_progress_gauge_set_property (Lisp_Object image_instance, Lisp_Object prop,
                                 Lisp_Object val)
 {
 mswindows_progress_gauge_set_property (Lisp_Object image_instance, Lisp_Object prop,
                                 Lisp_Object val)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
 
   if (EQ (prop, Q_percent))
     {
 
   if (EQ (prop, Q_percent))
     {
index 3783c90..f9a10f0 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with:  Not in FSF. */
 
 
 /* Synched up with:  Not in FSF. */
 
-#ifndef _XEMACS_GLYPHS_MSW_H_
-#define _XEMACS_GLYPHS_MSW_H_
+#ifndef INCLUDED_glyphs_msw_h_
+#define INCLUDED_glyphs_msw_h_
 
 #ifdef HAVE_MS_WINDOWS
 
 
 #ifdef HAVE_MS_WINDOWS
 
@@ -64,19 +64,19 @@ struct mswindows_image_instance_data
   IMAGE_INSTANCE_MSWINDOWS_ICON (XIMAGE_INSTANCE (i))
 
 int
   IMAGE_INSTANCE_MSWINDOWS_ICON (XIMAGE_INSTANCE (i))
 
 int
-mswindows_resize_dibitmap_instance (struct Lisp_Image_Instance* ii,
+mswindows_resize_dibitmap_instance (Lisp_Image_Instance* ii,
                                    struct frame* f,
                                    int newx, int newy);
 HBITMAP
                                    struct frame* f,
                                    int newx, int newy);
 HBITMAP
-mswindows_create_resized_bitmap (struct Lisp_Image_Instance* ii,
+mswindows_create_resized_bitmap (Lisp_Image_Instance* ii,
                                 struct frame* f,
                                 int newx, int newy);
 HBITMAP
                                 struct frame* f,
                                 int newx, int newy);
 HBITMAP
-mswindows_create_resized_mask (struct Lisp_Image_Instance* ii,
+mswindows_create_resized_mask (Lisp_Image_Instance* ii,
                               struct frame* f,
                               int newx, int newy);
 void
                               struct frame* f,
                               int newx, int newy);
 void
-mswindows_initialize_image_instance_icon (struct Lisp_Image_Instance* image,
+mswindows_initialize_image_instance_icon (Lisp_Image_Instance* image,
                                          int cursor);
 
 #define WIDGET_INSTANCE_MSWINDOWS_HANDLE(i) \
                                          int cursor);
 
 #define WIDGET_INSTANCE_MSWINDOWS_HANDLE(i) \
@@ -100,4 +100,5 @@ struct mswindows_subwindow_data
   IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (XIMAGE_INSTANCE (i))
 
 #endif /* HAVE_MS_WINDOWS */
   IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW (XIMAGE_INSTANCE (i))
 
 #endif /* HAVE_MS_WINDOWS */
-#endif /* _XEMACS_GLYPHS_MSW_H_ */
+
+#endif /* INCLUDED_glyphs_msw_h_ */
index 2d6ed8c..b5881ca 100644 (file)
@@ -65,8 +65,9 @@ int debug_widget_instances;
 #endif
 
 /* TODO:
 #endif
 
 /* TODO:
-   - more complex controls.
    - tooltips for controls, especially buttons.
    - tooltips for controls, especially buttons.
+   - keyboard traversal.
+   - lisp configurable layout.
  */
 
 /* In MS-Windows normal windows work in pixels, dialog boxes work in
  */
 
 /* In MS-Windows normal windows work in pixels, dialog boxes work in
@@ -256,7 +257,7 @@ substitute_keyword_value (Lisp_Object inst, Lisp_Object key, Lisp_Object val)
 static Lisp_Object 
 widget_property (Lisp_Object image_instance, Lisp_Object prop)
 {
 static Lisp_Object 
 widget_property (Lisp_Object image_instance, Lisp_Object prop)
 {
-  struct Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
   struct image_instantiator_methods* meths;
 
   /* first see if its a general property ... */
   struct image_instantiator_methods* meths;
 
   /* first see if its a general property ... */
@@ -281,7 +282,7 @@ widget_property (Lisp_Object image_instance, Lisp_Object prop)
 static Lisp_Object 
 widget_set_property (Lisp_Object image_instance, Lisp_Object prop, Lisp_Object val)
 {
 static Lisp_Object 
 widget_set_property (Lisp_Object image_instance, Lisp_Object prop, Lisp_Object val)
 {
-  struct Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
   struct image_instantiator_methods* meths;
   Lisp_Object ret;
 
   struct image_instantiator_methods* meths;
   Lisp_Object ret;
 
@@ -326,7 +327,7 @@ widget_query_geometry (Lisp_Object image_instance,
                       unsigned int* width, unsigned int* height,
                       enum image_instance_geometry disp, Lisp_Object domain)
 {
                       unsigned int* width, unsigned int* height,
                       enum image_instance_geometry disp, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
   struct image_instantiator_methods* meths;
 
   /* First just set up what we already have. */
   struct image_instantiator_methods* meths;
 
   /* First just set up what we already have. */
@@ -377,7 +378,7 @@ static void
 widget_layout (Lisp_Object image_instance, 
               unsigned int width, unsigned int height, Lisp_Object domain)
 {
 widget_layout (Lisp_Object image_instance, 
               unsigned int width, unsigned int height, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
   struct image_instantiator_methods* meths;
 
   /* .. then try device specific methods ... */
   struct image_instantiator_methods* meths;
 
   /* .. then try device specific methods ... */
@@ -445,7 +446,7 @@ widget_normalize (Lisp_Object inst, Lisp_Object console_type)
 }
 
 static void
 }
 
 static void
-initialize_widget_image_instance (struct Lisp_Image_Instance *ii, Lisp_Object type)
+initialize_widget_image_instance (Lisp_Image_Instance *ii, Lisp_Object type)
 {
   /*  initialize_subwindow_image_instance (ii);*/
   IMAGE_INSTANCE_WIDGET_TYPE (ii) = type;
 {
   /*  initialize_subwindow_image_instance (ii);*/
   IMAGE_INSTANCE_WIDGET_TYPE (ii) = type;
@@ -469,7 +470,7 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                    Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                    int dest_mask, Lisp_Object domain)
 {
                    Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                    int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object face = find_keyword_in_vector (instantiator, Q_face);
   Lisp_Object height = find_keyword_in_vector (instantiator, Q_height);
   Lisp_Object width = find_keyword_in_vector (instantiator, Q_width);
   Lisp_Object face = find_keyword_in_vector (instantiator, Q_face);
   Lisp_Object height = find_keyword_in_vector (instantiator, Q_height);
   Lisp_Object width = find_keyword_in_vector (instantiator, Q_width);
@@ -478,6 +479,7 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
   Lisp_Object desc = find_keyword_in_vector (instantiator, Q_descriptor);
   Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image);
   Lisp_Object props = find_keyword_in_vector (instantiator, Q_properties);
   Lisp_Object desc = find_keyword_in_vector (instantiator, Q_descriptor);
   Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image);
   Lisp_Object props = find_keyword_in_vector (instantiator, Q_properties);
+  Lisp_Object items = find_keyword_in_vector (instantiator, Q_items);
   Lisp_Object orient = find_keyword_in_vector (instantiator, Q_orientation);
   int pw=0, ph=0, tw=0, th=0;
   
   Lisp_Object orient = find_keyword_in_vector (instantiator, Q_orientation);
   int pw=0, ph=0, tw=0, th=0;
   
@@ -485,26 +487,66 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
   subwindow_instantiate (image_instance, instantiator, pointer_fg, pointer_bg,
                         dest_mask, domain);
 
   subwindow_instantiate (image_instance, instantiator, pointer_fg, pointer_bg,
                         dest_mask, domain);
 
-  if (!(dest_mask & IMAGE_WIDGET_MASK))
-    incompatible_image_types (instantiator, dest_mask, IMAGE_WIDGET_MASK);
+  if (!(dest_mask & (IMAGE_WIDGET_MASK | IMAGE_LAYOUT_MASK)))
+    incompatible_image_types (instantiator, dest_mask, 
+                             IMAGE_WIDGET_MASK | IMAGE_LAYOUT_MASK);
 
   initialize_widget_image_instance (ii, XVECTOR_DATA (instantiator)[0]);
 
 
   initialize_widget_image_instance (ii, XVECTOR_DATA (instantiator)[0]);
 
+  IMAGE_INSTANCE_TYPE (ii) = IMAGE_WIDGET;
+  IMAGE_INSTANCE_WIDGET_PROPS (ii) = props;
+
   /* retrieve the fg and bg colors */
   if (!NILP (face))
     SET_IMAGE_INSTANCE_WIDGET_FACE (ii, Fget_face (face));
   
   /* retrieve the fg and bg colors */
   if (!NILP (face))
     SET_IMAGE_INSTANCE_WIDGET_FACE (ii, Fget_face (face));
   
-  /* data items for some widgets */
-  IMAGE_INSTANCE_WIDGET_PROPS (ii) = props;
+  /* Do layout specific initialisation. This feels a bit tacky, but
+     the alternative is a myriad of different little functions. */
+  if (EQ (IMAGE_INSTANCE_WIDGET_TYPE (ii), Qlayout))
+    {
+      Lisp_Object rest, children = Qnil;
+      Lisp_Object border = find_keyword_in_vector (instantiator, Q_border);
 
 
-  /* Pick up the orientation before we do our first layout. */
-  if (EQ (orient, Qleft) || EQ (orient, Qright) || EQ (orient, Qvertical))
-    IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) = 1;
+      if (NILP (orient))
+       {
+         IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) = LAYOUT_VERTICAL;
+       }
+      IMAGE_INSTANCE_TYPE (ii) = IMAGE_LAYOUT;
+      
+      if (EQ (border, Qt))
+       {
+         IMAGE_INSTANCE_LAYOUT_BORDER (ii) = Qetched_in;
+       }
+      else if (GLYPHP (border))
+       {
+         /* We are going to be sneaky here and add the border text as
+            just another child, the layout and output routines don't know
+            this and will just display at the offsets we prescribe. */
+         children = Fcons (glyph_image_instance (border, domain, ERROR_ME, 1),
+                           children);
+         IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (0);
+       }
+      else
+       {
+         IMAGE_INSTANCE_LAYOUT_BORDER (ii) = border;
+       }
 
 
+      /* Pick up the sub-widgets. */
+      LIST_LOOP (rest, items)
+       {
+         /* make sure the image is instantiated */
+         Lisp_Object gii = glyph_image_instance (XCAR (rest), domain, ERROR_ME, 1);
+         children = Fcons (gii, children);
+         /* Make sure elements in the layout are in the order the
+             user expected. */
+         children = Fnreverse (children);
+       }
+      IMAGE_INSTANCE_LAYOUT_CHILDREN (ii) = children;
+    }
   /* retrieve the gui item information. This is easy if we have been
      provided with a vector, more difficult if we have just been given
      keywords */
   /* retrieve the gui item information. This is easy if we have been
      provided with a vector, more difficult if we have just been given
      keywords */
-  if (STRINGP (desc) || NILP (desc))
+  else if (STRINGP (desc) || NILP (desc))
     {
       /* big cheat - we rely on the fact that a gui item looks like an instantiator */
       IMAGE_INSTANCE_WIDGET_ITEMS (ii) = 
     {
       /* big cheat - we rely on the fact that a gui item looks like an instantiator */
       IMAGE_INSTANCE_WIDGET_ITEMS (ii) = 
@@ -515,14 +557,24 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
     IMAGE_INSTANCE_WIDGET_ITEMS (ii) =
       gui_parse_item_keywords_no_errors (desc);
 
     IMAGE_INSTANCE_WIDGET_ITEMS (ii) =
       gui_parse_item_keywords_no_errors (desc);
 
+  /* Pick up the orientation before we do our first layout. */
+  if (EQ (orient, Qleft) || EQ (orient, Qright) || EQ (orient, Qvertical))
+    IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) = 1;
+
   /* parse more gui items out of the properties */
   /* parse more gui items out of the properties */
-  if (!NILP (props))
+  if (!NILP (props)
+      && !EQ (IMAGE_INSTANCE_WIDGET_TYPE (ii), Qlayout))
     {
     {
-      Lisp_Object items = Fplist_get (props, Q_items, Qnil);
+      if (NILP (items))
+       {
+         items = Fplist_get (props, Q_items, Qnil);
+       }
       if (!NILP (items))
       if (!NILP (items))
-       IMAGE_INSTANCE_WIDGET_ITEMS (ii) = 
-         Fcons (IMAGE_INSTANCE_WIDGET_ITEMS (ii), 
-                parse_gui_item_tree_children (items));
+       {
+         IMAGE_INSTANCE_WIDGET_ITEMS (ii) = 
+           Fcons (IMAGE_INSTANCE_WIDGET_ITEMS (ii), 
+                  parse_gui_item_tree_children (items));
+       }
     }
 
   /* Normalize size information. We now only assign sizes if the user
     }
 
   /* Normalize size information. We now only assign sizes if the user
@@ -577,10 +629,6 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
       IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 0;
     }
 
       IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 0;
     }
 
-  /* have to set the type this late in case there is no device
-     instantiation for a widget */
-  IMAGE_INSTANCE_TYPE (ii) = IMAGE_WIDGET;
-
   /* When we create the widgets the window system expects a valid
      size, so If we still don' t have sizes, call layout to pick them
      up. If query_geometry or layout relies on the widget being in
   /* When we create the widgets the window system expects a valid
      size, so If we still don' t have sizes, call layout to pick them
      up. If query_geometry or layout relies on the widget being in
@@ -606,7 +654,7 @@ tree_view_query_geometry (Lisp_Object image_instance,
                          unsigned int* width, unsigned int* height,
                          enum image_instance_geometry disp, Lisp_Object domain)
 {
                          unsigned int* width, unsigned int* height,
                          enum image_instance_geometry disp, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object items = IMAGE_INSTANCE_WIDGET_ITEMS (ii);
 
   
   Lisp_Object items = IMAGE_INSTANCE_WIDGET_ITEMS (ii);
 
   
@@ -633,7 +681,7 @@ tab_control_query_geometry (Lisp_Object image_instance,
                            unsigned int* width, unsigned int* height,
                            enum image_instance_geometry disp, Lisp_Object domain)
 {
                            unsigned int* width, unsigned int* height,
                            enum image_instance_geometry disp, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object items = IMAGE_INSTANCE_WIDGET_ITEMS (ii);
   Lisp_Object rest;
   unsigned int tw = 0, th = 0;
   Lisp_Object items = IMAGE_INSTANCE_WIDGET_ITEMS (ii);
   Lisp_Object rest;
   unsigned int tw = 0, th = 0;
@@ -700,10 +748,10 @@ layout_normalize (Lisp_Object inst, Lisp_Object console_type)
   return inst;
 }
 
   return inst;
 }
 
-/* Instantiate a layout widget. Sizing commentary: we have a number of
-   problems that we would like to address. Some consider some of these
-   more important than others. Currently size information is
-   determined at instantiation time and is then fixed forever
+/* Layout widget. Sizing commentary: we have a number of problems that
+   we would like to address. Some consider some of these more
+   important than others. It used to be that size information was
+   determined at instantiation time and was then fixed forever
    after. Generally this is not what we want. Users want size to be
    "big enough" to accommodate whatever they are trying to show and
    this is dependent on text length, lines, font metrics etc. Of
    after. Generally this is not what we want. Users want size to be
    "big enough" to accommodate whatever they are trying to show and
    this is dependent on text length, lines, font metrics etc. Of
@@ -738,174 +786,198 @@ layout_normalize (Lisp_Object inst, Lisp_Object console_type)
    Text glyphs are particularly troublesome since their metrics depend
    on the context in which they are being viewed. For instance they
    can appear differently depending on the window face, frame face or
    Text glyphs are particularly troublesome since their metrics depend
    on the context in which they are being viewed. For instance they
    can appear differently depending on the window face, frame face or
-   glyph face. All other glyphs are essentially fixed in
-   appearance. Perhaps the problem is that text glyphs are cached on a
-   device basis like most other glyphs. Instead they should be cached
-   per-window and then the instance would be fixed and we wouldn't
-   have to mess around with font metrics and the rest. */
+   glyph face. In order to simplify this text glyphs can now only have
+   a glyph-face or image-instance face. All other glyphs are
+   essentially fixed in appearance. Perhaps the problem is that text
+   glyphs are cached on a device basis like most other glyphs. Instead
+   they should be cached per-window and then the instance would be
+   fixed and we wouldn't have to mess around with font metrics and the
+   rest. */
+
+/* Query the geometry of a layout widget. We assume that we can only
+   get here if the size is not already fixed. */
 static void
 static void
-layout_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
-                   Lisp_Object pointer_fg, Lisp_Object pointer_bg,
-                   int dest_mask, Lisp_Object domain)
+layout_query_geometry (Lisp_Object image_instance, unsigned int* width,
+                      unsigned int* height, enum image_instance_geometry disp,
+                      Lisp_Object domain)
 {
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
-  Lisp_Object rest, device = IMAGE_INSTANCE_DEVICE (ii);
-  Lisp_Object frame = FW_FRAME (domain);
-  Lisp_Object items = find_keyword_in_vector (instantiator, Q_items);
-  Lisp_Object width = find_keyword_in_vector (instantiator, Q_pixel_width);
-  Lisp_Object height = find_keyword_in_vector (instantiator, Q_pixel_height);
-  Lisp_Object orient = find_keyword_in_vector (instantiator, Q_orientation);
-  Lisp_Object justify = find_keyword_in_vector (instantiator, Q_justify);
-  Lisp_Object border = find_keyword_in_vector (instantiator, Q_border);
-  Lisp_Object children = Qnil;
-  int pw = 0, ph = 0, x, y, maxph = 0, maxpw = 0, nitems = 0,
-    horiz_spacing, vert_spacing, ph_adjust = 0;
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Object items = IMAGE_INSTANCE_LAYOUT_CHILDREN (ii), rest;
+  int maxph = 0, maxpw = 0, nitems = 0, ph_adjust = 0;
 
 
-  if (NILP (frame))
-    signal_simple_error ("No selected frame", device);
-  
-  if (!(dest_mask & IMAGE_LAYOUT_MASK))
-    incompatible_image_types (instantiator, dest_mask, IMAGE_LAYOUT_MASK);
+  /* Flip through the items to work out how much stuff we have to display */
+  LIST_LOOP (rest, items)
+    {
+      Lisp_Object glyph = XCAR (rest);
+      unsigned int gheight, gwidth;
+      
+      image_instance_query_geometry (glyph, &gwidth, &gheight, disp, domain);
 
 
-  if (NILP (orient))
-    orient = Qvertical;
+      /* Pick up the border text if we have one. */
+      if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii))
+         && NILP (XCDR (rest)))
+       {
+         ph_adjust = gheight / 2;
+       }
+      else
+       {
+
+         nitems ++;
+         if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) 
+             == LAYOUT_HORIZONTAL)
+           {
+             maxph = max (maxph, gheight);
+             maxpw += gwidth;
+           }
+         else
+           {
+             maxpw = max (maxpw, gwidth);
+             maxph += gheight;
+           }
+       }
+    }
 
 
-  if (EQ (border, Qt))
-    border = Qetched_in;
+  /* work out spacing between items and bounds of the layout.  No user
+      provided width so we just do default spacing. */
+  if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) 
+      == LAYOUT_HORIZONTAL)
+    *width = maxpw + (nitems + 1) * WIDGET_BORDER_WIDTH * 2;
+  else 
+    *width = maxpw + 2 * WIDGET_BORDER_WIDTH * 2;
 
 
-  ii->data = 0;
-  IMAGE_INSTANCE_TYPE (ii) = IMAGE_LAYOUT;
-  IMAGE_INSTANCE_SUBWINDOW_ID (ii) = 0;
-  IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 0;
-  IMAGE_INSTANCE_SUBWINDOW_FRAME (ii) = frame;
-  IMAGE_INSTANCE_LAYOUT_BORDER (ii) = border;
+  /* Work out vertical spacings. */
+  if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) 
+      == LAYOUT_VERTICAL)
+    *height = maxph + (nitems + 1) * WIDGET_BORDER_HEIGHT * 2 + ph_adjust;
+  else 
+    *height = maxph + 2 * WIDGET_BORDER_HEIGHT * 2 + ph_adjust;
+}
 
 
-  /* normalize size information */
-  if (!NILP (width))
-    pw = XINT (width);
-  if (!NILP (height))
-    ph = XINT (height);
+
+static void
+layout_layout (Lisp_Object image_instance, 
+              unsigned int width, unsigned int height, Lisp_Object domain)
+{
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Object rest;
+  Lisp_Object items = IMAGE_INSTANCE_LAYOUT_CHILDREN (ii);
+  int x, y, maxph = 0, maxpw = 0, nitems = 0,
+    horiz_spacing, vert_spacing, ph_adjust = 0;
+  unsigned int gheight, gwidth;
 
   /* flip through the items to work out how much stuff we have to display */
   LIST_LOOP (rest, items)
     {
       Lisp_Object glyph = XCAR (rest);
 
   /* flip through the items to work out how much stuff we have to display */
   LIST_LOOP (rest, items)
     {
       Lisp_Object glyph = XCAR (rest);
-      int gheight = glyph_height (glyph, domain);
-      int gwidth = glyph_width (glyph, domain);
-      nitems ++;
-      if (EQ (orient, Qhorizontal))
+      
+      image_instance_query_geometry (glyph, &gwidth, &gheight, 
+                                    IMAGE_DESIRED_GEOMETRY, domain);
+
+      /* Pick up the border text if we have one. */
+      if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii))
+         && NILP (XCDR (rest)))
        {
        {
-         maxph = max (maxph, gheight);
-         maxpw += gwidth;
+         XIMAGE_INSTANCE_XOFFSET (glyph) = 10; /* Really, what should this be? */
+         XIMAGE_INSTANCE_YOFFSET (glyph) = 0;
+         ph_adjust = gheight / 2;
+         IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (ph_adjust);
        }
        }
-      else if (EQ (orient, Qvertical))
+      else
        {
        {
-         maxpw = max (maxpw, gwidth);
-         maxph += gheight;
+
+         nitems ++;
+         if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) 
+             == LAYOUT_HORIZONTAL)
+           {
+             maxph = max (maxph, gheight);
+             maxpw += gwidth;
+           }
+         else
+           {
+             maxpw = max (maxpw, gwidth);
+             maxph += gheight;
+           }
        }
     }
 
   /* work out spacing between items and bounds of the layout */
        }
     }
 
   /* work out spacing between items and bounds of the layout */
-  if (!pw)
-    {
-      /* No user provided width so we just do default spacing. */
-      horiz_spacing = WIDGET_BORDER_WIDTH * 2;
-      if (EQ (orient, Qhorizontal))
-       pw = maxpw + (nitems + 1) * horiz_spacing;
-      else 
-       pw = maxpw + 2 * horiz_spacing;
-    }
-  else if (pw < maxpw)
+  if (width < maxpw)
     /* The user wants a smaller space than the largest item, so we
        just provide default spacing and will let the output routines
        clip.. */
     horiz_spacing = WIDGET_BORDER_WIDTH * 2;
     /* The user wants a smaller space than the largest item, so we
        just provide default spacing and will let the output routines
        clip.. */
     horiz_spacing = WIDGET_BORDER_WIDTH * 2;
-  else if (EQ (orient, Qhorizontal))
+  else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) 
+          == LAYOUT_HORIZONTAL)
     /* We have a larger area to display in so distribute the space
        evenly. */
     /* We have a larger area to display in so distribute the space
        evenly. */
-    horiz_spacing = (pw - maxpw) / (nitems + 1);
+    horiz_spacing = (width - maxpw) / (nitems + 1);
   else
   else
-    horiz_spacing = (pw - maxpw) / 2;
+    horiz_spacing = (width - maxpw) / 2;
 
 
-  /* Do the border now so that we can adjust the layout. */
-  if (GLYPHP (border))
-    {
-      /* We are going to be sneaky here and add the border text as
-         just another child, the layout and output routines don't know
-         this and will just display at the offsets we prescribe. */
-      Lisp_Object bglyph = glyph_image_instance (border, domain, ERROR_ME, 1);
-
-      children = Fcons (bglyph, children);
-      XIMAGE_INSTANCE_XOFFSET (bglyph) = 10; /* Really, what should this be? */
-      XIMAGE_INSTANCE_YOFFSET (bglyph) = 0;
-
-      ph_adjust = (glyph_height (border, domain) / 2);
-      IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (ph_adjust);
-    }
-
-  /* Work out vertical spacings. */
-  if (!ph)
-    {
-      vert_spacing = WIDGET_BORDER_HEIGHT * 2;
-      if (EQ (orient, Qvertical))
-       ph = maxph + (nitems + 1) * vert_spacing + ph_adjust;
-      else 
-       ph = maxph + 2 * vert_spacing + ph_adjust;
-    }
-  else if (ph < maxph)
+  if (height < maxph)
     vert_spacing = WIDGET_BORDER_HEIGHT * 2;
     vert_spacing = WIDGET_BORDER_HEIGHT * 2;
-  else if (EQ (orient, Qvertical))
-    vert_spacing = (ph - (maxph + ph_adjust)) / (nitems + 1);
+  else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) 
+          == LAYOUT_VERTICAL)
+    vert_spacing = (height - (maxph + ph_adjust)) / (nitems + 1);
   else
   else
-    vert_spacing = (ph - (maxph + ph_adjust)) / 2;
+    vert_spacing = (height - (maxph + ph_adjust)) / 2;
 
   y = vert_spacing + ph_adjust;
   x = horiz_spacing;
 
   /* Now flip through putting items where we want them, paying
 
   y = vert_spacing + ph_adjust;
   x = horiz_spacing;
 
   /* Now flip through putting items where we want them, paying
-     attention to justification. */
+     attention to justification. Make sure we don't mess with the
+     border glyph. */
   LIST_LOOP (rest, items)
     {
   LIST_LOOP (rest, items)
     {
-      /* make sure the image is instantiated */
       Lisp_Object glyph = XCAR (rest);
       Lisp_Object glyph = XCAR (rest);
-      Lisp_Object gii = glyph_image_instance (glyph, domain, ERROR_ME, 1);
-      int gwidth = glyph_width (glyph, domain);
-      int gheight = glyph_height (glyph, domain);
-
-      children = Fcons (gii, children);
-
-      if (EQ (orient, Qhorizontal))
-       {
-         if (EQ (justify, Qright))
-           y = ph - (gheight + vert_spacing);
-         else if (EQ (justify, Qcenter))
-           y = (ph - gheight) / 2;
-       }
-      else if (EQ (orient, Qvertical))
-       {
-         if (EQ (justify, Qright))
-           x = pw - (gwidth + horiz_spacing);
-         else if (EQ (justify, Qcenter))
-           x = (pw - gwidth) / 2;
-       }
-
-      XIMAGE_INSTANCE_XOFFSET (gii) = x;
-      XIMAGE_INSTANCE_YOFFSET (gii) = y;
 
 
-      if (EQ (orient, Qhorizontal))
-       {
-         x += (gwidth + horiz_spacing);
-       }
-      else if (EQ (orient, Qvertical))
-       {
-         y += (gheight + vert_spacing);
-       }
+      image_instance_query_geometry (glyph, &gwidth, &gheight, 
+                                    IMAGE_DESIRED_GEOMETRY, domain);
+
+      if (!INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii))
+         || !NILP (XCDR (rest)))
+      {
+       if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) 
+           == LAYOUT_HORIZONTAL)
+         {
+           if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii) 
+               == LAYOUT_JUSTIFY_RIGHT)
+             y = height - (gheight + vert_spacing);
+           if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii) 
+               == LAYOUT_JUSTIFY_CENTER)
+             y = (height - gheight) / 2;
+         }
+       else 
+         {
+           if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii) 
+               == LAYOUT_JUSTIFY_RIGHT)
+             x = width - (gwidth + horiz_spacing);
+           if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii) 
+               == LAYOUT_JUSTIFY_CENTER)
+             x = (width - gwidth) / 2;
+         }
+       
+       XIMAGE_INSTANCE_XOFFSET (glyph) = x;
+       XIMAGE_INSTANCE_YOFFSET (glyph) = y;
+       
+       if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) 
+           == LAYOUT_HORIZONTAL)
+         {
+           x += (gwidth + horiz_spacing);
+         }
+       else
+         {
+           y += (gheight + vert_spacing);
+         }
+      }
+      
+      /* Now layout subwidgets if they require it. */
+      image_instance_layout (glyph, gwidth, gheight, domain);
     }
 
     }
 
-  IMAGE_INSTANCE_LAYOUT_CHILDREN (ii) = children;
-  assert (pw && ph);
-  IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = pw;
-  IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii) = ph;
+  IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = width;
+  IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii) = height;
 }
 
 \f
 }
 
 \f
@@ -934,58 +1006,65 @@ syms_of_glyphs_widget (void)
   defsymbol (&Qbevel_out, "bevel-out");
 }
 
   defsymbol (&Qbevel_out, "bevel-out");
 }
 
-void
-image_instantiator_format_create_glyphs_widget (void)
-{
-#define VALID_GUI_KEYWORDS(type) \
-  IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_active, check_valid_anything); \
-  IIFORMAT_VALID_KEYWORD (type, Q_suffix, check_valid_anything);               \
-  IIFORMAT_VALID_KEYWORD (type, Q_keys, check_valid_string);           \
-  IIFORMAT_VALID_KEYWORD (type, Q_style, check_valid_symbol);          \
-  IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_selected, check_valid_anything); \
-  IIFORMAT_VALID_KEYWORD (type, Q_filter, check_valid_anything);               \
-  IIFORMAT_VALID_KEYWORD (type, Q_config, check_valid_symbol);         \
-  IIFORMAT_VALID_KEYWORD (type, Q_included, check_valid_anything);     \
-  IIFORMAT_VALID_KEYWORD (type, Q_key_sequence, check_valid_string);   \
-  IIFORMAT_VALID_KEYWORD (type, Q_accelerator, check_valid_string);            \
-  IIFORMAT_VALID_KEYWORD (type, Q_label, check_valid_anything);                \
-  IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_callback, check_valid_callback); \
-  IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_descriptor, check_valid_string_or_vector)
-
-#define VALID_WIDGET_KEYWORDS(type) \
+#define VALID_GUI_KEYWORDS(type) do {                                                  \
+  IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_active, check_valid_anything);               \
+  IIFORMAT_VALID_KEYWORD (type, Q_suffix, check_valid_anything);                       \
+  IIFORMAT_VALID_KEYWORD (type, Q_keys, check_valid_string);                           \
+  IIFORMAT_VALID_KEYWORD (type, Q_style, check_valid_symbol);                          \
+  IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_selected, check_valid_anything);             \
+  IIFORMAT_VALID_KEYWORD (type, Q_filter, check_valid_anything);                       \
+  IIFORMAT_VALID_KEYWORD (type, Q_config, check_valid_symbol);                         \
+  IIFORMAT_VALID_KEYWORD (type, Q_included, check_valid_anything);                     \
+  IIFORMAT_VALID_KEYWORD (type, Q_key_sequence, check_valid_string);                   \
+  IIFORMAT_VALID_KEYWORD (type, Q_accelerator, check_valid_string);                    \
+  IIFORMAT_VALID_KEYWORD (type, Q_label, check_valid_anything);                                \
+  IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_callback, check_valid_callback);             \
+  IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_descriptor, check_valid_string_or_vector);   \
+} while (0)
+
+#define VALID_WIDGET_KEYWORDS(type) do {                               \
   IIFORMAT_VALID_KEYWORD (type, Q_width, check_valid_int);             \
   IIFORMAT_VALID_KEYWORD (type, Q_height, check_valid_int);            \
   IIFORMAT_VALID_KEYWORD (type, Q_pixel_width, check_valid_int);       \
   IIFORMAT_VALID_KEYWORD (type, Q_pixel_height, check_valid_int);      \
   IIFORMAT_VALID_KEYWORD (type, Q_width, check_valid_int);             \
   IIFORMAT_VALID_KEYWORD (type, Q_height, check_valid_int);            \
   IIFORMAT_VALID_KEYWORD (type, Q_pixel_width, check_valid_int);       \
   IIFORMAT_VALID_KEYWORD (type, Q_pixel_height, check_valid_int);      \
-  IIFORMAT_VALID_KEYWORD (type, Q_face, check_valid_face)
+  IIFORMAT_VALID_KEYWORD (type, Q_face, check_valid_face);             \
+} while (0)
 
 
-  /* we only do this for properties */
+
+static void image_instantiator_widget (void)
+{ /* we only do this for properties */
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM (widget, "widget");
   IIFORMAT_HAS_METHOD (widget, property);
   IIFORMAT_HAS_METHOD (widget, set_property);
   IIFORMAT_HAS_METHOD (widget, query_geometry);
   IIFORMAT_HAS_METHOD (widget, layout);
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM (widget, "widget");
   IIFORMAT_HAS_METHOD (widget, property);
   IIFORMAT_HAS_METHOD (widget, set_property);
   IIFORMAT_HAS_METHOD (widget, query_geometry);
   IIFORMAT_HAS_METHOD (widget, layout);
+}
 
 
-  /* widget image-instantiator types - buttons */
+static void image_instantiator_buttons (void)
+{
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (button, "button");
   IIFORMAT_HAS_SHARED_METHOD (button, validate, widget);
   IIFORMAT_HAS_SHARED_METHOD (button, possible_dest_types, widget);
   IIFORMAT_HAS_SHARED_METHOD (button, instantiate, widget);
   IIFORMAT_HAS_SHARED_METHOD (button, normalize, widget);
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (button, "button");
   IIFORMAT_HAS_SHARED_METHOD (button, validate, widget);
   IIFORMAT_HAS_SHARED_METHOD (button, possible_dest_types, widget);
   IIFORMAT_HAS_SHARED_METHOD (button, instantiate, widget);
   IIFORMAT_HAS_SHARED_METHOD (button, normalize, widget);
-  IIFORMAT_VALID_KEYWORD (button, 
+  IIFORMAT_VALID_KEYWORD (button,
                          Q_image, check_valid_glyph_or_instantiator);
   VALID_WIDGET_KEYWORDS (button);
   VALID_GUI_KEYWORDS (button);
                          Q_image, check_valid_glyph_or_instantiator);
   VALID_WIDGET_KEYWORDS (button);
   VALID_GUI_KEYWORDS (button);
+}
 
 
-  /* edit fields */
+static void image_instantiator_edit_fields (void)
+{
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (edit_field, "edit-field");
   IIFORMAT_HAS_SHARED_METHOD (edit_field, validate, widget);
   IIFORMAT_HAS_SHARED_METHOD (edit_field, possible_dest_types, widget);
   IIFORMAT_HAS_SHARED_METHOD (edit_field, instantiate, widget);
   VALID_WIDGET_KEYWORDS (edit_field);
   VALID_GUI_KEYWORDS (edit_field);
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (edit_field, "edit-field");
   IIFORMAT_HAS_SHARED_METHOD (edit_field, validate, widget);
   IIFORMAT_HAS_SHARED_METHOD (edit_field, possible_dest_types, widget);
   IIFORMAT_HAS_SHARED_METHOD (edit_field, instantiate, widget);
   VALID_WIDGET_KEYWORDS (edit_field);
   VALID_GUI_KEYWORDS (edit_field);
+}
 
 
-  /* combo box */
+static void image_instantiator_combo_box (void)
+{
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (combo_box, "combo-box");
   IIFORMAT_HAS_METHOD (combo_box, validate);
   IIFORMAT_HAS_SHARED_METHOD (combo_box, possible_dest_types, widget);
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (combo_box, "combo-box");
   IIFORMAT_HAS_METHOD (combo_box, validate);
   IIFORMAT_HAS_SHARED_METHOD (combo_box, possible_dest_types, widget);
@@ -996,8 +1075,10 @@ image_instantiator_format_create_glyphs_widget (void)
   IIFORMAT_VALID_KEYWORD (combo_box, Q_pixel_width, check_valid_int);
   IIFORMAT_VALID_KEYWORD (combo_box, Q_face, check_valid_face);
   IIFORMAT_VALID_KEYWORD (combo_box, Q_properties, check_valid_item_list);
   IIFORMAT_VALID_KEYWORD (combo_box, Q_pixel_width, check_valid_int);
   IIFORMAT_VALID_KEYWORD (combo_box, Q_face, check_valid_face);
   IIFORMAT_VALID_KEYWORD (combo_box, Q_properties, check_valid_item_list);
+}
 
 
-  /* scrollbar */
+static void image_instantiator_scrollbar (void)
+{
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (scrollbar, "scrollbar");
   IIFORMAT_HAS_SHARED_METHOD (scrollbar, validate, widget);
   IIFORMAT_HAS_SHARED_METHOD (scrollbar, possible_dest_types, widget);
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (scrollbar, "scrollbar");
   IIFORMAT_HAS_SHARED_METHOD (scrollbar, validate, widget);
   IIFORMAT_HAS_SHARED_METHOD (scrollbar, possible_dest_types, widget);
@@ -1007,16 +1088,20 @@ image_instantiator_format_create_glyphs_widget (void)
   IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_width, check_valid_int);
   IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_height, check_valid_int);
   IIFORMAT_VALID_KEYWORD (scrollbar, Q_face, check_valid_face);
   IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_width, check_valid_int);
   IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_height, check_valid_int);
   IIFORMAT_VALID_KEYWORD (scrollbar, Q_face, check_valid_face);
+}
 
 
-  /* progress guage */
+static void image_instantiator_progress_guage (void)
+{
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (progress_gauge, "progress-gauge");
   IIFORMAT_HAS_SHARED_METHOD (progress_gauge, validate, widget);
   IIFORMAT_HAS_SHARED_METHOD (progress_gauge, possible_dest_types, widget);
   IIFORMAT_HAS_SHARED_METHOD (progress_gauge, instantiate, widget);
   VALID_WIDGET_KEYWORDS (progress_gauge);
   VALID_GUI_KEYWORDS (progress_gauge);
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (progress_gauge, "progress-gauge");
   IIFORMAT_HAS_SHARED_METHOD (progress_gauge, validate, widget);
   IIFORMAT_HAS_SHARED_METHOD (progress_gauge, possible_dest_types, widget);
   IIFORMAT_HAS_SHARED_METHOD (progress_gauge, instantiate, widget);
   VALID_WIDGET_KEYWORDS (progress_gauge);
   VALID_GUI_KEYWORDS (progress_gauge);
+}
 
 
-  /* tree view */
+static void image_instantiator_tree_view (void)
+{
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tree_view, "tree-view");
   IIFORMAT_HAS_SHARED_METHOD (tree_view, validate, combo_box);
   IIFORMAT_HAS_SHARED_METHOD (tree_view, possible_dest_types, widget);
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tree_view, "tree-view");
   IIFORMAT_HAS_SHARED_METHOD (tree_view, validate, combo_box);
   IIFORMAT_HAS_SHARED_METHOD (tree_view, possible_dest_types, widget);
@@ -1025,8 +1110,10 @@ image_instantiator_format_create_glyphs_widget (void)
   VALID_WIDGET_KEYWORDS (tree_view);
   VALID_GUI_KEYWORDS (tree_view);
   IIFORMAT_VALID_KEYWORD (tree_view, Q_properties, check_valid_item_list);
   VALID_WIDGET_KEYWORDS (tree_view);
   VALID_GUI_KEYWORDS (tree_view);
   IIFORMAT_VALID_KEYWORD (tree_view, Q_properties, check_valid_item_list);
+}
 
 
-  /* tab control */
+static void image_instantiator_tab_control (void)
+{
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tab_control, "tab-control");
   IIFORMAT_HAS_SHARED_METHOD (tab_control, validate, combo_box);
   IIFORMAT_HAS_SHARED_METHOD (tab_control, possible_dest_types, widget);
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tab_control, "tab-control");
   IIFORMAT_HAS_SHARED_METHOD (tab_control, validate, combo_box);
   IIFORMAT_HAS_SHARED_METHOD (tab_control, possible_dest_types, widget);
@@ -1036,29 +1123,50 @@ image_instantiator_format_create_glyphs_widget (void)
   VALID_GUI_KEYWORDS (tab_control);
   IIFORMAT_VALID_KEYWORD (tab_control, Q_orientation, check_valid_tab_orientation);
   IIFORMAT_VALID_KEYWORD (tab_control, Q_properties, check_valid_item_list);
   VALID_GUI_KEYWORDS (tab_control);
   IIFORMAT_VALID_KEYWORD (tab_control, Q_orientation, check_valid_tab_orientation);
   IIFORMAT_VALID_KEYWORD (tab_control, Q_properties, check_valid_item_list);
+}
 
 
-  /* labels */
+static void image_instantiator_labels (void)
+{
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (label, "label");
   IIFORMAT_HAS_SHARED_METHOD (label, possible_dest_types, widget);
   IIFORMAT_HAS_SHARED_METHOD (label, instantiate, widget);
   VALID_WIDGET_KEYWORDS (label);
   IIFORMAT_VALID_KEYWORD (label, Q_descriptor, check_valid_string);
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (label, "label");
   IIFORMAT_HAS_SHARED_METHOD (label, possible_dest_types, widget);
   IIFORMAT_HAS_SHARED_METHOD (label, instantiate, widget);
   VALID_WIDGET_KEYWORDS (label);
   IIFORMAT_VALID_KEYWORD (label, Q_descriptor, check_valid_string);
+}
 
 
-  /* layout */
+static void image_instantiator_layout (void)
+{
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (layout, "layout");
   IIFORMAT_HAS_METHOD (layout, possible_dest_types);
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (layout, "layout");
   IIFORMAT_HAS_METHOD (layout, possible_dest_types);
-  IIFORMAT_HAS_METHOD (layout, instantiate);
+  IIFORMAT_HAS_SHARED_METHOD (layout, instantiate, widget);
   IIFORMAT_HAS_METHOD (layout, normalize);
   IIFORMAT_HAS_METHOD (layout, normalize);
+  IIFORMAT_HAS_METHOD (layout, query_geometry);
+  IIFORMAT_HAS_METHOD (layout, layout);
   IIFORMAT_VALID_KEYWORD (layout, Q_pixel_width, check_valid_int);
   IIFORMAT_VALID_KEYWORD (layout, Q_pixel_height, check_valid_int);
   IIFORMAT_VALID_KEYWORD (layout, Q_orientation, check_valid_orientation);
   IIFORMAT_VALID_KEYWORD (layout, Q_justify, check_valid_justification);
   IIFORMAT_VALID_KEYWORD (layout, Q_border, check_valid_border);
   IIFORMAT_VALID_KEYWORD (layout, Q_pixel_width, check_valid_int);
   IIFORMAT_VALID_KEYWORD (layout, Q_pixel_height, check_valid_int);
   IIFORMAT_VALID_KEYWORD (layout, Q_orientation, check_valid_orientation);
   IIFORMAT_VALID_KEYWORD (layout, Q_justify, check_valid_justification);
   IIFORMAT_VALID_KEYWORD (layout, Q_border, check_valid_border);
-  IIFORMAT_VALID_KEYWORD (layout, Q_items, 
+  IIFORMAT_VALID_KEYWORD (layout, Q_items,
                          check_valid_glyph_or_instantiator_list);
 }
 
 void
                          check_valid_glyph_or_instantiator_list);
 }
 
 void
+image_instantiator_format_create_glyphs_widget (void)
+{
+  image_instantiator_widget();
+  image_instantiator_buttons();
+  image_instantiator_edit_fields();
+  image_instantiator_combo_box();
+  image_instantiator_scrollbar();
+  image_instantiator_progress_guage();
+  image_instantiator_tree_view();
+  image_instantiator_tab_control();
+  image_instantiator_labels();
+  image_instantiator_layout();
+}
+
+void
 reinit_vars_of_glyphs_widget (void)
 {
 #ifdef DEBUG_WIDGETS
 reinit_vars_of_glyphs_widget (void)
 {
 #ifdef DEBUG_WIDGETS
index d2dc9df..5d6a083 100644 (file)
@@ -149,10 +149,10 @@ static void cursor_font_instantiate (Lisp_Object image_instance,
 #ifdef HAVE_WIDGETS
 static void
 update_widget_face (widget_value* wv,
 #ifdef HAVE_WIDGETS
 static void
 update_widget_face (widget_value* wv,
-                   struct Lisp_Image_Instance* ii, Lisp_Object domain);
+                   Lisp_Image_Instance* ii, Lisp_Object domain);
 static void
 update_tab_widget_face (widget_value* wv,
 static void
 update_tab_widget_face (widget_value* wv,
-                       struct Lisp_Image_Instance* ii, Lisp_Object domain);
+                       Lisp_Image_Instance* ii, Lisp_Object domain);
 #endif
 
 #include "bitmaps.h"
 #endif
 
 #include "bitmaps.h"
@@ -233,7 +233,7 @@ convert_EImage_to_XImage (Lisp_Object device, int width, int height,
       *pixtbl = xnew_array (unsigned long, pixcount);
       *npixels = 0;
 
       *pixtbl = xnew_array (unsigned long, pixcount);
       *npixels = 0;
 
-      /* ### should implement a sort by popularity to assure proper allocation */
+      /* #### should implement a sort by popularity to assure proper allocation */
       n = *npixels;
       for (i = 0; i < qtable->num_active_colors; i++)
        {
       n = *npixels;
       for (i = 0; i < qtable->num_active_colors; i++)
        {
@@ -359,7 +359,7 @@ convert_EImage_to_XImage (Lisp_Object device, int width, int height,
 
 
 static void
 
 
 static void
-x_print_image_instance (struct Lisp_Image_Instance *p,
+x_print_image_instance (Lisp_Image_Instance *p,
                        Lisp_Object printcharfun,
                        int escapeflag)
 {
                        Lisp_Object printcharfun,
                        int escapeflag)
 {
@@ -389,7 +389,7 @@ extern int debug_widget_instances;
 #endif
 
 static void
 #endif
 
 static void
-x_finalize_image_instance (struct Lisp_Image_Instance *p)
+x_finalize_image_instance (Lisp_Image_Instance *p)
 {
   if (!p->data)
     return;
 {
   if (!p->data)
     return;
@@ -473,8 +473,8 @@ x_finalize_image_instance (struct Lisp_Image_Instance *p)
 }
 
 static int
 }
 
 static int
-x_image_instance_equal (struct Lisp_Image_Instance *p1,
-                       struct Lisp_Image_Instance *p2, int depth)
+x_image_instance_equal (Lisp_Image_Instance *p1,
+                       Lisp_Image_Instance *p2, int depth)
 {
   switch (IMAGE_INSTANCE_TYPE (p1))
     {
 {
   switch (IMAGE_INSTANCE_TYPE (p1))
     {
@@ -493,7 +493,7 @@ x_image_instance_equal (struct Lisp_Image_Instance *p1,
 }
 
 static unsigned long
 }
 
 static unsigned long
-x_image_instance_hash (struct Lisp_Image_Instance *p, int depth)
+x_image_instance_hash (Lisp_Image_Instance *p, int depth)
 {
   switch (IMAGE_INSTANCE_TYPE (p))
     {
 {
   switch (IMAGE_INSTANCE_TYPE (p))
     {
@@ -513,7 +513,7 @@ x_image_instance_hash (struct Lisp_Image_Instance *p, int depth)
    methods are called. */
 
 static void
    methods are called. */
 
 static void
-x_initialize_pixmap_image_instance (struct Lisp_Image_Instance *ii,
+x_initialize_pixmap_image_instance (Lisp_Image_Instance *ii,
                                    int slices,
                                    enum image_instance_type type)
 {
                                    int slices,
                                    enum image_instance_type type)
 {
@@ -564,7 +564,7 @@ x_locate_pixmap_file (Lisp_Object name)
         (XSTRING_BYTE (name, 2) == '/')))))
     {
       if (!NILP (Ffile_readable_p (name)))
         (XSTRING_BYTE (name, 2) == '/')))))
     {
       if (!NILP (Ffile_readable_p (name)))
-       return name;
+       return Fexpand_file_name (name, Qnil);
       else
        return Qnil;
     }
       else
        return Qnil;
     }
@@ -833,7 +833,7 @@ maybe_recolor_cursor (Lisp_Object image_instance, Lisp_Object foreground,
    Use the same code as for `xpm'. */
 
 static void
    Use the same code as for `xpm'. */
 
 static void
-init_image_instance_from_x_image (struct Lisp_Image_Instance *ii,
+init_image_instance_from_x_image (Lisp_Image_Instance *ii,
                                  XImage *ximage,
                                  int dest_mask,
                                  Colormap cmap,
                                  XImage *ximage,
                                  int dest_mask,
                                  Colormap cmap,
@@ -893,7 +893,7 @@ init_image_instance_from_x_image (struct Lisp_Image_Instance *ii,
 }
 
 static void
 }
 
 static void
-image_instance_add_x_image (struct Lisp_Image_Instance *ii,
+image_instance_add_x_image (Lisp_Image_Instance *ii,
                            XImage *ximage,
                            int slice,
                            Lisp_Object instantiator)
                            XImage *ximage,
                            int slice,
                            Lisp_Object instantiator)
@@ -928,7 +928,7 @@ image_instance_add_x_image (struct Lisp_Image_Instance *ii,
 }
 
 static void
 }
 
 static void
-x_init_image_instance_from_eimage (struct Lisp_Image_Instance *ii,
+x_init_image_instance_from_eimage (Lisp_Image_Instance *ii,
                                   int width, int height,
                                   int slices,
                                   unsigned char *eimage,
                                   int width, int height,
                                   int slices,
                                   unsigned char *eimage,
@@ -1001,7 +1001,7 @@ pixmap_from_xbm_inline (Lisp_Object device, int width, int height,
    image instance accordingly. */
 
 static void
    image instance accordingly. */
 
 static void
-init_image_instance_from_xbm_inline (struct Lisp_Image_Instance *ii,
+init_image_instance_from_xbm_inline (Lisp_Image_Instance *ii,
                                     int width, int height,
                                     /* Note that data is in ext-format! */
                                     CONST char *bits,
                                     int width, int height,
                                     /* Note that data is in ext-format! */
                                     CONST char *bits,
@@ -1146,20 +1146,20 @@ xbm_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator,
 {
   Lisp_Object mask_data = find_keyword_in_vector (instantiator, Q_mask_data);
   Lisp_Object mask_file = find_keyword_in_vector (instantiator, Q_mask_file);
 {
   Lisp_Object mask_data = find_keyword_in_vector (instantiator, Q_mask_data);
   Lisp_Object mask_file = find_keyword_in_vector (instantiator, Q_mask_file);
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Pixmap mask = 0;
   Pixmap mask = 0;
-  CONST char *gcc_may_you_rot_in_hell;
 
   if (!NILP (mask_data))
     {
 
   if (!NILP (mask_data))
     {
-      GET_C_STRING_BINARY_DATA_ALLOCA (XCAR (XCDR (XCDR (mask_data))),
-                                      gcc_may_you_rot_in_hell);
-      mask =
-       pixmap_from_xbm_inline (IMAGE_INSTANCE_DEVICE (ii),
-                               XINT (XCAR (mask_data)),
-                               XINT (XCAR (XCDR (mask_data))),
-                               (CONST unsigned char *)
-                               gcc_may_you_rot_in_hell);
+      CONST char *ext_data;
+
+      TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (XCDR (XCDR (mask_data))),
+                         C_STRING_ALLOCA, ext_data,
+                         Qbinary);
+      mask = pixmap_from_xbm_inline (IMAGE_INSTANCE_DEVICE (ii),
+                                    XINT (XCAR (mask_data)),
+                                    XINT (XCAR (XCDR (mask_data))),
+                                    (CONST unsigned char *) ext_data);
     }
 
   init_image_instance_from_xbm_inline (ii, width, height, bits,
     }
 
   init_image_instance_from_xbm_inline (ii, width, height, bits,
@@ -1175,16 +1175,17 @@ x_xbm_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                   int dest_mask, Lisp_Object domain)
 {
   Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
                   int dest_mask, Lisp_Object domain)
 {
   Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
-  CONST char *gcc_go_home;
+  CONST char *ext_data;
 
   assert (!NILP (data));
 
 
   assert (!NILP (data));
 
-  GET_C_STRING_BINARY_DATA_ALLOCA (XCAR (XCDR (XCDR (data))),
-                                  gcc_go_home);
+  TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (XCDR (XCDR (data))),
+                     C_STRING_ALLOCA, ext_data,
+                     Qbinary);
 
   xbm_instantiate_1 (image_instance, instantiator, pointer_fg,
                     pointer_bg, dest_mask, XINT (XCAR (data)),
 
   xbm_instantiate_1 (image_instance, instantiator, pointer_fg,
                     pointer_bg, dest_mask, XINT (XCAR (data)),
-                    XINT (XCAR (XCDR (data))), gcc_go_home);
+                    XINT (XCAR (XCDR (data))), ext_data);
 }
 
 \f
 }
 
 \f
@@ -1292,7 +1293,7 @@ x_xpm_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                   int dest_mask, Lisp_Object domain)
 {
   /* This function can GC */
                   int dest_mask, Lisp_Object domain)
 {
   /* This function can GC */
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
   Display *dpy;
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
   Display *dpy;
@@ -1665,7 +1666,9 @@ x_xface_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 
   assert (!NILP (data));
 
 
   assert (!NILP (data));
 
-  GET_C_STRING_BINARY_DATA_ALLOCA (data, dstring);
+  TO_EXTERNAL_FORMAT (LISP_STRING, data,
+                     C_STRING_ALLOCA, dstring,
+                     Qbinary);
 
   if ((p = strchr (dstring, ':')))
     {
 
   if ((p = strchr (dstring, ':')))
     {
@@ -1837,7 +1840,9 @@ autodetect_instantiate (Lisp_Object image_instance,
   if (dest_mask & IMAGE_POINTER_MASK)
     {
       CONST char *name_ext;
   if (dest_mask & IMAGE_POINTER_MASK)
     {
       CONST char *name_ext;
-      GET_C_STRING_FILENAME_DATA_ALLOCA (data, name_ext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, data,
+                         C_STRING_ALLOCA, name_ext,
+                         Qfile_name);
       if (XmuCursorNameToIndex (name_ext) != -1)
         {
           result = alist_to_tagged_vector (Qcursor_font, alist);
       if (XmuCursorNameToIndex (name_ext) != -1)
         {
           result = alist_to_tagged_vector (Qcursor_font, alist);
@@ -1924,7 +1929,7 @@ font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 {
   /* This function can GC */
   Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
 {
   /* This function can GC */
   Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   Display *dpy;
   XColor fg, bg;
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   Display *dpy;
   XColor fg, bg;
@@ -2022,7 +2027,7 @@ cursor_font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 {
   /* This function can GC */
   Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
 {
   /* This function can GC */
   Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   Display *dpy;
   int i;
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   Display *dpy;
   int i;
@@ -2037,7 +2042,9 @@ cursor_font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
   if (!(dest_mask & IMAGE_POINTER_MASK))
     incompatible_image_types (instantiator, dest_mask, IMAGE_POINTER_MASK);
 
   if (!(dest_mask & IMAGE_POINTER_MASK))
     incompatible_image_types (instantiator, dest_mask, IMAGE_POINTER_MASK);
 
-  GET_C_STRING_FILENAME_DATA_ALLOCA (data, name_ext);
+  TO_EXTERNAL_FORMAT (LISP_STRING, data,
+                     C_STRING_ALLOCA, name_ext,
+                     Qfile_name);
   if ((i = XmuCursorNameToIndex (name_ext)) == -1)
     signal_simple_error ("Unrecognized cursor-font name", data);
 
   if ((i = XmuCursorNameToIndex (name_ext)) == -1)
     signal_simple_error ("Unrecognized cursor-font name", data);
 
@@ -2056,7 +2063,7 @@ static int
 x_colorize_image_instance (Lisp_Object image_instance,
                           Lisp_Object foreground, Lisp_Object background)
 {
 x_colorize_image_instance (Lisp_Object image_instance,
                           Lisp_Object foreground, Lisp_Object background)
 {
-  struct Lisp_Image_Instance *p;
+  Lisp_Image_Instance *p;
 
   p = XIMAGE_INSTANCE (image_instance);
 
 
   p = XIMAGE_INSTANCE (image_instance);
 
@@ -2109,7 +2116,7 @@ x_colorize_image_instance (Lisp_Object image_instance,
 /* unmap the image if it is a widget. This is used by redisplay via
    redisplay_unmap_subwindows */
 static void
 /* unmap the image if it is a widget. This is used by redisplay via
    redisplay_unmap_subwindows */
 static void
-x_unmap_subwindow (struct Lisp_Image_Instance *p)
+x_unmap_subwindow (Lisp_Image_Instance *p)
 {
   if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW)
     {
 {
   if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW)
     {
@@ -2126,7 +2133,7 @@ x_unmap_subwindow (struct Lisp_Image_Instance *p)
 /* map the subwindow. This is used by redisplay via
    redisplay_output_subwindow */
 static void
 /* map the subwindow. This is used by redisplay via
    redisplay_output_subwindow */
 static void
-x_map_subwindow (struct Lisp_Image_Instance *p, int x, int y,
+x_map_subwindow (Lisp_Image_Instance *p, int x, int y,
                 struct display_glyph_area* dga)
 {
   if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW)
                 struct display_glyph_area* dga)
 {
   if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW)
@@ -2155,7 +2162,7 @@ x_map_subwindow (struct Lisp_Image_Instance *p, int x, int y,
 /* when you click on a widget you may activate another widget this
    needs to be checked and all appropriate widgets updated */
 static void
 /* when you click on a widget you may activate another widget this
    needs to be checked and all appropriate widgets updated */
 static void
-x_update_subwindow (struct Lisp_Image_Instance *p)
+x_update_subwindow (Lisp_Image_Instance *p)
 {
 #ifdef HAVE_WIDGETS
   if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET)
 {
 #ifdef HAVE_WIDGETS
   if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET)
@@ -2188,7 +2195,7 @@ x_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                        int dest_mask, Lisp_Object domain)
 {
   /* This function can GC */
                        int dest_mask, Lisp_Object domain)
 {
   /* This function can GC */
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   Lisp_Object frame = FW_FRAME (domain);
   struct frame* f = XFRAME (frame);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   Lisp_Object frame = FW_FRAME (domain);
   struct frame* f = XFRAME (frame);
@@ -2244,7 +2251,7 @@ Subwindows are not currently implemented.
        (subwindow, property, data))
 {
   Atom property_atom;
        (subwindow, property, data))
 {
   Atom property_atom;
-  struct Lisp_Subwindow *sw;
+  Lisp_Subwindow *sw;
   Display *dpy;
 
   CHECK_SUBWINDOW (subwindow);
   Display *dpy;
 
   CHECK_SUBWINDOW (subwindow);
@@ -2266,7 +2273,7 @@ Subwindows are not currently implemented.
 #endif
 
 static void
 #endif
 
 static void
-x_resize_subwindow (struct Lisp_Image_Instance* ii, int w, int h)
+x_resize_subwindow (Lisp_Image_Instance* ii, int w, int h)
 {
   if (IMAGE_INSTANCE_TYPE (ii) == IMAGE_SUBWINDOW)
     {
 {
   if (IMAGE_INSTANCE_TYPE (ii) == IMAGE_SUBWINDOW)
     {
@@ -2278,11 +2285,13 @@ x_resize_subwindow (struct Lisp_Image_Instance* ii, int w, int h)
     {
       Arg al[2];
 
     {
       Arg al[2];
 
-      if (!XtIsRealized (IMAGE_INSTANCE_X_WIDGET_ID (ii)))
+      if ( !XtIsManaged(IMAGE_INSTANCE_X_WIDGET_ID (ii))
+          ||
+          IMAGE_INSTANCE_X_WIDGET_ID (ii)->core.being_destroyed )
        {
          Lisp_Object sw;
          XSETIMAGE_INSTANCE (sw, ii);
        {
          Lisp_Object sw;
          XSETIMAGE_INSTANCE (sw, ii);
-         signal_simple_error ("XEmacs bug: subwindow is not realized", sw);
+         signal_simple_error ("XEmacs bug: subwindow is deleted", sw);
        }
 
       XtSetArg (al [0], XtNwidth, (Dimension)w);
        }
 
       XtSetArg (al [0], XtNwidth, (Dimension)w);
@@ -2299,7 +2308,7 @@ x_resize_subwindow (struct Lisp_Image_Instance* ii, int w, int h)
 /************************************************************************/
 
 static void
 /************************************************************************/
 
 static void
-update_widget_face (widget_value* wv, struct Lisp_Image_Instance *ii,
+update_widget_face (widget_value* wv, Lisp_Image_Instance *ii,
                    Lisp_Object domain)
 {
 #ifdef LWLIB_WIDGETS_MOTIF
                    Lisp_Object domain)
 {
 #ifdef LWLIB_WIDGETS_MOTIF
@@ -2336,7 +2345,7 @@ update_widget_face (widget_value* wv, struct Lisp_Image_Instance *ii,
 }
 
 static void
 }
 
 static void
-update_tab_widget_face (widget_value* wv, struct Lisp_Image_Instance *ii,
+update_tab_widget_face (widget_value* wv, Lisp_Image_Instance *ii,
                        Lisp_Object domain)
 {
   if (wv->contents)
                        Lisp_Object domain)
 {
   if (wv->contents)
@@ -2366,7 +2375,7 @@ x_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                      int dest_mask, Lisp_Object domain,
                      CONST char* type, widget_value* wv)
 {
                      int dest_mask, Lisp_Object domain,
                      CONST char* type, widget_value* wv)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii), pixel;
   struct device* d = XDEVICE (device);
   Lisp_Object frame = FW_FRAME (domain);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii), pixel;
   struct device* d = XDEVICE (device);
   Lisp_Object frame = FW_FRAME (domain);
@@ -2388,7 +2397,9 @@ x_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
   IMAGE_INSTANCE_TYPE (ii) = IMAGE_WIDGET;
 
   if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)))
   IMAGE_INSTANCE_TYPE (ii) = IMAGE_WIDGET;
 
   if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)))
-    GET_C_STRING_OS_DATA_ALLOCA (IMAGE_INSTANCE_WIDGET_TEXT (ii), nm);
+    TO_EXTERNAL_FORMAT (LISP_STRING, IMAGE_INSTANCE_WIDGET_TEXT (ii),
+                       C_STRING_ALLOCA, nm,
+                       Qnative);
 
   ii->data = xnew_and_zero (struct x_subwindow_data);
 
 
   ii->data = xnew_and_zero (struct x_subwindow_data);
 
@@ -2475,7 +2486,7 @@ static Lisp_Object
 x_widget_set_property (Lisp_Object image_instance, Lisp_Object prop,
                       Lisp_Object val)
 {
 x_widget_set_property (Lisp_Object image_instance, Lisp_Object prop,
                       Lisp_Object val)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
 
   /* Modify the text properties of the widget */
   if (EQ (prop, Q_text))
 
   /* Modify the text properties of the widget */
   if (EQ (prop, Q_text))
@@ -2483,7 +2494,9 @@ x_widget_set_property (Lisp_Object image_instance, Lisp_Object prop,
       char* str;
       widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii));
       CHECK_STRING (val);
       char* str;
       widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii));
       CHECK_STRING (val);
-      GET_C_STRING_OS_DATA_ALLOCA (val, str);
+      TO_EXTERNAL_FORMAT (LISP_STRING, val,
+                         C_STRING_ALLOCA, str,
+                         Qnative);
       wv->value = str;
       lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (ii), wv, False);
     }
       wv->value = str;
       lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (ii), wv, False);
     }
@@ -2502,12 +2515,12 @@ x_widget_set_property (Lisp_Object image_instance, Lisp_Object prop,
 static Lisp_Object
 x_widget_property (Lisp_Object image_instance, Lisp_Object prop)
 {
 static Lisp_Object
 x_widget_property (Lisp_Object image_instance, Lisp_Object prop)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   /* get the text from a control */
   if (EQ (prop, Q_text))
     {
       widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii));
   /* get the text from a control */
   if (EQ (prop, Q_text))
     {
       widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii));
-      return build_ext_string (wv->value, FORMAT_OS);
+      return build_ext_string (wv->value, Qnative);
     }
   return Qunbound;
 }
     }
   return Qunbound;
 }
@@ -2523,7 +2536,7 @@ x_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                      Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                      int dest_mask, Lisp_Object domain)
 {
                      Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                      int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
   Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image);
   widget_value* wv = xmalloc_widget_value ();
   Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
   Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image);
   widget_value* wv = xmalloc_widget_value ();
@@ -2540,7 +2553,8 @@ x_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                        pointer_bg, dest_mask, domain, "button", wv);
 
   /* add the image if one was given */
                        pointer_bg, dest_mask, domain, "button", wv);
 
   /* add the image if one was given */
-  if (!NILP (glyph) && IMAGE_INSTANCEP (glyph))
+  if (!NILP (glyph) && IMAGE_INSTANCEP (glyph)
+      && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (glyph)))
     {
       Arg al [2];
       int ac =0;
     {
       Arg al [2];
       int ac =0;
@@ -2558,7 +2572,7 @@ x_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 static Lisp_Object
 x_button_property (Lisp_Object image_instance, Lisp_Object prop)
 {
 static Lisp_Object
 x_button_property (Lisp_Object image_instance, Lisp_Object prop)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   /* check the state of a button */
   if (EQ (prop, Q_selected))
     {
   /* check the state of a button */
   if (EQ (prop, Q_selected))
     {
@@ -2578,7 +2592,7 @@ x_progress_gauge_instantiate (Lisp_Object image_instance, Lisp_Object instantiat
                        Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                        int dest_mask, Lisp_Object domain)
 {
                        Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                        int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
   widget_value* wv = xmalloc_widget_value ();
 
   Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
   widget_value* wv = xmalloc_widget_value ();
 
@@ -2593,7 +2607,7 @@ static Lisp_Object
 x_progress_gauge_set_property (Lisp_Object image_instance, Lisp_Object prop,
                         Lisp_Object val)
 {
 x_progress_gauge_set_property (Lisp_Object image_instance, Lisp_Object prop,
                         Lisp_Object val)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
 
   if (EQ (prop, Q_percent))
     {
 
   if (EQ (prop, Q_percent))
     {
@@ -2612,7 +2626,7 @@ x_edit_field_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                    Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                    int dest_mask, Lisp_Object domain)
 {
                    Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                    int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
   widget_value* wv = xmalloc_widget_value ();
 
   Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
   widget_value* wv = xmalloc_widget_value ();
 
@@ -2629,7 +2643,7 @@ x_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                     Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                     int dest_mask, Lisp_Object domain)
 {
                     Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                     int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   widget_value * wv = 0;
   /* This is not done generically because of sizing problems under
      mswindows. */
   widget_value * wv = 0;
   /* This is not done generically because of sizing problems under
      mswindows. */
@@ -2648,7 +2662,7 @@ x_tab_control_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                           Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                           int dest_mask, Lisp_Object domain)
 {
                           Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                           int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   widget_value * wv =
     gui_items_to_widget_values (IMAGE_INSTANCE_WIDGET_ITEMS (ii));
 
   widget_value * wv =
     gui_items_to_widget_values (IMAGE_INSTANCE_WIDGET_ITEMS (ii));
 
@@ -2664,7 +2678,7 @@ static Lisp_Object
 x_tab_control_set_property (Lisp_Object image_instance, Lisp_Object prop,
                            Lisp_Object val)
 {
 x_tab_control_set_property (Lisp_Object image_instance, Lisp_Object prop,
                            Lisp_Object val)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
 
   if (EQ (prop, Q_items))
     {
 
   if (EQ (prop, Q_items))
     {
@@ -2695,7 +2709,7 @@ x_label_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                     Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                     int dest_mask, Lisp_Object domain)
 {
                     Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                     int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
   widget_value* wv = xmalloc_widget_value ();
 
   Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
   widget_value* wv = xmalloc_widget_value ();
 
@@ -2858,7 +2872,7 @@ complex_vars_of_glyphs_x (void)
                     make_int (name##_height),                  \
                     make_ext_string (name##_bits,              \
                                      sizeof (name##_bits),     \
                     make_int (name##_height),                  \
                     make_ext_string (name##_bits,              \
                                      sizeof (name##_bits),     \
-                                     FORMAT_BINARY))),         \
+                                     Qbinary))),               \
      Qglobal, Qx, Qnil)
 
   BUILD_GLYPH_INST (Vtruncation_glyph, truncator);
      Qglobal, Qx, Qnil)
 
   BUILD_GLYPH_INST (Vtruncation_glyph, truncator);
index d49ba53..13d7570 100644 (file)
@@ -23,8 +23,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with:  Not in FSF. */
 
 
 /* Synched up with:  Not in FSF. */
 
-#ifndef _XEMACS_GLYPHS_X_H_
-#define _XEMACS_GLYPHS_X_H_
+#ifndef INCLUDED_glyphs_x_h_
+#define INCLUDED_glyphs_x_h_
 
 #include "glyphs.h"
 
 
 #include "glyphs.h"
 
@@ -142,4 +142,4 @@ struct x_subwindow_data
   ((Widget) IMAGE_INSTANCE_SUBWINDOW_ID (i))
 
 #endif /* HAVE_X_WINDOWS */
   ((Widget) IMAGE_INSTANCE_SUBWINDOW_ID (i))
 
 #endif /* HAVE_X_WINDOWS */
-#endif /* _XEMACS_GLYPHS_X_H_ */
+#endif /* INCLUDED_glyphs_x_h_ */
index 1d71858..ce856cf 100644 (file)
@@ -168,7 +168,7 @@ decode_device_ii_format (Lisp_Object device, Lisp_Object format,
          if ((NILP (d) && NILP (device))
              ||
              (!NILP (device) &&
          if ((NILP (d) && NILP (device))
              ||
              (!NILP (device) &&
-              EQ (CONSOLE_TYPE (XCONSOLE 
+              EQ (CONSOLE_TYPE (XCONSOLE
                                 (DEVICE_CONSOLE (XDEVICE (device)))), d)))
            return Dynarr_at (the_image_instantiator_format_entry_dynarr, i).meths;
        }
                                 (DEVICE_CONSOLE (XDEVICE (device)))), d)))
            return Dynarr_at (the_image_instantiator_format_entry_dynarr, i).meths;
        }
@@ -563,7 +563,7 @@ normalize_image_instantiator (Lisp_Object instantiator,
     struct image_instantiator_methods *meths;
 
     GCPRO1 (instantiator);
     struct image_instantiator_methods *meths;
 
     GCPRO1 (instantiator);
-    
+
     meths = decode_image_instantiator_format (XVECTOR_DATA (instantiator)[0],
                                              ERROR_ME);
     RETURN_UNGCPRO (IIFORMAT_METH_OR_GIVEN (meths, normalize,
     meths = decode_image_instantiator_format (XVECTOR_DATA (instantiator)[0],
                                              ERROR_ME);
     RETURN_UNGCPRO (IIFORMAT_METH_OR_GIVEN (meths, normalize,
@@ -594,7 +594,7 @@ instantiate_image_instantiator (Lisp_Object device, Lisp_Object domain,
   methp = (int)HAS_IIFORMAT_METH_P (meths, instantiate);
   MAYBE_IIFORMAT_METH (meths, instantiate, (ii, instantiator, pointer_fg,
                                            pointer_bg, dest_mask, domain));
   methp = (int)HAS_IIFORMAT_METH_P (meths, instantiate);
   MAYBE_IIFORMAT_METH (meths, instantiate, (ii, instantiator, pointer_fg,
                                            pointer_bg, dest_mask, domain));
-  
+
   /* now do device specific instantiation */
   meths = decode_device_ii_format (device, XVECTOR_DATA (instantiator)[0],
                                   ERROR_ME_NOT);
   /* now do device specific instantiation */
   meths = decode_device_ii_format (device, XVECTOR_DATA (instantiator)[0],
                                   ERROR_ME_NOT);
@@ -620,7 +620,7 @@ Lisp_Object Qimage_instancep;
 static Lisp_Object
 mark_image_instance (Lisp_Object obj)
 {
 static Lisp_Object
 mark_image_instance (Lisp_Object obj)
 {
-  struct Lisp_Image_Instance *i = XIMAGE_INSTANCE (obj);
+  Lisp_Image_Instance *i = XIMAGE_INSTANCE (obj);
 
   mark_object (i->name);
   /* We don't mark the glyph reference since that would create a
 
   mark_object (i->name);
   /* We don't mark the glyph reference since that would create a
@@ -641,6 +641,7 @@ mark_image_instance (Lisp_Object obj)
       break;
 
     case IMAGE_WIDGET:
       break;
 
     case IMAGE_WIDGET:
+    case IMAGE_LAYOUT:
       mark_object (IMAGE_INSTANCE_WIDGET_TYPE (i));
       mark_object (IMAGE_INSTANCE_WIDGET_PROPS (i));
       mark_object (IMAGE_INSTANCE_WIDGET_FACE (i));
       mark_object (IMAGE_INSTANCE_WIDGET_TYPE (i));
       mark_object (IMAGE_INSTANCE_WIDGET_PROPS (i));
       mark_object (IMAGE_INSTANCE_WIDGET_FACE (i));
@@ -649,12 +650,6 @@ mark_image_instance (Lisp_Object obj)
       mark_object (IMAGE_INSTANCE_SUBWINDOW_FRAME (i));
       break;
 
       mark_object (IMAGE_INSTANCE_SUBWINDOW_FRAME (i));
       break;
 
-    case IMAGE_LAYOUT:
-      mark_object (IMAGE_INSTANCE_LAYOUT_CHILDREN (i));
-      mark_object (IMAGE_INSTANCE_LAYOUT_BORDER (i));
-      mark_object (IMAGE_INSTANCE_SUBWINDOW_FRAME (i));
-      break;
-
     default:
       break;
     }
     default:
       break;
     }
@@ -669,7 +664,7 @@ print_image_instance (Lisp_Object obj, Lisp_Object printcharfun,
                      int escapeflag)
 {
   char buf[100];
                      int escapeflag)
 {
   char buf[100];
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (obj);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (obj);
 
   if (print_readably)
     error ("printing unreadable object #<image-instance 0x%x>",
 
   if (print_readably)
     error ("printing unreadable object #<image-instance 0x%x>",
@@ -781,10 +776,10 @@ print_image_instance (Lisp_Object obj, Lisp_Object printcharfun,
       write_c_string (" on #<", printcharfun);
       {
        struct frame* f  = XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii));
       write_c_string (" on #<", printcharfun);
       {
        struct frame* f  = XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii));
-       
+
        if (!FRAME_LIVE_P (f))
          write_c_string ("dead", printcharfun);
        if (!FRAME_LIVE_P (f))
          write_c_string ("dead", printcharfun);
-       else 
+       else
          write_c_string (DEVICE_TYPE_NAME (XDEVICE (FRAME_DEVICE (f))),
                          printcharfun);
 
          write_c_string (DEVICE_TYPE_NAME (XDEVICE (FRAME_DEVICE (f))),
                          printcharfun);
 
@@ -793,7 +788,7 @@ print_image_instance (Lisp_Object obj, Lisp_Object printcharfun,
       write_c_string (">", printcharfun);
       sprintf (buf, " 0x%p", IMAGE_INSTANCE_SUBWINDOW_ID (ii));
       write_c_string (buf, printcharfun);
       write_c_string (">", printcharfun);
       sprintf (buf, " 0x%p", IMAGE_INSTANCE_SUBWINDOW_ID (ii));
       write_c_string (buf, printcharfun);
-      
+
       break;
 
     default:
       break;
 
     default:
@@ -809,7 +804,7 @@ print_image_instance (Lisp_Object obj, Lisp_Object printcharfun,
 static void
 finalize_image_instance (void *header, int for_disksave)
 {
 static void
 finalize_image_instance (void *header, int for_disksave)
 {
-  struct Lisp_Image_Instance *i = (struct Lisp_Image_Instance *) header;
+  Lisp_Image_Instance *i = (Lisp_Image_Instance *) header;
 
   if (IMAGE_INSTANCE_TYPE (i) == IMAGE_NOTHING)
     /* objects like this exist at dump time, so don't bomb out. */
 
   if (IMAGE_INSTANCE_TYPE (i) == IMAGE_NOTHING)
     /* objects like this exist at dump time, so don't bomb out. */
@@ -821,7 +816,7 @@ finalize_image_instance (void *header, int for_disksave)
       ||
       IMAGE_INSTANCE_TYPE (i) == IMAGE_SUBWINDOW)
     {
       ||
       IMAGE_INSTANCE_TYPE (i) == IMAGE_SUBWINDOW)
     {
-      MARK_FRAME_SUBWINDOWS_CHANGED 
+      MARK_FRAME_SUBWINDOWS_CHANGED
        (XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (i)));
     }
 
        (XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (i)));
     }
 
@@ -831,8 +826,8 @@ finalize_image_instance (void *header, int for_disksave)
 static int
 image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
 static int
 image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  struct Lisp_Image_Instance *i1 = XIMAGE_INSTANCE (obj1);
-  struct Lisp_Image_Instance *i2 = XIMAGE_INSTANCE (obj2);
+  Lisp_Image_Instance *i1 = XIMAGE_INSTANCE (obj1);
+  Lisp_Image_Instance *i2 = XIMAGE_INSTANCE (obj2);
   struct device *d1 = XDEVICE (i1->device);
   struct device *d2 = XDEVICE (i2->device);
 
   struct device *d1 = XDEVICE (i1->device);
   struct device *d2 = XDEVICE (i2->device);
 
@@ -881,6 +876,7 @@ image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
       break;
 
     case IMAGE_WIDGET:
       break;
 
     case IMAGE_WIDGET:
+    case IMAGE_LAYOUT:
       if (!(EQ (IMAGE_INSTANCE_WIDGET_TYPE (i1),
                IMAGE_INSTANCE_WIDGET_TYPE (i2))
            && IMAGE_INSTANCE_SUBWINDOW_ID (i1) ==
       if (!(EQ (IMAGE_INSTANCE_WIDGET_TYPE (i1),
                IMAGE_INSTANCE_WIDGET_TYPE (i2))
            && IMAGE_INSTANCE_SUBWINDOW_ID (i1) ==
@@ -894,19 +890,7 @@ image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
            ))
        return 0;
       break;
            ))
        return 0;
       break;
-      
-    case IMAGE_LAYOUT:
-      if (IMAGE_INSTANCE_TYPE (i1) == IMAGE_LAYOUT
-         &&
-         !(EQ (IMAGE_INSTANCE_LAYOUT_BORDER (i1),
-               IMAGE_INSTANCE_LAYOUT_BORDER (i2))
-           &&
-           internal_equal (IMAGE_INSTANCE_LAYOUT_CHILDREN (i1),
-                           IMAGE_INSTANCE_LAYOUT_CHILDREN (i2),
-                           depth + 1)))
-       return 0;
-      break;
-      
+
     case IMAGE_SUBWINDOW:
       if (!(IMAGE_INSTANCE_SUBWINDOW_ID (i1) ==
            IMAGE_INSTANCE_SUBWINDOW_ID (i2)))
     case IMAGE_SUBWINDOW:
       if (!(IMAGE_INSTANCE_SUBWINDOW_ID (i1) ==
            IMAGE_INSTANCE_SUBWINDOW_ID (i2)))
@@ -923,7 +907,7 @@ image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 static unsigned long
 image_instance_hash (Lisp_Object obj, int depth)
 {
 static unsigned long
 image_instance_hash (Lisp_Object obj, int depth)
 {
-  struct Lisp_Image_Instance *i = XIMAGE_INSTANCE (obj);
+  Lisp_Image_Instance *i = XIMAGE_INSTANCE (obj);
   struct device *d = XDEVICE (i->device);
   unsigned long hash = HASH3 ((unsigned long) d,
                              IMAGE_INSTANCE_WIDTH (i),
   struct device *d = XDEVICE (i->device);
   unsigned long hash = HASH3 ((unsigned long) d,
                              IMAGE_INSTANCE_WIDTH (i),
@@ -949,7 +933,8 @@ image_instance_hash (Lisp_Object obj, int depth)
       break;
 
     case IMAGE_WIDGET:
       break;
 
     case IMAGE_WIDGET:
-      hash = HASH4 (hash, 
+    case IMAGE_LAYOUT:
+      hash = HASH4 (hash,
                    internal_hash (IMAGE_INSTANCE_WIDGET_TYPE (i), depth + 1),
                    internal_hash (IMAGE_INSTANCE_WIDGET_PROPS (i), depth + 1),
                    internal_hash (IMAGE_INSTANCE_WIDGET_ITEMS (i), depth + 1));
                    internal_hash (IMAGE_INSTANCE_WIDGET_TYPE (i), depth + 1),
                    internal_hash (IMAGE_INSTANCE_WIDGET_PROPS (i), depth + 1),
                    internal_hash (IMAGE_INSTANCE_WIDGET_ITEMS (i), depth + 1));
@@ -957,13 +942,6 @@ image_instance_hash (Lisp_Object obj, int depth)
       hash = HASH2 (hash, (int) IMAGE_INSTANCE_SUBWINDOW_ID (i));
       break;
 
       hash = HASH2 (hash, (int) IMAGE_INSTANCE_SUBWINDOW_ID (i));
       break;
 
-    case IMAGE_LAYOUT:
-      hash = HASH3 (hash,
-                   internal_hash (IMAGE_INSTANCE_LAYOUT_BORDER (i), depth + 1),
-                   internal_hash (IMAGE_INSTANCE_LAYOUT_CHILDREN (i),
-                                  depth + 1));
-      break;
-
     default:
       abort ();
     }
     default:
       abort ();
     }
@@ -976,13 +954,13 @@ DEFINE_LRECORD_IMPLEMENTATION ("image-instance", image_instance,
                               mark_image_instance, print_image_instance,
                               finalize_image_instance, image_instance_equal,
                               image_instance_hash, 0,
                               mark_image_instance, print_image_instance,
                               finalize_image_instance, image_instance_equal,
                               image_instance_hash, 0,
-                              struct Lisp_Image_Instance);
+                              Lisp_Image_Instance);
 
 static Lisp_Object
 allocate_image_instance (Lisp_Object device, Lisp_Object glyph)
 {
 
 static Lisp_Object
 allocate_image_instance (Lisp_Object device, Lisp_Object glyph)
 {
-  struct Lisp_Image_Instance *lp =
-    alloc_lcrecord_type (struct Lisp_Image_Instance, &lrecord_image_instance);
+  Lisp_Image_Instance *lp =
+    alloc_lcrecord_type (Lisp_Image_Instance, &lrecord_image_instance);
   Lisp_Object val;
 
   zero_lcrecord (lp);
   Lisp_Object val;
 
   zero_lcrecord (lp);
@@ -1241,7 +1219,7 @@ If DEST-TYPES is omitted, all possible types are allowed.
 NO-ERROR controls what happens when the image cannot be generated.
 If nil, an error message is generated.  If t, no messages are
 generated and this function returns nil.  If anything else, a warning
 NO-ERROR controls what happens when the image cannot be generated.
 If nil, an error message is generated.  If t, no messages are
 generated and this function returns nil.  If anything else, a warning
-message is generated and this function returns nil.  
+message is generated and this function returns nil.
 */
        (data, device, dest_types, no_error))
 {
 */
        (data, device, dest_types, no_error))
 {
@@ -1296,13 +1274,13 @@ This will only be non-nil for text image instances and widgets.
 }
 
 DEFUN ("image-instance-property", Fimage_instance_property, 2, 2, 0, /*
 }
 
 DEFUN ("image-instance-property", Fimage_instance_property, 2, 2, 0, /*
-Return the given property of the given image instance.  
+Return the given property of the given image instance.
 Returns nil if the property or the property method do not exist for
 Returns nil if the property or the property method do not exist for
-the image instance in the domain.  
+the image instance in the domain.
 */
        (image_instance, prop))
 {
 */
        (image_instance, prop))
 {
-  struct Lisp_Image_Instance* ii;
+  Lisp_Image_Instance* ii;
   Lisp_Object type, ret;
   struct image_instantiator_methods* meths;
 
   Lisp_Object type, ret;
   struct image_instantiator_methods* meths;
 
@@ -1312,10 +1290,10 @@ the image instance in the domain.
 
   /* ... then try device specific methods ... */
   type = encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii));
 
   /* ... then try device specific methods ... */
   type = encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii));
-  meths = decode_device_ii_format (IMAGE_INSTANCE_DEVICE (ii), 
+  meths = decode_device_ii_format (IMAGE_INSTANCE_DEVICE (ii),
                                   type, ERROR_ME_NOT);
   if (meths && HAS_IIFORMAT_METH_P (meths, property)
                                   type, ERROR_ME_NOT);
   if (meths && HAS_IIFORMAT_METH_P (meths, property)
-      && 
+      &&
       !UNBOUNDP (ret =  IIFORMAT_METH (meths, property, (image_instance, prop))))
     {
       return ret;
       !UNBOUNDP (ret =  IIFORMAT_METH (meths, property, (image_instance, prop))))
     {
       return ret;
@@ -1333,13 +1311,13 @@ the image instance in the domain.
 }
 
 DEFUN ("set-image-instance-property", Fset_image_instance_property, 3, 3, 0, /*
 }
 
 DEFUN ("set-image-instance-property", Fset_image_instance_property, 3, 3, 0, /*
-Set the given property of the given image instance.  
+Set the given property of the given image instance.
 Does nothing if the property or the property method do not exist for
 the image instance in the domain.
 */
        (image_instance, prop, val))
 {
 Does nothing if the property or the property method do not exist for
 the image instance in the domain.
 */
        (image_instance, prop, val))
 {
-  struct Lisp_Image_Instance* ii;
+  Lisp_Image_Instance* ii;
   Lisp_Object type, ret;
   struct image_instantiator_methods* meths;
 
   Lisp_Object type, ret;
   struct image_instantiator_methods* meths;
 
@@ -1348,11 +1326,11 @@ the image instance in the domain.
   ii = XIMAGE_INSTANCE (image_instance);
   type = encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii));
   /* try device specific methods first ... */
   ii = XIMAGE_INSTANCE (image_instance);
   type = encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii));
   /* try device specific methods first ... */
-  meths = decode_device_ii_format (IMAGE_INSTANCE_DEVICE (ii), 
+  meths = decode_device_ii_format (IMAGE_INSTANCE_DEVICE (ii),
                                   type, ERROR_ME_NOT);
   if (meths && HAS_IIFORMAT_METH_P (meths, set_property)
       &&
                                   type, ERROR_ME_NOT);
   if (meths && HAS_IIFORMAT_METH_P (meths, set_property)
       &&
-      !UNBOUNDP (ret = 
+      !UNBOUNDP (ret =
                 IIFORMAT_METH (meths, set_property, (image_instance, prop, val))))
     {
       val = ret;
                 IIFORMAT_METH (meths, set_property, (image_instance, prop, val))))
     {
       val = ret;
@@ -1363,7 +1341,7 @@ the image instance in the domain.
       meths = decode_device_ii_format (Qnil, type, ERROR_ME_NOT);
       if (meths && HAS_IIFORMAT_METH_P (meths, set_property)
          &&
       meths = decode_device_ii_format (Qnil, type, ERROR_ME_NOT);
       if (meths && HAS_IIFORMAT_METH_P (meths, set_property)
          &&
-         !UNBOUNDP (ret = 
+         !UNBOUNDP (ret =
                     IIFORMAT_METH (meths, set_property, (image_instance, prop, val))))
        {
          val = ret;
                     IIFORMAT_METH (meths, set_property, (image_instance, prop, val))))
        {
          val = ret;
@@ -1374,7 +1352,10 @@ the image instance in the domain.
        }
     }
 
        }
     }
 
-  /* Make sure the image instance gets redisplayed. */
+  /* Make sure the image instance gets redisplayed.
+
+     ### This currently does not change the dirty state of an
+     enclosing layout which may be bad. */
   MARK_IMAGE_INSTANCE_CHANGED (ii);
   MARK_SUBWINDOWS_STATE_CHANGED;
   MARK_GLYPHS_CHANGED;
   MARK_IMAGE_INSTANCE_CHANGED (ii);
   MARK_SUBWINDOWS_STATE_CHANGED;
   MARK_GLYPHS_CHANGED;
@@ -1551,7 +1532,7 @@ colorized mono pixmaps and for pointers.)
     case IMAGE_WIDGET:
       return FACE_FOREGROUND (
                              XIMAGE_INSTANCE_WIDGET_FACE (image_instance),
     case IMAGE_WIDGET:
       return FACE_FOREGROUND (
                              XIMAGE_INSTANCE_WIDGET_FACE (image_instance),
-                             XIMAGE_INSTANCE_SUBWINDOW_FRAME 
+                             XIMAGE_INSTANCE_SUBWINDOW_FRAME
                              (image_instance));
 
     default:
                              (image_instance));
 
     default:
@@ -1578,7 +1559,7 @@ colorized mono pixmaps and for pointers.)
     case IMAGE_WIDGET:
       return FACE_BACKGROUND (
                              XIMAGE_INSTANCE_WIDGET_FACE (image_instance),
     case IMAGE_WIDGET:
       return FACE_BACKGROUND (
                              XIMAGE_INSTANCE_WIDGET_FACE (image_instance),
-                             XIMAGE_INSTANCE_SUBWINDOW_FRAME 
+                             XIMAGE_INSTANCE_SUBWINDOW_FRAME
                              (image_instance));
 
     default:
                              (image_instance));
 
     default:
@@ -1628,21 +1609,21 @@ instance is a mono pixmap; otherwise, the same image instance is returned.
 /* Find out desired geometry of the image instance. If there is no
    special function then just return the width and / or height. */
 void
 /* Find out desired geometry of the image instance. If there is no
    special function then just return the width and / or height. */
 void
-image_instance_query_geometry (Lisp_Object image_instance, 
-                              unsigned int* width, unsigned int* height, 
+image_instance_query_geometry (Lisp_Object image_instance,
+                              unsigned int* width, unsigned int* height,
                               enum image_instance_geometry disp,
                               Lisp_Object domain)
 {
                               enum image_instance_geometry disp,
                               Lisp_Object domain)
 {
-  struct Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object type;
   struct image_instantiator_methods* meths;
 
   type = encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii));
   meths = decode_device_ii_format (Qnil, type, ERROR_ME_NOT);
   Lisp_Object type;
   struct image_instantiator_methods* meths;
 
   type = encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii));
   meths = decode_device_ii_format (Qnil, type, ERROR_ME_NOT);
-  
+
   if (meths && HAS_IIFORMAT_METH_P (meths, query_geometry))
     {
   if (meths && HAS_IIFORMAT_METH_P (meths, query_geometry))
     {
-      IIFORMAT_METH (meths, query_geometry, (image_instance, width, height, 
+      IIFORMAT_METH (meths, query_geometry, (image_instance, width, height,
                                             disp, domain));
     }
   else
                                             disp, domain));
     }
   else
@@ -1662,11 +1643,11 @@ image_instance_query_geometry (Lisp_Object image_instance,
    don't mind what size you have (normal widgets) and one where you
    want to specifiy something (layout widgets). */
 void
    don't mind what size you have (normal widgets) and one where you
    want to specifiy something (layout widgets). */
 void
-image_instance_layout (Lisp_Object image_instance, 
-                      unsigned int width, unsigned int height, 
+image_instance_layout (Lisp_Object image_instance,
+                      unsigned int width, unsigned int height,
                       Lisp_Object domain)
 {
                       Lisp_Object domain)
 {
-  struct Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object type;
   struct image_instantiator_methods* meths;
 
   Lisp_Object type;
   struct image_instantiator_methods* meths;
 
@@ -1683,8 +1664,8 @@ image_instance_layout (Lisp_Object image_instance,
       /* Get the desired geometry. */
       if (meths && HAS_IIFORMAT_METH_P (meths, query_geometry))
        {
       /* Get the desired geometry. */
       if (meths && HAS_IIFORMAT_METH_P (meths, query_geometry))
        {
-         IIFORMAT_METH (meths, query_geometry, (image_instance, &dwidth, &dheight, 
-                                                IMAGE_DESIRED_GEOMETRY, 
+         IIFORMAT_METH (meths, query_geometry, (image_instance, &dwidth, &dheight,
+                                                IMAGE_DESIRED_GEOMETRY,
                                                 domain));
        }
       else
                                                 domain));
        }
       else
@@ -1704,12 +1685,46 @@ image_instance_layout (Lisp_Object image_instance,
      we set the glyph geometry and lay it out. */
   IMAGE_INSTANCE_WIDTH (ii) = width;
   IMAGE_INSTANCE_HEIGHT (ii) = height;
      we set the glyph geometry and lay it out. */
   IMAGE_INSTANCE_WIDTH (ii) = width;
   IMAGE_INSTANCE_HEIGHT (ii) = height;
-  
+
   if (meths && HAS_IIFORMAT_METH_P (meths, layout))
     {
       IIFORMAT_METH (meths, layout, (image_instance, width, height, domain));
     }
   /* else no change to the geometry. */
   if (meths && HAS_IIFORMAT_METH_P (meths, layout))
     {
       IIFORMAT_METH (meths, layout, (image_instance, width, height, domain));
     }
   /* else no change to the geometry. */
+
+  XIMAGE_INSTANCE_DIRTYP (image_instance) = 0;
+}
+
+/*
+ * Mark image instance in W as dirty if (a) W's faces have changed and
+ * (b) GLYPH_OR_II instance in W is a string.
+ *
+ * Return non-zero if instance has been marked dirty.
+ */
+int
+invalidate_glyph_geometry_maybe (Lisp_Object glyph_or_ii, struct window* w)
+{
+  if (XFRAME(WINDOW_FRAME(w))->faces_changed)
+    {
+      Lisp_Object image = glyph_or_ii;
+
+      if (GLYPHP (glyph_or_ii))
+       {
+         Lisp_Object window;
+         XSETWINDOW (window, w);
+         image = glyph_image_instance (glyph_or_ii, window, ERROR_ME_NOT, 1);
+       }
+
+      if (TEXT_IMAGE_INSTANCEP (image))
+       {
+         XIMAGE_INSTANCE_DIRTYP (image) = 1;
+         if (GLYPHP (glyph_or_ii))
+           XGLYPH_DIRTYP (glyph_or_ii) = 1;
+         return 1;
+       }
+    }
+
+  return 0;
 }
 
 \f
 }
 
 \f
@@ -1745,7 +1760,7 @@ nothing_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                     Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                     int dest_mask, Lisp_Object domain)
 {
                     Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                     int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
 
   if (dest_mask & IMAGE_NOTHING_MASK)
     IMAGE_INSTANCE_TYPE (ii) = IMAGE_NOTHING;
 
   if (dest_mask & IMAGE_NOTHING_MASK)
     IMAGE_INSTANCE_TYPE (ii) = IMAGE_NOTHING;
@@ -1815,8 +1830,8 @@ string_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                    int dest_mask, Lisp_Object domain)
 {
   Lisp_Object string = find_keyword_in_vector (instantiator, Q_data);
                    int dest_mask, Lisp_Object domain)
 {
   Lisp_Object string = find_keyword_in_vector (instantiator, Q_data);
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
-  
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+
   /* Should never get here with a domain other than a window. */
   assert (!NILP (string) && WINDOWP (domain));
   if (dest_mask & IMAGE_TEXT_MASK)
   /* Should never get here with a domain other than a window. */
   assert (!NILP (string) && WINDOWP (domain));
   if (dest_mask & IMAGE_TEXT_MASK)
@@ -1835,7 +1850,7 @@ string_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
    helper that is used elsewhere for calculating text geometry. */
 void
 query_string_geometry (Lisp_Object string, Lisp_Object face,
    helper that is used elsewhere for calculating text geometry. */
 void
 query_string_geometry (Lisp_Object string, Lisp_Object face,
-                      unsigned int* width, unsigned int* height, 
+                      unsigned int* width, unsigned int* height,
                       unsigned int* descent, Lisp_Object domain)
 {
   struct font_metric_info fm;
                       unsigned int* descent, Lisp_Object domain)
 {
   struct font_metric_info fm;
@@ -1851,7 +1866,7 @@ query_string_geometry (Lisp_Object string, Lisp_Object face,
       find_charsets_in_bufbyte_string (charsets,
                                       XSTRING_DATA   (string),
                                       XSTRING_LENGTH (string));
       find_charsets_in_bufbyte_string (charsets,
                                       XSTRING_DATA   (string),
                                       XSTRING_LENGTH (string));
-      
+
       /* Fallback to the default face if none was provided. */
       if (!NILP (face))
        {
       /* Fallback to the default face if none was provided. */
       if (!NILP (face))
        {
@@ -1863,16 +1878,16 @@ query_string_geometry (Lisp_Object string, Lisp_Object face,
        {
          cachel = WINDOW_FACE_CACHEL (XWINDOW (domain), DEFAULT_INDEX);
        }
        {
          cachel = WINDOW_FACE_CACHEL (XWINDOW (domain), DEFAULT_INDEX);
        }
-      
+
       ensure_face_cachel_complete (cachel, domain, charsets);
       face_cachel_charset_font_metric_info (cachel, charsets, &fm);
       ensure_face_cachel_complete (cachel, domain, charsets);
       face_cachel_charset_font_metric_info (cachel, charsets, &fm);
-      
+
       *height = fm.ascent + fm.descent;
       /* #### descent only gets set if we query the height as well. */
       if (descent)
        *descent = fm.descent;
     }
       *height = fm.ascent + fm.descent;
       /* #### descent only gets set if we query the height as well. */
       if (descent)
        *descent = fm.descent;
     }
-    
+
   /* Compute width */
   if (width)
     {
   /* Compute width */
   if (width)
     {
@@ -1900,22 +1915,22 @@ query_string_font (Lisp_Object string, Lisp_Object face, Lisp_Object domain)
   find_charsets_in_bufbyte_string (charsets,
                                   XSTRING_DATA   (string),
                                   XSTRING_LENGTH (string));
   find_charsets_in_bufbyte_string (charsets,
                                   XSTRING_DATA   (string),
                                   XSTRING_LENGTH (string));
+
   reset_face_cachel (&frame_cachel);
   update_face_cachel_data (&frame_cachel, frame, face);
   cachel = &frame_cachel;
 
   ensure_face_cachel_complete (cachel, domain, charsets);
   reset_face_cachel (&frame_cachel);
   update_face_cachel_data (&frame_cachel, frame, face);
   cachel = &frame_cachel;
 
   ensure_face_cachel_complete (cachel, domain, charsets);
-  
+
   for (i = 0; i < NUM_LEADING_BYTES; i++)
     {
       if (charsets[i])
        {
   for (i = 0; i < NUM_LEADING_BYTES; i++)
     {
       if (charsets[i])
        {
-         return FACE_CACHEL_FONT (cachel, 
-                                  CHARSET_BY_LEADING_BYTE (i + 
+         return FACE_CACHEL_FONT (cachel,
+                                  CHARSET_BY_LEADING_BYTE (i +
                                                            MIN_LEADING_BYTE));
 
                                                            MIN_LEADING_BYTE));
 
-       }  
+       }
     }
 
   return Qnil;                 /* NOT REACHED */
     }
 
   return Qnil;                 /* NOT REACHED */
@@ -1923,10 +1938,10 @@ query_string_font (Lisp_Object string, Lisp_Object face, Lisp_Object domain)
 
 static void
 text_query_geometry (Lisp_Object image_instance,
 
 static void
 text_query_geometry (Lisp_Object image_instance,
-                    unsigned int* width, unsigned int* height, 
+                    unsigned int* width, unsigned int* height,
                     enum image_instance_geometry disp, Lisp_Object domain)
 {
                     enum image_instance_geometry disp, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   unsigned int descent = 0;
 
   query_string_geometry (IMAGE_INSTANCE_TEXT_STRING (ii),
   unsigned int descent = 0;
 
   query_string_geometry (IMAGE_INSTANCE_TEXT_STRING (ii),
@@ -1943,7 +1958,7 @@ static Lisp_Object
 text_set_property (Lisp_Object image_instance, Lisp_Object prop,
                   Lisp_Object val)
 {
 text_set_property (Lisp_Object image_instance, Lisp_Object prop,
                   Lisp_Object val)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
 
   if (EQ (prop, Q_data))
     {
 
   if (EQ (prop, Q_data))
     {
@@ -1982,7 +1997,7 @@ formatted_string_instantiate (Lisp_Object image_instance,
   warn_when_safe (Qunimplemented, Qnotice,
                  "`formatted-string' not yet implemented; assuming `string'");
 
   warn_when_safe (Qunimplemented, Qnotice,
                  "`formatted-string' not yet implemented; assuming `string'");
 
-  string_instantiate (image_instance, instantiator, 
+  string_instantiate (image_instance, instantiator,
                      pointer_fg, pointer_bg, dest_mask, domain);
 }
 
                      pointer_fg, pointer_bg, dest_mask, domain);
 }
 
@@ -2149,7 +2164,9 @@ bitmap_to_lisp_data (Lisp_Object name, int *xhot, int *yhot,
   int result;
   CONST char *filename_ext;
 
   int result;
   CONST char *filename_ext;
 
-  GET_C_STRING_FILENAME_DATA_ALLOCA (name, filename_ext);
+  TO_EXTERNAL_FORMAT (LISP_STRING, name,
+                     C_STRING_ALLOCA, filename_ext,
+                     Qfile_name);
   result = read_bitmap_data_from_file (filename_ext, &w, &h,
                                       &data, xhot, yhot);
 
   result = read_bitmap_data_from_file (filename_ext, &w, &h,
                                       &data, xhot, yhot);
 
@@ -2159,7 +2176,7 @@ bitmap_to_lisp_data (Lisp_Object name, int *xhot, int *yhot,
       int len = (w + 7) / 8 * h;
 
       retval = list3 (make_int (w), make_int (h),
       int len = (w + 7) / 8 * h;
 
       retval = list3 (make_int (w), make_int (h),
-                     make_ext_string (data, len, FORMAT_BINARY));
+                     make_ext_string (data, len, Qbinary));
       XFree ((char *) data);
       return retval;
     }
       XFree ((char *) data);
       return retval;
     }
@@ -2392,8 +2409,10 @@ pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid)
   char **data;
   int result;
   char *fname = 0;
   char **data;
   int result;
   char *fname = 0;
-  
-  GET_C_STRING_FILENAME_DATA_ALLOCA (name, fname);
+
+  TO_EXTERNAL_FORMAT (LISP_STRING, name,
+                     C_STRING_ALLOCA, fname,
+                     Qfile_name);
   result = XpmReadFileToData (fname, &data);
 
   if (result == XpmSuccess)
   result = XpmReadFileToData (fname, &data);
 
   if (result == XpmSuccess)
@@ -2603,7 +2622,7 @@ DEFINE_SPECIFIER_TYPE (image);
 static void
 image_create (Lisp_Object obj)
 {
 static void
 image_create (Lisp_Object obj)
 {
-  struct Lisp_Specifier *image = XIMAGE_SPECIFIER (obj);
+  Lisp_Specifier *image = XIMAGE_SPECIFIER (obj);
 
   IMAGE_SPECIFIER_ALLOWED (image) = ~0; /* all are allowed */
   IMAGE_SPECIFIER_ATTACHEE (image) = Qnil;
 
   IMAGE_SPECIFIER_ALLOWED (image) = ~0; /* all are allowed */
   IMAGE_SPECIFIER_ATTACHEE (image) = Qnil;
@@ -2613,7 +2632,7 @@ image_create (Lisp_Object obj)
 static void
 image_mark (Lisp_Object obj)
 {
 static void
 image_mark (Lisp_Object obj)
 {
-  struct Lisp_Specifier *image = XIMAGE_SPECIFIER (obj);
+  Lisp_Specifier *image = XIMAGE_SPECIFIER (obj);
 
   mark_object (IMAGE_SPECIFIER_ATTACHEE (image));
   mark_object (IMAGE_SPECIFIER_ATTACHEE_PROPERTY (image));
 
   mark_object (IMAGE_SPECIFIER_ATTACHEE (image));
   mark_object (IMAGE_SPECIFIER_ATTACHEE_PROPERTY (image));
@@ -2694,7 +2713,7 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec,
          /* For the image instance cache, we do comparisons with EQ rather
             than with EQUAL, as we do for color and font names.
             The reasons are:
          /* For the image instance cache, we do comparisons with EQ rather
             than with EQUAL, as we do for color and font names.
             The reasons are:
-            
+
             1) pixmap data can be very long, and thus the hashing and
             comparing will take awhile.
             2) It's not so likely that we'll run into things that are EQUAL
             1) pixmap data can be very long, and thus the hashing and
             comparing will take awhile.
             2) It's not so likely that we'll run into things that are EQUAL
@@ -2730,15 +2749,15 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec,
             round it. */
          if (UNBOUNDP (instance)
              &&
             round it. */
          if (UNBOUNDP (instance)
              &&
-             dest_mask & (IMAGE_SUBWINDOW_MASK 
+             dest_mask & (IMAGE_SUBWINDOW_MASK
                           | IMAGE_WIDGET_MASK
                           | IMAGE_TEXT_MASK))
            {
              if (!WINDOWP (domain))
                signal_simple_error ("Can't instantiate text or subwindow outside a window",
                                     instantiator);
                           | IMAGE_WIDGET_MASK
                           | IMAGE_TEXT_MASK))
            {
              if (!WINDOWP (domain))
                signal_simple_error ("Can't instantiate text or subwindow outside a window",
                                     instantiator);
-             instance = Fgethash (instantiator, 
-                                  XWINDOW (domain)->subwindow_instance_cache, 
+             instance = Fgethash (instantiator,
+                                  XWINDOW (domain)->subwindow_instance_cache,
                                   Qunbound);
            }
        }
                                   Qunbound);
            }
        }
@@ -2750,7 +2769,7 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec,
                          noseeum_cons (pointerp ? ls3 : instantiator,
                                        subtable));
          int speccount = specpdl_depth ();
                          noseeum_cons (pointerp ? ls3 : instantiator,
                                        subtable));
          int speccount = specpdl_depth ();
-         
+
          /* make sure we cache the failures, too.
             Use an unwind-protect to catch such errors.
             If we fail, the unwind-protect records nil in
          /* make sure we cache the failures, too.
             Use an unwind-protect to catch such errors.
             If we fail, the unwind-protect records nil in
@@ -2765,7 +2784,7 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec,
                                                     pointer_fg, pointer_bg,
                                                     dest_mask,
                                                     glyph);
                                                     pointer_fg, pointer_bg,
                                                     dest_mask,
                                                     glyph);
-         
+
          Fsetcar (locative, instance);
          /* only after the image has been instantiated do we know
              whether we need to put it in the per-window image instance
          Fsetcar (locative, instance);
          /* only after the image has been instantiated do we know
              whether we need to put it in the per-window image instance
@@ -2777,7 +2796,7 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec,
              if (!WINDOWP (domain))
                signal_simple_error ("Can't instantiate subwindow outside a window",
                                     instantiator);
              if (!WINDOWP (domain))
                signal_simple_error ("Can't instantiate subwindow outside a window",
                                     instantiator);
-             
+
              Fsetcdr (XCDR (locative), XWINDOW (domain)->subwindow_instance_cache );
            }
          unbind_to (speccount, Qnil);
              Fsetcdr (XCDR (locative), XWINDOW (domain)->subwindow_instance_cache );
            }
          unbind_to (speccount, Qnil);
@@ -2875,7 +2894,7 @@ void
 set_image_attached_to (Lisp_Object obj, Lisp_Object face_or_glyph,
                       Lisp_Object property)
 {
 set_image_attached_to (Lisp_Object obj, Lisp_Object face_or_glyph,
                       Lisp_Object property)
 {
-  struct Lisp_Specifier *image = XIMAGE_SPECIFIER (obj);
+  Lisp_Specifier *image = XIMAGE_SPECIFIER (obj);
 
   IMAGE_SPECIFIER_ATTACHEE (image) = face_or_glyph;
   IMAGE_SPECIFIER_ATTACHEE_PROPERTY (image) = property;
 
   IMAGE_SPECIFIER_ATTACHEE (image) = face_or_glyph;
   IMAGE_SPECIFIER_ATTACHEE_PROPERTY (image) = property;
@@ -2946,7 +2965,7 @@ image_copy_vector_instantiator (Lisp_Object instantiator)
   instantiator = Fcopy_sequence (instantiator);
   elt = XVECTOR_DATA (instantiator);
   instantiator_len = XVECTOR_LENGTH (instantiator);
   instantiator = Fcopy_sequence (instantiator);
   elt = XVECTOR_DATA (instantiator);
   instantiator_len = XVECTOR_LENGTH (instantiator);
-  
+
   meths = decode_image_instantiator_format (elt[0], ERROR_ME);
 
   for (i = 1; i < instantiator_len; i += 2)
   meths = decode_image_instantiator_format (elt[0], ERROR_ME);
 
   for (i = 1; i < instantiator_len; i += 2)
@@ -3197,7 +3216,7 @@ file).
 static Lisp_Object
 mark_glyph (Lisp_Object obj)
 {
 static Lisp_Object
 mark_glyph (Lisp_Object obj)
 {
-  struct Lisp_Glyph *glyph = XGLYPH (obj);
+  Lisp_Glyph *glyph = XGLYPH (obj);
 
   mark_object (glyph->image);
   mark_object (glyph->contrib_p);
 
   mark_object (glyph->image);
   mark_object (glyph->contrib_p);
@@ -3210,7 +3229,7 @@ mark_glyph (Lisp_Object obj)
 static void
 print_glyph (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
 static void
 print_glyph (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
-  struct Lisp_Glyph *glyph = XGLYPH (obj);
+  Lisp_Glyph *glyph = XGLYPH (obj);
   char buf[20];
 
   if (print_readably)
   char buf[20];
 
   if (print_readably)
@@ -3233,8 +3252,8 @@ print_glyph (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 static int
 glyph_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
 static int
 glyph_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  struct Lisp_Glyph *g1 = XGLYPH (obj1);
-  struct Lisp_Glyph *g2 = XGLYPH (obj2);
+  Lisp_Glyph *g1 = XGLYPH (obj1);
+  Lisp_Glyph *g2 = XGLYPH (obj2);
 
   depth++;
 
 
   depth++;
 
@@ -3259,7 +3278,7 @@ glyph_hash (Lisp_Object obj, int depth)
 static Lisp_Object
 glyph_getprop (Lisp_Object obj, Lisp_Object prop)
 {
 static Lisp_Object
 glyph_getprop (Lisp_Object obj, Lisp_Object prop)
 {
-  struct Lisp_Glyph *g = XGLYPH (obj);
+  Lisp_Glyph *g = XGLYPH (obj);
 
   if (EQ (prop, Qimage))     return g->image;
   if (EQ (prop, Qcontrib_p)) return g->contrib_p;
 
   if (EQ (prop, Qimage))     return g->image;
   if (EQ (prop, Qcontrib_p)) return g->contrib_p;
@@ -3307,7 +3326,7 @@ glyph_remprop (Lisp_Object obj, Lisp_Object prop)
 static Lisp_Object
 glyph_plist (Lisp_Object obj)
 {
 static Lisp_Object
 glyph_plist (Lisp_Object obj)
 {
-  struct Lisp_Glyph *glyph = XGLYPH (obj);
+  Lisp_Glyph *glyph = XGLYPH (obj);
   Lisp_Object result = glyph->plist;
 
   result = cons3 (Qface,      glyph->face,      result);
   Lisp_Object result = glyph->plist;
 
   result = cons3 (Qface,      glyph->face,      result);
@@ -3319,7 +3338,11 @@ glyph_plist (Lisp_Object obj)
 }
 
 static const struct lrecord_description glyph_description[] = {
 }
 
 static const struct lrecord_description glyph_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Glyph, image), 5 },
+  { XD_LISP_OBJECT, offsetof (Lisp_Glyph, image) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Glyph, contrib_p) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Glyph, baseline) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Glyph, face) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Glyph, plist) },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -3328,7 +3351,7 @@ DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("glyph", glyph,
                                          glyph_equal, glyph_hash, glyph_description,
                                          glyph_getprop, glyph_putprop,
                                          glyph_remprop, glyph_plist,
                                          glyph_equal, glyph_hash, glyph_description,
                                          glyph_getprop, glyph_putprop,
                                          glyph_remprop, glyph_plist,
-                                         struct Lisp_Glyph);
+                                         Lisp_Glyph);
 \f
 Lisp_Object
 allocate_glyph (enum glyph_type type,
 \f
 Lisp_Object
 allocate_glyph (enum glyph_type type,
@@ -3337,8 +3360,7 @@ allocate_glyph (enum glyph_type type,
 {
   /* This function can GC */
   Lisp_Object obj = Qnil;
 {
   /* This function can GC */
   Lisp_Object obj = Qnil;
-  struct Lisp_Glyph *g =
-    alloc_lcrecord_type (struct Lisp_Glyph, &lrecord_glyph);
+  Lisp_Glyph *g = alloc_lcrecord_type (Lisp_Glyph, &lrecord_glyph);
 
   g->type = type;
   g->image = Fmake_specifier (Qimage); /* This function can GC */
 
   g->type = type;
   g->image = Fmake_specifier (Qimage); /* This function can GC */
@@ -3347,8 +3369,8 @@ allocate_glyph (enum glyph_type type,
     {
     case GLYPH_BUFFER:
       XIMAGE_SPECIFIER_ALLOWED (g->image) =
     {
     case GLYPH_BUFFER:
       XIMAGE_SPECIFIER_ALLOWED (g->image) =
-       IMAGE_NOTHING_MASK | IMAGE_TEXT_MASK 
-       | IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK 
+       IMAGE_NOTHING_MASK | IMAGE_TEXT_MASK
+       | IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK
        | IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK
        | IMAGE_LAYOUT_MASK;
       break;
        | IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK
        | IMAGE_LAYOUT_MASK;
       break;
@@ -3500,9 +3522,10 @@ glyph_image_instance (Lisp_Object glyph, Lisp_Object domain,
 
   /* This can never return Qunbound.  All glyphs have 'nothing as
      a fallback. */
 
   /* This can never return Qunbound.  All glyphs have 'nothing as
      a fallback. */
-  Lisp_Object image_instance = specifier_instance (specifier, Qunbound, 
+  Lisp_Object image_instance = specifier_instance (specifier, Qunbound,
                                                   domain, errb, no_quit, 0,
                                                   Qzero);
                                                   domain, errb, no_quit, 0,
                                                   Qzero);
+  assert (!UNBOUNDP (image_instance));
 
   return image_instance;
 }
 
   return image_instance;
 }
@@ -3595,7 +3618,7 @@ glyph_height (Lisp_Object glyph_or_image, Lisp_Object domain)
 {
   Lisp_Object instance = glyph_image_instance_maybe (glyph_or_image,
                                                     domain);
 {
   Lisp_Object instance = glyph_image_instance_maybe (glyph_or_image,
                                                     domain);
-  
+
   if (!IMAGE_INSTANCEP (instance))
     return 0;
 
   if (!IMAGE_INSTANCEP (instance))
     return 0;
 
@@ -3646,13 +3669,6 @@ that redisplay will.
   return make_int (glyph_height (glyph, window));
 }
 
   return make_int (glyph_height (glyph, window));
 }
 
-static unsigned int
-glyph_dirty_p (Lisp_Object glyph_or_image, Lisp_Object window)
-{
-  return XIMAGE_INSTANCE_DIRTYP (glyph_image_instance_maybe 
-                                (glyph_or_image, window));
-}
-
 static void
 set_glyph_dirty_p (Lisp_Object glyph_or_image, Lisp_Object window, int dirty)
 {
 static void
 set_glyph_dirty_p (Lisp_Object glyph_or_image, Lisp_Object window, int dirty)
 {
@@ -3728,14 +3744,14 @@ glyph_property_was_changed (Lisp_Object glyph, Lisp_Object property,
 #if 0                          /* Not used for now */
 static void
 glyph_query_geometry (Lisp_Object glyph_or_image, Lisp_Object window,
 #if 0                          /* Not used for now */
 static void
 glyph_query_geometry (Lisp_Object glyph_or_image, Lisp_Object window,
-                     unsigned int* width, unsigned int* height, 
+                     unsigned int* width, unsigned int* height,
                      enum image_instance_geometry disp, Lisp_Object domain)
 {
   Lisp_Object instance = glyph_or_image;
 
   if (GLYPHP (glyph_or_image))
     instance = glyph_image_instance (glyph_or_image, window, ERROR_ME_NOT, 1);
                      enum image_instance_geometry disp, Lisp_Object domain)
 {
   Lisp_Object instance = glyph_or_image;
 
   if (GLYPHP (glyph_or_image))
     instance = glyph_image_instance (glyph_or_image, window, ERROR_ME_NOT, 1);
-  
+
   image_instance_query_geometry (instance, width, height, disp, domain);
 }
 
   image_instance_query_geometry (instance, width, height, disp, domain);
 }
 
@@ -3747,7 +3763,7 @@ glyph_layout (Lisp_Object glyph_or_image, Lisp_Object window,
 
   if (GLYPHP (glyph_or_image))
     instance = glyph_image_instance (glyph_or_image, window, ERROR_ME_NOT, 1);
 
   if (GLYPHP (glyph_or_image))
     instance = glyph_image_instance (glyph_or_image, window, ERROR_ME_NOT, 1);
-  
+
   image_instance_layout (instance, width, height, domain);
 }
 #endif
   image_instance_layout (instance, width, height, domain);
 }
 #endif
@@ -3782,17 +3798,25 @@ update_glyph_cachel_data (struct window *w, Lisp_Object glyph,
                          struct glyph_cachel *cachel)
 {
   if (!cachel->updated || NILP (cachel->glyph) || !EQ (cachel->glyph, glyph)
                          struct glyph_cachel *cachel)
 {
   if (!cachel->updated || NILP (cachel->glyph) || !EQ (cachel->glyph, glyph)
-      || XGLYPH_DIRTYP (cachel->glyph))
+      || XGLYPH_DIRTYP (cachel->glyph)
+      || XFRAME(WINDOW_FRAME(w))->faces_changed)
     {
       Lisp_Object window, instance;
 
       XSETWINDOW (window, w);
 
       cachel->glyph   = glyph;
     {
       Lisp_Object window, instance;
 
       XSETWINDOW (window, w);
 
       cachel->glyph   = glyph;
-    /* Speed things up slightly by grabbing the glyph instantiation
-       and passing it to the size functions. */
+      /* Speed things up slightly by grabbing the glyph instantiation
+        and passing it to the size functions. */
       instance = glyph_image_instance (glyph, window, ERROR_ME_NOT, 1);
       instance = glyph_image_instance (glyph, window, ERROR_ME_NOT, 1);
-      cachel->dirty = XGLYPH_DIRTYP (glyph) = glyph_dirty_p (glyph, window);
+
+      /* Mark text instance of the glyph dirty if faces have changed,
+        because its geometry might have changed. */
+      invalidate_glyph_geometry_maybe (instance, w);
+
+      /* #### Do the following 2 lines buy us anything? --kkm */
+      XGLYPH_DIRTYP (glyph) = XIMAGE_INSTANCE_DIRTYP (instance);
+      cachel->dirty   = XGLYPH_DIRTYP (glyph);
       cachel->width   = glyph_width   (instance, window);
       cachel->ascent  = glyph_ascent  (instance, window);
       cachel->descent = glyph_descent (instance, window);
       cachel->width   = glyph_width   (instance, window);
       cachel->ascent  = glyph_ascent  (instance, window);
       cachel->descent = glyph_descent (instance, window);
@@ -3877,7 +3901,7 @@ mark_glyph_cachels_as_not_updated (struct window *w)
 }
 
 /* Unset the dirty bit on all the glyph cachels that have it. */
 }
 
 /* Unset the dirty bit on all the glyph cachels that have it. */
-void 
+void
 mark_glyph_cachels_as_clean (struct window* w)
 {
   int elt;
 mark_glyph_cachels_as_clean (struct window* w)
 {
   int elt;
@@ -4010,7 +4034,7 @@ update_subwindow_cachel (Lisp_Object subwindow)
     {
       struct subwindow_cachel *cachel =
        Dynarr_atp (f->subwindow_cachels, elt);
     {
       struct subwindow_cachel *cachel =
        Dynarr_atp (f->subwindow_cachels, elt);
-      
+
       if (EQ (cachel->subwindow, subwindow) && !NILP (subwindow))
        {
          update_subwindow_cachel_data (f, subwindow, cachel);
       if (EQ (cachel->subwindow, subwindow) && !NILP (subwindow))
        {
          update_subwindow_cachel_data (f, subwindow, cachel);
@@ -4082,7 +4106,7 @@ check_for_ignored_expose (struct frame* f, int x, int y, int width, int height)
         we have to check for overlaps. Being conservative we will
         check for exposures wholly contained by the subwindow, this
         might give us what we want.*/
         we have to check for overlaps. Being conservative we will
         check for exposures wholly contained by the subwindow, this
         might give us what we want.*/
-      if (ei->x <= x && ei->y <= y 
+      if (ei->x <= x && ei->y <= y
          && ei->x + ei->width >= x + width
          && ei->y + ei->height >= y + height)
        {
          && ei->x + ei->width >= x + width
          && ei->y + ei->height >= y + height)
        {
@@ -4094,7 +4118,7 @@ check_for_ignored_expose (struct frame* f, int x, int y, int width, int height)
            f->subwindow_exposures = ei->next;
          else
            prev->next = ei->next;
            f->subwindow_exposures = ei->next;
          else
            prev->next = ei->next;
-         
+
          if (ei == f->subwindow_exposures_tail)
            f->subwindow_exposures_tail = prev;
 
          if (ei == f->subwindow_exposures_tail)
            f->subwindow_exposures_tail = prev;
 
@@ -4112,15 +4136,15 @@ register_ignored_expose (struct frame* f, int x, int y, int width, int height)
   if (!hold_ignored_expose_registration)
     {
       struct expose_ignore *ei;
   if (!hold_ignored_expose_registration)
     {
       struct expose_ignore *ei;
-      
+
       ei = Blocktype_alloc (the_expose_ignore_blocktype);
       ei = Blocktype_alloc (the_expose_ignore_blocktype);
-      
+
       ei->next = NULL;
       ei->x = x;
       ei->y = y;
       ei->width = width;
       ei->height = height;
       ei->next = NULL;
       ei->x = x;
       ei->y = y;
       ei->width = width;
       ei->height = height;
-      
+
       /* we have to add the exposure to the end of the list, since we
         want to check the oldest events first. for speed we keep a record
         of the end so that we can add right to it. */
       /* we have to add the exposure to the end of the list, since we
         want to check the oldest events first. for speed we keep a record
         of the end so that we can add right to it. */
@@ -4154,7 +4178,7 @@ int find_matching_subwindow (struct frame* f, int x, int y, int width, int heigh
       if (cachel->being_displayed
          &&
          cachel->x <= x && cachel->y <= y
       if (cachel->being_displayed
          &&
          cachel->x <= x && cachel->y <= y
-         && 
+         &&
          cachel->x + cachel->width >= x + width
          &&
          cachel->y + cachel->height >= y + height)
          cachel->x + cachel->width >= x + width
          &&
          cachel->y + cachel->height >= y + height)
@@ -4174,7 +4198,7 @@ int find_matching_subwindow (struct frame* f, int x, int y, int width, int heigh
 static void
 update_subwindow (Lisp_Object subwindow)
 {
 static void
 update_subwindow (Lisp_Object subwindow)
 {
-  struct Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow);
+  Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow);
 
   if (!IMAGE_INSTANCE_TYPE (ii) == IMAGE_WIDGET
       ||
 
   if (!IMAGE_INSTANCE_TYPE (ii) == IMAGE_WIDGET
       ||
@@ -4201,7 +4225,7 @@ update_frame_subwindows (struct frame *f)
       {
        struct subwindow_cachel *cachel =
          Dynarr_atp (f->subwindow_cachels, elt);
       {
        struct subwindow_cachel *cachel =
          Dynarr_atp (f->subwindow_cachels, elt);
-       
+
        if (cachel->being_displayed)
          {
            update_subwindow (cachel->subwindow);
        if (cachel->being_displayed)
          {
            update_subwindow (cachel->subwindow);
@@ -4212,7 +4236,7 @@ update_frame_subwindows (struct frame *f)
 /* remove a subwindow from its frame */
 void unmap_subwindow (Lisp_Object subwindow)
 {
 /* remove a subwindow from its frame */
 void unmap_subwindow (Lisp_Object subwindow)
 {
-  struct Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow);
+  Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow);
   int elt;
   struct subwindow_cachel* cachel;
   struct frame* f;
   int elt;
   struct subwindow_cachel* cachel;
   struct frame* f;
@@ -4244,8 +4268,8 @@ void unmap_subwindow (Lisp_Object subwindow)
 void map_subwindow (Lisp_Object subwindow, int x, int y,
                    struct display_glyph_area *dga)
 {
 void map_subwindow (Lisp_Object subwindow, int x, int y,
                    struct display_glyph_area *dga)
 {
-  struct Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow);
-  int elt; 
+  Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow);
+  int elt;
   struct subwindow_cachel* cachel;
   struct frame* f;
 
   struct subwindow_cachel* cachel;
   struct frame* f;
 
@@ -4277,7 +4301,7 @@ void map_subwindow (Lisp_Object subwindow, int x, int y,
   if (IMAGE_INSTANCE_DIRTYP (ii))
     {
       update_subwindow (subwindow);
   if (IMAGE_INSTANCE_DIRTYP (ii))
     {
       update_subwindow (subwindow);
-      IMAGE_INSTANCE_DIRTYP (ii) = 0; 
+      IMAGE_INSTANCE_DIRTYP (ii) = 0;
     }
 
   MAYBE_DEVMETH (XDEVICE (ii->device), map_subwindow, (ii, x, y, dga));
     }
 
   MAYBE_DEVMETH (XDEVICE (ii->device), map_subwindow, (ii, x, y, dga));
@@ -4295,7 +4319,7 @@ subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                       Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                       int dest_mask, Lisp_Object domain)
 {
                       Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                       int dest_mask, Lisp_Object domain)
 {
-  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   Lisp_Object frame = FW_FRAME (domain);
   Lisp_Object width = find_keyword_in_vector (instantiator, Q_pixel_width);
   Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
   Lisp_Object frame = FW_FRAME (domain);
   Lisp_Object width = find_keyword_in_vector (instantiator, Q_pixel_width);
@@ -4303,7 +4327,7 @@ subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 
   if (NILP (frame))
     signal_simple_error ("No selected frame", device);
 
   if (NILP (frame))
     signal_simple_error ("No selected frame", device);
-  
+
   if (!(dest_mask & IMAGE_SUBWINDOW_MASK))
     incompatible_image_types (instantiator, dest_mask, IMAGE_SUBWINDOW_MASK);
 
   if (!(dest_mask & IMAGE_SUBWINDOW_MASK))
     incompatible_image_types (instantiator, dest_mask, IMAGE_SUBWINDOW_MASK);
 
@@ -4315,7 +4339,7 @@ subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
   /* #### This stuff may get overidden by the widget code and is
      actually really dumb now that we have dynamic geometry
      calculations. What should really happen is that the subwindow
   /* #### This stuff may get overidden by the widget code and is
      actually really dumb now that we have dynamic geometry
      calculations. What should really happen is that the subwindow
-     should query its child for and appropriate geometry. */
+     should query its child for an appropriate geometry. */
   if (NILP (width))
     IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = 20;
   else
   if (NILP (width))
     IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = 20;
   else
@@ -4498,10 +4522,10 @@ Don't use this.
   if (!NILP (XWEAK_LIST_LIST (arg)) && !NILP (XCAR (XWEAK_LIST_LIST (arg))))
     {
       Lisp_Object value = XCAR (XWEAK_LIST_LIST (arg));
   if (!NILP (XWEAK_LIST_LIST (arg)) && !NILP (XCAR (XWEAK_LIST_LIST (arg))))
     {
       Lisp_Object value = XCAR (XWEAK_LIST_LIST (arg));
-      
+
       if (IMAGE_INSTANCEP (value))
        {
       if (IMAGE_INSTANCEP (value))
        {
-         struct Lisp_Image_Instance* ii = XIMAGE_INSTANCE (value);
+         Lisp_Image_Instance* ii = XIMAGE_INSTANCE (value);
 
          if (COLOR_PIXMAP_IMAGE_INSTANCEP (value)
              &&
 
          if (COLOR_PIXMAP_IMAGE_INSTANCEP (value)
              &&
@@ -4516,7 +4540,7 @@ Don't use this.
                % IMAGE_INSTANCE_PIXMAP_MAXSLICE (ii);
              /* We might need to kick redisplay at this point - but we
                 also might not. */
                % IMAGE_INSTANCE_PIXMAP_MAXSLICE (ii);
              /* We might need to kick redisplay at this point - but we
                 also might not. */
-             MARK_DEVICE_FRAMES_GLYPHS_CHANGED 
+             MARK_DEVICE_FRAMES_GLYPHS_CHANGED
                (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)));
              MARK_IMAGE_INSTANCE_CHANGED (ii);
            }
                (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)));
              MARK_IMAGE_INSTANCE_CHANGED (ii);
            }
@@ -4676,7 +4700,8 @@ syms_of_glyphs (void)
 }
 
 static const struct lrecord_description image_specifier_description[] = {
 }
 
 static const struct lrecord_description image_specifier_description[] = {
-  { XD_LISP_OBJECT, specifier_data_offset + offsetof(struct image_specifier, attachee), 2 },
+  { XD_LISP_OBJECT, specifier_data_offset + offsetof (struct image_specifier, attachee) },
+  { XD_LISP_OBJECT, specifier_data_offset + offsetof (struct image_specifier, attachee_property) },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -4704,50 +4729,52 @@ reinit_specifier_type_create_image (void)
 
 
 static const struct lrecord_description iike_description_1[] = {
 
 
 static const struct lrecord_description iike_description_1[] = {
-  { XD_LISP_OBJECT, offsetof(ii_keyword_entry, keyword), 1 },
+  { XD_LISP_OBJECT, offsetof (ii_keyword_entry, keyword) },
   { XD_END }
 };
 
 static const struct struct_description iike_description = {
   { XD_END }
 };
 
 static const struct struct_description iike_description = {
-  sizeof(ii_keyword_entry),
+  sizeof (ii_keyword_entry),
   iike_description_1
 };
 
 static const struct lrecord_description iiked_description_1[] = {
   iike_description_1
 };
 
 static const struct lrecord_description iiked_description_1[] = {
-  XD_DYNARR_DESC(ii_keyword_entry_dynarr, &iike_description),
+  XD_DYNARR_DESC (ii_keyword_entry_dynarr, &iike_description),
   { XD_END }
 };
 
 static const struct struct_description iiked_description = {
   { XD_END }
 };
 
 static const struct struct_description iiked_description = {
-  sizeof(ii_keyword_entry_dynarr),
+  sizeof (ii_keyword_entry_dynarr),
   iiked_description_1
 };
 
 static const struct lrecord_description iife_description_1[] = {
   iiked_description_1
 };
 
 static const struct lrecord_description iife_description_1[] = {
-  { XD_LISP_OBJECT, offsetof(image_instantiator_format_entry, symbol), 2 },
-  { XD_STRUCT_PTR,  offsetof(image_instantiator_format_entry, meths),  1, &iim_description },
+  { XD_LISP_OBJECT, offsetof (image_instantiator_format_entry, symbol) },
+  { XD_LISP_OBJECT, offsetof (image_instantiator_format_entry, device) },
+  { XD_STRUCT_PTR,  offsetof (image_instantiator_format_entry, meths),  1, &iim_description },
   { XD_END }
 };
 
 static const struct struct_description iife_description = {
   { XD_END }
 };
 
 static const struct struct_description iife_description = {
-  sizeof(image_instantiator_format_entry),
+  sizeof (image_instantiator_format_entry),
   iife_description_1
 };
 
 static const struct lrecord_description iifed_description_1[] = {
   iife_description_1
 };
 
 static const struct lrecord_description iifed_description_1[] = {
-  XD_DYNARR_DESC(image_instantiator_format_entry_dynarr, &iife_description),
+  XD_DYNARR_DESC (image_instantiator_format_entry_dynarr, &iife_description),
   { XD_END }
 };
 
 static const struct struct_description iifed_description = {
   { XD_END }
 };
 
 static const struct struct_description iifed_description = {
-  sizeof(image_instantiator_format_entry_dynarr),
+  sizeof (image_instantiator_format_entry_dynarr),
   iifed_description_1
 };
 
 static const struct lrecord_description iim_description_1[] = {
   iifed_description_1
 };
 
 static const struct lrecord_description iim_description_1[] = {
-  { XD_LISP_OBJECT, offsetof(struct image_instantiator_methods, symbol), 2 },
-  { XD_STRUCT_PTR,  offsetof(struct image_instantiator_methods, keywords), 1, &iiked_description },
-  { XD_STRUCT_PTR,  offsetof(struct image_instantiator_methods, consoles), 1, &cted_description },
+  { XD_LISP_OBJECT, offsetof (struct image_instantiator_methods, symbol) },
+  { XD_LISP_OBJECT, offsetof (struct image_instantiator_methods, device) },
+  { XD_STRUCT_PTR,  offsetof (struct image_instantiator_methods, keywords), 1, &iiked_description },
+  { XD_STRUCT_PTR,  offsetof (struct image_instantiator_methods, consoles), 1, &cted_description },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -4874,8 +4901,8 @@ vars_of_glyphs (void)
 
   /* image instances */
 
 
   /* image instances */
 
-  Vimage_instance_type_list = Fcons (Qnothing, 
-                                    list6 (Qtext, Qmono_pixmap, Qcolor_pixmap, 
+  Vimage_instance_type_list = Fcons (Qnothing,
+                                    list6 (Qtext, Qmono_pixmap, Qcolor_pixmap,
                                            Qpointer, Qsubwindow, Qwidget));
   staticpro (&Vimage_instance_type_list);
 
                                            Qpointer, Qsubwindow, Qwidget));
   staticpro (&Vimage_instance_type_list);
 
index decfe0c..2385eba 100644 (file)
@@ -21,8 +21,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_GLYPHS_H_
-#define _XEMACS_GLYPHS_H_
+#ifndef INCLUDED_glyphs_h_
+#define INCLUDED_glyphs_h_
 
 #include "specifier.h"
 #include "gui.h"
 
 #include "specifier.h"
 #include "gui.h"
@@ -55,14 +55,14 @@ struct image_instantiator_methods;
   subwindow                    subwindow
   inherit                      mono-pixmap
   autodetect                   mono-pixmap, color-pixmap, pointer, text
   subwindow                    subwindow
   inherit                      mono-pixmap
   autodetect                   mono-pixmap, color-pixmap, pointer, text
-  button                               widget
+  button                       widget
   edit-field                   widget
   combo        -box                    widget
   progress-gauge               widget
   tab-control                  widget
   tree-view                    widget
   scrollbar                    widget
   edit-field                   widget
   combo        -box                    widget
   progress-gauge               widget
   tab-control                  widget
   tree-view                    widget
   scrollbar                    widget
-  static                               widget
+  static                       widget
 */
 
 /* These are methods specific to a particular format of image instantiator
 */
 
 /* These are methods specific to a particular format of image instantiator
@@ -89,7 +89,7 @@ enum image_instance_geometry
   IMAGE_GEOMETRY,
   IMAGE_DESIRED_GEOMETRY,
   IMAGE_MIN_GEOMETRY,
   IMAGE_GEOMETRY,
   IMAGE_DESIRED_GEOMETRY,
   IMAGE_MIN_GEOMETRY,
-  IMAGE_MAX_GEOMETRY, 
+  IMAGE_MAX_GEOMETRY,
   IMAGE_UNSPECIFIED_GEOMETRY = ~0
 };
 
   IMAGE_UNSPECIFIED_GEOMETRY = ~0
 };
 
@@ -149,9 +149,9 @@ struct image_instantiator_methods
    image instance. */
   void (*query_geometry_method) (Lisp_Object image_instance,
                                 unsigned int* width, unsigned int* height,
    image instance. */
   void (*query_geometry_method) (Lisp_Object image_instance,
                                 unsigned int* width, unsigned int* height,
-                                enum image_instance_geometry disp, 
+                                enum image_instance_geometry disp,
                                 Lisp_Object domain);
                                 Lisp_Object domain);
-  
+
   /* Layout the instance and its children bounded by the provided
      dimensions. */
   void (*layout_method) (Lisp_Object image_instance,
   /* Layout the instance and its children bounded by the provided
      dimensions. */
   void (*layout_method) (Lisp_Object image_instance,
@@ -230,12 +230,12 @@ do {                                                              \
    FORMAT.  VALIDATE_FUN if a function that returns whether the data
    is valid.  The keyword may not appear more than once. */
 #define IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, copy, multi) \
    FORMAT.  VALIDATE_FUN if a function that returns whether the data
    is valid.  The keyword may not appear more than once. */
 #define IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, copy, multi) \
-  do {                                                 \
+  do {                                                         \
     struct ii_keyword_entry entry;                             \
     struct ii_keyword_entry entry;                             \
-                                                       \
-    entry.keyword = keyw;                              \
+                                                               \
+    entry.keyword = keyw;                                      \
     entry.validate = validate_fun;                             \
     entry.validate = validate_fun;                             \
-    entry.multiple_p = multi;                          \
+    entry.multiple_p = multi;                                  \
     entry.copy_p = copy;                                       \
     Dynarr_add (format##_image_instantiator_methods->keywords, \
                entry);                                         \
     entry.copy_p = copy;                                       \
     Dynarr_add (format##_image_instantiator_methods->keywords, \
                entry);                                         \
@@ -255,9 +255,9 @@ IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 1, 1)
 #define IIFORMAT_VALID_NONCOPY_KEYWORD(format, keyw, validate_fun)     \
 IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 0, 0)
 
 #define IIFORMAT_VALID_NONCOPY_KEYWORD(format, keyw, validate_fun)     \
 IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 0, 0)
 
-/* Declare that image-instantiator format FORMAT is supported on 
+/* Declare that image-instantiator format FORMAT is supported on
    CONSOLE type. */
    CONSOLE type. */
-#define IIFORMAT_VALID_CONSOLE(console, format)                \
+#define IIFORMAT_VALID_CONSOLE(console, format)                        \
   do {                                                         \
     struct console_type_entry entry;                           \
                                                                \
   do {                                                         \
     struct console_type_entry entry;                           \
                                                                \
@@ -267,8 +267,8 @@ IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 0, 0)
                entry);                                         \
   } while (0)
 
                entry);                                         \
   } while (0)
 
-#define DEFINE_DEVICE_IIFORMAT(type, format)\
-DECLARE_IMAGE_INSTANTIATOR_FORMAT(format);             \
+#define DEFINE_DEVICE_IIFORMAT(type, format)   \
+DECLARE_IMAGE_INSTANTIATOR_FORMAT(format);     \
 struct image_instantiator_methods *type##_##format##_image_instantiator_methods
 
 #define INITIALIZE_DEVICE_IIFORMAT(type, format)                       \
 struct image_instantiator_methods *type##_##format##_image_instantiator_methods
 
 #define INITIALIZE_DEVICE_IIFORMAT(type, format)                       \
@@ -321,20 +321,21 @@ void check_valid_face (Lisp_Object data);
 void check_valid_vector (Lisp_Object data);
 void check_valid_item_list_1 (Lisp_Object items);
 
 void check_valid_vector (Lisp_Object data);
 void check_valid_item_list_1 (Lisp_Object items);
 
-void initialize_subwindow_image_instance (struct Lisp_Image_Instance*);
+void initialize_subwindow_image_instance (Lisp_Image_Instance*);
 void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                            Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                            int dest_mask, Lisp_Object domain);
 void widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                         Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                         int dest_mask, Lisp_Object domain);
 void subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                            Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                            int dest_mask, Lisp_Object domain);
 void widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                         Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                         int dest_mask, Lisp_Object domain);
-void image_instance_query_geometry (Lisp_Object image_instance, 
-                                   unsigned int* width, unsigned int* height, 
+void image_instance_query_geometry (Lisp_Object image_instance,
+                                   unsigned int* width, unsigned int* height,
                                    enum image_instance_geometry disp,
                                    Lisp_Object domain);
                                    enum image_instance_geometry disp,
                                    Lisp_Object domain);
-void image_instance_layout (Lisp_Object image_instance, 
-                           unsigned int width, unsigned int height, 
+void image_instance_layout (Lisp_Object image_instance,
+                           unsigned int width, unsigned int height,
                            Lisp_Object domain);
                            Lisp_Object domain);
+int invalidate_glyph_geometry_maybe (Lisp_Object glyph_or_ii, struct window* w);
 
 DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator,
                                                  int given_dest_mask,
 
 DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator,
                                                  int given_dest_mask,
@@ -376,9 +377,8 @@ struct image_specifier
 /*                     Image Instance Object                           */
 /************************************************************************/
 
 /*                     Image Instance Object                           */
 /************************************************************************/
 
-DECLARE_LRECORD (image_instance, struct Lisp_Image_Instance);
-#define XIMAGE_INSTANCE(x) \
-  XRECORD (x, image_instance, struct Lisp_Image_Instance)
+DECLARE_LRECORD (image_instance, Lisp_Image_Instance);
+#define XIMAGE_INSTANCE(x) XRECORD (x, image_instance, Lisp_Image_Instance)
 #define XSETIMAGE_INSTANCE(x, p) XSETRECORD (x, p, image_instance)
 #define IMAGE_INSTANCEP(x) RECORDP (x, image_instance)
 #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance)
 #define XSETIMAGE_INSTANCE(x, p) XSETRECORD (x, p, image_instance)
 #define IMAGE_INSTANCEP(x) RECORDP (x, image_instance)
 #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance)
@@ -426,14 +426,14 @@ enum image_instance_type
 #define LAYOUT_IMAGE_INSTANCEP(ii) \
      IMAGE_INSTANCE_TYPE_P (ii, IMAGE_LAYOUT)
 
 #define LAYOUT_IMAGE_INSTANCEP(ii) \
      IMAGE_INSTANCE_TYPE_P (ii, IMAGE_LAYOUT)
 
-#define CHECK_NOTHING_IMAGE_INSTANCE(x) do {           \
-  CHECK_IMAGE_INSTANCE (x);                            \
+#define CHECK_NOTHING_IMAGE_INSTANCE(x) do {                   \
+  CHECK_IMAGE_INSTANCE (x);                                    \
   if (!NOTHING_IMAGE_INSTANCEP (x))                            \
     x = wrong_type_argument (Qnothing_image_instance_p, (x));  \
 } while (0)
 
   if (!NOTHING_IMAGE_INSTANCEP (x))                            \
     x = wrong_type_argument (Qnothing_image_instance_p, (x));  \
 } while (0)
 
-#define CHECK_TEXT_IMAGE_INSTANCE(x) do {              \
-  CHECK_IMAGE_INSTANCE (x);                            \
+#define CHECK_TEXT_IMAGE_INSTANCE(x) do {                      \
+  CHECK_IMAGE_INSTANCE (x);                                    \
   if (!TEXT_IMAGE_INSTANCEP (x))                               \
     x = wrong_type_argument (Qtext_image_instance_p, (x));     \
 } while (0)
   if (!TEXT_IMAGE_INSTANCEP (x))                               \
     x = wrong_type_argument (Qtext_image_instance_p, (x));     \
 } while (0)
@@ -444,33 +444,33 @@ enum image_instance_type
     x = wrong_type_argument (Qmono_pixmap_image_instance_p, (x));      \
 } while (0)
 
     x = wrong_type_argument (Qmono_pixmap_image_instance_p, (x));      \
 } while (0)
 
-#define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x) do {              \
-  CHECK_IMAGE_INSTANCE (x);                                    \
+#define CHECK_COLOR_PIXMAP_IMAGE_INSTANCE(x) do {                      \
+  CHECK_IMAGE_INSTANCE (x);                                            \
   if (!COLOR_PIXMAP_IMAGE_INSTANCEP (x))                               \
     x = wrong_type_argument (Qcolor_pixmap_image_instance_p, (x));     \
 } while (0)
 
   if (!COLOR_PIXMAP_IMAGE_INSTANCEP (x))                               \
     x = wrong_type_argument (Qcolor_pixmap_image_instance_p, (x));     \
 } while (0)
 
-#define CHECK_POINTER_IMAGE_INSTANCE(x) do {           \
-  CHECK_IMAGE_INSTANCE (x);                            \
+#define CHECK_POINTER_IMAGE_INSTANCE(x) do {                   \
+  CHECK_IMAGE_INSTANCE (x);                                    \
   if (!POINTER_IMAGE_INSTANCEP (x))                            \
     x = wrong_type_argument (Qpointer_image_instance_p, (x));  \
 } while (0)
 
   if (!POINTER_IMAGE_INSTANCEP (x))                            \
     x = wrong_type_argument (Qpointer_image_instance_p, (x));  \
 } while (0)
 
-#define CHECK_SUBWINDOW_IMAGE_INSTANCE(x) do {         \
+#define CHECK_SUBWINDOW_IMAGE_INSTANCE(x) do {                 \
   CHECK_IMAGE_INSTANCE (x);                                    \
   if (!SUBWINDOW_IMAGE_INSTANCEP (x)                           \
       && !WIDGET_IMAGE_INSTANCEP (x))                          \
     x = wrong_type_argument (Qsubwindow_image_instance_p, (x));        \
 } while (0)
 
   CHECK_IMAGE_INSTANCE (x);                                    \
   if (!SUBWINDOW_IMAGE_INSTANCEP (x)                           \
       && !WIDGET_IMAGE_INSTANCEP (x))                          \
     x = wrong_type_argument (Qsubwindow_image_instance_p, (x));        \
 } while (0)
 
-#define CHECK_WIDGET_IMAGE_INSTANCE(x) do {            \
-  CHECK_IMAGE_INSTANCE (x);                            \
+#define CHECK_WIDGET_IMAGE_INSTANCE(x) do {                    \
+  CHECK_IMAGE_INSTANCE (x);                                    \
   if (!WIDGET_IMAGE_INSTANCEP (x))                             \
     x = wrong_type_argument (Qwidget_image_instance_p, (x));   \
 } while (0)
 
   if (!WIDGET_IMAGE_INSTANCEP (x))                             \
     x = wrong_type_argument (Qwidget_image_instance_p, (x));   \
 } while (0)
 
-#define CHECK_LAYOUT_IMAGE_INSTANCE(x) do {            \
-  CHECK_IMAGE_INSTANCE (x);                            \
+#define CHECK_LAYOUT_IMAGE_INSTANCE(x) do {                    \
+  CHECK_IMAGE_INSTANCE (x);                                    \
   if (!LAYOUT_IMAGE_INSTANCEP (x))                             \
     x = wrong_type_argument (Qlayout_image_instance_p, (x));   \
 } while (0)
   if (!LAYOUT_IMAGE_INSTANCEP (x))                             \
     x = wrong_type_argument (Qlayout_image_instance_p, (x));   \
 } while (0)
@@ -517,25 +517,14 @@ struct Lisp_Image_Instance
       unsigned int h_resize : 1;       /* Whether the hsize is allowed to change. */
       unsigned int orientation : 1; /* Vertical or horizontal. */
       unsigned int justification : 2; /* Left, right or center. */
       unsigned int h_resize : 1;       /* Whether the hsize is allowed to change. */
       unsigned int orientation : 1; /* Vertical or horizontal. */
       unsigned int justification : 2; /* Left, right or center. */
-      union
-      {
-       struct
-       {
-         /* Face for colors and font. We specify this here becuase we
-            want people to be able to put :face in the instantiator
-            spec. Using gyph-face is more inconvenient, although more
-            general. */
-         Lisp_Object face;     
-         Lisp_Object type;
-         Lisp_Object props;    /* properties */
-         Lisp_Object gui_item; /* a list of gui_items */
-       } widget;               /* widgets are subwindows */
-       struct
-       {
-         Lisp_Object children; /* managed children */
-         Lisp_Object border;   /* Style of enclosing border or text. */
-       } layout;
-      } s;
+      /* Face for colors and font. We specify this here becuase we
+        want people to be able to put :face in the instantiator
+        spec. Using gyph-face is more inconvenient, although more
+        general. */
+      Lisp_Object face;
+      Lisp_Object type;
+      Lisp_Object props;       /* properties or border*/
+      Lisp_Object items;       /* a list of gui_items or children */
     } subwindow;
   } u;
 
     } subwindow;
   } u;
 
@@ -560,8 +549,8 @@ struct Lisp_Image_Instance
 #define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset)
 #define IMAGE_INSTANCE_WIDTH(i) ((i)->width)
 #define IMAGE_INSTANCE_HEIGHT(i) ((i)->height)
 #define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset)
 #define IMAGE_INSTANCE_WIDTH(i) ((i)->width)
 #define IMAGE_INSTANCE_HEIGHT(i) ((i)->height)
-#define IMAGE_INSTANCE_PIXMAP_TYPE_P(i)                                        \
- ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP)                       \
+#define IMAGE_INSTANCE_PIXMAP_TYPE_P(i)                        \
+ ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP)       \
   || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP))
 #define IMAGE_INSTANCE_DIRTYP(i) ((i)->dirty)
 #define IMAGE_INSTANCE_FACE(i) \
   || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP))
 #define IMAGE_INSTANCE_DIRTYP(i) ((i)->dirty)
 #define IMAGE_INSTANCE_FACE(i) \
@@ -614,23 +603,23 @@ struct Lisp_Image_Instance
   IMAGE_INSTANCE_WIDTH(i)
 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \
   IMAGE_INSTANCE_HEIGHT(i)
   IMAGE_INSTANCE_WIDTH(i)
 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \
   IMAGE_INSTANCE_HEIGHT(i)
-#define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.s.widget.type)
-#define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.s.widget.props)
+#define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.type)
+#define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.props)
 #define SET_IMAGE_INSTANCE_WIDGET_FACE(i,f) \
 #define SET_IMAGE_INSTANCE_WIDGET_FACE(i,f) \
- ((i)->u.subwindow.s.widget.face = f)
-#define IMAGE_INSTANCE_WIDGET_FACE(i) \
-  (!NILP ((i)->u.subwindow.s.widget.face) ? (i)->u.subwindow.s.widget.face : \
-  !NILP (IMAGE_INSTANCE_FACE (i)) ? IMAGE_INSTANCE_FACE (i) : \
+ ((i)->u.subwindow.face = f)
+#define IMAGE_INSTANCE_WIDGET_FACE(i)                          \
+  (!NILP ((i)->u.subwindow.face) ? (i)->u.subwindow.face :     \
+  !NILP (IMAGE_INSTANCE_FACE (i)) ? IMAGE_INSTANCE_FACE (i) :  \
   Vwidget_face)
   Vwidget_face)
-#define IMAGE_INSTANCE_WIDGET_ITEMS(i) ((i)->u.subwindow.s.widget.gui_item)
-#define IMAGE_INSTANCE_WIDGET_ITEM(i) \
-(CONSP (IMAGE_INSTANCE_WIDGET_ITEMS (i)) ? \
-XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \
+#define IMAGE_INSTANCE_WIDGET_ITEMS(i) ((i)->u.subwindow.items)
+#define IMAGE_INSTANCE_WIDGET_ITEM(i)          \
+(CONSP (IMAGE_INSTANCE_WIDGET_ITEMS (i)) ?     \
+XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) :       \
   IMAGE_INSTANCE_WIDGET_ITEMS (i))
 #define IMAGE_INSTANCE_WIDGET_TEXT(i) XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name
 
   IMAGE_INSTANCE_WIDGET_ITEMS (i))
 #define IMAGE_INSTANCE_WIDGET_TEXT(i) XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name
 
-#define IMAGE_INSTANCE_LAYOUT_CHILDREN(i) ((i)->u.subwindow.s.layout.children)
-#define IMAGE_INSTANCE_LAYOUT_BORDER(i) ((i)->u.subwindow.s.layout.border)
+#define IMAGE_INSTANCE_LAYOUT_CHILDREN(i) ((i)->u.subwindow.items)
+#define IMAGE_INSTANCE_LAYOUT_BORDER(i) ((i)->u.subwindow.props)
 
 #define XIMAGE_INSTANCE_DEVICE(i) \
   IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i))
 
 #define XIMAGE_INSTANCE_DEVICE(i) \
   IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i))
@@ -772,7 +761,7 @@ struct Lisp_Glyph
   Lisp_Object baseline;                /* percent above baseline */
 
   Lisp_Object face;            /* if non-nil, face to use when displaying */
   Lisp_Object baseline;                /* percent above baseline */
 
   Lisp_Object face;            /* if non-nil, face to use when displaying */
-  
+
   Lisp_Object plist;
   void (*after_change) (Lisp_Object glyph, Lisp_Object property,
                        Lisp_Object locale);
   Lisp_Object plist;
   void (*after_change) (Lisp_Object glyph, Lisp_Object property,
                        Lisp_Object locale);
@@ -780,9 +769,10 @@ struct Lisp_Glyph
   unsigned int dirty : 1;      /* So that we can selectively
                                    redisplay changed glyphs. */
 };
   unsigned int dirty : 1;      /* So that we can selectively
                                    redisplay changed glyphs. */
 };
+typedef struct Lisp_Glyph Lisp_Glyph;
 
 
-DECLARE_LRECORD (glyph, struct Lisp_Glyph);
-#define XGLYPH(x) XRECORD (x, glyph, struct Lisp_Glyph)
+DECLARE_LRECORD (glyph, Lisp_Glyph);
+#define XGLYPH(x) XRECORD (x, glyph, Lisp_Glyph)
 #define XSETGLYPH(x, p) XSETRECORD (x, p, glyph)
 #define GLYPHP(x) RECORDP (x, glyph)
 #define CHECK_GLYPH(x) CHECK_RECORD (x, glyph)
 #define XSETGLYPH(x, p) XSETRECORD (x, p, glyph)
 #define GLYPHP(x) RECORDP (x, glyph)
 #define CHECK_GLYPH(x) CHECK_RECORD (x, glyph)
@@ -858,9 +848,9 @@ Lisp_Object allocate_glyph (enum glyph_type type,
                                                  Lisp_Object property,
                                                  Lisp_Object locale));
 void query_string_geometry ( Lisp_Object string, Lisp_Object face,
                                                  Lisp_Object property,
                                                  Lisp_Object locale));
 void query_string_geometry ( Lisp_Object string, Lisp_Object face,
-                            unsigned int* width, unsigned int* height, 
+                            unsigned int* width, unsigned int* height,
                             unsigned int* descent, Lisp_Object domain);
                             unsigned int* descent, Lisp_Object domain);
-Lisp_Object query_string_font (Lisp_Object string, 
+Lisp_Object query_string_font (Lisp_Object string,
                               Lisp_Object face, Lisp_Object domain);
 Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object device);
 void disable_glyph_animated_timeout (int i);
                               Lisp_Object face, Lisp_Object domain);
 Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object device);
 void disable_glyph_animated_timeout (int i);
@@ -966,4 +956,4 @@ struct expose_ignore
 int check_for_ignored_expose (struct frame* f, int x, int y, int width, int height);
 extern int hold_ignored_expose_registration;
 
 int check_for_ignored_expose (struct frame* f, int x, int y, int width, int height);
 extern int hold_ignored_expose_registration;
 
-#endif /* _XEMACS_GLYPHS_H_ */
+#endif /* INCLUDED_glyphs_h_ */
index 3aad687..56badba 100644 (file)
@@ -1018,79 +1018,6 @@ Boston, MA 02111-1307, USA.
 #include <malloc.h>
 #endif
 
 #include <malloc.h>
 #endif
 
-#if 0 /* FSFmacs */
-/* XEmacs requires an ANSI compiler, and memmove() is part of the ANSI-
-   mandated functions.  For losing systems like SunOS 4, we provide
-   our own memmove(). */
-
-#if  (defined (MEMMOVE_MISSING) || \
-      !defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG))
-
-/* Snarfed directly from Emacs src/dispnew.c:
-   XXX Should use system bcopy if it handles overlap.  */
-#ifndef emacs
-
-/* Like bcopy except never gets confused by overlap.  */
-
-static void
-safe_bcopy (char *from, char *to, int size)
-{
-  if (size <= 0 || from == to)
-    return;
-
-  /* If the source and destination don't overlap, then bcopy can
-     handle it.  If they do overlap, but the destination is lower in
-     memory than the source, we'll assume bcopy can handle that.  */
-  if (to < from || from + size <= to)
-    bcopy (from, to, size);
-
-  /* Otherwise, we'll copy from the end.  */
-  else
-    {
-      char *endf = from + size;
-      char *endt = to + size;
-
-      /* If TO - FROM is large, then we should break the copy into
-        nonoverlapping chunks of TO - FROM bytes each.  However, if
-        TO - FROM is small, then the bcopy function call overhead
-        makes this not worth it.  The crossover point could be about
-        anywhere.  Since I don't think the obvious copy loop is too
-        bad, I'm trying to err in its favor.  */
-      if (to - from < 64)
-       {
-         do
-           *--endt = *--endf;
-         while (endf != from);
-       }
-      else
-       {
-         for (;;)
-           {
-             endt -= (to - from);
-             endf -= (to - from);
-
-             if (endt < to)
-               break;
-
-             bcopy (endf, endt, to - from);
-           }
-
-         /* If SIZE wasn't a multiple of TO - FROM, there will be a
-            little left over.  The amount left over is
-            (endt + (to - from)) - to, which is endt - from.  */
-         bcopy (from, to, endt - from);
-       }
-    }
-}
-#endif /* Not emacs.  */
-
-#define memmove(to, from, size) safe_bcopy ((from), (to), (size))
-
-#endif
-
-#endif /* FSFmacs */
-
-
 #ifndef min
 #define min(A, B) ((A) < (B) ? (A) : (B))
 #endif
 #ifndef min
 #define min(A, B) ((A) < (B) ? (A) : (B))
 #endif
index 0a219b9..1c879d4 100644 (file)
@@ -1,4 +1,4 @@
-/* GPM functions
+/* GPM (General purpose mouse) functions
    Copyright (C) 1997 William M. Perry <wmperry@gnu.org>
    Copyright (C) 1999 Free Software Foundation, Inc.
 
    Copyright (C) 1997 William M. Perry <wmperry@gnu.org>
    Copyright (C) 1999 Free Software Foundation, Inc.
 
@@ -52,7 +52,7 @@ extern int gpm_tried;
 extern void *gpm_stack;
 
 static int (*orig_event_pending_p) (int);
 extern void *gpm_stack;
 
 static int (*orig_event_pending_p) (int);
-static void (*orig_next_event_cb) (struct Lisp_Event *);
+static void (*orig_next_event_cb) (Lisp_Event *);
 
 static Lisp_Object gpm_event_queue;
 static Lisp_Object gpm_event_queue_tail;
 
 static Lisp_Object gpm_event_queue;
 static Lisp_Object gpm_event_queue_tail;
@@ -95,7 +95,7 @@ clear_gpm_state (int fd)
 }
 
 static int
 }
 
 static int
-get_process_infd (struct Lisp_Process *p)
+get_process_infd (Lisp_Process *p)
 {
   Lisp_Object instr, outstr;
   get_process_streams (p, &instr, &outstr);
 {
   Lisp_Object instr, outstr;
   get_process_streams (p, &instr, &outstr);
@@ -113,7 +113,7 @@ This function is the process handler for the GPM connection.
        int modifiers = 0;
        int button = 1;
        Lisp_Object fake_event;
        int modifiers = 0;
        int button = 1;
        Lisp_Object fake_event;
-       struct Lisp_Event *event = NULL;
+       Lisp_Event *event = NULL;
        struct gcpro gcpro1;
        static int num_events;
 
        struct gcpro gcpro1;
        static int num_events;
 
@@ -369,7 +369,7 @@ tty_get_mouse_position (struct device *d, Lisp_Object *frame, int *x, int *y)
 static void
 tty_set_mouse_position (struct window *w, int x, int y)
 {
 static void
 tty_set_mouse_position (struct window *w, int x, int y)
 {
-       /* 
+       /*
           #### I couldn't find any GPM functions that set the mouse position.
           #### Mr. Perry had left this function empty; that must be why.
           #### karlheg
           #### I couldn't find any GPM functions that set the mouse position.
           #### Mr. Perry had left this function empty; that must be why.
           #### karlheg
@@ -390,14 +390,14 @@ static int gpm_event_pending_p (int user_p)
        return (orig_event_pending_p (user_p));
 }
 
        return (orig_event_pending_p (user_p));
 }
 
-static void gpm_next_event_cb (struct Lisp_Event *event)
+static void gpm_next_event_cb (Lisp_Event *event)
 {
        /* #### It would be nice to preserve some sort of ordering of the
        ** #### different types of events, but that would be quite a bit
        ** #### of work, and would more than likely break the abstraction
        ** #### between the other event loops and this one.
        */
 {
        /* #### It would be nice to preserve some sort of ordering of the
        ** #### different types of events, but that would be quite a bit
        ** #### of work, and would more than likely break the abstraction
        ** #### between the other event loops and this one.
        */
-          
+
        if (!NILP (gpm_event_queue))
        {
                Lisp_Object queued_event = dequeue_event (&gpm_event_queue, &gpm_event_queue_tail);
        if (!NILP (gpm_event_queue))
        {
                Lisp_Object queued_event = dequeue_event (&gpm_event_queue, &gpm_event_queue_tail);
@@ -579,7 +579,7 @@ Toggle accepting of GPM mouse events.
        ** descriptor, or it can get the wrong terminal sizes, etc.
        */
        gpm_consolefd = fd;
        ** descriptor, or it can get the wrong terminal sizes, etc.
        */
        gpm_consolefd = fd;
-       
+
        /* We have to pass the virtual console manually, otherwise if you
        ** use 'gnuclient -nw' to connect to an XEmacs that is running in
        ** X, Gpm_Open() tries to use ttyname(0 | 1 | 2) to find out which
        /* We have to pass the virtual console manually, otherwise if you
        ** use 'gnuclient -nw' to connect to an XEmacs that is running in
        ** X, Gpm_Open() tries to use ttyname(0 | 1 | 2) to find out which
index 9966990..cfc000f 100644 (file)
@@ -1,7 +1,28 @@
-#ifndef _HAVE_GPM
-#define _HAVE_GPM
+/* GPM (General purpose mouse) support
+   Copyright (C) 1997 William M. Perry <wmperry@gnu.org>
+   Copyright (C) 1999 Free Software Foundation, Inc.
 
 
-int handle_gpm_read (struct Lisp_Event *event, struct console *con, int fd);
+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.  */
+
+#ifndef INCLUDED_gpmevent_h_
+#define INCLUDED_gpmevent_h_
+
+int handle_gpm_read (Lisp_Event *event, struct console *con, int fd);
 void connect_to_gpm (struct console *con);
 
 void connect_to_gpm (struct console *con);
 
-#endif
+#endif /* INCLUDED_gpmevent_h_ */
index 3968284..67c84b0 100644 (file)
@@ -27,6 +27,7 @@ Boston, MA 02111-1307, USA.  */
 #include "frame.h"
 #include "elhash.h"
 #include "console-msw.h"
 #include "frame.h"
 #include "elhash.h"
 #include "console-msw.h"
+#include "buffer.h"
 
 /*
  * Return value is Qt if we have dispatched the command,
 
 /*
  * Return value is Qt if we have dispatched the command,
@@ -35,11 +36,14 @@ Boston, MA 02111-1307, USA.  */
  * command if we return nil
  */
 Lisp_Object
  * command if we return nil
  */
 Lisp_Object
-mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, WORD id)
+mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, DWORD id)
 {
   /* Try to map the command id through the proper hash table */
   Lisp_Object data, fn, arg, frame;
 
 {
   /* Try to map the command id through the proper hash table */
   Lisp_Object data, fn, arg, frame;
 
+  /* #### make_int should assert that --kkm */
+  assert (XINT (make_int (id)) == id);
+
   data = Fgethash (make_int (id), 
                   FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f), Qnil);
   
   data = Fgethash (make_int (id), 
                   FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f), Qnil);
   
@@ -55,3 +59,53 @@ mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, WORD id)
   return Qt;
 }
 
   return Qt;
 }
 
+DEFUN ("mswindows-shell-execute", Fmswindows_shell_execute, 2, 4, 0, /*
+Get Windows to perform OPERATION on DOCUMENT.
+This is a wrapper around the ShellExecute system function, which
+invokes the application registered to handle OPERATION for DOCUMENT.
+OPERATION is typically \"open\", \"print\" or \"explore\" (but can be
+nil for the default action), and DOCUMENT is typically the name of a
+document file or URL, but can also be a program executable to run or
+a directory to open in the Windows Explorer.
+
+If DOCUMENT is a program executable, PARAMETERS can be a string
+containing command line parameters, but otherwise should be nil.
+
+SHOW-FLAG can be used to control whether the invoked application is hidden
+or minimized.  If SHOW-FLAG is nil, the application is displayed normally,
+otherwise it is an integer representing a ShowWindow flag:
+
+  0 - start hidden
+  1 - start normally
+  3 - start maximized
+  6 - start minimized
+*/
+       (operation, document, parameters, show_flag))
+{
+  Lisp_Object current_dir;
+
+  CHECK_STRING (document);
+
+  /* Encode filename and current directory.  */
+  current_dir = current_buffer->directory;
+  if ((int) ShellExecute (NULL,
+                         (STRINGP (operation) ?
+                          XSTRING (operation)->data : NULL),
+                         XSTRING (document)->data,
+                         (STRINGP (parameters) ?
+                          XSTRING (parameters)->data : NULL),
+                         XSTRING (current_dir)->data,
+                         (INTP (show_flag) ?
+                          XINT (show_flag) : SW_SHOWDEFAULT))
+      > 32)
+    return Qt;
+
+  error ("ShellExecute failed");
+  return Qnil;
+}
+
+void
+syms_of_gui_mswindows (void)
+{
+  DEFSUBR (Fmswindows_shell_execute);
+}
index 7cb4f92..d4b0eaf 100644 (file)
@@ -313,7 +313,7 @@ button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv,
   /* !!#### This function has not been Mule-ized */
   /* This function cannot GC because gc_currently_forbidden is set when
      it's called */
   /* !!#### This function has not been Mule-ized */
   /* This function cannot GC because gc_currently_forbidden is set when
      it's called */
-  struct Lisp_Gui_Item* pgui = 0;
+  Lisp_Gui_Item* pgui = 0;
 
   /* degenerate case */
   if (STRINGP (gui_item))
 
   /* degenerate case */
   if (STRINGP (gui_item))
@@ -358,7 +358,9 @@ button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv,
          CHECK_STRING (suffix2);
        }
 
          CHECK_STRING (suffix2);
        }
 
-      GET_C_STRING_FILENAME_DATA_ALLOCA (suffix2, const_bogosity);
+      TO_EXTERNAL_FORMAT (LISP_STRING, suffix2,
+                         C_STRING_ALLOCA, const_bogosity,
+                         Qfile_name);
       wv->value = (char *) const_bogosity;
       wv->value = xstrdup (wv->value);
     }
       wv->value = (char *) const_bogosity;
       wv->value = xstrdup (wv->value);
     }
@@ -466,17 +468,17 @@ gui_items_to_widget_values_1 (Lisp_Object items, widget_value* parent,
       wv = xmalloc_widget_value();
       if (parent)
        parent->contents = wv;
       wv = xmalloc_widget_value();
       if (parent)
        parent->contents = wv;
-      else 
+      else
        prev->next = wv;
       if (!button_item_to_widget_value (items, wv, 0, 1))
        {
          free_widget_value_tree (wv);
          if (parent)
            parent->contents = 0;
        prev->next = wv;
       if (!button_item_to_widget_value (items, wv, 0, 1))
        {
          free_widget_value_tree (wv);
          if (parent)
            parent->contents = 0;
-         else 
+         else
            prev->next = 0;
        }
            prev->next = 0;
        }
-      else 
+      else
        {
          wv->value = xstrdup (wv->name);       /* what a mess... */
        }
        {
          wv->value = xstrdup (wv->name);       /* what a mess... */
        }
index bb6fa10..640b296 100644 (file)
@@ -21,8 +21,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_XLWLIB_H_
-#define _XEMACS_XLWLIB_H_
+#ifndef INCLUDED_gui_x_h_
+#define INCLUDED_gui_x_h_
 
 #include "../lwlib/lwlib.h"
 
 
 #include "../lwlib/lwlib.h"
 
@@ -75,4 +75,4 @@ Lisp_Object menu_name_to_accelerator (char *name);
 char *menu_separator_style (CONST char *s);
 Lisp_Object widget_value_unwind (Lisp_Object closure);
 
 char *menu_separator_style (CONST char *s);
 Lisp_Object widget_value_unwind (Lisp_Object closure);
 
-#endif /* _XEMACS_XLWLIB_H_ */
+#endif /* INCLUDED_gui_x_h_ */
index a83688c..12d4684 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -105,10 +105,10 @@ get_gui_callback (Lisp_Object data, Lisp_Object *fn, Lisp_Object *arg)
  */
 void
 gui_item_add_keyval_pair (Lisp_Object gui_item,
  */
 void
 gui_item_add_keyval_pair (Lisp_Object gui_item,
-                         Lisp_Object key, Lisp_Object val, 
+                         Lisp_Object key, Lisp_Object val,
                          Error_behavior errb)
 {
                          Error_behavior errb)
 {
-  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+  Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
   if (!KEYWORDP (key))
     signal_simple_error_2 ("Non-keyword in gui item", key, pgui_item->name);
 
   if (!KEYWORDP (key))
     signal_simple_error_2 ("Non-keyword in gui item", key, pgui_item->name);
@@ -122,7 +122,7 @@ gui_item_add_keyval_pair (Lisp_Object gui_item,
   else if (EQ (key, Q_selected)) pgui_item->selected = val;
   else if (EQ (key, Q_keys))    pgui_item->keys     = val;
   else if (EQ (key, Q_callback))        pgui_item->callback     = val;
   else if (EQ (key, Q_selected)) pgui_item->selected = val;
   else if (EQ (key, Q_keys))    pgui_item->keys     = val;
   else if (EQ (key, Q_callback))        pgui_item->callback     = val;
-  else if (EQ (key, Q_key_sequence)) ;   /* ignored for FSF compatability */
+  else if (EQ (key, Q_key_sequence)) ;   /* ignored for FSF compatibility */
   else if (EQ (key, Q_label)) ;   /* ignored for 21.0 implement in 21.2  */
   else if (EQ (key, Q_accelerator))
     {
   else if (EQ (key, Q_label)) ;   /* ignored for 21.0 implement in 21.2  */
   else if (EQ (key, Q_accelerator))
     {
@@ -138,7 +138,7 @@ gui_item_add_keyval_pair (Lisp_Object gui_item,
 void
 gui_item_init (Lisp_Object gui_item)
 {
 void
 gui_item_init (Lisp_Object gui_item)
 {
-  struct Lisp_Gui_Item *lp = XGUI_ITEM (gui_item);
+  Lisp_Gui_Item *lp = XGUI_ITEM (gui_item);
 
   lp->name     = Qnil;
   lp->callback = Qnil;
 
   lp->name     = Qnil;
   lp->callback = Qnil;
@@ -156,8 +156,7 @@ gui_item_init (Lisp_Object gui_item)
 Lisp_Object
 allocate_gui_item (void)
 {
 Lisp_Object
 allocate_gui_item (void)
 {
-  struct Lisp_Gui_Item *lp =
-    alloc_lcrecord_type (struct Lisp_Gui_Item, &lrecord_gui_item);
+  Lisp_Gui_Item *lp = alloc_lcrecord_type (Lisp_Gui_Item, &lrecord_gui_item);
   Lisp_Object val;
 
   zero_lcrecord (lp);
   Lisp_Object val;
 
   zero_lcrecord (lp);
@@ -180,7 +179,7 @@ make_gui_item_from_keywords_internal (Lisp_Object item,
   int length, plist_p, start;
   Lisp_Object *contents;
   Lisp_Object gui_item = allocate_gui_item ();
   int length, plist_p, start;
   Lisp_Object *contents;
   Lisp_Object gui_item = allocate_gui_item ();
-  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+  Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
   CHECK_VECTOR (item);
   length = XVECTOR_LENGTH (item);
 
   CHECK_VECTOR (item);
   length = XVECTOR_LENGTH (item);
@@ -207,7 +206,7 @@ make_gui_item_from_keywords_internal (Lisp_Object item,
       pgui_item->callback = contents [1];
       start = 2;
     }
       pgui_item->callback = contents [1];
       start = 2;
     }
-  else 
+  else
     start =1;
 
   if (!plist_p && length > 2)
     start =1;
 
   if (!plist_p && length > 2)
@@ -252,8 +251,8 @@ gui_parse_item_keywords_no_errors (Lisp_Object item)
 void
 gui_add_item_keywords_to_plist (Lisp_Object plist, Lisp_Object gui_item)
 {
 void
 gui_add_item_keywords_to_plist (Lisp_Object plist, Lisp_Object gui_item)
 {
-  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
-  
+  Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+
   if (!NILP (pgui_item->callback))
     Fplist_put (plist, Q_callback, pgui_item->callback);
   if (!NILP (pgui_item->suffix))
   if (!NILP (pgui_item->callback))
     Fplist_put (plist, Q_callback, pgui_item->callback);
   if (!NILP (pgui_item->suffix))
@@ -294,8 +293,8 @@ gui_item_active_p (Lisp_Object gui_item)
 Lisp_Object
 gui_item_accelerator (Lisp_Object gui_item)
 {
 Lisp_Object
 gui_item_accelerator (Lisp_Object gui_item)
 {
-  struct Lisp_Gui_Item* pgui = XGUI_ITEM (gui_item);
-  
+  Lisp_Gui_Item* pgui = XGUI_ITEM (gui_item);
+
   if (!NILP (pgui->accelerator))
     return pgui->accelerator;
 
   if (!NILP (pgui->accelerator))
     return pgui->accelerator;
 
@@ -348,7 +347,7 @@ int
 gui_item_included_p (Lisp_Object gui_item, Lisp_Object conflist)
 {
   /* This function can call lisp */
 gui_item_included_p (Lisp_Object gui_item, Lisp_Object conflist)
 {
   /* This function can call lisp */
-  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+  Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
   /* Evaluate :included first. Shortcut to avoid evaluating Qt each time */
   if (!EQ (pgui_item->included, Qt)
 
   /* Evaluate :included first. Shortcut to avoid evaluating Qt each time */
   if (!EQ (pgui_item->included, Qt)
@@ -386,7 +385,7 @@ gui_item_display_flush_left  (Lisp_Object gui_item,
   /* This function can call lisp */
   char *p = buf;
   Bytecount len;
   /* This function can call lisp */
   char *p = buf;
   Bytecount len;
-  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+  Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
   /* Copy item name first */
   CHECK_STRING (pgui_item->name);
 
   /* Copy item name first */
   CHECK_STRING (pgui_item->name);
@@ -432,7 +431,7 @@ unsigned int
 gui_item_display_flush_right (Lisp_Object gui_item,
                              char* buf, Bytecount buf_len)
 {
 gui_item_display_flush_right (Lisp_Object gui_item,
                              char* buf, Bytecount buf_len)
 {
-  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+  Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
   *buf = 0;
 
 #ifdef HAVE_MENUBARS
   *buf = 0;
 
 #ifdef HAVE_MENUBARS
@@ -473,7 +472,7 @@ gui_item_display_flush_right (Lisp_Object gui_item,
 static Lisp_Object
 mark_gui_item (Lisp_Object obj)
 {
 static Lisp_Object
 mark_gui_item (Lisp_Object obj)
 {
-  struct Lisp_Gui_Item *p = XGUI_ITEM (obj);
+  Lisp_Gui_Item *p = XGUI_ITEM (obj);
 
   mark_object (p->name);
   mark_object (p->callback);
 
   mark_object (p->name);
   mark_object (p->callback);
@@ -494,7 +493,7 @@ mark_gui_item (Lisp_Object obj)
 static unsigned long
 gui_item_hash (Lisp_Object obj, int depth)
 {
 static unsigned long
 gui_item_hash (Lisp_Object obj, int depth)
 {
-  struct Lisp_Gui_Item *p = XGUI_ITEM (obj);
+  Lisp_Gui_Item *p = XGUI_ITEM (obj);
 
   return HASH2 (HASH5 (internal_hash (p->name, depth + 1),
                       internal_hash (p->callback, depth + 1),
 
   return HASH2 (HASH5 (internal_hash (p->name, depth + 1),
                       internal_hash (p->callback, depth + 1),
@@ -524,8 +523,8 @@ gui_item_id_hash (Lisp_Object hashtable, Lisp_Object gitem, int slot)
 static int
 gui_item_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
 static int
 gui_item_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  struct Lisp_Gui_Item *p1 = XGUI_ITEM (obj1);
-  struct Lisp_Gui_Item *p2 = XGUI_ITEM (obj2);
+  Lisp_Gui_Item *p1 = XGUI_ITEM (obj1);
+  Lisp_Gui_Item *p2 = XGUI_ITEM (obj2);
 
   if (!(internal_equal (p1->name, p2->name, depth + 1)
        &&
 
   if (!(internal_equal (p1->name, p2->name, depth + 1)
        &&
@@ -555,7 +554,7 @@ gui_item_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 static void
 print_gui_item (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
 static void
 print_gui_item (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
-  struct Lisp_Gui_Item *g = XGUI_ITEM (obj);
+  Lisp_Gui_Item *g = XGUI_ITEM (obj);
   char buf[20];
 
   if (print_readably)
   char buf[20];
 
   if (print_readably)
@@ -600,7 +599,7 @@ Lisp_Object parse_gui_item_tree_children (Lisp_Object list)
        sub = parse_gui_item_tree_list (XCAR (rest));
       else
        sub = parse_gui_item_tree_item (XCAR (rest));
        sub = parse_gui_item_tree_list (XCAR (rest));
       else
        sub = parse_gui_item_tree_item (XCAR (rest));
-      
+
       ret = Fcons (sub, ret);
     }
   /* make the order the same as the items we have parsed */
       ret = Fcons (sub, ret);
     }
   /* make the order the same as the items we have parsed */
@@ -621,7 +620,7 @@ DEFINE_LRECORD_IMPLEMENTATION ("gui-item", gui_item,
                               0, gui_item_equal,
                               gui_item_hash,
                               0,
                               0, gui_item_equal,
                               gui_item_hash,
                               0,
-                              struct Lisp_Gui_Item);
+                              Lisp_Gui_Item);
 
 void
 syms_of_gui (void)
 
 void
 syms_of_gui (void)
index 4723252..20b0d5a 100644 (file)
--- a/src/gui.h
+++ b/src/gui.h
@@ -24,8 +24,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Written by kkm on 12/24/97 */
 
 
 /* Written by kkm on 12/24/97 */
 
-#ifndef _XEMACS_GUI_H_
-#define _XEMACS_GUI_H_
+#ifndef INCLUDED_gui_h_
+#define INCLUDED_gui_h_
 
 int separator_string_p (CONST char *s);
 void get_gui_callback (Lisp_Object, Lisp_Object *, Lisp_Object *);
 
 int separator_string_p (CONST char *s);
 void get_gui_callback (Lisp_Object, Lisp_Object *, Lisp_Object *);
@@ -36,14 +36,6 @@ extern int popup_up_p;
 /*                     Image Instance Object                           */
 /************************************************************************/
 
 /*                     Image Instance Object                           */
 /************************************************************************/
 
-DECLARE_LRECORD (gui_item, struct Lisp_Gui_Item);
-#define XGUI_ITEM(x) \
-  XRECORD (x, gui_item, struct Lisp_Gui_Item)
-#define XSETGUI_ITEM(x, p) XSETRECORD (x, p, gui_item)
-#define GUI_ITEMP(x) RECORDP (x, gui_item)
-#define CHECK_GUI_ITEM(x) CHECK_RECORD (x, gui_item)
-#define CONCHECK_GUI_ITEM(x) CONCHECK_RECORD (x, gui_item)
-
 /* This structure describes gui button,
    menu item or submenu properties */
 struct Lisp_Gui_Item
 /* This structure describes gui button,
    menu item or submenu properties */
 struct Lisp_Gui_Item
@@ -62,6 +54,13 @@ struct Lisp_Gui_Item
   Lisp_Object accelerator;     /* Char or Symbol  */
 };
 
   Lisp_Object accelerator;     /* Char or Symbol  */
 };
 
+DECLARE_LRECORD (gui_item, Lisp_Gui_Item);
+#define XGUI_ITEM(x) XRECORD (x, gui_item, Lisp_Gui_Item)
+#define XSETGUI_ITEM(x, p) XSETRECORD (x, p, gui_item)
+#define GUI_ITEMP(x) RECORDP (x, gui_item)
+#define CHECK_GUI_ITEM(x) CHECK_RECORD (x, gui_item)
+#define CONCHECK_GUI_ITEM(x) CONCHECK_RECORD (x, gui_item)
+
 extern Lisp_Object Q_accelerator, Q_active, Q_config, Q_filter, Q_included;
 extern Lisp_Object Q_keys, Q_selected, Q_suffix, Qradio, Qtoggle;
 extern Lisp_Object Q_key_sequence, Q_label, Q_callback;
 extern Lisp_Object Q_accelerator, Q_active, Q_config, Q_filter, Q_included;
 extern Lisp_Object Q_keys, Q_selected, Q_suffix, Qradio, Qtoggle;
 extern Lisp_Object Q_key_sequence, Q_label, Q_callback;
@@ -95,4 +94,4 @@ Lisp_Object parse_gui_item_tree_children (Lisp_Object list);
 
 #define MAX_MENUITEM_LENGTH 128
 
 
 #define MAX_MENUITEM_LENGTH 128
 
-#endif /* _XEMACS_GUI_H_ */
+#endif /* INCLUDED_gui_h_ */
index f9d884f..224d2fa 100644 (file)
@@ -222,13 +222,18 @@ output_gutter (struct frame *f, enum gutter_pos pos)
   struct device *d = XDEVICE (f->device);
   struct window* w = XWINDOW (window);
   int x, y, width, height, ypos;
   struct device *d = XDEVICE (f->device);
   struct window* w = XWINDOW (window);
   int x, y, width, height, ypos;
-  int line;
-  int border_width = FRAME_GUTTER_BORDER_WIDTH (f, pos);
-  face_index findex = get_builtin_face_cache_index (w, Vgui_element_face);
+  int line, border_width;
+  face_index findex;
   display_line_dynarr* ddla, *cdla;
   struct display_line *dl;
   int cdla_len;
 
   display_line_dynarr* ddla, *cdla;
   struct display_line *dl;
   int cdla_len;
 
+  if (!WINDOW_LIVE_P (w))
+    return;
+
+  border_width = FRAME_GUTTER_BORDER_WIDTH (f, pos);
+  findex = get_builtin_face_cache_index (w, Vgui_element_face);
+
   if (!f->current_display_lines)
     f->current_display_lines = Dynarr_new (display_line);
   if (!f->desired_display_lines)
   if (!f->current_display_lines)
     f->current_display_lines = Dynarr_new (display_line);
   if (!f->desired_display_lines)
@@ -984,6 +989,7 @@ See `default-gutter-height' for more information.
   fb = Fcons (Fcons (list1 (Qx), Qautodetect), fb);
 #endif
 #ifdef HAVE_MS_WINDOWS
   fb = Fcons (Fcons (list1 (Qx), Qautodetect), fb);
 #endif
 #ifdef HAVE_MS_WINDOWS
+  fb = Fcons (Fcons (list1 (Qmsprinter), Qautodetect), fb);
   fb = Fcons (Fcons (list1 (Qmswindows), Qautodetect), fb);
 #endif
   if (!NILP (fb))
   fb = Fcons (Fcons (list1 (Qmswindows), Qautodetect), fb);
 #endif
   if (!NILP (fb))
@@ -997,6 +1003,7 @@ See `default-gutter-height' for more information.
   fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_GUTTER_WIDTH)), fb);
 #endif
 #ifdef HAVE_MS_WINDOWS
   fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_GUTTER_WIDTH)), fb);
 #endif
 #ifdef HAVE_MS_WINDOWS
+  fb = Fcons (Fcons (list1 (Qmsprinter), Qzero), fb);
   fb = Fcons (Fcons (list1 (Qmswindows), 
                     make_int (DEFAULT_GUTTER_WIDTH)), fb);
 #endif
   fb = Fcons (Fcons (list1 (Qmswindows), 
                     make_int (DEFAULT_GUTTER_WIDTH)), fb);
 #endif
@@ -1093,6 +1100,7 @@ See `default-gutter-height' for more information.
   fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_GUTTER_BORDER_WIDTH)), fb);
 #endif
 #ifdef HAVE_MS_WINDOWS
   fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_GUTTER_BORDER_WIDTH)), fb);
 #endif
 #ifdef HAVE_MS_WINDOWS
+  fb = Fcons (Fcons (list1 (Qmsprinter), Qzero), fb);
   fb = Fcons (Fcons (list1 (Qmswindows), make_int (DEFAULT_GUTTER_BORDER_WIDTH)), fb);
 #endif
   if (!NILP (fb))
   fb = Fcons (Fcons (list1 (Qmswindows), make_int (DEFAULT_GUTTER_BORDER_WIDTH)), fb);
 #endif
   if (!NILP (fb))
@@ -1191,5 +1199,4 @@ See `default-gutter-visible-p' for more information.
   set_specifier_fallback (Vgutter_visible_p[BOTTOM_GUTTER], fb);
   set_specifier_fallback (Vgutter_visible_p[LEFT_GUTTER],   fb);
   set_specifier_fallback (Vgutter_visible_p[RIGHT_GUTTER],  fb);
   set_specifier_fallback (Vgutter_visible_p[BOTTOM_GUTTER], fb);
   set_specifier_fallback (Vgutter_visible_p[LEFT_GUTTER],   fb);
   set_specifier_fallback (Vgutter_visible_p[RIGHT_GUTTER],  fb);
-
 }
 }
index ccb8746..d0ad07e 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_GUTTER_H_
-#define _XEMACS_GUTTER_H_
+#ifndef INCLUDED_gutter_h_
+#define INCLUDED_gutter_h_
 
 #include "specifier.h"
 
 
 #include "specifier.h"
 
@@ -124,4 +124,4 @@ WINDOW_GUTTER (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos)
 #define FRAME_RIGHT_GUTTER_BOUNDS(f) \
    WINDOW_REAL_GUTTER_BOUNDS (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), RIGHT_GUTTER)
 
 #define FRAME_RIGHT_GUTTER_BOUNDS(f) \
    WINDOW_REAL_GUTTER_BOUNDS (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), RIGHT_GUTTER)
 
-#endif /* _XEMACS_GUTTER_H_ */
+#endif /* INCLUDED_gutter_h_ */
index e55eb85..b480267 100644 (file)
@@ -17,8 +17,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _HASH_H_
-#define _HASH_H_
+#ifndef INCLUDED_hash_h_
+#define INCLUDED_hash_h_
 
 typedef struct
 {
 
 typedef struct
 {
@@ -78,4 +78,4 @@ void maphash (maphash_function mf, struct hash_table *hash_table, void* arg);
 void map_remhash (remhash_predicate predicate,
                  struct hash_table *hash_table, void *arg);
 
 void map_remhash (remhash_predicate predicate,
                  struct hash_table *hash_table, void *arg);
 
-#endif /* _HASH_H_ */
+#endif /* INCLUDED_hash_h_ */
index 2164268..45a434b 100644 (file)
@@ -18,6 +18,9 @@ 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.  */
 
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+#ifndef INCLUDED_imgproc_h_
+#define INCLUDED_imgproc_h_
+
 /* Synched up with: Not in FSF. */
 
 /* Original author: Jareth Hein */
 /* Synched up with: Not in FSF. */
 
 /* Original author: Jareth Hein */
@@ -60,3 +63,5 @@ typedef struct {
 #define QUANT_GET_COLOR(qt,r,g,b) (qt->histogram[r>>COLOR_SHIFT][g>>COLOR_SHIFT][b>>COLOR_SHIFT])
 
 quant_table *build_EImage_quantable(unsigned char *eimage, int width, int height, int num_colors);
 #define QUANT_GET_COLOR(qt,r,g,b) (qt->histogram[r>>COLOR_SHIFT][g>>COLOR_SHIFT][b>>COLOR_SHIFT])
 
 quant_table *build_EImage_quantable(unsigned char *eimage, int width, int height, int num_colors);
+
+#endif /* INCLUDED_imgproc_h_ */
index 8de057e..8aebdbc 100644 (file)
@@ -195,7 +195,7 @@ column_at_point (struct buffer *buf, Bufpos init_pos, int cur_col)
 }
 
 int
 }
 
 int
-string_column_at_point (struct Lisp_String* s, Bufpos init_pos, int tab_width)
+string_column_at_point (Lisp_String* s, Bufpos init_pos, int tab_width)
 {
   int col;
   int tab_seen;
 {
   int col;
   int tab_seen;
index d209e88..a05e055 100644 (file)
@@ -41,7 +41,7 @@ Initialize_Locale (void)
 {
   char *locale;
 
 {
   char *locale;
 
-  /* dverna - Nov. 98: ### DON'T DO THIS !!! The default XtLanguageProc
+  /* dverna - Nov. 98: #### DON'T DO THIS !!! The default XtLanguageProc
      routine calls setlocale(LC_ALL, lang) which fucks up our lower-level
      locale management, and especially the value of LC_NUMERIC. Anyway, since
      at this point, we don't know yet whether we're gonna need an X11 frame,
      routine calls setlocale(LC_ALL, lang) which fucks up our lower-level
      locale management, and especially the value of LC_NUMERIC. Anyway, since
      at this point, we don't know yet whether we're gonna need an X11 frame,
@@ -162,7 +162,7 @@ XIM_SetGeometry (struct frame *f)
 void
 XIM_SetSpotLocation (struct frame *f, int x, int y)
 {
 void
 XIM_SetSpotLocation (struct frame *f, int x, int y)
 {
-  /* ### FIX: Must make sure spot fits within Preedit Area */
+  /* #### FIX: Must make sure spot fits within Preedit Area */
   XPoint *spot = &(FRAME_X_XIC_SPOT (f));
   if (spot->x == (short) x &&
       spot->y == (short) y)
   XPoint *spot = &(FRAME_X_XIC_SPOT (f));
   if (spot->x == (short) x &&
       spot->y == (short) y)
index bdd751d..044e409 100644 (file)
@@ -131,7 +131,7 @@ Initialize_Locale (void)
 {
   char *locale;
 
 {
   char *locale;
 
-  /* dverna - Nov. 98: ### DON'T DO THIS !!! The default XtLanguageProc
+  /* dverna - Nov. 98: #### DON'T DO THIS !!! The default XtLanguageProc
      routine calls setlocale(LC_ALL, lang) which fucks up our lower-level
      locale management, and especially the value of LC_NUMERIC. Anyway, since
      at this point, we don't know yet whether we're gonna need an X11 frame,
      routine calls setlocale(LC_ALL, lang) which fucks up our lower-level
      locale management, and especially the value of LC_NUMERIC. Anyway, since
      at this point, we don't know yet whether we're gonna need an X11 frame,
@@ -481,7 +481,7 @@ XIM_SetSpotLocation (struct frame *f, int x, int y)
   spot->x = (short) x;
   spot->y = (short) y;
 
   spot->x = (short) x;
   spot->y = (short) y;
 
-  /* ### FIX: Must make sure spot fits within Preedit Area */
+  /* #### FIX: Must make sure spot fits within Preedit Area */
   XIC_Value (Set, xic, XNPreeditAttributes, XNSpotLocation, spot);
 #ifdef DEBUG_XIM
   stderr_out ("Spot: %d %d\n", spot->x, spot->y);
   XIC_Value (Set, xic, XNPreeditAttributes, XNSpotLocation, spot);
 #ifdef DEBUG_XIM
   stderr_out ("Spot: %d %d\n", spot->x, spot->y);
index b3e4574..d34103c 100644 (file)
@@ -1605,7 +1605,7 @@ static void
 adjust_markers (struct buffer *buf, Memind from, Memind to,
                Bytecount amount)
 {
 adjust_markers (struct buffer *buf, Memind from, Memind to,
                Bytecount amount)
 {
-  struct Lisp_Marker *m;
+  Lisp_Marker *m;
 
   for (m = BUF_MARKERS (buf); m; m = marker_next (m))
     m->memind = do_marker_adjustment (m->memind, from, to, amount);
 
   for (m = BUF_MARKERS (buf); m; m = marker_next (m))
     m->memind = do_marker_adjustment (m->memind, from, to, amount);
@@ -1617,7 +1617,7 @@ adjust_markers (struct buffer *buf, Memind from, Memind to,
 static void
 adjust_markers_for_insert (struct buffer *buf, Memind ind, Bytecount amount)
 {
 static void
 adjust_markers_for_insert (struct buffer *buf, Memind ind, Bytecount amount)
 {
-  struct Lisp_Marker *m;
+  Lisp_Marker *m;
 
   for (m = BUF_MARKERS (buf); m; m = marker_next (m))
     {
 
   for (m = BUF_MARKERS (buf); m; m = marker_next (m))
     {
@@ -1631,18 +1631,6 @@ adjust_markers_for_insert (struct buffer *buf, Memind ind, Bytecount amount)
 /*                  Routines for dealing with the gap                   */
 /************************************************************************/
 
 /*                  Routines for dealing with the gap                   */
 /************************************************************************/
 
-/* XEmacs requires an ANSI C compiler, and it damn well better have a
-   working memmove() */
-#define GAP_USE_BCOPY
-#ifdef BCOPY_UPWARD_SAFE
-# undef BCOPY_UPWARD_SAFE
-#endif
-#ifdef BCOPY_DOWNWARD_SAFE
-# undef BCOPY_DOWNWARD_SAFE
-#endif
-#define BCOPY_UPWARD_SAFE 1
-#define BCOPY_DOWNWARD_SAFE 1
-
 /* maximum amount of memory moved in a single chunk.  Increasing this
    value improves gap-motion efficiency but decreases QUIT responsiveness
    time.  Was 32000 but today's processors are faster and files are
 /* maximum amount of memory moved in a single chunk.  Increasing this
    value improves gap-motion efficiency but decreases QUIT responsiveness
    time.  Was 32000 but today's processors are faster and files are
@@ -1683,23 +1671,15 @@ gap_left (struct buffer *buf, Bytind pos)
       /* Move at most GAP_MOVE_CHUNK chars before checking again for a quit. */
       if (i > GAP_MOVE_CHUNK)
        i = GAP_MOVE_CHUNK;
       /* Move at most GAP_MOVE_CHUNK chars before checking again for a quit. */
       if (i > GAP_MOVE_CHUNK)
        i = GAP_MOVE_CHUNK;
-#ifdef GAP_USE_BCOPY
-      if (i >= 128
-         /* bcopy is safe if the two areas of memory do not overlap
-            or on systems where bcopy is always safe for moving upward.  */
-         && (BCOPY_UPWARD_SAFE
-             || to - from >= 128))
+
+      if (i >= 128)
        {
        {
-         /* If overlap is not safe, avoid it by not moving too many
-            characters at once.  */
-         if (!BCOPY_UPWARD_SAFE && i > to - from)
-           i = to - from;
          new_s1 -= i;
          new_s1 -= i;
-         from -= i, to -= i;
+         from   -= i;
+         to     -= i;
          memmove (to, from, i);
        }
       else
          memmove (to, from, i);
        }
       else
-#endif
        {
          new_s1 -= i;
          while (--i >= 0)
        {
          new_s1 -= i;
          while (--i >= 0)
@@ -1762,23 +1742,15 @@ gap_right (struct buffer *buf, Bytind pos)
       /* Move at most GAP_MOVE_CHUNK chars before checking again for a quit. */
       if (i > GAP_MOVE_CHUNK)
        i = GAP_MOVE_CHUNK;
       /* Move at most GAP_MOVE_CHUNK chars before checking again for a quit. */
       if (i > GAP_MOVE_CHUNK)
        i = GAP_MOVE_CHUNK;
-#ifdef GAP_USE_BCOPY
-      if (i >= 128
-         /* bcopy is safe if the two areas of memory do not overlap
-            or on systems where bcopy is always safe for moving downward. */
-         && (BCOPY_DOWNWARD_SAFE
-             || from - to >= 128))
+
+      if (i >= 128)
        {
        {
-         /* If overlap is not safe, avoid it by not moving too many
-            characters at once.  */
-         if (!BCOPY_DOWNWARD_SAFE && i > from - to)
-           i = from - to;
          new_s1 += i;
          memmove (to, from, i);
          new_s1 += i;
          memmove (to, from, i);
-         from += i, to += i;
+         from += i;
+         to   += i;
        }
       else
        }
       else
-#endif
        {
          new_s1 += i;
          while (--i >= 0)
        {
          new_s1 += i;
          while (--i >= 0)
index 81d477f..6258126 100644 (file)
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Mostly rewritten by Ben Wing. */
 
 
 /* Mostly rewritten by Ben Wing. */
 
-#ifndef _XEMACS_INSDEL_H_
-#define _XEMACS_INSDEL_H_
+#ifndef INCLUDED_insdel_h_
+#define INCLUDED_insdel_h_
 
 /************************************************************************/
 /*                        changing a buffer's text                      */
 
 /************************************************************************/
 /*                        changing a buffer's text                      */
@@ -159,4 +159,4 @@ void barf_if_buffer_read_only (struct buffer *buf, Bufpos from,
 void init_buffer_text (struct buffer *b);
 void uninit_buffer_text (struct buffer *b);
 
 void init_buffer_text (struct buffer *b);
 void uninit_buffer_text (struct buffer *b);
 
-#endif /* _XEMACS_INSDEL_H_ */
+#endif /* INCLUDED_insdel_h_ */
index f7d8d87..b4e9b2a 100644 (file)
@@ -17,8 +17,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_ISO_WIDE_H
-#define _XEMACS_ISO_WIDE_H
+#ifndef INCLUDED_iso_wide_h_
+#define INCLUDED_iso_wide_h_
 
 /* The following macros are designed for SunOS 5.0 wide characters,
    in which the single byte ISO Latin-1 character 1xxxxxxx are represented
 
 /* The following macros are designed for SunOS 5.0 wide characters,
    in which the single byte ISO Latin-1 character 1xxxxxxx are represented
@@ -46,4 +46,4 @@ Boston, MA 02111-1307, USA.  */
 #define WIDE_TO_BYTE(c)  (IS_ISO_WIDE (c) ? ISO_WIDE_TO_BYTE (c) : (c))
 #define BYTE_TO_WIDE(c)  (IS_ISO_BYTE (c) ? ISO_BYTE_TO_WIDE (c) : (c))
 
 #define WIDE_TO_BYTE(c)  (IS_ISO_WIDE (c) ? ISO_WIDE_TO_BYTE (c) : (c))
 #define BYTE_TO_WIDE(c)  (IS_ISO_BYTE (c) ? ISO_BYTE_TO_WIDE (c) : (c))
 
-#endif /* _XEMACS_ISO_WIDE_H */
+#endif /* INCLUDED_iso_wide_h_ */
index 2fd38ef..5c9162b 100644 (file)
@@ -141,7 +141,7 @@ Boston, MA 02111-1307, USA.  */
    Since keymaps are opaque, the only way to extract information from them
    is with the functions lookup-key, key-binding, local-key-binding, and
    global-key-binding, which work just as before, and the new function
    Since keymaps are opaque, the only way to extract information from them
    is with the functions lookup-key, key-binding, local-key-binding, and
    global-key-binding, which work just as before, and the new function
-   map-keymap, which is roughly analagous to maphash.
+   map-keymap, which is roughly analogous to maphash.
 
    Note that map-keymap perpetuates the illusion that the "bucky" submaps
    don't exist: if you map over a keymap with bucky submaps, it will also
 
    Note that map-keymap perpetuates the illusion that the "bucky" submaps
    don't exist: if you map over a keymap with bucky submaps, it will also
@@ -156,33 +156,25 @@ Boston, MA 02111-1307, USA.  */
 
  */
 
 
  */
 
-typedef struct Lisp_Keymap
+struct Lisp_Keymap
 {
   struct lcrecord_header header;
 {
   struct lcrecord_header header;
-  Lisp_Object parents;         /* Keymaps to be searched after this one
-                                *  An ordered list */
+  Lisp_Object parents;         /* Keymaps to be searched after this one.
+                                  An ordered list */
   Lisp_Object prompt;           /* Qnil or a string to print in the minibuffer
   Lisp_Object prompt;           /* Qnil or a string to print in the minibuffer
-                                 *  when reading from this keymap */
-
+                                   when reading from this keymap */
   Lisp_Object table;           /* The contents of this keymap */
   Lisp_Object inverse_table;   /* The inverse mapping of the above */
   Lisp_Object table;           /* The contents of this keymap */
   Lisp_Object inverse_table;   /* The inverse mapping of the above */
-
   Lisp_Object default_binding;  /* Use this if no other binding is found
   Lisp_Object default_binding;  /* Use this if no other binding is found
-                                 *  (this overrides parent maps and the
-                                 *   normal global-map lookup). */
-
-
+                                   (this overrides parent maps and the
+                                   normal global-map lookup). */
   Lisp_Object sub_maps_cache;  /* Cache of directly inferior keymaps;
                                   This holds an alist, of the key and the
                                   maps, or the modifier bit and the map.
                                   If this is the symbol t, then the cache
   Lisp_Object sub_maps_cache;  /* Cache of directly inferior keymaps;
                                   This holds an alist, of the key and the
                                   maps, or the modifier bit and the map.
                                   If this is the symbol t, then the cache
-                                  needs to be recomputed.
-                                */
-  int fullness;                        /* How many entries there are in this table.
-                                  This should be the same as the fullness
-                                  of the `table', but hash.c is broken. */
+                                  needs to be recomputed. */
   Lisp_Object name;             /* Just for debugging convenience */
   Lisp_Object name;             /* Just for debugging convenience */
-} Lisp_Keymap;
+};
 
 #define MAKE_MODIFIER_HASH_KEY(modifier) make_int (modifier)
 #define MODIFIER_HASH_KEY_BITS(x) (INTP (x) ? XINT (x) : 0)
 
 #define MAKE_MODIFIER_HASH_KEY(modifier) make_int (modifier)
 #define MODIFIER_HASH_KEY_BITS(x) (INTP (x) ? XINT (x) : 0)
@@ -191,7 +183,7 @@ typedef struct Lisp_Keymap
 
 /* Actually allocate storage for these variables */
 
 
 /* Actually allocate storage for these variables */
 
-static Lisp_Object Vcurrent_global_map; /* Always a keymap */
+Lisp_Object Vcurrent_global_map; /* Always a keymap */
 
 static Lisp_Object Vmouse_grabbed_buffer;
 
 
 static Lisp_Object Vmouse_grabbed_buffer;
 
@@ -230,6 +222,7 @@ static void describe_map (Lisp_Object keymap, Lisp_Object elt_prefix,
                          Lisp_Object shadow,
                          int mice_only_p,
                          Lisp_Object buffer);
                          Lisp_Object shadow,
                          int mice_only_p,
                          Lisp_Object buffer);
+static Lisp_Object keymap_submaps (Lisp_Object keymap);
 
 Lisp_Object Qcontrol, Qctrl, Qmeta, Qsuper, Qhyper, Qalt, Qshift;
 Lisp_Object Qbutton0, Qbutton1, Qbutton2, Qbutton3;
 
 Lisp_Object Qcontrol, Qctrl, Qmeta, Qsuper, Qhyper, Qalt, Qshift;
 Lisp_Object Qbutton0, Qbutton1, Qbutton2, Qbutton3;
@@ -270,24 +263,27 @@ print_keymap (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
   /* This function can GC */
   Lisp_Keymap *keymap = XKEYMAP (obj);
   char buf[200];
   /* This function can GC */
   Lisp_Keymap *keymap = XKEYMAP (obj);
   char buf[200];
-  int size = XINT (Fkeymap_fullness (obj));
   if (print_readably)
     error ("printing unreadable object #<keymap 0x%x>", keymap->header.uid);
   write_c_string ("#<keymap ", printcharfun);
   if (!NILP (keymap->name))
   if (print_readably)
     error ("printing unreadable object #<keymap 0x%x>", keymap->header.uid);
   write_c_string ("#<keymap ", printcharfun);
   if (!NILP (keymap->name))
-    print_internal (keymap->name, printcharfun, 1);
-  /* #### Yuck!  This is no way to form plural!  --hniksic */
-  sprintf (buf, "%s%d entr%s 0x%x>",
-           (NILP (keymap->name) ? "" : " "),
-           size,
-           ((size == 1) ? "y" : "ies"),
-           keymap->header.uid);
+    {
+      print_internal (keymap->name, printcharfun, 1);
+      write_c_string (" ", printcharfun);
+    }
+  sprintf (buf, "size %ld 0x%x>",
+          (long) XINT (Fkeymap_fullness (obj)), keymap->header.uid);
   write_c_string (buf, printcharfun);
 }
 
 static const struct lrecord_description keymap_description[] = {
   write_c_string (buf, printcharfun);
 }
 
 static const struct lrecord_description keymap_description[] = {
-  { XD_LISP_OBJECT, offsetof(Lisp_Keymap, parents), 6 },
-  { XD_LISP_OBJECT, offsetof(Lisp_Keymap, name), 1 },
+  { XD_LISP_OBJECT, offsetof (Lisp_Keymap, parents) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Keymap, prompt) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Keymap, table) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Keymap, inverse_table) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Keymap, default_binding) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Keymap, sub_maps_cache) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Keymap, name) },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -319,19 +315,19 @@ traverse_keymaps (Lisp_Object start_keymap, Lisp_Object start_parents,
   start_keymap = get_keymap (start_keymap, 1, 1);
   keymap = start_keymap;
   /* Hack special-case parents at top-level */
   start_keymap = get_keymap (start_keymap, 1, 1);
   keymap = start_keymap;
   /* Hack special-case parents at top-level */
-  tail = ((!NILP (tail)) ? tail : XKEYMAP (keymap)->parents);
+  tail = !NILP (tail) ? tail : XKEYMAP (keymap)->parents;
 
   for (;;)
     {
       Lisp_Object result;
 
       QUIT;
 
   for (;;)
     {
       Lisp_Object result;
 
       QUIT;
-      result = ((mapper) (keymap, mapper_arg));
+      result = mapper (keymap, mapper_arg);
       if (!NILP (result))
        {
          while (CONSP (malloc_bites))
            {
       if (!NILP (result))
        {
          while (CONSP (malloc_bites))
            {
-             struct Lisp_Cons *victim = XCONS (malloc_bites);
+             Lisp_Cons *victim = XCONS (malloc_bites);
              malloc_bites = victim->cdr;
              free_cons (victim);
            }
              malloc_bites = victim->cdr;
              free_cons (victim);
            }
@@ -348,7 +344,7 @@ traverse_keymaps (Lisp_Object start_keymap, Lisp_Object start_parents,
          stack_depth--;
          if (CONSP (malloc_bites))
            {
          stack_depth--;
          if (CONSP (malloc_bites))
            {
-             struct Lisp_Cons *victim = XCONS (malloc_bites);
+             Lisp_Cons *victim = XCONS (malloc_bites);
              tail = victim->car;
              malloc_bites = victim->cdr;
              free_cons (victim);
              tail = victim->car;
              malloc_bites = victim->cdr;
              free_cons (victim);
@@ -583,31 +579,50 @@ keymap_delete_inverse_internal (Lisp_Object inverse_table,
    */
 }
 
    */
 }
 
+/* Prevent luser from shooting herself in the foot using something like
+   (define-key ctl-x-4-map "p" global-map) */
+static void
+check_keymap_definition_loop (Lisp_Object def, Lisp_Keymap *to_keymap)
+{
+  def = get_keymap (def, 0, 0);
+
+  if (KEYMAPP (def))
+    {
+      Lisp_Object maps;
+
+      if (XKEYMAP (def) == to_keymap)
+       signal_simple_error ("Cyclic keymap definition", def);
+
+      for (maps = keymap_submaps (def);
+          CONSP (maps);
+          maps = XCDR (maps))
+       check_keymap_definition_loop (XCDR (XCAR (maps)), to_keymap);
+    }
+}
 
 static void
 keymap_store_internal (Lisp_Object keysym, Lisp_Keymap *keymap,
 
 static void
 keymap_store_internal (Lisp_Object keysym, Lisp_Keymap *keymap,
-                      Lisp_Object value)
+                      Lisp_Object def)
 {
 {
-  Lisp_Object prev_value = Fgethash (keysym, keymap->table, Qnil);
+  Lisp_Object prev_def = Fgethash (keysym, keymap->table, Qnil);
 
 
-  if (EQ (prev_value, value))
+  if (EQ (prev_def, def))
       return;
       return;
-  if (!NILP (prev_value))
+
+  check_keymap_definition_loop (def, keymap);
+
+  if (!NILP (prev_def))
     keymap_delete_inverse_internal (keymap->inverse_table,
     keymap_delete_inverse_internal (keymap->inverse_table,
-                                    keysym, prev_value);
-  if (NILP (value))
+                                    keysym, prev_def);
+  if (NILP (def))
     {
     {
-      keymap->fullness--;
-      if (keymap->fullness < 0) abort ();
       Fremhash (keysym, keymap->table);
     }
   else
     {
       Fremhash (keysym, keymap->table);
     }
   else
     {
-      if (NILP (prev_value))
-       keymap->fullness++;
-      Fputhash (keysym, value, keymap->table);
+      Fputhash (keysym, def, keymap->table);
       keymap_store_inverse_internal (keymap->inverse_table,
       keymap_store_inverse_internal (keymap->inverse_table,
-                                     keysym, value);
+                                     keysym, def);
     }
   keymap_tick++;
 }
     }
   keymap_tick++;
 }
@@ -635,21 +650,14 @@ keymap_store (Lisp_Object keymap, CONST struct key_data *key,
 {
   Lisp_Object keysym = key->keysym;
   unsigned int modifiers = key->modifiers;
 {
   Lisp_Object keysym = key->keysym;
   unsigned int modifiers = key->modifiers;
-  Lisp_Keymap *k;
-
-  if ((modifiers & ~(MOD_CONTROL | MOD_META | MOD_SUPER | MOD_HYPER
-                     | MOD_ALT | MOD_SHIFT)) != 0)
-    abort ();
+  Lisp_Keymap *k = XKEYMAP (keymap);
 
 
-  k = XKEYMAP (keymap);
+  assert ((modifiers & ~(MOD_CONTROL | MOD_META | MOD_SUPER | MOD_HYPER
+                        | MOD_ALT | MOD_SHIFT)) == 0);
 
   /* If the keysym is a one-character symbol, use the char code instead. */
   if (SYMBOLP (keysym) && string_char_length (XSYMBOL (keysym)->name) == 1)
 
   /* If the keysym is a one-character symbol, use the char code instead. */
   if (SYMBOLP (keysym) && string_char_length (XSYMBOL (keysym)->name) == 1)
-    {
-      Lisp_Object run_the_gcc_developers_over_with_a_steamroller =
-       make_char (string_char (XSYMBOL (keysym)->name, 0));
-      keysym = run_the_gcc_developers_over_with_a_steamroller;
-    }
+    keysym = make_char (string_char (XSYMBOL (keysym)->name, 0));
 
   if (modifiers & MOD_META)     /* Utterly hateful ESC lossage */
     {
 
   if (modifiers & MOD_META)     /* Utterly hateful ESC lossage */
     {
@@ -759,7 +767,6 @@ make_keymap (size_t size)
   keymap->inverse_table   = Qnil;
   keymap->default_binding = Qnil;
   keymap->sub_maps_cache  = Qnil; /* No possible submaps */
   keymap->inverse_table   = Qnil;
   keymap->default_binding = Qnil;
   keymap->sub_maps_cache  = Qnil; /* No possible submaps */
-  keymap->fullness        = 0;
   keymap->name            = Qnil;
 
   if (size != 0) /* hack for copy-keymap */
   keymap->name            = Qnil;
 
   if (size != 0) /* hack for copy-keymap */
@@ -1051,7 +1058,7 @@ get_keyelt (Lisp_Object object, int accept_default)
       struct key_data indirection;
       if (CHARP (idx))
        {
       struct key_data indirection;
       if (CHARP (idx))
        {
-         struct Lisp_Event event;
+         Lisp_Event event;
          event.event_type = empty_event;
          character_to_event (XCHAR (idx), &event,
                              XCONSOLE (Vselected_console), 0, 0);
          event.event_type = empty_event;
          character_to_event (XCHAR (idx), &event,
                              XCONSOLE (Vselected_console), 0, 0);
@@ -1137,7 +1144,6 @@ copy_keymap_internal (Lisp_Keymap *keymap)
   copy_keymap_inverse_closure.inverse_table = keymap->inverse_table;
 
   new_keymap->parents        = Fcopy_sequence (keymap->parents);
   copy_keymap_inverse_closure.inverse_table = keymap->inverse_table;
 
   new_keymap->parents        = Fcopy_sequence (keymap->parents);
-  new_keymap->fullness       = keymap->fullness;
   new_keymap->sub_maps_cache = Qnil; /* No submaps */
   new_keymap->table          = Fcopy_hash_table (keymap->table);
   new_keymap->inverse_table  = Fcopy_hash_table (keymap->inverse_table);
   new_keymap->sub_maps_cache = Qnil; /* No submaps */
   new_keymap->table          = Fcopy_hash_table (keymap->table);
   new_keymap->inverse_table  = Fcopy_hash_table (keymap->inverse_table);
@@ -1215,16 +1221,17 @@ keymap_fullness (Lisp_Object keymap)
   struct gcpro gcpro1, gcpro2;
 
   keymap = get_keymap (keymap, 1, 1);
   struct gcpro gcpro1, gcpro2;
 
   keymap = get_keymap (keymap, 1, 1);
-  fullness = XKEYMAP (keymap)->fullness;
-  sub_maps = keymap_submaps (keymap);
+  fullness = XINT (Fhash_table_count (XKEYMAP (keymap)->table));
   GCPRO2 (keymap, sub_maps);
   GCPRO2 (keymap, sub_maps);
-  for (; !NILP (sub_maps); sub_maps = XCDR (sub_maps))
+  for (sub_maps = keymap_submaps (keymap);
+       !NILP (sub_maps);
+       sub_maps = XCDR (sub_maps))
     {
       if (MODIFIER_HASH_KEY_BITS (XCAR (XCAR (sub_maps))) != 0)
        {
     {
       if (MODIFIER_HASH_KEY_BITS (XCAR (XCAR (sub_maps))) != 0)
        {
-         Lisp_Object sub_map = XCDR (XCAR (sub_maps));
-         fullness--; /* don't count bucky maps */
-         fullness += keymap_fullness (sub_map);
+         Lisp_Object bucky_map = XCDR (XCAR (sub_maps));
+         fullness--; /* don't count bucky maps themselves. */
+         fullness += keymap_fullness (bucky_map);
        }
     }
   UNGCPRO;
        }
     }
   UNGCPRO;
@@ -1281,14 +1288,12 @@ define_key_check_and_coerce_keysym (Lisp_Object spec,
     }
   else
     {
     }
   else
     {
-      signal_simple_error ("Unknown keysym specifier",
-                          *keysym);
+      signal_simple_error ("Unknown keysym specifier", *keysym);
     }
 
   if (SYMBOLP (*keysym))
     {
     }
 
   if (SYMBOLP (*keysym))
     {
-      char *name = (char *)
-       string_data (XSYMBOL (*keysym)->name);
+      char *name = (char *) string_data (XSYMBOL (*keysym)->name);
 
       /* FSFmacs uses symbols with the printed representation of keysyms in
         their names, like 'M-x, and we use the syntax '(meta x).  So, to avoid
 
       /* FSFmacs uses symbols with the printed representation of keysyms in
         their names, like 'M-x, and we use the syntax '(meta x).  So, to avoid
@@ -1392,7 +1397,7 @@ define_key_parser (Lisp_Object spec, struct key_data *returned_value)
 {
   if (CHAR_OR_CHAR_INTP (spec))
     {
 {
   if (CHAR_OR_CHAR_INTP (spec))
     {
-      struct Lisp_Event event;
+      Lisp_Event event;
       event.event_type = empty_event;
       character_to_event (XCHAR_OR_CHAR_INT (spec), &event,
                          XCONSOLE (Vselected_console), 0, 0);
       event.event_type = empty_event;
       character_to_event (XCHAR_OR_CHAR_INT (spec), &event,
                          XCONSOLE (Vselected_console), 0, 0);
@@ -1540,8 +1545,7 @@ key_desc_list_to_event (Lisp_Object list, Lisp_Object event,
 
 
 int
 
 
 int
-event_matches_key_specifier_p (struct Lisp_Event *event,
-                              Lisp_Object key_specifier)
+event_matches_key_specifier_p (Lisp_Event *event, Lisp_Object key_specifier)
 {
   Lisp_Object event2;
   int retval;
 {
   Lisp_Object event2;
   int retval;
@@ -1594,7 +1598,7 @@ event_matches_key_specifier_p (struct Lisp_Event *event,
 static int
 meta_prefix_char_p (CONST struct key_data *key)
 {
 static int
 meta_prefix_char_p (CONST struct key_data *key)
 {
-  struct Lisp_Event event;
+  Lisp_Event event;
 
   event.event_type = key_press_event;
   event.channel = Vselected_console;
 
   event.event_type = key_press_event;
   event.channel = Vselected_console;
@@ -1900,20 +1904,17 @@ these features.
                 (defvar my-escape-map (lookup-key my-map "\e"))
                 if the luser really wants the map in a variable.
                 */
                 (defvar my-escape-map (lookup-key my-map "\e"))
                 if the luser really wants the map in a variable.
                 */
-             Lisp_Object mmap;
+             Lisp_Object meta_map;
               struct gcpro ngcpro1;
 
               NGCPRO1 (c);
               struct gcpro ngcpro1;
 
               NGCPRO1 (c);
-              mmap = Fgethash (MAKE_MODIFIER_HASH_KEY (MOD_META),
-                               XKEYMAP (keymap)->table, Qnil);
-             if (!NILP (mmap)
-                 && keymap_fullness (mmap) != 0)
-               {
-                  Lisp_Object desc
-                    = Fsingle_key_description (Vmeta_prefix_char);
-                 signal_simple_error_2
-                   ("Map contains meta-bindings, can't bind", desc, keymap);
-               }
+              meta_map = Fgethash (MAKE_MODIFIER_HASH_KEY (MOD_META),
+                                  XKEYMAP (keymap)->table, Qnil);
+             if (!NILP (meta_map)
+                 && keymap_fullness (meta_map) != 0)
+               signal_simple_error_2
+                 ("Map contains meta-bindings, can't bind",
+                  Fsingle_key_description (Vmeta_prefix_char), keymap);
               NUNGCPRO;
            }
          else
               NUNGCPRO;
            }
          else
@@ -1934,7 +1935,7 @@ these features.
 
       if (metized)
        {
 
       if (metized)
        {
-         raw_key1.modifiers  |= MOD_META;
+         raw_key1.modifiers |= MOD_META;
          raw_key2.modifiers |= MOD_META;
          metized = 0;
        }
          raw_key2.modifiers |= MOD_META;
          metized = 0;
        }
@@ -3093,23 +3094,28 @@ then the value includes only maps for prefixes that start with PREFIX.
   c.tail = Qnil;
   GCPRO4 (accessible_keymaps, c.tail, prefix, keymap);
 
   c.tail = Qnil;
   GCPRO4 (accessible_keymaps, c.tail, prefix, keymap);
 
- retry:
   keymap = get_keymap (keymap, 1, 1);
   keymap = get_keymap (keymap, 1, 1);
+
+ retry:
   if (NILP (prefix))
   if (NILP (prefix))
-    prefix = make_vector (0, Qnil);
-  else if (!VECTORP (prefix) || STRINGP (prefix))
     {
     {
-      prefix = wrong_type_argument (Qarrayp, prefix);
-      goto retry;
+      prefix = make_vector (0, Qnil);
     }
     }
-  else
+  else if (VECTORP (prefix) || STRINGP (prefix))
     {
       int len = XINT (Flength (prefix));
     {
       int len = XINT (Flength (prefix));
-      Lisp_Object def = Flookup_key (keymap, prefix, Qnil);
+      Lisp_Object def;
       Lisp_Object p;
       int iii;
       struct gcpro ngcpro1;
 
       Lisp_Object p;
       int iii;
       struct gcpro ngcpro1;
 
+      if (len == 0)
+       {
+         prefix = Qnil;
+         goto retry;
+       }
+
+      def = Flookup_key (keymap, prefix, Qnil);
       def = get_keymap (def, 0, 1);
       if (!KEYMAPP (def))
        goto RETURN;
       def = get_keymap (def, 0, 1);
       if (!KEYMAPP (def))
        goto RETURN;
@@ -3126,12 +3132,16 @@ then the value includes only maps for prefixes that start with PREFIX.
       NUNGCPRO;
       prefix = p;
     }
       NUNGCPRO;
       prefix = p;
     }
+  else
+    {
+      prefix = wrong_type_argument (Qarrayp, prefix);
+      goto retry;
+    }
 
   accessible_keymaps = list1 (Fcons (prefix, keymap));
 
 
   accessible_keymaps = list1 (Fcons (prefix, keymap));
 
-  /* For each map in the list maps,
-     look at any other maps it points to
-     and stick them at the end if they are not already in the list */
+  /* For each map in the list maps, look at any other maps it points
+     to and stick them at the end if they are not already in the list */
 
   for (c.tail = accessible_keymaps;
        !NILP (c.tail);
 
   for (c.tail = accessible_keymaps;
        !NILP (c.tail);
@@ -3209,7 +3219,7 @@ of a key read from the user rather than a character from a buffer.
       char buf [255];
       if (!EVENTP (key))
        {
       char buf [255];
       if (!EVENTP (key))
        {
-         struct Lisp_Event event;
+         Lisp_Event event;
          event.event_type = empty_event;
          CHECK_CHAR_COERCE_INT (key);
          character_to_event (XCHAR (key), &event,
          event.event_type = empty_event;
          CHECK_CHAR_COERCE_INT (key);
          character_to_event (XCHAR (key), &event,
@@ -3458,7 +3468,7 @@ static void
 format_raw_keys (struct key_data *keys, int count, char *buf)
 {
   int i;
 format_raw_keys (struct key_data *keys, int count, char *buf)
 {
   int i;
-  struct Lisp_Event event;
+  Lisp_Event event;
   event.event_type = key_press_event;
   event.channel = Vselected_console;
   for (i = 0; i < count; i++)
   event.event_type = key_press_event;
   event.channel = Vselected_console;
   for (i = 0; i < count; i++)
index 26edb82..31ff44d 100644 (file)
@@ -21,11 +21,13 @@ Boston, MA 02111-1307, USA.  */
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
 
-#ifndef _XEMACS_KEYMAP_H_
-#define _XEMACS_KEYMAP_H_
+#ifndef INCLUDED_keymap_h_
+#define INCLUDED_keymap_h_
 
 
-DECLARE_LRECORD (keymap, struct Lisp_Keymap);
-#define XKEYMAP(x) XRECORD (x, keymap, struct Lisp_Keymap)
+typedef struct Lisp_Keymap Lisp_Keymap;
+
+DECLARE_LRECORD (keymap, Lisp_Keymap);
+#define XKEYMAP(x) XRECORD (x, keymap, Lisp_Keymap)
 #define XSETKEYMAP(x, p) XSETRECORD (x, p, keymap)
 #define KEYMAPP(x) RECORDP (x, keymap)
 #define CHECK_KEYMAP(x) CHECK_RECORD (x, keymap)
 #define XSETKEYMAP(x, p) XSETRECORD (x, p, keymap)
 #define KEYMAPP(x) RECORDP (x, keymap)
 #define CHECK_KEYMAP(x) CHECK_RECORD (x, keymap)
@@ -55,7 +57,7 @@ void describe_map_tree (Lisp_Object startmap, int partial,
 void key_desc_list_to_event (Lisp_Object list, Lisp_Object event,
                             int allow_menu_events);
 
 void key_desc_list_to_event (Lisp_Object list, Lisp_Object event,
                             int allow_menu_events);
 
-int event_matches_key_specifier_p (struct Lisp_Event *event,
+int event_matches_key_specifier_p (Lisp_Event *event,
                                   Lisp_Object key_specifier);
 
                                   Lisp_Object key_specifier);
 
-#endif /* _XEMACS_KEYMAP_H_ */
+#endif /* INCLUDED_keymap_h_ */
index 05692a0..f81d172 100644 (file)
@@ -12,6 +12,9 @@
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
+#ifndef INCLUDED_libsst_h_
+#define INCLUDED_libsst_h_
+
 #include <sys/ioctl.h>
 #ifndef SUNOS4_0_3
 #define AUDIO_4_0_3_COMPAT
 #include <sys/ioctl.h>
 #ifndef SUNOS4_0_3
 #define AUDIO_4_0_3_COMPAT
@@ -46,3 +49,5 @@ extern void message ();
 #else /* !emacs */
 # define warn(str) fprintf (stderr, "%s\n", (str))
 #endif /* emacs */
 #else /* !emacs */
 # define warn(str) fprintf (stderr, "%s\n", (str))
 #endif /* emacs */
+
+#endif /* INCLUDED_libsst_h_ */
index 70daca0..45e8824 100644 (file)
@@ -12,6 +12,9 @@
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
+#ifndef INCLUDED_libst_h_
+#define INCLUDED_libst_h_
+
 #define SAMPLES_PER_SECOND 8192
 
 #define MINLIN -32768
 #define SAMPLES_PER_SECOND 8192
 
 #define MINLIN -32768
@@ -65,3 +68,5 @@ static int ulaw_table[256] = {
        244,    228,    212,    196,    180,    164,    148,    132,
        120,    112,    104,     96,     88,     80,     72,     64,
        56,     48,     40,     32,     24,     16,      8,      0 };
        244,    228,    212,    196,    180,    164,    148,    132,
        120,    112,    104,     96,     88,     80,     72,     64,
        56,     48,     40,     32,     24,     16,      8,      0 };
+
+#endif /* INCLUDED_libst_h_ */
index 653d648..087976b 100644 (file)
@@ -17,6 +17,9 @@ 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.  */
 
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+#ifndef INCLUDED_line_number_h_
+#define INCLUDED_line_number_h_
+
 /* Synched up with: Not in FSF. */
 
 void narrow_line_number_cache (struct buffer *);
 /* Synched up with: Not in FSF. */
 
 void narrow_line_number_cache (struct buffer *);
@@ -25,3 +28,5 @@ void insert_invalidate_line_number_cache (struct buffer *, Bufpos,
 void delete_invalidate_line_number_cache (struct buffer *, Bufpos, Bufpos);
 
 EMACS_INT buffer_line_number (struct buffer *, Bufpos, int);
 void delete_invalidate_line_number_cache (struct buffer *, Bufpos, Bufpos);
 
 EMACS_INT buffer_line_number (struct buffer *, Bufpos, int);
+
+#endif /* INCLUDED_line_number_h_ */
index 04dc325..b686084 100644 (file)
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: FSF 19.30. */
 
 
 /* Synched up with: FSF 19.30. */
 
-#ifndef _XEMACS_LISP_H_
-#define _XEMACS_LISP_H_
+#ifndef INCLUDED_lisp_h_
+#define INCLUDED_lisp_h_
 
 /************************************************************************/
 /*                       general definitions                           */
 
 /************************************************************************/
 /*                       general definitions                           */
@@ -62,7 +62,7 @@ void Dynarr_insert_many (void *d, CONST void *el, int len, int start);
 void Dynarr_delete_many (void *d, int start, int len);
 void Dynarr_free (void *d);
 
 void Dynarr_delete_many (void *d, int start, int len);
 void Dynarr_free (void *d);
 
-#define Dynarr_new(type) ((type##_dynarr *) Dynarr_newf (sizeof(type)))
+#define Dynarr_new(type) ((type##_dynarr *) Dynarr_newf (sizeof (type)))
 #define Dynarr_at(d, pos) ((d)->base[pos])
 #define Dynarr_atp(d, pos) (&Dynarr_at (d, pos))
 #define Dynarr_length(d) ((d)->cur)
 #define Dynarr_at(d, pos) ((d)->base[pos])
 #define Dynarr_atp(d, pos) (&Dynarr_at (d, pos))
 #define Dynarr_length(d) ((d)->cur)
@@ -71,9 +71,9 @@ void Dynarr_free (void *d);
 #define Dynarr_add_many(d, el, len) Dynarr_insert_many (d, el, len, (d)->cur)
 #define Dynarr_insert_many_at_start(d, el, len)        \
   Dynarr_insert_many (d, el, len, 0)
 #define Dynarr_add_many(d, el, len) Dynarr_insert_many (d, el, len, (d)->cur)
 #define Dynarr_insert_many_at_start(d, el, len)        \
   Dynarr_insert_many (d, el, len, 0)
-#define Dynarr_add_literal_string(d, s) Dynarr_add_many (d, s, sizeof(s) - 1)
+#define Dynarr_add_literal_string(d, s) Dynarr_add_many (d, s, sizeof (s) - 1)
 #define Dynarr_add_lisp_string(d, s) do {              \
 #define Dynarr_add_lisp_string(d, s) do {              \
-  struct Lisp_String *dyna_ls_s = XSTRING (s);         \
+  Lisp_String *dyna_ls_s = XSTRING (s);                        \
   Dynarr_add_many (d, (char *) string_data (dyna_ls_s),        \
                   string_length (dyna_ls_s));          \
 } while (0)
   Dynarr_add_many (d, (char *) string_data (dyna_ls_s),        \
                   string_length (dyna_ls_s));          \
 } while (0)
@@ -88,9 +88,6 @@ void Dynarr_free (void *d);
 #define Dynarr_increment(d) ((d)->cur++)
 #define Dynarr_set_size(d, n) ((d)->cur = n)
 
 #define Dynarr_increment(d) ((d)->cur++)
 #define Dynarr_set_size(d, n) ((d)->cur = n)
 
-/* Minimum size in elements for dynamic array when resized; default is 32 */
-extern int Dynarr_min_size;
-
 #ifdef MEMORY_USAGE_STATS
 struct overhead_stats;
 size_t Dynarr_memory_usage (void *d, struct overhead_stats *stats);
 #ifdef MEMORY_USAGE_STATS
 struct overhead_stats;
 size_t Dynarr_memory_usage (void *d, struct overhead_stats *stats);
@@ -340,20 +337,13 @@ struct extent;
 typedef struct extent *EXTENT;
 struct frame;                  /* "frame.h" */
 struct window;                  /* "window.h" */
 typedef struct extent *EXTENT;
 struct frame;                  /* "frame.h" */
 struct window;                  /* "window.h" */
-struct Lisp_Event;              /* "events.h" */
-typedef struct Lisp_Event Lisp_Event;
-struct Lisp_Face;
-typedef struct Lisp_Face Lisp_Face;
-struct Lisp_Process;            /* "process.c" */
-typedef struct Lisp_Process Lisp_Process;
+typedef struct Lisp_Event Lisp_Event; /* "events.h" */
+typedef struct Lisp_Face Lisp_Face;   /* "faces.h" */
+typedef struct Lisp_Process Lisp_Process; /* "procimpl.h" */
 struct stat;                    /* <sys/stat.h> */
 struct stat;                    /* <sys/stat.h> */
-struct Lisp_Color_Instance;
 typedef struct Lisp_Color_Instance Lisp_Color_Instance;
 typedef struct Lisp_Color_Instance Lisp_Color_Instance;
-struct Lisp_Font_Instance;
 typedef struct Lisp_Font_Instance Lisp_Font_Instance;
 typedef struct Lisp_Font_Instance Lisp_Font_Instance;
-struct Lisp_Image_Instance;
 typedef struct Lisp_Image_Instance Lisp_Image_Instance;
 typedef struct Lisp_Image_Instance Lisp_Image_Instance;
-struct Lisp_Gui_Item;
 typedef struct Lisp_Gui_Item Lisp_Gui_Item;
 struct display_line;
 struct display_glyph_area;
 typedef struct Lisp_Gui_Item Lisp_Gui_Item;
 struct display_line;
 struct display_glyph_area;
@@ -427,47 +417,6 @@ typedef struct
   Dynarr_declare (struct console_type_entry);
 } console_type_entry_dynarr;
 
   Dynarr_declare (struct console_type_entry);
 } console_type_entry_dynarr;
 
-/* Need to declare this here. */
-enum external_data_format
-{
-  /* Binary format.  This is the simplest format and is what we
-     use in the absence of a more appropriate format.  This converts
-     according to the `binary' coding system:
-
-     a) On input, bytes 0 - 255 are converted into characters 0 - 255.
-     b) On output, characters 0 - 255 are converted into bytes 0 - 255
-        and other characters are converted into `X'.
-   */
-  FORMAT_BINARY,
-
-  /* Format used for filenames.  In the original Mule, this is
-     user-definable with the `pathname-coding-system' variable.
-     For the moment, we just use the `binary' coding system. */
-  FORMAT_FILENAME,
-
-  /* Format used for output to the terminal.  This should be controlled
-     by the `terminal-coding-system' variable.  Under kterm, this will
-     be some ISO2022 system.  On some DOS machines, this is Shift-JIS. */
-  FORMAT_TERMINAL,
-
-  /* Format used for input from the terminal.  This should be controlled
-     by the `keyboard-coding-system' variable. */
-  FORMAT_KEYBOARD,
-
-  /* Format used for the external Unix environment -- argv[], stuff
-     from getenv(), stuff from the /etc/passwd file, etc.
-
-     Perhaps should be the same as FORMAT_FILENAME. */
-  FORMAT_OS,
-
-  /* Compound-text format.  This is the standard X format used for
-     data stored in properties, selections, and the like.  This is
-     an 8-bit no-lock-shift ISO2022 coding system. */
-  FORMAT_CTEXT
-};
-
-#define FORMAT_NATIVE FORMAT_FILENAME
-
 enum run_hooks_condition
 {
   RUN_HOOKS_TO_COMPLETION,
 enum run_hooks_condition
 {
   RUN_HOOKS_TO_COMPLETION,
@@ -1116,17 +1065,17 @@ set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value)
 
 /*********** symbol ***********/
 
 
 /*********** symbol ***********/
 
+typedef struct Lisp_Symbol Lisp_Symbol;
 struct Lisp_Symbol
 {
   struct lrecord_header lheader;
   /* next symbol in this obarray bucket */
 struct Lisp_Symbol
 {
   struct lrecord_header lheader;
   /* next symbol in this obarray bucket */
-  struct Lisp_Symbol *next;
-  struct Lisp_String *name;
+  Lisp_Symbol *next;
+  Lisp_String *name;
   Lisp_Object value;
   Lisp_Object function;
   Lisp_Object plist;
 };
   Lisp_Object value;
   Lisp_Object function;
   Lisp_Object plist;
 };
-typedef struct Lisp_Symbol Lisp_Symbol;
 
 #define SYMBOL_IS_KEYWORD(sym)                                         \
   ((string_byte (symbol_name (XSYMBOL (sym)), 0) == ':')               \
 
 #define SYMBOL_IS_KEYWORD(sym)                                         \
   ((string_byte (symbol_name (XSYMBOL (sym)), 0) == ':')               \
@@ -1177,15 +1126,16 @@ DECLARE_LRECORD (subr, Lisp_Subr);
 
 /*********** marker ***********/
 
 
 /*********** marker ***********/
 
+typedef struct Lisp_Marker Lisp_Marker;
 struct Lisp_Marker
 {
   struct lrecord_header lheader;
 struct Lisp_Marker
 {
   struct lrecord_header lheader;
-  struct Lisp_Marker *next, *prev;
+  Lisp_Marker *next;
+  Lisp_Marker *prev;
   struct buffer *buffer;
   Memind memind;
   char insertion_type;
 };
   struct buffer *buffer;
   Memind memind;
   char insertion_type;
 };
-typedef struct Lisp_Marker Lisp_Marker;
 
 DECLARE_LRECORD (marker, Lisp_Marker);
 #define XMARKER(x) XRECORD (x, marker, Lisp_Marker)
 
 DECLARE_LRECORD (marker, Lisp_Marker);
 #define XMARKER(x) XRECORD (x, marker, Lisp_Marker)
@@ -1362,7 +1312,7 @@ XCHAR_OR_INT (Lisp_Object obj)
 
 
 /*********** readonly objects ***********/
 
 
 /*********** readonly objects ***********/
-    
+
 #define CHECK_C_WRITEABLE(obj)                                 \
   do { if (c_readonly (obj)) c_write_error (obj); } while (0)
 
 #define CHECK_C_WRITEABLE(obj)                                 \
   do { if (c_readonly (obj)) c_write_error (obj); } while (0)
 
@@ -2031,11 +1981,10 @@ extern EMACS_INT gc_generation_number[1];
 int c_readonly (Lisp_Object);
 int lisp_readonly (Lisp_Object);
 Lisp_Object build_string (CONST char *);
 int c_readonly (Lisp_Object);
 int lisp_readonly (Lisp_Object);
 Lisp_Object build_string (CONST char *);
-Lisp_Object build_ext_string (CONST char *, enum external_data_format);
+Lisp_Object build_ext_string (CONST char *, Lisp_Object);
 Lisp_Object build_translated_string (CONST char *);
 Lisp_Object make_string (CONST Bufbyte *, Bytecount);
 Lisp_Object build_translated_string (CONST char *);
 Lisp_Object make_string (CONST Bufbyte *, Bytecount);
-Lisp_Object make_ext_string (CONST Extbyte *, EMACS_INT,
-                            enum external_data_format);
+Lisp_Object make_ext_string (CONST Extbyte *, EMACS_INT, Lisp_Object);
 Lisp_Object make_uninit_string (Bytecount);
 Lisp_Object make_float (double);
 Lisp_Object make_string_nocopy (CONST Bufbyte *, Bytecount);
 Lisp_Object make_uninit_string (Bytecount);
 Lisp_Object make_float (double);
 Lisp_Object make_string_nocopy (CONST Bufbyte *, Bytecount);
@@ -2125,7 +2074,7 @@ Lisp_Object emacs_doprnt_string_lisp_2 (CONST Bufbyte *, Lisp_Object,
 
 /* Defined in editfns.c */
 void uncache_home_directory (void);
 
 /* Defined in editfns.c */
 void uncache_home_directory (void);
-char *get_home_directory (void);
+Extbyte *get_home_directory (void);
 char *user_login_name (uid_t *);
 Bufpos bufpos_clip_to_bounds (Bufpos, Bufpos, Bufpos);
 Bytind bytind_clip_to_bounds (Bytind, Bytind, Bytind);
 char *user_login_name (uid_t *);
 Bufpos bufpos_clip_to_bounds (Bufpos, Bufpos, Bufpos);
 Bytind bytind_clip_to_bounds (Bytind, Bytind, Bytind);
@@ -2286,7 +2235,6 @@ void signal_special_Xt_user_event (Lisp_Object, Lisp_Object, Lisp_Object);
 /* Defined in events.c */
 void clear_event_resource (void);
 Lisp_Object allocate_event (void);
 /* Defined in events.c */
 void clear_event_resource (void);
 Lisp_Object allocate_event (void);
-int event_to_character (Lisp_Event *, int, int, int);
 
 /* Defined in fileio.c */
 void record_auto_save (void);
 
 /* Defined in fileio.c */
 void record_auto_save (void);
@@ -2368,7 +2316,7 @@ Lisp_Object encode_error_behavior_flag (Error_behavior);
 /* Defined in indent.c */
 int bi_spaces_at_point (struct buffer *, Bytind);
 int column_at_point (struct buffer *, Bufpos, int);
 /* Defined in indent.c */
 int bi_spaces_at_point (struct buffer *, Bytind);
 int column_at_point (struct buffer *, Bufpos, int);
-int string_column_at_point (struct Lisp_String *, Bufpos, int);
+int string_column_at_point (Lisp_String *, Bufpos, int);
 int current_column (struct buffer *);
 void invalidate_current_column (void);
 Bufpos vmotion (struct window *, Bufpos, int, int *);
 int current_column (struct buffer *);
 void invalidate_current_column (void);
 Bufpos vmotion (struct window *, Bufpos, int, int *);
@@ -2444,7 +2392,7 @@ void clear_message (void);
 /* Defined in print.c */
 void write_string_to_stdio_stream (FILE *, struct console *,
                                   CONST Bufbyte *, Bytecount, Bytecount,
 /* Defined in print.c */
 void write_string_to_stdio_stream (FILE *, struct console *,
                                   CONST Bufbyte *, Bytecount, Bytecount,
-                                  enum external_data_format);
+                                  Lisp_Object);
 void debug_print (Lisp_Object);
 void debug_short_backtrace (int);
 void temp_output_buffer_setup (Lisp_Object);
 void debug_print (Lisp_Object);
 void debug_short_backtrace (int);
 void temp_output_buffer_setup (Lisp_Object);
@@ -2493,7 +2441,7 @@ Bufpos scan_buffer (struct buffer *, Emchar, Bufpos, Bufpos, EMACS_INT, EMACS_IN
 Bufpos find_next_newline (struct buffer *, Bufpos, int);
 Bufpos find_next_newline_no_quit (struct buffer *, Bufpos, int);
 Bytind bi_find_next_newline_no_quit (struct buffer *, Bytind, int);
 Bufpos find_next_newline (struct buffer *, Bufpos, int);
 Bufpos find_next_newline_no_quit (struct buffer *, Bufpos, int);
 Bytind bi_find_next_newline_no_quit (struct buffer *, Bytind, int);
-Bytind bi_find_next_emchar_in_string (struct Lisp_String*, Emchar, Bytind, EMACS_INT);
+Bytind bi_find_next_emchar_in_string (Lisp_String*, Emchar, Bytind, EMACS_INT);
 Bufpos find_before_next_newline (struct buffer *, Bufpos, Bufpos, int);
 struct re_pattern_buffer *compile_pattern (Lisp_Object, struct re_registers *,
                                           char *, int, Error_behavior);
 Bufpos find_before_next_newline (struct buffer *, Bufpos, Bufpos, int);
 struct re_pattern_buffer *compile_pattern (Lisp_Object, struct re_registers *,
                                           char *, int, Error_behavior);
@@ -2694,10 +2642,9 @@ EXFUN (Flength, 1);
 EXFUN (Fleq, MANY);
 EXFUN (Flist, MANY);
 EXFUN (Flistp, 1);
 EXFUN (Fleq, MANY);
 EXFUN (Flist, MANY);
 EXFUN (Flistp, 1);
-#ifdef HAVE_SHLIB
 EXFUN (Flist_modules, 0);
 EXFUN (Fload_module, 3);
 EXFUN (Flist_modules, 0);
 EXFUN (Fload_module, 3);
-#endif
+EXFUN (Flookup_key, 3);
 EXFUN (Flss, MANY);
 EXFUN (Fmake_byte_code, MANY);
 EXFUN (Fmake_coding_system, 4);
 EXFUN (Flss, MANY);
 EXFUN (Fmake_byte_code, MANY);
 EXFUN (Fmake_coding_system, 4);
@@ -2809,8 +2756,9 @@ extern Lisp_Object Q_style, Qactually_requested, Qactivate_menubar_hook;
 extern Lisp_Object Qafter, Qall, Qand;
 extern Lisp_Object Qarith_error, Qarrayp, Qassoc, Qat, Qautodetect, Qautoload;
 extern Lisp_Object Qbackground, Qbackground_pixmap, Qbad_variable, Qbefore;
 extern Lisp_Object Qafter, Qall, Qand;
 extern Lisp_Object Qarith_error, Qarrayp, Qassoc, Qat, Qautodetect, Qautoload;
 extern Lisp_Object Qbackground, Qbackground_pixmap, Qbad_variable, Qbefore;
-extern Lisp_Object Qbeginning_of_buffer, Qbig5, Qbinary, Qbitmap, Qbitp, Qblinking;
-extern Lisp_Object Qboolean, Qbottom, Qbuffer;
+extern Lisp_Object Qbeginning_of_buffer, Qbig5, Qbinary;
+extern Lisp_Object Qbitmap, Qbitp, Qblinking;
+extern Lisp_Object Qboolean, Qbottom, Qbottom_margin, Qbuffer;
 extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only, Qbutton;
 extern Lisp_Object Qbyte_code, Qcall_interactively, Qcategory;
 extern Lisp_Object Qcategory_designator_p, Qcategory_table_value_p, Qccl, Qcdr;
 extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only, Qbutton;
 extern Lisp_Object Qbyte_code, Qcall_interactively, Qcategory;
 extern Lisp_Object Qcategory_designator_p, Qcategory_table_value_p, Qccl, Qcdr;
@@ -2821,67 +2769,76 @@ extern Lisp_Object Qcoding_system_error;
 extern Lisp_Object Qcolor, Qcolor_pixmap_image_instance_p;
 extern Lisp_Object Qcolumns, Qcommand, Qcommandp, Qcompletion_ignore_case;
 extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcr, Qcritical;
 extern Lisp_Object Qcolor, Qcolor_pixmap_image_instance_p;
 extern Lisp_Object Qcolumns, Qcommand, Qcommandp, Qcompletion_ignore_case;
 extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcr, Qcritical;
-extern Lisp_Object Qcrlf, Qctext, Qcurrent_menubar, Qcursor;
+extern Lisp_Object Qcrlf, Qctext, Qcurrent_menubar, Qctext, Qcursor;
 extern Lisp_Object Qcyclic_variable_indirection, Qdata, Qdead, Qdecode;
 extern Lisp_Object Qdefault, Qdefun, Qdelete, Qdelq, Qdevice, Qdevice_live_p;
 extern Lisp_Object Qdim, Qdimension, Qdisabled, Qdisplay, Qdisplay_table;
 extern Lisp_Object Qcyclic_variable_indirection, Qdata, Qdead, Qdecode;
 extern Lisp_Object Qdefault, Qdefun, Qdelete, Qdelq, Qdevice, Qdevice_live_p;
 extern Lisp_Object Qdim, Qdimension, Qdisabled, Qdisplay, Qdisplay_table;
-extern Lisp_Object Qdoc_string, Qdomain_error, Qdynarr_overhead;
+extern Lisp_Object Qdoc_string, Qdomain_error, Qduplex, Qdynarr_overhead;
 extern Lisp_Object Qempty, Qencode, Qend_of_buffer, Qend_of_file, Qend_open;
 extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qeq, Qeql, Qequal;
 extern Lisp_Object Qerror, Qerror_conditions, Qerror_message, Qescape_quoted;
 extern Lisp_Object Qeval, Qevent_live_p, Qexit, Qextent_live_p, Qextents;
 extern Lisp_Object Qempty, Qencode, Qend_of_buffer, Qend_of_file, Qend_open;
 extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qeq, Qeql, Qequal;
 extern Lisp_Object Qerror, Qerror_conditions, Qerror_message, Qescape_quoted;
 extern Lisp_Object Qeval, Qevent_live_p, Qexit, Qextent_live_p, Qextents;
-extern Lisp_Object Qexternal_debugging_output, Qface, Qfeaturep, Qfile_error;
+extern Lisp_Object Qexternal_debugging_output, Qface, Qfeaturep;
+extern Lisp_Object Qfile_name, Qfile_error;
 extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output;
 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground;
 extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfunction, Qgap_overhead;
 extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output;
 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground;
 extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfunction, Qgap_overhead;
-extern Lisp_Object Qgeneric, Qgeometry, Qglobal, Qheight, Qhighlight, Qhorizontal, Qicon;
+extern Lisp_Object Qgeneric, Qgeometry, Qglobal, Qheight;
+extern Lisp_Object Qhighlight, Qhorizontal, Qicon;
 extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qimage, Qinfo, Qinherit;
 extern Lisp_Object Qinhibit_quit, Qinhibit_read_only;
 extern Lisp_Object Qinput_charset_conversion, Qinteger;
 extern Lisp_Object Qinteger_char_or_marker_p, Qinteger_or_char_p;
 extern Lisp_Object Qinteger_or_marker_p, Qintegerp, Qinteractive, Qinternal;
 extern Lisp_Object Qinvalid_function, Qinvalid_read_syntax, Qio_error;
 extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qimage, Qinfo, Qinherit;
 extern Lisp_Object Qinhibit_quit, Qinhibit_read_only;
 extern Lisp_Object Qinput_charset_conversion, Qinteger;
 extern Lisp_Object Qinteger_char_or_marker_p, Qinteger_or_char_p;
 extern Lisp_Object Qinteger_or_marker_p, Qintegerp, Qinteractive, Qinternal;
 extern Lisp_Object Qinvalid_function, Qinvalid_read_syntax, Qio_error;
-extern Lisp_Object Qiso2022, Qkey, Qkey_assoc, Qkeymap, Qlambda, Qlayout, Qleft, Qlf;
+extern Lisp_Object Qiso2022, Qkey, Qkey_assoc, Qkeyboard, Qkeymap;
+extern Lisp_Object Qlambda, Qlayout, Qlandscape, Qleft, Qleft_margin, Qlf;
 extern Lisp_Object Qlist, Qlistp, Qload, Qlock_shift, Qmacro, Qmagic;
 extern Lisp_Object Qlist, Qlistp, Qload, Qlock_shift, Qmacro, Qmagic;
-extern Lisp_Object Qmalformed_list, Qmalformed_property_list;
+extern Lisp_Object Qmakunbound, Qmalformed_list, Qmalformed_property_list;
 extern Lisp_Object Qmalloc_overhead, Qmark, Qmarkers;
 extern Lisp_Object Qmax, Qmemory, Qmessage, Qminus, Qmnemonic, Qmodifiers;
 extern Lisp_Object Qmono_pixmap_image_instance_p, Qmotion;
 extern Lisp_Object Qmalloc_overhead, Qmark, Qmarkers;
 extern Lisp_Object Qmax, Qmemory, Qmessage, Qminus, Qmnemonic, Qmodifiers;
 extern Lisp_Object Qmono_pixmap_image_instance_p, Qmotion;
-extern Lisp_Object Qmouse_leave_buffer_hook, Qmswindows, Qname, Qnas, Qnatnump;
+extern Lisp_Object Qmouse_leave_buffer_hook, Qmsprinter, Qmswindows;
+extern Lisp_Object Qname, Qnas, Qnatnump;
 extern Lisp_Object Qno_ascii_cntl, Qno_ascii_eol, Qno_catch;
 extern Lisp_Object Qno_conversion, Qno_iso6429, Qnone, Qnot, Qnothing;
 extern Lisp_Object Qnothing_image_instance_p, Qnotice;
 extern Lisp_Object Qnumber_char_or_marker_p, Qnumberp;
 extern Lisp_Object Qobject, Qold_assoc, Qold_delete, Qold_delq, Qold_rassoc;
 extern Lisp_Object Qno_ascii_cntl, Qno_ascii_eol, Qno_catch;
 extern Lisp_Object Qno_conversion, Qno_iso6429, Qnone, Qnot, Qnothing;
 extern Lisp_Object Qnothing_image_instance_p, Qnotice;
 extern Lisp_Object Qnumber_char_or_marker_p, Qnumberp;
 extern Lisp_Object Qobject, Qold_assoc, Qold_delete, Qold_delq, Qold_rassoc;
-extern Lisp_Object Qold_rassq, Qonly, Qor, Qother, Qoutput_charset_conversion;
+extern Lisp_Object Qold_rassq, Qonly, Qor, Qother;
+extern Lisp_Object Qorientation, Qoutput_charset_conversion;
 extern Lisp_Object Qoverflow_error, Qpoint, Qpointer, Qpointer_glyph_p;
 extern Lisp_Object Qoverflow_error, Qpoint, Qpointer, Qpointer_glyph_p;
-extern Lisp_Object Qpointer_image_instance_p, Qpost_read_conversion;
+extern Lisp_Object Qpointer_image_instance_p, Qportrait, Qpost_read_conversion;
 extern Lisp_Object Qpre_write_conversion, Qprint, Qprint_length;
 extern Lisp_Object Qprint_string_length, Qprocess, Qprogn, Qprovide, Qquit;
 extern Lisp_Object Qquote, Qrange_error, Qrassoc, Qrassq, Qread_char;
 extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler;
 extern Lisp_Object Qregion_beginning, Qregion_end, Qrequire, Qresource;
 extern Lisp_Object Qpre_write_conversion, Qprint, Qprint_length;
 extern Lisp_Object Qprint_string_length, Qprocess, Qprogn, Qprovide, Qquit;
 extern Lisp_Object Qquote, Qrange_error, Qrassoc, Qrassq, Qread_char;
 extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler;
 extern Lisp_Object Qregion_beginning, Qregion_end, Qrequire, Qresource;
-extern Lisp_Object Qreturn, Qreverse, Qright, Qrun_hooks, Qsans_modifiers;
+extern Lisp_Object Qreturn, Qreverse, Qright, Qright_margin;
+extern Lisp_Object Qrun_hooks, Qsans_modifiers;
 extern Lisp_Object Qsave_buffers_kill_emacs, Qsearch, Qselected;
 extern Lisp_Object Qself_insert_command, Qself_insert_defer_undo;
 extern Lisp_Object Qsave_buffers_kill_emacs, Qsearch, Qselected;
 extern Lisp_Object Qself_insert_command, Qself_insert_defer_undo;
-extern Lisp_Object Qsequencep, Qsetting_constant, Qseven, Qshift_jis, Qshort;
+extern Lisp_Object Qsequencep, Qset, Qsetting_constant;
+extern Lisp_Object Qseven, Qshift_jis, Qshort;
 extern Lisp_Object Qsignal, Qsimple, Qsingularity_error, Qsize, Qspace;
 extern Lisp_Object Qspecifier, Qstandard_input, Qstandard_output, Qstart_open;
 extern Lisp_Object Qstream, Qstring, Qstring_lessp, Qsubwindow;
 extern Lisp_Object Qsignal, Qsimple, Qsingularity_error, Qsize, Qspace;
 extern Lisp_Object Qspecifier, Qstandard_input, Qstandard_output, Qstart_open;
 extern Lisp_Object Qstream, Qstring, Qstring_lessp, Qsubwindow;
-extern Lisp_Object Qsubwindow_image_instance_p, Qsymbol, Qsyntax, Qt, Qtest;
+extern Lisp_Object Qsubwindow_image_instance_p;
+extern Lisp_Object Qsymbol, Qsyntax, Qt, Qterminal, Qtest;
 extern Lisp_Object Qtext, Qtext_image_instance_p, Qtimeout, Qtimestamp;
 extern Lisp_Object Qtext, Qtext_image_instance_p, Qtimeout, Qtimestamp;
-extern Lisp_Object Qtoolbar, Qtop, Qtop_level, Qtrue_list_p, Qtty, Qtype;
+extern Lisp_Object Qtoolbar, Qtop, Qtop_margin, Qtop_level;
+extern Lisp_Object Qtrue_list_p, Qtty, Qtype;
 extern Lisp_Object Qunbound, Qundecided, Qundefined, Qunderflow_error;
 extern Lisp_Object Qunderline, Qunimplemented, Quser_files_and_directories;
 extern Lisp_Object Qvalue_assoc, Qvalues;
 extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvertical;
 extern Lisp_Object Qunbound, Qundecided, Qundefined, Qunderflow_error;
 extern Lisp_Object Qunderline, Qunimplemented, Quser_files_and_directories;
 extern Lisp_Object Qvalue_assoc, Qvalues;
 extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvertical;
-extern Lisp_Object Qvoid_function, Qvoid_variable, Qwarning, Qwidth, Qwidget, Qwindow;
+extern Lisp_Object Qvoid_function, Qvoid_variable, Qwarning;
+extern Lisp_Object Qwidth, Qwidget, Qwindow;
 extern Lisp_Object Qwindow_live_p, Qwindow_system, Qwrong_number_of_arguments;
 extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes_or_no_p;
 extern Lisp_Object Vactivate_menubar_hook, Vascii_canon_table;
 extern Lisp_Object Vascii_downcase_table, Vascii_eqv_table;
 extern Lisp_Object Qwindow_live_p, Qwindow_system, Qwrong_number_of_arguments;
 extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes_or_no_p;
 extern Lisp_Object Vactivate_menubar_hook, Vascii_canon_table;
 extern Lisp_Object Vascii_downcase_table, Vascii_eqv_table;
-extern Lisp_Object Vascii_upcase_table, Vautoload_queue, Vbinary_process_input;
-extern Lisp_Object Vbinary_process_output, Vblank_menubar;
+extern Lisp_Object Vascii_upcase_table, Vautoload_queue, Vblank_menubar;
 extern Lisp_Object Vcharset_ascii, Vcharset_composite, Vcharset_control_1;
 extern Lisp_Object Vcoding_system_for_read, Vcoding_system_for_write;
 extern Lisp_Object Vcoding_system_hash_table, Vcommand_history;
 extern Lisp_Object Vcharset_ascii, Vcharset_composite, Vcharset_control_1;
 extern Lisp_Object Vcoding_system_for_read, Vcoding_system_for_write;
 extern Lisp_Object Vcoding_system_hash_table, Vcommand_history;
@@ -2914,9 +2871,6 @@ extern Lisp_Object Vsite_module_directory;
 extern Lisp_Object Vstandard_input, Vstandard_output, Vstdio_str;
 extern Lisp_Object Vsynchronous_sounds, Vsystem_name, Vterminal_coding_system;
 extern Lisp_Object Vthis_command_keys, Vunread_command_event;
 extern Lisp_Object Vstandard_input, Vstandard_output, Vstdio_str;
 extern Lisp_Object Vsynchronous_sounds, Vsystem_name, Vterminal_coding_system;
 extern Lisp_Object Vthis_command_keys, Vunread_command_event;
-extern Lisp_Object Vwin32_generate_fake_inodes, Vwin32_pipe_read_delay;
 extern Lisp_Object Vx_initial_argv_list;
 
 extern Lisp_Object Vx_initial_argv_list;
 
-extern Lisp_Object Qmakunbound, Qset;
-
-#endif /* _XEMACS_LISP_H_ */
+#endif /* INCLUDED_lisp_h_ */
index a92fc18..a4505e0 100644 (file)
@@ -2036,6 +2036,7 @@ read_bit_vector (Lisp_Object readcharfun)
 {
   unsigned_char_dynarr *dyn = Dynarr_new (unsigned_char);
   Emchar c;
 {
   unsigned_char_dynarr *dyn = Dynarr_new (unsigned_char);
   Emchar c;
+  Lisp_Object val;
 
   while (1)
     {
 
   while (1)
     {
@@ -2048,8 +2049,12 @@ read_bit_vector (Lisp_Object readcharfun)
   if (c >= 0)
     unreadchar (readcharfun, c);
 
   if (c >= 0)
     unreadchar (readcharfun, c);
 
-  return make_bit_vector_from_byte_vector (Dynarr_atp (dyn, 0),
-                                          Dynarr_length (dyn));
+  val = make_bit_vector_from_byte_vector (Dynarr_atp (dyn, 0),
+                                         Dynarr_length (dyn));
+
+  Dynarr_free (dyn);
+
+  return val;
 }
 
 \f
 }
 
 \f
@@ -2997,7 +3002,7 @@ read_vector (Lisp_Object readcharfun,
        i < len;
        i++, p++)
   {
        i < len;
        i++, p++)
   {
-    struct Lisp_Cons *otem = XCONS (tem);
+    Lisp_Cons *otem = XCONS (tem);
     tem = Fcar (tem);
     *p = tem;
     tem = otem->cdr;
     tem = Fcar (tem);
     *p = tem;
     tem = otem->cdr;
@@ -3029,7 +3034,7 @@ read_compiled_function (Lisp_Object readcharfun, Emchar terminator)
 
   for (iii = 0; CONSP (stuff); iii++)
     {
 
   for (iii = 0; CONSP (stuff); iii++)
     {
-      struct Lisp_Cons *victim = XCONS (stuff);
+      Lisp_Cons *victim = XCONS (stuff);
       make_byte_code_args[iii] = Fcar (stuff);
       if ((purify_flag || load_force_doc_strings)
           && CONSP (make_byte_code_args[iii])
       make_byte_code_args[iii] = Fcar (stuff);
       if ((purify_flag || load_force_doc_strings)
           && CONSP (make_byte_code_args[iii])
index 0dc5e05..ca12997 100644 (file)
@@ -21,8 +21,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_LRECORD_H_
-#define _XEMACS_LRECORD_H_
+#ifndef INCLUDED_lrecord_h_
+#define INCLUDED_lrecord_h_
 
 /* The "lrecord" type of Lisp object is used for all object types
    other than a few simple ones.  This allows many types to be
 
 /* The "lrecord" type of Lisp object is used for all object types
    other than a few simple ones.  This allows many types to be
@@ -210,17 +210,19 @@ extern int gc_in_progress;
    The description ends with a "XD_END" or "XD_SPECIFIER_END" record.
 
    Some example descriptions :
    The description ends with a "XD_END" or "XD_SPECIFIER_END" record.
 
    Some example descriptions :
+
    static const struct lrecord_description cons_description[] = {
    static const struct lrecord_description cons_description[] = {
-     { XD_LISP_OBJECT, offsetof(struct Lisp_Cons, car), 2 },
+     { XD_LISP_OBJECT, offsetof (Lisp_Cons, car) },
+     { XD_LISP_OBJECT, offsetof (Lisp_Cons, cdr) },
      { XD_END }
    };
 
      { XD_END }
    };
 
-   Which means "two lisp objects starting at the 'car' element"
+   Which means "two lisp objects starting at the 'car' and 'cdr' elements"
 
   static const struct lrecord_description string_description[] = {
 
   static const struct lrecord_description string_description[] = {
-    { XD_BYTECOUNT,       offsetof(Lisp_String, size) },
-    { XD_OPAQUE_DATA_PTR, offsetof(Lisp_String, data), XD_INDIRECT(0, 1) },
-    { XD_LISP_OBJECT,     offsetof(Lisp_String, plist), 1 },
+    { XD_BYTECOUNT,       offsetof (Lisp_String, size) },
+    { XD_OPAQUE_DATA_PTR, offsetof (Lisp_String, data), XD_INDIRECT(0, 1) },
+    { XD_LISP_OBJECT,     offsetof (Lisp_String, plist) },
     { XD_END }
   };
   "A pointer to string data at 'data', the size of the pointed array being the value
     { XD_END }
   };
   "A pointer to string data at 'data', the size of the pointed array being the value
@@ -228,10 +230,13 @@ extern int gc_in_progress;
 
   The existing types :
     XD_LISP_OBJECT
 
   The existing types :
     XD_LISP_OBJECT
-  Lisp objects.  The third element is the count.  This is also the type to use
-  for pointers to other lrecords.
+  A Lisp object.  This is also the type to use for pointers to other lrecords.
+
+    XD_LISP_OBJECT_ARRAY
+  An array of Lisp objects or pointers to lrecords.
+  The third element is the count.
 
 
-    XD_LO_RESET_NIL
+  XD_LO_RESET_NIL
   Lisp objects which will be reset to Qnil when dumping.  Useful for cleaning
   up caches.
 
   Lisp objects which will be reset to Qnil when dumping.  Useful for cleaning
   up caches.
 
@@ -287,6 +292,7 @@ extern int gc_in_progress;
 */
 
 enum lrecord_description_type {
 */
 
 enum lrecord_description_type {
+  XD_LISP_OBJECT_ARRAY,
   XD_LISP_OBJECT,
   XD_LO_RESET_NIL,
   XD_LO_LINK,
   XD_LISP_OBJECT,
   XD_LO_RESET_NIL,
   XD_LO_LINK,
@@ -323,9 +329,9 @@ struct struct_description {
 #define XD_INDIRECT_DELTA(code) (((-1-code)>>8) & 255)
 
 #define XD_DYNARR_DESC(base_type, sub_desc) \
 #define XD_INDIRECT_DELTA(code) (((-1-code)>>8) & 255)
 
 #define XD_DYNARR_DESC(base_type, sub_desc) \
-  { XD_STRUCT_PTR, offsetof(base_type, base), XD_INDIRECT(1, 0), sub_desc }, \
-  { XD_INT,        offsetof(base_type, cur) }, \
-  { XD_INT_RESET,  offsetof(base_type, max), XD_INDIRECT(1, 0) }
+  { XD_STRUCT_PTR, offsetof (base_type, base), XD_INDIRECT(1, 0), sub_desc }, \
+  { XD_INT,        offsetof (base_type, cur) }, \
+  { XD_INT_RESET,  offsetof (base_type, max), XD_INDIRECT(1, 0) }
 
 /* Declaring the following structures as const puts them in the
    text (read-only) segment, which makes debugging inconvenient
 
 /* Declaring the following structures as const puts them in the
    text (read-only) segment, which makes debugging inconvenient
@@ -497,4 +503,4 @@ void *alloc_lcrecord (size_t size, CONST struct lrecord_implementation *);
    memset ((char *) (lcr) + sizeof (struct lcrecord_header), 0,        \
           sizeof (*(lcr)) - sizeof (struct lcrecord_header))
 
    memset ((char *) (lcr) + sizeof (struct lcrecord_header), 0,        \
           sizeof (*(lcr)) - sizeof (struct lcrecord_header))
 
-#endif /* _XEMACS_LRECORD_H_ */
+#endif /* INCLUDED_lrecord_h_ */
index 3e6d1ac..8c82733 100644 (file)
@@ -472,7 +472,7 @@ Lstream_write_1 (Lstream *lstr, CONST void *data, size_t size)
 /* If the stream is not line-buffered, then we can just call
    Lstream_write_1(), which writes in chunks.  Otherwise, we
    repeatedly call Lstream_putc(), which knows how to handle
 /* If the stream is not line-buffered, then we can just call
    Lstream_write_1(), which writes in chunks.  Otherwise, we
    repeatedly call Lstream_putc(), which knows how to handle
-   line buffering. */
+   line buffering.  Returns number of bytes written. */
 
 ssize_t
 Lstream_write (Lstream *lstr, CONST void *data, size_t size)
 
 ssize_t
 Lstream_write (Lstream *lstr, CONST void *data, size_t size)
@@ -489,7 +489,7 @@ Lstream_write (Lstream *lstr, CONST void *data, size_t size)
       if (Lstream_putc (lstr, p[i]) < 0)
        break;
     }
       if (Lstream_putc (lstr, p[i]) < 0)
        break;
     }
-  return i == 0 ? -1 : 0;
+  return i == 0 ? -1 : (ssize_t) i;
 }
 
 int
 }
 
 int
@@ -1255,24 +1255,24 @@ DEFINE_LSTREAM_IMPLEMENTATION ("fixed-buffer", lstream_fixed_buffer,
                               sizeof (struct fixed_buffer_stream));
 
 Lisp_Object
                               sizeof (struct fixed_buffer_stream));
 
 Lisp_Object
-make_fixed_buffer_input_stream (CONST unsigned char *buf, size_t size)
+make_fixed_buffer_input_stream (CONST void *buf, size_t size)
 {
   Lisp_Object obj;
   Lstream *lstr = Lstream_new (lstream_fixed_buffer, "r");
   struct fixed_buffer_stream *str = FIXED_BUFFER_STREAM_DATA (lstr);
 {
   Lisp_Object obj;
   Lstream *lstr = Lstream_new (lstream_fixed_buffer, "r");
   struct fixed_buffer_stream *str = FIXED_BUFFER_STREAM_DATA (lstr);
-  str->inbuf = buf;
+  str->inbuf = (const unsigned char *) buf;
   str->size = size;
   XSETLSTREAM (obj, lstr);
   return obj;
 }
 
 Lisp_Object
   str->size = size;
   XSETLSTREAM (obj, lstr);
   return obj;
 }
 
 Lisp_Object
-make_fixed_buffer_output_stream (unsigned char *buf, size_t size)
+make_fixed_buffer_output_stream (void *buf, size_t size)
 {
   Lisp_Object obj;
   Lstream *lstr = Lstream_new (lstream_fixed_buffer, "w");
   struct fixed_buffer_stream *str = FIXED_BUFFER_STREAM_DATA (lstr);
 {
   Lisp_Object obj;
   Lstream *lstr = Lstream_new (lstream_fixed_buffer, "w");
   struct fixed_buffer_stream *str = FIXED_BUFFER_STREAM_DATA (lstr);
-  str->outbuf = buf;
+  str->outbuf = (unsigned char *) buf;
   str->size = size;
   XSETLSTREAM (obj, lstr);
   return obj;
   str->size = size;
   XSETLSTREAM (obj, lstr);
   return obj;
index 1108045..b9b0fc2 100644 (file)
@@ -23,8 +23,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Written by Ben Wing. */
 
 
 /* Written by Ben Wing. */
 
-#ifndef _XEMACS_LSTREAM_H_
-#define _XEMACS_LSTREAM_H_
+#ifndef INCLUDED_lstream_h_
+#define INCLUDED_lstream_h_
 
 /************************************************************************/
 /*                     definition of Lstream object                     */
 
 /************************************************************************/
 /*                     definition of Lstream object                     */
@@ -339,10 +339,8 @@ int filedesc_stream_fd (Lstream *stream);
 Lisp_Object make_lisp_string_input_stream (Lisp_Object string,
                                           Bytecount offset,
                                           Bytecount len);
 Lisp_Object make_lisp_string_input_stream (Lisp_Object string,
                                           Bytecount offset,
                                           Bytecount len);
-Lisp_Object make_fixed_buffer_input_stream (CONST unsigned char *buf,
-                                           size_t size);
-Lisp_Object make_fixed_buffer_output_stream (unsigned char *buf,
-                                            size_t size);
+Lisp_Object make_fixed_buffer_input_stream (CONST void *buf, size_t size);
+Lisp_Object make_fixed_buffer_output_stream (void *buf, size_t size);
 CONST unsigned char *fixed_buffer_input_stream_ptr (Lstream *stream);
 unsigned char *fixed_buffer_output_stream_ptr (Lstream *stream);
 Lisp_Object make_resizing_buffer_output_stream (void);
 CONST unsigned char *fixed_buffer_input_stream_ptr (Lstream *stream);
 unsigned char *fixed_buffer_output_stream_ptr (Lstream *stream);
 Lisp_Object make_resizing_buffer_output_stream (void);
@@ -356,4 +354,4 @@ Lisp_Object make_lisp_buffer_output_stream (struct buffer *buf, Bufpos pos,
                                            int flags);
 Bufpos lisp_buffer_stream_startpos (Lstream *stream);
 
                                            int flags);
 Bufpos lisp_buffer_stream_startpos (Lstream *stream);
 
-#endif /* _XEMACS_LSTREAM_H_ */
+#endif /* INCLUDED_lstream_h_ */
index d82d150..750710b 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: FSF 19.30. */
 
 
 /* Synched up with: FSF 19.30. */
 
-#ifndef _XEMACS_MACROS_H_
-#define _XEMACS_MACROS_H_
+#ifndef INCLUDED_macros_h_
+#define INCLUDED_macros_h_
 
 /* Index of next character to fetch from that macro */
 
 
 /* Index of next character to fetch from that macro */
 
@@ -35,4 +35,4 @@ EXFUN (Fexecute_kbd_macro, 2);
 
 extern Lisp_Object Vexecuting_macro;
 
 
 extern Lisp_Object Vexecuting_macro;
 
-#endif /* _XEMACS_MACROS_H_ */
+#endif /* INCLUDED_macros_h_ */
index 5f9db4a..408acc3 100644 (file)
@@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA.  */
 static Lisp_Object
 mark_marker (Lisp_Object obj)
 {
 static Lisp_Object
 mark_marker (Lisp_Object obj)
 {
-  struct Lisp_Marker *marker = XMARKER (obj);
+  Lisp_Marker *marker = XMARKER (obj);
   Lisp_Object buf;
   /* DO NOT mark through the marker's chain.
      The buffer's markers chain does not preserve markers from gc;
   Lisp_Object buf;
   /* DO NOT mark through the marker's chain.
      The buffer's markers chain does not preserve markers from gc;
@@ -55,7 +55,7 @@ mark_marker (Lisp_Object obj)
 static void
 print_marker (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
 static void
 print_marker (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
-  struct Lisp_Marker *marker = XMARKER (obj);
+  Lisp_Marker *marker = XMARKER (obj);
   char buf[200];
 
   if (print_readably)
   char buf[200];
 
   if (print_readably)
@@ -77,8 +77,8 @@ print_marker (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 static int
 marker_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
 static int
 marker_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  struct Lisp_Marker *marker1 = XMARKER (obj1);
-  struct Lisp_Marker *marker2 = XMARKER (obj2);
+  Lisp_Marker *marker1 = XMARKER (obj1);
+  Lisp_Marker *marker2 = XMARKER (obj2);
 
   return ((marker1->buffer == marker2->buffer) &&
          (marker1->memind == marker2->memind ||
 
   return ((marker1->buffer == marker2->buffer) &&
          (marker1->memind == marker2->memind ||
@@ -96,14 +96,16 @@ marker_hash (Lisp_Object obj, int depth)
 }
 
 static const struct lrecord_description marker_description[] = {
 }
 
 static const struct lrecord_description marker_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Marker, next), 3 },
+  { XD_LISP_OBJECT, offsetof (Lisp_Marker, next) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Marker, prev) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Marker, buffer) },
   { XD_END }
 };
 
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("marker", marker,
                                     mark_marker, print_marker, 0,
                                     marker_equal, marker_hash, marker_description,
   { XD_END }
 };
 
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("marker", marker,
                                     mark_marker, print_marker, 0,
                                     marker_equal, marker_hash, marker_description,
-                                    struct Lisp_Marker);
+                                    Lisp_Marker);
 \f
 /* Operations on markers. */
 
 \f
 /* Operations on markers. */
 
@@ -140,7 +142,7 @@ Return `nil' if marker doesn't point anywhere.
 static void
 check_marker_circularities (struct buffer *buf)
 {
 static void
 check_marker_circularities (struct buffer *buf)
 {
-  struct Lisp_Marker *tortoise, *hare;
+  Lisp_Marker *tortoise, *hare;
 
   tortoise = BUF_MARKERS (buf);
   hare = tortoise;
 
   tortoise = BUF_MARKERS (buf);
   hare = tortoise;
@@ -171,7 +173,7 @@ set_marker_internal (Lisp_Object marker, Lisp_Object pos, Lisp_Object buffer,
 {
   Bufpos charno;
   struct buffer *b;
 {
   Bufpos charno;
   struct buffer *b;
-  struct Lisp_Marker *m;
+  Lisp_Marker *m;
   int point_p;
 
   CHECK_MARKER (marker);
   int point_p;
 
   CHECK_MARKER (marker);
@@ -287,7 +289,7 @@ set_marker_restricted (Lisp_Object marker, Lisp_Object pos, Lisp_Object buffer)
 void
 unchain_marker (Lisp_Object m)
 {
 void
 unchain_marker (Lisp_Object m)
 {
-  struct Lisp_Marker *marker = XMARKER (m);
+  Lisp_Marker *marker = XMARKER (m);
   struct buffer *b = marker->buffer;
 
   if (b == 0)
   struct buffer *b = marker->buffer;
 
   if (b == 0)
@@ -314,7 +316,7 @@ unchain_marker (Lisp_Object m)
 Bytind
 bi_marker_position (Lisp_Object marker)
 {
 Bytind
 bi_marker_position (Lisp_Object marker)
 {
-  struct Lisp_Marker *m = XMARKER (marker);
+  Lisp_Marker *m = XMARKER (marker);
   struct buffer *buf = m->buffer;
   Bytind pos;
 
   struct buffer *buf = m->buffer;
   Bytind pos;
 
@@ -351,7 +353,7 @@ marker_position (Lisp_Object marker)
 void
 set_bi_marker_position (Lisp_Object marker, Bytind pos)
 {
 void
 set_bi_marker_position (Lisp_Object marker, Bytind pos)
 {
-  struct Lisp_Marker *m = XMARKER (marker);
+  Lisp_Marker *m = XMARKER (marker);
   struct buffer *buf = m->buffer;
 
   if (!buf)
   struct buffer *buf = m->buffer;
 
   if (!buf)
@@ -458,7 +460,7 @@ Return t if there are markers pointing at POSITION in the current buffer.
 */
        (position))
 {
 */
        (position))
 {
-  struct Lisp_Marker *marker;
+  Lisp_Marker *marker;
   Memind pos;
 
   /* A small optimization trick: convert POS to memind now, rather
   Memind pos;
 
   /* A small optimization trick: convert POS to memind now, rather
@@ -487,12 +489,12 @@ Return t if there are markers pointing at POSITION in the current buffer.
 int
 compute_buffer_marker_usage (struct buffer *b, struct overhead_stats *ovstats)
 {
 int
 compute_buffer_marker_usage (struct buffer *b, struct overhead_stats *ovstats)
 {
-  struct Lisp_Marker *m;
+  Lisp_Marker *m;
   int total = 0;
   int overhead;
 
   for (m = BUF_MARKERS (b); m; m = m->next)
   int total = 0;
   int overhead;
 
   for (m = BUF_MARKERS (b); m; m = m->next)
-    total += sizeof (struct Lisp_Marker);
+    total += sizeof (Lisp_Marker);
   ovstats->was_requested += total;
   overhead = fixed_type_block_overhead (total);
   /* #### claiming this is all malloc overhead is not really right,
   ovstats->was_requested += total;
   overhead = fixed_type_block_overhead (total);
   /* #### claiming this is all malloc overhead is not really right,
@@ -538,7 +540,7 @@ uninit_buffer_markers (struct buffer *b)
 {
   /* Unchain all markers of this buffer
      and leave them pointing nowhere.  */
 {
   /* Unchain all markers of this buffer
      and leave them pointing nowhere.  */
-  REGISTER struct Lisp_Marker *m, *next;
+  REGISTER Lisp_Marker *m, *next;
   for (m = BUF_MARKERS (b); m; m = next)
     {
       m->buffer = 0;
   for (m = BUF_MARKERS (b); m; m = next)
     {
       m->buffer = 0;
index 3fb0e4e..fac6732 100644 (file)
@@ -27,8 +27,8 @@ Boston, MA 02111-1307, USA.  */
    getrlimit() should be preferred to ulimit().
    On Linux, ulimit() is deprecated and always returns -1. */
 
    getrlimit() should be preferred to ulimit().
    On Linux, ulimit() is deprecated and always returns -1. */
 
-#ifndef _XEMACS_MEM_LIMITS_H_
-#define _XEMACS_MEM_LIMITS_H_
+#ifndef INCLUDED_mem_limits_h_
+#define INCLUDED_mem_limits_h_
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
@@ -220,4 +220,4 @@ get_lim_data (void)
 #endif /* not NO_LIM_DATA */
 #endif /* not HEAP_IN_DATA */
 
 #endif /* not NO_LIM_DATA */
 #endif /* not HEAP_IN_DATA */
 
-#endif /* _XEMACS_MEM_LIMITS_H_ */
+#endif /* INCLUDED_mem_limits_h_ */
index 2681f0f..d25ccc6 100644 (file)
@@ -278,7 +278,7 @@ populate_menu_add_item (HMENU menu, Lisp_Object path,
       /* Submenu */
       HMENU submenu;
       Lisp_Object gui_item = allocate_gui_item ();
       /* Submenu */
       HMENU submenu;
       Lisp_Object gui_item = allocate_gui_item ();
-      struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+      Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
       struct gcpro gcpro1;
 
       GCPRO1 (gui_item);
       struct gcpro gcpro1;
 
       GCPRO1 (gui_item);
@@ -328,7 +328,7 @@ populate_menu_add_item (HMENU menu, Lisp_Object path,
       /* An ordinary item */
       Lisp_Object style, id;
       Lisp_Object gui_item = gui_parse_item_keywords (item);
       /* An ordinary item */
       Lisp_Object style, id;
       Lisp_Object gui_item = gui_parse_item_keywords (item);
-      struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+      Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
       struct gcpro gcpro1;
 
       GCPRO1 (gui_item);
       struct gcpro gcpro1;
 
       GCPRO1 (gui_item);
@@ -393,7 +393,7 @@ populate_or_checksum_helper (HMENU menu, Lisp_Object path, Lisp_Object desc,
   struct gcpro gcpro1;
   unsigned long checksum;
   Lisp_Object gui_item = allocate_gui_item ();
   struct gcpro gcpro1;
   unsigned long checksum;
   Lisp_Object gui_item = allocate_gui_item ();
-  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+  Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
   GCPRO1 (gui_item);
 
   /* We are sometimes called with the menubar unchanged, and with changed
   GCPRO1 (gui_item);
 
   /* We are sometimes called with the menubar unchanged, and with changed
@@ -736,7 +736,7 @@ static void
 mswindows_popup_menu (Lisp_Object menu_desc, Lisp_Object event)
 {
   struct frame *f = selected_frame ();
 mswindows_popup_menu (Lisp_Object menu_desc, Lisp_Object event)
 {
   struct frame *f = selected_frame ();
-  struct Lisp_Event *eev = NULL;
+  Lisp_Event *eev = NULL;
   HMENU menu;
   POINT pt;
   int ok;
   HMENU menu;
   POINT pt;
   int ok;
index dee8384..1f1197d 100644 (file)
@@ -26,8 +26,8 @@ Boston, MA 02111-1307, USA.  */
    Initially written by kkm 12/24/97,
    */
 
    Initially written by kkm 12/24/97,
    */
 
-#ifndef _XEMACS_MENUBAR_MSW_H_
-#define _XEMACS_MENUBAR_MSW_H_
+#ifndef INCLUDED_menubar_msw_h_
+#define INCLUDED_menubar_msw_h_
 
 
 #ifdef HAVE_MENUBARS
 
 
 #ifdef HAVE_MENUBARS
@@ -39,5 +39,5 @@ Lisp_Object mswindows_handle_wm_command (struct frame* f, WORD command);
 
 #endif /* HAVE_MENUBARS */
 
 
 #endif /* HAVE_MENUBARS */
 
-#endif /* _XEMACS_MENUBAR_MSW_H_ */
+#endif /* INCLUDED_menubar_msw_h_ */
 
 
index 62f4afc..216856f 100644 (file)
@@ -656,9 +656,7 @@ popup_menu_down_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
 
 \f
 static void
 
 \f
 static void
-make_dummy_xbutton_event (XEvent *dummy,
-                         Widget daddy,
-                         struct Lisp_Event *eev)
+make_dummy_xbutton_event (XEvent *dummy, Widget daddy, Lisp_Event *eev)
      /* NULL for eev means query pointer */
 {
   XButtonPressedEvent *btn = (XButtonPressedEvent *) dummy;
      /* NULL for eev means query pointer */
 {
   XButtonPressedEvent *btn = (XButtonPressedEvent *) dummy;
@@ -777,7 +775,7 @@ x_popup_menu (Lisp_Object menu_desc, Lisp_Object event)
   widget_value *data;
   Widget parent;
   Widget menu;
   widget_value *data;
   Widget parent;
   Widget menu;
-  struct Lisp_Event *eev = NULL;
+  Lisp_Event *eev = NULL;
   XEvent xev;
   Lisp_Object frame;
 
   XEvent xev;
   Lisp_Object frame;
 
index c92232f..0460f26 100644 (file)
@@ -104,7 +104,7 @@ current_frame_menubar (CONST struct frame* f)
 Lisp_Object
 menu_parse_submenu_keywords (Lisp_Object desc, Lisp_Object gui_item)
 {
 Lisp_Object
 menu_parse_submenu_keywords (Lisp_Object desc, Lisp_Object gui_item)
 {
-  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+  Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
   /* Menu descriptor should be a list */
   CHECK_CONS (desc);
 
   /* Menu descriptor should be a list */
   CHECK_CONS (desc);
@@ -155,7 +155,7 @@ See also 'find-menu-item'.
   Lisp_Object path_entry, submenu_desc, submenu;
   struct gcpro gcpro1;
   Lisp_Object gui_item = allocate_gui_item ();
   Lisp_Object path_entry, submenu_desc, submenu;
   struct gcpro gcpro1;
   Lisp_Object gui_item = allocate_gui_item ();
-  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+  Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
   GCPRO1 (gui_item);
 
 
   GCPRO1 (gui_item);
 
@@ -296,7 +296,7 @@ Menu item names should be converted to normal form before being compared.
        (name, buffer))
 {
   struct buffer *buf = decode_buffer (buffer, 0);
        (name, buffer))
 {
   struct buffer *buf = decode_buffer (buffer, 0);
-  struct Lisp_String *n;
+  Lisp_String *n;
   Charcount end;
   int i;
   Bufbyte *name_data;
   Charcount end;
   int i;
   Bufbyte *name_data;
@@ -355,31 +355,21 @@ syms_of_menubar (void)
 void
 vars_of_menubar (void)
 {
 void
 vars_of_menubar (void)
 {
-  {
-    /* put in Vblank_menubar a menubar value which has no visible
-     * items.  This is a bit tricky due to various quirks.  We
-     * could use '(["" nil nil]), but this is apparently equivalent
-     * to '(nil), and a new frame created with this menubar will
-     * get a vertically-squished menubar.  If we use " " as the
-     * button title instead of "", we get an etched button border.
-     * So we use
-     *  '(("No active menubar" ["" nil nil]))
-     * which creates a menu whose title is "No active menubar",
-     * and this works fine.
-     */
-
-    Lisp_Object menu_item[3];
-    static CONST char *blank_msg = "No active menubar";
-
-    menu_item[0] = build_string ("");
-    menu_item[1] = Qnil;
-    menu_item[2] = Qnil;
-    Vblank_menubar = Fcons (Fcons (build_string (blank_msg),
-                                  Fcons (Fvector (3, &menu_item[0]),
-                                         Qnil)),
-                           Qnil);
-    staticpro (&Vblank_menubar);
-  }
+  /* put in Vblank_menubar a menubar value which has no visible
+   * items.  This is a bit tricky due to various quirks.  We
+   * could use '(["" nil nil]), but this is apparently equivalent
+   * to '(nil), and a new frame created with this menubar will
+   * get a vertically-squished menubar.  If we use " " as the
+   * button title instead of "", we get an etched button border.
+   * So we use
+   *  '(("No active menubar" ["" nil nil]))
+   * which creates a menu whose title is "No active menubar",
+   * and this works fine.
+   */
+
+  Vblank_menubar = list1 (list2 (build_string ("No active menubar"),
+                                vector3 (build_string (""), Qnil, Qnil)));
+  staticpro (&Vblank_menubar);
 
   DEFVAR_BOOL ("popup-menu-titles", &popup_menu_titles /*
 If true, popup menus will have title bars at the top.
 
   DEFVAR_BOOL ("popup-menu-titles", &popup_menu_titles /*
 If true, popup menus will have title bars at the top.
@@ -503,7 +493,7 @@ The possible keywords are this:
                     side-effects.
 
  :key-sequence keys  Used in FSF Emacs as an hint to an equivalent keybinding.
                     side-effects.
 
  :key-sequence keys  Used in FSF Emacs as an hint to an equivalent keybinding.
-                     Ignored by XEnacs for easymenu.el compatability.
+                     Ignored by XEnacs for easymenu.el compatibility.
 
  :label <form>       (unimplemented!) Like :suffix, but replaces label
                      completely.
 
  :label <form>       (unimplemented!) Like :suffix, but replaces label
                      completely.
index 2507d8b..b92d00c 100644 (file)
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* #### Not properly abstracted for device-independence. */
 
 
 /* #### Not properly abstracted for device-independence. */
 
-#ifndef _XEMACS_MENUBAR_H_
-#define _XEMACS_MENUBAR_H_
+#ifndef INCLUDED_menubar_h_
+#define INCLUDED_menubar_h_
 
 #ifdef HAVE_MENUBARS
 #include "gui.h"
 
 #ifdef HAVE_MENUBARS
 #include "gui.h"
@@ -37,4 +37,4 @@ EXFUN (Fmenu_find_real_submenu, 2);
 
 #endif /* HAVE_MENUBARS */
 
 
 #endif /* HAVE_MENUBARS */
 
-#endif /* _XEMACS_MENUBAR_H_ */
+#endif /* INCLUDED_menubar_h_ */
index 16174c5..1af7b81 100644 (file)
@@ -387,7 +387,7 @@ The argument given to PREDICATE is the alist element or the symbol from the obar
        {
          if (!ZEROP (bucket))
            {
        {
          if (!ZEROP (bucket))
            {
-              struct Lisp_Symbol *next;
+              Lisp_Symbol *next;
              if (!SYMBOLP (bucket))
                {
                  signal_simple_error ("Bad obarray passed to try-completions",
              if (!SYMBOLP (bucket))
                {
                  signal_simple_error ("Bad obarray passed to try-completions",
@@ -590,7 +590,7 @@ the symbol from the obarray.
        {
          if (!ZEROP (bucket))
            {
        {
          if (!ZEROP (bucket))
            {
-              struct Lisp_Symbol *next = symbol_next (XSYMBOL (bucket));
+              Lisp_Symbol *next = symbol_next (XSYMBOL (bucket));
              elt = bucket;
              eltstring = Fsymbol_name (elt);
               if (next)
              elt = bucket;
              eltstring = Fsymbol_name (elt);
               if (next)
@@ -682,7 +682,7 @@ clear_echo_area_internal (struct frame *f, Lisp_Object label, int from_print,
   else
     {
       write_string_to_stdio_stream (stderr, 0, (CONST Bufbyte *) "\n", 0, 1,
   else
     {
       write_string_to_stdio_stream (stderr, 0, (CONST Bufbyte *) "\n", 0, 1,
-                                   FORMAT_TERMINAL);
+                                   Qterminal);
       return Qnil;
     }
 }
       return Qnil;
     }
 }
@@ -711,6 +711,12 @@ echo_area_append (struct frame *f, CONST Bufbyte *nonreloc, Lisp_Object reloc,
   struct gcpro gcpro1;
   Lisp_Object frame;
 
   struct gcpro gcpro1;
   Lisp_Object frame;
 
+  /* There is an inlining bug in egcs-20000131 c++ that can be worked
+     around as follows:  */
+#if defined (__GNUC__) && defined (__cplusplus)
+  alloca (4);
+#endif
+
   /* some callers pass in a null string as a way of clearing the echo area.
      check for length == 0 now; if this case, neither nonreloc nor reloc
      may be valid.  */
   /* some callers pass in a null string as a way of clearing the echo area.
      check for length == 0 now; if this case, neither nonreloc nor reloc
      may be valid.  */
@@ -745,7 +751,7 @@ echo_area_append (struct frame *f, CONST Bufbyte *nonreloc, Lisp_Object reloc,
       if (STRINGP (reloc))
        nonreloc = XSTRING_DATA (reloc);
       write_string_to_stdio_stream (stderr, 0, nonreloc, offset, length,
       if (STRINGP (reloc))
        nonreloc = XSTRING_DATA (reloc);
       write_string_to_stdio_stream (stderr, 0, nonreloc, offset, length,
-                                   FORMAT_TERMINAL);
+                                   Qterminal);
     }
 }
 
     }
 }
 
index c83030b..5b26af0 100644 (file)
@@ -16,6 +16,9 @@
  ** implied warranty.
  */
 
  ** implied warranty.
  */
 
+#ifndef INCLUDED_miscplay_h_
+#define INCLUDED_miscplay_h_
+
 #include <stdlib.h>
 
 #define HEADERSZ  256   /* has to be at least as big as the biggest header   */
 #include <stdlib.h>
 
 #define HEADERSZ  256   /* has to be at least as big as the biggest header   */
@@ -56,3 +59,5 @@ fmtType analyze_format(unsigned char *format,int *fmt,int *speed,
                                                      void **));
 void reset_parsestate(void);
 int parse_wave_complete(void);
                                                      void **));
 void reset_parsestate(void);
 int parse_wave_complete(void);
+
+#endif /* INCLUDED_miscplay_h_ */
index b09fd3b..5f2e60e 100644 (file)
@@ -422,7 +422,7 @@ Lisp_Object Vccl_program_table;
                                          IC += 2;
                                        */
 
                                          IC += 2;
                                        */
 
-#define CCL_Extention          0x1F /* Extended CCL code
+#define CCL_Extension          0x1F /* Extended CCL code
                                        1:ExtendedCOMMNDRrrRRRrrrXXXXX
                                        2:ARGUEMENT
                                        3:...
                                        1:ExtendedCOMMNDRrrRRRrrrXXXXX
                                        2:ARGUEMENT
                                        3:...
@@ -1124,7 +1124,7 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source,
            ic = jump_address;
          break;
 
            ic = jump_address;
          break;
 
-       case CCL_Extention:
+       case CCL_Extension:
          switch (EXCMD)
            {
            case CCL_ReadMultibyteChar2:
          switch (EXCMD)
            {
            case CCL_ReadMultibyteChar2:
index e2e5c97..90aad3b 100644 (file)
@@ -21,8 +21,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: FSF Emacs 20.3.10 */
 
 
 /* Synched up with: FSF Emacs 20.3.10 */
 
-#ifndef _CCL_H
-#define _CCL_H
+#ifndef INCLUDED_mule_ccl_h_
+#define INCLUDED_mule_ccl_h_
 
 /* Macros for exit status of CCL program.  */
 #define CCL_STAT_SUCCESS       0 /* Terminated successfully.  */
 
 /* Macros for exit status of CCL program.  */
 #define CCL_STAT_SUCCESS       0 /* Terminated successfully.  */
@@ -70,4 +70,4 @@ void setup_ccl_program (struct ccl_program *ccl, Lisp_Object val);
 extern Lisp_Object Vfont_ccl_encoder_alist;
 extern Lisp_Object Qccl_program;
 
 extern Lisp_Object Vfont_ccl_encoder_alist;
 extern Lisp_Object Qccl_program;
 
-#endif /* _CCL_H */
+#endif /* INCLUDED_mule_ccl_h_ */
index 069bdd8..285fa69 100644 (file)
@@ -77,12 +77,12 @@ static int composite_char_col_next;
 struct charset_lookup *chlook;
 
 static const struct lrecord_description charset_lookup_description_1[] = {
 struct charset_lookup *chlook;
 
 static const struct lrecord_description charset_lookup_description_1[] = {
-  { XD_LISP_OBJECT, offsetof(struct charset_lookup, charset_by_leading_byte), 128+4*128*2 },
+  { XD_LISP_OBJECT_ARRAY, offsetof (struct charset_lookup, charset_by_leading_byte), 128+4*128*2 },
   { XD_END }
 };
 
 static const struct struct_description charset_lookup_description = {
   { XD_END }
 };
 
 static const struct struct_description charset_lookup_description = {
-  sizeof(struct charset_lookup),
+  sizeof (struct charset_lookup),
   charset_lookup_description_1
 };
 
   charset_lookup_description_1
 };
 
@@ -409,7 +409,7 @@ Lstream_funget_emchar (Lstream *stream, Emchar ch)
 static Lisp_Object
 mark_charset (Lisp_Object obj)
 {
 static Lisp_Object
 mark_charset (Lisp_Object obj)
 {
-  struct Lisp_Charset *cs = XCHARSET (obj);
+  Lisp_Charset *cs = XCHARSET (obj);
 
   mark_object (cs->short_name);
   mark_object (cs->long_name);
 
   mark_object (cs->short_name);
   mark_object (cs->long_name);
@@ -422,7 +422,7 @@ mark_charset (Lisp_Object obj)
 static void
 print_charset (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
 static void
 print_charset (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
-  struct Lisp_Charset *cs = XCHARSET (obj);
+  Lisp_Charset *cs = XCHARSET (obj);
   char buf[200];
 
   if (print_readably)
   char buf[200];
 
   if (print_readably)
@@ -454,13 +454,19 @@ print_charset (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 }
 
 static const struct lrecord_description charset_description[] = {
 }
 
 static const struct lrecord_description charset_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Charset, name), 7 },
+  { XD_LISP_OBJECT, offsetof (Lisp_Charset, name) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Charset, doc_string) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Charset, registry) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Charset, short_name) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Charset, long_name) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Charset, reverse_direction_charset) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Charset, ccl_program) },
   { XD_END }
 };
 
 DEFINE_LRECORD_IMPLEMENTATION ("charset", charset,
                                mark_charset, print_charset, 0, 0, 0, charset_description,
   { XD_END }
 };
 
 DEFINE_LRECORD_IMPLEMENTATION ("charset", charset,
                                mark_charset, print_charset, 0, 0, 0, charset_description,
-                              struct Lisp_Charset);
+                              Lisp_Charset);
 /* Make a new charset. */
 
 static Lisp_Object
 /* Make a new charset. */
 
 static Lisp_Object
@@ -471,8 +477,10 @@ make_charset (int id, Lisp_Object name, unsigned char rep_bytes,
              Lisp_Object reg)
 {
   Lisp_Object obj;
              Lisp_Object reg)
 {
   Lisp_Object obj;
-  struct Lisp_Charset *cs =
-    alloc_lcrecord_type (struct Lisp_Charset, &lrecord_charset);
+  Lisp_Charset *cs = alloc_lcrecord_type (Lisp_Charset, &lrecord_charset);
+
+  zero_lcrecord (cs);
+
   XSETCHARSET (obj, cs);
 
   CHARSET_ID           (cs) = id;
   XSETCHARSET (obj, cs);
 
   CHARSET_ID           (cs) = id;
@@ -828,7 +836,7 @@ NEW-NAME is the name of the new charset.  Return the new charset.
   int id, dimension, columns, graphic, final;
   int direction, type;
   Lisp_Object registry, doc_string, short_name, long_name;
   int id, dimension, columns, graphic, final;
   int direction, type;
   Lisp_Object registry, doc_string, short_name, long_name;
-  struct Lisp_Charset *cs;
+  Lisp_Charset *cs;
 
   charset = Fget_charset (charset);
   if (!NILP (XCHARSET_REVERSE_DIRECTION_CHARSET (charset)))
 
   charset = Fget_charset (charset);
   if (!NILP (XCHARSET_REVERSE_DIRECTION_CHARSET (charset)))
@@ -977,7 +985,7 @@ Recognized properties are those listed in `make-charset', as well as
 */
        (charset, prop))
 {
 */
        (charset, prop))
 {
-  struct Lisp_Charset *cs;
+  Lisp_Charset *cs;
 
   charset = Fget_charset (charset);
   cs = XCHARSET (charset);
 
   charset = Fget_charset (charset);
   cs = XCHARSET (charset);
@@ -1071,7 +1079,7 @@ character s with caron.
 */
        (charset, arg1, arg2))
 {
 */
        (charset, arg1, arg2))
 {
-  struct Lisp_Charset *cs;
+  Lisp_Charset *cs;
   int a1, a2;
   int lowlim, highlim;
 
   int a1, a2;
   int lowlim, highlim;
 
index 5e0caa4..1d73c97 100644 (file)
@@ -23,8 +23,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Rewritten by Ben Wing <ben@xemacs.org>. */
 
 
 /* Rewritten by Ben Wing <ben@xemacs.org>. */
 
-#ifndef _XEMACS_MULE_CHARSET_H
-#define _XEMACS_MULE_CHARSET_H
+#ifndef INCLUDED_mule_charset_h_
+#define INCLUDED_mule_charset_h_
 
 /*
    1. Character Sets
 
 /*
    1. Character Sets
@@ -456,7 +456,10 @@ struct Lisp_Charset
 
   int id;
   Lisp_Object name;
 
   int id;
   Lisp_Object name;
-  Lisp_Object doc_string, registry, short_name, long_name;
+  Lisp_Object doc_string;
+  Lisp_Object registry;
+  Lisp_Object short_name;
+  Lisp_Object long_name;
 
   Lisp_Object reverse_direction_charset;
 
 
   Lisp_Object reverse_direction_charset;
 
@@ -489,9 +492,10 @@ struct Lisp_Charset
   /* Which half of font to be used to display this character set */
   unsigned int graphic;
 };
   /* Which half of font to be used to display this character set */
   unsigned int graphic;
 };
+typedef struct Lisp_Charset Lisp_Charset;
 
 
-DECLARE_LRECORD (charset, struct Lisp_Charset);
-#define XCHARSET(x) XRECORD (x, charset, struct Lisp_Charset)
+DECLARE_LRECORD (charset, Lisp_Charset);
+#define XCHARSET(x) XRECORD (x, charset, Lisp_Charset)
 #define XSETCHARSET(x, p) XSETRECORD (x, p, charset)
 #define CHARSETP(x) RECORDP (x, charset)
 #define CHECK_CHARSET(x) CHECK_RECORD (x, charset)
 #define XSETCHARSET(x, p) XSETRECORD (x, p, charset)
 #define CHARSETP(x) RECORDP (x, charset)
 #define CHECK_CHARSET(x) CHECK_RECORD (x, charset)
@@ -550,7 +554,7 @@ DECLARE_LRECORD (charset, struct Lisp_Charset);
 struct charset_lookup {
   /* Table of charsets indexed by leading byte. */
   Lisp_Object charset_by_leading_byte[128];
 struct charset_lookup {
   /* Table of charsets indexed by leading byte. */
   Lisp_Object charset_by_leading_byte[128];
-  
+
   /* Table of charsets indexed by type/final-byte/direction. */
   Lisp_Object charset_by_attributes[4][128][2];
 };
   /* Table of charsets indexed by type/final-byte/direction. */
   Lisp_Object charset_by_attributes[4][128][2];
 };
@@ -787,4 +791,4 @@ int copy_internal_to_external (CONST Bufbyte *internal, Bytecount len,
 Bytecount copy_external_to_internal (CONST unsigned char *external,
                                     int len, Bufbyte *internal);
 
 Bytecount copy_external_to_internal (CONST unsigned char *external,
                                     int len, Bufbyte *internal);
 
-#endif /* _XEMACS_MULE_CHARSET_H */
+#endif /* INCLUDED_mule_charset_h_ */
index 36274cf..9f4cdef 100644 (file)
@@ -40,7 +40,7 @@ accept a pattern compiled by 'regexp-compile' with word-option t.
   int i, len;
   char *p;
   Lisp_Object temp;
   int i, len;
   char *p;
   Lisp_Object temp;
-  struct Lisp_String *s;
+  Lisp_String *s;
 
   CHECK_CONS (pattern);
   len = XINT (Flength (pattern));
 
   CHECK_CONS (pattern);
   len = XINT (Flength (pattern));
index a338ad1..7bab391 100644 (file)
--- a/src/nas.c
+++ b/src/nas.c
@@ -799,7 +799,7 @@ dseek (long offset, int from)
 
 /* Like ftell, but for a buffer in memory */
 static long
 
 /* Like ftell, but for a buffer in memory */
 static long
-dtell()
+dtell (void)
 {
   return file_posn;
 }
 {
   return file_posn;
 }
@@ -807,7 +807,7 @@ dtell()
 /* Data buffer analogs for FileReadS and FileReadL in NAS. */
 
 static unsigned short
 /* Data buffer analogs for FileReadS and FileReadL in NAS. */
 
 static unsigned short
-DataReadS(int swapit)
+DataReadS (int swapit)
 {
     unsigned short us;
 
 {
     unsigned short us;
 
@@ -818,7 +818,7 @@ DataReadS(int swapit)
 }
 
 static AuUint32
 }
 
 static AuUint32
-DataReadL(int swapit)
+DataReadL (int swapit)
 {
     AuUint32 ul;
 
 {
     AuUint32 ul;
 
@@ -829,7 +829,7 @@ DataReadL(int swapit)
 }
 
 static int
 }
 
 static int
-readChunk(RiffChunk *c)
+readChunk (RiffChunk *c)
 {
     int             status;
     char            n;
 {
     int             status;
     char            n;
@@ -845,8 +845,8 @@ readChunk(RiffChunk *c)
    read the wave data from a buffer in memory. */
 
 static WaveInfo *
    read the wave data from a buffer in memory. */
 
 static WaveInfo *
-WaveOpenDataForReading(CONST char *data,
-                      int length)
+WaveOpenDataForReading (CONST char *data,
+                       int length)
 {
     RiffChunk       ck;
     RIFF_FOURCC     fourcc;
 {
     RiffChunk       ck;
     RIFF_FOURCC     fourcc;
index eceabcf..703e972 100644 (file)
@@ -23,6 +23,9 @@ Boston, MA 02111-1307, USA.  */
        last edit:      09-Jul-1983     D A Gwyn
 */
 
        last edit:      09-Jul-1983     D A Gwyn
 */
 
+#ifndef INCLUDED_ndir_h_
+#define INCLUDED_ndir_h_
+
 #define DIRBLKSIZ      512             /* size of directory block */
 #ifdef WINDOWSNT
 #define MAXNAMLEN      255
 #define DIRBLKSIZ      512             /* size of directory block */
 #ifdef WINDOWSNT
 #define MAXNAMLEN      255
@@ -55,3 +58,5 @@ long telldir (DIR *dirp);
 void seekdir (DIR *dirp, long loc);
 
 #define rewinddir( dirp )      seekdir( dirp, 0L )
 void seekdir (DIR *dirp, long loc);
 
 #define rewinddir( dirp )      seekdir( dirp, 0L )
+
+#endif /* INCLUDED_ndir_h_ */
index 45e9ae5..8797af3 100644 (file)
--- a/src/nt.c
+++ b/src/nt.c
@@ -74,7 +74,7 @@ extern Lisp_Object Vwin32_generate_fake_inodes;
 #endif
 extern Lisp_Object Vmswindows_get_true_file_attributes;
 
 #endif
 extern Lisp_Object Vmswindows_get_true_file_attributes;
 
-extern char *get_home_directory(void);
+int nt_fake_unix_uid;
 
 static char startup_dir[ MAXPATHLEN ];
 
 
 static char startup_dir[ MAXPATHLEN ];
 
@@ -133,17 +133,14 @@ static struct passwd the_passwd =
 
 uid_t
 getuid () 
 
 uid_t
 getuid () 
-{ 
-  return the_passwd.pw_uid;
+{
+  return nt_fake_unix_uid;
 }
 
 uid_t 
 geteuid () 
 { 
 }
 
 uid_t 
 geteuid () 
 { 
-  /* I could imagine arguing for checking to see whether the user is
-     in the Administrators group and returning a UID of 0 for that
-     case, but I don't know how wise that would be in the long run.  */
-  return getuid (); 
+  return nt_fake_unix_uid;
 }
 
 gid_t
 }
 
 gid_t
@@ -161,9 +158,13 @@ getegid ()
 struct passwd *
 getpwuid (uid_t uid)
 {
 struct passwd *
 getpwuid (uid_t uid)
 {
-  if (uid == the_passwd.pw_uid)
-    return &the_passwd;
-  return NULL;
+  if (uid == nt_fake_unix_uid)
+    {
+      the_passwd.pw_gid = the_passwd.pw_uid = uid;
+      return &the_passwd;
+    }
+  else
+    return NULL;
 }
 
 struct passwd *
 }
 
 struct passwd *
@@ -184,6 +185,12 @@ getpwnam (const char *name)
 void
 init_user_info ()
 {
 void
 init_user_info ()
 {
+  /* This code is pretty much of ad hoc nature. There is no unix-like
+     UIDs under Windows NT. There is no concept of root user, because
+     all security is ACL-based. Instead, let's use a simple variable,
+     nt-fake-unix-uid, which would allow the user to have a uid of
+     choice. --kkm, 02/03/2000 */
+#if 0
   /* Find the user's real name by opening the process token and
      looking up the name associated with the user-sid in that token.
 
   /* Find the user's real name by opening the process token and
      looking up the name associated with the user-sid in that token.
 
@@ -259,6 +266,18 @@ init_user_info ()
       the_passwd.pw_gid = 123;
     }
 
       the_passwd.pw_gid = 123;
     }
 
+  if (token)
+    CloseHandle (token);
+#else
+  /* Obtain only logon id here, uid part is moved to getuid */
+  char name[256];
+  DWORD length = sizeof (name);
+  if (GetUserName (name, &length))
+    strcpy (the_passwd.pw_name, name);
+  else
+    strcpy (the_passwd.pw_name, "unknown");
+#endif
+
   /* Ensure HOME and SHELL are defined. */
 #if 0
   /*
   /* Ensure HOME and SHELL are defined. */
 #if 0
   /*
@@ -273,9 +292,6 @@ init_user_info ()
   /* Set dir and shell from environment variables. */
   strcpy (the_passwd.pw_dir, get_home_directory());
   strcpy (the_passwd.pw_shell, getenv ("SHELL"));
   /* Set dir and shell from environment variables. */
   strcpy (the_passwd.pw_dir, get_home_directory());
   strcpy (the_passwd.pw_shell, getenv ("SHELL"));
-
-  if (token)
-    CloseHandle (token);
 }
 
 /* Normalize filename by converting all path separators to
 }
 
 /* Normalize filename by converting all path separators to
@@ -1204,9 +1220,12 @@ sys_rename (const char * oldname, const char * newname)
 #endif /* 0 */
 
 static FILETIME utc_base_ft;
 #endif /* 0 */
 
 static FILETIME utc_base_ft;
-static long double utc_base;
 static int init = 0;
 
 static int init = 0;
 
+#if 0
+
+static long double utc_base;
+
 time_t
 convert_time (FILETIME ft)
 {
 time_t
 convert_time (FILETIME ft)
 {
@@ -1238,6 +1257,77 @@ convert_time (FILETIME ft)
   ret -= utc_base;
   return (time_t) (ret * 1e-7);
 }
   ret -= utc_base;
   return (time_t) (ret * 1e-7);
 }
+#else
+
+static LARGE_INTEGER utc_base_li;
+
+time_t
+convert_time (FILETIME uft)
+{
+  time_t ret;
+#ifndef MAXLONGLONG
+  SYSTEMTIME st;
+  struct tm t;
+  FILETIME ft;
+  TIME_ZONE_INFORMATION tzi;
+  DWORD tzid;
+#else
+  LARGE_INTEGER lft;
+#endif
+
+  if (!init)
+    {
+      /* Determine the delta between 1-Jan-1601 and 1-Jan-1970. */
+      SYSTEMTIME st;
+
+      st.wYear = 1970;
+      st.wMonth = 1;
+      st.wDay = 1;
+      st.wHour = 0;
+      st.wMinute = 0;
+      st.wSecond = 0;
+      st.wMilliseconds = 0;
+
+      SystemTimeToFileTime (&st, &utc_base_ft);
+
+      utc_base_li.LowPart = utc_base_ft.dwLowDateTime;
+      utc_base_li.HighPart = utc_base_ft.dwHighDateTime;
+
+      init = 1;
+    }
+
+#ifdef MAXLONGLONG
+
+  /* On a compiler that supports long integers, do it the easy way */
+  lft.LowPart = uft.dwLowDateTime;
+  lft.HighPart = uft.dwHighDateTime;
+  ret = (time_t) ((lft.QuadPart - utc_base_li.QuadPart) / 10000000);
+
+#else
+
+  /* Do it the hard way using mktime. */
+  FileTimeToLocalFileTime(&uft, &ft);
+  FileTimeToSystemTime (&ft, &st);
+  tzid = GetTimeZoneInformation (&tzi);
+  t.tm_year = st.wYear - 1900;
+  t.tm_mon = st.wMonth - 1;
+  t.tm_mday = st.wDay;
+  t.tm_hour = st.wHour;
+  t.tm_min = st.wMinute;
+  t.tm_sec = st.wSecond;
+  t.tm_isdst = (tzid == TIME_ZONE_ID_DAYLIGHT);
+  /* st.wMilliseconds not applicable */
+  ret = mktime(&t);
+  if (ret == -1)
+    {
+      ret = 0;
+    }
+
+#endif
+
+  return ret;
+}
+#endif
 
 #if 0
 /* in case we ever have need of this */
 
 #if 0
 /* in case we ever have need of this */
@@ -1315,9 +1405,15 @@ generate_inode_val (const char * name)
 
 #endif
 
 
 #endif
 
+/* stat has been fixed since MSVC 5.0.
+   Oh, and do not encapsulater stat for non-MS compilers, too */
+/* #### popineau@ese-metz.fr says they still might be broken.
+   Oh well... Let's add that `1 ||' condition.... --kkm */
+#if 1 || defined(_MSC_VER) && _MSC_VER < 1100
+
 /* Since stat is encapsulated on Windows NT, we need to encapsulate
    the equally broken fstat as well. */
 /* Since stat is encapsulated on Windows NT, we need to encapsulate
    the equally broken fstat as well. */
-int
+int _cdecl
 fstat (int handle, struct stat *buffer)
 {
   int ret;
 fstat (int handle, struct stat *buffer)
 {
   int ret;
@@ -1501,14 +1597,12 @@ stat (const char * path, struct stat * buf)
   buf->st_ino = (unsigned short) (fake_inode ^ (fake_inode >> 16));
 
   /* consider files to belong to current user */
   buf->st_ino = (unsigned short) (fake_inode ^ (fake_inode >> 16));
 
   /* consider files to belong to current user */
-  buf->st_uid = the_passwd.pw_uid;
-  buf->st_gid = the_passwd.pw_gid;
+  buf->st_uid = buf->st_gid = nt_fake_unix_uid;
 
   /* volume_info is set indirectly by map_win32_filename */
   buf->st_dev = volume_info.serialnum;
   buf->st_rdev = volume_info.serialnum;
 
 
   /* volume_info is set indirectly by map_win32_filename */
   buf->st_dev = volume_info.serialnum;
   buf->st_rdev = volume_info.serialnum;
 
-
   buf->st_size = wfd.nFileSizeLow;
 
   /* Convert timestamps to Unix format. */
   buf->st_size = wfd.nFileSizeLow;
 
   /* Convert timestamps to Unix format. */
@@ -1541,6 +1635,7 @@ stat (const char * path, struct stat * buf)
 
   return 0;
 }
 
   return 0;
 }
+#endif /* defined(_MSC_VER) && _MSC_VER < 1100 */
 
 /* From callproc.c  */
 extern Lisp_Object Vbinary_process_input;
 
 /* From callproc.c  */
 extern Lisp_Object Vbinary_process_input;
@@ -1957,4 +2052,16 @@ close_file_data (file_data *p_file)
     CloseHandle (p_file->file);
 }
 
     CloseHandle (p_file->file);
 }
 
+void
+vars_of_nt (void)
+{
+  DEFVAR_INT ("nt-fake-unix-uid", &nt_fake_unix_uid /*
+*Set uid returned by `user-uid' and `user-real-uid'.
+Under NT and 9x, there is no uids, and even no almighty user called root.
+By setting this variable, you can have any uid of choice. Default is 0.
+Changes to this variable take effect immediately.
+*/ );
+  nt_fake_unix_uid = 0;
+}
+
 /* end of nt.c */
 /* end of nt.c */
index 89798e3..0f0faaa 100644 (file)
--- a/src/nt.h
+++ b/src/nt.h
@@ -1,6 +1,3 @@
-#ifndef _NT_H_
-#define _NT_H_
-
 /* Support routines for the NT version of XEmacs.
    Copyright (C) 1994 Free Software Foundation, Inc.
 
 /* Support routines for the NT version of XEmacs.
    Copyright (C) 1994 Free Software Foundation, Inc.
 
@@ -26,6 +23,9 @@ Boston, MA 02111-1307, USA.  */
 
 /* #define FULL_DEBUG */
 
 
 /* #define FULL_DEBUG */
 
+#ifndef INCLUDED_nt_h_
+#define INCLUDED_nt_h_
+
 #ifdef DEBUG_XEMACS
 #define DebPrint(stuff) _DebPrint stuff
 #else
 #ifdef DEBUG_XEMACS
 #define DebPrint(stuff) _DebPrint stuff
 #else
@@ -150,4 +150,4 @@ time_t convert_time (FILETIME ft);
 extern void init_ntproc ();
 extern void term_ntproc ();
 
 extern void init_ntproc ();
 extern void term_ntproc ();
 
-#endif /* _NT_H_ */
+#endif /* INCLUDED_nt_h_ */
index 8f9984e..8e54bc8 100644 (file)
@@ -38,38 +38,10 @@ unsigned long syspage_mask = 0;
 int edata;
 int etext;
 
 int edata;
 int etext;
 
-/* The major and minor versions of NT.  */
-int nt_major_version;
-int nt_minor_version;
-
-/* Distinguish between Windows NT and Windows 95.  */
-int os_subtype;
-
 /* Cache information describing the NT system for later use.  */
 void
 cache_system_info (void)
 {
 /* Cache information describing the NT system for later use.  */
 void
 cache_system_info (void)
 {
-  union 
-    {
-      struct info 
-       {
-         char  major;
-         char  minor;
-         short platform;
-       } info;
-      DWORD data;
-    } version;
-
-  /* Cache the version of the operating system.  */
-  version.data = GetVersion ();
-  nt_major_version = version.info.major;
-  nt_minor_version = version.info.minor;
-
-  if (version.info.platform & 0x8000)
-    os_subtype = OS_WIN95;
-  else
-    os_subtype = OS_NT;
-
   /* Cache page size, allocation unit, processor type, etc.  */
   GetSystemInfo (&sysinfo_cache);
   syspage_mask = sysinfo_cache.dwPageSize - 1;
   /* Cache page size, allocation unit, processor type, etc.  */
   GetSystemInfo (&sysinfo_cache);
   syspage_mask = sysinfo_cache.dwPageSize - 1;
@@ -248,7 +220,7 @@ sbrk (unsigned long increment)
   return result;
 }
 
   return result;
 }
 
-#if !defined (CANNOT_DUMP) && !defined(HEAP_IN_DATA)
+#if !defined (CANNOT_DUMP) && !defined(HEAP_IN_DATA) && !defined(PDUMP)
 
 /* Recreate the heap from the data that was dumped to the executable.
    EXECUTABLE_PATH tells us where to find the executable.  */
 
 /* Recreate the heap from the data that was dumped to the executable.
    EXECUTABLE_PATH tells us where to find the executable.  */
index 1d193a3..e991957 100644 (file)
@@ -23,8 +23,8 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 /* Adapted for XEmacs by David Hobley <david@spook-le0.cia.com.au> */
 /* Synced with FSF Emacs 19.34.6 by Marc Paquette <marcpa@cam.org> */
 
 /* Adapted for XEmacs by David Hobley <david@spook-le0.cia.com.au> */
 /* Synced with FSF Emacs 19.34.6 by Marc Paquette <marcpa@cam.org> */
 
-#ifndef NTHEAP_H_
-#define NTHEAP_H_
+#ifndef INCLUDED_ntheap_h_
+#define INCLUDED_ntheap_h_
 
 #include <windows.h>
 
 
 #include <windows.h>
 
@@ -54,13 +54,6 @@ extern int                 nt_minor_version;
 #define UNINIT_PTR ((void *) 0xF0A0F0A0)
 #define UNINIT_LONG (0xF0A0F0A0L)
 
 #define UNINIT_PTR ((void *) 0xF0A0F0A0)
 #define UNINIT_LONG (0xF0A0F0A0L)
 
-enum {
-  OS_WIN95 = 1,
-  OS_NT
-};
-
-extern int os_subtype;
-
 /* Emulation of Unix sbrk().  */
 extern void *sbrk (unsigned long size);
 
 /* Emulation of Unix sbrk().  */
 extern void *sbrk (unsigned long size);
 
@@ -107,4 +100,4 @@ int open_input_file (file_data *p_file, CONST char *name);
 int open_output_file (file_data *p_file, CONST char *name, unsigned long size);
 void close_file_data (file_data *p_file);
 
 int open_output_file (file_data *p_file, CONST char *name, unsigned long size);
 void close_file_data (file_data *p_file);
 
-#endif /* NTHEAP_H_ */
+#endif /* INCLUDED_ntheap_h_ */
index 1546a74..029ba1f 100644 (file)
@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA.
 #include <signal.h>
 
 /* must include CRT headers *before* config.h */
 #include <signal.h>
 
 /* must include CRT headers *before* config.h */
-/* ### I don't believe it - martin */
+/* #### I don't believe it - martin */
 #include <config.h>
 #undef signal
 #undef wait
 #include <config.h>
 #undef signal
 #undef wait
@@ -120,6 +120,13 @@ child_process *dead_child = NULL;
 
 DWORD WINAPI reader_thread (void *arg);
 
 
 DWORD WINAPI reader_thread (void *arg);
 
+/* Determine if running on Windows 9x and not NT */
+static int
+windows9x_p (void)
+{
+  return GetVersion () & 0x80000000;
+}
+
 /* Find an unused process slot.  */
 child_process *
 new_child (void)
 /* Find an unused process slot.  */
 child_process *
 new_child (void)
@@ -668,7 +675,9 @@ sys_spawnve (int mode, CONST char *cmdname,
          errno = EINVAL;
          return -1;
        }
          errno = EINVAL;
          return -1;
        }
-      GET_C_STRING_FILENAME_DATA_ALLOCA (full, cmdname);
+      TO_EXTERNAL_FORMAT (LISP_STRING, full,
+                         C_STRING_ALLOCA, cmdname,
+                         Qfile_name);
     }
   else
     {
     }
   else
     {
@@ -937,7 +946,7 @@ find_child_console (HWND hwnd, child_process * cp)
 
       GetClassName (hwnd, window_class, sizeof (window_class));
       if (strcmp (window_class,
 
       GetClassName (hwnd, window_class, sizeof (window_class));
       if (strcmp (window_class,
-                 (os_subtype == OS_WIN95)
+                 windows9x_p()
                  ? "tty"
                  : "ConsoleWindowClass") == 0)
        {
                  ? "tty"
                  : "ConsoleWindowClass") == 0)
        {
@@ -1030,7 +1039,7 @@ sys_kill (int pid, int sig)
       if (NILP (Vwin32_start_process_share_console) && cp && cp->hwnd)
        {
 #if 1
       if (NILP (Vwin32_start_process_share_console) && cp && cp->hwnd)
        {
 #if 1
-         if (os_subtype == OS_WIN95)
+         if (windows9x_p())
            {
 /*
    Another possibility is to try terminating the VDM out-right by
            {
 /*
    Another possibility is to try terminating the VDM out-right by
@@ -1419,7 +1428,7 @@ If successful, the new locale id is returned, otherwise nil.
 
 /* Sync with FSF Emacs 19.34.6 note: dwWinThreadId declared in
    w32term.h and defined in w32fns.c, both of which are not in current
 
 /* Sync with FSF Emacs 19.34.6 note: dwWinThreadId declared in
    w32term.h and defined in w32fns.c, both of which are not in current
-   XEmacs.  ### Check what we lose by ifdef'ing out these. --marcpa */
+   XEmacs.  #### Check what we lose by ifdef'ing out these. --marcpa */
 #if 0
   /* Need to set input thread locale if present.  */
   if (dwWinThreadId)
 #if 0
   /* Need to set input thread locale if present.  */
   if (dwWinThreadId)
index 9190490..fca8e11 100644 (file)
@@ -938,15 +938,15 @@ match_font (char *pattern1, char *pattern2, char *fontname)
 struct font_enum_t
 {
   HDC hdc;
 struct font_enum_t
 {
   HDC hdc;
-  struct device *d;
+  Lisp_Object list;
 };
 
 static int CALLBACK
 font_enum_callback_2 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, 
                      int FontType, struct font_enum_t *font_enum)
 {
 };
 
 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];
   char fontname[MSW_FONTSIZE];
+  Lisp_Object fontname_lispstr;
   int i;
 
   /*
   int i;
 
   /*
@@ -967,7 +967,7 @@ font_enum_callback_2 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme,
     /* Formula for pointsize->height from LOGFONT docs in Platform SDK */
     sprintf (fontname, "%s::%d::", lpelfe->elfLogFont.lfFaceName,
             MulDiv (lpntme->ntmTm.tmHeight - lpntme->ntmTm.tmInternalLeading,
     /* 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)));
+                    72, GetDeviceCaps (font_enum->hdc, LOGPIXELSY)));
 
   /*
    * The enumerated font character set strings are not to be trusted because
 
   /*
    * The enumerated font character set strings are not to be trusted because
@@ -985,25 +985,11 @@ font_enum_callback_2 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme,
   if (i==countof (charset_map))
     strcpy (fontname, charset_map[0].name);
 
   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;
+  /* Add the font name to the list if not already there */
+  fontname_lispstr = build_string (fontname);
+  if (NILP (memq_no_quit (fontname_lispstr, font_enum->list)))
+    font_enum->list = Fcons (fontname_lispstr, font_enum->list);
+
   return 1;
 }
 
   return 1;
 }
 
@@ -1019,13 +1005,13 @@ font_enum_callback_1 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme,
 }
 
 /*
 }
 
 /*
- * Enumerate the available fonts. Called by mswindows_init_device().
- * Fills in the device's device-type-specfic fontlist.
+ * Enumerate the available on the HDC fonts and return a list of string
+ * font names.
  */
  */
-void
-mswindows_enumerate_fonts (struct device *d)
+Lisp_Object
+mswindows_enumerate_fonts (HDC hdc)
 {
 {
-  HDC hdc = CreateCompatibleDC (NULL);
+  /* This cannot CG */
   LOGFONT logfont;
   struct font_enum_t font_enum;
 
   LOGFONT logfont;
   struct font_enum_t font_enum;
 
@@ -1034,26 +1020,79 @@ mswindows_enumerate_fonts (struct device *d)
   logfont.lfFaceName[0] = '\0';
   logfont.lfPitchAndFamily = DEFAULT_PITCH;
   font_enum.hdc = hdc;
   logfont.lfFaceName[0] = '\0';
   logfont.lfPitchAndFamily = DEFAULT_PITCH;
   font_enum.hdc = hdc;
-  font_enum.d = d;
-  DEVICE_MSWINDOWS_FONTLIST (d) = NULL;
+  font_enum.list = Qnil;
   EnumFontFamiliesEx (hdc, &logfont, (FONTENUMPROC) font_enum_callback_1,
                      (LPARAM) (&font_enum), 0);
   EnumFontFamiliesEx (hdc, &logfont, (FONTENUMPROC) font_enum_callback_1,
                      (LPARAM) (&font_enum), 0);
-  DeleteDC (hdc);
+  return font_enum.list;
+}
+
+static void
+mswindows_create_font_variant (Lisp_Font_Instance* f,
+                              int under, int strike)
+{
+  /* Cannot GC */
+
+  LOGFONT lf;
+  HFONT hfont;
+
+  assert (FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike) == NULL);
+
+  if (GetObject (FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0),
+                sizeof (lf), (void*) &lf) == 0)
+    {
+      hfont = MSWINDOWS_BAD_HFONT;
+    }
+  else
+    {
+      lf.lfUnderline = under;
+      lf.lfStrikeOut = strike;
+
+      hfont = CreateFontIndirect (&lf);
+      if (hfont == NULL)
+       hfont = MSWINDOWS_BAD_HFONT;
+    }
+
+  FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike) = hfont;
 }
 
 }
 
+HFONT
+mswindows_get_hfont (Lisp_Font_Instance* f,
+                    int under, int strike)
+{
+  /* Cannot GC */
+  HFONT hfont;
+
+  if (FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike) == NULL)
+    mswindows_create_font_variant (f, under, strike);
+
+  assert (FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike) != NULL);
+
+  hfont = FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike);
+
+  /* If strikeout/underline variant of the font could not be
+     created, then use the base version of the font */
+  if (hfont == MSWINDOWS_BAD_HFONT)
+    hfont = FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0);
+
+  assert (hfont != NULL && hfont != MSWINDOWS_BAD_HFONT);
+
+  return hfont;
+}
 \f
 /************************************************************************/
 /*                               methods                                */
 /************************************************************************/
 
 static int
 \f
 /************************************************************************/
 /*                               methods                                */
 /************************************************************************/
 
 static int
-mswindows_initialize_color_instance (struct Lisp_Color_Instance *c, Lisp_Object name,
+mswindows_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name,
                               Lisp_Object device, Error_behavior errb)
 {
   CONST char *extname;
   COLORREF color;
 
                               Lisp_Object device, Error_behavior errb)
 {
   CONST char *extname;
   COLORREF color;
 
-  GET_C_STRING_CTEXT_DATA_ALLOCA (name, extname);
+  TO_EXTERNAL_FORMAT (LISP_STRING, name,
+                     C_STRING_ALLOCA, extname,
+                     Qctext);
   color = mswindows_string_to_color(extname);
   if (color != -1)
     {
   color = mswindows_string_to_color(extname);
   if (color != -1)
     {
@@ -1067,15 +1106,15 @@ mswindows_initialize_color_instance (struct Lisp_Color_Instance *c, Lisp_Object
 
 #if 0
 static void
 
 #if 0
 static void
-mswindows_mark_color_instance (struct Lisp_Color_Instance *c)
+mswindows_mark_color_instance (Lisp_Color_Instance *c)
 {
 }
 #endif
 
 static void
 {
 }
 #endif
 
 static void
-mswindows_print_color_instance (struct Lisp_Color_Instance *c,
-                         Lisp_Object printcharfun,
-                         int escapeflag)
+mswindows_print_color_instance (Lisp_Color_Instance *c,
+                               Lisp_Object printcharfun,
+                               int escapeflag)
 {
   char buf[32];
   COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c);
 {
   char buf[32];
   COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c);
@@ -1085,7 +1124,7 @@ mswindows_print_color_instance (struct Lisp_Color_Instance *c,
 }
 
 static void
 }
 
 static void
-mswindows_finalize_color_instance (struct Lisp_Color_Instance *c)
+mswindows_finalize_color_instance (Lisp_Color_Instance *c)
 {
   if (c->data)
     {
 {
   if (c->data)
     {
@@ -1095,21 +1134,21 @@ mswindows_finalize_color_instance (struct Lisp_Color_Instance *c)
 }
 
 static int
 }
 
 static int
-mswindows_color_instance_equal (struct Lisp_Color_Instance *c1,
-                         struct Lisp_Color_Instance *c2,
-                         int depth)
+mswindows_color_instance_equal (Lisp_Color_Instance *c1,
+                               Lisp_Color_Instance *c2,
+                               int depth)
 {
   return (COLOR_INSTANCE_MSWINDOWS_COLOR(c1) == COLOR_INSTANCE_MSWINDOWS_COLOR(c2));
 }
 
 static unsigned long
 {
   return (COLOR_INSTANCE_MSWINDOWS_COLOR(c1) == COLOR_INSTANCE_MSWINDOWS_COLOR(c2));
 }
 
 static unsigned long
-mswindows_color_instance_hash (struct Lisp_Color_Instance *c, int depth)
+mswindows_color_instance_hash (Lisp_Color_Instance *c, int depth)
 {
   return (unsigned long) COLOR_INSTANCE_MSWINDOWS_COLOR(c);
 }
 
 static Lisp_Object
 {
   return (unsigned long) COLOR_INSTANCE_MSWINDOWS_COLOR(c);
 }
 
 static Lisp_Object
-mswindows_color_instance_rgb_components (struct Lisp_Color_Instance *c)
+mswindows_color_instance_rgb_components (Lisp_Color_Instance *c)
 {
   COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c);
   return list3 (make_int (GetRValue (color) * 257),
 {
   COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c);
   return list3 (make_int (GetRValue (color) * 257),
@@ -1122,26 +1161,25 @@ mswindows_valid_color_name_p (struct device *d, Lisp_Object color)
 {
   CONST char *extname;
 
 {
   CONST char *extname;
 
-  GET_C_STRING_CTEXT_DATA_ALLOCA (color, extname);
+  TO_EXTERNAL_FORMAT (LISP_STRING, color,
+                     C_STRING_ALLOCA, extname,
+                     Qctext);
   return (mswindows_string_to_color(extname)!=-1);
 }
 
 
 \f
 static void
   return (mswindows_string_to_color(extname)!=-1);
 }
 
 
 \f
 static void
-mswindows_finalize_font_instance (struct Lisp_Font_Instance *f)
-{
-  if (f->data)
-    {
-      DeleteObject(f->data);
-      f->data=0;
-    }
-}
-
+mswindows_finalize_font_instance (Lisp_Font_Instance *f);
 
 
+/*
+ * This is a work horse for both mswindows_initialize_font_instanc and
+ * msprinter_initialize_font_instance.
+ */
 static int
 static int
-mswindows_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object name,
-                                   Lisp_Object device, Error_behavior errb)
+initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
+                         Lisp_Object device_font_list, HDC hdc,
+                         Error_behavior errb)
 {
   CONST char *extname;
   LOGFONT logfont;
 {
   CONST char *extname;
   LOGFONT logfont;
@@ -1150,8 +1188,7 @@ mswindows_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object na
   char fontname[LF_FACESIZE], weight[LF_FACESIZE], *style, points[8];
   char effects[LF_FACESIZE], charset[LF_FACESIZE];
   char *c;
   char fontname[LF_FACESIZE], weight[LF_FACESIZE], *style, points[8];
   char effects[LF_FACESIZE], charset[LF_FACESIZE];
   char *c;
-  HDC hdc;
-  HFONT holdfont;
+  HFONT hfont, holdfont;
   TEXTMETRIC metrics;
 
   extname = XSTRING_DATA (name);
   TEXTMETRIC metrics;
 
   extname = XSTRING_DATA (name);
@@ -1255,7 +1292,7 @@ mswindows_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object na
     }
 
   /* Formula for pointsize->height from LOGFONT docs in MSVC5 Platform SDK */
     }
 
   /* 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, GetDeviceCaps (hdc, LOGPIXELSY), 72);
   logfont.lfWidth = 0;
 
   /* Effects */
   logfont.lfWidth = 0;
 
   /* Effects */
@@ -1353,85 +1390,140 @@ mswindows_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object na
   /* Default to monospaced if the specified fontname doesn't exist. */
   logfont.lfPitchAndFamily = FF_MODERN;
 
   /* 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. */
-  {
-    struct mswindows_font_enum *fontlist;
-    char truename[MSW_FONTSIZE];
-    int done = 0;
-    
-    sprintf (truename, "%s:%s:%d:%s:%s", fontname, weight, pt, effects, charset);
-    fontlist = DEVICE_MSWINDOWS_FONTLIST (XDEVICE (device));
-    while (fontlist && !done)
-      {
-        done = match_font (fontlist->fontname, truename, NULL);
-        fontlist = fontlist->next;
-      }
-    if (!done)
-      {
-       maybe_signal_simple_error ("No matching font", name, Qfont, errb);
-       return 0;
-      }
-  }
+  /* 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.
+
+   Personally, I do not like the idea - it is better to come out with
+   some font than completely without one. The diversity of printer
+   fonts is much greater than that of screen font. We can tread on
+   that. -- kkm. */
+
+  if (!NILP (device_font_list))
+    {
+      Lisp_Object fonttail;
+      char truename[MSW_FONTSIZE];
 
 
-  if ((f->data = CreateFontIndirect(&logfont)) == NULL)
+      sprintf (truename, "%s:%s:%d:%s:%s", fontname, weight, pt, effects, charset);
+      LIST_LOOP (fonttail, device_font_list)
+       {
+         if (match_font (XSTRING_DATA (XCAR (fonttail)), truename, NULL))
+           break;
+       }
+      if (NILP (fonttail))
+       {
+         maybe_signal_simple_error ("No matching font", name, Qfont, errb);
+         return 0;
+       }
+    }
+
+  if ((hfont = CreateFontIndirect(&logfont)) == NULL)
   {
     maybe_signal_simple_error ("Couldn't create font", name, Qfont, errb);
     return 0;
   }
 
   {
     maybe_signal_simple_error ("Couldn't create font", name, Qfont, errb);
     return 0;
   }
 
-  hdc = CreateCompatibleDC (NULL);
-  if (hdc)
+  f->data = xnew_and_zero (struct mswindows_font_instance_data);
+  FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f,0,0) = hfont;
+  
+  holdfont = SelectObject(hdc, hfont);
+  if (!holdfont)
+    {
+      mswindows_finalize_font_instance (f);
+      maybe_signal_simple_error ("Couldn't map font", name, Qfont, errb);
+      return 0;
+    }
+
+  GetTextMetrics (hdc, &metrics);
+  SelectObject(hdc, holdfont);
+
+  f->width = (unsigned short) metrics.tmAveCharWidth;
+  f->height = (unsigned short) metrics.tmHeight;
+  /* Font variant metrics hack. The problem is that in Windows
+     some underlined fonts have the descent of one pixel more
+     than their non-underlined counterparts.  Font variants
+     though are assumed to have identical metrics. Lowering
+     the font's baseline one pixel down cures the problem, and
+     is visually undetectable. - kkm */
+  f->ascent = (unsigned short) metrics.tmAscent - 1;
+  f->descent = (unsigned short) metrics.tmDescent + 1;
+  f->proportional_p = (metrics.tmPitchAndFamily & TMPF_FIXED_PITCH);
+
+  return 1;
+}
+
+static int
+mswindows_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
+                                   Lisp_Object device, Error_behavior errb)
+{
+  HDC hdc = CreateCompatibleDC (NULL);
+  Lisp_Object font_list = DEVICE_MSWINDOWS_FONTLIST (XDEVICE (device));
+  int res = initialize_font_instance (f, name, font_list, hdc, errb);
+  DeleteDC (hdc);
+  return res;
+}
+
+static int
+msprinter_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
+                                   Lisp_Object device, Error_behavior errb)
+{
+  HDC hdc = DEVICE_MSPRINTER_HDC (XDEVICE (device));
+  Lisp_Object font_list = DEVICE_MSPRINTER_FONTLIST (XDEVICE (device));
+  return initialize_font_instance (f, name, font_list, hdc, errb);
+}
+
+static void
+mswindows_finalize_font_instance (Lisp_Font_Instance *f)
+{
+  int i;
+
+  if (f->data)
     {
     {
-      holdfont = SelectObject(hdc, f->data);
-      if (holdfont)
+      for (i = 0; i < MSWINDOWS_NUM_FONT_VARIANTS; i++)
        {
        {
-         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;
+         if (FONT_INSTANCE_MSWINDOWS_HFONT_I (f, i) != NULL
+             && FONT_INSTANCE_MSWINDOWS_HFONT_I (f, i) != MSWINDOWS_BAD_HFONT)
+           DeleteObject (FONT_INSTANCE_MSWINDOWS_HFONT_I (f, i));
        }
        }
-      DeleteDC (hdc);
-    }
-  mswindows_finalize_font_instance (f);
-  maybe_signal_simple_error ("Couldn't map font", name, Qfont, errb);
-  return 0;
+
+      xfree (f->data);
+      f->data = 0;
+   }
 }
 
 #if 0
 static void
 }
 
 #if 0
 static void
-mswindows_mark_font_instance (struct Lisp_Font_Instance *f)
+mswindows_mark_font_instance (Lisp_Font_Instance *f)
 {
 }
 #endif
 
 static void
 {
 }
 #endif
 
 static void
-mswindows_print_font_instance (struct Lisp_Font_Instance *f,
-                        Lisp_Object printcharfun,
-                        int escapeflag)
+mswindows_print_font_instance (Lisp_Font_Instance *f,
+                              Lisp_Object printcharfun,
+                              int escapeflag)
 {
 {
+  char buf[10];
+  sprintf (buf, " 0x%lx", 
+          (unsigned long)FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f,0,0));
+  write_c_string (buf, printcharfun);
 }
 
 static Lisp_Object
 mswindows_list_fonts (Lisp_Object pattern, Lisp_Object device)
 {
 }
 
 static Lisp_Object
 mswindows_list_fonts (Lisp_Object pattern, Lisp_Object device)
 {
-  Lisp_Object result = Qnil;
-  struct mswindows_font_enum *fontlist;
-  char fontname[MSW_FONTSIZE], *extpattern;
+  Lisp_Object fonttail, result = Qnil;
+  char *extpattern;
+
+  TO_EXTERNAL_FORMAT (LISP_STRING, pattern,
+                     C_STRING_ALLOCA, extpattern,
+                     Qctext);
 
 
-  GET_C_STRING_CTEXT_DATA_ALLOCA (pattern, extpattern);
-  fontlist = DEVICE_MSWINDOWS_FONTLIST (XDEVICE (device));
-  while (fontlist)
+  LIST_LOOP (fonttail, DEVICE_MSWINDOWS_FONTLIST (XDEVICE (device)))
     {
     {
-      if (match_font (fontlist->fontname, extpattern, fontname))
-        result = Fcons (build_string (fontname), result);
-      fontlist = fontlist->next;
+      if (match_font (XSTRING_DATA (XCAR (fonttail)), extpattern, NULL))
+       result = Fcons (XCAR (fonttail), result);
     }
 
   return Fnreverse (result);
     }
 
   return Fnreverse (result);
@@ -1448,7 +1540,7 @@ mswindows_list_fonts (Lisp_Object pattern, Lisp_Object device)
  * Missing parts of the font spec should be filled in with these values:
  *     Courier New:Regular:10::Western */
 static Lisp_Object
  * Missing parts of the font spec should be filled in with these values:
  *     Courier New:Regular:10::Western */
 static Lisp_Object
-mswindows_font_instance_truename (struct Lisp_Font_Instance *f, Error_behavior errb)
+mswindows_font_instance_truename (Lisp_Font_Instance *f, Error_behavior errb)
 {
   int nsep=0;
   char *name = (char *) XSTRING_DATA (f->name);
 {
   int nsep=0;
   char *name = (char *) XSTRING_DATA (f->name);
@@ -1479,7 +1571,7 @@ mswindows_font_instance_truename (struct Lisp_Font_Instance *f, Error_behavior e
     default:;
     }
   
     default:;
     }
   
-  return build_ext_string (extname, FORMAT_OS);
+  return build_ext_string (extname, Qnative);
 }
 
 #ifdef MULE
 }
 
 #ifdef MULE
@@ -1562,6 +1654,29 @@ console_type_create_objects_mswindows (void)
   CONSOLE_HAS_METHOD (mswindows, font_spec_matches_charset);
   CONSOLE_HAS_METHOD (mswindows, find_charset_font);
 #endif
   CONSOLE_HAS_METHOD (mswindows, font_spec_matches_charset);
   CONSOLE_HAS_METHOD (mswindows, find_charset_font);
 #endif
+
+  /* Printer methods - delegate most to windows methods,
+     since graphical objects behave the same way. */
+
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, initialize_color_instance);
+/*  CONSOLE_INHERITS_METHOD (msprinter, mswindows, mark_color_instance); */
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_color_instance);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, finalize_color_instance);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, color_instance_equal);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, color_instance_hash);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, color_instance_rgb_components);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, valid_color_name_p);
+
+  CONSOLE_HAS_METHOD (msprinter, initialize_font_instance);
+/*  CONSOLE_INHERITS_METHOD (msprinter, mswindows, mark_font_instance); */
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_font_instance);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, finalize_font_instance);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, font_instance_truename); 
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, list_fonts);
+#ifdef MULE
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, font_spec_matches_charset);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, find_charset_font);
+#endif
 }
 
 void
 }
 
 void
index b8df7ff..71b423b 100644 (file)
@@ -31,8 +31,8 @@ Boston, MA 02111-1307, USA.  */
  */
 
 
  */
 
 
-#ifndef _XEMACS_OBJECTS_MSW_H_
-#define _XEMACS_OBJECTS_MSW_H_
+#ifndef INCLUDED_objects_msw_h_
+#define INCLUDED_objects_msw_h_
 
 #include "objects.h"
 
 
 #include "objects.h"
 
@@ -46,6 +46,31 @@ struct mswindows_color_instance_data
 #define COLOR_INSTANCE_MSWINDOWS_COLOR(c)      \
        (MSWINDOWS_COLOR_INSTANCE_DATA (c)->color)
 
 #define COLOR_INSTANCE_MSWINDOWS_COLOR(c)      \
        (MSWINDOWS_COLOR_INSTANCE_DATA (c)->color)
 
-#define FONT_INSTANCE_MSWINDOWS_HFONT(c)       ((HFONT) (c)->data)
+/* The four HFONTS are for the 4 (underlined, strikethrough)
+   combinations.  Only the one at index 0, neither underlined nor
+   struk through is created with the font instance. Other fonts are
+   created as necessary during redisplay, using the one at index 0
+   as protptype */
+#define MSWINDOWS_NUM_FONT_VARIANTS 4
+struct mswindows_font_instance_data
+{
+  HFONT hfont [MSWINDOWS_NUM_FONT_VARIANTS];
+};
+
+#define MSWINDOWS_FONT_INSTANCE_DATA(c)        \
+       ((struct mswindows_font_instance_data *) (c)->data)
+
+#define FONT_INSTANCE_MSWINDOWS_HFONT_I(c,i) \
+       (MSWINDOWS_FONT_INSTANCE_DATA(c)->hfont[(i)])
+
+#define FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT(c,under,strike) \
+       FONT_INSTANCE_MSWINDOWS_HFONT_I (c, (!!(strike)<<1)|!!(under))
+
+/* If font creation during redisplay fails, then the following
+   value is used to prevent future attempts to create this font.
+   Redisplay uses the "main" font when encounters this value */
+#define MSWINDOWS_BAD_HFONT INVALID_HANDLE_VALUE
+
+HFONT mswindows_get_hfont (Lisp_Font_Instance* f, int under, int strike);
 
 
-#endif /* _XEMACS_OBJECTS_MSW_H_ */
+#endif /* INCLUDED_objects_msw_h_ */
index 0b38de4..21e1774 100644 (file)
@@ -143,7 +143,7 @@ See `set-tty-dynamic-color-specs'.
 #endif /* 0 */
 
 static int
 #endif /* 0 */
 
 static int
-tty_initialize_color_instance (struct Lisp_Color_Instance *c, Lisp_Object name,
+tty_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name,
                               Lisp_Object device, Error_behavior errb)
 {
   Lisp_Object result;
                               Lisp_Object device, Error_behavior errb)
 {
   Lisp_Object result;
@@ -168,28 +168,28 @@ tty_initialize_color_instance (struct Lisp_Color_Instance *c, Lisp_Object name,
 }
 
 static void
 }
 
 static void
-tty_mark_color_instance (struct Lisp_Color_Instance *c)
+tty_mark_color_instance (Lisp_Color_Instance *c)
 {
   mark_object (COLOR_INSTANCE_TTY_SYMBOL (c));
 }
 
 static void
 {
   mark_object (COLOR_INSTANCE_TTY_SYMBOL (c));
 }
 
 static void
-tty_print_color_instance (struct Lisp_Color_Instance *c,
+tty_print_color_instance (Lisp_Color_Instance *c,
                          Lisp_Object printcharfun,
                          int escapeflag)
 {
 }
 
 static void
                          Lisp_Object printcharfun,
                          int escapeflag)
 {
 }
 
 static void
-tty_finalize_color_instance (struct Lisp_Color_Instance *c)
+tty_finalize_color_instance (Lisp_Color_Instance *c)
 {
   if (c->data)
     xfree (c->data);
 }
 
 static int
 {
   if (c->data)
     xfree (c->data);
 }
 
 static int
-tty_color_instance_equal (struct Lisp_Color_Instance *c1,
-                         struct Lisp_Color_Instance *c2,
+tty_color_instance_equal (Lisp_Color_Instance *c1,
+                         Lisp_Color_Instance *c2,
                          int depth)
 {
   return (EQ (COLOR_INSTANCE_TTY_SYMBOL (c1),
                          int depth)
 {
   return (EQ (COLOR_INSTANCE_TTY_SYMBOL (c1),
@@ -197,7 +197,7 @@ tty_color_instance_equal (struct Lisp_Color_Instance *c1,
 }
 
 static unsigned long
 }
 
 static unsigned long
-tty_color_instance_hash (struct Lisp_Color_Instance *c, int depth)
+tty_color_instance_hash (Lisp_Color_Instance *c, int depth)
 {
   return LISP_HASH (COLOR_INSTANCE_TTY_SYMBOL (c));
 }
 {
   return LISP_HASH (COLOR_INSTANCE_TTY_SYMBOL (c));
 }
@@ -214,7 +214,7 @@ tty_valid_color_name_p (struct device *d, Lisp_Object color)
 
 \f
 static int
 
 \f
 static int
-tty_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object name,
+tty_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
                              Lisp_Object device, Error_behavior errb)
 {
   Bufbyte *str = XSTRING_DATA (name);
                              Lisp_Object device, Error_behavior errb)
 {
   Bufbyte *str = XSTRING_DATA (name);
@@ -255,20 +255,20 @@ tty_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object name,
 }
 
 static void
 }
 
 static void
-tty_mark_font_instance (struct Lisp_Font_Instance *f)
+tty_mark_font_instance (Lisp_Font_Instance *f)
 {
   mark_object (FONT_INSTANCE_TTY_CHARSET (f));
 }
 
 static void
 {
   mark_object (FONT_INSTANCE_TTY_CHARSET (f));
 }
 
 static void
-tty_print_font_instance (struct Lisp_Font_Instance *f,
+tty_print_font_instance (Lisp_Font_Instance *f,
                         Lisp_Object printcharfun,
                         int escapeflag)
 {
 }
 
 static void
                         Lisp_Object printcharfun,
                         int escapeflag)
 {
 }
 
 static void
-tty_finalize_font_instance (struct Lisp_Font_Instance *f)
+tty_finalize_font_instance (Lisp_Font_Instance *f)
 {
   if (f->data)
     xfree (f->data);
 {
   if (f->data)
     xfree (f->data);
@@ -301,7 +301,7 @@ tty_font_spec_matches_charset (struct device *d, Lisp_Object charset,
     return 0;
   the_nonreloc++;
   {
     return 0;
   the_nonreloc++;
   {
-    struct Lisp_String *s = symbol_name (XSYMBOL (XCHARSET_NAME (charset)));
+    Lisp_String *s = symbol_name (XSYMBOL (XCHARSET_NAME (charset)));
     return !strcmp ((CONST char *) the_nonreloc,
                    (CONST char *) string_data (s));
   }
     return !strcmp ((CONST char *) the_nonreloc,
                    (CONST char *) string_data (s));
   }
index c987e3f..5552c88 100644 (file)
@@ -21,8 +21,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with:  Not in FSF. */
 
 
 /* Synched up with:  Not in FSF. */
 
-#ifndef _XEMACS_OBJECTS_TTY_H_
-#define _XEMACS_OBJECTS_TTY_H_
+#ifndef INCLUDED_objects_tty_h_
+#define INCLUDED_objects_tty_h_
 
 #include "objects.h"
 
 
 #include "objects.h"
 
@@ -49,4 +49,4 @@ struct tty_font_instance_data
 extern Lisp_Object Vtty_color_alist, Vtty_dynamic_color_bg;
 extern Lisp_Object Vtty_dynamic_color_fg;
 
 extern Lisp_Object Vtty_color_alist, Vtty_dynamic_color_bg;
 extern Lisp_Object Vtty_dynamic_color_fg;
 
-#endif /* _XEMACS_OBJECTS_TTY_H_ */
+#endif /* INCLUDED_objects_tty_h_ */
index 536228c..5ab99bc 100644 (file)
@@ -69,7 +69,7 @@ allocate_nearest_color (Display *display, Colormap colormap, Visual *visual,
        {
          /* We're dealing with a TrueColor/DirectColor visual, so play games
             with the RGB values in the XColor struct. */
        {
          /* We're dealing with a TrueColor/DirectColor visual, so play games
             with the RGB values in the XColor struct. */
-         /* ### JH: I'm not sure how a call to XAllocColor can fail in a
+         /* #### JH: I'm not sure how a call to XAllocColor can fail in a
             TrueColor or DirectColor visual, so I will just reformat the
             request to match the requirements of the visual, and re-issue
             the request.  If this fails for anybody, I wanna know about it
             TrueColor or DirectColor visual, so I will just reformat the
             request to match the requirements of the visual, and re-issue
             the request.  If this fails for anybody, I wanna know about it
@@ -118,7 +118,7 @@ allocate_nearest_color (Display *display, Colormap colormap, Visual *visual,
          else
            {
              int rd, gr, bl;
          else
            {
              int rd, gr, bl;
-             /* ### JH: I'm punting here, knowing that doing this will at
+             /* #### JH: I'm punting here, knowing that doing this will at
                 least draw the color correctly.  However, unless we convert
                 all of the functions that allocate colors (graphics
                 libraries, etc) to use this function doing this is very
                 least draw the color correctly.  However, unless we convert
                 all of the functions that allocate colors (graphics
                 libraries, etc) to use this function doing this is very
@@ -232,7 +232,9 @@ x_parse_nearest_color (struct device *d, XColor *color, Bufbyte *name,
     CONST Extbyte *extname;
     Extcount extnamelen;
 
     CONST Extbyte *extname;
     Extcount extnamelen;
 
-    GET_CHARPTR_EXT_BINARY_DATA_ALLOCA (name, len, extname, extnamelen);
+    TO_EXTERNAL_FORMAT (DATA, (name, len),
+                       ALLOCA, (extname, extnamelen),
+                       Qbinary);
     result = XParseColor (dpy, cmap, (char *) extname, color);
   }
   if (!result)
     result = XParseColor (dpy, cmap, (char *) extname, color);
   }
   if (!result)
@@ -253,7 +255,7 @@ x_parse_nearest_color (struct device *d, XColor *color, Bufbyte *name,
 }
 
 static int
 }
 
 static int
-x_initialize_color_instance (struct Lisp_Color_Instance *c, Lisp_Object name,
+x_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name,
                             Lisp_Object device, Error_behavior errb)
 {
   XColor color;
                             Lisp_Object device, Error_behavior errb)
 {
   XColor color;
@@ -279,7 +281,7 @@ x_initialize_color_instance (struct Lisp_Color_Instance *c, Lisp_Object name,
 }
 
 static void
 }
 
 static void
-x_print_color_instance (struct Lisp_Color_Instance *c,
+x_print_color_instance (Lisp_Color_Instance *c,
                        Lisp_Object printcharfun,
                        int escapeflag)
 {
                        Lisp_Object printcharfun,
                        int escapeflag)
 {
@@ -291,7 +293,7 @@ x_print_color_instance (struct Lisp_Color_Instance *c,
 }
 
 static void
 }
 
 static void
-x_finalize_color_instance (struct Lisp_Color_Instance *c)
+x_finalize_color_instance (Lisp_Color_Instance *c)
 {
   if (c->data)
     {
 {
   if (c->data)
     {
@@ -314,8 +316,8 @@ x_finalize_color_instance (struct Lisp_Color_Instance *c)
    be comparing their names or pixel values instead. */
 
 static int
    be comparing their names or pixel values instead. */
 
 static int
-x_color_instance_equal (struct Lisp_Color_Instance *c1,
-                       struct Lisp_Color_Instance *c2,
+x_color_instance_equal (Lisp_Color_Instance *c1,
+                       Lisp_Color_Instance *c2,
                        int depth)
 {
   XColor color1 = COLOR_INSTANCE_X_COLOR (c1);
                        int depth)
 {
   XColor color1 = COLOR_INSTANCE_X_COLOR (c1);
@@ -326,14 +328,14 @@ x_color_instance_equal (struct Lisp_Color_Instance *c1,
 }
 
 static unsigned long
 }
 
 static unsigned long
-x_color_instance_hash (struct Lisp_Color_Instance *c, int depth)
+x_color_instance_hash (Lisp_Color_Instance *c, int depth)
 {
   XColor color = COLOR_INSTANCE_X_COLOR (c);
   return HASH3 (color.red, color.green, color.blue);
 }
 
 static Lisp_Object
 {
   XColor color = COLOR_INSTANCE_X_COLOR (c);
   return HASH3 (color.red, color.green, color.blue);
 }
 
 static Lisp_Object
-x_color_instance_rgb_components (struct Lisp_Color_Instance *c)
+x_color_instance_rgb_components (Lisp_Color_Instance *c)
 {
   XColor color = COLOR_INSTANCE_X_COLOR (c);
   return (list3 (make_int (color.red),
 {
   XColor color = COLOR_INSTANCE_X_COLOR (c);
   return (list3 (make_int (color.red),
@@ -350,10 +352,9 @@ x_valid_color_name_p (struct device *d, Lisp_Object color)
 
   CONST char *extname;
 
 
   CONST char *extname;
 
-  GET_C_STRING_CTEXT_DATA_ALLOCA (color, extname);
+  TO_EXTERNAL_FORMAT (LISP_STRING, color, C_STRING_ALLOCA, extname, Qctext);
 
 
-  return XParseColor (dpy, cmap,
-                     extname, &c);
+  return XParseColor (dpy, cmap, extname, &c);
 }
 
 \f
 }
 
 \f
@@ -362,15 +363,14 @@ x_valid_color_name_p (struct device *d, Lisp_Object color)
 /************************************************************************/
 
 static int
 /************************************************************************/
 
 static int
-x_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object name,
+x_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
                            Lisp_Object device, Error_behavior errb)
 {
                            Lisp_Object device, Error_behavior errb)
 {
-  Display *dpy;
+  Display *dpy = DEVICE_X_DISPLAY (XDEVICE (device));
   XFontStruct *xf;
   CONST char *extname;
 
   XFontStruct *xf;
   CONST char *extname;
 
-  dpy = DEVICE_X_DISPLAY (XDEVICE (device));
-  GET_C_STRING_CTEXT_DATA_ALLOCA (f->name, extname);
+  TO_EXTERNAL_FORMAT (LISP_STRING, f->name, C_STRING_ALLOCA, extname, Qctext);
   xf = XLoadQueryFont (dpy, extname);
 
   if (!xf)
   xf = XLoadQueryFont (dpy, extname);
 
   if (!xf)
@@ -457,13 +457,13 @@ x_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object name,
 }
 
 static void
 }
 
 static void
-x_mark_font_instance (struct Lisp_Font_Instance *f)
+x_mark_font_instance (Lisp_Font_Instance *f)
 {
   mark_object (FONT_INSTANCE_X_TRUENAME (f));
 }
 
 static void
 {
   mark_object (FONT_INSTANCE_X_TRUENAME (f));
 }
 
 static void
-x_print_font_instance (struct Lisp_Font_Instance *f,
+x_print_font_instance (Lisp_Font_Instance *f,
                       Lisp_Object printcharfun,
                       int escapeflag)
 {
                       Lisp_Object printcharfun,
                       int escapeflag)
 {
@@ -473,7 +473,7 @@ x_print_font_instance (struct Lisp_Font_Instance *f,
 }
 
 static void
 }
 
 static void
-x_finalize_font_instance (struct Lisp_Font_Instance *f)
+x_finalize_font_instance (Lisp_Font_Instance *f)
 {
 
   if (f->data)
 {
 
   if (f->data)
@@ -773,7 +773,7 @@ x_font_truename (Display *dpy, char *name, XFontStruct *font)
 }
 
 static Lisp_Object
 }
 
 static Lisp_Object
-x_font_instance_truename (struct Lisp_Font_Instance *f, Error_behavior errb)
+x_font_instance_truename (Lisp_Font_Instance *f, Error_behavior errb)
 {
   struct device *d = XDEVICE (f->device);
 
 {
   struct device *d = XDEVICE (f->device);
 
@@ -801,7 +801,7 @@ x_font_instance_truename (struct Lisp_Font_Instance *f, Error_behavior errb)
 }
 
 static Lisp_Object
 }
 
 static Lisp_Object
-x_font_instance_properties (struct Lisp_Font_Instance *f)
+x_font_instance_properties (Lisp_Font_Instance *f)
 {
   struct device *d = XDEVICE (f->device);
   int i;
 {
   struct device *d = XDEVICE (f->device);
   int i;
@@ -861,12 +861,14 @@ x_list_fonts (Lisp_Object pattern, Lisp_Object device)
   Lisp_Object result = Qnil;
   CONST char *patternext;
 
   Lisp_Object result = Qnil;
   CONST char *patternext;
 
-  GET_C_STRING_BINARY_DATA_ALLOCA (pattern, patternext);
+  TO_EXTERNAL_FORMAT (LISP_STRING, pattern,
+                     C_STRING_ALLOCA, patternext,
+                     Qbinary);
 
   names = XListFonts (DEVICE_X_DISPLAY (XDEVICE (device)),
                      patternext, MAX_FONT_COUNT, &count);
   while (count--)
 
   names = XListFonts (DEVICE_X_DISPLAY (XDEVICE (device)),
                      patternext, MAX_FONT_COUNT, &count);
   while (count--)
-    result = Fcons (build_ext_string (names [count], FORMAT_BINARY), result);
+    result = Fcons (build_ext_string (names [count], Qbinary), result);
   if (names)
     XFreeFontNames (names);
   return result;
   if (names)
     XFreeFontNames (names);
   return result;
@@ -934,20 +936,24 @@ x_find_charset_font (Lisp_Object device, Lisp_Object font, Lisp_Object charset)
   CONST char *patternext;
   int i;
 
   CONST char *patternext;
   int i;
 
-  GET_C_STRING_BINARY_DATA_ALLOCA (font, patternext);
+  TO_EXTERNAL_FORMAT (LISP_STRING, font,
+                     C_STRING_ALLOCA, patternext,
+                     Qbinary);
 
   names = XListFonts (DEVICE_X_DISPLAY (XDEVICE (device)),
                      patternext, MAX_FONT_COUNT, &count);
 
   names = XListFonts (DEVICE_X_DISPLAY (XDEVICE (device)),
                      patternext, MAX_FONT_COUNT, &count);
-  /* ### This code seems awfully bogus -- mrb */
+  /* #### This code seems awfully bogus -- mrb */
   for (i = 0; i < count; i ++)
     {
   for (i = 0; i < count; i ++)
     {
-      CONST Bufbyte *intname;
+      CONST char *intname;
 
 
-      GET_C_CHARPTR_INT_BINARY_DATA_ALLOCA (names[i], intname);
+      TO_INTERNAL_FORMAT (C_STRING, names[i],
+                         C_STRING_ALLOCA, intname,
+                         Qbinary);
       if (x_font_spec_matches_charset (XDEVICE (device), charset,
       if (x_font_spec_matches_charset (XDEVICE (device), charset,
-                                      intname, Qnil, 0, -1))
+                                      (Bufbyte *) intname, Qnil, 0, -1))
        {
        {
-         result = build_string ((char *) intname);
+         result = build_string (intname);
          break;
        }
     }
          break;
        }
     }
index de5ff4e..8bfdfd1 100644 (file)
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with:  Not in FSF. */
 
 
 /* Synched up with:  Not in FSF. */
 
-#ifndef _XEMACS_OBJECTS_X_H_
-#define _XEMACS_OBJECTS_X_H_
+#ifndef INCLUDED_objects_x_h_
+#define INCLUDED_objects_x_h_
 
 #include "objects.h"
 
 
 #include "objects.h"
 
@@ -64,4 +64,5 @@ struct x_font_instance_data
 #define FONT_INSTANCE_X_TRUENAME(f) (X_FONT_INSTANCE_DATA (f)->truename)
 
 #endif /* HAVE_X_WINDOWS */
 #define FONT_INSTANCE_X_TRUENAME(f) (X_FONT_INSTANCE_DATA (f)->truename)
 
 #endif /* HAVE_X_WINDOWS */
-#endif /* _XEMACS_OBJECTS_X_H_ */
+
+#endif /* INCLUDED_objects_x_h_ */
index 9e9e8b1..e980944 100644 (file)
@@ -59,7 +59,7 @@ Lisp_Object Qcolor_instancep;
 static Lisp_Object
 mark_color_instance (Lisp_Object obj)
 {
 static Lisp_Object
 mark_color_instance (Lisp_Object obj)
 {
-  struct Lisp_Color_Instance *c = XCOLOR_INSTANCE (obj);
+  Lisp_Color_Instance *c = XCOLOR_INSTANCE (obj);
   mark_object (c->name);
   if (!NILP (c->device)) /* Vthe_null_color_instance */
     MAYBE_DEVMETH (XDEVICE (c->device), mark_color_instance, (c));
   mark_object (c->name);
   if (!NILP (c->device)) /* Vthe_null_color_instance */
     MAYBE_DEVMETH (XDEVICE (c->device), mark_color_instance, (c));
@@ -72,7 +72,7 @@ print_color_instance (Lisp_Object obj, Lisp_Object printcharfun,
                      int escapeflag)
 {
   char buf[100];
                      int escapeflag)
 {
   char buf[100];
-  struct Lisp_Color_Instance *c = XCOLOR_INSTANCE (obj);
+  Lisp_Color_Instance *c = XCOLOR_INSTANCE (obj);
   if (print_readably)
     error ("printing unreadable object #<color-instance 0x%x>",
            c->header.uid);
   if (print_readably)
     error ("printing unreadable object #<color-instance 0x%x>",
            c->header.uid);
@@ -90,7 +90,7 @@ print_color_instance (Lisp_Object obj, Lisp_Object printcharfun,
 static void
 finalize_color_instance (void *header, int for_disksave)
 {
 static void
 finalize_color_instance (void *header, int for_disksave)
 {
-  struct Lisp_Color_Instance *c = (struct Lisp_Color_Instance *) header;
+  Lisp_Color_Instance *c = (Lisp_Color_Instance *) header;
 
   if (!NILP (c->device))
     {
 
   if (!NILP (c->device))
     {
@@ -102,8 +102,8 @@ finalize_color_instance (void *header, int for_disksave)
 static int
 color_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
 static int
 color_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  struct Lisp_Color_Instance *c1 = XCOLOR_INSTANCE (obj1);
-  struct Lisp_Color_Instance *c2 = XCOLOR_INSTANCE (obj2);
+  Lisp_Color_Instance *c1 = XCOLOR_INSTANCE (obj1);
+  Lisp_Color_Instance *c2 = XCOLOR_INSTANCE (obj2);
 
   return (c1 == c2) ||
     (EQ (c1->device, c2->device) &&
 
   return (c1 == c2) ||
     (EQ (c1->device, c2->device) &&
@@ -115,7 +115,7 @@ color_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 static unsigned long
 color_instance_hash (Lisp_Object obj, int depth)
 {
 static unsigned long
 color_instance_hash (Lisp_Object obj, int depth)
 {
-  struct Lisp_Color_Instance *c = XCOLOR_INSTANCE (obj);
+  Lisp_Color_Instance *c = XCOLOR_INSTANCE (obj);
   struct device *d = DEVICEP (c->device) ? XDEVICE (c->device) : 0;
 
   return HASH2 ((unsigned long) d,
   struct device *d = DEVICEP (c->device) ? XDEVICE (c->device) : 0;
 
   return HASH2 ((unsigned long) d,
@@ -128,7 +128,7 @@ DEFINE_LRECORD_IMPLEMENTATION ("color-instance", color_instance,
                               mark_color_instance, print_color_instance,
                               finalize_color_instance, color_instance_equal,
                               color_instance_hash, 0,
                               mark_color_instance, print_color_instance,
                               finalize_color_instance, color_instance_equal,
                               color_instance_hash, 0,
-                              struct Lisp_Color_Instance);
+                              Lisp_Color_Instance);
 \f
 DEFUN ("make-color-instance", Fmake_color_instance, 1, 3, 0, /*
 Return a new `color-instance' object named NAME (a string).
 \f
 DEFUN ("make-color-instance", Fmake_color_instance, 1, 3, 0, /*
 Return a new `color-instance' object named NAME (a string).
@@ -149,14 +149,14 @@ is deallocated as well.
 */
        (name, device, no_error))
 {
 */
        (name, device, no_error))
 {
-  struct Lisp_Color_Instance *c;
+  Lisp_Color_Instance *c;
   Lisp_Object val;
   int retval;
 
   CHECK_STRING (name);
   XSETDEVICE (device, decode_device (device));
 
   Lisp_Object val;
   int retval;
 
   CHECK_STRING (name);
   XSETDEVICE (device, decode_device (device));
 
-  c = alloc_lcrecord_type (struct Lisp_Color_Instance, &lrecord_color_instance);
+  c = alloc_lcrecord_type (Lisp_Color_Instance, &lrecord_color_instance);
   c->name = name;
   c->device = device;
   c->data = 0;
   c->name = name;
   c->device = device;
   c->data = 0;
@@ -195,7 +195,7 @@ Component values range from 0 to 65535.
 */
        (color_instance))
 {
 */
        (color_instance))
 {
-  struct Lisp_Color_Instance *c;
+  Lisp_Color_Instance *c;
 
   CHECK_COLOR_INSTANCE (color_instance);
   c = XCOLOR_INSTANCE (color_instance);
 
   CHECK_COLOR_INSTANCE (color_instance);
   c = XCOLOR_INSTANCE (color_instance);
@@ -239,7 +239,7 @@ static Lisp_Object font_instance_truename_internal (Lisp_Object xfont,
 static Lisp_Object
 mark_font_instance (Lisp_Object obj)
 {
 static Lisp_Object
 mark_font_instance (Lisp_Object obj)
 {
-  struct Lisp_Font_Instance *f = XFONT_INSTANCE (obj);
+  Lisp_Font_Instance *f = XFONT_INSTANCE (obj);
 
   mark_object (f->name);
   if (!NILP (f->device)) /* Vthe_null_font_instance */
 
   mark_object (f->name);
   if (!NILP (f->device)) /* Vthe_null_font_instance */
@@ -252,7 +252,7 @@ static void
 print_font_instance (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
   char buf[200];
 print_font_instance (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
   char buf[200];
-  struct Lisp_Font_Instance *f = XFONT_INSTANCE (obj);
+  Lisp_Font_Instance *f = XFONT_INSTANCE (obj);
   if (print_readably)
     error ("printing unreadable object #<font-instance 0x%x>", f->header.uid);
   write_c_string ("#<font-instance ", printcharfun);
   if (print_readably)
     error ("printing unreadable object #<font-instance 0x%x>", f->header.uid);
   write_c_string ("#<font-instance ", printcharfun);
@@ -269,7 +269,7 @@ print_font_instance (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 static void
 finalize_font_instance (void *header, int for_disksave)
 {
 static void
 finalize_font_instance (void *header, int for_disksave)
 {
-  struct Lisp_Font_Instance *f = (struct Lisp_Font_Instance *) header;
+  Lisp_Font_Instance *f = (Lisp_Font_Instance *) header;
 
   if (!NILP (f->device))
     {
 
   if (!NILP (f->device))
     {
@@ -301,7 +301,7 @@ font_instance_hash (Lisp_Object obj, int depth)
 DEFINE_LRECORD_IMPLEMENTATION ("font-instance", font_instance,
                               mark_font_instance, print_font_instance,
                               finalize_font_instance, font_instance_equal,
 DEFINE_LRECORD_IMPLEMENTATION ("font-instance", font_instance,
                               mark_font_instance, print_font_instance,
                               finalize_font_instance, font_instance_equal,
-                              font_instance_hash, 0, struct Lisp_Font_Instance);
+                              font_instance_hash, 0, Lisp_Font_Instance);
 \f
 DEFUN ("make-font-instance", Fmake_font_instance, 1, 3, 0, /*
 Return a new `font-instance' object named NAME.
 \f
 DEFUN ("make-font-instance", Fmake_font_instance, 1, 3, 0, /*
 Return a new `font-instance' object named NAME.
@@ -317,7 +317,7 @@ these objects are GCed, the underlying X data is deallocated as well.
 */
        (name, device, no_error))
 {
 */
        (name, device, no_error))
 {
-  struct Lisp_Font_Instance *f;
+  Lisp_Font_Instance *f;
   Lisp_Object val;
   int retval = 0;
   Error_behavior errb = decode_error_behavior_flag (no_error);
   Lisp_Object val;
   int retval = 0;
   Error_behavior errb = decode_error_behavior_flag (no_error);
@@ -329,7 +329,7 @@ these objects are GCed, the underlying X data is deallocated as well.
 
   XSETDEVICE (device, decode_device (device));
 
 
   XSETDEVICE (device, decode_device (device));
 
-  f = alloc_lcrecord_type (struct Lisp_Font_Instance, &lrecord_font_instance);
+  f = alloc_lcrecord_type (Lisp_Font_Instance, &lrecord_font_instance);
   f->name = name;
   f->device = device;
 
   f->name = name;
   f->device = device;
 
@@ -417,15 +417,15 @@ static Lisp_Object
 font_instance_truename_internal (Lisp_Object font_instance,
                                 Error_behavior errb)
 {
 font_instance_truename_internal (Lisp_Object font_instance,
                                 Error_behavior errb)
 {
-  struct Lisp_Font_Instance *f = XFONT_INSTANCE (font_instance);
-  
+  Lisp_Font_Instance *f = XFONT_INSTANCE (font_instance);
+
   if (NILP (f->device))
     {
       maybe_signal_simple_error ("Couldn't determine font truename",
                                 font_instance, Qfont, errb);
       return Qnil;
     }
   if (NILP (f->device))
     {
       maybe_signal_simple_error ("Couldn't determine font truename",
                                 font_instance, Qfont, errb);
       return Qnil;
     }
-  
+
   return DEVMETH_OR_GIVEN (XDEVICE (f->device),
                           font_instance_truename, (f, errb), f->name);
 }
   return DEVMETH_OR_GIVEN (XDEVICE (f->device),
                           font_instance_truename, (f, errb), f->name);
 }
@@ -447,7 +447,7 @@ Return the properties (an alist or nil) of FONT-INSTANCE.
 */
        (font_instance))
 {
 */
        (font_instance))
 {
-  struct Lisp_Font_Instance *f;
+  Lisp_Font_Instance *f;
 
   CHECK_FONT_INSTANCE (font_instance);
   f = XFONT_INSTANCE (font_instance);
 
   CHECK_FONT_INSTANCE (font_instance);
   f = XFONT_INSTANCE (font_instance);
@@ -482,7 +482,7 @@ DEFINE_SPECIFIER_TYPE (color);
 static void
 color_create (Lisp_Object obj)
 {
 static void
 color_create (Lisp_Object obj)
 {
-  struct Lisp_Specifier *color = XCOLOR_SPECIFIER (obj);
+  Lisp_Specifier *color = XCOLOR_SPECIFIER (obj);
 
   COLOR_SPECIFIER_FACE (color) = Qnil;
   COLOR_SPECIFIER_FACE_PROPERTY (color) = Qnil;
 
   COLOR_SPECIFIER_FACE (color) = Qnil;
   COLOR_SPECIFIER_FACE_PROPERTY (color) = Qnil;
@@ -491,7 +491,7 @@ color_create (Lisp_Object obj)
 static void
 color_mark (Lisp_Object obj)
 {
 static void
 color_mark (Lisp_Object obj)
 {
-  struct Lisp_Specifier *color = XCOLOR_SPECIFIER (obj);
+  Lisp_Specifier *color = XCOLOR_SPECIFIER (obj);
 
   mark_object (COLOR_SPECIFIER_FACE (color));
   mark_object (COLOR_SPECIFIER_FACE_PROPERTY (color));
 
   mark_object (COLOR_SPECIFIER_FACE (color));
   mark_object (COLOR_SPECIFIER_FACE_PROPERTY (color));
@@ -622,7 +622,7 @@ color_after_change (Lisp_Object specifier, Lisp_Object locale)
 void
 set_color_attached_to (Lisp_Object obj, Lisp_Object face, Lisp_Object property)
 {
 void
 set_color_attached_to (Lisp_Object obj, Lisp_Object face, Lisp_Object property)
 {
-  struct Lisp_Specifier *color = XCOLOR_SPECIFIER (obj);
+  Lisp_Specifier *color = XCOLOR_SPECIFIER (obj);
 
   COLOR_SPECIFIER_FACE (color) = face;
   COLOR_SPECIFIER_FACE_PROPERTY (color) = property;
 
   COLOR_SPECIFIER_FACE (color) = face;
   COLOR_SPECIFIER_FACE_PROPERTY (color) = property;
@@ -660,7 +660,7 @@ DEFINE_SPECIFIER_TYPE (font);
 static void
 font_create (Lisp_Object obj)
 {
 static void
 font_create (Lisp_Object obj)
 {
-  struct Lisp_Specifier *font = XFONT_SPECIFIER (obj);
+  Lisp_Specifier *font = XFONT_SPECIFIER (obj);
 
   FONT_SPECIFIER_FACE (font) = Qnil;
   FONT_SPECIFIER_FACE_PROPERTY (font) = Qnil;
 
   FONT_SPECIFIER_FACE (font) = Qnil;
   FONT_SPECIFIER_FACE_PROPERTY (font) = Qnil;
@@ -669,7 +669,7 @@ font_create (Lisp_Object obj)
 static void
 font_mark (Lisp_Object obj)
 {
 static void
 font_mark (Lisp_Object obj)
 {
-  struct Lisp_Specifier *font = XFONT_SPECIFIER (obj);
+  Lisp_Specifier *font = XFONT_SPECIFIER (obj);
 
   mark_object (FONT_SPECIFIER_FACE (font));
   mark_object (FONT_SPECIFIER_FACE_PROPERTY (font));
 
   mark_object (FONT_SPECIFIER_FACE (font));
   mark_object (FONT_SPECIFIER_FACE_PROPERTY (font));
@@ -832,7 +832,7 @@ font_after_change (Lisp_Object specifier, Lisp_Object locale)
 void
 set_font_attached_to (Lisp_Object obj, Lisp_Object face, Lisp_Object property)
 {
 void
 set_font_attached_to (Lisp_Object obj, Lisp_Object face, Lisp_Object property)
 {
-  struct Lisp_Specifier *font = XFONT_SPECIFIER (obj);
+  Lisp_Specifier *font = XFONT_SPECIFIER (obj);
 
   FONT_SPECIFIER_FACE (font) = face;
   FONT_SPECIFIER_FACE_PROPERTY (font) = property;
 
   FONT_SPECIFIER_FACE (font) = face;
   FONT_SPECIFIER_FACE_PROPERTY (font) = property;
@@ -867,7 +867,7 @@ Lisp_Object Qface_boolean;
 static void
 face_boolean_create (Lisp_Object obj)
 {
 static void
 face_boolean_create (Lisp_Object obj)
 {
-  struct Lisp_Specifier *face_boolean = XFACE_BOOLEAN_SPECIFIER (obj);
+  Lisp_Specifier *face_boolean = XFACE_BOOLEAN_SPECIFIER (obj);
 
   FACE_BOOLEAN_SPECIFIER_FACE (face_boolean) = Qnil;
   FACE_BOOLEAN_SPECIFIER_FACE_PROPERTY (face_boolean) = Qnil;
 
   FACE_BOOLEAN_SPECIFIER_FACE (face_boolean) = Qnil;
   FACE_BOOLEAN_SPECIFIER_FACE_PROPERTY (face_boolean) = Qnil;
@@ -876,7 +876,7 @@ face_boolean_create (Lisp_Object obj)
 static void
 face_boolean_mark (Lisp_Object obj)
 {
 static void
 face_boolean_mark (Lisp_Object obj)
 {
-  struct Lisp_Specifier *face_boolean = XFACE_BOOLEAN_SPECIFIER (obj);
+  Lisp_Specifier *face_boolean = XFACE_BOOLEAN_SPECIFIER (obj);
 
   mark_object (FACE_BOOLEAN_SPECIFIER_FACE (face_boolean));
   mark_object (FACE_BOOLEAN_SPECIFIER_FACE_PROPERTY (face_boolean));
 
   mark_object (FACE_BOOLEAN_SPECIFIER_FACE (face_boolean));
   mark_object (FACE_BOOLEAN_SPECIFIER_FACE_PROPERTY (face_boolean));
@@ -977,7 +977,7 @@ void
 set_face_boolean_attached_to (Lisp_Object obj, Lisp_Object face,
                              Lisp_Object property)
 {
 set_face_boolean_attached_to (Lisp_Object obj, Lisp_Object face,
                              Lisp_Object property)
 {
-  struct Lisp_Specifier *face_boolean = XFACE_BOOLEAN_SPECIFIER (obj);
+  Lisp_Specifier *face_boolean = XFACE_BOOLEAN_SPECIFIER (obj);
 
   FACE_BOOLEAN_SPECIFIER_FACE (face_boolean) = face;
   FACE_BOOLEAN_SPECIFIER_FACE_PROPERTY (face_boolean) = property;
 
   FACE_BOOLEAN_SPECIFIER_FACE (face_boolean) = face;
   FACE_BOOLEAN_SPECIFIER_FACE_PROPERTY (face_boolean) = property;
@@ -1037,17 +1037,20 @@ syms_of_objects (void)
 }
 
 static const struct lrecord_description color_specifier_description[] = {
 }
 
 static const struct lrecord_description color_specifier_description[] = {
-  { XD_LISP_OBJECT, specifier_data_offset + offsetof(struct color_specifier, face), 2 },
+  { XD_LISP_OBJECT, specifier_data_offset + offsetof (struct color_specifier, face) },
+  { XD_LISP_OBJECT, specifier_data_offset + offsetof (struct color_specifier, face_property) },
   { XD_END }
 };
 
 static const struct lrecord_description font_specifier_description[] = {
   { XD_END }
 };
 
 static const struct lrecord_description font_specifier_description[] = {
-  { XD_LISP_OBJECT, specifier_data_offset + offsetof(struct font_specifier, face), 2 },
+  { XD_LISP_OBJECT, specifier_data_offset + offsetof (struct font_specifier, face) },
+  { XD_LISP_OBJECT, specifier_data_offset + offsetof (struct font_specifier, face_property) },
   { XD_END }
 };
 
 static const struct lrecord_description face_boolean_specifier_description[] = {
   { XD_END }
 };
 
 static const struct lrecord_description face_boolean_specifier_description[] = {
-  { XD_LISP_OBJECT, specifier_data_offset + offsetof(struct face_boolean_specifier, face), 2 },
+  { XD_LISP_OBJECT, specifier_data_offset + offsetof (struct face_boolean_specifier, face) },
+  { XD_LISP_OBJECT, specifier_data_offset + offsetof (struct face_boolean_specifier, face_property) },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -1097,8 +1100,8 @@ reinit_vars_of_objects (void)
 {
   staticpro_nodump (&Vthe_null_color_instance);
   {
 {
   staticpro_nodump (&Vthe_null_color_instance);
   {
-    struct Lisp_Color_Instance *c =
-      alloc_lcrecord_type (struct Lisp_Color_Instance, &lrecord_color_instance);
+    Lisp_Color_Instance *c =
+      alloc_lcrecord_type (Lisp_Color_Instance, &lrecord_color_instance);
     c->name = Qnil;
     c->device = Qnil;
     c->data = 0;
     c->name = Qnil;
     c->device = Qnil;
     c->data = 0;
@@ -1108,8 +1111,8 @@ reinit_vars_of_objects (void)
 
   staticpro_nodump (&Vthe_null_font_instance);
   {
 
   staticpro_nodump (&Vthe_null_font_instance);
   {
-    struct Lisp_Font_Instance *f =
-      alloc_lcrecord_type (struct Lisp_Font_Instance, &lrecord_font_instance);
+    Lisp_Font_Instance *f =
+      alloc_lcrecord_type (Lisp_Font_Instance, &lrecord_font_instance);
     f->name = Qnil;
     f->device = Qnil;
     f->data = 0;
     f->name = Qnil;
     f->device = Qnil;
     f->data = 0;
index fdce3e8..c5d781d 100644 (file)
@@ -21,8 +21,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_OBJECTS_H_
-#define _XEMACS_OBJECTS_H_
+#ifndef INCLUDED_objects_h_
+#define INCLUDED_objects_h_
 
 #include "specifier.h"
 
 
 #include "specifier.h"
 
@@ -111,14 +111,6 @@ void set_face_boolean_attached_to (Lisp_Object obj, Lisp_Object face,
  *                           Color Instance Object                          *
  ****************************************************************************/
 
  *                           Color Instance Object                          *
  ****************************************************************************/
 
-DECLARE_LRECORD (color_instance, struct Lisp_Color_Instance);
-#define XCOLOR_INSTANCE(x) \
-  XRECORD (x, color_instance, struct Lisp_Color_Instance)
-#define XSETCOLOR_INSTANCE(x, p) XSETRECORD (x, p, color_instance)
-#define COLOR_INSTANCEP(x) RECORDP (x, color_instance)
-#define CHECK_COLOR_INSTANCE(x) CHECK_RECORD (x, color_instance)
-#define CONCHECK_COLOR_INSTANCE(x) CONCHECK_RECORD (x, color_instance)
-
 EXFUN (Fmake_color_instance, 3);
 
 extern Lisp_Object Vthe_null_color_instance;
 EXFUN (Fmake_color_instance, 3);
 
 extern Lisp_Object Vthe_null_color_instance;
@@ -133,6 +125,13 @@ struct Lisp_Color_Instance
   void *data;
 };
 
   void *data;
 };
 
+DECLARE_LRECORD (color_instance, Lisp_Color_Instance);
+#define XCOLOR_INSTANCE(x) XRECORD (x, color_instance, Lisp_Color_Instance)
+#define XSETCOLOR_INSTANCE(x, p) XSETRECORD (x, p, color_instance)
+#define COLOR_INSTANCEP(x) RECORDP (x, color_instance)
+#define CHECK_COLOR_INSTANCE(x) CHECK_RECORD (x, color_instance)
+#define CONCHECK_COLOR_INSTANCE(x) CONCHECK_RECORD (x, color_instance)
+
 #define COLOR_INSTANCE_NAME(c)   ((c)->name)
 #define COLOR_INSTANCE_DEVICE(c) ((c)->device)
 
 #define COLOR_INSTANCE_NAME(c)   ((c)->name)
 #define COLOR_INSTANCE_DEVICE(c) ((c)->device)
 
@@ -140,8 +139,8 @@ struct Lisp_Color_Instance
  *                            Font Instance Object                          *
  ****************************************************************************/
 
  *                            Font Instance Object                          *
  ****************************************************************************/
 
-DECLARE_LRECORD (font_instance, struct Lisp_Font_Instance);
-#define XFONT_INSTANCE(x) XRECORD (x, font_instance, struct Lisp_Font_Instance)
+DECLARE_LRECORD (font_instance, Lisp_Font_Instance);
+#define XFONT_INSTANCE(x) XRECORD (x, font_instance, Lisp_Font_Instance)
 #define XSETFONT_INSTANCE(x, p) XSETRECORD (x, p, font_instance)
 #define FONT_INSTANCEP(x) RECORDP (x, font_instance)
 #define CHECK_FONT_INSTANCE(x) CHECK_RECORD (x, font_instance)
 #define XSETFONT_INSTANCE(x, p) XSETRECORD (x, p, font_instance)
 #define FONT_INSTANCEP(x) RECORDP (x, font_instance)
 #define CHECK_FONT_INSTANCE(x) CHECK_RECORD (x, font_instance)
@@ -184,4 +183,4 @@ struct Lisp_Font_Instance
 #define FONT_INSTANCE_WIDTH(f)  ((f)->width)
 #define FONT_INSTANCE_HEIGHT(f)         ((f)->height)
 
 #define FONT_INSTANCE_WIDTH(f)  ((f)->width)
 #define FONT_INSTANCE_HEIGHT(f)         ((f)->height)
 
-#endif /* _XEMACS_OBJECTS_H_ */
+#endif /* INCLUDED_objects_h_ */
index 6ce7efb..918f53d 100644 (file)
@@ -14,8 +14,8 @@ License along with this library; if not, write to the Free Software
 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#ifndef __DragAndDropTypesH__
-#define __DragAndDropTypesH__
+#ifndef INCLUDED_offix_types_h_
+#define INCLUDED_offix_types_h_
 
 #define DndNotDnd      -1
 #define DndUnknown     0
 
 #define DndNotDnd      -1
 #define DndUnknown     0
@@ -31,4 +31,4 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
 #define DndEND         10
 
 
 #define DndEND         10
 
-#endif
+#endif /* INCLUDED_offix_types_h_ */
index 67d550a..8276439 100644 (file)
@@ -19,8 +19,8 @@ License along with this library; if not, write to the Free Software
 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#ifndef __DragAndDropH__
-#define __DragAndDropH__ 1L
+#ifndef INCLUDED_offix_h_
+#define INCLUDED_offix_h_
 
 /* The standard DND types are defined here */
 #include "offix-types.h"
 
 /* The standard DND types are defined here */
 #include "offix-types.h"
@@ -63,6 +63,7 @@ DndChangeCursor(int Type,
                int width,int height,
                char *image,char *mask,
                int hot_x,int hot_y);
                int width,int height,
                char *image,char *mask,
                int hot_x,int hot_y);
-#endif
+
+#endif /* INCLUDED_offix_h_ */
 
 
 
 
index b36abf1..a860cb1 100644 (file)
@@ -64,7 +64,7 @@ sizeof_opaque (CONST void *header)
    If DATA is OPAQUE_UNINIT, the object's data is uninitialized.
    Else the object's data is initialized by copying from DATA. */
 Lisp_Object
    If DATA is OPAQUE_UNINIT, the object's data is uninitialized.
    Else the object's data is initialized by copying from DATA. */
 Lisp_Object
-make_opaque (size_t size, CONST void *data)
+make_opaque (CONST void *data, size_t size)
 {
   Lisp_Opaque *p = (Lisp_Opaque *)
     alloc_lcrecord (offsetof (Lisp_Opaque, data) + size, &lrecord_opaque);
 {
   Lisp_Opaque *p = (Lisp_Opaque *)
     alloc_lcrecord (offsetof (Lisp_Opaque, data) + size, &lrecord_opaque);
index 4788cf0..5420681 100644 (file)
@@ -23,8 +23,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Written by Ben Wing, October 1993. */
 
 
 /* Written by Ben Wing, October 1993. */
 
-#ifndef _XEMACS_OPAQUE_H_
-#define _XEMACS_OPAQUE_H_
+#ifndef INCLUDED_opaque_h_
+#define INCLUDED_opaque_h_
 
 typedef union {
   struct { Lisp_Object obj; } obj;
 
 typedef union {
   struct { Lisp_Object obj; } obj;
@@ -47,7 +47,7 @@ DECLARE_LRECORD (opaque, Lisp_Opaque);
    Opaque pointers should never escape to the Lisp level, so
    functions should not be doing this. */
 
    Opaque pointers should never escape to the Lisp level, so
    functions should not be doing this. */
 
-/* Alternative DATA arguments to make_opaque */
+/* Alternative DATA arguments to make_opaque() */
 #define OPAQUE_CLEAR  ((CONST void *)  0)
 #define OPAQUE_UNINIT ((CONST void *) -1)
 
 #define OPAQUE_CLEAR  ((CONST void *)  0)
 #define OPAQUE_UNINIT ((CONST void *) -1)
 
@@ -58,7 +58,7 @@ DECLARE_LRECORD (opaque, Lisp_Opaque);
 #define XOPAQUE_DATA(op) OPAQUE_DATA (XOPAQUE (op))
 #define XOPAQUE_MARKFUN(op) OPAQUE_MARKFUN (XOPAQUE (op))
 
 #define XOPAQUE_DATA(op) OPAQUE_DATA (XOPAQUE (op))
 #define XOPAQUE_MARKFUN(op) OPAQUE_MARKFUN (XOPAQUE (op))
 
-Lisp_Object make_opaque (size_t size, CONST void *data);
+Lisp_Object make_opaque (CONST void *data, size_t size);
 
 typedef struct Lisp_Opaque_Ptr
 {
 
 typedef struct Lisp_Opaque_Ptr
 {
@@ -77,4 +77,4 @@ void free_opaque_ptr (Lisp_Object ptr);
 #define get_opaque_ptr(op) (XOPAQUE_PTR (op)->ptr)
 #define set_opaque_ptr(op, ptr_) (XOPAQUE_PTR (op)->ptr = (ptr_))
 
 #define get_opaque_ptr(op) (XOPAQUE_PTR (op)->ptr)
 #define set_opaque_ptr(op, ptr_) (XOPAQUE_PTR (op)->ptr = (ptr_))
 
-#endif /* _XEMACS_OPAQUE_H_ */
+#endif /* INCLUDED_opaque_h_ */
index 41591be..dabcab7 100644 (file)
@@ -109,12 +109,14 @@ void
 write_string_to_stdio_stream (FILE *stream, struct console *con,
                              CONST Bufbyte *str,
                              Bytecount offset, Bytecount len,
 write_string_to_stdio_stream (FILE *stream, struct console *con,
                              CONST Bufbyte *str,
                              Bytecount offset, Bytecount len,
-                             enum external_data_format fmt)
+                             Lisp_Object coding_system)
 {
 {
-  int extlen;
+  Extcount extlen;
   CONST Extbyte *extptr;
 
   CONST Extbyte *extptr;
 
-  GET_CHARPTR_EXT_DATA_ALLOCA (str + offset, len, fmt, extptr, extlen);
+  TO_EXTERNAL_FORMAT (DATA, (str + offset, len),
+                     ALLOCA, (extptr, extlen),
+                     coding_system);
   if (stream)
     {
       fwrite (extptr, 1, extlen, stream);
   if (stream)
     {
       fwrite (extptr, 1, extlen, stream);
@@ -236,7 +238,7 @@ output_string (Lisp_Object function, CONST Bufbyte *nonreloc,
   else if (EQ (function, Qt) || EQ (function, Qnil))
     {
       write_string_to_stdio_stream (stdout, 0, newnonreloc, offset, len,
   else if (EQ (function, Qt) || EQ (function, Qnil))
     {
       write_string_to_stdio_stream (stdout, 0, newnonreloc, offset, len,
-                                   FORMAT_TERMINAL);
+                                   Qterminal);
     }
   else
     {
     }
   else
     {
@@ -717,7 +719,7 @@ Lisp_Object Vfloat_output_format;
 
 /*
  * This buffer should be at least as large as the max string size of the
 
 /*
  * This buffer should be at least as large as the max string size of the
- * largest float, printed in the biggest notation.  This is undoubtably
+ * largest float, printed in the biggest notation.  This is undoubtedly
  * 20d float_output_format, with the negative of the C-constant "HUGE"
  * from <math.h>.
  *
  * 20d float_output_format, with the negative of the C-constant "HUGE"
  * from <math.h>.
  *
@@ -964,7 +966,7 @@ print_vector (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 void
 print_string (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
 void
 print_string (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
-  struct Lisp_String *s = XSTRING (obj);
+  Lisp_String *s = XSTRING (obj);
   /* We distinguish between Bytecounts and Charcounts, to make
      Vprint_string_length work correctly under Mule.  */
   Charcount size = string_char_length (s);
   /* We distinguish between Bytecounts and Charcounts, to make
      Vprint_string_length work correctly under Mule.  */
   Charcount size = string_char_length (s);
@@ -1180,7 +1182,7 @@ print_internal (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
          {
            p += set_charptr_emchar ((Bufbyte *) p, ch);
          }
          {
            p += set_charptr_emchar ((Bufbyte *) p, ch);
          }
-         
+
        output_string (printcharfun, (Bufbyte *) buf, Qnil, 0, p - buf);
 
        break;
        output_string (printcharfun, (Bufbyte *) buf, Qnil, 0, p - buf);
 
        break;
@@ -1257,7 +1259,7 @@ print_symbol (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
   /* This function can GC */
   /* #### Bug!! (intern "") isn't printed in some distinguished way */
   /* ####  (the reader also loses on it) */
   /* This function can GC */
   /* #### Bug!! (intern "") isn't printed in some distinguished way */
   /* ####  (the reader also loses on it) */
-  struct Lisp_String *name = symbol_name (XSYMBOL (obj));
+  Lisp_String *name = symbol_name (XSYMBOL (obj));
   Bytecount size = string_length (name);
   struct gcpro gcpro1, gcpro2;
 
   Bytecount size = string_length (name);
   struct gcpro gcpro1, gcpro2;
 
@@ -1409,7 +1411,9 @@ to 0.
 
   CHECK_CHAR_COERCE_INT (character);
   len = set_charptr_emchar (str, XCHAR (character));
 
   CHECK_CHAR_COERCE_INT (character);
   len = set_charptr_emchar (str, XCHAR (character));
-  GET_CHARPTR_EXT_DATA_ALLOCA (str, len, FORMAT_TERMINAL, extptr, extlen);
+  TO_EXTERNAL_FORMAT (DATA, (str, len),
+                     ALLOCA, (extptr, extlen),
+                     Qterminal);
   memcpy (alternate_do_string + alternate_do_pointer, extptr, extlen);
   alternate_do_pointer += extlen;
   alternate_do_string[alternate_do_pointer] = 0;
   memcpy (alternate_do_string + alternate_do_pointer, extptr, extlen);
   alternate_do_pointer += extlen;
   alternate_do_string[alternate_do_pointer] = 0;
@@ -1457,7 +1461,7 @@ the output also will be logged to this file.
     write_string_to_stdio_stream (file, con,
                                  XSTRING_DATA (char_or_string),
                                  0, XSTRING_LENGTH (char_or_string),
     write_string_to_stdio_stream (file, con,
                                  XSTRING_DATA (char_or_string),
                                  0, XSTRING_LENGTH (char_or_string),
-                                 FORMAT_TERMINAL);
+                                 Qterminal);
   else
     {
       Bufbyte str[MAX_EMCHAR_LEN];
   else
     {
       Bufbyte str[MAX_EMCHAR_LEN];
@@ -1465,7 +1469,7 @@ the output also will be logged to this file.
 
       CHECK_CHAR_COERCE_INT (char_or_string);
       len = set_charptr_emchar (str, XCHAR (char_or_string));
 
       CHECK_CHAR_COERCE_INT (char_or_string);
       len = set_charptr_emchar (str, XCHAR (char_or_string));
-      write_string_to_stdio_stream (file, con, str, 0, len, FORMAT_TERMINAL);
+      write_string_to_stdio_stream (file, con, str, 0, len, Qterminal);
     }
 
   return char_or_string;
     }
 
   return char_or_string;
@@ -1494,38 +1498,41 @@ FILE = nil means just close any termscript file currently open.
 
 #if 1
 /* Debugging kludge -- unbuffered */
 
 #if 1
 /* Debugging kludge -- unbuffered */
-static int debug_print_length = 50;
-static int debug_print_level = 15;
+static int debug_print_length   = 50;
+static int debug_print_level    = 15;
+static int debug_print_readably = -1;
 
 static void
 debug_print_no_newline (Lisp_Object debug_print_obj)
 {
   /* This function can GC */
 
 static void
 debug_print_no_newline (Lisp_Object debug_print_obj)
 {
   /* This function can GC */
-  int old_print_readably = print_readably;
-  int old_print_depth = print_depth;
-  Lisp_Object old_print_length = Vprint_length;
-  Lisp_Object old_print_level = Vprint_level;
-  Lisp_Object old_inhibit_quit = Vinhibit_quit;
+  int save_print_readably = print_readably;
+  int save_print_depth    = print_depth;
+  Lisp_Object save_Vprint_length = Vprint_length;
+  Lisp_Object save_Vprint_level  = Vprint_level;
+  Lisp_Object save_Vinhibit_quit = Vinhibit_quit;
   struct gcpro gcpro1, gcpro2, gcpro3;
   struct gcpro gcpro1, gcpro2, gcpro3;
-  GCPRO3 (old_print_level, old_print_length, old_inhibit_quit);
+  GCPRO3 (save_Vprint_level, save_Vprint_length, save_Vinhibit_quit);
 
   if (gc_in_progress)
     stderr_out ("** gc-in-progress!  Bad idea to print anything! **\n");
 
   print_depth = 0;
 
   if (gc_in_progress)
     stderr_out ("** gc-in-progress!  Bad idea to print anything! **\n");
 
   print_depth = 0;
-  print_readably = 0;
+  print_readably = debug_print_readably != -1 ? debug_print_readably : 0;
   print_unbuffered++;
   /* Could use unwind-protect, but why bother? */
   if (debug_print_length > 0)
     Vprint_length = make_int (debug_print_length);
   if (debug_print_level > 0)
     Vprint_level = make_int (debug_print_level);
   print_unbuffered++;
   /* Could use unwind-protect, but why bother? */
   if (debug_print_length > 0)
     Vprint_length = make_int (debug_print_length);
   if (debug_print_level > 0)
     Vprint_level = make_int (debug_print_level);
+
   print_internal (debug_print_obj, Qexternal_debugging_output, 1);
   print_internal (debug_print_obj, Qexternal_debugging_output, 1);
-  Vinhibit_quit = old_inhibit_quit;
-  Vprint_level = old_print_level;
-  Vprint_length = old_print_length;
-  print_depth = old_print_depth;
-  print_readably = old_print_readably;
+
+  Vinhibit_quit  = save_Vinhibit_quit;
+  Vprint_level   = save_Vprint_level;
+  Vprint_length  = save_Vprint_length;
+  print_depth    = save_print_depth;
+  print_readably = save_print_readably;
   print_unbuffered--;
   UNGCPRO;
 }
   print_unbuffered--;
   UNGCPRO;
 }
index 2afa597..9799b79 100644 (file)
@@ -32,7 +32,6 @@ Boston, MA 02111-1307, USA.  */
 #include "procimpl.h"
 #include "sysdep.h"
 
 #include "procimpl.h"
 #include "sysdep.h"
 
-#include <windows.h>
 #ifndef __MINGW32__
 #include <shellapi.h>
 #else
 #ifndef __MINGW32__
 #include <shellapi.h>
 #else
@@ -65,7 +64,7 @@ struct nt_process_data
 /* This one breaks process abstraction. Prototype is in console-msw.h,
    used by select_process method in event-msw.c */
 HANDLE
 /* This one breaks process abstraction. Prototype is in console-msw.h,
    used by select_process method in event-msw.c */
 HANDLE
-get_nt_process_handle (struct Lisp_Process *p)
+get_nt_process_handle (Lisp_Process *p)
 {
   return (NT_DATA (p)->h_process);
 }
 {
   return (NT_DATA (p)->h_process);
 }
@@ -375,13 +374,13 @@ validate_signal_number (int signo)
  */
 
 static void
  */
 
 static void
-nt_alloc_process_data (struct Lisp_Process *p)
+nt_alloc_process_data (Lisp_Process *p)
 {
   p->process_data = xnew_and_zero (struct nt_process_data);
 }
 
 static void
 {
   p->process_data = xnew_and_zero (struct nt_process_data);
 }
 
 static void
-nt_finalize_process_data (struct Lisp_Process *p, int for_disksave)
+nt_finalize_process_data (Lisp_Process *p, int for_disksave)
 {
   assert (!for_disksave);
   if (NT_DATA(p)->h_process)
 {
   assert (!for_disksave);
   if (NT_DATA(p)->h_process)
@@ -418,7 +417,7 @@ signal_cannot_launch (Lisp_Object image_file, DWORD err)
 }
 
 static int
 }
 
 static int
-nt_create_process (struct Lisp_Process *p,
+nt_create_process (Lisp_Process *p,
                   Lisp_Object *argv, int nargv,
                   Lisp_Object program, Lisp_Object cur_dir)
 {
                   Lisp_Object *argv, int nargv,
                   Lisp_Object program, Lisp_Object cur_dir)
 {
@@ -671,7 +670,7 @@ nt_create_process (struct Lisp_Process *p,
  */
 
 static void
  */
 
 static void
-nt_update_status_if_terminated (struct Lisp_Process* p)
+nt_update_status_if_terminated (Lisp_Process* p)
 {
   DWORD exit_code;
 
 {
   DWORD exit_code;
 
@@ -718,7 +717,7 @@ static void
 nt_send_process (Lisp_Object proc, struct lstream* lstream)
 {
   volatile Lisp_Object vol_proc = proc;
 nt_send_process (Lisp_Object proc, struct lstream* lstream)
 {
   volatile Lisp_Object vol_proc = proc;
-  struct Lisp_Process *volatile p = XPROCESS (proc);
+  Lisp_Process *volatile p = XPROCESS (proc);
 
   /* use a reasonable-sized buffer (somewhere around the size of the
      stream buffer) so as to avoid inundating the stream with blocked
 
   /* use a reasonable-sized buffer (somewhere around the size of the
      stream buffer) so as to avoid inundating the stream with blocked
@@ -786,7 +785,7 @@ static void
 nt_kill_child_process (Lisp_Object proc, int signo,
                       int current_group, int nomsg)
 {
 nt_kill_child_process (Lisp_Object proc, int signo,
                       int current_group, int nomsg)
 {
-  struct Lisp_Process *p = XPROCESS (proc);
+  Lisp_Process *p = XPROCESS (proc);
 
   /* Enable child signals if necessary.  This may lose the first
      but it's better than nothing. */
 
   /* Enable child signals if necessary.  This may lose the first
      but it's better than nothing. */
index 85539ed..41b766c 100644 (file)
@@ -28,6 +28,9 @@ Boston, MA 02111-1307, USA.  */
    Kirill M. Katsnelson <kkm@kis.ru>, so please bash him and not
    the original author(s) */
 
    Kirill M. Katsnelson <kkm@kis.ru>, so please bash him and not
    the original author(s) */
 
+/* The IPv6 support is derived from the code for GNU Emacs-20.3
+   written by Wolfgang S. Rupprecht */
+
 #include <config.h>
 
 #if !defined (NO_SUBPROCESSES)
 #include <config.h>
 
 #if !defined (NO_SUBPROCESSES)
@@ -310,6 +313,7 @@ create_bidirectional_pipe (int *inchannel, int *outchannel,
 
 #ifdef HAVE_SOCKETS
 
 
 #ifdef HAVE_SOCKETS
 
+#if !(defined(HAVE_GETADDRINFO) && defined(HAVE_GETNAMEINFO))
 static int
 get_internet_address (Lisp_Object host, struct sockaddr_in *address,
                      Error_behavior errb)
 static int
 get_internet_address (Lisp_Object host, struct sockaddr_in *address,
                      Error_behavior errb)
@@ -365,6 +369,7 @@ get_internet_address (Lisp_Object host, struct sockaddr_in *address,
 
   return 1;
 }
 
   return 1;
 }
+#endif /*  !(HAVE_GETADDRINFO && HAVE_GETNAMEINFO) */
 
 static void
 set_socket_nonblocking_maybe (int fd, int port, CONST char* proto)
 
 static void
 set_socket_nonblocking_maybe (int fd, int port, CONST char* proto)
@@ -405,7 +410,7 @@ set_socket_nonblocking_maybe (int fd, int port, CONST char* proto)
    the numeric status that was returned by `wait'.  */
 
 static void
    the numeric status that was returned by `wait'.  */
 
 static void
-update_status_from_wait_code (struct Lisp_Process *p, int *w_fmh)
+update_status_from_wait_code (Lisp_Process *p, int *w_fmh)
 {
   /* C compiler lossage when attempting to pass w directly */
   int w = *w_fmh;
 {
   /* C compiler lossage when attempting to pass w directly */
   int w = *w_fmh;
@@ -520,7 +525,7 @@ record_exited_processes (int block_sigchld)
 }
 
 /* For any processes that have changed status and are recorded
 }
 
 /* For any processes that have changed status and are recorded
-   and such, update the corresponding struct Lisp_Process.
+   and such, update the corresponding Lisp_Process.
    We separate this from record_exited_processes() so that
    we never have to call this function from within a signal
    handler.  We block SIGCHLD in case record_exited_processes()
    We separate this from record_exited_processes() so that
    we never have to call this function from within a signal
    handler.  We block SIGCHLD in case record_exited_processes()
@@ -649,7 +654,7 @@ process_signal_char (int tty_fd, int signo)
  */
 
 static void
  */
 
 static void
-unix_alloc_process_data (struct Lisp_Process *p)
+unix_alloc_process_data (Lisp_Process *p)
 {
   p->process_data = xnew (struct unix_process_data);
 
 {
   p->process_data = xnew (struct unix_process_data);
 
@@ -665,7 +670,7 @@ unix_alloc_process_data (struct Lisp_Process *p)
  */
 
 static void
  */
 
 static void
-unix_mark_process_data (struct Lisp_Process *proc)
+unix_mark_process_data (Lisp_Process *proc)
 {
   mark_object (UNIX_DATA(proc)->tty_name);
 }
 {
   mark_object (UNIX_DATA(proc)->tty_name);
 }
@@ -693,7 +698,7 @@ unix_init_process (void)
  */
 
 static void
  */
 
 static void
-unix_init_process_io_handles (struct Lisp_Process *p, void* in, void* out, int flags)
+unix_init_process_io_handles (Lisp_Process *p, void* in, void* out, int flags)
 {
   UNIX_DATA(p)->infd = (int)in;
 }
 {
   UNIX_DATA(p)->infd = (int)in;
 }
@@ -709,7 +714,7 @@ unix_init_process_io_handles (struct Lisp_Process *p, void* in, void* out, int f
  */
 
 static int
  */
 
 static int
-unix_create_process (struct Lisp_Process *p,
+unix_create_process (Lisp_Process *p,
                     Lisp_Object *argv, int nargv,
                     Lisp_Object program, Lisp_Object cur_dir)
 {
                     Lisp_Object *argv, int nargv,
                     Lisp_Object program, Lisp_Object cur_dir)
 {
@@ -923,7 +928,9 @@ unix_create_process (struct Lisp_Process *p,
            }
          new_argv[i + 1] = 0;
 
            }
          new_argv[i + 1] = 0;
 
-         GET_C_STRING_FILENAME_DATA_ALLOCA (cur_dir, current_dir);
+         TO_EXTERNAL_FORMAT (LISP_STRING, cur_dir,
+                             C_STRING_ALLOCA, current_dir,
+                             Qfile_name);
 
          child_setup (xforkin, xforkout, xforkout, new_argv, current_dir);
        }
 
          child_setup (xforkin, xforkout, xforkout, new_argv, current_dir);
        }
@@ -982,7 +989,7 @@ io_failure:
 /* Return nonzero if this process is a ToolTalk connection. */
 
 static int
 /* Return nonzero if this process is a ToolTalk connection. */
 
 static int
-unix_tooltalk_connection_p (struct Lisp_Process *p)
+unix_tooltalk_connection_p (Lisp_Process *p)
 {
   return UNIX_DATA(p)->connected_via_filedesc_p;
 }
 {
   return UNIX_DATA(p)->connected_via_filedesc_p;
 }
@@ -990,7 +997,7 @@ unix_tooltalk_connection_p (struct Lisp_Process *p)
 /* This is called to set process' virtual terminal size */
 
 static int
 /* This is called to set process' virtual terminal size */
 
 static int
-unix_set_window_size (struct Lisp_Process* p, int cols, int rows)
+unix_set_window_size (Lisp_Process* p, int cols, int rows)
 {
   return set_window_size (UNIX_DATA(p)->infd, cols, rows);
 }
 {
   return set_window_size (UNIX_DATA(p)->infd, cols, rows);
 }
@@ -1005,7 +1012,7 @@ unix_set_window_size (struct Lisp_Process* p, int cols, int rows)
 
 #ifdef HAVE_WAITPID
 static void
 
 #ifdef HAVE_WAITPID
 static void
-unix_update_status_if_terminated (struct Lisp_Process* p)
+unix_update_status_if_terminated (Lisp_Process* p)
 {
   int w;
 #ifdef SIGCHLD
 {
   int w;
 #ifdef SIGCHLD
@@ -1031,7 +1038,7 @@ static void
 unix_reap_exited_processes (void)
 {
   int i;
 unix_reap_exited_processes (void)
 {
   int i;
-  struct Lisp_Process *p;
+  Lisp_Process *p;
 
 #ifndef OBNOXIOUS_SYSV_SIGCLD_BEHAVIOR
   record_exited_processes (1);
 
 #ifndef OBNOXIOUS_SYSV_SIGCLD_BEHAVIOR
   record_exited_processes (1);
@@ -1130,7 +1137,7 @@ unix_send_process (Lisp_Object proc, struct lstream* lstream)
   /* Use volatile to protect variables from being clobbered by longjmp.  */
   SIGTYPE (*volatile old_sigpipe) (int) = 0;
   volatile Lisp_Object vol_proc = proc;
   /* Use volatile to protect variables from being clobbered by longjmp.  */
   SIGTYPE (*volatile old_sigpipe) (int) = 0;
   volatile Lisp_Object vol_proc = proc;
-  struct Lisp_Process *volatile p = XPROCESS (proc);
+  Lisp_Process *volatile p = XPROCESS (proc);
 
   if (!SETJMP (send_process_frame))
     {
 
   if (!SETJMP (send_process_frame))
     {
@@ -1236,7 +1243,7 @@ unix_process_send_eof (Lisp_Object proc)
  */
 
 static USID
  */
 
 static USID
-unix_deactivate_process (struct Lisp_Process *p)
+unix_deactivate_process (Lisp_Process *p)
 {
   SIGTYPE (*old_sigpipe) (int) = 0;
   USID usid;
 {
   SIGTYPE (*old_sigpipe) (int) = 0;
   USID usid;
@@ -1275,7 +1282,7 @@ unix_kill_child_process (Lisp_Object proc, int signo,
   int gid;
   int no_pgrp = 0;
   int kill_retval;
   int gid;
   int no_pgrp = 0;
   int kill_retval;
-  struct Lisp_Process *p = XPROCESS (proc);
+  Lisp_Process *p = XPROCESS (proc);
 
   if (!UNIX_DATA(p)->pty_flag)
     current_group = 0;
 
   if (!UNIX_DATA(p)->pty_flag)
     current_group = 0;
@@ -1395,7 +1402,7 @@ unix_kill_process_by_pid (int pid, int sigcode)
  */
 
 static Lisp_Object
  */
 
 static Lisp_Object
-unix_get_tty_name (struct Lisp_Process *p)
+unix_get_tty_name (Lisp_Process *p)
 {
   return UNIX_DATA (p)->tty_name;
 }
 {
   return UNIX_DATA (p)->tty_name;
 }
@@ -1410,6 +1417,43 @@ unix_get_tty_name (struct Lisp_Process *p)
 static Lisp_Object
 unix_canonicalize_host_name (Lisp_Object host)
 {
 static Lisp_Object
 unix_canonicalize_host_name (Lisp_Object host)
 {
+#if defined(HAVE_GETADDRINFO) && defined(HAVE_GETNAMEINFO)
+  struct addrinfo hints, *res;
+  static char addrbuf[NI_MAXHOST];
+  Lisp_Object canonname;
+  int retval;
+  char *ext_host;
+
+  xzero (hints);
+  hints.ai_flags = AI_CANONNAME;
+  hints.ai_family = AF_UNSPEC;
+  hints.ai_socktype = SOCK_STREAM;
+  hints.ai_protocol = 0;
+  TO_EXTERNAL_FORMAT (LISP_STRING, host, C_STRING_ALLOCA, ext_host, Qnative);
+  retval = getaddrinfo (ext_host, NULL, &hints, &res);
+  if (retval != 0)
+    {
+      char *gai_error;
+
+      TO_INTERNAL_FORMAT (C_STRING, gai_strerror (retval),
+                         C_STRING_ALLOCA, gai_error,
+                         Qnative);
+      maybe_error (Qprocess, ERROR_ME_NOT,
+                  "%s \"%s\"", gai_error, XSTRING_DATA (host));
+      canonname = host;
+    }
+  else
+    {
+      int gni = getnameinfo (res->ai_addr, res->ai_addrlen,
+                            addrbuf, sizeof(addrbuf),
+                            NULL, 0, NI_NUMERICHOST);
+      canonname = gni ? host : build_ext_string (addrbuf, Qnative);
+
+      freeaddrinfo (res);
+    }
+
+  return canonname;
+#else /* ! HAVE_GETADDRINFO */
   struct sockaddr_in address;
 
   if (!get_internet_address (host, &address, ERROR_ME_NOT))
   struct sockaddr_in address;
 
   if (!get_internet_address (host, &address, ERROR_ME_NOT))
@@ -1420,6 +1464,7 @@ unix_canonicalize_host_name (Lisp_Object host)
   else
     /* #### any clue what to do here? */
     return host;
   else
     /* #### any clue what to do here? */
     return host;
+#endif /* ! HAVE_GETADDRINFO */
 }
 
 /* open a TCP network connection to a given HOST/SERVICE.  Treated
 }
 
 /* open a TCP network connection to a given HOST/SERVICE.  Treated
@@ -1432,7 +1477,6 @@ static void
 unix_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service,
                          Lisp_Object protocol, void** vinfd, void** voutfd)
 {
 unix_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service,
                          Lisp_Object protocol, void** vinfd, void** voutfd)
 {
-  struct sockaddr_in address;
   int inch;
   int outch;
   volatile int s;
   int inch;
   int outch;
   volatile int s;
@@ -1446,99 +1490,263 @@ unix_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object servic
     error ("Unsupported protocol \"%s\"",
           string_data (symbol_name (XSYMBOL (protocol))));
 
     error ("Unsupported protocol \"%s\"",
           string_data (symbol_name (XSYMBOL (protocol))));
 
-  if (INTP (service))
-    port = htons ((unsigned short) XINT (service));
-  else
-    {
-      struct servent *svc_info;
-      CHECK_STRING (service);
+  {
+#if defined(HAVE_GETADDRINFO) && defined(HAVE_GETNAMEINFO)
+    struct addrinfo hints, *res;
+    struct addrinfo * volatile lres;
+    char *portstring;
+    volatile int xerrno = 0;
+    volatile int failed_connect = 0;
+    char *ext_host;
+    /*
+     * Caution: service can either be a string or int.
+     * Convert to a C string for later use by getaddrinfo.
+     */
+    if (INTP (service))
+      {
+       char portbuf[128];
+       snprintf (portbuf, sizeof (portbuf), "%ld", (long) XINT (service));
+       portstring = portbuf;
+       port = htons ((unsigned short) XINT (service));
+      }
+    else
+      {
+       CHECK_STRING (service);
+       TO_EXTERNAL_FORMAT (LISP_STRING, service,
+                           C_STRING_ALLOCA, portstring,
+                           Qnative);
+       port = 0;
+      }
+
+    xzero (hints);
+    hints.ai_flags = 0;
+    hints.ai_family = AF_UNSPEC;
+    if (EQ (protocol, Qtcp))
+      hints.ai_socktype = SOCK_STREAM;
+    else /* EQ (protocol, Qudp) */
+      hints.ai_socktype = SOCK_DGRAM;
+    hints.ai_protocol = 0;
+    TO_EXTERNAL_FORMAT (LISP_STRING, host, C_STRING_ALLOCA, ext_host, Qnative);
+    retval = getaddrinfo (ext_host, portstring, &hints, &res);
+    if (retval != 0)
+      {
+       char *gai_error;
+
+       TO_INTERNAL_FORMAT (C_STRING, gai_strerror (retval),
+                           C_STRING_ALLOCA, gai_error,
+                           Qnative);
+       error ("%s/%s %s", XSTRING_DATA (host), portstring, gai_error);
+      }
+
+    /* address loop */
+    for (lres = res; lres ; lres = lres->ai_next)
+      {
+       if (EQ (protocol, Qtcp))
+         s = socket (lres->ai_family, SOCK_STREAM, 0);
+       else /* EQ (protocol, Qudp) */
+         s = socket (lres->ai_family, SOCK_DGRAM, 0);
+
+       if (s < 0)
+         continue;
+
+       /* Turn off interrupts here -- see comments below.  There used to
+          be code which called bind_polling_period() to slow the polling
+          period down rather than turn it off, but that seems rather
+          bogus to me.  Best thing here is to use a non-blocking connect
+          or something, to check for QUIT. */
+
+       /* Comments that are not quite valid: */
+
+       /* Kernel bugs (on Ultrix at least) cause lossage (not just EINTR)
+          when connect is interrupted.  So let's not let it get interrupted.
+          Note we do not turn off polling, because polling is only used
+          when not interrupt_input, and thus not normally used on the systems
+          which have this bug.  On systems which use polling, there's no way
+          to quit if polling is turned off.  */
+
+       /* Slow down polling.  Some kernels have a bug which causes retrying
+          connect to fail after a connect.  */
+
+       slow_down_interrupts ();
+
+      loop:
+
+       /* A system call interrupted with a SIGALRM or SIGIO comes back
+          here, with can_break_system_calls reset to 0. */
+       SETJMP (break_system_call_jump);
+       if (QUITP)
+         {
+           speed_up_interrupts ();
+           REALLY_QUIT;
+           /* In case something really weird happens ... */
+           slow_down_interrupts ();
+         }
+
+       /* Break out of connect with a signal (it isn't otherwise possible).
+          Thus you don't get screwed with a hung network. */
+       can_break_system_calls = 1;
+       retval = connect (s, lres->ai_addr, lres->ai_addrlen);
+       can_break_system_calls = 0;
+       if (retval == -1)
+         {
+           xerrno = errno;
+           if (errno != EISCONN)
+             {
+               if (errno == EINTR)
+                 goto loop;
+               if (errno == EADDRINUSE && retry < 20)
+                 {
+                   /* A delay here is needed on some FreeBSD systems,
+                      and it is harmless, since this retrying takes time anyway
+                      and should be infrequent.
+                      `sleep-for' allowed for quitting this loop with interrupts
+                      slowed down so it can't be used here.  Async timers should
+                      already be disabled at this point so we can use `sleep'. */
+                   sleep (1);
+                   retry++;
+                   goto loop;
+                 }
+             }
+
+           failed_connect = 1;
+           close (s);
+
+           speed_up_interrupts ();
+
+           continue;
+         }
+
+       if (port == 0)
+         {
+           int gni;
+           char servbuf[NI_MAXSERV];
+
+           if (EQ (protocol, Qtcp))
+             gni = getnameinfo (lres->ai_addr, lres->ai_addrlen,
+                                NULL, 0, servbuf, sizeof(servbuf),
+                                NI_NUMERICSERV);
+           else /* EQ (protocol, Qudp) */
+             gni = getnameinfo (lres->ai_addr, lres->ai_addrlen,
+                                NULL, 0, servbuf, sizeof(servbuf),
+                                NI_NUMERICSERV | NI_DGRAM);
+
+           if (gni == 0)
+             port = strtol (servbuf, NULL, 10);
+         }
+
+       break;
+      } /* address loop */
+
+    speed_up_interrupts ();
 
 
-      if (EQ (protocol, Qtcp))
+    freeaddrinfo (res);
+    if (s < 0)
+      {
+       errno = xerrno;
+
+       if (failed_connect)
+         report_file_error ("connection failed", list2 (host, name));
+       else
+         report_file_error ("error creating socket", list1 (name));
+      }
+#else /* ! HAVE_GETADDRINFO */
+    struct sockaddr_in address;
+
+    if (INTP (service))
+      port = htons ((unsigned short) XINT (service));
+    else
+      {
+       struct servent *svc_info;
+       CHECK_STRING (service);
+
+       if (EQ (protocol, Qtcp))
          svc_info = getservbyname ((char *) XSTRING_DATA (service), "tcp");
          svc_info = getservbyname ((char *) XSTRING_DATA (service), "tcp");
-      else /* EQ (protocol, Qudp) */
+       else /* EQ (protocol, Qudp) */
          svc_info = getservbyname ((char *) XSTRING_DATA (service), "udp");
 
          svc_info = getservbyname ((char *) XSTRING_DATA (service), "udp");
 
-      if (svc_info == 0)
-       error ("Unknown service \"%s\"", XSTRING_DATA (service));
-      port = svc_info->s_port;
-    }
+       if (svc_info == 0)
+         error ("Unknown service \"%s\"", XSTRING_DATA (service));
+       port = svc_info->s_port;
+      }
 
 
-  get_internet_address (host, &address, ERROR_ME);
-  address.sin_port = port;
+    get_internet_address (host, &address, ERROR_ME);
+    address.sin_port = port;
 
 
-  if (EQ (protocol, Qtcp))
+    if (EQ (protocol, Qtcp))
       s = socket (address.sin_family, SOCK_STREAM, 0);
       s = socket (address.sin_family, SOCK_STREAM, 0);
-  else /* EQ (protocol, Qudp) */
+    else /* EQ (protocol, Qudp) */
       s = socket (address.sin_family, SOCK_DGRAM, 0);
 
       s = socket (address.sin_family, SOCK_DGRAM, 0);
 
-  if (s < 0)
-    report_file_error ("error creating socket", list1 (name));
+    if (s < 0)
+      report_file_error ("error creating socket", list1 (name));
 
 
-  /* Turn off interrupts here -- see comments below.  There used to
-     be code which called bind_polling_period() to slow the polling
-     period down rather than turn it off, but that seems rather
-     bogus to me.  Best thing here is to use a non-blocking connect
-     or something, to check for QUIT. */
+    /* Turn off interrupts here -- see comments below.  There used to
+       be code which called bind_polling_period() to slow the polling
+       period down rather than turn it off, but that seems rather
+       bogus to me.  Best thing here is to use a non-blocking connect
+       or something, to check for QUIT. */
 
 
-  /* Comments that are not quite valid: */
+    /* Comments that are not quite valid: */
 
 
-  /* Kernel bugs (on Ultrix at least) cause lossage (not just EINTR)
-     when connect is interrupted.  So let's not let it get interrupted.
-     Note we do not turn off polling, because polling is only used
-     when not interrupt_input, and thus not normally used on the systems
-     which have this bug.  On systems which use polling, there's no way
-     to quit if polling is turned off.  */
+    /* Kernel bugs (on Ultrix at least) cause lossage (not just EINTR)
+       when connect is interrupted.  So let's not let it get interrupted.
+       Note we do not turn off polling, because polling is only used
+       when not interrupt_input, and thus not normally used on the systems
+       which have this bug.  On systems which use polling, there's no way
+       to quit if polling is turned off.  */
 
 
-  /* Slow down polling.  Some kernels have a bug which causes retrying
-     connect to fail after a connect.  */
+    /* Slow down polling.  Some kernels have a bug which causes retrying
+       connect to fail after a connect.  */
 
 
-  slow_down_interrupts ();
+    slow_down_interrupts ();
 
 
- loop:
+  loop:
 
 
-  /* A system call interrupted with a SIGALRM or SIGIO comes back
-     here, with can_break_system_calls reset to 0. */
-  SETJMP (break_system_call_jump);
-  if (QUITP)
-    {
-      speed_up_interrupts ();
-      REALLY_QUIT;
-      /* In case something really weird happens ... */
-      slow_down_interrupts ();
-    }
+    /* A system call interrupted with a SIGALRM or SIGIO comes back
+       here, with can_break_system_calls reset to 0. */
+    SETJMP (break_system_call_jump);
+    if (QUITP)
+      {
+       speed_up_interrupts ();
+       REALLY_QUIT;
+       /* In case something really weird happens ... */
+       slow_down_interrupts ();
+      }
 
 
-  /* Break out of connect with a signal (it isn't otherwise possible).
-     Thus you don't get screwed with a hung network. */
-  can_break_system_calls = 1;
-  retval = connect (s, (struct sockaddr *) &address, sizeof (address));
-  can_break_system_calls = 0;
-  if (retval == -1 && errno != EISCONN)
-    {
-      int xerrno = errno;
-      if (errno == EINTR)
-       goto loop;
-      if (errno == EADDRINUSE && retry < 20)
-       {
-         /* A delay here is needed on some FreeBSD systems,
-            and it is harmless, since this retrying takes time anyway
-            and should be infrequent.
-             `sleep-for' allowed for quitting this loop with interrupts
-             slowed down so it can't be used here.  Async timers should
-             already be disabled at this point so we can use `sleep'. */
-          sleep (1);
-         retry++;
+    /* Break out of connect with a signal (it isn't otherwise possible).
+       Thus you don't get screwed with a hung network. */
+    can_break_system_calls = 1;
+    retval = connect (s, (struct sockaddr *) &address, sizeof (address));
+    can_break_system_calls = 0;
+    if (retval == -1 && errno != EISCONN)
+      {
+       int xerrno = errno;
+       if (errno == EINTR)
          goto loop;
          goto loop;
-       }
+       if (errno == EADDRINUSE && retry < 20)
+         {
+           /* A delay here is needed on some FreeBSD systems,
+              and it is harmless, since this retrying takes time anyway
+              and should be infrequent.
+              `sleep-for' allowed for quitting this loop with interrupts
+              slowed down so it can't be used here.  Async timers should
+              already be disabled at this point so we can use `sleep'. */
+           sleep (1);
+           retry++;
+           goto loop;
+         }
 
 
-      close (s);
+       close (s);
 
 
-      speed_up_interrupts ();
+       speed_up_interrupts ();
 
 
-      errno = xerrno;
-      report_file_error ("connection failed", list2 (host, name));
-    }
+       errno = xerrno;
+       report_file_error ("connection failed", list2 (host, name));
+      }
 
 
-  speed_up_interrupts ();
+    speed_up_interrupts ();
+#endif /* ! HAVE_GETADDRINFO */
+  }
 
   inch = s;
   outch = dup (s);
 
   inch = s;
   outch = dup (s);
index 4d20fad..b2ddd52 100644 (file)
@@ -58,7 +58,7 @@ Boston, MA 02111-1307, USA.  */
 #include "systty.h"
 #include "syswait.h"
 
 #include "systty.h"
 #include "syswait.h"
 
-Lisp_Object Qprocessp;
+Lisp_Object Qprocessp, Qprocess_live_p;
 
 /* Process methods */
 struct process_methods the_process_methods;
 
 /* Process methods */
 struct process_methods the_process_methods;
@@ -113,7 +113,7 @@ extern Lisp_Object Vlisp_EXEC_SUFFIXES;
 static Lisp_Object
 mark_process (Lisp_Object obj)
 {
 static Lisp_Object
 mark_process (Lisp_Object obj)
 {
-  struct Lisp_Process *proc = XPROCESS (obj);
+  Lisp_Process *proc = XPROCESS (obj);
   MAYBE_PROCMETH (mark_process_data, (proc));
   mark_object (proc->name);
   mark_object (proc->command);
   MAYBE_PROCMETH (mark_process_data, (proc));
   mark_object (proc->name);
   mark_object (proc->command);
@@ -134,7 +134,7 @@ mark_process (Lisp_Object obj)
 static void
 print_process (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
 static void
 print_process (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
-  struct Lisp_Process *proc = XPROCESS (obj);
+  Lisp_Process *proc = XPROCESS (obj);
 
   if (print_readably)
     error ("printing unreadable object #<process %s>",
 
   if (print_readably)
     error ("printing unreadable object #<process %s>",
@@ -160,7 +160,7 @@ print_process (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 }
 
 #ifdef HAVE_WINDOW_SYSTEM
 }
 
 #ifdef HAVE_WINDOW_SYSTEM
-extern void debug_process_finalization (struct Lisp_Process *p);
+extern void debug_process_finalization (Lisp_Process *p);
 #endif /* HAVE_WINDOW_SYSTEM */
 
 static void
 #endif /* HAVE_WINDOW_SYSTEM */
 
 static void
@@ -168,7 +168,7 @@ finalize_process (void *header, int for_disksave)
 {
   /* #### this probably needs to be tied into the tty event loop */
   /* #### when there is one */
 {
   /* #### this probably needs to be tied into the tty event loop */
   /* #### when there is one */
-  struct Lisp_Process *p = (struct Lisp_Process *) header;
+  Lisp_Process *p = (Lisp_Process *) header;
 #ifdef HAVE_WINDOW_SYSTEM
   if (!for_disksave)
     {
 #ifdef HAVE_WINDOW_SYSTEM
   if (!for_disksave)
     {
@@ -186,7 +186,7 @@ finalize_process (void *header, int for_disksave)
 
 DEFINE_LRECORD_IMPLEMENTATION ("process", process,
                                mark_process, print_process, finalize_process,
 
 DEFINE_LRECORD_IMPLEMENTATION ("process", process,
                                mark_process, print_process, finalize_process,
-                               0, 0, 0, struct Lisp_Process);
+                               0, 0, 0, Lisp_Process);
 \f
 /************************************************************************/
 /*                       basic process accessors                        */
 \f
 /************************************************************************/
 /*                       basic process accessors                        */
@@ -196,8 +196,7 @@ DEFINE_LRECORD_IMPLEMENTATION ("process", process,
    directly to the child process, rather than en/decoding FILE_CODING
    streams */
 void
    directly to the child process, rather than en/decoding FILE_CODING
    streams */
 void
-get_process_streams (struct Lisp_Process *p,
-                    Lisp_Object *instr, Lisp_Object *outstr)
+get_process_streams (Lisp_Process *p, Lisp_Object *instr, Lisp_Object *outstr)
 {
   assert (p);
   assert (NILP (p->pipe_instream) || LSTREAMP(p->pipe_instream));
 {
   assert (p);
   assert (NILP (p->pipe_instream) || LSTREAMP(p->pipe_instream));
@@ -206,7 +205,7 @@ get_process_streams (struct Lisp_Process *p,
   *outstr = p->pipe_outstream;
 }
 
   *outstr = p->pipe_outstream;
 }
 
-struct Lisp_Process *
+Lisp_Process *
 get_process_from_usid (USID usid)
 {
   CONST void *vval;
 get_process_from_usid (USID usid)
 {
   CONST void *vval;
@@ -224,19 +223,19 @@ get_process_from_usid (USID usid)
 }
 
 int
 }
 
 int
-get_process_selected_p (struct Lisp_Process *p)
+get_process_selected_p (Lisp_Process *p)
 {
   return p->selected;
 }
 
 void
 {
   return p->selected;
 }
 
 void
-set_process_selected_p (struct Lisp_Process *p, int selected_p)
+set_process_selected_p (Lisp_Process *p, int selected_p)
 {
   p->selected = !!selected_p;
 }
 
 int
 {
   p->selected = !!selected_p;
 }
 
 int
-connected_via_filedesc_p (struct Lisp_Process *p)
+connected_via_filedesc_p (Lisp_Process *p)
 {
   return MAYBE_INT_PROCMETH (tooltalk_connection_p, (p));
 }
 {
   return MAYBE_INT_PROCMETH (tooltalk_connection_p, (p));
 }
@@ -257,6 +256,14 @@ Return t if OBJECT is a process.
   return PROCESSP (obj) ? Qt : Qnil;
 }
 
   return PROCESSP (obj) ? Qt : Qnil;
 }
 
+DEFUN ("process-live-p", Fprocess_live_p, 1, 1, 0, /*
+Return t if OBJECT is a process that is alive.
+*/
+       (obj))
+{
+  return PROCESSP (obj) && PROCESS_LIVE_P (XPROCESS (obj)) ? Qt : Qnil;
+}
+
 DEFUN ("process-list", Fprocess_list, 0, 0, 0, /*
 Return a list of all processes.
 */
 DEFUN ("process-list", Fprocess_list, 0, 0, 0, /*
 Return a list of all processes.
 */
@@ -416,8 +423,7 @@ make_process_internal (Lisp_Object name)
 {
   Lisp_Object val, name1;
   int i;
 {
   Lisp_Object val, name1;
   int i;
-  struct Lisp_Process *p =
-    alloc_lcrecord_type (struct Lisp_Process, &lrecord_process);
+  Lisp_Process *p = alloc_lcrecord_type (Lisp_Process, &lrecord_process);
 
   /* If name is already in use, modify it until it is unused.  */
   name1 = name;
 
   /* If name is already in use, modify it until it is unused.  */
   name1 = name;
@@ -464,7 +470,7 @@ make_process_internal (Lisp_Object name)
 }
 
 void
 }
 
 void
-init_process_io_handles (struct Lisp_Process *p, void* in, void* out, int flags)
+init_process_io_handles (Lisp_Process *p, void* in, void* out, int flags)
 {
   USID usid = event_stream_create_stream_pair (in, out,
                                               &p->pipe_instream, &p->pipe_outstream,
 {
   USID usid = event_stream_create_stream_pair (in, out,
                                               &p->pipe_instream, &p->pipe_outstream,
@@ -499,7 +505,7 @@ static void
 create_process (Lisp_Object process, Lisp_Object *argv, int nargv,
                Lisp_Object program, Lisp_Object cur_dir)
 {
 create_process (Lisp_Object process, Lisp_Object *argv, int nargv,
                Lisp_Object program, Lisp_Object cur_dir)
 {
-  struct Lisp_Process *p = XPROCESS (process);
+  Lisp_Process *p = XPROCESS (process);
   int pid;
 
   /* *_create_process may change status_symbol, if the process
   int pid;
 
   /* *_create_process may change status_symbol, if the process
@@ -510,7 +516,7 @@ create_process (Lisp_Object process, Lisp_Object *argv, int nargv,
   pid = PROCMETH (create_process, (p, argv, nargv, program, cur_dir));
 
   p->pid = make_int (pid);
   pid = PROCMETH (create_process, (p, argv, nargv, program, cur_dir));
 
   p->pid = make_int (pid);
-  if (!NILP(p->pipe_instream))
+  if (PROCESS_LIVE_P (p))
     event_stream_select_process (p);
 }
 
     event_stream_select_process (p);
 }
 
@@ -813,7 +819,7 @@ read_process_output (Lisp_Object proc)
   Bytecount nbytes, nchars;
   Bufbyte chars[1024];
   Lisp_Object outstream;
   Bytecount nbytes, nchars;
   Bufbyte chars[1024];
   Lisp_Object outstream;
-  struct Lisp_Process *p = XPROCESS (proc);
+  Lisp_Process *p = XPROCESS (proc);
 
   /* If there is a lot of output from the subprocess, the loop in
      execute_internal_event() might call read_process_output() more
 
   /* If there is a lot of output from the subprocess, the loop in
      execute_internal_event() might call read_process_output() more
@@ -823,7 +829,7 @@ read_process_output (Lisp_Object proc)
      Really, the loop in execute_internal_event() should check itself
      for a process-filter change, like in status_notify(); but the
      struct Lisp_Process is not exported outside of this file. */
      Really, the loop in execute_internal_event() should check itself
      for a process-filter change, like in status_notify(); but the
      struct Lisp_Process is not exported outside of this file. */
-  if (NILP(p->pipe_instream))
+  if (!PROCESS_LIVE_P (p))
     return -1; /* already closed */
 
   if (!NILP (p->filter) && (p->filter_does_read))
     return -1; /* already closed */
 
   if (!NILP (p->filter) && (p->filter_does_read))
@@ -1032,7 +1038,7 @@ void
 set_process_filter (Lisp_Object proc, Lisp_Object filter, int filter_does_read)
 {
   CHECK_PROCESS (proc);
 set_process_filter (Lisp_Object proc, Lisp_Object filter, int filter_does_read)
 {
   CHECK_PROCESS (proc);
-  if (PROCESS_LIVE_P (proc)) {
+  if (PROCESS_LIVE_P (XPROCESS (proc))) {
     if (EQ (filter, Qt))
       event_stream_unselect_process (XPROCESS (proc));
     else
     if (EQ (filter, Qt))
       event_stream_unselect_process (XPROCESS (proc));
     else
@@ -1121,6 +1127,7 @@ Return PROCESS's input coding system.
        (process))
 {
   process = get_process (process);
        (process))
 {
   process = get_process (process);
+  CHECK_LIVE_PROCESS (process);
   return decoding_stream_coding_system (XLSTREAM (XPROCESS (process)->coding_instream) );
 }
 
   return decoding_stream_coding_system (XLSTREAM (XPROCESS (process)->coding_instream) );
 }
 
@@ -1130,6 +1137,7 @@ Return PROCESS's output coding system.
        (process))
 {
   process = get_process (process);
        (process))
 {
   process = get_process (process);
+  CHECK_LIVE_PROCESS (process);
   return encoding_stream_coding_system (XLSTREAM (XPROCESS (process)->coding_outstream));
 }
 
   return encoding_stream_coding_system (XLSTREAM (XPROCESS (process)->coding_outstream));
 }
 
@@ -1139,6 +1147,7 @@ Return a pair of coding-system for decoding and encoding of PROCESS.
        (process))
 {
   process = get_process (process);
        (process))
 {
   process = get_process (process);
+  CHECK_LIVE_PROCESS (process);
   return Fcons (decoding_stream_coding_system
                (XLSTREAM (XPROCESS (process)->coding_instream)),
                encoding_stream_coding_system
   return Fcons (decoding_stream_coding_system
                (XLSTREAM (XPROCESS (process)->coding_instream)),
                encoding_stream_coding_system
@@ -1153,6 +1162,8 @@ Set PROCESS's input coding system to CODESYS.
 {
   codesys = Fget_coding_system (codesys);
   process = get_process (process);
 {
   codesys = Fget_coding_system (codesys);
   process = get_process (process);
+  CHECK_LIVE_PROCESS (process);
+
   set_decoding_stream_coding_system
     (XLSTREAM (XPROCESS (process)->coding_instream), codesys);
   return Qnil;
   set_decoding_stream_coding_system
     (XLSTREAM (XPROCESS (process)->coding_instream), codesys);
   return Qnil;
@@ -1166,6 +1177,8 @@ Set PROCESS's output coding system to CODESYS.
 {
   codesys = Fget_coding_system (codesys);
   process = get_process (process);
 {
   codesys = Fget_coding_system (codesys);
   process = get_process (process);
+  CHECK_LIVE_PROCESS (process);
+
   set_encoding_stream_coding_system
     (XLSTREAM (XPROCESS (process)->coding_outstream), codesys);
   return Qnil;
   set_encoding_stream_coding_system
     (XLSTREAM (XPROCESS (process)->coding_outstream), codesys);
   return Qnil;
@@ -1174,6 +1187,8 @@ Set PROCESS's output coding system to CODESYS.
 DEFUN ("set-process-coding-system", Fset_process_coding_system,
        1, 3, 0, /*
 Set coding-systems of PROCESS to DECODING and ENCODING.
 DEFUN ("set-process-coding-system", Fset_process_coding_system,
        1, 3, 0, /*
 Set coding-systems of PROCESS to DECODING and ENCODING.
+DECODING will be used to decode subprocess output and ENCODING to
+encode subprocess input.
 */
        (process, decoding, encoding))
 {
 */
        (process, decoding, encoding))
 {
@@ -1195,7 +1210,7 @@ Set coding-systems of PROCESS to DECODING and ENCODING.
 static Lisp_Object
 exec_sentinel_unwind (Lisp_Object datum)
 {
 static Lisp_Object
 exec_sentinel_unwind (Lisp_Object datum)
 {
-  struct Lisp_Cons *d = XCONS (datum);
+  Lisp_Cons *d = XCONS (datum);
   XPROCESS (d->car)->sentinel = d->cdr;
   free_cons (d);
   return Qnil;
   XPROCESS (d->car)->sentinel = d->cdr;
   free_cons (d);
   return Qnil;
@@ -1206,7 +1221,7 @@ exec_sentinel (Lisp_Object proc, Lisp_Object reason)
 {
   /* This function can GC */
   int speccount = specpdl_depth ();
 {
   /* This function can GC */
   int speccount = specpdl_depth ();
-  struct Lisp_Process *p = XPROCESS (proc);
+  Lisp_Process *p = XPROCESS (proc);
   Lisp_Object sentinel = p->sentinel;
 
   if (NILP (sentinel))
   Lisp_Object sentinel = p->sentinel;
 
   if (NILP (sentinel))
@@ -1276,7 +1291,7 @@ update_process_status (Lisp_Object p,
 /* Return a string describing a process status list.  */
 
 static Lisp_Object
 /* Return a string describing a process status list.  */
 
 static Lisp_Object
-status_message (struct Lisp_Process *p)
+status_message (Lisp_Process *p)
 {
   Lisp_Object symbol = p->status_symbol;
   int code = p->exit_code;
 {
   Lisp_Object symbol = p->status_symbol;
   int code = p->exit_code;
@@ -1360,7 +1375,7 @@ status_notify (void)
   for (tail = Vprocess_list; CONSP (tail); tail = XCDR (tail))
     {
       Lisp_Object proc = XCAR (tail);
   for (tail = Vprocess_list; CONSP (tail); tail = XCDR (tail))
     {
       Lisp_Object proc = XCAR (tail);
-      struct Lisp_Process *p = XPROCESS (proc);
+      Lisp_Process *p = XPROCESS (proc);
       /* p->tick is also volatile.  Same thing as above applies. */
       int this_process_tick;
 
       /* p->tick is also volatile.  Same thing as above applies. */
       int this_process_tick;
 
@@ -1527,9 +1542,7 @@ process_send_signal (Lisp_Object process, int signo,
   if (network_connection_p (proc))
     error ("Network connection %s is not a subprocess",
           XSTRING_DATA (XPROCESS(proc)->name));
   if (network_connection_p (proc))
     error ("Network connection %s is not a subprocess",
           XSTRING_DATA (XPROCESS(proc)->name));
-  if (!PROCESS_LIVE_P (proc))
-    error ("Process %s is not active",
-          XSTRING_DATA (XPROCESS(proc)->name));
+  CHECK_LIVE_PROCESS (proc);
 
   MAYBE_PROCMETH (kill_child_process, (proc, signo, current_group, nomsg));
 }
 
   MAYBE_PROCMETH (kill_child_process, (proc, signo, current_group, nomsg));
 }
@@ -1819,7 +1832,7 @@ text to PROCESS after you call this function.
 void
 deactivate_process (Lisp_Object proc)
 {
 void
 deactivate_process (Lisp_Object proc)
 {
-  struct Lisp_Process *p = XPROCESS (proc);
+  Lisp_Process *p = XPROCESS (proc);
   USID usid;
 
   /* It's possible that we got as far in the process-creation
   USID usid;
 
   /* It's possible that we got as far in the process-creation
@@ -1872,7 +1885,7 @@ PROCESS may be a process or the name of one, or a buffer name.
        (proc))
 {
   /* This function can GC */
        (proc))
 {
   /* This function can GC */
-  struct Lisp_Process *p;
+  Lisp_Process *p;
   proc = get_process (proc);
   p = XPROCESS (proc);
   if (network_connection_p (proc))
   proc = get_process (proc);
   p = XPROCESS (proc);
   if (network_connection_p (proc))
@@ -1883,7 +1896,7 @@ PROCESS may be a process or the name of one, or a buffer name.
       p->tick++;
       process_tick++;
     }
       p->tick++;
       process_tick++;
     }
-  else if (!NILP(p->pipe_instream))
+  else if (PROCESS_LIVE_P (p))
     {
       Fkill_process (proc, Qnil);
       /* Do this now, since remove_process will make sigchld_handler do nothing.  */
     {
       Fkill_process (proc, Qnil);
       /* Do this now, since remove_process will make sigchld_handler do nothing.  */
@@ -1915,7 +1928,7 @@ kill_buffer_processes (Lisp_Object buffer)
        {
          if (network_connection_p (proc))
            Fdelete_process (proc);
        {
          if (network_connection_p (proc))
            Fdelete_process (proc);
-         else if (!NILP (XPROCESS (proc)->pipe_instream))
+         else if (PROCESS_LIVE_P (XPROCESS (proc)))
            process_send_signal (proc, SIGHUP, 0, 1);
        }
     }
            process_send_signal (proc, SIGHUP, 0, 1);
        }
     }
@@ -1978,6 +1991,7 @@ void
 syms_of_process (void)
 {
   defsymbol (&Qprocessp, "processp");
 syms_of_process (void)
 {
   defsymbol (&Qprocessp, "processp");
+  defsymbol (&Qprocess_live_p, "process-live-p");
   defsymbol (&Qrun, "run");
   defsymbol (&Qstop, "stop");
   defsymbol (&Qopen, "open");
   defsymbol (&Qrun, "run");
   defsymbol (&Qstop, "stop");
   defsymbol (&Qopen, "open");
@@ -1991,6 +2005,7 @@ syms_of_process (void)
 #endif
 
   DEFSUBR (Fprocessp);
 #endif
 
   DEFSUBR (Fprocessp);
+  DEFSUBR (Fprocess_live_p);
   DEFSUBR (Fget_process);
   DEFSUBR (Fget_buffer_process);
   DEFSUBR (Fdelete_process);
   DEFSUBR (Fget_process);
   DEFSUBR (Fget_buffer_process);
   DEFSUBR (Fdelete_process);
index 59adf41..472cd0e 100644 (file)
@@ -18,8 +18,8 @@ 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.  */
 
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#ifndef _XEMACS_PROCESS_H_
-#define _XEMACS_PROCESS_H_
+#ifndef INCLUDED_process_h_
+#define INCLUDED_process_h_
 
 #if defined (NO_SUBPROCESSES)
 #undef XPROCESS
 
 #if defined (NO_SUBPROCESSES)
 #undef XPROCESS
@@ -38,14 +38,19 @@ void wait_without_blocking (void);
 #else /* not NO_SUBPROCESSES */
 
 /* Only process.c needs to know about the guts of this */
 #else /* not NO_SUBPROCESSES */
 
 /* Only process.c needs to know about the guts of this */
-struct Lisp_Process;
 
 
-DECLARE_LRECORD (process, struct Lisp_Process);
-#define XPROCESS(x) XRECORD (x, process, struct Lisp_Process)
+DECLARE_LRECORD (process, Lisp_Process);
+#define XPROCESS(x) XRECORD (x, process, Lisp_Process)
 #define XSETPROCESS(x, p) XSETRECORD (x, p, process)
 #define PROCESSP(x) RECORDP (x, process)
 #define CHECK_PROCESS(x) CHECK_RECORD (x, process)
 #define XSETPROCESS(x, p) XSETRECORD (x, p, process)
 #define PROCESSP(x) RECORDP (x, process)
 #define CHECK_PROCESS(x) CHECK_RECORD (x, process)
-#define PROCESS_LIVE_P(x) (!NILP (XPROCESS(x)->pipe_instream))
+#define PROCESS_LIVE_P(x) (!NILP ((x)->pipe_instream))
+
+#define CHECK_LIVE_PROCESS(x) do {                     \
+  CHECK_PROCESS (x);                                   \
+  if (! PROCESS_LIVE_P (XPROCESS (x)))                 \
+    dead_wrong_type_argument (Qprocess_live_p, (x));   \
+} while (0)
 
 #ifdef emacs
 
 
 #ifdef emacs
 
@@ -56,7 +61,7 @@ Lisp_Object connect_to_file_descriptor (Lisp_Object name,
                                        Lisp_Object buffer,
                                        Lisp_Object infd,
                                        Lisp_Object outfd);
                                        Lisp_Object buffer,
                                        Lisp_Object infd,
                                        Lisp_Object outfd);
-int connected_via_filedesc_p (struct Lisp_Process *p);
+int connected_via_filedesc_p (Lisp_Process *p);
 void kill_buffer_processes (Lisp_Object buffer);
 void close_process_descs (void);
 
 void kill_buffer_processes (Lisp_Object buffer);
 void close_process_descs (void);
 
@@ -79,12 +84,12 @@ void update_process_status (Lisp_Object p,
                            Lisp_Object status_symbol,
                            int exit_code, int core_dumped);
 
                            Lisp_Object status_symbol,
                            int exit_code, int core_dumped);
 
-void get_process_streams (struct Lisp_Process *p,
+void get_process_streams (Lisp_Process *p,
                          Lisp_Object *instr, Lisp_Object *outstr);
                          Lisp_Object *instr, Lisp_Object *outstr);
-int get_process_selected_p (struct Lisp_Process *p);
-void set_process_selected_p (struct Lisp_Process *p, int selected_p);
+int get_process_selected_p (Lisp_Process *p);
+void set_process_selected_p (Lisp_Process *p, int selected_p);
 
 
-struct Lisp_Process *get_process_from_usid (USID usid);
+Lisp_Process *get_process_from_usid (USID usid);
 
 #ifdef HAVE_SOCKETS
 int network_connection_p (Lisp_Object process);
 
 #ifdef HAVE_SOCKETS
 int network_connection_p (Lisp_Object process);
@@ -142,4 +147,4 @@ Lisp_Object canonicalize_host_name (Lisp_Object host);
 #define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ptsname (fd));
 #endif
 
 #define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ptsname (fd));
 #endif
 
-#endif /* _XEMACS_PROCESS_H_ */
+#endif /* INCLUDED_process_h_ */
index ded0881..b8ce625 100644 (file)
@@ -22,10 +22,8 @@ Boston, MA 02111-1307, USA.  */
    process-unix.c, process-msw.c etc. The Lisp_Process structure and other
    contents of this file is not exported to the rest of the world */
 
    process-unix.c, process-msw.c etc. The Lisp_Process structure and other
    contents of this file is not exported to the rest of the world */
 
-#ifndef _XEMACS_PROCIMPL_H_
-#define _XEMACS_PROCIMPL_H_
-
-struct Lisp_Process;
+#ifndef INCLUDED_procimpl_h_
+#define INCLUDED_procimpl_h_
 
 /*
  * Structure which keeps methods of the process implementation.
 
 /*
  * Structure which keeps methods of the process implementation.
@@ -37,17 +35,16 @@ struct Lisp_Process;
 
 struct process_methods
 {
 
 struct process_methods
 {
-  void (*mark_process_data) (struct Lisp_Process *proc);
-  void (*print_process_data) (struct Lisp_Process *proc,
-                             Lisp_Object printcharfun);
-  void (*finalize_process_data) (struct Lisp_Process *proc, int for_disksave);
-  void (*alloc_process_data) (struct Lisp_Process *p);
-  void (*init_process_io_handles) (struct Lisp_Process *p,
+  void (*mark_process_data) (Lisp_Process *proc);
+  void (*print_process_data) (Lisp_Process *proc, Lisp_Object printcharfun);
+  void (*finalize_process_data) (Lisp_Process *proc, int for_disksave);
+  void (*alloc_process_data) (Lisp_Process *p);
+  void (*init_process_io_handles) (Lisp_Process *p,
                                   void* in, void* out, int flags);
                                   void* in, void* out, int flags);
-  int  (*create_process) (struct Lisp_Process *p,
+  int  (*create_process) (Lisp_Process *p,
                          Lisp_Object *argv, int nargv,
                          Lisp_Object program, Lisp_Object cur_dir);
                          Lisp_Object *argv, int nargv,
                          Lisp_Object program, Lisp_Object cur_dir);
-  int  (*tooltalk_connection_p) (struct Lisp_Process *p);
+  int  (*tooltalk_connection_p) (Lisp_Process *p);
 #ifdef HAVE_SOCKETS
   void (*open_network_stream) (Lisp_Object name, Lisp_Object host,
                               Lisp_Object service, Lisp_Object protocol,
 #ifdef HAVE_SOCKETS
   void (*open_network_stream) (Lisp_Object name, Lisp_Object host,
                               Lisp_Object service, Lisp_Object protocol,
@@ -59,16 +56,16 @@ struct process_methods
 #endif /* HAVE_MULTICAST */
 #endif /* HAVE_SOCKETS */
   Lisp_Object (*canonicalize_host_name) (Lisp_Object host);
 #endif /* HAVE_MULTICAST */
 #endif /* HAVE_SOCKETS */
   Lisp_Object (*canonicalize_host_name) (Lisp_Object host);
-  int  (*set_window_size) (struct Lisp_Process* p, int height, int width);
+  int  (*set_window_size) (Lisp_Process* p, int height, int width);
   void (*send_process) (Lisp_Object proc, struct lstream* lstream);
   void (*reap_exited_processes) (void);
   void (*send_process) (Lisp_Object proc, struct lstream* lstream);
   void (*reap_exited_processes) (void);
-  void (*update_status_if_terminated) (struct Lisp_Process* p);
+  void (*update_status_if_terminated) (Lisp_Process* p);
   void (*kill_child_process) (Lisp_Object proc, int signo,
                              int current_group, int nomsg);
   int  (*kill_process_by_pid) (int pid, int sigcode);
   int  (*process_send_eof) (Lisp_Object proc);
   void (*kill_child_process) (Lisp_Object proc, int signo,
                              int current_group, int nomsg);
   int  (*kill_process_by_pid) (int pid, int sigcode);
   int  (*process_send_eof) (Lisp_Object proc);
-  Lisp_Object (*get_tty_name) (struct Lisp_Process *p);
-  USID (*deactivate_process) (struct Lisp_Process *p);
+  Lisp_Object (*get_tty_name) (Lisp_Process *p);
+  USID (*deactivate_process) (Lisp_Process *p);
   void (*init_process) (void);
 };
 
   void (*init_process) (void);
 };
 
@@ -177,11 +174,11 @@ extern Lisp_Object network_stream_blocking_port_list;
 #endif  /* PROCESS_IO_BLOCKING */
 
 Lisp_Object make_process_internal (Lisp_Object name);
 #endif  /* PROCESS_IO_BLOCKING */
 
 Lisp_Object make_process_internal (Lisp_Object name);
-void init_process_io_handles (struct Lisp_Process *p, void* in,
+void init_process_io_handles (Lisp_Process *p, void* in,
                              void* out, int flags);
 void send_process (Lisp_Object proc,
                   Lisp_Object relocatable,
                   CONST Bufbyte *nonrelocatable,
                   int start, int len);
 
                              void* out, int flags);
 void send_process (Lisp_Object proc,
                   Lisp_Object relocatable,
                   CONST Bufbyte *nonrelocatable,
                   int start, int len);
 
-#endif /* _XEMACS_PROCIMPL_H_ */
+#endif /* INCLUDED_procimpl_h_ */
index 9cc4416..9c9b798 100644 (file)
@@ -53,8 +53,6 @@ typedef unsigned char *POINTER;
 /* Unconditionally use unsigned char * for this.  */
 typedef unsigned char *POINTER;
 
 /* Unconditionally use unsigned char * for this.  */
 typedef unsigned char *POINTER;
 
-typedef unsigned long SIZE;
-
 #ifdef DOUG_LEA_MALLOC
 #define M_TOP_PAD -2
 #include <malloc.h>
 #ifdef DOUG_LEA_MALLOC
 #define M_TOP_PAD -2
 #include <malloc.h>
@@ -69,7 +67,6 @@ void refill_memory_reserve (void);
 
 #include <stddef.h>
 
 
 #include <stddef.h>
 
-typedef size_t SIZE;
 typedef void *POINTER;
 
 #include <unistd.h>
 typedef void *POINTER;
 
 #include <unistd.h>
@@ -79,7 +76,6 @@ typedef void *POINTER;
 #endif /* emacs.  */
 
 void init_ralloc (void);
 #endif /* emacs.  */
 
 void init_ralloc (void);
-#define safe_bcopy(x, y, z) memmove (y, x, z)
 
 #define NIL ((POINTER) 0)
 
 
 #define NIL ((POINTER) 0)
 
@@ -185,7 +181,7 @@ typedef struct bp
   struct bp *prev;
   POINTER *variable;
   POINTER data;
   struct bp *prev;
   POINTER *variable;
   POINTER data;
-  SIZE size;
+  size_t size;
   POINTER new_data;            /* temporarily used for relocation */
   struct heap *heap;           /* Heap this bloc is in.  */
 } *bloc_ptr;
   POINTER new_data;            /* temporarily used for relocation */
   struct heap *heap;           /* Heap this bloc is in.  */
 } *bloc_ptr;
@@ -245,10 +241,10 @@ find_heap (POINTER address)
    allocate the memory.  */
 
 static POINTER
    allocate the memory.  */
 
 static POINTER
-obtain (POINTER address, SIZE size)
+obtain (POINTER address, size_t size)
 {
   heap_ptr heap;
 {
   heap_ptr heap;
-  SIZE already_available;
+  size_t already_available;
 
   /* Find the heap that ADDRESS falls within.  */
   for (heap = last_heap; heap; heap = heap->prev)
 
   /* Find the heap that ADDRESS falls within.  */
   for (heap = last_heap; heap; heap = heap->prev)
@@ -275,7 +271,7 @@ obtain (POINTER address, SIZE size)
   if (heap == NIL_HEAP)
     {
       POINTER new = (*real_morecore)(0);
   if (heap == NIL_HEAP)
     {
       POINTER new = (*real_morecore)(0);
-      SIZE get;
+      size_t get;
 
       already_available = (char *)last_heap->end - (char *)address;
 
 
       already_available = (char *)last_heap->end - (char *)address;
 
@@ -325,7 +321,7 @@ obtain (POINTER address, SIZE size)
    If we could not allocate the space, return zero.  */
 
 static POINTER
    If we could not allocate the space, return zero.  */
 
 static POINTER
-get_more_space (SIZE size)
+get_more_space (size_t size)
 {
   POINTER ptr = break_value;
   if (obtain (size))
 {
   POINTER ptr = break_value;
   if (obtain (size))
@@ -388,7 +384,7 @@ relinquish (void)
 
 long r_alloc_size_in_use (void);
 long
 
 long r_alloc_size_in_use (void);
 long
-r_alloc_size_in_use ()
+r_alloc_size_in_use (void)
 {
   return break_value - virtual_break_value;
 }
 {
   return break_value - virtual_break_value;
 }
@@ -420,7 +416,7 @@ find_bloc (POINTER *ptr)
    memory for the new block.  */
 
 static bloc_ptr
    memory for the new block.  */
 
 static bloc_ptr
-get_bloc (SIZE size)
+get_bloc (size_t size)
 {
   register bloc_ptr new_bloc;
   register heap_ptr heap;
 {
   register bloc_ptr new_bloc;
   register heap_ptr heap;
@@ -501,7 +497,7 @@ relocate_blocs (bloc_ptr bloc, heap_ptr heap, POINTER address)
       if (heap == NIL_HEAP)
        {
          register bloc_ptr tb = b;
       if (heap == NIL_HEAP)
        {
          register bloc_ptr tb = b;
-         register SIZE s = 0;
+         register size_t s = 0;
 
          /* Add up the size of all the following blocs.  */
          while (tb != NIL_BLOC)
 
          /* Add up the size of all the following blocs.  */
          while (tb != NIL_BLOC)
@@ -628,12 +624,12 @@ update_heap_bloc_correspondence (bloc_ptr bloc, heap_ptr heap)
    that come after BLOC in memory.  */
 
 static int
    that come after BLOC in memory.  */
 
 static int
-resize_bloc (bloc_ptr bloc, SIZE size)
+resize_bloc (bloc_ptr bloc, size_t size)
 {
   register bloc_ptr b;
   heap_ptr heap;
   POINTER address;
 {
   register bloc_ptr b;
   heap_ptr heap;
   POINTER address;
-  SIZE old_size;
+  size_t old_size;
 
   /* No need to ever call this if arena is frozen, bug somewhere!  */
   if (r_alloc_freeze_level)
 
   /* No need to ever call this if arena is frozen, bug somewhere!  */
   if (r_alloc_freeze_level)
@@ -681,7 +677,7 @@ resize_bloc (bloc_ptr bloc, SIZE size)
             }
          else
            {
             }
          else
            {
-             safe_bcopy (b->data, b->new_data, b->size);
+             memmove (b->new_data, b->data, b->size);
              *b->variable = b->data = b->new_data;
             }
        }
              *b->variable = b->data = b->new_data;
             }
        }
@@ -692,7 +688,7 @@ resize_bloc (bloc_ptr bloc, SIZE size)
        }
       else
        {
        }
       else
        {
-         safe_bcopy (bloc->data, bloc->new_data, old_size);
+         memmove (bloc->new_data, bloc->data, old_size);
          memset (bloc->new_data + old_size, 0, size - old_size);
          *bloc->variable = bloc->data = bloc->new_data;
        }
          memset (bloc->new_data + old_size, 0, size - old_size);
          *bloc->variable = bloc->data = bloc->new_data;
        }
@@ -708,7 +704,7 @@ resize_bloc (bloc_ptr bloc, SIZE size)
             }
          else
            {
             }
          else
            {
-             safe_bcopy (b->data, b->new_data, b->size);
+             memmove (b->new_data, b->data, b->size);
              *b->variable = b->data = b->new_data;
            }
        }
              *b->variable = b->data = b->new_data;
            }
        }
@@ -813,7 +809,7 @@ r_alloc_sbrk (ptrdiff_t size)
         not always find a space which is contiguous to the previous.  */
       POINTER new_bloc_start;
       heap_ptr h = first_heap;
         not always find a space which is contiguous to the previous.  */
       POINTER new_bloc_start;
       heap_ptr h = first_heap;
-      SIZE get = ROUNDUP (size);
+      size_t get = ROUNDUP (size);
 
       address = (POINTER) ROUNDUP (virtual_break_value);
 
 
       address = (POINTER) ROUNDUP (virtual_break_value);
 
@@ -862,7 +858,7 @@ r_alloc_sbrk (ptrdiff_t size)
             header.  */
          for (b = last_bloc; b != NIL_BLOC; b = b->prev)
            {
             header.  */
          for (b = last_bloc; b != NIL_BLOC; b = b->prev)
            {
-             safe_bcopy (b->data, b->new_data, b->size);
+             memmove (b->new_data, b->data, b->size);
              *b->variable = b->data = b->new_data;
            }
 
              *b->variable = b->data = b->new_data;
            }
 
@@ -893,7 +889,7 @@ r_alloc_sbrk (ptrdiff_t size)
     }
   else /* size < 0 */
     {
     }
   else /* size < 0 */
     {
-      SIZE excess = (char *)first_heap->bloc_start
+      size_t excess = (char *)first_heap->bloc_start
                      - ((char *)virtual_break_value + size);
 
       address = virtual_break_value;
                      - ((char *)virtual_break_value + size);
 
       address = virtual_break_value;
@@ -908,7 +904,7 @@ r_alloc_sbrk (ptrdiff_t size)
 
          for (b = first_bloc; b != NIL_BLOC; b = b->next)
            {
 
          for (b = first_bloc; b != NIL_BLOC; b = b->next)
            {
-             safe_bcopy (b->data, b->new_data, b->size);
+             memmove (b->new_data, b->data, b->size);
              *b->variable = b->data = b->new_data;
            }
        }
              *b->variable = b->data = b->new_data;
            }
        }
@@ -941,9 +937,9 @@ r_alloc_sbrk (ptrdiff_t size)
    If we can't allocate the necessary memory, set *PTR to zero, and
    return zero.  */
 
    If we can't allocate the necessary memory, set *PTR to zero, and
    return zero.  */
 
-POINTER r_alloc (POINTER *ptr, SIZE size);
+POINTER r_alloc (POINTER *ptr, size_t size);
 POINTER
 POINTER
-r_alloc (POINTER *ptr, SIZE size)
+r_alloc (POINTER *ptr, size_t size)
 {
   bloc_ptr new_bloc;
 
 {
   bloc_ptr new_bloc;
 
@@ -1000,9 +996,9 @@ r_alloc_free (POINTER *ptr)
    If more memory cannot be allocated, then leave *PTR unchanged, and
    return zero.  */
 
    If more memory cannot be allocated, then leave *PTR unchanged, and
    return zero.  */
 
-POINTER r_re_alloc (POINTER *ptr, SIZE size);
+POINTER r_re_alloc (POINTER *ptr, size_t size);
 POINTER
 POINTER
-r_re_alloc (POINTER *ptr, SIZE size)
+r_re_alloc (POINTER *ptr, size_t size)
 {
   register bloc_ptr bloc;
 
 {
   register bloc_ptr bloc;
 
@@ -1092,7 +1088,7 @@ r_alloc_thaw (void)
     abort ();
 
   /* This frees all unused blocs.  It is not too inefficient, as the resize
     abort ();
 
   /* This frees all unused blocs.  It is not too inefficient, as the resize
-     and bcopy is done only once.  Afterwards, all unreferenced blocs are
+     and memmove is done only once.  Afterwards, all unreferenced blocs are
      already shrunk to zero size.  */
   if (!r_alloc_freeze_level)
     {
      already shrunk to zero size.  */
   if (!r_alloc_freeze_level)
     {
@@ -1237,7 +1233,7 @@ r_alloc_check (void)
     {
       assert (b->prev == pb);
       assert ((POINTER) MEM_ROUNDUP (b->data) == b->data);
     {
       assert (b->prev == pb);
       assert ((POINTER) MEM_ROUNDUP (b->data) == b->data);
-      assert ((SIZE) MEM_ROUNDUP (b->size) == b->size);
+      assert ((size_t) MEM_ROUNDUP (b->size) == b->size);
 
       ph = 0;
       for (h = first_heap; h; h = h->next)
 
       ph = 0;
       for (h = first_heap; h; h = h->next)
@@ -1697,10 +1693,10 @@ find_mmap_handle (POINTER *alias)
 static void Addr_Block_initialize(void);
 
 /* Get a suitable VM_ADDR via mmap */
 static void Addr_Block_initialize(void);
 
 /* Get a suitable VM_ADDR via mmap */
-static VM_ADDR New_Addr_Block( SIZE sz );
+static VM_ADDR New_Addr_Block (size_t sz);
 
 /* Free a VM_ADDR allocated via New_Addr_Block */
 
 /* Free a VM_ADDR allocated via New_Addr_Block */
-static void Free_Addr_Block( VM_ADDR addr, SIZE sz );
+static void Free_Addr_Block (VM_ADDR addr, size_t sz);
 
 #ifdef MMAP_GENERATE_ADDRESSES
 /* Implementation of the three calls for address picking when XEmacs is incharge */
 
 #ifdef MMAP_GENERATE_ADDRESSES
 /* Implementation of the three calls for address picking when XEmacs is incharge */
@@ -1711,7 +1707,7 @@ typedef enum { empty = 0, occupied, unavailable } addr_status;
 typedef struct addr_chain
 {
   POINTER addr;
 typedef struct addr_chain
 {
   POINTER addr;
-  SIZE sz;
+  size_t sz;
   addr_status flag;
   struct addr_chain *next;
 } ADDRESS_BLOCK, *ADDRESS_CHAIN;
   addr_status flag;
   struct addr_chain *next;
 } ADDRESS_BLOCK, *ADDRESS_CHAIN;
@@ -1723,7 +1719,8 @@ static ADDRESS_CHAIN addr_chain = 0;
    WRT the addition/deletion of address blocks because of the assert
    in Coalesce() and the strict ordering of blocks by their address
    */
    WRT the addition/deletion of address blocks because of the assert
    in Coalesce() and the strict ordering of blocks by their address
    */
-static void Addr_Block_initialize()
+static void
+Addr_Block_initialize (void)
 {
   MEMMETER( MVAL( M_Addrlist_Size )++)
   addr_chain = (ADDRESS_CHAIN) UNDERLYING_MALLOC( sizeof( ADDRESS_BLOCK ));
 {
   MEMMETER( MVAL( M_Addrlist_Size )++)
   addr_chain = (ADDRESS_CHAIN) UNDERLYING_MALLOC( sizeof( ADDRESS_BLOCK ));
@@ -1735,7 +1732,8 @@ static void Addr_Block_initialize()
 
 /* Coalesce address blocks if they are contiguous.  Only empty and
    unavailable slots are coalesced. */
 
 /* Coalesce address blocks if they are contiguous.  Only empty and
    unavailable slots are coalesced. */
-static void Coalesce_Addr_Blocks()
+static void
+Coalesce_Addr_Blocks (void)
 {
   ADDRESS_CHAIN p;
   for (p = addr_chain; p; p = p->next)
 {
   ADDRESS_CHAIN p;
   for (p = addr_chain; p; p = p->next)
@@ -1761,7 +1759,8 @@ static void Coalesce_Addr_Blocks()
 }
 
 /* Get an empty address block of specified size. */
 }
 
 /* Get an empty address block of specified size. */
-static VM_ADDR New_Addr_Block( SIZE sz )
+static VM_ADDR
+New_Addr_Block (size_t sz)
 {
   ADDRESS_CHAIN p = addr_chain;
   VM_ADDR new_addr = VM_FAILURE_ADDR;
 {
   ADDRESS_CHAIN p = addr_chain;
   VM_ADDR new_addr = VM_FAILURE_ADDR;
@@ -1798,7 +1797,8 @@ static VM_ADDR New_Addr_Block( SIZE sz )
 
 /* Free an address block.  We mark the block as being empty, and attempt to
    do any coalescing that may have resulted from this. */
 
 /* Free an address block.  We mark the block as being empty, and attempt to
    do any coalescing that may have resulted from this. */
-static void Free_Addr_Block( VM_ADDR addr, SIZE sz )
+static void
+Free_Addr_Block (VM_ADDR addr, size_t sz)
 {
   ADDRESS_CHAIN p = addr_chain;
   for (; p; p = p->next )
 {
   ADDRESS_CHAIN p = addr_chain;
   for (; p; p = p->next )
@@ -1819,18 +1819,21 @@ static void Free_Addr_Block( VM_ADDR addr, SIZE sz )
 /* This is an alternate (simpler) implementation in cases where the
    address is picked by the kernel. */
 
 /* This is an alternate (simpler) implementation in cases where the
    address is picked by the kernel. */
 
-static void Addr_Block_initialize(void)
+static void
+Addr_Block_initialize (void)
 {
   /* Nothing. */
 }
 
 {
   /* Nothing. */
 }
 
-static VM_ADDR New_Addr_Block( SIZE sz )
+static VM_ADDR
+New_Addr_Block (size_t sz)
 {
   return mmap (0, sz, PROT_READ|PROT_WRITE, MAP_FLAGS,
               DEV_ZERO_FD, 0 );
 }
 
 {
   return mmap (0, sz, PROT_READ|PROT_WRITE, MAP_FLAGS,
               DEV_ZERO_FD, 0 );
 }
 
-static void Free_Addr_Block( VM_ADDR addr, SIZE sz )
+static void
+Free_Addr_Block (VM_ADDR addr, size_t sz)
 {
   munmap ((caddr_t) addr, sz );
 }
 {
   munmap ((caddr_t) addr, sz );
 }
@@ -1841,13 +1844,13 @@ static void Free_Addr_Block( VM_ADDR addr, SIZE sz )
 /* IMPLEMENTATION OF EXPORTED RELOCATOR INTERFACE */
 
 /*
 /* IMPLEMENTATION OF EXPORTED RELOCATOR INTERFACE */
 
 /*
- r_alloc( POINTER, SIZE ): Allocate a relocatable area with the start
+ r_alloc (POINTER, SIZE): Allocate a relocatable area with the start
  address aliased to the first parameter.
  */
 
  address aliased to the first parameter.
  */
 
-POINTER r_alloc (POINTER *ptr, SIZE size);
+POINTER r_alloc (POINTER *ptr, size_t size);
 POINTER
 POINTER
-r_alloc (POINTER *ptr, SIZE size)
+r_alloc (POINTER *ptr, size_t size)
 {
   MMAP_HANDLE mh;
 
 {
   MMAP_HANDLE mh;
 
@@ -1862,8 +1865,8 @@ r_alloc (POINTER *ptr, SIZE size)
       mh = new_mmap_handle( size );
       if (mh)
        {
       mh = new_mmap_handle( size );
       if (mh)
        {
-         SIZE hysteresis = (mmap_hysteresis > 0 ?  mmap_hysteresis  : 0);
-         SIZE  mmapped_size = ROUNDUP( size + hysteresis );
+         size_t hysteresis = (mmap_hysteresis > 0 ?  mmap_hysteresis  : 0);
+         size_t mmapped_size = ROUNDUP( size + hysteresis );
          MEMMETER( MVAL(M_Map)++ )
          MEMMETER( MVAL(M_Pages_Map) += (mmapped_size/page_size) )
          MEMMETER( MVAL(M_Wastage) += mmapped_size - size )
          MEMMETER( MVAL(M_Map)++ )
          MEMMETER( MVAL(M_Pages_Map) += (mmapped_size/page_size) )
          MEMMETER( MVAL(M_Wastage) += mmapped_size - size )
@@ -1931,9 +1934,9 @@ r_alloc_free (POINTER *ptr)
    If more memory cannot be allocated, then leave *PTR unchanged, and
    return zero.  */
 
    If more memory cannot be allocated, then leave *PTR unchanged, and
    return zero.  */
 
-POINTER r_re_alloc (POINTER *ptr, SIZE sz);
+POINTER r_re_alloc (POINTER *ptr, size_t sz);
 POINTER
 POINTER
-r_re_alloc (POINTER *ptr, SIZE sz)
+r_re_alloc (POINTER *ptr, size_t sz)
 {
   if (r_alloc_initialized == 0)
     {
 {
   if (r_alloc_initialized == 0)
     {
@@ -1949,8 +1952,8 @@ r_re_alloc (POINTER *ptr, SIZE sz)
     }
   else
     {
     }
   else
     {
-      SIZE hysteresis = (mmap_hysteresis > 0 ?  mmap_hysteresis : 0);
-      SIZE actual_sz = ROUNDUP( sz + hysteresis );
+      size_t hysteresis = (mmap_hysteresis > 0 ?  mmap_hysteresis : 0);
+      size_t actual_sz = ROUNDUP( sz + hysteresis );
       MMAP_HANDLE h = find_mmap_handle( ptr );
       VM_ADDR new_vm_addr;
 
       MMAP_HANDLE h = find_mmap_handle( ptr );
       VM_ADDR new_vm_addr;
 
index 8d5bdba..12b3bf3 100644 (file)
@@ -43,7 +43,7 @@ Lisp_Object Qrange_table;
 static Lisp_Object
 mark_range_table (Lisp_Object obj)
 {
 static Lisp_Object
 mark_range_table (Lisp_Object obj)
 {
-  struct Lisp_Range_Table *rt = XRANGE_TABLE (obj);
+  Lisp_Range_Table *rt = XRANGE_TABLE (obj);
   int i;
 
   for (i = 0; i < Dynarr_length (rt->entries); i++)
   int i;
 
   for (i = 0; i < Dynarr_length (rt->entries); i++)
@@ -54,7 +54,7 @@ mark_range_table (Lisp_Object obj)
 static void
 print_range_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
 static void
 print_range_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
-  struct Lisp_Range_Table *rt = XRANGE_TABLE (obj);
+  Lisp_Range_Table *rt = XRANGE_TABLE (obj);
   char buf[200];
   int i;
 
   char buf[200];
   int i;
 
@@ -77,8 +77,8 @@ print_range_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 static int
 range_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
 static int
 range_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  struct Lisp_Range_Table *rt1 = XRANGE_TABLE (obj1);
-  struct Lisp_Range_Table *rt2 = XRANGE_TABLE (obj2);
+  Lisp_Range_Table *rt1 = XRANGE_TABLE (obj1);
+  Lisp_Range_Table *rt2 = XRANGE_TABLE (obj2);
   int i;
 
   if (Dynarr_length (rt1->entries) != Dynarr_length (rt2->entries))
   int i;
 
   if (Dynarr_length (rt1->entries) != Dynarr_length (rt2->entries))
@@ -107,7 +107,7 @@ range_table_entry_hash (struct range_table_entry *rte, int depth)
 static unsigned long
 range_table_hash (Lisp_Object obj, int depth)
 {
 static unsigned long
 range_table_hash (Lisp_Object obj, int depth)
 {
-  struct Lisp_Range_Table *rt = XRANGE_TABLE (obj);
+  Lisp_Range_Table *rt = XRANGE_TABLE (obj);
   int i;
   int size = Dynarr_length (rt->entries);
   unsigned long hash = size;
   int i;
   int size = Dynarr_length (rt->entries);
   unsigned long hash = size;
@@ -133,27 +133,27 @@ range_table_hash (Lisp_Object obj, int depth)
 }
 
 static const struct lrecord_description rte_description_1[] = {
 }
 
 static const struct lrecord_description rte_description_1[] = {
-  { XD_LISP_OBJECT, offsetof(range_table_entry, val), 1 },
+  { XD_LISP_OBJECT, offsetof (range_table_entry, val) },
   { XD_END }
 };
 
 static const struct struct_description rte_description = {
   { XD_END }
 };
 
 static const struct struct_description rte_description = {
-  sizeof(range_table_entry),
+  sizeof (range_table_entry),
   rte_description_1
 };
 
 static const struct lrecord_description rted_description_1[] = {
   rte_description_1
 };
 
 static const struct lrecord_description rted_description_1[] = {
-  XD_DYNARR_DESC(range_table_entry_dynarr, &rte_description),
+  XD_DYNARR_DESC (range_table_entry_dynarr, &rte_description),
   { XD_END }
 };
 
 static const struct struct_description rted_description = {
   { XD_END }
 };
 
 static const struct struct_description rted_description = {
-  sizeof(range_table_entry_dynarr),
+  sizeof (range_table_entry_dynarr),
   rted_description_1
 };
 
 static const struct lrecord_description range_table_description[] = {
   rted_description_1
 };
 
 static const struct lrecord_description range_table_description[] = {
-  { XD_STRUCT_PTR,  offsetof(struct Lisp_Range_Table, entries),  1, &rted_description },
+  { XD_STRUCT_PTR,  offsetof (Lisp_Range_Table, entries),  1, &rted_description },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -161,7 +161,7 @@ DEFINE_LRECORD_IMPLEMENTATION ("range-table", range_table,
                                mark_range_table, print_range_table, 0,
                               range_table_equal, range_table_hash,
                               range_table_description,
                                mark_range_table, print_range_table, 0,
                               range_table_equal, range_table_hash,
                               range_table_description,
-                              struct Lisp_Range_Table);
+                              Lisp_Range_Table);
 \f
 /************************************************************************/
 /*                        Range table operations                        */
 \f
 /************************************************************************/
 /*                        Range table operations                        */
@@ -170,7 +170,7 @@ DEFINE_LRECORD_IMPLEMENTATION ("range-table", range_table,
 #ifdef ERROR_CHECK_TYPECHECK
 
 static void
 #ifdef ERROR_CHECK_TYPECHECK
 
 static void
-verify_range_table (struct Lisp_Range_Table *rt)
+verify_range_table (Lisp_Range_Table *rt)
 {
   int i;
 
 {
   int i;
 
@@ -233,8 +233,8 @@ You can manipulate it using `put-range-table', `get-range-table',
        ())
 {
   Lisp_Object obj;
        ())
 {
   Lisp_Object obj;
-  struct Lisp_Range_Table *rt = alloc_lcrecord_type (struct Lisp_Range_Table,
-                                                    &lrecord_range_table);
+  Lisp_Range_Table *rt = alloc_lcrecord_type (Lisp_Range_Table,
+                                             &lrecord_range_table);
   rt->entries = Dynarr_new (range_table_entry);
   XSETRANGE_TABLE (obj, rt);
   return obj;
   rt->entries = Dynarr_new (range_table_entry);
   XSETRANGE_TABLE (obj, rt);
   return obj;
@@ -246,13 +246,13 @@ ranges as the given table.  The values will not themselves be copied.
 */
        (old_table))
 {
 */
        (old_table))
 {
-  struct Lisp_Range_Table *rt, *rtnew;
+  Lisp_Range_Table *rt, *rtnew;
   Lisp_Object obj;
 
   CHECK_RANGE_TABLE (old_table);
   rt = XRANGE_TABLE (old_table);
 
   Lisp_Object obj;
 
   CHECK_RANGE_TABLE (old_table);
   rt = XRANGE_TABLE (old_table);
 
-  rtnew = alloc_lcrecord_type (struct Lisp_Range_Table, &lrecord_range_table);
+  rtnew = alloc_lcrecord_type (Lisp_Range_Table, &lrecord_range_table);
   rtnew->entries = Dynarr_new (range_table_entry);
 
   Dynarr_add_many (rtnew->entries, Dynarr_atp (rt->entries, 0),
   rtnew->entries = Dynarr_new (range_table_entry);
 
   Dynarr_add_many (rtnew->entries, Dynarr_atp (rt->entries, 0),
@@ -267,7 +267,7 @@ If there is no corresponding value, return DEFAULT (defaults to nil).
 */
        (pos, table, default_))
 {
 */
        (pos, table, default_))
 {
-  struct Lisp_Range_Table *rt;
+  Lisp_Range_Table *rt;
 
   CHECK_RANGE_TABLE (table);
   rt = XRANGE_TABLE (table);
 
   CHECK_RANGE_TABLE (table);
   rt = XRANGE_TABLE (table);
@@ -284,7 +284,7 @@ put_range_table (Lisp_Object table, EMACS_INT first,
 {
   int i;
   int insert_me_here = -1;
 {
   int i;
   int insert_me_here = -1;
-  struct Lisp_Range_Table *rt = XRANGE_TABLE (table);
+  Lisp_Range_Table *rt = XRANGE_TABLE (table);
 
   /* Now insert in the proper place.  This gets tricky because
      we may be overlapping one or more existing ranges and need
 
   /* Now insert in the proper place.  This gets tricky because
      we may be overlapping one or more existing ranges and need
index 0a3a21a..a5d4d44 100644 (file)
@@ -23,8 +23,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Extracted from rangetab.c by O. Galibert, 1998. */
 
 
 /* Extracted from rangetab.c by O. Galibert, 1998. */
 
-#ifndef _XEMACS_RANGETAB_H_
-#define _XEMACS_RANGETAB_H_
+#ifndef INCLUDED_rangetab_h_
+#define INCLUDED_rangetab_h_
 
 typedef struct range_table_entry range_table_entry;
 struct range_table_entry
 
 typedef struct range_table_entry range_table_entry;
 struct range_table_entry
@@ -44,12 +44,12 @@ struct Lisp_Range_Table
   struct lcrecord_header header;
   range_table_entry_dynarr *entries;
 };
   struct lcrecord_header header;
   range_table_entry_dynarr *entries;
 };
+typedef struct Lisp_Range_Table Lisp_Range_Table;
 
 
-DECLARE_LRECORD (range_table, struct Lisp_Range_Table);
-#define XRANGE_TABLE(x) \
-  XRECORD (x, range_table, struct Lisp_Range_Table)
+DECLARE_LRECORD (range_table, Lisp_Range_Table);
+#define XRANGE_TABLE(x) XRECORD (x, range_table, Lisp_Range_Table)
 #define XSETRANGE_TABLE(x, p) XSETRECORD (x, p, range_table)
 #define RANGE_TABLEP(x) RECORDP (x, range_table)
 #define CHECK_RANGE_TABLE(x) CHECK_RECORD (x, range_table)
 
 #define XSETRANGE_TABLE(x, p) XSETRECORD (x, p, range_table)
 #define RANGE_TABLEP(x) RECORDP (x, range_table)
 #define CHECK_RANGE_TABLE(x) CHECK_RECORD (x, range_table)
 
-#endif
+#endif /* INCLUDED_rangetab_h_ */
index f81bab6..b39257d 100644 (file)
@@ -43,20 +43,24 @@ Boston, MA 02111-1307, USA.  */
 
 #include <sys/stat.h>                  /* for S_IFLNK */
 
 
 #include <sys/stat.h>                  /* for S_IFLNK */
 
-#ifndef PATH_MAX
-#ifdef _POSIX_VERSION
-#define PATH_MAX _POSIX_PATH_MAX
-#else
-#ifdef MAXPATHLEN
-#define PATH_MAX MAXPATHLEN
-#else
-#define PATH_MAX 1024
-#endif
+#if !defined (HAVE_GETCWD) && defined (HAVE_GETWD)
+#undef getcwd
+#define getcwd(buffer, len) getwd (buffer)
 #endif
 #endif
+
+#ifndef PATH_MAX
+# if defined (_POSIX_PATH_MAX)
+#  define PATH_MAX _POSIX_PATH_MAX
+# elif defined (MAXPATHLEN)
+#  define PATH_MAX MAXPATHLEN
+# else
+#  define PATH_MAX 1024
+# endif
 #endif
 
 #define MAX_READLINKS 32
 
 #endif
 
 #define MAX_READLINKS 32
 
+char * xrealpath (const char *path, char resolved_path []);
 char *
 xrealpath (const char *path, char resolved_path [])
 {
 char *
 xrealpath (const char *path, char resolved_path [])
 {
@@ -99,7 +103,7 @@ xrealpath (const char *path, char resolved_path [])
   */
   else if (*path == '/')
     {
   */
   else if (*path == '/')
     {
-      getcwd(new_path, PATH_MAX - 1);
+      getcwd (new_path, PATH_MAX - 1);
       new_path += 3;
       path++;
     }
       new_path += 3;
       path++;
     }
@@ -109,21 +113,17 @@ xrealpath (const char *path, char resolved_path [])
   */
   else
     {
   */
   else
     {
-      getcwd(new_path, PATH_MAX - 1);
+      getcwd (new_path, PATH_MAX - 1);
       new_path += strlen(new_path);
       if (new_path[-1] != '/')
        *new_path++ = '/';
     }
 
 #else
       new_path += strlen(new_path);
       if (new_path[-1] != '/')
        *new_path++ = '/';
     }
 
 #else
-  /* If it's a relative pathname use getwd for starters. */
+  /* If it's a relative pathname use getcwd for starters. */
   if (*path != '/')
     {
   if (*path != '/')
     {
-#ifdef HAVE_GETCWD
-      getcwd(new_path, PATH_MAX - 1);
-#else
-      getwd(new_path);
-#endif
+      getcwd (new_path, PATH_MAX - 1);
       new_path += strlen(new_path);
       if (new_path[-1] != '/')
        *new_path++ = '/';
       new_path += strlen(new_path);
       if (new_path[-1] != '/')
        *new_path++ = '/';
index b9288e7..c3b55e0 100644 (file)
@@ -46,7 +46,6 @@ Boston, MA 02111-1307, USA.  */
 #include "sysdep.h"
 #include "window.h"
 
 #include "sysdep.h"
 #include "window.h"
 
-#include "windows.h"
 #ifdef MULE
 #include "mule-ccl.h"
 #include "mule-charset.h"
 #ifdef MULE
 #include "mule-ccl.h"
 #include "mule-charset.h"
@@ -57,13 +56,15 @@ Boston, MA 02111-1307, USA.  */
 /*
  * Random forward declarations
  */
 /*
  * Random forward declarations
  */
-static void mswindows_update_dc (HDC hdc, Lisp_Object font, Lisp_Object fg,
-                                Lisp_Object bg, Lisp_Object bg_pmap);
+static void mswindows_update_dc (HDC hdc, Lisp_Object fg, Lisp_Object bg,
+                                Lisp_Object bg_pmap);
+static void mswindows_set_dc_font (HDC hdc, Lisp_Object font,
+                                  int under, int strike);
 static void mswindows_output_vertical_divider (struct window *w, int clear);
 static void mswindows_redraw_exposed_windows (Lisp_Object window, int x,
                                        int y, int width, int height);
 static void mswindows_output_dibitmap (struct frame *f, 
 static void mswindows_output_vertical_divider (struct window *w, int clear);
 static void mswindows_redraw_exposed_windows (Lisp_Object window, int x,
                                        int y, int width, int height);
 static void mswindows_output_dibitmap (struct frame *f, 
-                                      struct Lisp_Image_Instance *p,
+                                      Lisp_Image_Instance *p,
                                       struct display_box* db,
                                       struct display_glyph_area* dga);
 
                                       struct display_box* db,
                                       struct display_glyph_area* dga);
 
@@ -183,7 +184,7 @@ mswindows_text_width_single_run (HDC hdc, struct face_cachel *cachel,
                                 textual_run *run)
 {
   Lisp_Object font_inst = FACE_CACHEL_FONT (cachel, run->charset);
                                 textual_run *run)
 {
   Lisp_Object font_inst = FACE_CACHEL_FONT (cachel, run->charset);
-  struct Lisp_Font_Instance *fi = XFONT_INSTANCE (font_inst);
+  Lisp_Font_Instance *fi = XFONT_INSTANCE (font_inst);
   SIZE size;
 
   if (!fi->proportional_p || !hdc)
   SIZE size;
 
   if (!fi->proportional_p || !hdc)
@@ -191,12 +192,38 @@ mswindows_text_width_single_run (HDC hdc, struct face_cachel *cachel,
   else
     {
       assert(run->dimension == 1);     /* #### FIXME! */
   else
     {
       assert(run->dimension == 1);     /* #### FIXME! */
-      mswindows_update_dc (hdc, font_inst, Qnil, Qnil, Qnil);
+      mswindows_set_dc_font (hdc, font_inst,
+                            cachel->underline, cachel->strikethru);
       GetTextExtentPoint32 (hdc, run->ptr, run->len, &size);
       return(size.cx);
     }
 }
 
       GetTextExtentPoint32 (hdc, run->ptr, run->len, &size);
       return(size.cx);
     }
 }
 
+/*
+ * Given F, retrieve device context. F can be a display frame, or
+ * a print job.
+ */
+static HDC
+get_frame_dc (struct frame *f)
+{
+  if (FRAME_MSWINDOWS_P (f))
+    return FRAME_MSWINDOWS_DC (f);
+  else
+    return DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f)));
+}
+
+/*
+ * Given F, retrieve compatible device context. F can be a display
+ * frame, or a print job.
+ */
+static HDC
+get_frame_compdc (struct frame *f)
+{
+  if (FRAME_MSWINDOWS_P (f))
+    return FRAME_MSWINDOWS_CDC (f);
+  else
+    return FRAME_MSPRINTER_CDC (f);
+}
 
 /*****************************************************************************
  mswindows_update_dc
 
 /*****************************************************************************
  mswindows_update_dc
@@ -204,18 +231,15 @@ mswindows_text_width_single_run (HDC hdc, struct face_cachel *cachel,
  Given a number of parameters munge the DC so it has those properties.
  ****************************************************************************/
 static void
  Given a number of parameters munge the DC so it has those properties.
  ****************************************************************************/
 static void
-mswindows_update_dc (HDC hdc, Lisp_Object font, Lisp_Object fg,
-                    Lisp_Object bg, Lisp_Object bg_pmap)
+mswindows_update_dc (HDC hdc, Lisp_Object fg, Lisp_Object bg,
+                    Lisp_Object bg_pmap)
 {
 {
-  if (!NILP (font))
-    SelectObject(hdc, FONT_INSTANCE_MSWINDOWS_HFONT (XFONT_INSTANCE (font)));
-
-
   if (!NILP (fg))
     {
       SetTextColor (hdc, COLOR_INSTANCE_MSWINDOWS_COLOR 
                    (XCOLOR_INSTANCE (fg)));
     }
   if (!NILP (fg))
     {
       SetTextColor (hdc, COLOR_INSTANCE_MSWINDOWS_COLOR 
                    (XCOLOR_INSTANCE (fg)));
     }
+
   if (!NILP (bg))
     { 
       SetBkMode (hdc, OPAQUE);
   if (!NILP (bg))
     { 
       SetBkMode (hdc, OPAQUE);
@@ -227,54 +251,13 @@ mswindows_update_dc (HDC hdc, Lisp_Object font, Lisp_Object fg,
     }
 }
 
     }
 }
 
-
-/*****************************************************************************
- mswindows_apply_face_effects
-
- Draw underline and strikeout as if this was X.
- #### On mswindows this really should be done as part of drawing the font.
- The line width used is chosen arbitrarily from the font height.
- ****************************************************************************/
-static void
-mswindows_apply_face_effects (HDC hdc, struct display_line *dl, int xpos,
-                             int width, struct Lisp_Font_Instance *fi,
-                             struct face_cachel *cachel,
-                             struct face_cachel *color_cachel)
+static void mswindows_set_dc_font (HDC hdc, Lisp_Object font,
+                                  int under, int strike)
 {
 {
-  int yclip;
-  HBRUSH brush, oldbrush;
-  RECT rect;
-
-  brush = CreateSolidBrush (COLOR_INSTANCE_MSWINDOWS_COLOR (
-                           XCOLOR_INSTANCE (color_cachel->foreground)));
-  if (brush)
-    {
-      yclip = dl->ypos + dl->descent - dl->clip;
-      rect.left = xpos;
-      rect.right = xpos + width;
-      oldbrush = SelectObject (hdc, brush);
-
-      if (cachel->underline)
-       {
-         rect.top = dl->ypos + dl->descent/2;
-         rect.bottom = rect.top + (fi->height >= 0x20 ? 2 : 1);
-         if (rect.bottom <= yclip)
-           FillRect (hdc, &rect, brush);
-       }
-      if (cachel->strikethru)
-       {
-         rect.top = dl->ypos + dl->descent - (dl->ascent + dl->descent)/2;
-         rect.bottom = rect.top + (fi->height >= 0x20 ? 2 : 1);
-         if (rect.bottom <= yclip)
-           FillRect (hdc, &rect, brush);
-       }
-
-      SelectObject (hdc, oldbrush);
-      DeleteObject (brush);
-    }
+  SelectObject(hdc, mswindows_get_hfont (XFONT_INSTANCE (font),
+                                        under, strike));
 }
 
 }
 
-
 /*****************************************************************************
  mswindows_output_hline
 
 /*****************************************************************************
  mswindows_output_hline
 
@@ -297,6 +280,7 @@ mswindows_output_blank (struct window *w, struct display_line *dl,
                        struct rune *rb, int start_pixpos)
 {
   struct frame *f = XFRAME (w->frame);
                        struct rune *rb, int start_pixpos)
 {
   struct frame *f = XFRAME (w->frame);
+  HDC hdc = get_frame_dc (f);
   RECT rect = { rb->xpos, DISPLAY_LINE_YPOS (dl),
                rb->xpos+rb->width, 
                DISPLAY_LINE_YEND (dl) };
   RECT rect = { rb->xpos, DISPLAY_LINE_YPOS (dl),
                rb->xpos+rb->width, 
                DISPLAY_LINE_YEND (dl) };
@@ -321,18 +305,15 @@ mswindows_output_blank (struct window *w, struct display_line *dl,
                                         start_pixpos, rb->width,
                                         &db, &dga);
       /* blank the background in the appropriate color */
                                         start_pixpos, rb->width,
                                         &db, &dga);
       /* blank the background in the appropriate color */
-      mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, cachel->foreground,
+      mswindows_update_dc (hdc, cachel->foreground,
                           cachel->background, Qnil);
       redisplay_output_pixmap (w, bg_pmap, &db, &dga, rb->findex,
                               0, 0, 0, TRUE);
     }
   else 
     {
                           cachel->background, Qnil);
       redisplay_output_pixmap (w, bg_pmap, &db, &dga, rb->findex,
                               0, 0, 0, TRUE);
     }
   else 
     {
-      mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, Qnil,
-                          cachel->background, Qnil);
-      
-      ExtTextOut (FRAME_MSWINDOWS_DC (f), 0, 0, ETO_OPAQUE, 
-                 &rect, NULL, 0, NULL);
+      mswindows_update_dc (hdc, Qnil, cachel->background, Qnil);
+      ExtTextOut (hdc, 0, 0, ETO_OPAQUE, &rect, NULL, 0, NULL);
     }
 }
 
     }
 }
 
@@ -352,8 +333,8 @@ mswindows_output_cursor (struct window *w, struct display_line *dl, int xpos,
   struct face_cachel *cachel=0;
   Lisp_Object font = Qnil;
   int focus = EQ (w->frame, DEVICE_FRAME_WITH_FOCUS_REAL (d));
   struct face_cachel *cachel=0;
   Lisp_Object font = Qnil;
   int focus = EQ (w->frame, DEVICE_FRAME_WITH_FOCUS_REAL (d));
-  HDC hdc = FRAME_MSWINDOWS_DC (f);
-  unsigned int face_index=0;
+  HDC hdc = get_frame_dc (f);
+  unsigned int local_face_index=0;
   char *p_char = NULL;
   int n_char = 0;
   RECT rect = { xpos,
   char *p_char = NULL;
   int n_char = 0;
   RECT rect = { xpos,
@@ -392,16 +373,16 @@ mswindows_output_cursor (struct window *w, struct display_line *dl, int xpos,
       /* Use cursor fg/bg for block cursor, or character fg/bg for the bar
         or when we need to erase the cursor. Output nothing at eol if bar
         cursor */
       /* Use cursor fg/bg for block cursor, or character fg/bg for the bar
         or when we need to erase the cursor. Output nothing at eol if bar
         cursor */
-      face_index = get_builtin_face_cache_index (w, Vtext_cursor_face);
+      local_face_index = get_builtin_face_cache_index (w, Vtext_cursor_face);
       color_cachel = WINDOW_FACE_CACHEL (w, ((!cursor_p || bar_p) ?
       color_cachel = WINDOW_FACE_CACHEL (w, ((!cursor_p || bar_p) ?
-                                            findex : face_index));
-      mswindows_update_dc (hdc, font, color_cachel->foreground,
+                                            findex : local_face_index));
+      mswindows_update_dc (hdc, color_cachel->foreground,
                           color_cachel->background, Qnil);
                           color_cachel->background, Qnil);
+      if (real_char_p)
+        mswindows_set_dc_font (hdc, font,
+                              cachel->underline, cachel->strikethru);
+
       ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE|ETO_CLIPPED, &rect, p_char, n_char, NULL);
       ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE|ETO_CLIPPED, &rect, p_char, n_char, NULL);
-      if (real_char_p && (cachel->underline || cachel->strikethru))
-        mswindows_apply_face_effects (hdc, dl, xpos, width,
-                                     XFONT_INSTANCE (font),
-                                     cachel, color_cachel);
     }
 
   if (!cursor_p)
     }
 
   if (!cursor_p)
@@ -410,9 +391,9 @@ mswindows_output_cursor (struct window *w, struct display_line *dl, int xpos,
   if (focus && bar_p)
     {
       rect.right = rect.left + (EQ (bar, Qt) ? 1 : min (2, width));
   if (focus && bar_p)
     {
       rect.right = rect.left + (EQ (bar, Qt) ? 1 : min (2, width));
-      face_index = get_builtin_face_cache_index (w, Vtext_cursor_face);
-      cachel = WINDOW_FACE_CACHEL (w, face_index);
-      mswindows_update_dc (hdc, Qnil, Qnil, cachel->background, Qnil);
+      local_face_index = get_builtin_face_cache_index (w, Vtext_cursor_face);
+      cachel = WINDOW_FACE_CACHEL (w, local_face_index);
+      mswindows_update_dc (hdc, Qnil, cachel->background, Qnil);
       ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE, &rect, NULL, 0, NULL);
     }
   else if (!focus)
       ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE, &rect, NULL, 0, NULL);
     }
   else if (!focus)
@@ -428,16 +409,12 @@ mswindows_output_cursor (struct window *w, struct display_line *dl, int xpos,
          n_char = 1;
        }
 
          n_char = 1;
        }
 
-      face_index = get_builtin_face_cache_index (w, Vdefault_face);
-      cachel = WINDOW_FACE_CACHEL (w, (real_char_p ? findex : face_index));
-      mswindows_update_dc (hdc, Qnil, cachel->foreground,
-                          cachel->background, Qnil);
+      local_face_index = get_builtin_face_cache_index (w, Vdefault_face);
+      cachel = WINDOW_FACE_CACHEL (w, (real_char_p ? findex : local_face_index));
+      mswindows_update_dc (hdc, 
+                          cachel->foreground, cachel->background, Qnil);
       ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE | ETO_CLIPPED,
                  &rect, p_char, n_char, NULL);
       ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE | ETO_CLIPPED,
                  &rect, p_char, n_char, NULL);
-      if (cachel->underline || cachel->strikethru)
-        mswindows_apply_face_effects (hdc, dl, xpos+1, width-2,
-                                     XFONT_INSTANCE (font),
-                                     cachel, cachel);
     }
 }
 
     }
 }
 
@@ -466,7 +443,7 @@ mswindows_output_cursor (struct window *w, struct display_line *dl, int xpos,
  FINDEX                Index for the face cache element describing how to display
                the text.
  ****************************************************************************/
  FINDEX                Index for the face cache element describing how to display
                the text.
  ****************************************************************************/
-void
+static void
 mswindows_output_string (struct window *w, struct display_line *dl,
                         Emchar_dynarr *buf, int xpos, int xoffset, int clip_start,
                         int width, face_index findex,
 mswindows_output_string (struct window *w, struct display_line *dl,
                         Emchar_dynarr *buf, int xpos, int xoffset, int clip_start,
                         int width, face_index findex,
@@ -476,7 +453,7 @@ mswindows_output_string (struct window *w, struct display_line *dl,
   struct frame *f = XFRAME (w->frame);
   /* struct device *d = XDEVICE (f->device);*/
   Lisp_Object window;
   struct frame *f = XFRAME (w->frame);
   /* struct device *d = XDEVICE (f->device);*/
   Lisp_Object window;
-  HDC hdc = FRAME_MSWINDOWS_DC (f);
+  HDC hdc = get_frame_dc (f);
   int clip_end;
   Lisp_Object bg_pmap;
   int len = Dynarr_length (buf);
   int clip_end;
   Lisp_Object bg_pmap;
   int len = Dynarr_length (buf);
@@ -531,8 +508,8 @@ mswindows_output_string (struct window *w, struct display_line *dl,
       redisplay_calculate_display_boxes (dl, xpos + xoffset, 0,
                                         clip_start, width, &db, &dga);
       /* blank the background in the appropriate color */
       redisplay_calculate_display_boxes (dl, xpos + xoffset, 0,
                                         clip_start, width, &db, &dga);
       /* blank the background in the appropriate color */
-      mswindows_update_dc (hdc, Qnil, cachel->foreground,
-                          cachel->background, Qnil);
+      mswindows_update_dc (hdc,
+                          cachel->foreground, cachel->background, Qnil);
       redisplay_output_pixmap (w, bg_pmap, &db, &dga, findex,
                               0, 0, 0, TRUE);
       /* output pixmap calls this so we have to recall to get correct
       redisplay_output_pixmap (w, bg_pmap, &db, &dga, findex,
                               0, 0, 0, TRUE);
       /* output pixmap calls this so we have to recall to get correct
@@ -546,14 +523,15 @@ mswindows_output_string (struct window *w, struct display_line *dl,
   for (i = 0; i < nruns; i++)
     {
       Lisp_Object font = FACE_CACHEL_FONT (cachel, runs[i].charset);
   for (i = 0; i < nruns; i++)
     {
       Lisp_Object font = FACE_CACHEL_FONT (cachel, runs[i].charset);
-      struct Lisp_Font_Instance *fi = XFONT_INSTANCE (font);
+      Lisp_Font_Instance *fi = XFONT_INSTANCE (font);
       int this_width;
 
       if (EQ (font, Vthe_null_font_instance))
        continue;
 
       int this_width;
 
       if (EQ (font, Vthe_null_font_instance))
        continue;
 
-      mswindows_update_dc (hdc, font, cachel->foreground,
+      mswindows_update_dc (hdc, cachel->foreground,
                           NILP(bg_pmap) ? cachel->background : Qnil, Qnil);
                           NILP(bg_pmap) ? cachel->background : Qnil, Qnil);
+      mswindows_set_dc_font (hdc, font, cachel->underline, cachel->strikethru);
 
       this_width = mswindows_text_width_single_run (hdc, cachel, runs + i);
       
 
       this_width = mswindows_text_width_single_run (hdc, cachel, runs + i);
       
@@ -579,21 +557,17 @@ mswindows_output_string (struct window *w, struct display_line *dl,
                  NILP(bg_pmap) ? ETO_CLIPPED | ETO_OPAQUE : ETO_CLIPPED,
                  &rect, (char *) runs[i].ptr, runs[i].len, NULL); 
 
                  NILP(bg_pmap) ? ETO_CLIPPED | ETO_OPAQUE : ETO_CLIPPED,
                  &rect, (char *) runs[i].ptr, runs[i].len, NULL); 
 
-      /* #### X does underline/strikethrough here so we do the same.
-        On mswindows, underline/strikethrough really belongs to the font */
-      if (cachel->underline || cachel->strikethru)
-        mswindows_apply_face_effects (hdc, dl, xpos, this_width, fi,
-                                     cachel, cachel);
       xpos += this_width;
     }
 }
 
 static void
       xpos += this_width;
     }
 }
 
 static void
-mswindows_output_dibitmap (struct frame *f, struct Lisp_Image_Instance *p,
+mswindows_output_dibitmap (struct frame *f, Lisp_Image_Instance *p,
                           struct display_box* db,
                           struct display_glyph_area* dga)
 {
                           struct display_box* db,
                           struct display_glyph_area* dga)
 {
-  HDC hdc = FRAME_MSWINDOWS_DC (f);
+  HDC hdc = get_frame_dc (f);
+  HDC hcompdc = get_frame_compdc (f);
   HGDIOBJ old=NULL;
   COLORREF bgcolor = GetBkColor (hdc);
 
   HGDIOBJ old=NULL;
   COLORREF bgcolor = GetBkColor (hdc);
 
@@ -606,34 +580,33 @@ mswindows_output_dibitmap (struct frame *f, struct Lisp_Image_Instance *p,
       col.rgbGreen = GetGValue (bgcolor);
       col.rgbReserved = 0;
 
       col.rgbGreen = GetGValue (bgcolor);
       col.rgbReserved = 0;
 
-      old = SelectObject (FRAME_MSWINDOWS_CDC (f),
-                         IMAGE_INSTANCE_MSWINDOWS_MASK (p));
+      old = SelectObject (hcompdc, IMAGE_INSTANCE_MSWINDOWS_MASK (p));
       
       
-      SetDIBColorTable (FRAME_MSWINDOWS_CDC (f), 1, 1, &col);
+      SetDIBColorTable (hcompdc, 1, 1, &col);
 
       BitBlt (hdc, 
              db->xpos, db->ypos,
              dga->width, dga->height, 
 
       BitBlt (hdc, 
              db->xpos, db->ypos,
              dga->width, dga->height, 
-             FRAME_MSWINDOWS_CDC (f),
+             hcompdc,
              dga->xoffset, dga->yoffset, 
              SRCCOPY);                  
 
              dga->xoffset, dga->yoffset, 
              SRCCOPY);                  
 
-      SelectObject (FRAME_MSWINDOWS_CDC (f), old);
+      SelectObject (hcompdc, old);
     }
   
   /* Now blt the bitmap itself, or one of its slices. */
     }
   
   /* Now blt the bitmap itself, or one of its slices. */
-  old = SelectObject (FRAME_MSWINDOWS_CDC (f),
+  old = SelectObject (hcompdc,
                      IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE 
                      (p, IMAGE_INSTANCE_PIXMAP_SLICE (p)));
 
   BitBlt (hdc, 
          db->xpos, db->ypos,
          dga->width, dga->height,
                      IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE 
                      (p, IMAGE_INSTANCE_PIXMAP_SLICE (p)));
 
   BitBlt (hdc, 
          db->xpos, db->ypos,
          dga->width, dga->height,
-         FRAME_MSWINDOWS_CDC (f),
+         hcompdc,
          dga->xoffset, dga->yoffset, 
          IMAGE_INSTANCE_MSWINDOWS_MASK (p) ? SRCINVERT : SRCCOPY);
 
          dga->xoffset, dga->yoffset, 
          IMAGE_INSTANCE_MSWINDOWS_MASK (p) ? SRCINVERT : SRCCOPY);
 
-  SelectObject (FRAME_MSWINDOWS_CDC (f),old);
+  SelectObject (hcompdc, old);
 }
 
 /* X gc's have this nice property that setting the bg pixmap will
 }
 
 /* X gc's have this nice property that setting the bg pixmap will
@@ -643,7 +616,7 @@ mswindows_output_dibitmap (struct frame *f, struct Lisp_Image_Instance *p,
  * outputted once and are scrollable */
 static void
 mswindows_output_dibitmap_region (struct frame *f, 
  * outputted once and are scrollable */
 static void
 mswindows_output_dibitmap_region (struct frame *f, 
-                                 struct Lisp_Image_Instance *p,
+                                 Lisp_Image_Instance *p,
                                  struct display_box *db,
                                  struct display_glyph_area *dga)
 {
                                  struct display_box *db,
                                  struct display_glyph_area *dga)
 {
@@ -702,16 +675,16 @@ mswindows_output_pixmap (struct window *w, Lisp_Object image_instance,
                         int cursor_height, int bg_pixmap)
 {
   struct frame *f = XFRAME (w->frame);
                         int cursor_height, int bg_pixmap)
 {
   struct frame *f = XFRAME (w->frame);
-  HDC hdc = FRAME_MSWINDOWS_DC (f);
+  HDC hdc = get_frame_dc (f);
 
 
-  struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
   Lisp_Object window;
 
   XSETWINDOW (window, w);
 
   /* Output the pixmap. Have to do this as many times as is required
    to fill the given area */
   Lisp_Object window;
 
   XSETWINDOW (window, w);
 
   /* Output the pixmap. Have to do this as many times as is required
    to fill the given area */
-  mswindows_update_dc (hdc, Qnil,
+  mswindows_update_dc (hdc,
                       WINDOW_FACE_CACHEL_FOREGROUND (w, findex),
                       WINDOW_FACE_CACHEL_BACKGROUND (w, findex), Qnil);
 
                       WINDOW_FACE_CACHEL_FOREGROUND (w, findex),
                       WINDOW_FACE_CACHEL_BACKGROUND (w, findex), Qnil);
 
@@ -753,7 +726,7 @@ mswindows_redisplay_deadbox_maybe (struct window *w, CONST RECT* prc)
   if (IntersectRect (&rect_paint, &rect_dead, prc))
     {
       struct frame *f = XFRAME (WINDOW_FRAME (w));
   if (IntersectRect (&rect_paint, &rect_dead, prc))
     {
       struct frame *f = XFRAME (WINDOW_FRAME (w));
-      FillRect (FRAME_MSWINDOWS_DC (f), &rect_paint,
+      FillRect (get_frame_dc (f), &rect_paint,
                (HBRUSH) (COLOR_BTNFACE+1));
     }
 }
                (HBRUSH) (COLOR_BTNFACE+1));
     }
 }
@@ -932,9 +905,10 @@ mswindows_bevel_area (struct window *w, face_index findex, int x, int y,
   {
     RECT rect = { x, y, x + width, y + height };
     Lisp_Object color = WINDOW_FACE_CACHEL_BACKGROUND (w, findex);
   {
     RECT rect = { x, y, x + width, y + height };
     Lisp_Object color = WINDOW_FACE_CACHEL_BACKGROUND (w, findex);
-    mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, Qnil, color, Qnil);
+    HDC hdc = get_frame_dc (f);
 
 
-    DrawEdge (FRAME_MSWINDOWS_DC (f), &rect, edge, border);
+    mswindows_update_dc (hdc, Qnil, color, Qnil);
+    DrawEdge (hdc, &rect, edge, border);
   }
 }
 
   }
 }
 
@@ -990,13 +964,14 @@ static int
 mswindows_flash (struct device *d)
 {
   struct frame *f = device_selected_frame (d);
 mswindows_flash (struct device *d)
 {
   struct frame *f = device_selected_frame (d);
+  HDC hdc = get_frame_dc (f);
   RECT rc;
 
   GetClientRect (FRAME_MSWINDOWS_HANDLE (f), &rc);
   RECT rc;
 
   GetClientRect (FRAME_MSWINDOWS_HANDLE (f), &rc);
-  InvertRect (FRAME_MSWINDOWS_DC (f), &rc);
+  InvertRect (hdc, &rc);
   GdiFlush ();
   Sleep (25);
   GdiFlush ();
   Sleep (25);
-  InvertRect (FRAME_MSWINDOWS_DC (f), &rc);
+  InvertRect (hdc, &rc);
 
   return 1;
 }
 
   return 1;
 }
@@ -1139,11 +1114,11 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b
          else if (rb->type == RUNE_DGLYPH)
            {
              Lisp_Object instance;
          else if (rb->type == RUNE_DGLYPH)
            {
              Lisp_Object instance;
-             struct display_box db;
+             struct display_box dbox;
              struct display_glyph_area dga;
              redisplay_calculate_display_boxes (dl, rb->xpos, rb->object.dglyph.xoffset,
                                                 start_pixpos, rb->width,
              struct display_glyph_area dga;
              redisplay_calculate_display_boxes (dl, rb->xpos, rb->object.dglyph.xoffset,
                                                 start_pixpos, rb->width,
-                                                &db, &dga);
+                                                &dbox, &dga);
 
              XSETWINDOW (window, w);
              instance = glyph_image_instance (rb->object.dglyph.glyph,
 
              XSETWINDOW (window, w);
              instance = glyph_image_instance (rb->object.dglyph.glyph,
@@ -1176,7 +1151,7 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b
 
                  case IMAGE_MONO_PIXMAP:
                  case IMAGE_COLOR_PIXMAP:
 
                  case IMAGE_MONO_PIXMAP:
                  case IMAGE_COLOR_PIXMAP:
-                   redisplay_output_pixmap (w, instance, &db, &dga, findex,
+                   redisplay_output_pixmap (w, instance, &dbox, &dga, findex,
                                             cursor_start, cursor_width,
                                             cursor_height, 0);
                    if (rb->cursor_type == CURSOR_ON)
                                             cursor_start, cursor_width,
                                             cursor_height, 0);
                    if (rb->cursor_type == CURSOR_ON)
@@ -1189,7 +1164,7 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b
 
                  case IMAGE_SUBWINDOW:
                  case IMAGE_WIDGET:
 
                  case IMAGE_SUBWINDOW:
                  case IMAGE_WIDGET:
-                   redisplay_output_subwindow (w, instance, &db, &dga, findex,
+                   redisplay_output_subwindow (w, instance, &dbox, &dga, findex,
                                                cursor_start, cursor_width,
                                                cursor_height);
                    if (rb->cursor_type == CURSOR_ON)
                                                cursor_start, cursor_width,
                                                cursor_height);
                    if (rb->cursor_type == CURSOR_ON)
@@ -1198,7 +1173,7 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b
                    break;
 
                  case IMAGE_LAYOUT:
                    break;
 
                  case IMAGE_LAYOUT:
-                   redisplay_output_layout (w, instance, &db, &dga, findex,
+                   redisplay_output_layout (w, instance, &dbox, &dga, findex,
                                             cursor_start, cursor_width,
                                             cursor_height);
                    if (rb->cursor_type == CURSOR_ON)
                                             cursor_start, cursor_width,
                                             cursor_height);
                    if (rb->cursor_type == CURSOR_ON)
@@ -1246,6 +1221,7 @@ static void
 mswindows_output_vertical_divider (struct window *w, int clear_unused)
 {
   struct frame *f = XFRAME (w->frame);
 mswindows_output_vertical_divider (struct window *w, int clear_unused)
 {
   struct frame *f = XFRAME (w->frame);
+  HDC hdc = get_frame_dc (f);
   RECT rect;
   int spacing = XINT (w->vertical_divider_spacing);
   int shadow = XINT (w->vertical_divider_shadow_thickness);
   RECT rect;
   int spacing = XINT (w->vertical_divider_spacing);
   int shadow = XINT (w->vertical_divider_shadow_thickness);
@@ -1260,15 +1236,15 @@ mswindows_output_vertical_divider (struct window *w, int clear_unused)
     {
       rect.top = y1;
       rect.bottom = y2;
     {
       rect.top = y1;
       rect.bottom = y2;
-      mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, Qnil,
+      mswindows_update_dc (hdc, Qnil,
                   WINDOW_FACE_CACHEL_BACKGROUND (w, DEFAULT_INDEX), Qnil);
       rect.right = WINDOW_RIGHT (w);
       rect.left = rect.right - spacing;
                   WINDOW_FACE_CACHEL_BACKGROUND (w, DEFAULT_INDEX), Qnil);
       rect.right = WINDOW_RIGHT (w);
       rect.left = rect.right - spacing;
-      ExtTextOut (FRAME_MSWINDOWS_DC (f), 0, 0, ETO_OPAQUE, 
+      ExtTextOut (hdc, 0, 0, ETO_OPAQUE, 
                  &rect, NULL, 0, NULL);
       rect.left = div_left;
       rect.right = div_left + spacing;
                  &rect, NULL, 0, NULL);
       rect.left = div_left;
       rect.right = div_left + spacing;
-      ExtTextOut (FRAME_MSWINDOWS_DC (f), 0, 0, ETO_OPAQUE, 
+      ExtTextOut (hdc, 0, 0, ETO_OPAQUE, 
                  &rect, NULL, 0, NULL);
     }
   
                  &rect, NULL, 0, NULL);
     }
   
@@ -1281,10 +1257,9 @@ mswindows_output_vertical_divider (struct window *w, int clear_unused)
     {
       face_index div_face
        = get_builtin_face_cache_index (w, Vvertical_divider_face);
     {
       face_index div_face
        = get_builtin_face_cache_index (w, Vvertical_divider_face);
-      mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, Qnil,
+      mswindows_update_dc (hdc, Qnil,
                   WINDOW_FACE_CACHEL_BACKGROUND (w, div_face), Qnil);
                   WINDOW_FACE_CACHEL_BACKGROUND (w, div_face), Qnil);
-      ExtTextOut (FRAME_MSWINDOWS_DC (f), 0, 0, ETO_OPAQUE, 
-                 &rect, NULL, 0, NULL);
+      ExtTextOut (hdc, 0, 0, ETO_OPAQUE, &rect, NULL, 0, NULL);
     }
 
   /* Draw a shadow around the divider */
     }
 
   /* Draw a shadow around the divider */
@@ -1292,7 +1267,7 @@ mswindows_output_vertical_divider (struct window *w, int clear_unused)
     {
       /* #### This will be fixed to support arbitrary thickness */
       InflateRect (&rect, abs_shadow, abs_shadow);
     {
       /* #### This will be fixed to support arbitrary thickness */
       InflateRect (&rect, abs_shadow, abs_shadow);
-      DrawEdge (FRAME_MSWINDOWS_DC (f), &rect,
+      DrawEdge (hdc, &rect,
                shadow > 0 ? EDGE_RAISED : EDGE_SUNKEN, BF_RECT);
     }
 }
                shadow > 0 ? EDGE_RAISED : EDGE_SUNKEN, BF_RECT);
     }
 }
@@ -1307,6 +1282,7 @@ static int
 mswindows_text_width (struct frame *f, struct face_cachel *cachel,
                      CONST Emchar *str, Charcount len)
 {
 mswindows_text_width (struct frame *f, struct face_cachel *cachel,
                      CONST Emchar *str, Charcount len)
 {
+  HDC hdc = get_frame_dc (f);
   int width_so_far = 0;
   unsigned char *text_storage = (unsigned char *) alloca (2 * len);
   textual_run *runs = alloca_array (textual_run, len);
   int width_so_far = 0;
   unsigned char *text_storage = (unsigned char *) alloca (2 * len);
   textual_run *runs = alloca_array (textual_run, len);
@@ -1316,7 +1292,7 @@ mswindows_text_width (struct frame *f, struct face_cachel *cachel,
   nruns = separate_textual_runs (text_storage, runs, str, len);
 
   for (i = 0; i < nruns; i++)
   nruns = separate_textual_runs (text_storage, runs, str, len);
 
   for (i = 0; i < nruns; i++)
-    width_so_far += mswindows_text_width_single_run (FRAME_MSWINDOWS_DC (f),
+    width_so_far += mswindows_text_width_single_run (hdc,
                                                     cachel, runs + i);
 
   return width_so_far;
                                                     cachel, runs + i);
 
   return width_so_far;
@@ -1336,19 +1312,20 @@ mswindows_clear_region (Lisp_Object locale, struct device* d, struct frame* f,
                        Lisp_Object background_pixmap)
 {
   RECT rect = { x, y, x+width, y+height };
                        Lisp_Object background_pixmap)
 {
   RECT rect = { x, y, x+width, y+height };
+  HDC hdc = get_frame_dc (f);
 
   if (!NILP (background_pixmap))
     {
       struct display_box db = { x, y, width, height };
 
   if (!NILP (background_pixmap))
     {
       struct display_box db = { x, y, width, height };
-      mswindows_update_dc (FRAME_MSWINDOWS_DC (f),
-                          Qnil, fcolor, bcolor, background_pixmap);
+      mswindows_update_dc (hdc,
+                          fcolor, bcolor, background_pixmap);
       mswindows_output_dibitmap_region 
        ( f, XIMAGE_INSTANCE (background_pixmap), &db, 0);
     }
   else
     {
       mswindows_output_dibitmap_region 
        ( f, XIMAGE_INSTANCE (background_pixmap), &db, 0);
     }
   else
     {
-      mswindows_update_dc (FRAME_MSWINDOWS_DC (f), Qnil, Qnil, fcolor, Qnil);
-      ExtTextOut (FRAME_MSWINDOWS_DC (f), 0, 0, ETO_OPAQUE, 
+      mswindows_update_dc (hdc, Qnil, fcolor, Qnil);
+      ExtTextOut (hdc, 0, 0, ETO_OPAQUE, 
                  &rect, NULL, 0, NULL);
     }
 
                  &rect, NULL, 0, NULL);
     }
 
@@ -1374,7 +1351,7 @@ mswindows_clear_frame (struct frame *f)
 void
 console_type_create_redisplay_mswindows (void)
 {
 void
 console_type_create_redisplay_mswindows (void)
 {
-  /* redisplay methods */
+  /* redisplay methods - display*/
   CONSOLE_HAS_METHOD (mswindows, text_width);
   CONSOLE_HAS_METHOD (mswindows, output_display_block);
   CONSOLE_HAS_METHOD (mswindows, divider_height);
   CONSOLE_HAS_METHOD (mswindows, text_width);
   CONSOLE_HAS_METHOD (mswindows, output_display_block);
   CONSOLE_HAS_METHOD (mswindows, divider_height);
@@ -1389,4 +1366,18 @@ console_type_create_redisplay_mswindows (void)
   CONSOLE_HAS_METHOD (mswindows, bevel_area);
   CONSOLE_HAS_METHOD (mswindows, output_string);
   CONSOLE_HAS_METHOD (mswindows, output_pixmap);
   CONSOLE_HAS_METHOD (mswindows, bevel_area);
   CONSOLE_HAS_METHOD (mswindows, output_string);
   CONSOLE_HAS_METHOD (mswindows, output_pixmap);
+
+  /* redisplay methods - printer */
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, text_width);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_display_block);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, divider_height);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, eol_cursor_width);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_vertical_divider);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, clear_region);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, clear_frame);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_begin);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_end);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, bevel_area);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_string);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_pixmap);
 }
 }
index 8f41eff..0756eed 100644 (file)
@@ -1157,7 +1157,7 @@ redisplay_output_subwindow (struct window *w,
                            face_index findex, int cursor_start, int cursor_width,
                            int cursor_height)
 {
                            face_index findex, int cursor_start, int cursor_width,
                            int cursor_height)
 {
-  struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
   Lisp_Object window;
   struct display_glyph_area sdga;
 
   Lisp_Object window;
   struct display_glyph_area sdga;
 
@@ -1214,7 +1214,7 @@ redisplay_output_layout (struct window *w,
                         face_index findex, int cursor_start, int cursor_width,
                         int cursor_height)
 {
                         face_index findex, int cursor_start, int cursor_width,
                         int cursor_height)
 {
-  struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
   Lisp_Object window, rest;
   Emchar_dynarr *buf = Dynarr_new (Emchar);
   struct frame *f = XFRAME (w->frame);
   Lisp_Object window, rest;
   Emchar_dynarr *buf = Dynarr_new (Emchar);
   struct frame *f = XFRAME (w->frame);
@@ -1222,7 +1222,7 @@ redisplay_output_layout (struct window *w,
   int layout_height, layout_width;
   /* We bogusly don't take f->extents_changed and f->glyphs_changed
      into account. This is because if we do we always redisplay the
   int layout_height, layout_width;
   /* We bogusly don't take f->extents_changed and f->glyphs_changed
      into account. This is because if we do we always redisplay the
-     entire layout. So far I have seen no ill effects to we'll see. */
+     entire layout. So far I have seen no ill effects so we'll see. */
   int frame_really_changed = (f->buffers_changed ||
                              f->clip_changed ||
                              f->faces_changed    ||
   int frame_really_changed = (f->buffers_changed ||
                              f->clip_changed ||
                              f->faces_changed    ||
@@ -1314,7 +1314,7 @@ redisplay_output_layout (struct window *w,
       /* First determine if the image is visible at all */
       if (IMAGE_INSTANCEP (child))
        {
       /* First determine if the image is visible at all */
       if (IMAGE_INSTANCEP (child))
        {
-         struct Lisp_Image_Instance* childii = XIMAGE_INSTANCE (child);
+         Lisp_Image_Instance* childii = XIMAGE_INSTANCE (child);
          /* The enclosing layout offsets are +ve at this point */
          struct display_glyph_area cdga;
          cdga.xoffset  = IMAGE_INSTANCE_XOFFSET (childii) - dga->xoffset;
          /* The enclosing layout offsets are +ve at this point */
          struct display_glyph_area cdga;
          cdga.xoffset  = IMAGE_INSTANCE_XOFFSET (childii) - dga->xoffset;
@@ -1428,7 +1428,7 @@ redisplay_output_pixmap (struct window *w,
 {
   struct frame *f = XFRAME (w->frame);
   struct device *d = XDEVICE (f->device);
 {
   struct frame *f = XFRAME (w->frame);
   struct device *d = XDEVICE (f->device);
-  struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
   Lisp_Object window;
   XSETWINDOW (window, w);
 
   Lisp_Object window;
   XSETWINDOW (window, w);
 
index bb4c243..66b9445 100644 (file)
@@ -1438,7 +1438,7 @@ term_get_fkeys_1 (Lisp_Object function_key_map)
       char *sequence = tgetstr (keys[i].cap, address);
       if (sequence)
        Fdefine_key (function_key_map,
       char *sequence = tgetstr (keys[i].cap, address);
       if (sequence)
        Fdefine_key (function_key_map,
-                    build_ext_string (sequence, FORMAT_BINARY),
+                    build_ext_string (sequence, Qbinary),
                     vector1 (intern (keys[i].name)));
     }
 
                     vector1 (intern (keys[i].name)));
     }
 
@@ -1452,11 +1452,11 @@ term_get_fkeys_1 (Lisp_Object function_key_map)
     CONST char *k0      = tgetstr ("k0", address);
 
     if (k_semi)
     CONST char *k0      = tgetstr ("k0", address);
 
     if (k_semi)
-      Fdefine_key (function_key_map, build_ext_string (k_semi, FORMAT_BINARY),
+      Fdefine_key (function_key_map, build_ext_string (k_semi, Qbinary),
                   vector1 (intern ("f10")));
 
     if (k0)
                   vector1 (intern ("f10")));
 
     if (k0)
-      Fdefine_key (function_key_map, build_ext_string (k0, FORMAT_BINARY),
+      Fdefine_key (function_key_map, build_ext_string (k0, Qbinary),
                   vector1 (intern (k_semi ? "f0" : "f10")));
   }
 
                   vector1 (intern (k_semi ? "f0" : "f10")));
   }
 
@@ -1480,7 +1480,7 @@ term_get_fkeys_1 (Lisp_Object function_key_map)
            {
              sprintf (fkey, "f%d", i);
              Fdefine_key (function_key_map,
            {
              sprintf (fkey, "f%d", i);
              Fdefine_key (function_key_map,
-                          build_ext_string (sequence, FORMAT_BINARY),
+                          build_ext_string (sequence, Qbinary),
                           vector1 (intern (fkey)));
            }
        }
                           vector1 (intern (fkey)));
            }
        }
@@ -1490,15 +1490,16 @@ term_get_fkeys_1 (Lisp_Object function_key_map)
   /*
    * Various mappings to try and get a better fit.
    */
   /*
    * Various mappings to try and get a better fit.
    */
-#define CONDITIONAL_REASSIGN(cap1, cap2, keyname)                      \
-  if (!tgetstr (cap1, address))                                                \
-    {                                                                  \
-      char *sequence = tgetstr (cap2, address);                                \
-      if (sequence)                                                    \
-       Fdefine_key (function_key_map,                                  \
-                    build_ext_string (sequence, FORMAT_BINARY),        \
-                    vector1 (intern (keyname)));                               \
-    }
+#define CONDITIONAL_REASSIGN(cap1, cap2, keyname) do {         \
+    if (!tgetstr (cap1, address))                              \
+      {                                                                \
+       char *sequence = tgetstr (cap2, address);               \
+       if (sequence)                                           \
+         Fdefine_key (function_key_map,                        \
+                      build_ext_string (sequence, Qbinary),    \
+                      vector1 (intern (keyname)));             \
+      }                                                                \
+  } while (0)
 
   /* if there's no key_next keycap, map key_npage to `next' keysym */
   CONDITIONAL_REASSIGN ("%5", "kN", "next");
 
   /* if there's no key_next keycap, map key_npage to `next' keysym */
   CONDITIONAL_REASSIGN ("%5", "kN", "next");
index d599c91..0122415 100644 (file)
@@ -219,7 +219,7 @@ static int
 x_text_width_single_run (struct face_cachel *cachel, struct textual_run *run)
 {
   Lisp_Object font_inst = FACE_CACHEL_FONT (cachel, run->charset);
 x_text_width_single_run (struct face_cachel *cachel, struct textual_run *run)
 {
   Lisp_Object font_inst = FACE_CACHEL_FONT (cachel, run->charset);
-  struct Lisp_Font_Instance *fi = XFONT_INSTANCE (font_inst);
+  Lisp_Font_Instance *fi = XFONT_INSTANCE (font_inst);
   if (!fi->proportional_p)
     return fi->width * run->len;
   else
   if (!fi->proportional_p)
     return fi->width * run->len;
   else
@@ -400,9 +400,9 @@ x_output_display_block (struct window *w, struct display_line *dl, int block,
              else if (rb->object.chr.ch == '\n')
                {
                  /* Clear in case a cursor was formerly here. */
              else if (rb->object.chr.ch == '\n')
                {
                  /* Clear in case a cursor was formerly here. */
-                 redisplay_clear_region (window, findex, xpos, 
+                 redisplay_clear_region (window, findex, xpos,
                                          DISPLAY_LINE_YPOS (dl),
                                          DISPLAY_LINE_YPOS (dl),
-                                         rb->width, 
+                                         rb->width,
                                          DISPLAY_LINE_HEIGHT (dl));
                  elt++;
                }
                                          DISPLAY_LINE_HEIGHT (dl));
                  elt++;
                }
@@ -880,7 +880,7 @@ x_output_string (struct window *w, struct display_line *dl,
   for (i = 0; i < nruns; i++)
     {
       Lisp_Object font = FACE_CACHEL_FONT (cachel, runs[i].charset);
   for (i = 0; i < nruns; i++)
     {
       Lisp_Object font = FACE_CACHEL_FONT (cachel, runs[i].charset);
-      struct Lisp_Font_Instance *fi = XFONT_INSTANCE (font);
+      Lisp_Font_Instance *fi = XFONT_INSTANCE (font);
       int this_width;
       int need_clipping;
 
       int this_width;
       int need_clipping;
 
@@ -1166,9 +1166,9 @@ x_output_string (struct window *w, struct display_line *dl,
 }
 
 void
 }
 
 void
-x_output_x_pixmap (struct frame *f, struct Lisp_Image_Instance *p, int x,
+x_output_x_pixmap (struct frame *f, Lisp_Image_Instance *p, int x,
                   int y, int xoffset, int yoffset,
                   int y, int xoffset, int yoffset,
-                  int width, int height, unsigned long fg, unsigned long bg, 
+                  int width, int height, unsigned long fg, unsigned long bg,
                   GC override_gc)
 {
   struct device *d = XDEVICE (f->device);
                   GC override_gc)
 {
   struct device *d = XDEVICE (f->device);
@@ -1219,15 +1219,15 @@ x_output_x_pixmap (struct frame *f, struct Lisp_Image_Instance *p, int x,
      pixel values, instead of symbolic of fg/bg. */
   if (IMAGE_INSTANCE_PIXMAP_DEPTH (p) > 0)
     {
      pixel values, instead of symbolic of fg/bg. */
   if (IMAGE_INSTANCE_PIXMAP_DEPTH (p) > 0)
     {
-      XCopyArea (dpy, 
-                IMAGE_INSTANCE_X_PIXMAP_SLICE 
+      XCopyArea (dpy,
+                IMAGE_INSTANCE_X_PIXMAP_SLICE
                 (p, IMAGE_INSTANCE_PIXMAP_SLICE (p)), x_win, gc, xoffset,
                 yoffset, width,
                 height, x, y);
     }
   else
     {
                 (p, IMAGE_INSTANCE_PIXMAP_SLICE (p)), x_win, gc, xoffset,
                 yoffset, width,
                 height, x, y);
     }
   else
     {
-      XCopyPlane (dpy, IMAGE_INSTANCE_X_PIXMAP_SLICE 
+      XCopyPlane (dpy, IMAGE_INSTANCE_X_PIXMAP_SLICE
                  (p, IMAGE_INSTANCE_PIXMAP_SLICE (p)), x_win, gc,
                  xoffset, yoffset, width, height, x, y, 1L);
     }
                  (p, IMAGE_INSTANCE_PIXMAP_SLICE (p)), x_win, gc,
                  xoffset, yoffset, width, height, x, y, 1L);
     }
@@ -1241,11 +1241,11 @@ x_output_pixmap (struct window *w, Lisp_Object image_instance,
 {
   struct frame *f = XFRAME (w->frame);
   struct device *d = XDEVICE (f->device);
 {
   struct frame *f = XFRAME (w->frame);
   struct device *d = XDEVICE (f->device);
-  struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
+  Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
 
   Display *dpy = DEVICE_X_DISPLAY (d);
   Window x_win = XtWindow (FRAME_X_TEXT_WIDGET (f));
 
   Display *dpy = DEVICE_X_DISPLAY (d);
   Window x_win = XtWindow (FRAME_X_TEXT_WIDGET (f));
+
   /* Output the pixmap. */
   {
     Lisp_Object tmp_pixel;
   /* Output the pixmap. */
   {
     Lisp_Object tmp_pixel;
@@ -1430,7 +1430,7 @@ x_output_blank (struct window *w, struct display_line *dl, struct rune *rb,
     {
       int cursor_height, cursor_y;
       int focus = EQ (w->frame, DEVICE_FRAME_WITH_FOCUS_REAL (d));
     {
       int cursor_height, cursor_y;
       int focus = EQ (w->frame, DEVICE_FRAME_WITH_FOCUS_REAL (d));
-      struct Lisp_Font_Instance *fi;
+      Lisp_Font_Instance *fi;
 
       fi = XFONT_INSTANCE (FACE_CACHEL_FONT
                           (WINDOW_FACE_CACHEL (w, rb->findex),
 
       fi = XFONT_INSTANCE (FACE_CACHEL_FONT
                           (WINDOW_FACE_CACHEL (w, rb->findex),
@@ -1920,7 +1920,7 @@ x_clear_frame_window (Lisp_Object window)
       return;
     }
 
       return;
     }
 
-  redisplay_clear_to_window_end (w, WINDOW_TEXT_TOP (w), 
+  redisplay_clear_to_window_end (w, WINDOW_TEXT_TOP (w),
                                 WINDOW_TEXT_BOTTOM (w));
 }
 
                                 WINDOW_TEXT_BOTTOM (w));
 }
 
index 17de60e..fa8e5e7 100644 (file)
@@ -859,7 +859,7 @@ add_emchar_rune (pos_data *data)
          Lisp_Object font_instance =
            ensure_face_cachel_contains_charset (cachel, data->window,
                                                 charset);
          Lisp_Object font_instance =
            ensure_face_cachel_contains_charset (cachel, data->window,
                                                 charset);
-         struct Lisp_Font_Instance *fi;
+         Lisp_Font_Instance *fi;
 
          if (EQ (font_instance, Vthe_null_font_instance))
            {
 
          if (EQ (font_instance, Vthe_null_font_instance))
            {
@@ -1341,7 +1341,7 @@ add_disp_table_entry_runes (pos_data *data, Lisp_Object entry)
   prop_block_dynarr *prop = NULL;
   if (VECTORP (entry))
     {
   prop_block_dynarr *prop = NULL;
   if (VECTORP (entry))
     {
-      struct Lisp_Vector *de = XVECTOR (entry);
+      Lisp_Vector *de = XVECTOR (entry);
       EMACS_INT len = vector_length (de);
       int elt;
 
       EMACS_INT len = vector_length (de);
       int elt;
 
@@ -1524,6 +1524,10 @@ add_glyph_rune (pos_data *data, struct glyph_block *gb, int pos_type,
 {
   struct window *w = XWINDOW (data->window);
 
 {
   struct window *w = XWINDOW (data->window);
 
+  /* If window faces changed, and glyph instance is text, then
+     glyph sizes might have changed too */
+  invalidate_glyph_geometry_maybe (gb->glyph, w);
+
   /* A nil extent indicates a special glyph (ex. truncator). */
   if (NILP (gb->extent)
       || (pos_type == BEGIN_GLYPHS &&
   /* A nil extent indicates a special glyph (ex. truncator). */
   if (NILP (gb->extent)
       || (pos_type == BEGIN_GLYPHS &&
@@ -3894,7 +3898,7 @@ tail_recurse:
                    {
                      CONST Bufbyte *tmp_str = charptr_n_addr (str, *offset);
 
                    {
                      CONST Bufbyte *tmp_str = charptr_n_addr (str, *offset);
 
-                     /* ### NOTE: I don't understand why a tmp_max is not
+                     /* #### NOTE: I don't understand why a tmp_max is not
                         computed and used here as in the plain string case
                         above. -- dv */
                      pos = add_string_to_fstring_db_runes (data, tmp_str,
                         computed and used here as in the plain string case
                         above. -- dv */
                      pos = add_string_to_fstring_db_runes (data, tmp_str,
@@ -3940,7 +3944,7 @@ tail_recurse:
                {
                  CONST Bufbyte *tmp_str = charptr_n_addr (str, *offset);
 
                {
                  CONST Bufbyte *tmp_str = charptr_n_addr (str, *offset);
 
-                 /* ### NOTE: I don't understand why a tmp_max is not
+                 /* #### NOTE: I don't understand why a tmp_max is not
                     computed and used here as in the plain string case
                     above. -- dv */
                  pos = add_string_to_fstring_db_runes (data, tmp_str, pos,
                     computed and used here as in the plain string case
                     above. -- dv */
                  pos = add_string_to_fstring_db_runes (data, tmp_str, pos,
@@ -4135,7 +4139,7 @@ tail_recurse:
            CONST Bufbyte *tmp_str =
              charptr_n_addr ((CONST Bufbyte *) str, *offset);
 
            CONST Bufbyte *tmp_str =
              charptr_n_addr ((CONST Bufbyte *) str, *offset);
 
-           /* ### NOTE: I don't understand why a tmp_max is not computed and
+           /* #### NOTE: I don't understand why a tmp_max is not computed and
               used here as in the plain string case above. -- dv */
            pos = add_string_to_fstring_db_runes (data, tmp_str, pos,
                                                  min_pos, max_pos);
               used here as in the plain string case above. -- dv */
            pos = add_string_to_fstring_db_runes (data, tmp_str, pos,
                                                  min_pos, max_pos);
@@ -4281,7 +4285,7 @@ create_string_text_block (struct window *w, Lisp_Object disp_string,
      against this case. */
   struct buffer *b = BUFFERP (w->buffer) ? XBUFFER (w->buffer) : 0;
   struct device *d = XDEVICE (f->device);
      against this case. */
   struct buffer *b = BUFFERP (w->buffer) ? XBUFFER (w->buffer) : 0;
   struct device *d = XDEVICE (f->device);
-  struct Lisp_String* s = XSTRING (disp_string);
+  Lisp_String* s = XSTRING (disp_string);
 
   /* we're working with these a lot so precalculate them */
   Bytecount slen = XSTRING_LENGTH (disp_string);
 
   /* we're working with these a lot so precalculate them */
   Bytecount slen = XSTRING_LENGTH (disp_string);
@@ -5931,7 +5935,7 @@ redisplay_window (Lisp_Object window, int skip_selected)
      the cache purely because glyphs have changed - this is now
      handled by the dirty flag.*/
   if ((!echo_active && b != window_display_buffer (w))
      the cache purely because glyphs have changed - this is now
      handled by the dirty flag.*/
   if ((!echo_active && b != window_display_buffer (w))
-      || !Dynarr_length (w->glyph_cachels))
+      || !Dynarr_length (w->glyph_cachels) || f->faces_changed)
     reset_glyph_cachels (w);
   else
     mark_glyph_cachels_as_not_updated (w);
     reset_glyph_cachels (w);
   else
     mark_glyph_cachels_as_not_updated (w);
@@ -6422,16 +6426,27 @@ redisplay_frame (struct frame *f, int preemption_check)
   return 0;
 }
 
   return 0;
 }
 
-/* Ensure that all frames on the given device are correctly displayed. */
+/* Ensure that all frames on the given device are correctly displayed.
+   If AUTOMATIC is non-zero, and the device implementation indicates
+   no automatic redisplay, as printers do, then the device is not
+   redisplayed. AUTOMATIC is set to zero when called from lisp
+   functions (redraw-device) and (redisplay-device), and to non-zero
+   when called from "lazy" redisplay();
+*/
 
 static int
 
 static int
-redisplay_device (struct device *d)
+redisplay_device (struct device *d, int automatic)
 {
   Lisp_Object frame, frmcons;
   int preempted = 0;
   int size_change_failed = 0;
   struct frame *f;
 
 {
   Lisp_Object frame, frmcons;
   int preempted = 0;
   int size_change_failed = 0;
   struct frame *f;
 
+  if (automatic
+      && (MAYBE_INT_DEVMETH (d, device_implementation_flags, ())
+         & XDEVIMPF_NO_AUTO_REDISPLAY))
+    return 0;
+
   if (DEVICE_STREAM_P (d)) /* nothing to do */
     return 0;
 
   if (DEVICE_STREAM_P (d)) /* nothing to do */
     return 0;
 
@@ -6546,7 +6561,7 @@ redisplay_without_hooks (void)
 
       if (CLASS_REDISPLAY_FLAGS_CHANGEDP (d))
        {
 
       if (CLASS_REDISPLAY_FLAGS_CHANGEDP (d))
        {
-         preempted = redisplay_device (d);
+         preempted = redisplay_device (d, 1);
 
          if (preempted)
            {
 
          if (preempted)
            {
@@ -8918,7 +8933,7 @@ input and is guaranteed to proceed to completion.
     {
       XFRAME (XCAR (frmcons))->clear = 1;
     }
     {
       XFRAME (XCAR (frmcons))->clear = 1;
     }
-  redisplay_device (d);
+  redisplay_device (d, 0);
 
   return unbind_to (count, Qnil);
 }
 
   return unbind_to (count, Qnil);
 }
@@ -8945,7 +8960,7 @@ input and is guaranteed to proceed to completion.
       disable_preemption++;
     }
 
       disable_preemption++;
     }
 
-  redisplay_device (d);
+  redisplay_device (d, 0);
 
   return unbind_to (count, Qnil);
 }
 
   return unbind_to (count, Qnil);
 }
@@ -9125,12 +9140,18 @@ init_redisplay (void)
   if (!initialized)
 #endif
     {
   if (!initialized)
 #endif
     {
-      cmotion_display_lines = Dynarr_new (display_line);
-      mode_spec_bufbyte_string = Dynarr_new (Bufbyte);
-      formatted_string_extent_dynarr = Dynarr_new (EXTENT);
-      formatted_string_extent_start_dynarr = Dynarr_new (Bytecount);
-      formatted_string_extent_end_dynarr = Dynarr_new (Bytecount);
-      internal_cache = Dynarr_new (line_start_cache);
+      if (!cmotion_display_lines)
+       cmotion_display_lines = Dynarr_new (display_line);
+      if (!mode_spec_bufbyte_string)
+       mode_spec_bufbyte_string = Dynarr_new (Bufbyte);
+      if (!formatted_string_extent_dynarr)
+       formatted_string_extent_dynarr = Dynarr_new (EXTENT);
+      if (!formatted_string_extent_start_dynarr)
+       formatted_string_extent_start_dynarr = Dynarr_new (Bytecount);
+      if (!formatted_string_extent_end_dynarr)
+       formatted_string_extent_end_dynarr = Dynarr_new (Bytecount);
+      if (!internal_cache)
+       internal_cache = Dynarr_new (line_start_cache);
     }
 
   /* window system is nil when in -batch mode */
     }
 
   /* window system is nil when in -batch mode */
index b9772bf..648dea8 100644 (file)
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_REDISPLAY_H_
-#define _XEMACS_REDISPLAY_H_
+#ifndef INCLUDED_redisplay_h_
+#define INCLUDED_redisplay_h_
 
 /* Redisplay DASSERT types */
 #define DB_DISP_POS            1
 
 /* Redisplay DASSERT types */
 #define DB_DISP_POS            1
@@ -784,4 +784,4 @@ void output_display_line (struct window *w, display_line_dynarr *cdla,
                          display_line_dynarr *ddla, int line,
                          int force_start, int force_end);
 
                          display_line_dynarr *ddla, int line,
                          int force_start, int force_end);
 
-#endif /* _XEMACS_REDISPLAY_H_ */
+#endif /* INCLUDED_redisplay_h_ */
index e44eb13..02daf79 100644 (file)
@@ -2070,9 +2070,9 @@ regex_compile (CONST char *pattern, int size, reg_syntax_t syntax,
                 /* If we get here, we found another repeat character.  */
                 if (!(syntax & RE_NO_MINIMAL_MATCHING))
                   {
                 /* If we get here, we found another repeat character.  */
                 if (!(syntax & RE_NO_MINIMAL_MATCHING))
                   {
-                    /* `*?' and `+?' and `??' are okay (and mean match
-                       minimally), but other sequences (such as `*??' and
-                       `+++') are rejected (reserved for future use). */
+                    /* "*?" and "+?" and "??" are okay (and mean match
+                       minimally), but other sequences (such as "*??" and
+                       "+++") are rejected (reserved for future use). */
                     if (minimal || c != '?')
                       FREE_STACK_RETURN (REG_BADRPT);
                     minimal = true;
                     if (minimal || c != '?')
                       FREE_STACK_RETURN (REG_BADRPT);
                     minimal = true;
index 74db8b3..c4fbd5e 100644 (file)
@@ -20,8 +20,8 @@
 
 /* Synched up with: FSF 19.29. */
 
 
 /* Synched up with: FSF 19.29. */
 
-#ifndef __REGEXP_LIBRARY_H__
-#define __REGEXP_LIBRARY_H__
+#ifndef INCLUDED_regex_h_
+#define INCLUDED_regex_h_
 
 /* POSIX says that <sys/types.h> must be included (by the caller) before
    <regex.h>.  */
 
 /* POSIX says that <sys/types.h> must be included (by the caller) before
    <regex.h>.  */
@@ -482,4 +482,4 @@ size_t regerror (int errcode, CONST regex_t *preg, char *errbuf,
                 size_t errbuf_size);
 void regfree (regex_t *preg);
 
                 size_t errbuf_size);
 void regfree (regex_t *preg);
 
-#endif /* not __REGEXP_LIBRARY_H__ */
+#endif /* INCLUDED_regex_h_ */
index 1eaa8b5..19562b8 100644 (file)
@@ -127,6 +127,19 @@ extern long random();
 #ifndef TCS_VERTICAL
 #define TCS_VERTICAL 0x0080
 #endif
 #ifndef TCS_VERTICAL
 #define TCS_VERTICAL 0x0080
 #endif
+#ifndef PHYSICALWIDTH
+#define PHYSICALWIDTH 110
+#endif
+#ifndef PHYSICALHEIGHT
+#define PHYSICALHEIGHT 111
+#endif
+#ifndef PHYSICALOFFSETX
+#define PHYSICALOFFSETX 112
+#endif
+#ifndef PHYSICALOFFSETY
+#define PHYSICALOFFSETY 113
+#endif
+
 
 #define PBS_SMOOTH              0x01
 
 
 #define PBS_SMOOTH              0x01
 
@@ -151,7 +164,7 @@ extern long random();
 
 #ifdef CYGWIN_VERSION_DLL_MAJOR
 #if 0
 
 #ifdef CYGWIN_VERSION_DLL_MAJOR
 #if 0
-/* ### FIXME: although defining BROKEN_SIGIO is correct for proper ^G
+/* #### FIXME: although defining BROKEN_SIGIO is correct for proper ^G
    behavior, bugs in cygwin mean that xemacs locks up frequently if
    this is defined.  */
 #define BROKEN_SIGIO
    behavior, bugs in cygwin mean that xemacs locks up frequently if
    this is defined.  */
 #define BROKEN_SIGIO
index 6dee7ee..594e93e 100644 (file)
@@ -182,49 +182,15 @@ typedef int pid_t;
 
 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B")
 
 
 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B")
 
-/* get some redefinitions in place */
-
-#if 0
-/* IO calls that are emulated or shadowed */
-#define access  sys_access
-#define chdir   sys_chdir
-#define chmod   sys_chmod
-#define close   sys_close
-#define creat   sys_creat
-#define ctime sys_ctime
-#define dup     sys_dup
-#define dup2    sys_dup2
-#define fopen   sys_fopen
-#define link    sys_link
-#define mktemp  sys_mktemp
-#define open    sys_open
-#define read    sys_read
-#define rename  sys_rename
-#define unlink  sys_unlink
-#define write   sys_write
-#define mkdir   sys_mkdir
-#define rmdir   sys_rmdir
-
-#endif
-
-#if 0
-/* this is hacky, but is necessary to avoid warnings about macro
-   redefinitions using the SDK compilers */
-#ifndef __STDC__
-#define __STDC__ 1
-#define MUST_UNDEF__STDC__
-#endif
-#include <direct.h>
-#include <io.h>
-#include <stdio.h>
-#ifdef MUST_UNDEF__STDC__
-#undef __STDC__
-#undef MUST_UNDEF__STDC__
-#endif
-#endif
 
 #include <stdio.h>
 
 
 #include <stdio.h>
 
+/* subprocess calls that are emulated */
+#ifndef DONT_ENCAPSULATE
+#define spawnve sys_spawnve
+int spawnve (int mode, CONST char *cmdname, 
+            CONST char * CONST *argv, CONST char *CONST *envp);
+#endif
 
 /* IO calls that are emulated or shadowed */
 #define pipe    sys_pipe
 
 /* IO calls that are emulated or shadowed */
 #define pipe    sys_pipe
@@ -235,11 +201,6 @@ int sys_pipe (int * phandles);
 void sleep (int seconds);
 #endif
 
 void sleep (int seconds);
 #endif
 
-/* subprocess calls that are emulated */
-#define spawnve sys_spawnve
-int spawnve (int mode, CONST char *cmdname, 
-            CONST char * CONST *argv, CONST char *CONST *envp);
-
 #define wait    sys_wait
 int wait (int *status);
 
 #define wait    sys_wait
 int wait (int *status);
 
@@ -250,37 +211,6 @@ int kill (int pid, int sig);
 #define popen     _popen
 #define pclose    _pclose
 
 #define popen     _popen
 #define pclose    _pclose
 
-#if 0
-#define chdir     _chdir
-#define execlp    _execlp
-#define execvp    _execvp
-#define fcloseall _fcloseall
-#define fdopen    _fdopen
-#define fgetchar  _fgetchar
-#define fileno    _fileno
-#define flushall  _flushall
-#define fputchar  _fputchar
-#define getw      _getw
-#define getpid    _getpid
-#define isatty    _isatty
-#define logb      _logb
-#define _longjmp  longjmp
-#define lseek     _lseek
-#define putw      _putw
-#define umask     _umask
-/* #define utime     _utime */
-/* #define index     strchr */
-/* #define rindex    strrchr */
-#define read     _read
-#define write    _write
-#define getcwd    _getcwd
-
-#ifdef HAVE_NTGUI
-#define abort  win32_abort
-#endif
-
-#endif /* 0 */
-
 typedef int uid_t;
 typedef int gid_t;
 typedef int pid_t;
 typedef int uid_t;
 typedef int gid_t;
 typedef int pid_t;
@@ -320,7 +250,6 @@ gid_t getegid (void);
 #define sighold(s) msw_sighold(s)
 #define sigrelse(s) msw_sigrelse(s)
 #define sigpause(s) msw_sigpause(s)
 #define sighold(s) msw_sighold(s)
 #define sigrelse(s) msw_sigrelse(s)
 #define sigpause(s) msw_sigpause(s)
-#define signal sigset
 
 /* Defines that we need that aren't in the standard signal.h  */
 #define SIGHUP  1               /* Hang up */
 
 /* Defines that we need that aren't in the standard signal.h  */
 #define SIGHUP  1               /* Hang up */
@@ -333,13 +262,6 @@ gid_t getegid (void);
 #define getdisk()               (_getdrive () - 1)
 #define getdefdir(_drv, _buf)   _getdcwd (_drv, _buf, MAXPATHLEN)
 
 #define getdisk()               (_getdrive () - 1)
 #define getdefdir(_drv, _buf)   _getdcwd (_drv, _buf, MAXPATHLEN)
 
-#if 0 /* they do. -kkm */
-/* Define this so that winsock.h definitions don't get included when windows.h
-   is...  I don't know if they do the right thing for emacs.  For this to
-   have proper effect, config.h must always be included before windows.h.  */
-#define _WINSOCKAPI_    1
-#endif /* 0 */
-
 /* Defines size_t and alloca ().  */
 #include <malloc.h>
 
 /* Defines size_t and alloca ().  */
 #include <malloc.h>
 
index d73a7fe..a7f1e8b 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_SCROLLBAR_MSW_H_
-#define _XEMACS_SCROLLBAR_MSW_H_
+#ifndef INCLUDED_scrollbar_msw_h_
+#define INCLUDED_scrollbar_msw_h_
 
 #if defined (HAVE_MS_WINDOWS) && defined (HAVE_SCROLLBARS)
 
 
 #if defined (HAVE_MS_WINDOWS) && defined (HAVE_SCROLLBARS)
 
@@ -60,4 +60,4 @@ void mswindows_handle_scrollbar_event (HWND hwnd, int code, int pos);
 int mswindows_handle_mousewheel_event (Lisp_Object frame, int keys, int delta);
 
 #endif /* HAVE_MS_WINDOWS and HAVE_SCROLLBARS */
 int mswindows_handle_mousewheel_event (Lisp_Object frame, int keys, int delta);
 
 #endif /* HAVE_MS_WINDOWS and HAVE_SCROLLBARS */
-#endif /* _XEMACS_SCROLLBAR_MSW_H_ */
+#endif /* INCLUDED_scrollbar_msw_h_ */
index d4b1652..8745698 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_SCROLLBAR_X_H_
-#define _XEMACS_SCROLLBAR_X_H_
+#ifndef INCLUDED_scrollbar_x_h_
+#define INCLUDED_scrollbar_x_h_
 
 #if defined (HAVE_X_WINDOWS) && defined (HAVE_SCROLLBARS)
 
 
 #if defined (HAVE_X_WINDOWS) && defined (HAVE_SCROLLBARS)
 
@@ -71,4 +71,5 @@ void x_update_frame_scrollbars (struct frame *f);
 void x_set_scrollbar_pointer (struct frame *f, Lisp_Object cursor);
 
 #endif /* HAVE_X_WINDOWS and HAVE_SCROLLBARS */
 void x_set_scrollbar_pointer (struct frame *f, Lisp_Object cursor);
 
 #endif /* HAVE_X_WINDOWS and HAVE_SCROLLBARS */
-#endif /* _XEMACS_SCROLLBAR_H_ */
+
+#endif /* INCLUDED_scrollbar_x_h_ */
index 6f2f0e9..7f586b4 100644 (file)
@@ -869,7 +869,7 @@ This ensures that VALUE is in the proper range for the horizontal scrollbar.
 
   w = XWINDOW (window);
   wcw = window_char_width (w, 0) - 1;
 
   w = XWINDOW (window);
   wcw = window_char_width (w, 0) - 1;
-  /* ### We should be able to scroll further right as long as there is
+  /* #### We should be able to scroll further right as long as there is
      a visible truncation glyph.  This calculation for max is bogus.  */
   max_len = w->max_line_len + 2;
 
      a visible truncation glyph.  This calculation for max is bogus.  */
   max_len = w->max_line_len + 2;
 
index fb664c1..c9f5b39 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_SCROLLBAR_H_
-#define _XEMACS_SCROLLBAR_H_
+#ifndef INCLUDED_scrollbar_h_
+#define INCLUDED_scrollbar_h_
 
 #ifdef HAVE_SCROLLBARS
 
 
 #ifdef HAVE_SCROLLBARS
 
@@ -81,4 +81,4 @@ extern Lisp_Object Qscrollbar_horizontal_drag;
 
 #endif /* HAVE_SCROLLBARS */
 
 
 #endif /* HAVE_SCROLLBARS */
 
-#endif /* _XEMACS_SCROLLBAR_H_ */
+#endif /* INCLUDED_scrollbar_h_ */
index a66abc0..c9f49ae 100644 (file)
@@ -701,7 +701,7 @@ find_next_newline (struct buffer *buf, Bufpos from, int count)
 }
 
 Bytind
 }
 
 Bytind
-bi_find_next_emchar_in_string (struct Lisp_String* str, Emchar target, Bytind st,
+bi_find_next_emchar_in_string (Lisp_String* str, Emchar target, Bytind st,
                               EMACS_INT count)
 {
   /* This function has been Mule-ized. */
                               EMACS_INT count)
 {
   /* This function has been Mule-ized. */
@@ -771,8 +771,7 @@ skip_chars (struct buffer *buf, int forwardp, int syntaxp,
   unsigned char fastmap[0400];
   int negate = 0;
   REGISTER int i;
   unsigned char fastmap[0400];
   int negate = 0;
   REGISTER int i;
-  struct Lisp_Char_Table *syntax_table =
-    XCHAR_TABLE (buf->mirror_syntax_table);
+  Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->mirror_syntax_table);
   Bufpos limit;
 
   if (NILP (lim))
   Bufpos limit;
 
   if (NILP (lim))
@@ -1584,8 +1583,7 @@ wordify (Lisp_Object buffer, Lisp_Object string)
   Charcount i, len;
   EMACS_INT punct_count = 0, word_count = 0;
   struct buffer *buf = decode_buffer (buffer, 0);
   Charcount i, len;
   EMACS_INT punct_count = 0, word_count = 0;
   struct buffer *buf = decode_buffer (buffer, 0);
-  struct Lisp_Char_Table *syntax_table =
-    XCHAR_TABLE (buf->mirror_syntax_table);
+  Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->mirror_syntax_table);
 
   CHECK_STRING (string);
   len = XSTRING_CHAR_LENGTH (string);
 
   CHECK_STRING (string);
   len = XSTRING_CHAR_LENGTH (string);
@@ -1845,7 +1843,7 @@ and you do not need to specify it.)
   Emchar c, prevc;
   Charcount inslen;
   struct buffer *buf;
   Emchar c, prevc;
   Charcount inslen;
   struct buffer *buf;
-  struct Lisp_Char_Table *syntax_table;
+  Lisp_Char_Table *syntax_table;
   int mc_count;
   Lisp_Object buffer;
   int_dynarr *ul_action_dynarr = 0;
   int mc_count;
   Lisp_Object buffer;
   int_dynarr *ul_action_dynarr = 0;
index 0332a45..2a15974 100644 (file)
@@ -139,7 +139,9 @@ symbol_to_x_atom (struct device *d, Lisp_Object sym, int only_if_exists)
 
   {
     CONST char *nameext;
 
   {
     CONST char *nameext;
-    GET_C_STRING_CTEXT_DATA_ALLOCA (Fsymbol_name (sym), nameext);
+    TO_EXTERNAL_FORMAT (LISP_STRING, Fsymbol_name (sym),
+                       C_STRING_ALLOCA, nameext,
+                       Qctext);
     return XInternAtom (display, nameext, only_if_exists ? True : False);
   }
 }
     return XInternAtom (display, nameext, only_if_exists ? True : False);
   }
 }
@@ -183,16 +185,16 @@ x_atom_to_symbol (struct device *d, Atom atom)
 #endif
 
   {
 #endif
 
   {
-    Lisp_Object newsym;
-    CONST Bufbyte *intstr;
+    char *intstr;
     char *str = XGetAtomName (display, atom);
 
     if (! str) return Qnil;
 
     char *str = XGetAtomName (display, atom);
 
     if (! str) return Qnil;
 
-    GET_C_CHARPTR_INT_CTEXT_DATA_ALLOCA (str, intstr);
-    newsym = intern ((char *) intstr);
+    TO_INTERNAL_FORMAT (C_STRING, str,
+                       C_STRING_ALLOCA, intstr,
+                       Qctext);
     XFree (str);
     XFree (str);
-    return newsym;
+    return intern (intstr);
   }
 }
 
   }
 }
 
@@ -230,7 +232,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value)
      
      Opaque pointers are the clean way to go here.
   */
      
      Opaque pointers are the clean way to go here.
   */
-  selection_time = make_opaque (sizeof (thyme), (void *) &thyme);
+  selection_time = make_opaque (&thyme, sizeof (thyme));
 
 #ifdef MOTIF_CLIPBOARDS
   hack_motif_clipboard_selection (selection_atom, selection_value,
 
 #ifdef MOTIF_CLIPBOARDS
   hack_motif_clipboard_selection (selection_atom, selection_value,
@@ -314,10 +316,14 @@ hack_motif_clipboard_selection (Atom selection_atom,
          }
 
        if (chartypes == LATIN_1)
          }
 
        if (chartypes == LATIN_1)
-         GET_STRING_BINARY_DATA_ALLOCA (selection_value, data, bytes);
+         TO_EXTERNAL_FORMAT (LISP_STRING, selection_value,
+                             ALLOCA, (data, bytes),
+                             Qbinary);
        else if (chartypes == WORLD)
          {
        else if (chartypes == WORLD)
          {
-           GET_STRING_CTEXT_DATA_ALLOCA (selection_value, data, bytes);
+           TO_EXTERNAL_FORMAT (LISP_STRING, selection_value,
+                               ALLOCA, (data, bytes),
+                               Qctext);
            encoding = "COMPOUND_TEXT";
          }
       }
            encoding = "COMPOUND_TEXT";
          }
       }
@@ -1164,7 +1170,7 @@ selection_data_to_lisp_data (struct device *d,
     return make_ext_string (data, size,
                            type == DEVICE_XATOM_TEXT (d) ||
                            type == DEVICE_XATOM_COMPOUND_TEXT (d)
     return make_ext_string (data, size,
                            type == DEVICE_XATOM_TEXT (d) ||
                            type == DEVICE_XATOM_COMPOUND_TEXT (d)
-                           ? FORMAT_CTEXT : FORMAT_BINARY);
+                           ? Qctext : Qbinary);
 
   /* Convert a single atom to a Lisp Symbol.
      Convert a set of atoms to a vector of symbols. */
 
   /* Convert a single atom to a Lisp Symbol.
      Convert a set of atoms to a vector of symbols. */
@@ -1263,10 +1269,9 @@ lisp_data_to_selection_data (struct device *d,
       CONST Extbyte *extval;
       Extcount extvallen;
 
       CONST Extbyte *extval;
       Extcount extvallen;
 
-      if (NILP (type))
-       GET_STRING_CTEXT_DATA_ALLOCA (obj, extval, extvallen);
-      else
-       GET_STRING_BINARY_DATA_ALLOCA (obj, extval, extvallen);
+      TO_EXTERNAL_FORMAT (LISP_STRING, obj,
+                         ALLOCA, (extval, extvallen),
+                         (NILP (type) ? Qctext : Qbinary));
       *format_ret = 8;
       *size_ret = extvallen;
       *data_ret = (unsigned char *) xmalloc (*size_ret);
       *format_ret = 8;
       *size_ret = extvallen;
       *data_ret = (unsigned char *) xmalloc (*size_ret);
@@ -1286,7 +1291,9 @@ lisp_data_to_selection_data (struct device *d,
 
       *format_ret = 8;
       len = set_charptr_emchar (buf, XCHAR (obj));
 
       *format_ret = 8;
       len = set_charptr_emchar (buf, XCHAR (obj));
-      GET_CHARPTR_EXT_CTEXT_DATA_ALLOCA (buf, len, extval, extvallen);
+      TO_EXTERNAL_FORMAT (DATA, (buf, len),
+                         ALLOCA, (extval, extvallen),
+                         Qctext);
       *size_ret = extvallen;
       *data_ret = (unsigned char *) xmalloc (*size_ret);
       memcpy (*data_ret, extval, *size_ret);
       *size_ret = extvallen;
       *data_ret = (unsigned char *) xmalloc (*size_ret);
       memcpy (*data_ret, extval, *size_ret);
@@ -1540,7 +1547,7 @@ Return the value of the named CUTBUFFER (typically CUT_BUFFER0).
   ret = (bytes ?
         make_ext_string (data, bytes,
                          memchr (data, 0x1b, bytes) ?
   ret = (bytes ?
         make_ext_string (data, bytes,
                          memchr (data, 0x1b, bytes) ?
-                         FORMAT_CTEXT : FORMAT_BINARY)
+                         Qctext : Qbinary)
         : Qnil);
   xfree (data);
   return ret;
         : Qnil);
   xfree (data);
   return ret;
@@ -1603,9 +1610,13 @@ Set the value of the named CUTBUFFER (typically CUT_BUFFER0) to STRING.
     }
 
   if (chartypes == LATIN_1)
     }
 
   if (chartypes == LATIN_1)
-    GET_STRING_BINARY_DATA_ALLOCA (string, data, bytes);
+    TO_EXTERNAL_FORMAT (LISP_STRING, string,
+                       ALLOCA, (data, bytes),
+                       Qbinary);
   else if (chartypes == WORLD)
   else if (chartypes == WORLD)
-    GET_STRING_CTEXT_DATA_ALLOCA  (string, data, bytes);
+    TO_EXTERNAL_FORMAT (LISP_STRING, string,
+                       ALLOCA, (data, bytes),
+                       Qctext);
 #endif /* MULE */
 
   bytes_remaining = bytes;
 #endif /* MULE */
 
   bytes_remaining = bytes;
@@ -1661,7 +1672,7 @@ positive means move values forward, negative means backward.
 /************************************************************************/
 
 void
 /************************************************************************/
 
 void
-syms_of_xselect (void)
+syms_of_select_x (void)
 {
 
 #ifdef CUT_BUFFER_SUPPORT
 {
 
 #ifdef CUT_BUFFER_SUPPORT
@@ -1697,7 +1708,7 @@ console_type_create_select_x (void)
 }
 
 void
 }
 
 void
-reinit_vars_of_xselect (void)
+reinit_vars_of_select_x (void)
 {
   reading_selection_reply = 0;
   reading_which_selection = 0;
 {
   reading_selection_reply = 0;
   reading_which_selection = 0;
@@ -1707,9 +1718,9 @@ reinit_vars_of_xselect (void)
 }
 
 void
 }
 
 void
-vars_of_xselect (void)
+vars_of_select_x (void)
 {
 {
-  reinit_vars_of_xselect ();
+  reinit_vars_of_select_x ();
 
 #ifdef CUT_BUFFER_SUPPORT
   cut_buffers_initialized = 0;
 
 #ifdef CUT_BUFFER_SUPPORT
   cut_buffers_initialized = 0;
@@ -1741,7 +1752,7 @@ A value of 0 means wait as long as necessary.  This is initialized from the
 }
 
 void
 }
 
 void
-Xatoms_of_xselect (struct device *d)
+Xatoms_of_select_x (struct device *d)
 {
   Display *D = DEVICE_X_DISPLAY (d);
 
 {
   Display *D = DEVICE_X_DISPLAY (d);
 
index ecc22ca..891a45c 100644 (file)
@@ -203,6 +203,7 @@ anything that the functions on selection-converter-alist know about.
        (selection_name, selection_value, device))
 {
   Lisp_Object selection_time, selection_data, prev_value;
        (selection_name, selection_value, device))
 {
   Lisp_Object selection_time, selection_data, prev_value;
+  struct gcpro gcpro1;
 
   CHECK_SYMBOL (selection_name);
   if (NILP (selection_value)) error ("selection-value may not be nil.");
 
   CHECK_SYMBOL (selection_name);
   if (NILP (selection_value)) error ("selection-value may not be nil.");
@@ -214,6 +215,8 @@ anything that the functions on selection-converter-alist know about.
   selection_data = list3 (selection_name,
                          selection_value,
                          Qnil);
   selection_data = list3 (selection_name,
                          selection_value,
                          Qnil);
+  GCPRO1 (selection_data);
+
   prev_value = assq_no_quit (selection_name, Vselection_alist);
   Vselection_alist = Fcons (selection_data, Vselection_alist);
     
   prev_value = assq_no_quit (selection_name, Vselection_alist);
   Vselection_alist = Fcons (selection_data, Vselection_alist);
     
@@ -242,6 +245,8 @@ anything that the functions on selection-converter-alist know about.
 
   Fsetcar (XCDR (XCDR (selection_data)), selection_time);
 
 
   Fsetcar (XCDR (XCDR (selection_data)), selection_time);
 
+  UNGCPRO;
+
   return selection_value;
 }
 
   return selection_value;
 }
 
index 03c7640..9bf4b4e 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_SELECT_H_
-#define _XEMACS_SELECT_H_
+#ifndef INCLUDED_select_h_
+#define INCLUDED_select_h_
 
 extern Lisp_Object QPRIMARY, QSECONDARY, QSTRING, QINTEGER, QCLIPBOARD, QTIMESTAMP,
   QTEXT, QDELETE, QMULTIPLE, QINCR, QEMACS_TMP, QTARGETS, QATOM, QNULL,
 
 extern Lisp_Object QPRIMARY, QSECONDARY, QSTRING, QINTEGER, QCLIPBOARD, QTIMESTAMP,
   QTEXT, QDELETE, QMULTIPLE, QINCR, QEMACS_TMP, QTARGETS, QATOM, QNULL,
@@ -47,4 +47,4 @@ extern Lisp_Object Qselection_conversion_error;
 Lisp_Object get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type);
 void handle_selection_clear (Lisp_Object selection_symbol);
 
 Lisp_Object get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type);
 void handle_selection_clear (Lisp_Object selection_symbol);
 
-#endif
+#endif /* INCLUDED_select_h_ */
index 09e21fb..bb214f5 100644 (file)
@@ -126,7 +126,9 @@ Windows the sound file must be in WAV format.
     {
       char *fileext;
 
     {
       char *fileext;
 
-      GET_C_STRING_FILENAME_DATA_ALLOCA (file, fileext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, file,
+                         C_STRING_ALLOCA, fileext,
+                         Qfile_name);
       /* #### NAS code should allow specification of a device. */
       if (nas_play_sound_file (fileext, vol))
        return Qnil;
       /* #### NAS code should allow specification of a device. */
       if (nas_play_sound_file (fileext, vol))
        return Qnil;
@@ -138,7 +140,9 @@ Windows the sound file must be in WAV format.
     {
       char *fileext;
 
     {
       char *fileext;
 
-      GET_C_STRING_FILENAME_DATA_ALLOCA (file, fileext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, file,
+                         C_STRING_ALLOCA, fileext,
+                         Qfile_name);
       if (esd_play_sound_file (fileext, vol))
        return Qnil;
     }
       if (esd_play_sound_file (fileext, vol))
        return Qnil;
     }
@@ -149,7 +153,9 @@ Windows the sound file must be in WAV format.
     {
       CONST char *fileext;
 
     {
       CONST char *fileext;
 
-      GET_C_STRING_FILENAME_DATA_ALLOCA (file, fileext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, file,
+                         C_STRING_ALLOCA, fileext,
+                         Qfile_name);
       /* The sound code doesn't like getting SIGIO interrupts.
         Unix sucks! */
       stop_interrupts ();
       /* The sound code doesn't like getting SIGIO interrupts.
         Unix sucks! */
       stop_interrupts ();
@@ -314,7 +320,9 @@ See the variable `sound-alist'.
       CONST Extbyte *soundext;
       Extcount soundextlen;
 
       CONST Extbyte *soundext;
       Extcount soundextlen;
 
-      GET_STRING_BINARY_DATA_ALLOCA (sound, soundext, soundextlen);
+      TO_EXTERNAL_FORMAT (LISP_STRING, sound,
+                         ALLOCA, (soundext, soundextlen),
+                         Qbinary);
       if (nas_play_sound_data ((unsigned char*)soundext, soundextlen, vol))
        return Qnil;
     }
       if (nas_play_sound_data ((unsigned char*)soundext, soundextlen, vol))
        return Qnil;
     }
@@ -326,7 +334,8 @@ See the variable `sound-alist'.
       Extbyte *soundext;
       Extcount soundextlen;
 
       Extbyte *soundext;
       Extcount soundextlen;
 
-      GET_STRING_BINARY_DATA_ALLOCA (sound, soundext, soundextlen);
+      TO_EXTERNAL_FORMAT (LISP_STRING, sound, ALLOCA, (soundext, soundextlen),
+                         Qbinary);
       if (esd_play_sound_data (soundext, soundextlen, vol))
        return Qnil;
     }
       if (esd_play_sound_data (soundext, soundextlen, vol))
        return Qnil;
     }
@@ -339,7 +348,9 @@ See the variable `sound-alist'.
       CONST Extbyte *soundext;
       Extcount soundextlen;
 
       CONST Extbyte *soundext;
       Extcount soundextlen;
 
-      GET_STRING_BINARY_DATA_ALLOCA (sound, soundext, soundextlen);
+      TO_EXTERNAL_FORMAT (LISP_STRING, sound,
+                         ALLOCA, (soundext, soundextlen),
+                         Qbinary);
       /* The sound code doesn't like getting SIGIO interrupts. Unix sucks! */
       stop_interrupts ();
       play_sound_data ((unsigned char*)soundext, soundextlen, vol);
       /* The sound code doesn't like getting SIGIO interrupts. Unix sucks! */
       stop_interrupts ();
       play_sound_data ((unsigned char*)soundext, soundextlen, vol);
index d81e55e..7846d11 100644 (file)
@@ -67,23 +67,23 @@ typedef struct
 static specifier_type_entry_dynarr *the_specifier_type_entry_dynarr;
 
 static const struct lrecord_description ste_description_1[] = {
 static specifier_type_entry_dynarr *the_specifier_type_entry_dynarr;
 
 static const struct lrecord_description ste_description_1[] = {
-  { XD_LISP_OBJECT, offsetof(specifier_type_entry, symbol), 1 },
-  { XD_STRUCT_PTR,  offsetof(specifier_type_entry, meths), 1, &specifier_methods_description },
+  { XD_LISP_OBJECT, offsetof (specifier_type_entry, symbol) },
+  { XD_STRUCT_PTR,  offsetof (specifier_type_entry, meths), 1, &specifier_methods_description },
   { XD_END }
 };
 
 static const struct struct_description ste_description = {
   { XD_END }
 };
 
 static const struct struct_description ste_description = {
-  sizeof(specifier_type_entry),
+  sizeof (specifier_type_entry),
   ste_description_1
 };
 
 static const struct lrecord_description sted_description_1[] = {
   ste_description_1
 };
 
 static const struct lrecord_description sted_description_1[] = {
-  XD_DYNARR_DESC(specifier_type_entry_dynarr, &ste_description),
+  XD_DYNARR_DESC (specifier_type_entry_dynarr, &ste_description),
   { XD_END }
 };
 
 static const struct struct_description sted_description = {
   { XD_END }
 };
 
 static const struct struct_description sted_description = {
-  sizeof(specifier_type_entry_dynarr),
+  sizeof (specifier_type_entry_dynarr),
   sted_description_1
 };
 
   sted_description_1
 };
 
@@ -162,7 +162,7 @@ cleanup_specifiers (void)
        !NILP (rest);
        rest = XSPECIFIER (rest)->next_specifier)
     {
        !NILP (rest);
        rest = XSPECIFIER (rest)->next_specifier)
     {
-      struct Lisp_Specifier *sp = XSPECIFIER (rest);
+      Lisp_Specifier *sp = XSPECIFIER (rest);
       /* This effectively changes the specifier specs.
         However, there's no need to call
         recompute_cached_specifier_everywhere() or the
       /* This effectively changes the specifier specs.
         However, there's no need to call
         recompute_cached_specifier_everywhere() or the
@@ -189,7 +189,7 @@ kill_specifier_buffer_locals (Lisp_Object buffer)
        !NILP (rest);
        rest = XSPECIFIER (rest)->next_specifier)
     {
        !NILP (rest);
        rest = XSPECIFIER (rest)->next_specifier)
     {
-      struct Lisp_Specifier *sp = XSPECIFIER (rest);
+      Lisp_Specifier *sp = XSPECIFIER (rest);
 
       /* Make sure we're actually going to be changing something.
         Fremove_specifier() always calls
 
       /* Make sure we're actually going to be changing something.
         Fremove_specifier() always calls
@@ -203,7 +203,7 @@ kill_specifier_buffer_locals (Lisp_Object buffer)
 static Lisp_Object
 mark_specifier (Lisp_Object obj)
 {
 static Lisp_Object
 mark_specifier (Lisp_Object obj)
 {
-  struct Lisp_Specifier *specifier = XSPECIFIER (obj);
+  Lisp_Specifier *specifier = XSPECIFIER (obj);
 
   mark_object (specifier->global_specs);
   mark_object (specifier->device_specs);
 
   mark_object (specifier->global_specs);
   mark_object (specifier->device_specs);
@@ -247,7 +247,7 @@ prune_specifiers (void)
     {
       if (! marked_p (rest))
        {
     {
       if (! marked_p (rest))
        {
-         struct Lisp_Specifier* sp = XSPECIFIER (rest);
+         Lisp_Specifier* sp = XSPECIFIER (rest);
          /* A bit of assertion that we're removing both parts of the
              magic one altogether */
          assert (!MAGIC_SPECIFIER_P(sp)
          /* A bit of assertion that we're removing both parts of the
              magic one altogether */
          assert (!MAGIC_SPECIFIER_P(sp)
@@ -267,7 +267,7 @@ prune_specifiers (void)
 static void
 print_specifier (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
 static void
 print_specifier (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
-  struct Lisp_Specifier *sp = XSPECIFIER (obj);
+  Lisp_Specifier *sp = XSPECIFIER (obj);
   char buf[100];
   int count = specpdl_depth ();
   Lisp_Object the_specs;
   char buf[100];
   int count = specpdl_depth ();
   Lisp_Object the_specs;
@@ -299,7 +299,7 @@ print_specifier (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 static void
 finalize_specifier (void *header, int for_disksave)
 {
 static void
 finalize_specifier (void *header, int for_disksave)
 {
-  struct Lisp_Specifier *sp = (struct Lisp_Specifier *) header;
+  Lisp_Specifier *sp = (Lisp_Specifier *) header;
   /* don't be snafued by the disksave finalization. */
   if (!for_disksave && !GHOST_SPECIFIER_P(sp) && sp->caching)
     {
   /* don't be snafued by the disksave finalization. */
   if (!for_disksave && !GHOST_SPECIFIER_P(sp) && sp->caching)
     {
@@ -311,8 +311,8 @@ finalize_specifier (void *header, int for_disksave)
 static int
 specifier_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
 static int
 specifier_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  struct Lisp_Specifier *s1 = XSPECIFIER (obj1);
-  struct Lisp_Specifier *s2 = XSPECIFIER (obj2);
+  Lisp_Specifier *s1 = XSPECIFIER (obj1);
+  Lisp_Specifier *s2 = XSPECIFIER (obj2);
   int retval;
   Lisp_Object old_inhibit_quit = Vinhibit_quit;
 
   int retval;
   Lisp_Object old_inhibit_quit = Vinhibit_quit;
 
@@ -340,7 +340,7 @@ specifier_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 static unsigned long
 specifier_hash (Lisp_Object obj, int depth)
 {
 static unsigned long
 specifier_hash (Lisp_Object obj, int depth)
 {
-  struct Lisp_Specifier *s = XSPECIFIER (obj);
+  Lisp_Specifier *s = XSPECIFIER (obj);
 
   /* specifier hashing is a bit problematic because there are so
      many places where data can be stored.  We pick what are perhaps
 
   /* specifier hashing is a bit problematic because there are so
      many places where data can be stored.  We pick what are perhaps
@@ -356,22 +356,22 @@ specifier_hash (Lisp_Object obj, int depth)
 static size_t
 sizeof_specifier (CONST void *header)
 {
 static size_t
 sizeof_specifier (CONST void *header)
 {
-  if (GHOST_SPECIFIER_P ((struct Lisp_Specifier *) header))
-    return offsetof (struct Lisp_Specifier, data);
+  if (GHOST_SPECIFIER_P ((Lisp_Specifier *) header))
+    return offsetof (Lisp_Specifier, data);
   else
     {
   else
     {
-      CONST struct Lisp_Specifier *p = (CONST struct Lisp_Specifier *) header;
-      return offsetof (struct Lisp_Specifier, data) + p->methods->extra_data_size;
+      CONST Lisp_Specifier *p = (CONST Lisp_Specifier *) header;
+      return offsetof (Lisp_Specifier, data) + p->methods->extra_data_size;
     }
 }
 
 static const struct lrecord_description specifier_methods_description_1[] = {
     }
 }
 
 static const struct lrecord_description specifier_methods_description_1[] = {
-  { XD_LISP_OBJECT, offsetof(struct specifier_methods, predicate_symbol), 1 },
+  { XD_LISP_OBJECT, offsetof (struct specifier_methods, predicate_symbol) },
   { XD_END }
 };
 
 const struct struct_description specifier_methods_description = {
   { XD_END }
 };
 
 const struct struct_description specifier_methods_description = {
-  sizeof(struct specifier_methods),
+  sizeof (struct specifier_methods),
   specifier_methods_description_1
 };
 
   specifier_methods_description_1
 };
 
@@ -380,16 +380,21 @@ static const struct lrecord_description specifier_caching_description_1[] = {
 };
 
 static const struct struct_description specifier_caching_description = {
 };
 
 static const struct struct_description specifier_caching_description = {
-  sizeof(struct specifier_caching),
+  sizeof (struct specifier_caching),
   specifier_caching_description_1
 };
 
 static const struct lrecord_description specifier_description[] = {
   specifier_caching_description_1
 };
 
 static const struct lrecord_description specifier_description[] = {
-  { XD_STRUCT_PTR,  offsetof(struct Lisp_Specifier, methods), 1, &specifier_methods_description },
-  { XD_LO_LINK,     offsetof(struct Lisp_Specifier, next_specifier) },
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Specifier, global_specs), 5 },
-  { XD_STRUCT_PTR,  offsetof(struct Lisp_Specifier, caching), 1, &specifier_caching_description },
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Specifier, magic_parent), 2 },
+  { XD_STRUCT_PTR,  offsetof (Lisp_Specifier, methods), 1, &specifier_methods_description },
+  { XD_LO_LINK,     offsetof (Lisp_Specifier, next_specifier) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Specifier, global_specs) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Specifier, device_specs) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Specifier, frame_specs) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Specifier, window_specs) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Specifier, buffer_specs) },
+  { XD_STRUCT_PTR,  offsetof (Lisp_Specifier, caching), 1, &specifier_caching_description },
+  { XD_LISP_OBJECT, offsetof (Lisp_Specifier, magic_parent) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Specifier, fallback) },
   { XD_SPECIFIER_END }
 };
 
   { XD_SPECIFIER_END }
 };
 
@@ -403,7 +408,7 @@ DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("specifier", specifier,
                                        specifier_equal, specifier_hash,
                                        specifier_description,
                                        sizeof_specifier,
                                        specifier_equal, specifier_hash,
                                        specifier_description,
                                        sizeof_specifier,
-                                       struct Lisp_Specifier);
+                                       Lisp_Specifier);
 \f
 /************************************************************************/
 /*                       Creating specifiers                            */
 \f
 /************************************************************************/
 /*                       Creating specifiers                            */
@@ -467,9 +472,9 @@ make_specifier_internal (struct specifier_methods *spec_meths,
                         size_t data_size, int call_create_meth)
 {
   Lisp_Object specifier;
                         size_t data_size, int call_create_meth)
 {
   Lisp_Object specifier;
-  struct Lisp_Specifier *sp = (struct Lisp_Specifier *)
-    alloc_lcrecord (offsetof (struct Lisp_Specifier, data) +
-                   data_size, &lrecord_specifier);
+  Lisp_Specifier *sp = (Lisp_Specifier *)
+    alloc_lcrecord (offsetof (Lisp_Specifier, data) + data_size,
+                   &lrecord_specifier);
 
   sp->methods = spec_meths;
   sp->global_specs = Qnil;
 
   sp->methods = spec_meths;
   sp->global_specs = Qnil;
@@ -1641,7 +1646,7 @@ build_up_processed_list (Lisp_Object specifier, Lisp_Object locale,
 {
   /* The return value of this function must be GCPRO'd. */
   Lisp_Object rest, list_to_build_up = Qnil;
 {
   /* The return value of this function must be GCPRO'd. */
   Lisp_Object rest, list_to_build_up = Qnil;
-  struct Lisp_Specifier *sp = XSPECIFIER (specifier);
+  Lisp_Specifier *sp = XSPECIFIER (specifier);
   struct gcpro gcpro1;
 
   GCPRO1 (list_to_build_up);
   struct gcpro gcpro1;
 
   GCPRO1 (list_to_build_up);
@@ -1698,7 +1703,7 @@ static void
 specifier_add_spec (Lisp_Object specifier, Lisp_Object locale,
                    Lisp_Object inst_list, enum spec_add_meth add_meth)
 {
 specifier_add_spec (Lisp_Object specifier, Lisp_Object locale,
                    Lisp_Object inst_list, enum spec_add_meth add_meth)
 {
-  struct Lisp_Specifier *sp = XSPECIFIER (specifier);
+  Lisp_Specifier *sp = XSPECIFIER (specifier);
   enum spec_locale_type type = locale_type_from_locale (locale);
   Lisp_Object *orig_inst_list, tem;
   Lisp_Object list_to_build_up = Qnil;
   enum spec_locale_type type = locale_type_from_locale (locale);
   Lisp_Object *orig_inst_list, tem;
   Lisp_Object list_to_build_up = Qnil;
@@ -2369,7 +2374,7 @@ See `specifier-matching-instance' for a description of matchspecs.
 void
 set_specifier_fallback (Lisp_Object specifier, Lisp_Object fallback)
 {
 void
 set_specifier_fallback (Lisp_Object specifier, Lisp_Object fallback)
 {
-  struct Lisp_Specifier *sp = XSPECIFIER (specifier);
+  Lisp_Specifier *sp = XSPECIFIER (specifier);
   assert (SPECIFIERP (fallback) ||
          !NILP (Fvalid_inst_list_p (fallback, Fspecifier_type (specifier))));
   if (SPECIFIERP (fallback))
   assert (SPECIFIERP (fallback) ||
          !NILP (Fvalid_inst_list_p (fallback, Fspecifier_type (specifier))));
   if (SPECIFIERP (fallback))
@@ -2419,7 +2424,7 @@ specifier_instance_from_inst_list (Lisp_Object specifier,
                                   Lisp_Object depth)
 {
   /* This function can GC */
                                   Lisp_Object depth)
 {
   /* This function can GC */
-  struct Lisp_Specifier *sp;
+  Lisp_Specifier *sp;
   Lisp_Object device;
   Lisp_Object rest;
   int count = specpdl_depth ();
   Lisp_Object device;
   Lisp_Object rest;
   int count = specpdl_depth ();
@@ -2502,7 +2507,7 @@ specifier_instance (Lisp_Object specifier, Lisp_Object matchspec,
   Lisp_Object device = Qnil;
   Lisp_Object tag = Qnil;
   struct device *d;
   Lisp_Object device = Qnil;
   Lisp_Object tag = Qnil;
   struct device *d;
-  struct Lisp_Specifier *sp;
+  Lisp_Specifier *sp;
 
   sp = XSPECIFIER (specifier);
 
 
   sp = XSPECIFIER (specifier);
 
@@ -2705,7 +2710,7 @@ you should not use this function; use `specifier-instance' instead.
        (specifier, domain, inst_list, default_))
 {
   Lisp_Object val = Qunbound;
        (specifier, domain, inst_list, default_))
 {
   Lisp_Object val = Qunbound;
-  struct Lisp_Specifier *sp = XSPECIFIER (specifier);
+  Lisp_Specifier *sp = XSPECIFIER (specifier);
   struct gcpro gcpro1;
   Lisp_Object built_up_list = Qnil;
 
   struct gcpro gcpro1;
   Lisp_Object built_up_list = Qnil;
 
@@ -2737,7 +2742,7 @@ works.
        (specifier, matchspec, domain, inst_list, default_))
 {
   Lisp_Object val = Qunbound;
        (specifier, matchspec, domain, inst_list, default_))
 {
   Lisp_Object val = Qunbound;
-  struct Lisp_Specifier *sp = XSPECIFIER (specifier);
+  Lisp_Specifier *sp = XSPECIFIER (specifier);
   struct gcpro gcpro1;
   Lisp_Object built_up_list = Qnil;
 
   struct gcpro gcpro1;
   Lisp_Object built_up_list = Qnil;
 
@@ -2777,7 +2782,7 @@ set_specifier_caching (Lisp_Object specifier, int struct_window_offset,
                       (Lisp_Object specifier, struct frame *f,
                        Lisp_Object oldval))
 {
                       (Lisp_Object specifier, struct frame *f,
                        Lisp_Object oldval))
 {
-  struct Lisp_Specifier *sp = XSPECIFIER (specifier);
+  Lisp_Specifier *sp = XSPECIFIER (specifier);
   assert (!GHOST_SPECIFIER_P (sp));
 
   if (!sp->caching)
   assert (!GHOST_SPECIFIER_P (sp));
 
   if (!sp->caching)
index e8c51f8..da40827 100644 (file)
@@ -21,8 +21,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_SPECIFIER_H_
-#define _XEMACS_SPECIFIER_H_
+#ifndef INCLUDED_specifier_h_
+#define INCLUDED_specifier_h_
 
 /*
   MAGIC SPECIFIERS
 
 /*
   MAGIC SPECIFIERS
@@ -237,9 +237,10 @@ struct Lisp_Specifier
   /* type-specific extra data attached to a specifier */
   char data[1];
 };
   /* type-specific extra data attached to a specifier */
   char data[1];
 };
+typedef struct Lisp_Specifier Lisp_Specifier;
 
 
-DECLARE_LRECORD (specifier, struct Lisp_Specifier);
-#define XSPECIFIER(x) XRECORD (x, specifier, struct Lisp_Specifier)
+DECLARE_LRECORD (specifier, Lisp_Specifier);
+#define XSPECIFIER(x) XRECORD (x, specifier, Lisp_Specifier)
 #define XSETSPECIFIER(x, p) XSETRECORD (x, p, specifier)
 #define SPECIFIERP(x) RECORDP (x, specifier)
 #define CHECK_SPECIFIER(x) CHECK_RECORD (x, specifier)
 #define XSETSPECIFIER(x, p) XSETRECORD (x, p, specifier)
 #define SPECIFIERP(x) RECORDP (x, specifier)
 #define CHECK_SPECIFIER(x) CHECK_RECORD (x, specifier)
@@ -252,24 +253,24 @@ DECLARE_LRECORD (specifier, struct Lisp_Specifier);
 #define SPECMETH(sp, m, args) (((sp)->methods->m##_method) args)
 
 /* Call a void-returning specifier method, if it exists.  */
 #define SPECMETH(sp, m, args) (((sp)->methods->m##_method) args)
 
 /* Call a void-returning specifier method, if it exists.  */
-#define MAYBE_SPECMETH(sp, m, args) do {               \
-  struct Lisp_Specifier *maybe_specmeth_sp = (sp);     \
-  if (HAS_SPECMETH_P (maybe_specmeth_sp, m))           \
-    SPECMETH (maybe_specmeth_sp, m, args);             \
+#define MAYBE_SPECMETH(sp, m, args) do {       \
+  Lisp_Specifier *maybe_specmeth_sp = (sp);    \
+  if (HAS_SPECMETH_P (maybe_specmeth_sp, m))   \
+    SPECMETH (maybe_specmeth_sp, m, args);     \
 } while (0)
 
 /***** Defining new specifier types *****/
 
 } while (0)
 
 /***** Defining new specifier types *****/
 
-#define specifier_data_offset (offsetof(struct Lisp_Specifier, data))
+#define specifier_data_offset (offsetof (Lisp_Specifier, data))
 extern const struct lrecord_description specifier_empty_extra_description[];
 
 #ifdef ERROR_CHECK_TYPECHECK
 #define DECLARE_SPECIFIER_TYPE(type)                                   \
 extern struct specifier_methods * type##_specifier_methods;            \
 INLINE struct type##_specifier *                                       \
 extern const struct lrecord_description specifier_empty_extra_description[];
 
 #ifdef ERROR_CHECK_TYPECHECK
 #define DECLARE_SPECIFIER_TYPE(type)                                   \
 extern struct specifier_methods * type##_specifier_methods;            \
 INLINE struct type##_specifier *                                       \
-error_check_##type##_specifier_data (struct Lisp_Specifier *sp);       \
+error_check_##type##_specifier_data (Lisp_Specifier *sp);              \
 INLINE struct type##_specifier *                                       \
 INLINE struct type##_specifier *                                       \
-error_check_##type##_specifier_data (struct Lisp_Specifier *sp)                \
+error_check_##type##_specifier_data (Lisp_Specifier *sp)               \
 {                                                                      \
   if (SPECIFIERP (sp->magic_parent))                                   \
     {                                                                  \
 {                                                                      \
   if (SPECIFIERP (sp->magic_parent))                                   \
     {                                                                  \
@@ -281,12 +282,12 @@ error_check_##type##_specifier_data (struct Lisp_Specifier *sp)           \
   assert (SPECIFIER_TYPE_P (sp, type));                                        \
   return (struct type##_specifier *) sp->data;                         \
 }                                                                      \
   assert (SPECIFIER_TYPE_P (sp, type));                                        \
   return (struct type##_specifier *) sp->data;                         \
 }                                                                      \
-INLINE struct Lisp_Specifier *                                         \
+INLINE Lisp_Specifier *                                                        \
 error_check_##type##_specifier_type (Lisp_Object obj);                 \
 error_check_##type##_specifier_type (Lisp_Object obj);                 \
-INLINE struct Lisp_Specifier *                                         \
+INLINE Lisp_Specifier *                                                        \
 error_check_##type##_specifier_type (Lisp_Object obj)                  \
 {                                                                      \
 error_check_##type##_specifier_type (Lisp_Object obj)                  \
 {                                                                      \
-  struct Lisp_Specifier *sp = XSPECIFIER (obj);                                \
+  Lisp_Specifier *sp = XSPECIFIER (obj);                               \
   assert (SPECIFIER_TYPE_P (sp, type));                                        \
   return sp;                                                           \
 }                                                                      \
   assert (SPECIFIER_TYPE_P (sp, type));                                        \
   return sp;                                                           \
 }                                                                      \
@@ -492,4 +493,4 @@ DECLARE_SPECIFIER_TYPE (display_table);
 #define CHECK_DISPLAYTABLE_SPECIFIER(x) CHECK_SPECIFIER_TYPE (x, display_table)
 #define CONCHECK_DISPLAYTABLE_SPECIFIER(x) CONCHECK_SPECIFIER_TYPE (x, display_table)
 
 #define CHECK_DISPLAYTABLE_SPECIFIER(x) CHECK_SPECIFIER_TYPE (x, display_table)
 #define CONCHECK_DISPLAYTABLE_SPECIFIER(x) CONCHECK_SPECIFIER_TYPE (x, display_table)
 
-#endif /* _XEMACS_SPECIFIER_H_ */
+#endif /* INCLUDED_specifier_h_ */
index 8c45073..4207525 100644 (file)
@@ -89,7 +89,7 @@ static Lisp_Object follow_varalias_pointers (Lisp_Object symbol,
 static Lisp_Object
 mark_symbol (Lisp_Object obj)
 {
 static Lisp_Object
 mark_symbol (Lisp_Object obj)
 {
-  struct Lisp_Symbol *sym = XSYMBOL (obj);
+  Lisp_Symbol *sym = XSYMBOL (obj);
   Lisp_Object pname;
 
   mark_object (sym->value);
   Lisp_Object pname;
 
   mark_object (sym->value);
@@ -109,13 +109,17 @@ mark_symbol (Lisp_Object obj)
 }
 
 static const struct lrecord_description symbol_description[] = {
 }
 
 static const struct lrecord_description symbol_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct Lisp_Symbol, next), 5 },
+  { XD_LISP_OBJECT, offsetof (Lisp_Symbol, next) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Symbol, name) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Symbol, value) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Symbol, function) },
+  { XD_LISP_OBJECT, offsetof (Lisp_Symbol, plist) },
   { XD_END }
 };
 
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("symbol", symbol,
                                     mark_symbol, print_symbol, 0, 0, 0,
   { XD_END }
 };
 
 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("symbol", symbol,
                                     mark_symbol, print_symbol, 0, 0, 0,
-                                    symbol_description, struct Lisp_Symbol);
+                                    symbol_description, Lisp_Symbol);
 
 \f
 /**********************************************************************/
 
 \f
 /**********************************************************************/
@@ -173,7 +177,7 @@ it defaults to the value of `obarray'.
        (string, obarray))
 {
   Lisp_Object object, *ptr;
        (string, obarray))
 {
   Lisp_Object object, *ptr;
-  struct Lisp_Symbol *symbol;
+  Lisp_Symbol *symbol;
   Bytecount len;
 
   if (NILP (obarray)) obarray = Vobarray;
   Bytecount len;
 
   if (NILP (obarray)) obarray = Vobarray;
@@ -222,7 +226,7 @@ it defaults to the value of `obarray'.
   /* #### Bug!  (intern-soft "nil") returns nil.  Perhaps we should
      add a DEFAULT-IF-NOT-FOUND arg, like in get.  */
   Lisp_Object tem;
   /* #### Bug!  (intern-soft "nil") returns nil.  Perhaps we should
      add a DEFAULT-IF-NOT-FOUND arg, like in get.  */
   Lisp_Object tem;
-  struct Lisp_String *string;
+  Lisp_String *string;
 
   if (NILP (obarray)) obarray = Vobarray;
   obarray = check_obarray (obarray);
 
   if (NILP (obarray)) obarray = Vobarray;
   obarray = check_obarray (obarray);
@@ -252,7 +256,7 @@ OBARRAY defaults to the value of the variable `obarray'
        (name, obarray))
 {
   Lisp_Object tem;
        (name, obarray))
 {
   Lisp_Object tem;
-  struct Lisp_String *string;
+  Lisp_String *string;
   int hash;
 
   if (NILP (obarray)) obarray = Vobarray;
   int hash;
 
   if (NILP (obarray)) obarray = Vobarray;
@@ -311,7 +315,7 @@ Lisp_Object
 oblookup (Lisp_Object obarray, CONST Bufbyte *ptr, Bytecount size)
 {
   int hash, obsize;
 oblookup (Lisp_Object obarray, CONST Bufbyte *ptr, Bytecount size)
 {
   int hash, obsize;
-  struct Lisp_Symbol *tail;
+  Lisp_Symbol *tail;
   Lisp_Object bucket;
 
   if (!VECTORP (obarray) ||
   Lisp_Object bucket;
 
   if (!VECTORP (obarray) ||
@@ -394,7 +398,7 @@ map_obarray (Lisp_Object obarray,
       if (SYMBOLP (tail))
        while (1)
          {
       if (SYMBOLP (tail))
        while (1)
          {
-           struct Lisp_Symbol *next;
+           Lisp_Symbol *next;
            if ((*fn) (tail, arg))
              return;
            next = symbol_next (XSYMBOL (tail));
            if ((*fn) (tail, arg))
              return;
            next = symbol_next (XSYMBOL (tail));
@@ -770,8 +774,8 @@ Set SYMBOL's property list to NEWPLIST, and return NEWPLIST.
 
    SYMVAL_CONST_SPECIFIER_FORWARD:
       (declare with DEFVAR_SPECIFIER)
 
    SYMVAL_CONST_SPECIFIER_FORWARD:
       (declare with DEFVAR_SPECIFIER)
-      Exactly like SYMVAL_CONST_OBJECT_FORWARD except that error message
-      you get when attempting to set the value says to use
+      Exactly like SYMVAL_CONST_OBJECT_FORWARD except that the error
+      message you get when attempting to set the value says to use
       `set-specifier' instead.
 
    SYMVAL_CURRENT_BUFFER_FORWARD:
       `set-specifier' instead.
 
    SYMVAL_CURRENT_BUFFER_FORWARD:
@@ -959,18 +963,19 @@ static const struct lrecord_description symbol_value_forward_description[] = {
 };
 
 static const struct lrecord_description symbol_value_buffer_local_description[] = {
 };
 
 static const struct lrecord_description symbol_value_buffer_local_description[] = {
-  { XD_LISP_OBJECT,  offsetof(struct symbol_value_buffer_local, default_value), 1 },
-  { XD_LO_RESET_NIL, offsetof(struct symbol_value_buffer_local, current_value), 3 },
+  { XD_LISP_OBJECT,  offsetof (struct symbol_value_buffer_local, default_value) },
+  { XD_LO_RESET_NIL, offsetof (struct symbol_value_buffer_local, current_value), 3 },
   { XD_END }
 };
 
 static const struct lrecord_description symbol_value_lisp_magic_description[] = {
   { XD_END }
 };
 
 static const struct lrecord_description symbol_value_lisp_magic_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct symbol_value_lisp_magic, handler), 2*MAGIC_HANDLER_MAX+1 },
+  { XD_LISP_OBJECT_ARRAY, offsetof (struct symbol_value_lisp_magic, handler), 2*MAGIC_HANDLER_MAX+1 },
   { XD_END }
 };
 
 static const struct lrecord_description symbol_value_varalias_description[] = {
   { XD_END }
 };
 
 static const struct lrecord_description symbol_value_varalias_description[] = {
-  { XD_LISP_OBJECT, offsetof(struct symbol_value_varalias, aliasee), 2 },
+  { XD_LISP_OBJECT, offsetof (struct symbol_value_varalias, aliasee) },
+  { XD_LISP_OBJECT, offsetof (struct symbol_value_varalias, shadowed) },
   { XD_END }
 };
 
   { XD_END }
 };
 
@@ -1619,7 +1624,7 @@ Set SYMBOL's value to NEWVAL, and return NEWVAL.
        (symbol, newval))
 {
   REGISTER Lisp_Object valcontents;
        (symbol, newval))
 {
   REGISTER Lisp_Object valcontents;
-  struct Lisp_Symbol *sym;
+  Lisp_Symbol *sym;
   /* remember, we're called by Fmakunbound() as well */
 
   CHECK_SYMBOL (symbol);
   /* remember, we're called by Fmakunbound() as well */
 
   CHECK_SYMBOL (symbol);
@@ -1643,23 +1648,20 @@ Set SYMBOL's value to NEWVAL, and return NEWVAL.
   reject_constant_symbols (symbol, newval, 0,
                           UNBOUNDP (newval) ? Qmakunbound : Qset);
 
   reject_constant_symbols (symbol, newval, 0,
                           UNBOUNDP (newval) ? Qmakunbound : Qset);
 
- retry_2:
-
   switch (XSYMBOL_VALUE_MAGIC_TYPE (valcontents))
     {
     case SYMVAL_LISP_MAGIC:
       {
   switch (XSYMBOL_VALUE_MAGIC_TYPE (valcontents))
     {
     case SYMVAL_LISP_MAGIC:
       {
-       Lisp_Object retval;
-
        if (UNBOUNDP (newval))
        if (UNBOUNDP (newval))
-         retval = maybe_call_magic_handler (symbol, Qmakunbound, 0);
+         {
+           maybe_call_magic_handler (symbol, Qmakunbound, 0);
+           return XSYMBOL_VALUE_LISP_MAGIC (valcontents)->shadowed = Qunbound;
+         }
        else
        else
-         retval = maybe_call_magic_handler (symbol, Qset, 1, newval);
-       if (!UNBOUNDP (retval))
-         return newval;
-       valcontents = XSYMBOL_VALUE_LISP_MAGIC (valcontents)->shadowed;
-       /* semi-change-o */
-       goto retry_2;
+         {
+           maybe_call_magic_handler (symbol, Qset, 1, newval);
+           return XSYMBOL_VALUE_LISP_MAGIC (valcontents)->shadowed = newval;
+         }
       }
 
     case SYMVAL_VARALIAS:
       }
 
     case SYMVAL_VARALIAS:
@@ -2845,7 +2847,7 @@ maybe_call_magic_handler (Lisp_Object sym, Lisp_Object funsym, int nargs, ...)
   Lisp_Object legerdemain;
   struct symbol_value_lisp_magic *bfwd;
 
   Lisp_Object legerdemain;
   struct symbol_value_lisp_magic *bfwd;
 
-  assert (nargs >= 0 && nargs < 20);
+  assert (nargs >= 0 && nargs < countof (args));
   legerdemain = XSYMBOL (sym)->value;
   assert (SYMBOL_VALUE_LISP_MAGIC_P (legerdemain));
   bfwd = XSYMBOL_VALUE_LISP_MAGIC (legerdemain);
   legerdemain = XSYMBOL (sym)->value;
   assert (SYMBOL_VALUE_LISP_MAGIC_P (legerdemain));
   bfwd = XSYMBOL_VALUE_LISP_MAGIC (legerdemain);
@@ -3111,15 +3113,7 @@ static struct symbol_value_magic guts_of_unbound_marker =
 void
 init_symbols_once_early (void)
 {
 void
 init_symbols_once_early (void)
 {
-#ifndef Qzero
-  Qzero = make_int (0);        /* Only used if Lisp_Object is a union type */
-#endif
-
-#ifndef Qnull_pointer
-  /* C guarantees that Qnull_pointer will be initialized to all 0 bits,
-     so the following is actually a no-op.  */
-  XSETOBJ (Qnull_pointer, (enum Lisp_Type) 0, 0);
-#endif
+  reinit_symbols_once_early ();
 
   /* Bootstrapping problem: Qnil isn't set when make_string_nocopy is
      called the first time. */
 
   /* Bootstrapping problem: Qnil isn't set when make_string_nocopy is
      called the first time. */
@@ -3168,6 +3162,20 @@ init_symbols_once_early (void)
 }
 
 void
 }
 
 void
+reinit_symbols_once_early (void)
+{
+#ifndef Qzero
+  Qzero = make_int (0);        /* Only used if Lisp_Object is a union type */
+#endif
+
+#ifndef Qnull_pointer
+  /* C guarantees that Qnull_pointer will be initialized to all 0 bits,
+     so the following is actually a no-op.  */
+  XSETOBJ (Qnull_pointer, (enum Lisp_Type) 0, 0);
+#endif
+}
+
+void
 defsymbol_nodump (Lisp_Object *location, CONST char *name)
 {
   *location = Fintern (make_string_nocopy ((CONST Bufbyte *) name,
 defsymbol_nodump (Lisp_Object *location, CONST char *name)
 {
   *location = Fintern (make_string_nocopy ((CONST Bufbyte *) name,
@@ -3239,15 +3247,14 @@ check_sane_subr (Lisp_Subr *subr, Lisp_Object sym)
  * FIXME: Should newsubr be staticpro()'ed? I dont think so but I need
  * a guru to check.
  */
  * FIXME: Should newsubr be staticpro()'ed? I dont think so but I need
  * a guru to check.
  */
-#define check_module_subr()                                             \
-do {                                                                    \
-  if (initialized) {                                                    \
-    struct Lisp_Subr *newsubr;                                          \
-    newsubr = (Lisp_Subr *)xmalloc(sizeof(struct Lisp_Subr));           \
-    memcpy (newsubr, subr, sizeof(struct Lisp_Subr));                   \
-    subr->doc = (CONST char *)newsubr;                                  \
-    subr = newsubr;                                                     \
-  }                                                                     \
+#define check_module_subr()                                            \
+do {                                                                   \
+  if (initialized) {                                                   \
+    Lisp_Subr *newsubr = (Lisp_Subr *) xmalloc (sizeof (Lisp_Subr));   \
+    memcpy (newsubr, subr, sizeof (Lisp_Subr));                                \
+    subr->doc = (CONST char *)newsubr;                                 \
+    subr = newsubr;                                                    \
+  }                                                                    \
 } while (0)
 #else /* ! HAVE_SHLIB */
 #define check_module_subr()
 } while (0)
 #else /* ! HAVE_SHLIB */
 #define check_module_subr()
index f51e9a4..caf4490 100644 (file)
@@ -23,8 +23,8 @@ Boston, MA 02111-1307, USA.  */
 /* Fsymbol_value checks whether XSYMBOL (sym)->value is one of these,
  *  and does weird magic stuff if so */
 
 /* Fsymbol_value checks whether XSYMBOL (sym)->value is one of these,
  *  and does weird magic stuff if so */
 
-#ifndef _XEMACS_SYMEVAL_H_
-#define _XEMACS_SYMEVAL_H_
+#ifndef INCLUDED_symeval_h_
+#define INCLUDED_symeval_h_
 
 enum symbol_value_type
 {
 
 enum symbol_value_type
 {
@@ -325,10 +325,10 @@ void defvar_magic (CONST char *symbol_name, CONST struct symbol_value_forward *m
 #define DEFVAR_CONST_BOOL(lname, c_location) \
        DEFVAR_SYMVAL_FWD (lname, c_location, SYMVAL_CONST_BOOLEAN_FORWARD, 0)
 #define DEFVAR_LISP_MAGIC(lname, c_location, magicfun) \
 #define DEFVAR_CONST_BOOL(lname, c_location) \
        DEFVAR_SYMVAL_FWD (lname, c_location, SYMVAL_CONST_BOOLEAN_FORWARD, 0)
 #define DEFVAR_LISP_MAGIC(lname, c_location, magicfun) \
-       DEFVAR_SYMVAL_FWD_OBJECT (lname, c_location, SYMVAL_OBJECT_FORWARD, magicfun);
+       DEFVAR_SYMVAL_FWD_OBJECT (lname, c_location, SYMVAL_OBJECT_FORWARD, magicfun)
 #define DEFVAR_INT_MAGIC(lname, c_location, magicfun) \
 #define DEFVAR_INT_MAGIC(lname, c_location, magicfun) \
-       DEFVAR_SYMVAL_FWD (lname, c_location, SYMVAL_FIXNUM_FORWARD, magicfun);
+       DEFVAR_SYMVAL_FWD (lname, c_location, SYMVAL_FIXNUM_FORWARD, magicfun)
 #define DEFVAR_BOOL_MAGIC(lname, c_location, magicfun) \
 #define DEFVAR_BOOL_MAGIC(lname, c_location, magicfun) \
-       DEFVAR_SYMVAL_FWD (lname, c_location, SYMVAL_BOOLEAN_FORWARD, magicfun);
+       DEFVAR_SYMVAL_FWD (lname, c_location, SYMVAL_BOOLEAN_FORWARD, magicfun)
 
 
-#endif /* _XEMACS_SYMEVAL_H_ */
+#endif /* INCLUDED_symeval_h_ */
index 2e6a4e3..9b17ab5 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_SYMSINIT_H_
-#define _XEMACS_SYMSINIT_H_
+#ifndef INCLUDED_symsinit_h_
+#define INCLUDED_symsinit_h_
 
 /* Earliest environment initializations (dump-time and run-time). */
 
 
 /* Earliest environment initializations (dump-time and run-time). */
 
@@ -38,6 +38,7 @@ void init_signals_very_early (void);
 void init_alloc_once_early (void);
 void reinit_alloc_once_early (void);
 void init_symbols_once_early (void);
 void init_alloc_once_early (void);
 void reinit_alloc_once_early (void);
 void init_symbols_once_early (void);
+void reinit_symbols_once_early (void);
 void init_errors_once_early (void);
 void reinit_opaque_once_early (void);
 void init_opaque_once_early (void);
 void init_errors_once_early (void);
 void reinit_opaque_once_early (void);
 void init_opaque_once_early (void);
@@ -97,6 +98,7 @@ void syms_of_glyphs_eimage (void);
 void syms_of_glyphs_widget (void);
 void syms_of_glyphs_mswindows (void);
 void syms_of_glyphs (void);
 void syms_of_glyphs_widget (void);
 void syms_of_glyphs_mswindows (void);
 void syms_of_glyphs (void);
+void syms_of_gui_mswindows (void);
 void syms_of_gui_x (void);
 void syms_of_gui (void);
 void syms_of_gutter (void);
 void syms_of_gui_x (void);
 void syms_of_gui (void);
 void syms_of_gutter (void);
@@ -142,12 +144,13 @@ void syms_of_specifier (void);
 void syms_of_sunpro (void);
 void syms_of_symbols (void);
 void syms_of_syntax (void);
 void syms_of_sunpro (void);
 void syms_of_symbols (void);
 void syms_of_syntax (void);
+void syms_of_tests (void);
 void syms_of_toolbar (void);
 void syms_of_tooltalk (void);
 void syms_of_undo (void);
 void syms_of_widget (void);
 void syms_of_window (void);
 void syms_of_toolbar (void);
 void syms_of_tooltalk (void);
 void syms_of_undo (void);
 void syms_of_widget (void);
 void syms_of_window (void);
-void syms_of_xselect (void);
+void syms_of_select_x (void);
 void syms_of_eldap (void);
 void syms_of_gpmevent (void);
 
 void syms_of_eldap (void);
 void syms_of_gpmevent (void);
 
@@ -334,6 +337,7 @@ void vars_of_mule_ccl(void);
 void vars_of_mule_charset (void);
 void vars_of_file_coding (void);
 void vars_of_mule_wnn (void);
 void vars_of_mule_charset (void);
 void vars_of_file_coding (void);
 void vars_of_mule_wnn (void);
+void vars_of_nt (void);
 void vars_of_ntproc (void);
 void vars_of_objects (void);
 void reinit_vars_of_objects (void);
 void vars_of_ntproc (void);
 void vars_of_objects (void);
 void reinit_vars_of_objects (void);
@@ -362,14 +366,15 @@ void vars_of_specifier (void);
 void vars_of_sunpro (void);
 void vars_of_symbols (void);
 void vars_of_syntax (void);
 void vars_of_sunpro (void);
 void vars_of_symbols (void);
 void vars_of_syntax (void);
+void vars_of_tests (void);
 void vars_of_toolbar (void);
 void vars_of_tooltalk (void);
 void vars_of_undo (void);
 void reinit_vars_of_undo (void);
 void vars_of_window (void);
 void reinit_vars_of_window (void);
 void vars_of_toolbar (void);
 void vars_of_tooltalk (void);
 void vars_of_undo (void);
 void reinit_vars_of_undo (void);
 void vars_of_window (void);
 void reinit_vars_of_window (void);
-void vars_of_xselect (void);
-void reinit_vars_of_xselect (void);
+void vars_of_select_x (void);
+void reinit_vars_of_select_x (void);
 void vars_of_eldap (void);
 void vars_of_gpmevent (void);
 
 void vars_of_eldap (void);
 void vars_of_gpmevent (void);
 
@@ -442,4 +447,4 @@ void init_xemacs_process (void);
 void init_redisplay (void);
 void init_sunpro (void);
 
 void init_redisplay (void);
 void init_sunpro (void);
 
-#endif /* _XEMACS_SYMSINIT_H_ */
+#endif /* INCLUDED_symsinit_h_ */
index d4cd963..4445803 100644 (file)
@@ -117,7 +117,7 @@ static Bufpos
 find_defun_start (struct buffer *buf, Bufpos pos)
 {
   Bufpos tem;
 find_defun_start (struct buffer *buf, Bufpos pos)
 {
   Bufpos tem;
-  struct Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
+  Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
 
   /* Use previous finding, if it's valid and applies to this inquiry.  */
   if (buf == find_start_buffer
 
   /* Use previous finding, if it's valid and applies to this inquiry.  */
   if (buf == find_start_buffer
@@ -268,7 +268,7 @@ syntax table.
 */
        (ch, table))
 {
 */
        (ch, table))
 {
-  struct Lisp_Char_Table *mirrortab;
+  Lisp_Char_Table *mirrortab;
 
   if (NILP(ch))
     {
 
   if (NILP(ch))
     {
@@ -314,7 +314,7 @@ syntax table.
 */
        (ch, table))
 {
 */
        (ch, table))
 {
-  struct Lisp_Char_Table *mirrortab;
+  Lisp_Char_Table *mirrortab;
   int code;
 
   CHECK_CHAR_COERCE_INT (ch);
   int code;
 
   CHECK_CHAR_COERCE_INT (ch);
@@ -348,7 +348,7 @@ Bufpos
 scan_words (struct buffer *buf, Bufpos from, int count)
 {
   Bufpos limit = count > 0 ? BUF_ZV (buf) : BUF_BEGV (buf);
 scan_words (struct buffer *buf, Bufpos from, int count)
 {
   Bufpos limit = count > 0 ? BUF_ZV (buf) : BUF_BEGV (buf);
-  struct Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
+  Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
   Emchar ch0, ch1;
   enum syntaxcode code;
 
   Emchar ch0, ch1;
   enum syntaxcode code;
 
@@ -476,7 +476,7 @@ find_start_of_comment (struct buffer *buf, Bufpos from, Bufpos stop, int mask)
 {
   Emchar c;
   enum syntaxcode code;
 {
   Emchar c;
   enum syntaxcode code;
-  struct Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
+  Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
 
   /* Look back, counting the parity of string-quotes,
      and recording the comment-starters seen.
 
   /* Look back, counting the parity of string-quotes,
      and recording the comment-starters seen.
@@ -610,7 +610,7 @@ static Bufpos
 find_end_of_comment (struct buffer *buf, Bufpos from, Bufpos stop, int mask)
 {
   int c;
 find_end_of_comment (struct buffer *buf, Bufpos from, Bufpos stop, int mask)
 {
   int c;
-  struct Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
+  Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
 
   while (1)
     {
 
   while (1)
     {
@@ -663,7 +663,7 @@ Optional argument BUFFER defaults to the current buffer.
   enum syntaxcode code;
   EMACS_INT count;
   struct buffer *buf = decode_buffer (buffer, 0);
   enum syntaxcode code;
   EMACS_INT count;
   struct buffer *buf = decode_buffer (buffer, 0);
-  struct Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
+  Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
 
   CHECK_INT (n);
   count = XINT (n);
 
   CHECK_INT (n);
   count = XINT (n);
@@ -817,7 +817,7 @@ scan_lists (struct buffer *buf, Bufpos from, int count, int depth,
   enum syntaxcode code;
   int min_depth = depth;    /* Err out if depth gets less than this. */
   Lisp_Object syntaxtab = buf->syntax_table;
   enum syntaxcode code;
   int min_depth = depth;    /* Err out if depth gets less than this. */
   Lisp_Object syntaxtab = buf->syntax_table;
-  struct Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
+  Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
 
   if (depth > 0) min_depth = 0;
 
 
   if (depth > 0) min_depth = 0;
 
@@ -1136,7 +1136,7 @@ char_quoted (struct buffer *buf, Bufpos pos)
   enum syntaxcode code;
   Bufpos beg = BUF_BEGV (buf);
   int quoted = 0;
   enum syntaxcode code;
   Bufpos beg = BUF_BEGV (buf);
   int quoted = 0;
-  struct Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
+  Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
 
   while (pos > beg
         && ((code = SYNTAX (mirrortab, BUF_FETCH_CHAR (buf, pos - 1)))
 
   while (pos > beg
         && ((code = SYNTAX (mirrortab, BUF_FETCH_CHAR (buf, pos - 1)))
@@ -1218,7 +1218,7 @@ Optional arg BUFFER defaults to the current buffer.
   struct buffer *buf = decode_buffer (buffer, 0);
   Bufpos beg = BUF_BEGV (buf);
   Bufpos pos = BUF_PT (buf);
   struct buffer *buf = decode_buffer (buffer, 0);
   Bufpos beg = BUF_BEGV (buf);
   Bufpos pos = BUF_PT (buf);
-  struct Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
+  Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
 
   while (pos > beg && !char_quoted (buf, pos - 1)
         && (SYNTAX (mirrortab, BUF_FETCH_CHAR (buf, pos - 1)) == Squote
 
   while (pos > beg && !char_quoted (buf, pos - 1)
         && (SYNTAX (mirrortab, BUF_FETCH_CHAR (buf, pos - 1)) == Squote
@@ -1258,7 +1258,7 @@ scan_sexps_forward (struct buffer *buf, struct lisp_parse_state *stateptr,
   Lisp_Object tem;
   int mask;                                 /* comment mask */
   Lisp_Object syntaxtab = buf->syntax_table;
   Lisp_Object tem;
   int mask;                                 /* comment mask */
   Lisp_Object syntaxtab = buf->syntax_table;
-  struct Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
+  Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
 
   if (NILP (oldstate))
     {
 
   if (NILP (oldstate))
     {
@@ -1611,7 +1611,7 @@ cmst_mapfun (struct chartab_range *range, Lisp_Object val, void *arg)
 }
 
 static void
 }
 
 static void
-update_just_this_syntax_table (struct Lisp_Char_Table *ct)
+update_just_this_syntax_table (Lisp_Char_Table *ct)
 {
   struct chartab_range range;
   struct cmst_arg arg;
 {
   struct chartab_range range;
   struct cmst_arg arg;
@@ -1629,7 +1629,7 @@ update_just_this_syntax_table (struct Lisp_Char_Table *ct)
    one. */
 
 void
    one. */
 
 void
-update_syntax_table (struct Lisp_Char_Table *ct)
+update_syntax_table (Lisp_Char_Table *ct)
 {
   /* Don't be stymied at startup. */
   if (CHAR_TABLEP (Vstandard_syntax_table)
 {
   /* Don't be stymied at startup. */
   if (CHAR_TABLEP (Vstandard_syntax_table)
index 4c57a7a..deb98e3 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: FSF 19.28. */
 
 
 /* Synched up with: FSF 19.28. */
 
-#ifndef _XEMACS_SYNTAX_H_
-#define _XEMACS_SYNTAX_H_
+#ifndef INCLUDED_syntax_h_
+#define INCLUDED_syntax_h_
 
 #include "chartab.h"
 
 
 #include "chartab.h"
 
@@ -72,9 +72,9 @@ enum syntaxcode charset_syntax (struct buffer *buf, Lisp_Object charset,
 #define SYNTAX_CODE_UNSAFE(table, c) \
    XINT (CHAR_TABLE_VALUE_UNSAFE (table, c))
 
 #define SYNTAX_CODE_UNSAFE(table, c) \
    XINT (CHAR_TABLE_VALUE_UNSAFE (table, c))
 
-INLINE int SYNTAX_CODE (struct Lisp_Char_Table *table, Emchar c);
+INLINE int SYNTAX_CODE (Lisp_Char_Table *table, Emchar c);
 INLINE int
 INLINE int
-SYNTAX_CODE (struct Lisp_Char_Table *table, Emchar c)
+SYNTAX_CODE (Lisp_Char_Table *table, Emchar c)
 {
   return SYNTAX_CODE_UNSAFE (table, c);
 }
 {
   return SYNTAX_CODE_UNSAFE (table, c);
 }
@@ -85,9 +85,9 @@ SYNTAX_CODE (struct Lisp_Char_Table *table, Emchar c)
 #define SYNTAX_FROM_CODE(code) ((enum syntaxcode) ((code) & 0177))
 #define SYNTAX(table, c) SYNTAX_FROM_CODE (SYNTAX_CODE (table, c))
 
 #define SYNTAX_FROM_CODE(code) ((enum syntaxcode) ((code) & 0177))
 #define SYNTAX(table, c) SYNTAX_FROM_CODE (SYNTAX_CODE (table, c))
 
-INLINE int WORD_SYNTAX_P (struct Lisp_Char_Table *table, Emchar c);
+INLINE int WORD_SYNTAX_P (Lisp_Char_Table *table, Emchar c);
 INLINE int
 INLINE int
-WORD_SYNTAX_P (struct Lisp_Char_Table *table, Emchar c)
+WORD_SYNTAX_P (Lisp_Char_Table *table, Emchar c)
 {
   return SYNTAX (table, c) == Sword;
 }
 {
   return SYNTAX (table, c) == Sword;
 }
@@ -249,6 +249,6 @@ Lisp_Object syntax_match (Lisp_Object table, Emchar ch);
 extern int no_quit_in_re_search;
 extern struct buffer *regex_emacs_buffer;
 
 extern int no_quit_in_re_search;
 extern struct buffer *regex_emacs_buffer;
 
-void update_syntax_table (struct Lisp_Char_Table *ct);
+void update_syntax_table (Lisp_Char_Table *ct);
 
 
-#endif /* _XEMACS_SYNTAX_H_ */
+#endif /* INCLUDED_syntax_h_ */
index 99b4313..49661f4 100644 (file)
@@ -33,19 +33,19 @@ Boston, MA 02111-1307, USA.  */
 
 #ifdef WINDOWSNT
 #include <direct.h>
 
 #ifdef WINDOWSNT
 #include <direct.h>
-#ifndef __MINGW32__
+#ifdef __MINGW32__
+#include <mingw32/process.h>
+#else
 /* <process.h> should not conflict with "process.h", as per ANSI definition.
 /* <process.h> should not conflict with "process.h", as per ANSI definition.
-   This is not true though with visual c though. The trick below works with
-   VC4.2b and with VC5.0. It assumes that VC is installed in a kind of
-   standard way, so include files get to what/ever/path/include.
+   This is not true with visual c though. The trick below works with
+   VC4.2b, 5.0 and 6.0. It assumes that VC is installed in a kind of
+   standard way, so include path ends with /include.
 
    Unfortunately, this must go before lisp.h, since process.h defines abort()
    which will conflict with the macro defined in lisp.h
 */
 #include <../include/process.h>
 
    Unfortunately, this must go before lisp.h, since process.h defines abort()
    which will conflict with the macro defined in lisp.h
 */
 #include <../include/process.h>
-#else
-#include <mingw32/process.h>
-#endif
+#endif /* __MINGW32__ */
 #endif /* WINDOWSNT */
 
 #include "lisp.h"
 #endif /* WINDOWSNT */
 
 #include "lisp.h"
@@ -90,7 +90,6 @@ Boston, MA 02111-1307, USA.  */
 
 #ifdef WINDOWSNT
 #include <sys/utime.h>
 
 #ifdef WINDOWSNT
 #include <sys/utime.h>
-#include <windows.h>
 #include "ntheap.h"
 #endif
 
 #include "ntheap.h"
 #endif
 
@@ -386,7 +385,7 @@ void wait_for_termination (int pid)
                          "failure to obtain process exit value");
        }
     }
                          "failure to obtain process exit value");
        }
     }
-  if (pHandle != NULL && !CloseHandle(pHandle)) 
+  if (pHandle != NULL && !CloseHandle(pHandle))
     {
       warn_when_safe (Qprocess, Qwarning,
                      "failure to close unknown process");
     {
       warn_when_safe (Qprocess, Qwarning,
                      "failure to close unknown process");
@@ -539,7 +538,7 @@ child_setup_tty (int out)
 #endif /* no TIOCGPGRP or no TIOCGLTC or no TIOCGETC */
   s.main.c_cc[VEOL] = _POSIX_VDISABLE;
 #if defined (CBAUD)
 #endif /* no TIOCGPGRP or no TIOCGLTC or no TIOCGETC */
   s.main.c_cc[VEOL] = _POSIX_VDISABLE;
 #if defined (CBAUD)
-  /* <mdiers> ### This is not portable. ###
+  /* <mdiers> #### This is not portable. ###
      POSIX does not specify CBAUD, and 4.4BSD does not have it.
      Instead, POSIX suggests to use cfset{i,o}speed().
      [cf. D. Lewine, POSIX Programmer's Guide, Chapter 8: Terminal
      POSIX does not specify CBAUD, and 4.4BSD does not have it.
      Instead, POSIX suggests to use cfset{i,o}speed().
      [cf. D. Lewine, POSIX Programmer's Guide, Chapter 8: Terminal
@@ -1708,11 +1707,9 @@ tty_init_sys_modes_on_device (struct device *d)
 #ifdef TCXONC
   if (!TTY_FLAGS (con).flow_control) ioctl (input_fd, TCXONC, 1);
 #endif
 #ifdef TCXONC
   if (!TTY_FLAGS (con).flow_control) ioctl (input_fd, TCXONC, 1);
 #endif
-#ifndef APOLLO
 #ifdef TIOCSTART
   if (!TTY_FLAGS (con).flow_control) ioctl (input_fd, TIOCSTART, 0);
 #endif
 #ifdef TIOCSTART
   if (!TTY_FLAGS (con).flow_control) ioctl (input_fd, TIOCSTART, 0);
 #endif
-#endif
 
 #if defined (HAVE_TERMIOS) || defined (HPUX9)
 #ifdef TCOON
 
 #if defined (HAVE_TERMIOS) || defined (HPUX9)
 #ifdef TCOON
@@ -2124,7 +2121,7 @@ hft_reset (struct console *con)
 /*                    limits of text/data segments                      */
 /************************************************************************/
 
 /*                    limits of text/data segments                      */
 /************************************************************************/
 
-#ifndef CANNOT_DUMP
+#if !defined(CANNOT_DUMP) && !defined(PDUMP)
 #define NEED_STARTS
 #endif
 
 #define NEED_STARTS
 #endif
 
@@ -2144,13 +2141,14 @@ hft_reset (struct console *con)
  *
  */
 
  *
  */
 
+#if !defined(HAVE_TEXT_START) && !defined(PDUMP)
+
 #ifdef __cplusplus
   extern "C" int _start (void);
 #else
   extern int _start (void);
 #endif
 
 #ifdef __cplusplus
   extern "C" int _start (void);
 #else
   extern int _start (void);
 #endif
 
-#ifndef HAVE_TEXT_START
 char *
 start_of_text (void)
 {
 char *
 start_of_text (void)
 {
@@ -2165,7 +2163,7 @@ start_of_text (void)
 #endif /* GOULD */
 #endif /* TEXT_START */
 }
 #endif /* GOULD */
 #endif /* TEXT_START */
 }
-#endif /* not HAVE_TEXT_START */
+#endif /* !defined(HAVE_TEXT_START) && !defined(PDUMP) */
 
 /*
  *     Return the address of the start of the data segment prior to
 
 /*
  *     Return the address of the start of the data segment prior to
@@ -2224,7 +2222,7 @@ start_of_data (void)
 }
 #endif /* NEED_STARTS (not CANNOT_DUMP or not SYSTEM_MALLOC) */
 
 }
 #endif /* NEED_STARTS (not CANNOT_DUMP or not SYSTEM_MALLOC) */
 
-#ifndef CANNOT_DUMP
+#if !defined(CANNOT_DUMP) && !defined(PDUMP)
 /* Some systems that cannot dump also cannot implement these.  */
 
 /*
 /* Some systems that cannot dump also cannot implement these.  */
 
 /*
@@ -2259,7 +2257,7 @@ end_of_data (void)
 #endif
 }
 
 #endif
 }
 
-#endif /* not CANNOT_DUMP */
+#endif /* !defined(CANNOT_DUMP) && !defined(PDUMP) */
 
 \f
 /************************************************************************/
 
 \f
 /************************************************************************/
@@ -2281,7 +2279,7 @@ init_system_name (void)
 {
 #if defined (WINDOWSNT)
   char hostname [MAX_COMPUTERNAME_LENGTH + 1];
 {
 #if defined (WINDOWSNT)
   char hostname [MAX_COMPUTERNAME_LENGTH + 1];
-  size_t size = sizeof(hostname);
+  size_t size = sizeof (hostname);
   GetComputerName (hostname, &size);
   Vsystem_name = build_string (hostname);
 #elif !defined (HAVE_GETHOSTNAME)
   GetComputerName (hostname, &size);
   Vsystem_name = build_string (hostname);
 #elif !defined (HAVE_GETHOSTNAME)
@@ -2317,23 +2315,24 @@ init_system_name (void)
 #  endif /* not CANNOT_DUMP */
     if (!strchr (hostname, '.'))
       {
 #  endif /* not CANNOT_DUMP */
     if (!strchr (hostname, '.'))
       {
+#  if !(defined(HAVE_GETADDRINFO) && defined(HAVE_GETNAMEINFO))
        struct hostent *hp = NULL;
        int count;
        struct hostent *hp = NULL;
        int count;
-#  ifdef TRY_AGAIN
+#   ifdef TRY_AGAIN
        for (count = 0; count < 10; count++)
          {
            h_errno = 0;
        for (count = 0; count < 10; count++)
          {
            h_errno = 0;
-#  endif
+#   endif
            /* Some systems can't handle SIGALARM/SIGIO in gethostbyname(). */
            stop_interrupts ();
            hp = gethostbyname (hostname);
            start_interrupts ();
            /* Some systems can't handle SIGALARM/SIGIO in gethostbyname(). */
            stop_interrupts ();
            hp = gethostbyname (hostname);
            start_interrupts ();
-#  ifdef TRY_AGAIN
+#   ifdef TRY_AGAIN
            if (! (hp == 0 && h_errno == TRY_AGAIN))
              break;
            Fsleep_for (make_int (1));
          }
            if (! (hp == 0 && h_errno == TRY_AGAIN))
              break;
            Fsleep_for (make_int (1));
          }
-#  endif
+#   endif
        if (hp)
          {
            CONST char *fqdn = (CONST char *) hp->h_name;
        if (hp)
          {
            CONST char *fqdn = (CONST char *) hp->h_name;
@@ -2351,6 +2350,22 @@ init_system_name (void)
            hostname = (char *) alloca (strlen (fqdn) + 1);
            strcpy (hostname, fqdn);
          }
            hostname = (char *) alloca (strlen (fqdn) + 1);
            strcpy (hostname, fqdn);
          }
+#  else /* !(HAVE_GETADDRINFO && HAVE_GETNAMEINFO) */
+       struct addrinfo hints, *res;
+
+       xzero (hints);
+       hints.ai_flags = AI_CANONNAME;
+       hints.ai_family = AF_UNSPEC;
+       hints.ai_socktype = SOCK_STREAM;
+       hints.ai_protocol = 0;
+       if (!getaddrinfo (hostname, NULL, &hints, &res))
+         {
+           hostname = (char *) alloca (strlen (res->ai_canonname) + 1);
+           strcpy (hostname, res->ai_canonname);
+
+           freeaddrinfo (res);
+         }
+#  endif  /* !(HAVE_GETADDRINFO && HAVE_GETNAMEINFO) */
       }
 # endif /* HAVE_SOCKETS */
   Vsystem_name = build_string (hostname);
       }
 # endif /* HAVE_SOCKETS */
   Vsystem_name = build_string (hostname);
@@ -2571,7 +2586,7 @@ mswindows_set_errno (unsigned long win32_error)
   int i;
 
   /* check the table for the OS error code */
   int i;
 
   /* check the table for the OS error code */
-  for (i = 0; i < sizeof(errtable)/sizeof(errtable[0]); ++i)
+  for (i = 0; i < countof (errtable); ++i)
     {
       if (win32_error == errtable[i].oscode)
        {
     {
       if (win32_error == errtable[i].oscode)
        {
@@ -2605,7 +2620,7 @@ mswindows_set_last_errno (void)
 /************************************************************************/
 
 #define PATHNAME_CONVERT_OUT(path) \
 /************************************************************************/
 
 #define PATHNAME_CONVERT_OUT(path) \
-  GET_C_CHARPTR_EXT_FILENAME_DATA_ALLOCA ((CONST Bufbyte *) path, path)
+  TO_EXTERNAL_FORMAT (C_STRING, (path), C_STRING_ALLOCA, (path), Qfile_name);
 
 /***************** low-level calls ****************/
 
 
 /***************** low-level calls ****************/
 
@@ -2638,11 +2653,12 @@ sys_open (CONST char *path, int oflag, ...)
   mode = va_arg (ap, int);
   va_end (ap);
 
   mode = va_arg (ap, int);
   va_end (ap);
 
-  PATHNAME_CONVERT_OUT (path);
-#if defined (WINDOWSNT)
+#ifdef WINDOWSNT
   /* Make all handles non-inheritable */
   /* Make all handles non-inheritable */
-  return open (path, oflag | _O_NOINHERIT, mode);
-#elif defined (INTERRUPTIBLE_OPEN)
+  oflag |= _O_NOINHERIT;
+#endif
+
+#ifdef INTERRUPTIBLE_OPEN
   {
     int rtnval;
     while ((rtnval = open (path, oflag, mode)) == -1
   {
     int rtnval;
     while ((rtnval = open (path, oflag, mode)) == -1
@@ -2677,6 +2693,11 @@ interruptible_open (CONST char *path, int oflag, int mode)
 
   PATHNAME_CONVERT_OUT (nonreloc);
 
 
   PATHNAME_CONVERT_OUT (nonreloc);
 
+#ifdef WINDOWSNT
+  /* Make all handles non-inheritable */
+  oflag |= _O_NOINHERIT;
+#endif
+
   for (;;)
     {
       int rtnval = open (nonreloc, oflag, mode);
   for (;;)
     {
       int rtnval = open (nonreloc, oflag, mode);
@@ -3005,9 +3026,9 @@ sys_readdir (DIR *dirp)
       Dynarr_add_many (internal_DIRENTRY, (Bufbyte *) rtnval,
                        offsetof (DIRENTRY, d_name));
 
       Dynarr_add_many (internal_DIRENTRY, (Bufbyte *) rtnval,
                        offsetof (DIRENTRY, d_name));
 
-      internal_name =
-        convert_from_external_format (external_name, external_len,
-                                      &internal_len, FORMAT_FILENAME);
+      TO_INTERNAL_FORMAT (DATA, (external_name, external_len),
+                         ALLOCA, (internal_name, internal_len),
+                         Qfile_name);
 
       Dynarr_add_many (internal_DIRENTRY, internal_name, internal_len);
       Dynarr_add (internal_DIRENTRY, 0); /* zero-terminate */
 
       Dynarr_add_many (internal_DIRENTRY, internal_name, internal_len);
       Dynarr_add (internal_DIRENTRY, 0); /* zero-terminate */
index e4c3296..c06a235 100644 (file)
@@ -20,12 +20,14 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: FSF 19.30.  Split out of sysdep.c/emacs.c. */
 
 
 /* Synched up with: FSF 19.30.  Split out of sysdep.c/emacs.c. */
 
-#ifndef _XEMACS_SYSDEP_H_
-#define _XEMACS_SYSDEP_H_
+#ifndef INCLUDED_sysdep_h_
+#define INCLUDED_sysdep_h_
 
 #include <setjmp.h>
 
 
 #include <setjmp.h>
 
+#ifndef WINDOWSNT
 extern char **environ;
 extern char **environ;
+#endif
 
 int eight_bit_tty (struct device *d);
 
 
 int eight_bit_tty (struct device *d);
 
@@ -179,4 +181,4 @@ extern int h_errno;
 char *xrealpath(CONST char *path, char resolved_path []);
 #endif
 
 char *xrealpath(CONST char *path, char resolved_path []);
 #endif
 
-#endif /* _XEMACS_SYSDEP_H_ */
+#endif /* INCLUDED_sysdep_h_ */
index 3616ef6..6c84ce8 100644 (file)
@@ -20,6 +20,9 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not really in FSF. */
 
 
 /* Synched up with: Not really in FSF. */
 
+#ifndef INCLUDED_sysdir_h_
+#define INCLUDED_sysdir_h_
+
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -129,3 +132,4 @@ int sys_rmdir (CONST char *path);
 # define sys_rmdir rmdir
 #endif
 
 # define sys_rmdir rmdir
 #endif
 
+#endif /* INCLUDED_sysdir_h_ */
index fd8b5f1..bdc8c3d 100644 (file)
@@ -19,8 +19,8 @@ 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.  */
 
 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 02111-1307, USA.  */
 
-#ifndef _SYSDLL_H
-#define _SYSDLL_H
+#ifndef INCLUDED_sysdll_h_
+#define INCLUDED_sysdll_h_
 
 #ifdef __cplusplus
 extern "C" {
 
 #ifdef __cplusplus
 extern "C" {
@@ -50,4 +50,4 @@ CONST char *dll_error(dll_handle);
 }
 #endif
 
 }
 #endif
 
-#endif /* _SYSDLL_H */
+#endif /* INCLUDED_sysdll_h_ */
index c7e29cb..932a503 100644 (file)
@@ -20,6 +20,9 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not really in FSF. */
 
 
 /* Synched up with: Not really in FSF. */
 
+#ifndef INCLUDED_sysfile_h_
+#define INCLUDED_sysfile_h_
+
 #include <errno.h>
 
 #ifndef WINDOWSNT
 #include <errno.h>
 
 #ifndef WINDOWSNT
@@ -478,3 +481,5 @@ int sys_execvp (CONST char *, char * CONST *);
 #if !defined (ENCAPSULATE_EXECVP) && defined (DONT_ENCAPSULATE)
 # define sys_execvp execvp
 #endif
 #if !defined (ENCAPSULATE_EXECVP) && defined (DONT_ENCAPSULATE)
 # define sys_execvp execvp
 #endif
+
+#endif /* INCLUDED_sysfile_h_ */
index 0b2bb3e..8f6b539 100644 (file)
@@ -20,6 +20,9 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not really in FSF. */
 
 
 /* Synched up with: Not really in FSF. */
 
+#ifndef INCLUDED_sysfloat_h_
+#define INCLUDED_sysfloat_h_
+
 /* Work around a problem that happens because math.h on hpux 7
    defines two static variables--which, in Emacs, are not really static,
    because `static' is defined as nothing.  The problem is that they are
 /* Work around a problem that happens because math.h on hpux 7
    defines two static variables--which, in Emacs, are not really static,
    because `static' is defined as nothing.  The problem is that they are
@@ -86,3 +89,4 @@ Boston, MA 02111-1307, USA.  */
 # define isnan(x) ((x) != (x))
 #endif
 
 # define isnan(x) ((x) != (x))
 #endif
 
+#endif /* INCLUDED_sysfloat_h_ */
index 399f6c8..217f580 100644 (file)
@@ -20,6 +20,9 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not really in FSF. */
 
 
 /* Synched up with: Not really in FSF. */
 
+#ifndef INCLUDED_sysproc_h_
+#define INCLUDED_sysproc_h_
+
 #ifdef HAVE_VFORK_H
 # include <vfork.h>
 #endif
 #ifdef HAVE_VFORK_H
 # include <vfork.h>
 #endif
@@ -103,3 +106,5 @@ int poll_fds_for_input (SELECT_TYPE mask);
 /* Damn that local process.h!  Instead we can define P_WAIT ourselves.  */
 #define P_WAIT 1
 #endif
 /* Damn that local process.h!  Instead we can define P_WAIT ourselves.  */
 #define P_WAIT 1
 #endif
+
+#endif /* INCLUDED_sysproc_h_ */
index 1a3de7b..c2c8423 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: FSF 19.30. */
 
 
 /* Synched up with: FSF 19.30. */
 
-#ifndef _XEMACS_SYSSIGNAL_H_
-#define _XEMACS_SYSSIGNAL_H_
+#ifndef INCLUDED_syssignal_h_
+#define INCLUDED_syssignal_h_
 
 /* In the old world, one could not #include <signal.h> here.  The party line
    was that that header should always be #included before <config.h>, because
 
 /* In the old world, one could not #include <signal.h> here.  The party line
    was that that header should always be #included before <config.h>, because
@@ -234,7 +234,7 @@ extern CONST char *sys_siglist[];
 SIGTYPE memory_warning_signal (int sig);
 #endif
 
 SIGTYPE memory_warning_signal (int sig);
 #endif
 
-#ifdef _WIN32
+#ifdef WINDOWSNT
 /* Prototypes for signal functions, see nt.c */
 typedef void (__cdecl *msw_sighandler) (int);
 msw_sighandler msw_sigset (int sig, msw_sighandler handler);
 /* Prototypes for signal functions, see nt.c */
 typedef void (__cdecl *msw_sighandler) (int);
 msw_sighandler msw_sigset (int sig, msw_sighandler handler);
@@ -244,4 +244,4 @@ int msw_sigpause (int nsig);
 int msw_raise (int nsig);
 #endif /* _WIN32 */
 
 int msw_raise (int nsig);
 #endif /* _WIN32 */
 
-#endif /* _XEMACS_SYSSIGNAL_H_ */
+#endif /* INCLUDED_syssignal_h_ */
index 2f01157..d0f4ae1 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: FSF 19.30. */
 
 
 /* Synched up with: FSF 19.30. */
 
-#ifndef _XEMACS_SYSTIME_H_
-#define _XEMACS_SYSTIME_H_
+#ifndef INCLUDED_systime_h_
+#define INCLUDED_systime_h_
 
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
 
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -51,7 +51,7 @@ Boston, MA 02111-1307, USA.  */
 # include <utime.h>
 #endif
 
 # include <utime.h>
 #endif
 
-#ifdef HAVE_TZNAME
+#if defined(HAVE_TZNAME) && !defined(WINDOWSNT) && !defined(__CYGWIN32__)
 #ifndef tzname         /* For SGI.  */
 extern char *tzname[]; /* RS6000 and others want it this way.  */
 #endif
 #ifndef tzname         /* For SGI.  */
 extern char *tzname[]; /* RS6000 and others want it this way.  */
 #endif
@@ -249,4 +249,4 @@ int setitimer (int kind, const struct itimerval* itnew,
 
 #endif /* WINDOWSNT */
 
 
 #endif /* WINDOWSNT */
 
-#endif /* _XEMACS_SYSTIME_H_ */
+#endif /* INCLUDED_systime_h_ */
index c72e0c5..67015e8 100644 (file)
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: FSF 19.30. */
 
 
 /* Synched up with: FSF 19.30. */
 
-#ifndef _XEMACS_SYSTTY_H_
-#define _XEMACS_SYSTTY_H_
+#ifndef INCLUDED_systty_h_
+#define INCLUDED_systty_h_
 
 #ifdef HAVE_TERMIOS
 # define HAVE_TCATTR
 
 #ifdef HAVE_TERMIOS
 # define HAVE_TCATTR
@@ -181,10 +181,6 @@ Boston, MA 02111-1307, USA.  */
 /* ----------------------------------------------------- */
 
 
 /* ----------------------------------------------------- */
 
 
-#ifdef APOLLO
-#undef TIOCSTART
-#endif
-
 #if defined (XENIX) || defined (BROKEN_TIOCGETC)
 #undef TIOCGETC  /* Avoid confusing some conditionals that test this.  */
 #endif
 #if defined (XENIX) || defined (BROKEN_TIOCGETC)
 #undef TIOCGETC  /* Avoid confusing some conditionals that test this.  */
 #endif
@@ -441,4 +437,4 @@ int emacs_set_tty (int fd, struct emacs_tty *settings, int flushp);
 #endif /* not def HAVE_TERMIO */
 #endif /* not def HAVE_TERMIOS */
 
 #endif /* not def HAVE_TERMIO */
 #endif /* not def HAVE_TERMIOS */
 
-#endif /* _XEMACS_SYSTTY_H_ */
+#endif /* INCLUDED_systty_h_ */
index 4e0066d..6836402 100644 (file)
@@ -19,7 +19,8 @@ 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.  */
 
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* Cleanup by Martin Buchholz for Autoconf 2 (see the Autoconf Manual) */
+#ifndef INCLUDED_syswait_h_
+#define INCLUDED_syswait_h_
 
 #include <sys/types.h>
 
 
 #include <sys/types.h>
 
@@ -52,3 +53,4 @@ Boston, MA 02111-1307, USA.  */
 #define WRETCODE(s) ((s) >> 8)
 #endif
 
 #define WRETCODE(s) ((s) >> 8)
 #endif
 
+#endif /* INCLUDED_syswait_h_ */
index 5a4acfd..a09610e 100644 (file)
@@ -262,7 +262,7 @@ mswindows_output_toolbar (struct frame *f, enum toolbar_pos pos)
              
              if (IMAGE_INSTANCEP (instance))
                {
              
              if (IMAGE_INSTANCEP (instance))
                {
-                 struct Lisp_Image_Instance* p = XIMAGE_INSTANCE (instance);
+                 Lisp_Image_Instance* p = XIMAGE_INSTANCE (instance);
                  
                  if (IMAGE_INSTANCE_PIXMAP_TYPE_P (p))
                    {
                  
                  if (IMAGE_INSTANCE_PIXMAP_TYPE_P (p))
                    {
@@ -586,7 +586,7 @@ mswindows_free_frame_toolbars (struct frame *f)
 }
 
 /* map toolbar hwnd to pos*/
 }
 
 /* map toolbar hwnd to pos*/
-int mswindows_find_toolbar_pos(struct frame* f, HWND ctrl)
+static int mswindows_find_toolbar_pos(struct frame* f, HWND ctrl)
 {
   int id = GetDlgCtrlID(ctrl);
   return id ? id - TOOLBAR_ID_BIAS : -1;
 {
   int id = GetDlgCtrlID(ctrl);
   return id ? id - TOOLBAR_ID_BIAS : -1;
index edfd7dd..a8a8f0e 100644 (file)
@@ -109,7 +109,7 @@ x_output_toolbar_button (struct frame *f, Lisp_Object button)
   GC top_shadow_gc, bottom_shadow_gc, background_gc;
   Lisp_Object instance, frame, window, glyph;
   struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
   GC top_shadow_gc, bottom_shadow_gc, background_gc;
   Lisp_Object instance, frame, window, glyph;
   struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
-  struct Lisp_Image_Instance *p;
+  Lisp_Image_Instance *p;
   struct window *w;
   int vertical = tb->vertical;
   int border_width = tb->border_width;
   struct window *w;
   int vertical = tb->vertical;
   int border_width = tb->border_width;
index 7e3376f..0e65264 100644 (file)
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_TOOLBAR_H_
-#define _XEMACS_TOOLBAR_H_
+#ifndef INCLUDED_toolbar_h_
+#define INCLUDED_toolbar_h_
 
 #ifdef HAVE_TOOLBARS
 
 
 #ifdef HAVE_TOOLBARS
 
@@ -110,4 +110,4 @@ void mark_frame_toolbar_buttons_dirty (struct frame *f, enum toolbar_pos pos);
 
 #endif /* HAVE_TOOLBARS */
 
 
 #endif /* HAVE_TOOLBARS */
 
-#endif /* _XEMACS_TOOLBAR_H_ */
+#endif /* INCLUDED_toolbar_h_ */
index f9a6d5e..20a4a0a 100644 (file)
@@ -161,7 +161,7 @@ static void
 print_tooltalk_message (Lisp_Object obj, Lisp_Object printcharfun,
                        int escapeflag)
 {
 print_tooltalk_message (Lisp_Object obj, Lisp_Object printcharfun,
                        int escapeflag)
 {
-  struct Lisp_Tooltalk_Message *p = XTOOLTALK_MESSAGE (obj);
+  Lisp_Tooltalk_Message *p = XTOOLTALK_MESSAGE (obj);
 
   char buf[200];
 
 
   char buf[200];
 
@@ -176,15 +176,14 @@ print_tooltalk_message (Lisp_Object obj, Lisp_Object printcharfun,
 DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-message", tooltalk_message,
                                mark_tooltalk_message, print_tooltalk_message,
                                0, 0, 0, 0,
 DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-message", tooltalk_message,
                                mark_tooltalk_message, print_tooltalk_message,
                                0, 0, 0, 0,
-                              struct Lisp_Tooltalk_Message);
+                              Lisp_Tooltalk_Message);
 \f
 static Lisp_Object
 make_tooltalk_message (Tt_message m)
 {
   Lisp_Object val;
 \f
 static Lisp_Object
 make_tooltalk_message (Tt_message m)
 {
   Lisp_Object val;
-  struct Lisp_Tooltalk_Message *msg =
-    alloc_lcrecord_type (struct Lisp_Tooltalk_Message,
-                        &lrecord_tooltalk_message);
+  Lisp_Tooltalk_Message *msg =
+    alloc_lcrecord_type (Lisp_Tooltalk_Message, &lrecord_tooltalk_message);
 
   msg->m = m;
   msg->callback = Qnil;
 
   msg->m = m;
   msg->callback = Qnil;
@@ -235,7 +234,7 @@ static void
 print_tooltalk_pattern (Lisp_Object obj, Lisp_Object printcharfun,
                        int escapeflag)
 {
 print_tooltalk_pattern (Lisp_Object obj, Lisp_Object printcharfun,
                        int escapeflag)
 {
-  struct Lisp_Tooltalk_Pattern *p = XTOOLTALK_PATTERN (obj);
+  Lisp_Tooltalk_Pattern *p = XTOOLTALK_PATTERN (obj);
 
   char buf[200];
 
 
   char buf[200];
 
@@ -250,14 +249,13 @@ print_tooltalk_pattern (Lisp_Object obj, Lisp_Object printcharfun,
 DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-pattern", tooltalk_pattern,
                                mark_tooltalk_pattern, print_tooltalk_pattern,
                                0, 0, 0, 0,
 DEFINE_LRECORD_IMPLEMENTATION ("tooltalk-pattern", tooltalk_pattern,
                                mark_tooltalk_pattern, print_tooltalk_pattern,
                                0, 0, 0, 0,
-                              struct Lisp_Tooltalk_Pattern);
+                              Lisp_Tooltalk_Pattern);
 \f
 static Lisp_Object
 make_tooltalk_pattern (Tt_pattern p)
 {
 \f
 static Lisp_Object
 make_tooltalk_pattern (Tt_pattern p)
 {
-  struct Lisp_Tooltalk_Pattern *pat =
-    alloc_lcrecord_type (struct Lisp_Tooltalk_Pattern,
-                        &lrecord_tooltalk_pattern);
+  Lisp_Tooltalk_Pattern *pat =
+    alloc_lcrecord_type (Lisp_Tooltalk_Pattern, &lrecord_tooltalk_pattern);
   Lisp_Object val;
 
   pat->p = p;
   Lisp_Object val;
 
   pat->p = p;
@@ -702,8 +700,10 @@ New arguments can be added to a message with add-tooltalk-message-arg.
 {
   Tt_message m = unbox_tooltalk_message (message_);
   int n = 0;
 {
   Tt_message m = unbox_tooltalk_message (message_);
   int n = 0;
+  Tt_status (*fun_str) (Tt_message, const char *) = 0;
 
   CHECK_SYMBOL (attribute);
 
   CHECK_SYMBOL (attribute);
+
   if (EQ (attribute, (Qtt_arg_bval))  ||
       EQ (attribute, (Qtt_arg_ival))  ||
       EQ (attribute, (Qtt_arg_val)))
   if (EQ (attribute, (Qtt_arg_bval))  ||
       EQ (attribute, (Qtt_arg_ival))  ||
       EQ (attribute, (Qtt_arg_val)))
@@ -715,7 +715,7 @@ New arguments can be added to a message with add-tooltalk-message-arg.
   if (!VALID_TOOLTALK_MESSAGEP (m))
     return Qnil;
 
   if (!VALID_TOOLTALK_MESSAGEP (m))
     return Qnil;
 
-  else if (EQ (attribute, Qtt_address))
+  if (EQ (attribute, Qtt_address))
     {
       CHECK_TOOLTALK_CONSTANT (value);
       tt_message_address_set (m, (Tt_address) tooltalk_constant_value (value));
     {
       CHECK_TOOLTALK_CONSTANT (value);
       tt_message_address_set (m, (Tt_address) tooltalk_constant_value (value));
@@ -731,73 +731,37 @@ New arguments can be added to a message with add-tooltalk-message-arg.
       tt_message_disposition_set (m, ((Tt_disposition)
                                      tooltalk_constant_value (value)));
     }
       tt_message_disposition_set (m, ((Tt_disposition)
                                      tooltalk_constant_value (value)));
     }
-  else if (EQ (attribute, Qtt_file))
+  else if (EQ (attribute, Qtt_scope))
     {
     {
-      CONST char *value_ext;
-      CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
-      tt_message_file_set (m, value_ext);
+      CHECK_TOOLTALK_CONSTANT (value);
+      tt_message_scope_set (m, (Tt_scope) tooltalk_constant_value (value));
     }
     }
+  else if (EQ (attribute, Qtt_file))
+    fun_str = tt_message_file_set;
   else if (EQ (attribute, Qtt_handler_ptype))
   else if (EQ (attribute, Qtt_handler_ptype))
-    {
-      CONST char *value_ext;
-      CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
-      tt_message_handler_ptype_set (m, value_ext);
-    }
+    fun_str = tt_message_handler_ptype_set;
   else if (EQ (attribute, Qtt_handler))
   else if (EQ (attribute, Qtt_handler))
-    {
-      CONST char *value_ext;
-      CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
-      tt_message_handler_set (m, value_ext);
-    }
+    fun_str = tt_message_handler_set;
   else if (EQ (attribute, Qtt_object))
   else if (EQ (attribute, Qtt_object))
-    {
-      CONST char *value_ext;
-      CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
-      tt_message_object_set (m, value_ext);
-    }
+    fun_str = tt_message_object_set;
   else if (EQ (attribute, Qtt_op))
   else if (EQ (attribute, Qtt_op))
-    {
-      CONST char *value_ext;
-      CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
-      tt_message_op_set (m, value_ext);
-    }
+    fun_str = tt_message_op_set;
   else if (EQ (attribute, Qtt_otype))
   else if (EQ (attribute, Qtt_otype))
-    {
-      CONST char *value_ext;
-      CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
-      tt_message_otype_set (m, value_ext);
-    }
-  else if (EQ (attribute, Qtt_scope))
-    {
-      CHECK_TOOLTALK_CONSTANT (value);
-      tt_message_scope_set (m, (Tt_scope) tooltalk_constant_value (value));
-    }
+    fun_str = tt_message_otype_set;
   else if (EQ (attribute, Qtt_sender_ptype))
   else if (EQ (attribute, Qtt_sender_ptype))
-    {
-      CONST char *value_ext;
-      CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
-      tt_message_sender_ptype_set (m, value_ext);
-    }
+    fun_str = tt_message_sender_ptype_set;
   else if (EQ (attribute, Qtt_session))
   else if (EQ (attribute, Qtt_session))
-    {
-      CONST char *value_ext;
-      CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
-      tt_message_session_set (m, value_ext);
-    }
+    fun_str = tt_message_session_set;
+  else if (EQ (attribute, Qtt_status_string))
+    fun_str = tt_message_status_string_set;
   else if (EQ (attribute, Qtt_arg_bval))
     {
       Extbyte *value_ext;
       Extcount value_ext_len;
       CHECK_STRING (value);
   else if (EQ (attribute, Qtt_arg_bval))
     {
       Extbyte *value_ext;
       Extcount value_ext_len;
       CHECK_STRING (value);
-      GET_STRING_OS_DATA_ALLOCA (value, value_ext, value_ext_len);
+      TO_EXTERNAL_FORMAT (LISP_STRING, value,
+                         ALLOCA, (value_ext, value_ext_len),
+                         Qnative);
       tt_message_arg_bval_set (m, n, value_ext, value_ext_len);
     }
   else if (EQ (attribute, Qtt_arg_ival))
       tt_message_arg_bval_set (m, n, value_ext, value_ext_len);
     }
   else if (EQ (attribute, Qtt_arg_ival))
@@ -809,7 +773,7 @@ New arguments can be added to a message with add-tooltalk-message-arg.
     {
       CONST char *value_ext;
       CHECK_STRING (value);
     {
       CONST char *value_ext;
       CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
       tt_message_arg_val_set (m, n, value_ext);
     }
   else if (EQ (attribute, Qtt_status))
       tt_message_arg_val_set (m, n, value_ext);
     }
   else if (EQ (attribute, Qtt_status))
@@ -817,13 +781,6 @@ New arguments can be added to a message with add-tooltalk-message-arg.
       CHECK_INT (value);
       tt_message_status_set (m, XINT (value));
     }
       CHECK_INT (value);
       tt_message_status_set (m, XINT (value));
     }
-  else if (EQ (attribute, Qtt_status_string))
-    {
-      CONST char *value_ext;
-      CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
-      tt_message_status_string_set (m, value_ext);
-    }
   else if (EQ (attribute, Qtt_callback))
     {
       CHECK_SYMBOL (value);
   else if (EQ (attribute, Qtt_callback))
     {
       CHECK_SYMBOL (value);
@@ -836,6 +793,15 @@ New arguments can be added to a message with add-tooltalk-message-arg.
   else
     signal_simple_error ("Invalid value for `set-tooltalk-message-attribute'",
                         attribute);
   else
     signal_simple_error ("Invalid value for `set-tooltalk-message-attribute'",
                         attribute);
+
+  if (fun_str)
+    {
+      CONST char *value_ext;
+      CHECK_STRING (value);
+      TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
+      (*fun_str) (m, value_ext);
+    }
+
   return Qnil;
 }
 
   return Qnil;
 }
 
@@ -948,13 +914,13 @@ embedded nulls (use 'arg_bval).
   {
     CONST char *vtype_ext;
 
   {
     CONST char *vtype_ext;
 
-    GET_C_STRING_OS_DATA_ALLOCA (vtype, vtype_ext);
+    TO_EXTERNAL_FORMAT (LISP_STRING, vtype, C_STRING_ALLOCA, vtype_ext, Qnative);
     if (NILP (value))
       tt_message_arg_add (m, n, vtype_ext, NULL);
     else if (STRINGP (value))
       {
        CONST char *value_ext;
     if (NILP (value))
       tt_message_arg_add (m, n, vtype_ext, NULL);
     else if (STRINGP (value))
       {
        CONST char *value_ext;
-       GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
+       TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
        tt_message_arg_add (m, n, vtype_ext, value_ext);
       }
     else if (INTP (value))
        tt_message_arg_add (m, n, vtype_ext, value_ext);
       }
     else if (INTP (value))
@@ -1059,28 +1025,28 @@ less the "tooltalk_pattern_" prefix and the "_add" ...
     {
       CONST char *value_ext;
       CHECK_STRING (value);
     {
       CONST char *value_ext;
       CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
       tt_pattern_file_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_object))
     {
       CONST char *value_ext;
       CHECK_STRING (value);
       tt_pattern_file_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_object))
     {
       CONST char *value_ext;
       CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
       tt_pattern_object_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_op))
     {
       CONST char *value_ext;
       CHECK_STRING (value);
       tt_pattern_object_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_op))
     {
       CONST char *value_ext;
       CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
       tt_pattern_op_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_otype))
     {
       CONST char *value_ext;
       CHECK_STRING (value);
       tt_pattern_op_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_otype))
     {
       CONST char *value_ext;
       CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
       tt_pattern_otype_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_scope))
       tt_pattern_otype_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_scope))
@@ -1092,21 +1058,21 @@ less the "tooltalk_pattern_" prefix and the "_add" ...
     {
       CONST char *value_ext;
       CHECK_STRING (value);
     {
       CONST char *value_ext;
       CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
       tt_pattern_sender_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_sender_ptype))
     {
       CONST char *value_ext;
       CHECK_STRING (value);
       tt_pattern_sender_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_sender_ptype))
     {
       CONST char *value_ext;
       CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
       tt_pattern_sender_ptype_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_session))
     {
       CONST char *value_ext;
       CHECK_STRING (value);
       tt_pattern_sender_ptype_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_session))
     {
       CONST char *value_ext;
       CHECK_STRING (value);
-      GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
+      TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
       tt_pattern_session_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_state))
       tt_pattern_session_add (p, value_ext);
     }
   else if (EQ (attribute, Qtt_state))
@@ -1147,13 +1113,13 @@ is added.  At present there's no way to add a binary data argument.
   {
     CONST char *vtype_ext;
 
   {
     CONST char *vtype_ext;
 
-    GET_C_STRING_OS_DATA_ALLOCA (vtype, vtype_ext);
+    TO_EXTERNAL_FORMAT (LISP_STRING, vtype, C_STRING_ALLOCA, vtype_ext, Qnative);
     if (NILP (value))
       tt_pattern_arg_add (p, n, vtype_ext, NULL);
     else if (STRINGP (value))
       {
        CONST char *value_ext;
     if (NILP (value))
       tt_pattern_arg_add (p, n, vtype_ext, NULL);
     else if (STRINGP (value))
       {
        CONST char *value_ext;
-       GET_C_STRING_OS_DATA_ALLOCA (value, value_ext);
+       TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
        tt_pattern_arg_add (p, n, vtype_ext, value_ext);
       }
     else if (INTP (value))
        tt_pattern_arg_add (p, n, vtype_ext, value_ext);
       }
     else if (INTP (value))
@@ -1257,8 +1223,8 @@ init_tooltalk (void)
   Lisp_Object fil;
 
 
   Lisp_Object fil;
 
 
-  /* tt_open() messes with our signal handler flags (at least when no 
-     ttsessions is running on the machine), therefore we save the 
+  /* tt_open() messes with our signal handler flags (at least when no
+     ttsessions is running on the machine), therefore we save the
      actions and restore them after the call */
 #ifdef HAVE_SIGPROCMASK
   {
      actions and restore them after the call */
 #ifdef HAVE_SIGPROCMASK
   {
index 16e991b..1cc0819 100644 (file)
@@ -22,20 +22,20 @@ Boston, MA 02111-1307, USA.
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_TOOLTALK_H_
-#define _XEMACS_TOOLTALK_H_
+#ifndef INCLUDED_tooltalk_h_
+#define INCLUDED_tooltalk_h_
 #include TT_C_H_PATH
 
 #include TT_C_H_PATH
 
-struct Lisp_Tooltalk_Message;
-DECLARE_LRECORD (tooltalk_message, struct Lisp_Tooltalk_Message);
-#define XTOOLTALK_MESSAGE(x) XRECORD (x, tooltalk_message, struct Lisp_Tooltalk_Message)
+typedef struct Lisp_Tooltalk_Message Lisp_Tooltalk_Message;
+DECLARE_LRECORD (tooltalk_message, Lisp_Tooltalk_Message);
+#define XTOOLTALK_MESSAGE(x) XRECORD (x, tooltalk_message, Lisp_Tooltalk_Message)
 #define XSETTOOLTALK_MESSAGE(x, p) XSETRECORD (x, p, tooltalk_message)
 #define TOOLTALK_MESSAGEP(x) RECORDP (x, tooltalk_message)
 #define CHECK_TOOLTALK_MESSAGE(x) CHECK_RECORD (x, tooltalk_message)
 
 #define XSETTOOLTALK_MESSAGE(x, p) XSETRECORD (x, p, tooltalk_message)
 #define TOOLTALK_MESSAGEP(x) RECORDP (x, tooltalk_message)
 #define CHECK_TOOLTALK_MESSAGE(x) CHECK_RECORD (x, tooltalk_message)
 
-struct Lisp_Tooltalk_Pattern;
-DECLARE_LRECORD (tooltalk_pattern, struct Lisp_Tooltalk_Pattern);
-#define XTOOLTALK_PATTERN(x) XRECORD (x, tooltalk_pattern, struct Lisp_Tooltalk_Pattern)
+typedef struct Lisp_Tooltalk_Pattern Lisp_Tooltalk_Pattern;
+DECLARE_LRECORD (tooltalk_pattern, Lisp_Tooltalk_Pattern);
+#define XTOOLTALK_PATTERN(x) XRECORD (x, tooltalk_pattern, Lisp_Tooltalk_Pattern)
 #define XSETTOOLTALK_PATTERN(x, p) XSETRECORD (x, p, tooltalk_pattern)
 #define TOOLTALK_PATTERNP(x) RECORDP (x, tooltalk_pattern)
 #define CHECK_TOOLTALK_PATTERN(x) CHECK_RECORD (x, tooltalk_pattern)
 #define XSETTOOLTALK_PATTERN(x, p) XSETRECORD (x, p, tooltalk_pattern)
 #define TOOLTALK_PATTERNP(x) RECORDP (x, tooltalk_pattern)
 #define CHECK_TOOLTALK_PATTERN(x) CHECK_RECORD (x, tooltalk_pattern)
@@ -59,4 +59,4 @@ Tt_message unbox_tooltalk_message (Lisp_Object msg);
 
 extern Lisp_Object Qtooltalk_error;
 
 
 extern Lisp_Object Qtooltalk_error;
 
-#endif /* _XEMACS_TOOLTALK_H_ */
+#endif /* INCLUDED_tooltalk_h_ */
index 41af38e..f8d844e 100644 (file)
@@ -281,7 +281,7 @@ truncate_undo_list (Lisp_Object list, int minsize, int maxsize)
       && NILP (XCAR (next)))
     {
       /* Add in the space occupied by this element and its chain link.  */
       && NILP (XCAR (next)))
     {
       /* Add in the space occupied by this element and its chain link.  */
-      size_so_far += sizeof (struct Lisp_Cons);
+      size_so_far += sizeof (Lisp_Cons);
 
       /* Advance to next element.  */
       prev = next;
 
       /* Advance to next element.  */
       prev = next;
@@ -294,12 +294,12 @@ truncate_undo_list (Lisp_Object list, int minsize, int maxsize)
       elt = XCAR (next);
 
       /* Add in the space occupied by this element and its chain link.  */
       elt = XCAR (next);
 
       /* Add in the space occupied by this element and its chain link.  */
-      size_so_far += sizeof (struct Lisp_Cons);
+      size_so_far += sizeof (Lisp_Cons);
       if (CONSP (elt))
        {
       if (CONSP (elt))
        {
-         size_so_far += sizeof (struct Lisp_Cons);
+         size_so_far += sizeof (Lisp_Cons);
          if (STRINGP (XCAR (elt)))
          if (STRINGP (XCAR (elt)))
-           size_so_far += (sizeof (struct Lisp_String) - 1
+           size_so_far += (sizeof (Lisp_String) - 1
                            + XSTRING_LENGTH (XCAR (elt)));
        }
 
                            + XSTRING_LENGTH (XCAR (elt)));
        }
 
@@ -329,12 +329,12 @@ truncate_undo_list (Lisp_Object list, int minsize, int maxsize)
        }
 
       /* Add in the space occupied by this element and its chain link.  */
        }
 
       /* Add in the space occupied by this element and its chain link.  */
-      size_so_far += sizeof (struct Lisp_Cons);
+      size_so_far += sizeof (Lisp_Cons);
       if (CONSP (elt))
        {
       if (CONSP (elt))
        {
-         size_so_far += sizeof (struct Lisp_Cons);
+         size_so_far += sizeof (Lisp_Cons);
          if (STRINGP (XCAR (elt)))
          if (STRINGP (XCAR (elt)))
-           size_so_far += (sizeof (struct Lisp_String) - 1
+           size_so_far += (sizeof (Lisp_String) - 1
                             + XSTRING_LENGTH (XCAR (elt)));
        }
 
                             + XSTRING_LENGTH (XCAR (elt)));
        }
 
index 7c885d5..28ed2b4 100644 (file)
@@ -366,14 +366,12 @@ static int pagemask;
 #include "lisp.h"
 
 static void
 #include "lisp.h"
 
 static void
-report_error (file, fd)
-     CONST char *file;
-     int fd;
+report_error (const char *file, int fd)
 {
   if (fd)
     close (fd);
   report_file_error ("Cannot unexec",
 {
   if (fd)
     close (fd);
   report_file_error ("Cannot unexec",
-                    Fcons (build_ext_string (file, FORMAT_FILENAME), Qnil));
+                    Fcons (build_ext_string (file, Qfile_name), Qnil));
 }
 #endif /* emacs */
 
 }
 #endif /* emacs */
 
index ae661ce..6c36431 100644 (file)
@@ -615,6 +615,7 @@ unexec (char *new_name,
   l_Elf_Ehdr *old_file_h, *new_file_h;
   l_Elf_Phdr *old_program_h, *new_program_h;
   l_Elf_Shdr *old_section_h, *new_section_h;
   l_Elf_Ehdr *old_file_h, *new_file_h;
   l_Elf_Phdr *old_program_h, *new_program_h;
   l_Elf_Shdr *old_section_h, *new_section_h;
+  l_Elf_Shdr *oldbss;
 
   /* Point to the section name table in the old file.  */
   char *old_section_names;
 
   /* Point to the section name table in the old file.  */
   char *old_section_names;
@@ -697,8 +698,8 @@ unexec (char *new_name,
     (new_data2_addr - OLD_SECTION_H (old_data_index).sh_addr);
   new_base_offset  = OLD_SECTION_H (old_data_index).sh_offset +
     (old_base_addr - OLD_SECTION_H (old_data_index).sh_addr);
     (new_data2_addr - OLD_SECTION_H (old_data_index).sh_addr);
   new_base_offset  = OLD_SECTION_H (old_data_index).sh_offset +
     (old_base_addr - OLD_SECTION_H (old_data_index).sh_addr);
-  new_offsets_shift = new_bss_addr -
-    ((old_base_addr & ~0xfff) + ((old_base_addr & 0xfff) ? 0x1000 : 0));
+  new_offsets_shift = new_bss_addr - (old_base_addr & ~0xfff) + 
+    ((old_base_addr & 0xfff) ? 0x1000 : 0);
 
 #ifdef DEBUG
   fprintf (stderr, "old_bss_index %d\n", old_bss_index);
 
 #ifdef DEBUG
   fprintf (stderr, "old_bss_index %d\n", old_bss_index);
@@ -768,37 +769,41 @@ unexec (char *new_name,
 
   /* Fix up a new program header.  Extend the writable data segment so
      that the bss area is covered too. Find that segment by looking
 
   /* Fix up a new program header.  Extend the writable data segment so
      that the bss area is covered too. Find that segment by looking
-     for a segment that ends just before the .bss area.  Make sure
-     that no segments are above the new .data2.  Put a loop at the end
-     to adjust the offset and address of any segment that is above
-     data2, just in case we decide to allow this later.  */
+     for one that starts before and ends after the .bss and it PT_LOADable.
+     Put a loop at the end to adjust the offset and address of any segment
+     that is above data2, just in case we decide to allow this later.  */
 
 
+  oldbss = &OLD_SECTION_H(old_bss_index);
   for (n = new_file_h->e_phnum - 1; n >= 0; n--)
     {
       /* Compute maximum of all requirements for alignment of section.  */
   for (n = new_file_h->e_phnum - 1; n >= 0; n--)
     {
       /* Compute maximum of all requirements for alignment of section.  */
-      int alignment = (NEW_PROGRAM_H (n)).p_align;
-      if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment)
-       alignment = OLD_SECTION_H (old_bss_index).sh_addralign;
-
-      /* Supposedly this condition is okay for the SGI.  */
-#if 0
-      if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz > old_base_addr)
-       fatal ("Program segment above .bss in %s\n", old_name);
+      l_Elf_Phdr * ph =  (l_Elf_Phdr *)((byte *) new_program_h + 
+                                                 new_file_h->e_phentsize*(n));
+#ifdef DEBUG
+      printf ("%d @ %0x + %0x against %0x + %0x",
+              n, ph->p_vaddr, ph->p_memsz,
+              oldbss->sh_addr, oldbss->sh_size);
+#endif
+      if ((ph->p_type == PT_LOAD) && 
+          (ph->p_vaddr <= oldbss->sh_addr) &&
+          ((ph->p_vaddr + ph->p_memsz)>=(oldbss->sh_addr + oldbss->sh_size))) {
+        ph->p_filesz += new_offsets_shift;
+        ph->p_memsz = ph->p_filesz;
+#ifdef DEBUG
+        puts (" That's the one!");
+        fflush (stdout);
+#endif
+        break;
+      }
+#ifdef DEBUG
+      putchar ('\n');
+      fflush (stdout);
 #endif
 #endif
-
-      if (NEW_PROGRAM_H (n).p_type == PT_LOAD
-         && (round_up ((NEW_PROGRAM_H (n)).p_vaddr
-                       + (NEW_PROGRAM_H (n)).p_filesz,
-                       alignment)
-             == round_up (old_base_addr, alignment)))
-       break;
     }
   if (n < 0)
     fatal ("Couldn't find segment next to %s in %s\n",
           old_sbss_index == -1 ? ".sbss" : ".bss", old_name);
 
     }
   if (n < 0)
     fatal ("Couldn't find segment next to %s in %s\n",
           old_sbss_index == -1 ? ".sbss" : ".bss", old_name);
 
-  NEW_PROGRAM_H (n).p_filesz += new_offsets_shift;
-  NEW_PROGRAM_H (n).p_memsz = NEW_PROGRAM_H (n).p_filesz;
 
 #if 1                          /* Maybe allow section after data2 - does this ever happen?  */
   for (n = new_file_h->e_phnum - 1; n >= 0; n--)
 
 #if 1                          /* Maybe allow section after data2 - does this ever happen?  */
   for (n = new_file_h->e_phnum - 1; n >= 0; n--)
index f13684f..38fac1f 100644 (file)
@@ -111,10 +111,16 @@ int nCmdShow = 0;
    version, we need to bootstrap our heap and .bss section into our
    address space before we can actually hand off control to the startup
    code supplied by NT (primarily because that code relies upon malloc ()).  */
    version, we need to bootstrap our heap and .bss section into our
    address space before we can actually hand off control to the startup
    code supplied by NT (primarily because that code relies upon malloc ()).  */
+
+/* **********************
+   Hackers please remember, this _start() thingy is *not* called neither
+   when dumping portably, nor when running from temacs! Do not put
+   significant XEmacs initialization here!
+   ********************** */
+
 void
 _start (void)
 {
 void
 _start (void)
 {
-  char * p;
   extern void mainCRTStartup (void);
 
   /* Cache system info, e.g., the NT page size.  */
   extern void mainCRTStartup (void);
 
   /* Cache system info, e.g., the NT page size.  */
@@ -134,18 +140,29 @@ _start (void)
          exit (1);
        }
 
          exit (1);
        }
 
-      /* To allow profiling, make sure executable_path names the .exe
-        file, not the file created by the profiler */
-      p = strrchr (executable_path, '\\');
-      strcpy (p+1, PATH_PROGNAME ".exe");
+      /* #### This is super-bogus. When I rename xemacs.exe,
+        the renamed file still loads its heap from xemacs.exe --kkm */
+#if 0
+      {
+       /* To allow profiling, make sure executable_path names the .exe
+          file, not the file created by the profiler */
+       char *p = strrchr (executable_path, '\\');
+       strcpy (p+1, PATH_PROGNAME ".exe");
+      }
+#endif
 
       recreate_heap (executable_path);
       heap_state = HEAP_LOADED;
     }
 
 
       recreate_heap (executable_path);
       heap_state = HEAP_LOADED;
     }
 
+  /* #### This is bogus, too. _fmode is set to different values
+     when we run `xemacs' and `temacs run-emacs'. The sooner we
+     hit and fix all the weirdities this causes us, the better --kkm */
+#if 0
   /* The default behavior is to treat files as binary and patch up
      text files appropriately, in accordance with the MSDOS code.  */
   _fmode = O_BINARY;
   /* The default behavior is to treat files as binary and patch up
      text files appropriately, in accordance with the MSDOS code.  */
   _fmode = O_BINARY;
+#endif
 
 #if 0
   /* This prevents ctrl-c's in shells running while we're suspended from
 
 #if 0
   /* This prevents ctrl-c's in shells running while we're suspended from
index 9281bd8..3a86d72 100644 (file)
@@ -710,7 +710,7 @@ int
 window_truncation_on (struct window *w)
 {
     /* Minibuffer windows are never truncated.
 window_truncation_on (struct window *w)
 {
     /* Minibuffer windows are never truncated.
-       ### is this the right way ? */
+       #### is this the right way ? */
   if (MINI_WINDOW_P (w))
     return 0;
 
   if (MINI_WINDOW_P (w))
     return 0;
 
@@ -2605,7 +2605,7 @@ window_loop (enum window_loop type,
                            new_buffer = Fother_buffer (obj, Qnil, Qnil);
                            if (NILP (new_buffer))
                              new_buffer = Fget_buffer_create (QSscratch);
                            new_buffer = Fother_buffer (obj, Qnil, Qnil);
                            if (NILP (new_buffer))
                              new_buffer = Fget_buffer_create (QSscratch);
-                           Fset_window_buffer (w, new_buffer);
+                           Fset_window_buffer (w, new_buffer, Qnil);
                            if (EQ (w, Fselected_window (Qnil)))
                              Fset_buffer (p->buffer);
                          }
                            if (EQ (w, Fselected_window (Qnil)))
                              Fset_buffer (p->buffer);
                          }
@@ -2677,7 +2677,7 @@ window_loop (enum window_loop type,
                          /* Otherwise show a different buffer in the
                              window.  */
                          p->dedicated = Qnil;
                          /* Otherwise show a different buffer in the
                              window.  */
                          p->dedicated = Qnil;
-                         Fset_window_buffer (w, another_buffer);
+                         Fset_window_buffer (w, another_buffer, Qnil);
                          if (EQ (w, Fselected_window (Qnil)))
                            Fset_buffer (p->buffer);
                        }
                          if (EQ (w, Fselected_window (Qnil)))
                            Fset_buffer (p->buffer);
                        }
@@ -2978,17 +2978,41 @@ check_min_window_sizes (void)
     window_min_height = MIN_SAFE_WINDOW_HEIGHT;
 }
 
     window_min_height = MIN_SAFE_WINDOW_HEIGHT;
 }
 
+static int
+frame_min_height (struct frame *frame)
+{
+  /* For height, we have to see whether the frame has a minibuffer, and
+     whether it wants a modeline.  */
+  return (FRAME_MINIBUF_ONLY_P (frame) ? MIN_SAFE_WINDOW_HEIGHT - 1
+         : (! FRAME_HAS_MINIBUF_P (frame)) ? MIN_SAFE_WINDOW_HEIGHT
+         : 2 * MIN_SAFE_WINDOW_HEIGHT - 1);
+}
+
+/* Return non-zero if both frame sizes are less than or equal to
+   minimal allowed values. ROWS and COLS are in characters */
+int
+frame_size_valid_p (struct frame *frame, int rows, int cols)
+{
+  return (rows >= frame_min_height (frame)
+         && cols >= MIN_SAFE_WINDOW_WIDTH);
+}
+
+/* Return non-zero if both frame sizes are less than or equal to
+   minimal allowed values. WIDTH and HEIGHT are in pixels */
+int
+frame_pixsize_valid_p (struct frame *frame, int width, int height)
+{
+  int rows, cols;
+  pixel_to_real_char_size (frame, width, height, &cols, &rows);
+  return frame_size_valid_p (frame, rows, cols);
+}
+
 /* If *ROWS or *COLS are too small a size for FRAME, set them to the
    minimum allowable size.  */
 void
 check_frame_size (struct frame *frame, int *rows, int *cols)
 {
 /* If *ROWS or *COLS are too small a size for FRAME, set them to the
    minimum allowable size.  */
 void
 check_frame_size (struct frame *frame, int *rows, int *cols)
 {
-  /* For height, we have to see whether the frame has a minibuffer, and
-     whether it wants a modeline.  */
-  int min_height =
-    (FRAME_MINIBUF_ONLY_P (frame) ? MIN_SAFE_WINDOW_HEIGHT - 1
-     : (! FRAME_HAS_MINIBUF_P (frame)) ? MIN_SAFE_WINDOW_HEIGHT
-     : 2 * MIN_SAFE_WINDOW_HEIGHT - 1);
+  int min_height = frame_min_height (frame);
 
   if (*rows < min_height)
     *rows = min_height;
 
   if (*rows < min_height)
     *rows = min_height;
@@ -3138,11 +3162,14 @@ set_window_pixwidth (Lisp_Object window, int new_pixwidth, int nodelete)
 \f
 static int window_select_count;
 
 \f
 static int window_select_count;
 
-DEFUN ("set-window-buffer", Fset_window_buffer, 2, 2, 0, /*
+DEFUN ("set-window-buffer", Fset_window_buffer, 2, 3, 0, /*
 Make WINDOW display BUFFER as its contents.
 BUFFER can be a buffer or buffer name.
 Make WINDOW display BUFFER as its contents.
 BUFFER can be a buffer or buffer name.
+
+With non-nil optional argument `norecord', do not modify the
+global or per-frame buffer ordering.
 */
 */
-       (window, buffer))
+       (window, buffer, norecord))
 {
   Lisp_Object tem;
   struct window *w = decode_window (window);
 {
   Lisp_Object tem;
   struct window *w = decode_window (window);
@@ -3201,6 +3228,9 @@ BUFFER can be a buffer or buffer name.
   recompute_all_cached_specifiers_in_window (w);
   if (EQ (window, Fselected_window (Qnil)))
     {
   recompute_all_cached_specifiers_in_window (w);
   if (EQ (window, Fselected_window (Qnil)))
     {
+      if (NILP (norecord))
+       Frecord_buffer (buffer);
+
       Fset_buffer (buffer);
     }
   return Qnil;
       Fset_buffer (buffer);
     }
   return Qnil;
@@ -3503,7 +3533,7 @@ and put SIZE columns in the first of the pair.
   /* do this last (after the window is completely initialized and
      the mirror-dirty flag is set) so that specifier recomputation
      caused as a result of this will work properly and not abort. */
   /* do this last (after the window is completely initialized and
      the mirror-dirty flag is set) so that specifier recomputation
      caused as a result of this will work properly and not abort. */
-  Fset_window_buffer (new, o->buffer);
+  Fset_window_buffer (new, o->buffer, Qt);
   return new;
 }
 \f
   return new;
 }
 \f
@@ -4051,7 +4081,7 @@ window_scroll (Lisp_Object window, Lisp_Object n, int direction,
 
   if (INTP (Vwindow_pixel_scroll_increment))
     fheight = XINT (Vwindow_pixel_scroll_increment);
 
   if (INTP (Vwindow_pixel_scroll_increment))
     fheight = XINT (Vwindow_pixel_scroll_increment);
-  else if (!NILP (Vwindow_pixel_scroll_increment));
+  else if (!NILP (Vwindow_pixel_scroll_increment))
     default_face_height_and_width (window, &fheight, &fwidth);
 
   if (Dynarr_length (dla) >= 1)
     default_face_height_and_width (window, &fheight, &fwidth);
 
   if (Dynarr_length (dla) >= 1)
@@ -4159,6 +4189,24 @@ window_scroll (Lisp_Object window, Lisp_Object n, int direction,
              w->start_at_line_beg = beginning_of_line_p (b, startp);
              MARK_WINDOWS_CHANGED (w);
 
              w->start_at_line_beg = beginning_of_line_p (b, startp);
              MARK_WINDOWS_CHANGED (w);
 
+             /* #### Scroll back by less than a line. This code was
+                originally for scrolling over large pixmaps and it
+                loses when a line being *exposed* at the top of the
+                window is bigger than the current one. However, for
+                pixel based scrolling in general we can guess that
+                the line we are going to display is probably the same
+                size as the one we are on. In that instance we can
+                have a reasonable stab at a suitable top clip. Fixing
+                this properly is hard (and probably slow) as we would
+                have to call redisplay to figure out the exposed line
+                size. */
+             if (!NILP (Vwindow_pixel_scroll_increment)
+                 && Dynarr_length (dla) >= (1 + modeline)
+                 && dl->ascent + fheight * value > 0)
+               {
+                 WINDOW_TEXT_TOP_CLIP (w) = (dl->ascent + fheight * value);
+               }
+
              if (!point_would_be_visible (w, startp, XINT (point)))
                {
                  Bufpos new_point;
              if (!point_would_be_visible (w, startp, XINT (point)))
                {
                  Bufpos new_point;
index 588187a..d228076 100644 (file)
@@ -24,8 +24,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: FSF 19.30. */
 
 
 /* Synched up with: FSF 19.30. */
 
-#ifndef _XEMACS_WINDOW_H_
-#define _XEMACS_WINDOW_H_
+#ifndef INCLUDED_window_h_
+#define INCLUDED_window_h_
 
 #include "redisplay.h"
 #ifdef HAVE_SCROLLBARS
 
 #include "redisplay.h"
 #ifdef HAVE_SCROLLBARS
@@ -310,7 +310,7 @@ EXFUN (Frecenter, 2);
 EXFUN (Freplace_buffer_in_windows, 1);
 EXFUN (Fselect_window, 2);
 EXFUN (Fselected_window, 1);
 EXFUN (Freplace_buffer_in_windows, 1);
 EXFUN (Fselect_window, 2);
 EXFUN (Fselected_window, 1);
-EXFUN (Fset_window_buffer, 2);
+EXFUN (Fset_window_buffer, 3);
 EXFUN (Fset_window_hscroll, 2);
 EXFUN (Fset_window_point, 2);
 EXFUN (Fset_window_start, 3);
 EXFUN (Fset_window_hscroll, 2);
 EXFUN (Fset_window_point, 2);
 EXFUN (Fset_window_start, 3);
@@ -360,6 +360,8 @@ void window_scroll (Lisp_Object window, Lisp_Object n, int direction,
 int buffer_window_count (struct buffer *b, struct frame *f);
 int buffer_window_mru (struct window *w);
 void check_frame_size (struct frame *frame, int *rows, int *cols);
 int buffer_window_count (struct buffer *b, struct frame *f);
 int buffer_window_mru (struct window *w);
 void check_frame_size (struct frame *frame, int *rows, int *cols);
+int frame_pixsize_valid_p (struct frame *frame, int width, int height);
+int frame_size_valid_p (struct frame *frame, int rows, int cols);
 struct window *decode_window (Lisp_Object window);
 struct window *find_window_by_pixel_pos (int pix_x, int pix_y, Lisp_Object win);
 
 struct window *decode_window (Lisp_Object window);
 struct window *find_window_by_pixel_pos (int pix_x, int pix_y, Lisp_Object win);
 
@@ -425,4 +427,4 @@ int window_divider_width (struct window *w);
 
 #endif /* emacs */
 
 
 #endif /* emacs */
 
-#endif /* _XEMACS_WINDOW_H_ */
+#endif /* INCLUDED_window_h_ */
index 7696fb4..e8adaeb 100644 (file)
@@ -23,12 +23,12 @@ Boston, MA 02111-1307, USA.  */
 
 /* Written by jwz, 14 jun 93 */
 
 
 /* Written by jwz, 14 jun 93 */
 
-#ifndef _XGCCACHE_H_
-#define _XGCCACHE_H_
+#ifndef INCLUDED_xgccache_h_
+#define INCLUDED_xgccache_h_
 
 struct gc_cache;
 struct gc_cache *make_gc_cache (Display *, Window);
 void free_gc_cache (struct gc_cache *cache);
 GC gc_cache_lookup (struct gc_cache *, XGCValues *, unsigned long mask);
 
 
 struct gc_cache;
 struct gc_cache *make_gc_cache (Display *, Window);
 void free_gc_cache (struct gc_cache *cache);
 GC gc_cache_lookup (struct gc_cache *, XGCValues *, unsigned long mask);
 
-#endif /* _XGCCACHE_H_ */
+#endif /* INCLUDED_xgccache_h_ */
index 8262613..f0cbba6 100644 (file)
@@ -19,6 +19,9 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
+#ifndef INCLUDED_xintrinsic_h_
+#define INCLUDED_xintrinsic_h_
+
 #undef CONST                    /* X11R4 header thinks it can define CONST */
 
 #include <X11/Intrinsic.h>
 #undef CONST                    /* X11R4 header thinks it can define CONST */
 
 #include <X11/Intrinsic.h>
@@ -28,3 +31,5 @@ Boston, MA 02111-1307, USA.  */
 #else
 # define CONST const
 #endif
 #else
 # define CONST const
 #endif
+
+#endif /* INCLUDED_xintrinsic_h_ */
index b669f7e..2f1caf6 100644 (file)
@@ -19,6 +19,9 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
+#ifndef INCLUDED_xintrinsicp_h_
+#define INCLUDED_xintrinsicp_h_
+
 #undef CONST                    /* X11R4 header thinks it can define CONST */
 
 #include <X11/Intrinsic.h>
 #undef CONST                    /* X11R4 header thinks it can define CONST */
 
 #include <X11/Intrinsic.h>
@@ -30,3 +33,5 @@ Boston, MA 02111-1307, USA.  */
 #else
 # define CONST const
 #endif
 #else
 # define CONST const
 #endif
+
+#endif /* INCLUDED_xintrinsicp_h_ */
index 4800b0a..3d4698c 100644 (file)
@@ -23,9 +23,14 @@ Boston, MA 02111-1307, USA.  */
 /* ManagerP.h doesn't exist in old versions of Motif; the stuff is
    in XmP.h instead */
 
 /* ManagerP.h doesn't exist in old versions of Motif; the stuff is
    in XmP.h instead */
 
+#ifndef INCLUDED_xmmanagerp_h_
+#define INCLUDED_xmmanagerp_h_
+
 #include <Xm/Xm.h>     /* to get XmVersion */
 #if (XmVersion >= 1002)
 # include <Xm/ManagerP.h>
 #else
 # include <Xm/XmP.h>
 #endif
 #include <Xm/Xm.h>     /* to get XmVersion */
 #if (XmVersion >= 1002)
 # include <Xm/ManagerP.h>
 #else
 # include <Xm/XmP.h>
 #endif
+
+#endif /* INCLUDED_xmmanagerp_h_ */
index ef475b8..674736b 100644 (file)
@@ -23,9 +23,14 @@ Boston, MA 02111-1307, USA.  */
 /* PrimitiveP.h doesn't exist in old versions of Motif; the stuff is
    in XmP.h instead */
 
 /* PrimitiveP.h doesn't exist in old versions of Motif; the stuff is
    in XmP.h instead */
 
+#ifndef INCLUDED_xmprimitivep_h_
+#define INCLUDED_xmprimitivep_h_
+
 #include <Xm/Xm.h>     /* to get XmVersion */
 #if (XmVersion >= 1002)
 # include <Xm/PrimitiveP.h>
 #else
 # include <Xm/XmP.h>
 #endif
 #include <Xm/Xm.h>     /* to get XmVersion */
 #if (XmVersion >= 1002)
 # include <Xm/PrimitiveP.h>
 #else
 # include <Xm/XmP.h>
 #endif
+
+#endif /* INCLUDED_xmprimitivep_h_ */
index 715d2ee..bcdfc0d 100644 (file)
--- a/src/xmu.h
+++ b/src/xmu.h
@@ -2,6 +2,9 @@
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
+#ifndef INCLUDED_xmu_h_
+#define INCLUDED_xmu_h_
+
 #ifdef HAVE_XMU
 
 # include <X11/Xmu/CharSet.h>
 #ifdef HAVE_XMU
 
 # include <X11/Xmu/CharSet.h>
@@ -34,5 +37,6 @@ void XmuCopyISOLatin1Lowered (char *, CONST char *);
 #define AssignMin(x, y) {if ((y) < (x)) x = (y);}
 typedef enum {XtorientHorizontal, XtorientVertical} XtOrientation;
 
 #define AssignMin(x, y) {if ((y) < (x)) x = (y);}
 typedef enum {XtorientHorizontal, XtorientVertical} XtOrientation;
 
-#endif
+#endif /* HAVE_XMU */
 
 
+#endif /* INCLUDED_xmu_h_ */
index d1b19a2..01e590a 100644 (file)
@@ -1,3 +1,23 @@
+2000-02-07  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.28 is released.
+
+2000-02-07  Martin Buchholz  <martin@xemacs.org>
+
+       * automated/lisp-tests.el: Add plist manipulation tests.
+
+2000-02-02  Martin Buchholz  <martin@xemacs.org>
+
+       * automated/symbol-tests.el: Crashes fixed, so resurrect
+       makunbound test for dontusethis-set-symbol-value-handler.
+       Add more dontusethis-set-symbol-value-handler tests.
+       Should fix any lingering problems with gnus playing with
+       pathname-coding-system.
+
+2000-01-25  Martin Buchholz  <martin@xemacs.org>
+
+       * mule-tests.el: Add coding-system tests.
+
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
 2000-01-18  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.27 is released.
index 1fba118..5893d17 100644 (file)
   (Assert (eq (preceding-char) 0))
   (Assert (eq (following-char) ?f))
   )
   (Assert (eq (preceding-char) 0))
   (Assert (eq (following-char) ?f))
   )
+
+;;-----------------------------------------------------
+;; Test plist manipulation functions.
+;;-----------------------------------------------------
+(let ((sym (make-symbol "test-symbol")))
+  (Assert (eq t (get* sym t t)))
+  (Assert (eq t (get  sym t t)))
+  (Assert (eq t (getf nil t t)))
+  (Assert (eq t (plist-get nil t t)))
+  (put sym 'bar 'baz)
+  (Assert (eq 'baz (get sym 'bar)))
+  (Assert (eq 'baz (getf '(bar baz) 'bar)))
+  (Assert (eq 'baz (getf (symbol-plist sym) 'bar)))
+  (Assert (eq 2 (getf '(1 2) 1)))
+  )
index 86c402d..0e44714 100644 (file)
@@ -1,7 +1,8 @@
 ;; Copyright (C) 1999 Free Software Foundation, Inc.
 
 ;; Author: Hrvoje Niksic <hniksic@xemacs.org>
 ;; Copyright (C) 1999 Free Software Foundation, Inc.
 
 ;; Author: Hrvoje Niksic <hniksic@xemacs.org>
-;; Maintainer: Hrvoje Niksic <hniksic@xemacs.org>
+;; Maintainers: Hrvoje Niksic <hniksic@xemacs.org>,
+;;              Martin Buchholz <martin@xemacs.org>
 ;; Created: 1999
 ;; Keywords: tests
 
 ;; Created: 1999
 ;; Keywords: tests
 
@@ -103,6 +104,127 @@ the Assert macro checks for correctness."
     (aset string 0 (make-char 'latin-iso8859-2 42))
     (Assert (eq (aref string 1) (make-char 'latin-iso8859-2 69))))
 
     (aset string 0 (make-char 'latin-iso8859-2 42))
     (Assert (eq (aref string 1) (make-char 'latin-iso8859-2 69))))
 
+  ;; Test coding system functions
+
+  ;; Create alias for coding system without subsidiaries
+  (Assert (coding-system-p (find-coding-system 'binary)))
+  (Assert (coding-system-canonical-name-p 'binary))
+  (Assert (not (coding-system-alias-p 'binary)))
+  (Assert (not (coding-system-alias-p 'mule-tests-alias)))
+  (Assert (not (coding-system-canonical-name-p 'mule-tests-alias)))
+  (Check-Error-Message
+   error "Symbol is the canonical name of a coding system and cannot be redefined"
+   (define-coding-system-alias 'binary 'iso8859-2))
+  (Check-Error-Message
+   error "Symbol is not a coding system alias"
+   (coding-system-aliasee 'binary))
+
+  (define-coding-system-alias 'mule-tests-alias 'binary)
+  (Assert (coding-system-alias-p 'mule-tests-alias))
+  (Assert (not (coding-system-canonical-name-p 'mule-tests-alias)))
+  (Assert (eq (get-coding-system 'binary) (get-coding-system 'mule-tests-alias)))
+  (Assert (eq 'binary (coding-system-aliasee 'mule-tests-alias)))
+  (Assert (not (coding-system-alias-p 'mule-tests-alias-unix)))
+  (Assert (not (coding-system-alias-p 'mule-tests-alias-dos)))
+  (Assert (not (coding-system-alias-p 'mule-tests-alias-mac)))
+
+  (define-coding-system-alias 'mule-tests-alias (get-coding-system 'binary))
+  (Assert (coding-system-alias-p 'mule-tests-alias))
+  (Assert (not (coding-system-canonical-name-p 'mule-tests-alias)))
+  (Assert (eq (get-coding-system 'binary) (get-coding-system 'mule-tests-alias)))
+  (Assert (eq 'binary (coding-system-aliasee 'mule-tests-alias)))
+  (Assert (not (coding-system-alias-p 'mule-tests-alias-unix)))
+  (Assert (not (coding-system-alias-p 'mule-tests-alias-dos)))
+  (Assert (not (coding-system-alias-p 'mule-tests-alias-mac)))
+
+  (define-coding-system-alias 'nested-mule-tests-alias 'mule-tests-alias)
+  (Assert (coding-system-alias-p 'nested-mule-tests-alias))
+  (Assert (not (coding-system-canonical-name-p 'nested-mule-tests-alias)))
+  (Assert (eq (get-coding-system 'binary) (get-coding-system 'nested-mule-tests-alias)))
+  (Assert (eq (coding-system-aliasee 'nested-mule-tests-alias) 'mule-tests-alias))
+  (Assert (eq 'mule-tests-alias (coding-system-aliasee 'nested-mule-tests-alias)))
+  (Assert (not (coding-system-alias-p 'nested-mule-tests-alias-unix)))
+  (Assert (not (coding-system-alias-p 'nested-mule-tests-alias-dos)))
+  (Assert (not (coding-system-alias-p 'nested-mule-tests-alias-mac)))
+
+  (Check-Error-Message
+   error "Attempt to create a coding system alias loop"
+   (define-coding-system-alias 'mule-tests-alias 'nested-mule-tests-alias))
+  (Check-Error-Message
+   error "No such coding system"
+   (define-coding-system-alias 'no-such-coding-system 'no-such-coding-system))
+  (Check-Error-Message
+   error "Attempt to create a coding system alias loop"
+   (define-coding-system-alias 'mule-tests-alias 'mule-tests-alias))
+
+  (define-coding-system-alias 'nested-mule-tests-alias nil)
+  (define-coding-system-alias 'mule-tests-alias nil)
+  (Assert (coding-system-p (find-coding-system 'binary)))
+  (Assert (coding-system-canonical-name-p 'binary))
+  (Assert (not (coding-system-alias-p 'binary)))
+  (Assert (not (coding-system-alias-p 'mule-tests-alias)))
+  (Assert (not (coding-system-canonical-name-p 'mule-tests-alias)))
+  (Check-Error-Message
+   error "Symbol is the canonical name of a coding system and cannot be redefined"
+   (define-coding-system-alias 'binary 'iso8859-2))
+  (Check-Error-Message
+   error "Symbol is not a coding system alias"
+   (coding-system-aliasee 'binary))
+
+  (define-coding-system-alias 'nested-mule-tests-alias nil)
+  (define-coding-system-alias 'mule-tests-alias nil)
+
+  ;; Create alias for coding system with subsidiaries
+  (define-coding-system-alias 'mule-tests-alias 'iso-8859-7)
+  (Assert (coding-system-alias-p 'mule-tests-alias))
+  (Assert (not (coding-system-canonical-name-p 'mule-tests-alias)))
+  (Assert (eq (get-coding-system 'iso-8859-7) (get-coding-system 'mule-tests-alias)))
+  (Assert (eq 'iso-8859-7 (coding-system-aliasee 'mule-tests-alias)))
+  (Assert (coding-system-alias-p 'mule-tests-alias-unix))
+  (Assert (coding-system-alias-p 'mule-tests-alias-dos))
+  (Assert (coding-system-alias-p 'mule-tests-alias-mac))
+
+  (define-coding-system-alias 'mule-tests-alias (get-coding-system 'iso-8859-7))
+  (Assert (coding-system-alias-p 'mule-tests-alias))
+  (Assert (not (coding-system-canonical-name-p 'mule-tests-alias)))
+  (Assert (eq (get-coding-system 'iso-8859-7) (get-coding-system 'mule-tests-alias)))
+  (Assert (eq 'iso-8859-7 (coding-system-aliasee 'mule-tests-alias)))
+  (Assert (coding-system-alias-p 'mule-tests-alias-unix))
+  (Assert (coding-system-alias-p 'mule-tests-alias-dos))
+  (Assert (coding-system-alias-p 'mule-tests-alias-mac))
+  (Assert (eq (find-coding-system 'mule-tests-alias-mac)
+             (find-coding-system 'iso-8859-7-mac)))
+
+  (define-coding-system-alias 'nested-mule-tests-alias 'mule-tests-alias)
+  (Assert (coding-system-alias-p 'nested-mule-tests-alias))
+  (Assert (not (coding-system-canonical-name-p 'nested-mule-tests-alias)))
+  (Assert (eq (get-coding-system 'iso-8859-7)
+             (get-coding-system 'nested-mule-tests-alias)))
+  (Assert (eq (coding-system-aliasee 'nested-mule-tests-alias) 'mule-tests-alias))
+  (Assert (eq 'mule-tests-alias (coding-system-aliasee 'nested-mule-tests-alias)))
+  (Assert (coding-system-alias-p 'nested-mule-tests-alias-unix))
+  (Assert (coding-system-alias-p 'nested-mule-tests-alias-dos))
+  (Assert (coding-system-alias-p 'nested-mule-tests-alias-mac))
+  (Assert (eq (find-coding-system 'nested-mule-tests-alias-unix)
+             (find-coding-system 'iso-8859-7-unix)))
+
+  (Check-Error-Message
+   error "Attempt to create a coding system alias loop"
+   (define-coding-system-alias 'mule-tests-alias 'nested-mule-tests-alias))
+  (Check-Error-Message
+   error "No such coding system"
+   (define-coding-system-alias 'no-such-coding-system 'no-such-coding-system))
+  (Check-Error-Message
+   error "Attempt to create a coding system alias loop"
+   (define-coding-system-alias 'mule-tests-alias 'mule-tests-alias))
+
+  ;; Test dangling alias deletion
+  (define-coding-system-alias 'mule-tests-alias nil)
+  (Assert (not (coding-system-alias-p 'mule-tests-alias)))
+  (Assert (not (coding-system-alias-p 'mule-tests-alias-unix)))
+  (Assert (not (coding-system-alias-p 'nested-mule-tests-alias)))
+  (Assert (not (coding-system-alias-p 'nested-mule-tests-alias-dos)))
+
   ;; Test strings waxing and waning across the 8k BIG_STRING limit (see alloc.c)
   (defun charset-char-string (charset)
     (let (lo hi string n)
   ;; Test strings waxing and waning across the 8k BIG_STRING limit (see alloc.c)
   (defun charset-char-string (charset)
     (let (lo hi string n)
index 0159d5b..dc8037e 100644 (file)
 ;; Magic symbols
 ;;-----------------------------------------------------
 
 ;; Magic symbols
 ;;-----------------------------------------------------
 
-;; Magic symbols are almost totally unimplemented.  However, a
-;; rudimentary subset of the functionality is being used to implement
-;; backward compatibility or clearer error messages for new features
-;; such as specifiers and glyphs.  These tests try to test that
-;; working subset.
+;; Magic symbols are only half implemented.  However, a subset of the
+;; functionality is being used to implement backward compatibility or
+;; clearer error messages for new features such as specifiers and
+;; glyphs.  These tests try to test that working subset.
 
 
-(let ((mysym (make-symbol "test-symbol")))
+(let ((mysym (make-symbol "test-symbol"))
+      save)
   (dontusethis-set-symbol-value-handler
    mysym
    'set-value
    (lambda (&rest args)
      (throw 'test-tag args)))
   (dontusethis-set-symbol-value-handler
    mysym
    'set-value
    (lambda (&rest args)
      (throw 'test-tag args)))
+  (Assert (not (boundp mysym)))
   (Assert (equal (catch 'test-tag
                   (set mysym 'foo))
   (Assert (equal (catch 'test-tag
                   (set mysym 'foo))
-                `(,mysym (foo) set nil nil))))
-
-;; #### These two make XEmacs crash!
+                `(,mysym (foo) set nil nil)))
+  (Assert (not (boundp mysym)))
+  (dontusethis-set-symbol-value-handler
+   mysym
+   'set-value
+   (lambda (&rest args) (setq save (nth 1 args))))
+  (set mysym 'foo)
+  (Assert (equal save '(foo)))
+  (Assert (eq (symbol-value mysym) 'foo))
+  )
+
+(let ((mysym (make-symbol "test-symbol"))
+      save)
+  (dontusethis-set-symbol-value-handler
+   mysym
+   'make-unbound
+   (lambda (&rest args)
+     (throw 'test-tag args)))
+  (Assert (equal (catch 'test-tag
+                  (makunbound mysym))
+                `(,mysym nil makunbound nil nil)))
+  (dontusethis-set-symbol-value-handler
+   mysym
+   'make-unbound
+   (lambda (&rest args) (setq save (nth 2 args))))
+  (Assert (not (boundp mysym)))
+  (set mysym 'bar)
+  (Assert (null save))
+  (Assert (eq (symbol-value mysym) 'bar))
+  (makunbound mysym)
+  (Assert (not (boundp mysym)))
+  (Assert (eq save 'makunbound))
+  )
+
+(when (featurep 'file-coding)
+  (Assert (eq pathname-coding-system file-name-coding-system))
+  (let ((val1 file-name-coding-system)
+       (val2 pathname-coding-system))
+    (Assert (eq val1 val2))
+    (let ((file-name-coding-system 'no-conversion-dos))
+      (Assert (eq file-name-coding-system 'no-conversion-dos))
+      (Assert (eq pathname-coding-system file-name-coding-system)))
+    (let ((pathname-coding-system 'no-conversion-mac))
+      (Assert (eq file-name-coding-system 'no-conversion-mac))
+      (Assert (eq pathname-coding-system file-name-coding-system)))
+    (Assert (eq file-name-coding-system pathname-coding-system))
+    (Assert (eq val1 file-name-coding-system)))
+  (Assert (eq pathname-coding-system file-name-coding-system)))
 
 
-;(let ((mysym (make-symbol "test-symbol")))
-;  (dontusethis-set-symbol-value-handler
-;   mysym
-;   'make-unbound
-;   (lambda (&rest args)
-;     (throw 'test-tag args)))
-;  (Assert (equal (catch 'test-tag
-;                 (set mysym 'foo))
-;               `(,mysym (foo) set nil nil))))
 
 ;(let ((mysym (make-symbol "test-symbol")))
 ;  (dontusethis-set-symbol-value-handler
 
 ;(let ((mysym (make-symbol "test-symbol")))
 ;  (dontusethis-set-symbol-value-handler
 ;     (throw 'test-tag args)))
 ;  (Assert (equal (catch 'test-tag
 ;                 (set mysym 'foo))
 ;     (throw 'test-tag args)))
 ;  (Assert (equal (catch 'test-tag
 ;                 (set mysym 'foo))
-;               `(,mysym (foo) set nil nil))))
+;               `(,mysym (foo) make-local nil nil))))
index 40561bc..763b4b9 100644 (file)
@@ -2,8 +2,8 @@
 emacs_is_beta=t
 emacs_major_version=21
 emacs_minor_version=2
 emacs_is_beta=t
 emacs_major_version=21
 emacs_minor_version=2
-emacs_beta_version=27
-xemacs_codename="Hera"
+emacs_beta_version=28
+xemacs_codename="Hermes"
 infodock_major_version=4
 infodock_minor_version=0
 infodock_build_version=8
 infodock_major_version=4
 infodock_minor_version=0
 infodock_build_version=8