diff options
| author | forsyth <forsyth@vitanuova.com> | 2009-07-01 00:00:22 +0100 |
|---|---|---|
| committer | forsyth <forsyth@vitanuova.com> | 2009-07-01 00:00:22 +0100 |
| commit | a3b744b4ba351c8c7bb51ccc13c60594e073b321 (patch) | |
| tree | b09ad0cd17bfac0f6abaf271f6468e203ebe5aa2 | |
| parent | 403b68d1b65b64b203a7ce3b3eb45066337fa22b (diff) | |
"20090630-2356"
| -rw-r--r-- | CHANGES | 2 | ||||
| -rwxr-xr-x | dis/sig | 32 | ||||
| -rw-r--r-- | include/version.h | 2 | ||||
| -rw-r--r-- | man/1/man | 15 |
4 files changed, 49 insertions, 2 deletions
@@ -1,3 +1,5 @@ +20090630 + add sig (see man(1)) [via p9p and caerwyn] 20090627 push changes described for arm in 20090330 (but not previously pushed) begin change of inferno-os.googlecode.com from svn to mercurial diff --git a/dis/sig b/dis/sig new file mode 100755 index 00000000..cacf7ab0 --- /dev/null +++ b/dis/sig @@ -0,0 +1,32 @@ +#!/dis/sh.dis +# Usage: sig key ... +# prints out function signatures by grepping the manual +# stolen from plan 9 via p9p and caerwyn +load std + +x=$* +*=`{echo $x | tr A-Z a-z | tr -dc 'a-z0-9_ \012'} # fold case, delete funny chars +if {no $*} { + echo Usage: sig function ... >[1=2] + exit 1 +} + +for i in $* { + files=`{grep -il '[ ]*'$i':[ ]*fn\(' /man/2/*} + for j in $files { + sect=`{basename $j}^'(2)' + {echo .nr LL 20i; sed -n '/^.SH SYNOPSIS/,/^.SH.*DESCR/p' $j} | +# os nroff -man | + sed ' + :a + /,$|:$/ { + N + s/\n// + } + ta + s/[ ]+/ /g' | + grep -i '[ ]*'$i':[ ]*fn\(' | sed 's/^[ ]+/ /; s/;$/; \# '$sect'/' + } +} + +exit 0 diff --git a/include/version.h b/include/version.h index 6c97b040..bb695905 100644 --- a/include/version.h +++ b/include/version.h @@ -1 +1 @@ -#define VERSION "Fourth Edition (20090627)" +#define VERSION "Fourth Edition (20090630)" @@ -1,6 +1,6 @@ .TH MAN 1 .SH NAME -man, wm/man, man2html, man2txt, lookman \- +man, wm/man, man2html, man2txt, lookman, sig \- print or find manual pages .SH SYNOPSIS .B man @@ -59,6 +59,9 @@ print or find manual pages .B -f ] .I keyword ... +.PP +.B sig +.I function ... .SH DESCRIPTION Both .I man @@ -182,6 +185,12 @@ The option causes .I lookman just to list the file names. +.PP +.I Sig +prints the type signature \- parameters and return types \- of +each +.I function +found in section 2 of this manual. .SH FILES .TF /man/1/INDEX .TP @@ -215,6 +224,10 @@ script .IR sh (1) script .br +.B /dis/sig +.IR sh (1) +script +.br .B /appl/lib/parseman.b .SH "SEE ALSO" .IR wm (1) |
