From b0465e4534c37946b9f157053a91a25b88ee6c6f Mon Sep 17 00:00:00 2001 From: ru Date: Wed, 18 Jun 2003 12:57:43 +0000 Subject: Import of stripped down GNU texinfo 4.6 --- contrib/texinfo/AUTHORS | 24 +- contrib/texinfo/COPYING | 345 ++++++++++++- contrib/texinfo/ChangeLog | 565 ++++++++++++++++++++- contrib/texinfo/NEWS | 48 +- contrib/texinfo/TODO | 8 +- contrib/texinfo/config.h.in | 3 + contrib/texinfo/doc/fdl.texi | 8 +- contrib/texinfo/doc/info-stnd.texi | 14 +- contrib/texinfo/doc/info.1 | 2 +- contrib/texinfo/doc/install-info.1 | 2 +- contrib/texinfo/doc/makeinfo.1 | 10 +- contrib/texinfo/doc/texindex.1 | 2 +- contrib/texinfo/doc/texinfo.txi | 905 +++++++++++++++++++++++----------- contrib/texinfo/doc/version-stnd.texi | 8 +- contrib/texinfo/doc/version.texi | 8 +- contrib/texinfo/info/display.c | 25 +- contrib/texinfo/info/indices.c | 7 +- contrib/texinfo/info/info-utils.c | 25 +- contrib/texinfo/info/info-utils.h | 7 +- contrib/texinfo/info/info.c | 53 +- contrib/texinfo/info/info.h | 37 +- contrib/texinfo/info/infodoc.c | 12 +- contrib/texinfo/info/infokey.c | 25 +- contrib/texinfo/info/infomap.c | 8 +- contrib/texinfo/info/man.c | 8 +- contrib/texinfo/info/nodemenu.c | 8 +- contrib/texinfo/info/nodes.c | 35 +- contrib/texinfo/info/session.c | 139 ++++-- contrib/texinfo/info/window.c | 8 +- contrib/texinfo/lib/system.h | 15 +- contrib/texinfo/lib/xalloc.h | 2 + contrib/texinfo/lib/xexit.c | 20 +- contrib/texinfo/makeinfo/cmds.c | 60 ++- contrib/texinfo/makeinfo/defun.c | 33 +- contrib/texinfo/makeinfo/files.c | 11 +- contrib/texinfo/makeinfo/files.h | 3 +- contrib/texinfo/makeinfo/html.c | 213 +++++++- contrib/texinfo/makeinfo/index.c | 125 ++--- contrib/texinfo/makeinfo/insertion.c | 41 +- contrib/texinfo/makeinfo/lang.c | 158 +++++- contrib/texinfo/makeinfo/lang.h | 12 +- contrib/texinfo/makeinfo/macro.c | 56 ++- contrib/texinfo/makeinfo/makeinfo.c | 334 +++++++++---- contrib/texinfo/makeinfo/makeinfo.h | 49 +- contrib/texinfo/makeinfo/node.c | 45 +- contrib/texinfo/makeinfo/sectioning.c | 35 +- contrib/texinfo/makeinfo/xml.c | 15 +- contrib/texinfo/util/install-info.c | 32 +- contrib/texinfo/util/texindex.c | 50 +- 49 files changed, 2800 insertions(+), 858 deletions(-) (limited to 'contrib') diff --git a/contrib/texinfo/AUTHORS b/contrib/texinfo/AUTHORS index d14143e..1c5bfad 100644 --- a/contrib/texinfo/AUTHORS +++ b/contrib/texinfo/AUTHORS @@ -1,12 +1,26 @@ -$Id: AUTHORS,v 1.4 2002/10/09 22:23:44 karl Exp $ +$Id: AUTHORS,v 1.5 2003/05/08 00:51:55 karl Exp $ Texinfo authors. 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. -Richard Stallman, Brian Fox, Bob Chassell, Noah Friedman, Paul Rubin, -Karl Berry, Eli Zaretskii, Philippe Martin, and many others. +Akim Demaille texi2dvi. +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. +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). -Please see http://www.iro.umontreal.ca/contrib/po/HTML/team-LL.html for -the translation teams for a given language LL. +See http://www.iro.umontreal.ca/contrib/po/HTML/team-LL.html for the +translation teams for a given language LL. + +Many files included in Texinfo distribution are copied from other +locations. See util/srclist*. diff --git a/contrib/texinfo/COPYING b/contrib/texinfo/COPYING index e81facd..d60c31a 100644 --- a/contrib/texinfo/COPYING +++ b/contrib/texinfo/COPYING @@ -1,11 +1,340 @@ -The files in here are all Copyright (C) Free Software Foundation, and -are under three different licenses: + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 -* GPL - (text in doc/COPYING) -* LGPL - (text in doc/COPYING.LIB) -* FDL - (text in doc/COPYING.DOC and doc/fdl.texi) + 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. -The source files are grouped by license into their respective -directories. All documents in doc/ contain the relevant licensing -information. + 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. diff --git a/contrib/texinfo/ChangeLog b/contrib/texinfo/ChangeLog index 45597d0..fbbaff6 100644 --- a/contrib/texinfo/ChangeLog +++ b/contrib/texinfo/ChangeLog @@ -1,3 +1,553 @@ +2003-06-10 + + * version 4.6. + +2003-06-04 + + * config.sub: update from gnulib. + +2003-06-03 + + * mkinstalldirs: update from gnulib. + +2003-06-02 Akim Demaille + + * util/texi2dvi (tex_envvars): New. + Use it to forward -I directories to BIBINPUTS and BSTINPUTS, in + addition of INDEXSTYLE and TEXINPUTS. + +2003-06-02 + + * makeinfo/html.c (html_output_head): don't output the , to + avoid having mozilla put up a document navigation bar when + we don't have anything else to support it yet. Report from: + Per Bothner. + * makeinfo/makeinfo.c: no need to declare add_link or + add_escaped_anchor_name, since they are not used. + + * doc/texinfo.txi (Contents): recommend @contents at the beginning + more strongly. Suggestions from Kevin Ryde. + +2003-06-01 + + * makeinfo/macro.c (apply): make \\ expand to \ even if the macro + has no arguments. Report from: Jesper Harder , + 31 May 2003 02:56:20 +0200. + +2003-05-31 + + * util/dir-example (C++ libraries): new category, suggested by Bruno. + +2003-05-29 + + * configure.ac: pretest version 4.5.93. + +2003-05-29 gettextize + + * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.12.1. + +2003-05-26 + + * util/texi2dvi: spurious \ in tex_args assignment. + + * doc/texinfo.txi (Contents): trim excess words. + +2003-05-25 + + * util/texi2dvi: extra quotes for the tex_args assignment in + --batch mode. + +2003-05-19 + + * lib/xexit.c: translate fflush error messages, add newlines + (report from Jim Meyering). + * util/{texindex.c,install-info.c}, + * makeinfo/makeinfo.c, + * info/info.c: use xexit again, with redundant return to avoid + warnings. + +2003-05-18 + + * lib/xexit.c (xexit): fputs not fprintf, so we get newline; + translate the messages, too. Report from Jim Meyering. + + * util/dir-example: move gcc/automake entries. + + * pretest version 4.5.92. + + * update to automake 1.7.5. + + * makeinfo/html.c (append_char): forgot to increment length, duh. + Report from: "Torsten Bronger" , + 18 May 2003 14:36:23 +0200. + +2003-05-17 + + * makeinfo/makeinfo.c (defining_copying): new fn. + (add_char): call it, when testing if we should + call html_output_head. + Report from: Torsten Bronger , + 17 May 2003 22:10:42 +0200. + + * configure.ac: pretest version 4.5.91. + +2003-05-16 + + * makeinfo/index.c (sort_index): don't deref NULL. Report from Jan. + +2003-05-13 + + * makeinfo/html.c (append_char): appease sgi compiler. + * makeinfo/html.c (insert_html_tag): remove spurious arg to pop_tag, + From: ezra peisach , 13 + May 2003 12:13:40 -0400. + + Fix a few GCC warnings, reported by Jim Meyering: + + * info/nodes.c: parenthesize assignment used as truth value. + * info/nodemenu.c (format_node_info): strcpy instead of sprintf, + since there's no format. + * makeinfo/makeinfo.c (isolate_nodename): remove spurious decl. + * makeinfo/xml.c (xml_insert_indexterm): declare as void. + * info/key.c: initialize with 0,0 at end. + * info/infokey.c (main): return instead of xexit, and remove + unused variable. + * makeinfo/html.c (init_buffer): forgot to return buf. + * info/info.c (remember_info_program_name): remove spurious + declaration. + + * makeinfo/sectioning.c, + * info/infomap.c: remove unused variables. + + * makeinfo/makeinfo.c (insert_toplevel_subdirectory), + * info/man.c, + * info/infodoc.c (info_find_or_create_help_window): parenthesize + && within ||. + * info/display.c (display_update_one_window): initialize rep to + NULL, parenthesize && within ||. + + * util/install-info.c, + * info/info.c (main), + * info/makedoc.c (main): return instead of xexit. + +2003-05-13 Akim Demaille + + * util/texi2dvi (get_xref_files): Pass --file-line-error-style + to TeX when supported. + +2003-05-12 + + * configure.ac: pretest version 4.5.90. + + * Makefile.am (EXTRA_DIST): add onceonly.m4. + + * makeinfo/tests/accentenc: must discard stderr since we expect + two errors in this case. + + * makeinfo/makeinfo.c (main): new option --css-include. + (usage): add to --help message. + * makeinfo/makeinfo.h (css_include): new global. + * makeinfo/html.c (append_char, process_css_file): new fns + implementing it. + (html_output_head): call it. + * doc/texinfo.txi (HTML CSS): new node describing it. + Also split up the Generating HTML node into subnodes. + + * config.{guess,sub}: update from gnulib. + +2003-05-10 + + * makeinfo/index.c (sort_index): allocate the sorted index in new + memory, and set the original index to that, to avoid problems with + @printindex being called twice on the same index. + (cm_printindex): do not free the returned index. + Report from: Dumas Patrice , 9 May 2003 + 15:12:21 +0200. + +2003-05-09 + + * makeinfo/defun.c (cm_defun): issue error message without extra + x's. Report from: Dumas Patrice , 9 May + 2003 17:24:25 +0200. + +2003-05-07 Akim Demaille + + * util/texi2dvi (textra_cmd): New. + (textra): Escape escapes from sed's evaluation. + Use them to support additional TeX/LaTeX commands. + Support --command as a synonym for --texinfo. + +2003-05-06 + + * util/dir-example: finish getting rid of GNU packages. + +2003-05-04 + + * doc/texinfo.tex (\itemizey): if no arg to @itemize, default to + @bullet. Fix from: Stepan Kasal 2 May 2003 + 09:32:11 +0200, report from: Jesper Harder . + +2003-04-30 + + * makeinfo/.gdbinit: no colon on local variables. + + * doc/texinfo.txi (documentencoding): Document new Info output feature. + makeinfo/lang.h (encoding_type): rename `ecname' member to `encname'. + makeinfo/html.c, lang.c: change usage. + makeinfo/lang.c (cm_documentencoding): fix typo in warning. + makeinfo/makeinfo.h (SPLIT_SIZE_THRESHOLD): remove. + (info_trailer): declare. + makeinfo/makeinfo.c (info_trailer): new fn to generate Local + Variables: section if --enable-encoding and + @documentencoding are given. + (convert_from_loaded_file): call it. + * makeinfo/node.c (split_file): write trailer into each split + file. Also, simply split files if file size is less than + --split-size, removing SPLIT_SIZE_THRESHOLD. + + * doc/texinfo.tex: remove trailing whitespace. + +2003-04-29 + + * makeinfo/node.c (cm_anchor): normalize_node_name so that an + anchor named "TOP" or "top" or whatever is not allowed. Report + from: Dumas Patrice , 29 Apr 2003 18:56:51 + +0200. + +2003-04-28 + + * makeinfo/makeinfo.c: whitespace cleanup. + + * doc/texinfo.tex (\doprintindex): don't \kern-\parindent, it makes + the first index entry stick out to the left. + Report from: Jesper Harder , + 28 Apr 2003 03:10:36 +0200. + + From Akim Demaille : + * makeinfo/makeinfo.c (cm_value): Warn for undefined flags. + +2003-04-27 + + * doc/texinfo.tex (\footnote, \smartitalicx): use \ptexslash + for italic correction instead of \/, since we've redefined \/ now. + Report from: Jesper Harder , 27 Apr 2003 + 23:30:29 +0200. + + * util/dir-example (mailutils): more from Wojciech Polak. + (autoconf): align/edit/sort entries. + +2003-04-26 + + * doc/texinfo.txi (Image Syntax): second and following @image args + optional. Report from: Max Techter , 26 Apr 2003 + 15:50:02 +0200. + + * util/dir-example (anubis): request from Wojciech Polak. + +2003-04-25 + + * makeinfo/defun.c (defun_internal): whitespace needed in docbook + output for deftype*. From: José Fonseca + , 25 Apr 2003 13:07:13 +0100. + +2003-04-21 + + * doc/texinfo.tex (\dofirstparagraphindent): forgot to rename the + \...word's. + (\suppressfirstparagraphindent): forgot to rename + to \dosuppress... Reported by Simon. + +2003-04-20 + + * Installed changes from Simon for suppressing indentation on the + first paragraph after section headings, and for new @indent command: + + 2003-04-12 Simon Law + * doc/texinfo.tex (\firstparagraphindent): implement suppression + of the indentation of the first paragraph. + (\dofirstparagraphindent): for parsing arguments. + (\suppressfirstparagraphindent): suppress, or don't suppress. + (\dosuppressfirstparagraphindent): the actual gobbling of indentation. + (\footnote): Compensate for the hanging-indent side-effect. + (\numhead, \apphead, \unnmhead): call \dosuppress... + * makeinfo/cmds.c (command_table): add "firstparagraphindent" + (as cm_firstparagraphindent) + (set_firstparagraphindent, cm_firstparagraphindent): implement + @firstparagraphindent parsing of options. + * makeinfo/makeinfo.h: declare "do_first_par_indent". + * makeinfo/sectioning.c (sectioning_underscore): suppress + indentation if requested. + * doc/texinfo.txi: document it. + + * doc/texinfo.tex (\indent): override \indent primitive to + clear \everypar. + (\ptexindent): for saving/restoring \indent in @tex. + (\footnote): Neutralise the effect of @indent + within a footnote. + * makeinfo/cmds.c (command_table): add "indent" (as cm_indent). + (cm_indent): un-inhibit_paragraph_indentation. + * doc/texinfo.txi: document it. + + * doc/texinfo.txi (Conventions): remove spurious extra vertical space + from bulleted itemize which starts with a quote. + + * makeinfo/cmds.c (command_table): fix @novalidate definition. + + + * Installed changes from Jan for @image support in Info format: + + 2003-04-14 Jan Nieuwenhuizen + * info/display.c (display_update_one_window): Skip new style + image tag/cookie. + + 2003-04-09 Jan Nieuwenhuizen + * makeinfo/makeinfo.c (cm_image): Write ^@^H[image ...^@^H] tag. + + + * makeinfo/html.c (html_output_head): use \n"); + } + add_word ("\n\n"); if (title && !html_title_written && titlepage_cmd_present) @@ -82,6 +127,158 @@ rel=\"generator-home\">\n"); } } + + +/* Append CHAR to BUFFER, (re)allocating as necessary. We don't handle + null characters. */ + +typedef struct +{ + unsigned size; /* allocated */ + unsigned length; /* used */ + char *buffer; +} buffer_type; + + +static buffer_type * +init_buffer () +{ + buffer_type *buf = xmalloc (sizeof (buffer_type)); + buf->length = 0; + buf->size = 0; + buf->buffer = NULL; + + return buf; +} + + +static void +append_char (buf, c) + buffer_type *buf; + int c; +{ + buf->length++; + if (buf->length >= buf->size) + { + buf->size += 100; + buf->buffer = xrealloc (buf->buffer, buf->size); + } + buf->buffer[buf->length - 1] = c; + buf->buffer[buf->length] = 0; +} + + +/* Read the cascading style-sheet file FILENAME. Write out any @import + commands, which must come first, by the definition of css. If the + file contains any actual css code following the @imports, return it; + else return NULL. */ + +static char * +process_css_file (filename) + char *filename; +{ + int c, lastchar; + FILE *f; + buffer_type *import_text = init_buffer (); + buffer_type *inline_text = init_buffer (); + unsigned lineno = 1; + enum { null_state, comment_state, import_state, inline_state } state + = null_state, prev_state; + + /* read from stdin if `-' is the filename. */ + f = STREQ (filename, "-") ? stdin : fopen (filename, "r"); + if (!f) + { + error (_("%s: could not open --css-file: %s"), progname, filename); + return NULL; + } + + /* Read the file. The @import statements must come at the beginning, + with only whitespace and comments allowed before any inline css code. */ + while ((c = getc (f)) >= 0) + { + if (c == '\n') + lineno++; + + switch (state) + { + case null_state: /* between things */ + if (c == '@') + { + /* If there's some other @command, just call it an + import, it's all the same to us. So don't bother + looking for the `import'. */ + append_char (import_text, c); + state = import_state; + } + else if (c == '/') + { /* possible start of a comment */ + int nextchar = getc (f); + if (nextchar == '*') + state = comment_state; + else + { + ungetc (nextchar, f); /* wasn't a comment */ + state = inline_state; + } + } + else if (isspace (c)) + ; /* skip whitespace; maybe should use c_isspace? */ + + else + /* not an @import, not a comment, not whitespace: we must + have started the inline text. */ + state = inline_state; + + if (state == inline_state) + append_char (inline_text, c); + + if (state != null_state) + prev_state = null_state; + break; + + case comment_state: + if (c == '/' && lastchar == '*') + state = prev_state; /* end of comment */ + break; /* else ignore this comment char */ + + case import_state: + append_char (import_text, c); /* include this import char */ + if (c == ';') + { /* done with @import */ + append_char (import_text, '\n'); /* make the output nice */ + state = null_state; + prev_state = import_state; + } + break; + + case inline_state: + /* No harm in writing out comments, so don't bother parsing + them out, just append everything. */ + append_char (inline_text, c); + break; + } + + lastchar = c; + } + + /* Reached the end of the file. We should not be still in a comment. */ + if (state == comment_state) + warning (_("%s:%d: --css-file ended in comment"), filename, lineno); + + /* Write the @import text, if any. */ + if (import_text->buffer) + { + add_word (import_text->buffer); + free (import_text->buffer); + free (import_text); + } + + /* We're wasting the buffer struct memory, but so what. */ + return inline_text->buffer; +} + + /* Escape HTML special characters in the string if necessary, returning a pointer to a possibly newly-allocated one. */ @@ -139,6 +336,8 @@ escape_string (string) free (string); return newstring - newlen; } + + /* Save current tag. */ void @@ -187,7 +386,7 @@ insert_html_tag (start_or_end, tag) } if (start_or_end != START) - pop_tag (tag); + pop_tag (); if (htmlstack) old_tag = htmlstack->tag; @@ -228,6 +427,8 @@ insert_html_tag (start_or_end, tag) } } + + /* Output an HTML to the filename for NODE, including the other string as extra attributes. */ void @@ -240,7 +441,7 @@ add_link (nodename, attributes) add_word_args ("%s", attributes); add_word_args (" href=\""); add_anchor_name (nodename, 1); - add_word ("\">\n"); + add_word ("\">\n"); } } diff --git a/contrib/texinfo/makeinfo/index.c b/contrib/texinfo/makeinfo/index.c index 05c883c..ab6a53c 100644 --- a/contrib/texinfo/makeinfo/index.c +++ b/contrib/texinfo/makeinfo/index.c @@ -1,7 +1,7 @@ /* index.c -- indexing for Texinfo. - $Id: index.c,v 1.4 2002/11/26 22:54:31 karl Exp $ + $Id: index.c,v 1.8 2003/05/16 23:52:40 karl Exp $ - Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. + 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 @@ -342,9 +342,14 @@ init_indices () here; otherwise, when we try to define the pg index again just below, it will still point to cp. */ undefindex (name_index_alist[i]->name); - free (name_index_alist[i]->name); - free (name_index_alist[i]); - name_index_alist[i] = NULL; + + /* undefindex sets all this to null in some cases. */ + if (name_index_alist[i]) + { + free (name_index_alist[i]->name); + free (name_index_alist[i]); + name_index_alist[i] = NULL; + } } } @@ -551,16 +556,16 @@ make_index_entries_unique (array, count) free (copy); } -/* Sort the index passed in INDEX, returning an array of - pointers to elements. The array is terminated with a NULL - pointer. We call qsort because it's supposed to be fast. - I think this looks bad. */ + +/* Sort the index passed in INDEX, returning an array of pointers to + elements. The array is terminated with a NULL pointer. */ + INDEX_ELT ** sort_index (index) INDEX_ELT *index; { INDEX_ELT **array; - INDEX_ELT *temp = index; + INDEX_ELT *temp; int count = 0; int save_line_number = line_number; char *save_input_filename = input_filename; @@ -573,35 +578,36 @@ sort_index (index) characters @AE{} etc., to sort incorrectly. */ html = 0; - while (temp) - { - count++; - temp = temp->next; - } - - /* We have the length. Make an array. */ - + for (temp = index, count = 0; temp; temp = temp->next, count++) + ; + /* We have the length, now we can allocate an array. */ array = xmalloc ((count + 1) * sizeof (INDEX_ELT *)); - count = 0; - temp = index; - while (temp) + for (temp = index, count = 0; temp; temp = temp->next, count++) { - array[count++] = temp; + /* Allocate new memory for the return array, since parts of the + original INDEX get freed. Otherwise, if the document calls + @printindex twice on the same index, with duplicate entries, + we'll have garbage the second time. There are cleaner ways to + deal, but this will suffice for now. */ + array[count] = xmalloc (sizeof (INDEX_ELT)); + *(array[count]) = *(temp); /* struct assignment, hope it's ok */ + + /* Adjust next pointers to use the new memory. */ + if (count > 0) + array[count-1]->next = array[count]; /* Set line number and input filename to the source line for this index entry, as this expansion finds any errors. */ - line_number = array[count - 1]->defining_line; - input_filename = array[count - 1]->defining_file; + line_number = array[count]->defining_line; + input_filename = array[count]->defining_file; /* If this particular entry should be printed as a "code" index, - then expand it as @code{entry}, i.e. as in fixed-width font. */ - array[count-1]->entry = expansion (temp->entry_text, - array[count-1]->code); - - temp = temp->next; + then expand it as @code{entry}, i.e., as in fixed-width font. */ + array[count]->entry = expansion (temp->entry_text, array[count]->code); } array[count] = NULL; /* terminate the array. */ + line_number = save_line_number; input_filename = save_input_filename; html = save_html; @@ -619,11 +625,19 @@ sort_index (index) if (lang_env && !STREQ (lang_env, "C") && !STREQ (lang_env, "POSIX")) index_compare_fn = strcoll; } -#endif /* HAVE_STRCOLL */ +#endif /* HAVE_STRCOLL */ /* Sort the array. */ qsort (array, count, sizeof (INDEX_ELT *), index_element_compare); + + /* Remove duplicate entries. */ make_index_entries_unique (array, count); + + /* Replace the original index with the sorted one, in case the + document wants to print it again. If the index wasn't empty. */ + if (index) + *index = **array; + return array; } @@ -667,11 +681,11 @@ cm_printindex () free (index_name); return; } - + /* Do this before sorting, so execute_string is in the good environment */ if (xml && docbook) xml_begin_index (); - + /* Do this before sorting, so execute_string in index_element_compare will give the same results as when we actually print. */ printing_index = 1; @@ -685,25 +699,25 @@ cm_printindex () add_word_args ("
    ", index_name); else if (!no_headers && !docbook) add_word ("* Menu:\n\n"); - + me_inhibit_expansion++; - + /* This will probably be enough. */ line_length = 100; line = xmalloc (line_length); - + for (item = 0; (index = array[item]); item++) { /* A pathological document might have an index entry outside of any node. Don't crash; try using the section name instead. */ - char *index_node = index->node; - + const char *index_node = index->node; + line_number = index->defining_line; input_filename = index->defining_file; - + if ((!index_node || !*index_node) && html) index_node = toc_find_section_of_node (index_node); - + if (!index_node || !*index_node) { line_error (_("Entry for index `%s' outside of any node"), @@ -711,7 +725,7 @@ cm_printindex () if (html || !no_headers) index_node = _("(outside of any node)"); } - + if (html) /* fixme: html: we should use specific index anchors pointing to the actual location of the indexed position (but then we @@ -728,7 +742,7 @@ cm_printindex () expand the original entry text here. */ char *escaped_entry = xstrdup (index->entry_text); char *expanded_entry; - + /* expansion() doesn't HTML-escape the argument, so need to do it separately. */ escaped_entry = escape_string (escaped_entry); @@ -741,12 +755,14 @@ cm_printindex () if (index->node && *index->node) { /* Make sure any non-macros in the node name are expanded. */ + char *expanded_index; + in_fixed_width_font++; - index_node = expansion (index_node, 0); + expanded_index = expansion (index_node, 0); in_fixed_width_font--; - add_anchor_name (index_node, 1); - add_word_args ("\">%s", index_node); - free (index_node); + add_anchor_name (expanded_index, 1); + add_word_args ("\">%s", expanded_index); + free (expanded_index); } else if (STREQ (index_node, _("(outside of any node)"))) { @@ -769,11 +785,11 @@ cm_printindex () else { unsigned new_length = strlen (index->entry); - + if (new_length < 50) /* minimum length used below */ new_length = 50; new_length += strlen (index_node) + 7; /* * : .\n\0 */ - + if (new_length > line_length) { line_length = new_length; @@ -800,7 +816,7 @@ cm_printindex () index. Instead, output the number or name of the section that corresponds to that node. */ char *section_name = toc_find_section_of_node (index_node); - + sprintf (line, "%-*s ", number_sections ? 50 : 1, index->entry); line[strlen (index->entry)] = ':'; insert_string (line); @@ -808,13 +824,13 @@ cm_printindex () { int idx = 0; unsigned ref_len = strlen (section_name) + 30; - + if (ref_len > line_length) { line_length = ref_len; line = xrealloc (line, line_length); } - + if (number_sections) { while (section_name[idx] @@ -835,7 +851,7 @@ cm_printindex () } } } - + /* Prevent `output_paragraph' from growing to the size of the whole index. */ flush_output (); @@ -844,17 +860,16 @@ cm_printindex () free (line); free (index_name); - + me_inhibit_expansion--; - printing_index = 0; - free (array); + close_single_paragraph (); filling_enabled = saved_filling_enabled; inhibit_paragraph_indentation = saved_inhibit_paragraph_indentation; input_filename = saved_input_filename; line_number = saved_line_number; - + if (html) add_word ("
