Index: contrib/texinfo/AUTHORS =================================================================== diff --git a/head/contrib/texinfo/AUTHORS b/head/contrib/texinfo/AUTHORS deleted file mode 10644 --- a/head/contrib/texinfo/AUTHORS (revision 267841) +++ /dev/null (working copy) @@ -1,31 +0,0 @@ -$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. - -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 the Texinfo distribution are copied from other -locations, no author information is given for those. See util/srclist*. Index: contrib/texinfo/COPYING =================================================================== diff --git a/head/contrib/texinfo/COPYING b/head/contrib/texinfo/COPYING deleted file mode 10644 --- a/head/contrib/texinfo/COPYING (revision 267841) +++ /dev/null (working copy) @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 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. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program 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. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public 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. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. Index: contrib/texinfo/ChangeLog =================================================================== diff --git a/head/contrib/texinfo/ChangeLog b/head/contrib/texinfo/ChangeLog deleted file mode 10644 --- a/head/contrib/texinfo/ChangeLog (revision 267841) +++ /dev/null (working copy) @@ -1,5008 +0,0 @@ -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_html_block_elt ("\n"); - close_insertion_paragraph (); - break; - - /* Handle the @defun insertions with this default clause. */ - default: - { - int base_type; - - if (type < defcv || type > defvr) - line_error ("end_insertion internal error: type=%d", type); - - base_type = get_base_type (type); - switch (base_type) - { - case deffn: - case defvr: - case deftp: - case deftypecv: - case deftypefn: - case deftypevr: - case defcv: - case defop: - case deftypemethod: - case deftypeop: - case deftypeivar: - if (html) - { - 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)... */ - - current_indent -= default_indentation_increment; - close_insertion_paragraph (); - } - break; - - } - - if (current_indent < 0) - line_error ("end_insertion internal error: current indent=%d", - current_indent); -} - -/* Insertions cannot cross certain boundaries, such as node beginnings. In - code that creates such boundaries, you should call `discard_insertions' - before doing anything else. It prints the errors for you, and cleans up - the insertion stack. - - With nonzero SPECIALS_OK argument, allows unmatched - @if... conditionals, otherwise not. This is because conditionals can - cross node boundaries. Always happens with the @top node, for example. */ -void -discard_insertions (int specials_ok) -{ - int real_line_number = line_number; - while (insertion_stack) - { - 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 - { - const char *offender = insertion_type_pname (insertion_stack->insertion); - - file_line_error (insertion_stack->filename, - insertion_stack->line_number, - _("No matching `%cend %s'"), COMMAND_PREFIX, - offender); - pop_insertion (); - } - } - line_number = real_line_number; -} - -/* Insertion (environment) commands. */ - -void -cm_quotation (void) -{ - /* We start the blockquote element in the insertion. */ - begin_insertion (quotation); -} - -void -cm_example (void) -{ - if (docbook && current_insertion_type () == floatenv) - xml_begin_docbook_float (FLOATEXAMPLE); - - if (xml) - { - /* 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 (void) -{ - if (docbook && current_insertion_type () == floatenv) - xml_begin_docbook_float (FLOATEXAMPLE); - - if (xml) - { - /* 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 (void) -{ - if (docbook && current_insertion_type () == floatenv) - xml_begin_docbook_float (FLOATEXAMPLE); - - if (xml) - { - /* 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 (void) -{ - if (docbook && current_insertion_type () == floatenv) - xml_begin_docbook_float (FLOATEXAMPLE); - - if (xml) - { - /* 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 (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 (void) -{ - begin_insertion (copying); -} - -/* Not an insertion, despite the name, but it goes with cm_copying. */ -void -cm_insert_copying (void) -{ - 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 (); - } -} - -void -cm_format (void) -{ - if (xml) - { - if (docbook && xml_in_bookinfo) - { - xml_insert_element (ABSTRACT, START); - xml_in_abstract = 1; - } - else - { - /* 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 (void) -{ - if (xml) - { - /* 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 (void) -{ - if (xml) - { - /* 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 (void) -{ - if (xml) - { - /* 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 (void) -{ - if (html || xml || no_headers) - command_name_condition (); - else - begin_insertion (direntry); -} - -void -cm_documentdescription (void) -{ - if (html) - begin_insertion (documentdescription); - - else if (xml) - { - xml_insert_element (DOCUMENTDESCRIPTION, START); - begin_insertion (documentdescription); - } - - else - command_name_condition (); -} - - -void -cm_itemize (void) -{ - begin_insertion (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 (int type, char *default_string) -{ - get_until_in_line (0, ".", &enumeration_arg); - canon_white (enumeration_arg); - - if (!*enumeration_arg) - { - free (enumeration_arg); - enumeration_arg = xstrdup (default_string); - } - - if (!isdigit (*enumeration_arg) && !isletter (*enumeration_arg)) - { - warning (_("%s requires letter or digit"), insertion_type_pname (type)); - - switch (type) - { - case enumerate: - default_string = "1"; - break; - } - enumeration_arg = xstrdup (default_string); - } - begin_insertion (type); -} - -void -cm_enumerate (void) -{ - do_enumeration (enumerate, "1"); -} - -/* Handle verbatim environment: - find_end_verbatim == 0: process until end of file - find_end_verbatim != 0: process until 'COMMAND_PREFIXend verbatim' - or end of file - - We cannot simply copy input stream onto output stream; as the - verbatim environment may be encapsulated in an @example environment, - for example. */ -void -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; - - 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++; - last_char_was_newline = 0; - - /* No indentation: this is verbatim after all - If you want indent, enclose @verbatim in @example - current_indent += default_indentation_increment; - */ - - if (html) - { /* 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,
    -                       sizeof (END_VERBATIM)-1))
    -        {
    -          input_text_offset += sizeof (END_VERBATIM);
    -          seen_end = 1;
    -          break;
    -        }
    -
    -      if (html && character == '&' && escape_html)
    -        add_word ("&");
    -      else if (html && character == '<' && escape_html)
    -        add_word ("<");
    -      else
    -        add_char (character);
    -
    -      input_text_offset++;
    -    }
    -
    -  if (find_end_verbatim && !seen_end)
    -    warning (_("end of file inside verbatim block"));
    -
    -  if (html)
    -    { /* 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; - inhibit_paragraph_indentation = save_inhibit_paragraph_indentation; -} - -void -cm_verbatim (void) -{ - handle_verbatim_environment (1); -} - -void -cm_table (void) -{ - begin_insertion (table); -} - -void -cm_multitable (void) -{ - begin_insertion (multitable); /* @@ */ -} - -void -cm_ftable (void) -{ - begin_insertion (ftable); -} - -void -cm_vtable (void) -{ - begin_insertion (vtable); -} - -void -cm_group (void) -{ - begin_insertion (group); -} - -/* Insert raw HTML (no escaping of `<' etc.). */ -void -cm_html (int arg) -{ - if (process_html) - begin_insertion (rawhtml); - else - command_name_condition (); -} - -void -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); - else - command_name_condition (); -} - -void -cm_ifnothtml (void) -{ - if (!process_html) - begin_insertion (ifnothtml); - else - command_name_condition (); -} - - -void -cm_ifinfo (void) -{ - if (process_info) - begin_insertion (ifinfo); - else - command_name_condition (); -} - -void -cm_ifnotinfo (void) -{ - if (!process_info) - begin_insertion (ifnotinfo); - else - command_name_condition (); -} - - -void -cm_ifplaintext (void) -{ - if (process_plaintext) - begin_insertion (ifplaintext); - else - command_name_condition (); -} - -void -cm_ifnotplaintext (void) -{ - if (!process_plaintext) - begin_insertion (ifnotplaintext); - else - command_name_condition (); -} - - -void -cm_tex (void) -{ - if (process_tex) - begin_insertion (rawtex); - else - command_name_condition (); -} - -void -cm_iftex (void) -{ - if (process_tex) - begin_insertion (iftex); - else - command_name_condition (); -} - -void -cm_ifnottex (void) -{ - if (!process_tex) - begin_insertion (ifnottex); - else - command_name_condition (); -} - -void -cm_ifxml (void) -{ - if (process_xml) - begin_insertion (ifxml); - else - command_name_condition (); -} - -void -cm_ifnotxml (void) -{ - if (!process_xml) - begin_insertion (ifnotxml); - else - command_name_condition (); -} - - -/* 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 (void) -{ - begin_insertion (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 (void) -{ - begin_insertion (flushright); -} - -void -cm_menu (void) -{ - 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?")); - /* Include @top command so we can construct the implicit node tree. */ - execute_string ("@node top\n@top Top\n"); - } - begin_insertion (menu); -} - -void -cm_detailmenu (void) -{ - 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 (void) -{ - char *temp; - int type; - - get_rest_of_line (0, &temp); - - if (!insertion_level) - { - line_error (_("Unmatched `%c%s'"), COMMAND_PREFIX, command); - return; - } - - if (temp[0] == 0) - line_error (_("`%c%s' needs something after it"), COMMAND_PREFIX, command); - - type = find_type_from_name (temp); - - if (type == bad_type) - { - line_error (_("Bad argument `%s' to `@%s', using `%s'"), - temp, command, insertion_type_pname (current_insertion_type ())); - } - if (xml && type == menu) /* fixme */ - { - xml_end_menu (); - } - end_insertion (type); - free (temp); -} - -/* @itemx, @item. */ - -static int itemx_flag = 0; - -/* Return whether CMD takes a brace-delimited {arg}. */ -int -command_needs_braces (char *cmd) -{ - int i; - for (i = 0; command_table[i].name; i++) - { - if (STREQ (command_table[i].name, cmd)) - return command_table[i].argument_in_braces == BRACE_ARGS; - } - - return 0; /* macro or alias */ -} - - -void -cm_item (void) -{ - char *rest_of_line, *item_func; - - /* Can only hack "@item" while inside of an insertion. */ - if (insertion_level) - { - INSERTION_ELT *stack = insertion_stack; - int original_input_text_offset; - - skip_whitespace (); - original_input_text_offset = input_text_offset; - - get_rest_of_line (0, &rest_of_line); - item_func = current_item_function (); - - /* Do the right thing depending on which insertion function is active. */ - switch_top: - switch (stack->insertion) - { - case multitable: - multitable_item (); - /* Support text directly after the @item. */ - if (*rest_of_line) - { - line_number--; - input_text_offset = original_input_text_offset; - } - break; - - case ifclear: - case ifhtml: - case ifinfo: - case ifnothtml: - case ifnotinfo: - case ifnotplaintext: - case ifnottex: - case ifnotxml: - case ifplaintext: - case ifset: - case iftex: - case ifxml: - case rawdocbook: - case rawhtml: - case rawxml: - case rawtex: - case tex: - case cartouche: - stack = stack->next; - if (!stack) - goto no_insertion; - else - goto switch_top; - break; - - case menu: - case quotation: - case example: - case smallexample: - case lisp: - case smalllisp: - case format: - case smallformat: - case display: - case smalldisplay: - case group: - line_error (_("@%s not meaningful inside `@%s' block"), - command, - insertion_type_pname (current_insertion_type ())); - break; - - case itemize: - case enumerate: - if (itemx_flag) - { - line_error (_("@itemx not meaningful inside `%s' block"), - insertion_type_pname (current_insertion_type ())); - } - else - { - if (html) - add_html_block_elt ("
  • "); - else if (xml) - xml_begin_item (); - else - { - start_paragraph (); - kill_self_indent (-1); - filling_enabled = indented_fill = 1; - - if (current_item_function ()) - { - output_column = current_indent - 2; - indent (output_column); - - /* The item marker can be given with or without - braces -- @bullet and @bullet{} are both ok. - Or it might be something that doesn't take - braces at all, such as "o" or "#" or "@ ". - Thus, only supply braces if the item marker is - a command, they haven't supplied braces - themselves, and we know it needs them. */ - if (item_func && *item_func) - { - if (*item_func == COMMAND_PREFIX - && item_func[strlen (item_func) - 1] != '}' - && command_needs_braces (item_func + 1)) - execute_string ("%s{}", item_func); - else - execute_string ("%s", item_func); - } - insert (' '); - output_column++; - } - else - enumerate_item (); - - /* Special hack. This makes `close_paragraph' a no-op until - `start_paragraph' has been called. */ - must_start_paragraph = 1; - } - - /* Handle text directly after the @item. */ - if (*rest_of_line) - { - line_number--; - input_text_offset = original_input_text_offset; - } - } - break; - - case table: - case ftable: - case vtable: - if (html) - { /* 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. */ - 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 - this is the first
    after the
    , or if we are - converting @itemx. - - 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 && 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_html_block_elt ("
    "); - if (item_func && *item_func) - execute_string ("%s{%s}", item_func, rest_of_line); - else - execute_string ("%s", rest_of_line); - - if (current_insertion_type () == ftable) - execute_string ("%cfindex %s\n", COMMAND_PREFIX, rest_of_line); - - if (current_insertion_type () == vtable) - execute_string ("%cvindex %s\n", COMMAND_PREFIX, rest_of_line); - - 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 - execute_string ("%s", rest_of_line); - xml_continue_table_item (); - } - else - { - /* We need this to determine if we have two @item's in a row - (see test just below). */ - static int last_item_output_position = 0; - - /* Get rid of extra characters. */ - kill_self_indent (-1); - - /* If we have one @item followed directly by another @item, - we need to insert a blank line. This is not true for - @itemx, though. */ - if (!itemx_flag && last_item_output_position == output_position) - insert ('\n'); - - /* `close_paragraph' almost does what we want. The problem - is when paragraph_is_open, and last_char_was_newline, and - the last newline has been turned into a space, because - filling_enabled. I handle it here. */ - if (last_char_was_newline && filling_enabled && - paragraph_is_open) - insert ('\n'); - close_paragraph (); - -#if defined (INDENT_PARAGRAPHS_IN_TABLE) - /* Indent on a new line, but back up one indentation level. */ - { - int save = inhibit_paragraph_indentation; - inhibit_paragraph_indentation = 1; - /* At this point, inserting any non-whitespace character will - force the existing indentation to be output. */ - add_char ('i'); - inhibit_paragraph_indentation = save; - } -#else /* !INDENT_PARAGRAPHS_IN_TABLE */ - add_char ('i'); -#endif /* !INDENT_PARAGRAPHS_IN_TABLE */ - - output_paragraph_offset--; - kill_self_indent (default_indentation_increment + 1); - - /* Add item's argument to the line. */ - filling_enabled = 0; - if (item_func && *item_func) - execute_string ("%s{%s}", item_func, rest_of_line); - else - execute_string ("%s", rest_of_line); - - if (current_insertion_type () == ftable) - execute_string ("%cfindex %s\n", COMMAND_PREFIX, rest_of_line); - else if (current_insertion_type () == vtable) - execute_string ("%cvindex %s\n", COMMAND_PREFIX, rest_of_line); - - /* Start a new line, and let start_paragraph () - do the indenting of it for you. */ - close_single_paragraph (); - indented_fill = filling_enabled = 1; - last_item_output_position = output_position; - } - } - free (rest_of_line); - } - else - { - no_insertion: - line_error (_("%c%s found outside of an insertion block"), - COMMAND_PREFIX, command); - } -} - -void -cm_itemx (void) -{ - itemx_flag++; - cm_item (); - itemx_flag--; -} - -int headitem_flag = 0; - -void -cm_headitem (void) -{ - headitem_flag = 1; - cm_item (); -} Index: contrib/texinfo/makeinfo/insertion.h =================================================================== diff --git a/head/contrib/texinfo/makeinfo/insertion.h b/head/contrib/texinfo/makeinfo/insertion.h deleted file mode 10644 --- a/head/contrib/texinfo/makeinfo/insertion.h (revision 267841) +++ /dev/null (working copy) @@ -1,78 +0,0 @@ -/* insertion.h -- declarations for insertion.c. - $Id: insertion.h,v 1.10 2004/04/11 17:56:47 karl Exp $ - - 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef INSERTION_H -#define INSERTION_H - -/* Must match list in insertion.c. */ -enum insertion_type -{ - cartouche, copying, defcv, deffn, defivar, defmac, defmethod, defop, - defopt, defspec, deftp, deftypecv, deftypefn, deftypefun, deftypeivar, - deftypemethod, deftypeop, deftypevar, deftypevr, defun, defvar, defvr, - detailmenu, direntry, display, documentdescription, enumerate, - 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 -{ - struct istack_elt *next; - char *item_function; - char *filename; - int line_number; - int filling_enabled; - int indented_fill; - int insertion; - int inhibited; - int in_fixed_width_font; -} INSERTION_ELT; - -extern int insertion_level; -extern INSERTION_ELT *insertion_stack; -extern int in_menu; -extern int in_detailmenu; -extern int had_menu_commentary; -extern int in_paragraph; - -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 */ Index: contrib/texinfo/makeinfo/lang.c =================================================================== diff --git a/head/contrib/texinfo/makeinfo/lang.c b/head/contrib/texinfo/makeinfo/lang.c deleted file mode 10644 --- a/head/contrib/texinfo/makeinfo/lang.c (revision 267841) +++ /dev/null (working copy) @@ -1,1020 +0,0 @@ -/* lang.c -- language-dependent support. - $Id: lang.c,v 1.14 2004/11/22 23:57:33 karl Exp $ - - 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Originally written by Karl Heinz Marbaise . */ - -#include "system.h" -#include "cmds.h" -#include "files.h" -#include "lang.h" -#include "makeinfo.h" -#include "xml.h" - -/* Current document encoding. */ -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 - hopefully the Unicode. It might be possible that those Unicodes are - not correct, cause I didn't check them. kama */ -static iso_map_type iso8859_1_map [] = { - { "nbsp", 0xA0, 0x00A0 }, - { "iexcl", 0xA1, 0x00A1 }, - { "cent", 0xA2, 0x00A2 }, - { "pound", 0xA3, 0x00A3 }, - { "curren", 0xA4, 0x00A4 }, - { "yen", 0xA5, 0x00A5 }, - { "brkbar", 0xA6, 0x00A6 }, - { "sect", 0xA7, 0x00A7 }, - { "uml", 0xA8, 0x00A8 }, - { "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 }, - { "acute", 0xB4, 0x00B4 }, - { "micro", 0xB5, 0x00B5 }, - { "para", 0xB6, 0x00B6 }, - { "middot", 0xB7, 0x00B7 }, - { "cedil", 0xB8, 0x00B8 }, - { "sup1", 0xB9, 0x00B9 }, - { "ordm", 0xBA, 0x00BA }, - { "raquo", 0xBB, 0x00BB }, - { "frac14", 0xBC, 0x00BC }, - { "frac12", 0xBD, 0x00BD }, - { "frac34", 0xBE, 0x00BE }, - { "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 } -}; - - -/* 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 - From: Wojciech Polak -... - * Primary Polish site for ogonki is http://www.agh.edu.pl/ogonki/, - but it's only in Polish language (it has some interesting links). - - * A general site about ISO 8859-2 at http://nl.ijs.si/gnusl/cee/iso8859-2.html - - * ISO 8859-2 Character Set at http://nl.ijs.si/gnusl/cee/charset.html - This site provides almost all information about iso-8859-2, - including the character table!!! (must see!) - - * ISO 8859-2 and even HTML entities !!! (must see!) - http://people.ssh.fi/mtr/genscript/88592.txt - - * (minor) http://www.agh.edu.pl/ogonki/plchars.html - One more table, this time it includes even information about Polish - characters in Unicode. -*/ - -static iso_map_type iso8859_2_map [] = { - { "nbsp", 0xA0, 0x00A0 }, /* NO-BREAK SPACE */ - { "", 0xA1, 0x0104 }, /* LATIN CAPITAL LETTER A WITH OGONEK */ - { "", 0xA2, 0x02D8 }, /* BREVE */ - { "", 0xA3, 0x0141 }, /* LATIN CAPITAL LETTER L WITH STROKE */ - { "curren", 0xA4, 0x00A4 }, /* CURRENCY SIGN */ - { "", 0xA5, 0x013D }, /* LATIN CAPITAL LETTER L WITH CARON */ - { "", 0xA6, 0x015A }, /* LATIN CAPITAL LETTER S WITH ACUTE */ - { "sect", 0xA7, 0x00A7 }, /* SECTION SIGN */ - { "uml", 0xA8, 0x00A8 }, /* DIAERESIS */ - { "", 0xA9, 0x0160 }, /* LATIN CAPITAL LETTER S WITH CARON */ - { "", 0xAA, 0x015E }, /* LATIN CAPITAL LETTER S WITH CEDILLA */ - { "", 0xAB, 0x0164 }, /* LATIN CAPITAL LETTER T WITH CARON */ - { "", 0xAC, 0x0179 }, /* LATIN CAPITAL LETTER Z WITH ACUTE */ - { "shy", 0xAD, 0x00AD }, /* SOFT HYPHEN */ - { "", 0xAE, 0x017D }, /* LATIN CAPITAL LETTER Z WITH CARON */ - { "", 0xAF, 0x017B }, /* LATIN CAPITAL LETTER Z WITH DOT ABOVE */ - { "deg", 0xB0, 0x00B0 }, /* DEGREE SIGN */ - { "", 0xB1, 0x0105 }, /* LATIN SMALL LETTER A WITH OGONEK */ - { "", 0xB2, 0x02DB }, /* OGONEK */ - { "", 0xB3, 0x0142 }, /* LATIN SMALL LETTER L WITH STROKE */ - { "acute", 0xB4, 0x00B4 }, /* ACUTE ACCENT */ - { "", 0xB5, 0x013E }, /* LATIN SMALL LETTER L WITH CARON */ - { "", 0xB6, 0x015B }, /* LATIN SMALL LETTER S WITH ACUTE */ - { "", 0xB7, 0x02C7 }, /* CARON (Mandarin Chinese third tone) */ - { "cedil", 0xB8, 0x00B8 }, /* CEDILLA */ - { "", 0xB9, 0x0161 }, /* LATIN SMALL LETTER S WITH CARON */ - { "", 0xBA, 0x015F }, /* LATIN SMALL LETTER S WITH CEDILLA */ - { "", 0xBB, 0x0165 }, /* LATIN SMALL LETTER T WITH CARON */ - { "", 0xBC, 0x017A }, /* LATIN SMALL LETTER Z WITH ACUTE */ - { "", 0xBD, 0x02DD }, /* DOUBLE ACUTE ACCENT */ - { "", 0xBE, 0x017E }, /* LATIN SMALL LETTER Z WITH CARON */ - { "", 0xBF, 0x017C }, /* LATIN SMALL LETTER Z WITH DOT ABOVE */ - { "", 0xC0, 0x0154 }, /* LATIN CAPITAL LETTER R WITH ACUTE */ - { "", 0xC1, 0x00C1 }, /* LATIN CAPITAL LETTER A WITH ACUTE */ - { "", 0xC2, 0x00C2 }, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ - { "", 0xC3, 0x0102 }, /* LATIN CAPITAL LETTER A WITH BREVE */ - { "", 0xC4, 0x00C4 }, /* LATIN CAPITAL LETTER A WITH DIAERESIS */ - { "", 0xC5, 0x0139 }, /* LATIN CAPITAL LETTER L WITH ACUTE */ - { "", 0xC6, 0x0106 }, /* LATIN CAPITAL LETTER C WITH ACUTE */ - { "", 0xC7, 0x00C7 }, /* LATIN CAPITAL LETTER C WITH CEDILLA */ - { "", 0xC8, 0x010C }, /* LATIN CAPITAL LETTER C WITH CARON */ - { "", 0xC9, 0x00C9 }, /* LATIN CAPITAL LETTER E WITH ACUTE */ - { "", 0xCA, 0x0118 }, /* LATIN CAPITAL LETTER E WITH OGONEK */ - { "", 0xCB, 0x00CB }, /* LATIN CAPITAL LETTER E WITH DIAERESIS */ - { "", 0xCC, 0x011A }, /* LATIN CAPITAL LETTER E WITH CARON */ - { "", 0xCD, 0x00CD }, /* LATIN CAPITAL LETTER I WITH ACUTE */ - { "", 0xCE, 0x00CE }, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ - { "", 0xCF, 0x010E }, /* LATIN CAPITAL LETTER D WITH CARON */ - { "", 0xD0, 0x0110 }, /* LATIN CAPITAL LETTER D WITH STROKE */ - { "", 0xD1, 0x0143 }, /* LATIN CAPITAL LETTER N WITH ACUTE */ - { "", 0xD2, 0x0147 }, /* LATIN CAPITAL LETTER N WITH CARON */ - { "", 0xD3, 0x00D3 }, /* LATIN CAPITAL LETTER O WITH ACUTE */ - { "", 0xD4, 0x00D4 }, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ - { "", 0xD5, 0x0150 }, /* LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */ - { "", 0xD6, 0x00D6 }, /* LATIN CAPITAL LETTER O WITH DIAERESIS */ - { "times", 0xD7, 0x00D7 }, /* MULTIPLICATION SIGN */ - { "", 0xD8, 0x0158 }, /* LATIN CAPITAL LETTER R WITH CARON */ - { "", 0xD9, 0x016E }, /* LATIN CAPITAL LETTER U WITH RING ABOVE */ - { "", 0xDA, 0x00DA }, /* LATIN CAPITAL LETTER U WITH ACUTE */ - { "", 0xDB, 0x0170 }, /* LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */ - { "", 0xDC, 0x00DC }, /* LATIN CAPITAL LETTER U WITH DIAERESIS */ - { "", 0xDD, 0x00DD }, /* LATIN CAPITAL LETTER Y WITH ACUTE */ - { "", 0xDE, 0x0162 }, /* LATIN CAPITAL LETTER T WITH CEDILLA */ - { "", 0xDF, 0x00DF }, /* LATIN SMALL LETTER SHARP S (German) */ - { "", 0xE0, 0x0155 }, /* LATIN SMALL LETTER R WITH ACUTE */ - { "", 0xE1, 0x00E1 }, /* LATIN SMALL LETTER A WITH ACUTE */ - { "", 0xE2, 0x00E2 }, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */ - { "", 0xE3, 0x0103 }, /* LATIN SMALL LETTER A WITH BREVE */ - { "", 0xE4, 0x00E4 }, /* LATIN SMALL LETTER A WITH DIAERESIS */ - { "", 0xE5, 0x013A }, /* LATIN SMALL LETTER L WITH ACUTE */ - { "", 0xE6, 0x0107 }, /* LATIN SMALL LETTER C WITH ACUTE */ - { "", 0xE7, 0x00E7 }, /* LATIN SMALL LETTER C WITH CEDILLA */ - { "", 0xE8, 0x010D }, /* LATIN SMALL LETTER C WITH CARON */ - { "", 0xE9, 0x00E9 }, /* LATIN SMALL LETTER E WITH ACUTE */ - { "", 0xEA, 0x0119 }, /* LATIN SMALL LETTER E WITH OGONEK */ - { "", 0xEB, 0x00EB }, /* LATIN SMALL LETTER E WITH DIAERESIS */ - { "", 0xEC, 0x011B }, /* LATIN SMALL LETTER E WITH CARON */ - { "", 0xED, 0x00ED }, /* LATIN SMALL LETTER I WITH ACUTE */ - { "", 0xEE, 0x00EE }, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */ - { "", 0xEF, 0x010F }, /* LATIN SMALL LETTER D WITH CARON */ - { "", 0xF0, 0x0111 }, /* LATIN SMALL LETTER D WITH STROKE */ - { "", 0xF1, 0x0144 }, /* LATIN SMALL LETTER N WITH ACUTE */ - { "", 0xF2, 0x0148 }, /* LATIN SMALL LETTER N WITH CARON */ - { "", 0xF3, 0x00F3 }, /* LATIN SMALL LETTER O WITH ACUTE */ - { "", 0xF4, 0x00F4 }, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */ - { "", 0xF5, 0x0151 }, /* LATIN SMALL LETTER O WITH DOUBLE ACUTE */ - { "", 0xF6, 0x00F6 }, /* LATIN SMALL LETTER O WITH DIAERESIS */ - { "divide", 0xF7, 0x00F7 }, /* DIVISION SIGN */ - { "", 0xF8, 0x0159 }, /* LATIN SMALL LETTER R WITH CARON */ - { "", 0xF9, 0x016F }, /* LATIN SMALL LETTER U WITH RING ABOVE */ - { "", 0xFA, 0x00FA }, /* LATIN SMALL LETTER U WITH ACUTE */ - { "", 0xFB, 0x0171 }, /* LATIN SMALL LETTER U WITH DOUBLE ACUTE */ - { "", 0xFC, 0x00FC }, /* LATIN SMALL LETTER U WITH DIAERESIS */ - { "", 0xFD, 0x00FD }, /* LATIN SMALL LETTER Y WITH ACUTE */ - { "", 0xFE, 0x0163 }, /* LATIN SMALL LETTER T WITH CEDILLA */ - { "", 0xFF, 0x02D9 }, /* DOT ABOVE (Mandarin Chinese light tone) */ - { NULL, 0, 0 } -}; - -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", (iso_map_type *) iso8859_15_map }, - { last_encoding_code, NULL, NULL } -}; - - -language_type language_table[] = { - { aa, "aa", "Afar" }, - { ab, "ab", "Abkhazian" }, - { af, "af", "Afrikaans" }, - { am, "am", "Amharic" }, - { ar, "ar", "Arabic" }, - { as, "as", "Assamese" }, - { ay, "ay", "Aymara" }, - { az, "az", "Azerbaijani" }, - { ba, "ba", "Bashkir" }, - { be, "be", "Byelorussian" }, - { bg, "bg", "Bulgarian" }, - { bh, "bh", "Bihari" }, - { bi, "bi", "Bislama" }, - { bn, "bn", "Bengali; Bangla" }, - { bo, "bo", "Tibetan" }, - { br, "br", "Breton" }, - { ca, "ca", "Catalan" }, - { co, "co", "Corsican" }, - { cs, "cs", "Czech" }, - { cy, "cy", "Welsh" }, - { da, "da", "Danish" }, - { de, "de", "German" }, - { dz, "dz", "Bhutani" }, - { el, "el", "Greek" }, - { en, "en", "English" }, - { eo, "eo", "Esperanto" }, - { es, "es", "Spanish" }, - { et, "et", "Estonian" }, - { eu, "eu", "Basque" }, - { fa, "fa", "Persian" }, - { fi, "fi", "Finnish" }, - { fj, "fj", "Fiji" }, - { fo, "fo", "Faroese" }, - { fr, "fr", "French" }, - { fy, "fy", "Frisian" }, - { ga, "ga", "Irish" }, - { gd, "gd", "Scots Gaelic" }, - { gl, "gl", "Galician" }, - { gn, "gn", "Guarani" }, - { gu, "gu", "Gujarati" }, - { ha, "ha", "Hausa" }, - { he, "he", "Hebrew" } /* (formerly iw) */, - { hi, "hi", "Hindi" }, - { hr, "hr", "Croatian" }, - { hu, "hu", "Hungarian" }, - { hy, "hy", "Armenian" }, - { ia, "ia", "Interlingua" }, - { id, "id", "Indonesian" } /* (formerly in) */, - { ie, "ie", "Interlingue" }, - { ik, "ik", "Inupiak" }, - { is, "is", "Icelandic" }, - { it, "it", "Italian" }, - { iu, "iu", "Inuktitut" }, - { ja, "ja", "Japanese" }, - { jw, "jw", "Javanese" }, - { ka, "ka", "Georgian" }, - { kk, "kk", "Kazakh" }, - { kl, "kl", "Greenlandic" }, - { km, "km", "Cambodian" }, - { kn, "kn", "Kannada" }, - { ko, "ko", "Korean" }, - { ks, "ks", "Kashmiri" }, - { ku, "ku", "Kurdish" }, - { ky, "ky", "Kirghiz" }, - { la, "la", "Latin" }, - { ln, "ln", "Lingala" }, - { lo, "lo", "Laothian" }, - { lt, "lt", "Lithuanian" }, - { lv, "lv", "Latvian, Lettish" }, - { mg, "mg", "Malagasy" }, - { mi, "mi", "Maori" }, - { mk, "mk", "Macedonian" }, - { ml, "ml", "Malayalam" }, - { mn, "mn", "Mongolian" }, - { mo, "mo", "Moldavian" }, - { mr, "mr", "Marathi" }, - { ms, "ms", "Malay" }, - { mt, "mt", "Maltese" }, - { my, "my", "Burmese" }, - { na, "na", "Nauru" }, - { ne, "ne", "Nepali" }, - { nl, "nl", "Dutch" }, - { no, "no", "Norwegian" }, - { oc, "oc", "Occitan" }, - { om, "om", "(Afan) Oromo" }, - { or, "or", "Oriya" }, - { pa, "pa", "Punjabi" }, - { pl, "pl", "Polish" }, - { ps, "ps", "Pashto, Pushto" }, - { pt, "pt", "Portuguese" }, - { qu, "qu", "Quechua" }, - { rm, "rm", "Rhaeto-Romance" }, - { rn, "rn", "Kirundi" }, - { ro, "ro", "Romanian" }, - { ru, "ru", "Russian" }, - { rw, "rw", "Kinyarwanda" }, - { sa, "sa", "Sanskrit" }, - { sd, "sd", "Sindhi" }, - { sg, "sg", "Sangro" }, - { sh, "sh", "Serbo-Croatian" }, - { si, "si", "Sinhalese" }, - { sk, "sk", "Slovak" }, - { sl, "sl", "Slovenian" }, - { sm, "sm", "Samoan" }, - { sn, "sn", "Shona" }, - { so, "so", "Somali" }, - { sq, "sq", "Albanian" }, - { sr, "sr", "Serbian" }, - { ss, "ss", "Siswati" }, - { st, "st", "Sesotho" }, - { su, "su", "Sundanese" }, - { sv, "sv", "Swedish" }, - { sw, "sw", "Swahili" }, - { ta, "ta", "Tamil" }, - { te, "te", "Telugu" }, - { tg, "tg", "Tajik" }, - { th, "th", "Thai" }, - { ti, "ti", "Tigrinya" }, - { tk, "tk", "Turkmen" }, - { tl, "tl", "Tagalog" }, - { tn, "tn", "Setswana" }, - { to, "to", "Tonga" }, - { tr, "tr", "Turkish" }, - { ts, "ts", "Tsonga" }, - { tt, "tt", "Tatar" }, - { tw, "tw", "Twi" }, - { ug, "ug", "Uighur" }, - { uk, "uk", "Ukrainian" }, - { ur, "ur", "Urdu" }, - { uz, "uz", "Uzbek" }, - { vi, "vi", "Vietnamese" }, - { vo, "vo", "Volapuk" }, - { wo, "wo", "Wolof" }, - { xh, "xh", "Xhosa" }, - { yi, "yi", "Yiddish" } /* (formerly ji) */, - { yo, "yo", "Yoruba" }, - { za, "za", "Zhuang" }, - { zh, "zh", "Chinese" }, - { 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 (void) -{ - language_code_type c; - char *lang_arg; - - /* Read the line with the language code on it. */ - get_rest_of_line (0, &lang_arg); - - /* Linear search is fine these days. */ - for (c = aa; c != last_language_code; c++) - { - if (strcmp (lang_arg, language_table[c].abbrev) == 0) - { /* Set current language code. */ - language_code = c; - break; - } - } - - /* If we didn't find this code, complain. */ - 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); -} - - - -/* Search through the encoding table for the given character, returning - its equivalent. */ - -static int -cm_search_iso_map (char *html) -{ - int i; - iso_map_type *iso = encoding_table[document_encoding_code].isotab; - - /* If no conversion table for this encoding, quit. */ - if (!iso) - return -1; - - for (i = 0; iso[i].html; i++) - { - if (strcmp (html, iso[i].html) == 0) - return i; - } - - return -1; -} - - -/* @documentencoding. Set the translation table. */ - -void -cm_documentencoding (void) -{ - if (!handling_delayed_writes) - { - 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++) - { - 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 (encoding && *encoding) - { - insert_string (" encoding=\""); - insert_string (encoding); - insert_string ("\""); - } - - free (encoding); - } -} - -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 - the user requested encoded output, add the real 8-bit character - corresponding to HTML_STR from the translation tables. Otherwise, - add INFO_STR. */ - -static void -add_encoded_char (char *html_str, char *info_str) -{ - if (html) - add_word_args ("&%s;", html_str); - else if (xml) - xml_insert_entity (html_str); - else if (enable_encoding) - { - /* Look for HTML_STR in the current translation table. */ - int rc = cm_search_iso_map (html_str); - if (rc >= 0) - /* We found it, add the real character. */ - add_char (encoding_table[document_encoding_code].isotab[rc].bytecode); - else - { /* We didn't find it, that seems bad. */ - warning (_("invalid encoded character `%s'"), html_str); - add_word (info_str); - } - } - else - add_word (info_str); -} - - - -/* Output an accent for HTML or XML. */ - -static void -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 */ - - if (arg == START) - { /* If HTML has good support for this character, use it. */ - if (strchr (html_supported, curchar ())) - { /* Yes; start with an ampersand. The character itself - will be added later in read_command (makeinfo.c). */ - int saved_escape_html = escape_html; - escape_html = 0; - valid_html_accent = 1; - add_char ('&'); - escape_html = saved_escape_html; - } - else - { /* @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 - /* 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) - { /* Only if we saw a valid_html_accent can we use the full - HTML accent (umlaut, grave ...). */ - if (valid_html_accent) - { - add_word (html_solo); - add_char (';'); - } - } -} - - -static void -cm_accent_generic_no_headers (int arg, int start, int end, int single, - char *html_solo) -{ - if (arg == END) - { - if (no_encoding) - add_char (single); - else - { - int rc; - char *buffer = xmalloc (1 + strlen (html_solo) + 1); - buffer[0] = output_paragraph[end - 1]; - buffer[1] = 0; - strcat (buffer, html_solo); - - rc = cm_search_iso_map (buffer); - if (rc >= 0) - /* A little bit tricky ;-) - Here we replace the character which has - been inserted in read_command with - the value we have found in converting table - Does there exist a better way to do this? kama. */ - output_paragraph[end - 1] - = encoding_table[document_encoding_code].isotab[rc].bytecode; - else - { /* 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. */ - /* 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); - } - - free (buffer); - } - } -} - - - -/* Accent commands that take explicit arguments and don't have any - special HTML support. */ - -void -cm_accent (int arg) -{ - int old_escape_html = escape_html; - escape_html = 0; - if (arg == START) - { - /* Must come first to avoid ambiguity with overdot. */ - if (strcmp (command, "udotaccent") == 0) /* underdot */ - add_char ('.'); - } - else if (arg == END) - { - if (strcmp (command, "=") == 0) /* macron */ - add_word ((html || xml) ? "¯" : "="); - else if (strcmp (command, "H") == 0) /* Hungarian umlaut */ - add_word ("''"); - else if (strcmp (command, "dotaccent") == 0) /* overdot */ - add_meta_char ('.'); - else if (strcmp (command, "ringaccent") == 0) /* ring */ - add_char ('*'); - else if (strcmp (command, "tieaccent") == 0) /* long tie */ - add_char ('['); - else if (strcmp (command, "u") == 0) /* breve */ - add_char ('('); - else if (strcmp (command, "ubaraccent") == 0) /* underbar */ - add_char ('_'); - else if (strcmp (command, "v") == 0) /* hacek/check */ - add_word ((html || xml) ? "<" : "<"); - } - escape_html = old_escape_html; -} - -/* Common routine for the accent characters that have support in HTML. - If the character being accented is in the HTML_SUPPORTED set, then - produce &CHTML_SOLO;, for example, Ä for an A-umlaut. If not in - HTML_SUPPORTED, just produce &HTML_SOLO;X for the best we can do with - at an X-umlaut. If not producing HTML, just use SINGLE, a - character such as " which is the best plain text representation we - can manage. If HTML_SOLO_STANDALONE is nonzero the given HTML_SOLO - exists as valid standalone character in HTML, e.g., ¨. */ - -static void -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); - else if (no_headers) - cm_accent_generic_no_headers (arg, start, end, single, html_solo); - else if (arg == END) - { - if (enable_encoding) - /* use 8-bit if available */ - cm_accent_generic_no_headers (arg, start, end, single, html_solo); - else - /* use regular character */ - add_char (single); - } -} - -void -cm_accent_umlaut (int arg, int start, int end) -{ - cm_accent_generic (arg, start, end, "aouAOUEeIiy", '"', 1, "uml"); -} - -void -cm_accent_acute (int arg, int start, int end) -{ - cm_accent_generic (arg, start, end, "AEIOUYaeiouy", '\'', 1, "acute"); -} - -void -cm_accent_cedilla (int arg, int start, int end) -{ - cm_accent_generic (arg, start, end, "Cc", ',', 1, "cedil"); -} - -void -cm_accent_hat (int arg, int start, int end) -{ - cm_accent_generic (arg, start, end, "AEIOUaeiou", '^', 0, "circ"); -} - -void -cm_accent_grave (int arg, int start, int end) -{ - cm_accent_generic (arg, start, end, "AEIOUaeiou", '`', 0, "grave"); -} - -void -cm_accent_tilde (int arg, int start, int end) -{ - cm_accent_generic (arg, start, end, "ANOano", '~', 0, "tilde"); -} - - - -/* Non-English letters/characters that don't insert themselves. */ -void -cm_special_char (int arg) -{ - int old_escape_html = escape_html; - escape_html = 0; - - if (arg == START) - { - if ((*command == 'L' || *command == 'l' - || *command == 'O' || *command == 'o') - && command[1] == 0) - { /* Lslash lslash Oslash oslash. - Lslash and lslash aren't supported in HTML. */ - if (command[0] == 'O') - add_encoded_char ("Oslash", "/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, "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 ("OElig", command); - else if (strcmp (command, "oe") == 0) - add_encoded_char ("oelig", command); - else if (strcmp (command, "AA") == 0) - add_encoded_char ("Aring", command); - else if (strcmp (command, "aa") == 0) - add_encoded_char ("aring", command); - else if (strcmp (command, "ss") == 0) - add_encoded_char ("szlig", command); - else - line_error ("cm_special_char internal error: command=@%s", command); - } - escape_html = old_escape_html; -} - -/* Dotless i or j. */ -void -cm_dotless (int arg, int start, int end) -{ - if (arg == END) - { - xml_no_para --; - if (output_paragraph[start] != 'i' && output_paragraph[start] != 'j') - /* This error message isn't perfect if the argument is multiple - characters, but it doesn't seem worth getting right. */ - line_error (_("%c%s expects `i' or `j' as argument, not `%c'"), - COMMAND_PREFIX, command, output_paragraph[start]); - - else if (end - start != 1) - line_error (_("%c%s expects a single character `i' or `j' as argument"), - COMMAND_PREFIX, command); - - /* We've already inserted the `i' or `j', so nothing to do. */ - } - else - xml_no_para ++; -} Index: contrib/texinfo/makeinfo/lang.h =================================================================== diff --git a/head/contrib/texinfo/makeinfo/lang.h b/head/contrib/texinfo/makeinfo/lang.h deleted file mode 10644 --- a/head/contrib/texinfo/makeinfo/lang.h (revision 267841) +++ /dev/null (working copy) @@ -1,148 +0,0 @@ -/* lang.h -- declarations for language codes etc. - $Id: lang.h,v 1.6 2004/04/11 17:56:47 karl Exp $ - - Copyright (C) 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Originally written by Karl Heinz Marbaise . */ - -#ifndef LANG_H -#define LANG_H - -/* The language code which can be changed through @documentlanguage - * Actually we don't currently support this (may be in the future) ;-) - * These code are the ISO-639 two letter codes. - */ -typedef enum -{ - aa, ab, af, am, ar, as, ay, az, - ba, be, bg, bh, bi, bn, bo, br, - ca, co, cs, cy, - da, de, dz, - el, en, eo, es, et, eu, - fa, fi, fj, fo, fr, fy, - ga, gd, gl, gn, gu, - ha, he, hi, hr, hu, hy, - ia, id, ie, ik, is, it, iu, - ja, jw, - ka, kk, kl, km, kn, ko, ks, ku, ky, - la, ln, lo, lt, lv, - mg, mi, mk, ml, mn, mo, mr, ms, mt, my, - na, ne, nl, no, - oc, om, or, - pa, pl, ps, pt, - qu, - rm, rn, ro, ru, rw, - sa, sd, sg, sh, si, sk, sl, sm, sn, so, sq, sr, ss, st, su, sv, sw, - ta, te, tg, th, ti, tk, tl, tn, to, tr, ts, tt, tw, - ug, uk, ur, uz, - vi, vo, - wo, - xh, - yi, yo, - za, zh, zu, - last_language_code -} language_code_type; - -/* The current language code. */ -extern language_code_type language_code; - - -/* Information for each language. */ -typedef struct -{ - language_code_type lc; /* language code as enum type */ - char *abbrev; /* two letter language code */ - char *desc; /* full name for language code */ -} language_type; - -extern language_type language_table[]; - - - -/* 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 -} 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. */ - -typedef unsigned short int unicode_t; /* should be 16 bits */ -typedef unsigned char byte_t; - -typedef struct -{ - char *html; /* HTML equivalent like umlaut auml => ä */ - byte_t bytecode; /* 8-Bit Code (ISO 8859-1,...) */ - unicode_t unicode; /* Unicode in U+ convention */ -} iso_map_type; - -/* Information about the document encoding. */ -typedef struct -{ - encoding_code_type ec; /* document encoding type (see above enum) */ - char *encname; /* encoding name like "iso-8859-1", valid in - HTML and Emacs */ - iso_map_type *isotab; /* address of ISO translation table */ -} encoding_type; - -/* Table with all the encoding codes that we recognize. */ -extern encoding_type encoding_table[]; - - -/* The commands. */ -extern void cm_documentlanguage (void), - cm_documentencoding (void); - -/* Accents, other non-English characters. */ -void cm_accent (int arg), cm_special_char (int arg), - cm_dotless (int arg, int start, int end); - -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 */ Index: contrib/texinfo/makeinfo/macro.c =================================================================== diff --git a/head/contrib/texinfo/makeinfo/macro.c b/head/contrib/texinfo/makeinfo/macro.c deleted file mode 10644 --- a/head/contrib/texinfo/makeinfo/macro.c (revision 267841) +++ /dev/null (working copy) @@ -1,1108 +0,0 @@ -/* macro.c -- user-defined macros for Texinfo. - $Id: macro.c,v 1.6 2004/04/11 17:56:47 karl Exp $ - - Copyright (C) 1998, 1999, 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include "system.h" -#include "cmds.h" -#include "files.h" -#include "macro.h" -#include "makeinfo.h" -#include "insertion.h" - -/* If non-NULL, this is an output stream to write the full macro expansion - of the input text to. The result is another texinfo file, but - missing @include, @infoinclude, @macro, and macro invocations. Instead, - all of the text is placed within the file. */ -FILE *macro_expansion_output_stream = NULL; - -/* Output file for -E. */ -char *macro_expansion_filename; - -/* Nonzero means a macro string is in execution, as opposed to a file. */ -int me_executing_string = 0; - -/* Nonzero means we want only to expand macros and - leave everything else intact. */ -int only_macro_expansion = 0; - -static ITEXT **itext_info = NULL; -static int itext_size = 0; - -/* Return the arglist on the current line. This can behave in two different - ways, depending on the variable BRACES_REQUIRED_FOR_MACRO_ARGS. */ -int braces_required_for_macro_args = 0; - -/* Array of macros and definitions. */ -MACRO_DEF **macro_list = NULL; - -int macro_list_len = 0; /* Number of elements. */ -int macro_list_size = 0; /* Number of slots in total. */ - -/* Return the length of the array in ARRAY. */ -int -array_len (char **array) -{ - int i = 0; - - if (array) - for (i = 0; array[i]; i++); - - return i; -} - -void -free_array (char **array) -{ - if (array) - { - int i; - for (i = 0; array[i]; i++) - free (array[i]); - - free (array); - } -} - -/* Return the macro definition of NAME or NULL if NAME is not defined. */ -MACRO_DEF * -find_macro (char *name) -{ - int i; - MACRO_DEF *def; - - def = NULL; - for (i = 0; macro_list && (def = macro_list[i]); i++) - { - if ((!def->inhibited) && (strcmp (def->name, name) == 0)) - break; - } - return def; -} - -/* Add the macro NAME with ARGLIST and BODY to the list of defined macros. - SOURCE_FILE is the name of the file where this definition can be found, - 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. */ -static void -add_macro (char *name, char **arglist, char *body, char *source_file, - int source_lineno, int flags) -{ - MACRO_DEF *def; - - def = find_macro (name); - - if (!def) - { - if (macro_list_len + 2 >= macro_list_size) - macro_list = xrealloc - (macro_list, ((macro_list_size += 10) * sizeof (MACRO_DEF *))); - - macro_list[macro_list_len] = xmalloc (sizeof (MACRO_DEF)); - macro_list[macro_list_len + 1] = NULL; - - def = macro_list[macro_list_len]; - macro_list_len += 1; - def->name = name; - } - else - { - char *temp_filename = input_filename; - int temp_line = line_number; - - warning (_("macro `%s' previously defined"), name); - - input_filename = def->source_file; - line_number = def->source_lineno; - warning (_("here is the previous definition of `%s'"), name); - - input_filename = temp_filename; - line_number = temp_line; - - if (def->arglist) - { - int i; - - for (i = 0; def->arglist[i]; i++) - free (def->arglist[i]); - - free (def->arglist); - } - free (def->source_file); - free (def->body); - } - - def->source_file = xstrdup (source_file); - def->source_lineno = source_lineno; - def->body = body; - def->arglist = arglist; - def->inhibited = 0; - def->flags = flags; -} - - -char ** -get_brace_args (int quote_single) -{ - char **arglist, *word; - int arglist_index, arglist_size; - int character, escape_seen, start; - int depth = 1; - - /* There is an arglist in braces here, so gather the args inside of it. */ - skip_whitespace_and_newlines (); - input_text_offset++; - arglist = NULL; - arglist_index = arglist_size = 0; - - get_arg: - skip_whitespace_and_newlines (); - start = input_text_offset; - escape_seen = 0; - - while ((character = curchar ())) - { - if (character == '\\') - { - input_text_offset += 2; - escape_seen = 1; - } - else if (character == '{') - { - depth++; - input_text_offset++; - } - else if ((character == ',' && !quote_single) || - ((character == '}') && depth == 1)) - { - int len = input_text_offset - start; - - if (len || (character != '}')) - { - word = xmalloc (1 + len); - memcpy (word, input_text + start, len); - word[len] = 0; - - /* Clean up escaped characters. */ - if (escape_seen) - { - int i; - for (i = 0; word[i]; i++) - if (word[i] == '\\') - memmove (word + i, word + i + 1, - 1 + strlen (word + i + 1)); - } - - if (arglist_index + 2 >= arglist_size) - arglist = xrealloc - (arglist, (arglist_size += 10) * sizeof (char *)); - - arglist[arglist_index++] = word; - arglist[arglist_index] = NULL; - } - - input_text_offset++; - if (character == '}') - break; - else - goto get_arg; - } - else if (character == '}') - { - depth--; - input_text_offset++; - } - else - { - input_text_offset++; - if (character == '\n') line_number++; - } - } - return arglist; -} - -static char ** -get_macro_args (MACRO_DEF *def) -{ - int i; - char *word; - - /* Quickly check to see if this macro has been invoked with any arguments. - If not, then don't skip any of the following whitespace. */ - for (i = input_text_offset; i < input_text_length; i++) - if (!cr_or_whitespace (input_text[i])) - break; - - if (input_text[i] != '{') - { - if (braces_required_for_macro_args) - { - return NULL; - } - else - { - /* Braces are not required to fill out the macro arguments. If - this macro takes one argument, it is considered to be the - remainder of the line, sans whitespace. */ - if (def->arglist && def->arglist[0] && !def->arglist[1]) - { - char **arglist; - - get_rest_of_line (0, &word); - if (input_text[input_text_offset - 1] == '\n') - { - input_text_offset--; - line_number--; - } - /* canon_white (word); */ - arglist = xmalloc (2 * sizeof (char *)); - arglist[0] = word; - arglist[1] = NULL; - return arglist; - } - else - { - /* The macro either took no arguments, or took more than - one argument. In that case, it must be invoked with - arguments surrounded by braces. */ - return NULL; - } - } - } - return get_brace_args (def->flags & ME_QUOTE_ARG); -} - -/* Substitute actual parameters for named parameters in body. - The named parameters which appear in BODY must by surrounded - reverse slashes, as in \foo\. */ -static char * -apply (char **named, char **actuals, char *body) -{ - int i; - int new_body_index, new_body_size; - char *new_body, *text; - int length_of_actuals; - - length_of_actuals = array_len (actuals); - new_body_size = strlen (body); - new_body = xmalloc (1 + new_body_size); - - /* Copy chars from BODY into NEW_BODY. */ - i = 0; - new_body_index = 0; - - while (body[i]) - { /* Anything but a \ is easy. */ - if (body[i] != '\\') - new_body[new_body_index++] = body[i++]; - else - { /* Snarf parameter name, check against named parameters. */ - char *param; - int param_start, len; - - param_start = ++i; - while (body[i] && body[i] != '\\') - i++; - - len = i - param_start; - param = xmalloc (1 + len); - memcpy (param, body + param_start, len); - param[len] = 0; - - if (body[i]) /* move past \ */ - i++; - - if (len == 0) - { /* \\ always means \, even if macro has no args. */ - len++; - text = xmalloc (1 + len); - sprintf (text, "\\%s", param); - } - else - { - int which; - - /* Check against named parameters. */ - for (which = 0; named && named[which]; which++) - if (STREQ (named[which], param)) - break; - - if (named && named[which]) - { - text = which < length_of_actuals ? actuals[which] : NULL; - if (!text) - text = ""; - len = strlen (text); - text = xstrdup (text); /* so we can free it */ - } - else - { /* not a parameter, so it's an error. */ - warning (_("\\ in macro expansion followed by `%s' instead of parameter name"), - param); - len++; - text = xmalloc (1 + len); - sprintf (text, "\\%s", param); - } - } - - if (strlen (param) + 2 < len) - { - new_body_size += len + 1; - new_body = xrealloc (new_body, new_body_size); - } - - free (param); - - strcpy (new_body + new_body_index, text); - new_body_index += len; - - free (text); - } - } - - new_body[new_body_index] = 0; - return new_body; -} - -/* Expand macro passed in DEF, a pointer to a MACRO_DEF, and - return its expansion as a string. */ -char * -expand_macro (MACRO_DEF *def) -{ - char **arglist; - int num_args; - char *execution_string = NULL; - int start_line = line_number; - - /* Find out how many arguments this macro definition takes. */ - num_args = array_len (def->arglist); - - /* Gather the arguments present on the line if there are any. */ - arglist = get_macro_args (def); - - if (num_args < array_len (arglist)) - { - free_array (arglist); - line_error (_("Macro `%s' called on line %d with too many args"), - def->name, start_line); - return execution_string; - } - - if (def->body) - execution_string = apply (def->arglist, arglist, def->body); - - free_array (arglist); - return execution_string; -} - -/* Execute the macro passed in DEF, a pointer to a MACRO_DEF. */ -void -execute_macro (MACRO_DEF *def) -{ - char *execution_string; - int start_line = line_number, end_line; - - if (macro_expansion_output_stream && !executing_string && !me_inhibit_expansion) - me_append_before_this_command (); - - execution_string = expand_macro (def); - if (!execution_string) - return; - - if (def->body) - { - /* Reset the line number to where the macro arguments began. - This makes line numbers reported in error messages correct in - case the macro arguments span several lines and the expanded - arguments invoke other commands. */ - end_line = line_number; - line_number = start_line; - - if (macro_expansion_output_stream - && !executing_string && !me_inhibit_expansion) - { - remember_itext (input_text, input_text_offset); - me_execute_string (execution_string); - } - else - execute_string ("%s", execution_string); - - free (execution_string); - line_number = end_line; - } -} - - -/* Read and remember the definition of a macro. If RECURSIVE is set, - set the ME_RECURSE flag. MACTYPE is either "macro" or "rmacro", and - tells us what the matching @end should be. */ -static void -define_macro (char *mactype, int recursive) -{ - 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 flags = 0; - int defining_line = line_number; - - if (macro_expansion_output_stream && !executing_string) - me_append_before_this_command (); - - skip_whitespace (); - - /* 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 len; - - for (i = start; i < input_text_length && input_text[i] != '{' - && !cr_or_whitespace (input_text[i]); - i++) ; - - len = i - start; - name = xmalloc (1 + len); - memcpy (name, input_text + start, len); - name[len] = 0; - input_text_offset = i; - } - - skip_whitespace (); - - /* It is not required that the definition of a macro includes an arglist. - If not, don't try to get the named parameters, just use a null list. */ - if (curchar () == '{') - { - int character; - int arglist_index = 0, arglist_size = 0; - int gathering_words = 1; - char *word = NULL; - - /* Read the words inside of the braces which determine the arglist. - These words will be replaced within the body of the macro at - execution time. */ - - input_text_offset++; - skip_whitespace_and_newlines (); - - while (gathering_words) - { - int len; - - for (i = input_text_offset; - (character = input_text[i]); - i++) - { - switch (character) - { - case '\n': - line_number++; - case ' ': - case '\t': - case ',': - case '}': - /* Found the end of the current arglist word. Save it. */ - len = i - input_text_offset; - word = xmalloc (1 + len); - memcpy (word, input_text + input_text_offset, len); - word[len] = 0; - input_text_offset = i; - - /* Advance to the comma or close-brace that signified - the end of the argument. */ - while ((character = curchar ()) - && character != ',' - && character != '}') - { - input_text_offset++; - if (character == '\n') - line_number++; - } - - /* Add the word to our list of words. */ - if (arglist_index + 2 >= arglist_size) - { - arglist_size += 10; - arglist = xrealloc (arglist, - arglist_size * sizeof (char *)); - } - - arglist[arglist_index++] = word; - arglist[arglist_index] = NULL; - break; - } - - if (character == '}') - { - input_text_offset++; - gathering_words = 0; - break; - } - - if (character == ',') - { - input_text_offset++; - skip_whitespace_and_newlines (); - i = input_text_offset - 1; - } - } - } - - /* If we have exactly one argument, do @quote-arg implicitly. Not - only does this match TeX's behavior (which can't feasibly be - changed), but it's a good idea. */ - if (arglist_index == 1) - flags |= ME_QUOTE_ARG; - } - - /* Read the text carefully until we find an "@end macro" which - matches this one. The text in between is the body of the macro. */ - skip_whitespace_and_newlines (); - - while (depth) - { - if ((input_text_offset + 9) > input_text_length) - { - file_line_error (input_filename, defining_line, - _("%cend macro not found"), COMMAND_PREFIX); - return; - } - - get_rest_of_line (0, &line); - - /* Handle commands only meaningful within a macro. */ - if ((*line == COMMAND_PREFIX) && (depth == 1) && - (strncmp (line + 1, "allow-recursion", 15) == 0) && - (line[16] == 0 || whitespace (line[16]))) - { - for (i = 16; whitespace (line[i]); i++); - strcpy (line, line + i); - flags |= ME_RECURSE; - if (!*line) - { - free (line); - continue; - } - } - - if ((*line == COMMAND_PREFIX) && (depth == 1) && - (strncmp (line + 1, "quote-arg", 9) == 0) && - (line[10] == 0 || whitespace (line[10]))) - { - for (i = 10; whitespace (line[i]); i++); - strcpy (line, line + i); - - if (arglist && arglist[0] && !arglist[1]) - { - flags |= ME_QUOTE_ARG; - if (!*line) - { - free (line); - continue; - } - } - else - line_error (_("@quote-arg only useful for single-argument macros")); - } - - if (*line == COMMAND_PREFIX - && (strncmp (line + 1, "macro ", 6) == 0 - || strncmp (line + 1, "rmacro ", 7) == 0)) - depth++; - - /* Incorrect implementation of nesting -- just check that the last - @end matches what we started with. Since nested macros don't - work in TeX anyway, this isn't worth the trouble to get right. */ - if (*line == COMMAND_PREFIX && strncmp (line + 1, "end macro", 9) == 0) - { - depth--; - last_end = "macro"; - } - if (*line == COMMAND_PREFIX && strncmp (line + 1, "end rmacro", 10) == 0) - { - depth--; - last_end = "rmacro"; - } - - if (depth) - { - if ((body_index + strlen (line) + 3) >= body_size) - body = xrealloc (body, body_size += 3 + strlen (line)); - strcpy (body + body_index, line); - body_index += strlen (line); - body[body_index++] = '\n'; - body[body_index] = 0; - } - free (line); - } - - /* Check that @end matched the macro command. */ - if (!STREQ (last_end, mactype)) - warning (_("mismatched @end %s with @%s"), last_end, mactype); - - /* If it was an empty macro like - @macro foo - @end macro - create an empty body. (Otherwise, the macro is not expanded.) */ - if (!body) - { - body = (char *)malloc(1); - *body = 0; - } - - /* We now have the name, the arglist, and the body. However, BODY - includes the final newline which preceded the `@end macro' text. - Delete it. */ - if (body && strlen (body)) - body[strlen (body) - 1] = 0; - - if (recursive) - flags |= ME_RECURSE; - - add_macro (name, arglist, body, input_filename, defining_line, flags); - - if (macro_expansion_output_stream && !executing_string) - { - /* 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 (void) -{ - define_macro ("macro", 0); -} - -void -cm_rmacro (void) -{ - define_macro ("rmacro", 1); -} - -/* Delete the macro with name NAME. The macro is deleted from the list, - but it is also returned. If there was no macro defined, NULL is - returned. */ - -static MACRO_DEF * -delete_macro (char *name) -{ - int i; - MACRO_DEF *def; - - def = NULL; - - for (i = 0; macro_list && (def = macro_list[i]); i++) - if (strcmp (def->name, name) == 0) - { - memmove (macro_list + i, macro_list + i + 1, - ((macro_list_len + 1) - i) * sizeof (MACRO_DEF *)); - macro_list_len--; - break; - } - return def; -} - -void -cm_unmacro (void) -{ - int i; - char *line, *name; - MACRO_DEF *def; - - if (macro_expansion_output_stream && !executing_string) - me_append_before_this_command (); - - get_rest_of_line (0, &line); - - for (i = 0; line[i] && !whitespace (line[i]); i++); - name = xmalloc (i + 1); - memcpy (name, line, i); - name[i] = 0; - - def = delete_macro (name); - - if (def) - { - free (def->source_file); - free (def->name); - free (def->body); - - if (def->arglist) - { - int i; - - for (i = 0; def->arglist[i]; i++) - free (def->arglist[i]); - - free (def->arglist); - } - - free (def); - } - - free (line); - free (name); - - if (macro_expansion_output_stream && !executing_string) - remember_itext (input_text, input_text_offset); -} - -/* How to output sections of the input file verbatim. */ - -/* Set the value of POINTER's offset to OFFSET. */ -ITEXT * -remember_itext (char *pointer, int offset) -{ - int i; - ITEXT *itext = NULL; - - /* If we have no info, initialize a blank list. */ - if (!itext_info) - { - itext_info = xmalloc ((itext_size = 10) * sizeof (ITEXT *)); - for (i = 0; i < itext_size; i++) - itext_info[i] = NULL; - } - - /* If the pointer is already present in the list, then set the offset. */ - for (i = 0; i < itext_size; i++) - if ((itext_info[i]) && - (itext_info[i]->pointer == pointer)) - { - itext = itext_info[i]; - itext_info[i]->offset = offset; - break; - } - - if (i == itext_size) - { - /* Find a blank slot (or create a new one), and remember the - pointer and offset. */ - for (i = 0; i < itext_size; i++) - if (itext_info[i] == NULL) - break; - - /* If not found, then add some slots. */ - if (i == itext_size) - { - int j; - - itext_info = xrealloc - (itext_info, (itext_size += 10) * sizeof (ITEXT *)); - - for (j = i; j < itext_size; j++) - itext_info[j] = NULL; - } - - /* Now add the pointer and the offset. */ - itext_info[i] = xmalloc (sizeof (ITEXT)); - itext_info[i]->pointer = pointer; - itext_info[i]->offset = offset; - itext = itext_info[i]; - } - return itext; -} - -/* Forget the input text associated with POINTER. */ -void -forget_itext (char *pointer) -{ - int i; - - for (i = 0; i < itext_size; i++) - if (itext_info[i] && (itext_info[i]->pointer == pointer)) - { - free (itext_info[i]); - itext_info[i] = NULL; - break; - } -} - -/* 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 (void) -{ - int i; - - for (i = input_text_offset; i && (input_text[i] != COMMAND_PREFIX); i--) - ; - maybe_write_itext (input_text, i); -} - -/* Similar to execute_string, but only takes a single string argument, - and remembers the input text location, etc. */ -void -me_execute_string (char *execution_string) -{ - int saved_escape_html = escape_html; - int saved_in_paragraph = in_paragraph; - escape_html = me_executing_string == 0; - in_paragraph = 0; - - pushfile (); - input_text_offset = 0; - /* The following xstrdup is so we can relocate input_text at will. */ - input_text = xstrdup (execution_string); - input_filename = xstrdup (input_filename); - input_text_length = strlen (execution_string); - - remember_itext (input_text, 0); - - me_executing_string++; - reader_loop (); - free (input_text); - free (input_filename); - popfile (); - me_executing_string--; - - in_paragraph = saved_in_paragraph; - escape_html = saved_escape_html; -} - -/* A wrapper around me_execute_string which saves and restores - variables important for output generation. This is called - when we need to produce macro-expanded output for input which - leaves no traces in the Info output. */ -void -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; - - remember_itext (input_text, input_text_offset); - op_orig = output_paragraph_offset; - meta_pos_orig = meta_char_pos; - opcol_orig = output_column; - popen_orig = paragraph_is_open; - fill_orig = filling_enabled; - newline_orig = last_char_was_newline; - filling_enabled = 0; - indent_orig = no_indent; - no_indent = 1; - me_execute_string (execution_string); - if (append_string) - write_region_to_macro_output (append_string, 0, strlen (append_string)); - output_paragraph_offset = op_orig; - meta_char_pos = meta_pos_orig; - output_column = opcol_orig; - paragraph_is_open = popen_orig; - filling_enabled = fill_orig; - last_char_was_newline = newline_orig; - no_indent = indent_orig; -} - -/* Append the text which appears in input_text from the last offset to - the current OFFSET. */ -void -append_to_expansion_output (int offset) -{ - int i; - ITEXT *itext = NULL; - - for (i = 0; i < itext_size; i++) - if (itext_info[i] && itext_info[i]->pointer == input_text) - { - itext = itext_info[i]; - break; - } - - if (!itext) - return; - - if (offset > itext->offset) - { - write_region_to_macro_output (input_text, itext->offset, offset); - remember_itext (input_text, offset); - } -} - -/* Only write this input text iff it appears in our itext list. */ -void -maybe_write_itext (char *pointer, int offset) -{ - int i; - ITEXT *itext = NULL; - - for (i = 0; i < itext_size; i++) - if (itext_info[i] && (itext_info[i]->pointer == pointer)) - { - itext = itext_info[i]; - break; - } - - if (itext && (itext->offset < offset)) - { - write_region_to_macro_output (itext->pointer, itext->offset, offset); - remember_itext (pointer, offset); - } -} - -void -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); -} - -/* Aliases. */ - -typedef struct alias_struct -{ - char *alias; - char *mapto; - struct alias_struct *next; -} alias_type; - -static alias_type *aliases; - -/* @alias aname = cmdname */ - -void -cm_alias (void) -{ - alias_type *a = xmalloc (sizeof (alias_type)); - - skip_whitespace (); - get_until_in_line (0, "=", &(a->alias)); - canon_white (a->alias); - - discard_until ("="); - skip_whitespace (); - get_until_in_line (0, " ", &(a->mapto)); - - a->next = aliases; - aliases = a; -} - -/* Perform an alias expansion. Called from read_command. */ -char * -alias_expand (char *tok) -{ - alias_type *findit = aliases; - - while (findit) - if (strcmp (findit->alias, tok) == 0) - { - free (tok); - return alias_expand (xstrdup (findit->mapto)); - } - else - findit = findit->next; - - return tok; -} - -/* definfoenclose implementation. */ - -/* This structure is used to track enclosure macros. When an enclosure - macro is recognized, a pointer to the enclosure block corresponding - to its name is saved in the brace element for its argument. */ -typedef struct enclose_struct -{ - char *enclose; - char *before; - char *after; - struct enclose_struct *next; -} enclosure_type; - -static enclosure_type *enclosures; - -typedef struct enclosure_stack_struct -{ - enclosure_type *current; - struct enclosure_stack_struct *next; -} enclosure_stack_type; - -static enclosure_stack_type *enclosure_stack; - -/* @definfoenclose */ -void -cm_definfoenclose (void) -{ - enclosure_type *e = xmalloc (sizeof (enclosure_type)); - - skip_whitespace (); - get_until_in_line (1, ",", &(e->enclose)); - discard_until (","); - get_until_in_line (0, ",", &(e->before)); - discard_until (","); - get_until_in_line (0, "\n", &(e->after)); - - e->next = enclosures; - enclosures = e; -} - -/* If TOK is an enclosure command, push it on the enclosure stack and - return 1. Else return 0. */ - -int -enclosure_command (char *tok) -{ - enclosure_type *findit = enclosures; - - while (findit) - if (strcmp (findit->enclose, tok) == 0) - { - enclosure_stack_type *new = xmalloc (sizeof (enclosure_stack_type)); - new->current = findit; - new->next = enclosure_stack; - enclosure_stack = new; - - return 1; - } - else - findit = findit->next; - - return 0; -} - -/* actually perform the enclosure expansion */ -void -enclosure_expand (int arg, int start, int end) -{ - if (arg == START) - add_word (enclosure_stack->current->before); - else - { - enclosure_stack_type *temp; - - add_word (enclosure_stack->current->after); - - temp = enclosure_stack; - enclosure_stack = enclosure_stack->next; - free (temp); - } -} Index: contrib/texinfo/makeinfo/macro.h =================================================================== diff --git a/head/contrib/texinfo/makeinfo/macro.h b/head/contrib/texinfo/makeinfo/macro.h deleted file mode 10644 --- a/head/contrib/texinfo/makeinfo/macro.h (revision 267841) +++ /dev/null (working copy) @@ -1,77 +0,0 @@ -/* macro.h -- declarations for macro.c. - $Id: macro.h,v 1.2 2004/04/11 17:56:47 karl Exp $ - - Copyright (C) 1998, 99 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef MACRO_H -#define MACRO_H - -extern FILE *macro_expansion_output_stream; -extern char *macro_expansion_filename; -extern int me_executing_string; -extern int only_macro_expansion; - -/* Here is a structure used to remember input text strings and offsets - within them. */ -typedef struct { - char *pointer; /* Pointer to the input text. */ - int offset; /* Offset of the last character output. */ -} ITEXT; - -/* Macro definitions for user-defined commands. */ -typedef struct { - char *name; /* Name of the macro. */ - char **arglist; /* Args to replace when executing. */ - char *body; /* Macro body. */ - char *source_file; /* File where this macro is defined. */ - int source_lineno; /* Line number within FILENAME. */ - int inhibited; /* Nonzero means make find_macro () fail. */ - int flags; /* ME_RECURSE, ME_QUOTE_ARG, etc. */ -} MACRO_DEF; - -/* flags for MACRO_DEF */ -#define ME_RECURSE 0x01 -#define ME_QUOTE_ARG 0x02 - -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 (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 (char *tok); -extern int enclosure_command (char *tok); -extern void enclosure_expand (int arg, int start, int end); - -/* The @commands. */ -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 */ Index: contrib/texinfo/makeinfo/makeinfo.c =================================================================== diff --git a/head/contrib/texinfo/makeinfo/makeinfo.c b/head/contrib/texinfo/makeinfo/makeinfo.c deleted file mode 10644 --- a/head/contrib/texinfo/makeinfo/makeinfo.c (revision 267841) +++ /dev/null (working copy) @@ -1,4157 +0,0 @@ -/* makeinfo -- convert Texinfo source into other formats. - $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, 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Original author of makeinfo: Brian Fox (bfox@ai.mit.edu). */ - -#include "system.h" -#include "getopt.h" - -#define COMPILING_MAKEINFO -#include "makeinfo.h" -#include "cmds.h" -#include "files.h" -#include "float.h" -#include "footnote.h" -#include "html.h" -#include "index.h" -#include "insertion.h" -#include "lang.h" -#include "macro.h" -#include "node.h" -#include "sectioning.h" -#include "toc.h" -#include "xml.h" - -/* You can change some of the behavior of Makeinfo by changing the - following defines: */ - -/* Define INDENT_PARAGRAPHS_IN_TABLE if you want the paragraphs which - appear within an @table, @ftable, or @itemize environment to have - standard paragraph indentation. Without this, such paragraphs have - no starting indentation. */ -/* #define INDENT_PARAGRAPHS_IN_TABLE */ - -/* Define PARAGRAPH_START_INDENT to be the amount of indentation that - the first lines of paragraphs receive by default, where no other - value has been specified. Users can change this value on the command - line, with the --paragraph-indent option, or within the texinfo file, - with the @paragraphindent command. */ -#define PARAGRAPH_START_INDENT 3 - -/* Define DEFAULT_PARAGRAPH_SPACING as the number of blank lines that you - wish to appear between paragraphs. A value of 1 creates a single blank - line between paragraphs. Paragraphs are defined by 2 or more consecutive - newlines in the input file (i.e., one or more blank lines). */ -#define DEFAULT_PARAGRAPH_SPACING 1 - -/* Global variables. */ - -/* The output file name. */ -char *output_filename = NULL; - -/* Name of the output file that the user elected to pass on the command line. - Such a name overrides any name found with the @setfilename command. */ -char *command_output_filename = NULL; -static char *save_command_output_filename = NULL; - -#define INITIAL_PARAGRAPH_SPACE 5000 -int paragraph_buffer_len = INITIAL_PARAGRAPH_SPACE; - -/* The amount of indentation to add at the starts of paragraphs. - 0 means don't change existing indentation at paragraph starts. - > 0 is amount to indent new paragraphs by. - < 0 means indent to column zero by removing indentation if necessary. - - This is normally zero, but some people prefer paragraph starts to be - somewhat more indented than paragraph bodies. A pretty value for - this is 3. */ -int paragraph_start_indent = PARAGRAPH_START_INDENT; - -/* Indentation that is pending insertion. We have this for hacking lines - which look blank, but contain whitespace. We want to treat those as - blank lines. */ -int pending_indent = 0; - -/* The index in our internal command table of the currently - executing command. */ -int command_index; - -/* A search string which is used to find the first @setfilename. */ -char setfilename_search[] = - { COMMAND_PREFIX, - 's', 'e', 't', 'f', 'i', 'l', 'e', 'n', 'a', 'm', 'e', 0 }; - -/* Values for calling handle_variable_internal (). */ -#define SET 1 -#define CLEAR 2 -#define IFSET 3 -#define IFCLEAR 4 - -/* Flags controlling the operation of the program. */ - -/* Default is to remove output if there were errors. */ -int force = 0; - -/* Default is to notify users of bad choices. */ -int print_warnings = 1; - -/* Number of errors that we tolerate on a given fileset. */ -int max_error_level = 100; - -/* The actual last inserted character. Note that this may be something - other than NEWLINE even if last_char_was_newline is 1. */ -int last_inserted_character = 0; - -/* Nonzero means that a newline character has already been - inserted, so close_paragraph () should insert one less. */ -int line_already_broken = 0; - -/* When nonzero we have finished an insertion (see end_insertion ()) and we - want to ignore false continued paragraph closings. */ -int insertion_paragraph_closed = 0; - -/* Nonzero means attempt to make all of the lines have fill_column width. */ -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; - COMMAND_FUNCTION *proc; - char *command; - int pos, line; - int in_fixed_width_font; -} BRACE_ELEMENT; - -BRACE_ELEMENT *brace_stack = NULL; - -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 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 (char *filename) -{ - remember_error (); - perror (filename); - return 0; -} - -/* Print an error message, and return false. */ -void -#if defined (VA_FPRINTF) && __STDC__ -error (const char *format, ...) -#else -error (format, va_alist) - const char *format; - va_dcl -#endif -{ -#ifdef VA_FPRINTF - va_list ap; -#endif - - remember_error (); - - VA_START (ap, format); -#ifdef VA_FPRINTF - VA_FPRINTF (stderr, format, ap); -#else - fprintf (stderr, format, a1, a2, a3, a4, a5, a6, a7, a8); -#endif /* not VA_FPRINTF */ - va_end (ap); - - putc ('\n', stderr); -} - -/* Just like error (), but print the input file and line number as well. */ -void -#if defined (VA_FPRINTF) && __STDC__ -file_line_error (char *infile, int lno, const char *format, ...) -#else -file_line_error (infile, lno, format, va_alist) - char *infile; - int lno; - const char *format; - va_dcl -#endif -{ -#ifdef VA_FPRINTF - va_list ap; -#endif - - remember_error (); - fprintf (stderr, "%s:%d: ", infile, lno); - - VA_START (ap, format); -#ifdef VA_FPRINTF - VA_FPRINTF (stderr, format, ap); -#else - fprintf (stderr, format, a1, a2, a3, a4, a5, a6, a7, a8); -#endif /* not VA_FPRINTF */ - va_end (ap); - - fprintf (stderr, ".\n"); -} - -/* Just like file_line_error (), but take the input file and the line - number from global variables. */ -void -#if defined (VA_FPRINTF) && __STDC__ -line_error (const char *format, ...) -#else -line_error (format, va_alist) - const char *format; - va_dcl -#endif -{ -#ifdef VA_FPRINTF - va_list ap; -#endif - - remember_error (); - fprintf (stderr, "%s:%d: ", input_filename, line_number); - - VA_START (ap, format); -#ifdef VA_FPRINTF - VA_FPRINTF (stderr, format, ap); -#else - fprintf (stderr, format, a1, a2, a3, a4, a5, a6, a7, a8); -#endif /* not VA_FPRINTF */ - va_end (ap); - - fprintf (stderr, ".\n"); -} - -void -#if defined (VA_FPRINTF) && __STDC__ -warning (const char *format, ...) -#else -warning (format, va_alist) - const char *format; - va_dcl -#endif -{ -#ifdef VA_FPRINTF - va_list ap; -#endif - - if (print_warnings) - { - fprintf (stderr, _("%s:%d: warning: "), input_filename, line_number); - - VA_START (ap, format); -#ifdef VA_FPRINTF - VA_FPRINTF (stderr, format, ap); -#else - fprintf (stderr, format, a1, a2, a3, a4, a5, a6, a7, a8); -#endif /* not VA_FPRINTF */ - va_end (ap); - - fprintf (stderr, ".\n"); - } -} - - -/* The other side of a malformed expression. */ -static void -misplaced_brace (void) -{ - line_error (_("Misplaced %c"), '}'); -} - -/* Main. */ - -/* Display the version info of this invocation of Makeinfo. */ -static void -print_version_info (void) -{ - printf ("makeinfo (GNU %s) %s\n", PACKAGE, VERSION); -} - -/* If EXIT_VALUE is zero, print the full usage message to stdout. - Otherwise, just say to use --help for more info. - Then exit with EXIT_VALUE. */ -static void -usage (int exit_value) -{ - if (exit_value != 0) - fprintf (stderr, _("Try `%s --help' for more information.\n"), progname); - else - { - printf (_("Usage: %s [OPTION]... TEXINFO-FILE...\n"), progname); - puts (""); - - puts (_("\ -Translate Texinfo source documentation to various other formats, by default\n\ -Info files suitable for reading online with Emacs or standalone GNU Info.\n")); - - printf (_("\ -General options:\n\ - --error-limit=NUM quit after NUM errors (default %d).\n\ - --force preserve output even if errors.\n\ - --help display this help and exit.\n\ - --no-validate suppress node cross-reference validation.\n\ - --no-warn suppress warnings (but not errors).\n\ - --reference-limit=NUM warn about at most NUM references (default %d).\n\ - -v, --verbose explain what is being done.\n\ - --version display version information and exit.\n"), - max_error_level, reference_warning_limit); - puts (""); - - /* xgettext: no-wrap */ - puts (_("\ -Output format selection (default is to produce 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 (_("\ -General output options:\n\ - -E, --macro-expand FILE output macro-expanded source to FILE.\n\ - ignoring any @setfilename.\n\ - --no-headers suppress node separators, Node: lines, and menus\n\ - from Info output (thus producing plain text)\n\ - or from HTML (thus producing shorter output);\n\ - also, write to standard output by default.\n\ - --no-split suppress splitting of Info or HTML output,\n\ - generate only one output file.\n\ - --number-sections output chapter and sectioning numbers.\n\ - -o, --output=FILE output to FILE (directory if split HTML),\n\ -")); - - printf (_("\ -Options for Info and plain text:\n\ - --enable-encoding output accented and special characters in\n\ - Info output based on @documentencoding.\n\ - --fill-column=NUM break Info lines at NUM characters (default %d).\n\ - --footnote-style=STYLE output footnotes in Info according to STYLE:\n\ - `separate' to put them in their own node;\n\ - `end' to put them at the end of the node\n\ - in which they are defined (default).\n\ - --paragraph-indent=VAL indent Info paragraphs by VAL spaces (default %d).\n\ - If VAL is `none', do not indent; if VAL is\n\ - `asis', preserve existing indentation.\n\ - --split-size=NUM split Info files at size NUM (default %d).\n"), - fill_column, paragraph_start_indent, - DEFAULT_SPLIT_SIZE); - puts (""); - - puts (_("\ -Options for HTML:\n\ - --css-include=FILE include FILE in HTML