Commits

cvs  committed 064ab7f

Import from CVS: tag r21-2-6

  • Participants
  • Parent commits 908a86f
  • Tags r21-2-6

Comments (0)

Files changed (45)

File CHANGES-beta

 							-*- indented-text -*-
+to 21.2 beta6 "Apollo"
+-- mswindows compile fixes from Martin Buchholz, Andy Piper, Greg
+   Klanderman and Adrian Aichner
+-- Synch with XEmacs 21.0.60
+-- mega-patch fixes from Martin Buchholz
+-- md5 fixes and testsuite from Hrvoje Niksic
+-- database fix from Hrvoje Niksic
+
 to 21.2 beta5 "Aphrodite"
+-- synch with XEmacs 21.0.58
 -- bytecode interpreter rewritten
 -- byte compiler fixes
 -- hash table implementation rewritten
+1998-12-16  Andy Piper  <andy@xemacs.org>
+
+	* XEmacs 21.2.6 is released
+
 1998-12-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.5 is released

File Makefile.in.in

 ##      distribution.
 top_distclean=\
 	$(RM) config.status config.log config-tmp-* build-install Installation ; \
-	for d in src lib-src lwlib dynodump ; do \
-	  $(RM) $$d/Makefile $$d/Makefile.in ; \
-	done ; \
-	$(RM) core .sbinit Makefile Makefile.in lock/*; \
-	$(RM) lisp/finder-inf.el* Installation.el Installation.elc; \
+	$(RM) core .sbinit lock/* GNUmakefile Makefile Makefile.in ; \
+	$(RM) lisp/finder-inf.el* Installation.el Installation.elc ; \
 	$(RM) packages mule-packages site-lisp
 
 distclean: FRC.distclean
 ===============================
 
 ** General
+*** egcs-1.1
+
+There have been reports of egcs-1.1 not compiling XEmacs correctly on
+Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K.
+
 *** Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using
 `-fno-strength-reduce'.
 

File configure.in

       done ) ;;
    * ) test -d "$dir" || mkdir "$dir" ;;
   esac
-  XE_SPACE(SUBDIR_MAKEFILES, $SUBDIR_MAKEFILES $dir/Makefile)
+  XE_SPACE(SUBDIR_MAKEFILES, $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile)
   XE_SPACE(internal_makefile_list, $internal_makefile_list $dir/Makefile.in)
 done
 AC_SUBST(INSTALL_ARCH_DEP_SUBDIR)

File dynodump/Makefile.in.in

 clean: mostlyclean
 	$(RM) *.so *.so.1
 distclean: clean
-	$(RM) Makefile Makefile.in TAGS
+	$(RM) GNUmakefile Makefile Makefile.in TAGS
 realclean: distclean
 extraclean: realclean
 	$(RM) *~ \#*

File lib-src/ChangeLog

+1998-12-16  Andy Piper  <andy@xemacs.org>
+
+	* XEmacs 21.2.6 is released
+
 1998-12-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.5 is released

File lib-src/Makefile.in.in

 	$(RM) ${INSTALLABLES} ${UTILITIES} *.exe
 distclean: clean
 	$(RM) DOC *.tab.c *.tab.h aixcc.c TAGS
-	$(RM) Makefile Makefile.in blessmail config.values
+	$(RM) GNUmakefile Makefile Makefile.in blessmail config.values
 realclean: distclean
 extraclean: distclean
 	$(RM) *~ \#*

File lisp/ChangeLog

+1998-12-16  Andy Piper  <andy@xemacs.org>
+
+	* XEmacs 21.2.6 is released
+
+1998-11-30  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* cus-dep.el (Custom-make-dependencies): Be smarter about trapping 
+	errors.
+
+1998-12-04  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* wid-edit.el (widget-echo-this-extent): Set
+	help-echo-owns-message to t.
+
+1998-11-30  Greg Klanderman  <greg@alphatech.com>
+
+	* package-get.el (package-get-download-menu): use toggles for
+	  each site in the download site menu.
+
+1998-12-01  Jan Vroonhof <vroonhof@math.ethz.ch>
+
+	* package-get.el (package-get): If we cannot find a package
+	  because package-get-remote is not set, give a more helpful
+	  error message.
+
+1998-11-30  Greg Klanderman  <greg@alphatech.com>
+
+	* package-get.el (package-get-remote-filename): use an EFS path
+	with user anonymous if no user is specified.
+
+1998-12-10  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+	* faces.el (face-spec-set): Re-init fallfacks for default after
+	calling reset-face on the default face.
+
+1998-12-10  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+	* package-admin.el (package-admin-default-install-function):
+	Behave as advertised.  Make sure the pkg-dir is proper for
+	default-directory.
+	(package-admin-add-binary-package): Make sure the pkg-dir is
+	proper for default-directory.
+	(package-admin-install-function-mswindows): Make sure the pkg-dir
+	is proper for default-directory.
+
 1998-12-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.5 is released

File lisp/cus-dep.el

 			     (file-name-nondirectory file))))
 		  ;; Search for defcustom/defface/defgroup
 		  ;; expressions, and evaluate them.
-		  (ignore-errors
-		    (while (re-search-forward
-			    "^(defcustom\\|^(defface\\|^(defgroup"
-			    nil t)
-		      (beginning-of-line)
-		      (let ((expr (read (current-buffer))))
-			(eval expr)
-			;; Hash the file of the affected symbol.
-			(setf (gethash (nth 1 expr) hash) name)))))))
+		  (while (re-search-forward
+			  "^(defcustom\\|^(defface\\|^(defgroup"
+			  nil t)
+		    (beginning-of-line)
+		    (let ((expr (read (current-buffer))))
+		      ;; We need to ignore errors here, so that
+		      ;; defcustoms with :set don't bug out.  Of
+		      ;; course, their values will not be assigned in
+		      ;; case of errors, but their `custom-group'
+		      ;; properties will by that time be in place, and
+		      ;; that's all we care about.
+		      (ignore-errors
+			(eval expr))
+		      ;; Hash the file of the affected symbol.
+		      (setf (gethash (nth 1 expr) hash) name))))))
 	    (cond
 	     ((zerop (hash-table-count hash))
 	      (princ "(No customization dependencies")

File lisp/faces.el

 	(init-face-from-resources face frame))
     (let ((frames (relevant-custom-frames)))
       (reset-face face)
+      (if (and (eq 'default face) (featurep 'x))
+	  (x-init-global-faces))
       (face-display-set face spec)
       (while frames
 	(face-display-set face spec (car frames))

File lisp/package-admin.el

 
 (defun package-admin-install-function-mswindows (file pkg-dir buf)
   "Install function for mswindows"
-  (let ( (default-directory pkg-dir) )
-    (call-process "djtar" nil buf t "-x" file)
-    ))
+  (let ((default-directory (file-name-as-directory pkg-dir)))
+    (unless (file-directory-p default-directory)
+      (make-directory default-directory t))
+    (call-process "djtar" nil buf t "-x" file)))
 
 (defun package-admin-default-install-function (file pkg-dir buf)
   "Default function to install a package.
 Install package FILENAME into directory PKG-DIR, with any messages output
 to buffer BUF."
-  (let (filename)
-    (setq filename (expand-file-name file pkg-dir))
+  (let* ((pkg-dir (file-name-as-directory pkg-dir))
+	 (default-directory pkg-dir)
+	 (filename (expand-file-name file)))
+    (unless (file-directory-p pkg-dir)
+      (make-directory pkg-dir t))
     ;; Don't assume GNU tar.
     (if (shell-command (concat "gunzip -c " filename " | tar xvf -") buf)
 	0
     ;; Insure that the current directory doesn't change
     (save-excursion
       (set-buffer buf)
-      (setq default-directory pkg-dir)
+      ;; This is not really needed
+      (setq default-directory (file-name-as-directory pkg-dir))
       (setq case-fold-search t)
       (buffer-disable-undo)
       (goto-char (setq start (point-max)))

File lisp/package-get.el

   (mapcar (lambda (site)
             (vector (car site)
                     `(push (quote ,(cdr site))
-                           package-get-remote)))
+                           package-get-remote)
+                    :style 'toggle
+                    :selected `(member (quote ,(cdr site))
+                                       package-get-remote)))
           package-get-download-sites))
 
 ;;;###autoload
 	 (package-status t)
 	 filenames full-package-filename)
     (if (null this-package)
-	(error "Couldn't find package %s with version %s"
-	       package version))
+	(if package-get-remote
+	    (error "Couldn't find package %s with version %s"
+		   package version)
+	  (error "No download sites or local package locations specified.")))
     (if (null base-filename)
 	(error "No filename associated with package %s, version %s"
 	       package version))
 
       (if (or (not full-package-filename)
 	      (not (file-exists-p full-package-filename)))
-	  (error "Unable to find file %s" base-filename))
+	  (if package-get-remote
+	      (error "Unable to find file %s" base-filename)
+	    (error
+	     "No download sites or local package locations specified.")))
       ;; Validate the md5 checksum
       ;; Doing it with XEmacs removes the need for an external md5 program
       (message "Validating checksum for `%s'..." package) (sit-for 0)
   (if (efs-ftp-path filename)
       filename
     (let ((dir (cadr search)))
-      (concat "/"
+      (concat (if (string-match "@" (car search))
+		  "/"
+		"/anonymous@")
 	      (car search) ":"
 	      (if (string-match "/$" dir)
 		  dir

File lisp/wid-edit.el

     (and (functionp help-echo)
 	 (setq help-echo (funcall help-echo widget)))
     (when (stringp help-echo)
+      (setq help-echo-owns-message t)
       (display-message 'help-echo help-echo))))
 
 (defsubst widget-handle-help-echo (extent help-echo)

File lwlib/Makefile.in.in

 	$(RM) liblw.a liblw_pure_*.a *.o *.i core
 clean: mostlyclean
 distclean: clean
-	$(RM) Makefile Makefile.in config.h TAGS
+	$(RM) GNUmakefile Makefile Makefile.in config.h TAGS
 realclean: distclean
 extraclean: distclean
 	$(RM) *~ \#*

File man/ChangeLog

+1998-12-16  Andy Piper  <andy@xemacs.org>
+
+	* XEmacs 21.2.6 is released
+
 1998-12-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.5 is released

File nt/ChangeLog

+1998-12-16  Andy Piper  <andy@xemacs.org>
+
+	* XEmacs 21.2.6 is released
+
+1998-12-11  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+	* xemacs.mak (DOC_SRC2): CLASH_DETECTION is not supported under
+ 	native Windows NT.  Therefore src\filelock.c is not to be
+ 	compiled.
+	(TEMACS_OBJS): Consequently, don't link in $(OUTDIR)\filelock.obj.
+
+1998-12-10  Jonathan Harris  <jhar@tardis.ed.ac.uk>
+
+	* xemacs.mak ($(OUTDIR)\alloc.obj): add a dependency on
+ 	puresize-adjust.h to avoid infinite recursion.
+
+1998-12-09  Andy Piper  <andy@xemacs.org>
+
+	* config.h: remove clash detection stuff.
+
+1998-12-07  Martin Buchholz  <martin@xemacs.org>
+
+	* xemacs.mak (TEMACS_OBJS):
+	(DOC_SRC4): 
+	- Remove pure.c, pure.obj
+
+1998-11-04  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+	* xemacs.mak: Creating minimal versions of Installation,
+ 	Installation.el, and config.values to make
+	(describe-installation) and (config-value ...) work in Windows NT
+ 	native builds.  Incorporating rule for movemail.exe courtesy of
+ 	Andy Piper.
+
 1998-12-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.5 is released
 
 #define HAVE_LONG_FILE_NAMES
 
-#ifdef HAVE_LONG_FILE_NAMES
-#define CLASH_DETECTION
-#endif
-
 #undef HAVE_LIBKSTAT
 #undef HAVE_LIBINTL
 #undef HAVE_LIBDNET

File nt/xemacs.mak

 !if [set CONF_REPORT_ALREADY_PRINTED=1]
 !endif
 !message ------------------------------------------------
-!message Configured for "$(EMACS_CONFIGURATION)".
+!message XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename) configured for "$(EMACS_CONFIGURATION)".
 !message 
 !message Installation directory is "$(INSTALL_DIR)".
 !message Package path is $(PATH_PACKAGEPATH).
 
 OUTDIR=obj
 
+#
+# Creating simplified versions of Installation and Installation.el
+#
+# Some values cannot be written on the same line with
+# their key, since they cannot be put inside an echo command.
+# Macro substitution (:"=\", :\=\\) can be performed on values in order
+# to create a legal string in LISP for Installation.el.
+#
+!if [echo OS: $(OS)>Installation] ||\
+[echo XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename:"=\") configured for ^`$(EMACS_CONFIGURATION)^'.>>Installation] ||\
+[echo Where should the build process find the source code?>>Installation] ||\
+[echo $(MAKEDIR:\=\\)>>Installation]
+!endif
+# Compiler Information
+!if defined(CCV) &&\
+[echo What compiler should XEmacs be built with?>>Installation] &&\
+[echo $(CCV)>>Installation]
+!endif
+# Window System Information
+!if [echo What window system should XEmacs use?>>Installation]
+!endif
+!if (defined (HAVE_X) && $(HAVE_X) == 1)
+!if [echo X11>>Installation]
+!endif
+!endif
+!if (defined (HAVE_MSW) && $(HAVE_MSW) == 1)
+!if [echo MS Windows>>Installation]
+!endif
+!endif
+!if (!defined (HAVE_MSW) && !defined (HAVE_X))
+!if [echo Please specify at least one HAVE_MSW^=1 and^/or HAVE_X^=1>>Installation]
+!endif
+!endif
+# Creation of Installation.el
+!if [type Installation] ||\
+[echo (setq Installation-string ^">Installation.el] ||\
+[type Installation >>Installation.el] ||\
+[echo ^")>>Installation.el]
+!endif
+
+
 #------------------------------------------------------------------------------
 
 default: $(OUTDIR)\nul all 
 LIB_SRC = $(XEMACS)\lib-src
 LIB_SRC_DEFINES = -DHAVE_CONFIG_H -DWIN32 -DWINDOWSNT
 
+#
+# Creating config.values to be used by config.el
+#
+CONFIG_VALUES = $(LIB_SRC)\config.values
+!if [echo Creating $(CONFIG_VALUES) && echo ;;; Do not edit this file!>$(CONFIG_VALUES)]
+!endif
+# MAKEDIR has to be made into a string.
+!if [echo blddir>>$(CONFIG_VALUES) && echo ^"$(MAKEDIR:\=\\)\\..^">>$(CONFIG_VALUES)]
+!endif
+!if [echo CC>>$(CONFIG_VALUES) && echo ^"$(CC:\=\\)^">>$(CONFIG_VALUES)]
+!endif
+!if [echo CFLAGS>>$(CONFIG_VALUES) && echo ^"$(CFLAGS:\=\\)^">>$(CONFIG_VALUES)]
+!endif
+!if [echo CPP>>$(CONFIG_VALUES) && echo ^"$(CPP:\=\\)^">>$(CONFIG_VALUES)]
+!endif
+!if [echo CPPFLAGS>>$(CONFIG_VALUES) && echo ^"$(CPPFLAGS:\=\\)^">>$(CONFIG_VALUES)]
+!endif
+!if [echo LISPDIR>>$(CONFIG_VALUES) && echo ^"$(MAKEDIR:\=\\)\\$(LISP:\=\\)^">>$(CONFIG_VALUES)]
+!endif
+# PATH_PACKAGEPATH is already a quoted string.
+!if [echo PACKAGE_PATH>>$(CONFIG_VALUES) && echo $(PATH_PACKAGEPATH)>>$(CONFIG_VALUES)]
+!endif
+
 # Inferred rule
 {$(LIB_SRC)}.c{$(LIB_SRC)}.exe :
 	@cd $(LIB_SRC)
 # Individual dependencies
 ETAGS_DEPS = $(LIB_SRC)/getopt.c $(LIB_SRC)/getopt1.c $(LIB_SRC)/../src/regex.c
 $(LIB_SRC)/etags.exe : $(LIB_SRC)/etags.c $(ETAGS_DEPS)
-$(LIB_SRC)/movemail.exe: $(LIB_SRC)/movemail.c $(ETAGS_DEPS)
+$(LIB_SRC)/movemail.exe: $(LIB_SRC)/movemail.c $(LIB_SRC)/pop.c $(ETAGS_DEPS)
 
 LIB_SRC_TOOLS = \
 	$(LIB_SRC)/make-docfile.exe	\
  $(XEMACS)\src\faces.c \
  $(XEMACS)\src\file-coding.c \
  $(XEMACS)\src\fileio.c \
- $(XEMACS)\src\filelock.c \
  $(XEMACS)\src\filemode.c \
  $(XEMACS)\src\floatfns.c \
  $(XEMACS)\src\fns.c 
  $(XEMACS)\src\process.c \
  $(XEMACS)\src\process-nt.c \
  $(XEMACS)\src\profile.c \
- $(XEMACS)\src\pure.c \
  $(XEMACS)\src\rangetab.c \
  $(XEMACS)\src\realpath.c \
  $(XEMACS)\src\redisplay-output.c \
 	$(OUTDIR)\faces.obj \
 	$(OUTDIR)\file-coding.obj \
 	$(OUTDIR)\fileio.obj \
-	$(OUTDIR)\filelock.obj \
 	$(OUTDIR)\filemode.obj \
 	$(OUTDIR)\floatfns.obj \
 	$(OUTDIR)\fns.obj \
 	$(OUTDIR)\process.obj \
 	$(OUTDIR)\process-nt.obj \
 	$(OUTDIR)\profile.obj \
-	$(OUTDIR)\pure.obj \
 	$(OUTDIR)\rangetab.obj \
 	$(OUTDIR)\realpath.obj \
 	$(OUTDIR)\redisplay-output.obj \
 $(OUTDIR)\TransientEmacsShell.obj: $(TEMACS_SRC)\EmacsShell-sub.c
 	$(CCV) $(TEMACS_FLAGS) -DDEFINE_TRANSIENT_EMACS_SHELL $** -Fo$@
 
-$(OUTDIR)\pure.obj: $(TEMACS_SRC)\pure.c $(TEMACS_SRC)\puresize-adjust.h
+$(OUTDIR)\alloc.obj: $(TEMACS_SRC)\alloc.c $(TEMACS_SRC)\puresize-adjust.h
 
 #$(TEMACS_SRC)\Emacs.ad.h: $(XEMACS)\etc\Emacs.ad
 #	!"sed -f ad2c.sed < $(XEMACS)\etc\Emacs.ad > $(TEMACS_SRC)\Emacs.ad.h"
 	@del "$(INSTALL_DIR)\lock\README"
 	@xcopy /q $(LIB_SRC)\*.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\"
 	@copy $(LIB_SRC)\DOC "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
+	@copy $(CONFIG_VALUES) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
 	@copy $(XEMACS)\src\xemacs.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
 	@copy $(RUNEMACS) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
 	@xcopy /e /q $(XEMACS)\etc  "$(INSTALL_DIR)\etc\"
 	del *.orig
 	del *.rej
 	del *.exe
+	del $(CONFIG_VALUES)
 	cd $(LISP)
 	-del /s /q *.bak *.elc *.orig *.rej
 

File src/ChangeLog

+1998-12-16  Andy Piper  <andy@xemacs.org>
+
+	* XEmacs 21.2.6 is released
+
+1998-12-08  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* md5.c (Fmd5): Correctly initiate string input stream.
+
+	* Makefile.in.in (tests): Add md5-tests.el.
+
+1998-12-06  Martin Buchholz  <martin@xemacs.org>
+
+	* lisp.h:
+	* alloc.c (make_vector): remove travesty
+	(Fmake_vector):
+	(make_pure_vector):
+	(pure_cons):
+	(make_bit_vector_internal):
+	(make_bit_vector):
+	(make_bit_vector_from_byte_vector):
+	(Fmake_bit_vector):
+	- make vector_equal a little faster.
+	- Don't use variable name `new'.
+	- Use size_t instead of EMACS_INT.
+	- usual Martin-style pointless bit-twiddling.
+	
+	* fns.c (mapcar1): 
+	(Fmapconcat): 
+	(Fmapcar): 
+	(Fmapvector): 
+	Make mapcar faster.  In particular, make
+	  (mapc #'identity long-string)
+	MUCH faster under Mule.
+	* tests/automated/lisp-tests.el: Test 'em!
+
+1998-12-06  Martin Buchholz  <martin@xemacs.org>
+
+	* bytecode.c (Ffetch_bytecode): Fix crash when loading lazy-loaded 
+	bytecode.
+
+1998-12-13  Martin Buchholz  <martin@xemacs.org>
+
+	* console-msw.c: Function definitions follow coding standards
+	- This prevents e.g. find-tag on Lisp_Event finding DEVENT
+
+1998-12-11  Martin Buchholz  <martin@xemacs.org>
+
+	* events.h (struct timeout_data): 
+	* event-tty.c (tty_timeout_to_emacs_event): 
+	* event-msw.c (mswindows_wm_timer_callback): 
+	* event-Xt.c (Xt_timeout_to_emacs_event): 
+	* event-msw.c (mswindows_cancel_dispatch_event):
+	Make sure Lisp_Objects inside events are initialized to Qnil, not
+	Qnull_pointer, which is now illegal.
+
+1998-12-10  Martin Buchholz  <martin@xemacs.org>
+
+	* lisp.h: Fix up prototypes to match alloc.c
+
+1998-12-09  Andy Piper  <andy@xemacs.org>
+
+	* glyphs-msw.c (init_image_instance_from_xbm_inline): don't use
+ 	XSETINT for assigning lisp objects.
+
+1998-12-07  Martin Buchholz  <martin@xemacs.org>
+
+	* opaque.h:
+	* console-msw.c (DHEADER): 
+	(DOPAQUE_DATA): 
+	(DEVENT): 
+	(DCONS): 
+	(DCONSCDR): 
+	(DSTRING): 
+	(DVECTOR): 
+	(DSYMBOL): 
+	(DSYMNAME): 
+	- max_align_t should not be visible to the user of the
+	  XOPAQUE_DATA macro.
+	- use Bufbyte instead of char
+	- parens around (FOOP (obj)) are always redundant.
+	  If they were necessary, we should fix the macro instead.
+	- Always use string_data(foo) instead of foo->data.
+
+1998-12-07  Martin Buchholz  <martin@xemacs.org>
+
+	* sysdep.c (set_descriptor_non_blocking): 
+	Since O_NONBLOCK is now always #defined, make use of fcntl
+	conditional on F_SETFL being defined.
+
+1998-12-09  Andy Piper  <andy@xemacs.org>
+
+	* menubar-msw.c (mswindows_handle_wm_command): add back in checks
+ 	that got removed in the merge
+
+1998-11-30  Greg Klanderman  <greg@alphatech.com>
+
+	* dired.c (vars_of_dired): bugfix for previous conditionalization
+	of user-name-completion on non- Windows NT.
+
+1998-12-08  Martin Buchholz  <martin@xemacs.org>
+
+	* windowsnt.h: Remove `support' for using index and rindex
+
+	* filelock.c (current_lock_owner): 
+	- Change uses of index -> strchr, rindex -> strrchr
+
+1998-12-06  Martin Buchholz  <martin@xemacs.org>
+
+	* frame-msw.c (mswindows_init_frame_1):
+	- use make_lisp_hash_table, not Fmake_hash_table
+	- include elhash.h
+
 1998-12-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.2.5 is released

File src/Makefile.in.in

 
 fastdump: temacs 
 	@$(RM) ${PROGNAME} && touch SATISFIED
-	-${dumpp_temacs}
+	-${dump_temacs}
 	@if test -f ${PROGNAME}; then if test -f SATISFIED; then \
 		./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \
 		$(RM) SATISFIED; exit 0; fi; \
 ## We have automated tests!!
 testdir = ${srcdir}/../tests/automated
 tests   = \
-	${testdir}/hash-table-tests.el \
-	${testdir}/lisp-tests.el \
-	${testdir}/database-tests.el \
-	${testdir}/byte-compiler-tests.el
+	${testdir}/hash-table-tests.el    \
+	${testdir}/lisp-tests.el          \
+	${testdir}/database-tests.el      \
+	${testdir}/byte-compiler-tests.el \
+	${testdir}/md5-tests.el
 batch_test_emacs = -batch -l ${testdir}/test-harness.el -f batch-test-emacs ${tests}
 
 .PHONY: check check-temacs
 ## Do not use it on development directories!
 distclean: clean
 	$(RM) config.h paths.h Emacs.ad.h \
-	  Makefile Makefile.in GNUmakefile TAGS ${PROGNAME}.*
+	  GNUmakefile Makefile Makefile.in TAGS ${PROGNAME}.*
 realclean: distclean
 versionclean:
 	$(RM) ${PROGNAME} ${PROGNAME}.exe ${libsrc}DOC
 
 EXFUN (Fgarbage_collect, 0);
 
-/* #define GDB_SUCKS */
+/* Return the true size of a struct with a variable-length array field.  */
+#define STRETCHY_STRUCT_SIZEOF(stretchy_struct_type,		\
+			       stretchy_array_field,		\
+			       stretchy_array_length)		\
+  (offsetof (stretchy_struct_type, stretchy_array_field) +	\
+   (offsetof (stretchy_struct_type, stretchy_array_field[1]) -	\
+    offsetof (stretchy_struct_type, stretchy_array_field[0])) *	\
+   (stretchy_array_length))
 
 #if 0 /* this is _way_ too slow to be part of the standard debug options */
 #if defined(DEBUG_XEMACS) && defined(MULE)
 static size_t
 size_vector (CONST void *lheader)
 {
-  return offsetof (Lisp_Vector, contents[((Lisp_Vector *) lheader)->size]);
+  return STRETCHY_STRUCT_SIZEOF (Lisp_Vector, contents,
+				 ((Lisp_Vector *) lheader)->size);
 }
 
 static int
 vector_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  int indice;
   int len = XVECTOR_LENGTH (obj1);
   if (len != XVECTOR_LENGTH (obj2))
     return 0;
