For a low level view, as how the code actually should look like, I found the JPL C coding guidelines very useful. It had an effect on me on how I wrote C after reading it.
> 23. Place #else, #elif, and #endif in the same file as the matching #if or #ifdef.
Oh my. I bet that one has an interesting history! That thought has never even crossed my mind, and I did some fun stuff like include a header twice with different definitions to get a C++ mixin.
Here's a github hosted version https://github.com/stanislaw/awesome-safety-critical/blob/ma...