Changeset 3ab325e in rtems


Ignore:
Timestamp:
Apr 3, 1998, 3:41:30 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
0a46c6d
Parents:
0bbbf52
Message:

Added -header and -dirfile options.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/tools/texi2www/texi2www

    r0bbbf52 r3ab325e  
    2020where options are:
    2121  -dir directory    -- Specify output directory.  Default is `.'.
     22  -header path      -- Specifies the path to a file containing HTML;
     23                       this files gets inserted near the top of each
     24                       generated HTML file.
    2225  -footer path      -- Specifies the path to a file containing HTML;
    2326                       this files gets inserted near the bottom of each
     
    2528  -icons path       -- Specifies the path, relative to the output directory,
    2629                       to the arrow files.  Default is `..'.
     30  -dirfile path     -- Specifies a replacement for ../dir.html
    2731  -verbose          -- Verbose output.
    2832
     
    3337########################################################################
    3438
    35 $icons = ".."; $dir = ".";
     39$icons = ".."; $dir = "."; $dirfile = "../dir.html";
    3640while ($ARGV[0] =~ /^-/) {
    3741    $_ = shift;
     42    if (/-dirfile/) {$dirfile = shift; next;}
    3843    if (/-dir/) {$_ = shift; s!/$!!; s!$!/!; $dir = $_; next;}
    3944    if (/-verbose/) {$verbose = 1; next;}
    4045    if (/-footer/) {$footer = shift; next;}
     46    if (/-header/) {$header = shift; next;}
    4147    if (/-icons/) {$_ = shift; s!\/$!!; $icons = $_; next;}
    4248    die $usage;
     
    7682    $n =~ s/^\s+//; $n =~ s/\s+$//; # strip whitespace
    7783
    78     return "../dir.html" if ($n =~ /\(dir\)/i); # handle (dir)
     84    return "$dirfile" if ($n =~ /\(dir\)/i); # handle (dir)
    7985   
    8086    if ($n =~ /^\(([^\)]+)\)(.*)/) {
     
    784790    &printHTML("<!-- created $today from " .
    785791               $origin[$start_index] . " via texi2www -->\n");
     792    &print_header if $header;
    786793    &printHTML("<HEAD>\n<TITLE>$this</TITLE>\n");
    787794    &printHTML("<LINK REL=\"Precedes\" HREF=\"$cnext\">\n") if $next;
     
    908915
    909916########################################################################
     917sub print_header
     918{
     919    unless (open(HEADER,$header)) {
     920        print "WARNING -- couldn't open header file \"$header\" -- $!\n";
     921        $header = 0;
     922        return;
     923    }
     924    while (<HEADER>) {
     925        &printHTML($_);
     926    }
     927    close(HEADER);
     928}
     929
     930########################################################################
    910931sub print_footer
    911932{
Note: See TracChangeset for help on using the changeset viewer.