This commit was generated by cvs2svn to compensate for changes in r101,
authortomo <tomo>
Mon, 17 May 1999 09:42:33 +0000 (09:42 +0000)
committertomo <tomo>
Mon, 17 May 1999 09:42:33 +0000 (09:42 +0000)
which included commits to RCS files with non-trunk default branches.

29 files changed:
lib-src/ChangeLog
lib-src/fakemail.c
lisp/alist.el
lisp/cus-dep.el
lisp/cus-edit.el
lisp/menubar-items.el
lisp/package-get.el
lisp/simple.el
lisp/x-faces.el
lwlib/ChangeLog
man/ChangeLog
nt/ChangeLog
nt/xemacs.mak
src/EmacsShell.c
src/balloon_help.c
src/console-stream.h
src/dired.c
src/event-unixoid.c
src/frame-x.c
src/free-hook.c
src/glyphs-msw.c
src/glyphs.h
src/menubar-msw.c
src/opaque.c
src/print.c
src/sound.c
src/sysdep.c
src/systime.h
tests/ChangeLog

index 90677dc..d14d7b0 100644 (file)
@@ -1,3 +1,19 @@
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+       * XEmacs 21.2.13 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.2.12 is released
index 22cb1ab..1241fef 100644 (file)
@@ -24,9 +24,9 @@ Boston, MA 02111-1307, USA.  */
 #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;
 }
@@ -34,7 +34,7 @@ main ()
 #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
@@ -48,7 +48,7 @@ main ()
 #else /* not BSD 4.2 (or newer) */
 #ifdef MSDOS
 int
-main ()
+main (int argc, char *argv[])
 {
   return 0;
 }
@@ -100,11 +100,11 @@ struct header_record
   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;
@@ -191,8 +191,7 @@ fatal (CONST char *s1, CONST char *s2)
 /* 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))
@@ -201,9 +200,7 @@ xmalloc (size)
 }
 
 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))
@@ -221,7 +218,7 @@ init_linebuffer (struct linebuffer *linebuffer)
 }
 
 /* Read a line of text from `stream' into `linebuffer'.
- * Return the length of the line.  
+ * Return the length of the line.
  */
 
 static long
@@ -263,14 +260,17 @@ get_keyword (register char *field, char **rest)
 
   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];
 }
@@ -371,7 +371,7 @@ close_the_streams (void)
 }
 
 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 ();
@@ -553,7 +553,7 @@ parse_header (header the_header, register char *where)
   *where = '\0';
   return;
 }
-\f    
+\f
 static header
 read_header (void)
 {
@@ -624,9 +624,7 @@ write_header (header the_header)
 }
 \f
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char *argv[])
 {
   char *command_line;
   header the_header;
@@ -655,7 +653,7 @@ main (argc, argv)
                                         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);
index 4a1fd3a..fbd409a 100644 (file)
@@ -1,13 +1,11 @@
-;;; 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 0.0 1997/02/28 02:18:23 tmorioka 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
@@ -26,6 +24,7 @@
 
 ;;; 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.
@@ -40,6 +39,7 @@ return new alist whose car is the new pair and cdr is ALIST.
       (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]"
@@ -59,6 +59,7 @@ return new alist whose car is the new pair and cdr is ALIST.
          )
        alist))))
 
