diff options
author | Roger Dingledine <arma@torproject.org> | 2006-07-04 03:33:17 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-07-04 03:33:17 +0000 |
commit | 9e861cfe5224fc65c155ef1244a776b832b81320 (patch) | |
tree | 978a6a17e1dd6b911707cfe281815e629d934b4c /doc/HACKING | |
parent | 05d0b705734b43d1986be2b999de904676f854c0 (diff) | |
download | tor-9e861cfe5224fc65c155ef1244a776b832b81320.tar tor-9e861cfe5224fc65c155ef1244a776b832b81320.tar.gz |
touch up the TODO and HACKING files
svn:r6713
Diffstat (limited to 'doc/HACKING')
-rw-r--r-- | doc/HACKING | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/doc/HACKING b/doc/HACKING index 23253cb34..81424a26b 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -6,12 +6,14 @@ Use tor_malloc, tor_free, tor_snprintf, tor_strdup, and tor_gettimeofday instead of their generic equivalents. (They always succeed or exit.) - Use INLINE instead of 'inline', so that we work properly on windows. + You can get a full list of the compatibility functions that Tor provides + by looking through src/common/util.h and src/common/compat.h. + + Use 'INLINE' instead of 'inline', so that we work properly on Windows. 1.2. Calling and naming conventions - Whenever possible, functions should return -1 on error and and 0 on - success. + Whenever possible, functions should return -1 on error and 0 on success. For multi-word identifiers, use lowercase words combined with underscores. (e.g., "multi_word_identifier"). Use ALL_CAPS for macros and @@ -52,7 +54,7 @@ you need to (or can) do about it. DEBUG is for everything louder than INFO. - [XXX Proposed convention: every messages of severity INFO or higher should + [XXX Proposed convention: every message of severity INFO or higher should either (A) be intelligible to end-users who don't know the Tor source; or (B) somehow inform the end-users that they aren't expected to understand the message (perhaps with a string like "internal error"). Option (A) is @@ -60,8 +62,8 @@ 1.5. Doxygen - We use the 'doxygen' utility to generate documentation from our source code. - Here's how to use it: + We use the 'doxygen' utility to generate documentation from our + source code. Here's how to use it: 1. Begin every file that should be documented with /** @@ -98,16 +100,17 @@ struct foo { /** You can put the comment before an element; */ int a; - int b; /**< Or use the less-than symbol to put the comment after the element. */ + int b; /**< Or use the less-than symbol to put the comment + * after the element. */ }; 5. To generate documentation from the Tor source code, type: $ doxygen -g - To generate a file called 'Doxyfile'. Edit that file and run 'doxygen' to - generate the API documentation. + To generate a file called 'Doxyfile'. Edit that file and run + 'doxygen' to generate the API documentation. - 6. See the Doxygen manual for more information; this summary just scratches - the surface. + 6. See the Doxygen manual for more information; this summary just + scratches the surface. |