From 007f372a86653605d72852e22dcd423d0276786c Mon Sep 17 00:00:00 2001 From: ru Date: Wed, 18 Jun 2003 13:01:08 +0000 Subject: [PATCH 1/2] Removed files not present in v4.6 import. --- contrib/texinfo/COPYING.DOC | 397 ------------------------------------ 1 file changed, 397 deletions(-) delete mode 100644 contrib/texinfo/COPYING.DOC diff --git a/contrib/texinfo/COPYING.DOC b/contrib/texinfo/COPYING.DOC deleted file mode 100644 index 32a6b2fe84cf..000000000000 --- a/contrib/texinfo/COPYING.DOC +++ /dev/null @@ -1,397 +0,0 @@ - GNU Free Documentation License - Version 1.2, November 2002 - - - Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - -0. PREAMBLE - -The purpose of this License is to make a manual, textbook, or other -functional and useful document "free" in the sense of freedom: to -assure everyone the effective freedom to copy and redistribute it, -with or without modifying it, either commercially or noncommercially. -Secondarily, this License preserves for the author and publisher a way -to get credit for their work, while not being considered responsible -for modifications made by others. - -This License is a kind of "copyleft", which means that derivative -works of the document must themselves be free in the same sense. It -complements the GNU General Public License, which is a copyleft -license designed for free software. - -We have designed this License in order to use it for manuals for free -software, because free software needs free documentation: a free -program should come with manuals providing the same freedoms that the -software does. But this License is not limited to software manuals; -it can be used for any textual work, regardless of subject matter or -whether it is published as a printed book. We recommend this License -principally for works whose purpose is instruction or reference. - - -1. APPLICABILITY AND DEFINITIONS - -This License applies to any manual or other work, in any medium, that -contains a notice placed by the copyright holder saying it can be -distributed under the terms of this License. Such a notice grants a -world-wide, royalty-free license, unlimited in duration, to use that -work under the conditions stated herein. The "Document", below, -refers to any such manual or work. Any member of the public is a -licensee, and is addressed as "you". You accept the license if you -copy, modify or distribute the work in a way requiring permission -under copyright law. - -A "Modified Version" of the Document means any work containing the -Document or a portion of it, either copied verbatim, or with -modifications and/or translated into another language. - -A "Secondary Section" is a named appendix or a front-matter section of -the Document that deals exclusively with the relationship of the -publishers or authors of the Document to the Document's overall subject -(or to related matters) and contains nothing that could fall directly -within that overall subject. (Thus, if the Document is in part a -textbook of mathematics, a Secondary Section may not explain any -mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, -commercial, philosophical, ethical or political position regarding -them. - -The "Invariant Sections" are certain Secondary Sections whose titles -are designated, as being those of Invariant Sections, in the notice -that says that the Document is released under this License. If a -section does not fit the above definition of Secondary then it is not -allowed to be designated as Invariant. The Document may contain zero -Invariant Sections. If the Document does not identify any Invariant -Sections then there are none. - -The "Cover Texts" are certain short passages of text that are listed, -as Front-Cover Texts or Back-Cover Texts, in the notice that says that -the Document is released under this License. A Front-Cover Text may -be at most 5 words, and a Back-Cover Text may be at most 25 words. - -A "Transparent" copy of the Document means a machine-readable copy, -represented in a format whose specification is available to the -general public, that is suitable for revising the document -straightforwardly with generic text editors or (for images composed of -pixels) generic paint programs or (for drawings) some widely available -drawing editor, and that is suitable for input to text formatters or -for automatic translation to a variety of formats suitable for input -to text formatters. A copy made in an otherwise Transparent file -format whose markup, or absence of markup, has been arranged to thwart -or discourage subsequent modification by readers is not Transparent. -An image format is not Transparent if used for any substantial amount -of text. A copy that is not "Transparent" is called "Opaque". - -Examples of suitable formats for Transparent copies include plain -ASCII without markup, Texinfo input format, LaTeX input format, SGML -or XML using a publicly available DTD, and standard-conforming simple -HTML, PostScript or PDF designed for human modification. Examples of -transparent image formats include PNG, XCF and JPG. Opaque formats -include proprietary formats that can be read and edited only by -proprietary word processors, SGML or XML for which the DTD and/or -processing tools are not generally available, and the -machine-generated HTML, PostScript or PDF produced by some word -processors for output purposes only. - -The "Title Page" means, for a printed book, the title page itself, -plus such following pages as are needed to hold, legibly, the material -this License requires to appear in the title page. For works in -formats which do not have any title page as such, "Title Page" means -the text near the most prominent appearance of the work's title, -preceding the beginning of the body of the text. - -A section "Entitled XYZ" means a named subunit of the Document whose -title either is precisely XYZ or contains XYZ in parentheses following -text that translates XYZ in another language. (Here XYZ stands for a -specific section name mentioned below, such as "Acknowledgements", -"Dedications", "Endorsements", or "History".) To "Preserve the Title" -of such a section when you modify the Document means that it remains a -section "Entitled XYZ" according to this definition. - -The Document may include Warranty Disclaimers next to the notice which -states that this License applies to the Document. These Warranty -Disclaimers are considered to be included by reference in this -License, but only as regards disclaiming warranties: any other -implication that these Warranty Disclaimers may have is void and has -no effect on the meaning of this License. - - -2. VERBATIM COPYING - -You may copy and distribute the Document in any medium, either -commercially or noncommercially, provided that this License, the -copyright notices, and the license notice saying this License applies -to the Document are reproduced in all copies, and that you add no other -conditions whatsoever to those of this License. You may not use -technical measures to obstruct or control the reading or further -copying of the copies you make or distribute. However, you may accept -compensation in exchange for copies. If you distribute a large enough -number of copies you must also follow the conditions in section 3. - -You may also lend copies, under the same conditions stated above, and -you may publicly display copies. - - -3. COPYING IN QUANTITY - -If you publish printed copies (or copies in media that commonly have -printed covers) of the Document, numbering more than 100, and the -Document's license notice requires Cover Texts, you must enclose the -copies in covers that carry, clearly and legibly, all these Cover -Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on -the back cover. Both covers must also clearly and legibly identify -you as the publisher of these copies. The front cover must present -the full title with all words of the title equally prominent and -visible. You may add other material on the covers in addition. -Copying with changes limited to the covers, as long as they preserve -the title of the Document and satisfy these conditions, can be treated -as verbatim copying in other respects. - -If the required texts for either cover are too voluminous to fit -legibly, you should put the first ones listed (as many as fit -reasonably) on the actual cover, and continue the rest onto adjacent -pages. - -If you publish or distribute Opaque copies of the Document numbering -more than 100, you must either include a machine-readable Transparent -copy along with each Opaque copy, or state in or with each Opaque copy -a computer-network location from which the general network-using -public has access to download using public-standard network protocols -a complete Transparent copy of the Document, free of added material. -If you use the latter option, you must take reasonably prudent steps, -when you begin distribution of Opaque copies in quantity, to ensure -that this Transparent copy will remain thus accessible at the stated -location until at least one year after the last time you distribute an -Opaque copy (directly or through your agents or retailers) of that -edition to the public. - -It is requested, but not required, that you contact the authors of the -Document well before redistributing any large number of copies, to give -them a chance to provide you with an updated version of the Document. - - -4. MODIFICATIONS - -You may copy and distribute a Modified Version of the Document under -the conditions of sections 2 and 3 above, provided that you release -the Modified Version under precisely this License, with the Modified -Version filling the role of the Document, thus licensing distribution -and modification of the Modified Version to whoever possesses a copy -of it. In addition, you must do these things in the Modified Version: - -A. Use in the Title Page (and on the covers, if any) a title distinct - from that of the Document, and from those of previous versions - (which should, if there were any, be listed in the History section - of the Document). You may use the same title as a previous version - if the original publisher of that version gives permission. -B. List on the Title Page, as authors, one or more persons or entities - responsible for authorship of the modifications in the Modified - Version, together with at least five of the principal authors of the - Document (all of its principal authors, if it has fewer than five), - unless they release you from this requirement. -C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. -D. Preserve all the copyright notices of the Document. -E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. -F. Include, immediately after the copyright notices, a license notice - giving the public permission to use the Modified Version under the - terms of this License, in the form shown in the Addendum below. -G. Preserve in that license notice the full lists of Invariant Sections - and required Cover Texts given in the Document's license notice. -H. Include an unaltered copy of this License. -I. Preserve the section Entitled "History", Preserve its Title, and add - to it an item stating at least the title, year, new authors, and - publisher of the Modified Version as given on the Title Page. If - there is no section Entitled "History" in the Document, create one - stating the title, year, authors, and publisher of the Document as - given on its Title Page, then add an item describing the Modified - Version as stated in the previous sentence. -J. Preserve the network location, if any, given in the Document for - public access to a Transparent copy of the Document, and likewise - the network locations given in the Document for previous versions - it was based on. These may be placed in the "History" section. - You may omit a network location for a work that was published at - least four years before the Document itself, or if the original - publisher of the version it refers to gives permission. -K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the section all - the substance and tone of each of the contributor acknowledgements - and/or dedications given therein. -L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section titles. -M. Delete any section Entitled "Endorsements". Such a section - may not be included in the Modified Version. -N. Do not retitle any existing section to be Entitled "Endorsements" - or to conflict in title with any Invariant Section. -O. Preserve any Warranty Disclaimers. - -If the Modified Version includes new front-matter sections or -appendices that qualify as Secondary Sections and contain no material -copied from the Document, you may at your option designate some or all -of these sections as invariant. To do this, add their titles to the -list of Invariant Sections in the Modified Version's license notice. -These titles must be distinct from any other section titles. - -You may add a section Entitled "Endorsements", provided it contains -nothing but endorsements of your Modified Version by various -parties--for example, statements of peer review or that the text has -been approved by an organization as the authoritative definition of a -standard. - -You may add a passage of up to five words as a Front-Cover Text, and a -passage of up to 25 words as a Back-Cover Text, to the end of the list -of Cover Texts in the Modified Version. Only one passage of -Front-Cover Text and one of Back-Cover Text may be added by (or -through arrangements made by) any one entity. If the Document already -includes a cover text for the same cover, previously added by you or -by arrangement made by the same entity you are acting on behalf of, -you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. - -The author(s) and publisher(s) of the Document do not by this License -give permission to use their names for publicity for or to assert or -imply endorsement of any Modified Version. - - -5. COMBINING DOCUMENTS - -You may combine the Document with other documents released under this -License, under the terms defined in section 4 above for modified -versions, provided that you include in the combination all of the -Invariant Sections of all of the original documents, unmodified, and -list them all as Invariant Sections of your combined work in its -license notice, and that you preserve all their Warranty Disclaimers. - -The combined work need only contain one copy of this License, and -multiple identical Invariant Sections may be replaced with a single -copy. If there are multiple Invariant Sections with the same name but -different contents, make the title of each such section unique by -adding at the end of it, in parentheses, the name of the original -author or publisher of that section if known, or else a unique number. -Make the same adjustment to the section titles in the list of -Invariant Sections in the license notice of the combined work. - -In the combination, you must combine any sections Entitled "History" -in the various original documents, forming one section Entitled -"History"; likewise combine any sections Entitled "Acknowledgements", -and any sections Entitled "Dedications". You must delete all sections -Entitled "Endorsements". - - -6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents -released under this License, and replace the individual copies of this -License in the various documents with a single copy that is included in -the collection, provided that you follow the rules of this License for -verbatim copying of each of the documents in all other respects. - -You may extract a single document from such a collection, and distribute -it individually under this License, provided you insert a copy of this -License into the extracted document, and follow this License in all -other respects regarding verbatim copying of that document. - - -7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate -and independent documents or works, in or on a volume of a storage or -distribution medium, is called an "aggregate" if the copyright -resulting from the compilation is not used to limit the legal rights -of the compilation's users beyond what the individual works permit. -When the Document is included an aggregate, this License does not -apply to the other works in the aggregate which are not themselves -derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these -copies of the Document, then if the Document is less than one half of -the entire aggregate, the Document's Cover Texts may be placed on -covers that bracket the Document within the aggregate, or the -electronic equivalent of covers if the Document is in electronic form. -Otherwise they must appear on printed covers that bracket the whole -aggregate. - - -8. TRANSLATION - -Translation is considered a kind of modification, so you may -distribute translations of the Document under the terms of section 4. -Replacing Invariant Sections with translations requires special -permission from their copyright holders, but you may include -translations of some or all Invariant Sections in addition to the -original versions of these Invariant Sections. You may include a -translation of this License, and all the license notices in the -Document, and any Warrany Disclaimers, provided that you also include -the original English version of this License and the original versions -of those notices and disclaimers. In case of a disagreement between -the translation and the original version of this License or a notice -or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", -"Dedications", or "History", the requirement (section 4) to Preserve -its Title (section 1) will typically require changing the actual -title. - - -9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except -as expressly provided for under this License. Any other attempt to -copy, modify, sublicense or distribute the Document is void, and will -automatically terminate your rights under this License. However, -parties who have received copies, or rights, from you under this -License will not have their licenses terminated so long as such -parties remain in full compliance. - - -10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions -of the GNU Free Documentation License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. See -http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. -If the Document specifies that a particular numbered version of this -License "or any later version" applies to it, you have the option of -following the terms and conditions either of that specified version or -of any later version that has been published (not as a draft) by the -Free Software Foundation. If the Document does not specify a version -number of this License, you may choose any version ever published (not -as a draft) by the Free Software Foundation. - - -ADDENDUM: How to use this License for your documents - -To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and -license notices just after the title page: - - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled "GNU - Free Documentation License". - -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, -replace the "with...Texts." line with this: - - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - -If you have Invariant Sections without Cover Texts, or some other -combination of the three, merge those two alternatives to suit the -situation. - -If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, -to permit their use in free software. From 212fa58b27874a1ac997e85e3f696ffad810e44c Mon Sep 17 00:00:00 2001 From: ru Date: Mon, 23 May 2005 10:46:22 +0000 Subject: [PATCH 2/2] Import of stripped down GNU texinfo 4.8 --- contrib/texinfo/AUTHORS | 13 +- contrib/texinfo/ChangeLog | 17487 +++++++----------------- contrib/texinfo/ChangeLog.46 | 12516 +++++++++++++++++ contrib/texinfo/INSTALL | 26 +- contrib/texinfo/INTRODUCTION | 2 +- contrib/texinfo/NEWS | 108 +- contrib/texinfo/README | 7 +- contrib/texinfo/README.dev | 44 + contrib/texinfo/TODO | 135 +- contrib/texinfo/config.h.in | 92 +- contrib/texinfo/doc/README | 2 +- contrib/texinfo/doc/info-stnd.texi | 81 +- contrib/texinfo/doc/info.1 | 28 +- contrib/texinfo/doc/info.5 | 2 +- contrib/texinfo/doc/info.texi | 369 +- contrib/texinfo/doc/infokey.1 | 41 + contrib/texinfo/doc/install-info.1 | 20 +- contrib/texinfo/doc/makeinfo.1 | 35 +- contrib/texinfo/doc/texindex.1 | 10 +- contrib/texinfo/doc/texinfo.5 | 2 +- contrib/texinfo/doc/texinfo.txi | 5829 ++++---- contrib/texinfo/doc/version-stnd.texi | 8 +- contrib/texinfo/doc/version.texi | 8 +- contrib/texinfo/info/README | 2 +- contrib/texinfo/info/dir.c | 28 +- contrib/texinfo/info/display.c | 115 +- contrib/texinfo/info/display.h | 19 +- contrib/texinfo/info/doc.c | 224 +- contrib/texinfo/info/doc.h | 32 +- contrib/texinfo/info/dribble.c | 11 +- contrib/texinfo/info/dribble.h | 8 +- contrib/texinfo/info/echo-area.c | 155 +- contrib/texinfo/info/echo-area.h | 51 +- contrib/texinfo/info/filesys.c | 85 +- contrib/texinfo/info/filesys.h | 28 +- contrib/texinfo/info/footnotes.c | 25 +- contrib/texinfo/info/footnotes.h | 6 +- contrib/texinfo/info/funs.h | 224 +- contrib/texinfo/info/gc.c | 13 +- contrib/texinfo/info/gc.h | 8 +- contrib/texinfo/info/indices.c | 83 +- contrib/texinfo/info/indices.h | 19 +- contrib/texinfo/info/info-utils.c | 197 +- contrib/texinfo/info/info-utils.h | 41 +- contrib/texinfo/info/info.c | 100 +- contrib/texinfo/info/info.h | 20 +- contrib/texinfo/info/infodoc.c | 161 +- contrib/texinfo/info/infokey.c | 160 +- contrib/texinfo/info/infokey.h | 2 +- contrib/texinfo/info/infomap.c | 154 +- contrib/texinfo/info/infomap.h | 13 +- contrib/texinfo/info/key.c | 4 +- contrib/texinfo/info/m-x.c | 21 +- contrib/texinfo/info/man.c | 83 +- contrib/texinfo/info/man.h | 18 +- contrib/texinfo/info/nodemenu.c | 38 +- contrib/texinfo/info/nodes.c | 153 +- contrib/texinfo/info/nodes.h | 17 +- contrib/texinfo/info/search.c | 108 +- contrib/texinfo/info/search.h | 30 +- contrib/texinfo/info/session.c | 649 +- contrib/texinfo/info/session.h | 193 +- contrib/texinfo/info/signals.c | 62 +- contrib/texinfo/info/signals.h | 11 +- contrib/texinfo/info/termdep.h | 2 +- contrib/texinfo/info/terminal.c | 67 +- contrib/texinfo/info/terminal.h | 40 +- contrib/texinfo/info/tilde.c | 26 +- contrib/texinfo/info/tilde.h | 12 +- contrib/texinfo/info/variables.c | 20 +- contrib/texinfo/info/variables.h | 11 +- contrib/texinfo/info/window.c | 132 +- contrib/texinfo/info/window.h | 82 +- contrib/texinfo/lib/README | 2 +- contrib/texinfo/lib/gettext.h | 17 +- contrib/texinfo/lib/substring.c | 10 +- contrib/texinfo/lib/system.h | 97 +- contrib/texinfo/lib/xalloc.h | 91 +- contrib/texinfo/lib/xexit.c | 7 +- contrib/texinfo/lib/xmalloc.c | 41 +- contrib/texinfo/lib/xstrdup.c | 13 +- contrib/texinfo/makeinfo/README | 2 +- contrib/texinfo/makeinfo/cmds.c | 1016 +- contrib/texinfo/makeinfo/cmds.h | 168 +- contrib/texinfo/makeinfo/defun.c | 398 +- contrib/texinfo/makeinfo/defun.h | 6 +- contrib/texinfo/makeinfo/files.c | 407 +- contrib/texinfo/makeinfo/files.h | 45 +- contrib/texinfo/makeinfo/float.c | 430 + contrib/texinfo/makeinfo/float.h | 56 + contrib/texinfo/makeinfo/footnote.c | 58 +- contrib/texinfo/makeinfo/footnote.h | 13 +- contrib/texinfo/makeinfo/html.c | 593 +- contrib/texinfo/makeinfo/html.h | 32 +- contrib/texinfo/makeinfo/index.c | 428 +- contrib/texinfo/makeinfo/index.h | 67 +- contrib/texinfo/makeinfo/insertion.c | 1072 +- contrib/texinfo/makeinfo/insertion.h | 46 +- contrib/texinfo/makeinfo/lang.c | 393 +- contrib/texinfo/makeinfo/lang.h | 66 +- contrib/texinfo/makeinfo/macro.c | 146 +- contrib/texinfo/makeinfo/macro.h | 38 +- contrib/texinfo/makeinfo/makeinfo.c | 1733 ++- contrib/texinfo/makeinfo/makeinfo.h | 116 +- contrib/texinfo/makeinfo/multi.c | 611 +- contrib/texinfo/makeinfo/multi.h | 28 + contrib/texinfo/makeinfo/node.c | 334 +- contrib/texinfo/makeinfo/node.h | 28 +- contrib/texinfo/makeinfo/sectioning.c | 424 +- contrib/texinfo/makeinfo/sectioning.h | 61 +- contrib/texinfo/makeinfo/toc.c | 288 +- contrib/texinfo/makeinfo/toc.h | 17 +- contrib/texinfo/makeinfo/xml.c | 1853 ++- contrib/texinfo/makeinfo/xml.h | 113 +- contrib/texinfo/makeinfo/xref.c | 620 + contrib/texinfo/makeinfo/xref.h | 30 + contrib/texinfo/util/README | 2 +- contrib/texinfo/util/install-info.c | 295 +- contrib/texinfo/util/texindex.c | 241 +- 119 files changed, 31935 insertions(+), 21245 deletions(-) create mode 100644 contrib/texinfo/ChangeLog.46 create mode 100644 contrib/texinfo/README.dev create mode 100644 contrib/texinfo/doc/infokey.1 create mode 100644 contrib/texinfo/makeinfo/float.c create mode 100644 contrib/texinfo/makeinfo/float.h create mode 100644 contrib/texinfo/makeinfo/multi.h create mode 100644 contrib/texinfo/makeinfo/xref.c create mode 100644 contrib/texinfo/makeinfo/xref.h diff --git a/contrib/texinfo/AUTHORS b/contrib/texinfo/AUTHORS index 1c5bfad83d2b..ce8ee85e6d03 100644 --- a/contrib/texinfo/AUTHORS +++ b/contrib/texinfo/AUTHORS @@ -1,26 +1,31 @@ -$Id: AUTHORS,v 1.5 2003/05/08 00:51:55 karl Exp $ +$Id: AUTHORS,v 1.10 2004/04/11 17:56:45 karl Exp $ Texinfo authors. + Copyright (C) 2003 Free Software Foundation, Inc. + Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. Akim Demaille texi2dvi. +Alper Ersoy makeinfo: enhancements in all files, especially + html-, xml-, and docbook-related. Andreas Schwab texinfo.tex, configure.ac, most makeinfo files. Bob Chassell texinfo.tex, original texinfo.txi. Brian Fox all makeinfo/* and info/* files, info-stnd.texi. Dave Love original makeinfo/html.[ch]. Eli Zaretskii all files. Karl Berry all files. +Karl Heinz Marbaise original makeinfo language support, most files. Noah Friedman original texi2dvi. Paul Rubin original makeinfo/multi.c. Philippe Martin original makeinfo xml/docbook output. Richard Stallman original texinfo.tex, install-info.c, texindex.c, texinfo.txi. -Zack Weinberg texinfo.tex (@macro implementation). +Zack Weinberg texinfo.tex: @macro implementation. See http://www.iro.umontreal.ca/contrib/po/HTML/team-LL.html for the translation teams for a given language LL. -Many files included in Texinfo distribution are copied from other -locations. See util/srclist*. +Many files included in the Texinfo distribution are copied from other +locations, no author information is given for those. See util/srclist*. diff --git a/contrib/texinfo/ChangeLog b/contrib/texinfo/ChangeLog index fbbaff60cc24..7c53a0911881 100644 --- a/contrib/texinfo/ChangeLog +++ b/contrib/texinfo/ChangeLog @@ -1,12504 +1,4999 @@ +2004-12-31 Karl Berry + + * Version 4.8. + +2004-12-21 Karl Berry + + * pretest version 4.7.94. + + * makeinfo/xref.c: doc fix. + +2004-12-20 Karl Berry + + * makeinfo/html.c (cm_node) : need old-style names in the normal + (not no_headers) html case, too, of course. + (add_html_names): canon_white the new name, too. + +2004-12-19 Karl Berry + + * pretest version 4.7.93. + + * automake 1.9.4. + + * makeinfo/xml.c (try_docbook_image): new fn. + (xml_insert_docbook_image): call it, trying additional formats + pdf, svg, etc. + * makeinfo/makeinfo.c (cm_image): check for gif too. + http://www.gnu.org/philosophy/gif.html says: + "we can and will include support for displaying GIF files in GNU + software." Leaving it undocumented, though. + Based on patch from Jens Elkner, 18 Dec 2004 01:56:28 +0100. + +2004-12-19 Torsten Bronger + + * util/texinfo.dtd: define most entities, add . + +2004-12-17 Juan M. Guerrero + + * djgpp/config.bat: remove files like coXXXXXX.tmp created + in the top_srcdir by the gl_FUNC_MKSTEMP test. + +2004-12-15 Karl Berry + + * pretest version 4.7.92. + + * util/texinfo.dtd: merge with makeinfo/texinfo.dtd. + * makeinfo/texinfo.dtd, makeinfo/texinfo.xsl: remove. + +2004-12-15 Stepan Kasal + + * Makefile.am (EXTRA_DIST): Removed po/Makevars.template, sorry. + +2004-12-15 Juan M. Guerrero + + * djgpp/config.sed: adjust for new autoconf. + * makeinfo/node.c (enumerate_filename): make dos_file_names const + instead of static, since it may involve a fn call to pathconf. + +2004-12-15 Karl Berry + + * Makefile.am (EXTRA_DIST): include ChangeLog.46, README.dev, + and po/Makevars.template. From Stepan. + +2004-12-14 Karl Berry + + * doc/texinfo.txi (inforef): try to explain possible uses more + thoroughly. + From: Luc Teirlinck, 13 Dec 2004 21:45:58 -0600. + + * doc/texinfo.txi (pxref): more explanation. + * doc/info-stnd.texi (Basic Windows): put pxref in parens. + help-texinfo mail from adl, 13 Dec 2004 17:07:50 +0100. + +2004-12-13 Andreas Schwab + + * info/echo-area.c (DECLARE_INFO_COMMAND): Add intermediate cast + to avoid warning. + * info/infokey.c (compile): Likewise. + * info/session.c (forward_move_node_structure): Likewise. + (DECLARE_INFO_COMMAND): Likewise. + + * makeinfo/makeinfo.c (init_paragraph): Don't use free_and_clear + to avoid strict aliasing issue. + + * makeinfo/cmds.c (cm_center): Avoid strict aliasing issue. + +2004-12-13 Karl Berry + + * doc/texinfo.txi (HTML Cross-reference Command Expansion): add + @euro{} -> U+20AC. texinfo-pretest mail from Patrice, + 12 Dec 2004 23:49:50 +0100. + +2004-12-12 Karl Berry + + * doc/texinfo.txi (makeinfo options): don't be so suggestive about + skipping xref validation. + emacs-devel mail from: Luc Teirlinck, 12 Dec 2004 13:02:11 -0600. + +2004-12-08 Karl Berry + + * pretest version 4.7.91. + + * info/echo-area.c, info/infokey.c, info/session.c: omit useless + casts to intptr_t, since we're just casting to (void *) next. + intptr_t is not defined with gcc 3.04 on Tru64 Unix V5.1 + (This whole vararg stuff needs to be redone correctly.) + Report from: Svend Tollak Munkejord (via te) + 8 Dec 2004 17:15:17 +0100. + + * doc/texinfo.txi (ref): rewrite last two redundant paragraphs. + +2004-12-07 Karl Berry + + * doc/texinfo.txi (Macro Details): document @c kludge in macro + definitions to work around some newline problems. (From Werner.) + +2004-12-05 Karl Berry + + * makeinfo/html.c (add_escaped_anchor_name): prefix g_t if the + nodename begins with a nonletter. Ugh. + * doc/texinfo.txi (HTML Xref Node Name Expansion): document this. + http://ff0.org/pipermail/texinfo-pretest/2004-December/000210.html + + * doc/texinfo.txi (HTML Xref 8-bit Character Expansion): define + behavior for Unicode code points above 0xfff. + + * makeinfo/makeinfo.c (reader_loop): didn't make it into + HTML 4, remove it. Sigh. + texinfo-pretest mail from wl, 05 Dec 2004 23:39:05 +0100. + +2004-12-02 Karl Berry + + * configure.ac (install-warnings): simplify default case. From te. + +2004-12-01 Karl Berry + + * pretest version 4.7.90. + + * util/texi2dvi (recode): new option, off by default. + Unconditionally calling recode seems problematic, when there + hasn't been a release for years and its Texinfo support is less than + perfect. + +2004-11-30 Karl Berry + + * doc/texinfo.txi (Quotations and Examples): @quotation does not + reduce interparagraph spacing. + + * makeinfo/node.c (cm_node) : do not bother calling + add_html_nodes in the split case, the filename is wrong. + +2004-11-29 Karl Berry + + Support for writing using the old-style node name + to HTML name conversion, to keep the gcc folks happy. + * makeinfo/node.c (add_html_names): new routine, factoring out + common code (plus new code) from cm_node. + (cm_node) : call it. + * makeinfo/makeinfo.h (OLD_HTML_SAFE, OLD_URL_SAFE_CHAR): + (re)define these. + * makeinfo/html.c (add_escaped_anchor_name): take new argument to + optionally output the old-style conversion. + (add_anchor_name): change call. + * index.c: change calls. + * makeinfo/html.h (add_escaped_anchor_name): change decl. + +2004-11-26 Karl Berry + + * makeinfo/makeinfo.c (reader_loop): allow after — + +2004-11-25 Karl Berry + + * doc/texinfo.txi (Fonts): document new command @sansserif. + * doc/texinfo.tex (\sansserif): new command. + * makeinfo/cmds.h (cm_sansserif): new cmd. + * makeinfo/cmds.c (cm_sansserif): new cmd. + (command_table): add it. + * makeinfo/texinfo.dtd (Inline.fonts): add it; also slanted. + * makeinfo/xml.h (SANSSERIF, SLANTED): define these new elements. + * makeinfo/xml.c (texinfoml_element_list): add them. + From: Frank Küster, 21 Oct 2004 23:27:33 +0200, Debian bug#277754. + + * doc/texinfo.txi (Quotations and Examples, end titlepage): state + that there must be only one space between the @end and its + argument. Report from: christoph.sobotka, 26 Oct 2004 22:04:03 +0200. + +2004-11-22 Karl Berry + + * doc/texinfo.txi (euro): new node, documenting new command, + @euro{}, for the Euro currency symbol. + * doc/texinfo.tex (\euro): new command, along with \eurofont to + support it. The following extra font support is also related to + supporting @euro{}: + (\bfstylename): define this. + (\textnominalsize .. \ssecnominalsize): new macros. + (\textfonts .. \ssecfonts): define \curfontsize. + * makeinfo/cmds.c (command_table): add euro. + * makeinfo/lang.c (cm_special_char): handle euro. + (iso8859_15_map): new global. + +2004-11-18 Stepan Kasal + + * doc/texinfo.tex (\ptexnewwrite): Save \newwrite. + (\newwrite): Call it. + +2004-11-17 Karl Berry + + * configure.ac (install-warnings): new --enable option, requested + by te. + +2004-11-11 Karl Berry + + * texinfo.dtd (metainformation): add documentdescription. + (documentdescription): define. + * xml.h (DOCUMENTDESCRIPTION): new value for xml_element. + * xml.c (texinfoml_element_list): define documentdescription. + (docbook_element_list): likewise, but don't know how to handle it. + * cmds.c (cm_documentdescription): insert opening xml tag. + * insertion.c (end_insertion): insert closing xml tag. + + * makeinfo/makeinfo.c (insert_string): declare const char * arg. + * makeinfo/makeinfo.h: likewise. + Report from: Vincent Lefevre, 20 Oct 2004 15:40:39 +0200, + noting a spurious after . + +2004-11-08 Karl Berry + + * doc/texinfo.tex (\pdfmakeoutlines): in the first run through the + toc, define \thischapnum...\thissubsecnum as 0, rather than \empty. + This is so \expnumber doesn't end up trying to expand + \csname sec\empty\endcsname, i.e., \sec, which is the secant function. + Report from: Oliver Beck, help-texinfo, 8 Nov 2004 08:05:55 +0100. + +2004-11-07 Karl Berry + + * makeinfo/makeinfo.c (main) [LC_MESSAGES]: #ifdef the setlocale + using LC_MESSAGES. From te, 6 Nov 2004 23:36:10 +0100. + +2004-11-06 Karl Berry + + * lib/Makefile.am (libtxi_a_SOURCES): add strdup.h. + Report from: Thomas Esser , + 6 Nov 2004 18:11:51 +0100. + +2004-11-01 Karl Berry + + * makeinfo/xref.c (cm_xref): don't include the external file name + in the HTML output, since it's pretty traditional not to + distinguish internal and external links in HTML, and it disturbs + the flow of reading. + From: Han-Wen Nienhuys , 31 Oct 2004 00:13:36 +0200. + (For lilypond.) + +2004-10-31 Karl Berry + + * doc/texinfo.tex (\setmultitablespacing): just let \multistrut be + the same as \strut. Its previous computation was wrong. + See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. + +2004-10-22 Stepan Kasal + + * info/Makefile.am (generated_sources): Add dependencies defining + a total order on the files, to prevent race conditions with + parallel make. + Move the code about generated sources to the end of the file. + +2004-10-20 Stepan Kasal + + * info/Makefile.am (doc.c, key.c, funs.h): Don't distribute them. + of these three files. + (ginfo_SOURCES, nodist_ginfo_SOURCES): Move files. + (infokey_SOURCES, nodist_infokey_SOURCES): Likewise. + (DISTCLEANFILES): Include generated_sources. + +2004-10-20 Stepan Kasal + + BUILT_SOURCES is a special variable for a hack to supplement + the automatic dependency tracking; we need it for funs.h only. + See the explanation in the automake manual. + + * info/Makefile.am (BUILT_SOURCES): All occurences replaced by ... + (generated_sources): ... this new variable. + (BUILT_SOURCES): set to ``funs.h''. + +2004-10-20 Stepan Kasal + + * info/Makefile.am (ginfo_SOURCES): replace $(BUILT_SOURCES) + with ``doc.c funs.h''; this reflects the true situation. + (infokey_SOURCES): Add funs.h. + +2004-10-20 Stepan Kasal + + * info/Makefile.am (EXTRA_DIST): No need to mention the generated + sources here, they are in ginfo_SOURCES or infokey_SOURCES. + +2004-10-19 Stepan Kasal + + * configure.ac: When cross compiling, we have to remove + ./config.status, not "$native_tools"/config.status. + Replace ``echo'' with AC_MSG_NOTICE. Quote the variable + values passed to ``env.'' + +2004-10-17 Karl Berry + + * makeinfo/node.c (cm_node): don't output
after the + navigation line, it's apparently just extra space. + + * configure.ac: Clean environment for native configure. + From: Mark Fortescue , + 17 Oct 2004 19:09:53 +0100. + +2004-10-11 Stepan Kasal + + * configure.ac: Add a short explanation about cross compile. + +2004-10-08 Karl Berry + + * info/Makefile.am (generated_sources): remove. Found by Stepan. + +2004-10-08 Stepan Kasal + + Support cross compiling. Based on research by Mark Fortescue. + Maciej W. Rozycki pointed out this issue previously. + + * configure.ac: If cross compiling, run second configure script + in a subdirectory ${native_tools}. New automake conditional + TOOLS_ONLY is set inside that subdirectory. + * Makefile.am (SUBDIRS): Add $(native_tools); restrict the + SUBDIRS to minimum, if we are inside the $(native_toos) dir. + (distclean-local): Remove directory $(native_tools). + * doc/Makefile.am: If necessary, use makeinfo and install-info + from $(native_tools). + * info/Makefile.am: Similarily with the ``makedoc'' program. + +2004-10-07 Stepan Kasal + + @table command doesn't work inside environment @display. + There is no point in trying to fix it: just give up with a cry. + + * doc/texinfo.tex (\table, \ftable, \vtable): Instead of calling + \tablex directly, call ... + (\tablecheck): ... this new macro which checks for active newline; + if it's found, it reports an error and uses \doignore to recover. + * doc/texinfo.txi (display): mention this. + +2004-10-06 Karl Berry + + * doc/*.texi: more consistent use of dashes. + From Stepan and Benno Schulenberg . + +2004-10-04 Karl Berry + + * makeinfo/makeinfo.c (cm_value): increment and restore + input_text_offset before execute_string on the value, + so cm_xref doesn't complain about missing punctuation. + From: Sergey Poznyakoff , + 04 Oct 2004 15:04:33 +0300. + +2004-10-01 Karl Berry + + * lib/Makefile.am (libtxi_a_SOURCES): add getopt_.h. + + * configure.ac: bump version to 4.7.90, although we're not really + pretesting yet. (I need a distribution to check an + automake issue.) + +2004-09-14 Karl Berry + + * util/srclist.txt (getopt.h): renamed to getopt_.h. + * lib/getopt_.h: new file. + * lib/getopt.h: just include getopt.h. + +2004-09-09 Karl Berry + + * doc/texinfo.txi (Image Syntax): mention @noindent, @center. + +2004-09-06 Stepan Kasal + + * doc/texinfo.tex (\Efloat): Take care to run \scantokens on + \thisshortcaption before writing the lof line to auxfile. + Otherwise, when a newline appears in the argument to + @shortcaption, a literal ^^M is written to the aux file. + Report from Patrice, 1 Aug 2004 15:54:44 +0200. + +2004-09-01 Karl Berry + + * util/gendocs.sh: show commands, allow / in description. + +2004-08-30 Karl Berry + + * makeinfo/makeinfo.c (maybe_escaped_expansion): new routine, like + expansion but does HTML escapes. + * makeinfo/makeinfo.h (maybe_escaped_expansion): declare. + * makeinfo/index.c (cm_printindex): call it. + This is @cindex Kahrs, J@"urgen does not get + gawk.texi:23425: Unknown command `"urgen'. + (in gawk 3.1.4). + Report from: Stepan Kasal , 24 Aug 2004 12:36:34 +0200. + +2004-08-29 Karl Berry + + * makeinfo/node.c (split_file): do not search for output file + along the path when calling find_and_load (can cause seg + fault when cross-compiling). + From: Martin Husemann , 29 Aug 2004 08:40:33 +0200. + http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=26791 + +2004-08-27 Karl Berry + + * doc/texinfo.txi (Macro details): more warnings about macro usage. + Report from: Stepan Kasal , 24 Aug 2004 09:29:35 +0200. + + * doc/texinfo.tex (\Efloat): \vskip\parskip after printing the + caption; previous \printedsomething code to do this had become + obsolete. Reported by Stepan. + + * doc/texinfo.txi (caption shortcaption): show an example for + @shortcaption, and remark that weird commands like @c and @verb + are not allowed. Suggested by Stepan. + +2004-08-27 Stepan Kasal + + * doc/texinfo.tex (\initial): when breaking the column before the + initial, allow for some space at the bottom of the column, so + the baselineskip is preserved (more or less). + Don't give negative penalty, it encouradges creating of underfull + columns with stretched baselineskip. + At the end, the \nobreak should be before \vskip, not after it. + +2004-08-26 Stepan Kasal + + * util/texi2dvi: fix the sed script searching for @documentencoding; + Double-quote some instances of "$filename_???" + +2004-08-26 Akim Demaille + + Let DVI and PDF files honor the document encoding in TeX. + + * util/texi2dvi ($language): Be sure to set its value. + (get_xref_files): Turn this external shell script into a function. + (filename_rcd, $tmpdir_rcd): New. + If the file is in Texinfo, and has @documentencoding, and recode + is available, then run it. + +2004-08-25 Akim Demaille + + * util/Makefile.am (texinfo.cat): Fix for srcdir != builddir. + +2004-08-25 Karl Berry + + * util/texi2dvi: @ is also ok for the first character of xref_files. + +2004-08-20 Karl Berry + + * doc/texinfo.tex (\tablez): accidentally removed assignments + enabling @item and @itemx within @table. + +2004-08-19 Karl Berry + + * doc/texinfo.tex (\multitable): \def\item to \crcr, instead of + \let, to avoid errors with a nested @itemize inside + @multitable. + Report from: Pierre-Luc Veilleux , + 18 Aug 2004 13:26:00 -0400. + +2004-08-19 Stepan Kasal + + * doc/texinfo.tex (\scanmacro): Make backslash active, not other, + as this is the default when processing texinfo files. + Otherwise, a \ inside @copying will eventually print as ``. + +2004-08-18 Stepan Kasal + + * doc/texinfo.tex (\scantxt): " is another active char to be + sanitized. + +2004-08-18 Karl Berry + + * doc/texinfo.txi (exampleindent): document that the default is + different in TeX. + From: Simon Josefsson , 18 Aug 2004 13:44:32 +0200. + +2004-08-14 Karl Berry + + * doc/texinfo.tex (\cslet): equivalent-or-better, and shorter, + version from dak, 12 Aug 2004 19:17:27 +0200. + + * doc/texinfo.txi (makeinfo options): use --no-number-sections + with non-hierarchical manuals. + +2004-08-13 Karl Berry + + * util/texi2dvi: check for -file-line-error, since -style is no + longer part of the name. + +2004-08-07 Karl Berry + + * info/echo-area.c (inform_in_echo_area): avoid buffer overrun. + Report from: Roman Werpachowski , + 7 Aug 2004 01:18:32 +0200. + + * info/echo-area.h (inform_in_echo_area): declare arg as const, + while we're at it. + +2004-08-02 Karl Berry + + * makeinfo/cmds.c (cm_acronym_or_abbr): use strchr, not index. + Report from: Prof Brian Ripley , + 2 Aug 2004 12:47:36 +0100 (BST) + +2004-07-31 Karl Berry + + * doc/texinfo.txi, + * doc/texinfo.tex, + * makeinfo/cmds.c, cmds.h, xml.c, xml.h, + * util/texinfo.dtd: new command @abbr, suggested by Paul Eggert, + who also sent the original documentation. + +2004-07-30 Karl Berry + + * info/infomap.c (initialize_vi_like_keymaps): bind j to + info_next_line and k to info_prev_line. From Eli. + +2004-07-30 Maciej W. Rozycki + + * info/filesys.c (extract_colon_unit): Clean up handling of the + end of string. + +2004-07-27 Karl Berry + + * doc/texinfo.txi (verb): explicitly warn that @verb cannot be + used in xref contexts. + +2004-07-27 Stepan Kasal + + * doc/texinfo.tex (\float): The parameters for @float are + separated by commas; allow a space after each of the commas. + + The TeX code for @caption, @shortcaption and @copying now uses + a similar mechanism to macro definitions. In detail: + + * doc/texinfo.tex (\macrobodyctxt, \macroargctxt): Generalize, ... + (\scanctxt, \scanargctxt): ... and introduce new variants. + (\scanexp): New macro--expand the parameter and call \scantokens. + (\copying, \docopying, \insertcopying): Use \scanargctxt and + \scanexp--this simplifies things a lot. + (\caption, \shortcaption): Redefine, using \scanargctxt via ... + (\docaption, \defcaption): ... these new macros. + (\appendtomacro): Simplify code, using \expandafter. + +2004-07-26 Karl Berry + + Avoid using the path for output files, since this led to problems + when incompatible files created by previous versions were found. + * makeinfo/files.c (find_and_load): introduce second parameter + use_path, set to 0 from the call in handle_delayed_writes, + 1 in all cases. + * makeinfo/files.h: change decl. + * makeinfo/cmds.c, makeinfo.c, node.c: change calls. + From: Thomas Klausner , + 14 Jul 2004 00:31:54 +0200. + +2004-07-25 Werner Lemberg + + Rename @s to @slanted. + + * doc/texinfo.tex (\s): Replace with... + (\slanted): This. + * doc/texinfo.txi: Updated. + + * makeinfo/cmds.c (command_table): Add @slanted, not @s. + (cm_s): Replace with... + (cm_slanted): This. + * makeinfo/cmds.h: Add cm_slanted, not cm_s.. + + * NEWS: Updated. + +2004-07-24 Karl Berry + + * info/echo-area.c (ea_possible_completions), + * info/session.c (forward_move_node_structure), + * info/infokey.c (compile): cast to intptr_t to avoid cast to + pointer from integer of different size. + From Havard Eidnes , 14 Jul 2004 20:38:59 +0200. + +2004-07-19 Alper Ersoy + + * makeinfo/makeinfo.c (main): with XML, instead of directly calling + handle_variable_internal for -D and -U command line flags, hold the + variable declarations until output document is started. + (convert_from_loaded_file): handle variables provided with -D and -U + flags here, just before entering the reader_loop. + (Otherwise, -D/-U with --xml cause a segfault.) + +2004-07-15 Werner Lemberg + + * doc/texinfo.tex (\s): New command to typeset text with a slanted + font. + * doc/texinfo.txi: Document @s. + + * makeinfo/cmds.c (command_table): Add @s. + (cm_s): New function. Currently the same as cm_i -- it probably + has to be adapted to Docbook and XML. + * makeinfo/cmds.h: Add prototype for cm_s. + + * NEWS: Document new command @s. + +2004-07-15 Werner Lemberg + + * doc/texinfo.tex (\TeX): Adjust \spacefactor to make it act like a + lowercase letter, not like a period. + +2004-07-12 Karl Berry + + * texinfo/texinfo.txi (Useful Highlighting): Include + cross-references to each of the commands. Suggestion from + Wolfgang Pausch, 12 Jul 2004 08:26:28 +0200. + + * texinfo/texinfo.txi (Invoking makeinfo), + * makeinfo/makeinfo.c: mention that --if-noFORMAT also processes + @ifnotFORMAT blocks. + Suggestion from Stepan. + +2004-07-11 Karl Berry + + * makeinfo/makeinfo.c (discard_until): leave input_text_offset at + the end of input_text if not found, not at one past the + end of input_text. (Had erroneously put that in the block + only if an error was given.) The result was a null byte + after macro expansions. Report from Werner, + 10 Jul 2004 15:36:40 +0200. + + * makeinfo/node.c (split_file): fwrite Local Variables trailer so + it actually gets into the output of the top-level info + file; don't just insert_string. + Report from: Werner LEMBERG, 11 Jul 2004 08:58:13 +0200. + +2004-07-10 Karl Berry + + * util/texi2pdf: new script. + * util/Makefile.am: install it. + * doc/texinfo.txi: document it. + +2004-07-05 Karl Berry + + * makeinfo/xref.c (cm_email, cm_uref, et al.): + * makeinfo/xml.c (xml_insert_indexentry, xml_insert_indexterm): + * makeinfo/sectioning.c (sectioning_underscore): + * makeinfo/makeinfo.c (cm_listoffloats): use %s, don't pass string to + execute_string. Report from Christian Schenk. + +2004-07-02 Karl Berry + + * makeinfo/makinfo.c (execute_string): don't worry about + mismatched multiline commands if executing_macro. + +2004-06-27 Karl Berry + + * doc/texinfo.tex: Various doc fixes. + (\dosubindsanitize): propagate the same penalty + >10000, don't just use \nobreak. + (\sectionheading): insert a final penalty of + 10001, not 10000. This causes \aboveenvbreak to + insert \parskip glue, cancelling the + \vskip-\parskip done here. Otherwise, when (e.g.) + @section is followed immediately by @example, the + example can be shrunk up above the section title. + +2004-06-14 Karl Berry + + * doc/texinfo.tex (\commondummies, \indexnofonts): dummy-up @comma. + Report from Arnold. + +2004-06-06 Karl Berry + + * makeinfo/index.c (index_add_arg): ensure all elements are always + initialized, including output_file, section, and section_name. + (cm_printindex): don't pass index->output_file to + add_html_block_elt_args if it is null. Also do + not pass spurious extra index_name argument. + + * makeinfo/makeinfo.c (add_char): don't call html_output_head if + only_macro_expansion (e.g., a macro call in the + Top menu). From: Yuri D'Elia , + 05 Jun 2004 21:11:00 +0200. + +2004-06-03 Karl Berry + + * info/session.c (info_menu_digit): use menu, rather than entry, to + avoid seg fault on "0" (the last item), + since menu has already been checked. + From: Malcolm Rowe , + 02 Jun 2004 21:32:37 +0100. + +2004-05-17 Karl Berry + + * util/gendocs.sh, gendocs_template: use package.format.tar.gz + consistently. Before, -, _, and . were all used. + +2004-05-16 Karl Berry + + * lib/Makefile.am (libtxi_a_SOURCES): include strcase.h. + From: "Gerrit P. Haase" , + 15 May 2004 21:50:52 +0200. + + * util/gendocs.sh: force HTML output name, otherwise Emacs fails + with its "@setfilename ../...". + +2004-05-04 Karl Berry + + * util/texi2dvi (TEX): don't use the value when it ends in + "latex"; TEX is also used by mpost. Report from + Yvon.Henel@wanadoo.fr. + +2004-04-29 Karl Berry + + * doc.texinfo.txi (Invoking makeinfo): mention --plaintext. + From Akim. + + * doc/texinfo.tex (\emptyusermacros): can use \asis. + (\identity): remove. + +2004-04-29 Stepan Kasal + + * doc/texinfo.tex (\commondummiesnofonts, \indexnofonts): In order + to correctly transform words like `Dvo\v{r}\'{a}k' to `Dvorak' + for index sorting, one has to define all accent control sequences + as @asis. (Current code would produce `Dvor{a}k'.) + +2004-04-29 Jan Nieuwenhuizen + + * makeinfo/makeinfo.c (remember_error): Try cm_bye not more than + twice. Fixes `Too many errors! Gave up.' looping. + +2004-04-26 Karl Berry + + * lib/system.h (STRCASEEQ, STRNCASEEQ): new #defines for + convenience. + * makeinfo/cmds.c (cm_strong): actually change the output to avoid a + spurious xref. Suggestion from Jan Nieuwenhuizen + , 26 Apr 2004 00:04:04 +0200, emacs-devel. + + * automake 1.8.4. + +2004-04-24 Karl Berry + + * doc/texinfo.tex (\emptyusermacros, \identity): new macros. + (\indexdummiesnofonts): call it. + This is to semi-support macro calls in the arg to @deffn. + Report from: Akim Demaille , 20 Apr 2004 17:48:28 +0200. + +2004-04-21 Karl Berry + + * configure.ac (gl_FUNC_MKSTEMP): rename from UTILS_FUNC_MKSTEMP, + per new gnulib code. + +2004-04-20 Karl Berry + + * makeinfo/tests/copying: force POSIX language setting. + +2004-04-19 Karl Berry + + * makeinfo/cmds.c (cm_code): use for commands other than + @code, so we get typewriter output; and add `...' + for @samp. + Report from: John Blevin , + 16 Apr 2004 11:40:01 -0400. + + * makeinfo/html.c (html_output_head) [CSS_FONT_ROMAN, + CSS_FONT_SMALL_CAPS]: prettify. + +2004-04-18 Karl Berry + + * doc/texinfo.tex (\Orb): define if undefined. + Report from Laurent Siebenmann. + + * util/dir-example: diff updates. + +2004-04-13 Karl Berry + + * doc/texinfo.tex: remove trailing blanks. suggestion from Jim. + +2004-04-12 Paul Eggert + + * doc/Makefile.am (info.1, infokey.1, install-info.1, + makeinfo.1, texi2dvi.1, texindex.1): Don't use $< in ordinary + rules; it's not portable. + * util/Makefile.am (texinfo.cat): Likewise. + +2004-04-12 Karl Berry + + * bootstrap: update from berlios. + +2004-04-11 Karl Berry + + * Version 4.7. + +2004-04-09 Karl Berry + + * makeinfo/makeinfo.c (execute_string): do not free the temporary copy + of input_filename until we're definitely done with + it. It is used in line_error, etc. + + * INSTALL: mention texinfo.tex install step. + + * util/Makefile.am (texinfo.cat): new name instead of just + `catalog'. rename files. + * util/Makefile.am (EXTRA_DIST): texinfo-cat.in now, not + catalog.in. + +2004-04-09 Alper Ersoy + + * makeinfo/insertion.c (begin_insertion): after @copying, do not + discard until a newline if we are looking at one. + (end_insertion): decrement input line number after @end copying. + +2004-04-08 Karl Berry + + * util/Makefile.am: doc fix, as automake.diff is no longer needed. + +2004-04-07 Karl Berry + + * pretest version 4.6.95. + + * doc/texinfo.tex (\dodonode): new macro to remove trailing comma. + (\donode): call it, after removing space-comma. + + * doc/texinfo.txi (indicateurl): new name for url. + (uref): url is now a synonym for uref. + * doc/texinfo.tex (\url, \indicateurl): implement. + * makeinfo/cmds.c (cm_indicate_url): rename from cm_url. + (command_table): make "url" a synonym for "uref". + * makeinfo/cmds.h (cm_indicate_url): declare it. + +2004-04-06 Karl Berry + + * makeinfo/sectioning.c (insert_and_underscore): use `...' quote + instead of "..." in error message. + * info/*.c: likewise. + +2004-04-07 Alper Ersoy + + * makeinfo/cmds.c (cm_colon): check if the character we are erasing + from the output belongs to an XML tag. + +2004-04-07 Alper Ersoy + + * makeinfo/insertion.c (cm_author): use author element in XML output + for attribution. + +2004-04-06 Alper Ersoy + + * makeinfo/makeinfo.c (convert_from_loaded_file): do not call + write_tag_table if the output filename is "-". + +2004-04-06 Alper Ersoy + + * makeinfo/insertion.c (end_insertion):
 blocks implicitly ends
+	the previous paragraph, so avoid 

after the end tag. + + * makeinfo/footnote.c (output_pending_notes): made Footnotes anchor + non translatable, and changed it to "texinfo-footnotes-in-document" to + lessen the chance of getting in the way of another Footnotes anchor. + +2004-04-04 Jim Meyering + + * info/nodes.c (info_load_file_internal): Don't free lowered_name + until *after* using fullpath, since they may be one and the same. + +2004-04-03 Karl Berry + + * doc/texinfo.txi (Image Syntax): had missing @'s in cookies. + + * makeinfo/cmds.c (cm_w): insert a comment at the end of @w, so that + @w{$}Log$ doesn't end up as Log. + Report from rms. + * doc/texinfo.txi (GNU Sample Texts, w): mention this. + +2004-04-02 Karl Berry + + * configure.ac: pretest version 4.6.94. + + * doc/texinfo.txi (Node Line Requirements): discuss whitespace. + + * doc/texinfo.tex (\node, \donode): remove trailing + spaces (before the first comma) in the @node line. + +2004-03-29 Karl Berry + + * util/install-info.c (menu_line_lessp, menu_line_equal): move to + before all uses. + +2004-03-27 Karl Berry + + * info/signals.c (initialize_info_signal_handler) [SA_NOCLDSTOP]: + use instead of HAVE_SIGACTION, since Solaris 2.7+ + with Sun CC don't have sa_handler, sa_flags, sa_mask. + + * info/session.c (search_string_index): remove unused variable. + * info/terminal.c (term_mo): remove unused variable. + * info/display.c (display_clear_display): remove unused variable + display_line. + * util/install-info.c (infilelen_sans_info): remove unused + variable. + + * doc/texinfo.txi: mistakenly had * name: node: in menu items instead + of * name: node. + + * util/install-info.c (menu_item_equal): must declare ret at beginning + of function. From Werner. + +2004-03-27 Jim Meyering + + * info/info-utils.c (info_parse_node): Don't read beyond end + of buffer when looking for ``(line ...)'' in a menu item. + +2004-03-27 Andreas Schwab + + * util/install-info.c (menu_item_equal): Don't scan past + term_char. + +2004-03-26 Karl Berry + + * pretest version 4.6.93. + + * util/install-info.c (menu_item_equal): compare basenames, + so lilypond/ subdir will match. Bug report from Werner, + 21 Mar 2004 08:31:10 +0100. + + * configure.ac (AC_CHECK_DECLS): skip strncasecmp again. + * lib/system.h (strcase.h): change conditional to + !HAVE_STRNCASECMP || !HAVE_STRCASECMP. Extra + !HAVE_DECL seems superfluous. + + * lib/system.h: include last, following Autoconf's + ac_includes_default. + +2004-03-25 Karl Berry + + All these changes are because strncasecmp is only declared in + on IBM AIX 4.2. (Report from Nelson Beebe.) + + * configure.ac (AC_CHECK_DECLS): add memchr; no need to check for + strcasecmp.(gl_STRCASE): call this ... + (AC_REPLACE_FUNCS): ... replacing checks for + strcasecmp and strncasecmp here. + * lib/system.h (memchr) [!HAVE_DECL_MEMCHR]: add conditional + declaration. + (strcase.h) [!HAVE_DECL_STRNCASE]: add conditional include. + (strings.h) [HAVE_STRINGS_H]: include if + available, even if is also available. + * info/session.c (strncasecmp) [M_XENIX]: remove this conditional + declaration, since we haven't been testing for M_XENIX in many + years. + * m4/Makefile.am (EXTRA_DIST): add strcase.m4. + * util/srclist.txt (lib/strcase.h, m4/strcase.m4): add, updating + from gnulib. + +2004-03-24 Karl Berry + + * makeinfo/index.c: + * makeinfo/float.c: avoid use of snprintf, which is not available on + all platforms. Bug report by Nelson and Vin Shelton (22mar03). + + * automake 1.8.3. + +2004-03-23 Karl Berry + + * doc/info-stnd.texi (Searching Commands): typo from jesper. + +2004-03-21 Karl Berry + + * doc/texinfo.tex (\indexnofonts): \definedummyletter needs to + define the control letters to be empty, without + taking any argument; most control letters, such as + @:, don't take arguments, and it won't hurt to + just always ignore them for index sorting. + Report from Arnold. + + * info/doc.h (InfoFunction): cast NULL to VFunction *, to + prevent pgcc from complaining. From Nelson. + +2004-03-20 Karl Berry + + * doc/texinfo.txi (Structuring Command Types): be even more explicit + about @unnumbered vs. @heading. + + * makeinfo/html.c (insert_html_tag_with_attributes): use the same + parameter names (start_or_end and tag) in both stdc and !stdc + cases. Report from Nelson. + + * info/m-x.c (info_execute_command): don't dereference + InfoFunction(command) as a function call if it's NULL. Report + from Nelson, pgcc-5.1-3 complains. + +2004-03-19 Karl Berry + + * info/signals.h [!SA_NOCLDSTOP]: borrow test from coreutils' + sort.c, to avoid using sigset_t when it's not + defined (apparently). + + * makeinfo/html.c (escape_string): escape ", too, for @image's + alttext among others. + * makeinfo/html.h: doc fix. + * doc/texinfo.txi (Image Syntax): making empty alt text, do + escaping. + + * util/dir-example: reorder. + + * doc/texinfo.txi (title subtitle author): using them outside + @titlepage is an error, they're not actually "ignored". + * makeinfo/insertion.c (cm_author): one mdash suffices. + +2004-03-19 Jim Meyering + + * makeinfo/makeinfo.c (add_char): Use memmove, rather than strncpy, + since source and destination strings overlap. + + * makeinfo/float.c (add_new_float): Avoid buffer overrun when + appending `.' to a chapter number. + +2004-03-18 Karl Berry + + * pretest version 4.6.92. + +2004-03-18 Andreas Schwab + + * lib/xmalloc.c: Include "system.h" instead of declaring malloc + and realloc ourselves. + (xmalloc): Change type of size parameter to size_t. + (xrealloc): Likewise. + + * lib/system.h (xmalloc, xrealloc): Change type of size parameter + to size_t. + +2004-03-18 Karl Berry + + * makeinfo/xref.c (cm_xref): ignore any directory part or extension + in html case, warn if nothing left. + * doc/texinfo.txi (HTML Xref Link Basics): ignore directory part in + @xref cmd. + + * lib/getopt.h (__GNUC_PREREQ) [! __GNUC_PREREQ]: change + conditional to the actual symbol, instead of just + __GNUC, else --disable-nls compilation fails under + SunOS 5.8 with gcc 3.2.3 (at least). + Report from Vin Shelton, 15 Mar 2004 08:51:14 -0500. + + * util/texindex.c: add some const declarations. + * util/install-info.c: add some const declarations. + (by no means all) + + * doc/texinfo.txi (HTML Xref *): new nodes. + +2004-03-15 Karl Berry + + * makeinfo/xref.c (cm_xref): need ../ in reference to foreign html + manual, if splitting. + +2004-03-14 Jim Meyering + + * makeinfo/index.c (insert_index_output_line_no): Ensure that `i' + is larger than zero before (not after) using `i-1' as an array index. + + * makeinfo/cmds.c (cm_acronym): Don't write description[-1] + when description is the empty string. + + * makeinfo/makeinfo.c (insert): Avoid buffer under-run when + output_paragraph_offset is zero. + (canon_white): Rewrite not to use strcpy (was used with + overlapping source and destination) + +2004-03-14 Andreas Schwab + + * info/session.c: Fix buffer overflows. + +2004-03-14 Alper Ersoy + + * makeinfo/xref.c (cm_xref): print the fifth arg (or fourth if it's + not available), in parens for the visible text of the HTML link. + +2004-03-14 Alper Ersoy + + * makeinfo/tests/node-expand.txi: + * makeinfo/tests/node-whitespace.txi: added titles to @top. + +2004-03-14 Alper Ersoy + + * makeinfo/sectioning.c (sectioning_underscore): check if title is + pointing to NULL before calling strlen (happens when there is no + @settitle before @top.) + +2004-03-14 Alper Ersoy + + * makeinfo/sectioning.c (sectioning_underscore): warn if both @top and + @settitle are empty. + (sectioning_html, insert_and_underscore): use @settitle argument if + @top is empty. + (insert_and_underscore): removed with_char argument from function + declaration. + + * makeinfo/sectioning.h: insert_and_underscore proto update. + +2004-03-13 Karl Berry + + * pretest version 4.6.91. + + * info/*.[ch]: copyright dates, and final ugly casts. + + * doc/texinfo.txi (Generating HTML): make its own chapter, since we + have lots to say about xrefs now. + + * doc/texinfo.txi (Refilling Paragraphs): @ignore this, just + describe @refill better in the summary. + (Obtaining TeX): make a section of Hardcopy, + instead of its own appendix. + (Command Syntax): subnode of @@-Command List. + This reduction in the number of appendices will hopefully make the + manual less overwhelming. + +2004-03-13 Alper Ersoy + + * info/dir.c: + * info/display.c: + * info/display.h: + * info/doc.h: + * info/dribble.c: + * info/dribble.h: + * info/echo-area.c: + * info/echo-area.h: + * info/filesys.c: + * info/filesys.h: + * info/footnotes.c: + * info/footnotes.h: + * info/gc.c: + * info/gc.h: + * info/indices.c: + * info/indices.h: + * info/info-utils.c: + * info/info-utils.h: + * info/info.c: + * info/info.h: + * info/infodoc.c: + * info/infokey.c: + * info/infomap.c: + * info/infomap.h: + * info/m-x.c: + * info/makedoc.c: + * info/man.c: + * info/man.h: + * info/nodemenu.c: + * info/nodes.c: + * info/nodes.h: + * info/search.c: + * info/search.h: + * info/session.c: + * info/session.h: + * info/signals.c: + * info/terminal.c: + * info/terminal.h: + * info/tilde.c: + * info/tilde.h: + * info/variables.c: + * info/variables.h: + * info/window.c: + * info/window.h: + * lib/system.h: protoized. + +2004-03-12 Karl Berry + + * makeinfo/sectioning.c (sectioning_underscore): don't segfault when + generating xml if @top arg was empty. Report from Pat. + +2004-03-11 Karl Berry + + * doc/texinfo.tex (\pdfoutput): check also for \relax and 0, not + just \undefined, in case pdftex is being run in dvi mode. + Reported by Thomas Esser. + + * lib/Makefile.am (libtxi_a_SOURCES): add getopt_int.h. + +2004-03-11 Alper Ersoy + + * makeinfo/html.c (add_escaped_anchor_name): removed unnecessary + ampersand check. + (fix_filename): removed size calculation and memory reallocation for + filename as it is already PATH_MAX bytes. Added a check so we don't + cross PATH_MAX boundary while expanding not-isalnum to hex values. + + * makeinfo/toc.c (toc_add_entry): generate links following html cross + refs proposal from Patrice Dumas. + +2004-03-11 Alper Ersoy + + * makeinfo/makeinfo.h: changed URL_SAFE_CHAR to isalnum. + + * makeinfo/html.c (add_escaped_anchor_name, add_anchor_name) + (fix_filename): generate links following html cross refs proposal + from Patrice Dumas. + + * makeinfo/xref.c (cm_xref): tweaked references to external manuals, + to better follow html cross refs proposal. + +2004-03-08 Karl Berry + + * pretest version 4.6.90. + + * makeinfo/Makefile.am (makeinfo_SOURCES): include multi.h. + * makeinfo/cmds.c (cm_verb): avoid spurious warning. + +2004-03-06 Alper Ersoy + + * makeinfo/lang.c (cm_special_char): call add_encoded_char for Info + output too. + +2004-03-01 Alper Ersoy + + * makeinfo/cmds.c (cm_minus): use minus entity for HTML too. + +2004-03-01 Alper Ersoy + + * makeinfo/makeinfo.c (reader_loop): disable multiple dashes and + quotes entity substitution for HTML and XML, if escape_html is not + true. + +2004-03-01 Alper Ersoy + + * util/texinfo.dtd: added math element and updated footnote. + +2004-03-01 Alper Ersoy + + * makeinfo/xml.c (xml_insert_footnote): start if not already + started. + +2004-03-01 Alper Ersoy + + * makeinfo/index.c (index_add_arg): make entry node name 'Footnotes' + if the output format is non-split HTML, and we are handling footnotes. + + * makeinfo/footnote.c (output_pending_notes): added anchor at the + start of footnotes block for the non-split HTML output, so @printindex + can refer to that point as the nodename. + +2004-03-01 Alper Ersoy + + * makeinfo/defun.c (defun_internal): use var element for HTML, instead + of i. + +2004-03-01 Alper Ersoy + + * makeinfo/makeinfo.c (cm_image): reset filling_enable to its previous + state after getting the cookie done. + +2004-03-01 Alper Ersoy + + * makeinfo/makeinfo.c (cm_image): insert magic cookie only if there's + a bitmap file (if all we have is a text file, skip the cookie.) + +2004-02-29 Alper Ersoy + + * makeinfo/node.c (cm_node): moved node order handling to ... + (remember_node): here. + +2004-02-29 Alper Ersoy + + * makeinfo/multi.c (draw_horizontal_separator): insert a space before + the newline so it looks different than @subsection's. + +2004-02-29 Alper Ersoy + + * makeinfo/makeinfo.c (insert): do not strip trailing whitespace in + multitables. + +2004-02-29 Alper Ersoy + + * makeinfo/makeinfo.c (execute_string): removed XML tag balance + checks. + +2004-02-28 Alper Ersoy + + * makeinfo/insertion.c (begin_insertion, end_insertion): for rawxml, + rawhtml and rawdocbook blocks, change the state of escaping depending + on raw_output_block in order to avoid problems when these blocks are + used within a @rmacro. + +2004-02-28 Alper Ersoy + + * makeinfo/insertion.c (end_insertion): for quotation use + default_indentation_increment. + +2004-02-28 Alper Ersoy + + * makeinfo/makeinfo.c (info_trailer): call current_document_encoding + here too. + +2004-02-28 Alper Ersoy + + * makeinfo/lang.h: new variable unknown_encoding. + + * makeinfo/lang.c (cm_documentencoding): save and use the encoding + argument even if it's unknown. + + * makeingo/html.c (html_output_head): call current_document_encoding + instead of checking document_encoding_code. + +2004-02-28 Alper Ersoy + + * makeinfo/float.c (cm_listoffloats): simplified entry generation. + +2004-02-28 Alper Ersoy + + * makeinfo/files.h: new members node_order and index_order in + DELAYED_WRITE struct. + + * makeinfo/files.c (register_delayed_write): save current node and + index order. + (handle_delayed_writes): update tag_table positions and index line + numbers by comparing orders, not line numbers they are defined. + + * makeinfo/index.c: made index_counter not static and ... + * makeinfo/index.h: extern. + + * makeinfo/node.h: new member order in TAG_ENTRY struct. + + * makeinfo/node.c (cm_node): keep the order of the node entry. + +2004-02-27 Karl Berry + + * util/gendocs.sh: generate ASCII in static file, not stdout, so + toc/index can get written. + + * util/gendocs_template: XHTML version from + http://www.gnu.org/boilerplate.html, via John Darrington + , 9 Jan 2004 07:24:27 +0800. + +2004-02-27 Jan Nieuwenhuizen + + * doc/texinfo.txi (Image Syntax): Update. + + * makeinfo/makeinfo.c (cm_image): Only insert a period between the + image's NAME and EXTENSION as a second guess, to retain backward + compatibility. + +2004-02-27 Alper Ersoy + + * makeinfo/xml.c (xml_insert_element_with_attribute): if we are + closing either TABLEITEM, ITEM or DEFINITIONITEM during string + execution, update relevant state. + +2004-02-27 Alper Ersoy + + * makeinfo/makeinfo.c (execute_string): moved state updates below + insertion and element stack checks, so any code executed in those + checks will be aware of executing_string. + +2004-02-27 Alper Ersoy + + * makeinfo/xml.c (xml_insert_docbook_image): for Docbook, if paragraph + is open, use inlinemediaobject instead of mediaobject in an + informalfigure. + (xml_insert_element_with_attribute): indent after informalfigure. + +2004-02-27 Alper Ersoy + + * makeinfo/xml.c: + * makeinfo/xml.h: new element INLINEIMAGE. + + * makeinfo/makeinfo.c (cm_image): for XML, use INLINEIMAGE or IMAGE + depending on paragraph state. + +2004-02-27 Alper Ersoy + + * makeinfo/makeinfo.c (cm_image): for Info, enclose text image in + brackets if @image is used inline (ie. paragraph is open). + +2004-02-27 Alper Ersoy + + * makeinfo/cmds.c (cm_noindent_cmd, cm_indent): start paragraph for + Info too. + +2004-02-27 Alper Ersoy + + * makeinfo/makeinfo.c (cm_image): for HTML, if paragraph is not open, + enclose image in a
block. + +2004-02-27 Alper Ersoy + + * makeinfo/cmds.c (cm_noindent_cmd, cm_indent): insert

