+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
$(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) *~ \#*
+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-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")
(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))
(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)))
(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
(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)
$(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) *~ \#*
+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
+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
!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
+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
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)));
+ Lisp_Vector *vecp = make_vector_internal (length);
+ Lisp_Object *p = vector_data (vecp);
- p = make_vector_internal (length);
- XSETVECTOR (vector, p);
+ while (length--)
+ *p++ = init;
-#if 0
- /* Initialize big arrays full of 0's quickly, for what that's worth */
{
- 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);
+ Lisp_Vector *vecp = make_vector_internal (nargs);
+ Lisp_Object *p = vector_data (vecp);
- for (elt = 0; elt < nargs; elt++)
- vector_data(p)[elt] = args[elt];
+ while (nargs--)
+ *p++ = *args++;
- XSETVECTOR (vector, p);
- return vector;
+ {
+ 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);
+ int i;
+ Lisp_Bit_Vector *p = make_bit_vector_internal (nargs);
- for (elt = 0; elt < nargs; elt++)
- set_bit_vector_bit (p, elt, !ZEROP (args[elt]));
+ for (i = 0; i < nargs; i++)
+ {
+ CHECK_BIT (args[i]);
+ set_bit_vector_bit (p, i, !ZEROP (args[i]));
+ }
- XSETBIT_VECTOR (bit_vector, p);
- return bit_vector;
+ {
+ Lisp_Object bit_vector;
+ XSETBIT_VECTOR (bit_vector, p);
+ return bit_vector;
+ }
}
\f
else
{
/* Make a new current string chars block */
- struct string_chars_block *new = xnew (struct string_chars_block);
+ struct string_chars_block *new_scb = 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;
+ 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;
+ Lisp_Cons *c;
- if (!check_purespace (sizeof (struct Lisp_Cons)))
+ 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;
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 ();
* 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
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
}
/* 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);
}
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);
}
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;
}
\f
{
int interval_id;
int id_number;
- Lisp_Object function, object;
+ Lisp_Object function;
+ Lisp_Object object;
};
struct eval_data
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;
#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,
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);
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);
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))
#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
}
#endif
+#ifdef F_SETFL
fcntl (fd, F_SETFL, O_NONBLOCK);
+#endif
}
#if defined (NO_SUBPROCESSES)