From: tomo Date: Thu, 15 Nov 2001 10:14:57 +0000 (+0000) Subject: XEmacs 21.2.43 "Terspichore". X-Git-Tag: r21-2-43~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3198ed8319f99e19a14447745f4f93e4b4522961;p=chise%2Fxemacs-chise.git.1 XEmacs 21.2.43 "Terspichore". --- diff --git a/CHANGES-beta b/CHANGES-beta index e70e4b9..ed3607b 100644 --- a/CHANGES-beta +++ b/CHANGES-beta @@ -1,3 +1,12 @@ +to 21.2.43 "Terspichore" +-- Important gnuserv security fix. Upgrade if you use gnuserv. + -- Klaus Frank, Jan Vroonhof, Gunnar Evermann +-- C-level alignment correctness fixes -- Martin Buchholz +-- cut-and-paste slowness under Motif fixed -- Andy Piper +-- pdump now works on SunOS 4 and HP-UX -- Martin Buchholz +-- Packages documentation updates -- Steve Youngs +-- Windows netinstall changes -- Andy Piper + to 21.2.42 "Poseidon" -- 64-bit platforms (Alpha) broken in 21.2.41 now fixed -- Martin Buchholz -- Windows packaging changes -- Andy Piper @@ -58,7 +67,7 @@ to 21.2.38 "Peisino,Ak(B" -- Calls to the following functions are now better optimized: backward-char backward-word plusp, minusp oddp evenp -- Martin Buchholz -- COUNT argument to following functions is now optional: - forward-word backward-word mark-word kill-word backward-kill-word + forward-word backward-word mark-word kill-word backward-kill-word forward-comment delete-char backward-delete-char -- Martin Buchholz -- Don't put gutters/tabs on popup windows -- Andy Piper -- Fix up info file cross references -- Adrian Aichner diff --git a/ChangeLog b/ChangeLog index c408e19..8310742 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2001-01-26 Martin Buchholz + + * XEmacs 21.2.43 "Terspichore" is released. + +2001-01-21 Steve Youngs + + * ./etc/PACKAGES: Doc fix. + + * README.packages: Doc fix. + +2001-01-17 Steve Youngs + + * README.packages: Update. + + * ./etc/PACKAGES: Update. + 2001-01-20 Martin Buchholz * XEmacs 21.2.42 "Poseidon" is released. diff --git a/README.packages b/README.packages index 04cc713..9c214b1 100644 --- a/README.packages +++ b/README.packages @@ -1,3 +1,12 @@ + -*- Outline -*- +This file is in Outline mode. It is best viewed under XEmacs. + +Press C-c C-o (Ctrl+c Ctrl+o) now to see a list of headings. + To expand a heading: Put the cursor on the heading and press C-c C-s +To collapse a heading: Press C-c C-d + +For general XEmacs navigation tips: Press C-h t + The XEmacs Packages Quick Start Guide ------------------------------------- @@ -5,8 +14,8 @@ This text is intended to help you get started installing a new XEmacs and its packages from start. For details see the 'Startup Paths' and 'Packages' sections of the XEmacs info manual. -Real Real Quickstart FAQ ------------------------- +* Real Real Quickstart FAQ +-------------------------- Q. Do I need to have the packages to compile XEmacs? A. No, XEmacs will build and install just fine without any packages @@ -26,8 +35,8 @@ A. See the first FAQ; you may be missing a package that is essential to you. You can either track it down and install it, or install the `Sumo Tarball' (see the second FAQ). -A note of caution ------------------ +* A note of caution +------------------- The XEmacs package system is still in its infancy. Please expect a few minor hurdles on the way. Also neither the interface nor the structure is @@ -35,8 +44,8 @@ set in stone. The XEmacs maintainers reserve the right to sacrifice backwards compatibility as quirks are worked out over the coming releases. -Some Package Theory -------------------- +* Some Package Theory +--------------------- In order to reduce the size and increase the maintainability of XEmacs, the majority of the Elisp packages that came with previous releases @@ -48,147 +57,174 @@ You select just the ones you need. Install them by untarring them into the right place. On startup XEmacs will find them, set up the load path correctly, install autoloads, etc, etc. -Package hierarchies -------------------- +* Package hierarchies +--------------------- On Startup XEmacs looks for packages in so called package hierarchies. These can be specified by the 'package-path' parameter to the 'configure' script. However by default there are three system wide -hierarchies. +hierarchies. ("$prefix" defaults to "/usr/local") -$prefix/lib/xemacs/site-packages - Local and 3rd party packages go here. +$prefix/lib/xemacs/xemacs-packages + Normal packages go here. $prefix/lib/xemacs/mule-packages - Only searched by MULE-enabled XEmacsen. + Mule packages go here and are only searched by MULE-enabled XEmacsen. -$prefix/lib/xemacs/xemacs-packages - Normal packages go here. +$prefix/lib/xemacs/site-packages/ + Local and 3rd party packages go here. -Where to get the packages -------------------------- + +* Where to get the packages +--------------------------- Packages are available from ftp://ftp.xemacs.org/pub/xemacs/packages and its mirrors. -How to install the packages ---------------------------- +* How to install the packages +----------------------------- +There are a few different ways to install packages: -1. All at once, using the 'Sumo Tarball'. -2. By hand. -3. Automatically, using the package tools from XEmacs. + 1. Manually, all at once, using the 'Sumo Tarball'. + 2. Manually, using individual package tarballs. + 3. Automatically, using the package tools from XEmacs. -The Sumo Tarball ----------------- +** Manually, all at once, using the 'Sumo Tarball' +-------------------------------------------------- Those with little time, cheap connections and plenty of disk space can install all the packages at once using the sumo tarballs. -Download the file +Download the file: -xemacs-sumo.tar.gz + xemacs-sumo.tar.gz -For an XEmacs compiled with Mule you also need +For an XEmacs compiled with Mule you also need: -xemacs-mule-sumo.tar.gz + xemacs-mule-sumo.tar.gz N.B. They are called 'Sumo Tarballs' for good reason. They are -currently about 15MB and 2.3MB (gzipped) respectively. +currently about 19MB and 4.5MB (gzipped) respectively. -Install them by +Install them by: -cd $prefix/lib/xemacs ; gunzip -c | tar xf - + cd $prefix/lib/xemacs ; gunzip -c | tar xvf - RET + +Or, if you have GNU tar: + + cd $prefix/lib/xemacs ; tar zxvf /path/to/ RET As the Sumo tarballs are not regenerated as often as the individual packages, it is recommended that you use the automatic package tools afterwards to pick up any recent updates. -Installing by Hand ------------------- +** Manually, using individual package tarballs +---------------------------------------------- -Fetch the packages from the ftp site, CDROM whatever. The filenames +Fetch the packages from the FTP site, CD-ROM whatever. The filenames have the form name--pkg.tar.gz and are gzipped tar files. For a fresh install it is sufficient to untar the file at the top of the -package hierarchy. For example if we are installing the 'xemacs-base' -package in version 1.27: +package hierarchy. + +Note: If you are upgrading packages already installed, it's best to +remove the old package first (see 'Upgrading/Removing Packages' below). + +For example if we are installing the 'xemacs-base' +package (version 1.48): + + mkdir $prefix/lib/xemacs/xemacs-packages RET # if it does not exist yet + cd $prefix/lib/xemacs/xemacs-packages RET + gunzip -c /path/to/xemacs-base-1.48-pkg.tar.gz | tar xvf - RET -mkdir $prefix/lib/xemacs/xemacs-packages # if it does not exist yet -cd $prefix/lib/xemacs/xemacs-packages -gunzip -c ...../xemacs-base-1.27-pkg.tar.gz | tar xf - +Or if you have GNU tar, the last step can be: -For MULE related packages, it is best to untar in the mule-packages -hierarchy, i.e. for the mule-base package, version 1.25 + tar zxvf /path/to/xemacs-base-1.48-pkg.tar.gz RET -mkdir $prefix/lib/xemacs/mule-packages # if it does not exist yet -cd $prefix/lib/xemacs/mule-packages -gunzip -c ...../mule-base-1.25-pkg.tar.gz | tar xf - +For MULE related packages, it is best to untar into the mule-packages +hierarchy, i.e. for the mule-base package, version 1.37: -Installing automatically ------------------------- + mkdir $prefix/lib/xemacs/mule-packages RET # if it does not exist yet + cd $prefix/lib/xemacs/mule-packages RET + gunzip -c /path/to/mule-base-1.37-pkg.tar.gz | tar xvf - RET + +Or if you have GNU tar, the last step can be: + + tar zxvf /path/to/mule-base-1.37-pkg.tar.gz RET + + +** Automatically, using the package tools from XEmacs +----------------------------------------------------- XEmacs comes with some tools to make the periodic updating and installing easier. It will notice if new packages or versions are -available and will fetch them from the ftp site. +available and will fetch them from the FTP site. Unfortunately this requires that a few packages are already in place. You will have to install them by hand as above or use a SUMO tarball. This requirement will hopefully go away in the future. The packages you need are: - efs - To fetch the files from the ftp site or mirrors. + efs - To fetch the files from the FTP site or mirrors. xemacs-base - Needed by efs. and optionally: - mailcrypt - If you have PGP installed and want to verify the - signature of the index file. mule-base - Needed if you want to use XEmacs with MULE. -After installing these by hand, you can start XEmacs. (It is a good -idea to use 'xemacs -vanilla' here as your startup files might need -things now moved to packages.) +After installing these by hand, fire up XEmacs and follow these +steps. - - First you need to specify an FTP site to use. - Use Options->Manage Packages->Add Download Site - or M-x customize-variable RET package-get-remote RET +Note: The menus in XEmacs 21.2.x and up have changed slightly, so +where I mention "Options -> Manage Packages", substitute "Tools -> +Packages". - Alternatively, if you already have the packages on a local disk - then you can specify this directly using 'M-x - pui-add-install-directory'. Please make sure you also have a - corresponding copy of the package index there. + (1) Choose a download site. + - via menu: Options -> Manages Packages -> Add Download Site + - via keyb: M-x customize-variable RET package-get-remote RET + (put in the details of remote host and directory) - - Invoke Options->Manage Packages->List & Install - or M-x pui-list-packages RET - XEmacs will now first try to fetch a new version of the package - index from the FTP site. Depending on whether you are using - 'mailcrypt/PGP', you will get some question about keys to fetch or - whether to use the index without verifying the signature. If the - new index was different from the one already on disk, XEmacs will - offer you to overwrite the old index. + If the package tarballs _AND_ the package-index file are in a + local directory, you can: M-x pui-add-install-directory RET -- XEmacs will show you a buffer named "*Packages*" with an overview - of available and installed packages, including a short description. - In this buffer you can select which packages you want using the - mouse or using RET. + (2) Obtain a list of packages and display the list in a buffer named + "*Packages*". + - menu: Options -> Manage Packages -> List & Install + - keyb: M-x pui-list-packages RET -- When you are finished choosing packages, invoke - 'Packages->Install/Remove Select' from the menu or type 'x' to - begin installing packages. + XEmacs will now connect to the remote site and download the + latest package-index file. If you see an error about the + package-index entries not being PGP signed, you can safely + ignore this because PGP has not been integrated into the XEmacs + package tools yet. -After Installation ------------------- + The resulting buffer, "*Packages*" has brief instructions at the + end of the buffer. -New packages can only be used by XEmacs after a restart. + (3) Choose the packages you wish to install. + - mouse: Click button 2 on the package name. + - keyb: RET on the package name -Note to MULE users ------------------- + (4) Make sure you have everything you need. + - menu: Packages -> Add Required + - keyb: r -Unlike all other packages the mule-base package is used at build/dump -time. This means that you need this available before compiling XEmacs -with MULE. Also it is a good idea to keep packages that are -MULE-only separate by putting them in the mule-packages hierarchy. + XEmacs will now search for packages that are required by the + ones that you have chosen to install and offer to select + those packages also. -Which Packages to install? --------------------------- + For novices and gurus alike, this step can save your bacon. + It's easy to forget to install a critical package. + + (5) Download and install the packages. + - menu: Packages -> Install/Remove Selected + - keyb: x + +* After Installation +-------------------- + +New packages can only be used by XEmacs after a restart. + +* Which Packages to install? +---------------------------- This is difficult to say. When in doubt install a package. If you administrate a big site it might be a good idea to just install @@ -198,15 +234,18 @@ xemacs-base, xemacs-devel, c-support, cc-mode, debug, dired, efs, edit-utils, fsf-compat, mail-lib, net-utils, os-utils, prog-modes, text-modes, time -Unfortunately the package system currently provides neither -dependencies nor conflicts. This will be a future enhancement. The -above set includes most packages that are used by others. +If you are using the XEmacs package tools, don't forget to do: + + Packages -> Add Required + +To make sure you have everything that the packages you have chosen to +install need. See also '.../etc/PACKAGES' for further descriptions of the individual -packages (currently outdated). +packages. -Upgrading/Removing Packages ---------------------------- +* Upgrading/Removing Packages +----------------------------- As the exact files and their locations contained in a package may change it is recommended to remove a package first before installing a @@ -218,28 +257,32 @@ remove a package using this file. Note that the interactive package tools included with XEmacs already do this for you. -User Package directories ------------------------- +* User Package directories +-------------------------- In addition to the system wide packages, each user can have his own packages installed in "~/.xemacs/xemacs-packages". If you want to install packages there using the interactive tools, you need to set 'pui-package-install-dest-dir' to "~/.xemacs/xemacs-packages" -Site lisp/Site start --------------------- +* Site lisp/Site start +---------------------- The site-packages hierarchy replaces the old 'site-lisp' directory. XEmacs no longer looks into a 'site-lisp' directly by default. A good place to put 'site-start.el' would be in $prefix/lib/xemacs/site-packages/lisp/ -Finding the right packages --------------------------- +* Finding the right packages +---------------------------- If you want to find out which package contains the functionality you are looking for, use M-x package-get-package-provider, and give it a -symbol that is likely to be in that package. For example, if some -code you want to use has a (require 'thingatpt) in it, try doing -M-x package-get-package-provider RET thingatpt , which will return -something like: (fsf-compat "1.06"). +symbol that is likely to be in that package. + +For example, if some code you want to use has a (require 'thingatpt) +in it: + + M-x package-get-package-provider RET thingatpt RET + +which will return something like: (fsf-compat "1.08"). diff --git a/etc/PACKAGES b/etc/PACKAGES index 7251e06..f958692 100644 --- a/etc/PACKAGES +++ b/etc/PACKAGES @@ -1,322 +1,324 @@ -* Description of available packages by category -=============================================== + -*- Outline -*- +This file is in Outline mode. It is best viewed under XEmacs. -This data is up-to-date as of 10 February 1999. +Press C-c C-o (Ctrl+c Ctrl+o) now to see a list of headings. + To expand a heading: Put the cursor on the heading and press C-c C-s +To collapse a heading: Press C-c C-d + +For general XEmacs navigation tips: Press C-h t + +Description of available packages by category +============================================= +This data is up-to-date as of January 17, 2001. ** Library Packages (libs) ========================== - These packages are required to build and support most of the rest of XEmacs. By design, xemacs-base is a `regular' package. Use restraint when adding new files there as it is required by almost everything. *** Sun - Support for Sparcworks. *** apel - A Portable Emacs Library. Used by XEmacs MIME support. -*** edebug - -A Lisp debugger. - *** dired - The DIRectory EDitor is for manipulating, and running commands on files in a directory. -*** efs +*** edebug +A Lisp debugger. +*** efs Treat files on remote systems the same as local files. -*** mail-lib +*** elib +Portable Emacs Lisp utilities library. + +*** fsf-compat +FSF Emacs compatibility files. +*** mail-lib Fundamental lisp files for providing email support. -*** tooltalk +*** sounds-au +XEmacs Sun sound files. + +*** sounds-wav +XEmacs Microsoft sound files. +*** tooltalk Support for building with Tooltalk. *** xemacs-base - Fundamental XEmacs support. Install this unless you wish a totally naked XEmacs. *** xemacs-devel - XEmacs Lisp developer support. This package contains utilities for supporting Lisp development. It is a single-file package so it may be tailored. ** Communications Packages (comm) ================================= - These packages provide support for various communications, primarily email and usenet. -*** footnote +*** bbdb +The Big Brother Data Base + +*** eicq +ICQ Client developed and tested on Linux x86; +only supported on that platform +*** eudc +Emacs Unified Directory Client (LDAP, PH). + +*** footnote Footnoting in mail message editing modes. *** gnats - XEmacs bug reports. *** gnus - The Gnus Newsreader and Mailreader. *** mailcrypt - Support for messaging encryption with PGP. -*** mh-e +*** mew +Messaging in an Emacs World. +*** mh-e Front end support for MH. *** net-utils - Miscellaneous Networking Utilities. This is a single-file package and files may be deleted at will. -*** ph - -Emacs implementation of the ph client to CCSO/qi directory servers. - *** rmail - An obsolete Emacs mailer. If you do not already use it don't start. *** supercite - An Emacs citation tool. Useful with all Emacs Mailers and Newsreaders. *** tm - -Emacs MIME support. +Emacs MIME support. Not needed for Gnus >= 5.8.0 *** vm - An Emacs mailer. *** w3 - A Web browser. +*** zenirc +ZENIRC IRC Client. + ** Games and Amusements (games) =============================== +All work and no play... *** cookie - Spook and Yow (Zippy quotes). *** games - Tetris, Sokoban, and Snake. *** mine - Minehunt. *** misc-games - Other amusements and diversions. ** Mule Support (mule) ====================== +MULti-lingual Enhancement. Support for world scripts such as +Latin, Arabic, Cyrillic, Chinese, Japanese, Greek, Hebrew etc. +To use these packages your XEmacs must be compiled with Mule +support. -*** egg-its +*** edict +Lisp Interface to EDICT, Kanji Dictionary. +*** egg-its Wnn (4.2 and 6) support. SJ3 support. Must be installed prior to XEmacs build. *** leim - Quail. Used for everything other than English and Japanese. *** locale - Used for localized menubars (French and Japanese) and localized splash screens (Japanese). -*** mule-base +*** lookup +Dictionary support +*** mule-base Basic Mule support. Must be installed prior to building with Mule. *** skk - Another Japanese Language Input Method. Can be used without a separate process running as a dictionary server. ** Productivity Packages (oa) ============================= +Things to make life a little easier. -*** calendar +*** calc +Emacs calculator. +*** calendar Calendar and diary support. *** edit-utils - Single file lisp packages for various XEmacs goodies. Load this and weed out the junk you don't want. *** forms - -Forms editing support (obsolete, use the builtin Widget instead). +Forms editing support (obsolete, use the built-in Widget instead). *** frame-icon - Provide a WM icon based on major mode. *** hm--html-menus - HTML editing. *** ispell - Spell-checking with ispell. *** pc - PC style interface emulation. *** psgml - Validated HTML/SGML editing. *** sgml - SGML/Linuxdoc-SGML editing. *** slider - User interface tool. *** speedbar - -??? Document me. +Provides a separate frame with convenient references. *** strokes - Mouse enhancement utility. *** text-modes - Various single file lisp packages for editing text files. *** time - Display time & date on the modeline. ** Operating System Utilities (os) ================================== +Tools for working with the operating system. -*** eterm +*** eshell +Command shell implemented entirely in Emacs Lisp. +*** eterm Terminal emulator. *** igrep - Enhanced front-end for Grep. *** ilisp - Front-end for Inferior Lisp. *** os-utils - Miscellaneous single-file O/S utilities, for printing, archiving, compression, remote shells, etc. -*** view-process +*** pcomplete +Provides programmatic completion. + +*** ps-print-nomule +Old, but no-Mule safe ps-print. +*** view-process A Unix process browsing tool. ** Program Editing Support (prog) ================================= +XEmacs supports a multitude of programming languages. These +packages will help your coding. *** ada - Ada language support. *** c-support - Basic single-file add-ons for editing C code. *** cc-mode - C, C++ and Java language support. *** debug - GUD, gdb, dbx debugging support. *** ediff - Interface over patch. *** emerge - Another interface over patch. -*** pcl-cvs +*** idlwave +Editing and Shell mode for the Interactive Data Language. + +*** jde +Java language and development support. +*** pcl-cvs CVS frontend. *** prog-modes - Miscellaneous single-file lisp files for various programming languages. *** scheme - Front-end support for Inferior Scheme. -*** sh-script +*** semantic +Semantic bovinator. +*** sh-script Support for editing shell scripts. *** vc - Version Control for Free systems. *** vc-cc - -Version Control for ClearCase. This package must be installed prior -to building XEmacs [broken as of XEmacs 20.5-beta19]. +Version Control for ClearCase. This package will shortly be +replaced with clearcase.el *** vhdl - Support for VHDL. ** Word Processing (wp) ======================= +Working with text. *** auctex - Basic TeX/LaTeX support. *** crisp - Crisp/Brief emulation. *** edt - DEC EDIT/EDT emulation. -*** texinfo +*** reftex +Emacs support for LaTeX cross-references, citations. +*** texinfo XEmacs TeXinfo support. *** textools - Single-file TeX support. *** tpu - DEC EDIT/TPU support. *** viper - VI emulation support. diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index ca78666..9b88cc1 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,16 @@ +2001-01-26 Martin Buchholz + + * XEmacs 21.2.43 "Terspichore" is released. + +2001-01-23 Jan Vroonhof + + * gnuserv.c: Add version number to object file. + +2001-01-20 Klaus Frank + + * gnuserv.c (permitted): Completed the checks of the authentication + data length, replaced memcmp() by constant-time comparision. + 2001-01-20 Martin Buchholz * XEmacs 21.2.42 "Poseidon" is released. diff --git a/lib-src/gnuclient.c b/lib-src/gnuclient.c index 58588f6..9901186 100644 --- a/lib-src/gnuclient.c +++ b/lib-src/gnuclient.c @@ -48,12 +48,10 @@ Boston, MA 02111-1307, USA. * ../etc/gnuserv.README relative to the directory containing this file) */ -#if 0 -/* Hand-munged RCS header */ -static char rcsid [] = "!Header: gnuclient.c,v 2.2 95/12/12 01:39:21 wing nene !"; -#endif - #include "gnuserv.h" + +char gnuserv_version[] = "gnuclient version " GNUSERV_VERSION; + #include "getopt.h" #include diff --git a/lib-src/gnuserv.c b/lib-src/gnuserv.c index 419baa8..b90443d 100644 --- a/lib-src/gnuserv.c +++ b/lib-src/gnuserv.c @@ -29,12 +29,11 @@ * ../etc/gnuserv.README relative to the directory containing this file) */ -#if 0 -static char rcsid [] = "!Header: gnuserv.c,v 2.1 95/02/16 11:58:27 arup alpha !"; -#endif - #include "gnuserv.h" +char gnuserv_version[] = "gnuserv version" GNUSERV_VERSION; + + #ifdef USE_LITOUT #ifdef linux #include @@ -459,6 +458,8 @@ permitted (u_long host_addr, int fd) char auth_protocol[128]; char buf[1024]; int auth_data_len; + int auth_data_pos; + int auth_mismatches; if (fd > 0) { @@ -491,15 +492,34 @@ permitted (u_long host_addr, int fd) auth_data_len = atoi(buf); + if (auth_data_len <= 0 || auth_data_len > sizeof(buf)) + { + return FALSE; + } + if (timed_read(fd, buf, auth_data_len, AUTH_TIMEOUT, 0) != auth_data_len) return FALSE; #ifdef AUTH_MAGIC_COOKIE - if (server_xauth && server_xauth->data && - !memcmp(buf, server_xauth->data, auth_data_len)) - { + if (server_xauth && server_xauth->data) + { + /* Do a compare without comprising info about + the size of the cookie */ + auth_mismatches = + ( auth_data_len ^ + server_xauth->data_length ); + + for(auth_data_pos=0; auth_data_pos < auth_data_len; ++auth_data_pos) + auth_mismatches |= + ( buf[auth_data_pos] ^ + server_xauth->data[auth_data_pos % server_xauth->data_length]); + + if (auth_mismatches == 0) return TRUE; - } + + for(;rand() % 1000;); + } + #else printf ("client tried Xauth, but server is not compiled with Xauth\n"); #endif diff --git a/lib-src/gnuserv.h b/lib-src/gnuserv.h index d9298c8..05eed4a 100644 --- a/lib-src/gnuserv.h +++ b/lib-src/gnuserv.h @@ -30,9 +30,7 @@ * ../etc/gnuserv.README relative to the directory containing this file) */ -#if 0 -static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup alpha !"; -#endif +#define GNUSERV_VERSION "3.12" #define USE_TMPDIR diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a50f7c8..28af59c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2001-01-26 Martin Buchholz + + * XEmacs 21.2.43 "Terspichore" is released. + +2001-01-20 Klaus Frank + + * gnuserv.el (gnuserv-process-filter): Robuster handling of error + messages from gnuserv. + 2001-01-20 Martin Buchholz * XEmacs 21.2.42 "Poseidon" is released. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index b6317b3..b27db59 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -304,7 +304,8 @@ Return a list suitable for use in `interactive'." obarray (lambda (symbol) (and (boundp symbol) (or (get symbol 'custom-type) - (user-variable-p symbol)))) t)) + (user-variable-p symbol)))) + t nil nil (and v (symbol-name v)))) (list (if (equal val "") (if (symbolp v) v nil) (intern val))))) diff --git a/lisp/gnuserv.el b/lisp/gnuserv.el index 04bf42a..01128a9 100644 --- a/lisp/gnuserv.el +++ b/lisp/gnuserv.el @@ -1,7 +1,7 @@ ;;; gnuserv.el --- Lisp interface code between Emacs and gnuserv ;; Copyright (C) 1989-1997 Free Software Foundation, Inc. -;; Version: 3.11 +;; Version: 3.12 ;; Author: Andy Norman (ange@hplb.hpl.hp.com), originally based on server.el ;; Hrvoje Niksic ;; Maintainer: Jan Vroonhof , @@ -337,8 +337,8 @@ visual screen. Totally visible frames are preferred. If none found, return nil "Process gnuserv client requests to execute Emacs commands." (setq gnuserv-string (concat gnuserv-string string)) ;; C-d means end of request. - (when (string-match "\C-d\\'" gnuserv-string) - (cond ((string-match "^[0-9]+" gnuserv-string) ; client request id + (when (string-match "\C-d\n?\\'" gnuserv-string) + (cond ((string-match "\\`[0-9]+" gnuserv-string) ; client request id (let ((header (read-from-string gnuserv-string))) ;; Set the client we are talking to. (setq gnuserv-current-client (car header)) @@ -359,8 +359,9 @@ visual screen. Totally visible frames are preferred. If none found, return nil (signal 'quit nil))) (setq gnuserv-string ""))) (t - (error "%s: invalid response from gnuserv" gnuserv-string) - (setq gnuserv-string ""))))) + (let ((response (car (split-string gnuserv-string "\C-d")))) + (setq gnuserv-string "") + (error "%s: invalid response from gnuserv" response)))))) ;; This function is somewhat of a misnomer. Actually, we write to the ;; server (using `process-send-string' to gnuserv-process), which diff --git a/lisp/help.el b/lisp/help.el index b07aa17..a337b13 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -254,7 +254,7 @@ otherwise it is killed." ;; This is a grody hack of the same genotype as `advertised-undo'; if the ;; bindings of Backspace and C-h are the same, we want the menubar to claim -;; that `info' in invoked with `C-h i', not `BS i'. +;; that `info' is invoked with `C-h i', not `BS i'. (defun deprecated-help-command () (interactive) @@ -1517,7 +1517,8 @@ If INSERT (the prefix arg) is non-nil, insert the message in the buffer." val) (setq val (read-command (if fn (format "Where is command (default %s): " fn) - "Where is command: "))) + "Where is command: ") + (and fn (symbol-name fn)))) (list (if (equal (symbol-name val) "") fn val) current-prefix-arg))) diff --git a/lisp/info.el b/lisp/info.el index 3186cdb..be66af1 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2430,7 +2430,8 @@ This command is designed to be used whether you are already in Info or not." (if fn (format " (default %s)" fn) "")) - obarray 'fboundp t)) + obarray 'fboundp t + nil nil (and fn (symbol-name fn)))) (list (if (equal val "") fn (intern val))))) (save-window-excursion diff --git a/lisp/replace.el b/lisp/replace.el index ec2ce62..fc5a02c 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -416,7 +416,8 @@ It serves as a menu to find any of the occurrences in this buffer. ;; rewritten for I18N3 snarfing (read-from-minibuffer (format "List lines matching regexp (default `%s'): " - default) nil nil nil 'regexp-history) + default) nil nil nil 'regexp-history nil + default) (read-from-minibuffer "List lines matching regexp: " nil nil nil diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 0d982b7..d81bceb 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,7 @@ +2001-01-26 Martin Buchholz + + * XEmacs 21.2.43 "Terspichore" is released. + 2001-01-20 Martin Buchholz * XEmacs 21.2.42 "Poseidon" is released. diff --git a/man/ChangeLog b/man/ChangeLog index da16c29..e59e0ef 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2001-01-26 Martin Buchholz + + * XEmacs 21.2.43 "Terspichore" is released. + 2001-01-20 Martin Buchholz * XEmacs 21.2.42 "Poseidon" is released. diff --git a/man/lispref/extents.texi b/man/lispref/extents.texi index d9c852c..bbe777d 100644 --- a/man/lispref/extents.texi +++ b/man/lispref/extents.texi @@ -832,7 +832,7 @@ Specifically: When a string is created using @code{buffer-substring} or @code{buffer-string}, any duplicable extents in the region corresponding to the string will be copied into the string (@pxref{Buffer -Contents}). When the string in inserted into a buffer using +Contents}). When the string is inserted into a buffer using @code{insert}, @code{insert-before-markers}, @code{insert-buffer} or @code{insert-buffer-substring}, the extents in the string will be copied back into the buffer (@pxref{Insertion}). The extents in a string can, diff --git a/netinstall/ChangeLog b/netinstall/ChangeLog index d9bd985..b8abee8 100644 --- a/netinstall/ChangeLog +++ b/netinstall/ChangeLog @@ -1,3 +1,15 @@ +2001-01-26 Martin Buchholz + + * XEmacs 21.2.43 "Terspichore" is released. + +2001-01-21 Andy Piper + + * Makefile.in.in (%.o): use CXX to compile + + * res.rc: beautify download status and install status. + + * nio-ftp.cc: use xemacs-setup user for identity. + 2001-01-20 Martin Buchholz * XEmacs 21.2.42 "Poseidon" is released. @@ -175,5 +187,5 @@ * all: port from cygwin setup. -%%% $Id: ChangeLog,v 1.1.2.11 2001/01/17 21:54:32 andyp Exp $ -$Revision: 1.1.2.11 $ +%%% $Id: ChangeLog,v 1.1.2.14 2001/01/24 09:22:31 andyp Exp $ +$Revision: 1.1.2.14 $ diff --git a/netinstall/Makefile.in.in b/netinstall/Makefile.in.in index 200fe36..7ea3eb2 100644 --- a/netinstall/Makefile.in.in +++ b/netinstall/Makefile.in.in @@ -176,7 +176,7 @@ version.c : $(srcdir)/ChangeLog Makefile $(CC) $(MINGW_CFLAGS) -c -o $@ ${srcdir}/$< %.o: %.cc - $(CC) $(MINGW_CXXFLAGS) -c -o $@ ${srcdir}/$< + $(CXX) $(MINGW_CXXFLAGS) -c -o $@ ${srcdir}/$< iniparse.c iniparse.h : iniparse.y bison -d -o iniparse.c $(srcdir)/iniparse.y diff --git a/netinstall/nio-ftp.cc b/netinstall/nio-ftp.cc index f30beb6..cd4c3a3 100644 --- a/netinstall/nio-ftp.cc +++ b/netinstall/nio-ftp.cc @@ -73,7 +73,7 @@ NetIO_FTP::NetIO_FTP (char *Purl) code = ftp_line (c); if (code == 331) { - c->printf ("PASS cygwin-setup@\r\n"); + c->printf ("PASS xenacs-setup@\r\n"); code = ftp_line (c); } diff --git a/netinstall/res.rc b/netinstall/res.rc index 2d59534..170aa9d 100644 --- a/netinstall/res.rc +++ b/netinstall/res.rc @@ -142,7 +142,7 @@ BEGIN CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 END -IDD_NET DIALOGEX 0, 0, 311, 201 +IDD_NET DIALOG 0, 0, 311, 201 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "XEmacs Setup" FONT 8, "MS Sans Serif" @@ -174,41 +174,46 @@ BEGIN CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 END -IDD_DLSTATUS DIALOG DISCARDABLE 0, 0, 215, 95 +IDD_DLSTATUS DIALOG DISCARDABLE 0, 0, 311, 201 STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "XEmacs Setup" FONT 8, "MS Sans Serif" BEGIN - PUSHBUTTON "Cancel",IDCANCEL,165,75,45,15 - LTEXT "Downloading...",IDC_STATIC,55,15,135,8 - LTEXT "(URL)",IDC_DLS_URL,55,30,150,8 - LTEXT "(RATE)",IDC_DLS_RATE,55,45,155,8 + PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 + LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP + LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP + LTEXT "Downloading Packages",IDC_STATIC,112,10,170,17 + LTEXT "(URL)",IDC_DLS_URL,112,26,170,11 + LTEXT "(RATE)",IDC_DLS_RATE,112,41,166,11 CONTROL "Progress1",IDC_DLS_PROGRESS,"msctls_progress32", - PBS_SMOOTH | WS_BORDER,55,60,155,10 - ICON IDI_XEMACS,IDC_STATIC,5,5,20,20 + WS_BORDER,123,143,165,10 + GROUPBOX "Progress",IDC_STATIC,112,130,186,31 + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 END -IDD_INSTATUS DIALOG DISCARDABLE 0, 0, 215, 95 +IDD_INSTATUS DIALOG DISCARDABLE 0, 0, 311, 201 STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "XEmacs Setup" FONT 8, "MS Sans Serif" BEGIN - PUSHBUTTON "Cancel",IDCANCEL,165,75,45,15 - LTEXT "Installing...",IDC_INS_ACTION,55,5,135,8 - LTEXT "(PKG)",IDC_INS_PKG,55,15,150,8 - LTEXT "(FILE)",IDC_INS_FILE,55,25,155,8 + PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 + LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP + LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP + LTEXT "Installing Packages",IDC_STATIC,112,10,170,17 + LTEXT "(PKG)",IDC_INS_PKG,112,26,170,11 + LTEXT "(FILE)",IDC_INS_FILE,112,41,166,11 CONTROL "Progress1",IDC_INS_DISKFULL,"msctls_progress32", - PBS_SMOOTH | WS_BORDER,55,60,155,10 - ICON IDI_XEMACS,IDC_STATIC,5,5,20,20 + WS_BORDER,123,143,165,10 CONTROL "Progress1",IDC_INS_IPROGRESS,"msctls_progress32", - PBS_SMOOTH | WS_BORDER,55,50,155,10 + WS_BORDER,125,106,163,10 CONTROL "Progress1",IDC_INS_PPROGRESS,"msctls_progress32", - PBS_SMOOTH | WS_BORDER,55,40,155,10 - RTEXT "Package",IDC_STATIC,5,40,45,8 - RTEXT "Total",IDC_STATIC,10,50,40,8 - RTEXT "Disk",IDC_STATIC,5,60,45,8 + WS_BORDER,125,67,163,10 + GROUPBOX "Disk",IDC_STATIC,112,130,186,31 + GROUPBOX "Package",IDC_STATIC,112,54,186,31 + GROUPBOX "Total",IDC_STATIC,112,93,186,31 + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 END IDD_PROXY_AUTH DIALOG DISCARDABLE 0, 0, 215, 95 @@ -245,7 +250,7 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,165,75,45,15 END -IDD_SPLASH DIALOGEX 0, 0, 311, 201 +IDD_SPLASH DIALOG 0, 0, 311, 201 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "XEmacs Setup" FONT 8, "MS Sans Serif" @@ -394,6 +399,13 @@ BEGIN HORZGUIDE, 153 END + IDD_INSTATUS, DIALOG + BEGIN + VERTGUIDE, 112 + VERTGUIDE, 125 + VERTGUIDE, 288 + END + IDD_PROXY_AUTH, DIALOG BEGIN BOTTOMMARGIN, 49 @@ -437,7 +449,7 @@ IDB_RTARROW BITMAP DISCARDABLE "choose-rtarrow.bmp" IDB_CHECK_YES BITMAP DISCARDABLE "check-yes.bmp" IDB_CHECK_NO BITMAP DISCARDABLE "check-no.bmp" IDB_CHECK_NA BITMAP DISCARDABLE "check-na.bmp" -GNU BITMAP DISCARDABLE "gnu.bmp" +GNU BITMAP DISCARDABLE "gnu.bmp" IDB_GNU BITMAP DISCARDABLE "gnu.bmp" ///////////////////////////////////////////////////////////////////////////// @@ -466,7 +478,7 @@ BEGIN IDS_ERR_OPEN_READ "Can't open %s for reading: %s" IDS_ROOT_ABSOLUTE "The install directory must be absolute, with both a drive letter and leading slash, like C:\\Cygwin" IDS_DOWNLOAD_COMPLETE "Download Complete" - IDS_CVSID "\n%%% $Id: res.rc,v 1.1.2.3 2000/12/27 09:35:11 andyp Exp $\n" + IDS_CVSID "\n%%% $Id: res.rc,v 1.1.2.4 2001/01/24 09:18:30 andyp Exp $\n" IDS_NOLOGFILE "Cannot open log file %s for writing" IDS_UNINSTALL_COMPLETE "Uninstalls complete." IDS_WININET "Unable to find or load the Internet Explorer 5 DLLs" @@ -482,24 +494,6 @@ END ///////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////// -// English (U.K.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -#endif // English (U.K.) resources -///////////////////////////////////////////////////////////////////////////// - - #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// diff --git a/nt/ChangeLog b/nt/ChangeLog index b4ee642..e103bcd 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2001-01-26 Martin Buchholz + + * XEmacs 21.2.43 "Terspichore" is released. + 2001-01-20 Martin Buchholz * XEmacs 21.2.42 "Poseidon" is released. diff --git a/src/ChangeLog b/src/ChangeLog index 0df0a61..8c0c82a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,111 @@ +2001-01-26 Martin Buchholz + + * XEmacs 21.2.43 "Terspichore" is released. + +2001-01-25 Martin Buchholz + + Type fiddling for window_config.saved_windows_count + * window.c (struct window_config): + Make saved_windows_count member unsigned. + * window.c (sizeof_window_config_for_n_windows): + Make parameter unsigned. + * window.c (mark_window_config): + * window.c (window_config_equal): + * window.c (free_window_configuration): + * window.c (Fset_window_configuration): + * window.c (count_windows): + * window.c (Fcurrent_window_configuration): + * window.c (reinit_vars_of_window): + Update all callers and users. + +2001-01-25 Martin Buchholz + + Alignment correctness for flexible arrays. + * lisp.h (FLEXIBLE_ARRAY_STRUCT_SIZEOF): + Make alignment-correct. Add interesting comments. + * alloc.c (size_vector): + * alloc.c (make_vector_internal): + * alloc.c (make_bit_vector_internal): + * alloc.c (sweep_bit_vectors_1): + * fns.c (size_bit_vector): + Update all callers of FLEXIBLE_ARRAY_STRUCT_SIZEOF to add new arg. + * window.c (sizeof_window_config_for_n_windows): + Use FLEXIBLE_ARRAY_STRUCT_SIZEOF. + +2001-01-24 Martin Buchholz + + * lread.c (read1): Rename `fexp', which is #defined in SGI's math.h + +2001-01-23 Andy Piper + + * select.c (Fown_selection_internal): pass owned_p + + * select-msw.c (mswindows_own_selection): New Signature. + + * console.h (struct console_methods): add owned_p to + _own_selection. + + * select-x.c (x_own_selection): pass owned_p + (hack_motif_clipboard_selection): use owned_p + (vars_of_select_x): new variable - + x_selection_strict_motif_ownership. + +2001-01-23 Martin Buchholz + + * specifier.h (specifier_data_offset): Remove pointless parens. + * glyphs.h (IMAGE_SPECIFIER_DATA): Likewise. + +2001-01-24 Martin Buchholz + + Make Lisp_Object sizeof methods be alignment-correct. + pdump must restore objects to the same alignment as the C compiler + assumes. It really matters on SGIs. + * lstream.c (aligned_sizeof_lstream): New. + (sizeof_lstream): Use aligned_sizeof_lstream. + (Lstream_new): Likewise. + * opaque.c (aligned_sizeof_opaque): New. + (sizeof_opaque): Use aligned_sizeof_opaque. + (make_opaque): Likewise. + * specifier.c (aligned_sizeof_specifier): New. + (sizeof_specifier): Use aligned_sizeof_specifier. + (make_specifier_internal): Likewise. + +2001-01-23 Martin Buchholz + + * lstream.h (struct lstream): Use max_align_t for trailing data. + * specifier.h (struct Lisp_Specifier): Likewise. + +2001-01-22 Martin Buchholz + + * mule-ccl.c (CCL_Extension): Renamed from CCL_Extention. + (CCL_SUCCESS): Kludge to prevent Sun cc compiler warnings. + (CCL_SUSPEND): Likewise. + (CCL_INVALID_CMD): Likewise. + (CCL_CALL_FOR_MAP_INSTRUCTION): Likewise. + (ccl_driver): Likewise. + (CCL_WRITE_CHAR): Macro hygiene. + (CCL_WRITE_STRING): Macro hygiene. + +2001-01-22 Martin Buchholz + + Port "portable" dumper to SunOS 4 and HP-UX. + * s/aix4.h (AIX4): Move MAP_FAILED definition elsewhere. + * emacs.c (main): PDUMP implies no RUN_TIME_REMAP. + * dumper.c (pdump_file_get): Define MAP_FAILED if not already defined. + +2001-01-22 Martin Buchholz + + * lisp.h (ALIGNOF): A better definition for C++. + +2001-01-20 Martin Buchholz + + Macro hygiene. + Fix printf warnings: int format, long int arg. + * regex.c (DECLARE_DESTINATION): Use DECLARE_NOTHING. + (PUSH_FAILURE_POINT): Use correct printf formats. + (POP_FAILURE_POINT): Use correct printf formats. + Use do {...} while (0) + 2001-01-20 Martin Buchholz * XEmacs 21.2.42 "Poseidon" is released. @@ -596,7 +704,7 @@ (fast_string_match): Ditto. (search_command): Ditto. (search_buffer): Separate boyer_moore. Check whether - boyer_moore is poosible. + boyer_moore is possible. (simple_search): New function. (boyer_moore): Separated from search_buffer. Translate char. diff --git a/src/alloc.c b/src/alloc.c index ddd884a..37bc28a 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1043,7 +1043,7 @@ mark_vector (Lisp_Object obj) static size_t size_vector (const void *lheader) { - return FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Vector, contents, + return FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Vector, Lisp_Object, contents, ((Lisp_Vector *) lheader)->size); } @@ -1091,7 +1091,8 @@ static Lisp_Vector * make_vector_internal (size_t sizei) { /* no vector_next */ - size_t sizem = FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Vector, contents, sizei); + size_t sizem = FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Vector, Lisp_Object, + contents, sizei); Lisp_Vector *p = (Lisp_Vector *) alloc_lcrecord (sizem, &lrecord_vector); p->size = sizei; @@ -1254,7 +1255,8 @@ static Lisp_Bit_Vector * make_bit_vector_internal (size_t sizei) { size_t num_longs = BIT_VECTOR_LONG_STORAGE (sizei); - size_t sizem = FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Bit_Vector, bits, num_longs); + size_t sizem = FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Bit_Vector, unsigned long, + bits, num_longs); Lisp_Bit_Vector *p = (Lisp_Bit_Vector *) allocate_lisp_storage (sizem); set_lheader_implementation (&p->lheader, &lrecord_bit_vector); @@ -2575,8 +2577,8 @@ sweep_bit_vectors_1 (Lisp_Object *prev, total_size += len; total_storage += MALLOC_OVERHEAD + - FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Bit_Vector, bits, - BIT_VECTOR_LONG_STORAGE (len)); + FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Bit_Vector, unsigned long, + bits, BIT_VECTOR_LONG_STORAGE (len)); num_used++; /* #### May modify next on a C_READONLY bitvector */ prev = &(bit_vector_next (v)); diff --git a/src/console.h b/src/console.h index ae47a43..1f32f8c 100644 --- a/src/console.h +++ b/src/console.h @@ -97,7 +97,8 @@ struct console_methods Lisp_Object (*own_selection_method)(Lisp_Object selection_name, Lisp_Object selection_value, Lisp_Object how_to_add, - Lisp_Object selection_type); + Lisp_Object selection_type, + int owned_p); void (*disown_selection_method)(Lisp_Object selection_name, Lisp_Object timeval); Lisp_Object (*get_foreign_selection_method) (Lisp_Object selection_symbol, diff --git a/src/data.c b/src/data.c index 6239dd7..09cc4fd 100644 --- a/src/data.c +++ b/src/data.c @@ -1943,7 +1943,7 @@ DEFUN ("make-weak-list", Fmake_weak_list, 0, 1, 0, /* Return a new weak list object of type TYPE. A weak list object is an object that contains a list. This list behaves like any other list except that its elements do not count towards -garbage collection -- if the only pointer to an object in inside a weak +garbage collection -- if the only pointer to an object is inside a weak list (other than pointers in similar objects such as weak hash tables), the object is garbage collected and automatically removed from the list. This is used internally, for example, to manage the list holding the diff --git a/src/dumper.c b/src/dumper.c index 4118809..137ce96 100644 --- a/src/dumper.c +++ b/src/dumper.c @@ -1249,6 +1249,11 @@ pdump_file_get (const char *path) lseek (fd, 0, SEEK_SET); #ifdef HAVE_MMAP +/* Unix 98 requires that sys/mman.h define MAP_FAILED, + but many earlier implementations don't. */ +# ifndef MAP_FAILED +# define MAP_FAILED ((void *) -1L) +# endif pdump_start = (char *) mmap (0, pdump_length, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); if (pdump_start != (char *) MAP_FAILED) { @@ -1256,7 +1261,7 @@ pdump_file_get (const char *path) close (fd); return 1; } -#endif +#endif /* HAVE_MMAP */ pdump_mallocadr = xmalloc (pdump_length+255); pdump_free = pdump_file_free; diff --git a/src/emacs.c b/src/emacs.c index 980c2fb..d10e505 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2645,7 +2645,7 @@ main (int argc, char **argv, char **envp) #endif /* _SCO_DS */ vol_envp = environ; } -#ifdef RUN_TIME_REMAP +#if defined (RUN_TIME_REMAP) && ! defined (PDUMP) else /* obviously no-one uses this because where it was before initialized was *always* true */ diff --git a/src/fns.c b/src/fns.c index fc1d700..95ce145 100644 --- a/src/fns.c +++ b/src/fns.c @@ -113,7 +113,7 @@ static size_t size_bit_vector (const void *lheader) { Lisp_Bit_Vector *v = (Lisp_Bit_Vector *) lheader; - return FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Bit_Vector, bits, + return FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Bit_Vector, unsigned long, bits, BIT_VECTOR_LONG_STORAGE (bit_vector_length (v))); } diff --git a/src/glyphs.h b/src/glyphs.h index d9c64d4..5903f1c 100644 --- a/src/glyphs.h +++ b/src/glyphs.h @@ -405,7 +405,7 @@ struct image_specifier Lisp_Object attachee_property;/* property of that face or glyph */ }; -#define IMAGE_SPECIFIER_DATA(g) (SPECIFIER_TYPE_DATA (g, image)) +#define IMAGE_SPECIFIER_DATA(g) SPECIFIER_TYPE_DATA (g, image) #define IMAGE_SPECIFIER_ALLOWED(g) (IMAGE_SPECIFIER_DATA (g)->allowed) #define IMAGE_SPECIFIER_ATTACHEE(g) (IMAGE_SPECIFIER_DATA (g)->attachee) #define IMAGE_SPECIFIER_ATTACHEE_PROPERTY(g) \ diff --git a/src/lisp.h b/src/lisp.h index 2963e99..2f16b85 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -216,13 +216,10 @@ typedef union "Types must be declared in declarations, not in expressions." */ # define ALIGNOF(type) offsetof (struct { char c; type member; }, member) # else -/* The following should be completely portable, but might give values - that are larger than necessary. But never larger than the maximum - possible alignment. */ -# define ALIGNOF(type) \ -((sizeof (type) % sizeof (max_align_t)) == 0 ? \ - sizeof (max_align_t) : \ - (sizeof (type) % sizeof (max_align_t))) +/* C++ is annoying, but it has a big bag of tricks. + The following doesn't have the "inside out" declaration bug C does. */ +template struct alignment_trick { char c; T member; }; +# define ALIGNOF(type) offsetof (alignment_trick, member) # endif #endif /* ALIGNOF */ @@ -1203,14 +1200,28 @@ void set_string_char (Lisp_String *s, Charcount i, Emchar c); #endif /* not MULE */ -/* Return the true size of a struct with a variable-length array field. */ -#define FLEXIBLE_ARRAY_STRUCT_SIZEOF(flexible_array_structtype, \ - flexible_array_field, \ - flexible_array_length) \ - (offsetof (flexible_array_structtype, flexible_array_field) + \ - (offsetof (flexible_array_structtype, flexible_array_field[1]) - \ - offsetof (flexible_array_structtype, flexible_array_field[0])) * \ - (flexible_array_length)) +/* Return the true aligned size of a struct whose last member is a + variable-length array field. (this is known as the "struct hack") */ +/* Implementation: in practice, structtype and fieldtype usually have + the same alignment, but we can't be sure. We need to use + ALIGN_SIZE to be absolutely sure of getting the correct alignment. + To help the compiler's optimizer, we use a ternary expression that + only a very stupid compiler would fail to correctly simplify. */ +#define FLEXIBLE_ARRAY_STRUCT_SIZEOF(structtype, \ + fieldtype, \ + fieldname, \ + array_length) \ +(ALIGNOF (structtype) == ALIGNOF (fieldtype) \ + ? (offsetof (structtype, fieldname) + \ + (offsetof (structtype, fieldname[1]) - \ + offsetof (structtype, fieldname[0])) * \ + (array_length)) \ + : (ALIGN_SIZE \ + ((offsetof (structtype, fieldname) + \ + (offsetof (structtype, fieldname[1]) - \ + offsetof (structtype, fieldname[0])) * \ + (array_length)), \ + ALIGNOF (structtype)))) /*------------------------------ vector --------------------------------*/ diff --git a/src/lread.c b/src/lread.c index 4a995ba..b8d88bb 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2501,15 +2501,15 @@ retry: case '+': case '-': { - Lisp_Object fexp, obj, tem; + Lisp_Object feature_exp, obj, tem; struct gcpro gcpro1, gcpro2; - fexp = read0(readcharfun); + feature_exp = read0(readcharfun); obj = read0(readcharfun); /* the call to `featurep' may GC. */ - GCPRO2 (fexp, obj); - tem = call1 (Qfeaturep, fexp); + GCPRO2 (feature_exp, obj); + tem = call1 (Qfeaturep, feature_exp); UNGCPRO; if (c == '+' && NILP(tem)) goto retry; diff --git a/src/lstream.c b/src/lstream.c index 878449e..d413800 100644 --- a/src/lstream.c +++ b/src/lstream.c @@ -179,11 +179,17 @@ finalize_lstream (void *header, int for_disksave) } } +inline static size_t +aligned_sizeof_lstream (size_t lstream_type_specific_size) +{ + return ALIGN_SIZE (offsetof (Lstream, data) + lstream_type_specific_size, + ALIGNOF (max_align_t)); +} + static size_t sizeof_lstream (const void *header) { - const Lstream *lstr = (const Lstream *) header; - return sizeof (*lstr) + lstr->imp->size - 1; + return aligned_sizeof_lstream (((const Lstream *) header)->imp->size); } DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("stream", lstream, @@ -231,15 +237,15 @@ Lstream_new (const Lstream_implementation *imp, const char *mode) assert (lstream_type_count < countof (lstream_types)); lstream_types[lstream_type_count] = imp; Vlstream_free_list[lstream_type_count] = - make_lcrecord_list (sizeof (*p) + imp->size - 1, + make_lcrecord_list (aligned_sizeof_lstream (imp->size), &lrecord_lstream); lstream_type_count++; } p = XLSTREAM (allocate_managed_lcrecord (Vlstream_free_list[i])); /* Zero it out, except the header. */ - memset ((char *) p + sizeof (p->header), 0, - sizeof (*p) - sizeof (p->header) + imp->size - 1); + memset ((char *) p + sizeof (p->header), '\0', + aligned_sizeof_lstream (imp->size) - sizeof (p->header)); p->imp = imp; Lstream_set_buffering (p, LSTREAM_BLOCK_BUFFERED, 0); p->flags = LSTREAM_FL_IS_OPEN; diff --git a/src/lstream.h b/src/lstream.h index b46adbc..37211a1 100644 --- a/src/lstream.h +++ b/src/lstream.h @@ -167,8 +167,8 @@ struct lstream size_t unget_buffer_ind; /* pointer to next buffer spot to write a character */ size_t byte_count; - long flags; /* Align pointer for 64 bit machines (kny) */ - char data[1]; + int flags; + max_align_t data[1]; }; #define LSTREAM_TYPE_P(lstr, type) \ diff --git a/src/mule-ccl.c b/src/mule-ccl.c index 0029611..0dbec5b 100644 --- a/src/mule-ccl.c +++ b/src/mule-ccl.c @@ -423,7 +423,7 @@ Lisp_Object Vccl_program_table; IC += 2; */ -#define CCL_Extention 0x1F /* Extended CCL code +#define CCL_Extension 0x1F /* Extended CCL code 1:ExtendedCOMMNDRrrRRRrrrXXXXX 2:ARGUMENT 3:... @@ -634,7 +634,9 @@ static int stack_idx_of_map_multiple; stack_idx++; \ ccl_prog = called_ccl.prog; \ ic = CCL_HEADER_MAIN; \ - goto ccl_repeat; \ + /* The "if (1)" prevents warning \ + "end-of loop code not reached" */ \ + if (1) goto ccl_repeat; \ } while (0) #define CCL_MapSingle 0x12 /* Map by single code conversion map @@ -675,29 +677,35 @@ static int stack_idx_of_map_multiple; r[7] = LOWER_BYTE (SJIS (Y, Z) */ /* Terminate CCL program successfully. */ -#define CCL_SUCCESS \ - do { \ - ccl->status = CCL_STAT_SUCCESS; \ - goto ccl_finish; \ - } while (0) +#define CCL_SUCCESS \ +do { \ + ccl->status = CCL_STAT_SUCCESS; \ + /* The "if (1)" inhibits the warning \ + "end-of loop code not reached" */ \ + if (1) goto ccl_finish; \ +} while (0) /* Suspend CCL program because of reading from empty input buffer or writing to full output buffer. When this program is resumed, the same I/O command is executed. */ -#define CCL_SUSPEND(stat) \ - do { \ - ic--; \ - ccl->status = stat; \ - goto ccl_finish; \ - } while (0) +#define CCL_SUSPEND(stat) \ +do { \ + ic--; \ + ccl->status = (stat); \ + /* The "if (1)" inhibits the warning \ + "end-of loop code not reached" */ \ + if (1) goto ccl_finish; \ +} while (0) /* Terminate CCL program because of invalid command. Should not occur in the normal case. */ -#define CCL_INVALID_CMD \ - do { \ - ccl->status = CCL_STAT_INVALID_CMD; \ - goto ccl_error_handler; \ - } while (0) +#define CCL_INVALID_CMD \ +do { \ + ccl->status = CCL_STAT_INVALID_CMD; \ + /* The "if (1)" inhibits the warning \ + "end-of loop code not reached" */ \ + if (1) goto ccl_error_handler; \ +} while (0) /* Encode one character CH to multibyte form and write to the current output buffer. At encoding time, if CH is less than 256, CH is @@ -709,7 +717,7 @@ static int stack_idx_of_map_multiple; CCL_INVALID_CMD; \ if (conversion_mode == CCL_MODE_ENCODING) \ { \ - if (ch == '\n') \ + if ((ch) == '\n') \ { \ if (ccl->eol_type == CCL_CODING_EOL_CRLF) \ { \ @@ -721,7 +729,7 @@ static int stack_idx_of_map_multiple; else \ Dynarr_add (destination, '\n'); \ } \ - else if (ch < 0x100) \ + else if ((ch) < 0x100) \ { \ Dynarr_add (destination, ch); \ } \ @@ -760,7 +768,7 @@ static int stack_idx_of_map_multiple; CCL_INVALID_CMD; \ else if (conversion_mode == CCL_MODE_ENCODING) \ { \ - for (i = 0; i < len; i++) \ + for (i = 0; i < (len); i++) \ { \ ch = ((XINT (ccl_prog[ic + (i / 3)])) \ >> ((2 - (i % 3)) * 8)) & 0xFF; \ @@ -789,7 +797,7 @@ static int stack_idx_of_map_multiple; } \ else \ { \ - for (i = 0; i < len; i++) \ + for (i = 0; i < (len); i++) \ { \ ch = ((XINT (ccl_prog[ic + (i / 3)])) \ >> ((2 - (i % 3)) * 8)) & 0xFF; \ @@ -812,7 +820,7 @@ static int stack_idx_of_map_multiple; if (!src) \ CCL_INVALID_CMD; \ if (src < src_end) \ - r = *src++; \ + (r) = *src++; \ else \ { \ if (ccl->last_block) \ @@ -837,20 +845,20 @@ static int stack_idx_of_map_multiple; #if 0 #define CCL_MAKE_CHAR(charset, code, c) \ do { \ - if (charset == CHARSET_ASCII) \ - c = code & 0xFF; \ + if ((charset) == CHARSET_ASCII) \ + (c) = (code) & 0xFF; \ else if (CHARSET_DEFINED_P (charset) \ - && (code & 0x7F) >= 32 \ - && (code < 256 || ((code >> 7) & 0x7F) >= 32)) \ + && ((code) & 0x7F) >= 32 \ + && ((code) < 256 || ((code >> 7) & 0x7F) >= 32)) \ { \ - int c1 = code & 0x7F, c2 = 0; \ + int c1 = (code) & 0x7F, c2 = 0; \ \ - if (code >= 256) \ - c2 = c1, c1 = (code >> 7) & 0x7F; \ - c = MAKE_CHAR (charset, c1, c2); \ + if ((code) >= 256) \ + c2 = c1, c1 = ((code) >> 7) & 0x7F; \ + (c) = MAKE_CHAR (charset, c1, c2); \ } \ else \ - c = code & 0xFF; \ + (c) = (code) & 0xFF; \ } while (0) #endif @@ -1268,67 +1276,64 @@ ccl_driver (struct ccl_program *ccl, ic = jump_address; break; - case CCL_Extention: + case CCL_Extension: switch (EXCMD) { case CCL_ReadMultibyteChar2: if (!src) CCL_INVALID_CMD; - do { - if (src >= src_end) - { - src++; - goto ccl_read_multibyte_character_suspend; - } + if (src >= src_end) + { + src++; + goto ccl_read_multibyte_character_suspend; + } - i = *src++; - if (i < 0x80) - { - /* ASCII */ - reg[rrr] = i; - reg[RRR] = LEADING_BYTE_ASCII; - } - else if (i <= MAX_LEADING_BYTE_OFFICIAL_1) - { - if (src >= src_end) - goto ccl_read_multibyte_character_suspend; - reg[RRR] = i; - reg[rrr] = (*src++ & 0x7F); - } - else if (i <= MAX_LEADING_BYTE_OFFICIAL_2) - { - if ((src + 1) >= src_end) - goto ccl_read_multibyte_character_suspend; - reg[RRR] = i; - i = (*src++ & 0x7F); - reg[rrr] = ((i << 7) | (*src & 0x7F)); - src++; - } - else if (i == PRE_LEADING_BYTE_PRIVATE_1) - { - if ((src + 1) >= src_end) - goto ccl_read_multibyte_character_suspend; - reg[RRR] = *src++; - reg[rrr] = (*src++ & 0x7F); - } - else if (i == PRE_LEADING_BYTE_PRIVATE_2) - { - if ((src + 2) >= src_end) - goto ccl_read_multibyte_character_suspend; - reg[RRR] = *src++; - i = (*src++ & 0x7F); - reg[rrr] = ((i << 7) | (*src & 0x7F)); - src++; - } - else - { - /* INVALID CODE. Return a single byte character. */ - reg[RRR] = LEADING_BYTE_ASCII; - reg[rrr] = i; - } - break; - } while (1); + i = *src++; + if (i < 0x80) + { + /* ASCII */ + reg[rrr] = i; + reg[RRR] = LEADING_BYTE_ASCII; + } + else if (i <= MAX_LEADING_BYTE_OFFICIAL_1) + { + if (src >= src_end) + goto ccl_read_multibyte_character_suspend; + reg[RRR] = i; + reg[rrr] = (*src++ & 0x7F); + } + else if (i <= MAX_LEADING_BYTE_OFFICIAL_2) + { + if ((src + 1) >= src_end) + goto ccl_read_multibyte_character_suspend; + reg[RRR] = i; + i = (*src++ & 0x7F); + reg[rrr] = ((i << 7) | (*src & 0x7F)); + src++; + } + else if (i == PRE_LEADING_BYTE_PRIVATE_1) + { + if ((src + 1) >= src_end) + goto ccl_read_multibyte_character_suspend; + reg[RRR] = *src++; + reg[rrr] = (*src++ & 0x7F); + } + else if (i == PRE_LEADING_BYTE_PRIVATE_2) + { + if ((src + 2) >= src_end) + goto ccl_read_multibyte_character_suspend; + reg[RRR] = *src++; + i = (*src++ & 0x7F); + reg[rrr] = ((i << 7) | (*src & 0x7F)); + src++; + } + else + { + /* INVALID CODE. Return a single byte character. */ + reg[RRR] = LEADING_BYTE_ASCII; + reg[rrr] = i; + } break; ccl_read_multibyte_character_suspend: diff --git a/src/opaque.c b/src/opaque.c index 2fb6dec..976ecd7 100644 --- a/src/opaque.c +++ b/src/opaque.c @@ -52,11 +52,17 @@ print_opaque (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) write_c_string (buf, printcharfun); } +inline static size_t +aligned_sizeof_opaque (size_t opaque_size) +{ + return ALIGN_SIZE (offsetof (Lisp_Opaque, data) + opaque_size, + ALIGNOF (max_align_t)); +} + static size_t sizeof_opaque (const void *header) { - const Lisp_Opaque *p = (const Lisp_Opaque *) header; - return offsetof (Lisp_Opaque, data) + p->size; + return aligned_sizeof_opaque (((const Lisp_Opaque *) header)->size); } /* Return an opaque object of size SIZE. @@ -67,7 +73,7 @@ Lisp_Object make_opaque (const void *data, size_t size) { Lisp_Opaque *p = (Lisp_Opaque *) - alloc_lcrecord (offsetof (Lisp_Opaque, data) + size, &lrecord_opaque); + alloc_lcrecord (aligned_sizeof_opaque (size), &lrecord_opaque); p->size = size; if (data == OPAQUE_CLEAR) diff --git a/src/regex.c b/src/regex.c index 1abca94..14ce963 100644 --- a/src/regex.c +++ b/src/regex.c @@ -1252,85 +1252,89 @@ typedef struct Does `return FAILURE_CODE' if runs out of memory. */ #if !defined (REGEX_MALLOC) && !defined (REL_ALLOC) -#define DECLARE_DESTINATION char *destination; +#define DECLARE_DESTINATION char *destination #else -#define DECLARE_DESTINATION +#define DECLARE_DESTINATION DECLARE_NOTHING #endif #define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \ - do { \ - DECLARE_DESTINATION \ - /* Must be int, so when we don't save any registers, the arithmetic \ - of 0 + -1 isn't done as unsigned. */ \ - int this_reg; \ - \ - DEBUG_STATEMENT (failure_id++); \ - DEBUG_STATEMENT (nfailure_points_pushed++); \ - DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id); \ - DEBUG_PRINT2 (" Before push, next avail: %d\n", (fail_stack).avail);\ - DEBUG_PRINT2 (" size: %d\n", (fail_stack).size);\ +do { \ + DECLARE_DESTINATION; \ + /* Must be int, so when we don't save any registers, the arithmetic \ + of 0 + -1 isn't done as unsigned. */ \ + int this_reg; \ \ - DEBUG_PRINT2 (" slots needed: %d\n", NUM_FAILURE_ITEMS); \ - DEBUG_PRINT2 (" available: %d\n", REMAINING_AVAIL_SLOTS); \ + DEBUG_STATEMENT (failure_id++); \ + DEBUG_STATEMENT (nfailure_points_pushed++); \ + DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id); \ + DEBUG_PRINT2 (" Before push, next avail: %lu\n", \ + (unsigned long) (fail_stack).avail); \ + DEBUG_PRINT2 (" size: %lu\n", \ + (unsigned long) (fail_stack).size); \ \ - /* Ensure we have enough space allocated for what we will push. */ \ - while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \ - { \ - if (!DOUBLE_FAIL_STACK (fail_stack)) \ - return failure_code; \ + DEBUG_PRINT2 (" slots needed: %d\n", NUM_FAILURE_ITEMS); \ + DEBUG_PRINT2 (" available: %ld\n", \ + (long) REMAINING_AVAIL_SLOTS); \ \ - DEBUG_PRINT2 ("\n Doubled stack; size now: %d\n", \ - (fail_stack).size); \ - DEBUG_PRINT2 (" slots available: %d\n", REMAINING_AVAIL_SLOTS);\ - } \ + /* Ensure we have enough space allocated for what we will push. */ \ + while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \ + { \ + if (!DOUBLE_FAIL_STACK (fail_stack)) \ + return failure_code; \ \ - /* Push the info, starting with the registers. */ \ - DEBUG_PRINT1 ("\n"); \ + DEBUG_PRINT2 ("\n Doubled stack; size now: %lu\n", \ + (unsigned long) (fail_stack).size); \ + DEBUG_PRINT2 (" slots available: %ld\n", \ + (long) REMAINING_AVAIL_SLOTS); \ + } \ \ - for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \ - this_reg++) \ - { \ - DEBUG_PRINT2 (" Pushing reg: %d\n", this_reg); \ - DEBUG_STATEMENT (num_regs_pushed++); \ + /* Push the info, starting with the registers. */ \ + DEBUG_PRINT1 ("\n"); \ \ - DEBUG_PRINT2 (" start: 0x%lx\n", (long) regstart[this_reg]); \ - PUSH_FAILURE_POINTER (regstart[this_reg]); \ - \ - DEBUG_PRINT2 (" end: 0x%lx\n", (long) regend[this_reg]); \ - PUSH_FAILURE_POINTER (regend[this_reg]); \ + for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \ + this_reg++) \ + { \ + DEBUG_PRINT2 (" Pushing reg: %d\n", this_reg); \ + DEBUG_STATEMENT (num_regs_pushed++); \ \ - DEBUG_PRINT2 (" info: 0x%lx\n ", \ - * (long *) (®_info[this_reg])); \ - DEBUG_PRINT2 (" match_null=%d", \ - REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \ - DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \ - DEBUG_PRINT2 (" matched_something=%d", \ - MATCHED_SOMETHING (reg_info[this_reg])); \ - DEBUG_PRINT2 (" ever_matched=%d", \ - EVER_MATCHED_SOMETHING (reg_info[this_reg])); \ - DEBUG_PRINT1 ("\n"); \ - PUSH_FAILURE_ELT (reg_info[this_reg].word); \ - } \ + DEBUG_PRINT2 (" start: 0x%lx\n", (long) regstart[this_reg]); \ + PUSH_FAILURE_POINTER (regstart[this_reg]); \ \ - DEBUG_PRINT2 (" Pushing low active reg: %d\n", lowest_active_reg);\ - PUSH_FAILURE_INT (lowest_active_reg); \ + DEBUG_PRINT2 (" end: 0x%lx\n", (long) regend[this_reg]); \ + PUSH_FAILURE_POINTER (regend[this_reg]); \ \ - DEBUG_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg);\ - PUSH_FAILURE_INT (highest_active_reg); \ + DEBUG_PRINT2 (" info: 0x%lx\n ", \ + * (long *) (®_info[this_reg])); \ + DEBUG_PRINT2 (" match_null=%d", \ + REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \ + DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \ + DEBUG_PRINT2 (" matched_something=%d", \ + MATCHED_SOMETHING (reg_info[this_reg])); \ + DEBUG_PRINT2 (" ever_matched_something=%d", \ + EVER_MATCHED_SOMETHING (reg_info[this_reg])); \ + DEBUG_PRINT1 ("\n"); \ + PUSH_FAILURE_ELT (reg_info[this_reg].word); \ + } \ \ - DEBUG_PRINT2 (" Pushing pattern 0x%lx: \n", (long) pattern_place); \ - DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \ - PUSH_FAILURE_POINTER (pattern_place); \ + DEBUG_PRINT2 (" Pushing low active reg: %d\n", lowest_active_reg); \ + PUSH_FAILURE_INT (lowest_active_reg); \ \ - DEBUG_PRINT2 (" Pushing string 0x%lx: `", (long) string_place); \ - DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \ - size2); \ - DEBUG_PRINT1 ("'\n"); \ - PUSH_FAILURE_POINTER (string_place); \ + DEBUG_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg); \ + PUSH_FAILURE_INT (highest_active_reg); \ \ - DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \ - DEBUG_PUSH (failure_id); \ - } while (0) + DEBUG_PRINT2 (" Pushing pattern 0x%lx: \n", (long) pattern_place); \ + DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \ + PUSH_FAILURE_POINTER (pattern_place); \ + \ + DEBUG_PRINT2 (" Pushing string 0x%lx: `", (long) string_place); \ + DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \ + size2); \ + DEBUG_PRINT1 ("'\n"); \ + PUSH_FAILURE_POINTER (string_place); \ + \ + DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \ + DEBUG_PUSH (failure_id); \ +} while (0) /* This is the number of items that are pushed and popped on the stack for each register. */ @@ -1370,8 +1374,9 @@ typedef struct Also assumes the variables `fail_stack' and (if debugging), `bufp', `pend', `string1', `size1', `string2', and `size2'. */ -#define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)\ -{ \ +#define POP_FAILURE_POINT(str, pat, low_reg, high_reg, \ + regstart, regend, reg_info) \ +do { \ DEBUG_STATEMENT (fail_stack_elt_t ffailure_id;) \ int this_reg; \ const unsigned char *string_temp; \ @@ -1380,8 +1385,10 @@ typedef struct \ /* Remove failure points and point to how many regs pushed. */ \ DEBUG_PRINT1 ("POP_FAILURE_POINT:\n"); \ - DEBUG_PRINT2 (" Before pop, next avail: %d\n", fail_stack.avail); \ - DEBUG_PRINT2 (" size: %d\n", fail_stack.size); \ + DEBUG_PRINT2 (" Before pop, next avail: %lu\n", \ + (unsigned long) fail_stack.avail); \ + DEBUG_PRINT2 (" size: %lu\n", \ + (unsigned long) fail_stack.size); \ \ assert (fail_stack.avail >= NUM_NONREG_ITEMS); \ \ @@ -1428,7 +1435,7 @@ typedef struct \ set_regs_matched_done = 0; \ DEBUG_STATEMENT (nfailure_points_popped++); \ -} /* POP_FAILURE_POINT */ +} while (0) /* POP_FAILURE_POINT */ @@ -3395,7 +3402,7 @@ re_compile_fastmap (struct re_pattern_buffer *bufp) #ifdef MATCH_MAY_ALLOCATE fail_stack_type fail_stack; #endif - DECLARE_DESTINATION + DECLARE_DESTINATION; /* We don't push any register information onto the failure stack. */ REGISTER char *fastmap = bufp->fastmap; diff --git a/src/s/aix4.h b/src/s/aix4.h index 8837db7..adf3195 100644 --- a/src/s/aix4.h +++ b/src/s/aix4.h @@ -11,15 +11,6 @@ /* AIX is happier when bzero and strcasecmp are declared */ #include "strings.h" -/* AIX 4.2's sys/mman.h doesn't seem to define MAP_FAILED, - although Unix98 claims it must. */ -#ifdef HAVE_MMAP -#include -# ifndef MAP_FAILED -# define MAP_FAILED ((void *) -1) -# endif -#endif - /* Forward declarations for xlc warning suppressions */ struct ether_addr; struct sockaddr_dl; diff --git a/src/select-msw.c b/src/select-msw.c index 1e8fd43..67b4c89 100644 --- a/src/select-msw.c +++ b/src/select-msw.c @@ -186,7 +186,8 @@ static Lisp_Object mswindows_own_selection (Lisp_Object selection_name, Lisp_Object selection_value, Lisp_Object how_to_add, - Lisp_Object selection_type) + Lisp_Object selection_type, + int owned_p /* Not used */) { HGLOBAL hValue = NULL; UINT cfType; diff --git a/src/select-x.c b/src/select-x.c index 25bd52a..e2e003f 100644 --- a/src/select-x.c +++ b/src/select-x.c @@ -46,7 +46,8 @@ Lisp_Object time_to_lisp (time_t); static void hack_motif_clipboard_selection (Atom selection_atom, Lisp_Object selection_value, Time thyme, Display *display, - Window selecting_window); + Window selecting_window, + int owned_p); #endif #define CUT_BUFFER_SUPPORT @@ -74,6 +75,9 @@ Lisp_Object Vx_sent_selection_hooks; */ int x_selection_timeout; +/* Enable motif selection optimizations. */ +int x_selection_strict_motif_ownership; + /* Utility functions */ @@ -201,7 +205,8 @@ x_atom_to_symbol (struct device *d, Atom atom) */ static Lisp_Object x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value, - Lisp_Object how_to_add, Lisp_Object selection_type) + Lisp_Object how_to_add, Lisp_Object selection_type, + int owned_p) { struct device *d = decode_x_device (Qnil); Display *display = DEVICE_X_DISPLAY (d); @@ -233,7 +238,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value, #ifdef MOTIF_CLIPBOARDS hack_motif_clipboard_selection (selection_atom, selection_value, - thyme, display, selecting_window); + thyme, display, selecting_window, owned_p); #endif return selection_time; } @@ -249,8 +254,8 @@ hack_motif_clipboard_selection (Atom selection_atom, Lisp_Object selection_value, Time thyme, Display *display, - Window selecting_window) - /* Bool owned_p)*/ + Window selecting_window, + int owned_p) { struct device *d = get_device_from_display (display); /* Those Motif wankers can't be bothered to follow the ICCCM, and do @@ -270,7 +275,10 @@ hack_motif_clipboard_selection (Atom selection_atom, to look up the new value, and you can't Copy from a buffer, Paste into a text field, then Copy something else from the buffer and paste it into the text field -- it pastes the first thing again. */ -/* && !owned_p */ + && (!owned_p + /* Selectively re-enable this because for most users its + just too painful - especially over a remote link. */ + || x_selection_strict_motif_ownership) ) { #ifdef MOTIF_INCREMENTAL_CLIPBOARDS_WORK @@ -1772,6 +1780,17 @@ A value of 0 means wait as long as necessary. This is initialized from the \"*selectionTimeout\" resource (which is expressed in milliseconds). */ ); x_selection_timeout = 0; + + DEFVAR_BOOL ("x-selection-strict-motif-ownership", &x_selection_strict_motif_ownership /* +*If true and XEmacs already owns the clipboard, don't own it again in the +Motif way. Owning the selection on the Motif way does a huge amount of +X protocol, and it makes killing text incredibly slow when using an +X terminal. However, when enabled Motif text fields don't bother to look up +the new value, and you can't Copy from a buffer, Paste into a text +field, then Copy something else from the buffer and paste it into the +text field; it pastes the first thing again. +*/ ); + x_selection_strict_motif_ownership = 1; } void diff --git a/src/select.c b/src/select.c index add109b..9c6191a 100644 --- a/src/select.c +++ b/src/select.c @@ -280,7 +280,7 @@ It defaults to the selected device. if (HAS_DEVMETH_P (XDEVICE (device), own_selection)) selection_time = DEVMETH (XDEVICE (device), own_selection, (selection_name, selection_value, - how_to_add, data_type)); + how_to_add, data_type, !NILP (prev_value))); else selection_time = Qnil; diff --git a/src/specifier.c b/src/specifier.c index 8f2055b..18ba86d 100644 --- a/src/specifier.c +++ b/src/specifier.c @@ -354,16 +354,21 @@ specifier_hash (Lisp_Object obj, int depth) internal_hash (s->buffer_specs, depth + 1)); } +inline static size_t +aligned_sizeof_specifier (size_t specifier_type_specific_size) +{ + return ALIGN_SIZE (offsetof (Lisp_Specifier, data) + + specifier_type_specific_size, + ALIGNOF (max_align_t)); +} + static size_t sizeof_specifier (const void *header) { - if (GHOST_SPECIFIER_P ((Lisp_Specifier *) header)) - return offsetof (Lisp_Specifier, data); - else - { - const Lisp_Specifier *p = (const Lisp_Specifier *) header; - return offsetof (Lisp_Specifier, data) + p->methods->extra_data_size; - } + const Lisp_Specifier *p = (const Lisp_Specifier *) header; + return aligned_sizeof_specifier (GHOST_SPECIFIER_P (p) + ? 0 + : p->methods->extra_data_size); } static const struct lrecord_description specifier_methods_description_1[] = { @@ -476,8 +481,7 @@ make_specifier_internal (struct specifier_methods *spec_meths, { Lisp_Object specifier; Lisp_Specifier *sp = (Lisp_Specifier *) - alloc_lcrecord (offsetof (Lisp_Specifier, data) + data_size, - &lrecord_specifier); + alloc_lcrecord (aligned_sizeof_specifier (data_size), &lrecord_specifier); sp->methods = spec_meths; sp->global_specs = Qnil; diff --git a/src/specifier.h b/src/specifier.h index a483ff6..ac006a3 100644 --- a/src/specifier.h +++ b/src/specifier.h @@ -235,7 +235,7 @@ struct Lisp_Specifier Lisp_Object fallback; /* type-specific extra data attached to a specifier */ - char data[1]; + max_align_t data[1]; }; typedef struct Lisp_Specifier Lisp_Specifier; @@ -261,7 +261,7 @@ DECLARE_LRECORD (specifier, Lisp_Specifier); /***** Defining new specifier types *****/ -#define specifier_data_offset (offsetof (Lisp_Specifier, data)) +#define specifier_data_offset offsetof (Lisp_Specifier, data) extern const struct lrecord_description specifier_empty_extra_description[]; #ifdef ERROR_CHECK_TYPECHECK diff --git a/src/window.c b/src/window.c index 7790ce7..a3ad1b1 100644 --- a/src/window.c +++ b/src/window.c @@ -5006,7 +5006,7 @@ struct window_config /* Record the values of window-min-width and window-min-height so that window sizes remain consistent with them. */ int min_width, min_height; - int saved_windows_count; + unsigned int saved_windows_count; /* Zero-sized arrays aren't ANSI C */ struct saved_window saved_windows[1]; }; @@ -5021,7 +5021,7 @@ static Lisp_Object mark_window_config (Lisp_Object obj) { struct window_config *config = XWINDOW_CONFIGURATION (obj); - int i; + unsigned int i; mark_object (config->current_window); mark_object (config->current_buffer); mark_object (config->minibuffer_scroll_window); @@ -5050,12 +5050,11 @@ mark_window_config (Lisp_Object obj) return Qnil; } -static size_t -sizeof_window_config_for_n_windows (int n) +inline static size_t +sizeof_window_config_for_n_windows (unsigned int n) { - return (sizeof (struct window_config) + - /* n - 1 because zero-sized arrays aren't ANSI C */ - (n - 1) *sizeof (struct saved_window)); + return FLEXIBLE_ARRAY_STRUCT_SIZEOF (struct window_config, + struct saved_window, saved_windows, n); } static size_t @@ -5120,7 +5119,7 @@ static int window_config_equal (Lisp_Object conf1, Lisp_Object conf2) { struct window_config *fig1, *fig2; - int i; + unsigned int i; /* First check if they are truly the same. */ if (EQ (conf1, conf2)) @@ -5175,7 +5174,7 @@ mark_windows_in_use (struct frame *f, int mark) static Lisp_Object free_window_configuration (Lisp_Object window_config) { - int i; + unsigned int i; struct window_config *config = XWINDOW_CONFIGURATION (window_config); /* Free all the markers. It's not completely necessary that @@ -5227,7 +5226,7 @@ by `current-window-configuration' (which see). struct window_config *config; struct saved_window *p; Lisp_Object new_current_buffer; - int k; + unsigned int k; Lisp_Object frame; struct frame *f; struct gcpro gcpro1; @@ -5725,7 +5724,7 @@ delete_all_subwindows (struct window *w) } -static int +static unsigned int count_windows (struct window *window) { return 1 + @@ -5840,7 +5839,7 @@ its value is -not- saved. Lisp_Object result; struct frame *f = decode_frame (frame); struct window_config *config; - int n_windows = count_windows (XWINDOW (FRAME_ROOT_WINDOW (f))); + unsigned int n_windows = count_windows (XWINDOW (FRAME_ROOT_WINDOW (f))); int minibuf_height; int real_font_height; @@ -6152,7 +6151,7 @@ syms_of_window (void) void reinit_vars_of_window (void) { - int i; + unsigned int i; /* Make sure all windows get marked */ minibuf_window = Qnil; staticpro_nodump (&minibuf_window); diff --git a/tests/ChangeLog b/tests/ChangeLog index 117f16b..877dc91 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2001-01-26 Martin Buchholz + + * XEmacs 21.2.43 "Terspichore" is released. + 2001-01-20 Martin Buchholz * XEmacs 21.2.42 "Poseidon" is released. diff --git a/version.sh b/version.sh index 34cd7a2..a9e37c3 100644 --- a/version.sh +++ b/version.sh @@ -2,8 +2,8 @@ emacs_is_beta=t emacs_major_version=21 emacs_minor_version=2 -emacs_beta_version=42 -xemacs_codename="Poseidon" +emacs_beta_version=43 +xemacs_codename="Terspichore" infodock_major_version=4 infodock_minor_version=0 infodock_build_version=8