-  for (indice = 0; indice < len; indice++)
-    {
-      if (!internal_equal (XVECTOR_DATA (obj1) [indice],
-			   XVECTOR_DATA (obj2) [indice],
-			   depth + 1))
+
+  {
+    Lisp_Object *ptr1 = XVECTOR_DATA (obj1);
+    Lisp_Object *ptr2 = XVECTOR_DATA (obj2);
+    while (len--)
+      if (!internal_equal (*ptr1++, *ptr2++, depth + 1))
 	return 0;
-    }
+  }
   return 1;
 }
 
 make_vector_internal (size_t sizei)
 {
   /* no vector_next */
-  size_t sizem = offsetof (Lisp_Vector, contents[sizei]);
+  size_t sizem = STRETCHY_STRUCT_SIZEOF (Lisp_Vector, contents, sizei);
   Lisp_Vector *p = (Lisp_Vector *) alloc_lcrecord (sizem, lrecord_vector);
 
   p->size = sizei;
 make_vector_internal (size_t sizei)
 {
   /* + 1 to account for vector_next */
-  size_t sizem = offsetof (Lisp_Vector, contents[sizei+1]);
+  size_t sizem = STRETCHY_STRUCT_SIZEOF (Lisp_Vector, contents, sizei+1);
   Lisp_Vector *p = (Lisp_Vector *) allocate_lisp_storage (sizem);
 
   INCREMENT_CONS_COUNTER (sizem, "vector");
 #endif /* ! LRECORD_VECTOR */
 
 Lisp_Object
-make_vector (EMACS_INT length, Lisp_Object init)
+make_vector (size_t length, Lisp_Object init)
 {
-  int elt;
-  Lisp_Object vector;
-  Lisp_Vector *p;
-
-  if (length < 0)
-    length = XINT (wrong_type_argument (Qnatnump, make_int (length)));
-
-  p = make_vector_internal (length);
-  XSETVECTOR (vector, p);
-
-#if 0
-  /* Initialize big arrays full of 0's quickly, for what that's worth */
+  Lisp_Vector *vecp = make_vector_internal (length);
+  Lisp_Object *p = vector_data (vecp);
+
+  while (length--)
+    *p++ = init;
+
   {
-    char *travesty = (char *) &init;
-    for (i = 1; i < sizeof (Lisp_Object); i++)
-    {
-      if (travesty[i] != travesty[0])
-        goto fill;
-    }
-    memset (vector_data (p), travesty[0], length * sizeof (Lisp_Object));
+    Lisp_Object vector;
+    XSETVECTOR (vector, vecp);
     return vector;
   }
- fill:
-#endif
-  for (elt = 0; elt < length; elt++)
-    vector_data(p)[elt] = init;
-
-  return vector;
 }
 
 DEFUN ("make-vector", Fmake_vector, 2, 2, 0, /*
 */
        (length, init))
 {
-  CHECK_NATNUM (length);
+  CONCHECK_NATNUM (length);
   return make_vector (XINT (length), init);
 }
 
 */
        (int nargs, Lisp_Object *args))
 {
-  Lisp_Object vector;
-  int elt;
-  Lisp_Vector *p = make_vector_internal (nargs);
-
-  for (elt = 0; elt < nargs; elt++)
-    vector_data(p)[elt] = args[elt];
-
-  XSETVECTOR (vector, p);
-  return vector;
+  Lisp_Vector *vecp = make_vector_internal (nargs);
+  Lisp_Object *p = vector_data (vecp);
+
+  while (nargs--)
+    *p++ = *args++;
+
+  {
+    Lisp_Object vector;
+    XSETVECTOR (vector, vecp);
+    return vector;
+  }
 }
 
 Lisp_Object
 static struct Lisp_Bit_Vector *
 make_bit_vector_internal (size_t sizei)
 {
-  size_t sizem =
-    offsetof (Lisp_Bit_Vector, bits[BIT_VECTOR_LONG_STORAGE (sizei)]);
+  size_t num_longs = BIT_VECTOR_LONG_STORAGE (sizei);
+  size_t sizem = STRETCHY_STRUCT_SIZEOF (Lisp_Bit_Vector, bits, num_longs);
   Lisp_Bit_Vector *p = (Lisp_Bit_Vector *) allocate_lisp_storage (sizem);
   set_lheader_implementation (&(p->lheader), lrecord_bit_vector);
 
   bit_vector_next   (p) = all_bit_vectors;
   /* make sure the extra bits in the last long are 0; the calling
      functions might not set them. */
-  p->bits[BIT_VECTOR_LONG_STORAGE (sizei) - 1] = 0;
+  p->bits[num_longs - 1] = 0;
   XSETBIT_VECTOR (all_bit_vectors, p);
   return p;
 }
 
 Lisp_Object
-make_bit_vector (EMACS_INT length, Lisp_Object init)
+make_bit_vector (size_t length, Lisp_Object init)
 {
-  Lisp_Object bit_vector;
-  struct Lisp_Bit_Vector *p;
-  EMACS_INT num_longs;
+  struct Lisp_Bit_Vector *p = make_bit_vector_internal (length);
+  size_t num_longs = BIT_VECTOR_LONG_STORAGE (length);
 
   CHECK_BIT (init);
 
-  num_longs = BIT_VECTOR_LONG_STORAGE (length);
-  p = make_bit_vector_internal (length);
-  XSETBIT_VECTOR (bit_vector, p);
-
   if (ZEROP (init))
     memset (p->bits, 0, num_longs * sizeof (long));
   else
     {
-      EMACS_INT bits_in_last = length & (LONGBITS_POWER_OF_2 - 1);
+      size_t bits_in_last = length & (LONGBITS_POWER_OF_2 - 1);
       memset (p->bits, ~0, num_longs * sizeof (long));
       /* But we have to make sure that the unused bits in the
-	 last integer are 0, so that equal/hash is easy. */
+	 last long are 0, so that equal/hash is easy. */
       if (bits_in_last)
 	p->bits[num_longs - 1] &= (1 << bits_in_last) - 1;
     }
 
-  return bit_vector;
+  {
+    Lisp_Object bit_vector;
+    XSETBIT_VECTOR (bit_vector, p);
+    return bit_vector;
+  }
 }
 
 Lisp_Object
-make_bit_vector_from_byte_vector (unsigned char *bytevec, EMACS_INT length)
+make_bit_vector_from_byte_vector (unsigned char *bytevec, size_t length)
 {
-  Lisp_Object bit_vector;
-  struct Lisp_Bit_Vector *p;
   int i;
-
-  if (length < 0)
-    length = XINT (wrong_type_argument (Qnatnump, make_int (length)));
-
-  p = make_bit_vector_internal (length);
-  XSETBIT_VECTOR (bit_vector, p);
+  Lisp_Bit_Vector *p = make_bit_vector_internal (length);
 
   for (i = 0; i < length; i++)
     set_bit_vector_bit (p, i, bytevec[i]);
 
-  return bit_vector;
+  {
+    Lisp_Object bit_vector;
+    XSETBIT_VECTOR (bit_vector, p);
+    return bit_vector;
+  }
 }
 
 DEFUN ("make-bit-vector", Fmake_bit_vector, 2, 2, 0, /*
 */
        (int nargs, Lisp_Object *args))
 {
-  Lisp_Object bit_vector;
-  int elt;
-  struct Lisp_Bit_Vector *p;
-
-  for (elt = 0; elt < nargs; elt++)
-    CHECK_BIT (args[elt]);
-
-  p = make_bit_vector_internal (nargs);
-
-  for (elt = 0; elt < nargs; elt++)
-    set_bit_vector_bit (p, elt, !ZEROP (args[elt]));
-
-  XSETBIT_VECTOR (bit_vector, p);
-  return bit_vector;
+  int i;
+  Lisp_Bit_Vector *p = make_bit_vector_internal (nargs);
+
+  for (i = 0; i < nargs; i++)
+    {
+      CHECK_BIT (args[i]);
+      set_bit_vector_bit (p, i, !ZEROP (args[i]));
+    }
+
+  {
+    Lisp_Object bit_vector;
+    XSETBIT_VECTOR (bit_vector, p);
+    return bit_vector;
+  }
 }
 
 
   else
     {
       /* Make a new current string chars block */
-      struct string_chars_block *new = xnew (struct string_chars_block);
-
-      current_string_chars_block->next = new;
-      new->prev = current_string_chars_block;
-      new->next = 0;
-      current_string_chars_block = new;
-      new->pos = fullsize;
+      struct string_chars_block *new_scb = xnew (struct string_chars_block);
+
+      current_string_chars_block->next = new_scb;
+      new_scb->prev = current_string_chars_block;
+      new_scb->next = 0;
+      current_string_chars_block = new_scb;
+      new_scb->pos = fullsize;
       s_chars = (struct string_chars *)
 	current_string_chars_block->string_chars;
     }
 void
 set_string_char (struct Lisp_String *s, Charcount i, Emchar c)
 {
-  Bytecount oldlen, newlen;
   Bufbyte newstr[MAX_EMCHAR_LEN];
   Bytecount bytoff = charcount_to_bytecount (string_data (s), i);
-
-  oldlen = charcount_to_bytecount (string_data (s) + bytoff, 1);
-  newlen = set_charptr_emchar (newstr, c);
+  Bytecount oldlen = charcount_to_bytecount (string_data (s) + bytoff, 1);
+  Bytecount newlen = set_charptr_emchar (newstr, c);
 
   if (oldlen != newlen)
     resize_string (s, bytoff, newlen - oldlen);
 make_pure_string (CONST Bufbyte *data, Bytecount length,
 		  Lisp_Object plist, int no_need_to_copy_data)
 {
-  Lisp_Object new;
-  struct Lisp_String *s;
-  size_t size = sizeof (struct Lisp_String) +
+  Lisp_String *s;
+  size_t size = sizeof (Lisp_String) +
     (no_need_to_copy_data ? 0 : (length + 1)); /* + 1 for terminating 0 */
   size = ALIGN_SIZE (size, ALIGNOF (Lisp_Object));
 
 	{
 	  s = XSYMBOL (tem)->name;
 	  if (!PURIFIED (s)) abort ();
-	  XSETSTRING (new, s);
-	  return new;
+
+	  {
+	    Lisp_Object string;
+	    XSETSTRING (string, s);
+	    return string;
+	  }
 	}
     }
 
   if (!check_purespace (size))
     return make_string (data, length);
 
-  s = (struct Lisp_String *) (PUREBEG + pure_bytes_used);
+  s = (Lisp_String *) (PUREBEG + pure_bytes_used);
 #ifdef LRECORD_STRING
   set_lheader_implementation (&(s->lheader), lrecord_string);
 #ifdef USE_INDEXED_LRECORD_IMPLEMENTATION
     }
   else
     {
-      set_string_data (s, (Bufbyte *) s + sizeof (struct Lisp_String));
+      set_string_data (s, (Bufbyte *) s + sizeof (Lisp_String));
       memcpy (string_data (s), data, length);
       set_string_byte (s, length, 0);
     }
   /* Do this after the official "completion" of the purecopying. */
   s->plist = Fpurecopy (plist);
 
-  XSETSTRING (new, s);
-  return new;
+  {
+    Lisp_Object string;
+    XSETSTRING (string, s);
+    return string;
+  }
 }
 
 
 Lisp_Object
 pure_cons (Lisp_Object car, Lisp_Object cdr)
 {
-  Lisp_Object new;
-  struct Lisp_Cons *c;
-
-  if (!check_purespace (sizeof (struct Lisp_Cons)))
+  Lisp_Cons *c;
+
+  if (!check_purespace (sizeof (Lisp_Cons)))
     return Fcons (Fpurecopy (car), Fpurecopy (cdr));
 
-  c = (struct Lisp_Cons *) (PUREBEG + pure_bytes_used);
+  c = (Lisp_Cons *) (PUREBEG + pure_bytes_used);
 #ifdef LRECORD_CONS
   set_lheader_implementation (&(c->lheader), lrecord_cons);
 #ifdef USE_INDEXED_LRECORD_IMPLEMENTATION
   c->lheader.pure = 1;
 #endif
 #endif
-  pure_bytes_used += sizeof (struct Lisp_Cons);
-  bump_purestat (&purestat_cons, sizeof (struct Lisp_Cons));
+  pure_bytes_used += sizeof (Lisp_Cons);
+  bump_purestat (&purestat_cons, sizeof (Lisp_Cons));
 
   c->car = Fpurecopy (car);
   c->cdr = Fpurecopy (cdr);
-  XSETCONS (new, c);
-  return new;
+
+  {
+    Lisp_Object cons;
+    XSETCONS (cons, c);
+    return cons;
+  }
 }
 
 Lisp_Object
 Lisp_Object
 make_pure_vector (size_t len, Lisp_Object init)
 {
-  Lisp_Object new;
   Lisp_Vector *v;
-  size_t size = offsetof (Lisp_Vector, contents[len]);
+  size_t size = STRETCHY_STRUCT_SIZEOF (Lisp_Vector, contents, len);
 
   init = Fpurecopy (init);
 
   for (size = 0; size < len; size++)
     v->contents[size] = init;
 
-  XSETVECTOR (new, v);
-  return new;
+  {
+    Lisp_Object vector;
+    XSETVECTOR (vector, v);
+    return vector;
+  }
 }
 
 #if 0
     }
 #ifndef LRECORD_VECTOR
   else if (VECTORP (obj))
