aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Ransom <rransom.8774@gmail.com>2011-05-12 02:57:09 -0700
committerRobert Ransom <rransom.8774@gmail.com>2011-05-12 02:57:09 -0700
commitc714a098ea96fcd452a223ce7bbc6bfa2a6f0d02 (patch)
treeb271cb7f2412c0514d9c8ed644736acab6cd5580 /src
parentcb9df5e53c169efc0ec1ccbfeea4c8d2878b1a39 (diff)
downloadtor-c714a098ea96fcd452a223ce7bbc6bfa2a6f0d02.tar
tor-c714a098ea96fcd452a223ce7bbc6bfa2a6f0d02.tar.gz
Improve a documentation comment
Diffstat (limited to 'src')
-rw-r--r--src/common/util.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 38c0ad05e..014b3349a 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -769,13 +769,17 @@ tor_digest256_is_zero(const char *digest)
if (next) *next = endptr; \
return 0
-/** Extract a long from the start of s, in the given numeric base. If
- * there is unconverted data and next is provided, set *next to the
- * first unconverted character. An error has occurred if no characters
- * are converted; or if there are unconverted characters and next is NULL; or
- * if the parsed value is not between min and max. When no error occurs,
- * return the parsed value and set *ok (if provided) to 1. When an error
- * occurs, return 0 and set *ok (if provided) to 0.
+/** Extract a long from the start of <b>s</b>, in the given numeric
+ * <b>base</b>. If <b>base</b> is 0, <b>s</b> is parsed as a decimal,
+ * octal, or hex number in the syntax of a C integer literal. If
+ * there is unconverted data and <b>next</b> is provided, set
+ * *<b>next</b> to the first unconverted character. An error has
+ * occurred if no characters are converted; or if there are
+ * unconverted characters and <b>next</b> is NULL; or if the parsed
+ * value is not between <b>min</b> and <b>max</b>. When no error
+ * occurs, return the parsed value and set *<b>ok</b> (if provided) to
+ * 1. When an error occurs, return 0 and set *<b>ok</b> (if provided)
+ * to 0.
*/
long
tor_parse_long(const char *s, int base, long min, long max,