From 0a46c6dbe498883cd66140c824beb225fc60e635 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 3 Apr 1998 16:02:24 +0000 Subject: Added fourth icon which takes user back to the index --- doc/tools/texi2www/texi2www | 69 ++++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 26 deletions(-) (limited to 'doc/tools') diff --git a/doc/tools/texi2www/texi2www b/doc/tools/texi2www/texi2www index 84dc9924f8..a77bbe6ac2 100755 --- a/doc/tools/texi2www/texi2www +++ b/doc/tools/texi2www/texi2www @@ -295,6 +295,9 @@ sub parse &printHTML("

\[" . ($n+1) . "\] $footnote[$n]

\n"); } } + &printHTML("


\n"); + &print_arrows; + &printHTML("

\n"); &print_footer if $footer; &printHTML("\n"); close (HTML); @@ -335,6 +338,7 @@ sub parse } elsif ($1 eq 'menu') { &parse_menu(); } elsif ($1 eq 'node') { + $node=$_; &process_node(); } elsif ($1 eq 'printindex') { /^\@printindex\s+([a-z]+)/; @@ -765,6 +769,38 @@ sub process_index eval "\$$index_name{$1}\{\$2\} = \$entry"; } # process_index +######################################################################## +sub print_arrows +{ + &printHTML("\n") if $next; + &printHTML("\n") if $prev; + &printHTML("\n") if $up; + &printHTML("

\n"); + if ($cprev) { + &printHTML("\"PREV\"\n"); + } else { + &printHTML("\"prev\"\n"); + } + if ($cup) { + &printHTML(" \"UP\"\n"); + } else { + &printHTML("\"up\"\n"); + } + if ($cnext) { + &printHTML("\"NEXT\"\n"); + } else { + &printHTML("\"next\"\n"); + } + + &printHTML("$title") if $title; +} + ######################################################################## sub process_node # On entry, $_ is an @node line. @@ -791,35 +827,11 @@ sub process_node $origin[$start_index] . " via texi2www -->\n"); &print_header if $header; &printHTML("\n$this\n"); - &printHTML("\n") if $next; - &printHTML("\n") if $prev; - &printHTML("\n") if $up; - &printHTML("

\n"); - if ($cprev) { - &printHTML("\"PREV\"\n"); - } else { - &printHTML("\"prev\"\n"); - } - if ($cup) { - &printHTML(" \"UP\"\n"); - } else { - &printHTML("\"up\"\n"); - } - if ($cnext) { - &printHTML("\"NEXT\"\n"); - } else { - &printHTML("\"next\"\n"); - } - &printHTML("$title") if $title; + &print_arrows; &printHTML("

\n"); } # process_node + sub terminate_node { if ($nfootnotes) { @@ -828,6 +840,11 @@ sub terminate_node &printHTML("

\[" . ($n+1) . "\] $footnote[$n]

\n"); } } + + + &printHTML("


\n"); + &print_arrows; + &printHTML("

\n"); &print_footer if $footer; &printHTML("\n"); close (HTML); -- cgit v1.2.3