-    return offsetof (Lisp_Vector, contents[XVECTOR_LENGTH (obj)]);
+    return STRETCHY_STRUCT_SIZEOF (Lisp_Vector, contents, XVECTOR_LENGTH (obj));
 #endif /* !LRECORD_VECTOR */
 
 #ifndef LRECORD_CONS
 	  v->size = len;
 	  total_size += len;
           total_storage +=
-	    MALLOC_OVERHEAD + offsetof (Lisp_Vector, contents[len + 1]);
+	    MALLOC_OVERHEAD +
+	    STRETCHY_STRUCT_SIZEOF (Lisp_Vector, contents, len + 1);
 	  num_used++;
 	  prev = &(vector_next (v));
 	  vector = *prev;
 	  UNMARK_RECORD_HEADER (&(v->lheader));
 	  total_size += len;
           total_storage +=
-	    MALLOC_OVERHEAD
-	    + offsetof (Lisp_Bit_Vector, bits[BIT_VECTOR_LONG_STORAGE (len)]);
+	    MALLOC_OVERHEAD +
+	    STRETCHY_STRUCT_SIZEOF (Lisp_Bit_Vector, bits,
+				    BIT_VECTOR_LONG_STORAGE (len));
 	  num_used++;
 	  prev = &(bit_vector_next (v));
 	  bit_vector = *prev;

