Mercurial > hg > xemacs-beta
changeset 5126:2a462149bd6a ben-lisp-object
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 24 Feb 2010 19:04:27 -0600 |
parents | b5df3737028a (current diff) 78a3c171a427 (diff) |
children | a9c41067dd88 |
files | lisp/ChangeLog src/ChangeLog src/alloc.c src/buffer.c src/console-msw-impl.h src/console.c src/device-tty.c src/device-x.c src/dynarr.c src/emacs.c src/eval.c src/event-stream.c src/events.c src/extents.c src/faces.c src/faces.h src/file-coding.c src/fns.c src/frame-gtk.c src/frame-impl.h src/frame-msw.c src/frame-x.c src/frame.c src/frame.h src/glyphs.c src/keymap.c src/lisp.h src/lrecord.h src/lstream.c src/objects-tty.c src/syntax.c src/toolbar.c src/window.c src/window.h tests/automated/test-harness.el |
diffstat | 99 files changed, 4738 insertions(+), 2580 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Feb 24 01:58:04 2010 -0600 +++ b/ChangeLog Wed Feb 24 19:04:27 2010 -0600 @@ -1,3 +1,8 @@ +2010-02-20 Ben Wing <ben@xemacs.org> + + * configure.ac (XE_COMPLEX_ARG): + Correct doc of --quick-build: It also doesn't check for Lisp shadows. + 2010-02-08 Ben Wing <ben@xemacs.org> * configure:
--- a/configure.ac Wed Feb 24 01:58:04 2010 -0600 +++ b/configure.ac Wed Feb 24 19:04:27 2010 -0600 @@ -1032,13 +1032,13 @@ AS_HELP_STRING([--with-quick-build],[Speed up the build cycle by leaving out steps where XEmacs will still work (more or less) without them. Potentially dangerous if you don't know what you're - doing. This (1) doesn't garbage-collect after loading - each file during dumping, (2) doesn't + doing. This (1) Doesn't garbage-collect after loading + each file during dumping, (2) Doesn't automatically rebuild the DOC file (remove it by hand to get it rebuilt), (3) Removes config.h, lisp.h and associated files from the dependency lists, so changes to these files don't automatically cause all .c files - to be rebuilt.]), + to be rebuilt, (4) Doesn't check for Lisp shadows.]), [], []) XE_MERGED_ARG([union-type], AS_HELP_STRING([--with-union-type],[Use union definition of Lisp_Object type. Known to trigger bugs in some compilers.]),
--- a/etc/ChangeLog Wed Feb 24 01:58:04 2010 -0600 +++ b/etc/ChangeLog Wed Feb 24 19:04:27 2010 -0600 @@ -1,3 +1,8 @@ +2010-02-22 Ben Wing <ben@xemacs.org> + + * dbxrc.in: + test-harness.el is in lisp directory now. + 2010-01-28 Jerry James <james@xemacs.org> * tests/external-widget/Makefile: Add copyright and license
--- a/etc/dbxrc.in Wed Feb 24 01:58:04 2010 -0600 +++ b/etc/dbxrc.in Wed Feb 24 19:04:27 2010 -0600 @@ -4,6 +4,7 @@ ## The generated file depends on src/config.h (currently only in one place). ## Copyright (C) 1998 Free Software Foundation, Inc. +## Copyright (C) 2010 Ben Wing. ## This file is part of XEmacs. @@ -194,7 +195,7 @@ end function check-xemacs { - run -batch -l ../tests/automated/test-harness.el -f batch-test-emacs ../tests/automated + run -batch -l test-harness -f batch-test-emacs ../tests/automated } document check-temacs << 'end' @@ -205,7 +206,7 @@ end function check-temacs { - run-temacs -q -batch -l ../tests/automated/test-harness.el -f batch-test-emacs ../tests/automated + run-temacs -q -batch -l test-harness -f batch-test-emacs ../tests/automated } document update-elc << 'end'
--- a/lisp/ChangeLog Wed Feb 24 01:58:04 2010 -0600 +++ b/lisp/ChangeLog Wed Feb 24 19:04:27 2010 -0600 @@ -1,3 +1,168 @@ +2010-02-23 Ben Wing <ben@xemacs.org> + + * help.el: fux typo in comment. (oops) + +2010-02-23 Ben Wing <ben@xemacs.org> + + * autoload.el: + * autoload.el (make-autoload): + * cl-macs.el (cl-function-arglist): + * cl-macs.el (cl-transform-lambda): + Don't add argument list with the tag "Common Lisp lambda list:"; + instead add in "standard" form using "arguments:" and omitting the + function name. Add an arg to `cl-function-arglist' to omit the + name and use it in autoload.el instead of just hacking it off. + + * help.el: + * help.el (function-arglist): + * help.el (function-documentation-1): New. + Extract out common code to recognize and/or strip the arglist from + documentation into `function-documentation-1'. Use in + `function-arglist' and `function-documentation'. Modify + `function-arglist' so it looks for the `arguments: ' stuff in all + doc strings, not just subrs/autoloads, so that CL functions get + recognized properly. Change the regexp used to match "arguments: " + specs to allow nested parens inside the arg list (happens when you + have a default value specified in a CL arglist). + +2010-02-22 Ben Wing <ben@xemacs.org> + + * test-harness.el: + * test-harness.el (test-harness-from-buffer): + * test-harness.el (batch-test-emacs): + Move file from tests/automated into lisp/ so it gets + byte-compiled. This significantly reduces the amount of extra + crap in outputted backtraces. Delete hack in batch-test-emacs to + look for test-harness.el in the test directory since it's not there + any more. + + Also, in `Check-Message', incorporate call to `Skip-Test-Unless' + in the macro output rather than its body, to avoid problems byte- + compiling the file -- `Skip-Test-Unless' isn't available in the + environment during byte-compilation so we can't call it then. + +2010-02-22 Ben Wing <ben@xemacs.org> + + * mule/make-coding-system.el: + * mule/make-coding-system.el (fixed-width-generate-helper): + * mule/make-coding-system.el (fixed-width-private-use-start): Removed. + * mule/make-coding-system.el (fixed-width-create-decode-encode-tables): + * coding.el: + * coding.el (decode-char): New. + * coding.el (featurep): + * coding.el (encode-char): New. + * dumped-lisp.el (preloaded-file-list): + Dump make-coding-system. Aidan's hack to avoid dumping this file + never really worked right -- with some configurations (not clear + exactly which ones) `make-coding-system.el' gets dumped anyway due to + calls to `make-coding-system' in unicode.el, with the result that + the documentation of functions in make-coding-system.el gets lost. + + Also needed to remove defvar fixed-width-private-use-start and + incorporate it inline, due to bootstrapping issues -- the call to + decode-char introduced a cross-dependency between unicode.el and + make-coding-system.el. + + +2010-02-22 Ben Wing <ben@xemacs.org> + + * cl-seq.el: + * cl-seq.el (stable-union): New. + * cl-seq.el (stable-intersection): New. + New functions to do stable set operations, i.e. preserve the order + of the elements in the argument lists, and prefer LIST1 over LIST2 + when ordering the combined result. The result looks as much like + LIST1 as possible, followed (in the case of `stable-union') by + any necessary elements from LIST2, in order. This is contrary to + `union' and `intersection', which are not required to be order- + preserving and are not -- they prefer LIST2 and output results in + backwards order. + +2010-02-22 Ben Wing <ben@xemacs.org> + + * cl-seq.el: + * cl-seq.el (reduce): + * cl-seq.el (fill): + * cl-seq.el (replace): + * cl-seq.el (remove*): + * cl-seq.el (remove-if): + * cl-seq.el (remove-if-not): + * cl-seq.el (delete*): + * cl-seq.el (delete-if): + * cl-seq.el (delete-if-not): + * cl-seq.el (remove-duplicates): + * cl-seq.el (delete-duplicates): + * cl-seq.el (substitute): + * cl-seq.el (substitute-if): + * cl-seq.el (substitute-if-not): + * cl-seq.el (nsubstitute): + * cl-seq.el (nsubstitute-if): + * cl-seq.el (nsubstitute-if-not): + * cl-seq.el (find): + * cl-seq.el (find-if): + * cl-seq.el (find-if-not): + * cl-seq.el (position): + * cl-seq.el (position-if): + * cl-seq.el (position-if-not): + * cl-seq.el (count): + * cl-seq.el (count-if): + * cl-seq.el (count-if-not): + * cl-seq.el (mismatch): + * cl-seq.el (search): + * cl-seq.el (sort*): + * cl-seq.el (stable-sort): + * cl-seq.el (merge): + * cl-seq.el (member*): + * cl-seq.el (member-if): + * cl-seq.el (member-if-not): + * cl-seq.el (assoc*): + * cl-seq.el (assoc-if): + * cl-seq.el (assoc-if-not): + * cl-seq.el (rassoc*): + * cl-seq.el (rassoc-if): + * cl-seq.el (rassoc-if-not): + * cl-seq.el (union): + * cl-seq.el (nunion): + * cl-seq.el (intersection): + * cl-seq.el (nintersection): + * cl-seq.el (set-difference): + * cl-seq.el (nset-difference): + * cl-seq.el (set-exclusive-or): + * cl-seq.el (nset-exclusive-or): + * cl-seq.el (subsetp): + * cl-seq.el (subst-if): + * cl-seq.el (subst-if-not): + * cl-seq.el (nsubst): + * cl-seq.el (nsubst-if): + * cl-seq.el (nsubst-if-not): + * cl-seq.el (sublis): + * cl-seq.el (nsublis): + * cl-seq.el (tree-equal): + * cl-seq.el (cl-tree-equal-rec): + * cl.el: + * cl.el (pushnew): + * cl.el (adjoin): + * cl.el (subst): + Document the keywords to the various sequence/list functions. + +2010-02-21 Ben Wing <ben@xemacs.org> + + * diagnose.el: + * diagnose.el (show-object-memory-usage-stats): + Fix errors preventing this from working properly, account for + words like "entry" pluralized to "entries". + +2010-02-22 Aidan Kehoe <kehoea@parhasard.net> + + * cl-extra.el (constantly): + Add this function, from ANSI Common Lisp, using the SBCL extension + that extra arguments to it are passed back as multiple values in + the constructed function. + * cl-macs.el (constantly): + In the compiler macro for #'constantly, construct a + compiled-function object almost every time, at compile time when + all arguments are constant, and at runtime when they vary. + 2010-02-08 Ben Wing <ben@xemacs.org> * help.el (describe-function-1):
--- a/lisp/autoload.el Wed Feb 24 01:58:04 2010 -0600 +++ b/lisp/autoload.el Wed Feb 24 19:04:27 2010 -0600 @@ -2,7 +2,7 @@ ;; Copyright (C) 1991-1994, 1997, 2003 Free Software Foundation, Inc. ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp. -;; Copyright (C) 1996, 2000, 2002, 2003, 2004 Ben Wing. +;; Copyright (C) 1996, 2000, 2002, 2003, 2004, 2010 Ben Wing. ;; Original Author: Roland McGrath <roland@gnu.ai.mit.edu> ;; Heavily Modified: XEmacs Maintainers @@ -290,10 +290,8 @@ (placeholder (eval-when-compile (gensym)))) (setq doc (concat (or doc "") "\n\narguments: " - (replace-in-string - (cl-function-arglist placeholder arglist) - (format "^(%s ?" placeholder) - "(") "\n")))) + (cl-function-arglist placeholder arglist t) + "\n")))) ;; `define-generic-mode' quotes the name, so take care of that (list 'autoload (if (listp name) name (list 'quote name)) file doc (or (and (memq car '(define-skeleton define-derived-mode
--- a/lisp/cl-extra.el Wed Feb 24 01:58:04 2010 -0600 +++ b/lisp/cl-extra.el Wed Feb 24 19:04:27 2010 -0600 @@ -612,6 +612,17 @@ ((memq (car plst) indicator-list) (return (values (car plst) (cadr plst) plst)))))) +;; See our compiler macro in cl-macs.el, we will only pass back the +;; actual lambda list in interpreted code or if we've been funcalled +;; (from #'apply or #'mapcar or whatever). +(defun constantly (value &rest more-values) + "Construct a function always returning VALUE, and possibly MORE-VALUES. + +The constructed function accepts any number of arguments, and ignores them. + +Members of MORE-VALUES, if provided, will be passed as multiple values; see +`multiple-value-bind' and `multiple-value-setq'." + `(lambda (&rest ignore) (values-list ',(cons value more-values)))) ;;; Hash tables.
--- a/lisp/cl-macs.el Wed Feb 24 01:58:04 2010 -0600 +++ b/lisp/cl-macs.el Wed Feb 24 19:04:27 2010 -0600 @@ -299,29 +299,33 @@ ;; npak@ispras.ru ;;;###autoload -(defun cl-function-arglist (name arglist) +(defun cl-function-arglist (name arglist &optional omit-name) "Returns string with printed representation of arguments list. Supports Common Lisp lambda lists." + ;; #### I would just change this so that OMIT-NAME is always true and + ;; eliminate the argument, but this function is autoloaded, which means + ;; someone might be using it somewhere. (if (not (or (listp arglist) (symbolp arglist))) "Not available" (check-argument-type #'true-list-p arglist) (let ((print-gensym nil)) (condition-case nil (prin1-to-string - (cons (if (eq name 'cl-none) 'lambda name) - (cond ((null arglist) nil) - ((listp arglist) (cl-upcase-arg arglist)) - ((symbolp arglist) - (cl-upcase-arg (list '&rest arglist))) - (t (wrong-type-argument 'listp arglist))))) - (t "Not available"))))) + (let ((args (cond ((null arglist) nil) + ((listp arglist) (cl-upcase-arg arglist)) + ((symbolp arglist) + (cl-upcase-arg (list '&rest arglist))) + (t (wrong-type-argument 'listp arglist))))) + (if omit-name args + (cons (if (eq name 'cl-none) 'lambda name) args)))) + (t "Not available"))))) (defun cl-transform-lambda (form bind-block) (let* ((args (car form)) (body (cdr form)) (bind-defs nil) (bind-enquote nil) (bind-inits nil) (bind-lets nil) (bind-forms nil) (header nil) (simple-args nil) - (complex-arglist (cl-function-arglist bind-block args)) + (complex-arglist (cl-function-arglist bind-block args t)) (doc "")) (while (or (stringp (car body)) (eq (car-safe (car body)) 'interactive)) (push (pop body) header)) @@ -348,12 +352,12 @@ ;; Add CL lambda list to documentation, if the CL lambda list differs ;; from the non-CL lambda list. npak@ispras.ru (unless (equal complex-arglist - (cl-function-arglist bind-block simple-args)) + (cl-function-arglist bind-block simple-args t)) (and (stringp (car header)) (setq doc (pop header))) - (push (concat doc - "\n\nCommon Lisp lambda list:\n" - " " complex-arglist "\n\n") - header)) + ;; Stick the arguments onto the end of the doc string in a way that + ;; will be recognized specially by `function-arglist'. + (push (concat doc "\n\narguments: " complex-arglist "\n") + header)) (if (null args) (list* nil simple-args (nconc header body)) (if (memq '&optional simple-args) (push '&optional args)) @@ -3551,6 +3555,41 @@ (define-compiler-macro notevery (&whole form &rest cl-rest) (cons 'not (cons 'every (cdr cl-rest)))) +(define-compiler-macro constantly (&whole form value &rest more-values) + (cond + ((< (length form) 2) + ;; Error at runtime: + form) + ((cl-const-exprs-p (cdr form)) + `#'(lambda (&rest ignore) (values ,@(cdr form)))) + (t + (let* ((num-values (length (cdr form))) + (placeholders-counts (make-vector num-values -1)) + (placeholders (loop + for i from 0 below num-values + collect (make-symbol (format "%d" i)))) + (compiled + (byte-compile-sexp + `#'(lambda (&rest ignore) + ;; Compiles to a references into the compiled function + ;; constants vector: + (values ,@(mapcar #'quote-maybe placeholders))))) + position) + `(make-byte-code '(&rest ignore) + ,(compiled-function-instructions compiled) + (vector ,@(loop + for constant across (compiled-function-constants compiled) + collect (if (setq position + (position constant placeholders)) + (prog2 + (incf (aref placeholders-counts position)) + (nth position (cdr form))) + (quote-maybe constant)) + finally + (assert (every #'zerop placeholders-counts) + t "Placeholders should each have been used once"))) + ,(compiled-function-stack-depth compiled)))))) + (mapc #'(lambda (y) (put (car y) 'side-effect-free t)
--- a/lisp/cl-seq.el Wed Feb 24 01:58:04 2010 -0600 +++ b/lisp/cl-seq.el Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,7 @@ ;;; cl-seq.el --- Common Lisp extensions for XEmacs Lisp (part three) ;; Copyright (C) 1993 Free Software Foundation, Inc. +;; Copyright (C) 2010 Ben Wing. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Maintainer: XEmacs Development Team @@ -147,8 +148,18 @@ (defun reduce (cl-func cl-seq &rest cl-keys) - "Reduce two-argument FUNCTION across SEQUENCE. -Keywords supported: :start :end :from-end :initial-value :key" + "Combine the elements of sequence using FUNCTION, a binary operation. +For example, `(reduce #'+ SEQUENCE)' returns the sum of all elements in +SEQUENCE, and `(reduce #'union SEQUENCE)' returns the union of all elements +in SEQUENCE. +Keywords supported: :start :end :from-end :initial-value :key +See `remove*' for the meaning of :start, :end, :from-end and :key. +:initial-value specifies an element (typically an identity element, such as 0) +that is conceptually prepended to the sequence (or appended, when :from-end +is given). +If the sequence has one element, that element is returned directly. +If the sequence has no elements, :initial-value is returned if given; +otherwise, FUNCTION is called with no arguments, and its result returned." (cl-parsing-keywords (:from-end (:start 0) :end :initial-value :key) () (or (listp cl-seq) (setq cl-seq (append cl-seq nil))) (setq cl-seq (subseq cl-seq cl-start cl-end)) @@ -167,7 +178,9 @@ (defun fill (seq item &rest cl-keys) "Fill the elements of SEQ with ITEM. -Keywords supported: :start :end" +Keywords supported: :start :end +:start and :end specify a subsequence of SEQ; see `remove*' for more +information." (cl-parsing-keywords ((:start 0) :end) () (if (listp seq) (let ((p (nthcdr cl-start seq)) @@ -186,7 +199,9 @@ (defun replace (cl-seq1 cl-seq2 &rest cl-keys) "Replace the elements of SEQ1 with the elements of SEQ2. SEQ1 is destructively modified, then returned. -Keywords supported: :start1 :end1 :start2 :end2" +Keywords supported: :start1 :end1 :start2 :end2 +:start1 and :end1 specify a subsequence of SEQ1, and :start2 and :end2 a +subsequence of SEQ2; see `search' for more information." (cl-parsing-keywords ((:start1 0) :end1 (:start2 0) :end2) () (if (and (eq cl-seq1 cl-seq2) (<= cl-start2 cl-start1)) (or (= cl-start1 cl-start2) @@ -228,7 +243,19 @@ "Remove all occurrences of ITEM in SEQ. This is a non-destructive function; it makes a copy of SEQ if necessary to avoid corrupting the original SEQ. -Keywords supported: :test :test-not :key :count :start :end :from-end" +Keywords supported: :test :test-not :key :count :start :end :from-end +The keywords :test and :test-not specify two-argument test and negated-test +predicates, respectively; :test defaults to `eql'. :key specifies a +one-argument function that transforms elements of SEQ into \"comparison keys\" +before the test predicate is applied. See `member*' for more information +on these keywords. +:start and :end, if given, specify indices of a subsequence of SEQ to +be processed. Indices are 0-based and processing involves the subsequence +starting at the index given by :start and ending just before the index +given by :end. +:count, if given, limits the number of items removed to the number specified. +:from-end, if given, causes processing to proceed starting from the end +instead of the beginning; in this case, this matters only if :count is given." (cl-parsing-keywords (:test :test-not :key :if :if-not :count :from-end (:start 0) :end) () (if (<= (or cl-count (setq cl-count 8000000)) 0) @@ -272,20 +299,23 @@ "Remove all items satisfying PREDICATE in SEQ. This is a non-destructive function; it makes a copy of SEQ if necessary to avoid corrupting the original SEQ. -Keywords supported: :key :count :start :end :from-end" +Keywords supported: :key :count :start :end :from-end +See `remove*' for the meaning of the keywords." (apply 'remove* nil cl-list :if cl-pred cl-keys)) (defun remove-if-not (cl-pred cl-list &rest cl-keys) "Remove all items not satisfying PREDICATE in SEQ. This is a non-destructive function; it makes a copy of SEQ if necessary to avoid corrupting the original SEQ. -Keywords supported: :key :count :start :end :from-end" +Keywords supported: :key :count :start :end :from-end +See `remove*' for the meaning of the keywords." (apply 'remove* nil cl-list :if-not cl-pred cl-keys)) (defun delete* (cl-item cl-seq &rest cl-keys) "Remove all occurrences of ITEM in SEQ. This is a destructive function; it reuses the storage of SEQ whenever possible. -Keywords supported: :test :test-not :key :count :start :end :from-end" +Keywords supported: :test :test-not :key :count :start :end :from-end +See `remove*' for the meaning of the keywords." (cl-parsing-keywords (:test :test-not :key :if :if-not :count :from-end (:start 0) :end) () (if (<= (or cl-count (setq cl-count 8000000)) 0) @@ -327,16 +357,18 @@ (defun delete-if (cl-pred cl-list &rest cl-keys) "Remove all items satisfying PREDICATE in SEQ. This is a destructive function; it reuses the storage of SEQ whenever possible. -Keywords supported: :key :count :start :end :from-end" +Keywords supported: :key :count :start :end :from-end +See `remove*' for the meaning of the keywords." (apply 'delete* nil cl-list :if cl-pred cl-keys)) (defun delete-if-not (cl-pred cl-list &rest cl-keys) "Remove all items not satisfying PREDICATE in SEQ. This is a destructive function; it reuses the storage of SEQ whenever possible. -Keywords supported: :key :count :start :end :from-end" +Keywords supported: :key :count :start :end :from-end +See `remove*' for the meaning of the keywords." (apply 'delete* nil cl-list :if-not cl-pred cl-keys)) -;; XEmacs change: this is in subr.el in Emacs +;; XEmacs change: this is in subr.el in GNU Emacs (defun remove (cl-item cl-seq) "Remove all occurrences of ITEM in SEQ, testing with `equal' This is a non-destructive function; it makes a copy of SEQ if necessary @@ -344,7 +376,7 @@ Also see: `remove*', `delete', `delete*'" (remove* cl-item cl-seq ':test 'equal)) -;; XEmacs change: this is in subr.el in Emacs +;; XEmacs change: this is in subr.el in GNU Emacs (defun remq (cl-elt cl-list) "Remove all occurrences of ELT in LIST, comparing with `eq'. This is a non-destructive function; it makes a copy of LIST to avoid @@ -356,12 +388,14 @@ (defun remove-duplicates (cl-seq &rest cl-keys) "Return a copy of SEQ with all duplicate elements removed. -Keywords supported: :test :test-not :key :start :end :from-end" +Keywords supported: :test :test-not :key :start :end :from-end +See `remove*' for the meaning of the keywords." (cl-delete-duplicates cl-seq cl-keys t)) (defun delete-duplicates (cl-seq &rest cl-keys) "Remove all duplicate elements from SEQ (destructively). -Keywords supported: :test :test-not :key :start :end :from-end" +Keywords supported: :test :test-not :key :start :end :from-end +See `remove*' for the meaning of the keywords." (cl-delete-duplicates cl-seq cl-keys nil)) (defun cl-delete-duplicates (cl-seq cl-keys cl-copy) @@ -408,7 +442,8 @@ "Substitute NEW for OLD in SEQ. This is a non-destructive function; it makes a copy of SEQ if necessary to avoid corrupting the original SEQ. -Keywords supported: :test :test-not :key :count :start :end :from-end" +Keywords supported: :test :test-not :key :count :start :end :from-end +See `remove*' for the meaning of the keywords." (cl-parsing-keywords (:test :test-not :key :if :if-not :count (:start 0) :end :from-end) () (if (or (eq cl-old cl-new) @@ -428,20 +463,21 @@ "Substitute NEW for all items satisfying PREDICATE in SEQ. This is a non-destructive function; it makes a copy of SEQ if necessary to avoid corrupting the original SEQ. -Keywords supported: :key :count :start :end :from-end" +See `remove*' for the meaning of the keywords." (apply 'substitute cl-new nil cl-list :if cl-pred cl-keys)) (defun substitute-if-not (cl-new cl-pred cl-list &rest cl-keys) "Substitute NEW for all items not satisfying PREDICATE in SEQ. This is a non-destructive function; it makes a copy of SEQ if necessary to avoid corrupting the original SEQ. -Keywords supported: :key :count :start :end :from-end" +See `remove*' for the meaning of the keywords." (apply 'substitute cl-new nil cl-list :if-not cl-pred cl-keys)) (defun nsubstitute (cl-new cl-old cl-seq &rest cl-keys) "Substitute NEW for OLD in SEQ. This is a destructive function; it reuses the storage of SEQ whenever possible. -Keywords supported: :test :test-not :key :count :start :end :from-end" +Keywords supported: :test :test-not :key :count :start :end :from-end +See `remove*' for the meaning of the keywords." (cl-parsing-keywords (:test :test-not :key :if :if-not :count (:start 0) :end :from-end) () (or (eq cl-old cl-new) (<= (or cl-count (setq cl-count 8000000)) 0) @@ -473,38 +509,44 @@ (defun nsubstitute-if (cl-new cl-pred cl-list &rest cl-keys) "Substitute NEW for all items satisfying PREDICATE in SEQ. This is a destructive function; it reuses the storage of SEQ whenever possible. -Keywords supported: :key :count :start :end :from-end" +Keywords supported: :key :count :start :end :from-end +See `remove*' for the meaning of the keywords." (apply 'nsubstitute cl-new nil cl-list :if cl-pred cl-keys)) (defun nsubstitute-if-not (cl-new cl-pred cl-list &rest cl-keys) "Substitute NEW for all items not satisfying PREDICATE in SEQ. This is a destructive function; it reuses the storage of SEQ whenever possible. -Keywords supported: :key :count :start :end :from-end" +Keywords supported: :key :count :start :end :from-end +See `remove*' for the meaning of the keywords." (apply 'nsubstitute cl-new nil cl-list :if-not cl-pred cl-keys)) (defun find (cl-item cl-seq &rest cl-keys) "Find the first occurrence of ITEM in LIST. Return the matching ITEM, or nil if not found. -Keywords supported: :test :test-not :key :start :end :from-end" +Keywords supported: :test :test-not :key :start :end :from-end +See `remove*' for the meaning of the keywords." (let ((cl-pos (apply 'position cl-item cl-seq cl-keys))) (and cl-pos (elt cl-seq cl-pos)))) (defun find-if (cl-pred cl-list &rest cl-keys) "Find the first item satisfying PREDICATE in LIST. Return the matching ITEM, or nil if not found. -Keywords supported: :key :start :end :from-end" +Keywords supported: :key :start :end :from-end +See `remove*' for the meaning of the keywords." (apply 'find nil cl-list :if cl-pred cl-keys)) (defun find-if-not (cl-pred cl-list &rest cl-keys) "Find the first item not satisfying PREDICATE in LIST. Return the matching ITEM, or nil if not found. -Keywords supported: :key :start :end :from-end" +Keywords supported: :key :start :end :from-end +See `remove*' for the meaning of the keywords." (apply 'find nil cl-list :if-not cl-pred cl-keys)) (defun position (cl-item cl-seq &rest cl-keys) "Find the first occurrence of ITEM in LIST. Return the index of the matching item, or nil if not found. -Keywords supported: :test :test-not :key :start :end :from-end" +Keywords supported: :test :test-not :key :start :end :from-end +See `remove*' for the meaning of the keywords." (cl-parsing-keywords (:test :test-not :key :if :if-not (:start 0) :end :from-end) () (cl-position cl-item cl-seq cl-start cl-end cl-from-end))) @@ -533,18 +575,21 @@ (defun position-if (cl-pred cl-list &rest cl-keys) "Find the first item satisfying PREDICATE in LIST. Return the index of the matching item, or nil if not found. -Keywords supported: :key :start :end :from-end" +Keywords supported: :key :start :end :from-end +See `remove*' for the meaning of the keywords." (apply 'position nil cl-list :if cl-pred cl-keys)) (defun position-if-not (cl-pred cl-list &rest cl-keys) "Find the first item not satisfying PREDICATE in LIST. Return the index of the matching item, or nil if not found. -Keywords supported: :key :start :end :from-end" +Keywords supported: :key :start :end :from-end +See `remove*' for the meaning of the keywords." (apply 'position nil cl-list :if-not cl-pred cl-keys)) (defun count (cl-item cl-seq &rest cl-keys) "Count the number of occurrences of ITEM in LIST. -Keywords supported: :test :test-not :key :start :end" +Keywords supported: :test :test-not :key :start :end +See `remove*' for the meaning of the keywords." (cl-parsing-keywords (:test :test-not :key :if :if-not (:start 0) :end) () (let ((cl-count 0) cl-x) (or cl-end (setq cl-end (length cl-seq))) @@ -557,19 +602,22 @@ (defun count-if (cl-pred cl-list &rest cl-keys) "Count the number of items satisfying PREDICATE in LIST. -Keywords supported: :key :start :end" +Keywords supported: :key :start :end +See `remove*' for the meaning of the keywords." (apply 'count nil cl-list :if cl-pred cl-keys)) (defun count-if-not (cl-pred cl-list &rest cl-keys) "Count the number of items not satisfying PREDICATE in LIST. -Keywords supported: :key :start :end" +Keywords supported: :key :start :end +See `remove*' for the meaning of the keywords." (apply 'count nil cl-list :if-not cl-pred cl-keys)) (defun mismatch (cl-seq1 cl-seq2 &rest cl-keys) "Compare SEQ1 with SEQ2, return index of first mismatching element. Return nil if the sequences match. If one sequence is a prefix of the other, the return value indicates the end of the shorter sequence. -Keywords supported: :test :test-not :key :start1 :end1 :start2 :end2 :from-end" +Keywords supported: :test :test-not :key :start1 :end1 :start2 :end2 :from-end +See `search' for the meaning of the keywords." (cl-parsing-keywords (:test :test-not :key :from-end (:start1 0) :end1 (:start2 0) :end2) () (or cl-end1 (setq cl-end1 (length cl-seq1))) @@ -598,7 +646,10 @@ "Search for SEQ1 as a subsequence of SEQ2. Return the index of the leftmost element of the first match found; return nil if there are no matches. -Keywords supported: :test :test-not :key :start1 :end1 :start2 :end2 :from-end" +Keywords supported: :test :test-not :key :start1 :end1 :start2 :end2 :from-end +See `remove*' for the meaning of the keywords. In this case, :start1 and :end1 +specify a subsequence of SEQ1, and :start2 and :end2 specify a subsequence +of SEQ2." (cl-parsing-keywords (:test :test-not :key :from-end (:start1 0) :end1 (:start2 0) :end2) () (or cl-end1 (setq cl-end1 (length cl-seq1))) @@ -622,7 +673,10 @@ (defun sort* (cl-seq cl-pred &rest cl-keys) "Sort the argument SEQUENCE according to PREDICATE. This is a destructive function; it reuses the storage of SEQUENCE if possible. -Keywords supported: :key" +Keywords supported: :key +:key specifies a one-argument function that transforms elements of SEQUENCE +into \"comparison keys\" before the test predicate is applied. See +`member*' for more information." (if (nlistp cl-seq) (replace cl-seq (apply 'sort* (append cl-seq nil) cl-pred cl-keys)) (cl-parsing-keywords (:key) () @@ -635,14 +689,20 @@ (defun stable-sort (cl-seq cl-pred &rest cl-keys) "Sort the argument SEQUENCE stably according to PREDICATE. This is a destructive function; it reuses the storage of SEQUENCE if possible. -Keywords supported: :key" +Keywords supported: :key +:key specifies a one-argument function that transforms elements of SEQUENCE +into \"comparison keys\" before the test predicate is applied. See +`member*' for more information." (apply 'sort* cl-seq cl-pred cl-keys)) (defun merge (cl-type cl-seq1 cl-seq2 cl-pred &rest cl-keys) "Destructively merge the two sequences to produce a new sequence. TYPE is the sequence type to return, SEQ1 and SEQ2 are the two argument sequences, and PRED is a `less-than' predicate on the elements. -Keywords supported: :key" +Keywords supported: :key +:key specifies a one-argument function that transforms elements of SEQ1 and +SEQ2 into \"comparison keys\" before the test predicate is applied. See +`member*' for more information." (or (listp cl-seq1) (setq cl-seq1 (append cl-seq1 nil))) (or (listp cl-seq2) (setq cl-seq2 (append cl-seq2 nil))) (cl-parsing-keywords (:key) () @@ -658,7 +718,18 @@ (defun member* (cl-item cl-list &rest cl-keys) "Find the first occurrence of ITEM in LIST. Return the sublist of LIST whose car is ITEM. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +The keyword :test specifies a two-argument function that is used to + compare ITEM with elements in LIST; if omitted, it defaults to `eql'. +The keyword :test-not is similar, but specifies a negated predicate. That + is, ITEM is considered equal to an element in LIST if the given predicate + returns nil. +:key specifies a one-argument function that transforms elements of LIST into +\"comparison keys\" before the test predicate is applied. For example, +if :key is #'car, then ITEM is compared with the car of elements from LIST1. +The :key function, however, is not applied to ITEM, and does not affect the +elements in the returned list, which are taken directly from the elements in +LIST." (if cl-keys (cl-parsing-keywords (:test :test-not :key :if :if-not) () (while (and cl-list (not (cl-check-test cl-item (car cl-list)))) @@ -671,13 +742,15 @@ (defun member-if (cl-pred cl-list &rest cl-keys) "Find the first item satisfying PREDICATE in LIST. Return the sublist of LIST whose car matches. -Keywords supported: :key" +Keywords supported: :key +See `member*' for the meaning of :key." (apply 'member* nil cl-list :if cl-pred cl-keys)) (defun member-if-not (cl-pred cl-list &rest cl-keys) "Find the first item not satisfying PREDICATE in LIST. Return the sublist of LIST whose car matches. -Keywords supported: :key" +Keywords supported: :key +See `member*' for the meaning of :key." (apply 'member* nil cl-list :if-not cl-pred cl-keys)) (defun cl-adjoin (cl-item cl-list &rest cl-keys) @@ -689,7 +762,8 @@ ;;; See compiler macro in cl-macs.el (defun assoc* (cl-item cl-alist &rest cl-keys) "Find the first item whose car matches ITEM in LIST. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `member*' for the meaning of :test, :test-not and :key." (if cl-keys (cl-parsing-keywords (:test :test-not :key :if :if-not) () (while (and cl-alist @@ -703,17 +777,20 @@ (defun assoc-if (cl-pred cl-list &rest cl-keys) "Find the first item whose car satisfies PREDICATE in LIST. -Keywords supported: :key" +Keywords supported: :key +See `member*' for the meaning of :key." (apply 'assoc* nil cl-list :if cl-pred cl-keys)) (defun assoc-if-not (cl-pred cl-list &rest cl-keys) "Find the first item whose car does not satisfy PREDICATE in LIST. -Keywords supported: :key" +Keywords supported: :key +See `member*' for the meaning of :key." (apply 'assoc* nil cl-list :if-not cl-pred cl-keys)) (defun rassoc* (cl-item cl-alist &rest cl-keys) "Find the first item whose cdr matches ITEM in LIST. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `member*' for the meaning of :test, :test-not and :key." (if (or cl-keys (and (numberp cl-item) (not (fixnump cl-item)))) (cl-parsing-keywords (:test :test-not :key :if :if-not) () (while (and cl-alist @@ -725,12 +802,14 @@ (defun rassoc-if (cl-pred cl-list &rest cl-keys) "Find the first item whose cdr satisfies PREDICATE in LIST. -Keywords supported: :key" +Keywords supported: :key +See `member*' for the meaning of :key." (apply 'rassoc* nil cl-list :if cl-pred cl-keys)) (defun rassoc-if-not (cl-pred cl-list &rest cl-keys) "Find the first item whose cdr does not satisfy PREDICATE in LIST. -Keywords supported: :key" +Keywords supported: :key +See `member*' for the meaning of :key." (apply 'rassoc* nil cl-list :if-not cl-pred cl-keys)) (defun union (cl-list1 cl-list2 &rest cl-keys) @@ -738,7 +817,16 @@ The result list contains all items that appear in either LIST1 or LIST2. This is a non-destructive function; it makes a copy of the data if necessary to avoid corrupting the original LIST1 and LIST2. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +The keywords :test and :test-not specify two-argument test and negated-test +predicates, respectively; :test defaults to `eql'. see `member*' for more +information. +:key specifies a one-argument function that transforms elements of LIST1 +and LIST2 into \"comparison keys\" before the test predicate is applied. +For example, if :key is #'car, then the car of elements from LIST1 is +compared with the car of elements from LIST2. The :key function, however, +does not affect the elements in the returned list, which are taken directly +from the elements in LIST1 and LIST2." (cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1) ((equal cl-list1 cl-list2) cl-list1) (t @@ -757,16 +845,52 @@ The result list contains all items that appear in either LIST1 or LIST2. This is a destructive function; it reuses the storage of LIST1 and LIST2 whenever possible. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `union' for the meaning of :test, :test-not and :key." (cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1) (t (apply 'union cl-list1 cl-list2 cl-keys)))) +;; XEmacs addition: NOT IN COMMON LISP. +(defun stable-union (cl-list1 cl-list2 &rest cl-keys) + "Stably combine LIST1 and LIST2 using a set-union operation. +The result list contains all items that appear in either LIST1 or LIST2. +The result is \"stable\" in that it preserves the ordering of elements in +LIST1 and LIST2. The result specifically consists of the elements in LIST1 +in order, followed by any elements in LIST2 that are not also in LIST1, in +the order given in LIST2. +This is a non-destructive function; it makes a copy of the data if necessary +to avoid corrupting the original LIST1 and LIST2. +Keywords supported: :test :test-not :key +See `union' for the meaning of :test, :test-not and :key. + +NOTE: This is *NOT* a function defined by Common Lisp, but an XEmacs +extension." + ;; The standard `union' doesn't produce a "stable" union -- + ;; it iterates over the second list instead of the first one, and returns + ;; the values in backwards order. According to the CLTL2 documentation, + ;; `union' is not required to preserve the ordering of elements in + ;; any fashion, so we add a new function rather than changing the + ;; semantics of `union'. + (cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1) + ((equal cl-list1 cl-list2) cl-list1) + (t + (append + cl-list1 + (cl-parsing-keywords (:key) (:test :test-not) + (loop for cl-l in cl-list2 + if (not (if (or cl-keys (numberp cl-l)) + (apply 'member* (cl-check-key cl-l) + cl-list1 cl-keys) + (memq cl-l cl-list1))) + collect cl-l)))))) + (defun intersection (cl-list1 cl-list2 &rest cl-keys) "Combine LIST1 and LIST2 using a set-intersection operation. The result list contains all items that appear in both LIST1 and LIST2. This is a non-destructive function; it makes a copy of the data if necessary to avoid corrupting the original LIST1 and LIST2. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `union' for the meaning of :test, :test-not and :key." (and cl-list1 cl-list2 (if (equal cl-list1 cl-list2) cl-list1 (cl-parsing-keywords (:key) (:test :test-not) @@ -787,15 +911,46 @@ The result list contains all items that appear in both LIST1 and LIST2. This is a destructive function; it reuses the storage of LIST1 and LIST2 whenever possible. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `union' for the meaning of :test, :test-not and :key." (and cl-list1 cl-list2 (apply 'intersection cl-list1 cl-list2 cl-keys))) +;; XEmacs addition: NOT IN COMMON LISP. +(defun stable-intersection (cl-list1 cl-list2 &rest cl-keys) + "Stably combine LIST1 and LIST2 using a set-intersection operation. +The result list contains all items that appear in both LIST1 and LIST2. +The result is \"stable\" in that it preserves the ordering of elements in +LIST1 that are also in LIST2. +This is a non-destructive function; it makes a copy of the data if necessary +to avoid corrupting the original LIST1 and LIST2. +Keywords supported: :test :test-not :key +See `union' for the meaning of :test, :test-not and :key. + +NOTE: This is *NOT* a function defined by Common Lisp, but an XEmacs +extension." + ;; The standard `intersection' doesn't produce a "stable" intersection -- + ;; it iterates over the second list instead of the first one, and returns + ;; the values in backwards order. According to the CLTL2 documentation, + ;; `intersection' is not required to preserve the ordering of elements in + ;; any fashion, so we add a new function rather than changing the + ;; semantics of `intersection'. + (and cl-list1 cl-list2 + (if (equal cl-list1 cl-list2) cl-list1 + (cl-parsing-keywords (:key) (:test :test-not) + (loop for cl-l in cl-list1 + if (if (or cl-keys (numberp cl-l)) + (apply 'member* (cl-check-key cl-l) + cl-list2 cl-keys) + (memq cl-l cl-list2)) + collect cl-l))))) + (defun set-difference (cl-list1 cl-list2 &rest cl-keys) "Combine LIST1 and LIST2 using a set-difference operation. The result list contains all items that appear in LIST1 but not LIST2. This is a non-destructive function; it makes a copy of the data if necessary to avoid corrupting the original LIST1 and LIST2. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `union' for the meaning of :test, :test-not and :key." (if (or (null cl-list1) (null cl-list2)) cl-list1 (cl-parsing-keywords (:key) (:test :test-not) (let ((cl-res nil)) @@ -813,7 +968,8 @@ The result list contains all items that appear in LIST1 but not LIST2. This is a destructive function; it reuses the storage of LIST1 and LIST2 whenever possible. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `union' for the meaning of :test, :test-not and :key." (if (or (null cl-list1) (null cl-list2)) cl-list1 (apply 'set-difference cl-list1 cl-list2 cl-keys))) @@ -822,7 +978,8 @@ The result list contains all items that appear in exactly one of LIST1, LIST2. This is a non-destructive function; it makes a copy of the data if necessary to avoid corrupting the original LIST1 and LIST2. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `union' for the meaning of :test, :test-not and :key." (cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1) ((equal cl-list1 cl-list2) nil) (t (append (apply 'set-difference cl-list1 cl-list2 cl-keys) @@ -833,7 +990,8 @@ The result list contains all items that appear in exactly one of LIST1, LIST2. This is a destructive function; it reuses the storage of LIST1 and LIST2 whenever possible. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `union' for the meaning of :test, :test-not and :key." (cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1) ((equal cl-list1 cl-list2) nil) (t (nconc (apply 'nset-difference cl-list1 cl-list2 cl-keys) @@ -842,7 +1000,8 @@ (defun subsetp (cl-list1 cl-list2 &rest cl-keys) "True if LIST1 is a subset of LIST2. I.e., if every element of LIST1 also appears in LIST2. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `union' for the meaning of :test, :test-not and :key." (cond ((null cl-list1) t) ((null cl-list2) nil) ((equal cl-list1 cl-list2) t) (t (cl-parsing-keywords (:key) (:test :test-not) @@ -855,38 +1014,44 @@ (defun subst-if (cl-new cl-pred cl-tree &rest cl-keys) "Substitute NEW for elements matching PREDICATE in TREE (non-destructively). Return a copy of TREE with all matching elements replaced by NEW. -Keywords supported: :key" +Keywords supported: :key +See `member*' for the meaning of :key." (apply 'sublis (list (cons nil cl-new)) cl-tree :if cl-pred cl-keys)) (defun subst-if-not (cl-new cl-pred cl-tree &rest cl-keys) "Substitute NEW for elts not matching PREDICATE in TREE (non-destructively). Return a copy of TREE with all non-matching elements replaced by NEW. -Keywords supported: :key" +Keywords supported: :key +See `member*' for the meaning of :key." (apply 'sublis (list (cons nil cl-new)) cl-tree :if-not cl-pred cl-keys)) (defun nsubst (cl-new cl-old cl-tree &rest cl-keys) "Substitute NEW for OLD everywhere in TREE (destructively). Any element of TREE which is `eql' to OLD is changed to NEW (via a call to `setcar'). -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `member*' for the meaning of :test, :test-not and :key." (apply 'nsublis (list (cons cl-old cl-new)) cl-tree cl-keys)) (defun nsubst-if (cl-new cl-pred cl-tree &rest cl-keys) "Substitute NEW for elements matching PREDICATE in TREE (destructively). Any element of TREE which matches is changed to NEW (via a call to `setcar'). -Keywords supported: :key" +Keywords supported: :key +See `member*' for the meaning of :key." (apply 'nsublis (list (cons nil cl-new)) cl-tree :if cl-pred cl-keys)) (defun nsubst-if-not (cl-new cl-pred cl-tree &rest cl-keys) "Substitute NEW for elements not matching PREDICATE in TREE (destructively). Any element of TREE which matches is changed to NEW (via a call to `setcar'). -Keywords supported: :key" +Keywords supported: :key +See `member*' for the meaning of :key." (apply 'nsublis (list (cons nil cl-new)) cl-tree :if-not cl-pred cl-keys)) (defun sublis (cl-alist cl-tree &rest cl-keys) "Perform substitutions indicated by ALIST in TREE (non-destructively). Return a copy of TREE with all matching elements replaced. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `member*' for the meaning of :test, :test-not and :key." (cl-parsing-keywords (:test :test-not :key :if :if-not) () (cl-sublis-rec cl-tree))) @@ -907,7 +1072,8 @@ (defun nsublis (cl-alist cl-tree &rest cl-keys) "Perform substitutions indicated by ALIST in TREE (destructively). Any matching element of TREE is changed via a call to `setcar'. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `member*' for the meaning of :test, :test-not and :key." (cl-parsing-keywords (:test :test-not :key :if :if-not) () (let ((cl-hold (list cl-tree))) (cl-nsublis-rec cl-hold) @@ -930,7 +1096,8 @@ (defun tree-equal (cl-x cl-y &rest cl-keys) "Return t if trees X and Y have `eql' leaves. Atoms are compared by `eql'; cons cells are compared recursively. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `union' for the meaning of :test, :test-not and :key." (cl-parsing-keywords (:test :test-not :key) () (cl-tree-equal-rec cl-x cl-y)))
--- a/lisp/cl.el Wed Feb 24 01:58:04 2010 -0600 +++ b/lisp/cl.el Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,7 @@ ;;; cl.el --- Common Lisp extensions for XEmacs Lisp ;; Copyright (C) 1993, 1997 Free Software Foundation, Inc. +;; Copyright (C) 2010 Ben Wing. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Maintainer: XEmacs Development Team @@ -179,7 +180,8 @@ "Add NEWELT at the beginning of LISTNAME, unless it's already in LISTNAME. Like (push NEWELT LISTNAME), except that the list is unmodified if NEWELT is `eql' to an element already on the list. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `member*' for the meaning of :test, :test-not and :key." (if (symbolp listname) (list 'setq listname (list* 'adjoin newelt listname keys)) (list* 'callf2 'adjoin newelt listname keys))) @@ -583,7 +585,8 @@ (defun adjoin (cl-item cl-list &rest cl-keys) ; See compiler macro in cl-macs "Return ITEM consed onto the front of LIST only if it's not already there. Otherwise, return LIST unmodified. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `member*' for the meaning of :test, :test-not and :key." (cond ((or (equal cl-keys '(:test eq)) (and (null cl-keys) (not (numberp cl-item)))) (if (memq cl-item cl-list) cl-list (cons cl-item cl-list))) @@ -594,7 +597,8 @@ (defun subst (cl-new cl-old cl-tree &rest cl-keys) "Substitute NEW for OLD everywhere in TREE (non-destructively). Return a copy of TREE with all elements `eql' to OLD replaced by NEW. -Keywords supported: :test :test-not :key" +Keywords supported: :test :test-not :key +See `member*' for the meaning of :test, :test-not and :key." (if (or cl-keys (and (numberp cl-old) (not (fixnump cl-old)))) (apply 'sublis (list (cons cl-old cl-new)) cl-tree cl-keys) (cl-do-subst cl-new cl-old cl-tree)))
--- a/lisp/coding.el Wed Feb 24 01:58:04 2010 -0600 +++ b/lisp/coding.el Wed Feb 24 19:04:27 2010 -0600 @@ -5,7 +5,7 @@ ;; Copyright (C) 1995 Amdahl Corporation. ;; Copyright (C) 1995 Sun Microsystems. ;; Copyright (C) 1997 MORIOKA Tomohiko -;; Copyright (C) 2000, 2001, 2002 Ben Wing. +;; Copyright (C) 2000, 2001, 2002, 2010 Ben Wing. ;; This file is part of XEmacs. @@ -464,27 +464,25 @@ (and (query-coding-string char coding-system) (encode-coding-string char coding-system))) -(if (featurep 'mule) - (progn - ;; Under Mule, we do much of the complicated coding system creation in - ;; Lisp and especially at compile time. We need some function - ;; definition for this function to be created in this file, but we can - ;; leave assigning the docstring to the autoload cookie - ;; handling later. Thankfully; that docstring is big. - (autoload 'make-coding-system "mule/make-coding-system") +(defun decode-char (quote-ucs code &optional restriction) + "FSF compatibility--return Mule character with Unicode codepoint CODE. +The second argument must be 'ucs, the third argument is ignored. " + ;; We're prepared to accept invalid Unicode in unicode-to-char, but not in + ;; this function, which is the API that should actually be used, since + ;; it's available in GNU and in Mule-UCS. + (check-argument-range code #x0 #x10FFFF) + (assert (eq quote-ucs 'ucs) t + "Sorry, decode-char doesn't yet support anything but the UCS. ") + (unicode-to-char code)) - ;; (During byte-compile before dumping, make-coding-system may already - ;; have been loaded, make sure not to overwrite the correct compiler - ;; macro:) - (when (eq 'autoload (car (symbol-function 'make-coding-system))) - ;; Make sure to pick up the correct compiler macro when compiling - ;; files: - (define-compiler-macro make-coding-system (&whole form name type - &optional description props) - (load (second (symbol-function 'make-coding-system))) - (funcall (get 'make-coding-system 'cl-compiler-macro) - form name type description props)))) +(defun encode-char (char quote-ucs &optional restriction) + "FSF compatibility--return the Unicode code point of CHAR. +The second argument must be 'ucs, the third argument is ignored. " + (assert (eq quote-ucs 'ucs) t + "Sorry, encode-char doesn't yet support anything but the UCS. ") + (char-to-unicode char)) +(unless (featurep 'mule) ;; Mule's not available; (fset 'make-coding-system (symbol-function 'make-coding-system-internal)) (define-coding-system-alias 'escape-quoted 'binary)
--- a/lisp/diagnose.el Wed Feb 24 01:58:04 2010 -0600 +++ b/lisp/diagnose.el Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,6 @@ ;;; diagnose.el --- routines for debugging problems in XEmacs -;; Copyright (C) 2002 Ben Wing. +;; Copyright (C) 2002, 2010 Ben Wing. ;; Maintainer: XEmacs Development Team ;; Keywords: dumped @@ -197,29 +197,33 @@ (intern (concat (match-string 1 (symbol-name stat)) "-storage-including-overhead")))) (storage-count - (or (plist-get - plist - (intern - (concat (match-string 1 (symbol-name stat)) - "s-used"))) + (or (loop for str in '("s-used" "es-used" "-used") + for val = (plist-get + plist + (intern + (concat (match-string + 1 (symbol-name stat)) + str))) + if val + return val) (plist-get plist (intern - (concat (match-string 1 (symbol-name stat)) - "es-used"))) - (plist-get - plist - (intern - (concat (match-string 1 (symbol-name stat)) - "-used")))))) + (concat (substring + (match-string 1 (symbol-name stat)) + 0 -1) + "ies-used"))) + ))) (incf total-use storage-use) (incf total-use-overhead (if storage-use-overhead storage-use-overhead storage-use)) - (incf total-count storage-count) - (princ (format fmt - (match-string 1 (symbol-name stat)) - storage-count storage-use))))) + (incf total-count (or storage-count 0)) + (and (> storage-use 0) + (princ (format fmt + (match-string 1 (symbol-name stat)) + (or storage-count "unknown") + storage-use)))))) plist) (princ "\n") (princ (format fmt "total" @@ -229,7 +233,7 @@ (sort-numeric-fields -1 (save-excursion (goto-char begin) - (forward-line 2) + (forward-line 3) (point)) (save-excursion (forward-line -2)
--- a/lisp/dumped-lisp.el Wed Feb 24 01:58:04 2010 -0600 +++ b/lisp/dumped-lisp.el Wed Feb 24 19:04:27 2010 -0600 @@ -160,6 +160,7 @@ "code-process" ;; Provide basic commands to set coding systems to user "code-cmds" + (when (featurep 'mule) "mule/make-coding-system") "unicode" ;;;;;;;;;;;;;;;;;; MULE support (when (featurep 'mule)
--- a/lisp/help.el Wed Feb 24 01:58:04 2010 -0600 +++ b/lisp/help.el Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ ;; help.el --- help commands for XEmacs. ;; Copyright (C) 1985, 1986, 1992-4, 1997 Free Software Foundation, Inc. -;; Copyright (C) 2001, 2002, 2003 Ben Wing. +;; Copyright (C) 2001, 2002, 2003, 2010 Ben Wing. ;; Maintainer: FSF ;; Keywords: help, internal, dumped @@ -1182,27 +1182,21 @@ (fndef (if (eq (car-safe fnc) 'macro) (cdr fnc) fnc)) + (args (cdr (function-documentation-1 function t))) (arglist - (cond ((compiled-function-p fndef) - (compiled-function-arglist fndef)) - ((eq (car-safe fndef) 'lambda) - (nth 1 fndef)) - ((or (subrp fndef) (eq 'autoload (car-safe fndef))) - (let* ((doc (documentation function)) - (args (and doc - (string-match - "[\n\t ]*\narguments: ?(\\([^)]*\\))\n?\\'" - doc) - (match-string 1 doc))) - (args (and args (replace-in-string args - "[ ]*\\\\\n[ \t]*" - " " t)))) - ;; If there are no arguments documented for the - ;; subr, rather don't print anything. - (cond ((null args) t) - ((equal args "") nil) - (args)))) - (t t))) + (or args + (cond ((compiled-function-p fndef) + (compiled-function-arglist fndef)) + ((eq (car-safe fndef) 'lambda) + (nth 1 fndef)) + ((or (subrp fndef) (eq 'autoload (car-safe fndef))) + + ;; If there are no arguments documented for the + ;; subr, rather don't print anything. + (cond ((null args) t) + ((equal args "") nil) + (args))) + (t t)))) (print-gensym nil)) (cond ((listp arglist) (prin1-to-string @@ -1217,20 +1211,31 @@ ((stringp arglist) (format "(%s %s)" function arglist))))) -(defun function-documentation (function &optional strip-arglist) - "Return a string giving the documentation for FUNCTION, if any. -If the optional argument STRIP-ARGLIST is non-nil, remove the arglist -part of the documentation of internal subroutines." +;; If STRIP-ARGLIST is true, return a cons (DOC . ARGS) of the documentation +;; with any embedded arglist stripped out, and the arglist that was stripped +;; out. If STRIP-ARGLIST is false, the cons will be (FULL-DOC . nil), +;; where FULL-DOC is the full documentation without the embedded arglist +;; stripped out. +(defun function-documentation-1 (function &optional strip-arglist) (let ((doc (condition-case nil (or (documentation function) (gettext "not documented")) (void-function "(alias for undefined function)") - (error "(unexpected error from `documention')")))) + (error "(unexpected error from `documentation')"))) + args) (when (and strip-arglist - (string-match "[\n\t ]*\narguments: ?(\\([^)]*\\))\n?\\'" doc)) + (string-match "[\n\t ]*\narguments: ?(\\(.*\\))\n?\\'" doc)) + (setq args (match-string 1 doc)) (setq doc (substring doc 0 (match-beginning 0))) + (and args (setq args (replace-in-string args "[ ]*\\\\\n[ \t]*" " " t))) (and (zerop (length doc)) (setq doc (gettext "not documented")))) - doc)) + (cons doc args))) + +(defun function-documentation (function &optional strip-arglist) + "Return a string giving the documentation for FUNCTION, if any. +If the optional argument STRIP-ARGLIST is non-nil, remove the arglist +part of the documentation of internal subroutines, CL lambda forms, etc." + (car (function-documentation-1 function strip-arglist))) ;; replacement for `princ' that puts the text in the specified face, ;; if possible
--- a/lisp/mule/make-coding-system.el Wed Feb 24 01:58:04 2010 -0600 +++ b/lisp/mule/make-coding-system.el Wed Feb 24 19:04:27 2010 -0600 @@ -2,6 +2,7 @@ ;;; much of the implementation of the fixed-width coding system type. ;; Copyright (C) 2009 Free Software Foundation +;; Copyright (C) 2010 Ben Wing. ;; Author: Aidan Kehoe @@ -26,13 +27,6 @@ ;;; Code: -(defvar fixed-width-private-use-start (decode-char 'ucs #xE000) - "Start of a 256 code private use area for fixed-width coding systems. - -This is used to ensure that distinct octets on disk for a given coding -system map to distinct XEmacs characters, preventing spurious changes when -a file is read, not changed, and then written. ") - (defun fixed-width-generate-helper (decode-table encode-table encode-failure-octet) "Helper func, `fixed-width-generate-encode-program-and-skip-chars-strings', @@ -323,7 +317,7 @@ (check-argument-type #'listp unicode-map) (let ((decode-table (make-vector 256 nil)) (encode-table (make-hash-table :size 256 :rehash-threshold 0.999)) - (private-use-start (encode-char fixed-width-private-use-start 'ucs)) + (private-use-start #xE000) (invalid-sequence-code-point-start (eval-when-compile (char-to-unicode
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/test-harness.el Wed Feb 24 19:04:27 2010 -0600 @@ -0,0 +1,835 @@ +;; test-harness.el --- Run Emacs Lisp test suites. + +;;; Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc. +;;; Copyright (C) 2002, 2010 Ben Wing. + +;; Author: Martin Buchholz +;; Maintainer: Stephen J. Turnbull <stephen@xemacs.org> +;; Keywords: testing + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Synched up with: Not in FSF. + +;;; Commentary: + +;;; A test suite harness for testing XEmacs. +;;; The actual tests are in other files in this directory. +;;; Basically you just create files of emacs-lisp, and use the +;;; Assert, Check-Error, Check-Message, and Check-Error-Message functions +;;; to create tests. See `test-harness-from-buffer' below. +;;; Don't suppress tests just because they're due to known bugs not yet +;;; fixed -- use the Known-Bug-Expect-Failure and +;;; Implementation-Incomplete-Expect-Failure wrapper macros to mark them. +;;; A lot of the tests we run push limits; suppress Ebola message with the +;;; Ignore-Ebola wrapper macro. +;;; Some noisy code will call `message'. Output from `message' can be +;;; suppressed with the Silence-Message macro. Functions that are known to +;;; issue messages include `write-region', `find-tag', `tag-loop-continue', +;;; `insert', and `mark-whole-buffer'. N.B. The Silence-Message macro +;;; currently does not suppress the newlines printed by `message'. +;;; Definitely do not use Silence-Message with Check-Message. +;;; In general it should probably only be used on code that prepares for a +;;; test, not on tests. +;;; +;;; You run the tests using M-x test-emacs-test-file, +;;; or $(EMACS) -batch -l test-harness -f batch-test-emacs file ... +;;; which is run for you by the `make check' target in the top-level Makefile. + +(require 'bytecomp) + +(defvar unexpected-test-suite-failures 0 + "Cumulative number of unexpected failures since test-harness was loaded. + +\"Unexpected failures\" are those caught by a generic handler established +outside of the test context. As such they involve an abort of the test +suite for the file being tested. + +They often occur during preparation of a test or recording of the results. +For example, an executable used to generate test data might not be present +on the system, or a system error might occur while reading a data file.") + +(defvar unexpected-test-suite-failure-files nil + "List of test files causing unexpected failures.") + +;; Declared for dynamic scope; _do not_ initialize here. +(defvar unexpected-test-file-failures) + +(defvar test-harness-bug-expected nil + "Non-nil means a bug is expected; backtracing/debugging should not happen.") + +(defvar test-harness-test-compiled nil + "Non-nil means the test code was compiled before execution. + +You probably should not make tests depend on compilation. +However, it can be useful to conditionally change messages based on whether +the code was compiled or not. For example, the case that motivated the +implementation of this variable: + +\(when test-harness-test-compiled + ;; this ha-a-ack depends on the failing compiled test coming last + \(setq test-harness-failure-tag + \"KNOWN BUG - fix reverted; after 2003-10-31 notify stephen\n\"))") + +(defvar test-harness-verbose + (and (not noninteractive) (> (device-baud-rate) search-slow-speed)) + "*Non-nil means print messages describing progress of emacs-tester.") + +(defvar test-harness-unexpected-error-enter-debugger debug-on-error + "*Non-nil means enter debugger when an unexpected error occurs. +Only applies interactively. Normally true if `debug-on-error' has been set. +See also `test-harness-assertion-failure-enter-debugger' and +`test-harness-unexpected-error-show-backtrace'.") + +(defvar test-harness-assertion-failure-enter-debugger debug-on-error + "*Non-nil means enter debugger when an assertion failure occurs. +Only applies interactively. Normally true if `debug-on-error' has been set. +See also `test-harness-unexpected-error-enter-debugger' and +`test-harness-assertion-failure-show-backtrace'.") + +(defvar test-harness-unexpected-error-show-backtrace t + "*Non-nil means show backtrace upon unexpected error. +Only applies when debugger is not entered. Normally true by default. See also +`test-harness-unexpected-error-enter-debugger' and +`test-harness-assertion-failure-show-backtrace'.") + +(defvar test-harness-assertion-failure-show-backtrace stack-trace-on-error + "*Non-nil means show backtrace upon assertion failure. +Only applies when debugger is not entered. Normally true if +`stack-trace-on-error' has been set. See also +`test-harness-assertion-failure-enter-debugger' and +`test-harness-unexpected-error-show-backtrace'.") + +(defvar test-harness-file-results-alist nil + "Each element is a list (FILE SUCCESSES TESTS). +The order is the reverse of the order in which tests are run. + +FILE is a string naming the test file. +SUCCESSES is a non-negative integer, the number of successes. +TESTS is a non-negative integer, the number of tests run.") + +(defvar test-harness-risk-infloops nil + "*Non-nil to run tests that may loop infinitely in buggy implementations.") + +(defvar test-harness-current-file nil) + +(defvar emacs-lisp-file-regexp (purecopy "\\.el\\'") + "*Regexp which matches Emacs Lisp source files.") + +(defconst test-harness-file-summary-template + (format "%%-%ds %%%dd of %%%dd tests successful (%%3d%%%%)." + (length "byte-compiler-tests.el:") ; use the longest file name + 5 + 5) + "Format for summary lines printed after each file is run.") + +(defconst test-harness-null-summary-template + (format "%%-%ds No tests run." + (length "byte-compiler-tests.el:")) ; use the longest file name + "Format for \"No tests\" lines printed after a file is run.") + +(defconst test-harness-aborted-summary-template + (format "%%-%ds %%%dd tests completed (aborted)." + (length "byte-compiler-tests.el:") ; use the longest file name + 5) + "Format for summary lines printed after a test run on a file was aborted.") + +;;;###autoload +(defun test-emacs-test-file (filename) + "Test a file of Lisp code named FILENAME. +The output file's name is made by appending `c' to the end of FILENAME." + (interactive + (let ((file buffer-file-name) + (file-name nil) + (file-dir nil)) + (and file + (eq (cdr (assq 'major-mode (buffer-local-variables))) + 'emacs-lisp-mode) + (setq file-name (file-name-nondirectory file) + file-dir (file-name-directory file))) + (list (read-file-name "Test file: " file-dir nil nil file-name)))) + ;; Expand now so we get the current buffer's defaults + (setq filename (expand-file-name filename)) + + ;; If we're testing a file that's in a buffer and is modified, offer + ;; to save it first. + (or noninteractive + (let ((b (get-file-buffer (expand-file-name filename)))) + (if (and b (buffer-modified-p b) + (y-or-n-p (format "save buffer %s first? " (buffer-name b)))) + (save-excursion (set-buffer b) (save-buffer))))) + + (if (or noninteractive test-harness-verbose) + (message "Testing %s..." filename)) + (let ((test-harness-current-file filename) + input-buffer) + (save-excursion + (setq input-buffer (get-buffer-create " *Test Input*")) + (set-buffer input-buffer) + (erase-buffer) + (insert-file-contents filename) + ;; Run hooks including the uncompression hook. + ;; If they change the file name, then change it for the output also. + (let ((buffer-file-name filename) + (default-major-mode 'emacs-lisp-mode) + (enable-local-eval nil)) + (normal-mode) + (setq filename buffer-file-name))) + (test-harness-from-buffer input-buffer filename) + (kill-buffer input-buffer) + )) + +(defsubst test-harness-assertion-failure-do-debug (error-info) + "Maybe enter debugger or display a backtrace on assertion failure. +ERROR-INFO is a cons of the args (SIG . DATA) that were passed to `signal'. +The debugger will be entered if noninteractive and +`test-harness-unexpected-error-enter-debugger' is non-nil; else, a +backtrace will be displayed if `test-harness-unexpected-error-show-backtrace' +is non-nil." + (when (not test-harness-bug-expected) + (cond ((and (not noninteractive) + test-harness-assertion-failure-enter-debugger) + (funcall debugger 'error error-info)) + (test-harness-assertion-failure-show-backtrace + (backtrace nil t))))) + +(defsubst test-harness-unexpected-error-do-debug (error-info) + "Maybe enter debugger or display a backtrace on unexpected error. +ERROR-INFO is a cons of the args (SIG . DATA) that were passed to `signal'. +The debugger will be entered if noninteractive and +`test-harness-unexpected-error-enter-debugger' is non-nil; else, a +backtrace will be displayed if `test-harness-unexpected-error-show-backtrace' +is non-nil." + (when (not test-harness-bug-expected) + (cond ((and (not noninteractive) + test-harness-unexpected-error-enter-debugger) + (funcall debugger 'error error-info)) + (test-harness-unexpected-error-show-backtrace + (backtrace nil t))))) + +(defsubst test-harness-unexpected-error-condition-handler (error-info context-msg) + "Condition handler for when unexpected errors occur. +Useful in conjunction with `call-with-condition-handler'. ERROR-INFO is the +value passed to the condition handler. CONTEXT-MSG is a string indicating +the context in which the unexpected error occurred. A message is outputted +including CONTEXT-MSG in it, `unexpected-test-file-failures' is incremented, +and `test-harness-unexpected-error-do-debug' is called, which may enter the +debugger or output a backtrace, depending on the settings of +`test-harness-unexpected-error-enter-debugger' and +`test-harness-unexpected-error-show-backtrace'. + +The function returns normally, which causes error-handling processing to +continue; if you want to catch the error, you also need to wrap everything +in `condition-case'. See also `test-harness-error-wrap', which does this +wrapping." + (incf unexpected-test-file-failures) + (princ (format "Unexpected error %S while %s\n" + error-info context-msg)) + (message "Unexpected error %S while %s." error-info context-msg) + (test-harness-unexpected-error-do-debug error-info)) + +(defmacro test-harness-error-wrap (context-msg abort-msg &rest body) + "Wrap BODY so that unexpected errors are caught. +The debugger will be entered if noninteractive and +`test-harness-unexpected-error-enter-debugger' is non-nil; else, a backtrace +will be displayed if `test-harness-unexpected-error-show-backtrace' is +non-nil. CONTEXT-MSG is displayed as part of a message shown before entering +the debugger or showing a backtrace, and ABORT-MSG, if non-nil, is displayed +afterwards. See " + `(condition-case nil + (call-with-condition-handler + #'(lambda (error-info) + (test-harness-unexpected-error-condition-handler + error-info ,context-msg)) + #'(lambda () + ,@body)) + (error ,(if abort-msg `(message ,abort-msg) nil)))) + +(defun test-harness-read-from-buffer (buffer) + "Read forms from BUFFER, and turn it into a lambda test form." + (let ((body nil)) + (goto-char (point-min) buffer) + (condition-case nil + (call-with-condition-handler + #'(lambda (error-info) + ;; end-of-file is expected, so don't output error or backtrace + ;; or enter debugger in this case. + (unless (eq 'end-of-file (car error-info)) + (test-harness-unexpected-error-condition-handler + error-info "reading forms from buffer"))) + #'(lambda () + (while t + (setq body (cons (read buffer) body))))) + (error nil)) + `(lambda () + (defvar passes) + (defvar assertion-failures) + (defvar no-error-failures) + (defvar wrong-error-failures) + (defvar missing-message-failures) + (defvar other-failures) + + (defvar trick-optimizer) + + ,@(nreverse body)))) + +(defun test-harness-from-buffer (inbuffer filename) + "Run tests in buffer INBUFFER, visiting FILENAME." + (defvar trick-optimizer) + (let ((passes 0) + (assertion-failures 0) + (no-error-failures 0) + (wrong-error-failures 0) + (missing-message-failures 0) + (other-failures 0) + (unexpected-test-file-failures 0) + + ;; #### perhaps this should be a defvar, and output at the very end + ;; OTOH, this way AC types can use a null EMACSPACKAGEPATH to find + ;; what stuff is needed, and ways to avoid using them + (skipped-test-reasons (make-hash-table :test 'equal)) + + (trick-optimizer nil) + (debug-on-error t) + ) + (with-output-to-temp-buffer "*Test-Log*" + (princ (format "Testing %s...\n\n" filename)) + + (defconst test-harness-failure-tag "FAIL") + (defconst test-harness-success-tag "PASS") + +;;;;; BEGIN DEFINITION OF MACROS USEFUL IN TEST CODE + + (defmacro Known-Bug-Expect-Failure (&rest body) + "Wrap a BODY that consists of tests that are known to fail. +This causes messages to be printed on failure indicating that this is expected, +and on success indicating that this is unexpected." + `(let ((test-harness-bug-expected t) + (test-harness-failure-tag "KNOWN BUG") + (test-harness-success-tag "PASS (FAILURE EXPECTED)")) + ,@body)) + + (defmacro Known-Bug-Expect-Error (expected-error &rest body) + "Wrap a BODY that consists of tests that are known to trigger an error. +This causes messages to be printed on failure indicating that this is expected, +and on success indicating that this is unexpected." + (let ((quoted-body (if (= 1 (length body)) + `(quote ,(car body)) `(quote (progn ,@body))))) + `(let ((test-harness-bug-expected t) + (test-harness-failure-tag "KNOWN BUG") + (test-harness-success-tag "PASS (FAILURE EXPECTED)")) + (condition-case error-info + (progn + (setq trick-optimizer (progn ,@body)) + (Print-Pass + "%S executed successfully, but expected error %S" + ,quoted-body + ',expected-error) + (incf passes)) + (,expected-error + (Print-Failure "%S ==> error %S, as expected" + ,quoted-body ',expected-error) + (incf no-error-failures)) + (error + (Print-Failure "%S ==> expected error %S, got error %S instead" + ,quoted-body ',expected-error error-info) + (incf wrong-error-failures)))))) + + (defmacro Implementation-Incomplete-Expect-Failure (&rest body) + "Wrap a BODY containing tests that are known to fail due to incomplete code. +This causes messages to be printed on failure indicating that the +implementation is incomplete (and hence the failure is expected); and on +success indicating that this is unexpected." + `(let ((test-harness-bug-expected t) + (test-harness-failure-tag "IMPLEMENTATION INCOMPLETE") + (test-harness-success-tag "PASS (FAILURE EXPECTED)")) + ,@body)) + + (defun Print-Failure (fmt &rest args) + (setq fmt (format "%s: %s" test-harness-failure-tag fmt)) + (if (noninteractive) (apply #'message fmt args)) + (princ (concat (apply #'format fmt args) "\n"))) + + (defun Print-Pass (fmt &rest args) + (setq fmt (format "%s: %s" test-harness-success-tag fmt)) + (and test-harness-verbose + (princ (concat (apply #'format fmt args) "\n")))) + + (defun Print-Skip (test reason &optional fmt &rest args) + (setq fmt (concat "SKIP: %S BECAUSE %S" fmt)) + (princ (concat (apply #'format fmt test reason args) "\n"))) + + (defmacro Skip-Test-Unless (condition reason description &rest body) + "Unless CONDITION is satisfied, skip test BODY. +REASON is a description of the condition failure, and must be unique (it +is used as a hash key). DESCRIPTION describes the tests that were skipped. +BODY is a sequence of expressions and may contain several tests." + `(if (not ,condition) + (let ((count (gethash ,reason skipped-test-reasons))) + (puthash ,reason (if (null count) 1 (1+ count)) + skipped-test-reasons) + (Print-Skip ,description ,reason)) + ,@body)) + + (defmacro Assert (assertion &optional failing-case description) + "Test passes if ASSERTION is true. +Optional FAILING-CASE describes the particular failure. Optional +DESCRIPTION describes the assertion; by default, the unevalated assertion +expression is given. FAILING-CASE and DESCRIPTION are useful when Assert +is used in a loop." + (let ((description + (or description `(quote ,assertion)))) + `(condition-case nil + (call-with-condition-handler + #'(lambda (error-info) + (if (eq 'cl-assertion-failed (car error-info)) + (progn + (Print-Failure + (if ,failing-case + "Assertion failed: %S; failing case = %S" + "Assertion failed: %S") + ,description ,failing-case) + (incf assertion-failures) + (test-harness-assertion-failure-do-debug error-info)) + (Print-Failure + (if ,failing-case + "%S ==> error: %S; failing case = %S" + "%S ==> error: %S") + ,description error-info ,failing-case) + (incf other-failures) + (test-harness-unexpected-error-do-debug error-info))) + #'(lambda () + (assert ,assertion) + (Print-Pass "%S" ,description) + (incf passes))) + (cl-assertion-failed nil)))) + +;;;;; BEGIN DEFINITION OF SPECIFIC KINDS OF ASSERT MACROS + + (defmacro Assert-test (test testval expected &optional failing-case + description) + "Test passes if TESTVAL compares correctly to EXPECTED using TEST. +TEST should be a two-argument predicate (i.e. a function of two arguments +that returns t or nil), such as `eq', `eql', `equal', `equalp', `=', `<=', +'>', 'file-newer-than-file-p' etc. Optional FAILING-CASE describes the +particular failure; any value given here will be concatenated with a phrase +describing the expected and actual values of the comparison. Optional +DESCRIPTION describes the assertion; by default, the unevalated comparison +expressions are given. FAILING-CASE and DESCRIPTION are useful when Assert +is used in a loop." + (let* ((assertion `(,test ,testval ,expected)) + (failmsg `(format "%S should be `%s' to %S but isn't" + ,testval ',test ,expected)) + (failmsg2 (if failing-case `(concat + (format "%S, " ,failing-case) + ,failmsg) + failmsg))) + `(Assert ,assertion ,failmsg2 ,description))) + + (defmacro Assert-test-not (test testval expected &optional failing-case + description) + "Test passes if TESTVAL does not compare correctly to EXPECTED using TEST. +TEST should be a two-argument predicate (i.e. a function of two arguments +that returns t or nil), such as `eq', `eql', `equal', `equalp', `=', `<=', +'>', 'file-newer-than-file-p' etc. Optional FAILING-CASE describes the +particular failure; any value given here will be concatenated with a phrase +describing the expected and actual values of the comparison. Optional +DESCRIPTION describes the assertion; by default, the unevalated comparison +expressions are given. FAILING-CASE and DESCRIPTION are useful when Assert +is used in a loop." + (let* ((assertion `(not (,test ,testval ,expected))) + (failmsg `(format "%S shouldn't be `%s' to %S but is" + ,testval ',test ,expected)) + (failmsg2 (if failing-case `(concat + (format "%S, " ,failing-case) + ,failmsg) + failmsg))) + `(Assert ,assertion ,failmsg2 ,description))) + + ;; Specific versions of `Assert-test'. These are just convenience + ;; functions, functioning identically to `Assert-test', and duplicating + ;; the doc string for each would be too annoying. + (defmacro Assert-eq (testval expected &optional failing-case + description) + `(Assert-test eq ,testval ,expected ,failing-case ,description)) + (defmacro Assert-eql (testval expected &optional failing-case + description) + `(Assert-test eql ,testval ,expected ,failing-case ,description)) + (defmacro Assert-equal (testval expected &optional failing-case + description) + `(Assert-test equal ,testval ,expected ,failing-case ,description)) + (defmacro Assert-equalp (testval expected &optional failing-case + description) + `(Assert-test equalp ,testval ,expected ,failing-case ,description)) + (defmacro Assert-string= (testval expected &optional failing-case + description) + `(Assert-test string= ,testval ,expected ,failing-case ,description)) + (defmacro Assert= (testval expected &optional failing-case + description) + `(Assert-test = ,testval ,expected ,failing-case ,description)) + (defmacro Assert<= (testval expected &optional failing-case + description) + `(Assert-test <= ,testval ,expected ,failing-case ,description)) + + ;; Specific versions of `Assert-test-not'. These are just convenience + ;; functions, functioning identically to `Assert-test-not', and + ;; duplicating the doc string for each would be too annoying. + (defmacro Assert-not-eq (testval expected &optional failing-case + description) + `(Assert-test-not eq ,testval ,expected ,failing-case ,description)) + (defmacro Assert-not-eql (testval expected &optional failing-case + description) + `(Assert-test-not eql ,testval ,expected ,failing-case ,description)) + (defmacro Assert-not-equal (testval expected &optional failing-case + description) + `(Assert-test-not equal ,testval ,expected ,failing-case ,description)) + (defmacro Assert-not-equalp (testval expected &optional failing-case + description) + `(Assert-test-not equalp ,testval ,expected ,failing-case ,description)) + (defmacro Assert-not-string= (testval expected &optional failing-case + description) + `(Assert-test-not string= ,testval ,expected ,failing-case ,description)) + (defmacro Assert-not= (testval expected &optional failing-case + description) + `(Assert-test-not = ,testval ,expected ,failing-case ,description)) + + (defmacro Check-Error (expected-error &rest body) + (let ((quoted-body (if (= 1 (length body)) + `(quote ,(car body)) `(quote (progn ,@body))))) + `(condition-case error-info + (progn + (setq trick-optimizer (progn ,@body)) + (Print-Failure "%S executed successfully, but expected error %S" + ,quoted-body + ',expected-error) + (incf no-error-failures)) + (,expected-error + (Print-Pass "%S ==> error %S, as expected" + ,quoted-body ',expected-error) + (incf passes)) + (error + (Print-Failure "%S ==> expected error %S, got error %S instead" + ,quoted-body ',expected-error error-info) + (incf wrong-error-failures))))) + + (defmacro Check-Error-Message (expected-error expected-error-regexp + &rest body) + (let ((quoted-body (if (= 1 (length body)) + `(quote ,(car body)) `(quote (progn ,@body))))) + `(condition-case error-info + (progn + (setq trick-optimizer (progn ,@body)) + (Print-Failure "%S executed successfully, but expected error %S" + ,quoted-body ',expected-error) + (incf no-error-failures)) + (,expected-error + ;; #### Damn, this binding doesn't capture frobs, eg, for + ;; invalid_argument() ... you only get the REASON. And for + ;; wrong_type_argument(), there's no reason only FROBs. + ;; If this gets fixed, fix tests in regexp-tests.el. + (let ((error-message (second error-info))) + (if (string-match ,expected-error-regexp error-message) + (progn + (Print-Pass "%S ==> error %S %S, as expected" + ,quoted-body error-message ',expected-error) + (incf passes)) + (Print-Failure "%S ==> got error %S as expected, but error message %S did not match regexp %S" + ,quoted-body ',expected-error error-message ,expected-error-regexp) + (incf wrong-error-failures)))) + (error + (Print-Failure "%S ==> expected error %S, got error %S instead" + ,quoted-body ',expected-error error-info) + (incf wrong-error-failures))))) + + ;; Do not use this with Silence-Message. + (defmacro Check-Message (expected-message-regexp &rest body) + (let ((quoted-body (if (= 1 (length body)) + `(quote ,(car body)) + `(quote (progn ,@body))))) + `(Skip-Test-Unless (fboundp 'defadvice) "can't defadvice" + expected-message-regexp + (let ((messages "")) + (defadvice message (around collect activate) + (defvar messages) + (let ((msg-string (apply 'format (ad-get-args 0)))) + (setq messages (concat messages msg-string)) + msg-string)) + (ignore-errors + (call-with-condition-handler + #'(lambda (error-info) + (Print-Failure "%S ==> unexpected error %S" + ,quoted-body error-info) + (incf other-failures) + (test-harness-unexpected-error-do-debug error-info)) + #'(lambda () + (setq trick-optimizer (progn ,@body)) + (if (string-match ,expected-message-regexp messages) + (progn + (Print-Pass + "%S ==> value %S, message %S, matching %S, as expected" + ,quoted-body trick-optimizer messages + ',expected-message-regexp) + (incf passes)) + (Print-Failure + "%S ==> value %S, message %S, NOT matching expected %S" + ,quoted-body trick-optimizer messages + ',expected-message-regexp) + (incf missing-message-failures))))) + (ad-unadvise 'message))))) + + ;; #### Perhaps this should override `message' itself, too? + (defmacro Silence-Message (&rest body) + `(flet ((append-message (&rest args) ()) + (clear-message (&rest args) ())) + ,@body)) + + (defmacro Ignore-Ebola (&rest body) + `(let ((debug-issue-ebola-notices -42)) ,@body)) + + (defun Int-to-Marker (pos) + (save-excursion + (set-buffer standard-output) + (save-excursion + (goto-char pos) + (point-marker)))) + + (princ "Testing Interpreted Lisp\n\n") + + (test-harness-error-wrap + "executing interpreted code" + "Test suite execution aborted." + (funcall (test-harness-read-from-buffer inbuffer))) + + (princ "\nTesting Compiled Lisp\n\n") + + (let (code + (test-harness-test-compiled t)) + (test-harness-error-wrap + "byte-compiling code" nil + (setq code + ;; our lisp code is often intentionally dubious, + ;; so throw away _all_ the byte compiler warnings. + (letf (((symbol-function 'byte-compile-warn) + 'ignore)) + (byte-compile (test-harness-read-from-buffer + inbuffer)))) + ) + + (test-harness-error-wrap "executing byte-compiled code" + "Test suite execution aborted." + (if code (funcall code))) + ) + (princ (format "\nSUMMARY for %s:\n" filename)) + (princ (format "\t%5d passes\n" passes)) + (princ (format "\t%5d assertion failures\n" assertion-failures)) + (princ (format "\t%5d errors that should have been generated, but weren't\n" no-error-failures)) + (princ (format "\t%5d wrong-error failures\n" wrong-error-failures)) + (princ (format "\t%5d missing-message failures\n" missing-message-failures)) + (princ (format "\t%5d other failures\n" other-failures)) + (let* ((total (+ passes + assertion-failures + no-error-failures + wrong-error-failures + missing-message-failures + other-failures)) + (basename (file-name-nondirectory filename)) + (summary-msg + (cond ((> unexpected-test-file-failures 0) + (format test-harness-aborted-summary-template + (concat basename ":") total)) + ((> total 0) + (format test-harness-file-summary-template + (concat basename ":") + passes total (/ (* 100 passes) total))) + (t + (format test-harness-null-summary-template + (concat basename ":"))))) + (reasons "")) + (maphash (lambda (key value) + (setq reasons + (concat reasons + (format "\n %d tests skipped because %s." + value key)))) + skipped-test-reasons) + (when (> (length reasons) 1) + (setq summary-msg (concat summary-msg reasons " + It may be that XEmacs cannot find your installed packages. Set + EMACSPACKAGEPATH to the package hierarchy root or configure with + --package-path to enable the skipped tests."))) + (setq test-harness-file-results-alist + (cons (list filename passes total) + test-harness-file-results-alist)) + (message "%s" summary-msg)) + (when (> unexpected-test-file-failures 0) + (setq unexpected-test-suite-failure-files + (cons filename unexpected-test-suite-failure-files)) + (setq unexpected-test-suite-failures + (+ unexpected-test-suite-failures unexpected-test-file-failures)) + (message "Test suite execution failed unexpectedly.")) + (fmakunbound 'Assert) + (fmakunbound 'Check-Error) + (fmakunbound 'Check-Message) + (fmakunbound 'Check-Error-Message) + (fmakunbound 'Ignore-Ebola) + (fmakunbound 'Int-to-Marker) + (and noninteractive + (message "%s" (buffer-substring-no-properties + nil nil "*Test-Log*"))) + ))) + +(defvar test-harness-results-point-max nil) +(defmacro displaying-emacs-test-results (&rest body) + `(let ((test-harness-results-point-max test-harness-results-point-max)) + ;; Log the file name. + (test-harness-log-file) + ;; Record how much is logged now. + ;; We will display the log buffer if anything more is logged + ;; before the end of BODY. + (or test-harness-results-point-max + (save-excursion + (set-buffer (get-buffer-create "*Test-Log*")) + (setq test-harness-results-point-max (point-max)))) + (unwind-protect + (condition-case error-info + (progn ,@body) + (error + (test-harness-report-error error-info))) + (save-excursion + ;; If there were compilation warnings, display them. + (set-buffer "*Test-Log*") + (if (= test-harness-results-point-max (point-max)) + nil + (if temp-buffer-show-function + (let ((show-buffer (get-buffer-create "*Test-Log-Show*"))) + (save-excursion + (set-buffer show-buffer) + (setq buffer-read-only nil) + (erase-buffer)) + (copy-to-buffer show-buffer + (save-excursion + (goto-char test-harness-results-point-max) + (forward-line -1) + (point)) + (point-max)) + (funcall temp-buffer-show-function show-buffer)) + (select-window + (prog1 (selected-window) + (select-window (display-buffer (current-buffer))) + (goto-char test-harness-results-point-max) + (recenter 1))))))))) + +(defun batch-test-emacs-1 (file) + (condition-case error-info + (progn (test-emacs-test-file file) t) + (error + (princ ">>Error occurred processing ") + (princ file) + (princ ": ") + (display-error error-info nil) + (terpri) + nil))) + +(defun batch-test-emacs () + "Run `test-harness' on the files remaining on the command line. +Use this from the command line, with `-batch'; +it won't work in an interactive Emacs. +Each file is processed even if an error occurred previously. +A directory can be given as well, and all files will be processed. +For example, invoke \"xemacs -batch -f batch-test-emacs tests\"" + ;; command-line-args-left is what is left of the command line (from + ;; startup.el) + (defvar command-line-args-left) ;Avoid 'free variable' warning + (defvar debug-issue-ebola-notices) + (if (not noninteractive) + (error "`batch-test-emacs' is to be used only with -batch")) + (let ((error nil)) + (dolist (file command-line-args-left) + (if (file-directory-p file) + (dolist (file-in-dir (directory-files file t)) + (when (and (string-match emacs-lisp-file-regexp file-in-dir) + (not (or (auto-save-file-name-p file-in-dir) + (backup-file-name-p file-in-dir)))) + (or (batch-test-emacs-1 file-in-dir) + (setq error t)))) + (or (batch-test-emacs-1 file) + (setq error t)))) + (let ((namelen 0) + (succlen 0) + (testlen 0) + (results test-harness-file-results-alist)) + ;; compute maximum lengths of variable components of report + ;; probably should just use (length "byte-compiler-tests.el") + ;; and 5-place sizes -- this will also work for the file-by-file + ;; printing when Adrian's kludge gets reverted + (flet ((print-width (i) + (let ((x 10) (y 1)) + (while (>= i x) + (setq x (* 10 x) y (1+ y))) + y))) + (while results + (let* ((head (car results)) + (nn (length (file-name-nondirectory (first head)))) + (ss (print-width (second head))) + (tt (print-width (third head)))) + (when (> nn namelen) (setq namelen nn)) + (when (> ss succlen) (setq succlen ss)) + (when (> tt testlen) (setq testlen tt))) + (setq results (cdr results)))) + ;; create format and print + (let ((results (reverse test-harness-file-results-alist))) + (while results + (let* ((head (car results)) + (basename (file-name-nondirectory (first head))) + (nsucc (second head)) + (ntest (third head))) + (cond ((member (first head) unexpected-test-suite-failure-files) + (message test-harness-aborted-summary-template + (concat basename ":") + ntest)) + ((> ntest 0) + (message test-harness-file-summary-template + (concat basename ":") + nsucc + ntest + (/ (* 100 nsucc) ntest))) + (t + (message test-harness-null-summary-template + (concat basename ":")))) + (setq results (cdr results))))) + (when (> unexpected-test-suite-failures 0) + (message "\n***** There %s %d unexpected test suite %s in %s:" + (if (= unexpected-test-suite-failures 1) "was" "were") + unexpected-test-suite-failures + (if (= unexpected-test-suite-failures 1) "failure" "failures") + (if (= (length unexpected-test-suite-failure-files) 1) + "file" + "files")) + (while unexpected-test-suite-failure-files + (let ((line (pop unexpected-test-suite-failure-files))) + (while (and (< (length line) 61) + unexpected-test-suite-failure-files) + (setq line + (concat line " " + (pop unexpected-test-suite-failure-files)))) + (message line))))) + (message "\nDone") + (kill-emacs (if error 1 0)))) + +(provide 'test-harness) + +;;; test-harness.el ends here
--- a/man/ChangeLog Wed Feb 24 01:58:04 2010 -0600 +++ b/man/ChangeLog Wed Feb 24 19:04:27 2010 -0600 @@ -1,3 +1,26 @@ +2010-02-20 Ben Wing <ben@xemacs.org> + + * internals/internals.texi (Intro to Window and Frame Geometry): + Shrink diagram to fit when offset by five spaces as a result of + quoting. + +2010-02-16 Ben Wing <ben@xemacs.org> + + * internals/internals.texi (Top): + * internals/internals.texi (Modules for the Basic Displayable Lisp Objects): + * internals/internals.texi (Creating a Window-System Type): + * internals/internals.texi (Window and Frame Geometry): + * internals/internals.texi (Intro to Window and Frame Geometry): + * internals/internals.texi (The Frame): + * internals/internals.texi (The Non-Client Area): + * internals/internals.texi (The Client Area): + * internals/internals.texi (The Paned Area): + * internals/internals.texi (Text Areas): + * internals/internals.texi (The Displayable Area): + * internals/internals.texi (Which Functions Use Which?): + * internals/internals.texi (The Redisplay Mechanism): + Integrate the long comment in frame.c into the internals manual. + 2010-02-17 Jerry James <james@xemacs.org> * term.texi: Move to the eterm package.
--- a/man/internals/internals.texi Wed Feb 24 01:58:04 2010 -0600 +++ b/man/internals/internals.texi Wed Feb 24 19:04:27 2010 -0600 @@ -360,6 +360,7 @@ * Multilingual Support:: * Consoles; Devices; Frames; Windows:: * Window-System Support:: +* Window and Frame Geometry:: * The Redisplay Mechanism:: * Extents:: * Faces:: @@ -596,6 +597,17 @@ * Creating a Window-System Type:: +Window and Frame Geometry + +* Intro to Window and Frame Geometry:: +* The Frame:: +* The Non-Client Area:: +* The Client Area:: +* The Paned Area:: +* Text Areas:: +* The Displayable Area:: +* Which Functions Use Which?:: + The Redisplay Mechanism * Critical Redisplay Sections:: @@ -17668,7 +17680,7 @@ types such as scrollbars. -@node Window-System Support, The Redisplay Mechanism, Consoles; Devices; Frames; Windows, Top +@node Window-System Support, Window and Frame Geometry, Consoles; Devices; Frames; Windows, Top @chapter Window-System Support @cindex window-system support @cindex window systems @@ -17851,7 +17863,324 @@ -@node The Redisplay Mechanism, Extents, Window-System Support, Top +@node Window and Frame Geometry, The Redisplay Mechanism, Window-System Support, Top +@chapter Window and Frame Geometry + +@menu +* Intro to Window and Frame Geometry:: +* The Frame:: +* The Non-Client Area:: +* The Client Area:: +* The Paned Area:: +* Text Areas:: +* The Displayable Area:: +* Which Functions Use Which?:: +@end menu + +@node Intro to Window and Frame Geometry, The Frame, Window and Frame Geometry, Window and Frame Geometry +@section Intro to Window and Frame Geometry + +Here is an ASCII diagram: + +@example ++------------------------------------------------------------------------| +| window-manager decoration | +| +--------------------------------------------------------------------+ | +| | menubar | | +| ###################################################################### | +| # toolbar # | +| #--------------------------------------------------------------------# | +| # | gutter | # | +| # |--------------------------------------------------------------| # | +| # | | internal border width | | # | +| # | | ******************************************************** | | # | +|w# | | * |s|v* |s* | | #w| +|i# | | * |c|e* |c* | | #i| +|n# | | * |r|r* |r* | | #n| +|d# | | * |o|t* |o* | | #d| +|o# | | * text area |l|.* text area |l* | | #o| +|w# | |i* |l| * |l*i| | #w| +|-# | |n* |b|d* |b*n| | #-| +|m# | |t* |a|i* |a*t| | #m| +|a# | |.* |r|v* |r*.| | #a| +|n# t| | *-------------------------+-|i*----------------------+-* | |t #n| +|a# o|g|b* scrollbar | |d* scrollbar | *b|g|o #a| +|g# o|u|o*-------------------------+-|e*----------------------+-*o|u|o #g| +|e# l|t|r* modeline |r* modeline *r|t|l #e| +|r# b|t|d********************************************************d|t|b #r| +| # a|e|e* =..texttexttex....= |s|v* |s*e|e|a # | +|d# r|r|r*o m=..texttexttextt..=o m|c|e* |c*r|r|r #d| +|e# | | *u a=.exttexttextte...=u a|r|r* |r* | | #e| +|c# | |w*t r=....texttexttex..=t r|o|t* |o*w| | #c| +|o# | |i*s g= etc. =s g|l|.* text area |l*i| | #o| +|r# | |d*i i= =i i|l| * |l*d| | #r| +|a# | |t*d n= =d n|b|d* |b*t| | #a| +|t# | |h*e = inner text area =e |a|i* |a*h| | #t| +|i# | | * = = |r|v* |r* | | #i| +|o# | | *---===================---+-|i*----------------------+-* | | #o| +|n# | | * scrollbar | |d* scrollbar | * | | #n| +| # | | *-------------------------+-|e*----------------------+-* | | # | +| # | | * modeline |r* modeline * | | # | +| # | | ******************************************************** | | # | +| # | | * minibuffer * | | # | +| # | | ******************************************************** | | # | +| # | | internal border width | | # | +| # |--------------------------------------------------------------| # | +| # | gutter | # | +| #--------------------------------------------------------------------# | +| # toolbar # | +| ###################################################################### | +| window manager decoration | ++------------------------------------------------------------------------+ + + # = boundary of client area; * = window boundaries, boundary of paned area + = = boundary of inner text area; . = inside margin area +@end example + +Note in particular what happens at the corners, where a "corner box" +occurs. Top and bottom toolbars take precedence over left and right +toolbars, extending out horizontally into the corner boxes. Gutters +work the same way. The corner box where the scrollbars meet, however, +is assigned to neither scrollbar, and is known as the "dead box"; it is +an area that must be cleared specially. + +@node The Frame, The Non-Client Area, Intro to Window and Frame Geometry, Window and Frame Geometry +@section The Frame + +The "top-level window area" is the entire area of a top-level window (or +"frame"). The "client area" (a term from MS Windows) is the area of a +top-level window that XEmacs draws into and manages with redisplay. +This includes the toolbar, scrollbars, gutters, dividers, text area, +modeline and minibuffer. It does not include the menubar, title or +outer borders. The "non-client area" is the area of a top-level window +outside of the client area and includes the menubar, title and outer +borders. Internally, all frame coordinates are relative to the client +area. + + +@node The Non-Client Area, The Client Area, The Frame, Window and Frame Geometry +@section The Non-Client Area + +Under X, the non-client area is split into two parts: + +@enumerate +@item +The outer layer is the window-manager decorations: The title and +borders. These are controlled by the window manager, a separate process +that controls the desktop, the location of icons, etc. When a process +tries to create a window, the window manager intercepts this action and +"reparents" the window, placing another window around it which contains +the window decorations, including the title bar, outer borders used for +resizing, etc. The window manager also implements any actions involving +the decorations, such as the ability to resize a window by dragging its +borders, move a window by dragging its title bar, etc. If there is no +window manager or you kill it, windows will have no decorations (and +will lose them if they previously had any) and you will not be able to +move or resize them. + +@item +Inside of the window-manager decorations is the "shell", which is +managed by the toolkit and widget libraries your program is linked with. +The code in @file{*-x.c} uses the Xt toolkit and various possible widget +libraries built on top of Xt, such as Motif, Athena, the "Lucid" +widgets, etc. Another possibility is GTK (@file{*-gtk.c}), which implements +both the toolkit and widgets. Under Xt, the "shell" window is an +EmacsShell widget, containing an EmacsManager widget of the same size, +which in turn contains a menubar widget and an EmacsFrame widget, inside +of which is the client area. (The division into EmacsShell and +EmacsManager is due to the complex and screwy geometry-management system +in Xt [and X more generally]. The EmacsShell handles negotation with +the window manager; the place of the EmacsManager widget is normally +assumed by a widget that manages the geometry of its child widgets, but +the EmacsManager widget just lets the XEmacs redisplay mechanism do the +positioning.) +@end enumerate + +Under Windows, the non-client area is managed by the window system. +There is no division such as under X. Part of the window-system API +(@file{USER.DLL}) of Win32 includes functions to control the menubars, title, +etc. and implements the move and resize behavior. There @strong{is} an +equivalent of the window manager, called the "shell", but it manages +only the desktop, not the windows themselves. The normal shell under +Windows is @file{EXPLORER.EXE}; if you kill this, you will lose the bar +containing the "Start" menu and tray and such, but the windows +themselves will not be affected or lose their decorations. + + +@node The Client Area, The Paned Area, The Non-Client Area, Window and Frame Geometry +@section The Client Area + +Inside of the client area is the toolbars, the gutters (where the buffer +tabs are displayed), the minibuffer, the internal border width, and one +or more non-overlapping "windows" (this is old Emacs terminology, from +before the time when frames existed at all; the standard terminology for +this would be "pane"). Each window can contain a modeline, horizontal +and/or vertical scrollbars, and (for non-rightmost windows) a vertical +divider, surrounding a text area. + +The dimensions of the toolbars and gutters are determined by the formula +(THICKNESS + 2 * BORDER-THICKNESS), where "thickness" is a cover term +for height or width, as appropriate. The height and width come from +@code{default-toolbar-height} and @code{default-toolbar-width} and the specific +versions of these (@code{top-toolbar-height}, @code{left-toolbar-width}, etc.). +The border thickness comes from @code{default-toolbar-border-height} and +@code{default-toolbar-border-width}, and the specific versions of these. The +gutter works exactly equivalently. + +Note that for any particular toolbar or gutter, it will only be +displayed if [a] its visibility specifier (@code{default-toolbar-visible-p} +etc.) is non-nil; [b] its thickness (@code{default-toolbar-height} etc.) is +greater than 0; [c] its contents (@code{default-toolbar} etc.) are non-nil. + +The position-specific toolbars interact with the default specifications +as follows: If the value for a position-specific specifier is not +defined in a particular domain (usually a window), and the position of +that specifier is set as the default position (using +@code{default-toolbar-position}), then the value from the corresponding +default specifier in that domain will be used. The gutters work the +same. + + +@node The Paned Area, Text Areas, The Client Area, Window and Frame Geometry +@section The Paned Area + +The area occupied by the "windows" is called the paned area. Note that +this includes the minibuffer, which is just another window but is +special-cased in XEmacs. Each window can include a horizontal and/or +vertical scrollbar, a modeline and a vertical divider to its right, as +well as the text area. Only non-rightmost windows can include a +vertical divider. (The minibuffer normally does not include either +modeline or scrollbars.) + +Note that, because the toolbars and gutters are controlled by +specifiers, and specifiers can have window-specific and buffer-specific +values, the size of the paned area can change depending on which window +is selected: In other words, if the selected window or buffer changes, +the entire paned area for the frame may change. + + +@node Text Areas, The Displayable Area, The Paned Area, Window and Frame Geometry +@section Text Areas, Fringes, Margins + +The space occupied by a window can be divided into the text area and the +fringes. The fringes include the modeline, scrollbars and vertical +divider on the right side (if any); inside of this is the text area, +where the text actually occurs. Note that a window may or may not +contain any of the elements that are part of the fringe -- this is +controlled by specifiers, e.g. @code{has-modeline-p}, +@code{horizontal-scrollbar-visible-p}, @code{vertical-scrollbar-visible-p}, +@code{vertical-divider-always-visible-p}, etc. + +In addition, it is possible to set margins in the text area using the +specifiers @code{left-margin-width} and @code{right-margin-width}. When this is +done, only the "inner text area" (the area inside of the margins) will +be used for normal display of text; the margins will be used for glyphs +with a layout policy of @code{outside-margin} (as set on an extent containing +the glyph by @code{set-extent-begin-glyph-layout} or +@code{set-extent-end-glyph-layout}). However, the calculation of the text +area size (e.g. in the function @code{window-text-area-width}) includes the +margins. Which margin is used depends on whether a glyph has been set +as the begin-glyph or end-glyph of an extent (@code{set-extent-begin-glyph} +etc.), using the left and right margins, respectively. + +Technically, the margins outside of the inner text area are known as the +"outside margins". The "inside margins" are in the inner text area and +constitute the whitespace between the outside margins and the first or +last non-whitespace character in a line; their width can vary from line +to line. Glyphs will be placed in the inside margin if their layout +policy is @code{inside-margin} or @code{whitespace}, with @code{whitespace} glyphs on +the inside and @code{inside-margin} glyphs on the outside. Inside-margin +glyphs can spill over into the outside margin if @code{use-left-overflow} or +@code{use-right-overflow}, respectively, is non-nil. + +See the Lisp Reference manual, under Annotations, for more details. + + +@node The Displayable Area, Which Functions Use Which?, Text Areas, Window and Frame Geometry +@section The Displayable Area + +The "displayable area" is not so much an actual area as a convenient +fiction. It is the area used to convert between pixel and character +dimensions for frames. The character dimensions for a frame (e.g. as +returned by @code{frame-width} and @code{frame-height} and set by +@code{set-frame-width} and @code{set-frame-height}) are determined from the +displayable area by dividing by the pixel size of the default font as +instantiated in the frame. (For proportional fonts, the "average" width +is used. Under Windows, this is a built-in property of the fonts. +Under X, this is based on the width of the lowercase 'n', or if this is +zero then the width of the default character. [We prefer 'n' to the +specified default character because many X fonts have a default +character with a zero or otherwise non-representative width.]) + +The displayable area is essentially the "theoretical" paned area of the +frame excluding the rightmost and bottom-most scrollbars. In this +context, "theoretical" means that all calculations on based on +frame-level values for toolbar, gutter and scrollbar thicknesses. +Because these thicknesses are controlled by specifiers, and specifiers +can have window-specific and buffer-specific values, these calculations +may or may not reflect the actual size of the paned area or of the +scrollbars when any particular window is selected. Note also that the +"displayable area" may not even be contiguous! In particular, if the +frame-level value of the horizontal scrollbar height is non-zero, then +the displayable area includes the paned area above and below the bottom +horizontal scrollbar but not the scrollbar itself. + +As a further twist, the character-dimension calculations are adjusted so +that the truncation and continuation glyphs (see @code{truncation-glyph} and +@code{continuation-glyph}) count as a single character even if they are wider +than the default font width. (Technically, the character width is +computed from the displayable-area width by subtracting the maximum of +the truncation-glyph width, continuation-glyph width and default-font +width before dividing by the default-font width, and then adding 1 to +the result.) (The ultimate motivation for this kludge as well as the +subtraction of the scrollbars, but not the minibuffer or bottom-most +modeline, is to maintain compatibility with TTY's.) + +Despite all these concerns and kludges, however, the "displayable area" +concept works well in practice and mostly ensures that by default the +frame will actually fit 79 characters + continuation/truncation glyph. + + +@node Which Functions Use Which?, , The Displayable Area, Window and Frame Geometry +@section Which Functions Use Which? + +@enumerate +@item +Top-level window area: + +@example +set-frame-position +@code{left} and @code{top} frame properties +@end example + +@item +Client area: + +@example +frame-pixel-*, set-frame-pixel-* +@end example + +@item +Paned area: + +@example +window-pixel-edges +event-x-pixel, event-y-pixel, event-properties, make-event +@end example + +@item +Displayable area: + +@example +frame-width, frame-height and other all functions specifying frame size + in characters +frame-displayable-pixel-* +@end example +@end enumerate + + + +@node The Redisplay Mechanism, Extents, Window and Frame Geometry, Top @chapter The Redisplay Mechanism @cindex redisplay mechanism, the
--- a/src/.gdbinit.in.in Wed Feb 24 01:58:04 2010 -0600 +++ b/src/.gdbinit.in.in Wed Feb 24 19:04:27 2010 -0600 @@ -159,7 +159,7 @@ end define check-xemacs-arg - run -vanilla -batch -l @srcdir@/../tests/automated/test-harness.el -f batch-test-emacs @srcdir@/../tests/$arg0 + run -vanilla -batch -l test-harness -f batch-test-emacs @srcdir@/../tests/$arg0 end define check-xemacs @@ -178,7 +178,7 @@ define check-temacs-arg environment-to-run-temacs - run -nd -no-packages -batch -l @srcdir@/../lisp/loadup.el run-temacs -q -batch -l @srcdir@/../tests/automated/test-harness.el -f batch-test-emacs @srcdir@/../tests/$arg0 + run -nd -no-packages -batch -l @srcdir@/../lisp/loadup.el run-temacs -q -batch -l test-harness -f batch-test-emacs @srcdir@/../tests/$arg0 define check-temacs if $argc == 0
--- a/src/ChangeLog Wed Feb 24 01:58:04 2010 -0600 +++ b/src/ChangeLog Wed Feb 24 19:04:27 2010 -0600 @@ -232,6 +232,557 @@ * window.c (make_dummy_parent): Create a simpler interface (ALLOC_LCRECORD) for allocating +2010-02-24 Didier Verna <didier@xemacs.org> + + * glyphs.c: Clarify comment about potential_pixmap_file_instantiator. + * glyphs.c (xbm_mask_file_munging): Clarify comment, remove + unreachable condition and provide a cuple of assertions. + * glyphs.c (xbm_normalize): Clarify comments, error on mask file + not found. + * glyphs.c (xface_normalize): Ditto, and handle inline data properly. + +2010-02-22 Ben Wing <ben@xemacs.org> + + * .gdbinit.in.in: + * Makefile.in.in (batch_test_emacs): + test-harness.el is in lisp directory now so change how we call it. + +2010-02-22 Ben Wing <ben@xemacs.org> + + * alloc.c (object_memory_usage_stats): + Remove unused var. + +2010-02-21 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (FREE_FIXED_TYPE_WHEN_NOT_IN_GC): + * alloc.c (struct): + * alloc.c (tick_lrecord_stats): + * alloc.c (tick_lcrecord_stats): + * alloc.c (sweep_lcrecords_1): + * alloc.c (COUNT_FROB_BLOCK_USAGE): + * alloc.c (SWEEP_FIXED_TYPE_BLOCK_1): + * alloc.c (free_cons): + * alloc.c (free_key_data): + * alloc.c (free_button_data): + * alloc.c (free_motion_data): + * alloc.c (free_process_data): + * alloc.c (free_timeout_data): + * alloc.c (free_magic_data): + * alloc.c (free_magic_eval_data): + * alloc.c (free_eval_data): + * alloc.c (free_misc_user_data): + * alloc.c (free_marker): + * alloc.c (gc_sweep_1): + * alloc.c (HACK_O_MATIC): + * alloc.c (FROB): + * alloc.c (object_memory_usage_stats): + * alloc.c (Fgarbage_collect): + * dumper.c: + * dumper.c (pdump_objects_unmark): + * lrecord.h: + * lrecord.h (enum lrecord_alloc_status): + Fixes to memory-usage-tracking code, etc. + + (1) Incorporate NEW_GC stuff into FREE_FIXED_TYPE_WHEN_NOT_IN_GC + to avoid duplication. + + (2) Rewrite tick_lcrecord_stats() to include separate + tick_lrecord_stats(); use in dumper.c to note pdumped objects. + + (3) Instead of handling frob-block objects specially in + object_memory_usage_stats(), have SWEEP_FIXED_TYPE_BLOCK_1 + increment the stats in lrecord_stats[] so that they get handled + like other objects. + + (4) Pluralize entry as entries, etc. + +2010-02-21 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (pluralize_word): + New function to pluralize a word. + * alloc.c (pluralize_and_append): New function. + * alloc.c (object_memory_usage_stats): + Clean up duplication. + +2010-02-21 Vin Shelton <acs@xemacs.org> + + * events.c (event_pixel_translation): Simplify assertion for + Visual C 6. + +2010-02-21 Ben Wing <ben@xemacs.org> + + * gc.c (kkcc_marking): Fix compile error. + * mc-alloc.c: + #if 0 out some unused functions. + +2010-02-21 Ben Wing <ben@xemacs.org> + + * extents.c (process_extents_for_insertion_mapper): + Assertion wasn't quite set up correctly in previous patch. + +2010-02-20 Ben Wing <ben@xemacs.org> + + * EmacsFrame.c: + * EmacsFrame.c (EmacsFrameRecomputeCellSize): + * alloca.c (i00afunc): + * buffer.c: + * buffer.c (MARKED_SLOT): + * buffer.c (complex_vars_of_buffer): + * cm.c: + * cm.c (cmcheckmagic): + * console.c: + * console.c (MARKED_SLOT): + * device-x.c: + * device-x.c (x_get_visual_depth): + * emacs.c (sort_args): + * eval.c (throw_or_bomb_out): + * event-stream.c: + * event-stream.c (Fadd_timeout): + * event-stream.c (Fadd_async_timeout): + * event-stream.c (Frecent_keys): + * events.c: + * events.c (Fdeallocate_event): + * events.c (event_pixel_translation): + * extents.c: + * extents.c (process_extents_for_insertion_mapper): + * fns.c (Fbase64_encode_region): + * fns.c (Fbase64_encode_string): + * fns.c (Fbase64_decode_region): + * fns.c (Fbase64_decode_string): + * font-lock.c: + * font-lock.c (find_context): + * frame-x.c: + * frame-x.c (x_wm_mark_shell_size_user_specified): + * frame-x.c (x_wm_mark_shell_position_user_specified): + * frame-x.c (x_wm_set_shell_iconic_p): + * frame-x.c (x_wm_set_cell_size): + * frame-x.c (x_wm_set_variable_size): + * frame-x.c (x_wm_store_class_hints): + * frame-x.c (x_wm_maybe_store_wm_command): + * frame-x.c (x_initialize_frame_size): + * frame.c (delete_frame_internal): + * frame.c (change_frame_size_1): + * free-hook.c (check_free): + * free-hook.c (note_block_input): + * free-hook.c (log_gcpro): + * gccache-gtk.c (gc_cache_lookup): + * gccache-x.c: + * gccache-x.c (gc_cache_lookup): + * glyphs-gtk.c: + * glyphs-gtk.c (init_image_instance_from_gdk_pixmap): + * glyphs-x.c: + * glyphs-x.c (extract_xpm_color_names): + * insdel.c: + * insdel.c (move_gap): + * keymap.c: + * keymap.c (keymap_lookup_directly): + * keymap.c (keymap_delete_inverse_internal): + * keymap.c (accessible_keymaps_mapper_1): + * keymap.c (where_is_recursive_mapper): + * lisp.h: + * lstream.c (make_lisp_buffer_stream_1): + * macros.c: + * macros.c (pop_kbd_macro_event): + * mc-alloc.c (remove_page_from_used_list): + * menubar-x.c: + * menubar-x.c (set_frame_menubar): + * ralloc.c: + * ralloc.c (obtain): + * ralloc.c (relinquish): + * ralloc.c (relocate_blocs): + * ralloc.c (resize_bloc): + * ralloc.c (r_alloc_free): + * ralloc.c (r_re_alloc): + * ralloc.c (r_alloc_thaw): + * ralloc.c (init_ralloc): + * ralloc.c (Free_Addr_Block): + * scrollbar-x.c: + * scrollbar-x.c (x_update_scrollbar_instance_status): + * sunplay.c (init_device): + * unexnt.c: + * unexnt.c (read_in_bss): + * unexnt.c (map_in_heap): + * window.c: + * window.c (real_window): + * window.c (window_display_lines): + * window.c (window_display_buffer): + * window.c (set_window_display_buffer): + * window.c (unshow_buffer): + * window.c (Fget_lru_window): + if (...) ABORT(); ---> assert(); + + More specifically: + + if (x == y) ABORT (); --> assert (x != y); + if (x != y) ABORT (); --> assert (x == y); + if (x > y) ABORT (); --> assert (x <= y); + etc. + if (!x) ABORT (); --> assert (x); + if (x) ABORT (); --> assert (!x); + + DeMorgan's Law's applied and manually simplified: + if (x && !y) ABORT (); --> assert (!x || y); + if (!x || y >= z) ABORT (); --> assert (x && y < z); + + Checked to make sure that assert() of an expression with side + effects ensures that the side effects get executed even when + asserts are disabled, and add a comment about this being a + requirement of any "disabled assert" expression. + + * depend: + * make-src-depend: + * make-src-depend (PrintDeps): + Fix broken code in make-src-depend so it does what it was always + supposed to do, which was separate out config.h and lisp.h and + all the files they include into separate variables in the + depend part of Makefile so that quick-build can turn off the + lisp.h/config.h/text.h/etc. dependencies of the source files, to + speed up recompilation. + + +2010-02-20 Ben Wing <ben@xemacs.org> + + * EmacsFrame.c (EmacsFrameRecomputeCellSize): + * faces.c (default_face_font_info): + * faces.c (default_face_width_and_height): + * faces.c (Fface_list): + * faces.h: + * frame-gtk.c (gtk_set_initial_frame_size): + * frame-gtk.c (gtk_set_frame_size): + * frame-gtk.c (gtk_recompute_cell_sizes): + * frame.c: + * frame.c (frame_conversion_internal_1): + * frame.c (change_frame_size_1): + * frame.c (change_frame_size): + * glyphs-msw.c (mswindows_combo_box_instantiate): + * glyphs-widget.c (widget_instantiate): + * glyphs-widget.c (tree_view_query_geometry): + * glyphs-widget.c (Fwidget_logical_to_character_width): + * glyphs-widget.c (Fwidget_logical_to_character_height): + * indent.c (vmotion_pixels): + * redisplay-output.c (get_cursor_size_and_location): + * redisplay-xlike-inc.c (XLIKE_output_eol_cursor): + * redisplay-xlike-inc.c (XLIKE_flash): + * redisplay.c (calculate_baseline): + * redisplay.c (start_with_point_on_display_line): + * redisplay.c (glyph_to_pixel_translation): + * redisplay.c (pixel_to_glyph_translation): + * window.c (margin_width_internal): + * window.c (frame_size_valid_p): + * window.c (frame_pixsize_valid_p): + * window.c (check_frame_size): + * window.c (set_window_pixsize): + * window.c (window_pixel_height_to_char_height): + * window.c (window_char_height_to_pixel_height): + * window.c (window_displayed_height): + * window.c (window_pixel_width_to_char_width): + * window.c (window_char_width_to_pixel_width): + * window.c (change_window_height): + * window.c (window_scroll): + * window.h: + IMPORTANT: Aidan and Carbon Repo, please pay attention and fix + appropriately! + + Rename: default_face_height_and_width -> default_face_width_and_height + and reverse width/height arguments. + + Reverse width/height arguments to the following functions: + -- default_face_font_info + -- default_face_height_and_width (see above) + -- check_frame_size + -- frame_size_valid_p (made into a static function) + + Fix a redisplay bug where args to default_face_height_and_width + were in the wrong order. + + +2010-02-20 Ben Wing <ben@xemacs.org> + + * syswindows.h: + Add table about GNU Emacs -> XEmacs Windows constants from + the internals manual. + + * frame.c: + Shrink size of diagram consistent with internals manual. + + * alloc.c: + * compiler.h: + * console.c: + * events.c: + * gc.c (gc_stat_start_new_gc): + * gc.c (gc_stat_resume_gc): + * gc.c (kkcc_marking): + * gc.c (gc_1): + * gc.c (gc): + * objects-tty.c: + * redisplay-msw.c: + * redisplay-msw.c (mswindows_clear_region): + * syntax.c: + * syntax.c (ST_COMMENT_STYLE): + * sysdep.c: + Fix various compiler warnings. + +2010-02-16 Ben Wing <ben@xemacs.org> + + * frame-impl.h: + * frame-impl.h (FRAME_INTERNAL_BORDER_WIDTH): + * frame-impl.h (FRAME_REAL_TOOLBAR_BOUNDS): + * frame-impl.h (FRAME_REAL_TOP_TOOLBAR_BOUNDS): + * frame-impl.h (FRAME_BOTTOM_BORDER_START): + * frame-impl.h (FRAME_LEFT_BORDER_START): + * frame-impl.h (FRAME_RIGHT_BORDER_START): + * frame.c (frame_conversion_internal_1): + * frame.c (change_frame_size_1): + * redisplay-output.c (clear_left_border): + * redisplay-output.c (clear_right_border): + * redisplay-output.c (redisplay_clear_top_of_window): + * redisplay-output.c (redisplay_clear_to_window_end): + * redisplay-output.c (redisplay_clear_bottom_of_window): + Rename FRAME_BORDER_* to FRAME_INTERNAL_BORDER_*. Add + general FRAME_INTERNAL_BORDER_SIZE(). Add FRAME_REAL_TOOLBAR_BOUNDS() + to encompass the entire size of the toolbar including its border. + Add specific top/left/bottom/right versions of this macro. + Rewrite FRAME_*_BORDER_START and FRAME_*_BORDER_END to take into use + FRAME_REAL_*_TOOLBAR_BOUNDS(). Add some comments about existing + problems in frame sizing and how they might be fixed. Simplify + change_frame_size_1() using the macros just created. + +2010-02-15 Ben Wing <ben@xemacs.org> + + * frame.c (change_frame_size_1): + Simplify the logic in this function. + + (1) Don't allow 0 as the value of height or width. The old code + that tried to allow this was totally broken, anyway, so obviously + this never happens any more. + + (2) Don't duplicate the code in frame_conversion_internal() that + converts displayable pixel size to total pixel size -- just call + that function. + +2010-02-15 Ben Wing <ben@xemacs.org> + + * EmacsFrame.c: + * EmacsFrame.c (EmacsFrameResize): + * console-msw-impl.h: + * console-msw-impl.h (struct mswindows_frame): + * console-msw-impl.h (FRAME_MSWINDOWS_TARGET_RECT): + * device-tty.c: + * device-tty.c (tty_asynch_device_change): + * event-msw.c: + * event-msw.c (mswindows_wnd_proc): + * faces.c (Fface_list): + * faces.h: + * frame-gtk.c: + * frame-gtk.c (gtk_set_initial_frame_size): + * frame-gtk.c (gtk_set_frame_size): + * frame-msw.c: + * frame-msw.c (mswindows_init_frame_1): + * frame-msw.c (mswindows_set_frame_size): + * frame-msw.c (mswindows_size_frame_internal): + * frame-msw.c (msprinter_init_frame_3): + * frame.c: + * frame.c (enum): + * frame.c (Fmake_frame): + * frame.c (adjust_frame_size): + * frame.c (store_minibuf_frame_prop): + * frame.c (Fframe_property): + * frame.c (Fframe_properties): + * frame.c (Fframe_displayable_pixel_height): + * frame.c (Fframe_displayable_pixel_width): + * frame.c (internal_set_frame_size): + * frame.c (Fset_frame_height): + * frame.c (Fset_frame_pixel_height): + * frame.c (Fset_frame_displayable_pixel_height): + * frame.c (Fset_frame_width): + * frame.c (Fset_frame_pixel_width): + * frame.c (Fset_frame_displayable_pixel_width): + * frame.c (Fset_frame_size): + * frame.c (Fset_frame_pixel_size): + * frame.c (Fset_frame_displayable_pixel_size): + * frame.c (frame_conversion_internal_1): + * frame.c (get_frame_displayable_pixel_size): + * frame.c (change_frame_size_1): + * frame.c (change_frame_size): + * frame.c (generate_title_string): + * frame.h: + * gtk-xemacs.c: + * gtk-xemacs.c (gtk_xemacs_size_request): + * gtk-xemacs.c (gtk_xemacs_size_allocate): + * gtk-xemacs.c (gtk_xemacs_paint): + * gutter.c: + * gutter.c (update_gutter_geometry): + * redisplay.c (end_hold_frame_size_changes): + * redisplay.c (redisplay_frame): + * toolbar.c: + * toolbar.c (update_frame_toolbars_geometry): + * window.c: + * window.c (frame_pixsize_valid_p): + * window.c (check_frame_size): + Various fixes to frame geometry to make it a bit easier to understand + and fix some bugs. + + 1. IMPORTANT: Some renamings. Will need to be applied carefully to + the carbon repository, in the following order: + + -- pixel_to_char_size -> pixel_to_frame_unit_size + -- char_to_pixel_size -> frame_unit_to_pixel_size + -- pixel_to_real_char_size -> pixel_to_char_size + -- char_to_real_pixel_size -> char_to_pixel_size + -- Reverse second and third arguments of change_frame_size() and + change_frame_size_1() to try to make functions consistent in + putting width before height. + -- Eliminate old round_size_to_char, because it didn't really + do anything differently from round_size_to_real_char() + -- round_size_to_real_char -> round_size_to_char; any places that + called the old round_size_to_char should just call the new one. + + 2. IMPORTANT FOR CARBON: The set_frame_size() method is now passed + sizes in "frame units", like all other frame-sizing functions, + rather than some hacked-up combination of char-cell units and + total pixel size. This only affects window systems that use + "pixelated geometry", and I'm not sure if Carbon is one of them. + MS Windows is pixelated, X and GTK are not. For pixelated-geometry + systems, the size in set_frame_size() is in displayable pixels + rather than total pixels and needs to be converted appropriately; + take a look at the changes made to mswindows_set_frame_size() + method if necessary. + + 3. Add a big long comment in frame.c describing how frame geometry + works. + + 4. Remove MS Windows-specific character height and width fields, + duplicative and unused. + + 5. frame-displayable-pixel-* and set-frame-displayable-pixel-* + didn't use to work on MS Windows, but they do now. + + 6. In general, clean up the handling of "pixelated geometry" so + that fewer functions have to worry about this. This is really + an abomination that should be removed entirely but that will + have to happen later. Fix some buggy code in + frame_conversion_internal() that happened to "work" because it + was countered by oppositely buggy code in change_frame_size(). + + 7. Clean up some frame-size code in toolbar.c and use functions + already provided in frame.c instead of rolling its own. + + 8. Fix check_frame_size() in window.c, which formerly didn't take + pixelated geometry into account. + + +2010-02-15 Ben Wing <ben@xemacs.org> + + * mc-alloc.c: + * mc-alloc.c (mc_realloc_1): + * mc-alloc.c (set_dirty_bit): + * mc-alloc.c (set_dirty_bit_for_address): + * mc-alloc.c (get_dirty_bit): + * mc-alloc.c (get_dirty_bit_for_address): + * mc-alloc.c (set_protection_bit): + * mc-alloc.c (set_protection_bit_for_address): + * mc-alloc.c (get_protection_bit): + * mc-alloc.c (get_protection_bit_for_address): + * mc-alloc.c (get_page_start): + * vdb-win32.c (win32_fault_handler): + * vdb.c: + Fix some compile warnings, make vdb test code conditional on + DEBUG_XEMACS. + +2010-02-15 Ben Wing <ben@xemacs.org> + + * regex.c: + * regex.c (DEBUG_FAIL_PRINT1): + * regex.c (PUSH_FAILURE_POINT): + * regex.c (POP_FAILURE_POINT): + * regex.c (regex_compile): + * regex.c (re_match_2_internal): + * regex.h: + * search.c: + * search.c (search_buffer): + * search.c (debug_regexps_changed): + * search.c (vars_of_search): + Add an internal variable debug_regexps and a corresponding Lisp + variable `debug-regexps' that takes a list of areas in which to + display debugging info about regex compilation and matching + (currently three areas exist). Use existing debugging code + already in regex.c and modify it so that it recognizes the + debug_regexps variable and the flags in it. + + Rename variable `debug-xemacs-searches' to just `debug-searches', + consistent with other debug vars. + +2010-02-20 Ben Wing <ben@xemacs.org> + + * device-x.c (Fx_get_resource): + * dynarr.c: + * dynarr.c (Dynarr_realloc): + * dynarr.c (Dynarr_newf): + * dynarr.c (Dynarr_lisp_realloc): + * dynarr.c (Dynarr_lisp_newf): + * dynarr.c (Dynarr_resize): + * dynarr.c (Dynarr_insert_many): + * dynarr.c (Dynarr_delete_many): + * dynarr.c (Dynarr_memory_usage): + * dynarr.c (stack_like_free): + * file-coding.c (coding_reader): + * file-coding.c (gzip_convert): + * gutter.c (output_gutter): + * lisp.h: + * lisp.h (Dynarr_declare): + * lisp.h (DYNARR_SET_LISP_IMP): + * lisp.h (CHECK_NATNUM): + * profile.c (create_timing_profile_table): + * redisplay-output.c (sync_rune_structs): + * redisplay-output.c (sync_display_line_structs): + * redisplay-output.c (redisplay_output_window): + * redisplay.c: + * redisplay.c (get_display_block_from_line): + * redisplay.c (add_ichar_rune_1): + * redisplay.c (ensure_modeline_generated): + * redisplay.c (generate_displayable_area): + * redisplay.c (regenerate_window): + * redisplay.c (update_line_start_cache): + * signal.c: + * signal.c (check_quit): + + Lots of rewriting of dynarr code. + + (1) Lots of documentation added. Also fix places that + referenced a now-bogus internals node concerning redisplay + critical sections. + + (2) Rename: + + Dynarr_add_lisp_string -> Dynarr_add_ext_lisp_string + Dynarr_set_length -> Dynarr_set_lengthr ("restricted") + Dynarr_increment -> Dynarr_incrementr + Dynarr_resize_if -> Dynarr_resize_to_add + + (3) New functions: + + Dynarr_elsize = dy->elsize_ + Dynarr_set_length(): Set length, resizing as necessary + Dynarr_set_length_and_zero(): Set length, resizing as necessary, + zeroing out new elements + Dynarr_increase_length(), Dynarr_increase_length_and_zero(): + Optimization of Dynarr_set_length(), Dynarr_set_length_and_zero() + when size is known to increase + Dynarr_resize_to_fit(): Resize as necessary to fit a given length. + Dynarr_set(): Set element at a given position, increasing length + as necessary and setting any newly created positions to 0 + + (4) Use Elemcount, Bytecount. + + (5) Rewrite many macros as inline functions. + +2010-02-20 Ben Wing <ben@xemacs.org> + + * tests.c: + Fix operation of c-tests. + 2010-02-19 Aidan Kehoe <kehoea@parhasard.net> * fns.c (split_string_by_ichar_1):
--- a/src/EmacsFrame.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/EmacsFrame.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* The emacs frame widget. Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1993-1995 Sun Microsystems, Inc. - Copyright (C) 1995 Ben Wing. + Copyright (C) 1995, 2010 Ben Wing. This file is part of XEmacs. @@ -324,8 +324,8 @@ update_various_frame_slots (ew); - pixel_to_char_size (f, ew->core.width, ew->core.height, &columns, &rows); - change_frame_size (f, rows, columns, 0); + pixel_to_frame_unit_size (f, ew->core.width, ew->core.height, &columns, &rows); + change_frame_size (f, columns, rows, 0); /* The code below is just plain wrong. If the EmacsShell or EmacsManager needs to know, they should just ask. If needed information is being @@ -589,10 +589,9 @@ int cw, ch; struct frame *f = ew->emacs_frame.frame; - if (! XtIsSubclass (w, emacsFrameClass)) - ABORT (); + assert (XtIsSubclass (w, emacsFrameClass)); - default_face_height_and_width (wrap_frame (f), &ch, &cw); + default_face_width_and_height (wrap_frame (f), &cw, &ch); if (FRAME_X_TOP_LEVEL_FRAME_P (f)) x_wm_set_cell_size (FRAME_X_SHELL_WIDGET (f), cw, ch); }
--- a/src/Makefile.in.in Wed Feb 24 01:58:04 2010 -0600 +++ b/src/Makefile.in.in Wed Feb 24 19:04:27 2010 -0600 @@ -882,7 +882,7 @@ ###################### Automated tests testdir = $(SRC)/../tests/automated -batch_test_emacs = $(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir) +batch_test_emacs = $(BATCH_PACKAGES) -l test-harness -f batch-test-emacs $(testdir) ## `config-changed' is useful if you are building both Unicode-internal ## and old-Mule workspaces using --srcdir and don't run configure before
--- a/src/alloc.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/alloc.c Wed Feb 24 19:04:27 2010 -0600 @@ -1185,7 +1185,12 @@ PUT_FIXED_TYPE_ON_FREE_LIST (type, structtype, FFT_ptr); \ MARK_LRECORD_AS_FREE (FFT_ptr); \ } while (0) - +#endif /* NEW_GC */ + +#ifdef NEW_GC +#define FREE_FIXED_TYPE_WHEN_NOT_IN_GC(lo, type, structtype, ptr) \ + free_lrecord (lo) +#else /* not NEW_GC */ /* Like FREE_FIXED_TYPE() but used when we are explicitly freeing a structure through free_cons(), free_marker(), etc. rather than through the normal process of sweeping. @@ -1200,15 +1205,15 @@ set, which is used for Purify and the like. */ #ifndef ALLOC_NO_POOLS -#define FREE_FIXED_TYPE_WHEN_NOT_IN_GC(type, structtype, ptr) \ -do { FREE_FIXED_TYPE (type, structtype, ptr); \ - DECREMENT_CONS_COUNTER (sizeof (structtype)); \ - gc_count_num_##type##_freelist++; \ +#define FREE_FIXED_TYPE_WHEN_NOT_IN_GC(lo, type, structtype, ptr) \ +do { FREE_FIXED_TYPE (type, structtype, ptr); \ + DECREMENT_CONS_COUNTER (sizeof (structtype)); \ + gc_count_num_##type##_freelist++; \ } while (0) #else -#define FREE_FIXED_TYPE_WHEN_NOT_IN_GC(type, structtype, ptr) +#define FREE_FIXED_TYPE_WHEN_NOT_IN_GC(lo, type, structtype, ptr) #endif -#endif /* NEW_GC */ +#endif /* (not) NEW_GC */ #ifdef NEW_GC #define ALLOCATE_FIXED_TYPE_AND_SET_IMPL(type, lisp_type, var, lrec_ptr)\ @@ -3463,6 +3468,8 @@ Dynarr_add (mcpro_names, varname); } +const Ascbyte *mcpro_name (int count); + /* External debugging function: Return the name of the variable at offset COUNT. */ const Ascbyte * @@ -3504,33 +3511,45 @@ int instances_freed; int bytes_freed; int instances_on_free_list; -} lcrecord_stats [countof (lrecord_implementations_table)]; - -static void -tick_lcrecord_stats (const struct lrecord_header *h, int free_p) + int bytes_on_free_list; +} lrecord_stats [countof (lrecord_implementations_table)]; + +void +tick_lrecord_stats (const struct lrecord_header *h, + enum lrecord_alloc_status status) { int type_index = h->type; - + Bytecount sz = detagged_lisp_object_size (h); + + switch (status) + { + case ALLOC_IN_USE: + lrecord_stats[type_index].instances_in_use++; + lrecord_stats[type_index].bytes_in_use += sz; + break; + case ALLOC_FREE: + lrecord_stats[type_index].instances_freed++; + lrecord_stats[type_index].bytes_freed += sz; + break; + case ALLOC_ON_FREE_LIST: + lrecord_stats[type_index].instances_on_free_list++; + lrecord_stats[type_index].bytes_on_free_list += sz; + break; + default: + ABORT (); + } +} + +inline static void +tick_lcrecord_stats (const struct lrecord_header *h, int free_p) +{ if (((struct old_lcrecord_header *) h)->free) { gc_checking_assert (!free_p); - lcrecord_stats[type_index].instances_on_free_list++; + tick_lrecord_stats (h, ALLOC_ON_FREE_LIST); } else - { - Bytecount sz = detagged_lisp_object_size (h); - - if (free_p) - { - lcrecord_stats[type_index].instances_freed++; - lcrecord_stats[type_index].bytes_freed += sz; - } - else - { - lcrecord_stats[type_index].instances_in_use++; - lcrecord_stats[type_index].bytes_in_use += sz; - } - } + tick_lrecord_stats (h, free_p ? ALLOC_FREE : ALLOC_IN_USE); } #endif /* not NEW_GC */ @@ -3544,8 +3563,6 @@ int num_used = 0; /* int total_size = 0; */ - xzero (lcrecord_stats); /* Reset all statistics to 0. */ - /* First go through and call all the finalize methods. Then go through and free the objects. There used to be only one loop here, with the call to the finalizer @@ -3600,6 +3617,22 @@ /* And the Lord said: Thou shalt use the `c-backslash-region' command to make macros prettier. */ +#define COUNT_FROB_BLOCK_USAGE(type) \ + EMACS_INT s = 0; \ + struct type##_block *x = current_##type##_block; \ + while (x) { s += sizeof (*x) + MALLOC_OVERHEAD; x = x->prev; } \ + DO_NOTHING + +#define COPY_INTO_LRECORD_STATS(type) \ +do { \ + COUNT_FROB_BLOCK_USAGE (type); \ + lrecord_stats[lrecord_type_##type].bytes_in_use += s; \ + lrecord_stats[lrecord_type_##type].instances_on_free_list += \ + gc_count_num_##type##_freelist; \ + lrecord_stats[lrecord_type_##type].instances_in_use += \ + gc_count_num_##type##_in_use; \ +} while (0) + #ifdef ERROR_CHECK_GC #define SWEEP_FIXED_TYPE_BLOCK_1(typename, obj_type, lheader) \ @@ -3644,86 +3677,88 @@ \ gc_count_num_##typename##_in_use = num_used; \ gc_count_num_##typename##_freelist = num_free; \ + COPY_INTO_LRECORD_STATS (typename); \ } while (0) #else /* !ERROR_CHECK_GC */ -#define SWEEP_FIXED_TYPE_BLOCK_1(typename, obj_type, lheader) \ -do { \ - struct typename##_block *SFTB_current; \ - struct typename##_block **SFTB_prev; \ - int SFTB_limit; \ - int num_free = 0, num_used = 0; \ - \ - typename##_free_list = 0; \ - \ - for (SFTB_prev = ¤t_##typename##_block, \ - SFTB_current = current_##typename##_block, \ - SFTB_limit = current_##typename##_block_index; \ - SFTB_current; \ - ) \ - { \ - int SFTB_iii; \ - int SFTB_empty = 1; \ - Lisp_Free *SFTB_old_free_list = typename##_free_list; \ - \ - for (SFTB_iii = 0; SFTB_iii < SFTB_limit; SFTB_iii++) \ - { \ - obj_type *SFTB_victim = &(SFTB_current->block[SFTB_iii]); \ - \ - if (LRECORD_FREE_P (SFTB_victim)) \ - { \ - num_free++; \ +#define SWEEP_FIXED_TYPE_BLOCK_1(typename, obj_type, lheader) \ +do { \ + struct typename##_block *SFTB_current; \ + struct typename##_block **SFTB_prev; \ + int SFTB_limit; \ + int num_free = 0, num_used = 0; \ + \ + typename##_free_list = 0; \ + \ + for (SFTB_prev = ¤t_##typename##_block, \ + SFTB_current = current_##typename##_block, \ + SFTB_limit = current_##typename##_block_index; \ + SFTB_current; \ + ) \ + { \ + int SFTB_iii; \ + int SFTB_empty = 1; \ + Lisp_Free *SFTB_old_free_list = typename##_free_list; \ + \ + for (SFTB_iii = 0; SFTB_iii < SFTB_limit; SFTB_iii++) \ + { \ + obj_type *SFTB_victim = &(SFTB_current->block[SFTB_iii]); \ + \ + if (LRECORD_FREE_P (SFTB_victim)) \ + { \ + num_free++; \ PUT_FIXED_TYPE_ON_FREE_LIST (typename, obj_type, SFTB_victim); \ - } \ - else if (C_READONLY_RECORD_HEADER_P (&SFTB_victim->lheader)) \ - { \ - SFTB_empty = 0; \ - num_used++; \ - } \ - else if (! MARKED_RECORD_HEADER_P (&SFTB_victim->lheader)) \ - { \ - num_free++; \ - FREE_FIXED_TYPE (typename, obj_type, SFTB_victim); \ - } \ - else \ - { \ - SFTB_empty = 0; \ - num_used++; \ - UNMARK_##typename (SFTB_victim); \ - } \ - } \ - if (!SFTB_empty) \ - { \ - SFTB_prev = &(SFTB_current->prev); \ - SFTB_current = SFTB_current->prev; \ - } \ - else if (SFTB_current == current_##typename##_block \ - && !SFTB_current->prev) \ - { \ - /* No real point in freeing sole allocation block */ \ - break; \ - } \ - else \ - { \ - struct typename##_block *SFTB_victim_block = SFTB_current; \ - if (SFTB_victim_block == current_##typename##_block) \ - current_##typename##_block_index \ - = countof (current_##typename##_block->block); \ - SFTB_current = SFTB_current->prev; \ - { \ - *SFTB_prev = SFTB_current; \ - xfree (SFTB_victim_block); \ - /* Restore free list to what it was before victim was swept */ \ - typename##_free_list = SFTB_old_free_list; \ - num_free -= SFTB_limit; \ - } \ - } \ - SFTB_limit = countof (current_##typename##_block->block); \ - } \ - \ - gc_count_num_##typename##_in_use = num_used; \ - gc_count_num_##typename##_freelist = num_free; \ + } \ + else if (C_READONLY_RECORD_HEADER_P (&SFTB_victim->lheader)) \ + { \ + SFTB_empty = 0; \ + num_used++; \ + } \ + else if (! MARKED_RECORD_HEADER_P (&SFTB_victim->lheader)) \ + { \ + num_free++; \ + FREE_FIXED_TYPE (typename, obj_type, SFTB_victim); \ + } \ + else \ + { \ + SFTB_empty = 0; \ + num_used++; \ + UNMARK_##typename (SFTB_victim); \ + } \ + } \ + if (!SFTB_empty) \ + { \ + SFTB_prev = &(SFTB_current->prev); \ + SFTB_current = SFTB_current->prev; \ + } \ + else if (SFTB_current == current_##typename##_block \ + && !SFTB_current->prev) \ + { \ + /* No real point in freeing sole allocation block */ \ + break; \ + } \ + else \ + { \ + struct typename##_block *SFTB_victim_block = SFTB_current; \ + if (SFTB_victim_block == current_##typename##_block) \ + current_##typename##_block_index \ + = countof (current_##typename##_block->block); \ + SFTB_current = SFTB_current->prev; \ + { \ + *SFTB_prev = SFTB_current; \ + xfree (SFTB_victim_block); \ + /* Restore free list to what it was before victim was swept */ \ + typename##_free_list = SFTB_old_free_list; \ + num_free -= SFTB_limit; \ + } \ + } \ + SFTB_limit = countof (current_##typename##_block->block); \ + } \ + \ + gc_count_num_##typename##_in_use = num_used; \ + gc_count_num_##typename##_freelist = num_free; \ + COPY_INTO_LRECORD_STATS (typename); \ } while (0) #endif /* !ERROR_CHECK_GC */ @@ -3771,11 +3806,7 @@ ASSERT_VALID_POINTER (XPNTR (cons_car (ptr))); #endif /* ERROR_CHECK_GC */ -#ifdef NEW_GC - free_lrecord (cons); -#else /* not NEW_GC */ - FREE_FIXED_TYPE_WHEN_NOT_IN_GC (cons, Lisp_Cons, ptr); -#endif /* not NEW_GC */ + FREE_FIXED_TYPE_WHEN_NOT_IN_GC (cons, cons, Lisp_Cons, ptr); } /* explicitly free a list. You **must make sure** that you have @@ -3910,11 +3941,8 @@ void free_key_data (Lisp_Object ptr) { -#ifdef NEW_GC - free_lrecord (ptr); -#else /* not NEW_GC */ - FREE_FIXED_TYPE_WHEN_NOT_IN_GC (key_data, Lisp_Key_Data, XKEY_DATA (ptr)); -#endif /* not NEW_GC */ + FREE_FIXED_TYPE_WHEN_NOT_IN_GC (ptr, key_data, Lisp_Key_Data, + XKEY_DATA (ptr)); } #ifndef NEW_GC @@ -3931,11 +3959,8 @@ void free_button_data (Lisp_Object ptr) { -#ifdef NEW_GC - free_lrecord (ptr); -#else /* not NEW_GC */ - FREE_FIXED_TYPE_WHEN_NOT_IN_GC (button_data, Lisp_Button_Data, XBUTTON_DATA (ptr)); -#endif /* not NEW_GC */ + FREE_FIXED_TYPE_WHEN_NOT_IN_GC (ptr, button_data, Lisp_Button_Data, + XBUTTON_DATA (ptr)); } #ifndef NEW_GC @@ -3952,11 +3977,8 @@ void free_motion_data (Lisp_Object ptr) { -#ifdef NEW_GC - free_lrecord (ptr); -#else /* not NEW_GC */ - FREE_FIXED_TYPE_WHEN_NOT_IN_GC (motion_data, Lisp_Motion_Data, XMOTION_DATA (ptr)); -#endif /* not NEW_GC */ + FREE_FIXED_TYPE_WHEN_NOT_IN_GC (ptr, motion_data, Lisp_Motion_Data, + XMOTION_DATA (ptr)); } #ifndef NEW_GC @@ -3973,11 +3995,8 @@ void free_process_data (Lisp_Object ptr) { -#ifdef NEW_GC - free_lrecord (ptr); -#else /* not NEW_GC */ - FREE_FIXED_TYPE_WHEN_NOT_IN_GC (process_data, Lisp_Process_Data, XPROCESS_DATA (ptr)); -#endif /* not NEW_GC */ + FREE_FIXED_TYPE_WHEN_NOT_IN_GC (ptr, process_data, Lisp_Process_Data, + XPROCESS_DATA (ptr)); } #ifndef NEW_GC @@ -3994,11 +4013,8 @@ void free_timeout_data (Lisp_Object ptr) { -#ifdef NEW_GC - free_lrecord (ptr); -#else /* not NEW_GC */ - FREE_FIXED_TYPE_WHEN_NOT_IN_GC (timeout_data, Lisp_Timeout_Data, XTIMEOUT_DATA (ptr)); -#endif /* not NEW_GC */ + FREE_FIXED_TYPE_WHEN_NOT_IN_GC (ptr, timeout_data, Lisp_Timeout_Data, + XTIMEOUT_DATA (ptr)); } #ifndef NEW_GC @@ -4015,11 +4031,8 @@ void free_magic_data (Lisp_Object ptr) { -#ifdef NEW_GC - free_lrecord (ptr); -#else /* not NEW_GC */ - FREE_FIXED_TYPE_WHEN_NOT_IN_GC (magic_data, Lisp_Magic_Data, XMAGIC_DATA (ptr)); -#endif /* not NEW_GC */ + FREE_FIXED_TYPE_WHEN_NOT_IN_GC (ptr, magic_data, Lisp_Magic_Data, + XMAGIC_DATA (ptr)); } #ifndef NEW_GC @@ -4036,11 +4049,8 @@ void free_magic_eval_data (Lisp_Object ptr) { -#ifdef NEW_GC - free_lrecord (ptr); -#else /* not NEW_GC */ - FREE_FIXED_TYPE_WHEN_NOT_IN_GC (magic_eval_data, Lisp_Magic_Eval_Data, XMAGIC_EVAL_DATA (ptr)); -#endif /* not NEW_GC */ + FREE_FIXED_TYPE_WHEN_NOT_IN_GC (ptr, magic_eval_data, Lisp_Magic_Eval_Data, + XMAGIC_EVAL_DATA (ptr)); } #ifndef NEW_GC @@ -4057,11 +4067,8 @@ void free_eval_data (Lisp_Object ptr) { -#ifdef NEW_GC - free_lrecord (ptr); -#else /* not NEW_GC */ - FREE_FIXED_TYPE_WHEN_NOT_IN_GC (eval_data, Lisp_Eval_Data, XEVAL_DATA (ptr)); -#endif /* not NEW_GC */ + FREE_FIXED_TYPE_WHEN_NOT_IN_GC (ptr, eval_data, Lisp_Eval_Data, + XEVAL_DATA (ptr)); } #ifndef NEW_GC @@ -4078,11 +4085,8 @@ void free_misc_user_data (Lisp_Object ptr) { -#ifdef NEW_GC - free_lrecord (ptr); -#else /* not NEW_GC */ - FREE_FIXED_TYPE_WHEN_NOT_IN_GC (misc_user_data, Lisp_Misc_User_Data, XMISC_USER_DATA (ptr)); -#endif /* not NEW_GC */ + FREE_FIXED_TYPE_WHEN_NOT_IN_GC (ptr, misc_user_data, Lisp_Misc_User_Data, + XMISC_USER_DATA (ptr)); } #endif /* EVENT_DATA_AS_OBJECTS */ @@ -4106,11 +4110,7 @@ void free_marker (Lisp_Object ptr) { -#ifdef NEW_GC - free_lrecord (ptr); -#else /* not NEW_GC */ - FREE_FIXED_TYPE_WHEN_NOT_IN_GC (marker, Lisp_Marker, XMARKER (ptr)); -#endif /* not NEW_GC */ + FREE_FIXED_TYPE_WHEN_NOT_IN_GC (ptr, marker, Lisp_Marker, XMARKER (ptr)); } @@ -4327,6 +4327,10 @@ void gc_sweep_1 (void) { + /* Reset all statistics to 0. They will be incremented when + sweeping lcrecords, frob-block lrecords and dumped objects. */ + xzero (lrecord_stats); + /* Free all unmarked records. Do this at the very beginning, before anything else, so that the finalize methods can safely examine items in the objects. sweep_lcrecords_1() makes @@ -4489,6 +4493,60 @@ return cons3 (intern (name), make_int (value), tail); } +/* Pluralize a lowercase English word stored in BUF, assuming BUF has + enough space to hold the extra letters (at most 2). */ +static void +pluralize_word (Ascbyte *buf) +{ + Bytecount len = strlen (buf); + int upper = 0; + Ascbyte d, e; + + if (len == 0 || len == 1) + goto pluralize_apostrophe_s; + e = buf[len - 1]; + d = buf[len - 2]; + upper = isupper (e); + e = tolower (e); + d = tolower (d); + if (e == 'y') + { + switch (d) + { + case 'a': + case 'e': + case 'i': + case 'o': + case 'u': + goto pluralize_s; + default: + buf[len - 1] = (upper ? 'I' : 'i'); + goto pluralize_es; + } + } + else if (e == 's' || e == 'x' || (e == 'h' && (d == 's' || d == 'c'))) + { + pluralize_es: + buf[len++] = (upper ? 'E' : 'e'); + } + pluralize_s: + buf[len++] = (upper ? 'S' : 's'); + buf[len] = '\0'; + return; + + pluralize_apostrophe_s: + buf[len++] = '\''; + goto pluralize_s; +} + +static void +pluralize_and_append (Ascbyte *buf, const Ascbyte *name, const Ascbyte *suffix) +{ + strcpy (buf, name); + pluralize_word (buf); + strcat (buf, suffix); +} + static Lisp_Object object_memory_usage_stats (int set_total_gc_usage) { @@ -4504,7 +4562,6 @@ { Ascbyte buf[255]; const Ascbyte *name = lrecord_implementations_table[i]->name; - int len = strlen (name); if (lrecord_stats[i].bytes_in_use_including_overhead != lrecord_stats[i].bytes_in_use) @@ -4521,87 +4578,70 @@ lrecord_stats[i].bytes_in_use, pl); tgu_val += lrecord_stats[i].bytes_in_use_including_overhead; - - if (name[len-1] == 's') - sprintf (buf, "%ses-used", name); - else - sprintf (buf, "%ss-used", name); + + pluralize_and_append (buf, name, "-used"); pl = gc_plist_hack (buf, lrecord_stats[i].instances_in_use, pl); } } #else /* not NEW_GC */ -#define HACK_O_MATIC(type, name, pl) do { \ - EMACS_INT s = 0; \ - struct type##_block *x = current_##type##_block; \ - while (x) { s += sizeof (*x) + MALLOC_OVERHEAD; x = x->prev; } \ - tgu_val += s; \ - (pl) = gc_plist_hack ((name), s, (pl)); \ +#define HACK_O_MATIC(type, name, pl) \ +do { \ + COUNT_FROB_BLOCK_USAGE (type); \ + tgu_val += s; \ + (pl) = gc_plist_hack ((name), s, (pl)); \ +} while (0) + +#define FROB(type) \ +do { \ + COUNT_FROB_BLOCK_USAGE (type); \ + tgu_val += s; \ } while (0) + FROB (extent); + FROB (event); + FROB (marker); + FROB (float); +#ifdef HAVE_BIGNUM + FROB (bignum); +#endif /* HAVE_BIGNUM */ +#ifdef HAVE_RATIO + FROB (ratio); +#endif /* HAVE_RATIO */ +#ifdef HAVE_BIGFLOAT + FROB (bigfloat); +#endif /* HAVE_BIGFLOAT */ + FROB (compiled_function); + FROB (symbol); + FROB (cons); + +#undef FROB + for (i = 0; i < lrecord_type_count; i++) { - if (lcrecord_stats[i].bytes_in_use != 0 - || lcrecord_stats[i].bytes_freed != 0 - || lcrecord_stats[i].instances_on_free_list != 0) + if (lrecord_stats[i].bytes_in_use != 0 + || lrecord_stats[i].bytes_freed != 0 + || lrecord_stats[i].instances_on_free_list != 0) { Ascbyte buf[255]; const Ascbyte *name = lrecord_implementations_table[i]->name; - int len = strlen (name); sprintf (buf, "%s-storage", name); - pl = gc_plist_hack (buf, lcrecord_stats[i].bytes_in_use, pl); - tgu_val += lcrecord_stats[i].bytes_in_use; - /* Okay, simple pluralization check for `symbol-value-varalias' */ - if (name[len-1] == 's') - sprintf (buf, "%ses-freed", name); - else - sprintf (buf, "%ss-freed", name); - if (lcrecord_stats[i].instances_freed != 0) - pl = gc_plist_hack (buf, lcrecord_stats[i].instances_freed, pl); - if (name[len-1] == 's') - sprintf (buf, "%ses-on-free-list", name); - else - sprintf (buf, "%ss-on-free-list", name); - if (lcrecord_stats[i].instances_on_free_list != 0) - pl = gc_plist_hack (buf, lcrecord_stats[i].instances_on_free_list, + pl = gc_plist_hack (buf, lrecord_stats[i].bytes_in_use, pl); + tgu_val += lrecord_stats[i].bytes_in_use; + pluralize_and_append (buf, name, "-freed"); + if (lrecord_stats[i].instances_freed != 0) + pl = gc_plist_hack (buf, lrecord_stats[i].instances_freed, pl); + pluralize_and_append (buf, name, "-on-free-list"); + if (lrecord_stats[i].instances_on_free_list != 0) + pl = gc_plist_hack (buf, lrecord_stats[i].instances_on_free_list, pl); - if (name[len-1] == 's') - sprintf (buf, "%ses-used", name); - else - sprintf (buf, "%ss-used", name); - pl = gc_plist_hack (buf, lcrecord_stats[i].instances_in_use, pl); + pluralize_and_append (buf, name, "-used"); + pl = gc_plist_hack (buf, lrecord_stats[i].instances_in_use, pl); } } - HACK_O_MATIC (extent, "extent-storage", pl); - pl = gc_plist_hack ("extents-free", gc_count_num_extent_freelist, pl); - pl = gc_plist_hack ("extents-used", gc_count_num_extent_in_use, pl); - HACK_O_MATIC (event, "event-storage", pl); - pl = gc_plist_hack ("events-free", gc_count_num_event_freelist, pl); - pl = gc_plist_hack ("events-used", gc_count_num_event_in_use, pl); - HACK_O_MATIC (marker, "marker-storage", pl); - pl = gc_plist_hack ("markers-free", gc_count_num_marker_freelist, pl); - pl = gc_plist_hack ("markers-used", gc_count_num_marker_in_use, pl); - HACK_O_MATIC (float, "float-storage", pl); - pl = gc_plist_hack ("floats-free", gc_count_num_float_freelist, pl); - pl = gc_plist_hack ("floats-used", gc_count_num_float_in_use, pl); -#ifdef HAVE_BIGNUM - HACK_O_MATIC (bignum, "bignum-storage", pl); - pl = gc_plist_hack ("bignums-free", gc_count_num_bignum_freelist, pl); - pl = gc_plist_hack ("bignums-used", gc_count_num_bignum_in_use, pl); -#endif /* HAVE_BIGNUM */ -#ifdef HAVE_RATIO - HACK_O_MATIC (ratio, "ratio-storage", pl); - pl = gc_plist_hack ("ratios-free", gc_count_num_ratio_freelist, pl); - pl = gc_plist_hack ("ratios-used", gc_count_num_ratio_in_use, pl); -#endif /* HAVE_RATIO */ -#ifdef HAVE_BIGFLOAT - HACK_O_MATIC (bigfloat, "bigfloat-storage", pl); - pl = gc_plist_hack ("bigfloats-free", gc_count_num_bigfloat_freelist, pl); - pl = gc_plist_hack ("bigfloats-used", gc_count_num_bigfloat_in_use, pl); -#endif /* HAVE_BIGFLOAT */ HACK_O_MATIC (string, "string-header-storage", pl); pl = gc_plist_hack ("long-strings-total-length", gc_count_string_total_size @@ -4616,20 +4656,6 @@ pl = gc_plist_hack ("short-strings-used", gc_count_num_short_string_in_use, pl); - HACK_O_MATIC (compiled_function, "compiled-function-storage", pl); - pl = gc_plist_hack ("compiled-functions-free", - gc_count_num_compiled_function_freelist, pl); - pl = gc_plist_hack ("compiled-functions-used", - gc_count_num_compiled_function_in_use, pl); - - HACK_O_MATIC (symbol, "symbol-storage", pl); - pl = gc_plist_hack ("symbols-free", gc_count_num_symbol_freelist, pl); - pl = gc_plist_hack ("symbols-used", gc_count_num_symbol_in_use, pl); - - HACK_O_MATIC (cons, "cons-storage", pl); - pl = gc_plist_hack ("conses-free", gc_count_num_cons_freelist, pl); - pl = gc_plist_hack ("conses-used", gc_count_num_cons_in_use, pl); - #undef HACK_O_MATIC #endif /* NEW_GC */ @@ -4706,8 +4732,9 @@ Fcons (make_int (gc_count_num_marker_in_use), make_int (gc_count_num_marker_freelist)), make_int (gc_count_string_total_size), - make_int (lcrecord_stats[lrecord_type_vector].bytes_in_use + - lcrecord_stats[lrecord_type_vector].bytes_freed), + make_int (lrecord_stats[lrecord_type_vector].bytes_in_use + + lrecord_stats[lrecord_type_vector].bytes_freed + + lrecord_stats[lrecord_type_vector].bytes_on_free_list), object_memory_usage_stats (1)); #endif /* not NEW_GC */ #else /* not ALLOC_TYPE_STATS */
--- a/src/alloca.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/alloca.c Wed Feb 24 19:04:27 2010 -0600 @@ -338,8 +338,7 @@ /* There must be at least one stack segment. Therefore it is a fatal error if "trailer" is null. */ - if (trailer == 0) - ABORT (); + assert (trailer != 0); /* Discard segments that do not contain our argument address. */ @@ -366,8 +365,7 @@ do { - if (trailer->this_size <= 0) - ABORT (); + assert (trailer->this_size > 0); result += trailer->this_size; trailer = (struct stk_trailer *) trailer->link; }
--- a/src/buffer.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/buffer.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* Buffer manipulation primitives for XEmacs. Copyright (C) 1985-1989, 1992-1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. - Copyright (C) 1995, 1996, 2000, 2001, 2002, 2004 Ben Wing. + Copyright (C) 1995, 1996, 2000, 2001, 2002, 2004, 2010 Ben Wing. This file is part of XEmacs. @@ -2870,10 +2870,9 @@ slot of buffer_local_flags and vice-versa. Must be done after all DEFVAR_BUFFER_LOCAL() calls. */ #define MARKED_SLOT(slot) \ - if ((XINT (buffer_local_flags.slot) != -2 && \ - XINT (buffer_local_flags.slot) != -3) \ - != !(NILP (XBUFFER (Vbuffer_local_symbols)->slot))) \ - ABORT (); + assert ((XINT (buffer_local_flags.slot) != -2 && \ + XINT (buffer_local_flags.slot) != -3) \ + == !(NILP (XBUFFER (Vbuffer_local_symbols)->slot))); #include "bufslots.h" {
--- a/src/cm.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/cm.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,5 +1,6 @@ /* Cursor motion subroutines for XEmacs. Copyright (C) 1985, 1994, 1995 Free Software Foundation, Inc. + Copyright (C) 2010 Ben Wing. loosely based primarily on public domain code written by Chris Torek This file is part of XEmacs. @@ -100,8 +101,7 @@ { if (curX == FrameCols) { - if (!MagicWrap || curY >= FrameRows - 1) - ABORT (); + assert (MagicWrap && curY < FrameRows - 1); if (termscript) putc ('\r', termscript); putchar ('\r');
--- a/src/compiler.h Wed Feb 24 01:58:04 2010 -0600 +++ b/src/compiler.h Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* Compiler-specific definitions for XEmacs. Copyright (C) 1998-1999, 2003 Free Software Foundation, Inc. Copyright (C) 1994 Richard Mlynarik. - Copyright (C) 1995, 1996, 2000-2004 Ben Wing. + Copyright (C) 1995, 1996, 2000-2004, 2010 Ben Wing. This file is part of XEmacs. @@ -233,23 +233,44 @@ # define ATTRIBUTE_UNUSED # endif # define UNUSED(decl) UNUSED_ARG (decl) ATTRIBUTE_UNUSED -# ifdef MULE -# define USED_IF_MULE(decl) decl -# else -# define USED_IF_MULE(decl) UNUSED (decl) -# endif -# ifdef HAVE_XFT -# define USED_IF_XFT(decl) decl -# else -# define USED_IF_XFT(decl) UNUSED (decl) -# endif -# ifdef HAVE_SCROLLBARS -# define USED_IF_SCROLLBARS(decl) decl -# else -# define USED_IF_SCROLLBARS(decl) UNUSED (decl) -# endif #endif /* UNUSED */ +/* Various macros for params/variables used or unused depending on + config flags. */ + +#ifdef MULE +# define USED_IF_MULE(decl) decl +#else +# define USED_IF_MULE(decl) UNUSED (decl) +#endif +#ifdef HAVE_XFT +# define USED_IF_XFT(decl) decl +#else +# define USED_IF_XFT(decl) UNUSED (decl) +#endif +#ifdef HAVE_SCROLLBARS +# define USED_IF_SCROLLBARS(decl) decl +#else +# define USED_IF_SCROLLBARS(decl) UNUSED (decl) +#endif +#ifdef NEW_GC +# define USED_IF_NEW_GC(decl) decl +# define UNUSED_IF_NEW_GC(decl) UNUSED (decl) +#else +# define USED_IF_NEW_GC(decl) UNUSED (decl) +# define UNUSED_IF_NEW_GC(decl) decl +#endif +#ifdef HAVE_TTY +#define USED_IF_TTY(decl) decl +#else +#define USED_IF_TTY(decl) UNUSED (decl) +#endif +#ifdef HAVE_TOOLBARS +#define USED_IF_TOOLBARS(decl) decl +#else +#define USED_IF_TOOLBARS(decl) UNUSED (decl) +#endif + /* Declaration that variable or expression X is "used" to defeat "unused variable" warnings. DON'T DO THIS FOR PARAMETERS IF IT ALL POSSIBLE. Use an UNUSED() or USED_IF_*() declaration on the parameter
--- a/src/console-msw-impl.h Wed Feb 24 01:58:04 2010 -0600 +++ b/src/console-msw-impl.h Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* Define mswindows-specific console, device, and frame object for XEmacs. Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. - Copyright (C) 2001, 2002 Ben Wing. + Copyright (C) 2001, 2002, 2010 Ben Wing. This file is part of XEmacs. @@ -206,10 +206,6 @@ /* Frame title hash value. See frame-msw.c */ unsigned int title_checksum; - /* Real character width and height of the frame. - FRAME_{HEIGHT,WIDTH} do not work for pixel geometry! */ - int charheight, charwidth; - #ifdef MULE int cursor_x; int cursor_y; @@ -259,8 +255,6 @@ (FRAME_MSWINDOWS_DATA (f)->toolbar_checksum[pos]) #define FRAME_MSWINDOWS_MENU_CHECKSUM(f) (FRAME_MSWINDOWS_DATA (f)->menu_checksum) #define FRAME_MSWINDOWS_TITLE_CHECKSUM(f) (FRAME_MSWINDOWS_DATA (f)->title_checksum) -#define FRAME_MSWINDOWS_CHARWIDTH(f) (FRAME_MSWINDOWS_DATA (f)->charwidth) -#define FRAME_MSWINDOWS_CHARHEIGHT(f) (FRAME_MSWINDOWS_DATA (f)->charheight) #define FRAME_MSWINDOWS_TARGET_RECT(f) (FRAME_MSWINDOWS_DATA (f)->target_rect) #define FRAME_MSWINDOWS_POPUP(f) (FRAME_MSWINDOWS_DATA (f)->popup)
--- a/src/console.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/console.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,6 @@ /* The console object. Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. - Copyright (C) 1996, 2002 Ben Wing. + Copyright (C) 1996, 2002, 2010 Ben Wing. This file is part of XEmacs. @@ -43,12 +43,6 @@ #include "console-tty-impl.h" #endif -#ifdef HAVE_TTY -#define USED_IF_TTY(decl) decl -#else -#define USED_IF_TTY(decl) UNUSED (decl) -#endif - Lisp_Object Vconsole_list, Vselected_console; Lisp_Object Vcreate_console_hook, Vdelete_console_hook; @@ -1597,10 +1591,9 @@ /* Check for DEFVAR_CONSOLE_LOCAL without initializing the corresponding slot of console_local_flags and vice-versa. Must be done after all DEFVAR_CONSOLE_LOCAL() calls. */ -#define MARKED_SLOT(slot) \ - if ((XINT (console_local_flags.slot) != -2 && \ - XINT (console_local_flags.slot) != -3) \ - != !(NILP (XCONSOLE (Vconsole_local_symbols)->slot))) \ - ABORT (); +#define MARKED_SLOT(slot) \ + assert ((XINT (console_local_flags.slot) != -2 && \ + XINT (console_local_flags.slot) != -3) \ + == !(NILP (XCONSOLE (Vconsole_local_symbols)->slot))); #include "conslots.h" }
--- a/src/depend Wed Feb 24 01:58:04 2010 -0600 +++ b/src/depend Wed Feb 24 19:04:27 2010 -0600 @@ -15,90 +15,90 @@ #endif #if defined(HAVE_MS_WINDOWS) -console-msw.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h -device-msw.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-msw.h objects.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h systime.h syswindows.h text.h vdb.h -dialog-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h specifier.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h -dired-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console-msw.h console.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h regex.h symeval.h symsinit.h syntax.h sysdir.h sysfile.h sysfloat.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h -event-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream-impl.h console-stream.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswait.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -frame-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -glyphs-msw.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -gui-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -menubar-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -objects-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h dumper.h elhash.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h specifier.h symeval.h symsinit.h syswindows.h text.h vdb.h -redisplay-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h debug.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h gutter.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -scrollbar-msw.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -select-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h select.h specifier.h symeval.h symsinit.h syswindows.h text.h vdb.h -toolbar-msw.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h dumper.h elhash.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syswindows.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h +console-msw.o: $(CONFIG_H) $(LISP_H) conslots.h console-impl.h console-msw-impl.h console-msw.h console.h elhash.h events.h intl-auto-encap-win32.h keymap-buttons.h opaque.h specifier.h systime.h syswindows.h +device-msw.o: $(CONFIG_H) $(LISP_H) charset.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream.h console.h device-impl.h device.h devslots.h events.h faces.h frame.h intl-auto-encap-win32.h keymap-buttons.h objects-msw.h objects.h redisplay.h specifier.h sysdep.h systime.h syswindows.h +dialog-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h frame-impl.h frame.h frameslots.h gui.h intl-auto-encap-win32.h opaque.h redisplay.h specifier.h sysfile.h syswindows.h +dired-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console-msw.h console.h intl-auto-encap-win32.h ndir.h regex.h syntax.h sysdir.h sysfile.h sysfloat.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h +event-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream-impl.h console-stream.h console.h device-impl.h device.h devslots.h dragdrop.h events.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gui.h intl-auto-encap-win32.h keymap-buttons.h lstream.h menubar.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswait.h syswindows.h window-impl.h window.h winslots.h +frame-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h glyphs-msw.h glyphs.h intl-auto-encap-win32.h keymap-buttons.h redisplay.h scrollbar.h specifier.h systime.h syswindows.h window-impl.h window.h winslots.h +glyphs-msw.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h lstream.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syswindows.h window-impl.h window.h winslots.h +gui-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h elhash.h events.h frame-impl.h frame.h frameslots.h glyphs.h gui.h intl-auto-encap-win32.h keymap-buttons.h redisplay.h scrollbar.h specifier.h systime.h syswindows.h window-impl.h window.h winslots.h +menubar-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h elhash.h events.h frame-impl.h frame.h frameslots.h gui.h intl-auto-encap-win32.h keymap-buttons.h menubar.h opaque.h redisplay.h scrollbar.h specifier.h systime.h syswindows.h window-impl.h window.h winslots.h +objects-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h elhash.h insdel.h intl-auto-encap-win32.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h specifier.h syswindows.h +redisplay-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h debug.h device-impl.h device.h devslots.h events.h faces.h frame-impl.h frame.h frameslots.h glyphs-msw.h glyphs.h gutter.h intl-auto-encap-win32.h keymap-buttons.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h systime.h syswindows.h window-impl.h window.h winslots.h +scrollbar-msw.o: $(CONFIG_H) $(LISP_H) conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h elhash.h events.h frame-impl.h frame.h frameslots.h intl-auto-encap-win32.h keymap-buttons.h opaque.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h systime.h syswindows.h window-impl.h window.h winslots.h +select-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h file-coding.h frame-impl.h frame.h frameslots.h intl-auto-encap-win32.h opaque.h redisplay.h select.h specifier.h syswindows.h +toolbar-msw.o: $(CONFIG_H) $(LISP_H) charset.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h elhash.h faces.h frame-impl.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h intl-auto-encap-win32.h redisplay.h scrollbar.h specifier.h syswindows.h toolbar.h window-impl.h window.h winslots.h #endif #if defined(HAVE_XLIKE) event-xlike-inc.o: objects-xlike-inc.o: $(LWLIB_SRCDIR)/lwlib.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h gccache-gtk.h gccache-x.h glyphs-gtk.h glyphs-x.h glyphs.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h sysgtk.h window-impl.h window.h winslots.h xintrinsic.h -redisplay-xlike-inc.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h debug.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h gccache-x.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysgtk.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h +redisplay-xlike-inc.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h debug.h device-impl.h device.h devslots.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gccache-gtk.h gccache-x.h glyphs-gtk.h glyphs-x.h glyphs.h gutter.h mule-ccl.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h sysgtk.h sysproc.h syssignal.h systime.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h select-xlike-inc.o: -toolbar-xlike.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h text.h toolbar-xlike.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h +toolbar-xlike.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h faces.h frame-impl.h frame.h frameslots.h glyphs.h redisplay.h scrollbar.h specifier.h sysgtk.h toolbar-xlike.h toolbar.h window-impl.h window.h winslots.h xintrinsic.h #endif #if defined(HAVE_X_WINDOWS) -EmacsFrame.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h +EmacsFrame.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h charset.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h faces.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h EmacsManager.o: $(CONFIG_H) $(LWLIB_SRCDIR)/lwlib.h EmacsManager.h EmacsManagerP.h compiler.h xintrinsicp.h xmmanagerp.h xmotif.h xmprimitivep.h EmacsShell-sub.o: $(CONFIG_H) $(LWLIB_SRCDIR)/lwlib.h EmacsShell.h EmacsShellP.h xintrinsic.h xintrinsicp.h EmacsShell.o: $(CONFIG_H) EmacsShell.h ExternalShell.h xintrinsicp.h -balloon-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h balloon_help.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h +balloon-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h balloon_help.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h specifier.h xintrinsic.h balloon_help.o: $(CONFIG_H) balloon_help.h compiler.h xintrinsic.h -console-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h -device-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h gccache-x.h general-slots.h glyphs-x.h glyphs.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h -dialog-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h xintrinsic.h -frame-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gutter.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h -gccache-x.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h gccache-x.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -glyphs-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h opaque.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h -gui-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h glyphs.h gui.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h -intl-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h compiler.h console-x.h console.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h xintrinsic.h -menubar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h -objects-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h device-impl.h device.h devslots.h dumper.h elhash.h font-mgr.h gc.h gccache-gtk.h gccache-x.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects-xlike-inc.c objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h -redisplay-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h debug.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h gccache-x.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay-xlike-inc.c redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysgtk.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h -scrollbar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h -select-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h opaque.h redisplay.h select-xlike-inc.c select.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h xintrinsic.h xmotif.h -toolbar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar-xlike.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h +console-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h elhash.h process.h redisplay.h specifier.h xintrinsic.h +device-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gccache-x.h glyphs-x.h glyphs.h intl-auto-encap-win32.h keymap-buttons.h objects-x.h objects.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysdll.h sysfile.h systime.h syswindows.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h +dialog-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-x-impl.h console-x.h console.h events.h frame-impl.h frame.h frameslots.h gui.h keymap-buttons.h opaque.h redisplay.h scrollbar.h specifier.h systime.h window.h xintrinsic.h +frame-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h gutter.h keymap-buttons.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar-x.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h +gccache-x.o: $(CONFIG_H) $(LISP_H) gccache-x.h hash.h +glyphs-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h lstream.h objects-impl.h objects-x-impl.h objects-x.h objects.h opaque.h process.h redisplay.h scrollbar.h specifier.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h +gui-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h events.h frame.h glyphs.h gui.h keymap-buttons.h menubar.h opaque.h redisplay.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h +intl-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h console-x.h console.h xintrinsic.h +menubar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h gui.h keymap-buttons.h keymap.h menubar.h opaque.h redisplay.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h xintrinsic.h +objects-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h device-impl.h device.h devslots.h elhash.h font-mgr.h gccache-gtk.h gccache-x.h glyphs-gtk.h glyphs-x.h glyphs.h insdel.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects-xlike-inc.c objects.h redisplay.h scrollbar.h specifier.h sysgtk.h window-impl.h window.h winslots.h xintrinsic.h +redisplay-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h debug.h device-impl.h device.h devslots.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gccache-gtk.h gccache-x.h glyphs-gtk.h glyphs-x.h glyphs.h gutter.h mule-ccl.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay-xlike-inc.c redisplay.h scrollbar.h specifier.h sysdep.h sysgtk.h sysproc.h syssignal.h systime.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h +scrollbar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h redisplay.h scrollbar-x.h scrollbar.h specifier.h window-impl.h window.h winslots.h xintrinsic.h +select-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h objects-x.h objects.h opaque.h redisplay.h select-xlike-inc.c select.h specifier.h systime.h xintrinsic.h xmotif.h +toolbar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h charset.h conslots.h console-impl.h console-x-impl.h console-x.h console.h faces.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h toolbar-xlike.h toolbar.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h #endif #if defined(HAVE_TTY) -console-tty.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h dumper.h elhash.h faces.h file-coding.h frame.h gc.h general-slots.h glyphs.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systty.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -device-tty.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h systty.h syswindows.h text.h vdb.h -event-tty.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h syswait.h text.h vdb.h -frame-tty.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h systime.h systty.h text.h vdb.h -objects-tty.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h specifier.h symeval.h symsinit.h systty.h text.h vdb.h -redisplay-tty.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h text.h vdb.h window-impl.h window.h winslots.h +console-tty.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h elhash.h faces.h file-coding.h frame.h glyphs.h intl-auto-encap-win32.h lstream.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systty.h syswindows.h window-impl.h window.h winslots.h +device-tty.o: $(CONFIG_H) $(LISP_H) charset.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h faces.h frame.h intl-auto-encap-win32.h keymap-buttons.h lstream.h redisplay.h specifier.h sysdep.h sysfile.h syssignal.h systime.h systty.h syswindows.h +event-tty.o: $(CONFIG_H) $(LISP_H) conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h events.h frame.h keymap-buttons.h process.h redisplay.h specifier.h sysproc.h syssignal.h systime.h systty.h syswait.h +frame-tty.o: $(CONFIG_H) $(LISP_H) conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h keymap-buttons.h redisplay.h specifier.h systime.h systty.h +objects-tty.o: $(CONFIG_H) $(LISP_H) charset.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h insdel.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h specifier.h systty.h +redisplay-tty.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h faces.h frame-impl.h frame.h frameslots.h glyphs.h keymap-buttons.h lstream.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h syssignal.h systime.h systty.h window-impl.h window.h winslots.h #endif #if defined(HAVE_GTK) -console-gtk.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysgtk.h text.h vdb.h -device-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h general-slots.h glyphs-gtk.h glyphs.h gtk-xemacs.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysgdkx.h sysgtk.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -dialog-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h events.h frame.h gc.h general-slots.h gui.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h systime.h text.h vdb.h window.h +console-gtk.o: $(CONFIG_H) $(LISP_H) charset.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h elhash.h process.h redisplay.h specifier.h sysgtk.h +device-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gccache-gtk.h glyphs-gtk.h glyphs.h gtk-xemacs.h intl-auto-encap-win32.h keymap-buttons.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h sysgdkx.h sysgtk.h systime.h syswindows.h window-impl.h window.h winslots.h +dialog-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h events.h frame.h gui.h keymap-buttons.h opaque.h redisplay.h scrollbar.h specifier.h sysgtk.h systime.h window.h emacs-marshals.o: hash.h emacs-widget-accessors.o: -event-gtk.o: $(CONFIG_H) $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gtk-xemacs.h gui.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgdkx.h sysgtk.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h window.h -frame-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h gtk-xemacs.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysgdkx.h sysgtk.h systime.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h -gccache-gtk.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h gccache-gtk.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysgtk.h text.h vdb.h +event-gtk.o: $(CONFIG_H) $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h dragdrop.h elhash.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h gtk-xemacs.h gui.h keymap-buttons.h lstream.h menubar.h objects-gtk.h objects.h process.h redisplay.h scrollbar.h specifier.h sysgdkx.h sysgtk.h sysproc.h syssignal.h systime.h systty.h window.h +frame-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dragdrop.h elhash.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h glyphs-gtk.h glyphs.h gtk-xemacs.h keymap-buttons.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h sysdll.h sysgdkx.h sysgtk.h systime.h ui-gtk.h window-impl.h window.h winslots.h +gccache-gtk.o: $(CONFIG_H) $(LISP_H) gccache-gtk.h hash.h sysgtk.h glade.o: bytecode.h -glyphs-gtk.o: $(CONFIG_H) $(LISP_H) bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysfile.h sysgdkx.h sysgtk.h systime.h syswindows.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h +glyphs-gtk.o: $(CONFIG_H) $(LISP_H) bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs-gtk.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h keymap-buttons.h lstream.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h sysdll.h sysfile.h sysgdkx.h sysgtk.h systime.h syswindows.h ui-gtk.h window-impl.h window.h winslots.h gtk-glue.o: console-gtk.h console.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h specifier.h sysgtk.h -gtk-xemacs.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gtk-xemacs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h text.h vdb.h window-impl.h window.h winslots.h -gui-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h specifier.h symeval.h symsinit.h sysgtk.h text.h vdb.h -menubar-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysgtk.h systime.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h -native-gtk-toolbar.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h console-gtk.h console.h dumper.h faces.h frame.h gc.h general-slots.h glyphs-gtk.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h -objects-gtk.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h device-impl.h device.h devslots.h dumper.h gc.h gccache-gtk.h gccache-x.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects-xlike-inc.c objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgdkx.h sysgtk.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h -redisplay-gtk.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h debug.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h gccache-x.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay-xlike-inc.c redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysgdkx.h sysgtk.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h -scrollbar-gtk.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h text.h vdb.h window-impl.h window.h winslots.h -select-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h select-xlike-inc.c select.h specifier.h symeval.h symsinit.h sysgtk.h systime.h text.h vdb.h -toolbar-gtk.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h sysgtk.h text.h toolbar-xlike.h vdb.h +gtk-xemacs.o: $(CONFIG_H) $(LISP_H) charset.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gtk-xemacs.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h sysgtk.h window-impl.h window.h winslots.h +gui-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h frame.h gui.h opaque.h redisplay.h specifier.h sysgtk.h +menubar-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h gui.h keymap-buttons.h menubar.h opaque.h redisplay.h scrollbar.h specifier.h sysdll.h sysgtk.h systime.h ui-gtk.h window-impl.h window.h winslots.h +native-gtk-toolbar.o: $(CONFIG_H) $(LISP_H) charset.h console-gtk.h console.h faces.h frame.h glyphs-gtk.h glyphs.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h sysgtk.h toolbar.h window-impl.h window.h winslots.h +objects-gtk.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h device-impl.h device.h devslots.h gccache-gtk.h gccache-x.h glyphs-gtk.h glyphs-x.h glyphs.h insdel.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects-xlike-inc.c objects.h redisplay.h scrollbar.h specifier.h sysgdkx.h sysgtk.h window-impl.h window.h winslots.h xintrinsic.h +redisplay-gtk.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h debug.h device-impl.h device.h devslots.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gccache-gtk.h gccache-x.h glyphs-gtk.h glyphs-x.h glyphs.h gutter.h mule-ccl.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay-xlike-inc.c redisplay.h scrollbar.h specifier.h sysdep.h sysgdkx.h sysgtk.h sysproc.h syssignal.h systime.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h +scrollbar-gtk.o: $(CONFIG_H) $(LISP_H) conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h frame-impl.h frame.h frameslots.h glyphs-gtk.h glyphs.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h sysgtk.h window-impl.h window.h winslots.h +select-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h events.h frame.h keymap-buttons.h opaque.h redisplay.h select-xlike-inc.c select.h specifier.h sysgtk.h systime.h +toolbar-gtk.o: $(CONFIG_H) $(LISP_H) conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h frame.h redisplay.h specifier.h sysgtk.h toolbar-xlike.h ui-byhand.o: gui.h -ui-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device.h dumper.h elhash.h emacs-marshals.c emacs-widget-accessors.c events.h faces.h gc.h general-slots.h glade.c glyphs-gtk.h glyphs.h gtk-glue.c gui.h hash.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysgtk.h systime.h text.h ui-byhand.c ui-gtk.h vdb.h window-impl.h window.h winslots.h +ui-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device.h elhash.h emacs-marshals.c emacs-widget-accessors.c events.h faces.h glade.c glyphs-gtk.h glyphs.h gtk-glue.c gui.h hash.h keymap-buttons.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h sysdll.h sysgtk.h systime.h ui-byhand.c ui-gtk.h window-impl.h window.h winslots.h #endif #if defined(HAVE_DATABASE) -database.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h database.h dumper.h file-coding.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h +database.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h database.h file-coding.h intl-auto-encap-win32.h sysfile.h syswindows.h #endif #if defined(MULE) -mule-ccl.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -mule-charset.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h elhash.h faces.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects.h specifier.h symeval.h symsinit.h text.h vdb.h -mule-coding.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h extents.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h rangetab.h symeval.h symsinit.h text.h vdb.h -mule-wnnfns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h text.h vdb.h window.h +mule-ccl.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h elhash.h file-coding.h mule-ccl.h +mule-charset.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console.h device.h elhash.h faces.h lstream.h mule-ccl.h objects.h specifier.h +mule-coding.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h elhash.h extents.h file-coding.h mule-ccl.h rangetab.h +mule-wnnfns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h redisplay.h scrollbar.h sysdep.h window.h #endif #if defined(EXTERNAL_WIDGET) ExternalClient-Xlib.o: extw-Xlib.h @@ -107,153 +107,153 @@ extw-Xlib.o: $(CONFIG_H) extw-Xlib.h extw-Xt.o: $(CONFIG_H) compiler.h extw-Xlib.h extw-Xt.h #endif -abbrev.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h syntax.h text.h vdb.h window.h -alloc.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console.h device.h dumper.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -alloca.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -alsaplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h -blocktype.o: $(CONFIG_H) $(LISP_H) blocktype.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -buffer.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h select.h specifier.h symeval.h symsinit.h syntax.h sysdir.h sysfile.h syswindows.h text.h vdb.h window.h -bytecode.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode-ops.h bytecode.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h symeval.h symsinit.h syntax.h text.h vdb.h window.h -callint.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h events.h gc.h general-slots.h insdel.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h -casefiddle.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h -casetab.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h -chartab.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h -cm.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h systty.h text.h vdb.h -cmdloop.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-msw.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window.h -cmds.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h extents.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h -console-stream.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h systty.h syswindows.h text.h vdb.h window.h -console.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h systty.h text.h vdb.h window.h -data.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfloat.h syssignal.h text.h vdb.h -debug.o: $(CONFIG_H) $(LISP_H) bytecode.h compiler.h debug.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -device.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h text.h toolbar.h vdb.h window.h -dialog.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h -dired.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h elhash.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h opaque.h regex.h symeval.h symsinit.h syntax.h sysdep.h sysdir.h sysfile.h syspwd.h systime.h syswindows.h text.h vdb.h -doc.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h -doprnt.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -dragdrop.o: $(CONFIG_H) $(LISP_H) compiler.h dragdrop.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -dump-data.o: $(CONFIG_H) $(LISP_H) compiler.h dump-data.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -dumper.o: $(CONFIG_H) $(LISP_H) coding-system-slots.h compiler.h console-stream.h console.h dump-data.h dumper.h elhash.h file-coding.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h specifier.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h -dynarr.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +abbrev.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h insdel.h redisplay.h scrollbar.h syntax.h window.h +alloc.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-stream.h console.h device.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h glyphs.h intl-auto-encap-win32.h keymap-buttons.h lstream.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h syswindows.h window-impl.h window.h winslots.h +alloca.o: $(CONFIG_H) $(LISP_H) +alsaplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h sound.h sysfile.h syswindows.h +blocktype.o: $(CONFIG_H) $(LISP_H) blocktype.h +buffer.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h insdel.h intl-auto-encap-win32.h lstream.h ndir.h process.h redisplay.h scrollbar.h select.h specifier.h syntax.h sysdir.h sysfile.h syswindows.h window.h +bytecode.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode-ops.h bytecode.h casetab.h charset.h chartab.h opaque.h redisplay.h scrollbar.h syntax.h window.h +callint.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h events.h insdel.h keymap-buttons.h redisplay.h scrollbar.h systime.h window-impl.h window.h winslots.h +casefiddle.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h insdel.h syntax.h +casetab.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h opaque.h +chartab.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h syntax.h +cm.o: $(CONFIG_H) $(LISP_H) conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h frame.h lstream.h redisplay.h specifier.h systty.h +cmdloop.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-msw.h console.h device.h events.h frame.h intl-auto-encap-win32.h keymap-buttons.h redisplay.h scrollbar.h specifier.h systime.h syswindows.h window.h +cmds.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h extents.h insdel.h syntax.h +console-stream.o: $(CONFIG_H) $(LISP_H) conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h intl-auto-encap-win32.h keymap-buttons.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h systty.h syswindows.h window.h +console.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h keymap-buttons.h redisplay.h scrollbar.h specifier.h sysdep.h systime.h systty.h window.h +data.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h sysfloat.h syssignal.h +debug.o: $(CONFIG_H) $(LISP_H) bytecode.h debug.h +device.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h keymap-buttons.h keymap.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h syssignal.h systime.h toolbar.h window.h +dialog.o: $(CONFIG_H) $(LISP_H) conslots.h console-impl.h console.h frame-impl.h frame.h frameslots.h redisplay.h specifier.h +dired.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h elhash.h intl-auto-encap-win32.h ndir.h opaque.h regex.h syntax.h sysdep.h sysdir.h sysfile.h syspwd.h systime.h syswindows.h +doc.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h file-coding.h insdel.h intl-auto-encap-win32.h keymap-buttons.h keymap.h lstream.h sysfile.h syswindows.h +doprnt.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h lstream.h +dragdrop.o: $(CONFIG_H) $(LISP_H) dragdrop.h +dump-data.o: $(CONFIG_H) $(LISP_H) dump-data.h +dumper.o: $(CONFIG_H) $(LISP_H) coding-system-slots.h console-stream.h console.h dump-data.h elhash.h file-coding.h intl-auto-encap-win32.h lstream.h specifier.h sysfile.h syswindows.h +dynarr.o: $(CONFIG_H) $(LISP_H) ecrt0.o: $(CONFIG_H) -editfns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h keymap-buttons.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h window.h -elhash.o: $(CONFIG_H) $(LISP_H) bytecode.h compiler.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h -emacs.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h console-msw.h console.h dump-data.h dumper.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h paths.h process.h redisplay.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h text.h vdb.h -emodules.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h dumper.h emodules.h file-coding.h frame.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdll.h text.h vdb.h window.h -esd.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h miscplay.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h -eval.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device.h dumper.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window.h -event-Xt.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h Emacs.ad.h EmacsFrame.h blocktype.h charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-tty.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h -event-stream.o: $(CONFIG_H) $(LISP_H) backtrace.h blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h insdel.h intl-auto-encap-win32.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h macros.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -event-unixoid.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h text.h vdb.h -events.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h events.h extents.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h systty.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h -extents.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h debug.h device.h dumper.h elhash.h extents-impl.h extents.h faces.h frame.h gc.h general-slots.h glyphs.h gutter.h insdel.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h -faces.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h extents-impl.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h -file-coding.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h extents.h file-coding.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h rangetab.h symeval.h symsinit.h text.h vdb.h -fileio.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h device.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h profile.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -filelock.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h paths.h symeval.h symsinit.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h -filemode.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h -floatfns.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfloat.h syssignal.h text.h vdb.h -fns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h events.h extents.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h redisplay.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h -font-lock.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h -font-mgr.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h font-mgr.h gc.h general-slots.h hash.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h specifier.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h xintrinsic.h -frame.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h gutter.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h -free-hook.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -gc.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console.h device.h dumper.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -general.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -getloadavg.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h -glyphs-eimage.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame.h gc.h general-slots.h glyphs.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -glyphs-shared.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h dumper.h elhash.h faces.h frame.h gc.h general-slots.h glyphs.h imgproc.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -glyphs-widget.o: $(CONFIG_H) $(LISP_H) bytecode.h charset.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame.h gc.h general-slots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h -glyphs.o: $(CONFIG_H) $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -gmalloc.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysdep.h text.h vdb.h -gpmevent.o: $(CONFIG_H) $(LISP_H) commands.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h gpmevent.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h -gui.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h dumper.h elhash.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h redisplay.h symeval.h symsinit.h text.h vdb.h -gutter.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h -hash.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -hpplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h text.h vdb.h -imgproc.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h imgproc.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -indent.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h extents.h faces.h frame.h gc.h general-slots.h glyphs.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h -inline.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk.h console-impl.h console-msw.h console.h database.h device-impl.h device.h devslots.h dumper.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h font-mgr.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gui.h intl-auto-encap-win32.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h process.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syntax.h sysdll.h sysfile.h sysgtk.h systime.h syswindows.h text.h toolbar.h tooltalk.h ui-gtk.h vdb.h window-impl.h window.h winslots.h xintrinsic.h -input-method-motif.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h xmotif.h -input-method-xlib.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h -insdel.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h extents.h frame.h gc.h general-slots.h insdel.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h symeval.h symsinit.h text.h vdb.h -intl-auto-encap-win32.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syswindows.h text.h vdb.h -intl-encap-win32.o: $(CONFIG_H) $(LISP_H) compiler.h console-msw.h console.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syswindows.h text.h vdb.h -intl-win32.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h -intl.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -keymap.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h dumper.h elhash.h events.h extents.h frame.h gc.h general-slots.h insdel.h keymap-buttons.h keymap-slots.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h +editfns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h console.h device.h events.h frame.h insdel.h intl-auto-encap-win32.h keymap-buttons.h line-number.h ndir.h process.h redisplay.h scrollbar.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h window.h +elhash.o: $(CONFIG_H) $(LISP_H) bytecode.h elhash.h opaque.h +emacs.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h console-msw.h console.h dump-data.h frame.h intl-auto-encap-win32.h paths.h process.h redisplay.h sysdep.h sysdll.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h +emodules.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h console.h emodules.h file-coding.h frame.h insdel.h lstream.h redisplay.h scrollbar.h sysdep.h sysdll.h window.h +esd.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h miscplay.h sound.h sysfile.h syswindows.h +eval.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console.h device.h frame.h lstream.h opaque.h profile.h redisplay.h scrollbar.h specifier.h window.h +event-Xt.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h Emacs.ad.h EmacsFrame.h blocktype.h charset.h coding-system-slots.h conslots.h console-impl.h console-tty.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h elhash.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h glyphs.h keymap-buttons.h lstream.h objects-x.h objects.h process.h redisplay.h scrollbar.h specifier.h sysproc.h syssignal.h systime.h systty.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h +event-stream.o: $(CONFIG_H) $(LISP_H) backtrace.h blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h events.h file-coding.h frame-impl.h frame.h frameslots.h gui.h insdel.h intl-auto-encap-win32.h keymap-buttons.h keymap.h lstream.h macros.h menubar.h process.h profile.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syssignal.h systime.h syswindows.h window-impl.h window.h winslots.h +event-unixoid.o: $(CONFIG_H) $(LISP_H) conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h intl-auto-encap-win32.h keymap-buttons.h lstream.h process.h specifier.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h +events.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h events.h extents.h frame-impl.h frame.h frameslots.h glyphs.h keymap-buttons.h keymap.h lstream.h redisplay.h scrollbar.h specifier.h systime.h systty.h toolbar.h window-impl.h window.h winslots.h +extents.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h console.h debug.h device.h elhash.h extents-impl.h extents.h faces.h frame.h glyphs.h gutter.h insdel.h keymap-buttons.h keymap.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h +faces.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h extents-impl.h extents.h faces.h frame-impl.h frame.h frameslots.h glyphs.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h +file-coding.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h elhash.h extents.h file-coding.h insdel.h lstream.h opaque.h rangetab.h +fileio.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h console.h device.h events.h file-coding.h frame.h insdel.h intl-auto-encap-win32.h keymap-buttons.h lstream.h ndir.h process.h profile.h redisplay.h scrollbar.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h window-impl.h window.h winslots.h +filelock.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h ndir.h paths.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h +filemode.o: $(CONFIG_H) $(LISP_H) intl-auto-encap-win32.h sysfile.h syswindows.h +floatfns.o: $(CONFIG_H) $(LISP_H) sysfloat.h syssignal.h +fns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h console.h device.h events.h extents.h frame.h insdel.h intl-auto-encap-win32.h keymap-buttons.h lstream.h opaque.h process.h redisplay.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h +font-lock.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h insdel.h syntax.h +font-mgr.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h font-mgr.h hash.h intl-auto-encap-win32.h objects-impl.h objects-x-impl.h objects-x.h objects.h specifier.h sysfile.h syswindows.h xintrinsic.h +frame.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gui.h gutter.h keymap-buttons.h menubar.h process.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window-impl.h window.h winslots.h +free-hook.o: $(CONFIG_H) $(LISP_H) hash.h +gc.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-stream.h console.h device.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h glyphs.h intl-auto-encap-win32.h keymap-buttons.h lstream.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h syswindows.h window-impl.h window.h winslots.h +general.o: $(CONFIG_H) $(LISP_H) general-slots.h +getloadavg.o: $(CONFIG_H) $(LISP_H) intl-auto-encap-win32.h sysfile.h syswindows.h +glyphs-eimage.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h faces.h file-coding.h frame.h glyphs.h intl-auto-encap-win32.h lstream.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h sysfile.h syswindows.h window-impl.h window.h winslots.h +glyphs-shared.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console.h elhash.h faces.h frame.h glyphs.h imgproc.h insdel.h intl-auto-encap-win32.h lstream.h opaque.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syswindows.h window-impl.h window.h winslots.h +glyphs-widget.o: $(CONFIG_H) $(LISP_H) bytecode.h charset.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h faces.h frame.h glyphs.h gui.h insdel.h lstream.h objects.h opaque.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h +glyphs.o: $(CONFIG_H) $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gui.h insdel.h intl-auto-encap-win32.h objects-impl.h objects.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h sysfile.h syswindows.h window-impl.h window.h winslots.h +gmalloc.o: $(CONFIG_H) $(LISP_H) getpagesize.h sysdep.h +gpmevent.o: $(CONFIG_H) $(LISP_H) commands.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame.h gpmevent.h keymap-buttons.h lstream.h process.h redisplay.h specifier.h sysdep.h sysproc.h syssignal.h systime.h systty.h +gui.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h elhash.h gui.h menubar.h redisplay.h +gutter.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gutter.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h +hash.o: $(CONFIG_H) $(LISP_H) hash.h +hpplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h sound.h +imgproc.o: $(CONFIG_H) $(LISP_H) imgproc.h +indent.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console.h device.h extents.h faces.h frame.h glyphs.h insdel.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h +inline.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-gtk.h console-impl.h console-msw.h console.h database.h device-impl.h device.h devslots.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h font-mgr.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h intl-auto-encap-win32.h keymap-buttons.h keymap.h lstream.h objects-impl.h objects.h opaque.h process.h rangetab.h redisplay.h scrollbar.h specifier.h syntax.h sysdll.h sysfile.h sysgtk.h systime.h syswindows.h toolbar.h tooltalk.h ui-gtk.h window-impl.h window.h winslots.h xintrinsic.h +input-method-motif.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device.h frame-impl.h frame.h frameslots.h redisplay.h specifier.h xintrinsic.h xmotif.h +input-method-xlib.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h keymap-buttons.h redisplay.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h xintrinsic.h +insdel.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console.h device.h extents.h frame.h insdel.h line-number.h lstream.h redisplay.h +intl-auto-encap-win32.o: $(CONFIG_H) $(LISP_H) intl-auto-encap-win32.h syswindows.h +intl-encap-win32.o: $(CONFIG_H) $(LISP_H) console-msw.h console.h intl-auto-encap-win32.h syswindows.h +intl-win32.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h intl-auto-encap-win32.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h syswindows.h window-impl.h window.h winslots.h +intl.o: $(CONFIG_H) $(LISP_H) +keymap.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h elhash.h events.h extents.h frame.h insdel.h keymap-buttons.h keymap-slots.h keymap.h redisplay.h scrollbar.h specifier.h systime.h window.h lastfile.o: $(CONFIG_H) -libinterface.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h libinterface.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -libsst.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h libsst.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h -line-number.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -linuxplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h miscplay.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syssignal.h systty.h syswindows.h text.h vdb.h -lread.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h file-coding.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h profile.h symeval.h symsinit.h sysfile.h sysfloat.h syswindows.h text.h vdb.h -lstream.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h -macros.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h macros.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h -marker.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -mc-alloc.o: $(CONFIG_H) $(LISP_H) blocktype.h compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -md5.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -menubar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h -minibuf.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-stream.h console.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h insdel.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h -miscplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h miscplay.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syssignal.h syswindows.h text.h vdb.h -nas.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysdep.h syssignal.h text.h vdb.h -nt.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h symeval.h symsinit.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h -ntheap.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysdep.h syswindows.h text.h vdb.h -ntplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h -number-gmp.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysproc.h syssignal.h systime.h text.h vdb.h -number-mp.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -number.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -objects.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h frame.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systty.h text.h vdb.h window-impl.h window.h winslots.h -opaque.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h -print.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h extents.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h specifier.h symeval.h symsinit.h sysfile.h systty.h syswindows.h text.h vdb.h -process-nt.o: $(CONFIG_H) $(LISP_H) compiler.h console-msw.h console.h dumper.h events.h gc.h general-slots.h hash.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process-slots.h process.h procimpl.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h -process-unix.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h hash.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h text.h vdb.h window.h -process.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h console.h device.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h hash.h insdel.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h text.h vdb.h window.h -profile.o: $(CONFIG_H) $(LISP_H) backtrace.h bytecode.h compiler.h dumper.h elhash.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h syssignal.h systime.h text.h vdb.h -ralloc.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -rangetab.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h rangetab.h symeval.h symsinit.h text.h vdb.h -realpath.o: $(CONFIG_H) $(LISP_H) backtrace.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h sysdir.h sysfile.h syswindows.h text.h vdb.h -redisplay-output.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h -redisplay.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console-tty.h console.h debug.h device-impl.h device.h devslots.h dumper.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h gutter.h insdel.h intl-auto-encap-win32.h keymap-buttons.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h systime.h systty.h syswindows.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h -regex.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h regex.h symeval.h symsinit.h syntax.h text.h vdb.h -scrollbar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h -search.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h regex.h symeval.h symsinit.h syntax.h text.h vdb.h -select.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h extents.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h opaque.h redisplay.h select.h specifier.h symeval.h symsinit.h text.h vdb.h -sgiplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h libst.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h -sheap.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sheap-adjust.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h -signal.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h syswindows.h text.h vdb.h -sound.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h sound.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h xintrinsic.h -specifier.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h frame.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h +libinterface.o: $(CONFIG_H) $(LISP_H) libinterface.h +libsst.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h libsst.h sound.h sysfile.h syswindows.h +line-number.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h line-number.h +linuxplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h miscplay.h sound.h sysfile.h syssignal.h systty.h syswindows.h +lread.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h elhash.h file-coding.h intl-auto-encap-win32.h lstream.h opaque.h profile.h sysfile.h sysfloat.h syswindows.h +lstream.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h insdel.h intl-auto-encap-win32.h lstream.h sysfile.h syswindows.h +macros.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console.h device.h events.h frame.h keymap-buttons.h keymap.h macros.h redisplay.h scrollbar.h specifier.h systime.h window.h +marker.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h +mc-alloc.o: $(CONFIG_H) $(LISP_H) blocktype.h getpagesize.h +md5.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h file-coding.h lstream.h +menubar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h gui.h keymap-buttons.h keymap.h menubar.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h +minibuf.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-stream.h console.h events.h frame-impl.h frame.h frameslots.h insdel.h keymap-buttons.h redisplay.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h +miscplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h miscplay.h sound.h sysfile.h syssignal.h syswindows.h +nas.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h sound.h sysdep.h syssignal.h +nt.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h ndir.h process.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h +ntheap.o: $(CONFIG_H) $(LISP_H) intl-auto-encap-win32.h sysdep.h syswindows.h +ntplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h sound.h sysfile.h syswindows.h +number-gmp.o: $(CONFIG_H) $(LISP_H) sysproc.h syssignal.h systime.h +number-mp.o: $(CONFIG_H) $(LISP_H) +number.o: $(CONFIG_H) $(LISP_H) +objects.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h elhash.h faces.h frame.h glyphs.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h systty.h window-impl.h window.h winslots.h +opaque.o: $(CONFIG_H) $(LISP_H) opaque.h +print.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h extents.h frame.h insdel.h intl-auto-encap-win32.h lstream.h opaque.h redisplay.h specifier.h sysfile.h systty.h syswindows.h +process-nt.o: $(CONFIG_H) $(LISP_H) console-msw.h console.h events.h hash.h intl-auto-encap-win32.h keymap-buttons.h lstream.h process-slots.h process.h procimpl.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h +process-unix.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h console.h events.h file-coding.h frame.h hash.h intl-auto-encap-win32.h keymap-buttons.h lstream.h ndir.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h sysdep.h sysdir.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h window.h +process.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h console.h device.h events.h file-coding.h frame.h hash.h insdel.h intl-auto-encap-win32.h keymap-buttons.h lstream.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h window.h +profile.o: $(CONFIG_H) $(LISP_H) backtrace.h bytecode.h elhash.h hash.h profile.h syssignal.h systime.h +ralloc.o: $(CONFIG_H) $(LISP_H) getpagesize.h +rangetab.o: $(CONFIG_H) $(LISP_H) rangetab.h +realpath.o: $(CONFIG_H) $(LISP_H) backtrace.h intl-auto-encap-win32.h ndir.h profile.h sysdir.h sysfile.h syswindows.h +redisplay-output.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gutter.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h +redisplay.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h conslots.h console-impl.h console-tty.h console.h debug.h device-impl.h device.h devslots.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs.h gui.h gutter.h insdel.h intl-auto-encap-win32.h keymap-buttons.h line-number.h menubar.h objects-impl.h objects.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h sysfile.h systime.h systty.h syswindows.h toolbar.h window-impl.h window.h winslots.h +regex.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h regex.h syntax.h +scrollbar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h glyphs.h gutter.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h +search.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h insdel.h opaque.h regex.h syntax.h +select.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h extents.h frame.h objects.h opaque.h redisplay.h select.h specifier.h +sgiplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h libst.h sound.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h +sheap.o: $(CONFIG_H) $(LISP_H) intl-auto-encap-win32.h sheap-adjust.h sysfile.h syswindows.h +signal.o: $(CONFIG_H) $(LISP_H) conslots.h console-impl.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h intl-auto-encap-win32.h keymap-buttons.h process.h redisplay.h specifier.h sysdep.h sysfile.h syssignal.h systime.h syswindows.h +sound.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h intl-auto-encap-win32.h redisplay.h sound.h specifier.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h xintrinsic.h +specifier.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h frame.h glyphs.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h strcat.o: $(CONFIG_H) -strftime.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -sunplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h syswindows.h text.h vdb.h -sunpro.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -symbols.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h specifier.h symeval.h symsinit.h text.h vdb.h -syntax.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h extents.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h -sysdep.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h systty.h syswait.h syswindows.h text.h vdb.h window.h -sysdll.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysdll.h sysfile.h syswindows.h text.h vdb.h -termcap.o: $(CONFIG_H) $(LISP_H) compiler.h console.h device.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +strftime.o: $(CONFIG_H) $(LISP_H) +sunplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h sound.h sysdep.h sysfile.h syssignal.h syswindows.h +sunpro.o: $(CONFIG_H) $(LISP_H) +symbols.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h elhash.h specifier.h +syntax.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h extents.h syntax.h +sysdep.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame.h intl-auto-encap-win32.h keymap-buttons.h ndir.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h systty.h syswait.h syswindows.h window.h +sysdll.o: $(CONFIG_H) $(LISP_H) intl-auto-encap-win32.h sysdll.h sysfile.h syswindows.h +termcap.o: $(CONFIG_H) $(LISP_H) console.h device.h terminfo.o: $(CONFIG_H) -tests.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h -text.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h text.h vdb.h -toolbar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h -tooltalk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h symeval.h symsinit.h syssignal.h text.h tooltalk.h vdb.h -tparam.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -undo.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h extents.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -unexaix.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +tests.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h elhash.h file-coding.h lstream.h opaque.h +text.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h file-coding.h lstream.h profile.h +toolbar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h glyphs.h redisplay.h scrollbar.h specifier.h toolbar.h window-impl.h window.h winslots.h +tooltalk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h elhash.h process.h syssignal.h tooltalk.h +tparam.o: $(CONFIG_H) $(LISP_H) +undo.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h extents.h +unexaix.o: $(CONFIG_H) $(LISP_H) getpagesize.h unexalpha.o: $(CONFIG_H) compiler.h -unexcw.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h -unexec.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -unexelf.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -unexhp9k800.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -unexnt.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h +unexcw.o: $(CONFIG_H) $(LISP_H) intl-auto-encap-win32.h sysfile.h syswindows.h +unexec.o: $(CONFIG_H) $(LISP_H) getpagesize.h +unexelf.o: $(CONFIG_H) $(LISP_H) +unexhp9k800.o: $(CONFIG_H) $(LISP_H) +unexnt.o: $(CONFIG_H) $(LISP_H) intl-auto-encap-win32.h sysfile.h syswindows.h unexsol2-6.o: compiler.h -unicode.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h extents.h file-coding.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h rangetab.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h -vdb-fake.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -vdb-mach.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -vdb-posix.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -vdb-win32.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syswindows.h text.h vdb.h -vdb.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -vm-limit.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mem-limits.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -widget.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h -win32.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console-msw.h console.h dumper.h gc.h general-slots.h hash.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h -window.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h +unicode.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h extents.h file-coding.h intl-auto-encap-win32.h opaque.h rangetab.h sysfile.h syswindows.h +vdb-fake.o: $(CONFIG_H) $(LISP_H) +vdb-mach.o: $(CONFIG_H) $(LISP_H) +vdb-posix.o: $(CONFIG_H) $(LISP_H) +vdb-win32.o: $(CONFIG_H) $(LISP_H) intl-auto-encap-win32.h syswindows.h +vdb.o: $(CONFIG_H) $(LISP_H) +vm-limit.o: $(CONFIG_H) $(LISP_H) mem-limits.h +widget.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h +win32.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h console-msw.h console.h hash.h intl-auto-encap-win32.h profile.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h +window.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gutter.h objects.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h
--- a/src/device-tty.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/device-tty.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* TTY device functions. Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. Copyright (C) 1994, 1995 Free Software Foundation, Inc. - Copyright (C) 1996 Ben Wing. + Copyright (C) 1996, 2010 Ben Wing. This file is part of XEmacs. @@ -175,7 +175,7 @@ /* We know the frame is tty because we made sure that the device is tty. */ - change_frame_size (f, height, width, 1); + change_frame_size (f, width, height, 1); } } }
--- a/src/device-x.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/device-x.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* Device functions for X windows. Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. Copyright (C) 1994, 1995 Free Software Foundation, Inc. - Copyright (C) 2001, 2002, 2004 Ben Wing. + Copyright (C) 2001, 2002, 2004, 2010 Ben Wing. This file is part of XEmacs. @@ -486,7 +486,7 @@ vi_in.visualid = XVisualIDFromVisual (visual); vi_out = XGetVisualInfo (dpy, /*VisualScreenMask|*/VisualIDMask, &vi_in, &out_count); - if (! vi_out) ABORT (); + assert (vi_out); d = vi_out [0].depth; XFree ((char *) vi_out); return d; @@ -1562,9 +1562,9 @@ db = XtDatabase (display); codesys = coding_system_of_xrm_database (db); Dynarr_add (name_Extbyte_dynarr, '.'); - Dynarr_add_lisp_string (name_Extbyte_dynarr, name, Qbinary); + Dynarr_add_ext_lisp_string (name_Extbyte_dynarr, name, Qbinary); Dynarr_add (class_Extbyte_dynarr, '.'); - Dynarr_add_lisp_string (class_Extbyte_dynarr, class_, Qbinary); + Dynarr_add_ext_lisp_string (class_Extbyte_dynarr, class_, Qbinary); Dynarr_add (name_Extbyte_dynarr, '\0'); Dynarr_add (class_Extbyte_dynarr, '\0');
--- a/src/dumper.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/dumper.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* Portable data dumper for XEmacs. Copyright (C) 1999-2000,2004 Olivier Galibert Copyright (C) 2001 Martin Buchholz - Copyright (C) 2001, 2002, 2003, 2004, 2005 Ben Wing. + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2010 Ben Wing. This file is part of XEmacs. @@ -253,8 +253,20 @@ for (i=0; i<rt->count; i++) { struct lrecord_header *lh = * (struct lrecord_header **) p; +#ifdef ALLOC_TYPE_STATS + if (C_READONLY_RECORD_HEADER_P (lh)) + tick_lrecord_stats (lh, ALLOC_IN_USE); + + else + { + tick_lrecord_stats (lh, MARKED_RECORD_HEADER_P (lh) ? + ALLOC_IN_USE : ALLOC_ON_FREE_LIST); + UNMARK_RECORD_HEADER (lh); + } +#else /* not ALLOC_TYPE_STATS */ if (! C_READONLY_RECORD_HEADER_P (lh)) UNMARK_RECORD_HEADER (lh); +#endif /* (not) ALLOC_TYPE_STATS */ p += sizeof (EMACS_INT); } } else
--- a/src/dynarr.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/dynarr.c Wed Feb 24 19:04:27 2010 -0600 @@ -25,16 +25,16 @@ /* -A "dynamic array" is a contiguous array of fixed-size elements where there -is no upper limit (except available memory) on the number of elements in the -array. Because the elements are maintained contiguously, space is used -efficiently (no per-element pointers necessary) and random access to a -particular element is in constant time. At any one point, the block of memory -that holds the array has an upper limit; if this limit is exceeded, the -memory is realloc()ed into a new array that is twice as big. Assuming that -the time to grow the array is on the order of the new size of the array -block, this scheme has a provably constant amortized time (i.e. average -time over all additions). +A "dynamic array" or "dynarr" is a contiguous array of fixed-size elements +where there is no upper limit (except available memory) on the number of +elements in the array. Because the elements are maintained contiguously, +space is used efficiently (no per-element pointers necessary) and random +access to a particular element is in constant time. At any one point, the +block of memory that holds the array has an upper limit; if this limit is +exceeded, the memory is realloc()ed into a new array that is twice as big. +Assuming that the time to grow the array is on the order of the new size of +the array block, this scheme has a provably constant amortized time +\(i.e. average time over all additions). When you add elements or retrieve elements, pointers are used. Note that the element itself (of whatever size it is), and not the pointer to it, @@ -52,12 +52,129 @@ Use the following functions/macros: + + ************* Dynarr creation ************* + void *Dynarr_new(type) [MACRO] Create a new dynamic-array object, with each element of the specified type. The return value is cast to (type##_dynarr). This requires following the convention that types are declared in such a way that this type concatenation works. In particular, TYPE - must be a symbol, not an arbitrary C type. + must be a symbol, not an arbitrary C type. To make dynarrs of + complex types, a typedef must be declared, e.g. + + typedef unsigned char *unsigned_char_ptr; + + and then you can say + + unsigned_char_ptr_dynarr *dyn = Dynarr_new (unsigned_char_ptr); + + void *Dynarr_new2(dynarr_type, type) + [MACRO] Create a new dynamic-array object, with each element of the + specified type. The array itself is of type DYNARR_TYPE. This makes + it possible to create dynarrs over complex types without the need + to create typedefs, as described above. Use is as follows: + + ucharptr_dynarr *dyn = Dynarr_new2 (ucharptr_dynarr *, unsigned char *); + + Dynarr_free(d) + Destroy a dynamic array and the memory allocated to it. + + ************* Dynarr access ************* + + type Dynarr_at(d, i) + [MACRO] Return the element at the specified index. The index must be + between 0 and Dynarr_largest(d), inclusive. With error-checking + enabled, bounds checking on the index is in the form of asserts() -- + an out-of-bounds index causes an abort. The element itself is + returned, not a pointer to it. + + type *Dynarr_atp(d, i) + [MACRO] Return a pointer to the element at the specified index. + Restrictions and bounds checking on the index is as for Dynarr_at. + The pointer may not be valid after an element is added to or + (conceivably) removed from the array, because this may trigger a + realloc() performed on the underlying dynarr storage, which may + involve moving the entire underlying storage to a new location in + memory. + + type *Dynarr_begin(d) + [MACRO] Return a pointer to the first element in the dynarr. See + Dynarr_atp() for warnings about when the pointer might become invalid. + + type *Dynarr_lastp(d) + [MACRO] Return a pointer to the last element in the dynarr. See + Dynarr_atp() for warnings about when the pointer might become invalid. + + type *Dynarr_past_lastp(d) + [MACRO] Return a pointer to the beginning of the element just past the + last one. WARNING: This may not point to valid memory; however, the + byte directly before will be pointer will be valid memory. This macro + might be useful for various reasons, e.g. as a stopping point in a loop + (although Dynarr_lastp() could be used just as well) or as a place to + start writing elements if Dynarr_length() < Dynarr_largest(). + + ************* Dynarr length/size retrieval and setting ************* + + int Dynarr_length(d) + [MACRO] Return the number of elements currently in a dynamic array. + + int Dynarr_largest(d) + [MACRO] Return the maximum value that Dynarr_length(d) would + ever have returned. This is used esp. in the redisplay code, + which reuses dynarrs for performance reasons. + + int Dynarr_max(d) + [MACRO] Return the maximum number of elements that can fit in the + dynarr before it needs to be resized. + + Note that Dynarr_length(d) <= Dynarr_largest(d) <= Dynarr_max(d). + + Bytecount Dynarr_sizeof(d) + [MACRO] Return the total size of the elements currently in dynarr + D. This + + Dynarr_set_lengthr(d, len) + [MACRO] Set the length of D to LEN, which must be between 0 and + Dynarr_largest(d), inclusive. With error-checking enabled, an + assertion failure will result from trying to set the length + to less than zero or greater than Dynarr_largest(d). The + restriction to Dynarr_largest() is to ensure that + + Dynarr_set_length(d, len) + [MACRO] Set the length of D to LEN, resizing the dynarr as + necessary to make sure enough space is available. there are no + restrictions on LEN other than available memory and that it must + be at least 0. Note that + + Dynarr_set_length_and_zero(d, len) + [MACRO] Like Dynarr_set_length(d, len) but also, if increasing + the length, zero out the memory between the old and new lengths, + i.e. starting just past the previous last element and up through + the new last element. + + Dynarr_incrementr(d) + [MACRO] Increments the length of D by 1. Equivalent to + Dynarr_set_lengthr(d, Dynarr_length(d) + 1). + + Dynarr_increment(d) + [MACRO] Increments the length of D by 1. Equivalent to + Dynarr_set_length(d, Dynarr_length(d) + 1). + + Dynarr_reset(d) + [MACRO] Reset the length of a dynamic array to 0. + + Dynarr_resize(d, maxval) + Resize the internal dynarr storage to so that it can hold at least + MAXVAL elements. Resizing is done using a geometric series + (repeatedly multiply the old maximum by a constant, normally 1.5, + till a large enough size is reached), so this will be efficient + even if resizing larger by one element at a time. This is mostly + an internal function. + + + + ************* Adding/deleting elements to/from a dynarr ************* Dynarr_add(d, el) [MACRO] Add an element to the end of a dynamic array. EL is a pointer @@ -69,55 +186,47 @@ should be contiguous in memory, starting at BASE. If BASE if NULL, just make space for the elements; don't actually add them. - Dynarr_insert_many_at_start(d, base, len) - [MACRO] Append LEN elements to the beginning of the dynamic array. + Dynarr_prepend_many(d, base, len) + [MACRO] Prepend LEN elements to the beginning of the dynamic array. The elements should be contiguous in memory, starting at BASE. If BASE if NULL, just make space for the elements; don't actually add them. - Dynarr_insert_many(d, base, len, start) + Dynarr_insert_many(d, base, len, pos) Insert LEN elements to the dynamic array starting at position - START. The elements should be contiguous in memory, starting at BASE. + POS. The elements should be contiguous in memory, starting at BASE. If BASE if NULL, just make space for the elements; don't actually add them. + type Dynarr_pop(d) + [MACRO] Pop the last element off the dynarr and return it. + Dynarr_delete(d, i) [MACRO] Delete an element from the dynamic array at position I. - Dynarr_delete_many(d, start, len) + Dynarr_delete_many(d, pos, len) Delete LEN elements from the dynamic array starting at position - START. + POS. + + Dynarr_zero_many(d, pos, len) + Zero out LEN elements in the dynarr D starting at position POS. Dynarr_delete_by_pointer(d, p) [MACRO] Delete an element from the dynamic array at pointer P, which must point within the block of memory that stores the data. P should be obtained using Dynarr_atp(). - int Dynarr_length(d) - [MACRO] Return the number of elements currently in a dynamic array. - - int Dynarr_largest(d) - [MACRO] Return the maximum value that Dynarr_length(d) would - ever have returned. This is used esp. in the redisplay code, - which reuses dynarrs for performance reasons. - - type Dynarr_at(d, i) - [MACRO] Return the element at the specified index (no bounds checking - done on the index). The element itself is returned, not a pointer - to it. + ************* Dynarr locking ************* - type *Dynarr_atp(d, i) - [MACRO] Return a pointer to the element at the specified index (no - bounds checking done on the index). The pointer may not be valid - after an element is added to or removed from the array. + Dynarr_lock(d) + Lock the dynarr against further locking or writing. With error-checking + enabled, any attempts to write into a locked dynarr or re-lock an + already locked one will cause an assertion failure and abort. - Dynarr_reset(d) - [MACRO] Reset the length of a dynamic array to 0. + Dynarr_unlock(d) + Unlock a locked dynarr, allowing writing into it. - Dynarr_free(d) - Destroy a dynamic array and the memory allocated to it. - -Use the following global variable: + ************* Dynarr global variables ************* Dynarr_min_size Minimum allowable size for a dynamic array when it is resized. @@ -148,28 +257,28 @@ }; -static int Dynarr_min_size = 8; +static Elemcount Dynarr_min_size = 8; static void -Dynarr_realloc (Dynarr *dy, int new_size) +Dynarr_realloc (Dynarr *dy, Elemcount new_size) { if (DUMPEDP (dy->base)) { - void *new_base = malloc (new_size * dy->elsize); + void *new_base = malloc (new_size * Dynarr_elsize (dy)); memcpy (new_base, dy->base, (Dynarr_max (dy) < new_size ? Dynarr_max (dy) : new_size) * - dy->elsize); + Dynarr_elsize (dy)); dy->base = new_base; } else - dy->base = xrealloc (dy->base, new_size * dy->elsize); + dy->base = xrealloc (dy->base, new_size * Dynarr_elsize (dy)); } void * Dynarr_newf (Bytecount elsize) { Dynarr *d = xnew_and_zero (Dynarr); - d->elsize = elsize; + d->elsize_ = elsize; return d; } @@ -183,11 +292,12 @@ Dynarr_lisp_realloc (Dynarr *dy, Elemcount new_size) { void *new_base = - XPNTR (alloc_sized_lrecord_array (dy->elsize, new_size, dy->lisp_imp)); + XPNTR (alloc_sized_lrecord_array (Dynarr_elsize (dy), new_size, + dy->lisp_imp)); if (dy->base) memcpy (new_base, dy->base, (Dynarr_max (dy) < new_size ? Dynarr_max (dy) : new_size) * - dy->elsize); + Dynarr_elsize (dy)); dy->base = new_base; } @@ -198,7 +308,7 @@ { Dynarr *d = (Dynarr *) XPNTR (alloc_sized_lrecord (sizeof (Dynarr), dynarr_imp)); - d->elsize = elsize; + d->elsize_ = elsize; d->lisp_imp = imp; return d; @@ -208,7 +318,7 @@ void Dynarr_resize (void *d, Elemcount size) { - int newsize; + Elemcount newsize; double multiplier; Dynarr *dy = (Dynarr *) Dynarr_verify (d); @@ -218,7 +328,7 @@ multiplier = 1.5; for (newsize = Dynarr_max (dy); newsize < size;) - newsize = max (Dynarr_min_size, (int) (multiplier * newsize)); + newsize = max (Dynarr_min_size, (Elemcount) (multiplier * newsize)); /* Don't do anything if the array is already big enough. */ if (newsize > Dynarr_max (dy)) @@ -235,47 +345,46 @@ } } -/* Add a number of contiguous elements to the array starting at START. */ +/* Add a number of contiguous elements to the array starting at POS. */ + void -Dynarr_insert_many (void *d, const void *el, int len, int start) +Dynarr_insert_many (void *d, const void *base, Elemcount len, Elemcount pos) { Dynarr *dy = Dynarr_verify_mod (d); - - Dynarr_resize_if (dy, len); + Elemcount old_len = Dynarr_length (dy); /* #### This could conceivably be wrong, if code wants to access stuff between len and largest. */ - dynarr_checking_assert (start >= 0 && start <= Dynarr_length (dy)); + dynarr_checking_assert (pos >= 0 && pos <= old_len); + dynarr_checking_assert (len >= 0); + Dynarr_increase_length (dy, old_len + len); - if (start != Dynarr_length (dy)) + if (pos != old_len) { - memmove ((char *) dy->base + (start + len)*dy->elsize, - (char *) dy->base + start*dy->elsize, - (Dynarr_length (dy) - start)*dy->elsize); + memmove ((Rawbyte *) dy->base + (pos + len)*Dynarr_elsize (dy), + (Rawbyte *) dy->base + pos*Dynarr_elsize (dy), + (old_len - pos)*Dynarr_elsize (dy)); } /* Some functions call us with a value of 0 to mean "reserve space but don't write into it" */ - if (el) - memcpy ((char *) dy->base + start*dy->elsize, el, len*dy->elsize); - - Dynarr_set_length_1 (dy, Dynarr_length (dy) + len); - (void) Dynarr_verify_mod (dy); + if (base) + memcpy ((Rawbyte *) dy->base + pos*Dynarr_elsize (dy), base, + len*Dynarr_elsize (dy)); } void -Dynarr_delete_many (void *d, int start, int len) +Dynarr_delete_many (void *d, Elemcount pos, Elemcount len) { Dynarr *dy = Dynarr_verify_mod (d); - dynarr_checking_assert (start >= 0 && len >= 0 && - start + len <= Dynarr_length (dy)); + dynarr_checking_assert (pos >= 0 && len >= 0 && + pos + len <= Dynarr_length (dy)); - memmove ((char *) dy->base + start*dy->elsize, - (char *) dy->base + (start + len)*dy->elsize, - (Dynarr_length (dy) - start - len)*dy->elsize); + memmove ((Rawbyte *) dy->base + pos*Dynarr_elsize (dy), + (Rawbyte *) dy->base + (pos + len)*Dynarr_elsize (dy), + (Dynarr_length (dy) - pos - len)*Dynarr_elsize (dy)); Dynarr_set_length_1 (dy, Dynarr_length (dy) - len); - (void) Dynarr_verify_mod (dy); } void @@ -304,9 +413,9 @@ #ifdef MEMORY_USAGE_STATS -/* Return memory usage for Dynarr D. The returned value is the total - amount of bytes actually being used for the Dynarr, including all - overhead. The extra amount of space in the Dynarr that is +/* Return memory usage for dynarr D. The returned value is the total + amount of bytes actually being used for the dynarr, including all + overhead. The extra amount of space in the dynarr that is allocated beyond what was requested is returned in DYNARR_OVERHEAD in STATS. The extra amount of space that malloc() allocates beyond what was requested of it is returned in MALLOC_OVERHEAD in STATS. @@ -325,12 +434,13 @@ if (dy->base) { Bytecount malloc_used = - malloced_storage_size (dy->base, dy->elsize * Dynarr_max (dy), 0); - /* #### This may or may not be correct. Some Dynarrs would + malloced_storage_size (dy->base, Dynarr_elsize (dy) * Dynarr_max (dy), + 0); + /* #### This may or may not be correct. Some dynarrs would prefer that we use dy->len instead of dy->largest here. */ - Bytecount was_requested = dy->elsize * Dynarr_largest (dy); + Bytecount was_requested = Dynarr_elsize (dy) * Dynarr_largest (dy); Bytecount dynarr_overhead = - dy->elsize * (Dynarr_max (dy) - Dynarr_largest (dy)); + Dynarr_elsize (dy) * (Dynarr_max (dy) - Dynarr_largest (dy)); total += malloc_used; stats->was_requested += was_requested; @@ -385,7 +495,7 @@ void stack_like_free (void *val) { - int len = Dynarr_length (stack_like_in_use_list); + Elemcount len = Dynarr_length (stack_like_in_use_list); assert (len > 0); /* The vast majority of times, we will be called in a last-in first-out order, and the item at the end of the list will be the one we're
--- a/src/emacs.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/emacs.c Wed Feb 24 19:04:27 2010 -0600 @@ -2908,8 +2908,7 @@ from += options[from]; } - if (best < 0) - ABORT (); + assert (best >= 0); /* Copy the highest priority remaining option, with its args, to NEW_ARGV. */
--- a/src/eval.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/eval.c Wed Feb 24 19:04:27 2010 -0600 @@ -1766,8 +1766,7 @@ { #ifdef DEFEND_AGAINST_THROW_RECURSION /* die if we recurse more than is reasonable */ - if (++throw_level > 20) - ABORT (); + assert (++throw_level <= 20); #endif #ifdef ERROR_CHECK_TRAPPING_PROBLEMS
--- a/src/event-msw.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/event-msw.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* The mswindows event_stream interface. Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. - Copyright (C) 1996, 2000, 2001, 2002, 2003, 2005 Ben Wing. + Copyright (C) 1996, 2000, 2001, 2002, 2003, 2005, 2010 Ben Wing. Copyright (C) 1997 Jonathan Harris. This file is part of XEmacs. @@ -3386,13 +3386,9 @@ FRAME_PIXWIDTH (frame) = rect.right; FRAME_PIXHEIGHT (frame) = rect.bottom; - pixel_to_real_char_size (frame, rect.right, rect.bottom, - &FRAME_MSWINDOWS_CHARWIDTH (frame), - &FRAME_MSWINDOWS_CHARHEIGHT (frame)); - - pixel_to_char_size (frame, rect.right, rect.bottom, &columns, + pixel_to_frame_unit_size (frame, rect.right, rect.bottom, &columns, &rows); - change_frame_size (frame, rows, columns, 1); + change_frame_size (frame, columns, rows, 1); /* If we are inside frame creation, we have to apply geometric properties now. */ @@ -3477,7 +3473,7 @@ GetMenu(hwnd) != NULL, qxeGetWindowLong (hwnd, GWL_EXSTYLE)); - round_size_to_real_char (XFRAME (mswindows_find_frame (hwnd)), + round_size_to_char (XFRAME (mswindows_find_frame (hwnd)), wp->cx - (ncsize.right - ncsize.left), wp->cy - (ncsize.bottom - ncsize.top), &pixwidth, &pixheight);
--- a/src/event-stream.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/event-stream.c Wed Feb 24 19:04:27 2010 -0600 @@ -1293,7 +1293,7 @@ Lisp_Object lid; id = event_stream_generate_wakeup (msecs, msecs2, function, object, 0); lid = make_int (id); - if (id != XINT (lid)) ABORT (); + assert (id == XINT (lid)); return lid; } @@ -1372,7 +1372,7 @@ Lisp_Object lid; id = event_stream_generate_wakeup (msecs, msecs2, function, object, 1); lid = make_int (id); - if (id != XINT (lid)) ABORT (); + assert (id == XINT (lid)); return lid; } @@ -3742,8 +3742,7 @@ { Lisp_Object e = XVECTOR_DATA (Vrecent_keys_ring)[j]; - if (NILP (e)) - ABORT (); + assert (!NILP (e)); XVECTOR_DATA (val)[i] = Fcopy_event (e, Qnil); if (++j >= recent_keys_ring_size) j = 0;
--- a/src/events.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/events.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* Events: printing them, converting them to and from characters. Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. - Copyright (C) 2001, 2002, 2005 Ben Wing. + Copyright (C) 2001, 2002, 2005, 2010 Ben Wing. This file is part of XEmacs. @@ -41,18 +41,6 @@ #include "console-tty-impl.h" /* for stuff in character_to_event */ -#ifdef HAVE_TTY -#define USED_IF_TTY(decl) decl -#else -#define USED_IF_TTY(decl) UNUSED (decl) -#endif - -#ifdef HAVE_TOOLBARS -#define USED_IF_TOOLBARS(decl) decl -#else -#define USED_IF_TOOLBARS(decl) UNUSED (decl) -#endif - /* Where old events go when they are explicitly deallocated. The event chain here is cut loose before GC, so these will be freed eventually. @@ -880,21 +868,18 @@ { int i, len; - if (EQ (event, Vlast_command_event) || - EQ (event, Vlast_input_event) || - EQ (event, Vunread_command_event)) - ABORT (); + assert (!(EQ (event, Vlast_command_event) || + EQ (event, Vlast_input_event) || + EQ (event, Vunread_command_event))); len = XVECTOR_LENGTH (Vthis_command_keys); for (i = 0; i < len; i++) - if (EQ (event, XVECTOR_DATA (Vthis_command_keys) [i])) - ABORT (); + assert (!EQ (event, XVECTOR_DATA (Vthis_command_keys) [i])); if (!NILP (Vrecent_keys_ring)) { int recent_ring_len = XVECTOR_LENGTH (Vrecent_keys_ring); for (i = 0; i < recent_ring_len; i++) - if (EQ (event, XVECTOR_DATA (Vrecent_keys_ring) [i])) - ABORT (); + assert (!EQ (event, XVECTOR_DATA (Vrecent_keys_ring) [i])); } } #endif /* 0 */ @@ -2140,14 +2125,13 @@ pointer points to random memory, often filled with 0, sometimes not. */ /* #### Chuck, do we still need this crap? */ - if (!NILP (ret_obj1) && !(GLYPHP (ret_obj1) #ifdef HAVE_TOOLBARS - || TOOLBAR_BUTTONP (ret_obj1) + assert (NILP (ret_obj1) || GLYPHP (ret_obj1) + || TOOLBAR_BUTTONP (ret_obj1)); +#else + assert (NILP (ret_obj1) || GLYPHP (ret_obj1)); #endif - )) - ABORT (); - if (!NILP (ret_obj2) && !(EXTENTP (ret_obj2) || CONSP (ret_obj2))) - ABORT (); + assert (NILP (ret_obj2) || EXTENTP (ret_obj2) || CONSP (ret_obj2)); if (char_x) *char_x = ret_x;
--- a/src/extents.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/extents.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,6 @@ /* Copyright (c) 1994, 1995 Free Software Foundation, Inc. Copyright (c) 1995 Sun Microsystems, Inc. - Copyright (c) 1995, 1996, 2000, 2002, 2003, 2004, 2005 Ben Wing. + Copyright (c) 1995, 1996, 2000, 2002, 2003, 2004, 2005, 2010 Ben Wing. This file is part of XEmacs. @@ -4927,12 +4927,8 @@ the insertion overlaps any existing extent, something is wrong. */ #ifdef ERROR_CHECK_EXTENTS - if (extent_start (extent) > indice && - extent_start (extent) < indice + closure->length) - ABORT (); - if (extent_end (extent) > indice && - extent_end (extent) < indice + closure->length) - ABORT (); + assert (extent_start (extent) <= indice || extent_start (extent) >= indice + closure->length); + assert (extent_end (extent) <= indice || extent_end (extent) >= indice + closure->length); #endif /* The extent-adjustment code adjusted the extent's endpoints as if
--- a/src/faces.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/faces.c Wed Feb 24 19:04:27 2010 -0600 @@ -724,7 +724,7 @@ void default_face_font_info (Lisp_Object domain, int *ascent, int *descent, - int *height, int *width, int *proportional_p) + int *width, int *height, int *proportional_p) { Lisp_Object font_instance; struct face_cachel *cachel; @@ -783,25 +783,9 @@ } void -default_face_height_and_width (Lisp_Object domain, - int *height, int *width) -{ - default_face_font_info (domain, 0, 0, height, width, 0); -} - -void -default_face_height_and_width_1 (Lisp_Object domain, - int *height, int *width) +default_face_width_and_height (Lisp_Object domain, int *width, int *height) { - if (window_system_pixelated_geometry (domain)) - { - if (height) - *height = 1; - if (width) - *width = 1; - } - else - default_face_height_and_width (domain, height, width); + default_face_font_info (domain, 0, 0, width, height, 0); } DEFUN ("face-list", Fface_list, 0, 1, 0, /*
--- a/src/faces.h Wed Feb 24 01:58:04 2010 -0600 +++ b/src/faces.h Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,6 @@ /* Face data structures. Copyright (C) 1995 Board of Trustees, University of Illinois. - Copyright (C) 1995, 2002 Ben Wing + Copyright (C) 1995, 2002, 2010 Ben Wing This file is part of XEmacs. @@ -299,12 +299,10 @@ void face_property_was_changed (Lisp_Object face, Lisp_Object property, Lisp_Object locale); void default_face_font_info (Lisp_Object domain, int *ascent, - int *descent, int *height, int *width, + int *descent, int *width, int *height, int *proportional_p); -void default_face_height_and_width (Lisp_Object domain, - int *height, int *width); -void default_face_height_and_width_1 (Lisp_Object domain, - int *height, int *width); +void default_face_width_and_height (Lisp_Object domain, int *width, + int *height); #define FACE_CACHEL_FONT(cachel, charset) \ (cachel->font[XCHARSET_LEADING_BYTE (charset) - MIN_LEADING_BYTE])
--- a/src/file-coding.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/file-coding.c Wed Feb 24 19:04:27 2010 -0600 @@ -1860,7 +1860,7 @@ Dynarr_atp (str->convert_from, rejected), readmore); /* Trim size down to how much we actually got */ - Dynarr_set_length (str->convert_from, rejected + max (0, read_size)); + Dynarr_set_lengthr (str->convert_from, rejected + max (0, read_size)); } if (read_size < 0) /* LSTREAM_ERROR */ @@ -1894,7 +1894,7 @@ memmove (Dynarr_begin (str->convert_from), Dynarr_atp (str->convert_from, processed), to_process - processed); - Dynarr_set_length (str->convert_from, to_process - processed); + Dynarr_set_lengthr (str->convert_from, to_process - processed); } } @@ -4419,7 +4419,7 @@ data->stream.avail_out = reserved; zerr = inflate (&data->stream, Z_NO_FLUSH); /* Lop off the unused portion */ - Dynarr_set_length (dst, Dynarr_length (dst) - data->stream.avail_out); + Dynarr_set_lengthr (dst, Dynarr_length (dst) - data->stream.avail_out); if (zerr != Z_OK) break; } @@ -4479,7 +4479,7 @@ deflate (&data->stream, str->eof ? Z_FINISH : Z_NO_FLUSH); /* Lop off the unused portion */ - Dynarr_set_length (dst, Dynarr_length (dst) - data->stream.avail_out); + Dynarr_set_lengthr (dst, Dynarr_length (dst) - data->stream.avail_out); if (zerr != Z_OK) break; }
--- a/src/fns.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/fns.c Wed Feb 24 19:04:27 2010 -0600 @@ -4639,8 +4639,7 @@ encoded = (Ibyte *) MALLOC_OR_ALLOCA (allength); encoded_length = base64_encode_1 (XLSTREAM (input), encoded, NILP (no_line_break)); - if (encoded_length > allength) - ABORT (); + assert (encoded_length <= allength); Lstream_delete (XLSTREAM (input)); /* Now we have encoded the region, so we insert the new contents @@ -4681,8 +4680,7 @@ encoded = (Ibyte *) MALLOC_OR_ALLOCA (allength); encoded_length = base64_encode_1 (XLSTREAM (input), encoded, NILP (no_line_break)); - if (encoded_length > allength) - ABORT (); + assert (encoded_length <= allength); Lstream_delete (XLSTREAM (input)); result = make_string (encoded, encoded_length); unbind_to (speccount); @@ -4714,8 +4712,7 @@ /* We need to allocate enough room for decoding the text. */ decoded = (Ibyte *) MALLOC_OR_ALLOCA (length * MAX_ICHAR_LEN); decoded_length = base64_decode_1 (XLSTREAM (input), decoded, &cc_decoded_length); - if (decoded_length > length * MAX_ICHAR_LEN) - ABORT (); + assert (decoded_length <= length * MAX_ICHAR_LEN); Lstream_delete (XLSTREAM (input)); /* Now we have decoded the region, so we insert the new contents @@ -4755,8 +4752,7 @@ input = make_lisp_string_input_stream (string, 0, -1); decoded_length = base64_decode_1 (XLSTREAM (input), decoded, &cc_decoded_length); - if (decoded_length > length * MAX_ICHAR_LEN) - ABORT (); + assert (decoded_length <= length * MAX_ICHAR_LEN); Lstream_delete (XLSTREAM (input)); result = make_string (decoded, decoded_length);
--- a/src/font-lock.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/font-lock.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* Routines to compute the current syntactic context, for font-lock mode. Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. - Copyright (C) 2002, 2003 Ben Wing. + Copyright (C) 2002, 2003, 2010 Ben Wing. This file is part of XEmacs. @@ -529,7 +529,7 @@ context_cache.context = context_comment; context_cache.ccontext = ccontext_none; context_cache.style = SINGLE_SYNTAX_STYLE (syncode); - if (context_cache.style == comment_style_none) ABORT (); + assert (context_cache.style != comment_style_none); } break; @@ -621,7 +621,7 @@ { context_cache.ccontext = ccontext_start2; context_cache.style = SYNTAX_START_STYLE (prev_syncode, syncode); - if (context_cache.style == comment_style_none) ABORT (); + assert (context_cache.style != comment_style_none); } else if ((SYNTAX_CODE_COMMENT_BITS (syncode) & SYNTAX_FIRST_CHAR_START) && @@ -659,18 +659,18 @@ of a comment-end sequence. ie, '/xxx foo xxx/' or '/xxx foo x/', where 'x' = '*' -- mct */ { - if (context_cache.style == comment_style_none) ABORT (); + assert (context_cache.style != comment_style_none); context_cache.ccontext = ccontext_end1; } else if (context_cache.ccontext == ccontext_start1) { - if (context_cache.context != context_none) ABORT (); + assert (context_cache.context == context_none); context_cache.ccontext = ccontext_none; } else if (context_cache.ccontext == ccontext_end1) { - if (context_cache.context != context_block_comment) ABORT (); + assert (context_cache.context == context_block_comment); context_cache.context = context_none; context_cache.ccontext = ccontext_start2; } @@ -679,7 +679,7 @@ context_cache.context == context_none) { context_cache.context = context_block_comment; - if (context_cache.style == comment_style_none) ABORT (); + assert (context_cache.style != comment_style_none); } else if (context_cache.ccontext == ccontext_none && context_cache.context == context_block_comment)
--- a/src/frame-gtk.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/frame-gtk.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,6 @@ /* Functions for the GTK toolkit. Copyright (C) 1989, 1992-5, 1997 Free Software Foundation, Inc. - Copyright (C) 1995, 1996, 2002, 2003 Ben Wing. + Copyright (C) 1995, 1996, 2002, 2003, 2010 Ben Wing. This file is part of XEmacs. @@ -371,7 +371,7 @@ { GdkWindowHints geometry_mask = GDK_HINT_RESIZE_INC; /* Deal with the cell size */ - default_face_height_and_width (wrap_frame (f), &geometry.height_inc, &geometry.width_inc); + default_face_width_and_height (wrap_frame (f), &geometry.width_inc, &geometry.height_inc); gtk_window_set_geometry_hints (GTK_WINDOW (shell), FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask); @@ -382,7 +382,7 @@ FRAME_HEIGHT (f) = h; FRAME_WIDTH (f) = w; - change_frame_size (f, h, w, 0); + change_frame_size (f, w, h, 0); { GtkRequisition req; @@ -1189,13 +1189,14 @@ GdkWindowHints geometry_mask = GDK_HINT_RESIZE_INC; /* Update the cell size */ - default_face_height_and_width (wrap_frame (f), &geometry.height_inc, &geometry.width_inc); + default_face_width_and_height (wrap_frame (f), &geometry.width_inc, + &geometry.height_inc); gtk_window_set_geometry_hints (GTK_WINDOW (shell), FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask); } - change_frame_size (f, rows, cols, 0); + change_frame_size (f, cols, rows, 0); { GtkRequisition req; @@ -1370,7 +1371,7 @@ gint width_inc = 10; gint height_inc = 10; - default_face_height_and_width (wrap_frame (frm), &height_inc, &width_inc); + default_face_width_and_height (wrap_frame (frm), &width_inc, &height_inc); geometry_mask = GDK_HINT_RESIZE_INC; geometry.width_inc = width_inc; geometry.height_inc = height_inc;
--- a/src/frame-impl.h Wed Feb 24 01:58:04 2010 -0600 +++ b/src/frame-impl.h Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,6 @@ /* Define frame-object for XEmacs. Copyright (C) 1988, 1992, 1993, 1994 Free Software Foundation, Inc. - Copyright (C) 1995 Ben Wing. + Copyright (C) 1995, 2010 Ben Wing. This file is part of XEmacs. @@ -543,8 +543,16 @@ #endif /* FSFmacs */ -#define FRAME_BORDER_WIDTH(f) ((f)->internal_border_width) -#define FRAME_BORDER_HEIGHT(f) ((f)->internal_border_width) +#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->internal_border_width) +#define FRAME_INTERNAL_BORDER_HEIGHT(f) ((f)->internal_border_width) +#define FRAME_INTERNAL_BORDER_SIZE(f, pos) ((f)->internal_border_width) + +/************************************************************************/ +/* toolbars */ +/************************************************************************/ + +/*---------------- Theoretical and real toolbar values ----------------*/ + /* This returns the frame-local value; that tells you what you should use when computing the frame size. It is *not* the actual toolbar @@ -657,6 +665,10 @@ ? FRAME_RAW_REAL_TOOLBAR_BORDER_WIDTH (f, pos) \ : 0) +#define FRAME_REAL_TOOLBAR_BOUNDS(f, pos) \ + (FRAME_REAL_TOOLBAR_SIZE (f, pos) + \ + 2 * FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, pos)) + #define FRAME_REAL_TOP_TOOLBAR_HEIGHT(f) \ FRAME_REAL_TOOLBAR_SIZE (f, TOP_TOOLBAR) #define FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT(f) \ @@ -684,32 +696,39 @@ #define FRAME_REAL_RIGHT_TOOLBAR_VISIBLE(f) \ FRAME_REAL_TOOLBAR_VISIBLE (f, RIGHT_TOOLBAR) +#define FRAME_REAL_TOP_TOOLBAR_BOUNDS(f) \ + FRAME_REAL_TOOLBAR_BOUNDS (f, TOP_TOOLBAR) +#define FRAME_REAL_BOTTOM_TOOLBAR_BOUNDS(f) \ + FRAME_REAL_TOOLBAR_BOUNDS (f, BOTTOM_TOOLBAR) +#define FRAME_REAL_LEFT_TOOLBAR_BOUNDS(f) \ + FRAME_REAL_TOOLBAR_BOUNDS (f, LEFT_TOOLBAR) +#define FRAME_REAL_RIGHT_TOOLBAR_BOUNDS(f) \ + FRAME_REAL_TOOLBAR_BOUNDS (f, RIGHT_TOOLBAR) + +/************************************************************************/ +/* frame dimensions defined using toolbars and gutters */ +/************************************************************************/ + +/* #### These should be using the gutter sizes, but aren't yet */ + #define FRAME_TOP_BORDER_START(f) \ - (FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) + \ - 2 * FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH (f)) + FRAME_REAL_TOP_TOOLBAR_BOUNDS (f) #define FRAME_TOP_BORDER_END(f) \ - (FRAME_TOP_BORDER_START (f) + FRAME_BORDER_HEIGHT (f)) + (FRAME_TOP_BORDER_START (f) + FRAME_INTERNAL_BORDER_HEIGHT (f)) #define FRAME_BOTTOM_BORDER_START(f) \ - (FRAME_PIXHEIGHT (f) - FRAME_BORDER_HEIGHT (f) - \ - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - \ - 2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f)) + (FRAME_BOTTOM_BORDER_END (f) - FRAME_INTERNAL_BORDER_HEIGHT (f)) #define FRAME_BOTTOM_BORDER_END(f) \ - (FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - \ - 2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f)) + (FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_BOUNDS (f)) #define FRAME_LEFT_BORDER_START(f) \ - (FRAME_REAL_LEFT_TOOLBAR_WIDTH (f) + \ - 2 * FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH (f)) + FRAME_REAL_LEFT_TOOLBAR_BOUNDS (f) #define FRAME_LEFT_BORDER_END(f) \ - (FRAME_LEFT_BORDER_START (f) + FRAME_BORDER_WIDTH (f)) + (FRAME_LEFT_BORDER_START (f) + FRAME_INTERNAL_BORDER_WIDTH (f)) #define FRAME_RIGHT_BORDER_START(f) \ - (FRAME_PIXWIDTH (f) - FRAME_BORDER_WIDTH (f) - \ - FRAME_REAL_RIGHT_TOOLBAR_WIDTH(f) - \ - 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f)) + (FRAME_RIGHT_BORDER_END (f) - FRAME_INTERNAL_BORDER_WIDTH (f)) #define FRAME_RIGHT_BORDER_END(f) \ - (FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) - \ - 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH(f)) + (FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_BOUNDS (f)) #endif /* INCLUDED_frame_impl_h_ */
--- a/src/frame-msw.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/frame-msw.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,6 @@ /* Functions for the mswindows window system. Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. - Copyright (C) 1995, 1996, 2001, 2002 Ben Wing. + Copyright (C) 1995, 1996, 2001, 2002, 2010 Ben Wing. This file is part of XEmacs. @@ -235,7 +235,7 @@ GetWindowRect (hwnd_parent, &rect); rect_default.left = rect.left + POPUP_OFFSET; rect_default.top = rect.top + POPUP_OFFSET; - char_to_real_pixel_size (f, POPUP_WIDTH, POPUP_HEIGHT, + char_to_pixel_size (f, POPUP_WIDTH, POPUP_HEIGHT, &rect_default.width, &rect_default.height); FRAME_MSWINDOWS_POPUP (f) = 1; } @@ -372,14 +372,14 @@ mswindows_set_frame_size (struct frame *f, int width, int height) { RECT rect; - int columns, rows; + int pwidth, pheight; + + change_frame_size (f, width, height, 0); + frame_unit_to_pixel_size (f, width, height, &pwidth, &pheight); rect.left = rect.top = 0; - rect.right = width; - rect.bottom = height; - - pixel_to_char_size (f, rect.right, rect.bottom, &columns, &rows); - change_frame_size (f, rows, columns, 0); + rect.right = pwidth; + rect.bottom = pheight; /* This can call Lisp, because it runs the window procedure, which can call redisplay() */ @@ -738,7 +738,7 @@ int pixel_width, pixel_height; int size_p = (dest->width >=0 || dest->height >=0); int move_p = (dest->top >=0 || dest->left >=0); - char_to_real_pixel_size (f, dest->width, dest->height, &pixel_width, + char_to_pixel_size (f, dest->width, dest->height, &pixel_width, &pixel_height); if (dest->width < 0) @@ -937,7 +937,7 @@ if (FRAME_MSPRINTER_CHARWIDTH (f) > 0) { - char_to_real_pixel_size (f, FRAME_MSPRINTER_CHARWIDTH (f), 0, + char_to_pixel_size (f, FRAME_MSPRINTER_CHARWIDTH (f), 0, &frame_width, NULL); FRAME_MSPRINTER_RIGHT_MARGIN(f) = MulDiv (physicalwidth - (frame_left + frame_width), 1440, @@ -953,7 +953,7 @@ if (FRAME_MSPRINTER_CHARHEIGHT (f) > 0) { - char_to_real_pixel_size (f, 0, FRAME_MSPRINTER_CHARHEIGHT (f), + char_to_pixel_size (f, 0, FRAME_MSPRINTER_CHARHEIGHT (f), NULL, &frame_height); FRAME_MSPRINTER_BOTTOM_MARGIN(f) = @@ -983,8 +983,8 @@ int rows, columns; FRAME_PIXWIDTH (f) = frame_width; FRAME_PIXHEIGHT (f) = frame_height; - pixel_to_char_size (f, frame_width, frame_height, &columns, &rows); - change_frame_size (f, rows, columns, 0); + pixel_to_frame_unit_size (f, frame_width, frame_height, &columns, &rows); + change_frame_size (f, columns, rows, 0); } FRAME_MSPRINTER_PIXLEFT(f) = frame_left;
--- a/src/frame-x.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/frame-x.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,6 @@ /* Functions for the X window system. Copyright (C) 1989, 1992-5, 1997 Free Software Foundation, Inc. - Copyright (C) 1995, 1996, 2001, 2002, 2004 Ben Wing. + Copyright (C) 1995, 1996, 2001, 2002, 2004, 2010 Ben Wing. This file is part of XEmacs. @@ -224,14 +224,14 @@ void x_wm_mark_shell_size_user_specified (Widget wmshell) { - if (! XtIsWMShell (wmshell)) ABORT (); + assert (XtIsWMShell (wmshell)); EmacsShellSetSizeUserSpecified (wmshell); } void x_wm_mark_shell_position_user_specified (Widget wmshell) { - if (! XtIsWMShell (wmshell)) ABORT (); + assert (XtIsWMShell (wmshell)); EmacsShellSetPositionUserSpecified (wmshell); } @@ -240,7 +240,7 @@ void x_wm_set_shell_iconic_p (Widget shell, int iconic_p) { - if (! XtIsWMShell (shell)) ABORT (); + assert (XtIsWMShell (shell)); /* Because of questionable logic in Shell.c, this sequence can't work: @@ -269,10 +269,8 @@ { Arg al [2]; - if (!XtIsWMShell (wmshell)) - ABORT (); - if (cw <= 0 || ch <= 0) - ABORT (); + assert (XtIsWMShell (wmshell)); + assert (cw > 0 && ch > 0); Xt_SET_ARG (al[0], XtNwidthInc, cw); Xt_SET_ARG (al[1], XtNheightInc, ch); @@ -284,8 +282,7 @@ { Arg al [2]; - if (!XtIsWMShell (wmshell)) - ABORT (); + assert (XtIsWMShell (wmshell)); #ifdef DEBUG_GEOMETRY_MANAGEMENT /* See comment in EmacsShell.c */ printf ("x_wm_set_variable_size: %d %d\n", width, height); @@ -353,8 +350,7 @@ Extbyte *app_name, *app_class; XClassHint classhint; - if (!XtIsWMShell (shell)) - ABORT (); + assert (XtIsWMShell (shell)); XtGetApplicationNameAndClass (dpy, &app_name, &app_class); classhint.res_name = frame_name; @@ -370,8 +366,7 @@ Widget w = FRAME_X_SHELL_WIDGET (f); struct device *d = XDEVICE (FRAME_DEVICE (f)); - if (!XtIsWMShell (w)) - ABORT (); + assert (XtIsWMShell (w)); if (NILP (DEVICE_X_WM_COMMAND_FRAME (d))) { @@ -1524,8 +1519,7 @@ /* OK, we're a top-level shell. */ - if (!XtIsWMShell (wmshell)) - ABORT (); + assert (XtIsWMShell (wmshell)); /* If the EmacsFrame doesn't have a geometry but the shell does, treat that as the geometry of the frame.
--- a/src/frame.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/frame.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,6 @@ /* Generic frame functions. Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. - Copyright (C) 1995, 1996, 2002, 2003, 2005 Ben Wing. + Copyright (C) 1995, 1996, 2002, 2003, 2005, 2010 Ben Wing. Copyright (C) 1995 Sun Microsystems, Inc. This file is part of XEmacs. @@ -24,6 +24,290 @@ /* This file has been Mule-ized. */ +/* About window and frame geometry [ben]: + + Here is an ASCII diagram: + ++------------------------------------------------------------------------| +| window-manager decoration | +| +--------------------------------------------------------------------+ | +| | menubar | | +| ###################################################################### | +| # toolbar # | +| #--------------------------------------------------------------------# | +| # | gutter | # | +| # |--------------------------------------------------------------| # | +| # | | internal border width | | # | +| # | | ******************************************************** | | # | +|w# | | * |s|v* |s* | | #w| +|i# | | * |c|e* |c* | | #i| +|n# | | * |r|r* |r* | | #n| +|d# | | * |o|t* |o* | | #d| +|o# | | * text area |l|.* text area |l* | | #o| +|w# | |i* |l| * |l*i| | #w| +|-# | |n* |b|d* |b*n| | #-| +|m# | |t* |a|i* |a*t| | #m| +|a# | |.* |r|v* |r*.| | #a| +|n# t| | *-------------------------+-|i*----------------------+-* | |t #n| +|a# o|g|b* scrollbar | |d* scrollbar | *b|g|o #a| +|g# o|u|o*-------------------------+-|e*----------------------+-*o|u|o #g| +|e# l|t|r* modeline |r* modeline *r|t|l #e| +|r# b|t|d********************************************************d|t|b #r| +| # a|e|e* =..texttexttex....= |s|v* |s*e|e|a # | +|d# r|r|r*o m=..texttexttextt..=o m|c|e* |c*r|r|r #d| +|e# | | *u a=.exttexttextte...=u a|r|r* |r* | | #e| +|c# | |w*t r=....texttexttex..=t r|o|t* |o*w| | #c| +|o# | |i*s g= etc. =s g|l|.* text area |l*i| | #o| +|r# | |d*i i= =i i|l| * |l*d| | #r| +|a# | |t*d n= =d n|b|d* |b*t| | #a| +|t# | |h*e = inner text area =e |a|i* |a*h| | #t| +|i# | | * = = |r|v* |r* | | #i| +|o# | | *---===================---+-|i*----------------------+-* | | #o| +|n# | | * scrollbar | |d* scrollbar | * | | #n| +| # | | *-------------------------+-|e*----------------------+-* | | # | +| # | | * modeline |r* modeline * | | # | +| # | | ******************************************************** | | # | +| # | | * minibuffer * | | # | +| # | | ******************************************************** | | # | +| # | | internal border width | | # | +| # |--------------------------------------------------------------| # | +| # | gutter | # | +| #--------------------------------------------------------------------# | +| # toolbar # | +| ###################################################################### | +| window manager decoration | ++------------------------------------------------------------------------+ + + # = boundary of client area; * = window boundaries, boundary of paned area + = = boundary of inner text area; . = inside margin area + + Note in particular what happens at the corners, where a "corner box" + occurs. Top and bottom toolbars take precedence over left and right + toolbars, extending out horizontally into the corner boxes. Gutters + work the same way. The corner box where the scrollbars meet, however, + is assigned to neither scrollbar, and is known as the "dead box"; it is + an area that must be cleared specially. + + THE FRAME + --------- + + The "top-level window area" is the entire area of a top-level window (or + "frame"). The "client area" (a term from MS Windows) is the area of a + top-level window that XEmacs draws into and manages with redisplay. + This includes the toolbar, scrollbars, gutters, dividers, text area, + modeline and minibuffer. It does not include the menubar, title or + outer borders. The "non-client area" is the area of a top-level window + outside of the client area and includes the menubar, title and outer + borders. Internally, all frame coordinates are relative to the client + area. + + + THE NON-CLIENT AREA + ------------------- + + Under X, the non-client area is split into two parts: + + (1) The outer layer is the window-manager decorations: The title and + borders. These are controlled by the window manager, a separate process + that controls the desktop, the location of icons, etc. When a process + tries to create a window, the window manager intercepts this action and + "reparents" the window, placing another window around it which contains + the window decorations, including the title bar, outer borders used for + resizing, etc. The window manager also implements any actions involving + the decorations, such as the ability to resize a window by dragging its + borders, move a window by dragging its title bar, etc. If there is no + window manager or you kill it, windows will have no decorations (and + will lose them if they previously had any) and you will not be able to + move or resize them. + + (2) Inside of the window-manager decorations is the "shell", which is + managed by the toolkit and widget libraries your program is linked with. + The code in *-x.c uses the Xt toolkit and various possible widget + libraries built on top of Xt, such as Motif, Athena, the "Lucid" + widgets, etc. Another possibility is GTK (*-gtk.c), which implements + both the toolkit and widgets. Under Xt, the "shell" window is an + EmacsShell widget, containing an EmacsManager widget of the same size, + which in turn contains a menubar widget and an EmacsFrame widget, inside + of which is the client area. (The division into EmacsShell and + EmacsManager is due to the complex and screwy geometry-management system + in Xt [and X more generally]. The EmacsShell handles negotation with + the window manager; the place of the EmacsManager widget is normally + assumed by a widget that manages the geometry of its child widgets, but + the EmacsManager widget just lets the XEmacs redisplay mechanism do the + positioning.) + + Under Windows, the non-client area is managed by the window system. + There is no division such as under X. Part of the window-system API + (USER.DLL) of Win32 includes functions to control the menubars, title, + etc. and implements the move and resize behavior. There *is* an + equivalent of the window manager, called the "shell", but it manages + only the desktop, not the windows themselves. The normal shell under + Windows is EXPLORER.EXE; if you kill this, you will lose the bar + containing the "Start" menu and tray and such, but the windows + themselves will not be affected or lose their decorations. + + + THE CLIENT AREA + --------------- + + Inside of the client area is the toolbars, the gutters (where the buffer + tabs are displayed), the minibuffer, the internal border width, and one + or more non-overlapping "windows" (this is old Emacs terminology, from + before the time when frames existed at all; the standard terminology for + this would be "pane"). Each window can contain a modeline, horizontal + and/or vertical scrollbars, and (for non-rightmost windows) a vertical + divider, surrounding a text area. + + The dimensions of the toolbars and gutters are determined by the formula + (THICKNESS + 2 * BORDER-THICKNESS), where "thickness" is a cover term + for height or width, as appropriate. The height and width come from + `default-toolbar-height' and `default-toolbar-width' and the specific + versions of these (`top-toolbar-height', `left-toolbar-width', etc.). + The border thickness comes from `default-toolbar-border-height' and + `default-toolbar-border-width', and the specific versions of these. The + gutter works exactly equivalently. + + Note that for any particular toolbar or gutter, it will only be + displayed if [a] its visibility specifier (`default-toolbar-visible-p' + etc.) is non-nil; [b] its thickness (`default-toolbar-height' etc.) is + greater than 0; [c] its contents (`default-toolbar' etc.) are non-nil. + + The position-specific toolbars interact with the default specifications + as follows: If the value for a position-specific specifier is not + defined in a particular domain (usually a window), and the position of + that specifier is set as the default position (using + `default-toolbar-position'), then the value from the corresponding + default specifier in that domain will be used. The gutters work the + same. + + + THE PANED AREA + -------------- + + The area occupied by the "windows" is called the paned area. Note that + this includes the minibuffer, which is just another window but is + special-cased in XEmacs. Each window can include a horizontal and/or + vertical scrollbar, a modeline and a vertical divider to its right, as + well as the text area. Only non-rightmost windows can include a + vertical divider. (The minibuffer normally does not include either + modeline or scrollbars.) + + Note that, because the toolbars and gutters are controlled by + specifiers, and specifiers can have window-specific and buffer-specific + values, the size of the paned area can change depending on which window + is selected: In other words, if the selected window or buffer changes, + the entire paned area for the frame may change. + + + TEXT AREAS, FRINGES, MARGINS + ---------------------------- + + The space occupied by a window can be divided into the text area and the + fringes. The fringes include the modeline, scrollbars and vertical + divider on the right side (if any); inside of this is the text area, + where the text actually occurs. Note that a window may or may not + contain any of the elements that are part of the fringe -- this is + controlled by specifiers, e.g. `has-modeline-p', + `horizontal-scrollbar-visible-p', `vertical-scrollbar-visible-p', + `vertical-divider-always-visible-p', etc. + + In addition, it is possible to set margins in the text area using the + specifiers `left-margin-width' and `right-margin-width'. When this is + done, only the "inner text area" (the area inside of the margins) will + be used for normal display of text; the margins will be used for glyphs + with a layout policy of `outside-margin' (as set on an extent containing + the glyph by `set-extent-begin-glyph-layout' or + `set-extent-end-glyph-layout'). However, the calculation of the text + area size (e.g. in the function `window-text-area-width') includes the + margins. Which margin is used depends on whether a glyph has been set + as the begin-glyph or end-glyph of an extent (`set-extent-begin-glyph' + etc.), using the left and right margins, respectively. + + Technically, the margins outside of the inner text area are known as the + "outside margins". The "inside margins" are in the inner text area and + constitute the whitespace between the outside margins and the first or + last non-whitespace character in a line; their width can vary from line + to line. Glyphs will be placed in the inside margin if their layout + policy is `inside-margin' or `whitespace', with `whitespace' glyphs on + the inside and `inside-margin' glyphs on the outside. Inside-margin + glyphs can spill over into the outside margin if `use-left-overflow' or + `use-right-overflow', respectively, is non-nil. + + See the Lisp Reference manual, under Annotations, for more details. + + + THE DISPLAYABLE AREA + -------------------- + + The "displayable area" is not so much an actual area as a convenient + fiction. It is the area used to convert between pixel and character + dimensions for frames. The character dimensions for a frame (e.g. as + returned by `frame-width' and `frame-height' and set by + `set-frame-width' and `set-frame-height') are determined from the + displayable area by dividing by the pixel size of the default font as + instantiated in the frame. (For proportional fonts, the "average" width + is used. Under Windows, this is a built-in property of the fonts. + Under X, this is based on the width of the lowercase 'n', or if this is + zero then the width of the default character. [We prefer 'n' to the + specified default character because many X fonts have a default + character with a zero or otherwise non-representative width.]) + + The displayable area is essentially the "theoretical" paned area of the + frame excluding the rightmost and bottom-most scrollbars. In this + context, "theoretical" means that all calculations on based on + frame-level values for toolbar, gutter and scrollbar thicknesses. + Because these thicknesses are controlled by specifiers, and specifiers + can have window-specific and buffer-specific values, these calculations + may or may not reflect the actual size of the paned area or of the + scrollbars when any particular window is selected. Note also that the + "displayable area" may not even be contiguous! In particular, if the + frame-level value of the horizontal scrollbar height is non-zero, then + the displayable area includes the paned area above and below the bottom + horizontal scrollbar but not the scrollbar itself. + + As a further twist, the character-dimension calculations are adjusted so + that the truncation and continuation glyphs (see `truncation-glyph' and + `continuation-glyph') count as a single character even if they are wider + than the default font width. (Technically, the character width is + computed from the displayable-area width by subtracting the maximum of + the truncation-glyph width, continuation-glyph width and default-font + width before dividing by the default-font width, and then adding 1 to + the result.) (The ultimate motivation for this kludge as well as the + subtraction of the scrollbars, but not the minibuffer or bottom-most + modeline, is to maintain compatibility with TTY's.) + + Despite all these concerns and kludges, however, the "displayable area" + concept works well in practice and mostly ensures that by default the + frame will actually fit 79 characters + continuation/truncation glyph. + + + WHICH FUNCTIONS USE WHICH? + -------------------------- + + [1] Top-level window area: + + set-frame-position + `left' and `top' frame properties + + [2] Client area: + + frame-pixel-*, set-frame-pixel-* + + [3] Paned area: + + window-pixel-edges + event-x-pixel, event-y-pixel, event-properties, make-event + + [4] Displayable area: + + frame-width, frame-height and other all functions specifying frame size + in characters + frame-displayable-pixel-* + + --ben + +*/ + #include <config.h> #include "lisp.h" @@ -120,18 +404,35 @@ static void store_minibuf_frame_prop (struct frame *f, Lisp_Object val); -typedef enum { +typedef enum +{ DISPLAYABLE_PIXEL_TO_CHAR, + CHAR_TO_DISPLAYABLE_PIXEL, TOTAL_PIXEL_TO_CHAR, CHAR_TO_TOTAL_PIXEL, - CHAR_TO_DISPLAYABLE_PIXEL -} pixel_to_char_mode_t; + TOTAL_PIXEL_TO_DISPLAYABLE_PIXEL, + DISPLAYABLE_PIXEL_TO_TOTAL_PIXEL, +} +pixel_to_char_mode_t; + +enum frame_size_type +{ + SIZE_TOTAL_PIXEL, + SIZE_DISPLAYABLE_PIXEL, + SIZE_CHAR_CELL, + SIZE_FRAME_UNIT, +}; static void frame_conversion_internal (struct frame *f, - pixel_to_char_mode_t pixel_to_char, - int *pixel_width, int *pixel_height, - int *char_width, int *char_height, - int real_face); + enum frame_size_type source, + int source_width, int source_height, + enum frame_size_type dest, + int *dest_width, int *dest_height); +static void get_frame_char_size (struct frame *f, int *out_width, + int *out_height); +static void get_frame_displayable_pixel_size (struct frame *f, int *out_width, + int *out_height); + static struct display_line title_string_display_line; /* Used by generate_title_string. Global because they get used so much that the dynamic allocation time adds up. */ @@ -653,7 +954,7 @@ reset_glyph_cachels (XWINDOW (f->minibuffer_window)); } - change_frame_size (f, f->height, f->width, 0); + change_frame_size (f, f->width, f->height, 0); } MAYBE_FRAMEMETH (f, init_frame_2, (f, props)); @@ -698,7 +999,7 @@ earlier. */ init_frame_gutters (f); - change_frame_size (f, f->height, f->width, 0); + change_frame_size (f, f->width, f->height, 0); } if (first_frame_on_device) @@ -821,9 +1122,9 @@ if (!keep_char_size) { int height, width; - pixel_to_char_size (f, FRAME_PIXWIDTH(f), FRAME_PIXHEIGHT(f), + pixel_to_frame_unit_size (f, FRAME_PIXWIDTH(f), FRAME_PIXHEIGHT(f), &width, &height); - change_frame_size (f, height, width, 0); + change_frame_size (f, width, height, 0); CLEAR_FRAME_SIZE_SLIPPED (f); } } @@ -1801,8 +2102,7 @@ point their minibuffer frames must have been deleted, but that is prohibited at the top; you can't delete surrogate minibuffer frames. */ - if (NILP (frame_with_minibuf)) - ABORT (); + assert (!NILP (frame_with_minibuf)); con->default_minibuffer_frame = frame_with_minibuf; } @@ -2306,9 +2606,6 @@ /* frame properties */ /***************************************************************************/ -static void internal_set_frame_size (struct frame *f, int cols, int rows, - int pretend); - static void store_minibuf_frame_prop (struct frame *f, Lisp_Object val) { @@ -2603,17 +2900,9 @@ if (EQ (Qheight, property) || EQ (Qwidth, property)) { - if (window_system_pixelated_geometry (frame)) - { - int width, height; - pixel_to_real_char_size (f, FRAME_PIXWIDTH (f), FRAME_PIXHEIGHT (f), - &width, &height); - return make_int (EQ (Qheight, property) ? height: width); - } - else - return make_int (EQ (Qheight, property) ? - FRAME_HEIGHT (f) : - FRAME_WIDTH (f)); + int width, height; + get_frame_char_size (f, &width, &height); + return make_int (EQ (Qheight, property) ? height : width); } /* NOTE: FSF returns Qnil instead of Qt for FRAME_HAS_MINIBUF_P. @@ -2705,17 +2994,7 @@ result); { int width, height; - - if (window_system_pixelated_geometry (frame)) - { - pixel_to_real_char_size (f, FRAME_PIXWIDTH (f), FRAME_PIXHEIGHT (f), - &width, &height); - } - else - { - height = FRAME_HEIGHT (f); - width = FRAME_WIDTH (f); - } + get_frame_char_size (f, &width, &height); result = cons3 (Qwidth , make_int (width), result); result = cons3 (Qheight, make_int (height), result); } @@ -2741,20 +3020,10 @@ (frame)) { struct frame *f = decode_frame (frame); - int height, pheight; - frame = wrap_frame (f); - - if (!window_system_pixelated_geometry (frame)) - { - height = FRAME_HEIGHT (f); - - frame_conversion_internal (f, CHAR_TO_DISPLAYABLE_PIXEL, - 0, &pheight, 0, &height, 0); - } - else - pheight = FRAME_PIXHEIGHT (f); - - return make_int (pheight); + int width, height; + + get_frame_displayable_pixel_size (f, &width, &height); + return make_int (height); } DEFUN ("frame-pixel-width", Fframe_pixel_width, 0, 1, 0, /* @@ -2771,20 +3040,10 @@ (frame)) { struct frame *f = decode_frame (frame); - int width, pwidth; - frame = wrap_frame (f); - - if (!window_system_pixelated_geometry (frame)) - { - width = FRAME_WIDTH (f); - - frame_conversion_internal (f, CHAR_TO_DISPLAYABLE_PIXEL, - &pwidth, 0, &width, 0, 0); - } - else - pwidth = FRAME_PIXWIDTH (f); - - return make_int (pwidth); + int width, height; + + get_frame_displayable_pixel_size (f, &width, &height); + return make_int (width); } DEFUN ("frame-name", Fframe_name, 0, 1, 0, /* @@ -2810,7 +3069,7 @@ return make_int (decode_frame (frame)->modiff); } -static void +void internal_set_frame_size (struct frame *f, int cols, int rows, int pretend) { /* This can call Lisp. See mswindows_set_frame_size(). */ @@ -2818,7 +3077,7 @@ CLEAR_FRAME_SIZE_SLIPPED (f); if (pretend || !HAS_FRAMEMETH_P (f, set_frame_size)) - change_frame_size (f, rows, cols, 0); + change_frame_size (f, cols, rows, 0); else FRAMEMETH (f, set_frame_size, (f, cols, rows)); } @@ -2832,23 +3091,16 @@ { /* This can call Lisp. */ struct frame *f = decode_frame (frame); - int height, width; - frame = wrap_frame (f); + int cwidth, cheight; + int guwidth, guheight; + CHECK_INT (lines); - - if (window_system_pixelated_geometry (frame)) - { - char_to_real_pixel_size (f, 0, XINT (lines), 0, &height); - width = FRAME_PIXWIDTH (f); - } - else - { - height = XINT (lines); - width = FRAME_WIDTH (f); - } - - internal_set_frame_size (f, width, height, !NILP (pretend)); - return frame; + get_frame_char_size (f, &cwidth, &cheight); + cheight = XINT (lines); + frame_conversion_internal (f, SIZE_CHAR_CELL, cwidth, cheight, + SIZE_FRAME_UNIT, &guwidth, &guheight); + internal_set_frame_size (f, guwidth, guheight, !NILP (pretend)); + return wrap_frame (f); } DEFUN ("set-frame-pixel-height", Fset_frame_pixel_height, 2, 3, 0, /* @@ -2860,25 +3112,16 @@ { /* This can call Lisp. */ struct frame *f = decode_frame (frame); - int pheight, width; - frame = wrap_frame (f); + int pwidth, pheight; + int guwidth, guheight; + CHECK_INT (height); - - if (!window_system_pixelated_geometry (frame)) - { - int h = XINT (height); - width = FRAME_WIDTH (f); - - frame_conversion_internal (f, TOTAL_PIXEL_TO_CHAR, 0, &h, 0, &pheight, 0); - } - else - { - width = FRAME_PIXWIDTH (f); - pheight = XINT (height); - } - - internal_set_frame_size (f, width, pheight, !NILP (pretend)); - return frame; + pheight = XINT (height); + pwidth = FRAME_PIXWIDTH (f); + frame_conversion_internal (f, SIZE_TOTAL_PIXEL, pwidth, pheight, + SIZE_FRAME_UNIT, &guwidth, &guheight); + internal_set_frame_size (f, guwidth, guheight, !NILP (pretend)); + return wrap_frame (f); } DEFUN ("set-frame-displayable-pixel-height", Fset_frame_displayable_pixel_height, 2, 3, 0, /* @@ -2890,24 +3133,16 @@ { /* This can call Lisp. */ struct frame *f = decode_frame (frame); - int pheight, width; - frame = wrap_frame (f); + int pwidth, pheight; + int guwidth, guheight; + CHECK_INT (height); - - if (!window_system_pixelated_geometry (frame)) - { - int h = XINT (height); - width = FRAME_WIDTH (f); - frame_conversion_internal (f, DISPLAYABLE_PIXEL_TO_CHAR, 0, &h, 0, &pheight, 0); - } - else - { - width = FRAME_PIXWIDTH (f); - pheight = XINT (height); - } - - internal_set_frame_size (f, width, pheight, !NILP (pretend)); - return frame; + get_frame_displayable_pixel_size (f, &pwidth, &pheight); + pheight = XINT (height); + frame_conversion_internal (f, SIZE_DISPLAYABLE_PIXEL, pwidth, pheight, + SIZE_FRAME_UNIT, &guwidth, &guheight); + internal_set_frame_size (f, guwidth, guheight, !NILP (pretend)); + return wrap_frame (f); } @@ -2920,23 +3155,16 @@ { /* This can call Lisp. */ struct frame *f = decode_frame (frame); - int width, height; - frame = wrap_frame (f); + int cwidth, cheight; + int guwidth, guheight; + CHECK_INT (cols); - - if (window_system_pixelated_geometry (frame)) - { - char_to_real_pixel_size (f, XINT (cols), 0, &width, 0); - height = FRAME_PIXHEIGHT (f); - } - else - { - width = XINT (cols); - height = FRAME_HEIGHT (f); - } - - internal_set_frame_size (f, width, height, !NILP (pretend)); - return frame; + get_frame_char_size (f, &cwidth, &cheight); + cwidth = XINT (cols); + frame_conversion_internal (f, SIZE_CHAR_CELL, cwidth, cheight, + SIZE_FRAME_UNIT, &guwidth, &guheight); + internal_set_frame_size (f, guwidth, guheight, !NILP (pretend)); + return wrap_frame (f); } DEFUN ("set-frame-pixel-width", Fset_frame_pixel_width, 2, 3, 0, /* @@ -2948,24 +3176,16 @@ { /* This can call Lisp. */ struct frame *f = decode_frame (frame); - int height, pwidth; - frame = wrap_frame (f); + int pwidth, pheight; + int guwidth, guheight; + CHECK_INT (width); - - if (!window_system_pixelated_geometry (frame)) - { - int w = XINT (width); - height = FRAME_HEIGHT (f); - frame_conversion_internal (f, TOTAL_PIXEL_TO_CHAR, &w, 0, &pwidth, 0, 0); - } - else - { - height = FRAME_PIXHEIGHT (f); - pwidth = XINT (width); - } - - internal_set_frame_size (f, pwidth, height, !NILP (pretend)); - return frame; + pwidth = XINT (width); + pheight = FRAME_PIXHEIGHT (f); + frame_conversion_internal (f, SIZE_TOTAL_PIXEL, pwidth, pheight, + SIZE_FRAME_UNIT, &guwidth, &guheight); + internal_set_frame_size (f, guwidth, guheight, !NILP (pretend)); + return wrap_frame (f); } DEFUN ("set-frame-displayable-pixel-width", Fset_frame_displayable_pixel_width, 2, 3, 0, /* @@ -2977,24 +3197,16 @@ { /* This can call Lisp. */ struct frame *f = decode_frame (frame); - int height, pwidth; - frame = wrap_frame (f); + int pwidth, pheight; + int guwidth, guheight; + CHECK_INT (width); - - if (!window_system_pixelated_geometry (frame)) - { - int w = XINT (width); - height = FRAME_HEIGHT (f); - frame_conversion_internal (f, DISPLAYABLE_PIXEL_TO_CHAR, &w, 0, &pwidth, 0, 0); - } - else - { - height = FRAME_PIXHEIGHT (f); - pwidth = XINT (width); - } - - internal_set_frame_size (f, pwidth, height, !NILP (pretend)); - return frame; + get_frame_displayable_pixel_size (f, &pwidth, &pheight); + pwidth = XINT (width); + frame_conversion_internal (f, SIZE_DISPLAYABLE_PIXEL, pwidth, pheight, + SIZE_FRAME_UNIT, &guwidth, &guheight); + internal_set_frame_size (f, guwidth, guheight, !NILP (pretend)); + return wrap_frame (f); } DEFUN ("set-frame-size", Fset_frame_size, 3, 4, 0, /* @@ -3006,21 +3218,14 @@ { /* This can call Lisp. */ struct frame *f = decode_frame (frame); - int height, width; - frame = wrap_frame (f); + int guwidth, guheight; + CHECK_INT (cols); CHECK_INT (rows); - - if (window_system_pixelated_geometry (frame)) - char_to_real_pixel_size (f, XINT (cols), XINT (rows), &width, &height); - else - { - height = XINT (rows); - width = XINT (cols); - } - - internal_set_frame_size (f, width, height, !NILP (pretend)); - return frame; + frame_conversion_internal (f, SIZE_CHAR_CELL, XINT (cols), XINT (rows), + SIZE_FRAME_UNIT, &guwidth, &guheight); + internal_set_frame_size (f, guwidth, guheight, !NILP (pretend)); + return wrap_frame (f); } DEFUN ("set-frame-pixel-size", Fset_frame_pixel_size, 3, 4, 0, /* @@ -3032,25 +3237,14 @@ { /* This can call Lisp. */ struct frame *f = decode_frame (frame); - int pheight, pwidth; - frame = wrap_frame (f); + int guwidth, guheight; + CHECK_INT (width); CHECK_INT (height); - - if (!window_system_pixelated_geometry (frame)) - { - int w = XINT (width); - int h = XINT (height); - frame_conversion_internal (f, TOTAL_PIXEL_TO_CHAR, &w, &h, &pwidth, &pheight, 0); - } - else - { - pheight = XINT (height); - pwidth = XINT (width); - } - - internal_set_frame_size (f, pwidth, pheight, !NILP (pretend)); - return frame; + frame_conversion_internal (f, SIZE_TOTAL_PIXEL, XINT (width), XINT (height), + SIZE_FRAME_UNIT, &guwidth, &guheight); + internal_set_frame_size (f, guwidth, guheight, !NILP (pretend)); + return wrap_frame (f); } DEFUN ("set-frame-displayable-pixel-size", Fset_frame_displayable_pixel_size, 3, 4, 0, /* @@ -3062,25 +3256,15 @@ { /* This can call Lisp. */ struct frame *f = decode_frame (frame); - int pheight, pwidth; - frame = wrap_frame (f); + int guwidth, guheight; + CHECK_INT (width); CHECK_INT (height); - - if (!window_system_pixelated_geometry (frame)) - { - int w = XINT (width); - int h = XINT (height); - frame_conversion_internal (f, DISPLAYABLE_PIXEL_TO_CHAR, &w, &h, &pwidth, &pheight, 0); - } - else - { - pheight = XINT (height); - pwidth = XINT (width); - } - - internal_set_frame_size (f, pwidth, pheight, !NILP (pretend)); - return frame; + frame_conversion_internal (f, SIZE_DISPLAYABLE_PIXEL, + XINT (width), XINT (height), + SIZE_FRAME_UNIT, &guwidth, &guheight); + internal_set_frame_size (f, guwidth, guheight, !NILP (pretend)); + return wrap_frame (f); } DEFUN ("set-frame-position", Fset_frame_position, 3, 3, 0, /* @@ -3105,28 +3289,37 @@ /* Frame size conversion functions moved here from EmacsFrame.c because they're generic and really don't belong in that file. Function get_default_char_pixel_size() removed because it's - exactly the same as default_face_height_and_width(). */ + exactly the same as default_face_width_and_height(). + + Convert between total pixel size, displayable pixel size and + character-cell size. Variables are either "in" or "out" + depending on the value of PIXEL_TO_CHAR. +*/ static void -frame_conversion_internal (struct frame *f, - pixel_to_char_mode_t pixel_to_char, - int *pixel_width, int *pixel_height, - int *char_width, int *char_height, - int real_face) +frame_conversion_internal_1 (struct frame *f, + pixel_to_char_mode_t pixel_to_char, + int *total_pixel_width, int *total_pixel_height, + int *disp_pixel_width, int *disp_pixel_height, + int *char_width, int *char_height) { - int cpw; - int cph; + int cpw, cph; int egw; int obw, obh, bdr; Lisp_Object frame, window; frame = wrap_frame (f); - if (real_face) - default_face_height_and_width (frame, &cph, &cpw); - else - default_face_height_and_width_1 (frame, &cph, &cpw); + default_face_width_and_height (frame, &cpw, &cph); window = FRAME_SELECTED_WINDOW (f); + /* #### It really seems like we should also be subtracting out the + theoretical gutter width and height, just like we do for toolbars. + There is currently a bug where if you call `set-frame-pixel-width' + on MS Windows (at least, possibly also X) things get confused and + the top of the root window overlaps the top gutter instead of being + below it. This gets fixed next time you resize the frame using the + mouse. Possibly this is caused by not handling the gutter height + here? */ egw = max (glyph_width (Vcontinuation_glyph, window), glyph_width (Vtruncation_glyph, window)); egw = max (egw, cpw); @@ -3149,34 +3342,115 @@ { case DISPLAYABLE_PIXEL_TO_CHAR: if (char_width) - *char_width = ROUND_UP (*pixel_width, cpw) / cpw; + *char_width = ROUND_UP (*disp_pixel_width, cpw) / cpw; if (char_height) - *char_height = ROUND_UP (*pixel_height, cph) / cph; + *char_height = ROUND_UP (*disp_pixel_height, cph) / cph; + break; + case CHAR_TO_DISPLAYABLE_PIXEL: + if (disp_pixel_width) + *disp_pixel_width = *char_width * cpw; + if (disp_pixel_height) + *disp_pixel_height = *char_height * cph; break; case TOTAL_PIXEL_TO_CHAR: /* Convert to chars so that the total frame size is pixel_width x pixel_height. */ if (char_width) - *char_width = 1 + ((*pixel_width - egw) - bdr - obw) / cpw; + *char_width = 1 + ((*total_pixel_width - egw) - bdr - obw) / cpw; if (char_height) - *char_height = (*pixel_height - bdr - obh) / cph; + *char_height = (*total_pixel_height - bdr - obh) / cph; break; case CHAR_TO_TOTAL_PIXEL: - if (pixel_width) - *pixel_width = (*char_width - 1) * cpw + egw + bdr + obw; - if (pixel_height) - *pixel_height = *char_height * cph + bdr + obh; + if (total_pixel_width) + *total_pixel_width = (*char_width - 1) * cpw + egw + bdr + obw; + if (total_pixel_height) + *total_pixel_height = *char_height * cph + bdr + obh; break; - case CHAR_TO_DISPLAYABLE_PIXEL: - if (pixel_width) - *pixel_width = *char_width * cpw; - if (pixel_height) - *pixel_height = *char_height * cph; + case TOTAL_PIXEL_TO_DISPLAYABLE_PIXEL: + /* Convert to chars so that the total frame size is pixel_width x + pixel_height. */ + if (disp_pixel_width) + *disp_pixel_width = cpw + (*total_pixel_width - egw) - bdr - obw; + if (disp_pixel_height) + *disp_pixel_height = *total_pixel_height - bdr - obh; + break; + case DISPLAYABLE_PIXEL_TO_TOTAL_PIXEL: + if (total_pixel_width) + *total_pixel_width = *disp_pixel_width - cpw + egw + bdr + obw; + if (total_pixel_height) + *total_pixel_height = *disp_pixel_height + bdr + obh; break; } } -/* This takes the size in pixels of the text area, and returns the number + +static enum frame_size_type +canonicalize_frame_size_type (enum frame_size_type type, int pixgeom) +{ + if (type == SIZE_FRAME_UNIT) + { + if (pixgeom) + type = SIZE_DISPLAYABLE_PIXEL; + else + type = SIZE_CHAR_CELL; + } + return type; +} + +/* Basic frame conversion function. Convert source size to destination + size, where either of them can be in total pixels, displayable pixels, + frame units or character-cell units. */ + +static void +frame_conversion_internal (struct frame *f, + enum frame_size_type source, + int source_width, int source_height, + enum frame_size_type dest, + int *dest_width, int *dest_height) +{ + int pixgeom = window_system_pixelated_geometry (wrap_frame (f)); + dest = canonicalize_frame_size_type (dest, pixgeom); + source = canonicalize_frame_size_type (source, pixgeom); + if (source == dest) + { + *dest_width = source_width; + *dest_height = source_height; + } + else if (source == SIZE_TOTAL_PIXEL && dest == SIZE_CHAR_CELL) + frame_conversion_internal_1 (f, TOTAL_PIXEL_TO_CHAR, + &source_width, &source_height, 0, 0, + dest_width, dest_height); + else if (source == SIZE_DISPLAYABLE_PIXEL && dest == SIZE_CHAR_CELL) + frame_conversion_internal_1 (f, DISPLAYABLE_PIXEL_TO_CHAR, 0, 0, + &source_width, &source_height, + dest_width, dest_height); + else if (source == SIZE_TOTAL_PIXEL && dest == SIZE_DISPLAYABLE_PIXEL) + frame_conversion_internal_1 (f, TOTAL_PIXEL_TO_DISPLAYABLE_PIXEL, + &source_width, &source_height, + dest_width, dest_height, 0, 0); + else if (dest == SIZE_TOTAL_PIXEL && source == SIZE_CHAR_CELL) + frame_conversion_internal_1 (f, CHAR_TO_TOTAL_PIXEL, + dest_width, dest_height, 0, 0, + &source_width, &source_height); + else if (dest == SIZE_DISPLAYABLE_PIXEL && source == SIZE_CHAR_CELL) + frame_conversion_internal_1 (f, CHAR_TO_DISPLAYABLE_PIXEL, 0, 0, + dest_width, dest_height, + &source_width, &source_height); + else if (dest == SIZE_TOTAL_PIXEL && source == SIZE_DISPLAYABLE_PIXEL) + frame_conversion_internal_1 (f, DISPLAYABLE_PIXEL_TO_TOTAL_PIXEL, + dest_width, dest_height, + &source_width, &source_height, 0, 0); + else + { + ABORT (); + if (dest_width) + *dest_width = 0; + if (dest_height) + *dest_height = 0; + } +} + +/* This takes the size in pixels of the client area, and returns the number of characters that will fit there, taking into account the internal border width, and the pixel width of the line terminator glyphs (which always count as one "character" wide, even if they are not the same size @@ -3187,35 +3461,56 @@ Therefore the result is not necessarily a multiple of anything in particular. */ + void pixel_to_char_size (struct frame *f, int pixel_width, int pixel_height, int *char_width, int *char_height) { - frame_conversion_internal (f, TOTAL_PIXEL_TO_CHAR, - &pixel_width, &pixel_height, char_width, - char_height, 0); + frame_conversion_internal (f, SIZE_TOTAL_PIXEL, pixel_width, pixel_height, + SIZE_CHAR_CELL, char_width, char_height); } -/* Given a character size, this returns the minimum number of pixels - necessary to display that many characters, taking into account the - internal border width, scrollbar height and width, toolbar heights and - widths and the size of the line terminator glyphs (assuming the line - terminators take up exactly one character position). +/* Given a character size, this returns the minimum pixel size of the + client area necessary to display that many characters, taking into + account the internal border width, scrollbar height and width, toolbar + heights and widths and the size of the line terminator glyphs (assuming + the line terminators take up exactly one character position). Therefore the result is not necessarily a multiple of anything in particular. */ + void char_to_pixel_size (struct frame *f, int char_width, int char_height, int *pixel_width, int *pixel_height) { - frame_conversion_internal (f, CHAR_TO_TOTAL_PIXEL, - pixel_width, pixel_height, &char_width, - &char_height, 0); + frame_conversion_internal (f, SIZE_CHAR_CELL, char_width, char_height, + SIZE_TOTAL_PIXEL, pixel_width, pixel_height); } -/* Given a pixel size, rounds DOWN to the smallest size in pixels necessary - to display the same number of characters as are displayable now. - */ +/* Versions of the above that operate in "frame units" instead of + characters. frame units are the same as characters except on + MS Windows and MS Printer frames, where they are displayable-area + pixels. */ + +void +pixel_to_frame_unit_size (struct frame *f, int pixel_width, int pixel_height, + int *frame_unit_width, int *frame_unit_height) +{ + frame_conversion_internal (f, SIZE_TOTAL_PIXEL, pixel_width, pixel_height, + SIZE_FRAME_UNIT, frame_unit_width, + frame_unit_height); +} + +void +frame_unit_to_pixel_size (struct frame *f, int frame_unit_width, + int frame_unit_height, + int *pixel_width, int *pixel_height) +{ + frame_conversion_internal (f, SIZE_FRAME_UNIT, frame_unit_width, + frame_unit_height, + SIZE_TOTAL_PIXEL, pixel_width, pixel_height); +} + void round_size_to_char (struct frame *f, int in_width, int in_height, int *out_width, int *out_height) @@ -3226,44 +3521,49 @@ char_to_pixel_size (f, char_width, char_height, out_width, out_height); } -/* Versions of the above which always account for real font metrics. - */ -void -pixel_to_real_char_size (struct frame *f, int pixel_width, int pixel_height, - int *char_width, int *char_height) +/* Get the frame size in character cells, recalculating on the fly. + #### The logic of this function follows former logic elsewhere, + which used FRAME_PIXWIDTH() on pixelated-geometry systems but + FRAME_WIDTH() on non-pixelated-geometry systems. Not clear why not + always just use one or the other. + + Why don't we just use FRAME_CHARWIDTH() etc. in get_frame_char_size()? + That wouldn't work because change_frame_size_1() depends on the + following function to *set* the values of FRAME_CHARWIDTH() etc. + + But elsewhere I suppose we could use it. +*/ + +static void +get_frame_char_size (struct frame *f, int *out_width, int *out_height) { - frame_conversion_internal (f, TOTAL_PIXEL_TO_CHAR, - &pixel_width, &pixel_height, char_width, - char_height, 1); -} - -void -char_to_real_pixel_size (struct frame *f, int char_width, int char_height, - int *pixel_width, int *pixel_height) -{ - frame_conversion_internal (f, CHAR_TO_TOTAL_PIXEL, - pixel_width, pixel_height, &char_width, - &char_height, 1); + if (window_system_pixelated_geometry (wrap_frame (f))) + pixel_to_char_size (f, FRAME_PIXWIDTH (f), FRAME_PIXHEIGHT (f), + out_width, out_height); + else + { + *out_width = FRAME_WIDTH (f); + *out_height = FRAME_HEIGHT (f); + } } -void -round_size_to_real_char (struct frame *f, int in_width, int in_height, - int *out_width, int *out_height) +static void +get_frame_displayable_pixel_size (struct frame *f, int *out_width, + int *out_height) { - int char_width; - int char_height; - pixel_to_real_char_size (f, in_width, in_height, &char_width, &char_height); - char_to_real_pixel_size (f, char_width, char_height, out_width, out_height); + frame_conversion_internal (f, SIZE_FRAME_UNIT, FRAME_WIDTH (f), + FRAME_HEIGHT (f), SIZE_DISPLAYABLE_PIXEL, + out_width, out_height); } -/* Change the frame height and/or width. Values may be given as zero to - indicate no change is to take place. */ +/* Change the frame height and/or width. Values passed in are in + frame units (character cells on X/GTK, displayable-area pixels + on MS Windows or generally on pixelated-geometry window systems). */ static void -change_frame_size_1 (struct frame *f, int newheight, int newwidth) +change_frame_size_1 (struct frame *f, int newwidth, int newheight) { - Lisp_Object frame; int new_pixheight, new_pixwidth; - int font_height, real_font_height, font_width; + int real_font_height, real_font_width; /* #### Chuck -- shouldn't we be checking to see if the frame is being "changed" to its existing size, and do nothing if so? */ @@ -3271,160 +3571,103 @@ update code relies on this function to cause window `top' and `left' coordinates to be recomputed even though no frame size change occurs. --kyle */ - if (in_display || hold_frame_size_changes) - ABORT (); - - frame = wrap_frame (f); - - default_face_height_and_width (frame, &real_font_height, 0); - default_face_height_and_width_1 (frame, &font_height, &font_width); + assert (!in_display && !hold_frame_size_changes); + + /* We no longer allow bogus values passed in. */ + assert (newheight && newwidth); + + default_face_width_and_height (wrap_frame (f), &real_font_width, + &real_font_height); + + frame_conversion_internal (f, SIZE_FRAME_UNIT, newwidth, newheight, + SIZE_TOTAL_PIXEL, &new_pixwidth, + &new_pixheight); /* This size-change overrides any pending one for this frame. */ f->size_change_pending = 0; FRAME_NEW_HEIGHT (f) = 0; FRAME_NEW_WIDTH (f) = 0; - new_pixheight = newheight * font_height; - new_pixwidth = (newwidth - 1) * font_width; - - /* #### dependency on FRAME_WIN_P should be removed. */ - if (FRAME_WIN_P (f)) - { - new_pixheight += FRAME_SCROLLBAR_HEIGHT (f); - new_pixwidth += FRAME_SCROLLBAR_WIDTH (f); - } - - /* when frame_conversion_internal() calculated the number of rows/cols - in the frame, the theoretical toolbar sizes were subtracted out. - The calculations below adjust for real toolbar height/width in - frame, which may be different from frame spec, taking the above - fact into account */ - new_pixheight += - + FRAME_THEORETICAL_TOP_TOOLBAR_HEIGHT (f) - + 2 * FRAME_THEORETICAL_TOP_TOOLBAR_BORDER_WIDTH (f) - - FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) - - 2 * FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH (f); - - new_pixheight += - + FRAME_THEORETICAL_BOTTOM_TOOLBAR_HEIGHT (f) - + 2 * FRAME_THEORETICAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f) - - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - - 2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f); - - new_pixwidth += - + FRAME_THEORETICAL_LEFT_TOOLBAR_WIDTH (f) - + 2 * FRAME_THEORETICAL_LEFT_TOOLBAR_BORDER_WIDTH (f) - - FRAME_REAL_LEFT_TOOLBAR_WIDTH (f) - - 2 * FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH (f); - - new_pixwidth += - + FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH (f) - + 2 * FRAME_THEORETICAL_RIGHT_TOOLBAR_BORDER_WIDTH (f) - - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) - - 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f); - - /* Adjust the width for the end glyph which may be a different width - than the default character width. */ - { - int adjustment, trunc_width, cont_width; - - trunc_width = glyph_width (Vtruncation_glyph, - FRAME_SELECTED_WINDOW (f)); - cont_width = glyph_width (Vcontinuation_glyph, - FRAME_SELECTED_WINDOW (f)); - adjustment = max (trunc_width, cont_width); - adjustment = max (adjustment, font_width); - - new_pixwidth += adjustment; - } - - /* If we don't have valid values, exit. */ - if (!new_pixheight && !new_pixwidth) - return; - - if (new_pixheight) + /* We need to remove the boundaries of the paned area (see top of file) + from the total-area pixel size, which is what we have now. + + #### We should also be subtracting the internal borders. */ + new_pixheight -= + (FRAME_REAL_TOP_TOOLBAR_BOUNDS (f) + + FRAME_REAL_BOTTOM_TOOLBAR_BOUNDS (f) + + FRAME_TOP_GUTTER_BOUNDS (f) + + FRAME_BOTTOM_GUTTER_BOUNDS (f)); + + new_pixwidth -= + (FRAME_REAL_LEFT_TOOLBAR_BOUNDS (f) + + FRAME_REAL_RIGHT_TOOLBAR_BOUNDS (f) + + FRAME_LEFT_GUTTER_BOUNDS (f) + + FRAME_RIGHT_GUTTER_BOUNDS (f)); + + XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top + = FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f); + + if (FRAME_HAS_MINIBUF_P (f) + && ! FRAME_MINIBUF_ONLY_P (f)) + /* Frame has both root and minibuffer. */ { - /* Adjust for gutters here so that we always get set - properly. */ - new_pixheight -= - (FRAME_TOP_GUTTER_BOUNDS (f) - + FRAME_BOTTOM_GUTTER_BOUNDS (f)); - - XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top - = FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f); - - if (FRAME_HAS_MINIBUF_P (f) - && ! FRAME_MINIBUF_ONLY_P (f)) - /* Frame has both root and minibuffer. */ - { - /* - * Leave the minibuffer height the same if the frame has - * been initialized, and the minibuffer height is tall - * enough to display at least one line of text in the default - * font, and the old minibuffer height is a multiple of the - * default font height. This should cause the minibuffer - * height to be recomputed on font changes but not for - * other frame size changes, which seems reasonable. - */ - int old_minibuf_height = - XWINDOW(FRAME_MINIBUF_WINDOW(f))->pixel_height; - int minibuf_height = - f->init_finished && (old_minibuf_height % real_font_height) == 0 ? - max(old_minibuf_height, real_font_height) : - real_font_height; - set_window_pixheight (FRAME_ROOT_WINDOW (f), - /* - font_height for minibuffer */ - new_pixheight - minibuf_height, 0); - - XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_top = - FRAME_TOP_BORDER_END (f) + - FRAME_TOP_GUTTER_BOUNDS (f) + - FRAME_BOTTOM_GUTTER_BOUNDS (f) + - new_pixheight - minibuf_height; - - set_window_pixheight (FRAME_MINIBUF_WINDOW (f), minibuf_height, 0); - } - else - /* Frame has just one top-level window. */ - set_window_pixheight (FRAME_ROOT_WINDOW (f), new_pixheight, 0); - - FRAME_HEIGHT (f) = newheight; - if (FRAME_TTY_P (f)) - f->pixheight = newheight; + /* + * Leave the minibuffer height the same if the frame has + * been initialized, and the minibuffer height is tall + * enough to display at least one line of text in the default + * font, and the old minibuffer height is a multiple of the + * default font height. This should cause the minibuffer + * height to be recomputed on font changes but not for + * other frame size changes, which seems reasonable. + */ + int old_minibuf_height = + XWINDOW(FRAME_MINIBUF_WINDOW(f))->pixel_height; + int minibuf_height = + f->init_finished && (old_minibuf_height % real_font_height) == 0 ? + max(old_minibuf_height, real_font_height) : + real_font_height; + set_window_pixheight (FRAME_ROOT_WINDOW (f), + /* - font_height for minibuffer */ + new_pixheight - minibuf_height, 0); + + XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_top = + FRAME_TOP_BORDER_END (f) + + FRAME_TOP_GUTTER_BOUNDS (f) + + FRAME_BOTTOM_GUTTER_BOUNDS (f) + + new_pixheight - minibuf_height; + + set_window_pixheight (FRAME_MINIBUF_WINDOW (f), minibuf_height, 0); } - - if (new_pixwidth) + else + /* Frame has just one top-level window. */ + set_window_pixheight (FRAME_ROOT_WINDOW (f), new_pixheight, 0); + + FRAME_HEIGHT (f) = newheight; + if (FRAME_TTY_P (f)) + f->pixheight = newheight; + + XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left = + FRAME_LEFT_BORDER_END (f) + FRAME_LEFT_GUTTER_BOUNDS (f); + set_window_pixwidth (FRAME_ROOT_WINDOW (f), new_pixwidth, 0); + + if (FRAME_HAS_MINIBUF_P (f)) { - /* Adjust for gutters here so that we always get set - properly. */ - new_pixwidth -= - (FRAME_LEFT_GUTTER_BOUNDS (f) - + FRAME_RIGHT_GUTTER_BOUNDS (f)); - - XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left = + XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_left = FRAME_LEFT_BORDER_END (f) + FRAME_LEFT_GUTTER_BOUNDS (f); - set_window_pixwidth (FRAME_ROOT_WINDOW (f), new_pixwidth, 0); - - if (FRAME_HAS_MINIBUF_P (f)) - { - XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_left = - FRAME_LEFT_BORDER_END (f) + FRAME_LEFT_GUTTER_BOUNDS (f); - set_window_pixwidth (FRAME_MINIBUF_WINDOW (f), new_pixwidth, 0); - } - - FRAME_WIDTH (f) = newwidth; - if (FRAME_TTY_P (f)) - f->pixwidth = newwidth; + set_window_pixwidth (FRAME_MINIBUF_WINDOW (f), new_pixwidth, 0); } - if (window_system_pixelated_geometry (frame)) - pixel_to_real_char_size (f, FRAME_PIXWIDTH (f), FRAME_PIXHEIGHT (f), - &FRAME_CHARWIDTH (f), &FRAME_CHARHEIGHT (f)); - else - { - FRAME_CHARWIDTH (f) = FRAME_WIDTH (f); - FRAME_CHARHEIGHT (f) = FRAME_HEIGHT (f); - } + FRAME_WIDTH (f) = newwidth; + if (FRAME_TTY_P (f)) + f->pixwidth = newwidth; + + /* #### On MS Windows, this references FRAME_PIXWIDTH() and FRAME_PIXHEIGHT(). + I'm not sure we can count on those values being set. Instead we should + use the total pixel size we got near the top by calling + frame_conversion_internal(). We should inline the logic in + get_frame_char_size() here and change that function so it just looks + at FRAME_CHARWIDTH() and FRAME_CHARHEIGHT(). */ + get_frame_char_size (f, &FRAME_CHARWIDTH (f), &FRAME_CHARHEIGHT (f)); MARK_FRAME_TOOLBARS_CHANGED (f); MARK_FRAME_GUTTERS_CHANGED (f); @@ -3433,12 +3676,12 @@ } void -change_frame_size (struct frame *f, int newheight, int newwidth, int delay) +change_frame_size (struct frame *f, int newwidth, int newheight, int delay) { /* sometimes we get passed a size that's too small (esp. when a client widget gets resized, since we have no control over this). So deal. */ - check_frame_size (f, &newheight, &newwidth); + check_frame_size (f, &newwidth, &newheight); /* Unconditionally mark that the frame has changed size. This is because many things need to know after the @@ -3465,10 +3708,10 @@ Lisp_Object frmcons; DEVICE_FRAME_LOOP (frmcons, XDEVICE (FRAME_DEVICE (f))) - change_frame_size_1 (XFRAME (XCAR (frmcons)), newheight, newwidth); + change_frame_size_1 (XFRAME (XCAR (frmcons)), newwidth, newheight); } else - change_frame_size_1 (f, newheight, newwidth); + change_frame_size_1 (f, newwidth, newheight); }
--- a/src/frame.h Wed Feb 24 01:58:04 2010 -0600 +++ b/src/frame.h Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,6 @@ /* Define frame-object for XEmacs. Copyright (C) 1988, 1992, 1993, 1994 Free Software Foundation, Inc. - Copyright (C) 1995, 2002 Ben Wing. + Copyright (C) 1995, 2002, 2010 Ben Wing. This file is part of XEmacs. @@ -120,22 +120,22 @@ void update_frame_title (struct frame *f); Lisp_Object next_frame (Lisp_Object, Lisp_Object, Lisp_Object); Lisp_Object previous_frame (Lisp_Object, Lisp_Object, Lisp_Object); +void pixel_to_frame_unit_size (struct frame *f, int pixel_width, int pixel_height, + int *char_width, int *char_height); +void frame_unit_to_pixel_size (struct frame *f, int char_width, int char_height, + int *pixel_width, int *pixel_height); void pixel_to_char_size (struct frame *f, int pixel_width, int pixel_height, int *char_width, int *char_height); void char_to_pixel_size (struct frame *f, int char_width, int char_height, int *pixel_width, int *pixel_height); void round_size_to_char (struct frame *f, int in_width, int in_height, int *out_width, int *out_height); -void pixel_to_real_char_size (struct frame *f, int pixel_width, int pixel_height, - int *char_width, int *char_height); -void char_to_real_pixel_size (struct frame *f, int char_width, int char_height, - int *pixel_width, int *pixel_height); -void round_size_to_real_char (struct frame *f, int in_width, int in_height, - int *out_width, int *out_height); void change_frame_size (struct frame *frame, int newlength, int newwidth, int delay); void adjust_frame_size (struct frame *frame); +void internal_set_frame_size (struct frame *f, int cols, int rows, + int pretend); void frame_size_slipped (Lisp_Object specifier, struct frame *f, Lisp_Object oldval); void select_frame_1 (Lisp_Object frame);
--- a/src/free-hook.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/free-hook.c Wed Feb 24 19:04:27 2010 -0600 @@ -141,8 +141,7 @@ #if !defined(__linux__) /* I originally wrote: "There's really no need to drop core." I have seen the error of my ways. -slb */ - if (strict_free_check) - ABORT (); + assert (!strict_free_check); #endif printf("Freeing unmalloc'ed memory at %p\n", ptr); __free_hook = check_free; @@ -155,8 +154,7 @@ /* This happens when you free twice */ #if !defined(__linux__) /* See above comment. */ - if (strict_free_check) - ABORT (); + assert (!strict_free_check); #endif printf("Freeing %p twice\n", ptr); __free_hook = check_free; @@ -448,7 +446,7 @@ note_block_input (char *file, int line) { note_block (file, line, block_type); - if (interrupt_input_blocked > 2) ABORT(); + assert (interrupt_input_blocked <= 2); } note_unblock_input (char* file, int line) @@ -488,13 +486,13 @@ if (type == ungcpro_type) { if (value == gcprolist) goto OK; - if (! gcprolist) ABORT (); + assert (gcprolist); if (value == gcprolist->next) goto OK; - if (! gcprolist->next) ABORT (); + assert (gcprolist->next); if (value == gcprolist->next->next) goto OK; - if (! gcprolist->next->next) ABORT (); + assert (gcprolist->next->next); if (value == gcprolist->next->next->next) goto OK; - if (! gcprolist->next->next->next) ABORT (); + assert (gcprolist->next->next->next); if (value == gcprolist->next->next->next->next) goto OK; ABORT (); OK:;
--- a/src/gc.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/gc.c Wed Feb 24 19:04:27 2010 -0600 @@ -184,7 +184,7 @@ gc_state.stat[GC_STAT_IN_THIS_GC] = 0; \ GC_STAT_RESUME (stat) -void +static void gc_stat_start_new_gc (void) { gc_state.n_gc[GC_STAT_TOTAL]++; @@ -201,7 +201,7 @@ GC_STAT_RESTART (freed); } -void +static void gc_stat_resume_gc (void) { gc_state.n_cycles[GC_STAT_TOTAL]++; @@ -1022,20 +1022,14 @@ on the kkcc_gc_stack. This function processes all elements on the stack according to their descriptions. */ static void -kkcc_marking ( -#ifdef NEW_GC - int cnt -#else /* not NEW_GC */ - int UNUSED(cnt) -#endif /* not NEW_GC */ - ) +kkcc_marking (int USED_IF_NEW_GC (cnt)) { kkcc_gc_stack_entry *stack_entry = 0; void *data = 0; const struct memory_description *desc = 0; int pos; #ifdef NEW_GC - int count = cnt; + int obj_count = cnt; #endif /* NEW_GC */ #ifdef DEBUG_XEMACS int level = 0; @@ -1182,7 +1176,7 @@ #ifdef NEW_GC if (cnt) - if (!--count) + if (!--obj_count) break; #endif /* NEW_GC */ } @@ -1894,7 +1888,7 @@ } -void +static void gc_1 (int incremental) { switch (GC_PHASE) @@ -1930,7 +1924,8 @@ } } -void gc (int incremental) +static void +gc (int incremental) { if (gc_currently_forbidden || in_display
--- a/src/gccache-gtk.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/gccache-gtk.c Wed Feb 24 19:04:27 2010 -0600 @@ -156,8 +156,8 @@ struct gc_cache_cell *cell, *next, *prev; struct gcv_and_mask gcvm; - if ((!!cache->head) != (!!cache->tail)) ABORT (); - if (cache->head && (cache->head->prev || cache->tail->next)) ABORT (); + assert ((!!cache->head) == (!!cache->tail)); + assert (!(cache->head && (cache->head->prev || cache->tail->next))); /* Gdk does not have the equivalent of 'None' for the clip_mask, so we need to check it carefully, or gdk_gc_new_with_values will @@ -212,10 +212,10 @@ cell->prev = cache->tail; cache->tail->next = cell; cache->tail = cell; - if (cache->head == cell) ABORT (); - if (cell->next) ABORT (); - if (cache->head->prev) ABORT (); - if (cache->tail->next) ABORT (); + assert (cache->head != cell); + assert (!cell->next); + assert (!cache->head->prev); + assert (!cache->tail->next); return cell->gc; }
--- a/src/gccache-x.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/gccache-x.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,7 @@ /* Efficient caching of X GCs (graphics contexts). Copyright (C) 1993 Free Software Foundation, Inc. Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. + Copyright (C) 2010 Ben Wing. This file is part of XEmacs. @@ -157,8 +158,8 @@ (void) describe_gc_cache (cache, DGCCFLAG_DISABLE); #endif - if ((!!cache->head) != (!!cache->tail)) ABORT (); - if (cache->head && (cache->head->prev || cache->tail->next)) ABORT (); + assert ((!!cache->head) == (!!cache->tail)); + assert (!(cache->head && (cache->head->prev || cache->tail->next))); gcvm.mask = mask; gcvm.gcv = *gcv; /* this copies... */ @@ -210,10 +211,10 @@ cell->prev = cache->tail; cache->tail->next = cell; cache->tail = cell; - if (cache->head == cell) ABORT (); - if (cell->next) ABORT (); - if (cache->head->prev) ABORT (); - if (cache->tail->next) ABORT (); + assert (cache->head != cell); + assert (!cell->next); + assert (!cache->head->prev); + assert (!cache->tail->next); return cell->gc; }
--- a/src/glyphs-gtk.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/glyphs-gtk.c Wed Feb 24 19:04:27 2010 -0600 @@ -2,7 +2,7 @@ Copyright (C) 1993, 1994 Free Software Foundation, Inc. Copyright (C) 1995 Board of Trustees, University of Illinois. Copyright (C) 1995 Tinker Systems - Copyright (C) 1995, 1996, 2001, 2002, 2004, 2005 Ben Wing + Copyright (C) 1995, 1996, 2001, 2002, 2004, 2005, 2010 Ben Wing Copyright (C) 1995 Sun Microsystems This file is part of XEmacs. @@ -819,8 +819,7 @@ GdkWindow *d; gint width, height, depth; - if (!DEVICE_GTK_P (device)) - ABORT (); + assert (DEVICE_GTK_P (device)); IMAGE_INSTANCE_DEVICE (ii) = device; IMAGE_INSTANCE_TYPE (ii) = IMAGE_COLOR_PIXMAP;
--- a/src/glyphs-msw.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/glyphs-msw.c Wed Feb 24 19:04:27 2010 -0600 @@ -2780,7 +2780,7 @@ pointer_bg, dest_mask, domain); /* We now have everything right apart from the height. */ - default_face_font_info (domain, 0, 0, &height, 0, 0); + default_face_font_info (domain, 0, 0, 0, &height, 0); GET_LIST_LENGTH (items, len); height = (height + DEFAULT_WIDGET_BORDER_WIDTH * 2 ) * len;
--- a/src/glyphs-widget.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/glyphs-widget.c Wed Feb 24 19:04:27 2010 -0600 @@ -811,7 +811,7 @@ if (tw) { int charwidth; - default_face_font_info (domain, 0, 0, 0, &charwidth, 0); + default_face_font_info (domain, 0, 0, &charwidth, 0, 0); pw = ROUND_UP (charwidth * tw + 4 * widget_instance_border_width (ii), charwidth); } @@ -827,7 +827,7 @@ } else { - default_face_font_info (domain, 0, 0, &charheight, 0, 0); + default_face_font_info (domain, 0, 0, 0, &charheight, 0); } ph = (charheight + 2 * widget_instance_border_width (ii)) * th; } @@ -949,7 +949,7 @@ { int len, h; /* #### widget face would be better here. */ - default_face_font_info (domain, 0, 0, &h, 0, 0); + default_face_font_info (domain, 0, 0, 0, &h, 0); GET_LIST_LENGTH (items, len); *height = len * h; } @@ -1659,7 +1659,7 @@ if (HAS_DEVMETH_P (DOMAIN_XDEVICE (domain), widget_border_width)) border_width = DEVMETH (DOMAIN_XDEVICE (domain), widget_border_width, ()); - default_face_font_info (domain, 0, 0, 0, &charwidth, 0); + default_face_font_info (domain, 0, 0, &charwidth, 0, 0); neww = ROUND_UP (charwidth * w + 4 * border_width + 2 * widget_spacing (domain), charwidth) / charwidth; @@ -1693,7 +1693,7 @@ h = XINT (height); - default_face_font_info (domain, 0, 0, &charheight, 0, 0); + default_face_font_info (domain, 0, 0, 0, &charheight, 0); newh = ROUND_UP (logical_unit_height (Fsymbol_name (Qwidget), Vwidget_face, domain) * h, charheight) / charheight;
--- a/src/glyphs-x.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/glyphs-x.c Wed Feb 24 19:04:27 2010 -0600 @@ -2,7 +2,7 @@ Copyright (C) 1993, 1994 Free Software Foundation, Inc. Copyright (C) 1995 Board of Trustees, University of Illinois. Copyright (C) 1995 Tinker Systems - Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005 Ben Wing + Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005, 2010 Ben Wing Copyright (C) 1995 Sun Microsystems Copyright (C) 1999, 2000, 2002 Andy Piper @@ -1335,8 +1335,7 @@ color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (XCDR (cons))); /* Duplicate the pixel value so that we still have a lock on it if the pixel we were passed is later freed. */ - if (! XAllocColor (dpy, cmap, &color)) - ABORT (); /* it must be allocable since we're just duplicating it */ + assert (XAllocColor (dpy, cmap, &color)); /* it must be allocable since we're just duplicating it */ symbols[i].name = LISP_STRING_TO_EXTERNAL_MALLOC (XCAR (cons), Qctext);
--- a/src/glyphs.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/glyphs.c Wed Feb 24 19:04:27 2010 -0600 @@ -4,7 +4,7 @@ Copyright (C) 1995, 1996, 2000, 2001, 2002, 2004, 2005 Ben Wing Copyright (C) 1995 Sun Microsystems Copyright (C) 1998, 1999, 2000 Andy Piper - Copyright (C) 2007 Didier Verna + Copyright (C) 2007, 2010 Didier Verna This file is part of XEmacs. @@ -2517,15 +2517,16 @@ /* pixmap file functions */ /************************************************************************/ -/* If INSTANTIATOR refers to inline data, return Qt. - If INSTANTIATOR refers to data in a file, return the full filename - if it exists, Qnil if there's no console method for locating the file, or - (filename) if there was an error locating the file. +/* - If INSTANTIATOR refers to inline data, or there is no file keyword, we + have nothing to do, so return Qt. + - If INSTANTIATOR refers to data in a file, return the full filename + if it exists; otherwise, return '(filename), meaning "file not found". + - If there is no locate_pixmap_file method for this console, return Qnil. FILE_KEYWORD and DATA_KEYWORD are symbols specifying the keywords used to look up the file and inline data, - respectively, in the instantiator. Normally these would - be Q_file and Q_data, but might be different for mask data. */ + respectively, in the instantiator. These would be Q_file and Q_data, + Q_mask_file or Q_mask_data. */ Lisp_Object potential_pixmap_file_instantiator (Lisp_Object instantiator, @@ -2732,18 +2733,20 @@ return Qnil; /* not reached */ } +/* This function attempts to find implicit mask files by appending "Mask" or + "msk" to the original bitmap file name. This is more or less standard: a + number of bitmaps in /usr/include/X11/bitmaps use it. */ Lisp_Object xbm_mask_file_munging (Lisp_Object alist, Lisp_Object file, Lisp_Object mask_file, Lisp_Object console_type) { - /* This is unclean but it's fairly standard -- a number of the - bitmaps in /usr/include/X11/bitmaps use it -- so we support - it. */ - if (EQ (mask_file, Qt) - /* don't override explicitly specified mask data. */ - && NILP (assq_no_quit (Q_mask_data, alist)) - && !EQ (file, Qt)) + /* Let's try to find an implicit mask file if we have neither an explicit + mask file name, nor inline mask data. Note that no errors are reported in + case of failure because the mask file we're looking for might not + exist. */ + if (EQ (mask_file, Qt) && NILP (assq_no_quit (Q_mask_data, alist))) { + assert (!EQ (file, Qt) && !EQ (file, Qnil)); mask_file = MAYBE_LISP_CONTYPE_METH (decode_console_type(console_type, ERROR_ME), locate_pixmap_file, (concat2 (file, build_ascstring ("Mask")))); @@ -2753,10 +2756,14 @@ locate_pixmap_file, (concat2 (file, build_ascstring ("msk")))); } + /* We got a mask file, either explicitely or from the search above. */ if (!NILP (mask_file)) { - Lisp_Object mask_data = - bitmap_to_lisp_data (mask_file, 0, 0, 0); + Lisp_Object mask_data; + + assert (!EQ (mask_file, Qt)); + + mask_data = bitmap_to_lisp_data (mask_file, 0, 0, 0); alist = remassq_no_quit (Q_mask_file, alist); /* there can't be a :mask-data at this point. */ alist = Fcons (Fcons (Q_mask_file, mask_file), @@ -2772,9 +2779,8 @@ xbm_normalize (Lisp_Object inst, Lisp_Object console_type, Lisp_Object UNUSED (dest_mask)) { - Lisp_Object file = Qnil, mask_file = Qnil; + Lisp_Object file = Qnil, mask_file = Qnil, alist = Qnil; struct gcpro gcpro1, gcpro2, gcpro3; - Lisp_Object alist = Qnil; GCPRO3 (file, mask_file, alist); @@ -2792,7 +2798,9 @@ mask_file = potential_pixmap_file_instantiator (inst, Q_mask_file, Q_mask_data, console_type); - if (NILP (file)) /* normalization impossible for the console type */ + /* No locate_pixmap_file method for this console type, so we can't get a + file (neither a mask file BTW). */ + if (NILP (file)) RETURN_UNGCPRO (Qnil); if (CONSP (file)) /* failure locating filename */ @@ -2800,6 +2808,11 @@ "no such file or directory", Fcar (file)); + if (CONSP (mask_file)) /* failure locating filename */ + signal_double_image_error ("Opening bitmap mask file", + "no such file or directory", + Fcar (mask_file)); + if (EQ (file, Qt) && EQ (mask_file, Qt)) /* no conversion necessary */ RETURN_UNGCPRO (inst); @@ -2859,10 +2872,8 @@ xface_normalize (Lisp_Object inst, Lisp_Object console_type, Lisp_Object UNUSED (dest_mask)) { - /* This function can call lisp */ - Lisp_Object file = Qnil, mask_file = Qnil; + Lisp_Object file = Qnil, mask_file = Qnil, alist = Qnil; struct gcpro gcpro1, gcpro2, gcpro3; - Lisp_Object alist = Qnil; GCPRO3 (file, mask_file, alist); @@ -2880,28 +2891,34 @@ mask_file = potential_pixmap_file_instantiator (inst, Q_mask_file, Q_mask_data, console_type); - if (NILP (file)) /* normalization impossible for the console type */ + /* No locate_pixmap_file method for this console type, so we can't get a + file (neither a mask file BTW). */ + if (NILP (file)) RETURN_UNGCPRO (Qnil); if (CONSP (file)) /* failure locating filename */ - signal_double_image_error ("Opening bitmap file", + signal_double_image_error ("Opening face file", "no such file or directory", Fcar (file)); + if (CONSP (mask_file)) /* failure locating filename */ + signal_double_image_error ("Opening face mask file", + "no such file or directory", + Fcar (mask_file)); + if (EQ (file, Qt) && EQ (mask_file, Qt)) /* no conversion necessary */ RETURN_UNGCPRO (inst); alist = tagged_vector_to_alist (inst); - { - /* #### FIXME: what if EQ (file, Qt) && !EQ (mask, Qt) ? Is that possible? - If so, we have a problem... -- dvl */ - Lisp_Object data = make_string_from_file (file); - alist = remassq_no_quit (Q_file, alist); - /* there can't be a :data at this point. */ - alist = Fcons (Fcons (Q_file, file), - Fcons (Fcons (Q_data, data), alist)); - } + if (!EQ (file, Qt)) + { + Lisp_Object data = make_string_from_file (file); + alist = remassq_no_quit (Q_file, alist); + /* there can't be a :data at this point. */ + alist = Fcons (Fcons (Q_file, file), + Fcons (Fcons (Q_data, data), alist)); + } alist = xbm_mask_file_munging (alist, file, mask_file, console_type);
--- a/src/gtk-xemacs.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/gtk-xemacs.c Wed Feb 24 19:04:27 2010 -0600 @@ -4,6 +4,7 @@ ** ** Created by: William M. Perry ** Copyright (c) 2000 William M. Perry <wmperry@gnu.org> +** Copyright (C) 2010 Ben Wing. ** ** This file is part of XEmacs. ** @@ -275,7 +276,7 @@ if (f) { - char_to_pixel_size (f, FRAME_WIDTH (f), FRAME_HEIGHT (f), + frame_unit_to_pixel_size (f, FRAME_WIDTH (f), FRAME_HEIGHT (f), &width, &height); requisition->width = width; requisition->height = height; @@ -344,11 +345,11 @@ f->pixwidth = allocation->width; f->pixheight = allocation->height; - pixel_to_char_size (f, + pixel_to_frame_unit_size (f, allocation->width, allocation->height, &columns, &rows); - change_frame_size (f, rows, columns, 1); + change_frame_size (f, columns, rows, 1); } }
--- a/src/gutter.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/gutter.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,5 +1,6 @@ /* Gutter implementation. Copyright (C) 1999, 2000 Andy Piper. + Copyright (C) 2010 Ben Wing. This file is part of XEmacs. @@ -450,7 +451,7 @@ /* If the number of display lines has shrunk, adjust. */ if (cdla_len > Dynarr_length (ddla)) { - Dynarr_set_length (cdla, Dynarr_length (ddla)); + Dynarr_set_lengthr (cdla, Dynarr_length (ddla)); } /* grab coordinates of last line and blank after it. */ @@ -589,9 +590,9 @@ if (FRAME_GUTTER_BOUNDS (f, pos) != f->current_gutter_bounds[pos]) { int width, height; - pixel_to_char_size (f, FRAME_PIXWIDTH (f), FRAME_PIXHEIGHT (f), + pixel_to_frame_unit_size (f, FRAME_PIXWIDTH (f), FRAME_PIXHEIGHT (f), &width, &height); - change_frame_size (f, height, width, 0); + change_frame_size (f, width, height, 0); MARK_FRAME_LAYOUT_CHANGED (f); }
--- a/src/indent.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/indent.c Wed Feb 24 19:04:27 2010 -0600 @@ -801,7 +801,7 @@ eobuf = BUF_ZV (XBUFFER (w->buffer)); bobuf = BUF_BEGV (XBUFFER (w->buffer)); - default_face_height_and_width (window, &defheight, NULL); + default_face_width_and_height (window, NULL, &defheight); /* guess num lines needed in line start cache + a few extra */ abspix = abs (pixels);
--- a/src/insdel.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/insdel.c Wed Feb 24 19:04:27 2010 -0600 @@ -2,7 +2,7 @@ Copyright (C) 1985, 1986, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. - Copyright (C) 2001, 2002, 2003, 2004 Ben Wing. + Copyright (C) 2001, 2002, 2003, 2004, 2010 Ben Wing. This file is part of XEmacs. @@ -420,8 +420,7 @@ static void move_gap (struct buffer *buf, Charbpos cpos, Bytebpos bpos) { - if (! BUF_BEG_ADDR (buf)) - ABORT (); + assert (BUF_BEG_ADDR (buf)); if (bpos < BYTE_BUF_GPT (buf)) gap_left (buf, cpos, bpos); else if (bpos > BYTE_BUF_GPT (buf))
--- a/src/keymap.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/keymap.c Wed Feb 24 19:04:27 2010 -0600 @@ -489,10 +489,10 @@ #define FROB(num) XEMACS_MOD_BUTTON##num | #include "keymap-buttons.h" 0); - if ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META | XEMACS_MOD_SUPER - | XEMACS_MOD_HYPER | XEMACS_MOD_ALT | XEMACS_MOD_SHIFT)) - != 0) - ABORT (); + assert ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META | + XEMACS_MOD_SUPER | XEMACS_MOD_HYPER | + XEMACS_MOD_ALT | XEMACS_MOD_SHIFT)) + == 0); k = XKEYMAP (keymap); @@ -566,8 +566,7 @@ Lisp_Object tail; Lisp_Object *prev; - if (UNBOUNDP (keys)) - ABORT (); + assert (!UNBOUNDP (keys)); for (prev = &new_keys, tail = new_keys; ; @@ -3129,11 +3128,9 @@ key.keysym = keysym; key.modifiers = modifiers; - if (NILP (cmd)) - ABORT (); + assert (!NILP (cmd)); cmd = get_keymap (cmd, 0, 1); - if (!KEYMAPP (cmd)) - ABORT (); + assert (KEYMAPP (cmd)); vec = make_vector (XVECTOR_LENGTH (thisseq) + 1, Qnil); len = XVECTOR_LENGTH (thisseq); @@ -3662,7 +3659,7 @@ /* OK, the key is for real */ if (target_buffer) { - if (!firstonly) ABORT (); + assert (firstonly); format_raw_keys (so_far, keys_count + 1, target_buffer); return make_int (1); }
--- a/src/lisp.h Wed Feb 24 01:58:04 2010 -0600 +++ b/src/lisp.h Wed Feb 24 19:04:27 2010 -0600 @@ -317,8 +317,8 @@ #ifdef ERROR_CHECK_STRUCTURES /* Check for problems with the catch list and specbind stack */ #define ERROR_CHECK_CATCH -/* Check for incoherent Dynarr structures, attempts to access Dynarr - positions out of range, reentrant use of Dynarrs through Dynarr locking, +/* Check for incoherent dynarr structures, attempts to access Dynarr + positions out of range, reentrant use of dynarrs through dynarr locking, etc. */ #define ERROR_CHECK_DYNARR /* Check for insufficient use of call_trapping_problems(), particularly @@ -1233,8 +1233,9 @@ #define abort_with_message(msg) assert_failed (__FILE__, __LINE__, msg) /* This used to be ((void) (0)) but that triggers lots of unused variable - warnings. It's pointless to force all that code to be rewritten, with - added ifdefs. Any reasonable compiler will eliminate an expression with + warnings -- furthermore, if `x' has any side effects, e.g. + assert (++depth <= 20);, we DEFINITELY want to execute the code inside of + `x'. Any reasonable compiler will eliminate an expression with no effects. We keep this abstracted out like this in case we want to change it in the future. */ #define disabled_assert(x) ((void) (x)) @@ -1455,7 +1456,7 @@ /* We put typedefs here so that prototype declarations don't choke. Note that we don't actually declare the structures here (except - maybe for simple structures like Dynarrs); that keeps them private + maybe for simple structures like dynarrs); that keeps them private to the routines that actually use them. */ /* ------------------------------- */ @@ -1721,7 +1722,7 @@ } /************************************************************************/ -/** Definitions of dynamic arrays (Dynarrs) and other allocators **/ +/** Definitions of dynamic arrays (dynarrs) and other allocators **/ /************************************************************************/ BEGIN_C_DECLS @@ -1747,7 +1748,7 @@ type *base; \ DECLARE_DYNARR_LISP_IMP () \ DECLARE_DYNARR_LOCKED () \ - int elsize; \ + int elsize_; \ int len_; \ int largest_; \ int max_ @@ -1775,10 +1776,81 @@ /************* Dynarr verification *************/ +/* Dynarr locking and verification. + + [I] VERIFICATION + + Verification routines simply return their basic argument, possibly + casted, but in the process perform some verification on it, aborting if + the verification fails. The verification routines take FILE and LINE + parameters, and use them to output the file and line of the caller + when an abort occurs, rather than the file and line of the inline + function, which is less than useful. + + There are three basic types of verification routines: + + (1) Verify the dynarr itself. This verifies the basic invariant + involving the length/size values: + + 0 <= Dynarr_length(d) <= Dynarr_largest(d) <= Dynarr_max(d) + + (2) Verify the dynarr itself prior to modifying it. This performs + the same verification as previously, but also checks that the + dynarr is not locked (see below). + + (3) Verify a dynarr position. Unfortunately we have to have + different verification routines depending on which kind of operation + is being performed: + + (a) For Dynarr_at(), we check that the POS is bounded by Dynarr_largest(), + i.e. 0 <= POS < Dynarr_largest(). + (b) For Dynarr_atp_allow_end(), we also have to allow + POS == Dynarr_largest(). + (c) For Dynarr_atp(), we behave largely like Dynarr_at() but make a + special exception when POS == 0 and Dynarr_largest() == 0 -- see + comment below. + (d) Some other routines contain the POS verification within their code, + and make the check 0 <= POS < Dynarr_length() or + 0 <= POS <= Dynarr_length(). + + #### It is not well worked-out whether and in what circumstances it's + allowed to use a position that is between Dynarr_length() and + Dynarr_largest(). The ideal solution is to never allow this, and require + instead that code first change the length before accessing higher + positions. That would require looking through all the code that accesses + dynarrs and fixing it appropriately (especially redisplay code, and + especially redisplay code in the vicinity of a reference to + Dynarr_largest(), since such code usually checks explicitly to see whether + there is extra stuff between Dynarr_length() and Dynarr_largest().) + + [II] LOCKING + + The idea behind dynarr locking is simple: Locking a dynarr prevents + any modification from occurring, or rather, leads to an abort upon + any attempt to modify a dynarr. + + Dynarr locking was originally added to catch some sporadic and hard-to- + debug crashes in the redisplay code where dynarrs appeared to be getting + corrupted in an unexpected fashion. The solution was to lock the + dynarrs that were getting corrupted (in this case, the display-line + dynarrs) around calls to routines that weren't supposed to be changing + these dynarrs but might somehow be calling code that modified them. + This eventually revealed that there was a reentrancy problem with + redisplay that involved the QUIT mechanism and the processing done in + order to determine whether C-g had been pressed -- this processing + involves retrieving, processing and queueing pending events to see + whether any of them result in a C-g keypress. However, at least under + MS Windows this can result in redisplay being called reentrantly. + For more info:-- + + (Info-goto-node "(internals)Critical Redisplay Sections") + +*/ + #ifdef ERROR_CHECK_DYNARR DECLARE_INLINE_HEADER ( int -Dynarr_verify_pos_at (void *d, int pos, const Ascbyte *file, int line) +Dynarr_verify_pos_at (void *d, Elemcount pos, const Ascbyte *file, int line) ) { Dynarr *dy = (Dynarr *) d; @@ -1790,7 +1862,7 @@ DECLARE_INLINE_HEADER ( int -Dynarr_verify_pos_atp (void *d, int pos, const Ascbyte *file, int line) +Dynarr_verify_pos_atp (void *d, Elemcount pos, const Ascbyte *file, int line) ) { Dynarr *dy = (Dynarr *) d; @@ -1830,7 +1902,7 @@ DECLARE_INLINE_HEADER ( int -Dynarr_verify_pos_atp_allow_end (void *d, int pos, const Ascbyte *file, +Dynarr_verify_pos_atp_allow_end (void *d, Elemcount pos, const Ascbyte *file, int line) ) { @@ -1873,21 +1945,33 @@ #define Dynarr_verify(d) Dynarr_verify_1 (d, __FILE__, __LINE__) #define Dynarr_verify_mod(d) Dynarr_verify_mod_1 (d, __FILE__, __LINE__) -#define Dynarr_lock(d) \ -do { \ - Dynarr *dy = Dynarr_verify_mod (d); \ - dy->locked = 1; \ -} while (0) -#define Dynarr_unlock(d) \ -do { \ - Dynarr *dy = Dynarr_verify (d); \ - dy->locked = 0; \ -} while (0) -#else + +DECLARE_INLINE_HEADER ( +void +Dynarr_lock (void *d) +) +{ + Dynarr *dy = Dynarr_verify_mod (d); + dy->locked = 1; +} + +DECLARE_INLINE_HEADER ( +void +Dynarr_unlock (void *d) +) +{ + Dynarr *dy = Dynarr_verify (d); + assert (dy->locked); + dy->locked = 0; +} + +#else /* not ERROR_CHECK_DYNARR */ + #define Dynarr_verify(d) ((Dynarr *) d) #define Dynarr_verify_mod(d) ((Dynarr *) d) #define Dynarr_lock(d) DO_NOTHING #define Dynarr_unlock(d) DO_NOTHING + #endif /* ERROR_CHECK_DYNARR */ /************* Dynarr creation *************/ @@ -1933,97 +2017,245 @@ /************* Dynarr length/size retrieval and setting *************/ -/* Retrieve the length of a Dynarr. The `+ 0' is to ensure that this cannot +/* Retrieve the length of a dynarr. The `+ 0' is to ensure that this cannot be used as an lvalue. */ #define Dynarr_length(d) (Dynarr_verify (d)->len_ + 0) -/* Retrieve the largest ever length seen of a Dynarr. The `+ 0' is to +/* Retrieve the largest ever length seen of a dynarr. The `+ 0' is to ensure that this cannot be used as an lvalue. */ #define Dynarr_largest(d) (Dynarr_verify (d)->largest_ + 0) /* Retrieve the number of elements that fit in the currently allocated space. The `+ 0' is to ensure that this cannot be used as an lvalue. */ #define Dynarr_max(d) (Dynarr_verify (d)->max_ + 0) -/* Retrieve the advertised memory usage of a Dynarr, i.e. the number of - bytes occupied by the elements in the Dynarr, not counting any overhead. */ -#define Dynarr_sizeof(d) (Dynarr_length (d) * (d)->elsize) -/* Actually set the length of a Dynarr. This is a low-level routine that - should not be directly used; use Dynarr_set_length() instead if you need - to, but be very careful when doing so! */ -#define Dynarr_set_length_1(d, n) \ -do { \ - Elemcount _dsl1_n = (n); \ - dynarr_checking_assert (_dsl1_n >= 0 && _dsl1_n <= Dynarr_max (d)); \ - (void) Dynarr_verify_mod (d); \ - (d)->len_ = _dsl1_n; \ - /* Use the raw field references here otherwise we get a crash because \ - we've set the length but not yet fixed up the largest value. */ \ - if ((d)->len_ > (d)->largest_) \ - (d)->largest_ = (d)->len_; \ - (void) Dynarr_verify_mod (d); \ -} while (0) - -/* The following two defines will get you into real trouble if you aren't - careful. But they can save a lot of execution time when used wisely. */ -#define Dynarr_set_length(d, n) \ -do { \ - Elemcount _dsl_n = (n); \ - dynarr_checking_assert (_dsl_n >= 0 && _dsl_n <= Dynarr_largest (d)); \ - Dynarr_set_length_1 (d, _dsl_n); \ -} while (0) -#define Dynarr_increment(d) \ - Dynarr_set_length (d, Dynarr_length (d) + 1) - -/* Reset the Dynarr's length to 0. */ -#define Dynarr_reset(d) Dynarr_set_length (d, 0) - -MODULE_API void Dynarr_resize (void *dy, Elemcount size); - -#define Dynarr_resize_if(d, numels) \ -do { \ - Elemcount _dri_numels = (numels); \ - if (Dynarr_length (d) + _dri_numels > Dynarr_max (d)) \ - Dynarr_resize (d, Dynarr_length (d) + _dri_numels); \ -} while (0) +/* Return the size in bytes of an element in a dynarr. */ +#define Dynarr_elsize(d) (Dynarr_verify (d)->elsize_ + 0) +/* Retrieve the advertised memory usage of a dynarr, i.e. the number of + bytes occupied by the elements in the dynarr, not counting any overhead. */ +#define Dynarr_sizeof(d) (Dynarr_length (d) * Dynarr_elsize (d)) + +/* Actually set the length of a dynarr. This is a low-level routine that + should not be directly used; use Dynarr_set_length() or + Dynarr_set_lengthr() instead. */ +DECLARE_INLINE_HEADER ( +void +Dynarr_set_length_1 (void *d, Elemcount len) +) +{ + Dynarr *dy = Dynarr_verify_mod (d); + dynarr_checking_assert (len >= 0 && len <= Dynarr_max (dy)); + /* Use the raw field references here otherwise we get a crash because + we've set the length but not yet fixed up the largest value. */ + dy->len_ = len; + if (dy->len_ > dy->largest_) + dy->largest_ = dy->len_; + (void) Dynarr_verify_mod (d); +} + +/* "Restricted set-length": Set the length of dynarr D to LEN, + which must be in the range [0, Dynarr_largest(d)]. */ + +DECLARE_INLINE_HEADER ( +void +Dynarr_set_lengthr (void *d, Elemcount len) +) +{ + Dynarr *dy = Dynarr_verify_mod (d); + dynarr_checking_assert (len >= 0 && len <= Dynarr_largest (dy)); + Dynarr_set_length_1 (dy, len); +} + +/* "Restricted increment": Increment the length of dynarr D by 1; the resulting + length must be in the range [0, Dynarr_largest(d)]. */ + +#define Dynarr_incrementr(d) Dynarr_set_lengthr (d, Dynarr_length (d) + 1) + + +MODULE_API void Dynarr_resize (void *d, Elemcount size); + +DECLARE_INLINE_HEADER ( +void +Dynarr_resize_to_fit (void *d, Elemcount size) +) +{ + Dynarr *dy = Dynarr_verify_mod (d); + if (size > Dynarr_max (dy)) + Dynarr_resize (dy, size); +} + +#define Dynarr_resize_to_add(d, numels) \ + Dynarr_resize_to_fit (d, Dynarr_length (d) + numels) + +/* This is an optimization. This is like Dynarr_set_length() but the length + is guaranteed to be at least as big as the existing length. */ + +DECLARE_INLINE_HEADER ( +void +Dynarr_increase_length (void *d, Elemcount len) +) +{ + Dynarr *dy = Dynarr_verify_mod (d); + dynarr_checking_assert (len >= Dynarr_length (dy)); + Dynarr_resize_to_fit (dy, len); + Dynarr_set_length_1 (dy, len); +} + +/* Set the length of dynarr D to LEN. If the length increases, resize as + necessary to fit. (NOTE: This will leave uninitialized memory. If you + aren't planning on immediately overwriting the memory, use + Dynarr_set_length_and_zero() to zero out all the memory that would + otherwise be uninitialized.) */ + +DECLARE_INLINE_HEADER ( +void +Dynarr_set_length (void *d, Elemcount len) +) +{ + Dynarr *dy = Dynarr_verify_mod (d); + Elemcount old_len = Dynarr_length (dy); + if (old_len >= len) + Dynarr_set_lengthr (dy, len); + else + Dynarr_increase_length (d, len); +} + +#define Dynarr_increment(d) Dynarr_increase_length (d, Dynarr_length (d) + 1) + +/* Zero LEN contiguous elements starting at POS. */ + +DECLARE_INLINE_HEADER ( +void +Dynarr_zero_many (void *d, Elemcount pos, Elemcount len) +) +{ + Dynarr *dy = Dynarr_verify_mod (d); + memset ((Rawbyte *) dy->base + pos*Dynarr_elsize (dy), 0, + len*Dynarr_elsize (dy)); +} + +/* This is an optimization. This is like Dynarr_set_length_and_zero() but + the length is guaranteed to be at least as big as the existing + length. */ + +DECLARE_INLINE_HEADER ( +void +Dynarr_increase_length_and_zero (void *d, Elemcount len) +) +{ + Dynarr *dy = Dynarr_verify_mod (d); + Elemcount old_len = Dynarr_length (dy); + Dynarr_increase_length (dy, len); + Dynarr_zero_many (dy, old_len, len - old_len); +} + +/* Set the length of dynarr D to LEN. If the length increases, resize as + necessary to fit and zero out all the elements between the old and new + lengths. */ + +DECLARE_INLINE_HEADER ( +void +Dynarr_set_length_and_zero (void *d, Elemcount len) +) +{ + Dynarr *dy = Dynarr_verify_mod (d); + Elemcount old_len = Dynarr_length (dy); + if (old_len >= len) + Dynarr_set_lengthr (dy, len); + else + Dynarr_increase_length_and_zero (d, len); +} + +/* Reset the dynarr's length to 0. */ +#define Dynarr_reset(d) Dynarr_set_lengthr (d, 0) #ifdef MEMORY_USAGE_STATS struct overhead_stats; Bytecount Dynarr_memory_usage (void *d, struct overhead_stats *stats); #endif -/************* Adding/deleting elements to/from a Dynarr *************/ +/************* Adding/deleting elements to/from a dynarr *************/ + +/* Set the Lisp implementation of the element at POS in dynarr D. Only + does this if the dynarr holds Lisp objects of a particular type (the + objects themselves, not pointers to them), and only under NEW_GC. */ #ifdef NEW_GC -#define Dynarr_add(d, el) \ +#define DYNARR_SET_LISP_IMP(d, pos) \ do { \ - const struct lrecord_implementation *imp = (d)->lisp_imp; \ - (void) Dynarr_verify_mod (d); \ - Dynarr_resize_if (d, 1); \ - ((d)->base)[Dynarr_length (d)] = (el); \ - if (imp) \ + if ((d)->lisp_imp) \ set_lheader_implementation \ - ((struct lrecord_header *)&(((d)->base)[Dynarr_length (d)]), imp); \ - Dynarr_set_length_1 (d, Dynarr_length (d) + 1); \ - (void) Dynarr_verify_mod (d); \ + ((struct lrecord_header *)&(((d)->base)[pos]), (d)->lisp_imp); \ +} while (0) +#else +#define DYNARR_SET_LISP_IMP(d, pos) DO_NOTHING +#endif /* (not) NEW_GC */ + +/* Add Element EL to the end of dynarr D. */ + +#define Dynarr_add(d, el) \ +do { \ + Elemcount _da_pos = Dynarr_length (d); \ + (void) Dynarr_verify_mod (d); \ + Dynarr_increment (d); \ + ((d)->base)[_da_pos] = (el); \ + DYNARR_SET_LISP_IMP (d, _da_pos); \ } while (0) -#else /* not NEW_GC */ -#define Dynarr_add(d, el) \ + +/* Set EL as the element at position POS in dynarr D. + Expand the dynarr as necessary so that its length is enough to include + position POS within it, and zero out any new elements created as a + result of expansion, other than the one at POS. */ + +#define Dynarr_set(d, pos, el) \ do { \ + Elemcount _ds_pos = (pos); \ (void) Dynarr_verify_mod (d); \ - Dynarr_resize_if (d, 1); \ - ((d)->base)[Dynarr_length (d)] = (el); \ - Dynarr_set_length_1 (d, Dynarr_length (d) + 1); \ - (void) Dynarr_verify_mod (d); \ + if (Dynarr_length (d) < _ds_pos + 1) \ + Dynarr_increase_length_and_zero (d, _ds_pos + 1); \ + ((d)->base)[_ds_pos] = (el); \ + DYNARR_SET_LISP_IMP (d, _ds_pos); \ } while (0) -#endif /* not NEW_GC */ - - -MODULE_API void Dynarr_insert_many (void *d, const void *el, int len, - int start); -MODULE_API void Dynarr_delete_many (void *d, int start, int len); - -#define Dynarr_insert_many_at_start(d, el, len) \ - Dynarr_insert_many (d, el, len, 0) + +/* Add LEN contiguous elements, stored at BASE, to dynarr D. If BASE is + NULL, reserve space but don't store anything. */ + +DECLARE_INLINE_HEADER ( +void +Dynarr_add_many (void *d, const void *base, Elemcount len) +) +{ + /* This duplicates Dynarr_insert_many to some extent; but since it is + called so often, it seemed useful to remove the unnecessary stuff + from that function and to make it inline */ + Dynarr *dy = Dynarr_verify_mod (d); + Elemcount pos = Dynarr_length (dy); + Dynarr_increase_length (dy, Dynarr_length (dy) + len); + if (base) + memcpy ((Rawbyte *) dy->base + pos*Dynarr_elsize (dy), base, + len*Dynarr_elsize (dy)); +} + +/* Insert LEN elements, currently pointed to by BASE, into dynarr D + starting at position POS. */ + +MODULE_API void Dynarr_insert_many (void *d, const void *base, Elemcount len, + Elemcount pos); + +/* Prepend LEN elements, currently pointed to by BASE, to the beginning. */ + +#define Dynarr_prepend_many(d, base, len) Dynarr_insert_many (d, base, len, 0) + +/* Add literal string S to dynarr D, which should hold chars or unsigned + chars. The final zero byte is not stored. */ + #define Dynarr_add_literal_string(d, s) Dynarr_add_many (d, s, sizeof (s) - 1) -#define Dynarr_add_lisp_string(d, s, codesys) \ + +/* Convert Lisp string S to an external encoding according to CODESYS and + add to dynarr D, which should hold chars or unsigned chars. No final + zero byte is appended. */ + +/* #### This should be an inline function but LISP_STRING_TO_SIZED_EXTERNAL + isn't declared yet. */ + +#define Dynarr_add_ext_lisp_string(d, s, codesys) \ do { \ Lisp_Object dyna_ls_s = (s); \ Lisp_Object dyna_ls_cs = (codesys); \ @@ -2035,34 +2267,28 @@ Dynarr_add_many (d, dyna_ls_eb, dyna_ls_bc); \ } while (0) -/* Add LEN contiguous elements to a Dynarr */ - -DECLARE_INLINE_HEADER ( -void -Dynarr_add_many (void *d, const void *el, int len) -) -{ - /* This duplicates Dynarr_insert_many to some extent; but since it is - called so often, it seemed useful to remove the unnecessary stuff - from that function and to make it inline */ - Dynarr *dy = Dynarr_verify_mod (d); - Dynarr_resize_if (dy, len); - /* Some functions call us with a value of 0 to mean "reserve space but - don't write into it" */ - if (el) - memcpy ((char *) dy->base + Dynarr_sizeof (dy), el, len*dy->elsize); - Dynarr_set_length_1 (dy, Dynarr_length (dy) + len); - (void) Dynarr_verify_mod (dy); -} +/* Delete LEN elements starting at position POS. */ + +MODULE_API void Dynarr_delete_many (void *d, Elemcount pos, Elemcount len); + +/* Pop off (i.e. delete) the last element from the dynarr and return it */ #define Dynarr_pop(d) \ (dynarr_checking_assert (Dynarr_length (d) > 0), \ Dynarr_verify_mod (d)->len_--, \ Dynarr_at (d, Dynarr_length (d))) -#define Dynarr_delete(d, i) Dynarr_delete_many (d, i, 1) + +/* Delete the item at POS */ + +#define Dynarr_delete(d, pos) Dynarr_delete_many (d, pos, 1) + +/* Delete the item located at memory address P, which must be a `type *' + pointer, where `type' is the type of the elements of the dynarr. */ #define Dynarr_delete_by_pointer(d, p) \ Dynarr_delete_many (d, (p) - ((d)->base), 1) +/* Delete all elements that are numerically equal to EL. */ + #define Dynarr_delete_object(d, el) \ do \ { \ @@ -3178,7 +3404,7 @@ #define CONCHECK_MARKER(x) CONCHECK_RECORD (x, marker) /* The second check was looking for GCed markers still in use */ -/* if (INTP (XMARKER (x)->lheader.next.v)) ABORT (); */ +/* assert (!INTP (XMARKER (x)->lheader.next.v)); */ #define marker_next(m) ((m)->next) #define marker_prev(m) ((m)->prev) @@ -3200,11 +3426,11 @@ return XREALINT (obj); } -#else /* no error checking */ +#else /* not ERROR_CHECK_TYPES */ #define XINT(obj) XREALINT (obj) -#endif /* no error checking */ +#endif /* (not) ERROR_CHECK_TYPES */ #define CHECK_INT(x) do { \ if (!INTP (x)) \ @@ -3216,6 +3442,10 @@ x = wrong_type_argument (Qintegerp, x); \ } while (0) +/* NOTE NOTE NOTE! This definition of "natural number" is mathematically + wrong. Mathematically, a natural number is a positive integer; 0 + isn't included. This would be better called NONNEGINT(). */ + #define NATNUMP(x) (INTP (x) && XINT (x) >= 0) #define CHECK_NATNUM(x) do { \
--- a/src/lrecord.h Wed Feb 24 01:58:04 2010 -0600 +++ b/src/lrecord.h Wed Feb 24 19:04:27 2010 -0600 @@ -538,6 +538,16 @@ #else /* not NEW_GC */ +enum lrecord_alloc_status +{ + ALLOC_IN_USE, + ALLOC_FREE, + ALLOC_ON_FREE_LIST +}; + +void tick_lrecord_stats (const struct lrecord_header *h, + enum lrecord_alloc_status status); + #define LRECORD_FREE_P(ptr) \ (((struct lrecord_header *) ptr)->type == lrecord_type_free)
--- a/src/lstream.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/lstream.c Wed Feb 24 19:04:27 2010 -0600 @@ -1654,8 +1654,7 @@ int reading = !strcmp (mode, "r"); /* Make sure the luser didn't pass "w" in. */ - if (!strcmp (mode, "w")) - ABORT (); + assert (strcmp (mode, "w")); if (flags & LSTR_IGNORE_ACCESSIBLE) {
--- a/src/macros.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/macros.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,5 +1,6 @@ /* Keyboard macros. Copyright (C) 1985, 1986, 1992, 1993, 1994 Free Software Foundation, Inc. + Copyright (C) 2010 Ben Wing. This file is part of XEmacs. @@ -181,7 +182,7 @@ void pop_kbd_macro_event (Lisp_Object event) { - if (NILP (Vexecuting_macro)) ABORT (); + assert (!NILP (Vexecuting_macro)); if (STRINGP (Vexecuting_macro) || VECTORP (Vexecuting_macro)) {
--- a/src/make-src-depend Wed Feb 24 01:58:04 2010 -0600 +++ b/src/make-src-depend Wed Feb 24 19:04:27 2010 -0600 @@ -3,6 +3,7 @@ ### make-src-depend --- update the Makefile dependency information for XEmacs # Copyright (C) 1998 Free Software Foundation, Inc. +# Copyright (C) 2010 Ben Wing. ## Author: Martin Buchholz <martin@xemacs.org> ## Maintainer: XEmacs Development Team @@ -114,16 +115,16 @@ sub PrintDeps { my $file = shift; my $ofile = $file; $ofile =~ s/c$/o/; print "$ofile: "; - if (exists $uses{$file}{'lisp.h'}) { - delete $uses{$file}{@LISP_H}; - $uses{$file}{'$(LISP_H)'} = 1; - } - # Note: If both config.h and lisp.h are dependencies, config.h got deleted - # by the last clause. if (exists $uses{$file}{'config.h'}) { delete $uses{$file}{'config.h'}; $uses{$file}{'$(CONFIG_H)'} = 1; } + if (exists $uses{$file}{'lisp.h'}) { + for my $x (@LISP_H) { + delete $uses{$file}{$x}; + } + $uses{$file}{'$(LISP_H)'} = 1; + } # Huge hack. With QUICK_BUILD, general.c has no dependence on # general-slots.h but really should. $uses{$file}{'general-slots.h'} = 1 if $file eq "general.c";
--- a/src/mc-alloc.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/mc-alloc.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,5 +1,6 @@ /* New size-based allocator for XEmacs. Copyright (C) 2005 Marcus Crestani. + Copyright (C) 2010 Ben Wing. This file is part of XEmacs. @@ -1272,7 +1273,7 @@ { page_list_header *plh = PH_PLH (ph); - if (gc_in_progress && PH_PROTECTION_BIT (ph)) ABORT(); + assert (!(gc_in_progress && PH_PROTECTION_BIT (ph))); /* cleanup: remove memory protection, zero page_header bits. */ #ifdef MEMORY_USAGE_STATS @@ -1578,7 +1579,7 @@ /* Changes the size of the cell pointed to by ptr. Returns the new address of the new cell with new size. */ -void * +static void * mc_realloc_1 (void *ptr, size_t size, int elemcount) { if (ptr) @@ -1781,26 +1782,28 @@ /*--- incremental garbage collector ----------------------------------*/ +#if 0 /* currently unused */ + /* access dirty bit of page header */ -void +static void set_dirty_bit (page_header *ph, unsigned int value) { PH_DIRTY_BIT (ph) = value; } -void +static void set_dirty_bit_for_address (void *ptr, unsigned int value) { set_dirty_bit (get_page_header (ptr), value); } -unsigned int +static unsigned int get_dirty_bit (page_header *ph) { return PH_DIRTY_BIT (ph); } -unsigned int +static unsigned int get_dirty_bit_for_address (void *ptr) { return get_dirty_bit (get_page_header (ptr)); @@ -1808,25 +1811,25 @@ /* access protection bit of page header */ -void +static void set_protection_bit (page_header *ph, unsigned int value) { PH_PROTECTION_BIT (ph) = value; } -void +static void set_protection_bit_for_address (void *ptr, unsigned int value) { set_protection_bit (get_page_header (ptr), value); } -unsigned int +static unsigned int get_protection_bit (page_header *ph) { return PH_PROTECTION_BIT (ph); } -unsigned int +static unsigned int get_protection_bit_for_address (void *ptr) { return get_protection_bit (get_page_header (ptr)); @@ -1834,12 +1837,14 @@ /* Returns the start of the page of the object pointed to by ptr. */ -void * +static void * get_page_start (void *ptr) { return PH_HEAP_SPACE (get_page_header (ptr)); } +#endif /* 0 */ + /* Make PAGE_SIZE globally available. */ EMACS_INT mc_get_page_size ()
--- a/src/menubar-x.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/menubar-x.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* Implements an elisp-programmable menubar -- X interface. Copyright (C) 1993, 1994 Free Software Foundation, Inc. Copyright (C) 1995 Tinker Systems and INS Engineering Corp. - Copyright (C) 2000, 2001, 2002, 2003 Ben Wing. + Copyright (C) 2000, 2001, 2002, 2003, 2010 Ben Wing. This file is part of XEmacs. @@ -575,8 +575,7 @@ menubar_visible = !NILP (w->menubar_visible_p); data = compute_menubar_data (f, menubar, deep_p); - if (!data || (!data->next && !data->contents)) - ABORT (); + assert (data && (data->next || data->contents)); if (!FRAME_X_MENUBAR_ID (f)) FRAME_X_MENUBAR_ID (f) = new_lwlib_id ();
--- a/src/objects-tty.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/objects-tty.c Wed Feb 24 19:04:27 2010 -0600 @@ -30,12 +30,6 @@ #include "device.h" #include "charset.h" -#ifdef NEW_GC -# define UNUSED_IF_NEW_GC(decl) UNUSED (decl) -#else -# define UNUSED_IF_NEW_GC(decl) decl -#endif - /* An alist mapping from color names to a cons of (FG-STRING, BG-STRING). */ Lisp_Object Vtty_color_alist; #if 0 /* This stuff doesn't quite work yet */
--- a/src/profile.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/profile.c Wed Feb 24 19:04:27 2010 -0600 @@ -125,7 +125,7 @@ { /* The hash code can safely be called from a signal handler except when it has to grow the hash table. In this case, it calls realloc(), - which is not (in general) re-entrant. The way we deal with this is + which is not (in general) reentrant. The way we deal with this is documented at the top of this file. */ if (!big_profile_table) big_profile_table = make_hash_table (2000);
--- a/src/ralloc.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/ralloc.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,5 +1,6 @@ /* Block-relocating memory allocator. Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. + Copyright (C) 2010 Ben Wing. This file is part of XEmacs. @@ -257,8 +258,7 @@ break; } - if (! heap) - ABORT (); + assert (heap); /* If we can't fit SIZE bytes in that heap, try successive later heaps. */ @@ -362,9 +362,8 @@ if ((char *)last_heap->end - (char *)last_heap->bloc_start <= excess) { /* This heap should have no blocs in it. */ - if (last_heap->first_bloc != NIL_BLOC - || last_heap->last_bloc != NIL_BLOC) - ABORT (); + assert (last_heap->first_bloc == NIL_BLOC && + last_heap->last_bloc == NIL_BLOC); /* Return the last heap, with its header, to the system. */ excess = (char *)last_heap->end - (char *)last_heap->start; @@ -481,8 +480,7 @@ register bloc_ptr b = bloc; /* No need to ever call this if arena is frozen, bug somewhere! */ - if (r_alloc_freeze_level) - ABORT(); + assert (!r_alloc_freeze_level); while (b) { @@ -636,8 +634,7 @@ size_t old_size; /* No need to ever call this if arena is frozen, bug somewhere! */ - if (r_alloc_freeze_level) - ABORT(); + assert (!r_alloc_freeze_level); if (bloc == NIL_BLOC || size == bloc->size) return 1; @@ -648,8 +645,7 @@ break; } - if (heap == NIL_HEAP) - ABORT (); + assert (heap != NIL_HEAP); old_size = bloc->size; bloc->size = size; @@ -979,8 +975,7 @@ init_ralloc (); dead_bloc = find_bloc (ptr); - if (dead_bloc == NIL_BLOC) - ABORT (); + assert (dead_bloc != NIL_BLOC); free_bloc (dead_bloc); *ptr = 0; @@ -1026,8 +1021,7 @@ } bloc = find_bloc (ptr); - if (bloc == NIL_BLOC) - ABORT (); + assert (bloc != NIL_BLOC); if (size < bloc->size) { @@ -1096,8 +1090,7 @@ if (! r_alloc_initialized) init_ralloc (); - if (--r_alloc_freeze_level < 0) - ABORT (); + assert (--r_alloc_freeze_level >= 0); /* This frees all unused blocs. It is not too inefficient, as the resize and memmove is done only once. Afterwards, all unreferenced blocs are @@ -1140,8 +1133,7 @@ first_heap->next = first_heap->prev = NIL_HEAP; first_heap->start = first_heap->bloc_start = virtual_break_value = break_value = (*real_morecore) (0); - if (break_value == NIL) - ABORT (); + assert (break_value != NIL); page_size = PAGE; extra_bytes = ROUNDUP (50000); @@ -1817,13 +1809,13 @@ { if (p->addr == addr) { - if (p->sz != sz) ABORT(); /* ACK! Shouldn't happen at all. */ + assert (p->sz == sz); /* ACK! Shouldn't happen at all. */ munmap( (VM_ADDR) p->addr, p->sz ); p->flag = empty; break; } } - if (!p) ABORT(); /* Can't happen... we've got a block to free which is not in + assert (p); /* Can't happen... we've got a block to free which is not in the address list. */ Coalesce_Addr_Blocks(); }
--- a/src/redisplay-msw.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/redisplay-msw.c Wed Feb 24 19:04:27 2010 -0600 @@ -2,7 +2,7 @@ Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. Copyright (C) 1994 Lucid, Inc. Copyright (C) 1995 Sun Microsystems, Inc. - Copyright (C) 2001, 2002, 2003 Ben Wing. + Copyright (C) 2001, 2002, 2003, 2010 Ben Wing. This file is part of XEmacs. @@ -1208,12 +1208,7 @@ given face. ****************************************************************************/ static void -mswindows_clear_region ( -#ifdef HAVE_SCROLLBARS - Lisp_Object locale, -#else - Lisp_Object UNUSED (locale), -#endif +mswindows_clear_region (Lisp_Object USED_IF_SCROLLBARS (locale), struct device *UNUSED (d), struct frame *f, face_index UNUSED (findex), int x, int y, int width, int height, Lisp_Object fcolor,
--- a/src/redisplay-output.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/redisplay-output.c Wed Feb 24 19:04:27 2010 -0600 @@ -83,7 +83,7 @@ redisplay performance so avoiding all excess overhead is a good thing. Is all of this true? */ memcpy (cra->base, dra->base, sizeof (struct rune) * max_move); - Dynarr_set_length (cra, max_move); + Dynarr_set_lengthr (cra, max_move); } else Dynarr_reset (cra); @@ -171,7 +171,7 @@ tr = cdb->runes; memcpy (cdb, ddb, sizeof (struct display_block)); cdb->runes = tr; - Dynarr_increment (clp->display_blocks); + Dynarr_incrementr (clp->display_blocks); } sync_rune_structs (w, cdb->runes, ddb->runes); @@ -183,7 +183,7 @@ else if (line >= Dynarr_length (cdla)) { assert (line == Dynarr_length (cdla)); - Dynarr_increment (cdla); + Dynarr_incrementr (cdla); } } @@ -475,7 +475,7 @@ rb = Dynarr_atp (db->runes, cursor_location); *cursor_start = rb->xpos; - default_face_height_and_width (window, &defheight, &defwidth); + default_face_width_and_height (window, &defwidth, &defheight); *cursor_height = defheight; if (rb->type == RUNE_BLANK) @@ -638,7 +638,7 @@ redisplay_clear_region (window, DEFAULT_INDEX, FRAME_LEFT_BORDER_START (f), y, - FRAME_BORDER_WIDTH (f), height); + FRAME_INTERNAL_BORDER_WIDTH (f), height); } /***************************************************************************** @@ -654,7 +654,7 @@ redisplay_clear_region (window, DEFAULT_INDEX, FRAME_RIGHT_BORDER_START (f), - y, FRAME_BORDER_WIDTH (f), height); + y, FRAME_INTERNAL_BORDER_WIDTH (f), height); } /***************************************************************************** @@ -2102,14 +2102,14 @@ if (window_is_leftmost (w)) { - x -= FRAME_BORDER_WIDTH (f); - width += FRAME_BORDER_WIDTH (f); + x -= FRAME_INTERNAL_BORDER_WIDTH (f); + width += FRAME_INTERNAL_BORDER_WIDTH (f); } if (window_is_rightmost (w)) - width += FRAME_BORDER_WIDTH (f); + width += FRAME_INTERNAL_BORDER_WIDTH (f); y = FRAME_TOP_BORDER_START (f) - 1; - height = FRAME_BORDER_HEIGHT (f) + 1; + height = FRAME_INTERNAL_BORDER_HEIGHT (f) + 1; redisplay_clear_region (window, DEFAULT_INDEX, x, y, width, height); } @@ -2145,7 +2145,7 @@ if (window_is_leftmost (w)) redisplay_clear_region (window, DEFAULT_INDEX, FRAME_LEFT_BORDER_START (f), - ypos1, FRAME_BORDER_WIDTH (f), height); + ypos1, FRAME_INTERNAL_BORDER_WIDTH (f), height); if (bounds.left_in - bounds.left_out > 0) redisplay_clear_region (window, @@ -2167,7 +2167,7 @@ if (window_is_rightmost (w)) redisplay_clear_region (window, DEFAULT_INDEX, FRAME_RIGHT_BORDER_START (f), - ypos1, FRAME_BORDER_WIDTH (f), height); + ypos1, FRAME_INTERNAL_BORDER_WIDTH (f), height); } } } @@ -2217,7 +2217,7 @@ /* #### See if this can be made conditional on the frame changing size. */ if (MINI_WINDOW_P (w)) - ypos2 += FRAME_BORDER_HEIGHT (f); + ypos2 += FRAME_INTERNAL_BORDER_HEIGHT (f); if (min_start >= 0 && ypos1 < min_start) ypos1 = min_start; @@ -2464,7 +2464,7 @@ /* If the number of display lines has shrunk, adjust. */ if (cdla_len > ddla_len) { - Dynarr_set_length (cdla, ddla_len); + Dynarr_set_lengthr (cdla, ddla_len); } /* Output a vertical divider between windows, if necessary. */
--- a/src/redisplay-xlike-inc.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/redisplay-xlike-inc.c Wed Feb 24 19:04:27 2010 -0600 @@ -2056,7 +2056,7 @@ gc = XLIKE_get_gc (d, Qnil, cursor_cachel->background, Qnil, Qnil, Qnil); - default_face_font_info (window, &defascent, 0, &defheight, 0, 0); + default_face_font_info (window, &defascent, 0, 0, &defheight, 0); /* make sure the cursor is entirely contained between y and y+height */ cursor_height = min (defheight, height); @@ -2188,7 +2188,7 @@ gcv.graphics_exposures = XLIKE_FALSE; gc = gc_cache_lookup (DEVICE_XLIKE_GC_CACHE (XDEVICE (f->device)), &gcv, XLIKE_GC_FOREGROUND | XLIKE_GC_FUNCTION | XLIKE_GC_EXPOSURES); - default_face_height_and_width (frame, &flash_height, 0); + default_face_width_and_height (frame, 0, &flash_height); /* If window is tall, flash top and bottom line. */ if (EQ (Vvisible_bell, Qtop_bottom) && w->pixel_height > 3 * flash_height)
--- a/src/redisplay.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/redisplay.c Wed Feb 24 19:04:27 2010 -0600 @@ -728,7 +728,7 @@ struct display_block *dbp = Dynarr_atp (dl->display_blocks, elt); /* "add" the block to the list */ - Dynarr_increment (dl->display_blocks); + Dynarr_incrementr (dl->display_blocks); /* initialize and return */ dbp->type = type; @@ -924,8 +924,8 @@ int scaled_default_font_ascent, scaled_default_font_descent; default_face_font_info (data->window, &default_font_ascent, - &default_font_descent, &default_font_height, - 0, 0); + &default_font_descent, 0, &default_font_height, + 0); scaled_default_font_ascent = data->max_pixmap_height * default_font_ascent / default_font_height; @@ -1221,7 +1221,7 @@ if (local) Dynarr_add (data->db->runes, *crb); else - Dynarr_increment (data->db->runes); + Dynarr_incrementr (data->db->runes); data->pixpos += width; @@ -4532,7 +4532,7 @@ if (Dynarr_length (dla) == 0) { if (Dynarr_largest (dla) > 0) - Dynarr_increment (dla); + Dynarr_incrementr (dla); else { struct display_line modeline; @@ -5301,9 +5301,10 @@ /* -Info on Re-entrancy crashes, with backtraces given: - - (Info-goto-node "(internals)Nasty Bugs due to Reentrancy in Redisplay Structures handling QUIT") +Info on reentrancy crashes, with backtraces given: + + (Info-goto-node "(internals)Critical Redisplay Sections") + */ @@ -5405,7 +5406,7 @@ if (pos_of_dlp < 0) Dynarr_add (dla, *dlp); else if (pos_of_dlp == Dynarr_length (dla)) - Dynarr_increment (dla); + Dynarr_incrementr (dla); else ABORT (); @@ -5459,13 +5460,13 @@ if (!in_display) depth = enter_redisplay_critical_section (); - /* This is one spot where a re-entrancy crash will occur, due to a check + /* This is one spot where a reentrancy crash will occur, due to a check in the dynarr to make sure it isn't "locked" */ /* -Info on Re-entrancy crashes, with backtraces given: - - (Info-goto-node "(internals)Nasty Bugs due to Reentrancy in Redisplay Structures handling QUIT") +Info on reentrancy crashes, with backtraces given: + + (Info-goto-node "(internals)Critical Redisplay Sections") */ Dynarr_reset (dla); @@ -5628,7 +5629,7 @@ if (pos_of_dlp < 0) Dynarr_add (dla, *dlp); else if (pos_of_dlp == Dynarr_length (dla)) - Dynarr_increment (dla); + Dynarr_incrementr (dla); else ABORT (); @@ -6764,7 +6765,7 @@ { struct frame *f = XFRAME (XCAR (frmcons)); if (f->size_change_pending) - change_frame_size (f, f->new_height, f->new_width, 0); + change_frame_size (f, f->new_width, f->new_height, 0); } } return Qnil; @@ -6901,7 +6902,7 @@ /* Before we put a hold on frame size changes, attempt to process any which are already pending. */ if (f->size_change_pending) - change_frame_size (f, f->new_height, f->new_width, 0); + change_frame_size (f, f->new_width, f->new_height, 0); /* If frame size might need to be changed, due to changed size of toolbars, scrollbars etc, change it now */ @@ -8316,7 +8317,7 @@ int defheight; window = wrap_window (w); - default_face_height_and_width (window, &defheight, 0); + default_face_width_and_height (window, 0, &defheight); cur_elt = Dynarr_length (w->line_start_cache) - 1; @@ -8469,7 +8470,7 @@ return; } - Dynarr_insert_many_at_start (cache, Dynarr_begin (internal_cache), + Dynarr_prepend_many (cache, Dynarr_begin (internal_cache), ic_elt + 1); } @@ -8621,7 +8622,7 @@ int defheight, defwidth; window = wrap_window (w); - default_face_height_and_width (window, &defheight, &defwidth); + default_face_width_and_height (window, &defwidth, &defheight); /* If we get a bogus value indicating somewhere above or to the left of the window, use the first window line or character position @@ -9290,7 +9291,7 @@ int defheight; lwin = wrap_window (*w); - default_face_height_and_width (lwin, 0, &defheight); + default_face_width_and_height (lwin, 0, &defheight); *row += (adj_area / defheight); }
--- a/src/regex.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/regex.c Wed Feb 24 19:04:27 2010 -0600 @@ -5,7 +5,7 @@ Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. - Copyright (C) 1995, 2001, 2002, 2003 Ben Wing. + Copyright (C) 1995, 2001, 2002, 2003, 2010 Ben Wing. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -734,17 +734,48 @@ #include <assert.h> #endif -static int debug = 0; +extern int debug_regexps; #define DEBUG_STATEMENT(e) e -#define DEBUG_PRINT1(x) if (debug) printf (x) -#define DEBUG_PRINT2(x1, x2) if (debug) printf (x1, x2) -#define DEBUG_PRINT3(x1, x2, x3) if (debug) printf (x1, x2, x3) -#define DEBUG_PRINT4(x1, x2, x3, x4) if (debug) printf (x1, x2, x3, x4) + +#define DEBUG_PRINT1(x) if (debug_regexps) printf (x) +#define DEBUG_PRINT2(x1, x2) if (debug_regexps) printf (x1, x2) +#define DEBUG_PRINT3(x1, x2, x3) if (debug_regexps) printf (x1, x2, x3) +#define DEBUG_PRINT4(x1, x2, x3, x4) if (debug_regexps) printf (x1, x2, x3, x4) #define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) \ - if (debug) print_partial_compiled_pattern (s, e) + if (debug_regexps) print_partial_compiled_pattern (s, e) #define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \ - if (debug) print_double_string (w, s1, sz1, s2, sz2) + if (debug_regexps) print_double_string (w, s1, sz1, s2, sz2) + +#define DEBUG_FAIL_PRINT1(x) \ + if (debug_regexps & RE_DEBUG_FAILURE_POINT) printf (x) +#define DEBUG_FAIL_PRINT2(x1, x2) \ + if (debug_regexps & RE_DEBUG_FAILURE_POINT) printf (x1, x2) +#define DEBUG_FAIL_PRINT3(x1, x2, x3) \ + if (debug_regexps & RE_DEBUG_FAILURE_POINT) printf (x1, x2, x3) +#define DEBUG_FAIL_PRINT4(x1, x2, x3, x4) \ + if (debug_regexps & RE_DEBUG_FAILURE_POINT) printf (x1, x2, x3, x4) +#define DEBUG_FAIL_PRINT_COMPILED_PATTERN(p, s, e) \ + if (debug_regexps & RE_DEBUG_FAILURE_POINT) \ + print_partial_compiled_pattern (s, e) +#define DEBUG_FAIL_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \ + if (debug_regexps & RE_DEBUG_FAILURE_POINT) \ + print_double_string (w, s1, sz1, s2, sz2) + +#define DEBUG_MATCH_PRINT1(x) \ + if (debug_regexps & RE_DEBUG_MATCHING) printf (x) +#define DEBUG_MATCH_PRINT2(x1, x2) \ + if (debug_regexps & RE_DEBUG_MATCHING) printf (x1, x2) +#define DEBUG_MATCH_PRINT3(x1, x2, x3) \ + if (debug_regexps & RE_DEBUG_MATCHING) printf (x1, x2, x3) +#define DEBUG_MATCH_PRINT4(x1, x2, x3, x4) \ + if (debug_regexps & RE_DEBUG_MATCHING) printf (x1, x2, x3, x4) +#define DEBUG_MATCH_PRINT_COMPILED_PATTERN(p, s, e) \ + if (debug_regexps & RE_DEBUG_MATCHING) \ + print_partial_compiled_pattern (s, e) +#define DEBUG_MATCH_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \ + if (debug_regexps & RE_DEBUG_MATCHING) \ + print_double_string (w, s1, sz1, s2, sz2) /* Print the fastmap in human-readable form. */ @@ -1133,6 +1164,7 @@ #endif #define DEBUG_STATEMENT(e) + #define DEBUG_PRINT1(x) #define DEBUG_PRINT2(x1, x2) #define DEBUG_PRINT3(x1, x2, x3) @@ -1140,6 +1172,20 @@ #define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) #define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) +#define DEBUG_FAIL_PRINT1(x) +#define DEBUG_FAIL_PRINT2(x1, x2) +#define DEBUG_FAIL_PRINT3(x1, x2, x3) +#define DEBUG_FAIL_PRINT4(x1, x2, x3, x4) +#define DEBUG_FAIL_PRINT_COMPILED_PATTERN(p, s, e) +#define DEBUG_FAIL_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) + +#define DEBUG_MATCH_PRINT1(x) +#define DEBUG_MATCH_PRINT2(x1, x2) +#define DEBUG_MATCH_PRINT3(x1, x2, x3) +#define DEBUG_MATCH_PRINT4(x1, x2, x3, x4) +#define DEBUG_MATCH_PRINT_COMPILED_PATTERN(p, s, e) +#define DEBUG_MATCH_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) + #endif /* DEBUG */ /* Set by `re_set_syntax' to the current regexp syntax to recognize. Can @@ -1523,14 +1569,14 @@ \ DEBUG_STATEMENT (failure_id++); \ DEBUG_STATEMENT (nfailure_points_pushed++); \ - DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%d:\n", failure_id); \ - DEBUG_PRINT2 (" Before push, next avail: %ld\n", \ + DEBUG_FAIL_PRINT2 ("\nPUSH_FAILURE_POINT #%d:\n", failure_id); \ + DEBUG_FAIL_PRINT2 (" Before push, next avail: %ld\n", \ (long) (fail_stack).avail); \ - DEBUG_PRINT2 (" size: %ld\n", \ + DEBUG_FAIL_PRINT2 (" size: %ld\n", \ (long) (fail_stack).size); \ \ - DEBUG_PRINT2 (" slots needed: %d\n", NUM_FAILURE_ITEMS); \ - DEBUG_PRINT2 (" available: %ld\n", \ + DEBUG_FAIL_PRINT2 (" slots needed: %d\n", NUM_FAILURE_ITEMS); \ + DEBUG_FAIL_PRINT2 (" available: %ld\n", \ (long) REMAINING_AVAIL_SLOTS); \ \ /* Ensure we have enough space allocated for what we will push. */ \ @@ -1544,59 +1590,59 @@ return failure_code; \ } \ END_REGEX_MALLOC_OK (); \ - DEBUG_PRINT2 ("\n Doubled stack; size now: %ld\n", \ + DEBUG_FAIL_PRINT2 ("\n Doubled stack; size now: %ld\n", \ (long) (fail_stack).size); \ - DEBUG_PRINT2 (" slots available: %ld\n", \ + DEBUG_FAIL_PRINT2 (" slots available: %ld\n", \ (long) REMAINING_AVAIL_SLOTS); \ \ RE_MATCH_RELOCATE_MOVEABLE_DATA_POINTERS (); \ } \ \ /* Push the info, starting with the registers. */ \ - DEBUG_PRINT1 ("\n"); \ + DEBUG_FAIL_PRINT1 ("\n"); \ \ for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \ this_reg++) \ { \ - DEBUG_PRINT2 (" Pushing reg: %d\n", this_reg); \ + DEBUG_FAIL_PRINT2 (" Pushing reg: %d\n", this_reg); \ DEBUG_STATEMENT (num_regs_pushed++); \ \ - DEBUG_PRINT2 (" start: 0x%lx\n", (long) regstart[this_reg]); \ + DEBUG_FAIL_PRINT2 (" start: 0x%lx\n", (long) regstart[this_reg]); \ PUSH_FAILURE_POINTER (regstart[this_reg]); \ \ - DEBUG_PRINT2 (" end: 0x%lx\n", (long) regend[this_reg]); \ + DEBUG_FAIL_PRINT2 (" end: 0x%lx\n", (long) regend[this_reg]); \ PUSH_FAILURE_POINTER (regend[this_reg]); \ \ - DEBUG_PRINT2 (" info: 0x%lx\n ", \ + DEBUG_FAIL_PRINT2 (" info: 0x%lx\n ", \ * (long *) (®_info[this_reg])); \ - DEBUG_PRINT2 (" match_null=%d", \ + DEBUG_FAIL_PRINT2 (" match_null=%d", \ REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \ - DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \ - DEBUG_PRINT2 (" matched_something=%d", \ + DEBUG_FAIL_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \ + DEBUG_FAIL_PRINT2 (" matched_something=%d", \ MATCHED_SOMETHING (reg_info[this_reg])); \ - DEBUG_PRINT2 (" ever_matched_something=%d", \ + DEBUG_FAIL_PRINT2 (" ever_matched_something=%d", \ EVER_MATCHED_SOMETHING (reg_info[this_reg])); \ - DEBUG_PRINT1 ("\n"); \ + DEBUG_FAIL_PRINT1 ("\n"); \ PUSH_FAILURE_ELT (reg_info[this_reg].word); \ } \ \ - DEBUG_PRINT2 (" Pushing low active reg: %d\n", lowest_active_reg); \ + DEBUG_FAIL_PRINT2 (" Pushing low active reg: %d\n", lowest_active_reg); \ PUSH_FAILURE_INT (lowest_active_reg); \ \ - DEBUG_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg); \ + DEBUG_FAIL_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg); \ PUSH_FAILURE_INT (highest_active_reg); \ \ - DEBUG_PRINT2 (" Pushing pattern 0x%lx: \n", (long) pattern_place); \ - DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \ + DEBUG_FAIL_PRINT2 (" Pushing pattern 0x%lx: \n", (long) pattern_place); \ + DEBUG_FAIL_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \ PUSH_FAILURE_POINTER (pattern_place); \ \ - DEBUG_PRINT2 (" Pushing string 0x%lx: `", (long) string_place); \ - DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \ + DEBUG_FAIL_PRINT2 (" Pushing string 0x%lx: `", (long) string_place); \ + DEBUG_FAIL_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \ size2); \ - DEBUG_PRINT1 ("'\n"); \ + DEBUG_FAIL_PRINT1 ("'\n"); \ PUSH_FAILURE_POINTER (string_place); \ \ - DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \ + DEBUG_FAIL_PRINT2 (" Pushing failure id: %u\n", failure_id); \ DEBUG_PUSH (failure_id); \ } while (0) @@ -1648,16 +1694,16 @@ assert (!FAIL_STACK_EMPTY ()); \ \ /* Remove failure points and point to how many regs pushed. */ \ - DEBUG_PRINT1 ("POP_FAILURE_POINT:\n"); \ - DEBUG_PRINT2 (" Before pop, next avail: %ld\n", \ + DEBUG_FAIL_PRINT1 ("POP_FAILURE_POINT:\n"); \ + DEBUG_FAIL_PRINT2 (" Before pop, next avail: %ld\n", \ (long) fail_stack.avail); \ - DEBUG_PRINT2 (" size: %ld\n", \ + DEBUG_FAIL_PRINT2 (" size: %ld\n", \ (long) fail_stack.size); \ \ assert (fail_stack.avail >= NUM_NONREG_ITEMS); \ \ DEBUG_POP (&ffailure_id.integer); \ - DEBUG_PRINT2 (" Popping failure id: %d\n", \ + DEBUG_FAIL_PRINT2 (" Popping failure id: %d\n", \ * (int *) &ffailure_id); \ \ /* If the saved string location is NULL, it came from an \ @@ -1667,34 +1713,34 @@ if (string_temp != NULL) \ str = string_temp; \ \ - DEBUG_PRINT2 (" Popping string 0x%lx: `", (long) str); \ - DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \ - DEBUG_PRINT1 ("'\n"); \ + DEBUG_FAIL_PRINT2 (" Popping string 0x%lx: `", (long) str); \ + DEBUG_FAIL_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \ + DEBUG_FAIL_PRINT1 ("'\n"); \ \ pat = (unsigned char *) POP_FAILURE_POINTER (); \ - DEBUG_PRINT2 (" Popping pattern 0x%lx: ", (long) pat); \ - DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \ + DEBUG_FAIL_PRINT2 (" Popping pattern 0x%lx: ", (long) pat); \ + DEBUG_FAIL_PRINT_COMPILED_PATTERN (bufp, pat, pend); \ \ /* Restore register info. */ \ high_reg = POP_FAILURE_INT (); \ - DEBUG_PRINT2 (" Popping high active reg: %d\n", high_reg); \ + DEBUG_FAIL_PRINT2 (" Popping high active reg: %d\n", high_reg); \ \ low_reg = POP_FAILURE_INT (); \ - DEBUG_PRINT2 (" Popping low active reg: %d\n", low_reg); \ + DEBUG_FAIL_PRINT2 (" Popping low active reg: %d\n", low_reg); \ \ for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \ { \ - DEBUG_PRINT2 (" Popping reg: %d\n", this_reg); \ + DEBUG_FAIL_PRINT2 (" Popping reg: %d\n", this_reg); \ \ reg_info[this_reg].word = POP_FAILURE_ELT (); \ - DEBUG_PRINT2 (" info: 0x%lx\n", \ + DEBUG_FAIL_PRINT2 (" info: 0x%lx\n", \ * (long *) ®_info[this_reg]); \ \ regend[this_reg] = POP_FAILURE_POINTER (); \ - DEBUG_PRINT2 (" end: 0x%lx\n", (long) regend[this_reg]); \ + DEBUG_FAIL_PRINT2 (" end: 0x%lx\n", (long) regend[this_reg]); \ \ regstart[this_reg] = POP_FAILURE_POINTER (); \ - DEBUG_PRINT2 (" start: 0x%lx\n", (long) regstart[this_reg]); \ + DEBUG_FAIL_PRINT2 (" start: 0x%lx\n", (long) regstart[this_reg]); \ } \ \ set_regs_matched_done = 0; \ @@ -2157,11 +2203,11 @@ regnum_t regnum = 0; #ifdef DEBUG - DEBUG_PRINT1 ("\nCompiling pattern: "); - if (debug) + if (debug_regexps & RE_DEBUG_COMPILATION) { int debug_count; + DEBUG_PRINT1 ("\nCompiling pattern: "); for (debug_count = 0; debug_count < size; debug_count++) putchar (pattern[debug_count]); putchar ('\n'); @@ -3405,7 +3451,7 @@ bufp->used = buf_end - bufp->buffer; #ifdef DEBUG - if (debug) + if (debug_regexps & RE_DEBUG_COMPILATION) { DEBUG_PRINT1 ("\nCompiled pattern: \n"); print_compiled_pattern (bufp); @@ -4906,7 +4952,7 @@ #endif #endif /* emacs */ - DEBUG_PRINT1 ("\n\nEntering re_match_2.\n"); + DEBUG_MATCH_PRINT1 ("\n\nEntering re_match_2.\n"); BEGIN_REGEX_MALLOC_OK (); INIT_FAIL_STACK (); @@ -5024,18 +5070,18 @@ dend = end_match_2; } - DEBUG_PRINT1 ("The compiled pattern is: \n"); - DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend); - DEBUG_PRINT1 ("The string to match is: `"); - DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2); - DEBUG_PRINT1 ("'\n"); + DEBUG_MATCH_PRINT1 ("The compiled pattern is: \n"); + DEBUG_MATCH_PRINT_COMPILED_PATTERN (bufp, p, pend); + DEBUG_MATCH_PRINT1 ("The string to match is: `"); + DEBUG_MATCH_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2); + DEBUG_MATCH_PRINT1 ("'\n"); /* This loops over pattern commands. It exits by returning from the function if the match is complete, or it drops through if the match fails at this starting point in the input data. */ for (;;) { - DEBUG_PRINT2 ("\n0x%lx: ", (long) p); + DEBUG_MATCH_PRINT2 ("\n0x%lx: ", (long) p); #ifdef emacs /* XEmacs added, w/removal of immediate_quit */ if (!no_quit_in_re_search) { @@ -5048,7 +5094,7 @@ if (p == pend) { /* End of pattern means we might have succeeded. */ - DEBUG_PRINT1 ("end of pattern ... "); + DEBUG_MATCH_PRINT1 ("end of pattern ... "); /* If we haven't matched the entire string, and we want the longest match, try backtracking. */ @@ -5064,7 +5110,7 @@ else best_match_p = !MATCHING_IN_FIRST_STRING; - DEBUG_PRINT1 ("backtracking.\n"); + DEBUG_MATCH_PRINT1 ("backtracking.\n"); if (!FAIL_STACK_EMPTY ()) { /* More failure points to try. */ @@ -5075,7 +5121,7 @@ best_regs_set = true; match_end = d; - DEBUG_PRINT1 ("\nSAVING match as best so far.\n"); + DEBUG_MATCH_PRINT1 ("\nSAVING match as best so far.\n"); for (mcnt = 1; mcnt < num_regs; mcnt++) { @@ -5097,7 +5143,7 @@ For example, the pattern `x.*y.*z' against the strings `x-' and `y-z-', if the two strings are not consecutive in memory. */ - DEBUG_PRINT1 ("Restoring best registers.\n"); + DEBUG_MATCH_PRINT1 ("Restoring best registers.\n"); d = match_end; dend = ((d >= string1 && d <= end1) @@ -5112,7 +5158,7 @@ } /* d != end_match_2 */ succeed_label: - DEBUG_PRINT1 ("Accepting match.\n"); + DEBUG_MATCH_PRINT1 ("Accepting match.\n"); /* If caller wants register contents data back, do it. */ { @@ -5214,16 +5260,16 @@ for (mcnt = num_nonshy_regs; mcnt < regs->num_regs; mcnt++) regs->start[mcnt] = regs->end[mcnt] = -1; } - DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n", + DEBUG_MATCH_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n", nfailure_points_pushed, nfailure_points_popped, nfailure_points_pushed - nfailure_points_popped); - DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed); + DEBUG_MATCH_PRINT2 ("%u registers pushed.\n", num_regs_pushed); mcnt = d - pos - (MATCHING_IN_FIRST_STRING ? string1 : string2 - size1); - DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt); + DEBUG_MATCH_PRINT2 ("Returning %d from re_match_2.\n", mcnt); FREE_VARIABLES (); return mcnt; @@ -5235,11 +5281,11 @@ /* Ignore these. Used to ignore the n of succeed_n's which currently have n == 0. */ case no_op: - DEBUG_PRINT1 ("EXECUTING no_op.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING no_op.\n"); break; case succeed: - DEBUG_PRINT1 ("EXECUTING succeed.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING succeed.\n"); goto succeed_label; /* Match exactly a string of length n in the pattern. The @@ -5248,7 +5294,7 @@ the default internal format.) */ case exactn: mcnt = *p++; - DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt); + DEBUG_MATCH_PRINT2 ("EXECUTING exactn %d.\n", mcnt); /* This is written out as an if-else so we don't waste time testing `translate' inside the loop. */ @@ -5321,7 +5367,7 @@ /* Match any character except possibly a newline or a null. */ case anychar: - DEBUG_PRINT1 ("EXECUTING anychar.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING anychar.\n"); REGEX_PREFETCH (); @@ -5333,7 +5379,7 @@ goto fail; SET_REGS_MATCHED (); - DEBUG_PRINT2 (" Matched `%d'.\n", *d); + DEBUG_MATCH_PRINT2 (" Matched `%d'.\n", *d); INC_IBYTEPTR_FMT (d, fmt); /* XEmacs change */ break; @@ -5344,7 +5390,7 @@ REGISTER Ichar c; re_bool not_p = (re_opcode_t) *(p - 1) == charset_not; - DEBUG_PRINT2 ("EXECUTING charset%s.\n", not_p ? "_not" : ""); + DEBUG_MATCH_PRINT2 ("EXECUTING charset%s.\n", not_p ? "_not" : ""); REGEX_PREFETCH (); c = itext_ichar_fmt (d, fmt, lispobj); @@ -5372,7 +5418,7 @@ REGISTER Ichar c; re_bool not_p = (re_opcode_t) *(p - 1) == charset_mule_not; - DEBUG_PRINT2 ("EXECUTING charset_mule%s.\n", not_p ? "_not" : ""); + DEBUG_MATCH_PRINT2 ("EXECUTING charset_mule%s.\n", not_p ? "_not" : ""); REGEX_PREFETCH (); c = itext_ichar_fmt (d, fmt, lispobj); @@ -5398,7 +5444,7 @@ matched within the group is recorded (in the internal registers data structure) under the register number. */ case start_memory: - DEBUG_PRINT3 ("EXECUTING start_memory %d (%d):\n", *p, p[1]); + DEBUG_MATCH_PRINT3 ("EXECUTING start_memory %d (%d):\n", *p, p[1]); /* Find out if this group can match the empty string. */ p1 = p; /* To send to group_match_null_string_p. */ @@ -5407,7 +5453,7 @@ REG_MATCH_NULL_STRING_P (reg_info[*p]) = group_match_null_string_p (&p1, pend, reg_info); - DEBUG_PRINT2 (" group CAN%s match null string\n", + DEBUG_MATCH_PRINT2 (" group CAN%s match null string\n", REG_MATCH_NULL_STRING_P (reg_info[*p]) ? "NOT" : ""); /* Save the position in the string where we were the last time @@ -5418,11 +5464,11 @@ old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p]) ? REG_UNSET (regstart[*p]) ? d : regstart[*p] : regstart[*p]; - DEBUG_PRINT2 (" old_regstart: %d\n", + DEBUG_MATCH_PRINT2 (" old_regstart: %d\n", POINTER_TO_OFFSET (old_regstart[*p])); regstart[*p] = d; - DEBUG_PRINT2 (" regstart: %d\n", POINTER_TO_OFFSET (regstart[*p])); + DEBUG_MATCH_PRINT2 (" regstart: %d\n", POINTER_TO_OFFSET (regstart[*p])); IS_ACTIVE (reg_info[*p]) = 1; MATCHED_SOMETHING (reg_info[*p]) = 0; @@ -5449,7 +5495,7 @@ arguments are the same as start_memory's: the register number, and the number of inner groups. */ case stop_memory: - DEBUG_PRINT3 ("EXECUTING stop_memory %d (%d):\n", *p, p[1]); + DEBUG_MATCH_PRINT3 ("EXECUTING stop_memory %d (%d):\n", *p, p[1]); /* We need to save the string position the last time we were at this close-group operator in case the group is operated @@ -5459,11 +5505,11 @@ old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p]) ? REG_UNSET (regend[*p]) ? d : regend[*p] : regend[*p]; - DEBUG_PRINT2 (" old_regend: %d\n", + DEBUG_MATCH_PRINT2 (" old_regend: %d\n", POINTER_TO_OFFSET (old_regend[*p])); regend[*p] = d; - DEBUG_PRINT2 (" regend: %d\n", POINTER_TO_OFFSET (regend[*p])); + DEBUG_MATCH_PRINT2 (" regend: %d\n", POINTER_TO_OFFSET (regend[*p])); /* This register isn't active anymore. */ IS_ACTIVE (reg_info[*p]) = 0; @@ -5599,7 +5645,7 @@ REGISTER re_char *d2, *dend2; /* Get which register to match against. */ int regno = *p++; - DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno); + DEBUG_MATCH_PRINT2 ("EXECUTING duplicate %d.\n", regno); /* Can't back reference a group which we've never matched. */ if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno])) @@ -5666,7 +5712,7 @@ (unless `not_bol' is set in `bufp'), and, if `newline_anchor' is set, after newlines. */ case begline: - DEBUG_PRINT1 ("EXECUTING begline.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING begline.\n"); if (AT_STRINGS_BEG (d)) { @@ -5686,7 +5732,7 @@ /* endline is the dual of begline. */ case endline: - DEBUG_PRINT1 ("EXECUTING endline.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING endline.\n"); if (AT_STRINGS_END (d)) { @@ -5706,7 +5752,7 @@ /* Match at the very beginning of the data. */ case begbuf: - DEBUG_PRINT1 ("EXECUTING begbuf.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING begbuf.\n"); if (AT_STRINGS_BEG (d)) break; goto fail; @@ -5714,7 +5760,7 @@ /* Match at the very end of the data. */ case endbuf: - DEBUG_PRINT1 ("EXECUTING endbuf.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING endbuf.\n"); if (AT_STRINGS_END (d)) break; goto fail; @@ -5737,10 +5783,10 @@ `anychar's code to do something besides goto fail in this case; that seems worse than this. */ case on_failure_keep_string_jump: - DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump"); + DEBUG_MATCH_PRINT1 ("EXECUTING on_failure_keep_string_jump"); EXTRACT_NUMBER_AND_INCR (mcnt, p); - DEBUG_PRINT3 (" %d (to 0x%lx):\n", mcnt, (long) (p + mcnt)); + DEBUG_MATCH_PRINT3 (" %d (to 0x%lx):\n", mcnt, (long) (p + mcnt)); PUSH_FAILURE_POINT (p + mcnt, (unsigned char *) 0, -2); break; @@ -5760,10 +5806,10 @@ pop_failure_jump back to this on_failure_jump. */ case on_failure_jump: on_failure: - DEBUG_PRINT1 ("EXECUTING on_failure_jump"); + DEBUG_MATCH_PRINT1 ("EXECUTING on_failure_jump"); EXTRACT_NUMBER_AND_INCR (mcnt, p); - DEBUG_PRINT3 (" %d (to 0x%lx)", mcnt, (long) (p + mcnt)); + DEBUG_MATCH_PRINT3 (" %d (to 0x%lx)", mcnt, (long) (p + mcnt)); /* If this on_failure_jump comes right before a group (i.e., the original * applied to a group), save the information @@ -5794,7 +5840,7 @@ lowest_active_reg = *(p1 + 1); } - DEBUG_PRINT1 (":\n"); + DEBUG_MATCH_PRINT1 (":\n"); PUSH_FAILURE_POINT (p + mcnt, d, -2); break; @@ -5803,7 +5849,7 @@ We change it to either `pop_failure_jump' or `jump'. */ case maybe_pop_jump: EXTRACT_NUMBER_AND_INCR (mcnt, p); - DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt); + DEBUG_MATCH_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt); { REGISTER unsigned char *p2 = p; @@ -5849,7 +5895,7 @@ against ":/". I don't really understand this code yet. */ p[-3] = (unsigned char) pop_failure_jump; - DEBUG_PRINT1 + DEBUG_MATCH_PRINT1 (" End of pattern: change to `pop_failure_jump'.\n"); } @@ -5862,7 +5908,7 @@ if ((re_opcode_t) p1[3] == exactn && p1[5] != c) { p[-3] = (unsigned char) pop_failure_jump; - DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n", + DEBUG_MATCH_PRINT3 (" %c != %c => pop_failure_jump.\n", c, p1[5]); } @@ -5880,7 +5926,7 @@ if (!not_p) { p[-3] = (unsigned char) pop_failure_jump; - DEBUG_PRINT1 (" No match => pop_failure_jump.\n"); + DEBUG_MATCH_PRINT1 (" No match => pop_failure_jump.\n"); } } } @@ -5897,7 +5943,7 @@ & (1 << (p1[5] % BYTEWIDTH))))) { p[-3] = (unsigned char) pop_failure_jump; - DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n", + DEBUG_MATCH_PRINT3 (" %c != %c => pop_failure_jump.\n", c, p1[5]); } @@ -5915,7 +5961,7 @@ if (idx == p2[1]) { p[-3] = (unsigned char) pop_failure_jump; - DEBUG_PRINT1 (" No match => pop_failure_jump.\n"); + DEBUG_MATCH_PRINT1 (" No match => pop_failure_jump.\n"); } } else if ((re_opcode_t) p1[3] == charset) @@ -5932,7 +5978,7 @@ if (idx == p2[1] || idx == p1[4]) { p[-3] = (unsigned char) pop_failure_jump; - DEBUG_PRINT1 (" No match => pop_failure_jump.\n"); + DEBUG_MATCH_PRINT1 (" No match => pop_failure_jump.\n"); } } } @@ -5941,7 +5987,7 @@ if ((re_opcode_t) p[-1] != pop_failure_jump) { p[-1] = (unsigned char) jump; - DEBUG_PRINT1 (" Match => jump.\n"); + DEBUG_MATCH_PRINT1 (" Match => jump.\n"); goto unconditional_jump; } /* Note fall through. */ @@ -5964,7 +6010,7 @@ unsigned char *pdummy; re_char *sdummy = NULL; - DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING pop_failure_jump.\n"); POP_FAILURE_POINT (sdummy, pdummy, dummy_low_reg, dummy_high_reg, reg_dummy, reg_dummy, reg_info_dummy); @@ -5976,16 +6022,16 @@ case jump: unconditional_jump: EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */ - DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt); + DEBUG_MATCH_PRINT2 ("EXECUTING jump %d ", mcnt); p += mcnt; /* Do the jump. */ - DEBUG_PRINT2 ("(to 0x%lx).\n", (long) p); + DEBUG_MATCH_PRINT2 ("(to 0x%lx).\n", (long) p); break; /* We need this opcode so we can detect where alternatives end in `group_match_null_string_p' et al. */ case jump_past_alt: - DEBUG_PRINT1 ("EXECUTING jump_past_alt.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING jump_past_alt.\n"); goto unconditional_jump; @@ -5995,7 +6041,7 @@ are skipping over the on_failure_jump, so we have to push something meaningless for pop_failure_jump to pop. */ case dummy_failure_jump: - DEBUG_PRINT1 ("EXECUTING dummy_failure_jump.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING dummy_failure_jump.\n"); /* It doesn't matter what we push for the string here. What the code at `fail' tests is the value for the pattern. */ PUSH_FAILURE_POINT ((unsigned char *) 0, (unsigned char *) 0, -2); @@ -6008,7 +6054,7 @@ popped. For example, matching `(a|ab)*' against `aab' requires that we match the `ab' alternative. */ case push_dummy_failure: - DEBUG_PRINT1 ("EXECUTING push_dummy_failure.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING push_dummy_failure.\n"); /* See comments just above at `dummy_failure_jump' about the two zeroes. */ PUSH_FAILURE_POINT ((unsigned char *) 0, (unsigned char *) 0, -2); @@ -6018,7 +6064,7 @@ After that, handle like `on_failure_jump'. */ case succeed_n: EXTRACT_NUMBER (mcnt, p + 2); - DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt); + DEBUG_MATCH_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt); assert (mcnt >= 0); /* Originally, this is how many times we HAVE to succeed. */ @@ -6027,11 +6073,11 @@ mcnt--; p += 2; STORE_NUMBER_AND_INCR (p, mcnt); - DEBUG_PRINT3 (" Setting 0x%lx to %d.\n", (long) p, mcnt); + DEBUG_MATCH_PRINT3 (" Setting 0x%lx to %d.\n", (long) p, mcnt); } else if (mcnt == 0) { - DEBUG_PRINT2 (" Setting two bytes from 0x%lx to no_op.\n", + DEBUG_MATCH_PRINT2 (" Setting two bytes from 0x%lx to no_op.\n", (long) (p+2)); p[2] = (unsigned char) no_op; p[3] = (unsigned char) no_op; @@ -6041,7 +6087,7 @@ case jump_n: EXTRACT_NUMBER (mcnt, p + 2); - DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt); + DEBUG_MATCH_PRINT2 ("EXECUTING jump_n %d.\n", mcnt); /* Originally, this is how many times we CAN jump. */ if (mcnt) @@ -6057,18 +6103,18 @@ case set_number_at: { - DEBUG_PRINT1 ("EXECUTING set_number_at.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING set_number_at.\n"); EXTRACT_NUMBER_AND_INCR (mcnt, p); p1 = p + mcnt; EXTRACT_NUMBER_AND_INCR (mcnt, p); - DEBUG_PRINT3 (" Setting 0x%lx to %d.\n", (long) p1, mcnt); + DEBUG_MATCH_PRINT3 (" Setting 0x%lx to %d.\n", (long) p1, mcnt); STORE_NUMBER (p1, mcnt); break; } case wordbound: - DEBUG_PRINT1 ("EXECUTING wordbound.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING wordbound.\n"); should_succeed = 1; matchwordbound: { @@ -6138,12 +6184,12 @@ } case notwordbound: - DEBUG_PRINT1 ("EXECUTING notwordbound.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING notwordbound.\n"); should_succeed = 0; goto matchwordbound; case wordbeg: - DEBUG_PRINT1 ("EXECUTING wordbeg.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING wordbeg.\n"); if (AT_STRINGS_END (d)) goto fail; { @@ -6186,7 +6232,7 @@ } case wordend: - DEBUG_PRINT1 ("EXECUTING wordend.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING wordend.\n"); if (AT_STRINGS_BEG (d)) goto fail; { @@ -6235,7 +6281,7 @@ #ifdef emacs case before_dot: - DEBUG_PRINT1 ("EXECUTING before_dot.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING before_dot.\n"); if (!BUFFERP (lispobj) || (BUF_PTR_BYTE_POS (XBUFFER (lispobj), (unsigned char *) d) >= BUF_PT (XBUFFER (lispobj)))) @@ -6243,7 +6289,7 @@ break; case at_dot: - DEBUG_PRINT1 ("EXECUTING at_dot.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING at_dot.\n"); if (!BUFFERP (lispobj) || (BUF_PTR_BYTE_POS (XBUFFER (lispobj), (unsigned char *) d) != BUF_PT (XBUFFER (lispobj)))) @@ -6251,7 +6297,7 @@ break; case after_dot: - DEBUG_PRINT1 ("EXECUTING after_dot.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING after_dot.\n"); if (!BUFFERP (lispobj) || (BUF_PTR_BYTE_POS (XBUFFER (lispobj), (unsigned char *) d) <= BUF_PT (XBUFFER (lispobj)))) @@ -6259,12 +6305,12 @@ break; case syntaxspec: - DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt); + DEBUG_MATCH_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt); mcnt = *p++; goto matchsyntax; case wordchar: - DEBUG_PRINT1 ("EXECUTING Emacs wordchar.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING Emacs wordchar.\n"); mcnt = (int) Sword; matchsyntax: should_succeed = 1; @@ -6294,12 +6340,12 @@ break; case notsyntaxspec: - DEBUG_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt); + DEBUG_MATCH_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt); mcnt = *p++; goto matchnotsyntax; case notwordchar: - DEBUG_PRINT1 ("EXECUTING Emacs notwordchar.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING Emacs notwordchar.\n"); mcnt = (int) Sword; matchnotsyntax: should_succeed = 0; @@ -6331,7 +6377,7 @@ #endif /* MULE */ #else /* not emacs */ case wordchar: - DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING non-Emacs wordchar.\n"); REGEX_PREFETCH (); if (!WORDCHAR_P ((int) (*d))) goto fail; @@ -6340,7 +6386,7 @@ break; case notwordchar: - DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n"); + DEBUG_MATCH_PRINT1 ("EXECUTING non-Emacs notwordchar.\n"); REGEX_PREFETCH (); if (!WORDCHAR_P ((int) (*d))) goto fail; @@ -6359,7 +6405,7 @@ fail: if (!FAIL_STACK_EMPTY ()) { /* A restart point is known. Restore to that state. */ - DEBUG_PRINT1 ("\nFAIL:\n"); + DEBUG_MATCH_PRINT1 ("\nFAIL:\n"); POP_FAILURE_POINT (d, p, lowest_active_reg, highest_active_reg, regstart, regend, reg_info);
--- a/src/regex.h Wed Feb 24 01:58:04 2010 -0600 +++ b/src/regex.h Wed Feb 24 19:04:27 2010 -0600 @@ -2,7 +2,7 @@ expression library, version 0.12. Copyright (C) 1985, 89, 90, 91, 92, 93, 95 Free Software Foundation, Inc. - Copyright (C) 2002 Ben Wing. + Copyright (C) 2002, 2010 Ben Wing. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -526,4 +526,13 @@ size_t errbuf_size); void regfree (regex_t *preg); +enum regex_debug + { + RE_DEBUG_COMPILATION = 1 << 0, + RE_DEBUG_FAILURE_POINT = 1 << 1, + RE_DEBUG_MATCHING = 1 << 2, + }; + +extern int debug_regexps; + #endif /* INCLUDED_regex_h_ */
--- a/src/scrollbar-x.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/scrollbar-x.c Wed Feb 24 19:04:27 2010 -0600 @@ -3,6 +3,7 @@ Copyright (C) 1994 Amdahl Corporation. Copyright (C) 1995 Sun Microsystems, Inc. Copyright (C) 1995 Darrell Kindred <dkindred+@cmu.edu>. + Copyright (C) 2010 Ben Wing. This file is part of XEmacs. @@ -283,7 +284,7 @@ } } - if (!wv->scrollbar_data) ABORT (); + assert (wv->scrollbar_data); free_widget_value_tree (wv); } else if (managed)
--- a/src/search.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/search.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* String search routines for XEmacs. Copyright (C) 1985, 1986, 1987, 1992-1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. - Copyright (C) 2001, 2002 Ben Wing. + Copyright (C) 2001, 2002, 2010 Ben Wing. This file is part of XEmacs. @@ -50,10 +50,17 @@ #ifdef DEBUG_XEMACS /* Used in tests/automated/case-tests.el if available. */ -Fixnum debug_xemacs_searches; +Fixnum debug_searches; + +/* Declare as int rather than Bitflags because it's used by regex.c, which + may be used outside of XEmacs (e.g. etags.c). */ +int debug_regexps; +Lisp_Object Vdebug_regexps; Lisp_Object Qsearch_algorithm_used, Qboyer_moore, Qsimple_search; +Lisp_Object Qcompilation, Qfailure_point, Qmatching; + #endif /* If the regexp is non-nil, then the buffer contains the compiled form @@ -1461,7 +1468,7 @@ if (!checked) { #ifdef DEBUG_XEMACS - if (debug_xemacs_searches) + if (debug_searches) { Lisp_Symbol *sym = XSYMBOL (Qsearch_algorithm_used); sym->value = Qnil; @@ -1527,7 +1534,7 @@ pat = base_pat = patbuf; #ifdef DEBUG_XEMACS - if (debug_xemacs_searches) + if (debug_searches) { Lisp_Symbol *sym = XSYMBOL (Qsearch_algorithm_used); sym->value = boyer_moore_ok ? Qboyer_moore : Qsimple_search; @@ -3333,6 +3340,35 @@ } +#ifdef DEBUG_XEMACS + +static int +debug_regexps_changed (Lisp_Object UNUSED (sym), Lisp_Object *val, + Lisp_Object UNUSED (in_object), + int UNUSED (flags)) +{ + int newval = 0; + + EXTERNAL_LIST_LOOP_2 (elt, *val) + { + CHECK_SYMBOL (elt); + if (EQ (elt, Qcompilation)) + newval |= RE_DEBUG_COMPILATION; + else if (EQ (elt, Qfailure_point)) + newval |= RE_DEBUG_FAILURE_POINT; + else if (EQ (elt, Qmatching)) + newval |= RE_DEBUG_MATCHING; + else + invalid_argument + ("Expected `compilation', `failure-point' or `matching'", elt); + } + debug_regexps = newval; + return 0; +} + +#endif /* DEBUG_XEMACS */ + + /************************************************************************/ /* initialization */ /************************************************************************/ @@ -3421,10 +3457,26 @@ DEFSYMBOL (Qboyer_moore); DEFSYMBOL (Qsimple_search); - DEFVAR_INT ("debug-xemacs-searches", &debug_xemacs_searches /* + DEFSYMBOL (Qcompilation); + DEFSYMBOL (Qfailure_point); + DEFSYMBOL (Qmatching); + + DEFVAR_INT ("debug-searches", &debug_searches /* If non-zero, bind `search-algorithm-used' to `boyer-moore' or `simple-search', depending on the algorithm used for each search. Used for testing. */ ); - debug_xemacs_searches = 0; -#endif + debug_searches = 0; + + DEFVAR_LISP_MAGIC ("debug-regexps", &Vdebug_regexps, /* +List of areas to display debug info about during regexp operation. +The following areas are recognized: + +`compilation' Display the result of compiling a regexp. +`failure-point' Display info about failure points reached. +`matching' Display info about the process of matching a regex against + text. +*/ debug_regexps_changed); + Vdebug_regexps = Qnil; + debug_regexps = 0; +#endif /* DEBUG_XEMACS */ }
--- a/src/signal.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/signal.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,6 @@ /* Handling asynchronous signals. Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. - Copyright (C) 1995, 1996, 2001, 2002, 2004 Ben Wing. + Copyright (C) 1995, 1996, 2001, 2002, 2004, 2010 Ben Wing. This file is part of XEmacs. @@ -727,7 +727,7 @@ Backtrace given in - (Info-goto-node "(internals)Nasty Bugs due to Reentrancy in Redisplay Structures handling QUIT") + (Info-goto-node "(internals)Critical Redisplay Sections") */ assert_with_message
--- a/src/sunplay.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/sunplay.c Wed Feb 24 19:04:27 2010 -0600 @@ -50,7 +50,7 @@ reset_volume_p = 0; reset_device_p = 0; - if (data && fd) ABORT (); /* one or the other */ + assert (!(data && fd)); /* one or the other */ if (AUDIO_SUCCESS != audio_get_play_config (audio_fd, &dev_hdr)) {
--- a/src/syntax.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/syntax.c Wed Feb 24 19:04:27 2010 -0600 @@ -31,12 +31,6 @@ #include "syntax.h" #include "extents.h" -#ifdef NEW_GC -# define UNUSED_IF_NEW_GC(decl) UNUSED (decl) -#else -# define UNUSED_IF_NEW_GC(decl) decl -#endif - #define ST_COMMENT_STYLE 0x101 #define ST_STRING_STYLE 0x102
--- a/src/sysdep.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/sysdep.c Wed Feb 24 19:04:27 2010 -0600 @@ -108,12 +108,6 @@ #endif -#ifdef HAVE_TTY -#define USED_IF_TTY(decl) decl -#else -#define USED_IF_TTY(decl) UNUSED (decl) -#endif - /************************************************************************/ /* subprocess control */
--- a/src/syswindows.h Wed Feb 24 01:58:04 2010 -0600 +++ b/src/syswindows.h Wed Feb 24 19:04:27 2010 -0600 @@ -130,6 +130,30 @@ In fact, in general, it's possible to compile with support for all of these at the same time. + + + Here is a table mapping from GNU Emacs constants to XEmacs constants for + use in porting code. + + + Old Constant New Constant + --------------------------------------------------------------- + `WINDOWSNT' `WIN32_NATIVE' + `WIN32' `WIN32_NATIVE' + `_WIN32' `WIN32_NATIVE' + `HAVE_WIN32' `WIN32_NATIVE' + `DOS_NT' `WIN32_NATIVE' + `HAVE_NTGUI' `WIN32_NATIVE', unless it ends up already bracketed + by this + `HAVE_FACES' always true + `MSDOS' determine whether this code is really specific to + MS-DOS (and not Windows - e.g. DJGPP code); if so, + delete the code; otherwise, convert to `WIN32_NATIVE' + (we do not support MS-DOS w/DOS Extender under XEmacs) + `__CYGWIN__' `CYGWIN' + `__CYGWIN32__' `CYGWIN' + `__MINGW32__' `MINGW' + */ /* ------------------------- Basic includes ------------------------- */
--- a/src/tests.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/tests.c Wed Feb 24 19:04:27 2010 -0600 @@ -682,7 +682,7 @@ FROB (0XFFFFFFFFFFFFFFFE); #endif /* INT_VALBITS >= 63 */ - return list3 (build_ascstring ("STORE_VOID_IN_LISP"), Qt, Qnil); + return list1 (list3 (build_ascstring ("STORE_VOID_IN_LISP"), Qt, Qnil)); }
--- a/src/toolbar.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/toolbar.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* Generic toolbar implementation. Copyright (C) 1995 Board of Trustees, University of Illinois. Copyright (C) 1995 Sun Microsystems, Inc. - Copyright (C) 1995, 1996, 2003, 2004 Ben Wing. + Copyright (C) 1995, 1996, 2003, 2004, 2010 Ben Wing. Copyright (C) 1996 Chuck Thompson. This file is part of XEmacs. @@ -777,15 +777,9 @@ if (frame_size_changed) { int width, height; - if (!window_system_pixelated_geometry (wrap_frame (f))) - pixel_to_char_size (f, FRAME_PIXWIDTH (f), FRAME_PIXHEIGHT (f), - &width, &height); - else - width = FRAME_PIXWIDTH (f), height = FRAME_PIXHEIGHT (f); - if (!HAS_FRAMEMETH_P (f, set_frame_size)) - change_frame_size (f, height, width, 0); - else - FRAMEMETH (f, set_frame_size, (f, width, height)); + pixel_to_frame_unit_size (f, FRAME_PIXWIDTH (f), FRAME_PIXHEIGHT (f), + &width, &height); + internal_set_frame_size (f, width, height, 0); MARK_FRAME_LAYOUT_CHANGED (f); }
--- a/src/unexnt.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/unexnt.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,6 +1,6 @@ /* unexec for XEmacs on Windows NT. Copyright (C) 1994 Free Software Foundation, Inc. - Copyright (C) 2002 Ben Wing. + Copyright (C) 2002, 2010 Ben Wing. This file is part of XEmacs. @@ -525,12 +525,11 @@ file = qxeCreateFile (filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); - if (file == INVALID_HANDLE_VALUE) - ABORT (); + assert (file != INVALID_HANDLE_VALUE); /* Seek to where the .bss section is tucked away after the heap... */ index = heap_index_in_executable + get_committed_heap_size (); - if (SetFilePointer (file, index, NULL, FILE_BEGIN) == 0xFFFFFFFF) + if (SetFilePointer (file, index, NULL, FILE_BEGIN) == 0xFFFFFFFF) ABORT (); /* Ok, read in the saved .bss section and initialize all @@ -553,14 +552,12 @@ file = qxeCreateFile (filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); - if (file == INVALID_HANDLE_VALUE) - ABORT (); + assert (file != INVALID_HANDLE_VALUE); size = GetFileSize (file, &upper_size); file_mapping = qxeCreateFileMapping (file, NULL, PAGE_WRITECOPY, 0, size, NULL); - if (!file_mapping) - ABORT (); + assert (file_mapping); size = get_committed_heap_size (); file_base = MapViewOfFileEx (file_mapping, FILE_MAP_COPY, 0,
--- a/src/vdb-win32.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/vdb-win32.c Wed Feb 24 19:04:27 2010 -0600 @@ -29,7 +29,7 @@ #include "syswindows.h" -LONG WINAPI +static LONG WINAPI win32_fault_handler (LPEXCEPTION_POINTERS e) { #define GET_FAULT_ADDRESS (void *) e->ExceptionRecord->ExceptionInformation[1]
--- a/src/vdb.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/vdb.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,5 +1,6 @@ /* Virtual diry bit implementation (platform independent) for XEmacs. Copyright (C) 2005 Marcus Crestani. + Copyright (C) 2010 Ben Wing. This file is part of XEmacs. @@ -74,6 +75,8 @@ /* For testing and debugging... */ +#ifdef DEBUG_XEMACS + DEFUN ("test-vdb", Ftest_vdb, 0, 0, "", /* Test virtual dirty bit implementation. Prints results to stderr. */ @@ -148,9 +151,13 @@ return Qnil; } +#endif /* DEBUG_XEMACS */ + void syms_of_vdb (void) { +#ifdef DEBUG_XEMACS DEFSUBR (Ftest_vdb); DEFSUBR (Ftest_segfault); +#endif /* DEBUG_XEMACS */ }
--- a/src/window.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/window.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* Window creation, deletion and examination for XEmacs. Copyright (C) 1985-1987, 1992-1995 Free Software Foundation, Inc. Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. - Copyright (C) 1995, 1996, 2002 Ben Wing. + Copyright (C) 1995, 1996, 2002, 2010 Ben Wing. Copyright (C) 1996 Chuck Thompson. This file is part of XEmacs. @@ -693,8 +693,7 @@ Lisp_Object retval = real_window_internal (mir->frame->root_window, XWINDOW_MIRROR (mir->frame->root_mirror), mir); - if (NILP (retval) && !no_abort) - ABORT (); + assert (!NILP (retval) || no_abort); return retval; } @@ -756,8 +755,7 @@ if (XFRAME (w->frame)->mirror_dirty) update_frame_window_mirror (XFRAME (w->frame)); t = find_window_mirror (w); - if (!t) - ABORT (); + assert (t); if (which == CURRENT_DISP) return t->current_display_lines; @@ -780,8 +778,7 @@ if (XFRAME (w->frame)->mirror_dirty) update_frame_window_mirror (XFRAME (w->frame)); t = find_window_mirror (w); - if (!t) - ABORT (); + assert (t); return t->buffer; } @@ -794,8 +791,7 @@ if (XFRAME (w->frame)->mirror_dirty) update_frame_window_mirror (XFRAME (w->frame)); t = find_window_mirror (w); - if (!t) - ABORT (); + assert (t); t->buffer = b; } @@ -1170,7 +1166,7 @@ margin_cwidth = (left_margin ? XINT (w->left_margin_width) : XINT (w->right_margin_width)); - default_face_height_and_width (window, 0, &font_width); + default_face_width_and_height (window, &font_width, 0); /* The left margin takes precedence over the right margin so we subtract its width from the space available for the right @@ -1653,7 +1649,7 @@ hlimit = WINDOW_TEXT_HEIGHT (w); eobuf = BUF_ZV (XBUFFER (w->buffer)); - default_face_height_and_width (window, &defheight, NULL); + default_face_width_and_height (window, NULL, &defheight); /* guess lines needed in line start cache + a few extra */ needed = (hlimit + defheight-1) / defheight + 3; @@ -2015,8 +2011,7 @@ Lisp_Object buf = w->buffer; struct buffer *b = XBUFFER (buf); - if (b != XMARKER (w->pointm[CURRENT_DISP])->buffer) - ABORT (); + assert (b == XMARKER (w->pointm[CURRENT_DISP])->buffer); /* FSF disables this check, so I'll do it too. I hope it won't break things. --ben */ @@ -3129,7 +3124,7 @@ w = window_loop (GET_LRU_WINDOW, Qnil, 0, which_frames, 1, which_devices); /* At this point we damn well better have found something. */ - if (NILP (w)) ABORT (); + assert (!NILP (w)); #endif return w; @@ -3473,8 +3468,8 @@ /* Return non-zero if both frame sizes are less than or equal to minimal allowed values. ROWS and COLS are in characters */ -int -frame_size_valid_p (struct frame *frame, int rows, int cols) +static int +frame_size_valid_p (struct frame *frame, int cols, int rows) { return (rows >= frame_min_height (frame) && cols >= MIN_SAFE_WINDOW_WIDTH); @@ -3486,21 +3481,30 @@ frame_pixsize_valid_p (struct frame *frame, int width, int height) { int rows, cols; - pixel_to_real_char_size (frame, width, height, &cols, &rows); - return frame_size_valid_p (frame, rows, cols); + pixel_to_char_size (frame, width, height, &cols, &rows); + return frame_size_valid_p (frame, cols, rows); } /* If *ROWS or *COLS are too small a size for FRAME, set them to the minimum allowable size. */ void -check_frame_size (struct frame *frame, int *rows, int *cols) +check_frame_size (struct frame *frame, int *cols, int *rows) { int min_height = frame_min_height (frame); - - if (*rows < min_height) - *rows = min_height; - if (*cols < MIN_SAFE_WINDOW_WIDTH) - *cols = MIN_SAFE_WINDOW_WIDTH; + int min_pixwidth, min_pixheight; + int min_geomwidth, min_geomheight; + + /* There is no char_to_frame_unit_size(). This can be done with + frame_conversion_internal(), but that's currently static, and we can + do it fine with two steps, as follows. */ + char_to_pixel_size (frame, MIN_SAFE_WINDOW_WIDTH, min_height, + &min_pixwidth, &min_pixheight); + pixel_to_frame_unit_size (frame, min_pixwidth, min_pixheight, + &min_geomwidth, &min_geomheight); + if (*rows < min_geomheight) + *rows = min_geomheight; + if (*cols < min_geomwidth) + *cols = min_geomwidth; } /* Normally the window is deleted if it gets too small. @@ -3519,7 +3523,7 @@ int line_size; int defheight, defwidth; - default_face_height_and_width (window, &defheight, &defwidth); + default_face_width_and_height (window, &defwidth, &defheight); line_size = (set_height ? defheight : defwidth); check_min_window_sizes (); @@ -4122,7 +4126,7 @@ window_top_window_gutter_height (w) + window_bottom_window_gutter_height (w))); - default_face_height_and_width (window, &defheight, &defwidth); + default_face_width_and_height (window, &defwidth, &defheight); if (defheight) char_height = avail_height / defheight; @@ -4146,7 +4150,7 @@ Lisp_Object window = wrap_window (w); - default_face_height_and_width (window, &defheight, &defwidth); + default_face_width_and_height (window, &defwidth, &defheight); avail_height = char_height * defheight; pixel_height = (avail_height + @@ -4226,7 +4230,7 @@ } } - default_face_height_and_width (window, &defheight, &defwidth); + default_face_width_and_height (window, &defwidth, &defheight); /* #### This probably needs to know about the clipping area once a final definition is decided on. */ if (defheight) @@ -4269,7 +4273,7 @@ (include_margins_p ? 0 : window_left_margin_width (w)) - (include_margins_p ? 0 : window_right_margin_width (w))); - default_face_height_and_width (window, &defheight, &defwidth); + default_face_width_and_height (window, &defwidth, &defheight); if (defwidth) char_width = (avail_width / defwidth); @@ -4292,7 +4296,7 @@ Lisp_Object window = wrap_window (w); - default_face_height_and_width (window, &defheight, &defwidth); + default_face_width_and_height (window, &defwidth, &defheight); avail_width = char_width * defwidth; pixel_width = (avail_width + @@ -4375,7 +4379,7 @@ if (EQ (window, FRAME_ROOT_WINDOW (f))) invalid_operation ("Won't change only window", Qunbound); - default_face_height_and_width (window, &defheight, &defwidth); + default_face_width_and_height (window, &defwidth, &defheight); while (1) { @@ -4604,7 +4608,7 @@ if (INTP (Vwindow_pixel_scroll_increment)) fheight = XINT (Vwindow_pixel_scroll_increment); else if (!NILP (Vwindow_pixel_scroll_increment)) - default_face_height_and_width (window, &fheight, &fwidth); + default_face_width_and_height (window, &fwidth, &fheight); if (Dynarr_length (dla) >= 1) modeline = Dynarr_begin (dla)->modeline;
--- a/src/window.h Wed Feb 24 01:58:04 2010 -0600 +++ b/src/window.h Wed Feb 24 19:04:27 2010 -0600 @@ -2,7 +2,7 @@ Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. - Copyright (C) 1995, 1996, 2002 Ben Wing. + Copyright (C) 1995, 1996, 2002, 2010 Ben Wing. Copyright (C) 1996 Chuck Thompson. This file is part of XEmacs. @@ -148,9 +148,8 @@ Error_Behavior errb); int buffer_window_count (struct buffer *b, struct frame *f); int buffer_window_mru (struct window *w); -void check_frame_size (struct frame *frame, int *rows, int *cols); +void check_frame_size (struct frame *frame, int *cols, int *rows); int frame_pixsize_valid_p (struct frame *frame, int width, int height); -int frame_size_valid_p (struct frame *frame, int rows, int cols); struct window *decode_window (Lisp_Object window); struct window *find_window_by_pixel_pos (int pix_x, int pix_y, Lisp_Object win);
--- a/tests/ChangeLog Wed Feb 24 01:58:04 2010 -0600 +++ b/tests/ChangeLog Wed Feb 24 19:04:27 2010 -0600 @@ -1,3 +1,41 @@ +2010-02-22 Ben Wing <ben@xemacs.org> + + * automated/syntax-tests.el: + Use Known-Bug-Expect-Error, not Known-Bug-Expect-Failure, when + error expected; else test suite will abort this file. + +2010-02-22 Ben Wing <ben@xemacs.org> + + * automated/test-harness.el (test-harness-from-buffer): + Remove unused binding. + +2010-02-15 Ben Wing <ben@xemacs.org> + + * automated/search-tests.el (let): + * automated/search-tests.el (boundp): + debug-xemacs-searches renamed to debug-searches. + +2010-02-20 Ben Wing <ben@xemacs.org> + + * automated/test-harness.el: + * automated/test-harness.el (test-harness-bug-expected): New. + * automated/test-harness.el (test-harness-unexpected-error-enter-debugger): New. + * automated/test-harness.el (test-harness-assertion-failure-enter-debugger): New. + * automated/test-harness.el (test-harness-unexpected-error-show-backtrace): New. + * automated/test-harness.el (test-harness-assertion-failure-show-backtrace): New. + * automated/test-harness.el (test-harness-assertion-failure-do-debug): New. + * automated/test-harness.el (test-harness-unexpected-error-do-debug): New. + * automated/test-harness.el (test-harness-unexpected-error-condition-handler): New. + * automated/test-harness.el (test-harness-error-wrap): New. + * automated/test-harness.el (test-harness-from-buffer): + New variables that allow a backtrace to be displayed and/or the + debugger to be entered when an assertion failure or unexpected error + occurs. By default, debugging occurs when interactive and debug-on-error + is set, and backtrace-displaying occurs either + (a) when stack-trace-on-error is set, or (b) always, when an unexpected + error occurs. (However, no backtracing or debugging occurs when a bug + is expected.) + 2010-02-19 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-tests.el:
--- a/tests/automated/search-tests.el Wed Feb 24 01:58:04 2010 -0600 +++ b/tests/automated/search-tests.el Wed Feb 24 19:04:27 2010 -0600 @@ -166,7 +166,7 @@ (with-temp-buffer (let ((target "M\xe9zard") - (debug-xemacs-searches 1)) + (debug-searches 1)) (Assert (not (search-forward target nil t))) (insert target) (goto-char (point-min)) @@ -180,10 +180,10 @@ (Assert= (1+ (length target)) (search-forward target nil t)))) (Skip-Test-Unless - (boundp 'debug-xemacs-searches) ; normal when we have DEBUG_XEMACS + (boundp 'debug-searches) ; normal when we have DEBUG_XEMACS "not a DEBUG_XEMACS build" "checks that the algorithm chosen by #'search-forward is relatively sane" - (let ((debug-xemacs-searches 1) + (let ((debug-searches 1) newcase) (with-temp-buffer (insert "\n\nDer beruehmte deutsche Fleiss\n\n")
--- a/tests/automated/syntax-tests.el Wed Feb 24 01:58:04 2010 -0600 +++ b/tests/automated/syntax-tests.el Wed Feb 24 19:04:27 2010 -0600 @@ -192,8 +192,9 @@ (Assert (backward-up-list-moves-point-from-to 20 3)) (Known-Bug-Expect-Failure (Assert (backward-up-list-moves-point-from-to 22 3))) - (Known-Bug-Expect-Failure - (Assert (backward-up-list-moves-point-from-to 23 3))) + (Known-Bug-Expect-Error scan-error + (Assert (backward-up-list-moves-point-from-to 23 3)) + ) (Assert (backward-up-list-moves-point-from-to 24 3)) ;; This is maybe a little tricky, since we don't expect the position ;; check to happen -- so use an illegal expected position
--- a/tests/automated/test-harness.el Wed Feb 24 01:58:04 2010 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,732 +0,0 @@ -;; test-harness.el --- Run Emacs Lisp test suites. - -;;; Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc. -;;; Copyright (C) 2002, 2010 Ben Wing. - -;; Author: Martin Buchholz -;; Maintainer: Stephen J. Turnbull <stephen@xemacs.org> -;; Keywords: testing - -;; This file is part of XEmacs. - -;; XEmacs is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; XEmacs is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;; Synched up with: Not in FSF. - -;;; Commentary: - -;;; A test suite harness for testing XEmacs. -;;; The actual tests are in other files in this directory. -;;; Basically you just create files of emacs-lisp, and use the -;;; Assert, Check-Error, Check-Message, and Check-Error-Message functions -;;; to create tests. See `test-harness-from-buffer' below. -;;; Don't suppress tests just because they're due to known bugs not yet -;;; fixed -- use the Known-Bug-Expect-Failure and -;;; Implementation-Incomplete-Expect-Failure wrapper macros to mark them. -;;; A lot of the tests we run push limits; suppress Ebola message with the -;;; Ignore-Ebola wrapper macro. -;;; Some noisy code will call `message'. Output from `message' can be -;;; suppressed with the Silence-Message macro. Functions that are known to -;;; issue messages include `write-region', `find-tag', `tag-loop-continue', -;;; `insert', and `mark-whole-buffer'. N.B. The Silence-Message macro -;;; currently does not suppress the newlines printed by `message'. -;;; Definitely do not use Silence-Message with Check-Message. -;;; In general it should probably only be used on code that prepares for a -;;; test, not on tests. -;;; -;;; You run the tests using M-x test-emacs-test-file, -;;; or $(EMACS) -batch -l .../test-harness.el -f batch-test-emacs file ... -;;; which is run for you by the `make check' target in the top-level Makefile. - -(require 'bytecomp) - -(defvar unexpected-test-suite-failures 0 - "Cumulative number of unexpected failures since test-harness was loaded. - -\"Unexpected failures\" are those caught by a generic handler established -outside of the test context. As such they involve an abort of the test -suite for the file being tested. - -They often occur during preparation of a test or recording of the results. -For example, an executable used to generate test data might not be present -on the system, or a system error might occur while reading a data file.") - -(defvar unexpected-test-suite-failure-files nil - "List of test files causing unexpected failures.") - -;; Declared for dynamic scope; _do not_ initialize here. -(defvar unexpected-test-file-failures) - -(defvar test-harness-test-compiled nil - "Non-nil means the test code was compiled before execution. - -You probably should not make tests depend on compilation. -However, it can be useful to conditionally change messages based on whether -the code was compiled or not. For example, the case that motivated the -implementation of this variable: - -\(when test-harness-test-compiled - ;; this ha-a-ack depends on the failing compiled test coming last - \(setq test-harness-failure-tag - \"KNOWN BUG - fix reverted; after 2003-10-31 notify stephen\n\"))") - -(defvar test-harness-verbose - (and (not noninteractive) (> (device-baud-rate) search-slow-speed)) - "*Non-nil means print messages describing progress of emacs-tester.") - -(defvar test-harness-file-results-alist nil - "Each element is a list (FILE SUCCESSES TESTS). -The order is the reverse of the order in which tests are run. - -FILE is a string naming the test file. -SUCCESSES is a non-negative integer, the number of successes. -TESTS is a non-negative integer, the number of tests run.") - -(defvar test-harness-risk-infloops nil - "*Non-nil to run tests that may loop infinitely in buggy implementations.") - -(defvar test-harness-current-file nil) - -(defvar emacs-lisp-file-regexp (purecopy "\\.el\\'") - "*Regexp which matches Emacs Lisp source files.") - -(defconst test-harness-file-summary-template - (format "%%-%ds %%%dd of %%%dd tests successful (%%3d%%%%)." - (length "byte-compiler-tests.el:") ; use the longest file name - 5 - 5) - "Format for summary lines printed after each file is run.") - -(defconst test-harness-null-summary-template - (format "%%-%ds No tests run." - (length "byte-compiler-tests.el:")) ; use the longest file name - "Format for \"No tests\" lines printed after a file is run.") - -(defconst test-harness-aborted-summary-template - (format "%%-%ds %%%dd tests completed (aborted)." - (length "byte-compiler-tests.el:") ; use the longest file name - 5) - "Format for summary lines printed after a test run on a file was aborted.") - -;;;###autoload -(defun test-emacs-test-file (filename) - "Test a file of Lisp code named FILENAME. -The output file's name is made by appending `c' to the end of FILENAME." - (interactive - (let ((file buffer-file-name) - (file-name nil) - (file-dir nil)) - (and file - (eq (cdr (assq 'major-mode (buffer-local-variables))) - 'emacs-lisp-mode) - (setq file-name (file-name-nondirectory file) - file-dir (file-name-directory file))) - (list (read-file-name "Test file: " file-dir nil nil file-name)))) - ;; Expand now so we get the current buffer's defaults - (setq filename (expand-file-name filename)) - - ;; If we're testing a file that's in a buffer and is modified, offer - ;; to save it first. - (or noninteractive - (let ((b (get-file-buffer (expand-file-name filename)))) - (if (and b (buffer-modified-p b) - (y-or-n-p (format "save buffer %s first? " (buffer-name b)))) - (save-excursion (set-buffer b) (save-buffer))))) - - (if (or noninteractive test-harness-verbose) - (message "Testing %s..." filename)) - (let ((test-harness-current-file filename) - input-buffer) - (save-excursion - (setq input-buffer (get-buffer-create " *Test Input*")) - (set-buffer input-buffer) - (erase-buffer) - (insert-file-contents filename) - ;; Run hooks including the uncompression hook. - ;; If they change the file name, then change it for the output also. - (let ((buffer-file-name filename) - (default-major-mode 'emacs-lisp-mode) - (enable-local-eval nil)) - (normal-mode) - (setq filename buffer-file-name))) - (test-harness-from-buffer input-buffer filename) - (kill-buffer input-buffer) - )) - -(defun test-harness-read-from-buffer (buffer) - "Read forms from BUFFER, and turn it into a lambda test form." - (let ((body nil)) - (goto-char (point-min) buffer) - (condition-case error-info - (while t - (setq body (cons (read buffer) body))) - (end-of-file nil) - (error - (incf unexpected-test-file-failures) - (princ (format "Unexpected error %S reading forms from buffer\n" - error-info)))) - `(lambda () - (defvar passes) - (defvar assertion-failures) - (defvar no-error-failures) - (defvar wrong-error-failures) - (defvar missing-message-failures) - (defvar other-failures) - - (defvar trick-optimizer) - - ,@(nreverse body)))) - -(defun test-harness-from-buffer (inbuffer filename) - "Run tests in buffer INBUFFER, visiting FILENAME." - (defvar trick-optimizer) - (let ((passes 0) - (assertion-failures 0) - (no-error-failures 0) - (wrong-error-failures 0) - (missing-message-failures 0) - (other-failures 0) - (unexpected-test-file-failures 0) - - ;; #### perhaps this should be a defvar, and output at the very end - ;; OTOH, this way AC types can use a null EMACSPACKAGEPATH to find - ;; what stuff is needed, and ways to avoid using them - (skipped-test-reasons (make-hash-table :test 'equal)) - - (trick-optimizer nil) - (debug-on-error t) - (pass-stream nil)) - (with-output-to-temp-buffer "*Test-Log*" - (princ (format "Testing %s...\n\n" filename)) - - (defconst test-harness-failure-tag "FAIL") - (defconst test-harness-success-tag "PASS") - -;;;;; BEGIN DEFINITION OF MACROS USEFUL IN TEST CODE - - (defmacro Known-Bug-Expect-Failure (&rest body) - "Wrap a BODY that consists of tests that are known to fail. -This causes messages to be printed on failure indicating that this is expected, -and on success indicating that this is unexpected." - `(let ((test-harness-failure-tag "KNOWN BUG") - (test-harness-success-tag "PASS (FAILURE EXPECTED)")) - ,@body)) - - (defmacro Known-Bug-Expect-Error (expected-error &rest body) - "Wrap a BODY that consists of tests that are known to trigger an error. -This causes messages to be printed on failure indicating that this is expected, -and on success indicating that this is unexpected." - (let ((quoted-body (if (= 1 (length body)) - `(quote ,(car body)) `(quote (progn ,@body))))) - `(let ((test-harness-failure-tag "KNOWN BUG") - (test-harness-success-tag "PASS (FAILURE EXPECTED)")) - (condition-case error-info - (progn - (setq trick-optimizer (progn ,@body)) - (Print-Pass - "%S executed successfully, but expected error %S" - ,quoted-body - ',expected-error) - (incf passes)) - (,expected-error - (Print-Failure "%S ==> error %S, as expected" - ,quoted-body ',expected-error) - (incf no-error-failures)) - (error - (Print-Failure "%S ==> expected error %S, got error %S instead" - ,quoted-body ',expected-error error-info) - (incf wrong-error-failures)))))) - - (defmacro Implementation-Incomplete-Expect-Failure (&rest body) - "Wrap a BODY containing tests that are known to fail due to incomplete code. -This causes messages to be printed on failure indicating that the -implementation is incomplete (and hence the failure is expected); and on -success indicating that this is unexpected." - `(let ((test-harness-failure-tag "IMPLEMENTATION INCOMPLETE") - (test-harness-success-tag "PASS (FAILURE EXPECTED)")) - ,@body)) - - (defun Print-Failure (fmt &rest args) - (setq fmt (format "%s: %s" test-harness-failure-tag fmt)) - (if (noninteractive) (apply #'message fmt args)) - (princ (concat (apply #'format fmt args) "\n"))) - - (defun Print-Pass (fmt &rest args) - (setq fmt (format "%s: %s" test-harness-success-tag fmt)) - (and test-harness-verbose - (princ (concat (apply #'format fmt args) "\n")))) - - (defun Print-Skip (test reason &optional fmt &rest args) - (setq fmt (concat "SKIP: %S BECAUSE %S" fmt)) - (princ (concat (apply #'format fmt test reason args) "\n"))) - - (defmacro Skip-Test-Unless (condition reason description &rest body) - "Unless CONDITION is satisfied, skip test BODY. -REASON is a description of the condition failure, and must be unique (it -is used as a hash key). DESCRIPTION describes the tests that were skipped. -BODY is a sequence of expressions and may contain several tests." - `(if (not ,condition) - (let ((count (gethash ,reason skipped-test-reasons))) - (puthash ,reason (if (null count) 1 (1+ count)) - skipped-test-reasons) - (Print-Skip ,description ,reason)) - ,@body)) - - (defmacro Assert (assertion &optional failing-case description) - "Test passes if ASSERTION is true. -Optional FAILING-CASE describes the particular failure. Optional -DESCRIPTION describes the assertion; by default, the unevalated assertion -expression is given. FAILING-CASE and DESCRIPTION are useful when Assert -is used in a loop." - (let ((description - (or description `(quote ,assertion)))) - `(condition-case error-info - (progn - (assert ,assertion) - (Print-Pass "%S" ,description) - (incf passes)) - (cl-assertion-failed - (Print-Failure (if ,failing-case - "Assertion failed: %S; failing case = %S" - "Assertion failed: %S") - ,description ,failing-case) - (incf assertion-failures)) - (t (Print-Failure (if ,failing-case - "%S ==> error: %S; failing case = %S" - "%S ==> error: %S") - ,description error-info ,failing-case) - (incf other-failures) - )))) - -;;;;; BEGIN DEFINITION OF SPECIFIC KINDS OF ASSERT MACROS - - (defmacro Assert-test (test testval expected &optional failing-case - description) - "Test passes if TESTVAL compares correctly to EXPECTED using TEST. -TEST should be a two-argument predicate (i.e. a function of two arguments -that returns t or nil), such as `eq', `eql', `equal', `equalp', `=', `<=', -'>', 'file-newer-than-file-p' etc. Optional FAILING-CASE describes the -particular failure; any value given here will be concatenated with a phrase -describing the expected and actual values of the comparison. Optional -DESCRIPTION describes the assertion; by default, the unevalated comparison -expressions are given. FAILING-CASE and DESCRIPTION are useful when Assert -is used in a loop." - (let* ((assertion `(,test ,testval ,expected)) - (failmsg `(format "%S should be `%s' to %S but isn't" - ,testval ',test ,expected)) - (failmsg2 (if failing-case `(concat - (format "%S, " ,failing-case) - ,failmsg) - failmsg))) - `(Assert ,assertion ,failmsg2 ,description))) - - (defmacro Assert-test-not (test testval expected &optional failing-case - description) - "Test passes if TESTVAL does not compare correctly to EXPECTED using TEST. -TEST should be a two-argument predicate (i.e. a function of two arguments -that returns t or nil), such as `eq', `eql', `equal', `equalp', `=', `<=', -'>', 'file-newer-than-file-p' etc. Optional FAILING-CASE describes the -particular failure; any value given here will be concatenated with a phrase -describing the expected and actual values of the comparison. Optional -DESCRIPTION describes the assertion; by default, the unevalated comparison -expressions are given. FAILING-CASE and DESCRIPTION are useful when Assert -is used in a loop." - (let* ((assertion `(not (,test ,testval ,expected))) - (failmsg `(format "%S shouldn't be `%s' to %S but is" - ,testval ',test ,expected)) - (failmsg2 (if failing-case `(concat - (format "%S, " ,failing-case) - ,failmsg) - failmsg))) - `(Assert ,assertion ,failmsg2 ,description))) - - ;; Specific versions of `Assert-test'. These are just convenience - ;; functions, functioning identically to `Assert-test', and duplicating - ;; the doc string for each would be too annoying. - (defmacro Assert-eq (testval expected &optional failing-case - description) - `(Assert-test eq ,testval ,expected ,failing-case ,description)) - (defmacro Assert-eql (testval expected &optional failing-case - description) - `(Assert-test eql ,testval ,expected ,failing-case ,description)) - (defmacro Assert-equal (testval expected &optional failing-case - description) - `(Assert-test equal ,testval ,expected ,failing-case ,description)) - (defmacro Assert-equalp (testval expected &optional failing-case - description) - `(Assert-test equalp ,testval ,expected ,failing-case ,description)) - (defmacro Assert-string= (testval expected &optional failing-case - description) - `(Assert-test string= ,testval ,expected ,failing-case ,description)) - (defmacro Assert= (testval expected &optional failing-case - description) - `(Assert-test = ,testval ,expected ,failing-case ,description)) - (defmacro Assert<= (testval expected &optional failing-case - description) - `(Assert-test <= ,testval ,expected ,failing-case ,description)) - - ;; Specific versions of `Assert-test-not'. These are just convenience - ;; functions, functioning identically to `Assert-test-not', and - ;; duplicating the doc string for each would be too annoying. - (defmacro Assert-not-eq (testval expected &optional failing-case - description) - `(Assert-test-not eq ,testval ,expected ,failing-case ,description)) - (defmacro Assert-not-eql (testval expected &optional failing-case - description) - `(Assert-test-not eql ,testval ,expected ,failing-case ,description)) - (defmacro Assert-not-equal (testval expected &optional failing-case - description) - `(Assert-test-not equal ,testval ,expected ,failing-case ,description)) - (defmacro Assert-not-equalp (testval expected &optional failing-case - description) - `(Assert-test-not equalp ,testval ,expected ,failing-case ,description)) - (defmacro Assert-not-string= (testval expected &optional failing-case - description) - `(Assert-test-not string= ,testval ,expected ,failing-case ,description)) - (defmacro Assert-not= (testval expected &optional failing-case - description) - `(Assert-test-not = ,testval ,expected ,failing-case ,description)) - - (defmacro Check-Error (expected-error &rest body) - (let ((quoted-body (if (= 1 (length body)) - `(quote ,(car body)) `(quote (progn ,@body))))) - `(condition-case error-info - (progn - (setq trick-optimizer (progn ,@body)) - (Print-Failure "%S executed successfully, but expected error %S" - ,quoted-body - ',expected-error) - (incf no-error-failures)) - (,expected-error - (Print-Pass "%S ==> error %S, as expected" - ,quoted-body ',expected-error) - (incf passes)) - (error - (Print-Failure "%S ==> expected error %S, got error %S instead" - ,quoted-body ',expected-error error-info) - (incf wrong-error-failures))))) - - (defmacro Check-Error-Message (expected-error expected-error-regexp - &rest body) - (let ((quoted-body (if (= 1 (length body)) - `(quote ,(car body)) `(quote (progn ,@body))))) - `(condition-case error-info - (progn - (setq trick-optimizer (progn ,@body)) - (Print-Failure "%S executed successfully, but expected error %S" - ,quoted-body ',expected-error) - (incf no-error-failures)) - (,expected-error - ;; #### Damn, this binding doesn't capture frobs, eg, for - ;; invalid_argument() ... you only get the REASON. And for - ;; wrong_type_argument(), there's no reason only FROBs. - ;; If this gets fixed, fix tests in regexp-tests.el. - (let ((error-message (second error-info))) - (if (string-match ,expected-error-regexp error-message) - (progn - (Print-Pass "%S ==> error %S %S, as expected" - ,quoted-body error-message ',expected-error) - (incf passes)) - (Print-Failure "%S ==> got error %S as expected, but error message %S did not match regexp %S" - ,quoted-body ',expected-error error-message ,expected-error-regexp) - (incf wrong-error-failures)))) - (error - (Print-Failure "%S ==> expected error %S, got error %S instead" - ,quoted-body ',expected-error error-info) - (incf wrong-error-failures))))) - - ;; Do not use this with Silence-Message. - (defmacro Check-Message (expected-message-regexp &rest body) - (Skip-Test-Unless (fboundp 'defadvice) - "can't defadvice" - expected-message-regexp - (let ((quoted-body (if (= 1 (length body)) - `(quote ,(car body)) - `(quote (progn ,@body))))) - `(let ((messages "")) - (defadvice message (around collect activate) - (defvar messages) - (let ((msg-string (apply 'format (ad-get-args 0)))) - (setq messages (concat messages msg-string)) - msg-string)) - (condition-case error-info - (progn - (setq trick-optimizer (progn ,@body)) - (if (string-match ,expected-message-regexp messages) - (progn - (Print-Pass "%S ==> value %S, message %S, matching %S, as expected" - ,quoted-body trick-optimizer messages ',expected-message-regexp) - (incf passes)) - (Print-Failure "%S ==> value %S, message %S, NOT matching expected %S" - ,quoted-body trick-optimizer messages - ',expected-message-regexp) - (incf missing-message-failures))) - (error - (Print-Failure "%S ==> unexpected error %S" - ,quoted-body error-info) - (incf other-failures))) - (ad-unadvise 'message))))) - - ;; #### Perhaps this should override `message' itself, too? - (defmacro Silence-Message (&rest body) - `(flet ((append-message (&rest args) ()) - (clear-message (&rest args) ())) - ,@body)) - - (defmacro Ignore-Ebola (&rest body) - `(let ((debug-issue-ebola-notices -42)) ,@body)) - - (defun Int-to-Marker (pos) - (save-excursion - (set-buffer standard-output) - (save-excursion - (goto-char pos) - (point-marker)))) - - (princ "Testing Interpreted Lisp\n\n") - (condition-case error-info - (funcall (test-harness-read-from-buffer inbuffer)) - (error - (incf unexpected-test-file-failures) - (princ (format "Unexpected error %S while executing interpreted code\n" - error-info)) - (message "Unexpected error %S while executing interpreted code." error-info) - (message "Test suite execution aborted.") - )) - (princ "\nTesting Compiled Lisp\n\n") - (let (code - (test-harness-test-compiled t)) - (condition-case error-info - (setq code - ;; our lisp code is often intentionally dubious, - ;; so throw away _all_ the byte compiler warnings. - (letf (((symbol-function 'byte-compile-warn) 'ignore)) - (byte-compile (test-harness-read-from-buffer inbuffer)))) - (error - (princ (format "Unexpected error %S while byte-compiling code\n" - error-info)))) - (condition-case error-info - (if code (funcall code)) - (error - (incf unexpected-test-file-failures) - (princ (format "Unexpected error %S while executing byte-compiled code\n" - error-info)) - (message "Unexpected error %S while executing byte-compiled code." error-info) - (message "Test suite execution aborted.") - ))) - (princ (format "\nSUMMARY for %s:\n" filename)) - (princ (format "\t%5d passes\n" passes)) - (princ (format "\t%5d assertion failures\n" assertion-failures)) - (princ (format "\t%5d errors that should have been generated, but weren't\n" no-error-failures)) - (princ (format "\t%5d wrong-error failures\n" wrong-error-failures)) - (princ (format "\t%5d missing-message failures\n" missing-message-failures)) - (princ (format "\t%5d other failures\n" other-failures)) - (let* ((total (+ passes - assertion-failures - no-error-failures - wrong-error-failures - missing-message-failures - other-failures)) - (basename (file-name-nondirectory filename)) - (summary-msg - (cond ((> unexpected-test-file-failures 0) - (format test-harness-aborted-summary-template - (concat basename ":") total)) - ((> total 0) - (format test-harness-file-summary-template - (concat basename ":") - passes total (/ (* 100 passes) total))) - (t - (format test-harness-null-summary-template - (concat basename ":"))))) - (reasons "")) - (maphash (lambda (key value) - (setq reasons - (concat reasons - (format "\n %d tests skipped because %s." - value key)))) - skipped-test-reasons) - (when (> (length reasons) 1) - (setq summary-msg (concat summary-msg reasons " - It may be that XEmacs cannot find your installed packages. Set - EMACSPACKAGEPATH to the package hierarchy root or configure with - --package-path to enable the skipped tests."))) - (setq test-harness-file-results-alist - (cons (list filename passes total) - test-harness-file-results-alist)) - (message "%s" summary-msg)) - (when (> unexpected-test-file-failures 0) - (setq unexpected-test-suite-failure-files - (cons filename unexpected-test-suite-failure-files)) - (setq unexpected-test-suite-failures - (+ unexpected-test-suite-failures unexpected-test-file-failures)) - (message "Test suite execution failed unexpectedly.")) - (fmakunbound 'Assert) - (fmakunbound 'Check-Error) - (fmakunbound 'Check-Message) - (fmakunbound 'Check-Error-Message) - (fmakunbound 'Ignore-Ebola) - (fmakunbound 'Int-to-Marker) - (and noninteractive - (message "%s" (buffer-substring-no-properties - nil nil "*Test-Log*"))) - ))) - -(defvar test-harness-results-point-max nil) -(defmacro displaying-emacs-test-results (&rest body) - `(let ((test-harness-results-point-max test-harness-results-point-max)) - ;; Log the file name. - (test-harness-log-file) - ;; Record how much is logged now. - ;; We will display the log buffer if anything more is logged - ;; before the end of BODY. - (or test-harness-results-point-max - (save-excursion - (set-buffer (get-buffer-create "*Test-Log*")) - (setq test-harness-results-point-max (point-max)))) - (unwind-protect - (condition-case error-info - (progn ,@body) - (error - (test-harness-report-error error-info))) - (save-excursion - ;; If there were compilation warnings, display them. - (set-buffer "*Test-Log*") - (if (= test-harness-results-point-max (point-max)) - nil - (if temp-buffer-show-function - (let ((show-buffer (get-buffer-create "*Test-Log-Show*"))) - (save-excursion - (set-buffer show-buffer) - (setq buffer-read-only nil) - (erase-buffer)) - (copy-to-buffer show-buffer - (save-excursion - (goto-char test-harness-results-point-max) - (forward-line -1) - (point)) - (point-max)) - (funcall temp-buffer-show-function show-buffer)) - (select-window - (prog1 (selected-window) - (select-window (display-buffer (current-buffer))) - (goto-char test-harness-results-point-max) - (recenter 1))))))))) - -(defun batch-test-emacs-1 (file) - (condition-case error-info - (progn (test-emacs-test-file file) t) - (error - (princ ">>Error occurred processing ") - (princ file) - (princ ": ") - (display-error error-info nil) - (terpri) - nil))) - -(defun batch-test-emacs () - "Run `test-harness' on the files remaining on the command line. -Use this from the command line, with `-batch'; -it won't work in an interactive Emacs. -Each file is processed even if an error occurred previously. -A directory can be given as well, and all files will be processed -- -however, the file test-harness.el, which implements the test harness, -will be skipped. -For example, invoke \"xemacs -batch -f batch-test-emacs tests\"" - ;; command-line-args-left is what is left of the command line (from - ;; startup.el) - (defvar command-line-args-left) ;Avoid 'free variable' warning - (defvar debug-issue-ebola-notices) - (if (not noninteractive) - (error "`batch-test-emacs' is to be used only with -batch")) - (let ((error nil)) - (dolist (file command-line-args-left) - (if (file-directory-p file) - (dolist (file-in-dir (directory-files file t)) - (when (and (string-match emacs-lisp-file-regexp file-in-dir) - (not (or (auto-save-file-name-p file-in-dir) - (backup-file-name-p file-in-dir) - (equal (file-name-nondirectory file-in-dir) - "test-harness.el")))) - (or (batch-test-emacs-1 file-in-dir) - (setq error t)))) - (or (batch-test-emacs-1 file) - (setq error t)))) - (let ((namelen 0) - (succlen 0) - (testlen 0) - (results test-harness-file-results-alist)) - ;; compute maximum lengths of variable components of report - ;; probably should just use (length "byte-compiler-tests.el") - ;; and 5-place sizes -- this will also work for the file-by-file - ;; printing when Adrian's kludge gets reverted - (flet ((print-width (i) - (let ((x 10) (y 1)) - (while (>= i x) - (setq x (* 10 x) y (1+ y))) - y))) - (while results - (let* ((head (car results)) - (nn (length (file-name-nondirectory (first head)))) - (ss (print-width (second head))) - (tt (print-width (third head)))) - (when (> nn namelen) (setq namelen nn)) - (when (> ss succlen) (setq succlen ss)) - (when (> tt testlen) (setq testlen tt))) - (setq results (cdr results)))) - ;; create format and print - (let ((results (reverse test-harness-file-results-alist))) - (while results - (let* ((head (car results)) - (basename (file-name-nondirectory (first head))) - (nsucc (second head)) - (ntest (third head))) - (cond ((member (first head) unexpected-test-suite-failure-files) - (message test-harness-aborted-summary-template - (concat basename ":") - ntest)) - ((> ntest 0) - (message test-harness-file-summary-template - (concat basename ":") - nsucc - ntest - (/ (* 100 nsucc) ntest))) - (t - (message test-harness-null-summary-template - (concat basename ":")))) - (setq results (cdr results))))) - (when (> unexpected-test-suite-failures 0) - (message "\n***** There %s %d unexpected test suite %s in %s:" - (if (= unexpected-test-suite-failures 1) "was" "were") - unexpected-test-suite-failures - (if (= unexpected-test-suite-failures 1) "failure" "failures") - (if (= (length unexpected-test-suite-failure-files) 1) - "file" - "files")) - (while unexpected-test-suite-failure-files - (let ((line (pop unexpected-test-suite-failure-files))) - (while (and (< (length line) 61) - unexpected-test-suite-failure-files) - (setq line - (concat line " " - (pop unexpected-test-suite-failure-files)))) - (message line))))) - (message "\nDone") - (kill-emacs (if error 1 0)))) - -(provide 'test-harness) - -;;; test-harness.el ends here