for HTML. + +2004-02-26 Alper Ersoy + + * util/texinfo.dtd: moved verbatim to █. + +2004-02-25 Stepan Kasal + + A first step towards general cleanup of sectioning macros: + * doc/texinfo.tex (\genhead): A generalized version of ... + (\numhead, \apphead, unnmhead): ... these, which uses ... + (\chapheadtype, \unmlevel, \maxseclevel): ... these "variables". + +2004-02-25 Karl Berry + + * makeinfo/index.c (cm_printindex): insert cookie in Info output + for benefit of Info readers. + +2004-02-26 Alper Ersoy + + * makeinfo/insertion.c (end_insertion): removed obsolete Docbook + indentation work-around. + +2004-02-25 Alper Ersoy + + * makeinfo/insertion.c (cm_author): new function. + (cm_titlepage_cmds): removed @author parts. + + * makeinfo/cmds.c: made @author call cm_author. + +2004-02-24 Karl Berry + + * doc/texinfo.txi: avoid duplicate index entries within the same + node (from Alper): syncodeindex, lines 9627 and 9633 TEXINPUTS, + lines 14157 and 14202 texinfo-format-buffer 15131 and 15159 + texinfo-format-region 15130 and 15149 + +2004-02-24 Alper Ersoy + + * makeinfo/makeinfo.h: new variable example_indentation_increment. + + * makeinfo/cmds.c (set_default_indentation_increment): renamed to + set_example_indentation_increment. + (cm_exampleindent): call set_example_indentation_increment. + + * makeinfo/insertion.c (begin_insertion, end_insertion): @example, + @display and the like now rely on example_indentation_increment. + +2004-02-24 Alper Ersoy + + * makeinfo/insertion.c (begin_insertion, end_insertion): @float should + not play with indentation. + +2004-02-24 Alper Ersoy + + * makeinfo/float.c (cm_listoffloats): check if we are crossing the + caption boundaries looking for a space to break at. + +2004-02-24 Karl Berry + + * makeinfo/makeinfo.c: TEXINFO_OUTPUT -> TEXINFO_OUTPUT_FORMAT, + after discussion with tar maintainer. + +2004-02-20 Stepan Kasal + + * doc/texinfo.tex (\infochapter, \infosection, etc.): these stubs + of sectioning commands nuked. + +2004-02-24 Stepan Kasal + + * doc/texinfo.tex (\centerchap): Fixed to work again, + don't open group. + (\centerparameters): New macro. + (\centerchfplain): Nuked. + + The following continues with prosecution of @setchapterstyle{open}: + * doc/texinfo.tex (\chfplain): renamed to \chapmacro. + (\CHAPFplain): Nuked. + (\setchapterstyle): Moved next to its deprecated friends. + +2004-02-24 Karl Berry + + * doc/texinfo.tex (\dofloat): start a paragraph. + +2004-02-24 Alper Ersoy + + * makeinfo/insertion.c (cm_caption): check if the innermost + environment is @float. + +2004-02-24 Alper Ersoy + + * info/session.c (info_menu_digit): if the menu entry has a line + number, go to that line. + +2004-02-24 Alper Ersoy + + * info/info.c (main): make sure dir file is not listed for option + --where. + +2004-02-24 Alper Ersoy + + * makeinfo/xml.c (xml_insert_element_with_attribute, xml_add_char) + (xml_begin_table, xml_end_table, xml_begin_table_item) + (xml_continue_table_item): separated ITEM and TABLEITEM states to + handle @table environments better. + +2004-02-24 Alper Ersoy + + * util/texinfo.dtd: added float and friends, updated tableitem and + Inline.reference. + +2004-02-23 Karl Berry + + * doc/texinfo.txi (Structuring Command Types): slightly more info + about headings. Fix other references, too. + + * Makefile.am (EXTRA_DIST): explicitly list every file in djgpp, + so that the CVS directory is not included in the dist.tar.gz. + +2004-02-23 Arnold D. Robbins + + * makeinfo/cmds.c (cm_code): For @samp, using single quotes instead of + double quotes, to match TeX output more closely. + +2004-02-23 Alper Ersoy + + * makeinfo/index.h: new output_file and entry_number members in + index_elt struct. + + * makeinfo/index.c (index_add_arg, cm_printindex): rewrote hyperlink + generation for HTML to avoid duplicate anchors, and to work with + splitting enabled. + +2004-02-20 Alper Ersoy + + * makeinfo/float.c (cm_listoffloats): create HTML hyperlinks with + add_word instead of using @ref to avoid problems with commas in + captions. + +2004-02-20 Alper Ersoy + + * makeinfo/node.c (cm_node): remove whitespace before the node + separator sequence. + +2004-02-20 Alper Ersoy + + * makeinfo/sectioning.c (handle_enum_increment): do not increment + counters for ENUM_SECT_NO heading commands (ie. @unnumbered, + @majorheading, etc.) + +2004-02-20 Alper Ersoy + + * makeinfo/multi.c (multitable_item): unset hsep if item command is + not @headitem. + +2004-02-19 Karl Berry + + * doc/texinfo.tex: More hyphenation exceptions. + (\author, \quotation): implement @author inside + @quotation, for attribution purposes. + +2004-02-19 Alper Ersoy + + * makeinfo/cmds.c (cm_exampleindent): fixed paragraph handling after + @exampleindent lines. + +2004-02-19 Alper Ersoy + + * makeinfo/index.c (index_add_arg): create an anchor where @index is + used in HTML documents. + (cm_printindex): make index text an hyperlink to the created anchor. + +2004-02-19 Alper Ersoy + + * makeinfo/insertion.c (begin_insertion): skip empty lines following + @table, @ftable, @vtable and @itemize lines. + +2004-02-18 Karl Berry + + * lib/substring.c, + * lib/xexit.c, + * lib/xmalloc.c, + * lib/system.h: ANSI-fy. (Other lib files come from gnulib.) + + * doc/texinfo.txi (Definition Commands): describe the argument/@var + situation more accurately. + + * doc/texinfo.txi (Definition Commands): explicitly document the + implicit index entry creation in all cases. + + * doc/texinfo.txi (Printing Indices & Menus, Indices, Predefined + Indices): remove redundancies, make different + purposes clear, etc. + +2004-02-18 Alper Ersoy + + * makeinfo/xml.h: + * makeinfo/xml.c (xml_get_assoc_for_id, xml_associate_title_with_id): + removed these functions. + + * makeinfo/xref.c (cm_xref): do not call xml_get_assoc_for_id. + + * makeinfo/sectioning.c (sectioning_underscore): added xreflabel + attribute to @unnumbered for Docbook. + +2004-02-18 Alper Ersoy + + * makeinfo/xref.c (cm_xref): for Docbook, use lowercase ``see'' when + printing index. + +2004-02-18 Alper Ersoy + + * makeinfo/xml.c (xml_insert_indexentry): removed ``see'' from index + entries as cm_xref takes care of it. + +2004-02-17 Karl Berry + + * doc/info.texi (Help-Int): mention the new line number feature. + * doc/texinfo.txi (Indices): plural correction. + * doc/info-stnd.texi (Invoking Info): matche typo. + (Searching Commands): grammar. + * info/session.c (info_menu_or_ref_item): need to subtract 1 from + the actual line number to get to the right place, + don't really know why. + + * makeinfo/makeinfo.c, info/info.c, util/texindex.c, + utils/install-info.c, util/texi2dvi: update copyright year to + 2004, and do not mark copyright line for translation, since + international law says to always use the English word "copyright". + +2004-02-17 Alper Ersoy + + * makeinfo/insertion.c (end_insertion): use add_html_block_elt instead + of add_word for

