which included commits to RCS files with non-trunk default branches.
+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
#include <../src/config.h>
#if defined (BSD) && !defined (BSD4_1) && !defined (USE_FAKEMAIL)
-/* This program isnot used in BSD, so just avoid loader complaints. */
+/* This program is not used in BSD, so just avoid loader complaints. */
int
-main ()
+main (int argc, char *argv[])
{
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int
-main ()
+main (int argc, char *argv[])
{
/* Linux /bin/mail, if it exists, is NOT the Unix v7 mail that
fakemail depends on! This causes garbled mail. Better to
#else /* not BSD 4.2 (or newer) */
#ifdef MSDOS
int
-main ()
+main (int argc, char *argv[])
{
return 0;
}
struct header_record *previous;
};
typedef struct header_record *header;
-
+
struct stream_record
{
FILE *handle;
- int (*action)();
+ int (*action)(FILE *);
struct stream_record *rest_streams;
};
typedef struct stream_record *stream_list;
/* Like malloc but get fatal error if memory is exhausted. */
static char *
-xmalloc (size)
- size_t size;
+xmalloc (size_t size)
{
char *result = malloc (((unsigned) size));
if (result == ((char *) NULL))
}
static char *
-xrealloc (ptr, size)
- char *ptr;
- size_t size;
+xrealloc (char *ptr, size_t size)
{
char *result = realloc (ptr, ((unsigned) size));
if (result == ((char *) NULL))
}
/* Read a line of text from `stream' into `linebuffer'.
- * Return the length of the line.
+ * Return the length of the line.
*/
static long
ptr = &keyword[0];
c = *field++;
- if ((isspace (c)) || (c == ':'))
- return ((char *) NULL);
- *ptr++ = ((islower (c)) ? (toupper (c)) : c);
- while (((c = *field++) != ':') && (!(isspace (c))))
- *ptr++ = ((islower (c)) ? (toupper (c)) : c);
+ if ((isspace ((int) (unsigned char) c)) || (c == ':'))
+ return (char *) NULL;
+ *ptr++ = ((islower ((int) (unsigned char) c)) ?
+ (toupper ((int) (unsigned char) c)) : c);
+ while (((c = *field++) != ':') &&
+ (!(isspace ((int) (unsigned char) c))))
+ *ptr++ = ((islower ((int) (unsigned char) c)) ?
+ (toupper ((int) (unsigned char) c)) : c);
*ptr++ = '\0';
- while (isspace (c)) c = *field++;
- if (c != ':') return ((char *) NULL);
+ while (isspace ((int) (unsigned char) c)) c = *field++;
+ if (c != ':') return (char *) NULL;
*rest = field;
return &keyword[0];
}
}
static void
-add_a_stream (FILE *the_stream, int (*closing_action)())
+add_a_stream (FILE *the_stream, int (*closing_action)(FILE *))
{
stream_list old = the_streams;
the_streams = new_stream ();
*where = '\0';
return;
}
-\f
+\f
static header
read_header (void)
{
}
\f
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char *argv[])
{
char *command_line;
header the_header;
args_size (the_header)));
strcpy (command_line, mail_program_name);
parse_header (the_header, &command_line[name_length]);
-
+
the_pipe = popen (command_line, "w");
if (the_pipe == ((FILE *) NULL))
fatal ("cannot open pipe to real mailer", (char *) 0);
-;;; 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
;;; Code:
+;;;###autoload
(defun put-alist (item value alist)
"Modify ALIST to set VALUE to ITEM.
If there is a pair whose car is ITEM, replace its cdr by VALUE.
(cons (cons item value) alist)
)))
+;;;###autoload
(defun del-alist (item alist)
"If there is a pair whose key is ITEM, delete it from ALIST.
\[tomo's ELIS emulating function]"
)
alist))))
+;;;###autoload
(defun set-alist (symbol item value)
"Modify a alist indicated by SYMBOL to set VALUE to ITEM."
(or (boundp symbol)
(set symbol (put-alist item value (symbol-value symbol)))
)
+;;;###autoload
(defun remove-alist (symbol item)
"Remove ITEM from the alist indicated by SYMBOL."
(and (boundp symbol)
(set symbol (del-alist item (symbol-value symbol)))
))
+;;;###autoload
(defun modify-alist (modifier default)
"Modify alist DEFAULT into alist MODIFIER."
(mapcar (function
modifier)
default)
+;;;###autoload
(defun set-modified-alist (sym modifier)
"Modify a value of a symbol SYM into alist MODIFIER.
The symbol SYM should be alist. If it is not bound,
(if found
(insert " ")
(insert "(custom-add-loads '"
- (symbol-name sym) " '("))
+ (prin1-to-string sym) " '("))
(prin1 where (current-buffer))
(push where found)))
(when found
(not (get symbol 'force-value)))))))
(when value
(princ "\n '(")
- (princ symbol)
+ (prin1 symbol)
(princ " ")
(prin1 (car value))
(cond (requests
;; Don't print default face here.
value)
(princ "\n '(")
- (princ symbol)
+ (prin1 symbol)
(princ " ")
(prin1 value)
(if (or (get symbol 'face-defface-spec)
(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")])
"---"
(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)))
"Automatic Package Fetcher and Installer."
:prefix "package-get"
:group 'package-tools)
-
+
+;;;###autoload
(defvar package-get-base nil
"List of packages that are installed at this site.
For each element in the alist, car is the package name and the cdr is
"Fetch and install the latest versions of all customized packages."
(interactive)
(package-get-require-base t)
- ;; Load a fresh copy
- (load "package-get-custom.el")
(mapcar (lambda (pkg)
(if (eval (intern (concat (symbol-name (car pkg)) "-package")))
(package-get (car pkg) nil))
(custom-var (intern (concat (symbol-name package) "-package")))
(description (plist-get props 'description)))
(when (not (memq group package-get-custom-groups))
- (setq package-get-custom-groups (cons package
+ (setq package-get-custom-groups (cons group
package-get-custom-groups))
(eval `(defgroup ,group nil
,(concat category " package group")
(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
(defun x-init-global-faces ()
(or (face-font 'default 'global)
(set-face-font 'default
- "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*")
- 'global)
+ "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*"
+ 'global '(x default)))
(or (face-foreground 'default 'global)
- (set-face-foreground 'default "black" 'global 'x))
+ (set-face-foreground 'default "black" 'global '(x default)))
(or (face-background 'default 'global)
- (set-face-background 'default "gray80" 'global 'x)))
+ (set-face-background 'default "gray80" 'global '(x default))))
;;; x-init-device-faces is responsible for initializing default
;;; values for faces on a newly created device.
+1999-03-12 XEmacs Build Bot <builds@cvs.xemacs.org>
+
+ * XEmacs 21.2.13 is released
+
1999-03-05 XEmacs Build Bot <builds@cvs.xemacs.org>
* XEmacs 21.2.12 is released
+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
+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
# 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
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)
!if !defined(HAVE_X)
HAVE_X=0
!endif
-!if !defined(HAVE_MULE)
-HAVE_MULE=0
-!endif
!if !defined(HAVE_XPM)
HAVE_XPM=0
!endif
#
# 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
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)
!if $(DEBUG_XEMACS)
OPT=-Od -Zi
!else
-OPT=-O2 -G5 -Zi
+OPT=-O2 -G5
!endif
CFLAGS=-nologo -W3 $(OPT)
!if $(DEBUG_XEMACS)
DEBUG_DEFINES=-DDEBUG_XEMACS -D_DEBUG
-DEBUG_FLAGS= -debugtype:both -debug:full
+DEBUG_FLAGS=-debug:full
!endif
!if $(USE_MINIMAL_TAGBITS)
-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
#
# 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
!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
!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)]
# 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
$(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 = \
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$@ $**
#------------------------------------------------------------------------------
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
$(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) $**
-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) \
$(OUTDIR)\vm-limit.obj \
$(OUTDIR)\widget.obj \
$(OUTDIR)\window.obj \
- $(NT)\xemacs.res
+ $(OUTDIR)\xemacs.res
# Rules
.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$@
# !"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
#------------------------------------------------------------------------------
# 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)
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
del *.orig
del *.rej
del *.exe
+ del *.obj
+ del *.pdb
+ del *.res
del $(CONFIG_VALUES)
cd $(LISP)
-del /s /q *.bak *.elc *.orig *.rej
#include <config.h>
+#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <X11/StringDefs.h>
#include <config.h>
#include <string.h>
#include <stdlib.h>
+#include <stdio.h>
#include <assert.h>
#include <X11/Xlib.h>
struct stream_console
{
- FILE *infd, *outfd, *errfd;
+ FILE *in;
+ FILE *out;
+ FILE *err;
int needs_newline;
};
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()
/* 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));
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;
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);
}
}
\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;
}
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 */
Lisp_Object locative;
struct gcpro gcpro1, gcpro2, gcpro3;
- GCPRO3 (file, dirname, bestmatch);
+ GCPRO3 (file, directory, bestmatch);
CHECK_STRING (file);
#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.
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 */
|| 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);
}
}
- /* If this dirname all matches,
+ /* If this directory all matches,
see if implicit following slash does too. */
if (directoryp
&& compare == matchsize
{
/* 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,
}
#ifdef BSD4_2
- dirname = Ffile_name_directory (filename);
+ directory = Ffile_name_directory (filename);
#endif
#ifdef MSDOS
{
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;
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));
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));
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);
#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)));
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;
/* Note: There is no more input blocking in XEmacs */
typedef enum {
block_type, unblock_type, totally_type,
- gcpro1_type, gcpro2_type, gcpro3_type, gcpro4_type, ungcpro_type
+ gcpro1_type, gcpro2_type, gcpro3_type, gcpro4_type, gcpro5_type,
+ ungcpro_type
} blocktype;
struct block_input_history_struct
typedef struct block_input_history_struct block_input_history;
-#endif
+#endif /* DEBUG_INPUT_BLOCKING || DEBUG_GCPRO */
#ifdef DEBUG_INPUT_BLOCKING
blhistptr = 0;
}
-#endif
+#endif /* DEBUG_INPUT_BLOCKING */
\f
#ifdef DEBUG_GCPRO
static void
log_gcpro (char *file, int line, struct gcpro *value, blocktype type)
{
- FRAME start_frame;
-
if (type == ungcpro_type)
{
if (value == gcprolist) goto OK;
gcprolist = gcpro1->next;
}
+
+/* To be called from the debugger */
+void show_gcprohist (void);
void
show_gcprohist (void)
{
fflush (stdout);
}
-#endif
+#endif /* DEBUG_GCPRO */
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);
}
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,
/***** 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)
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;
}
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
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");
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.
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! */
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));
}
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;
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))
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.
*/
*/
(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;
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))
{
#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>
+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