[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #20168 [Core Tor/Tor]: Clarify our #if{n}def by commenting what they are at the #elif/#else/#endif
#20168: Clarify our #if{n}def by commenting what they are at the #elif/#else/#endif
------------------------------+--------------------------
Reporter: dgoulet | Owner:
Type: enhancement | Status: new
Priority: Very Low | Milestone: Tor: 0.2.???
Component: Core Tor/Tor | Version:
Severity: Trivial | Keywords: easy, lorax
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
------------------------------+--------------------------
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.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20168>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs