cdecl> explain void (*signal(int, void (*)(int)))(int) ;
declare signal as function (int, pointer to function (int) returning void) returning pointer to function (int) returning void
there is a cdecl package in all linux distributions, which can be used inside terminal to expand such C declrations. It was really helpful when I started C programming.
Cool, but it doesn't handle the last example:
...claims there's a syntax error, and there might be, but I don't know off-hand.
It's confused by the parameter name fp.
This works:
It says "C gibberish ↔ English", but does it really support English to C?
Yes, for some definition of "English": http://cdecl.ridiculousfish.com/?q=declare+bar+as+volatile+p...
cdecl is a great resource, though I do wish that it knew about the restrict keyword.
It misspells it "noalias".
there is a cdecl package in all linux distributions, which can be used inside terminal to expand such C declrations. It was really helpful when I started C programming.
Unfortunately the license is not clearly free. This was why we had to drop it from Fedora.
I have tried to contact the original authors, and have got clarifications from all of them except Graham Ross.
So if anyone here knows how to get hold of him, please let me know! (rjones at redhat dot com)