tadd source links - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 7383736cf8254264733aa055a4d854e007f5f83c
 (DIR) parent 0c891f28dbdc5a61b191d778391664417aae445c
 (HTM) Author: rsc <devnull@localhost>
       Date:   Tue, 15 Feb 2005 05:07:26 +0000
       
       add source links
       
       Diffstat:
         M CHANGES                             |       3 +++
         A dist/addsrclinks                    |      24 ++++++++++++++++++++++++
         M dist/checkman.awk                   |       3 ---
         M dist/main.html                      |       9 ++++++---
         M dist/manweb                         |       2 +-
       
       5 files changed, 34 insertions(+), 7 deletions(-)
       ---
 (DIR) diff --git a/CHANGES b/CHANGES
       t@@ -1,3 +1,6 @@
       +February 14, 2005
       +        add source links to man pages
       +
        February 13, 2005
                lib9: add readcons(1)
                        add laddr, raddr to Netconninfo (see dial(3))
 (DIR) diff --git a/dist/addsrclinks b/dist/addsrclinks
       t@@ -0,0 +1,24 @@
       +#!/usr/bin/perl
       +
       +@_ = <>;
       +my $root = $ENV{'PLAN9'};
       +my $html = join("", @_);
       +$html =~ s;$root;XXX$root;g;
       +while($html =~ /((.|\n)*)XXX($root\/([a-zA-Z0-9_.\/]|&#8722;)*[a-zA-Z0-9_\/])((.|\n)*)/){
       +        ($a, $b, $c) = ($1, $3, $5);
       +        $b =~ s/&#8722;/-/g;
       +        $l = $b;
       +        while(! -e $l){
       +                if($l =~ /(.*\/)(.+)/){
       +                        $l = $1;
       +                }else{
       +                        last;
       +                }
       +        }
       +        $bb = substr($b, length($l));
       +        $b = $l;
       +        $b =~ s/-/\&#8722;/g;
       +        $bb =~ s/-/\&#8722;/g;
       +        $html = "$a<a href=\"$l\">$b</a>$bb$c";
       +}
       +print $html;
 (DIR) diff --git a/dist/checkman.awk b/dist/checkman.awk
       t@@ -46,7 +46,6 @@ BEGIN {
                Omitman["sh(1)"] = 1
                Omitman["ssh(1)"] = 1
                Omitman["stty(1)"] = 1
       -        Omitman["tar(1)"] = 1
                Omitman["tex(1)"] = 1
                Omitman["unutf(1)"] = 1
                Omitman["vnc(1)"] = 1
       t@@ -83,8 +82,6 @@ BEGIN {
                Omitman["sin(3)"] = 1
                Omitman["strerror(3)"] = 1
        
       -        Omitman["factotum(4)"] = 1        # for now leave undocumented
       -
                Omitman["core(5)"] = 1
                Omitman["passwd(5)"] = 1
        
 (DIR) diff --git a/dist/main.html b/dist/main.html
       t@@ -30,6 +30,8 @@ Edit ./^$/,s/<Table/<table border=0 cellspacing=0 cellpadding=0 width=100%/g
              |
              <a href="man/man1/install.html">install notes</a>
              |
       +      <a href="/usr/local/plan9/">browse</a>
       +      |
              <a href="man/man1/cvs.html">cvs</a>
              |
              <a href="http://cvs.pdos.lcs.mit.edu/cvs/plan9">cvsweb</a>
       t@@ -71,8 +73,8 @@ Edit ./^$/,s/<Table/<table border=0 cellspacing=0 cellpadding=0 width=100%/g
              <tr><td><td>
                latest tree: <a href="plan9port.tgz">plan9port.tgz</a>
                <font size=-1>(<a href="/cgi-bin/info.cgi?file=/plan9port/plan9port.tgz">date and checksums</a>;
       -          <a href="http://cvs.pdos.lcs.mit.edu/cvs/plan9/CHANGES?rev=HEAD">list of recent changes</a>;
       -          <a href="http://cvs.pdos.lcs.mit.edu/cvs/plan9/LICENSE?rev=HEAD">license</a>)</font>
       +          <a href="/usr/local/plan9/CHANGES">list of recent changes</a>;
       +          <a href="/usr/local/plan9/LICENSE">license</a>)</font>
                <br>
            </table>
        
       t@@ -111,7 +113,8 @@ Edit ./^$/,s/<Table/<table border=0 cellspacing=0 cellpadding=0 width=100%/g
        
                <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
                
       -        Latchesar Ionkov has contributed many fixes to tricky bugs.
       +        Latchesar Ionkov has contributed many fixes to tricky bugs, and 
       +        got <a href="man/man4/factotum.html"><i>factotum</i>(4)</a> up and running.
                
                <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
        
 (DIR) diff --git a/dist/manweb b/dist/manweb
       t@@ -72,7 +72,7 @@ for (i in */[~.]*.[0-9]*){
                        sed '/<!-- TRAILER -->/q' /tmp/manweb.html
                        cat $PLAN9/dist/mantrailer.html
                        sed -n '/<!-- TRAILER -->/,$p' /tmp/manweb.html
       -        } >$d/$p.html
       +        } | $PLAN9/dist/addsrclinks >$d/$p.html
        }
        rm /tmp/manweb.html
        cd $PLAN9/dist