Commits

Anonymous committed fbbf69b

Import from CVS: tag r21-0-66

Comments (0)

Files changed (29)

 							-*- indented-text -*-
+to 21.0.66 "20 minutes to Nikko"
+-- build fixes from Martin Buchholz
+-- various patches from Andy Piper and Jan Vroonhof
+-- alist.el synched with APEL-9.13 from MORIOKA Tomohiko
+
 to 21.0.65 "20 minutes to Nikko"
--- Fix for new Berkeley DB library from Paul Keusemann/Gregory Neal Shapiro
+-- Fix for new Berkeley DB library from Paul Keusemann/Gregory Neil Shapiro
 -- Various package-ui fixes from Jan Vroonhof
 -- Fix for doubled font-locking during buffer reversion
 -- KFM browsing support from Neal Becker
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released
 It has been greatly enhanced with respect to the one once included
 with the ilisp package and should work well under XEmacs 21.0.
 
+** Gnuserv changes
+
+*** Like the old 'gnudoit' program. Gnuclient -batch now can read from stdin.
+
+*** Again like the old 'gnudoit' program, gnuclient now can return multiple
+lines.
+
 ** C mode changes
 
 *** Multiline macros are now handled, both as they affect indentation,

lib-src/ChangeLog

+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
+1999-03-10  Martin Buchholz  <martin@xemacs.org>
+
+	* fakemail.c (add_a_stream): Always use full ANSI prototypes.
+
+1999-03-06  Martin Buchholz  <martin@xemacs.org>
+
+	* fakemail.c (main): Ansify.
+	(xmalloc): Ansify.
+	(xrealloc): Ansify.
+	(get_keyword): use paranoid casts ((int) (unsigned char) c) for
+	islower, toupper, isspace.
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released

lib-src/fakemail.c

 #include <../src/config.h>
 
 #if defined (BSD) && !defined (BSD4_1) && !defined (USE_FAKEMAIL)
-/* This program isnot used in BSD, so just avoid loader complaints.  */
+/* This program is not used in BSD, so just avoid loader complaints.  */
 int
-main ()
+main (int argc, char *argv[])
 {
   return 0;
 }
 #include <stdio.h>
 #include <stdlib.h>
 int
-main ()
+main (int argc, char *argv[])
 {
   /* Linux /bin/mail, if it exists, is NOT the Unix v7 mail that
      fakemail depends on!  This causes garbled mail.  Better to
 #else /* not BSD 4.2 (or newer) */
 #ifdef MSDOS
 int
-main ()
+main (int argc, char *argv[])
 {
   return 0;
 }
   struct header_record *previous;
 };
 typedef struct header_record *header;
-			
+
 struct stream_record
 {
   FILE *handle;
-  int (*action)();
+  int (*action)(FILE *);
   struct stream_record *rest_streams;
 };
 typedef struct stream_record *stream_list;
 /* Like malloc but get fatal error if memory is exhausted.  */
 
 static char *
-xmalloc (size)
-     size_t size;
+xmalloc (size_t size)
 {
   char *result = malloc (((unsigned) size));
   if (result == ((char *) NULL))
 }
 
 static char *
-xrealloc (ptr, size)
-     char *ptr;
-     size_t size;
+xrealloc (char *ptr, size_t size)
 {
   char *result = realloc (ptr, ((unsigned) size));
   if (result == ((char *) NULL))
 }
 
 /* Read a line of text from `stream' into `linebuffer'.
- * Return the length of the line.  
+ * Return the length of the line.
  */
 
 static long
 
   ptr = &keyword[0];
   c = *field++;
-  if ((isspace (c)) || (c == ':'))
-    return ((char *) NULL);
-  *ptr++ = ((islower (c)) ? (toupper (c)) : c);
-  while (((c = *field++) != ':') && (!(isspace (c))))
-    *ptr++ = ((islower (c)) ? (toupper (c)) : c);
+  if ((isspace ((int) (unsigned char) c)) || (c == ':'))
+    return (char *) NULL;
+  *ptr++ = ((islower ((int) (unsigned char) c)) ?
+	    (toupper ((int) (unsigned char) c)) : c);
+  while (((c = *field++) != ':') &&
+	 (!(isspace ((int) (unsigned char) c))))
+    *ptr++ = ((islower ((int) (unsigned char) c)) ?
+	      (toupper ((int) (unsigned char) c)) : c);
   *ptr++ = '\0';
-  while (isspace (c)) c = *field++;
-  if (c != ':') return ((char *) NULL);
+  while (isspace ((int) (unsigned char) c)) c = *field++;
+  if (c != ':') return (char *) NULL;
   *rest = field;
   return &keyword[0];
 }
 }
 
 static void
-add_a_stream (FILE *the_stream, int (*closing_action)())
+add_a_stream (FILE *the_stream, int (*closing_action)(FILE *))
 {
   stream_list old = the_streams;
   the_streams = new_stream ();
   *where = '\0';
   return;
 }
-
    
+
 static header
 read_header (void)
 {
 }
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char *argv[])
 {
   char *command_line;
   header the_header;
 					 args_size (the_header)));
   strcpy (command_line, mail_program_name);
   parse_header (the_header, &command_line[name_length]);
