diff options
author | Bruce M Simpson <bms@FreeBSD.org> | 2004-03-02 09:05:14 +0000 |
---|---|---|
committer | Bruce M Simpson <bms@FreeBSD.org> | 2004-03-02 09:05:14 +0000 |
commit | ba73e138817ba9e3aaa437473051b862bee99200 (patch) | |
tree | 321d0b5e87579f906650969c249ca5faa9fcec15 /devel/c2mdoc/files/c2mdoc.awk | |
parent | - Fix segfaults (diff) |
c2mdoc is an awk/shell script wot I wrote to aid in documenting our many
wonderful kernel APIs. c2man seems to choke on tcp_subr.c (which I was using
as a baseline), so let's do it the long way round instead. This script spits
out mdoc(7) markup ready for pasting into the SYNOPSIS section of our
wonderful mdoc.template.
Notes
Notes:
svn path=/head/; revision=102705
Diffstat (limited to 'devel/c2mdoc/files/c2mdoc.awk')
-rw-r--r-- | devel/c2mdoc/files/c2mdoc.awk | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/devel/c2mdoc/files/c2mdoc.awk b/devel/c2mdoc/files/c2mdoc.awk new file mode 100644 index 000000000000..5bf92fecbc11 --- /dev/null +++ b/devel/c2mdoc/files/c2mdoc.awk @@ -0,0 +1,13 @@ +#!/usr/bin/awk -f +# +# c2mdoc.awk -- Takes tabulated output from cproto(1) and turns it into +# mdoc(7) markup. +# +BEGIN { FS="\t" } +{ + printf ".Fa %s\n", $1 ; + printf ".Fn %s", $2 ; + for (i = 4; i < NF; i++) + printf " \"%s\"", $i + printf "\n" ; +} |