summaryrefslogtreecommitdiffstats
path: root/contrib/texinfo/makeinfo
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/texinfo/makeinfo')
-rw-r--r--contrib/texinfo/makeinfo/cmds.c25
-rw-r--r--contrib/texinfo/makeinfo/defun.c18
-rw-r--r--contrib/texinfo/makeinfo/html.c16
-rw-r--r--contrib/texinfo/makeinfo/html.h4
-rw-r--r--contrib/texinfo/makeinfo/index.c11
-rw-r--r--contrib/texinfo/makeinfo/insertion.c164
-rw-r--r--contrib/texinfo/makeinfo/insertion.h26
-rw-r--r--contrib/texinfo/makeinfo/makeinfo.c206
-rw-r--r--contrib/texinfo/makeinfo/makeinfo.h25
-rw-r--r--contrib/texinfo/makeinfo/node.c13
-rw-r--r--contrib/texinfo/makeinfo/texinfo.dtd20
-rw-r--r--contrib/texinfo/makeinfo/texinfo.xsl20
-rw-r--r--contrib/texinfo/makeinfo/toc.c14
-rw-r--r--contrib/texinfo/makeinfo/xml.c4
-rw-r--r--contrib/texinfo/makeinfo/xml.h19
15 files changed, 398 insertions, 187 deletions
diff --git a/contrib/texinfo/makeinfo/cmds.c b/contrib/texinfo/makeinfo/cmds.c
index 968bc8f..7de972b 100644
--- a/contrib/texinfo/makeinfo/cmds.c
+++ b/contrib/texinfo/makeinfo/cmds.c
@@ -1,7 +1,7 @@
/* cmds.c -- Texinfo commands.
- $Id: cmds.c,v 1.69 2002/02/09 00:54:51 karl Exp $
+ $Id: cmds.c,v 1.79 2002/03/28 16:35:29 karl Exp $
- Copyright (C) 1998, 99, 2000, 01 Free Software Foundation, Inc.
+ Copyright (C) 1998, 99, 2000, 01, 02 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
@@ -47,7 +47,8 @@ void
cm_image (), cm_kbd (), cm_key (), cm_no_op (),
cm_novalidate (), cm_not_fixed_width (), cm_r (),
cm_strong (), cm_var (), cm_sc (), cm_w (), cm_email (), cm_url (),
- cm_verb (), cm_documentdescription ();
+ cm_verb (), cm_copying (), cm_insert_copying (),
+ cm_documentdescription ();
void
cm_anchor (), cm_node (), cm_menu (), cm_xref (), cm_ftable (),
@@ -64,7 +65,7 @@ void
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_tt (),
- cm_verbatim (), cm_verbatiminclude (), cm_titlepage ();
+ cm_verbatim (), cm_verbatiminclude ();
/* Conditionals. */
void cm_set (), cm_clear (), cm_ifset (), cm_ifclear ();
@@ -95,6 +96,7 @@ COMMAND command_table[] = {
{ "=", cm_accent, MAYBE_BRACE_ARGS },
{ "?", insert_self, NO_BRACE_ARGS },
{ "@", insert_self, NO_BRACE_ARGS },
+ { "\\", insert_self, NO_BRACE_ARGS },
{ "^", cm_accent_hat, MAYBE_BRACE_ARGS },
{ "`", cm_accent_grave, MAYBE_BRACE_ARGS },
{ "{", insert_self, NO_BRACE_ARGS },
@@ -139,6 +141,7 @@ COMMAND command_table[] = {
{ "command", cm_code, BRACE_ARGS },
{ "comment", cm_ignore_line, NO_BRACE_ARGS },
{ "contents", cm_contents, NO_BRACE_ARGS },
+ { "copying", cm_copying, NO_BRACE_ARGS },
{ "copyright", cm_copyright, BRACE_ARGS },
{ "ctrl", cm_obsolete, BRACE_ARGS },
{ "defcodeindex", cm_defcodeindex, NO_BRACE_ARGS },
@@ -202,6 +205,10 @@ COMMAND command_table[] = {
{ "env", cm_code, BRACE_ARGS },
{ "equiv", cm_equiv, BRACE_ARGS },
{ "error", cm_error, BRACE_ARGS },
+ { "evenfooting", cm_ignore_line, NO_BRACE_ARGS },
+ { "evenheading", cm_ignore_line, NO_BRACE_ARGS },
+ { "everyfooting", cm_ignore_line, NO_BRACE_ARGS },
+ { "everyheading", cm_ignore_line, NO_BRACE_ARGS },
{ "example", cm_example, NO_BRACE_ARGS },
{ "exampleindent", cm_exampleindent, NO_BRACE_ARGS },
{ "exclamdown", cm_special_char, BRACE_ARGS },
@@ -228,13 +235,16 @@ COMMAND command_table[] = {
{ "ifinfo", cm_ifinfo, NO_BRACE_ARGS },
{ "ifnothtml", cm_ifnothtml, NO_BRACE_ARGS },
{ "ifnotinfo", cm_ifnotinfo, NO_BRACE_ARGS },
+ { "ifnotplaintext", cm_ifnotplaintext, NO_BRACE_ARGS },
{ "ifnottex", cm_ifnottex, NO_BRACE_ARGS },
+ { "ifplaintext", cm_ifplaintext, NO_BRACE_ARGS },
{ "ifset", cm_ifset, NO_BRACE_ARGS },
{ "iftex", cm_iftex, NO_BRACE_ARGS },
{ "ignore", command_name_condition, NO_BRACE_ARGS },
{ "image", cm_image, BRACE_ARGS },
{ "include", cm_include, NO_BRACE_ARGS },
{ "inforef", cm_inforef, BRACE_ARGS },
+ { "insertcopying", cm_insert_copying, NO_BRACE_ARGS },
{ "item", cm_item, NO_BRACE_ARGS },
{ "itemize", cm_itemize, NO_BRACE_ARGS },
{ "itemx", cm_itemx, NO_BRACE_ARGS },
@@ -257,6 +267,8 @@ COMMAND command_table[] = {
{ "noindent", cm_novalidate, NO_BRACE_ARGS },
{ "nwnode", cm_node, NO_BRACE_ARGS },
{ "o", cm_special_char, BRACE_ARGS },
+ { "oddfooting", cm_ignore_line, NO_BRACE_ARGS },
+ { "oddheading", cm_ignore_line, NO_BRACE_ARGS },
{ "oe", cm_special_char, BRACE_ARGS },
{ "option", cm_code, BRACE_ARGS },
{ "page", cm_no_op, NO_BRACE_ARGS },
@@ -962,7 +974,7 @@ cm_settitle ()
{
if (xml)
{
- xml_begin_document ();
+ xml_begin_document (current_output_filename);
xml_insert_element (SETTITLE, START);
get_rest_of_line (0, &title);
execute_string ("%s", title);
@@ -1016,7 +1028,8 @@ cm_sp ()
int save_filling_enabled = filling_enabled;
filling_enabled = 0;
- close_paragraph ();
+ /* close_paragraph generates an extra blank line. */
+ close_single_paragraph ();
if (lines && html && !executing_string)
html_output_head ();
diff --git a/contrib/texinfo/makeinfo/defun.c b/contrib/texinfo/makeinfo/defun.c
index b261a99..49dbd43 100644
--- a/contrib/texinfo/makeinfo/defun.c
+++ b/contrib/texinfo/makeinfo/defun.c
@@ -1,5 +1,5 @@
/* defun.c -- @defun and friends.
- $Id: defun.c,v 1.18 2002/01/22 18:01:24 karl Exp $
+ $Id: defun.c,v 1.19 2002/03/18 16:54:54 karl Exp $
Copyright (C) 1998, 99, 2000, 01, 02 Free Software Foundation, Inc.
@@ -66,6 +66,7 @@ scan_group_in_string (string_pointer)
{
char *scan_string = (*string_pointer) + 1;
unsigned int level = 1;
+ int started_command = 0;
for (;;)
{
@@ -80,17 +81,20 @@ scan_group_in_string (string_pointer)
{
/* Tweak line_number to compensate for fact that
we gobbled the whole line before coming here. */
- line_number -= 1;
+ line_number--;
line_error (_("Missing `}' in @def arg"));
- line_number += 1;
+ line_number++;
*string_pointer = scan_string - 1;
return 0;
}
- if (c == '{')
- level += 1;
- if (c == '}')
- level -= 1;
+ if (c == '{' && !started_command)
+ level++;
+ if (c == '}' && !started_command)
+ level--;
+
+ /* remember if at @. */
+ started_command = (c == '@' && !started_command);
}
}
diff --git a/contrib/texinfo/makeinfo/html.c b/contrib/texinfo/makeinfo/html.c
index b7a8d59..c03f4f7 100644
--- a/contrib/texinfo/makeinfo/html.c
+++ b/contrib/texinfo/makeinfo/html.c
@@ -1,5 +1,5 @@
/* html.c -- html-related utilities.
- $Id: html.c,v 1.19 2002/02/23 19:12:15 karl Exp $
+ $Id: html.c,v 1.26 2002/03/23 20:39:49 karl Exp $
Copyright (C) 1999, 2000, 01, 02 Free Software Foundation, Inc.
@@ -56,7 +56,19 @@ html_output_head ()
add_word_args ("<meta name=description content=\"%s\">\n",
document_description);
add_word_args ("<meta name=generator content=\"makeinfo %s\">\n", VERSION);
- add_word ("<link href=\"http://texinfo.org/\" rel=generator-home>\n");
+ add_word ("<link href=\"http://www.gnu.org/software/texinfo/\" rel=generator-home>\n");
+
+ if (copying_text)
+ { /* copying_text has already been fully expanded in
+ begin_insertion (by full_expansion), so use insert_ rather than
+ add_. It is not ideal that we include the html markup here within
+ <head>, but the alternative is to have yet more and different
+ expansions of the copying text. Yuck. */
+ insert_string ("<!--\n");
+ insert_string (copying_text);
+ insert_string ("-->\n");
+ }
+
add_word ("</head>\n<body>\n");
if (title && !html_title_written)
diff --git a/contrib/texinfo/makeinfo/html.h b/contrib/texinfo/makeinfo/html.h
index cd24ce2..735b531 100644
--- a/contrib/texinfo/makeinfo/html.h
+++ b/contrib/texinfo/makeinfo/html.h
@@ -1,7 +1,7 @@
/* html.h -- declarations for html-related utilities.
- $Id: html.h,v 1.2 2000/12/19 15:17:52 karl Exp $
+ $Id: html.h,v 1.4 2002/03/18 19:45:18 karl Exp $
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 02 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
diff --git a/contrib/texinfo/makeinfo/index.c b/contrib/texinfo/makeinfo/index.c
index edaf4e1..bed915d 100644
--- a/contrib/texinfo/makeinfo/index.c
+++ b/contrib/texinfo/makeinfo/index.c
@@ -1,5 +1,5 @@
/* index.c -- indexing for Texinfo.
- $Id: index.c,v 1.24 2002/01/22 14:28:07 karl Exp $
+ $Id: index.c,v 1.25 2002/03/19 14:43:04 karl Exp $
Copyright (C) 1998, 99, 2002 Free Software Foundation, Inc.
@@ -227,10 +227,17 @@ index_add_arg (name)
(see the findexerr test). */
new->defining_file = xstrdup (input_filename);
the_indices[which] = new;
- /* The index breaks if there are colons in the entry. */
+#if 0
+ /* The index breaks if there are colons in the entry.
+ -- This is true, but it's too painful to force changing index
+ entries to use `colon', and too confusing for users. The real
+ fix is to change Info support to support arbitrary characters
+ in node names, and we're not ready to do that. --karl,
+ 19mar02. */
if (strchr (new->entry_text, ':'))
warning (_("Info cannot handle `:' in index entry `%s'"),
new->entry_text);
+#endif
}
if (xml)
xml_insert_indexterm (index_entry, name);
diff --git a/contrib/texinfo/makeinfo/insertion.c b/contrib/texinfo/makeinfo/insertion.c
index c7087f2..30a0222 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.39 2002/03/02 15:05:21 karl Exp $
+ $Id: insertion.c,v 1.47 2002/04/01 14:01:36 karl Exp $
Copyright (C) 1998, 99, 2000, 01, 02 Free Software Foundation, Inc.
@@ -28,16 +28,17 @@
/* Must match list in insertion.h. */
static char *insertion_type_names[] =
{
- "cartouche", "defcv", "deffn", "defivar", "defmac", "defmethod",
- "defop", "defopt", "defspec", "deftp", "deftypefn", "deftypefun",
- "deftypeivar", "deftypemethod", "deftypeop", "deftypevar",
- "deftypevr", "defun", "defvar", "defvr", "detailmenu", "direntry",
- "display", "documentdescription", "enumerate", "example", "flushleft",
- "flushright", "format", "ftable", "group", "ifclear", "ifhtml",
- "ifinfo", "ifnothtml", "ifnotinfo", "ifnottex", "ifset", "iftex",
- "itemize", "lisp", "menu", "multitable", "quotation", "rawhtml",
- "rawtex", "smalldisplay", "smallexample", "smallformat", "smalllisp",
- "verbatim", "table", "tex", "vtable", "bad_type"
+ "cartouche", "copying", "defcv", "deffn", "defivar", "defmac",
+ "defmethod", "defop", "defopt", "defspec", "deftp", "deftypefn",
+ "deftypefun", "deftypeivar", "deftypemethod", "deftypeop",
+ "deftypevar", "deftypevr", "defun", "defvar", "defvr", "detailmenu",
+ "direntry", "display", "documentdescription", "enumerate", "example",
+ "flushleft", "flushright", "format", "ftable", "group", "ifclear",
+ "ifhtml", "ifinfo", "ifnothtml", "ifnotinfo", "ifnotplaintext", "ifnottex",
+ "ifplaintext", "ifset", "iftex", "itemize", "lisp", "menu",
+ "multitable", "quotation", "rawhtml", "rawtex", "smalldisplay",
+ "smallexample", "smallformat", "smalllisp", "verbatim", "table",
+ "tex", "vtable", "bad_type"
};
/* All nested environments. */
@@ -46,21 +47,23 @@ INSERTION_ELT *insertion_stack = NULL;
/* How deeply we're nested. */
int insertion_level = 0;
-/* Whether to examine menu lines. */
-int in_menu = 0;
+/* Set to 1 if we've processed (commentary) text in a @menu that
+ wasn't part of a menu item. */
+int had_menu_commentary;
/* How to examine menu lines. */
int in_detailmenu = 0;
-/* Set to 1 if we've processed (commentary) text in a @menu that
- wasn't part of a menu item. */
-int had_menu_commentary;
+/* Whether to examine menu lines. */
+int in_menu = 0;
/* Set to 1 if <p> is written in normal context.
Used for menu and itemize. */
int in_paragraph = 0;
static const char dl_tag[] = "<dl>\n";
+extern void cm_insert_copying ();
+
void
init_insertion_stack ()
@@ -95,7 +98,9 @@ current_item_function ()
case ifinfo:
case ifnothtml:
case ifnotinfo:
+ case ifnotplaintext:
case ifnottex:
+ case ifplaintext:
case ifset:
case iftex:
case rawhtml:
@@ -382,7 +387,8 @@ begin_insertion (type)
if (xml)
xml_insert_element (MENU, START);
-
+
+ next_menu_item_number = 1;
in_menu++;
in_fixed_width_font++;
no_discard++;
@@ -430,13 +436,44 @@ begin_insertion (type)
}
break;
+ case copying:
+ {
+ /* Save the copying text away for @insertcopying,
+ typically used on the back of the @titlepage (for TeX) and
+ the Top node (for info/html). */
+ char *text;
+ int start_of_end;
+
+ discard_until ("\n"); /* ignore remainder of @copying line */
+ start_of_end = get_until ("\n@end copying", &text);
+
+ /* include all the output-format-specific markup. */
+ copying_text = full_expansion (text, 0);
+ free (text);
+
+ input_text_offset = start_of_end; /* go back to the @end to match */
+ }
+
+ /* For info, output the copying text right away, so it will end up
+ in the header of the Info file, before the first node, and thus
+ get copied automatically to all the split files. For xml, also
+ output it right away since xml output is never split.
+ For html, we output it specifically in html_output_head.
+ For plain text, there's no way to hide it, so the author must
+ use @insertcopying in the desired location. */
+ if (!html && !no_headers)
+ cm_insert_copying ();
+ break;
+
case quotation:
/* @quotation does filling (@display doesn't). */
if (html)
add_word ("<blockquote>\n");
else
{
- close_single_paragraph ();
+ /* with close_single_paragraph, we get no blank line above
+ within @copying. */
+ close_paragraph ();
last_char_was_newline = no_indent = 0;
indented_fill = filling_enabled = 1;
inhibit_paragraph_indentation = 1;
@@ -567,7 +604,9 @@ begin_insertion (type)
case ifinfo:
case ifnothtml:
case ifnotinfo:
+ case ifnotplaintext:
case ifnottex:
+ case ifplaintext:
case ifset:
case iftex:
case rawtex:
@@ -665,6 +704,9 @@ end_insertion (type)
case ifinfo:
case documentdescription:
break;
+ case copying:
+ xml_insert_element (COPYING, END);
+ break;
case quotation:
xml_insert_element (QUOTATION, END);
break;
@@ -712,13 +754,16 @@ end_insertion (type)
switch (type)
{
/* Insertions which have no effect on paragraph formatting. */
+ case copying:
case documentdescription:
case ifclear:
case ifinfo:
case ifhtml:
case ifnothtml:
case ifnotinfo:
+ case ifnotplaintext:
case ifnottex:
+ case ifplaintext:
case ifset:
case iftex:
case rawtex:
@@ -728,11 +773,6 @@ end_insertion (type)
escape_html = 1;
break;
- case direntry: /* Eaten if html. */
- insert_string ("END-INFO-DIR-ENTRY\n\n");
- close_insertion_paragraph ();
- break;
-
case detailmenu:
in_detailmenu--; /* No longer hacking menus. */
if (!in_menu)
@@ -742,6 +782,11 @@ end_insertion (type)
}
break;
+ case direntry: /* Eaten if html. */
+ insert_string ("END-INFO-DIR-ENTRY\n\n");
+ close_insertion_paragraph ();
+ break;
+
case menu:
in_menu--; /* No longer hacking menus. */
if (html)
@@ -942,6 +987,26 @@ cm_cartouche ()
}
void
+cm_copying ()
+{
+ if (xml)
+ xml_insert_element (COPYING, START);
+ begin_insertion (copying);
+}
+
+/* Not an insertion, despite the name, but it goes with cm_copying. */
+void
+cm_insert_copying ()
+{
+ if (copying_text)
+ { /* insert_string rather than add_word because we've already done
+ full expansion on copying_text when we saved it. */
+ insert_string (copying_text);
+ insert ('\n');
+ }
+}
+
+void
cm_format ()
{
if (xml)
@@ -1136,49 +1201,68 @@ cm_group ()
begin_insertion (group);
}
+/* Insert raw HTML (no escaping of `<' etc.). */
void
-cm_ifinfo ()
+cm_html ()
{
- if (process_info)
- begin_insertion (ifinfo);
+ if (process_html)
+ begin_insertion (rawhtml);
else
command_name_condition ();
}
void
-cm_ifnotinfo ()
+cm_ifhtml ()
{
- if (!process_info)
- begin_insertion (ifnotinfo);
+ if (process_html)
+ begin_insertion (ifhtml);
+ else
+ command_name_condition ();
+}
+
+void
+cm_ifnothtml ()
+{
+ if (!process_html)
+ begin_insertion (ifnothtml);
else
command_name_condition ();
}
-/* Insert raw HTML (no escaping of `<' etc.). */
void
-cm_html ()
+cm_ifinfo ()
{
- if (process_html)
- begin_insertion (rawhtml);
+ if (process_info)
+ begin_insertion (ifinfo);
else
command_name_condition ();
}
void
-cm_ifhtml ()
+cm_ifnotinfo ()
{
- if (process_html)
- begin_insertion (ifhtml);
+ if (!process_info)
+ begin_insertion (ifnotinfo);
else
command_name_condition ();
}
+
void
-cm_ifnothtml ()
+cm_ifplaintext ()
{
- if (!process_html)
- begin_insertion (ifnothtml);
+ if (process_plaintext)
+ begin_insertion (ifplaintext);
+ else
+ command_name_condition ();
+}
+
+void
+cm_ifnotplaintext ()
+{
+ if (!process_plaintext)
+ begin_insertion (ifnotplaintext);
else
command_name_condition ();
}
@@ -1339,7 +1423,9 @@ cm_item ()
case ifinfo:
case ifnothtml:
case ifnotinfo:
+ case ifnotplaintext:
case ifnottex:
+ case ifplaintext:
case ifset:
case iftex:
case rawhtml:
diff --git a/contrib/texinfo/makeinfo/insertion.h b/contrib/texinfo/makeinfo/insertion.h
index 51540b2..3a8ccb9 100644
--- a/contrib/texinfo/makeinfo/insertion.h
+++ b/contrib/texinfo/makeinfo/insertion.h
@@ -1,7 +1,7 @@
/* insertion.h -- declarations for insertion.c.
- $Id: insertion.h,v 1.8 2001/06/30 00:29:41 karl Exp $
+ $Id: insertion.h,v 1.13 2002/03/28 16:33:48 karl Exp $
- Copyright (C) 1998, 99, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1998, 99, 2001, 02 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
@@ -23,14 +23,15 @@
/* Must match list in insertion.c. */
enum insertion_type
{
- cartouche, defcv, deffn, defivar, defmac, defmethod, defop, defopt,
- defspec, deftp, deftypefn, deftypefun, deftypeivar, deftypemethod,
- deftypeop, deftypevar, deftypevr, defun, defvar, defvr, detailmenu,
- direntry, display, documentdescription, enumerate, example, flushleft,
- flushright, format, ftable, group, ifclear, ifhtml, ifinfo, ifnothtml,
- ifnotinfo, ifnottex, ifset, iftex, itemize, lisp, menu, multitable,
- quotation, rawhtml, rawtex, smalldisplay, smallexample, smallformat,
- smalllisp, verbatim, table, tex, vtable, bad_type
+ cartouche, copying, defcv, deffn, defivar, defmac, defmethod, defop,
+ defopt, defspec, deftp, deftypefn, deftypefun, deftypeivar,
+ deftypemethod, deftypeop, deftypevar, deftypevr, defun, defvar, defvr,
+ detailmenu, direntry, display, documentdescription, enumerate,
+ example, flushleft, flushright, format, ftable, group, ifclear,
+ ifhtml, ifinfo, ifnothtml, ifnotinfo, ifnotplaintext, ifnottex,
+ ifplaintext, ifset, iftex, itemize, lisp, menu, multitable, quotation,
+ rawhtml, rawtex, smalldisplay, smallexample, smallformat, smalllisp,
+ verbatim, table, tex, vtable, bad_type
};
typedef struct istack_elt
@@ -55,7 +56,8 @@ extern int had_menu_commentary;
extern int in_paragraph;
extern void command_name_condition ();
-extern void cm_ifnothtml (), cm_ifhtml(), cm_html ();
+extern void cm_ifhtml (), cm_ifnothtml(), cm_html ();
extern void cm_ifinfo (), cm_ifnotinfo ();
-extern void cm_ifnottex (), cm_iftex (), cm_tex ();
+extern void cm_ifplaintext (), cm_ifnotplaintext();
+extern void cm_iftex (), cm_ifnottex (), cm_tex ();
#endif /* !INSERTION_H */
diff --git a/contrib/texinfo/makeinfo/makeinfo.c b/contrib/texinfo/makeinfo/makeinfo.c
index d910094..47cc903 100644
--- a/contrib/texinfo/makeinfo/makeinfo.c
+++ b/contrib/texinfo/makeinfo/makeinfo.c
@@ -1,5 +1,5 @@
/* makeinfo -- convert Texinfo source into other formats.
- $Id: makeinfo.c,v 1.195 2002/02/11 17:12:49 karl Exp $
+ $Id: makeinfo.c,v 1.205 2002/03/28 16:33:48 karl Exp $
Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 01, 02
Free Software Foundation, Inc.
@@ -66,6 +66,7 @@ char *output_filename = NULL;
/* Name of the output file that the user elected to pass on the command line.
Such a name overrides any name found with the @setfilename command. */
char *command_output_filename = NULL;
+static char *save_command_output_filename = NULL;
/* Flags which control initial output string for xrefs. */
int px_ref_flag = 0;
@@ -371,12 +372,11 @@ usage (exit_value)
{
printf (_("Usage: %s [OPTION]... TEXINFO-FILE...\n"), progname);
printf ("\n");
- /* xgettext: no-wrap */
+
puts (_("\
Translate Texinfo source documentation to various other formats, by default\n\
Info files suitable for reading online with Emacs or standalone GNU Info.\n"));
- /* xgettext: no-wrap */
printf (_("\
General options:\n\
--error-limit=NUM quit after NUM errors (default %d).\n\
@@ -395,9 +395,6 @@ General options:\n\
Output format selection (default is to produce Info):\n\
--docbook output DocBook rather than Info.\n\
--html output HTML rather than Info.\n\
- --no-headers output plain text, suppressing Info node\n\
- separators and Node: lines; also, write to\n\
- standard output without --output.\n\
--xml output XML (TexinfoML) rather than Info.\n\
"));
@@ -405,13 +402,16 @@ Output format selection (default is to produce Info):\n\
General output options:\n\
-E, --macro-expand FILE output macro-expanded source to FILE.\n\
ignoring any @setfilename.\n\
+ --no-headers suppress node separators, Node: lines, and menus\n\
+ from Info output (thus producing plain text)\n\
+ or from HTML (thus producing shorter output);\n\
+ also, write to standard output by default.\n\
--no-split suppress splitting of Info or HTML output,\n\
generate only one output file.\n\
--number-sections output chapter and sectioning numbers.\n\
-o, --output=FILE output to FILE (directory if split HTML),\n\
"));
- /* xgettext: no-wrap */
printf (_("\
Options for Info and plain text:\n\
--enable-encoding output accented and special characters in\n\
@@ -430,7 +430,6 @@ Options for Info and plain text:\n\
}
printf ("\n");
- /* xgettext: no-wrap */
puts (_("\
Input file options:\n\
--commands-in-node-names allow @ commands in node names.\n\
@@ -439,38 +438,44 @@ Input file options:\n\
-P DIR prepend DIR to the @include search path.\n\
-U VAR undefine the variable VAR, as with @clear.\n\
"));
- /* xgettext: no-wrap */
+
puts (_("\
Conditional processing in input:\n\
- --ifhtml process @ifhtml and @html even if not generating HTML.\n\
- --ifinfo process @ifinfo text even when generating HTML.\n\
- --iftex process @iftex and @tex text; implies --no-split.\n\
- --no-ifhtml do not process @ifhtml and @html text.\n\
- --no-ifinfo do not process @ifinfo text.\n\
- --no-iftex do not process @iftex and @tex text.\n\
+ --ifhtml process @ifhtml and @html even if not generating HTML.\n\
+ --ifinfo process @ifinfo even if not generating Info.\n\
+ --ifplaintext process @ifplaintext even if not generating plain text.\n\
+ --iftex process @iftex and @tex; implies --no-split.\n\
+ --no-ifhtml do not process @ifhtml and @html text.\n\
+ --no-ifinfo do not process @ifinfo text.\n\
+ --no-ifplaintext do not process @ifplaintext text.\n\
+ --no-iftex do not process @iftex and @tex text.\n\
"));
- /* xgettext: no-wrap */
puts (_("\
The defaults for the @if... conditionals depend on the output format:\n\
if generating HTML, --ifhtml is on and the others are off;\n\
- if generating Info or plain text, --ifinfo is on and the others are off.\n\
+ if generating Info, --ifinfo is on and the others are off;\n\
+ if generating plain text, --ifplaintext is on and the others are off;\n\
"));
- /* xgettext: no-wrap */
- puts (_("\
+ fputs (_("\
Examples:\n\
makeinfo foo.texi write Info to foo's @setfilename\n\
- makeinfo --html foo.texi write HTML to foo's @setfilename\n\
- makeinfo --no-headers -o - foo.texi write plain text to standard output\n\
+ makeinfo --html foo.texi write HTML to @setfilename\n\
+ makeinfo --xml foo.texi write XML to @setfilename\n\
+ makeinfo --docbook foo.texi write DocBook XML to @setfilename\n\
+ makeinfo --no-headers foo.texi write plain text to standard output\n\
+\n\
+ makeinfo --html --no-headers foo.texi write html without node lines, menus\n\
makeinfo --number-sections foo.texi write Info with numbered sections\n\
makeinfo --no-split foo.texi write one Info file however big\n\
-"));
+"), stdout);
- /* xgettext: no-wrap */
- puts (_("\
+ puts (_("\n\
Email bug reports to bug-texinfo@gnu.org,\n\
-general questions and discussion to help-texinfo@gnu.org."));
+general questions and discussion to help-texinfo@gnu.org.\n\
+Texinfo home page: http://www.gnu.org/software/texinfo/"));
+
xexit (exit_value);
}
@@ -487,11 +492,13 @@ struct option long_options[] =
{ "html", 0, 0, 'w' },
{ "ifhtml", 0, &process_html, 1 },
{ "ifinfo", 0, &process_info, 1 },
+ { "ifplaintext", 0, &process_plaintext, 1 },
{ "iftex", 0, &process_tex, 1 },
{ "macro-expand", 1, 0, 'E' },
{ "no-headers", 0, &no_headers, 1 },
{ "no-ifhtml", 0, &process_html, 0 },
{ "no-ifinfo", 0, &process_info, 0 },
+ { "no-ifplaintext", 0, &process_plaintext, 0 },
{ "no-iftex", 0, &process_tex, 0 },
{ "no-number-footnotes", 0, &number_footnotes, 0 },
{ "no-number-sections", 0, &number_sections, 0 },
@@ -607,6 +614,7 @@ main (argc, argv)
case 'o': /* --output */
command_output_filename = xstrdup (optarg);
+ save_command_output_filename = command_output_filename;
break;
case 'p': /* --paragraph-indent */
@@ -689,7 +697,6 @@ For more information about these matters, see the files named COPYING.\n"),
case 'w': /* --html */
html = 1;
process_html = 1;
- process_info = 0;
break;
case 'x': /* --xml */
@@ -735,7 +742,19 @@ For more information about these matters, see the files named COPYING.\n"),
if (!command_output_filename)
command_output_filename = xstrdup ("-");
}
+
+ if (process_info == -1)
+ { /* no explicit --[no-]ifinfo option, so we'll do @ifinfo
+ if we're generating info or (for compatibility) plain text. */
+ process_info = !html && !xml;
+ }
+ if (process_plaintext == -1)
+ { /* no explicit --[no-]ifplaintext option, so we'll do @ifplaintext
+ if we're generating plain text. */
+ process_plaintext = no_headers && !html && !xml;
+ }
+
if (verbose_mode)
print_version_info ();
@@ -1274,14 +1293,15 @@ convert_from_file (name)
}
/* Given OUTPUT_FILENAME == ``/foo/bar/baz.html'', return
- ``/foo/bar/baz/baz.html''.
+ "/foo/bar/baz/baz.html". This routine is called only if html && splitting.
Split html output goes into the subdirectory of the toplevel
filename, without extension. For example:
-
@setfilename foo.info
-
- produces output in files foo/index.html, foo/second-node.html, .... */
+ produces output in files foo/index.html, foo/second-node.html, ...
+
+ But if the user said -o foo.whatever on the cmd line, then use
+ foo.whatever unchanged. */
static char *
insert_toplevel_subdirectory (output_filename)
@@ -1289,7 +1309,7 @@ insert_toplevel_subdirectory (output_filename)
{
char *dir, *subdir, *base, *basename, *p;
char buf[PATH_MAX];
- int max_name_len;
+ struct stat st;
static const char index_name[] = "index.html";
const int index_len = sizeof (index_name) - 1;
@@ -1303,36 +1323,48 @@ insert_toplevel_subdirectory (output_filename)
p = strrchr (base, '.');
if (p)
*p = 0;
-
+
/* Split html output goes into subdirectory of toplevel name. */
subdir = "";
if (FILENAME_CMP (base, filename_part (dir)) != 0)
- subdir = base;
-
- max_name_len = strlen (basename);
- if (index_len > max_name_len)
- max_name_len = index_len;
+ {
+ if (save_command_output_filename
+ && STREQ (output_filename, save_command_output_filename))
+ subdir = basename; /* from user, use unchanged */
+ else
+ subdir = base; /* implicit, omit suffix */
+ }
free (output_filename);
- output_filename = xmalloc (strlen (dir) + 1
- + strlen (subdir) + 1
- + max_name_len
+ output_filename = xmalloc (strlen (dir) + 1
+ + strlen (basename) + 1
+ + index_len
+ 1);
strcpy (output_filename, dir);
if (strlen (dir))
strcat (output_filename, "/");
strcat (output_filename, subdir);
- if (mkdir (output_filename, 0777) == -1 && errno != EEXIST)
+ if (mkdir (output_filename, 0777) == -1 && errno != EEXIST
+ /* output_filename might exist, but be a non-directory. */
+ || (stat (output_filename, &st) == 0 && !S_ISDIR (st.st_mode)))
{ /* that failed, try subdir name with .html */
strcpy (output_filename, dir);
if (strlen (dir))
strcat (output_filename, "/");
strcat (output_filename, basename);
- if (mkdir (output_filename, 0777) == -1 && errno != EEXIST)
- {
+ if (mkdir (output_filename, 0777) == -1)
+ {
+ char *errmsg = strerror (errno);
+
+ if ((errno == EEXIST
+#ifdef __MSDOS__
+ || errno == EACCES
+#endif
+ )
+ && (stat (output_filename, &st) == 0 && !S_ISDIR (st.st_mode)))
+ errmsg = _("File exists, but is not a directory");
line_error (_("Can't create directory `%s': %s"),
- output_filename,
- strerror (errno));
+ output_filename, errmsg);
exit (1);
}
strcat (output_filename, "/");
@@ -1449,7 +1481,7 @@ convert_from_loaded_file (name)
input_text_offset = 0;
real_output_filename = output_filename = command_output_filename;
- command_output_filename = NULL;
+ command_output_filename = NULL; /* for included files or whatever */
}
canon_white (output_filename);
@@ -1692,7 +1724,14 @@ handle_menu_entry ()
in_paragraph = 0;
}
- add_word ("<li><a href=\"");
+ add_word ("<li><a");
+ if (next_menu_item_number <= 9)
+ {
+ add_word(" accesskey=");
+ add_word_args("%d", next_menu_item_number);
+ next_menu_item_number++;
+ }
+ add_word (" href=\"");
string = expansion (tem, 0);
add_anchor_name (string, 1);
add_word ("\">");
@@ -3922,6 +3961,9 @@ maybe_update_execution_strings (text, new_len)
abort ();
}
+/* FIXME: this is an arbitrary limit. */
+#define EXECUTE_STRING_MAX 16*1024
+
/* Execute the string produced by formatting the ARGs with FORMAT. This
is like submitting a new file with @include. */
void
@@ -3939,7 +3981,7 @@ execute_string (format, va_alist)
va_list ap;
#endif
- es = get_execution_string (4000);
+ es = get_execution_string (EXECUTE_STRING_MAX);
temp_string = es->string;
es->in_use = 1;
@@ -3968,21 +4010,17 @@ execute_string (format, va_alist)
/* Return what would be output for STR (in newly-malloced memory), i.e.,
- expand Texinfo commands. If IMPLICIT_CODE is set, expand @code{STR}. */
+ expand Texinfo commands. If IMPLICIT_CODE is set, expand @code{STR}.
+ This is generally used for short texts; filling, indentation, and
+ html escapes are disabled. */
char *
expansion (str, implicit_code)
char *str;
int implicit_code;
{
- int length;
char *result;
-
- /* Inhibit any real output. */
- int start = output_paragraph_offset;
- int saved_paragraph_is_open = paragraph_is_open;
- int saved_output_column = output_column;
-
+
/* Inhibit indentation and filling, so that extra newlines
are not added to the expansion. (This is undesirable if
we write the expanded text to macro_expansion_output_stream.) */
@@ -3990,6 +4028,41 @@ expansion (str, implicit_code)
int saved_indented_fill = indented_fill;
int saved_no_indent = no_indent;
int saved_escape_html = escape_html;
+
+ filling_enabled = 0;
+ indented_fill = 0;
+ no_indent = 1;
+ escape_html = 0;
+
+ result = full_expansion (str, implicit_code);
+
+ filling_enabled = saved_filling_enabled;
+ indented_fill = saved_indented_fill;
+ no_indent = saved_no_indent;
+ escape_html = saved_escape_html;
+
+ return result;
+}
+
+
+/* Expand STR (or @code{STR} if IMPLICIT_CODE is nonzero). No change to
+ any formatting parameters -- filling, indentation, html escapes,
+ etc., are not reset. */
+
+char *
+full_expansion (str, implicit_code)
+ char *str;
+ int implicit_code;
+{
+ int length;
+ char *result;
+
+ /* Inhibit any real output. */
+ int start = output_paragraph_offset;
+ int saved_paragraph_is_open = paragraph_is_open;
+ int saved_output_column = output_column;
+
+ /* More output state to save. */
int saved_meta_pos = meta_char_pos;
int saved_last_char = last_inserted_character;
int saved_last_nl = last_char_was_newline;
@@ -4000,14 +4073,14 @@ expansion (str, implicit_code)
it from under our feet if it finds any macros in STR. */
char *saved_command = command ? xstrdup (command) : NULL;
- filling_enabled = 0;
- indented_fill = 0;
- no_indent = 1;
- escape_html = 0;
-
inhibit_output_flushing ();
paragraph_is_open = 1;
- execute_string (implicit_code ? "@code{%s}" : "%s", str);
+ if (strlen (str) > (implicit_code
+ ? EXECUTE_STRING_MAX - 1 - sizeof("@code{}")
+ : EXECUTE_STRING_MAX - 1))
+ line_error (_("`%.40s...' is too long for expansion; not expanded"), str);
+ else
+ execute_string (implicit_code ? "@code{%s}" : "%s", str);
uninhibit_output_flushing ();
/* Copy the expansion from the buffer. */
@@ -4019,13 +4092,11 @@ expansion (str, implicit_code)
/* Pretend it never happened. */
free_and_clear (&command);
command = saved_command;
+
output_paragraph_offset = start;
paragraph_is_open = saved_paragraph_is_open;
output_column = saved_output_column;
- filling_enabled = saved_filling_enabled;
- indented_fill = saved_indented_fill;
- no_indent = saved_no_indent;
- escape_html = saved_escape_html;
+
meta_char_pos = saved_meta_pos;
last_inserted_character = saved_last_char;
last_char_was_newline = saved_last_nl;
@@ -4043,10 +4114,13 @@ text_expansion (str)
{
char *ret;
int save_html = html;
+ int save_xml = xml;
html = 0;
+ xml = 0;
ret = expansion (str, 0);
html = save_html;
+ xml = save_xml;
return ret;
}
diff --git a/contrib/texinfo/makeinfo/makeinfo.h b/contrib/texinfo/makeinfo/makeinfo.h
index 21aae89..ad4ee57 100644
--- a/contrib/texinfo/makeinfo/makeinfo.h
+++ b/contrib/texinfo/makeinfo/makeinfo.h
@@ -1,7 +1,7 @@
/* makeinfo.h -- declarations for Makeinfo.
- $Id: makeinfo.h,v 1.31 2001/09/11 16:37:51 karl Exp $
+ $Id: makeinfo.h,v 1.37 2002/03/28 16:33:48 karl Exp $
- Copyright (C) 1996, 97, 98, 99, 2000, 01 Free Software Foundation, Inc.
+ Copyright (C) 1996, 97, 98, 99, 2000, 01, 02 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
@@ -45,7 +45,7 @@ DECLARE (int, executing_string, 0);
stream, because it has already been written. */
DECLARE (int, me_inhibit_expansion, 0);
-extern char *expansion (), *text_expansion ();
+extern char *expansion (), *text_expansion (), *full_expansion ();
/* Current output stream. */
DECLARE (FILE *, output_stream, NULL);
@@ -129,6 +129,10 @@ DECLARE (int, enable_encoding, 0);
DECLARE (int, escape_html, 1);
extern char *escape_string (); /* do HTML escapes */
+/* Access key number for next menu entry to be generated (1 to 9, or 10 to
+ mean no access key) */
+DECLARE (int, next_menu_item_number, 1);
+
/* Nonzero means that the use of paragraph_start_indent is inhibited.
@example uses this to line up the left columns of the example text.
A negative value for this variable is incremented each time it is used.
@@ -144,6 +148,9 @@ DECLARE (char *, current_node, NULL);
/* Command name in the process of being hacked. */
DECLARE (char *, command, NULL);
+/* @copying ... @end copying. */
+DECLARE (char *, copying_text, NULL);
+
/* @documentdescription ... @end documentdescription. */
DECLARE (char *, document_description, NULL);
@@ -174,9 +181,15 @@ DECLARE (int, no_headers, 0);
generating HTML. (--ifhtml) */
DECLARE (int, process_html, 0);
-/* Nonzero means that we process @ifinfo even when generating HTML.
- (--ifinfo) */
-DECLARE (int, process_info, 1);
+/* Positive means process @ifinfo (even if not generating Info);
+ zero means don't process @ifinfo (even if we are);
+ -1 means we don't know yet. (--ifinfo) */
+DECLARE (int, process_info, -1);
+
+/* Positive means process @ifplaintext (even if not generating plain text);
+ zero means we don't process @ifplaintext (even if we are);
+ -1 means we don't know yet. (--ifplaintext) */
+DECLARE (int, process_plaintext, -1);
/* Nonzero means that we process @tex and @iftex. (--iftex) */
DECLARE (int, process_tex, 0);
diff --git a/contrib/texinfo/makeinfo/node.c b/contrib/texinfo/makeinfo/node.c
index 3c7a27d..b5a90066 100644
--- a/contrib/texinfo/makeinfo/node.c
+++ b/contrib/texinfo/makeinfo/node.c
@@ -1,5 +1,5 @@
/* node.c -- nodes for Texinfo.
- $Id: node.c,v 1.31 2002/02/23 19:12:15 karl Exp $
+ $Id: node.c,v 1.34 2002/03/26 16:16:29 karl Exp $
Copyright (C) 1998, 99, 2000, 01, 02 Free Software Foundation, Inc.
@@ -599,7 +599,7 @@ cm_node ()
no_indent = 1;
if (xml)
{
- xml_begin_document ();
+ xml_begin_document (current_output_filename);
xml_begin_node ();
if (!docbook)
{
@@ -928,7 +928,7 @@ cm_node ()
tem = expansion (next, 0);
add_word (",\n");
add_word (_("Next:"));
- add_word ("<a rel=next href=\"");
+ add_word ("<a rel=next accesskey=n href=\"");
add_anchor_name (tem, 1);
add_word_args ("\">%s</a>", tem);
free (tem);
@@ -938,7 +938,7 @@ cm_node ()
tem = expansion (prev, 0);
add_word (",\n");
add_word (_("Previous:"));
- add_word ("<a rel=previous href=\"");
+ add_word ("<a rel=previous accesskey=p href=\"");
add_anchor_name (tem, 1);
add_word_args ("\">%s</a>", tem);
free (tem);
@@ -948,7 +948,7 @@ cm_node ()
tem = expansion (up, 0);
add_word (",\n");
add_word (_("Up:"));
- add_word ("<a rel=up href=\"");
+ add_word ("<a rel=up accesskey=u href=\"");
add_anchor_name (tem, 1);
add_word_args ("\">%s</a>", tem);
free (tem);
@@ -1149,7 +1149,8 @@ cm_anchor (arg)
xml_insert_element (ANCHOR, END);
}
/* Save it in the tag table. */
- remember_node (anchor, NULL, NULL, NULL, output_position + output_column,
+ remember_node (anchor, NULL, NULL, NULL,
+ output_position + output_paragraph_offset,
line_number, fname_for_anchor, TAG_FLAG_ANCHOR);
}
diff --git a/contrib/texinfo/makeinfo/texinfo.dtd b/contrib/texinfo/makeinfo/texinfo.dtd
index ead278a..8345b48 100644
--- a/contrib/texinfo/makeinfo/texinfo.dtd
+++ b/contrib/texinfo/makeinfo/texinfo.dtd
@@ -1,21 +1,11 @@
-<!-- $Id: texinfo.dtd,v 1.1 2001/05/21 17:36:22 karl Exp $
- Document Type Definition for Texinfo
- ************************************
- For texinfo-4.0b
- *******************
+<!-- $Id: texinfo.dtd,v 1.5 2002/03/23 20:41:32 karl Exp $
+ Document Type Definition for Texinfo.
Author: Philippe Martin (feloy@free.fr)
Contributors:
Karl Eichwalder (keichwa@gmx.net)
- HISTORY
- *******
- Version 0.2 - 2001-05-08
- Version 0.1 - 2001-05-07
-
-
-
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 02 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
@@ -40,7 +30,8 @@
<!-- block -->
<!-- ***** -->
<!ENTITY % block "menu | para | quotation | example | smallexample | lisp
- | smalllisp | cartouche | format | smallformat | display
+ | smalllisp | cartouche | copying
+ | format | smallformat | display
| smalldisplay | itemize | enumerate | sp | center | group
| table | multitable">
@@ -151,6 +142,7 @@
<!ELEMENT lisp (#PCDATA | %block; | %Inline.phrase;)*>
<!ELEMENT smalllisp (#PCDATA | %block; | %Inline.phrase;)*>
<!ELEMENT cartouche (#PCDATA | %block; | %Inline.phrase;)*>
+<!ELEMENT copying (#PCDATA | %block; | %Inline.phrase;)*>
<!ELEMENT format (#PCDATA | %block; | %Inline.phrase;)*>
<!ELEMENT smallformat (#PCDATA | %block; | %Inline.phrase;)*>
<!ELEMENT display (#PCDATA | %block; | %Inline.phrase;)*>
diff --git a/contrib/texinfo/makeinfo/texinfo.xsl b/contrib/texinfo/makeinfo/texinfo.xsl
index 401e9be..1740c12 100644
--- a/contrib/texinfo/makeinfo/texinfo.xsl
+++ b/contrib/texinfo/makeinfo/texinfo.xsl
@@ -1,5 +1,5 @@
<?xml version='1.0'?>
-<!-- $Id: texinfo.xsl,v 1.1 2001/06/07 18:35:23 karl Exp $ -->
+<!-- $Id: texinfo.xsl,v 1.2 2002/04/01 14:06:15 karl Exp $ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
@@ -7,12 +7,12 @@
<!-- root rule -->
<xsl:template match="/">
- <HTML>
- <HEAD><TITLE>
+ <html>
+ <head><title>
<xsl:apply-templates select="TEXINFO/SETTITLE" mode="head"/>
- </TITLE></HEAD>
- <BODY BGCOLOR="#FFFFFF"><xsl:apply-templates/>
-</BODY></HTML>
+ </title></head>
+ <body bgcolor="#FFFFFF"><xsl:apply-templates/>
+</body></html>
</xsl:template>
@@ -46,7 +46,8 @@
<!-- The node -->
<xsl:template match="TEXINFO/NODE">
- <hr><p>
+ <hr/>
+ <p>
<xsl:apply-templates select="NODENAME" mode="select"/>
<xsl:apply-templates select="NODEPREV" mode="select"/>
<xsl:apply-templates select="NODEUP" mode="select"/>
@@ -56,7 +57,7 @@
<ol>
<xsl:apply-templates select=".//FOOTNOTE" mode="footnote"/>
</ol>
- </p></hr>
+ </p>
</xsl:template>
<xsl:template match="TEXINFO/NODE/NODENAME" mode="select">
@@ -127,7 +128,7 @@
<xsl:apply-templates select="MENUTITLE"/>
</a>:
<xsl:apply-templates select="MENUCOMMENT"/>
-<br></br>
+ <br/>
</xsl:template>
<xsl:template match="//MENU/MENUENTRY/MENUNODE">
@@ -239,4 +240,3 @@
</xsl:template>
</xsl:stylesheet>
-
diff --git a/contrib/texinfo/makeinfo/toc.c b/contrib/texinfo/makeinfo/toc.c
index 0340f4a..a9c8986 100644
--- a/contrib/texinfo/makeinfo/toc.c
+++ b/contrib/texinfo/makeinfo/toc.c
@@ -1,5 +1,5 @@
/* toc.c -- table of contents handling.
- $Id: toc.c,v 1.21 2002/02/23 19:12:15 karl Exp $
+ $Id: toc.c,v 1.22 2002/04/01 14:07:11 karl Exp $
Copyright (C) 1999, 2000, 01, 02 Free Software Foundation, Inc.
@@ -74,16 +74,16 @@ toc_add_entry (tocname, level, node_name, anchor)
if (html)
{
- /* We need to insert the expanded node name into the TOC, so
- that when we eventually output the TOC, its <A REF= link will
- point to the <A NAME= tag created by cm_node in the navigation
+ /* We need to insert the expanded node name into the toc, so
+ that when we eventually output the toc, its <a ref= link will
+ point to the <a name= tag created by cm_node in the navigation
bar. We cannot expand the containing_node member, for the
reasons explained in the WARNING below. We also cannot wait
- with the node name expansion until the TOC is actually output,
+ with the node name expansion until the toc is actually output,
since by that time the macro definitions may have been changed.
So instead we store in the tocname member the expanded node
- name and the TOC name concatenated together (with the necessary
- HTML markup), since that's how they are output. */
+ name and the toc name concatenated together (with the necessary
+ html markup), since that's how they are output. */
if (!anchor)
s = expanded_node = expand_node_name (node_name);
else
diff --git a/contrib/texinfo/makeinfo/xml.c b/contrib/texinfo/makeinfo/xml.c
index 813b5b6..a7c20ae 100644
--- a/contrib/texinfo/makeinfo/xml.c
+++ b/contrib/texinfo/makeinfo/xml.c
@@ -1,5 +1,5 @@
/* xml.c -- xml output.
- $Id: xml.c,v 1.7 2002/01/16 15:52:45 karl Exp $
+ $Id: xml.c,v 1.11 2002/03/23 20:41:12 karl Exp $
Copyright (C) 2001, 02 Free Software Foundation, Inc.
@@ -109,6 +109,7 @@ element texinfoml_element_list [] = {
{ "lisp", 1, 0 },
{ "smalllisp", 1, 0 },
{ "cartouche", 1, 0 },
+ { "copying", 1, 0 },
{ "format", 1, 0 },
{ "smallformat", 1, 0 },
{ "display", 1, 0 },
@@ -243,6 +244,7 @@ element docbook_element_list [] = {
{ "screen", 0, 1 }, /* LISP */
{ "screen", 0, 1 }, /* SMALLLISP */
{ "", 1, 0 }, /* CARTOUCHE */
+ { "", 1, 0 }, /* COPYING */
{ "screen", 0, 1 }, /* FORMAT */
{ "screen", 0, 1 }, /* SMALLFORMAT */
{ "screen", 0, 1 }, /* DISPLAY */
diff --git a/contrib/texinfo/makeinfo/xml.h b/contrib/texinfo/makeinfo/xml.h
index c788617..0a440ee 100644
--- a/contrib/texinfo/makeinfo/xml.h
+++ b/contrib/texinfo/makeinfo/xml.h
@@ -1,7 +1,7 @@
/* xml.h -- xml output declarations.
- $Id: xml.h,v 1.3 2001/05/01 16:29:29 karl Exp $
+ $Id: xml.h,v 1.7 2002/03/23 20:41:21 karl Exp $
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 02 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
@@ -40,22 +40,26 @@ enum xml_element
NODE /* 4 */, NODENEXT, NODEPREV, NODEUP,
/* Structuring */
CHAPTER /* 8 */, SECTION, SUBSECTION, SUBSUBSECTION,
- TOP /* 12 */, UNNUMBERED, UNNUMBEREDSEC, UNNUMBEREDSUBSEC, UNNUMBEREDSUBSUBSEC,
+ TOP /* 12 */, UNNUMBERED, UNNUMBEREDSEC, UNNUMBEREDSUBSEC,
+ UNNUMBEREDSUBSUBSEC,
APPENDIX /* 17 */, APPENDIXSEC, APPENDIXSUBSEC, APPENDIXSUBSUBSEC,
MAJORHEADING /* 21 */, CHAPHEADING, HEADING, SUBHEADING, SUBSUBHEADING,
/* Menu */
MENU /* 26 */, MENUENTRY, MENUTITLE, MENUCOMMENT, MENUNODE, NODENAME,
/* -- */
- ACRONYM/* 32 */, TT, CODE, KBD, URL, KEY, VAR, SC, DFN, EMPH, STRONG, CITE, NOTFIXEDWIDTH, I, B, R,
+ ACRONYM/* 32 */, TT, CODE, KBD, URL, KEY, VAR, SC, DFN, EMPH, STRONG,
+ CITE, NOTFIXEDWIDTH, I, B, R,
TITLE,
IFINFO,
SP, CENTER,
DIRCATEGORY,
- QUOTATION, EXAMPLE, SMALLEXAMPLE, LISP, SMALLLISP, CARTOUCHE, FORMAT, SMALLFORMAT, DISPLAY, SMALLDISPLAY,
+ QUOTATION, EXAMPLE, SMALLEXAMPLE, LISP, SMALLLISP, CARTOUCHE,
+ COPYING, FORMAT, SMALLFORMAT, DISPLAY, SMALLDISPLAY,
FOOTNOTE,
ITEMIZE, ITEMFUNCTION, ITEM, ENUMERATE, TABLE, TABLEITEM, TABLETERM,
INDEXTERM,
- XREF, XREFNODENAME, XREFINFONAME, XREFPRINTEDDESC, XREFINFOFILE, XREFPRINTEDNAME,
+ XREF, XREFNODENAME, XREFINFONAME, XREFPRINTEDDESC, XREFINFOFILE,
+ XREFPRINTEDNAME,
INFOREF, INFOREFNODENAME, INFOREFREFNAME, INFOREFINFONAME,
UREF, UREFURL, UREFDESC, UREFREPLACEMENT,
EMAIL, EMAILADDRESS, EMAILNAME,
@@ -63,7 +67,8 @@ enum xml_element
PRINTINDEX,
ANCHOR,
IMAGE,
- PRIMARY, SECONDARY, INFORMALFIGURE, MEDIAOBJECT, IMAGEOBJECT, IMAGEDATA, TEXTOBJECT,
+ PRIMARY, SECONDARY, INFORMALFIGURE, MEDIAOBJECT, IMAGEOBJECT,
+ IMAGEDATA, TEXTOBJECT,
INDEXENTRY, PRIMARYIE, SECONDARYIE, INDEXDIV,
MULTITABLE, TGROUP, COLSPEC, TBODY, ENTRY, ROW,
BOOKINFO, ABSTRACT, REPLACEABLE,
OpenPOWER on IntegriCloud