-  
+
   the_pipe = popen (command_line, "w");
   if (the_pipe == ((FILE *) NULL))
     fatal ("cannot open pipe to real mailer", (char *) 0);
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
+1999-02-19  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+	* x-faces.el (x-init-global-faces): Add default tag to specifiers, 
+	so they can be overridden by x-init-face-from-resources.
+	Additionally specify the font name also with an x tag.
+
+1999-03-08  Andy Piper  <andy@xemacs.org>
+
+	* package-get.el (package-get-base): autoload.
+
+	* menubar-items.el (default-menubar): add update menu item. Fix
+	custom menu to only be activated when package-base is available.
+
+	* package-get.el (package-get-custom): don't load
+	package-get-custom as it is auto-generated. Fix group definition.
+
+1999-03-05  Didier Verna  <verna@inf.enst.fr>
+
+	* cus-dep.el (Custom-make-dependencies): use `prin1-to-string'
+	instead of `symbol-name' (Thanks Kyle).
+
+	* cus-edit.el (custom-save-variables): use `prin1' instead of
+	princ to write symbols.
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released
-;;; alist.el --- utility functions about assoc-list
+;;; alist.el --- utility functions about association-list
 
-;; Copyright (C) 1993,1994,1995,1996 Free Software Foundation, Inc.
+;; Copyright (C) 1993,1994,1995,1996,1998 Free Software Foundation, Inc.
 
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version:
-;;	$Id: alist.el,v 1.1 1997/11/29 20:37:43 steve Exp $
 ;; Keywords: alist
 
-;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
+;; This file is part of APEL (A Portable Emacs Library).
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
 
 ;;; Code:
 
+;;;###autoload
 (defun put-alist (item value alist)
   "Modify ALIST to set VALUE to ITEM.
 If there is a pair whose car is ITEM, replace its cdr by VALUE.
       (cons (cons item value) alist)
       )))
 
+;;;###autoload
 (defun del-alist (item alist)
   "If there is a pair whose key is ITEM, delete it from ALIST.
 \[tomo's ELIS emulating function]"
 	  )
 	alist))))
 
+;;;###autoload
 (defun set-alist (symbol item value)
   "Modify a alist indicated by SYMBOL to set VALUE to ITEM."
   (or (boundp symbol)
   (set symbol (put-alist item value (symbol-value symbol)))
   )
 
+;;;###autoload
 (defun remove-alist (symbol item)
   "Remove ITEM from the alist indicated by SYMBOL."
   (and (boundp symbol)
        (set symbol (del-alist item (symbol-value symbol)))
        ))
 
+;;;###autoload
 (defun modify-alist (modifier default)
   "Modify alist DEFAULT into alist MODIFIER."
   (mapcar (function
 	  modifier)
   default)
 
+;;;###autoload
 (defun set-modified-alist (sym modifier)
   "Modify a value of a symbol SYM into alist MODIFIER.
 The symbol SYM should be alist. If it is not bound,

lisp/auto-autoloads.el

 
 ;;;***
 
+;;;### (autoloads (set-modified-alist modify-alist remove-alist set-alist del-alist put-alist) "alist" "lisp/alist.el")
+
+(autoload 'put-alist "alist" "\
+Modify ALIST to set VALUE to ITEM.
+If there is a pair whose car is ITEM, replace its cdr by VALUE.
+If there is not such pair, create new pair (ITEM . VALUE) and
+return new alist whose car is the new pair and cdr is ALIST.
+[tomo's ELIS like function]" nil nil)
+
+(autoload 'del-alist "alist" "\
+If there is a pair whose key is ITEM, delete it from ALIST.
+[tomo's ELIS emulating function]" nil nil)
+
+(autoload 'set-alist "alist" "\
+Modify a alist indicated by SYMBOL to set VALUE to ITEM." nil nil)
+
+(autoload 'remove-alist "alist" "\
+Remove ITEM from the alist indicated by SYMBOL." nil nil)
+
+(autoload 'modify-alist "alist" "\
+Modify alist DEFAULT into alist MODIFIER." nil nil)
+
+(autoload 'set-modified-alist "alist" "\
+Modify a value of a symbol SYM into alist MODIFIER.
+The symbol SYM should be alist. If it is not bound,
+its value regard as nil." nil nil)
+
+;;;***
+
 ;;;### (autoloads (apropos-documentation apropos-value apropos apropos-command) "apropos" "lisp/apropos.el")
 
 (fset 'command-apropos 'apropos-command)
 
 ;;;### (autoloads (package-get-custom package-get-package-provider package-get package-get-dependencies package-get-all package-get-update-all package-get-delete-package package-get-save-base package-get-update-base-from-buffer package-get-update-base package-get-update-base-entry package-get-require-base package-get-download-menu) "package-get" "lisp/package-get.el")
 
+(defvar package-get-base nil "\
+List of packages that are installed at this site.
+For each element in the alist,  car is the package name and the cdr is
+a plist containing information about the package.   Typical fields
+kept in the plist are:
+
+version		- version of this package
+provides	- list of symbols provided
+requires	- list of symbols that are required.
+		  These in turn are provided by other packages.
+filename	- name of the file.
+size		- size of the file (aka the bundled package)
+md5sum		- computed md5 checksum
+description	- What this package is for.
+type		- Whether this is a 'binary (default) or 'single file package
+
+More fields may be added as needed.  An example:
+
+'(
+ (name
+  (version \"<version 2>\"
+   file \"filename\"
+   description \"what this package is about.\"
+   provides (<list>)
+   requires (<list>)
+   size <integer-bytes>
+   md5sum \"<checksum\"
+   type single
+   )
+  (version \"<version 1>\"
+   file \"filename\"
+   description \"what this package is about.\"
+   provides (<list>)
+   requires (<list>)
+   size <integer-bytes>
+   md5sum \"<checksum\"
+   type single
+   )
+   ...
+   ))
+
+For version information, it is assumed things are listed in most
+recent to least recent -- in other words, the version names don't have to
+be lexically ordered.  It is debatable if it makes sense to have more than
+one version of a package available.")
+
 (autoload 'package-get-download-menu "package-get" "\
 Build the `Add Download Site' menu." nil nil)
 
 			   (if found
 			       (insert " ")
 			     (insert "(custom-add-loads '"
-				     (symbol-name sym) " '("))
+				     (prin1-to-string sym) " '("))
 			   (prin1 where (current-buffer))
 			   (push where found)))
 		       (when found
 					   (not (get symbol 'force-value)))))))
 		    (when value
 		      (princ "\n '(")
-		      (princ symbol)
+		      (prin1 symbol)
 		      (princ " ")
 		      (prin1 (car value))
 		      (cond (requests
 			       ;; Don't print default face here.
 			       value)
 		      (princ "\n '(")
-		      (princ symbol)
+		      (prin1 symbol)
 		      (princ " ")
 		      (prin1 value)
 		      (if (or (get symbol 'face-defface-spec)

lisp/menubar-items.el

                   (package-get-download-menu)))
        ["Update Package Index" package-get-update-base]
        ["List & Install" pui-list-packages]
-       ("Using Custom"
-	("Select" :filter (lambda (&rest junk)
-			  (cdr (custom-menu-create 'packages))))
-	["Update" package-get-custom])
+       ["Update Installed Packages" package-get-update-all]
+       ;; hack-o-matic, we can't force a laod of package-base here
+       ;; since it triggers dialog box interactions which we can't
+       ;; deal while using a menu
+       ("Using Custom" 
+	:filter (lambda (&rest junk)
+		  (if package-get-base
+		      (cdr (custom-menu-create 'packages))
+		    '(["Please load Package Index" (lamda (&rest junk) ()) nil]))))
+       
        ["Help" (Info-goto-node "(xemacs)Packages")])
 
       "---"

lisp/package-get.el

   "Automatic Package Fetcher and Installer."
   :prefix "package-get"
   :group 'package-tools)
-  
+
+;;;###autoload  
 (defvar package-get-base nil
   "List of packages that are installed at this site.
 For each element in the alist,  car is the package name and the cdr is
   "Fetch and install the latest versions of all customized packages."
   (interactive)
   (package-get-require-base t)
-  ;; Load a fresh copy
-  (load "package-get-custom.el")
   (mapcar (lambda (pkg)
 	    (if (eval (intern (concat (symbol-name (car pkg)) "-package")))
 		(package-get (car pkg) nil))
          (custom-var (intern (concat (symbol-name package) "-package")))
          (description (plist-get props 'description)))
     (when (not (memq group package-get-custom-groups))
-      (setq package-get-custom-groups (cons package
+      (setq package-get-custom-groups (cons group
                                             package-get-custom-groups))
       (eval `(defgroup ,group nil
                ,(concat category " package group")
 (defun x-init-global-faces ()
   (or (face-font 'default 'global)
       (set-face-font 'default
-		     "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*")
-      'global)
+		     "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*"
+		     'global '(x default)))
   (or (face-foreground 'default 'global)
-      (set-face-foreground 'default "black" 'global 'x))
+      (set-face-foreground 'default "black" 'global '(x default)))
   (or (face-background 'default 'global)
-      (set-face-background 'default "gray80" 'global 'x)))
+      (set-face-background 'default "gray80" 'global '(x default))))
 
 ;;; x-init-device-faces is responsible for initializing default
 ;;; values for faces on a newly created device.
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
+1999-03-08  Andy Piper  <andy@xemacs.org>
+
+	* menubar-msw.c (displayable_menu_item): correct off-by-one &
+ 	handling.
+
+1999-03-08  Martin Buchholz  <martin@xemacs.org>
+
+	* mule-charset.c:
+	(non_ascii_valid_char_p):
+	(lookup_composite_char):
+	(composite_char_string):
+	(make-composite-char):
+	(composite-char-string):
+	(syms_of_mule_charset): 
+	(complex_vars_of_mule_charset): 
+	* mule-charset.h (LEADING_BYTE_COMPOSITE):
+	(CHAR_LEADING_BYTE):
+	(MAKE_CHAR):
+	* file-coding.h (CODING_STATE_COMPOSITE):
+	(CODING_STATE_ISO2022_LOCK):
+	(iso_esc_flag):
+	(LEADING_BYTE_COMPOSITE):
+	* file-coding.c (struct iso2022_decoder):
+	(decoding_closer):
+	(reset_iso2022):
+	(parse_iso2022_esc):
+	(encode_coding_iso2022):
+	#ifdef out all composite character support using 
+	#ifdef ENABLE_COMPOSITE_CHARS 
+
+	* alloc.c: Define lrecord_coding_system only if ! FILE_CODING
+
+1999-03-07  Martin Buchholz  <martin@xemacs.org>
+
+	* systime.h: Unix98 says sys/time.h should define select(), but
+	some systems define that in unistd.h.  So include that file always.
+
+	* free-hook.c (blocktype): Add gcpro5_type to blocktype.
+	(log_gcpro): Remove unused variable FRAME.
+	(show_gcprohist): Ansify.
+	Comment the #endif's
+
+1999-02-18  Martin Buchholz  <martin@xemacs.org>
+
+	* opaque.c (print_opaque):
+	(sizeof_opaque):
+	(equal_opaque):
+	(hash_opaque):
+	Egcs 1.1.1 seems to have a bug where
+	INTP (p->size_or_chain)
+	will crash XEmacs.  Fix by introducing intermediate variable.
+
+1999-03-05  Martin Buchholz  <martin@xemacs.org>
+
+	* alloc.c: (disksave_object_finalization):
+	Set all the *-load-path variables to
+	nil, not just load-path itself.  This gets the locate-file hash
+	tables garbage collected BEFORE dump, and has the side effect of
+	preventing crashes on OSF4.0+egcs.
+
+	* alloc.c:
+	* gdbinit:
+	* dbxrc:
+	- Clean up gdb/dbx debugging support.
+	- Storing an EMACS_INT in an enum is not 64-bit clean!
+	- So change the enum to a set of separate variables.
+	- Add test cases to help debug the debugging support!
+	- Add `lisp-shadows' and `run-temacs' targets for dbx.
+	- Both dbx and gdb have been tested now.
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released
 
 	* glyphs-x.c (convert_EImage_to_XImage): Remove unused variable.
 
+1999-02-18  Martin Buchholz  <martin@xemacs.org>
+
+	* file-coding.c (convert_to_external_format):
+	(convert_from_external_format):
+	Rewrite code to work around a DEC cc compiler bug.
+
 1999-02-17  Kazuo Oishi <oishi@ae.agr.yamaguchi-u.ac.jp>
 
-	* glyphs-x.c (cononvert_EImage_to_XImage): correct 
+	* glyphs-x.c (cononvert_EImage_to_XImage): correct
 	bytes per pixel counting.
 
 1999-02-15  Andy Piper  <andy@xemacs.org>
 
 1999-02-02  Gleb Arshinov  <gleb@cs.stanford.edu>
 
-	* process-nt.c (nt_send_process): 
+	* process-nt.c (nt_send_process):
  	Fix for process-send-region/process-send-string breaking when size
 	of the input > 128 chars: change maximum chunk size for process
 	stream from 512 to 128, thus guaranteeing that ntpipe_shove_writer
 
 1998-12-28  Martin Buchholz  <martin@xemacs.org>
 
-	* buffer.c (init_initial_directory): 
+	* buffer.c (init_initial_directory):
 	- use correct conversions between internal and external format.
 	(directory_is_current_directory): new function
 	(init_buffer): convert initial_directory to internal format.
 
 	* process-unix.c (unix_create_process): handle properly
 	Vfile_name_coding_system for converting the program and directory
-	names. 
+	names.
 
 1998-11-27  SL Baur  <steve@altair.xemacs.org>
 
 
 1998-10-07  Jonathan Harris  <jhar@tardis.ed.ac.uk>
 
-	* scrollbar-msw.c: Use the same vertical scrollbar drag hack as 
+	* scrollbar-msw.c: Use the same vertical scrollbar drag hack as
 	  is used for Motif or Lucid scrollbars under X.
 
 1998-10-08  Pierre Wendling  <pw@ebc.vbe.dec.com>
 	  mswindows_enumerate_fonts() function in objects-msw.c instead
 	  of font_enum_callback_1() to enumerate fonts.
 
-	  font_enum_callback_1() and _2() moved to objects-msw.c. 
-
-	* faces.c (complex_vars_of_faces): Make the mswindows default 
+	  font_enum_callback_1() and _2() moved to objects-msw.c.
+
+	* faces.c (complex_vars_of_faces): Make the mswindows default
 	  face font fully specified and provide some fallbacks.
 
 	* objects-msw.c: font_enum_callback_1() and _2() moved here
 	  sig_enable_code_end() since they are now redundant.
 
 	  send_signal() and enable_child_signals(): Don't try to work
-	  out the end of the code fragments passed to 
+	  out the end of the code fragments passed to
 	  run_in_other_process()
 
 1998-09-10  Kazuyuki IENAGA  <ienaga@jsys.co.jp>
 
 	* process-unix.c (unix_create_process): Reset SIGHUP handler to
 	SIG_DFL. We now try to conserve any inherted SIG_IGN settings
-	in init_signals_very_early. However these should not be passed 
+	in init_signals_very_early. However these should not be passed
 	on to children attached to the new pty.
 
 1998-08-28  Andy Piper  <andyp@parallax.co.uk>
 1998-09-07  Jonathan Harris  <jhar@tardis.ed.ac.uk>
 
 	* fileio.c (file-name-directory, file_name_as_directory):
-	  Don't call CORRECT_DIR_SEPS, even when #defined WINDOWSNT. 
+	  Don't call CORRECT_DIR_SEPS, even when #defined WINDOWSNT.
 
 1998-09-05  SL Baur  <steve@altair.xemacs.org>
 
 
 	* frame-x.c (x_delete_frame): Flush the X output buffer after
 	calling XtDestroyWidget to ensure that the windows are really
-	killed right now. 
+	killed right now.
 
 1998-08-26  Hrvoje Niksic  <hniksic@srce.hr>
 
 1998-08-07 Matt Stupple <matts@tibco.com>
 
 	* ntproc.c: don't wait on char_consumed at thread entry.
-	Additionally, to get the 'process' marked as finished, ensure 
-	that the CHILD_ACTIVE macro returns false, so before exiting 
-	close char_avail and set it to NULL, and close other handles 
+	Additionally, to get the 'process' marked as finished, ensure
+	that the CHILD_ACTIVE macro returns false, so before exiting
+	close char_avail and set it to NULL, and close other handles
 	to reduce handle leak problems.
 
 1998-08-09  Jonathan Harris  <jhar@tardis.ed.ac.uk>
 1998-07-16  Jan Vroonhof  <vroonhof@math.ethz.ch>
 
 	* event-Xt.c (x_to_emacs_keysym): Return nil for modifier keysyms.
-	(x_event_to_emacs_event): Let x_to_emacs_keysym check for modifier 
+	(x_event_to_emacs_event): Let x_to_emacs_keysym check for modifier
 	keys thus no longer considering all keysyms on a key.
 
 1998-07-27  SL Baur  <steve@altair.xemacs.org>
 	* glyphs-msw.c (mswindows_resource_normalize): Qresource ->
 	Qmswindows_resource.
 	From Jonathan Harris <jhar@tardis.ed.ac.uk>
-	
+
 1998-07-12  SL Baur  <steve@altair.xemacs.org>
 
 	* general.c (syms_of_general): Add defsymbol for Qresource.
 
 	* eval.c (run_hook_with_args_in_buffer): Check
 	  default (non-buffer-local) value of hook for
-	  nil before treating it as a function.  Don't initialize 
+	  nil before treating it as a function.  Don't initialize
 	  the `globals' variable twice.
 
 1998-06-24  Jonathan Harris  <jhar@tardis.ed.ac.uk>
 
 	* eval.c (run_hook_with_args_in_buffer): Don't treat
 	  the default value of a buffer local hook as a list of
-	  hooks unless it is both a cons and the car of that cons 
+	  hooks unless it is both a cons and the car of that cons
 	  is not Qlambda.
 
 1998-06-29  SL Baur  <steve@altair.xemacs.org>
 	* winslots.h: Rename.
 
 	* window.c (specifier_vars_of_window): Renamed
-	vertical-divider-draggable-p to vertical-divider-always-visible-p, 
+	vertical-divider-draggable-p to vertical-divider-always-visible-p,
 	as suggested by Ben Wing.
 	(specifier_vars_of_window): Fix docstrings.
 
 	Set last_known_column_point to the buffer position for
 	which the column was requested, not buffer's point.
 
-	* redisplay.c (decode_mode_spec): for current-column, show 
+	* redisplay.c (decode_mode_spec): for current-column, show
 	window's point's column, not buffer's point's column.
 
 1998-06-23  Andy Piper  <andyp@parallax.co.uk>
 	mswindows_size_frame_internal function and size frame if frame
 	parameters not just if init is finished - WM_SIZE happens too
 	early for some specs. (mswindows_size_frame_internal): new
-	function abstracted from mswindows_set_frame_properties. 
+	function abstracted from mswindows_set_frame_properties.
 	(Vmswindows_use_system_frame_size_defaults):
 	new variable controls whether to allow the system to pick frame
 	size defaults, defaults to nil.
 
 1998-06-05  Hrvoje Niksic  <hniksic@srce.hr>
 
-	* eldap.c (Fldap_search_internal): Use build_ext_string instead of 
+	* eldap.c (Fldap_search_internal): Use build_ext_string instead of
 	build_string to avoid crashes under Mule.
 
 1998-06-13  Andy Piper  <andyp@parallax.co.uk>
 
 	* glyphs-msw.c (read_bitmap_data) (NextInt)
 	(read_bitmap_data_from_file): new functions copied from Xmu
-	sources. 
+	sources.
 	(xbm_create_bitmap_from_data) from Ben <ben@666.com> convert
 	inline data to an mswindows bitmap.
 	(init_image_instance_from_xbm_inline) (xbm_instantiate_1)
 	Added prototype for mswindows_enqueue_misc_user_event().
 
 	* menubar-msw.c (mswindows_handle_wm_command): Use
-	mswindows_enqueue_misc_user_event(). 
+	mswindows_enqueue_misc_user_event().
 
 	* toolbar-msw.c (mswindows_handle_toolbar_wm_command): Ditto.
 
 1998-05-29  Greg Klanderman  <greg@alphatech.com>
 
 	* window.c (Fwindow_displayed_text_pixel_height): was relying on
-	incorrect semantics of vmotion_pixels which has been fixed.  don't 
+	incorrect semantics of vmotion_pixels which has been fixed.  don't
 	use it anymore as it can't easily be used.
 
 	* indent.c (vmotion_pixels): fix off by one bug moving up.  also
-	the motion was reported incorrectly if you tried to go past end of 
+	the motion was reported incorrectly if you tried to go past end of
 	buffer.
 
 1998-05-30  Kirill M. Katsnelson  <kkm@kis.ru>
 
 1998-05-28  Martin Buchholz  <martin@xemacs.org>
 
-	* alloc.c (dbg_constants): 
+	* alloc.c (dbg_constants):
 	* dbxrc:
 	* gdbinit:
 	Remove toolbar_data debugging code, since that lrecord has
-	also been removed. 
+	also been removed.
 
 Wed May 27, 1998  Darryl Okahata  <darrylo@sr.hp.com>
 
 	* fileio.c: replaced egetenv("HOME") with calls to the new
 	  get_home_directory().
 
-	* lisp.h: Added function prototypes for uncache_home_directory() 
+	* lisp.h: Added function prototypes for uncache_home_directory()
 	  and get_home_directory(), along with lisp prototypes for
 	  Fuser_home_directory() and friends.
 
 
 	* event-msw.c (mswindows_wnd_proc, WM_KEYDOWN): Unconditionally
 	remove MOD_SHIFT from ASCII characters.
-	(mswindows_wnd_proc, WM_KEYDOWN): Do not activate the menubar when 
+	(mswindows_wnd_proc, WM_KEYDOWN): Do not activate the menubar when
 	F10 is pressed.
 
 1998-05-24  Oliver Graf <ograf@fga.de>
 	(syms_of_indent): DEFSUBR.
 	* lisp.h: declaration for vmotion_pixels().
 
-	* indent.c (Fvertical_motion): Add optional third argument PIXELS, 
+	* indent.c (Fvertical_motion): Add optional third argument PIXELS,
 	to request returning motion in pixels.
 	(Fvertical_motion_pixels): Remove, functionality merged into
-	Fvertical_motion. 
+	Fvertical_motion.
  	* window.c (window_scroll): call Fvertical_motion with 3 arguments.
 	(Fmove_to_window_line): ditto.
 	* lisp.h: Change declaration for Fvertical_motion.
 	Tooltalk_Message_plist_str and Tooltalk_Pattern_plist_str
 
 1998-05-27  Andy Piper  <andyp@parallax.co.uk>
-		
+
 	* faces.c: create a new 3d_object_face, make modeline and
 	vertical_divider faces fallback to this rather than the default.
 
 	* This patch is to fix compilation warnings under Windows.
 
 	* s/windowsnt.h: Encapsulate getpid with sys_getpid.
-	Added prototypes for FSF inherited functions, with which XEmacs is 
+	Added prototypes for FSF inherited functions, with which XEmacs is
 	sprinkled thoroughly.
-	Removed some #if 0 code. Bracketed some more definitions, probably 
+	Removed some #if 0 code. Bracketed some more definitions, probably
 	related to Visual C versions prior to 4 (we do not support them).
 
 	* sysfloat.h (logb): Finally, get logb() prototyped.
 	vars_of_dired_mswindows and init_ntproc (Grrr).
 
 	* realpath.c: Added Windows specific include files.
-	(xrealpath): Conditionalized declaration of some auto variables on 
+	(xrealpath): Conditionalized declaration of some auto variables on
 	S_IFLNK, to avoid warnings.
 
-	* ntproc.c: Disabled some compiler warnings. This file is going to 
+	* ntproc.c: Disabled some compiler warnings. This file is going to
 	die, so I have not cleaned it up much.
 	(set_process_dir): Const parameter.
 	(Fwin32_short_file_name): Down CHECK_* macros to one argument.
 
 	* symsinit.h: Prototyped the above functions.
 
-	* dialog-x.c (x_popup_dialog_box): Moved dialog descriptor consistency 
+	* dialog-x.c (x_popup_dialog_box): Moved dialog descriptor consistency
 	checks to dialog.c...
 
 	* dialog.c (Fpopup_dialog_box): ...right here. Added more checks: a
 
 	* EmacsFrame.c (Xt_StringToScrollBarPlacement):  Added support for
 	{top,bottom}-{left,right} values in addition to
-	{top,bottom}_{left,right}. 
+	{top,bottom}_{left,right}.
 
 1998-05-18  Hrvoje Niksic  <hniksic@srce.hr>
 
 
 1998-05-19  Martin Buchholz  <martin@xemacs.org>
 
-	* unexhp9k800.c: 
-	* sound.c (vars_of_sound): 
-	* sysdep.c (reset_sigio_on_device): 
-	* window.c (window_bottom_gutter_height): 
+	* unexhp9k800.c:
+	* sound.c (vars_of_sound):
+	* sysdep.c (reset_sigio_on_device):
+	* window.c (window_bottom_gutter_height):
 	unexhp9k800.c:258: warning: implicit declaration of function
 	`calculate_checksum'
 	sound.c:604: warning: implicit declaration of function `vars_of_hpplay'
 	* frame-x.c (x_update_frame_external_traits): Start preprocessor
 	directives in column 1.
 
-	* search.c (skip_chars): Avoid using xzero with arrays, since some 
+	* search.c (skip_chars): Avoid using xzero with arrays, since some
 	compilers get confused by the construct &array.
 
 1998-05-18  Kirill M. Katsnelson  <kkm@kis.ru>
 1998-05-18  Kirill M. Katsnelson  <kkm@kis.ru>
 
 	* objects-msw.c (mswindows_initialize_font_instance): Use ANSI
-	charset when creating font. 
+	charset when creating font.
 	(mswindows_initialize_color_instance): Do not create brush along
 	with a color.
 	(mswindows_finalize_color_instance): Do not delete it then.
 	(compute_frame_toolbars_data): Removed unused second parameter;
 	Adjusted callers of this static function throughout the file.
 	(init_frame_toolbars): Initialize current_toolbar_size.
-	(update_frame_toolbars): Use DEVICE_SUPPORTS_TOOLBARS_P instead of 
+	(update_frame_toolbars): Use DEVICE_SUPPORTS_TOOLBARS_P instead of
 	what is its current expansion, for clarity.
 	(init_frame_toolbars): Ditto.
 	(init_device_toolbars): Ditto.
 
 	* emacs.c (main_1): Call syms_of_process_nt()
 
-	* process-nt.c: Quote process arguments by a call to Lisp function 
+	* process-nt.c: Quote process arguments by a call to Lisp function
 	`nt-quote-process-args'.
 	(syms_of_process_nt): New function.
 	(nt_send_process): Flush data stream after each write, to avoid
 
 1998-05-17  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
 
-	* s/aix4-2.h (ALIGN_DATA_RELOC): Undefined to support new unexaix.c. 
+	* s/aix4-2.h (ALIGN_DATA_RELOC): Undefined to support new unexaix.c.
 
 	* s/aix3-1.h (ALIGN_DATA_RELOC): Defined to support new unexaix.c.
 
 
 	* bufslots.h: Removed buffer_file_type slot.
 
-	* buffer.c (complex_vars_of_buffer): Removed buffer_file_type from 
+	* buffer.c (complex_vars_of_buffer): Removed buffer_file_type from
 	buffer local flags.
 	(complex_vars_of_buffer): Removed buffer-file-type variable and
 	its default reference.
 	(x_divider_width): ditto.
 
 	* window.c (specifier_vars_of_window): new specifiers:
-	vertical-divier -line-width and -spacing. 
+	vertical-divier -line-width and -spacing.
 	(vertical_divider_global_width_changed): formerly known as
-	vertical_divider_shadow_thickness_changed. 
+	vertical_divider_shadow_thickness_changed.
 
 	* winslots.h: new slots: vertical_specifier _line_width and
 	_spacing. Plus corrected a comment typo.
 	(console_type_create_stream): And declaration for it.
 
 	* redisplay.c (pixel_to_glyph_translation): Use
-	window_divider_width() instead of divider_width redisplay method. 
+	window_divider_width() instead of divider_width redisplay method.
 	(pixel_to_glyph_translation): Fix top divider edge calculation
 	when scrollbar is on top.
 
 	(specifier_vars_of_window): For	vertical-divider-{spacing,line-width}
 	specifiers, set fallback values differently on TTYs, and document
 	the behavior of these on TTYs in the docstrings.
-	
+
 	* scrollbar.c (update_scrollbar_instance): Use
 	window_divider_width() instead of divider_width redisplay method.
 
 
 	* emacs.c (main_1): Call console_type_create_dialog_x().
 
-	* dialog-x.c (x_popup_dialog_box): Old Fpopup_dialog_box converted 
+	* dialog-x.c (x_popup_dialog_box): Old Fpopup_dialog_box converted
 	into this device method.
 	(console_type_create_dialog_x): New function.
 
 	(syms_of_dialog): Defsubr it.
 
 	* console.h (struct console_methods): Declared
-	popup_dialog_box_method(). 
+	popup_dialog_box_method().
 
 	* symsinit.h: Defined console_type_create_dialog_{x,mswindows}
 
 	** Renamed window-divider-map => vertical-divider-map
 	and event-over-divider-p => event-over-vertical-divider-p,
 	in the following files/functions:
-	* events.h: 
-	* events.c (Fevent_over_divider_p): 
-	* keymap.c (get_relevant_keymaps): 
-	(vars_of_keymap): 
+	* events.h:
+	* events.c (Fevent_over_divider_p):
+	* keymap.c (get_relevant_keymaps):
+	(vars_of_keymap):
 
 	* redisplay.h (OVER_V_DIVIDER): Renamed so from OVER_DIVIDER.
 
 
 	* window.h: Prototype invalidate_vertical_divider_cache_in_window.
 	(struct window): Added need_vertical_divider_p and
-	need_vertical_divider_valid_p. 
+	need_vertical_divider_valid_p.
 
 	* winslots.h: Added vertical_divider_draggable_p slot.
 
 	thickness is negative.
 
 	* console-stream.c (stream_divider_width): pass a struct window *
-	argument. 
+	argument.
 
 	* redisplay-tty.c (tty_divider_width): ditto.
 
 	* redisplay.c (generate_modeline): ittod.
 
 	* scrollbar.c (update_scrollbar_instance): ttido.
-	
-	* redisplay-msw.c (mswindows_divider_width): ottid. 
+
+	* redisplay-msw.c (mswindows_divider_width): ottid.
 	WARNING: this enables to compile, but the feature is not functional.
 
 	* window.h (struct window): new field
-	vertical_divider_shadow_thickness. 
+	vertical_divider_shadow_thickness.
 
 	* window.c (specifier_vars_of_window): new specifier
 	vertical-divider-shadow-thickness.
 1998-05-10  Andy Piper  <andyp@parallax.co.uk>
 
 	* redisplay-msw.c (mswindows_output_dibitmap_region): make sure
-	multiple bitmaps are output vertically as well as horizontally.  
+	multiple bitmaps are output vertically as well as horizontally.
 	* (mswindows_output_dibitmap): don't cope with bitmap boundaries
 	crossing lines this is handled by
 	mswindows_output_dibitmap_region.
 
 	* inline.c: Include eldap.h
 
-	* menubar-x.c (x_update_frame_menubar_internal): 
+	* menubar-x.c (x_update_frame_menubar_internal):
 	Remove: unused variable `container'
 
 1998-05-11  Martin Buchholz  <martin@xemacs.org>
 	* s/aix4.h: Allow AIX 4.3 XEmacs to compile cleanly.
 	Unfortunately, the resulting temacs still cannot dump.
 
-	* symbols.c (symbol_is_constant): 
-	(verify_ok_for_buffer_local): 
+	* symbols.c (symbol_is_constant):
+	(verify_ok_for_buffer_local):
 	-Wswitch Warning suppression - add default case to switches.
 
 	* redisplay.c (decode_mode_spec): Remove unused variables,
 1998-05-12  Didier Verna  <verna@inf.enst.fr>
 
 	* redisplay.c: removed the scrolling modeline code that didn't
-	make it for 21.0. To be continued ... 
+	make it for 21.0. To be continued ...
 
 1998-05-13  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
 
 	(mswindows_output_vertical_divider): Always output the divider on
 	the right side of a window, down to bottom.
 
-	* keymap.c (get_relevant_keymaps): Route mouse button events which 
+	* keymap.c (get_relevant_keymaps): Route mouse button events which
 	happened over a window divider through window-divider-map.
 	(Fkey_binding): Documented that in the docstring.
 	Defined the variable Vwindow_divider_map.
 	(metrics); Changed parameters order and added DEFAULT parameter;
 	Unabbreviated some metric constants; Fixed and untabified doc string.
 	(Fdevice_system_metrics): Added. Returns a plist of all provided
-	metrics. 
+	metrics.
 
 	* device-msw.c (mswindows_device_system_metrics): Renamed
 	device_metrics enum constants.
 }
 
 
-/**********************************************************************/
-/*			  Debugger support			      */
-/**********************************************************************/
-/* Give gdb/dbx enough information to decode Lisp Objects.
-   We make sure certain symbols are defined, so gdb doesn't complain
-   about expressions in src/gdbinit.  Values are randomly chosen.
-   See src/gdbinit or src/dbxrc to see how this is used.  */
-
-enum dbg_constants
+/************************************************************************/
+/*			  Debugger support				*/
+/************************************************************************/
+/* Give gdb/dbx enough information to decode Lisp Objects.  We make
+   sure certain symbols are always defined, so gdb doesn't complain
+   about expressions in src/gdbinit.  See src/gdbinit or src/dbxrc to
+   see how this is used.  */
+
+#ifdef USE_MINIMAL_TAGBITS
+EMACS_UINT dbg_valmask = ((1UL << VALBITS) - 1) << GCBITS;
+EMACS_UINT dbg_typemask = (1UL << GCTYPEBITS) - 1;
+unsigned char dbg_USE_MINIMAL_TAGBITS = 1;
+unsigned char Lisp_Type_Int = 100;
+#else
+EMACS_UINT dbg_valmask = (1UL << VALBITS) - 1;
+EMACS_UINT dbg_typemask = ((1UL << GCTYPEBITS) - 1) << (VALBITS + GCMARKBITS);
+unsigned char dbg_USE_MINIMAL_TAGBITS = 0;
+#endif
+
+#ifdef USE_UNION_TYPE
+unsigned char dbg_USE_UNION_TYPE = 1;
+#else
+unsigned char dbg_USE_UNION_TYPE = 0;
+#endif
+
+#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION
+unsigned char dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 1;
+#else
+unsigned char dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 0;
+#endif
+
+#ifdef LRECORD_CONS
+unsigned char Lisp_Type_Cons = 101;
+#else
+unsigned char lrecord_cons;
+#endif
+
+#ifdef LRECORD_STRING
+unsigned char Lisp_Type_String = 102;
+#else
+unsigned char lrecord_string;
+#endif
+
+#ifdef LRECORD_VECTOR
+unsigned char Lisp_Type_Vector = 103;
+#else
+unsigned char lrecord_vector;
+#endif
+
+#ifdef LRECORD_SYMBOL
+unsigned char Lisp_Type_Symbol = 104;
+#else
+unsigned char lrecord_symbol;
+#endif
+
+#ifndef MULE
+unsigned char lrecord_char_table_entry;
+unsigned char lrecord_charset;
+#ifndef FILE_CODING
+unsigned char lrecord_coding_system;
+#endif
+#endif
+
+#ifndef HAVE_TOOLBARS
+unsigned char lrecord_toolbar_button;
+#endif
+
+#ifndef TOOLTALK
+unsigned char lrecord_tooltalk_message;
+unsigned char lrecord_tooltalk_pattern;
+#endif
+
+#ifndef HAVE_DATABASE
+unsigned char lrecord_database;
+#endif
+
+unsigned char dbg_valbits = VALBITS;
+unsigned char dbg_gctypebits = GCTYPEBITS;
+
+/* Macros turned into functions for ease of debugging.
+   Debuggers don't know about macros! */
+int dbg_eq (Lisp_Object obj1, Lisp_Object obj2);
+int
+dbg_eq (Lisp_Object obj1, Lisp_Object obj2)
 {
-#ifdef USE_MINIMAL_TAGBITS
-  dbg_valmask = (EMACS_INT) (((1UL << VALBITS) - 1) << GCBITS),
-  dbg_typemask = (EMACS_INT) ((1UL << GCTYPEBITS) - 1),
-  dbg_USE_MINIMAL_TAGBITS = 1,
-  dbg_Lisp_Type_Int = 100,
-#else /* ! USE_MIMIMAL_TAGBITS */
-  dbg_valmask = (EMACS_INT) ((1UL << VALBITS) - 1),
-  dbg_typemask = (EMACS_INT) (((1UL << GCTYPEBITS) - 1) << (VALBITS + GCMARKBITS)),
-  dbg_USE_MINIMAL_TAGBITS = 0,
-  dbg_Lisp_Type_Int = Lisp_Type_Int,
-#endif /* ! USE_MIMIMAL_TAGBITS */
-#ifdef USE_INDEXED_LRECORD_IMPLEMENTATION
-  dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 1,
-#else
-  dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 0,
-#endif
-  dbg_Lisp_Type_Char = Lisp_Type_Char,
-  dbg_Lisp_Type_Record = Lisp_Type_Record,
-#ifdef LRECORD_CONS
-  dbg_Lisp_Type_Cons = 101,
-#else
-  dbg_Lisp_Type_Cons = Lisp_Type_Cons,
-  lrecord_cons = 201,
-#endif
-#ifdef LRECORD_STRING
-  dbg_Lisp_Type_String = 102,
-#else
-  dbg_Lisp_Type_String = Lisp_Type_String,
-  lrecord_string = 202,
-#endif
-#ifdef LRECORD_VECTOR
-  dbg_Lisp_Type_Vector = 103,
-#else
-  dbg_Lisp_Type_Vector = Lisp_Type_Vector,
-  lrecord_vector = 203,
-#endif
-#ifdef LRECORD_SYMBOL
-  dbg_Lisp_Type_Symbol = 104,
-#else
-  dbg_Lisp_Type_Symbol = Lisp_Type_Symbol,
-  lrecord_symbol = 204,
-#endif
-#ifndef MULE
-  lrecord_char_table_entry = 205,
-  lrecord_charset          = 206,
-  lrecord_coding_system    = 207,
-#endif
-#ifndef HAVE_TOOLBARS
-  lrecord_toolbar_button   = 208,
-#endif
-#ifndef HAVE_TOOLTALK
-  lrecord_tooltalk_message = 210,
-  lrecord_tooltalk_pattern = 211,
-#endif
-#ifndef HAVE_DATABASE
-  lrecord_database = 212,
-#endif
-  dbg_valbits = VALBITS,
-  dbg_gctypebits = GCTYPEBITS
-  /* If we don't have an actual object of this enum, pgcc (and perhaps
-     other compilers) might optimize away the entire type declaration :-( */
-} dbg_dummy;
+  return EQ (obj1, obj2);
+}
 
 
 /**********************************************************************/
   Vexec_path = Qnil;
   Vload_path = Qnil;
   /* Vdump_load_path = Qnil; */
+  /* Release hash tables for locate_file */
+  Fset (intern ("early-package-load-path"), Qnil);
+  Fset (intern ("late-package-load-path"),  Qnil);
+  Fset (intern ("last-package-load-path"),  Qnil);
   uncache_home_directory();
 
 #if defined(LOADHIST) && !(defined(LOADHIST_DUMPED) || \
 # You can use this file to debug XEmacs using Sun WorkShop's dbx.
 # Add the contents of this file to $HOME/.dbxrc or
 # Source the contents of this file with something like:
-# test -r ./dbxrc && . ./dbxrc
+# if test -r ./dbxrc; then . ./dbxrc; fi
 
 # Some functions defined here require a running process, but most
 # don't.  Considerable effort has been expended to this end.
 
 # A bug in dbx prevents string variables from having values beginning with `-'!!
 function XEmacsInit {
-  eval $(echo $(whatis -t `alloc.c`dbg_constants) | \
-    perl -e 'print "@{[map {s/=(-\d+)/sprintf(q[=0x%x],$1)/oge; /\w+=[0-9a-fx]+/og} <>]}\n"')
+  function ToInt { eval "$1=\$[(int) $1]"; }
+  ToInt dbg_USE_MINIMAL_TAGBITS
+  ToInt dbg_USE_UNION_TYPE
+  ToInt dbg_USE_INDEXED_LRECORD_IMPLEMENTATION
+  ToInt Lisp_Type_Int
+  ToInt Lisp_Type_Char
+  ToInt Lisp_Type_Cons
+  ToInt Lisp_Type_String
+  ToInt Lisp_Type_Vector
+  ToInt Lisp_Type_Symbol
+  ToInt Lisp_Type_Record
+  ToInt dbg_valbits
+  ToInt dbg_gctypebits
+  function ToLong { eval "$1=\$[(unsigned long) $1]"; }
+  ToLong dbg_valmask
+  ToLong dbg_typemask
   xemacs_initted=yes
-  #printvar dbg_valbits dbg_valmask
 }
 
 function printvar {
 
 # Various dbx bugs cause ugliness in following code
 function decode_object {
-  test -z "$xemacs_initted" && XEmacsInit
-  obj=$[*(void**)(&$1)]
-  test "$obj" = "(nil)" && obj="0x0"
+  if test -z "$xemacs_initted"; then XEmacsInit; fi;
+  if test $dbg_USE_UNION_TYPE = 1; then
+    # 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)]";;
+    esac
+  else
+    obj="$[(unsigned long)($1)]";
+  fi
   if test $dbg_USE_MINIMAL_TAGBITS = 1; then
     if test $[(int)($obj & 1)] = 1; then
       # It's an int
       val=$[(long)(((unsigned long long)$obj) >> 1)]
-      type=$dbg_Lisp_Type_Int
+      type=$Lisp_Type_Int
     else
       type=$[(int)(((void*)$obj) & $dbg_typemask)]
-      if test $type = $dbg_Lisp_Type_Char; then
+      if test $type = $Lisp_Type_Char; then
         val=$[(void*)(long)(((unsigned long long)($obj & $dbg_valmask)) >> $dbg_gctypebits)]
       else
         # It's a record pointer
         val=$[(void*)$obj]
+        if test "$val" = "(nil)"; then type=null_pointer; fi
       fi
     fi
   else
     # not dbg_USE_MINIMAL_TAGBITS
-    val=$[(void*)($obj & $dbg_valmask)]
-    test "$val" = "(nil)" && val="0x0"
     type=$[(int)(((unsigned long long)($obj & $dbg_typemask)) >> ($dbg_valbits + 1))]
+    if test "$type" = $Lisp_Type_Int; then
+      val=$[(int)($obj & $dbg_valmask)]
+    elif test "$type" = $Lisp_Type_Char; then
+      val=$[(int)($obj & $dbg_valmask)]
+    else
+      val=$[(void*)($obj & $dbg_valmask)]
+      if test "$val" = "(nil)"; then type=null_pointer; fi
+    fi
+    #val=$[(void*)($obj & $dbg_valmask)]
+    #printvar val type obj
   fi
 
-  if test $type = $dbg_Lisp_Type_Record; then
+  if test $type = $Lisp_Type_Record; then
     typeset lheader="((struct lrecord_header *) $val)"
     if test $dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 1; then
       imp=$[(void*)(lrecord_implementations_table[$lheader->type])]
   else
     imp="0xdeadbeef"
   fi
-  #printvar obj val type imp
+  # printvar obj val type imp
 }
 
 function xint {
 
 function xtype {
   decode_object "$*"
-  if   test $type = $dbg_Lisp_Type_Int;    then echo "int"
-  elif test $type = $dbg_Lisp_Type_Char;   then echo "char"
-  elif test $type = $dbg_Lisp_Type_Symbol; then echo "symbol"
-  elif test $type = $dbg_Lisp_Type_String; then echo "string"
-  elif test $type = $dbg_Lisp_Type_Vector; then echo "vector"
-  elif test $type = $dbg_Lisp_Type_Cons;   then echo "cons"
+  if   test $type = $Lisp_Type_Int;    then echo "int"
+  elif test $type = $Lisp_Type_Char;   then echo "char"
+  elif test $type = $Lisp_Type_Symbol; then echo "symbol"
+  elif test $type = $Lisp_Type_String; then echo "string"
+  elif test $type = $Lisp_Type_Vector; then echo "vector"
+  elif test $type = $Lisp_Type_Cons;   then echo "cons"
+  elif test $type = null_pointer;      then echo "null_pointer"
   else
     echo "record type with name: $[((struct lrecord_implementation *)$imp)->name]"
   fi
 }
 
+function lisp-shadows {
+  run -batch -vanilla -f list-load-path-shadows
+}
+
+function environment-to-run-temacs {
+  unset EMACSLOADPATH
+  export EMACSBOOTSTRAPLOADPATH=../lisp/:..
+  export EMACSBOOTSTRAPMODULEPATH=../modules/:..
+}
+
 document run-temacs << 'end'
 Usage: run-temacs
 Run temacs interactively, like xemacs.
 end
 
 function run-temacs {
-  unset EMACSLOADPATH
-  export EMACSBOOTSTRAPLOADPATH=../lisp/:..
+  environment-to-run-temacs
   run -batch -l ../lisp/loadup.el run-temacs -q
 }
 
 end
 
 function update-elc {
-  unset EMACSLOADPATH
-  export EMACSBOOTSTRAPLOADPATH=../lisp/:..
+  environment-to-run-temacs
   run -batch -l ../lisp/update-elc.el
 }
 
 
 function dump-temacs {
-  unset EMACSLOADPATH
-  export EMACSBOOTSTRAPLOADPATH=../lisp/:..
+  environment-to-run-temacs
   run -batch -l ../lisp/loadup.el dump
 }
 
 
 function pobj {
   decode_object $1
-  if test $type = $dbg_Lisp_Type_Int; then
+  if test $type = $Lisp_Type_Int; then
     print -f"Integer: %d" $val
-  elif test $type = $dbg_Lisp_Type_Char; then
-    if $val < 128; then
+  elif test $type = $Lisp_Type_Char; then
+    if test $[$val > 32 && $val < 128] = 1; then
       print -f"Char: %c" $val
     else
       print -f"Char: %d" $val
     fi
-  elif test $type = $dbg_Lisp_Type_String || lrecord_type_p string; then
+  elif test $type = $Lisp_Type_String || lrecord_type_p string; then
     pstruct Lisp_String
-  elif test $type = $dbg_Lisp_Type_Cons   || lrecord_type_p cons; then
+  elif test $type = $Lisp_Type_Cons   || lrecord_type_p cons; then
     pstruct Lisp_Cons
-  elif test $type = $dbg_Lisp_Type_Symbol || lrecord_type_p symbol; then
+  elif test $type = $Lisp_Type_Symbol || lrecord_type_p symbol; then
     pstruct Lisp_Symbol
     echo "Symbol name: $[(char *)($xstruct->name->_data)]"
-  elif test $type = $dbg_Lisp_Type_Vector || lrecord_type_p vector; then
+  elif test $type = $Lisp_Type_Vector || lrecord_type_p vector; then
     pstruct Lisp_Vector
     echo "Vector of length $[$xstruct->size]"
   elif lrecord_type_p bit_vector; then
   elif lrecord_type_p console; then
     pstruct console
   elif lrecord_type_p database; then
-    pstruct database
+    pstruct Lisp_Database
   elif lrecord_type_p device; then
     pstruct device
   elif lrecord_type_p event; then
   elif lrecord_type_p glyph; then
     pstruct Lisp_Glyph
   elif lrecord_type_p hashtable; then
-    pstruct hashtable
+    pstruct Lisp_Hash_Table
   elif lrecord_type_p image_instance; then
     pstruct Lisp_Image_Instance
   elif lrecord_type_p keymap; then
-    pstruct keymap
+    pstruct Lisp_Keymap
   elif lrecord_type_p lcrecord_list; then
     pstruct lcrecord_list
   elif lrecord_type_p lstream; then
     pstruct window
   elif lrecord_type_p window_configuration; then
     pstruct window_config
+  elif test "$type" = "null_pointer"; then
+    echo "Lisp Object is a null pointer!!"
   else
     echo "Unknown Lisp Object type"
     print $1
 }
 
 dbxenv suppress_startup_message 4.0
+dbxenv mt_watchpoints on
 
 function dp_core {
   print ((struct x_frame *)(((struct frame*)(Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget->core
 function print_shell {
   print *(`frame-x.c`TopLevelShellRec*) (((struct `frame-x.c`x_frame*) (((struct `frame-x.c`frame*) (Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget)
 }
+
+# -------------------------------------------------------------
+# functions to test the debugging support itself.
+# If you change this file, make sure the following still work...
+# -------------------------------------------------------------
+function test_xtype {
+  function doit { echo -n "$1: "; xtype "$1"; }
+  test_various_objects
+}
+
+function test_pobj {
+  function doit { echo '==============================='; echo -n "$1: "; pobj "$1"; }
+  test_various_objects
+}
+
+function test_various_objects {
+  doit Vemacs_major_version
+  doit Vhelp_char
+  doit Qnil
+  doit Qunbound
+  doit Vobarray
+  doit Vall_weak_lists
+  doit Vxemacs_codename
+}

src/file-coding.c

   /* Index for next byte to store in ISO escape sequence. */
   int esc_bytes_index;
 
+#ifdef ENABLE_COMPOSITE_CHARS
   /* Stuff seen so far when composing a string. */
   unsigned_char_dynarr *composite_chars;
+#endif
 
   /* If we saw an invalid designation sequence for a particular
      register, we flag it here and switch to ASCII.  The next time we
     }
   Dynarr_free (str->runoff);
 #ifdef MULE
+#ifdef ENABLE_COMPOSITE_CHARS
   if (str->iso2022.composite_chars)
     Dynarr_free (str->iso2022.composite_chars);
 #endif
+#endif
   return Lstream_close (str->other_end);
 }
 
   iso->invalid_switch_dir = 0;
   iso->output_direction_sequence = 0;
   iso->output_literally = 0;
+#ifdef ENABLE_COMPOSITE_CHARS
   if (iso->composite_chars)
     Dynarr_reset (iso->composite_chars);
+#endif
 }
 
 static int
 
 	  /**** composite ****/
 
+#ifdef ENABLE_COMPOSITE_CHARS
 	case '0':
 	  iso->esc = ISO_ESC_START_COMPOSITE;
 	  *flags = (*flags & CODING_STATE_ISO2022_LOCK) |
 	  *flags = (*flags & CODING_STATE_ISO2022_LOCK) &
 	    ~CODING_STATE_COMPOSITE;
 	  return 1;
+#endif /* ENABLE_COMPOSITE_CHARS */
 
 	  /**** directionality ****/
 
   enum eol_type eol_type;
   struct decoding_stream *str = DECODING_STREAM_DATA (decoding);
   Lisp_Object coding_system;
+#ifdef ENABLE_COMPOSITE_CHARS
   unsigned_char_dynarr *real_dst = dst;
+#endif
 
   CODING_STREAM_DECOMPOSE (str, flags, ch);
   eol_type = str->eol_type;
   XSETCODING_SYSTEM (coding_system, str->codesys);
 
+#ifdef ENABLE_COMPOSITE_CHARS
   if (flags & CODING_STATE_COMPOSITE)
     dst = str->iso2022.composite_chars;
+#endif /* ENABLE_COMPOSITE_CHARS */
 
   while (n--)
     {
 	    {
 	      switch (str->iso2022.esc)
 		{
+#ifdef ENABLE_COMPOSITE_CHARS
 		case ISO_ESC_START_COMPOSITE:
 		  if (str->iso2022.composite_chars)
 		    Dynarr_reset (str->iso2022.composite_chars);
 		    Dynarr_add_many (dst, comstr, len);
 		    break;
 		  }
+#endif /* ENABLE_COMPOSITE_CHARS */
 
 		case ISO_ESC_LITERAL:
 		  DECODE_ADD_BINARY_CHAR (c, dst);
   Lisp_Object charset;
   int half;
 
+#ifdef ENABLE_COMPOSITE_CHARS
   /* flags for handling composite chars.  We do a little switcharoo
      on the source while we're outputting the composite char. */
   unsigned int saved_n = 0;
   CONST unsigned char *saved_src = NULL;
   int in_composite = 0;
+#endif /* ENABLE_COMPOSITE_CHARS */
 
   CODING_STREAM_DECOMPOSE (str, flags, ch);
   eol_type = CODING_SYSTEM_EOL_TYPE (str->codesys);
   charset = str->iso2022.current_charset;
   half = str->iso2022.current_half;
 
+#ifdef ENABLE_COMPOSITE_CHARS
  back_to_square_n:
+#endif
   while (n--)
     {
       c = *src++;
 	  if (LEADING_BYTE_PREFIX_P(c))
 	    ch = c;
 	  else if (!EQ (charset, Vcharset_control_1)
-		   && !EQ (charset, Vcharset_composite))
+#ifdef ENABLE_COMPOSITE_CHARS
+		   && !EQ (charset, Vcharset_composite)
+#endif
+		   )
 	    {
 	      int reg;
 
 		    }
 		  else if (ch)
 		    {
+#ifdef ENABLE_COMPOSITE_CHARS
 		      if (EQ (charset, Vcharset_composite))
 			{
 			  if (in_composite)
 			    }
 			}
 		      else
+#endif /* ENABLE_COMPOSITE_CHARS */
 			{
 			  Dynarr_add (dst, ch & charmask);
 			  Dynarr_add (dst, c & charmask);
 	}
     }
 
+#ifdef ENABLE_COMPOSITE_CHARS
   if (in_composite)
     {
       n = saved_n;
       Dynarr_add (dst, '1'); /* end composing */
       goto back_to_square_n; /* Wheeeeeeeee ..... */
     }
+#endif /* ENABLE_COMPOSITE_CHARS */
 
   if (char_boundary && flags & CODING_STATE_END)
     {
    (EQ ((Vfile_name_coding_system), Qbinary))) ?	\
   Qnil : Fget_coding_system (Vfile_name_coding_system))
 
-/* #### not correct for all values of `fmt'! */
-#ifdef MULE
-#define FMT_CODING_SYSTEM(fmt)					\
- (((fmt) == FORMAT_FILENAME) ? FILE_NAME_CODING_SYSTEM     :	\
-  ((fmt) == FORMAT_CTEXT   ) ? Fget_coding_system (Qctext) :	\
-  ((fmt) == FORMAT_TERMINAL) ? FILE_NAME_CODING_SYSTEM     :	\
-  Qnil)
-#else
-#define FMT_CODING_SYSTEM(fmt)					\
- (((fmt) == FORMAT_FILENAME) ? FILE_NAME_CODING_SYSTEM     :	\
-  ((fmt) == FORMAT_TERMINAL) ? FILE_NAME_CODING_SYSTEM     :	\
-  Qnil)
-#endif
-
 Extbyte *
 convert_to_external_format (CONST Bufbyte *ptr,
 			    Bytecount len,
 			    Extcount *len_out,
 			    enum external_data_format fmt)
 {
-  Lisp_Object coding_system = FMT_CODING_SYSTEM (fmt);
+  Lisp_Object coding_system;
+
+  /* #### not correct for all values of `fmt'! */
+  if (fmt == FORMAT_FILENAME || fmt == FORMAT_TERMINAL)
+    coding_system = FILE_NAME_CODING_SYSTEM;
+#ifdef MULE
+  else if (fmt == FORMAT_CTEXT)
+    coding_system = Fget_coding_system (Qctext);
+#endif
+  else
+    coding_system = Qnil;
+
+  /* Lisp_Object coding_system = FMT_CODING_SYSTEM (fmt); */
 
   if (!conversion_out_dynarr)
     conversion_out_dynarr = Dynarr_new (Extbyte);
 			      Bytecount *len_out,
 			      enum external_data_format fmt)
 {
-  Lisp_Object coding_system = FMT_CODING_SYSTEM (fmt);
+  Lisp_Object coding_system;
+
+  /* #### not correct for all values of `fmt'! */
+  if (fmt == FORMAT_FILENAME || fmt == FORMAT_TERMINAL)
+    coding_system = FILE_NAME_CODING_SYSTEM;
+#ifdef MULE
+  else if (fmt == FORMAT_CTEXT)
+    coding_system = Fget_coding_system (Qctext);
+#endif
+  else
+    coding_system = Qnil;
+
+  /* Lisp_Object coding_system = FMT_CODING_SYSTEM (fmt); */
 
   if (!conversion_in_dynarr)
     conversion_in_dynarr = Dynarr_new (Bufbyte);

src/file-coding.h

 					     CODING_STATE_SS2 overrides; but
 					     this probably indicates an error
 					     in the text encoding. */
+#ifdef ENABLE_COMPOSITE_CHARS
 #define CODING_STATE_COMPOSITE  (1 << 8)  /* If set, we're currently processing
 					     a composite character (i.e. a
 					     character constructed by
 					     overstriking two or more
 					     characters). */
+#endif /* ENABLE_COMPOSITE_CHARS */
 
 
 /* CODING_STATE_ISO2022_LOCK is the mask of flags that remain on until
    explicitly turned off when in the ISO2022 encoder/decoder.  Other flags are
    turned off at the end of processing each character or escape sequence. */
+#ifdef ENABLE_COMPOSITE_CHARS
 # define CODING_STATE_ISO2022_LOCK \
   (CODING_STATE_END | CODING_STATE_COMPOSITE | CODING_STATE_R2L)
-#define CODING_STATE_BIG5_LOCK \
-  CODING_STATE_END
+#else
+# define CODING_STATE_ISO2022_LOCK (CODING_STATE_END | CODING_STATE_R2L)
+#endif
+
+#define CODING_STATE_BIG5_LOCK CODING_STATE_END
 
 /* Flags indicating what we've seen so far when parsing an
    ISO2022 escape sequence. */
 			   character must be ]. */
 
   /* Full sequences. */
+#ifdef ENABLE_COMPOSITE_CHARS
   ISO_ESC_START_COMPOSITE, /* Private usage for START COMPOSING */
-  ISO_ESC_END_COMPOSITE, /* Private usage for END COMPOSING */
+  ISO_ESC_END_COMPOSITE,   /* Private usage for END COMPOSING */
+#endif /* ENABLE_COMPOSITE_CHARS */
   ISO_ESC_SINGLE_SHIFT, /* We've seen a complete single-shift sequence. */
   ISO_ESC_LOCKING_SHIFT,/* We've seen a complete locking-shift sequence. */
   ISO_ESC_DESIGNATE,	/* We've seen a complete designation sequence. */
 #ifndef MULE
 #define MIN_LEADING_BYTE		0x80
 /* These need special treatment in a string and/or character */
+#ifdef ENABLE_COMPOSITE_CHARS
 #define LEADING_BYTE_COMPOSITE		0x80 /* for a composite character */
+#endif
 #define LEADING_BYTE_CONTROL_1		0x8F /* represent normal 80-9F */
 #define LEADING_BYTE_LATIN_ISO8859_1	0x81 /* Right half of ISO 8859-1 */
 #define BYTE_C1_P(c) ((unsigned int) ((unsigned int) (c) - 0x80) < 0x20)
 /* Note: There is no more input blocking in XEmacs */
 typedef enum {
   block_type, unblock_type, totally_type,
-  gcpro1_type, gcpro2_type, gcpro3_type, gcpro4_type, ungcpro_type
+  gcpro1_type, gcpro2_type, gcpro3_type, gcpro4_type, gcpro5_type,
+  ungcpro_type
 } blocktype;
 
 struct block_input_history_struct
 
 typedef struct block_input_history_struct block_input_history;
 
-#endif
+#endif /* DEBUG_INPUT_BLOCKING || DEBUG_GCPRO */
 
 #ifdef DEBUG_INPUT_BLOCKING
 
     blhistptr = 0;
 }
 
-#endif
+#endif /* DEBUG_INPUT_BLOCKING */
 
 
 #ifdef DEBUG_GCPRO
 static void
 log_gcpro (char *file, int line, struct gcpro *value, blocktype type)
 {
-  FRAME start_frame;
-
   if (type == ungcpro_type)
     {
       if (value == gcprolist) goto OK;
   gcprolist = gcpro1->next;
 }
 
+
+/* To be called from the debugger */
+void show_gcprohist (void);
 void
 show_gcprohist (void)
 {
   fflush (stdout);
 }
 
-#endif
+#endif /* DEBUG_GCPRO */
     if $obj & 1
     # It's an int
       set $val = $obj >> 1
-      set $type = dbg_Lisp_Type_Int
+      set $type = Lisp_Type_Int
     else
       set $type = $obj & dbg_typemask
-      if $type == dbg_Lisp_Type_Char
+      if $type == Lisp_Type_Char
         set $val = ($obj & dbg_valmask) >> dbg_gctypebits
       else
         # It's a record pointer
     set $type = ($obj & dbg_typemask) >> (dbg_valbits + 1)
   end
 
-  if $type == dbg_Lisp_Type_Record
+  if $type == Lisp_Type_Record
     set $lheader = (struct lrecord_header *) $val
     if dbg_USE_INDEXED_LRECORD_IMPLEMENTATION
       set $imp = lrecord_implementations_table[$lheader->type]
 
 define xtype
   decode_object $arg0
-  if $type == dbg_Lisp_Type_Int
+  if $type == Lisp_Type_Int
     echo int\n
   else
-  if $type == dbg_Lisp_Type_Char
+  if $type == Lisp_Type_Char
     echo char\n
   else
-  if $type == dbg_Lisp_Type_Symbol
+  if $type == Lisp_Type_Symbol
     echo symbol\n
   else
-  if $type == dbg_Lisp_Type_String
+  if $type == Lisp_Type_String
     echo string\n
   else
-  if $type == dbg_Lisp_Type_Vector
+  if $type == Lisp_Type_Vector
     echo vector\n
   else
-  if $type == dbg_Lisp_Type_Cons
+  if $type == Lisp_Type_Cons
     echo cons\n
   else
     printf "record type: %s\n", $imp->name
   end
 end
 
+define lisp-shadows
+  run -batch -vanilla -f list-load-path-shadows
+end
+
+document lisp-shadows
+Usage: lisp-shadows
+Run xemacs to check for lisp shadows
+end
+
+define environment-to-run-temacs
+  unset env EMACSLOADPATH
+  set env EMACSBOOTSTRAPLOADPATH=../lisp/:..
+  set env EMACSBOOTSTRAPMODULEPATH=../modules/:..
+end
+
 define run-temacs
-  unset env EMACSLOADPATH
-  set env EMACSBOOTSTRAPLOADPATH ../lisp/:..
+  environment-to-run-temacs
   run -batch -l ../lisp/loadup.el run-temacs -q
 end
 
 end
 
 define update-elc
-  unset env EMACSLOADPATH
-  set env EMACSBOOTSTRAPLOADPATH ../lisp/:..
+  environment-to-run-temacs
   run -batch -l ../lisp/update-elc.el
 end
 
 end
 
 define dump-temacs
-  unset env EMACSLOADPATH
-  set env EMACSBOOTSTRAPLOADPATH ../lisp/:..
+  environment-to-run-temacs
   run -batch -l ../lisp/loadup.el dump
 end
 
 Requires a running xemacs process.
 end
 
+
+define leval
+ldp Feval(Fcar(Fread_from_string(build_string($arg0),Qnil,Qnil)))
+end
+
+document leval
+Usage: leval "SEXP"
+Eval a lisp expression.
+Requires a running xemacs process.
+
+Example:
+(gdb) leval "(+ 1 2)"
+Lisp ==> 3
+end
+
+
 define wtype
 print $arg0->core.widget_class->core_class.class_name
 end
 
 define pobj
   decode_object $arg0
-  if $type == dbg_Lisp_Type_Int
+  if $type == Lisp_Type_Int
     printf "Integer: %d\n", $val
   else
-  if $type == dbg_Lisp_Type_Char
-    if $val < 128
+  if $type == Lisp_Type_Char
+    if $val > 32 && $val < 128
       printf "Char: %c\n", $val
     else
       printf "Char: %d\n", $val
     end
   else
-  if $type == dbg_Lisp_Type_String || $imp == lrecord_string
+  if $type == Lisp_Type_String || $imp == lrecord_string
     pstruct Lisp_String
   else
-  if $type == dbg_Lisp_Type_Cons   || $imp == lrecord_cons
+  if $type == Lisp_Type_Cons   || $imp == lrecord_cons
     pstruct Lisp_Cons
   else
-  if $type == dbg_Lisp_Type_Symbol || $imp == lrecord_symbol
+  if $type == Lisp_Type_Symbol || $imp == lrecord_symbol
     pstruct Lisp_Symbol
     printf "Symbol name: %s\n", $xstruct->name->_data
   else
-  if $type == dbg_Lisp_Type_Vector || $imp == lrecord_vector
+  if $type == Lisp_Type_Vector || $imp == lrecord_vector
     pstruct Lisp_Vector
     printf "Vector of length %d\n", $xstruct->size
     #print *($xstruct->_data) @ $xstruct->size
     pstruct console
   else
   if $imp == lrecord_database
-    pstruct database
+    pstruct Lisp_Database
   else
   if $imp == lrecord_device
     pstruct device
     pstruct Lisp_Glyph
   else
   if $imp == lrecord_hashtable
-    pstruct hashtable
+    pstruct Lisp_Hash_Table
   else
   if $imp == lrecord_image_instance
     pstruct Lisp_Image_Instance
   else
   if $imp == lrecord_keymap
-    pstruct keymap
+    pstruct Lisp_Keymap
   else
   if $imp == lrecord_lcrecord_list
     pstruct lcrecord_list
   end
   end
   end
+  # Repeat after me... gdb sux, gdb sux, gdb sux...
   end
   end
   end
   end
   end
   end
+  # Are we having fun yet??
   end
   end
   end
 Usage: pobj lisp_object
 Print the internal C structure of a underlying Lisp Object.
 end
+
+# -------------------------------------------------------------
+# functions to test the debugging support itself.
+# If you change this file, make sure the following still work...
+# -------------------------------------------------------------
+define test_xtype
+  printf "Vemacs_major_version: "
+  xtype Vemacs_major_version
+  printf "Vhelp_char: "
+  xtype Vhelp_char
+  printf "Qnil: "
+  xtype Qnil
+  printf "Qunbound: "
+  xtype Qunbound
+  printf "Vobarray: "
+  xtype Vobarray
+  printf "Vall_weak_lists: "
+  xtype Vall_weak_lists
+  printf "Vxemacs_codename: "
+  xtype Vxemacs_codename
+end
+
+define test_pobj
+  printf "Vemacs_major_version: "
+  pobj Vemacs_major_version
+  printf "Vhelp_char: "
+  pobj Vhelp_char
+  printf "Qnil: "
+  pobj Qnil
+  printf "Qunbound: "
+  pobj Qunbound
+  printf "Vobarray: "
+  pobj Vobarray
+  printf "Vall_weak_lists: "
+  pobj Vall_weak_lists
+  printf "Vxemacs_codename: "
+  pobj Vxemacs_codename
+end
+

src/menubar-msw.c

       if (ll+2 >= MAX_MENUITEM_LENGTH)
 	signal_simple_error ("Menu item produces too long displayable string",
 			     pgui_item->name);
-      memmove (ptr+1, ptr, ll-(ptr-buf));
+      memmove (ptr+1, ptr, (ll-(ptr-buf))+1);
       ll++;
       ptr+=2;
     }