diff options
author | Roland Pesch <pesch@cygnus> | 1991-08-22 00:13:19 +0000 |
---|---|---|
committer | Roland Pesch <pesch@cygnus> | 1991-08-22 00:13:19 +0000 |
commit | ab6db9b498f8beb963156344f28babff6cfcd534 (patch) | |
tree | 92fe2aea4e24f41628183af3791ded8c5466c1d4 /bfd/unPROTO | |
parent | 1ac2d1f2ad811dbff27f47388da589b4763a8f02 (diff) | |
download | gdb-ab6db9b498f8beb963156344f28babff6cfcd534.zip gdb-ab6db9b498f8beb963156344f28babff6cfcd534.tar.gz gdb-ab6db9b498f8beb963156344f28babff6cfcd534.tar.bz2 |
Initial revision
Diffstat (limited to 'bfd/unPROTO')
-rwxr-xr-x | bfd/unPROTO | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bfd/unPROTO b/bfd/unPROTO new file mode 100755 index 0000000..a6f9520 --- /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;/ + |