From: tomo Date: Mon, 17 May 1999 09:41:40 +0000 (+0000) Subject: XEmacs 21.2.6 X-Git-Tag: r21-2-6~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35adcaaeafb1fe93eaf00c39b48619e8f188ff3f;p=chise%2Fxemacs-chise.git- XEmacs 21.2.6 --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 51232db..7afb38a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +1998-12-16 Andy Piper + + * XEmacs 21.2.6 is released + 1998-12-05 XEmacs Build Bot * XEmacs 21.2.5 is released diff --git a/lib-src/Makefile.in.in b/lib-src/Makefile.in.in index fcc6f86..036a225 100644 --- a/lib-src/Makefile.in.in +++ b/lib-src/Makefile.in.in @@ -230,7 +230,7 @@ clean: mostlyclean $(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) *~ \#* diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 422ee0c..1eeca12 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,48 @@ +1998-12-16 Andy Piper + + * XEmacs 21.2.6 is released + +1998-11-30 Hrvoje Niksic + + * cus-dep.el (Custom-make-dependencies): Be smarter about trapping + errors. + +1998-12-04 Hrvoje Niksic + + * wid-edit.el (widget-echo-this-extent): Set + help-echo-owns-message to t. + +1998-11-30 Greg Klanderman + + * package-get.el (package-get-download-menu): use toggles for + each site in the download site menu. + +1998-12-01 Jan Vroonhof + + * 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 + + * package-get.el (package-get-remote-filename): use an EFS path + with user anonymous if no user is specified. + +1998-12-10 Jan Vroonhof + + * faces.el (face-spec-set): Re-init fallfacks for default after + calling reset-face on the default face. + +1998-12-10 Jan Vroonhof + + * 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 * XEmacs 21.2.5 is released diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el index 81cb424..8dab0cf 100644 --- a/lisp/cus-dep.el +++ b/lisp/cus-dep.el @@ -131,15 +131,21 @@ Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS" (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") diff --git a/lisp/faces.el b/lisp/faces.el index 1870bec..a0c193e 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1209,6 +1209,8 @@ See `defface' for information about SPEC." (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)) diff --git a/lisp/package-admin.el b/lisp/package-admin.el index 8969704..730f5f3 100644 --- a/lisp/package-admin.el +++ b/lisp/package-admin.el @@ -123,16 +123,20 @@ The optional `pkg-dir' can be used to override the default package hierarchy (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 @@ -323,7 +327,8 @@ is the top-level directory under which the package was installed." ;; 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))) diff --git a/lisp/package-get.el b/lisp/package-get.el index 539c6be..acc3483 100644 --- a/lisp/package-get.el +++ b/lisp/package-get.el @@ -260,7 +260,10 @@ When nil, updates which are not PGP signed are allowed without confirmation." (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 @@ -702,8 +705,10 @@ successfully installed but errors occurred during initialization, or (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)) @@ -804,7 +809,10 @@ successfully installed but errors occurred during initialization, or (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) @@ -937,7 +945,9 @@ words (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 diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 4939090..d0cd014 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -302,6 +302,7 @@ new value." (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) diff --git a/lwlib/Makefile.in.in b/lwlib/Makefile.in.in index 6a3774d..70be7f3 100644 --- a/lwlib/Makefile.in.in +++ b/lwlib/Makefile.in.in @@ -86,7 +86,7 @@ mostlyclean: $(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) *~ \#* diff --git a/man/ChangeLog b/man/ChangeLog index ef54442..6646356 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +1998-12-16 Andy Piper + + * XEmacs 21.2.6 is released + 1998-12-05 XEmacs Build Bot * XEmacs 21.2.5 is released diff --git a/nt/ChangeLog b/nt/ChangeLog index 438f5e4..34858e3 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,37 @@ +1998-12-16 Andy Piper + + * XEmacs 21.2.6 is released + +1998-12-11 Adrian Aichner + + * 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 + + * xemacs.mak ($(OUTDIR)\alloc.obj): add a dependency on + puresize-adjust.h to avoid infinite recursion. + +1998-12-09 Andy Piper + + * config.h: remove clash detection stuff. + +1998-12-07 Martin Buchholz + + * xemacs.mak (TEMACS_OBJS): + (DOC_SRC4): + - Remove pure.c, pure.obj + +1998-11-04 Adrian Aichner + + * 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 * XEmacs 21.2.5 is released diff --git a/nt/config.h b/nt/config.h index d1be996..a10ff2e 100644 --- a/nt/config.h +++ b/nt/config.h @@ -175,10 +175,6 @@ Boston, MA 02111-1307, USA. */ #define HAVE_LONG_FILE_NAMES -#ifdef HAVE_LONG_FILE_NAMES -#define CLASH_DETECTION -#endif - #undef HAVE_LIBKSTAT #undef HAVE_LIBINTL #undef HAVE_LIBDNET diff --git a/nt/xemacs.mak b/nt/xemacs.mak index 91cfd85..c3ff3bb 100644 --- a/nt/xemacs.mak +++ b/nt/xemacs.mak @@ -219,7 +219,7 @@ USE_INDEXED_LRECORD_IMPLEMENTATION=$(GUNG_HO) !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). @@ -398,6 +398,47 @@ DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) \ 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 @@ -430,6 +471,29 @@ $(XEMACS)\src\puresize-adjust.h: puresize-adjust.h 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) @@ -439,7 +503,7 @@ LIB_SRC_DEFINES = -DHAVE_CONFIG_H -DWIN32 -DWINDOWSNT # 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 \ @@ -558,7 +622,6 @@ DOC_SRC2=\ $(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 @@ -596,7 +659,6 @@ DOC_SRC4=\ $(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 \ @@ -803,7 +865,6 @@ TEMACS_OBJS= \ $(OUTDIR)\faces.obj \ $(OUTDIR)\file-coding.obj \ $(OUTDIR)\fileio.obj \ - $(OUTDIR)\filelock.obj \ $(OUTDIR)\filemode.obj \ $(OUTDIR)\floatfns.obj \ $(OUTDIR)\fns.obj \ @@ -839,7 +900,6 @@ TEMACS_OBJS= \ $(OUTDIR)\process.obj \ $(OUTDIR)\process-nt.obj \ $(OUTDIR)\profile.obj \ - $(OUTDIR)\pure.obj \ $(OUTDIR)\rangetab.obj \ $(OUTDIR)\realpath.obj \ $(OUTDIR)\redisplay-output.obj \ @@ -877,7 +937,7 @@ $(OUTDIR)\TopLevelEmacsShell.obj: $(TEMACS_SRC)\EmacsShell-sub.c $(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" @@ -951,6 +1011,7 @@ install: all @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\" @@ -985,6 +1046,7 @@ distclean: del *.orig del *.rej del *.exe + del $(CONFIG_VALUES) cd $(LISP) -del /s /q *.bak *.elc *.orig *.rej diff --git a/src/ChangeLog b/src/ChangeLog index 655559a..3335350 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,115 @@ +1998-12-16 Andy Piper + + * XEmacs 21.2.6 is released + +1998-12-08 Hrvoje Niksic + + * md5.c (Fmd5): Correctly initiate string input stream. + + * Makefile.in.in (tests): Add md5-tests.el. + +1998-12-06 Martin Buchholz + + * 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 + + * bytecode.c (Ffetch_bytecode): Fix crash when loading lazy-loaded + bytecode. + +1998-12-13 Martin Buchholz + + * console-msw.c: Function definitions follow coding standards + - This prevents e.g. find-tag on Lisp_Event finding DEVENT + +1998-12-11 Martin Buchholz + + * 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 + + * lisp.h: Fix up prototypes to match alloc.c + +1998-12-09 Andy Piper + + * glyphs-msw.c (init_image_instance_from_xbm_inline): don't use + XSETINT for assigning lisp objects. + +1998-12-07 Martin Buchholz + + * 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 + + * 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 + + * menubar-msw.c (mswindows_handle_wm_command): add back in checks + that got removed in the merge + +1998-11-30 Greg Klanderman + + * dired.c (vars_of_dired): bugfix for previous conditionalization + of user-name-completion on non- Windows NT. + +1998-12-08 Martin Buchholz + + * 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 + + * 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 * XEmacs 21.2.5 is released diff --git a/src/Makefile.in.in b/src/Makefile.in.in index c8d7c2d..0aaaeef 100644 --- a/src/Makefile.in.in +++ b/src/Makefile.in.in @@ -350,7 +350,7 @@ ${PROGNAME}: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp 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; \ @@ -454,10 +454,11 @@ run-temacs: temacs ## 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 @@ -692,7 +693,7 @@ clean: mostlyclean versionclean ## 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 diff --git a/src/alloc.c b/src/alloc.c index 49693df..509da0f 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -65,7 +65,14 @@ Boston, MA 02111-1307, USA. */ 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) @@ -1303,23 +1310,24 @@ mark_vector (Lisp_Object obj, void (*markobj) (Lisp_Object)) 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; } @@ -1339,7 +1347,7 @@ static Lisp_Vector * 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; @@ -1355,7 +1363,7 @@ static Lisp_Vector * 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"); @@ -1369,36 +1377,19 @@ make_vector_internal (size_t sizei) #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, /* @@ -1407,7 +1398,7 @@ See also the function `vector'. */ (length, init)) { - CHECK_NATNUM (length); + CONCHECK_NATNUM (length); return make_vector (XINT (length), init); } @@ -1417,15 +1408,17 @@ Any number of arguments, even zero arguments, are allowed. */ (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 @@ -1538,8 +1531,8 @@ static Lisp_Object all_bit_vectors; 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); @@ -1549,56 +1542,52 @@ make_bit_vector_internal (size_t sizei) 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, /* @@ -1618,20 +1607,20 @@ Any number of arguments, even zero arguments, are allowed. */ (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; + } } @@ -2113,13 +2102,13 @@ allocate_string_chars_struct (struct Lisp_String *string_it_goes_with, 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; } @@ -2307,12 +2296,10 @@ resize_string (struct Lisp_String *s, Bytecount pos, Bytecount delta) 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); @@ -2593,9 +2580,8 @@ Lisp_Object 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)); @@ -2607,15 +2593,19 @@ make_pure_string (CONST Bufbyte *data, Bytecount length, { 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 @@ -2629,7 +2619,7 @@ make_pure_string (CONST Bufbyte *data, Bytecount length, } 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); } @@ -2645,8 +2635,11 @@ make_pure_string (CONST Bufbyte *data, Bytecount length, /* 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; + } } @@ -2668,26 +2661,29 @@ make_pure_pname (CONST Bufbyte *data, Bytecount length, 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 @@ -2756,9 +2752,8 @@ make_pure_float (double num) 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); @@ -2780,8 +2775,11 @@ make_pure_vector (size_t len, Lisp_Object 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 @@ -3338,7 +3336,7 @@ pure_sizeof (Lisp_Object obj) } #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 @@ -3523,7 +3521,8 @@ sweep_vectors_1 (Lisp_Object *prev, 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; @@ -3563,8 +3562,9 @@ sweep_bit_vectors_1 (Lisp_Object *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; diff --git a/src/bytecode.c b/src/bytecode.c index b5111d1..b6a79b9 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -2336,7 +2336,7 @@ If the byte code for compiled function FUNCTION is lazy-loaded, fetch it now. 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)) @@ -2346,8 +2346,8 @@ If the byte code for compiled function FUNCTION is lazy-loaded, fetch it now. 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 (); diff --git a/src/console-msw.c b/src/console-msw.c index 8f28438..ddda9f6 100644 --- a/src/console-msw.c +++ b/src/console-msw.c @@ -84,49 +84,58 @@ vars_of_console_mswindows (void) * 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 diff --git a/src/database.c b/src/database.c index c42d41f..350f9af 100644 --- a/src/database.c +++ b/src/database.c @@ -498,19 +498,21 @@ berkdb_map (Lisp_Database *db, Lisp_Object func) 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 */ } diff --git a/src/dired.c b/src/dired.c index da7ed57..c2309f1 100644 --- a/src/dired.c +++ b/src/dired.c @@ -956,7 +956,9 @@ It is used by the functions `file-name-completion' and */ ); Vcompletion_ignored_extensions = Qnil; +#ifndef WINDOWSNT user_cache = NULL; user_cache_len = 0; user_cache_max = 0; +#endif } diff --git a/src/event-Xt.c b/src/event-Xt.c index ace3470..b729cfa 100644 --- a/src/event-Xt.c +++ b/src/event-Xt.c @@ -1756,6 +1756,8 @@ Xt_timeout_to_emacs_event (struct Lisp_Event *emacs_event) /* 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); } diff --git a/src/event-msw.c b/src/event-msw.c index e6e87d1..990f319 100644 --- a/src/event-msw.c +++ b/src/event-msw.c @@ -1446,6 +1446,8 @@ mswindows_wm_timer_callback (HWND hwnd, UINT umsg, UINT id_timer, DWORD dwtime) 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); } diff --git a/src/event-tty.c b/src/event-tty.c index 6f02747..00dd49c 100644 --- a/src/event-tty.c +++ b/src/event-tty.c @@ -71,6 +71,8 @@ tty_timeout_to_emacs_event (struct Lisp_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; } diff --git a/src/events.h b/src/events.h index 3968677..04e7cd4 100644 --- a/src/events.h +++ b/src/events.h @@ -393,7 +393,8 @@ struct timeout_data { int interval_id; int id_number; - Lisp_Object function, object; + Lisp_Object function; + Lisp_Object object; }; struct eval_data diff --git a/src/filelock.c b/src/filelock.c index 96ee76d..44a4f43 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -157,9 +157,6 @@ lock_file_1 (char *lfname,int force) 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; @@ -195,8 +192,8 @@ current_lock_owner (lock_info_type *owner, char *lfname) /* 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; diff --git a/src/frame-msw.c b/src/frame-msw.c index 2b2b10c..3325da7 100644 --- a/src/frame-msw.c +++ b/src/frame-msw.c @@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA. */ #include "buffer.h" #include "console-msw.h" #include "glyphs-msw.h" +#include "elhash.h" #include "events.h" #include "faces.h" #include "frame.h" @@ -128,8 +129,8 @@ mswindows_init_frame_1 (struct frame *f, Lisp_Object props) 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, diff --git a/src/glyphs-msw.c b/src/glyphs-msw.c index 2de86b6..34e4130 100644 --- a/src/glyphs-msw.c +++ b/src/glyphs-msw.c @@ -1732,10 +1732,10 @@ init_image_instance_from_xbm_inline (struct Lisp_Image_Instance *ii, 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)) diff --git a/src/lisp.h b/src/lisp.h index c820d52..8fed55f 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2160,12 +2160,12 @@ typedef unsigned long uintptr_t; /* 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); diff --git a/src/md5.c b/src/md5.c index 86fb828..acb9f0d 100644 --- a/src/md5.c +++ b/src/md5.c @@ -563,7 +563,7 @@ file-coding or Mule support. Otherwise, they are ignored. 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); diff --git a/src/menubar-msw.c b/src/menubar-msw.c index 218b2a8..0c8eaf7 100644 --- a/src/menubar-msw.c +++ b/src/menubar-msw.c @@ -623,7 +623,11 @@ mswindows_handle_wm_command (struct frame* f, WORD id) 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); diff --git a/src/opaque.h b/src/opaque.h index e9ddf0a..f12a985 100644 --- a/src/opaque.h +++ b/src/opaque.h @@ -80,7 +80,7 @@ Lisp_Object make_opaque_long (long val); 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)) diff --git a/src/s/windowsnt.h b/src/s/windowsnt.h index 1d94772..da826bc 100644 --- a/src/s/windowsnt.h +++ b/src/s/windowsnt.h @@ -269,8 +269,8 @@ int kill (int pid, int sig); #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 diff --git a/src/sysdep.c b/src/sysdep.c index 9755327..a24221d 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -212,7 +212,9 @@ set_descriptor_non_blocking (int fd) } #endif +#ifdef F_SETFL fcntl (fd, F_SETFL, O_NONBLOCK); +#endif } #if defined (NO_SUBPROCESSES)