Depending on how well behaved your source files are, you may be able to teach h2xs to do it. Short of that, I think you need a C parser or a brilliant heuristic that acts like one.
-Paul
Comment on Re: pattern matching c-style function definitions :o(