File src/bytecode.c

   if (OPAQUEP (f->instructions) || STRINGP (f->instructions))
     return function;
 
-  if (CONSP (XCOMPILED_FUNCTION (function)->instructions))
+  if (CONSP (f->instructions))
     {
       Lisp_Object tem = read_doc_string (f->instructions);
       if (!CONSP (tem))
 	ebolify_bytecode_constants (XCDR (tem));
       /* VERY IMPORTANT to purecopy here!!!!!
 	 See load_force_doc_string_unwind. */
-      /* f->instructions = Fpurecopy (XCAR (tem)); */
-      f->constants = Fpurecopy (XCDR (tem));
+      f->instructions = Fpurecopy (XCAR (tem));
+      f->constants    = Fpurecopy (XCDR (tem));
       return function;
     }
   abort ();

File src/console-msw.c

  * Intended for use in the MSVC "Watch" window which doesn't like
  * the aborts that the error_check_foo() functions can make.
  */
-struct lrecord_header *DHEADER(Lisp_Object obj)
+struct lrecord_header *
+DHEADER (Lisp_Object obj)
 {
-  return (LRECORDP (obj)) ? XRECORD_LHEADER (obj) : NULL;
+  return LRECORDP (obj) ? XRECORD_LHEADER (obj) : NULL;
 }
 
