I'm somewhere on the learning curve when it comes to regular expressions, and I need to use them to automatically modify function prototypes in a bunch of C headers. Does anyone know of a decent regular expression to find any and all function prototypes in a C header, while excluding everything else?
Edit: Three things that weren't clear initially:
- I do not care about C++, only straight C. This means no templates, etc. to worry about.
- The solution must work with typedefs and structs, no limiting to only basic C types.
- This is kind of a one-off thing. It does not need to be pretty. I do not care how much of a kludge it is as long as it works, but I don't want a complex, hard to implement solution.