summaryrefslogtreecommitdiffstats
path: root/contrib/texinfo/makeinfo/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/texinfo/makeinfo/node.c')
-rw-r--r--contrib/texinfo/makeinfo/node.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/contrib/texinfo/makeinfo/node.c b/contrib/texinfo/makeinfo/node.c
index b5a90066..10f4c3a 100644
--- a/contrib/texinfo/makeinfo/node.c
+++ b/contrib/texinfo/makeinfo/node.c
@@ -1,7 +1,8 @@
/* node.c -- nodes for Texinfo.
- $Id: node.c,v 1.34 2002/03/26 16:16:29 karl Exp $
+ $Id: node.c,v 1.6 2003/01/18 17:16:17 karl Exp $
- Copyright (C) 1998, 99, 2000, 01, 02 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
@@ -306,7 +307,12 @@ remember_node (node, prev, next, up, position, line_no, fname, flags)
node_number++;
new->number = node_number;
}
- new->html_fname = fname;
+ if (fname)
+ new->html_fname = fname;
+ else
+ /* This happens for Top node under split-HTML, for example. */
+ new->html_fname
+ = normalize_filename (filename_part (current_output_filename));
new->next_ent = tag_table;
tag_table = new;
}
@@ -478,7 +484,7 @@ set_current_output_filename (fname)
/* The order is: nodename, nextnode, prevnode, upnode.
If all of the NEXT, PREV, and UP fields are empty, they are defaulted.
You must follow a node command which has those fields defaulted
- with a sectioning command (e.g. @chapter) giving the "level" of that node.
+ with a sectioning command (e.g., @chapter) giving the "level" of that node.
It is an error not to do so.
The defaults come from the menu in this node's parent. */
void
@@ -652,7 +658,7 @@ cm_node ()
}
line_error
- (_("Node `%s' requires a sectioning command (e.g. %c%s)"),
+ (_("Node `%s' requires a sectioning command (e.g., %c%s)"),
node, COMMAND_PREFIX, polite_section_name);
}
else
@@ -914,8 +920,9 @@ cm_node ()
}
if (splitting || !no_headers)
- { /* Navigation bar. The <p> avoids the links area running
- on with old Lynxen. */
+ { /* Navigation bar. */
+ 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:"));
tem = expand_node_name (node);
@@ -928,7 +935,7 @@ cm_node ()
tem = expansion (next, 0);
add_word (",\n");
add_word (_("Next:"));
- add_word ("<a rel=next accesskey=n href=\"");
+ add_word ("<a rel=\"next\" accesskey=\"n\" href=\"");
add_anchor_name (tem, 1);
add_word_args ("\">%s</a>", tem);
free (tem);
@@ -938,7 +945,7 @@ cm_node ()
tem = expansion (prev, 0);
add_word (",\n");
add_word (_("Previous:"));
- add_word ("<a rel=previous accesskey=p href=\"");
+ add_word ("<a rel=\"previous\" accesskey=\"p\" href=\"");
add_anchor_name (tem, 1);
add_word_args ("\">%s</a>", tem);
free (tem);
@@ -948,7 +955,7 @@ cm_node ()
tem = expansion (up, 0);
add_word (",\n");
add_word (_("Up:"));
- add_word ("<a rel=up accesskey=u href=\"");
+ add_word ("<a rel=\"up\" accesskey=\"u\" href=\"");
add_anchor_name (tem, 1);
add_word_args ("\">%s</a>", tem);
free (tem);
@@ -956,6 +963,7 @@ cm_node ()
/* html fixxme: we want a `top' or `contents' link here. */
add_word_args ("\n%s<br>\n", splitting ? "<hr>" : "");
+ add_word ("</div>\n");
}
}
else if (docbook)
@@ -1274,7 +1282,7 @@ validate (tag, line, label)
if (!result)
{
line_number = line;
- line_error (_("%s reference to nonexistent node `%s'"), label, tag);
+ line_error (_("%s reference to nonexistent node `%s' (perhaps incorrect sectioning?)"), label, tag);
return 0;
}
result->touched++;
@@ -1377,7 +1385,7 @@ validate_file (tag_table)
}
if (you_lose)
{
- line_error (_("Next field of node `%s' not pointed to"),
+ line_error (_("Next field of node `%s' not pointed to (perhaps incorrect sectioning?)"),
tags->node);
file_line_error (temp_tag->filename, temp_tag->line_no,
_("This node (%s) has the bad Prev"),
@@ -1451,7 +1459,7 @@ validate_file (tag_table)
if (!tags->up
&& !(tags->flags & TAG_FLAG_ANCHOR)
&& strcasecmp (tags->node, "Top") != 0)
- line_error (_("`%s' has no Up field"), tags->node);
+ line_error (_("`%s' has no Up field (perhaps incorrect sectioning?)"), tags->node);
else if (tags->up)
{
int valid_p = validate (tags->up, tags->line_no, _("Up"));
OpenPOWER on IntegriCloud