Noggin
Member
So I've inherited a project from another company which has one .c file and a few dozen .h files. All of the .h files are included in the .c file. All of the .h files contain significant amounts of code in them. The .c file has only an int main function.
I can't think of any defensible reason for writing about 10,000 lines of code in header files. Is there any reason to do that? The closest I can come to doing that is a #define macro... but I don't technically consider that "code" as it doesn't actually take up any flash or RAM as it sits in the header file. The last time I had code in a .h file was when I was in college and didn't know any better and even then it was only variable definitions.
If it matters, it was originally written with the CCS compiler.
I can't think of any defensible reason for writing about 10,000 lines of code in header files. Is there any reason to do that? The closest I can come to doing that is a #define macro... but I don't technically consider that "code" as it doesn't actually take up any flash or RAM as it sits in the header file. The last time I had code in a .h file was when I was in college and didn't know any better and even then it was only variable definitions.
If it matters, it was originally written with the CCS compiler.