diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-23 01:19:04 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-23 01:19:04 -0400 |
commit | b80a8bba199b9adfb9c893641ba770566fa548e1 (patch) | |
tree | 2fba8dea9940d46863834f139ed350f7c0eaeffb /src/common/util.c | |
parent | 1ba1bdee4bd8f3c00e603fe9b0fd2f14eeb60466 (diff) | |
parent | 1e69c60dccc358a7146c2b5e7825ea729498b41b (diff) | |
download | tor-b80a8bba199b9adfb9c893641ba770566fa548e1.tar.gz tor-b80a8bba199b9adfb9c893641ba770566fa548e1.zip |
Merge branch 'feature3049-v2' into maint-0.2.2
Conflicts:
src/common/Makefile.am
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/common/util.c b/src/common/util.c index 7ffe0a98cb..0f871c4aae 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -775,13 +775,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, |