From c7f1ec34516c6991cf77a5d87547937634cfa1bd Mon Sep 17 00:00:00 2001 From: John Marino Date: Sat, 30 Apr 2011 23:52:02 +0200 Subject: [PATCH] Upgrade Texinfo from 4.8 to 4.13 on the vendor branch --- contrib/texinfo/AUTHORS | 31 - contrib/texinfo/COPYING | 902 +- contrib/texinfo/README.DELETED | 97 - contrib/texinfo/README.DRAGONFLY | 44 - contrib/texinfo/doc/README | 44 - contrib/texinfo/doc/fdl.texi | 15 +- contrib/texinfo/doc/info-stnd.texi | 493 +- contrib/texinfo/doc/info.1 | 32 +- contrib/texinfo/doc/info.5 | 24 +- contrib/texinfo/doc/info.texi | 753 +- contrib/texinfo/doc/infokey.1 | 13 +- contrib/texinfo/doc/install-info.1 | 91 +- contrib/texinfo/doc/makeinfo.1 | 65 +- contrib/texinfo/doc/pdftexi2dvi.1 | 187 + contrib/texinfo/doc/texi2dvi.1 | 187 + contrib/texinfo/doc/texi2pdf.1 | 187 + contrib/texinfo/doc/texindex.1 | 19 +- contrib/texinfo/doc/texinfo.5 | 24 +- contrib/texinfo/doc/texinfo.tex | 8997 +++++++++++++++++ contrib/texinfo/doc/texinfo.txi | 2971 +++--- contrib/texinfo/doc/version-stnd.texi | 8 +- contrib/texinfo/doc/version.texi | 8 +- contrib/texinfo/gnulib/lib/argz.c | 406 + contrib/texinfo/gnulib/lib/error.c | 338 + contrib/texinfo/gnulib/lib/error.h | 65 + contrib/texinfo/gnulib/lib/exitfail.c | 24 + contrib/texinfo/gnulib/lib/exitfail.h | 18 + contrib/texinfo/gnulib/lib/getopt.c | 1186 +++ contrib/texinfo/gnulib/lib/getopt1.c | 170 + contrib/texinfo/gnulib/lib/getopt_int.h | 130 + contrib/texinfo/gnulib/lib/gettext.h | 270 + contrib/texinfo/gnulib/lib/intprops.h | 77 + contrib/texinfo/gnulib/lib/localcharset.c | 462 + contrib/texinfo/gnulib/lib/localcharset.h | 41 + contrib/texinfo/gnulib/lib/malloc.c | 57 + contrib/texinfo/gnulib/lib/malloca.c | 137 + contrib/texinfo/gnulib/lib/malloca.h | 134 + contrib/texinfo/gnulib/lib/malloca.valgrind | 7 + contrib/texinfo/gnulib/lib/mbchar.c | 35 + contrib/texinfo/gnulib/lib/mbchar.h | 350 + contrib/texinfo/gnulib/lib/mbiter.h | 215 + contrib/texinfo/gnulib/lib/mbscasecmp.c | 102 + contrib/texinfo/gnulib/lib/mbschr.c | 56 + contrib/texinfo/gnulib/lib/mbslen.c | 48 + contrib/texinfo/gnulib/lib/mbsncasecmp.c | 103 + contrib/texinfo/gnulib/lib/mbsstr.c | 385 + contrib/texinfo/gnulib/lib/mbswidth.c | 175 + contrib/texinfo/gnulib/lib/mbswidth.h | 60 + contrib/texinfo/gnulib/lib/mbuiter.h | 222 + contrib/texinfo/gnulib/lib/memchr.c | 172 + contrib/texinfo/gnulib/lib/memcmp.c | 361 + contrib/texinfo/gnulib/lib/memcpy.c | 35 + contrib/texinfo/gnulib/lib/memmem.c | 76 + contrib/texinfo/gnulib/lib/memmove.c | 26 + .../{lib/xstrdup.c => gnulib/lib/mempcpy.c} | 24 +- contrib/texinfo/gnulib/lib/mkstemp.c | 44 + contrib/texinfo/gnulib/lib/str-kmp.h | 150 + contrib/texinfo/gnulib/lib/str-two-way.h | 429 + contrib/texinfo/gnulib/lib/streq.h | 176 + contrib/texinfo/gnulib/lib/strnlen1.c | 35 + contrib/texinfo/gnulib/lib/strnlen1.h | 39 + contrib/texinfo/{ => gnulib}/lib/tempname.c | 96 +- contrib/texinfo/gnulib/lib/tempname.h | 39 + contrib/texinfo/gnulib/lib/unitypes.h | 26 + contrib/texinfo/gnulib/lib/uniwidth.h | 64 + contrib/texinfo/gnulib/lib/uniwidth/cjk.h | 37 + contrib/texinfo/gnulib/lib/uniwidth/width.c | 323 + contrib/texinfo/gnulib/lib/wcwidth.c | 51 + contrib/texinfo/gnulib/lib/xalloc-die.c | 41 + contrib/texinfo/gnulib/lib/xalloc.h | 280 + contrib/texinfo/gnulib/lib/xmalloc.c | 122 + contrib/texinfo/gnulib/lib/xsetenv.c | 38 + contrib/texinfo/gnulib/lib/xsetenv.h | 31 + contrib/texinfo/info/README | 30 - contrib/texinfo/info/dir.c | 24 +- contrib/texinfo/info/display.c | 430 +- contrib/texinfo/info/display.h | 15 +- contrib/texinfo/info/doc.c | 146 - contrib/texinfo/info/doc.h | 15 +- contrib/texinfo/info/dribble.c | 21 +- contrib/texinfo/info/dribble.h | 11 +- contrib/texinfo/info/echo-area.c | 147 +- contrib/texinfo/info/echo-area.h | 21 +- contrib/texinfo/info/filesys.c | 121 +- contrib/texinfo/info/filesys.h | 16 +- contrib/texinfo/info/footnotes.c | 49 +- contrib/texinfo/info/footnotes.h | 14 +- contrib/texinfo/info/funs.h | 243 - contrib/texinfo/info/gc.c | 15 +- contrib/texinfo/info/gc.h | 13 +- contrib/texinfo/info/indices.c | 98 +- contrib/texinfo/info/indices.h | 13 +- contrib/texinfo/info/info-utils.c | 214 +- contrib/texinfo/info/info-utils.h | 16 +- contrib/texinfo/info/info.c | 138 +- contrib/texinfo/info/info.h | 23 +- contrib/texinfo/info/infodoc.c | 213 +- contrib/texinfo/info/infokey.c | 34 +- contrib/texinfo/info/infokey.h | 13 +- contrib/texinfo/info/infomap.c | 2274 ++--- contrib/texinfo/info/infomap.h | 13 +- contrib/texinfo/info/key.c | 146 - contrib/texinfo/info/key.h | 11 +- contrib/texinfo/info/m-x.c | 35 +- contrib/texinfo/info/makedoc.c | 584 ++ contrib/texinfo/info/man.c | 180 +- contrib/texinfo/info/man.h | 13 +- contrib/texinfo/info/nodemenu.c | 55 +- contrib/texinfo/info/nodes.c | 46 +- contrib/texinfo/info/nodes.h | 14 +- contrib/texinfo/info/pcterm.c | 759 ++ contrib/texinfo/info/search.c | 252 +- contrib/texinfo/info/search.h | 18 +- contrib/texinfo/info/session.c | 1438 ++- contrib/texinfo/info/session.h | 32 +- contrib/texinfo/info/signals.c | 15 +- contrib/texinfo/info/signals.h | 14 +- contrib/texinfo/info/termdep.h | 15 +- contrib/texinfo/info/terminal.c | 45 +- contrib/texinfo/info/terminal.h | 15 +- contrib/texinfo/info/tilde.c | 44 +- contrib/texinfo/info/tilde.h | 15 +- contrib/texinfo/info/variables.c | 70 +- contrib/texinfo/info/variables.h | 17 +- contrib/texinfo/info/window.c | 798 +- contrib/texinfo/info/window.h | 57 +- .../{util => install-info}/install-info.c | 1371 ++- contrib/texinfo/lib/README | 13 - contrib/texinfo/lib/gettext.h | 68 - contrib/texinfo/lib/substring.c | 15 +- contrib/texinfo/lib/xalloc.h | 90 - contrib/texinfo/lib/xexit.c | 16 +- contrib/texinfo/lib/xmalloc.c | 61 - contrib/texinfo/makeinfo/README | 17 - contrib/texinfo/makeinfo/cmds.c | 401 +- contrib/texinfo/makeinfo/cmds.h | 30 +- contrib/texinfo/makeinfo/defun.c | 60 +- contrib/texinfo/makeinfo/defun.h | 15 +- contrib/texinfo/makeinfo/files.c | 17 +- contrib/texinfo/makeinfo/files.h | 14 +- contrib/texinfo/makeinfo/float.c | 50 +- contrib/texinfo/makeinfo/float.h | 13 +- contrib/texinfo/makeinfo/footnote.c | 19 +- contrib/texinfo/makeinfo/footnote.h | 14 +- contrib/texinfo/makeinfo/html.c | 134 +- contrib/texinfo/makeinfo/html.h | 22 +- contrib/texinfo/makeinfo/index.c | 130 +- contrib/texinfo/makeinfo/index.h | 21 +- contrib/texinfo/makeinfo/insertion.c | 127 +- contrib/texinfo/makeinfo/insertion.h | 18 +- contrib/texinfo/makeinfo/lang.c | 1381 ++- contrib/texinfo/makeinfo/lang.h | 67 +- contrib/texinfo/makeinfo/macro.c | 63 +- contrib/texinfo/makeinfo/macro.h | 22 +- contrib/texinfo/makeinfo/makeinfo.c | 652 +- contrib/texinfo/makeinfo/makeinfo.h | 65 +- contrib/texinfo/makeinfo/multi.c | 54 +- contrib/texinfo/makeinfo/multi.h | 14 +- contrib/texinfo/makeinfo/node.c | 96 +- contrib/texinfo/makeinfo/node.h | 14 +- contrib/texinfo/makeinfo/sectioning.c | 23 +- contrib/texinfo/makeinfo/sectioning.h | 13 +- contrib/texinfo/makeinfo/toc.c | 74 +- contrib/texinfo/makeinfo/toc.h | 13 +- contrib/texinfo/makeinfo/xml.c | 378 +- contrib/texinfo/makeinfo/xml.h | 28 +- contrib/texinfo/makeinfo/xref.c | 50 +- contrib/texinfo/makeinfo/xref.h | 13 +- contrib/texinfo/{lib => }/system.h | 101 +- contrib/texinfo/util/README | 14 - contrib/texinfo/util/pdftexi2dvi | 19 + contrib/texinfo/util/texi2dvi | 1792 ++++ contrib/texinfo/util/texi2pdf | 19 + contrib/texinfo/util/texindex.c | 496 +- 174 files changed, 31789 insertions(+), 8656 deletions(-) delete mode 100644 contrib/texinfo/AUTHORS delete mode 100644 contrib/texinfo/README.DELETED delete mode 100644 contrib/texinfo/README.DRAGONFLY delete mode 100644 contrib/texinfo/doc/README create mode 100644 contrib/texinfo/doc/pdftexi2dvi.1 create mode 100644 contrib/texinfo/doc/texi2dvi.1 create mode 100644 contrib/texinfo/doc/texi2pdf.1 create mode 100644 contrib/texinfo/doc/texinfo.tex create mode 100644 contrib/texinfo/gnulib/lib/argz.c create mode 100644 contrib/texinfo/gnulib/lib/error.c create mode 100644 contrib/texinfo/gnulib/lib/error.h create mode 100644 contrib/texinfo/gnulib/lib/exitfail.c create mode 100644 contrib/texinfo/gnulib/lib/exitfail.h create mode 100644 contrib/texinfo/gnulib/lib/getopt.c create mode 100644 contrib/texinfo/gnulib/lib/getopt1.c create mode 100644 contrib/texinfo/gnulib/lib/getopt_int.h create mode 100644 contrib/texinfo/gnulib/lib/gettext.h create mode 100644 contrib/texinfo/gnulib/lib/intprops.h create mode 100644 contrib/texinfo/gnulib/lib/localcharset.c create mode 100644 contrib/texinfo/gnulib/lib/localcharset.h create mode 100644 contrib/texinfo/gnulib/lib/malloc.c create mode 100644 contrib/texinfo/gnulib/lib/malloca.c create mode 100644 contrib/texinfo/gnulib/lib/malloca.h create mode 100644 contrib/texinfo/gnulib/lib/malloca.valgrind create mode 100644 contrib/texinfo/gnulib/lib/mbchar.c create mode 100644 contrib/texinfo/gnulib/lib/mbchar.h create mode 100644 contrib/texinfo/gnulib/lib/mbiter.h create mode 100644 contrib/texinfo/gnulib/lib/mbscasecmp.c create mode 100644 contrib/texinfo/gnulib/lib/mbschr.c create mode 100644 contrib/texinfo/gnulib/lib/mbslen.c create mode 100644 contrib/texinfo/gnulib/lib/mbsncasecmp.c create mode 100644 contrib/texinfo/gnulib/lib/mbsstr.c create mode 100644 contrib/texinfo/gnulib/lib/mbswidth.c create mode 100644 contrib/texinfo/gnulib/lib/mbswidth.h create mode 100644 contrib/texinfo/gnulib/lib/mbuiter.h create mode 100644 contrib/texinfo/gnulib/lib/memchr.c create mode 100644 contrib/texinfo/gnulib/lib/memcmp.c create mode 100644 contrib/texinfo/gnulib/lib/memcpy.c create mode 100644 contrib/texinfo/gnulib/lib/memmem.c create mode 100644 contrib/texinfo/gnulib/lib/memmove.c rename contrib/texinfo/{lib/xstrdup.c => gnulib/lib/mempcpy.c} (56%) create mode 100644 contrib/texinfo/gnulib/lib/mkstemp.c create mode 100644 contrib/texinfo/gnulib/lib/str-kmp.h create mode 100644 contrib/texinfo/gnulib/lib/str-two-way.h create mode 100644 contrib/texinfo/gnulib/lib/streq.h create mode 100644 contrib/texinfo/gnulib/lib/strnlen1.c create mode 100644 contrib/texinfo/gnulib/lib/strnlen1.h rename contrib/texinfo/{ => gnulib}/lib/tempname.c (81%) create mode 100644 contrib/texinfo/gnulib/lib/tempname.h create mode 100644 contrib/texinfo/gnulib/lib/unitypes.h create mode 100644 contrib/texinfo/gnulib/lib/uniwidth.h create mode 100644 contrib/texinfo/gnulib/lib/uniwidth/cjk.h create mode 100644 contrib/texinfo/gnulib/lib/uniwidth/width.c create mode 100644 contrib/texinfo/gnulib/lib/wcwidth.c create mode 100644 contrib/texinfo/gnulib/lib/xalloc-die.c create mode 100644 contrib/texinfo/gnulib/lib/xalloc.h create mode 100644 contrib/texinfo/gnulib/lib/xmalloc.c create mode 100644 contrib/texinfo/gnulib/lib/xsetenv.c create mode 100644 contrib/texinfo/gnulib/lib/xsetenv.h delete mode 100644 contrib/texinfo/info/README delete mode 100644 contrib/texinfo/info/doc.c delete mode 100644 contrib/texinfo/info/funs.h delete mode 100644 contrib/texinfo/info/key.c create mode 100644 contrib/texinfo/info/makedoc.c create mode 100644 contrib/texinfo/info/pcterm.c rename contrib/texinfo/{util => install-info}/install-info.c (52%) delete mode 100644 contrib/texinfo/lib/README delete mode 100644 contrib/texinfo/lib/gettext.h delete mode 100644 contrib/texinfo/lib/xalloc.h delete mode 100644 contrib/texinfo/lib/xmalloc.c delete mode 100644 contrib/texinfo/makeinfo/README rename contrib/texinfo/{lib => }/system.h (77%) delete mode 100644 contrib/texinfo/util/README create mode 100755 contrib/texinfo/util/pdftexi2dvi create mode 100755 contrib/texinfo/util/texi2dvi create mode 100755 contrib/texinfo/util/texi2pdf diff --git a/contrib/texinfo/AUTHORS b/contrib/texinfo/AUTHORS deleted file mode 100644 index ce8ee85e6d..0000000000 --- a/contrib/texinfo/AUTHORS +++ /dev/null @@ -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*. diff --git a/contrib/texinfo/COPYING b/contrib/texinfo/COPYING index d60c31a97a..9a2708d778 100644 --- a/contrib/texinfo/COPYING +++ b/contrib/texinfo/COPYING @@ -1,284 +1,625 @@ GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + Version 3, 29 June 2007 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 2007 Free Software Foundation, Inc. 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 + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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. +them 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. + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. 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. +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. 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 + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of 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 + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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. + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. 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 @@ -287,15 +628,15 @@ 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 +state 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 + 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 + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -304,37 +645,30 @@ the "copyright" line and a pointer to where the full notice is found. 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 - + along with this program. If not, see . 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: + If the program does terminal interaction, 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'. + Copyright (C) + This program 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. +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/contrib/texinfo/README.DELETED b/contrib/texinfo/README.DELETED deleted file mode 100644 index 879db04919..0000000000 --- a/contrib/texinfo/README.DELETED +++ /dev/null @@ -1,97 +0,0 @@ -ABOUT-NLS -ChangeLog -ChangeLog.46 -INSTALL -INSTALL.generic -INTRODUCTION -Makefile.am -Makefile.in -NEWS -README.dev -TODO -acinclude.m4 -aclocal.m4 -config.guess -config.in -config.rpath -config.sub -configure -configure.ac -depcomp -dir-example -djgpp/ -doc/Makefile.am -doc/Makefile.in -doc/epsf.tex -doc/pdfcolor.tex -doc/texinfo.tex -doc/txi-cs.tex -doc/txi-de.tex -doc/txi-en.tex -doc/txi-es.tex -doc/txi-fr.tex -doc/txi-it.tex -doc/txi-nl.tex -doc/txi-no.tex -doc/txi-pl.tex -doc/txi-pt.tex -doc/txi-tr.tex -doc/macro.texi -doc/mdate-sh -doc/stamp-1 -doc/stamp-vti -doc/texi2dvi.1 -doc/userdoc.texi -info/Makefile.am -info/Makefile.in -info/makedoc.c -info/pcterm.c -install-sh -intl/ -lib/Makefile.am -lib/Makefile.in -lib/alloca.c -lib/getopt.c -lib/getopt.h -lib/getopt1.c -lib/getopt_.h -lib/getopt_int.h -lib/memcpy.c -lib/memmove.c -lib/mkstemp.c -lib/strcase.h -lib/strcasecmp.c -lib/strdup.c -lib/strdup.h -lib/strerror.c -lib/strncasecmp.c -m4/ -makeinfo/Makefile.am -makeinfo/Makefile.in -makeinfo/tests -missing -mkinstalldirs -po/ -util/Makefile.am -util/Makefile.in -util/deref.c -util/dir-example -util/fix-info-dir -util/fixfonts -util/fixref.gawk -util/gdoc -util/gen-dir-node -util/gendocs.sh -util/gendocs_template -util/infosrch* -util/install-info-html -util/outline.gawk -util/prepinfo.awk -util/tex3patch -util/texi-docstring-magic.el -util/texi2dvi -util/texi2pdf* -util/texinfo-cat.in -util/texinfo.dtd -util/texinfo.xsl -util/txitextest diff --git a/contrib/texinfo/README.DRAGONFLY b/contrib/texinfo/README.DRAGONFLY deleted file mode 100644 index 3fd6088763..0000000000 --- a/contrib/texinfo/README.DRAGONFLY +++ /dev/null @@ -1,44 +0,0 @@ - - TEXINFO-4.8 AS USED BY DRAGONFLY - - This directory contains a selected set of files from the gnu - texinfo-4.8.tar.gz distribution. No files have been moved - or modified from their extracted position. - - This distribution was downloaded from the following site: - - http://ftp.gnu.org/gnu/texinfo - - DO NOT CREATE OR EDIT ANY FILES IN THIS DIRECTORY HIERARCHY! THIS - HIERARCHY REPRESENTS AN EXACT COPY, MINUS UNNEEDED FILES, OF THE - ORIGINAL ARCHIVE. All modifications are made in the - DragonFly build wrapper, in src/gnu/usr.bin/texinfo, - by creating overrides or performing surgery on the distribution into - local files. The only additional files added to this directory - are README.DRAGONFLY and README.DELETED. - - UPGRADE PROCEDURE: - - * download a new texinfo-4.X dist greater then 4.8 - - * extract the archive into this directory, overlaying the - existing files. - - * A 'cvs update' will show you what has changed ('M') relative - to what we had before. There will be hundreds of files marked - '?' which, if not needed, should be deleted and NOT COMMITTED. - If any new files are needed you can cvs add and commit them. - - * Check overrides and patches in src/gnu/usr.bin/texinfo and - modify as appropriate. - - DO NOT MAKE ANY EDITS TO THE DISTRIBUTION IN THIS CONTRIB - DIRECTORY, OTHER THEN TO ADD OR DELETE FILES ASSOCIATED WITH THE - GNU DISTRIBUTION. - - * Check to see if src/gnu/usr.bin/texinfo/config.h.proto needs - to be modified. - - * Run a full world and make sure info pages display as normal. - - The file README.DELETED contains a list of deleted files. diff --git a/contrib/texinfo/doc/README b/contrib/texinfo/doc/README deleted file mode 100644 index 63f1ba2921..0000000000 --- a/contrib/texinfo/doc/README +++ /dev/null @@ -1,44 +0,0 @@ -$Id: README,v 1.4 2004/04/11 17:56:45 karl Exp $ -texinfo/doc/README - - Copyright (C) 2002 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. - -This directory contains documentation on the Texinfo system and the TeX -sources needed to process Texinfo sources. We recommend using the -texi2dvi included in this distribution to run a Texinfo manual through -TeX to produce a DVI file. - -The .tex files are not installed automatically because TeX installations -vary so widely. Installing them in the wrong place would give a false -sense of security. So, you should simply cp *.tex to the appropriate -place. If your installation follows the TeX Directory Structure -standard (http://tug.org/tds/), this will be the directory -TEXMF/tex/texinfo/ for texinfo.tex, TEXMF/tex/generic/dvips/ for epsf.tex, -and TEXMF/pdftex/plain/misc for pdfcolor.tex. If you use the default -installation paths, TEXMF will be /usr/local/share/texmf. On systems -with TeX preinstalled, as most GNU/Linux distributions offer, TEXMF -will often be something like /usr/share/texmf. - -It is also possible to put these .tex files in a `local' place instead -of overwriting existing ones, but this is more complicated. See your TeX -documentation in general and the texmf.cnf file in particular for information. - -If you add files to your TeX installations, not just replace existing -ones, you very likely have to update your ls-R file; do this with the -mktexlsr command. In older versions, this was named MakeTeXls-R. - -You can get the latest texinfo.tex from -ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex (and all GNU mirrors) -ftp://tug.org/tex/texinfo.tex (and all CTAN mirrors) -or on the FSF machines in /home/gd/gnu/doc/texinfo.tex. -If you have problems with the version in this distribution, please check -for a newer version. - -epsf.tex comes with dvips distributions, and you may already have it -installed. The version here is functionally identical but slightly -nicer than the one in dvips574. The changes have been sent to the -epsf.tex maintainer. diff --git a/contrib/texinfo/doc/fdl.texi b/contrib/texinfo/doc/fdl.texi index 11737cc89b..7b93651f1f 100644 --- a/contrib/texinfo/doc/fdl.texi +++ b/contrib/texinfo/doc/fdl.texi @@ -1,13 +1,12 @@ - -@node GNU Free Documentation License -@appendixsec GNU Free Documentation License - -@cindex FDL, GNU Free Documentation License +@c The GNU Free Documentation License. @center Version 1.2, November 2002 +@c This file is intended to be included within another document, +@c hence no sectioning command or @node. + @display Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307, USA +51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -408,7 +407,7 @@ as a draft) by the Free Software Foundation. @end enumerate @page -@appendixsubsec ADDENDUM: How to use this License for your documents +@heading ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and @@ -427,7 +426,7 @@ license notices just after the title page: @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, -replace the ``with...Texts.'' line with this: +replace the ``with@dots{}Texts.'' line with this: @smallexample @group diff --git a/contrib/texinfo/doc/info-stnd.texi b/contrib/texinfo/doc/info-stnd.texi index 1a1df6fb6d..0fde962a8a 100644 --- a/contrib/texinfo/doc/info-stnd.texi +++ b/contrib/texinfo/doc/info-stnd.texi @@ -1,5 +1,5 @@ -\input texinfo.tex @c -*-texinfo-*- -@comment $Id: info-stnd.texi,v 1.9 2004/12/14 16:58:15 karl Exp $ +vb\input texinfo.tex @c -*-texinfo-*- +@comment $Id: info-stnd.texi,v 1.24 2008/08/29 17:27:18 karl Exp $ @c We must \input texinfo.tex instead of texinfo, otherwise make @c distcheck in the Texinfo distribution fails, because the texinfo Info @c file is made first, and texi2dvi must include . first in the path. @@ -18,21 +18,26 @@ a program for viewing documents in Info format (usually created from Texinfo source files). Copyright @copyright{} 1992, 1993, 1996, 1997, 1998, 1999, 2001, 2002, -2003, 2004 Free Software Foundation, Inc. +2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.1 or +under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no -Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' +Invariant Sections, with the Front-Cover texts being ``A GNU Manual'', and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled ``GNU Free Documentation -License.'' +License' in the Texinfo manual. -(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify -this GNU Manual, like GNU software. Copies published by the Free -Software Foundation raise funds for GNU development.'' +(a) The FSF's Back-Cover Text is: ``You have the freedom to +copy and modify this GNU manual. Buying copies from the FSF +supports it in developing GNU and promoting software freedom.'' @end quotation + +This document is part of a collection distributed under the GNU Free +Documentation License. If you want to distribute this document +separately from the collection, you can do so by adding a copy of the +license to the document, as described in section 6 of the license. @end copying @dircategory Texinfo documentation system @@ -44,7 +49,7 @@ Software Foundation raise funds for GNU development.'' @titlepage @title GNU Info @subtitle for version @value{VERSION}, @value{UPDATED} -@author Brian J. Fox (bfox@@gnu.org) +@author Brian J. Fox @page @vskip 0pt plus 1filll @insertcopying @@ -56,16 +61,16 @@ Software Foundation raise funds for GNU development.'' @node Top @top GNU Info -@insertcopying - -This documentation is different from the documentation for the Info -reader that is part of GNU Emacs. If you do not know how to use Info, -but have a working Info reader, you should read the Emacs documentation -first, as it includes more background information and a thorough tutorial. +If you do not know how to use Info, but have a working Info reader, +you should read the Info manual before this one (@pxref{Top, Getting +Started,,info, Info}), as it includes more background information and +a thorough tutorial. This documentation describes the stand-alone Info +reader that is part of the Texinfo distribution, not the Info reader +that is part of GNU Emacs. @end ifnottex @menu -* What is Info:: What is Info? +* Stand-alone Info:: What is Info? * Invoking Info:: Options you can pass on the command line. * Cursor Commands:: Commands which move the cursor within a node. * Scrolling Commands:: Commands for reading the text within a node. @@ -77,23 +82,32 @@ first, as it includes more background information and a thorough tutorial. * Miscellaneous Commands:: A few commands that defy categories. * Variables:: How to change the default behavior of Info. * Custom Key Bindings:: How to define your own key-to-command bindings. -* Copying This Manual:: The GNU Free Documentation License. -* Index:: Global index containing keystrokes, - command names, variable names, - and general concepts. +* Index:: Global index with keystrokes, command names, + variable names, and general concepts. @end menu -@node What is Info -@chapter What is Info? +@node Stand-alone Info +@chapter Stand-alone Info + +The @dfn{Info} program is a stand-alone program, part of the Texinfo +distribution, which is used to view Info files on an ASCII terminal. +@dfn{Info files} are typically the result of processing Texinfo files +with the program @code{makeinfo} (also in the Texinfo distribution) -@dfn{Info} is a program which is used to view Info files on an ASCII -terminal. @dfn{Info files} are the result of processing Texinfo files -with the program @code{makeinfo} or with one of the Emacs commands, such -as @code{M-x texinfo-format-buffer}. Texinfo itself is a documentation -system that uses a single source file to produce both on-line -information and printed output. You can typeset and print the files -that you read in Info. +Texinfo itself is a documentation system that uses a single source +file to produce both on-line information and printed output. You can +typeset and print the files that you read in Info. + +GNU Emacs also provides an Info reader (just type @kbd{M-x info} in +Emacs). Emacs Info and stand-alone Info have nearly identical user +interfaces, although customization and other details are different +(this manual explains the stand-alone Info reader). The Emacs Info +reader supports the X Window System and other such bitmapped +interfaces, not just plain ASCII, so if you want the prettiest +display for Info files, you should try it. You can use Emacs Info +without using Emacs for anything else. (Type @kbd{C-x C-c} to exit; +this also works in the stand-alone Info reader.) @node Invoking Info @@ -118,15 +132,16 @@ The program accepts the following options: @table @code @anchor{--apropos} @item --apropos=@var{string} +@itemx -k @var{string} @cindex Searching all indices @cindex Info files@r{, searching all indices} @cindex Apropos@r{, in Info files} Specify a string to search in every index of every Info file installed -on your system. Info looks up the named @var{string} in all the indices -it can find, prints the results to standard output, and then exits. If -you are not sure which Info file explains certain issues, this option is -your friend. Note that if your system has a lot of Info files -installed, searching all of them might take some time. +on your system. Info looks up the named @var{string} in all the +indices it can find, prints the results to standard output, and then +exits. If you are not sure which Info file explains certain issues, +this option is your friend. (If your system has a lot of Info files +installed, searching all of them might take some time!) You can invoke the apropos command from inside Info; see @ref{Searching Commands}. @@ -257,6 +272,11 @@ previous Info session (see the description of the @samp{--dribble} option above). When the keystrokes in the files are all read, Info reverts its input to the usual interactive operation. +@item --show-malformed-multibytes +@itemx --no-show-malformed-multibytes + Show malformed multibyte sequences in the output. By default, such +sequences are dropped. + @anchor{--show-options} @cindex command-line options, how to find @cindex invocation description, how to find @@ -339,6 +359,10 @@ index or the invocation node is the file where Info finds itself after following all the menu items given on the command line. This is so @samp{info emacs --show-options} does what you'd expect. +Finally, Info defines many default key bindings and variables. +@xref{Custom Key Bindings}, for information on how to customize these +settings. + @c FIXME: the feature with lowercasing the file name isn't documented @@ -350,11 +374,11 @@ following all the menu items given on the command line. This is so Many people find that reading screens of text page by page is made easier when one is able to indicate particular pieces of text with some kind of pointing device. Since this is the case, GNU Info (both -the Emacs and standalone versions) have several commands which allow +the Emacs and stand-alone versions) have several commands which allow you to move the cursor about the screen. The notation used in this manual to describe keystrokes is identical to the notation used within the Emacs manual, and the GNU Readline manual. @xref{User Input,,, -emacs, the GNU Emacs Manual}, if you are unfamiliar with the +emacs, The GNU Emacs Manual}, if you are unfamiliar with the notation.@footnote{Here's a short summary. @kbd{C-@var{x}} means press the @kbd{CTRL} key and the key @var{x}. @kbd{M-@var{x}} means press the @kbd{META} key and the key @var{x}. On many terminals th @@ -366,7 +390,7 @@ The following table lists the basic cursor movement commands in Info. Each entry consists of the key sequence you should type to execute the cursor movement, the @code{M-x}@footnote{@code{M-x} is also a command; it invokes @code{execute-extended-command}. @xref{M-x, , Executing an -extended command, emacs, the GNU Emacs Manual}, for more detailed +extended command, emacs, The GNU Emacs Manual}, for more detailed information.} command name (displayed in parentheses), and a short description of what the command does. All of the cursor motion commands can take a @dfn{numeric} argument (see @ref{Miscellaneous Commands, @@ -379,66 +403,66 @@ given to the @code{next-line} command would cause the cursor to move @emph{up} 4 lines. @table @asis -@item @key{C-n} (@code{next-line}) +@item @kbd{C-n} (@code{next-line}) @itemx @key{DOWN} (an arrow key) @kindex C-n @kindex DOWN (an arrow key) @findex next-line Move the cursor down to the next line. -@item @key{C-p} (@code{prev-line}) +@item @kbd{C-p} (@code{prev-line}) @itemx @key{UP} (an arrow key) @kindex C-p @kindex UP (an arrow key) @findex prev-line Move the cursor up to the previous line. -@item @key{C-a} (@code{beginning-of-line}) +@item @kbd{C-a} (@code{beginning-of-line}) @itemx @key{Home} (on DOS/Windows only) @kindex C-a, in Info windows @kindex Home @findex beginning-of-line Move the cursor to the start of the current line. -@item @key{C-e} (@code{end-of-line}) +@item @kbd{C-e} (@code{end-of-line}) @itemx @key{End} (on DOS/Windows only) @kindex C-e, in Info windows @kindex End @findex end-of-line Move the cursor to the end of the current line. -@item @key{C-f} (@code{forward-char}) +@item @kbd{C-f} (@code{forward-char}) @itemx @key{RIGHT} (an arrow key) @kindex C-f, in Info windows @kindex RIGHT (an arrow key) @findex forward-char Move the cursor forward a character. -@item @key{C-b} (@code{backward-char}) +@item @kbd{C-b} (@code{backward-char}) @itemx @key{LEFT} (an arrow key) @kindex C-b, in Info windows @kindex LEFT (an arrow key) @findex backward-char Move the cursor backward a character. -@item @key{M-f} (@code{forward-word}) +@item @kbd{M-f} (@code{forward-word}) @itemx @kbd{C-@key{RIGHT}} (on DOS/Windows only) @kindex M-f, in Info windows @kindex C-RIGHT @findex forward-word Move the cursor forward a word. -@item @key{M-b} (@code{backward-word}) +@item @kbd{M-b} (@code{backward-word}) @itemx @kbd{C-@key{LEFT}} (on DOS/Windows only) @kindex M-b, in Info windows @kindex C-LEFT @findex backward-word Move the cursor backward a word. -@item @key{M-<} (@code{beginning-of-node}) -@itemx @key{C-@key{Home}} (on DOS/Windows only) -@itemx @key{b} -@itemx @key{M-b}, vi-like operation +@item @kbd{M-<} (@code{beginning-of-node}) +@itemx @kbd{C-@key{Home}} (on DOS/Windows only) +@itemx @kbd{b} +@itemx @kbd{M-b}, vi-like operation @kindex b, in Info windows @kindex M-< @kindex C-Home @@ -446,16 +470,16 @@ Move the cursor backward a word. @findex beginning-of-node Move the cursor to the start of the current node. -@item @key{M->} (@code{end-of-node}) -@itemx @key{C-@key{End}} (on DOS/Windows only) -@itemx @key{e} +@item @kbd{M->} (@code{end-of-node}) +@itemx @kbd{C-@key{End}} (on DOS/Windows only) +@itemx @kbd{e} @kindex M-> @kindex e, in Info windows @kindex C-End @findex end-of-node Move the cursor to the end of the current node. -@item @key{M-r} (@code{move-to-window-line}) +@item @kbd{M-r} (@code{move-to-window-line}) @kindex M-r @findex move-to-window-line Move the cursor to a specific line of the window. Without a numeric @@ -474,9 +498,11 @@ current paragraph you are reading is visible on the screen. The commands detailed in this section are used to shift which part of the current node is visible on the screen. -Scrolling commands are bound differently when @samp{--vi-keys} operation -is in effect (@pxref{--vi-keys}). These key bindings are designated -with ``vi-like operation''. +Scrolling commands are bound differently when @samp{--vi-keys} +operation is in effect (@pxref{--vi-keys}). These key bindings are +designated with ``vi-like operation''. @xref{Custom Key Bindings}, +for information on arbitrarily customizing key bindings and variable +settings. @table @asis @item @key{SPC} (@code{scroll-forward}) @@ -498,10 +524,10 @@ invoking the (@code{scroll-forward-page-only-set-window}) command, @samp{z} under @samp{--vi-keys}, with a numeric argument. @item @key{NEXT} (an arrow key) (@code{scroll-forward-page-only}) -@itemx @key{C-v} -@itemx @key{C-f}, vi-like operation -@itemx @key{f}, vi-like operation -@itemx @key{M-SPC}, vi-like operation +@itemx @kbd{C-v} +@itemx @kbd{C-f}, vi-like operation +@itemx @kbd{f}, vi-like operation +@itemx @kbd{M-SPC}, vi-like operation @kindex NEXT @kindex C-v @kindex C-f, vi-like operation @@ -516,7 +542,7 @@ current node. The @key{NEXT} key is known as the @key{PageDown} key on some keyboards. -@item @key{z} (@code{scroll-forward-page-only-set-window}, vi-like operation) +@item @kbd{z} (@code{scroll-forward-page-only-set-window}, vi-like operation) @kindex z, vi-like operation @findex scroll-forward-page-only-set-window Scroll forward, like with @key{NEXT}, but if a numeric argument is @@ -537,9 +563,9 @@ invoking the (@code{scroll-backward-page-only-set-window}) command, @itemx @key{PREVIOUS} (arrow key) (@code{scroll-backward-page-only}) @itemx @key{PRIOR} (arrow key) -@itemx @key{M-v} -@itemx @key{b}, vi-like operation -@itemx @key{C-b}, vi-like operation +@itemx @kbd{M-v} +@itemx @kbd{b}, vi-like operation +@itemx @kbd{C-b}, vi-like operation @kindex PREVIOUS @kindex M-v @kindex b, vi-like operation @@ -551,15 +577,15 @@ the current node. The default scroll size can be changed by invoking the(@code{scroll-backward-page-only-set-window}) command, @samp{w} under @samp{--vi-keys}, with a numeric argument. -@item @key{w} (@code{scroll-backward-page-only-set-window}, vi-like operation) +@item @kbd{w} (@code{scroll-backward-page-only-set-window}, vi-like operation) @kindex w, vi-like operation @findex scroll-backward-page-only-set-window Scroll backward, like with @key{PREVIOUS}, but if a numeric argument is specified, it becomes the default scroll size for subsequent @code{scroll-forward} and @code{scroll-backward} commands. -@item @key{C-n} (@code{down-line}, vi-like operation) -@itemx @key{C-e}, vi-like operation +@item @kbd{C-n} (@code{down-line}, vi-like operation) +@itemx @kbd{C-e}, vi-like operation @itemx @key{RET}, vi-like operation @itemx @key{LFD}, vi-like operation @itemx @key{DOWN}, vi-like operation @@ -572,12 +598,12 @@ specified, it becomes the default scroll size for subsequent Scroll forward by one line. With a numeric argument, scroll forward that many lines. -@item @key{C-p} (@code{up-line}, vi-like operation) +@item @kbd{C-p} (@code{up-line}, vi-like operation) @itemx @key{UP}, vi-like operation -@itemx @key{y}, vi-like operation -@itemx @key{k}, vi-like operation -@itemx @key{C-k}, vi-like operation -@itemx @key{C-y}, vi-like operation +@itemx @kbd{y}, vi-like operation +@itemx @kbd{k}, vi-like operation +@itemx @kbd{C-k}, vi-like operation +@itemx @kbd{C-y}, vi-like operation @kindex C-p, vi-like operation @kindex UP, vi-like operation @kindex y, vi-like operation @@ -588,8 +614,8 @@ that many lines. Scroll backward one line. With a numeric argument, scroll backward that many lines. -@item @key{d} (@code{scroll-half-screen-down}, vi-like operation) -@itemx @key{C-d}, vi-like operation +@item @kbd{d} (@code{scroll-half-screen-down}, vi-like operation) +@itemx @kbd{C-d}, vi-like operation @kindex d, vi-like operation @kindex C-d, vi-like operation @findex scroll-half-screen-down @@ -598,8 +624,8 @@ scroll that many lines. If an argument is specified, it becomes the new default number of lines to scroll for subsequent @samp{d} and @samp{u} commands. -@item @key{u} (@code{scroll-half-screen-up}, vi-like operation) -@itemx @key{C-u}, vi-like operation +@item @kbd{u} (@code{scroll-half-screen-up}, vi-like operation) +@itemx @kbd{C-u}, vi-like operation @kindex u, vi-like operation @kindex C-u, vi-like operation @findex scroll-half-screen-up @@ -614,8 +640,7 @@ The @code{scroll-forward} and @code{scroll-backward} commands can also move forward and backward through the node structure of the file. If you press @key{SPC} while viewing the end of a node, or @key{DEL} while viewing the beginning of a node, what happens is controlled by the -variable @code{scroll-behavior}. @xref{Variables, -@code{scroll-behavior}}, for more information. +variable @code{scroll-behavior} (@pxref{scroll-behavior}). The @code{scroll-forward-page-only} and @code{scroll-backward-page-only} commands never scroll beyond the current node. @@ -628,11 +653,11 @@ current node. @kindex BS (backspace) If your keyboard lacks the @key{DEL} key, look for a key called -@key{BS}, or @samp{BackSpace}, sometimes designated with an arrow which +@key{BS}, or @samp{Backspace}, sometimes designated with an arrow which points to the left, which should perform the same function. @table @asis -@item @key{C-l} (@code{redraw-display}) +@item @kbd{C-l} (@code{redraw-display}) @kindex C-l @findex redraw-display Redraw the display from scratch, or shift the line containing the cursor @@ -641,7 +666,7 @@ the screen, and then redraws its entire contents. Given a numeric argument of @var{n}, the line containing the cursor is shifted so that it is on the @var{n}th line of the window. -@item @kbd{C-x @key{w}} (@code{toggle-wrap}) +@item @kbd{C-x @kbd{w}} (@code{toggle-wrap}) @kindex C-w @findex toggle-wrap Toggles the state of line wrapping in the current window. Normally, @@ -675,9 +700,9 @@ are. Info uses this line to move about the node structure of the file when you use the following commands: @table @asis -@item @key{n} (@code{next-node}) +@item @kbd{n} (@code{next-node}) @itemx @kbd{C-@key{NEXT}} (on DOS/Windows only) -@itemx @kbd{C-x @key{n}}, vi-like operation +@itemx @kbd{C-x @kbd{n}}, vi-like operation @kindex n @kindex C-NEXT @kindex C-x n, vi-like operation @@ -688,7 +713,7 @@ Select the `Next' node. The @key{NEXT} key is known as the @key{PgDn} key on some keyboards. -@item @key{p} (@code{prev-node}) +@item @kbd{p} (@code{prev-node}) @itemx @kbd{C-@key{PREVIOUS}} (on DOS/Windows only) @kindex p @kindex C-PREVIOUS @@ -699,9 +724,9 @@ Select the `Prev' node. The @key{PREVIOUS} key is known as the @key{PgUp} key on some keyboards. -@item @key{u} (@code{up-node}) +@item @kbd{u} (@code{up-node}) @itemx @kbd{C-@key{UP}} (an arrow key on DOS/Windows only) -@itemx @kbd{C-x @key{u}}, vi-like operation +@itemx @kbd{C-x @kbd{u}}, vi-like operation @kindex u @kindex C-UP @kindex C-x u, vi-like operation @@ -721,9 +746,9 @@ by the time you get to the first node you visited in a window, the entire history of that window is discarded. @table @asis -@item @key{l} (@code{history-node}) -@itemx @key{C-@key{CENTER}} (on DOS/Windows only) -@itemx @key{'}, vi-like operation +@item @kbd{l} (@code{history-node}) +@itemx @kbd{C-@key{CENTER}} (on DOS/Windows only) +@itemx @kbd{'}, vi-like operation @kindex l @kindex C-CENTER @kindex ', vi-like operation @@ -736,15 +761,15 @@ Two additional commands make it easy to select the most commonly selected nodes; they are @samp{t} and @samp{d}. @table @asis -@item @key{t} (@code{top-node}) -@itemx @key{M-t}, vi-like operation +@item @kbd{t} (@code{top-node}) +@itemx @kbd{M-t}, vi-like operation @kindex t @kindex M-t, vi-like operation @findex top-node Select the node @samp{Top} in the current Info file. -@item @key{d} (@code{dir-node}) -@itemx @key{M-d}, vi-like operation +@item @kbd{d} (@code{dir-node}) +@itemx @kbd{M-d}, vi-like operation @kindex d @kindex M-d, vi-like operation @findex dir-node @@ -755,8 +780,8 @@ Here are some other commands which immediately result in the selection of a different node in the current window: @table @asis -@item @key{<} (@code{first-node}) -@itemx @key{g}, vi-like operation +@item @kbd{<} (@code{first-node}) +@itemx @kbd{g}, vi-like operation @kindex < @kindex g, vi-like operation @findex first-node @@ -765,8 +790,8 @@ often @samp{Top}, but it does not have to be. With a numeric argument @var{N}, select the @var{N}th node (the first node is node 1). An argument of zero is the same as the argument of 1. -@item @key{>} (@code{last-node}) -@itemx @key{G}, vi-like operation +@item @kbd{>} (@code{last-node}) +@itemx @kbd{G}, vi-like operation @kindex > @kindex G, vi-like operation @findex last-node @@ -775,7 +800,7 @@ Select the last node which appears in this file. With a numeric argument argument of zero is the same as no argument, i.e., it selects the last node. -@item @key{]} (@code{global-next-node}) +@item @kbd{]} (@code{global-next-node}) @kindex ] @findex global-next-node Move forward or down through node structure. If the node that you are @@ -784,7 +809,7 @@ Otherwise, if this node has a menu, the first menu item is selected. If there is no @samp{Next} and no menu, the same process is tried with the @samp{Up} node of this node. -@item @key{[} (@code{global-prev-node}) +@item @kbd{[} (@code{global-prev-node}) @kindex [ @findex global-prev-node Move backward or up through node structure. If the node that you are @@ -795,13 +820,12 @@ and if it has a menu, the last item in the menu is selected. You can get the same behavior as @code{global-next-node} and @code{global-prev-node} while simply scrolling through the file with -@key{SPC} and @key{DEL}; @xref{Variables, @code{scroll-behavior}}, for -more information. +@key{SPC} and @key{DEL} (@pxref{scroll-behavior}). @table @asis @anchor{goto-node} -@item @key{g} (@code{goto-node}) -@itemx @kbd{C-x @key{g}}, vi-like operation +@item @kbd{g} (@code{goto-node}) +@itemx @kbd{C-x @kbd{g}}, vi-like operation @kindex g @kindex C-x g, vi-like operation @findex goto-node @@ -819,8 +843,8 @@ must include the Info file of the other file. For example, finds the node @samp{Buffers} in the Info file @file{emacs}. @anchor{goto-invocation} -@item @key{O} (@code{goto-invocation} -@itemx @key{I} +@item @kbd{O} (@code{goto-invocation} +@itemx @kbd{I} @kindex O @kindex I @findex goto-invocation @@ -842,7 +866,7 @@ know what Info file documents the command, or if invoking @samp{I} doesn't display the right node, go to the @samp{(dir)} node (using the @samp{d} command) and invoke @samp{I} from there. -@item @key{G} (@code{menu-sequence}) +@item @kbd{G} (@code{menu-sequence}) @kindex G @findex menu-sequence @cindex menu, following, from inside Info @@ -872,7 +896,7 @@ exactly, Info will find it faster.) If any of the menu items you type are not found, Info stops at the last entry it did find and reports an error. -@item @kbd{C-x @key{k}} (@code{kill-node}) +@item @kbd{C-x @kbd{k}} (@code{kill-node}) @kindex C-x k @findex kill-node Kill a node. The node name is prompted for in the echo area, with a @@ -900,7 +924,7 @@ Make a window containing a menu of all of the currently visited nodes. This window becomes the selected window, and you may use the standard Info commands within it. -@item @kbd{C-x @key{b}} (@code{select-visited-node}) +@item @kbd{C-x @kbd{b}} (@code{select-visited-node}) @kindex C-x b @findex select-visited-node Select a node which has been previously visited in a visible window. @@ -918,18 +942,20 @@ entire Info file, search through the indices of an Info file, or find areas within an Info file which discuss a particular topic. @table @asis -@item @key{s} (@code{search}) -@itemx @key{/} +@item @kbd{s} (@code{search}) +@itemx @kbd{/} @kindex s @kindex / @findex search -Read a string in the echo area and search for it. If the string -includes upper-case characters, the Info file is searched -case-sensitively; otherwise Info ignores the letter case. With a -numeric argument of @var{N}, search for @var{N}th occurrence of the -string. Negative arguments search backwards. +@cindex regular expression search +Read a string in the echo area and search for it, either as a regular +expression (by default) or a literal string. If the string includes +upper-case characters, the Info file is searched case-sensitively; +otherwise Info ignores the letter case. With a numeric argument of +@var{N}, search for @var{N}th occurrence of the string. Negative +arguments search backwards. -@item @key{?} (@code{search-backward}, vi-like operation) +@item @kbd{?} (@code{search-backward}, vi-like operation) @kindex ?, vi-like operation @findex search-backward Read a string in the echo area and search backward through the Info file @@ -938,7 +964,15 @@ file is searched case-sensitively; otherwise Info ignores the letter case. With a numeric argument of @var{N}, search for @var{N}th occurrence of the string. Negative arguments search forward. -@item @key{S} (@code{search-case-sensitively} +@item @kbd{R} (@code{toggle-regexp}) +@kindex R +@findex toggle-regexp +Toggle between using regular expressions and literal strings for +searching. Info uses so-called `extended' regular expression syntax, +similar to Emacs (@pxref{Regexps, , Using Regular Expressions, emacs, +The GNU Emacs Manual}). + +@item @kbd{S} (@code{search-case-sensitively} @kindex S @findex search-case-sensitively @cindex search, case-sensitive @@ -948,8 +982,8 @@ if the string includes only lower-case letters. With a numeric argument of @var{N}, search for @var{N}th occurrence of the string. Negative arguments search backwards. -@item @kbd{C-x @key{n}} (@code{search-next}) -@itemx @key{n}, vi-like operation +@item @kbd{C-x @kbd{n}} (@code{search-next}) +@itemx @kbd{n}, vi-like operation @kindex C-x n @kindex n, vi-like operation @findex search-next @@ -958,8 +992,8 @@ Search for the same string used in the last search command, in the same direction, and with the same case-sensitivity option. With a numeric argument of @var{N}, search for @var{N}th next occurrence. -@item @kbd{C-x @key{N}} (@code{search-previous}) -@itemx @key{N}, vi-like operation +@item @kbd{C-x @kbd{N}} (@code{search-previous}) +@itemx @kbd{N}, vi-like operation @kindex C-x N @kindex n, vi-like operation @findex search-previous @@ -967,7 +1001,7 @@ Search for the same string used in the last search command, and with the same case-sensitivity option, but in the reverse direction. With a numeric argument of @var{N}, search for @var{N}th previous occurrence. -@item @key{C-s} (@code{isearch-forward}) +@item @kbd{C-s} (@code{isearch-forward}) @kindex C-s @findex isearch-forward @cindex incremental search @@ -975,14 +1009,14 @@ Interactively search forward through the Info file for a string as you type it. If the string includes upper-case characters, the search is case-sensitive; otherwise Info ignores the letter case. -@item @key{C-r} (@code{isearch-backward}) +@item @kbd{C-r} (@code{isearch-backward}) @kindex C-r @findex isearch-backward Interactively search backward through the Info file for a string as you type it. If the string includes upper-case characters, the search is case-sensitive; otherwise Info ignores the letter case. -@item @key{i} (@code{index-search}) +@item @kbd{i} (@code{index-search}) @kindex i @findex index-search @cindex index, searching @@ -990,7 +1024,7 @@ is case-sensitive; otherwise Info ignores the letter case. Look up a string in the indices for this Info file, and select a node to which the found index entry points. -@item @key{,} (@code{next-index-match}) +@item @kbd{,} (@code{next-index-match}) @kindex , @findex next-index-match Move to the node containing the next matching index item from the last @@ -1113,10 +1147,10 @@ references. The following table lists the Info commands which operate on menu items. @table @asis -@item @key{1} (@code{menu-digit}) -@itemx @key{2} @dots{} @key{9} -@itemx @key{M-1}, vi-like operation -@itemx @key{M-2} @dots{} @key{M-9}, vi-like operation +@item @kbd{1} (@code{menu-digit}) +@itemx @kbd{2} @dots{} @kbd{9} +@itemx @kbd{M-1}, vi-like operation +@itemx @kbd{M-2} @dots{} @kbd{M-9}, vi-like operation @cindex 1 @dots{} 9, in Info windows @cindex M-1 @dots{} M-9, vi-like operation @kindex 1 @dots{} 9, in Info windows @@ -1128,16 +1162,16 @@ For convenience, there is one exception; pressing @samp{0} selects the @emph{last} item in the node's menu. When @samp{--vi-keys} is in effect, digits set the numeric argument, so these commands are remapped to their @samp{M-} varieties. For example, to select the last menu -item, press @key{M-0}. +item, press @kbd{M-0}. -@item @key{0} (@code{last-menu-item}) -@itemx @key{M-0}, vi-like operation +@item @kbd{0} (@code{last-menu-item}) +@itemx @kbd{M-0}, vi-like operation @kindex 0, in Info windows @kindex M-0, vi-like operation @findex last-menu-item Select the last item in the current node's menu. -@item @key{m} (@code{menu-item}) +@item @kbd{m} (@code{menu-item}) @kindex m @findex menu-item Reads the name of a menu item in the echo area and selects its node. @@ -1152,10 +1186,10 @@ Move the cursor to the start of this node's menu. This table lists the Info commands which operate on cross references. @table @asis -@item @key{f} (@code{xref-item}) -@itemx @key{r} -@item @key{M-f}, vi-like operation -@itemx @kbd{C-x @key{r}}, vi-like operation +@item @kbd{f} (@code{xref-item}) +@itemx @kbd{r} +@item @kbd{M-f}, vi-like operation +@itemx @kbd{C-x @kbd{r}}, vi-like operation @kindex f @kindex r @kindex M-f, vi-like operation @@ -1176,8 +1210,8 @@ Move the cursor to the start of the next nearest menu item or note reference in this node. You can then use @key{RET} (@code{select-reference-this-line}) to select the menu or note reference. -@item @key{M-TAB} (@code{move-to-prev-xref}) -@itemx @key{Shift-@key{TAB}} (on DOS/Windows only) +@item @kbd{M-TAB} (@code{move-to-prev-xref}) +@itemx @kbd{Shift-@key{TAB}} (on DOS/Windows only) @kindex M-TAB, in Info windows @findex move-to-prev-xref Move the cursor the start of the nearest previous menu item or note @@ -1189,7 +1223,7 @@ On DOS/Windows only, the @kbd{Shift-@key{TAB}} key is an alias for @kbd{M-@key{TAB}}. This key is sometimes called @samp{BackTab}. @item @key{RET} (@code{select-reference-this-line}) -@itemx @key{M-g}, vi-like operation +@itemx @kbd{M-g}, vi-like operation @kindex RET, in Info windows @kindex M-g, vi-like operation @findex select-reference-this-line @@ -1277,7 +1311,7 @@ own mode line (@pxref{The Mode Line}) and history of nodes viewed in that window (@pxref{Node Commands, , @code{history-node}}). @table @asis -@item @kbd{C-x @key{o}} (@code{next-window}) +@item @kbd{C-x @kbd{o}} (@code{next-window}) @cindex windows, selecting @kindex C-x o @findex next-window @@ -1294,7 +1328,7 @@ the previous window on the screen. Select the previous window on the screen. This is identical to @samp{C-x o} with a negative argument. -@item @kbd{C-x @key{2}} (@code{split-window}) +@item @kbd{C-x @kbd{2}} (@code{split-window}) @cindex windows, creating @kindex C-x 2 @findex split-window @@ -1304,7 +1338,7 @@ remains in the original window. The variable @code{automatic-tiling} can cause all of the windows on the screen to be resized for you automatically (@pxref{Variables, , automatic-tiling}). -@item @kbd{C-x @key{0}} (@code{delete-window}) +@item @kbd{C-x @kbd{0}} (@code{delete-window}) @cindex windows, deleting @kindex C-x 0 @findex delete-window @@ -1312,26 +1346,26 @@ Delete the current window from the screen. If you have made too many windows and your screen appears cluttered, this is the way to get rid of some of them. -@item @kbd{C-x @key{1}} (@code{keep-one-window}) +@item @kbd{C-x @kbd{1}} (@code{keep-one-window}) @kindex C-x 1 @findex keep-one-window Delete all of the windows excepting the current one. -@item @kbd{ESC @key{C-v}} (@code{scroll-other-window}) +@item @kbd{ESC @kbd{C-v}} (@code{scroll-other-window}) @kindex ESC C-v, in Info windows @findex scroll-other-window Scroll the other window, in the same fashion that @samp{C-v} might scroll the current window. Given a negative argument, scroll the ``other'' window backward. -@item @kbd{C-x @key{^}} (@code{grow-window}) +@item @kbd{C-x @kbd{^}} (@code{grow-window}) @kindex C-x ^ @findex grow-window Grow (or shrink) the current window. Given a numeric argument, grow the current window that many lines; with a negative numeric argument, shrink the window instead. -@item @kbd{C-x @key{t}} (@code{tile-windows}) +@item @kbd{C-x @kbd{t}} (@code{tile-windows}) @cindex tiling @kindex C-x t @findex tile-windows @@ -1356,41 +1390,41 @@ table briefly lists the commands that are available while input is being read in the echo area: @table @asis -@item @key{C-f} (@code{echo-area-forward}) +@item @kbd{C-f} (@code{echo-area-forward}) @itemx @key{RIGHT} (an arrow key) -@itemx @key{M-h}, vi-like operation +@itemx @kbd{M-h}, vi-like operation @kindex C-f, in the echo area @kindex RIGHT, in the echo area @kindex M-h, in the echo area, vi-like operation @findex echo-area-forward Move forward a character. -@item @key{C-b} (@code{echo-area-backward}) +@item @kbd{C-b} (@code{echo-area-backward}) @itemx @key{LEFT} (an arrow key) -@itemx @key{M-l}, vi-like operation +@itemx @kbd{M-l}, vi-like operation @kindex LEFT, in the echo area @kindex C-b, in the echo area @kindex M-l, in the echo area, vi-like operation @findex echo-area-backward Move backward a character. -@item @key{C-a} (@code{echo-area-beg-of-line}) -@itemx @key{M-0}, vi-like operation +@item @kbd{C-a} (@code{echo-area-beg-of-line}) +@itemx @kbd{M-0}, vi-like operation @kindex C-a, in the echo area @kindex M-0, in the echo area, vi-like operation @findex echo-area-beg-of-line Move to the start of the input line. -@item @key{C-e} (@code{echo-area-end-of-line}) -@itemx @key{M-$}, vi-like operation +@item @kbd{C-e} (@code{echo-area-end-of-line}) +@itemx @kbd{M-$}, vi-like operation @kindex C-e, in the echo area @kindex M-$, vi-like operation @findex echo-area-end-of-line Move to the end of the input line. -@item @key{M-f} (@code{echo-area-forward-word}) -@itemx @key{C-@key{RIGHT}} (DOS/Windows only) -@itemx @key{M-w}, vi-like operation +@item @kbd{M-f} (@code{echo-area-forward-word}) +@itemx @kbd{C-@key{RIGHT}} (DOS/Windows only) +@itemx @kbd{M-w}, vi-like operation @kindex M-f, in the echo area @kindex M-w, in the echo area, vi-like operation @findex echo-area-forward-word @@ -1399,8 +1433,8 @@ Move forward a word. @kindex C-RIGHT, in the echo area On DOS/Windows, @kbd{C-@key{RIGHT}} moves forward by words. -@item @key{M-b} (@code{echo-area-backward-word}) -@itemx @key{C-@key{LEFT}} (DOS/Windows only) +@item @kbd{M-b} (@code{echo-area-backward-word}) +@itemx @kbd{C-@key{LEFT}} (DOS/Windows only) @kindex M-b, in the echo area @findex echo-area-backward-word Move backward a word. @@ -1408,8 +1442,8 @@ Move backward a word. @kindex C-LEFT, in the echo area On DOS/Windows, @kbd{C-@key{LEFT}} moves backward by words. -@item @key{C-d} (@code{echo-area-delete}) -@itemx @key{M-x}, vi-like operation +@item @kbd{C-d} (@code{echo-area-delete}) +@itemx @kbd{M-x}, vi-like operation @kindex C-d, in the echo area @kindex M-x, in the echo area, vi-like operation @findex echo-area-delete @@ -1421,11 +1455,11 @@ Delete the character under the cursor. Delete the character behind the cursor. On some keyboards, this key is designated @key{BS}, for -@samp{BackSpace}. Those keyboards will usually bind @key{DEL} in the +@samp{Backspace}. Those keyboards will usually bind @key{DEL} in the echo area to @code{echo-area-delete}. -@item @key{C-g} (@code{echo-area-abort}) -@itemx @key{C-u}, vi-like operation +@item @kbd{C-g} (@code{echo-area-abort}) +@itemx @kbd{C-u}, vi-like operation @kindex C-g, in the echo area @kindex C-u, in the echo area, vi-like operation @findex echo-area-abort @@ -1438,8 +1472,8 @@ completion. If the input line is empty, it aborts the calling function. @findex echo-area-newline Accept (or forces completion of) the current input line. -@item @key{C-q} (@code{echo-area-quoted-insert}) -@itemx @key{C-v}, vi-like operation +@item @kbd{C-q} (@code{echo-area-quoted-insert}) +@itemx @kbd{C-v}, vi-like operation @kindex C-q, in the echo area @kindex C-v, in the echo area, vi-like operation @findex echo-area-quoted-insert @@ -1454,8 +1488,8 @@ Insert the character. Characters that have their 8th bit set, and not bound to @samp{M-} commands, are also inserted verbatim; this is useful for terminals which support Latin scripts. -@item @key{M-TAB} (@code{echo-area-tab-insert}) -@itemx @key{Shift-@key{TAB}} (on DOS/Windows only) +@item @kbd{M-TAB} (@code{echo-area-tab-insert}) +@itemx @kbd{Shift-@key{TAB}} (on DOS/Windows only) @kindex M-TAB, in the echo area @kindex Shift-TAB, in the echo area @findex echo-area-tab-insert @@ -1466,7 +1500,7 @@ Insert a TAB character. On DOS/Windows only, the @kbd{Shift-@key{TAB}} key is an alias for @kbd{M-@key{TAB}}. This key is sometimes called @samp{BackTab}. -@item @key{C-t} (@code{echo-area-transpose-chars}) +@item @kbd{C-t} (@code{echo-area-transpose-chars}) @kindex C-t, in the echo area @findex echo-area-transpose-chars Transpose the characters at the cursor. @@ -1480,25 +1514,25 @@ yanking, see @ref{Killing, , Killing and Deleting, emacs, the GNU Emacs Manual}. @table @asis -@item @key{M-d} (@code{echo-area-kill-word}) -@itemx @key{M-X}, vi-like operation +@item @kbd{M-d} (@code{echo-area-kill-word}) +@itemx @kbd{M-X}, vi-like operation @kindex M-d, in the echo area @kindex M-X, in the echo area, vi-like operation @findex echo-area-kill-word Kill the word following the cursor. -@item @key{M-DEL} (@code{echo-area-backward-kill-word}) -@itemx @key{M-@key{BS}} +@item @kbd{M-@key{DEL}} (@code{echo-area-backward-kill-word}) +@itemx @kbd{M-@key{BS}} @kindex M-DEL, in the echo area @findex echo-area-backward-kill-word Kill the word preceding the cursor. @kindex M-BS, in the echo area -On some keyboards, the @code{Backspace} key is used instead of +On some keyboards, the @samp{Backspace} key is used instead of @code{DEL}, so @code{M-@key{Backspace}} has the same effect as @code{M-@key{DEL}}. -@item @key{C-k} (@code{echo-area-kill-line}) +@item @kbd{C-k} (@code{echo-area-kill-line}) @kindex C-k, in the echo area @findex echo-area-kill-line Kill the text from the cursor to the end of the line. @@ -1508,12 +1542,12 @@ Kill the text from the cursor to the end of the line. @findex echo-area-backward-kill-line Kill the text from the cursor to the beginning of the line. -@item @key{C-y} (@code{echo-area-yank}) +@item @kbd{C-y} (@code{echo-area-yank}) @kindex C-y, in the echo area @findex echo-area-yank Yank back the contents of the last kill. -@item @key{M-y} (@code{echo-area-yank-pop}) +@item @kbd{M-y} (@code{echo-area-yank-pop}) @kindex M-y, in the echo area @findex echo-area-yank-pop Yank back a previous kill, removing the last yanked text first. @@ -1539,7 +1573,7 @@ The following commands are available when completing in the echo area: @findex echo-area-complete Insert as much of a completion as is possible. -@item @key{?} (@code{echo-area-possible-completions}) +@item @kbd{?} (@code{echo-area-possible-completions}) @kindex ?, in the echo area @findex echo-area-possible-completions Display a window containing a list of the possible completions of what @@ -1641,8 +1675,8 @@ description of what the variable affects. Read the name of an Info command in the echo area, and then display a key sequence which can be typed in order to invoke that command. -@item @key{C-h} (@code{get-help-window}) -@itemx @key{?} +@item @kbd{C-h} (@code{get-help-window}) +@itemx @kbd{?} @itemx @key{F1} (on DOS/Windows only) @itemx h, vi-like operation @kindex C-h @@ -1654,8 +1688,8 @@ Create (or Move into) the window displaying @code{*Help*}, and place a node containing a quick reference card into it. This window displays the most concise information about GNU Info available. -@item @key{h} (@code{get-info-help-node}) -@itemx @key{M-h}, vi-like operation +@item @kbd{h} (@code{get-info-help-node}) +@itemx @kbd{M-h}, vi-like operation @kindex h @kindex M-h, vi-like operation @findex get-info-help-node @@ -1668,7 +1702,7 @@ placed into the location of your Info directory. Here are the commands for creating a numeric argument: @table @asis -@item @key{C-u} (@code{universal-argument}) +@item @kbd{C-u} (@code{universal-argument}) @cindex numeric arguments @kindex C-u @findex universal-argument @@ -1679,12 +1713,12 @@ scrolling commands; @samp{C-u C-v} scrolls the screen 4 lines, while by digit keys sets the numeric argument to the number thus typed: @kbd{C-u 1 2 0} sets the argument to 120. -@item @key{M-1} (@code{add-digit-to-numeric-arg}) -@itemx @key{1}, vi-like operation -@itemx @key{M-2} @dots{} @key{M-9} -@itemx @key{2} @dots{} @key{9}, vi-like operation -@itemx @key{M-0} -@itemx @key{0}, vi-like operation +@item @kbd{M-1} (@code{add-digit-to-numeric-arg}) +@itemx @kbd{1}, vi-like operation +@itemx @kbd{M-2} @dots{} @kbd{M-9} +@itemx @kbd{2} @dots{} @kbd{9}, vi-like operation +@itemx @kbd{M-0} +@itemx @kbd{0}, vi-like operation @kindex M-0 @dots{} M-9 @kindex 0 @dots{} 9, vi-like operation @findex add-digit-to-numeric-arg @@ -1704,8 +1738,8 @@ or @kbd{M-3 2 C-l} @end example -@item @key{M--} (@code{add-digit-to-numeric-arg} -@itemx @key{-} +@item @kbd{M--} (@code{add-digit-to-numeric-arg} +@itemx @kbd{-} @kindex M-- @kindex - @cindex negative arguments @@ -1726,8 +1760,8 @@ sequence, to cancel lengthy operations (such as multi-file searches) and to cancel reading input in the echo area. @table @asis -@item @key{C-g} (@code{abort-key}) -@itemx @key{C-u}, vi-like operation +@item @kbd{C-g} (@code{abort-key}) +@itemx @kbd{C-u}, vi-like operation @cindex cancelling typeahead @cindex cancelling the current operation @kindex C-g, in Info windows @@ -1741,7 +1775,7 @@ The @samp{q} command of Info simply quits running Info. Under or @samp{ZZ}. @table @asis -@item @key{q} (@code{quit}) +@item @kbd{q} (@code{quit}) @itemx @kbd{C-x C-c} @itemx @kbd{:q}, vi-like operation @itemx @kbd{ZZ}, vi-like operation @@ -1773,7 +1807,7 @@ Finally, Info provides a convenient way to display footnotes which might be associated with the current node that you are viewing: @table @asis -@item @key{ESC C-f} (@code{show-footnotes}) +@item @kbd{ESC C-f} (@code{show-footnotes}) @kindex ESC C-f @findex show-footnotes @cindex footnotes, displaying @@ -1841,6 +1875,13 @@ window. There are exceptions to the automatic tiling; specifically, the windows @samp{*Completions*} and @samp{*Footnotes*} are @emph{not} resized through automatic tiling; they remain their original size. +@anchor{cursor-movement-scrolls} +@item cursor-movement-scrolls +Normally, cursor movement commands (@pxref{Cursor Commands}) stop when +top or bottom of a node is reached. When this variable is set to +@code{On}, cursor movement commands act as scrolling ones and their +behavior is controlled by the @code{scroll-behavior} variable (see below). + @item errors-ring-bell @vindex errors-ring-bell When set to @code{On}, errors cause the bell to ring. The default @@ -1870,12 +1911,15 @@ Info that it is running in an environment where the European standard character set is in use, and allows you to input such characters to Info, as well as display them. +@anchor{scroll-behavior} @item scroll-behavior +@itemx scroll-behaviour @vindex scroll-behavior +@vindex scroll-behaviour Control what happens when forward scrolling is requested at the end of a node, or when backward scrolling is requested at the beginning of a -node. The default value for this variable is @code{Continuous}. There -are three possible values for this variable: +node. The default value for this variable is @code{Continuous}. +There are three possible values for this variable: @table @code @item Continuous @@ -1885,6 +1929,32 @@ This behavior is identical to using the @samp{]} (@code{global-next-node}) and @samp{[} (@code{global-prev-node}) commands. +@item scroll-last-node +@vindex scroll-last-node +Control what happens when a scrolling command is issued at the end of +the last node. Possible values are: + +@table @code +@item Stop +Do not scroll. Display the @samp{No more nodes within this document.} +message. This is the default. + +@item Scroll +Scroll as usual. Since the last node is usually an index, this means +that the very first node from the menu will be selected. + +@item Top +Go to the top node of this document. +@end table + +This variable is in effect only if @code{scroll-behaviour} is set to +@code{Continuous}. + +Notice that the default behavior has changed in version 4.12. Previous +versions behaved as if @code{scroll-last-node=Scroll} was set. This +behavior was counter-intuitive, therefore since version 4.12 the +default is to stop at the last node. + @item Next Only Only try to get the @samp{Next} node. @@ -1894,6 +1964,13 @@ Simply give up, changing nothing. If @code{scroll-behavior} is viewed. @end table +This variable normally affects only scrolling commands. +@xref{cursor-movement-scrolls}, for information on how to widen its +scope. + +The two names, @code{scroll-behavior} and @code{scroll-behaviour}, are +a historical accident. They are merely synonyms. + @item scroll-step @vindex scroll-step The number of lines to scroll when the cursor moves out of the window. @@ -1942,10 +2019,10 @@ effect. However, you can make Info perform quietly by setting the @cindex .infokey @cindex _info file (MS-DOS) -For those whose editor/pager of choice is not Emacs and who are not -entirely satisfied with the --vi-keys option (@pxref{--vi-keys}), GNU -Info provides a way to define different key-to-command bindings and -variable settings from the defaults described in this document. +GNU Info provides a way to define arbitrary key-to-command bindings +and variable settings, overriding the defaults described in this +document. (The @option{--vi-keys} option rebinds many keys at once; +@pxref{--vi-keys}.) On startup, GNU Info looks for a configuration file in the invoker's HOME directory called @file{.info}@footnote{Due to the limitations of @@ -2185,16 +2262,6 @@ Some common ways to organize Info files. @end ignore -@node Copying This Manual -@appendix Copying This Manual - -@menu -* GNU Free Documentation License:: License for copying this manual. -@end menu - -@include fdl.texi - - @node Index @appendix Index diff --git a/contrib/texinfo/doc/info.1 b/contrib/texinfo/doc/info.1 index 39ca1d32ac..352f09af8b 100644 --- a/contrib/texinfo/doc/info.1 +++ b/contrib/texinfo/doc/info.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.34. -.TH INFO "1" "December 2004" "info 4.8" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. +.TH INFO "1" "September 2008" "info 4.13" "User Commands" .SH NAME info \- read Info documents .SH SYNOPSIS @@ -9,7 +9,7 @@ info \- read Info documents Read documentation in Info format. .SH OPTIONS .TP -\fB\-\-apropos\fR=\fISTRING\fR +\fB\-k\fR, \fB\-\-apropos\fR=\fISTRING\fR look up STRING in all indices of all manuals. .TP \fB\-d\fR, \fB\-\-directory\fR=\fIDIR\fR @@ -48,25 +48,33 @@ go to command\-line options node. \fB\-\-subnodes\fR recursively output menu items. .TP -\fB\-w\fR, \fB\-\-where\fR, \fB\-\-location\fR -print physical location of Info file. -.TP \fB\-\-vi\-keys\fR use vi\-like and less\-like key bindings. .TP \fB\-\-version\fR display version information and exit. +.TP +\fB\-w\fR, \fB\-\-where\fR, \fB\-\-location\fR +print physical location of Info file. .PP The first non\-option argument, if present, is the menu entry to start from; it is searched for in all `dir' files along INFOPATH. If it is not present, info merges all `dir' files and shows the result. Any remaining arguments are treated as the names of menu items relative to the initial node visited. +.PP +For a summary of key bindings, type h within Info. .SH EXAMPLES .TP info show top\-level dir menu .TP +info info +show the general manual for Info readers +.TP +info info\-stnd +show the manual specific to this Info program +.TP info emacs start at emacs node from top\-level dir .TP @@ -76,6 +84,9 @@ start at buffers node within emacs manual info \fB\-\-show\-options\fR emacs start at node with emacs' command line options .TP +info \fB\-\-subnodes\fR \fB\-o\fR out.txt emacs +dump entire manual to out.txt +.TP info \fB\-f\fR ./foo.info show file ./foo.info, not searching dir .SH "REPORTING BUGS" @@ -83,7 +94,8 @@ Email bug reports to bug\-texinfo@gnu.org, general questions and discussion to help\-texinfo@gnu.org. Texinfo home page: http://www.gnu.org/software/texinfo/ .SH COPYRIGHT -Copyright \(co 2004 Free Software Foundation, Inc. -There is NO warranty. You may redistribute this software -under the terms of the GNU General Public License. -For more information about these matters, see the files named COPYING. +Copyright \(co 2008 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later +.br +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. diff --git a/contrib/texinfo/doc/info.5 b/contrib/texinfo/doc/info.5 index af9ba2ed42..488d2a107a 100644 --- a/contrib/texinfo/doc/info.5 +++ b/contrib/texinfo/doc/info.5 @@ -1,5 +1,5 @@ .\" info(5) -.\" $Id: info.5,v 1.2 2004/04/11 17:56:45 karl Exp $ +.\" $Id: info.5,v 1.3 2005/01/20 22:38:32 karl Exp $ .\" .\" Copyright (C) 1998 Free Software Foundation, Inc. .\" @@ -17,6 +17,16 @@ .\" versions, except that this permission notice may be stated in a .\" translation approved by the Foundation. .\" +.de EX +.nf +.ft CW +.in +5 +.. +.de EE +.in -5 +.ft R +.fi +.. .TH INFO 5 "GNU Info" "FSF" .SH NAME info \- readable online documentation @@ -37,13 +47,13 @@ but can be created from scratch if so desired. For a full description of the Texinfo language and associated tools, please see the Texinfo manual (written in Texinfo itself). Most likely, running this command from your shell: -.RS -.I info texinfo -.RE +.EX +info texinfo +.EE or this key sequence from inside Emacs: -.RS -.I M-x info RET m texinfo RET -.RE +.EX +M-x info RET m texinfo RET +.EE will get you there. .SH AVAILABILITY ftp://ftp.gnu.org/pub/gnu/texinfo-.tar.gz diff --git a/contrib/texinfo/doc/info.texi b/contrib/texinfo/doc/info.texi index 014e916508..62c4c8582e 100644 --- a/contrib/texinfo/doc/info.texi +++ b/contrib/texinfo/doc/info.texi @@ -14,21 +14,22 @@ This file describes how to use Info, the on-line, menu-driven GNU documentation system. -Copyright (C) 1989, 1992, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -Free Software Foundation, Inc. +Copyright @copyright{} 1989, 1992, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.1 or +under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being ``A GNU -Manual'', and with the Back-Cover Texts as in (a) below. A copy of the +Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled ``GNU Free Documentation License'' in the Emacs manual. -(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify -this GNU Manual, like GNU software. Copies published by the Free -Software Foundation raise funds for GNU development.'' +(a) The FSF's Back-Cover Text is: ``You have freedom to copy and +modify this GNU Manual, like GNU software. Buying copies from GNU +Press supports the FSF in developing GNU and promoting software +freedom.'' This document is part of a collection distributed under the GNU Free Documentation License. If you want to distribute this document @@ -63,37 +64,38 @@ The GNU Project distributes most of its on-line manuals in the probably using an Info reader to read this now. There are two primary Info readers: @code{info}, a stand-alone program -designed just to read Info files, and the @code{info} package in GNU -Emacs, a general-purpose editor. At present, only the Emacs reader -supports using a mouse. +designed just to read Info files (@pxref{Top,,Stand-alone Info, +info-stnd, GNU Info}), and the @code{info} package in GNU Emacs, a +general-purpose editor. At present, only the Emacs reader supports +using a mouse. @ifinfo If you are new to the Info reader and want to learn how to use it, type the command @kbd{h} now. It brings you to a programmed instruction sequence. -To read about expert-level Info commands, type @kbd{n} twice. This -brings you to @cite{Info for Experts}, skipping over the `Getting +To read about advanced Info commands, type @kbd{n} twice. This +brings you to @cite{Advanced Info Commands}, skipping over the `Getting Started' chapter. @end ifinfo @end ifnottex @menu * Getting Started:: Getting started using an Info reader. +* Advanced:: Advanced Info commands. * Expert Info:: Info commands for experts. -* Creating an Info File:: How to make your own Info file. * Index:: An index of topics, commands, and variables. @end menu -@node Getting Started, Expert Info, Top, Top +@node Getting Started, Advanced, Top, Top @comment node-name, next, previous, up @chapter Getting Started This first part of this Info manual describes how to get around inside of Info. The second part of the manual describes various advanced -Info commands, and how to write an Info as distinct from a Texinfo -file. The third part briefly explains how to generate Info files from -Texinfo files. +Info commands. The third part briefly explains how to generate Info +files from Texinfo files, and describes how to write an Info file +by hand. @ifnotinfo This manual is primarily designed for browsing with an Info reader @@ -153,13 +155,15 @@ number of lines; most readers pass by it without seeing it.) Since your terminal has a relatively small number of lines on its screen, it is necessary to give you special advice at the beginning. -If you see the text @samp{--All----} near the bottom right corner -of the screen, it means the entire text you are looking at fits on the -screen. If you see @samp{--Top----} instead, it means that there is -more text below that does not fit. To move forward through the text -and see another screen full, press @key{SPC}, the Space bar. To move -back up, press the key labeled @samp{Backspace} or @samp{DEL} (on some -keyboards, this key might be labeled @samp{Delete}). +If the entire text you are looking at fits on the screen, the text +@samp{All} will be displayed at the bottom of the screen. In the +stand-alone Info reader, it is displayed at the bottom right corner of +the screen; in Emacs, it is displayed on the modeline. If you see the +text @samp{Top} instead, it means that there is more text below that +does not fit. To move forward through the text and see another screen +full, press @key{SPC}, the Space bar. To move back up, press the key +labeled @samp{Backspace} or @samp{DEL} (on some keyboards, this key +might be labeled @samp{Delete}). @ifinfo Here are 40 lines of junk, so you can try @key{SPC} and @key{DEL} and @@ -238,10 +242,10 @@ line says that this is node @samp{Help} in the file @file{info}. (look at it now) says that the @samp{Next} node after this one is the node called @samp{Help-P}. An advanced Info command lets you go to any node whose name you know. In the stand-alone Info reader program, -the header line shows the names of this node and the info file as -well. In Emacs, the header line is duplicated in a special typeface, -and the duplicate remains at the top of the window all the time even -if you scroll through the node. +the header line shows the names of this node and the Info file as +well. In Emacs, the header line is displayed with a special typeface, +and remains at the top of the window all the time even if you scroll +through the node. Besides a @samp{Next}, a node can have a @samp{Previous} link, or an @samp{Up} link, or both. As you can see, this node has all of these @@ -260,7 +264,7 @@ links. @format >> If you are in Emacs and have a mouse, and if you already practiced - typing @kbd{n} to get to the next node, click now with the middle + typing @kbd{n} to get to the next node, click now with the left mouse button on the @samp{Next} link to do the same ``the mouse way''. @end format @@ -276,15 +280,14 @@ node, @samp{Help-^L}. @format >> But do not type @kbd{n} yet. First, try the @kbd{p} command, or - (in Emacs) click the middle mouse button on the @samp{Prev} link. - That takes you to the @samp{Previous} node. Then use @kbd{n} to - return here. + (in Emacs) click on the @samp{Prev} link. That takes you to + the @samp{Previous} node. Then use @kbd{n} to return here. @end format If you read this in Emacs, you will see an @samp{Info} item in the menu bar, close to its right edge. Clicking the mouse on the @samp{Info} menu-bar item opens a menu of commands which include -@samp{Next} and @samp{Prev} (and also some others which you didn't yet +@samp{Next} and @samp{Previous} (and also some others which you didn't yet learn about). This all probably seems insultingly simple so far, but @emph{please @@ -309,8 +312,8 @@ underlined as well; it says what the node is about. This is a big node and it does not all fit on your display screen. You can tell that there is more that is not visible because you -can see the string @samp{--Top-----} rather than @samp{--All----} near -the bottom right corner of the screen. +can see the text @samp{Top} rather than @samp{All} near the bottom of +the screen. @kindex SPC @r{(Info mode)} @kindex DEL @r{(Info mode)} @@ -394,17 +397,13 @@ the @key{BACKSPACE} key (or @key{DEL}) many times. You can also type Then come back, by typing @key{SPC} one or more times. @end format - If your screen is very tall, all of this node might fit at once. In -that case, @kbd{b} won't do anything. But you could observe the -effect of the @kbd{b} key if you use a smaller window. - @kindex ? @r{(Info mode)} @findex Info-summary You have just learned a considerable number of commands. If you want to use one but have trouble remembering which, you should type -a @kbd{?} (in Emacs it runs the @code{Info-summary} command) which -displays a brief list of commands. When you are finished looking at -the list, make it go away by typing a @key{SPC} repeatedly. +@kbd{?}, which displays a brief list of commands. When you are +finished looking at the list, make it go away by typing @key{SPC} +repeatedly. @format >> Type a @key{?} now. Press @key{SPC} to see consecutive screenfuls of @@ -597,7 +596,7 @@ line becomes blank again. Then you can type Info commands again. The command to go to a subnode via a menu is @kbd{m}. After you type the @kbd{m}, the line at the bottom of the screen says @samp{Menu item: }. You must then type the name of the subtopic you want, and end it with -a @key{RET}. In Emacs, @kbd{m} runs the command @code{Info-menu}. +a @key{RET}. @cindex abbreviating Info subnodes You can abbreviate the subtopic name. If the abbreviation is not @@ -671,10 +670,12 @@ mistake. Another way to move to the menu subtopic lines and between them is to type @key{TAB}. Each time you type a @key{TAB}, you move to the -next subtopic line. To move to a previous subtopic line, type -@kbd{M-@key{TAB}}---that is, press and hold the @key{META} key and then -press @key{TAB}. (On some keyboards, the @key{META} key might be labeled -@samp{Alt}.) +next subtopic line. To move to a previous subtopic line in the +stand-alone reader, type @kbd{M-@key{TAB}}---that is, press and hold +the @key{META} key and then press @key{TAB}. (On some keyboards, the +@key{META} key might be labeled @samp{Alt}.) In Emacs Info, type +@kbd{S-@key{TAB}} to move to a previous subtopic line (press and hold +the @key{Shift} key and then press @key{TAB}). Once you move cursor to a subtopic line, press @key{RET} to go to that subtopic's node. @@ -688,7 +689,7 @@ ends the subtopic's brief name. You will see the subtopic's name change its appearance (usually, its background color will change), and the shape of the mouse pointer will change if your platform supports that. After a while, if you leave the mouse on that spot, a small -window will pop up, saying ``Mouse-2: go to that node'', or the same +window will pop up, saying ``Mouse-2: go to that node,'' or the same message may appear at the bottom of the screen. @kbd{Mouse-2} is the second button of your mouse counting from the @@ -723,11 +724,10 @@ usually used to ``stay on the same level but go backwards''. @kindex u @r{(Info mode)} @findex Info-up You can go back to the node @samp{Help-M} by typing the command -@kbd{u} for ``Up'' (the Emacs command run by @kbd{u} is -@code{Info-up}). That puts you at the @emph{front} of the node---to -get back to where you were reading you have to type some @key{SPC}s. -(Some Info readers, such as the one built into Emacs, put you at the -same place where you were reading in @samp{Help-M}.) +@kbd{u} for ``Up''. This puts you at the menu subtopic line pointing +to the subnode that the @kbd{u} command brought you from. (Some Info +readers may put you at the @emph{front} of the node instead---to get +back to where you were reading, you have to type some @key{SPC}s.) Another way to go Up is to click @kbd{Mouse-2} on the @samp{Up} pointer shown in the header line (provided that you have a mouse). @@ -749,19 +749,21 @@ in Emacs. Do @kbd{M-x visible-mode} to show or hide it.) @kindex f @r{(Info mode)} @findex Info-follow-reference - There are two ways to follow a cross reference. You can move the -cursor to it and press @key{RET}, just as in a menu. @key{RET} -follows the cross reference that the cursor is on. Or you can type -@kbd{f} and then specify the name of the cross reference (in this -case, @samp{Cross}) as an argument. In Emacs Info, @kbd{f} runs -@code{Info-follow-reference}, - - In the @kbd{f} command, you select the cross reference with its -name, so it does not matter where the cursor was. If the cursor is on -or near a cross reference, @kbd{f} suggests that reference name in -parentheses as the default; typing @key{RET} will follow that -reference. However, if you type a different reference name, @kbd{f} -will follow the other reference which has that name. + You can follow a cross reference by moving the cursor to it and +press @key{RET}, just as in a menu. In Emacs, you can also click +@kbd{Mouse-1} on a cross reference to follow it; you can see that the +cross reference is mouse-sensitive by moving the mouse pointer to the +reference and watching how the underlying text and the mouse pointer +change in response. + + Another way to follow a cross reference is to type @kbd{f} and then +specify the name of the cross reference (in this case, @samp{Cross}) +as an argument. For this command, it does not matter where the cursor +was. If the cursor is on or near a cross reference, @kbd{f} suggests +that reference name in parentheses as the default; typing @key{RET} +will follow that reference. However, if you type a different +reference name, @kbd{f} will follow the other reference which has that +name. @format >> Type @kbd{f}, followed by @kbd{Cross}, and then @key{RET}. @@ -785,8 +787,9 @@ to cancel the @kbd{f}. type a @kbd{Control-g} and see how the @samp{f} gives up. @end format - The @key{TAB} and @kbd{M-@key{TAB}} key, which move between menu -items in a menu, also move between cross references outside of menus. + The @key{TAB}, @kbd{M-@key{TAB}} and @kbd{S-@key{TAB}} keys, +which move between menu items in a menu, also move between cross +references outside of menus. Sometimes a cross reference (or a node) can lead to another file (in other words another ``manual''), or, on occasion, even a file on a @@ -795,36 +798,22 @@ stand-alone Info avoid using remote links). Such a cross reference looks like this: @xref{Top,, Overview of Texinfo, texinfo, Texinfo: The GNU Documentation Format}. (After following this link, type @kbd{l} to get back to this node.) Here the name @samp{texinfo} -between parentheses (shown in the stand-alone version) refers to the -file name. This file name appears in cross references and node names -if it differs from the current file. In Emacs, the file name is -hidden (along with other text). (Use @kbd{M-x visible-mode} to show -or hide it.) - - The remainder of this node applies only to the Emacs version. If -you use the stand-alone version, you can type @kbd{n} immediately. - - To some users, switching manuals is a much bigger switch than -switching sections. These users like to know that they are going to -be switching to another manual (and which one) before actually doing -so, especially given that, if one does not notice, Info commands like -@kbd{t} (see the next node) can have confusing results. - - If you put your mouse over the cross reference and if the cross -reference leads to a different manual, then the information appearing -in a separate box (tool tip) or in the echo area, will mention the -file the cross reference will carry you to (between parentheses). -This is also true for menu subtopic names. If you have a mouse, just -leave it over the @samp{Overview} cross reference above and watch what -happens. - - If you always like to have that information available without having -to move your mouse over the cross reference, set -@code{Info-hide-note-references} to a value other than t (@pxref{Emacs -Info Variables}). You might also want to do that if you have a lot of -cross references to files on remote machines and have non-permanent or -slow access, since otherwise you might not be able to distinguish -between local and remote links. +between parentheses refers to the file name. This file name appears +in cross references and node names if it differs from the current +file, so you can always know that you are going to be switching to +another manual and which one. + +However, Emacs normally hides some other text in cross-references. +If you put your mouse over the cross reference, then the information +appearing in a separate box (tool tip) or in the echo area will show +the full cross-reference including the file name and the node name of +the cross reference. If you have a mouse, just leave it over the +cross reference @xref{Top,, Overview of Texinfo, texinfo, Texinfo: +The GNU Documentation Format}, and watch what happens. If you +always like to have that information visible without having to move +your mouse over the cross reference, use @kbd{M-x visible-mode}, or +set @code{Info-hide-note-references} to a value other than @code{t} +(@pxref{Emacs Info Variables}). @format >> Now type @kbd{n} to learn more commands. @@ -845,17 +834,18 @@ This allows Info readers to go to the exact line of an entry, not just the start of the containing node.) You can get to the index from the main menu of the file with the -@kbd{m} command; then you can use the @kbd{m} command again in the -index node to go to the node that describes the topic you want. +@kbd{m} command and the name of the index node; then you can use the +@kbd{m} command again in the index node to go to the node that +describes the topic you want. There is also a short-cut Info command, @kbd{i}, which does all of that for you. It searches the index for a given topic (a string) and goes to the node which is listed in the index for that topic. -@xref{Info Search}, for a full explanation. +@xref{Search Index}, for a full explanation. @kindex l @r{(Info mode)} -@findex Info-last -@cindex going back in Info mode +@findex Info-history-back +@cindex going back in Info history If you have been moving around to different nodes and wish to retrace your steps, the @kbd{l} command (@kbd{l} for @dfn{last}) will do that, one node-step at a time. As you move from node to node, Info @@ -863,8 +853,6 @@ records the nodes where you have been in a special history list. The @kbd{l} command revisits nodes in the history list; each successive @kbd{l} command moves one step back through the history. - In Emacs, @kbd{l} runs the command @code{Info-last}. - @format >> Try typing @kbd{p p n} and then three @kbd{l}'s, pausing in between to see what each @kbd{l} does. You should wind up right back here. @@ -875,6 +863,20 @@ where @emph{you} last were, whereas @kbd{p} always moves to the node which the header says is the @samp{Previous} node (from this node, the @samp{Prev} link leads to @samp{Help-Xref}). +@kindex r @r{(Info mode)} +@findex Info-history-forward +@cindex going forward in Info history + You can use the @kbd{r} command (@code{Info-history-forward} in Emacs) +to revisit nodes in the history list in the forward direction, so that +@kbd{r} will return you to the node you came from by typing @kbd{l}. + +@kindex L @r{(Info mode)} +@findex Info-history +@cindex history list of visited nodes + The @kbd{L} command (@code{Info-history} in Emacs) creates a virtual +node that contains a list of all nodes you visited. You can select +a previously visited node from this menu to revisit it. + @kindex d @r{(Info mode)} @findex Info-directory @cindex go to Directory node @@ -898,54 +900,172 @@ This is useful if you want to browse the manual's main menu, or select some specific top-level menu item. The Emacs command run by @kbd{t} is @code{Info-top-node}. - Clicking @kbd{Mouse-2} on or near a cross reference also follows the -reference. You can see that the cross reference is mouse-sensitive by -moving the mouse pointer to the reference and watching how the -underlying text and the mouse pointer change in response. - @format >> Now type @kbd{n} to see the last node of the course. @end format - @xref{Expert Info}, for more advanced Info features. + @xref{Advanced}, for more advanced Info features. @c If a menu appears at the end of this node, remove it. @c It is an accident of the menu updating command. -@node Expert Info -@chapter Info for Experts +@node Help-Q, , Help-Int, Getting Started +@comment node-name, next, previous, up +@section Quitting Info + +@kindex q @r{(Info mode)} +@findex Info-exit +@cindex quitting Info mode + To get out of Info, back to what you were doing before, type @kbd{q} +for @dfn{Quit}. This runs @code{Info-exit} in Emacs. + + This is the end of the basic course on using Info. You have learned +how to move in an Info document, and how to follow menus and cross +references. This makes you ready for reading manuals top to bottom, +as new users should do when they learn a new package. + + Another set of Info commands is useful when you need to find +something quickly in a manual---that is, when you need to use a manual +as a reference rather than as a tutorial. We urge you to learn +these search commands as well. If you want to do that now, follow this +cross reference to @ref{Advanced}. + +Yet another set of commands are meant for experienced users; you can +find them by looking in the Directory node for documentation on Info. +Finding them will be a good exercise in using Info in the usual +manner. + +@format +>> Type @kbd{d} to go to the Info directory node; then type + @kbd{mInfo} and Return, to get to the node about Info and + see what other help is available. +@end format + + +@node Advanced +@chapter Advanced Info Commands - This chapter describes various Info commands for experts. (If you + This chapter describes various advanced Info commands. (If you are using a stand-alone Info reader, there are additional commands specific to it, which are documented in several chapters of @ref{Top,, GNU Info, info-stnd, GNU Info}.) - This chapter also explains how to write an Info as distinct from a -Texinfo file. (However, in most cases, writing a Texinfo file is -better, since you can use it to make a printed manual or produce other -formats, such as HTML and DocBook, as well as for generating Info -files.) @xref{Top,, Overview of Texinfo, texinfo, Texinfo: The GNU -Documentation Format}. +@kindex C-q @r{(Info mode)} + One advanced command useful with most of the others described here +is @kbd{C-q}, which ``quotes'' the next character so that it is +entered literally (@pxref{Inserting Text,,,emacs,The GNU Emacs +Manual}). For example, pressing @kbd{?} ordinarily brings up a list +of completion possibilities. If you want to (for example) search for +an actual @samp{?} character, the simplest way is to insert it using +@kbd{C-q ?}. This works the same in Emacs and stand-alone Info. @menu -* Advanced:: Advanced Info commands: g, e, and 1 - 9. -* Info Search:: How to search Info documents for specific subjects. -* Add:: Describes how to add new nodes to the hierarchy. - Also tells what nodes look like. -* Menus:: How to add to or create menus in Info nodes. -* Cross-refs:: How to add cross-references to Info nodes. -* Tags:: How to make tags tables for Info files. -* Checking:: Checking an Info File +* Search Text:: How to search Info documents. +* Search Index:: How to search the indices for specific subjects. +* Go to node:: How to go to a node by name. +* Choose menu subtopic:: How to choose a menu subtopic by its number. +* Create Info buffer:: How to create a new Info buffer in Emacs. * Emacs Info Variables:: Variables modifying the behavior of Emacs Info. @end menu -@node Advanced, Info Search, , Expert Info + +@node Search Text, Search Index, , Advanced @comment node-name, next, previous, up -@section Advanced Info Commands +@section @kbd{s} searches Info documents + +@cindex searching Info documents +@cindex Info document as a reference + The commands which move between and inside nodes allow you to read +the entire manual or its large portions. But what if you need to find +some information in the manual as fast as you can, and you don't know +or don't remember in what node to look for it? This need arises when +you use a manual as a @dfn{reference}, or when it is impractical to +read the entire manual before you start using the programs it +describes. + + Info has powerful searching facilities that let you find things +quickly. You can search either the manual text or its indices. + +@kindex s @r{(Info mode)} +@findex Info-search + The @kbd{s} command allows you to search a whole Info file for a string. +It switches to the next node if and when that is necessary. You +type @kbd{s} followed by the string to search for, terminated by +@key{RET}. To search for the same string again, just @kbd{s} followed +by @key{RET} will do. The file's nodes are scanned in the order +they are in the file, which has no necessary relationship to the +order that they may be in the tree structure of menus and @samp{next} +pointers. But normally the two orders are not very different. In any +case, you can always look at the mode line to find out what node you have +reached, if the header is not visible (this can happen, because @kbd{s} +puts your cursor at the occurrence of the string, not at the beginning +of the node). + +@kindex M-s @r{(Info mode)} + In Emacs, @kbd{Meta-s} is equivalent to @kbd{s}. That is for +compatibility with other GNU packages that use @kbd{M-s} for a similar +kind of search command. Both @kbd{s} and @kbd{M-s} run in Emacs the +command @code{Info-search}. + +@kindex C-s @r{(Info mode)} +@kindex C-r @r{(Info mode)} +@findex isearch + Instead of using @kbd{s} in Emacs Info and in the stand-alone Info, +you can use an incremental search started with @kbd{C-s} or @kbd{C-r}. +It can search through multiple Info nodes. @xref{Incremental Search,,, +emacs, The GNU Emacs Manual}. In Emacs, you can disable this behavior +by setting the variable @code{Info-isearch-search} to @code{nil} +(@pxref{Emacs Info Variables}). + +@node Search Index, Go to node, Search Text, Advanced +@comment node-name, next, previous, up +@section @kbd{i} searches the indices for specific subjects + +@cindex searching Info indices +@kindex i @r{(Info mode)} +@findex Info-index + Since most topics in the manual should be indexed, you should try +the index search first before the text search. The @kbd{i} command +prompts you for a subject and then looks up that subject in the +indices. If it finds an index entry with the subject you typed, it +goes to the node to which that index entry points. You should browse +through that node to see whether the issue you are looking for is +described there. If it isn't, type @kbd{,} one or more times to go +through additional index entries which match your subject. + + The @kbd{i} command and subsequent @kbd{,} commands find all index +entries which include the string you typed @emph{as a substring}. +For each match, Info shows in the echo area the full index entry it +found. Often, the text of the full index entry already gives you +enough information to decide whether it is relevant to what you are +looking for, so we recommend that you read what Info shows in the echo +area before looking at the node it displays. + + Since @kbd{i} looks for a substring, you can search for subjects even +if you are not sure how they are spelled in the index. For example, +suppose you want to find something that is pertinent to commands which +complete partial input (e.g., when you type @key{TAB}). If you want +to catch index entries that refer to ``complete,'' ``completion,'' and +``completing,'' you could type @kbd{icomplet@key{RET}}. -Here are some more Info commands that make it easier to move around. + Info documents which describe programs should index the commands, +options, and key sequences that the program provides. If you are +looking for a description of a command, an option, or a key, just type +their names when @kbd{i} prompts you for a topic. For example, if you +want to read the description of what the @kbd{C-l} key does, type +@kbd{iC-l@key{RET}} literally. -@subheading @kbd{g} goes to a node by name +@findex info-apropos +@findex index-apropos +If you aren't sure which manual documents the topic you are looking +for, try the @kbd{M-x info-apropos} command in Emacs, or the @kbd{M-x +index-apropos} command in the stand-alone reader. It prompts for +a string and then looks up that string in all the indices of all the +Info documents installed on your system. + +@node Go to node, Choose menu subtopic, Search Index, Advanced +@comment node-name, next, previous, up +@section @kbd{g} goes to a node by name @kindex g @r{(Info mode)} @findex Info-goto-node @@ -953,8 +1073,7 @@ Here are some more Info commands that make it easier to move around. If you know a node's name, you can go there by typing @kbd{g}, the name, and @key{RET}. Thus, @kbd{gTop@key{RET}} would go to the node called @samp{Top} in this file. (This is equivalent to @kbd{t}, see -@ref{Help-Int}.) @kbd{gAdvanced@key{RET}} would come back here. -@kbd{g} in Emacs runs the command @code{Info-goto-node}. +@ref{Help-Int}.) @kbd{gGo to node@key{RET}} would come back here. Unlike @kbd{m}, @kbd{g} does not allow the use of abbreviations. But it does allow completion, so you can type @key{TAB} to complete a @@ -969,9 +1088,11 @@ the node @samp{Top} in the Info file @file{dir}. Likewise, The node name @samp{*} specifies the whole file. So you can look at all of the current file by typing @kbd{g*@key{RET}} or all of any -other file with @kbd{g(@var{filename})@key{RET}}. +other file with @kbd{g(@var{filename})*@key{RET}}. -@subheading @kbd{1}--@kbd{9} choose a menu subtopic by its number +@node Choose menu subtopic, Create Info buffer, Go to node, Advanced +@comment node-name, next, previous, up +@section @kbd{1}--@kbd{9} choose a menu subtopic by its number @kindex 1 @r{through} 9 @r{(Info mode)} @findex Info-nth-menu-item @@ -982,8 +1103,7 @@ you might like to use the commands @kbd{1}, @kbd{2}, @kbd{3}, @kbd{4}, with a name of a menu subtopic. @kbd{1} goes through the first item in the current node's menu; @kbd{2} goes through the second item, etc. In the stand-alone reader, @kbd{0} goes through the last menu item; -this is so you need not count how many entries are there. In Emacs, -the digit keys run the command @code{Info-nth-menu-item}. +this is so you need not count how many entries are there. If your display supports multiple fonts, colors or underlining, and you are using Emacs' Info mode to read Info files, the third, sixth @@ -996,28 +1116,15 @@ underlining. If you need to actually count items, it is better to use @kbd{m} instead, and specify the name, or use @key{TAB} to quickly move between menu items. -@subheading @kbd{e} makes Info document editable - -@kindex e @r{(Info mode)} -@findex Info-edit -@cindex edit Info document - The Info command @kbd{e} changes from Info mode to an ordinary -Emacs editing mode, so that you can edit the text of the current node. -Type @kbd{C-c C-c} to switch back to Info. The @kbd{e} command is allowed -only if the variable @code{Info-enable-edit} is non-@code{nil}. - - The @kbd{e} command only works in Emacs, where it runs the command -@code{Info-edit}. The stand-alone Info reader doesn't allow you to -edit the Info file, so typing @kbd{e} there goes to the end of the -current node. - -@subheading @kbd{M-n} creates a new independent Info buffer in Emacs +@node Create Info buffer, Emacs Info Variables, Choose menu subtopic, Advanced +@comment node-name, next, previous, up +@section @kbd{M-n} creates a new independent Info buffer in Emacs @kindex M-n @r{(Info mode)} @findex clone-buffer @cindex multiple Info buffers If you are reading Info in Emacs, you can select a new independent -Info buffer in another window by typing @kbd{M-n}. The new buffer +Info buffer in a new Emacs window by typing @kbd{M-n}. The new buffer starts out as an exact copy of the old one, but you will be able to move independently between nodes in the two buffers. (In Info mode, @kbd{M-n} runs the Emacs command @code{clone-buffer}.) @@ -1028,89 +1135,132 @@ m} and @kbd{C-u g} go to a new node in exactly the same way that @kbd{m} and @kbd{g} do, but they do so in a new Info buffer which they select in another window. -@node Info Search, Add, Advanced, Expert Info + Another way to produce new Info buffers in Emacs is to use a numeric +prefix argument for the @kbd{C-h i} command (@code{info}) which +switches to the Info buffer with that number. Thus, @kbd{C-u 2 C-h i} +switches to the buffer @samp{*info*<2>}, creating it if necessary. + +@node Emacs Info Variables, , Create Info buffer, Advanced @comment node-name, next, previous, up -@section How to search Info documents for specific subjects +@section Emacs Info-mode Variables -@cindex searching Info documents -@cindex Info document as a reference - The commands which move between and inside nodes allow you to read -the entire manual or its large portions. But what if you need to find -some information in the manual as fast as you can, and you don't know -or don't remember in what node to look for it? This need arises when -you use a manual as a @dfn{reference}, or when it is impractical to -read the entire manual before you start using the programs it -describes. +The following variables may modify the behavior of Info-mode in Emacs; +you may wish to set one or several of these variables interactively, +or in your init file. @xref{Examining, Examining and Setting +Variables, Examining and Setting Variables, emacs, The GNU Emacs +Manual}. The stand-alone Info reader program has its own set of +variables, described in @ref{Variables,, Manipulating Variables, +info-stnd, GNU Info}. - Info has powerful searching facilities that let you find things -quickly. You can search either the manual indices or its text. +@vtable @code +@item Info-directory-list +The list of directories to search for Info files. Each element is a +string (directory name) or @code{nil} (try default directory). If not +initialized Info uses the environment variable @env{INFOPATH} to +initialize it, or @code{Info-default-directory-list} if there is no +@env{INFOPATH} variable in the environment. -@kindex i @r{(Info mode)} -@findex Info-index - Since most subjects related to what the manual describes should be -indexed, you should try the index search first. The @kbd{i} command -prompts you for a subject and then looks up that subject in the -indices. If it finds an index entry with the subject you typed, it -goes to the node to which that index entry points. You should browse -through that node to see whether the issue you are looking for is -described there. If it isn't, type @kbd{,} one or more times to go -through additional index entries which match your subject. +If you wish to customize the Info directory search list for both Emacs +Info and stand-alone Info, it is best to set the @env{INFOPATH} +environment variable, since that applies to both programs. - The @kbd{i} command finds all index entries which include the string -you typed @emph{as a substring}. For each match, Info shows in the -echo area the full index entry it found. Often, the text of the full -index entry already gives you enough information to decide whether it -is relevant to what you are looking for, so we recommend that you read -what Info shows in the echo area before looking at the node it -displays. +@item Info-additional-directory-list +A list of additional directories to search for Info documentation files. +These directories are not searched for merging the @file{dir} file. - Since @kbd{i} looks for a substring, you can search for subjects even -if you are not sure how they are spelled in the index. For example, -suppose you want to find something that is pertinent to commands which -complete partial input (e.g., when you type @key{TAB}). If you want -to catch index entries that refer to ``complete'', ``completion'', and -``completing'', you could type @kbd{icomplet@key{RET}}. +@item Info-mode-hook +Hooks run when @code{Info-mode} is called. By default, it contains +the hook @code{turn-on-font-lock} which enables highlighting of Info +files. You can change how the highlighting looks by customizing the +faces @code{info-node}, @code{info-xref}, @code{info-xref-visited}, +@code{info-header-xref}, @code{info-header-node}, @code{info-menu-header}, +@code{info-menu-star}, and @code{info-title-@var{n}} (where @var{n} +is the level of the section, a number between 1 and 4). To customize +a face, type @kbd{M-x customize-face @key{RET} @var{face} @key{RET}}, +where @var{face} is one of the face names listed here. - Info documents which describe programs should index the commands, -options, and key sequences that the program provides. If you are -looking for a description of a command, an option, or a key, just type -their names when @kbd{i} prompts you for a topic. For example, if you -want to read the description of what the @kbd{C-f} key does, type -@kbd{i C - f @key{RET}}. Here @kbd{C-f} are 3 literal characters -@samp{C}, @samp{-}, and @samp{f}, not the ``Control-f'' command key -you type inside Emacs to run the command bound to @kbd{C-f}. +@item Info-fontify-maximum-menu-size +Maximum size of menu to fontify if @code{font-lock-mode} is non-@code{nil}. - In Emacs, @kbd{i} runs the command @code{Info-index}. +@item Info-fontify-visited-nodes +If non-@code{nil}, menu items and cross-references pointing to visited +nodes are displayed in the @code{info-xref-visited} face. -@findex info-apropos -If you don't know what manual documents something, try the @kbd{M-x -info-apropos} command. It prompts for a string and then looks up that -string in all the indices of all the Info documents installed on your -system. +@item Info-use-header-line +If non-@code{nil}, Emacs puts in the Info buffer a header line showing +the @samp{Next}, @samp{Prev}, and @samp{Up} links. A header line does +not scroll with the rest of the buffer, making these links always +visible. -@kindex s @r{(Info mode)} -@findex Info-search - The @kbd{s} command allows you to search a whole file for a string. -It switches to the next node if and when that is necessary. You -type @kbd{s} followed by the string to search for, terminated by -@key{RET}. To search for the same string again, just @kbd{s} followed -by @key{RET} will do. The file's nodes are scanned in the order -they are in in the file, which has no necessary relationship to the -order that they may be in the tree structure of menus and @samp{next} -pointers. But normally the two orders are not very different. In any -case, you can always do a @kbd{b} to find out what node you have -reached, if the header is not visible (this can happen, because @kbd{s} -puts your cursor at the occurrence of the string, not at the beginning -of the node). +@item Info-hide-note-references +As explained in earlier nodes, the Emacs version of Info normally +hides some text in menus and cross-references. You can completely +disable this feature, by setting this option to @code{nil}. Setting +it to a value that is neither @code{nil} nor @code{t} produces an +intermediate behavior, hiding a limited amount of text, but showing +all text that could potentially be useful. + +@item Info-scroll-prefer-subnodes +If set to a non-@code{nil} value, @key{SPC} and @key{BACKSPACE} (or +@key{DEL}) keys in a menu visit subnodes of the current node before +scrolling to its end or beginning, respectively. For example, if the +node's menu appears on the screen, the next @key{SPC} moves to a +subnode indicated by the following menu item. Setting this option to +@code{nil} results in behavior similar to the stand-alone Info reader +program, which visits the first subnode from the menu only when you +hit the end of the current node. The default is @code{nil}. + +@item Info-isearch-search +If non-@code{nil}, isearch in Info searches through multiple nodes. + +@item Info-enable-active-nodes +When set to a non-@code{nil} value, allows Info to execute Lisp code +associated with nodes. The Lisp code is executed when the node is +selected. The Lisp code to be executed should follow the node +delimiter (the @samp{DEL} character) and an @samp{execute: } tag, like +this: + +@example +^_execute: (message "This is an active node!") +@end example +@end vtable -@kindex M-s @r{(Info mode)} - In Emacs, @kbd{Meta-s} is equivalent to @kbd{s}. That is for -compatibility with other GNU packages that use @kbd{M-s} for a similar -kind of search command. Both @kbd{s} and @kbd{M-s} run in Emacs the -command @code{Info-search}. +@node Expert Info +@chapter Info for Experts -@node Add, Menus, Info Search, Expert Info + This chapter explains how to write an Info file by hand. However, +in most cases, writing a Texinfo file is better, since you can use it +to make a printed manual or produce other formats, such as HTML and +DocBook, as well as for generating Info files. + +The @code{makeinfo} command converts a Texinfo file into an Info file; +@code{texinfo-format-region} and @code{texinfo-format-buffer} are GNU +Emacs functions that do the same. + +@xref{Top,, Overview of Texinfo, texinfo, Texinfo: The GNU +Documentation Format}, for how to write a Texinfo file. + +@xref{Creating an Info File,,, texinfo, Texinfo: The GNU Documentation +Format}, for how to create an Info file from a Texinfo file. + +@xref{Installing an Info File,,, texinfo, Texinfo: The GNU +Documentation Format}, for how to install an Info file after you +have created one. + +However, if you want to edit an Info file manually and install it manually, +here is how. + +@menu +* Add:: Describes how to add new nodes to the hierarchy. + Also tells what nodes look like. +* Menus:: How to add to or create menus in Info nodes. +* Cross-refs:: How to add cross-references to Info nodes. +* Tags:: How to make tags tables for Info files. +* Checking:: Checking an Info File. +@end menu + +@node Add, Menus, , Expert Info @comment node-name, next, previous, up @section Adding a new node to Info @@ -1123,14 +1273,6 @@ Create some nodes, in some file, to document that topic. Put that topic in the menu in the directory. @xref{Menus, Menu}. @end enumerate - Usually, the way to create the nodes is with Texinfo (@pxref{Top,, -Overview of Texinfo, texinfo, Texinfo: The GNU Documentation Format}); -this has the advantage that you can also make a printed manual or HTML -from them. You would use the @samp{@@dircategory} and -@samp{@@direntry} commands to put the manual into the Info directory. -However, if you want to edit an Info file manually and install it -manually, here is how. - @cindex node delimiters The new node can live in an existing documentation file, or in a new one. It must have a @samp{^_} character before it (invisible to the @@ -1165,7 +1307,7 @@ in the names is insignificant. what appears after the @samp{Node: } in that node's first line. For example, this node's name is @samp{Add}. A node in another file is named by @samp{(@var{filename})@var{node-within-file}}, as in -@samp{(info)Add} for this node. If the file name starts with ``./'', +@samp{(info)Add} for this node. If the file name starts with @samp{./}, then it is relative to the current directory; otherwise, it is relative starting from the standard directory for Info files of your site. The name @samp{(@var{filename})Top} can be abbreviated to just @@ -1223,7 +1365,7 @@ short abbreviations. In a long menu, it is a good idea to capitalize the beginning of each item name which is the minimum acceptable abbreviation for it (a long menu is more than 5 or so entries). - The nodes listed in a node's menu are called its ``subnodes'', and it + The nodes listed in a node's menu are called its ``subnodes,'' and it is their ``superior''. They should each have an @samp{Up:} pointing at the superior. It is often useful to arrange all or most of the subnodes in a sequence of @samp{Next} and @samp{Previous} pointers so that @@ -1237,7 +1379,7 @@ Info's files live in that file directory, but they do not have to; and files in that directory are not automatically listed in the Info Directory node. - Also, although the Info node graph is claimed to be a ``hierarchy'', + Also, although the Info node graph is claimed to be a ``hierarchy,'' in fact it can be @emph{any} directed graph. Shared structures and pointer cycles are perfectly possible, and can be used if they are appropriate to the meaning to be expressed. There is no need for all @@ -1245,9 +1387,9 @@ the nodes in a file to form a connected structure. In fact, this file has two connected components. You are in one of them, which is under the node @samp{Top}; the other contains the node @samp{Help} which the @kbd{h} command goes to. In fact, since there is no garbage -collector, nothing terrible happens if a substructure is not pointed -to, but such a substructure is rather useless since nobody can -ever find out that it exists. +collector on the node graph, nothing terrible happens if a substructure +is not pointed to, but such a substructure is rather useless since nobody +can ever find out that it exists. @node Cross-refs, Tags, Menus, Expert Info @comment node-name, next, previous, up @@ -1291,44 +1433,11 @@ cannot expect this node to have a @samp{Next}, @samp{Previous} or >> Type @kbd{l} to return to the node where the cross reference was. @end format -@node Help-Q, , Help-Int, Getting Started -@comment node-name, next, previous, up -@section Quitting Info - -@kindex q @r{(Info mode)} -@findex Info-exit -@cindex quitting Info mode - To get out of Info, back to what you were doing before, type @kbd{q} -for @dfn{Quit}. This runs @code{Info-exit} in Emacs. - - This is the end of the basic course on using Info. You have learned -how to move in an Info document, and how to follow menus and cross -references. This makes you ready for reading manuals top to bottom, -as new users should do when they learn a new package. - - Another set of Info commands is useful when you need to find -something quickly in a manual---that is, when you need to use a manual -as a reference rather than as a tutorial. We urge you to learn -these search commands as well. If you want to do that now, follow this -cross reference to @ref{Info Search}. - -Yet another set of commands are meant for experienced users; you can -find them by looking in the Directory node for documentation on Info. -Finding them will be a good exercise in using Info in the usual -manner. - -@format ->> Type @kbd{d} to go to the Info directory node; then type - @kbd{mInfo} and Return, to get to the node about Info and - see what other help is available. -@end format - - @node Tags, Checking, Cross-refs, Expert Info @comment node-name, next, previous, up @section Tags Tables for Info Files -@cindex tags tables in info files +@cindex tags tables in Info files You can speed up the access to nodes of a large Info file by giving it a tags table. Unlike the tags table for a program, the tags table for an Info file lives inside the file itself and is used @@ -1368,8 +1477,7 @@ the beginning of the node's header (ending just after the node name), a @samp{DEL} character, and the character position in the file of the beginning of the node. - -@node Checking, Emacs Info Variables, Tags, Expert Info +@node Checking, , Tags, Expert Info @section Checking an Info File When creating an Info file, it is easy to forget the name of a node when @@ -1388,101 +1496,6 @@ usually few. To check an Info file, do @kbd{M-x Info-validate} while looking at any node of the file with Emacs Info mode. -@node Emacs Info Variables, , Checking, Expert Info -@section Emacs Info-mode Variables - -The following variables may modify the behavior of Info-mode in Emacs; -you may wish to set one or several of these variables interactively, or -in your @file{~/.emacs} init file. @xref{Examining, Examining and Setting -Variables, Examining and Setting Variables, emacs, The GNU Emacs -Manual}. The stand-alone Info reader program has its own set of -variables, described in @ref{Variables,, Manipulating Variables, -info-stnd, GNU Info}. - -@vtable @code -@item Info-directory-list -The list of directories to search for Info files. Each element is a -string (directory name) or @code{nil} (try default directory). If not -initialized Info uses the environment variable @env{INFOPATH} to -initialize it, or @code{Info-default-directory-list} if there is no -@env{INFOPATH} variable in the environment. - -If you wish to customize the Info directory search list for both Emacs -info and stand-alone Info, it is best to set the @env{INFOPATH} -environment variable, since that applies to both programs. - -@item Info-additional-directory-list -A list of additional directories to search for Info documentation files. -These directories are not searched for merging the @file{dir} file. - -@item Info-fontify -When set to a non-@code{nil} value, enables highlighting of Info -files. The default is @code{t}. You can change how the highlighting -looks by customizing the faces @code{info-node}, @code{info-xref}, -@code{info-header-xref}, @code{info-header-node}, @code{info-menu-5}, -@code{info-menu-header}, and @code{info-title-@var{n}-face} (where -@var{n} is the level of the section, a number between 1 and 4). To -customize a face, type @kbd{M-x customize-face @key{RET} @var{face} -@key{RET}}, where @var{face} is one of the face names listed here. - -@item Info-use-header-line -If non-@code{nil}, Emacs puts in the Info buffer a header line showing -the @samp{Next}, @samp{Prev}, and @samp{Up} links. A header line does -not scroll with the rest of the buffer, making these links always -visible. - -@item Info-hide-note-references -As explained in earlier nodes, the Emacs version of Info normally -hides some text in menus and cross-references. You can completely -disable this feature, by setting this option to @code{nil}. Setting -it to a value that is neither @code{nil} nor @code{t} produces an -intermediate behavior, hiding a limited amount of text, but showing -all text that could potentially be useful. - -@item Info-scroll-prefer-subnodes -If set to a non-@code{nil} value, @key{SPC} and @key{BACKSPACE} (or -@key{DEL}) keys in a menu visit subnodes of the current node before -scrolling to its end or beginning, respectively. For example, if the -node's menu appears on the screen, the next @key{SPC} moves to a -subnode indicated by the following menu item. Setting this option to -@code{nil} results in behavior similar to the stand-alone Info reader -program, which visits the first subnode from the menu only when you -hit the end of the current node. The default is @code{nil}. - -@item Info-enable-active-nodes -When set to a non-@code{nil} value, allows Info to execute Lisp code -associated with nodes. The Lisp code is executed when the node is -selected. The Lisp code to be executed should follow the node -delimiter (the @samp{DEL} character) and an @samp{execute: } tag, like -this: - -@example -^_execute: (message "This is an active node!") -@end example - -@item Info-enable-edit -Set to @code{nil}, disables the @samp{e} (@code{Info-edit}) command. A -non-@code{nil} value enables it. @xref{Add, Edit}. -@end vtable - - -@node Creating an Info File -@chapter Creating an Info File from a Texinfo File - -@code{makeinfo} is a utility that converts a Texinfo file into an Info -file; @code{texinfo-format-region} and @code{texinfo-format-buffer} are -GNU Emacs functions that do the same. - -@xref{Top,, Overview of Texinfo, texinfo, Texinfo: The GNU -Documentation Format}, to learn how to write a Texinfo file. - -@xref{Creating an Info File,,, texinfo, Texinfo: The GNU Documentation -Format}, to learn how to create an Info file from a Texinfo file. - -@xref{Installing an Info File,,, texinfo, Texinfo: The GNU -Documentation Format}, to learn how to install an Info file after you -have created one. - @node Index @unnumbered Index diff --git a/contrib/texinfo/doc/infokey.1 b/contrib/texinfo/doc/infokey.1 index fb8f4634f4..2ea37bfe48 100644 --- a/contrib/texinfo/doc/infokey.1 +++ b/contrib/texinfo/doc/infokey.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.34. -.TH INFOKEY "1" "December 2004" "infokey 4.8" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. +.TH INFOKEY "1" "September 2008" "infokey 4.13" "User Commands" .SH NAME infokey \- compile customizations for Info .SH SYNOPSIS @@ -23,10 +23,11 @@ Email bug reports to bug\-texinfo@gnu.org, general questions and discussion to help\-texinfo@gnu.org. Texinfo home page: http://www.gnu.org/software/texinfo/ .SH COPYRIGHT -Copyright \(co 2003 Free Software Foundation, Inc. -There is NO warranty. You may redistribute this software -under the terms of the GNU General Public License. -For more information about these matters, see the files named COPYING. +Copyright \(co 2008 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later +.br +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. .SH "SEE ALSO" The full documentation for .B infokey diff --git a/contrib/texinfo/doc/install-info.1 b/contrib/texinfo/doc/install-info.1 index 004d5d0f97..47ae5d7cc1 100644 --- a/contrib/texinfo/doc/install-info.1 +++ b/contrib/texinfo/doc/install-info.1 @@ -1,58 +1,108 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.34. -.TH INSTALL-INFO "1" "December 2004" "install-info 4.8" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. +.TH INSTALL-INFO "1" "September 2008" "install-info 4.13" "User Commands" .SH NAME install-info \- update info/dir entries .SH SYNOPSIS .B install-info [\fIOPTION\fR]... [\fIINFO-FILE \fR[\fIDIR-FILE\fR]] .SH DESCRIPTION -Install or delete dir entries from INFO\-FILE in the Info directory file -DIR\-FILE. +Add or remove entries in INFO\-FILE from the Info directory DIR\-FILE. .SH OPTIONS .TP +\fB\-\-debug\fR +report what is being done. +.TP \fB\-\-delete\fR delete existing entries for INFO\-FILE from DIR\-FILE; don't insert any new entries. .TP +\fB\-\-description\fR=\fITEXT\fR +the description of the entry is TEXT; used with +the \fB\-\-name\fR option to become synonymous with the +\fB\-\-entry\fR option. +.TP \fB\-\-dir\-file\fR=\fINAME\fR -specify file name of Info directory file. -This is equivalent to using the DIR\-FILE argument. +specify file name of Info directory file; +equivalent to using the DIR\-FILE argument. +.TP +\fB\-\-dry\-run\fR +same as \fB\-\-test\fR. .TP \fB\-\-entry\fR=\fITEXT\fR insert TEXT as an Info directory entry. -TEXT should have the form of an Info menu item line -plus zero or more extra lines starting with whitespace. -If you specify more than one entry, they are all added. +TEXT is written as an Info menu item line followed +.IP +by zero or more extra lines starting with whitespace. +.IP +If you specify more than one entry, all are added. If you don't specify any entries, they are determined +.IP from information in the Info file itself. +.IP +When removing, TEXT specifies the entry to remove. +TEXT is only removed as a last resort, if the +entry as determined from the Info file is not present, +and the basename of the Info file isn't found either. .TP \fB\-\-help\fR display this help and exit. .TP -\fB\-\-info\-file\fR=\fIFILE\fR -specify Info file to install in the directory. -This is equivalent to using the INFO\-FILE argument. -.TP \fB\-\-info\-dir\fR=\fIDIR\fR same as \fB\-\-dir\-file\fR=\fIDIR\fR/dir. .TP +\fB\-\-info\-file\fR=\fIFILE\fR +specify Info file to install in the directory; +equivalent to using the INFO\-FILE argument. +.TP \fB\-\-item\fR=\fITEXT\fR -same as \fB\-\-entry\fR TEXT. -An Info directory entry is actually a menu item. +same as \fB\-\-entry\fR=\fITEXT\fR. +.TP +\fB\-\-keep\-old\fR +do not replace entries, or remove empty sections. +.TP +\fB\-\-menuentry\fR=\fITEXT\fR +same as \fB\-\-name\fR=\fITEXT\fR. +.TP +\fB\-\-name\fR=\fITEXT\fR +the name of the entry is TEXT; used with \fB\-\-description\fR +to become synonymous with the \fB\-\-entry\fR option. +.TP +\fB\-\-no\-indent\fR +do not format new entries in the DIR file. .TP \fB\-\-quiet\fR suppress warnings. .TP +\fB\-\-regex\fR=\fIR\fR +put this file's entries in all sections that match the +regular expression R (ignoring case). +.TP \fB\-\-remove\fR same as \fB\-\-delete\fR. .TP +\fB\-\-remove\-exactly\fR +only remove if the info file name matches exactly; +suffixes such as .info and .gz are not ignored. +.TP \fB\-\-section\fR=\fISEC\fR -put this file's entries in section SEC of the directory. +put entries in section SEC of the directory. If you specify more than one section, all the entries +.IP are added in each of the sections. +.IP If you don't specify any sections, they are determined +.IP from information in the Info file itself. .TP +\fB\-\-section\fR R SEC +equivalent to \fB\-\-regex\fR=\fIR\fR \fB\-\-section\fR=\fISEC\fR \fB\-\-add\-once\fR. +.TP +\fB\-\-silent\fR +suppress warnings. +.TP +\fB\-\-test\fR +suppress updating of DIR\-FILE. +.TP \fB\-\-version\fR display version information and exit. .SH "REPORTING BUGS" @@ -60,10 +110,11 @@ Email bug reports to bug\-texinfo@gnu.org, general questions and discussion to help\-texinfo@gnu.org. Texinfo home page: http://www.gnu.org/software/texinfo/ .SH COPYRIGHT -Copyright \(co 2004 Free Software Foundation, Inc. -There is NO warranty. You may redistribute this software -under the terms of the GNU General Public License. -For more information about these matters, see the files named COPYING. +Copyright \(co 2008 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later +.br +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. .SH "SEE ALSO" The full documentation for .B install-info diff --git a/contrib/texinfo/doc/makeinfo.1 b/contrib/texinfo/doc/makeinfo.1 index 7b46491e0a..3753a0f523 100644 --- a/contrib/texinfo/doc/makeinfo.1 +++ b/contrib/texinfo/doc/makeinfo.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.34. -.TH MAKEINFO "1" "December 2004" "makeinfo 4.8" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. +.TH MAKEINFO "1" "September 2008" "makeinfo 4.13" "User Commands" .SH NAME makeinfo \- translate Texinfo documents .SH SYNOPSIS @@ -13,6 +13,9 @@ Info files suitable for reading online with Emacs or standalone GNU Info. \fB\-\-error\-limit\fR=\fINUM\fR quit after NUM errors (default 100). .TP +\fB\-\-document\-language\fR=\fISTR\fR locale to use in translating Texinfo keywords +for the output document (default C). +.TP \fB\-\-force\fR preserve output even if errors. .TP @@ -25,9 +28,6 @@ suppress node cross\-reference validation. \fB\-\-no\-warn\fR suppress warnings (but not errors). .TP -\fB\-\-reference\-limit\fR=\fINUM\fR -warn about at most NUM references (default 1000). -.TP \fB\-v\fR, \fB\-\-verbose\fR explain what is being done. .TP @@ -48,8 +48,8 @@ output Texinfo XML rather than Info. output plain text rather than Info. .SS "General output options:" .TP -\fB\-E\fR, \fB\-\-macro\-expand\fR FILE -output macro\-expanded source to FILE. +\fB\-E\fR, \fB\-\-macro\-expand\fR=\fIFILE\fR +output macro\-expanded source to FILE, ignoring any @setfilename. .TP \fB\-\-no\-headers\fR @@ -59,19 +59,22 @@ or from HTML (thus producing shorter output); also, write to standard output by default. .TP \fB\-\-no\-split\fR -suppress splitting of Info or HTML output, +suppress the splitting of Info or HTML output, generate only one output file. .TP \fB\-\-number\-sections\fR output chapter and sectioning numbers. .TP \fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR -output to FILE (directory if split HTML), +output to FILE (or directory if split HTML). .SS "Options for Info and plain text:" .TP +\fB\-\-disable\-encoding\fR +do not output accented and special characters +in Info output based on @documentencoding. +.TP \fB\-\-enable\-encoding\fR -output accented and special characters in -Info output based on @documentencoding. +override \fB\-\-disable\-encoding\fR (default). .TP \fB\-\-fill\-column\fR=\fINUM\fR break Info lines at NUM characters (default 72). @@ -79,9 +82,8 @@ break Info lines at NUM characters (default 72). \fB\-\-footnote\-style\fR=\fISTYLE\fR output footnotes in Info according to STYLE: `separate' to put them in their own node; -`end' to put them at the end of the node -.IP -in which they are defined (default). +`end' to put them at the end of the node, in +which they are defined (this is the default). .TP \fB\-\-paragraph\-indent\fR=\fIVAL\fR indent Info paragraphs by VAL spaces (default 3). @@ -95,6 +97,15 @@ split Info files at size NUM (default 300000). \fB\-\-css\-include\fR=\fIFILE\fR include FILE in HTML \n"); } - + if (css_ref) + add_word_args ("\n", + css_ref); + add_word ("\n\n"); if (title && !html_title_written && titlepage_cmd_present) @@ -395,7 +399,7 @@ escape_string (char *string) } } while (string[i++]); - free (string); + return newstring - newlen; } @@ -437,7 +441,9 @@ rollback_empty_tag (char *tag) int check_position = output_paragraph_offset; int taglen = strlen (tag); int rollback_happened = 0; - char *contents = ""; + char *contents = ""; /* FIXME (ptr to constant, later + assigned to malloc'd address). + */ char *contents_canon_white = ""; /* If output_paragraph is empty, we cannot rollback :-\ */ @@ -445,7 +451,7 @@ rollback_empty_tag (char *tag) return 0; /* Find the end of the previous tag. */ - while (output_paragraph[check_position-1] != '>' && check_position > 0) + while (check_position > 0 && output_paragraph[check_position-1] != '>') check_position--; /* Save stuff between tag's end to output_paragraph's end. */ @@ -462,7 +468,7 @@ rollback_empty_tag (char *tag) } /* Find the start of the previous tag. */ - while (output_paragraph[check_position-1] != '<' && check_position > 0) + while (check_position > 0 && output_paragraph[check_position-1] != '<') check_position--; /* Check to see if this is the tag. */ @@ -549,6 +555,7 @@ insert_html_tag_with_attribute (start_or_end, tag, format, va_alist) /* texinfo.tex doesn't support more than one font attribute at the same time. */ if ((start_or_end == START) && old_tag && *old_tag + && !STREQ (old_tag, "samp") && !rollback_empty_tag (old_tag)) add_word_args ("", old_tag); @@ -556,13 +563,13 @@ insert_html_tag_with_attribute (start_or_end, tag, format, va_alist) { if (start_or_end == START) add_word_args (format ? "<%s %s>" : "<%s>", tag, formatted_attribs); - else if (!rollback_empty_tag (tag)) + else if (STREQ (tag, "samp") || !rollback_empty_tag (tag)) /* Insert close tag only if we didn't rollback, in which case the opening tag is removed. */ add_word_args ("", tag); } - if ((start_or_end != START) && old_tag && *old_tag) + if ((start_or_end != START) && old_tag && *old_tag && !STREQ (old_tag, "samp")) add_word_args (strlen (old_attribs) > 0 ? "<%s %s>" : "<%s>", old_tag, old_attribs); @@ -577,17 +584,52 @@ insert_html_tag (int start_or_end, char *tag) /* Output an HTML to the filename for NODE, including the other string as extra attributes. */ + void add_link (char *nodename, char *attributes) { if (nodename) { + char *escaped_nodename; add_html_elt ("\n", nodename); + escaped_nodename = escape_string (nodename); + add_word_args ("\" title=\"%s\">\n", escaped_nodename); + if (escaped_nodename != nodename) + free (escaped_nodename); + } +} + +/* Copy a name with characters escaped as appropriate for an anchor + name, i.e., escape URL special characters with our _00hh convention. + (See the manual for details on the new scheme.) */ + +char * +escaped_anchor_name (const char *name) +{ + /* The factor 5 in the next allocation allows all chars to be expanded. */ + char *res = xmalloc (5 * strlen (name) + 1); + char *d = res; + + for (; *name; name++) + { + if (cr_or_whitespace (*name)) + *d++ = '-'; + else if (! URL_SAFE_CHAR (*name)) + { + sprintf (d, "_00%x", (unsigned char) *name); + /* do this manually since sprintf returns char * on + SunOS 4 and other old systems. */ + while (*d) + d++; + } + else + *d++ = *name; } + *d = 0; + return res; } /* Output NAME with characters escaped as appropriate for an anchor @@ -612,21 +654,21 @@ add_escaped_anchor_name (char *name, int old) have a nonletter. */ add_word ("g_t"); } - - for (; *name; name++) + if (!old) + { + char *expanded = escaped_anchor_name (name); + add_word (expanded); + free (expanded); + } + else for (; *name; name++) { if (cr_or_whitespace (*name)) add_char ('-'); - else if (!old && !URL_SAFE_CHAR (*name)) + else if (!URL_SAFE_CHAR (*name) && !OLD_URL_SAFE_CHAR (*name)) /* Cast so characters with the high bit set are treated as >128, - for example o-umlaut should be 246, not -10. */ - add_word_args ("_00%x", (unsigned char) *name); - - else if (old && !URL_SAFE_CHAR (*name) && !OLD_URL_SAFE_CHAR (*name)) - /* Different output convention, but still cast as above. */ + for example o-umlaut should be 246, not -10. */ add_word_args ("%%%x", (unsigned char) *name); - else add_char (*name); } @@ -653,10 +695,10 @@ add_anchor_name (char *nodename, int href) exact node on its file. This is so several nodes could share the same file, in case of file-name clashes, but also for more accurate browser positioning. */ - if (strcasecmp (nodename, "(dir)") == 0) + if (mbscasecmp (nodename, "(dir)") == 0) /* Strip the parens, but keep the original letter-case. */ add_word_args ("%.3s", nodename + 1); - else if (strcasecmp (nodename, "top") == 0) + else if (mbscasecmp (nodename, "top") == 0) add_word ("Top"); else add_escaped_anchor_name (nodename, href < 0); @@ -670,8 +712,10 @@ add_url_name (char *nodename, int href) add_nodename_to_filename (nodename, href); } -/* Convert non [A-Za-z0-9] to _00xx, where xx means the hexadecimal - representation of the ASCII character. Also convert spaces and +/* Convert non [A-Za-z0-9] characters depending on the command line options given. + If --transliterate-file-names is specified, these are replaced with their ASCII + phonetic transliteration. Otherwise, _00xx notation is used, where xx means the + hexadecimal representation of the ASCII character. Also convert spaces and newlines to dashes. */ static void fix_filename (char *filename) @@ -684,7 +728,11 @@ fix_filename (char *filename) for (i = 0; i < len; i++) { - if (cr_or_whitespace (oldname[i])) + const char *p = lang_transliterate_char (oldname[i]); + + if (p) + strcat (filename, p); + else if (cr_or_whitespace (oldname[i])) strcat (filename, "-"); else if (URL_SAFE_CHAR (oldname[i])) strncat (filename, (char *) oldname + i, 1); @@ -715,7 +763,7 @@ nodename_to_filename_1 (char *nodename, int href) char *filename; char dirname[PATH_MAX]; - if (strcasecmp (nodename, "Top") == 0) + if (mbscasecmp (nodename, "Top") == 0) { /* We want to convert references to the Top node into "index.html#Top". */ @@ -724,7 +772,7 @@ nodename_to_filename_1 (char *nodename, int href) else filename = xstrdup ("Top"); } - else if (strcasecmp (nodename, "(dir)") == 0) + else if (mbscasecmp (nodename, "(dir)") == 0) /* We want to convert references to the (dir) node into "../index.html". */ filename = xstrdup ("../index.html"); diff --git a/contrib/texinfo/makeinfo/html.h b/contrib/texinfo/makeinfo/html.h index d2b5411282..814be9e7e7 100644 --- a/contrib/texinfo/makeinfo/html.h +++ b/contrib/texinfo/makeinfo/html.h @@ -1,12 +1,13 @@ /* html.h -- declarations for html-related utilities. - $Id: html.h,v 1.6 2004/11/30 02:03:23 karl Exp $ + $Id: html.h,v 1.11 2008/05/19 18:26:48 karl Exp $ - Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2002, 2004, 2007, 2008 + Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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. + the Free Software Foundation, either version 3 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 @@ -14,8 +15,7 @@ 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. */ + along with this program. If not, see . */ #ifndef HTML_H #define HTML_H @@ -28,12 +28,13 @@ typedef struct hstack char *attribs; } HSTACK; -/* Nonzero if we have output the . */ -extern int html_output_head_p; - /* Nonzero if we have output a title, from @titlefont or @settitle. */ extern int html_title_written; +/* Filename to which to write list of index entries, and stream for them */ +extern char *internal_links_filename; +extern FILE *internal_links_stream; + /* Perform the output. */ extern void html_output_head (void); @@ -47,6 +48,7 @@ extern void insert_html_tag (int start_or_end, char *tag); extern void add_link (char *nodename, char *attributes); /* Escape URL-special characters. */ +extern char *escaped_anchor_name (const char *name); extern void add_escaped_anchor_name (char *name, int old); /* See html.c. */ diff --git a/contrib/texinfo/makeinfo/index.c b/contrib/texinfo/makeinfo/index.c index 710e8b6855..65d7484257 100644 --- a/contrib/texinfo/makeinfo/index.c +++ b/contrib/texinfo/makeinfo/index.c @@ -1,13 +1,13 @@ /* index.c -- indexing for Texinfo. - $Id: index.c,v 1.17 2004/11/30 02:03:23 karl Exp $ + $Id: index.c,v 1.27 2008/05/19 18:26:48 karl Exp $ - Copyright (C) 1998, 1999, 2002, 2003, 2004 Free Software Foundation, - Inc. + Copyright (C) 1998, 1999, 2002, 2003, 2004, 2007, 2008 + Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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. + the Free Software Foundation, either version 3 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 @@ -15,10 +15,10 @@ 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. */ + along with this program. If not, see . */ #include "system.h" +#include "mbswidth.h" #include "files.h" #include "footnote.h" #include "html.h" @@ -29,12 +29,8 @@ #include "toc.h" #include "xml.h" -INDEX_ALIST **name_index_alist = NULL; - -/* An array of pointers. Each one is for a different index. The - "synindex" command changes which array slot is pointed to by a - given "index". */ -INDEX_ELT **the_indices = NULL; +/* Nonzero means that we are in the middle of printing an index. */ +int printing_index = 0; /* The number of defined indices. */ int defined_indices = 0; @@ -46,12 +42,14 @@ int index_counter = 0; COMMAND **user_command_array = NULL; int user_command_array_len = 0; -/* How to compare index entries for sorting. May be set to strcoll. */ -int (*index_compare_fn) (const char *a, const char *b) = strcasecmp; +INDEX_ALIST **name_index_alist = NULL; + +/* An array of pointers. Each one is for a different index. The @synindex + command changes which array slot is pointed to by a given index. */ +static INDEX_ELT **the_indices = NULL; -/* Function to compare index entries for sorting. (Calls - `index_compare_fn' above.) */ -int index_element_compare (const void *element1, const void *element2); +/* How to compare index entries for sorting. May be set to strcoll. */ +static int (*index_compare_fn) (const char *a, const char *b) = mbscasecmp; /* Find which element in the known list of indices has this name. Returns -1 if NAME isn't found. */ @@ -260,7 +258,7 @@ index_add_arg (char *name) if (xml) xml_insert_indexterm (index_entry, name); } - + /* The function which user defined index commands call. */ static void gen_index (void) @@ -271,7 +269,7 @@ gen_index (void) index_add_arg (name); free (name); } - + /* Define an index known as NAME. We assign the slot number. If CODE is nonzero, make this a code index. */ static void @@ -503,8 +501,8 @@ cm_tindex (void) /* Data Type index. */ { index_add_arg ("tp"); } - -int + +static int index_element_compare (const void *element1, const void *element2) { INDEX_ELT **elt1 = (INDEX_ELT **) element1; @@ -653,11 +651,28 @@ sort_index (INDEX_ELT *index) return array; } + +/* Return the number of times that the byte CH occurs in the LEN bytes + starting at STR. Multibyte strings are not taken into account, which + is incorrect, but we need this for @tie; see more comments below. */ + +static int +count_strn_chars (const char *str, int len, int ch) +{ + int count = 0; + int i; + + for (i = 0; i < len; i++) + if (str[i] == ch) + count++; + + return count; +} static void insert_index_output_line_no (int line_number, int output_line_number_len) { - int last_column; + int last_column, out_line_no_width; int str_size = output_line_number_len + strlen (_("(line )")) + sizeof (NULL); char *out_line_no_str = (char *) xmalloc (str_size + 1); @@ -673,16 +688,20 @@ insert_index_output_line_no (int line_number, int output_line_number_len) int i = output_paragraph_offset; while (0 < i && output_paragraph[i-1] != '\n') i--; - last_column = output_paragraph_offset - i; + last_column = mbsnwidth ((char *)(output_paragraph + i), + output_paragraph_offset - i, 0); + last_column += count_strn_chars (output_paragraph + i, + output_paragraph_offset - i, NON_BREAKING_SPACE); } - if (last_column + strlen (out_line_no_str) > fill_column) + out_line_no_width = mbswidth (out_line_no_str, 0); + if (last_column + out_line_no_width > fill_column) { insert ('\n'); last_column = 0; } - while (last_column + strlen (out_line_no_str) < fill_column) + while (last_column + out_line_no_width < fill_column) { insert (' '); last_column++; @@ -693,10 +712,7 @@ insert_index_output_line_no (int line_number, int output_line_number_len) free (out_line_no_str); } - -/* Nonzero means that we are in the middle of printing an index. */ -int printing_index = 0; - + /* Takes one arg, a short name of an index to print. Outputs a menu of the sorted elements of the index. */ void @@ -711,10 +727,11 @@ cm_printindex (void) if (!handling_delayed_writes) line_number--; - if (xml && !docbook) + if (xml) { xml_insert_element (PRINTINDEX, START); - insert_string (index_name); + if (! docbook) + insert_string (index_name); xml_insert_element (PRINTINDEX, END); } else if (!handling_delayed_writes) @@ -723,9 +740,6 @@ cm_printindex (void) char *index_command = xmalloc (command_len + 1); close_paragraph (); - if (docbook) - xml_begin_index (); - sprintf (index_command, "@%s %s", command, index_name); register_delayed_write (index_command); free (index_command); @@ -743,6 +757,7 @@ cm_printindex (void) int saved_line_number = line_number; char *saved_input_filename = input_filename; unsigned output_line_number_len; + FILE *saved_output_stream = output_stream; index = index_list (index_name); if (index == (INDEX_ELT *)-1) @@ -866,18 +881,27 @@ cm_printindex (void) add_word_args ("#%s", index_node); add_html_block_elt (""); + + if (internal_links_stream) + { + char *escaped = escaped_anchor_name (index->entry_text); + fprintf (internal_links_stream, "%s#index-%s-%d\t%s\t%s\n", + (splitting && index->output_file) ? index->output_file : "", + escaped, index->entry_number, index_name, + index->entry_text); + free (escaped); + } } else if (xml && docbook) { - /* In the DocBook case, the expanded index entry is not - good for us, since it was expanded for non-DocBook mode - inside sort_index. So we send the original entry text - to be used with execute_string. */ - xml_insert_indexentry (index->entry_text, index_node); + /* Let DocBook processor generate the index. */ } else { - unsigned new_length = strlen (index->entry); +#define MIN_ENTRY_COLUMNS 37 + /* Make sure there is enough space even if index->entry has zero + width. */ + unsigned new_length = strlen (index->entry) + MIN_ENTRY_COLUMNS; if (new_length < 50) /* minimum length used below */ new_length = 50; @@ -894,10 +918,25 @@ cm_printindex (void) @@ has turned into @. */ if (!no_headers) { - sprintf (line, "* %-37s ", index->entry); + int nspaces; + int width = mbswidth (index->entry, 0); + + /* Unfortunately, our @tie{} / @w{ } magic is an + unprintable character, and so mbswidth doesn't + count it. If that byte value occurs in a multibyte + string, we'd lose, but at least it's only a + question of minor formatting, not functionality. */ + width += count_strn_chars (index->entry, + strlen (index->entry), NON_BREAKING_SPACE); + + nspaces = -(strlen (index->entry) + + (MIN_ENTRY_COLUMNS - width)); + sprintf (line, "* %*s ", + width < MIN_ENTRY_COLUMNS ? nspaces : 0, + index->entry); line[2 + strlen (index->entry)] = ':'; insert_string (line); - /* Make sure any non-macros in the node name are expanded. */ + /* Expand any non-macros in the node name. */ in_fixed_width_font++; execute_string ("%s. ", index_node); insert_index_output_line_no (index->output_line, @@ -910,7 +949,8 @@ cm_printindex (void) there's little sense in referring to them in the index. Instead, output the number or name of the section that corresponds to that node. */ - sprintf (line, "%-*s ", number_sections ? 46 : 1, index->entry); + sprintf (line, "%-*s ", number_sections ? 46 : 1, + index->entry); line[strlen (index->entry)] = ':'; insert_string (line); diff --git a/contrib/texinfo/makeinfo/index.h b/contrib/texinfo/makeinfo/index.h index 3ff723daa1..1e7810720e 100644 --- a/contrib/texinfo/makeinfo/index.h +++ b/contrib/texinfo/makeinfo/index.h @@ -1,12 +1,12 @@ /* index.h -- declarations for index.c. - $Id: index.h,v 1.2 2004/04/11 17:56:47 karl Exp $ + $Id: index.h,v 1.6 2007/09/26 20:53:40 karl Exp $ - Copyright (C) 1998, 99 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2007 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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. + the Free Software Foundation, either version 3 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 @@ -14,8 +14,7 @@ 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. */ + along with this program. If not, see . */ #ifndef INDEX_H #define INDEX_H @@ -23,6 +22,10 @@ #include "makeinfo.h" #include "cmds.h" +extern int printing_index; +extern int defined_indices; +extern int index_counter; + /* User commands are only new indices. (Macros are handled separately.) */ extern COMMAND **user_command_array; extern int user_command_array_len; @@ -84,10 +87,6 @@ extern INDEX_ALIST **name_index_alist; /* Initialize all indices. */ extern void init_indices (void); -extern int defined_indices; -extern int printing_index; -extern int index_counter; - INDEX_ELT *index_list (char *name); #endif /* !INDEX_H */ diff --git a/contrib/texinfo/makeinfo/insertion.c b/contrib/texinfo/makeinfo/insertion.c index 05a20440eb..9928115f6a 100644 --- a/contrib/texinfo/makeinfo/insertion.c +++ b/contrib/texinfo/makeinfo/insertion.c @@ -1,13 +1,13 @@ /* insertion.c -- insertions for Texinfo. - $Id: insertion.c,v 1.55 2004/11/11 18:34:28 karl Exp $ + $Id: insertion.c,v 1.71 2008/04/09 17:31:10 karl Exp $ - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software - Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007, 2008 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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. + the Free Software Foundation, either version 3 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 @@ -15,8 +15,7 @@ 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. */ + along with this program. If not, see . */ #include "system.h" #include "cmds.h" @@ -79,6 +78,8 @@ static int raw_output_block = 0; /* Non-zero if a
element has a
element in it. We use this when deciding whether to insert a
or not. */ static int html_deflist_has_term = 0; + +const char default_item_function[] = { "@bullet" }; void init_insertion_stack (void) @@ -142,7 +143,7 @@ current_item_function (void) change it to "@ ", since "@" by itself is not a command. This makes "@ ", "@\t", and "@\n" all the same, but their default meanings are the same anyway, and let's not worry about supporting redefining them. */ -static char * +char * get_item_function (void) { char *item_function; @@ -209,7 +210,10 @@ pop_insertion (void) inhibit_paragraph_indentation = temp->inhibited; filling_enabled = temp->filling_enabled; indented_fill = temp->indented_fill; - free_and_clear (&(temp->item_function)); + if (temp->item_function == default_item_function) + temp->item_function = NULL; + else + free_and_clear (&(temp->item_function)); free_and_clear (&(temp->filename)); insertion_stack = insertion_stack->next; free (temp); @@ -370,7 +374,7 @@ enumerate_item (void) else sprintf (temp, "%d. ", current_enumval); - indent (output_column += (current_indent - strlen (temp))); + indent (current_output_column () + (current_indent - strlen (temp))); add_word (temp); current_enumval++; } @@ -472,7 +476,7 @@ begin_insertion (enum insertion_type type) if (xml) { xml_insert_element (DETAILMENU, START); - skip_whitespace_and_newlines(); + skip_whitespace_and_newlines (); } else in_fixed_width_font++; @@ -484,7 +488,12 @@ begin_insertion (enum insertion_type type) close_single_paragraph (); filling_enabled = no_indent = 0; inhibit_paragraph_indentation = 1; - insert_string ("START-INFO-DIR-ENTRY\n"); + add_word ("START-INFO-DIR-ENTRY\n"); + + /* The zsh manual, maybe others, wrongly indents the * line of the + direntry in the source. Ignore that whitespace. */ + skip_whitespace_and_newlines (); + no_discard++; break; case documentdescription: @@ -522,7 +531,7 @@ begin_insertion (enum insertion_type type) output it right away since xml output is never split. For html, we output it specifically in html_output_head. For plain text, there's no way to hide it, so the author must - use @insertcopying in the desired location. */ + use @insertcopying in the desired location. */ if (docbook) { if (!xml_in_bookinfo) @@ -538,7 +547,6 @@ begin_insertion (enum insertion_type type) if (docbook) xml_insert_element (LEGALNOTICE, END); - break; case quotation: @@ -553,8 +561,8 @@ begin_insertion (enum insertion_type type) last_char_was_newline = no_indent = 0; indented_fill = filling_enabled = 1; inhibit_paragraph_indentation = 1; + current_indent += default_indentation_increment; } - current_indent += default_indentation_increment; if (xml) xml_insert_quotation (insertion_stack->item_function, START); else if (strlen(insertion_stack->item_function)) @@ -622,7 +630,7 @@ begin_insertion (enum insertion_type type) if (!(*insertion_stack->item_function)) { free (insertion_stack->item_function); - insertion_stack->item_function = xstrdup ("@bullet"); + insertion_stack->item_function = (char *) default_item_function; } } @@ -955,9 +963,9 @@ begin_insertion (enum insertion_type type) of the stack. Otherwise, if TYPE doesn't match the top of the insertion stack, give error. */ static void -end_insertion (int type) +end_insertion (enum insertion_type type) { - int temp_type; + enum insertion_type temp_type; if (!insertion_level) return; @@ -1082,7 +1090,9 @@ end_insertion (int type) xml_keep_space--; } - if ((xml || html) && output_paragraph[output_paragraph_offset-1] == '\n') + if ((xml || html) + && output_paragraph_offset > 0 + && output_paragraph[output_paragraph_offset-1] == '\n') output_paragraph_offset--; break; @@ -1211,7 +1221,7 @@ end_insertion (int type) without a change in indentation. */ if (type != format && type != smallformat && type != quotation) current_indent -= example_indentation_increment; - else if (type == quotation) + else if (type == quotation && !html) current_indent -= default_indentation_increment; if (html) @@ -1219,8 +1229,10 @@ end_insertion (int type) does not function here, since we've inserted non-whitespace (the ) before it. The indentation already got inserted at the end of the last example line, so we have to - delete it, or browsers wind up showing an extra blank line. */ - kill_self_indent (default_indentation_increment); + delete it, or browsers wind up showing an extra blank line. + Furthermore, if we're inside indented environments, we + might have arbitrarily much indentation, so remove it all. */ + kill_self_indent (-1); add_html_block_elt (type == quotation ? "\n" : "\n"); } @@ -1361,7 +1373,8 @@ cm_example (void) { /* Rollback previous newlines. These occur between and . */ - if (output_paragraph[output_paragraph_offset-1] == '\n') + if (output_paragraph_offset > 0 + && output_paragraph[output_paragraph_offset-1] == '\n') output_paragraph_offset--; xml_insert_element (EXAMPLE, START); @@ -1384,7 +1397,8 @@ cm_smallexample (void) if (xml) { /* See cm_example comments about newlines. */ - if (output_paragraph[output_paragraph_offset-1] == '\n') + if (output_paragraph_offset > 0 + && output_paragraph[output_paragraph_offset-1] == '\n') output_paragraph_offset--; xml_insert_element (SMALLEXAMPLE, START); if (docbook) @@ -1403,7 +1417,8 @@ cm_lisp (void) if (xml) { /* See cm_example comments about newlines. */ - if (output_paragraph[output_paragraph_offset-1] == '\n') + if (output_paragraph_offset > 0 + && output_paragraph[output_paragraph_offset-1] == '\n') output_paragraph_offset--; xml_insert_element (LISP, START); if (docbook) @@ -1422,7 +1437,8 @@ cm_smalllisp (void) if (xml) { /* See cm_example comments about newlines. */ - if (output_paragraph[output_paragraph_offset-1] == '\n') + if (output_paragraph_offset > 0 + && output_paragraph[output_paragraph_offset-1] == '\n') output_paragraph_offset--; xml_insert_element (SMALLLISP, START); if (docbook) @@ -1459,6 +1475,12 @@ cm_insert_copying (void) return; } + /* It is desirable that @copying is set early in the input file. For + Info output, we write the copying text out right away, and thus it + may well be the first thing in the output, and we want the file + header first. The special case in add_char has to check for + executing_string, so it won't be effective. Thus, do it explicitly. */ + output_head (); execute_string ("%s", copying_text); if (!xml && !html) @@ -1483,7 +1505,8 @@ cm_format (void) else { /* See cm_example comments about newlines. */ - if (output_paragraph[output_paragraph_offset-1] == '\n') + if (output_paragraph_offset > 0 + && output_paragraph[output_paragraph_offset-1] == '\n') output_paragraph_offset--; xml_insert_element (FORMAT, START); if (docbook) @@ -1499,7 +1522,8 @@ cm_smallformat (void) if (xml) { /* See cm_example comments about newlines. */ - if (output_paragraph[output_paragraph_offset-1] == '\n') + if (output_paragraph_offset > 0 + && output_paragraph[output_paragraph_offset-1] == '\n') output_paragraph_offset--; xml_insert_element (SMALLFORMAT, START); if (docbook) @@ -1515,7 +1539,8 @@ cm_display (void) if (xml) { /* See cm_example comments about newlines. */ - if (output_paragraph[output_paragraph_offset-1] == '\n') + if (output_paragraph_offset > 0 + && output_paragraph[output_paragraph_offset-1] == '\n') output_paragraph_offset--; xml_insert_element (DISPLAY, START); if (docbook) @@ -1531,7 +1556,8 @@ cm_smalldisplay (void) if (xml) { /* See cm_example comments about newlines. */ - if (output_paragraph[output_paragraph_offset-1] == '\n') + if (output_paragraph_offset > 0 + && output_paragraph[output_paragraph_offset-1] == '\n') output_paragraph_offset--; xml_insert_element (SMALLDISPLAY, START); if (docbook) @@ -1576,7 +1602,7 @@ cm_itemize (void) /* 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) +do_enumeration (enum insertion_type type, char *default_string) { get_until_in_line (0, ".", &enumeration_arg); canon_white (enumeration_arg); @@ -1608,14 +1634,20 @@ cm_enumerate (void) do_enumeration (enumerate, "1"); } -/* Handle verbatim environment: + + +/* 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. */ + No indentation is inserted: this is verbatim after all. + If you want indentation, enclose @verbatim in @example. + + Thus, we cannot simply copy the input to the output, since the + verbatim environment may be encapsulated in an @example environment, + for example. */ + void handle_verbatim_environment (int find_end_verbatim) { @@ -1623,7 +1655,6 @@ handle_verbatim_environment (int find_end_verbatim) 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 */ @@ -1632,11 +1663,6 @@ handle_verbatim_environment (int find_end_verbatim) 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 @@ -1651,10 +1677,15 @@ handle_verbatim_environment (int find_end_verbatim) else if (xml) { xml_insert_element (VERBATIM, START); - escape_html = 0; - add_word (""); xml_insert_element (VERBATIM, END); - escape_html = save_escape_html; } in_fixed_width_font--; @@ -2054,7 +2083,7 @@ void cm_end (void) { char *temp; - int type; + enum insertion_type type; get_rest_of_line (0, &temp); @@ -2194,8 +2223,7 @@ cm_item (void) if (current_item_function ()) { - output_column = current_indent - 2; - indent (output_column); + indent (current_indent - 2); /* The item marker can be given with or without braces -- @bullet and @bullet{} are both ok. @@ -2214,7 +2242,6 @@ cm_item (void) execute_string ("%s", item_func); } insert (' '); - output_column++; } else enumerate_item (); diff --git a/contrib/texinfo/makeinfo/insertion.h b/contrib/texinfo/makeinfo/insertion.h index ace55716f2..75e5468d90 100644 --- a/contrib/texinfo/makeinfo/insertion.h +++ b/contrib/texinfo/makeinfo/insertion.h @@ -1,12 +1,13 @@ /* insertion.h -- declarations for insertion.c. - $Id: insertion.h,v 1.10 2004/04/11 17:56:47 karl Exp $ + $Id: insertion.h,v 1.15 2008/01/31 18:33:27 karl Exp $ - Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2001, 2002, 2003, 2007, 2008 + Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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. + the Free Software Foundation, either version 3 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 @@ -14,8 +15,7 @@ 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. */ + along with this program. If not, see . */ #ifndef INSERTION_H #define INSERTION_H @@ -35,6 +35,8 @@ enum insertion_type table, tex, vtable, titlepage, bad_type }; +extern const char default_item_function[]; + typedef struct istack_elt { struct istack_elt *next; @@ -75,4 +77,6 @@ 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); + +extern char *get_item_function (void); #endif /* !INSERTION_H */ diff --git a/contrib/texinfo/makeinfo/lang.c b/contrib/texinfo/makeinfo/lang.c index c72e8dbc63..a56cb617e5 100644 --- a/contrib/texinfo/makeinfo/lang.c +++ b/contrib/texinfo/makeinfo/lang.c @@ -1,13 +1,13 @@ /* lang.c -- language-dependent support. - $Id: lang.c,v 1.14 2004/11/22 23:57:33 karl Exp $ + $Id: lang.c,v 1.34 2007/12/03 01:38:43 karl Exp $ - Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software - Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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. + the Free Software Foundation, either version 3 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 @@ -15,8 +15,7 @@ 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. + along with this program. If not, see . Originally written by Karl Heinz Marbaise . */ @@ -27,16 +26,21 @@ #include "makeinfo.h" #include "xml.h" +#include + /* Current document encoding. */ encoding_code_type document_encoding_code = no_encoding; /* Current language code; default is English. */ language_code_type language_code = en; +/* Language to use for translations that end up in the output. */ +char *document_language = "C"; + /* 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 */ +static iso_map_type asis_map [] = {{NULL, 0, 0}}; /* ASCII, etc. */ /* Translation table between HTML and ISO Codes. The last item is hopefully the Unicode. It might be possible that those Unicodes are @@ -74,79 +78,79 @@ static iso_map_type iso8859_1_map [] = { { "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 }, + { "Agrave", 0xC0, 0x00C0, "A" }, + { "Aacute", 0xC1, 0x00C1, "A" }, + { "Acirc", 0xC2, 0x00C2, "A" }, + { "Atilde", 0xC3, 0x00C3, "A" }, + { "Auml", 0xC4, 0x00C4, "A" }, + { "Aring", 0xC5, 0x00C5, "AA" }, + { "AElig", 0xC6, 0x00C6, "AE" }, + { "Ccedil", 0xC7, 0x00C7, "C" }, + { "Ccedil", 0xC7, 0x00C7, "C" }, + { "Egrave", 0xC8, 0x00C8, "E" }, + { "Eacute", 0xC9, 0x00C9, "E" }, + { "Ecirc", 0xCA, 0x00CA, "E" }, + { "Euml", 0xCB, 0x00CB, "E" }, + { "Igrave", 0xCC, 0x00CC, "I" }, + { "Iacute", 0xCD, 0x00CD, "I" }, + { "Icirc", 0xCE, 0x00CE, "I" }, + { "Iuml", 0xCF, 0x00CF, "I" }, + { "ETH", 0xD0, 0x00D0, "DH" }, + { "Ntilde", 0xD1, 0x00D1, "N" }, + { "Ograve", 0xD2, 0x00D2, "O" }, + { "Oacute", 0xD3, 0x00D3, "O" }, + { "Ocirc", 0xD4, 0x00D4, "O" }, + { "Otilde", 0xD5, 0x00D5, "O" }, + { "Ouml", 0xD6, 0x00D6, "O" }, { "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 }, + { "Oslash", 0xD8, 0x00D8, "OE" }, + { "Ugrave", 0xD9, 0x00D9, "U" }, + { "Uacute", 0xDA, 0x00DA, "U" }, + { "Ucirc", 0xDB, 0x00DB, "U" }, + { "Uuml", 0xDC, 0x00DC, "U" }, + { "Yacute", 0xDD, 0x00DD, "Y" }, + { "THORN", 0xDE, 0x00DE, "TH" }, + { "szlig", 0xDF, 0x00DF, "s" }, + { "agrave", 0xE0, 0x00E0, "a" }, + { "aacute", 0xE1, 0x00E1, "a" }, + { "acirc", 0xE2, 0x00E2, "a" }, + { "atilde", 0xE3, 0x00E3, "a" }, + { "auml", 0xE4, 0x00E4, "a" }, + { "aring", 0xE5, 0x00E5, "aa" }, + { "aelig", 0xE6, 0x00E6, "ae" }, + { "ccedil", 0xE7, 0x00E7, "c" }, + { "egrave", 0xE8, 0x00E8, "e" }, + { "eacute", 0xE9, 0x00E9, "e" }, + { "ecirc", 0xEA, 0x00EA, "e" }, + { "euml", 0xEB, 0x00EB, "e" }, + { "igrave", 0xEC, 0x00EC, "i" }, + { "iacute", 0xED, 0x00ED, "i" }, + { "icirc", 0xEE, 0x00EE, "i" }, + { "iuml", 0xEF, 0x00EF, "i" }, + { "eth", 0xF0, 0x00F0, "dh" }, + { "ntilde", 0xF1, 0x00F1, "n" }, + { "ograve", 0xF2, 0x00F2, "o"}, + { "oacute", 0xF3, 0x00F3, "o" }, + { "ocirc", 0xF4, 0x00F4, "o" }, + { "otilde", 0xF5, 0x00F5, "o" }, + { "ouml", 0xF6, 0x00F6, "o" }, { "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 }, + { "oslash", 0xF8, 0x00F8, "oe" }, + { "ugrave", 0xF9, 0x00F9, "u" }, + { "uacute", 0xFA, 0x00FA, "u" }, + { "ucirc", 0xFB, 0x00FB, "u" }, + { "uuml", 0xFC, 0x00FC, "u" }, + { "yacute", 0xFD, 0x00FD, "y" }, + { "thorn", 0xFE, 0x00FE, "th" }, + { "yuml", 0xFF, 0x00FF, "y" }, { 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. + explanation and listing, summarized here. The names here are + abbreviated to fit in a decent line length. code position dec oct hex latin1 latin1 name latin9 latin9 name @@ -168,9 +172,9 @@ static iso_map_type iso8859_15_map [] = { { "pound", 0xA3, 0x00A3 }, { "euro", 0xA4, 0x20AC }, { "yen", 0xA5, 0x00A5 }, - { "Scaron", 0xA6, 0x0160 }, + { "Scaron", 0xA6, 0x0160, "S" }, { "sect", 0xA7, 0x00A7 }, - { "scaron", 0xA8, 0x0161 }, + { "scaron", 0xA8, 0x0161, "s" }, { "copy", 0xA9, 0x00A9 }, { "ordf", 0xAA, 0x00AA }, { "laquo", 0xAB, 0x00AB }, @@ -182,83 +186,82 @@ static iso_map_type iso8859_15_map [] = { { "plusmn", 0xB1, 0x00B1 }, { "sup2", 0xB2, 0x00B2 }, { "sup3", 0xB3, 0x00B3 }, - { "Zcaron", 0xB4, 0x017D }, + { "Zcaron", 0xB4, 0x017D, "Z" }, { "micro", 0xB5, 0x00B5 }, { "para", 0xB6, 0x00B6 }, { "middot", 0xB7, 0x00B7 }, - { "zcaron", 0xB8, 0x017E }, + { "zcaron", 0xB8, 0x017E, "z" }, { "sup1", 0xB9, 0x00B9 }, { "ordm", 0xBA, 0x00BA }, { "raquo", 0xBB, 0x00BB }, - { "OElig", 0xBC, 0x0152 }, - { "oelig", 0xBD, 0x0153 }, - { "Yuml", 0xBE, 0x0178 }, + { "OElig", 0xBC, 0x0152, "OE" }, + { "oelig", 0xBD, 0x0153, "oe" }, + { "Yuml", 0xBE, 0x0178, "y" }, { "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 }, + { "Agrave", 0xC0, 0x00C0, "A" }, + { "Aacute", 0xC1, 0x00C1, "A" }, + { "Acirc", 0xC2, 0x00C2, "A" }, + { "Atilde", 0xC3, 0x00C3, "A" }, + { "Auml", 0xC4, 0x00C4, "A" }, + { "Aring", 0xC5, 0x00C5, "AA" }, + { "AElig", 0xC6, 0x00C6, "AE" }, + { "Ccedil", 0xC7, 0x00C7, "C" }, + { "Egrave", 0xC8, 0x00C8, "E" }, + { "Eacute", 0xC9, 0x00C9, "E" }, + { "Ecirc", 0xCA, 0x00CA, "E" }, + { "Euml", 0xCB, 0x00CB, "E" }, + { "Igrave", 0xCC, 0x00CC, "I" }, + { "Iacute", 0xCD, 0x00CD, "I" }, + { "Icirc", 0xCE, 0x00CE, "I" }, + { "Iuml", 0xCF, 0x00CF, "I" }, + { "ETH", 0xD0, 0x00D0, "DH" }, + { "Ntilde", 0xD1, 0x00D1, "N" }, + { "Ograve", 0xD2, 0x00D2, "O" }, + { "Oacute", 0xD3, 0x00D3, "O" }, + { "Ocirc", 0xD4, 0x00D4, "O" }, + { "Otilde", 0xD5, 0x00D5, "O" }, + { "Ouml", 0xD6, 0x00D6, "O" }, { "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 }, + { "Oslash", 0xD8, 0x00D8, "OE" }, + { "Ugrave", 0xD9, 0x00D9, "U" }, + { "Uacute", 0xDA, 0x00DA, "U" }, + { "Ucirc", 0xDB, 0x00DB, "U" }, + { "Uuml", 0xDC, 0x00DC, "U" }, + { "Yacute", 0xDD, 0x00DD, "Y" }, + { "THORN", 0xDE, 0x00DE, "TH" }, + { "szlig", 0xDF, 0x00DF, "s" }, + { "agrave", 0xE0, 0x00E0, "a" }, + { "aacute", 0xE1, 0x00E1, "a" }, + { "acirc", 0xE2, 0x00E2, "a" }, + { "atilde", 0xE3, 0x00E3, "a" }, + { "auml", 0xE4, 0x00E4, "a" }, + { "aring", 0xE5, 0x00E5, "aa" }, + { "aelig", 0xE6, 0x00E6, "ae" }, + { "ccedil", 0xE7, 0x00E7, "c" }, + { "egrave", 0xE8, 0x00E8, "e" }, + { "eacute", 0xE9, 0x00E9, "e" }, + { "ecirc", 0xEA, 0x00EA, "e" }, + { "euml", 0xEB, 0x00EB, "e" }, + { "igrave", 0xEC, 0x00EC, "i" }, + { "iacute", 0xED, 0x00ED, "i" }, + { "icirc", 0xEE, 0x00EE, "i" }, + { "iuml", 0xEF, 0x00EF, "i" }, + { "eth", 0xF0, 0x00F0, "d" }, + { "ntilde", 0xF1, 0x00F1, "n" }, + { "ograve", 0xF2, 0x00F2, "o" }, + { "oacute", 0xF3, 0x00F3, "o" }, + { "ocirc", 0xF4, 0x00F4, "o" }, + { "otilde", 0xF5, 0x00F5, "o" }, + { "ouml", 0xF6, 0x00F6, "o" }, { "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 }, + { "oslash", 0xF8, 0x00F8, "oe" }, + { "ugrave", 0xF9, 0x00F9, "u" }, + { "uacute", 0xFA, 0x00FA, "u" }, + { "ucirc", 0xFB, 0x00FB, "u" }, + { "uuml", 0xFC, 0x00FC, "u" }, + { "yacute", 0xFD, 0x00FD, "y" }, + { "thorn", 0xFE, 0x00FE, "th" }, + { "yuml", 0xFF, 0x00FF, "y" }, { NULL, 0, 0 } }; @@ -277,7 +280,7 @@ static iso_map_type iso8859_15_map [] = { including the character table!!! (must see!) * ISO 8859-2 and even HTML entities !!! (must see!) - http://people.ssh.fi/mtr/genscript/88592.txt + 88592.txt in the GNU enscript distribution * (minor) http://www.agh.edu.pl/ogonki/plchars.html One more table, this time it includes even information about Polish @@ -286,107 +289,186 @@ static iso_map_type iso8859_15_map [] = { static iso_map_type iso8859_2_map [] = { { "nbsp", 0xA0, 0x00A0 }, /* NO-BREAK SPACE */ - { "", 0xA1, 0x0104 }, /* LATIN CAPITAL LETTER A WITH OGONEK */ + { "", 0xA1, 0x0104, "A" }, /* LATIN CAPITAL LETTER A WITH OGONEK */ { "", 0xA2, 0x02D8 }, /* BREVE */ - { "", 0xA3, 0x0141 }, /* LATIN CAPITAL LETTER L WITH STROKE */ + { "", 0xA3, 0x0141, "L" }, /* 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 */ + { "", 0xA5, 0x013D, "L" }, /* LATIN CAPITAL LETTER L WITH CARON */ + { "", 0xA6, 0x015A, "S" }, /* 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 */ + { "#xa9", 0xA9, 0x0160, "S" }, /* LATIN CAPITAL LETTER S WITH CARON */ + { "", 0xAA, 0x015E, "S" }, /* LATIN CAPITAL LETTER S WITH CEDILLA */ + { "", 0xAB, 0x0164, "T" }, /* LATIN CAPITAL LETTER T WITH CARON */ + { "", 0xAC, 0x0179, "Z" }, /* 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 */ + { "", 0xAE, 0x017D, "Z" }, /* LATIN CAPITAL LETTER Z WITH CARON */ + { "", 0xAF, 0x017B, "Z" }, /* LATIN CAPITAL LETTER Z WITH DOT ABOVE */ { "deg", 0xB0, 0x00B0 }, /* DEGREE SIGN */ - { "", 0xB1, 0x0105 }, /* LATIN SMALL LETTER A WITH OGONEK */ + { "", 0xB1, 0x0105, "a" }, /* LATIN SMALL LETTER A WITH OGONEK */ { "", 0xB2, 0x02DB }, /* OGONEK */ - { "", 0xB3, 0x0142 }, /* LATIN SMALL LETTER L WITH STROKE */ + { "", 0xB3, 0x0142, "l" }, /* 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 */ + { "", 0xB5, 0x013E, "l" }, /* LATIN SMALL LETTER L WITH CARON */ + { "", 0xB6, 0x015B, "s" }, /* 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 */ + { "", 0xB9, 0x0161, "s" }, /* LATIN SMALL LETTER S WITH CARON */ + { "", 0xBA, 0x015F, "s" }, /* LATIN SMALL LETTER S WITH CEDILLA */ + { "", 0xBB, 0x0165, "t" }, /* LATIN SMALL LETTER T WITH CARON */ + { "", 0xBC, 0x017A, "z" }, /* 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 */ + { "", 0xBE, 0x017E, "z" }, /* LATIN SMALL LETTER Z WITH CARON */ + { "", 0xBF, 0x017C, "z" }, /* LATIN SMALL LETTER Z WITH DOT ABOVE */ + { "", 0xC0, 0x0154, "R" }, /* LATIN CAPITAL LETTER R WITH ACUTE */ + { "Aacute", 0xC1, 0x00C1, "A" }, /* LATIN CAPITAL LETTER A WITH ACUTE */ + { "Acirc", 0xC2, 0x00C2, "A" }, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ + { "", 0xC3, 0x0102, "A" }, /* LATIN CAPITAL LETTER A WITH BREVE */ + { "Auml", 0xC4, 0x00C4, "A" }, /* LATIN CAPITAL LETTER A WITH DIAERESIS */ + { "", 0xC5, 0x0139, "L" }, /* LATIN CAPITAL LETTER L WITH ACUTE */ + { "", 0xC6, 0x0106, "C" }, /* LATIN CAPITAL LETTER C WITH ACUTE */ + { "Ccedil", 0xC7, 0x00C7, "C" }, /* LATIN CAPITAL LETTER C WITH CEDILLA */ + { "", 0xC8, 0x010C, "C" }, /* LATIN CAPITAL LETTER C WITH CARON */ + { "Eacute", 0xC9, 0x00C9, "E" }, /* LATIN CAPITAL LETTER E WITH ACUTE */ + { "", 0xCA, 0x0118, "E" }, /* LATIN CAPITAL LETTER E WITH OGONEK */ + { "Euml", 0xCB, 0x00CB, "E" }, /* LATIN CAPITAL LETTER E WITH DIAERESIS */ + { "", 0xCC, 0x011A, "E" }, /* LATIN CAPITAL LETTER E WITH CARON */ + { "Iacute", 0xCD, 0x00CD, "I" }, /* LATIN CAPITAL LETTER I WITH ACUTE */ + { "Icirc", 0xCE, 0x00CE, "I" }, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ + { "", 0xCF, 0x010E, "D" }, /* LATIN CAPITAL LETTER D WITH CARON */ + { "ETH", 0xD0, 0x0110, "D" }, /* LATIN CAPITAL LETTER D WITH STROKE */ + { "", 0xD1, 0x0143, "N" }, /* LATIN CAPITAL LETTER N WITH ACUTE */ + { "", 0xD2, 0x0147, "N" }, /* LATIN CAPITAL LETTER N WITH CARON */ + { "Oacute", 0xD3, 0x00D3, "O" }, /* LATIN CAPITAL LETTER O WITH ACUTE */ + { "Ocirc", 0xD4, 0x00D4, "O" }, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ + { "", 0xD5, 0x0150, "O" }, /* LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */ + { "Ouml", 0xD6, 0x00D6, "O" }, /* 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 */ + { "", 0xD8, 0x0158, "R" }, /* LATIN CAPITAL LETTER R WITH CARON */ + { "", 0xD9, 0x016E, "U" }, /* LATIN CAPITAL LETTER U WITH RING ABOVE */ + { "Uacute", 0xDA, 0x00DA, "U" }, /* LATIN CAPITAL LETTER U WITH ACUTE */ + { "", 0xDB, 0x0170, "U" }, /* LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */ + { "Uuml", 0xDC, 0x00DC, "U" }, /* LATIN CAPITAL LETTER U WITH DIAERESIS */ + { "Yacute", 0xDD, 0x00DD, "Y" }, /* LATIN CAPITAL LETTER Y WITH ACUTE */ + { "", 0xDE, 0x0162, "T" }, /* LATIN CAPITAL LETTER T WITH CEDILLA */ + { "szlig", 0xDF, 0x00DF, "ss" }, /* LATIN SMALL LETTER SHARP S (German) */ + { "", 0xE0, 0x0155, "s" }, /* LATIN SMALL LETTER R WITH ACUTE */ + { "aacute", 0xE1, 0x00E1, "a" }, /* LATIN SMALL LETTER A WITH ACUTE */ + { "acirc", 0xE2, 0x00E2, "a" }, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */ + { "", 0xE3, 0x0103, "a" }, /* LATIN SMALL LETTER A WITH BREVE */ + { "auml", 0xE4, 0x00E4, "a" }, /* LATIN SMALL LETTER A WITH DIAERESIS */ + { "", 0xE5, 0x013A, "l" }, /* LATIN SMALL LETTER L WITH ACUTE */ + { "", 0xE6, 0x0107, "c" }, /* LATIN SMALL LETTER C WITH ACUTE */ + { "ccedil", 0xE7, 0x00E7, "c" }, /* LATIN SMALL LETTER C WITH CEDILLA */ + { "", 0xE8, 0x010D, "c" }, /* LATIN SMALL LETTER C WITH CARON */ + { "eacute", 0xE9, 0x00E9, "e" }, /* LATIN SMALL LETTER E WITH ACUTE */ + { "", 0xEA, 0x0119, "e" }, /* LATIN SMALL LETTER E WITH OGONEK */ + { "euml", 0xEB, 0x00EB, "e" }, /* LATIN SMALL LETTER E WITH DIAERESIS */ + { "", 0xEC, 0x011B, "e" }, /* LATIN SMALL LETTER E WITH CARON */ + { "iacute", 0xED, 0x00ED, "i" }, /* LATIN SMALL LETTER I WITH ACUTE */ + { "icirc", 0xEE, 0x00EE, "i" }, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */ + { "", 0xEF, 0x010F, "d" }, /* LATIN SMALL LETTER D WITH CARON */ + { "", 0xF0, 0x0111, "d" }, /* LATIN SMALL LETTER D WITH STROKE */ + { "", 0xF1, 0x0144, "n" }, /* LATIN SMALL LETTER N WITH ACUTE */ + { "", 0xF2, 0x0148, "n" }, /* LATIN SMALL LETTER N WITH CARON */ + { "oacute", 0xF3, 0x00F3, "o" }, /* LATIN SMALL LETTER O WITH ACUTE */ + { "ocirc", 0xF4, 0x00F4, "o" }, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */ + { "", 0xF5, 0x0151, "o" }, /* LATIN SMALL LETTER O WITH DOUBLE ACUTE */ + { "ouml", 0xF6, 0x00F6, "o" }, /* 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 */ + { "", 0xF8, 0x0159, "r" }, /* LATIN SMALL LETTER R WITH CARON */ + { "", 0xF9, 0x016F, "u" }, /* LATIN SMALL LETTER U WITH RING ABOVE */ + { "uacute", 0xFA, 0x00FA, "u" }, /* LATIN SMALL LETTER U WITH ACUTE */ + { "", 0xFB, 0x0171, "u" }, /* LATIN SMALL LETTER U WITH DOUBLE ACUTE */ + { "uuml", 0xFC, 0x00FC, "u" }, /* LATIN SMALL LETTER U WITH DIAERESIS */ + { "yacute", 0xFD, 0x00FD, "y" }, /* LATIN SMALL LETTER Y WITH ACUTE */ + { "", 0xFE, 0x0163, "t" }, /* LATIN SMALL LETTER T WITH CEDILLA */ { "", 0xFF, 0x02D9 }, /* DOT ABOVE (Mandarin Chinese light tone) */ { NULL, 0, 0 } }; +/* Common map for koi8-u, koi8-r */ +static iso_map_type koi8_map [] = { + { "", 0xa3, 0x0415, "io"}, /* CYRILLIC SMALL LETTER IO */ + { "", 0xa4, 0x0454, "ie"}, /* CYRILLIC SMALL LETTER UKRAINIAN IE */ + { "", 0xa6, 0x0456, "i"}, /* CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */ + { "", 0xa7, 0x0457, "yi"}, /* CYRILLIC SMALL LETTER YI */ + + { "", 0xb3, 0x04d7, "IO"}, /* CYRILLIC CAPITAL LETTER IO */ + { "", 0xb4, 0x0404, "IE"}, /* CYRILLIC CAPITAL LETTER UKRAINIAN IE */ + { "", 0xb6, 0x0406, "I"}, /* CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */ + { "", 0xb7, 0x0407, "YI"}, /* CYRILLIC CAPITAL LETTER YI */ +/* { "", 0xbf, 0x}, / * CYRILLIC COPYRIGHT SIGN */ + { "", 0xc0, 0x042e, "yu"}, /* CYRILLIC SMALL LETTER YU */ + { "", 0xc1, 0x0430, "a"}, /* CYRILLIC SMALL LETTER A */ + { "", 0xc2, 0x0431, "b"}, /* CYRILLIC SMALL LETTER BE */ + { "", 0xc3, 0x0446, "c"}, /* CYRILLIC SMALL LETTER TSE */ + { "", 0xc4, 0x0434, "d"}, /* CYRILLIC SMALL LETTER DE */ + { "", 0xc5, 0x0435, "e"}, /* CYRILLIC SMALL LETTER IE */ + { "", 0xc6, 0x0444, "f"}, /* CYRILLIC SMALL LETTER EF */ + { "", 0xc7, 0x0433, "g"}, /* CYRILLIC SMALL LETTER GHE */ + { "", 0xc8, 0x0445, "h"}, /* CYRILLIC SMALL LETTER HA */ + { "", 0xc9, 0x0438, "i"}, /* CYRILLIC SMALL LETTER I */ + { "", 0xca, 0x0439, "i"}, /* CYRILLIC SMALL LETTER SHORT I */ + { "", 0xcb, 0x043a, "k"}, /* CYRILLIC SMALL LETTER KA */ + { "", 0xcc, 0x043b, "l"}, /* CYRILLIC SMALL LETTER EL */ + { "", 0xcd, 0x043c, "m"}, /* CYRILLIC SMALL LETTER EM */ + { "", 0xce, 0x043d, "n"}, /* CYRILLIC SMALL LETTER EN */ + { "", 0xcf, 0x043e, "o"}, /* CYRILLIC SMALL LETTER O */ + { "", 0xd0, 0x043f, "p"}, /* CYRILLIC SMALL LETTER PE */ + { "", 0xd1, 0x044f, "ya"}, /* CYRILLIC SMALL LETTER YA */ + { "", 0xd2, 0x0440, "r"}, /* CYRILLIC SMALL LETTER ER */ + { "", 0xd3, 0x0441, "s"}, /* CYRILLIC SMALL LETTER ES */ + { "", 0xd4, 0x0442, "t"}, /* CYRILLIC SMALL LETTER TE */ + { "", 0xd5, 0x0443, "u"}, /* CYRILLIC SMALL LETTER U */ + { "", 0xd6, 0x0436, "zh"}, /* CYRILLIC SMALL LETTER ZHE */ + { "", 0xd7, 0x0432, "v"}, /* CYRILLIC SMALL LETTER VE */ + { "", 0xd8, 0x044c, "x"}, /* CYRILLIC SMALL LETTER SOFT SIGN */ + { "", 0xd9, 0x044b, "y"}, /* CYRILLIC SMALL LETTER YERU */ + { "", 0xda, 0x0437, "z"}, /* CYRILLIC SMALL LETTER ZE */ + { "", 0xdb, 0x0448, "sh"}, /* CYRILLIC SMALL LETTER SHA */ + { "", 0xdc, 0x044d, "e"}, /* CYRILLIC SMALL LETTER E */ + { "", 0xdd, 0x0449, "shch"}, /* CYRILLIC SMALL LETTER SHCHA */ + { "", 0xde, 0x0447, "ch"}, /* CYRILLIC SMALL LETTER CHA */ + { "", 0xdf, 0x044a, "w"}, /* CYRILLIC SMALL LETTER HARD SIGN */ + { "", 0xe0, 0x042d, "YU"}, /* CYRILLIC CAPITAL LETTER YU */ + { "", 0xe1, 0x0410, "A"}, /* CYRILLIC CAPITAL LETTER A */ + { "", 0xe2, 0x0411, "B"}, /* CYRILLIC CAPITAL LETTER BE */ + { "", 0xe3, 0x0426, "C"}, /* CYRILLIC CAPITAL LETTER TSE */ + { "", 0xe4, 0x0414, "D"}, /* CYRILLIC CAPITAL LETTER DE */ + { "", 0xe5, 0x0415, "E"}, /* CYRILLIC CAPITAL LETTER IE */ + { "", 0xe6, 0x0424, "F"}, /* CYRILLIC CAPITAL LETTER EF */ + { "", 0xe7, 0x0413, "G"}, /* CYRILLIC CAPITAL LETTER GHE */ + { "", 0xe8, 0x0425, "H"}, /* CYRILLIC CAPITAL LETTER HA */ + { "", 0xe9, 0x0418, "I"}, /* CYRILLIC CAPITAL LETTER I */ + { "", 0xea, 0x0419, "I"}, /* CYRILLIC CAPITAL LETTER SHORT I */ + { "", 0xeb, 0x041a, "K"}, /* CYRILLIC CAPITAL LETTER KA */ + { "", 0xec, 0x041b, "L"}, /* CYRILLIC CAPITAL LETTER EL */ + { "", 0xed, 0x041c, "M"}, /* CYRILLIC CAPITAL LETTER EM */ + { "", 0xee, 0x041d, "N"}, /* CYRILLIC CAPITAL LETTER EN */ + { "", 0xef, 0x041e, "O"}, /* CYRILLIC CAPITAL LETTER O */ + { "", 0xf0, 0x041f, "P"}, /* CYRILLIC CAPITAL LETTER PE */ + { "", 0xf1, 0x042f, "YA"}, /* CYRILLIC CAPITAL LETTER YA */ + { "", 0xf2, 0x0420, "R"}, /* CYRILLIC CAPITAL LETTER ER */ + { "", 0xf3, 0x0421, "S"}, /* CYRILLIC CAPITAL LETTER ES */ + { "", 0xf4, 0x0422, "T"}, /* CYRILLIC CAPITAL LETTER TE */ + { "", 0xf5, 0x0423, "U"}, /* CYRILLIC CAPITAL LETTER U */ + { "", 0xf6, 0x0416, "ZH"}, /* CYRILLIC CAPITAL LETTER ZHE */ + { "", 0xf7, 0x0412, "V"}, /* CYRILLIC CAPITAL LETTER VE */ + { "", 0xf8, 0x042c, "X"}, /* CYRILLIC CAPITAL LETTER SOFT SIGN */ + { "", 0xf9, 0x042b, "Y"}, /* CYRILLIC CAPITAL LETTER YERU */ + { "", 0xfa, 0x0417, "Z"}, /* CYRILLIC CAPITAL LETTER ZE */ + { "", 0xfb, 0x0428, "SH"}, /* CYRILLIC CAPITAL LETTER SHA */ + { "", 0xfc, 0x042d, "E"}, /* CYRILLIC CAPITAL LETTER E */ + { "", 0xfd, 0x0429, "SHCH"}, /* CYRILLIC CAPITAL LETTER SHCHA */ + { "", 0xfe, 0x0427, "CH"}, /* CYRILLIC CAPITAL LETTER CHE */ + { "", 0xff, 0x042a, "W"}, /* CYRILLIC CAPITAL LETTER HARD SIGN */ + { NULL, 0, 0 } +}; + encoding_type encoding_table[] = { { no_encoding, "(no encoding)", NULL }, - { US_ASCII, "US-ASCII", us_ascii_map }, + { US_ASCII, "US-ASCII", asis_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 }, @@ -402,81 +484,389 @@ encoding_type encoding_table[] = { { 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 }, + { KOI8_R, "koi8-r", (iso_map_type *) koi8_map }, + { KOI8_U, "koi8-u", (iso_map_type *) koi8_map }, + { UTF_8, "utf-8", asis_map }, /* specific code for this below */ { last_encoding_code, NULL, NULL } }; + +/* List of HTML entities. */ +static struct { const char *html; unsigned int unicode; } unicode_map[] = { +/* Extracted from http://www.w3.org/TR/html401/sgml/entities.html through + sed -n -e 's|/tmp/639.2 + + Extract the C table below to a file, say /tmp/lc, and run: + cut -c 10- /tmp/lc| sed -e 's/", "/|/' -e 's,".*,,'>/tmp/lang.2 + + Then: comm -3 /tmp/639.2 /tmp/lang.c. + + Also update the enum in lang.h. */ language_type language_table[] = { { aa, "aa", "Afar" }, { ab, "ab", "Abkhazian" }, + { ae, "ae", "Avestan" }, { af, "af", "Afrikaans" }, + { ak, "ak", "Akan" }, { am, "am", "Amharic" }, + { an, "an", "Aragonese" }, { ar, "ar", "Arabic" }, { as, "as", "Assamese" }, + { av, "av", "Avaric" }, { ay, "ay", "Aymara" }, { az, "az", "Azerbaijani" }, { ba, "ba", "Bashkir" }, - { be, "be", "Byelorussian" }, + { be, "be", "Belarusian" }, { bg, "bg", "Bulgarian" }, { bh, "bh", "Bihari" }, { bi, "bi", "Bislama" }, - { bn, "bn", "Bengali; Bangla" }, + { bm, "bm", "Bambara" }, + { bn, "bn", "Bengali" }, { bo, "bo", "Tibetan" }, { br, "br", "Breton" }, - { ca, "ca", "Catalan" }, + { bs, "bs", "Bosnian" }, + { ca, "ca", "Catalan; Valencian" }, + { ce, "ce", "Chechen" }, + { ch, "ch", "Chamorro" }, { co, "co", "Corsican" }, + { cr, "cr", "Cree" }, { cs, "cs", "Czech" }, + { cu, "cu", "Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic" }, + { cv, "cv", "Chuvash" }, { cy, "cy", "Welsh" }, { da, "da", "Danish" }, { de, "de", "German" }, - { dz, "dz", "Bhutani" }, - { el, "el", "Greek" }, + { dv, "dv", "Divehi; Dhivehi; Maldivian" }, + { dz, "dz", "Dzongkha" }, + { ee, "ee", "Ewe" }, + { el, "el", "Greek, Modern (1453-)" }, { en, "en", "English" }, { eo, "eo", "Esperanto" }, - { es, "es", "Spanish" }, + { es, "es", "Spanish; Castilian" }, { et, "et", "Estonian" }, { eu, "eu", "Basque" }, { fa, "fa", "Persian" }, + { ff, "ff", "Fulah" }, { fi, "fi", "Finnish" }, - { fj, "fj", "Fiji" }, + { fj, "fj", "Fijian" }, { fo, "fo", "Faroese" }, { fr, "fr", "French" }, - { fy, "fy", "Frisian" }, + { fy, "fy", "Western Frisian" }, { ga, "ga", "Irish" }, - { gd, "gd", "Scots Gaelic" }, + { gd, "gd", "Gaelic; Scottish Gaelic" }, { gl, "gl", "Galician" }, { gn, "gn", "Guarani" }, { gu, "gu", "Gujarati" }, + { gv, "gv", "Manx" }, { ha, "ha", "Hausa" }, { he, "he", "Hebrew" } /* (formerly iw) */, { hi, "hi", "Hindi" }, + { ho, "ho", "Hiri Motu" }, { hr, "hr", "Croatian" }, + { ht, "ht", "Haitian; Haitian Creole" }, { hu, "hu", "Hungarian" }, { hy, "hy", "Armenian" }, - { ia, "ia", "Interlingua" }, + { hz, "hz", "Herero" }, + { ia, "ia", "Interlingua (International Auxiliary Language Association)" }, { id, "id", "Indonesian" } /* (formerly in) */, { ie, "ie", "Interlingue" }, - { ik, "ik", "Inupiak" }, + { ig, "ig", "Igbo" }, + { ii, "ii", "Sichuan Yi" }, + { ik, "ik", "Inupiaq" }, + { io, "io", "Ido" }, { is, "is", "Icelandic" }, { it, "it", "Italian" }, { iu, "iu", "Inuktitut" }, { ja, "ja", "Japanese" }, - { jw, "jw", "Javanese" }, + { jv, "jv", "Javanese" }, { ka, "ka", "Georgian" }, + { kg, "kg", "Kongo" }, + { ki, "ki", "Kikuyu; Gikuyu" }, + { kj, "kj", "Kuanyama; Kwanyama" }, { kk, "kk", "Kazakh" }, - { kl, "kl", "Greenlandic" }, - { km, "km", "Cambodian" }, + { kl, "kl", "Kalaallisut; Greenlandic" }, + { km, "km", "Central Khmer" }, { kn, "kn", "Kannada" }, { ko, "ko", "Korean" }, + { kr, "kr", "Kanuri" }, { ks, "ks", "Kashmiri" }, { ku, "ku", "Kurdish" }, - { ky, "ky", "Kirghiz" }, + { kv, "kv", "Komi" }, + { kw, "kw", "Cornish" }, + { ky, "ky", "Kirghiz; Kyrgyz" }, { la, "la", "Latin" }, + { lb, "lb", "Luxembourgish; Letzeburgesch" }, + { lg, "lg", "Ganda" }, + { li, "li", "Limburgan; Limburger; Limburgish" }, { ln, "ln", "Lingala" }, - { lo, "lo", "Laothian" }, + { lo, "lo", "Lao" }, { lt, "lt", "Lithuanian" }, - { lv, "lv", "Latvian, Lettish" }, + { lu, "lu", "Luba-Katanga" }, + { lv, "lv", "Latvian" }, { mg, "mg", "Malagasy" }, + { mh, "mh", "Marshallese" }, { mi, "mi", "Maori" }, { mk, "mk", "Macedonian" }, { ml, "ml", "Malayalam" }, @@ -487,27 +877,38 @@ language_type language_table[] = { { mt, "mt", "Maltese" }, { my, "my", "Burmese" }, { na, "na", "Nauru" }, + { nb, "nb", "BokmÃ¥l, Norwegian; Norwegian BokmÃ¥l" }, + { nd, "nd", "Ndebele, North; North Ndebele" }, { ne, "ne", "Nepali" }, - { nl, "nl", "Dutch" }, + { ng, "ng", "Ndonga" }, + { nl, "nl", "Dutch; Flemish" }, + { nn, "nn", "Norwegian Nynorsk; Nynorsk, Norwegian" }, { no, "no", "Norwegian" }, - { oc, "oc", "Occitan" }, - { om, "om", "(Afan) Oromo" }, + { nr, "nr", "Ndebele, South; South Ndebele" }, + { nv, "nv", "Navajo; Navaho" }, + { ny, "ny", "Chichewa; Chewa; Nyanja" }, + { oc, "oc", "Occitan (post 1500); Provençal" }, + { oj, "oj", "Ojibwa" }, + { om, "om", "Oromo" }, { or, "or", "Oriya" }, - { pa, "pa", "Punjabi" }, + { os, "os", "Ossetian; Ossetic" }, + { pa, "pa", "Panjabi; Punjabi" }, + { pi, "pi", "Pali" }, { pl, "pl", "Polish" }, - { ps, "ps", "Pashto, Pushto" }, + { ps, "ps", "Pushto" }, { pt, "pt", "Portuguese" }, { qu, "qu", "Quechua" }, - { rm, "rm", "Rhaeto-Romance" }, - { rn, "rn", "Kirundi" }, + { rm, "rm", "Romansh" }, + { rn, "rn", "Rundi" }, { ro, "ro", "Romanian" }, { ru, "ru", "Russian" }, { rw, "rw", "Kinyarwanda" }, { sa, "sa", "Sanskrit" }, + { sc, "sc", "Sardinian" }, { sd, "sd", "Sindhi" }, - { sg, "sg", "Sangro" }, - { sh, "sh", "Serbo-Croatian" }, - { si, "si", "Sinhalese" }, + { se, "se", "Northern Sami" }, + { sg, "sg", "Sango" }, + { si, "si", "Sinhala; Sinhalese" }, { sk, "sk", "Slovak" }, { sl, "sl", "Slovenian" }, { sm, "sm", "Samoan" }, @@ -515,8 +916,8 @@ language_type language_table[] = { { so, "so", "Somali" }, { sq, "sq", "Albanian" }, { sr, "sr", "Serbian" }, - { ss, "ss", "Siswati" }, - { st, "st", "Sesotho" }, + { ss, "ss", "Swati" }, + { st, "st", "Sotho, Souther" }, { su, "su", "Sundanese" }, { sv, "sv", "Swedish" }, { sw, "sw", "Swahili" }, @@ -527,48 +928,348 @@ language_type language_table[] = { { ti, "ti", "Tigrinya" }, { tk, "tk", "Turkmen" }, { tl, "tl", "Tagalog" }, - { tn, "tn", "Setswana" }, - { to, "to", "Tonga" }, + { tn, "tn", "Tswana" }, + { to, "to", "Tonga (Tonga Islands)" }, { tr, "tr", "Turkish" }, { ts, "ts", "Tsonga" }, { tt, "tt", "Tatar" }, { tw, "tw", "Twi" }, - { ug, "ug", "Uighur" }, + { ty, "ty", "Tahitian" }, + { ug, "ug", "Uighur; Uyghur" }, { uk, "uk", "Ukrainian" }, { ur, "ur", "Urdu" }, { uz, "uz", "Uzbek" }, + { ve, "ve", "Venda" }, { vi, "vi", "Vietnamese" }, - { vo, "vo", "Volapuk" }, + { vo, "vo", "Volapük" }, + { wa, "wa", "Walloon" }, { wo, "wo", "Wolof" }, { xh, "xh", "Xhosa" }, { yi, "yi", "Yiddish" } /* (formerly ji) */, { yo, "yo", "Yoruba" }, - { za, "za", "Zhuang" }, + { za, "za", "Zhuang; Chuang" }, { zh, "zh", "Chinese" }, { zu, "zu", "Zulu" }, { last_language_code, NULL, NULL } }; + +static const char * +cm_search_iso_map_char (byte_t ch) +{ + int i; + iso_map_type *iso = encoding_table[document_encoding_code].isotab; + + /* If no conversion table for this encoding, quit. */ + if (!iso) + return NULL; + + for (i = 0; iso[i].html; i++) + if (iso[i].bytecode == ch) + return iso[i].translit; + + return NULL; +} + +const char * +lang_transliterate_char (byte_t ch) +{ + if (transliterate_file_names + && document_encoding_code != no_encoding) + return cm_search_iso_map_char (ch); + return NULL; +} + + -/* @documentlanguage. Maybe we'll do something useful with this in the - future. For now, we just recognize it. */ +/* Given a language code LL_CODE, return a "default" country code (in + new memory). We use the same table as gettext, and return LL_CODE + uppercased in the absence of any better possibility, with a warning. + (gettext silently defaults to the C locale, but we want to give users + a shot at fixing ambiguities.) We also return en_US for en, while + gettext does not. */ + +#define SIZEOF(a) (sizeof(a) / sizeof(a[0])) + +static char * +default_country_for_lang (const char *ll_code) +{ + /* This table comes from msginit.c in gettext (0.16.1). It is + intentionally copied verbatim even though the format is not the + most convenient for our purposes, to make updates simple. */ + static const char *locales_with_principal_territory[] = { + /* Language Main territory */ + "ace_ID", /* Achinese Indonesia */ + "af_ZA", /* Afrikaans South Africa */ + "ak_GH", /* Akan Ghana */ + "am_ET", /* Amharic Ethiopia */ + "an_ES", /* Aragonese Spain */ + "ang_GB", /* Old English Britain */ + "as_IN", /* Assamese India */ + "av_RU", /* Avaric Russia */ + "awa_IN", /* Awadhi India */ + "az_AZ", /* Azerbaijani Azerbaijan */ + "bad_CF", /* Banda Central African Republic */ + "ban_ID", /* Balinese Indonesia */ + "be_BY", /* Belarusian Belarus */ + "bem_ZM", /* Bemba Zambia */ + "bg_BG", /* Bulgarian Bulgaria */ + "bho_IN", /* Bhojpuri India */ + "bik_PH", /* Bikol Philippines */ + "bin_NG", /* Bini Nigeria */ + "bm_ML", /* Bambara Mali */ + "bn_IN", /* Bengali India */ + "bo_CN", /* Tibetan China */ + "br_FR", /* Breton France */ + "bs_BA", /* Bosnian Bosnia */ + "btk_ID", /* Batak Indonesia */ + "bug_ID", /* Buginese Indonesia */ + "ca_ES", /* Catalan Spain */ + "ce_RU", /* Chechen Russia */ + "ceb_PH", /* Cebuano Philippines */ + "co_FR", /* Corsican France */ + "cr_CA", /* Cree Canada */ + "cs_CZ", /* Czech Czech Republic */ + "csb_PL", /* Kashubian Poland */ + "cy_GB", /* Welsh Britain */ + "da_DK", /* Danish Denmark */ + "de_DE", /* German Germany */ + "din_SD", /* Dinka Sudan */ + "doi_IN", /* Dogri India */ + "dv_MV", /* Divehi Maldives */ + "dz_BT", /* Dzongkha Bhutan */ + "ee_GH", /* Éwé Ghana */ + "el_GR", /* Greek Greece */ + /* Don't put "en_GB" or "en_US" here. That would be asking for fruitless + political discussion. */ + "es_ES", /* Spanish Spain */ + "et_EE", /* Estonian Estonia */ + "fa_IR", /* Persian Iran */ + "fi_FI", /* Finnish Finland */ + "fil_PH", /* Filipino Philippines */ + "fj_FJ", /* Fijian Fiji */ + "fo_FO", /* Faroese Faeroe Islands */ + "fon_BJ", /* Fon Benin */ + "fr_FR", /* French France */ + "fy_NL", /* Western Frisian Netherlands */ + "ga_IE", /* Irish Ireland */ + "gd_GB", /* Scots Britain */ + "gon_IN", /* Gondi India */ + "gsw_CH", /* Swiss German Switzerland */ + "gu_IN", /* Gujarati India */ + "he_IL", /* Hebrew Israel */ + "hi_IN", /* Hindi India */ + "hil_PH", /* Hiligaynon Philippines */ + "hr_HR", /* Croatian Croatia */ + "ht_HT", /* Haitian Haiti */ + "hu_HU", /* Hungarian Hungary */ + "hy_AM", /* Armenian Armenia */ + "id_ID", /* Indonesian Indonesia */ + "ig_NG", /* Igbo Nigeria */ + "ii_CN", /* Sichuan Yi China */ + "ilo_PH", /* Iloko Philippines */ + "is_IS", /* Icelandic Iceland */ + "it_IT", /* Italian Italy */ + "ja_JP", /* Japanese Japan */ + "jab_NG", /* Hyam Nigeria */ + "jv_ID", /* Javanese Indonesia */ + "ka_GE", /* Georgian Georgia */ + "kab_DZ", /* Kabyle Algeria */ + "kaj_NG", /* Jju Nigeria */ + "kam_KE", /* Kamba Kenya */ + "kmb_AO", /* Kimbundu Angola */ + "kcg_NG", /* Tyap Nigeria */ + "kdm_NG", /* Kagoma Nigeria */ + "kg_CD", /* Kongo Democratic Republic of Congo */ + "kk_KZ", /* Kazakh Kazakhstan */ + "kl_GL", /* Kalaallisut Greenland */ + "km_KH", /* Khmer Cambodia */ + "kn_IN", /* Kannada India */ + "ko_KR", /* Korean Korea (South) */ + "kok_IN", /* Konkani India */ + "kr_NG", /* Kanuri Nigeria */ + "kru_IN", /* Kurukh India */ + "lg_UG", /* Ganda Uganda */ + "li_BE", /* Limburgish Belgium */ + "lo_LA", /* Laotian Laos */ + "lt_LT", /* Lithuanian Lithuania */ + "lu_CD", /* Luba-Katanga Democratic Republic of Congo */ + "lua_CD", /* Luba-Lulua Democratic Republic of Congo */ + "luo_KE", /* Luo Kenya */ + "lv_LV", /* Latvian Latvia */ + "mad_ID", /* Madurese Indonesia */ + "mag_IN", /* Magahi India */ + "mai_IN", /* Maithili India */ + "mak_ID", /* Makasar Indonesia */ + "man_ML", /* Mandingo Mali */ + "men_SL", /* Mende Sierra Leone */ + "mg_MG", /* Malagasy Madagascar */ + "min_ID", /* Minangkabau Indonesia */ + "mk_MK", /* Macedonian Macedonia */ + "ml_IN", /* Malayalam India */ + "mn_MN", /* Mongolian Mongolia */ + "mni_IN", /* Manipuri India */ + "mos_BF", /* Mossi Burkina Faso */ + "mr_IN", /* Marathi India */ + "ms_MY", /* Malay Malaysia */ + "mt_MT", /* Maltese Malta */ + "mwr_IN", /* Marwari India */ + "my_MM", /* Burmese Myanmar */ + "na_NR", /* Nauru Nauru */ + "nah_MX", /* Nahuatl Mexico */ + "nap_IT", /* Neapolitan Italy */ + "nb_NO", /* Norwegian BokmÃ¥l Norway */ + "nds_DE", /* Low Saxon Germany */ + "ne_NP", /* Nepali Nepal */ + "nl_NL", /* Dutch Netherlands */ + "nn_NO", /* Norwegian Nynorsk Norway */ + "no_NO", /* Norwegian Norway */ + "nr_ZA", /* South Ndebele South Africa */ + "nso_ZA", /* Northern Sotho South Africa */ + "nym_TZ", /* Nyamwezi Tanzania */ + "nyn_UG", /* Nyankole Uganda */ + "oc_FR", /* Occitan France */ + "oj_CA", /* Ojibwa Canada */ + "or_IN", /* Oriya India */ + "pa_IN", /* Punjabi India */ + "pag_PH", /* Pangasinan Philippines */ + "pam_PH", /* Pampanga Philippines */ + "pbb_CO", /* Páez Colombia */ + "pl_PL", /* Polish Poland */ + "ps_AF", /* Pashto Afghanistan */ + "pt_PT", /* Portuguese Portugal */ + "raj_IN", /* Rajasthani India */ + "rm_CH", /* Rhaeto-Roman Switzerland */ + "rn_BI", /* Kirundi Burundi */ + "ro_RO", /* Romanian Romania */ + "ru_RU", /* Russian Russia */ + "sa_IN", /* Sanskrit India */ + "sas_ID", /* Sasak Indonesia */ + "sat_IN", /* Santali India */ + "sc_IT", /* Sardinian Italy */ + "scn_IT", /* Sicilian Italy */ + "sg_CF", /* Sango Central African Republic */ + "shn_MM", /* Shan Myanmar */ + "si_LK", /* Sinhala Sri Lanka */ + "sid_ET", /* Sidamo Ethiopia */ + "sk_SK", /* Slovak Slovakia */ + "sl_SI", /* Slovenian Slovenia */ + "so_SO", /* Somali Somalia */ + "sq_AL", /* Albanian Albania */ + "sr_RS", /* Serbian Serbia */ + "sr_YU", /* Serbian Yugoslavia */ + "srr_SN", /* Serer Senegal */ + "suk_TZ", /* Sukuma Tanzania */ + "sus_GN", /* Susu Guinea */ + "sv_SE", /* Swedish Sweden */ + "te_IN", /* Telugu India */ + "tem_SL", /* Timne Sierra Leone */ + "tet_ID", /* Tetum Indonesia */ + "tg_TJ", /* Tajik Tajikistan */ + "th_TH", /* Thai Thailand */ + "tiv_NG", /* Tiv Nigeria */ + "tk_TM", /* Turkmen Turkmenistan */ + "tl_PH", /* Tagalog Philippines */ + "to_TO", /* Tonga Tonga */ + "tr_TR", /* Turkish Turkey */ + "tum_MW", /* Tumbuka Malawi */ + "uk_UA", /* Ukrainian Ukraine */ + "umb_AO", /* Umbundu Angola */ + "ur_PK", /* Urdu Pakistan */ + "uz_UZ", /* Uzbek Uzbekistan */ + "ve_ZA", /* Venda South Africa */ + "vi_VN", /* Vietnamese Vietnam */ + "wa_BE", /* Walloon Belgium */ + "wal_ET", /* Walamo Ethiopia */ + "war_PH", /* Waray Philippines */ + "wen_DE", /* Sorbian Germany */ + "yao_MW", /* Yao Malawi */ + "zap_MX" /* Zapotec Mexico */ + }; + int c; + int cc_len; + int ll_len = strlen (ll_code); + char *cc_code = xmalloc (ll_len + 1 + 1); + int principal_len = SIZEOF (locales_with_principal_territory); + + strcpy (cc_code, ll_code); + strcat (cc_code, "_"); + cc_len = ll_len + 1; + + for (c = 0; c < principal_len; c++) + { + const char *principal_locale = locales_with_principal_territory[c]; + if (strncmp (principal_locale, cc_code, cc_len) == 0) + { + const char *underscore = strchr (principal_locale, '_'); + /* should always be there, but in case ... */ + free (cc_code); + cc_code = xstrdup (underscore ? underscore + 1 : principal_locale); + break; + } + } + + /* If we didn't find one to copy, warn and duplicate. */ + if (c == principal_len) + { + if (mbscasecmp (ll_code, "en") == 0) + cc_code = xstrdup ("en_US"); + else + { + warning (_("no default territory known for language `%s'"), ll_code); + for (c = 0; c < strlen (ll_code); c++) + cc_code[c] = toupper (ll_code[c]); + cc_code[c] = 0; + /* We're probably wasting a byte, oops. */ + } + } + + return cc_code; +} + + + +/* @documentlanguage ARG. We set the global `document_language' (which + `getdocumenttext' uses) to the gettextish string, and + `language_code' to the corresponding enum value. */ -/* 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; + char *lang_arg, *ll_part, *cc_part, *locale_string; + char *underscore; /* Read the line with the language code on it. */ get_rest_of_line (0, &lang_arg); + /* What we're passed might be either just a language code LL (we'll + also need it with the usual _CC appended, if there is one), or a + locale name as used by gettext, LL_CC (we'll also need its + constituents separately). */ + underscore = strchr (lang_arg, '_'); + if (underscore) + { + ll_part = substring (lang_arg, underscore); + cc_part = xstrdup (underscore + 1); + locale_string = xstrdup (lang_arg); + } + else + { + ll_part = xstrdup (lang_arg); + cc_part = default_country_for_lang (ll_part); + locale_string = xmalloc (strlen (ll_part) + 1 + strlen (cc_part) + 1); + strcpy (locale_string, ll_part); + strcat (locale_string, "_"); + strcat (locale_string, cc_part); + } + + /* Done with analysis of user-supplied string. */ + free (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) + if (strcmp (ll_part, language_table[c].abbrev) == 0) { /* Set current language code. */ language_code = c; break; @@ -577,15 +1278,30 @@ cm_documentlanguage (void) /* 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); + warning (_("%s is not a valid ISO 639 language code"), ll_part); + /* Set the language our `getdocumenttext' function uses for + translating document strings. */ + document_language = xstrdup (locale_string); + free (locale_string); + if (xml && !docbook) - { - xml_insert_element_with_attribute (DOCUMENTLANGUAGE, START, "xml:lang=\"%s\"", lang_arg); + { /* According to http://www.opentag.com/xfaq_lang.htm, xml:lang + takes an ISO 639 language code, optionally followed by a dash + (not underscore) and an ISO 3166 country code. So we have + to make another version with - instead of _. */ + char *xml_locale = xmalloc (strlen (ll_part) + 1 + strlen (cc_part) + 1); + strcpy (xml_locale, ll_part); + strcat (xml_locale, "-"); + strcat (xml_locale, cc_part); + xml_insert_element_with_attribute (DOCUMENTLANGUAGE, START, + "xml:lang=\"%s\"", xml_locale); xml_insert_element (DOCUMENTLANGUAGE, END); + free (xml_locale); } - free (lang_arg); + free (ll_part); + free (cc_part); } @@ -596,20 +1312,48 @@ cm_documentlanguage (void) 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 (document_encoding_code == UTF_8) { - if (strcmp (html, iso[i].html) == 0) - return i; + /* Binary search in unicode_map. */ + size_t low = 0; + size_t high = sizeof (unicode_map) / sizeof (unicode_map[0]); + + /* At each loop iteration, low < high; for indices < low the values are + smaller than HTML; for indices >= high the values are greater than HTML. + So, if HTML occurs in the list, it is at low <= position < high. */ + do + { + size_t mid = low + (high - low) / 2; /* low <= mid < high */ + int cmp = strcmp (unicode_map[mid].html, html); + + if (cmp < 0) + low = mid + 1; + else if (cmp > 0) + high = mid; + else /* cmp == 0 */ + return unicode_map[mid].unicode; + } + while (low < high); + + return -1; } + else + { + 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; + return -1; + } } @@ -642,7 +1386,7 @@ cm_documentencoding (void) /* 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) + if (mbscasecmp (enc_arg, encoding_table[enc].encname) == 0) { document_encoding_code = enc; break; @@ -691,6 +1435,39 @@ current_document_encoding (void) } +/* Add RC per the current encoding. */ + +static void +add_encoded_char_from_code (int rc) +{ + if (document_encoding_code == UTF_8) + { + if (rc < 0x80) + add_char (rc); + else if (rc < 0x800) + { + add_char (0xc0 | (rc >> 6)); + add_char (0x80 | (rc & 0x3f)); + } + else if (rc < 0x10000) + { + add_char (0xe0 | (rc >> 12)); + add_char (0x80 | ((rc >> 6) & 0x3f)); + add_char (0x80 | (rc & 0x3f)); + } + else + { + add_char (0xf0 | (rc >> 18)); + add_char (0x80 | ((rc >> 12) & 0x3f)); + add_char (0x80 | ((rc >> 6) & 0x3f)); + add_char (0x80 | (rc & 0x3f)); + } + } + else + add_char (encoding_table[document_encoding_code].isotab[rc].bytecode); +} + + /* 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, @@ -703,13 +1480,13 @@ add_encoded_char (char *html_str, char *info_str) add_word_args ("&%s;", html_str); else if (xml) xml_insert_entity (html_str); - else if (enable_encoding) + else if (enable_encoding && document_encoding_code != no_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); + add_encoded_char_from_code (rc); else { /* We didn't find it, that seems bad. */ warning (_("invalid encoded character `%s'"), html_str); @@ -789,11 +1566,16 @@ cm_accent_generic_html (int arg, int start, int end, char *html_supported, } +/* If END is zero, there is nothing in the paragraph to accent. This + can happen when we're in a menu with an accent command and + --no-headers is given, so the base character is not added. In this + case we're not producing any output anyway, so just forget it. + Otherwise, produce the ASCII version of the accented char. */ static void cm_accent_generic_no_headers (int arg, int start, int end, int single, char *html_solo) { - if (arg == END) + if (arg == END && end > 0) { if (no_encoding) add_char (single); @@ -801,19 +1583,20 @@ cm_accent_generic_no_headers (int arg, int start, int end, int single, { int rc; char *buffer = xmalloc (1 + strlen (html_solo) + 1); + assert (end > 0); 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; + { + /* Here we replace the character which has + been inserted in read_command with + the value we have found in the conversion table. */ + output_paragraph_offset--; + add_encoded_char_from_code (rc); + } else { /* If we didn't find a translation for this character, put the single instead. E.g., &Xuml; does not exist so X¨ @@ -976,6 +1759,8 @@ cm_special_char (int arg) add_encoded_char ("ordf" , "a"); else if (strcmp (command, "ordm") == 0) add_encoded_char ("ordm" , "o"); + else if (strcmp (command, "textdegree") == 0) + add_encoded_char ("deg" , "o"); else if (strcmp (command, "AE") == 0) add_encoded_char ("AElig", command); else if (strcmp (command, "ae") == 0) @@ -990,6 +1775,12 @@ cm_special_char (int arg) add_encoded_char ("aring", command); else if (strcmp (command, "ss") == 0) add_encoded_char ("szlig", command); + else if (strcmp (command, "guillemetleft") == 0 + || strcmp (command, "guillemotleft") == 0) + add_encoded_char ("laquo", "<<"); + else if (strcmp (command, "guillemetright") == 0 + || strcmp (command, "guillemotright") == 0) + add_encoded_char ("raquo", ">>"); else line_error ("cm_special_char internal error: command=@%s", command); } diff --git a/contrib/texinfo/makeinfo/lang.h b/contrib/texinfo/makeinfo/lang.h index b231455a6e..b902f19f62 100644 --- a/contrib/texinfo/makeinfo/lang.h +++ b/contrib/texinfo/makeinfo/lang.h @@ -1,12 +1,13 @@ /* lang.h -- declarations for language codes etc. - $Id: lang.h,v 1.6 2004/04/11 17:56:47 karl Exp $ + $Id: lang.h,v 1.14 2007/11/21 23:02:22 karl Exp $ - Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2001, 2002, 2003, 2006, 2007 + Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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. + the Free Software Foundation, either version 3 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 @@ -14,8 +15,7 @@ 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. + along with this program. If not, see . Originally written by Karl Heinz Marbaise . */ @@ -23,37 +23,22 @@ #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. - */ + These code are the ISO-639 two letter codes. */ + +#undef hz /* AIX 4.3.3 */ 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, +{ + aa, ab, ae, af, ak, am, an, ar, as, av, ay, az, ba, be, bg, bh, bi, + bm, bn, bo, br, bs, ca, ce, ch, co, cr, cs, cu, cv, cy, da, de, dv, + dz, ee, el, en, eo, es, et, eu, fa, ff, fi, fj, fo, fr, fy, ga, gd, + gl, gn, gu, gv, ha, he, hi, ho, hr, ht, hu, hy, hz, ia, id, ie, ig, + ii, ik, io, is, it, iu, ja, jv, ka, kg, ki, kj, kk, kl, km, kn, ko, + kr, ks, ku, kv, kw, ky, la, lb, lg, li, ln, lo, lt, lu, lv, mg, mh, + mi, mk, ml, mn, mo, mr, ms, mt, my, na, nb, nd, ne, ng, nl, nn, no, + nr, nv, ny, oc, oj, om, or, os, pa, pi, pl, ps, pt, qu, rm, rn, ro, + ru, rw, sa, sc, sd, se, sg, 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, ty, + ug, uk, ur, uz, ve, vi, vo, wa, wo, xh, yi, yo, za, zh, zu, last_language_code } language_code_type; @@ -94,6 +79,9 @@ typedef enum { ISO_8859_13, ISO_8859_14, ISO_8859_15, + KOI8_R, + KOI8_U, + UTF_8, last_encoding_code } encoding_code_type; @@ -113,6 +101,7 @@ 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 */ + char *translit; /* 7-bit transliteration */ } iso_map_type; /* Information about the document encoding. */ @@ -145,4 +134,8 @@ extern void cm_accent_umlaut (int arg, int start, int end), extern char *current_document_encoding (void); +extern const char *lang_transliterate_char (byte_t ch); + +extern char *document_language; + #endif /* not LANG_H */ diff --git a/contrib/texinfo/makeinfo/macro.c b/contrib/texinfo/makeinfo/macro.c index 65ac0dac8f..10dabb2572 100644 --- a/contrib/texinfo/makeinfo/macro.c +++ b/contrib/texinfo/makeinfo/macro.c @@ -1,12 +1,13 @@ /* macro.c -- user-defined macros for Texinfo. - $Id: macro.c,v 1.6 2004/04/11 17:56:47 karl Exp $ + $Id: macro.c,v 1.12 2007/07/01 21:20:32 karl Exp $ - Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2002, 2003, 2005, 2007 + Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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. + the Free Software Foundation, either version 3 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 @@ -14,8 +15,7 @@ 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. */ + along with this program. If not, see . */ #include "system.h" #include "cmds.h" @@ -151,13 +151,14 @@ add_macro (char *name, char **arglist, char *body, char *source_file, def->source_lineno = source_lineno; def->body = body; def->arglist = arglist; + def->argcount = array_len (arglist); def->inhibited = 0; def->flags = flags; } char ** -get_brace_args (int quote_single) +get_brace_args (enum quote_type quote) { char **arglist, *word; int arglist_index, arglist_size; @@ -187,8 +188,10 @@ get_brace_args (int quote_single) depth++; input_text_offset++; } - else if ((character == ',' && !quote_single) || - ((character == '}') && depth == 1)) + else if ((character == ',' + && !(quote == quote_single + || (quote == quote_many && depth > 1))) + || ((character == '}') && depth == 1)) { int len = input_text_offset - start; @@ -264,7 +267,8 @@ get_macro_args (MACRO_DEF *def) char **arglist; get_rest_of_line (0, &word); - if (input_text[input_text_offset - 1] == '\n') + if (input_text_offset > 0 + && input_text[input_text_offset - 1] == '\n') { input_text_offset--; line_number--; @@ -284,7 +288,7 @@ get_macro_args (MACRO_DEF *def) } } } - return get_brace_args (def->flags & ME_QUOTE_ARG); + return get_brace_args (def->argcount == 1 ? quote_single : quote_many); } /* Substitute actual parameters for named parameters in body. @@ -385,17 +389,13 @@ 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)) + if (def->argcount < array_len (arglist)) { free_array (arglist); line_error (_("Macro `%s' called on line %d with too many args"), @@ -566,12 +566,6 @@ define_macro (char *mactype, int recursive) } } } - - /* 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 @@ -594,6 +588,7 @@ define_macro (char *mactype, int recursive) (strncmp (line + 1, "allow-recursion", 15) == 0) && (line[16] == 0 || whitespace (line[16]))) { + warning (_("@allow-recursion is deprecated; please use @rmacro instead")); for (i = 16; whitespace (line[i]); i++); strcpy (line, line + i); flags |= ME_RECURSE; @@ -608,20 +603,14 @@ define_macro (char *mactype, int recursive) (strncmp (line + 1, "quote-arg", 9) == 0) && (line[10] == 0 || whitespace (line[10]))) { + warning (_("@quote-arg is deprecated; arguments are quoted by default")); 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) + { + free (line); + continue; + } } if (*line == COMMAND_PREFIX @@ -899,13 +888,12 @@ me_execute_string (char *execution_string) void me_execute_string_keep_state (char *execution_string, char *append_string) { - int op_orig, opcol_orig, popen_orig; + int op_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; @@ -917,7 +905,6 @@ me_execute_string_keep_state (char *execution_string, char *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; diff --git a/contrib/texinfo/makeinfo/macro.h b/contrib/texinfo/makeinfo/macro.h index fbc0e59e65..de9c65a94c 100644 --- a/contrib/texinfo/makeinfo/macro.h +++ b/contrib/texinfo/makeinfo/macro.h @@ -1,12 +1,12 @@ /* macro.h -- declarations for macro.c. - $Id: macro.h,v 1.2 2004/04/11 17:56:47 karl Exp $ + $Id: macro.h,v 1.6 2007/07/01 21:20:32 karl Exp $ - Copyright (C) 1998, 99 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2007 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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. + the Free Software Foundation, either version 3 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 @@ -14,9 +14,7 @@ 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. - */ + along with this program. If not, see . */ #ifndef MACRO_H #define MACRO_H @@ -37,16 +35,16 @@ typedef struct { typedef struct { char *name; /* Name of the macro. */ char **arglist; /* Args to replace when executing. */ + int argcount; /* Number of args in arglist */ 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. */ + int flags; /* ME_RECURSE, 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); @@ -72,6 +70,8 @@ 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); + +enum quote_type { quote_none, quote_single, quote_many }; +extern char **get_brace_args (enum quote_type type); #endif /* not MACRO_H */ diff --git a/contrib/texinfo/makeinfo/makeinfo.c b/contrib/texinfo/makeinfo/makeinfo.c index 22ed4c4fd9..362687b5c4 100644 --- a/contrib/texinfo/makeinfo/makeinfo.c +++ b/contrib/texinfo/makeinfo/makeinfo.c @@ -1,13 +1,14 @@ /* makeinfo -- convert Texinfo source into other formats. - $Id: makeinfo.c,v 1.74 2004/12/19 17:15:42 karl Exp $ + $Id: makeinfo.c,v 1.123 2008/08/28 22:53:30 karl Exp $ Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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. + the Free Software Foundation, either version 3 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 @@ -15,13 +16,13 @@ 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. + along with this program. If not, see . Original author of makeinfo: Brian Fox (bfox@ai.mit.edu). */ #include "system.h" #include "getopt.h" +#include "mbswidth.h" #define COMPILING_MAKEINFO #include "makeinfo.h" @@ -71,9 +72,6 @@ char *output_filename = NULL; 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. @@ -143,6 +141,11 @@ static int executing_macro = 0; /* True when we are inside a
  • block of a menu. */ static int in_menu_item = 0; +/* The column position of output_paragraph[0]. This is not saved and restored + in the multitable code because flush_output () is only called in environment + 0. */ +static int output_paragraph_start_column = 0; + typedef struct brace_element { struct brace_element *next; @@ -164,6 +167,7 @@ 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 void write_trailer (char *filename, char *trailer); static int end_of_sentence_p (void); void maybe_update_execution_strings (char **text, unsigned int new_len); @@ -350,48 +354,50 @@ 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\ + --document-language=STR locale to use in translating Texinfo keywords\n\ + for the output document (default C).\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); + max_error_level); 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\ + --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\ + -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 the 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 (or 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\ + --disable-encoding do not output accented and special characters\n\ + in Info output based on @documentencoding.\n\ + --enable-encoding override --disable-encoding (default).\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\ + `end' to put them at the end of the node, in\n\ + which they are defined (this is the 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\ @@ -402,14 +408,18 @@ Options for Info and plain text:\n\ puts (_("\ Options for HTML:\n\ - --css-include=FILE include FILE in HTML