Clarify our #if{n}def by commenting what they are at the #elif/#else/#endif
Ok that's an easy one!
The idea is to improve our comments in the .h/.c files where we have a #ifdef BLAH
and the corresponding #endif
is at least a non negligible amount of lines after. Of course that goes without saying to also comment the #ifndef
. Pattern would look like this:
#ifdef BLAH
[some non negligible amount of lines]
#elif /* BLAH */
[some other amount of lines]
#endif /* BLAH */
According to nickm, the current situation is:
Our headers have 27 #endifs with a comment, and 435 without.
Good example is or.h
:
#ifndef TOR_OR_H
[5000+ lines in between]
#endif /* TOR_OR_H */
This file src/or/shared_random.h
is a good example of what it could look like.