Mercurial > hg > xemacs-beta
changeset 183:e121b013d1f0 r20-3b18
Import from CVS: tag r20-3b18
line wrap: on
line diff
--- a/CHANGES-beta Mon Aug 13 09:53:23 2007 +0200 +++ b/CHANGES-beta Mon Aug 13 09:54:23 2007 +0200 @@ -1,4 +1,12 @@ -*- indented-text -*- +to 20.3 beta18 "Bratislava" +-- enhancements to help.el courtesy of Jens Petersen +-- Mega Martin Buchholz patch +-- edit-toolbar.el-1.02 courtesy of Mike Scheidler +-- cc-mode-5.16 +-- DOC file generation clean up +-- Miscellaneous bug fixes + to 20.3 beta17 "Bucharest" -- ediff-2.67 -- viper-2.96
--- a/ChangeLog Mon Aug 13 09:53:23 2007 +0200 +++ b/ChangeLog Mon Aug 13 09:54:23 2007 +0200 @@ -1,3 +1,11 @@ +1997-08-16 SL Baur <steve@altair.xemacs.org> + + * XEmacs 20.3-beta18 is released. + +1997-08-11 Karl M. Hegbloom <karlheg@inetarena.com> + + * etc/NEWS: add a section telling about the Info changes. + 1997-08-09 SL Baur <steve@altair.xemacs.org> * XEmacs 20.3-beta17 is released.
--- a/Makefile.in Mon Aug 13 09:53:23 2007 +0200 +++ b/Makefile.in Mon Aug 13 09:54:23 2007 +0200 @@ -218,7 +218,7 @@ ## instead, we have written out explicit code in the `install' targets. COPYDIR = ${srcdir}/etc ${srcdir}/lisp COPYDESTS = ${etcdir} ${lispdir} -GENERATED_HEADERS = src/paths.h src/Emacs.ad.h src/puresize_adjust.h src/config.h lwlib/config.h +GENERATED_HEADERS = src/paths.h src/Emacs.ad.h src/puresize-adjust.h src/config.h lwlib/config.h all: ${GENERATED_HEADERS} ${MAKE_SUBDIR} @@ -294,8 +294,8 @@ /bin/sh ${srcdir}/lib-src/ad2c ${srcdir}/etc/Emacs.ad ) > \ src/Emacs.ad.h -src/puresize_adjust.h: ${srcdir}/src/puresize.h - @echo "Resetting \`src/puresize_adjust.h'."; \ +src/puresize-adjust.h: ${srcdir}/src/puresize.h + @echo "Resetting \`src/puresize-adjust.h'."; \ (echo "/* Do not edit this file!" ; \ echo " Automatically generated by XEmacs */" ; \ echo "#define PURESIZE_ADJUSTMENT 0") > $@ @@ -414,12 +414,12 @@ ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \ chmod 0644 ${mandir}/$${page}${manext} ; \ done - if test ! -d ${prefix}/bin; then \ + if test "${prefix}" != "${exec_prefix}"; then : extreme bogosity follows; \ + test ! -d ${prefix}/bin && \ $(LN_S) ${exec_prefix}/bin ${prefix}/bin; \ - fi - if test ! -d ${prefix}/lib/xemacs-${version}/${configuration}; then \ + test ! -d ${prefix}/lib/xemacs-${version}/${configuration} && \ ${LN_S} ${exec_prefix}/lib/xemacs-${version}/${configuration} \ - ${prefix}/lib/xemacs-${version}/${configuration}; \ + ${prefix}/lib/xemacs-${version}/${configuration}; \ fi @echo "If you would like to save approximately 15M of disk space, do" @echo "make gzip-el" @@ -432,13 +432,13 @@ lib-src/gzip-el.sh ${lispdir} MAKEPATH=./lib-src/make-path -## Build all the directories we're going to install XEmacs in. Since -## we may be creating several layers of directories (for example, -## /usr/local/lib/xemacs-19.13/mips-dec-ultrix4.2), we use make-path -## instead of mkdir. Not all systems' mkdirs have the `-p' flag. +## Build all the directories to install XEmacs in. +## Since we may be creating several layers of directories, +## (e.g. /usr/local/lib/xemacs-20.5/sparc-sun-solaris2.6), we use +## make-path instead of mkdir. Not all mkdirs have the `-p' flag. mkdir: FRC.mkdir - ${MAKEPATH} ${COPYDESTS} ${lockdir} ${infodir} ${mandir} \ - ${bindir} ${datadir} ${libdir} ${sitelispdir} ${pkdir} + ${MAKEPATH} ${COPYDESTS} ${lockdir} ${infodir} ${archlibdir} \ + ${mandir} ${bindir} ${datadir} ${libdir} ${sitelispdir} ${pkgdir} -chmod 0777 ${lockdir} ## Delete all the installed files that the `install' target would
--- a/configure Mon Aug 13 09:53:23 2007 +0200 +++ b/configure Mon Aug 13 09:54:23 2007 +0200 @@ -10398,6 +10398,7 @@ Where should the build process find the source code? $srcdir What installation prefix should install use? $prefix + Where should XEmacs look for packages? $package_path What operating system and machine description files should XEmacs use? \`$opsysfile' and \`$machfile' What compiler should XEmacs be built with? $CC $CFLAGS
--- a/configure.in Mon Aug 13 09:53:23 2007 +0200 +++ b/configure.in Mon Aug 13 09:54:23 2007 +0200 @@ -279,6 +279,8 @@ sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${{exec_prefix}}/lib' +dnl The following gives NONE/lib/xemacs/packages as the first package +dnl package_path=${prefix}/lib/xemacs/packages:~/.xemacs includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' @@ -3435,6 +3437,7 @@ Where should the build process find the source code? $srcdir What installation prefix should install use? $prefix + Where should XEmacs look for packages? $package_path What operating system and machine description files should XEmacs use? \`$opsysfile' and \`$machfile' What compiler should XEmacs be built with? $CC $CFLAGS
--- a/etc/NEWS Mon Aug 13 09:53:23 2007 +0200 +++ b/etc/NEWS Mon Aug 13 09:54:23 2007 +0200 @@ -109,6 +109,46 @@ * Changes in XEmacs 20.3 ======================== +** Info "dir" functionality merged from Emacs-19.34 + +All of the directories on `Info-directory-list' will be searched for +"dir" files, which may be full fledged Info files containing subnodes +as well as menus. They are merged to become one directory, with menus +in like-named subnodes being coalesced from the several "dir" files. + +"localdir" files are looked for too, secondary to "dir"'s. If there's +no "dir" in a directory, a "localdir" will be looked for. There can +be one of either "dir" or "localdir" in each of the directories in +`Info-directory-list', which is initialized from `Info-default- +directory-list', which you may customize through the Options menu. + +The first directory specified in `Info-default-directory-list' should +contain a "dir" file that will become the toplevel dir which the +others will be merged into. A "localdir" may optionally contain a +'* Menu:' section, or just entries like those in a menu section, but +no subnodes or info header. You can see what I'm talking about if you +view the "dir" file that comes with XEmacs. It has a header section +that should not be in a "localdir" file. The "localdir" should look +like the `buffer-substring' of XEmacs' stock "dir" from just below +"* Menu:" to the end of the file, optionally also containing the +"* Menu:" line. + +The contents of each "localdir" file will be inserted into the +toplevel "dir" file replacing a '* Locals:' line, OR alternatively, +will insert it below a 'Local*' (that's a regexp) heading line. If +there's more than one "localdir" file, each will either consume a '* +Locals:' line, be catenated to the end of the (dir)Top, or be inserted +under the 'Local' topic header. + +There is a new variable, called `Info-additional-directory-list', +which you may customize also, that can contain a list of directories +in which to search for Info documents, but NOT to search in for "dir" +or "localdir" files. This is useful for things like the Calc package, +which likes its info files in its lisp directory. If you put that +directory in the 'additional list', and a menu entry for it in one of +your "dir" or "localdir" files, a click on a menu entry for it will be +able to find the Info file. + ** Startup file additions. By default XEmacs now loads the user file ~/.xemacs if it exists. If
--- a/lib-src/ChangeLog Mon Aug 13 09:53:23 2007 +0200 +++ b/lib-src/ChangeLog Mon Aug 13 09:54:23 2007 +0200 @@ -1,3 +1,15 @@ +1997-08-11 Jeff Miller <jmiller@smart.net> + * Makefile.in.in: Added a test for system-type equal to linux to + lisp/paths.el. Mail spool dir should be /var/spool/mail. + + * cleaned up lib-src/Makefile.in.in regarding targets blessmail and + maybe-blessmail. Added target do-blessmail. Makefile.in.in was also + missing a variable called "configuration. This messed up archilibdir. + + * Added highlighting to text suggesting to do "make gzip-el" in top + level Makefile.in. Added code to do make maybe-blessmail after a + make install is done. + 1997-08-07 Jan Vroonhof <vroonhof@math.ethz.ch> * gnuclient.c (main): Made help string correspond to options.
--- a/lib-src/Makefile.in.in Mon Aug 13 09:53:23 2007 +0200 +++ b/lib-src/Makefile.in.in Mon Aug 13 09:54:23 2007 +0200 @@ -49,7 +49,7 @@ libdir=@libdir@ srcdir=@srcdir@ archlibdir=@archlibdir@ - +configuration=@configuration@ ## ==================== Utility Programs for the Build ================= INSTALL = @INSTALL@ @@ -178,23 +178,31 @@ #define MOVEMAIL_NEEDS_BLESSING blessmail = blessmail blessmail: - ../src/emacs -batch -l ../lisp/blessmail.el + ../src/xemacs -batch -l ../lisp/utils/blessmail.el chmod +x $@ #endif /* movemail needs blessing */ maybe-blessmail: $(blessmail) #ifdef MOVEMAIL_NEEDS_BLESSING ## Do not charge ahead and do it! Let the installer decide. - ./blessmail ${archlibdir}/movemail */ +## ./blessmail ${archlibdir}/movemail @if test `wc -l <blessmail` != 2; then \ dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \ - echo "Assuming $$dir is really the mail spool directory, you should"; \ + echo "*************************************************************";\ + echo "Assuming $$dir is really the mail spool directory, you should";\ echo "run lib-src/blessmail ${archlibdir}/movemail"; \ echo "as root, to give movemail appropriate permissions."; \ echo "Do that after running make install."; \ + echo "You can also do make blessmail. "; \ + echo "*************************************************************";\ fi #endif +do-blessmail: $(blessmail) +#ifdef MOVEMAIL_NEEDS_BLESSING + ./blessmail ${archlibdir}/movemail +#endif + ## Install the internal utilities. Until they are installed, we can ## just run them directly from lib-src. ${archlibdir}: all
--- a/lib-src/ad2c Mon Aug 13 09:53:23 2007 +0200 +++ b/lib-src/ad2c Mon Aug 13 09:54:23 2007 +0200 @@ -20,7 +20,7 @@ s/\\/\\\\/g s/\\$//g s/"/\\"/g -s/^/(String) "/ +s/^/"/ : test /\\$/b slash s/$/",/
--- a/lisp/ChangeLog Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/ChangeLog Mon Aug 13 09:54:23 2007 +0200 @@ -1,3 +1,99 @@ +Fri Aug 15 17:26:05 1997 Barry A. Warsaw <cc-mode-help@python.org> + + * cc-mode/Release 5.16 + +Fri Aug 15 18:39:10 1997 Barry A. Warsaw <cc-mode-help@python.org> + + * cc-mode/cc-styles.el (c-style-alist): + "python" style requires c-comment-continuation-stars + to be "". + + * cc-mode/cc-engine.el (c-end-of-statement-1): + Eliminate false hits on important characters + inside literals (strings, comments). + +Tue Aug 12 21:47:18 1997 Barry A. Warsaw <cc-mode-help@python.org> + + * cc-mode/cc-cmds.el (c-comment-line-break-function): + In this function, and the defadvice, + call indent-new-comment-line if not in a comment. + + * cc-mode/cc-vars.el (c-buffer-is-cc-mode): Definition moved to + cc-mode.el + + * cc-mode/cc-mode.el (c-buffer-is-cc-mode): + Definition moved here from cc-vars.el. Also, + put permanent-local property on variable so it's value won't get + killed by kill-all-local-variables. This makes it easier for non-CC + Mode derived modes to be initialized correctly. + + * cc-mode/cc-cmds.el (c-electric-brace): + In preserve-p test, don't test char-before when at + bobp. Open brace at bobp is illegal in most modes, but not awk-mode, + which depends on CC Mode. + +Mon Aug 11 15:37:04 1997 Barry A. Warsaw <cc-mode-help@python.org> + + * cc-mode/cc-mode.el (c++-mode, java-mode, objc-mode, idl-mode): + Remove obsolete variable c-double-slash-is-comments-p. + + * cc-mode/cc-langs.el (c-double-slash-is-comments-p): Remove + obsolete variable. + + * cc-mode/cc-cmds.el (c-fill-paragraph): + Remove conditional on obsolete variable + c-double-slash-is-comments-p. + + * cc-mode/cc-styles.el (c-style-alist): + Conform comment settings to RMS's preferences. + +Thu Aug 7 19:21:32 1997 Barry A. Warsaw <cc-mode-help@python.org> + + * cc-styles.el (c-set-offset): Added autoload cookie. + +1997-08-15 SL Baur <steve@altair.xemacs.org> + + * cl/cl-macs.el (cl-make-type-test): De-ebolify type test for + 'character. + +1997-08-12 Karl M. Hegbloom <karlheg@inetarena.com> + + * packages/man.el (Manual-mouseify-xrefs): Skip the top line of + manual entries so to not get the all-caps pseudo xrefs in the + heading in our list of manuals. + (Manual-buffers-have-stars): new customize option. + (manual-entry): Fix to utilize the new variable, and to not put + stars around manual names put in the minibuffer history. + +1997-08-12 Karl M. Hegbloom <karlheg@inetarena.com> + + * packages/info.el (Info-directory-list): reverse the + `Info-default-directory-list' when using it to initialize the + `Info-directory-list'. + (Info-insert-dir): make it so the insertion of a locadir file at a + "^[ \t]*Local.*\n[ \t]*[-=]+" line works correctly. + +Mon Aug 11 17:35:35 1997 SL Baur <steve@altair.xemacs.org> + + * prim/loaddefs.el (((dir load-path))): Ignore all errors. + + * utils/autoload.el (fixup-autoload-buffer): Wrapping autoloads + files with a guard produces invalid bytecode. + + * prim/make-docfile.el (package-path): Look in the package path + for autoloads files. + + * prim/packages.el (packages-find-packages-1): Don't append + trailing "/" when adding a top-level Lisp directory. + (list-autoloads-path): New function. Use existing precomputed + load-path instead of doing the old broken computation. + +1997-08-11 SL Baur <steve@altair.xemacs.org> + + * prim/startup.el (command-line-1): Allow setting of + `initial-scratch-message' to nil to turn it off. + Suggested by Gary D. Foster <Gary.Foster@Corp.Sun.COM> + 1997-08-09 Karl M. Hegbloom <karlheg@inetarena.com> * packages/info.el: (info::toolbar) swap next and prev buttons to
--- a/lisp/apel/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/apel/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'apel-autoloads)) - (progn +(if (featurep 'apel-autoloads) (error "Already loaded")) ;;;### (autoloads (module-installed-p exec-installed-p file-installed-p get-latest-path add-latest-path add-path) "file-detect" "apel/file-detect.el") @@ -60,4 +59,3 @@ ;;;*** (provide 'apel-autoloads) -))
--- a/lisp/bytecomp/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/bytecomp/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'bytecomp-autoloads)) - (progn +(if (featurep 'bytecomp-autoloads) (error "Already loaded")) ;;;### (autoloads (batch-byte-recompile-directory batch-byte-recompile-directory-norecurse batch-byte-compile display-call-tree byte-compile-sexp byte-compile compile-defun byte-compile-file byte-recompile-file byte-recompile-directory byte-force-recompile) "bytecomp" "bytecomp/bytecomp.el") @@ -93,4 +92,3 @@ ;;;*** (provide 'bytecomp-autoloads) -))
--- a/lisp/calendar/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/calendar/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'calendar-autoloads)) - (progn +(if (featurep 'calendar-autoloads) (error "Already loaded")) ;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el") @@ -377,4 +376,3 @@ ;;;*** (provide 'calendar-autoloads) -))
--- a/lisp/cc-mode/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/cc-mode/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'cc-mode-autoloads)) - (progn +(if (featurep 'cc-mode-autoloads) (error "Already loaded")) ;;;### (autoloads nil "cc-langs" "cc-mode/cc-langs.el") @@ -144,4 +143,3 @@ ;;;*** (provide 'cc-mode-autoloads) -))
--- a/lisp/cc-mode/cc-align.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/cc-mode/cc-align.el Mon Aug 13 09:54:23 2007 +0200 @@ -7,7 +7,7 @@ ;; 1985 Richard M. Stallman ;; Maintainer: cc-mode-help@python.org ;; Created: 22-Apr-1997 (split from cc-mode.el) -;; Version: 5.15 +;; Version: 5.16 ;; Keywords: c languages oop ;; This file is part of GNU Emacs.
--- a/lisp/cc-mode/cc-cmds.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/cc-mode/cc-cmds.el Mon Aug 13 09:54:23 2007 +0200 @@ -7,7 +7,7 @@ ;; 1985 Richard M. Stallman ;; Maintainer: cc-mode-help@python.org ;; Created: 22-Apr-1997 (split from cc-mode.el) -;; Version: 5.15 +;; Version: 5.16 ;; Keywords: c languages oop ;; This file is part of GNU Emacs. @@ -196,7 +196,8 @@ blink-paren-function (insertion-point (point)) delete-temp-newline - (preserve-p (eq ? (char-syntax (char-before)))) + (preserve-p (and (not (bobp)) + (eq ?\ (char-syntax (char-before))))) ;; shut this up too (c-echo-syntactic-information-p nil) (syntax (progn @@ -749,7 +750,8 @@ ;; for proposed new variable comment-line-break-function (defun c-comment-line-break-function (&optional soft) ;; we currently don't do anything with soft line breaks - (if (not c-comment-continuation-stars) + (if (or (not c-comment-continuation-stars) + (not (c-in-literal))) (indent-new-comment-line soft) (let ((here (point)) (leader c-comment-continuation-stars)) @@ -774,6 +776,7 @@ (require 'advice) (defadvice indent-new-comment-line (around c-line-break-advice activate) (if (or (not c-buffer-is-cc-mode) + (not (c-in-literal)) (not c-comment-continuation-stars)) ad-do-it (c-comment-line-break-function (ad-get-arg 0))))) @@ -1251,10 +1254,9 @@ (and (looking-at comment-start-skip) (setq comment-start-place (point))))) (re1 "\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$")) - (if (and c-double-slash-is-comments-p - (save-excursion - (beginning-of-line) - (looking-at ".*//"))) + (if (save-excursion + (beginning-of-line) + (looking-at ".*//")) (let ((fill-prefix fill-prefix) ;; Lines containing just a comment start or just an end ;; should not be filled into paragraphs they are next
--- a/lisp/cc-mode/cc-compat.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/cc-mode/cc-compat.el Mon Aug 13 09:54:23 2007 +0200 @@ -5,7 +5,7 @@ ;; Author: 1994-1997 Barry A. Warsaw ;; Maintainer: cc-mode-help@python.org ;; Created: August 1994, split from cc-mode.el -;; Version: 5.15 +;; Version: 5.16 ;; Keywords: c languages oop ;; This file is part of GNU Emacs.
--- a/lisp/cc-mode/cc-defs.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/cc-mode/cc-defs.el Mon Aug 13 09:54:23 2007 +0200 @@ -7,7 +7,7 @@ ;; 1985 Richard M. Stallman ;; Maintainer: cc-mode-help@python.org ;; Created: 22-Apr-1997 (split from cc-mode.el) -;; Version: 5.15 +;; Version: 5.16 ;; Keywords: c languages oop ;; This file is part of GNU Emacs.
--- a/lisp/cc-mode/cc-engine.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/cc-mode/cc-engine.el Mon Aug 13 09:54:23 2007 +0200 @@ -7,7 +7,7 @@ ;; 1985 Richard M. Stallman ;; Maintainer: cc-mode-help@python.org ;; Created: 22-Apr-1997 (split from cc-mode.el) -;; Version: 5.15 +;; Version: 5.16 ;; Keywords: c languages oop ;; This file is part of GNU Emacs. @@ -171,16 +171,22 @@ (skip-chars-backward "-+!*&:.~" (c-point 'boi)))) (defun c-end-of-statement-1 () - (condition-case () - (progn + (condition-case nil + (let (beg end found) (while (and (not (eobp)) - (let ((beg (point))) + (progn + (setq beg (point)) (forward-sexp 1) - (let ((end (point))) - (save-excursion - (goto-char beg) - (not (re-search-forward "[;{}]" end t))))))) - (re-search-backward "[;}]") + (setq end (point)) + (goto-char beg) + (setq found nil) + (while (and (not found) + (re-search-forward "[;{}]" end t)) + (if (not (c-in-literal beg)) + (setq found t))) + (not found))) + (goto-char end)) + (re-search-backward "[;{}]") (forward-char 1)) (error (let ((beg (point)))
--- a/lisp/cc-mode/cc-langs.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/cc-mode/cc-langs.el Mon Aug 13 09:54:23 2007 +0200 @@ -7,7 +7,7 @@ ;; 1985 Richard M. Stallman ;; Maintainer: cc-mode-help@python.org ;; Created: 22-Apr-1997 (split from cc-mode.el) -;; Version: 5.15 +;; Version: 5.16 ;; Keywords: c languages oop ;; This file is part of GNU Emacs. @@ -179,10 +179,6 @@ (defvar c-auto-hungry-string nil) (make-variable-buffer-local 'c-auto-hungry-string) -;; Buffer local language-specific comment style flag. -(defvar c-double-slash-is-comments-p nil) -(make-variable-buffer-local 'c-double-slash-is-comments-p) - ;; Non-nil means K&R style argument declarations are valid. (defvar c-recognize-knr-p t) (make-variable-buffer-local 'c-recognize-knr-p)
--- a/lisp/cc-mode/cc-menus.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/cc-mode/cc-menus.el Mon Aug 13 09:54:23 2007 +0200 @@ -7,7 +7,7 @@ ;; 1985 Richard M. Stallman ;; Maintainer: cc-mode-help@python.org ;; Created: 22-Apr-1997 (split from cc-mode.el) -;; Version: 5.15 +;; Version: 5.16 ;; Keywords: c languages oop ;; This file is part of GNU Emacs.
--- a/lisp/cc-mode/cc-mode.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/cc-mode/cc-mode.el Mon Aug 13 09:54:23 2007 +0200 @@ -7,7 +7,7 @@ ;; 1985 Richard M. Stallman ;; Maintainer: cc-mode-help@python.org ;; Created: a long, long, time ago. adapted from the original c-mode.el -;; Version: 5.15 +;; Version: 5.16 ;; Keywords: c languages oop ;; NOTE: Read the commentary below for the right way to submit bug reports! @@ -81,6 +81,15 @@ (require 'cc-menus)) (require 'cc-defs) +(defvar c-buffer-is-cc-mode nil + "Non-nil for all buffers with a `major-mode' derived from CC Mode. +Otherwise, this variable is nil. I.e. this variable is non-nil for +`c-mode', `c++-mode', `objc-mode', `java-mode', `idl-mode', and any +other non-CC Mode mode that calls `c-initialize-cc-mode' +\(e.g. `awk-mode').") +(make-variable-buffer-local 'c-buffer-is-cc-mode) +(put 'c-buffer-is-cc-mode 'permanent-local t) + ;; Other modes and packages which depend on CC Mode should do the ;; following to make sure everything is loaded and available for their @@ -185,7 +194,6 @@ c-comment-start-regexp c-C++-comment-start-regexp c-class-key c-C++-class-key c-access-key c-C++-access-key - c-double-slash-is-comments-p t c-recognize-knr-p nil imenu-generic-expression cc-imenu-c++-generic-expression) (run-hooks 'c-mode-common-hook) @@ -226,7 +234,6 @@ c-class-key c-ObjC-class-key c-baseclass-key nil c-access-key c-ObjC-access-key - c-double-slash-is-comments-p t c-method-key c-ObjC-method-key) (run-hooks 'c-mode-common-hook) (run-hooks 'objc-mode-hook) @@ -267,7 +274,6 @@ c-comment-start-regexp c-Java-comment-start-regexp c-class-key c-Java-class-key c-method-key c-Java-method-key - c-double-slash-is-comments-p t c-baseclass-key nil c-recognize-knr-p nil c-access-key c-Java-access-key @@ -312,7 +318,6 @@ c-comment-start-regexp c-C++-comment-start-regexp c-class-key c-C++-class-key c-access-key c-C++-access-key - c-double-slash-is-comments-p t c-recognize-knr-p nil) ;; imenu-generic-expression cc-imenu-c++-generic-expression) (run-hooks 'c-mode-common-hook) @@ -321,7 +326,7 @@ ;; defuns for submitting bug reports -(defconst c-version "5.15" +(defconst c-version "5.16" "CC Mode version number.") (defconst c-mode-help-address
--- a/lisp/cc-mode/cc-styles.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/cc-mode/cc-styles.el Mon Aug 13 09:54:23 2007 +0200 @@ -7,7 +7,7 @@ ;; 1985 Richard M. Stallman ;; Maintainer: cc-mode-help@python.org ;; Created: 22-Apr-1997 (split from cc-mode.el) -;; Version: 5.15 +;; Version: 5.16 ;; Keywords: c languages oop ;; This file is part of GNU Emacs. @@ -43,6 +43,8 @@ (arglist-close . c-lineup-arglist) )) (c-special-indent-hook . c-gnu-impose-minimum) + (c-comment-continuation-stars . "") + (c-hanging-comment-ender-p . t) ) ("k&r" (c-basic-offset . 5) @@ -124,6 +126,7 @@ (substatement-open after) (block-close . c-snug-do-while) )) + (c-comment-continuation-stars "") ) ("java" (c-basic-offset . 2)
--- a/lisp/cc-mode/cc-vars.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/cc-mode/cc-vars.el Mon Aug 13 09:54:23 2007 +0200 @@ -7,7 +7,7 @@ ;; 1985 Richard M. Stallman ;; Maintainer: cc-mode-help@python.org ;; Created: 22-Apr-1997 (split from cc-mode.el) -;; Version: 5.15 +;; Version: 5.16 ;; Keywords: c languages oop ;; This file is part of GNU Emacs. @@ -409,13 +409,6 @@ (defvar c-indentation-style c-site-default-style "Name of style installed in the current buffer.") -(defvar c-buffer-is-cc-mode nil - "Non-nil for all buffers with a `major-mode' derived from CC Mode. -Otherwise, this variable is nil. I.e. this variable is non-nil for -`c-mode', `c++-mode', `objc-mode', `java-mode', `idl-mode', and any -other non-CC Mode mode that calls `c-initialize-cc-mode' -\(e.g. `awk-mode').") -(make-variable-buffer-local 'c-buffer-is-cc-mode) (provide 'cc-vars)
--- a/lisp/cl/cl-macs.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/cl/cl-macs.el Mon Aug 13 09:54:23 2007 +0200 @@ -2328,11 +2328,11 @@ name 'cl-deftype-handler (cons (list* '&cl-defs ''('*) args) body)))) (defun cl-make-type-test (val type) - (if (memq type '(character string-char)) (setq type '(integer 0 255))) (if (symbolp type) (cond ((get type 'cl-deftype-handler) (cl-make-type-test val (funcall (get type 'cl-deftype-handler)))) ((memq type '(nil t)) type) + ((eq type 'string-char) (list 'characterp val)) ((eq type 'null) (list 'null val)) ((eq type 'float) (list 'floatp-safe val)) ((eq type 'real) (list 'numberp val))
--- a/lisp/comint/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/comint/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'comint-autoloads)) - (progn +(if (featurep 'comint-autoloads) (error "Already loaded")) ;;;### (autoloads (background) "background" "comint/background.el") @@ -248,4 +247,3 @@ ;;;*** (provide 'comint-autoloads) -))
--- a/lisp/comint/custom-load.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/comint/custom-load.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,10 +1,10 @@ -(custom-put 'telnet 'custom-loads '("telnet")) -(custom-put 'ssh 'custom-loads '("ssh")) -(custom-put 'shell-faces 'custom-loads '("shell")) -(custom-put 'shell-directories 'custom-loads '("shell")) +(custom-put 'background 'custom-loads '("background")) +(custom-put 'comint 'custom-loads '("comint-xemacs" "comint" "telnet")) +(custom-put 'comint-completion 'custom-loads '("comint")) +(custom-put 'comint-source 'custom-loads '("comint")) +(custom-put 'rlogin 'custom-loads '("rlogin")) (custom-put 'shell 'custom-loads '("shell")) -(custom-put 'rlogin 'custom-loads '("rlogin")) -(custom-put 'comint-source 'custom-loads '("comint")) -(custom-put 'comint-completion 'custom-loads '("comint")) -(custom-put 'comint 'custom-loads '("comint-xemacs" "comint" "telnet")) -(custom-put 'background 'custom-loads '("background")) +(custom-put 'shell-directories 'custom-loads '("shell")) +(custom-put 'shell-faces 'custom-loads '("shell")) +(custom-put 'ssh 'custom-loads '("ssh")) +(custom-put 'telnet 'custom-loads '("telnet"))
--- a/lisp/custom/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/custom/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'custom-autoloads)) - (progn +(if (featurep 'custom-autoloads) (error "Already loaded")) ;;;### (autoloads (customize-menu-create custom-menu-create custom-save-all customize-save-customized customize-browse custom-buffer-create-other-window custom-buffer-create customize-apropos-groups customize-apropos-faces customize-apropos-options customize-apropos customize-saved customize-customized customize-face-other-window customize-face customize-option-other-window customize-option customize-group-other-window customize-group customize customize-save-variable customize-set-variable customize-set-value) "cus-edit" "custom/cus-edit.el") @@ -192,4 +191,3 @@ ;;;*** (provide 'custom-autoloads) -))
--- a/lisp/custom/custom-load.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/custom/custom-load.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,53 +1,53 @@ -(custom-put 'widget-button 'custom-loads '("wid-edit")) -(custom-put 'widget-faces 'custom-loads '("wid-edit")) -(custom-put 'widget-documentation 'custom-loads '("wid-edit")) -(custom-put 'widgets 'custom-loads '("wid-browse" "wid-edit")) -(custom-put 'widget-browse 'custom-loads '("wid-browse")) -(custom-put 'custom-magic-faces 'custom-loads '("cus-edit")) -(custom-put 'windows 'custom-loads '()) -(custom-put 'processes-basics 'custom-loads '()) -(custom-put 'auto-save 'custom-loads '()) -(custom-put 'keyboard 'custom-loads '()) -(custom-put 'minibuffer 'custom-loads '()) -(custom-put 'debug 'custom-loads '()) -(custom-put 'limits 'custom-loads '()) -(custom-put 'dired 'custom-loads '()) -(custom-put 'execute 'custom-loads '()) -(custom-put 'display 'custom-loads '()) -(custom-put 'editing-basics 'custom-loads '()) -(custom-put 'fill 'custom-loads '()) -(custom-put 'modeline 'custom-loads '()) -(custom-put 'undo 'custom-loads '()) -(custom-put 'alloc 'custom-loads '()) -(custom-put 'custom-menu 'custom-loads '("cus-edit")) -(custom-put 'custom-buffer 'custom-loads '("cus-edit")) -(custom-put 'custom-browse 'custom-loads '("cus-edit")) -(custom-put 'custom-faces 'custom-loads '("cus-edit")) -(custom-put 'customize 'custom-loads '("cus-edit" "wid-edit" "cus-face")) +(custom-put 'emacs 'custom-loads '("cus-edit")) +(custom-put 'editing 'custom-loads '("cus-edit")) +(custom-put 'abbrev 'custom-loads '("cus-edit")) +(custom-put 'matching 'custom-loads '()) +(custom-put 'mouse 'custom-loads '()) +(custom-put 'external 'custom-loads '("cus-edit")) +(custom-put 'processes 'custom-loads '("cus-edit")) +(custom-put 'programming 'custom-loads '("cus-edit")) +(custom-put 'languages 'custom-loads '("cus-edit")) +(custom-put 'lisp 'custom-loads '()) +(custom-put 'applications 'custom-loads '("cus-edit")) +(custom-put 'calendar 'custom-loads '()) +(custom-put 'development 'custom-loads '("cus-edit")) +(custom-put 'extensions 'custom-loads '("wid-edit")) +(custom-put 'internal 'custom-loads '("cus-edit")) +(custom-put 'maint 'custom-loads '()) +(custom-put 'environment 'custom-loads '("cus-edit")) +(custom-put 'i18n 'custom-loads '("cus-edit")) +(custom-put 'x 'custom-loads '()) +(custom-put 'frames 'custom-loads '()) +(custom-put 'data 'custom-loads '()) +(custom-put 'files 'custom-loads '("cus-edit")) +(custom-put 'wp 'custom-loads '("cus-edit")) +(custom-put 'faces 'custom-loads '("cus-edit" "wid-edit")) +(custom-put 'hypermedia 'custom-loads '("wid-edit")) +(custom-put 'help 'custom-loads '("cus-edit")) (custom-put 'local 'custom-loads '()) -(custom-put 'help 'custom-loads '("cus-edit")) -(custom-put 'hypermedia 'custom-loads '("wid-edit")) -(custom-put 'faces 'custom-loads '("cus-edit" "wid-edit")) -(custom-put 'wp 'custom-loads '("cus-edit")) -(custom-put 'files 'custom-loads '("cus-edit")) -(custom-put 'data 'custom-loads '()) -(custom-put 'frames 'custom-loads '()) -(custom-put 'x 'custom-loads '()) -(custom-put 'i18n 'custom-loads '("cus-edit")) -(custom-put 'environment 'custom-loads '("cus-edit")) -(custom-put 'maint 'custom-loads '()) -(custom-put 'internal 'custom-loads '("cus-edit")) -(custom-put 'extensions 'custom-loads '("wid-edit")) -(custom-put 'development 'custom-loads '("cus-edit")) -(custom-put 'calendar 'custom-loads '()) -(custom-put 'applications 'custom-loads '("cus-edit")) -(custom-put 'lisp 'custom-loads '()) -(custom-put 'languages 'custom-loads '("cus-edit")) -(custom-put 'programming 'custom-loads '("cus-edit")) -(custom-put 'processes 'custom-loads '("cus-edit")) -(custom-put 'external 'custom-loads '("cus-edit")) -(custom-put 'mouse 'custom-loads '()) -(custom-put 'matching 'custom-loads '()) -(custom-put 'abbrev 'custom-loads '("cus-edit")) -(custom-put 'editing 'custom-loads '("cus-edit")) -(custom-put 'emacs 'custom-loads '("cus-edit")) +(custom-put 'customize 'custom-loads '("cus-edit" "wid-edit" "cus-face")) +(custom-put 'custom-faces 'custom-loads '("cus-edit")) +(custom-put 'custom-browse 'custom-loads '("cus-edit")) +(custom-put 'custom-buffer 'custom-loads '("cus-edit")) +(custom-put 'custom-menu 'custom-loads '("cus-edit")) +(custom-put 'alloc 'custom-loads '()) +(custom-put 'undo 'custom-loads '()) +(custom-put 'modeline 'custom-loads '()) +(custom-put 'fill 'custom-loads '()) +(custom-put 'editing-basics 'custom-loads '()) +(custom-put 'display 'custom-loads '()) +(custom-put 'execute 'custom-loads '()) +(custom-put 'dired 'custom-loads '()) +(custom-put 'limits 'custom-loads '()) +(custom-put 'debug 'custom-loads '()) +(custom-put 'minibuffer 'custom-loads '()) +(custom-put 'keyboard 'custom-loads '()) +(custom-put 'auto-save 'custom-loads '()) +(custom-put 'processes-basics 'custom-loads '()) +(custom-put 'windows 'custom-loads '()) +(custom-put 'custom-magic-faces 'custom-loads '("cus-edit")) +(custom-put 'widget-browse 'custom-loads '("wid-browse")) +(custom-put 'widgets 'custom-loads '("wid-browse" "wid-edit")) +(custom-put 'widget-documentation 'custom-loads '("wid-edit")) +(custom-put 'widget-faces 'custom-loads '("wid-edit")) +(custom-put 'widget-button 'custom-loads '("wid-edit"))
--- a/lisp/edebug/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/edebug/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'edebug-autoloads)) - (progn +(if (featurep 'edebug-autoloads) (error "Already loaded")) ;;;### (autoloads (edebug-eval-top-level-form def-edebug-spec) "edebug" "edebug/edebug.el") @@ -20,4 +19,3 @@ ;;;*** (provide 'edebug-autoloads) -))
--- a/lisp/ediff/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/ediff/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'ediff-autoloads)) - (progn +(if (featurep 'ediff-autoloads) (error "Already loaded")) ;;;### (autoloads (ediff-show-registry) "ediff-mult" "ediff/ediff-mult.el") @@ -184,4 +183,3 @@ ;;;*** (provide 'ediff-autoloads) -))
--- a/lisp/ediff/custom-load.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/ediff/custom-load.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,6 @@ -(custom-put 'ediff 'custom-loads '("ediff-diff" "ediff-merg" "ediff-mult" "ediff-ptch" "ediff-wind" "ediff" "ediff-init")) -(custom-put 'ediff-window 'custom-loads '()) +(custom-put 'ediff-diff 'custom-loads '("ediff-diff")) +(custom-put 'ediff-merge 'custom-loads '("ediff-merg")) +(custom-put 'ediff-mult 'custom-loads '("ediff-mult")) (custom-put 'ediff-ptch 'custom-loads '("ediff-ptch")) -(custom-put 'ediff-mult 'custom-loads '("ediff-mult")) -(custom-put 'ediff-merge 'custom-loads '("ediff-merg")) -(custom-put 'ediff-diff 'custom-loads '("ediff-diff")) +(custom-put 'ediff-window 'custom-loads '()) +(custom-put 'ediff 'custom-loads '("ediff-diff" "ediff-merg" "ediff-mult" "ediff-ptch" "ediff-wind" "ediff" "ediff-init"))
--- a/lisp/efs/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/efs/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'efs-autoloads)) - (progn +(if (featurep 'efs-autoloads) (error "Already loaded")) ;;;### (autoloads nil "default-dir" "efs/default-dir.el") @@ -267,4 +266,3 @@ ;;;*** (provide 'efs-autoloads) -))
--- a/lisp/efs/dired.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/efs/dired.el Mon Aug 13 09:54:23 2007 +0200 @@ -386,7 +386,7 @@ ;;; File name regular expressions and extensions. -(defvar dired-trivial-filenames "^\\.\\.?$\\|^#" +(defvar dired-trivial-filenames "\\`\\.\\.?\\'\\|\\`#" "*Regexp of files to skip when finding first file of a directory listing. A value of nil means move to the subdir line. A value of t means move to first file.") @@ -421,7 +421,7 @@ See also `dired-omit-extensions'.") (make-variable-buffer-local 'dired-omit-extensions) -(defvar dired-omit-regexps '("^#" "^\\.") +(defvar dired-omit-regexps '("\\`#" "\\`\\.") "*File names matching these regexp may be omitted (buffer-local). This only has effect when the subdirectory is in omission mode. To make omission mode the default, set `dired-omit-files' to t. @@ -429,7 +429,7 @@ See also `dired-omit-extensions'.") (make-variable-buffer-local 'dired-omit-regexps) -(defvar dired-filename-re-ext "\\..+$" ; start from the first dot. last dot? +(defvar dired-filename-re-ext "\\..+\\'" ; start from the first dot. last dot? "*Defines what is the extension of a file name. \(match-beginning 0\) for this regexp in the file name without directory will be taken to be the start of the extension.") @@ -2818,7 +2818,8 @@ (defun dired-find-file () "In dired, visit the file or directory named on this line." (interactive) - (find-file (dired-get-filename))) + (let ((find-file-run-dired t)) + (find-file (dired-get-filename)))) (defun dired-view-file () "In dired, examine a file in view mode, returning to dired when done. @@ -2837,18 +2838,21 @@ (interactive "P") (if displayp (dired-display-file) - (find-file-other-window (dired-get-filename)))) + (let ((find-file-run-dired t)) + (find-file-other-window (dired-get-filename))))) ;; Only for Emacs 19 (defun dired-find-file-other-frame () "In dired, visit this file or directory in another frame." (interactive) - (find-file-other-frame (dired-get-filename))) + (let ((find-file-run-dired t)) + (find-file-other-frame (dired-get-filename)))) (defun dired-display-file () "In dired, displays this file or directory in the other window." (interactive) - (display-buffer (find-file-noselect (dired-get-filename)))) + (let ((find-file-run-dired t)) + (display-buffer (find-file-noselect (dired-get-filename))))) ;; After an idea by wurgler@zippysun.math.uakron.edu (Tom Wurgler). (defun dired-do-find-file (&optional arg) @@ -2879,7 +2883,8 @@ ;; The upper window will have SIZE lines. We select the lower ;; (larger) window because we want to split that again. (select-window (split-window nil size)) - (find-file (car file-list)) + (let ((find-file-run-dired t)) + (find-file (car file-list))) (setq file-list (cdr file-list))))) (defun dired-create-directory (directory) @@ -3050,14 +3055,14 @@ (defun dired-file-name-sans-rcs-extension (fn) "Returns the file name FN without its RCS extension \",v\"." (setq fn (file-name-nondirectory fn)) - (if (string-match ",v$" fn 1) + (if (string-match ",v\\'" fn 1) (substring fn 0 (match-beginning 0)) fn)) (defun dired-file-name-sans-compress-extension (fn) "Returns the file name FN without the extension from compress or gzip." (setq fn (file-name-nondirectory fn)) - (if (string-match "\\.\\([zZ]\\|gz\\)$" fn 1) + (if (string-match "\\.\\([zZ]\\|gz\\)\\'" fn 1) (substring fn (match-beginning 0)) fn)) @@ -4217,7 +4222,7 @@ "RCS") ;; skip inserted RCS subdirs (setq rcs-files - (append (directory-files dir t ",v$") ; *,v and RCS/*,v + (append (directory-files dir t ",v\\'") ; *,v and RCS/*,v (let ((rcs-dir (expand-file-name "RCS" dir))) (if (file-directory-p rcs-dir) (mapcar ; working files from ./RCS are in ./ @@ -4226,7 +4231,7 @@ (expand-file-name x dir))) (directory-files (file-name-as-directory rcs-dir) - nil ",v$")))) + nil ",v\\'")))) rcs-files))))) (mapcar (function car) dired-subdir-alist)) (setq total (length rcs-files)) @@ -5434,7 +5439,7 @@ (setq rgxp (concat ".\\(" (mapconcat 'regexp-quote dired-omit-extensions "\\|") - "\\)$"))) + "\\)\\'"))) (if dired-omit-regexps (setq rgxp (concat
--- a/lisp/egg/egg.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/egg/egg.el Mon Aug 13 09:54:23 2007 +0200 @@ -403,13 +403,18 @@ "FSFmacs event emulator that shoves non key events into unread-command-events to facilitate translation from Mule-2.3" (let ((event (make-event)) - (ch nil)) + ch key) (next-command-event event) + (setq key (event-key event)) (if (key-press-event-p event) (if (eq 0 (event-modifier-bits event)) - (setq ch (event-key event)) + (setq ch (or (event-to-character event) key)) (if (eq 1 (event-modifier-bits event)) - (setq ch (int-to-char (- (char-to-int (event-key event)) 96))) + (setq ch + (if (characterp key) + (or (int-to-char (- (char-to-int key) 96)) + (int-to-char (- (char-to-int key) 64))) + (event-to-character event))) (setq unread-command-events (list event)))) (setq unread-command-events (list event))) ch)) @@ -929,7 +934,7 @@ (narrow-to-region start end) (goto-char (point-min)) (while (re-search-forward "\\cS\\|\\cA\\|\\cK" (point-max) (point-max)) - (let* ((ch (preceding-char)) + (let* ((ch (char-before (point))) (ch1 (char-octet ch 0)) (ch2 (char-octet ch 1))) (cond ((= ch1 33) ;Symbols @@ -1014,13 +1019,14 @@ (narrow-to-region start end) (goto-char (point-min)) (while (re-search-forward "[ -~]" (point-max) (point-max)) - (let ((ch (preceding-char))) + (let ((ch (char-before (point)))) (if (and (<= ? ch) (<= ch ?~)) (progn (delete-char -1) (let ((zen (cdr (assq ch *zenkaku-alist*)))) (if zen (insert zen) - (insert (make-char (find-charset 'japanese-jisx0208) 38 ch)))))))))) + (insert (make-char (find-charset 'japanese-jisx0208) 38 + (char-to-int ch))))))))))) (defun zenkaku-paragraph () "zenkaku paragraph at or after point." @@ -1602,7 +1608,7 @@ ch) nil)) nil) - (following-char))) + (char-after (point)))) (defun its:read-char () (if (= (point) its:*buff-e*) @@ -1611,7 +1617,7 @@ (if its:*interactive* (egg-read-event) nil)) - (let ((ch (following-char))) + (let ((ch (char-after (point)))) (setq its:*char-from-buff* t) (delete-char 1) ch))) @@ -2682,9 +2688,9 @@ (fence-exit-internal)) (defun fence-exit-internal () + (egg:fence-face-off) (delete-region (- egg:*region-start* (length egg:*fence-open*)) egg:*region-start*) (delete-region egg:*region-end* (+ egg:*region-end* (length egg:*fence-close*))) - (egg:fence-face-off) (if its:*previous-map* (setq its:*current-map* its:*previous-map* its:*previous-map* nil))
--- a/lisp/electric/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/electric/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'electric-autoloads)) - (progn +(if (featurep 'electric-autoloads) (error "Already loaded")) ;;;### (autoloads (electric-buffer-list) "ebuff-menu" "electric/ebuff-menu.el") @@ -95,4 +94,3 @@ ;;;*** (provide 'electric-autoloads) -))
--- a/lisp/emulators/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/emulators/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'emulators-autoloads)) - (progn +(if (featurep 'emulators-autoloads) (error "Already loaded")) ;;;### (autoloads (edt-emulation-on) "edt" "emulators/edt.el") @@ -151,4 +150,3 @@ ;;;*** (provide 'emulators-autoloads) -))
--- a/lisp/eterm/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/eterm/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'eterm-autoloads)) - (progn +(if (featurep 'eterm-autoloads) (error "Already loaded")) ;;;### (autoloads (term make-term) "term" "eterm/term.el") @@ -86,4 +85,3 @@ ;;;*** (provide 'eterm-autoloads) -))
--- a/lisp/games/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/games/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'games-autoloads)) - (progn +(if (featurep 'games-autoloads) (error "Already loaded")) ;;;### (autoloads (blackbox) "blackbox" "games/blackbox.el") @@ -319,4 +318,3 @@ ;;;*** (provide 'games-autoloads) -))
--- a/lisp/gnats/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/gnats/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'gnats-autoloads)) - (progn +(if (featurep 'gnats-autoloads) (error "Already loaded")) ;;;### (autoloads (gnats:summ-pr gnats:query-pr gnats:edit-pr gnats:view-pr gnats:gnats-mode) "gnats" "gnats/gnats.el") @@ -71,4 +70,3 @@ ;;;*** (provide 'gnats-autoloads) -))
--- a/lisp/hm--html-menus/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/hm--html-menus/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'hm--html-menus-autoloads)) - (progn +(if (featurep 'hm--html-menus-autoloads) (error "Already loaded")) ;;;### (autoloads (hm--html-minor-mode hm--html-mode) "hm--html-mode" "hm--html-menus/hm--html-mode.el") @@ -74,4 +73,3 @@ ;;;*** (provide 'hm--html-menus-autoloads) -))
--- a/lisp/hm--html-menus/custom-load.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/hm--html-menus/custom-load.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,12 +1,12 @@ -(custom-put 'hm--html 'custom-loads '("hm--html-configuration")) -(custom-put 'hm--html-files 'custom-loads '("hm--html-configuration")) -(custom-put 'hm--html-document-information 'custom-loads '("hm--html-configuration")) -(custom-put 'hm--html-menus 'custom-loads '("hm--html-configuration")) -(custom-put 'hm--html-links 'custom-loads '("hm--html-configuration")) +(custom-put 'tmpl-minor 'custom-loads '("tmpl-minor-mode")) +(custom-put 'idd-drag-and-drop 'custom-loads '("internal-drag-and-drop")) +(custom-put 'hm--html-indentation 'custom-loads '("hm--html-configuration")) +(custom-put 'hm--html-hooks 'custom-loads '("hm--html-configuration")) +(custom-put 'hm--html-display 'custom-loads '("hm--html-configuration")) +(custom-put 'hm--html-keys 'custom-loads '("hm--html-configuration")) (custom-put 'hm--html-templates 'custom-loads '("hm--html-configuration")) -(custom-put 'hm--html-keys 'custom-loads '("hm--html-configuration")) -(custom-put 'hm--html-display 'custom-loads '("hm--html-configuration")) -(custom-put 'hm--html-hooks 'custom-loads '("hm--html-configuration")) -(custom-put 'hm--html-indentation 'custom-loads '("hm--html-configuration")) -(custom-put 'idd-drag-and-drop 'custom-loads '("internal-drag-and-drop")) -(custom-put 'tmpl-minor 'custom-loads '("tmpl-minor-mode")) +(custom-put 'hm--html-links 'custom-loads '("hm--html-configuration")) +(custom-put 'hm--html-menus 'custom-loads '("hm--html-configuration")) +(custom-put 'hm--html-document-information 'custom-loads '("hm--html-configuration")) +(custom-put 'hm--html-files 'custom-loads '("hm--html-configuration")) +(custom-put 'hm--html 'custom-loads '("hm--html-configuration"))
--- a/lisp/hyperbole/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/hyperbole/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep '-autoloads)) - (progn +(if (featurep 'hyperbole-autoloads) (error "Already loaded")) ;;;### (autoloads (hmail:compose) "hmail" "hyperbole/hmail.el") @@ -421,5 +420,4 @@ ;;;*** -(provide '-autoloads) -)) +(provide 'hyperbole-autoloads)
--- a/lisp/iso/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/iso/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,9 +1,6 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'iso-autoloads)) - (progn +(if (featurep 'iso-autoloads) (error "Already loaded")) -(provide 'iso-autoloads) -)) ;;;### (autoloads (iso-accents-mode) "iso-acc" "iso/iso-acc.el") @@ -31,3 +28,5 @@ and a negative argument disables it." t nil) ;;;*** + +(provide 'iso-autoloads)
--- a/lisp/leim/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/leim/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,9 +1,6 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'leim-autoloads)) - (progn +(if (featurep 'leim-autoloads) (error "Already loaded")) -(provide 'leim-autoloads) -)) ;;;### (autoloads (quail-use-package) "quail" "leim/quail.el") @@ -12,3 +9,5 @@ The remaining arguments are libraries to be loaded before using the package." nil nil) ;;;*** + +(provide 'leim-autoloads)
--- a/lisp/mailcrypt/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/mailcrypt/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'mailcrypt-autoloads)) - (progn +(if (featurep 'mailcrypt-autoloads) (error "Already loaded")) ;;;### (autoloads (mc-deactivate-passwd mc-install-write-mode mc-install-read-mode) "mailcrypt" "mailcrypt/mailcrypt.el") @@ -156,4 +155,3 @@ ;;;*** (provide 'mailcrypt-autoloads) -))
--- a/lisp/mh-e/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/mh-e/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'mh-e-autoloads)) - (progn +(if (featurep 'mh-e-autoloads) (error "Already loaded")) ;;;### (autoloads (mh-letter-mode mh-smail-other-window mh-smail-batch mh-smail) "mh-comp" "mh-e/mh-comp.el") @@ -87,4 +86,3 @@ ;;;*** (provide 'mh-e-autoloads) -))
--- a/lisp/mh-e/custom-load.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/mh-e/custom-load.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,4 +1,4 @@ -(custom-put 'mh-compose 'custom-loads '("mh-comp")) +(custom-put 'mh-buffer 'custom-loads '("mh-utils")) +(custom-put 'mh-hook 'custom-loads '("mh-e")) (custom-put 'mh 'custom-loads '("mh-comp" "mh-e" "mh-utils")) -(custom-put 'mh-hook 'custom-loads '("mh-e")) -(custom-put 'mh-buffer 'custom-loads '("mh-utils")) +(custom-put 'mh-compose 'custom-loads '("mh-comp"))
--- a/lisp/modes/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/modes/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'modes-autoloads)) - (progn +(if (featurep 'modes-autoloads) (error "Already loaded")) ;;;### (autoloads nil "abbrev" "modes/abbrev.el") @@ -570,7 +569,7 @@ ;;;### (autoloads (ksh-mode) "ksh-mode" "modes/ksh-mode.el") (autoload 'ksh-mode "ksh-mode" "\ -ksh-mode $Revision: 1.7 $ - Major mode for editing (Bourne, Korn or Bourne again) +ksh-mode $Revision: 1.8 $ - Major mode for editing (Bourne, Korn or Bourne again) shell scripts. Special key bindings and commands: \\{ksh-mode-map} @@ -1939,7 +1938,7 @@ (autoload 'vhdl-mode "vhdl-mode" "\ Major mode for editing VHDL code. -vhdl-mode $Revision: 1.7 $ +vhdl-mode $Revision: 1.8 $ To submit a problem report, enter `\\[vhdl-submit-bug-report]' from a vhdl-mode buffer. This automatically sets up a mail buffer with version information already added. You just need to add a description of the @@ -2092,4 +2091,3 @@ ;;;*** (provide 'modes-autoloads) -))
--- a/lisp/modes/custom-load.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/modes/custom-load.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,31 +1,31 @@ -(custom-put 'xrdb 'custom-loads '("xrdb-mode")) -(custom-put 'winmgr 'custom-loads '("winmgr-mode")) -(custom-put 'whitespace 'custom-loads '("whitespace-mode")) -(custom-put 'vrml 'custom-loads '("vrml-mode")) -(custom-put 'verilog 'custom-loads '("verilog-mode")) -(custom-put 'texinfo 'custom-loads '("texinfo")) -(custom-put 'tcl 'custom-loads '("tcl")) -(custom-put 'strokes 'custom-loads '("strokes")) -(custom-put 'sh-script 'custom-loads '("sh-script")) -(custom-put 'sh 'custom-loads '("sh-script")) -(custom-put 'resize-minibuffer 'custom-loads '("rsz-minibuf")) -(custom-put 'rexx 'custom-loads '("rexx-mode")) -(custom-put 'reftex-label-support 'custom-loads '("reftex")) -(custom-put 'reftex 'custom-loads '("reftex")) -(custom-put 'prolog 'custom-loads '("prolog")) +(custom-put 'asm 'custom-loads '("asm-mode")) +(custom-put 'auto-show 'custom-loads '("auto-show")) +(custom-put 'lisp-indent 'custom-loads '("cl-indent")) +(custom-put 'c-macro 'custom-loads '("cmacexp")) +(custom-put 'enriched 'custom-loads '("enriched")) +(custom-put 'executable 'custom-loads '("executable")) +(custom-put 'f90 'custom-loads '("f90")) +(custom-put 'f90-indent 'custom-loads '("f90")) +(custom-put 'fortran 'custom-loads '("f90" "fortran")) +(custom-put 'fortran-indent 'custom-loads '("fortran")) +(custom-put 'fortran-comment 'custom-loads '("fortran")) +(custom-put 'icon 'custom-loads '("icon")) +(custom-put 'mail-abbrevs 'custom-loads '("mail-abbrevs")) +(custom-put 'makefile-mode 'custom-loads '("make-mode")) +(custom-put 'outl-mouse 'custom-loads '("outl-mouse")) (custom-put 'pascal 'custom-loads '("pascal")) -(custom-put 'outl-mouse 'custom-loads '("outl-mouse")) -(custom-put 'makefile-mode 'custom-loads '("make-mode")) -(custom-put 'mail-abbrevs 'custom-loads '("mail-abbrevs")) -(custom-put 'icon 'custom-loads '("icon")) -(custom-put 'fortran-comment 'custom-loads '("fortran")) -(custom-put 'fortran-indent 'custom-loads '("fortran")) -(custom-put 'fortran 'custom-loads '("f90" "fortran")) -(custom-put 'f90-indent 'custom-loads '("f90")) -(custom-put 'f90 'custom-loads '("f90")) -(custom-put 'executable 'custom-loads '("executable")) -(custom-put 'enriched 'custom-loads '("enriched")) -(custom-put 'c-macro 'custom-loads '("cmacexp")) -(custom-put 'lisp-indent 'custom-loads '("cl-indent")) -(custom-put 'auto-show 'custom-loads '("auto-show")) -(custom-put 'asm 'custom-loads '("asm-mode")) +(custom-put 'prolog 'custom-loads '("prolog")) +(custom-put 'reftex 'custom-loads '("reftex")) +(custom-put 'reftex-label-support 'custom-loads '("reftex")) +(custom-put 'rexx 'custom-loads '("rexx-mode")) +(custom-put 'resize-minibuffer 'custom-loads '("rsz-minibuf")) +(custom-put 'sh 'custom-loads '("sh-script")) +(custom-put 'sh-script 'custom-loads '("sh-script")) +(custom-put 'strokes 'custom-loads '("strokes")) +(custom-put 'tcl 'custom-loads '("tcl")) +(custom-put 'texinfo 'custom-loads '("texinfo")) +(custom-put 'verilog 'custom-loads '("verilog-mode")) +(custom-put 'vrml 'custom-loads '("vrml-mode")) +(custom-put 'whitespace 'custom-loads '("whitespace-mode")) +(custom-put 'winmgr 'custom-loads '("winmgr-mode")) +(custom-put 'xrdb 'custom-loads '("xrdb-mode"))
--- a/lisp/mule/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/mule/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'mule-autoloads)) - (progn +(if (featurep 'mule-autoloads) (error "Already loaded")) ;;;### (autoloads (isearch-fep-quail isearch-fep-canna isearch-fep-egg isearch-fep-string) "isearch-mule" "mule/isearch-mule.el") @@ -254,4 +253,3 @@ ;;;*** (provide 'mule-autoloads) -))
--- a/lisp/oobr/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/oobr/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep '-autoloads)) - (progn +(if (featurep 'oobr-autoloads) (error "Already loaded")) ;;;### (autoloads (br-env-load br-env-browse) "br-env" "oobr/br-env.el") @@ -131,5 +130,4 @@ ;;;*** -(provide '-autoloads) -)) +(provide 'oobr-autoloads)
--- a/lisp/packages/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/packages/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'packages-autoloads)) - (progn +(if (featurep 'packages-autoloads) (error "Already loaded")) ;;;### (autoloads (add-log-current-defun change-log-mode add-change-log-entry-other-window add-change-log-entry find-change-log prompt-for-change-log-name) "add-log" "packages/add-log.el") @@ -2341,4 +2340,3 @@ ;;;*** (provide 'packages-autoloads) -))
--- a/lisp/packages/gnuserv.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/packages/gnuserv.el Mon Aug 13 09:54:23 2007 +0200 @@ -446,8 +446,10 @@ (pushnew (current-buffer) (gnuclient-buffers client)) (setq gnuserv-minor-mode t) ;; Add the "Done" button to the menubar, only in this buffer. - (set-buffer-menubar current-menubar) - (add-menu-button nil ["Done" gnuserv-edit t])) + (if (boundp 'current-menubar) + (progn (set-buffer-menubar current-menubar) + (add-menu-button nil ["Done" gnuserv-edit t])) + )) (run-hooks 'gnuserv-visit-hook) (pop list))) (cond @@ -604,7 +606,8 @@ (run-hooks 'gnuserv-done-hook) (setq gnuserv-minor-mode nil) ;; Delete the menu button. - (delete-menu-item '("Done")) + (if (boundp 'current-menubar) + (delete-menu-item '("Done"))) (funcall (if (gnuserv-temp-file-p buffer) gnuserv-done-temp-file-function gnuserv-done-function)
--- a/lisp/packages/info.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/packages/info.el Mon Aug 13 09:54:23 2007 +0200 @@ -370,7 +370,9 @@ (defcustom Info-default-directory-list nil "*List of default directories to search for Info documentation files. This value is used as the default for `Info-directory-list'. -It is set in startup.el." +It is set in startup.el. The first directory in this list must +contain a `dir' file that will become the basis for the toplevel Info +directory." :type '(repeat directory) :group 'info) @@ -393,7 +395,7 @@ path (substring path (min (1+ idx) (length path))))) (nreverse list)) - Info-default-directory-list)) + (reverse Info-default-directory-list))) "List of directories to search for Info documentation files. Default is to use the environment variable INFOPATH if it exists, else to use Info-default-directory-list.") @@ -812,13 +814,21 @@ (cond ((re-search-backward "^ *\\* *Locals *: *\n" nil t) (delete-region (match-beginning 0) (match-end 0))) - ((re-search-backward "^Local" nil t) - (end-of-line)) + ((re-search-backward "^[ \t]*Local" nil t) + ;; This is for people who underline topic headings with + ;; equal signs or dashes. + (when (save-excursion + (forward-line 1) + (beginning-of-line) + (looking-at "^[ \t]*[-=]+")) + (forward-line 1)) + (forward-line 1) + (beginning-of-line)) (t (search-backward "\^L" nil t))) ;; Insert menu part of the file (let* ((pt (point)) (len (length (buffer-string nil nil other)))) - (insert "\n" (buffer-string nil nil other)) + (insert (buffer-string nil nil other)) (goto-char (+ pt len)) (save-excursion (goto-char pt) @@ -1059,7 +1069,7 @@ "") ")" (or Info-current-node "")))))) - + ;; Go to an info node specified with a filename-and-nodename string ;; of the sort that is found in pointers in nodes. @@ -1249,8 +1259,7 @@ (or (and (equal onode Info-current-node) (equal ofile Info-current-file)) (Info-history-add ofile onode opoint))))) - - + ;; Extract the value of the node-pointer named NAME. ;; If there is none, use ERRORNAME in the error message; ;; if ERRORNAME is nil, just return nil. @@ -1338,7 +1347,7 @@ "Go to the Info directory node." (interactive) (Info-find-node "dir" "top")) - + (defun Info-follow-reference (footnotename) "Follow cross reference named NAME to the node it refers to. NAME may be an abbreviation of the reference name." @@ -2060,8 +2069,7 @@ (or (equal tag "") (insert "<<" tag ">>")))) (Info-cease-annotate)) - - + (defun Info-exit () "Exit Info by selecting some other buffer." (interactive) @@ -2230,7 +2238,6 @@ (name (nth 1 (nth 1 data)))) (and name (nth 1 data)))) (error nil))) - (defvar Info-mode-map nil "Keymap containing Info commands.") @@ -2292,7 +2299,6 @@ (define-key Info-mode-map 'delete 'Info-scroll-prev) (define-key Info-mode-map 'button2 'Info-follow-clicked-node) (define-key Info-mode-map 'button3 'Info-select-node-menu)) - ;; Info mode is suitable only for specially formatted data. (put 'info-mode 'mode-class 'special) @@ -2471,7 +2477,6 @@ 0) where))) where))) - ;;; fontification and mousability for info @@ -2697,7 +2702,6 @@ "Up entry to enclosing section"] ))) ;)) - (provide 'info)
--- a/lisp/packages/lazy-lock.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/packages/lazy-lock.el Mon Aug 13 09:54:23 2007 +0200 @@ -736,7 +736,7 @@ (we (if lazy-lock-hide-invisible (save-excursion (end-of-line) (forward-line (window-height)) (point)) - (min (max (1- (window-end)) (point-min)) (point-max))))) + (min (max (1- (window-end nil t)) (point-min)) (point-max))))) (if (or (/= ws lazy-lock-cache-start) (/= we lazy-lock-cache-end)) ;; Find where we haven't `fontified' before. (let* ((start (or (text-property-not-all ws we 'fontified t) ws))
--- a/lisp/packages/man.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/packages/man.el Mon Aug 13 09:54:23 2007 +0200 @@ -70,6 +70,13 @@ :type 'boolean :group 'man) +(defcustom Manual-buffers-have-stars nil + "*When T, manual page buffers are always named like *man*. +Otherwise, they are not if `buffers-menu-submenus-for-groups-p' is T, +so that Manual-mode buffers will have their own submenu." + :type 'boolean + :group 'man) + (defcustom Manual-use-rosetta-man (not (null (locate-file "rman" exec-path))) "\ If non-nil, use RosettaMan (rman) to filter man pages. This makes man-page cleanup virtually instantaneous, instead of @@ -202,9 +209,10 @@ (let ((bufname (flet ((maybe-star () - (if buffers-menu-submenus-for-groups-p - "" - "*"))) + (if (or Manual-buffers-have-stars + (not buffers-menu-submenus-for-groups-p)) + "*" + ""))) (if apropos-mode (concat (maybe-star) "man apropos " topic (maybe-star)) (concat (maybe-star) @@ -261,15 +269,9 @@ (message "%s (done.)" args-string)) (set-buffer-modified-p nil) (Manual-mode))))) - - (let ((page (flet - ((maybe-star () - (if buffers-menu-submenus-for-groups-p - "" - "*"))) - (if section - (concat (maybe-star) topic "(" section ")" (maybe-star)) - topic)))) + (let ((page (if section + (concat topic "(" section ")") + topic))) (setq Manual-page-history (cons (buffer-name) (delete (buffer-name) Manual-page-history)) @@ -513,6 +515,8 @@ (defun Manual-mouseify-xrefs () (goto-char (point-min)) + ;; skip the top line of manual pages, but not apropos listings. + (unless apropos-mode (forward-line 1)) (let ((case-fold-search nil) s e name splitp extent) ;; possibly it would be faster to rewrite this expression to search for @@ -528,7 +532,6 @@ (goto-char s) ;; if this is a hyphenated xref, we're on the second line, 1st char now. - (when (progn (beginning-of-line) (and (looking-at (concat "^[ \t]+" (regexp-quote name))) @@ -650,9 +653,10 @@ (setq manpage "???")) (flet ((maybe-star () - (if buffers-menu-submenus-for-groups-p - "*" - ""))) + (if (or Manual-buffers-have-stars + (not buffers-menu-submenus-for-groups-p)) + "*" + ""))) (setq buffer (rename-buffer (generate-new-buffer-name (concat (maybe-star)
--- a/lisp/paths.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/paths.el Mon Aug 13 09:54:23 2007 +0200 @@ -216,6 +216,8 @@ "/var/mail/") ((memq system-type '(dgux hpux usg-unix-v unisoft-unix rtu irix)) "/usr/mail/") + ((memq system-type '(linux)) + "/var/spool/mail/") (t "/usr/spool/mail/"))) (funcall
--- a/lisp/pcl-cvs/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/pcl-cvs/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'pcl-cvs-autoloads)) - (progn +(if (featurep 'pcl-cvs-autoloads) (error "Already loaded")) ;;;### (autoloads (pcl-cvs-fontify) "pcl-cvs-xemacs" "pcl-cvs/pcl-cvs-xemacs.el") @@ -25,4 +24,3 @@ ;;;*** (provide 'pcl-cvs-autoloads) -))
--- a/lisp/prim/about.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/prim/about.el Mon Aug 13 09:54:23 2007 +0200 @@ -1186,7 +1186,7 @@ (print-short "Frederic Poncin" "fp@info.ucl.ac.be") (print-short "E. Rehmi Post" "rehmi@asylum.sf.ca.us") (print-short "Martin Pottendorfer" "Martin.Pottendorfer@aut.alcatel.at") - (print-short "Colin Rafferty" "craffert@spspme.ml.com") + (print-short "Colin Rafferty" "craffert@ml.com") (print-short "Paul M Reilly" "pmr@pajato.com") (print-short "Jack Repenning" "jackr@sgi.com") (print-short "Daniel Rich" "drich@cisco.com")
--- a/lisp/prim/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/prim/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'prim-autoloads)) - (progn +(if (featurep 'prim-autoloads) (error "Already loaded")) ;;;### (autoloads (about-xemacs) "about" "prim/about.el") @@ -529,4 +528,3 @@ ;;;*** (provide 'prim-autoloads) -))
--- a/lisp/prim/frame.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/prim/frame.el Mon Aug 13 09:54:23 2007 +0200 @@ -863,6 +863,25 @@ (buffer-substring-no-properties begin end)) (error "CDE functionality not compiled in."))) +(defun offix-start-drag (event data &optional type) + "Implements the OffiX drag operation. +Calls the internal function offix-start-drag-internal to do the actual work. +If type is not given, DndText is assumed." + (interactive "esi") + (if (featurep 'offix) + (funcall (intern "offix-start-drag-internal") event data type) + (error "OffiX functionality not compiled in."))) + +(defun offix-start-drag-region (event begin end) + "Implements the OffiX drag operation for a region. +Calls the internal function offix-start-drag-internal to do the actual work. +This always assumes DndText as type." + (interactive "_er") + (if (featurep 'offix) + (funcall (intern "offix-start-drag-internal") + event (buffer-substring-no-properties begin end)) + (error "OffiX functionality not compiled in."))) + ;;; Application-specific frame-management
--- a/lisp/prim/help.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/prim/help.el Mon Aug 13 09:54:23 2007 +0200 @@ -28,7 +28,7 @@ ;; This code implements XEmacs's on-line help system, the one invoked by ;;`M-x help-for-help'. - + ;; 06/11/1997 -- Converted to use char-after instead of broken ;; following-char. -slb @@ -409,10 +409,10 @@ (message "%s is undefined" (key-description key)) (with-displaying-help-buffer (lambda () -; (princ (key-description key)) -; (princ " runs the command ") - (prin1 defn) - (princ ":\n") + (princ (key-description key)) + (princ " runs ") + (princ (format "`%s'" defn)) + (princ "\n\n") (cond ((or (stringp defn) (vectorp defn)) (let ((cmd (key-binding defn))) (if (not cmd) @@ -778,19 +778,18 @@ :group 'help-appearance) (defun describe-function-find-file (function) - (and (boundp 'load-history) ; not standardly bound in XEmacs - (let ((files load-history) + (let ((files load-history) file) (while files (if (memq function (cdr (car files))) (setq file (car (car files)) files nil)) (setq files (cdr files))) - file))) + file)) (defun describe-function (function) "Display the full documentation of FUNCTION (a symbol)." (interactive - (let* ((fn (function-called-at-point)) + (let* ((fn (funcall find-function-function)) (val (let ((enable-recursive-minibuffers t)) (completing-read (if fn @@ -858,8 +857,7 @@ ;(gettext "an interactive autoloaded Lisp macro") (defun describe-function-1 (function stream &optional nodoc) - (prin1 function stream) - (princ ": " stream) + (princ (format "`%S' is " function) stream) (let* ((def function) file-name (doc (or (documentation function) @@ -870,9 +868,11 @@ (if aliases ;; I18N3 Need gettext due to concat (setq aliases (concat aliases - (format "\n which is an alias for %s, " + (format + "\n which is an alias for `%s', " (symbol-name def)))) - (setq aliases (format "an alias for %s, " (symbol-name def))))) + (setq aliases (format "an alias for `%s', " + (symbol-name def))))) (setq def (symbol-function def))) (if (compiled-function-p def) (setq home (compiled-function-annotation def))) @@ -880,25 +880,6 @@ (setq fndef (cdr def) macrop t) (setq fndef def)) - (if describe-function-show-arglist - (if (cond ((eq 'autoload (car-safe fndef)) - nil) - ((eq 'lambda (car-safe fndef)) - (princ (or (nth 1 fndef) "()") stream) - t) - ((compiled-function-p fndef) - (princ (or (compiled-function-arglist fndef) "()") stream) - t) - ((and (subrp fndef) - (string-match "[\n\t ]*\narguments: ?\\((.*)\\)\n?\\'" - doc)) - (princ (substring doc (match-beginning 1) (match-end 1)) - stream) - (setq doc (substring doc 0 (match-beginning 0))) - t) - (t - nil)) - (princ "\n -- " stream))) (if aliases (princ aliases stream)) (let ((int #'(lambda (string an-p macro-p) (princ (format @@ -931,19 +912,46 @@ (funcall int "autoloaded Lisp" t (elt def 4))) (t nil))) + (princ "\n") (or file-name (setq file-name (describe-function-find-file function))) (if file-name - (princ (format ".\n -- loads from \"%s\"" file-name) stream)) + (princ (format " -- loads from \"%s\"\n" file-name) stream)) (if home - (princ (format ".\n -- loaded from %s" home))) - (princ "." stream) + (princ (format " -- loaded from \"%s\"\n" home)) stream) +;; (terpri stream) + (if describe-function-show-arglist + (let ((arglist + (cond ((compiled-function-p fndef) + (compiled-function-arglist fndef)) + ((eq (car-safe fndef) 'lambda) + (nth 1 fndef)) + ((and (subrp fndef) + (string-match + "[\n\t ]*\narguments: ?(\\(.*\\))\n?\\'" + doc)) + (prog1 + (substring doc (match-beginning 1) (match-end 1)) + (setq doc (substring doc 0 (match-beginning 0))))) + (t t)))) + (if (listp arglist) + (progn +;; (princ " ") + (princ (cons function + (mapcar (lambda (arg) + (if (memq arg '(&optional &rest)) + arg + (intern (upcase (symbol-name arg))))) + arglist)) stream) + (terpri stream))) + (if (stringp arglist) + (princ (format "(%s %s)\n" function arglist) stream)))) (terpri stream) (cond (kbd-macro-p (princ "These characters are executed:\n\n\t" stream) (princ (key-description def) stream) (cond ((setq def (key-binding def)) - (princ (format "\n\nwhich executes the command %s.\n\n" def) stream) + (princ (format "\n\nwhich executes the command %S.\n\n" def) stream) (describe-function-1 def stream)))) (nodoc nil) (t @@ -1071,30 +1079,28 @@ (let ((origvar variable) aliases) (let ((print-escape-newlines t)) + (princ (format "`%s' is " (symbol-name variable))) (while (variable-alias variable) (let ((newvar (variable-alias variable))) (if aliases ;; I18N3 Need gettext due to concat (setq aliases (concat aliases - (format ",\n which is an alias for %s" + (format "\n which is an alias for `%s'," (symbol-name newvar)))) (setq aliases - (format "%s is an alias for %s" - (symbol-name variable) + (format "an alias for `%s'," (symbol-name newvar)))) (setq variable newvar))) (if aliases - (princ (format "%s.\n" aliases))) + (princ (format "%s" aliases))) + (princ (built-in-variable-doc variable)) + (princ ".\n\n") + (princ "Value: ") (if (not (boundp variable)) - (princ (format "%s is void" variable)) - (princ (format "%s's value is " variable)) + (princ "void") (prin1 (symbol-value variable))) (terpri) - (princ " -- ") - (princ (built-in-variable-doc variable)) - (princ ".") - (terpri) (cond ((local-variable-p variable (current-buffer)) (let* ((void (cons nil nil)) (def (condition-case nil @@ -1116,8 +1122,7 @@ (prin1 def)) (terpri))))) ((local-variable-p variable (current-buffer) t) - (princ "Setting it would make its value buffer-local.\n") - (terpri)))) + (princ "Setting it would make its value buffer-local.\n")))) (terpri) (princ "Documentation:") (terpri) @@ -1159,7 +1164,7 @@ "Print message listing key sequences that invoke specified command. Argument is a command definition, usually a symbol with a function definition." (interactive - (let ((fn (function-called-at-point)) + (let ((fn (funcall find-function-function)) (enable-recursive-minibuffers t) val) (setq val (read-command @@ -1293,11 +1298,14 @@ (if cmd (princ " " stream))))) (terpri stream))))))) -(defvar find-function-function 'ff-function-at-point - "The function used by `find-function' to select the function near + +;; find-function stuff + +(defvar find-function-function 'function-at-point + "*The function used by `find-function' to select the function near point. -For example `ff-function-at-point' or `function-called-at-point'.") +For example `function-at-point' or `function-called-at-point'.") (defvar find-function-source-path nil "The default list of directories where find-function searches. @@ -1305,16 +1313,15 @@ If this variable is `nil' then find-function searches `load-path' by default.") -;;; Code: (defun find-function-noselect (function &optional path) - "Put point at the definition of the function at point and return the buffer. + "Returns list `(buffer point)' pointing to the definition of FUNCTION. -Finds the emacs-lisp package containing the definition of FUNCTION -into a buffer and place point before the definition. The buffer is +Finds the emacs-lisp library containing the definition of FUNCTION +in a buffer and places point before the definition. The buffer is not selected. -If the optional argument PATH is given, the package where FUNCTION is +If the optional argument PATH is given, the library where FUNCTION is defined is searched in PATH instead of `load-path' (see `find-function-source-path')." (and (subrp (symbol-function function)) @@ -1322,7 +1329,7 @@ (if (not function) (error "You didn't specify a function")) (let ((def (symbol-function function)) - package aliases) + library aliases) (while (symbolp def) (or (eq def function) (if aliases @@ -1335,61 +1342,72 @@ def (symbol-function function))) (if aliases (message aliases)) - (setq package + (setq library (cond ((eq (car-safe def) 'autoload) (nth 1 def)) ((describe-function-find-file function)) - ((and (compiled-function-p def) - (fboundp 'compiled-function-annotation)) + ((compiled-function-p def) (substring (compiled-function-annotation def) 0 -4)))) - (if (null package) - (error "Can't find package")) - (if (string-match "\\(\\.elc?\\'\\)" package) - (setq package (substring package 0 (match-beginning 1)))) - (setq package (concat package ".el")) - (let ((filename (locate-library package t - (if path - path - find-function-source-path))) - (calling-buffer (current-buffer))) + (if (null library) + (error "Can't find library")) + (if (string-match "\\(\\.elc?\\'\\)" library) + (setq library (substring library 0 (match-beginning 1)))) + (let* ((path (or path find-function-source-path)) + (compression (or (rassq 'jka-compr-handler file-name-handler-alist) + (member 'crypt-find-file-hook find-file-hooks))) + (filename (or (locate-library (concat library ".el") + t path) + (locate-library library t path) + (if compression + (or (locate-library (concat library ".el.gz") + t path) + (locate-library (concat library ".gz") + t path)))))) (if (not filename) - (error "The package \"%s\" is not in the path." package)) - (set-buffer (find-file-noselect filename)) - (save-match-data - (let ((p (point)) - ;; avoid defconst, defgroup, defvar (any others?) - (re (format "^(def[^cgv\W]\\w+\\s-+%s\\s-" function)) - (syntable (syntax-table))) - (set-syntax-table emacs-lisp-mode-syntax-table) - (goto-char (point-min)) - (if (prog1 + (error "The library \"%s\" is not in the path." library)) + (save-excursion + (set-buffer (find-file-noselect filename)) + (save-match-data + (let (;; avoid defconst, defgroup, defvar (any others?) + (re (format "^\\s-*(def[^cgv\W]\\w+\\s-+%s\\s-" function)) + (syntable (syntax-table))) + (set-syntax-table emacs-lisp-mode-syntax-table) + (goto-char (point-min)) + (if (prog1 (re-search-forward re nil t) - (set-syntax-table syntable)) - (prog2 - (beginning-of-line) - (current-buffer) - (set-buffer calling-buffer)) - (goto-char p) - (set-buffer calling-buffer) - (error "Cannot find definition of %s" function))))))) + (set-syntax-table syntable)) + (progn + (beginning-of-line) + (list (current-buffer) (point))) + (error "Cannot find definition of %s" function)))))))) -(defun ff-function-at-point () - (condition-case () - (let ((stab (syntax-table))) - (unwind-protect - (save-excursion - (set-syntax-table emacs-lisp-mode-syntax-table) - (or (not (zerop (skip-syntax-backward "_w"))) - (eq (char-syntax (char-after (point))) ?w) - (eq (char-syntax (char-after (point))) ?_) - (forward-sexp -1)) - (skip-chars-forward "'") - (let ((obj (read (current-buffer)))) - (and (symbolp obj) (fboundp obj) obj))) - (set-syntax-table stab))) - (error nil))) +(defun function-at-point () + (or (condition-case () + (let ((stab (syntax-table))) + (unwind-protect + (save-excursion + (set-syntax-table emacs-lisp-mode-syntax-table) + (or (not (zerop (skip-syntax-backward "_w"))) + (eq (char-syntax (char-after (point))) ?w) + (eq (char-syntax (char-after (point))) ?_) + (forward-sexp -1)) + (skip-chars-forward "`'") + (let ((obj (read (current-buffer)))) + (and (symbolp obj) (fboundp obj) obj))) + (set-syntax-table stab))) + (error nil)) + (condition-case () + (save-excursion + (save-restriction + (narrow-to-region (max (point-min) (- (point) 1000)) (point-max)) + (backward-up-list 1) + (forward-char 1) + (let (obj) + (setq obj (read (current-buffer))) + (and (symbolp obj) (fboundp obj) obj)))) + (error nil)))) -(defun ff-read-function () +(defun find-function-read-function () "Read and return a function, defaulting to the one near point. The function named by `find-function-function' is used to select the @@ -1409,43 +1427,65 @@ (defun find-function (function &optional path) "Find the definition of the function near point in the current window. -Finds the emacs-lisp package containing the definition of the function +Finds the emacs-lisp library containing the definition of the function near point (selected by `find-function-function') and places point before the definition. -If the optional argument PATH is given, the package where FUNCTION is +If the optional argument PATH is given, the library where FUNCTION is defined is searched in PATH instead of `load-path'" (interactive (ff-read-function)) - (switch-to-buffer - (find-function-noselect function path))) + (let ((buffer-point (find-function-noselect function path))) + (if buffer-point + (progn + (switch-to-buffer (car buffer-point)) + (goto-char (cadr buffer-point)) + (recenter 0))))) (defun find-function-other-window (function &optional path) "Find the definition of the function near point in the other window. -Finds the emacs-lisp package containing the definition of the function +Finds the emacs-lisp library containing the definition of the function near point (selected by `find-function-function') and places point before the definition. -If the optional argument PATH is given, the package where FUNCTION is +If the optional argument PATH is given, the library where FUNCTION is defined is searched in PATH instead of `load-path'" (interactive (ff-read-function)) - (switch-to-buffer-other-window - (find-function-noselect function path))) + (let ((buffer-point (find-function-noselect function path))) + (if buffer-point + (progn + (switch-to-buffer-other-window (car buffer-point)) + (goto-char (cadr buffer-point)) + (recenter 0))))) (defun find-function-other-frame (function &optional path) "Find the definition of the function near point in the another frame. -Finds the emacs-lisp package containing the definition of the function +Finds the emacs-lisp library containing the definition of the function near point (selected by `find-function-function') and places point before the definition. -If the optional argument PATH is given, the package where FUNCTION is +If the optional argument PATH is given, the library where FUNCTION is defined is searched in PATH instead of `load-path'" (interactive (ff-read-function)) - (switch-to-buffer-other-frame - (find-function-noselect function path))) + (let ((buffer-point (find-function-noselect function path))) + (if buffer-point + (progn + (switch-to-buffer-other-frame (car buffer-point)) + (goto-char (cadr buffer-point)) + (recenter 0))))) -(define-key mode-specific-map "f" 'find-function) +(defun find-function-on-key (key) + "Find the function that KEY invokes. KEY is a string." + (interactive "kFind function on key: ") + (let ((defn (key-or-menu-binding key))) + (if (or (null defn) (integerp defn)) + (message "%s is undefined" (key-description key)) + (if (and (consp defn) (not (eq 'lambda (car-safe defn)))) + (message "runs %s" (prin1-to-string defn)) + (find-function-other-window defn))))) + +(define-key ctl-x-map "F" 'find-function) (define-key ctl-x-4-map "F" 'find-function-other-window) (define-key ctl-x-5-map "F" 'find-function-other-frame)
--- a/lisp/prim/loaddefs.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/prim/loaddefs.el Mon Aug 13 09:54:23 2007 +0200 @@ -384,7 +384,7 @@ (while dir (condition-case nil (load (concat (car dir) "/auto-autoloads")) - (file-error nil)) + (t nil)) (pop dir))) ;;; Local Variables:
--- a/lisp/prim/make-docfile.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/prim/make-docfile.el Mon Aug 13 09:54:23 2007 +0200 @@ -40,6 +40,9 @@ (defvar site-file-list nil) (defvar docfile-out-of-date nil) +;; BOGUS +(defvar find-file-hooks nil) + ;; Gobble up the stuff we don't wish to pass on. (setq command-line-args (cdr (cdr (cdr (cdr command-line-args))))) @@ -130,12 +133,15 @@ (setq processed (cons arg processed))))) (setq site-load-packages (cdr site-load-packages))))) -(let ((autoloads (list-autoloads))) +(packages-find-packages package-path t) + +(let ((autoloads (list-autoloads-path))) ;; (print (concat "Autoloads: " (prin1-to-string autoloads))) (while autoloads (let ((arg (car autoloads))) (if (null (member arg processed)) (progn + ;; (print arg) (if (and (null docfile-out-of-date) (file-newer-than-file-p arg docfile)) (setq docfile-out-of-date t)) @@ -171,6 +177,7 @@ (list (concat default-directory "../lib-src/make-docfile")) options processed) " ")) + ;; (print (prin1-to-string (append options processed))) (apply 'call-process-internal ;; (concat default-directory "../lib-src/make-docfile") "make-docfile"
--- a/lisp/prim/packages.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/prim/packages.el Mon Aug 13 09:54:23 2007 +0200 @@ -112,7 +112,8 @@ ;; If autocompression mode is on, ;; consider all combinations of library suffixes ;; and compression suffixes. - (if (rassq 'jka-compr-handler file-name-handler-alist) + (if (or (rassq 'jka-compr-handler file-name-handler-alist) + (member 'crypt-find-file-hook find-file-hooks)) (apply 'nconc (mapcar (lambda (compelt) (mapcar (lambda (baselt) @@ -132,6 +133,19 @@ (concat str ".elc") str)) +(defun list-autoloads-path () + "List autoloads from precomputed load-path." + (let ((path load-path) + autoloads) + (while path + (if (file-exists-p (concat (car path) + "/" autoload-file-name)) + (setq autoloads (cons (concat (car path) + "/" autoload-file-name) + autoloads))) + (setq path (cdr path))) + autoloads)) + (defun list-autoloads () "List autoload files in (what will be) the normal lisp search path. This function is used during build to find where the global symbol files so @@ -169,7 +183,7 @@ ;; Lisp files (if (file-directory-p (concat package "/lisp")) (progn - (setq load-path (cons (concat package "/lisp/") load-path)) + (setq load-path (cons (concat package "/lisp") load-path)) (let ((dirs (directory-files (concat package "/lisp/") t "^[^-.]" nil 'dirs-only)) dir)
--- a/lisp/prim/simple.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/prim/simple.el Mon Aug 13 09:54:23 2007 +0200 @@ -2424,7 +2424,7 @@ ;; 97/3/14 jhod: Kinsoku processing ;(indent-new-comment-line) (let ((spacep (memq (char-before (point)) '(?\ ?\t)))) - (indent-new-comment-line) + (funcall comment-line-break-function) ;; if user type space explicitly, leave SPC ;; even if there is no WAN. (if spacep @@ -2437,7 +2437,7 @@ (insert ?\ ))))) (save-excursion (goto-char fill-point) - (indent-new-comment-line))) + (funcall comment-line-break-function))) ;; If making the new line didn't reduce the hpos of ;; the end of the line, then give up now; ;; trying again will not help.
--- a/lisp/prim/startup.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/prim/startup.el Mon Aug 13 09:54:23 2007 +0200 @@ -686,7 +686,8 @@ (when timeout (disable-timeout timeout)) (with-current-buffer (get-buffer "*scratch*") (erase-buffer) - (insert initial-scratch-message) + (when (stringp initial-scratch-message) + (insert initial-scratch-message)) ;; In case the XEmacs server has already selected ;; another buffer, erase the one our message is in. (set-buffer-modified-p nil)))))
--- a/lisp/prim/update-elc.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/prim/update-elc.el Mon Aug 13 09:54:23 2007 +0200 @@ -47,6 +47,9 @@ (defvar processed nil) (defvar update-elc-files-to-compile nil) +;; BOGUS +(defvar find-file-hooks nil) + ;(setq update-elc-files-to-compile ; (delq nil ; (mapcar (function
--- a/lisp/psgml/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/psgml/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'psgml-autoloads)) - (progn +(if (featurep 'psgml-autoloads) (error "Already loaded")) ;;;### (autoloads (style-format) "psgml-fs" "psgml/psgml-fs.el") @@ -94,4 +93,3 @@ ;;;*** (provide 'psgml-autoloads) -))
--- a/lisp/psgml/custom-load.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/psgml/custom-load.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,7 +1,7 @@ -(custom-put 'html 'custom-loads '("psgml-html")) -(custom-put 'psgml-html 'custom-loads '("psgml-html")) -(custom-put 'sgml 'custom-loads '("psgml-html" "psgml")) +(custom-put 'tempo 'custom-loads '("tempo")) +(custom-put 'psgml-dtd 'custom-loads '("psgml")) +(custom-put 'psgml-insert 'custom-loads '("psgml")) (custom-put 'psgml 'custom-loads '("psgml-html" "psgml")) -(custom-put 'psgml-insert 'custom-loads '("psgml")) -(custom-put 'psgml-dtd 'custom-loads '("psgml")) -(custom-put 'tempo 'custom-loads '("tempo")) +(custom-put 'sgml 'custom-loads '("psgml-html" "psgml")) +(custom-put 'psgml-html 'custom-loads '("psgml-html")) +(custom-put 'html 'custom-loads '("psgml-html"))
--- a/lisp/rmail/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/rmail/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'rmail-autoloads)) - (progn +(if (featurep 'rmail-autoloads) (error "Already loaded")) ;;;### (autoloads (rmail-input rmail-mode rmail) "rmail" "rmail/rmail.el") @@ -115,4 +114,3 @@ ;;;*** (provide 'rmail-autoloads) -))
--- a/lisp/tl/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/tl/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'tl-autoloads)) - (progn +(if (featurep 'tl-autoloads) (error "Already loaded")) ;;;### (autoloads (view-charset) "char-table" "tl/char-table.el") @@ -17,4 +16,3 @@ ;;;*** (provide 'tl-autoloads) -))
--- a/lisp/tm/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/tm/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'tm-autoloads)) - (progn +(if (featurep 'tm-autoloads) (error "Already loaded")) ;;;### (autoloads (mime/editor-mode) "tm-edit" "tm/tm-edit.el") @@ -146,4 +145,3 @@ ;;;*** (provide 'tm-autoloads) -))
--- a/lisp/utils/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/utils/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'utils-autoloads)) - (progn +(if (featurep 'utils-autoloads) (error "Already loaded")) ;;;### (autoloads (defadvice ad-add-advice) "advice" "utils/advice.el") @@ -249,8 +248,8 @@ ;;;### (autoloads (edit-toolbar) "edit-toolbar" "utils/edit-toolbar.el") (autoload 'edit-toolbar "edit-toolbar" "\ -Alter toolbar characteristics by editing a buffer representing the current toolbar. -Pops up a buffer containing a list of the current toobar." t nil) +Alter toolbar characteristics by editing a buffer representing the specified toolbar. +Pops up a buffer containing a list of the toolbar matching TOOLBAR_NAME." t nil) ;;;*** @@ -1064,4 +1063,3 @@ ;;;*** (provide 'utils-autoloads) -))
--- a/lisp/utils/autoload.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/utils/autoload.el Mon Aug 13 09:54:23 2007 +0200 @@ -607,10 +607,10 @@ (not (looking-at ";;; DO NOT MODIFY THIS FILE"))) (progn (insert ";;; DO NOT MODIFY THIS FILE\n") - (insert "(if (not (featurep '" sym "))\n") - (insert " (progn\n") (goto-char (point-max)) - (insert "\n(provide '" sym ")\n))\n"))))) + (insert "\n(provide '" sym ")\n"))))) + +(defvar autoload-package-name nil) ;;;###autoload (defun batch-update-directory () @@ -642,7 +642,9 @@ (when autoload-do-custom-save (autoload-save-customization) (setq customized-symbols nil)) - (fixup-autoload-buffer (concat (file-name-nondirectory arg) + (fixup-autoload-buffer (concat (if autoload-package-name + autoload-package-name + (file-name-nondirectory arg)) "-autoloads")) (save-some-buffers t)) ;; (message "Done")
--- a/lisp/utils/edit-toolbar.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/utils/edit-toolbar.el Mon Aug 13 09:54:23 2007 +0200 @@ -42,20 +42,35 @@ ;; To do: -;; o It would be nice if edit-toolbar could edit *any* toolbar, not just -;; the default one. ;; o The function edit-toolbar-quit should do something other than just ;; bury the buffer. ;; o Dynamically add new items to edit-toolbar-button-alist as new buttons ;; are added. +;; o Allow more than one toolbar to be saved in the ~/.xemacs/.toolbar file. +;; o Allow buttons to be copied from any toolbar. +;; o Allow multiple toolbars to be edited simultaneously. + +;;; Change Log: + +;; Modified by Mike Scheidler <c23mts@eng.delcoelect.com> 25 Jul 1997 +;; - Enabled editing of any toolbar (not just `default-toolbar'). +;; - Added context sensitivity to `edit-toolbar-menu'. +;; - Added support for `nil' toolbar item (left/right divider). +;; - Enabled editing of empty toolbars. ;;; Code: -(defvar edit-toolbar-version "1.01" +(defvar edit-toolbar-version "1.02" "Version of Edit Toolbar.") -(defvar edit-toolbar-default-toolbar (specifier-instance default-toolbar) - "Default toolbar used when reverting.") +(defvar edit-toolbar-temp-toolbar-name nil + "Value of toolbar being edited.") + +(defvar edit-toolbar-temp-toolbar nil + "Working copy of toolbar being edited.") + +(defvar edit-toolbar-fallback-toolbar nil + "Toolbar definition to use when reverting.") (defvar edit-toolbar-file-name (concat "~" (if (boundp 'emacs-user-extension-dir) @@ -66,22 +81,24 @@ (defvar edit-toolbar-menu '("Edit Toolbar" - ["Move This Item Up" edit-toolbar-up t] - ["Move This Item Down" edit-toolbar-down t] - ["Set Function" edit-toolbar-set-function t] - ["Set Help String" edit-toolbar-set-help t] - ["Remove This Item" edit-toolbar-kill t] + ["Move This Item Up" edit-toolbar-up (>= (edit-toolbar-current-index) 0)] + ["Move This Item Down" edit-toolbar-down (>= (edit-toolbar-current-index) 0)] + ["Set Function" edit-toolbar-set-function (edit-toolbar-button-p)] + ["Set Help String" edit-toolbar-set-help (edit-toolbar-button-p)] + ["Copy This Button" edit-toolbar-copy (edit-toolbar-button-p)] + ["Remove This Item" edit-toolbar-kill (>= (edit-toolbar-current-index) 0)] "----" ["Add Button..." edit-toolbar-add-button t] ("Add Separator" - ["2D (narrow) " edit-toolbar-add-separator-2D-narrow t] + ["2D (narrow)" edit-toolbar-add-separator-2D-narrow t] ["3D (narrow)" edit-toolbar-add-separator-3D-narrow t] ["2D (wide)" edit-toolbar-add-separator-2D-wide t] ["3D (wide)" edit-toolbar-add-separator-3D-wide t] + ["Right/left divider" edit-toolbar-add-separator-right-left t] ) "----" - ["Restore Default Toolbar " edit-toolbar-restore t] - ["Save This Toolbar" edit-toolbar-save t] + ["Restore Default Toolbar " edit-toolbar-restore (buffer-modified-p)] + ["Save This Toolbar" edit-toolbar-save (buffer-modified-p)] "----" ["Help" describe-mode t] "----" @@ -104,6 +121,7 @@ (define-key map "@" 'edit-toolbar-add-separator-2D-wide) (define-key map "3" 'edit-toolbar-add-separator-3D-narrow) (define-key map "#" 'edit-toolbar-add-separator-3D-wide) + (define-key map "R" 'edit-toolbar-add-separator-right-left) (define-key map "c" 'edit-toolbar-copy) (define-key map "d" 'edit-toolbar-down) (define-key map "u" 'edit-toolbar-up) @@ -116,17 +134,41 @@ map )) +(defun edit-toolbar-create-toolbar-alist () + (setq edit-toolbar-toolbar-alist nil) + (mapatoms + (lambda (sym) + (if (and (boundp sym) + (toolbar-specifier-p (symbol-value sym)) + (not (string-match "^edit-toolbar" (symbol-name sym)))) + (setq edit-toolbar-toolbar-alist + (cons (cons (symbol-name sym) sym) + edit-toolbar-toolbar-alist)))))) + ;;;###autoload -(defun edit-toolbar () - "Alter toolbar characteristics by editing a buffer representing the current toolbar. -Pops up a buffer containing a list of the current toobar." +(defun edit-toolbar (&optional toolbar) + "Alter toolbar characteristics by editing a buffer representing the specified toolbar. +Pops up a buffer containing a list of the toolbar matching TOOLBAR_NAME." (interactive) + (edit-toolbar-create-toolbar-alist) + (if (eq toolbar nil) + (setq toolbar (intern-soft + (completing-read + "Toolbar: " edit-toolbar-toolbar-alist)))) + (if (not (toolbar-specifier-p (symbol-value toolbar))) + (error (format "Toolbar named %s not found" (prin1 toolbar)))) (pop-to-buffer (get-buffer-create "*Edit Toolbar*")) + (setq edit-toolbar-temp-toolbar (symbol-value toolbar)) + (setq edit-toolbar-temp-toolbar-name (symbol-name toolbar)) + (setq edit-toolbar-fallback-toolbar + (specifier-instance (symbol-value toolbar))) + (edit-toolbar-create-button-alist) (edit-toolbar-list) (set-buffer-modified-p nil) (edit-toolbar-mode) (set-face-foreground 'default "black" (current-buffer)) (set-face-background 'default "grey75" (current-buffer)) + (set-face-background-pixmap 'default "nil" (current-buffer)) (set-face-foreground 'list-mode-item-selected "yellow" (current-buffer)) (set-face-background 'list-mode-item-selected "black" (current-buffer))) @@ -149,12 +191,27 @@ (defun edit-toolbar-list () (erase-buffer) (edit-toolbar-insert-item 'header) - (let ((ilist (specifier-instance default-toolbar))) - (while (setq item (car ilist)) - (edit-toolbar-insert-item item) - (setq ilist (cdr ilist)))) + (mapcar (function (lambda (item) + (edit-toolbar-insert-item item))) + (specifier-instance edit-toolbar-temp-toolbar)) (goto-char (point-min))) +(defun edit-toolbar-button-p () + "Returns t if the currently selected edit-toolbar item is a button." + (let ((item (edit-toolbar-current-item))) + (not (or (eq item nil) + (eq (aref item 0) :style) + (eq (aref item 0) :size))))) + +(defun edit-toolbar-current-index () + "Returns the offset of the currently selected edit-toolbar item." + (- (count-lines (point-min) (point)) 2)) + +(defun edit-toolbar-current-item () + "Returns the value of the currently selected edit-toolbar item." + (let ((toolbar (specifier-instance edit-toolbar-temp-toolbar))) + (nth (edit-toolbar-current-index) toolbar))) + (defun edit-toolbar-quit () "Quit an Edit Toolbar session. This simply buries the buffer." (interactive) @@ -174,38 +231,42 @@ (defun edit-toolbar-set-function (func) "Set the function for the selected toolbar button." (interactive "aNew Function: ") - (let ((toolbar (specifier-instance default-toolbar)) - (index (- (count-lines (point-min) (point)) 2))) - (setf (aref (nth index toolbar) 1) func) - (edit-toolbar-list) - (forward-line (+ index 2)))) + (let ((index (edit-toolbar-current-index))) + (if (not (edit-toolbar-button-p)) + (error "Not a button") + (setf (aref (edit-toolbar-current-item) 1) func) + (edit-toolbar-list) + (forward-line (+ index 2))))) (defun edit-toolbar-set-help (help) "Set the help string for the selected toolbar button." (interactive "sNew Help String: ") - (let ((toolbar (specifier-instance default-toolbar)) - (index (- (count-lines (point-min) (point)) 2))) - (setf (aref (nth index toolbar) 3) help) - (edit-toolbar-list) - (forward-line (+ index 2)))) + (let ((index (edit-toolbar-current-index))) + (if (not (edit-toolbar-button-p)) + (error "Not a button") + (setf (aref (edit-toolbar-current-item) 3) help) + (edit-toolbar-list) + (forward-line (+ index 2))))) (defun edit-toolbar-copy () "Make a copy of the selected toolbar button." (interactive) - (let* ((toolbar (specifier-instance default-toolbar)) - (index (- (count-lines (point-min) (point)) 2)) - (item (nth index toolbar))) - (setcdr (nthcdr index toolbar) - (cons item (nthcdr (1+ index) toolbar))) - (edit-toolbar-list) - (forward-line (+ index 3)))) + (let ((index (edit-toolbar-current-index))) + (if (not (edit-toolbar-button-p)) + (error "Not a button") + (setcdr (nthcdr index (specifier-instance edit-toolbar-temp-toolbar)) + (cons (edit-toolbar-current-item) + (nthcdr (1+ index) + (specifier-instance edit-toolbar-temp-toolbar)))) + (edit-toolbar-list) + (forward-line (+ index 3))))) (defun edit-toolbar-down () "Move the current toolbar button down (right) one position." (interactive) - (let* ((toolbar (specifier-instance default-toolbar)) + (let* ((toolbar (specifier-instance edit-toolbar-temp-toolbar)) (index (- (count-lines (point-min) (point)) 2)) - (item (nth index toolbar))) + (item (nth index toolbar))) (if (eq (1+ index) (length toolbar)) (error "Already at the bottom of the toolbar.")) (if (eq index 0) @@ -214,17 +275,18 @@ (nthcdr (1+ index) toolbar))) (setcdr (nthcdr index toolbar) (cons item (nthcdr (1+ index) toolbar))) - (set-specifier default-toolbar toolbar) + (set-specifier + (symbol-value (intern-soft edit-toolbar-temp-toolbar-name)) toolbar) (edit-toolbar-list) (forward-line (+ index 3)))) (defun edit-toolbar-up () "Move the current toolbar button up (left) one position." (interactive) - (let* ((toolbar (specifier-instance default-toolbar)) + (let* ((toolbar (specifier-instance edit-toolbar-temp-toolbar)) (index (- (count-lines (point-min) (point)) 2)) (item (nth index toolbar))) - (if (eq index 0) + (if (<= index 0) (error "Already at the top of the toolbar.")) (setcdr (nthcdr (1- index) toolbar) (nthcdr (1+ index) toolbar)) @@ -232,21 +294,22 @@ (setq toolbar (cons item toolbar)) (setcdr (nthcdr (- index 2) toolbar) (cons item (nthcdr (- index 1) toolbar)))) - (set-specifier default-toolbar toolbar) + (set-specifier + (symbol-value (intern-soft edit-toolbar-temp-toolbar-name)) toolbar) (edit-toolbar-list) (forward-line (+ index 1)))) (defun edit-toolbar-kill () "Remove the current toolbar button." (interactive) - (let* ((toolbar (specifier-instance default-toolbar)) - (index (- (count-lines (point-min) (point)) 2)) - (item (nth index toolbar))) + (let* ((toolbar (specifier-instance edit-toolbar-temp-toolbar)) + (index (- (count-lines (point-min) (point)) 2))) (if (eq index 0) (setq toolbar (cdr toolbar)) (setcdr (nthcdr (1- index) toolbar) (nthcdr (1+ index) toolbar))) - (set-specifier default-toolbar toolbar) + (set-specifier + (symbol-value (intern-soft edit-toolbar-temp-toolbar-name)) toolbar) (edit-toolbar-list) (forward-line (+ index 2)))) @@ -259,7 +322,11 @@ help "Help String") (insert-face "Icon\t" 'bold) (insert-face (format line-format function help) 'bold)) - (cond ((or (eq (aref item 0) :style) + (cond ((eq item nil) + (setq icon nil + function "-------------- Right/Left Divider --------------" + help "")) + ((or (eq (aref item 0) :style) (eq (aref item 0) :size)) (setq icon nil function "----------------------------------------" @@ -281,25 +348,32 @@ (defun edit-toolbar-create-button-alist () (let ((button-alist nil) - (buttons (specifier-instance default-toolbar))) + (buttons (specifier-instance edit-toolbar-temp-toolbar))) (while buttons (setq button-alist - (cons (cons (symbol-name (aref (car buttons) 1)) (car buttons)) - button-alist)) + (if (arrayp (car buttons)) + (cons (cons (symbol-name (aref (car buttons) 1)) (car buttons)) + button-alist) + (cons (car buttons) button-alist))) (setq buttons (cdr buttons))) button-alist)) -(defvar edit-toolbar-button-alist (edit-toolbar-create-button-alist)) +(defvar edit-toolbar-button-alist nil + "List of buttons in the toolbar currently being edited.") + +(defvar edit-toolbar-toolbar-alist nil + "List of existing toolbars (used for completing read).") (defun edit-toolbar-add-item (item) "Add a toolbar item ITEM at the current location." - (let* ((toolbar (specifier-instance default-toolbar)) + (let* ((toolbar (specifier-instance edit-toolbar-temp-toolbar)) (index (- (count-lines (point-min) (point)) 2))) - (if (eq index 0) + (if (<= index 0) (setq toolbar (cons item toolbar)) (setcdr (nthcdr (- index 1) toolbar) (cons item (nthcdr index toolbar)))) - (set-specifier default-toolbar toolbar) + (set-specifier + (symbol-value (intern-soft edit-toolbar-temp-toolbar-name)) toolbar) (edit-toolbar-list) (forward-line (+ index 2)))) @@ -312,7 +386,8 @@ "Restore the default toolbar." (interactive) ; (edit-toolbar-check-for-save) - (set-specifier default-toolbar edit-toolbar-default-toolbar) + (set-specifier edit-toolbar-temp-toolbar + edit-toolbar-fallback-toolbar) (edit-toolbar-list) (set-buffer-modified-p nil)) @@ -336,6 +411,13 @@ (interactive) (edit-toolbar-add-item [:style 3D :size 30])) +(defun edit-toolbar-add-separator-right-left () + "Add a right/left separator at the current position." + (interactive) + (if (memq nil (specifier-instance edit-toolbar-temp-toolbar)) + (error "Can't have more than one left/right divider in a toolbar.") + (edit-toolbar-add-item nil))) + (defun edit-toolbar-add-button () "Add a new toolbar item at the current position. Completion is available to the known toolbar buttons." @@ -410,8 +492,8 @@ (standard-output buf)) (set-buffer buf) (erase-buffer) - (insert "(set-specifier default-toolbar '") - (prin1 (specifier-instance default-toolbar)) + (insert (concat "(set-specifier " edit-toolbar-temp-toolbar-name) " '") + (prin1 (specifier-instance edit-toolbar-temp-toolbar)) (insert ")") (save-buffer) (kill-buffer (current-buffer))
--- a/lisp/viper/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/viper/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,9 +1,6 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'viper-autoloads)) - (progn +(if (featurep 'viper-autoloads) (error "Already loaded")) -(provide 'viper-autoloads) -)) ;;;### (autoloads (viper-mode toggle-viper-mode) "viper" "viper/viper.el") @@ -13,3 +10,5 @@ Turn on Viper emulation of Vi." t nil) ;;;*** + +(provide 'viper-autoloads)
--- a/lisp/viper/custom-load.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/viper/custom-load.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,3 +1,3 @@ -(custom-put 'viper 'custom-loads '("viper-cmd" "viper-ex" "viper-init" "viper-keym" "viper-macs" "viper-mous" "viper-util" "viper")) +(custom-put 'viper-ex 'custom-loads '("viper-ex")) (custom-put 'viper-mouse 'custom-loads '("viper-mous")) -(custom-put 'viper-ex 'custom-loads '("viper-ex")) +(custom-put 'viper 'custom-loads '("viper-cmd" "viper-ex" "viper-init" "viper-keym" "viper-macs" "viper-mous" "viper-util" "viper"))
--- a/lisp/vm/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/vm/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'vm-autoloads)) - (progn +(if (featurep 'vm-autoloads) (error "Already loaded")) ;;;### (autoloads (vm-easy-menu-create-keymaps vm-easy-menu-define) "vm-easymenu" "vm/vm-easymenu.el") @@ -73,4 +72,3 @@ ;;;*** (provide 'vm-autoloads) -))
--- a/lisp/w3/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/w3/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'w3-autoloads)) - (progn +(if (featurep 'w3-autoloads) (error "Already loaded")) ;;;### (autoloads (x-font-build-cache font-default-size-for-device font-default-encoding-for-device font-default-registry-for-device font-default-family-for-device font-default-object-for-device font-default-font-for-device font-create-object) "font" "w3/font.el") @@ -188,4 +187,3 @@ ;;;*** (provide 'w3-autoloads) -))
--- a/lisp/w3/custom-load.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/w3/custom-load.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,19 +1,19 @@ -(custom-put 'ssl 'custom-loads '("ssl")) -(custom-put 'url-gateway 'custom-loads '("url-gw")) -(custom-put 'url 'custom-loads '("url-gw" "url-irc" "url-vars" "url" "url-news")) -(custom-put 'url-file 'custom-loads '("url-cache" "url-vars")) -(custom-put 'url-cache 'custom-loads '("url-cache" "url-vars")) -(custom-put 'url-history 'custom-loads '("url-vars")) -(custom-put 'url-cookie 'custom-loads '("url-cookie" "url-vars")) -(custom-put 'url-mime 'custom-loads '("url-vars")) -(custom-put 'url-hairy 'custom-loads '("url-vars")) +(custom-put 'url-news 'custom-loads '("url-news")) +(custom-put 'w3-scripting 'custom-loads '("w3-script")) +(custom-put 'w3-hooks 'custom-loads '("w3-cus")) +(custom-put 'w3-display 'custom-loads '("w3-cus")) +(custom-put 'w3-parsing 'custom-loads '("w3-cus")) +(custom-put 'w3-menus 'custom-loads '("w3-cus" "w3-menu")) +(custom-put 'w3-printing 'custom-loads '("w3-cus")) +(custom-put 'w3-images 'custom-loads '("w3-cus")) +(custom-put 'w3-files 'custom-loads '("w3-cus")) (custom-put 'w3 'custom-loads '("w3-cus" "w3-script")) -(custom-put 'w3-files 'custom-loads '("w3-cus")) -(custom-put 'w3-images 'custom-loads '("w3-cus")) -(custom-put 'w3-printing 'custom-loads '("w3-cus")) -(custom-put 'w3-menus 'custom-loads '("w3-cus" "w3-menu")) -(custom-put 'w3-parsing 'custom-loads '("w3-cus")) -(custom-put 'w3-display 'custom-loads '("w3-cus")) -(custom-put 'w3-hooks 'custom-loads '("w3-cus")) -(custom-put 'w3-scripting 'custom-loads '("w3-script")) -(custom-put 'url-news 'custom-loads '("url-news")) +(custom-put 'url-hairy 'custom-loads '("url-vars")) +(custom-put 'url-mime 'custom-loads '("url-vars")) +(custom-put 'url-cookie 'custom-loads '("url-cookie" "url-vars")) +(custom-put 'url-history 'custom-loads '("url-vars")) +(custom-put 'url-cache 'custom-loads '("url-cache" "url-vars")) +(custom-put 'url-file 'custom-loads '("url-cache" "url-vars")) +(custom-put 'url 'custom-loads '("url-gw" "url-irc" "url-vars" "url" "url-news")) +(custom-put 'url-gateway 'custom-loads '("url-gw")) +(custom-put 'ssl 'custom-loads '("ssl"))
--- a/lisp/x11/auto-autoloads.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/x11/auto-autoloads.el Mon Aug 13 09:54:23 2007 +0200 @@ -1,6 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (not (featurep 'x11-autoloads)) - (progn +(if (featurep 'x11-autoloads) (error "Already loaded")) ;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "x-font-menu" "x11/x-font-menu.el") @@ -30,4 +29,3 @@ ;;;*** (provide 'x11-autoloads) -))
--- a/lisp/x11/x-compose.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/x11/x-compose.el Mon Aug 13 09:54:23 2007 +0200 @@ -30,6 +30,10 @@ ;;; Commentary: ;; created by jwz, 14-jun-92. +;;; changed by Jan Vroonhof, July 1997: Use function-key-map instead +;;; of global map. +;;; Preliminary support for +;;; XFree86 deadkeys ;; This file implements DEC-, OpenWindows-, and HP-compatible "Compose" ;; processing for XEmacs. @@ -108,13 +112,14 @@ ;;; The command `compose-key' exists so that this file may be autoloaded. ;;;this doesn't work yet###autoload -(define-function 'compose-key compose-map) +;; (define-function 'compose-key compose-map) ;; The "Compose" key: ;; (keysym is lower case because we downcase everything in the Symbol font...) ;; ;;;this doesn't work yet###autoload -(define-key global-map [multi-key] 'compose-key) +;; Ditched JV, (define-key function-key-map [multi-key] 'compose-key) +(define-key function-key-map [multi-key] compose-map) ;; The following is necessary, because one can't rebind [degree] ;; and use it to insert the degree sign! @@ -125,10 +130,10 @@ ;; The "Dead" keys: ;; -(define-key global-map [acute] compose-acute-map) -(define-key global-map [cedilla] compose-cedilla-map) -(define-key global-map [diaeresis] compose-diaeresis-map) -(define-key global-map [degree] compose-ring-map) +(define-key function-key-map [acute] compose-acute-map) +(define-key function-key-map [cedilla] compose-cedilla-map) +(define-key function-key-map [diaeresis] compose-diaeresis-map) +(define-key function-key-map [degree] compose-ring-map) ;; The dead keys as seen by the "Compose" map: ;; @@ -164,126 +169,178 @@ ;; Sun according to MIT: ;; (cond ((x-valid-keysym-name-p "SunFA_Acute") - (define-key global-map [SunFA_Acute] compose-acute-map) + (define-key function-key-map [SunFA_Acute] + compose-acute-map) (define-key compose-map [SunFA_Acute] compose-acute-map) - (define-key global-map [SunFA_Grave] compose-grave-map) + (define-key function-key-map [SunFA_Grave] + compose-grave-map) (define-key compose-map [SunFA_Grave] compose-grave-map) - (define-key global-map [SunFA_Cedilla] compose-cedilla-map) + (define-key function-key-map [SunFA_Cedilla] + compose-cedilla-map) (define-key compose-map [SunFA_Cedilla] compose-cedilla-map) - (define-key global-map [SunFA_Diaeresis] compose-diaeresis-map) + (define-key function-key-map [SunFA_Diaeresis] compose-diaeresis-map) (define-key compose-map [SunFA_Diaeresis] compose-diaeresis-map) - (define-key global-map [SunFA_Circum] compose-circumflex-map) + (define-key function-key-map [SunFA_Circum] + compose-circumflex-map) (define-key compose-map [SunFA_Circum] compose-circumflex-map) - (define-key global-map [SunFA_Tilde] compose-tilde-map) + (define-key function-key-map [SunFA_Tilde] + compose-tilde-map) (define-key compose-map [SunFA_Tilde] compose-tilde-map) )) ;; Sun according to OpenWindows 2: ;; (cond ((x-valid-keysym-name-p "Dead_Grave") - (define-key global-map [Dead_Grave] compose-grave-map) + (define-key function-key-map [Dead_Grave] + compose-grave-map) (define-key compose-map [Dead_Grave] compose-grave-map) - (define-key global-map [Dead_Circum] compose-circumflex-map) + (define-key function-key-map [Dead_Circum] + compose-circumflex-map) (define-key compose-map [Dead_Circum] compose-circumflex-map) - (define-key global-map [Dead_Tilde] compose-tilde-map) + (define-key function-key-map [Dead_Tilde] + compose-tilde-map) (define-key compose-map [Dead_Tilde] compose-tilde-map) )) ;; Sun according to OpenWindows 3: ;; (cond ((x-valid-keysym-name-p "SunXK_FA_Acute") - (define-key global-map [SunXK_FA_Acute] compose-acute-map) + (define-key function-key-map [SunXK_FA_Acute] + compose-acute-map) (define-key compose-map [SunXK_FA_Acute] compose-acute-map) - (define-key global-map [SunXK_FA_Grave] compose-grave-map) + (define-key function-key-map [SunXK_FA_Grave] + compose-grave-map) (define-key compose-map [SunXK_FA_Grave] compose-grave-map) - (define-key global-map [SunXK_FA_Cedilla] compose-cedilla-map) + (define-key function-key-map [SunXK_FA_Cedilla] compose-cedilla-map) (define-key compose-map [SunXK_FA_Cedilla] compose-cedilla-map) - (define-key global-map [SunXK_FA_Diaeresis] compose-diaeresis-map) + (define-key function-key-map [SunXK_FA_Diaeresis] + compose-diaeresis-map) (define-key compose-map [SunXK_FA_Diaeresis] compose-diaeresis-map) - (define-key global-map [SunXK_FA_Circum] compose-circumflex-map) + (define-key function-key-map [SunXK_FA_Circum] compose-circumflex-map) (define-key compose-map [SunXK_FA_Circum] compose-circumflex-map) - (define-key global-map [SunXK_FA_Tilde] compose-tilde-map) + (define-key function-key-map [SunXK_FA_Tilde] + compose-tilde-map) (define-key compose-map [SunXK_FA_Tilde] compose-tilde-map) )) ;; DEC according to MIT: ;; (cond ((x-valid-keysym-name-p "Dacute_accent") - (define-key global-map [Dacute_accent] compose-acute-map) + (define-key function-key-map [Dacute_accent] + compose-acute-map) (define-key compose-map [Dacute_accent] compose-acute-map) - (define-key global-map [Dgrave_accent] compose-grave-map) + (define-key function-key-map [Dgrave_accent] + compose-grave-map) (define-key compose-map [Dgrave_accent] compose-grave-map) - (define-key global-map [Dcedilla_accent] compose-cedilla-map) + (define-key function-key-map [Dcedilla_accent] compose-cedilla-map) (define-key compose-map [Dcedilla_accent] compose-cedilla-map) - (define-key global-map [Dcircumflex_accent] compose-circumflex-map) + (define-key function-key-map [Dcircumflex_accent] + compose-circumflex-map) (define-key compose-map [Dcircumflex_accent] compose-circumflex-map) - (define-key global-map [Dtilde] compose-tilde-map) + (define-key function-key-map [Dtilde] + compose-tilde-map) (define-key compose-map [Dtilde] compose-tilde-map) - (define-key global-map [Dring_accent] compose-ring-map) + (define-key function-key-map [Dring_accent] + compose-ring-map) (define-key compose-map [Dring_accent] compose-ring-map) )) ;; DEC according to OpenWindows 3: ;; (cond ((x-valid-keysym-name-p "DXK_acute_accent") - (define-key global-map [DXK_acute_accent] compose-acute-map) + (define-key function-key-map [DXK_acute_accent] compose-acute-map) (define-key compose-map [DXK_acute_accent] compose-acute-map) - (define-key global-map [DXK_grave_accent] compose-grave-map) + (define-key function-key-map [DXK_grave_accent] compose-grave-map) (define-key compose-map [DXK_grave_accent] compose-grave-map) - (define-key global-map [DXK_cedilla_accent] compose-cedilla-map) + (define-key function-key-map [DXK_cedilla_accent] + compose-cedilla-map) (define-key compose-map [DXK_cedilla_accent] compose-cedilla-map) - (define-key global-map [DXK_circumflex_accent] compose-circumflex-map) + (define-key function-key-map [DXK_circumflex_accent] + compose-circumflex-map) (define-key compose-map [DXK_circumflex_accent] compose-circumflex-map) - (define-key global-map [DXK_tilde] compose-tilde-map) + (define-key function-key-map [DXK_tilde] + compose-tilde-map) (define-key compose-map [DXK_tilde] compose-tilde-map) - (define-key global-map [DXK_ring_accent] compose-ring-map) + (define-key function-key-map [DXK_ring_accent] compose-ring-map) (define-key compose-map [DXK_ring_accent] compose-ring-map) )) ;; HP according to MIT: ;; (cond ((x-valid-keysym-name-p "hpmute_acute") - (define-key global-map [hpmute_acute] compose-acute-map) + (define-key function-key-map [hpmute_acute] + compose-acute-map) (define-key compose-map [hpmute_acute] compose-acute-map) - (define-key global-map [hpmute_grave] compose-grave-map) + (define-key function-key-map [hpmute_grave] + compose-grave-map) (define-key compose-map [hpmute_grave] compose-grave-map) - (define-key global-map [hpmute_diaeresis] compose-diaeresis-map) + (define-key function-key-map [hpmute_diaeresis] compose-diaeresis-map) (define-key compose-map [hpmute_diaeresis] compose-diaeresis-map) - (define-key global-map [hpmute_asciicircum] compose-circumflex-map) + (define-key function-key-map [hpmute_asciicircum] + compose-circumflex-map) (define-key compose-map [hpmute_asciicircum] compose-circumflex-map) - (define-key global-map [hpmute_asciitilde] compose-tilde-map) + (define-key function-key-map [hpmute_asciitilde] + compose-tilde-map) (define-key compose-map [hpmute_asciitilde] compose-tilde-map) )) ;; HP according to OpenWindows 3: ;; (cond ((x-valid-keysym-name-p "hpXK_mute_acute") - (define-key global-map [hpXK_mute_acute] compose-acute-map) + (define-key function-key-map [hpXK_mute_acute] compose-acute-map) (define-key compose-map [hpXK_mute_acute] compose-acute-map) - (define-key global-map [hpXK_mute_grave] compose-grave-map) + (define-key function-key-map [hpXK_mute_grave] compose-grave-map) (define-key compose-map [hpXK_mute_grave] compose-grave-map) - (define-key global-map [hpXK_mute_diaeresis] compose-diaeresis-map) + (define-key function-key-map [hpXK_mute_diaeresis] + compose-diaeresis-map) (define-key compose-map [hpXK_mute_diaeresis] compose-diaeresis-map) - (define-key global-map [hpXK_mute_asciicircum] compose-circumflex-map) + (define-key function-key-map [hpXK_mute_asciicircum] + compose-circumflex-map) (define-key compose-map [hpXK_mute_asciicircum] compose-circumflex-map) - (define-key global-map [hpXK_mute_asciitilde] compose-tilde-map) + (define-key function-key-map [hpXK_mute_asciitilde] + compose-tilde-map) (define-key compose-map [hpXK_mute_asciitilde] compose-tilde-map) )) ;; HP according to HP-UX 8.0: ;; (cond ((x-valid-keysym-name-p "XK_mute_acute") - (define-key global-map [XK_mute_acute] compose-acute-map) + (define-key function-key-map [XK_mute_acute] + compose-acute-map) (define-key compose-map [XK_mute_acute] compose-acute-map) - (define-key global-map [XK_mute_grave] compose-grave-map) + (define-key function-key-map [XK_mute_grave] + compose-grave-map) (define-key compose-map [XK_mute_grave] compose-grave-map) - (define-key global-map [XK_mute_diaeresis] compose-diaeresis-map) + (define-key function-key-map [XK_mute_diaeresis] + compose-diaeresis-map) (define-key compose-map [XK_mute_diaeresis] compose-diaeresis-map) - (define-key global-map [XK_mute_asciicircum] compose-circumflex-map) + (define-key function-key-map [XK_mute_asciicircum] + compose-circumflex-map) (define-key compose-map [XK_mute_asciicircum] compose-circumflex-map) - (define-key global-map [XK_mute_asciitilde] compose-tilde-map) + (define-key function-key-map + [XK_mute_asciitilde] compose-tilde-map) (define-key compose-map [XK_mute_asciitilde] compose-tilde-map) )) +;; Xfree seems to use lower case and a hyphen +(cond ((x-valid-keysym-name-p "dead-tilde") + (define-key function-key-map [dead-acute] + compose-acute-map) + (define-key compose-map [dead-acute] compose-acute-map) + (define-key function-key-map [dead-grave] + compose-grave-map) + (define-key compose-map [dead-grave] compose-grave-map) + (define-key function-key-map [dead-cedilla] compose-cedilla-map) + (define-key compose-map [dead-cedilla] compose-cedilla-map) + (define-key function-key-map [dead_diaeresis] compose-diaeresis-map) + (define-key compose-map [dead-diaeresis] compose-diaeresis-map) + (define-key function-key-map [dead-circum] compose-circumflex-map) + (define-key compose-map [dead-circum] compose-circumflex-map) + (define-key function-key-map [dead-tilde] + compose-tilde-map) + (define-key compose-map [dead-tilde] compose-tilde-map) + )) + + ;;; The contents of the "dead key" maps. These are shared by the ;;; compose-map. @@ -307,7 +364,8 @@ (set-keymap-name compose-grave-map 'compose-grave-map) (set-keymap-default-binding compose-grave-map 'self-insert-command) -(define-key compose-grave-map " " [grave]) +(define-key compose-grave-map " " "`") +(define-key compose-grave-map "`" [grave]) (define-key compose-grave-map "A" [Agrave]) (define-key compose-grave-map "E" [Egrave]) (define-key compose-grave-map "I" [Igrave]) @@ -321,6 +379,7 @@ (set-keymap-name compose-cedilla-map 'compose-cedilla-map) (set-keymap-default-binding compose-cedilla-map 'self-insert-command) +(define-key compose-cedilla-map " " ",") (define-key compose-cedilla-map "," [cedilla]) (define-key compose-cedilla-map "C" [Ccedilla]) (define-key compose-cedilla-map "c" [ccedilla])
--- a/lwlib/lwlib.c Mon Aug 13 09:53:23 2007 +0200 +++ b/lwlib/lwlib.c Mon Aug 13 09:54:23 2007 +0200 @@ -140,7 +140,7 @@ if (wv->toolkit_data && wv->free_toolkit_data) { - free (wv->toolkit_data); + XtFree (wv->toolkit_data); wv->toolkit_data = (void *) 0xDEADBEEF; } #ifdef NEED_SCROLLBARS @@ -210,18 +210,19 @@ { scrollbar_values *old_sb = old->scrollbar_data; scrollbar_values *new_sb = new->scrollbar_data; -#define FROB(field) if (old_sb->field != new_sb->field) changed = True - FROB (line_increment); - FROB (page_increment); - FROB (minimum); - FROB (maximum); - FROB (slider_size); - FROB (slider_position); - FROB (scrollbar_width); - FROB (scrollbar_height); - FROB (scrollbar_x); - FROB (scrollbar_y); -#undef FROB + + if ((old_sb->line_increment != new_sb->line_increment) || + (old_sb->page_increment != new_sb->page_increment) || + (old_sb->minimum != new_sb->minimum) || + (old_sb->maximum != new_sb->maximum) || + (old_sb->slider_size != new_sb->slider_size) || + (old_sb->slider_position != new_sb->slider_position) || + (old_sb->scrollbar_width != new_sb->scrollbar_width) || + (old_sb->scrollbar_height != new_sb->scrollbar_height) || + (old_sb->scrollbar_x != new_sb->scrollbar_x) || + (old_sb->scrollbar_y != new_sb->scrollbar_y)) + changed = True; + *old_sb = *new_sb; } @@ -630,7 +631,7 @@ if (change > NO_CHANGE && val1->toolkit_data) { if (val1->free_toolkit_data) - free (val1->toolkit_data); + XtFree (val1->toolkit_data); val1->toolkit_data = NULL; }
--- a/lwlib/xlwmenu.c Mon Aug 13 09:53:23 2007 +0200 +++ b/lwlib/xlwmenu.c Mon Aug 13 09:54:23 2007 +0200 @@ -1,16 +1,16 @@ -/* Implements a lightweight menubar widget. +/* Implements a lightweight menubar widget. Copyright (C) 1992, 1993, 1994 Lucid, Inc. Copyright (C) 1995 Tinker Systems and INS Engineering Corp. This file is part of the Lucid Widget Library. -The Lucid Widget Library is free software; you can redistribute it and/or +The Lucid Widget Library 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. The Lucid Widget Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +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. @@ -56,8 +56,8 @@ #define max(a,b) ((a)>(b)?(a):(b)) #endif -static char -xlwMenuTranslations [] = +static char +xlwMenuTranslations [] = "<BtnDown>: start()\n\ <BtnMotion>: drag()\n\ <BtnUp>: select()\n\ @@ -66,9 +66,9 @@ extern Widget lw_menubar_widget; #define offset(field) XtOffset(XlwMenuWidget, field) -static XtResource +static XtResource xlwMenuResources[] = -{ +{ #ifdef NEED_MOTIF /* There are three font list resources, so that we can accept either of the resources *fontList: or *font:, and so that we can tell the @@ -120,9 +120,9 @@ {XmNbottomShadowPixmap, XmCBottomShadowPixmap, XtRPixmap, sizeof (Pixmap), offset (menu.bottom_shadow_pixmap), XtRImmediate, (XtPointer)None}, - {XtNopen, XtCCallback, XtRCallback, sizeof(XtPointer), + {XtNopen, XtCCallback, XtRCallback, sizeof(XtPointer), offset(menu.open), XtRCallback, (XtPointer)NULL}, - {XtNselect, XtCCallback, XtRCallback, sizeof(XtPointer), + {XtNselect, XtCCallback, XtRCallback, sizeof(XtPointer), offset(menu.select), XtRCallback, (XtPointer)NULL}, {XtNmenu, XtCMenu, XtRPointer, sizeof(XtPointer), offset(menu.contents), XtRImmediate, (XtPointer)NULL}, @@ -157,7 +157,7 @@ static XFontStruct *default_font_of_font_list (XmFontList); #endif -static XtActionsRec +static XtActionsRec xlwMenuActionsList [] = { {"start", Start}, @@ -170,7 +170,7 @@ XlwMenuClassRec xlwMenuClassRec = { { /* CoreClass fields initialization */ - (WidgetClass) SuperClass, /* superclass */ + (WidgetClass) SuperClass, /* superclass */ "XlwMenu", /* class_name */ sizeof(XlwMenuRec), /* size */ XlwMenuClassInitialize, /* class_initialize */ @@ -323,7 +323,7 @@ { while (mw->menu.old_stack_length < n) mw->menu.old_stack_length *= 2; - + mw->menu.old_stack = (widget_value**)XtRealloc ((char *)mw->menu.old_stack, mw->menu.old_stack_length * @@ -461,7 +461,7 @@ } } *out = 0; - + #ifdef PRINT_XLWMENU_RESOURCE_CONVERSIONS printf("! Emacs*XlwMenu.%s.labelString:\t%s\n", save_out, save_in); printf( "Emacs*XlwMenu.%s.labelString:\n", save_out); @@ -470,7 +470,7 @@ static XtResource nameResource[] = -{ +{ { "labelString", "LabelString", XtRString, sizeof(String), 0, XtRImmediate, 0 } }; @@ -509,7 +509,7 @@ for (ntimes = 1, result = (char *) string; (percent = strchr(result, '%')); ntimes++) result = &percent[1]; - + result = XtMalloc ((ntimes * strlen(value)) + strlen(string) + 4); result[0] = '\0'; @@ -518,14 +518,14 @@ unsigned left_pad; unsigned right_pad; char *p; - + if (percent[1] == '%') { /* it's a real % */ strncat(result, string, 1 + percent - string); /* incl % */ string = &percent[2]; /* after the second '%' */ continue; /* with the while() loop */ } - + left_pad = 0; right_pad = 0; @@ -560,7 +560,7 @@ /* out of for() loop */ strncat(result, string, 1 + p - string); string= (*p ? &p[1] : p); - break; + break; } } } @@ -599,7 +599,7 @@ /* Convert value style name into resource style name. eg: "Free Willy" becomes "freeWilly" */ massage_resource_name (val->name, massaged_name); - + /* If we have a value (parameter) see if we can find a "Named" resource. */ if (val->value) @@ -707,7 +707,7 @@ if (mw->menu.lookup_labels) { massage_resource_name (val->name, massaged_name); - + XtGetSubresources ((Widget) mw, (XtPointer) &resourced_name, massaged_name, massaged_name, @@ -804,14 +804,14 @@ XDrawString (XtDisplay (mw), window, gc, x, y + mw->menu.font_ascent, &string[s], i-s); # endif /* USE_XFONTSET */ - + XTextExtents (mw->menu.font, &string[s], i-s, &drop, &drop, &drop, &xcs); x += xcs.width; - + s=i+3; i+=2; - + # ifdef USE_XFONTSET XmbDrawString (XtDisplay (mw), window, mw->menu.font_set, gc, x, y + mw->menu.font_ascent, &string[i], 1); @@ -819,18 +819,18 @@ XDrawString (XtDisplay (mw), window, gc, x, y + mw->menu.font_ascent, &string[i], 1); # endif /* USE_XFONTSET */ - + XTextExtents (mw->menu.font, &string[i], 1, &drop, &drop, &drop, &xcs); - + XDrawLine (XtDisplay (mw), window, gc, x - 1, y + mw->menu.font_ascent + 1, x + xcs.width - 1, y + mw->menu.font_ascent + 1 ); - + x += xcs.width; } } - if (string[s]) + if (string[s]) # ifdef USE_XFONTSET XmbDrawString (XtDisplay (mw), window, mw->menu.font_set, gc, x, y + mw->menu.font_ascent, &string[s], @@ -843,7 +843,7 @@ #endif /* NEED_MOTIF */ } -static void +static void binding_draw (XlwMenuWidget mw, Window w, int x, int y, GC gc, char *value) { #ifdef NEED_MOTIF @@ -1002,7 +1002,7 @@ } } -static void +static void arrow_decoration_draw (XlwMenuWidget mw, Window window, int x, int y, @@ -1023,9 +1023,9 @@ half_width = width/2 + 1; else half_width = width/2; - + select_gc = mw->menu.background_gc; - + if (raised) { top_gc = mw->menu.shadow_bottom_gc; @@ -1049,12 +1049,12 @@ points [2].y = y + half_width + thickness; points [3].x = x + thickness; points [3].y = y + width - thickness; - + XFillPolygon (dpy, window, select_gc, points, - 4, + 4, Convex, CoordModeOrigin); @@ -1067,7 +1067,7 @@ points [2].y = y + width - thick_med; points [3].x = x; points [3].y = y + width; - + XFillPolygon (dpy, window, top_gc, points, 4, Convex, CoordModeOrigin); /* top border */ @@ -1079,7 +1079,7 @@ points [2].y = y + half_width; points [3].x = x + thickness; points [3].y = y + width - thick_med; - + XFillPolygon (dpy, window, bottom_gc, points, 4, Convex, CoordModeOrigin); /* bottom shadow */ @@ -1091,7 +1091,7 @@ points [2].y = y + half_width; points [3].x = x + thickness; points [3].y = y + thick_med; - + XFillPolygon (dpy, window, top_gc, points, 4, Convex, CoordModeOrigin); } @@ -1115,7 +1115,7 @@ /* * Fill internal area. */ - if (set) + if (set) XFillRectangle (dpy, window, select_gc, @@ -1123,7 +1123,7 @@ y + thickness, width - (2*thickness), width - (2*thickness)); - + shadow_draw(mw, window, x, y, width, width, type); } @@ -1228,7 +1228,7 @@ points [npoints].x = x + thickness; /* left inside corner */ points [npoints++].y = y + half_width; - XFillPolygon (dpy, window, bottom_gc, + XFillPolygon (dpy, window, bottom_gc, points, npoints, Nonconvex, CoordModeOrigin); npoints = 0; @@ -1268,7 +1268,7 @@ window, select_gc, points, - 4, + 4, Convex, CoordModeOrigin); } @@ -1295,7 +1295,7 @@ switch (type) { case SHADOW_NO_LINE: /* nothing to do */ - return; + return; case SHADOW_DOUBLE_LINE: num_separators = 2; case SHADOW_SINGLE_LINE: @@ -1345,7 +1345,7 @@ bottom_line_thickness = mw->menu.shadow_thickness - top_line_thickness; break; } - + if (dashed) { XGCValues values; @@ -1355,14 +1355,14 @@ if (bottom_line_thickness > 0 && bottom_gc != top_gc) XChangeGC (dpy, bottom_gc, GCLineStyle, &values); } - + while (num_separators--) { for (i = 0; i < top_line_thickness; i++) XDrawLine (dpy, window, top_gc, x, y + i, x + width, y + i); - + for (i = 0; i < bottom_line_thickness; i++) - XDrawLine (dpy, window, bottom_gc, + XDrawLine (dpy, window, bottom_gc, x, y + top_line_thickness + offset + i, x + width, y + top_line_thickness + offset + i); y += (top_line_thickness + offset + bottom_line_thickness + 1); @@ -1462,9 +1462,9 @@ return BUTTON_TYPE; else return TEXT_TYPE; -#else +#else abort(); -#endif +#endif } } @@ -1482,7 +1482,7 @@ 2 * mw->menu.shadow_thickness); /* no left column decoration */ *toggle_width = mw->menu.horizontal_margin + mw->menu.shadow_thickness;; - + *label_width = string_width_u (mw, resource_widget_value (mw, val)); *bindings_width = mw->menu.horizontal_margin + mw->menu.shadow_thickness; } @@ -1500,7 +1500,7 @@ unsigned binding_tab) { int y_offset = mw->menu.shadow_thickness + mw->menu.vertical_margin; - + if (!label_offset) label_offset = mw->menu.shadow_thickness + mw->menu.horizontal_margin; @@ -1509,7 +1509,7 @@ */ string_draw_u (mw, window, - x + label_offset, y + y_offset, + x + label_offset, y + y_offset, mw->menu.foreground_gc, resource_widget_value (mw, val)); } @@ -1527,7 +1527,7 @@ label_button_size (mw, val, in_menubar, toggle_width, label_width, bindings_width, height); - + /* key bindings to display? */ if (!in_menubar && val->key) { @@ -1549,8 +1549,8 @@ widget_value *val, Boolean in_menubar, Boolean highlighted, - Window window, - int x, int y, + Window window, + int x, int y, unsigned width, unsigned height, unsigned label_offset, unsigned binding_offset) @@ -1559,13 +1559,13 @@ GC gc; shadow_type type; Boolean menu_pb = in_menubar && (menu_item_type (val) == BUTTON_TYPE); - + /* * Draw the label string. */ if (!label_offset) label_offset = mw->menu.shadow_thickness + mw->menu.horizontal_margin; - + if (menu_pb) { if (val->enabled) @@ -1583,10 +1583,10 @@ string_draw_u (mw, window, - x + label_offset, y + y_offset, + x + label_offset, y + y_offset, gc, resource_widget_value(mw, val)); - + /* * Draw the keybindings */ @@ -1601,7 +1601,7 @@ x + binding_offset + mw->menu.column_spacing, y + y_offset, gc, val->key); } - + /* * Draw the shadow */ @@ -1609,14 +1609,14 @@ { if (highlighted) type = SHADOW_OUT; - else + else type = (val->selected ? SHADOW_ETCHED_OUT : SHADOW_ETCHED_IN); } else { if (highlighted) type = SHADOW_OUT; - else + else type = SHADOW_BACKGROUND; } @@ -1628,7 +1628,7 @@ { unsigned int result = (mw->menu.font_ascent + mw->menu.font_descent) / (unsigned int)2; - + result += 2 * mw->menu.shadow_thickness; if (result > (mw->menu.font_ascent + mw->menu.font_descent)) @@ -1658,12 +1658,12 @@ } static void -cascade_button_draw (XlwMenuWidget mw, +cascade_button_draw (XlwMenuWidget mw, widget_value *val, Boolean in_menubar, Boolean highlighted, - Window window, - int x, int y, + Window window, + int x, int y, unsigned width, unsigned height, unsigned label_offset, unsigned binding_offset) @@ -1684,21 +1684,21 @@ { int y_offset; unsigned arrow_height = arrow_decoration_height (mw); - + y_offset = mw->menu.shadow_thickness + mw->menu.vertical_margin + (mw->menu.font_ascent+mw->menu.font_descent - arrow_height)/2; - + if (!binding_offset) { unsigned s_width = string_width(mw, resource_widget_value (mw, val)); - + if (!label_offset) label_offset = mw->menu.shadow_thickness + mw->menu.horizontal_margin; - + binding_offset = label_offset + s_width + mw->menu.shadow_thickness; } - + arrow_decoration_draw (mw, window, x + binding_offset + mw->menu.column_spacing, @@ -1706,7 +1706,7 @@ arrow_height, highlighted); } - + /* * Draw the shadow */ @@ -1714,7 +1714,7 @@ type = SHADOW_OUT; else type = SHADOW_BACKGROUND; - + shadow_draw(mw, window, x, y, width, height, type); } @@ -1726,10 +1726,10 @@ rv = mw->menu.indicator_size; else rv = mw->menu.font_ascent; - + if (rv > (mw->menu.font_ascent+mw->menu.font_descent)) rv = mw->menu.font_ascent+mw->menu.font_descent; - + return rv; } @@ -1755,8 +1755,8 @@ widget_value *val, Boolean in_menubar, Boolean highlighted, - Window window, - int x, int y, + Window window, + int x, int y, unsigned width, unsigned height, unsigned label_tab, unsigned binding_tab) @@ -1764,14 +1764,14 @@ int x_offset; int y_offset; unsigned t_height = toggle_decoration_height(mw); - + /* * Draw a toggle. */ x_offset = mw->menu.shadow_thickness + mw->menu.horizontal_margin; y_offset = mw->menu.shadow_thickness + mw->menu.vertical_margin; y_offset += (mw->menu.font_ascent + mw->menu.font_descent - t_height)/2; - + toggle_decoration_draw (mw, window, x + x_offset, y + y_offset, t_height, val->selected); @@ -1789,12 +1789,12 @@ } static void -radio_button_draw (XlwMenuWidget mw, +radio_button_draw (XlwMenuWidget mw, widget_value *val, Boolean in_menubar, Boolean highlighted, - Window window, - int x, int y, + Window window, + int x, int y, unsigned width, unsigned height, unsigned label_tab, unsigned binding_tab) @@ -1802,7 +1802,7 @@ int x_offset; int y_offset; unsigned r_height = radio_decoration_height(mw); - + /* * Draw a toggle. */ @@ -1899,12 +1899,12 @@ } static void -separator_draw (XlwMenuWidget mw, +separator_draw (XlwMenuWidget mw, widget_value *val, Boolean in_menubar, Boolean highlighted, - Window window, - int x, int y, + Window window, + int x, int y, unsigned width, unsigned height, unsigned label_tab, unsigned binding_tab) @@ -1999,7 +1999,7 @@ Boolean horizontal, Boolean just_compute) { - + int x = where->x /* + mw->menu.shadow_thickness */ ; int y = where->y /* + mw->menu.shadow_thickness */ ; unsigned toggle_width; @@ -2013,8 +2013,8 @@ widget_value *_val, Boolean _in_menubar, Boolean _highlighted, - Window _window, - int _x, int _y, + Window _window, + int _x, int _y, unsigned _width, unsigned _height, unsigned _label_tab, unsigned _binding_tab); @@ -2033,13 +2033,13 @@ toggle_width = ws->toggle_width; label_width = ws->label_width; } - + where->x += width; where->y += height; - + if (just_compute) return; - + label_tab = toggle_width; binding_tab = toggle_width + label_width; @@ -2072,8 +2072,8 @@ val, horizontal, highlighted, - ws->window, - x, y, + ws->window, + x, y, width, height, label_tab, binding_tab); @@ -2097,7 +2097,7 @@ if (level >= mw->menu.old_depth) abort (); - ws = &mw->menu.windows [level]; + ws = &mw->menu.windows [level]; for (val = mw->menu.old_stack [level]->contents; val; val = val->next) { @@ -2125,7 +2125,7 @@ max_height += height; } } - + ws->height = max_height; ws->width = max_label_width + max_rest_width + max_toggle_width; ws->toggle_width = max_toggle_width; @@ -2153,7 +2153,7 @@ if (level < mw->menu.old_depth - 1) following_item = mw->menu.old_stack [level + 1]; - else + else { if (lw_menu_accelerate && level == mw->menu.old_depth - 1 @@ -2165,7 +2165,7 @@ #if SLOPPY_TYPES == 1 puts("==================================================================="); print_widget_value (following_item, 1, 0); -#endif +#endif if (following_item && following_item->type == CASCADE_TYPE && following_item->contents @@ -2179,7 +2179,7 @@ #if SLOPPY_TYPES == 1 puts("==== NEW ==== NEW ==== NEW ==== NEW ==== NEW ==== NEW ==== NEW ===="); print_widget_value(following_item, 1, 0); -#endif +#endif } if (hit) @@ -2223,7 +2223,7 @@ else highlighted_pos->y = where.y; } - + just_compute_this_one_p = just_compute_p || ((this || that) && val != this && val != that); @@ -2264,7 +2264,7 @@ set_new_state (XlwMenuWidget mw, widget_value *val, int level) { int i; - + mw->menu.new_depth = 0; for (i = 0; i < level; i++) push_new_stack (mw, mw->menu.old_stack [i]); @@ -2282,9 +2282,9 @@ #define ROOT_PARENT #ifdef ROOT_PARENT Window root = RootWindowOfScreen (DefaultScreenOfDisplay (XtDisplay (mw))); -#endif +#endif window_state *windows; - + if (mw->menu.windows_length >= n) return; @@ -2303,7 +2303,7 @@ xswa.backing_store = Always; mask |= CWBackingStore; } - + if (!mw->menu.windows) { mw->menu.windows = @@ -2331,11 +2331,11 @@ XCreateWindow (XtDisplay (mw), #ifdef ROOT_PARENT root, -#else +#else ((i > 0) ? windows[0].window : XtWindow (XtParent (mw))), -#endif +#endif 0, 0, 1, 1, 0, 0, CopyFromParent, CopyFromParent, mask, &xswa); } @@ -2425,7 +2425,7 @@ && last_same == old_depth - 1 && old_stack [last_same]->contents) last_same--; - + /* Memorize the previously selected item to be able to refresh it */ old_selection = last_same + 1 < old_depth ? old_stack [last_same + 1] : NULL; if (old_selection && !old_selection->enabled) @@ -2438,7 +2438,7 @@ display_menu (called below) uses the old_stack to know what to display. */ for (i = last_same + 1; i < new_depth; i++) old_stack [i] = new_stack [i]; - + mw->menu.old_depth = new_depth; /* refresh the last seletion */ @@ -2455,7 +2455,7 @@ if (lw_menu_accelerate && i == new_depth - 1) break; - + ws->x = previous_ws->x + selection_position.x; ws->y = previous_ws->y + selection_position.y; @@ -2474,13 +2474,13 @@ } /* unmap the menus that popped down */ - + last_same = new_depth; if (lw_menu_accelerate && last_same > 1 && new_stack [last_same - 1]->contents) last_same--; - + for (i = last_same - 1; i < old_depth; i++) if (i >= last_same || !new_stack [i]->contents) XUnmapWindow (XtDisplay (mw), windows [i].window); @@ -2510,7 +2510,7 @@ *val_ptr = NULL; *inside_menu = False; - + /* Find the window */ #if 1 for (i = mw->menu.old_depth - 1; i >= 0; i--) @@ -2592,7 +2592,7 @@ } xgcv.background = mw->core.background_pixel; mw->menu.select_gc = XtGetGC ((Widget)mw, flags, &xgcv); - + xgcv.foreground = mw->menu.foreground; xgcv.background = mw->core.background_pixel; xgcv.fill_style = FillStippled; @@ -2604,7 +2604,7 @@ xgcv.foreground = mw->menu.button_foreground; xgcv.background = mw->core.background_pixel; mw->menu.button_gc = XtGetGC ((Widget)mw, flags, &xgcv); - + xgcv.fill_style = FillStippled; xgcv.stipple = mw->menu.gray_pixmap; mw->menu.inactive_button_gc = XtGetGC ((Widget)mw, @@ -2668,7 +2668,7 @@ if (allocate_nearest_color (dpy, cmap, &topc)) { mw->menu.top_shadow_color = topc.pixel; - } + } } else { @@ -2697,7 +2697,7 @@ if (allocate_nearest_color (dpy, cmap, &botc)) { mw->menu.bottom_shadow_color = botc.pixel; - } + } } else { @@ -2772,12 +2772,12 @@ so that all menu items can be the same height... */ mw->menu.font_ascent = 0; mw->menu.font_descent = 0; - + { XmFontContext context; #if (XmVersion >= 1002) XmFontListEntry fontentry; -#else +#else XmStringCharSet charset; #endif XFontStruct *font; @@ -2793,8 +2793,8 @@ while ((fontentry = XmFontListNextEntry (context))) { char *one_of_them; - XmFontType rettype; - + XmFontType rettype; + one_of_them = XmFontListEntryGetFont (fontentry, &rettype); if (rettype == XmFONT_IS_FONTSET) { @@ -2874,10 +2874,10 @@ XmFontListEntry fontentry; XmFontType rettype; char *one_of_them; -#else +#else XmStringCharSet charset; #endif - + if (! XmFontListInitFontContext (&context, font_list)) abort (); #if (XmVersion >= 1002) @@ -2899,11 +2899,11 @@ { font = (XFontStruct *) one_of_them; } -#else +#else if (! XmFontListGetNextFont (context, &charset, &font)) abort (); XtFree (charset); -#endif +#endif XmFontListFreeFontContext (context); } # endif /* !0 */ @@ -2919,20 +2919,20 @@ { /* Get the GCs and the widget size */ XlwMenuWidget mw = (XlwMenuWidget)new; - + XSetWindowAttributes xswa; int mask; - + Window window = RootWindowOfScreen (DefaultScreenOfDisplay (XtDisplay (mw))); Display *display = XtDisplay (mw); - + /* mw->menu.cursor = XCreateFontCursor (display, mw->menu.cursor_shape); */ mw->menu.cursor = mw->menu.cursor_shape; - + mw->menu.gray_pixmap = XCreatePixmapFromBitmapData (display, window, (char *) gray_bits, gray_width, gray_height, 1, 0, 1); - + #ifdef NEED_MOTIF /* The menu.font_list slot came from the *fontList resource (Motif standard.) The menu.font_list_2 slot came from the *font resource, for backward @@ -2960,29 +2960,29 @@ xswa.background_pixel = mw->core.background_pixel; xswa.border_pixel = mw->core.border_pixel; mask = CWBackPixel | CWBorderPixel; - + mw->menu.popped_up = False; mw->menu.pointer_grabbed = False; mw->menu.next_release_must_exit = False; - + mw->menu.old_depth = 1; - mw->menu.old_stack = (widget_value**)XtMalloc (sizeof (widget_value*)); + mw->menu.old_stack = XtNew (widget_value*); mw->menu.old_stack_length = 1; mw->menu.old_stack [0] = mw->menu.contents; - + mw->menu.new_depth = 0; mw->menu.new_stack = 0; mw->menu.new_stack_length = 0; push_new_stack (mw, mw->menu.contents); - - mw->menu.windows = (window_state*)XtMalloc (sizeof (window_state)); + + mw->menu.windows = XtNew (window_state); mw->menu.windows_length = 1; mw->menu.windows [0].x = 0; mw->menu.windows [0].y = 0; mw->menu.windows [0].width = 0; mw->menu.windows [0].height = 0; size_menu (mw, 0); - + mw->core.width = mw->menu.windows [0].width; mw->core.height = mw->menu.windows [0].height; } @@ -3023,7 +3023,7 @@ /* Only the toplevel menubar/popup is a widget so it's the only one that receives expose events through Xt. So we repaint all the other panes when receiving an Expose event. */ -static void +static void XlwMenuRedisplay (Widget w, XEvent *ev, Region region) { XlwMenuWidget mw = (XlwMenuWidget)w; @@ -3037,7 +3037,7 @@ remap_menubar (mw); /* #### - do these two lines do anything? */ } -static void +static void XlwMenuDestroy (Widget w) { int i; @@ -3048,7 +3048,7 @@ XtUngrabPointer (w, CurrentTime); mw->menu.pointer_grabbed = False; } - + release_drawing_gcs (mw); release_shadow_gcs (mw); @@ -3082,7 +3082,7 @@ XtFree ((char *) mw->menu.windows); } -static Boolean +static Boolean XlwMenuSetValues (Widget current, Widget request, Widget new, ArgList args, Cardinal *num_args) { @@ -3111,7 +3111,7 @@ release_drawing_gcs (newmw); make_drawing_gcs (newmw); redisplay = True; - + for (i = 0; i < oldmw->menu.windows_length; i++) { XSetWindowBackground (XtDisplay (oldmw), @@ -3126,7 +3126,7 @@ return redisplay; } -static void +static void XlwMenuResize (Widget w) { XlwMenuWidget mw = (XlwMenuWidget)w; @@ -3153,7 +3153,7 @@ if (select_p && !stay_up) { /* pop down all menus and exit */ mw->menu.next_release_must_exit = True; - set_new_state(mw, (val = NULL), 1); + set_new_state(mw, (val = NULL), 1); } } else @@ -3180,14 +3180,14 @@ item is on the menubar itself, then exit. */ if (level == (mw->menu.popped_up ? 0 : 1)) mw->menu.next_release_must_exit = True; - } + } else mw->menu.menu_bounce_time = 0; set_new_state (mw, val, level); } mw->menu.last_selected_val = val; remap_menubar (mw); - + /* Sync with the display. Makes it feel better on X terms. */ XFlush (XtDisplay (mw)); } @@ -3223,15 +3223,15 @@ Time x_focus_timestamp_really_sucks_fix_me_better; -static void +static void Start (Widget w, XEvent *ev, String *params, Cardinal *num_params) { XlwMenuWidget mw = (XlwMenuWidget)w; lw_menubar_widget = w; - + lw_menu_active = True; - + if (!mw->menu.pointer_grabbed) { mw->menu.menu_post_time = ev->xbutton.time; @@ -3241,11 +3241,11 @@ x_focus_timestamp_really_sucks_fix_me_better = ((XButtonPressedEvent*)ev)->time; XtCallCallbackList ((Widget)mw, mw->menu.open, NULL); - + /* notes the absolute position of the menubar window */ mw->menu.windows [0].x = ev->xmotion.x_root - ev->xmotion.x; mw->menu.windows [0].y = ev->xmotion.y_root - ev->xmotion.y; - + XtGrabPointer ((Widget)mw, False, (ButtonMotionMask | ButtonReleaseMask | ButtonPressMask), GrabModeAsync, GrabModeAsync, @@ -3258,21 +3258,21 @@ handle_motion_event (mw, &ev->xmotion, True); } -static void +static void Drag (Widget w, XEvent *ev, String *params, Cardinal *num_params) { XlwMenuWidget mw = (XlwMenuWidget)w; handle_motion_event (mw, &ev->xmotion, False); } -static void +static void Select (Widget w, XEvent *ev, String *params, Cardinal *num_params) { XlwMenuWidget mw = (XlwMenuWidget)w; widget_value *selected_item = mw->menu.old_stack [mw->menu.old_depth - 1]; - + lw_menu_accelerate = False; - + /* If user releases the button quickly, without selecting anything, after the initial down-click that brought the menu up, do nothing. */ @@ -3287,7 +3287,7 @@ /* pop down everything */ mw->menu.new_depth = 1; remap_menubar (mw); - + /* Destroy() only gets called for popup menus. Menubar widgets aren't destroyed when their menu panes get nuked. */ if (mw->menu.pointer_grabbed) @@ -3295,18 +3295,18 @@ XtUngrabPointer ((Widget)w, ev->xmotion.time); mw->menu.pointer_grabbed = False; } - + if (mw->menu.popped_up) { mw->menu.popped_up = False; XtPopdown (XtParent (mw)); } - + lw_menu_active = False; - + x_focus_timestamp_really_sucks_fix_me_better = ((XButtonPressedEvent*)ev)->time; - + /* callback */ XtCallCallbackList ((Widget) mw, mw->menu.select, (XtPointer) selected_item); } @@ -3328,45 +3328,45 @@ XlwMenuWidget mw = (XlwMenuWidget)lw_menubar_widget; lw_menu_accelerate = True; - + if (!mw->menu.pointer_grabbed) { XWindowAttributes ret; Window parent,root; Window *waste; unsigned int num_waste; - + lw_menu_active = True; - + mw->menu.menu_post_time = t; mw->menu.menu_bounce_time = 0; - + mw->menu.next_release_must_exit = True; mw->menu.last_selected_val = NULL; - + XtCallCallbackList ((Widget)mw, mw->menu.open, NULL); - + /* do this for keyboards too! */ /* notes the absolute position of the menubar window */ /* mw->menu.windows [0].x = ev->xmotion.x_root - ev->xmotion.x; mw->menu.windows [0].y = ev->xmotion.y_root - ev->xmotion.y; */ - + /* get the geometry of the menubar */ - + /* there has to be a better way than this. */ - + mw->menu.windows [0].x = 0; mw->menu.windows [0].y = 0; - + parent = XtWindow (lw_menubar_widget); do { XGetWindowAttributes (XtDisplay (lw_menubar_widget), parent, &ret); mw->menu.windows [0].x += ret.x; mw->menu.windows [0].y += ret.y; - + if (parent) XQueryTree (XtDisplay (lw_menubar_widget), parent, &root, &parent, &waste, &num_waste); @@ -3376,7 +3376,7 @@ } } while (parent != root); - + XtGrabPointer ((Widget)mw, False, (ButtonMotionMask | ButtonReleaseMask | ButtonPressMask), GrabModeAsync, GrabModeAsync, @@ -3392,9 +3392,9 @@ XlwMenuWidget mw = (XlwMenuWidget)lw_menubar_widget; lw_menu_accelerate = True; - + remap_menubar (mw); - + /* Sync with the display. Makes it feel better on X terms. */ XFlush (XtDisplay (mw)); } @@ -3421,12 +3421,12 @@ xlw_kill_menus (widget_value *val) { XlwMenuWidget mw = (XlwMenuWidget)lw_menubar_widget; - + lw_menu_accelerate = False; - + mw->menu.new_depth = 1; remap_menubar (mw); - + if (mw->menu.pointer_grabbed) { XtUngrabPointer (lw_menubar_widget, CurrentTime); @@ -3461,7 +3461,7 @@ else if (mw->menu.new_depth >= 1) return mw->menu.new_stack [mw->menu.new_depth - 1]; - + return NULL; } @@ -3497,16 +3497,16 @@ x -= borderwidth; y -= borderwidth; - + if (x < borderwidth) x = borderwidth; - + if (x > WidthOfScreen (screen) - w - 2 * borderwidth) x = WidthOfScreen (screen) - w - 2 * borderwidth; - + if (y < borderwidth) y = borderwidth; - + if (y > HeightOfScreen (screen) - h - 2 * borderwidth) y = HeightOfScreen (screen) - h - 2 * borderwidth;
--- a/lwlib/xlwscrollbar.c Mon Aug 13 09:53:23 2007 +0200 +++ b/lwlib/xlwscrollbar.c Mon Aug 13 09:54:23 2007 +0200 @@ -1,4 +1,4 @@ -/* Implements a lightweight scrollbar widget. +/* Implements a lightweight scrollbar widget. Copyright (C) 1992, 1993, 1994 Lucid, Inc. Copyright (C) 1997 Sun Microsystems, Inc. @@ -31,7 +31,7 @@ * Emacs*XlwScrollBar.translations: #override \n\ * <Btn1Down>: PageDownOrRight() \n\ * <Btn3Down>: PageUpOrLeft() - * + * */ /* @@ -192,10 +192,10 @@ { XmNsliderStyle, XmCSliderStyle, XtRString, sizeof(char *), offset(sb.sliderStyle), XtRImmediate, NULL}, { XmNknobStyle, XmCKnobStyle, XtRString, sizeof(char *), - offset(sb.sliderStyle), XtRImmediate, NULL}, + offset(sb.knobStyle), XtRImmediate, NULL}, - { XmNarrowPosition, XmCArrowPosition, XtRString, - sizeof(char *), offset(sb.arrowPosition), XtRImmediate, NULL}, + { XmNarrowPosition, XmCArrowPosition, XtRString, sizeof(char *), + offset(sb.arrowPosition), XtRImmediate, NULL}, }; /*-------------------------- Prototypes ---------------------------------*/ @@ -308,7 +308,7 @@ (w->sb.value < w->sb.minimum) || (w->sb.value > w->sb.maximum - w->sb.sliderSize)) { - printf("above=%d ss=%d below=%d height=%d\n", + printf("above=%d ss=%d below=%d height=%d\n", w->sb.above, w->sb.ss, w->sb.below, height); printf("value=%d min=%d max=%d ss=%d max-ss=%d\n", w->sb.value, w->sb.minimum, w->sb.maximum, @@ -473,7 +473,9 @@ static SliderStyle slider_style (XlwScrollBarWidget w) { - return w->sb.sliderStyle && w->sb.sliderStyle[0] == 'd' ? + return (w->sb.sliderStyle ? w->sb.sliderStyle[0] == 'd' : + w->sb.knobStyle ? w->sb.knobStyle[0] == 'd' : + 0) ? SLIDER_DIMPLE : SLIDER_PLAIN; } @@ -501,7 +503,7 @@ fg = WhitePixelOfScreen (DefaultScreenOfDisplay (XtDisplay (w))); bg = BlackPixelOfScreen (DefaultScreenOfDisplay (XtDisplay (w))); } - + values.foreground = fg; values.background = bg; values.fill_style = FillOpaqueStippled; @@ -656,11 +658,11 @@ } } - if (w->sb.topShadowColor == w->core.background_pixel || + if (w->sb.topShadowColor == w->core.background_pixel || w->sb.bottomShadowColor == w->core.background_pixel) { /* Assume we're in mono. This code should be okay even if we're - * really in color but just short on color cells -- We want the + * really in color but just short on color cells -- We want the * following behavior, which has been empirically determined to * work well for all fg/bg combinations in mono: If the trough * and slider are BOTH black, then use a white top shadow and a @@ -864,7 +866,7 @@ if (shadowT > (width / 2)) shadowT = (width / 2); if (shadowT > (height / 2)) shadowT = (height / 2); if (shadowT < 0) shadowT = 0; - + /* \- */ make_vert_seg (shine, x, y, @@ -903,7 +905,7 @@ if (shadowT > (width / 2)) shadowT = (width / 2); if (shadowT > (height / 2)) shadowT = (height / 2); if (shadowT < 0) shadowT = 0; - + /* |\ */ make_hor_seg (shine, x, y, @@ -1501,7 +1503,7 @@ w->sb.pageIncrement != pageIncrement)) { int last_value = w->sb.value; - + w->sb.value = value; w->sb.sliderSize = sliderSize; w->sb.increment = increment; @@ -1591,7 +1593,7 @@ { if (mouse_y >= (height -= arrow_height)) return BUTTON_DOWN_ARROW; - + if (arrow_same_end (w)) { if (mouse_y >= (height -= arrow_height)) @@ -1601,7 +1603,7 @@ if ( (mouse_y -= arrow_height) < 0) return BUTTON_UP_ARROW; } - + if ( (mouse_y -= w->sb.above) < 0) return BUTTON_TROUGH_ABOVE; @@ -1711,7 +1713,7 @@ { seg_pixel_sizes (w, &w->sb.above, &w->sb.ss, &w->sb.below); draw_slider (w, w->sb.above, w->sb.ss, w->sb.below); - + call_callbacks (w, reason, w->sb.value, mouse_y, event); if (w->sb.timerActive) @@ -1823,7 +1825,7 @@ int scroll_region_y = widget_y (w); int scroll_region_h = widget_h (w); - + if (w->sb.showArrows) { int arrow_height = arrow_h (w); @@ -1847,7 +1849,7 @@ w->sb.above = mouse_y - (w->sb.ss / 2) - scroll_region_y; if (w->sb.above < 0) w->sb.above = 0; - else if (w->sb.above + w->sb.ss > scroll_region_h) + else if (w->sb.above + w->sb.ss > scroll_region_h) w->sb.above = scroll_region_h - w->sb.ss; w->sb.below = scroll_region_h - w->sb.ss - w->sb.above; @@ -1863,7 +1865,7 @@ if (w->sb.value != last_value) call_callbacks (w, XmCR_DRAG, w->sb.value, mouse_y, event); - + break; default: ; /* Do nothing */
--- a/lwlib/xlwscrollbarP.h Mon Aug 13 09:53:23 2007 +0200 +++ b/lwlib/xlwscrollbarP.h Mon Aug 13 09:54:23 2007 +0200 @@ -1,4 +1,4 @@ -/* Implements a lightweight scrollbar widget. +/* Implements a lightweight scrollbar widget. Copyright (C) 1992, 1993, 1994 Lucid, Inc. This file is part of the Lucid Widget Library. @@ -85,6 +85,7 @@ unsigned char orientation; char *sliderStyle; + char *knobStyle; char *arrowPosition; /* private */
--- a/man/ChangeLog Mon Aug 13 09:53:23 2007 +0200 +++ b/man/ChangeLog Mon Aug 13 09:54:23 2007 +0200 @@ -1,3 +1,8 @@ +1997-08-15 Karl M. Hegbloom <karlheg@inetarena.com> + + * cl.texi (Type Predicates): Update for corrected handling of + `string-char' and `character'. + Tue Aug 5 21:56:02 1997 Barry A. Warsaw <cc-mode-help@python.org> * cc-mode.texi:
--- a/man/cc-mode.texi Mon Aug 13 09:53:23 2007 +0200 +++ b/man/cc-mode.texi Mon Aug 13 09:54:23 2007 +0200 @@ -46,7 +46,7 @@ @comment The title is printed in a large font. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@center @titlefont{CC Mode 5.15} +@center @titlefont{CC Mode 5.16} @sp 2 @center @subtitlefont{A GNU Emacs mode for editing C and C-like languages} @sp 2
--- a/man/cl.texi Mon Aug 13 09:53:23 2007 +0200 +++ b/man/cl.texi Mon Aug 13 09:54:23 2007 +0200 @@ -815,7 +815,10 @@ @item The type symbols @code{character} and @code{string-char} match -integers in the range from 0 to 255. +characters. In Emacs-19 and XEmacs-19, characters are the same thing as +integers in the range 0-255. In XEmacs-20, where characters are a +first-class data type, this checks for actual characters, and ++@code{(typep 8bit-integer 'character)} will return @code{nil}. @item The type symbol @code{float} uses the @code{floatp-safe} predicate
--- a/nt/runemacs.c Mon Aug 13 09:53:23 2007 +0200 +++ b/nt/runemacs.c Mon Aug 13 09:54:23 2007 +0200 @@ -1,130 +1,130 @@ -/* - Simple program to start Emacs with its console window hidden. - - This program is provided purely for convenience, since most users will - use Emacs in windowing (GUI) mode, and will not want to have an extra - console window lying around. */ - -/* - You may want to define this if you want to be able to install updated - emacs binaries even when other users are using the current version. - The problem with some file servers (notably Novell) is that an open - file cannot be overwritten, deleted, or even renamed. So if someone - is running emacs.exe already, you cannot install a newer version. - By defining CHOOSE_NEWEST_EXE, you can name your new emacs.exe - something else which matches "emacs*.exe", and runemacs will - automatically select the newest emacs executeable in the bin directory. - (So you'll probably be able to delete the old version some hours/days - later). -*/ - -/* #define CHOOSE_NEWEST_EXE */ - -#define WIN32 - -#include <windows.h> -#include <string.h> -#include <malloc.h> - -int WINAPI -WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, int nShow) -{ - STARTUPINFO start; - SECURITY_ATTRIBUTES sec_attrs; - SECURITY_DESCRIPTOR sec_desc; - PROCESS_INFORMATION child; - int wait_for_child = FALSE; - DWORD ret_code = 0; - char *new_cmdline; - char *p; - char modname[MAX_PATH]; - - if (!GetModuleFileName (NULL, modname, MAX_PATH)) - goto error; - if ((p = strrchr (modname, '\\')) == NULL) - goto error; - *p = 0; - - new_cmdline = alloca (MAX_PATH + strlen (cmdline) + 1); - strcpy (new_cmdline, modname); - -#ifdef CHOOSE_NEWEST_EXE - { - /* Silly hack to allow new versions to be installed on - server even when current version is in use. */ - - char * best_name = alloca (MAX_PATH + 1); - FILETIME best_time = {0,0}; - WIN32_FIND_DATA wfd; - HANDLE fh; - p = new_cmdline + strlen (new_cmdline); - strcpy (p, "\\emacs*.exe "); - fh = FindFirstFile (new_cmdline, &wfd); - if (fh == INVALID_HANDLE_VALUE) - goto error; - do - { - if (wfd.ftLastWriteTime.dwHighDateTime > best_time.dwHighDateTime - || (wfd.ftLastWriteTime.dwHighDateTime == best_time.dwHighDateTime - && wfd.ftLastWriteTime.dwLowDateTime > best_time.dwLowDateTime)) - { - best_time = wfd.ftLastWriteTime; - strcpy (best_name, wfd.cFileName); - } - } - while (FindNextFile (fh, &wfd)); - FindClose (fh); - *p++ = '\\'; - strcpy (p, best_name); - strcat (p, " "); - } -#else - strcat (new_cmdline, "\\emacs.exe "); -#endif - - /* Append original arguments if any; first look for -wait as first - argument, and apply that ourselves. */ - if (strncmp (cmdline, "-wait", 5) == 0) - { - wait_for_child = TRUE; - cmdline += 5; - } - strcat (new_cmdline, cmdline); - - /* Set emacs_dir variable if runemacs was in "%emacs_dir%\bin". */ - if ((p = strrchr (modname, '\\')) && stricmp (p, "\\bin") == 0) - { - *p = 0; - for (p = modname; *p; p++) - if (*p == '\\') *p = '/'; - SetEnvironmentVariable ("emacs_dir", modname); - } - - memset (&start, 0, sizeof (start)); - start.cb = sizeof (start); - start.dwFlags = STARTF_USESHOWWINDOW; - start.wShowWindow = SW_HIDE; - - sec_attrs.nLength = sizeof (sec_attrs); - sec_attrs.lpSecurityDescriptor = NULL; - sec_attrs.bInheritHandle = FALSE; - - if (CreateProcess (NULL, new_cmdline, &sec_attrs, NULL, TRUE, 0, - NULL, NULL, &start, &child)) - { - if (wait_for_child) - { - WaitForSingleObject (child.hProcess, INFINITE); - GetExitCodeProcess (child.hProcess, &ret_code); - } - CloseHandle (child.hThread); - CloseHandle (child.hProcess); - } - else - goto error; - return (int) ret_code; - -error: - MessageBox (NULL, "Could not start Emacs.", "Error", MB_ICONSTOP); - return 1; -} +/* + Simple program to start Emacs with its console window hidden. + + This program is provided purely for convenience, since most users will + use Emacs in windowing (GUI) mode, and will not want to have an extra + console window lying around. */ + +/* + You may want to define this if you want to be able to install updated + emacs binaries even when other users are using the current version. + The problem with some file servers (notably Novell) is that an open + file cannot be overwritten, deleted, or even renamed. So if someone + is running emacs.exe already, you cannot install a newer version. + By defining CHOOSE_NEWEST_EXE, you can name your new emacs.exe + something else which matches "emacs*.exe", and runemacs will + automatically select the newest emacs executeable in the bin directory. + (So you'll probably be able to delete the old version some hours/days + later). +*/ + +/* #define CHOOSE_NEWEST_EXE */ + +#define WIN32 + +#include <windows.h> +#include <string.h> +#include <malloc.h> + +int WINAPI +WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, int nShow) +{ + STARTUPINFO start; + SECURITY_ATTRIBUTES sec_attrs; + SECURITY_DESCRIPTOR sec_desc; + PROCESS_INFORMATION child; + int wait_for_child = FALSE; + DWORD ret_code = 0; + char *new_cmdline; + char *p; + char modname[MAX_PATH]; + + if (!GetModuleFileName (NULL, modname, MAX_PATH)) + goto error; + if ((p = strrchr (modname, '\\')) == NULL) + goto error; + *p = 0; + + new_cmdline = alloca (MAX_PATH + strlen (cmdline) + 1); + strcpy (new_cmdline, modname); + +#ifdef CHOOSE_NEWEST_EXE + { + /* Silly hack to allow new versions to be installed on + server even when current version is in use. */ + + char * best_name = alloca (MAX_PATH + 1); + FILETIME best_time = {0,0}; + WIN32_FIND_DATA wfd; + HANDLE fh; + p = new_cmdline + strlen (new_cmdline); + strcpy (p, "\\xemacs*.exe "); + fh = FindFirstFile (new_cmdline, &wfd); + if (fh == INVALID_HANDLE_VALUE) + goto error; + do + { + if (wfd.ftLastWriteTime.dwHighDateTime > best_time.dwHighDateTime + || (wfd.ftLastWriteTime.dwHighDateTime == best_time.dwHighDateTime + && wfd.ftLastWriteTime.dwLowDateTime > best_time.dwLowDateTime)) + { + best_time = wfd.ftLastWriteTime; + strcpy (best_name, wfd.cFileName); + } + } + while (FindNextFile (fh, &wfd)); + FindClose (fh); + *p++ = '\\'; + strcpy (p, best_name); + strcat (p, " "); + } +#else + strcat (new_cmdline, "\\xemacs.exe "); +#endif + + /* Append original arguments if any; first look for -wait as first + argument, and apply that ourselves. */ + if (strncmp (cmdline, "-wait", 5) == 0) + { + wait_for_child = TRUE; + cmdline += 5; + } + strcat (new_cmdline, cmdline); + + /* Set emacs_dir variable if runemacs was in "%emacs_dir%\bin". */ + if ((p = strrchr (modname, '\\')) && stricmp (p, "\\bin") == 0) + { + *p = 0; + for (p = modname; *p; p++) + if (*p == '\\') *p = '/'; + SetEnvironmentVariable ("emacs_dir", modname); + } + + memset (&start, 0, sizeof (start)); + start.cb = sizeof (start); + start.dwFlags = STARTF_USESHOWWINDOW; + start.wShowWindow = SW_HIDE; + + sec_attrs.nLength = sizeof (sec_attrs); + sec_attrs.lpSecurityDescriptor = NULL; + sec_attrs.bInheritHandle = FALSE; + + if (CreateProcess (NULL, new_cmdline, &sec_attrs, NULL, TRUE, 0, + NULL, NULL, &start, &child)) + { + if (wait_for_child) + { + WaitForSingleObject (child.hProcess, INFINITE); + GetExitCodeProcess (child.hProcess, &ret_code); + } + CloseHandle (child.hThread); + CloseHandle (child.hProcess); + } + else + goto error; + return (int) ret_code; + +error: + MessageBox (NULL, "Could not start XEmacs.", "Error", MB_ICONSTOP); + return 1; +}
--- a/nt/xemacs.mak Mon Aug 13 09:53:23 2007 +0200 +++ b/nt/xemacs.mak Mon Aug 13 09:54:23 2007 +0200 @@ -1,18 +1,19 @@ -MSDEV=G:/msdev -X11R6=G:/utils/X11R6 +MSDEV=E:\msdev +X11R6=E:\utils\X11R6 XEMACS=.. -LISP=$(XEMACS)/lisp +LISP=$(XEMACS)\lisp -EMACS_MAJOR_VERSION=20 -EMACS_MINOR_VERSION=3 -XEMACS_CODENAME=\"Stockholm\" +OPT=-Od -Zi +#OPT=-O2 -G5 -Zi + +!include "..\version.sh" #------------------------------------------------------------------------------ # Generic variables -INCLUDES=-I$(X11R6)/include -I$(XEMACS)/nt/inc -I$(XEMACS)/src\ - -I$(XEMACS)/lwlib -I$(MSDEV)/include +INCLUDES=-I$(X11R6)\include -I$(XEMACS)\nt\inc -I$(XEMACS)\src\ + -I$(XEMACS)\lwlib -I$(MSDEV)\include LIBRARIES= OUTDIR=obj @@ -25,844 +26,741 @@ @echo "Ignore error message if $(OUTDIR) subdirectory already exists." -@mkdir $(OUTDIR) +XEMACS_INCLUDES=\ + $(XEMACS)\src\config.h \ + $(XEMACS)\src\Emacs.ad.h \ + $(XEMACS)\src\paths.h + +$(XEMACS_INCLUDES): + !"copy *.h $(XEMACS)\src" + +#------------------------------------------------------------------------------ + # LASTFILE Library -LASTFILE=$(OUTDIR)/lastfile.lib -LASTFILE_SRC=$(XEMACS)/src -LASTFILE_FLAGS=-nologo -w -Od $(INCLUDES) -Fo$@ -c +LASTFILE=$(OUTDIR)\lastfile.lib +LASTFILE_SRC=$(XEMACS)\src +LASTFILE_FLAGS=-nologo -w $(OPT) $(INCLUDES) -Fo$@ -c LASTFILE_OBJS= \ - $(OUTDIR)/lastfile.obj + $(OUTDIR)\lastfile.obj $(LASTFILE): $(LASTFILE_OBJS) - link.exe -lib /nologo /out:$@ $(LASTFILE_OBJS) + link.exe -lib -nologo -out:$@ $(LASTFILE_OBJS) -$(OUTDIR)/lastfile.obj: $(LASTFILE_SRC)/lastfile.c +$(OUTDIR)\lastfile.obj: $(LASTFILE_SRC)\lastfile.c $(CC) $(LASTFILE_FLAGS) $** #------------------------------------------------------------------------------ # LWLIB Library -LWLIB=$(OUTDIR)/lwlib.lib -LWLIB_SRC=$(XEMACS)/lwlib -LWLIB_FLAGS=/nologo /w /Od /Zi $(INCLUDES) /D "WIN32" /D "_DEBUG" \ - /D "_NTSDK" /D "_M_IX86" /D "_X86_" \ - /D "NEED_ATHENA" /D "NEED_LUCID" \ - /D "_WINDOWS" /D "MENUBARS_LUCID" /D "SCROLLBARS_LUCID" /D "DIALOGS_ATHENA" \ - /D "WINDOWSNT" /Fo$@ /c +LWLIB=$(OUTDIR)\lwlib.lib +LWLIB_SRC=$(XEMACS)\lwlib +LWLIB_FLAGS=-nologo -w $(OPT) $(INCLUDES) -D "WIN32" -D "_DEBUG" \ + -D "_NTSDK" -D "_M_IX86" -D "_X86_" \ + -D "NEED_ATHENA" -D "NEED_LUCID" \ + -D "_WINDOWS" -D "MENUBARS_LUCID" -D "SCROLLBARS_LUCID" -D "DIALOGS_ATHENA" \ + -D "WINDOWSNT" -Fo$@ -c LWLIB_OBJS= \ - $(OUTDIR)/lwlib-config.obj \ - $(OUTDIR)/lwlib-utils.obj \ - $(OUTDIR)/lwlib-Xaw.obj \ - $(OUTDIR)/lwlib-Xlw.obj \ - $(OUTDIR)/lwlib.obj \ - $(OUTDIR)/xlwmenu.obj \ - $(OUTDIR)/xlwscrollbar.obj + $(OUTDIR)\lwlib-config.obj \ + $(OUTDIR)\lwlib-utils.obj \ + $(OUTDIR)\lwlib-Xaw.obj \ + $(OUTDIR)\lwlib-Xlw.obj \ + $(OUTDIR)\lwlib.obj \ + $(OUTDIR)\xlwmenu.obj \ + $(OUTDIR)\xlwscrollbar.obj -$(LWLIB): $(LWLIB_OBJS) +$(LWLIB): $(XEMACS_INCLUDES) $(LWLIB_OBJS) link.exe -lib -nologo -debug -debugtype:both -out:$@ $(LWLIB_OBJS) -$(OUTDIR)/lwlib-config.obj: $(LWLIB_SRC)/lwlib-config.c +$(OUTDIR)\lwlib-config.obj: $(LWLIB_SRC)\lwlib-config.c $(CC) $(LWLIB_FLAGS) $** -$(OUTDIR)/lwlib-utils.obj: $(LWLIB_SRC)/lwlib-utils.c +$(OUTDIR)\lwlib-utils.obj: $(LWLIB_SRC)\lwlib-utils.c $(CC) $(LWLIB_FLAGS) $** -$(OUTDIR)/lwlib-Xaw.obj: $(LWLIB_SRC)/lwlib-Xaw.c +$(OUTDIR)\lwlib-Xaw.obj: $(LWLIB_SRC)\lwlib-Xaw.c $(CC) $(LWLIB_FLAGS) $** -$(OUTDIR)/lwlib-Xlw.obj: $(LWLIB_SRC)/lwlib-Xlw.c +$(OUTDIR)\lwlib-Xlw.obj: $(LWLIB_SRC)\lwlib-Xlw.c $(CC) $(LWLIB_FLAGS) $** -$(OUTDIR)/lwlib.obj: $(LWLIB_SRC)/lwlib.c +$(OUTDIR)\lwlib.obj: $(LWLIB_SRC)\lwlib.c $(CC) $(LWLIB_FLAGS) $** -$(OUTDIR)/xlwmenu.obj: $(LWLIB_SRC)/xlwmenu.c +$(OUTDIR)\xlwmenu.obj: $(LWLIB_SRC)\xlwmenu.c $(CC) $(LWLIB_FLAGS) $** -$(OUTDIR)/xlwscrollbar.obj: $(LWLIB_SRC)/xlwscrollbar.c +$(OUTDIR)\xlwscrollbar.obj: $(LWLIB_SRC)\xlwscrollbar.c $(CC) $(LWLIB_FLAGS) $** #------------------------------------------------------------------------------ # lib-src programs -LIB_SRC=$(XEMACS)/lib-src +LIB_SRC=$(XEMACS)\lib-src LIB_SRC_FLAGS=$(INCLUDES) -D_DEBUG -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN \ -D_NTSDK -D_M_IX86 -ML -D_X86_ -Demacs -DHAVE_CONFIG_H -D_MSC_VER=999 LIB_SRC_LIBS= kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib \ odbccp32.lib libc.lib -LIB_SRC_LFLAGS=/nologo $(LIB_SRC_LIBS) /base:0x1000000\ - /subsystem:console /pdb:none /debugtype:both /machine:I386\ - /nodefaultlib /out:$@ /debug:full - -DOC=$(LIB_SRC)/DOC -DOC_SRCS_1=\ - $(XEMACS)/src/abbrev.c \ - $(XEMACS)/src/alloc.c \ - $(XEMACS)/src/alloca.c \ - $(XEMACS)/src/blocktype.c \ - $(XEMACS)/src/buffer.c \ - $(XEMACS)/src/bytecode.c \ - $(XEMACS)/src/callint.c \ - $(XEMACS)/src/callproc.c \ - $(XEMACS)/src/casefiddle.c \ - $(XEMACS)/src/casetab.c \ - $(XEMACS)/src/chartab.c \ - $(XEMACS)/src/cmdloop.c \ - $(XEMACS)/src/cmds.c \ - $(XEMACS)/src/console-stream.c \ - $(XEMACS)/src/console-x.c \ - $(XEMACS)/src/console.c \ - $(XEMACS)/src/data.c \ - $(XEMACS)/src/debug.c \ - $(XEMACS)/src/device-x.c \ - $(XEMACS)/src/device.c \ - $(XEMACS)/src/dgif_lib.c \ - $(XEMACS)/src/dialog-x.c \ - $(XEMACS)/src/dialog.c \ - $(XEMACS)/src/dired.c \ - $(XEMACS)/src/doc.c \ - $(XEMACS)/src/doprnt.c \ - $(XEMACS)/src/dynarr.c \ - $(XEMACS)/src/editfns.c \ - $(XEMACS)/src/elhash.c \ - $(XEMACS)/src/emacs.c \ - $(XEMACS)/src/EmacsFrame.c \ - $(XEMACS)/src/EmacsManager.c \ - $(XEMACS)/src/EmacsShell-sub.c\ - $(XEMACS)/src/EmacsShell.c \ - $(XEMACS)/src/energize.c \ - $(XEMACS)/src/eval.c \ - $(XEMACS)/src/event-stream.c \ - $(XEMACS)/src/event-unixoid.c \ - $(XEMACS)/src/event-Xt.c \ - $(XEMACS)/src/events.c \ - $(XEMACS)/src/extents.c \ - $(XEMACS)/src/faces.c \ - $(XEMACS)/src/fileio.c \ - $(XEMACS)/src/filelock.c \ - $(XEMACS)/src/filemode.c \ - $(XEMACS)/src/floatfns.c \ - $(XEMACS)/src/fns.c \ - $(XEMACS)/src/font-lock.c \ - $(XEMACS)/src/frame-x.c \ - $(XEMACS)/src/frame.c \ - $(XEMACS)/src/free-hook.c \ - $(XEMACS)/src/general.c \ - $(XEMACS)/src/gif_err.c \ - $(XEMACS)/src/gifalloc.c \ - $(XEMACS)/src/glyphs-x.c \ - $(XEMACS)/src/glyphs.c \ - $(XEMACS)/src/gmalloc.c \ - $(XEMACS)/src/gui-x.c \ - $(XEMACS)/src/gui.c \ - $(XEMACS)/src/hash.c \ - $(XEMACS)/src/indent.c \ - $(XEMACS)/src/inline.c \ - $(XEMACS)/src/insdel.c \ - $(XEMACS)/src/intl.c \ - $(XEMACS)/src/keymap.c \ - $(XEMACS)/src/lread.c \ - $(XEMACS)/src/lstream.c \ - $(XEMACS)/src/macros.c \ - $(XEMACS)/src/marker.c \ - $(XEMACS)/src/md5.c \ - $(XEMACS)/src/menubar-x.c \ - $(XEMACS)/src/menubar.c \ - $(XEMACS)/src/minibuf.c \ - $(XEMACS)/src/nt.c \ - $(XEMACS)/src/ntheap.c \ - $(XEMACS)/src/ntproc.c \ - $(XEMACS)/src/objects-x.c \ - $(XEMACS)/src/objects.c \ - $(XEMACS)/src/opaque.c \ - $(XEMACS)/src/print.c \ - $(XEMACS)/src/process.c \ - $(XEMACS)/src/pure.c \ - $(XEMACS)/src/rangetab.c \ - $(XEMACS)/src/realpath.c \ - $(XEMACS)/src/redisplay-output.c \ - $(XEMACS)/src/redisplay-x.c \ - $(XEMACS)/src/redisplay.c \ - $(XEMACS)/src/regex.c \ - $(XEMACS)/src/scrollbar-x.c \ - $(XEMACS)/src/scrollbar.c \ - $(XEMACS)/src/search.c \ - $(XEMACS)/src/signal.c \ - $(XEMACS)/src/sound.c \ - $(XEMACS)/src/specifier.c \ - $(XEMACS)/src/strftime.c \ - $(XEMACS)/src/symbols.c \ - $(XEMACS)/src/syntax.c \ - $(XEMACS)/src/sysdep.c \ - $(XEMACS)/src/termcap.c \ - $(XEMACS)/src/tparam.c \ - $(XEMACS)/src/undo.c \ - $(XEMACS)/src/unexnt.c \ - $(XEMACS)/src/vm-limit.c \ - $(XEMACS)/src/window.c \ - $(XEMACS)/src/xgccache.c \ - $(XEMACS)/src/xmu.c \ - $(XEMACS)/src/xselect.c \ - $(XEMACS)/src/balloon-x.c \ - $(XEMACS)/src/balloon_help.c +LIB_SRC_LFLAGS=-nologo $(LIB_SRC_LIBS) -base:0x1000000\ + -subsystem:console -pdb:none -debugtype:both -machine:I386\ + -nodefaultlib -out:$@ -debug:full -DOC_SRCS_2=\ - $(XEMACS)/src/input-method-xlib.c \ - $(XEMACS)/src/mule.c \ - $(XEMACS)/src/mule-charset.c \ - $(XEMACS)/src/mule-ccl.c \ - $(XEMACS)/src/mule-coding.c - -DOC_SRCS_3=\ - $(LISP)/version.el \ - $(LISP)/paths.el \ - $(LISP)/prim/loaddefs.elc \ - $(LISP)/prim/auto-autoloads.elc \ - $(LISP)/prim/loadup.el \ - $(LISP)/prim/subr.elc \ - $(LISP)/prim/cmdloop.elc \ - $(LISP)/utils/text-props.elc \ - $(LISP)/prim/gui.elc \ - $(LISP)/prim/mouse.elc \ - $(LISP)/prim/mode-motion.elc \ - $(LISP)/prim/keymap.elc \ - $(LISP)/prim/syntax.elc \ - $(LISP)/prim/minibuf.elc \ - $(LISP)/prim/faces.elc \ - $(LISP)/prim/objects.elc \ - $(LISP)/prim/process.elc \ - $(LISP)/prim/keydefs.elc \ - $(LISP)/prim/device.elc \ - $(LISP)/prim/obsolete.elc \ - $(LISP)/prim/glyphs.elc \ - $(LISP)/prim/extents.elc \ - $(LISP)/prim/backquote.elc \ - $(LISP)/prim/events.elc \ - $(LISP)/prim/console.elc \ - $(LISP)/utils/map-ynp.elc \ - $(LISP)/prim/modeline.elc \ - $(LISP)/prim/profile.elc \ - $(LISP)/modes/list-mode.elc \ - $(LISP)/utils/derived.elc \ - $(LISP)/cl/cl.elc \ - $(LISP)/cl/cl-defs.elc \ - $(LISP)/prim/undo-stack.elc \ - $(LISP)/prim/simple.elc \ - $(LISP)/prim/help.elc \ - $(LISP)/prim/files.elc \ - $(LISP)/utils/lib-complete.elc \ - $(LISP)/prim/indent.elc \ - $(LISP)/prim/frame.elc \ - $(LISP)/prim/format.elc \ - $(LISP)/prim/window.elc \ - $(LISP)/prim/startup.elc \ - $(LISP)/prim/lisp.elc \ - $(LISP)/prim/page.elc \ - $(LISP)/prim/register.elc \ - $(LISP)/iso/iso8859-1.elc \ - $(LISP)/prim/paragraphs.elc \ - $(LISP)/modes/lisp-mode.elc \ - $(LISP)/modes/text-mode.elc \ - $(LISP)/prim/fill.elc \ - $(LISP)/prim/isearch-mode.elc \ - $(LISP)/prim/misc.elc \ - $(LISP)/packages/vc-hooks.elc \ - $(LISP)/prim/replace.elc \ - $(LISP)/prim/specifier.elc \ - $(LISP)/modes/auto-show.elc \ - $(LISP)/bytecomp/bytecomp-runtime.elc \ - $(LISP)/prim/float-sup.elc \ - $(LISP)/prim/itimer.elc \ - $(LISP)/prim/itimer-autosave.elc \ - $(LISP)/ediff/ediff-hook.elc \ - $(LISP)/packages/fontl-hooks.elc - -DOC_SRCS_4= \ - $(LISP)/prim/scrollbar.elc \ - $(LISP)/prim/buffer.elc \ - $(LISP)/prim/menubar.elc \ - $(LISP)/packages/buff-menu.elc \ - $(LISP)/modes/abbrev.elc \ - $(LISP)/x11/x-menubar.elc \ - $(LISP)/x11/x-faces.elc \ - $(LISP)/x11/x-iso8859-1.elc \ - $(LISP)/x11/x-mouse.elc \ - $(LISP)/x11/x-select.elc \ - $(LISP)/x11/x-scrollbar.elc \ - $(LISP)/x11/x-toolbar.elc \ - $(LISP)/x11/x-misc.elc \ - $(LISP)/x11/x-init.elc \ - $(LISP)/prim/dialog.elc \ - $(LISP)/mule/mule-load.elc \ - $(LISP)/mule/mule-coding.elc \ - $(LISP)/mule/mule-charset.elc \ - $(LISP)/mule/mule-files.elc \ - $(LISP)/mule/mule-category.elc \ - $(LISP)/mule/mule-misc.elc \ - $(LISP)/mule/mule-ccl.elc \ - $(LISP)/mule/mule-init.elc \ - $(LISP)/mule/mule-cmds.elc \ - $(LISP)/mule/kinsoku.elc \ - $(LISP)/mule/mule-x-init.elc \ - $(LISP)/mule/arabic-hooks.elc \ - $(LISP)/mule/chinese-hooks.elc \ - $(LISP)/mule/cyrillic-hooks.elc \ - $(LISP)/mule/ethiopic-hooks.elc \ - $(LISP)/mule/european-hooks.elc \ - $(LISP)/mule/greek-hooks.elc \ - $(LISP)/mule/hebrew-hooks.elc \ - $(LISP)/mule/ipa-hooks.elc \ - $(LISP)/mule/japanese-hooks.elc \ - $(LISP)/mule/korean-hooks.elc \ - $(LISP)/mule/thai-hooks.elc \ - $(LISP)/mule/vietnamese-hooks-1.elc \ - $(LISP)/mule/vietnamese-hooks-2.elc \ - $(LISP)/prim/winnt.el \ - $(LISP)/custom/widget.el \ - $(LISP)/custom/custom.el \ - $(LISP)/prim/cus-start.el +DOC=$(LIB_SRC)\DOC +DOC_SRCS=\ + $(XEMACS)\src\abbrev.c \ + $(XEMACS)\src\alloc.c \ + $(XEMACS)\src\alloca.c \ + $(XEMACS)\src\blocktype.c \ + $(XEMACS)\src\buffer.c \ + $(XEMACS)\src\bytecode.c \ + $(XEMACS)\src\callint.c \ + $(XEMACS)\src\callproc.c \ + $(XEMACS)\src\casefiddle.c \ + $(XEMACS)\src\casetab.c \ + $(XEMACS)\src\chartab.c \ + $(XEMACS)\src\cmdloop.c \ + $(XEMACS)\src\cmds.c \ + $(XEMACS)\src\console-stream.c \ + $(XEMACS)\src\console-x.c \ + $(XEMACS)\src\console.c \ + $(XEMACS)\src\data.c \ + $(XEMACS)\src\debug.c \ + $(XEMACS)\src\device-x.c \ + $(XEMACS)\src\device.c \ + $(XEMACS)\src\dgif_lib.c \ + $(XEMACS)\src\dialog-x.c \ + $(XEMACS)\src\dialog.c \ + $(XEMACS)\src\dired.c \ + $(XEMACS)\src\doc.c \ + $(XEMACS)\src\doprnt.c \ + $(XEMACS)\src\dynarr.c \ + $(XEMACS)\src\editfns.c \ + $(XEMACS)\src\elhash.c \ + $(XEMACS)\src\emacs.c \ + $(XEMACS)\src\EmacsFrame.c \ + $(XEMACS)\src\EmacsManager.c \ + $(XEMACS)\src\EmacsShell-sub.c\ + $(XEMACS)\src\EmacsShell.c \ + $(XEMACS)\src\energize.c \ + $(XEMACS)\src\eval.c \ + $(XEMACS)\src\event-stream.c \ + $(XEMACS)\src\event-unixoid.c \ + $(XEMACS)\src\event-Xt.c \ + $(XEMACS)\src\events.c \ + $(XEMACS)\src\extents.c \ + $(XEMACS)\src\faces.c \ + $(XEMACS)\src\fileio.c \ + $(XEMACS)\src\filelock.c \ + $(XEMACS)\src\filemode.c \ + $(XEMACS)\src\floatfns.c \ + $(XEMACS)\src\fns.c \ + $(XEMACS)\src\font-lock.c \ + $(XEMACS)\src\frame-x.c \ + $(XEMACS)\src\frame.c \ + $(XEMACS)\src\free-hook.c \ + $(XEMACS)\src\general.c \ + $(XEMACS)\src\gif_err.c \ + $(XEMACS)\src\gifalloc.c \ + $(XEMACS)\src\glyphs-x.c \ + $(XEMACS)\src\glyphs.c \ + $(XEMACS)\src\gmalloc.c \ + $(XEMACS)\src\gui-x.c \ + $(XEMACS)\src\gui.c \ + $(XEMACS)\src\hash.c \ + $(XEMACS)\src\indent.c \ + $(XEMACS)\src\inline.c \ + $(XEMACS)\src\insdel.c \ + $(XEMACS)\src\intl.c \ + $(XEMACS)\src\keymap.c \ + $(XEMACS)\src\lread.c \ + $(XEMACS)\src\lstream.c \ + $(XEMACS)\src\macros.c \ + $(XEMACS)\src\marker.c \ + $(XEMACS)\src\md5.c \ + $(XEMACS)\src\menubar-x.c \ + $(XEMACS)\src\menubar.c \ + $(XEMACS)\src\minibuf.c \ + $(XEMACS)\src\nt.c \ + $(XEMACS)\src\ntheap.c \ + $(XEMACS)\src\ntproc.c \ + $(XEMACS)\src\objects-x.c \ + $(XEMACS)\src\objects.c \ + $(XEMACS)\src\opaque.c \ + $(XEMACS)\src\print.c \ + $(XEMACS)\src\process.c \ + $(XEMACS)\src\pure.c \ + $(XEMACS)\src\rangetab.c \ + $(XEMACS)\src\realpath.c \ + $(XEMACS)\src\redisplay-output.c \ + $(XEMACS)\src\redisplay-x.c \ + $(XEMACS)\src\redisplay.c \ + $(XEMACS)\src\regex.c \ + $(XEMACS)\src\scrollbar-x.c \ + $(XEMACS)\src\scrollbar.c \ + $(XEMACS)\src\search.c \ + $(XEMACS)\src\signal.c \ + $(XEMACS)\src\sound.c \ + $(XEMACS)\src\specifier.c \ + $(XEMACS)\src\strftime.c \ + $(XEMACS)\src\symbols.c \ + $(XEMACS)\src\syntax.c \ + $(XEMACS)\src\sysdep.c \ + $(XEMACS)\src\termcap.c \ + $(XEMACS)\src\tparam.c \ + $(XEMACS)\src\undo.c \ + $(XEMACS)\src\unexnt.c \ + $(XEMACS)\src\vm-limit.c \ + $(XEMACS)\src\window.c \ + $(XEMACS)\src\xgccache.c \ + $(XEMACS)\src\xmu.c \ + $(XEMACS)\src\xselect.c \ + $(XEMACS)\src\balloon-x.c \ + $(XEMACS)\src\balloon_help.c \ + $(XEMACS)\src\input-method-xlib.c \ + $(XEMACS)\src\mule.c \ + $(XEMACS)\src\mule-charset.c \ + $(XEMACS)\src\mule-ccl.c \ + $(XEMACS)\src\mule-coding.c MAKE_DOCFILE=$(OUTDIR)\make-docfile.exe $(MAKE_DOCFILE): $(OUTDIR)\make-docfile.obj - link.exe $(LIB_SRC_LFLAGS) $** $(LIB_SRC_LIBS) + link.exe -out:$@ $(LIB_SRC_LFLAGS) $** $(LIB_SRC_LIBS) -$(OUTDIR)/make-docfile.obj: $(LIB_SRC)\make-docfile.c - $(CC) $(LIB_SRC_FLAGS) $** /Fo$@ +$(OUTDIR)\make-docfile.obj: $(LIB_SRC)\make-docfile.c + $(CC) $(LIB_SRC_FLAGS) $** -Fo$@ -RUNEMACS=$(XEMACS)/src/runemacs.exe +RUNEMACS=$(XEMACS)\src\runemacs.exe $(RUNEMACS): $(OUTDIR)\runemacs.obj - link.exe /out:$@ /subsystem:windows /entry:WinMainCRTStartup \ - /pdb:none /release /incremental:no $** \ + link.exe -out:$@ -subsystem:windows -entry:WinMainCRTStartup \ + -pdb:none -release -incremental:no $** \ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib \ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib \ odbccp32.lib libc.lib -$(OUTDIR)\runemacs.obj: $(XEMACS)/nt/runemacs.c - $(CC) /nologo -ML -w -Od -Zi -c \ +$(OUTDIR)\runemacs.obj: $(XEMACS)\nt\runemacs.c + $(CC) -nologo -ML -w $(OPT) -c \ -D_DEBUG -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN \ -D_NTSDK -D_M_IX86 -D_X86_ -Demacs -DHAVE_CONFIG_H -D_MSC_VER=999 \ - $** /Fo$@ + $** -Fo$@ SUPPORT_PROGS=$(MAKE_DOCFILE) $(RUNEMACS) -$(DOC): $(OUTDIR)/make-docfile.exe - !$(MAKE_DOCFILE) -o $@ $(DOC_SRCS_1) - !$(MAKE_DOCFILE) -a $@ $(DOC_SRCS_2) - !$(MAKE_DOCFILE) -a $@ $(DOC_SRCS_3) - !$(MAKE_DOCFILE) -a $@ $(DOC_SRCS_4) - #------------------------------------------------------------------------------ # TEMACS Executable -TEMACS_DIR=$(XEMACS)/src -TEMACS=$(TEMACS_DIR)/temacs.exe -TEMACS_SRC=$(XEMACS)/src +TEMACS_DIR=$(XEMACS)\src +TEMACS=$(TEMACS_DIR)\temacs.exe +TEMACS_SRC=$(XEMACS)\src TEMACS_LIBS=$(LASTFILE) $(LWLIB) Xaw.lib Xmu.lib Xt.lib SM.lib ICE.lib \ Xext.lib X11.lib kernel32.lib user32.lib gdi32.lib \ winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ uuid.lib odbc32.lib odbccp32.lib wsock32.lib libc.lib -TEMACS_LFLAGS=/nologo $(LIBRARIES) /base:0x1000000\ - /stack:0x800000 /entry:_start /subsystem:console /pdb:none\ - /map:$(TEMACS_DIR)/temacs.map /debug:full /debugtype:both /machine:I386\ - /nodefaultlib /out:$@\ - /heap:0x00100000 +TEMACS_LFLAGS=-nologo $(LIBRARIES) -base:0x1000000\ + -stack:0x800000 -entry:_start -subsystem:console -pdb:none\ + -map:$(TEMACS_DIR)\temacs.map -debug:full -debugtype:both -machine:I386\ + -nodefaultlib -out:$@\ + -heap:0x00100000 -TEMACS_CPP=c:/usr/local/bin/cpp.exe TEMACS_CPP_FLAGS= $(INCLUDES) -D_DEBUG -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN \ -D_NTSDK -D_M_IX86 -D_X86_ -Demacs -DHAVE_CONFIG_H -D_MSC_VER=999 \ - -DEMACS_MAJOR_VERSION=$(EMACS_MAJOR_VERSION) \ - -DEMACS_MINOR_VERSION=$(EMACS_MINOR_VERSION) \ - -DXEMACS_CODENAME=$(XEMACS_CODENAME) -TEMACS_FLAGS=-nologo -ML -w -Od -Zi -c $(TEMACS_CPP_FLAGS) + -DEMACS_MAJOR_VERSION=$(emacs_major_version) \ + -DEMACS_MINOR_VERSION=$(emacs_minor_version) \ + -DXEMACS_CODENAME=\"$(xemacs_codename)\" \ + -DPATH_PREFIX=\"$(XEMACS)\" +TEMACS_FLAGS=-nologo -ML -w $(OPT) -c $(TEMACS_CPP_FLAGS) TEMACS_OBJS= \ - $(OUTDIR)/abbrev.obj \ - $(OUTDIR)/alloc.obj \ - $(OUTDIR)/alloca.obj \ - $(OUTDIR)/balloon-x.obj \ - $(OUTDIR)/balloon_help.obj \ - $(OUTDIR)/blocktype.obj \ - $(OUTDIR)/buffer.obj \ - $(OUTDIR)/bytecode.obj \ - $(OUTDIR)/callint.obj \ - $(OUTDIR)/callproc.obj \ - $(OUTDIR)/casefiddle.obj \ - $(OUTDIR)/casetab.obj \ - $(OUTDIR)/chartab.obj \ - $(OUTDIR)/cmdloop.obj \ - $(OUTDIR)/cmds.obj \ - $(OUTDIR)/console-stream.obj \ - $(OUTDIR)/console-x.obj \ - $(OUTDIR)/console.obj \ - $(OUTDIR)/data.obj \ - $(OUTDIR)/debug.obj \ - $(OUTDIR)/device-x.obj \ - $(OUTDIR)/device.obj \ - $(OUTDIR)/dgif_lib.obj \ - $(OUTDIR)/dialog-x.obj \ - $(OUTDIR)/dialog.obj \ - $(OUTDIR)/dired.obj \ - $(OUTDIR)/doc.obj \ - $(OUTDIR)/doprnt.obj \ - $(OUTDIR)/dynarr.obj \ - $(OUTDIR)/editfns.obj \ - $(OUTDIR)/elhash.obj \ - $(OUTDIR)/emacs.obj \ - $(OUTDIR)/EmacsFrame.obj \ - $(OUTDIR)/EmacsManager.obj \ - $(OUTDIR)/TopLevelEmacsShell.obj\ - $(OUTDIR)/TransientEmacsShell.obj\ - $(OUTDIR)/EmacsShell.obj \ - $(OUTDIR)/energize.obj \ - $(OUTDIR)/eval.obj \ - $(OUTDIR)/event-stream.obj \ - $(OUTDIR)/event-unixoid.obj \ - $(OUTDIR)/event-Xt.obj \ - $(OUTDIR)/events.obj \ - $(OUTDIR)/extents.obj \ - $(OUTDIR)/faces.obj \ - $(OUTDIR)/fileio.obj \ - $(OUTDIR)/filelock.obj \ - $(OUTDIR)/filemode.obj \ - $(OUTDIR)/floatfns.obj \ - $(OUTDIR)/fns.obj \ - $(OUTDIR)/font-lock.obj \ - $(OUTDIR)/frame-x.obj \ - $(OUTDIR)/frame.obj \ - $(OUTDIR)/free-hook.obj \ - $(OUTDIR)/general.obj \ - $(OUTDIR)/gif_err.obj \ - $(OUTDIR)/gifalloc.obj \ - $(OUTDIR)/glyphs-x.obj \ - $(OUTDIR)/glyphs.obj \ - $(OUTDIR)/gmalloc.obj \ - $(OUTDIR)/gui-x.obj \ - $(OUTDIR)/gui.obj \ - $(OUTDIR)/hash.obj \ - $(OUTDIR)/indent.obj \ - $(OUTDIR)/inline.obj \ - $(OUTDIR)/insdel.obj \ - $(OUTDIR)/intl.obj \ - $(OUTDIR)/keymap.obj \ - $(OUTDIR)/lread.obj \ - $(OUTDIR)/lstream.obj \ - $(OUTDIR)/macros.obj \ - $(OUTDIR)/marker.obj \ - $(OUTDIR)/md5.obj \ - $(OUTDIR)/menubar-x.obj \ - $(OUTDIR)/menubar.obj \ - $(OUTDIR)/minibuf.obj \ - $(OUTDIR)/input-method-xlib.obj \ - $(OUTDIR)/mule.obj \ - $(OUTDIR)/mule-charset.obj \ - $(OUTDIR)/mule-ccl.obj \ - $(OUTDIR)/mule-coding.obj \ - $(OUTDIR)/nt.obj \ - $(OUTDIR)/ntheap.obj \ - $(OUTDIR)/ntproc.obj \ - $(OUTDIR)/objects-x.obj \ - $(OUTDIR)/objects.obj \ - $(OUTDIR)/opaque.obj \ - $(OUTDIR)/print.obj \ - $(OUTDIR)/process.obj \ - $(OUTDIR)/pure.obj \ - $(OUTDIR)/rangetab.obj \ - $(OUTDIR)/realpath.obj \ - $(OUTDIR)/redisplay-output.obj \ - $(OUTDIR)/redisplay-x.obj \ - $(OUTDIR)/redisplay.obj \ - $(OUTDIR)/regex.obj \ - $(OUTDIR)/scrollbar-x.obj \ - $(OUTDIR)/scrollbar.obj \ - $(OUTDIR)/search.obj \ - $(OUTDIR)/signal.obj \ - $(OUTDIR)/sound.obj \ - $(OUTDIR)/specifier.obj \ - $(OUTDIR)/strftime.obj \ - $(OUTDIR)/symbols.obj \ - $(OUTDIR)/syntax.obj \ - $(OUTDIR)/sysdep.obj \ - $(OUTDIR)/termcap.obj \ - $(OUTDIR)/tparam.obj \ - $(OUTDIR)/undo.obj \ - $(OUTDIR)/unexnt.obj \ - $(OUTDIR)/vm-limit.obj \ - $(OUTDIR)/window.obj \ - $(OUTDIR)/xgccache.obj \ - $(OUTDIR)/xmu.obj \ - $(OUTDIR)/xselect.obj + $(OUTDIR)\abbrev.obj \ + $(OUTDIR)\alloc.obj \ + $(OUTDIR)\alloca.obj \ + $(OUTDIR)\balloon-x.obj \ + $(OUTDIR)\balloon_help.obj \ + $(OUTDIR)\blocktype.obj \ + $(OUTDIR)\buffer.obj \ + $(OUTDIR)\bytecode.obj \ + $(OUTDIR)\callint.obj \ + $(OUTDIR)\callproc.obj \ + $(OUTDIR)\casefiddle.obj \ + $(OUTDIR)\casetab.obj \ + $(OUTDIR)\chartab.obj \ + $(OUTDIR)\cmdloop.obj \ + $(OUTDIR)\cmds.obj \ + $(OUTDIR)\console-stream.obj \ + $(OUTDIR)\console-x.obj \ + $(OUTDIR)\console.obj \ + $(OUTDIR)\data.obj \ + $(OUTDIR)\debug.obj \ + $(OUTDIR)\device-x.obj \ + $(OUTDIR)\device.obj \ + $(OUTDIR)\dgif_lib.obj \ + $(OUTDIR)\dialog-x.obj \ + $(OUTDIR)\dialog.obj \ + $(OUTDIR)\dired.obj \ + $(OUTDIR)\doc.obj \ + $(OUTDIR)\doprnt.obj \ + $(OUTDIR)\dynarr.obj \ + $(OUTDIR)\editfns.obj \ + $(OUTDIR)\elhash.obj \ + $(OUTDIR)\emacs.obj \ + $(OUTDIR)\EmacsFrame.obj \ + $(OUTDIR)\EmacsManager.obj \ + $(OUTDIR)\TopLevelEmacsShell.obj\ + $(OUTDIR)\TransientEmacsShell.obj\ + $(OUTDIR)\EmacsShell.obj \ + $(OUTDIR)\energize.obj \ + $(OUTDIR)\eval.obj \ + $(OUTDIR)\event-stream.obj \ + $(OUTDIR)\event-unixoid.obj \ + $(OUTDIR)\event-Xt.obj \ + $(OUTDIR)\events.obj \ + $(OUTDIR)\extents.obj \ + $(OUTDIR)\faces.obj \ + $(OUTDIR)\fileio.obj \ + $(OUTDIR)\filelock.obj \ + $(OUTDIR)\filemode.obj \ + $(OUTDIR)\floatfns.obj \ + $(OUTDIR)\fns.obj \ + $(OUTDIR)\font-lock.obj \ + $(OUTDIR)\frame-x.obj \ + $(OUTDIR)\frame.obj \ + $(OUTDIR)\free-hook.obj \ + $(OUTDIR)\general.obj \ + $(OUTDIR)\gif_err.obj \ + $(OUTDIR)\gifalloc.obj \ + $(OUTDIR)\glyphs-x.obj \ + $(OUTDIR)\glyphs.obj \ + $(OUTDIR)\gmalloc.obj \ + $(OUTDIR)\gui-x.obj \ + $(OUTDIR)\gui.obj \ + $(OUTDIR)\hash.obj \ + $(OUTDIR)\indent.obj \ + $(OUTDIR)\inline.obj \ + $(OUTDIR)\insdel.obj \ + $(OUTDIR)\intl.obj \ + $(OUTDIR)\keymap.obj \ + $(OUTDIR)\lread.obj \ + $(OUTDIR)\lstream.obj \ + $(OUTDIR)\macros.obj \ + $(OUTDIR)\marker.obj \ + $(OUTDIR)\md5.obj \ + $(OUTDIR)\menubar-x.obj \ + $(OUTDIR)\menubar.obj \ + $(OUTDIR)\minibuf.obj \ + $(OUTDIR)\input-method-xlib.obj \ + $(OUTDIR)\mule.obj \ + $(OUTDIR)\mule-charset.obj \ + $(OUTDIR)\mule-ccl.obj \ + $(OUTDIR)\mule-coding.obj \ + $(OUTDIR)\nt.obj \ + $(OUTDIR)\ntheap.obj \ + $(OUTDIR)\ntproc.obj \ + $(OUTDIR)\objects-x.obj \ + $(OUTDIR)\objects.obj \ + $(OUTDIR)\opaque.obj \ + $(OUTDIR)\print.obj \ + $(OUTDIR)\process.obj \ + $(OUTDIR)\pure.obj \ + $(OUTDIR)\rangetab.obj \ + $(OUTDIR)\realpath.obj \ + $(OUTDIR)\redisplay-output.obj \ + $(OUTDIR)\redisplay-x.obj \ + $(OUTDIR)\redisplay.obj \ + $(OUTDIR)\regex.obj \ + $(OUTDIR)\scrollbar-x.obj \ + $(OUTDIR)\scrollbar.obj \ + $(OUTDIR)\search.obj \ + $(OUTDIR)\signal.obj \ + $(OUTDIR)\sound.obj \ + $(OUTDIR)\specifier.obj \ + $(OUTDIR)\strftime.obj \ + $(OUTDIR)\symbols.obj \ + $(OUTDIR)\syntax.obj \ + $(OUTDIR)\sysdep.obj \ + $(OUTDIR)\termcap.obj \ + $(OUTDIR)\tparam.obj \ + $(OUTDIR)\undo.obj \ + $(OUTDIR)\unexnt.obj \ + $(OUTDIR)\vm-limit.obj \ + $(OUTDIR)\window.obj \ + $(OUTDIR)\xgccache.obj \ + $(OUTDIR)\xmu.obj \ + $(OUTDIR)\xselect.obj -$(TEMACS): $(TEMACS_SRC)/Emacs.ad.h $(TEMACS_SRC)/paths.h $(TEMACS_OBJS) +$(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS) link.exe @<< $(TEMACS_LFLAGS) $(TEMACS_OBJS) $(TEMACS_LIBS) << -$(OUTDIR)/abbrev.obj: $(TEMACS_SRC)/abbrev.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\abbrev.obj: $(TEMACS_SRC)\abbrev.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/alloc.obj: $(TEMACS_SRC)/alloc.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\alloc.obj: $(TEMACS_SRC)\alloc.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/alloca.obj: $(TEMACS_SRC)/alloca.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\alloca.obj: $(TEMACS_SRC)\alloca.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/balloon-x.obj: $(TEMACS_SRC)/balloon-x.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\balloon-x.obj: $(TEMACS_SRC)\balloon-x.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/balloon_help.obj: $(TEMACS_SRC)/balloon_help.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\balloon_help.obj: $(TEMACS_SRC)\balloon_help.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/blocktype.obj: $(TEMACS_SRC)/blocktype.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\blocktype.obj: $(TEMACS_SRC)\blocktype.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/buffer.obj: $(TEMACS_SRC)/buffer.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\buffer.obj: $(TEMACS_SRC)\buffer.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/bytecode.obj: $(TEMACS_SRC)/bytecode.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\bytecode.obj: $(TEMACS_SRC)\bytecode.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/callint.obj: $(TEMACS_SRC)/callint.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\callint.obj: $(TEMACS_SRC)\callint.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/callproc.obj: $(TEMACS_SRC)/callproc.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\callproc.obj: $(TEMACS_SRC)\callproc.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/casefiddle.obj: $(TEMACS_SRC)/casefiddle.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\casefiddle.obj: $(TEMACS_SRC)\casefiddle.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/casetab.obj: $(TEMACS_SRC)/casetab.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\casetab.obj: $(TEMACS_SRC)\casetab.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/chartab.obj: $(TEMACS_SRC)/chartab.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\chartab.obj: $(TEMACS_SRC)\chartab.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/cmdloop.obj: $(TEMACS_SRC)/cmdloop.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\cmdloop.obj: $(TEMACS_SRC)\cmdloop.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/cmds.obj: $(TEMACS_SRC)/cmds.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\cmds.obj: $(TEMACS_SRC)\cmds.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/console-stream.obj: $(TEMACS_SRC)/console-stream.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\console-stream.obj: $(TEMACS_SRC)\console-stream.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/console-x.obj: $(TEMACS_SRC)/console-x.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\console-x.obj: $(TEMACS_SRC)\console-x.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/console.obj: $(TEMACS_SRC)/console.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\console.obj: $(TEMACS_SRC)\console.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/data.obj: $(TEMACS_SRC)/data.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\data.obj: $(TEMACS_SRC)\data.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/debug.obj: $(TEMACS_SRC)/debug.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\debug.obj: $(TEMACS_SRC)\debug.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/device-x.obj: $(TEMACS_SRC)/device-x.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\device-x.obj: $(TEMACS_SRC)\device-x.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/device.obj: $(TEMACS_SRC)/device.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\device.obj: $(TEMACS_SRC)\device.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/dgif_lib.obj: $(TEMACS_SRC)/dgif_lib.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\dgif_lib.obj: $(TEMACS_SRC)\dgif_lib.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/dialog-x.obj: $(TEMACS_SRC)/dialog-x.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\dialog-x.obj: $(TEMACS_SRC)\dialog-x.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/dialog.obj: $(TEMACS_SRC)/dialog.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\dialog.obj: $(TEMACS_SRC)\dialog.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/dired.obj: $(TEMACS_SRC)/dired.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\dired.obj: $(TEMACS_SRC)\dired.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/doc.obj: $(TEMACS_SRC)/doc.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\doc.obj: $(TEMACS_SRC)\doc.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/doprnt.obj: $(TEMACS_SRC)/doprnt.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\doprnt.obj: $(TEMACS_SRC)\doprnt.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/dynarr.obj: $(TEMACS_SRC)/dynarr.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\dynarr.obj: $(TEMACS_SRC)\dynarr.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/editfns.obj: $(TEMACS_SRC)/editfns.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\editfns.obj: $(TEMACS_SRC)\editfns.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/elhash.obj: $(TEMACS_SRC)/elhash.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\elhash.obj: $(TEMACS_SRC)\elhash.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/emacs.obj: $(TEMACS_SRC)/emacs.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\emacs.obj: $(TEMACS_SRC)\emacs.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/EmacsFrame.obj: $(TEMACS_SRC)/EmacsFrame.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\EmacsFrame.obj: $(TEMACS_SRC)\EmacsFrame.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/EmacsManager.obj: $(TEMACS_SRC)/EmacsManager.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\EmacsManager.obj: $(TEMACS_SRC)\EmacsManager.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/TopLevelEmacsShell.obj: $(TEMACS_SRC)/EmacsShell-sub.c - $(CC) $(TEMACS_FLAGS) -DDEFINE_TOP_LEVEL_EMACS_SHELL $** /Fo$@ +$(OUTDIR)\TopLevelEmacsShell.obj: $(TEMACS_SRC)\EmacsShell-sub.c + $(CC) $(TEMACS_FLAGS) -DDEFINE_TOP_LEVEL_EMACS_SHELL $** -Fo$@ -$(OUTDIR)/TransientEmacsShell.obj: $(TEMACS_SRC)/EmacsShell-sub.c - $(CC) $(TEMACS_FLAGS) -DDEFINE_TRANSIENT_EMACS_SHELL $** /Fo$@ +$(OUTDIR)\TransientEmacsShell.obj: $(TEMACS_SRC)\EmacsShell-sub.c + $(CC) $(TEMACS_FLAGS) -DDEFINE_TRANSIENT_EMACS_SHELL $** -Fo$@ -$(OUTDIR)/EmacsShell.obj: $(TEMACS_SRC)/EmacsShell.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\EmacsShell.obj: $(TEMACS_SRC)\EmacsShell.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/energize.obj: $(TEMACS_SRC)/energize.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\energize.obj: $(TEMACS_SRC)\energize.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/eval.obj: $(TEMACS_SRC)/eval.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\eval.obj: $(TEMACS_SRC)\eval.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/event-stream.obj: $(TEMACS_SRC)/event-stream.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\event-stream.obj: $(TEMACS_SRC)\event-stream.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/event-unixoid.obj: $(TEMACS_SRC)/event-unixoid.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\event-unixoid.obj: $(TEMACS_SRC)\event-unixoid.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/event-Xt.obj: $(TEMACS_SRC)/event-Xt.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\event-Xt.obj: $(TEMACS_SRC)\event-Xt.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/events.obj: $(TEMACS_SRC)/events.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\events.obj: $(TEMACS_SRC)\events.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/extents.obj: $(TEMACS_SRC)/extents.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\extents.obj: $(TEMACS_SRC)\extents.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/faces.obj: $(TEMACS_SRC)/faces.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\faces.obj: $(TEMACS_SRC)\faces.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/fileio.obj: $(TEMACS_SRC)/fileio.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\fileio.obj: $(TEMACS_SRC)\fileio.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/filelock.obj: $(TEMACS_SRC)/filelock.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\filelock.obj: $(TEMACS_SRC)\filelock.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/filemode.obj: $(TEMACS_SRC)/filemode.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\filemode.obj: $(TEMACS_SRC)\filemode.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/floatfns.obj: $(TEMACS_SRC)/floatfns.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\floatfns.obj: $(TEMACS_SRC)\floatfns.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/fns.obj: $(TEMACS_SRC)/fns.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\fns.obj: $(TEMACS_SRC)\fns.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/font-lock.obj: $(TEMACS_SRC)/font-lock.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\font-lock.obj: $(TEMACS_SRC)\font-lock.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/frame-x.obj: $(TEMACS_SRC)/frame-x.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\frame-x.obj: $(TEMACS_SRC)\frame-x.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/frame.obj: $(TEMACS_SRC)/frame.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\frame.obj: $(TEMACS_SRC)\frame.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/free-hook.obj: $(TEMACS_SRC)/free-hook.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\free-hook.obj: $(TEMACS_SRC)\free-hook.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/general.obj: $(TEMACS_SRC)/general.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\general.obj: $(TEMACS_SRC)\general.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/gif_err.obj: $(TEMACS_SRC)/gif_err.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\gif_err.obj: $(TEMACS_SRC)\gif_err.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/gifalloc.obj: $(TEMACS_SRC)/gifalloc.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\gifalloc.obj: $(TEMACS_SRC)\gifalloc.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/glyphs-x.obj: $(TEMACS_SRC)/glyphs-x.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\glyphs-x.obj: $(TEMACS_SRC)\glyphs-x.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/glyphs.obj: $(TEMACS_SRC)/glyphs.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\glyphs.obj: $(TEMACS_SRC)\glyphs.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/gmalloc.obj: $(TEMACS_SRC)/gmalloc.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\gmalloc.obj: $(TEMACS_SRC)\gmalloc.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/gui-x.obj: $(TEMACS_SRC)/gui-x.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\gui-x.obj: $(TEMACS_SRC)\gui-x.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/gui.obj: $(TEMACS_SRC)/gui.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\gui.obj: $(TEMACS_SRC)\gui.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/hash.obj: $(TEMACS_SRC)/hash.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\hash.obj: $(TEMACS_SRC)\hash.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/indent.obj: $(TEMACS_SRC)/indent.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\indent.obj: $(TEMACS_SRC)\indent.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/inline.obj: $(TEMACS_SRC)/inline.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\inline.obj: $(TEMACS_SRC)\inline.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/insdel.obj: $(TEMACS_SRC)/insdel.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\insdel.obj: $(TEMACS_SRC)\insdel.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/intl.obj: $(TEMACS_SRC)/intl.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\intl.obj: $(TEMACS_SRC)\intl.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/keymap.obj: $(TEMACS_SRC)/keymap.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\keymap.obj: $(TEMACS_SRC)\keymap.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/lread.obj: $(TEMACS_SRC)/lread.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\lread.obj: $(TEMACS_SRC)\lread.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/lstream.obj: $(TEMACS_SRC)/lstream.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\lstream.obj: $(TEMACS_SRC)\lstream.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/macros.obj: $(TEMACS_SRC)/macros.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\macros.obj: $(TEMACS_SRC)\macros.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/marker.obj: $(TEMACS_SRC)/marker.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\marker.obj: $(TEMACS_SRC)\marker.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/md5.obj: $(TEMACS_SRC)/md5.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\md5.obj: $(TEMACS_SRC)\md5.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/menubar-x.obj: $(TEMACS_SRC)/menubar-x.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\menubar-x.obj: $(TEMACS_SRC)\menubar-x.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/menubar.obj: $(TEMACS_SRC)/menubar.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\menubar.obj: $(TEMACS_SRC)\menubar.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/minibuf.obj: $(TEMACS_SRC)/minibuf.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\minibuf.obj: $(TEMACS_SRC)\minibuf.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/msdos.obj: $(TEMACS_SRC)/msdos.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\msdos.obj: $(TEMACS_SRC)\msdos.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/input-method-xlib.obj: $(TEMACS_SRC)/input-method-xlib.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\input-method-xlib.obj: $(TEMACS_SRC)\input-method-xlib.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/mule.obj: $(TEMACS_SRC)/mule.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\mule.obj: $(TEMACS_SRC)\mule.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/mule-charset.obj: $(TEMACS_SRC)/mule-charset.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\mule-charset.obj: $(TEMACS_SRC)\mule-charset.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/mule-ccl.obj: $(TEMACS_SRC)/mule-ccl.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\mule-ccl.obj: $(TEMACS_SRC)\mule-ccl.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/mule-coding.obj: $(TEMACS_SRC)/mule-coding.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\mule-coding.obj: $(TEMACS_SRC)\mule-coding.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/nt.obj: $(TEMACS_SRC)/nt.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\nt.obj: $(TEMACS_SRC)\nt.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/ntheap.obj: $(TEMACS_SRC)/ntheap.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\ntheap.obj: $(TEMACS_SRC)\ntheap.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/ntproc.obj: $(TEMACS_SRC)/ntproc.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\ntproc.obj: $(TEMACS_SRC)\ntproc.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/objects-x.obj: $(TEMACS_SRC)/objects-x.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\objects-x.obj: $(TEMACS_SRC)\objects-x.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/objects.obj: $(TEMACS_SRC)/objects.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\objects.obj: $(TEMACS_SRC)\objects.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/opaque.obj: $(TEMACS_SRC)/opaque.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\opaque.obj: $(TEMACS_SRC)\opaque.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/print.obj: $(TEMACS_SRC)/print.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\print.obj: $(TEMACS_SRC)\print.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/process.obj: $(TEMACS_SRC)/process.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\process.obj: $(TEMACS_SRC)\process.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/pure.obj: $(TEMACS_SRC)/pure.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\pure.obj: $(TEMACS_SRC)\pure.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/rangetab.obj: $(TEMACS_SRC)/rangetab.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\rangetab.obj: $(TEMACS_SRC)\rangetab.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/realpath.obj: $(TEMACS_SRC)/realpath.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\realpath.obj: $(TEMACS_SRC)\realpath.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/redisplay-output.obj: $(TEMACS_SRC)/redisplay-output.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\redisplay-output.obj: $(TEMACS_SRC)\redisplay-output.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/redisplay-x.obj: $(TEMACS_SRC)/redisplay-x.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\redisplay-x.obj: $(TEMACS_SRC)\redisplay-x.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/redisplay.obj: $(TEMACS_SRC)/redisplay.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\redisplay.obj: $(TEMACS_SRC)\redisplay.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/regex.obj: $(TEMACS_SRC)/regex.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\regex.obj: $(TEMACS_SRC)\regex.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/scrollbar-x.obj: $(TEMACS_SRC)/scrollbar-x.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\scrollbar-x.obj: $(TEMACS_SRC)\scrollbar-x.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/scrollbar.obj: $(TEMACS_SRC)/scrollbar.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\scrollbar.obj: $(TEMACS_SRC)\scrollbar.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/search.obj: $(TEMACS_SRC)/search.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\search.obj: $(TEMACS_SRC)\search.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/signal.obj: $(TEMACS_SRC)/signal.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\signal.obj: $(TEMACS_SRC)\signal.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/sound.obj: $(TEMACS_SRC)/sound.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\sound.obj: $(TEMACS_SRC)\sound.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/specifier.obj: $(TEMACS_SRC)/specifier.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\specifier.obj: $(TEMACS_SRC)\specifier.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/strftime.obj: $(TEMACS_SRC)/strftime.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\strftime.obj: $(TEMACS_SRC)\strftime.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/symbols.obj: $(TEMACS_SRC)/symbols.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\symbols.obj: $(TEMACS_SRC)\symbols.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/syntax.obj: $(TEMACS_SRC)/syntax.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\syntax.obj: $(TEMACS_SRC)\syntax.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/sysdep.obj: $(TEMACS_SRC)/sysdep.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\sysdep.obj: $(TEMACS_SRC)\sysdep.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/termcap.obj: $(TEMACS_SRC)/termcap.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\termcap.obj: $(TEMACS_SRC)\termcap.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/tparam.obj: $(TEMACS_SRC)/tparam.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\tparam.obj: $(TEMACS_SRC)\tparam.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/undo.obj: $(TEMACS_SRC)/undo.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\undo.obj: $(TEMACS_SRC)\undo.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/unexnt.obj: $(TEMACS_SRC)/unexnt.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\unexnt.obj: $(TEMACS_SRC)\unexnt.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/vm-limit.obj: $(TEMACS_SRC)/vm-limit.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\vm-limit.obj: $(TEMACS_SRC)\vm-limit.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/window.obj: $(TEMACS_SRC)/window.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\window.obj: $(TEMACS_SRC)\window.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/xgccache.obj: $(TEMACS_SRC)/xgccache.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\xgccache.obj: $(TEMACS_SRC)\xgccache.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/xmu.obj: $(TEMACS_SRC)/xmu.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\xmu.obj: $(TEMACS_SRC)\xmu.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(OUTDIR)/xselect.obj: $(TEMACS_SRC)/xselect.c - $(CC) $(TEMACS_FLAGS) $** /Fo$@ +$(OUTDIR)\xselect.obj: $(TEMACS_SRC)\xselect.c + $(CC) $(TEMACS_FLAGS) $** -Fo$@ -$(TEMACS_SRC)/Emacs.ad.h: $(XEMACS)/etc/Emacs.ad - !"sed -f ad2c.sed < $(XEMACS)/etc/Emacs.ad > $(TEMACS_SRC)/Emacs.ad.h" +#$(TEMACS_SRC)\Emacs.ad.h: $(XEMACS)\etc\Emacs.ad +# !"sed -f ad2c.sed < $(XEMACS)\etc\Emacs.ad > $(TEMACS_SRC)\Emacs.ad.h" -$(TEMACS_SRC)/paths.h: $(TEMACS_SRC)/paths.h.in - !"cd $(TEMACS_SRC); cp paths.h.in paths.h" +#$(TEMACS_SRC)\paths.h: $(TEMACS_SRC)\paths.h.in +# !"cd $(TEMACS_SRC); cp paths.h.in paths.h" #------------------------------------------------------------------------------ # LISP bits 'n bobs +$(DOC): $(OUTDIR)\make-docfile.exe + !"$(TEMACS) -batch -l make-docfile.el -o $(DOC) -d $(TEMACS_SRC) -i $(XEMACS)\site-packages $(DOC_SRC)" + +LOADPATH=$(LISP)\prim dump-elcs: - !"$(TEMACS) -batch -l update-elc.el $(LISP)" + !"$(TEMACS) -batch -l update-elc.el" dump-xemacs: !"$(TEMACS) -batch -l loadup.el dump"
--- a/pkg-src/tree-x/intf.c Mon Aug 13 09:53:23 2007 +0200 +++ b/pkg-src/tree-x/intf.c Mon Aug 13 09:54:23 2007 +0200 @@ -1317,13 +1317,10 @@ static void NodeLabel_CB(Widget w, XtPointer client_data, XtPointer call_data) { - char *node_label; - XtPopdown(dialog[DLG_NODE_NAME]); if (client_data == (XtPointer) TRUE) { - node_label = XtMalloc(strlen(XawDialogGetValueString(XtParent(w))) - * sizeof(char)); - node_label = strcpy(node_label, XawDialogGetValueString(XtParent(w))); + char *string = XawDialogGetValueString(XtParent(w)); + char *node_label = XtNewString(string); if (*node_label) InsertNode(PopupNode, NodePos, node_label); }
--- a/src/ChangeLog Mon Aug 13 09:53:23 2007 +0200 +++ b/src/ChangeLog Mon Aug 13 09:54:23 2007 +0200 @@ -1,3 +1,14 @@ +1997-08-13 P E Jareth Hein <jareth@camelot-soft.com> + + * insdel.c (buffer_delete_range): Changed the location where point + was actually moved to after all other movement handling. This + prevents a MULE related crash in VALID_BYTIND. + +1997-08-11 SL Baur <steve@altair.xemacs.org> + + * doc.c (Fsnarf_documentation): Semi-clarify types of weird + functions. + 1997-08-05 Jens-Ulrik Holger Petersen <petersen@kurims.kyoto-u.ac.jp> * eval.c (vars_of_eval): Updated docstring for `debug_on_error' to
--- a/src/EmacsFrame.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/EmacsFrame.c Mon Aug 13 09:54:23 2007 +0200 @@ -103,13 +103,11 @@ {XtNrightToolBarWidth, XtCRightToolBarWidth, XtRInt, sizeof (int), offset (right_toolbar_width), XtRImmediate, (XtPointer)-1}, {XtNtopToolBarShadowColor, XtCTopToolBarShadowColor, XtRPixel, sizeof(Pixel), - offset(top_toolbar_shadow_pixel), XtRString, (String) "#000000"}, + offset(top_toolbar_shadow_pixel), XtRString, "#000000"}, {XtNbottomToolBarShadowColor, XtCBottomToolBarShadowColor, XtRPixel, - sizeof(Pixel), offset(bottom_toolbar_shadow_pixel), XtRString, - (String) "#000000"}, + sizeof(Pixel), offset(bottom_toolbar_shadow_pixel), XtRString, "#000000"}, {XtNbackgroundToolBarColor, XtCBackgroundToolBarColor, XtRPixel, - sizeof(Pixel), offset(background_toolbar_pixel), XtRString, - (String) "Gray75"}, + sizeof(Pixel), offset(background_toolbar_pixel), XtRString, "Gray75"}, {XtNtopToolBarShadowPixmap, XtCTopToolBarShadowPixmap, XtRPixmap, sizeof (Pixmap), offset(top_toolbar_shadow_pixmap), XtRImmediate, (XtPointer)None}, @@ -131,9 +129,9 @@ offset(font), XtRImmediate, (XtPointer)0 }, {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), - offset(foreground_pixel), XtRString, (String) "XtDefaultForeground"}, + offset(foreground_pixel), XtRString, "XtDefaultForeground"}, {XtNcursorColor, XtCForeground, XtRPixel, sizeof(Pixel), - offset(cursor_color), XtRString, (String) "XtDefaultForeground"}, + offset(cursor_color), XtRString, "XtDefaultForeground"}, {XtNbarCursor, XtCBarCursor, XtRBoolean, sizeof (Boolean), offset (bar_cursor), XtRImmediate, (XtPointer)0}, {XtNvisualBell, XtCVisualBell, XtRBoolean, sizeof (Boolean), @@ -156,7 +154,7 @@ static XtActionsRec emacsFrameActionsTable [] = { - {(String) "mapping", (XtActionProc) emacs_Xt_mapping_action}, + {"mapping", (XtActionProc) emacs_Xt_mapping_action}, }; static char @@ -175,7 +173,7 @@ #else /* superclass */ &widgetClassRec, #endif - /* class_name */ (String) "EmacsFrame", + /* class_name */ "EmacsFrame", /* widget_size */ sizeof(EmacsFrameRec), /* class_initialize */ EmacsFrameClassInitialize, /* class_part_initialize */ 0, @@ -242,7 +240,7 @@ ew->emacs_frame.internal_border_width; } -static void +static void EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2) { @@ -333,7 +331,7 @@ int columns; int rows; XtWidgetGeometry req, repl; - + pixel_to_char_size (f, ew->core.width, ew->core.height, &columns, &rows); update_various_frame_slots (ew); change_frame_size (f, rows, columns, 0); @@ -401,7 +399,7 @@ (Vscrollbar_height, make_int (new->emacs_frame.scrollbar_height), frame, Qnil, Qnil); -#endif +#endif /* HAVE_SCROLLBARS */ #ifdef HAVE_TOOLBARS if (cur->emacs_frame.top_toolbar_height != new->emacs_frame.top_toolbar_height) @@ -427,7 +425,7 @@ (Vtoolbar_size[RIGHT_TOOLBAR], make_int (new->emacs_frame.right_toolbar_width), frame, Qnil, Qnil); -#endif +#endif /* HAVE_TOOLBARS */ } in_resource_setting--; @@ -491,76 +489,41 @@ /* ARGSUSED */ static void -_CvtStringToScrollBarPlacement (XrmValuePtr args, /* unused */ - Cardinal *num_args, /* unused */ - XrmValuePtr fromVal, - XrmValuePtr toVal) +Xt_StringToScrollBarPlacement (XrmValuePtr args, /* unused */ + Cardinal *num_args, /* unused */ + XrmValuePtr fromVal, + XrmValuePtr toVal) { -#if 0 - /* Martin, this is broken. Please fix it. */ XrmQuark q; - char *lowerName = (char *) alloca (strlen ( (char *) fromVal->addr) + 1); - + char *lowerName = (char *) alloca (strlen ((char *) fromVal->addr) + 1); + XmuCopyISOLatin1Lowered (lowerName, (char *) fromVal->addr); q = XrmStringToQuark (lowerName); - + toVal->size = sizeof (cvt_string_scrollbar_placement); toVal->addr = (XtPointer) &cvt_string_scrollbar_placement; - cvt_string_scrollbar_placement = - q == XrmStringToQuark ("top_left") ? XtTOP_LEFT : - q == XrmStringToQuark ("bottom_left") ? XtBOTTOM_LEFT : - q == XrmStringToQuark ("top_right") ? XtTOP_RIGHT : - q == XrmStringToQuark ("bottom_right") ? XtBOTTOM_RIGHT : - 0; - if (cvt_string_scrollbar_placement != 0) - return; - - toVal->addr = NULL; - toVal->size = 0; - XtStringConversionWarning (fromVal->addr, "scrollBarPlacement"); -#endif -#define done(address, type) \ -toVal->size = sizeof(type); \ -toVal->addr = (XtPointer) address; \ -return /* `;' supplied by caller */ - - XrmQuark q; - char lowerName[1000]; - - XmuCopyISOLatin1Lowered (lowerName, (char*)fromVal->addr); - q = XrmStringToQuark(lowerName); - if (q == XrmStringToQuark ("top_left")) + if (q == XrmStringToQuark ("top_left")) + cvt_string_scrollbar_placement = XtTOP_LEFT; + else if (q == XrmStringToQuark ("bottom_left")) + cvt_string_scrollbar_placement = XtBOTTOM_LEFT; + else if (q == XrmStringToQuark ("top_right")) + cvt_string_scrollbar_placement = XtTOP_RIGHT; + else if (q == XrmStringToQuark ("bottom_right")) + cvt_string_scrollbar_placement = XtBOTTOM_RIGHT; + else { - cvt_string_scrollbar_placement = XtTOP_LEFT; - done (&cvt_string_scrollbar_placement, unsigned char); - } - if (q == XrmStringToQuark ("bottom_left")) - { - cvt_string_scrollbar_placement = XtBOTTOM_LEFT; - done (&cvt_string_scrollbar_placement, unsigned char); + XtStringConversionWarning (fromVal->addr, "scrollBarPlacement"); + toVal->addr = NULL; + toVal->size = 0; } - if (q == XrmStringToQuark ("top_right")) - { - cvt_string_scrollbar_placement = XtTOP_RIGHT; - done (&cvt_string_scrollbar_placement, unsigned char); - } - if (q == XrmStringToQuark ("bottom_right")) - { - cvt_string_scrollbar_placement = XtBOTTOM_RIGHT; - done (&cvt_string_scrollbar_placement, unsigned char); - } - XtStringConversionWarning (fromVal->addr, "scrollBarPlacement"); - toVal->addr = NULL; - toVal->size = 0; -#undef done } static void EmacsFrameClassInitialize (void) { XtAddConverter (XtRString, XtRScrollBarPlacement, - _CvtStringToScrollBarPlacement, NULL, 0); + Xt_StringToScrollBarPlacement, NULL, 0); } /********************* Special entrypoints *******************/
--- a/src/EmacsFrame.h Mon Aug 13 09:53:23 2007 +0200 +++ b/src/EmacsFrame.h Mon Aug 13 09:54:23 2007 +0200 @@ -25,178 +25,178 @@ #define _EmacsFrame_h #ifndef XtNminibuffer -#define XtNminibuffer (String) "minibuffer" +#define XtNminibuffer "minibuffer" #endif #ifndef XtCMinibuffer -#define XtCMinibuffer (String) "Minibuffer" +#define XtCMinibuffer "Minibuffer" #endif #ifndef XtNunsplittable -#define XtNunsplittable (String) "unsplittable" +#define XtNunsplittable "unsplittable" #endif #ifndef XtCUnsplittable -#define XtCUnsplittable (String) "Unsplittable" +#define XtCUnsplittable "Unsplittable" #endif #ifndef XtNinternalBorderWidth -#define XtNinternalBorderWidth (String) "internalBorderWidth" +#define XtNinternalBorderWidth "internalBorderWidth" #endif #ifndef XtCInternalBorderWidth -#define XtCInternalBorderWidth (String) "InternalBorderWidth" +#define XtCInternalBorderWidth "InternalBorderWidth" #endif #ifndef XtNscrollBarWidth -#define XtNscrollBarWidth (String) "scrollBarWidth" +#define XtNscrollBarWidth "scrollBarWidth" #endif #ifndef XtCScrollBarWidth -#define XtCScrollBarWidth (String) "ScrollBarWidth" +#define XtCScrollBarWidth "ScrollBarWidth" #endif #ifndef XtNscrollBarHeight -#define XtNscrollBarHeight (String) "scrollBarHeight" +#define XtNscrollBarHeight "scrollBarHeight" #endif #ifndef XtCScrollBarHeight -#define XtCScrollBarHeight (String) "ScrollBarHeight" +#define XtCScrollBarHeight "ScrollBarHeight" #endif #ifndef XtNtopToolBarHeight -#define XtNtopToolBarHeight (String) "topToolBarHeight" +#define XtNtopToolBarHeight "topToolBarHeight" #endif #ifndef XtCTopToolBarHeight -#define XtCTopToolBarHeight (String) "TopToolBarHeight" +#define XtCTopToolBarHeight "TopToolBarHeight" #endif #ifndef XtNbottomToolBarHeight -#define XtNbottomToolBarHeight (String) "bottomToolBarHeight" +#define XtNbottomToolBarHeight "bottomToolBarHeight" #endif #ifndef XtCBottomToolBarHeight -#define XtCBottomToolBarHeight (String) "BottomToolBarHeight" +#define XtCBottomToolBarHeight "BottomToolBarHeight" #endif #ifndef XtNleftToolBarWidth -#define XtNleftToolBarWidth (String) "leftToolBarWidth" +#define XtNleftToolBarWidth "leftToolBarWidth" #endif #ifndef XtCLeftToolBarWidth -#define XtCLeftToolBarWidth (String) "LeftToolBarWidth" +#define XtCLeftToolBarWidth "LeftToolBarWidth" #endif #ifndef XtNrightToolBarWidth -#define XtNrightToolBarWidth (String) "rightToolBarWidth" +#define XtNrightToolBarWidth "rightToolBarWidth" #endif #ifndef XtCRightToolBarWidth -#define XtCRightToolBarWidth (String) "RightToolBarWidth" +#define XtCRightToolBarWidth "RightToolBarWidth" #endif #ifndef XtNtopToolBarShadowColor -#define XtNtopToolBarShadowColor (String) "topToolBarShadowColor" +#define XtNtopToolBarShadowColor "topToolBarShadowColor" #endif #ifndef XtCTopToolBarShadowColor -#define XtCTopToolBarShadowColor (String) "TopToolBarShadowColor" +#define XtCTopToolBarShadowColor "TopToolBarShadowColor" #endif #ifndef XtNbottomToolBarShadowColor -#define XtNbottomToolBarShadowColor (String) "bottomToolBarShadowColor" +#define XtNbottomToolBarShadowColor "bottomToolBarShadowColor" #endif #ifndef XtCBottomToolBarShadowColor -#define XtCBottomToolBarShadowColor (String) "BottomToolBarShadowColor" +#define XtCBottomToolBarShadowColor "BottomToolBarShadowColor" #endif #ifndef XtNbackgroundToolBarColor -#define XtNbackgroundToolBarColor (String) "backgroundToolBarColor" +#define XtNbackgroundToolBarColor "backgroundToolBarColor" #endif #ifndef XtCBackgroundToolBarColor -#define XtCBackgroundToolBarColor (String) "BackgroundToolBarColor" +#define XtCBackgroundToolBarColor "BackgroundToolBarColor" #endif #ifndef XtNtopToolBarShadowPixmap -#define XtNtopToolBarShadowPixmap (String) "topToolBarShadowPixmap" +#define XtNtopToolBarShadowPixmap "topToolBarShadowPixmap" #endif #ifndef XtCTopToolBarShadowPixmap -#define XtCTopToolBarShadowPixmap (String) "TopToolBarShadowPixmap" +#define XtCTopToolBarShadowPixmap "TopToolBarShadowPixmap" #endif #ifndef XtNbottomToolBarShadowPixmap -#define XtNbottomToolBarShadowPixmap (String) "bottomToolBarShadowPixmap" +#define XtNbottomToolBarShadowPixmap "bottomToolBarShadowPixmap" #endif #ifndef XtCBottomToolBarShadowPixmap -#define XtCBottomToolBarShadowPixmap (String) "BottomToolBarShadowPixmap" +#define XtCBottomToolBarShadowPixmap "BottomToolBarShadowPixmap" #endif #ifndef XtNtoolBarShadowThickness -#define XtNtoolBarShadowThickness (String) "toolBarShadowThickness" +#define XtNtoolBarShadowThickness "toolBarShadowThickness" #endif #ifndef XtCToolBarShadowThickness -#define XtCToolBarShadowThickness (String) "ToolBarShadowThickness" +#define XtCToolBarShadowThickness "ToolBarShadowThickness" #endif #ifndef XtNscrollBarPlacement -#define XtNscrollBarPlacement (String) "scrollBarPlacement" +#define XtNscrollBarPlacement "scrollBarPlacement" #endif #ifndef XtCScrollBarPlacement -#define XtCScrollBarPlacement (String) "ScrollBarPlacement" +#define XtCScrollBarPlacement "ScrollBarPlacement" #endif #ifndef XtRScrollBarPlacement -#define XtRScrollBarPlacement (String) "ScrollBarPlacement" +#define XtRScrollBarPlacement "ScrollBarPlacement" #endif #ifndef XtNinterline -#define XtNinterline (String) "interline" +#define XtNinterline "interline" #endif #ifndef XtCInterline -#define XtCInterline (String) "Interline" +#define XtCInterline "Interline" #endif #ifndef XtNfont -#define XtNfont (String) "font" +#define XtNfont "font" #endif #ifndef XtCFont -#define XtCFont (String) "Font" +#define XtCFont "Font" #endif #ifndef XtNforeground -#define XtNforeground (String) "foreground" +#define XtNforeground "foreground" #endif #ifndef XtCForeground -#define XtCForeground (String) "Foreground" +#define XtCForeground "Foreground" #endif #ifndef XtNiconic -#define XtNiconic (String) "iconic" +#define XtNiconic "iconic" #endif #ifndef XtCIconic -#define XtCIconic (String) "Iconic" +#define XtCIconic "Iconic" #endif #ifndef XtNcursorColor -#define XtNcursorColor (String) "cursorColor" +#define XtNcursorColor "cursorColor" #endif #ifndef XtCCursorColor -#define XtCCursorColor (String) "CursorColor" +#define XtCCursorColor "CursorColor" #endif #ifndef XtNbarCursor -#define XtNbarCursor (String) "barCursor" +#define XtNbarCursor "barCursor" #endif #ifndef XtCBarCursor -#define XtCBarCursor (String) "BarCursor" +#define XtCBarCursor "BarCursor" #endif #ifndef XtNvisualBell -#define XtNvisualBell (String) "visualBell" +#define XtNvisualBell "visualBell" #endif #ifndef XtCVisualBell -#define XtCVisualBell (String) "VisualBell" +#define XtCVisualBell "VisualBell" #endif #ifndef XtNbellVolume -#define XtNbellVolume (String) "bellVolume" +#define XtNbellVolume "bellVolume" #endif #ifndef XtCBellVolume -#define XtCBellVolume (String) "BellVolume" +#define XtCBellVolume "BellVolume" #endif #ifndef XtNpointerBackground -#define XtNpointerBackground (String) "pointerBackground" +#define XtNpointerBackground "pointerBackground" #endif #ifndef XtNpointerColor @@ -204,75 +204,75 @@ #endif #ifndef XtNtextPointer -#define XtNtextPointer (String) "textPointer" +#define XtNtextPointer "textPointer" #endif #ifndef XtNspacePointer -#define XtNspacePointer (String) "spacePointer" +#define XtNspacePointer "spacePointer" #endif #ifndef XtNmodeLinePointer -#define XtNmodeLinePointer (String) "modePointer" +#define XtNmodeLinePointer "modePointer" #endif #ifndef XtNgcPointer -#define XtNgcPointer (String) "gcPointer" +#define XtNgcPointer "gcPointer" #endif #ifndef XtNemacsFrame -#define XtNemacsFrame (String) "emacsFrame" +#define XtNemacsFrame "emacsFrame" #endif #ifndef XtCEmacsFrame -#define XtCEmacsFrame (String) "EmacsFrame" +#define XtCEmacsFrame "EmacsFrame" #endif #ifndef XtNgeometry -#define XtNgeometry (String) "geometry" +#define XtNgeometry "geometry" #endif #ifndef XtCGeometry -#define XtCGeometry (String) "Geometry" +#define XtCGeometry "Geometry" #endif #ifndef XtNinitialGeometry -#define XtNinitialGeometry (String) "initialGeometry" +#define XtNinitialGeometry "initialGeometry" #endif #ifndef XtCInitialGeometry -#define XtCInitialGeometry (String) "InitialGeometry" +#define XtCInitialGeometry "InitialGeometry" #endif #ifndef XtNmenubar -#define XtNmenubar (String) "menubar" +#define XtNmenubar "menubar" #endif #ifndef XtCMenubar -#define XtCMenubar (String) "Menubar" +#define XtCMenubar "Menubar" #endif #ifndef XtNinitiallyUnmapped -#define XtNinitiallyUnmapped (String) "initiallyUnmapped" +#define XtNinitiallyUnmapped "initiallyUnmapped" #endif #ifndef XtCInitiallyUnmapped -#define XtCInitiallyUnmapped (String) "InitiallyUnmapped" +#define XtCInitiallyUnmapped "InitiallyUnmapped" #endif #ifndef XtNpreferredWidth -#define XtNpreferredWidth (String) "preferredWidth" +#define XtNpreferredWidth "preferredWidth" #endif #ifndef XtCPreferredWidth -#define XtCPreferredWidth (String) "PreferredWidth" +#define XtCPreferredWidth "PreferredWidth" #endif #ifndef XtNpreferredHeight -#define XtNpreferredHeight (String) "preferredHeight" +#define XtNpreferredHeight "preferredHeight" #endif #ifndef XtCPreferredHeight -#define XtCPreferredHeight (String) "PreferredHeight" +#define XtCPreferredHeight "PreferredHeight" #endif #ifndef XtNuseBackingStore -#define XtNuseBackingStore (String) "useBackingStore" +#define XtNuseBackingStore "useBackingStore" #endif #ifndef XtCUseBackingStore -#define XtCUseBackingStore (String) "UseBackingStore" +#define XtCUseBackingStore "UseBackingStore" #endif #define XtNximStyles "ximStyles" @@ -287,12 +287,12 @@ #define EM_BOTTOM 0 #define EM_LEFT 2 #define EM_RIGHT 0 - + #define XtTOP_LEFT (EM_TOP | EM_LEFT) #define XtBOTTOM_LEFT (EM_BOTTOM | EM_LEFT) #define XtTOP_RIGHT (EM_TOP | EM_RIGHT) #define XtBOTTOM_RIGHT (EM_BOTTOM | EM_RIGHT) - + /* structures */ typedef struct _EmacsFrameRec *EmacsFrame; typedef struct _EmacsFrameClassRec *EmacsFrameClass;
--- a/src/EmacsManager.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/EmacsManager.c Mon Aug 13 09:54:23 2007 +0200 @@ -70,7 +70,7 @@ #else /* superclass */ (WidgetClass) &compositeClassRec, #endif - /* class_name */ (String) "EmacsManager", + /* class_name */ "EmacsManager", /* widget_size */ sizeof(EmacsManagerRec), /* class_initialize */ ClassInitialize, /* class_part_init */ NULL, @@ -113,12 +113,12 @@ #ifdef LWLIB_USES_MOTIF { /* constraint_class fields */ - NULL, /* resource list */ - 0, /* num resources */ - 0, /* constraint size */ - (XtInitProc)NULL, /* init proc */ - (XtWidgetProc)NULL, /* destroy proc */ - (XtSetValuesFunc)NULL, /* set values proc */ + NULL, /* resource list */ + 0, /* num resources */ + 0, /* constraint size */ + (XtInitProc)NULL, /* init proc */ + (XtWidgetProc)NULL, /* destroy proc */ + (XtSetValuesFunc)NULL, /* set values proc */ NULL, /* extension */ }, { @@ -218,7 +218,7 @@ { attributes->bit_gravity = NorthWestGravity; *valueMask |= CWBitGravity; - + XtCreateWindow (w, (unsigned) InputOutput, (Visual *) CopyFromParent, *valueMask, attributes); }
--- a/src/EmacsManager.h Mon Aug 13 09:53:23 2007 +0200 +++ b/src/EmacsManager.h Mon Aug 13 09:54:23 2007 +0200 @@ -27,18 +27,18 @@ #define _EmacsManager_h #ifndef XtNresizeCallback -#define XtNresizeCallback (String) "resizeCallback" +#define XtNresizeCallback "resizeCallback" #endif #ifndef XtNqueryGeometryCallback -#define XtNqueryGeometryCallback (String) "queryGeometryCallback" +#define XtNqueryGeometryCallback "queryGeometryCallback" #endif #ifndef XtNuserData -#define XtNuserData (String) "userData" +#define XtNuserData "userData" #endif #ifndef XtCUserData -#define XtCUserData (String) "UserData" +#define XtCUserData "UserData" #endif typedef struct _EmacsManagerClassRec *EmacsManagerWidgetClass;
--- a/src/EmacsShell.h Mon Aug 13 09:53:23 2007 +0200 +++ b/src/EmacsShell.h Mon Aug 13 09:54:23 2007 +0200 @@ -26,31 +26,31 @@ #define _EmacsShell_h #ifndef XtNwidthCells -#define XtNwidthCells (String) "widthCells" +#define XtNwidthCells "widthCells" #endif #ifndef XtCWidthCells -#define XtCWidthCells (String) "WidthCells" +#define XtCWidthCells "WidthCells" #endif #ifndef XtNheightCells -#define XtNheightCells (String) "heightCells" +#define XtNheightCells "heightCells" #endif #ifndef XtCHeightCells -#define XtCHeightCells (String) "HeightCells" +#define XtCHeightCells "HeightCells" #endif #ifndef XtNminWidthCells -#define XtNminWidthCells (String) "minWidthCells" +#define XtNminWidthCells "minWidthCells" #endif #ifndef XtCMinWidthCells -#define XtCMinWidthCells (String) "MinWidthCells" +#define XtCMinWidthCells "MinWidthCells" #endif #ifndef XtNminHeightCells -#define XtNminHeightCells (String) "minHeightCells" +#define XtNminHeightCells "minHeightCells" #endif #ifndef XtCMinHeightCells -#define XtCMinHeightCells (String) "MinHeightCells" +#define XtCMinHeightCells "MinHeightCells" #endif typedef struct _TopLevelEmacsShellClassRec *TopLevelEmacsShellWidgetClass;
--- a/src/Makefile.in.in Mon Aug 13 09:53:23 2007 +0200 +++ b/src/Makefile.in.in Mon Aug 13 09:54:23 2007 +0200 @@ -23,7 +23,7 @@ ## Synched up with: Not synched with FSF. all: xemacs -.PHONY : all release dump-elc dump-elcs all-elc all-elcs lint binary +.PHONY : all release dump-elc dump-elcs all-elc all-elcs lint ## For performance and consistency, no built-in rules. .SUFFIXES: @@ -89,23 +89,12 @@ vpath config.h vpath paths.h vpath Emacs.ad.h -vpath puresize_adjust.h +vpath puresize-adjust.h #else VPATH=@srcdir@ #endif RM = rm -f -PURIFY_PROG=purify -PURIFY_FLAGS=-chain-length=16 -ignore-signals=SIGPOLL -log-file=puremacs.log \ - -messages=batch -show-directory=yes -windows=yes -threads=yes \ - -cache-dir=. -always-use-cache-dir=yes -pointer-mask=0x0fffffff -PURECOV_PROG=purecov -#ifdef QUANTIFY -quantify_prog = quantify -quantify_flags = -windows=no -record-data=no -quantify_includes = -I/local/include -quantify_libs = /local/lib/quantify_stubs.a -#endif /* QUANTIFY */ #ifdef HAVE_NATIVE_SOUND sound_cflags=@sound_cflags@ @@ -298,21 +287,20 @@ FRC.DOC: -FRC.xemacs: +xemacs: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp + @$(RM) $@ && touch SATISFIED + -$(DUMPENV) ./temacs -batch -l loadup.el dump + @if test -f $@; then $(RM) SATISFIED; exit 0; fi; \ + if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \ + $(RECURSIVE_MAKE) $@; -xemacs: temacs ${libsrc}DOC $(mo_file) ${other_files} FRC.xemacs +FRC.update-elc.stamp : + +update-elc.stamp : FRC.update-elc.stamp @touch NOBYTECOMPILE - -${DUMPENV} ./temacs -batch -l ../prim/update-elc.el - if test -f NOBYTECOMPILE || test ! -f xemacs; then \ - $(RECURSIVE_MAKE) binary; \ - fi - @$(RM) NOBYTECOMPILE - -binary: temacs - @touch SATISFIED - -$(DUMPENV) ./temacs -batch -l loadup.el dump - @if test ! -f SATISFIED; then $(RECURSIVE_MAKE) $@; fi - @$(RM) SATISFIED + ${DUMPENV} ./temacs -batch -l ../prim/update-elc.el + @if test ! -f $@ -o -f NOBYTECOMPILE; then touch $@; fi; \ + $(RM) NOBYTECOMPILE obj_src = $(objs:.o=.c) @@ -382,7 +370,7 @@ ## end of Lint Section temacs_deps=\ - $(LOCALCPP) $(start_files) ${objs} ${otherobjs}\ + $(start_files) ${objs} ${otherobjs}\ $(lwlib_deps) $(dynodump_deps) prefix-args temacs_link_args=\ @@ -390,9 +378,26 @@ -o $@ ${start_files} ${objs} ${otherobjs} ${LIBES} temacs: $(temacs_deps) - if $(LD) $(temacs_link_args); then \ - $(RM) xemacs; \ - fi + $(LD) $(temacs_link_args) + +.PHONY : run-temacs + +run-temacs: + ./temacs -batch -l loadup.el run-temacs + +## Debugging targets: +## +## RTC is Sun WorkShop's Run Time Checking +## +## Purify, Quantify, PureCoverage are software quality products from +## Rational, formerly Pure Atria, formerly Pure Software. +## +## None of these products work with a dumped xemacs binary, because it +## does unexpected things like free memory that has been malloc'ed in +## a *different* process!! So we need to run these on temacs. +## + +.PHONY : run-rtcmacs run-puremacs run-quantmacs rtc_patch.o: rtc_patch_area -o $@ @@ -401,7 +406,7 @@ $(RM) temacs; $(RECURSIVE_MAKE) temacs RTC_patch_objs=rtc_patch.o mv temacs rtcmacs -rtcrun: rtcmacs +run-rtcmacs: rtcmacs dbx -q -C -c \ 'dbxenv rtc_error_log_file_name /dev/fd/1; \ dbxenv suppress_startup_message 5.0; \ @@ -411,19 +416,32 @@ runargs -batch -l loadup.el run-temacs -q; \ run' rtcmacs +## Purify +PURIFY_PROG=purify +PURIFY_FLAGS=-chain-length=32 -ignore-signals=SIGPOLL -threads=yes \ + -cache-dir=./purecache -always-use-cache-dir=yes -pointer-mask=0x0fffffff puremacs: $(temacs_deps) $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) -lpthread -.PHONY : run-puremacs run-puremacs: puremacs ./puremacs -batch -l loadup.el run-temacs +## Quantify +#ifdef QUANTIFY +quantify_prog = quantify +quantify_flags = -windows=no -record-data=no +quantify_includes = -I/local/include +quantify_libs = /local/lib/quantify_stubs.a + quantmacs: $(temacs_deps) $(quantify_prog) $(quantify_flags) $(LD) $(temacs_link_args) +#endif /* QUANTIFY */ +PURECOV_PROG=purecov covmacs: $(temacs_deps) $(PURECOV_PROG) $(LD) $(temacs_link_args) + TopLevelEmacsShell.o : ${srcdir}/EmacsShell-sub.c $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c mv EmacsShell-sub.o TopLevelEmacsShell.o @@ -523,11 +541,11 @@ $(CC) $(cflags) ${srcdir}/prefix-args.c -o prefix-args config.h: ${srcdir}/config.h.in -puresize_adjust.h: ${srcdir}/puresize.h +puresize-adjust.h: ${srcdir}/puresize.h paths.h: ${srcdir}/paths.h.in Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad -config.h puresize_adjust.h paths.h Emacs.ad.h : +config.h puresize-adjust.h paths.h Emacs.ad.h : @echo "The file $@ needs to be re-generated." @echo "Please run a make in the top level directory." @echo "Consult the file \`INSTALL' for instructions for building XEmacs." @@ -598,11 +616,11 @@ mostlyclean: $(RM) temacs puremacs quantmacs prefix-args depend.* *.o *.i core clean: mostlyclean versionclean - $(RM) libextcli* + $(RM) libextcli* update-elc.stamp ## This is used in making a distribution. ## Do not use it on development directories! distclean: clean - $(RM) config.h paths.h puresize_adjust.h Emacs.ad.h \ + $(RM) config.h paths.h puresize-adjust.h Emacs.ad.h \ Makefile Makefile.in TAGS realclean: distclean versionclean: @@ -2106,7 +2124,7 @@ pure.o: blocktype.h pure.o: config.h pure.o: dynarr.h -pure.o: puresize.h puresize_adjust.h +pure.o: puresize.h puresize-adjust.h ralloc.o: blocktype.h ralloc.o: config.h ralloc.o: dynarr.h
--- a/src/alloc.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/alloc.c Mon Aug 13 09:54:23 2007 +0200 @@ -92,7 +92,7 @@ } while (0) #else #define INCREMENT_CONS_COUNTER_1(size) (consing_since_gc += (size)) -#endif +#endif /* EMACS_BTL */ #define debug_allocation_backtrace() \ do { \ @@ -242,30 +242,28 @@ static int pure_sizeof (Lisp_Object /*, int recurse */); /* Keep statistics on how much of what is in purespace */ -struct purestat +static struct purestat { int nobjects; int nbytes; CONST char *name; -}; - -#define FMH(s,n) static struct purestat s = { 0, 0, n } -FMH (purestat_cons, "cons cells:"); -FMH (purestat_float, "float objects:"); -FMH (purestat_string_pname, "symbol-name strings:"); -FMH (purestat_bytecode, "compiled-function objects:"); -FMH (purestat_string_bytecodes, "byte-code strings:"); -FMH (purestat_vector_bytecode_constants, "byte-constant vectors:"); -FMH (purestat_string_interactive, "interactive strings:"); +} + purestat_cons = {0, 0, "cons cells"}, + purestat_float = {0, 0, "float objects"}, + purestat_string_pname = {0, 0, "symbol-name strings"}, + purestat_bytecode = {0, 0, "compiled-function objects"}, + purestat_string_bytecodes = {0, 0, "byte-code strings"}, + purestat_vector_bytecode_constants = {0, 0, "byte-constant vectors"}, + purestat_string_interactive = {0, 0, "interactive strings"}, #ifdef I18N3 -FMH (purestat_string_domain, "domain strings:"); + purestat_string_domain = {0, 0, "domain strings"}, #endif -FMH (purestat_string_documentation, "documentation strings:"); -FMH (purestat_string_other_function, "other function strings:"); -FMH (purestat_vector_other, "other vectors:"); -FMH (purestat_string_other, "other strings:"); -FMH (purestat_string_all, "all strings:"); -FMH (purestat_vector_all, "all vectors:"); + purestat_string_documentation = {0, 0, "documentation strings"}, + purestat_string_other_function = {0, 0, "other function strings"}, + purestat_vector_other = {0, 0, "other vectors"}, + purestat_string_other = {0, 0, "other strings"}, + purestat_string_all = {0, 0, "all strings"}, + purestat_vector_all = {0, 0, "all vectors"}; static struct purestat *purestats[] = { @@ -287,7 +285,6 @@ &purestat_string_all, &purestat_vector_all }; -#undef FMH static void bump_purestat (struct purestat *purestat, int nbytes) @@ -319,7 +316,7 @@ void release_breathing_space (void) { - if (breathing_space) + if (breathing_space) { void *tmp = breathing_space; breathing_space = 0; @@ -423,7 +420,7 @@ the one that comes with Solaris 2.3. FMH!! */ assert (block != (void *) 0xDEADBEEF); assert (block); -#endif +#endif /* ERROR_CHECK_MALLOC */ free (block); } @@ -451,18 +448,19 @@ unsigned long long_length = size / sizeof (FOUR_BYTE_TYPE); unsigned long i; unsigned long bytes_left_over = size - sizeof (FOUR_BYTE_TYPE) * long_length; - + for (i = 0; i < long_length; i++) ((FOUR_BYTE_TYPE *) ptr)[i] = 0xdeadbeef; for (i = i; i < bytes_left_over; i++) ((unsigned char *) ptr + long_length)[i] = deadbeef_as_char[i]; } -#else +#else /* !ERROR_CHECK_GC */ + #define deadbeef_memory(ptr, size) -#endif +#endif /* !ERROR_CHECK_GC */ #ifdef xstrdup #undef xstrdup @@ -518,7 +516,7 @@ /* lrecords are chained together through their "next.v" field. * After doing the mark phase, the GC will walk this linked - * list and free any record which hasn't been marked + * list and free any record which hasn't been marked */ static struct lcrecord_header *all_lcrecords; @@ -600,7 +598,7 @@ ((header->lheader.implementation->finalizer) (header, 1)); } } - + /* This must not be called -- it just serves as for EQ test * If lheader->implementation->finalizer is this_marks_a_marked_record, @@ -677,7 +675,7 @@ two string_chars_blocks. Vectors are each malloc()ed separately, similar to lcrecords. - + In the following discussion, we use conses, but it applies equally well to the other fixed-size types. @@ -793,7 +791,7 @@ #else #define MALLOC_OVERHEAD 8 #endif -#endif +#endif /* MALLOC_OVERHEAD */ #ifdef ALLOC_NO_POOLS # define TYPE_ALLOC_SIZE(type, structtype) 1 @@ -801,7 +799,7 @@ # define TYPE_ALLOC_SIZE(type, structtype) \ ((2048 - MALLOC_OVERHEAD - sizeof (struct type##_block *)) \ / sizeof (structtype)) -#endif +#endif /* ALLOC_NO_POOLS */ #define DECLARE_FIXED_TYPE_ALLOC(type, structtype) \ \ @@ -873,7 +871,7 @@ MARK_STRUCT_AS_NOT_FREE (result); \ } while (0) -#else +#else /* !ERROR_CHECK_GC */ #define ALLOCATE_FIXED_TYPE_1(type, structtype, result) \ do \ @@ -889,7 +887,7 @@ MARK_STRUCT_AS_NOT_FREE (result); \ } while (0) -#endif +#endif /* !ERROR_CHECK_GC */ #define ALLOCATE_FIXED_TYPE(type, structtype, result) \ do \ @@ -915,7 +913,7 @@ Even if Emacs is run on some weirdo system that allows and allocates byte-aligned pointers, this pointer is at the very top of the address space and so it's almost inconceivable that it could ever be valid. */ - + #if INTBITS == 32 # define INVALID_POINTER_VALUE 0xFFFFFFFF #elif INTBITS == 48 @@ -954,7 +952,7 @@ type##_free_list_tail = ptr; \ } while (0) -#else +#else /* !ERROR_CHECK_GC */ #define PUT_FIXED_TYPE_ON_FREE_LIST(type, structtype, ptr) \ do { * (structtype **) ((char *) ptr + sizeof (void *)) = \ @@ -962,7 +960,7 @@ type##_free_list = ptr; \ } while (0) -#endif +#endif /* !ERROR_CHECK_GC */ /* TYPE and STRUCTTYPE are the same as in ALLOCATE_FIXED_TYPE(). */ @@ -989,7 +987,7 @@ DECREMENT_CONS_COUNTER (sizeof (structtype)); \ gc_count_num_##type##_freelist++; \ } while (0) - + /**********************************************************************/ @@ -1526,7 +1524,7 @@ int purecopy_instructions = 1; if (nargs > 6) - return Fsignal (Qwrong_number_of_arguments, + return Fsignal (Qwrong_number_of_arguments, list2 (intern ("make-byte-code"), make_int (nargs))); CHECK_LIST (arglist); @@ -1589,7 +1587,7 @@ pure_sizeof (interactive)); #endif /* PURESTAT */ } - + { int docp = !NILP (doc_string); int intp = !UNBOUNDP (interactive); @@ -1621,7 +1619,7 @@ b->annotated = Vload_file_name_internal_the_purecopy; UNGCPRO; } -#endif +#endif /* COMPILED_FUNCTION_ANNOTATION_HACK */ #ifdef I18N3 if (docp && intp && domp) @@ -1735,7 +1733,7 @@ XSETEVENT (val, e); return val; } - + /**********************************************************************/ /* Marker allocation */ @@ -1785,11 +1783,11 @@ /* String allocation */ /**********************************************************************/ -/* The data for "short" strings generally resides inside of structs of type - string_chars_block. The Lisp_String structure is allocated just like any +/* The data for "short" strings generally resides inside of structs of type + string_chars_block. The Lisp_String structure is allocated just like any other Lisp object (except for vectors), and these are freelisted when they get garbage collected. The data for short strings get compacted, - but the data for large strings do not. + but the data for large strings do not. Previously Lisp_String structures were relocated, but this caused a lot of bus-errors because the C code didn't include enough GCPRO's for @@ -1852,7 +1850,7 @@ static void init_string_chars_alloc (void) { - first_string_chars_block = + first_string_chars_block = (struct string_chars_block *) xmalloc (sizeof (struct string_chars_block)); first_string_chars_block->prev = 0; first_string_chars_block->next = 0; @@ -1884,10 +1882,10 @@ else { /* Make a new current string chars block */ - struct string_chars_block *new + struct string_chars_block *new = (struct string_chars_block *) xmalloc (sizeof (struct string_chars_block)); - + current_string_chars_block->next = new; new->prev = current_string_chars_block; new->next = 0; @@ -1923,7 +1921,7 @@ set_string_data (s, &(s_chars->chars[0])); set_string_length (s, length); s->plist = Qnil; - + set_string_byte (s, length, 0); XSETSTRING (val, s); @@ -1933,7 +1931,7 @@ #ifdef VERIFY_STRING_CHARS_INTEGRITY static void verify_string_chars_integrity (void); #endif - + /* Resize the string S so that DELTA bytes can be inserted starting at POS. If DELTA < 0, it means deletion starting at POS. If POS < 0, resize the string but don't copy any characters. Use @@ -1959,7 +1957,7 @@ if (delta < 0) assert ((-delta) <= string_length (s)); } -#endif +#endif /* ERROR_CHECK_BUFPOS */ if (pos >= 0 && delta < 0) /* If DELTA < 0, the functions below will delete the characters @@ -1983,7 +1981,7 @@ modulo any alignment constraints). */ if (pos >= 0) { - Bufbyte *addroff = pos + string_data (s); + Bufbyte *addroff = pos + string_data (s); memmove (addroff + delta, addroff, /* +1 due to zero-termination. */ @@ -2004,7 +2002,7 @@ newfullsize)); if (pos >= 0) { - Bufbyte *addroff = pos + string_data (s); + Bufbyte *addroff = pos + string_data (s); memmove (addroff + delta, addroff, /* +1 due to zero-termination. */ @@ -2136,7 +2134,7 @@ #if defined (ERROR_CHECK_BUFPOS) && defined (MULE) bytecount_to_charcount (contents, length); /* Just for the assertions */ #endif - + val = make_uninit_string (length); memcpy (XSTRING_DATA (val), contents, length); return val; @@ -2259,7 +2257,7 @@ MARK_RECORD_HEADER (lheader); chain = free_header->chain; } - + return Qnil; } @@ -2305,7 +2303,7 @@ /* So must the size. */ assert (implementation->static_size == 0 || implementation->static_size == list->size); -#endif +#endif /* ERROR_CHECK_GC */ list->free = free_header->chain; free_header->lcheader.free = 0; return val; @@ -2339,7 +2337,7 @@ == list->size); else assert (implementation->static_size == list->size); -#endif +#endif /* ERROR_CHECK_GC */ if (implementation->finalizer) ((implementation->finalizer) (lheader, 0)); @@ -2361,8 +2359,8 @@ { Lisp_Object new; struct Lisp_String *s; - int size = (sizeof (struct Lisp_String) + ((no_need_to_copy_data) - ? 0 + int size = (sizeof (struct Lisp_String) + ((no_need_to_copy_data) + ? 0 /* + 1 for terminating 0 */ : (length + 1))); size = ALIGN_SIZE (size, ALIGNOF (Lisp_Object)); @@ -2402,7 +2400,7 @@ bump_purestat (&purestat_string_all, size); if (purecopying_for_bytecode) bump_purestat (&purestat_string_other_function, size); -#endif +#endif /* PURESTAT */ /* Do this after the official "completion" of the purecopying. */ s->plist = Fpurecopy (plist); @@ -2482,7 +2480,7 @@ of the struct to account for this. */ int alignment = sizeof (float_data (f)); -#endif +#endif /* !GNUC */ char *p = ((char *) PUREBEG + pureptr); p = (char *) (((unsigned EMACS_INT) p + alignment - 1) & - alignment); @@ -2543,7 +2541,7 @@ header->next = 0; return header; } -#endif +#endif /* unused */ @@ -2612,24 +2610,20 @@ static void -PURESIZE_h(long int puresize) +puresize_adjust_h (long int puresize) { - int fd; - char *PURESIZE_h_file = "puresize_adjust.h"; - char *WARNING = "/* This file is generated by XEmacs, DO NOT MODIFY!!! */\n"; - char define_PURESIZE[256]; - - if ((fd = open(PURESIZE_h_file, O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0) { - report_file_error("Can't write PURESIZE_ADJUSTMENT", - Fcons(build_ext_string(PURESIZE_h_file, FORMAT_FILENAME), - Qnil)); - } - - write(fd, WARNING, strlen(WARNING)); - sprintf(define_PURESIZE, "# define PURESIZE_ADJUSTMENT (%ld)\n", - puresize - RAW_PURESIZE); - write(fd, define_PURESIZE, strlen(define_PURESIZE)); - close(fd); + FILE *stream = fopen ("puresize-adjust.h", "w"); + + if (stream == NULL) + report_file_error ("Opening puresize adjustment file", + Fcons (build_string ("puresize-adjust.h"), Qnil)); + + fprintf (stream, + "/*\tDo not edit this file!\n" + "\tAutomatically generated by XEmacs */\n" + "# define PURESIZE_ADJUSTMENT (%ld)\n", + puresize - RAW_PURESIZE); + fclose (stream); } void @@ -2641,11 +2635,11 @@ if (pure_lossage) { message ("\n****\tPure Lisp storage exhausted!\n" -"\tPurespace usage: %ld of %ld\n" - "****", + "\tPurespace usage: %ld of %ld\n" + "****", get_PURESIZE()+pure_lossage, (long) get_PURESIZE()); if (die_if_pure_storage_exceeded) { - PURESIZE_h(get_PURESIZE() + pure_lossage); + puresize_adjust_h (get_PURESIZE() + pure_lossage); rc = -1; } } @@ -2660,7 +2654,7 @@ if (lost > 2) { sprintf (buf + strlen (buf), " -- %dk wasted", lost); if (die_if_pure_storage_exceeded) { - PURESIZE_h(pureptr + 16); + puresize_adjust_h (pureptr + 16); rc = -1; } } @@ -2670,45 +2664,54 @@ } #ifdef PURESTAT - { - int iii; - - purestat_vector_other.nbytes = - purestat_vector_all.nbytes - purestat_vector_bytecode_constants.nbytes; - purestat_vector_other.nobjects = - purestat_vector_all.nobjects - - purestat_vector_bytecode_constants.nobjects; - - purestat_string_other.nbytes = - purestat_string_all.nbytes - (purestat_string_pname.nbytes + - purestat_string_bytecodes.nbytes + - purestat_string_interactive.nbytes + - purestat_string_documentation.nbytes + + + purestat_vector_other.nbytes = + purestat_vector_all.nbytes - + purestat_vector_bytecode_constants.nbytes; + purestat_vector_other.nobjects = + purestat_vector_all.nobjects - + purestat_vector_bytecode_constants.nobjects; + + purestat_string_other.nbytes = + purestat_string_all.nbytes - + (purestat_string_pname.nbytes + + purestat_string_bytecodes.nbytes + + purestat_string_interactive.nbytes + + purestat_string_documentation.nbytes + #ifdef I18N3 - purestat_string_domain.nbytes + + purestat_string_domain.nbytes + #endif - purestat_string_other_function.nbytes); - purestat_string_other.nobjects = - purestat_string_all.nobjects - (purestat_string_pname.nobjects + - purestat_string_bytecodes.nobjects + - purestat_string_interactive.nobjects + - purestat_string_documentation.nobjects + + purestat_string_other_function.nbytes); + + purestat_string_other.nobjects = + purestat_string_all.nobjects - + (purestat_string_pname.nobjects + + purestat_string_bytecodes.nobjects + + purestat_string_interactive.nobjects + + purestat_string_documentation.nobjects + #ifdef I18N3 - purestat_string_domain.nobjects + + purestat_string_domain.nobjects + #endif - purestat_string_other_function.nobjects); - - message (" %-24stotal: bytes:", ""); - - for (iii = 0; iii < countof (purestats); iii++) - if (!purestats[iii]) + purestat_string_other_function.nobjects); + + message (" %-26s Total Bytes", ""); + + { + int j; + + for (j = 0; j < countof (purestats); j++) + if (!purestats[j]) clear_message (); else - message (" %-24s%5d %7d %2d%%", - purestats[iii]->name, - purestats[iii]->nobjects, - purestats[iii]->nbytes, - (int) (purestats[iii]->nbytes / (pureptr / 100.0) + 0.5)); + { + char buf [100]; + sprintf(buf, "%s:", purestats[j]->name); + message (" %-26s %5d %7d %2d%%", + buf, + purestats[j]->nobjects, + purestats[j]->nbytes, + (int) (purestats[j]->nbytes / (pureptr / 100.0) + 0.5)); + } } #endif /* PURESTAT */ @@ -2732,7 +2735,7 @@ string_length (XSYMBOL (Fcar (tem))->name) + 1); while (*s++) if (*s == '-') *s = ' '; s--; *s++ = ':'; *s = 0; - message (" %-32s%6d", buf, total); + message (" %-33s %6d", buf, total); } tem = Fcdr (Fcdr (tem)); } @@ -2748,10 +2751,10 @@ clear_message (); if (rc < 0) { - (void)unlink("SATISFIED"); + unlink("SATISFIED"); /* Current build process on NT does */ /* not know how to restart itself. */ - /* --marcpa */ + /* --marcpa */ #ifndef WINDOWSNT fatal ("Pure size adjusted, Don't Panic! I will restart the `make'"); #endif @@ -2788,7 +2791,7 @@ /* Mark reference to a Lisp_Object. If the object referred to has not been seen yet, recursively mark all the references contained in it. */ - + static void mark_object (Lisp_Object obj) { @@ -2940,9 +2943,8 @@ #ifdef PURESTAT -/* Simpler than mark-object, because pure structure can't - have any circularities - */ +/* Simpler than mark-object, because pure structure can't + have any circularities */ #if 0 /* unused */ static int idiot_c_doesnt_have_closures; @@ -2978,7 +2980,7 @@ if (string_data (ptr) != (unsigned char *) ptr + sizeof (struct Lisp_String)) { - /* string-data not allocated contiguously. + /* string-data not allocated contiguously. Probably (better be!!) a pointer constant "C" data. */ size = sizeof (struct Lisp_String); } @@ -3001,7 +3003,7 @@ #if 0 /* unused */ if (!recurse) break; - { + { int i; for (i = 0; i < len - 1; i++) total += pure_sizeof (ptr->contents[i], 1); @@ -3038,7 +3040,7 @@ obj = ((implementation->marker) (obj, idiot_c)); total += idiot_c_doesnt_have_closures; idiot_c_doesnt_have_closures = old; - + if (!NILP (obj)) goto tail_recurse; } #endif /* unused */ @@ -3229,7 +3231,7 @@ } static void -sweep_vectors_1 (Lisp_Object *prev, +sweep_vectors_1 (Lisp_Object *prev, int *used, int *total, int *storage) { Lisp_Object vector; @@ -3267,7 +3269,7 @@ } static void -sweep_bit_vectors_1 (Lisp_Object *prev, +sweep_bit_vectors_1 (Lisp_Object *prev, int *used, int *total, int *storage) { Lisp_Object bit_vector; @@ -3354,7 +3356,7 @@ gc_count_num_##typename##_freelist = num_free; \ } while (0) -#else +#else /* !ERROR_CHECK_GC */ #define SWEEP_FIXED_TYPE_BLOCK(typename, obj_type) \ do { \ @@ -3429,7 +3431,7 @@ gc_count_num_##typename##_freelist = num_free; \ } while (0) -#endif +#endif /* !ERROR_CHECK_GC */ @@ -3457,7 +3459,8 @@ check to make sure we're not freeing something already freed. */ if (POINTER_TYPE_P (XTYPE (ptr->car))) ASSERT_VALID_POINTER (XPNTR (ptr->car)); -#endif +#endif /* ERROR_CHECK_GC */ + #ifndef ALLOC_NO_POOLS FREE_FIXED_TYPE_WHEN_NOT_IN_GC (cons, struct Lisp_Cons, ptr); #endif /* ALLOC_NO_POOLS */ @@ -3583,7 +3586,8 @@ Lisp_Object temmy; XSETMARKER (temmy, ptr); assert (GC_MARKERP (temmy)); -#endif +#endif /* ERROR_CHECK_GC */ + #ifndef ALLOC_NO_POOLS FREE_FIXED_TYPE_WHEN_NOT_IN_GC (marker, struct Lisp_Marker, ptr); #endif /* ALLOC_NO_POOLS */ @@ -3607,7 +3611,7 @@ /* POS is the index of the next string in the block. */ while (pos < sb->pos) { - struct string_chars *s_chars = + struct string_chars *s_chars = (struct string_chars *) &(sb->string_chars[pos]); struct Lisp_String *string; int size; @@ -3657,7 +3661,7 @@ /* FROM_POS is the index of the next string in the block. */ while (from_pos < from_sb->pos) { - struct string_chars *from_s_chars = + struct string_chars *from_s_chars = (struct string_chars *) &(from_sb->string_chars[from_pos]); struct string_chars *to_s_chars; struct Lisp_String *string; @@ -3706,7 +3710,7 @@ to_sb = to_sb->next; to_pos = 0; } - + /* Compute new address of this string and update TO_POS for the space being used. */ to_s_chars = (struct string_chars *) &(to_sb->string_chars[to_pos]); @@ -3717,13 +3721,13 @@ /* Relocate FROM_S_CHARS's reference */ set_string_data (string, &(to_s_chars->chars[0])); - + from_pos += fullsize; to_pos += fullsize; } } - /* Set current to the last string chars block still used and + /* Set current to the last string chars block still used and free any that follow. */ { struct string_chars_block *victim; @@ -3762,7 +3766,7 @@ } stderr_out ("\"\n"); } -#endif +#endif /* 1 */ static void @@ -4171,7 +4175,7 @@ : 0); /* Show "...done" only if the echo area would otherwise be empty. */ - if (NILP (clear_echo_area (selected_frame (), + if (NILP (clear_echo_area (selected_frame (), Qgarbage_collecting, 0))) { Lisp_Object args[2], whole_msg; @@ -4206,7 +4210,7 @@ There's not any other way to know the address of the end of a function. */ void BTL_after_garbage_collect_1_stub () { abort (); } -#endif +#endif /* EMACS_BTL */ /* Debugging aids. */ @@ -4232,7 +4236,7 @@ Returns info on amount of space in use: ((USED-CONSES . FREE-CONSES) (USED-SYMS . FREE-SYMS) (USED-MARKERS . FREE-MARKERS) USED-STRING-CHARS USED-VECTOR-SLOTS - PLIST) + PLIST) where `PLIST' is a list of alternating keyword/value pairs providing more detailed information. Garbage collection happens automatically if you cons more than @@ -4253,7 +4257,7 @@ for (i = 0; i < last_lrecord_type_index_assigned; i++) { - if (lcrecord_stats[i].bytes_in_use != 0 + if (lcrecord_stats[i].bytes_in_use != 0 || lcrecord_stats[i].bytes_freed != 0 || lcrecord_stats[i].instances_on_free_list != 0) { @@ -4299,17 +4303,17 @@ pl = gc_plist_hack ("floats-used", gc_count_num_float_in_use, pl); #endif /* LISP_FLOAT_TYPE */ HACK_O_MATIC (string, "string-header-storage", pl); - pl = gc_plist_hack ("long-strings-total-length", + pl = gc_plist_hack ("long-strings-total-length", gc_count_string_total_size - gc_count_short_string_total_size, pl); HACK_O_MATIC (string_chars, "short-string-storage", pl); pl = gc_plist_hack ("short-strings-total-length", gc_count_short_string_total_size, pl); pl = gc_plist_hack ("strings-free", gc_count_num_string_freelist, pl); - pl = gc_plist_hack ("long-strings-used", + pl = gc_plist_hack ("long-strings-used", gc_count_num_string_in_use - gc_count_num_short_string_in_use, pl); - pl = gc_plist_hack ("short-strings-used", + pl = gc_plist_hack ("short-strings-used", gc_count_num_short_string_in_use, pl); HACK_O_MATIC (compiled_function, "compiled-function-storage", pl); @@ -4319,12 +4323,12 @@ gc_count_num_compiled_function_in_use, pl); pl = gc_plist_hack ("vector-storage", gc_count_vector_storage, pl); - pl = gc_plist_hack ("vectors-total-length", + pl = gc_plist_hack ("vectors-total-length", gc_count_vector_total_size, pl); pl = gc_plist_hack ("vectors-used", gc_count_num_vector_used, pl); pl = gc_plist_hack ("bit-vector-storage", gc_count_bit_vector_storage, pl); - pl = gc_plist_hack ("bit-vectors-total-length", + pl = gc_plist_hack ("bit-vectors-total-length", gc_count_bit_vector_total_size, pl); pl = gc_plist_hack ("bit-vectors-used", gc_count_num_bit_vector_used, pl); @@ -4361,7 +4365,7 @@ { return make_int (consing_since_gc); } - + DEFUN ("memory-limit", Fmemory_limit, 0, 0, "", /* Return the address of the last byte Emacs has allocated, divided by 1024. This may be helpful in debugging Emacs's memory usage. @@ -4384,7 +4388,7 @@ (CONSOLEP (obj) && !CONSOLE_LIVE_P (XCONSOLE (obj))) || (EVENTP (obj) && !EVENT_LIVE_P (XEVENT (obj))) || (EXTENTP (obj) && !EXTENT_LIVE_P (XEXTENT (obj)))); - + } #ifdef MEMORY_USAGE_STATS @@ -4539,16 +4543,16 @@ purestats[iii]->nbytes = 0; } purecopying_for_bytecode = 0; -#endif - +#endif /* PURESTAT */ + last_lrecord_type_index_assigned = -1; for (iii = 0; iii < countof (lrecord_implementations_table); iii++) { lrecord_implementations_table[iii] = 0; } - + symbols_initialized = 0; - + gc_generation_number[0] = 0; /* purify_flag 1 is correct even if CANNOT_DUMP. * loadup.el will set to nil at end. */ @@ -4601,7 +4605,7 @@ ERROR_ME_WARN. really_unlikely_name_to_have_accidentally_in_a_non_errb_structure = 3333632; -#endif +#endif /* ERROR_CHECK_TYPECHECK */ } void
--- a/src/buffer.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/buffer.c Mon Aug 13 09:54:23 2007 +0200 @@ -115,15 +115,15 @@ as well as a default value which is used to initialize newly-created buffers and as a reset-value when local-vars are killed. - If a slot is -2, there is no DEFVAR_BUFFER_LOCAL for it. + If a slot is -2, there is no DEFVAR_BUFFER_LOCAL for it. (The slot is always local, but there's no lisp variable for it.) - The default value is only used to initialize newly-creation buffers. - + The default value is only used to initialize newly-creation buffers. + If a slot is -3, then there is no DEFVAR_BUFFER_LOCAL for it but there is a default which is used to initialize newly-creation buffers and as a reset-value when local-vars are killed. - + */ struct buffer buffer_local_flags; @@ -270,12 +270,12 @@ { struct buffer *b = XBUFFER (obj); - if (print_readably) + if (print_readably) { if (!BUFFER_LIVE_P (b)) error ("printing unreadable object #<killed buffer>"); else - error ("printing unreadable object #<buffer %s>", + error ("printing unreadable object #<buffer %s>", XSTRING_DATA (b->name)); } else if (!BUFFER_LIVE_P (b)) @@ -291,7 +291,7 @@ print_internal (b->name, printcharfun, 0); } } - + DEFUN ("bufferp", Fbufferp, 1, 1, 0, /* T if OBJECT is an editor buffer. @@ -349,7 +349,7 @@ { if (error_if_deleted_or_does_not_exist) nsberror (name); - return (Qnil); + return Qnil; } return name; } @@ -364,7 +364,7 @@ UNGCPRO; if (NILP (buf) && error_if_deleted_or_does_not_exist) nsberror (name); - return (buf); + return buf; } } @@ -372,16 +372,10 @@ decode_buffer (Lisp_Object buffer, int allow_string) { if (NILP (buffer)) - { - return current_buffer; - } - else if (STRINGP (buffer)) - { - if (allow_string) - return XBUFFER (get_buffer (buffer, 1)); - else - CHECK_BUFFER (buffer); /* This will cause a wrong-type error. */ - } + return current_buffer; + + if (allow_string && STRINGP (buffer)) + return XBUFFER (get_buffer (buffer, 1)); CHECK_LIVE_BUFFER (buffer); return XBUFFER (buffer); @@ -421,7 +415,7 @@ return Qnil; } -#endif +#endif /* FSFmacs */ DEFUN ("get-buffer", Fget_buffer, 1, 1, 0, /* Return the buffer named NAME (a string). @@ -439,7 +433,7 @@ called FSF compatibility. */ if (BUFFERP (name)) return name; - return (get_buffer (name, 0)); + return get_buffer (name, 0); /* FSFmacs 19.29 calls assoc_ignore_text_properties() here. Bleagh!! */ } @@ -750,7 +744,7 @@ tem = Fget_buffer (name); if (NILP (tem)) - return (name); + return name; count = 1; while (1) @@ -765,7 +759,7 @@ } tem = Fget_buffer (gentemp); if (NILP (tem)) - return (gentemp); + return gentemp; } } @@ -908,7 +902,7 @@ #include "bufslots.h" #undef MARKED_SLOT } - return (result); + return result; } DEFUN ("buffer-dedicated-frame", Fbuffer_dedicated_frame, 0, 1, 0, /* @@ -923,7 +917,7 @@ if (!NILP (buf->dedicated_frame) && !FRAME_LIVE_P (XFRAME (buf->dedicated_frame))) buf->dedicated_frame = Qnil; - + return buf->dedicated_frame; } @@ -965,10 +959,10 @@ struct buffer *buf = decode_buffer (buffer, 0); #ifdef ENERGIZE - Lisp_Object starting_flag = + Lisp_Object starting_flag = (BUF_SAVE_MODIFF (buf) < BUF_MODIFF (buf)) ? Qt : Qnil; Lisp_Object argument_flag = (NILP (flag)) ? Qnil : Qt; -#endif +#endif #ifdef CLASH_DETECTION /* If buffer becoming modified, lock the file. @@ -1033,7 +1027,7 @@ (buffer)) { struct buffer *buf = decode_buffer (buffer, 0); - + return make_int (BUF_MODIFF (buf)); } @@ -1142,7 +1136,7 @@ disregard buffers that don't fit the predicate. */ if (FRAMEP (frame)) { - tem = XFRAME (frame)->buffer_predicate; + tem = XFRAME (frame)->buffer_predicate; if (!NILP (tem)) { tem = call1 (tem, buf); @@ -1298,7 +1292,7 @@ if (EQ (Vwindow_system, Qx)) call0 (intern ("xselect-kill-buffer-hook")); /* #### generalize me! */ -#endif +#endif /* HAVE_X_WINDOWS */ unbind_to (speccount, Qnil); UNGCPRO; b = XBUFFER (buf); /* Hypothetical relocating GC. */ @@ -1330,7 +1324,7 @@ UNGCPRO; } - + /* Make this buffer not be current. In the process, notice if this is the sole visible buffer and give up if so. */ @@ -1393,7 +1387,7 @@ internal_delete_file (b->auto_save_file_name); UNGCPRO; b = XBUFFER (buf); - + if (!BUFFER_LIVE_P (b)) return Qnil; @@ -1552,13 +1546,13 @@ extern Lisp_Object Ffep_force_on (), Ffep_force_off (), Ffep_get_mode (); old_buf->fep_mode = Ffep_get_mode (); - + if (!NILP (current_buffer->fep_mode)) Ffep_force_on (); else Ffep_force_off (); } -#endif +#endif /* HAVE_FEP */ if (old_buf) { @@ -1662,7 +1656,7 @@ } barf_if_buffer_read_only (b, s, e); - return (Qnil); + return Qnil; } static void @@ -2054,7 +2048,7 @@ *Non-nil means deactivate the mark when the buffer contents change. */ ); Vtransient_mark_mode = Qnil; -#endif +#endif /* FSFmacs */ DEFVAR_INT ("undo-threshold", &undo_threshold /* Keep no more undo information once it exceeds this size. @@ -2093,7 +2087,7 @@ delete_auto_save_files = 1; } -/* DOC is ignored because it is snagged and recorded externally +/* DOC is ignored because it is snagged and recorded externally * by make-docfile */ /* Renamed from DEFVAR_PER_BUFFER because FSFmacs D_P_B takes * a bogus extra arg, which confuses an otherwise identical make-docfile.c */ @@ -2133,7 +2127,7 @@ } while (0) static void -defvar_buffer_local (CONST char *namestring, +defvar_buffer_local (CONST char *namestring, CONST struct symbol_value_forward *m) { int offset = ((char *)symbol_value_forward_forward (m) @@ -2141,11 +2135,11 @@ defvar_mumble (namestring, m, sizeof (*m)); - *((Lisp_Object *)(offset + (char *)XBUFFER (Vbuffer_local_symbols))) + *((Lisp_Object *)(offset + (char *)XBUFFER (Vbuffer_local_symbols))) = intern (namestring); } -/* DOC is ignored because it is snagged and recorded externally +/* DOC is ignored because it is snagged and recorded externally * by make-docfile */ #define DEFVAR_BUFFER_DEFAULTS(lname, field_name) \ do { static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \ @@ -2188,12 +2182,12 @@ staticpro (&Vbuffer_local_symbols); XSETBUFFER (Vbuffer_defaults, defs); XSETBUFFER (Vbuffer_local_symbols, syms); - + nuke_all_buffer_slots (syms, Qnil); nuke_all_buffer_slots (defs, Qnil); defs->text = &defs->own_text; syms->text = &syms->own_text; - + /* Set up the non-nil default values of various buffer slots. Must do these before making the first buffer. */ @@ -2209,7 +2203,7 @@ defs->mirror_upcase_table = Vmirror_ascii_upcase_table; defs->mirror_case_canon_table = Vmirror_ascii_canon_table; defs->mirror_case_eqv_table = Vmirror_ascii_eqv_table; -#endif +#endif /* MULE */ defs->syntax_table = Vstandard_syntax_table; defs->mirror_syntax_table = XCHAR_TABLE (Vstandard_syntax_table)->mirror_table; @@ -2228,7 +2222,7 @@ defs->auto_save_modified = 0; defs->auto_save_failure_time = -1; defs->invisibility_spec = Qt; - + { /* 0 means var is always local. Default used only at creation. * -1 means var is always local. Default used only at reset and @@ -2242,13 +2236,13 @@ Lisp_Object always_local_no_default = make_int (0); Lisp_Object always_local_resettable = make_int (-1); Lisp_Object resettable = make_int (-3); - + /* Assign the local-flags to the slots that have default values. The local flag is a bit that is used in the buffer to say that it has its own local value for the slot. The local flag bits are in the local_var_flags slot of the buffer. */ - + nuke_all_buffer_slots (&buffer_local_flags, make_int (-2)); buffer_local_flags.filename = always_local_no_default; buffer_local_flags.directory = always_local_no_default; @@ -2256,7 +2250,7 @@ buffer_local_flags.save_length = always_local_no_default; buffer_local_flags.auto_save_file_name = always_local_no_default; buffer_local_flags.read_only = always_local_no_default; - + buffer_local_flags.major_mode = always_local_resettable; buffer_local_flags.mode_name = always_local_resettable; buffer_local_flags.undo_list = always_local_no_default; @@ -2268,7 +2262,7 @@ buffer_local_flags.invisibility_spec = always_local_resettable; buffer_local_flags.file_format = always_local_resettable; buffer_local_flags.generated_modeline_string = always_local_no_default; - + buffer_local_flags.keymap = resettable; buffer_local_flags.downcase_table = resettable; buffer_local_flags.upcase_table = resettable; @@ -2278,7 +2272,7 @@ #ifdef MULE buffer_local_flags.category_table = resettable; #endif - + buffer_local_flags.modeline_format = make_int (1); buffer_local_flags.abbrev_mode = make_int (2); buffer_local_flags.overwrite_mode = make_int (4); @@ -2299,7 +2293,7 @@ #ifdef MULE buffer_local_flags.buffer_file_coding_system = make_int (0x8000); #endif - + /* #### Warning, 0x4000000 (that's six zeroes) is the largest number currently allowable due to the XINT() handling of this value. With some rearrangement you can get 4 more bits. */ @@ -2479,7 +2473,7 @@ *Non-nil means lines in the buffer are displayed right to left. Nil means left to right. (Not yet implemented.) */ ); -#endif +#endif /* Not yet implemented */ DEFVAR_BUFFER_LOCAL_MAGIC ("truncate-lines", truncate_lines /* *Non-nil means do not display continuation lines; @@ -2579,11 +2573,11 @@ #endif /* FSFmacs */ DEFVAR_BUFFER_LOCAL ("buffer-file-truename", file_truename /* -The real name of the file visited in the current buffer, -or nil if not visiting a file. This is the result of passing -buffer-file-name to the `file-truename' function. Every buffer has -its own value of this variable. This variable is automatically -maintained by the functions that change the file name associated +The real name of the file visited in the current buffer, +or nil if not visiting a file. This is the result of passing +buffer-file-name to the `file-truename' function. Every buffer has +its own value of this variable. This variable is automatically +maintained by the functions that change the file name associated with a buffer. */ ); @@ -2650,7 +2644,7 @@ was modified between BEG and END. PROPERTY is the property name, and VALUE is the old value. */ -#endif +#endif /* FSFmacs */ DEFVAR_BUFFER_LOCAL ("buffer-undo-list", undo_list /* List of undo entries in current buffer. @@ -2691,7 +2685,7 @@ Non-nil means the mark and region are currently active in this buffer. Automatically local in all buffers. */ ); -#endif +#endif /* FSFmacs */ #ifdef REGION_CACHE_NEEDS_WORK xxDEFVAR_BUFFER_LOCAL ("cache-long-line-scans", cache_long_line_scans /* @@ -2804,7 +2798,7 @@ Vbuffer_alist = Qnil; /* Want no undo records for prin1_to_string_buffer */ Fbuffer_disable_undo (Vprin1_to_string_buffer); - + { Lisp_Object scratch = Fset_buffer (Fget_buffer_create (QSscratch)); @@ -2854,5 +2848,5 @@ /* #### is this correct? */ temp = get_minibuffer (0); XBUFFER (temp)->directory = current_buffer->directory; -#endif +#endif /* FSFmacs */ }
--- a/src/buffer.h Mon Aug 13 09:53:23 2007 +0200 +++ b/src/buffer.h Mon Aug 13 09:54:23 2007 +0200 @@ -221,38 +221,38 @@ #define BUFFER_LIVE_P(b) (!NILP ((b)->name)) extern Lisp_Object Qbuffer_live_p; -#define CHECK_LIVE_BUFFER(x) \ - do { CHECK_BUFFER (x); \ - if (!BUFFER_LIVE_P (XBUFFER (x))) \ - dead_wrong_type_argument (Qbuffer_live_p, (x)); \ +#define CHECK_LIVE_BUFFER(x) \ + do { CHECK_BUFFER (x); \ + if (!BUFFER_LIVE_P (XBUFFER (x))) \ + dead_wrong_type_argument (Qbuffer_live_p, (x)); \ } while (0) -#define CONCHECK_LIVE_BUFFER(x) \ - do { CONCHECK_BUFFER (x); \ - if (!BUFFER_LIVE_P (XBUFFER (x))) \ - x = wrong_type_argument (Qbuffer_live_p, (x)); \ +#define CONCHECK_LIVE_BUFFER(x) \ + do { CONCHECK_BUFFER (x); \ + if (!BUFFER_LIVE_P (XBUFFER (x))) \ + x = wrong_type_argument (Qbuffer_live_p, (x)); \ } while (0) #define BUFFER_OR_STRING_P(x) (BUFFERP (x) || STRINGP (x)) extern Lisp_Object Qbuffer_or_string_p; -#define CHECK_BUFFER_OR_STRING(x) \ - do { if (!BUFFER_OR_STRING_P (x)) \ - dead_wrong_type_argument (Qbuffer_or_string_p, (x)); \ +#define CHECK_BUFFER_OR_STRING(x) \ + do { if (!BUFFER_OR_STRING_P (x)) \ + dead_wrong_type_argument (Qbuffer_or_string_p, (x)); \ } while (0) -#define CONCHECK_BUFFER_OR_STRING(x) \ - do { if (!BUFFER_OR_STRING_P (x)) \ - x = wrong_type_argument (Qbuffer_or_string_p, (x)); \ +#define CONCHECK_BUFFER_OR_STRING(x) \ + do { if (!BUFFER_OR_STRING_P (x)) \ + x = wrong_type_argument (Qbuffer_or_string_p, (x)); \ } while (0) -#define CHECK_LIVE_BUFFER_OR_STRING(x) \ - do { CHECK_BUFFER_OR_STRING (x); \ - if (BUFFERP (x)) \ - CHECK_LIVE_BUFFER (x); \ +#define CHECK_LIVE_BUFFER_OR_STRING(x) \ + do { CHECK_BUFFER_OR_STRING (x); \ + if (BUFFERP (x)) \ + CHECK_LIVE_BUFFER (x); \ } while (0) -#define CONCHECK_LIVE_BUFFER_OR_STRING(x) \ - do { CONCHECK_BUFFER_OR_STRING (x); \ - if (BUFFERP (x)) \ - CONCHECK_LIVE_BUFFER (x); \ +#define CONCHECK_LIVE_BUFFER_OR_STRING(x) \ + do { CONCHECK_BUFFER_OR_STRING (x); \ + if (BUFFERP (x)) \ + CONCHECK_LIVE_BUFFER (x); \ } while (0) @@ -525,30 +525,27 @@ INLINE Emchar charptr_emchar (CONST Bufbyte *ptr) { - if (BYTE_ASCII_P (*ptr)) - return simple_charptr_emchar (ptr); - else - return non_ascii_charptr_emchar (ptr); + return BYTE_ASCII_P (*ptr) ? + simple_charptr_emchar (ptr) : + non_ascii_charptr_emchar (ptr); } INLINE Bytecount set_charptr_emchar (Bufbyte *ptr, Emchar x); INLINE Bytecount set_charptr_emchar (Bufbyte *ptr, Emchar x) { - if (!CHAR_MULTIBYTE_P (x)) - return simple_set_charptr_emchar (ptr, x); - else - return non_ascii_set_charptr_emchar (ptr, x); + return !CHAR_MULTIBYTE_P (x) ? + simple_set_charptr_emchar (ptr, x) : + non_ascii_set_charptr_emchar (ptr, x); } INLINE Bytecount charptr_copy_char (CONST Bufbyte *ptr, Bufbyte *ptr2); INLINE Bytecount charptr_copy_char (CONST Bufbyte *ptr, Bufbyte *ptr2) { - if (BYTE_ASCII_P (*ptr)) - return simple_charptr_copy_char (ptr, ptr2); - else - return non_ascii_charptr_copy_char (ptr, ptr2); + return BYTE_ASCII_P (*ptr) ? + simple_charptr_copy_char (ptr, ptr2) : + non_ascii_charptr_copy_char (ptr, ptr2); } #else /* not MULE */ @@ -575,15 +572,12 @@ INLINE int valid_char_p (Emchar ch) { - if (ch >= 0 && ch < 0400) - return 1; - else - return non_ascii_valid_char_p (ch); + return (ch >= 0 && ch <= 255) || non_ascii_valid_char_p (ch); } #else /* not MULE */ -#define valid_char_p(ch) ((unsigned int) (ch) < 0400) +#define valid_char_p(ch) ((unsigned int) (ch) <= 255) #endif /* not MULE */ @@ -607,13 +601,14 @@ #endif -#define CHECK_CHAR_COERCE_INT(x) \ - do { if (CHARP (x)) \ - ; \ - else if (CHAR_INTP (x)) \ - x = make_char (XINT (x)); \ - else \ - x = wrong_type_argument (Qcharacterp, x); } while (0) +#define CHECK_CHAR_COERCE_INT(x) do { \ + if (CHARP (x)) \ + ; \ + else if (CHAR_INTP (x)) \ + x = make_char (XINT (x)); \ + else \ + x = wrong_type_argument (Qcharacterp, x); \ + } while (0) #ifdef MULE # define MAX_EMCHAR_LEN 4 @@ -662,8 +657,8 @@ BI_BUF_PTR_BYTE_POS (struct buffer *buf, Bufbyte *ptr) { return ((ptr) - (buf)->text->beg + 1 - - ((ptr - (buf)->text->beg + 1) > (buf)->text->gpt - ? (buf)->text->gap_size : 0)); + - ((ptr - (buf)->text->beg + 1) > (buf)->text->gpt + ? (buf)->text->gap_size : 0)); } #define BUF_PTR_BYTE_POS(buf, ptr) \ @@ -703,22 +698,16 @@ INLINE int valid_memind_p (struct buffer *buf, Memind x) { - if (x >= 1 && x <= (Memind) (buf)->text->gpt) - return 1; - if (x > (Memind) ((buf)->text->gpt + (buf)->text->gap_size) - && x <= (Memind) ((buf)->text->z + (buf)->text->gap_size)) - return 1; - return 0; + return ((x >= 1 && x <= (Memind) (buf)->text->gpt) || + (x > (Memind) ((buf)->text->gpt + (buf)->text->gap_size) && + x <= (Memind) ((buf)->text->z + (buf)->text->gap_size))); } INLINE Memind bytind_to_memind (struct buffer *buf, Bytind x); INLINE Memind bytind_to_memind (struct buffer *buf, Bytind x) { - if (x > (buf)->text->gpt) - return (Memind) (x + (buf)->text->gap_size); - else - return (Memind) (x); + return (Memind) ((x > (buf)->text->gpt) ? (x + (buf)->text->gap_size) : x); } #ifdef ERROR_CHECK_BUFPOS @@ -728,10 +717,9 @@ memind_to_bytind (struct buffer *buf, Memind x) { assert (valid_memind_p (buf, x)); - if (x > (Memind) (buf)->text->gpt) - return (Bytind) (x - (buf)->text->gap_size); - else - return (Bytind) (x); + return (Bytind) ((x > (Memind) (buf)->text->gpt) ? + x - (buf)->text->gap_size : + x); } #else @@ -740,10 +728,9 @@ INLINE Bytind memind_to_bytind (struct buffer *buf, Memind x) { - if (x > (Memind) (buf)->text->gpt) - return (Bytind) (x - (buf)->text->gap_size); - else - return (Bytind) (x); + return (Bytind) ((x > (Memind) (buf)->text->gpt) ? + x - (buf)->text->gap_size : + x); } #endif @@ -1100,8 +1087,6 @@ - - /************************************************************************/ /* */ @@ -1505,7 +1490,7 @@ does too much stuff, such as moving out of invisible extents. */ #define TEMP_SET_PT(position) (temp_set_point ((position), current_buffer)) #define SET_BUF_PT(buf, value) ((buf)->pt = (value)) -#endif +#endif /* FSFmacs */ /*----------------------------------------------------------------------*/ /* Miscellaneous buffer values */ @@ -1515,8 +1500,9 @@ #define BUF_SIZE(buf) (BUF_Z (buf) - BUF_BEG (buf)) /* Is this buffer narrowed? */ -#define BUF_NARROWED(buf) ((BI_BUF_BEGV (buf) != BI_BUF_BEG (buf)) \ - || (BI_BUF_ZV (buf) != BI_BUF_Z (buf))) +#define BUF_NARROWED(buf) \ + ((BI_BUF_BEGV (buf) != BI_BUF_BEG (buf)) || \ + (BI_BUF_ZV (buf) != BI_BUF_Z (buf))) /* Modification count. */ #define BUF_MODIFF(buf) ((buf)->text->modiff) @@ -1783,7 +1769,7 @@ (MIRROR_TRT_TABLE_AS_STRING (table)[ch1] = (Bufbyte) (ch2)) #endif -# define IN_TRT_TABLE_DOMAIN(c) (((unsigned EMACS_INT) (c)) < 0400) +# define IN_TRT_TABLE_DOMAIN(c) (((unsigned EMACS_INT) (c)) <= 255) #ifdef MULE #define MIRROR_DOWNCASE_TABLE_AS_STRING(buf) \ @@ -1809,10 +1795,7 @@ INLINE Emchar TRT_TABLE_OF (Lisp_Object trt, Emchar c) { - if (IN_TRT_TABLE_DOMAIN (c)) - return TRT_TABLE_CHAR_1 (trt, c); - else - return c; + return IN_TRT_TABLE_DOMAIN (c) ? TRT_TABLE_CHAR_1 (trt, c) : c; } /* Macros used below. */ @@ -1825,7 +1808,7 @@ INLINE int UPPERCASEP (struct buffer *buf, Emchar ch) { - return (DOWNCASE_TABLE_OF (buf, ch) != ch); + return DOWNCASE_TABLE_OF (buf, ch) != ch; } /* 1 if CH is lower case. */ @@ -1834,7 +1817,7 @@ INLINE int LOWERCASEP (struct buffer *buf, Emchar ch) { - return (UPCASE_TABLE_OF (buf, ch) != ch && + return (UPCASE_TABLE_OF (buf, ch) != ch && DOWNCASE_TABLE_OF (buf, ch) == ch); } @@ -1844,7 +1827,7 @@ INLINE int NOCASEP (struct buffer *buf, Emchar ch) { - return (UPCASE_TABLE_OF (buf, ch) == ch); + return UPCASE_TABLE_OF (buf, ch) == ch; } /* Upcase a character, or make no change if that cannot be done. */ @@ -1853,8 +1836,7 @@ INLINE Emchar UPCASE (struct buffer *buf, Emchar ch) { - return (DOWNCASE_TABLE_OF (buf, ch) == ch) ? - UPCASE_TABLE_OF (buf, ch) : ch; + return (DOWNCASE_TABLE_OF (buf, ch) == ch) ? UPCASE_TABLE_OF (buf, ch) : ch; } /* Upcase a character known to be not upper case. */
--- a/src/casefiddle.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/casefiddle.c Mon Aug 13 09:54:23 2007 +0200 @@ -18,7 +18,7 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Synched up with: FSF 19.30. */ +/* Synched up with: FSF 19.34. */ #include <config.h> #include "lisp.h" @@ -31,36 +31,31 @@ enum case_action {CASE_UP, CASE_DOWN, CASE_CAPITALIZE, CASE_CAPITALIZE_UP}; static Lisp_Object -casify_object (struct buffer *buf, enum case_action flag, Lisp_Object obj) +casify_object (enum case_action flag, Lisp_Object obj, Lisp_Object buffer) { - REGISTER Emchar c; - REGISTER Charcount i, len; - REGISTER int inword = flag == CASE_DOWN; - struct Lisp_Char_Table *syntax_table = - XCHAR_TABLE (buf->mirror_syntax_table); + struct buffer *buf = decode_buffer (buffer, 0); + REGISTER int inword = (flag == CASE_DOWN); + struct Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->mirror_syntax_table); while (1) { if (CHAR_OR_CHAR_INTP (obj)) { + Emchar c; CHECK_CHAR_COERCE_INT (obj); c = XCHAR (obj); if (IN_TRT_TABLE_DOMAIN (c)) - { - if (inword) - obj = make_char (DOWNCASE (buf, c)); - else if (!UPPERCASEP (buf, c)) - obj = make_char (UPCASE1 (buf, c)); - } + obj = make_char (inword ? DOWNCASE (buf, c) : UPCASE1 (buf, c)); return obj; } if (STRINGP (obj)) { + Charcount i; + Charcount len = string_char_length (XSTRING (obj)); obj = Fcopy_sequence (obj); - len = string_char_length (XSTRING (obj)); for (i = 0; i < len; i++) { - c = string_char (XSTRING (obj), i); + Emchar c = string_char (XSTRING (obj), i); if (inword) c = DOWNCASE (buf, c); else if (!UPPERCASEP (buf, c) @@ -86,7 +81,7 @@ */ (obj, buffer)) { - return casify_object (decode_buffer (buffer, 0), CASE_UP, obj); + return casify_object (CASE_UP, obj, buffer); } DEFUN ("downcase", Fdowncase, 1, 2, 0, /* @@ -98,7 +93,7 @@ */ (obj, buffer)) { - return casify_object (decode_buffer (buffer, 0), CASE_DOWN, obj); + return casify_object (CASE_DOWN, obj, buffer); } DEFUN ("capitalize", Fcapitalize, 1, 2, 0, /* @@ -112,7 +107,7 @@ */ (obj, buffer)) { - return casify_object (decode_buffer (buffer, 0), CASE_CAPITALIZE, obj); + return casify_object (CASE_CAPITALIZE, obj, buffer); } /* Like Fcapitalize but change only the initials. */ @@ -127,23 +122,21 @@ */ (obj, buffer)) { - return casify_object (decode_buffer (buffer, 0), CASE_CAPITALIZE_UP, obj); + return casify_object (CASE_CAPITALIZE_UP, obj, buffer); } /* flag is CASE_UP, CASE_DOWN or CASE_CAPITALIZE or CASE_CAPITALIZE_UP. b and e specify range of buffer to operate on. */ static void -casify_region (struct buffer *buf, enum case_action flag, Lisp_Object b, - Lisp_Object e) +casify_region_internal (enum case_action flag, Lisp_Object b, Lisp_Object e, + struct buffer *buf) { /* This function can GC */ REGISTER Bufpos i; Bufpos start, end; - REGISTER Emchar c; REGISTER int inword = (flag == CASE_DOWN); - struct Lisp_Char_Table *syntax_table = - XCHAR_TABLE (buf->mirror_syntax_table); + struct Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->mirror_syntax_table); int mccount; if (EQ (b, e)) @@ -154,18 +147,23 @@ mccount = begin_multiple_change (buf, start, end); record_change (buf, start, end - start); - BUF_MODIFF (buf)++; for (i = start; i < end; i++) { - c = BUF_FETCH_CHAR (buf, i); + Emchar c = BUF_FETCH_CHAR (buf, i); + Emchar oldc = c; + if (inword && flag != CASE_CAPITALIZE_UP) c = DOWNCASE (buf, c); else if (!UPPERCASEP (buf, c) && (!inword || flag != CASE_CAPITALIZE_UP)) c = UPCASE1 (buf, c); - buffer_replace_char (buf, i, c, 1, (i == start)); + if (oldc != c) + { + buffer_replace_char (buf, i, c, 1, (i == start)); + BUF_MODIFF (buf)++; + } /* !!#### need to revalidate the start and end pointers in case the buffer was changed */ if ((int) flag >= (int) CASE_CAPITALIZE) @@ -174,6 +172,14 @@ end_multiple_change (buf, mccount); } +INLINE Lisp_Object +casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e, + Lisp_Object buffer) +{ + casify_region_internal (flag, b, e, decode_buffer (buffer, 1)); + return Qnil; +} + DEFUN ("upcase-region", Fupcase_region, 2, 3, "r", /* Convert the region to upper case. In programs, wants two arguments. These arguments specify the starting and ending character numbers of @@ -185,8 +191,7 @@ (b, e, buffer)) { /* This function can GC */ - casify_region (decode_buffer (buffer, 1), CASE_UP, b, e); - return Qnil; + return casify_region (CASE_UP, b, e, buffer); } DEFUN ("downcase-region", Fdowncase_region, 2, 3, "r", /* @@ -199,8 +204,7 @@ (b, e, buffer)) { /* This function can GC */ - casify_region (decode_buffer (buffer, 1), CASE_DOWN, b, e); - return Qnil; + return casify_region (CASE_DOWN, b, e, buffer); } DEFUN ("capitalize-region", Fcapitalize_region, 2, 3, "r", /* @@ -214,8 +218,7 @@ (b, e, buffer)) { /* This function can GC */ - casify_region (decode_buffer (buffer, 1), CASE_CAPITALIZE, b, e); - return Qnil; + return casify_region (CASE_CAPITALIZE, b, e, buffer); } /* Like Fcapitalize_region but change only the initials. */ @@ -229,23 +232,25 @@ */ (b, e, buffer)) { - casify_region (decode_buffer (buffer, 1), CASE_CAPITALIZE_UP, b, e); - return Qnil; + return casify_region (CASE_CAPITALIZE_UP, b, e, buffer); } static Lisp_Object -operate_on_word (struct buffer *buf, Lisp_Object arg, int *newpoint) +casify_word (enum case_action flag, Lisp_Object arg, Lisp_Object buffer) { Bufpos farend; + struct buffer *buf = decode_buffer (buffer, 1); CHECK_INT (arg); + farend = scan_words (buf, BUF_PT (buf), XINT (arg)); if (!farend) farend = XINT (arg) > 0 ? BUF_ZV (buf) : BUF_BEGV (buf); - *newpoint = ((BUF_PT (buf) > farend) ? BUF_PT (buf) : farend); - return (make_int (farend)); + casify_region_internal (flag, make_int (BUF_PT (buf)), make_int (farend), buf); + BUF_SET_PT (buf, max (BUF_PT (buf), farend)); + return Qnil; } DEFUN ("upcase-word", Fupcase_word, 1, 2, "p", /* @@ -257,15 +262,7 @@ (arg, buffer)) { /* This function can GC */ - Lisp_Object beg, end; - Bufpos newpoint; - struct buffer *buf = decode_buffer (buffer, 1); - - beg = make_int (BUF_PT (buf)); - end = operate_on_word (buf, arg, &newpoint); - casify_region (buf, CASE_UP, beg, end); - BUF_SET_PT (buf, newpoint); - return Qnil; + return casify_word (CASE_UP, arg, buffer); } DEFUN ("downcase-word", Fdowncase_word, 1, 2, "p", /* @@ -276,15 +273,7 @@ (arg, buffer)) { /* This function can GC */ - Lisp_Object beg, end; - Bufpos newpoint; - struct buffer *buf = decode_buffer (buffer, 1); - - beg = make_int (BUF_PT (buf)); - end = operate_on_word (buf, arg, &newpoint); - casify_region (buf, CASE_DOWN, beg, end); - BUF_SET_PT (buf, newpoint); - return Qnil; + return casify_word (CASE_DOWN, arg, buffer); } DEFUN ("capitalize-word", Fcapitalize_word, 1, 2, "p", /* @@ -297,15 +286,7 @@ (arg, buffer)) { /* This function can GC */ - Lisp_Object beg, end; - Bufpos newpoint; - struct buffer *buf = decode_buffer (buffer, 1); - - beg = make_int (BUF_PT (buf)); - end = operate_on_word (buf, arg, &newpoint); - casify_region (buf, CASE_CAPITALIZE, beg, end); - BUF_SET_PT (buf, newpoint); - return Qnil; + return casify_word (CASE_CAPITALIZE, arg, buffer); }
--- a/src/chartab.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/chartab.c Mon Aug 13 09:54:23 2007 +0200 @@ -51,16 +51,16 @@ Lisp_Object Qcategory_table_value_p; Lisp_Object Vstandard_category_table; -#endif +#endif /* MULE */ /* A char table maps from ranges of characters to values. Implementing a general data structure that maps from arbitrary ranges of numbers to values is tricky to do efficiently. As it - happens, it should suffice fine (and is usually more convenient, - anyway) when dealing with characters to restrict the sorts of - ranges that can be assigned values, as follows: + happens, it should suffice (and is usually more convenient, anyway) + when dealing with characters to restrict the sorts of ranges that + can be assigned values, as follows: 1) All characters. 2) All characters in a charset. @@ -68,7 +68,6 @@ means all characters with the same first byte. 4) A particular character in a charset. - We use char tables to generalize the 256-element vectors now littering the Emacs code. @@ -86,7 +85,7 @@ */ /************************************************************************/ -/* Char Table object */ +/* Char Table object */ /************************************************************************/ #ifdef MULE @@ -199,7 +198,7 @@ case CHAR_TABLE_TYPE_CATEGORY: return Qcategory; #endif } - + abort (); return Qnil; /* not reached */ } @@ -208,7 +207,7 @@ symbol_to_char_table_type (Lisp_Object symbol) { CHECK_SYMBOL (symbol); - + if (EQ (symbol, Qgeneric)) return CHAR_TABLE_TYPE_GENERIC; if (EQ (symbol, Qsyntax)) return CHAR_TABLE_TYPE_SYNTAX; if (EQ (symbol, Qdisplay)) return CHAR_TABLE_TYPE_DISPLAY; @@ -216,7 +215,7 @@ #ifdef MULE if (EQ (symbol, Qcategory)) return CHAR_TABLE_TYPE_CATEGORY; #endif - + signal_simple_error ("Unrecognized char table type", symbol); return CHAR_TABLE_TYPE_GENERIC; /* not reached */ } @@ -279,7 +278,7 @@ i--; } } - + if (first != -1) { if (row == -1) @@ -327,7 +326,7 @@ { struct Lisp_Char_Table *ct = XCHAR_TABLE (obj); char buf[200]; - + sprintf (buf, "#s(char-table type %s data (", string_data (symbol_name (XSYMBOL (char_table_type_to_symbol (ct->type))))); @@ -567,7 +566,7 @@ case CHAR_TABLE_TYPE_CATEGORY: fill_char_table (ct, Qnil); break; -#endif +#endif /* MULE */ case CHAR_TABLE_TYPE_SYNTAX: fill_char_table (ct, make_int (Sinherit)); @@ -786,16 +785,16 @@ #endif /* MULE */ static Lisp_Object -get_char_table (Emchar ch, struct Lisp_Char_Table *ct) +get_char_table (Emchar ch, struct Lisp_Char_Table *ct) { #ifdef MULE { Lisp_Object charset; int byte1, byte2; Lisp_Object val; - + BREAKUP_CHAR (ch, charset, byte1, byte2); - + if (EQ (charset, Vcharset_ascii)) val = ct->ascii[byte1]; else if (EQ (charset, Vcharset_control_1)) @@ -832,14 +831,12 @@ (ch, table)) { struct Lisp_Char_Table *ct; - Emchar chr; - + CHECK_CHAR_TABLE (table); ct = XCHAR_TABLE (table); CHECK_CHAR_COERCE_INT (ch); - chr = XCHAR(ch); - - return get_char_table (chr, ct); + + return get_char_table (XCHAR (ch), ct); } DEFUN ("get-range-char-table", Fget_range_char_table, 2, 3, 0, /* @@ -863,11 +860,11 @@ { int i; Lisp_Object first = ct->ascii[0]; - + for (i = 1; i < NUM_ASCII_CHARS; i++) if (!EQ (first, ct->ascii[i])) return multi; - + #ifdef MULE for (i = MIN_LEADING_BYTE; i < MIN_LEADING_BYTE + NUM_LEADING_BYTES; i++) @@ -890,24 +887,24 @@ { int i; Lisp_Object first = ct->ascii[0]; - + for (i = 1; i < 128; i++) if (!EQ (first, ct->ascii[i])) return multi; return first; } - + if (EQ (rainj.charset, Vcharset_control_1)) { int i; Lisp_Object first = ct->ascii[128]; - + for (i = 129; i < 160; i++) if (!EQ (first, ct->ascii[i])) return multi; return first; } - + { Lisp_Object val = ct->level1[XCHARSET_LEADING_BYTE (rainj.charset) - MIN_LEADING_BYTE]; @@ -962,7 +959,7 @@ return CATEGORY_TABLE_VALUEP (value); CHECK_CATEGORY_TABLE_VALUE (value); break; -#endif +#endif /* MULE */ case CHAR_TABLE_TYPE_GENERIC: return 1; @@ -1078,7 +1075,7 @@ { Lisp_Object charset; int byte1, byte2; - + BREAKUP_CHAR (range->ch, charset, byte1, byte2); if (EQ (charset, Vcharset_ascii)) ct->ascii[byte1] = val; @@ -1157,26 +1154,24 @@ Lisp_Object val, void *arg), void *arg) { - int i; - + struct chartab_range rainj; + int i, retval; + int start = 0; #ifdef MULE - for (i = 0; i < 128; i++) + int stop = 128; #else - for (i = 0; i < 256; i++) + int stop = 256; #endif + + rainj.type = CHARTAB_RANGE_CHAR; + + for (i = start, retval = 0; i < stop && retval == 0; i++) { - Lisp_Object val = ct->ascii[i]; - struct chartab_range rainj; - int retval; - - rainj.type = CHARTAB_RANGE_CHAR; rainj.ch = (Emchar) i; - retval = (fn) (&rainj, val, arg); - if (retval) - return retval; + retval = (fn) (&rainj, ct->ascii[i], arg); } - return 0; + return retval; } #ifdef MULE @@ -1189,22 +1184,20 @@ Lisp_Object val, void *arg), void *arg) { - int i; + struct chartab_range rainj; + int i, retval; + int start = 128; + int stop = start + 32; - for (i = 0; i < 32; i++) + rainj.type = CHARTAB_RANGE_CHAR; + + for (i = start, retval = 0; i < stop && retval == 0; i++) { - Lisp_Object val = ct->ascii[i + 128]; - struct chartab_range rainj; - int retval; - - rainj.type = CHARTAB_RANGE_CHAR; - rainj.ch = (Emchar) (i + 128); - retval = (fn) (&rainj, val, arg); - if (retval) - return retval; + rainj.ch = (Emchar) (i); + retval = (fn) (&rainj, ct->ascii[i], arg); } - return 0; + return retval; } /* Map FN over the row ROW of two-byte charset CHARSET. @@ -1218,9 +1211,8 @@ Lisp_Object val, void *arg), void *arg) { - Lisp_Object val; + Lisp_Object val = cte->level2[row - 32]; - val = cte->level2[row - 32]; if (!CHAR_TABLE_ENTRYP (val)) { struct chartab_range rainj; @@ -1232,38 +1224,25 @@ } else { - int i; - int start, stop; - + struct chartab_range rainj; + int i, retval; + int charset94_p = (XCHARSET_CHARS (charset) == 94); + int start = charset94_p ? 33 : 32; + int stop = charset94_p ? 127 : 128; + cte = XCHAR_TABLE_ENTRY (val); - if (XCHARSET_CHARS (charset) == 94) + + rainj.type = CHARTAB_RANGE_CHAR; + + for (i = start, retval = 0; i < stop && retval == 0; i++) { - start = 33; - stop = 127; - } - else - { - start = 32; - stop = 128; + rainj.ch = MAKE_CHAR (charset, row, i); + retval = (fn) (&rainj, cte->level2[i - 32], arg); } - - for (i = start; i < stop; i++) - { - int retval; - struct chartab_range rainj; - - rainj.type = CHARTAB_RANGE_CHAR; - rainj.ch = MAKE_CHAR (charset, row, i); + return retval; + } +} - val = cte->level2[i - 32]; - retval = (fn) (&rainj, val, arg); - if (retval) - return retval; - } - } - - return 0; -} static int map_over_other_charset (struct Lisp_Char_Table *ct, int lb, @@ -1273,12 +1252,12 @@ { Lisp_Object val = ct->level1[lb - MIN_LEADING_BYTE]; Lisp_Object charset = CHARSET_BY_LEADING_BYTE (lb); - + if (!CHARSETP (charset) || lb == LEADING_BYTE_ASCII || lb == LEADING_BYTE_CONTROL_1) return 0; - + if (!CHAR_TABLE_ENTRYP (val)) { struct chartab_range rainj; @@ -1287,35 +1266,33 @@ rainj.charset = charset; return (fn) (&rainj, val, arg); } - + { struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val); int charset94_p = (XCHARSET_CHARS (charset) == 94); int start = charset94_p ? 33 : 32; int stop = charset94_p ? 127 : 128; int i, retval; - + if (XCHARSET_DIMENSION (charset) == 1) - for (i = start; i < stop; i++) - { - struct chartab_range rainj; + { + struct chartab_range rainj; + rainj.type = CHARTAB_RANGE_CHAR; - rainj.type = CHARTAB_RANGE_CHAR; - rainj.ch = MAKE_CHAR (charset, i, 0); - retval = (fn) (&rainj, cte->level2[i - 32], arg); - if (retval) - return retval; - } + for (i = start, retval = 0; i < stop && retval == 0; i++) + { + rainj.ch = MAKE_CHAR (charset, i, 0); + retval = (fn) (&rainj, cte->level2[i - 32], arg); + } + } else - for (i = start; i < stop; i++) - { + { + for (i = start, retval = 0; i < stop && retval == 0; i++) retval = map_over_charset_row (cte, charset, i, fn, arg); - if (retval) - return retval; - } + } + + return retval; } - - return 0; } #endif /* MULE */ @@ -1336,7 +1313,7 @@ case CHARTAB_RANGE_ALL: { int retval; - + retval = map_over_charset_ascii (ct, fn, arg); if (retval) return retval; @@ -1346,17 +1323,17 @@ return retval; { int i; - for (i = MIN_LEADING_BYTE; i < MIN_LEADING_BYTE + NUM_LEADING_BYTES; - i++) + int start = MIN_LEADING_BYTE; + int stop = start + NUM_LEADING_BYTES; + + for (i = start, retval = 0; i < stop && retval == 0; i++) { retval = map_over_other_charset (ct, i, fn, arg); - if (retval) - return retval; } } #endif /* MULE */ + return retval; } - break; #ifdef MULE case CHARTAB_RANGE_CHARSET: @@ -1430,7 +1407,7 @@ ranjarg = vector2 (XCHARSET_NAME (range->charset), make_int (range->row)); break; -#endif +#endif /* MULE */ case CHARTAB_RANGE_CHAR: ranjarg = make_char (range->ch); break; @@ -1439,7 +1416,7 @@ } closure->retval = call2 (closure->function, ranjarg, val); - return (!NILP (closure->retval)); + return !NILP (closure->retval); } DEFUN ("map-char-table", Fmap_char_table, 2, 3, 0, /* @@ -1482,7 +1459,7 @@ Error_behavior errb) { /* #### should deal with ERRB */ - (void) symbol_to_char_table_type (value); + symbol_to_char_table_type (value); return 1; } @@ -1544,7 +1521,7 @@ { Lisp_Object range = Fcar (data); Lisp_Object val = Fcar (Fcdr (data)); - + data = Fcdr (Fcdr (data)); if (CONSP (range)) { @@ -1600,9 +1577,9 @@ */ (obj)) { - if (CHAR_TABLEP (obj) && XCHAR_TABLE_TYPE (obj) == CHAR_TABLE_TYPE_CATEGORY) - return Qt; - return Qnil; + return (CHAR_TABLEP (obj) && + XCHAR_TABLE_TYPE (obj) == CHAR_TABLE_TYPE_CATEGORY) ? + Qt : Qnil; } static Lisp_Object @@ -1612,25 +1589,25 @@ obj = def; while (NILP (Fcategory_table_p (obj))) obj = wrong_type_argument (Qcategory_table_p, obj); - return (obj); -} + return obj; +} int -check_category_char(Emchar ch, Lisp_Object table, - unsigned int designator, unsigned int not) +check_category_char (Emchar ch, Lisp_Object table, + unsigned int designator, unsigned int not) { register Lisp_Object temp; - struct Lisp_Char_Table *ctbl; + struct Lisp_Char_Table *ctbl; #ifdef ERROR_CHECK_TYPECHECK if (NILP (Fcategory_table_p (table))) - signal_simple_error("Expected category table", table); + signal_simple_error ("Expected category table", table); #endif - ctbl = XCHAR_TABLE(table); - temp = get_char_table(ch, ctbl); + ctbl = XCHAR_TABLE (table); + temp = get_char_table (ch, ctbl); if (EQ (temp, Qnil)) return not; - + designator -= ' '; - return bit_vector_bit(XBIT_VECTOR (temp), designator) ? !not : not; + return bit_vector_bit (XBIT_VECTOR (temp), designator) ? !not : not; } DEFUN ("check-category-at", Fcheck_category_at, 2, 4, 0, /* @@ -1644,20 +1621,19 @@ Lisp_Object ctbl; Emchar ch; unsigned int des; - struct buffer *buf = decode_buffer(buffer, 0); + struct buffer *buf = decode_buffer (buffer, 0); CHECK_INT (pos); CHECK_CATEGORY_DESIGNATOR (designator); - des = XREALINT(designator); + des = XREALINT (designator); ctbl = check_category_table (category_table, Vstandard_category_table); - ch = BUF_FETCH_CHAR (buf, XINT(pos)); - return check_category_char(ch, ctbl, des, 0) ? Qt : Qnil; + ch = BUF_FETCH_CHAR (buf, XINT (pos)); + return check_category_char (ch, ctbl, des, 0) ? Qt : Qnil; } DEFUN ("char-in-category-p", Fchar_in_category_p, 2, 3, 0, /* -Return t if category of character CHR includes DESIGNATOR, else -return nil. Optional third arg specifies the CATEGORY-TABLE to use, - +Return t if category of character CHR includes DESIGNATOR, else nil. +Optional third arg specifies the CATEGORY-TABLE to use, which defaults to the system default table. */ (chr, designator, category_table)) @@ -1667,11 +1643,11 @@ unsigned int des; CHECK_CATEGORY_DESIGNATOR (designator); - des = XREALINT(designator); - CHECK_CHAR(chr); - ch = XCHAR(chr); + des = XREALINT (designator); + CHECK_CHAR (chr); + ch = XCHAR (chr); ctbl = check_category_table (category_table, Vstandard_category_table); - return check_category_char(ch, ctbl, des, 0) ? Qt : Qnil; + return check_category_char (ch, ctbl, des, 0) ? Qt : Qnil; } DEFUN ("category-table", Fcategory_table, 0, 1, 0, /*
--- a/src/cm.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/cm.c Mon Aug 13 09:54:23 2007 +0200 @@ -396,7 +396,7 @@ #endif } - (void) calccost (f, FRAME_CURSOR_Y (f), FRAME_CURSOR_X (f), row, col, 1); + calccost (f, FRAME_CURSOR_Y (f), FRAME_CURSOR_X (f), row, col, 1); FRAME_CURSOR_Y (f) = row; FRAME_CURSOR_X (f) = col; #endif
--- a/src/console-x.h Mon Aug 13 09:53:23 2007 +0200 +++ b/src/console-x.h Mon Aug 13 09:54:23 2007 +0200 @@ -124,6 +124,7 @@ KeySym *x_keysym_map; int x_keysym_map_min_code; + int x_keysym_map_max_code; int x_keysym_map_keysyms_per_code; /* frame that holds the WM_COMMAND property; there should be exactly
--- a/src/device-x.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/device-x.c Mon Aug 13 09:54:23 2007 +0200 @@ -52,7 +52,7 @@ Lisp_Object Vdefault_x_device; /* Qdisplay in general.c */ -Lisp_Object Qx_error; +Lisp_Object Qx_error; Lisp_Object Qinit_pre_x_win, Qinit_post_x_win; /* $B@ZJ"(B, n. Japanese ritual suicide. */ @@ -65,30 +65,25 @@ static XrmOptionDescRec emacs_options[] = { - {(String)"-geometry", (String)".geometry", XrmoptionSepArg, NULL}, - {(String)"-iconic", (String)".iconic", XrmoptionNoArg, (XtPointer) "yes"}, + {"-geometry", ".geometry", XrmoptionSepArg, NULL}, + {"-iconic", ".iconic", XrmoptionNoArg, (XtPointer) "yes"}, - {(String)"-internal-border-width", (String)"*EmacsFrame.internalBorderWidth", + {"-internal-border-width", "*EmacsFrame.internalBorderWidth", XrmoptionSepArg, NULL}, - {(String)"-ib", (String)"*EmacsFrame.internalBorderWidth", XrmoptionSepArg, - NULL}, - {(String)"-scrollbar-width", (String)"*EmacsFrame.scrollBarWidth", - XrmoptionSepArg, NULL}, - {(String)"-scrollbar-height", (String)"*EmacsFrame.scrollBarHeight", - XrmoptionSepArg, NULL}, + {"-ib", "*EmacsFrame.internalBorderWidth", XrmoptionSepArg, NULL}, + {"-scrollbar-width", "*EmacsFrame.scrollBarWidth", XrmoptionSepArg, NULL}, + {"-scrollbar-height", "*EmacsFrame.scrollBarHeight", XrmoptionSepArg, NULL}, /* #### Beware! If the type of the shell changes, update this. */ - {(String)"-T", (String)"*TopLevelEmacsShell.title", XrmoptionSepArg, NULL}, - {(String)"-wn", (String)"*TopLevelEmacsShell.title", XrmoptionSepArg, NULL}, - {(String)"-title", (String)"*TopLevelEmacsShell.title", XrmoptionSepArg, - NULL}, - {(String)"-iconname", (String)"*TopLevelEmacsShell.iconName", - XrmoptionSepArg, NULL}, - {(String)"-in", (String)"*TopLevelEmacsShell.iconName", XrmoptionSepArg, - NULL}, - {(String)"-mc", (String)"*pointerColor", XrmoptionSepArg, NULL}, - {(String)"-cr", (String)"*cursorColor", XrmoptionSepArg, NULL}, - {(String)"-fontset", (String)"*FontSet", XrmoptionSepArg, NULL}, + {"-T", "*TopLevelEmacsShell.title", XrmoptionSepArg, NULL}, + {"-wn", "*TopLevelEmacsShell.title", XrmoptionSepArg, NULL}, + {"-title", "*TopLevelEmacsShell.title", XrmoptionSepArg, NULL}, + + {"-iconname", "*TopLevelEmacsShell.iconName", XrmoptionSepArg, NULL}, + {"-in", "*TopLevelEmacsShell.iconName", XrmoptionSepArg, NULL}, + {"-mc", "*pointerColor", XrmoptionSepArg, NULL}, + {"-cr", "*cursorColor", XrmoptionSepArg, NULL}, + {"-fontset", "*FontSet", XrmoptionSepArg, NULL}, }; static void validify_resource_string (char *str); @@ -276,7 +271,7 @@ char path[MAXPATHLEN]; XrmDatabase db = XtDatabase (dpy); /* ### XtScreenDatabase(dpy) ? */ CONST char *locale = XrmLocaleOfDatabase (db); - + if (STRINGP (Vdata_directory) && XSTRING_LENGTH (Vdata_directory) > 0) { GET_C_STRING_FILENAME_DATA_ALLOCA (Vdata_directory, data_dir); @@ -388,7 +383,7 @@ { #ifdef FREE_CHECKING checking_free = (__free_hook != 0); - + /* Disable strict free checking, to avoid bug in X library */ if (checking_free) disable_strict_free_check (); @@ -407,7 +402,7 @@ enable_strict_free_check (); #endif } - + if (EQ (device, Vdefault_x_device)) { Lisp_Object devcons, concons; @@ -785,7 +780,7 @@ } } -#endif +#endif /* 0 */ /* Only the characters [-_A-Za-z0-9] are allowed in the individual sections of a resource. Convert invalid characters to -. */ @@ -881,8 +876,8 @@ DEFUN ("x-get-resource", Fx_get_resource, 3, 6, 0, /* Retrieve an X resource from the resource manager. -The first arg is the name of the resource to retrieve, such as \"font\". -The second arg is the class of the resource to retrieve, like \"Font\". +The first arg is the name of the resource to retrieve, such as "font". +The second arg is the class of the resource to retrieve, like "Font". The third arg should be one of the symbols 'string, 'integer, 'natnum, or 'boolean, specifying the type of object that the database is searched for. The fourth arg is the locale to search for the resources on, and can @@ -890,7 +885,7 @@ defaults to 'global. The fifth arg is the device to search for the resources on. (The resource database for a particular device is constructed by combining non-device- - specific resources such any command-line resources specified and any + specific resources such as any command-line resources specified and any app-defaults files found [or the fallback resources supplied by XEmacs, if no app-defaults file is found] with device-specific resources such as those supplied using xrdb.) If omitted, it defaults to the device of @@ -906,49 +901,49 @@ If you want to search for a subresource, you just need to specify the resource levels in NAME and CLASS. For example, NAME could be -\"modeline.attributeFont\", and CLASS \"Face.AttributeFont\". +"modeline.attributeFont", and CLASS "Face.AttributeFont". Specifically, 1) If LOCALE is a buffer, a call - (x-get-resource \"foreground\" \"Foreground\" 'string SOME-BUFFER) + (x-get-resource "foreground" "Foreground" 'string SOME-BUFFER) is an interface to a C call something like - XrmGetResource (db, \"xemacs.buffer.BUFFER-NAME.foreground\", - \"Emacs.EmacsLocaleType.EmacsBuffer.Foreground\", - \"String\"); + XrmGetResource (db, "xemacs.buffer.BUFFER-NAME.foreground", + "Emacs.EmacsLocaleType.EmacsBuffer.Foreground", + "String"); 2) If LOCALE is a frame, a call - (x-get-resource \"foreground\" \"Foreground\" 'string SOME-FRAME) + (x-get-resource "foreground" "Foreground" 'string SOME-FRAME) is an interface to a C call something like - XrmGetResource (db, \"xemacs.frame.FRAME-NAME.foreground\", - \"Emacs.EmacsLocaleType.EmacsFrame.Foreground\", - \"String\"); + XrmGetResource (db, "xemacs.frame.FRAME-NAME.foreground", + "Emacs.EmacsLocaleType.EmacsFrame.Foreground", + "String"); 3) If LOCALE is a device, a call - (x-get-resource \"foreground\" \"Foreground\" 'string SOME-DEVICE) + (x-get-resource "foreground" "Foreground" 'string SOME-DEVICE) is an interface to a C call something like - XrmGetResource (db, \"xemacs.device.DEVICE-NAME.foreground\", - \"Emacs.EmacsLocaleType.EmacsDevice.Foreground\", - \"String\"); + XrmGetResource (db, "xemacs.device.DEVICE-NAME.foreground", + "Emacs.EmacsLocaleType.EmacsDevice.Foreground", + "String"); 4) If LOCALE is 'global, a call - (x-get-resource \"foreground\" \"Foreground\" 'string 'global) + (x-get-resource "foreground" "Foreground" 'string 'global) is an interface to a C call something like - XrmGetResource (db, \"xemacs.foreground\", - \"Emacs.Foreground\", - \"String\"); + XrmGetResource (db, "xemacs.foreground", + "Emacs.Foreground", + "String"); Note that for 'global, no prefix is added other than that of the application itself; thus, you can use this locale to retrieve @@ -973,8 +968,10 @@ CHECK_STRING (class); CHECK_SYMBOL (type); - if (!EQ (type, Qstring) && !EQ (type, Qboolean) && - !EQ (type, Qinteger) && !EQ (type, Qnatnum)) + if (!EQ (type, Qstring) && + !EQ (type, Qboolean) && + !EQ (type, Qinteger) && + !EQ (type, Qnatnum)) return maybe_signal_continuable_error (Qwrong_type_argument, list2 (build_translated_string @@ -1024,11 +1021,11 @@ return build_string (raw_result); else if (EQ (type, Qboolean)) { - if (!strcasecmp (raw_result, "off") || + if (!strcasecmp (raw_result, "off") || !strcasecmp (raw_result, "false") || - !strcasecmp (raw_result,"no")) + !strcasecmp (raw_result, "no")) return Fcons (Qnil, Qnil); - else if (!strcasecmp (raw_result, "on") || + else if (!strcasecmp (raw_result, "on") || !strcasecmp (raw_result, "true") || !strcasecmp (raw_result, "yes")) return Fcons (Qt, Qnil); @@ -1067,7 +1064,7 @@ the LOCALE and DEVICE arguments were passed to `x-get-resource'. The returned value is a cons of a name prefix and a class prefix. For example, if LOCALE is a frame, the returned value might be -\(\"xemacs.frame.FRAME-NAME\" . \"Emacs.EmacsLocaleType.EmacsFrame\"). +\("xemacs.frame.FRAME-NAME" . "Emacs.EmacsLocaleType.EmacsFrame"). If no valid X device for resourcing can be obtained, this function returns nil. (In such a case, `x-get-resource' would always return nil.) */ @@ -1206,10 +1203,7 @@ Display *dpy = get_x_display (device); char *vendor = ServerVendor (dpy); - if (vendor) - return (build_string (vendor)); - else - return (build_string ("")); + return build_string (vendor ? vendor : ""); } DEFUN ("x-server-version", Fx_server_version, 0, 1, 0, /* @@ -1235,12 +1229,11 @@ (keysym)) { CONST char *keysym_ext; - + CHECK_STRING (keysym); GET_C_STRING_CTEXT_DATA_ALLOCA (keysym, keysym_ext); - if (XStringToKeysym (keysym_ext)) - return Qt; - return Qnil; + + return XStringToKeysym (keysym_ext) ? Qt : Qnil; } DEFUN ("x-keysym-on-keyboard-p", Fx_keysym_on_keyboard_p, 1, 2, 0, /* @@ -1257,7 +1250,7 @@ KeySym keysym_KeySym; KeySym *keysym_ptr, *keysym_last; int min_code, max_code, keysyms_per_code; - + if (!DEVICE_X_P (d)) signal_simple_error ("Not an X device", device); CHECK_STRING (keysym); @@ -1265,7 +1258,7 @@ keysym_KeySym = XStringToKeysym (keysym_string); if (!keysym_KeySym) /* Invalid keysym */ return Qnil; - + XDisplayKeycodes (DEVICE_X_DISPLAY (d), &min_code, &max_code); keysyms_per_code = DEVICE_X_DATA (d)->x_keysym_map_keysyms_per_code; keysym_ptr = DEVICE_X_DATA (d)->x_keysym_map; @@ -1275,7 +1268,7 @@ if (keysym_KeySym == *keysym_ptr) return Qt; } - + return Qnil; } @@ -1327,7 +1320,7 @@ (NILP (cursor) ? 0 : XIMAGE_INSTANCE_X_CURSOR (cursor)), CurrentTime); - return ((result == GrabSuccess) ? Qt : Qnil); + return (result == GrabSuccess) ? Qt : Qnil; } DEFUN ("x-ungrab-pointer", Fx_ungrab_pointer, 0, 1, 0, /*
--- a/src/doc.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/doc.c Mon Aug 13 09:54:23 2007 +0200 @@ -539,9 +539,28 @@ } XCAR (tem) = offset; } - else goto weird_function; + else if (!CONSP (tem)) + { + weird_doc (sym, GETTEXT ("!CONSP(tem)"), + GETTEXT ("function"), pos); + goto cont; + } + else + { + /* DOC string is a string not integer 0 */ +#if 0 + weird_doc (sym, GETTEXT ("!INTP(XCAR(tem))"), + GETTEXT ("function"), pos); +#endif + goto cont; + } } - else goto weird_function; + else + { + weird_doc (sym, GETTEXT ("not lambda or autoload"), + GETTEXT ("function"), pos); + goto cont; + } } else if (COMPILED_FUNCTIONP (fun)) { @@ -599,6 +618,7 @@ } } } + cont: pos += end - buf; filled -= end - buf; memmove (buf, end, filled);
--- a/src/dynarr.h Mon Aug 13 09:53:23 2007 +0200 +++ b/src/dynarr.h Mon Aug 13 09:54:23 2007 +0200 @@ -25,11 +25,11 @@ #ifndef _XEMACS_DYNARR_H_ #define _XEMACS_DYNARR_H_ -#define Dynarr_declare(type) \ - type *base; \ - int elsize; \ - int cur; \ - int largest; \ +#define Dynarr_declare(type) \ + type *base; \ + int elsize; \ + int cur; \ + int largest; \ int max typedef struct dynarr @@ -50,7 +50,7 @@ #define Dynarr_largest(d) ((d)->largest) #define Dynarr_reset(d) ((d)->cur = 0) #define Dynarr_add_many(d, el, len) Dynarr_insert_many (d, el, len, (d)->cur) -#define Dynarr_insert_many_at_start(d, el, len) \ +#define Dynarr_insert_many_at_start(d, el, len) \ Dynarr_insert_many (d, el, len, 0) #define Dynarr_add(d, el) ( \
--- a/src/event-Xt.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/event-Xt.c Mon Aug 13 09:54:23 2007 +0200 @@ -171,15 +171,16 @@ { Display *display = DEVICE_X_DISPLAY (d); struct x_device *xd = DEVICE_X_DATA (d); - int max_code; if (xd->x_keysym_map) XFree ((char *) xd->x_keysym_map); - XDisplayKeycodes (display, &xd->x_keysym_map_min_code, - &max_code); - xd->x_keysym_map = - XGetKeyboardMapping (display, xd->x_keysym_map_min_code, - max_code - xd->x_keysym_map_min_code + 1, - &xd->x_keysym_map_keysyms_per_code); + XDisplayKeycodes (display, + &xd->x_keysym_map_min_code, + &xd->x_keysym_map_max_code); + xd->x_keysym_map = XGetKeyboardMapping (display, + xd->x_keysym_map_min_code, + xd->x_keysym_map_max_code - + xd->x_keysym_map_min_code + 1, + &xd->x_keysym_map_keysyms_per_code); } static CONST char * @@ -188,7 +189,7 @@ switch (indice) { case ShiftMapIndex: return "ModShift"; - case LockMapIndex: return "ModLock"; + case LockMapIndex: return "ModLock"; case ControlMapIndex: return "ModControl"; case Mod1MapIndex: return "Mod1"; case Mod2MapIndex: return "Mod2"; @@ -401,9 +402,15 @@ x_key_is_modifier_p (KeyCode keycode, struct device *d) { struct x_device *xd = DEVICE_X_DATA (d); - KeySym *syms = &xd->x_keysym_map [(keycode - xd->x_keysym_map_min_code) * - xd->x_keysym_map_keysyms_per_code]; + KeySym *syms; int i; + + if (keycode < xd->x_keysym_map_min_code || + keycode > xd->x_keysym_map_max_code) + return 0; + + syms = &xd->x_keysym_map [(keycode - xd->x_keysym_map_min_code) * + xd->x_keysym_map_keysyms_per_code]; for (i = 0; i < xd->x_keysym_map_keysyms_per_code; i++) if (IsModifierKey (syms [i]) || syms [i] == XK_Mode_switch) /* why doesn't IsModifierKey count this? */ @@ -443,12 +450,16 @@ xd = DEVICE_X_DATA (d); keycode = ev->xkey.keycode; type = ev->type; - + + if (keycode < xd->x_keysym_map_min_code || + keycode > xd->x_keysym_map_max_code) + return; + if (! ((type == KeyPress || type == KeyRelease) && x_key_is_modifier_p (keycode, d))) { /* Not a modifier key */ Bool key_event_p = (type == KeyPress || type == KeyRelease); - + if (type == KeyPress && !xd->last_downkey) xd->last_downkey = keycode; else if (type == ButtonPress || @@ -566,7 +577,7 @@ But if shift-lock is down, then it does. */ if (xd->lock_interpretation == XK_Shift_Lock) return 1; - + return ((sym >= XK_A) && (sym <= XK_Z)) || ((sym >= XK_a) && (sym <= XK_z)) || @@ -580,7 +591,7 @@ MappingNotify event is received. In its infinite wisdom, Xt decided that Xt event handlers never get MappingNotify events. O'Reilly Xt Programming Manual 9.1.2 says: - + MappingNotify is automatically handled by Xt, so it isn't passed to event handlers and you don't need to worry about it. @@ -646,7 +657,7 @@ /* If it's got a one-character name, that's good enough. */ if (!name[1]) return make_char (name[0]); - + /* If it's in the "Keyboard" character set, downcase it. The case of those keysyms is too totally random for us to force anyone to remember them. @@ -725,7 +736,7 @@ print_status_when (XLookupChars); print_status_when (XLookupNone); print_status_when (XBufferOverflow); - + if (status == XLookupKeySym || status == XLookupBoth) stderr_out (" keysym=%s", XKeysymToString (keysym)); if (status == XLookupChars || status == XLookupBoth) @@ -765,7 +776,7 @@ instream = make_decoding_input_stream (XLSTREAM (instream), Fget_coding_system (Qautomatic_conversion)); - + while ((ch = Lstream_get_emchar (XLSTREAM (instream))) != EOF) { Lisp_Object emacs_event = Fmake_event (); @@ -855,7 +866,7 @@ key_event_p ? x_event->xkey.time : x_event->xbutton.time; x_handle_sticky_modifiers (x_event, d); - + if (*state & ControlMask) modifiers |= MOD_CONTROL; if (*state & xd->MetaMask) modifiers |= MOD_META; if (*state & xd->SuperMask) modifiers |= MOD_SUPER; @@ -888,11 +899,11 @@ store it here, but we really don't care about the frame. */ emacs_event->channel = DEVICE_CONSOLE (d); keysym = x_to_emacs_keysym (&x_event->xkey, 0); - + /* If the emacs keysym is nil, then that means that the X keysym was NoSymbol, which probably means that we're in the midst of reading a Multi_key sequence, - or a "dead" key prefix. Ignore it. */ + or a "dead" key prefix, or XIM input. Ignore it. */ if (NILP (keysym)) return 0; @@ -941,10 +952,10 @@ if (! frame) return 0; /* not for us */ XSETFRAME (emacs_event->channel, frame); - + emacs_event->event_type = (x_event->type == ButtonPress) ? button_press_event : button_release_event; - + emacs_event->event.button.modifiers = modifiers; emacs_event->timestamp = ev->time; emacs_event->event.button.button = ev->button; @@ -953,17 +964,17 @@ } } break; - + case MotionNotify: { XMotionEvent *ev = &x_event->xmotion; struct frame *frame = x_window_to_frame (d, ev->window); unsigned int modifiers = 0; XMotionEvent event2; - + if (! frame) return 0; /* not for us */ - + /* We use MotionHintMask, so we will get only one motion event until the next time we call XQueryPointer or the user clicks the mouse. So call XQueryPointer now (meaning that @@ -979,7 +990,7 @@ &event2.x, &event2.y, &event2.state)) ev = &event2; /* only one structure copy */ - + DEVICE_X_MOUSE_TIMESTAMP (d) = ev->time; XSETFRAME (emacs_event->channel, frame); @@ -998,7 +1009,7 @@ emacs_event->event.motion.modifiers = modifiers; } break; - + case ClientMessage: { /* Patch bogus TAKE_FOCUS messages from MWM; CurrentTime is @@ -1013,42 +1024,49 @@ } } /* fall through */ - + default: /* it's a magic event */ { struct frame *frame; Window w; - + size_t event_size; + XEvent *x_event_copy = &emacs_event->event.magic.underlying_x_event; + +#define FROB(event_member, window_member) \ + x_event_copy->event_member = x_event->event_member; \ + w = x_event->event_member.window_member + switch (x_event->type) { - /* Note: the number of cases could be reduced to two or - three by using xany.window, but it's perhaps clearer - and potentially more robust this way */ - case SelectionRequest: w = x_event->xselectionrequest.owner; break; - case SelectionClear: w = x_event->xselectionclear.window; break; - case SelectionNotify: w = x_event->xselection.requestor; break; - case PropertyNotify: w = x_event->xproperty.window; break; - case ClientMessage: w = x_event->xclient.window; break; - case ConfigureNotify: w = x_event->xconfigure.window; break; - case Expose: - case GraphicsExpose: w = x_event->xexpose.window; break; - case MapNotify: - case UnmapNotify: w = x_event->xmap.window; break; - case EnterNotify: - case LeaveNotify: w = x_event->xcrossing.window; break; - case FocusIn: - case FocusOut: w = x_event->xfocus.window; break; - case VisibilityNotify: w = x_event->xvisibility.window; break; - default: w = x_event->xany.window; break; + case SelectionRequest: FROB(xselectionrequest, owner); break; + case SelectionClear: FROB(xselectionclear, window); break; + case SelectionNotify: FROB(xselection, requestor); break; + case PropertyNotify: FROB(xproperty, window); break; + case ClientMessage: FROB(xclient, window); break; + case ConfigureNotify: FROB(xconfigure, window); break; + case Expose: + case GraphicsExpose: FROB(xexpose, window); break; + case MapNotify: + case UnmapNotify: FROB(xmap, window); break; + case EnterNotify: + case LeaveNotify: FROB(xcrossing, window); break; + case FocusIn: + case FocusOut: FROB(xfocus, window); break; + case VisibilityNotify: FROB(xvisibility, window); break; + default: + w = x_event->xany.window; + *x_event_copy = *x_event; + break; } +#undef FROB frame = x_any_window_to_frame (d, w); - + if (!frame) return 0; emacs_event->event_type = magic_event; XSETFRAME (emacs_event->channel, frame); - emacs_event->event.magic.underlying_x_event = *x_event; + break; } } @@ -1084,7 +1102,7 @@ Lisp_Object frm; Lisp_Object conser; struct gcpro gcpro1; - + XSETFRAME (frm, f); conser = Fcons (frm, Fcons (FRAME_DEVICE (f), in_p ? Qt : Qnil)); GCPRO1 (conser); @@ -1105,7 +1123,7 @@ * It's curious that we're using x_any_window_to_frame() instead * of x_window_to_frame(). I don't know what the impact of this is. */ - + struct frame *f = x_any_window_to_frame (get_device_from_display (event->xany.display), event->xfocus.window); @@ -1138,7 +1156,7 @@ dispatch_epoch_event (f, event, Qx_map); #endif } - else if (FRAME_VISIBLE_P (f) && !is_visible) + else if (FRAME_VISIBLE_P (f) && !is_visible) { FRAME_VISIBLE_P (f) = 0; va_run_hook_with_args (Qunmap_frame_hook, 1, frame); @@ -1257,7 +1275,7 @@ handle_focus_event_1 (f, 1); #if 0 /* If there is a dialog box up, focus on it. - + #### Actually, we're raising it too, which is wrong. We should #### just focus on it, but lwlib doesn't currently give us an #### easy way to do that. This should be fixed. @@ -1284,7 +1302,7 @@ emacs_Xt_handle_magic_event (struct Lisp_Event *emacs_event) { /* This function can GC */ - XEvent *event = (XEvent *) &emacs_event->event.magic.underlying_x_event; + XEvent *event = &emacs_event->event.magic.underlying_x_event; struct frame *f = XFRAME (EVENT_CHANNEL (emacs_event)); if (!FRAME_LIVE_P (f)) @@ -1295,60 +1313,60 @@ case SelectionRequest: x_handle_selection_request (&event->xselectionrequest); break; - + case SelectionClear: x_handle_selection_clear (&event->xselectionclear); break; - + case SelectionNotify: x_handle_selection_notify (&event->xselection); break; - + case PropertyNotify: x_handle_property_notify (&event->xproperty); #ifdef EPOCH dispatch_epoch_event (f, event, Qx_property_change); #endif break; - + case Expose: x_redraw_exposed_area (f, event->xexpose.x, event->xexpose.y, event->xexpose.width, event->xexpose.height); break; - + case GraphicsExpose: /* This occurs when an XCopyArea's source area was obscured or not available. */ x_redraw_exposed_area (f, event->xexpose.x, event->xexpose.y, event->xexpose.width, event->xexpose.height); break; - + case MapNotify: case UnmapNotify: handle_map_event (f, event); break; - + case EnterNotify: if (event->xcrossing.detail != NotifyInferior) { Lisp_Object frame; - + XSETFRAME (frame, f); /* FRAME_X_MOUSE_P (f) = 1; */ va_run_hook_with_args (Qmouse_enter_frame_hook, 1, frame); } break; - + case LeaveNotify: if (event->xcrossing.detail != NotifyInferior) { Lisp_Object frame; - + XSETFRAME (frame, f); /* FRAME_X_MOUSE_P (f) = 0; */ va_run_hook_with_args (Qmouse_leave_frame_hook, 1, frame); } break; - + case FocusIn: case FocusOut: #ifdef EXTERNAL_WIDGET @@ -1361,11 +1379,11 @@ #endif handle_focus_event_1 (f, event->type == FocusIn); break; - + case ClientMessage: handle_client_message (f, event); break; - + case VisibilityNotify: /* window visiblity has changed */ if (event->xvisibility.window == XtWindow (FRAME_X_SHELL_WIDGET (f))) { @@ -1373,9 +1391,9 @@ (event->xvisibility.state == VisibilityUnobscured); /* Note that the fvwm pager only sends VisibilityNotify when changing pages. Is this all we need to do ? JV */ - /* Nope. We must at least trigger a redisplay here. - Since this case seems similar to MapNotify, I've - factored out some code to change_frame_visibility(). + /* Nope. We must at least trigger a redisplay here. + Since this case seems similar to MapNotify, I've + factored out some code to change_frame_visibility(). This triggers the necessary redisplay and runs (un)map-frame-hook. - dkindred@cs.cmu.edu */ /* Changed it again to support the tristate visibility flag */ @@ -1383,7 +1401,7 @@ != VisibilityFullyObscured) ? 1 : -1); } break; - + case ConfigureNotify: #ifdef HAVE_XIM XIM_SetGeometry (f); @@ -1570,10 +1588,10 @@ for that process's fd, so returning without setting any flags will take care of it.) To see the problem, uncomment the stderr_out below, turn NORMAL_QUIT_CHECK_TIMEOUT_MSECS - down to 25, do sh -c 'xemacs -nw -q -f shell 2>/tmp/log' + down to 25, do sh -c 'xemacs -nw -q -f shell 2>/tmp/log' and press return repeatedly. (Seen under AIX & Linux.) -dkindred@cs.cmu.edu */ - if (!poll_fds_for_input (temp_mask)) + if (!poll_fds_for_input (temp_mask)) { #if 0 stderr_out ("mark_what_as_being_ready: no input available (fd=%d)\n", @@ -1619,7 +1637,7 @@ closure = (struct what_is_ready_closure *) xmalloc (sizeof (*closure)); closure->fd = fd; closure->what = what; - closure->id = + closure->id = XtAppAddInput (Xt_app_con, fd, (XtPointer) (XtInputReadMask /* | XtInputExceptMask */), Xt_what_callback, closure); @@ -1676,10 +1694,8 @@ static void emacs_Xt_select_process (struct Lisp_Process *p) { - int infd; Lisp_Object process; - - infd = event_stream_unixoid_select_process (p); + int infd = event_stream_unixoid_select_process (p); XSETPROCESS (process, p); select_filedesc (infd, process); @@ -1688,9 +1704,7 @@ static void emacs_Xt_unselect_process (struct Lisp_Process *p) { - int infd; - - infd = event_stream_unixoid_unselect_process (p); + int infd = event_stream_unixoid_unselect_process (p); unselect_filedesc (infd); } @@ -1758,7 +1772,14 @@ /* On a stream device (ie: noninteractive), bad things can happen. */ if (EQ (CONSOLE_TYPE (con), Qtty)) { mousefd = CONSOLE_TTY_MOUSE_FD (con); - if (mousefd >= 0) { + /* We check filedesc_to_what_closure[fd] here because if you run + ** XEmacs from a TTY, it will fire up GPM, select the mouse fd, then + ** if you run gnuattach to connect to another TTY, it will fire up + ** GPM again, and try to reselect the mouse fd. GPM uses the same + ** fd for every connection apparently, and select_filedesc will + ** fail its assertion if we try to select it twice. + */ + if ((mousefd >= 0) && !filedesc_to_what_closure[mousefd]) { select_filedesc (mousefd, console); } } @@ -1911,12 +1932,12 @@ stderr_out (" detail: %s\n", XEvent_detail_to_string(ev->detail)); break; } - + case KeyPress: { XKeyEvent *ev = &event->xkey; unsigned int state = ev->state; - + describe_event_window (ev->window, ev->display); stderr_out (" subwindow: %ld\n", ev->subwindow); stderr_out (" state: "); @@ -1929,7 +1950,7 @@ if (state & Mod3Mask) stderr_out ("Mod3 "); if (state & Mod4Mask) stderr_out ("Mod4 "); if (state & Mod5Mask) stderr_out ("Mod5 "); - + if (! state) stderr_out ("vanilla\n"); else @@ -1939,7 +1960,7 @@ stderr_out (" keycode: 0x%x\n", ev->keycode); } break; - + case Expose: if (x_debug_events > 1) { @@ -1952,7 +1973,7 @@ else stderr_out ("\n"); break; - + case GraphicsExpose: if (x_debug_events > 1) { @@ -1968,7 +1989,7 @@ else stderr_out ("\n"); break; - + case EnterNotify: case LeaveNotify: if (x_debug_events > 1) @@ -2015,7 +2036,7 @@ else stderr_out ("\n"); break; - + case ClientMessage: { XClientMessageEvent *ev = &event->xclient; @@ -2030,7 +2051,7 @@ stderr_out ("\n"); break; } - + default: stderr_out ("\n"); break; @@ -2073,9 +2094,7 @@ signal_special_Xt_user_event (Lisp_Object channel, Lisp_Object function, Lisp_Object object) { - Lisp_Object event; - - event = Fmake_event (); + Lisp_Object event = Fmake_event (); XEVENT (event)->event_type = misc_user_event; XEVENT (event)->channel = channel; @@ -2083,7 +2102,7 @@ XEVENT (event)->event.eval.object = object; enqueue_Xt_dispatch_event (event); -} +} static void emacs_Xt_next_event (struct Lisp_Event *emacs_event) @@ -2149,8 +2168,7 @@ Xt_timeout_to_emacs_event (emacs_event); else if (fake_event_occurred) { - /* A dummy event, so that a cycle of the command loop will - occur. */ + /* A dummy event, so that a cycle of the command loop will occur. */ fake_event_occurred = 0; /* eval events have nil as channel */ emacs_event->event_type = eval_event; @@ -2407,7 +2425,7 @@ signal_event_pipe to generate actual input in the form of an identity eval event or something. (#### maybe this actually happens?) */ - + if (poll_fds_for_input (process_only_mask)) return 1; @@ -2513,7 +2531,7 @@ String params[1]; Cardinal num_params = 1; XtAppContext the_app_con = XtDisplayToApplicationContext (dpy); - + if (*num_args != 2) { XtAppWarningMsg(the_app_con, "wrongParameters", "cvtStringToPixel", "XtToolkitError", @@ -2549,11 +2567,11 @@ status = allocate_nearest_color (DisplayOfScreen(screen), colormap, &screenColor); } - + if (status == 0) { params[0] = str; /* Server returns a specific error code but Xlib discards it. Ugh */ - if (XLookupColor(DisplayOfScreen(screen), colormap, (char*)str, + if (XLookupColor(DisplayOfScreen(screen), colormap, (char*) str, &exactColor, &screenColor)) { XtAppWarningMsg(the_app_con, "noColormap", "cvtStringToPixel", "XtToolkitError", @@ -2565,7 +2583,7 @@ "XtToolkitError", "Color name \"%s\" is not defined", params, &num_params); } - + *closure_ret = False; return False; } else { @@ -2670,15 +2688,15 @@ completed_timeouts = 0; event_stream = Xt_event_stream; - + #if defined(HAVE_XIM) || defined(USE_XFONTSET) Initialize_Locale(); #endif /* HAVE_XIM || USE_XFONTSET */ - + XtToolkitInitialize (); Xt_app_con = XtCreateApplicationContext (); XtAppSetFallbackResources (Xt_app_con, (String *) x_fallback_resources); - + /* In xselect.c */ x_selection_timeout = (XtAppGetSelectionTimeout (Xt_app_con) / 1000); XSetErrorHandler (x_error_handler); @@ -2701,5 +2719,5 @@ NULL, 0, XtCacheByDisplay, EmacsFreeXIMStyles); #endif /* XIM_XLIB */ - + }
--- a/src/events.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/events.c Mon Aug 13 09:54:23 2007 +0200 @@ -266,23 +266,19 @@ case magic_event: { - Lisp_Object console; - - console = CDFW_CONSOLE (e1->channel); + struct console *con = XCONSOLE (CDFW_CONSOLE (e1->channel)); #ifdef HAVE_X_WINDOWS - /* XEvent is actually a union which means that we can't just use == */ - if (CONSOLE_X_P (XCONSOLE (console))) - return !memcmp ((XEvent *) &e1->event.magic.underlying_x_event, - (XEvent *) &e2->event.magic.underlying_x_event, - sizeof (e1->event.magic.underlying_x_event)); + if (CONSOLE_X_P (con)) + return (e1->event.magic.underlying_x_event.xany.serial == + e2->event.magic.underlying_x_event.xany.serial); #endif #ifdef HAVE_TTY - if (CONSOLE_TTY_P (XCONSOLE (console))) + if (CONSOLE_TTY_P (con)) return (e1->event.magic.underlying_tty_event == e2->event.magic.underlying_tty_event); #endif - return 1; + return 1; /* not reached */ } case empty_event: /* Empty and deallocated events are equal. */ @@ -334,18 +330,15 @@ case magic_event: { - Lisp_Object console = CDFW_CONSOLE (EVENT_CHANNEL (e)); + struct console *con = XCONSOLE (CDFW_CONSOLE (EVENT_CHANNEL (e))); #ifdef HAVE_X_WINDOWS - if (CONSOLE_X_P (XCONSOLE (console))) - return - HASH2 (hash, - memory_hash (&e->event.magic.underlying_x_event, - sizeof (e->event.magic.underlying_x_event))); + if (CONSOLE_X_P (con)) + return HASH2 (hash, e->event.magic.underlying_x_event.xany.serial); #endif - return - HASH2 (hash, - memory_hash (&e->event.magic.underlying_tty_event, - sizeof (e->event.magic.underlying_tty_event))); +#ifdef HAVE_TTY + if (CONSOLE_TTY_P (con)) + return HASH2 (hash, e->event.magic.underlying_tty_event); +#endif } case empty_event: @@ -356,7 +349,7 @@ abort (); } - return 0; + return 0; /* unreached */ } @@ -924,26 +917,27 @@ } case magic_event: { - CONST char *name = 0; - Lisp_Object console = CDFW_CONSOLE (EVENT_CHANNEL (event)); + CONST char *name = NULL; #ifdef HAVE_X_WINDOWS - if (CONSOLE_X_P (XCONSOLE (console))) - name = - x_event_name (event->event.magic.underlying_x_event.xany.type); -#endif + { + Lisp_Object console = CDFW_CONSOLE (EVENT_CHANNEL (event)); + if (CONSOLE_X_P (XCONSOLE (console))) + name = x_event_name (event->event.magic.underlying_x_event.type); + } +#endif /* HAVE_X_WINDOWS */ if (name) strcpy (buf, name); else strcpy (buf, "???"); return; } case magic_eval_event: strcpy (buf, "magic-eval"); return; - case pointer_motion_event: strcpy (buf, "motion"); return; - case misc_user_event: strcpy (buf, "misc-user"); return; - case eval_event: strcpy (buf, "eval"); return; - case process_event: strcpy (buf, "process");return; - case timeout_event: strcpy (buf, "timeout");return; - case empty_event: strcpy (buf, "empty"); return; - case dead_event: strcpy (buf, "DEAD-EVENT"); return; + case pointer_motion_event: strcpy (buf, "motion"); return; + case misc_user_event: strcpy (buf, "misc-user"); return; + case eval_event: strcpy (buf, "eval"); return; + case process_event: strcpy (buf, "process"); return; + case timeout_event: strcpy (buf, "timeout"); return; + case empty_event: strcpy (buf, "empty"); return; + case dead_event: strcpy (buf, "DEAD-EVENT"); return; default: abort (); } @@ -989,9 +983,9 @@ } else { - memcpy (buf, string_data (XSYMBOL (key)->name), - string_length (XSYMBOL (key)->name) + 1); - str += string_length (XSYMBOL (key)->name); + struct Lisp_String *name = XSYMBOL (key)->name; + memcpy (buf, string_data (name), string_length (name) + 1); + str += string_length (name); } } else @@ -1157,22 +1151,23 @@ DEFUN ("event-modifier-bits", Fevent_modifier_bits, 1, 1, 0, /* Return a number representing the modifier keys which were down -when the given mouse or keyboard event was produced. See also the function -event-modifiers. +when the given mouse or keyboard event was produced. +See also the function event-modifiers. */ (event)) { again: CHECK_LIVE_EVENT (event); - if (XEVENT (event)->event_type == key_press_event) - return make_int (XEVENT (event)->event.key.modifiers); - else if (XEVENT (event)->event_type == button_press_event || - XEVENT (event)->event_type == button_release_event) - return make_int (XEVENT (event)->event.button.modifiers); - else if (XEVENT (event)->event_type == pointer_motion_event) - return make_int (XEVENT (event)->event.motion.modifiers); - else + switch (XEVENT (event)->event_type) { + case key_press_event: + return make_int (XEVENT (event)->event.key.modifiers); + case button_press_event: + case button_release_event: + return make_int (XEVENT (event)->event.button.modifiers); + case pointer_motion_event: + return make_int (XEVENT (event)->event.motion.modifiers); + default: event = wrong_type_argument (intern ("key-or-mouse-event-p"), event); goto again; }
--- a/src/extents.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/extents.c Mon Aug 13 09:54:23 2007 +0200 @@ -1636,7 +1636,7 @@ } } -/* A change to an extent occurred that will might affect redisplay. +/* A change to an extent occurred that might affect redisplay. This is called when properties such as the endpoints, the layout, or the priority changes. Redisplay will be affected only if the extent has any displayable attributes. */ @@ -1647,9 +1647,12 @@ { /* Retrieve the ancestor for efficiency */ EXTENT anc = extent_ancestor (extent); - if (!NILP (extent_face (anc)) || !NILP (extent_begin_glyph (anc)) || - !NILP (extent_end_glyph (anc)) || !NILP (extent_mouse_face (anc)) || - !NILP (extent_invisible (anc)) || invisibility_change) + if (!NILP (extent_face (anc)) || + !NILP (extent_begin_glyph (anc)) || + !NILP (extent_end_glyph (anc)) || + !NILP (extent_mouse_face (anc)) || + !NILP (extent_invisible (anc)) || + invisibility_change) extent_changed_for_redisplay (extent, descendants_too, invisibility_change); } @@ -1664,7 +1667,7 @@ extent_object (extent) = object; /* Now make sure the extent info exists. */ if (!NILP (object)) - (void) buffer_or_string_extent_info_force (object); + buffer_or_string_extent_info_force (object); return extent; }
--- a/src/faces.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/faces.c Mon Aug 13 09:54:23 2007 +0200 @@ -156,21 +156,20 @@ depth++; - if (!internal_equal (f1->foreground, f2->foreground, depth) || - !internal_equal (f1->background, f2->background, depth) || - !internal_equal (f1->font, f2->font, depth) || - !internal_equal (f1->display_table, f2->display_table, depth) || - !internal_equal (f1->background_pixmap, f2->background_pixmap, depth) || - !internal_equal (f1->underline, f2->underline, depth) || - !internal_equal (f1->strikethru, f2->strikethru, depth) || - !internal_equal (f1->highlight, f2->highlight, depth) || - !internal_equal (f1->dim, f2->dim, depth) || - !internal_equal (f1->blinking, f2->blinking, depth) || - !internal_equal (f1->reverse, f2->reverse, depth) || - plists_differ (f1->plist, f2->plist, 0, 0, depth + 1)) - return 0; + return + (internal_equal (f1->foreground, f2->foreground, depth) && + internal_equal (f1->background, f2->background, depth) && + internal_equal (f1->font, f2->font, depth) && + internal_equal (f1->display_table, f2->display_table, depth) && + internal_equal (f1->background_pixmap, f2->background_pixmap, depth) && + internal_equal (f1->underline, f2->underline, depth) && + internal_equal (f1->strikethru, f2->strikethru, depth) && + internal_equal (f1->highlight, f2->highlight, depth) && + internal_equal (f1->dim, f2->dim, depth) && + internal_equal (f1->blinking, f2->blinking, depth) && + internal_equal (f1->reverse, f2->reverse, depth) && - return 1; + ! plists_differ (f1->plist, f2->plist, 0, 0, depth + 1)); } static unsigned long @@ -184,7 +183,7 @@ Just hash the most common ones. */ return HASH3 (internal_hash (f->foreground, depth), internal_hash (f->background, depth), - internal_hash (f->font, depth)); + internal_hash (f->font, depth)); } static Lisp_Object @@ -192,30 +191,20 @@ { struct Lisp_Face *f = XFACE (obj); -#define FROB(propprop) \ -do { \ - if (EQ (prop, Q##propprop)) \ - { \ - return f->propprop; \ - } \ -} while (0) - - FROB (foreground); - FROB (background); - FROB (font); - FROB (display_table); - FROB (background_pixmap); - FROB (underline); - FROB (strikethru); - FROB (highlight); - FROB (dim); - FROB (blinking); - FROB (reverse); - FROB (doc_string); - -#undef FROB - - return external_plist_get (&f->plist, prop, 0, ERROR_ME); + return + ((EQ (prop, Qforeground)) ? f->foreground : + (EQ (prop, Qbackground)) ? f->background : + (EQ (prop, Qfont)) ? f->font : + (EQ (prop, Qdisplay_table)) ? f->display_table : + (EQ (prop, Qbackground_pixmap)) ? f->background_pixmap : + (EQ (prop, Qunderline)) ? f->underline : + (EQ (prop, Qstrikethru)) ? f->strikethru : + (EQ (prop, Qhighlight)) ? f->highlight : + (EQ (prop, Qdim)) ? f->dim : + (EQ (prop, Qblinking)) ? f->blinking : + (EQ (prop, Qreverse)) ? f->reverse : + (EQ (prop, Qdoc_string)) ? f->doc_string : + external_plist_get (&f->plist, prop, 0, ERROR_ME)); } static int @@ -223,25 +212,18 @@ { struct Lisp_Face *f = XFACE (obj); -#define FROB(propprop) \ -do { \ - if (EQ (prop, Q##propprop)) \ - return 0; \ -} while (0) - - FROB (foreground); - FROB (background); - FROB (font); - FROB (display_table); - FROB (background_pixmap); - FROB (underline); - FROB (strikethru); - FROB (highlight); - FROB (dim); - FROB (blinking); - FROB (reverse); - -#undef FROB + if (EQ (prop, Qforeground) || + EQ (prop, Qbackground) || + EQ (prop, Qfont) || + EQ (prop, Qdisplay_table) || + EQ (prop, Qbackground_pixmap) || + EQ (prop, Qunderline) || + EQ (prop, Qstrikethru) || + EQ (prop, Qhighlight) || + EQ (prop, Qdim) || + EQ (prop, Qblinking) || + EQ (prop, Qreverse)) + return 0; if (EQ (prop, Qdoc_string)) { @@ -260,25 +242,18 @@ { struct Lisp_Face *f = XFACE (obj); -#define FROB(propprop) \ -do { \ - if (EQ (prop, Q##propprop)) \ - return -1; \ -} while (0) - - FROB (foreground); - FROB (background); - FROB (font); - FROB (display_table); - FROB (background_pixmap); - FROB (underline); - FROB (strikethru); - FROB (highlight); - FROB (dim); - FROB (blinking); - FROB (reverse); - -#undef FROB + if (EQ (prop, Qforeground) || + EQ (prop, Qbackground) || + EQ (prop, Qfont) || + EQ (prop, Qdisplay_table) || + EQ (prop, Qbackground_pixmap) || + EQ (prop, Qunderline) || + EQ (prop, Qstrikethru) || + EQ (prop, Qhighlight) || + EQ (prop, Qdim) || + EQ (prop, Qblinking) || + EQ (prop, Qreverse)) + return -1; if (EQ (prop, Qdoc_string)) { @@ -295,25 +270,19 @@ struct Lisp_Face *f = XFACE (obj); Lisp_Object result = Qnil; -#define FROB(propprop) \ -do { \ - /* backwards order; we reverse it below */ \ - result = Fcons (f->propprop, Fcons (Q##propprop, result)); \ -} while (0) + /* backwards order; we reverse it below */ + result = Fcons (f->foreground, Fcons (Qforeground, result)); + result = Fcons (f->background, Fcons (Qbackground, result)); + result = Fcons (f->font, Fcons (Qfont, result)); + result = Fcons (f->display_table, Fcons (Qdisplay_table, result)); + result = Fcons (f->background_pixmap, Fcons (Qbackground_pixmap, result)); + result = Fcons (f->underline, Fcons (Qunderline, result)); + result = Fcons (f->strikethru, Fcons (Qstrikethru, result)); + result = Fcons (f->highlight, Fcons (Qhighlight, result)); + result = Fcons (f->dim, Fcons (Qdim, result)); + result = Fcons (f->blinking, Fcons (Qblinking, result)); + result = Fcons (f->reverse, Fcons (Qreverse, result)); - FROB (foreground); - FROB (background); - FROB (font); - FROB (display_table); - FROB (background_pixmap); - FROB (underline); - FROB (strikethru); - FROB (highlight); - FROB (dim); - FROB (blinking); - FROB (reverse); - -#undef FROB return nconc2 (Fnreverse (result), f->plist); } @@ -520,10 +489,7 @@ !NILP (elt); elt = XCDR (elt)) { - Lisp_Object locale, values; - - locale = XCAR (XCAR (elt)); - values = XCDR (XCAR (elt)); + Lisp_Object values = XCDR (XCAR (elt)); for (; !NILP (values); values = XCDR (values)) { @@ -554,18 +520,18 @@ { update_inheritance_mapper_internal (contents, fcl->face, Qfont); } - else if (EQ (fcl->property, Qforeground) - || EQ (fcl->property, Qbackground)) + else if (EQ (fcl->property, Qforeground) || + EQ (fcl->property, Qbackground)) { update_inheritance_mapper_internal (contents, fcl->face, Qforeground); update_inheritance_mapper_internal (contents, fcl->face, Qbackground); } - else if (EQ (fcl->property, Qunderline) - || EQ (fcl->property, Qstrikethru) - || EQ (fcl->property, Qhighlight) - || EQ (fcl->property, Qdim) - || EQ (fcl->property, Qblinking) - || EQ (fcl->property, Qreverse)) + else if (EQ (fcl->property, Qunderline) || + EQ (fcl->property, Qstrikethru) || + EQ (fcl->property, Qhighlight) || + EQ (fcl->property, Qdim) || + EQ (fcl->property, Qblinking) || + EQ (fcl->property, Qreverse)) { update_inheritance_mapper_internal (contents, fcl->face, Qunderline); update_inheritance_mapper_internal (contents, fcl->face, Qstrikethru); @@ -1161,17 +1127,15 @@ { if (charsets[i]) { - Lisp_Object charset; - Lisp_Object font_instance; - struct Lisp_Font_Instance *fi; + Lisp_Object charset = CHARSET_BY_LEADING_BYTE (i + MIN_LEADING_BYTE); + Lisp_Object font_instance = FACE_CACHEL_FONT (cachel, charset); + struct Lisp_Font_Instance *fi = XFONT_INSTANCE (font_instance); - charset = CHARSET_BY_LEADING_BYTE (i + MIN_LEADING_BYTE); assert (CHARSETP (charset)); - font_instance = FACE_CACHEL_FONT (cachel, charset); assert (FONT_INSTANCEP (font_instance)); - fi = XFONT_INSTANCE (font_instance); - fm->ascent = max ((int) fi->ascent, (int) fm->ascent); - fm->descent = max ((int) fi->descent, (int) fm->descent); + + if (fm->ascent < (int) fi->ascent) fm->ascent = (int) fi->ascent; + if (fm->descent < (int) fi->descent) fm->descent = (int) fi->descent; fm->height = fm->ascent + fm->descent; if (fi->proportional_p) fm->proportional_p = 1; @@ -1650,7 +1614,7 @@ it. */ if (EQ (name, Qbackground)) MAYBE_DEVMETH (XDEVICE (frm->device), redraw_frame_toolbars, (frm)); -#endif +#endif /* HAVE_TOOLBARS */ /* The intent of this code is to cause the frame size in characters to remain the same when the font changes, at the @@ -1758,7 +1722,7 @@ occur in various places below. */ GCPRO4 (tag_set, locale, old_face, new_face); /* check validity of how_to_add now. */ - (void) decode_how_to_add_specification (how_to_add); + decode_how_to_add_specification (how_to_add); /* and of tag_set. */ tag_set = decode_specifier_tag_set (tag_set); /* and of locale. */ @@ -1940,37 +1904,39 @@ { Lisp_Object inst_list = Qnil; #ifdef HAVE_X_WINDOWS - CONST char *fonts[30]; - int n = 0; - /* The same gory list from x-faces.el. (#### Perhaps we should remove the stuff from x-faces.el and only depend on this stuff here? That should work.) */ - fonts[n++] = "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*"; - fonts[n++] = "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*"; - fonts[n++] = "-*-courier-*-r-*-*-*-120-*-*-*-*-iso8859-*"; - fonts[n++] = "-*-*-medium-r-*-*-*-120-*-*-m-*-iso8859-*"; - fonts[n++] = "-*-*-medium-r-*-*-*-120-*-*-c-*-iso8859-*"; - fonts[n++] = "-*-*-*-r-*-*-*-120-*-*-m-*-iso8859-*"; - fonts[n++] = "-*-*-*-r-*-*-*-120-*-*-c-*-iso8859-*"; - fonts[n++] = "-*-*-*-r-*-*-*-120-*-*-*-*-iso8859-*"; - fonts[n++] = "-*-*-medium-r-*-*-*-120-*-*-m-*-*-*"; - fonts[n++] = "-*-*-medium-r-*-*-*-120-*-*-c-*-*-*"; - fonts[n++] = "-*-*-*-r-*-*-*-120-*-*-m-*-*-*"; - fonts[n++] = "-*-*-*-r-*-*-*-120-*-*-c-*-*-*"; - fonts[n++] = "-*-*-*-r-*-*-*-120-*-*-*-*-*-*"; - fonts[n++] = "-*-*-*-*-*-*-*-120-*-*-*-*-*-*"; - fonts[n++] = "*"; + CONST char *fonts[] = + { + "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*", + "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*", + "-*-courier-*-r-*-*-*-120-*-*-*-*-iso8859-*", + "-*-*-medium-r-*-*-*-120-*-*-m-*-iso8859-*", + "-*-*-medium-r-*-*-*-120-*-*-c-*-iso8859-*", + "-*-*-*-r-*-*-*-120-*-*-m-*-iso8859-*", + "-*-*-*-r-*-*-*-120-*-*-c-*-iso8859-*", + "-*-*-*-r-*-*-*-120-*-*-*-*-iso8859-*", + "-*-*-medium-r-*-*-*-120-*-*-m-*-*-*", + "-*-*-medium-r-*-*-*-120-*-*-c-*-*-*", + "-*-*-*-r-*-*-*-120-*-*-m-*-*-*", + "-*-*-*-r-*-*-*-120-*-*-c-*-*-*", + "-*-*-*-r-*-*-*-120-*-*-*-*-*-*", + "-*-*-*-*-*-*-*-120-*-*-*-*-*-*", + "*" + }; + CONST char **fontptr; - for (--n; n >= 0; --n) - inst_list = Fcons (Fcons (list1 (Qx), build_string (fonts[n])), + for (fontptr = fonts + countof(fonts) - 1; fontptr >= fonts; fontptr--) + inst_list = Fcons (Fcons (list1 (Qx), build_string (*fontptr)), inst_list); -#endif +#endif /* HAVE_X_WINDOWS */ + #ifdef HAVE_TTY inst_list = Fcons (Fcons (list1 (Qtty), build_string ("normal")), inst_list); -#endif +#endif /* HAVE_TTY */ set_specifier_fallback (Fget (Vdefault_face, Qfont, Qnil), inst_list); }
--- a/src/fileio.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/fileio.c Mon Aug 13 09:54:23 2007 +0200 @@ -50,7 +50,7 @@ #ifdef HPUX_PRE_8_0 #include <errnet.h> #endif -#endif +#endif /* HPUX */ /* Nonzero during writing of auto-save files */ static int auto_saving; @@ -1139,7 +1139,7 @@ if (newdir[1] == ':') drive = newdir[0]; dostounix_filename (newdir); -#endif +#endif /* DOS_NT */ nm++; #ifdef VMS nm++; /* Don't leave the slash in nm. */ @@ -2388,13 +2388,13 @@ || (st.st_mode & S_IFMT) == S_IFDIR); #else /* not DOS_NT */ #ifdef HAVE_EACCESS - return (eaccess (filename, 1) >= 0); + return eaccess (filename, 1) >= 0; #else /* Access isn't quite right because it uses the real uid and we really want to test with the effective uid. But Unix doesn't give us a right way to do it. */ - return (access (filename, 1) >= 0); -#endif + return access (filename, 1) >= 0; +#endif /* HAVE_EACCESS */ #endif /* not DOS_NT */ } @@ -2971,7 +2971,7 @@ filename)); } } -#endif +#endif /* S_IFREG */ if (!NILP (beg)) CHECK_INT (beg); @@ -3170,7 +3170,7 @@ (XLSTREAM (stream), Fget_coding_system (codesys)); Lstream_set_character_mode (XLSTREAM (stream)); Lstream_set_buffering (XLSTREAM (stream), LSTREAM_BLOCKN_BUFFERED, 65536); -#endif +#endif /* MULE */ record_unwind_protect (close_stream_unwind, stream); @@ -3206,7 +3206,7 @@ Fset (used_codesys, XCODING_SYSTEM_NAME (decoding_stream_coding_system (XLSTREAM (stream)))); } -#endif +#endif /* MULE */ NUNGCPRO; } @@ -3227,7 +3227,7 @@ } } #endif -#endif +#endif /* 0 */ /* Close the file/stream */ unbind_to (speccount, Qnil); @@ -3383,7 +3383,7 @@ int buffer_file_type = NILP (current_buffer->buffer_file_type) ? O_TEXT : O_BINARY; #endif /* DOS_NT */ -#endif +#endif /* 0 */ #ifdef MULE codesys = Fget_coding_system (codesys); @@ -3547,7 +3547,7 @@ vms_truncate (fn_data); desc = open (fn_data, O_RDWR, 0); } -#endif +#endif /* 0 */ } } UNGCPRO; @@ -3608,7 +3608,7 @@ you lose -- fix this if (GPT > BUF_BEG (current_buffer) && *GPT_ADDR[-1] != '\n') move_gap (find_next_newline (current_buffer, GPT, 1)); -#endif +#endif /* VMS */ failure = 0; @@ -3630,7 +3630,7 @@ make_encoding_output_stream ( XLSTREAM (outstream), codesys); Lstream_set_buffering (XLSTREAM (outstream), LSTREAM_BLOCKN_BUFFERED, 65536); -#endif +#endif /* MULE */ if (STRINGP (start)) { instream = make_lisp_string_input_stream (start, 0, -1); @@ -3666,7 +3666,7 @@ failure = 1; save_errno = errno; } -#endif +#endif /* HAVE_FSYNC */ /* Spurious "file has changed on disk" warnings have been observed on Suns as well. @@ -3820,7 +3820,7 @@ end = make_int (BUF_ZV (current_buffer)); annotations = Qnil; } - (void) Flength (res); /* Check basic validity of return value */ + Flength (res); /* Check basic validity of return value */ annotations = merge (annotations, res, Qcar_less_than_car); p = Fcdr (p); } @@ -3841,7 +3841,7 @@ end = make_int (BUF_ZV (current_buffer)); annotations = Qnil; } - (void) Flength (res); + Flength (res); annotations = merge (annotations, res, Qcar_less_than_car); p = Fcdr (p); } @@ -3896,7 +3896,7 @@ } } else -#endif +#endif /* MULE */ { while (pos != nextpos) { @@ -3956,17 +3956,14 @@ memcpy (encrypted_string, XSTRING_DATA (string), XSTRING_LENGTH (string)); memset (encrypted_string + rounded_size - extra, 0, extra + 1); - if (XSTRING_LENGTH (key) > CRYPT_KEY_SIZE) - key_size = CRYPT_KEY_SIZE; - else - key_size = XSTRING_LENGTH (key); + key_size = min (CRYPT_KEY_SIZE, XSTRING_LENGTH (key)) raw_key = alloca (CRYPT_KEY_SIZE + 1); memcpy (raw_key, XSTRING_DATA (key), key_size); memset (raw_key + key_size, 0, (CRYPT_KEY_SIZE + 1) - key_size); - (void) ecb_crypt (raw_key, encrypted_string, rounded_size, - DES_ENCRYPT | DES_SW); + ecb_crypt (raw_key, encrypted_string, rounded_size, + DES_ENCRYPT | DES_SW); return make_string (encrypted_string, rounded_size); } @@ -3986,21 +3983,17 @@ memcpy (decrypted_string, XSTRING_DATA (string), string_size); decrypted_string[string_size - 1] = '\0'; - if (XSTRING_LENGTH (key) > CRYPT_KEY_SIZE) - key_size = CRYPT_KEY_SIZE; - else - key_size = XSTRING_LENGTH (key); + key_size = min (CRYPT_KEY_SIZE, XSTRING_LENGTH (key)) raw_key = alloca (CRYPT_KEY_SIZE + 1); memcpy (raw_key, XSTRING_DATA (key), key_size); memset (raw_key + key_size, 0, (CRYPT_KEY_SIZE + 1) - key_size); - (void) ecb_crypt (raw_key, decrypted_string, string_size, - DES_DECRYPT | DES_SW); + ecb_crypt (raw_key, decrypted_string, string_size, D | DES_SW); return make_string (decrypted_string, string_size - 1); } -#endif +#endif /* 0 */ DEFUN ("verify-visited-file-modtime", Fverify_visited_file_modtime, 1, 1, 0, /* @@ -4722,7 +4715,7 @@ DEFVAR_LISP ("write-region-annotate-functions", &Vwrite_region_annotate_functions /* A list of functions to be called at the start of `write-region'. -Each is passed two arguments, START and END as for `write-region'. +Each is passed two arguments, START and END, as for `write-region'. It should return a list of pairs (POSITION . STRING) of strings to be effectively inserted at the specified positions of the file being written \(1 means to insert before the first byte written). The POSITIONs must be
--- a/src/frame-x.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/frame-x.c Mon Aug 13 09:54:23 2007 +0200 @@ -1183,20 +1183,20 @@ struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; - Type = DndDataType (event); - if (Type < 0) /* pseudo event produces -1 as type */ + if (!DndIsDropMessage(event)) /* the better way */ { - stderr_out("DndDropHandler: pseudo drop received\n"); + stderr_out("DndDropHandler: pseudo drop received (ignore me!)\n"); return; } - + + Type = DndDataType (event); DndGetData (&Data, &Size); GCPRO4 (path, frame, dnd_data, dnd_type); frame = make_frame ((struct frame *) data); - stderr_out("DndDropHandler: real drop received (T%d Sl%d)\n",Type,Size); + stderr_out("DndDropHandler: valid drop received (T%d S%u)\n",Type,Size); switch (Type) { @@ -1238,6 +1238,75 @@ UNGCPRO; return; } + +DEFUN ("offix-start-drag-internal", Foffix_start_drag_internal, 2, 3, 0, /* +First arg is the event that started the drag, +second arg should be some string. +Start a OffiX drag from a buffer. +For now this will only drag as DndText. +This fun is heavily stolen from the CDE Dnd stuff. +*/ + (event, data, dtyp)) +{ + if (EVENTP(event) && STRINGP (data)) + { + struct frame *f = decode_x_frame (Fselected_frame (Qnil)); + XEvent x_event; + Widget wid = FRAME_X_TEXT_WIDGET (f); + Display *display = XtDisplayOfObject (wid); + Window root_window, child_window; + int root_x, root_y, win_x, win_y; + unsigned int keys_and_buttons; + char *dnd_data; + unsigned long dnd_len; + int dnd_typ; + struct Lisp_Event *lisp_event = XEVENT(event); + + /* only drag if this is really a press */ + if (EVENT_TYPE(lisp_event) != button_press_event) + return Qnil; + + /* and whats with MULE data ??? */ + dnd_data = XSTRING_DATA (data); + dnd_len = XSTRING_LENGTH (data) + 1; /* the f*cking zero */ + + /* set the type */ + if (!NILP (dtyp) && INTP (dtyp)) + dnd_typ = XINT (dtyp); + else + dnd_typ = DndText; /* the default */ + + /* + * Eek - XEmacs doesn't keep the old X event around so we have to + * build a dummy event. This is a truly gross hack. (from CDE) + * + * Perhaps there is some way to hand back the lisp event object? + * Best way: hand through x-event in all Lisp_Events + */ + + x_event.xbutton.type = ButtonPress; + x_event.xbutton.send_event = False; + x_event.xbutton.display = XtDisplayOfObject(wid); + x_event.xbutton.window = XtWindowOfObject(wid); + x_event.xbutton.root = XRootWindow(x_event.xkey.display, 0); + x_event.xbutton.subwindow = 0; + x_event.xbutton.time = lisp_event->timestamp; + x_event.xbutton.x = lisp_event->event.button.x; + x_event.xbutton.y = lisp_event->event.button.y; + x_event.xbutton.x_root = lisp_event->event.button.x; /* this is wrong */ + x_event.xbutton.y_root = lisp_event->event.button.y; + x_event.xbutton.state = 0; /* calc state from modifier */ + x_event.xbutton.button = lisp_event->event.button.button; + x_event.xkey.same_screen = True; + + DndSetData(dnd_typ, dnd_data, dnd_len); + + if (DndHandleDragging(wid, &x_event)) + return Qt; + } + return Qnil; +} + #endif /* HAVE_OFFIX_DND */ @@ -2537,6 +2606,9 @@ #ifdef HAVE_CDE DEFSUBR (Fcde_start_drag_internal); #endif +#ifdef HAVE_OFFIX_DND + DEFSUBR (Foffix_start_drag_internal); +#endif } void
--- a/src/frame.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/frame.c Mon Aug 13 09:54:23 2007 +0200 @@ -2989,6 +2989,10 @@ Fprovide (intern ("cde")); #endif +#ifdef HAVE_OFFIX_DND + Fprovide (intern ("offix")); +#endif + #if 0 /* FSFmacs stupidity */ xxDEFVAR_LISP ("emacs-iconified", &Vemacs_iconified /* Non-nil if all of emacs is iconified and frame updates are not needed.
--- a/src/glyphs-x.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/glyphs-x.c Mon Aug 13 09:54:23 2007 +0200 @@ -1383,7 +1383,7 @@ /* Step 3: read file parameters with jpeg_read_header() */ - (void) jpeg_read_header (&cinfo, TRUE); + jpeg_read_header (&cinfo, TRUE); /* We can ignore the return value from jpeg_read_header since * (a) suspension is not possible with the stdio data source, and * (b) we passed TRUE to reject a tables-only JPEG file as an error. @@ -1418,7 +1418,7 @@ /* Step 5: Start decompressor */ - (void) jpeg_start_decompress (&cinfo); + jpeg_start_decompress (&cinfo); /* We can ignore the return value since suspension is not possible * with the stdio data source. */ @@ -1544,7 +1544,7 @@ /* Step 7: Finish decompression */ - (void) jpeg_finish_decompress (&cinfo); + jpeg_finish_decompress (&cinfo); /* We can ignore the return value since suspension is not possible * with the stdio data source. */
--- a/src/gpmevent.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/gpmevent.c Mon Aug 13 09:54:23 2007 +0200 @@ -23,10 +23,6 @@ #include <linux/keyboard.h> #endif -extern SELECT_TYPE input_wait_mask, non_fake_input_wait_mask; -extern SELECT_TYPE process_only_mask, device_only_mask; -void select_filedesc (int fd, Lisp_Object what); - int handle_gpm_read(struct Lisp_Event *event, struct console *con, int fd) { Gpm_Event ev;
--- a/src/insdel.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/insdel.c Mon Aug 13 09:54:23 2007 +0200 @@ -2678,15 +2678,12 @@ BUF_MODIFF (buf)++; MARK_BUFFERS_CHANGED; - /* Relocate point as if it were a marker. */ - if (bi_from < BI_BUF_PT (buf)) - { - if (BI_BUF_PT (buf) < bi_to) - JUST_SET_POINT (buf, from, bi_from); - else - JUST_SET_POINT (buf, BUF_PT (buf) - numdel, - BI_BUF_PT (buf) - bc_numdel); - } + /* ### Point used to be modified here, but this causes problems with MULE, + as point is used to calculate bytinds, and if the offset in bc_numdel causes + point to move to a non first-byte location, causing some other function to + throw an assertion in ASSERT_VALID_BYTIND. I've moved the code to right after + the other movements and adjustments, but before the gap is moved. + -- jh 970813 */ /* Detach any extents that are completely within the range [FROM, TO], if the extents are detachable. @@ -2707,6 +2704,16 @@ adjust_extents_for_deletion (bufobj, bi_from, bi_to, BUF_GAP_SIZE (buf), bc_numdel, BUF_GAP_SIZE (buf)); + /* Relocate point as if it were a marker. */ + if (bi_from < BI_BUF_PT (buf)) + { + if (BI_BUF_PT (buf) < bi_to) + JUST_SET_POINT (buf, from, bi_from); + else + JUST_SET_POINT (buf, BUF_PT (buf) - numdel, + BI_BUF_PT (buf) - bc_numdel); + } + SET_BUF_GAP_SIZE (buf, BUF_GAP_SIZE (buf) + bc_numdel); SET_BOTH_BUF_ZV (buf, BUF_ZV (buf) - numdel, BI_BUF_ZV (buf) - bc_numdel); SET_BOTH_BUF_Z (buf, BUF_Z (buf) - numdel, BI_BUF_Z (buf) - bc_numdel); @@ -2997,12 +3004,11 @@ bufbyte_dynarr *dyn) { Bufbyte str[MAX_EMCHAR_LEN]; - Bytecount len; int i; for (i = 0; i < nels; i++) { - len = set_charptr_emchar (str, arr[i]); + Bytecount len = set_charptr_emchar (str, arr[i]); Dynarr_add_many (dyn, str, len); } } @@ -3058,8 +3064,7 @@ if (!indirect_p) { SET_BUF_GAP_SIZE (b, 20); - (void) BUFFER_ALLOC (b->text->beg, - BUF_GAP_SIZE (b) + BUF_END_SENTINEL_SIZE); + BUFFER_ALLOC (b->text->beg, BUF_GAP_SIZE (b) + BUF_END_SENTINEL_SIZE); if (! BUF_BEG_ADDR (b)) memory_full (); @@ -3083,7 +3088,7 @@ b->text->mule_bytind_cache[i] = 1; } } -#endif +#endif /* MULE */ BUF_MODIFF (b) = 1; BUF_SAVE_MODIFF (b) = 1;
--- a/src/keymap.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/keymap.c Mon Aug 13 09:54:23 2007 +0200 @@ -690,7 +690,7 @@ Lisp_Object contents; VOID_TO_LISP (contents, hash_contents); /* Perform any autoloads, etc */ - (void) Fkeymapp (contents); + Fkeymapp (contents); } static void
--- a/src/mule-canna.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/mule-canna.c Mon Aug 13 09:54:23 2007 +0200 @@ -328,7 +328,7 @@ { extern Lisp_Object Fding(); - (void)Fding(Qnil, Qnil, Qnil); + Fding (Qnil, Qnil, Qnil); } DEFUN ("canna-initialize", Fcanna_initialize, 0, 3, 0, /*
--- a/src/mule-charset.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/mule-charset.c Mon Aug 13 09:54:23 2007 +0200 @@ -78,15 +78,13 @@ /* Table of number of bytes in the string representation of a character indexed by the first byte of that representation. - This value can be derived other ways -- e.g. something like + rep_bytes_by_first_byte(c) is more efficient than the equivalent + canonical computation: - (BYTE_ASCII_P (first_byte) ? 1 : - XCHARSET_REP_BYTES (CHARSET_BY_LEADING_BYTE (first_byte))) - - but it's faster this way. */ + (BYTE_ASCII_P (c) ? 1 : XCHARSET_REP_BYTES (CHARSET_BY_LEADING_BYTE (c))) */ Bytecount rep_bytes_by_first_byte[0xA0] = -{ /* 16 x 8 ones for ASCII */ +{ /* 0x00 - 0x7f are for straight ASCII */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -95,11 +93,11 @@ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - /* 1 x 8 for Dimension-1 official Mule charsets */ + /* 0x80 - 0x8f are for Dimension-1 official charsets */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - /* 0x90 - 0x9d are Dimension-2 official */ - /* 0x9e is Dimension-1 private */ - /* 0x9f is Dimension-2 private */ + /* 0x90 - 0x9d are for Dimension-2 official charsets */ + /* 0x9e is for Dimension-1 private charsets */ + /* 0x9f is for Dimension-2 private charsets */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4 }; @@ -112,7 +110,7 @@ Lisp_Object Qccl_program; Lisp_Object Qascii, Qcontrol_1, - + Qlatin_iso8859_1, Qlatin_iso8859_2, Qlatin_iso8859_3, @@ -122,18 +120,18 @@ Qgreek_iso8859_7, Qhebrew_iso8859_8, Qlatin_iso8859_9, - + Qthai_tis620, - + Qkatakana_jisx0201, Qlatin_jisx0201, Qjapanese_jisx0208_1978, Qjapanese_jisx0208, Qjapanese_jisx0212, - + Qchinese_gb2312, Qchinese_big5_1, Qchinese_big5_2, Qchinese_cns11643_1, Qchinese_cns11643_2, - + Qkorean_ksc5601, Qcomposite; Lisp_Object Ql2r, Qr2l; @@ -410,7 +408,7 @@ { struct Lisp_Charset *cs = XCHARSET (obj); char buf[200]; - + if (print_readably) error ("printing unreadable object #<charset %s 0x%x>", string_data (XSYMBOL (CHARSET_NAME (cs))->name), @@ -477,7 +475,7 @@ if (leading_byte < 0xA0) /* official leading byte */ rep_bytes_by_first_byte[leading_byte] = rep_bytes; - + /* Some charsets are "faux" and don't have names or really exist at all except in the leading-byte table. */ if (!NILP (name)) @@ -792,7 +790,7 @@ signal_simple_error ("Cannot redefine existing charset", new_name); cs = XCHARSET (charset); - + type = CHARSET_TYPE (cs); columns = CHARSET_COLUMNS (cs); dimension = CHARSET_DIMENSION (cs); @@ -981,7 +979,7 @@ face_property_was_changed (Vdefault_face, Qfont, Qglobal); return Qnil; } - + /************************************************************************/ /* Lisp primitives for working with characters */ @@ -1043,22 +1041,20 @@ (ch, n)) { Lisp_Object charset; - int c1, c2; + int c1, c2, int_n; CHECK_CHAR_COERCE_INT (ch); if (NILP (n)) - n = Qzero; + int_n = 0; else { CHECK_INT (n); - if (XINT (n) != 0 && XINT (n) != 1) + int_n = XINT (n); + if (int_n != 0 && int_n != 1) signal_simple_error ("Octet number must be 0 or 1", n); } BREAKUP_CHAR (XCHAR (ch), charset, c1, c2); - if (XINT (n) == 0) - return make_int (c1); - else - return make_int (c2); + return make_int (int_n == 0 ? c1 : c2); } @@ -1188,19 +1184,19 @@ defsymbol (&Qhebrew_iso8859_8, "hebrew-iso8859-8"); defsymbol (&Qlatin_iso8859_9, "latin-iso8859-9"); defsymbol (&Qthai_tis620, "thai-tis620"); - + defsymbol (&Qkatakana_jisx0201, "katakana-jisx0201"); defsymbol (&Qlatin_jisx0201, "latin-jisx0201"); defsymbol (&Qjapanese_jisx0208_1978, "japanese-jisx0208-1978"); defsymbol (&Qjapanese_jisx0208, "japanese-jisx0208"); defsymbol (&Qjapanese_jisx0212, "japanese-jisx0212"); - + defsymbol (&Qchinese_gb2312, "chinese-gb2312"); defsymbol (&Qchinese_big5_1, "chinese-big5-1"); defsymbol (&Qchinese_big5_2, "chinese-big5-2"); defsymbol (&Qchinese_cns11643_1, "chinese-cns11643-1"); defsymbol (&Qchinese_cns11643_2, "chinese-cns11643-2"); - + defsymbol (&Qkorean_ksc5601, "korean-ksc5601"); defsymbol (&Qcomposite, "composite"); } @@ -1210,19 +1206,16 @@ { int i, j, k; - for (i = 0; i < 128; i++) + /* Table of charsets indexed by leading byte. */ + for (i = 0; i < countof (charset_by_leading_byte); i++) charset_by_leading_byte[i] = Qnil; - - for (i = 0; i < 4; i++) - for (j = 0; j < 128; j++) - for (k = 0; k < 2; k ++) + + /* Table of charsets indexed by type/final-byte/direction. */ + for (i = 0; i < countof (charset_by_attributes); i++) + for (j = 0; j < countof (charset_by_attributes[0]); j++) + for (k = 0; k < countof (charset_by_attributes[0][0]); k++) charset_by_attributes[i][j][k] = Qnil; - /* Now done at compile time - for (i = 0; i < 128; i++) - rep_bytes_by_first_byte[i] = 1; - */ - next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1; next_allocated_2_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_2; } @@ -1233,7 +1226,7 @@ staticpro (&Vcharset_hashtable); Vcharset_hashtable = make_lisp_hashtable (50, HASHTABLE_NONWEAK, HASHTABLE_EQ); - + /* Predefined character sets. We store them into variables for ease of access. */ @@ -1407,19 +1400,10 @@ composite_char_col_next = 32; Vcomposite_char_string2char_hashtable = - make_lisp_hashtable (500, HASHTABLE_NONWEAK, - HASHTABLE_EQUAL); + make_lisp_hashtable (500, HASHTABLE_NONWEAK, HASHTABLE_EQUAL); Vcomposite_char_char2string_hashtable = - make_lisp_hashtable (500, HASHTABLE_NONWEAK, - HASHTABLE_EQ); + make_lisp_hashtable (500, HASHTABLE_NONWEAK, HASHTABLE_EQ); staticpro (&Vcomposite_char_string2char_hashtable); staticpro (&Vcomposite_char_char2string_hashtable); - /* Faux charsets used only for convenience in retrieving the - number of rep bytes associated with a leading byte. */ - - make_charset (Qnil, PRE_LEADING_BYTE_PRIVATE_1, 3, 0, 0, 0, 0, - 0, Qnil, Qnil); - make_charset (Qnil, PRE_LEADING_BYTE_PRIVATE_2, 4, 0, 0, 0, 0, - 0, Qnil, Qnil); }
--- a/src/mule-coding.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/mule-coding.c Mon Aug 13 09:54:23 2007 +0200 @@ -87,15 +87,15 @@ /* Which registers are currently invoked into the left (GL) and right (GR) halves of the 8-bit encoding space? */ int register_left, register_right; - + /* ISO_ESC holds a value indicating part of an escape sequence that has already been seen. */ enum iso_esc_flag esc; - + /* This records the bytes we've seen so far in an escape sequence, in case the sequence is invalid (we spit out the bytes unchanged). */ unsigned char esc_bytes[8]; - + /* Index for next byte to store in ISO escape sequence. */ int esc_bytes_index; @@ -232,7 +232,7 @@ (markobj) (CODING_SYSTEM_EOL_LF (codesys)); (markobj) (CODING_SYSTEM_EOL_CRLF (codesys)); (markobj) (CODING_SYSTEM_EOL_CR (codesys)); - + switch (CODING_SYSTEM_TYPE (codesys)) { int i; @@ -350,14 +350,14 @@ int len = string_length (XSYMBOL (CODING_SYSTEM_NAME (codesys))->name); char *codesys_name = (char *) alloca (len + 7); Lisp_Object codesys_name_sym, sub_codesys_obj; - + /* kludge */ XSETCODING_SYSTEM (codesys_obj, codesys); memcpy (codesys_name, string_data (XSYMBOL (CODING_SYSTEM_NAME (codesys))->name), len); - + #define DEFINE_SUB_CODESYS(op_sys, Type) do { \ strcpy (codesys_name + len, "-" op_sys); \ codesys_name_sym = intern (codesys_name); \ @@ -556,7 +556,7 @@ Lisp_Object result = Qnil; if (!load_here) - return Qnil; + return Qnil; for (i = 0; i < Dynarr_length (load_here); i++) { struct charset_conversion_spec *ccs = @@ -741,7 +741,7 @@ int ty; int need_to_setup_eol_systems = 1; - /* Convert type to constant */ + /* Convert type to constant */ if (NILP (type) || EQ (type, Qautomatic_conversion)) { ty = CODESYS_AUTODETECT; } else if (EQ (type, Qshift_jis)) { ty = CODESYS_SHIFT_JIS; } @@ -794,7 +794,7 @@ else if (EQ (key, Qcharset_g1)) FROB_INITIAL_CHARSET (1); else if (EQ (key, Qcharset_g2)) FROB_INITIAL_CHARSET (2); else if (EQ (key, Qcharset_g3)) FROB_INITIAL_CHARSET (3); - + #define FROB_FORCE_CHARSET(charset_num) \ CODING_SYSTEM_ISO2022_FORCE_CHARSET_ON_OUTPUT (codesys, charset_num) = !NILP (value) @@ -805,7 +805,7 @@ #define FROB_BOOLEAN_PROPERTY(prop) \ CODING_SYSTEM_ISO2022_##prop (codesys) = !NILP (value) - + else if (EQ (key, Qshort)) FROB_BOOLEAN_PROPERTY (SHORT); else if (EQ (key, Qno_ascii_eol)) FROB_BOOLEAN_PROPERTY (NO_ASCII_EOL); else if (EQ (key, Qno_ascii_cntl)) FROB_BOOLEAN_PROPERTY (NO_ASCII_CNTL); @@ -813,7 +813,7 @@ else if (EQ (key, Qlock_shift)) FROB_BOOLEAN_PROPERTY (LOCK_SHIFT); else if (EQ (key, Qno_iso6429)) FROB_BOOLEAN_PROPERTY (NO_ISO6429); else if (EQ (key, Qescape_quoted)) FROB_BOOLEAN_PROPERTY (ESCAPE_QUOTED); - + else if (EQ (key, Qinput_charset_conversion)) { codesys->iso2022.input_conv = @@ -852,7 +852,7 @@ if (need_to_setup_eol_systems) setup_eol_coding_systems (codesys); - + { Lisp_Object codesys_obj; XSETCODING_SYSTEM (codesys_obj, codesys); @@ -1028,7 +1028,7 @@ #define INITIAL_CHARSET(charset_num) \ (XCHARSET_NAME (XCODING_SYSTEM_ISO2022_INITIAL_CHARSET \ (coding_system, charset_num))) - + if (EQ (prop, Qcharset_g0)) return INITIAL_CHARSET (0); else if (EQ (prop, Qcharset_g1)) return INITIAL_CHARSET (1); else if (EQ (prop, Qcharset_g2)) return INITIAL_CHARSET (2); @@ -1045,7 +1045,7 @@ #define LISP_BOOLEAN(prop) \ (XCODING_SYSTEM_ISO2022_##prop (coding_system) ? Qt : Qnil) - + else if (EQ (prop, Qshort)) return LISP_BOOLEAN (SHORT); else if (EQ (prop, Qno_ascii_eol)) return LISP_BOOLEAN (NO_ASCII_EOL); else if (EQ (prop, Qno_ascii_cntl)) return LISP_BOOLEAN (NO_ASCII_CNTL); @@ -1053,7 +1053,7 @@ else if (EQ (prop, Qlock_shift)) return LISP_BOOLEAN (LOCK_SHIFT); else if (EQ (prop, Qno_iso6429)) return LISP_BOOLEAN (NO_ISO6429); else if (EQ (prop, Qescape_quoted)) return LISP_BOOLEAN (ESCAPE_QUOTED); - + else if (EQ (prop, Qinput_charset_conversion)) return unparse_charset_conversion_specs @@ -1210,21 +1210,21 @@ enum eol_type eol_type; int seen_non_ascii; int mask; - + struct { int mask; int in_second_byte; } big5; - + struct { int mask; int in_second_byte; } shift_jis; - + struct { int mask; @@ -1312,7 +1312,7 @@ st->mask holds the determined coding category mask, or ~0 if only ASCII has been seen so far. - + Returns: 0 == st->eol_type is EOL_AUTODETECT and/or more than coding category @@ -1331,7 +1331,7 @@ if (just_do_eol) return st->eol_type != EOL_AUTODETECT; - + if (!st->seen_non_ascii) { for (; n; n--, src++) @@ -1397,7 +1397,7 @@ int cat = -1; mask = postprocess_iso2022_mask (mask); - + /* Look through the coding categories by priority and find the first one that is allowed. */ for (i = 0; i <= CODING_CATEGORY_LAST; i++) @@ -1435,7 +1435,7 @@ memset (&decst, 0, sizeof (decst)); decst.eol_type = *eol_type_in_out; decst.mask = ~0; - + /* If autodetection is called for, do it now. */ if (XCODING_SYSTEM_TYPE (*codesys_in_out) == CODESYS_AUTODETECT || *eol_type_in_out == EOL_AUTODETECT) @@ -1445,7 +1445,7 @@ { unsigned char random_buffer[4096]; int nread; - + nread = Lstream_read (stream, random_buffer, sizeof (random_buffer)); if (!nread) break; @@ -1494,7 +1494,7 @@ { unsigned char random_buffer[4096]; int nread; - + nread = Lstream_read (XLSTREAM (instream), random_buffer, sizeof (random_buffer)); if (!nread) @@ -1509,11 +1509,11 @@ else { int i; - + val = Qnil; decst.mask = postprocess_iso2022_mask (decst.mask); - + for (i = CODING_CATEGORY_LAST; i >= 0; i--) { int sys = coding_category_by_priority[i]; @@ -1645,7 +1645,7 @@ /* Additional ISO2022 information. We define the structure above because it's also needed by the detection routines. */ struct iso2022_decoder iso2022; - + /* Additional information (the state of the running CCL program) used by the CCL decoder. */ struct ccl_program ccl; @@ -1782,7 +1782,7 @@ set_ccl_program (&str->ccl, CODING_SYSTEM_CCL_DECODE (str->codesys), 0, 0, 0); } - + str->flags = str->ch = 0; } @@ -1906,7 +1906,7 @@ we're a writing stream or a non-seekable reading stream, meaning that we can't just process the whole input, rewind, and start over. */ - + if (CODING_SYSTEM_TYPE (str->codesys) == CODESYS_AUTODETECT || str->eol_type == EOL_AUTODETECT) { @@ -1933,7 +1933,7 @@ str->flags |= CODING_STATE_END; } } - + switch (CODING_SYSTEM_TYPE (str->codesys)) { #ifdef DEBUG_XEMACS @@ -2017,7 +2017,7 @@ Lstream *in = XLSTREAM(instream); Lstream *out = XLSTREAM(outstream); Bufpos newpos, even_newer_pos; - + while (1) { Bufpos oldpos = lisp_buffer_stream_startpos (in); @@ -2246,7 +2246,7 @@ default: break; } - + str->flags = str->ch = 0; } @@ -2548,7 +2548,7 @@ while (n--) { c = *src++; - + if (ch) { /* Previous character was first byte of Shift-JIS Kanji char. */ @@ -2655,7 +2655,7 @@ (code)) { unsigned char c1, c2, s1, s2; - + CHECK_CONS (code); CHECK_INT (XCAR (code)); CHECK_INT (XCDR (code)); @@ -2680,7 +2680,7 @@ { Lisp_Object charset; int c1, c2, s1, s2; - + CHECK_CHAR_COERCE_INT (ch); BREAKUP_CHAR (XCHAR (ch), charset, c1, c2); if (EQ (charset, Vcharset_japanese_jisx0208)) @@ -2865,7 +2865,7 @@ } label_continue_loop:; } - + DECODE_HANDLE_END_OF_CONVERSION (flags, ch, dst); CODING_STREAM_COMPOSE (str, flags, ch); @@ -2889,7 +2889,7 @@ { c = *src++; if (c == '\n') - { + { if (eol_type != EOL_LF && eol_type != EOL_AUTODETECT) Dynarr_add (dst, '\r'); if (eol_type != EOL_CR) @@ -2943,7 +2943,7 @@ (code)) { unsigned char c1, c2, b1, b2; - + CHECK_CONS (code); CHECK_INT (XCAR (code)); CHECK_INT (XCDR (code)); @@ -2970,7 +2970,7 @@ { Lisp_Object charset; int c1, c2, b1, b2; - + CHECK_CHAR_COERCE_INT (ch); BREAKUP_CHAR (XCHAR (ch), charset, c1, c2); if (EQ (charset, Vcharset_chinese_big5_1) || @@ -3128,7 +3128,7 @@ o CSI '2' ']' -- start of right-to-left text The control character CSI (0x9B: control sequence introducer) is abbreviated to the escape sequence ESC '[' in 7-bit environment. - + Character composition specification takes the following format: o ESC '0' -- start character composition o ESC '1' -- end character composition @@ -3139,7 +3139,7 @@ reset_iso2022 (Lisp_Object coding_system, struct iso2022_decoder *iso) { int i; - + for (i = 0; i < 4; i++) { if (!NILP (coding_system)) @@ -3232,7 +3232,7 @@ *flags |= CODING_STATE_ESCAPE; iso->esc = ISO_ESC; goto not_done; - + case ISO_CODE_CSI: /* ISO6429 (specifying directionality) */ *flags |= CODING_STATE_ESCAPE; iso->esc = ISO_ESC_5_11; @@ -3293,7 +3293,7 @@ *flags = (*flags & CODING_STATE_ISO2022_LOCK) | CODING_STATE_COMPOSITE; return 1; - + case '1': iso->esc = ISO_ESC_END_COMPOSITE; *flags = (*flags & CODING_STATE_ISO2022_LOCK) & @@ -3458,7 +3458,7 @@ /* Can this ever be reached? -slb */ abort(); } - + cs = CHARSET_BY_ATTRIBUTES (type, c, *flags & CODING_STATE_R2L ? CHARSET_RIGHT_TO_LEFT : @@ -3785,7 +3785,7 @@ Dynarr_add_many (dst, comstr, len); break; } - + case ISO_ESC_LITERAL: DECODE_ADD_BINARY_CHAR (c, dst); break; @@ -3895,7 +3895,7 @@ (!(flags & CODING_STATE_R2L) && XCHARSET_DIRECTION (charset) == CHARSET_RIGHT_TO_LEFT)) { - Lisp_Object new_charset = + Lisp_Object new_charset = XCHARSET_REVERSE_DIRECTION_CHARSET (charset); if (!NILP (new_charset)) charset = new_charset; @@ -3908,13 +3908,13 @@ DECODE_OUTPUT_PARTIAL_CHAR (ch); Dynarr_add (dst, c & 0x7F); break; - + case 2: /* one-byte official */ DECODE_OUTPUT_PARTIAL_CHAR (ch); Dynarr_add (dst, lb); Dynarr_add (dst, c | 0x80); break; - + case 3: /* one-byte private or two-byte official */ if (XCHARSET_PRIVATE_P (charset)) { @@ -3936,7 +3936,7 @@ ch = c; } break; - + default: /* two-byte private */ if (ch) { @@ -3999,7 +3999,7 @@ if (dyn) { int i; - + for (i = 0; i < Dynarr_length (dyn); i++) { struct charset_conversion_spec *spec = Dynarr_atp (dyn, i); @@ -4138,8 +4138,7 @@ { /* Processing Leading Byte */ ch = 0; charset = CHARSET_BY_LEADING_BYTE (c); - if (c == PRE_LEADING_BYTE_PRIVATE_1 || - c == PRE_LEADING_BYTE_PRIVATE_2) + if (LEADING_BYTE_PREFIX_P(c)) ch = c; else if (!EQ (charset, Vcharset_control_1) && !EQ (charset, Vcharset_composite)) @@ -4338,7 +4337,7 @@ iso2022_designate (initial_charset, i, str, dst); } } - + CODING_STREAM_COMPOSE (str, flags, ch); str->iso2022.current_char_boundary = char_boundary; str->iso2022.current_charset = charset; @@ -4370,7 +4369,7 @@ while (n--) { c = *src++; - + DECODE_HANDLE_EOL_TYPE (eol_type, c, flags, dst); DECODE_ADD_BINARY_CHAR (c, dst); label_continue_loop:; @@ -4450,7 +4449,7 @@ ((NILP (Vpathname_coding_system) || \ (EQ ((Vpathname_coding_system), Qbinary))) ? \ Qnil : Fget_coding_system (Vpathname_coding_system)) - + /* #### not correct for all values of `fmt'! */ #define FMT_CODING_SYSTEM(fmt) \ (((fmt) == FORMAT_FILENAME) ? PATHNAME_CODING_SYSTEM : \ @@ -4472,7 +4471,7 @@ Dynarr_reset (conversion_out_dynarr); if (NILP (coding_system)) - { + { CONST Bufbyte *end = ptr + len; for (; ptr < end;) @@ -4486,7 +4485,7 @@ Dynarr_add (conversion_out_dynarr, (Extbyte) c); INC_CHARPTR (ptr); } - + #ifdef ERROR_CHECK_BUFPOS assert (ptr == end); #endif @@ -4528,7 +4527,7 @@ enum external_data_format fmt) { Lisp_Object coding_system = FMT_CODING_SYSTEM (fmt); - + if (!conversion_in_dynarr) conversion_in_dynarr = Dynarr_new (Bufbyte); else @@ -4551,7 +4550,7 @@ ((unsigned_char_dynarr *) conversion_in_dynarr); struct gcpro gcpro1, gcpro2; char tempbuf[1024]; /* some random amount */ - + outstream = make_decoding_output_stream (XLSTREAM (outstream), coding_system); GCPRO2 (instream, outstream); /* Necessary?? */ @@ -4603,7 +4602,7 @@ DEFSUBR (Fcoding_priority_list); DEFSUBR (Fset_coding_category_system); DEFSUBR (Fcoding_category_system); - + DEFSUBR (Fdetect_coding_region); DEFSUBR (Fdecode_coding_region); DEFSUBR (Fencode_coding_region); @@ -4704,7 +4703,7 @@ coding_category_system[i] = Qnil; coding_category_by_priority[i] = i; } - + DEFVAR_LISP ("keyboard-coding-system", &Vkeyboard_coding_system /* Coding system used for TTY keyboard input. Not used under a windowing system.
--- a/src/objects.h Mon Aug 13 09:53:23 2007 +0200 +++ b/src/objects.h Mon Aug 13 09:54:23 2007 +0200 @@ -179,7 +179,7 @@ unsigned short descent; unsigned short width; unsigned short height; - char proportional_p; + int proportional_p; /* console-type-specific data */ void *data;
--- a/src/print.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/print.c Mon Aug 13 09:54:23 2007 +0200 @@ -877,7 +877,7 @@ { char buf[200]; sprintf (buf, "#<INTERNAL OBJECT (XEmacs bug?) (%s) 0x%p>", - XRECORD_LHEADER (obj)->implementation->name, + XRECORD_LHEADER (obj)->implementation->name, (void *) XPNTR (obj)); write_c_string (buf, printcharfun); } @@ -1440,7 +1440,7 @@ { file = Fexpand_file_name (file, Qnil); termscript = fopen ((char *) XSTRING_DATA (file), "w"); - if (termscript == 0) + if (termscript == NULL) report_file_error ("Opening termscript", Fcons (file, Qnil)); } return Qnil;
--- a/src/pure.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/pure.c Mon Aug 13 09:54:23 2007 +0200 @@ -23,12 +23,12 @@ /* Moved from puresize.h to here so alloc.c does not get recompiled */ -/* Current build process on NT does not generate a puresize_adjust.h */ -/* file. --marcpa */ +/* Current build process on NT does not generate a puresize-adjust.h */ +/* file. --marcpa */ #ifdef WINDOWSNT # define PURESIZE_ADJUSTMENT 1000000 #else -# include <puresize_adjust.h> +# include <puresize-adjust.h> #endif #define PURESIZE ((RAW_PURESIZE) + (PURESIZE_ADJUSTMENT))
--- a/src/redisplay-x.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/redisplay-x.c Mon Aug 13 09:54:23 2007 +0200 @@ -93,7 +93,7 @@ /* Note: We do not use the Xmb*() functions and XFontSets. Those functions are generally losing for a number of reasons: - + 1) They only support one locale (e.g. you could display Japanese and ASCII text, but not mixed Japanese/Chinese text). You could maybe call setlocale() frequently @@ -169,7 +169,7 @@ run_storage[runs_so_far].ptr = text_storage; run_storage[runs_so_far].charset = charset; run_storage[runs_so_far].dimension = dimension; - + if (runs_so_far) { run_storage[runs_so_far - 1].len = @@ -267,7 +267,7 @@ (struct textual_run *) alloca (len * sizeof (struct textual_run)); int nruns; int i; - + nruns = separate_textual_runs (text_storage, runs, str, len); for (i = 0; i < nruns; i++) @@ -448,7 +448,7 @@ if (rb->type == RUNE_BLANK) x_output_blank (w, dl, rb, start_pixpos, cursor_start, cursor_width); - else + else { /* #### Our flagging of when we need to redraw the modeline shadows sucks. Since RUNE_HLINE is only used @@ -490,7 +490,7 @@ XIMAGE_INSTANCE_TEXT_STRING (instance); convert_bufbyte_string_into_emchar_dynarr (XSTRING_DATA (string), XSTRING_LENGTH (string), buf); - + x_output_string (w, dl, buf, xpos, rb->object.dglyph.xoffset, start_pixpos, -1, findex, @@ -511,7 +511,7 @@ case IMAGE_POINTER: abort (); - + case IMAGE_SUBWINDOW: /* #### implement me */ break; @@ -519,7 +519,7 @@ case IMAGE_NOTHING: /* nothing is as nothing does */ break; - + default: abort (); } @@ -791,7 +791,7 @@ Window x_win = XtWindow (FRAME_X_TEXT_WIDGET (f)); int clip_end; - + /* Cursor-related variables */ int focus = EQ (w->frame, DEVICE_FRAME_WITH_FOCUS_REAL (d)); int cursor_clip; @@ -812,13 +812,13 @@ XSETDEVICE (device, d); XSETWINDOW (window, w); - + if (width < 0) width = x_text_width (cachel, Dynarr_atp (buf, 0), Dynarr_length (buf)); height = dl->ascent + dl->descent - dl->clip; /* Regularize the variables passed in. */ - + if (clip_start < xpos) clip_start = xpos; clip_end = xpos + width; @@ -827,7 +827,7 @@ return; xpos -= xoffset; - + nruns = separate_textual_runs (text_storage, runs, Dynarr_atp (buf, 0), Dynarr_length (buf)); @@ -852,7 +852,7 @@ become invalid. */ cachel = WINDOW_FACE_CACHEL (w, findex); } - + #ifdef HAVE_XIM if (cursor && focus && (cursor_start == clip_start) && cursor_height) XIM_SetSpotLocation (f, xpos - 2, dl->ypos + dl->descent - 2); @@ -874,7 +874,7 @@ XFillRectangle (dpy, x_win, bgc, clip_start, dl->ypos - dl->ascent, clip_end - clip_start, height); - + for (i = 0; i < nruns; i++) { Lisp_Object font = FACE_CACHEL_FONT (cachel, runs[i].charset); @@ -897,30 +897,30 @@ { int clear_start = max (xpos, clip_start); int clear_end = min (xpos + this_width, clip_end); - + if (cursor) { int ypos1_line, ypos1_string, ypos2_line, ypos2_string; - + ypos1_string = dl->ypos - fi->ascent; ypos2_string = dl->ypos + fi->descent; ypos1_line = dl->ypos - dl->ascent; ypos2_line = dl->ypos + dl->descent - dl->clip; - + /* Make sure we don't clear below the real bottom of the line. */ if (ypos1_string > ypos2_line) ypos1_string = ypos2_line; if (ypos2_string > ypos2_line) ypos2_string = ypos2_line; - + if (ypos1_line < ypos1_string) { x_clear_region (window, findex, clear_start, ypos1_line, clear_end - clear_start, ypos1_string - ypos1_line); } - + if (ypos2_line > ypos2_string) { x_clear_region (window, findex, clear_start, ypos2_string, @@ -946,12 +946,12 @@ if (need_clipping) { XRectangle clip_box[1]; - + clip_box[0].x = 0; clip_box[0].y = 0; clip_box[0].width = clip_end - clip_start; clip_box[0].height = height; - + XSetClipRectangles (dpy, gc, clip_start, dl->ypos - dl->ascent, clip_box, 1, Unsorted); } @@ -971,18 +971,18 @@ { unsigned long upos, uthick; XFontStruct *xfont; - + xfont = FONT_INSTANCE_X_FONT (XFONT_INSTANCE (font)); if (!XGetFontProperty (xfont, XA_UNDERLINE_POSITION, &upos)) upos = 0; if (!XGetFontProperty (xfont, XA_UNDERLINE_THICKNESS, &uthick)) uthick = 1; - + if (dl->ypos + upos < dl->ypos + dl->descent - dl->clip) { if (dl->ypos + upos + uthick > dl->ypos + dl->descent - dl->clip) uthick = dl->descent - dl->clip - upos; - + if (uthick == 1) { XDrawLine (dpy, x_win, gc, xpos, dl->ypos + upos, @@ -995,28 +995,28 @@ } } } - + if (cachel->strikethru) { unsigned long ascent,descent,upos, uthick; XFontStruct *xfont; - + xfont = FONT_INSTANCE_X_FONT (XFONT_INSTANCE (font)); - + if (!XGetFontProperty (xfont, XA_STRIKEOUT_ASCENT, &ascent)) ascent = xfont->ascent; if (!XGetFontProperty (xfont, XA_STRIKEOUT_DESCENT, &descent)) descent = xfont->descent; if (!XGetFontProperty (xfont, XA_UNDERLINE_THICKNESS, &uthick)) uthick = 1; - + upos = ascent - ((ascent + descent) / 2) + 1; - + /* Generally, upos will be positive (above the baseline),so subtract */ if (dl->ypos - upos < dl->ypos + dl->descent - dl->clip) { if (dl->ypos - upos + uthick > dl->ypos + dl->descent - dl->clip) uthick = dl->descent - dl->clip + upos; - + if (uthick == 1) { XDrawLine (dpy, x_win, gc, xpos, dl->ypos - upos, @@ -1029,39 +1029,39 @@ } } } - + /* Restore the GC */ if (need_clipping) { XSetClipMask (dpy, gc, None); XSetClipOrigin (dpy, gc, 0, 0); } - + /* If we are actually superimposing the cursor then redraw with just the appropriate section highlighted. */ if (cursor_clip && !cursor && focus && cursor_cachel) { GC cgc; XRectangle clip_box[1]; - + cgc = x_get_gc (d, font, cursor_cachel->foreground, cursor_cachel->background, Qnil, Qnil); - + clip_box[0].x = 0; clip_box[0].y = 0; clip_box[0].width = cursor_width; clip_box[0].height = height; - + XSetClipRectangles (dpy, cgc, cursor_start, dl->ypos - dl->ascent, clip_box, 1, Unsorted); - + if (runs[i].dimension == 1) XDrawImageString (dpy, x_win, cgc, xpos, dl->ypos, (char *) runs[i].ptr, runs[i].len); else XDrawImageString16 (dpy, x_win, cgc, xpos, dl->ypos, (XChar2b *) runs[i].ptr, runs[i].len); - + XSetClipMask (dpy, cgc, None); XSetClipOrigin (dpy, cgc, 0, 0); } @@ -1098,7 +1098,7 @@ span two characters instead of overlaying just one. */ int bogusly_obtained_ascent_value = XFONT_INSTANCE (FACE_CACHEL_FONT (cachel, runs[0].charset))->ascent; - + if (!NILP (bar_cursor_value)) { gc = x_get_gc (d, Qnil, cursor_cachel->background, Qnil, Qnil, @@ -1109,7 +1109,7 @@ gc = x_get_gc (d, Qnil, cursor_cachel->background, Qnil, Qnil, Qnil); } - + tmp_y = dl->ypos - bogusly_obtained_ascent_value; tmp_height = cursor_height; if (tmp_y + tmp_height > (int) (dl->ypos - dl->ascent + height)) @@ -1119,7 +1119,7 @@ tmp_y = dl->ypos - dl->ascent; tmp_height = dl->ypos - dl->ascent + height - tmp_y; } - + if (need_clipping) { XRectangle clip_box[1]; @@ -1184,11 +1184,11 @@ GCClipYOrigin); /* Can't set a clip rectangle below because we already have a mask. We could conceivably create a new clipmask by zeroing out - everything outside the clip region. Is it worth it? + everything outside the clip region. Is it worth it? Is it possible to get an equivalent effect by changing the args to XCopyArea below rather than messing with a clip box? - dkindred@cs.cmu.edu */ - need_clipping = 0; + need_clipping = 0; } gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, pixmap_mask); @@ -1856,7 +1856,7 @@ they are in the exposed region. */ orig_windows_structure_changed = f->windows_structure_changed; f->windows_structure_changed = 1; - } + } if (window_needs_vertical_divider (w)) { @@ -2069,7 +2069,7 @@ GC gc; face_index elt = get_builtin_face_cache_index (w, Vtext_cursor_face); struct face_cachel *cursor_cachel = WINDOW_FACE_CACHEL (w, elt); - + int focus = EQ (w->frame, DEVICE_FRAME_WITH_FOCUS_REAL (d)); Lisp_Object bar_cursor_value = symbol_value_in_buffer (Qbar_cursor, WINDOW_BUFFER (w)); @@ -2080,7 +2080,7 @@ int height = dl->ascent + dl->descent - dl->clip; int cursor_height, cursor_y; int defheight, defascent; - + XClearArea (dpy, x_win, x, y, width, height, False); if (NILP (w->text_cursor_visible_p)) @@ -2094,18 +2094,18 @@ XSETWINDOW (window, w); default_face_font_info (window, &defascent, 0, &defheight, 0, 0); } - + /* make sure the cursor is entirely contained between y and y+height */ cursor_height = min (defheight, height); - cursor_y = max (y, min (y + height - cursor_height, + cursor_y = max (y, min (y + height - cursor_height, dl->ypos - defascent)); - + if (focus) { #ifdef HAVE_XIM XIM_SetSpotLocation (f, x - 2 , cursor_y + cursor_height - 2); #endif /* HAVE_XIM */ - + if (NILP (bar_cursor_value)) { XFillRectangle (dpy, x_win, gc, x, cursor_y, width, cursor_height); @@ -2207,7 +2207,7 @@ XtSetArg (al [0], XtNwidth, &width); XtSetArg (al [1], XtNheight, &height); XtGetValues (shell, al, 2); - + XSETFRAME (frame, f); tmp_pixel = FACE_FOREGROUND (Vdefault_face, frame); @@ -2235,7 +2235,7 @@ tv.tv_sec = usecs / 1000000L; tv.tv_usec = usecs % 1000000L; /* I'm sure someone is going to complain about this... */ - (void) select (0, 0, 0, 0, &tv); + select (0, 0, 0, 0, &tv); } #endif /* !HAVE_POLL */
--- a/src/redisplay.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/redisplay.c Mon Aug 13 09:54:23 2007 +0200 @@ -115,7 +115,7 @@ face_index last_findex; /* The face index of the previous character. Needed to ensure the validity of the last_charset optimization. */ - + int last_char_width; /* The width of the previous character. */ int font_is_bogus; /* If true, it means we couldn't instantiate the font for this charset, so we substitute @@ -195,7 +195,7 @@ struct prop_block { enum prop_type type; - + union data { struct @@ -203,14 +203,14 @@ Bufbyte *str; Bytecount len; /* length of the string. */ } p_string; - + struct { Emchar ch; Bytind bi_cursor_bufpos; /* NOTE: is in Bytinds */ unsigned int cursor_type :3; } p_char; - + struct { int width; @@ -394,12 +394,12 @@ /* Nonzero means some frames have been marked as garbaged */ int frame_changed; -/* This variable is 1 if the icon has to be updated. +/* This variable is 1 if the icon has to be updated. It is set to 1 when `frame-icon-glyph' changes. */ int icon_changed; int icon_changed_set; -/* This variable is 1 if the menubar widget has to be updated. +/* This variable is 1 if the menubar widget has to be updated. It is set to 1 by set-menubar-dirty-flag and cleared when the widget has been indapted. */ /* indapted???? */ @@ -474,7 +474,7 @@ Think about this for 19.14. */ Lisp_Object Vpre_redisplay_hook, Vpost_redisplay_hook; Lisp_Object Qpre_redisplay_hook, Qpost_redisplay_hook; -#endif +#endif /* INHIBIT_REDISPLAY_HOOKS */ int last_display_warning_tick, display_warning_tick; Lisp_Object Qdisplay_warning_buffer; @@ -519,7 +519,7 @@ if (!rtw_emchar_dynarr) rtw_emchar_dynarr = Dynarr_new (Emchar); Dynarr_reset (rtw_emchar_dynarr); - + fixup_internal_substring (nonreloc, reloc, offset, &len); if (STRINGP (reloc)) nonreloc = XSTRING_DATA (reloc); @@ -863,7 +863,7 @@ { /* OK, we need to do things the hard way. */ struct window *w = XWINDOW (data->window); - struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, data->findex); + struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, data->findex); Lisp_Object font_instance = ensure_face_cachel_contains_charset (cachel, data->window, charset); @@ -981,7 +981,7 @@ ctl-arrow checking), etc. that create_text_block() does. The functionality to do this in that routine needs to be modularized. */ - + for (pos = c_string; pos < end;) { data->ch = charptr_emchar (pos); @@ -1049,7 +1049,7 @@ else data->blank_width -= spcwid; } - + data->start_col = 0; retval = add_hscroll_rune (data); @@ -1488,7 +1488,7 @@ } oops_no_more_space: - + data->bi_cursor_bufpos = bi_old_cursor_bufpos; data->cursor_type = old_cursor_type; if (elt < Dynarr_length (*prop)) @@ -1869,7 +1869,7 @@ Lisp_Object synch_minibuffers_value = symbol_value_in_buffer (Qsynchronize_minibuffers, w->buffer); - + dl->used_prop_data = 0; dl->num_chars = 0; @@ -2080,7 +2080,7 @@ else if (data.bi_bufpos < BI_BUF_BEGV (b)) /* #### urk urk urk! Aborts are not very fun! Fix this please! */ data.bi_bufpos = BI_BUF_BEGV (b); - else + else INC_BYTIND (b, data.bi_bufpos); } @@ -2437,7 +2437,7 @@ appear unless eob is immediately preceded by a newline. In that case the cursor should actually appear on the next line. */ - if (data.cursor_type == CURSOR_ON + if (data.cursor_type == CURSOR_ON && data.bi_cursor_bufpos >= data.bi_bufpos && (data.bi_cursor_bufpos < bi_pos || (bi_pos == BI_BUF_ZV (b) @@ -2488,7 +2488,7 @@ data.max_pixpos += data.blank_width; add_emchar_rune (&data); data.max_pixpos -= data.blank_width; - + /* #### urk! Chuck, this shit is bad news. Going around manipulating invalid positions is guaranteed to result in trouble sooner or later. */ @@ -2639,7 +2639,7 @@ struct frame *f = XFRAME (w->frame); struct device *d = XDEVICE (f->device); pos_data data; - + /* If Voverlay_arrow_string isn't valid then just fail silently. */ if (!STRINGP (Voverlay_arrow_string) && !GLYPHP (Voverlay_arrow_string)) return 0; @@ -3055,8 +3055,8 @@ elt++; } - /* Now that we now where everything goes, we add the glyphs as runes - to the appropriate display blocks. */ + /* Now that we know where everything goes, we add the glyphs as + runes to the appropriate display blocks. */ if (out_cnt || in_out_cnt || white_out_cnt) { odb = get_display_block_from_line (dl, LEFT_OUTSIDE_MARGIN); @@ -3763,7 +3763,7 @@ -- Non-printable characters should be converted into something appropriate (e.g. ^F) instead of blindly being printed anyway. */ - + tail_recurse: if (depth > 10) goto invalid; @@ -3891,8 +3891,8 @@ /* Give up right away for nil or t. */ else if (!EQ (tem, elt)) { - elt = tem; - goto tail_recurse; + elt = tem; + goto tail_recurse; } } } @@ -3924,7 +3924,7 @@ { if (!NILP (tem)) { - elt = XCAR (elt); + elt = XCAR (elt); goto tail_recurse; } } @@ -4013,7 +4013,7 @@ all the charsets */ font_inst = WINDOW_FACE_CACHEL_FONT (w, new_findex, Vcharset_ascii); - + data->dl->ascent = max (data->dl->ascent, XFONT_INSTANCE (font_inst)->ascent); data->dl->descent = max (data->dl->descent, @@ -4022,7 +4022,7 @@ } else new_findex = old_findex; - + data->findex = new_findex; pos = generate_fstring_runes (w, data, pos, pos, max_pos, XCDR (elt), depth - 1, @@ -5361,12 +5361,12 @@ caused by an Expose event generated by the visibility change being handled. */ update_frame_menubars (f); -#endif +#endif /* HAVE_MENUBARS */ #ifdef HAVE_TOOLBARS /* Update the toolbars. */ update_frame_toolbars (f); -#endif +#endif /* HAVE_TOOLBARS */ hold_frame_size_changes (); @@ -5471,7 +5471,7 @@ /* Always do the selected frame first. */ frame = DEVICE_SELECTED_FRAME (d); - + f = XFRAME (frame); if (f->icon_changed || f->windows_changed) @@ -5558,7 +5558,7 @@ profiling_redisplay_flag = XINT (val); return Qnil; } -#endif +#endif /* WINDOWSNT */ /* Ensure that all windows on all frames on all devices are displaying the current contents of their respective buffers. */ @@ -5577,7 +5577,7 @@ make_int (profiling_redisplay_flag)); profiling_redisplay_flag = 1; } -#endif +#endif /* WINDOWSNT */ if (asynch_device_change_pending) handle_asynch_device_change (); @@ -5666,14 +5666,14 @@ #ifndef INHIBIT_REDISPLAY_HOOKS run_hook_trapping_errors ("Error in pre-redisplay-hook", Qpre_redisplay_hook); -#endif +#endif /* INHIBIT_REDISPLAY_HOOKS */ redisplay_without_hooks (); #ifndef INHIBIT_REDISPLAY_HOOKS run_hook_trapping_errors ("Error in post-redisplay-hook", Qpost_redisplay_hook); -#endif +#endif /* INHIBIT_REDISPLAY_HOOKS */ } /* Inefficiently determine the line number of the line point is on and @@ -5770,7 +5770,7 @@ } } break; -#endif +#endif /* MULE */ /* print the current line number */ case 'l': @@ -5793,7 +5793,7 @@ sprintf (str, "-%d", f->order_count); } } -#endif +#endif /* HAVE_TTY */ break; /* print Narrow if appropriate */ @@ -5905,7 +5905,7 @@ botpos may be negative. */ if (botpos < toppos) botpos = toppos; - + if (botpos >= BUF_ZV (b)) { if (toppos <= BUF_BEGV (b)) @@ -6717,7 +6717,7 @@ if (-pixheight > point_line_height) /* We can't make the target line cover pixpos, so put it above pixpos. That way it will at least be visible. */ - return prev_pos; + return prev_pos; else return cur_pos; } @@ -6786,8 +6786,8 @@ /* If scroll_on_clipped_lines is false, the last "visible" line of the window covers the pixel at WINDOW_TEXT_BOTTOM (w) - 1. - If s_o_c_l is true, then we don't want to count a clipped - line, so back up from the bottom by the height of the line + If s_o_c_l is true, then we don't want to count a clipped + line, so back up from the bottom by the height of the line containing point. */ if (scroll_on_clipped_lines) pixpos -= Dynarr_atp (w->line_start_cache, cur_elt)->height; @@ -7475,7 +7475,7 @@ *w = 0; UPDATE_CACHE_RETURN; } -#endif +#endif /* HAVE_TOOLBARS */ /* We still have to return the window the pointer is next to and its relative y position even if it is outside the x boundary. */ @@ -7576,7 +7576,7 @@ else *closest = Dynarr_atp (db->runes, - Dynarr_length (db->runes) - 2)->bufpos; + Dynarr_length (db->runes) - 1)->bufpos; } if (dl->modeline) @@ -7668,7 +7668,7 @@ else *closest = dl->end_bufpos + dl->offset; really_over_nothing = 1; - } + } } else { @@ -8013,28 +8013,21 @@ static int compute_rune_dynarr_usage (rune_dynarr *dyn, struct overhead_stats *ovstats) { - int total = 0; - - if (dyn) - total += Dynarr_memory_usage (dyn, ovstats); - - return total; + return dyn ? Dynarr_memory_usage (dyn, ovstats) : 0; } static int compute_display_block_dynarr_usage (display_block_dynarr *dyn, struct overhead_stats *ovstats) { - int total = 0; - - if (dyn) - { - int i; - - total += Dynarr_memory_usage (dyn, ovstats); - for (i = 0; i < Dynarr_largest (dyn); i++) - total += compute_rune_dynarr_usage (Dynarr_at (dyn, i).runes, ovstats); - } + int total, i; + + if (!dyn) + return 0; + + total = Dynarr_memory_usage (dyn, ovstats); + for (i = 0; i < Dynarr_largest (dyn); i++) + total += compute_rune_dynarr_usage (Dynarr_at (dyn, i).runes, ovstats); return total; } @@ -8043,37 +8036,25 @@ compute_glyph_block_dynarr_usage (glyph_block_dynarr *dyn, struct overhead_stats *ovstats) { - int total = 0; - - if (dyn) - total += Dynarr_memory_usage (dyn, ovstats); - - return total; + return dyn ? Dynarr_memory_usage (dyn, ovstats) : 0; } int compute_display_line_dynarr_usage (display_line_dynarr *dyn, struct overhead_stats *ovstats) { - int total = 0; - - if (dyn) - { - int i; - - total += Dynarr_memory_usage (dyn, ovstats); - for (i = 0; i < Dynarr_largest (dyn); i++) - { - total += - compute_display_block_dynarr_usage (Dynarr_at (dyn, i). - display_blocks, ovstats); - total += - compute_glyph_block_dynarr_usage (Dynarr_at (dyn, i). - left_glyphs, ovstats); - total += - compute_glyph_block_dynarr_usage (Dynarr_at (dyn, i). - right_glyphs, ovstats); - } + int total, i; + + if (!dyn) + return 0; + + total = Dynarr_memory_usage (dyn, ovstats); + for (i = 0; i < Dynarr_largest (dyn); i++) + { + struct display_line *dl = &Dynarr_at (dyn, i); + total += compute_display_block_dynarr_usage(dl->display_blocks, ovstats); + total += compute_glyph_block_dynarr_usage (dl->left_glyphs, ovstats); + total += compute_glyph_block_dynarr_usage (dl->right_glyphs, ovstats); } return total; @@ -8083,12 +8064,7 @@ compute_line_start_cache_dynarr_usage (line_start_cache_dynarr *dyn, struct overhead_stats *ovstats) { - int total = 0; - - if (dyn) - total += Dynarr_memory_usage (dyn, ovstats); - - return total; + return dyn ? Dynarr_memory_usage (dyn, ovstats) : 0; } #endif /* MEMORY_USAGE_STATS */ @@ -8139,7 +8115,7 @@ Vinitial_window_system = Qx; return; } -#endif +#endif /* HAVE_X_WINDOWS */ /* If no window system has been specified, try to use the terminal. */ if (!isatty (0)) @@ -8165,7 +8141,7 @@ #ifndef INHIBIT_REDISPLAY_HOOKS defsymbol (&Qpre_redisplay_hook, "pre-redisplay-hook"); defsymbol (&Qpost_redisplay_hook, "post-redisplay-hook"); -#endif +#endif /* INHIBIT_REDISPLAY_HOOKS */ defsymbol (&Qdisplay_warning_buffer, "display-warning-buffer"); defsymbol (&Qbar_cursor, "bar-cursor"); defsymbol (&Qwindow_scroll_functions, "window-scroll-functions"); @@ -8189,7 +8165,7 @@ staticpro (&last_arrow_string); last_arrow_position = Qnil; last_arrow_string = Qnil; -#endif +#endif /* 0 */ updating_line_start_cache = 0; @@ -8305,7 +8281,7 @@ Functions on this hook must be careful to avoid signalling errors! */ ); Vpost_redisplay_hook = Qnil; -#endif +#endif /* INHIBIT_REDISPLAY_HOOKS */ DEFVAR_INT ("display-warning-tick", &display_warning_tick /* Bump this to tell the C code to call `display-warning-buffer' @@ -8363,9 +8339,7 @@ This is a specifier; use `set-specifier' to change it. */ ); Vleft_margin_width = Fmake_specifier (Qnatnum); - set_specifier_fallback - (Vleft_margin_width, - list1 (Fcons (Qnil, Qzero))); + set_specifier_fallback (Vleft_margin_width, list1 (Fcons (Qnil, Qzero))); set_specifier_caching (Vleft_margin_width, slot_offset (struct window, left_margin_width), some_window_value_changed, @@ -8377,9 +8351,7 @@ This is a specifier; use `set-specifier' to change it. */ ); Vright_margin_width = Fmake_specifier (Qnatnum); - set_specifier_fallback - (Vright_margin_width, - list1 (Fcons (Qnil, Qzero))); + set_specifier_fallback (Vright_margin_width, list1 (Fcons (Qnil, Qzero))); set_specifier_caching (Vright_margin_width, slot_offset (struct window, right_margin_width), some_window_value_changed, @@ -8391,11 +8363,9 @@ This is a specifier; use `set-specifier' to change it. */ ); Vminimum_line_ascent = Fmake_specifier (Qnatnum); - set_specifier_fallback (Vminimum_line_ascent, - list1 (Fcons (Qnil, Qzero))); + set_specifier_fallback (Vminimum_line_ascent, list1 (Fcons (Qnil, Qzero))); set_specifier_caching (Vminimum_line_ascent, - slot_offset (struct window, - minimum_line_ascent), + slot_offset (struct window, minimum_line_ascent), some_window_value_changed, 0, 0); @@ -8404,11 +8374,9 @@ This is a specifier; use `set-specifier' to change it. */ ); Vminimum_line_descent = Fmake_specifier (Qnatnum); - set_specifier_fallback (Vminimum_line_descent, - list1 (Fcons (Qnil, Qzero))); + set_specifier_fallback (Vminimum_line_descent, list1 (Fcons (Qnil, Qzero))); set_specifier_caching (Vminimum_line_descent, - slot_offset (struct window, - minimum_line_descent), + slot_offset (struct window, minimum_line_descent), some_window_value_changed, 0, 0); @@ -8418,11 +8386,9 @@ This is a specifier; use `set-specifier' to change it. */ ); Vuse_left_overflow = Fmake_specifier (Qboolean); - set_specifier_fallback (Vuse_left_overflow, - list1 (Fcons (Qnil, Qnil))); + set_specifier_fallback (Vuse_left_overflow, list1 (Fcons (Qnil, Qnil))); set_specifier_caching (Vuse_left_overflow, - slot_offset (struct window, - use_left_overflow), + slot_offset (struct window, use_left_overflow), some_window_value_changed, 0, 0); @@ -8432,11 +8398,9 @@ This is a specifier; use `set-specifier' to change it. */ ); Vuse_right_overflow = Fmake_specifier (Qboolean); - set_specifier_fallback (Vuse_right_overflow, - list1 (Fcons (Qnil, Qnil))); + set_specifier_fallback (Vuse_right_overflow, list1 (Fcons (Qnil, Qnil))); set_specifier_caching (Vuse_right_overflow, - slot_offset (struct window, - use_right_overflow), + slot_offset (struct window, use_right_overflow), some_window_value_changed, 0, 0); @@ -8445,11 +8409,9 @@ This is a specifier; use `set-specifier' to change it. */ ); Vtext_cursor_visible_p = Fmake_specifier (Qboolean); - set_specifier_fallback (Vtext_cursor_visible_p, - list1 (Fcons (Qnil, Qt))); + set_specifier_fallback (Vtext_cursor_visible_p, list1 (Fcons (Qnil, Qt))); set_specifier_caching (Vtext_cursor_visible_p, - slot_offset (struct window, - text_cursor_visible_p), + slot_offset (struct window, text_cursor_visible_p), text_cursor_visible_p_changed, 0, 0);
--- a/src/redisplay.h Mon Aug 13 09:53:23 2007 +0200 +++ b/src/redisplay.h Mon Aug 13 09:54:23 2007 +0200 @@ -285,7 +285,7 @@ int ascent; int descent; - char proportional_p; + int proportional_p; }; /* NOTE NOTE NOTE: Currently the positions in an extent fragment
--- a/src/regex.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/regex.c Mon Aug 13 09:54:23 2007 +0200 @@ -164,7 +164,7 @@ /* This must be nonzero for the wordchar and notwordchar pattern commands in re_match_2. */ -#ifndef Sword +#ifndef Sword #define Sword 1 #endif @@ -292,8 +292,8 @@ use `alloca' instead of `malloc'. This is because using malloc in re_search* or re_match* could cause memory leaks when C-g is used in Emacs; also, malloc is slower and causes storage fragmentation. On - the other hand, malloc is more portable, and easier to debug. - + the other hand, malloc is more portable, and easier to debug. + Because we sometimes use alloca, some routines have to be macros, not functions -- `alloca'-allocated space disappears at the end of the function it is called in. */ @@ -319,7 +319,7 @@ #ifndef _AIX /* Already did AIX, up at the top. */ char *alloca (); #endif /* not _AIX */ -#endif /* not HAVE_ALLOCA_H */ +#endif /* not HAVE_ALLOCA_H */ #endif /* not __GNUC__ */ #endif /* not alloca */ @@ -459,9 +459,9 @@ /* Analogously, for end of buffer/string. */ endbuf, - + /* Followed by two byte relative address to which to jump. */ - jump, + jump, /* Same as jump, but marks the end of an alternative. */ jump_past_alt, @@ -469,11 +469,11 @@ /* Followed by two-byte relative address of place to resume at in case of failure. */ on_failure_jump, - + /* Like on_failure_jump, but pushes a placeholder instead of the current string position when executed. */ on_failure_keep_string_jump, - + /* Throw away latest failure point and then jump to following two-byte relative address. */ pop_failure_jump, @@ -551,7 +551,7 @@ ,categoryspec, /* Matches entries in the character category tables */ notcategoryspec /* The opposite of the above */ #endif - + } re_opcode_t; /* Common operations on the compiled pattern. */ @@ -587,7 +587,7 @@ static void extract_number (int *dest, unsigned char *source) { - int temp = SIGN_EXTEND_CHAR (*(source + 1)); + int temp = SIGN_EXTEND_CHAR (*(source + 1)); *dest = *source & 0377; *dest += temp << 8; } @@ -611,7 +611,7 @@ #ifdef DEBUG static void extract_number_and_incr (int *destination, unsigned char **source) -{ +{ extract_number (destination, *source); *source += 2; } @@ -660,8 +660,8 @@ print_fastmap (char *fastmap) { unsigned was_a_range = 0; - unsigned i = 0; - + unsigned i = 0; + while (i < (1 << BYTEWIDTH)) { if (fastmap[i++]) @@ -680,7 +680,7 @@ } } } - putchar ('\n'); + putchar ('\n'); } @@ -699,7 +699,7 @@ printf ("(null)\n"); return; } - + /* Loop over pattern commands. */ while (p < pend) { @@ -748,7 +748,7 @@ printf ("/charset [%s", (re_opcode_t) *(p - 1) == charset_not ? "^" : ""); - + assert (p + *p < pend); for (c = 0; c < 256; c++) @@ -767,7 +767,7 @@ putchar (last); in_range = 0; } - + if (! in_range) putchar (c); @@ -844,7 +844,7 @@ case push_dummy_failure: printf ("/push_dummy_failure"); break; - + case maybe_pop_jump: extract_number_and_incr (&mcnt, &p); printf ("/maybe_pop_jump to %d", p + mcnt - start); @@ -853,36 +853,36 @@ case pop_failure_jump: extract_number_and_incr (&mcnt, &p); printf ("/pop_failure_jump to %d", p + mcnt - start); - break; - + break; + case jump_past_alt: extract_number_and_incr (&mcnt, &p); printf ("/jump_past_alt to %d", p + mcnt - start); - break; - + break; + case jump: extract_number_and_incr (&mcnt, &p); printf ("/jump to %d", p + mcnt - start); break; - case succeed_n: + case succeed_n: extract_number_and_incr (&mcnt, &p); extract_number_and_incr (&mcnt2, &p); printf ("/succeed_n to %d, %d times", p + mcnt - start, mcnt2); break; - - case jump_n: + + case jump_n: extract_number_and_incr (&mcnt, &p); extract_number_and_incr (&mcnt2, &p); printf ("/jump_n to %d, %d times", p + mcnt - start, mcnt2); break; - - case set_number_at: + + case set_number_at: extract_number_and_incr (&mcnt, &p); extract_number_and_incr (&mcnt2, &p); printf ("/set_number_at location %d to %d", p + mcnt - start, mcnt2); break; - + case wordbound: printf ("/wordbound"); break; @@ -894,10 +894,10 @@ case wordbeg: printf ("/wordbeg"); break; - + case wordend: printf ("/wordend"); - + #ifdef emacs case before_dot: printf ("/before_dot"); @@ -916,15 +916,15 @@ mcnt = *p++; printf ("/%d", mcnt); break; - + case notsyntaxspec: printf ("/notsyntaxspec"); mcnt = *p++; printf ("/%d", mcnt); break; - + #ifdef MULE -/* 97/2/17 jhod Mule category patch */ +/* 97/2/17 jhod Mule category patch */ case categoryspec: printf ("/categoryspec"); mcnt = *p++; @@ -936,14 +936,14 @@ mcnt = *p++; printf ("/%d", mcnt); break; -/* end of category patch */ +/* end of category patch */ #endif /* MULE */ #endif /* emacs */ case wordchar: printf ("/wordchar"); break; - + case notwordchar: printf ("/notwordchar"); break; @@ -1000,7 +1000,7 @@ CONST char *string2, int size2) { unsigned this_char; - + if (where == NULL) printf ("(null)"); else @@ -1010,7 +1010,7 @@ for (this_char = where - string1; this_char < size1; this_char++) putchar (string1[this_char]); - where = string2; + where = string2; } for (this_char = where - string2; this_char < size2; this_char++) @@ -1052,7 +1052,7 @@ re_set_syntax (reg_syntax_t syntax) { reg_syntax_t ret = re_syntax_options; - + re_syntax_options = syntax; return ret; } @@ -1099,7 +1099,7 @@ ralloc heap) shift the data out from underneath the regexp routines. - Here's another reason to avoid allocation: Emacs + Here's another reason to avoid allocation: Emacs processes input from X in a signal handler; processing X input may call malloc; if input arrives while a matching routine is calling malloc, then we're scrod. But Emacs can't just block input while @@ -1130,7 +1130,7 @@ /* Failure stack declarations and macros; both re_compile_fastmap and re_match_2 use a failure stack. These have to be macros because of REGEX_ALLOCATE_STACK. */ - + /* Number of failure points for which to initially allocate space when matching. If this number is exceeded, we allocate more @@ -1201,8 +1201,8 @@ /* Double the size of FAIL_STACK, up to approximately `re_max_failures' items. Return 1 if succeeds, and 0 if either ran out of memory - allocating space for it or it was already too large. - + allocating space for it or it was already too large. + REGEX_REALLOCATE_STACK requires `destination' be declared. */ #define DOUBLE_FAIL_STACK(fail_stack) \ @@ -1219,7 +1219,7 @@ 1))) -/* Push pointer POINTER on FAIL_STACK. +/* Push pointer POINTER on FAIL_STACK. Return 1 if was able to do so and 0 if ran out of memory allocating space to do so. */ #define PUSH_PATTERN_OP(POINTER, FAIL_STACK) \ @@ -1264,12 +1264,12 @@ /* Push the information about the state we will need - if we ever fail back to it. - + if we ever fail back to it. + Requires variables fail_stack, regstart, regend, reg_info, and num_regs be declared. DOUBLE_FAIL_STACK requires `destination' be declared. - + Does `return FAILURE_CODE' if runs out of memory. */ #if !defined (REGEX_MALLOC) && !defined (REL_ALLOC) @@ -1387,7 +1387,7 @@ LOW_REG, HIGH_REG -- the highest and lowest active registers. REGSTART, REGEND -- arrays of string positions. REG_INFO -- array of information about each subexpression. - + Also assumes the variables `fail_stack' and (if debugging), `bufp', `pend', `string1', `size1', `string2', and `size2'. */ @@ -1457,8 +1457,8 @@ Other register information, such as the starting and ending positions (which are addresses), and the list of inner groups (which is a bits list) are maintained in separate - variables. - + variables. + We are making a (strictly speaking) nonportable assumption here: that the compiler will pack our bit fields into something that fits into the type of `word', i.e., is something that fits into one item on the @@ -1512,7 +1512,7 @@ /* Subroutine declarations and macros for regex_compile. */ -/* Fetch the next character in the uncompiled pattern---translating it +/* Fetch the next character in the uncompiled pattern---translating it if necessary. Also cast from a signed character in the constant string passed to us by the user to an unsigned char that we can use as an array index (in, e.g., `translate'). */ @@ -1711,7 +1711,7 @@ pattern_offset_t begalt_offset; pattern_offset_t fixup_alt_jump; pattern_offset_t inner_group_offset; - pattern_offset_t laststart_offset; + pattern_offset_t laststart_offset; regnum_t regnum; } compile_stack_elt_t; @@ -1774,7 +1774,7 @@ PATFETCH (c); \ } \ } \ - } + } #define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ @@ -1841,7 +1841,7 @@ static CONST char ** regstart, ** regend; static CONST char ** old_regstart, ** old_regend; static CONST char **best_regstart, **best_regend; -static register_info_type *reg_info; +static register_info_type *reg_info; static CONST char **reg_dummy; static register_info_type *reg_info_dummy; @@ -1883,7 +1883,7 @@ `fastmap_accurate' is zero; `re_nsub' is the number of subexpressions in PATTERN; `not_bol' and `not_eol' are zero; - + The `fastmap' and `newline_anchor' fields are neither examined nor set. */ @@ -1902,20 +1902,20 @@ get bitten by negative numbers here. */ /* XEmacs change: used to be unsigned char. */ register EMACS_INT c, c1; - + /* A random temporary spot in PATTERN. */ CONST char *p1; /* Points to the end of the buffer, where we should append. */ register unsigned char *b; - + /* Keeps track of unclosed groups. */ compile_stack_type compile_stack; /* Points to the current (ending) position in the pattern. */ CONST char *p = pattern; CONST char *pend = pattern + size; - + /* How to translate the characters in the pattern. */ char *translate = bufp->translate; @@ -1936,7 +1936,7 @@ /* Place in the uncompiled pattern (i.e., the {) to which to go back if the interval is invalid. */ CONST char *beg_interval; - + /* Address of the place where a forward jump should go to the end of the containing expression. Each alternative of an `or' -- except the last -- ends with a forward jump of this sort. */ @@ -1952,7 +1952,7 @@ if (debug) { unsigned debug_count; - + for (debug_count = 0; debug_count < size; debug_count++) putchar (pattern[debug_count]); putchar ('\n'); @@ -1976,9 +1976,9 @@ printer (for debugging) will think there's no pattern. We reset it at the end. */ bufp->used = 0; - + /* Always count groups, whether or not bufp->no_sub is set. */ - bufp->re_nsub = 0; + bufp->re_nsub = 0; #if !defined (emacs) && !defined (SYNTAX_TABLE) /* Initialize the syntax table. */ @@ -2029,7 +2029,7 @@ case '$': { if ( /* If at end of pattern, it's an operator. */ - p == pend + p == pend /* If context independent, it's an operator. */ || syntax & RE_CONTEXT_INDEP_ANCHORS /* Otherwise, depends on what's next. */ @@ -2060,7 +2060,7 @@ { /* Are we optimizing this jump? */ boolean keep_string_p = false; - + /* 1 means zero (many) matches is allowed. */ char zero_times_ok = 0, many_times_ok = 0; @@ -2108,7 +2108,7 @@ /* Star, etc. applied to an empty pattern is equivalent to an empty pattern. */ - if (!laststart) + if (!laststart) break; /* Now we know whether or not zero matches is allowed @@ -2117,7 +2117,7 @@ { /* More than one repetition is allowed, so put in at the end a backward relative jump from `b' to before the next jump we're going to put in below (which jumps from - laststart to after this jump). + laststart to after this jump). But if we are at the `*' in the exact sequence `.*\n', insert an unconditional jump backwards to the ., @@ -2199,7 +2199,7 @@ /* We test `*p == '^' twice, instead of using an if statement, so we only need one BUF_PUSH. */ - BUF_PUSH (*p == '^' ? charset_not : charset); + BUF_PUSH (*p == '^' ? charset_not : charset); if (*p == '^') p++; @@ -2291,8 +2291,8 @@ was a character: if this is a hyphen not at the beginning or the end of a list, then it's the range operator. */ - if (c == '-' - && !(p - 2 >= pattern && p[-2] == '[') + if (c == '-' + && !(p - 2 >= pattern && p[-2] == '[') && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^') && *p != ']') { @@ -2365,7 +2365,7 @@ str[c1] = '\0'; /* If isn't a word bracketed by `[:' and:`]': - undo the ending character, the letters, and leave + undo the ending character, the letters, and leave the leading `:' and `[' (but set bits for them). */ if (c == ':' && *p == ']') { @@ -2382,13 +2382,13 @@ boolean is_space = STREQ (str, "space"); boolean is_upper = STREQ (str, "upper"); boolean is_xdigit = STREQ (str, "xdigit"); - + if (!IS_CHAR_CLASS (str)) FREE_STACK_RETURN (REG_ECTYPE); /* Throw away the ] at the end of the character class. */ - PATFETCH (c); + PATFETCH (c); if (p == pend) FREE_STACK_RETURN (REG_EBRACK); @@ -2417,7 +2417,7 @@ else { c1++; - while (c1--) + while (c1--) PATUNFETCH; SET_EITHER_BIT ('['); SET_EITHER_BIT (':'); @@ -2445,8 +2445,8 @@ #endif /* MULE */ /* Discard any (non)matching list bytes that are all 0 at the end of the map. Decrease the map-length byte too. */ - while ((int) b[-1] > 0 && b[b[-1] - 1] == 0) - b[-1]--; + while ((int) b[-1] > 0 && b[b[-1] - 1] == 0) + b[-1]--; b += b[-1]; } break; @@ -2506,7 +2506,7 @@ regnum++; if (COMPILE_STACK_FULL) - { + { RETALLOC (compile_stack.stack, compile_stack.size << 1, compile_stack_elt_t); if (compile_stack.stack == NULL) return REG_ESPACE; @@ -2519,7 +2519,7 @@ whole pattern moves because of realloc, they will still be valid. */ COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer; - COMPILE_STACK_TOP.fixup_alt_jump + COMPILE_STACK_TOP.fixup_alt_jump = fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0; COMPILE_STACK_TOP.laststart_offset = b - bufp->buffer; COMPILE_STACK_TOP.regnum = regnum; @@ -2533,7 +2533,7 @@ COMPILE_STACK_TOP.inner_group_offset = b - bufp->buffer + 2; BUF_PUSH_3 (start_memory, regnum, 0); } - + compile_stack.avail++; fixup_alt_jump = 0; @@ -2562,7 +2562,7 @@ `pop_failure_jump' to pop. See comments at `push_dummy_failure' in `re_match_2'. */ BUF_PUSH (push_dummy_failure); - + /* We allocated space for this jump when we assigned to `fixup_alt_jump', in the `handle_alt' case below. */ STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1); @@ -2584,11 +2584,11 @@ as in `(ab)c(de)' -- the second group is #2. */ regnum_t this_group_regnum; - compile_stack.avail--; + compile_stack.avail--; begalt = bufp->buffer + COMPILE_STACK_TOP.begalt_offset; fixup_alt_jump = COMPILE_STACK_TOP.fixup_alt_jump - ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1 + ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1 : 0; laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset; this_group_regnum = COMPILE_STACK_TOP.regnum; @@ -2603,7 +2603,7 @@ { unsigned char *inner_group_loc = bufp->buffer + COMPILE_STACK_TOP.inner_group_offset; - + *inner_group_loc = regnum - this_group_regnum; BUF_PUSH_3 (stop_memory, this_group_regnum, regnum - this_group_regnum); @@ -2632,10 +2632,10 @@ jump (put in below, which in turn will jump to the next (if any) alternative's such jump, etc.). The last such jump jumps to the correct final destination. A picture: - _____ _____ - | | | | - | v | v - a | b | c + _____ _____ + | | | | + | v | v + a | b | c If we are at `b', then fixup_alt_jump right now points to a three-byte space after `a'. We'll put in the jump, set @@ -2657,10 +2657,10 @@ break; - case '{': + case '{': /* If \{ is a literal. */ if (!(syntax & RE_INTERVALS) - /* If we're at `\{' and it's not the open-interval + /* If we're at `\{' and it's not the open-interval operator. */ || ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) || (p - 2 == pattern && p == pend)) @@ -2699,11 +2699,11 @@ { if (syntax & RE_NO_BK_BRACES) goto unfetch_interval; - else + else FREE_STACK_RETURN (REG_BADBR); } - if (!(syntax & RE_NO_BK_BRACES)) + if (!(syntax & RE_NO_BK_BRACES)) { if (c != '\\') FREE_STACK_RETURN (REG_EBRACE); @@ -2714,7 +2714,7 @@ { if (syntax & RE_NO_BK_BRACES) goto unfetch_interval; - else + else FREE_STACK_RETURN (REG_BADBR); } @@ -2750,7 +2750,7 @@ jump_n <succeed_n addr> <jump count> (The upper bound and `jump_n' are omitted if `upper_bound' is 1, though.) */ - else + else { /* If the upper bound is > 1, we need to insert more at the end of the loop. */ unsigned nbytes = 10 + (upper_bound > 1) * 10; @@ -2767,7 +2767,7 @@ lower_bound); b += 5; - /* Code to initialize the lower bound. Insert + /* Code to initialize the lower bound. Insert before the `succeed_n'. The `5' is the last two bytes of this `set_number_at', plus 3 bytes of the following `succeed_n'. */ @@ -2778,7 +2778,7 @@ { /* More than one repetition is allowed, so append a backward jump to the `succeed_n' that starts this interval. - + When we've reached this during matching, we'll have matched the interval once, so jump back only `upper_bound - 1' times. */ @@ -2796,7 +2796,7 @@ so everything is getting moved up by 5. Conclusion: (b - 2) - (laststart + 3) + 5, i.e., b - laststart. - + We insert this at the beginning of the loop so that if we fail during matching, we'll reinitialize the bounds. */ @@ -2817,7 +2817,7 @@ beg_interval = NULL; /* normal_char and normal_backslash need `c'. */ - PATFETCH (c); + PATFETCH (c); if (!(syntax & RE_NO_BK_BRACES)) { @@ -2833,7 +2833,7 @@ BUF_PUSH (at_dot); break; - case 's': + case 's': laststart = b; PATFETCH (c); /* XEmacs addition */ @@ -2853,7 +2853,7 @@ #ifdef MULE /* 97.2.17 jhod merged in to XEmacs from mule-2.3 */ - case 'c': + case 'c': laststart = b; PATFETCH_RAW (c); if (c < 32 || c > 127) @@ -2957,11 +2957,11 @@ INC_CHARPTR (q); /* If no exactn currently being built. */ - if (!pending_exact + if (!pending_exact /* If last exactn not at current position. */ || pending_exact + *pending_exact + 1 != b - + /* We have only one byte following the exactn for the count. */ || ((unsigned int) (*pending_exact + (q - p)) >= ((unsigned int) (1 << BYTEWIDTH) - 1)) @@ -2977,13 +2977,13 @@ : (q[0] == '\\' && q[1] == '{')))) { /* Start building a new exactn. */ - + laststart = b; BUF_PUSH_2 (exactn, 0); pending_exact = b - 1; } - + BUF_PUSH (c); (*pending_exact)++; @@ -2998,13 +2998,13 @@ } /* switch (c) */ } /* while p != pend */ - + /* Through the pattern now. */ - + if (fixup_alt_jump) STORE_JUMP (jump_past_alt, fixup_alt_jump, b); - if (!COMPILE_STACK_EMPTY) + if (!COMPILE_STACK_EMPTY) FREE_STACK_RETURN (REG_EPAREN); /* If we don't want backtracking, force success @@ -3042,7 +3042,7 @@ #ifdef emacs if (! fail_stack.stack) fail_stack.stack - = (fail_stack_elt_t *) xmalloc (fail_stack.size + = (fail_stack_elt_t *) xmalloc (fail_stack.size * sizeof (fail_stack_elt_t)); else fail_stack.stack @@ -3052,7 +3052,7 @@ #else /* not emacs */ if (! fail_stack.stack) fail_stack.stack - = (fail_stack_elt_t *) malloc (fail_stack.size + = (fail_stack_elt_t *) malloc (fail_stack.size * sizeof (fail_stack_elt_t)); else fail_stack.stack @@ -3103,7 +3103,7 @@ while (pfrom != loc) *--pto = *--pfrom; - + store_op1 (op, loc, arg); } @@ -3112,14 +3112,14 @@ static void insert_op2 (re_opcode_t op, unsigned char *loc, int arg1, int arg2, - unsigned char *end) + unsigned char *end) { register unsigned char *pfrom = end; register unsigned char *pto = end + 5; while (pfrom != loc) *--pto = *--pfrom; - + store_op2 (op, loc, arg1, arg2); } @@ -3133,7 +3133,7 @@ { CONST char *prev = p - 2; boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\'; - + return /* After a subexpression? */ (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash)) @@ -3151,7 +3151,7 @@ CONST char *next = p; boolean next_backslash = *next == '\\'; CONST char *next_next = p + 1 < pend ? p + 1 : 0; - + return /* Before a subexpression? */ (syntax & RE_NO_BK_PARENS ? *next == ')' @@ -3162,7 +3162,7 @@ } -/* Returns true if REGNUM is in one of COMPILE_STACK's elements and +/* Returns true if REGNUM is in one of COMPILE_STACK's elements and false if it's not. */ static boolean @@ -3170,8 +3170,8 @@ { int this_element; - for (this_element = compile_stack.avail - 1; - this_element >= 0; + for (this_element = compile_stack.avail - 1; + this_element >= 0; this_element--) if (compile_stack.stack[this_element].regnum == regnum) return true; @@ -3185,9 +3185,9 @@ starting character is in `P[-2]'. (`P[-1]' is the character `-'.) Then we set the translation of all bits between the starting and ending characters (inclusive) in the compiled pattern B. - + Return an error code. - + We use these short variable names so we can use the same macros as `regex_compile' itself. */ @@ -3199,7 +3199,7 @@ CONST char *p = *p_ptr; int range_start, range_end; - + if (p == pend) return REG_ERANGE; @@ -3208,7 +3208,7 @@ is set, the range endpoints will be negative if we fetch using a signed char *. - We also want to fetch the endpoints without translating them; the + We also want to fetch the endpoints without translating them; the appropriate translation is done in the bit-setting loop below. */ /* The SVR4 compiler on the 3B2 had trouble with unsigned CONST char *. */ range_start = ((CONST unsigned char *) p)[-2]; @@ -3230,7 +3230,7 @@ { SET_LIST_BIT (TRANSLATE (this_char)); } - + return REG_NOERROR; } @@ -3242,7 +3242,7 @@ { Emchar this_char, range_start, range_end; CONST Bufbyte *p; - + if (*p_ptr == pend) return REG_ERANGE; @@ -3250,7 +3250,7 @@ range_end = charptr_emchar (p); p--; /* back to '-' */ DEC_CHARPTR (p); /* back to start of range */ - /* We also want to fetch the endpoints without translating them; the + /* We also want to fetch the endpoints without translating them; the appropriate translation is done in the bit-setting loop below. */ range_start = charptr_emchar (p); INC_CHARPTR (*p_ptr); @@ -3261,7 +3261,7 @@ /* Can't have ranges spanning different charsets, except maybe for ranges entirely witin the first 256 chars. */ - + if ((range_start >= 0x100 || range_end >= 0x100) && CHAR_LEADING_BYTE (range_start) != CHAR_LEADING_BYTE (range_end)) @@ -3290,7 +3290,7 @@ if (this_char <= range_end) put_range_table (rtab, this_char, range_end, Qt); - + return REG_NOERROR; } @@ -3303,7 +3303,7 @@ The caller must supply the address of a (1 << BYTEWIDTH)-byte data area as BUFP->fastmap. - + We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in the pattern buffer. @@ -3318,7 +3318,7 @@ #endif DECLARE_DESTINATION /* We don't push any register information onto the failure stack. */ - + register char *fastmap = bufp->fastmap; unsigned char *pattern = bufp->buffer; unsigned long size = bufp->used; @@ -3341,12 +3341,12 @@ boolean succeed_n_p = false; assert (fastmap != NULL && p != NULL); - + INIT_FAIL_STACK (); bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */ bufp->fastmap_accurate = 1; /* It will be when we're done. */ bufp->can_be_null = 0; - + while (1) { if (p == pend || *p == succeed) @@ -3369,7 +3369,7 @@ /* We should never be about to go beyond the end of the pattern. */ assert (p < pend); - + switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++)) { @@ -3550,8 +3550,7 @@ fastmap[j] = 1; for (j = 0x80; j < 0xA0; j++) { - if (j == PRE_LEADING_BYTE_PRIVATE_1 - || j == PRE_LEADING_BYTE_PRIVATE_2) + if (LEADING_BYTE_PREFIX_P(j)) /* too complicated to calculate this right */ fastmap[j] = 1; else @@ -3592,8 +3591,7 @@ fastmap[j] = 1; for (j = 0x80; j < 0xA0; j++) { - if (j == PRE_LEADING_BYTE_PRIVATE_1 - || j == PRE_LEADING_BYTE_PRIVATE_2) + if (LEADING_BYTE_PREFIX_P(j)) /* too complicated to calculate this right */ fastmap[j] = 1; else @@ -3661,10 +3659,10 @@ case jump_past_alt: case dummy_failure_jump: EXTRACT_NUMBER_AND_INCR (j, p); - p += j; + p += j; if (j > 0) continue; - + /* Jump backward implies we just went through the body of a loop and matched nothing. Opcode jumped to should be `on_failure_jump' or `succeed_n'. Just treat it like an @@ -3676,10 +3674,10 @@ p++; EXTRACT_NUMBER_AND_INCR (j, p); - p += j; - + p += j; + /* If what's on the stack is where we are now, pop it. */ - if (!FAIL_STACK_EMPTY () + if (!FAIL_STACK_EMPTY () && fail_stack.stack[fail_stack.avail - 1].pointer == p) fail_stack.avail--; @@ -3720,7 +3718,7 @@ case succeed_n: /* Get to the number of times to succeed. */ - p += 2; + p += 2; /* Increment p past the n for when k != 0. */ EXTRACT_NUMBER_AND_INCR (k, p); @@ -3808,7 +3806,7 @@ re_search (struct re_pattern_buffer *bufp, CONST char *string, int size, int startpos, int range, struct re_registers *regs) { - return re_search_2 (bufp, NULL, 0, string, size, startpos, range, + return re_search_2 (bufp, NULL, 0, string, size, startpos, range, regs, size); } @@ -3826,20 +3824,20 @@ With MULE, STARTPOS is a byte position, not a char position. And the search will increment STARTPOS by the width of the current leading character. - + STRING1 and STRING2 have length SIZE1 and SIZE2, respectively. - + RANGE is how far to scan while trying to match. RANGE = 0 means try only at STARTPOS; in general, the last start tried is STARTPOS + RANGE. With MULE, RANGE is a byte position, not a char position. The last start tried is the character starting <= STARTPOS + RANGE. - + In REGS, return the indices of the virtual concatenation of STRING1 and STRING2 that matched the entire BUFP->buffer and its contained subexpressions. - + Do not consider matching one past the index STOP in the virtual concatenation of STRING1 and STRING2. @@ -3866,7 +3864,7 @@ /* Check for out-of-range STARTPOS. */ if (startpos < 0 || startpos > total_size) return -1; - + /* Fix up RANGE if it might eventually take us outside the virtual concatenation of STRING1 and STRING2. */ if (endpos < 0) @@ -3892,7 +3890,7 @@ if (fastmap && !bufp->fastmap_accurate) if (re_compile_fastmap (bufp) == -2) return -2; - + #ifdef REGEX_BEGLINE_CHECK { int i = 0; @@ -3911,7 +3909,7 @@ /* Loop through the string, looking for a place to start matching. */ for (;;) - { + { #ifdef REGEX_BEGLINE_CHECK /* If the regex is anchored at the beginning of a line (i.e. with a ^), then we can speed things up by skipping to the next beginning-of- @@ -3998,7 +3996,7 @@ else /* Searching backwards. */ { unsigned char c = (size1 == 0 || startpos >= size1 - ? string2[startpos - size1] + ? string2[startpos - size1] : string1[startpos]); #ifdef MULE if (c < 0x80 && !fastmap[(unsigned char) TRANSLATE (c)]) @@ -4028,14 +4026,14 @@ if (val >= 0) return startpos; - + if (val == -2) return -2; advance: - if (!range) + if (!range) break; - else if (range > 0) + else if (range > 0) { d = ((CONST unsigned char *) (startpos >= size1 ? string2 - size1 : string1) + startpos); @@ -4088,7 +4086,7 @@ /* Test if at very beginning or at very end of the virtual concatenation of `string1' and `string2'. If only one string, it's `string2'. */ #define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2) -#define AT_STRINGS_END(d) ((d) == end2) +#define AT_STRINGS_END(d) ((d) == end2) /* XEmacs change: If the given position straddles the string gap, return the equivalent @@ -4153,7 +4151,7 @@ (virtual) concatenation of STRING1 and STRING2 (of length SIZE1 and SIZE2, respectively). We start matching at POS, and stop matching at STOP. - + If REGS is non-null and the `no_sub' field of BUFP is nonzero, we store offsets for the substring each group matched in REGS. See the documentation for exactly how many groups we fill. @@ -4194,7 +4192,7 @@ /* Where we are in the data, and the end of the current string. */ CONST char *d, *dend; - + /* Where we are in the pattern, and the end of the pattern. */ unsigned char *p = bufp->buffer; register unsigned char *pend = p + bufp->used; @@ -4233,7 +4231,7 @@ return, for use in backreferences. The number here includes an element for register zero. */ unsigned num_regs = bufp->re_nsub + 1; - + /* The currently active registers. */ unsigned lowest_active_reg = NO_LOWEST_ACTIVE_REG; unsigned highest_active_reg = NO_HIGHEST_ACTIVE_REG; @@ -4265,18 +4263,18 @@ subexpression. These two fields get reset each time through any loop their register is in. */ #ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */ - register_info_type *reg_info; + register_info_type *reg_info; #endif /* The following record the register info as found in the above - variables when we find a match better than any we've seen before. + variables when we find a match better than any we've seen before. This happens as we backtrack through the failure points, which in turn happens only if we have not yet matched the entire string. */ unsigned best_regs_set = false; #ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */ CONST char **best_regstart, **best_regend; #endif - + /* Logically, this is `best_regend[0]'. But we don't want to have to allocate space for that if we're not allocating space for anything else (see below). Also, we never need info about register 0 for @@ -4298,13 +4296,13 @@ #ifdef DEBUG /* Counts the total number of registers pushed. */ - unsigned num_regs_pushed = 0; + unsigned num_regs_pushed = 0; #endif DEBUG_PRINT1 ("\n\nEntering re_match_2.\n"); - + INIT_FAIL_STACK (); - + #ifdef MATCH_MAY_ALLOCATE /* Do not bother to initialize all the register variables if there are no groups in the pattern, as it takes a fair amount of time. If @@ -4323,8 +4321,8 @@ reg_dummy = REGEX_TALLOC (num_regs, CONST char *); reg_info_dummy = REGEX_TALLOC (num_regs, register_info_type); - if (!(regstart && regend && old_regstart && old_regend && reg_info - && best_regstart && best_regend && reg_dummy && reg_info_dummy)) + if (!(regstart && regend && old_regstart && old_regend && reg_info + && best_regstart && best_regend && reg_dummy && reg_info_dummy)) { FREE_VARIABLES (); return -2; @@ -4346,21 +4344,21 @@ FREE_VARIABLES (); return -1; } - + /* Initialize subexpression text positions to -1 to mark ones that no start_memory/stop_memory has been seen for. Also initialize the register information struct. */ for (mcnt = 1; mcnt < num_regs; mcnt++) { - regstart[mcnt] = regend[mcnt] + regstart[mcnt] = regend[mcnt] = old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE; - + REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE; IS_ACTIVE (reg_info[mcnt]) = 0; MATCHED_SOMETHING (reg_info[mcnt]) = 0; EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0; } - + /* We move `string1' into `string2' if the latter's empty -- but not if `string1' is null. */ if (size2 == 0 && string1 != NULL) @@ -4385,7 +4383,7 @@ end_match_2 = string2 + stop - size1; } - /* `p' scans through the pattern as `d' scans through the data. + /* `p' scans through the pattern as `d' scans through the data. `dend' is the end of the input string that `d' points within. `d' is advanced into the following input string whenever necessary, but this happens before fetching; therefore, at the beginning of the @@ -4407,7 +4405,7 @@ DEBUG_PRINT1 ("The string to match is: `"); DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2); DEBUG_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. */ @@ -4418,14 +4416,14 @@ if (p == pend) { /* End of pattern means we might have succeeded. */ DEBUG_PRINT1 ("end of pattern ... "); - + /* If we haven't matched the entire string, and we want the longest match, try backtracking. */ if (d != end_match_2) { /* 1 if this match ends in the same string (string1 or string2) as the best previous match. */ - boolean same_str_p = (FIRST_STRING_P (match_end) + boolean same_str_p = (FIRST_STRING_P (match_end) == MATCHING_IN_FIRST_STRING); /* 1 if this match is the best seen so far. */ boolean best_match_p; @@ -4438,7 +4436,7 @@ best_match_p = !MATCHING_IN_FIRST_STRING; DEBUG_PRINT1 ("backtracking.\n"); - + if (!FAIL_STACK_EMPTY ()) { /* More failure points to try. */ @@ -4447,16 +4445,16 @@ { best_regs_set = true; match_end = d; - + DEBUG_PRINT1 ("\nSAVING match as best so far.\n"); - + for (mcnt = 1; mcnt < num_regs; mcnt++) { best_regstart[mcnt] = regstart[mcnt]; best_regend[mcnt] = regend[mcnt]; } } - goto fail; + goto fail; } /* If no failure points, don't restore garbage. And if @@ -4471,7 +4469,7 @@ strings `x-' and `y-z-', if the two strings are not consecutive in memory. */ DEBUG_PRINT1 ("Restoring best registers.\n"); - + d = match_end; dend = ((d >= string1 && d <= end1) ? end_match_1 : end_match_2); @@ -4538,7 +4536,7 @@ ? ((regoff_t) (d - string1)) : ((regoff_t) (d - string2 + size1))); } - + /* Go through the first `min (num_regs, regs->num_regs)' registers, since that is all we initialized. */ for (mcnt = 1; mcnt < MIN (num_regs, regs->num_regs); mcnt++) @@ -4553,7 +4551,7 @@ = (regoff_t) POINTER_TO_OFFSET (regend[mcnt]); } } - + /* If the regs structure we return has more elements than were in the pattern, set the extra elements to -1. If we (re)allocated the registers, this is the case, @@ -4568,8 +4566,8 @@ nfailure_points_pushed - nfailure_points_popped); DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed); - mcnt = d - pos - (MATCHING_IN_FIRST_STRING - ? string1 + mcnt = d - pos - (MATCHING_IN_FIRST_STRING + ? string1 : string2 - size1); DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt); @@ -4659,7 +4657,7 @@ p += 1 + *p; if (!not) goto fail; - + SET_REGS_MATCHED (); INC_CHARPTR (d); /* XEmacs change */ break; @@ -4682,9 +4680,9 @@ not = !not; p += unified_range_table_bytes_used (p); - + if (!not) goto fail; - + SET_REGS_MATCHED (); INC_CHARPTR (d); break; @@ -4702,9 +4700,9 @@ /* Find out if this group can match the empty string. */ p1 = p; /* To send to group_match_null_string_p. */ - + if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE) - REG_MATCH_NULL_STRING_P (reg_info[*p]) + REG_MATCH_NULL_STRING_P (reg_info[*p]) = group_match_null_string_p (&p1, pend, reg_info); /* Save the position in the string where we were the last time @@ -4715,7 +4713,7 @@ 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_PRINT2 (" old_regstart: %d\n", POINTER_TO_OFFSET (old_regstart[*p])); regstart[*p] = d; @@ -4726,10 +4724,10 @@ /* Clear this whenever we change the register activity status. */ set_regs_matched_done = 0; - + /* This is the new highest active register. */ highest_active_reg = *p; - + /* If nothing was active before, this is the new lowest active register. */ if (lowest_active_reg == NO_LOWEST_ACTIVE_REG) @@ -4747,7 +4745,7 @@ number, and the number of inner groups. */ case stop_memory: DEBUG_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 upon by a repetition operator, e.g., with `((a*)*(b*)*)*' @@ -4756,7 +4754,7 @@ 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_PRINT2 (" old_regend: %d\n", POINTER_TO_OFFSET (old_regend[*p])); regend[*p] = d; @@ -4783,7 +4781,7 @@ unsigned char r = *p - 1; while (r > 0 && !IS_ACTIVE (reg_info[r])) r--; - + /* If we end up at register zero, that means that we saved the registers as the result of an `on_failure_jump', not a `start_memory', and we jumped to past the innermost @@ -4799,7 +4797,7 @@ else highest_active_reg = r; } - + /* If just failed to match something this time around with a group that's operated on by a repetition operator, try to force exit from the ``loop'', and restore the register @@ -4807,10 +4805,10 @@ last match. */ if ((!MATCHED_SOMETHING (reg_info[*p]) || just_past_start_mem == p - 1) - && (p + 2) < pend) + && (p + 2) < pend) { boolean is_a_jump_n = false; - + p1 = p + 2; mcnt = 0; switch ((re_opcode_t) *p1++) @@ -4825,12 +4823,12 @@ if (is_a_jump_n) p1 += 2; break; - + default: /* do nothing */ ; } p1 += mcnt; - + /* If the next operation is a jump backwards in the pattern to an on_failure_jump right before the start_memory corresponding to this stop_memory, exit from the loop @@ -4844,17 +4842,17 @@ failed match, e.g., with `(a*)*b' against `ab' for regstart[1], and, e.g., with `((a*)*(b*)*)*' against `aba' for regend[3]. - + Also restore the registers for inner groups for, e.g., `((a*)(b*))*' against `aba' (register 3 would otherwise get trashed). */ - + if (EVER_MATCHED_SOMETHING (reg_info[*p])) { - unsigned r; - + unsigned r; + EVER_MATCHED_SOMETHING (reg_info[*p]) = 0; - + /* Restore this and inner groups' (if any) registers. */ for (r = *p; r < *p + *(p + 1); r++) { @@ -4863,7 +4861,7 @@ /* xx why this test? */ if (old_regend[r] >= regstart[r]) regend[r] = old_regend[r]; - } + } } p1++; EXTRACT_NUMBER_AND_INCR (mcnt, p1); @@ -4872,7 +4870,7 @@ goto fail; } } - + /* Move past the register number and the inner group count. */ p += 2; break; @@ -4889,16 +4887,16 @@ /* Can't back reference a group which we've never matched. */ if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno])) goto fail; - + /* Where in input to try to start matching. */ d2 = regstart[regno]; - + /* Where to stop matching; if both the place to start and the place to stop matching are in the same string, then set to the place to stop, otherwise, for now have to use the end of the first string. */ - dend2 = ((FIRST_STRING_P (regstart[regno]) + dend2 = ((FIRST_STRING_P (regstart[regno]) == FIRST_STRING_P (regend[regno])) ? regend[regno] : end_match_1); for (;;) @@ -4922,17 +4920,17 @@ /* How many characters left in this segment to match. */ mcnt = dend - d; - + /* Want how many consecutive characters we can match in one shot, so, if necessary, adjust the count. */ if (mcnt > dend2 - d2) mcnt = dend2 - d2; - + /* Compare that many; failure if mismatch, else move past them. */ - if (translate + if (translate ? bcmp_translate ((unsigned char *) d, - (unsigned char *) d2, mcnt, translate) + (unsigned char *) d2, mcnt, translate) : memcmp (d, d2, mcnt)) goto fail; d += mcnt, d2 += mcnt; @@ -4949,7 +4947,7 @@ `newline_anchor' is set, after newlines. */ case begline: DEBUG_PRINT1 ("EXECUTING begline.\n"); - + if (AT_STRINGS_BEG (d)) { if (!bufp->not_bol) break; @@ -4970,7 +4968,7 @@ { if (!bufp->not_eol) break; } - + /* We have to ``prefetch'' the next character. */ else if ((d == end1 ? *string2 : *d) == '\n' && bufp->newline_anchor) @@ -5004,7 +5002,7 @@ then the . fails against the \n. But the next thing we want to do is match the \n against the \n; if we restored the string value, we would be back at the foo. - + Because this is used only in specific cases, we don't need to check all the things that `on_failure_jump' does, to make sure the right things get saved on the stack. Hence we don't @@ -5014,7 +5012,7 @@ case; that seems worse than this. */ case on_failure_keep_string_jump: DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump"); - + EXTRACT_NUMBER_AND_INCR (mcnt, p); DEBUG_PRINT3 (" %d (to 0x%p):\n", mcnt, p + mcnt); @@ -5023,7 +5021,7 @@ /* Uses of on_failure_jump: - + Each alternative starts with an on_failure_jump that points to the beginning of the next alternative. Each alternative except the last ends with a jump that in effect jumps past @@ -5089,7 +5087,7 @@ would have to backtrack because of (as in, e.g., `a*a') then we can change to pop_failure_jump, because we'll never have to backtrack. - + This is not true in the case of alternatives: in `(a|ab)*' we do need to backtrack to the `ab' alternative (e.g., if the string was `ab'). But instead of trying to @@ -5115,7 +5113,7 @@ p1 = p + mcnt; /* p1[0] ... p1[2] are the `on_failure_jump' corresponding - to the `maybe_finalize_jump' of this case. Examine what + to the `maybe_finalize_jump' of this case. Examine what follows. */ /* If we're at the end of the pattern, we can change. */ @@ -5141,12 +5139,12 @@ DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n", c, p1[5]); } - + else if ((re_opcode_t) p1[3] == charset || (re_opcode_t) p1[3] == charset_not) { int not = (re_opcode_t) p1[3] == charset_not; - + if (c < (unsigned char) (p1[4] * BYTEWIDTH) && p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH))) not = !not; @@ -5176,7 +5174,7 @@ DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n", c, p1[5]); } - + else if ((re_opcode_t) p1[3] == charset_not) { int idx; @@ -5247,7 +5245,7 @@ } /* Note fall through. */ - + /* Unconditionally jump (without popping any failure points). */ case jump: unconditional_jump: @@ -5257,7 +5255,7 @@ DEBUG_PRINT2 ("(to 0x%p).\n", 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: @@ -5292,7 +5290,7 @@ /* Have to succeed matching what follows at least n times. After that, handle like `on_failure_jump'. */ - case succeed_n: + case succeed_n: EXTRACT_NUMBER (mcnt, p + 2); DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt); @@ -5313,8 +5311,8 @@ goto on_failure; } break; - - case jump_n: + + case jump_n: EXTRACT_NUMBER (mcnt, p + 2); DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt); @@ -5323,13 +5321,13 @@ { mcnt--; STORE_NUMBER (p + 2, mcnt); - goto unconditional_jump; + goto unconditional_jump; } /* If don't have to jump any more, skip over the rest of command. */ - else - p += 4; + else + p += 4; break; - + case set_number_at: { DEBUG_PRINT1 ("EXECUTING set_number_at.\n"); @@ -5435,14 +5433,14 @@ BUF_PT (regex_emacs_buffer)) goto fail; break; - + case at_dot: DEBUG_PRINT1 ("EXECUTING at_dot.\n"); if (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d) != BUF_PT (regex_emacs_buffer)) goto fail; break; - + case after_dot: DEBUG_PRINT1 ("EXECUTING after_dot.\n"); if (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d) @@ -5515,7 +5513,7 @@ SET_REGS_MATCHED (); } break; - + case notcategoryspec: should_succeed = 0; goto matchornotcategory; @@ -5530,7 +5528,7 @@ SET_REGS_MATCHED (); d++; break; - + case notwordchar: DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n"); PREFETCH (); @@ -5540,7 +5538,7 @@ d++; break; #endif /* not emacs */ - + default: abort (); } @@ -5565,7 +5563,7 @@ if (p < pend) { boolean is_a_jump_n = false; - + /* If failed to a backwards jump that's part of a repetition loop, need to pop this failure point and use the next one. */ switch ((re_opcode_t) *p) @@ -5577,7 +5575,7 @@ case jump: p1 = p + 1; EXTRACT_NUMBER_AND_INCR (mcnt, p1); - p1 += mcnt; + p1 += mcnt; if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n) || (!is_a_jump_n @@ -5608,10 +5606,10 @@ /* We are passed P pointing to a register number after a start_memory. - + Return true if the pattern up to the corresponding stop_memory can match the empty string, and false otherwise. - + If we find the matching stop_memory, sets P to point to one past its number. Otherwise, sets P to an undefined byte less than or equal to END. @@ -5624,20 +5622,20 @@ int mcnt; /* Point to after the args to the start_memory. */ unsigned char *p1 = *p + 2; - + while (p1 < end) { /* Skip over opcodes that can match nothing, and return true or false, as appropriate, when we get to one that can't, or to the matching stop_memory. */ - + switch ((re_opcode_t) *p1) { /* Could be either a loop or a series of alternatives. */ case on_failure_jump: p1++; EXTRACT_NUMBER_AND_INCR (mcnt, p1); - + /* If the next operation is not a jump backwards in the pattern. */ @@ -5651,7 +5649,7 @@ /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6 /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3 - /exactn/1/c + /exactn/1/c So, we have to first go through the first (n-1) alternatives and then deal with the last one separately. */ @@ -5667,19 +5665,19 @@ is, including the ending `jump_past_alt' and its number. */ - if (!alt_match_null_string_p (p1, p1 + mcnt - 3, + if (!alt_match_null_string_p (p1, p1 + mcnt - 3, reg_info)) return false; /* Move to right after this alternative, including the jump_past_alt. */ - p1 += mcnt; + p1 += mcnt; /* Break if it's the beginning of an n-th alternative that doesn't begin with an on_failure_jump. */ if ((re_opcode_t) *p1 != on_failure_jump) break; - + /* Still have to check that it's not an n-th alternative that starts with an on_failure_jump. */ p1++; @@ -5704,14 +5702,14 @@ } /* if mcnt > 0 */ break; - + case stop_memory: assert (p1[1] == **p); *p = p1 + 2; return true; - - default: + + default: if (!common_op_match_null_string_p (&p1, end, reg_info)) return false; } @@ -5724,19 +5722,19 @@ /* Similar to group_match_null_string_p, but doesn't deal with alternatives: It expects P to be the first byte of a single alternative and END one byte past the last. The alternative can contain groups. */ - + static boolean alt_match_null_string_p (unsigned char *p, unsigned char *end, register_info_type *reg_info) { int mcnt; unsigned char *p1 = p; - + while (p1 < end) { - /* Skip over opcodes that can match nothing, and break when we get + /* Skip over opcodes that can match nothing, and break when we get to one that can't. */ - + switch ((re_opcode_t) *p1) { /* It's a loop. */ @@ -5745,8 +5743,8 @@ EXTRACT_NUMBER_AND_INCR (mcnt, p1); p1 += mcnt; break; - - default: + + default: if (!common_op_match_null_string_p (&p1, end, reg_info)) return false; } @@ -5757,8 +5755,8 @@ /* Deals with the ops common to group_match_null_string_p and - alt_match_null_string_p. - + alt_match_null_string_p. + Sets P to one after the op and its arguments, if any. */ static boolean @@ -5792,7 +5790,7 @@ reg_no = *p1; assert (reg_no > 0 && reg_no <= MAX_REGNUM); ret = group_match_null_string_p (&p1, end, reg_info); - + /* Have to set this here in case we're checking a group which contains a group and a back reference to it. */ @@ -5802,7 +5800,7 @@ if (!ret) return false; break; - + /* If this is an optimized succeed_n for zero times, make the jump. */ case jump: EXTRACT_NUMBER_AND_INCR (mcnt, p1); @@ -5814,7 +5812,7 @@ case succeed_n: /* Get to the number of times to succeed. */ - p1 += 2; + p1 += 2; EXTRACT_NUMBER_AND_INCR (mcnt, p1); if (mcnt == 0) @@ -5827,7 +5825,7 @@ return false; break; - case duplicate: + case duplicate: if (!REG_MATCH_NULL_STRING_P (reg_info[*p1])) return false; break; @@ -5847,7 +5845,7 @@ /* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN bytes; nonzero otherwise. */ - + static int bcmp_translate (CONST unsigned char *s1, CONST unsigned char *s2, register int len, char *translate) @@ -5866,10 +5864,10 @@ /* re_compile_pattern is the GNU regular expression compiler: it compiles PATTERN (of length SIZE) and puts the result in BUFP. Returns 0 if the pattern was valid, otherwise an error string. - + Assumes the `allocated' (and perhaps `buffer') and `translate' fields are set in BUFP on entry. - + We call regex_compile to do the actual compilation. */ CONST char * @@ -5877,25 +5875,25 @@ struct re_pattern_buffer *bufp) { reg_errcode_t ret; - + /* GNU code is written to assume at least RE_NREGS registers will be set (and at least one extra will be -1). */ bufp->regs_allocated = REGS_UNALLOCATED; - + /* And GNU code determines whether or not to get register information by passing null for the REGS argument to re_match, etc., not by setting no_sub. */ bufp->no_sub = 0; - + /* Match anchors at newline. */ bufp->newline_anchor = 1; - + ret = regex_compile (pattern, length, re_syntax_options, bufp); if (!ret) return NULL; return gettext (re_error_msgid[(int) ret]); -} +} /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ @@ -5909,7 +5907,7 @@ re_comp (CONST char *s) { reg_errcode_t ret; - + if (!s) { if (!re_comp_buf.buffer) @@ -5936,7 +5934,7 @@ re_comp_buf.newline_anchor = 1; ret = regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf); - + if (!ret) return NULL; @@ -6004,17 +6002,17 @@ preg->buffer = 0; preg->allocated = 0; preg->used = 0; - + /* Don't bother to use a fastmap when searching. This simplifies the REG_NEWLINE case: if we used a fastmap, we'd have to put all the characters after newlines into the fastmap. This way, we just try every character. */ preg->fastmap = 0; - + if (cflags & REG_ICASE) { unsigned i; - + preg->translate = (char *) malloc (CHAR_SET_SIZE); if (preg->translate == NULL) return (int) REG_ESPACE; @@ -6039,30 +6037,30 @@ preg->no_sub = !!(cflags & REG_NOSUB); - /* POSIX says a null character in the pattern terminates it, so we + /* POSIX says a null character in the pattern terminates it, so we can use strlen here in compiling the pattern. */ ret = regex_compile (pattern, strlen (pattern), syntax, preg); - + /* POSIX doesn't distinguish between an unmatched open-group and an unmatched close-group: both are REG_EPAREN. */ if (ret == REG_ERPAREN) ret = REG_EPAREN; - + return (int) ret; } /* regexec searches for a given pattern, specified by PREG, in the string STRING. - + If NMATCH is zero or REG_NOSUB was set in the cflags argument to `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at least NMATCH elements, and we set them to the offsets of the corresponding matched substrings. - + EFLAGS specifies `execution flags' which affect matching: if REG_NOTBOL is set, then ^ does not match at the beginning of the string; if REG_NOTEOL is set, then $ does not match at the end. - + We return 0 if we find a match and REG_NOMATCH if not. */ int @@ -6076,15 +6074,15 @@ boolean want_reg_info = !preg->no_sub && nmatch > 0; private_preg = *preg; - + private_preg.not_bol = !!(eflags & REG_NOTBOL); private_preg.not_eol = !!(eflags & REG_NOTEOL); - + /* The user has told us exactly how many registers to return information about, via `nmatch'. We have to pass that on to the matching routines. */ private_preg.regs_allocated = REGS_FIXED; - + if (want_reg_info) { regs.num_regs = nmatch; @@ -6098,7 +6096,7 @@ ret = re_search (&private_preg, string, len, /* start: */ 0, /* range: */ len, want_reg_info ? ®s : (struct re_registers *) 0); - + /* Copy the register information to the POSIX structure. */ if (want_reg_info) { @@ -6134,7 +6132,7 @@ if (errcode < 0 || errcode >= (sizeof (re_error_msgid) / sizeof (re_error_msgid[0]))) - /* Only error codes returned by the rest of the code should be passed + /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. Dump core so we can fix it. */ @@ -6143,7 +6141,7 @@ msg = gettext (re_error_msgid[errcode]); msg_size = strlen (msg) + 1; /* Includes the null. */ - + if (errbuf_size != 0) { if (msg_size > errbuf_size) @@ -6167,7 +6165,7 @@ if (preg->buffer != NULL) free (preg->buffer); preg->buffer = NULL; - + preg->allocated = 0; preg->used = 0;
--- a/src/sunplay.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/sunplay.c Mon Aug 13 09:54:23 2007 +0200 @@ -234,8 +234,8 @@ close (audio_fd); } - (void) signal (SIGHUP, sighup_handler); - (void) signal (SIGINT, sigint_handler); + signal (SIGHUP, sighup_handler); + signal (SIGINT, sigint_handler); } @@ -312,8 +312,8 @@ close (audio_fd); } - (void) signal (SIGHUP, sighup_handler); - (void) signal (SIGINT, sigint_handler); + signal (SIGHUP, sighup_handler); + signal (SIGINT, sigint_handler); } /* #### sigcontext doesn't exist in Solaris. This should be updated
--- a/src/symbols.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/symbols.c Mon Aug 13 09:54:23 2007 +0200 @@ -3043,7 +3043,7 @@ if (!NILP (follow_past_lisp_magic) && !EQ (follow_past_lisp_magic, Qt)) { CHECK_SYMBOL (follow_past_lisp_magic); - (void) handler_type_from_function_symbol (follow_past_lisp_magic, 0); + handler_type_from_function_symbol (follow_past_lisp_magic, 0); } valcontents = fetch_value_maybe_past_magic (variable, @@ -3072,7 +3072,7 @@ if (!NILP (follow_past_lisp_magic) && !EQ (follow_past_lisp_magic, Qt)) { CHECK_SYMBOL (follow_past_lisp_magic); - (void) handler_type_from_function_symbol (follow_past_lisp_magic, 0); + handler_type_from_function_symbol (follow_past_lisp_magic, 0); } return follow_varalias_pointers (object, follow_past_lisp_magic); }
--- a/src/xmu.c Mon Aug 13 09:53:23 2007 +0200 +++ b/src/xmu.c Mon Aug 13 09:54:23 2007 +0200 @@ -27,7 +27,7 @@ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <X11/cursorfont.h> @@ -143,9 +143,9 @@ const struct _CursorName *table; int i; char tmp[40]; - + if (strlen (name) >= sizeof tmp) return -1; - for (i=0; i<strlen(name); i++) + for (i=0; i<strlen(name); i++) if (isupper((unsigned char) name[i])) tmp[i] = tolower((unsigned char) name[i]); else @@ -202,7 +202,7 @@ hexTable[' '] = -1; hexTable[','] = -1; hexTable['}'] = -1; hexTable['\n'] = -1; hexTable['\t'] = -1; - + hex_initialized = 1; } @@ -215,7 +215,7 @@ int value = 0; int gotone = 0; int done = 0; - + /* loop, accumulate hex value until find delimiter */ /* skip any initial delimiters found in read stream */ @@ -299,7 +299,7 @@ } continue; } - + if (sscanf(line, "static short %s = {", name_and_type) == 1) version10p = 1; else if (sscanf(line,"static unsigned char %s = {",name_and_type) == 1) @@ -316,7 +316,7 @@ if (strcmp("bits[]", type)) continue; - + if (!ww || !hh) RETURN (BitmapFileInvalid); @@ -329,7 +329,7 @@ size = bytes_per_line * hh; data = (unsigned char *) Xmalloc ((unsigned int) size); - if (!data) + if (!data) RETURN (BitmapNoMemory); if (version10p) { @@ -348,7 +348,7 @@ int bytes; for (bytes=0, ptr=data; bytes<size; bytes++, ptr++) { - if ((value = NextInt(fstream)) < 0) + if ((value = NextInt(fstream)) < 0) RETURN (BitmapFileInvalid); *ptr=value; } @@ -373,7 +373,7 @@ int XmuReadBitmapDataFromFile (const char *filename, /* Remaining args are RETURNED */ - unsigned int *width, + unsigned int *width, unsigned int *height, unsigned char **datap, int *x_hot, int *y_hot) @@ -390,7 +390,7 @@ } /* - * XmuPrintDefaultErrorMessage - print a nice error that looks like the usual + * XmuPrintDefaultErrorMessage - print a nice error that looks like the usual * message. Returns 1 if the caller should consider exitting else 0. */ int XmuPrintDefaultErrorMessage (Display *dpy, XErrorEvent *event, FILE *fp) @@ -402,10 +402,10 @@ _XExtension *ext = (_XExtension *)NULL; XGetErrorText(dpy, event->error_code, buffer, BUFSIZ); XGetErrorDatabaseText(dpy, mtype, "XError", "X Error", mesg, BUFSIZ); - (void) fprintf(fp, "%s: %s\n ", mesg, buffer); - XGetErrorDatabaseText(dpy, mtype, "MajorCode", "Request Major code %d", + fprintf(fp, "%s: %s\n ", mesg, buffer); + XGetErrorDatabaseText(dpy, mtype, "MajorCode", "Request Major code %d", mesg, BUFSIZ); - (void) fprintf(fp, mesg, event->request_code); + fprintf(fp, mesg, event->request_code); if (event->request_code < 128) { sprintf(number, "%d", event->request_code); XGetErrorDatabaseText(dpy, "XRequest", number, "", buffer, BUFSIZ); @@ -420,17 +420,17 @@ else buffer[0] = '\0'; } - (void) fprintf(fp, " (%s)", buffer); + fprintf(fp, " (%s)", buffer); fputs("\n ", fp); #if (XtSpecificationRelease >= 5) if (event->request_code >= 128) { XGetErrorDatabaseText(dpy, mtype, "MinorCode", "Request Minor code %d", mesg, BUFSIZ); - (void) fprintf(fp, mesg, event->minor_code); + fprintf(fp, mesg, event->minor_code); if (ext) { sprintf(mesg, "%s.%d", ext->name, event->minor_code); XGetErrorDatabaseText(dpy, "XRequest", mesg, "", buffer, BUFSIZ); - (void) fprintf(fp, " (%s)", buffer); + fprintf(fp, " (%s)", buffer); } fputs("\n ", fp); } @@ -445,12 +445,12 @@ /* kludge, try to find the extension that caused it */ buffer[0] = '\0'; for (ext = dpy->ext_procs; ext; ext = ext->next) { - if (ext->error_string) + if (ext->error_string) (*ext->error_string)(dpy, event->error_code, &ext->codes, buffer, BUFSIZ); if (buffer[0]) break; - } + } if (buffer[0]) sprintf(buffer, "%s.%d", ext->name, event->error_code - ext->codes.first_error); @@ -458,7 +458,7 @@ strcpy(buffer, "Value"); XGetErrorDatabaseText(dpy, mtype, buffer, "", mesg, BUFSIZ); if (*mesg) { - (void) fprintf(fp, mesg, event->resourceid); + fprintf(fp, mesg, event->resourceid); fputs("\n ", fp); } } else if ((event->error_code == BadWindow) || @@ -480,33 +480,33 @@ else XGetErrorDatabaseText(dpy, mtype, "ResourceID", "ResourceID 0x%x", mesg, BUFSIZ); - (void) fprintf(fp, mesg, event->resourceid); + fprintf(fp, mesg, event->resourceid); fputs("\n ", fp); } #elif (XtSpecificationRelease == 4) XGetErrorDatabaseText(dpy, mtype, "MinorCode", "Request Minor code %d", mesg, BUFSIZ); - (void) fprintf(fp, mesg, event->minor_code); + fprintf(fp, mesg, event->minor_code); fputs("\n ", fp); if (ext) { sprintf(mesg, "%s.%d", ext->name, event->minor_code); XGetErrorDatabaseText(dpy, "XRequest", mesg, "", buffer, BUFSIZ); - (void) fprintf(fp, " (%s)", buffer); + fprintf(fp, " (%s)", buffer); } XGetErrorDatabaseText(dpy, mtype, "ResourceID", "ResourceID 0x%x", mesg, BUFSIZ); - (void) fprintf(fp, mesg, event->resourceid); + fprintf(fp, mesg, event->resourceid); fputs("\n ", fp); #else ERROR! Unsupported release of X11 #endif - XGetErrorDatabaseText(dpy, mtype, "ErrorSerial", "Error Serial #%d", + XGetErrorDatabaseText(dpy, mtype, "ErrorSerial", "Error Serial #%d", mesg, BUFSIZ); - (void) fprintf(fp, mesg, event->serial); + fprintf(fp, mesg, event->serial); fputs("\n ", fp); XGetErrorDatabaseText(dpy, mtype, "CurrentSerial", "Current Serial #%d", mesg, BUFSIZ); - (void) fprintf(fp, mesg, NextRequest(dpy)-1); + fprintf(fp, mesg, NextRequest(dpy)-1); fputs("\n", fp); if (event->error_code == BadImplementation) return 0; return 1; @@ -531,7 +531,7 @@ } /* got a "real" X error */ return XmuPrintDefaultErrorMessage (dpy, errorp, stderr); -} +} void XmuCopyISOLatin1Lowered(char *dst, char *src) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/Dnd/dragtest.el Mon Aug 13 09:54:23 2007 +0200 @@ -0,0 +1,19 @@ +;; a simple test of the drag functions +;; +;; still to do: drag only after about 10 pix of movement + +(defun text-drag (event) + (interactive "@e") + (offix-start-drag event "That's a test")) + +(defun file-drag (event) + (interactive "@e") + (offix-start-drag event "/tmp/printcap" 2)) + +(defun url-drag (event) + (interactive "@e") + (offix-start-drag event "http://www.xemacs.org/" 8)) + +(define-key global-map [button1] 'text-drag) +(define-key global-map [button2] 'file-drag) +(define-key global-map [button3] 'url-drag)