ending @example and the like. + * makeinfo/float.c (cm_listoffloats): use add_html_block_elt for
  • . + +2004-02-17 Alper Ersoy + + * makeinfo/insertion.c (begin_insertion): do not expand @copying for + HTML and Info too. + (cm_insert_copying): expand copying_text for all formats here. + + * makeinfo/html.c (html_output_head): use text_expansion for copying + text. + +2004-02-17 Karl Berry + + * doc/texinfo.txi (float): mention @multitable and @image + as typical contents. From Arnold. + +2004-02-17 Alper Ersoy + + * makeinfo/xml.c (xml_insert_element_with_attribute): removed check + to see if current element contains para before calling xml_start_para, + as that check is performed in xml_start_para too. + +2004-02-17 Alper Ersoy + + * makeinfo/insertion.c (end_insertion): indent float caption. + +2004-02-17 Alper Ersoy + + * makeinfo/insertion.c (begin_insertion): for XML and Docbook, do not + expand @copying text. Instead of calling @anchor, use for XML. + (cm_copying): removed ugly copying_text manipulation for Docbook. + Warn if there is no @copying before @insertcopying. + + * makeinfo/xml.c: made floats contain para. + (xml_start_para): check if current element can contain para. + (xml_add_char): removed @copying checks. + +2004-02-17 Alper Ersoy + + * makeinfo/insertion.c (end_insertion): if the output format is XML, + do not call close_insertion_paragraph after @end menu. + +2004-02-17 Alper Ersoy + + * makeinfo/xml.c (xml_insert_element_with_attribute): indentation + fixes for @multitable. + +2004-02-17 Alper Ersoy + + * makeinfo/multi.c (do_multitable): remove trailing newline when the + output format is Docbook or XML, as output_paragraph becomes unusable + later for xml_indent during select_output_environment. + +2004-02-16 Alper Ersoy + + * makeinfo/cmds.c (cm_bye): do not call flush_output as text appended + by convert_from_loaded_file may need to play with output_paragraph. + +2004-02-16 Alper Ersoy + + * makeinfo/xml.c (xml_end_document): insert newline after + only if indentation is disabled (otherwise xml_indent takes care of + the newline.) + (xml_insert_indexentry): disable warnings when executing implicit + @xref commands for Docbook, otherwise makeinfo will warn about + missing punctuation. + +2004-02-16 Alper Ersoy + + * makeinfo/insertion.c (begin_insertion): eat one newline after + @xml/@docbook blocks for proper indentation. + +2004-02-16 Alper Ersoy + + * makeinfo/cmds.c (cm_center): fixed line wrapping after the @center + command. + +2004-02-15 Alper Ersoy + + * makeinfo/xml.c (xml_begin_document): disabled warnings around the + implicit register_delayed_write("@documentencoding") call. + +2004-02-15 Alper Ersoy + + * makeinfo/insertion.c (begin_insertion, end_insertion): when handling + @xml, @html and @docbook blocks, do not touch para elements, and keep + whitespace as-is. + +2004-02-15 Alper Ersoy + + * makeinfo/xml.h: made xml_keep_space extern. + +2004-02-15 Alper Ersoy + + * makeinfo/cmds.c (cm_noindent_cmd, cm_indent): implicitly start + para element for Docbook and XML. + +2004-02-15 Karl Berry + + * doc/texinfo.tex (\hyphenation): add more hyphenation exceptions, + gleaned from the log in TUGboat. + * doc/info-stnd.texi: document new option --where. + * info/info.c (main): in print_where_p case, ensure we don't try + to print NULL. + +2004-02-14 Karl Berry + + * doc/texinfo.tex (\addtokens): had two identical definitions, + remove one. + (\maketoks): no space token after |ENDTOKS|, + although I guess it hasn't mattered. + (\entry): make clear what is the argument to + \pdfgettoks and what is output. + (\appendtomacro): use our own token registers, + for safety. + (\listoffloatsdoentry): fully expand the page + number, and don't expand the lof text. + +2004-02-14 Alper Ersoy + + * makeinfo/cmds.c (cm_strong): + * makeinfo/xml.c (xml_begin_index): cast output_paragraph to char, to + avoid warnings with -pedantic. + +2004-02-13 Alper Ersoy + + * makeinfo/cmds.c: + * makeinfo/cmds.h: + * makeinfo/defun.c: + * makeinfo/defun.h: + * makeinfo/files.c: + * makeinfo/files.h: + * makeinfo/float.c: + * makeinfo/float.h: + * makeinfo/footnote.c: + * makeinfo/footnote.h: + * makeinfo/html.c: + * makeinfo/html.h: + * makeinfo/index.c: + * makeinfo/index.h: + * makeinfo/insertion.c: + * makeinfo/insertion.h: + * makeinfo/lang.c: + * makeinfo/lang.h: + * makeinfo/macro.c: + * makeinfo/macro.h: + * makeinfo/makeinfo.c: + * makeinfo/makeinfo.h: + * makeinfo/multi.c: + * makeinfo/node.c: + * makeinfo/node.h: + * makeinfo/sectioning.c: + * makeinfo/sectioning.h: + * makeinfo/toc.c: + * makeinfo/toc.h: + * makeinfo/xml.c: + * makeinfo/xml.h: + * makeinfo/xref.c: + * makeinfo/xref.h: protoized functions. + +2004-02-13 Alper Ersoy + + * makeinfo/multi.h: new file. + +2004-02-13 Karl Berry + + * doc/texinfo.tex (\caption): make \long. + * doc/texinfo.txi (Nodes): mention that changing node names is bad. + (caption shortcaption, listoffloats): write these, finishing the + first cut at @float documentation. + +2004-02-12 Alper Ersoy + + * makeinfo/cmds.c (cm_verb): end @verb only if delimiter is followed + by a closing brace. + +2004-02-12 Alper Ersoy + + * makeinfo/lang.c (cm_accent_generic): warn if accented character is + whitespace. + +2004-02-12 Alper Ersoy + + * makeinfo/insertionc. (end_insertion): decrement current_indent + only if the output format is Info. + +2004-02-12 Alper Ersoy + + * makeinfo/insertion.c (end_insertion): adjusted caption styles for + label and type conditions. + (begin_insertion, end_insertion): indent first paragraphs inside + @float, even if first paragraph in a chapter. Increment/decrement + current_indent. + +2004-02-12 Alper Ersoy + + * makeinfo/tests/defxcond: look for `--' instead of `-'. + +2004-02-12 Karl Berry + + * makeinfo/float.c (cm_listoffloats): change warning wording. + +2004-02-11 Karl Berry + + * doc/texinfo.tex (\dofloat): initialize caption macros here, not + globally. + (\Efloat): rewrite for more consistent caption + line, matching documentation. + (\appendtomacro): new macro. + (\currentparindent): this \newdimen was not used; removed. + * doc/texinfo.txi (float): continue documenting. + + * makeinfo/files.c (register_delayed_write): change wording of msgs. + +2004-02-10 Karl Berry + + * makeinfo/defun.c: --- (which gets reduced to --) + instead of -- (which gets reduced to -). + Report from Akim Demaille , 09 Feb 2004 18:06:29 +0100. + +2004-02-09 Karl Berry + + * doc/texinfo.tex (\pickupwholefraction): allow the fraction to be + an integer without a decimal point, like `1'. Report from: Dumas + Patrice , 9 Feb 2004 16:46:30 +0100. + * makeinfo/multi.c (setup_multitable_parameters): compute width + and pass it, for clarity. + +2004-02-07 Alper Ersoy + + * makeinfo/insertion.c (cm_insert_copying): insert double newlines + instead of one in non XML outputs. + +2004-02-07 Alper Ersoy + + * makeinfo/cmds.c (cm_code): do not decrement in_fixed_width_font as + it gets decremented elsewhere. + +2004-02-07 Alper Ersoy + + * makeinfo/makeinfo.c (next_nonwhitespace_character): also check + global input_text since filestack does not contain it. + +2004-02-07 Alper Ersoy + + * makeinfo/makeinfo.c (next_nonwhitespace_character): go through the + whole filestack looking for the next character. + +2004-02-06 Karl Berry + + * doc/texinfo.tex (\indexnofonts): define \bullet .. \result, so + they can be used in @?index commands. + Report from: Akim Demaille , 06 Feb 2004 13:34:15 +0100. + +2004-02-05 Karl Berry + + * makeinfo/xref.c (add_xref_punctuation): if we insert anything, + make it a period. + (cm_xref): include command name in error message. + * doc/texinfo.txi (ref): mention generating a period, if needed. + Too many complaints when we made a warning for @ref not followed + by period or comma. + +2004-02-05 Alper Ersoy + + * info/info-utils.c (info_parse_node): look for ``(line '' instead of + skipping any non-digit characters. + +2004-02-05 Alper Ersoy + + * makeinfo/index.c (insert_index_output_line_no): made ``(line NNN)'' not + translatable for Info output. + +2004-02-03 Alper Ersoy + + * makeinfo/makeinfo.c (flush_output): increment node_line_number too. + + * makeinfo/makeinfo.h: new variable node_line_number to hold the last + output line number the current node. + + * makeinfo/nodes.c (cm_node): reset node_line_number just before the + node start cookie. + + * makeinfo/files.h: new node member in DELAYED_WRITE struct. + * makeinfo/files.c (register_delayed_write): save current node name if + there's one. + (handle_delayed_writes): adjust line numbers in indices only if the + output is plaintext, or the index entry appears in the changed node. + + * makeinfo/index.c (index_add_arg, cm_printindex): use + node_line_number instead of output_line_number if the output is an + Info file. + +2004-02-03 Alper Ersoy + + * info/info-utils.h: new line_number member in REFERENCE struct. + + * info/info-utils.c (info_parse_node): parse (line ...) strings + from menu items. + (info_references_internal): save parsed line number in the entry. + + * info/session.c (info_menu_of_ref_item): if selected entry has a line + number associated with it, jump to that line after updating window. + +2004-02-02 Alper Ersoy + + * makeinfo/xml.c (add_xref_punctuation): new function that inserts + necessary punctuation after @ref and @pxref commands. + (cm_xref): call add_xref_punctuation when multiple parameters are + given, make use of next_nonwhitespace_character function in the END + case. + (cm_ref): do not call cm_xref in the END case. + +2004-02-02 Alper Ersoy + + * makeinfo/makeinfo.c (next_nonwhitespace_character): new function. + +2004-02-02 Alper Ersoy + + * makeinfo/cmds.c (cm_code): call xml_start_para instead of tweaking + in_fixed_width_font, and use entities rather than quotes. + +2004-02-02 Arnold D. Robbins + + * makeinfo/cmds.c (cm_TeX, cm_LaTeX): Add docbook support. + (cm_code): Add opening and closing single quotes for @samp in the + Docbook output. + * makeinfo/xml.c (xml_begin_document): Add `tex' and `latex' entities. + * makeinfo/xref.c (cm_xref): Add `See' and `see' strings for docbook + and xml. + +2004-01-31 Alper Ersoy + + * makeinfo/makeinfo.c (main): fixed ``--option: makeinfo'' messages. + +2004-01-31 Alper Ersoy + + * makeinfo/cmds.c (cm_TeX, cm_LaTeX): really ignore the arguments as + the warning suggests. + +2004-01-31 Alper Ersoy + + * makeinfo/cmds.c (cm_TeX, cm_LaTeX): warn if there are any arguments. + +2004-01-31 Alper Ersoy + + * makeinfo/files.c (pop_path_from_include_path): do not mock with + include_files_path address directly, as it confuses realloc. + +2004-01-31 Alper Ersoy + + * makeinfo/makeinfo.c (main, usage): new --output-indent option. + +2004-01-31 Alper Ersoy + + * makeinfo/xml.c (xml_add_char): break long lines in paragraphs + when the output format is Docbook. + +2004-01-31 Alper Ersoy + + * makeinfo/files.c (prepend_to_include_path, append_to_include_path) + (pop_path_from_include_path): new functions to manipulate + include_files_path. + + * makeinfo/makeinfo.c (convert_from_file): prepend the loaded file's + path to include_files_path in order to make relative include files to + be found, then remove afterwards. + (main): make use of new functions for -I and -P options. + +2004-01-30 Alper Ersoy + + * util/texinfo.dtd: added exdent element. + +2004-01-29 Alper Ersoy + + * makeinfo/makeinfo.c (convert_from_loaded_file): call + xml_begin_document after opening the output stream for writing. + + * makeinfo/files.c (register_delayed_write): use delayed_command + instead of command in messages as it may differ from the actual + command name. Check the usability of current_output_filename. + +2004-01-28 Karl Berry + + * doc/texinfo.txi (HTML Splitting): describe when two nodes are + written to one output file. + + * doc/texinfo.tex (\TeX): \edef using original \TeX definition. + +2004-01-28 Alper Ersoy + + * makeinfo/defun.c (process_defun_args, defun_internal): + * makeinfo/insertion.c (begin_insertion, end_insertion): execute XML + only blocks for Docbook also. + + * makeinfo/xml.c: added Docbook elements for definition commands. + (xml_begin_def_term): for Docbook, generate an Info-like @defun line. + (xml_insert_element_with_attribute): do not indent DEFINITION and + DEFINITIONTERM when the output is Docbook. + +2004-01-25 Alper Ersoy + + * makeinfo/xml.c: changed majorheading and the like with bridgehead + for Docbook. + + * makeinfo/sectioning.c (sectioning_underscore): do not start sections + with @majorheading and the like, only insert title. + +2004-01-25 Alper Ersoy + + * makeinfo/xml.c: + * makeinfo/xml.h: new element EXDENT. + + * makeinfo/cmds.c (cm_comment): save the paragraph state. + (cm_exdent): use EXDENT element for XML, LINEANNOTATION for Docbook. + + * makeinfo/html.c (html_output_head): + * makeinfo/xml.c (xml_begin_document): erase output_paragraph. + + * makeinfo/insertion.c (begin_insertion): canonize whitespace around + copying text. + (cm_insert_copying): comment fixes. Do not append newline if the + output is Docbook. + + * makeinfo/makeinfo.c (close_paragraph): return if Docbook too. + + * makeinfo/sectioning.c (sectioning_underscore): removed newline from + the end of titles. + + * makeinfo/lang.c (cm_documentencoding): insert encoding attribute + into XML and Docbook prologs when handling delayed writes. + + * makeinfo/xml.c (xml_begin_document): register a delayed write for + @documentencoding when writing the prolog. + (xml_end_para): removed docbook checks. + (xml_insert_element_with_attribute): skip indentation if + xml_keep_space is true, indent after table element. When the output + is Docbook, do not insert xml:space attribute, and do not remove from + the end of group element and keep_space blocks. + (xml_add_char): join lines in a paragraph for Docbook too. + +2004-01-24 Alper Ersoy + + * makeinfo/multi.c (out_char): simple use add_char for XML and Docbook + outputs too. + + * makeinfo/makeinfo.c (close_paragraph): just return when the output + format is XML. + + * makeinfo/makeinfo.h: new variable xml_indendation_increment. + + * makeinfo/cmds.c (cm_comment): insert a newline before the comment, + if there is not already one. + (cm_noindent_cmd): skip whitespace after the command. + + * makeinfo/xml.c: + * makeinfo/xml.h: new element DETAILMENU. + + * makeinfo/xml.c: menuentry and menucomment should not contain para. + (xml_indent, xml_indent_end_para): use xml_indentation_increment + value, and indent only if it is a positive number. + (xml_start_para): apply indentation for XML output too. + (xml_end_para): add newline if xml_indentation_increment is positive. + (xml_insert_element_with_attribute): major indentation fixes. + (xml_start_menu_entry): skip whitespace at the start of menu comments. + (xml_add_char): fixed paragraph detection in menus, and added a check + to detect multiple whitespaces after newline in menu comments. Do not + return when inside multitable to avoid concatenation of two lines + without a space char in between. + + * makeinfo/insertion.c (cm_insert_copying, cm_lisp, cm_smalllisp) + (cm_format, cm_smallformat, cm_display, cm_smalldisplay, cm_example) + (cm_smallexample): do not insert newline when the output is XML. + (end_insertion): ditto for the above mentioned block commands and + @group. Do not increment in_fixed_font for XML output. + (begin_insertion, end_insertion): enclose @detailmenu in a detailmenu + element. + + * util/texinfo.dtd: added detailmenu, and fixed menucomment and + tableitem definitions. + +2004-01-23 Alper Ersoy + + * util/Makefile.am: substituted catalog in EXTRA_DIST with catalog.in, + and added catalog to CLEANFILES. + +2004-01-23 Alper Ersoy + + * makeinfo/files.h: new input_filename member in delayed_write struct. + + * makeinfo/files.c (register_delayed_write): added input_filename to + saved variables, and adjusted line_number saving. + (handle_delayed_writes): set input_filename and line_number for + correct warning and error messages. + +2004-01-23 Alper Ersoy + + * makeinfo/float.c (cm_listoffloats): + * makeinfo/index.c (cm_printindex): decrement line_number only if + not handling delayed writes. + + * makeinfo/float.c (float_type_exists): check if float has a label. + +2004-01-23 Alper Ersoy + + * makeinfo/makeinfo.c (main): updated copyright year in --version text. + +2004-01-23 Alper Ersoy + + * makeinfo/tests/Makefile.am: commented top2.texi to fix distcheck. + +2004-01-23 Alper Ersoy + + * makeinfo/xml.c (xml_begin_document): use PUBLIC id for TexinfoML + instead of SYSTEM. + +2004-01-23 Alper Ersoy + + * makeinfo/Makefile.am: removed texinfo.dtd and texinfo.xsl and ... + + * util/Makefile.am: added here. + +2004-01-23 Alper Ersoy + + * utils/catalog.in: catalog file for texinfo.dtd. + +2004-01-23 Alper Ersoy + + * makeinfo/texinfo.dtd: + * makeinfo/texinfo.xsl: moved to ... + + * utils/texinfo.dtd: + * utils/texinfo.xsl: here. + +2004-01-23 Alper Ersoy + + * makeinfo/texinfo.dtd: added ordm and ordf entities and dmn element. + updated indexterm location in tables. + +2004-01-22 Karl Berry + + * doc/texinfo.tex (\dofloat): handle empty float type and empty + float label separately, matching makeinfo behavior. + * doc/texinfo.txi (Floats): new section, not yet fully written. + (Special Displays): new chapter to hold it. + (Footnotes, Images): move these sections to the new chapter. + (@@-Command Summary): list new commands. + * NEWS: mention new commands here too. + +2004-01-21 Alper Ersoy + + * makeinfo/xml.c (xml_begin_index): move data to a temporary location + for delayed use and insert back when handling delayed writes. + + * makeinfo/index.c (cm_printindex): call xml_begin_index when not + handling delayed writes too. + +2004-01-19 Karl Berry + + * doc/texinfo.tex: doc fix. + +2004-01-18 Karl Berry + + * doc/texinfo.tex (\commondummies): dummify @tie and remaining + @ commands. + (\tocindent): reduce to 15pt to match \defaultparindent. + (\setref): use XR as control sequence prefix + instead of just X; seems nicer. Change calls. + + Finish implementing @listoffloats: + (\xrdef): keep lists of each float type. + (\dofloat): save the floattype in the aux file. + (\Efloat): write the lof text to the aux file. + (\iffloat, \doiffloat, \listoffloats, + \listoffloatsdo, \listoffloatsentry): new macros. + * bootstrap: autoheader should come after aclocal, I think. + +2004-01-17 Karl Berry + + * doc/texinfo.tex (\doitemize): rename from \itemizey. + (\itemizeitem): do not set \parskip=0 if the last + thing was a \nobreak (e.g., from \sectionheading). + Report from: Jesper Harder , + 17 Jan 2004 22:03:51 +0100. + + * doc/texinfo.txi (email): no angle brackets in TeX output. + Report from: Jesper Harder , + 17 Jan 2004 21:03:21 +0100. + +2004-01-17 Alper Ersoy + + * makeinfo/float.c (cm_listoffloats): Prefixed captions with + float_type. For HTML, used an \n"); close_insertion_paragraph (); break; case flushright: force_flush_right--; if (html) - add_word ("\n"); + add_html_block_elt ("\n"); close_insertion_paragraph (); break; /* Handle the @defun insertions with this default clause. */ default: { - enum insertion_type base_type; + int base_type; if (type < defcv || type > defvr) line_error ("end_insertion internal error: type=%d", type); @@ -957,6 +1272,7 @@ end_insertion (type) case deffn: case defvr: case deftp: + case deftypecv: case deftypefn: case deftypevr: case defcv: @@ -965,8 +1281,16 @@ end_insertion (type) case deftypeop: case deftypeivar: if (html) - /* close the tables which has been opened in defun.c */ - add_word ("\n\n"); + { + if (paragraph_is_open) + add_html_block_elt ("

    "); + /* close the div and blockquote which has been opened in defun.c */ + if (!rollback_empty_tag ("blockquote")) + add_html_block_elt (""); + add_html_block_elt ("\n"); + } + if (xml) + xml_end_definition (); break; } /* switch (base_type)... */ @@ -991,8 +1315,7 @@ end_insertion (type) @if... conditionals, otherwise not. This is because conditionals can cross node boundaries. Always happens with the @top node, for example. */ void -discard_insertions (specials_ok) - int specials_ok; +discard_insertions (int specials_ok) { int real_line_number = line_number; while (insertion_stack) @@ -1000,7 +1323,9 @@ discard_insertions (specials_ok) if (specials_ok && ((ifclear <= insertion_stack->insertion && insertion_stack->insertion <= iftex) + || insertion_stack->insertion == rawdocbook || insertion_stack->insertion == rawhtml + || insertion_stack->insertion == rawxml || insertion_stack->insertion == rawtex)) break; else @@ -1020,71 +1345,125 @@ discard_insertions (specials_ok) /* Insertion (environment) commands. */ void -cm_quotation () +cm_quotation (void) { - if (xml) - xml_insert_element (QUOTATION, START); + /* We start the blockquote element in the insertion. */ begin_insertion (quotation); } void -cm_example () +cm_example (void) { + if (docbook && current_insertion_type () == floatenv) + xml_begin_docbook_float (FLOATEXAMPLE); + if (xml) - xml_insert_element (EXAMPLE, START); + { + /* Rollback previous newlines. These occur between + and . */ + if (output_paragraph[output_paragraph_offset-1] == '\n') + output_paragraph_offset--; + + xml_insert_element (EXAMPLE, START); + + /* Make sure example text is starting on a new line + for improved readability. */ + if (docbook) + add_char ('\n'); + } + begin_insertion (example); } void -cm_smallexample () +cm_smallexample (void) { + if (docbook && current_insertion_type () == floatenv) + xml_begin_docbook_float (FLOATEXAMPLE); + if (xml) - xml_insert_element (SMALLEXAMPLE, START); + { + /* See cm_example comments about newlines. */ + if (output_paragraph[output_paragraph_offset-1] == '\n') + output_paragraph_offset--; + xml_insert_element (SMALLEXAMPLE, START); + if (docbook) + add_char ('\n'); + } + begin_insertion (smallexample); } void -cm_lisp () +cm_lisp (void) { + if (docbook && current_insertion_type () == floatenv) + xml_begin_docbook_float (FLOATEXAMPLE); + if (xml) - xml_insert_element (LISP, START); + { + /* See cm_example comments about newlines. */ + if (output_paragraph[output_paragraph_offset-1] == '\n') + output_paragraph_offset--; + xml_insert_element (LISP, START); + if (docbook) + add_char ('\n'); + } + begin_insertion (lisp); } void -cm_smalllisp () +cm_smalllisp (void) { + if (docbook && current_insertion_type () == floatenv) + xml_begin_docbook_float (FLOATEXAMPLE); + if (xml) - xml_insert_element (SMALLLISP, START); + { + /* See cm_example comments about newlines. */ + if (output_paragraph[output_paragraph_offset-1] == '\n') + output_paragraph_offset--; + xml_insert_element (SMALLLISP, START); + if (docbook) + add_char ('\n'); + } + begin_insertion (smalllisp); } void -cm_cartouche () +cm_cartouche (void) { + if (docbook && current_insertion_type () == floatenv) + xml_begin_docbook_float (CARTOUCHE); + if (xml) xml_insert_element (CARTOUCHE, START); begin_insertion (cartouche); } void -cm_copying () +cm_copying (void) { - if (xml) - xml_insert_element (COPYING, START); begin_insertion (copying); } /* Not an insertion, despite the name, but it goes with cm_copying. */ void -cm_insert_copying () +cm_insert_copying (void) { - if (copying_text) - { /* insert_string rather than add_word because we've already done - full expansion on copying_text when we saved it. */ - insert_string (copying_text); - insert ('\n'); - + if (!copying_text) + { + warning ("@copying not used before %s", command); + return; + } + + execute_string ("%s", copying_text); + + if (!xml && !html) + { + add_word ("\n\n"); /* Update output_position so that the node positions in the tag tables will take account of the copying text. */ flush_output (); @@ -1092,7 +1471,7 @@ cm_insert_copying () } void -cm_format () +cm_format (void) { if (xml) { @@ -1102,56 +1481,94 @@ cm_format () xml_in_abstract = 1; } else - xml_insert_element (FORMAT, START); + { + /* See cm_example comments about newlines. */ + if (output_paragraph[output_paragraph_offset-1] == '\n') + output_paragraph_offset--; + xml_insert_element (FORMAT, START); + if (docbook) + add_char ('\n'); + } } begin_insertion (format); } void -cm_smallformat () +cm_smallformat (void) { if (xml) - xml_insert_element (SMALLFORMAT, START); + { + /* See cm_example comments about newlines. */ + if (output_paragraph[output_paragraph_offset-1] == '\n') + output_paragraph_offset--; + xml_insert_element (SMALLFORMAT, START); + if (docbook) + add_char ('\n'); + } + begin_insertion (smallformat); } void -cm_display () +cm_display (void) { if (xml) - xml_insert_element (DISPLAY, START); + { + /* See cm_example comments about newlines. */ + if (output_paragraph[output_paragraph_offset-1] == '\n') + output_paragraph_offset--; + xml_insert_element (DISPLAY, START); + if (docbook) + add_char ('\n'); + } + begin_insertion (display); } void -cm_smalldisplay () +cm_smalldisplay (void) { if (xml) - xml_insert_element (SMALLDISPLAY, START); + { + /* See cm_example comments about newlines. */ + if (output_paragraph[output_paragraph_offset-1] == '\n') + output_paragraph_offset--; + xml_insert_element (SMALLDISPLAY, START); + if (docbook) + add_char ('\n'); + } + begin_insertion (smalldisplay); } void -cm_direntry () +cm_direntry (void) { - if (html || xml) + if (html || xml || no_headers) command_name_condition (); else begin_insertion (direntry); } void -cm_documentdescription () +cm_documentdescription (void) { - if (html || xml) + if (html) begin_insertion (documentdescription); + + else if (xml) + { + xml_insert_element (DOCUMENTDESCRIPTION, START); + begin_insertion (documentdescription); + } + else command_name_condition (); } void -cm_itemize () +cm_itemize (void) { begin_insertion (itemize); } @@ -1159,9 +1576,7 @@ cm_itemize () /* Start an enumeration insertion of type TYPE. If the user supplied no argument on the line, then use DEFAULT_STRING as the initial string. */ static void -do_enumeration (type, default_string) - int type; - char *default_string; +do_enumeration (int type, char *default_string) { get_until_in_line (0, ".", &enumeration_arg); canon_white (enumeration_arg); @@ -1188,7 +1603,7 @@ do_enumeration (type, default_string) } void -cm_enumerate () +cm_enumerate (void) { do_enumeration (enumerate, "1"); } @@ -1202,15 +1617,16 @@ cm_enumerate () verbatim environment may be encapsulated in an @example environment, for example. */ void -handle_verbatim_environment (find_end_verbatim) - int find_end_verbatim; +handle_verbatim_environment (int find_end_verbatim) { int character; int seen_end = 0; int save_filling_enabled = filling_enabled; int save_inhibit_paragraph_indentation = inhibit_paragraph_indentation; + int save_escape_html = escape_html; - close_single_paragraph (); + if (!insertion_stack) + close_single_paragraph (); /* no blank lines if not at outer level */ inhibit_paragraph_indentation = 1; filling_enabled = 0; in_fixed_width_font++; @@ -1222,7 +1638,22 @@ handle_verbatim_environment (find_end_verbatim) */ if (html) - add_word ("
    ");
    +    { /* If inside @example, we'll be preceded by the indentation
    +         already.  Browsers will ignore those spaces because we're about
    +         to start another 
     (don't ask me).  So, wipe them out for
    +         cleanliness, and re-insert.  */
    +      int i;
    +      kill_self_indent (default_indentation_increment);
    +      add_html_block_elt ("
    ");
    +      for (i = current_indent; i > 0; i--)
    +        add_char (' ');
    +    }
    +  else if (xml)
    +    {
    +      xml_insert_element (VERBATIM, START);
    +      escape_html = 0;
    +      add_word (" sizeof (END_VERBATIM))
               && !strncmp (&input_text[input_text_offset+1], END_VERBATIM,
    @@ -1257,7 +1687,16 @@ handle_verbatim_environment (find_end_verbatim)
         warning (_("end of file inside verbatim block"));
     
       if (html)
    -    add_word ("
    "); + { /* See comments in example case above. */ + kill_self_indent (default_indentation_increment); + add_word ("
    "); + } + else if (xml) + { + add_word ("]]>"); + xml_insert_element (VERBATIM, END); + escape_html = save_escape_html; + } in_fixed_width_font--; filling_enabled = save_filling_enabled; @@ -1265,53 +1704,89 @@ handle_verbatim_environment (find_end_verbatim) } void -cm_verbatim () +cm_verbatim (void) { handle_verbatim_environment (1); } void -cm_table () +cm_table (void) { begin_insertion (table); } void -cm_multitable () +cm_multitable (void) { begin_insertion (multitable); /* @@ */ } void -cm_ftable () +cm_ftable (void) { begin_insertion (ftable); } void -cm_vtable () +cm_vtable (void) { begin_insertion (vtable); } void -cm_group () +cm_group (void) { begin_insertion (group); } /* Insert raw HTML (no escaping of `<' etc.). */ void -cm_html () +cm_html (int arg) { - if (process_html || process_xml) + if (process_html) begin_insertion (rawhtml); else command_name_condition (); } void -cm_ifhtml () +cm_xml (int arg) +{ + if (process_xml) + begin_insertion (rawxml); + else + command_name_condition (); +} + +void +cm_docbook (int arg) +{ + if (process_docbook) + begin_insertion (rawdocbook); + else + command_name_condition (); +} + +void +cm_ifdocbook (void) +{ + if (process_docbook) + begin_insertion (ifdocbook); + else + command_name_condition (); +} + +void +cm_ifnotdocbook (void) +{ + if (!process_docbook) + begin_insertion (ifnotdocbook); + else + command_name_condition (); +} + +void +cm_ifhtml (void) { if (process_html) begin_insertion (ifhtml); @@ -1320,7 +1795,7 @@ cm_ifhtml () } void -cm_ifnothtml () +cm_ifnothtml (void) { if (!process_html) begin_insertion (ifnothtml); @@ -1330,7 +1805,7 @@ cm_ifnothtml () void -cm_ifinfo () +cm_ifinfo (void) { if (process_info) begin_insertion (ifinfo); @@ -1339,7 +1814,7 @@ cm_ifinfo () } void -cm_ifnotinfo () +cm_ifnotinfo (void) { if (!process_info) begin_insertion (ifnotinfo); @@ -1349,7 +1824,7 @@ cm_ifnotinfo () void -cm_ifplaintext () +cm_ifplaintext (void) { if (process_plaintext) begin_insertion (ifplaintext); @@ -1358,7 +1833,7 @@ cm_ifplaintext () } void -cm_ifnotplaintext () +cm_ifnotplaintext (void) { if (!process_plaintext) begin_insertion (ifnotplaintext); @@ -1368,7 +1843,7 @@ cm_ifnotplaintext () void -cm_tex () +cm_tex (void) { if (process_tex) begin_insertion (rawtex); @@ -1377,7 +1852,7 @@ cm_tex () } void -cm_iftex () +cm_iftex (void) { if (process_tex) begin_insertion (iftex); @@ -1386,7 +1861,7 @@ cm_iftex () } void -cm_ifnottex () +cm_ifnottex (void) { if (!process_tex) begin_insertion (ifnottex); @@ -1395,7 +1870,7 @@ cm_ifnottex () } void -cm_ifxml () +cm_ifxml (void) { if (process_xml) begin_insertion (ifxml); @@ -1404,7 +1879,7 @@ cm_ifxml () } void -cm_ifnotxml () +cm_ifnotxml (void) { if (!process_xml) begin_insertion (ifnotxml); @@ -1413,9 +1888,47 @@ cm_ifnotxml () } +/* Generic xrefable block with a caption. */ +void +cm_float (void) +{ + begin_insertion (floatenv); +} + +void +cm_caption (int arg) +{ + char *temp; + + /* This is a no_op command for most formats, as we handle it during @float + insertion. For XML though, we handle it here to keep document structure + as close as possible, to the Texinfo source. */ + + /* Everything is already handled at START. */ + if (arg == END) + return; + + /* Check if it's mislocated. */ + if (current_insertion_type () != floatenv) + line_error (_("@%s not meaningful outside `@float' environment"), command); + + get_until_in_braces ("\n@end float", &temp); + + if (xml) + { + int elt = STREQ (command, "shortcaption") ? SHORTCAPTION : CAPTION; + xml_insert_element (elt, START); + if (!docbook) + execute_string ("%s", temp); + xml_insert_element (elt, END); + } + + free (temp); +} + /* Begin an insertion where the lines are not filled or indented. */ void -cm_flushleft () +cm_flushleft (void) { begin_insertion (flushleft); } @@ -1423,15 +1936,15 @@ cm_flushleft () /* Begin an insertion where the lines are not filled, and each line is forced to the right-hand side of the page. */ void -cm_flushright () +cm_flushright (void) { begin_insertion (flushright); } void -cm_menu () +cm_menu (void) { - if (current_node == NULL) + if (current_node == NULL && !macro_expansion_output_stream) { warning (_("@menu seen before first @node, creating `Top' node")); warning (_("perhaps your @top node should be wrapped in @ifnottex rather than @ifinfo?")); @@ -1442,22 +1955,108 @@ cm_menu () } void -cm_detailmenu () +cm_detailmenu (void) { - if (current_node == NULL) + if (current_node == NULL && !macro_expansion_output_stream) { /* Problems anyway, @detailmenu should always be inside @menu. */ warning (_("@detailmenu seen before first node, creating `Top' node")); execute_string ("@node top\n@top Top\n"); } begin_insertion (detailmenu); } + +/* Title page commands. */ + +void +cm_titlepage (void) +{ + titlepage_cmd_present = 1; + if (xml && !docbook) + begin_insertion (titlepage); + else + command_name_condition (); +} + +void +cm_author (void) +{ + char *rest; + get_rest_of_line (1, &rest); + + if (is_in_insertion_of_type (quotation)) + { + if (html) + add_word_args ("— %s", rest); + else if (docbook) + { + /* FIXME Ideally, we should use an attribution element, + but they are supposed to be at the start of quotation + blocks. So to avoid looking ahead mess, let's just + use mdash like HTML for now. */ + xml_insert_entity ("mdash"); + add_word (rest); + } + else if (xml) + { + xml_insert_element (AUTHOR, START); + add_word (rest); + xml_insert_element (AUTHOR, END); + } + else + add_word_args ("-- %s", rest); + } + else if (is_in_insertion_of_type (titlepage)) + { + if (xml && !docbook) + { + xml_insert_element (AUTHOR, START); + add_word (rest); + xml_insert_element (AUTHOR, END); + } + } + else + line_error (_("@%s not meaningful outside `@titlepage' and `@quotation' environments"), + command); + + free (rest); +} + +void +cm_titlepage_cmds (void) +{ + char *rest; + + get_rest_of_line (1, &rest); + + if (!is_in_insertion_of_type (titlepage)) + line_error (_("@%s not meaningful outside `@titlepage' environment"), + command); + + if (xml && !docbook) + { + int elt = 0; + + if (STREQ (command, "title")) + elt = BOOKTITLE; + else if (STREQ (command, "subtitle")) + elt = BOOKSUBTITLE; + + xml_insert_element (elt, START); + add_word (rest); + xml_insert_element (elt, END); + } + + free (rest); +} /* End existing insertion block. */ void -cm_end () +cm_end (void) { char *temp; - enum insertion_type type; + int type; + + get_rest_of_line (0, &temp); if (!insertion_level) { @@ -1465,8 +2064,6 @@ cm_end () return; } - get_rest_of_line (0, &temp); - if (temp[0] == 0) line_error (_("`%c%s' needs something after it"), COMMAND_PREFIX, command); @@ -1474,8 +2071,8 @@ cm_end () if (type == bad_type) { - line_error (_("Bad argument to `%s', `%s', using `%s'"), - command, temp, insertion_type_pname (current_insertion_type ())); + line_error (_("Bad argument `%s' to `@%s', using `%s'"), + temp, command, insertion_type_pname (current_insertion_type ())); } if (xml && type == menu) /* fixme */ { @@ -1490,9 +2087,8 @@ cm_end () static int itemx_flag = 0; /* Return whether CMD takes a brace-delimited {arg}. */ -/*static */int -command_needs_braces (cmd) - char *cmd; +int +command_needs_braces (char *cmd) { int i; for (i = 0; command_table[i].name; i++) @@ -1506,7 +2102,7 @@ command_needs_braces (cmd) void -cm_item () +cm_item (void) { char *rest_of_line, *item_func; @@ -1548,7 +2144,9 @@ cm_item () case ifset: case iftex: case ifxml: + case rawdocbook: case rawhtml: + case rawxml: case rawtex: case tex: case cartouche: @@ -1585,14 +2183,7 @@ cm_item () else { if (html) - { - if (in_paragraph) - { - add_word ("

    "); - in_paragraph = 0; - } - add_word ("
  • "); - } + add_html_block_elt ("
  • "); else if (xml) xml_begin_item (); else @@ -1646,17 +2237,11 @@ cm_item () case ftable: case vtable: if (html) - { - static int last_html_output_position = 0; - - /* If nothing has been output since the last
    , + { /* If nothing has been output since the last
    , remove the empty
    element. Some browsers render an extra empty line for
    , which makes @itemx conversion look ugly. */ - if (last_html_output_position == output_position - && strncmp ((char *) output_paragraph, "
    ", - output_paragraph_offset) == 0) - output_paragraph_offset = 0; + rollback_empty_tag ("dd"); /* Force the browser to render one blank line before each new @item in a table. But don't do that if @@ -1666,14 +2251,14 @@ cm_item () Note that there are some browsers which ignore
    in this context, but I cannot find any way to force them all render exactly one blank line. */ - if (!itemx_flag - && ((output_paragraph_offset < sizeof (dl_tag) + 1) - || strncmp ((char *) output_paragraph - + output_paragraph_offset - sizeof (dl_tag) + 1, - dl_tag, sizeof (dl_tag) - 1) != 0)) - add_word ("
    "); + if (!itemx_flag && html_deflist_has_term) + add_html_block_elt ("
    "); + + /* We are about to insert a
    , so this
    has a term. + Feel free to insert a
    next time. :) */ + html_deflist_has_term = 1; - add_word ("
    "); + add_html_block_elt ("
    "); if (item_func && *item_func) execute_string ("%s{%s}", item_func, rest_of_line); else @@ -1684,15 +2269,19 @@ cm_item () if (current_insertion_type () == vtable) execute_string ("%cvindex %s\n", COMMAND_PREFIX, rest_of_line); - /* Make sure output_position is updated, so we could - remember it. */ - close_single_paragraph (); - last_html_output_position = output_position; - add_word ("
    "); + + add_html_block_elt ("
    "); } else if (xml) /* && docbook)*/ /* 05-08 */ { xml_begin_table_item (); + + if (!docbook && current_insertion_type () == ftable) + execute_string ("%cfindex %s\n", COMMAND_PREFIX, rest_of_line); + + if (!docbook && current_insertion_type () == vtable) + execute_string ("%cvindex %s\n", COMMAND_PREFIX, rest_of_line); + if (item_func && *item_func) execute_string ("%s{%s}", item_func, rest_of_line); else @@ -1770,9 +2359,18 @@ cm_item () } void -cm_itemx () +cm_itemx (void) { itemx_flag++; cm_item (); itemx_flag--; } + +int headitem_flag = 0; + +void +cm_headitem (void) +{ + headitem_flag = 1; + cm_item (); +} diff --git a/contrib/texinfo/makeinfo/insertion.h b/contrib/texinfo/makeinfo/insertion.h index 17916e72687f..ace55716f2ac 100644 --- a/contrib/texinfo/makeinfo/insertion.h +++ b/contrib/texinfo/makeinfo/insertion.h @@ -1,7 +1,7 @@ /* insertion.h -- declarations for insertion.c. - $Id: insertion.h,v 1.2 2002/09/29 19:15:20 karl Exp $ + $Id: insertion.h,v 1.10 2004/04/11 17:56:47 karl Exp $ - Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,14 +24,15 @@ enum insertion_type { cartouche, copying, defcv, deffn, defivar, defmac, defmethod, defop, - defopt, defspec, deftp, deftypefn, deftypefun, deftypeivar, + defopt, defspec, deftp, deftypecv, deftypefn, deftypefun, deftypeivar, deftypemethod, deftypeop, deftypevar, deftypevr, defun, defvar, defvr, detailmenu, direntry, display, documentdescription, enumerate, - example, flushleft, flushright, format, ftable, group, ifclear, - ifhtml, ifinfo, ifnothtml, ifnotinfo, ifnotplaintext, ifnottex, ifnotxml, - ifplaintext, ifset, iftex, ifxml, itemize, lisp, menu, multitable, quotation, - rawhtml, rawtex, smalldisplay, smallexample, smallformat, smalllisp, - verbatim, table, tex, vtable, bad_type + example, floatenv, flushleft, flushright, format, ftable, group, + ifclear, ifdocbook, ifhtml, ifinfo, ifnotdocbook, ifnothtml, ifnotinfo, + ifnotplaintext, ifnottex, ifnotxml, ifplaintext, ifset, iftex, ifxml, + itemize, lisp, menu, multitable, quotation, rawdocbook, rawhtml, rawtex, + rawxml, smalldisplay, smallexample, smallformat, smalllisp, verbatim, + table, tex, vtable, titlepage, bad_type }; typedef struct istack_elt @@ -42,12 +43,11 @@ typedef struct istack_elt int line_number; int filling_enabled; int indented_fill; - enum insertion_type insertion; + int insertion; int inhibited; int in_fixed_width_font; } INSERTION_ELT; - extern int insertion_level; extern INSERTION_ELT *insertion_stack; extern int in_menu; @@ -55,10 +55,24 @@ extern int in_detailmenu; extern int had_menu_commentary; extern int in_paragraph; -extern void command_name_condition (); -extern void cm_ifhtml (), cm_ifnothtml(), cm_html (); -extern void cm_ifinfo (), cm_ifnotinfo (); -extern void cm_ifplaintext (), cm_ifnotplaintext(); -extern void cm_iftex (), cm_ifnottex (), cm_tex (); -extern void cm_ifxml (), cm_ifnotxml (); +extern int headitem_flag; +extern int after_headitem; + +extern void init_insertion_stack (void); +extern void command_name_condition (void); +extern void cm_ifdocbook (void), cm_ifnotdocbook(void), cm_docbook (int arg); +extern void cm_ifhtml (void), cm_ifnothtml(void), cm_html (int arg); +extern void cm_ifinfo (void), cm_ifnotinfo (void); +extern void cm_ifplaintext (void), cm_ifnotplaintext(void); +extern void cm_iftex (void), cm_ifnottex (void), cm_tex (void); +extern void cm_ifxml (void), cm_ifnotxml (void), cm_xml (int arg); +extern void handle_verbatim_environment (int find_end_verbatim); +extern void begin_insertion (enum insertion_type type); +extern void pop_insertion (void); +extern void discard_insertions (int specials_ok); + +extern int is_in_insertion_of_type (int type); +extern int command_needs_braces (char *cmd); + +extern enum insertion_type find_type_from_name (char *name); #endif /* !INSERTION_H */ diff --git a/contrib/texinfo/makeinfo/lang.c b/contrib/texinfo/makeinfo/lang.c index 2938196cd2f9..c72e8dbc6316 100644 --- a/contrib/texinfo/makeinfo/lang.c +++ b/contrib/texinfo/makeinfo/lang.c @@ -1,7 +1,8 @@ /* lang.c -- language-dependent support. - $Id: lang.c,v 1.8 2003/05/01 00:05:27 karl Exp $ + $Id: lang.c,v 1.14 2004/11/22 23:57:33 karl Exp $ - Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software + Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,6 +22,7 @@ #include "system.h" #include "cmds.h" +#include "files.h" #include "lang.h" #include "makeinfo.h" #include "xml.h" @@ -31,6 +33,9 @@ encoding_code_type document_encoding_code = no_encoding; /* Current language code; default is English. */ language_code_type language_code = en; +/* By default, unsupported encoding is an empty string. */ +char *unknown_encoding = NULL; + static iso_map_type us_ascii_map [] = {{NULL, 0, 0}}; /* ASCII map is trivial */ /* Translation table between HTML and ISO Codes. The last item is @@ -137,6 +142,126 @@ static iso_map_type iso8859_1_map [] = { { NULL, 0, 0 } }; + +/* ISO 8859-15, also known as Latin 9, differs from Latin 1 in only a + few positions. http://www.cs.tut.fi/~jkorpela/latin9.html has a good + explanation and listing, summarized here. The names are abbreviated + from the official Unicode names, to fit in a decent line length. + + code position + dec oct hex latin1 latin1 name latin9 latin9 name + + 164 0244 0xA4 U+00A4 currency symbol U+20AC euro sign + 166 0246 0xA6 U+00A6 broken bar U+0160 S with caron + 168 0250 0xA8 U+00A8 diaeresis U+0161 s with caron + 180 0264 0xB4 U+00B4 acute accent U+017D Z with caron + 184 0270 0xB8 U+00B8 cedilla U+017E z with caron + 188 0274 0xBC U+00BC fraction 1/4 U+0152 ligature OE + 189 0275 0xBD U+00BD fraction 1/2 U+0153 ligature oe + 190 0276 0xBE U+00BE fraction 3/4 U+0178 Y with diaeresis +*/ + +static iso_map_type iso8859_15_map [] = { + { "nbsp", 0xA0, 0x00A0 }, + { "iexcl", 0xA1, 0x00A1 }, + { "cent", 0xA2, 0x00A2 }, + { "pound", 0xA3, 0x00A3 }, + { "euro", 0xA4, 0x20AC }, + { "yen", 0xA5, 0x00A5 }, + { "Scaron", 0xA6, 0x0160 }, + { "sect", 0xA7, 0x00A7 }, + { "scaron", 0xA8, 0x0161 }, + { "copy", 0xA9, 0x00A9 }, + { "ordf", 0xAA, 0x00AA }, + { "laquo", 0xAB, 0x00AB }, + { "not", 0xAC, 0x00AC }, + { "shy", 0xAD, 0x00AD }, + { "reg", 0xAE, 0x00AE }, + { "hibar", 0xAF, 0x00AF }, + { "deg", 0xB0, 0x00B0 }, + { "plusmn", 0xB1, 0x00B1 }, + { "sup2", 0xB2, 0x00B2 }, + { "sup3", 0xB3, 0x00B3 }, + { "Zcaron", 0xB4, 0x017D }, + { "micro", 0xB5, 0x00B5 }, + { "para", 0xB6, 0x00B6 }, + { "middot", 0xB7, 0x00B7 }, + { "zcaron", 0xB8, 0x017E }, + { "sup1", 0xB9, 0x00B9 }, + { "ordm", 0xBA, 0x00BA }, + { "raquo", 0xBB, 0x00BB }, + { "OElig", 0xBC, 0x0152 }, + { "oelig", 0xBD, 0x0153 }, + { "Yuml", 0xBE, 0x0178 }, + { "iquest", 0xBF, 0x00BF }, + { "Agrave", 0xC0, 0x00C0 }, + { "Aacute", 0xC1, 0x00C1 }, + { "Acirc", 0xC2, 0x00C2 }, + { "Atilde", 0xC3, 0x00C3 }, + { "Auml", 0xC4, 0x00C4 }, + { "Aring", 0xC5, 0x00C5 }, + { "AElig", 0xC6, 0x00C6 }, + { "Ccedil", 0xC7, 0x00C7 }, + { "Ccedil", 0xC7, 0x00C7 }, + { "Egrave", 0xC8, 0x00C8 }, + { "Eacute", 0xC9, 0x00C9 }, + { "Ecirc", 0xCA, 0x00CA }, + { "Euml", 0xCB, 0x00CB }, + { "Igrave", 0xCC, 0x00CC }, + { "Iacute", 0xCD, 0x00CD }, + { "Icirc", 0xCE, 0x00CE }, + { "Iuml", 0xCF, 0x00CF }, + { "ETH", 0xD0, 0x00D0 }, + { "Ntilde", 0xD1, 0x00D1 }, + { "Ograve", 0xD2, 0x00D2 }, + { "Oacute", 0xD3, 0x00D3 }, + { "Ocirc", 0xD4, 0x00D4 }, + { "Otilde", 0xD5, 0x00D5 }, + { "Ouml", 0xD6, 0x00D6 }, + { "times", 0xD7, 0x00D7 }, + { "Oslash", 0xD8, 0x00D8 }, + { "Ugrave", 0xD9, 0x00D9 }, + { "Uacute", 0xDA, 0x00DA }, + { "Ucirc", 0xDB, 0x00DB }, + { "Uuml", 0xDC, 0x00DC }, + { "Yacute", 0xDD, 0x00DD }, + { "THORN", 0xDE, 0x00DE }, + { "szlig", 0xDF, 0x00DF }, + { "agrave", 0xE0, 0x00E0 }, + { "aacute", 0xE1, 0x00E1 }, + { "acirc", 0xE2, 0x00E2 }, + { "atilde", 0xE3, 0x00E3 }, + { "auml", 0xE4, 0x00E4 }, + { "aring", 0xE5, 0x00E5 }, + { "aelig", 0xE6, 0x00E6 }, + { "ccedil", 0xE7, 0x00E7 }, + { "egrave", 0xE8, 0x00E8 }, + { "eacute", 0xE9, 0x00E9 }, + { "ecirc", 0xEA, 0x00EA }, + { "euml", 0xEB, 0x00EB }, + { "igrave", 0xEC, 0x00EC }, + { "iacute", 0xED, 0x00ED }, + { "icirc", 0xEE, 0x00EE }, + { "iuml", 0xEF, 0x00EF }, + { "eth", 0xF0, 0x00F0 }, + { "ntilde", 0xF1, 0x00F1 }, + { "ograve", 0xF2, 0x00F2 }, + { "oacute", 0xF3, 0x00F3 }, + { "ocirc", 0xF4, 0x00F4 }, + { "otilde", 0xF5, 0x00F5 }, + { "ouml", 0xF6, 0x00F6 }, + { "divide", 0xF7, 0x00F7 }, + { "oslash", 0xF8, 0x00F8 }, + { "ugrave", 0xF9, 0x00F9 }, + { "uacute", 0xFA, 0x00FA }, + { "ucirc", 0xFB, 0x00FB }, + { "uuml", 0xFC, 0x00FC }, + { "yacute", 0xFD, 0x00FD }, + { "thorn", 0xFE, 0x00FE }, + { "yuml", 0xFF, 0x00FF }, + { NULL, 0, 0 } +}; + /* Date: Mon, 31 Mar 2003 00:19:28 +0200 @@ -262,21 +387,21 @@ static iso_map_type iso8859_2_map [] = { encoding_type encoding_table[] = { { no_encoding, "(no encoding)", NULL }, { US_ASCII, "US-ASCII", us_ascii_map }, - { ISO_8859_1, "ISO-8859-1", (iso_map_type *) iso8859_1_map }, - { ISO_8859_2, "ISO-8859-2", (iso_map_type *) iso8859_2_map }, - { ISO_8859_3, "ISO-8859-3", NULL }, - { ISO_8859_4, "ISO-8859-4", NULL }, - { ISO_8859_5, "ISO-8859-5", NULL }, - { ISO_8859_6, "ISO-8859-6", NULL }, - { ISO_8859_7, "ISO-8859-7", NULL }, - { ISO_8859_8, "ISO-8859-8", NULL }, - { ISO_8859_9, "ISO-8859-9", NULL }, - { ISO_8859_10, "ISO-8859-10", NULL }, - { ISO_8859_11, "ISO-8859-11", NULL }, - { ISO_8859_12, "ISO-8859-12", NULL }, - { ISO_8859_13, "ISO-8859-13", NULL }, - { ISO_8859_14, "ISO-8859-14", NULL }, - { ISO_8859_15, "ISO-8859-15", NULL }, + { ISO_8859_1, "iso-8859-1", (iso_map_type *) iso8859_1_map }, + { ISO_8859_2, "iso-8859-2", (iso_map_type *) iso8859_2_map }, + { ISO_8859_3, "iso-8859-3", NULL }, + { ISO_8859_4, "iso-8859-4", NULL }, + { ISO_8859_5, "iso-8859-5", NULL }, + { ISO_8859_6, "iso-8859-6", NULL }, + { ISO_8859_7, "iso-8859-7", NULL }, + { ISO_8859_8, "iso-8859-8", NULL }, + { ISO_8859_9, "iso-8859-9", NULL }, + { ISO_8859_10, "iso-8859-10", NULL }, + { ISO_8859_11, "iso-8859-11", NULL }, + { ISO_8859_12, "iso-8859-12", NULL }, + { ISO_8859_13, "iso-8859-13", NULL }, + { ISO_8859_14, "iso-8859-14", NULL }, + { ISO_8859_15, "iso-8859-15", (iso_map_type *) iso8859_15_map }, { last_encoding_code, NULL, NULL } }; @@ -423,13 +548,16 @@ language_type language_table[] = { { zu, "zu", "Zulu" }, { last_language_code, NULL, NULL } }; - - /* @documentlanguage. Maybe we'll do something useful with this in the future. For now, we just recognize it. */ + +/* XML documents can make use of this data. Unfortunately, it clashes with + the structure currently used. So instead of enclosing content into + a language block, we just output an empty element. Anyways, a stream based + parser can make good use of it. */ void -cm_documentlanguage () +cm_documentlanguage (void) { language_code_type c; char *lang_arg; @@ -451,6 +579,12 @@ cm_documentlanguage () if (c == last_language_code) warning (_("%s is not a valid ISO 639 language code"), lang_arg); + if (xml && !docbook) + { + xml_insert_element_with_attribute (DOCUMENTLANGUAGE, START, "xml:lang=\"%s\"", lang_arg); + xml_insert_element (DOCUMENTLANGUAGE, END); + } + free (lang_arg); } @@ -460,8 +594,7 @@ cm_documentlanguage () its equivalent. */ static int -cm_search_iso_map (html) - char *html; +cm_search_iso_map (char *html) { int i; iso_map_type *iso = encoding_table[document_encoding_code].isotab; @@ -483,43 +616,88 @@ cm_search_iso_map (html) /* @documentencoding. Set the translation table. */ void -cm_documentencoding () +cm_documentencoding (void) { - encoding_code_type enc; - char *enc_arg; - - get_rest_of_line (1, &enc_arg); - - /* See if we have this encoding. */ - for (enc = no_encoding+1; enc != last_encoding_code; enc++) + if (!handling_delayed_writes) { - if (strcasecmp (enc_arg, encoding_table[enc].encname) == 0) + encoding_code_type enc; + char *enc_arg; + + /* This is ugly and probably needs to apply to other commands' + argument parsing as well. When we're doing @documentencoding, + we're generally in the frontmatter of the document, and so the. + expansion in html/xml/docbook would generally be the empty string. + (Because those modes wait until the first normal text of the + document to start outputting.) The result would thus be a warning + "unrecognized encoding name `'". Sigh. */ + int save_html = html; + int save_xml = xml; + + html = 0; + xml = 0; + get_rest_of_line (1, &enc_arg); + html = save_html; + xml = save_xml; + + /* See if we have this encoding. */ + for (enc = no_encoding+1; enc != last_encoding_code; enc++) { - document_encoding_code = enc; - break; + if (strcasecmp (enc_arg, encoding_table[enc].encname) == 0) + { + document_encoding_code = enc; + break; + } } + + /* If we didn't find this code, complain. */ + if (enc == last_encoding_code) + { + warning (_("unrecognized encoding name `%s'"), enc_arg); + /* Let the previous one go. */ + if (unknown_encoding && *unknown_encoding) + free (unknown_encoding); + unknown_encoding = xstrdup (enc_arg); + } + + else if (encoding_table[document_encoding_code].isotab == NULL) + warning (_("sorry, encoding `%s' not supported"), enc_arg); + + free (enc_arg); } + else if (xml) + { + char *encoding = current_document_encoding (); - /* If we didn't find this code, complain. */ - if (enc == last_encoding_code) - warning (_("unrecognized encoding name `%s'"), enc_arg); + if (encoding && *encoding) + { + insert_string (" encoding=\""); + insert_string (encoding); + insert_string ("\""); + } - else if (encoding_table[document_encoding_code].isotab == NULL) - warning (_("sorry, encoding `%s' not supported"), enc_arg); + free (encoding); + } +} - free (enc_arg); +char * +current_document_encoding (void) +{ + if (document_encoding_code != no_encoding) + return xstrdup (encoding_table[document_encoding_code].encname); + else if (unknown_encoding && *unknown_encoding) + return xstrdup (unknown_encoding); + else + return xstrdup (""); } -/* If html or xml output, add HTML_STR to the output. If not html and +/* If html or xml output, add &HTML_STR; to the output. If not html and the user requested encoded output, add the real 8-bit character corresponding to HTML_STR from the translation tables. Otherwise, add INFO_STR. */ -void -add_encoded_char (html_str, info_str) - char *html_str; - char *info_str; +static void +add_encoded_char (char *html_str, char *info_str) { if (html) add_word_args ("&%s;", html_str); @@ -547,13 +725,8 @@ add_encoded_char (html_str, info_str) /* Output an accent for HTML or XML. */ static void -cm_accent_generic_html (arg, start, end, html_supported, single, - html_solo_standalone, html_solo) - int arg, start, end; - char *html_supported; - int single; - int html_solo_standalone; - char *html_solo; +cm_accent_generic_html (int arg, int start, int end, char *html_supported, + int single, int html_solo_standalone, char *html_solo) { static int valid_html_accent; /* yikes */ @@ -569,20 +742,39 @@ cm_accent_generic_html (arg, start, end, html_supported, single, escape_html = saved_escape_html; } else - { - valid_html_accent = 0; - if (html_solo_standalone) - { /* No special HTML support, so produce standalone char. */ - if (xml) - xml_insert_entity (html_solo); + { /* @dotless{i} is not listed in html_supported but HTML entities + starting with `i' can be used, such as î. */ + int save_input_text_offset = input_text_offset; + char *accent_contents; + + get_until_in_braces ("\n", &accent_contents); + canon_white (accent_contents); + + if (strstr (accent_contents, "@dotless{i")) + { + add_word_args ("&%c", accent_contents[9]); + valid_html_accent = 1; + } + else + { + /* Search for @dotless{} wasn't successful, so rewind. */ + input_text_offset = save_input_text_offset; + valid_html_accent = 0; + if (html_solo_standalone) + { /* No special HTML support, so produce standalone char. */ + if (xml) + xml_insert_entity (html_solo); + else + add_word_args ("&%s;", html_solo); + } else - add_word_args ("&%s;", html_solo); - } - else - /* If the html_solo does not exist as standalone character - (namely ˆ ` ˜), then we use - the single character version instead. */ - add_char (single); + /* If the html_solo does not exist as standalone character + (namely ˆ ` ˜), then we use + the single character version instead. */ + add_char (single); + } + + free (accent_contents); } } else if (arg == END) @@ -598,10 +790,8 @@ cm_accent_generic_html (arg, start, end, html_supported, single, static void -cm_accent_generic_no_headers (arg, start, end, single, html_solo) - int arg, start, end; - int single; - char *html_solo; +cm_accent_generic_no_headers (int arg, int start, int end, int single, + char *html_solo) { if (arg == END) { @@ -628,8 +818,11 @@ cm_accent_generic_no_headers (arg, start, end, single, html_solo) { /* If we didn't find a translation for this character, put the single instead. E.g., &Xuml; does not exist so X¨ should be produced. */ - warning (_("%s is an invalid ISO code, using %c"), - buffer, single); + /* When the below warning is issued, an author has nothing + wrong in their document, let alone anything ``fixable'' + on their side. So it is commented out for now. */ + /* warning (_("%s is an invalid ISO code, using %c"), + buffer, single); */ add_char (single); } @@ -644,8 +837,7 @@ cm_accent_generic_no_headers (arg, start, end, single, html_solo) special HTML support. */ void -cm_accent (arg) - int arg; +cm_accent (int arg) { int old_escape_html = escape_html; escape_html = 0; @@ -687,14 +879,14 @@ cm_accent (arg) exists as valid standalone character in HTML, e.g., ¨. */ static void -cm_accent_generic (arg, start, end, html_supported, single, - html_solo_standalone, html_solo) - int arg, start, end; - char *html_supported; - int single; - int html_solo_standalone; - char *html_solo; +cm_accent_generic (int arg, int start, int end, char *html_supported, + int single, int html_solo_standalone, char *html_solo) { + /* Accentuating space characters makes no sense, so issue a warning. */ + if (arg == START && isspace (input_text[input_text_offset])) + warning ("Accent command `@%s' must not be followed by whitespace", + command); + if (html || xml) cm_accent_generic_html (arg, start, end, html_supported, single, html_solo_standalone, html_solo); @@ -712,43 +904,37 @@ cm_accent_generic (arg, start, end, html_supported, single, } void -cm_accent_umlaut (arg, start, end) - int arg, start, end; +cm_accent_umlaut (int arg, int start, int end) { cm_accent_generic (arg, start, end, "aouAOUEeIiy", '"', 1, "uml"); } void -cm_accent_acute (arg, start, end) - int arg, start, end; +cm_accent_acute (int arg, int start, int end) { cm_accent_generic (arg, start, end, "AEIOUYaeiouy", '\'', 1, "acute"); } void -cm_accent_cedilla (arg, start, end) - int arg, start, end; +cm_accent_cedilla (int arg, int start, int end) { cm_accent_generic (arg, start, end, "Cc", ',', 1, "cedil"); } void -cm_accent_hat (arg, start, end) - int arg, start, end; +cm_accent_hat (int arg, int start, int end) { cm_accent_generic (arg, start, end, "AEIOUaeiou", '^', 0, "circ"); } void -cm_accent_grave (arg, start, end) - int arg, start, end; +cm_accent_grave (int arg, int start, int end) { cm_accent_generic (arg, start, end, "AEIOUaeiou", '`', 0, "grave"); } void -cm_accent_tilde (arg, start, end) - int arg, start, end; +cm_accent_tilde (int arg, int start, int end) { cm_accent_generic (arg, start, end, "ANOano", '~', 0, "tilde"); } @@ -757,7 +943,7 @@ cm_accent_tilde (arg, start, end) /* Non-English letters/characters that don't insert themselves. */ void -cm_special_char (arg) +cm_special_char (int arg) { int old_escape_html = escape_html; escape_html = 0; @@ -769,27 +955,35 @@ cm_special_char (arg) && command[1] == 0) { /* Lslash lslash Oslash oslash. Lslash and lslash aren't supported in HTML. */ - if ((html || xml) && command[0] == 'O') + if (command[0] == 'O') add_encoded_char ("Oslash", "/O"); - else if ((html || xml) && command[0] == 'o') + else if (command[0] == 'o') add_encoded_char ("oslash", "/o"); else add_word_args ("/%c", command[0]); } else if (strcmp (command, "exclamdown") == 0) add_encoded_char ("iexcl", "!"); - else if (strcmp (command, "pounds") == 0) - add_encoded_char ("pound" , "#"); else if (strcmp (command, "questiondown") == 0) add_encoded_char ("iquest", "?"); + else if (strcmp (command, "euro") == 0) + /* http://www.cs.tut.fi/~jkorpela/html/euro.html suggests that + € degrades best in old browsers. */ + add_encoded_char ("euro", "Euro "); + else if (strcmp (command, "pounds") == 0) + add_encoded_char ("pound" , "#"); + else if (strcmp (command, "ordf") == 0) + add_encoded_char ("ordf" , "a"); + else if (strcmp (command, "ordm") == 0) + add_encoded_char ("ordm" , "o"); else if (strcmp (command, "AE") == 0) add_encoded_char ("AElig", command); else if (strcmp (command, "ae") == 0) add_encoded_char ("aelig", command); else if (strcmp (command, "OE") == 0) - add_encoded_char ("#140", command); + add_encoded_char ("OElig", command); else if (strcmp (command, "oe") == 0) - add_encoded_char ("#156", command); + add_encoded_char ("oelig", command); else if (strcmp (command, "AA") == 0) add_encoded_char ("Aring", command); else if (strcmp (command, "aa") == 0) @@ -804,8 +998,7 @@ cm_special_char (arg) /* Dotless i or j. */ void -cm_dotless (arg, start, end) - int arg, start, end; +cm_dotless (int arg, int start, int end) { if (arg == END) { diff --git a/contrib/texinfo/makeinfo/lang.h b/contrib/texinfo/makeinfo/lang.h index a1e9489898d1..b231455a6e90 100644 --- a/contrib/texinfo/makeinfo/lang.h +++ b/contrib/texinfo/makeinfo/lang.h @@ -1,5 +1,5 @@ /* lang.h -- declarations for language codes etc. - $Id: lang.h,v 1.4 2003/05/01 00:05:27 karl Exp $ + $Id: lang.h,v 1.6 2004/04/11 17:56:47 karl Exp $ Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. @@ -73,34 +73,35 @@ extern language_type language_table[]; -/* The document encoding. This is usefull if we working e.g. - * with german Texinfo so we can produce correct german umlaut - * while creating output (--no-headers ASCII like). - */ +/* The document encoding. This is useful to produce true 8-bit + characters according to the @documentencoding. */ + typedef enum { - no_encoding, - US_ASCII, - ISO_8859_1, - ISO_8859_2, - ISO_8859_3, /* this and none of the rest are supported. */ - ISO_8859_4, - ISO_8859_5, - ISO_8859_6, - ISO_8859_7, - ISO_8859_8, - ISO_8859_9, - ISO_8859_10, - ISO_8859_11, - ISO_8859_12, - ISO_8859_13, - ISO_8859_14, - ISO_8859_15, - last_encoding_code + no_encoding, + US_ASCII, + ISO_8859_1, + ISO_8859_2, + ISO_8859_3, /* this and none of the rest are supported. */ + ISO_8859_4, + ISO_8859_5, + ISO_8859_6, + ISO_8859_7, + ISO_8859_8, + ISO_8859_9, + ISO_8859_10, + ISO_8859_11, + ISO_8859_12, + ISO_8859_13, + ISO_8859_14, + ISO_8859_15, + last_encoding_code } encoding_code_type; /* The current document encoding, or null if not set. */ extern encoding_code_type document_encoding_code; +/* If an encoding is not supported, just keep it as a string. */ +extern char *unknown_encoding; /* Maps an HTML abbreviation to ISO and Unicode codes for a given code. */ @@ -118,7 +119,8 @@ typedef struct typedef struct { encoding_code_type ec; /* document encoding type (see above enum) */ - char *encname; /* encoding name like "ISO-8859-1", valid in Emacs */ + char *encname; /* encoding name like "iso-8859-1", valid in + HTML and Emacs */ iso_map_type *isotab; /* address of ISO translation table */ } encoding_type; @@ -127,12 +129,20 @@ extern encoding_type encoding_table[]; /* The commands. */ -extern void cm_documentlanguage (), cm_documentencoding (); +extern void cm_documentlanguage (void), + cm_documentencoding (void); /* Accents, other non-English characters. */ -void cm_accent (), cm_special_char (), cm_dotless (); +void cm_accent (int arg), cm_special_char (int arg), + cm_dotless (int arg, int start, int end); -extern void cm_accent_umlaut (), cm_accent_acute (), cm_accent_cedilla (), - cm_accent_hat (), cm_accent_grave (), cm_accent_tilde (); +extern void cm_accent_umlaut (int arg, int start, int end), + cm_accent_acute (int arg, int start, int end), + cm_accent_cedilla (int arg, int start, int end), + cm_accent_hat (int arg, int start, int end), + cm_accent_grave (int arg, int start, int end), + cm_accent_tilde (int arg, int start, int end); + +extern char *current_document_encoding (void); #endif /* not LANG_H */ diff --git a/contrib/texinfo/makeinfo/macro.c b/contrib/texinfo/makeinfo/macro.c index ef33a5391600..65ac0dac8f83 100644 --- a/contrib/texinfo/makeinfo/macro.c +++ b/contrib/texinfo/makeinfo/macro.c @@ -1,5 +1,5 @@ /* macro.c -- user-defined macros for Texinfo. - $Id: macro.c,v 1.2 2003/06/01 23:41:23 karl Exp $ + $Id: macro.c,v 1.6 2004/04/11 17:56:47 karl Exp $ Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc. @@ -19,6 +19,7 @@ #include "system.h" #include "cmds.h" +#include "files.h" #include "macro.h" #include "makeinfo.h" #include "insertion.h" @@ -54,8 +55,7 @@ int macro_list_size = 0; /* Number of slots in total. */ /* Return the length of the array in ARRAY. */ int -array_len (array) - char **array; +array_len (char **array) { int i = 0; @@ -66,8 +66,7 @@ array_len (array) } void -free_array (array) - char **array; +free_array (char **array) { if (array) { @@ -81,8 +80,7 @@ free_array (array) /* Return the macro definition of NAME or NULL if NAME is not defined. */ MACRO_DEF * -find_macro (name) - char *name; +find_macro (char *name) { int i; MACRO_DEF *def; @@ -101,13 +99,9 @@ find_macro (name) and SOURCE_LINENO is the line number within that file. If a macro already exists with NAME, then a warning is produced, and that previous definition is overwritten. */ -void -add_macro (name, arglist, body, source_file, source_lineno, flags) - char *name; - char **arglist; - char *body; - char *source_file; - int source_lineno, flags; +static void +add_macro (char *name, char **arglist, char *body, char *source_file, + int source_lineno, int flags) { MACRO_DEF *def; @@ -163,8 +157,7 @@ add_macro (name, arglist, body, source_file, source_lineno, flags) char ** -get_brace_args (quote_single) - int quote_single; +get_brace_args (int quote_single) { char **arglist, *word; int arglist_index, arglist_size; @@ -243,9 +236,8 @@ get_brace_args (quote_single) return arglist; } -char ** -get_macro_args (def) - MACRO_DEF *def; +static char ** +get_macro_args (MACRO_DEF *def) { int i; char *word; @@ -298,9 +290,8 @@ get_macro_args (def) /* Substitute actual parameters for named parameters in body. The named parameters which appear in BODY must by surrounded reverse slashes, as in \foo\. */ -char * -apply (named, actuals, body) - char **named, **actuals, *body; +static char * +apply (char **named, char **actuals, char *body) { int i; int new_body_index, new_body_size; @@ -391,8 +382,7 @@ apply (named, actuals, body) /* Expand macro passed in DEF, a pointer to a MACRO_DEF, and return its expansion as a string. */ char * -expand_macro (def) - MACRO_DEF *def; +expand_macro (MACRO_DEF *def) { char **arglist; int num_args; @@ -422,8 +412,7 @@ expand_macro (def) /* Execute the macro passed in DEF, a pointer to a MACRO_DEF. */ void -execute_macro (def) - MACRO_DEF *def; +execute_macro (MACRO_DEF *def) { char *execution_string; int start_line = line_number, end_line; @@ -444,7 +433,8 @@ execute_macro (def) end_line = line_number; line_number = start_line; - if (macro_expansion_output_stream && !executing_string && !me_inhibit_expansion) + if (macro_expansion_output_stream + && !executing_string && !me_inhibit_expansion) { remember_itext (input_text, input_text_offset); me_execute_string (execution_string); @@ -462,21 +452,17 @@ execute_macro (def) set the ME_RECURSE flag. MACTYPE is either "macro" or "rmacro", and tells us what the matching @end should be. */ static void -define_macro (mactype, recursive) - char *mactype; - int recursive; +define_macro (char *mactype, int recursive) { - int i; - char *name, **arglist, *body, *line, *last_end; - int body_size, body_index; + int i, start; + char *name, *line; + char *last_end = NULL; + char *body = NULL; + char **arglist = NULL; + int body_size = 0, body_index = 0; int depth = 1; - int defining_line = line_number; int flags = 0; - - arglist = NULL; - body = NULL; - body_size = 0; - body_index = 0; + int defining_line = line_number; if (macro_expansion_output_stream && !executing_string) me_append_before_this_command (); @@ -485,15 +471,13 @@ define_macro (mactype, recursive) /* Get the name of the macro. This is the set of characters which are not whitespace and are not `{' immediately following the @macro. */ + start = input_text_offset; { - int start = input_text_offset; int len; - for (i = start; - (i < input_text_length) && - (input_text[i] != '{') && - (!cr_or_whitespace (input_text[i])); - i++); + for (i = start; i < input_text_length && input_text[i] != '{' + && !cr_or_whitespace (input_text[i]); + i++) ; len = i - start; name = xmalloc (1 + len); @@ -653,7 +637,7 @@ define_macro (mactype, recursive) depth--; last_end = "macro"; } - if (*line == COMMAND_PREFIX && strncmp (line + 1, "end rmacro", 9) == 0) + if (*line == COMMAND_PREFIX && strncmp (line + 1, "end rmacro", 10) == 0) { depth--; last_end = "rmacro"; @@ -697,17 +681,32 @@ define_macro (mactype, recursive) add_macro (name, arglist, body, input_filename, defining_line, flags); if (macro_expansion_output_stream && !executing_string) - remember_itext (input_text, input_text_offset); + { + /* Remember text for future expansions. */ + remember_itext (input_text, input_text_offset); + + /* Bizarrely, output the @macro itself. This is so texinfo.tex + will have a chance to read it when texi2dvi calls makeinfo -E. + The problem is that we don't really expand macros in all + contexts; a @table's @item is one. And a fix is not obvious to + me, since it appears virtually identical to any other internal + expansion. Just setting a variable in cm_item caused other + strange expansion problems. */ + write_region_to_macro_output ("@", 0, 1); + write_region_to_macro_output (mactype, 0, strlen (mactype)); + write_region_to_macro_output (" ", 0, 1); + write_region_to_macro_output (input_text, start, input_text_offset); + } } void -cm_macro () +cm_macro (void) { define_macro ("macro", 0); } void -cm_rmacro () +cm_rmacro (void) { define_macro ("rmacro", 1); } @@ -717,8 +716,7 @@ cm_rmacro () returned. */ static MACRO_DEF * -delete_macro (name) - char *name; +delete_macro (char *name) { int i; MACRO_DEF *def; @@ -737,7 +735,7 @@ delete_macro (name) } void -cm_unmacro () +cm_unmacro (void) { int i; char *line, *name; @@ -785,9 +783,7 @@ cm_unmacro () /* Set the value of POINTER's offset to OFFSET. */ ITEXT * -remember_itext (pointer, offset) - char *pointer; - int offset; +remember_itext (char *pointer, int offset) { int i; ITEXT *itext = NULL; @@ -841,8 +837,7 @@ remember_itext (pointer, offset) /* Forget the input text associated with POINTER. */ void -forget_itext (pointer) - char *pointer; +forget_itext (char *pointer) { int i; @@ -858,7 +853,7 @@ forget_itext (pointer) /* Append the text which appeared in input_text from the last offset to the character just before the command that we are currently executing. */ void -me_append_before_this_command () +me_append_before_this_command (void) { int i; @@ -870,8 +865,7 @@ me_append_before_this_command () /* Similar to execute_string, but only takes a single string argument, and remembers the input text location, etc. */ void -me_execute_string (execution_string) - char *execution_string; +me_execute_string (char *execution_string) { int saved_escape_html = escape_html; int saved_in_paragraph = in_paragraph; @@ -903,8 +897,7 @@ me_execute_string (execution_string) when we need to produce macro-expanded output for input which leaves no traces in the Info output. */ void -me_execute_string_keep_state (execution_string, append_string) - char *execution_string, *append_string; +me_execute_string_keep_state (char *execution_string, char *append_string) { int op_orig, opcol_orig, popen_orig; int fill_orig, newline_orig, indent_orig, meta_pos_orig; @@ -934,8 +927,7 @@ me_execute_string_keep_state (execution_string, append_string) /* Append the text which appears in input_text from the last offset to the current OFFSET. */ void -append_to_expansion_output (offset) - int offset; +append_to_expansion_output (int offset) { int i; ITEXT *itext = NULL; @@ -959,9 +951,7 @@ append_to_expansion_output (offset) /* Only write this input text iff it appears in our itext list. */ void -maybe_write_itext (pointer, offset) - char *pointer; - int offset; +maybe_write_itext (char *pointer, int offset) { int i; ITEXT *itext = NULL; @@ -981,9 +971,7 @@ maybe_write_itext (pointer, offset) } void -write_region_to_macro_output (string, start, end) - char *string; - int start, end; +write_region_to_macro_output (char *string, int start, int end) { if (macro_expansion_output_stream) fwrite (string + start, 1, end - start, macro_expansion_output_stream); @@ -1000,14 +988,15 @@ typedef struct alias_struct static alias_type *aliases; -/* @alias */ +/* @alias aname = cmdname */ + void -cm_alias () +cm_alias (void) { alias_type *a = xmalloc (sizeof (alias_type)); skip_whitespace (); - get_until_in_line (1, "=", &(a->alias)); + get_until_in_line (0, "=", &(a->alias)); canon_white (a->alias); discard_until ("="); @@ -1020,8 +1009,7 @@ cm_alias () /* Perform an alias expansion. Called from read_command. */ char * -alias_expand (tok) - char *tok; +alias_expand (char *tok) { alias_type *findit = aliases; @@ -1062,7 +1050,7 @@ static enclosure_stack_type *enclosure_stack; /* @definfoenclose */ void -cm_definfoenclose () +cm_definfoenclose (void) { enclosure_type *e = xmalloc (sizeof (enclosure_type)); @@ -1081,8 +1069,7 @@ cm_definfoenclose () return 1. Else return 0. */ int -enclosure_command (tok) - char *tok; +enclosure_command (char *tok) { enclosure_type *findit = enclosures; @@ -1104,8 +1091,7 @@ enclosure_command (tok) /* actually perform the enclosure expansion */ void -enclosure_expand (arg, start, end) - int arg, start, end; +enclosure_expand (int arg, int start, int end) { if (arg == START) add_word (enclosure_stack->current->before); diff --git a/contrib/texinfo/makeinfo/macro.h b/contrib/texinfo/makeinfo/macro.h index 5161084cfa91..fbc0e59e6519 100644 --- a/contrib/texinfo/makeinfo/macro.h +++ b/contrib/texinfo/makeinfo/macro.h @@ -1,5 +1,5 @@ /* macro.h -- declarations for macro.c. - $Id: macro.h,v 1.1 2002/08/25 23:38:38 karl Exp $ + $Id: macro.h,v 1.2 2004/04/11 17:56:47 karl Exp $ Copyright (C) 1998, 99 Free Software Foundation, Inc. @@ -48,24 +48,30 @@ typedef struct { #define ME_RECURSE 0x01 #define ME_QUOTE_ARG 0x02 -extern void execute_macro (); -extern MACRO_DEF *find_macro (); -extern char *expand_macro (); +extern void execute_macro (MACRO_DEF *def); +extern MACRO_DEF *find_macro (char *name); +extern char *expand_macro (MACRO_DEF *def); -extern ITEXT *remember_itext (); -extern void forget_itext (); -extern void maybe_write_itext (); -extern void write_region_to_macro_output (); -extern void append_to_expansion_output (); -extern void me_append_before_this_command (); -extern void me_execute_string (); +extern ITEXT *remember_itext (char *pointer, int offset); +extern void forget_itext (char *pointer); +extern void maybe_write_itext (char *pointer, int offset); +extern void write_region_to_macro_output (char *string, int start, int end); +extern void append_to_expansion_output (int offset); +extern void me_append_before_this_command (void); +extern void me_execute_string (char *execution_string); +extern void me_execute_string_keep_state (char *execution_string, + char *append_string); -extern char *alias_expand (); -extern int enclosure_command (); -extern void enclosure_expand (); +extern char *alias_expand (char *tok); +extern int enclosure_command (char *tok); +extern void enclosure_expand (int arg, int start, int end); /* The @commands. */ -extern void cm_macro (), cm_rmacro (), cm_unmacro (); -extern void cm_alias (), cm_definfoenclose (); +extern void cm_macro (void), cm_rmacro (void), cm_unmacro (void); +extern void cm_alias (void), cm_definfoenclose (void); + +extern int array_len (char **array); +extern void free_array (char **array); +extern char **get_brace_args (int quote_single); #endif /* not MACRO_H */ diff --git a/contrib/texinfo/makeinfo/makeinfo.c b/contrib/texinfo/makeinfo/makeinfo.c index a5e63fc49b66..22ed4c4fd99f 100644 --- a/contrib/texinfo/makeinfo/makeinfo.c +++ b/contrib/texinfo/makeinfo/makeinfo.c @@ -1,8 +1,8 @@ /* makeinfo -- convert Texinfo source into other formats. - $Id: makeinfo.c,v 1.34 2003/06/02 12:32:29 karl Exp $ + $Id: makeinfo.c,v 1.74 2004/12/19 17:15:42 karl Exp $ Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Makeinfo was authored by Brian Fox (bfox@ai.mit.edu). */ + Original author of makeinfo: Brian Fox (bfox@ai.mit.edu). */ #include "system.h" #include "getopt.h" @@ -27,6 +27,7 @@ #include "makeinfo.h" #include "cmds.h" #include "files.h" +#include "float.h" #include "footnote.h" #include "html.h" #include "index.h" @@ -34,6 +35,7 @@ #include "lang.h" #include "macro.h" #include "node.h" +#include "sectioning.h" #include "toc.h" #include "xml.h" @@ -69,10 +71,6 @@ char *output_filename = NULL; char *command_output_filename = NULL; static char *save_command_output_filename = NULL; -/* Flags which control initial output string for xrefs. */ -int px_ref_flag = 0; -int ref_flag = 0; - #define INITIAL_PARAGRAPH_SPACE 5000 int paragraph_buffer_len = INITIAL_PARAGRAPH_SPACE; @@ -135,9 +133,16 @@ int do_justification = 0; /* Nonzero means don't replace whitespace with   in HTML mode. */ int in_html_elt = 0; +/* Nonzero means we are inserting a block level HTML element that must not be + enclosed in a

    , such as

      ,
        and . */ +int in_html_block_level_elt = 0; + /* True when expanding a macro definition. */ static int executing_macro = 0; +/* True when we are inside a
      1. block of a menu. */ +static int in_menu_item = 0; + typedef struct brace_element { struct brace_element *next; @@ -149,64 +154,44 @@ typedef struct brace_element BRACE_ELEMENT *brace_stack = NULL; -extern void do_multitable (), end_multitable (); +static void convert_from_file (char *name); +static void convert_from_loaded_file (char *name); +static void convert_from_stream (FILE *stream, char *name); +static void do_flush_right_indentation (void); +static void handle_variable (int action); +static void handle_variable_internal (int action, char *name); +static void init_brace_stack (void); +static void init_internals (void); +static void pop_and_call_brace (void); +static void remember_brace (COMMAND_FUNCTION (*proc)); +static int end_of_sentence_p (void); -void push_node_filename (), pop_node_filename (); -void remember_error (); -void convert_from_stream (), convert_from_file (), convert_from_loaded_file (); -void init_internals (), init_paragraph (), init_brace_stack (); -void init_insertion_stack (), init_indices (); -void init_tag_table (), write_tag_table (), write_tag_table_internal (); -void validate_file (), validate_other_references (), split_file (); -void free_node_references (), handle_variable (); -void handle_variable_internal (); -void normalize_node_name (); -void add_anchor_name (); -void free_node_node_references (), remember_node_node_reference (); - -char **get_brace_args (); -int array_len (); -void free_array (); -static int end_of_sentence_p (); -void reader_loop (); -void remember_brace (), remember_brace_1 (); -void pop_and_call_brace (), discard_braces (); -void add_word (), add_char (), insert (), flush_output (); -void insert_string (); -void close_paragraph (); -void ignore_blank_line (); -void do_flush_right_indentation (), discard_insertions (); -void start_paragraph (), indent (); -void inhibit_output_flushing (), uninhibit_output_flushing (); -int set_paragraph_indent (); -int self_delimiting (), search_forward (); -int multitable_item (), number_of_node (); - -void me_execute_string_keep_state (); -void maybe_update_execution_strings (); - -extern char *escape_string (); -extern void insert_html_tag (); -extern void sectioning_html (); - -#if defined (VA_FPRINTF) && __STDC__ -/* Unfortunately we must use prototypes if we are to use . */ -void add_word_args (const char *, ...); -void execute_string (char *, ...); -#else -void add_word_args (); -void execute_string (); -#endif /* no prototypes */ +void maybe_update_execution_strings (char **text, unsigned int new_len); /* Error handling. */ /* Number of errors encountered. */ int errors_printed = 0; +/* Remember that an error has been printed. If more than + max_error_level have been printed, then exit the program. */ +static void +remember_error (void) +{ + errors_printed++; + if (max_error_level && (errors_printed > max_error_level)) + { + fprintf (stderr, _("Too many errors! Gave up.\n")); + flush_file_stack (); + if (errors_printed - max_error_level < 2) + cm_bye (); + xexit (1); + } +} + /* Print the last error gotten from the file system. */ int -fs_error (filename) - char *filename; +fs_error (char *filename) { remember_error (); perror (filename); @@ -329,24 +314,9 @@ warning (format, va_alist) } -/* Remember that an error has been printed. If more than - max_error_level have been printed, then exit the program. */ -void -remember_error () -{ - errors_printed++; - if (max_error_level && (errors_printed > max_error_level)) - { - fprintf (stderr, _("Too many errors! Gave up.\n")); - flush_file_stack (); - cm_bye (); - xexit (1); - } -} - /* The other side of a malformed expression. */ -void -misplaced_brace () +static void +misplaced_brace (void) { line_error (_("Misplaced %c"), '}'); } @@ -355,7 +325,7 @@ misplaced_brace () /* Display the version info of this invocation of Makeinfo. */ static void -print_version_info () +print_version_info (void) { printf ("makeinfo (GNU %s) %s\n", PACKAGE, VERSION); } @@ -364,8 +334,7 @@ print_version_info () Otherwise, just say to use --help for more info. Then exit with EXIT_VALUE. */ static void -usage (exit_value) - int exit_value; +usage (int exit_value) { if (exit_value != 0) fprintf (stderr, _("Try `%s --help' for more information.\n"), progname); @@ -389,14 +358,15 @@ General options:\n\ -v, --verbose explain what is being done.\n\ --version display version information and exit.\n"), max_error_level, reference_warning_limit); - puts ("\n"); + puts (""); /* xgettext: no-wrap */ puts (_("\ Output format selection (default is to produce Info):\n\ - --docbook output DocBook XML rather than Info.\n\ + --docbook output Docbook XML rather than Info.\n\ --html output HTML rather than Info.\n\ --xml output Texinfo XML rather than Info.\n\ + --plaintext output plain text rather than Info.\n\ ")); puts (_("\ @@ -428,7 +398,7 @@ Options for Info and plain text:\n\ --split-size=NUM split Info files at size NUM (default %d).\n"), fill_column, paragraph_start_indent, DEFAULT_SPLIT_SIZE); - puts ("\n"); + puts (""); puts (_("\ Options for HTML:\n\ @@ -436,6 +406,13 @@ Options for HTML:\n\ read stdin if FILE is -.\n\ ")); + printf (_("\ +Options for XML and Docbook:\n\ + --output-indent=VAL indent XML elements by VAL spaces (default %d).\n\ + If VAL is 0, ignorable whitespace is dropped.\n\ +"), xml_indentation_increment); + puts (""); + puts (_("\ Input file options:\n\ --commands-in-node-names allow @ commands in node names.\n\ @@ -447,16 +424,21 @@ Input file options:\n\ puts (_("\ Conditional processing in input:\n\ + --ifdocbook process @ifdocbook and @docbook even if\n\ + not generating Docbook.\n\ --ifhtml process @ifhtml and @html even if not generating HTML.\n\ --ifinfo process @ifinfo even if not generating Info.\n\ --ifplaintext process @ifplaintext even if not generating plain text.\n\ --iftex process @iftex and @tex; implies --no-split.\n\ --ifxml process @ifxml and @xml.\n\ + --no-ifdocbook do not process @ifdocbook and @docbook text.\n\ --no-ifhtml do not process @ifhtml and @html text.\n\ --no-ifinfo do not process @ifinfo text.\n\ --no-ifplaintext do not process @ifplaintext text.\n\ --no-iftex do not process @iftex and @tex text.\n\ --no-ifxml do not process @ifxml and @xml text.\n\ +\n\ + Also, for the --no-ifFORMAT options, do process @ifnotFORMAT text.\n\ ")); puts (_("\ @@ -502,6 +484,7 @@ struct option long_options[] = { "force", 0, &force, 1 }, { "help", 0, 0, 'h' }, { "html", 0, 0, 'w' }, + { "ifdocbook", 0, &process_docbook, 1 }, { "ifhtml", 0, &process_html, 1 }, { "ifinfo", 0, &process_info, 1 }, { "ifplaintext", 0, &process_plaintext, 1 }, @@ -509,6 +492,7 @@ struct option long_options[] = { "ifxml", 0, &process_xml, 1 }, { "macro-expand", 1, 0, 'E' }, { "no-headers", 0, &no_headers, 1 }, + { "no-ifdocbook", 0, &process_docbook, 0 }, { "no-ifhtml", 0, &process_html, 0 }, { "no-ifinfo", 0, &process_info, 0 }, { "no-ifplaintext", 0, &process_plaintext, 0 }, @@ -523,7 +507,9 @@ struct option long_options[] = { "number-footnotes", 0, &number_footnotes, 1 }, { "number-sections", 0, &number_sections, 1 }, { "output", 1, 0, 'o' }, + { "output-indent", 1, 0, 'i' }, { "paragraph-indent", 1, 0, 'p' }, + { "plaintext", 0, 0, 't' }, { "reference-limit", 1, 0, 'r' }, { "split-size", 1, 0, 'S'}, { "verbose", 0, &verbose_mode, 1 }, @@ -532,14 +518,24 @@ struct option long_options[] = {NULL, 0, NULL, 0} }; +/* We use handle_variable_internal for -D and -U, and it depends on + execute_string, which depends on input_filename, which is not defined + while we are handling options. :-\ So we save these defines in this + struct, and handle them later. */ +typedef struct command_line_define +{ + struct command_line_define *next; + int action; + char *define; +} COMMAND_LINE_DEFINE; + +static COMMAND_LINE_DEFINE *command_line_defines = NULL; + /* For each file mentioned in the command line, process it, turning Texinfo commands into wonderfully formatted output text. */ int -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { - extern int errors_printed; int c, ind; int reading_from_stdin = 0; @@ -547,17 +543,69 @@ main (argc, argv) /* Do not use LC_ALL, because LC_NUMERIC screws up the scanf parsing of the argument to @multicolumn. */ setlocale (LC_TIME, ""); +#ifdef LC_MESSAGES /* ultrix */ setlocale (LC_MESSAGES, ""); +#endif setlocale (LC_CTYPE, ""); setlocale (LC_COLLATE, ""); #endif +#ifdef ENABLE_NLS /* Set the text message domain. */ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); +#endif + + /* If TEXINFO_OUTPUT_FORMAT envvar is set, use it to set default output. + Can be overridden with one of the output options. */ + if (getenv ("TEXINFO_OUTPUT_FORMAT") != NULL) + { + if (STREQ (getenv ("TEXINFO_OUTPUT_FORMAT"), "docbook")) + { + splitting = 0; + html = 0; + docbook = 1; + xml = 1; + process_docbook = 1; + } + else if (STREQ (getenv ("TEXINFO_OUTPUT_FORMAT"), "html")) + { + html = 1; + docbook = 0; + xml = 0; + process_html = 1; + } + else if (STREQ (getenv ("TEXINFO_OUTPUT_FORMAT"), "info")) + { + html = 0; + docbook = 0; + xml = 0; + } + else if (STREQ (getenv ("TEXINFO_OUTPUT_FORMAT"), "plaintext")) + { + splitting = 0; + no_headers = 1; + html = 0; + docbook = 0; + xml = 0; + process_plaintext = 1; + } + else if (STREQ (getenv ("TEXINFO_OUTPUT_FORMAT"), "xml")) + { + splitting = 0; + html = 0; + docbook = 0; + xml = 1; + process_xml = 1; + } + else + fprintf (stderr, + _("%s: Ignoring unrecognized TEXINFO_OUTPUT_FORMAT value `%s'.\n"), + progname, getenv ("TEXINFO_OUTPUT_FORMAT")); + } /* Parse argument flags from the input line. */ - while ((c = getopt_long (argc, argv, "D:de:E:f:hI:o:p:P:r:s:U:vV:wx", + while ((c = getopt_long (argc, argv, "D:de:E:f:hI:i:o:p:P:r:s:t:U:vV:wx", long_options, &ind)) != EOF) { if (c == 0 && long_options[ind].flag == 0) @@ -572,13 +620,24 @@ main (argc, argv) case 'D': case 'U': /* User specified variable to set or clear. */ - handle_variable_internal ((c == 'D') ? SET : CLEAR, optarg); + if (xml && !docbook) + { + COMMAND_LINE_DEFINE *new = xmalloc (sizeof (COMMAND_LINE_DEFINE)); + new->action = (c == 'D') ? SET : CLEAR; + new->define = xstrdup (optarg); + new->next = command_line_defines; + command_line_defines = new; + } + else + handle_variable_internal ((c == 'D' ? SET : CLEAR), optarg); break; case 'd': /* --docbook */ splitting = 0; xml = 1; docbook = 1; + html = 0; + process_docbook = 1; break; case 'e': /* --error-limit */ @@ -586,7 +645,7 @@ main (argc, argv) { fprintf (stderr, _("%s: %s arg must be numeric, not `%s'.\n"), - "--error-limit", progname, optarg); + progname, "--error-limit", optarg); usage (1); } break; @@ -598,10 +657,13 @@ main (argc, argv) macro_expansion_output_stream = strcmp (optarg, "-") == 0 ? stdout : fopen (optarg, "w"); if (!macro_expansion_output_stream) - error (_("Couldn't open macro expansion output `%s'"), optarg); + error (_("%s: could not open macro expansion output `%s'"), + progname, optarg); } else - error (_("Cannot specify more than one macro expansion output")); + fprintf (stderr, + _("%s: ignoring second macro expansion output `%s'.\n"), + progname, optarg); break; case 'f': /* --fill-column */ @@ -609,7 +671,7 @@ main (argc, argv) { fprintf (stderr, _("%s: %s arg must be numeric, not `%s'.\n"), - "--fill-column", progname, optarg); + progname, "--fill-column", optarg); usage (1); } break; @@ -620,14 +682,17 @@ main (argc, argv) case 'I': /* Append user-specified dir to include file path. */ - if (!include_files_path) - include_files_path = xstrdup ("."); + append_to_include_path (optarg); + break; - include_files_path = (char *) - xrealloc (include_files_path, - 2 + strlen (include_files_path) + strlen (optarg)); - strcat (include_files_path, PATH_SEP); - strcat (include_files_path, optarg); + case 'i': + if (sscanf (optarg, "%d", &xml_indentation_increment) != 1) + { + fprintf (stderr, + _("%s: %s arg must be numeric, not `%s'.\n"), + progname, "--output-indent", optarg); + usage (1); + } break; case 'o': /* --output */ @@ -647,23 +712,7 @@ main (argc, argv) case 'P': /* Prepend user-specified include dir to include path. */ - if (!include_files_path) - { - include_files_path = xstrdup (optarg); - include_files_path = xrealloc (include_files_path, - strlen (include_files_path) + 3); /* 3 for ":.\0" */ - strcat (strcat (include_files_path, PATH_SEP), "."); - } - else - { - char *tmp = xstrdup (include_files_path); - include_files_path = xrealloc (include_files_path, - strlen (include_files_path) + strlen (optarg) + 2); /* 2 for ":\0" */ - strcpy (include_files_path, optarg); - strcat (include_files_path, ":"); - strcat (include_files_path, tmp); - free (tmp); - } + prepend_to_include_path (optarg); break; case 'r': /* --reference-limit */ @@ -671,7 +720,7 @@ main (argc, argv) { fprintf (stderr, _("%s: %s arg must be numeric, not `%s'.\n"), - "--reference-limit", progname, optarg); + progname, "--reference-limit", optarg); usage (1); } break; @@ -680,7 +729,7 @@ main (argc, argv) if (set_footnote_style (optarg) < 0) { fprintf (stderr, - _("%s: --footnote-style arg must be `separate' or `end', not `%s'.\n"), + _("%s: --footnote-style arg must be `separate' or `end', not `%s'.\n"), progname, optarg); usage (1); } @@ -692,11 +741,20 @@ main (argc, argv) { fprintf (stderr, _("%s: %s arg must be numeric, not `%s'.\n"), - "--split-size", progname, optarg); + progname, "--split-size", optarg); usage (1); } break; + case 't': /* --plaintext */ + splitting = 0; + no_headers = 1; + html = 0; + docbook = 0; + xml = 0; + process_plaintext = 1; + break; + case 'v': verbose_mode++; break; @@ -704,21 +762,24 @@ main (argc, argv) case 'V': /* --version */ print_version_info (); puts (""); - printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\ -There is NO warranty. You may redistribute this software\n\ + puts ("Copyright (C) 2004 Free Software Foundation, Inc."); + printf (_("There is NO warranty. You may redistribute this software\n\ under the terms of the GNU General Public License.\n\ -For more information about these matters, see the files named COPYING.\n"), - "2003"); +For more information about these matters, see the files named COPYING.\n")); xexit (0); break; case 'w': /* --html */ + xml = 0; + docbook = 0; html = 1; process_html = 1; break; case 'x': /* --xml */ splitting = 0; + html = 0; + docbook = 0; xml = 1; process_xml = 1; break; @@ -729,6 +790,9 @@ For more information about these matters, see the files named COPYING.\n"), } } + if (macro_expansion_output_stream) + validating = 0; + if (!validating) expensive_validation = 0; @@ -746,6 +810,10 @@ For more information about these matters, see the files named COPYING.\n"), if (no_headers) { + /* If the user did not specify an output file, use stdout. */ + if (!command_output_filename) + command_output_filename = xstrdup ("-"); + if (html && splitting && !STREQ (command_output_filename, "-")) { /* --no-headers --no-split --html indicates confusion. */ fprintf (stderr, @@ -756,10 +824,6 @@ For more information about these matters, see the files named COPYING.\n"), /* --no-headers implies --no-split. */ splitting = 0; - - /* If the user did not specify an output file, use stdout. */ - if (!command_output_filename) - command_output_filename = xstrdup ("-"); } if (process_info == -1) @@ -790,7 +854,6 @@ For more information about these matters, see the files named COPYING.\n"), xexit (errors_printed ? 2 : 0); return 0; /* Avoid bogus warnings. */ } - /* Hacking tokens and strings. */ @@ -808,8 +871,8 @@ For more information about these matters, see the files named COPYING.\n"), && (c) != '^' \ ) -char * -read_token () +static char * +read_token (void) { int i, character; char *result; @@ -841,8 +904,7 @@ read_token () /* Return nonzero if CHARACTER is self-delimiting. */ int -self_delimiting (character) - int character; +self_delimiting (int character) { /* @; and @\ are not Texinfo commands, but they are listed here anyway. I don't know why. --karl, 10aug96. */ @@ -851,35 +913,35 @@ self_delimiting (character) /* Clear whitespace from the front and end of string. */ void -canon_white (string) - char *string; +canon_white (char *string) { - int len = strlen (string); - int x; + char *p = string; + unsigned len; - if (!len) + if (!*p) return; - for (x = 0; x < len; x++) + do { - if (!cr_or_whitespace (string[x])) - { - strcpy (string, string + x); - break; - } + if (!cr_or_whitespace (*p)) + break; + ++p; } - len = strlen (string); - if (len) - len--; - while (len > -1 && cr_or_whitespace (string[len])) - len--; - string[len + 1] = 0; + while (*p); + + len = strlen (p); + while (len && cr_or_whitespace (p[len-1])) + --len; + + if (p != string) + memmove (string, p, len); + + string[len] = 0; } /* Bash STRING, replacing all whitespace with just one space. */ void -fix_whitespace (string) - char *string; +fix_whitespace (char *string) { char *temp = xmalloc (strlen (string) + 1); int string_index = 0; @@ -909,8 +971,7 @@ fix_whitespace (string) /* Discard text until the desired string is found. The string is included in the discarded text. */ void -discard_until (string) - char *string; +discard_until (char *string) { int temp = search_forward (string, input_text_offset); @@ -924,18 +985,26 @@ discard_until (string) if (temp < 0) { - input_text_offset = input_text_length - strlen (string); - + /* not found, move current position to end of string */ + input_text_offset = input_text_length; if (strcmp (string, "\n") != 0) - { - line_error (_("Expected `%s'"), string); + { /* Give a more descriptive feedback, if we are looking for ``@end '' + during macro execution. That means someone used a multiline + command as an argument to, say, @section ... style commands. */ + char *end_block = xmalloc (8); + sprintf (end_block, "\n%cend ", COMMAND_PREFIX); + if (executing_string && strstr (string, end_block)) + line_error (_("Multiline command %c%s used improperly"), + COMMAND_PREFIX, command); + else + line_error (_("Expected `%s'"), string); + free (end_block); return; } } else - input_text_offset = temp; - - input_text_offset += strlen (string); + /* found, move current position to after the found string */ + input_text_offset = temp + strlen (string); } /* Read characters from the file until we are at MATCH. @@ -943,8 +1012,7 @@ discard_until (string) On exit input_text_offset is after the match string. Return the offset where the string starts. */ int -get_until (match, string) - char *match, **string; +get_until (char *match, char **string) { int len, current_point, x, new_point, tem; @@ -977,8 +1045,7 @@ get_until (match, string) /* Replace input_text[FROM .. TO] with its expansion. */ void -replace_with_expansion (from, to) - int from, *to; +replace_with_expansion (int from, int *to) { char *xp; unsigned xp_len, new_len; @@ -1054,9 +1121,7 @@ replace_with_expansion (from, to) expand the text before looking for MATCH for those cases where MATCH might be produced by some macro. */ void -get_until_in_line (expand, match, string) - int expand; - char *match, **string; +get_until_in_line (int expand, char *match, char **string) { int real_bottom = input_text_length; int limit = search_forward ("\n", input_text_offset); @@ -1088,9 +1153,7 @@ get_until_in_line (expand, match, string) } void -get_rest_of_line (expand, string) - int expand; - char **string; +get_rest_of_line (int expand, char **string) { xml_no_para ++; if (expand) @@ -1121,7 +1184,7 @@ get_rest_of_line (expand, string) /* Backup the input pointer to the previous character, keeping track of the current line number. */ void -backup_input_pointer () +backup_input_pointer (void) { if (input_text_offset) { @@ -1134,8 +1197,7 @@ backup_input_pointer () /* Read characters from the file until we are at MATCH or closing brace. Place the characters read into STRING. */ void -get_until_in_braces (match, string) - char *match, **string; +get_until_in_braces (char *match, char **string) { char *temp; int i, brace = 0; @@ -1192,8 +1254,8 @@ static char *suffixes[] = { NULL }; -void -initialize_conversion () +static void +initialize_conversion (void) { init_tag_table (); init_indices (); @@ -1207,16 +1269,11 @@ initialize_conversion () output_position = 0; } -typedef struct generic_list { - struct generic_list *next; -} GENERIC_LIST; - /* Reverse the chain of structures in LIST. Output the new head of the chain. You should always assign the output value of this function to something, or you will lose the chain. */ GENERIC_LIST * -reverse_list (list) - GENERIC_LIST *list; +reverse_list (GENERIC_LIST *list) { GENERIC_LIST *next; GENERIC_LIST *prev = NULL; @@ -1237,10 +1294,8 @@ reverse_list (list) /* Convert the Texinfo file coming from the open stream STREAM. Assume the source of the stream is named NAME. */ -void -convert_from_stream (stream, name) - FILE *stream; - char *name; +static void +convert_from_stream (FILE *stream, char *name) { char *buffer = NULL; int buffer_offset = 0, buffer_size = 0; @@ -1287,13 +1342,15 @@ convert_from_stream (stream, name) convert_from_loaded_file (name); } -void -convert_from_file (name) - char *name; +static void +convert_from_file (char *name) { int i; char *filename = xmalloc (strlen (name) + 50); + /* Prepend file directory to the search path, so relative links work. */ + prepend_to_include_path (pathname_part (name)); + initialize_conversion (); /* Try to load the file specified by NAME, concatenated with our @@ -1304,7 +1361,7 @@ convert_from_file (name) strcpy (filename, name); strcat (filename, suffixes[i]); - if (find_and_load (filename)) + if (find_and_load (filename, 1)) break; if (!suffixes[i][0] && strrchr (filename, '.')) @@ -1325,6 +1382,38 @@ convert_from_file (name) input_filename = filename; convert_from_loaded_file (name); + + /* Pop the prepended path, so multiple filenames in the + command line do not screw each others include paths. */ + pop_path_from_include_path (); +} + +static int +create_html_directory (char *dir, int can_remove_file) +{ + struct stat st; + + /* Already exists. */ + if (stat (dir, &st) == 0) + { + /* And it's a directory, so silently reuse it. */ + if (S_ISDIR (st.st_mode)) + return 1; + /* Not a directory, so move it out of the way if we are allowed. */ + else if (can_remove_file) + { + if (unlink (dir) != 0) + return 0; + } + else + return 0; + } + + if (mkdir (dir, 0777) == 0) + /* Success! */ + return 1; + else + return 0; } /* Given OUTPUT_FILENAME == ``/foo/bar/baz.html'', return @@ -1339,13 +1428,11 @@ convert_from_file (name) foo.whatever unchanged. */ static char * -insert_toplevel_subdirectory (output_filename) - char *output_filename; +insert_toplevel_subdirectory (char *output_filename) { static const char index_name[] = "index.html"; char *dir, *subdir, *base, *basename, *p; char buf[PATH_MAX]; - struct stat st; const int index_len = sizeof (index_name) - 1; strcpy (buf, output_filename); @@ -1375,41 +1462,34 @@ insert_toplevel_subdirectory (output_filename) if (strlen (dir)) strcat (output_filename, "/"); strcat (output_filename, subdir); - if ((mkdir (output_filename, 0777) == -1 && errno != EEXIST) - /* output_filename might exist, but be a non-directory. */ - || (stat (output_filename, &st) == 0 && !S_ISDIR (st.st_mode))) - { /* that failed, try subdir name with .html */ + + /* First try, do not remove existing file. */ + if (!create_html_directory (output_filename, 0)) + { + /* That failed, try subdir name with .html. + Remove it if it exists. */ strcpy (output_filename, dir); if (strlen (dir)) strcat (output_filename, "/"); strcat (output_filename, basename); - if (mkdir (output_filename, 0777) == -1) - { - const char *errmsg = strerror (errno); - if ((errno == EEXIST -#ifdef __MSDOS__ - || errno == EACCES -#endif - ) - && (stat (output_filename, &st) == 0 && !S_ISDIR (st.st_mode))) - errmsg = _("File exists, but is not a directory"); + if (!create_html_directory (output_filename, 1)) + { + /* Last try failed too :-\ */ line_error (_("Can't create directory `%s': %s"), - output_filename, errmsg); + output_filename, strerror (errno)); xexit (1); } - strcat (output_filename, "/"); } - else if (strlen (subdir)) - strcat (output_filename, "/"); + + strcat (output_filename, "/"); strcat (output_filename, index_name); return output_filename; } /* FIXME: this is way too hairy */ -void -convert_from_loaded_file (name) - char *name; +static void +convert_from_loaded_file (char *name) { char *real_output_filename = NULL; @@ -1476,8 +1556,6 @@ convert_from_loaded_file (name) if (!command_output_filename) { get_until ("\n", &output_filename); /* read rest of line */ - if (xml && !docbook) - xml_begin_document (output_filename); if (html || xml) { /* Change any extension to .html or .xml. */ char *html_name, *directory_part, *basename_part, *temp; @@ -1553,6 +1631,9 @@ convert_from_loaded_file (name) set_current_output_filename (real_output_filename); + if (xml && !docbook) + xml_begin_document (filename_part (output_filename)); + if (verbose_mode) printf (_("Making %s file `%s' from `%s'.\n"), no_headers ? "text" @@ -1593,6 +1674,19 @@ convert_from_loaded_file (name) output_filename, VERSION, input_filename); close_paragraph (); + + if (xml && !docbook) + { + /* Just before the real main loop, let's handle the defines. */ + COMMAND_LINE_DEFINE *temp; + + for (temp = command_line_defines; temp; temp = temp->next) + { + handle_variable_internal (temp->action, temp->define); + free(temp->define); + } + } + reader_loop (); if (xml) xml_end_document (); @@ -1611,7 +1705,8 @@ finished: && FILENAME_CMP (macro_expansion_filename, NULL_DEVICE) != 0 && FILENAME_CMP (macro_expansion_filename, ALSO_NULL_DEVICE) != 0) { - fprintf (stderr, _("%s: Removing macro output file `%s' due to errors; use --force to preserve.\n"), + fprintf (stderr, +_("%s: Removing macro output file `%s' due to errors; use --force to preserve.\n"), progname, macro_expansion_filename); if (unlink (macro_expansion_filename) < 0) perror (macro_expansion_filename); @@ -1621,15 +1716,10 @@ finished: if (output_stream) { output_pending_notes (); - if (tag_table) - { - tag_table = (TAG_ENTRY *) reverse_list (tag_table); - if (!no_headers && !html) - write_tag_table (); - } if (html) { + no_indent = 1; start_paragraph (); add_word ("\n"); close_paragraph (); @@ -1638,14 +1728,19 @@ finished: /* maybe we want local variables in info output. */ { char *trailer = info_trailer (); - if (trailer) + if (!xml && !docbook && trailer) { + if (html) + insert_string ("\n"); } } - flush_output (); /* in case there was no @bye */ + /* Write stuff makeinfo generates after @bye, ie. info_trailer. */ + flush_output (); if (output_stream != stdout) fclose (output_stream); @@ -1654,19 +1749,28 @@ finished: if (validating) validate_file (tag_table); - /* If we need to output the table of contents, do it now. */ - if (contents_filename || shortcontents_filename) - toc_update (); + handle_delayed_writes (); + + if (tag_table) + { + tag_table = (TAG_ENTRY *) reverse_list ((GENERIC_LIST *) tag_table); + if (!no_headers && !html && !STREQ (current_output_filename, "-")) + write_tag_table (real_output_filename); + } if (splitting && !html && (!errors_printed || force)) - split_file (real_output_filename, split_size); + { + clean_old_split_files (real_output_filename); + split_file (real_output_filename, split_size); + } else if (errors_printed && !force && strcmp (real_output_filename, "-") != 0 && FILENAME_CMP (real_output_filename, NULL_DEVICE) != 0 && FILENAME_CMP (real_output_filename, ALSO_NULL_DEVICE) != 0) { /* If there were errors, and no --force, remove the output. */ - fprintf (stderr, _("%s: Removing output file `%s' due to errors; use --force to preserve.\n"), + fprintf (stderr, + _("%s: Removing output file `%s' due to errors; use --force to preserve.\n"), progname, real_output_filename); if (unlink (real_output_filename) < 0) perror (real_output_filename); @@ -1674,33 +1778,35 @@ finished: } free (real_output_filename); } - - -/* If enable_encoding and document_encoding are both set, return a Local - Variables section (as a malloc-ed string) so that Emacs' locale - features can work. Else return NULL. */ - +/* If enable_encoding is set and @documentencoding is used, return a + Local Variables section (as a malloc-ed string) so that Emacs' + locale features can work. Else return NULL. */ char * -info_trailer () +info_trailer (void) { - if (!enable_encoding || document_encoding_code <= US_ASCII) + char *encoding; + + if (!enable_encoding) return NULL; - { + encoding = current_document_encoding (); + + if (encoding && *encoding) + { #define LV_FMT "\n\037\nLocal Variables:\ncoding: %s\nEnd:\n" - char *enc_name = encoding_table[document_encoding_code].encname; - char *lv = xmalloc (sizeof (LV_FMT) + strlen (enc_name)); - sprintf (lv, LV_FMT, enc_name); - return lv; - } + char *lv = xmalloc (sizeof (LV_FMT) + strlen (encoding)); + sprintf (lv, LV_FMT, encoding); + free (encoding); + return lv; + } + + free (encoding); + return NULL; } - - void -free_and_clear (pointer) - char **pointer; +free_and_clear (char **pointer) { if (*pointer) { @@ -1710,8 +1816,8 @@ free_and_clear (pointer) } /* Initialize some state. */ -void -init_internals () +static void +init_internals (void) { free_and_clear (&output_filename); free_and_clear (&command); @@ -1731,9 +1837,9 @@ init_internals () } void -init_paragraph () +init_paragraph (void) { - free_and_clear (&output_paragraph); + free (output_paragraph); output_paragraph = xmalloc (paragraph_buffer_len); output_paragraph[0] = 0; output_paragraph_offset = 0; @@ -1747,7 +1853,7 @@ init_paragraph () menu line. */ static void -handle_menu_entry () +handle_menu_entry (void) { char *tem; @@ -1773,23 +1879,21 @@ handle_menu_entry () if (had_menu_commentary) { - add_word ("