z8kgen: temp file to generate z8k-opc.h from
[external/binutils.git] / bfd / unPROTO
1 #
2 # The PROTO macro is a subterfuge to be compatible with both ANSI and K&R 
3 # declaration syntax.  It's not widely known, so for the docn just map the 
4 # thing to ANSI declaration syntax.
5
6 # First, join up defns broken across multiple lines in source---but leave
7 # any linebreaks, to prettify our examples 
8 :pbegn
9 /PROTO(.*, *$/N
10 s/\n/?/
11 t pbegn
12 s/?/\
13 /g
14 # Now actually do the PROTO interpretation.
15 # A PROTO invocation looks like
16 #   PROTO( resulttype, function, (arglist));
17 s/[     ]*PROTO(\(.*\),[\n      ]*\(.*\),[\n    ]*\((.*)\));/\1 \2\3;/
18