From: Roland Pesch Date: Thu, 22 Aug 1991 00:13:19 +0000 (+0000) Subject: Initial revision X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ab6db9b498f8beb963156344f28babff6cfcd534;p=binutils-gdb.git Initial revision --- diff --git a/bfd/unPROTO b/bfd/unPROTO new file mode 100755 index 00000000000..a6f95207dba --- /dev/null +++ b/bfd/unPROTO @@ -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;/ +