-int *DOPAQUE_DATA (Lisp_Object obj)
+void *
+DOPAQUE_DATA (Lisp_Object obj)
 {
-  return (OPAQUEP (obj)) ? OPAQUE_DATA (XOPAQUE (obj)) : NULL;
+  return OPAQUEP (obj) ? OPAQUE_DATA (XOPAQUE (obj)) : NULL;
 }
 
-struct Lisp_Event *DEVENT(Lisp_Object obj)
+struct Lisp_Event *
+DEVENT (Lisp_Object obj)
 {
-  return (EVENTP (obj)) ? XEVENT (obj) : NULL;
+  return EVENTP (obj) ? XEVENT (obj) : NULL;
 }
 
-struct Lisp_Cons *DCONS(Lisp_Object obj)
+struct Lisp_Cons *
+DCONS (Lisp_Object obj)
 {
-  return (CONSP (obj)) ? XCONS (obj) : NULL;
+  return CONSP (obj) ? XCONS (obj) : NULL;
 }
 
-struct Lisp_Cons *DCONSCDR(Lisp_Object obj)
+struct Lisp_Cons *
+DCONSCDR (Lisp_Object obj)
 {
-  return ((CONSP (obj)) && (CONSP (XCDR (obj)))) ? XCONS (XCDR (obj)) : 0;
+  return (CONSP (obj) && CONSP (XCDR (obj))) ? XCONS (XCDR (obj)) : 0;
 }
 
-char *DSTRING(Lisp_Object obj)
+Bufbyte *
+DSTRING (Lisp_Object obj)
 {
-  return (STRINGP (obj)) ? XSTRING_DATA (obj) : NULL;
+  return STRINGP (obj) ? XSTRING_DATA (obj) : NULL;
 }
 
-struct Lisp_Vector *DVECTOR(Lisp_Object obj)
+struct Lisp_Vector *
+DVECTOR (Lisp_Object obj)
 {
-  return (VECTORP (obj)) ? XVECTOR (obj) : NULL;
+  return VECTORP (obj) ? XVECTOR (obj) : NULL;
 }
 
-struct Lisp_Symbol *DSYMBOL(Lisp_Object obj)
+struct Lisp_Symbol *
+DSYMBOL (Lisp_Object obj)
 {
-  return (SYMBOLP (obj)) ? XSYMBOL (obj) : NULL;
+  return SYMBOLP (obj) ? XSYMBOL (obj) : NULL;
 }
 
-char *DSYMNAME(Lisp_Object obj)
+Bufbyte *
+DSYMNAME (Lisp_Object obj)
 {
-  return (SYMBOLP (obj)) ? XSYMBOL (obj)->name->_data : NULL;
+  return SYMBOLP (obj) ? string_data (XSYMBOL (obj)->name) : NULL;
 }
 
 #endif

File src/database.c

       call2 (func, key, val);
     }
 #else
-  DBC *dbcp;
+  {
+    DBC *dbcp;
 
-  status = dbp->cursor (dbp, NULL, &dbcp);
-  for (status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_FIRST);
-       status == 0;
-       status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_NEXT))
-    {
-      /* ### Needs mule-izing */
-      key = make_string ((Bufbyte *) keydatum.data, keydatum.size);
-      val = make_string ((Bufbyte *) valdatum.data, valdatum.size);
-      call2 (func, key, val);
-    }
-  dbcp->c_close (dbcp);
+    status = dbp->cursor (dbp, NULL, &dbcp);
+    for (status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_FIRST);
+	 status == 0;
+	 status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_NEXT))
+      {
+	/* ### Needs mule-izing */
+	key = make_string ((Bufbyte *) keydatum.data, keydatum.size);
+	val = make_string ((Bufbyte *) valdatum.data, valdatum.size);
+	call2 (func, key, val);
+      }
+    dbcp->c_close (dbcp);
+  }
 #endif /* DB_VERSION_MAJOR */
 }
 
 */ );
   Vcompletion_ignored_extensions = Qnil;
 
+#ifndef  WINDOWSNT
   user_cache = NULL;
   user_cache_len = 0;
   user_cache_max = 0;
+#endif
 }

File src/event-Xt.c

   /* timeout events have nil as channel */
   emacs_event->timestamp  = 0; /* #### wrong!! */
   emacs_event->event.timeout.interval_id = timeout->id;
+  emacs_event->event.timeout.function = Qnil;
+  emacs_event->event.timeout.object = Qnil;
   Blocktype_free (the_Xt_timeout_blocktype, timeout);
 }
 

File src/event-msw.c

   event->timestamp = dwtime;
   event->event_type = timeout_event;
   event->event.timeout.interval_id = id_timer;
+  event->event.timeout.function = Qnil;
+  event->event.timeout.object = Qnil;
 
   mswindows_enqueue_dispatch_event (emacs_event);
 }

