diff options
author | Steve Chamberlain <steve@cygnus> | 1991-08-22 19:56:14 +0000 |
---|---|---|
committer | Steve Chamberlain <steve@cygnus> | 1991-08-22 19:56:14 +0000 |
commit | 80d29884b8b36ca12dcae2bd744d74ba7c749e42 (patch) | |
tree | 50d1eb2b5b6d0cd0fb7e2861dc8c00d255801733 /bfd/doc/unPROTO | |
parent | d51d16c8e6bc078ac493ea6853093724163f169f (diff) | |
download | gdb-80d29884b8b36ca12dcae2bd744d74ba7c749e42.zip gdb-80d29884b8b36ca12dcae2bd744d74ba7c749e42.tar.gz gdb-80d29884b8b36ca12dcae2bd744d74ba7c749e42.tar.bz2 |
Initial revision
Diffstat (limited to 'bfd/doc/unPROTO')
-rwxr-xr-x | bfd/doc/unPROTO | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bfd/doc/unPROTO b/bfd/doc/unPROTO new file mode 100755 index 0000000..a6f9520 --- /dev/null +++ b/bfd/doc/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;/ + |