summaryrefslogtreecommitdiffstats
path: root/contrib/texinfo
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-06-18 12:57:43 +0000
committerru <ru@FreeBSD.org>2003-06-18 12:57:43 +0000
commit07bc4ba91abd41caff6943cdd2fba218a48492c8 (patch)
tree17923f3c3c11ccba32be7fb4eaa72821a948a5b5 /contrib/texinfo
parentdbea3df4e6605a55f44a33dcfbdb4cdc8fed0da9 (diff)
parentb0465e4534c37946b9f157053a91a25b88ee6c6f (diff)
downloadFreeBSD-src-07bc4ba91abd41caff6943cdd2fba218a48492c8.zip
FreeBSD-src-07bc4ba91abd41caff6943cdd2fba218a48492c8.tar.gz
This commit was generated by cvs2svn to compensate for changes in r116525,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/texinfo')
-rw-r--r--contrib/texinfo/AUTHORS24
-rw-r--r--contrib/texinfo/COPYING345
-rw-r--r--contrib/texinfo/ChangeLog565
-rw-r--r--contrib/texinfo/NEWS48
-rw-r--r--contrib/texinfo/TODO8
-rw-r--r--contrib/texinfo/config.h.in3
-rw-r--r--contrib/texinfo/doc/fdl.texi8
-rw-r--r--contrib/texinfo/doc/info-stnd.texi14
-rw-r--r--contrib/texinfo/doc/info.12
-rw-r--r--contrib/texinfo/doc/install-info.12
-rw-r--r--contrib/texinfo/doc/makeinfo.110
-rw-r--r--contrib/texinfo/doc/texindex.12
-rw-r--r--contrib/texinfo/doc/texinfo.txi905
-rw-r--r--contrib/texinfo/doc/version-stnd.texi8
-rw-r--r--contrib/texinfo/doc/version.texi8
-rw-r--r--contrib/texinfo/info/display.c25
-rw-r--r--contrib/texinfo/info/indices.c7
-rw-r--r--contrib/texinfo/info/info-utils.c25
-rw-r--r--contrib/texinfo/info/info-utils.h7
-rw-r--r--contrib/texinfo/info/info.c53
-rw-r--r--contrib/texinfo/info/info.h37
-rw-r--r--contrib/texinfo/info/infodoc.c12
-rw-r--r--contrib/texinfo/info/infokey.c25
-rw-r--r--contrib/texinfo/info/man.c8
-rw-r--r--contrib/texinfo/info/nodes.c35
-rw-r--r--contrib/texinfo/info/window.c8
-rw-r--r--contrib/texinfo/lib/system.h15
-rw-r--r--contrib/texinfo/lib/xalloc.h2
-rw-r--r--contrib/texinfo/lib/xexit.c20
-rw-r--r--contrib/texinfo/makeinfo/cmds.c60
-rw-r--r--contrib/texinfo/makeinfo/defun.c33
-rw-r--r--contrib/texinfo/makeinfo/files.c11
-rw-r--r--contrib/texinfo/makeinfo/files.h3
-rw-r--r--contrib/texinfo/makeinfo/html.c213
-rw-r--r--contrib/texinfo/makeinfo/index.c125
-rw-r--r--contrib/texinfo/makeinfo/insertion.c41
-rw-r--r--contrib/texinfo/makeinfo/lang.c158
-rw-r--r--contrib/texinfo/makeinfo/lang.h12
-rw-r--r--contrib/texinfo/makeinfo/macro.c56
-rw-r--r--contrib/texinfo/makeinfo/makeinfo.h49
-rw-r--r--contrib/texinfo/makeinfo/node.c45
-rw-r--r--contrib/texinfo/makeinfo/sectioning.c35
-rw-r--r--contrib/texinfo/makeinfo/xml.c15
-rw-r--r--contrib/texinfo/util/texindex.c50
44 files changed, 2464 insertions, 673 deletions
diff --git a/contrib/texinfo/AUTHORS b/contrib/texinfo/AUTHORS
index d14143e..1c5bfad 100644
--- a/contrib/texinfo/AUTHORS
+++ b/contrib/texinfo/AUTHORS
@@ -1,12 +1,26 @@
-$Id: AUTHORS,v 1.4 2002/10/09 22:23:44 karl Exp $
+$Id: AUTHORS,v 1.5 2003/05/08 00:51:55 karl Exp $
Texinfo authors.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
-Richard Stallman, Brian Fox, Bob Chassell, Noah Friedman, Paul Rubin,
-Karl Berry, Eli Zaretskii, Philippe Martin, and many others.
+Akim Demaille texi2dvi.
+Andreas Schwab texinfo.tex, configure.ac, most makeinfo files.
+Bob Chassell texinfo.tex, original texinfo.txi.
+Brian Fox all makeinfo/* and info/* files, info-stnd.texi.
+Dave Love original makeinfo/html.[ch].
+Eli Zaretskii all files.
+Karl Berry all files.
+Noah Friedman original texi2dvi.
+Paul Rubin original makeinfo/multi.c.
+Philippe Martin original makeinfo xml/docbook output.
+Richard Stallman original texinfo.tex, install-info.c,
+ texindex.c, texinfo.txi.
+Zack Weinberg texinfo.tex (@macro implementation).
-Please see http://www.iro.umontreal.ca/contrib/po/HTML/team-LL.html for
-the translation teams for a given language LL.
+See http://www.iro.umontreal.ca/contrib/po/HTML/team-LL.html for the
+translation teams for a given language LL.
+
+Many files included in Texinfo distribution are copied from other
+locations. See util/srclist*.
diff --git a/contrib/texinfo/COPYING b/contrib/texinfo/COPYING
index e81facd..d60c31a 100644
--- a/contrib/texinfo/COPYING
+++ b/contrib/texinfo/COPYING
@@ -1,11 +1,340 @@
-The files in here are all Copyright (C) Free Software Foundation, and
-are under three different licenses:
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
-* GPL - (text in doc/COPYING)
-* LGPL - (text in doc/COPYING.LIB)
-* FDL - (text in doc/COPYING.DOC and doc/fdl.texi)
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
-The source files are grouped by license into their respective
-directories. All documents in doc/ contain the relevant licensing
-information.
+ Preamble
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/contrib/texinfo/ChangeLog b/contrib/texinfo/ChangeLog
index 45597d0..fbbaff6 100644
--- a/contrib/texinfo/ChangeLog
+++ b/contrib/texinfo/ChangeLog
@@ -1,3 +1,553 @@
+2003-06-10 <karl@gnu.org>
+
+ * version 4.6.
+
+2003-06-04 <karl@gnu.org>
+
+ * config.sub: update from gnulib.
+
+2003-06-03 <karl@gnu.org>
+
+ * mkinstalldirs: update from gnulib.
+
+2003-06-02 Akim Demaille <akim@epita.fr>
+
+ * util/texi2dvi (tex_envvars): New.
+ Use it to forward -I directories to BIBINPUTS and BSTINPUTS, in
+ addition of INDEXSTYLE and TEXINPUTS.
+
+2003-06-02 <karl@gnu.org>
+
+ * makeinfo/html.c (html_output_head): don't output the <link>, to
+ avoid having mozilla put up a document navigation bar when
+ we don't have anything else to support it yet. Report from:
+ Per Bothner.
+ * makeinfo/makeinfo.c: no need to declare add_link or
+ add_escaped_anchor_name, since they are not used.
+
+ * doc/texinfo.txi (Contents): recommend @contents at the beginning
+ more strongly. Suggestions from Kevin Ryde.
+
+2003-06-01 <karl@gnu.org>
+
+ * makeinfo/macro.c (apply): make \\ expand to \ even if the macro
+ has no arguments. Report from: Jesper Harder <harder@ifa.au.dk>,
+ 31 May 2003 02:56:20 +0200.
+
+2003-05-31 <karl@gnu.org>
+
+ * util/dir-example (C++ libraries): new category, suggested by Bruno.
+
+2003-05-29 <karl@gnu.org>
+
+ * configure.ac: pretest version 4.5.93.
+
+2003-05-29 gettextize <bug-gnu-gettext@gnu.org>
+
+ * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.12.1.
+
+2003-05-26 <karl@gnu.org>
+
+ * util/texi2dvi: spurious \ in tex_args assignment.
+
+ * doc/texinfo.txi (Contents): trim excess words.
+
+2003-05-25 <karl@gnu.org>
+
+ * util/texi2dvi: extra quotes for the tex_args assignment in
+ --batch mode.
+
+2003-05-19 <karl@gnu.org>
+
+ * lib/xexit.c: translate fflush error messages, add newlines
+ (report from Jim Meyering).
+ * util/{texindex.c,install-info.c},
+ * makeinfo/makeinfo.c,
+ * info/info.c: use xexit again, with redundant return to avoid
+ warnings.
+
+2003-05-18 <karl@gnu.org>
+
+ * lib/xexit.c (xexit): fputs not fprintf, so we get newline;
+ translate the messages, too. Report from Jim Meyering.
+
+ * util/dir-example: move gcc/automake entries.
+
+ * pretest version 4.5.92.
+
+ * update to automake 1.7.5.
+
+ * makeinfo/html.c (append_char): forgot to increment length, duh.
+ Report from: "Torsten Bronger" <bronger@physik.rwth-aachen.de>,
+ 18 May 2003 14:36:23 +0200.
+
+2003-05-17 <karl@gnu.org>
+
+ * makeinfo/makeinfo.c (defining_copying): new fn.
+ (add_char): call it, when testing if we should
+ call html_output_head.
+ Report from: Torsten Bronger <bronger@physik.rwth-aachen.de>,
+ 17 May 2003 22:10:42 +0200.
+
+ * configure.ac: pretest version 4.5.91.
+
+2003-05-16 <karl@gnu.org>
+
+ * makeinfo/index.c (sort_index): don't deref NULL. Report from Jan.
+
+2003-05-13 <karl@gnu.org>
+
+ * makeinfo/html.c (append_char): appease sgi compiler.
+ * makeinfo/html.c (insert_html_tag): remove spurious arg to pop_tag,
+ From: ezra peisach <epeisach@med-xtal.bu.edu>, 13
+ May 2003 12:13:40 -0400.
+
+ Fix a few GCC warnings, reported by Jim Meyering:
+
+ * info/nodes.c: parenthesize assignment used as truth value.
+ * info/nodemenu.c (format_node_info): strcpy instead of sprintf,
+ since there's no format.
+ * makeinfo/makeinfo.c (isolate_nodename): remove spurious decl.
+ * makeinfo/xml.c (xml_insert_indexterm): declare as void.
+ * info/key.c: initialize with 0,0 at end.
+ * info/infokey.c (main): return instead of xexit, and remove
+ unused variable.
+ * makeinfo/html.c (init_buffer): forgot to return buf.
+ * info/info.c (remember_info_program_name): remove spurious
+ declaration.
+
+ * makeinfo/sectioning.c,
+ * info/infomap.c: remove unused variables.
+
+ * makeinfo/makeinfo.c (insert_toplevel_subdirectory),
+ * info/man.c,
+ * info/infodoc.c (info_find_or_create_help_window): parenthesize
+ && within ||.
+ * info/display.c (display_update_one_window): initialize rep to
+ NULL, parenthesize && within ||.
+
+ * util/install-info.c,
+ * info/info.c (main),
+ * info/makedoc.c (main): return instead of xexit.
+
+2003-05-13 Akim Demaille <akim@epita.fr>
+
+ * util/texi2dvi (get_xref_files): Pass --file-line-error-style
+ to TeX when supported.
+
+2003-05-12 <karl@gnu.org>
+
+ * configure.ac: pretest version 4.5.90.
+
+ * Makefile.am (EXTRA_DIST): add onceonly.m4.
+
+ * makeinfo/tests/accentenc: must discard stderr since we expect
+ two errors in this case.
+
+ * makeinfo/makeinfo.c (main): new option --css-include.
+ (usage): add to --help message.
+ * makeinfo/makeinfo.h (css_include): new global.
+ * makeinfo/html.c (append_char, process_css_file): new fns
+ implementing it.
+ (html_output_head): call it.
+ * doc/texinfo.txi (HTML CSS): new node describing it.
+ Also split up the Generating HTML node into subnodes.
+
+ * config.{guess,sub}: update from gnulib.
+
+2003-05-10 <karl@gnu.org>
+
+ * makeinfo/index.c (sort_index): allocate the sorted index in new
+ memory, and set the original index to that, to avoid problems with
+ @printindex being called twice on the same index.
+ (cm_printindex): do not free the returned index.
+ Report from: Dumas Patrice <dumas@centre-cired.fr>, 9 May 2003
+ 15:12:21 +0200.
+
+2003-05-09 <karl@gnu.org>
+
+ * makeinfo/defun.c (cm_defun): issue error message without extra
+ x's. Report from: Dumas Patrice <dumas@centre-cired.fr>, 9 May
+ 2003 17:24:25 +0200.
+
+2003-05-07 Akim Demaille <akim@epita.fr>
+
+ * util/texi2dvi (textra_cmd): New.
+ (textra): Escape escapes from sed's evaluation.
+ Use them to support additional TeX/LaTeX commands.
+ Support --command as a synonym for --texinfo.
+
+2003-05-06 <karl@gnu.org>
+
+ * util/dir-example: finish getting rid of GNU packages.
+
+2003-05-04 <karl@gnu.org>
+
+ * doc/texinfo.tex (\itemizey): if no arg to @itemize, default to
+ @bullet. Fix from: Stepan Kasal <kasal@math.cas.cz> 2 May 2003
+ 09:32:11 +0200, report from: Jesper Harder <harder@ifa.au.dk>.
+
+2003-04-30 <karl@gnu.org>
+
+ * makeinfo/.gdbinit: no colon on local variables.
+
+ * doc/texinfo.txi (documentencoding): Document new Info output feature.
+ makeinfo/lang.h (encoding_type): rename `ecname' member to `encname'.
+ makeinfo/html.c, lang.c: change usage.
+ makeinfo/lang.c (cm_documentencoding): fix typo in warning.
+ makeinfo/makeinfo.h (SPLIT_SIZE_THRESHOLD): remove.
+ (info_trailer): declare.
+ makeinfo/makeinfo.c (info_trailer): new fn to generate Local
+ Variables: section if --enable-encoding and
+ @documentencoding are given.
+ (convert_from_loaded_file): call it.
+ * makeinfo/node.c (split_file): write trailer into each split
+ file. Also, simply split files if file size is less than
+ --split-size, removing SPLIT_SIZE_THRESHOLD.
+
+ * doc/texinfo.tex: remove trailing whitespace.
+
+2003-04-29 <karl@gnu.org>
+
+ * makeinfo/node.c (cm_anchor): normalize_node_name so that an
+ anchor named "TOP" or "top" or whatever is not allowed. Report
+ from: Dumas Patrice <dumas@centre-cired.fr>, 29 Apr 2003 18:56:51
+ +0200.
+
+2003-04-28 <karl@gnu.org>
+
+ * makeinfo/makeinfo.c: whitespace cleanup.
+
+ * doc/texinfo.tex (\doprintindex): don't \kern-\parindent, it makes
+ the first index entry stick out to the left.
+ Report from: Jesper Harder <harder@ifa.au.dk>,
+ 28 Apr 2003 03:10:36 +0200.
+
+ From Akim Demaille <akim@epita.fr>:
+ * makeinfo/makeinfo.c (cm_value): Warn for undefined flags.
+
+2003-04-27 <karl@gnu.org>
+
+ * doc/texinfo.tex (\footnote, \smartitalicx): use \ptexslash
+ for italic correction instead of \/, since we've redefined \/ now.
+ Report from: Jesper Harder <harder@ifa.au.dk>, 27 Apr 2003
+ 23:30:29 +0200.
+
+ * util/dir-example (mailutils): more from Wojciech Polak.
+ (autoconf): align/edit/sort entries.
+
+2003-04-26 <karl@gnu.org>
+
+ * doc/texinfo.txi (Image Syntax): second and following @image args
+ optional. Report from: Max Techter <mtechter@gmx.de>, 26 Apr 2003
+ 15:50:02 +0200.
+
+ * util/dir-example (anubis): request from Wojciech Polak.
+
+2003-04-25 <karl@gnu.org>
+
+ * makeinfo/defun.c (defun_internal): whitespace needed in docbook
+ output for deftype*. From: José Fonseca
+ <j_r_fonseca@yahoo.co.uk>, 25 Apr 2003 13:07:13 +0100.
+
+2003-04-21 <karl@gnu.org>
+
+ * doc/texinfo.tex (\dofirstparagraphindent): forgot to rename the
+ \...word's.
+ (\suppressfirstparagraphindent): forgot to rename
+ to \dosuppress... Reported by Simon.
+
+2003-04-20 <karl@gnu.org>
+
+ * Installed changes from Simon for suppressing indentation on the
+ first paragraph after section headings, and for new @indent command:
+
+ 2003-04-12 Simon Law <sfllaw@engmail.uwaterloo.ca>
+ * doc/texinfo.tex (\firstparagraphindent): implement suppression
+ of the indentation of the first paragraph.
+ (\dofirstparagraphindent): for parsing arguments.
+ (\suppressfirstparagraphindent): suppress, or don't suppress.
+ (\dosuppressfirstparagraphindent): the actual gobbling of indentation.
+ (\footnote): Compensate for the hanging-indent side-effect.
+ (\numhead, \apphead, \unnmhead): call \dosuppress...
+ * makeinfo/cmds.c (command_table): add "firstparagraphindent"
+ (as cm_firstparagraphindent)
+ (set_firstparagraphindent, cm_firstparagraphindent): implement
+ @firstparagraphindent parsing of options.
+ * makeinfo/makeinfo.h: declare "do_first_par_indent".
+ * makeinfo/sectioning.c (sectioning_underscore): suppress
+ indentation if requested.
+ * doc/texinfo.txi: document it.
+
+ * doc/texinfo.tex (\indent): override \indent primitive to
+ clear \everypar.
+ (\ptexindent): for saving/restoring \indent in @tex.
+ (\footnote): Neutralise the effect of @indent
+ within a footnote.
+ * makeinfo/cmds.c (command_table): add "indent" (as cm_indent).
+ (cm_indent): un-inhibit_paragraph_indentation.
+ * doc/texinfo.txi: document it.
+
+ * doc/texinfo.txi (Conventions): remove spurious extra vertical space
+ from bulleted itemize which starts with a quote.
+
+ * makeinfo/cmds.c (command_table): fix @novalidate definition.
+
+
+ * Installed changes from Jan for @image support in Info format:
+
+ 2003-04-14 Jan Nieuwenhuizen <janneke@gnu.org>
+ * info/display.c (display_update_one_window): Skip new style
+ image tag/cookie.
+
+ 2003-04-09 Jan Nieuwenhuizen <janneke@gnu.org>
+ * makeinfo/makeinfo.c (cm_image): Write ^@^H[image ...^@^H] tag.
+
+
+ * makeinfo/html.c (html_output_head): use <style> to get the
+ regular roman font instead of typewriter for @format and @display;
+ likewise to reduce the font size for @small*. Suggestion from:
+ "Torsten Bronger" <bronger@physik.rwth-aachen.de>, 20 Apr 2003
+ 11:03:59 +0200.
+
+2003-04-18 <karl@gnu.org>
+
+ * configure.ac (ncurses/termcap.h): move test to after termlib's
+ definition, of course. Reported by Norton Allen
+ <allen@huarp.harvard.edu>, 18 Apr 2003 13:31:35 -0400.
+
+ * configure.ac: remove comma from comment in AC_TRY_LINK program,
+ to avoid spurious misinterpretation as an argument delimiter.
+
+2003-04-08 <karl@gnu.org>
+
+ * makeinfo/makeinfo.c (usage): avoid double blank line.
+
+2003-04-05 <karl@gnu.org>
+
+ * Makefile.am (all of them): use $(VAR) instead of @VAR@, since
+ automake now emits definitions for all substituted variables.
+
+ * makeinfo/makeinfo.h (DEFAULT_SPLIT_SIZE): increase to 300,000.
+ (SPLIT_SIZE_THRESHOLD): increase to 500,000.
+ Implicit suggestion via Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>.
+
+2003-04-04 <karl@gnu.org>
+
+ * util/texi2dvi (replace_empty): new variable to do the empty path
+ element detection; don't hardwire path separator as :.
+
+2003-04-02 <karl@gnu.org>
+
+ * doc/txi-pl.tex: new file, from polak@gnu.org.
+ * doc/Makefile.am (TXI_XLATE): add it.
+
+2003-04-01 <karl@gnu.org>
+
+ * makeinfo/makeinfo.c (main): correct wording of html/no-headers/split
+ error message, and don't complain if output is to stdout.
+
+ * makeinfo/insertion.c (end_insertion): for @end menu html output,
+ don't output </ul> if no_headers. Report from: Jesper
+ Harder <harder@ifa.au.dk>, 01 Apr 2003 00:00:37 +0200.
+
+ * info/infomap.c (fetch_user_maps): don't complain if .info
+ doesn't exist.
+
+2003-03-31 <karl@gnu.org>
+
+ * makeinfo/lang.c (iso8859_2_map): new encoding map.
+ (encoding_table): enable it.
+
+ * info/pcterm.c (pc_up_line): use MAX instead of max (no longer
+ defined). Reported by Richard Dawes.
+
+ * doc/texinfo.txi (documentencoding): mention that all processors
+ recognize the command.
+
+2003-03-30 <karl@gnu.org>
+
+ * makeinfo/lang.c (cm_special_character): incorrectly added html
+ sequences for @oe and @OE even in info output.
+
+2003-03-25 <karl@gnu.org>
+
+ * util/srclist.txt (COPYING): get from gnulib/doc, not gnulib.
+
+2003-03-24 <karl@gnu.org>
+
+ * TODO: need to write real definition of Info format.
+
+ * makeinfo/node.c (cm_node): use &nbsp; instead of ` ', to avoid
+ line breaks.
+
+2003-03-22 <karl@gnu.org>
+
+ * makeinfo/node.c (cm_node): output a space after the Node: and
+ similar headers, since Bob wants one.
+
+ * info/pcterm.c (MIN,MAX): moved to system.h.
+ * info/session.c (MIN): moved to system.h.
+ * makeinfo/sectioning.c (MIN): move to system.h.
+ * lib/system.h (MIN,MAX): define here.
+
+ * makeinfo/sectioning.c (sectioning_html): don't go smaller than <h3>.
+ Reported by Bob.
+ (MIN): new macro.
+
+ * info/session.c (MIN) [MIN]: #undef first if already #define'd.
+
+ * doc/texinfo.tex (\nodexxx): use a control sequence instead of
+ brackets to parse the parts of @node. Otherwise node names with
+ brackets cause spurious output. Reported by Bob.
+ (\xrefprintnodename): separate this out from
+ \xrefX, for easier redefining by Bob.
+
+2003-03-18 <karl@gnu.org>
+
+ * makeinfo/insertion.c (cm_item): ensure we don't go off the end
+ of the string when using strncmp. From: Peter N Lewis
+ <peter@stairways.com.au>, 13 Mar 2003 16:08:27 +0800.
+
+ * doc/texinfo.txi (Raw Formatter Commands): mention using \gdef
+ within @tex, not \def.
+
+2003-03-12 <karl@gnu.org>
+
+ * doc/texinfo.txi (Preparing for TeX): mention extra colons.
+
+2003-03-07 <karl@gnu.org>
+
+ * doc/texinfo.tex (\/): new command to allow a line break.
+ (\ptexslash): for saving/restoring primitive \/ in @tex.
+ * makeinfo/cmds.c (command_table): add "/" (as cm_no_op).
+ * makeinfo/makeinfo.c (self_delimiting): add /.
+ * doc/texinfo.txi (Line Breaks, Command Summary): document it.
+ Suggestion from wl.
+
+ * doc/texinfo.tex (\hyphenation): time-stamp.
+
+2003-03-06 <karl@gnu.org>
+
+ * info/session.c (nearest_xref): new fn.
+ (info_menu_or_ref_item): call it when we are
+ searching for xrefs, instead of just looking on
+ the current line.
+ * info/info-utils.c (info_copy_reference): new fn.
+ * info/info-utils.h (info_copy_reference): declare.
+ Bug report from: rich@phekda.freeserve.co.uk,
+ 04 Mar 2003 17:51:47 +0000.
+
+ * */.gdbinit: set env MALLOC_CHECK_.
+
+ 2003-03-06 Ralph Schleicher <rs@nunatak.allgaeu.org>
+ * makeinfo/files.h (get_file_info_in_path): Declare function.
+ * makeinfo/files.c (get_file_info_in_path): Remove static keyword.
+ * makeinfo/makeinfo.c (cm_image): Lookup image file name in the
+ search path for include files.
+
+2003-03-05 <karl@gnu.org>
+
+ * makeinfo/makeinfo.c (insert_toplevel_subdirectory): always make
+ subdirectory for html. Before, if the current directory happened
+ to be named `foo' and the @setfilename was foo.info, we would
+ write the split html files into the current directory. Reported
+ by rich@phekda.freeserve.co.uk, 01 Mar 2003 12:03:13 +0000.
+
+ * makeinfo/files.c (filename_part): simplify assignment.
+
+2003-02-24 <karl@gnu.org>
+
+ * makeinfo/insertion.c (get_item_function): check for @item in
+ argument to @itemize. Report from: Dumas Patrice
+ <dumas@centre-cired.fr>, 24 Feb 2003 13:13:52 +0100.
+
+ * makeinfo/makeinfo.c (remember_brace): say `braces' instead of
+ `{...}', since often we don't actually expect text inside the
+ braces.
+
+2003-02-21 <karl@gnu.org>
+
+ * aclocal.m4: automake 1.7.3.
+
+2003-02-19 <karl@gnu.org>
+
+ * doc/info-stnd.texi: omit all node pointers.
+
+2003-02-18 <karl@gnu.org>
+
+ * util/texindex.c (maketempname): use already-set `tempdir' instead
+ of half-redoing the logic.
+ (concat): only need two args, not three; change callers.
+ (perror_with_name): really call perror, putting
+ the name first a la gcc.
+ (pfatal_with_name): call perror_with_name.
+
+ * util/texi2dvi (get_xref_files): a file whose first line is
+ \input texinfo is not an index file. Report from: Anton Ertl
+ <anton@a0.complang.tuwien.ac.at>, 18 Feb 2003 14:41:47 +0100.
+
+2003-02-16 <karl@gnu.org>
+
+ * makeinfo/index.c (init_indices): don't try to free indexes that
+ undefindex already freed. Report from: Arkadiusz
+ Miskiewicz <misiek@pld.ORG.PL>,
+ 15 Feb 2003 13:22:49 +0100.
+
+ * configure.ac (curses): forgot to quote arg to AC_TRY_LINK.
+ From vojta and te, 16 Feb 2003 01:37:09 +0100.
+
+2003-02-13 <karl@gnu.org>
+
+ * makeinfo/insertion.c (begin_insertion): for html cartouche
+ output, add class="cartouche". Suggestion from Stephen.
+
+2003-02-11 <karl@gnu.org>
+
+ * Installed patch:
+ 2003-02-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+ * info/indices.c, info/info.c, info/info.h, info/nodemenu.c,
+ info/session.c, info/window.c, makeinfo/defun.c, makeinfo/html.c,
+ makeinfo/index.c, makeinfo/insertion.c, makeinfo/makeinfo.c,
+ makeinfo/makeinfo.h, makeinfo/node.c: declare all constant
+ strings as such in order to avoid lots of gcc warnings (for
+ --disable-nls and maybe without that as well).
+
+ * doc/texinfo.tex (\registeredsymbol): new command for Arnold.
+
+ * util/dir-example: dc to basics.
+
+ * doc/texinfo.txi (Defining Macros): document new requirements on
+ macro names. Report from: Alper Ersoy
+ <dirt@gtk.org>, 11 Feb 2003 05:11:35 +0200.
+
+2003-02-07 <karl@gnu.org>
+
+ * makeinfo/insertion.c (begin_insertion): output a table with a border
+ for @cartouche.
+ (end_insertion): end the table.
+ From: Joshua N Pritikin <vishnu@pobox.com>,
+ 7 Feb 2003 21:59:49 +0530.
+
+2003-02-05 <karl@gnu.org>
+
+ * info/info.c (short_options): add h.
+ (main): treat -h same as --help.
+ From: rwhron@earthlink.net, 31 Aug 2002 19:56:57 -0400.
+
+ * info/session.c (show_isearch_prompt): compute length of
+ translated "Failing ", don't assume 20 is enough.
+ (It's 21 bytes in UTF-8 Russian.)
+ Report from: varg@thsun1.jinr.ru,
+ 25 Jul 2002 15:26:42 +0400.
+
+ * info/display.c (display_update_one_window): don't derefence null
+ `entry' (if the screen is very small).
+ From: Danny Yoo <dyoo@hkn.eecs.berkeley.edu>,
+ 8 Jul 2002 15:21:14 -0700.
+
+ * doc/.cvsignore: ignore *.info and texput.log.
+
2003-02-04 <karl@gnu.org>
* Version 4.5 (that info bug was a killer).
@@ -113,7 +663,7 @@
(info_signal_proc): reread window size in case it has changed
while we were suspended.
- Mon Jan 27 08:09:07 CET 2003 Stepan Kasal <kasal@math.cas.cz>
+ Mon Jan 27 08:09:07 CET 2003 Stepan Kasal <kasal@math.cas.cz>
* doc/texinfo.tex (\acuteaccent): the workaround is no longer needed.
(\xrefX): \normalturnoffactive changed to \turnoffactive, since
we \otherbackslash right afterwards anyway.
@@ -319,7 +869,7 @@ Wed Jan 22 14:25:39 CET 2003 Stepan Kasal <kasal@math.cas.cz>
Fri Jan 10 07:12:23 CET 2003 Stepan Kasal <kasal@math.cas.cz>
* texinfo.tex (\writetocentry): The
common work on building the line for \write\tocfile was
- moved into the macro itself and thus all callers has been changed.
+ moved into the macro itself and thus all callers has been changed.
2003-01-09 <karl@gnu.org>
@@ -487,7 +1037,7 @@ Wed Jan 22 14:25:39 CET 2003 Stepan Kasal <kasal@math.cas.cz>
verbatim line.
Report from: Torsten Bronger <bronger@physik.rwth-aachen.de>
25 Nov 2002 18:26:12 +0100.
-
+
(\doverbatim): ignore everything up to the first
^^M, to avoid an extra blank line in the output.
@@ -683,7 +1233,7 @@ Wed Jan 22 14:25:39 CET 2003 Stepan Kasal <kasal@math.cas.cz>
2002-11-04 <karl@gnu.org>
* doc/texinfo.txi (File End): grammar.
-
+
These changes from gildea:
* makeinfo/cmds.c (cm_titlepage): new fn, and use it for @titlepage.
@@ -754,7 +1304,7 @@ Wed Jan 22 14:25:39 CET 2003 Stepan Kasal <kasal@math.cas.cz>
regular line spacing a long time ago to not be double-spaced.
In @smallbook mode, it ironically caused excessive line spacing.
(\nonfillstart, \quotation): don't call it.
-
+
* doc/texinfo.tex (\smartslanted, \smartitalic): use \ttsl if in
typewriter.
From: Bob Wilson <bwilson@tensilica.com>.
@@ -11949,6 +12499,11 @@ Mon Aug 15 14:33:51 1988 Robert J. Chassell (bob at spiff)
Month Day, Year format to a Day Month Year format. Left old
version commented out.
+
+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.
+
Local Variables:
mode: indented-text
diff --git a/contrib/texinfo/NEWS b/contrib/texinfo/NEWS
index b3039a0..e5bd234 100644
--- a/contrib/texinfo/NEWS
+++ b/contrib/texinfo/NEWS
@@ -1,7 +1,7 @@
-$Id: NEWS,v 1.34 2003/02/05 00:54:07 karl Exp $
+$Id: NEWS,v 1.57 2003/06/10 20:50:03 karl Exp $
This file records noteworthy changes.
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2003,
2001, 2002, 2003 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
@@ -22,6 +22,45 @@ convenience, here's a url to one of the relevant sections:
-------------------------------------------------------------------------------
+4.6 (10 June 2003)
+* Language:
+ . new command @/ specifies an allowable breakpoint within a line.
+ . new command @dofirstparagraphindent to control whether the first
+ paragraph following a section heading is indented. Default is to
+ omit this indentation, unlike the output up to now.
+ . new command @indent for explicitly indenting a paragraph.
+ . makeinfo writes a new construct for @image in Info output, so that
+ graphical Info browsers (such as Emacs Info under X) can display an
+ actual image. (Standalone Info ignores this, since it runs in a tty.)
+* makeinfo:
+ . Common:
+ - search for image files in the include file search path.
+ - warns if @value is used on an undefined variable.
+ . Info output:
+ - default --split-size now 300,000 bytes, up from 50,000.
+ - with --enable-encoding and a given @documentencoding,
+ output a Local Variables section specifying that encoding, for use
+ with Emacs.
+ . HTML output:
+ - uses <h3> at the smallest.
+ - a few css <style> definitions are included to better
+ implement @format, @display, @small..., etc.
+ - new option --css-include=FILE includes FILE in the <style>.
+ - @cartouche now outputs a <table> with a border.
+* texinfo.tex:
+ . new Polish translation txi-pl.tex.
+* texi2dvi:
+ . --command=CMD replaces --texinfo=CMD; it inserts CMD at the first
+ line of LaTeX files now, or after the @setfilename for Texinfo files.
+* info:
+ . RET now goes to the nearest xref (rather like Emacs Info),
+ instead of the next xref starting on the current line.
+* Distribution:
+ . new Romanian (ro) translation.
+ . variables now declared const where appropriate.
+ . gettext 0.12.1, automake 1.7.5.
+
+
4.5 (4 February 2003)
* info:
. a bug in 4.4 prevented compressed info files from being found.
@@ -38,6 +77,7 @@ convenience, here's a url to one of the relevant sections:
. @value constructs are now expanded in the filename arguments to
@include and @verbatiminclude.
* makeinfo:
+ . @macro names may no longer include ^ or _, for the sake of math mode.
. bug fix: @copying text is now reflected in tag table positions;
before, nodes may not have been found with a long-enough @copying.
. bug fix: html @verb arg is quoted properly, and does not imply
@@ -61,7 +101,7 @@ convenience, here's a url to one of the relevant sections:
. getopt and other common library files updated from gnulib
(http://savannah.gnu.org/projects/gnulib/).
. autoconf 2.57, automake 1.7.2.
-
+
4.3 (14 November 2002)
* Language:
@@ -122,11 +162,13 @@ convenience, here's a url to one of the relevant sections:
. supports xml and docbook output.
. supports HTML splitting by node, which is now the default.
. new option --split-size to control maximum size of split info files.
+ . new option --enable-encoding to enable
* info:
. user-specified key bindings supported.
. ANSI escape sequences (as produced by groff) removed from man output
by default; use --raw-escapes to let them through if your terminal
supports them.
+ . RET terminates incremental search normally.
* texinfo.tex:
. @math implies @tex, so all the usual plain TeX math is supported.
. smaller fonts for @smallexample, in all page sizes.
diff --git a/contrib/texinfo/TODO b/contrib/texinfo/TODO
index 39c1736..e350c1b 100644
--- a/contrib/texinfo/TODO
+++ b/contrib/texinfo/TODO
@@ -1,4 +1,4 @@
-$Id: TODO,v 1.6 2003/01/27 13:05:44 karl Exp $
+$Id: TODO,v 1.8 2003/04/27 13:12:24 karl Exp $
This is the todo list for GNU Texinfo.
If you are interested in working on any of these, email bug-texinfo@gnu.org.
@@ -104,6 +104,7 @@ If you are interested in working on any of these, email bug-texinfo@gnu.org.
- Incorporate an X-based viewer, perhaps tkinfo
http://www.math.ucsb.edu/~boldt/tkinfo/
or saxinfo.
+ - Write technical definition of Info format.
* PDF:
- make each letter of the index (A, B, ...) a section in the TOC.
@@ -113,6 +114,11 @@ If you are interested in working on any of these, email bug-texinfo@gnu.org.
- be able to copy the info file to compile-time $(infodir), to
simplify by-hand installation.
+* texindex:
+ - read source file (specified by new option) for @documentlanguage
+ and/or @documentencoding, and change the sorting appropriately.
+ From: Wojciech Polak <polak@gnu.org>, 26 Apr 2003 11:30:59 +0200.
+
Ideas that will not be implemented:
- Process Texinfo files directly instead of converting to Info:
diff --git a/contrib/texinfo/config.h.in b/contrib/texinfo/config.h.in
index 02f834c..9af5408 100644
--- a/contrib/texinfo/config.h.in
+++ b/contrib/texinfo/config.h.in
@@ -279,6 +279,9 @@
/* Define to 1 if you have the `__argz_stringify' function. */
#undef HAVE___ARGZ_STRINGIFY
+/* Define to 1 if you have the `__fsetlocking' function. */
+#undef HAVE___FSETLOCKING
+
/* Define to 1 if you have the `__secure_getenv' function. */
#undef HAVE___SECURE_GETENV
diff --git a/contrib/texinfo/doc/fdl.texi b/contrib/texinfo/doc/fdl.texi
index 89a012d..11737cc 100644
--- a/contrib/texinfo/doc/fdl.texi
+++ b/contrib/texinfo/doc/fdl.texi
@@ -344,7 +344,7 @@ and independent documents or works, in or on a volume of a storage or
distribution medium, is called an ``aggregate'' if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation's users beyond what the individual works permit.
-When the Document is included an aggregate, this License does not
+When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.
@@ -366,7 +366,7 @@ permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
-Document, and any Warrany Disclaimers, provided that you also include
+Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between
the translation and the original version of this License or a notice
@@ -421,8 +421,8 @@ license notices just after the title page:
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
- Texts. A copy of the license is included in the section entitled
- ``GNU Free Documentation License''.
+ Texts. A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
@end group
@end smallexample
diff --git a/contrib/texinfo/doc/info-stnd.texi b/contrib/texinfo/doc/info-stnd.texi
index 02640cf..879977c 100644
--- a/contrib/texinfo/doc/info-stnd.texi
+++ b/contrib/texinfo/doc/info-stnd.texi
@@ -1,5 +1,5 @@
\input texinfo @c -*-texinfo-*-
-@comment $Id: info-stnd.texi,v 1.4 2002/11/06 00:42:29 karl Exp $
+@comment $Id: info-stnd.texi,v 1.5 2003/02/19 13:32:54 karl Exp $
@comment %**start of header
@setfilename info-stnd.info
@include version-stnd.texi
@@ -14,7 +14,7 @@ This manual is for GNU Info (version @value{VERSION}, @value{UPDATED}),
a program for viewing documents in Info format (usually created from
Texinfo source files).
-Copyright @copyright{} 1992, 1993, 1996, 1997, 1998, 1999, 2001, 2002
+Copyright @copyright{} 1992, 1993, 1996, 1997, 1998, 1999, 2001, 2002, 2003
Free Software Foundation, Inc.
@quotation
@@ -1047,7 +1047,7 @@ different node, perhaps in another Info file. Such pointers are called
* Selecting Xrefs:: Commands for selecting menu or note items.
@end menu
-@node Parts of an Xref, Selecting Xrefs, , Xref Commands
+@node Parts of an Xref
@section Parts of an Xref
Cross references have two major parts: the first part is called the
@@ -1095,7 +1095,7 @@ documentation: @xref{xref, , Writing an Xref, texinfo, the Texinfo
Manual}, for more information on creating your own texinfo cross
references.
-@node Selecting Xrefs, , Parts of an Xref, Xref Commands
+@node Selecting Xrefs
@section Selecting Xrefs
The following table lists the Info commands which operate on menu items.
@@ -1206,7 +1206,7 @@ windows.
* The Echo Area:: Used for displaying errors and reading input.
@end menu
-@node The Mode Line, Basic Windows, , Window Commands
+@node The Mode Line
@section The Mode Line
A @dfn{mode line} is a line of inverse video which appears at the bottom
@@ -1256,7 +1256,7 @@ showing possible completions:
-----Info: *Completions*, 7 lines --All---------------------------------
@end example
-@node Basic Windows, The Echo Area, The Mode Line, Window Commands
+@node Basic Windows
@section Window Commands
It can be convenient to view more than one node at a time. To allow
@@ -1331,7 +1331,7 @@ its contents. The variable @code{automatic-tiling} can cause
@xref{Variables, , @code{automatic-tiling}}.
@end table
-@node The Echo Area, , Basic Windows, Window Commands
+@node The Echo Area
@section The Echo Area
@cindex echo area
diff --git a/contrib/texinfo/doc/info.1 b/contrib/texinfo/doc/info.1
index fc20e6a..085fed3 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.29.
-.TH INFO "1" "February 2003" "info 4.4" "User Commands"
+.TH INFO "1" "June 2003" "info 4.6" "User Commands"
.SH NAME
info \- read Info documents
.SH SYNOPSIS
diff --git a/contrib/texinfo/doc/install-info.1 b/contrib/texinfo/doc/install-info.1
index cb46cd6..312e13b 100644
--- a/contrib/texinfo/doc/install-info.1
+++ b/contrib/texinfo/doc/install-info.1
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.29.
-.TH INSTALL-INFO "1" "February 2003" "install-info 4.4" "User Commands"
+.TH INSTALL-INFO "1" "June 2003" "install-info 4.6" "User Commands"
.SH NAME
install-info \- update info/dir entries
.SH SYNOPSIS
diff --git a/contrib/texinfo/doc/makeinfo.1 b/contrib/texinfo/doc/makeinfo.1
index 2e65647..75e9fe4 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.29.
-.TH MAKEINFO "1" "February 2003" "makeinfo 4.4" "User Commands"
+.TH MAKEINFO "1" "June 2003" "makeinfo 4.6" "User Commands"
.SH NAME
makeinfo \- translate Texinfo documents
.SH SYNOPSIS
@@ -86,7 +86,12 @@ If VAL is `none', do not indent; if VAL is
`asis', preserve existing indentation.
.TP
\fB\-\-split\-size\fR=\fINUM\fR
-split Info files at size NUM (default 50000).
+split Info files at size NUM (default 300000).
+.SS "Options for HTML:"
+.TP
+\fB\-\-css\-include\fR=\fIFILE\fR
+include FILE in HTML <style> output;
+read stdin if FILE is -.
.SS "Input file options:"
.TP
\fB\-\-commands\-in\-node\-names\fR
@@ -139,6 +144,7 @@ The defaults for the @if... conditionals depend on the output format:
if generating HTML, \fB\-\-ifhtml\fR is on and the others are off;
if generating Info, \fB\-\-ifinfo\fR is on and the others are off;
if generating plain text, \fB\-\-ifplaintext\fR is on and the others are off;
+if generating XML, \fB\-\-ifxml\fR is on and the others are off.
.SH EXAMPLES
.TP
makeinfo foo.texi
diff --git a/contrib/texinfo/doc/texindex.1 b/contrib/texinfo/doc/texindex.1
index 32b9c3f..6882c45 100644
--- a/contrib/texinfo/doc/texindex.1
+++ b/contrib/texinfo/doc/texindex.1
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.29.
-.TH TEXINDEX "1" "February 2003" "texindex 4.4" "User Commands"
+.TH TEXINDEX "1" "June 2003" "texindex 4.6" "User Commands"
.SH NAME
texindex \- sort Texinfo index files
.SH SYNOPSIS
diff --git a/contrib/texinfo/doc/texinfo.txi b/contrib/texinfo/doc/texinfo.txi
index 9e5dff4..ab7e112 100644
--- a/contrib/texinfo/doc/texinfo.txi
+++ b/contrib/texinfo/doc/texinfo.txi
@@ -1,6 +1,6 @@
\input texinfo.tex @c -*-texinfo-*-
-@c $Id: texinfo.txi,v 1.29 2003/02/04 15:17:21 karl Exp $
-@c Ordinarily Texinfo files have the extension .texi. But texinfo.texi
+@c $Id: texinfo.txi,v 1.48 2003/06/02 12:32:28 karl Exp $
+@c Ordinarily, Texinfo files have the extension .texi. But texinfo.texi
@c clashes with texinfo.tex on 8.3 filesystems, so we use texinfo.txi.
@c Everything between the start/end of header lines will be passed by
@@ -10,7 +10,7 @@
@c makeinfo and texinfo.tex ignore all text before @setfilename.
@c
-@c Ordinarily the setfilename argument ends with .info. But
+@c Ordinarily, the setfilename argument ends with .info. But
@c texinfo.info-13 is too long for 14-character filesystems.
@setfilename texinfo
@@ -152,11 +152,11 @@ the menu lists all the lower level nodes in the document.
* Definition Commands:: How to describe functions and the like
in a uniform manner.
* Conditionals:: How to specify text for either @TeX{} or Info.
-* Internationalization::
-* Defining New Texinfo Commands::
+* Internationalization::
+* Defining New Texinfo Commands::
* Hardcopy:: How to convert a Texinfo file to a file
for printing and how to print that file.
-* Creating and Installing Info Files::
+* Creating and Installing Info Files::
* Command List:: All the Texinfo @@-commands.
* Tips:: Hints on how to write a Texinfo document.
* Sample Texinfo Files:: Complete examples, including full texts.
@@ -215,6 +215,7 @@ Beginning a Texinfo File
* Texinfo File Header:: The first lines.
* Document Permissions:: Ensuring your manual is free.
* Titlepage & Copyright Page:: Creating the title and copyright pages.
+* Contents:: How to create a table of contents.
* The Top Node:: Creating the `Top' node and master menu.
* Global Document Commands:: Affecting formatting throughout.
* Software Copying Permissions:: Ensure that you and others continue to
@@ -249,21 +250,21 @@ Title and Copyright Pages
The `Top' Node and Master Menu
-* Top Node Example::
-* Master Menu Parts::
+* Top Node Example::
+* Master Menu Parts::
Global Document Commands
* documentdescription:: Document summary for the HTML output.
* setchapternewpage:: Start chapters on right-hand pages.
* paragraphindent:: Specify paragraph indentation.
+* firstparagraphindent:: Suppress indentation of the first paragraph.
* exampleindent:: Specify environment indentation.
Ending a Texinfo File
* Printing Indices & Menus:: How to print an index in hardcopy and
generate index menus in Info.
-* Contents:: How to create a table of contents.
* File End:: How to mark the end of a file.
Chapter Structuring
@@ -271,13 +272,13 @@ Chapter Structuring
* Tree Structuring:: A manual is like an upside down tree @dots{}
* Structuring Command Types:: How to divide a manual into parts.
* makeinfo top:: The @code{@@top} command, part of the `Top' node.
-* chapter::
-* unnumbered & appendix::
-* majorheading & chapheading::
-* section::
-* unnumberedsec appendixsec heading::
-* subsection::
-* unnumberedsubsec appendixsubsec subheading::
+* chapter::
+* unnumbered & appendix::
+* majorheading & chapheading::
+* section::
+* unnumberedsec appendixsec heading::
+* subsection::
+* unnumberedsubsec appendixsubsec subheading::
* subsubsection:: Commands for the lowest level sections.
* Raise/lower sections:: How to change commands' hierarchical level.
@@ -372,6 +373,7 @@ Quotations and Examples
* exdent:: Undo indentation on a line.
* flushleft & flushright:: Pushing text flush left or flush right.
* noindent:: Preventing paragraph indentation.
+* indent:: Forcing paragraph indentation.
* cartouche:: Drawing rounded rectangles around examples.
Lists and Tables
@@ -450,7 +452,7 @@ Inserting @TeX{} and the Copyright Symbol
Glyphs for Examples
-* Glyphs Summary::
+* Glyphs Summary::
* result:: How to show the result of expression.
* expansion:: How to indicate an expansion.
* Print Glyph:: How to indicate printed output.
@@ -472,6 +474,11 @@ Footnotes
* Footnote Commands:: How to write a footnote in Texinfo.
* Footnote Styles:: Controlling how footnotes appear in Info.
+Inserting Images
+
+* Image Syntax::
+* Image Scaling::
+
Making and Preventing Breaks
* Break Commands:: Summary of break-related commands.
@@ -492,7 +499,7 @@ Definition Commands
* deffnx:: How to group two or more `first' lines.
* Def Cmds in Detail:: All the definition commands.
* Def Cmd Conventions:: Conventions for writing definitions.
-* Sample Function Definition::
+* Sample Function Definition::
The Definition Commands
@@ -547,13 +554,13 @@ Formatting and Printing Hardcopy
* A4 Paper:: How to print on A4 or A5 paper.
* pagesizes:: How to print with customized page sizes.
* Cropmarks and Magnification:: How to print marks to indicate the size
- of pages and how to print scaled up output.
+ of pages and how to print scaled up output.
* PDF Output:: Portable Document Format output.
Creating and Installing Info Files
-* Creating an Info File::
-* Installing an Info File::
+* Creating an Info File::
+* Installing an Info File::
Creating an Info File
@@ -570,6 +577,12 @@ Creating an Info File
to run better.
* Generating HTML:: Generating HTML output with makeinfo.
+Generating HTML
+
+* HTML Translation:: Details of the HTML output.
+* HTML Splitting:: How HTML output is split.
+* HTML CSS:: HTML output and Cascading Style Sheets.
+
Installing an Info File
* Directory File:: The top level menu for all Info files.
@@ -582,10 +595,14 @@ Installing an Info File
Sample Texinfo Files
-* Short Sample Texinfo File::
-* GNU Sample Texts::
-* Verbatim Copying License::
-* All-permissive Copying License::
+* Short Sample Texinfo File::
+* GNU Sample Texts::
+* Verbatim Copying License::
+* All-permissive Copying License::
+
+Copying This Manual
+
+* GNU Free Documentation License:: License for copying this manual.
Include Files
@@ -909,7 +926,7 @@ of not having to document the same information in different ways for
different output formats. You might as well just write the man page
directly.
-@pindex help2man
+@pindex help2man
@cindex O'Dea, Brendan
Man pages still have their place, and if you wish to support them, you
may find the program @command{help2man} to be useful; it generates a
@@ -1220,7 +1237,7 @@ Use doubled single-quote characters to begin and end quotations:
doubled quotation marks,
@c this comes out as "like this" in Info, which is just confusing.
@iftex
-``like this'',
+``like this'',
@end iftex
and Info converts doubled single-quote characters to @sc{ascii}
double-quotes: @w{@t{`@w{}`@dots{}'@w{}'}} becomes @w{@t{"@dots{}"}}.
@@ -1245,6 +1262,9 @@ Each of the other output formats (@code{html}, @code{info},
@xref{Conditionals}.
@item
+@iftex
+@vskip-@baselineskip
+@end iftex
@cindex Tabs; don't use!
@quotation
@strong{Caution:} Do not use tab characters in a Texinfo file (except in
@@ -2648,7 +2668,8 @@ M-x texinfo-sequential-node-update
Certain pieces of information must be provided at the beginning of a
Texinfo file, such as the name for the output file(s), the title of the
-document, and the Top node.
+document, and the Top node. A table of contents is also generally
+produced here.
This chapter expands on the minimal complete Texinfo source file
previously given (@pxref{Six Parts}).
@@ -2658,6 +2679,7 @@ previously given (@pxref{Six Parts}).
* Texinfo File Header:: The first lines.
* Document Permissions:: Ensuring your manual is free.
* Titlepage & Copyright Page:: Creating the title and copyright pages.
+* Contents:: How to create a table of contents.
* The Top Node:: Creating the `Top' node and master menu.
* Global Document Commands:: Affecting formatting throughout.
* Software Copying Permissions:: Ensure that you and others continue to
@@ -2668,7 +2690,7 @@ previously given (@pxref{Six Parts}).
@node Sample Beginning
@section Sample Texinfo File Beginning
-@cindex Example beginning of Texinfo file
+@cindex Example beginning of Texinfo file
The following sample shows what is needed. The elements given here are
explained in more detail in the following sections. Other commands are
@@ -2715,7 +2737,7 @@ Permission is granted to @dots{}
Published by @dots{}
@@end titlepage
-@@c So the toc is printed in the right place.
+@@c So the toc is printed at the start.
@@contents
@@ifnottex
@@ -3521,6 +3543,88 @@ You can also specify your own style of page heading and footing.
@xref{Headings, , Page Headings}, for more information.@refill
+@node Contents
+@section Generating a Table of Contents
+@cindex Table of contents
+@cindex Contents, Table of
+@cindex Short table of contents
+@findex contents
+@findex summarycontents
+@findex shortcontents
+
+The @code{@@chapter}, @code{@@section}, and other structuring commands
+(@pxref{Structuring}) supply the information to make up a
+table of contents, but they do not cause an actual table to appear in
+the manual. To do this, you must use the @code{@@contents} and/or
+@code{@@summarycontents} command(s).
+
+@table @code
+@item @@contents
+Generates a table of contents in a printed manual, including all
+chapters, sections, subsections, etc., as well as appendices and
+unnumbered chapters. Headings generated by the @code{@@majorheading},
+@code{@@chapheading}, and @code{@@heading} commands do not appear in
+the table of contents.
+
+@item @@shortcontents
+@itemx @@summarycontents
+(@code{@@summarycontents} is a synonym for @code{@@shortcontents}.)
+
+Generates a short or summary table of contents that lists only the
+chapters, appendices, and unnumbered chapters. Sections, subsections
+and subsubsections are omitted. Only a long manual needs a short
+table of contents in addition to the full table of contents.
+
+@end table
+
+Both contents commands should be written on a line by themselves, and
+are best placed near the beginning of the file, after the @code{@@end
+titlepage} (@pxref{titlepage}). The contents commands automatically
+generate a chapter-like heading at the top of the first table of
+contents page, so don't include any sectioning command such as
+@code{@@unnumbered} before them.
+
+Since an Info file uses menus instead of tables of contents, the Info
+formatting commands ignore the contents commands. But the contents are
+included in plain text output (generated by @code{makeinfo
+--no-headers}), unless @code{makeinfo} is writing its output to standard
+output.
+
+When @code{makeinfo} writes a short table of contents while producing
+html output, the links in the short table of contents point to
+corresponding entries in the full table of contents rather than the text
+of the document. The links in the full table of contents point to the
+main text of the document.
+
+In the past, the contents commands were sometimes placed at the end of
+the file, after any indices and just before the @code{@@bye}, but we
+no longer recommend this.
+
+@findex setcontentsaftertitlepage
+@findex setshortcontentsaftertitlepage
+@cindex Contents, after title page
+@cindex Table of contents, after title page
+However, since many existing Texinfo documents still do have the
+@code{@@contents} at the end of the manual, if you are a user printing
+a manual, you may wish to force the contents to be printed after the
+title page. You can do this by specifying
+@code{@@setcontentsaftertitlepage} and/or
+@code{@@setshortcontentsaftertitlepage}. The first prints only the
+main contents after the @code{@@end titlepage}; the second prints both
+the short contents and the main contents. In either case, any
+subsequent @code{@@contents} or @code{@@shortcontents} is ignored
+(unless, erroneously, no @code{@@end titlepage} is ever encountered).
+
+You need to include the @code{@@set@dots{}contentsaftertitlepage}
+commands early in the document (just after @code{@@setfilename}, for
+example). We recommend using @command{texi2dvi} (@pxref{Format with
+texi2dvi}) to specify this without altering the source file at all. For
+example:
+@example
+texi2dvi --texinfo=@@setcontentsaftertitlepage foo.texi
+@end example
+
+
@node The Top Node
@section The `Top' Node and Master Menu
@cindex Top node
@@ -3548,8 +3652,8 @@ strictly speaking, you are not required to enclose these parts between
so. @xref{Conditionals, , Conditionally Visible Text}.)
@menu
-* Top Node Example::
-* Master Menu Parts::
+* Top Node Example::
+* Master Menu Parts::
@end menu
@@ -3632,7 +3736,7 @@ For example, the master menu for this manual looks like the following
@end group
@group
* Command and Variable Index::
-* Concept Index::
+* Concept Index::
@end group
@group
@@ -3668,6 +3772,7 @@ generally all given before the Top node, if they are given at all.
* documentdescription:: Document summary for the HTML output.
* setchapternewpage:: Start chapters on right-hand pages.
* paragraphindent:: Specify paragraph indentation.
+* firstparagraphindent:: Suppress indentation of the first paragraph.
* exampleindent:: Specify environment indentation.
@end menu
@@ -3706,7 +3811,7 @@ the document.
@node setchapternewpage
-@subsection @code{@@setchapternewpage}:
+@subsection @code{@@setchapternewpage}:
@cindex Starting chapters
@cindex Pages, starting odd
@findex setchapternewpage
@@ -3779,7 +3884,7 @@ you want.
@node paragraphindent
-@subsection Paragraph Indenting
+@subsection @code{@@paragraphindent}: Paragraph Indenting
@cindex Indenting paragraphs, control of
@cindex Paragraph indentation control
@findex paragraphindent
@@ -3824,6 +3929,49 @@ fill) paragraphs that contain @code{@@w} or @code{@@*} commands.
@xref{Refilling Paragraphs}, for further information.
+@node firstparagraphindent
+@subsection @code{@@firstparagraphindent}: Indentation After Headings
+@cindex First paragraph, suppressing indentation of
+@cindex Suppressing first paragraph indentation
+@cindex Preventing first paragraph indentation
+@cindex Indenting, suppressing of first paragraph
+@cindex Headings, indentation after
+@findex firstparagraphindent
+
+As you can see in the present manual, the first paragraph in any
+section is not indented by default. Typographically, indentation is a
+paragraph separator, which means that it is unnecessary when a new
+section begins. This indentation is controlled with the
+@code{@@firstparagraphindent} command:
+
+@example
+@@firstparagraphindent @var{word}
+@end example
+
+The first paragraph after a heading is indented according to the value
+of @var{word}:
+
+@table @asis
+@item @code{none}
+Prevents the first paragraph from being indented (default).
+This option is ignored by @command{makeinfo} if
+@code{@@paragraphindent asis} is in effect.
+
+@item @code{insert}
+Include normal paragraph indentation. This respects the paragraph
+indentation set by a @code{@@paragraphindent} command
+(@pxref{paragraphindent}).
+@end table
+
+For HTML and XML output, the @code{@@firstparagraphindent} setting is
+ignored.
+
+It is best to write the @code{@@paragraphindent} command before the
+end-of-header line at the beginning of a Texinfo file, so the region
+formatting commands indent paragraphs as specified. @xref{Start of
+Header}.
+
+
@node exampleindent
@subsection @code{@@exampleindent}: Environment Indenting
@cindex Indenting environments
@@ -3896,12 +4044,9 @@ information, although sometimes people put it earlier in the document.
@cindex File ending
@findex bye
-The end of a Texinfo file should include commands to create indices and
-(perhaps) to generate both the full and summary tables of contents.
-Finally, it must include the @code{@@bye} command that marks the last
-line to be processed.
+The end of a Texinfo file should include commands to create indices,
+and the @code{@@bye} command to mark the last line to be processed.
-@need 700
For example:
@example
@@ -3910,16 +4055,12 @@ For example:
@@printindex cp
-@@shortcontents
-@@contents
-
@@bye
@end example
@menu
* Printing Indices & Menus:: How to print an index in hardcopy and
generate index menus in Info.
-* Contents:: How to create a table of contents.
* File End:: How to mark the end of a file.
@end menu
@@ -4002,91 +4143,6 @@ to find. We also recommend having a single index whenever possible,
since then readers have only one place to look (@pxref{Combining Indices}).
-@node Contents
-@section Generating a Table of Contents
-@cindex Table of contents
-@cindex Contents, Table of
-@cindex Short table of contents
-@findex contents
-@findex summarycontents
-@findex shortcontents
-
-The @code{@@chapter}, @code{@@section}, and other structuring commands
-supply the information to make up a table of contents, but they do not
-cause an actual table to appear in the manual. To do this, you must use
-the @code{@@contents} and/or @code{@@summarycontents} command(s).
-
-@table @code
-@item @@contents
-Generate a table of contents in a printed manual, including all
-chapters, sections, subsections, etc., as well as appendices and
-unnumbered chapters. Headings generated by the @code{@@heading}
-series of commands do not appear in the table of contents.
-
-@item @@shortcontents
-@itemx @@summarycontents
-(@code{@@summarycontents} is a synonym for @code{@@shortcontents}.)
-
-Generate a short or summary table of contents that lists only the
-chapters, appendices, and unnumbered chapters. Sections, subsections
-and subsubsections are omitted. Only a long manual needs a short table
-of contents in addition to the full table of contents.
-
-@end table
-
-Both contents commands should be written on a line by themselves.
-The contents commands automatically generate a chapter-like heading at
-the top of the first table of contents page, so don't include any
-sectioning command such as @code{@@unnumbered} before them.
-
-Since an Info file uses menus instead of tables of contents, the Info
-formatting commands ignore the contents commands. But the contents are
-included in plain text output (generated by @code{makeinfo
---no-headers}), unless @code{makeinfo} is writing its output to standard
-output.
-
-When @code{makeinfo} writes a short table of contents while producing
-html output, the links in the short table of contents point to
-corresponding entries in the full table of contents rather than the text
-of the document. The links in the full table of contents point to the
-main text of the document.
-
-The contents commands can be placed either at the very end of the file,
-after any indices (see the previous section) and just before the
-@code{@@bye} (see the next section), or near the beginning of the file,
-after the @code{@@end titlepage} (@pxref{titlepage}). The advantage to
-the former is that then the contents output is always up to date,
-because it reflects the processing just done. The advantage to the
-latter is that the contents are printed in the proper place, thus you do
-not need to rearrange the DVI file with @command{dviselect} or shuffle
-paper.
-
-@findex setcontentsaftertitlepage
-@findex setshortcontentsaftertitlepage
-@cindex Contents, after title page
-@cindex Table of contents, after title page
-As an author, you can put the contents commands wherever you prefer.
-But if you are a user simply printing a manual, you may wish to print
-the contents after the title page even if the author put the contents
-commands at the end of the document (as is the case in most existing
-Texinfo documents, at this writing). You can do this by specifying
-@code{@@setcontentsaftertitlepage} and/or
-@code{@@setshortcontentsaftertitlepage}. The first prints only the main
-contents after the @code{@@end titlepage}; the second prints both the
-short contents and the main contents. In either case, any subsequent
-@code{@@contents} or @code{@@shortcontents} is ignored (unless no
-@code{@@end titlepage} is ever encountered).
-
-You need to include the @code{@@set@dots{}contentsaftertitlepage}
-commands early in the document (just after @code{@@setfilename}, for
-example). We recommend using @command{texi2dvi} (@pxref{Format with
-texi2dvi}) to specify this without altering the source file at all. For
-example:
-@example
-texi2dvi --texinfo=@@setcontentsaftertitlepage foo.texi
-@end example
-
-
@node File End
@section @code{@@bye} File Ending
@findex bye
@@ -4132,13 +4188,13 @@ heading at the top of each node---but you don't need to.@refill
* Tree Structuring:: A manual is like an upside down tree @dots{}
* Structuring Command Types:: How to divide a manual into parts.
* makeinfo top:: The @code{@@top} command, part of the `Top' node.
-* chapter::
-* unnumbered & appendix::
-* majorheading & chapheading::
-* section::
-* unnumberedsec appendixsec heading::
-* subsection::
-* unnumberedsubsec appendixsubsec subheading::
+* chapter::
+* unnumbered & appendix::
+* majorheading & chapheading::
+* section::
+* unnumberedsec appendixsec heading::
+* subsection::
+* unnumberedsubsec appendixsubsec subheading::
* subsubsection:: Commands for the lowest level sections.
* Raise/lower sections:: How to change commands' hierarchical level.
@end menu
@@ -5023,7 +5079,7 @@ menu that leads to this file. Specify the file name in parentheses.
Usually, all Info files are installed in the same Info directory tree;
in this case, use @samp{(dir)} as the parent of the Top node; this is
short for @samp{(dir)top}, and specifies the Top node in the @file{dir}
-file, which contains the main menu for the Info system as a whole.
+file, which contains the main menu for the Info system as a whole.
@item
@cindex Previous node of Top node
@@ -6441,13 +6497,19 @@ is the url itself); in Info and DVI output, but not in HTML output, the
url is also output.
@cindex Man page, reference to
-The third argument, on the other hand, if specified is also the text to
-display, but the url is @emph{not} output in any format. This is useful
-when the text is already sufficiently referential, as in a man page. If
+The third argument, if specified, is the text to display, but in this
+case the url is @emph{not} output in any format. This is useful when
+the text is already sufficiently referential, as in a man page. If
the third argument is given, the second argument is ignored.
-The simple one argument form, where the url is both the target and the
-text of the link:
+If the url is long enough to cause problems with line breaking, you
+may find it useful to insert @code{@@/} at places where a line break
+would be acceptable (after @samp{/} characters, for instance). This
+tells @TeX{} to allow (but not force) a line break at those places.
+@xref{Line Breaks}.
+
+Here is an example of the simple one argument form, where the url is
+both the target and the text of the link:
@example
The official GNU ftp site is @@uref@{ftp://ftp.gnu.org/gnu@}.
@@ -6509,11 +6571,11 @@ Some people prefer to display url's in the unambiguous format:
@end display
@noindent
-@cindex <URL convention, not used
+@cindex <URL: convention, not used
You can use this form in the input file if you wish. We feel it's not
-necessary to clutter up the output with the extra @samp{<URL:} and
-@samp{>}, since any software that tries to detect url's in text already
-has to detect them without the @samp{<URL:} to be useful.
+necessary to include the @samp{<URL:} and @samp{>} in the output,
+since any software that tries to detect url's in text already has to
+detect them without the @samp{<URL:} to be useful.
@node Marking Text
@@ -6957,7 +7019,7 @@ In English, the vowels are @samp{a}, @samp{e},
@findex verb
@cindex Verbatim in-line text
-@cindex Delimiter character, for verbatim
+@cindex Delimiter character, for verbatim
Use the @code{@@verb} command to print a verbatim sequence of
characters.
@@ -7005,7 +7067,7 @@ is correct for them (see the next section).
The effect of @code{@@var} in the Info file is to change the case of the
argument to all upper case. In the printed manual and HTML output, the
-argument is printed in slanted type.
+argument is printed in slanted type.
@need 700
For example,
@@ -7516,6 +7578,7 @@ line.
* exdent:: Undo indentation on a line.
* flushleft & flushright:: Pushing text flush left or flush right.
* noindent:: Preventing paragraph indentation.
+* indent:: Forcing paragraph indentation.
* cartouche:: Drawing rounded rectangles around examples.
@end menu
@@ -7536,10 +7599,10 @@ Illustrate code, commands, and the like. The text is printed
in a fixed-width font, and indented but not filled.
@item @@verbatim
-Mark a piece of text that is to be printed verbatim; no character
+Mark a piece of text that is to be printed verbatim; no character
substitutions are made and all commands are ignored, until the next
-@code{@@end verbatim}. The text is printed in a fixed-width font,
-and not indented or filled. Extra spaces and blank lines are
+@code{@@end verbatim}. The text is printed in a fixed-width font,
+and not indented or filled. Extra spaces and blank lines are
significant, and tabs are expanded.
@item @@smallexample
@@ -7736,7 +7799,7 @@ For example:
@example
@exdent @@verbatim
@exdent @{
-@exdent <tab>@@command with strange characters: @@'e
+@exdent <tab>@@command with strange characters: @@'e
@exdent expand<tab>me
@exdent @}
@exdent @@end verbatim
@@ -7747,7 +7810,7 @@ produces
@verbatim
{
- @command with strange characters: @'e
+ @command with strange characters: @'e
expand me
}
@end verbatim
@@ -7858,7 +7921,7 @@ pages.
As a general rule, a printed document looks much better if you use
only one of (for instance) @code{@@example} or @code{@@smallexample}
-consistently within a chapter.
+consistently within a chapter.
@node display
@@ -8013,6 +8076,9 @@ left end ragged.
@node noindent
@section @code{@@noindent}: Omitting Indentation
+@cindex Omitting indentation
+@cindex Suppressing indentation
+@cindex Indentation, omitting
@findex noindent
An example or other inclusion can break a paragraph into segments.
@@ -8072,6 +8138,34 @@ necessary, since @code{@@noindent} is a command used outside of
paragraphs (@pxref{Command Syntax}).
+@node indent
+@section @code{@@indent}: Forcing Indentation
+@cindex Forcing indentation
+@cindex Inserting indentation
+@cindex Indentation, forcing
+@findex indent
+
+@indent
+To complement the @code{@@noindent} command (see the previous
+section), Texinfo provides the @code{@@indent} command that forces a
+paragraph to be indented. This paragraph, for instance, is indented
+using an @code{@@indent} command. The first paragraph of a section is
+the most likely place to use @code{@@indent}, to override the normal
+behavior of no indentation there (@pxref{paragraphindent}).
+
+It is best to write @code{@@indent} on a line by itself, since in most
+environments, spaces following the command will not be ignored. The
+@code{@@indent} line will not generate a blank line in the Info output
+within an environment.
+
+However, it is ok to use it at the beginning of a line, with text
+following, outside of any environment.
+
+Do not put braces after an @code{@@indent} command; they are not
+necessary, since @code{@@indent} is a command used outside of
+paragraphs (@pxref{Command Syntax}).
+
+
@node cartouche
@section @code{@@cartouche}: Rounded Rectangles Around Examples
@findex cartouche
@@ -8237,9 +8331,9 @@ Write the text of the indented paragraphs themselves after the
itemize}.@refill
@findex item
-Before each paragraph for which a mark in the margin is desired, write a
-line that says just @code{@@item}. It is ok to have text following the
-@code{@@item}.
+At the beginning of each paragraph for which a mark in the margin is
+desired, write a line that starts with @code{@@item}. It is ok to
+have text following the @code{@@item}.
Usually, you should put a blank line before an @code{@@item}. This
puts a blank line in the Info file. (@TeX{} inserts the proper
@@ -8339,10 +8433,10 @@ list with the number @samp{1}. With a numeric argument, such as
or lower case letter, such as @samp{a} or @samp{A}, the command starts
the list with that letter.
-Write the text of the enumerated list in the same way you write an
-itemized list: put @code{@@item} on a line of its own before the start
-of each paragraph that you want enumerated. Do not write any other text
-on the line beginning with @code{@@item}.
+Write the text of the enumerated list in the same way as an itemized
+list: write a line starting with @code{@@item} at the beginning of
+each paragraph that you want enumerated. It is ok to have text
+following the @code{@@item}.
You should put a blank line between entries in the list.
This generally makes it easier to read the Info file.
@@ -9407,6 +9501,10 @@ braces around their argument (which is taken to be the next character).
This is so as to make the source as convenient to type and read as
possible, since accented characters are very common in some languages.
+To get the true accented characters output in Info, and not just the
+ASCII transliterations, you can use the @option{--enable-encoding}
+option to @command{makeinfo} (@pxref{makeinfo options}).
+
@findex " @r{(umlaut accent)}
@cindex Umlaut accent
@findex ' @r{(umlaut accent)}
@@ -9714,7 +9812,7 @@ literal @samp{\}.
@cindex Displayed equations
@cindex Equations, displayed
For displayed equations, you must at present use @TeX{} directly
-(@pxref{Raw Formatter Commands}).
+(@pxref{Raw Formatter Commands}).
@node Glyphs
@@ -9736,7 +9834,7 @@ most often they are. Every glyph-insertion command is followed by a pair of
left- and right-hand braces.@refill
@menu
-* Glyphs Summary::
+* Glyphs Summary::
* result:: How to show the result of expression.
* expansion:: How to indicate an expansion.
* Print Glyph:: How to indicate printed output.
@@ -10258,7 +10356,7 @@ This chapter contains two footnotes.@refill
@end ifinfo
-@c this should be described with figures when we have them
+@c This should be described along with figures when we have them;
@c perhaps in the quotation/example chapter.
@node Images
@section Inserting Images
@@ -10268,16 +10366,28 @@ This chapter contains two footnotes.@refill
@findex image
You can insert an image given in an external file with the
-@code{@@image} command:
+@code{@@image} command.
+
+@menu
+* Image Syntax::
+* Image Scaling::
+@end menu
+
+
+@node Image Syntax
+@subsection Image Syntax
+
+Here is the basic synopsis of the @code{@@image} command:
@example
-@@image@{@var{filename}, @r{[}@var{width}@r{]}, @r{[}@var{height}@r{]}, @r{[}@var{alttext}@r{]}, @r{[}@var{extension}@r{]}@}
+@@image@{@var{filename} @r{[,}@var{width}@r{]} @r{[,}@var{height}@r{]} @r{[,}@var{alttext}@r{]} @r{[,}@var{extension}@r{]}@}
@end example
@cindex Formats for images
@cindex Image formats
The @var{filename} argument is mandatory, and must not have an
extension, because the different processors support different formats:
+
@itemize @bullet
@item
@TeX{} reads the file @file{@var{filename}.eps} (Encapsulated PostScript
@@ -10286,12 +10396,11 @@ format).
@pindex pdftex@r{, and images}
PDF@TeX{} reads @file{@var{filename}.pdf} (Adobe's Portable Document Format).
@item
-@code{makeinfo} uses @file{@var{filename}.txt} verbatim for
+@code{makeinfo} includes @file{@var{filename}.txt} verbatim for
Info output (more or less as if it was an @code{@@example}).
@item
-@code{makeinfo}
-uses the optional fifth argument to @code{@@image} for the extension if
-you supply it. For example:
+@code{makeinfo} uses the optional fifth argument @var{extension} to
+@code{@@image} for the filename extension, if it is specified. For example:
@pindex XPM image format
@example
@@ -10299,24 +10408,65 @@ you supply it. For example:
@end example
@noindent
-will cause @samp{makeinfo --html} to try @file{foo.xpm}.
+will cause @code{makeinfo} to look for @file{foo.xpm} before any others.
+
+@end itemize
+
+The @var{width} and @var{height} arguments are described in the next
+section.
+
+@cindex alt attribute for images
+@cindex alternate text for images
+When producing html, @code{makeinfo} sets the @dfn{alt attribute} for
+inline images to the optional fourth argument to @code{@@image}, if
+supplied. If not supplied, @code{makeinfo} uses the full file name of
+the image being displayed.
@cindex GIF, unsupported due to patents
@cindex PNG image format
@cindex JPG image format
-If you do not supply the optional fifth argument, @samp{makeinfo
----html} first tries @file{@var{filename}.png}; if that does not exist,
-it tries @file{@var{filename}.jpg}. If that does not exist either, it
+If you do not supply the optional fifth argument, @code{makeinfo}
+first tries @file{@var{filename}.png}; if that does not exist, it
+tries @file{@var{filename}.jpg}. If that does not exist either, it
complains. (We cannot support GIF format directly due to software
patents.)
-@end itemize
+In Info output, @code{makeinfo} writes a reference to the binary image
+file (with the @file{.@var{extension}}, @file{.png}, or @file{.jpg}
+suffix) if it exists. It also physically includes the @file{.txt}
+file if that exists. This way, Info readers which can display images
+(such as the Emacs Info browser) can do so, whereas Info readers which
+can only use text (such as the standalone Info reader) can display the
+textual version.
+
+The implementation of this is to put the following construct into the
+Info output:
+
+@example
+^@^H[image src="@var{binaryfile}" text="@var{txtfile}"
+ alt="@var{alttext} ... ^@^H]
+@end example
+
+@noindent (If one of the files is not present, the corresponding argument
+is omitted.)
+
+The reason for mentioning this here is that older Info browsers (this
+feature was introduced in Texinfo version 4.6) will display the above
+literally, which, although not ideal, should not be harmful.
+
+
+@node Image Scaling
+@subsection Image Scaling
+
+@cindex Images, scaling
+@cindex Scaling images
@cindex Width of images
@cindex Height of images
@cindex Aspect ratio of images
@cindex Distorting images
-The optional @var{width} and @var{height} arguments specify the size to
-scale the image to (they are ignored for Info output). If neither is
+The optional @var{width} and @var{height} arguments to the
+@code{@@image} command (see the previous section) specify the size to
+scale the image to. They are ignored for Info output. If neither is
specified, the image is presented in its natural size (given in the
file); if only one is specified, the other is scaled proportionately;
and if both are specified, both are respected, thus possibly distorting
@@ -10377,13 +10527,6 @@ figures. Therefore, if you intend it to be displayed, be sure to leave
a blank line before the command, or the output will run into the
preceding text.
-@cindex alt attribute for images
-@cindex alternate text for images
-When producing html, @code{makeinfo} sets the @dfn{alt attribute} for
-inline images to the optional fourth argument to @code{@@image}, if
-supplied. If not supplied, @code{makeinfo} uses the full file name of
-the image being displayed.
-
@node Breaks
@chapter Making and Preventing Breaks
@@ -10467,23 +10610,24 @@ Start a new printed page if not enough space on this one.
@node Line Breaks
-@section @code{@@*}: Generate Line Breaks
+@section @code{@@*} and @code{@@/}: Generate and Allow Line Breaks
@findex * @r{(force line break)}
+@findex / @r{(allow line break)}
@cindex Line breaks
@cindex Breaks in a line
+@cindex Force line break
+@cindex Allow line break
The @code{@@*} command forces a line break in both the printed manual and
-in Info.@refill
+in Info. The @code{@@/} command allows a line break (printed manual only).
-@need 700
-For example,
+Here is an example with @code{@@*}:
@example
This line @@* is broken @@*in two places.
@end example
-@noindent
-produces
+@noindent produces
@example
@group
@@ -10493,23 +10637,29 @@ in two places.
@end group
@end example
-The @code{@@*} command is often used in a file's copyright page:
+Do not write an @code{@@refill} command at the end of a paragraph
+containing an @code{@@*} command; it will cause the paragraph to be
+refilled after the line break occurs, negating the effect of the line
+break. @xref{Refilling Paragraphs}.
+
+The @code{@@/} command can be useful within a url
+(@pxref{uref,,@code{@@uref}}), which tend to be long and are otherwise
+unbreakable. For example:
@example
-@group
-This is edition 2.0 of the Texinfo documentation,@@*
-and is for @dots{}
-@end group
+The official Texinfo home page is on the GNU web site:
+@@uref@{http://www.gnu.org/@@/software/@@/gnu/@@/texinfo@}.
@end example
-@noindent
-In this case, the @code{@@*} command keeps @TeX{} from stretching the
-line across the whole page in an ugly manner.
+@noindent produces
-Do not write an @code{@@refill} command at the end of a paragraph
-containing an @code{@@*} command; it will cause the paragraph to be
-refilled after the line break occurs, negating the effect of the line
-break.@refill
+@display
+The official Texinfo home page is on the GNU web site:
+@uref{http://www.gnu.org/@/software/@/gnu/@/texinfo}.
+@end display
+
+@noindent Without the @code{@@/} commands, @TeX{} would have nowhere to
+break the line. @code{@@/} has no effect in the online output.
@node - and hyphenation
@@ -10821,7 +10971,7 @@ a given name. An appendix containing a summary should use
* deffnx:: How to group two or more `first' lines.
* Def Cmds in Detail:: All the definition commands.
* Def Cmd Conventions:: Conventions for writing definitions.
-* Sample Function Definition::
+* Sample Function Definition::
@end menu
@node Def Cmd Template, Optional Arguments, Definition Commands, Definition Commands
@@ -12058,31 +12208,38 @@ with @code{@@iftex}, not raw formatter source as with @code{@@tex}
@cindex XML, including raw
@cindex plain @TeX{}
-Inside a region delineated by @code{@@iftex} and @code{@@end iftex}, you
-can embed some raw @TeX{} commands. Info will ignore these commands
-since they are only in that part of the file which is seen by @TeX{}.
-You can write the @TeX{} commands as you would write them in a normal
-@TeX{} file, except that you must replace the @samp{\} used by @TeX{}
-with an @samp{@@}. For example, in the @code{@@titlepage} section of a
+Inside a region delineated by @code{@@iftex} and @code{@@end iftex},
+you can embed some raw @TeX{} commands. The Texinfo processors will
+ignore such a region unless @TeX{} output is being produced. You can
+write the @TeX{} commands as you would write them in a normal @TeX{}
+file, except that you must replace the @samp{\} used by @TeX{} with an
+@samp{@@}. For example, in the @code{@@titlepage} section of a
Texinfo file, you can use the @TeX{} command @code{@@vskip} to format
the copyright page. (The @code{@@titlepage} command causes Info to
ignore the region automatically, as it does with the @code{@@iftex}
command.)
-However, many features of plain @TeX{} will not work, as they are
-overridden by Texinfo features.
+However, most features of plain @TeX{} will not work within
+@code{@@iftex}, as they are overridden by Texinfo features. The
+purpose of @code{@@iftex} is to provide conditional processing for the
+Texinfo source, not provide access to underlying formatting features.
@findex tex
You can enter plain @TeX{} completely, and use @samp{\} in the @TeX{}
commands, by delineating a region with the @code{@@tex} and @code{@@end
-tex} commands. (The @code{@@tex} command also causes Info to ignore the
-region, like the @code{@@iftex} command.) The sole exception is that the
+tex} commands. All plain @TeX{} commands and category codes are
+restored within an @code{@@tex} region. The sole exception is that the
@code{@@} character still introduces a command, so that @code{@@end tex}
-can be recognized properly.
+can be recognized properly. As with @code{@@iftex}, Texinfo
+processors will ignore such a region unless @TeX{} output is being produced.
+
+@findex \gdef @r{within @code{@@tex}}
+In complex cases, you may wish to define new @TeX{} macros within
+@code{@@tex}. You must use @code{\gdef} to do this, not @code{\def},
+because @code{@@tex} regions are processed in a @TeX{} group.
@cindex Mathematical expressions
-For example, here is a mathematical expression written in
-plain @TeX{}:
+As an example, here is a mathematical expression written in plain @TeX{}:
@example
@@tex
@@ -12647,23 +12804,59 @@ Hereare the valid language codes, from ISO-639.
@findex documentencoding
@cindex Encoding, declaring
@cindex Input encoding, declaring
+@cindex Character set, declaring
@cindex Document input encoding
The @code{@@documentencoding} command declares the input document
encoding. Write it on a line by itself, with a valid encoding
-specification following, such as @samp{ISO-8859-1}.
+specification following.
+
+At present, Texinfo supports only three encodings:
-@cindex http-equiv, and charset
-@cindex meta HTML tag, and charset
-At present, this is used only in HTML output from @code{makeinfo}. If a
-document encoding @var{enc} is specified, it is used in a
-@samp{<meta>} tag included in the @samp{<head>} of the output:
+@table @code
+@item US-ASCII
+This has no particular effect, but it's included for completeness.
+@itemx ISO-8859-1
+@item ISO-8859-2
+These specify the standard encodings for Western European and
+Eastern European languages, respectively. A full description of the
+encodings is beyond our scope here;
+@uref{http://czyborra.com/charsets/iso8859.html} is one of many useful
+references.
+@end table
+
+Specifying an encoding @var{enc} has the following effects:
+
+@opindex --enable-encoding
+@cindex Local Variables: section, for encoding
+@cindex Info output, and encoding
+In Info output, if the option @option{--enable-encoding} is also given
+to @command{makeinfo}, a so-called `Local Variables' section
+(@pxref{File Variables,,,emacs,The GNU Emacs Manual}) is output
+including @var{enc}. This allows Info readers to set the encoding
+appropriately:
+
+@example
+Local Variables:
+coding: @var{enc}
+End:
+@end example
+
+@cindex HTML output, and encodings
+@cindex http-equiv, and charset specification
+@cindex meta HTML tag, and charset specification
+In HTML output, a @samp{<meta>} tag is output, in the @samp{<head>}
+section of the HTML, that specifies @var{enc}. Web servers and
+browsers cooperate to use this information so the correct encoding is
+used to display the page.
@example
<meta http-equiv="Content-Type" content="text/html;
charset=@var{enc}">
@end example
+In all other cases, it is recognized but ignored.
+
@node Defining New Texinfo Commands
@chapter Defining New Texinfo Commands
@@ -12723,8 +12916,15 @@ The @dfn{parameters} @var{param1}, @var{param2}, @dots{} correspond to
arguments supplied when the macro is subsequently used in the document
(described in the next section).
-For a macro to work with @TeX{}, @var{macroname} must consist entirely
-of letters: no digits, hyphens, underscores, or other special characters.
+@cindex Macro names, valid characters in
+@cindex Names of macros, valid characters of
+For a macro to work consistently with @TeX{}, @var{macroname} must
+consist entirely of letters: no digits, hyphens, underscores, or other
+special characters. So, we recommend using only letters. However,
+@command{makeinfo} will accept anything except @samp{@{@}_^=};
+@samp{_} and @samp{^} are excluded so that macros can be called in
+@code{@@math} mode without a following space
+(@pxref{math,,@code{@@math}}).
If a macro needs no parameters, you can define it either with an empty
list (@samp{@@macro foo @{@}}) or with no braces at all (@samp{@@macro
@@ -13019,7 +13219,7 @@ formatting command that inserts `//' before and `\\' after the argument
to @code{@@phoo}. You can then write @code{@@phoo@{bar@}} wherever you
want `//bar\\' highlighted in Info.
-Also, for @TeX{} formatting, you could write
+Also, for @TeX{} formatting, you could write
@example
@@iftex
@@ -13246,7 +13446,8 @@ your file would look approximately like this:
The @code{texi2dvi} command automatically runs both @code{tex} and
@code{texindex} as many times as necessary to produce a DVI file with
-sorted indices and all cross-references resolved. It simplifies the
+sorted indices and all cross-references resolved. It is therefore
+simpler than manually executing the
@code{tex}---@code{texindex}---@code{tex}---@code{tex} sequence
described in the previous section.
@@ -13264,7 +13465,7 @@ texi2dvi foo.texi} instead of relying on the operating system to invoke
the shell on the @samp{texi2dvi} script.
Perhaps the most useful option to @code{texi2dvi} is
-@samp{--texinfo=@var{cmd}}. This inserts @var{cmd} on a line by itself
+@samp{--command=@var{cmd}}. This inserts @var{cmd} on a line by itself
after the @code{@@setfilename} in a temporary copy of the input file
before running @TeX{}. With this, you can specify different printing
formats, such as @code{@@smallbook} (@pxref{smallbook}),
@@ -13273,6 +13474,10 @@ formats, such as @code{@@smallbook} (@pxref{smallbook}),
(You can also do this on a site-wide basis with @file{texinfo.cnf};
@pxref{Preparing for TeX,,Preparing for @TeX{}}).
+@cindex La@TeX{}, processing with @command{texi2dvi}
+@command{texi2dvi} can also be used to process La@TeX{} files; simply
+run @samp{texi2dvi doc.tex}.
+
For a list of other options, run @samp{texi2dvi --help}.
@@ -13282,7 +13487,7 @@ For a list of other options, run @samp{texi2dvi --help}.
The precise command to print a DVI file depends on your system
installation. Two common ones are @samp{dvips foo.dvi -o} and @samp{lpr
--d foo.dvi}.
+-d foo.dvi}.
For example, the following commands will (perhaps) suffice to sort the
indices, format, and print the @cite{Bison Manual}:
@@ -13580,7 +13785,8 @@ For more information, see:
@TeX{} needs to know where to find the @file{texinfo.tex} file that the
@samp{\input texinfo} command on the first line reads. The
@file{texinfo.tex} file tells @TeX{} how to handle @@-commands; it is
-included in all standard GNU distributions.
+included in all standard GNU distributions. The latest version is
+always available at @uref{ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex}.
@pindex texinfo.tex@r{, installing}
@@ -13632,7 +13838,7 @@ In a @file{.cshrc} file, you could use the following @code{csh} command
sequence:
@example
-setenv TEXINPUTS .:/home/me/mylib:/usr/lib/tex/macros
+setenv TEXINPUTS .:/home/me/mylib:
@end example
@need 1000
@@ -13641,7 +13847,7 @@ sequence:
@example
@group
-TEXINPUTS=.:/home/me/mylib:/usr/lib/tex/macros
+TEXINPUTS=.:/home/me/mylib:
export TEXINPUTS
@end group
@end example
@@ -13652,19 +13858,20 @@ on these systems.}:
@example
@group
-set TEXINPUTS=.;d:/home/me/mylib;c:/usr/lib/tex/macros
+set TEXINPUTS=.;d:/home/me/mylib;c:
@end group
@end example
@noindent
It is customary for DOS/Windows users to put such commands in the
-@file{autoexec.bat} file, or in the Windows Registry.@refill
+@file{autoexec.bat} file, or in the Windows Registry.
@noindent
These settings would cause @TeX{} to look for @file{\input} file first
in the current directory, indicated by the @samp{.}, then in a
-hypothetical user's @file{me/mylib} directory, and finally in a system
-directory @file{/usr/lib/tex/macros}.
+hypothetical user @samp{me}'s @file{mylib} directory, and finally in
+the system directories. (A leading, trailing, or doubled @samp{:}
+indicates searching the system directories at that point.)
@cindex Dumping a .fmt file
@cindex Format file, dumping
@@ -13965,8 +14172,8 @@ This chapter describes how to create and install Info files. @xref{Info
Files}, for general information about the file format itself.
@menu
-* Creating an Info File::
-* Installing an Info File::
+* Creating an Info File::
+* Installing an Info File::
@end menu
@@ -14091,14 +14298,22 @@ can probably never be implemented in @TeX{}. It also makes
@samp{--no-validate} is used. @xref{Pointer Validation}, for more
details.
+@item --css-include=@var{file}
+@opindex --css-include
+Include the contents of @var{file}, which should contain cascading
+style sheets specifications, in the @samp{<style>} block of the HTML
+output. @xref{HTML CSS}. If @var{file} is @samp{-}, read standard
+input.
+
@item --docbook
@opindex --docbook
-Generate DocBook output rather than Info.
+Generate DocBook output rather than Info.
@item --enable-encoding
@opindex --enable-encoding
Output accented and special characters in Info or plain text output
based on @samp{@@documentencoding}.
+@xref{documentencoding,,@code{documentencoding}}, and @ref{Inserting Accents}.
@item --error-limit=@var{limit}
@itemx -e @var{limit}
@@ -14148,9 +14363,9 @@ Print a usage message listing all available options, then exit successfully.
@item --html
@opindex --html
Generate HTML output rather than Info. @xref{Generating HTML}. By
-default, the HTML output is split into one output file per source node,
-and the split output is written into a subdirectory with the name of the
-top-level info file.
+default, the HTML output is split into one output file per Texinfo
+source node, and the split output is written into a subdirectory with
+the name of the top-level info file.
@item -I @var{dir}
@opindex -I @var{dir}
@@ -14310,7 +14525,7 @@ references but also report a warning. The default is 1000.
@item --split-size=@var{num}
@opindex --split-size=@var{num}
-Keep Info files to at most @var{num} characters; default is 50,000.
+Keep Info files to at most @var{num} characters; default is 300,000.
@item -U @var{var}
Cause @var{var} to be undefined. This is equivalent to
@@ -14330,7 +14545,7 @@ Print the version number, then exit successfully.
@item --xml
@opindex --xml
-Generate XML output rather than Info.
+Generate XML output rather than Info.
@end table
@@ -14604,9 +14819,9 @@ a @dfn{tag table}, Info can jump to new nodes more quickly than it can
otherwise.@refill
@cindex Indirect subfiles
-In addition, if the Texinfo file contains more than about 70,000
+In addition, if the Texinfo file contains more than about 300,000
bytes, @code{texinfo-format-buffer} and @code{makeinfo} split the
-large Info file into shorter @dfn{indirect} subfiles of about 50,000
+large Info file into shorter @dfn{indirect} subfiles of about 300,000
bytes each. Big files are split into smaller files so that Emacs does
not need to make a large buffer to hold the whole of a large Info
file; instead, Emacs allocates just enough memory for the small, split-off
@@ -14683,12 +14898,58 @@ Info-validate}.@refill
@node Generating HTML
@subsection Generating HTML
-@cindex HTML
+@cindex HTML, generating
Besides generating output in the Info format, you can use the
-@samp{--html} option to generate output in HTML format, for installation
-on a web site (for example). By default, the HTML output is split at
-node level.
+@samp{--html} option to @command{makeinfo} to generate output in HTML
+format, for use by web browsers (for example).
+
+@menu
+* HTML Translation:: Details of the HTML output.
+* HTML Splitting:: How HTML output is split.
+* HTML CSS:: HTML output and Cascading Style Sheets.
+@end menu
+
+@node HTML Translation
+@subsubsection HTML Translation
+
+@command{makeinfo} will include segments of Texinfo source between
+@code{@@ifhtml} and @code{@@end ifhtml} in the HTML output (but not
+any of the other conditionals, by default). Source between
+@code{@@html} and @code{@@end html} is passed without change to the
+output (i.e., suppressing the normal escaping of input @samp{<},
+@samp{>} and @samp{&} characters which have special significance in
+HTML). @xref{Conditional Commands}.
+
+@opindex --footnote-style@r{, ignored in HTML output}
+The @option{--footnote-style} option is currently ignored for HTML output;
+footnotes are always linked to the end of the output file.
+
+@cindex Navigation bar, in HTML output
+By default, a navigation bar is inserted at the start of each node,
+analogous to Info output. The @samp{--no-headers} option suppresses
+this if used with @samp{--no-split}. Header @code{<link>} elements in
+split output can support info-like navigation with browsers like Lynx
+and @w{Emacs W3} which implement this HTML@tie{}1.0 feature.
+
+@cindex HTML output, browser compatibility of
+The HTML generated is mostly standard (i.e., HTML@tie{}2.0, RFC-1866).
+The exception is that HTML 3.2 tables are generated from the
+@code{@@multitable} command, but tagged to degrade as well as possible
+in browsers without table support. The HTML@tie{}4 @samp{lang}
+attribute on the @samp{<html>} attribute is also used. (Please report
+output from an error-free run of @code{makeinfo} which has browser
+portability problems as a bug.)
+
+
+@node HTML Splitting
+@subsubsection HTML Splitting
+
+@cindex Split HTML output
+@cindex HTML output, split
+
+By default, @command{makeinfo} splits HTML output into one output file
+per Texinfo source node.
When splitting, the HTML output files are written into a subdirectory.
The subdirectory is named according to the name from
@@ -14703,35 +14964,100 @@ is named without an extension, e.g., @samp{texinfo}). If the
the directory is always named @samp{index.html}.
Monolithic output (@code{--no-split}) is named according to
-@code{@@setfilename} or @code{--outfile}. Cross-document node
-references are not supported in monolithic HTML.
+@code{@@setfilename} or @code{--outfile}.
-Texinfo input marked up with the @code{@@ifhtml} command will produce
-output only with the @samp{--html} option supplied. Input marked up
-with the @code{@@html} is passed literally to the output (suppressing
-the normal escaping of input @samp{<}, @samp{>} and @samp{&} characters
-which have special significance in HTML). Similarly for the
-@option{--xml} option and @code{@@ifxml} and @code{@@xml} sections.
+@samp{@@xref} commands to other documents are generated assuming the
+other document is available in split HTML form, and installed in the
+same HTML documentation tree, at @file{../<info-document>/}.
+Cross-document node references are not supported in monolithic HTML.
-The @samp{--footnote-style} option is currently ignored for HTML output;
-footnotes are linked to the end of the output file.
-The HTML generated is mostly standard (i.e., HTML 2.0, RFC-1866). The
-exception is that HTML 3.2 tables are generated from the
-@code{@@multitable} command, but tagged to degrade as well as possible
-in browsers without table support. The HTML 4 @samp{lang} attribute on
-the @samp{<html>} attribute is also used. Please report output from an
-error-free run of @code{makeinfo} which has browser portability problems
-as a bug.
+@node HTML CSS
+@subsubsection HTML CSS
+@cindex HTML, and CSS
+@cindex CSS, and HTML output
+@cindex Cascading Style Sheets, and HTML output
-Navigation bars are inserted at the start of nodes, similarly to Info
-output. The @samp{--no-headers} option will suppress this if used with
-@samp{--no-split}. Header @code{<link>} elements in split output can
-support info-like navigation with browsers like Lynx and @w{Emacs W3}
-which implement this @w{HTML 1.0} feature. @samp{@@xref} commands to
-other documents are generated assuming the other document is available
-in split HTML form, and installed in the same HTML documentation tree,
-at @file{../<info-document>/}.
+Cascading Style Sheets (CSS for short) is a network standard for
+influencing the display of HTML documents:
+@uref{http://www.w3.org/Style/CSS/}.
+
+By default, @command{makeinfo} includes a few simple CSS commands to
+better implement the appearance of some of the environments. Here is
+a couple of them:
+
+@example
+pre.display @{ font-family:inherit @}
+pre.smalldisplay @{ font-family:inherit; font-size:smaller @}
+@end example
+
+A full explanation of CSS is (far) beyond this manual; please see the
+references above. In brief, however, this specification tells the web
+browser to use a `smaller' font size for @code{@@smalldisplay} text,
+and to use the `inherited' font (generally a regular roman typeface)
+for both @code{@@smalldisplay} and @code{@@display}. By default, the
+HTML @samp{<pre>} command uses a monospaced font.
+
+You can influence the CSS in the HTML output with the
+@option{--css-include=@var{file}} option to @command{makeinfo}. This
+includes the contents @var{file} in the HTML output, as you might
+expect. However, the details are somewhat tricky, to provide maximum
+flexibility.
+
+@cindex @@import specifications, in CSS files
+The CSS file may begin with so-called @samp{@@import} directives,
+which link to external CSS specifications for browsers to use when
+interpreting the document. Again, a full description is beyond our
+scope here, but we'll describe how they work syntactically, so we can
+explain how @command{makeinfo} handles them.
+
+@cindex Comments, in CSS files
+There can be more than one @samp{@@import}, but they have to come
+first in the file, with only whitespace and comments interspersed, no
+normal definitions. (Technical exception: an @samp{@@charset}
+directive may precede the @samp{@@import}'s. This does not alter
+@command{makeinfo}'s behavior.) Comments in CSS files are delimited
+by @samp{/* ... */}, as in C. An @samp{@@import} directive must be in
+one of these two forms:
+
+@example
+@@import url(http://example.org/foo.css);
+@@import "http://example.net/bar.css";
+@end example
+
+As far as @command{makeinfo} is concerned, the crucial characters are
+the @samp{@@} at the beginning and the semicolon terminating the
+directive. CSS provides for a number of different
+@samp{@@}-directives, and @command{makeinfo} treats them all the same
+way. When reading the CSS file, it simply copies any such
+@samp{@@}-directive into the output, as follows:
+
+@itemize
+@item If @var{file} contains only normal CSS declarations, it is
+included after @command{makeinfo}'s default CSS, thus overriding it.
+
+@item If @var{file} begins with @samp{@@import} specifications (see
+below), then the @samp{import}'s are included first (they have to come
+first, according to the standard), and then @command{makeinfo}'s
+default CSS is included. If you need to override @command{makeinfo}'s
+defaults from an @samp{@@import}, you can do so with the @samp{!
+important} CSS construct, as in:
+@example
+pre.smallexample @{ font-size: inherit ! important @}
+@end example
+
+@item If @var{file} contains both @samp{@@import} and inline CSS
+specifications, the @samp{@@import}'s are included first, then
+@command{makeinfo}'s defaults, and lastly the inline CSS from
+@var{file}.
+@end itemize
+
+If the CSS file is malformed or erroneous, @command{makeinfo}'s output
+is unspecified. @command{makeinfo} does not try to interpret the
+meaning of the CSS file in any way; it just looks for the special
+@samp{@@} and @samp{;} characters and blindly copies the text into the
+output. Comments in the CSS file may or may not be included in the
+output.
@node Installing an Info File
@@ -15025,7 +15351,7 @@ will not notice them.
If you use @code{@@dircategory} more than once in the Texinfo source,
each usage specifies the `current' category; any subsequent
-@code{@@direntry} commands will add to that category.
+@code{@@direntry} commands will add to that category.
@cindex Free Software Directory
@cindex Dir categories, choosing
@@ -15037,12 +15363,16 @@ listed incorrectly or incompletely, please report the situation to the
directory maintainers (@email{bug-directory@@gnu.org}) so that the
category names can be kept in sync.
-Here are a few examples:
+Here are a few examples (see the @file{util/dir-example} file in the
+Texinfo distribution for large sample @code{dir} file):
+
@display
Emacs
Localization
Printing
-Software Libraries
+Software development
+Software libraries
+Text creation and manipulation
@end display
@cindex Invoking nodes, including in dir file
@@ -15206,6 +15536,9 @@ Insert a discretionary hyphenation point. @xref{- and hyphenation}.
Produce a period that really does end a sentence (usually after an
end-of-sentence capital letter). @xref{Ending a Sentence}.
+@item @/
+Produces no output, but allows a line break. @xref{Line Breaks}.
+
@item @@:
Indicate to @TeX{} that an immediately preceding period, question
mark, exclamation mark, or colon does not end a sentence. Prevent
@@ -16726,10 +17059,10 @@ given here in its entirety, without commentary. The second
includes the full texts to be used in GNU manuals.
@menu
-* Short Sample Texinfo File::
-* GNU Sample Texts::
-* Verbatim Copying License::
-* All-permissive Copying License::
+* Short Sample Texinfo File::
+* GNU Sample Texts::
+* Verbatim Copying License::
+* All-permissive Copying License::
@end menu
@@ -16846,7 +17179,7 @@ The @samp{$Id:} comment is for the CVS (@pxref{Top,, Overview, cvs,
Concurrent Versions System}) or RCS (see rcsintro(1)) version control
systems, which expand it into a string such as:
@example
-$Id: texinfo.txi,v 1.29 2003/02/04 15:17:21 karl Exp $
+$Id: texinfo.txi,v 1.48 2003/06/02 12:32:28 karl Exp $
@end example
(This is useful in all sources that use version control, not just manuals.)
You may wish to include the @samp{$Id:} comment in the @code{@@copying}
@@ -16909,7 +17242,7 @@ Here is the sample document:
@verbatim
\input texinfo @c -*-texinfo-*-
-@comment $Id: texinfo.txi,v 1.29 2003/02/04 15:17:21 karl Exp $
+@comment $Id: texinfo.txi,v 1.48 2003/06/02 12:32:28 karl Exp $
@comment %**start of header
@setfilename sample.info
@include version.texi
@@ -16940,7 +17273,7 @@ Software Foundation raise funds for GNU development.''
@dircategory Texinfo documentation system
@direntry
-* sample: (sample)Invoking sample.
+* sample: (sample)Invoking sample.
@end direntry
@titlepage
@@ -17259,7 +17592,7 @@ examples of the rest of the frontmatter ...
@group
@@ifnottex
@@node Top
-@@top Include Example
+@@top Include Example
@@end ifnottex
@end group
@@ -18226,7 +18559,7 @@ tag table for the unsplit file.
You can run @code{Info-validate} only on a single Info file that has a
tag table. The command will not work on the indirect subfiles that
are generated when a master file is split. If you have a large file
-(longer than 70,000 bytes or so), you need to run the
+(longer than 300,000 bytes or so), you need to run the
@code{texinfo-format-buffer} or @code{makeinfo-buffer} command in such
a way that it does not create indirect subfiles. You will also need
to create a tag table for the Info file. After you have done this,
diff --git a/contrib/texinfo/doc/version-stnd.texi b/contrib/texinfo/doc/version-stnd.texi
index d706a46..24db35c 100644
--- a/contrib/texinfo/doc/version-stnd.texi
+++ b/contrib/texinfo/doc/version-stnd.texi
@@ -1,4 +1,4 @@
-@set UPDATED 5 November 2002
-@set UPDATED-MONTH November 2002
-@set EDITION 4.5
-@set VERSION 4.5
+@set UPDATED 19 February 2003
+@set UPDATED-MONTH February 2003
+@set EDITION 4.6
+@set VERSION 4.6
diff --git a/contrib/texinfo/doc/version.texi b/contrib/texinfo/doc/version.texi
index 90655a9..bb7f00a 100644
--- a/contrib/texinfo/doc/version.texi
+++ b/contrib/texinfo/doc/version.texi
@@ -1,4 +1,4 @@
-@set UPDATED 4 February 2003
-@set UPDATED-MONTH February 2003
-@set EDITION 4.5
-@set VERSION 4.5
+@set UPDATED 2 June 2003
+@set UPDATED-MONTH June 2003
+@set EDITION 4.6
+@set VERSION 4.6
diff --git a/contrib/texinfo/info/display.c b/contrib/texinfo/info/display.c
index aba4a4b..07fb3d5 100644
--- a/contrib/texinfo/info/display.c
+++ b/contrib/texinfo/info/display.c
@@ -1,7 +1,7 @@
/* display.c -- How to display Info windows.
- $Id: display.c,v 1.1 2002/08/25 23:38:38 karl Exp $
+ $Id: display.c,v 1.4 2003/05/13 16:20:44 karl Exp $
- Copyright (C) 1993, 97 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -136,7 +136,7 @@ display_update_one_window (win)
for (; nodetext < last_node_char; nodetext++)
{
- char *rep, *rep_carried_over, rep_temp[2];
+ char *rep = NULL, *rep_carried_over, rep_temp[2];
int replen;
if (isprint (*nodetext))
@@ -152,6 +152,15 @@ display_update_one_window (win)
{
replen = win->width - pl_index + pl_ignore;
}
+ else if (*nodetext == '\0'
+ && (nodetext + 1) < last_node_char
+ && *(nodetext + 1) == '\b')
+ {
+ /* Found new style image tag/cookie \0\b[ or \0\b]
+ Just skip for now. */
+ nodetext++;
+ continue;
+ }
else
{
rep = printed_representation (*nodetext, pl_index);
@@ -211,7 +220,7 @@ display_update_one_window (win)
to the next line. */
for (i = 0; pl_index < (win->width + pl_ignore - 1);)
printed_line[pl_index++] = rep[i++];
-
+
rep_carried_over = rep + i;
/* If printing the last character in this window couldn't
@@ -233,8 +242,10 @@ display_update_one_window (win)
entry = display[line_index + win->first_row];
/* If the screen line is inversed, then we have to clear
- the line from the screen first. Why, I don't know. */
- if (entry->inverse
+ the line from the screen first. Why, I don't know.
+ (But don't do this if we have no visible entries, as can
+ happen if the window is shrunk very small.) */
+ if ((entry && entry->inverse)
/* Need to erase the line if it has escape sequences. */
|| (raw_escapes_p && strchr (entry->text, '\033') != 0))
{
@@ -322,7 +333,7 @@ display_update_one_window (win)
printed_line[0] = '\0';
begin = nodetext;
-
+
while ((nodetext < last_node_char) && (*nodetext != '\n'))
nodetext++;
}
diff --git a/contrib/texinfo/info/indices.c b/contrib/texinfo/info/indices.c
index 4e3a3be..29cd2e2 100644
--- a/contrib/texinfo/info/indices.c
+++ b/contrib/texinfo/info/indices.c
@@ -1,7 +1,8 @@
/* indices.c -- deal with an Info file index.
- $Id: indices.c,v 1.1 2002/08/25 23:38:38 karl Exp $
+ $Id: indices.c,v 1.2 2003/02/11 16:39:06 karl Exp $
- Copyright (C) 1993, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 1999, 2002, 2003 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -390,7 +391,7 @@ DECLARE_INFO_COMMAND (info_next_index_match,
/* Report to the user on what we have found. */
{
register int j;
- char *name = _("CAN'T SEE THIS");
+ const char *name = _("CAN'T SEE THIS");
char *match;
for (j = 0; index_nodenames[j]; j++)
diff --git a/contrib/texinfo/info/info-utils.c b/contrib/texinfo/info/info-utils.c
index 611ca15..d018cbd 100644
--- a/contrib/texinfo/info/info-utils.c
+++ b/contrib/texinfo/info/info-utils.c
@@ -1,7 +1,7 @@
/* info-utils.c -- miscellanous.
- $Id: info-utils.c,v 1.1 2002/08/25 23:38:38 karl Exp $
+ $Id: info-utils.c,v 1.2 2003/03/06 23:22:23 karl Exp $
- Copyright (C) 1993, 98 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1998, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -355,6 +355,27 @@ info_concatenate_references (ref1, ref2)
return (result);
}
+
+
+/* Copy a reference structure. Since we tend to free everything at
+ every opportunity, we don't share any points, but copy everything into
+ new memory. */
+REFERENCE *
+info_copy_reference (src)
+ REFERENCE *src;
+{
+ REFERENCE *dest = xmalloc (sizeof (REFERENCE));
+ dest->label = src->label ? xstrdup (src->label) : NULL;
+ dest->filename = src->filename ? xstrdup (src->filename) : NULL;
+ dest->nodename = src->nodename ? xstrdup (src->nodename) : NULL;
+ dest->start = src->start;
+ dest->end = src->end;
+
+ return dest;
+}
+
+
+
/* Free the data associated with REFERENCES. */
void
info_free_references (references)
diff --git a/contrib/texinfo/info/info-utils.h b/contrib/texinfo/info/info-utils.h
index 5475fda..6ff0581 100644
--- a/contrib/texinfo/info/info-utils.h
+++ b/contrib/texinfo/info/info-utils.h
@@ -1,7 +1,7 @@
/* info-utils.h -- Exported functions and variables from info-utils.c.
- $Id: info-utils.h,v 1.1 2002/08/25 23:38:38 karl Exp $
+ $Id: info-utils.h,v 1.2 2003/03/06 23:21:48 karl Exp $
- Copyright (C) 1993, 1996, 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1996, 1998, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -83,6 +83,9 @@ extern REFERENCE **info_menu_items ();
and REF2 arrays are freed, but their contents are not. */
REFERENCE **info_concatenate_references ();
+/* Copy an existing reference into new memory. */
+extern REFERENCE *info_copy_reference ();
+
/* Free the data associated with REFERENCES. */
extern void info_free_references ();
diff --git a/contrib/texinfo/info/info.c b/contrib/texinfo/info/info.c
index 5d1be7f..5fceb74 100644
--- a/contrib/texinfo/info/info.c
+++ b/contrib/texinfo/info/info.c
@@ -1,5 +1,5 @@
/* info.c -- Display nodes of Info files in multiple windows.
- $Id: info.c,v 1.2 2003/01/19 18:45:59 karl Exp $
+ $Id: info.c,v 1.7 2003/05/19 13:10:59 karl Exp $
Copyright (C) 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
@@ -120,16 +120,16 @@ static struct option long_options[] = {
/* String describing the shorthand versions of the long options found above. */
#ifdef __MSDOS__
-static char *short_options = "d:n:f:o:ORsb";
+static char *short_options = "d:n:f:ho:ORsb";
#else
-static char *short_options = "d:n:f:o:ORs";
+static char *short_options = "d:n:f:ho:ORs";
#endif
/* When non-zero, the Info window system has been initialized. */
int info_windows_initialized_p = 0;
/* Some "forward" declarations. */
-static void info_short_help (), remember_info_program_name ();
+static void info_short_help ();
static void init_messages ();
extern void add_file_directory_to_path ();
@@ -158,7 +158,7 @@ main (argc, argv)
textdomain (PACKAGE);
init_messages ();
-
+
while (1)
{
int option_character;
@@ -166,7 +166,7 @@ main (argc, argv)
option_character = getopt_long
(argc, argv, short_options, long_options, &getopt_long_index);
- /* getopt_long () returns EOF when there are no more long options. */
+ /* getopt_long returns EOF when there are no more long options. */
if (option_character == EOF)
break;
@@ -199,6 +199,11 @@ main (argc, argv)
user_filename = xstrdup (optarg);
break;
+ /* Treat -h like --help. */
+ case 'h':
+ print_help_p = 1;
+ break;
+
/* User is specifying the name of a file to output to. */
case 'o':
if (user_output_filename)
@@ -473,6 +478,8 @@ For more information about these matters, see the files named COPYING.\n"),
xexit (0);
}
+
+ return 0; /* Avoid bogus warnings. */
}
void
@@ -558,7 +565,7 @@ info_short_help ()
static const char speech_friendly_string[] = "";
#endif
-
+
printf (_("\
Usage: %s [OPTION]... [MENU-ITEM...]\n\
\n\
@@ -609,22 +616,22 @@ Texinfo home page: http://www.gnu.org/software/texinfo/"));
use them that way. This also has the advantage that there's only one
copy of the strings. */
-char *msg_cant_find_node;
-char *msg_cant_file_node;
-char *msg_cant_find_window;
-char *msg_cant_find_point;
-char *msg_cant_kill_last;
-char *msg_no_menu_node;
-char *msg_no_foot_node;
-char *msg_no_xref_node;
-char *msg_no_pointer;
-char *msg_unknown_command;
-char *msg_term_too_dumb;
-char *msg_at_node_bottom;
-char *msg_at_node_top;
-char *msg_one_window;
-char *msg_win_too_small;
-char *msg_cant_make_help;
+const char *msg_cant_find_node;
+const char *msg_cant_file_node;
+const char *msg_cant_find_window;
+const char *msg_cant_find_point;
+const char *msg_cant_kill_last;
+const char *msg_no_menu_node;
+const char *msg_no_foot_node;
+const char *msg_no_xref_node;
+const char *msg_no_pointer;
+const char *msg_unknown_command;
+const char *msg_term_too_dumb;
+const char *msg_at_node_bottom;
+const char *msg_at_node_top;
+const char *msg_one_window;
+const char *msg_win_too_small;
+const char *msg_cant_make_help;
static void
init_messages ()
diff --git a/contrib/texinfo/info/info.h b/contrib/texinfo/info/info.h
index 6e58b17..90b82e4 100644
--- a/contrib/texinfo/info/info.h
+++ b/contrib/texinfo/info/info.h
@@ -1,7 +1,8 @@
/* info.h -- Header file which includes all of the other headers.
- $Id: info.h,v 1.1 2002/08/25 23:38:38 karl Exp $
+ $Id: info.h,v 1.2 2003/02/11 16:39:06 karl Exp $
- Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -128,22 +129,22 @@ extern int raw_escapes_p;
extern void info_error ();
/* Error message defines. */
-extern char *msg_cant_find_node;
-extern char *msg_cant_file_node;
-extern char *msg_cant_find_window;
-extern char *msg_cant_find_point;
-extern char *msg_cant_kill_last;
-extern char *msg_no_menu_node;
-extern char *msg_no_foot_node;
-extern char *msg_no_xref_node;
-extern char *msg_no_pointer;
-extern char *msg_unknown_command;
-extern char *msg_term_too_dumb;
-extern char *msg_at_node_bottom;
-extern char *msg_at_node_top;
-extern char *msg_one_window;
-extern char *msg_win_too_small;
-extern char *msg_cant_make_help;
+extern const char *msg_cant_find_node;
+extern const char *msg_cant_file_node;
+extern const char *msg_cant_find_window;
+extern const char *msg_cant_find_point;
+extern const char *msg_cant_kill_last;
+extern const char *msg_no_menu_node;
+extern const char *msg_no_foot_node;
+extern const char *msg_no_xref_node;
+extern const char *msg_no_pointer;
+extern const char *msg_unknown_command;
+extern const char *msg_term_too_dumb;
+extern const char *msg_at_node_bottom;
+extern const char *msg_at_node_top;
+extern const char *msg_one_window;
+extern const char *msg_win_too_small;
+extern const char *msg_cant_make_help;
extern char *filename_non_directory (); /* Found in info-utils.c. */
diff --git a/contrib/texinfo/info/infodoc.c b/contrib/texinfo/info/infodoc.c
index 830d8c0..5c25323 100644
--- a/contrib/texinfo/info/infodoc.c
+++ b/contrib/texinfo/info/infodoc.c
@@ -1,7 +1,7 @@
/* infodoc.c -- functions which build documentation nodes.
- $Id: infodoc.c,v 1.5 2002/11/06 00:40:08 karl Exp $
+ $Id: infodoc.c,v 1.6 2003/05/13 16:22:11 karl Exp $
- Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002 Free Software
+ Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -37,7 +37,7 @@ static NODE *internal_info_help_node = (NODE *)NULL;
static char *internal_info_help_node_contents = (char *)NULL;
/* The (more or less) static text which appears in the internal info
- help node. The actual key bindings are inserted. Keep the
+ help node. The actual key bindings are inserted. Keep the
underlines (****, etc.) in the same N_ call as the text lines they
refer to, so translations can make the number of *'s or -'s match. */
#if defined(INFOKEY)
@@ -300,7 +300,7 @@ create_internal_info_help_node (help_is_only_window_p)
? _(info_internal_help_text[i])
: info_internal_help_text[i];
char *key = info_help_keys_text[i][vi_keys_p];
-
+
/* If we have only one window (because the window size was too
small to split it), CTRL-x 0 doesn't work to `quit' help. */
if (STREQ (key, "CTRL-x 0") && help_is_only_window_p)
@@ -439,7 +439,7 @@ info_find_or_create_help_window ()
to quit help), true if help will be one of several visible windows
(so CTRL-x 0 must be used to quit help). */
help_is_only_window_p
- = (help_window && !windows->next
+ = ((help_window && !windows->next)
|| !help_window && eligible->height < HELP_SPLIT_SIZE);
create_internal_info_help_node (help_is_only_window_p);
@@ -1112,7 +1112,7 @@ where_is_internal (map, cmd)
where_is_internal without setting where_is_rep_index to zero. This
was found by Mandrake and reported by Thierry Vignaud
<tvignaud@mandrakesoft.com> around April 24, 2002.
-
+
I think the best fix is to make where_is_rep_index another
parameter to this recursively-called function, instead of a static
variable. But this [!INFOKEY] branch of the code is not enabled
diff --git a/contrib/texinfo/info/infokey.c b/contrib/texinfo/info/infokey.c
index f31c98a..4cb6518 100644
--- a/contrib/texinfo/info/infokey.c
+++ b/contrib/texinfo/info/infokey.c
@@ -1,5 +1,5 @@
/* infokey.c -- compile ~/.infokey to ~/.info.
- $Id: infokey.c,v 1.3 2003/01/19 18:46:27 karl Exp $
+ $Id: infokey.c,v 1.4 2003/05/13 16:26:02 karl Exp $
Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
@@ -86,7 +86,6 @@ main (argc, argv)
char **argv;
{
int getopt_long_index; /* Index returned by getopt_long (). */
- NODE *initial_node; /* First node loaded by Info. */
#ifdef HAVE_SETLOCALE
/* Set locale via LC_ALL. */
@@ -233,7 +232,7 @@ For more information about these matters, see the files named COPYING.\n"),
fclose (inf);
}
- xexit (0);
+ return 0;
}
static char *
@@ -289,18 +288,18 @@ mkpath (dir, file)
#info
#echo-area
#var
-
+
The sections may occur in any order. Each section may be
omitted completely. If the 'info' section is the first in the
file, its '#info' line may be omitted.
-
+
The 'info' and 'echo-area' sections
-----------------------------------
Each line in the 'info' or 'echo-area' sections has the
following syntax:
key-sequence SPACE action-name [ SPACE [ # comment ] ] \n
-
+
Where SPACE is one or more white space characters excluding
newline, "action-name" is the name of a GNU Info command,
"comment" is any sequence of characters excluding newline, and
@@ -319,7 +318,7 @@ mkpath (dir, file)
\r indicates a single CR;
\t indicates a single TAB;
\b indicates a single BACKSPACE;
-
+
4. \ku indicates the Up Arrow key;
\kd indicates the Down Arrow key;
\kl indicates the Left Arrow key;
@@ -345,17 +344,17 @@ mkpath (dir, file)
If the following line:
#stop
-
+
occurs anywhere in an 'info' or 'echo-area' section, that
indicates to GNU Info to suppress all of its default key
bindings in that context.
-
+
The 'var' section
-----------------
Each line in the 'var' section has the following syntax:
variable-name = value \n
-
+
Where "variable-name" is the name of a GNU Info variable and
"value" is the value that GNU Info will assign to that variable
when commencing execution. There must be no white space in the
@@ -567,7 +566,7 @@ compile (fp, filename, sections)
seqstate = special_key;
break;
default:
- /* Backslash followed by any other char
+ /* Backslash followed by any other char
just means that char. */
To_seq (c);
seqstate = normal;
@@ -683,7 +682,7 @@ compile (fp, filename, sections)
error = 1;
}
break;
-
+
case got_action:
if (c == '#')
state = in_trailing_comment;
@@ -720,7 +719,7 @@ compile (fp, filename, sections)
error = 1;
}
break;
-
+
case get_value:
if (c == '\n')
{
diff --git a/contrib/texinfo/info/man.c b/contrib/texinfo/info/man.c
index bbde1ac..1590b78 100644
--- a/contrib/texinfo/info/man.c
+++ b/contrib/texinfo/info/man.c
@@ -1,7 +1,7 @@
/* man.c: How to read and format man files.
- $Id: man.c,v 1.1 2002/08/25 23:38:38 karl Exp $
+ $Id: man.c,v 1.2 2003/05/13 16:37:54 karl Exp $
- Copyright (C) 1995, 1997, 1998, 1999, 2000, 2002 Free Software
+ Copyright (C) 1995, 1997, 1998, 1999, 2000, 2002, 2003 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -160,7 +160,7 @@ create_manpage_file_buffer ()
file_buffer->filesize = 0;
file_buffer->contents = (char *)NULL;
file_buffer->flags = (N_IsInternal | N_CannotGC | N_IsManPage);
-
+
return (file_buffer);
}
@@ -401,7 +401,7 @@ clean_manpage (manpage)
/* A malformed man page could have a \b as its first character,
in which case decrementing j by 2 will cause us to write into
newpage[-1], smashing the hidden info stored there by malloc. */
- if (manpage[i] == '\b' || manpage[i] == '\f' && j > 0)
+ if (manpage[i] == '\b' || (manpage[i] == '\f' && j > 0))
j -= 2;
else if (!raw_escapes_p)
{
diff --git a/contrib/texinfo/info/nodes.c b/contrib/texinfo/info/nodes.c
index 0554ec7..a0b58cf 100644
--- a/contrib/texinfo/info/nodes.c
+++ b/contrib/texinfo/info/nodes.c
@@ -1,7 +1,8 @@
/* nodes.c -- how to get an Info file and node.
- $Id: nodes.c,v 1.1 2002/08/25 23:38:38 karl Exp $
+ $Id: nodes.c,v 1.2 2003/05/13 16:37:54 karl Exp $
- Copyright (C) 1993, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1998, 1999, 2000, 2002, 2003 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -869,19 +870,19 @@ find_node_of_anchor (file_buffer, tag)
int anchor_pos, node_pos;
TAG *node_tag;
NODE *node;
-
+
/* Look through the tag list for the anchor. */
for (anchor_pos = 0; file_buffer->tags[anchor_pos]; anchor_pos++)
{
TAG *t = file_buffer->tags[anchor_pos];
if (t->nodestart == tag->nodestart)
- break;
+ break;
}
-
+
/* Should not happen, because we should always find the anchor. */
if (!file_buffer->tags[anchor_pos])
return NULL;
-
+
/* We've found the anchor. Look backwards in the tag table for the
preceding node (we're assuming the tags are given in order),
skipping over any preceding anchors. */
@@ -889,20 +890,20 @@ find_node_of_anchor (file_buffer, tag)
node_pos >= 0 && file_buffer->tags[node_pos]->nodelen == 0;
node_pos--)
;
-
+
/* An info file with an anchor before any nodes is pathological, but
it's possible, so don't crash. */
if (node_pos < 0)
return NULL;
-
+
/* We have the tag for the node that contained the anchor tag. */
- node_tag = file_buffer->tags[node_pos];
+ node_tag = file_buffer->tags[node_pos];
/* Look up the node name in the tag table to get the actual node.
This is a recursive call, but it can't recurse again, because we
call it with a real node. */
node = info_node_of_file_buffer_tags (file_buffer, node_tag->nodename);
-
+
/* Start displaying the node at the anchor position. */
if (node)
{ /* The nodestart for real nodes is three characters before the `F'
@@ -921,11 +922,11 @@ find_node_of_anchor (file_buffer, tag)
the screen), which looks wrong. */
if (node->display_pos >= node->nodelen)
node->display_pos = node->nodelen - 1;
-
+
/* Don't search in the node for the xref text, it's not there. */
node->flags |= N_FromAnchor;
}
-
+
return node;
}
@@ -944,8 +945,8 @@ info_node_of_file_buffer_tags (file_buffer, nodename)
if (!file_buffer->tags) {
return NULL;
}
-
- for (i = 0; (tag = file_buffer->tags[i]); i++)
+
+ for (i = 0; (tag = file_buffer->tags[i]); i++)
if (strcmp (nodename, tag->nodename) == 0)
{
FILE_BUFFER *subfile = info_find_file_internal (tag->filename,
@@ -1036,7 +1037,7 @@ info_node_of_file_buffer_tags (file_buffer, nodename)
free (node);
node = find_node_of_anchor (file_buffer, tag);
}
-
+
else
{
/* Since we know the length of this node, we have already
@@ -1098,7 +1099,7 @@ forget_info_file (filename)
if (!info_loaded_files)
return;
- for (i = 0; file_buffer = info_loaded_files[i]; i++)
+ for (i = 0; (file_buffer = info_loaded_files[i]); i++)
if (FILENAME_CMP (filename, file_buffer->filename) == 0
|| FILENAME_CMP (filename, file_buffer->fullpath) == 0)
{
@@ -1107,7 +1108,7 @@ forget_info_file (filename)
if (file_buffer->contents)
free (file_buffer->contents);
-
+
/* free_file_buffer_tags () also kills the subfiles list, since
the subfiles list is only of use in conjunction with tags. */
free_file_buffer_tags (file_buffer);
diff --git a/contrib/texinfo/info/window.c b/contrib/texinfo/info/window.c
index 8a626f0..93b9644 100644
--- a/contrib/texinfo/info/window.c
+++ b/contrib/texinfo/info/window.c
@@ -1,8 +1,8 @@
/* window.c -- windows in Info.
- $Id: window.c,v 1.1 2002/08/25 23:38:38 karl Exp $
+ $Id: window.c,v 1.2 2003/02/11 16:39:06 karl Exp $
- Copyright (C) 1993, 1997, 1998, 2001, 2002 Free Software Foundation,
- Inc.
+ Copyright (C) 1993, 1997, 1998, 2001, 2002, 2003 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1144,7 +1144,7 @@ window_make_modeline (window)
int modeline_len = 0;
char *parent = NULL, *filename = "*no file*";
char *nodename = "*no node*";
- char *update_message = NULL;
+ const char *update_message = NULL;
NODE *node = window->node;
if (node)
diff --git a/contrib/texinfo/lib/system.h b/contrib/texinfo/lib/system.h
index e001f0c..f2bbf22 100644
--- a/contrib/texinfo/lib/system.h
+++ b/contrib/texinfo/lib/system.h
@@ -1,7 +1,7 @@
/* system.h: system-dependent declarations; include this first.
- $Id: system.h,v 1.4 2002/10/31 13:44:06 karl Exp $
+ $Id: system.h,v 1.5 2003/03/22 17:40:39 karl Exp $
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -258,4 +258,15 @@ extern void xexit ();
/* For convenience. */
#define STREQ(s1,s2) (strcmp (s1, s2) == 0)
+/* We don't need anything fancy. If we did need something fancy, gnulib
+ has it. */
+#ifdef MIN
+#undef MIN
+#endif
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#ifdef MAX
+#undef MAX
+#endif
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+
#endif /* TEXINFO_SYSTEM_H */
diff --git a/contrib/texinfo/lib/xalloc.h b/contrib/texinfo/lib/xalloc.h
index 098a6c2..5b623da 100644
--- a/contrib/texinfo/lib/xalloc.h
+++ b/contrib/texinfo/lib/xalloc.h
@@ -18,6 +18,8 @@
#ifndef XALLOC_H_
# define XALLOC_H_
+# include <stddef.h>
+
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
diff --git a/contrib/texinfo/lib/xexit.c b/contrib/texinfo/lib/xexit.c
index fafe4b3..fa783b3 100644
--- a/contrib/texinfo/lib/xexit.c
+++ b/contrib/texinfo/lib/xexit.c
@@ -1,7 +1,7 @@
/* xexit.c -- exit with attention to return values and closing stdout.
- $Id: xexit.c,v 1.1 2002/08/25 23:38:38 karl Exp $
+ $Id: xexit.c,v 1.4 2003/05/19 13:10:59 karl Exp $
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,26 +41,28 @@
#endif /* not EXIT_SUCCESS */
-/* Flush stdout first, exit if failure. Otherwise, if EXIT_STATUS is
- zero, exit successfully, else unsuccessfully. */
-
+/* Flush stdout first, exit if failure (therefore, xexit should be
+ called to exit every program, not just `return' from main).
+ Otherwise, if EXIT_STATUS is zero, exit successfully, else
+ unsuccessfully. */
+
void
xexit (exit_status)
int exit_status;
{
if (ferror (stdout))
{
- fprintf (stderr, "ferror on stdout");
+ fputs (_("ferror on stdout\n"), stderr);
exit_status = 1;
}
else if (fflush (stdout) != 0)
{
- fprintf (stderr, "fflush error on stdout");
+ fputs (_("fflush error on stdout\n"), stderr);
exit_status = 1;
}
-
+
exit_status = exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
-
+
exit (exit_status);
}
diff --git a/contrib/texinfo/makeinfo/cmds.c b/contrib/texinfo/makeinfo/cmds.c
index 5ff0b5d..db9472b 100644
--- a/contrib/texinfo/makeinfo/cmds.c
+++ b/contrib/texinfo/makeinfo/cmds.c
@@ -1,5 +1,5 @@
/* cmds.c -- Texinfo commands.
- $Id: cmds.c,v 1.16 2003/01/12 15:18:24 karl Exp $
+ $Id: cmds.c,v 1.18 2003/04/21 01:02:39 karl Exp $
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
@@ -56,7 +56,8 @@ void
cm_anchor (), cm_node (), cm_menu (), cm_xref (), cm_ftable (),
cm_vtable (), cm_pxref (), cm_inforef (), cm_uref (), cm_email (),
cm_quotation (), cm_display (), cm_smalldisplay (), cm_itemize (),
- cm_enumerate (), cm_tab (), cm_table (), cm_itemx (), cm_noindent (),
+ cm_enumerate (), cm_tab (), cm_table (), cm_itemx (),
+ cm_noindent (), cm_indent (),
cm_setfilename (), cm_br (), cm_sp (), cm_page (), cm_group (),
cm_center (), cm_ref (), cm_include (), cm_bye (), cm_item (), cm_end (),
cm_kindex (), cm_cindex (), cm_findex (), cm_pindex (), cm_vindex (),
@@ -66,7 +67,8 @@ void
cm_defcodeindex (), cm_result (), cm_expansion (), cm_equiv (),
cm_print (), cm_error (), cm_point (), cm_today (), cm_flushleft (),
cm_flushright (), cm_finalout (), cm_cartouche (), cm_detailmenu (),
- cm_multitable (), cm_settitle (), cm_titlefont (), cm_titlepage (), cm_tie (), cm_tt (),
+ cm_multitable (), cm_settitle (), cm_titlefont (), cm_titlepage (),
+ cm_tie (), cm_tt (),
cm_verbatim (), cm_verbatiminclude ();
/* Conditionals. */
@@ -74,7 +76,10 @@ void cm_set (), cm_clear (), cm_ifset (), cm_ifclear ();
void cm_value (), cm_ifeq ();
/* Options. */
-static void cm_paragraphindent (), cm_exampleindent ();
+static void
+ cm_exampleindent (),
+ cm_firstparagraphindent (),
+ cm_paragraphindent ();
/* Internals. */
static void cm_obsolete ();
@@ -94,6 +99,7 @@ COMMAND command_table[] = {
{ ",", cm_accent_cedilla, MAYBE_BRACE_ARGS },
{ "-", cm_no_op, NO_BRACE_ARGS },
{ ".", insert_self, NO_BRACE_ARGS },
+ { "/", cm_no_op, NO_BRACE_ARGS },
{ ":", cm_no_op, NO_BRACE_ARGS },
{ "=", cm_accent, MAYBE_BRACE_ARGS },
{ "?", insert_self, NO_BRACE_ARGS },
@@ -219,6 +225,7 @@ COMMAND command_table[] = {
{ "file", cm_code, BRACE_ARGS },
{ "finalout", cm_no_op, NO_BRACE_ARGS },
{ "findex", cm_findex, NO_BRACE_ARGS },
+ { "firstparagraphindent", cm_firstparagraphindent, NO_BRACE_ARGS },
{ "flushleft", cm_flushleft, NO_BRACE_ARGS },
{ "flushright", cm_flushright, NO_BRACE_ARGS },
{ "footnote", cm_footnote, NO_BRACE_ARGS}, /* self-arg eater */
@@ -247,6 +254,7 @@ COMMAND command_table[] = {
{ "ignore", command_name_condition, NO_BRACE_ARGS },
{ "image", cm_image, BRACE_ARGS },
{ "include", cm_include, NO_BRACE_ARGS },
+ { "indent", cm_indent, NO_BRACE_ARGS },
{ "inforef", cm_inforef, BRACE_ARGS },
{ "insertcopying", cm_insert_copying, NO_BRACE_ARGS },
{ "item", cm_item, NO_BRACE_ARGS },
@@ -268,7 +276,7 @@ COMMAND command_table[] = {
{ "need", cm_ignore_line, NO_BRACE_ARGS },
{ "node", cm_node, NO_BRACE_ARGS },
{ "noindent", cm_noindent, NO_BRACE_ARGS },
- { "noindent", cm_novalidate, NO_BRACE_ARGS },
+ { "novalidate", cm_novalidate, NO_BRACE_ARGS },
{ "nwnode", cm_node, NO_BRACE_ARGS },
{ "o", cm_special_char, BRACE_ARGS },
{ "oddfooting", cm_ignore_line, NO_BRACE_ARGS },
@@ -985,8 +993,8 @@ cm_obsolete (arg, start, end)
}
-/* This says to inhibit the indentation of the next paragraph, but
- not of following paragraphs. */
+/* Inhibit the indentation of the next paragraph, but not of following
+ paragraphs. */
void
cm_noindent ()
{
@@ -994,10 +1002,17 @@ cm_noindent ()
inhibit_paragraph_indentation = -1;
}
+/* Force indentation of the next paragraph. */
+void
+cm_indent ()
+{
+ inhibit_paragraph_indentation = 0;
+}
+
/* I don't know exactly what to do with this. Should I allow
someone to switch filenames in the middle of output? Since the
file could be partially written, this doesn't seem to make sense.
- Another option: ignore it, since they don't *really* want to
+ Another option: ignore it, since they don't really want to
switch files. Finally, complain, or at least warn. It doesn't
really matter, anyway, since this doesn't get executed. */
void
@@ -1402,6 +1417,7 @@ cm_paragraphindent ()
free (arg);
}
+
/* @exampleindent: change indentation of example-like environments. */
static int
set_default_indentation_increment (string)
@@ -1427,3 +1443,31 @@ cm_exampleindent ()
free (arg);
}
+
+
+/* @firstparagraphindent: suppress indentation in first paragraphs after
+ headings. */
+static int
+set_firstparagraphindent (string)
+ char *string;
+{
+ if (STREQ (string, "insert") || STREQ (string, _("insert")))
+ do_first_par_indent = 1;
+ else if (STREQ (string, "none") || STREQ (string, _("none")))
+ do_first_par_indent = 0;
+ else
+ return -1;
+ return 0;
+}
+
+static void
+cm_firstparagraphindent ()
+{
+ char *arg;
+
+ get_rest_of_line (1, &arg);
+ if (set_firstparagraphindent (arg) != 0)
+ line_error (_("Bad argument to %c%s"), COMMAND_PREFIX, command);
+
+ free (arg);
+}
diff --git a/contrib/texinfo/makeinfo/defun.c b/contrib/texinfo/makeinfo/defun.c
index ce56059..992cf3b 100644
--- a/contrib/texinfo/makeinfo/defun.c
+++ b/contrib/texinfo/makeinfo/defun.c
@@ -1,7 +1,8 @@
/* defun.c -- @defun and friends.
- $Id: defun.c,v 1.3 2002/11/11 00:57:49 feloy Exp $
+ $Id: defun.c,v 1.6 2003/05/09 23:51:10 karl Exp $
- Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -331,7 +332,8 @@ defun_internal (type, x_p)
{
enum insertion_type base_type;
char **defun_args, **scan_args;
- char *category, *defined_name, *type_name, *type_name2;
+ const char *category;
+ char *defined_name, *type_name, *type_name2;
{
char *line;
@@ -441,7 +443,7 @@ defun_internal (type, x_p)
if (*scan_args && **scan_args && **scan_args == '(')
warning ("`%c' follows defined name `%s' instead of whitespace",
**scan_args, defined_name);
-
+
if (!x_p)
begin_insertion (type);
@@ -559,7 +561,7 @@ defun_internal (type, x_p)
break;
case deftypefn:
case deftypevr:
- execute_string ("%s", type_name);
+ execute_string ("%s ", type_name);
xml_insert_element (FUNCTION, START);
execute_string ("%s", defined_name);
xml_insert_element (FUNCTION, END);
@@ -567,7 +569,7 @@ defun_internal (type, x_p)
case deftypemethod:
case deftypeop:
case deftypeivar:
- execute_string ("%s", type_name2);
+ execute_string ("%s ", type_name2);
xml_insert_element (FUNCTION, START);
execute_string ("%s", defined_name);
xml_insert_element (FUNCTION, END);
@@ -713,27 +715,26 @@ defun_internal (type, x_p)
void
cm_defun ()
{
- int x_p;
enum insertion_type type;
- char *temp = xstrdup (command);
-
- x_p = (command[strlen (command) - 1] == 'x');
+ char *base_command = xstrdup (command); /* command with any `x' removed */
+ int x_p = (command[strlen (command) - 1] == 'x');
if (x_p)
- temp[strlen (temp) - 1] = 0;
+ base_command[strlen (base_command) - 1] = 0;
- type = find_type_from_name (temp);
- free (temp);
+ type = find_type_from_name (base_command);
/* If we are adding to an already existing insertion, then make sure
that we are already in an insertion of type TYPE. */
if (x_p && (!insertion_level || insertion_stack->insertion != type))
{
- line_error (_("Must be in `%s' insertion to use `%sx'"),
- command, command);
+ line_error (_("Must be in `@%s' environment to use `@%s'"),
+ base_command, command);
discard_until ("\n");
return;
}
+ else
+ defun_internal (type, x_p);
- defun_internal (type, x_p);
+ free (base_command);
}
diff --git a/contrib/texinfo/makeinfo/files.c b/contrib/texinfo/makeinfo/files.c
index 2c3fc10..a6a69d2 100644
--- a/contrib/texinfo/makeinfo/files.c
+++ b/contrib/texinfo/makeinfo/files.c
@@ -1,7 +1,8 @@
/* files.c -- file-related functions for makeinfo.
- $Id: files.c,v 1.1 2002/08/25 23:38:38 karl Exp $
+ $Id: files.c,v 1.3 2003/03/06 14:05:30 karl Exp $
- Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -82,7 +83,7 @@ extract_colon_unit (string, index)
When found, return the stat () info for FILENAME in FINFO.
If PATH is NULL, only the current directory is searched.
If the file could not be found, return a NULL pointer. */
-static char *
+char *
get_file_info_in_path (filename, path, finfo)
char *filename, *path;
struct stat *finfo;
@@ -322,9 +323,7 @@ filename_part (filename)
#ifdef REMOVE_OUTPUT_EXTENSIONS
/* See if there is an extension to remove. If so, remove it. */
{
- char *temp;
-
- temp = strrchr (basename, '.');
+ char *temp = strrchr (basename, '.');
if (temp)
*temp = 0;
}
diff --git a/contrib/texinfo/makeinfo/files.h b/contrib/texinfo/makeinfo/files.h
index e2a1069..0e1cde3 100644
--- a/contrib/texinfo/makeinfo/files.h
+++ b/contrib/texinfo/makeinfo/files.h
@@ -1,5 +1,5 @@
/* files.h -- declarations for files.c.
- $Id: files.h,v 1.1 2002/08/25 23:38:38 karl Exp $
+ $Id: files.h,v 1.2 2003/03/06 14:05:30 karl Exp $
Copyright (C) 1998, 2002 Free Software Foundation, Inc.
@@ -36,6 +36,7 @@ extern FSTACK *filestack;
extern void pushfile (), popfile ();
extern void flush_file_stack ();
+extern char *get_file_info_in_path ();
extern char *find_and_load ();
extern char *output_name_from_input_name ();
extern char *expand_filename ();
diff --git a/contrib/texinfo/makeinfo/html.c b/contrib/texinfo/makeinfo/html.c
index 51960fc..0c06c6c 100644
--- a/contrib/texinfo/makeinfo/html.c
+++ b/contrib/texinfo/makeinfo/html.c
@@ -1,7 +1,7 @@
/* html.c -- html-related utilities.
- $Id: html.c,v 1.8 2002/11/04 22:14:40 karl Exp $
+ $Id: html.c,v 1.18 2003/06/02 12:32:29 karl Exp $
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -26,14 +26,17 @@
HSTACK *htmlstack = NULL;
+static char *process_css_file (/* char * */);
+
/* See html.h. */
int html_output_head_p = 0;
int html_title_written = 0;
+
void
html_output_head ()
{
- static char *html_title = NULL;
+ static const char *html_title = NULL;
if (html_output_head_p)
return;
@@ -49,7 +52,7 @@ html_output_head ()
add_word ("<meta http-equiv=\"Content-Type\" content=\"text/html");
if (document_encoding_code != no_encoding)
add_word_args ("; charset=%s",
- encoding_table[document_encoding_code].ecname);
+ encoding_table[document_encoding_code].encname);
add_word ("\">\n");
if (!document_description)
@@ -59,8 +62,12 @@ html_output_head ()
document_description);
add_word_args ("<meta name=\"generator\" content=\"makeinfo %s\">\n",
VERSION);
+#if 0
+ /* let's not do this now, since it causes mozilla to put up a
+ navigation bar. */
add_word ("<link href=\"http://www.gnu.org/software/texinfo/\" \
rel=\"generator-home\">\n");
+#endif
if (copying_text)
{ /* copying_text has already been fully expanded in
@@ -73,6 +80,44 @@ rel=\"generator-home\">\n");
insert_string ("-->\n");
}
+ /* Put the style definitions in a comment for the sake of browsers
+ that don't support <style>. */
+ add_word ("<meta http-equiv=\"Content-Style-Type\" content=\"text/css\">\n");
+ add_word ("<style type=\"text/css\"><!--\n");
+
+ {
+ char *css_inline = NULL;
+
+ if (css_include)
+ /* This writes out any @import commands from the --css-file,
+ and returns any actual css code following the imports. */
+ css_inline = process_css_file (css_include);
+
+ /* This seems cleaner than adding <br>'s at the end of each line for
+ these "roman" displays. It's hardly the end of the world if the
+ browser doesn't do <style>s, in any case; they'll just come out in
+ typewriter. */
+#define CSS_FONT_INHERIT "font-family:inherit"
+ add_word_args (" pre.display { %s }\n", CSS_FONT_INHERIT);
+ add_word_args (" pre.format { %s }\n", CSS_FONT_INHERIT);
+
+ /* Alternatively, we could do <font size=-1> in insertion.c, but this
+ way makes it easier to override. */
+#define CSS_FONT_SMALLER "font-size:smaller"
+ add_word_args (" pre.smalldisplay { %s; %s }\n", CSS_FONT_INHERIT,
+ CSS_FONT_SMALLER);
+ add_word_args (" pre.smallformat { %s; %s }\n", CSS_FONT_INHERIT,
+ CSS_FONT_SMALLER);
+ add_word_args (" pre.smallexample { %s }\n", CSS_FONT_SMALLER);
+ add_word_args (" pre.smalllisp { %s }\n", CSS_FONT_SMALLER);
+
+ /* Write out any css code from the user's --css-file. */
+ if (css_inline)
+ add_word (css_inline);
+
+ add_word ("--></style>\n");
+ }
+
add_word ("</head>\n<body>\n");
if (title && !html_title_written && titlepage_cmd_present)
@@ -82,6 +127,158 @@ rel=\"generator-home\">\n");
}
}
+
+
+/* Append CHAR to BUFFER, (re)allocating as necessary. We don't handle
+ null characters. */
+
+typedef struct
+{
+ unsigned size; /* allocated */
+ unsigned length; /* used */
+ char *buffer;
+} buffer_type;
+
+
+static buffer_type *
+init_buffer ()
+{
+ buffer_type *buf = xmalloc (sizeof (buffer_type));
+ buf->length = 0;
+ buf->size = 0;
+ buf->buffer = NULL;
+
+ return buf;
+}
+
+
+static void
+append_char (buf, c)
+ buffer_type *buf;
+ int c;
+{
+ buf->length++;
+ if (buf->length >= buf->size)
+ {
+ buf->size += 100;
+ buf->buffer = xrealloc (buf->buffer, buf->size);
+ }
+ buf->buffer[buf->length - 1] = c;
+ buf->buffer[buf->length] = 0;
+}
+
+
+/* Read the cascading style-sheet file FILENAME. Write out any @import
+ commands, which must come first, by the definition of css. If the
+ file contains any actual css code following the @imports, return it;
+ else return NULL. */
+
+static char *
+process_css_file (filename)
+ char *filename;
+{
+ int c, lastchar;
+ FILE *f;
+ buffer_type *import_text = init_buffer ();
+ buffer_type *inline_text = init_buffer ();
+ unsigned lineno = 1;
+ enum { null_state, comment_state, import_state, inline_state } state
+ = null_state, prev_state;
+
+ /* read from stdin if `-' is the filename. */
+ f = STREQ (filename, "-") ? stdin : fopen (filename, "r");
+ if (!f)
+ {
+ error (_("%s: could not open --css-file: %s"), progname, filename);
+ return NULL;
+ }
+
+ /* Read the file. The @import statements must come at the beginning,
+ with only whitespace and comments allowed before any inline css code. */
+ while ((c = getc (f)) >= 0)
+ {
+ if (c == '\n')
+ lineno++;
+
+ switch (state)
+ {
+ case null_state: /* between things */
+ if (c == '@')
+ {
+ /* If there's some other @command, just call it an
+ import, it's all the same to us. So don't bother
+ looking for the `import'. */
+ append_char (import_text, c);
+ state = import_state;
+ }
+ else if (c == '/')
+ { /* possible start of a comment */
+ int nextchar = getc (f);
+ if (nextchar == '*')
+ state = comment_state;
+ else
+ {
+ ungetc (nextchar, f); /* wasn't a comment */
+ state = inline_state;
+ }
+ }
+ else if (isspace (c))
+ ; /* skip whitespace; maybe should use c_isspace? */
+
+ else
+ /* not an @import, not a comment, not whitespace: we must
+ have started the inline text. */
+ state = inline_state;
+
+ if (state == inline_state)
+ append_char (inline_text, c);
+
+ if (state != null_state)
+ prev_state = null_state;
+ break;
+
+ case comment_state:
+ if (c == '/' && lastchar == '*')
+ state = prev_state; /* end of comment */
+ break; /* else ignore this comment char */
+
+ case import_state:
+ append_char (import_text, c); /* include this import char */
+ if (c == ';')
+ { /* done with @import */
+ append_char (import_text, '\n'); /* make the output nice */
+ state = null_state;
+ prev_state = import_state;
+ }
+ break;
+
+ case inline_state:
+ /* No harm in writing out comments, so don't bother parsing
+ them out, just append everything. */
+ append_char (inline_text, c);
+ break;
+ }
+
+ lastchar = c;
+ }
+
+ /* Reached the end of the file. We should not be still in a comment. */
+ if (state == comment_state)
+ warning (_("%s:%d: --css-file ended in comment"), filename, lineno);
+
+ /* Write the @import text, if any. */
+ if (import_text->buffer)
+ {
+ add_word (import_text->buffer);
+ free (import_text->buffer);
+ free (import_text);
+ }
+
+ /* We're wasting the buffer struct memory, but so what. */
+ return inline_text->buffer;
+}
+
+
/* Escape HTML special characters in the string if necessary,
returning a pointer to a possibly newly-allocated one. */
@@ -139,6 +336,8 @@ escape_string (string)
free (string);
return newstring - newlen;
}
+
+
/* Save current tag. */
void
@@ -187,7 +386,7 @@ insert_html_tag (start_or_end, tag)
}
if (start_or_end != START)
- pop_tag (tag);
+ pop_tag ();
if (htmlstack)
old_tag = htmlstack->tag;
@@ -228,6 +427,8 @@ insert_html_tag (start_or_end, tag)
}
}
+
+
/* Output an HTML <link> to the filename for NODE, including the
other string as extra attributes. */
void
@@ -240,7 +441,7 @@ add_link (nodename, attributes)
add_word_args ("%s", attributes);
add_word_args (" href=\"");
add_anchor_name (nodename, 1);
- add_word ("\"></a>\n");
+ add_word ("\">\n");
}
}
diff --git a/contrib/texinfo/makeinfo/index.c b/contrib/texinfo/makeinfo/index.c
index 05c883c..ab6a53c 100644
--- a/contrib/texinfo/makeinfo/index.c
+++ b/contrib/texinfo/makeinfo/index.c
@@ -1,7 +1,7 @@
/* index.c -- indexing for Texinfo.
- $Id: index.c,v 1.4 2002/11/26 22:54:31 karl Exp $
+ $Id: index.c,v 1.8 2003/05/16 23:52:40 karl Exp $
- Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -342,9 +342,14 @@ init_indices ()
here; otherwise, when we try to define the pg index again
just below, it will still point to cp. */
undefindex (name_index_alist[i]->name);
- free (name_index_alist[i]->name);
- free (name_index_alist[i]);
- name_index_alist[i] = NULL;
+
+ /* undefindex sets all this to null in some cases. */
+ if (name_index_alist[i])
+ {
+ free (name_index_alist[i]->name);
+ free (name_index_alist[i]);
+ name_index_alist[i] = NULL;
+ }
}
}
@@ -551,16 +556,16 @@ make_index_entries_unique (array, count)
free (copy);
}
-/* Sort the index passed in INDEX, returning an array of
- pointers to elements. The array is terminated with a NULL
- pointer. We call qsort because it's supposed to be fast.
- I think this looks bad. */
+
+/* Sort the index passed in INDEX, returning an array of pointers to
+ elements. The array is terminated with a NULL pointer. */
+
INDEX_ELT **
sort_index (index)
INDEX_ELT *index;
{
INDEX_ELT **array;
- INDEX_ELT *temp = index;
+ INDEX_ELT *temp;
int count = 0;
int save_line_number = line_number;
char *save_input_filename = input_filename;
@@ -573,35 +578,36 @@ sort_index (index)
characters @AE{} etc., to sort incorrectly. */
html = 0;
- while (temp)
- {
- count++;
- temp = temp->next;
- }
-
- /* We have the length. Make an array. */
-
+ for (temp = index, count = 0; temp; temp = temp->next, count++)
+ ;
+ /* We have the length, now we can allocate an array. */
array = xmalloc ((count + 1) * sizeof (INDEX_ELT *));
- count = 0;
- temp = index;
- while (temp)
+ for (temp = index, count = 0; temp; temp = temp->next, count++)
{
- array[count++] = temp;
+ /* Allocate new memory for the return array, since parts of the
+ original INDEX get freed. Otherwise, if the document calls
+ @printindex twice on the same index, with duplicate entries,
+ we'll have garbage the second time. There are cleaner ways to
+ deal, but this will suffice for now. */
+ array[count] = xmalloc (sizeof (INDEX_ELT));
+ *(array[count]) = *(temp); /* struct assignment, hope it's ok */
+
+ /* Adjust next pointers to use the new memory. */
+ if (count > 0)
+ array[count-1]->next = array[count];
/* Set line number and input filename to the source line for this
index entry, as this expansion finds any errors. */
- line_number = array[count - 1]->defining_line;
- input_filename = array[count - 1]->defining_file;
+ line_number = array[count]->defining_line;
+ input_filename = array[count]->defining_file;
/* If this particular entry should be printed as a "code" index,
- then expand it as @code{entry}, i.e. as in fixed-width font. */
- array[count-1]->entry = expansion (temp->entry_text,
- array[count-1]->code);
-
- temp = temp->next;
+ then expand it as @code{entry}, i.e., as in fixed-width font. */
+ array[count]->entry = expansion (temp->entry_text, array[count]->code);
}
array[count] = NULL; /* terminate the array. */
+
line_number = save_line_number;
input_filename = save_input_filename;
html = save_html;
@@ -619,11 +625,19 @@ sort_index (index)
if (lang_env && !STREQ (lang_env, "C") && !STREQ (lang_env, "POSIX"))
index_compare_fn = strcoll;
}
-#endif /* HAVE_STRCOLL */
+#endif /* HAVE_STRCOLL */
/* Sort the array. */
qsort (array, count, sizeof (INDEX_ELT *), index_element_compare);
+
+ /* Remove duplicate entries. */
make_index_entries_unique (array, count);
+
+ /* Replace the original index with the sorted one, in case the
+ document wants to print it again. If the index wasn't empty. */
+ if (index)
+ *index = **array;
+
return array;
}
@@ -667,11 +681,11 @@ cm_printindex ()
free (index_name);
return;
}
-
+
/* Do this before sorting, so execute_string is in the good environment */
if (xml && docbook)
xml_begin_index ();
-
+
/* Do this before sorting, so execute_string in index_element_compare
will give the same results as when we actually print. */
printing_index = 1;
@@ -685,25 +699,25 @@ cm_printindex ()
add_word_args ("<ul class=\"index-%s\" compact>", index_name);
else if (!no_headers && !docbook)
add_word ("* Menu:\n\n");
-
+
me_inhibit_expansion++;
-
+
/* This will probably be enough. */
line_length = 100;
line = xmalloc (line_length);
-
+
for (item = 0; (index = array[item]); item++)
{
/* A pathological document might have an index entry outside of any
node. Don't crash; try using the section name instead. */
- char *index_node = index->node;
-
+ const char *index_node = index->node;
+
line_number = index->defining_line;
input_filename = index->defining_file;
-
+
if ((!index_node || !*index_node) && html)
index_node = toc_find_section_of_node (index_node);
-
+
if (!index_node || !*index_node)
{
line_error (_("Entry for index `%s' outside of any node"),
@@ -711,7 +725,7 @@ cm_printindex ()
if (html || !no_headers)
index_node = _("(outside of any node)");
}
-
+
if (html)
/* fixme: html: we should use specific index anchors pointing
to the actual location of the indexed position (but then we
@@ -728,7 +742,7 @@ cm_printindex ()
expand the original entry text here. */
char *escaped_entry = xstrdup (index->entry_text);
char *expanded_entry;
-
+
/* expansion() doesn't HTML-escape the argument, so need
to do it separately. */
escaped_entry = escape_string (escaped_entry);
@@ -741,12 +755,14 @@ cm_printindex ()
if (index->node && *index->node)
{
/* Make sure any non-macros in the node name are expanded. */
+ char *expanded_index;
+
in_fixed_width_font++;
- index_node = expansion (index_node, 0);
+ expanded_index = expansion (index_node, 0);
in_fixed_width_font--;
- add_anchor_name (index_node, 1);
- add_word_args ("\">%s</a>", index_node);
- free (index_node);
+ add_anchor_name (expanded_index, 1);
+ add_word_args ("\">%s</a>", expanded_index);
+ free (expanded_index);
}
else if (STREQ (index_node, _("(outside of any node)")))
{
@@ -769,11 +785,11 @@ cm_printindex ()
else
{
unsigned new_length = strlen (index->entry);
-
+
if (new_length < 50) /* minimum length used below */
new_length = 50;
new_length += strlen (index_node) + 7; /* * : .\n\0 */
-
+
if (new_length > line_length)
{
line_length = new_length;
@@ -800,7 +816,7 @@ cm_printindex ()
index. Instead, output the number or name of the
section that corresponds to that node. */
char *section_name = toc_find_section_of_node (index_node);
-
+
sprintf (line, "%-*s ", number_sections ? 50 : 1, index->entry);
line[strlen (index->entry)] = ':';
insert_string (line);
@@ -808,13 +824,13 @@ cm_printindex ()
{
int idx = 0;
unsigned ref_len = strlen (section_name) + 30;
-
+
if (ref_len > line_length)
{
line_length = ref_len;
line = xrealloc (line, line_length);
}
-
+
if (number_sections)
{
while (section_name[idx]
@@ -835,7 +851,7 @@ cm_printindex ()
}
}
}
-
+
/* Prevent `output_paragraph' from growing to the size of the
whole index. */
flush_output ();
@@ -844,17 +860,16 @@ cm_printindex ()
free (line);
free (index_name);
-
+
me_inhibit_expansion--;
-
printing_index = 0;
- free (array);
+
close_single_paragraph ();
filling_enabled = saved_filling_enabled;
inhibit_paragraph_indentation = saved_inhibit_paragraph_indentation;
input_filename = saved_input_filename;
line_number = saved_line_number;
-
+
if (html)
add_word ("</ul>");
else if (xml && docbook)
diff --git a/contrib/texinfo/makeinfo/insertion.c b/contrib/texinfo/makeinfo/insertion.c
index ecc0f66..95c0be2 100644
--- a/contrib/texinfo/makeinfo/insertion.c
+++ b/contrib/texinfo/makeinfo/insertion.c
@@ -1,5 +1,5 @@
/* insertion.c -- insertions for Texinfo.
- $Id: insertion.c,v 1.14 2003/01/02 23:46:29 karl Exp $
+ $Id: insertion.c,v 1.21 2003/04/01 14:34:18 karl Exp $
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
@@ -130,8 +130,21 @@ char *
get_item_function ()
{
char *item_function;
+ char *item_loc;
+
get_rest_of_line (0, &item_function);
+ /* If the document erroneously says
+ @itemize @bullet @item foobar
+ it's nicer to give an error up front than repeat `@bullet expected
+ braces' until we get a segmentation fault. */
+ item_loc = strstr (item_function, "@item");
+ if (item_loc)
+ {
+ line_error (_("@item not allowed in argument to @itemize"));
+ *item_loc = 0;
+ }
+
/* If we hit the end of text in get_rest_of_line, backing up
input pointer will cause the last character of the last line
be pushed back onto the input, which is wrong. */
@@ -191,7 +204,7 @@ pop_insertion ()
/* Return a pointer to the print name of this
enumerated type. */
-char *
+const char *
insertion_type_pname (type)
enum insertion_type type;
{
@@ -643,8 +656,14 @@ begin_insertion (type)
close_single_paragraph ();
break;
- /* Insertions that are no-ops in info, but do something in TeX. */
case cartouche:
+ if (html)
+ add_word ("<table class=\"cartouche\" border=1><tr><td>\n");
+ if (in_menu)
+ no_discard++;
+ break;
+
+ /* Insertions that are no-ops in info, but do something in TeX. */
case ifclear:
case ifhtml:
case ifinfo:
@@ -845,7 +864,7 @@ end_insertion (type)
case menu:
in_menu--; /* No longer hacking menus. */
- if (html)
+ if (html && !no_headers)
add_word ("</ul>\n");
else if (!no_headers)
close_insertion_paragraph ();
@@ -869,8 +888,13 @@ end_insertion (type)
close_insertion_paragraph ();
break;
- case group:
case cartouche:
+ if (html)
+ add_word ("</td></tr></table>\n");
+ close_insertion_paragraph ();
+ break;
+
+ case group:
close_insertion_paragraph ();
break;
@@ -981,7 +1005,7 @@ discard_insertions (specials_ok)
break;
else
{
- char *offender = insertion_type_pname (insertion_stack->insertion);
+ const char *offender = insertion_type_pname (insertion_stack->insertion);
file_line_error (insertion_stack->filename,
insertion_stack->line_number,
@@ -1643,9 +1667,10 @@ cm_item ()
in this context, but I cannot find any way to force
them all render exactly one blank line. */
if (!itemx_flag
- && strncmp ((char *) output_paragraph
+ && ((output_paragraph_offset < sizeof (dl_tag) + 1)
+ || strncmp ((char *) output_paragraph
+ output_paragraph_offset - sizeof (dl_tag) + 1,
- dl_tag, sizeof (dl_tag) - 1) != 0)
+ dl_tag, sizeof (dl_tag) - 1) != 0))
add_word ("<br>");
add_word ("<dt>");
diff --git a/contrib/texinfo/makeinfo/lang.c b/contrib/texinfo/makeinfo/lang.c
index a9cbfe1..2938196 100644
--- a/contrib/texinfo/makeinfo/lang.c
+++ b/contrib/texinfo/makeinfo/lang.c
@@ -1,7 +1,7 @@
/* lang.c -- language-dependent support.
- $Id: lang.c,v 1.5 2002/11/12 18:48:52 feloy Exp $
+ $Id: lang.c,v 1.8 2003/05/01 00:05:27 karl Exp $
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,12 +31,12 @@ encoding_code_type document_encoding_code = no_encoding;
/* Current language code; default is English. */
language_code_type language_code = en;
-iso_map_type us_ascii_map [] = {{NULL, 0, 0}}; /* ASCII map is trivial */
+static iso_map_type us_ascii_map [] = {{NULL, 0, 0}}; /* ASCII map is trivial */
/* Translation table between HTML and ISO Codes. The last item is
hopefully the Unicode. It might be possible that those Unicodes are
not correct, cause I didn't check them. kama */
-iso_map_type iso8859_1_map [] = {
+static iso_map_type iso8859_1_map [] = {
{ "nbsp", 0xA0, 0x00A0 },
{ "iexcl", 0xA1, 0x00A1 },
{ "cent", 0xA2, 0x00A2 },
@@ -86,7 +86,7 @@ iso_map_type iso8859_1_map [] = {
{ "Iacute", 0xCD, 0x00CD },
{ "Icirc", 0xCE, 0x00CE },
{ "Iuml", 0xCF, 0x00CF },
- { "ETH", 0xD0, 0x00D0 }, /* I don't know ;-( */
+ { "ETH", 0xD0, 0x00D0 },
{ "Ntilde", 0xD1, 0x00D1 },
{ "Ograve", 0xD2, 0x00D2 },
{ "Oacute", 0xD3, 0x00D3 },
@@ -137,11 +137,133 @@ iso_map_type iso8859_1_map [] = {
{ NULL, 0, 0 }
};
+
+
+/* Date: Mon, 31 Mar 2003 00:19:28 +0200
+ From: Wojciech Polak <polak@gnu.org>
+...
+ * Primary Polish site for ogonki is http://www.agh.edu.pl/ogonki/,
+ but it's only in Polish language (it has some interesting links).
+
+ * A general site about ISO 8859-2 at http://nl.ijs.si/gnusl/cee/iso8859-2.html
+
+ * ISO 8859-2 Character Set at http://nl.ijs.si/gnusl/cee/charset.html
+ This site provides almost all information about iso-8859-2,
+ including the character table!!! (must see!)
+
+ * ISO 8859-2 and even HTML entities !!! (must see!)
+ http://people.ssh.fi/mtr/genscript/88592.txt
+
+ * (minor) http://www.agh.edu.pl/ogonki/plchars.html
+ One more table, this time it includes even information about Polish
+ characters in Unicode.
+*/
+
+static iso_map_type iso8859_2_map [] = {
+ { "nbsp", 0xA0, 0x00A0 }, /* NO-BREAK SPACE */
+ { "", 0xA1, 0x0104 }, /* LATIN CAPITAL LETTER A WITH OGONEK */
+ { "", 0xA2, 0x02D8 }, /* BREVE */
+ { "", 0xA3, 0x0141 }, /* LATIN CAPITAL LETTER L WITH STROKE */
+ { "curren", 0xA4, 0x00A4 }, /* CURRENCY SIGN */
+ { "", 0xA5, 0x013D }, /* LATIN CAPITAL LETTER L WITH CARON */
+ { "", 0xA6, 0x015A }, /* LATIN CAPITAL LETTER S WITH ACUTE */
+ { "sect", 0xA7, 0x00A7 }, /* SECTION SIGN */
+ { "uml", 0xA8, 0x00A8 }, /* DIAERESIS */
+ { "", 0xA9, 0x0160 }, /* LATIN CAPITAL LETTER S WITH CARON */
+ { "", 0xAA, 0x015E }, /* LATIN CAPITAL LETTER S WITH CEDILLA */
+ { "", 0xAB, 0x0164 }, /* LATIN CAPITAL LETTER T WITH CARON */
+ { "", 0xAC, 0x0179 }, /* LATIN CAPITAL LETTER Z WITH ACUTE */
+ { "shy", 0xAD, 0x00AD }, /* SOFT HYPHEN */
+ { "", 0xAE, 0x017D }, /* LATIN CAPITAL LETTER Z WITH CARON */
+ { "", 0xAF, 0x017B }, /* LATIN CAPITAL LETTER Z WITH DOT ABOVE */
+ { "deg", 0xB0, 0x00B0 }, /* DEGREE SIGN */
+ { "", 0xB1, 0x0105 }, /* LATIN SMALL LETTER A WITH OGONEK */
+ { "", 0xB2, 0x02DB }, /* OGONEK */
+ { "", 0xB3, 0x0142 }, /* LATIN SMALL LETTER L WITH STROKE */
+ { "acute", 0xB4, 0x00B4 }, /* ACUTE ACCENT */
+ { "", 0xB5, 0x013E }, /* LATIN SMALL LETTER L WITH CARON */
+ { "", 0xB6, 0x015B }, /* LATIN SMALL LETTER S WITH ACUTE */
+ { "", 0xB7, 0x02C7 }, /* CARON (Mandarin Chinese third tone) */
+ { "cedil", 0xB8, 0x00B8 }, /* CEDILLA */
+ { "", 0xB9, 0x0161 }, /* LATIN SMALL LETTER S WITH CARON */
+ { "", 0xBA, 0x015F }, /* LATIN SMALL LETTER S WITH CEDILLA */
+ { "", 0xBB, 0x0165 }, /* LATIN SMALL LETTER T WITH CARON */
+ { "", 0xBC, 0x017A }, /* LATIN SMALL LETTER Z WITH ACUTE */
+ { "", 0xBD, 0x02DD }, /* DOUBLE ACUTE ACCENT */
+ { "", 0xBE, 0x017E }, /* LATIN SMALL LETTER Z WITH CARON */
+ { "", 0xBF, 0x017C }, /* LATIN SMALL LETTER Z WITH DOT ABOVE */
+ { "", 0xC0, 0x0154 }, /* LATIN CAPITAL LETTER R WITH ACUTE */
+ { "", 0xC1, 0x00C1 }, /* LATIN CAPITAL LETTER A WITH ACUTE */
+ { "", 0xC2, 0x00C2 }, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
+ { "", 0xC3, 0x0102 }, /* LATIN CAPITAL LETTER A WITH BREVE */
+ { "", 0xC4, 0x00C4 }, /* LATIN CAPITAL LETTER A WITH DIAERESIS */
+ { "", 0xC5, 0x0139 }, /* LATIN CAPITAL LETTER L WITH ACUTE */
+ { "", 0xC6, 0x0106 }, /* LATIN CAPITAL LETTER C WITH ACUTE */
+ { "", 0xC7, 0x00C7 }, /* LATIN CAPITAL LETTER C WITH CEDILLA */
+ { "", 0xC8, 0x010C }, /* LATIN CAPITAL LETTER C WITH CARON */
+ { "", 0xC9, 0x00C9 }, /* LATIN CAPITAL LETTER E WITH ACUTE */
+ { "", 0xCA, 0x0118 }, /* LATIN CAPITAL LETTER E WITH OGONEK */
+ { "", 0xCB, 0x00CB }, /* LATIN CAPITAL LETTER E WITH DIAERESIS */
+ { "", 0xCC, 0x011A }, /* LATIN CAPITAL LETTER E WITH CARON */
+ { "", 0xCD, 0x00CD }, /* LATIN CAPITAL LETTER I WITH ACUTE */
+ { "", 0xCE, 0x00CE }, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
+ { "", 0xCF, 0x010E }, /* LATIN CAPITAL LETTER D WITH CARON */
+ { "", 0xD0, 0x0110 }, /* LATIN CAPITAL LETTER D WITH STROKE */
+ { "", 0xD1, 0x0143 }, /* LATIN CAPITAL LETTER N WITH ACUTE */
+ { "", 0xD2, 0x0147 }, /* LATIN CAPITAL LETTER N WITH CARON */
+ { "", 0xD3, 0x00D3 }, /* LATIN CAPITAL LETTER O WITH ACUTE */
+ { "", 0xD4, 0x00D4 }, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
+ { "", 0xD5, 0x0150 }, /* LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */
+ { "", 0xD6, 0x00D6 }, /* LATIN CAPITAL LETTER O WITH DIAERESIS */
+ { "times", 0xD7, 0x00D7 }, /* MULTIPLICATION SIGN */
+ { "", 0xD8, 0x0158 }, /* LATIN CAPITAL LETTER R WITH CARON */
+ { "", 0xD9, 0x016E }, /* LATIN CAPITAL LETTER U WITH RING ABOVE */
+ { "", 0xDA, 0x00DA }, /* LATIN CAPITAL LETTER U WITH ACUTE */
+ { "", 0xDB, 0x0170 }, /* LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */
+ { "", 0xDC, 0x00DC }, /* LATIN CAPITAL LETTER U WITH DIAERESIS */
+ { "", 0xDD, 0x00DD }, /* LATIN CAPITAL LETTER Y WITH ACUTE */
+ { "", 0xDE, 0x0162 }, /* LATIN CAPITAL LETTER T WITH CEDILLA */
+ { "", 0xDF, 0x00DF }, /* LATIN SMALL LETTER SHARP S (German) */
+ { "", 0xE0, 0x0155 }, /* LATIN SMALL LETTER R WITH ACUTE */
+ { "", 0xE1, 0x00E1 }, /* LATIN SMALL LETTER A WITH ACUTE */
+ { "", 0xE2, 0x00E2 }, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */
+ { "", 0xE3, 0x0103 }, /* LATIN SMALL LETTER A WITH BREVE */
+ { "", 0xE4, 0x00E4 }, /* LATIN SMALL LETTER A WITH DIAERESIS */
+ { "", 0xE5, 0x013A }, /* LATIN SMALL LETTER L WITH ACUTE */
+ { "", 0xE6, 0x0107 }, /* LATIN SMALL LETTER C WITH ACUTE */
+ { "", 0xE7, 0x00E7 }, /* LATIN SMALL LETTER C WITH CEDILLA */
+ { "", 0xE8, 0x010D }, /* LATIN SMALL LETTER C WITH CARON */
+ { "", 0xE9, 0x00E9 }, /* LATIN SMALL LETTER E WITH ACUTE */
+ { "", 0xEA, 0x0119 }, /* LATIN SMALL LETTER E WITH OGONEK */
+ { "", 0xEB, 0x00EB }, /* LATIN SMALL LETTER E WITH DIAERESIS */
+ { "", 0xEC, 0x011B }, /* LATIN SMALL LETTER E WITH CARON */
+ { "", 0xED, 0x00ED }, /* LATIN SMALL LETTER I WITH ACUTE */
+ { "", 0xEE, 0x00EE }, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */
+ { "", 0xEF, 0x010F }, /* LATIN SMALL LETTER D WITH CARON */
+ { "", 0xF0, 0x0111 }, /* LATIN SMALL LETTER D WITH STROKE */
+ { "", 0xF1, 0x0144 }, /* LATIN SMALL LETTER N WITH ACUTE */
+ { "", 0xF2, 0x0148 }, /* LATIN SMALL LETTER N WITH CARON */
+ { "", 0xF3, 0x00F3 }, /* LATIN SMALL LETTER O WITH ACUTE */
+ { "", 0xF4, 0x00F4 }, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */
+ { "", 0xF5, 0x0151 }, /* LATIN SMALL LETTER O WITH DOUBLE ACUTE */
+ { "", 0xF6, 0x00F6 }, /* LATIN SMALL LETTER O WITH DIAERESIS */
+ { "divide", 0xF7, 0x00F7 }, /* DIVISION SIGN */
+ { "", 0xF8, 0x0159 }, /* LATIN SMALL LETTER R WITH CARON */
+ { "", 0xF9, 0x016F }, /* LATIN SMALL LETTER U WITH RING ABOVE */
+ { "", 0xFA, 0x00FA }, /* LATIN SMALL LETTER U WITH ACUTE */
+ { "", 0xFB, 0x0171 }, /* LATIN SMALL LETTER U WITH DOUBLE ACUTE */
+ { "", 0xFC, 0x00FC }, /* LATIN SMALL LETTER U WITH DIAERESIS */
+ { "", 0xFD, 0x00FD }, /* LATIN SMALL LETTER Y WITH ACUTE */
+ { "", 0xFE, 0x0163 }, /* LATIN SMALL LETTER T WITH CEDILLA */
+ { "", 0xFF, 0x02D9 }, /* DOT ABOVE (Mandarin Chinese light tone) */
+ { NULL, 0, 0 }
+};
+
encoding_type encoding_table[] = {
{ no_encoding, "(no encoding)", NULL },
{ US_ASCII, "US-ASCII", us_ascii_map },
{ ISO_8859_1, "ISO-8859-1", (iso_map_type *) iso8859_1_map },
- { ISO_8859_2, "ISO-8859-2", NULL },
+ { ISO_8859_2, "ISO-8859-2", (iso_map_type *) iso8859_2_map },
{ ISO_8859_3, "ISO-8859-3", NULL },
{ ISO_8859_4, "ISO-8859-4", NULL },
{ ISO_8859_5, "ISO-8859-5", NULL },
@@ -310,7 +432,7 @@ void
cm_documentlanguage ()
{
language_code_type c;
- char *lang_arg;
+ char *lang_arg;
/* Read the line with the language code on it. */
get_rest_of_line (0, &lang_arg);
@@ -365,13 +487,13 @@ cm_documentencoding ()
{
encoding_code_type enc;
char *enc_arg;
-
+
get_rest_of_line (1, &enc_arg);
/* See if we have this encoding. */
for (enc = no_encoding+1; enc != last_encoding_code; enc++)
{
- if (strcasecmp (enc_arg, encoding_table[enc].ecname) == 0)
+ if (strcasecmp (enc_arg, encoding_table[enc].encname) == 0)
{
document_encoding_code = enc;
break;
@@ -380,7 +502,7 @@ cm_documentencoding ()
/* If we didn't find this code, complain. */
if (enc == last_encoding_code)
- warning (_("unrecogized encoding name `%s'"), enc_arg);
+ warning (_("unrecognized encoding name `%s'"), enc_arg);
else if (encoding_table[document_encoding_code].isotab == NULL)
warning (_("sorry, encoding `%s' not supported"), enc_arg);
@@ -434,7 +556,7 @@ cm_accent_generic_html (arg, start, end, html_supported, single,
char *html_solo;
{
static int valid_html_accent; /* yikes */
-
+
if (arg == START)
{ /* If HTML has good support for this character, use it. */
if (strchr (html_supported, curchar ()))
@@ -447,7 +569,7 @@ cm_accent_generic_html (arg, start, end, html_supported, single,
escape_html = saved_escape_html;
}
else
- {
+ {
valid_html_accent = 0;
if (html_solo_standalone)
{ /* No special HTML support, so produce standalone char. */
@@ -492,7 +614,7 @@ cm_accent_generic_no_headers (arg, start, end, single, html_solo)
buffer[0] = output_paragraph[end - 1];
buffer[1] = 0;
strcat (buffer, html_solo);
-
+
rc = cm_search_iso_map (buffer);
if (rc >= 0)
/* A little bit tricky ;-)
@@ -505,12 +627,12 @@ cm_accent_generic_no_headers (arg, start, end, single, html_solo)
else
{ /* If we didn't find a translation for this character,
put the single instead. E.g., &Xuml; does not exist so X&uml;
- should be produced. */
+ should be produced. */
warning (_("%s is an invalid ISO code, using %c"),
buffer, single);
add_char (single);
}
-
+
free (buffer);
}
}
@@ -579,7 +701,7 @@ cm_accent_generic (arg, start, end, html_supported, single,
else if (no_headers)
cm_accent_generic_no_headers (arg, start, end, single, html_solo);
else if (arg == END)
- {
+ {
if (enable_encoding)
/* use 8-bit if available */
cm_accent_generic_no_headers (arg, start, end, single, html_solo);
@@ -665,9 +787,9 @@ cm_special_char (arg)
else if (strcmp (command, "ae") == 0)
add_encoded_char ("aelig", command);
else if (strcmp (command, "OE") == 0)
- add_word ("&#140;", command);
+ add_encoded_char ("#140", command);
else if (strcmp (command, "oe") == 0)
- add_word ("&#156;", command);
+ add_encoded_char ("#156", command);
else if (strcmp (command, "AA") == 0)
add_encoded_char ("Aring", command);
else if (strcmp (command, "aa") == 0)
diff --git a/contrib/texinfo/makeinfo/lang.h b/contrib/texinfo/makeinfo/lang.h
index b78ce9c..a1e9489 100644
--- a/contrib/texinfo/makeinfo/lang.h
+++ b/contrib/texinfo/makeinfo/lang.h
@@ -1,7 +1,7 @@
/* lang.h -- declarations for language codes etc.
- $Id: lang.h,v 1.3 2002/11/07 16:10:49 karl Exp $
+ $Id: lang.h,v 1.4 2003/05/01 00:05:27 karl Exp $
- Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -80,9 +80,9 @@ extern language_type language_table[];
typedef enum {
no_encoding,
US_ASCII,
- ISO_8859_1, /* default for en, de, */
- ISO_8859_2, /* actualy not supported like the rest below */
- ISO_8859_3,
+ ISO_8859_1,
+ ISO_8859_2,
+ ISO_8859_3, /* this and none of the rest are supported. */
ISO_8859_4,
ISO_8859_5,
ISO_8859_6,
@@ -118,7 +118,7 @@ typedef struct
typedef struct
{
encoding_code_type ec; /* document encoding type (see above enum) */
- char *ecname; /* encoding name like ISO-8859-1 */
+ char *encname; /* encoding name like "ISO-8859-1", valid in Emacs */
iso_map_type *isotab; /* address of ISO translation table */
} encoding_type;
diff --git a/contrib/texinfo/makeinfo/macro.c b/contrib/texinfo/makeinfo/macro.c
index 357d4ac..ef33a53 100644
--- a/contrib/texinfo/makeinfo/macro.c
+++ b/contrib/texinfo/makeinfo/macro.c
@@ -1,7 +1,7 @@
/* macro.c -- user-defined macros for Texinfo.
- $Id: macro.c,v 1.1 2002/08/25 23:38:38 karl Exp $
+ $Id: macro.c,v 1.2 2003/06/01 23:41:23 karl Exp $
- Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -322,7 +322,7 @@ apply (named, actuals, body)
else
{ /* Snarf parameter name, check against named parameters. */
char *param;
- int param_start, which, len;
+ int param_start, len;
param_start = ++i;
while (body[i] && body[i] != '\\')
@@ -336,29 +336,38 @@ apply (named, actuals, body)
if (body[i]) /* move past \ */
i++;
- /* Now check against named parameters. */
- for (which = 0; named && named[which]; which++)
- if (STREQ (named[which], param))
- break;
-
- if (named && named[which])
- {
- text = which < length_of_actuals ? actuals[which] : NULL;
- if (!text)
- text = "";
- len = strlen (text);
- }
- else
- { /* not a parameter, either it's \\ (if len==0) or an
- error. In either case, restore one \ at least. */
- if (len) {
- warning (_("\\ in macro expansion followed by `%s' instead of \\ or parameter name"),
- param);
- }
+ if (len == 0)
+ { /* \\ always means \, even if macro has no args. */
len++;
text = xmalloc (1 + len);
sprintf (text, "\\%s", param);
}
+ else
+ {
+ int which;
+
+ /* Check against named parameters. */
+ for (which = 0; named && named[which]; which++)
+ if (STREQ (named[which], param))
+ break;
+
+ if (named && named[which])
+ {
+ text = which < length_of_actuals ? actuals[which] : NULL;
+ if (!text)
+ text = "";
+ len = strlen (text);
+ text = xstrdup (text); /* so we can free it */
+ }
+ else
+ { /* not a parameter, so it's an error. */
+ warning (_("\\ in macro expansion followed by `%s' instead of parameter name"),
+ param);
+ len++;
+ text = xmalloc (1 + len);
+ sprintf (text, "\\%s", param);
+ }
+ }
if (strlen (param) + 2 < len)
{
@@ -371,8 +380,7 @@ apply (named, actuals, body)
strcpy (new_body + new_body_index, text);
new_body_index += len;
- if (!named || !named[which])
- free (text);
+ free (text);
}
}
diff --git a/contrib/texinfo/makeinfo/makeinfo.h b/contrib/texinfo/makeinfo/makeinfo.h
index bc322e2..dd77fe6 100644
--- a/contrib/texinfo/makeinfo/makeinfo.h
+++ b/contrib/texinfo/makeinfo/makeinfo.h
@@ -1,8 +1,8 @@
/* makeinfo.h -- declarations for Makeinfo.
- $Id: makeinfo.h,v 1.3 2003/01/17 17:14:34 karl Exp $
+ $Id: makeinfo.h,v 1.10 2003/05/12 13:12:32 karl Exp $
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
- Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free
+ Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -88,15 +88,22 @@ DECLARE (int, non_top_node_seen, 0);
/* Nonzero indicates that indentation is temporarily turned off. */
DECLARE (int, no_indent, 1);
+/* The amount of indentation to apply at the start of each line. */
+DECLARE (int, current_indent, 0);
+
+/* Nonzero means that we suppress the indentation of the first paragraph
+ following any section heading. */
+DECLARE (int, do_first_par_indent, 0);
+
+/* Amount by which @example indentation increases/decreases. */
+DECLARE (int, default_indentation_increment, 5);
+
/* Nonzero indicates that filling a line also indents the new line. */
DECLARE (int, indented_fill, 0);
/* Nonzero means forcing output text to be flushright. */
DECLARE (int, force_flush_right, 0);
-/* The amount of indentation to apply at the start of each line. */
-DECLARE (int, current_indent, 0);
-
/* The column at which long lines are broken. */
DECLARE (int, fill_column, 72);
@@ -104,9 +111,6 @@ DECLARE (int, fill_column, 72);
gets changed for cm_w (). */
DECLARE (int, non_splitting_words, 0);
-/* Amount by which @example indentation increases/decreases. */
-DECLARE (int, default_indentation_increment, 5);
-
/* Nonzero means that we are currently hacking the insides of an
insertion which would use a fixed width font. */
DECLARE (int, in_fixed_width_font, 0);
@@ -114,16 +118,17 @@ DECLARE (int, in_fixed_width_font, 0);
/* Nonzero if we are currently processing a multitable command */
DECLARE (int, multitable_active, 0);
-/* Nonzero means that we're generating HTML. */
+/* Nonzero means that we're generating HTML. (--html) */
DECLARE (int, html, 0);
-/* Nonzero means that we're generating XML. */
+/* Nonzero means that we're generating XML. (--xml) */
DECLARE (int, xml, 0);
-/* Nonzero means that we're generating DocBook. */
+/* Nonzero means that we're generating DocBook. (--docbook) */
DECLARE (int, docbook, 0);
-/* Nonzero means true 8-bit output for Info and plain text. */
+/* Nonzero means true 8-bit output for Info and plain text.
+ (--enable-encoding) */
DECLARE (int, enable_encoding, 0);
/* Nonzero means escape characters in HTML output. */
@@ -153,7 +158,7 @@ DECLARE (char *, command, NULL);
DECLARE (char *, copying_text, NULL);
/* @documentdescription ... @end documentdescription. */
-DECLARE (char *, document_description, NULL);
+DECLARE (const char *, document_description, NULL);
/* Nonzero if the last character inserted has the syntax class of NEWLINE. */
DECLARE (int, last_char_was_newline, 1);
@@ -174,6 +179,9 @@ DECLARE (char *, include_files_path, NULL);
/* The filename of the current input file. This is never freed. */
DECLARE (char *, node_filename, NULL);
+/* Name of CSS file to include, if any. (--css-include). */
+DECLARE (char *, css_include, NULL);
+
/* Nonzero means do not output "Node: Foo" for node separations, that
is, generate plain text. (--no-headers) */
DECLARE (int, no_headers, 0);
@@ -208,7 +216,8 @@ DECLARE (int, validating, 1);
/* Nonzero means print information about what is going on. (--verbose) */
DECLARE (int, verbose_mode, 0);
-/* Nonzero means prefix each @chapter, ... with a number like 1. (--number-sections) */
+/* Nonzero means prefix each @chapter, ... with a number like
+ 1, 1.1, etc. (--number-sections) */
DECLARE (int, number_sections, 0);
/* Nonzero means split size. When zero, DEFAULT_SPLIT_SIZE is used. */
@@ -260,9 +269,10 @@ DECLARE (int, expensive_validation, 0);
#define END_VERBATIM "end verbatim"
-/* Stuff for splitting large files. */
-#define SPLIT_SIZE_THRESHOLD 70000 /* What's good enough for Stallman... */
-#define DEFAULT_SPLIT_SIZE 50000 /* Is probably good enough for me. */
+/* Stuff for splitting large files. The numbers for Emacs
+ texinfo-format-buffer are much smaller, but memory capacities have
+ increased so much, 50k info files seem a bit tiny these days. */
+#define DEFAULT_SPLIT_SIZE 300000
DECLARE (int, splitting, 1); /* Defaults to true for now. */
#define skip_whitespace() \
@@ -286,4 +296,7 @@ DECLARE (int, splitting, 1); /* Defaults to true for now. */
#define looking_at(string) \
(strncmp (input_text + input_text_offset, string, strlen (string)) == 0)
+/* Possibly return Local Variables trailer for Info output. */
+extern char *info_trailer ();
+
#endif /* not MAKEINFO_H */
diff --git a/contrib/texinfo/makeinfo/node.c b/contrib/texinfo/makeinfo/node.c
index 10f4c3a..2215d4c 100644
--- a/contrib/texinfo/makeinfo/node.c
+++ b/contrib/texinfo/makeinfo/node.c
@@ -1,8 +1,8 @@
/* node.c -- nodes for Texinfo.
- $Id: node.c,v 1.6 2003/01/18 17:16:17 karl Exp $
+ $Id: node.c,v 1.12 2003/05/01 00:30:07 karl Exp $
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -595,7 +595,7 @@ cm_node ()
filling_enabled = indented_fill = 0;
if (!html || (html && splitting))
current_footnote_number = 1;
-
+
if (verbose_mode)
printf (_("Formatting node %s...\n"), node);
@@ -609,7 +609,7 @@ cm_node ()
xml_begin_node ();
if (!docbook)
{
- xml_insert_element (NODENAME, START);
+ xml_insert_element (NODENAME, START);
if (macro_expansion_output_stream && !executing_string)
me_execute_string (node);
else
@@ -924,7 +924,7 @@ cm_node ()
add_word ("<div class=\"node\">\n");
/* The <p> avoids the links area running on with old Lynxen. */
add_word_args ("<p>%s\n", splitting ? "" : "<hr>");
- add_word_args ("%s<a name=\"", _("Node:"));
+ add_word_args ("%s%s<a name=\"", _("Node:"), "&nbsp;");
tem = expand_node_name (node);
add_anchor_name (tem, 0);
add_word_args ("\">%s</a>", tem);
@@ -935,6 +935,7 @@ cm_node ()
tem = expansion (next, 0);
add_word (",\n");
add_word (_("Next:"));
+ add_word ("&nbsp;");
add_word ("<a rel=\"next\" accesskey=\"n\" href=\"");
add_anchor_name (tem, 1);
add_word_args ("\">%s</a>", tem);
@@ -945,6 +946,7 @@ cm_node ()
tem = expansion (prev, 0);
add_word (",\n");
add_word (_("Previous:"));
+ add_word ("&nbsp;");
add_word ("<a rel=\"previous\" accesskey=\"p\" href=\"");
add_anchor_name (tem, 1);
add_word_args ("\">%s</a>", tem);
@@ -955,6 +957,7 @@ cm_node ()
tem = expansion (up, 0);
add_word (",\n");
add_word (_("Up:"));
+ add_word ("&nbsp;");
add_word ("<a rel=\"up\" accesskey=\"u\" href=\"");
add_anchor_name (tem, 1);
add_word_args ("\">%s</a>", tem);
@@ -979,7 +982,7 @@ cm_node ()
if (prev)
{
xml_insert_element (NODEPREV, START);
- execute_string ("%s", prev);
+ execute_string ("%s", prev);
xml_insert_element (NODEPREV, END);
}
if (up)
@@ -1042,6 +1045,9 @@ cm_anchor (arg)
/* Parse the anchor text. */
anchor = get_xref_token (1);
+ /* Force all versions of "top" to be "Top". */
+ normalize_node_name (anchor);
+
/* In HTML mode, need to actually produce some output. */
if (html)
{
@@ -1292,7 +1298,7 @@ validate (tag, line, label)
/* The strings here are followed in the message by `reference to...' in
the `validate' routine. They are only used in messages, thus are
translated. */
-static char *
+static const char *
reftype_type_string (type)
enum reftype type;
{
@@ -1598,7 +1604,7 @@ last_node_p (tags)
break;
}
}
-
+
return last;
}
@@ -1628,8 +1634,8 @@ split_file (filename, size)
if (size == 0)
size = DEFAULT_SPLIT_SIZE;
- if ((stat (filename, &fileinfo) != 0) ||
- (((long) fileinfo.st_size) < SPLIT_SIZE_THRESHOLD))
+ if ((stat (filename, &fileinfo) != 0)
+ || (((long) fileinfo.st_size) < size))
return;
file_size = (long) fileinfo.st_size;
@@ -1656,6 +1662,10 @@ split_file (filename, size)
TAG_ENTRY *tags = tag_table;
char *indirect_info = NULL;
+ /* Maybe we want a Local Variables section. */
+ char *trailer = info_trailer ();
+ int trailer_len = trailer ? strlen (trailer) : 0;
+
/* Remember the `header' of this file. The first tag in the file is
the bottom of the header; the top of the file is the start. */
the_header = xmalloc (1 + (header_size = tags->position));
@@ -1777,7 +1787,9 @@ split_file (filename, size)
|| write (fd, the_header, header_size) != header_size
|| write (fd, the_file + file_top, file_bot - file_top)
!= (file_bot - file_top)
- || (close (fd)) < 0)
+ || (trailer_len
+ && write (fd, trailer, trailer_len) != trailer_len)
+ || close (fd) < 0)
{
perror (split_filename);
if (fd != -1)
@@ -1822,7 +1834,16 @@ split_file (filename, size)
/* Inhibit newlines. */
paragraph_is_open = 0;
+ /* Write the indirect tag table. */
write_tag_table_indirect ();
+
+ /* preserve local variables in info output. */
+ if (trailer)
+ {
+ insert_string (trailer);
+ free (trailer);
+ }
+
fclose (output_stream);
free (the_header);
free (the_file);
diff --git a/contrib/texinfo/makeinfo/sectioning.c b/contrib/texinfo/makeinfo/sectioning.c
index 761dd39..cd04dfa 100644
--- a/contrib/texinfo/makeinfo/sectioning.c
+++ b/contrib/texinfo/makeinfo/sectioning.c
@@ -1,7 +1,7 @@
/* sectioning.c -- for @chapter, @section, ..., @contents ...
- $Id: sectioning.c,v 1.6 2002/11/08 02:21:07 karl Exp $
+ $Id: sectioning.c,v 1.10 2003/05/13 16:37:54 karl Exp $
- Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ section_alist_type section_alist[] = {
{ "heading", 3, ENUM_SECT_NO, TOC_NO },
{ "chapheading", 2, ENUM_SECT_NO, TOC_NO },
{ "majorheading", 2, ENUM_SECT_NO, TOC_NO },
-
+
{ "top", 1, ENUM_SECT_NO, TOC_YES },
{ NULL, 0, 0, 0 }
};
@@ -151,7 +151,7 @@ search_sectioning (text)
/* ignore the optional command prefix */
if (text[0] == COMMAND_PREFIX)
text++;
-
+
for (i = 0; (t = section_alist[i].name); i++)
{
if (strcmp (t, text) == 0)
@@ -161,7 +161,7 @@ search_sectioning (text)
}
return -1;
}
-
+
/* Return an integer which identifies the type section present in TEXT. */
int
what_section (text)
@@ -215,6 +215,11 @@ void
sectioning_underscore (cmd)
char *cmd;
{
+ /* If we're not indenting the first paragraph, we shall make it behave
+ like @noindent is called directly after the section heading. */
+ if (! do_first_par_indent)
+ cm_noindent ();
+
if (xml)
{
char *temp;
@@ -231,7 +236,7 @@ sectioning_underscore (cmd)
the section and put an Index instead */
flush_output ();
xml_last_section_output_position = output_paragraph_offset;
-
+
xml_insert_element (xml_element (cmd), START);
xml_insert_element (TITLE, START);
xml_open_section (level, cmd);
@@ -239,8 +244,8 @@ sectioning_underscore (cmd)
execute_string ("%s\n", temp);
free (temp);
xml_insert_element (TITLE, END);
- }
- else
+ }
+ else
{
char character;
char *temp;
@@ -300,7 +305,7 @@ handle_enum_increment (level, index)
enum_marker = APPENDIX_MAGIC;
numbers [0] = 0; /* this means we start with Appendix A */
}
-
+
/* only increment counters if we are not in unnumbered
area. This handles situations like this:
@unnumbered .... This sets enum_marker to UNNUMBERED_MAGIC
@@ -312,7 +317,7 @@ handle_enum_increment (level, index)
/* reset all counters which are one level deeper */
for (i = level; i < 3; i++)
numbers [i + 1] = 0;
-
+
numbers[level]++;
return xstrdup
(get_sectioning_number (level, section_alist[index].num));
@@ -397,6 +402,7 @@ insert_and_underscore (level, with_char, cmd)
/* Insert the text following input_text_offset up to the end of the
line as an HTML heading element of the appropriate `level' and
tagged as an anchor for the current node.. */
+
void
sectioning_html (level, cmd)
int level;
@@ -413,8 +419,10 @@ sectioning_html (level, cmd)
old_no_indent = no_indent;
no_indent = 1;
- /* level 0 (chapter) is <h2> */
- add_word_args ("<h%d class=\"%s\">", level + 2, cmd);
+ /* level 0 (chapter) is <h2>, everything else is <h3>. We don't want
+ to go lower than that because browsers then start rendering the
+ headings smaller than the text. */
+ add_word_args ("<h%d class=\"%s\">", MIN (3, level + 2), cmd);
/* If we are outside of any node, produce an anchor that
the TOC could refer to. */
@@ -429,7 +437,7 @@ sectioning_html (level, cmd)
/* This must be added after toc_anchor is extracted, since
toc_anchor cannot include the closing </a>. For details,
see toc.c:toc_add_entry and toc.c:contents_update_html.
-
+
Also, the anchor close must be output before the section name
in case the name itself contains an anchor. */
add_word ("</a>");
@@ -535,7 +543,6 @@ cm_top ()
}
else
{
- TAG_ENTRY *top_node = find_node ("Top");
top_node_seen = 1;
/* It is an error to use @top before using @node. */
diff --git a/contrib/texinfo/makeinfo/xml.c b/contrib/texinfo/makeinfo/xml.c
index 16316e0..83c8b56 100644
--- a/contrib/texinfo/makeinfo/xml.c
+++ b/contrib/texinfo/makeinfo/xml.c
@@ -1,7 +1,7 @@
/* xml.c -- xml output.
- $Id: xml.c,v 1.18 2002/12/17 16:34:22 karl Exp $
+ $Id: xml.c,v 1.19 2003/05/13 16:37:54 karl Exp $
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -316,7 +316,7 @@ element docbook_element_list [] = {
{ "comment", 0, 0 },
{ "function", 0, 1 },
{ "legalnotice", 1, 0 },
-
+
{ "para", 0, 0 } /* Must be last */
/* name / contains para / contained in para */
};
@@ -600,7 +600,7 @@ xml_insert_element_with_attribute (elt, arg, format, va_alist)
if (docbook && !only_macro_expansion && (in_menu || in_detailmenu))
return;
-
+
if (!xml_element_list[elt].name || !strlen (xml_element_list[elt].name))
{
/*printf ("Warning: Inserting empty element %d\n", elt);*/
@@ -634,7 +634,7 @@ xml_insert_element_with_attribute (elt, arg, format, va_alist)
if (arg == START && !xml_in_para && !xml_element_list[elt].contained_in_para)
xml_indent ();
- if (docbook && xml_table_level && !xml_in_item[xml_table_level] && !in_table_title
+ if (docbook && xml_table_level && !xml_in_item[xml_table_level] && !in_table_title
&& arg == START && elt != TABLEITEM && elt != TABLETERM
&& !in_indexterm && xml_current_element() == TABLE)
{
@@ -879,8 +879,8 @@ xml_add_char (character)
return;
if (docbook && !only_macro_expansion && (in_menu || in_detailmenu))
return;
-
- if (docbook && xml_table_level && !xml_in_item[xml_table_level] && !in_table_title
+
+ if (docbook && xml_table_level && !xml_in_item[xml_table_level] && !in_table_title
&& !cr_or_whitespace (character) && !in_indexterm)
{
in_table_title = 1;
@@ -1229,6 +1229,7 @@ xml_asterisk ()
to have real multilivel indexing support, not just string analysis. */
#define INDEX_SEP "@this string will never appear@" /* was , */
+void
xml_insert_indexterm (indexterm, index)
char *indexterm;
char *index;
diff --git a/contrib/texinfo/util/texindex.c b/contrib/texinfo/util/texindex.c
index c7dc64b..f63fdb5 100644
--- a/contrib/texinfo/util/texindex.c
+++ b/contrib/texinfo/util/texindex.c
@@ -1,5 +1,5 @@
/* texindex -- sort TeX index dribble output into an actual index.
- $Id: texindex.c,v 1.7 2003/01/19 18:47:15 karl Exp $
+ $Id: texindex.c,v 1.9 2003/05/19 13:10:59 karl Exp $
Copyright (C) 1987, 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003 Free Software Foundation, Inc.
@@ -166,7 +166,7 @@ main (argc, argv)
/* In case we write to a redirected stdout that fails. */
/* not ready atexit (close_stdout); */
-
+
/* Describe the kind of sorting to do. */
/* The first keyfield uses the first braced field and folds case. */
keyfields[0].braced = 1;
@@ -218,9 +218,7 @@ main (argc, argv)
outfile = outfiles[i];
if (!outfile)
- {
- outfile = concat (infiles[i], "s", "");
- }
+ outfile = concat (infiles[i], "s");
need_initials = 0;
first_initial = '\0';
@@ -234,7 +232,6 @@ main (argc, argv)
flush_tempfiles (tempcount);
xexit (0);
-
return 0; /* Avoid bogus warnings. */
}
@@ -322,7 +319,7 @@ decode_command (argc, argv)
if (tempdir == NULL)
tempdir = DEFAULT_TMPDIR;
else
- tempdir = concat (tempdir, "/", "");
+ tempdir = concat (tempdir, "/");
keep_tempfiles = 0;
@@ -401,18 +398,15 @@ maketempname (count)
if (!tempbase)
{
int fd;
- char *tmpdir = getenv ("TEMPDIR");
- if (!tmpdir)
- tmpdir = "/tmp";
- tempbase = concat (tmpdir, "/txidxXXXXXX");
+ tempbase = concat (tempdir, "txidxXXXXXX");
fd = mkstemp (tempbase);
- if (fd == -1)
+ if (fd == -1)
pfatal_with_name (tempbase);
}
sprintf (tempsuffix, ".%d", count);
- return concat (tempdir, tempbase, tempsuffix);
+ return concat (tempbase, tempsuffix);
}
@@ -1140,7 +1134,7 @@ parsefile (filename, nextline, data, size)
}
else
first_initial = toupper (*p);
-
+
while (*p && *p != '\n')
p++;
if (p != end)
@@ -1653,39 +1647,31 @@ void
perror_with_name (name)
char *name;
{
- char *s;
-
- s = strerror (errno);
- printf ("%s: ", program_name);
- printf ("%s; for file `%s'.\n", s, name);
+ fprintf (stderr, "%s: ", program_name);
+ perror (name);
}
void
pfatal_with_name (name)
char *name;
{
- char *s;
-
- s = strerror (errno);
- printf ("%s: ", program_name);
- printf (_("%s; for file `%s'.\n"), s, name);
+ perror_with_name (name);
xexit (1);
}
-/* Return a newly-allocated string whose contents concatenate those of
- S1, S2, S3. */
+
+/* Return a newly-allocated string concatenating S1 and S2. */
char *
-concat (s1, s2, s3)
- char *s1, *s2, *s3;
+concat (s1, s2)
+ char *s1, *s2;
{
- int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
- char *result = (char *) xmalloc (len1 + len2 + len3 + 1);
+ int len1 = strlen (s1), len2 = strlen (s2);
+ char *result = (char *) xmalloc (len1 + len2 + 1);
strcpy (result, s1);
strcpy (result + len1, s2);
- strcpy (result + len1 + len2, s3);
- *(result + len1 + len2 + len3) = 0;
+ *(result + len1 + len2) = 0;
return result;
}
OpenPOWER on IntegriCloud