File src/event-tty.c

   emacs_event->timestamp  = 0; /* #### */
   emacs_event->event.timeout.interval_id =
     pop_low_level_timeout (&tty_timer_queue, 0);
+  emacs_event->event.timeout.function = Qnil;
+  emacs_event->event.timeout.object = Qnil;
 }
 
 

File src/events.h

 {
   int		    interval_id;
   int		    id_number;
-  Lisp_Object	    function, object;
+  Lisp_Object	    function;
+  Lisp_Object	    object;
 };
 
 struct eval_data

File src/filelock.c

 static int
 current_lock_owner (lock_info_type *owner, char *lfname)
 {
-#ifndef index
-  extern char *rindex (), *index ();
-#endif
   int o, p, len, ret;
   int local_owner = 0;
   char *at, *dot;
   
   /* Parse USER@HOST.PID.  If can't parse, return -1.  */
   /* The USER is everything before the first @.  */
-  at = index (lfinfo, '@');
-  dot = rindex (lfinfo, '.');
+  at = strchr (lfinfo, '@');
+  dot = strrchr (lfinfo, '.');
   if (!at || !dot) {
     xfree (lfinfo);
     return -1;

File src/frame-msw.c

 #include "buffer.h"
 #include "console-msw.h"
 #include "glyphs-msw.h"
+#include "elhash.h"
 #include "events.h"
 #include "faces.h"
 #include "frame.h"
   FRAME_MSWINDOWS_DATA(f)->sizing = 0;
   FRAME_MSWINDOWS_MENU_HASH_TABLE(f) = Qnil;
 #ifdef HAVE_TOOLBARS
-  FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE(f) = Fmake_hash_table (make_int (50), 
-							  Qequal);
+  FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE(f) =
+    make_lisp_hash_table (50, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL);
 #endif
 
   /* Will initialize these in WM_SIZE handler. We cannot do it now,

File src/glyphs-msw.c

 	if (NILP (background))
 	  background = pointer_bg;
 
-	XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii), 
-		 find_keyword_in_vector (instantiator, Q_hotspot_x));
-	XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii), 
-		 find_keyword_in_vector (instantiator, Q_hotspot_y));
+	IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii) = 
+	  find_keyword_in_vector (instantiator, Q_hotspot_x);
+	IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii) = 
+	  find_keyword_in_vector (instantiator, Q_hotspot_y);
 	IMAGE_INSTANCE_PIXMAP_FG (ii) = foreground;
 	IMAGE_INSTANCE_PIXMAP_BG (ii) = background;
 	if (COLOR_INSTANCEP (foreground))
 /* Defined in alloc.c */
 void release_breathing_space (void);
 Lisp_Object noseeum_cons (Lisp_Object, Lisp_Object);
-Lisp_Object make_vector (EMACS_INT, Lisp_Object);
+Lisp_Object make_vector (size_t, Lisp_Object);
 Lisp_Object vector1 (Lisp_Object);
 Lisp_Object vector2 (Lisp_Object, Lisp_Object);
 Lisp_Object vector3 (Lisp_Object, Lisp_Object, Lisp_Object);
-Lisp_Object make_bit_vector (EMACS_INT, Lisp_Object);
-Lisp_Object make_bit_vector_from_byte_vector (unsigned char *, EMACS_INT);
+Lisp_Object make_bit_vector (size_t, Lisp_Object);
+Lisp_Object make_bit_vector_from_byte_vector (unsigned char *, size_t);
 Lisp_Object noseeum_make_marker (void);
 void garbage_collect_1 (void);
 Lisp_Object acons (Lisp_Object, Lisp_Object, Lisp_Object);
       CHECK_STRING (object);
       get_string_range_byte (object, start, end, &bstart, &bend,
 			     GB_HISTORICAL_STRING_BEHAVIOR);
-      instream = make_lisp_string_input_stream (object, bstart, bend);
+      instream = make_lisp_string_input_stream (object, bstart, bend - bstart);
     }
   GCPRO1 (instream);
 

File src/menubar-msw.c

   Lisp_Object data, fn, arg, frame;
   struct gcpro gcpro1;
 
+  if (NILP (current_hash_table))
+    return Qnil;
+
   data = Fgethash (make_int (id), current_hash_table, Qunbound);
+
   if (UNBOUNDP (data))
     {
       menu_cleanup (f);

File src/opaque.h

 void free_opaque_ptr (Lisp_Object ptr);
 
 #define OPAQUE_SIZE(op) XINT ((op)->size_or_chain)
-#define OPAQUE_DATA(op) ((op)->data)
+#define OPAQUE_DATA(op) ((void *) ((op)->data))
 #define OPAQUE_MARKFUN(op) ((op)->markfun)
 #define XOPAQUE_SIZE(op) OPAQUE_SIZE (XOPAQUE (op))
 #define XOPAQUE_DATA(op) OPAQUE_DATA (XOPAQUE (op))

File src/s/windowsnt.h

 #define putw      _putw
 #define umask     _umask
 /* #define utime     _utime */
-#define index     strchr
-#define rindex    strrchr
+/* #define index     strchr */
+/* #define rindex    strrchr */
 #define read	  _read
 #define write	  _write
 #define getcwd    _getcwd

File src/sysdep.c

   }
 #endif
 
+#ifdef F_SETFL
   fcntl (fd, F_SETFL, O_NONBLOCK);
+#endif
 }
 
 #if defined (NO_SUBPROCESSES)

File tests/automated/byte-compiler-tests.el

