From 4836e869212eaa972d5a2bdfe61730d8af7b2c61 Mon Sep 17 00:00:00 2001 From: tomo Date: Wed, 15 Aug 2001 16:15:44 +0000 Subject: [PATCH] Sync up with r21-2-41. --- info/internals.info | 204 +++++------ info/internals.info-4 | 2 +- info/internals.info-5 | 83 +++-- info/texinfo.info | 604 ++++++++++++++++---------------- info/texinfo.info-1 | 4 +- info/texinfo.info-4 | 2 +- info/texinfo.info-6 | 3 +- lib-src/ChangeLog | 4 + lib-src/config.values.in | 1 + lisp/ChangeLog | 56 +++ lisp/about.el | 56 +-- lisp/auto-autoloads.el | 13 +- lisp/byte-optimize.el | 12 +- lisp/cl-macs.el | 32 +- lisp/faces.el | 54 ++- lisp/gutter-items.el | 2 +- lisp/mule/auto-autoloads.el | 225 +++++++++++- lisp/package-net.el | 106 +++++- lisp/setup-paths.el | 13 +- lisp/startup.el | 80 ++++- lwlib/ChangeLog | 4 + man/ChangeLog | 24 ++ man/internals/internals.texi | 73 ++-- man/texinfo.texi | 14 +- nt/ChangeLog | 4 + src/.dbxrc | 6 +- src/.gdbinit | 8 +- src/ChangeLog | 181 +++++++++- src/alloc.c | 149 +++----- src/alloc.h | 58 --- src/buffer.c | 4 +- src/chartab.c | 2 +- src/config.h.in | 1 - src/console.c | 6 +- src/console.h | 2 +- src/data.c | 2 +- src/depend | 6 +- src/dumper.c | 335 ++++++++++-------- src/elhash.c | 2 +- src/eval.c | 2 +- src/event-Xt.c | 2 +- src/event-msw.c | 4 +- src/event-stream.c | 7 +- src/file-coding.c | 4 +- src/glyphs.c | 8 +- src/glyphs.h | 52 +-- src/gmalloc.c | 18 +- src/gpmevent.c | 4 +- src/lisp-disunion.h | 2 +- src/lisp.h | 44 ++- src/m/ibmrs6000.h | 4 + src/make-src-depend | 2 +- src/miscplay.c | 7 +- src/mule-charset.c | 4 +- src/s/aix4.h | 9 + src/s/netbsd.h | 8 + src/specifier.c | 4 +- src/specifier.h | 17 +- src/symbols.c | 10 +- src/symeval.h | 2 +- src/sysdep.c | 2 +- src/sysdll.c | 8 +- src/text-coding.c | 32 +- src/unexelf.c | 30 -- tests/ChangeLog | 9 + tests/automated/byte-compiler-tests.el | 2 + 66 files changed, 1693 insertions(+), 1041 deletions(-) delete mode 100644 src/alloc.h diff --git a/info/internals.info b/info/internals.info index 58f84f4..0c437a8 100644 --- a/info/internals.info +++ b/info/internals.info @@ -43,10 +43,10 @@ internals.info-1: 1777 internals.info-2: 46638 internals.info-3: 94563 internals.info-4: 144260 -internals.info-5: 194151 -internals.info-6: 243752 -internals.info-7: 287819 -internals.info-8: 336686 +internals.info-5: 194153 +internals.info-6: 243743 +internals.info-7: 287810 +internals.info-8: 336677  Tag Table: (Indirect) @@ -94,103 +94,103 @@ Node: GCPROing172450 Node: Garbage Collection - Step by Step179454 Node: Invocation179846 Node: garbage_collect_1182859 -Node: mark_object192339 -Node: gc_sweep194151 -Node: sweep_lcrecords_1199214 -Node: compact_string_chars200209 -Node: sweep_strings202389 -Node: sweep_bit_vectors_1203354 -Node: Integers and Characters204030 -Node: Allocation from Frob Blocks204782 -Node: lrecords206386 -Node: Low-level allocation218612 -Node: Cons222719 -Node: Vector223445 -Node: Bit Vector224022 -Node: Symbol224515 -Node: Marker224869 -Node: String225424 -Node: Compiled Function229037 -Node: Dumping229206 -Node: Overview231427 -Node: Data descriptions231997 -Node: Dumping phase234002 -Node: Object inventory234405 -Node: Address allocation237258 -Node: The header238647 -Node: Data dumping239154 -Node: Pointers dumping239815 -Node: Reloading phase241030 -Node: Remaining issues242791 -Node: Events and the Event Loop243752 -Node: Introduction to Events244202 -Node: Main Loop246151 -Node: Specifics of the Event Gathering Mechanism249726 -Node: Specifics About the Emacs Event262179 -Node: The Event Stream Callback Routines262434 -Node: Other Event Loop Functions262679 -Node: Converting Events263819 -Node: Dispatching Events; The Command Builder264428 -Node: Evaluation; Stack Frames; Bindings264663 -Node: Evaluation265005 -Node: Dynamic Binding; The specbinding Stack; Unwind-Protects271560 -Node: Simple Special Forms273944 -Node: Catch and Throw274727 -Node: Symbols and Variables277302 -Node: Introduction to Symbols277566 -Node: Obarrays278634 -Node: Symbol Values282167 -Node: Buffers and Textual Representation284455 -Node: Introduction to Buffers285113 -Node: The Text in a Buffer287819 -Node: Buffer Lists294969 -Node: Markers and Extents296920 -Node: Bufbytes and Emchars299185 -Node: The Buffer Object299400 -Node: MULE Character Sets and Encodings302880 -Node: Character Sets303942 -Node: Encodings307427 -Node: Japanese EUC (Extended Unix Code)308494 -Node: JIS7309326 -Node: Internal Mule Encodings310676 -Node: Internal String Encoding312506 -Node: Internal Character Encoding314651 -Node: CCL316375 -Node: The Lisp Reader and Compiler323128 -Node: Lstreams323341 -Node: Creating an Lstream324372 -Node: Lstream Types325599 -Node: Lstream Functions325851 -Node: Lstream Methods329417 -Node: Consoles; Devices; Frames; Windows332559 -Node: Introduction to Consoles; Devices; Frames; Windows332874 -Node: Point335407 -Node: Window Hierarchy336686 -Node: The Window Object341138 -Node: The Redisplay Mechanism344575 -Node: Critical Redisplay Sections345367 -Node: Line Start Cache346354 -Node: Redisplay Piece by Piece349590 -Node: Extents351627 -Node: Introduction to Extents352161 -Node: Extent Ordering353303 -Node: Format of the Extent Info354544 -Node: Zero-Length Extents356431 -Node: Mathematics of Extent Ordering357831 -Node: Extent Fragments362588 -Node: Faces363674 -Node: Glyphs363790 -Node: Specifiers365977 -Node: Menus366106 -Node: Subprocesses368364 -Node: Interface to the X Window System370350 -Node: Lucid Widget Library370631 -Node: Generic Widget Interface371922 -Node: Scrollbars375481 -Node: Menubars375624 -Node: Checkboxes and Radio Buttons375767 -Node: Progress Bars375953 -Node: Tab Controls376113 -Node: Index376234 +Node: mark_object192341 +Node: gc_sweep194153 +Node: sweep_lcrecords_1199216 +Node: compact_string_chars200211 +Node: sweep_strings202391 +Node: sweep_bit_vectors_1203356 +Node: Integers and Characters204032 +Node: Allocation from Frob Blocks204784 +Node: lrecords206388 +Node: Low-level allocation218614 +Node: Cons222721 +Node: Vector223447 +Node: Bit Vector224024 +Node: Symbol224517 +Node: Marker224871 +Node: String225426 +Node: Compiled Function229039 +Node: Dumping229208 +Node: Overview231429 +Node: Data descriptions231999 +Node: Dumping phase234004 +Node: Object inventory234407 +Node: Address allocation237343 +Node: The header238732 +Node: Data dumping239177 +Node: Pointers dumping239838 +Node: Reloading phase241228 +Node: Remaining issues242782 +Node: Events and the Event Loop243743 +Node: Introduction to Events244193 +Node: Main Loop246142 +Node: Specifics of the Event Gathering Mechanism249717 +Node: Specifics About the Emacs Event262170 +Node: The Event Stream Callback Routines262425 +Node: Other Event Loop Functions262670 +Node: Converting Events263810 +Node: Dispatching Events; The Command Builder264419 +Node: Evaluation; Stack Frames; Bindings264654 +Node: Evaluation264996 +Node: Dynamic Binding; The specbinding Stack; Unwind-Protects271551 +Node: Simple Special Forms273935 +Node: Catch and Throw274718 +Node: Symbols and Variables277293 +Node: Introduction to Symbols277557 +Node: Obarrays278625 +Node: Symbol Values282158 +Node: Buffers and Textual Representation284446 +Node: Introduction to Buffers285104 +Node: The Text in a Buffer287810 +Node: Buffer Lists294960 +Node: Markers and Extents296911 +Node: Bufbytes and Emchars299176 +Node: The Buffer Object299391 +Node: MULE Character Sets and Encodings302871 +Node: Character Sets303933 +Node: Encodings307418 +Node: Japanese EUC (Extended Unix Code)308485 +Node: JIS7309317 +Node: Internal Mule Encodings310667 +Node: Internal String Encoding312497 +Node: Internal Character Encoding314642 +Node: CCL316366 +Node: The Lisp Reader and Compiler323119 +Node: Lstreams323332 +Node: Creating an Lstream324363 +Node: Lstream Types325590 +Node: Lstream Functions325842 +Node: Lstream Methods329408 +Node: Consoles; Devices; Frames; Windows332550 +Node: Introduction to Consoles; Devices; Frames; Windows332865 +Node: Point335398 +Node: Window Hierarchy336677 +Node: The Window Object341129 +Node: The Redisplay Mechanism344566 +Node: Critical Redisplay Sections345358 +Node: Line Start Cache346345 +Node: Redisplay Piece by Piece349581 +Node: Extents351618 +Node: Introduction to Extents352152 +Node: Extent Ordering353294 +Node: Format of the Extent Info354535 +Node: Zero-Length Extents356422 +Node: Mathematics of Extent Ordering357822 +Node: Extent Fragments362579 +Node: Faces363665 +Node: Glyphs363781 +Node: Specifiers365968 +Node: Menus366097 +Node: Subprocesses368355 +Node: Interface to the X Window System370341 +Node: Lucid Widget Library370622 +Node: Generic Widget Interface371913 +Node: Scrollbars375472 +Node: Menubars375615 +Node: Checkboxes and Radio Buttons375758 +Node: Progress Bars375944 +Node: Tab Controls376104 +Node: Index376225  End Tag Table diff --git a/info/internals.info-4 b/info/internals.info-4 index 7e8a4f7..7a7a4b7 100644 --- a/info/internals.info-4 +++ b/info/internals.info-4 @@ -965,7 +965,7 @@ place. individually to go out from there to mark all reachable objects. All roots that are traversed are shown in their processed order: * all constant symbols and static variables that are registered - via `staticpro' in the array `staticvec'. *Note Adding + via `staticpro' in the dynarr `staticpros'. *Note Adding Global Lisp Variables::. * all Lisp objects that are created in C functions and that diff --git a/info/internals.info-5 b/info/internals.info-5 index 20b6e06..17671f1 100644 --- a/info/internals.info-5 +++ b/info/internals.info-5 @@ -887,9 +887,10 @@ differences though: follow pointers to C structures and opaque data in addition to Lisp_Object members. - This is done by `pdump_register_object', which handles Lisp_Object -variables, and pdump_register_struct which handles C structures, which -both delegate the description management to pdump_register_sub. + This is done by `pdump_register_object()', which handles Lisp_Object +variables, and `pdump_register_struct()' which handles C structures, +which both delegate the description management to +`pdump_register_sub()'. The hash table doubles as a map object to pdump_entry_list_elmt (i.e. allows us to look up a pdump_entry_list_elmt with the object it points @@ -904,10 +905,11 @@ value is computed quite simply from the object pointer by `staticpro_nodump()' call for protected variables we do not want to dump). - 2. the `pdump_wire''d variables (`staticpro()' is equivalent to - `staticpro_nodump()' + `pdump_wire()'). + 2. the variables registered via `dump_add_root_object' (`staticpro()' + is equivalent to `staticpro_nodump()' + `dump_add_root_object()'). - 3. the `dumpstruct''ed variables, which points to C structures. + 3. the variables registered via `dump_add_root_struct_ptr', each of + which points to a C structure. This does not include the GCPRO'ed variables, the specbinds, the catchtags, the backlist, the redisplay or the profiling info, since we @@ -959,11 +961,10 @@ The header ---------- The next step creates the file and writes a header with a signature -and some random information in it (number of staticpro, number of -assigned lrecord types, etc...). The reloc_address field, which -indicates at which address the file should be loaded if we want to -avoid post-reload relocation, is set to 0. It then seeks to offset 256 -(base offset for the objects). +and some random information in it. The `reloc_address' field, which +indicates at which address the file should be loaded if we want to avoid +post-reload relocation, is set to 0. It then seeks to offset 256 (base +offset for the objects).  File: internals.info, Node: Data dumping, Next: Pointers dumping, Prev: The header, Up: Dumping phase @@ -989,28 +990,31 @@ Pointers dumping A bunch of tables needed to reassign properly the global pointers are then written. They are: - 1. the staticpro array + 1. the pdump_root_struct_ptrs dynarr - 2. the dumpstruct array + 2. the pdump_opaques dynarr - 3. the lrecord_implementation_table array - - 4. a vector of all the offsets to the objects in the file that + 3. a vector of all the offsets to the objects in the file that include a description (for faster relocation at reload time) - 5. the pdump_wire and pdump_wire_list arrays + 4. the pdump_root_objects and pdump_weak_object_chains dynarrs. + + For each of the dynarrs we write both the pointer to the variables +and the relocated offset of the object they point to. Since these +variables are global, the pointers are still valid when restarting the +program and are used to regenerate the global pointers. - For each of the arrays we write both the pointer to the variables and -the relocated offset of the object they point to. Since these variables -are global, the pointers are still valid when restarting the program and -are used to regenerate the global pointers. + The `pdump_weak_object_chains' dynarr is a special case. The +variables it points to are the head of weak linked lists of lisp objects +of the same type. Not all objects of this list are dumped so the +relocated pointer we associate with them points to the first dumped +object of the list, or Qnil if none is available. This is also the +reason why they are not used as roots for the purpose of object +enumeration. - The `pdump_wire_list' array is a special case. The variables it -points to are the head of weak linked lists of lisp objects of the same -type. Not all objects of this list are dumped so the relocated pointer -we associate with them points to the first dumped object of the list, or -Qnil if none is available. This is also the reason why they are not -used as roots for the purpose of object enumeration. + Some very important information like the `staticpros' and +`lrecord_implementations_table' are handled indirectly using +`dump_add_opaque' or `dump_add_root_struct_ptr'. This is the end of the dumping part. @@ -1032,23 +1036,16 @@ malloc is done and the file is loaded. The difference between the actual loading address and the reloc_address is computed and will be used for all the relocations. -Putting back the staticvec --------------------------- +Putting back the pdump_opaques +------------------------------ - The staticvec array is memcpy'd from the file and the variables it -points to are reset to the relocated objects addresses. + The memory contents are restored in the obvious and trivial way. -Putting back the dumpstructed variables +Putting back the pdump_root_struct_ptrs --------------------------------------- - The variables pointed to by dumpstruct in the dump phase are reset to -the right relocated object addresses. - -lrecord_implementations_table ------------------------------ - - The lrecord_implementations_table is reset to its dump time state and -the right lrecord_type_index values are put in. + The variables pointed to by pdump_root_struct_ptrs in the dump phase +are reset to the right relocated object addresses. Object relocation ----------------- @@ -1057,10 +1054,10 @@ Object relocation offset by `pdump_reloc_one'. This step is unnecessary if the reloc_address is equal to the file loading address. -Putting back the pdump_wire and pdump_wire_list variables ---------------------------------------------------------- +Putting back the pdump_root_objects and pdump_weak_object_chains +---------------------------------------------------------------- - Same as Putting back the dumpstructed variables. + Same as Putting back the pdump_root_struct_ptrs. Reorganize the hash tables -------------------------- diff --git a/info/texinfo.info b/info/texinfo.info index ae4c6b1..2064e9c 100644 --- a/info/texinfo.info +++ b/info/texinfo.info @@ -35,17 +35,17 @@ translation approved by the Free Software Foundation.  Indirect: texinfo.info-1: 1485 -texinfo.info-2: 48704 -texinfo.info-3: 96678 -texinfo.info-4: 146070 -texinfo.info-5: 196057 -texinfo.info-6: 245149 -texinfo.info-7: 293744 -texinfo.info-8: 343559 -texinfo.info-9: 392872 -texinfo.info-10: 435250 -texinfo.info-11: 481366 -texinfo.info-12: 519526 +texinfo.info-2: 48708 +texinfo.info-3: 96682 +texinfo.info-4: 146074 +texinfo.info-5: 196056 +texinfo.info-6: 245148 +texinfo.info-7: 293747 +texinfo.info-8: 343562 +texinfo.info-9: 392875 +texinfo.info-10: 435253 +texinfo.info-11: 481369 +texinfo.info-12: 519529  Tag Table: (Indirect) @@ -55,296 +55,296 @@ Node: Overview25805 Node: Overview-Footnotes27234 Ref: Overview-Footnote-127298 Node: Using Texinfo27770 -Node: Info Files30253 -Node: Info Files-Footnotes34289 -Ref: Info Files-Footnote-134357 -Node: Printed Books34536 -Node: Printed Books-Footnotes37208 -Ref: Printed Books-Footnote-137282 -Node: Formatting Commands37492 -Node: Formatting Commands-Footnotes40319 -Ref: Formatting Commands-Footnote-140405 -Node: Conventions41021 -Node: Comments43583 -Node: Minimum45006 -Node: Six Parts47192 -Node: Short Sample48704 -Node: Acknowledgements52840 -Node: Texinfo Mode53675 -Node: Texinfo Mode Overview55047 -Node: Emacs Editing55823 -Node: Inserting57953 -Node: Showing the Structure62234 -Node: Updating Nodes and Menus64761 -Node: Updating Commands65834 -Node: Updating Requirements71895 -Node: Other Updating Commands74192 -Node: Info Formatting77460 -Node: Printing78718 -Node: Texinfo Mode Summary81063 -Node: Beginning a File85817 -Node: Four Parts86708 -Node: Sample Beginning88178 -Node: Header89798 -Node: First Line91150 -Node: Start of Header92139 -Node: setfilename92852 -Node: settitle94788 -Node: setchapternewpage96678 -Node: paragraphindent99439 -Node: End of Header100921 -Node: Info Summary and Permissions101760 -Node: Titlepage & Copyright Page102779 -Node: titlepage104385 -Node: titlepage-Footnotes106667 -Ref: titlepage-Footnote-1106733 -Node: titlefont center sp107007 -Node: title subtitle author108233 -Node: Copyright & Permissions110505 -Node: end titlepage112506 -Node: headings on off114212 -Node: The Top Node116257 -Node: Title of Top Node117412 -Node: Master Menu Parts118665 -Node: Software Copying Permissions120902 -Node: Ending a File122070 -Node: Printing Indices & Menus122918 -Node: Contents125227 -Node: File End127567 -Node: Structuring128240 -Node: Tree Structuring129897 -Node: Structuring Command Types131340 -Node: makeinfo top133667 -Node: chapter134200 -Node: unnumbered & appendix135224 -Node: majorheading & chapheading136063 -Node: section136884 -Node: unnumberedsec appendixsec heading137648 -Node: subsection138637 -Node: unnumberedsubsec appendixsubsec subheading139209 -Node: subsubsection140162 -Node: Raise/lower sections141712 -Node: Nodes143847 -Node: Two Paths144784 -Node: Node Menu Illustration146070 -Node: node149765 -Node: Node Names152461 -Node: Writing a Node153537 -Node: Node Line Tips155555 -Node: Node Line Requirements156349 -Node: First Node157950 -Node: makeinfo top command159394 -Node: Top Node Summary160573 -Node: makeinfo Pointer Creation162023 -Node: Menus163270 -Node: Menus-Footnotes164209 -Ref: Menus-Footnote-1164267 -Node: Menu Location164560 -Node: Writing a Menu166237 -Node: Menu Parts167203 -Node: Less Cluttered Menu Entry168361 -Node: Menu Example168986 -Node: Other Info Files170507 -Node: Cross References172375 -Node: References173332 -Node: Cross Reference Commands175079 -Node: Cross Reference Parts176138 -Node: xref178974 -Node: Reference Syntax179773 -Node: One Argument181427 -Node: Two Arguments182439 -Node: Three Arguments183554 -Node: Four and Five Arguments185945 -Node: Top Node Naming188357 -Node: ref189367 -Node: pxref190759 -Node: inforef193141 -Node: uref194434 -Node: Marking Text195433 -Node: Indicating196057 -Node: Useful Highlighting197962 -Node: code199351 -Node: kbd202389 -Node: key204259 -Node: samp205592 -Node: var207179 -Node: file208972 -Node: dfn209579 -Node: cite210489 -Node: url210943 -Node: email211507 -Node: Emphasis212319 -Node: emph & strong213219 -Node: Smallcaps214205 -Node: Fonts215532 -Node: Customized Highlighting216620 -Node: Customized Highlighting-Footnotes219435 -Ref: Customized Highlighting-Footnote-1219529 -Node: Quotations and Examples219655 -Node: Block Enclosing Commands221277 -Node: quotation223302 -Node: example224392 -Node: noindent226447 -Node: Lisp Example227911 -Node: Lisp Example-Footnotes228613 -Ref: Lisp Example-Footnote-1228685 -Node: smallexample & smalllisp228803 -Node: display230828 -Node: format231460 -Node: exdent231921 -Node: flushleft & flushright233001 -Node: cartouche234267 -Node: Lists and Tables235034 -Node: Introducing Lists235710 -Node: itemize237375 -Node: enumerate239522 -Node: Two-column Tables242027 -Node: table242716 -Node: ftable vtable245149 -Node: itemx246250 -Node: Multi-column Tables247261 -Node: Multitable Column Widths247932 -Node: Multitable Rows249386 -Node: Indices251163 -Node: Index Entries252313 -Node: Predefined Indices253446 -Node: Indexing Commands254443 -Node: Combining Indices258983 -Node: syncodeindex260346 -Node: synindex262008 -Node: New Indices262533 -Node: Insertions264358 -Node: Braces Atsigns265542 -Node: Inserting An Atsign266094 -Node: Inserting Braces266368 -Node: Inserting Space266731 -Node: Not Ending a Sentence267235 -Node: Ending a Sentence268589 -Node: Multiple Spaces269718 -Node: dmn270937 -Node: Inserting Accents272144 -Node: Dots Bullets273901 -Node: dots274723 -Node: bullet275247 -Node: TeX and copyright275644 -Node: tex276211 -Node: copyright symbol276627 -Node: pounds276887 -Node: minus277251 -Node: math278173 -Node: Glyphs278901 -Node: Glyphs Summary280014 -Node: result280642 -Node: expansion281127 -Node: Print Glyph282083 -Node: Error Glyph282960 -Node: Equivalence283793 -Node: Point Glyph284481 -Node: Images286038 -Node: Breaks287705 -Node: Break Commands289136 -Node: Line Breaks289977 -Node: - and hyphenation290995 -Node: w292245 -Node: sp292958 -Node: page293367 -Node: group293744 -Node: need295487 -Node: Definition Commands296217 -Node: Def Cmd Template297788 -Node: Optional Arguments300785 -Node: deffnx302373 -Node: Def Cmds in Detail303328 -Node: Functions Commands304438 -Node: Variables Commands307443 -Node: Typed Functions309529 -Node: Typed Variables313071 -Node: Abstract Objects315054 -Node: Data Types320279 -Node: Def Cmd Conventions321534 -Node: Sample Function Definition322097 -Node: Footnotes324981 -Node: Footnotes-Footnotes325369 -Ref: Footnotes-Footnote-1325435 -Node: Footnote Commands325715 -Node: Footnote Commands-Footnotes327212 -Ref: Footnote Commands-Footnote-1327294 -Node: Footnote Styles327330 -Node: Conditionals329916 -Node: Conditional Commands330727 -Node: Conditional Not Commands332220 -Node: Raw Formatter Commands332965 -Node: set clear value334795 -Node: ifset ifclear335596 -Node: value338775 -Node: value Example340187 -Node: Macros341765 -Node: Defining Macros342470 -Node: Invoking Macros343559 -Node: Format/Print Hardcopy344665 -Node: Use TeX346502 -Node: Format with tex/texindex347130 -Node: Format with texi2dvi350771 -Node: Print with lpr351362 -Node: Within Emacs352216 -Node: Texinfo Mode Printing353135 -Node: Compile-Command356545 -Node: Requirements Summary357433 -Node: Preparing for TeX358746 -Node: Overfull hboxes361533 -Node: smallbook363092 -Node: A4 Paper364610 -Node: Cropmarks and Magnification365835 -Node: Create an Info File367776 -Node: makeinfo advantages369079 -Node: Invoking makeinfo369995 -Node: makeinfo options370683 -Node: Pointer Validation376167 -Node: makeinfo in Emacs377511 -Node: texinfo-format commands380069 -Node: Batch Formatting381340 -Node: Tag and Split Files382556 -Node: Install an Info File385910 -Node: Directory file386728 -Node: New Info File388596 -Node: Other Info Directories389657 -Node: Installing Dir Entries392872 -Node: Invoking install-info394865 -Node: Command List397280 -Node: Tips435250 -Node: Sample Texinfo File446660 -Node: Sample Permissions448779 -Node: Inserting Permissions449822 -Node: ifinfo Permissions452128 -Node: Titlepage Permissions453749 -Node: Include Files455011 -Node: Using Include Files456098 -Node: texinfo-multiple-files-update458053 -Node: Include File Requirements460414 -Node: Sample Include File461659 -Node: Include Files Evolution463178 -Node: Headings465149 -Node: Headings Introduced465786 -Node: Heading Format467674 -Node: Heading Choice470126 -Node: Custom Headings471498 -Node: Catching Mistakes475826 -Node: makeinfo Preferred477115 -Node: Debugging with Info478020 -Node: Debugging with TeX481366 -Node: Using texinfo-show-structure485646 -Node: Using occur488745 -Node: Running Info-Validate490282 -Node: Using Info-validate491343 -Node: Unsplit493185 -Node: Tagifying494231 -Node: Splitting495083 -Node: Refilling Paragraphs496699 -Node: Refilling Paragraphs-Footnotes498353 -Ref: Refilling Paragraphs-Footnote-1498441 -Node: Command Syntax498604 -Node: Obtaining TeX501561 -Node: Command and Variable Index503674 -Node: Concept Index519526 +Node: Info Files30257 +Node: Info Files-Footnotes34293 +Ref: Info Files-Footnote-134361 +Node: Printed Books34540 +Node: Printed Books-Footnotes37212 +Ref: Printed Books-Footnote-137286 +Node: Formatting Commands37496 +Node: Formatting Commands-Footnotes40323 +Ref: Formatting Commands-Footnote-140409 +Node: Conventions41025 +Node: Comments43587 +Node: Minimum45010 +Node: Six Parts47196 +Node: Short Sample48708 +Node: Acknowledgements52844 +Node: Texinfo Mode53679 +Node: Texinfo Mode Overview55051 +Node: Emacs Editing55827 +Node: Inserting57957 +Node: Showing the Structure62238 +Node: Updating Nodes and Menus64765 +Node: Updating Commands65838 +Node: Updating Requirements71899 +Node: Other Updating Commands74196 +Node: Info Formatting77464 +Node: Printing78722 +Node: Texinfo Mode Summary81067 +Node: Beginning a File85821 +Node: Four Parts86712 +Node: Sample Beginning88182 +Node: Header89802 +Node: First Line91154 +Node: Start of Header92143 +Node: setfilename92856 +Node: settitle94792 +Node: setchapternewpage96682 +Node: paragraphindent99443 +Node: End of Header100925 +Node: Info Summary and Permissions101764 +Node: Titlepage & Copyright Page102783 +Node: titlepage104389 +Node: titlepage-Footnotes106671 +Ref: titlepage-Footnote-1106737 +Node: titlefont center sp107011 +Node: title subtitle author108237 +Node: Copyright & Permissions110509 +Node: end titlepage112510 +Node: headings on off114216 +Node: The Top Node116261 +Node: Title of Top Node117416 +Node: Master Menu Parts118669 +Node: Software Copying Permissions120906 +Node: Ending a File122074 +Node: Printing Indices & Menus122922 +Node: Contents125231 +Node: File End127571 +Node: Structuring128244 +Node: Tree Structuring129901 +Node: Structuring Command Types131344 +Node: makeinfo top133671 +Node: chapter134204 +Node: unnumbered & appendix135228 +Node: majorheading & chapheading136067 +Node: section136888 +Node: unnumberedsec appendixsec heading137652 +Node: subsection138641 +Node: unnumberedsubsec appendixsubsec subheading139213 +Node: subsubsection140166 +Node: Raise/lower sections141716 +Node: Nodes143851 +Node: Two Paths144788 +Node: Node Menu Illustration146074 +Node: node149769 +Node: Node Names152465 +Node: Writing a Node153541 +Node: Node Line Tips155559 +Node: Node Line Requirements156353 +Node: First Node157954 +Node: makeinfo top command159393 +Node: Top Node Summary160572 +Node: makeinfo Pointer Creation162022 +Node: Menus163269 +Node: Menus-Footnotes164208 +Ref: Menus-Footnote-1164266 +Node: Menu Location164559 +Node: Writing a Menu166236 +Node: Menu Parts167202 +Node: Less Cluttered Menu Entry168360 +Node: Menu Example168985 +Node: Other Info Files170506 +Node: Cross References172374 +Node: References173331 +Node: Cross Reference Commands175078 +Node: Cross Reference Parts176137 +Node: xref178973 +Node: Reference Syntax179772 +Node: One Argument181426 +Node: Two Arguments182438 +Node: Three Arguments183553 +Node: Four and Five Arguments185944 +Node: Top Node Naming188356 +Node: ref189366 +Node: pxref190758 +Node: inforef193140 +Node: uref194433 +Node: Marking Text195432 +Node: Indicating196056 +Node: Useful Highlighting197961 +Node: code199350 +Node: kbd202388 +Node: key204258 +Node: samp205591 +Node: var207178 +Node: file208971 +Node: dfn209578 +Node: cite210488 +Node: url210942 +Node: email211506 +Node: Emphasis212318 +Node: emph & strong213218 +Node: Smallcaps214204 +Node: Fonts215531 +Node: Customized Highlighting216619 +Node: Customized Highlighting-Footnotes219434 +Ref: Customized Highlighting-Footnote-1219528 +Node: Quotations and Examples219654 +Node: Block Enclosing Commands221276 +Node: quotation223301 +Node: example224391 +Node: noindent226446 +Node: Lisp Example227910 +Node: Lisp Example-Footnotes228612 +Ref: Lisp Example-Footnote-1228684 +Node: smallexample & smalllisp228802 +Node: display230827 +Node: format231459 +Node: exdent231920 +Node: flushleft & flushright233000 +Node: cartouche234266 +Node: Lists and Tables235033 +Node: Introducing Lists235709 +Node: itemize237374 +Node: enumerate239521 +Node: Two-column Tables242026 +Node: table242715 +Node: ftable vtable245148 +Node: itemx246249 +Node: Multi-column Tables247260 +Node: Multitable Column Widths247931 +Node: Multitable Rows249385 +Node: Indices251166 +Node: Index Entries252316 +Node: Predefined Indices253449 +Node: Indexing Commands254446 +Node: Combining Indices258986 +Node: syncodeindex260349 +Node: synindex262011 +Node: New Indices262536 +Node: Insertions264361 +Node: Braces Atsigns265545 +Node: Inserting An Atsign266097 +Node: Inserting Braces266371 +Node: Inserting Space266734 +Node: Not Ending a Sentence267238 +Node: Ending a Sentence268592 +Node: Multiple Spaces269721 +Node: dmn270940 +Node: Inserting Accents272147 +Node: Dots Bullets273904 +Node: dots274726 +Node: bullet275250 +Node: TeX and copyright275647 +Node: tex276214 +Node: copyright symbol276630 +Node: pounds276890 +Node: minus277254 +Node: math278176 +Node: Glyphs278904 +Node: Glyphs Summary280017 +Node: result280645 +Node: expansion281130 +Node: Print Glyph282086 +Node: Error Glyph282963 +Node: Equivalence283796 +Node: Point Glyph284484 +Node: Images286041 +Node: Breaks287708 +Node: Break Commands289139 +Node: Line Breaks289980 +Node: - and hyphenation290998 +Node: w292248 +Node: sp292961 +Node: page293370 +Node: group293747 +Node: need295490 +Node: Definition Commands296220 +Node: Def Cmd Template297791 +Node: Optional Arguments300788 +Node: deffnx302376 +Node: Def Cmds in Detail303331 +Node: Functions Commands304441 +Node: Variables Commands307446 +Node: Typed Functions309532 +Node: Typed Variables313074 +Node: Abstract Objects315057 +Node: Data Types320282 +Node: Def Cmd Conventions321537 +Node: Sample Function Definition322100 +Node: Footnotes324984 +Node: Footnotes-Footnotes325372 +Ref: Footnotes-Footnote-1325438 +Node: Footnote Commands325718 +Node: Footnote Commands-Footnotes327215 +Ref: Footnote Commands-Footnote-1327297 +Node: Footnote Styles327333 +Node: Conditionals329919 +Node: Conditional Commands330730 +Node: Conditional Not Commands332223 +Node: Raw Formatter Commands332968 +Node: set clear value334798 +Node: ifset ifclear335599 +Node: value338778 +Node: value Example340190 +Node: Macros341768 +Node: Defining Macros342473 +Node: Invoking Macros343562 +Node: Format/Print Hardcopy344668 +Node: Use TeX346505 +Node: Format with tex/texindex347133 +Node: Format with texi2dvi350774 +Node: Print with lpr351365 +Node: Within Emacs352219 +Node: Texinfo Mode Printing353138 +Node: Compile-Command356548 +Node: Requirements Summary357436 +Node: Preparing for TeX358749 +Node: Overfull hboxes361536 +Node: smallbook363095 +Node: A4 Paper364613 +Node: Cropmarks and Magnification365838 +Node: Create an Info File367779 +Node: makeinfo advantages369082 +Node: Invoking makeinfo369998 +Node: makeinfo options370686 +Node: Pointer Validation376170 +Node: makeinfo in Emacs377514 +Node: texinfo-format commands380072 +Node: Batch Formatting381343 +Node: Tag and Split Files382559 +Node: Install an Info File385913 +Node: Directory file386731 +Node: New Info File388599 +Node: Other Info Directories389660 +Node: Installing Dir Entries392875 +Node: Invoking install-info394868 +Node: Command List397283 +Node: Tips435253 +Node: Sample Texinfo File446663 +Node: Sample Permissions448782 +Node: Inserting Permissions449825 +Node: ifinfo Permissions452131 +Node: Titlepage Permissions453752 +Node: Include Files455014 +Node: Using Include Files456101 +Node: texinfo-multiple-files-update458056 +Node: Include File Requirements460417 +Node: Sample Include File461662 +Node: Include Files Evolution463181 +Node: Headings465152 +Node: Headings Introduced465789 +Node: Heading Format467677 +Node: Heading Choice470129 +Node: Custom Headings471501 +Node: Catching Mistakes475829 +Node: makeinfo Preferred477118 +Node: Debugging with Info478023 +Node: Debugging with TeX481369 +Node: Using texinfo-show-structure485649 +Node: Using occur488748 +Node: Running Info-Validate490285 +Node: Using Info-validate491346 +Node: Unsplit493188 +Node: Tagifying494234 +Node: Splitting495086 +Node: Refilling Paragraphs496702 +Node: Refilling Paragraphs-Footnotes498356 +Ref: Refilling Paragraphs-Footnote-1498444 +Node: Command Syntax498607 +Node: Obtaining TeX501564 +Node: Command and Variable Index503677 +Node: Concept Index519529  End Tag Table diff --git a/info/texinfo.info-1 b/info/texinfo.info-1 index d0c2298..8ee9a21 100644 --- a/info/texinfo.info-1 +++ b/info/texinfo.info-1 @@ -604,8 +604,8 @@ menu-driven, on-line Info file with nodes, menus, cross references, and indices. You can, if you wish, make the chapters and sections of the printed document correspond to the nodes of the on-line information; and you use the same cross references and indices for both the Info -file and the printed work. `The GNU Emacs Manual' is a good example of -a Texinfo file, as is this manual. +file and the printed work. `The XEmacs User's Manual' is a good +example of a Texinfo file, as is this manual. To make a printed document, you process a Texinfo source file with the TeX typesetting program. This creates a DVI file that you can typeset diff --git a/info/texinfo.info-4 b/info/texinfo.info-4 index cc6a9aa..5d7fa08 100644 --- a/info/texinfo.info-4 +++ b/info/texinfo.info-4 @@ -336,7 +336,7 @@ insert these pointers automatically.) Do not define the `Previous' node of the Top node to be `(dir)', as it causes confusing behavior for users: if you are in the Top node and -hits to go backwards, you wind up in the middle of the some other +hit to go backwards, you wind up in the middle of some other entry in the `dir' file, which has nothing to do with what you were reading. diff --git a/info/texinfo.info-6 b/info/texinfo.info-6 index 5adf092..3cb8989 100644 --- a/info/texinfo.info-6 +++ b/info/texinfo.info-6 @@ -159,7 +159,8 @@ not special within the table body, and you may break input lines in your source file as necessary. Here is a complete example of a multi-column table (the text is from -`The GNU Emacs Manual', *note Splitting Windows: (xemacs)Split Window.): +`The XEmacs Users' Manual', *note Splitting Windows: (xemacs)Split +Window.): @multitable @columnfractions .15 .45 .4 @item Key @tab Command @tab Description diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 792f924..151a0a1 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2001-01-17 Martin Buchholz + + * XEmacs 21.2.41 "Polyhymnia" is released. + 2001-01-08 Martin Buchholz * XEmacs 21.2.40 is released. diff --git a/lib-src/config.values.in b/lib-src/config.values.in index e71f67b..a0cb7ef 100644 --- a/lib-src/config.values.in +++ b/lib-src/config.values.in @@ -90,6 +90,7 @@ docdir "@docdir@" dynodump_arch "@dynodump_arch@" etcdir "@etcdir@" exec_prefix "@exec_prefix@" +extra_includes "@extra_includes@" extra_objs "@extra_objs@" have_esd_config "@have_esd_config@" includedir "@includedir@" diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 89da658..286eb10 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -519,6 +519,62 @@ * files.el (insert-file-contents-literally): Treat file as binary; call file-name-handlers. [sync with Emacs 20.3.10] +2001-01-17 Martin Buchholz + + * XEmacs 21.2.41 "Polyhymnia" is released. + +2001-01-16 Mike Sperber + + * setup-paths.el (paths-core-load-path-depth): Stopgap bump to + catch lisp/mule/. + +2001-01-14 Mike Sperber + + * startup.el (maybe-create-compatibility-dot-emacs): + (maybe-unmigrate-user-init-file): + (unmigrate-user-init-file): Created. + (maybe-migrate-user-init-file): Offer creation of compatibility + .emacs. + Some doc fixes wrt init file location. + +2001-01-15 Golubev I. N. + + * faces.el (face-frob-from-locale-first): new variable. + (frob-face-font-2): Honor tags arg while trying to use + standard-face-mapping. When face-frob-from-locale-first is set, + first try to set face inheriting from frobbed-face. + +2001-01-15 Didier Verna + + * about.el (xemacs-hackers): update my entry. + * about.el (about-url-alist): ditto. + * about.el (about-maintainer-info): ditto. + * about.el (about-hackers): ditto. + +2001-01-15 Martin Buchholz + + The byte compiler has been badly broken for a year, + by the patch of 1999-12-06. + * byte-optimize.el (byte-optimize-form-code-walker): + Bug was: the byte compiler was making this erroneous optimization: + (progn (or (foo)) (bar)) ==> (bar) + +2000-11-20 Mike Sperber + + * setup-paths.el (paths-core-load-path-depth): Split + `paths-load-path-depth' in two for site and core lisp. Don't + recurse into core. + * setup-paths.el (paths-construct-load-path): Use. + +2001-01-10 Andy Piper + + * package-net.el (package-net-cygwin32-binary-size): new variable + (package-net-win32-binary-size): ditto. add much needed + commentary. + + * gutter-items.el (buffers-tab-items): correct off-by-one error + for buffers-tab-max-size. + 2001-01-08 Martin Buchholz * XEmacs 21.2.40 is released. diff --git a/lisp/about.el b/lisp/about.el index ac32ccb..decbd08 100644 --- a/lisp/about.el +++ b/lisp/about.el @@ -63,7 +63,7 @@ (cthomp "Chuck Thompson" "cthomp@xemacs.org") (dmoore "David Moore" "dmoore@ucsd.edu") (dkindred "Darrell Kindred" "dkindred@cmu.edu") - (dv "Didier Verna" "verna@inf.enst.fr") + (dv "Didier Verna" "didier@xemacs.org") (hniksic "Hrvoje Niksic" "hniksic@xemacs.org") (jareth "Jareth Hein" "jareth@camelot.co.jp") (jason "Jason Mastaler" "jason@xemacs.org") @@ -108,6 +108,7 @@ (chr . "http://www.xemacs.org/faq/") (dkindred . "http://www.cs.cmu.edu/People/dkindred/me.html") (dmoore . "http://oj.egbt.org/dmoore/") + (dv . "http://www.lrde.epita.fr/~didier/") (jason . "http://www.mastaler.com/") (juhp . "http://www.kurims.kyoto-u.ac.jp/~petersen/") (jwz . "http://www.jwz.org/") @@ -900,14 +901,23 @@ a software development firm. See ") (widget-insert ".\n")) (dv (widget-insert "\ -I'm currently working (Ph.D.) on the cognitive aspects of -Human-Machine Interaction in Virtual Environments, and especialy on -the possibility of adding (artificial) intelligence between the system -and the operator, in order to detect the intentions of the latter. - -Otherwise, I'm, say, 35.82% professional Jazz guitar player, -which means that's not the way I earn my crust, but things may very -well reverse in the future ...\n")) +I graduated at ENST (an engineering school in Paris) and have a Ph.D. +in computer science. I'm currently a teacher at EPITA (another +engineering school, still in Paris) and a researcher at LRDE (EPITA's +research and development laboratory). Our research topics include +generic programming and distributed virtual reality. + +Apart from XEmacs, I'm also involved in other free software projects, +including Gnus, BBDB, and the GNU \"autotools\". I also wrote some +LaTeX packages (ugh :-). + +All of this, actually, is only 60% true. Two days per week, I'm also a +semi-professional Jazz guitar player (and singer), which means that it +is not the way I earn my crust, but things may very well reverse in +the future ...\n\n") + (widget-insert "Visit Didier's home page: ") + (about-url-link 'dv "Visit Didier's home page") + (widget-insert "\n")) (rossini (widget-insert "\ Author of the first XEmacs FAQ, as well as minor priest in the @@ -1135,10 +1145,10 @@ XEmacs will speak Scheme.\n") Vin helps maintain the older, more mature (read: moldy) versions of XEmacs. Vin has maintained the official XEmacs patch pages.\n") (about-show-linked-info 'thiessel "\ -Worked at University of Kaiserslautern where he took part in the +Worked at University of Kaiserslautern where he took part in the development and design of a CAD framework for analog integrated -circuits with special emphasis on distributed software concepts. He -has now joined HP as technical consultant. +circuits with special emphasis on distributed software concepts. He +has now joined HP as technical consultant. For XEmacs he does beta testing and tries to take care of XEmacs website at .\n") @@ -1163,14 +1173,16 @@ Darrell is currently a doctoral student in computer science at Carnegie Mellon University, but he's trying hard to kick that habit.\n") (about-show-linked-info 'dv "\ -I'm currently working (Ph.D.) on the cognitive aspects of -Human-Machine Interaction in Virtual Environments, and especialy on -the possibility of adding (artificial) intelligence between the system -and the operator, in order to detect the intentions of the latter. - -Otherwise, I'm, say, 35.82% professional Jazz guitar player, -which means that's not the way I earn my crust, but things may very -well reverse in the future ...\n") +I joined the development of XEmacs in 1996, and have been one of the +core maintainers since 1998. Although I'm mostly interested in the +GUI, ergonomics, redisplay and autoconf issues, it's probably simpler +to describe what I'm *not* involved in: I've never touched the Lisp +implementation, and I probably never will... + +I'm the author of the multicast support, I wrote and maintain some +external Emacs Lisp packages (including mchat) and I'm also +responsible for some of the core Lisp code (including the rectangle +library which I rewrote for both XEmacs and GNU Emacs).\n") (about-show-linked-info 'marcpa "\ I work for Positron Industries Inc., Public Safety Division.\n") (about-show-linked-info 'pez "\ @@ -1259,9 +1271,9 @@ extensions.\n") Perennial Emacs hacker since 1986 or so, when he first started on GNU Emacs 17.something. Over the years, he's developed \"OEmacs\", the first version of GNU Emacs 19 for MSDOS, and \"bigperl\", a 32-bit version of -Perl4 for MSDOS. In recent years, reality has intruded and he no longer +Perl4 for MSDOS. In recent years, reality has intruded and he no longer has much time for playing with cool programs. What little time he has -now goes to XEmacs hacking, where he's worked on speeding up dired under +now goes to XEmacs hacking, where he's worked on speeding up dired under MS Windows, and to feeding his two cats.\n") "\n\ In addition to those just mentioned, the following people have spent a diff --git a/lisp/auto-autoloads.el b/lisp/auto-autoloads.el index cec581d..3881e9a 100644 --- a/lisp/auto-autoloads.el +++ b/lisp/auto-autoloads.el @@ -528,7 +528,7 @@ Check that OBJECT is of type TYPE. TYPE is a Common Lisp-style type specifier." nil nil) (autoload 'check-type "cl-macs" "\ -Verify that FORM is of type TYPE; signal an error if not. +Verify that PLACE is of type TYPE; signal a continuable error if not. STRING is an optional description of the desired type." nil 'macro) (autoload 'assert "cl-macs" "\ @@ -1544,6 +1544,17 @@ Fetch and install the latest versions of all customized packages." t nil) ;;;*** +;;;### (autoloads (package-net-update-installed-db package-net-setup-directory) "package-net" "lisp/package-net.el") + +(autoload 'package-net-setup-directory "package-net" nil nil nil) + +(autoload 'package-net-update-installed-db "package-net" "\ +Write out the installed package index in a net install suitable format. +If DESTDIR is non-nil then use that as the destination directory. +DESTDIR defaults to the value of `package-net-setup-directory'." nil nil) + +;;;*** + ;;;### (autoloads (pui-list-packages pui-add-install-directory package-ui-add-site) "package-ui" "lisp/package-ui.el") (autoload 'package-ui-add-site "package-ui" "\ diff --git a/lisp/byte-optimize.el b/lisp/byte-optimize.el index ff6edde..f591e82 100644 --- a/lisp/byte-optimize.el +++ b/lisp/byte-optimize.el @@ -473,12 +473,12 @@ (if (and (cdr form) (null backwards)) (byte-compile-log " all subforms of %s called for effect; deleted" form)) - (and backwards - ;; Now optimize the rest of the forms. We need the return - ;; values. We already did the car. - (setcdr backwards - (mapcar 'byte-optimize-form (cdr backwards))) - (cons fn (nreverse backwards)))) + (when backwards + ;; Now optimize the rest of the forms. We need the return + ;; values. We already did the car. + (setcdr backwards + (mapcar 'byte-optimize-form (cdr backwards)))) + (cons fn (nreverse backwards))) (cons fn (mapcar 'byte-optimize-form (cdr form))))) ((eq fn 'interactive) diff --git a/lisp/cl-macs.el b/lisp/cl-macs.el index 5a9ab08..05d88da 100644 --- a/lisp/cl-macs.el +++ b/lisp/cl-macs.el @@ -150,11 +150,41 @@ ARGLIST allows full Common Lisp conventions." (defvar bind-block) (defvar bind-defs) (defvar bind-enquote) (defvar bind-inits) (defvar bind-lets) (defvar bind-forms) +;; npak@ispras.ru +(defun cl-upcase-arg (arg) + ;; Changes all non-keyword sysmbols in `arg' to symbols + ;; with name in upper case. + ;; arg is either symbol or list of symbols or lists + (cond ((symbolp arg) + (if (memq arg lambda-list-keywords) + ;; Do not upcase &optional, &key etc. + arg + (intern (upcase (symbol-name arg))))) + ((listp arg) + (mapcar 'cl-upcase-arg arg)))) + +;; npak@ispras.ru +(defun cl-function-arglist (function agrlist) + "Returns string with printed representation of arguments list. +Supports Common Lisp lambda lists." + (prin1-to-string + (cons function (cl-upcase-arg agrlist)))) + (defun cl-transform-lambda (form bind-block) (let* ((args (car form)) (body (cdr form)) (bind-defs nil) (bind-enquote nil) (bind-inits nil) (bind-lets nil) (bind-forms nil) - (header nil) (simple-args nil)) + (header nil) (simple-args nil) + (doc "")) + ;; Add CL lambda list to documentation. npak@ispras.ru + (if (stringp (car body)) + (setq doc (cl-pop body))) + (cl-push (concat "\nCommon Lisp lambda list:\n" + " " (cl-function-arglist bind-block args) + "\n\n" + doc) + header) + (while (or (stringp (car body)) (eq (car-safe (car body)) 'interactive)) (cl-push (cl-pop body) header)) (setq args (if (listp args) (copy-list args) (list '&rest args))) diff --git a/lisp/faces.el b/lisp/faces.el index d14b45b..568c7ae 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -907,6 +907,12 @@ the function to be called on it." (setq inst-list (cdr inst-list))) (or result first-valid))) +(defcustom face-frob-from-locale-first nil + "*If non nil, use kludgy way of frobbing fonts suitable for non-mule +multi-charset environments." + :group 'faces + :type 'boolean) + (defun frob-face-font-2 (face locale tags unfrobbed-face frobbed-face tty-thunk ws-thunk standard-face-mapping) ;; another kludge to make things more intuitive. If we're @@ -924,14 +930,20 @@ the function to be called on it." (let* ((the-locale (cond ((null locale) 'global) ((valid-specifier-locale-p locale) locale) (t nil))) - (specs (and the-locale (face-font face the-locale nil t))) - (change-it (and specs (cdr (assoc specs standard-face-mapping))))) + (spec-list + (and + the-locale + (specifier-spec-list (get (get-face face) 'font) the-locale tags t))) + (change-it + (and + spec-list + (cdr (assoc (cdadar spec-list) standard-face-mapping))))) (if (and change-it (not (memq (face-name (find-face face)) '(default bold italic bold-italic)))) (progn (or (equal change-it t) - (set-face-property face 'font change-it the-locale)) + (set-face-property face 'font change-it the-locale tags)) (funcall tty-thunk)) (let* ((domain (cond ((null the-locale) nil) ((valid-specifier-domain-p the-locale) the-locale) @@ -942,20 +954,34 @@ the function to be called on it." (selected-device)) (t nil))) (inst (and domain (face-property-instance face 'font domain)))) - (funcall tty-thunk) - (funcall ws-thunk) ;; If it's reasonable to do the inherit-from-standard-face trick, ;; and it's called for, then do it now. - (or (null domain) - (not (equal inst (face-property-instance face 'font domain))) - ;; don't do it for standard faces, or you'll get inheritance loops. - ;; #### This makes XEmacs seg fault! fix this bug. - (memq (face-name (find-face face)) - '(default bold italic bold-italic)) - (not (equal (face-property-instance face 'font domain) - (face-property-instance unfrobbed-face 'font domain))) + (if (and + face-frob-from-locale-first + (eq the-locale 'global) + domain + (equal inst (face-property-instance face 'font domain)) + ;; don't do it for standard faces, or you'll get inheritance loops. + ;; #### This makes XEmacs seg fault! fix this bug. + (not (memq (face-name (find-face face)) + '(default bold italic bold-italic))) + (equal (face-property-instance face 'font domain) + (face-property-instance unfrobbed-face 'font domain))) (set-face-property face 'font (vector frobbed-face) - the-locale tags)))))) + the-locale tags) + ;; and only otherwise try to build new property value artificially + (funcall tty-thunk) + (funcall ws-thunk) + (and + domain + (equal inst (face-property-instance face 'font domain)) + ;; don't do it for standard faces, or you'll get inheritance loops. + ;; #### This makes XEmacs seg fault! fix this bug. + (not (memq (face-name (find-face face)) + '(default bold italic bold-italic))) + (equal (face-property-instance face 'font domain) + (face-property-instance unfrobbed-face 'font domain)) + (set-face-property face 'font (vector frobbed-face) the-locale tags))))))) (defun make-face-bold (face &optional locale tags) "Make FACE bold in LOCALE, if possible. diff --git a/lisp/gutter-items.el b/lisp/gutter-items.el index fab1de4..b63504a 100644 --- a/lisp/gutter-items.el +++ b/lisp/gutter-items.el @@ -277,7 +277,7 @@ redefining the function `format-buffers-menu-line'." (and (integerp buffers-tab-max-size) (> buffers-tab-max-size 1) (> (length buffers) buffers-tab-max-size) - (setcdr (nthcdr buffers-tab-max-size buffers) nil)) + (setcdr (nthcdr (1- buffers-tab-max-size) buffers) nil)) ;; sort buffers in group (default is most-recently-selected) (when buffers-tab-sort-function (setq buffers (funcall buffers-tab-sort-function buffers))) diff --git a/lisp/mule/auto-autoloads.el b/lisp/mule/auto-autoloads.el index 54ca28f..78c9da6 100644 --- a/lisp/mule/auto-autoloads.el +++ b/lisp/mule/auto-autoloads.el @@ -1,10 +1,7 @@ ;;; DO NOT MODIFY THIS FILE (if (featurep 'mule-autoloads) (error "Already loaded")) -;;;### (autoloads (ccl-execute-with-args check-ccl-program define-ccl-program declare-ccl-program ccl-dump ccl-compile ccl-program-p) "mule-ccl" "mule/mule-ccl.el") - -(autoload 'ccl-program-p "mule-ccl" "\ -Return t if OBJECT is a valid CCL compiled code." nil nil) +;;;### (autoloads (ccl-execute-with-args check-ccl-program define-ccl-program declare-ccl-program ccl-dump ccl-compile) "mule-ccl" "mule/mule-ccl.el") (autoload 'ccl-compile "mule-ccl" "\ Return a compiled code of CCL-PROGRAM as a vector of integer." nil nil) @@ -15,25 +12,233 @@ Disassemble compiled CCL-CODE." nil nil) (autoload 'declare-ccl-program "mule-ccl" "\ Declare NAME as a name of CCL program. -To compile a CCL program which calls another CCL program not yet -defined, it must be declared as a CCL program in advance. +This macro exists for backward compatibility. In the old version of +Emacs, to compile a CCL program which calls another CCL program not +yet defined, it must be declared as a CCL program in advance. But, +now CCL program names are resolved not at compile time but before +execution. + Optional arg VECTOR is a compiled CCL code of the CCL program." nil 'macro) (autoload 'define-ccl-program "mule-ccl" "\ Set NAME the compiled code of CCL-PROGRAM. -CCL-PROGRAM is `eval'ed before being handed to the CCL compiler `ccl-compile'. -The compiled code is a vector of integers." nil 'macro) + +CCL-PROGRAM has this form: + (BUFFER_MAGNIFICATION + CCL_MAIN_CODE + [ CCL_EOF_CODE ]) + +BUFFER_MAGNIFICATION is an integer value specifying the approximate +output buffer magnification size compared with the bytes of input data +text. If the value is zero, the CCL program can't execute `read' and +`write' commands. + +CCL_MAIN_CODE and CCL_EOF_CODE are CCL program codes. CCL_MAIN_CODE +executed at first. If there's no more input data when `read' command +is executed in CCL_MAIN_CODE, CCL_EOF_CODE is executed. If +CCL_MAIN_CODE is terminated, CCL_EOF_CODE is not executed. + +Here's the syntax of CCL program code in BNF notation. The lines +starting by two semicolons (and optional leading spaces) describe the +semantics. + +CCL_MAIN_CODE := CCL_BLOCK + +CCL_EOF_CODE := CCL_BLOCK + +CCL_BLOCK := STATEMENT | (STATEMENT [STATEMENT ...]) + +STATEMENT := + SET | IF | BRANCH | LOOP | REPEAT | BREAK | READ | WRITE | CALL + | TRANSLATE | END + +SET := (REG = EXPRESSION) + | (REG ASSIGNMENT_OPERATOR EXPRESSION) + ;; The following form is the same as (r0 = integer). + | integer + +EXPRESSION := ARG | (EXPRESSION OPERATOR ARG) + +;; Evaluate EXPRESSION. If the result is nonzeor, execute +;; CCL_BLOCK_0. Otherwise, execute CCL_BLOCK_1. +IF := (if EXPRESSION CCL_BLOCK_0 CCL_BLOCK_1) + +;; Evaluate EXPRESSION. Provided that the result is N, execute +;; CCL_BLOCK_N. +BRANCH := (branch EXPRESSION CCL_BLOCK_0 [CCL_BLOCK_1 ...]) + +;; Execute STATEMENTs until (break) or (end) is executed. +LOOP := (loop STATEMENT [STATEMENT ...]) + +;; Terminate the most inner loop. +BREAK := (break) + +REPEAT := + ;; Jump to the head of the most inner loop. + (repeat) + ;; Same as: ((write [REG | integer | string]) + ;; (repeat)) + | (write-repeat [REG | integer | string]) + ;; Same as: ((write REG [ARRAY]) + ;; (read REG) + ;; (repeat)) + | (write-read-repeat REG [ARRAY]) + ;; Same as: ((write integer) + ;; (read REG) + ;; (repeat)) + | (write-read-repeat REG integer) + +READ := ;; Set REG_0 to a byte read from the input text, set REG_1 + ;; to the next byte read, and so on. + (read REG_0 [REG_1 ...]) + ;; Same as: ((read REG) + ;; (if (REG OPERATOR ARG) CCL_BLOCK_0 CCL_BLOCK_1)) + | (read-if (REG OPERATOR ARG) CCL_BLOCK_0 CCL_BLOCK_1) + ;; Same as: ((read REG) + ;; (branch REG CCL_BLOCK_0 [CCL_BLOCK_1 ...])) + | (read-branch REG CCL_BLOCK_0 [CCL_BLOCK_1 ...]) + ;; Read a character from the input text while parsing + ;; multibyte representation, set REG_0 to the charset ID of + ;; the character, set REG_1 to the code point of the + ;; character. If the dimension of charset is two, set REG_1 + ;; to ((CODE0 << 8) | CODE1), where CODE0 is the first code + ;; point and CODE1 is the second code point. + | (read-multibyte-character REG_0 REG_1) + +WRITE := + ;; Write REG_0, REG_1, ... to the output buffer. If REG_N is + ;; a multibyte character, write the corresponding multibyte + ;; representation. + (write REG_0 [REG_1 ...]) + ;; Same as: ((r7 = EXPRESSION) + ;; (write r7)) + | (write EXPRESSION) + ;; Write the value of `integer' to the output buffer. If it + ;; is a multibyte character, write the corresponding multibyte + ;; representation. + | (write integer) + ;; Write the byte sequence of `string' as is to the output + ;; buffer. It is encoded by binary coding system, thus, + ;; by this operation, you cannot write multibyte string + ;; as it is. + | (write string) + ;; Same as: (write string) + | string + ;; Provided that the value of REG is N, write Nth element of + ;; ARRAY to the output buffer. If it is a multibyte + ;; character, write the corresponding multibyte + ;; representation. + | (write REG ARRAY) + ;; Write a multibyte representation of a character whose + ;; charset ID is REG_0 and code point is REG_1. If the + ;; dimension of the charset is two, REG_1 should be ((CODE0 << + ;; 8) | CODE1), where CODE0 is the first code point and CODE1 + ;; is the second code point of the character. + | (write-multibyte-character REG_0 REG_1) + +;; Call CCL program whose name is ccl-program-name. +CALL := (call ccl-program-name) + +;; Terminate the CCL program. +END := (end) + +;; CCL registers that can contain any integer value. As r7 is also +;; used by CCL interpreter, its value is changed unexpectedly. +REG := r0 | r1 | r2 | r3 | r4 | r5 | r6 | r7 + +ARG := REG | integer + +OPERATOR := + ;; Normal arithmethic operators (same meaning as C code). + + | - | * | / | % + + ;; Bitwize operators (same meaning as C code) + | & | `|' | ^ + + ;; Shifting operators (same meaning as C code) + | << | >> + + ;; (REG = ARG_0 <8 ARG_1) means: + ;; (REG = ((ARG_0 << 8) | ARG_1)) + | <8 + + ;; (REG = ARG_0 >8 ARG_1) means: + ;; ((REG = (ARG_0 >> 8)) + ;; (r7 = (ARG_0 & 255))) + | >8 + + ;; (REG = ARG_0 // ARG_1) means: + ;; ((REG = (ARG_0 / ARG_1)) + ;; (r7 = (ARG_0 % ARG_1))) + | // + + ;; Normal comparing operators (same meaning as C code) + | < | > | == | <= | >= | != + + ;; If ARG_0 and ARG_1 are higher and lower byte of Shift-JIS + ;; code, and CHAR is the corresponding JISX0208 character, + ;; (REG = ARG_0 de-sjis ARG_1) means: + ;; ((REG = CODE0) + ;; (r7 = CODE1)) + ;; where CODE0 is the first code point of CHAR, CODE1 is the + ;; second code point of CHAR. + | de-sjis + + ;; If ARG_0 and ARG_1 are the first and second code point of + ;; JISX0208 character CHAR, and SJIS is the correponding + ;; Shift-JIS code, + ;; (REG = ARG_0 en-sjis ARG_1) means: + ;; ((REG = HIGH) + ;; (r7 = LOW)) + ;; where HIGH is the higher byte of SJIS, LOW is the lower + ;; byte of SJIS. + | en-sjis + +ASSIGNMENT_OPERATOR := + ;; Same meaning as C code + += | -= | *= | /= | %= | &= | `|=' | ^= | <<= | >>= + + ;; (REG <8= ARG) is the same as: + ;; ((REG <<= 8) + ;; (REG |= ARG)) + | <8= + + ;; (REG >8= ARG) is the same as: + ;; ((r7 = (REG & 255)) + ;; (REG >>= 8)) + + ;; (REG //= ARG) is the same as: + ;; ((r7 = (REG % ARG)) + ;; (REG /= ARG)) + | //= + +ARRAY := `[' integer ... `]' + + +TRANSLATE := + (translate-character REG(table) REG(charset) REG(codepoint)) + | (translate-character SYMBOL REG(charset) REG(codepoint)) +MAP := + (iterate-multiple-map REG REG MAP-IDs) + | (map-multiple REG REG (MAP-SET)) + | (map-single REG REG MAP-ID) +MAP-IDs := MAP-ID ... +MAP-SET := MAP-IDs | (MAP-IDs) MAP-SET +MAP-ID := integer +" nil 'macro) (autoload 'check-ccl-program "mule-ccl" "\ Check validity of CCL-PROGRAM. -If CCL-PROGRAM is a symbol denoting a valid CCL program, return +If CCL-PROGRAM is a symbol denoting a CCL program, return CCL-PROGRAM, else return nil. If CCL-PROGRAM is a vector and optional arg NAME (symbol) is supplied, register CCL-PROGRAM by name NAME, and return NAME." nil 'macro) (autoload 'ccl-execute-with-args "mule-ccl" "\ Execute CCL-PROGRAM with registers initialized by the remaining args. -The return value is a vector of resulting CCL registers." nil nil) +The return value is a vector of resulting CCL registers. + +See the documentation of `define-ccl-program' for the detail of CCL program." nil nil) ;;;*** diff --git a/lisp/package-net.el b/lisp/package-net.el index fbc36ff..63199c5 100644 --- a/lisp/package-net.el +++ b/lisp/package-net.el @@ -27,6 +27,61 @@ ;; Manipulate packages for the netinstall setup utility +;; The process should be so: + +;; 1. The package maintainer or release manager makes a release +;; announcement. +;; +;; 2. For a new package releases the netinstall maintainer simply +;; needs to update `ftp://ftp.xemacs.org/pub/xemacs/setup.ini'. This is +;; harder than it sounds because the file also includes information +;; about the binary releases. At the moment going to the netinstall +;; directory and typing: +;; +;; `make XEMACS= setup.ini' +;; +;; will do the right thing provided that: +;; +;; (a) `package-net-cygwin32-binary-size' and +;; `package-net-win32-binary-size' are set correctly. +;; +;; (b) The binary pointed to by `XEMACS' has a current +;; `package-index.LATEST.pgp' file. If you don't specify the XEMACS= +;; part then you will get whatever is current for your build tree - +;; which is probably not what you want. +;; +;; You can run `package-net-convert-index-to-ini' manually and specify +;; REMOTE but I generally found that to be inconvenient and error-prone. +;; +;; 3. For package releases that's all you need to do. For binary +;; releases you need to build both cygwin and win32 binaries and put +;; them in appropriate tarballs: +;; +;; For cygwin, configure, make and install and then do (this is for +;; 21.1.13): +;; +;; cd +;; tar cvzf xemacs-i686-pc-cygwin32-21.1.13.tar.gz \ +;; ./bin/i686-pc-cygwin32 ./lib/xemacs-21.1.13 \ +;; ./lib/xemacs/lock ./man/man1/xemacs.1 \ +;; ./man/man1/ctags.1 ./man/man1/gnu*.1' +;; +;; Note that the naming of the package is important. Don't be tempted +;; to change the order in any way. +;; +;; For win32 build and install the release and then (again for +;; 21.1.13): +;; +;; cd +;; tar cvzf xemacs-i386-pc-win32-21.1.13.tar.gz ./XEmacs-21.1.13 +;; +;; The binaries should be uploaded to +;; `ftp://ftp.xemacs.org/pub/xemacs/binaries/cygwin32' and +;; `ftp://ftp.xemacs.org/pub/xemacs/binaries/win32' respectively. Take +;; a note of their sizes and set `package-net-cygwin32-binary-size' +;; and `package-net-win32-binary-size' appropriately in this file and +;; then follow step 2. + (require 'package-admin) (require 'package-get) @@ -35,6 +90,22 @@ ;; bootstrap the process. This will be: ;; /setup/ for native windows ;; /lib/xemacs/setup for cygwin. +;; +;;; To Do: +;; +;; 1. Package update functions should also update the installed +;; database so that running setup.exe again does not reinstall +;; packages. +;; +;; 2. Generating setup.ini should be more automatic. + +(defvar package-net-cygwin32-binary-size 6917126 + "The size in bytes of the cygwin32 binary distribution.") + +(defvar package-net-win32-binary-size 6563941 + "The size in bytes of the win32 binary distribution.") + +;;;###autoload (defun package-net-setup-directory () (file-truename (concat data-directory "../../" (if (eq system-type 'cygwin32) "xemacs/setup/" "setup/")))) @@ -59,31 +130,34 @@ DESTDIR defaults to the value of `data-directory'." (+ (* (car (current-time)) 65536) (car (cdr (current-time)))))) (insert (format "setup-version: %s\n\n" (or version "1.0"))) ;; Native version - ;; We give the package a capitalised name so that it appears at the top - (insert (format "@ %s\n" "xemacs-i586-pc-win32")) + (insert (format "@ %s\n" "xemacs-i386-pc-win32")) (insert (format "version: %s\n" emacs-program-version)) (insert "type: native\n") (insert (format "install: binaries/win32/%s %d\n\n" (concat emacs-program-name - "-i586-pc-win32-" - emacs-program-version ".tar.gz") 0)) + "-i386-pc-win32-" + emacs-program-version ".tar.gz") + package-net-win32-binary-size)) ;; Cygwin version - ;; We give the package a capitalised name so that it appears at the top (insert (format "@ %s\n" "xemacs-i686-pc-cygwin32")) (insert (format "version: %s\n" emacs-program-version)) (insert "type: cygwin\n") (insert (format "install: binaries/cygwin32/%s %d\n\n" (concat emacs-program-name "-i686-pc-cygwin32-" - emacs-program-version ".tar.gz") 6779200)) + emacs-program-version ".tar.gz") + package-net-cygwin32-binary-size)) ;; Standard packages (while entries (setq entry (car entries)) (setq plist (car (cdr entry))) - (insert (format "@ %s\n" (symbol-name (car entry)))) - (insert (format "version: %s\n" (plist-get plist 'version))) - (insert (format "install: packages/%s %s\n" (plist-get plist 'filename) - (plist-get plist 'size))) + ;; ignore mule packages + (unless (or (memq 'mule-base (plist-get plist 'requires)) + (eq 'mule-base (car entry))) + (insert (format "@ %s\n" (symbol-name (car entry)))) + (insert (format "version: %s\n" (plist-get plist 'version))) + (insert (format "install: packages/%s %s\n" (plist-get plist 'filename) + (plist-get plist 'size))) ;; These are not supported as yet ;; ;; (insert (format "source: %s\n" (plist-get plist 'source))) @@ -91,12 +165,22 @@ DESTDIR defaults to the value of `data-directory'." ;; (insert (format "version: %s\n" (plist-get plist 'version))) ;; (insert (format "install: %s\n" (plist-get plist 'filename))) ;; (insert (format "source: %s\n" (plist-get plist 'source))) - (insert "\n") + (insert "\n")) (setq entries (cdr entries)))) (insert "# setup.ini file ends here\n") (write-region (point-min) (point-max) (concat destdir "setup.ini"))) (kill-buffer buf)))) +(defun package-net-batch-convert-index-to-ini () + "Convert the package index to ini file format." + (unless noninteractive + (error "`package-net-batch-convert-index-to-ini' is to be used only with -batch")) + (let ((dir (car command-line-args-left)) + (version (car (cdr command-line-args-left))) + (package-get-require-signed-base-updates nil)) + (package-net-convert-index-to-ini dir nil version))) + +;;;###autoload (defun package-net-update-installed-db (&optional destdir) "Write out the installed package index in a net install suitable format. If DESTDIR is non-nil then use that as the destination directory. diff --git a/lisp/setup-paths.el b/lisp/setup-paths.el index f26dad8..d22ba46 100644 --- a/lisp/setup-paths.el +++ b/lisp/setup-paths.el @@ -38,9 +38,12 @@ ;;; Code: -(defvar paths-load-path-depth 1 +(defvar paths-core-load-path-depth 1 "Depth of load-path searches in core Lisp paths.") +(defvar paths-site-load-path-depth 1 + "Depth of load-path searches in site Lisp paths.") + (defvar paths-default-info-directories (mapcar (function (lambda (dirlist) @@ -87,11 +90,11 @@ (site-lisp-load-path (and site-lisp-directory (paths-find-recursive-load-path (list site-lisp-directory) - paths-load-path-depth))) + paths-site-load-path-depth))) (lisp-load-path (and lisp-directory (paths-find-recursive-load-path (list lisp-directory) - paths-load-path-depth)))) + paths-core-load-path-depth)))) (append env-load-path early-package-load-path site-lisp-load-path @@ -109,11 +112,11 @@ (site-module-load-path (and site-module-directory (paths-find-recursive-load-path (list site-module-directory) - paths-load-path-depth))) + paths-site-load-path-depth))) (module-load-path (and module-directory (paths-find-recursive-load-path (list module-directory) - paths-load-path-depth)))) + paths-core-load-path-depth)))) (append env-module-path site-module-load-path module-load-path))) diff --git a/lisp/startup.el b/lisp/startup.el index 2fcc7ae..a9c7325 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -77,9 +77,9 @@ The frame system uses this to open frames to display messages while XEmacs loads the user's initialization file.") (defvar after-init-hook nil - "*Functions to call after loading the init file (`.emacs'). + "*Functions to call after loading the init file. The call is not protected by a condition-case, so you can set `debug-on-error' -in `.emacs', and put all the actual code on `after-init-hook'.") +in the init file, and put all the actual code on `after-init-hook'.") (defvar term-setup-hook nil "*Functions to be called after loading terminal-specific Lisp code. @@ -238,7 +238,7 @@ In addition, the") -debug-init Enter the debugger if an error in the init file occurs. -unmapped Do not map the initial frame. -no-site-file Do not load the site-specific init file (site-start.el). - -no-init-file Do not load the user-specific init file (~/.emacs). + -no-init-file Do not load the user-specific init file. -no-early-packages Do not process early packages. -no-autoloads Do not load global symbol files (auto-autoloads) at startup. Also implies `-vanilla'. @@ -247,8 +247,6 @@ In addition, the") -user-init-file Use as init file. -user-init-directory Use as init directory. -user Load user's init file instead of your own. - Equivalent to -user-init-file ~/.emacs - -user-init-directory ~/.xemacs/ -u Same as -user.\n") (let ((l command-switch-alist) (insert (lambda (&rest x) @@ -442,7 +440,7 @@ Type ^H^H^H (Control-h Control-h Control-h) to get more help options.\n") (unwind-protect (command-line) - ;; Do this again, in case .emacs defined more abbreviations. + ;; Do this again, in case the init file defined more abbreviations. (setq default-directory (abbreviate-file-name default-directory)) ;; Specify the file for recording all the auto save files of ;; this session. This is used by recover-session. @@ -457,7 +455,7 @@ Type ^H^H^H (Control-h Control-h Control-h) to get more help options.\n") (and term-setup-hook (run-hooks 'term-setup-hook)) (setq term-setup-hook nil) - ;; ;; Modify the initial frame based on what .emacs puts into + ;; ;; Modify the initial frame based on what the init file puts into ;; ;; ...-frame-alist. (frame-notice-user-settings) ;; ;;####FSFmacs junk @@ -710,6 +708,9 @@ After the migration, init.el/init.elc holds user-written initialization code. Moreover the customize settings will be in custom.el. +You can undo the migration at any time with +M-x maybe-unmigrate-user-init-file. + If you choose not to do this now, XEmacs will not ask you this question in the future. However, you can still make XEmacs perform the migration at any time with M-x migrate-user-init-file.") @@ -717,9 +718,26 @@ perform the migration at any time with M-x migrate-user-init-file.") (yes-or-no-p-minibuf (concat "Migrate init file to " user-init-directory "? ")))) - (migrate-user-init-file) + (progn + (migrate-user-init-file) + (maybe-create-compatibility-dot-emacs)) (customize-save-variable 'load-home-init-file t)))) +(defun maybe-create-compatibility-dot-emacs () + "Ask user if she wants to create a .emacs compatibility file." + (if (with-output-to-temp-buffer (help-buffer-name nil) + (progn + (princ "The initialization code has now been migrated to the ") + (princ user-init-directory) + (princ "directory. + +For backwards compatibility with, for example, older versions of XEmacs, +XEmacs can create a special old-style .emacs file in your home +directory which will load the relocated initialization code.") + (show-temp-buffer-in-current-frame standard-output) + (yes-or-no-p-minibuf "Create compatibility .emacs? "))) + (create-compatibility-dot-emacs))) + (defun migrate-user-init-file () "Migrate the init file from the home directory." (interactive) @@ -728,14 +746,54 @@ perform the migration at any time with M-x migrate-user-init-file.") (message "Creating %s directory..." user-init-directory) (make-directory user-init-directory))) (message "Migrating custom file...") + (customize-set-value 'load-home-init-file nil) (custom-migrate-custom-file (make-custom-file-name user-init-file 'force-new)) (message "Moving init file...") - (rename-file user-init-file - (expand-file-name user-init-file-base - user-init-directory)) + (let ((new-user-init-file (expand-file-name user-init-file-base + user-init-directory))) + (rename-file user-init-file new-user-init-file) + (setq user-init-file new-user-init-file)) (message "Migration done.")) +(defun create-compatibility-dot-emacs () + "Create .emacs compatibility file for migrated setup." + (message "Creating .emacs compatibility file.") + (with-temp-file (expand-file-name ".emacs" "~") + (insert ";;; XEmacs backwards compatibility file\n") + (insert "(setq user-init-file\n") + (insert " (expand-file-name \"init.el\"\n") + (insert " (expand-file-name \".xemacs\" \"~\")))\n") + (insert "(setq custom-file\n") + (insert " (expand-file-name \"custom.el\"\n") + (insert " (expand-file-name \".xemacs\" \"~\")))\n") + (insert "\n") + (insert "(load-file user-init-file)\n") + (insert "(load-file custom-file)")) + (message "Created .emacs compatibility file.")) + +(defun maybe-unmigrate-user-init-file () + "Possibly unmigrate the user's init and custom files." + (interactive) + (let ((dot-emacs-file-name (expand-file-name ".emacs" "~"))) + (if (and (not load-home-init-file) + (or (not (file-exists-p dot-emacs-file-name)) + (yes-or-no-p-minibuf (concat "Overwrite " dot-emacs-file-name + "? ")))) + (unmigrate-user-init-file dot-emacs-file-name)))) + +(defun unmigrate-user-init-file (&optional target-file-name) + "Unmigrate the user's init and custom files." + (interactive) + (let ((target-file-name + (or target-file-name (expand-file-name ".emacs" "~")))) + (rename-file user-init-file target-file-name 'ok-if-already-exists) + (setq user-init-file target-file-name) + (let ((old-custom-file custom-file)) + (custom-migrate-custom-file target-file-name) + (customize-save-variable 'load-home-init-file t) + (delete-file old-custom-file)))) + (defun load-user-init-file () "This function actually reads the init file." (if (not user-init-file) diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 9c8c6e8..39bf349 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,7 @@ +2001-01-17 Martin Buchholz + + * XEmacs 21.2.41 "Polyhymnia" is released. + 2001-01-08 Martin Buchholz * XEmacs 21.2.40 is released. diff --git a/man/ChangeLog b/man/ChangeLog index 1816c40..18db821 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,27 @@ +2001-01-17 Martin Buchholz + + * XEmacs 21.2.41 "Polyhymnia" is released. + +2001-01-12 Martin Buchholz + + * internals/internals.texi: A little post-pdump-rename fixup. + +2001-01-13 Martin Buchholz + + * internals/internals.texi: See `pdump-rename' in src/ChangeLog. + +2001-01-10 Martin Buchholz + + * internals/internals.texi: Update for pdump changes. + +2001-01-04 Adrian Aichner + + * texinfo.texi (Using Texinfo): Change reference from GNU Emacs to + XEmacs. + * texinfo.texi (First Node): Fixing grammar. + * texinfo.texi (Multitable Rows): Change reference from GNU Emacs + to XEmacs. + 2001-01-08 Martin Buchholz * XEmacs 21.2.40 is released. diff --git a/man/internals/internals.texi b/man/internals/internals.texi index d4bbfd2..8cc49ad 100644 --- a/man/internals/internals.texi +++ b/man/internals/internals.texi @@ -4867,7 +4867,7 @@ shown in their processed order: @itemize @bullet @item all constant symbols and static variables that are registered via -@code{staticpro}@ in the array @code{staticvec}. +@code{staticpro}@ in the dynarr @code{staticpros}. @xref{Adding Global Lisp Variables}. @item all Lisp objects that are created in C functions and that must be @@ -5877,9 +5877,9 @@ follow pointers to C structures and opaque data in addition to Lisp_Object members. @end enumerate -This is done by @code{pdump_register_object}, which handles Lisp_Object -variables, and pdump_register_struct which handles C structures, which -both delegate the description management to pdump_register_sub. +This is done by @code{pdump_register_object()}, which handles Lisp_Object +variables, and @code{pdump_register_struct()} which handles C structures, +which both delegate the description management to @code{pdump_register_sub()}. The hash table doubles as a map object to pdump_entry_list_elmt (i.e. allows us to look up a pdump_entry_list_elmt with the object it points @@ -5896,11 +5896,13 @@ the @code{staticpro}'ed variables (there is a special @code{staticpro_nodump()} call for protected variables we do not want to dump). @item -the @code{pdump_wire}'d variables (@code{staticpro()} is equivalent to -@code{staticpro_nodump()} + @code{pdump_wire()}). +the variables registered via @code{dump_add_root_object} +(@code{staticpro()} is equivalent to @code{staticpro_nodump()} + +@code{dump_add_root_object()}). @item -the @code{dumpstruct}'ed variables, which points to C structures. +the variables registered via @code{dump_add_root_struct_ptr}, each of +which points to a C structure. @end enumerate This does not include the GCPRO'ed variables, the specbinds, the @@ -5953,11 +5955,10 @@ alignments happy). @subsection The header The next step creates the file and writes a header with a signature and -some random information in it (number of staticpro, number of assigned -lrecord types, etc...). The reloc_address field, which indicates at -which address the file should be loaded if we want to avoid post-reload -relocation, is set to 0. It then seeks to offset 256 (base offset for -the objects). +some random information in it. The @code{reloc_address} field, which +indicates at which address the file should be loaded if we want to avoid +post-reload relocation, is set to 0. It then seeks to offset 256 (base +offset for the objects). @node Data dumping, Pointers dumping, The header, Dumping phase @subsection Data dumping @@ -5979,29 +5980,32 @@ then written. They are: @enumerate @item -the staticpro array +the pdump_root_struct_ptrs dynarr @item -the dumpstruct array -@item -the lrecord_implementation_table array +the pdump_opaques dynarr @item a vector of all the offsets to the objects in the file that include a description (for faster relocation at reload time) @item -the pdump_wire and pdump_wire_list arrays +the pdump_root_objects and pdump_weak_object_chains dynarrs. @end enumerate -For each of the arrays we write both the pointer to the variables and +For each of the dynarrs we write both the pointer to the variables and the relocated offset of the object they point to. Since these variables are global, the pointers are still valid when restarting the program and are used to regenerate the global pointers. -The @code{pdump_wire_list} array is a special case. The variables it -points to are the head of weak linked lists of lisp objects of the same -type. Not all objects of this list are dumped so the relocated pointer -we associate with them points to the first dumped object of the list, or -Qnil if none is available. This is also the reason why they are not -used as roots for the purpose of object enumeration. +The @code{pdump_weak_object_chains} dynarr is a special case. The +variables it points to are the head of weak linked lists of lisp objects +of the same type. Not all objects of this list are dumped so the +relocated pointer we associate with them points to the first dumped +object of the list, or Qnil if none is available. This is also the +reason why they are not used as roots for the purpose of object +enumeration. + +Some very important information like the @code{staticpros} and +@code{lrecord_implementations_table} are handled indirectly using +@code{dump_add_opaque} or @code{dump_add_root_struct_ptr}. This is the end of the dumping part. @@ -6020,22 +6024,15 @@ The difference between the actual loading address and the reloc_address is computed and will be used for all the relocations. -@subsection Putting back the staticvec - -The staticvec array is memcpy'd from the file and the variables it -points to are reset to the relocated objects addresses. - - -@subsection Putting back the dumpstructed variables +@subsection Putting back the pdump_opaques -The variables pointed to by dumpstruct in the dump phase are reset to -the right relocated object addresses. +The memory contents are restored in the obvious and trivial way. -@subsection lrecord_implementations_table +@subsection Putting back the pdump_root_struct_ptrs -The lrecord_implementations_table is reset to its dump time state and -the right lrecord_type_index values are put in. +The variables pointed to by pdump_root_struct_ptrs in the dump phase are +reset to the right relocated object addresses. @subsection Object relocation @@ -6045,9 +6042,9 @@ by @code{pdump_reloc_one}. This step is unnecessary if the reloc_address is equal to the file loading address. -@subsection Putting back the pdump_wire and pdump_wire_list variables +@subsection Putting back the pdump_root_objects and pdump_weak_object_chains -Same as Putting back the dumpstructed variables. +Same as Putting back the pdump_root_struct_ptrs. @subsection Reorganize the hash tables diff --git a/man/texinfo.texi b/man/texinfo.texi index 121589e..d683f64 100644 --- a/man/texinfo.texi +++ b/man/texinfo.texi @@ -1,5 +1,5 @@ \input texinfo.tex @c -*-texinfo-*- -@c $Id: texinfo.texi,v 1.8.2.6 2001/01/06 07:51:28 stephent Exp $ +@c $Id: texinfo.texi,v 1.8.2.7 2001/01/09 20:52:53 adrian Exp $ @c %**start of header @c All text is ignored before the setfilename. @@ -743,8 +743,8 @@ menu-driven, on-line Info file with nodes, menus, cross references, and indices. You can, if you wish, make the chapters and sections of the printed document correspond to the nodes of the on-line information; and you use the same cross references and indices for -both the Info file and the printed work. @cite{The GNU -Emacs Manual} is a good example of a Texinfo file, as is this manual.@refill +both the Info file and the printed work. @cite{The XEmacs User's +Manual} is a good example of a Texinfo file, as is this manual.@refill To make a printed document, you process a Texinfo source file with the @TeX{} typesetting program. This creates a DVI file that you can @@ -4768,9 +4768,9 @@ utility to insert these pointers automatically.) @cindex Previous node of Top node Do not define the `Previous' node of the Top node to be @samp{(dir)}, as it causes confusing behavior for users: if you are in the Top node and -hits @key{DEL} to go backwards, you wind up in the middle of the -some other entry in the @file{dir} file, which has nothing to do with -what you were reading. +hit @key{DEL} to go backwards, you wind up in the middle of some other +entry in the @file{dir} file, which has nothing to do with what you were +reading. @xref{Install an Info File}, for more information about installing an Info file in the @file{info} directory. @@ -8226,7 +8226,7 @@ Line breaks are not special within the table body, and you may break input lines in your source file as necessary. Here is a complete example of a multi-column table (the text is from -@cite{The GNU Emacs Manual}, @pxref{Split Window,, Splitting Windows, +@cite{The XEmacs Users' Manual}, @pxref{Split Window,, Splitting Windows, xemacs, XEmacs User's Manual}): @example diff --git a/nt/ChangeLog b/nt/ChangeLog index e68d20b..a42d785 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2001-01-17 Martin Buchholz + + * XEmacs 21.2.41 "Polyhymnia" is released. + 2001-01-08 Martin Buchholz * XEmacs 21.2.40 is released. diff --git a/src/.dbxrc b/src/.dbxrc index 46c21a4..13a52eb 100644 --- a/src/.dbxrc +++ b/src/.dbxrc @@ -169,7 +169,7 @@ end function run-temacs { environment-to-run-temacs - run -batch -l ../lisp/loadup.el run-temacs -q ${1+"$@"} + run -nd -batch -l ../lisp/loadup.el run-temacs -q ${1+"$@"} } document check-xemacs << 'end' @@ -201,7 +201,7 @@ end function update-elc { environment-to-run-temacs - run -batch -l ../lisp/update-elc.el + run -nd -batch -l ../lisp/update-elc.el } document dump-temacs << 'end' @@ -213,7 +213,7 @@ end function dump-temacs { environment-to-run-temacs - run -batch -l ../lisp/loadup.el dump + run -nd -batch -l ../lisp/loadup.el dump } function pstruct { # pstruct foo.c struct-name diff --git a/src/.gdbinit b/src/.gdbinit index 13ff77d..4cf1c3e 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -123,7 +123,7 @@ end define run-temacs environment-to-run-temacs - run -batch -l ../lisp/loadup.el run-temacs -q + run -nd -batch -l ../lisp/loadup.el run-temacs -q end document run-temacs @@ -144,7 +144,7 @@ end define check-temacs environment-to-run-temacs - run -batch -l ../lisp/loadup.el run-temacs -q -batch -l ../tests/automated/test-harness.el -f batch-test-emacs ../tests/automated + run -nd -batch -l ../lisp/loadup.el run-temacs -q -batch -l ../tests/automated/test-harness.el -f batch-test-emacs ../tests/automated end document check-temacs @@ -156,7 +156,7 @@ end define update-elc environment-to-run-temacs - run -batch -l ../lisp/update-elc.el + run -nd -batch -l ../lisp/update-elc.el end document update-elc @@ -168,7 +168,7 @@ end define dump-temacs environment-to-run-temacs - run -batch -l ../lisp/loadup.el dump + run -nd -batch -l ../lisp/loadup.el dump end document dump-temacs diff --git a/src/ChangeLog b/src/ChangeLog index 6ec6933..4dda1e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2867,6 +2867,185 @@ (Vcharset_thai_tis620): Likewise. (Vcharset_katakana_jisx0201): Likewise. +2001-01-17 Martin Buchholz + + * XEmacs 21.2.41 "Polyhymnia" is released. + +2001-01-16 Didier Verna + + * glyphs.c (image_instantiate): don't use fallbacks when + instantiating a face's background pixmap by inheritance. + +2001-01-14 Mike Sperber + + * sysdep.c (start_of_data): PDUMP implies ORDINARY_LINK. + Conditionalize accordingly. + +2001-01-16 Martin Buchholz + + * dumper.c (pdump_file_get): Fix a compiler warning. + +2001-01-15 Martin Buchholz + + Make Purify happy when pdumping. + * symbols.c (Fmake_variable_buffer_local): Make Purify happy, by + iniitalizing all bits of new lisp object memory. + * symbols.c (Fmake_local_variable): Likewise. + * symbols.c (Fdontusethis_set_symbol_value_handler): Likewise. + * symbols.c (Fdefvaralias): Likewise. + * mule-charset.c (vars_of_mule_charset): Likewise. + +2001-01-15 Martin Buchholz + Add the `-nd' flag when running pre-dump operations under the debugger. + * .dbxrc (run-temacs): Add `-nd'. + * .dbxrc (update-elc): Likewise. + * .dbxrc (dump-temacs): Likewise. + * .gdbinit (run-temacs): Likewise. + * .gdbinit (check-temacs): Likewise. + * .gdbinit (update-elc): Likewise. + * .gdbinit (dump-temacs): Likewise. + +2001-01-14 Martin Buchholz + + Allow building 64-bit executables on AIX with GNU malloc, e.g. + export OBJECT_MODE=64 + configure --pdump --use-union-type=no + * m/ibmrs6000.h (DATA_START): Define for 64-bit world. + * gmalloc.c (__default_morecore): Remove pre-ANSI cruft. + + * miscplay.c (sndcnv8U_2mono): + Avoid two uses of `++' in the same expression. + Suppresses a GCC warning. + +2001-01-13 Martin Buchholz + + Make sure future compilers don't miscompile alloc.c. + * alloc.c: + (MARK_STRUCT_AS_FREE): Make aliasing-optimization-resistant. + (MARK_STRUCT_AS_NOT_FREE): Make aliasing-optimization-resistant. + +2001-01-12 Martin Buchholz + + * dumper.c: A little post-pdump-rename comment fixup. + +2001-01-09 Jerry James + + * lisp-disunion.h: Change LISP_TO_CVOID arg to match its use. + +2001-01-13 Martin Buchholz + + * *.[ch]: Globally rename symbols using the following `pdump-rename' + script: + #!/bin/sh + replace_symbol () { + (findn texi$; findn [ch]$) | xargs g -lw "$1" | xargs global-replace 's/(? + + * s/aix4.h: Keep the C for AIX compiler from overaggressively + optimizing bytecount_to_charcount(). + +2001-01-06 Golubev I. N. + + * config.h.in: + (HAVE_DLFCN_H): Removed. + * sysdll.c: Remove HAVE__DLOPEN, HAVE_DLFCN_H. + +2001-01-06 Martin Buchholz + + Portable dumper maintainability improvements. + * alloc.c (staticpro): + * alloc.c (staticpro_nodump): + * alloc.c (garbage_collect_1): + * alloc.c (reinit_alloc_once_early): + * alloc.c (init_alloc_once_early): + * alloc.c: Move dumper functions to alloc.c. + * dumper.c (pdump_backtrace): + * dumper.c (pdump_dump_structs): + * dumper.c (pdump_dump_opaques): + * dumper.c (pdump_dump_rtables): + * dumper.c (pdump_dump_wired): + * dumper.c (pdump): + * dumper.c (pdump_load_check): + * dumper.c (pdump_load_finish): + * dumper.c (pdump_file_unmap): + * dumper.c (pdump_file_get): + * dumper.c (pdump_resource_free): + * dumper.c (pdump_resource_get): + * dumper.c (pdump_file_free): + * dumper.c (pdump_file_try): + * dumper.c (pdump_load): + Remove fixed size limits on staticpro(), staticpro_nodump(), + dumpopaque(), dumpstruct() by using Dynarrs instead of static C arrays. + Remove custom code for dumping lrecord_implementations_table - use + dumpopaque instead. + Remove (most of the) custom code for dumping staticpros - dump it + like any other dynarr. + + * alloc.h: Removed. No longer useful, since dumper now more self-contained. + * dumper.c: Moved functions from alloc.c. + * alloc.c (dumpstruct): Moved to dumper.c. + * alloc.c (dumpopaque): Likewise. + * alloc.c (pdump_wire): Likewise. + * alloc.c (pdump_wire_list): Likewise. + + * lisp.h (Dynarr_sizeof): New. + * lisp.h (Dynarr_begin): New. Very slightly C++oid. + * lisp.h (Dynarr_end): New. Very slightly C++oid. + * lisp.h (Lisp_Object_ptr_dynarr): New. For staticpros. + + * lisp.h (dumpstruct): Define to nothing if not PDUMPing. + * lisp.h (dumpopaque): ditto. + * lisp.h (pdump_wire): ditto. + * lisp.h (pdump_wire_list): ditto. + +2001-01-09 Martin Buchholz + + * make-src-depend (PrintPatternDeps): + Use `sort' to make output independent of perl version. + +2001-01-08 Martin Buchholz + + Port to Netbsd 1.5. + * unexelf.c: Remove (never used) bogus Netbsd-specific cruft. + * s/netbsd.c: Use unexelf.o if __ELF__ is defined. + +2001-01-03 Didier Verna + + * event-stream.c (emacs_handle_focus_change_preliminary): ensure + that `focus_frame' is alive before thinking of calling + `redisplay_redraw_cursor' on it. + 2001-01-08 Martin Buchholz * XEmacs 21.2.40 is released. @@ -3146,7 +3325,7 @@ * buffer.c: Make find-file-compare-truenames default to true on windows. - * realpath.c (win32_abs_start): + * realpath.c (win32_abs_start): (cygwin_readlink): (win32_readlink): New functions. (xrealpath): Return really real filenames on windows. diff --git a/src/alloc.c b/src/alloc.c index 38b7755..e0dbeda 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -42,7 +42,6 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" -#include "alloc.h" #include "backtrace.h" #include "buffer.h" #include "bytecode.h" @@ -821,16 +820,18 @@ You have some weird system and need to supply a reasonable value here. /* The construct (* (void **) (ptr)) would cause aliasing problems with modern optimizing compilers like `gcc -O3 -fstrict-aliasing'. - But `char *' can legally alias any pointer. Hence this union trick. */ + But `char *' can legally alias any pointer. Hence this union trick... + + It turned out that the union trick was not good enough for xlC -O3; + and it is questionable whether it really complies with the C standard. + so we use memset instead, which should be safe from optimizations. */ typedef union { char c; void *p; } *aliasing_voidpp; #define ALIASING_VOIDPP_DEREFERENCE(ptr) \ (((aliasing_voidpp) (ptr))->p) #define FREE_STRUCT_P(ptr) \ (ALIASING_VOIDPP_DEREFERENCE (ptr) == (void *) INVALID_POINTER_VALUE) -#define MARK_STRUCT_AS_FREE(ptr) \ - (ALIASING_VOIDPP_DEREFERENCE (ptr) = (void *) INVALID_POINTER_VALUE) -#define MARK_STRUCT_AS_NOT_FREE(ptr) \ - (ALIASING_VOIDPP_DEREFERENCE (ptr) = 0) +#define MARK_STRUCT_AS_FREE(ptr) memset (ptr, 0xff, sizeof (void *)) +#define MARK_STRUCT_AS_NOT_FREE(ptr) memset (ptr, 0x00, sizeof (void *)) #ifdef ERROR_CHECK_GC @@ -2461,98 +2462,47 @@ Lisp_Object (*lrecord_markers[countof (lrecord_implementations_table)]) (Lisp_Ob struct gcpro *gcprolist; -/* 415 used Mly 29-Jun-93 */ -/* 1327 used slb 28-Feb-98 */ -/* 1328 used og 03-Oct-99 (moving slowly, heh?) */ -#ifdef HAVE_SHLIB -#define NSTATICS 4000 -#else -#define NSTATICS 2000 -#endif - -/* Not "static" because used by dumper.c */ -Lisp_Object *staticvec[NSTATICS]; -int staticidx; - -/* Put an entry in staticvec, pointing at the variable whose address is given - */ -void -staticpro (Lisp_Object *varaddress) -{ - /* #### This is now a dubious assert() since this routine may be called */ - /* by Lisp attempting to load a DLL. */ - assert (staticidx < countof (staticvec)); - staticvec[staticidx++] = varaddress; -} - - -Lisp_Object *staticvec_nodump[200]; -int staticidx_nodump; - -/* Put an entry in staticvec_nodump, pointing at the variable whose address is given - */ -void -staticpro_nodump (Lisp_Object *varaddress) -{ - /* #### This is now a dubious assert() since this routine may be called */ - /* by Lisp attempting to load a DLL. */ - assert (staticidx_nodump < countof (staticvec_nodump)); - staticvec_nodump[staticidx_nodump++] = varaddress; -} - - -struct pdump_dumpstructinfo dumpstructvec[200]; -int dumpstructidx; - -/* Put an entry in dumpstructvec, pointing at the variable whose address is given - */ -void -dumpstruct (void *varaddress, const struct struct_description *desc) -{ - assert (dumpstructidx < countof (dumpstructvec)); - dumpstructvec[dumpstructidx].data = varaddress; - dumpstructvec[dumpstructidx].desc = desc; - dumpstructidx++; -} +/* We want the staticpros relocated, but not the pointers found therein. + Hence we use a trivial description, as for pointerless objects. */ +static const struct lrecord_description staticpro_description_1[] = { + { XD_END } +}; -struct pdump_dumpopaqueinfo dumpopaquevec[250]; -int dumpopaqueidx; +static const struct struct_description staticpro_description = { + sizeof (Lisp_Object *), + staticpro_description_1 +}; -/* Put an entry in dumpopaquevec, pointing at the variable whose address is given - */ -void -dumpopaque (void *varaddress, size_t size) -{ - assert (dumpopaqueidx < countof (dumpopaquevec)); +static const struct lrecord_description staticpros_description_1[] = { + XD_DYNARR_DESC (Lisp_Object_ptr_dynarr, &staticpro_description), + { XD_END } +}; - dumpopaquevec[dumpopaqueidx].data = varaddress; - dumpopaquevec[dumpopaqueidx].size = size; - dumpopaqueidx++; -} +static const struct struct_description staticpros_description = { + sizeof (Lisp_Object_ptr_dynarr), + staticpros_description_1 +}; -Lisp_Object *pdump_wirevec[50]; -int pdump_wireidx; +Lisp_Object_ptr_dynarr *staticpros; -/* Put an entry in pdump_wirevec, pointing at the variable whose address is given - */ +/* Mark the Lisp_Object at non-heap VARADDRESS as a root object for + garbage collection, and for dumping. */ void -pdump_wire (Lisp_Object *varaddress) +staticpro (Lisp_Object *varaddress) { - assert (pdump_wireidx < countof (pdump_wirevec)); - pdump_wirevec[pdump_wireidx++] = varaddress; + Dynarr_add (staticpros, varaddress); + dump_add_root_object (varaddress); } -Lisp_Object *pdump_wirevec_list[50]; -int pdump_wireidx_list; +Lisp_Object_ptr_dynarr *staticpros_nodump; -/* Put an entry in pdump_wirevec_list, pointing at the variable whose address is given - */ +/* Mark the Lisp_Object at non-heap VARADDRESS as a root object for + garbage collection, but not for dumping. */ void -pdump_wire_list (Lisp_Object *varaddress) +staticpro_nodump (Lisp_Object *varaddress) { - assert (pdump_wireidx_list < countof (pdump_wirevec_list)); - pdump_wirevec_list[pdump_wireidx_list++] = varaddress; + Dynarr_add (staticpros_nodump, varaddress); } #ifdef ERROR_CHECK_GC @@ -3547,11 +3497,17 @@ garbage_collect_1 (void) /* Mark all the special slots that serve as the roots of accessibility. */ { /* staticpro() */ - int i; - for (i = 0; i < staticidx; i++) - mark_object (*(staticvec[i])); - for (i = 0; i < staticidx_nodump; i++) - mark_object (*(staticvec_nodump[i])); + Lisp_Object **p = Dynarr_begin (staticpros); + size_t count; + for (count = Dynarr_length (staticpros); count; count--) + mark_object (**p++); + } + + { /* staticpro_nodump() */ + Lisp_Object **p = Dynarr_begin (staticpros_nodump); + size_t count; + for (count = Dynarr_length (staticpros_nodump); count; count--) + mark_object (**p++); } { /* GCPRO() */ @@ -3588,7 +3544,7 @@ garbage_collect_1 (void) int i; mark_object (*backlist->function); - if (nargs == UNEVALLED || nargs == MANY) + if (nargs < 0 /* nargs == UNEVALLED || nargs == MANY */) mark_object (backlist->args[0]); else for (i = 0; i < nargs; i++) @@ -4018,9 +3974,10 @@ reinit_alloc_once_early (void) ignore_malloc_warnings = 0; - staticidx_nodump = 0; - dumpstructidx = 0; - pdump_wireidx = 0; + if (staticpros_nodump) + Dynarr_free (staticpros_nodump); + staticpros_nodump = Dynarr_new2 (Lisp_Object_ptr_dynarr, Lisp_Object *); + Dynarr_resize (staticpros_nodump, 100); /* merely a small optimization */ consing_since_gc = 0; #if 1 @@ -4062,7 +4019,9 @@ init_alloc_once_early (void) INIT_LRECORD_IMPLEMENTATION (string); INIT_LRECORD_IMPLEMENTATION (lcrecord_list); - staticidx = 0; + staticpros = Dynarr_new2 (Lisp_Object_ptr_dynarr, Lisp_Object *); + Dynarr_resize (staticpros, 1410); /* merely a small optimization */ + dump_add_root_struct_ptr (&staticpros, &staticpros_description); } void diff --git a/src/alloc.h b/src/alloc.h deleted file mode 100644 index 2d06759..0000000 --- a/src/alloc.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Allocations header - Copyright (C) 2000 Olivier Galibert - -This file is part of XEmacs. - -XEmacs is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -XEmacs is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with XEmacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* Synched up with: Not in FSF. */ - -#ifndef INCLUDED_alloc_h_ -#define INCLUDED_alloc_h_ - -struct pdump_dumpstructinfo -{ - void *data; - const struct struct_description *desc; -}; - -struct pdump_dumpopaqueinfo -{ - void *data; - size_t size; -}; - -/* staticpro structures */ -extern Lisp_Object *staticvec[]; -extern int staticidx; - -/* dumpstruct structures */ -extern struct pdump_dumpstructinfo dumpstructvec[]; -extern int dumpstructidx; - -/* dumpopaque structures */ -extern struct pdump_dumpopaqueinfo dumpopaquevec[]; -extern int dumpopaqueidx; - -/* pdump_wire structures */ -extern Lisp_Object *pdump_wirevec[]; -extern int pdump_wireidx; - -/* pdump_wire_list structures */ -extern Lisp_Object *pdump_wirevec_list[]; -extern int pdump_wireidx_list; - -#endif /* INCLUDED_alloc_h_ */ diff --git a/src/buffer.c b/src/buffer.c index 852ec84..4487baa 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2567,8 +2567,8 @@ complex_vars_of_buffer (void) syms = XBUFFER (Vbuffer_local_symbols); buffer_defaults_saved_slots = &defs->BUFFER_SLOTS_FIRST_NAME; buffer_local_symbols_saved_slots = &syms->BUFFER_SLOTS_FIRST_NAME; - dumpstruct (&buffer_defaults_saved_slots, &buffer_slots_description); - dumpstruct (&buffer_local_symbols_saved_slots, &buffer_slots_description); + dump_add_root_struct_ptr (&buffer_defaults_saved_slots, &buffer_slots_description); + dump_add_root_struct_ptr (&buffer_local_symbols_saved_slots, &buffer_slots_description); DEFVAR_BUFFER_DEFAULTS ("default-modeline-format", modeline_format /* Default value of `modeline-format' for buffers that don't override it. diff --git a/src/chartab.c b/src/chartab.c index e90bb3d..d87ca6c 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -1858,7 +1858,7 @@ vars_of_chartab (void) { /* DO NOT staticpro this. It works just like Vweak_hash_tables. */ Vall_syntax_tables = Qnil; - pdump_wire_list (&Vall_syntax_tables); + dump_add_weak_object_chain (&Vall_syntax_tables); } void diff --git a/src/config.h.in b/src/config.h.in index 0eec507..864952a 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -245,7 +245,6 @@ void *alloca (); #undef HAVE_SHL_LOAD #undef HAVE_DLD_INIT #undef HAVE_SHLIB -#undef HAVE_DLFCN_H #undef HAVE_LIBINTL #undef HAVE_LIBDNET diff --git a/src/console.c b/src/console.c index 8e79a8d..0d4b8be 100644 --- a/src/console.c +++ b/src/console.c @@ -1150,7 +1150,7 @@ void console_type_create (void) { the_console_type_entry_dynarr = Dynarr_new (console_type_entry); - dumpstruct(&the_console_type_entry_dynarr, &cted_description); + dump_add_root_struct_ptr (&the_console_type_entry_dynarr, &cted_description); Vconsole_type_list = Qnil; staticpro (&Vconsole_type_list); @@ -1368,8 +1368,8 @@ complex_vars_of_console (void) syms = XCONSOLE (Vconsole_local_symbols); console_defaults_saved_slots = &defs->CONSOLE_SLOTS_FIRST_NAME; console_local_symbols_saved_slots = &syms->CONSOLE_SLOTS_FIRST_NAME; - dumpstruct (&console_defaults_saved_slots, &console_slots_description); - dumpstruct (&console_local_symbols_saved_slots, &console_slots_description); + dump_add_root_struct_ptr (&console_defaults_saved_slots, &console_slots_description); + dump_add_root_struct_ptr (&console_local_symbols_saved_slots, &console_slots_description); DEFVAR_CONSOLE_DEFAULTS ("default-function-key-map", function_key_map /* Default value of `function-key-map' for consoles that don't override it. diff --git a/src/console.h b/src/console.h index dd23cf7..c0d1ddc 100644 --- a/src/console.h +++ b/src/console.h @@ -389,7 +389,7 @@ struct console_methods * type##_console_methods add_entry_to_console_type_list (Q##type, type##_console_methods); \ type##_console_methods->image_conversion_list = Qnil; \ staticpro_nodump (&type##_console_methods->image_conversion_list); \ - dumpstruct (&type##_console_methods, &console_methods_description); \ + dump_add_root_struct_ptr (&type##_console_methods, &console_methods_description); \ } while (0) #define REINITIALIZE_CONSOLE_TYPE(type) do { \ diff --git a/src/data.c b/src/data.c index fca3e0e..6239dd7 100644 --- a/src/data.c +++ b/src/data.c @@ -2229,7 +2229,7 @@ vars_of_data (void) { /* This must not be staticpro'd */ Vall_weak_lists = Qnil; - pdump_wire_list (&Vall_weak_lists); + dump_add_weak_object_chain (&Vall_weak_lists); #ifdef DEBUG_XEMACS DEFVAR_BOOL ("debug-issue-ebola-notices", &debug_issue_ebola_notices /* diff --git a/src/depend b/src/depend index a97da67..5bc8cc6 100644 --- a/src/depend +++ b/src/depend @@ -5,7 +5,7 @@ LISP_UNION_H=lisp-union.h #else LISP_UNION_H=lisp-disunion.h #endif -LISP_H=lisp.h general-slots.h lrecord.h config.h symeval.h symsinit.h $(LISP_UNION_H) +LISP_H=lisp.h config.h general-slots.h lrecord.h symeval.h symsinit.h $(LISP_UNION_H) #if defined(HAVE_MS_WINDOWS) console-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h conslots.h console-msw.h console.h events.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h syscommctrl.h systime.h syswindows.h device-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h conslots.h console-msw.h console-stream.h console.h device.h events.h faces.h frame.h frameslots.h glyphs.h gui.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h syscommctrl.h sysdep.h systime.h syswindows.h toolbar.h window.h winslots.h @@ -67,7 +67,7 @@ EmacsManager.o: EmacsManager.h EmacsManagerP.h config.h xintrinsicp.h xmmanagerp EmacsShell-sub.o: EmacsShell.h EmacsShellP.h config.h xintrinsic.h xintrinsicp.h EmacsShell.o: EmacsShell.h ExternalShell.h config.h xintrinsicp.h abbrev.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h commands.h insdel.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h syntax.h window.h winslots.h -alloc.o: $(LISP_H) alloc.h backtrace.h buffer.h bufslots.h bytecode.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h conslots.h console-stream.h console.h device.h dumper.h elhash.h events.h extents.h frame.h frameslots.h glyphs.h gui.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h toolbar.h window.h winslots.h +alloc.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h conslots.h console-stream.h console.h device.h dumper.h elhash.h events.h extents.h frame.h frameslots.h glyphs.h gui.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h toolbar.h window.h winslots.h alloca.o: config.h balloon_help.o: balloon_help.h config.h xintrinsic.h blocktype.o: $(LISP_H) blocktype.h @@ -92,7 +92,7 @@ dired.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs doc.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h insdel.h keymap.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h sysfile.h doprnt.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h dragdrop.o: $(LISP_H) dragdrop.h -dumper.o: $(LISP_H) alloc.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-stream.h console.h dump-id.h dumper.h elhash.h mule-charset.h nt.h specifier.h sysfile.h syswindows.h +dumper.o: $(LISP_H) char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-stream.h console.h dump-id.h dumper.h elhash.h mule-charset.h nt.h specifier.h sysfile.h syswindows.h dynarr.o: $(LISP_H) ecrt0.o: config.h editfns.o: $(LISP_H) buffer.h bufslots.h casetab.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h commands.h conslots.h console.h device.h events.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h line-number.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syspwd.h systime.h toolbar.h window.h winslots.h diff --git a/src/dumper.c b/src/dumper.c index 93083da..4118809 100644 --- a/src/dumper.c +++ b/src/dumper.c @@ -25,7 +25,6 @@ Boston, MA 02111-1307, USA. */ #include "dump-id.h" #include "specifier.h" -#include "alloc.h" #include "elhash.h" #include "sysfile.h" #include "console-stream.h" @@ -45,6 +44,80 @@ Boston, MA 02111-1307, USA. */ typedef struct { + void *varaddress; + size_t size; +} pdump_opaque; + +typedef struct +{ + Dynarr_declare (pdump_opaque); +} pdump_opaque_dynarr; + +typedef struct +{ + void **ptraddress; + const struct struct_description *desc; +} pdump_root_struct_ptr; + +typedef struct +{ + Dynarr_declare (pdump_root_struct_ptr); +} pdump_root_struct_ptr_dynarr; + +static pdump_opaque_dynarr *pdump_opaques; +static pdump_root_struct_ptr_dynarr *pdump_root_struct_ptrs; +static Lisp_Object_ptr_dynarr *pdump_root_objects; +static Lisp_Object_ptr_dynarr *pdump_weak_object_chains; + +/* Mark SIZE bytes at non-heap address VARADDRESS for dumping as is, + without any bit-twiddling. */ +void +dump_add_opaque (void *varaddress, size_t size) +{ + pdump_opaque info; + info.varaddress = varaddress; + info.size = size; + if (pdump_opaques == NULL) + pdump_opaques = Dynarr_new (pdump_opaque); + Dynarr_add (pdump_opaques, info); +} + +/* Mark the struct described by DESC and pointed to by the pointer at + non-heap address VARADDRESS for dumping. + All the objects reachable from this pointer will also be dumped. */ +void +dump_add_root_struct_ptr (void *ptraddress, const struct struct_description *desc) +{ + pdump_root_struct_ptr info; + info.ptraddress = (void **) ptraddress; + info.desc = desc; + if (pdump_root_struct_ptrs == NULL) + pdump_root_struct_ptrs = Dynarr_new (pdump_root_struct_ptr); + Dynarr_add (pdump_root_struct_ptrs, info); +} + +/* Mark the Lisp_Object at non-heap address VARADDRESS for dumping. + All the objects reachable from this var will also be dumped. */ +void +dump_add_root_object (Lisp_Object *varaddress) +{ + if (pdump_root_objects == NULL) + pdump_root_objects = Dynarr_new2 (Lisp_Object_ptr_dynarr, Lisp_Object *); + Dynarr_add (pdump_root_objects, varaddress); +} + +/* Mark the list pointed to by the Lisp_Object at VARADDRESS for dumping. */ +void +dump_add_weak_object_chain (Lisp_Object *varaddress) +{ + if (pdump_weak_object_chains == NULL) + pdump_weak_object_chains = Dynarr_new2 (Lisp_Object_ptr_dynarr, Lisp_Object *); + Dynarr_add (pdump_weak_object_chains, varaddress); +} + + +typedef struct +{ const struct lrecord_description *desc; int count; } pdump_reloc_table; @@ -80,42 +153,39 @@ pdump_objects_unmark (void) * * 0 - header * 256 - dumped objects - * stab_offset - nb_staticpro*(Lisp_Object *) from staticvec - * - nb_staticpro*(relocated Lisp_Object) pointed to by staticpro - * - nb_structdmp*pair(void *, adr) for pointers to structures - * - lrecord_implementations_table[] + * stab_offset - nb_root_struct_ptrs*pair(void *, adr) for pointers to structures + * - nb_opaques*pair(void *, size) for raw bits to restore * - relocation table * - wired variable address/value couples with the count preceding the list */ -#define DUMP_SIGNATURE "XEmacsDP" -#define DUMP_SIGNATURE_LEN (sizeof (DUMP_SIGNATURE) - 1) +#define PDUMP_SIGNATURE "XEmacsDP" +#define PDUMP_SIGNATURE_LEN (sizeof (PDUMP_SIGNATURE) - 1) typedef struct { - char signature[DUMP_SIGNATURE_LEN]; + char signature[PDUMP_SIGNATURE_LEN]; unsigned int id; EMACS_UINT stab_offset; EMACS_UINT reloc_address; - int nb_staticpro; - int nb_structdmp; - int nb_opaquedmp; -} dump_header; + int nb_root_struct_ptrs; + int nb_opaques; +} pdump_header; char *pdump_start, *pdump_end; static size_t pdump_length; #ifdef WIN32_NATIVE -// Handle for the dump file +/* Handle for the dump file */ HANDLE pdump_hFile = INVALID_HANDLE_VALUE; -// Handle for the file mapping object for the dump file +/* Handle for the file mapping object for the dump file */ HANDLE pdump_hMap = INVALID_HANDLE_VALUE; #endif void (*pdump_free) (void); -static const unsigned char align_table[256] = +static const unsigned char pdump_align_table[256] = { 8, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, @@ -236,7 +306,7 @@ pdump_add_entry (pdump_entry_list *list, const void *obj, size_t size, int count list->count += count; pdump_hash[pos] = e; - align = align_table[size & 255]; + align = pdump_align_table[size & 255]; if (align < 2 && is_lrecord) align = 2; @@ -279,7 +349,8 @@ static struct static int depth; -static void pdump_backtrace (void) +static void +pdump_backtrace (void) { int i; stderr_out ("pdump backtrace :\n"); @@ -738,7 +809,7 @@ pdump_scan_by_alignment (void (*f)(pdump_entry_list_elmt *, const struct lrecord elmt = pdump_opaque_data_list.first; while (elmt) { - if (align_table[elmt->size & 255] == align) + if (pdump_align_table[elmt->size & 255] == align) f (elmt, 0); elmt = elmt->next; } @@ -746,58 +817,35 @@ pdump_scan_by_alignment (void (*f)(pdump_entry_list_elmt *, const struct lrecord } static void -pdump_dump_staticvec (void) -{ - EMACS_INT *reloc = xnew_array (EMACS_INT, staticidx); - int i; - write (pdump_fd, staticvec, staticidx*sizeof (Lisp_Object *)); - - for (i=0; isave_offset; - else - reloc[i] = *(EMACS_INT *)(staticvec[i]); - } - write (pdump_fd, reloc, staticidx*sizeof (Lisp_Object)); - free (reloc); -} - -static void -pdump_dump_structvec (void) +pdump_dump_from_root_struct_ptrs (void) { int i; - for (i=0; isave_offset; + pdump_root_struct_ptr *info = Dynarr_atp (pdump_root_struct_ptrs, i); + write (pdump_fd, &info->ptraddress, sizeof (info->ptraddress)); + adr = pdump_get_entry (*(info->ptraddress))->save_offset; write (pdump_fd, &adr, sizeof (adr)); } } static void -pdump_dump_opaquevec (void) +pdump_dump_opaques (void) { int i; - for (i=0; ivaraddress, info->size); } } static void -pdump_dump_itable (void) -{ - write (pdump_fd, lrecord_implementations_table, lrecord_type_count*sizeof (lrecord_implementations_table[0])); -} - -static void pdump_dump_rtables (void) { - int i, j; + int i; pdump_entry_list_elmt *elmt; pdump_reloc_table rt; @@ -830,6 +878,7 @@ pdump_dump_rtables (void) while (elmt) { EMACS_INT rdata = pdump_get_entry (elmt->obj)->save_offset; + int j; for (j=0; jcount; j++) { write (pdump_fd, &rdata, sizeof (rdata)); @@ -844,25 +893,26 @@ pdump_dump_rtables (void) } static void -pdump_dump_wired (void) +pdump_dump_from_root_objects (void) { - EMACS_INT count = pdump_wireidx + pdump_wireidx_list; - int i; + size_t count = Dynarr_length (pdump_root_objects) + Dynarr_length (pdump_weak_object_chains); + size_t i; write (pdump_fd, &count, sizeof (count)); - for (i=0; isave_offset; - write (pdump_fd, &pdump_wirevec[i], sizeof (pdump_wirevec[i])); + Lisp_Object obj = * Dynarr_at (pdump_root_objects, i); + if (POINTER_TYPE_P (XTYPE (obj))) + obj = wrap_object ((void *) pdump_get_entry (XRECORD_LHEADER (obj))->save_offset); + write (pdump_fd, Dynarr_atp (pdump_root_objects, i), sizeof (Dynarr_atp (pdump_root_objects, i))); write (pdump_fd, &obj, sizeof (obj)); } - for (i=0; isave_offset; + obj = wrap_object ((void *) elmt->save_offset); - write (pdump_fd, &pdump_wirevec_list[i], sizeof (pdump_wirevec_list[i])); - write (pdump_fd, &res, sizeof (res)); + write (pdump_fd, Dynarr_atp (pdump_weak_object_chains, i), sizeof (Lisp_Object *)); + write (pdump_fd, &obj, sizeof (obj)); } } @@ -890,18 +940,19 @@ pdump (void) int i; Lisp_Object t_console, t_device, t_frame; int none; - dump_header hd; + pdump_header hd; flush_all_buffer_local_cache (); /* These appear in a DEFVAR_LISP, which does a staticpro() */ - t_console = Vterminal_console; - t_frame = Vterminal_frame; - t_device = Vterminal_device; + t_console = Vterminal_console; Vterminal_console = Qnil; + t_frame = Vterminal_frame; Vterminal_frame = Qnil; + t_device = Vterminal_device; Vterminal_device = Qnil; - Vterminal_console = Qnil; - Vterminal_frame = Qnil; - Vterminal_device = Qnil; + dump_add_opaque (&lrecord_implementations_table, + lrecord_type_count * sizeof (lrecord_implementations_table[0])); + dump_add_opaque (&lrecord_markers, + lrecord_type_count * sizeof (lrecord_markers[0])); pdump_hash = xnew_array_and_zero (pdump_entry_list_elmt *, PDUMP_HASHSIZE); @@ -920,10 +971,8 @@ pdump (void) pdump_opaque_data_list.count = 0; depth = 0; - for (i=0; isignature, DUMP_SIGNATURE, DUMP_SIGNATURE_LEN) - && ((dump_header *)pdump_start)->id == dump_id); + return (!memcmp (((pdump_header *)pdump_start)->signature, + PDUMP_SIGNATURE, PDUMP_SIGNATURE_LEN) + && ((pdump_header *)pdump_start)->id == dump_id); } -static int pdump_load_finish (void) +static int +pdump_load_finish (void) { int i; char *p; @@ -1000,46 +1052,24 @@ static int pdump_load_finish (void) #define PDUMP_READ(p, type) (p = (char*) (((type *) p) + 1), *((type *) p - 1)) - staticidx = ((dump_header *)(pdump_start))->nb_staticpro; - delta = ((EMACS_INT)pdump_start) - ((dump_header *)pdump_start)->reloc_address; - p = pdump_start + ((dump_header *)pdump_start)->stab_offset; + delta = ((EMACS_INT)pdump_start) - ((pdump_header *)pdump_start)->reloc_address; + p = pdump_start + ((pdump_header *)pdump_start)->stab_offset; - /* Put back the staticvec in place */ - memcpy (staticvec, p, staticidx*sizeof (Lisp_Object *)); - p += staticidx*sizeof (Lisp_Object *); - for (i=0; inb_structdmp; i++) + /* Put back the pdump_root_struct_ptrs */ + for (i=0; i<((pdump_header *)pdump_start)->nb_root_struct_ptrs; i++) { void **adr = PDUMP_READ (p, void **); *adr = (void *) (PDUMP_READ (p, char *) + delta); } - /* Put back the opaques */ - for (i=0; i<((dump_header *)pdump_start)->nb_opaquedmp; i++) + /* Put back the pdump_opaques */ + for (i=0; i<((pdump_header *)pdump_start)->nb_opaques; i++) { - struct pdump_dumpopaqueinfo di = PDUMP_READ (p, struct pdump_dumpopaqueinfo); - memcpy (di.data, p, di.size); - p += di.size; + pdump_opaque info = PDUMP_READ (p, pdump_opaque); + memcpy (info.varaddress, p, info.size); + p += info.size; } - /* Put back the lrecord_implementations_table */ - /* The (void *) cast is there to make Ben happy. */ - memcpy ((void *) lrecord_implementations_table, p, lrecord_type_count*sizeof (lrecord_implementations_table[0])); - p += lrecord_type_count*sizeof (lrecord_implementations_table[0]); - - /* Reinitialize lrecord_markers from lrecord_implementations_table */ - for (i=0; i < lrecord_type_count; i++) - if (lrecord_implementations_table[i]) - lrecord_markers[i] = lrecord_implementations_table[i]->marker; - /* Do the relocations */ pdump_rt_list = p; count = 2; @@ -1060,16 +1090,14 @@ static int pdump_load_finish (void) break; } - /* Put the pdump_wire variables in place */ - count = PDUMP_READ (p, EMACS_INT); - - for (i=0; isymbol = Q##format; \ - format##_image_instantiator_methods->device = Qnil; \ - format##_image_instantiator_methods->keywords = \ - Dynarr_new (ii_keyword_entry); \ - format##_image_instantiator_methods->consoles = \ - Dynarr_new (console_type_entry); \ - add_entry_to_image_instantiator_format_list \ - (Q##format, format##_image_instantiator_methods); \ - dumpstruct (&format##_image_instantiator_methods, \ - &iim_description); \ +do { \ + format##_image_instantiator_methods = \ + xnew_and_zero (struct image_instantiator_methods); \ + format##_image_instantiator_methods->symbol = Q##format; \ + format##_image_instantiator_methods->device = Qnil; \ + format##_image_instantiator_methods->keywords = \ + Dynarr_new (ii_keyword_entry); \ + format##_image_instantiator_methods->consoles = \ + Dynarr_new (console_type_entry); \ + add_entry_to_image_instantiator_format_list \ + (Q##format, format##_image_instantiator_methods); \ + dump_add_root_struct_ptr (&format##_image_instantiator_methods, \ + &iim_description); \ } while (0) #define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT(format, obj_name) \ @@ -300,19 +300,19 @@ IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 0, 0) DECLARE_IMAGE_INSTANTIATOR_FORMAT(format); \ struct image_instantiator_methods *type##_##format##_image_instantiator_methods -#define INITIALIZE_DEVICE_IIFORMAT(type, format) \ -do { \ - type##_##format##_image_instantiator_methods = \ - xnew_and_zero (struct image_instantiator_methods); \ - type##_##format##_image_instantiator_methods->symbol = Q##format; \ - type##_##format##_image_instantiator_methods->device = Q##type; \ - type##_##format##_image_instantiator_methods->keywords = \ - Dynarr_new (ii_keyword_entry); \ - add_entry_to_device_ii_format_list \ - (Q##type, Q##format, type##_##format##_image_instantiator_methods); \ - IIFORMAT_VALID_CONSOLE(type,format); \ - dumpstruct (&type##_##format##_image_instantiator_methods, \ - &iim_description); \ +#define INITIALIZE_DEVICE_IIFORMAT(type, format) \ +do { \ + type##_##format##_image_instantiator_methods = \ + xnew_and_zero (struct image_instantiator_methods); \ + type##_##format##_image_instantiator_methods->symbol = Q##format; \ + type##_##format##_image_instantiator_methods->device = Q##type; \ + type##_##format##_image_instantiator_methods->keywords = \ + Dynarr_new (ii_keyword_entry); \ + add_entry_to_device_ii_format_list \ + (Q##type, Q##format, type##_##format##_image_instantiator_methods); \ + IIFORMAT_VALID_CONSOLE(type,format); \ + dump_add_root_struct_ptr (&type##_##format##_image_instantiator_methods, \ + &iim_description); \ } while (0) /* Declare that image-instantiator format FORMAT has method M; used in diff --git a/src/gmalloc.c b/src/gmalloc.c index dd0f948..a65e78e 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c @@ -1232,23 +1232,9 @@ extern __ptr_t __sbrk __P ((int increment)); and return the start of data space, or NULL on errors. If INCREMENT is negative, shrink data space. */ __ptr_t -__default_morecore ( -#ifdef __STDC__ - ptrdiff_t increment -#else -#ifdef OSF1 - long increment -#else - int increment -#endif -#endif - ) +__default_morecore (ptrdiff_t increment) { -#ifdef OSF1 - __ptr_t result = (__ptr_t) __sbrk ((ssize_t) increment); -#else - __ptr_t result = (__ptr_t) __sbrk ((int) increment); -#endif + __ptr_t result = (__ptr_t) __sbrk (increment); if (result == (__ptr_t) -1) return NULL; return result; diff --git a/src/gpmevent.c b/src/gpmevent.c index 40ebaca..20c45ec 100644 --- a/src/gpmevent.c +++ b/src/gpmevent.c @@ -635,8 +635,8 @@ void vars_of_gpmevent (void) gpm_event_queue_tail = Qnil; staticpro (&gpm_event_queue); staticpro (&gpm_event_queue_tail); - pdump_wire (&gpm_event_queue); - pdump_wire (&gpm_event_queue_tail); + dump_add_root_object (&gpm_event_queue); + dump_add_root_object (&gpm_event_queue_tail); } void syms_of_gpmevent (void) diff --git a/src/lisp-disunion.h b/src/lisp-disunion.h index 234c344..1e69d96 100644 --- a/src/lisp-disunion.h +++ b/src/lisp-disunion.h @@ -117,7 +117,7 @@ XCHARVAL (Emchar chr) #define VOID_TO_LISP(larg,varg) ((void) ((larg) = ((Lisp_Object) (varg)))) #define CVOID_TO_LISP VOID_TO_LISP #define LISP_TO_VOID(larg) ((void *) (larg)) -#define LISP_TO_CVOID(varg) ((const void *) (larg)) +#define LISP_TO_CVOID(larg) ((const void *) (larg)) /* Convert a Lisp_Object into something that can't be used as an lvalue. Useful for type-checking. */ diff --git a/src/lisp.h b/src/lisp.h index 1e51d03..327cdb6 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -70,6 +70,9 @@ void Dynarr_free (void *d); ((dynarr_type *) Dynarr_newf (sizeof (type))) #define Dynarr_at(d, pos) ((d)->base[pos]) #define Dynarr_atp(d, pos) (&Dynarr_at (d, pos)) +#define Dynarr_begin(d) Dynarr_atp (d, 0) +#define Dynarr_end(d) Dynarr_atp (d, Dynarr_length (d)) +#define Dynarr_sizeof(d) ((d)->cur * (d)->elsize) #define Dynarr_length(d) ((d)->cur) #define Dynarr_largest(d) ((d)->largest) #define Dynarr_reset(d) ((d)->cur = 0) @@ -570,6 +573,11 @@ typedef struct Dynarr_declare (Lisp_Object); } Lisp_Object_dynarr; +typedef struct +{ + Dynarr_declare (Lisp_Object *); +} Lisp_Object_ptr_dynarr; + /* Close your eyes now lest you vomit or spontaneously combust ... */ #define HACKEQ_UNSAFE(obj1, obj2) \ @@ -2097,6 +2105,8 @@ void debug_ungcpro(char *, int, struct gcpro *); RETURN_SANS_WARNINGS ret_nunb_val; \ } while (0) +extern Lisp_Object_ptr_dynarr *staticpros; + /* Call staticpro (&var) to protect static variable `var'. */ void staticpro (Lisp_Object *); @@ -2104,19 +2114,35 @@ void staticpro (Lisp_Object *); /* var will not be saved at dump time */ void staticpro_nodump (Lisp_Object *); -/* Call dumpstruct(&var, &desc) to dump the structure pointed to by `var'. */ -void dumpstruct (void *, const struct struct_description *); +/* Call dump_add_root_struct_ptr (&var, &desc) to dump the structure pointed to by `var'. */ +#ifdef PDUMP +void dump_add_root_struct_ptr (void *, const struct struct_description *); +#else +#define dump_add_root_struct_ptr(varaddr,descaddr) DO_NOTHING +#endif -/* Call dumpopaque(&var, size) to dump the opaque static structure `var'. */ -void dumpopaque (void *, size_t); +/* Call dump_add_opaque (&var, size) to dump the opaque static structure `var'. */ +#ifdef PDUMP +void dump_add_opaque (void *, size_t); +#else +#define dump_add_opaque(varaddr,size) DO_NOTHING +#endif -/* Call pdump_wire(&var) to ensure that var is properly updated after pdump. */ -void pdump_wire (Lisp_Object *); +/* Call dump_add_root_object (&var) to ensure that var is properly updated after pdump. */ +#ifdef PDUMP +void dump_add_root_object (Lisp_Object *); +#else +#define dump_add_root_object(varaddr) DO_NOTHING +#endif -/* Call pdump_wire(&var) to ensure that var is properly updated after - pdump. var must point to a linked list of objects out of which +/* Call dump_add_root_object (&var) to ensure that var is properly updated after + pdump. var must point to a linked list of objects out of which some may not be dumped */ -void pdump_wire_list (Lisp_Object *); +#ifdef PDUMP +void dump_add_weak_object_chain (Lisp_Object *); +#else +#define dump_add_weak_object_chain(varaddr) DO_NOTHING +#endif /* Nonzero means Emacs has already been initialized. Used during startup to detect startup of dumped Emacs. */ diff --git a/src/m/ibmrs6000.h b/src/m/ibmrs6000.h index 7b2a2e1..ca5ffe8 100644 --- a/src/m/ibmrs6000.h +++ b/src/m/ibmrs6000.h @@ -47,7 +47,11 @@ Boston, MA 02111-1307, USA. */ #ifndef USG5_4 #define TEXT_START 0x10000000 #define TEXT_END 0 +#ifdef __64BIT__ +#define DATA_START 0x110000000 /* empirically determined */ +#else #define DATA_START 0x20000000 +#endif #define DATA_END 0 #endif diff --git a/src/make-src-depend b/src/make-src-depend index ace1007..aaa3155 100644 --- a/src/make-src-depend +++ b/src/make-src-depend @@ -93,7 +93,7 @@ LISP_UNION_H=lisp-disunion.h #endif "; -my @LISP_H = ('lisp.h', keys %{$uses{'lisp.h'}}); +my @LISP_H = ('lisp.h', sort keys %{$uses{'lisp.h'}}); print "LISP_H=@{[grep (!/lisp-(dis)?union\.h/, @LISP_H)]} \$(LISP_UNION_H)\n"; sub PrintDeps { diff --git a/src/miscplay.c b/src/miscplay.c index e2366b7..2257634 100644 --- a/src/miscplay.c +++ b/src/miscplay.c @@ -360,8 +360,11 @@ size_t sndcnv8U_2mono(void **data,size_t *sz,void **outbuf) *outbuf = dest = miscplay_sndbuf; while (count--) - *dest++ = (unsigned char)(((int)*(src)++ + - (int)*(src)++) / 2); + { + *dest++ = (unsigned char)(((int)*(src) + + (int)*(src+1)) / 2); + src += 2; + } *data = src; return(rc); } diff --git a/src/mule-charset.c b/src/mule-charset.c index ba17940..9ab731d 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -3825,8 +3825,8 @@ vars_of_mule_charset (void) int k; #endif - chlook = xnew (struct charset_lookup); - dumpstruct (&chlook, &charset_lookup_description); + chlook = xnew_and_zero (struct charset_lookup); /* zero for Purify. */ + dump_add_root_struct_ptr (&chlook, &charset_lookup_description); /* Table of charsets indexed by leading byte. */ for (i = 0; i < countof (chlook->charset_by_leading_byte); i++) diff --git a/src/s/aix4.h b/src/s/aix4.h index bb3a15d..8837db7 100644 --- a/src/s/aix4.h +++ b/src/s/aix4.h @@ -30,3 +30,12 @@ struct sockaddr_dl; -- Mike Sperber */ #undef HAVE_GETADDRINFO + +#ifdef __xlC__ +/* IBM's C compiler miscompiles this function. From IBM's docs: + -qstrict turns off the following optimizations: + + Performing code motion and scheduling on computations such as loads + and floating-point computations that may trigger an exception. */ +#pragma option_override (bytecount_to_charcount, "opt(strict,yes)") +#endif /* IBM's C compiler */ diff --git a/src/s/netbsd.h b/src/s/netbsd.h index 6b84bd0..682ff74 100644 --- a/src/s/netbsd.h +++ b/src/s/netbsd.h @@ -53,7 +53,15 @@ #define HAVE_TEXT_START /* No need to define `start_of_text'. */ #define ORDINARY_LINK + +/* As of this writing (Netbsd 1.5 was just released), Netbsd is + converting from a.out to elf - x86 and Sparc are using ELF. + But we're clever and let the compiler tell us which one to use. */ +#ifdef __ELF__ +#define UNEXEC "unexelf.o" +#else #define UNEXEC "unexfreebsd.o" /* ironic, considering history of unexfreebsd */ +#endif #if 0 /* Try to make this work for both 0.9 and >0.9. */ diff --git a/src/specifier.c b/src/specifier.c index 9bdf57e..8f2055b 100644 --- a/src/specifier.c +++ b/src/specifier.c @@ -3267,7 +3267,7 @@ void specifier_type_create (void) { the_specifier_type_entry_dynarr = Dynarr_new (specifier_type_entry); - dumpstruct (&the_specifier_type_entry_dynarr, &sted_description); + dump_add_root_struct_ptr (&the_specifier_type_entry_dynarr, &sted_description); Vspecifier_type_list = Qnil; staticpro (&Vspecifier_type_list); @@ -3311,7 +3311,7 @@ vars_of_specifier (void) /* Do NOT mark through this, or specifiers will never be GC'd. This is the same deal as for weak hash tables. */ Vall_specifiers = Qnil; - pdump_wire_list (&Vall_specifiers); + dump_add_weak_object_chain (&Vall_specifiers); Vuser_defined_tags = Qnil; staticpro (&Vuser_defined_tags); diff --git a/src/specifier.h b/src/specifier.h index 8c82331..a483ff6 100644 --- a/src/specifier.h +++ b/src/specifier.h @@ -300,14 +300,15 @@ extern struct specifier_methods * type##_specifier_methods #define DEFINE_SPECIFIER_TYPE(type) \ struct specifier_methods * type##_specifier_methods -#define INITIALIZE_SPECIFIER_TYPE(type, obj_name, pred_sym) do { \ - type##_specifier_methods = xnew_and_zero (struct specifier_methods); \ - type##_specifier_methods->name = obj_name; \ - type##_specifier_methods->extra_description = \ - specifier_empty_extra_description; \ - defsymbol_nodump (&type##_specifier_methods->predicate_symbol, pred_sym); \ - add_entry_to_specifier_type_list (Q##type, type##_specifier_methods); \ - dumpstruct (&type##_specifier_methods, &specifier_methods_description); \ +#define INITIALIZE_SPECIFIER_TYPE(type, obj_name, pred_sym) do { \ + type##_specifier_methods = xnew_and_zero (struct specifier_methods); \ + type##_specifier_methods->name = obj_name; \ + type##_specifier_methods->extra_description = \ + specifier_empty_extra_description; \ + defsymbol_nodump (&type##_specifier_methods->predicate_symbol, pred_sym); \ + add_entry_to_specifier_type_list (Q##type, type##_specifier_methods); \ + dump_add_root_struct_ptr (&type##_specifier_methods, \ + &specifier_methods_description); \ } while (0) #define REINITIALIZE_SPECIFIER_TYPE(type) do { \ diff --git a/src/symbols.c b/src/symbols.c index bb0fae0..906637c 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -2163,6 +2163,7 @@ sets it. = alloc_lcrecord_type (struct symbol_value_buffer_local, &lrecord_symbol_value_buffer_local); Lisp_Object foo; + zero_lcrecord (&bfwd->magic); bfwd->magic.type = SYMVAL_BUFFER_LOCAL; bfwd->default_value = find_symbol_value (variable); @@ -2270,6 +2271,7 @@ Use `make-local-hook' instead. /* Make sure variable is set up to hold per-buffer values */ bfwd = alloc_lcrecord_type (struct symbol_value_buffer_local, &lrecord_symbol_value_buffer_local); + zero_lcrecord (&bfwd->magic); bfwd->magic.type = SYMVAL_SOME_BUFFER_LOCAL; bfwd->current_buffer = Qnil; @@ -2990,6 +2992,7 @@ pity, thereby invalidating your code. { bfwd = alloc_lcrecord_type (struct symbol_value_lisp_magic, &lrecord_symbol_value_lisp_magic); + zero_lcrecord (&bfwd->magic); bfwd->magic.type = SYMVAL_LISP_MAGIC; for (i = 0; i < MAGIC_HANDLER_MAX; i++) { @@ -3126,6 +3129,7 @@ has a buffer-local value in any buffer, or the symbols nil or t. bfwd = alloc_lcrecord_type (struct symbol_value_varalias, &lrecord_symbol_value_varalias); + zero_lcrecord (&bfwd->magic); bfwd->magic.type = SYMVAL_VARALIAS; bfwd->aliasee = alias; bfwd->shadowed = valcontents; @@ -3259,9 +3263,9 @@ init_symbols_once_early (void) XSYMBOL (Qt)->value = Qt; /* Veritas aeterna */ Vquit_flag = Qnil; - pdump_wire (&Qnil); - pdump_wire (&Qunbound); - pdump_wire (&Vquit_flag); + dump_add_root_object (&Qnil); + dump_add_root_object (&Qunbound); + dump_add_root_object (&Vquit_flag); } void diff --git a/src/symeval.h b/src/symeval.h index df25cab..44a5849 100644 --- a/src/symeval.h +++ b/src/symeval.h @@ -345,7 +345,7 @@ void defvar_magic (const char *symbol_name, const struct symbol_value_forward *m #define DEFVAR_SYMVAL_FWD_INT(lname, c_location, forward_type, magicfun) do{ \ DEFVAR_SYMVAL_FWD (lname, c_location, forward_type, magicfun); \ - dumpopaque (c_location, sizeof(int)); \ + dump_add_opaque (c_location, sizeof(int)); \ } while (0) #define DEFVAR_SYMVAL_FWD_OBJECT(lname, c_location, forward_type, magicfun) do{ \ diff --git a/src/sysdep.c b/src/sysdep.c index 1ac4834..12cd3de 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2204,7 +2204,7 @@ start_of_data (void) #ifdef DATA_START return ((char *) DATA_START); #else -#ifdef ORDINARY_LINK +#if defined (ORDINARY_LINK) || defined(PDUMP) /* * This is a hack. Since we're not linking crt0.c or pre_crt0.c, * data_start isn't defined. We take the address of environ, which diff --git a/src/sysdll.c b/src/sysdll.c index 1504961..1e2807c 100644 --- a/src/sysdll.c +++ b/src/sysdll.c @@ -30,14 +30,8 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #ifdef HAVE_SHLIB /* Thankfully, most systems follow the ELFish dlopen() method. -** HAVE__DLOPEN is lame, but SCO has their dl* functions as _dl*, and -** unless you include dlfcn.h you don't get the macros to mask them, and -** autoconf fails to find them. No longer true as of 5.0.5. -** -** Anybody who wants to use this on SCO needs to have their configure.in -** look for _dlopen() as well as dlopen() */ -#if defined(HAVE_DLOPEN) || defined(HAVE__DLOPEN) || defined(HAVE_DLFCN_H) +#if defined(HAVE_DLOPEN) #include #ifndef RTLD_LAZY diff --git a/src/text-coding.c b/src/text-coding.c index 0618539..449152b 100644 --- a/src/text-coding.c +++ b/src/text-coding.c @@ -47,17 +47,17 @@ Lisp_Object Vcoding_system_for_write; Lisp_Object Vfile_name_coding_system; /* Table of symbols identifying each coding category. */ -Lisp_Object coding_category_symbol[CODING_CATEGORY_LAST + 1]; +Lisp_Object coding_category_symbol[CODING_CATEGORY_LAST]; struct file_coding_dump { /* Coding system currently associated with each coding category. */ - Lisp_Object coding_category_system[CODING_CATEGORY_LAST + 1]; + Lisp_Object coding_category_system[CODING_CATEGORY_LAST]; /* Table of all coding categories in decreasing order of priority. This describes a permutation of the possible coding categories. */ - int coding_category_by_priority[CODING_CATEGORY_LAST + 1]; + int coding_category_by_priority[CODING_CATEGORY_LAST]; #if defined(MULE) && !defined(UTF2000) Lisp_Object ucs_to_mule_table[65536]; @@ -1467,7 +1467,7 @@ decode_coding_category (Lisp_Object symbol) int i; CHECK_SYMBOL (symbol); - for (i = 0; i <= CODING_CATEGORY_LAST; i++) + for (i = 0; i < CODING_CATEGORY_LAST; i++) if (EQ (coding_category_symbol[i], symbol)) return i; @@ -1483,7 +1483,7 @@ Return a list of all recognized coding categories. int i; Lisp_Object list = Qnil; - for (i = CODING_CATEGORY_LAST; i >= 0; i--) + for (i = CODING_CATEGORY_LAST - 1; i >= 0; i--) list = Fcons (coding_category_symbol[i], list); return list; } @@ -1497,13 +1497,13 @@ previously. */ (list)) { - int category_to_priority[CODING_CATEGORY_LAST + 1]; + int category_to_priority[CODING_CATEGORY_LAST]; int i, j; Lisp_Object rest; /* First generate a list that maps coding categories to priorities. */ - for (i = 0; i <= CODING_CATEGORY_LAST; i++) + for (i = 0; i < CODING_CATEGORY_LAST; i++) category_to_priority[i] = -1; /* Highest priority comes from the specified list. */ @@ -1520,7 +1520,7 @@ previously. /* Now go through the existing categories by priority to retrieve the categories not yet specified and preserve their priority order. */ - for (j = 0; j <= CODING_CATEGORY_LAST; j++) + for (j = 0; j < CODING_CATEGORY_LAST; j++) { int cat = fcd->coding_category_by_priority[j]; if (category_to_priority[cat] < 0) @@ -1530,7 +1530,7 @@ previously. /* Now we need to construct the inverse of the mapping we just constructed. */ - for (i = 0; i <= CODING_CATEGORY_LAST; i++) + for (i = 0; i < CODING_CATEGORY_LAST; i++) fcd->coding_category_by_priority[category_to_priority[i]] = i; /* Phew! That was confusing. */ @@ -1545,7 +1545,7 @@ Return a list of coding categories in descending order of priority. int i; Lisp_Object list = Qnil; - for (i = CODING_CATEGORY_LAST; i >= 0; i--) + for (i = CODING_CATEGORY_LAST - 1; i >= 0; i--) list = Fcons (coding_category_symbol[fcd->coding_category_by_priority[i]], list); return list; @@ -1795,7 +1795,7 @@ coding_system_from_mask (int mask) #endif /* Look through the coding categories by priority and find the first one that is allowed. */ - for (i = 0; i <= CODING_CATEGORY_LAST; i++) + for (i = 0; i < CODING_CATEGORY_LAST; i++) { cat = fcd->coding_category_by_priority[i]; if ((mask & (1 << cat)) && @@ -1993,7 +1993,7 @@ type. Optional arg BUFFER defaults to the current buffer. #ifdef MULE decst.mask = postprocess_iso2022_mask (decst.mask); #endif - for (i = CODING_CATEGORY_LAST; i >= 0; i--) + for (i = CODING_CATEGORY_LAST - 1; i >= 0; i--) { int sys = fcd->coding_category_by_priority[i]; if (decst.mask & (1 << sys)) @@ -5795,10 +5795,10 @@ vars_of_file_coding (void) int i; fcd = xnew (struct file_coding_dump); - dumpstruct (&fcd, &fcd_description); + dump_add_root_struct_ptr (&fcd, &fcd_description); /* Initialize to something reasonable ... */ - for (i = 0; i <= CODING_CATEGORY_LAST; i++) + for (i = 0; i < CODING_CATEGORY_LAST; i++) { fcd->coding_category_system[i] = Qnil; fcd->coding_category_by_priority[i] = i; @@ -5862,7 +5862,7 @@ complex_vars_of_file_coding (void) make_lisp_hash_table (50, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ); the_codesys_prop_dynarr = Dynarr_new (codesys_prop); - dumpstruct (&the_codesys_prop_dynarr, &codesys_prop_dynarr_description); + dump_add_root_struct_ptr (&the_codesys_prop_dynarr, &codesys_prop_dynarr_description); #define DEFINE_CODESYS_PROP(Prop_Type, Sym) do \ { \ @@ -5938,7 +5938,7 @@ complex_vars_of_file_coding (void) #if defined(MULE) && !defined(UTF2000) { - unsigned int i; + size_t i; for (i = 0; i < countof (fcd->ucs_to_mule_table); i++) fcd->ucs_to_mule_table[i] = Qnil; diff --git a/src/unexelf.c b/src/unexelf.c index 54c48e1..66d889c 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -471,36 +471,6 @@ typedef struct { #define hdrNil ((pHDRR)0) #endif -#ifdef __NetBSD__ -/* - * NetBSD does not have normal-looking user-land ELF support. - */ -# ifdef __alpha__ -# define ELFSIZE 64 -# else -# define ELFSIZE 32 -# endif -# include - -# define PT_LOAD Elf_pt_load -# define SHT_SYMTAB Elf_sht_symtab -# define SHT_DYNSYM Elf_sht_dynsym -# define SHT_NULL Elf_sht_null -# define SHT_NOBITS Elf_sht_nobits -# define SHT_REL Elf_sht_rel -# define SHT_RELA Elf_sht_rela - -# define SHN_UNDEF Elf_eshn_undefined -# define SHN_ABS Elf_eshn_absolute -# define SHN_COMMON Elf_eshn_common - -# ifdef __alpha__ -# include -# define HDRR struct ecoff_symhdr -# define pHDRR HDRR * -# endif -#endif /* __NetBSD__ */ - #ifdef __OpenBSD__ # include #endif diff --git a/tests/ChangeLog b/tests/ChangeLog index 74bfcd5..fa9cb3a 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,12 @@ +2001-01-17 Martin Buchholz + + * XEmacs 21.2.41 "Polyhymnia" is released. + +2001-01-15 Martin Buchholz + + * automated/byte-compiler-tests.el ((let ((z 1)) (or (setq z 42)) z)): + Add regression test for mis-byte-compilation. + 2001-01-08 Martin Buchholz * XEmacs 21.2.40 is released. diff --git a/tests/automated/byte-compiler-tests.el b/tests/automated/byte-compiler-tests.el index 11f355a..e4b2520 100644 --- a/tests/automated/byte-compiler-tests.el +++ b/tests/automated/byte-compiler-tests.el @@ -119,6 +119,8 @@ (before-and-after-compile-equal (- simplyamarker 1)) (before-and-after-compile-equal (- simplyamarker)) +(before-and-after-compile-equal (let ((z 1)) (or (setq z 42)) z)) + ;; byte-after-unbind-ops ;; byte-constant -- 1.7.10.4