"); else if (xml && docbook) diff --git a/contrib/texinfo/makeinfo/insertion.c b/contrib/texinfo/makeinfo/insertion.c index ecc0f66..95c0be2 100644 --- a/contrib/texinfo/makeinfo/insertion.c +++ b/contrib/texinfo/makeinfo/insertion.c @@ -1,5 +1,5 @@ /* insertion.c -- insertions for Texinfo. - $Id: insertion.c,v 1.14 2003/01/02 23:46:29 karl Exp $ + $Id: insertion.c,v 1.21 2003/04/01 14:34:18 karl Exp $ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. @@ -130,8 +130,21 @@ char * get_item_function () { char *item_function; + char *item_loc; + get_rest_of_line (0, &item_function); + /* If the document erroneously says + @itemize @bullet @item foobar + it's nicer to give an error up front than repeat `@bullet expected + braces' until we get a segmentation fault. */ + item_loc = strstr (item_function, "@item"); + if (item_loc) + { + line_error (_("@item not allowed in argument to @itemize")); + *item_loc = 0; + } + /* If we hit the end of text in get_rest_of_line, backing up input pointer will cause the last character of the last line be pushed back onto the input, which is wrong. */ @@ -191,7 +204,7 @@ pop_insertion () /* Return a pointer to the print name of this enumerated type. */ -char * +const char * insertion_type_pname (type) enum insertion_type type; { @@ -643,8 +656,14 @@ begin_insertion (type) close_single_paragraph (); break; - /* Insertions that are no-ops in info, but do something in TeX. */ case cartouche: + if (html) + add_word ("
\n"); + if (in_menu) + no_discard++; + break; + + /* Insertions that are no-ops in info, but do something in TeX. */ case ifclear: case ifhtml: case ifinfo: @@ -845,7 +864,7 @@ end_insertion (type) case menu: in_menu--; /* No longer hacking menus. */ - if (html) + if (html && !no_headers) add_word ("\n"); else if (!no_headers) close_insertion_paragraph (); @@ -869,8 +888,13 @@ end_insertion (type) close_insertion_paragraph (); break; - case group: case cartouche: + if (html) + add_word ("
\n"); + close_insertion_paragraph (); + break; + + case group: close_insertion_paragraph (); break; @@ -981,7 +1005,7 @@ discard_insertions (specials_ok) break; else { - char *offender = insertion_type_pname (insertion_stack->insertion); + const char *offender = insertion_type_pname (insertion_stack->insertion); file_line_error (insertion_stack->filename, insertion_stack->line_number, @@ -1643,9 +1667,10 @@ cm_item () in this context, but I cannot find any way to force them all render exactly one blank line. */ if (!itemx_flag - && strncmp ((char *) output_paragraph + && ((output_paragraph_offset < sizeof (dl_tag) + 1) + || strncmp ((char *) output_paragraph + output_paragraph_offset - sizeof (dl_tag) + 1, - dl_tag, sizeof (dl_tag) - 1) != 0) + dl_tag, sizeof (dl_tag) - 1) != 0)) add_word ("
"); add_word ("
"); diff --git a/contrib/texinfo/makeinfo/lang.c b/contrib/texinfo/makeinfo/lang.c index a9cbfe1..2938196 100644 --- a/contrib/texinfo/makeinfo/lang.c +++ b/contrib/texinfo/makeinfo/lang.c @@ -1,7 +1,7 @@ /* lang.c -- language-dependent support. - $Id: lang.c,v 1.5 2002/11/12 18:48:52 feloy Exp $ + $Id: lang.c,v 1.8 2003/05/01 00:05:27 karl Exp $ - Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 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 @@ -31,12 +31,12 @@ encoding_code_type document_encoding_code = no_encoding; /* Current language code; default is English. */ language_code_type language_code = en; -iso_map_type us_ascii_map [] = {{NULL, 0, 0}}; /* ASCII map is trivial */ +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 */ -iso_map_type iso8859_1_map [] = { +static iso_map_type iso8859_1_map [] = { { "nbsp", 0xA0, 0x00A0 }, { "iexcl", 0xA1, 0x00A1 }, { "cent", 0xA2, 0x00A2 }, @@ -86,7 +86,7 @@ iso_map_type iso8859_1_map [] = { { "Iacute", 0xCD, 0x00CD }, { "Icirc", 0xCE, 0x00CE }, { "Iuml", 0xCF, 0x00CF }, - { "ETH", 0xD0, 0x00D0 }, /* I don't know ;-( */ + { "ETH", 0xD0, 0x00D0 }, { "Ntilde", 0xD1, 0x00D1 }, { "Ograve", 0xD2, 0x00D2 }, { "Oacute", 0xD3, 0x00D3 }, @@ -137,11 +137,133 @@ iso_map_type iso8859_1_map [] = { { 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", NULL }, + { 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 }, @@ -310,7 +432,7 @@ void cm_documentlanguage () { language_code_type c; - char *lang_arg; + char *lang_arg; /* Read the line with the language code on it. */ get_rest_of_line (0, &lang_arg); @@ -365,13 +487,13 @@ cm_documentencoding () { encoding_code_type enc; char *enc_arg; - + get_rest_of_line (1, &enc_arg); /* See if we have this encoding. */ for (enc = no_encoding+1; enc != last_encoding_code; enc++) { - if (strcasecmp (enc_arg, encoding_table[enc].ecname) == 0) + if (strcasecmp (enc_arg, encoding_table[enc].encname) == 0) { document_encoding_code = enc; break; @@ -380,7 +502,7 @@ cm_documentencoding () /* If we didn't find this code, complain. */ if (enc == last_encoding_code) - warning (_("unrecogized encoding name `%s'"), enc_arg); + warning (_("unrecognized encoding name `%s'"), enc_arg); else if (encoding_table[document_encoding_code].isotab == NULL) warning (_("sorry, encoding `%s' not supported"), enc_arg); @@ -434,7 +556,7 @@ cm_accent_generic_html (arg, start, end, html_supported, single, 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 ())) @@ -447,7 +569,7 @@ cm_accent_generic_html (arg, start, end, html_supported, single, escape_html = saved_escape_html; } else - { + { valid_html_accent = 0; if (html_solo_standalone) { /* No special HTML support, so produce standalone char. */ @@ -492,7 +614,7 @@ cm_accent_generic_no_headers (arg, start, end, single, html_solo) 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 ;-) @@ -505,12 +627,12 @@ cm_accent_generic_no_headers (arg, start, end, single, html_solo) 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. */ + should be produced. */ warning (_("%s is an invalid ISO code, using %c"), buffer, single); add_char (single); } - + free (buffer); } } @@ -579,7 +701,7 @@ cm_accent_generic (arg, start, end, html_supported, single, 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); @@ -665,9 +787,9 @@ cm_special_char (arg) else if (strcmp (command, "ae") == 0) add_encoded_char ("aelig", command); else if (strcmp (command, "OE") == 0) - add_word ("Œ", command); + add_encoded_char ("#140", command); else if (strcmp (command, "oe") == 0) - add_word ("œ", command); + add_encoded_char ("#156", command); else if (strcmp (command, "AA") == 0) add_encoded_char ("Aring", command); else if (strcmp (command, "aa") == 0) diff --git a/contrib/texinfo/makeinfo/lang.h b/contrib/texinfo/makeinfo/lang.h index b78ce9c..a1e9489 100644 --- a/contrib/texinfo/makeinfo/lang.h +++ b/contrib/texinfo/makeinfo/lang.h @@ -1,7 +1,7 @@ /* lang.h -- declarations for language codes etc. - $Id: lang.h,v 1.3 2002/11/07 16:10:49 karl Exp $ + $Id: lang.h,v 1.4 2003/05/01 00:05:27 karl Exp $ - Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. + 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 @@ -80,9 +80,9 @@ extern language_type language_table[]; typedef enum { no_encoding, US_ASCII, - ISO_8859_1, /* default for en, de, */ - ISO_8859_2, /* actualy not supported like the rest below */ - ISO_8859_3, + 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, @@ -118,7 +118,7 @@ typedef struct typedef struct { encoding_code_type ec; /* document encoding type (see above enum) */ - char *ecname; /* encoding name like ISO-8859-1 */ + char *encname; /* encoding name like "ISO-8859-1", valid in Emacs */ iso_map_type *isotab; /* address of ISO translation table */ } encoding_type; diff --git a/contrib/texinfo/makeinfo/macro.c b/contrib/texinfo/makeinfo/macro.c index 357d4ac..ef33a53 100644 --- a/contrib/texinfo/makeinfo/macro.c +++ b/contrib/texinfo/makeinfo/macro.c @@ -1,7 +1,7 @@ /* macro.c -- user-defined macros for Texinfo. - $Id: macro.c,v 1.1 2002/08/25 23:38:38 karl Exp $ + $Id: macro.c,v 1.2 2003/06/01 23:41:23 karl Exp $ - Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. + 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 @@ -322,7 +322,7 @@ apply (named, actuals, body) else { /* Snarf parameter name, check against named parameters. */ char *param; - int param_start, which, len; + int param_start, len; param_start = ++i; while (body[i] && body[i] != '\\') @@ -336,29 +336,38 @@ apply (named, actuals, body) if (body[i]) /* move past \ */ i++; - /* Now 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); - } - else - { /* not a parameter, either it's \\ (if len==0) or an - error. In either case, restore one \ at least. */ - if (len) { - warning (_("\\ in macro expansion followed by `%s' instead of \\ or parameter name"), - param); - } + 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) { @@ -371,8 +380,7 @@ apply (named, actuals, body) strcpy (new_body + new_body_index, text); new_body_index += len; - if (!named || !named[which]) - free (text); + free (text); } } diff --git a/contrib/texinfo/makeinfo/makeinfo.c b/contrib/texinfo/makeinfo/makeinfo.c index 725e5de..a5e63fc 100644 --- a/contrib/texinfo/makeinfo/makeinfo.c +++ b/contrib/texinfo/makeinfo/makeinfo.c @@ -1,7 +1,7 @@ /* makeinfo -- convert Texinfo source into other formats. - $Id: makeinfo.c,v 1.17 2003/01/19 18:44:28 karl Exp $ + $Id: makeinfo.c,v 1.34 2003/06/02 12:32:29 karl Exp $ - Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -31,6 +31,7 @@ #include "html.h" #include "index.h" #include "insertion.h" +#include "lang.h" #include "macro.h" #include "node.h" #include "toc.h" @@ -167,7 +168,6 @@ char **get_brace_args (); int array_len (); void free_array (); static int end_of_sentence_p (); -static void isolate_nodename (); void reader_loop (); void remember_brace (), remember_brace_1 (); void pop_and_call_brace (), discard_braces (); @@ -181,7 +181,6 @@ void inhibit_output_flushing (), uninhibit_output_flushing (); int set_paragraph_indent (); int self_delimiting (), search_forward (); int multitable_item (), number_of_node (); -extern void add_link (), add_escaped_anchor_name (); void me_execute_string_keep_state (); void maybe_update_execution_strings (); @@ -189,11 +188,10 @@ void maybe_update_execution_strings (); extern char *escape_string (); extern void insert_html_tag (); extern void sectioning_html (); -extern void add_link (); #if defined (VA_FPRINTF) && __STDC__ /* Unfortunately we must use prototypes if we are to use . */ -void add_word_args (char *, ...); +void add_word_args (const char *, ...); void execute_string (char *, ...); #else void add_word_args (); @@ -218,10 +216,10 @@ fs_error (filename) /* Print an error message, and return false. */ void #if defined (VA_FPRINTF) && __STDC__ -error (char *format, ...) +error (const char *format, ...) #else error (format, va_alist) - char *format; + const char *format; va_dcl #endif { @@ -245,12 +243,12 @@ error (format, va_alist) /* 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, char *format, ...) +file_line_error (char *infile, int lno, const char *format, ...) #else file_line_error (infile, lno, format, va_alist) char *infile; int lno; - char *format; + const char *format; va_dcl #endif { @@ -276,10 +274,10 @@ file_line_error (infile, lno, format, va_alist) number from global variables. */ void #if defined (VA_FPRINTF) && __STDC__ -line_error (char *format, ...) +line_error (const char *format, ...) #else line_error (format, va_alist) - char *format; + const char *format; va_dcl #endif { @@ -303,10 +301,10 @@ line_error (format, va_alist) void #if defined (VA_FPRINTF) && __STDC__ -warning (char *format, ...) +warning (const char *format, ...) #else warning (format, va_alist) - char *format; + const char *format; va_dcl #endif { @@ -374,7 +372,7 @@ usage (exit_value) else { printf (_("Usage: %s [OPTION]... TEXINFO-FILE...\n"), progname); - puts ("\n"); + puts (""); puts (_("\ Translate Texinfo source documentation to various other formats, by default\n\ @@ -430,16 +428,21 @@ Options for Info and plain text:\n\ --split-size=NUM split Info files at size NUM (default %d).\n"), fill_column, paragraph_start_indent, DEFAULT_SPLIT_SIZE); - puts ("\n"); puts (_("\ +Options for HTML:\n\ + --css-include=FILE include FILE in HTML