-;; Copyright (C) 1998 Free Software Foundation, Inc.
-
-;; Author: Martin Buchholz <martin@xemacs.org>
-;; Maintainer: Martin Buchholz <martin@xemacs.org>
-;; Created: 1998
-;; Keywords: tests
-
-;; This file is part of XEmacs.
-
-;; XEmacs is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; XEmacs is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with XEmacs; see the file COPYING.  If not, write to the Free
-;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-;; 02111-1307, USA.
-
-;;; Synched up with: not in FSF Emacs.
-
-;;; Commentary:
-
-;;; Test byte-compiler functionality
-;;; See test-harness.el
-
-(condition-case err
-    (require 'test-harness)
-  (file-error
-   (when (and (boundp 'load-file-name) (stringp load-file-name))
-     (push (file-name-directory load-file-name) load-path)
-     (require 'test-harness))))
-
-(require 'bytecomp)
-
-;; test constant symbol warnings
-(defmacro check-byte-compiler-message (message-regexp &rest body)
-  `(Check-Message ,message-regexp (byte-compile '(lambda () ,@body))))
-
-(check-byte-compiler-message "Attempt to set non-symbol" (setq 1 1))
-(check-byte-compiler-message "Attempt to set constant symbol" (setq t 1))
-(check-byte-compiler-message "Attempt to set constant symbol" (setq nil 1))
-(check-byte-compiler-message "^$" (defconst :foo 1))
-
-(check-byte-compiler-message "Attempt to let-bind non-symbol" (let ((1 'x)) 1))
-(check-byte-compiler-message "Attempt to let-bind constant symbol" (let ((t 'x)) (foo)))
-(check-byte-compiler-message "Attempt to let-bind constant symbol" (let ((nil 'x)) (foo)))
-(check-byte-compiler-message "Attempt to let-bind constant symbol" (let ((:foo 'x)) (foo)))
-
-
-(check-byte-compiler-message "bound but not referenced" (let ((foo 'x)) 1))
-(Assert (not (boundp 'free-variable)))
-(Assert (boundp 'byte-compile-warnings))
-(check-byte-compiler-message "assignment to free variable" (setq free-variable 1))
-(check-byte-compiler-message "reference to free variable" (car free-variable))
-(check-byte-compiler-message "called with 2 args, but requires 1" (car 'x 'y))
-
-(check-byte-compiler-message "^$" (setq :foo 1))
-(let ((fun '(lambda () (setq :foo 1))))
-  (fset 'test-byte-compiler-fun fun))
-(Check-Error setting-constant (test-byte-compiler-fun))
-(byte-compile 'test-byte-compiler-fun)
-(Check-Error setting-constant (test-byte-compiler-fun))
-
-(eval-when-compile (defvar setq-test-foo nil) (defvar setq-test-bar nil))
-(progn
-  (check-byte-compiler-message "set called with 1 arg, but requires 2" (setq setq-test-foo))
-  (check-byte-compiler-message "set called with 1 arg, but requires 2" (setq setq-test-foo 1 setq-test-bar))
-  (check-byte-compiler-message "set-default called with 1 arg, but requires 2" (setq-default setq-test-foo))
-  (check-byte-compiler-message "set-default called with 1 arg, but requires 2" (setq-default setq-test-foo 1 setq-test-bar))
-  )
-
-;;-----------------------------------------------------
-;; let, let*
-;;-----------------------------------------------------
-
-;; Test interpreted and compiled lisp separately here
-(check-byte-compiler-message "malformed let binding" (let  ((x 1 2)) 3))
-(check-byte-compiler-message "malformed let binding" (let* ((x 1 2)) 3))
-
-(Check-Error-Message
- error "`let' bindings can have only one value-form"
- (eval '(let ((x 1 2)) 3)))
-
-(Check-Error-Message
- error "`let' bindings can have only one value-form"
- (eval '(let* ((x 1 2)) 3)))
-

File tests/automated/database-tests.el

-;; Copyright (C) 1998 Free Software Foundation, Inc.
-
-;; Author: Martin Buchholz <martin@xemacs.org>
-;; Maintainer: Martin Buchholz <martin@xemacs.org>
-;; Created: 1998
-;; Keywords: tests, database
-
-;; This file is part of XEmacs.
-
-;; XEmacs is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; XEmacs is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with XEmacs; see the file COPYING.  If not, write to the Free
-;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-;; 02111-1307, USA.
-
-;;; Synched up with: not in FSF Emacs.
-
-;;; Commentary:
-
-;;; Test database functionality
-;;; See test-harness.el
-
-(condition-case err
-    (require 'test-harness)
-  (file-error
-   (when (and (boundp 'load-file-name) (stringp load-file-name))
-     (push (file-name-directory load-file-name) load-path)
-     (require 'test-harness))))
-
-(flet ((test-database
-	(db)
-	(Assert (databasep db))
-	(put-database "key1" "val1" db)
-	(Assert (equal "val1" (get-database "key1" db)))
-	(remove-database "key1" db)
-	(Assert (equal nil (get-database "key1" db)))
-	(close-database db)
-	(Assert (not (database-live-p db)))
-	(Assert (databasep db))
-	(let ((filename (database-file-name db)))
-	  (dolist (fn (list filename (concat filename ".db")))
-	    (condition-case nil (delete-file fn) (file-error nil))))))
-
-  (let ((filename (expand-file-name "test-harness" (temp-directory))))
-
-    (dolist (fn (list filename (concat filename ".db")))
-      (condition-case nil (delete-file fn) (file-error nil)))
-
-    (dolist (db-type `(dbm berkeley-db))
-      (when (featurep db-type)
-	(princ "\n")
-	(test-database (open-database filename db-type))))
-    ))

File tests/automated/hash-table-tests.el

-;; Copyright (C) 1998 Free Software Foundation, Inc.
-
-;; Author: Martin Buchholz <martin@xemacs.org>
-;; Maintainer: Martin Buchholz <martin@xemacs.org>
-;; Created: 1998
-;; Keywords: tests, database
-
-;; This file is part of XEmacs.
-
-;; XEmacs is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; XEmacs is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with XEmacs; see the file COPYING.  If not, write to the Free
-;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-;; 02111-1307, USA.
-
-;;; Synched up with: not in FSF Emacs.
-
-;;; Commentary:
-
-;;; Test database functionality
-;;; See test-harness.el
-
-(condition-case err
-    (require 'test-harness)
-  (file-error
-   (when (and (boundp 'load-file-name) (stringp load-file-name))
-     (push (file-name-directory load-file-name) load-path)
-     (require 'test-harness))))
-
-;; Test all combinations of make-hash-table keywords
-(dolist (type `(non-weak weak key-weak value-weak))
-  (dolist (test `(eq eql equal))
-    (dolist (size `(0 1 100))
-      (dolist (rehash-size `(1.1 9.9))
-	(dolist (rehash-threshold `(0.2 .9))
-	  (dolist (data `(() (1 2) (1 2 3 4)))
-	    (let ((ht (make-hash-table :test test
-				       :type type
-				       :size size
-				       :rehash-size rehash-size
-				       :rehash-threshold rehash-threshold)))
-	      (Assert (equal ht (car (let ((print-readably t))
-				       (read-from-string (prin1-to-string ht))))))
-	      (Assert (eq test (hash-table-test ht)))
-	      (Assert (eq type (hash-table-type ht)))
-	      (Assert (<= size (hash-table-size ht)))
-	      (Assert (eql rehash-size (hash-table-rehash-size ht)))
-	      (Assert (eql rehash-threshold (hash-table-rehash-threshold ht))))))))))
-
-(loop for (fun type) in `((make-hashtable non-weak)
-			  (make-weak-hashtable weak)
-			  (make-key-weak-hashtable key-weak)
-			  (make-value-weak-hashtable value-weak))
-  do (Assert (eq type (hash-table-type (funcall fun 10)))))
-
-(let ((ht (make-hash-table :size 20 :rehash-threshold .75 :test 'eq))
-      (size 80))
-  (Assert (hashtablep ht))
-  (Assert (hash-table-p ht))
-  (Assert (eq 'eq (hash-table-test ht)))
-  (Assert (eq 'non-weak (hash-table-type ht)))
-  (Assert (eq 'non-weak (hashtable-type ht)))
-  (dotimes (j size)
-    (puthash j (- j) ht)
-    (Assert (eq (gethash j ht) (- j)))
-    (Assert (= (hash-table-count ht) (1+ j)))
-    (Assert (= (hashtable-fullness ht) (hash-table-count ht)))
-    (puthash j j ht)
-    (Assert (eq (gethash j ht 'foo) j))
-    (Assert (= (hash-table-count ht) (1+ j)))
-    (setf (gethash j ht) (- j))
-    (Assert (eq (gethash j ht) (- j)))
-    (Assert (= (hash-table-count ht) (1+ j))))
-
-  (clrhash ht)
-  (Assert (= 0 (hash-table-count ht)))
-
-  (dotimes (j size)
-    (puthash j (- j) ht)
-    (Assert (eq (gethash j ht) (- j)))
-    (Assert (= (hash-table-count ht) (1+ j))))
-
-  (let ((k-sum 0) (v-sum 0))
-    (maphash #'(lambda (k v) (incf k-sum k) (incf v-sum v)) ht)
-    (print k-sum)
-    (print v-sum)
-    (Assert (= k-sum (/ (* size (- size 1)) 2)))
-    (Assert (= v-sum (- k-sum))))
-
-  (let ((count size))
-    (dotimes (j size)
-      (remhash j ht)
-      (Assert (eq (gethash j ht) nil))
-      (Assert (eq (gethash j ht 'foo) 'foo))
-      (Assert (= (hash-table-count ht) (decf count))))))
-
-(let ((ht (make-hash-table :size 30 :rehash-threshold .25 :test 'equal))
-      (size 70))
-  (Assert (hashtablep ht))
-  (Assert (hash-table-p ht))
-  (Assert (>= (hash-table-size ht) (/ 30 .25)))
-  (Assert (eql .25 (hash-table-rehash-threshold ht)))
-  (Assert (eq 'equal (hash-table-test ht)))
-  (Assert (eq (hash-table-test ht) (hashtable-test-function ht)))
-  (Assert (eq 'non-weak (hash-table-type ht)))
-  (dotimes (j size)
-    (puthash (int-to-string j) (- j) ht)
-    (Assert (eq (gethash (int-to-string j) ht) (- j)))
-    (Assert (= (hash-table-count ht) (1+ j)))
-    (puthash (int-to-string j) j ht)
-    (Assert (eq (gethash (int-to-string j) ht 'foo) j))
-    (Assert (= (hash-table-count ht) (1+ j))))
-
-  (clrhash ht)
-  (Assert (= 0 (hash-table-count ht)))
-  (Assert (equal ht (copy-hash-table ht)))
-
-  (dotimes (j size)
-    (setf (gethash (int-to-string j) ht) (- j))
-    (Assert (eq (gethash (int-to-string j) ht) (- j)))
-    (Assert (= (hash-table-count ht) (1+ j))))
-
-  (let ((count size))
-    (dotimes (j size)
-      (remhash (int-to-string j) ht)
-      (Assert (eq (gethash (int-to-string j) ht) nil))
-      (Assert (eq (gethash (int-to-string j) ht 'foo) 'foo))
-      (Assert (= (hash-table-count ht) (decf count))))))
-
-(let ((iterations 5) (one 1.0) (two 2.0))
-  (flet ((check-copy
-	  (ht)
-	  (let ((copy-of-ht (copy-hash-table ht)))
-	    (Assert (equal ht copy-of-ht))
-	    (Assert (not (eq ht copy-of-ht)))
-	    (Assert (eq  (hash-table-count ht) (hash-table-count copy-of-ht)))
-	    (Assert (eq  (hash-table-type  ht) (hash-table-type  copy-of-ht)))
-	    (Assert (eq  (hash-table-size  ht) (hash-table-size  copy-of-ht)))
-	    (Assert (eql (hash-table-rehash-size ht) (hash-table-rehash-size copy-of-ht)))
-	    (Assert (eql (hash-table-rehash-threshold ht) (hash-table-rehash-threshold copy-of-ht))))))
-
-  (let ((ht (make-hash-table :size 100 :rehash-threshold .6 :test 'eq)))
-    (dotimes (j iterations)
-      (puthash (+ one 0.0) t ht)
-      (puthash (+ two 0.0) t ht)
-      (puthash (concat "1" "2") t ht)
-      (puthash (concat "3" "4") t ht))
-    (Assert (eq (hashtable-test-function ht) 'eq))
-    (Assert (eq (hash-table-test ht) 'eq))
-    (Assert (= (* iterations 4) (hash-table-count ht)))
-    (Assert (eq nil (gethash 1.0 ht)))
-    (Assert (eq nil (gethash "12" ht)))
-    (check-copy ht)
-    )
-
-  (let ((ht (make-hash-table :size 100 :rehash-threshold .6 :test 'eql)))
-    (dotimes (j iterations)
-      (puthash (+ one 0.0) t ht)
-      (puthash (+ two 0.0) t ht)
-      (puthash (concat "1" "2") t ht)
-      (puthash (concat "3" "4") t ht))
-    (Assert (eq (hashtable-test-function ht) 'eql))
-    (Assert (eq (hash-table-test ht) 'eql))
-    (Assert (= (+ 2 (* 2 iterations)) (hash-table-count ht)))
-    (Assert (eq t (gethash 1.0 ht)))
-    (Assert (eq nil (gethash "12" ht)))
-    (check-copy ht)
-    )
-
-  (let ((ht (make-hash-table :size 100 :rehash-threshold .6 :test 'equal)))
-    (dotimes (j iterations)
-      (puthash (+ one 0.0) t ht)
-      (puthash (+ two 0.0) t ht)
-      (puthash (concat "1" "2") t ht)
-      (puthash (concat "3" "4") t ht))
-    (Assert (eq (hashtable-test-function ht) 'equal))
-    (Assert (eq (hash-table-test ht) 'equal))
-    (Assert (= 4 (hash-table-count ht)))
-    (Assert (eq t (gethash 1.0 ht)))
-    (Assert (eq t (gethash "12" ht)))
-    (check-copy ht)
-    )
-
-  ))
-
-;; Test that weak hash-tables are properly handled
-(loop for (type expected-count expected-k-sum expected-v-sum) in
-  `((non-weak 6 38 25)
-    (weak 3 6 9)
-    (key-weak 4 38 9)
-    (value-weak 4 6 25))
-  do
-  (let* ((ht (make-hash-table :type type))
-       (my-obj (cons ht ht)))
-  (garbage-collect)
-  (puthash my-obj 1 ht)
-  (puthash 2 my-obj ht)
-  (puthash 4 8 ht)
-  (puthash (cons ht ht) 16 ht)
-  (puthash 32 (cons ht ht) ht)
-  (puthash (cons ht ht) (cons ht ht) ht)
-  (let ((k-sum 0) (v-sum 0))
-    (maphash #'(lambda (k v)
-		 (when (integerp k) (incf k-sum k))
-		 (when (integerp v) (incf v-sum v)))
-	     ht)
-    (Assert (eq 38 k-sum))
-    (Assert (eq 25 v-sum)))
-  (Assert (eq 6 (hash-table-count ht)))
-  (garbage-collect)
-  (Assert (eq expected-count (hash-table-count ht)))
-  (let ((k-sum 0) (v-sum 0))
-    (maphash #'(lambda (k v)
-		 (when (integerp k) (incf k-sum k))
-		 (when (integerp v) (incf v-sum v)))
-	     ht)
-    (Assert (eq expected-k-sum k-sum))
-    (Assert (eq expected-v-sum v-sum)))))
-
-;;; Test the ability to puthash and remhash the current elt of a maphash
-(let ((ht (make-hash-table :test 'eql)))
-  (dotimes (j 100) (setf (gethash j ht) (- j)))
-  (maphash #'(lambda (k v)
-	       (if (oddp k) (remhash k ht) (puthash k (- v) ht)))
-	   ht)
-  (let ((k-sum 0) (v-sum 0))
-    (maphash #'(lambda (k v) (incf k-sum k) (incf v-sum v)) ht)
-    (Assert (= (* 50 49) k-sum))
-    (Assert (= v-sum k-sum))))
-
-;;; Test reading and printing of hash-table objects
-(let ((h1 #s(hashtable  type weak rehash-size 3.0 rehash-threshold .2 test eq data (1 2 3 4)))
-      (h2 #s(hash-table type weak rehash-size 3.0 rehash-threshold .2 test eq data (1 2 3 4)))
-      (h3 (make-hash-table :type 'weak :rehash-size 3.0 :rehash-threshold .2 :test 'eq)))
-  (Assert (equal h1 h2))
-  (Assert (not (equal h1 h3)))
-  (puthash 1 2 h3)
-  (puthash 3 4 h3)
-  (Assert (equal h1 h3)))
-
-;;; Testing equality of hash tables
-(Assert (equal (make-hash-table :test 'eql :size 300 :rehash-threshold .9 :rehash-size 3.0)
-	       (make-hash-table :test 'eql)))
-(Assert (not (equal (make-hash-table :test 'eq)
-		    (make-hash-table :test 'equal))))
-(let ((h1 (make-hash-table))
-      (h2 (make-hash-table)))
-  (Assert (equal h1 h2))
-  (Assert (not (eq h1 h2)))
-  (puthash 1 2 h1)
-  (Assert (not (equal h1 h2)))
-  (puthash 1 2 h2)
-  (Assert (equal h1 h2))
-  (puthash 1 3 h2)
-  (Assert (not (equal h1 h2)))
-  (clrhash h1)
-  (Assert (not (equal h1 h2)))
-  (clrhash h2)
-  (Assert (equal h1 h2))
-  )

File tests/automated/lisp-tests.el

-;; Copyright (C) 1998 Free Software Foundation, Inc.
-
-;; Author: Martin Buchholz <martin@xemacs.org>
-;; Maintainer: Martin Buchholz <martin@xemacs.org>
-;; Created: 1998
-;; Keywords: tests
-
-;; This file is part of XEmacs.
-
-;; XEmacs is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; XEmacs is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with XEmacs; see the file COPYING.  If not, write to the Free
-;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-;; 02111-1307, USA.
-
-;;; Synched up with: not in FSF Emacs.
-
-;;; Commentary:
-
-;;; Test basic Lisp engine functionality
-;;; See test-harness.el for instructions on how to run these tests.
-
-(eval-when-compile
-  (condition-case nil
-      (require 'test-harness)
-    (file-error
-     (push "." load-path)
-     (when (and (boundp 'load-file-name) (stringp load-file-name))
-       (push (file-name-directory load-file-name) load-path))
-     (require 'test-harness))))
-
-(Check-Error wrong-number-of-arguments (setq setq-test-foo))
-(Check-Error wrong-number-of-arguments (setq setq-test-foo 1 setq-test-bar))
-(Check-Error wrong-number-of-arguments (setq-default setq-test-foo))
-(Check-Error wrong-number-of-arguments (setq-default setq-test-foo 1 setq-test-bar))
-(Assert (eq (setq)         nil))
-(Assert (eq (setq-default) nil))
-(Assert (eq (setq         setq-test-foo 42) 42))
-(Assert (eq (setq-default setq-test-foo 42) 42))
-(Assert (eq (setq         setq-test-foo 42 setq-test-bar 99) 99))
-(Assert (eq (setq-default setq-test-foo 42 setq-test-bar 99) 99))
-
-(macrolet ((test-setq (expected-result &rest body)
-		      `(progn
-			 (defun test-setq-fun () ,@body)
-			 (Assert (eq ,expected-result (test-setq-fun)))
-			 (byte-compile 'test-setq-fun)
-			 (Assert (eq ,expected-result (test-setq-fun))))))
-  (test-setq nil (setq))
-  (test-setq nil (setq-default))
-  (test-setq 42  (setq         test-setq-var 42))
-  (test-setq 42  (setq-default test-setq-var 42))
-  (test-setq 42  (setq         test-setq-bar 99 test-setq-var 42))
-  (test-setq 42  (setq-default test-setq-bar 99 test-setq-var 42))
-  )
-
-(let ((my-vector [1 2 3 4])
-      (my-bit-vector (bit-vector 1 0 1 0))
-      (my-string "1234")
-      (my-list '(1 2 3 4)))
-
-  ;;(Assert (fooooo)) ;; Generate Other failure
-  ;;(Assert (eq 1 2)) ;; Generate Assertion failure
-
-  (dolist (sequence (list my-vector my-bit-vector my-string my-list))
-    (Assert (sequencep sequence))
-    (Assert (eq 4 (length sequence))))
-
-  (dolist (array (list my-vector my-bit-vector my-string))
-    (Assert (arrayp array)))
-
-  (Assert (eq (elt my-vector 0) 1))
-  (Assert (eq (elt my-bit-vector 0) 1))
-  (Assert (eq (elt my-string 0) ?1))
-  (Assert (eq (elt my-list 0) 1))
-
-  (fillarray my-vector 5)
-  (fillarray my-bit-vector 1)
-  (fillarray my-string ?5)
-
-  (dolist (array (list my-vector my-bit-vector))
-    (Assert (eq 4 (length array))))
-
-  (Assert (eq (elt my-vector 0) 5))
-  (Assert (eq (elt my-bit-vector 0) 1))
-  (Assert (eq (elt my-string 0) ?5))
-
-  (Assert (eq (elt my-vector 3) 5))
-  (Assert (eq (elt my-bit-vector 3) 1))
-  (Assert (eq (elt my-string 3) ?5))
-
-  (fillarray my-bit-vector 0)
-  (Assert (eq 4 (length my-bit-vector)))
-  (Assert (eq (elt my-bit-vector 2) 0))
-  )
-
-(defun make-circular-list (length)
-  "Create evil emacs-crashing circular list of length LENGTH"
-  (let ((circular-list
-	 (make-list
-	  length
-	  'you-are-trapped-in-a-twisty-maze-of-cons-cells-all-alike)))
-    (setcdr (last circular-list) circular-list)
-    circular-list))
-
-;;-----------------------------------------------------
-;; Test `nconc'
-;;-----------------------------------------------------
-(defun make-list-012 () (list 0 1 2))
-
-(Check-Error wrong-type-argument (nconc 'foo nil))
-
-(dolist (length `(1 2 3 4 1000 2000))
-  (Check-Error circular-list (nconc (make-circular-list length) 'foo))
-  (Check-Error circular-list (nconc '(1 . 2) (make-circular-list length) 'foo))
-  (Check-Error circular-list (nconc '(1 . 2) '(3 . 4) (make-circular-