aboutsummaryrefslogtreecommitdiff
path: root/bin/sig
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-14 05:55:09 +0000
committerrsc <devnull@localhost>2005-01-14 05:55:09 +0000
commit9bbe4594efec95643a61272e718da8d7dcd16a25 (patch)
treef59f931a8236f5291ca09daec18227e71270fe20 /bin/sig
parent3a9ee6351914b85db336d51b0e450f954d37d7a6 (diff)
downloadplan9port-9bbe4594efec95643a61272e718da8d7dcd16a25.tar.gz
plan9port-9bbe4594efec95643a61272e718da8d7dcd16a25.tar.bz2
plan9port-9bbe4594efec95643a61272e718da8d7dcd16a25.zip
paranoia
Diffstat (limited to 'bin/sig')
-rwxr-xr-xbin/sig10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/sig b/bin/sig
index b2f797f3..0db15f30 100755
--- a/bin/sig
+++ b/bin/sig
@@ -2,7 +2,7 @@
# Usage: sig key ...
# prints out function signatures by grepping the manual
-
+. 9.rc
*=`{echo $*|tr A-Z a-z|tr -dc 'a-z0-9_ \012'} # fold case, delete funny chars
if(~ $#* 0){
echo Usage: sig function ... >[1=2]
@@ -10,11 +10,11 @@ if(~ $#* 0){
}
for (i) {
- files=`{9 grep -il '[ ]\*?'$i'\(' $PLAN9/man/man3/*.3*}
+ files=`{grep -il '[ ]\*?'$i'\(' $PLAN9/man/man3/*.3*}
for(j in $files) {
{echo .nr LL 20i; 9 sed -n '/^.SH SYNOPSIS/,/^.SH.*DESCR/p' $j } |
- 9 nroff -man |
- 9 sed '
+ nroff -man |
+ sed '
:a
/,$/ {
N
@@ -22,7 +22,7 @@ for (i) {
}
ta
s/[ ]+/ /g' |
- 9 grep -i -e '[ ]\*?'$i'\(' | sed 's/^[ +]/ /'
+ grep -i -e '[ ]\*?'$i'\(' | sed 's/^[ +]/ /'
}
}