1#!/bin/sh
2#
3# c2mdoc -- Front-end which abuses the cproto parser to spit out
4#           mdoc(7) format prototypes for use in FreeBSD documentation.
5
6AWKSCRIPT="/usr/local/libexec/c2mdoc.awk"
7CPROTO='-P"int\tf\t(\ta\t,\tb\t)" -pq -f3'
8CPROTO_BIN=cproto
9export CPROTO
10
11${CPROTO_BIN} $1 | \
12	grep -v '/\*.*\*/' | \
13	sed -e 's/[,();]//g' | \
14	${AWKSCRIPT}
15