summaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-05-01 21:41:23 +0000
committerNick Mathewson <nickm@torproject.org>2004-05-01 21:41:23 +0000
commit9a041591acd578759041cdb2f142420eb3e5d00f (patch)
treee655dbcc1f325ac0953e5b23bf172c9fb85bce19 /src/common/util.c
parent6fa2ded74c632ea6f408ffbcac49f4e921d9b802 (diff)
downloadtor-9a041591acd578759041cdb2f142420eb3e5d00f.tar.gz
tor-9a041591acd578759041cdb2f142420eb3e5d00f.zip
Finish documenting the functions in common
svn:r1758
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 7fd01edadb..0270937985 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -724,7 +724,8 @@ void strmap_free(strmap_t *map, void (*free_val)(void*))
*/
/* Return a pointer to the first char of s that is not whitespace and
- * not a comment. */
+ * not a comment, or to the terminating NUL if no such character exists.
+ */
const char *eat_whitespace(const char *s) {
tor_assert(s);
@@ -741,14 +742,17 @@ const char *eat_whitespace(const char *s) {
return s;
}
-/* Return a pointer to the first char of s that is not a space or a tab. */
+/* Return a pointer to the first char of s that is not a space or a tab,
+ * or to the terminating NUL if no such character exists. */
const char *eat_whitespace_no_nl(const char *s) {
while(*s == ' ' || *s == '\t')
++s;
return s;
}
-/* Return a pointer to the first char of s that is whitespace or '#' or '\0 */
+/* Return a pointer to the first char of s that is whitespace or '#',
+ * or to the terminating NUL if no such character exists. */
+ */
const char *find_whitespace(const char *s) {
tor_assert(s);