diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-02-02 20:06:43 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-02-02 20:06:43 +0000 |
commit | fefba953634ef35e2ec83716924c84a375e86ad6 (patch) | |
tree | 58f786243ef3553a70dedc8f34db668764071099 /src/common/util.h | |
parent | e521c96cb191ae746e06304b6bba49d925f63469 (diff) | |
download | tor-fefba953634ef35e2ec83716924c84a375e86ad6.tar.gz tor-fefba953634ef35e2ec83716924c84a375e86ad6.zip |
r11629@catbus: nickm | 2007-02-02 15:06:17 -0500
Removing the last DOCDOC comment hurt so much that I had to use Doxygen to identify undocumented macros and comments, and add 150 more DOCDOCs to point out where they were. Oops. Hey, kids! Fixing some of these could be your first Tor patch!
svn:r9477
Diffstat (limited to 'src/common/util.h')
-rw-r--r-- | src/common/util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/util.h b/src/common/util.h index b659e5f04e..868f4cde27 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -39,10 +39,13 @@ #error "Sorry; we don't support building with NDEBUG." #else #ifdef __GNUC__ +/** DOCDOC */ #define PREDICT_FALSE(x) PREDICT((x) == ((typeof(x)) 0), 0) #else #define PREDICT_FALSE(x) !(x) #endif + +/** DOCDOC */ #define tor_assert(expr) do { \ if (PREDICT_FALSE(expr)) { \ log(LOG_ERR, LD_BUG, "%s:%d: %s: Assertion %s failed; aborting.", \ @@ -106,6 +109,8 @@ extern int dmalloc_free(const char *file, const int line, void *pnt, #endif /* String manipulation */ + +/** DOCDOC */ #define HEX_CHARACTERS "0123456789ABCDEFabcdef" void tor_strlower(char *s) ATTR_NONNULL((1)); void tor_strupper(char *s) ATTR_NONNULL((1)); @@ -118,6 +123,7 @@ int strcmpend(const char *s1, const char *s2) ATTR_PURE ATTR_NONNULL((1,2)); int strcasecmpend(const char *s1, const char *s2) ATTR_PURE ATTR_NONNULL((1,2)); int tor_strstrip(char *s, const char *strip) ATTR_NONNULL((1,2)); +/** DOCDOC */ typedef enum { ALWAYS_TERMINATE, NEVER_TERMINATE, TERMINATE_IF_EVEN } part_finish_rule_t; @@ -163,9 +169,11 @@ int parse_iso_time(const char *buf, time_t *t); int write_all(int fd, const char *buf, size_t count, int isSocket); int read_all(int fd, char *buf, size_t count, int isSocket); +/** DOCDOC */ typedef enum { FN_ERROR, FN_NOENT, FN_FILE, FN_DIR} file_status_t; file_status_t file_status(const char *filename); +/** DOCDOC */ typedef enum { CPD_NONE, CPD_CREATE, CPD_CHECK } cpd_check_t; int check_private_dir(const char *dirname, cpd_check_t check); int write_str_to_file(const char *fname, const char *str, int bin); |