Feeling nostalgic, I'm going through a very old, buggy, junky codebase from years ago and cleaning it up.
One thing I'd like to do is identify stuff that isn't used anymore. Functions, macros, whole files, etc. Currently, I'm using a lot of fragile command line fu and regex, but I'm wondering if there is another (better) way to do generic code clean up.
Also, I remember seeing something in RaM that went through all the code and formatted it against a template or something like that. Anyone remember what that utility is called?
theres the standard indent function and i think you can download astyle which allows you to format your code nicely
06 Nov, 2009, David Haley wrote in the 3rd comment:
Votes: 0
You can look for code coverage analysis, or call graphs. Drawing a call graph will show you which functions are never called in any execution, and coverage analysis can show you which code is not called at runtime.
One thing I'd like to do is identify stuff that isn't used anymore. Functions, macros, whole files, etc. Currently, I'm using a lot of fragile command line fu and regex, but I'm wondering if there is another (better) way to do generic code clean up.
Splint has been very useful to me for static analysis of C code.
One thing I'd like to do is identify stuff that isn't used anymore. Functions, macros, whole files, etc. Currently, I'm using a lot of fragile command line fu and regex, but I'm wondering if there is another (better) way to do generic code clean up.
Also, I remember seeing something in RaM that went through all the code and formatted it against a template or something like that. Anyone remember what that utility is called?