+;;;###autoload
 (defun set-alist (symbol item value)
   "Modify a alist indicated by SYMBOL to set VALUE to ITEM."
   (or (boundp symbol)
@@ -67,12 +68,14 @@ return new alist whose car is the new pair and cdr is ALIST.
   (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
@@ -82,6 +85,7 @@ return new alist whose car is the new pair and cdr is ALIST.
          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,
index 8dab0cf..8a05073 100644 (file)
@@ -173,7 +173,7 @@ Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS"
                           (if found
                               (insert " ")
                             (insert "(custom-add-loads '"
-                                    (symbol-name sym) " '("))
+                                    (prin1-to-string sym) " '("))
                           (prin1 where (current-buffer))
                           (push where found)))
                       (when found
index f7ebcea..339f262 100644 (file)
@@ -3017,7 +3017,7 @@ Leave point at the location of the call, or after the last expression."
                                           (not (get symbol 'force-value)))))))
                    (when value
                      (princ "\n '(")
-                     (princ symbol)
+                     (prin1 symbol)
                      (princ " ")
                      (prin1 (car value))
                      (cond (requests
@@ -3058,7 +3058,7 @@ Leave point at the location of the call, or after the last expression."
                               ;; Don't print default face here.
                               value)
                      (princ "\n '(")
-                     (princ symbol)
+                     (prin1 symbol)
                      (princ " ")
                      (prin1 value)
                      (if (or (get symbol 'face-defface-spec)
index 1d400ab..0b95009 100644 (file)
                   (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")])
 
       "---"
@@ -1491,10 +1497,18 @@ The menu is computed by combining `global-popup-menu' and `mode-popup-menu'."
 (defun xemacs-splash-buffer ()
   "Redisplay XEmacs splash screen in a buffer."
   (interactive)
-  (let ((buffer (get-buffer-create "*Splash*")))
+  (let ((buffer (get-buffer-create "*Splash*"))
+       tmout)
     (set-buffer buffer)
+    (setq buffer-read-only t)
     (erase-buffer buffer)
-    (startup-splash-frame)
+    (setq tmout (display-splash-frame))
+    (when tmout
+      (make-local-hook 'kill-buffer-hook)
+      (add-hook 'kill-buffer-hook
+               `(lambda ()
+                  (disable-timeout ,tmout))
+               nil t))
     (pop-to-buffer buffer)
     (delete-other-windows)))
 
index 149f531..64bdc3e 100644 (file)
   "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
@@ -1015,8 +1016,6 @@ lead to Emacs accessing remote sites."
   "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))
@@ -1041,7 +1040,7 @@ lead to Emacs accessing remote sites."
          (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")
index 74daf55..8a78f9d 100644 (file)
@@ -433,7 +433,7 @@ and KILLP is t if a prefix arg was specified."
   (and overwrite-mode (not (eolp))
        (save-excursion (insert-char ?\  arg))))
 
-(defcustom delete-key-deletes-forward t
+(defcustom delete-key-deletes-forward nil
   "*If non-nil, the DEL key will erase one character forwards.
 If nil, the DEL key will erase one character backwards."
   :type 'boolean
index 74c1d35..123fcc0 100644 (file)
@@ -602,12 +602,12 @@ Otherwise, it returns the next larger version of this font that is defined."
 (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.
index c3c759d..039d6e1 100644 (file)
@@ -1,3 +1,7 @@
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+       * XEmacs 21.2.13 is released
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
        * XEmacs 21.2.12 is released
index 0cf6243..638ad5d 100644 (file)
@@ -1,3 +1,7 @@
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+       * XEmacs 21.2.13 is released
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
        * XEmacs 21.2.12 is released
index ea9011f..f8c7e75 100644 (file)
@@ -1,3 +1,25 @@
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+       * XEmacs 21.2.13 is released
+
+1999-03-07  Jonathan Harris  <jhar@tardis.ed.ac.uk>
+
+       * xemacs.mak:
+         Don't link lib-src programs incrementally.
+         Don't include debug info in release builds.
+         Put intermediate files in the appropriate directories.
+         Make "distclean" target delete all intermediate files.
+
+1999-03-07  Jonathan Harris  <jhar@tardis.ed.ac.uk>
+
+       * xemacs.mak:
+         Fix building on Windows 95/98 by conditionalising escape
+         character '^'.
+         Only put mule-packages in package path on MULE builds.
+         Only build source browser files on debug builds.
+         Build source browser database before link so that it's
+         available even if link fails.
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
        * XEmacs 21.2.12 is released
index fe7f4dd..c11dc15 100644 (file)
 # Synched up with: Not in FSF.
 #
 
+# Shell escape character. Used for escaping ', ` and " in commands.
+ESC=^
+
 XEMACS=..
 LISP=$(XEMACS)\lisp
 MODULES=$(XEMACS)\modules
 NT=$(XEMACS)\nt
+OUTDIR=$(NT)\obj
 
 # Program name and version
 
@@ -66,11 +70,18 @@ INSTALL_DIR=c:\Program Files\Infodock\Infodock-$(INFODOCK_VERSION_STRING)
 INSTALL_DIR=c:\Program Files\XEmacs\XEmacs-$(XEMACS_VERSION_STRING)
 ! endif
 !endif
+!if !defined(HAVE_MULE)
+HAVE_MULE=0
+!endif
 !if !defined(PACKAGE_PATH)
 ! if !defined(PACKAGE_PREFIX)
 PACKAGE_PREFIX=c:\Program Files\XEmacs
 ! endif
+! if $(HAVE_MULE)
 PACKAGE_PATH=~\.xemacs;;$(PACKAGE_PREFIX)\site-packages;$(PACKAGE_PREFIX)\mule-packages;$(PACKAGE_PREFIX)\xemacs-packages
+! else
+PACKAGE_PATH=~\.xemacs;;$(PACKAGE_PREFIX)\site-packages;$(PACKAGE_PREFIX)\xemacs-packages
+! endif
 !endif
 PATH_PACKAGEPATH="$(PACKAGE_PATH:\=\\)"
 !if !defined(HAVE_MSW)
@@ -79,9 +90,6 @@ HAVE_MSW=1
 !if !defined(HAVE_X)
 HAVE_X=0
 !endif
-!if !defined(HAVE_MULE)
-HAVE_MULE=0
-!endif
 !if !defined(HAVE_XPM)
 HAVE_XPM=0
 !endif
@@ -128,7 +136,10 @@ USE_INDEXED_LRECORD_IMPLEMENTATION=0
 #
 # System configuration
 #
-!if !defined(PROCESSOR_ARCHITECTURE) && "$(OS)" != "Windows_NT"
+!if !defined(OS)
+OS=Windows_95/98
+# command.com doesn't like or need '^' as an escape character
+ESC=
 EMACS_CONFIGURATION=i586-pc-win32
 !else if "$(PROCESSOR_ARCHITECTURE)" == "x86"
 EMACS_CONFIGURATION=i586-pc-win32
@@ -211,7 +222,7 @@ CONFIG_ERROR=1
 CONFIG_ERROR=1
 !endif
 !if $(HAVE_MSW) && $(HAVE_TOOLBARS) && !$(HAVE_XPM)
-!error Toolbars require XPM support
+!message Toolbars require XPM support
 CONFIG_ERROR=1
 !endif
 !if $(CONFIG_ERROR)
@@ -314,7 +325,7 @@ CCV=@$(CC)
 !if $(DEBUG_XEMACS)
 OPT=-Od -Zi
 !else
-OPT=-O2 -G5 -Zi
+OPT=-O2 -G5
 !endif
 
 CFLAGS=-nologo -W3 $(OPT)
@@ -386,7 +397,7 @@ MULE_DEFINES=-DMULE
 
 !if $(DEBUG_XEMACS)
 DEBUG_DEFINES=-DDEBUG_XEMACS -D_DEBUG 
-DEBUG_FLAGS= -debugtype:both -debug:full
+DEBUG_FLAGS=-debug:full
 !endif
 
 !if $(USE_MINIMAL_TAGBITS)
@@ -418,8 +429,6 @@ DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) \
        -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN -DWINDOWSNT -Demacs \
        -DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES)
 
-OUTDIR=obj
-
 #
 # Creating simplified versions of Installation and Installation.el
 #
@@ -429,7 +438,7 @@ OUTDIR=obj
 # 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 XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename:"=\") configured for $(ESC)`$(EMACS_CONFIGURATION)$(ESC)'.>>Installation] ||\
 [echo Where should the build process find the source code?>>Installation] ||\
 [echo $(MAKEDIR:\=\\)>>Installation]
 !endif
@@ -449,15 +458,11 @@ OUTDIR=obj
 !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] ||\
+[echo (setq Installation-string $(ESC)">Installation.el] ||\
 [type Installation >>Installation.el] ||\
-[echo ^")>>Installation.el]
+[echo $(ESC)")>>Installation.el]
 !endif
 
 
@@ -500,17 +505,17 @@ 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)]
+!if [echo blddir>>$(CONFIG_VALUES) && echo $(ESC)"$(MAKEDIR:\=\\)\\..$(ESC)">>$(CONFIG_VALUES)]
 !endif
-!if [echo CC>>$(CONFIG_VALUES) && echo ^"$(CC:\=\\)^">>$(CONFIG_VALUES)]
+!if [echo CC>>$(CONFIG_VALUES) && echo $(ESC)"$(CC:\=\\)$(ESC)">>$(CONFIG_VALUES)]
 !endif
-!if [echo CFLAGS>>$(CONFIG_VALUES) && echo ^"$(CFLAGS:\=\\)^">>$(CONFIG_VALUES)]
+!if [echo CFLAGS>>$(CONFIG_VALUES) && echo $(ESC)"$(CFLAGS:\=\\)$(ESC)">>$(CONFIG_VALUES)]
 !endif
-!if [echo CPP>>$(CONFIG_VALUES) && echo ^"$(CPP:\=\\)^">>$(CONFIG_VALUES)]
+!if [echo CPP>>$(CONFIG_VALUES) && echo $(ESC)"$(CPP:\=\\)$(ESC)">>$(CONFIG_VALUES)]
 !endif
-!if [echo CPPFLAGS>>$(CONFIG_VALUES) && echo ^"$(CPPFLAGS:\=\\)^">>$(CONFIG_VALUES)]
+!if [echo CPPFLAGS>>$(CONFIG_VALUES) && echo $(ESC)"$(CPPFLAGS:\=\\)$(ESC)">>$(CONFIG_VALUES)]
 !endif
-!if [echo LISPDIR>>$(CONFIG_VALUES) && echo ^"$(MAKEDIR:\=\\)\\$(LISP:\=\\)^">>$(CONFIG_VALUES)]
+!if [echo LISPDIR>>$(CONFIG_VALUES) && echo $(ESC)"$(MAKEDIR:\=\\)\\$(LISP:\=\\)$(ESC)">>$(CONFIG_VALUES)]
 !endif
 # PATH_PACKAGEPATH is already a quoted string.
 !if [echo PACKAGE_PATH>>$(CONFIG_VALUES) && echo $(PATH_PACKAGEPATH)>>$(CONFIG_VALUES)]
@@ -519,7 +524,7 @@ CONFIG_VALUES = $(LIB_SRC)\config.values
 # Inferred rule
 {$(LIB_SRC)}.c{$(LIB_SRC)}.exe :
        @cd $(LIB_SRC)
-       $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $**
+       $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** -link -incremental:no
        @cd $(NT)
 
 # Individual dependencies
@@ -527,7 +532,7 @@ 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 $(LIB_SRC)/pop.c $(ETAGS_DEPS)
        @cd $(LIB_SRC)
-       $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** wsock32.lib
+       $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** wsock32.lib -link -incremental:no
        @cd $(NT)
 
 LIB_SRC_TOOLS = \
@@ -546,10 +551,10 @@ LIB_SRC_TOOLS = \
 RUNEMACS = $(XEMACS)\src\runxemacs.exe
 
 $(RUNEMACS): $(LIB_SRC)\run.c $(LIB_SRC)\run.res
-       $(CCV) -I$(LIB_SRC) -O2 -Fe$@ $** kernel32.lib user32.lib
+       $(CCV) -I$(LIB_SRC) $(CFLAGS) -Fe$@ -Fo$(LIB_SRC) -Fd$(LIB_SRC)\ $** kernel32.lib user32.lib -link -incremental:no
 
 $(LIB_SRC)\run.res: $(LIB_SRC)\run.rc
-       rc -I$(LIB_SRC) -FO$(LIB_SRC)\run.res $(LIB_SRC)\run.rc
+       rc -I$(LIB_SRC) -Fo$@ $**
 
 #------------------------------------------------------------------------------
 
@@ -557,7 +562,7 @@ $(LIB_SRC)\run.res: $(LIB_SRC)\run.rc
 
 LASTFILE=$(OUTDIR)\lastfile.lib
 LASTFILE_SRC=$(XEMACS)\src
-LASTFILE_FLAGS=$(CFLAGS) $(INCLUDES) -Fo$@ -c
+LASTFILE_FLAGS=$(CFLAGS) $(INCLUDES) -Fo$@ -Fd$* -c
 LASTFILE_OBJS= \
        $(OUTDIR)\lastfile.obj
 
@@ -589,7 +594,7 @@ LWLIB_OBJS= \
        $(OUTDIR)\xlwscrollbar.obj
 
 $(LWLIB): $(LWLIB_OBJS)
-       link.exe -lib -nologo $(DEBUG_FLAGS) -out:$@ $(LWLIB_OBJS)
+       link.exe -lib -nologo -out:$@ $(LWLIB_OBJS)
 
 $(OUTDIR)\lwlib-config.obj:    $(LWLIB_SRC)\lwlib-config.c
         $(CCV) $(LWLIB_FLAGS) $**
@@ -791,7 +796,8 @@ TEMACS_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS) -base:0x1000000\
  -stack:0x800000 -entry:_start -subsystem:console\
  -pdb:$(TEMACS_DIR)\temacs.pdb -map:$(TEMACS_DIR)\temacs.map \
  -heap:0x00100000 -out:$@
-TEMACS_CPP_FLAGS=-ML -c $(CFLAGS) $(INCLUDES) $(DEFINES) $(DEBUG_DEFINES) \
+TEMACS_CPP_FLAGS=-ML -c \
+ $(CFLAGS) $(INCLUDES) $(DEFINES) $(DEBUG_DEFINES) \
  -DEMACS_MAJOR_VERSION=$(emacs_major_version) \
  -DEMACS_MINOR_VERSION=$(emacs_minor_version) \
  $(EMACS_BETA_VERSION) \
@@ -954,7 +960,7 @@ TEMACS_OBJS= \
        $(OUTDIR)\vm-limit.obj \
        $(OUTDIR)\widget.obj \
        $(OUTDIR)\window.obj \
-       $(NT)\xemacs.res
+       $(OUTDIR)\xemacs.res
 
 # Rules
 
@@ -962,8 +968,13 @@ TEMACS_OBJS= \
 .SUFFIXES:     .c
 
 # nmake rule
+!if $(DEBUG_XEMACS)
+{$(TEMACS_SRC)}.c{$(OUTDIR)}.obj:
+       $(CCV) $(TEMACS_CPP_FLAGS) $< -Fo$@ -Fr$*.sbr -Fd$(OUTDIR)\temacs.pdb
+!else
 {$(TEMACS_SRC)}.c{$(OUTDIR)}.obj:
-       $(CCV) $(TEMACS_CPP_FLAGS) $< -Fo$@ -Fr$*.sbr
+       $(CCV) $(TEMACS_CPP_FLAGS) $< -Fo$@
+!endif
 
 $(OUTDIR)\TopLevelEmacsShell.obj:      $(TEMACS_SRC)\EmacsShell-sub.c
        $(CCV) $(TEMACS_CPP_FLAGS) -DDEFINE_TOP_LEVEL_EMACS_SHELL $** -Fo$@
@@ -980,18 +991,17 @@ $(OUTDIR)\alloc.obj: $(TEMACS_SRC)\alloc.c $(TEMACS_SRC)\puresize-adjust.h
 #      !"cd $(TEMACS_SRC); cp paths.h.in paths.h"
 
 $(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS)
+!if $(DEBUG_XEMACS)
+       @dir /b/s $(OUTDIR)\*.sbr > bscmake.tmp
+       bscmake -nologo -o$(TEMACS_BROWSE) @bscmake.tmp
+       @del bscmake.tmp
+!endif
        link.exe @<<
   $(TEMACS_LFLAGS) $(TEMACS_OBJS) $(TEMACS_LIBS)
 <<
 
-$(NT)\xemacs.res: xemacs.rc
-       rc xemacs.rc
-
-# MSDEV Source Broswer file. "*.sbr" is too inclusive but this is harmless
-$(TEMACS_BROWSE): $(TEMACS_OBJS)
-       @dir /b/s $(OUTDIR)\*.sbr > bscmake.tmp
-       bscmake -nologo -o$@ @bscmake.tmp
-       @del bscmake.tmp
+$(OUTDIR)\xemacs.res: xemacs.rc
+       rc -Fo$@ xemacs.rc
 
 #------------------------------------------------------------------------------
 
@@ -1034,7 +1044,7 @@ dump-xemacs: $(TEMACS)
 
 # use this rule to build the complete system
 all:   $(OUTDIR)\nul $(LASTFILE) $(LWLIB) $(LIB_SRC_TOOLS) $(RUNEMACS) \
-       $(TEMACS) $(TEMACS_BROWSE) update-elc $(DOC) dump-xemacs
+       $(TEMACS) update-elc $(DOC) dump-xemacs
 
 temacs: $(TEMACS)
 
@@ -1066,12 +1076,15 @@ distclean:
        del *.bak
        del *.orig
        del *.rej
-       del *.pdb
        del *.tmp
+       del Installation
+       del Installation.el
        cd $(OUTDIR)
+       del *.lib
        del *.obj
+       del *.pdb
+       del *.res
        del *.sbr
-       del *.lib
        cd $(XEMACS)\$(TEMACS_DIR)
        del puresize-adjust.h
        del config.h
@@ -1090,6 +1103,9 @@ distclean:
        del *.orig
        del *.rej
        del *.exe
+       del *.obj
+       del *.pdb
+       del *.res
        del $(CONFIG_VALUES)
        cd $(LISP)
        -del /s /q *.bak *.elc *.orig *.rej
index eef2edb..7eac51a 100644 (file)
@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA.  */
 
 #include <config.h>
 
+#include <stdio.h>
 #include <assert.h>
 #include <stdlib.h>
 #include <X11/StringDefs.h>
index 8efbbeb..3410129 100644 (file)
@@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA.  */
 #include <config.h>
 #include <string.h>
 #include <stdlib.h>
+#include <stdio.h>
 #include <assert.h>
 
 #include <X11/Xlib.h>
index e532bd0..a097e13 100644 (file)
@@ -32,7 +32,9 @@ DECLARE_CONSOLE_TYPE (stream);
 
 struct stream_console
 {
-  FILE *infd, *outfd, *errfd;
+  FILE *in;
+  FILE *out;
+  FILE *err;
   int needs_newline;
 };
 
index e2aed07..b2735e3 100644 (file)
@@ -61,43 +61,43 @@ If FILES-ONLY is the symbol t, then only the "files" in the directory
  if FILES-ONLY is nil (the default) then both files and subdirectories will
  be returned.
 */
-       (dirname, full, match, nosort, files_only))
+       (directory, full, match, nosort, files_only))
 {
   /* This function can GC */
   DIR *d;
   Lisp_Object list = Qnil;
-  Bytecount dirnamelen;
+  Bytecount directorylen;
   Lisp_Object handler;
   struct re_pattern_buffer *bufp = NULL;
   int speccount = specpdl_depth ();
   char *statbuf, *statbuf_tail;
 
   struct gcpro gcpro1, gcpro2;
-  GCPRO2 (dirname, list);
+  GCPRO2 (directory, list);
 
   /* If the file name has special constructs in it,
      call the corresponding file handler.  */
-  handler = Ffind_file_name_handler (dirname, Qdirectory_files);
+  handler = Ffind_file_name_handler (directory, Qdirectory_files);
   if (!NILP (handler))
     {
       UNGCPRO;
       if (!NILP (files_only))
-       return call6 (handler, Qdirectory_files, dirname, full, match, nosort,
-                     files_only);
+       return call6 (handler, Qdirectory_files, directory, full, match,
+                     nosort, files_only);
       else
-       return call5 (handler, Qdirectory_files, dirname, full, match,
+       return call5 (handler, Qdirectory_files, directory, full, match,
                      nosort);
     }
 
   /* #### why do we do Fexpand_file_name after file handlers here,
      but earlier everywhere else? */
-  dirname = Fexpand_file_name (dirname, Qnil);
-  dirname = Ffile_name_as_directory (dirname);
-  dirnamelen = XSTRING_LENGTH (dirname);
+  directory = Fexpand_file_name (directory, Qnil);
+  directory = Ffile_name_as_directory (directory);
+  directorylen = XSTRING_LENGTH (directory);
 
-  statbuf = (char *)alloca (dirnamelen + MAXNAMLEN + 1);
-  memcpy (statbuf, XSTRING_DATA (dirname), dirnamelen);
-  statbuf_tail = statbuf + dirnamelen;
+  statbuf = (char *)alloca (directorylen + MAXNAMLEN + 1);
+  memcpy (statbuf, XSTRING_DATA (directory), directorylen);
+  statbuf_tail = statbuf + directorylen;
 
   /* XEmacs: this should come after Ffile_name_as_directory() to avoid
      potential regexp cache smashage.  It comes before the opendir()
@@ -118,9 +118,9 @@ If FILES-ONLY is the symbol t, then only the "files" in the directory
   /* Do this opendir after anything which might signal an error.
      NOTE: the above comment is old; previously, there was no
      unwind-protection in case of error, but now there is.  */
-  d = opendir ((char *) XSTRING_DATA (dirname));
+  d = opendir ((char *) XSTRING_DATA (directory));
   if (!d)
-    report_file_error ("Opening directory", list1 (dirname));
+    report_file_error ("Opening directory", list1 (directory));
 
   record_unwind_protect (close_directory_unwind, make_opaque_ptr ((void *)d));
 
@@ -157,9 +157,9 @@ If FILES-ONLY is the symbol t, then only the "files" in the directory
                 overrun.  */
              if (len > MAXNAMLEN)
                {
-                 cur_statbuf = (char *)xmalloc (dirnamelen + len + 1);
-                 memcpy (cur_statbuf, statbuf, dirnamelen);
-                 cur_statbuf_tail = cur_statbuf + dirnamelen;
+                 cur_statbuf = (char *)xmalloc (directorylen + len + 1);
+                 memcpy (cur_statbuf, statbuf, directorylen);
+                 cur_statbuf_tail = cur_statbuf + directorylen;
                }
              memcpy (cur_statbuf_tail, dp->d_name, len);
              cur_statbuf_tail[len] = 0;
@@ -182,7 +182,7 @@ If FILES-ONLY is the symbol t, then only the "files" in the directory
            Lisp_Object name =
              make_string ((Bufbyte *)dp->d_name, len);
            if (!NILP (full))
-             name = concat2 (dirname, name);
+             name = concat2 (directory, name);
 
            list = Fcons (name, list);
          }
@@ -197,79 +197,79 @@ If FILES-ONLY is the symbol t, then only the "files" in the directory
 }
 \f
 static Lisp_Object file_name_completion (Lisp_Object file,
-                                         Lisp_Object dirname,
+                                         Lisp_Object directory,
                                          int all_flag, int ver_flag);
 
 DEFUN ("file-name-completion", Ffile_name_completion, 2, 2, 0, /*
-Complete file name FILE in directory DIR.
-Returns the longest string common to all filenames in DIR
+Complete file name FILE in directory DIRECTORY.
+Returns the longest string common to all filenames in DIRECTORY
 that start with FILE.
 If there is only one and FILE matches it exactly, returns t.
-Returns nil if DIR contains no name starting with FILE.
+Returns nil if DIRECTORY contains no name starting with FILE.
 
 Filenames which end with any member of `completion-ignored-extensions'
 are not considered as possible completions for FILE unless there is no
 other possible completion.  `completion-ignored-extensions' is not applied
 to the names of directories.
 */
-       (file, dirname))
+       (file, directory))
 {
   /* This function can GC.  GC checked 1996.04.06. */
   Lisp_Object handler;
 
   /* If the directory name has special constructs in it,
      call the corresponding file handler.  */
-  handler = Ffind_file_name_handler (dirname, Qfile_name_completion);
+  handler = Ffind_file_name_handler (directory, Qfile_name_completion);
   if (!NILP (handler))
-    return call3 (handler, Qfile_name_completion, file, dirname);
+    return call3 (handler, Qfile_name_completion, file, directory);
 
   /* If the file name has special constructs in it,
      call the corresponding file handler.  */
   handler = Ffind_file_name_handler (file, Qfile_name_completion);
   if (!NILP (handler))
-    return call3 (handler, Qfile_name_completion, file, dirname);
+    return call3 (handler, Qfile_name_completion, file, directory);
 
-  return file_name_completion (file, dirname, 0, 0);
+  return file_name_completion (file, directory, 0, 0);
 }
 
 DEFUN ("file-name-all-completions", Ffile_name_all_completions, 2, 2, 0, /*
-Return a list of all completions of file name FILE in directory DIR.
-These are all file names in directory DIR which begin with FILE.
+Return a list of all completions of file name FILE in directory DIRECTORY.
+These are all file names in directory DIRECTORY which begin with FILE.
 
-Filenames which end with any member of `completion-ignored-extensions'
+File names which end with any member of `completion-ignored-extensions'
 are not considered as possible completions for FILE unless there is no
 other possible completion.  `completion-ignored-extensions' is not applied
 to the names of directories.
 */
-       (file, dirname))
+       (file, directory))
 {
   /* This function can GC. GC checked 1997.06.04. */
   Lisp_Object handler;
   struct gcpro gcpro1;
 
-  GCPRO1 (dirname);
-  dirname = Fexpand_file_name (dirname, Qnil);
+  GCPRO1 (directory);
+  directory = Fexpand_file_name (directory, Qnil);
   /* If the file name has special constructs in it,
      call the corresponding file handler.  */
-  handler = Ffind_file_name_handler (dirname, Qfile_name_all_completions);
+  handler = Ffind_file_name_handler (directory, Qfile_name_all_completions);
   UNGCPRO;
   if (!NILP (handler))
     return call3 (handler, Qfile_name_all_completions, file,
-                 dirname);
+                 directory);
 
-  return file_name_completion (file, dirname, 1, 0);
+  return file_name_completion (file, directory, 1, 0);
 }
 
 static int
-file_name_completion_stat (Lisp_Object dirname, DIRENTRY *dp,
+file_name_completion_stat (Lisp_Object directory, DIRENTRY *dp,
                           struct stat *st_addr)
 {
   Bytecount len = NAMLEN (dp);
-  Bytecount pos = XSTRING_LENGTH (dirname);
+  Bytecount pos = XSTRING_LENGTH (directory);
   int value;
   char *fullname = (char *) alloca (len + pos + 2);
 
-  memcpy (fullname, XSTRING_DATA (dirname), pos);
+  memcpy (fullname, XSTRING_DATA (directory), pos);
   if (!IS_DIRECTORY_SEP (fullname[pos - 1]))
     fullname[pos++] = DIRECTORY_SEP;
 
@@ -306,7 +306,7 @@ file_name_completion_unwind (Lisp_Object locative)
 }
 
 static Lisp_Object
-file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag,
+file_name_completion (Lisp_Object file, Lisp_Object directory, int all_flag,
                      int ver_flag)
 {
   /* This function can GC */
@@ -321,7 +321,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag,
   Lisp_Object locative;
   struct gcpro gcpro1, gcpro2, gcpro3;
 
-  GCPRO3 (file, dirname, bestmatch);
+  GCPRO3 (file, directory, bestmatch);
 
   CHECK_STRING (file);
 
@@ -334,7 +334,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag,
 #ifdef FILE_SYSTEM_CASE
   file = FILE_SYSTEM_CASE (file);
 #endif
-  dirname = Fexpand_file_name (dirname, Qnil);
+  directory = Fexpand_file_name (directory, Qnil);
   file_name_length = XSTRING_CHAR_LENGTH (file);
 
   /* With passcount = 0, ignore files that end in an ignored extension.
@@ -355,9 +355,9 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag,
 
   for (passcount = !!all_flag; NILP (bestmatch) && passcount < 2; passcount++)
     {
-      d = opendir ((char *) XSTRING_DATA (Fdirectory_file_name (dirname)));
+      d = opendir ((char *) XSTRING_DATA (Fdirectory_file_name (directory)));
       if (!d)
-       report_file_error ("Opening directory", list1 (dirname));
+       report_file_error ("Opening directory", list1 (directory));
       XCAR (locative) = make_opaque_ptr ((void *)d);
 
       /* Loop reading blocks */
@@ -387,7 +387,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag,
              || 0 <= scmp (d_name, XSTRING_DATA (file), file_name_length))
            continue;
 
-          if (file_name_completion_stat (dirname, dp, &st) < 0)
+          if (file_name_completion_stat (directory, dp, &st) < 0)
             continue;
 
           directoryp = ((st.st_mode & S_IFMT) == S_IFDIR);
@@ -501,7 +501,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag,
                     }
                 }
 
-              /* If this dirname all matches,
+              /* If this directory all matches,
                  see if implicit following slash does too.  */
               if (directoryp
                   && compare == matchsize
@@ -831,13 +831,13 @@ If file does not exist, returns nil.
 {
   /* This function can GC. GC checked 1997.06.04. */
   Lisp_Object values[12];
-  Lisp_Object dirname = Qnil;
+  Lisp_Object directory = Qnil;
   struct stat s;
   char modes[10];
   Lisp_Object handler;
   struct gcpro gcpro1, gcpro2;
 
-  GCPRO2 (filename, dirname);
+  GCPRO2 (filename, directory);
   filename = Fexpand_file_name (filename, Qnil);
 
   /* If the file name has special constructs in it,
@@ -856,7 +856,7 @@ If file does not exist, returns nil.
     }
 
 #ifdef BSD4_2
-  dirname = Ffile_name_directory (filename);
+  directory = Ffile_name_directory (filename);
 #endif
 
 #ifdef MSDOS
@@ -906,7 +906,7 @@ If file does not exist, returns nil.
   {
     struct stat sdir;
 
-    if (!NILP (dirname) && stat ((char *) XSTRING_DATA (dirname), &sdir) == 0)
+    if (!NILP (directory) && stat ((char *) XSTRING_DATA (directory), &sdir) == 0)
       values[9] = (sdir.st_gid != s.st_gid) ? Qt : Qnil;
     else                        /* if we can't tell, assume worst */
       values[9] = Qt;
index 072ac61..d613f62 100644 (file)
@@ -147,7 +147,7 @@ event_stream_unixoid_select_console (struct console *con)
   int infd;
 
   if (CONSOLE_STREAM_P (con))
-    infd = fileno (CONSOLE_STREAM_DATA (con)->infd);
+    infd = fileno (CONSOLE_STREAM_DATA (con)->in);
   else
     {
       assert (CONSOLE_TTY_P (con));
@@ -168,7 +168,7 @@ event_stream_unixoid_unselect_console (struct console *con)
   int infd;
 
   if (CONSOLE_STREAM_P (con))
-    infd = fileno (CONSOLE_STREAM_DATA (con)->infd);
+    infd = fileno (CONSOLE_STREAM_DATA (con)->in);
   else
     {
       assert (CONSOLE_TTY_P (con));
index a5d62c6..40a75f7 100644 (file)
@@ -2623,6 +2623,8 @@ x_focus_on_frame (struct frame *f)
 static void
 x_delete_frame (struct frame *f)
 {
+  Display *dpy;
+
 #ifndef HAVE_SESSION
   if (FRAME_X_TOP_LEVEL_FRAME_P (f))
     x_wm_maybe_move_wm_command (f);
@@ -2633,6 +2635,7 @@ x_delete_frame (struct frame *f)
 #endif /* HAVE_CDE */
 
   assert (FRAME_X_SHELL_WIDGET (f) != 0);
+  dpy = XtDisplay (FRAME_X_SHELL_WIDGET (f));
 
 #ifdef EXTERNAL_WIDGET
   expect_x_error (XtDisplay (FRAME_X_SHELL_WIDGET (f)));
@@ -2647,7 +2650,7 @@ x_delete_frame (struct frame *f)
   XtDestroyWidget (FRAME_X_SHELL_WIDGET (f));
   /* make sure the windows are really gone! */
   /* ### Is this REALLY necessary? */
-  XFlush (XtDisplay (FRAME_X_SHELL_WIDGET (f)));
+  XFlush (dpy);
 #endif /* EXTERNAL_WIDGET */
 
   FRAME_X_SHELL_WIDGET (f) = 0;
index af1df69..cac4a86 100644 (file)
@@ -418,7 +418,8 @@ void *(*__realloc_hook)(void *, size_t) = check_realloc;
 /* 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
@@ -431,7 +432,7 @@ 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
 
@@ -469,7 +470,7 @@ note_block (char *file, int line, blocktype type)
     blhistptr = 0;
 }
 
-#endif
+#endif /* DEBUG_INPUT_BLOCKING */
 
 \f
 #ifdef DEBUG_GCPRO
@@ -481,8 +482,6 @@ block_input_history gcprohist[GCPROHISTLIMIT];
 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;
@@ -569,6 +568,9 @@ debug_ungcpro (char *file, int line, struct gcpro *gcpro1)
   gcprolist = gcpro1->next;
 }
 
+
+/* To be called from the debugger */
+void show_gcprohist (void);
 void
 show_gcprohist (void)
 {
@@ -591,4 +593,4 @@ show_gcprohist (void)
   fflush (stdout);
 }
 
-#endif
+#endif /* DEBUG_GCPRO */
index 70b948a..e4d6a16 100644 (file)
@@ -686,6 +686,7 @@ extract_xpm_color_names (Lisp_Object device,
        COLOR_INSTANCE_MSWINDOWS_COLOR (XCOLOR_INSTANCE (XCDR (cons)));
 
       GET_C_STRING_OS_DATA_ALLOCA (XCAR (cons), colortbl[j].name);
+      colortbl[j].name = xstrdup (colortbl[j].name); /* mustn't lose this when we return */
       free_cons (XCONS (cons));
       cons = results;
       results = XCDR (results);
@@ -884,7 +885,13 @@ mswindows_xpm_instantiate (Lisp_Object image_instance,
     }
   
   if (color_symbols)
-    xfree(color_symbols);
+    {
+      while (nsymbols--)
+       {
+         xfree (color_symbols[nsymbols].name);
+       }
+      xfree(color_symbols);
+    }
   
   /* build a bitmap from the eimage */
   if (!(bmp_info=convert_EImage_to_DIBitmap (device, width, height, eimage,
index 8535ab4..12f6098 100644 (file)
@@ -127,23 +127,23 @@ struct image_instantiator_methods
 
 /***** Calling an image-instantiator method *****/
 
-#define HAS_IIFORMAT_METH_P(mstruc, m) ((mstruc)->m##_method)
+#define HAS_IIFORMAT_METH_P(mstruc, m) (((mstruc)->m##_method) != 0)
 #define IIFORMAT_METH(mstruc, m, args) (((mstruc)->m##_method) args)
 
 /* Call a void-returning specifier method, if it exists */
-#define MAYBE_IIFORMAT_METH(mstruc, m, args)                                \
-if (mstruc)                                                    \
-do {                                                                        \
-  struct image_instantiator_methods *maybe_iiformat_meth_mstruc = (mstruc); \
-  if (HAS_IIFORMAT_METH_P (maybe_iiformat_meth_mstruc, m))                  \
-    IIFORMAT_METH (maybe_iiformat_meth_mstruc, m, args);                    \
+#define MAYBE_IIFORMAT_METH(mstruc, m, args)                   \
+do {                                                           \
+  struct image_instantiator_methods *MIM_mstruc = (mstruc);    \
+  if (MIM_mstruc && HAS_IIFORMAT_METH_P (MIM_mstruc, m))       \
+    IIFORMAT_METH (MIM_mstruc, m, args);                       \
 } while (0)
 
-#define MAYBE_IIFORMAT_DEVMETH(device, mstruc, m, args)                                \
-do {                                                                                   \
-  struct image_instantiator_methods *_mstruc = decode_ii_device (device, mstruc);      \
-  if (_mstruc)                                                                         \
-    MAYBE_IIFORMAT_METH(_mstruc, m, args);                                             \
+#define MAYBE_IIFORMAT_DEVMETH(device, mstruc, m, args)        \
+do {                                                   \
+  struct image_instantiator_methods *MID_mstruc =      \
+    decode_ii_device (device, mstruc);                 \
+  if (MID_mstruc)                                      \
+    MAYBE_IIFORMAT_METH(MID_mstruc, m, args);          \
 } while (0)
 
 
index ff707cb..c56dc36 100644 (file)
@@ -143,7 +143,7 @@ displayable_menu_item (struct gui_item* pgui_item, int bar_p)
       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;
     }
index d15bac5..c93805a 100644 (file)
@@ -56,8 +56,9 @@ Lisp_Object Vopaque_ptr_free_list;
 static Lisp_Object
 mark_opaque (Lisp_Object obj, void (*markobj) (Lisp_Object))
 {
-   Lisp_Opaque *p = XOPAQUE (obj);
-   Lisp_Object size_or_chain = p->size_or_chain;
+  Lisp_Opaque *p = XOPAQUE (obj);
+  /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */
+  Lisp_Object size_or_chain = p->size_or_chain;
 #ifdef ERROR_CHECK_GC
   if (!in_opaque_list_marking)
     /* size is non-int for objects on an opaque free list.  We sure
@@ -81,10 +82,12 @@ static void
 print_opaque (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
   CONST Lisp_Opaque *p = XOPAQUE (obj);
+  /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */
+  Lisp_Object size_or_chain = p->size_or_chain;
   char buf[200];
   char size_buf[50];
 
-  if (INTP (p->size_or_chain))
+  if (INTP (size_or_chain))
     sprintf (size_buf, "size=%lu", (unsigned long) OPAQUE_SIZE (p));
   else
     sprintf (size_buf, "freed");
@@ -98,8 +101,10 @@ static size_t
 sizeof_opaque (CONST void *header)
 {
   CONST Lisp_Opaque *p = (CONST Lisp_Opaque *) header;
+  /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */
+  Lisp_Object size_or_chain = p->size_or_chain;
   return offsetof (Lisp_Opaque, data)
-    + (GC_INTP (p->size_or_chain) ? XINT (p->size_or_chain) : 0);
+    + (GC_INTP (size_or_chain) ? XINT (size_or_chain) : 0);
 }
 
 /* Return an opaque object of size SIZE.
@@ -133,14 +138,21 @@ make_opaque (size_t size, CONST void *data)
 static int
 equal_opaque (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  size_t size;
 #ifdef DEBUG_XEMACS
-  assert (!XOPAQUE_MARKFUN (obj1) && !XOPAQUE_MARKFUN (obj2));
-  assert (INTP (XOPAQUE (obj1)->size_or_chain));
-  assert (INTP (XOPAQUE (obj2)->size_or_chain));
+  {
+    /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */
+    Lisp_Object size_or_chain_1 = XOPAQUE (obj1)->size_or_chain;
+    Lisp_Object size_or_chain_2 = XOPAQUE (obj2)->size_or_chain;
+    assert (INTP (size_or_chain_1));
+    assert (INTP (size_or_chain_2));
+    assert (!XOPAQUE_MARKFUN (obj1) && !XOPAQUE_MARKFUN (obj2));
+  }
 #endif
-  return ((size = XOPAQUE_SIZE (obj1)) == XOPAQUE_SIZE (obj2) &&
-         !memcmp (XOPAQUE_DATA (obj1), XOPAQUE_DATA (obj2), size));
+  {
+    size_t size;
+    return ((size = XOPAQUE_SIZE (obj1)) == XOPAQUE_SIZE (obj2) &&
+           !memcmp (XOPAQUE_DATA (obj1), XOPAQUE_DATA (obj2), size));
+  }
 }
 
 /* This will not work correctly for opaques with subobjects! */
@@ -149,11 +161,15 @@ static unsigned long
 hash_opaque (Lisp_Object obj, int depth)
 {
 #ifdef DEBUG_XEMACS
-  assert (!XOPAQUE_MARKFUN (obj));
-  assert (INTP (XOPAQUE (obj)->size_or_chain));
+  {
+    /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */
+    Lisp_Object size_or_chain = XOPAQUE (obj)->size_or_chain;
+    assert (INTP (size_or_chain));
+    assert (!XOPAQUE_MARKFUN (obj));
+  }
 #endif
   if (XOPAQUE_SIZE (obj) == sizeof (unsigned long))
-    return *((unsigned long *) XOPAQUE_DATA(obj));
+    return *((unsigned long *) XOPAQUE_DATA (obj));
   else
     return memory_hash (XOPAQUE_DATA (obj), XOPAQUE_SIZE (obj));
 }
@@ -223,7 +239,11 @@ free_managed_opaque (Lisp_Object opaque_list, Lisp_Object opaque)
   Lisp_Opaque_List *li = XOPAQUE_LIST (opaque_list);
 
 #ifdef ERROR_CHECK_GC
-  assert (INTP (XOPAQUE (opaque)->size_or_chain));
+  {
+    /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */
+    Lisp_Object size_or_chain = XOPAQUE (opaque)->size_or_chain;
+    assert (INTP (size_or_chain));
+  }
 #endif
   XOPAQUE (opaque)->size_or_chain = li->free;
   li->free = opaque;
index a32b249..663e3c4 100644 (file)
@@ -1461,9 +1461,9 @@ the output also will be logged to this file.
       if (DEVICE_TTY_P (XDEVICE (device)))
        file = 0;
       else if (!NILP (stdout_p))
-       file = CONSOLE_STREAM_DATA (con)->outfd;
+       file = CONSOLE_STREAM_DATA (con)->out;
       else
-       file = CONSOLE_STREAM_DATA (con)->errfd;
+       file = CONSOLE_STREAM_DATA (con)->err;
     }
 
   if (STRINGP (char_or_string))
index 764e147..170efbd 100644 (file)
@@ -69,7 +69,7 @@ DEFUN ("play-sound-file", Fplay_sound_file, 1, 3, "fSound file name: ", /*
 Play the named sound file on DEVICE's speaker at the specified volume
 \(0-100, default specified by the `bell-volume' variable).
 On Unix machines the sound file must be in the Sun/NeXT U-LAW format
-except under Linux where WAV files are also supported.  On Microsoft 
+except under Linux where WAV files are also supported.  On Microsoft
 Windows the sound file must be in WAV format.
   DEVICE defaults to the selected device.
 */
@@ -326,14 +326,12 @@ Return t if DEVICE is able to play sound.  Defaults to selected device.
 */
        (device))
 {
-  struct device *d = decode_device(device);
-
 #ifdef HAVE_NAS_SOUND
-  if (DEVICE_CONNECTED_TO_NAS_P (d))
+  if (DEVICE_CONNECTED_TO_NAS_P (decode_device (device)))
     return Qt;
 #endif
 #ifdef HAVE_NATIVE_SOUND
-  if (DEVICE_ON_CONSOLE_P (d))
+  if (DEVICE_ON_CONSOLE_P (decode_device (device)))
     return Qt;
 #endif
   return Qnil;
index a24221d..528665f 100644 (file)
@@ -1904,7 +1904,7 @@ reset_one_device (struct device *d)
   else
 #endif
   if (DEVICE_STREAM_P (d))
-    fflush (CONSOLE_STREAM_DATA (XCONSOLE (DEVICE_CONSOLE (d)))->outfd);
+    fflush (CONSOLE_STREAM_DATA (XCONSOLE (DEVICE_CONSOLE (d)))->out);
 #if defined(SIGIO) && !defined(BROKEN_SIGIO)
   if (!DEVICE_STREAM_P (d))
     {
index 666c8c7..40c559b 100644 (file)
@@ -34,6 +34,13 @@ Boston, MA 02111-1307, USA.  */
 #endif
 #endif
 
+/* select() is supposed to be (Unix98) defined in sys/time.h,
+   but FreeBSD and Irix 5 put it in unistd.h instead.
+   If we have it, including it can't hurt. */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 #if defined(WINDOWSNT) && defined(HAVE_X_WINDOWS)
 /* Provides gettimeofday etc */
 #include <X11/Xw32defs.h>
index a975fc5..5e76e0a 100644 (file)
@@ -1,3 +1,7 @@
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+       * XEmacs 21.2.13 is released
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
        * XEmacs 21.2.12 is released