Initial revision

This commit is contained in:
Roland Pesch 1991-08-22 00:13:19 +00:00
parent 1ac2d1f2ad
commit ab6db9b498
1 changed files with 18 additions and 0 deletions

18
bfd/unPROTO Executable file
View File

@ -0,0 +1,18 @@
#
# The PROTO macro is a subterfuge to be compatible with both ANSI and K&R
# declaration syntax. It's not widely known, so for the docn just map the
# thing to ANSI declaration syntax.
#
# First, join up defns broken across multiple lines in source---but leave
# any linebreaks, to prettify our examples
:pbegn
/PROTO(.*, *$/N
s/\n/?/
t pbegn
s/?/\
/g
# Now actually do the PROTO interpretation.
# A PROTO invocation looks like
# PROTO( resulttype, function, (arglist));
s/[ ]*PROTO(\(.*\),[\n ]*\(.*\),[\n ]*\((.*)\));/\1 \2\3;/