Changeset 05862b4 in rtems


Ignore:
Timestamp:
Apr 3, 1998, 4:05:16 PM (23 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
0be9926
Parents:
0a46c6d
Message:

Added shortname generation support with the capability for the user
to specify the base of the name. BASEnnnn.html

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/tools/texi2www/texi2www

    r0a46c6d r05862b4  
    2020where options are:
    2121  -dir directory    -- Specify output directory.  Default is `.'.
     22  -dirfile path     -- Specifies a replacement for ../dir.html
    2223  -header path      -- Specifies the path to a file containing HTML;
    2324                       this files gets inserted near the top of each
     
    2829  -icons path       -- Specifies the path, relative to the output directory,
    2930                       to the arrow files.  Default is `..'.
    30   -dirfile path     -- Specifies a replacement for ../dir.html
     31  -base             -- Specify the base part fo the genrated short file names
     32  -uselongnames     -- Use long names for generated html files
    3133  -verbose          -- Verbose output.
    3234
     
    3739########################################################################
    3840
    39 $icons = ".."; $dir = "."; $dirfile = "../dir.html";
     41%lookup = ();                      # clear the name mapping hash
     42$uselongnames=0;                   # default to using short names
     43$base = "a";                       # default short name base (BASEnnnnn.html)
     44$outcount = 0;                     # count for the nnnnn part of short names
     45$icons = "..";                     # where are the icons
     46$dir = ".";                        # where are the generated files to go
     47$dirfile = "../dir.html";          # "up" node pointer
    4048while ($ARGV[0] =~ /^-/) {
    4149    $_ = shift;
     50    if (/-base/) {$base = shift; next;}
    4251    if (/-dirfile/) {$dirfile = shift; next;}
    4352    if (/-dir/) {$_ = shift; s!/$!!; s!$!/!; $dir = $_; next;}
    44     if (/-verbose/) {$verbose = 1; next;}
    4553    if (/-footer/) {$footer = shift; next;}
    4654    if (/-header/) {$header = shift; next;}
    4755    if (/-icons/) {$_ = shift; s!\/$!!; $icons = $_; next;}
     56    if (/-uselongnames/) {$uselongnames = 1; next;}
     57    if (/-verbose/) {$verbose = 1; next;}
    4858    die $usage;
    4959}
     
    103113    }
    104114
    105     return "$p$n.html" if ($n);
     115    if ($uselongnames) {
     116      return "$p$n.html" if ($n);
     117    } else {
     118      if ($n eq 'Top') {
     119        $lookup{"$p$n"}= "Top.html";
     120        return $lookup{"$p$n"};
     121      } elsif ($n) {
     122        if (! $lookup{"$p$n"})  {
     123          $outcount = $outcount + 1;
     124          #$lookup{"$p$n"}= "$base$outcount.html";
     125          $lookup{"$p$n"} = sprintf "%s%05d.html", $base, $outcount;
     126        }
     127        return $lookup{"$p$n"};
     128      }
     129    }
    106130    return "";
    107131} # canonical
     
    776800    &printHTML("<LINK REV=\"Precedes\" HREF=\"$cprev\">\n") if $prev;
    777801    &printHTML("<LINK REV=\"Subdocument\" HREF=\"$cup\">\n") if $up;
     802    &printHTML("<LINK REV=\"Library\" HREF=\"$dirfile\">\n") if $dirfile;
    778803    &printHTML("</HEAD><BODY><P>\n");
    779804    if ($cprev) {
     
    798823                   . "SRC=\"$icons/missing-arrow.gif\" ALT=\"next\"></A>\n");
    799824    }
    800 
     825    if ($dirfile) {
     826# XXX need new graphic for this one
     827        &printHTML("<A HREF=\"$dirfile\"> <IMG ALIGN=MIDDLE "
     828                   . "SRC=\"$icons/dir-arrow.gif\" ALT=\"Bookshelf\"></A>\n");
     829    } else {
     830        &printHTML("<A><IMG ALIGN=MIDDLE "
     831                   . "SRC=\"$icons/missing-arrow.gif\" ALT=\"Bookshelf\"></A>\n");
     832    }
    801833    &printHTML("<CITE>$title</CITE>") if $title;
    802834}
Note: See TracChangeset for help on using the changeset viewer.