both cyntax(1) and cin(1) do this but i don't know where you can find them.
i think they are in 9&10 edition.
brucee
On Mon, Jun 9, 2008 at 7:02 PM, Steve Simon <[EMAIL PROTECTED]> wrote:
>> From what I remember, tendra does something like what you want. It's
>> been a while since I looked at
> From what I remember, tendra does something like what you want. It's
> been a while since I looked at it, though.
FWIW there was a port of tendra to plan9 in progress though I don't
know its status now, though it looks like a hugue task.
-Steve
If you are conforming to style(6), awk can generate stub functions
quite easily.
# turns lines of the form
# valid type name
# name ( argument-list )
# into
# valid type name
# stub_ ## name
>From what I remember, tendra does something like what you want. It's
been a while since I looked at it, though.
> Anyone know of some nice simple code to parse C prototype definitions
> and split them into nicely awk'able bits so I can generate stub functions:
>
> I have been playing with mkpty
there are even worse cases.
typedef'd function types, for
example.
the compiler knows this stuff.
why not let the compiler emit
stubs?
acid support requires only 3
hooks in cc/dcl.c and a few in
cc/lex.c cc/acid.c is only 300
lines.
- erik
Anyone know of some nice simple code to parse C prototype definitions
and split them into nicely awk'able bits so I can generate stub functions:
I have been playing with mkptypes | awk which works well
for simple stuff, say my source contains:
void
func(int a, char *b)
and I wan