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
\1f
Tag Table:
(Indirect)
Node: Garbage Collection - Step by Step\7f179454
Node: Invocation\7f179846
Node: garbage_collect_1\7f182859
-Node: mark_object\7f192339
-Node: gc_sweep\7f194151
-Node: sweep_lcrecords_1\7f199214
-Node: compact_string_chars\7f200209
-Node: sweep_strings\7f202389
-Node: sweep_bit_vectors_1\7f203354
-Node: Integers and Characters\7f204030
-Node: Allocation from Frob Blocks\7f204782
-Node: lrecords\7f206386
-Node: Low-level allocation\7f218612
-Node: Cons\7f222719
-Node: Vector\7f223445
-Node: Bit Vector\7f224022
-Node: Symbol\7f224515
-Node: Marker\7f224869
-Node: String\7f225424
-Node: Compiled Function\7f229037
-Node: Dumping\7f229206
-Node: Overview\7f231427
-Node: Data descriptions\7f231997
-Node: Dumping phase\7f234002
-Node: Object inventory\7f234405
-Node: Address allocation\7f237258
-Node: The header\7f238647
-Node: Data dumping\7f239154
-Node: Pointers dumping\7f239815
-Node: Reloading phase\7f241030
-Node: Remaining issues\7f242791
-Node: Events and the Event Loop\7f243752
-Node: Introduction to Events\7f244202
-Node: Main Loop\7f246151
-Node: Specifics of the Event Gathering Mechanism\7f249726
-Node: Specifics About the Emacs Event\7f262179
-Node: The Event Stream Callback Routines\7f262434
-Node: Other Event Loop Functions\7f262679
-Node: Converting Events\7f263819
-Node: Dispatching Events; The Command Builder\7f264428
-Node: Evaluation; Stack Frames; Bindings\7f264663
-Node: Evaluation\7f265005
-Node: Dynamic Binding; The specbinding Stack; Unwind-Protects\7f271560
-Node: Simple Special Forms\7f273944
-Node: Catch and Throw\7f274727
-Node: Symbols and Variables\7f277302
-Node: Introduction to Symbols\7f277566
-Node: Obarrays\7f278634
-Node: Symbol Values\7f282167
-Node: Buffers and Textual Representation\7f284455
-Node: Introduction to Buffers\7f285113
-Node: The Text in a Buffer\7f287819
-Node: Buffer Lists\7f294969
-Node: Markers and Extents\7f296920
-Node: Bufbytes and Emchars\7f299185
-Node: The Buffer Object\7f299400
-Node: MULE Character Sets and Encodings\7f302880
-Node: Character Sets\7f303942
-Node: Encodings\7f307427
-Node: Japanese EUC (Extended Unix Code)\7f308494
-Node: JIS7\7f309326
-Node: Internal Mule Encodings\7f310676
-Node: Internal String Encoding\7f312506
-Node: Internal Character Encoding\7f314651
-Node: CCL\7f316375
-Node: The Lisp Reader and Compiler\7f323128
-Node: Lstreams\7f323341
-Node: Creating an Lstream\7f324372
-Node: Lstream Types\7f325599
-Node: Lstream Functions\7f325851
-Node: Lstream Methods\7f329417
-Node: Consoles; Devices; Frames; Windows\7f332559
-Node: Introduction to Consoles; Devices; Frames; Windows\7f332874
-Node: Point\7f335407
-Node: Window Hierarchy\7f336686
-Node: The Window Object\7f341138
-Node: The Redisplay Mechanism\7f344575
-Node: Critical Redisplay Sections\7f345367
-Node: Line Start Cache\7f346354
-Node: Redisplay Piece by Piece\7f349590
-Node: Extents\7f351627
-Node: Introduction to Extents\7f352161
-Node: Extent Ordering\7f353303
-Node: Format of the Extent Info\7f354544
-Node: Zero-Length Extents\7f356431
-Node: Mathematics of Extent Ordering\7f357831
-Node: Extent Fragments\7f362588
-Node: Faces\7f363674
-Node: Glyphs\7f363790
-Node: Specifiers\7f365977
-Node: Menus\7f366106
-Node: Subprocesses\7f368364
-Node: Interface to the X Window System\7f370350
-Node: Lucid Widget Library\7f370631
-Node: Generic Widget Interface\7f371922
-Node: Scrollbars\7f375481
-Node: Menubars\7f375624
-Node: Checkboxes and Radio Buttons\7f375767
-Node: Progress Bars\7f375953
-Node: Tab Controls\7f376113
-Node: Index\7f376234
+Node: mark_object\7f192341
+Node: gc_sweep\7f194153
+Node: sweep_lcrecords_1\7f199216
+Node: compact_string_chars\7f200211
+Node: sweep_strings\7f202391
+Node: sweep_bit_vectors_1\7f203356
+Node: Integers and Characters\7f204032
+Node: Allocation from Frob Blocks\7f204784
+Node: lrecords\7f206388
+Node: Low-level allocation\7f218614
+Node: Cons\7f222721
+Node: Vector\7f223447
+Node: Bit Vector\7f224024
+Node: Symbol\7f224517
+Node: Marker\7f224871
+Node: String\7f225426
+Node: Compiled Function\7f229039
+Node: Dumping\7f229208
+Node: Overview\7f231429
+Node: Data descriptions\7f231999
+Node: Dumping phase\7f234004
+Node: Object inventory\7f234407
+Node: Address allocation\7f237343
+Node: The header\7f238732
+Node: Data dumping\7f239177
+Node: Pointers dumping\7f239838
+Node: Reloading phase\7f241228
+Node: Remaining issues\7f242782
+Node: Events and the Event Loop\7f243743
+Node: Introduction to Events\7f244193
+Node: Main Loop\7f246142
+Node: Specifics of the Event Gathering Mechanism\7f249717
+Node: Specifics About the Emacs Event\7f262170
+Node: The Event Stream Callback Routines\7f262425
+Node: Other Event Loop Functions\7f262670
+Node: Converting Events\7f263810
+Node: Dispatching Events; The Command Builder\7f264419
+Node: Evaluation; Stack Frames; Bindings\7f264654
+Node: Evaluation\7f264996
+Node: Dynamic Binding; The specbinding Stack; Unwind-Protects\7f271551
+Node: Simple Special Forms\7f273935
+Node: Catch and Throw\7f274718
+Node: Symbols and Variables\7f277293
+Node: Introduction to Symbols\7f277557
+Node: Obarrays\7f278625
+Node: Symbol Values\7f282158
+Node: Buffers and Textual Representation\7f284446
+Node: Introduction to Buffers\7f285104
+Node: The Text in a Buffer\7f287810
+Node: Buffer Lists\7f294960
+Node: Markers and Extents\7f296911
+Node: Bufbytes and Emchars\7f299176
+Node: The Buffer Object\7f299391
+Node: MULE Character Sets and Encodings\7f302871
+Node: Character Sets\7f303933
+Node: Encodings\7f307418
+Node: Japanese EUC (Extended Unix Code)\7f308485
+Node: JIS7\7f309317
+Node: Internal Mule Encodings\7f310667
+Node: Internal String Encoding\7f312497
+Node: Internal Character Encoding\7f314642
+Node: CCL\7f316366
+Node: The Lisp Reader and Compiler\7f323119
+Node: Lstreams\7f323332
+Node: Creating an Lstream\7f324363
+Node: Lstream Types\7f325590
+Node: Lstream Functions\7f325842
+Node: Lstream Methods\7f329408
+Node: Consoles; Devices; Frames; Windows\7f332550
+Node: Introduction to Consoles; Devices; Frames; Windows\7f332865
+Node: Point\7f335398
+Node: Window Hierarchy\7f336677
+Node: The Window Object\7f341129
+Node: The Redisplay Mechanism\7f344566
+Node: Critical Redisplay Sections\7f345358
+Node: Line Start Cache\7f346345
+Node: Redisplay Piece by Piece\7f349581
+Node: Extents\7f351618
+Node: Introduction to Extents\7f352152
+Node: Extent Ordering\7f353294
+Node: Format of the Extent Info\7f354535
+Node: Zero-Length Extents\7f356422
+Node: Mathematics of Extent Ordering\7f357822
+Node: Extent Fragments\7f362579
+Node: Faces\7f363665
+Node: Glyphs\7f363781
+Node: Specifiers\7f365968
+Node: Menus\7f366097
+Node: Subprocesses\7f368355
+Node: Interface to the X Window System\7f370341
+Node: Lucid Widget Library\7f370622
+Node: Generic Widget Interface\7f371913
+Node: Scrollbars\7f375472
+Node: Menubars\7f375615
+Node: Checkboxes and Radio Buttons\7f375758
+Node: Progress Bars\7f375944
+Node: Tab Controls\7f376104
+Node: Index\7f376225
\1f
End Tag Table
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
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
`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
----------
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).
\1f
File: internals.info, Node: Data dumping, Next: Pointers dumping, Prev: The header, Up: Dumping phase
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.
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
-----------------
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
--------------------------
\1f
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
\1f
Tag Table:
(Indirect)
Node: Overview-Footnotes\7f27234
Ref: Overview-Footnote-1\7f27298
Node: Using Texinfo\7f27770
-Node: Info Files\7f30253
-Node: Info Files-Footnotes\7f34289
-Ref: Info Files-Footnote-1\7f34357
-Node: Printed Books\7f34536
-Node: Printed Books-Footnotes\7f37208
-Ref: Printed Books-Footnote-1\7f37282
-Node: Formatting Commands\7f37492
-Node: Formatting Commands-Footnotes\7f40319
-Ref: Formatting Commands-Footnote-1\7f40405
-Node: Conventions\7f41021
-Node: Comments\7f43583
-Node: Minimum\7f45006
-Node: Six Parts\7f47192
-Node: Short Sample\7f48704
-Node: Acknowledgements\7f52840
-Node: Texinfo Mode\7f53675
-Node: Texinfo Mode Overview\7f55047
-Node: Emacs Editing\7f55823
-Node: Inserting\7f57953
-Node: Showing the Structure\7f62234
-Node: Updating Nodes and Menus\7f64761
-Node: Updating Commands\7f65834
-Node: Updating Requirements\7f71895
-Node: Other Updating Commands\7f74192
-Node: Info Formatting\7f77460
-Node: Printing\7f78718
-Node: Texinfo Mode Summary\7f81063
-Node: Beginning a File\7f85817
-Node: Four Parts\7f86708
-Node: Sample Beginning\7f88178
-Node: Header\7f89798
-Node: First Line\7f91150
-Node: Start of Header\7f92139
-Node: setfilename\7f92852
-Node: settitle\7f94788
-Node: setchapternewpage\7f96678
-Node: paragraphindent\7f99439
-Node: End of Header\7f100921
-Node: Info Summary and Permissions\7f101760
-Node: Titlepage & Copyright Page\7f102779
-Node: titlepage\7f104385
-Node: titlepage-Footnotes\7f106667
-Ref: titlepage-Footnote-1\7f106733
-Node: titlefont center sp\7f107007
-Node: title subtitle author\7f108233
-Node: Copyright & Permissions\7f110505
-Node: end titlepage\7f112506
-Node: headings on off\7f114212
-Node: The Top Node\7f116257
-Node: Title of Top Node\7f117412
-Node: Master Menu Parts\7f118665
-Node: Software Copying Permissions\7f120902
-Node: Ending a File\7f122070
-Node: Printing Indices & Menus\7f122918
-Node: Contents\7f125227
-Node: File End\7f127567
-Node: Structuring\7f128240
-Node: Tree Structuring\7f129897
-Node: Structuring Command Types\7f131340
-Node: makeinfo top\7f133667
-Node: chapter\7f134200
-Node: unnumbered & appendix\7f135224
-Node: majorheading & chapheading\7f136063
-Node: section\7f136884
-Node: unnumberedsec appendixsec heading\7f137648
-Node: subsection\7f138637
-Node: unnumberedsubsec appendixsubsec subheading\7f139209
-Node: subsubsection\7f140162
-Node: Raise/lower sections\7f141712
-Node: Nodes\7f143847
-Node: Two Paths\7f144784
-Node: Node Menu Illustration\7f146070
-Node: node\7f149765
-Node: Node Names\7f152461
-Node: Writing a Node\7f153537
-Node: Node Line Tips\7f155555
-Node: Node Line Requirements\7f156349
-Node: First Node\7f157950
-Node: makeinfo top command\7f159394
-Node: Top Node Summary\7f160573
-Node: makeinfo Pointer Creation\7f162023
-Node: Menus\7f163270
-Node: Menus-Footnotes\7f164209
-Ref: Menus-Footnote-1\7f164267
-Node: Menu Location\7f164560
-Node: Writing a Menu\7f166237
-Node: Menu Parts\7f167203
-Node: Less Cluttered Menu Entry\7f168361
-Node: Menu Example\7f168986
-Node: Other Info Files\7f170507
-Node: Cross References\7f172375
-Node: References\7f173332
-Node: Cross Reference Commands\7f175079
-Node: Cross Reference Parts\7f176138
-Node: xref\7f178974
-Node: Reference Syntax\7f179773
-Node: One Argument\7f181427
-Node: Two Arguments\7f182439
-Node: Three Arguments\7f183554
-Node: Four and Five Arguments\7f185945
-Node: Top Node Naming\7f188357
-Node: ref\7f189367
-Node: pxref\7f190759
-Node: inforef\7f193141
-Node: uref\7f194434
-Node: Marking Text\7f195433
-Node: Indicating\7f196057
-Node: Useful Highlighting\7f197962
-Node: code\7f199351
-Node: kbd\7f202389
-Node: key\7f204259
-Node: samp\7f205592
-Node: var\7f207179
-Node: file\7f208972
-Node: dfn\7f209579
-Node: cite\7f210489
-Node: url\7f210943
-Node: email\7f211507
-Node: Emphasis\7f212319
-Node: emph & strong\7f213219
-Node: Smallcaps\7f214205
-Node: Fonts\7f215532
-Node: Customized Highlighting\7f216620
-Node: Customized Highlighting-Footnotes\7f219435
-Ref: Customized Highlighting-Footnote-1\7f219529
-Node: Quotations and Examples\7f219655
-Node: Block Enclosing Commands\7f221277
-Node: quotation\7f223302
-Node: example\7f224392
-Node: noindent\7f226447
-Node: Lisp Example\7f227911
-Node: Lisp Example-Footnotes\7f228613
-Ref: Lisp Example-Footnote-1\7f228685
-Node: smallexample & smalllisp\7f228803
-Node: display\7f230828
-Node: format\7f231460
-Node: exdent\7f231921
-Node: flushleft & flushright\7f233001
-Node: cartouche\7f234267
-Node: Lists and Tables\7f235034
-Node: Introducing Lists\7f235710
-Node: itemize\7f237375
-Node: enumerate\7f239522
-Node: Two-column Tables\7f242027
-Node: table\7f242716
-Node: ftable vtable\7f245149
-Node: itemx\7f246250
-Node: Multi-column Tables\7f247261
-Node: Multitable Column Widths\7f247932
-Node: Multitable Rows\7f249386
-Node: Indices\7f251163
-Node: Index Entries\7f252313
-Node: Predefined Indices\7f253446
-Node: Indexing Commands\7f254443
-Node: Combining Indices\7f258983
-Node: syncodeindex\7f260346
-Node: synindex\7f262008
-Node: New Indices\7f262533
-Node: Insertions\7f264358
-Node: Braces Atsigns\7f265542
-Node: Inserting An Atsign\7f266094
-Node: Inserting Braces\7f266368
-Node: Inserting Space\7f266731
-Node: Not Ending a Sentence\7f267235
-Node: Ending a Sentence\7f268589
-Node: Multiple Spaces\7f269718
-Node: dmn\7f270937
-Node: Inserting Accents\7f272144
-Node: Dots Bullets\7f273901
-Node: dots\7f274723
-Node: bullet\7f275247
-Node: TeX and copyright\7f275644
-Node: tex\7f276211
-Node: copyright symbol\7f276627
-Node: pounds\7f276887
-Node: minus\7f277251
-Node: math\7f278173
-Node: Glyphs\7f278901
-Node: Glyphs Summary\7f280014
-Node: result\7f280642
-Node: expansion\7f281127
-Node: Print Glyph\7f282083
-Node: Error Glyph\7f282960
-Node: Equivalence\7f283793
-Node: Point Glyph\7f284481
-Node: Images\7f286038
-Node: Breaks\7f287705
-Node: Break Commands\7f289136
-Node: Line Breaks\7f289977
-Node: - and hyphenation\7f290995
-Node: w\7f292245
-Node: sp\7f292958
-Node: page\7f293367
-Node: group\7f293744
-Node: need\7f295487
-Node: Definition Commands\7f296217
-Node: Def Cmd Template\7f297788
-Node: Optional Arguments\7f300785
-Node: deffnx\7f302373
-Node: Def Cmds in Detail\7f303328
-Node: Functions Commands\7f304438
-Node: Variables Commands\7f307443
-Node: Typed Functions\7f309529
-Node: Typed Variables\7f313071
-Node: Abstract Objects\7f315054
-Node: Data Types\7f320279
-Node: Def Cmd Conventions\7f321534
-Node: Sample Function Definition\7f322097
-Node: Footnotes\7f324981
-Node: Footnotes-Footnotes\7f325369
-Ref: Footnotes-Footnote-1\7f325435
-Node: Footnote Commands\7f325715
-Node: Footnote Commands-Footnotes\7f327212
-Ref: Footnote Commands-Footnote-1\7f327294
-Node: Footnote Styles\7f327330
-Node: Conditionals\7f329916
-Node: Conditional Commands\7f330727
-Node: Conditional Not Commands\7f332220
-Node: Raw Formatter Commands\7f332965
-Node: set clear value\7f334795
-Node: ifset ifclear\7f335596
-Node: value\7f338775
-Node: value Example\7f340187
-Node: Macros\7f341765
-Node: Defining Macros\7f342470
-Node: Invoking Macros\7f343559
-Node: Format/Print Hardcopy\7f344665
-Node: Use TeX\7f346502
-Node: Format with tex/texindex\7f347130
-Node: Format with texi2dvi\7f350771
-Node: Print with lpr\7f351362
-Node: Within Emacs\7f352216
-Node: Texinfo Mode Printing\7f353135
-Node: Compile-Command\7f356545
-Node: Requirements Summary\7f357433
-Node: Preparing for TeX\7f358746
-Node: Overfull hboxes\7f361533
-Node: smallbook\7f363092
-Node: A4 Paper\7f364610
-Node: Cropmarks and Magnification\7f365835
-Node: Create an Info File\7f367776
-Node: makeinfo advantages\7f369079
-Node: Invoking makeinfo\7f369995
-Node: makeinfo options\7f370683
-Node: Pointer Validation\7f376167
-Node: makeinfo in Emacs\7f377511
-Node: texinfo-format commands\7f380069
-Node: Batch Formatting\7f381340
-Node: Tag and Split Files\7f382556
-Node: Install an Info File\7f385910
-Node: Directory file\7f386728
-Node: New Info File\7f388596
-Node: Other Info Directories\7f389657
-Node: Installing Dir Entries\7f392872
-Node: Invoking install-info\7f394865
-Node: Command List\7f397280
-Node: Tips\7f435250
-Node: Sample Texinfo File\7f446660
-Node: Sample Permissions\7f448779
-Node: Inserting Permissions\7f449822
-Node: ifinfo Permissions\7f452128
-Node: Titlepage Permissions\7f453749
-Node: Include Files\7f455011
-Node: Using Include Files\7f456098
-Node: texinfo-multiple-files-update\7f458053
-Node: Include File Requirements\7f460414
-Node: Sample Include File\7f461659
-Node: Include Files Evolution\7f463178
-Node: Headings\7f465149
-Node: Headings Introduced\7f465786
-Node: Heading Format\7f467674
-Node: Heading Choice\7f470126
-Node: Custom Headings\7f471498
-Node: Catching Mistakes\7f475826
-Node: makeinfo Preferred\7f477115
-Node: Debugging with Info\7f478020
-Node: Debugging with TeX\7f481366
-Node: Using texinfo-show-structure\7f485646
-Node: Using occur\7f488745
-Node: Running Info-Validate\7f490282
-Node: Using Info-validate\7f491343
-Node: Unsplit\7f493185
-Node: Tagifying\7f494231
-Node: Splitting\7f495083
-Node: Refilling Paragraphs\7f496699
-Node: Refilling Paragraphs-Footnotes\7f498353
-Ref: Refilling Paragraphs-Footnote-1\7f498441
-Node: Command Syntax\7f498604
-Node: Obtaining TeX\7f501561
-Node: Command and Variable Index\7f503674
-Node: Concept Index\7f519526
+Node: Info Files\7f30257
+Node: Info Files-Footnotes\7f34293
+Ref: Info Files-Footnote-1\7f34361
+Node: Printed Books\7f34540
+Node: Printed Books-Footnotes\7f37212
+Ref: Printed Books-Footnote-1\7f37286
+Node: Formatting Commands\7f37496
+Node: Formatting Commands-Footnotes\7f40323
+Ref: Formatting Commands-Footnote-1\7f40409
+Node: Conventions\7f41025
+Node: Comments\7f43587
+Node: Minimum\7f45010
+Node: Six Parts\7f47196
+Node: Short Sample\7f48708
+Node: Acknowledgements\7f52844
+Node: Texinfo Mode\7f53679
+Node: Texinfo Mode Overview\7f55051
+Node: Emacs Editing\7f55827
+Node: Inserting\7f57957
+Node: Showing the Structure\7f62238
+Node: Updating Nodes and Menus\7f64765
+Node: Updating Commands\7f65838
+Node: Updating Requirements\7f71899
+Node: Other Updating Commands\7f74196
+Node: Info Formatting\7f77464
+Node: Printing\7f78722
+Node: Texinfo Mode Summary\7f81067
+Node: Beginning a File\7f85821
+Node: Four Parts\7f86712
+Node: Sample Beginning\7f88182
+Node: Header\7f89802
+Node: First Line\7f91154
+Node: Start of Header\7f92143
+Node: setfilename\7f92856
+Node: settitle\7f94792
+Node: setchapternewpage\7f96682
+Node: paragraphindent\7f99443
+Node: End of Header\7f100925
+Node: Info Summary and Permissions\7f101764
+Node: Titlepage & Copyright Page\7f102783
+Node: titlepage\7f104389
+Node: titlepage-Footnotes\7f106671
+Ref: titlepage-Footnote-1\7f106737
+Node: titlefont center sp\7f107011
+Node: title subtitle author\7f108237
+Node: Copyright & Permissions\7f110509
+Node: end titlepage\7f112510
+Node: headings on off\7f114216
+Node: The Top Node\7f116261
+Node: Title of Top Node\7f117416
+Node: Master Menu Parts\7f118669
+Node: Software Copying Permissions\7f120906
+Node: Ending a File\7f122074
+Node: Printing Indices & Menus\7f122922
+Node: Contents\7f125231
+Node: File End\7f127571
+Node: Structuring\7f128244
+Node: Tree Structuring\7f129901
+Node: Structuring Command Types\7f131344
+Node: makeinfo top\7f133671
+Node: chapter\7f134204
+Node: unnumbered & appendix\7f135228
+Node: majorheading & chapheading\7f136067
+Node: section\7f136888
+Node: unnumberedsec appendixsec heading\7f137652
+Node: subsection\7f138641
+Node: unnumberedsubsec appendixsubsec subheading\7f139213
+Node: subsubsection\7f140166
+Node: Raise/lower sections\7f141716
+Node: Nodes\7f143851
+Node: Two Paths\7f144788
+Node: Node Menu Illustration\7f146074
+Node: node\7f149769
+Node: Node Names\7f152465
+Node: Writing a Node\7f153541
+Node: Node Line Tips\7f155559
+Node: Node Line Requirements\7f156353
+Node: First Node\7f157954
+Node: makeinfo top command\7f159393
+Node: Top Node Summary\7f160572
+Node: makeinfo Pointer Creation\7f162022
+Node: Menus\7f163269
+Node: Menus-Footnotes\7f164208
+Ref: Menus-Footnote-1\7f164266
+Node: Menu Location\7f164559
+Node: Writing a Menu\7f166236
+Node: Menu Parts\7f167202
+Node: Less Cluttered Menu Entry\7f168360
+Node: Menu Example\7f168985
+Node: Other Info Files\7f170506
+Node: Cross References\7f172374
+Node: References\7f173331
+Node: Cross Reference Commands\7f175078
+Node: Cross Reference Parts\7f176137
+Node: xref\7f178973
+Node: Reference Syntax\7f179772
+Node: One Argument\7f181426
+Node: Two Arguments\7f182438
+Node: Three Arguments\7f183553
+Node: Four and Five Arguments\7f185944
+Node: Top Node Naming\7f188356
+Node: ref\7f189366
+Node: pxref\7f190758
+Node: inforef\7f193140
+Node: uref\7f194433
+Node: Marking Text\7f195432
+Node: Indicating\7f196056
+Node: Useful Highlighting\7f197961
+Node: code\7f199350
+Node: kbd\7f202388
+Node: key\7f204258
+Node: samp\7f205591
+Node: var\7f207178
+Node: file\7f208971
+Node: dfn\7f209578
+Node: cite\7f210488
+Node: url\7f210942
+Node: email\7f211506
+Node: Emphasis\7f212318
+Node: emph & strong\7f213218
+Node: Smallcaps\7f214204
+Node: Fonts\7f215531
+Node: Customized Highlighting\7f216619
+Node: Customized Highlighting-Footnotes\7f219434
+Ref: Customized Highlighting-Footnote-1\7f219528
+Node: Quotations and Examples\7f219654
+Node: Block Enclosing Commands\7f221276
+Node: quotation\7f223301
+Node: example\7f224391
+Node: noindent\7f226446
+Node: Lisp Example\7f227910
+Node: Lisp Example-Footnotes\7f228612
+Ref: Lisp Example-Footnote-1\7f228684
+Node: smallexample & smalllisp\7f228802
+Node: display\7f230827
+Node: format\7f231459
+Node: exdent\7f231920
+Node: flushleft & flushright\7f233000
+Node: cartouche\7f234266
+Node: Lists and Tables\7f235033
+Node: Introducing Lists\7f235709
+Node: itemize\7f237374
+Node: enumerate\7f239521
+Node: Two-column Tables\7f242026
+Node: table\7f242715
+Node: ftable vtable\7f245148
+Node: itemx\7f246249
+Node: Multi-column Tables\7f247260
+Node: Multitable Column Widths\7f247931
+Node: Multitable Rows\7f249385
+Node: Indices\7f251166
+Node: Index Entries\7f252316
+Node: Predefined Indices\7f253449
+Node: Indexing Commands\7f254446
+Node: Combining Indices\7f258986
+Node: syncodeindex\7f260349
+Node: synindex\7f262011
+Node: New Indices\7f262536
+Node: Insertions\7f264361
+Node: Braces Atsigns\7f265545
+Node: Inserting An Atsign\7f266097
+Node: Inserting Braces\7f266371
+Node: Inserting Space\7f266734
+Node: Not Ending a Sentence\7f267238
+Node: Ending a Sentence\7f268592
+Node: Multiple Spaces\7f269721
+Node: dmn\7f270940
+Node: Inserting Accents\7f272147
+Node: Dots Bullets\7f273904
+Node: dots\7f274726
+Node: bullet\7f275250
+Node: TeX and copyright\7f275647
+Node: tex\7f276214
+Node: copyright symbol\7f276630
+Node: pounds\7f276890
+Node: minus\7f277254
+Node: math\7f278176
+Node: Glyphs\7f278904
+Node: Glyphs Summary\7f280017
+Node: result\7f280645
+Node: expansion\7f281130
+Node: Print Glyph\7f282086
+Node: Error Glyph\7f282963
+Node: Equivalence\7f283796
+Node: Point Glyph\7f284484
+Node: Images\7f286041
+Node: Breaks\7f287708
+Node: Break Commands\7f289139
+Node: Line Breaks\7f289980
+Node: - and hyphenation\7f290998
+Node: w\7f292248
+Node: sp\7f292961
+Node: page\7f293370
+Node: group\7f293747
+Node: need\7f295490
+Node: Definition Commands\7f296220
+Node: Def Cmd Template\7f297791
+Node: Optional Arguments\7f300788
+Node: deffnx\7f302376
+Node: Def Cmds in Detail\7f303331
+Node: Functions Commands\7f304441
+Node: Variables Commands\7f307446
+Node: Typed Functions\7f309532
+Node: Typed Variables\7f313074
+Node: Abstract Objects\7f315057
+Node: Data Types\7f320282
+Node: Def Cmd Conventions\7f321537
+Node: Sample Function Definition\7f322100
+Node: Footnotes\7f324984
+Node: Footnotes-Footnotes\7f325372
+Ref: Footnotes-Footnote-1\7f325438
+Node: Footnote Commands\7f325718
+Node: Footnote Commands-Footnotes\7f327215
+Ref: Footnote Commands-Footnote-1\7f327297
+Node: Footnote Styles\7f327333
+Node: Conditionals\7f329919
+Node: Conditional Commands\7f330730
+Node: Conditional Not Commands\7f332223
+Node: Raw Formatter Commands\7f332968
+Node: set clear value\7f334798
+Node: ifset ifclear\7f335599
+Node: value\7f338778
+Node: value Example\7f340190
+Node: Macros\7f341768
+Node: Defining Macros\7f342473
+Node: Invoking Macros\7f343562
+Node: Format/Print Hardcopy\7f344668
+Node: Use TeX\7f346505
+Node: Format with tex/texindex\7f347133
+Node: Format with texi2dvi\7f350774
+Node: Print with lpr\7f351365
+Node: Within Emacs\7f352219
+Node: Texinfo Mode Printing\7f353138
+Node: Compile-Command\7f356548
+Node: Requirements Summary\7f357436
+Node: Preparing for TeX\7f358749
+Node: Overfull hboxes\7f361536
+Node: smallbook\7f363095
+Node: A4 Paper\7f364613
+Node: Cropmarks and Magnification\7f365838
+Node: Create an Info File\7f367779
+Node: makeinfo advantages\7f369082
+Node: Invoking makeinfo\7f369998
+Node: makeinfo options\7f370686
+Node: Pointer Validation\7f376170
+Node: makeinfo in Emacs\7f377514
+Node: texinfo-format commands\7f380072
+Node: Batch Formatting\7f381343
+Node: Tag and Split Files\7f382559
+Node: Install an Info File\7f385913
+Node: Directory file\7f386731
+Node: New Info File\7f388599
+Node: Other Info Directories\7f389660
+Node: Installing Dir Entries\7f392875
+Node: Invoking install-info\7f394868
+Node: Command List\7f397283
+Node: Tips\7f435253
+Node: Sample Texinfo File\7f446663
+Node: Sample Permissions\7f448782
+Node: Inserting Permissions\7f449825
+Node: ifinfo Permissions\7f452131
+Node: Titlepage Permissions\7f453752
+Node: Include Files\7f455014
+Node: Using Include Files\7f456101
+Node: texinfo-multiple-files-update\7f458056
+Node: Include File Requirements\7f460417
+Node: Sample Include File\7f461662
+Node: Include Files Evolution\7f463181
+Node: Headings\7f465152
+Node: Headings Introduced\7f465789
+Node: Heading Format\7f467677
+Node: Heading Choice\7f470129
+Node: Custom Headings\7f471501
+Node: Catching Mistakes\7f475829
+Node: makeinfo Preferred\7f477118
+Node: Debugging with Info\7f478023
+Node: Debugging with TeX\7f481369
+Node: Using texinfo-show-structure\7f485649
+Node: Using occur\7f488748
+Node: Running Info-Validate\7f490285
+Node: Using Info-validate\7f491346
+Node: Unsplit\7f493188
+Node: Tagifying\7f494234
+Node: Splitting\7f495086
+Node: Refilling Paragraphs\7f496702
+Node: Refilling Paragraphs-Footnotes\7f498356
+Ref: Refilling Paragraphs-Footnote-1\7f498444
+Node: Command Syntax\7f498607
+Node: Obtaining TeX\7f501564
+Node: Command and Variable Index\7f503677
+Node: Concept Index\7f519529
\1f
End Tag Table
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
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 <DEL> to go backwards, you wind up in the middle of the some other
+hit <DEL> 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.
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
+2001-01-17 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.41 "Polyhymnia" is released.
+
2001-01-08 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.40 is released.
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@"
* 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 <martin@xemacs.org>
+
+ * XEmacs 21.2.41 "Polyhymnia" is released.
+
+2001-01-16 Mike Sperber <mike@xemacs.org>
+
+ * setup-paths.el (paths-core-load-path-depth): Stopgap bump to
+ catch lisp/mule/.
+
+2001-01-14 Mike Sperber <mike@xemacs.org>
+
+ * 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. <gin@mo.msk.ru>
+
+ * 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 <didier@xemacs.org>
+
+ * 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 <martin@xemacs.org>
+
+ 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 <mike@xemacs.org>
+
+ * 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 <andy@xemacs.org>
+
+ * 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 <martin@xemacs.org>
* XEmacs 21.2.40 is released.
(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")
(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/")
(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
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 <http://www.xemacs.org>.\n")
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 "\
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
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" "\
;;;***
\f
+;;;### (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)
+
+;;;***
+\f
;;;### (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" "\
(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)
(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)))
(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
(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)
(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.
(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)))
;;; DO NOT MODIFY THIS FILE
(if (featurep 'mule-autoloads) (error "Already loaded"))
\f
-;;;### (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)
(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)
;;;***
;; 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=<current executable location> 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 <install dir>
+;; 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 <install dir>
+;; 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)
;; bootstrap the process. This will be:
;; <root>/setup/ for native windows
;; <root>/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/"))))
(+ (* (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)))
;; (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.
\f
;;; 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)
(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
(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)))
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.
-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'.
-user-init-file <file> Use <file> as init file.
-user-init-directory <directory> Use <directory> as init directory.
-user <user> Load user's init file instead of your own.
- Equivalent to -user-init-file ~<user>/.emacs
- -user-init-directory ~<user>/.xemacs/
-u <user> Same as -user.\n")
(let ((l command-switch-alist)
(insert (lambda (&rest x)
(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.
(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
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.")
(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)
(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)
+2001-01-17 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.41 "Polyhymnia" is released.
+
2001-01-08 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.40 is released.
+2001-01-17 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.41 "Polyhymnia" is released.
+
+2001-01-12 Martin Buchholz <martin@xemacs.org>
+
+ * internals/internals.texi: A little post-pdump-rename fixup.
+
+2001-01-13 Martin Buchholz <martin@xemacs.org>
+
+ * internals/internals.texi: See `pdump-rename' in src/ChangeLog.
+
+2001-01-10 Martin Buchholz <martin@xemacs.org>
+
+ * internals/internals.texi: Update for pdump changes.
+
+2001-01-04 Adrian Aichner <adrian@xemacs.org>
+
+ * 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 <martin@xemacs.org>
* XEmacs 21.2.40 is released.
@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
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
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
@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
@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.
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
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
\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.
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
@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.
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
+2001-01-17 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.41 "Polyhymnia" is released.
+
2001-01-08 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.40 is released.
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'
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'
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
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
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
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
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
(Vcharset_thai_tis620): Likewise.
(Vcharset_katakana_jisx0201): Likewise.
+2001-01-17 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.41 "Polyhymnia" is released.
+
+2001-01-16 Didier Verna <didier@xemacs.org>
+
+ * glyphs.c (image_instantiate): don't use fallbacks when
+ instantiating a face's background pixmap by inheritance.
+
+2001-01-14 Mike Sperber <mike@xemacs.org>
+
+ * sysdep.c (start_of_data): PDUMP implies ORDINARY_LINK.
+ Conditionalize accordingly.
+
+2001-01-16 Martin Buchholz <martin@xemacs.org>
+
+ * dumper.c (pdump_file_get): Fix a compiler warning.
+
+2001-01-15 Martin Buchholz <martin@xemacs.org>
+
+ 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 <martin@xemacs.org>
+ 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 <martin@xemacs.org>
+
+ 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 <martin@xemacs.org>
+
+ 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 <martin@xemacs.org>
+
+ * dumper.c: A little post-pdump-rename comment fixup.
+
+2001-01-09 Jerry James <james@eecs.ku.edu>
+
+ * lisp-disunion.h: Change LISP_TO_CVOID arg to match its use.
+
+2001-01-13 Martin Buchholz <martin@xemacs.org>
+
+ * *.[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/(?<!_)\b'$1'\b(?!_)/'$2'/g'
+ }
+
+ replace_symbol pdump_wire_lists pdump_weak_object_chains
+ replace_symbol pdump_wire_list dump_add_weak_object_chain
+
+ replace_symbol pdump_wires pdump_root_objects
+ replace_symbol pdump_wire dump_add_root_object
+
+ replace_symbol pdump_dump_wired pdump_dump_from_root_objects
+ replace_symbol pdump_dump_structs pdump_dump_from_root_struct_ptrs
+
+ replace_symbol dumpstructinfos pdump_root_struct_ptrs
+ replace_symbol dumpstructinfo_dynarr pdump_root_struct_ptr_dynarr
+ replace_symbol dumpstructinfo pdump_root_struct_ptr
+ replace_symbol dumpstruct dump_add_root_struct_ptr
+
+ replace_symbol dumpopaque dump_add_opaque
+ replace_symbol dumpopaqueinfo_dynarr pdump_opaque_dynarr
+ replace_symbol dumpopaqueinfos pdump_opaques
+ replace_symbol dumpopaqueinfo pdump_opaque
+
+ replace_symbol nb_structdump nb_root_struct_ptrs
+ replace_symbol nb_opaquedump nb_opaques
+
+ replace_symbol align_table pdump_align_table
+ replace_symbol dump_header pdump_header
+
+ replace_symbol DUMP_SIGNATURE_LEN PDUMP_SIGNATURE_LEN
+ replace_symbol DUMP_SIGNATURE PDUMP_SIGNATURE
+
+
+2001-01-12 Martin Buchholz <martin@xemacs.org>
+
+ * s/aix4.h: Keep the C for AIX compiler from overaggressively
+ optimizing bytecount_to_charcount().
+
+2001-01-06 Golubev I. N. <gin@mo.msk.ru>
+
+ * config.h.in:
+ (HAVE_DLFCN_H): Removed.
+ * sysdll.c: Remove HAVE__DLOPEN, HAVE_DLFCN_H.
+
+2001-01-06 Martin Buchholz <martin@xemacs.org>
+
+ 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 <martin@xemacs.org>
+
+ * make-src-depend (PrintPatternDeps):
+ Use `sort' to make output independent of perl version.
+
+2001-01-08 Martin Buchholz <martin@xemacs.org>
+
+ 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 <didier@xemacs.org>
+
+ * 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 <martin@xemacs.org>
* XEmacs 21.2.40 is released.
* 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.
#include <config.h>
#include "lisp.h"
-#include "alloc.h"
#include "backtrace.h"
#include "buffer.h"
#include "bytecode.h"
/* 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
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
/* 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() */
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++)
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
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
+++ /dev/null
-/* 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_ */
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.
{
/* 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
#undef HAVE_SHL_LOAD
#undef HAVE_DLD_INIT
#undef HAVE_SHLIB
-#undef HAVE_DLFCN_H
#undef HAVE_LIBINTL
#undef HAVE_LIBDNET
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);
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.
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 { \
{
/* 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 /*
#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
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
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
#include "dump-id.h"
#include "specifier.h"
-#include "alloc.h"
#include "elhash.h"
#include "sysfile.h"
#include "console-stream.h"
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);
+}
+\f
+
+typedef struct
+{
const struct lrecord_description *desc;
int count;
} pdump_reloc_table;
*
* 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,
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;
static int depth;
-static void pdump_backtrace (void)
+static void
+pdump_backtrace (void)
{
int i;
stderr_out ("pdump backtrace :\n");
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;
}
}
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; i<staticidx; i++)
- {
- Lisp_Object obj = *staticvec[i];
- if (POINTER_TYPE_P (XTYPE (obj)))
- reloc[i] = pdump_get_entry (XRECORD_LHEADER (obj))->save_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; i<dumpstructidx; i++)
+ for (i = 0; i < Dynarr_length (pdump_root_struct_ptrs); i++)
{
EMACS_INT adr;
- write (pdump_fd, &(dumpstructvec[i].data), sizeof (void *));
- adr = pdump_get_entry (*(void **)(dumpstructvec[i].data))->save_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; i<dumpopaqueidx; i++)
+ for (i = 0; i < Dynarr_length (pdump_opaques); i++)
{
- write (pdump_fd, &(dumpopaquevec[i]), sizeof (dumpopaquevec[i]));
- write (pdump_fd, dumpopaquevec[i].data, dumpopaquevec[i].size);
+ pdump_opaque *info = Dynarr_atp (pdump_opaques, i);
+ write (pdump_fd, info, sizeof (*info));
+ write (pdump_fd, info->varaddress, 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;
while (elmt)
{
EMACS_INT rdata = pdump_get_entry (elmt->obj)->save_offset;
+ int j;
for (j=0; j<elmt->count; j++)
{
write (pdump_fd, &rdata, sizeof (rdata));
}
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; i<pdump_wireidx; i++)
+ for (i=0; i<Dynarr_length (pdump_root_objects); i++)
{
- EMACS_INT obj = pdump_get_entry (XRECORD_LHEADER (*(pdump_wirevec[i])))->save_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; i<pdump_wireidx_list; i++)
+ for (i=0; i<Dynarr_length (pdump_weak_object_chains); i++)
{
- Lisp_Object obj = *(pdump_wirevec_list[i]);
+ Lisp_Object obj = * Dynarr_at (pdump_weak_object_chains, i);
pdump_entry_list_elmt *elmt;
- EMACS_INT res;
for (;;)
{
obj = *(Lisp_Object *)(desc[pos].offset + (char *)(XRECORD_LHEADER (obj)));
}
- res = elmt->save_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));
}
}
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);
pdump_opaque_data_list.count = 0;
depth = 0;
- for (i=0; i<staticidx; i++)
- pdump_register_object (*staticvec[i]);
- for (i=0; i<pdump_wireidx; i++)
- pdump_register_object (*pdump_wirevec[i]);
+ for (i=0; i<Dynarr_length (pdump_root_objects); i++)
+ pdump_register_object (* Dynarr_at (pdump_root_objects, i));
none = 1;
for (i=0; i<lrecord_type_count; i++)
if (!none)
return;
- for (i=0; i<dumpstructidx; i++)
- pdump_register_struct (*(void **)(dumpstructvec[i].data), dumpstructvec[i].desc, 1);
+ for (i=0; i<Dynarr_length (pdump_root_struct_ptrs); i++)
+ {
+ pdump_root_struct_ptr info = Dynarr_at (pdump_root_struct_ptrs, i);
+ pdump_register_struct (*(info.ptraddress), info.desc, 1);
+ }
- memcpy (hd.signature, DUMP_SIGNATURE, DUMP_SIGNATURE_LEN);
+ memcpy (hd.signature, PDUMP_SIGNATURE, PDUMP_SIGNATURE_LEN);
hd.id = dump_id;
hd.reloc_address = 0;
- hd.nb_staticpro = staticidx;
- hd.nb_structdmp = dumpstructidx;
- hd.nb_opaquedmp = dumpopaqueidx;
+ hd.nb_root_struct_ptrs = Dynarr_length (pdump_root_struct_ptrs);
+ hd.nb_opaques = Dynarr_length (pdump_opaques);
cur_offset = 256;
max_size = 0;
lseek (pdump_fd, hd.stab_offset, SEEK_SET);
- pdump_dump_staticvec ();
- pdump_dump_structvec ();
- pdump_dump_opaquevec ();
- pdump_dump_itable ();
+ pdump_dump_from_root_struct_ptrs ();
+ pdump_dump_opaques ();
pdump_dump_rtables ();
- pdump_dump_wired ();
+ pdump_dump_from_root_objects ();
close (pdump_fd);
free (pdump_buf);
Vterminal_device = t_device;
}
-static int pdump_load_check (void)
+static int
+pdump_load_check (void)
{
- return (!memcmp (((dump_header *)pdump_start)->signature, 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;
#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; i<staticidx; i++)
- {
- Lisp_Object obj = PDUMP_READ (p, Lisp_Object);
- if (POINTER_TYPE_P (XTYPE (obj)))
- XSETOBJ (obj, (char *) XPNTR (obj) + delta);
- *staticvec[i] = obj;
- }
-
- /* Put back the dumpstructs */
- for (i=0; i<((dump_header *)pdump_start)->nb_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;
break;
}
- /* Put the pdump_wire variables in place */
- count = PDUMP_READ (p, EMACS_INT);
-
- for (i=0; i<count; i++)
+ /* Put the pdump_root_objects variables in place */
+ for (i = PDUMP_READ (p, size_t); i; i--)
{
Lisp_Object *var = PDUMP_READ (p, Lisp_Object *);
Lisp_Object obj = PDUMP_READ (p, Lisp_Object);
if (POINTER_TYPE_P (XTYPE (obj)))
- XSETOBJ (obj, (char *) XPNTR (obj) + delta);
+ obj = wrap_object ((char *) XPNTR (obj) + delta);
*var = obj;
}
#ifdef WIN32_NATIVE
/* Free the mapped file if we decide we don't want it after all */
-static void pdump_file_unmap(void)
+static void
+pdump_file_unmap (void)
{
UnmapViewOfFile (pdump_start);
CloseHandle (pdump_hFile);
CloseHandle (pdump_hMap);
}
-static int pdump_file_get(const char *path)
+static int
+pdump_file_get (const char *path)
{
pdump_hFile = CreateFile (path,
return 0;
pdump_start = MapViewOfFile (pdump_hMap,
- FILE_MAP_COPY, /* Copy on write */
+ FILE_MAP_COPY, /* Copy on write */
0, /* Start at zero */
0,
0); /* Map all of it */
specs specifically state that you don't need to (and shouldn't) free the
resources allocated by FindResource, LoadResource, and LockResource this
routine does nothing. */
-static void pdump_resource_free (void)
+static void
+pdump_resource_free (void)
{
}
-static int pdump_resource_get (void)
+static int
+pdump_resource_get (void)
{
- HRSRC hRes; /* Handle to dump resource */
- HRSRC hResLoad; /* Handle to loaded dump resource */
+ HRSRC hRes; /* Handle to dump resource */
+ HRSRC hResLoad; /* Handle to loaded dump resource */
/* See Q126630 which describes how Windows NT and 95 trap writes to
resource sections and duplicate the page to allow the write to proceed.
pdump_free = pdump_resource_free;
pdump_length = SizeofResource (NULL, hRes);
- if (pdump_length <= sizeof(dump_header))
+ if (pdump_length <= sizeof (pdump_header))
{
pdump_start = 0;
return 0;
static void *pdump_mallocadr;
-static void pdump_file_free(void)
+static void
+pdump_file_free (void)
{
xfree (pdump_mallocadr);
}
#ifdef HAVE_MMAP
-static void pdump_file_unmap(void)
+static void
+pdump_file_unmap (void)
{
munmap (pdump_start, pdump_length);
}
#endif
-static int pdump_file_get(const char *path)
+static int
+pdump_file_get (const char *path)
{
int fd = open (path, O_RDONLY | OPEN_BINARY);
if (fd<0)
return 0;
pdump_length = lseek (fd, 0, SEEK_END);
- if (pdump_length < sizeof (dump_header))
+ if (pdump_length < sizeof (pdump_header))
{
close (fd);
return 0;
#ifdef HAVE_MMAP
pdump_start = (char *) mmap (0, pdump_length, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
- if (pdump_start != MAP_FAILED)
+ if (pdump_start != (char *) MAP_FAILED)
{
pdump_free = pdump_file_unmap;
close (fd);
}
#endif
- pdump_mallocadr = xmalloc(pdump_length+255);
+ pdump_mallocadr = xmalloc (pdump_length+255);
pdump_free = pdump_file_free;
pdump_start = (char *)((255 + (unsigned long)pdump_mallocadr) & ~255);
read (fd, pdump_start, pdump_length);
#endif /* !WIN32_NATIVE */
-static int pdump_file_try(char *exe_path)
+static int
+pdump_file_try (char *exe_path)
{
char *w;
- w = exe_path + strlen(exe_path);
+ w = exe_path + strlen (exe_path);
do
{
sprintf (w, "-%s-%08x.dmp", EMACS_VERSION, dump_id);
{
if (pdump_load_check ())
return 1;
- pdump_free();
+ pdump_free ();
}
sprintf (w, "-%08x.dmp", dump_id);
{
if (pdump_load_check ())
return 1;
- pdump_free();
+ pdump_free ();
}
sprintf (w, ".dmp");
{
if (pdump_load_check ())
return 1;
- pdump_free();
+ pdump_free ();
}
do
return 0;
}
-int pdump_load(const char *argv0)
+int
+pdump_load (const char *argv0)
{
char exe_path[PATH_MAX];
#ifdef WIN32_NATIVE
if (dir[0] == '-')
{
/* XEmacs as a login shell, oh goody! */
- dir = getenv("SHELL");
+ dir = getenv ("SHELL");
}
- p = dir + strlen(dir);
+ p = dir + strlen (dir);
while (p != dir && !IS_ANY_SEP (p[-1])) p--;
if (p != dir)
{
*w++ = '/';
}
- strcpy(w, name);
+ strcpy (w, name);
/* ### #$%$#^$^@%$^#%@$ ! */
#ifdef access
{
/* This must NOT be staticpro'd */
Vall_weak_hash_tables = Qnil;
- pdump_wire_list (&Vall_weak_hash_tables);
+ dump_add_weak_object_chain (&Vall_weak_hash_tables);
}
staticpro (&Vpending_warnings);
Vpending_warnings = Qnil;
- pdump_wire (&Vpending_warnings_tail);
+ dump_add_root_object (&Vpending_warnings_tail);
Vpending_warnings_tail = Qnil;
staticpro (&Vautoload_queue);
dispatch_event_queue = Qnil;
staticpro (&dispatch_event_queue);
dispatch_event_queue_tail = Qnil;
- pdump_wire (&dispatch_event_queue_tail);
+ dump_add_root_object (&dispatch_event_queue_tail);
DEFVAR_BOOL ("x-allow-sendevents", &x_allow_sendevents /*
*Non-nil means to allow synthetic events. Nil means they are ignored.
mswindows_u_dispatch_event_queue = Qnil;
staticpro (&mswindows_u_dispatch_event_queue);
mswindows_u_dispatch_event_queue_tail = Qnil;
- pdump_wire (&mswindows_u_dispatch_event_queue_tail);
+ dump_add_root_object (&mswindows_u_dispatch_event_queue_tail);
mswindows_s_dispatch_event_queue = Qnil;
staticpro (&mswindows_s_dispatch_event_queue);
mswindows_s_dispatch_event_queue_tail = Qnil;
- pdump_wire (&mswindows_s_dispatch_event_queue_tail);
+ dump_add_root_object (&mswindows_s_dispatch_event_queue_tail);
mswindows_error_caught_in_modal_loop = Qnil;
staticpro (&mswindows_error_caught_in_modal_loop);
MARK_WINDOWS_CHANGED (w);
}
- if (FRAMEP (focus_frame) && !EQ (frame, focus_frame))
+ if (FRAMEP (focus_frame) && FRAME_LIVE_P (XFRAME (focus_frame))
+ && !EQ (frame, focus_frame))
{
/* Oops, we missed a focus-out event. */
DEVICE_FRAME_WITH_FOCUS_REAL (d) = Qnil;
Vthis_command_keys = Qnil;
staticpro (&Vthis_command_keys);
Vthis_command_keys_tail = Qnil;
- pdump_wire (&Vthis_command_keys_tail);
+ dump_add_root_object (&Vthis_command_keys_tail);
command_event_queue = Qnil;
staticpro (&command_event_queue);
command_event_queue_tail = Qnil;
- pdump_wire (&command_event_queue_tail);
+ dump_add_root_object (&command_event_queue_tail);
Vlast_selected_frame = Qnil;
staticpro (&Vlast_selected_frame);
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++)
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 \
{ \
signal_simple_error_2 ("Wrong domain for image instance",
instantiator, domain);
}
+ /* How ugly !! An image instanciator that uses a kludgy syntax to snarf in
+ face properties. There's a design flaw here. -- didier */
else if (VECTORP (instantiator)
&& EQ (INSTANTIATOR_TYPE (instantiator), Qinherit))
{
assert (XVECTOR_LENGTH (instantiator) == 3);
return (FACE_PROPERTY_INSTANCE
(Fget_face (XVECTOR_DATA (instantiator)[2]),
- Qbackground_pixmap, domain, 0, depth));
+ Qbackground_pixmap, domain, 1, depth));
}
else
{
{
pointer_fg = FACE_FOREGROUND (Vpointer_face, domain);
pointer_bg = FACE_BACKGROUND (Vpointer_face, domain);
- hash_key = list4 (glyph, INSTANTIATOR_TYPE (instantiator),
+ hash_key = list4 (glyph, INSTANTIATOR_TYPE (instantiator),
pointer_fg, pointer_bg);
}
else
Vimage_instantiator_format_list = Qnil;
staticpro (&Vimage_instantiator_format_list);
- dumpstruct (&the_image_instantiator_format_entry_dynarr, &iifed_description);
+ dump_add_root_struct_ptr (&the_image_instantiator_format_entry_dynarr, &iifed_description);
INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (nothing, "nothing");
struct image_instantiator_methods *format##_image_instantiator_methods
#define INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM(format, obj_name) \
-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); \
- 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) \
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
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;
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)
#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. */
((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)
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) \
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 *);
/* 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. */
#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
#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 {
*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);
}
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++)
-- Mike Sperber <mike@xemacs.org> */
#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 */
#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. */
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);
/* 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);
#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 { \
= 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);
/* 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;
{
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++)
{
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;
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
#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{ \
#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
#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 <dlfcn.h>
#ifndef RTLD_LAZY
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];
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;
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;
}
*/
(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. */
/* 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)
/* 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. */
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;
#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)) &&
#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))
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;
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 \
{ \
#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;
#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 <sys/exec_elf.h>
-
-# 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 <sys/exec_ecoff.h>
-# define HDRR struct ecoff_symhdr
-# define pHDRR HDRR *
-# endif
-#endif /* __NetBSD__ */
-
#ifdef __OpenBSD__
# include <sys/exec_elf.h>
#endif
+2001-01-17 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.41 "Polyhymnia" is released.
+
+2001-01-15 Martin Buchholz <martin@xemacs.org>
+
+ * 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 <martin@xemacs.org>
* XEmacs 21.2.40 is released.
(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