diff options
author | rsc <devnull@localhost> | 2005-01-13 04:56:07 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-01-13 04:56:07 +0000 |
commit | 3940506bccddeff3235cd8874c540813a3deaf6d (patch) | |
tree | dd114bbe1c8a3fe444fc5c28d8e19c8dcd9f2f96 /bin | |
parent | 79af2b89fa3bf91c51a3fa6996958de696a21d44 (diff) | |
download | plan9port-3940506bccddeff3235cd8874c540813a3deaf6d.tar.gz plan9port-3940506bccddeff3235cd8874c540813a3deaf6d.tar.bz2 plan9port-3940506bccddeff3235cd8874c540813a3deaf6d.zip |
forgotten files
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/sig | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bin/sig b/bin/sig new file mode 100755 index 00000000..b2f797f3 --- /dev/null +++ b/bin/sig @@ -0,0 +1,29 @@ +#!/usr/local/plan9/bin/rc +# Usage: sig key ... +# prints out function signatures by grepping the manual + + +*=`{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] + exit 1 +} + +for (i) { + files=`{9 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 ' + :a + /,$/ { + N + s/\n// + } + ta + s/[ ]+/ /g' | + 9 grep -i -e '[ ]\*?'$i'\(' | sed 's/^[ +]/ /' + } +} + +exit 0 |