On Thu, 27 Jul 2006 06:34:04 +0200 Roland Mainz wrote:
> Glenn Fowler wrote:
> > we also have the proto(1) command that may be able to produce the list
> I wish it would come with a manual page...
--man works when compiled against -last
you can see it online at
http://www.research.att.com/~gsf/man/man1/proto.html
the license comments at the top of each tgz source file are
generated by proto(1) at packaging time
this should do what you want:
---
cat > ast_prototypes <<'!'
{
print "#include <ast_map.h>"
sed \
-e $'/^[ \t]*extern[ \t]/!d' \
-e '/;/!d' \
-e 's/;.*/;/' \
-e '/__IMPORT__/d' \
-e $'s/^[ \t]*//' \
-e 's/__V_/void/g' \
-e 's/ __MANGLE__//' \
-e 's/ __PROTO__((\(.*\)));/(\1);/' \
-e 's/ _ARG_((\(.*\)));/(\1);/' "$@"
} |
cpp -I$INSTALLROOT/include/ast |
egrep -v $'^[ \t]*$|#'
!
chmod +x ast_prototypes
---
and then
cd $INSTALLROOT/include/ast
ast_prototypes *.h
-- Glenn Fowler -- AT&T Research, Florham Park NJ --