aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-11-12 12:09:53 -0500
committerNick Mathewson <nickm@torproject.org>2019-11-12 12:09:53 -0500
commitb0f9ecdbb138529fb9428121a62e8a5004767761 (patch)
tree946f3439b31216f5a0c80937d60275b713aa77ee
parentd1a1631a05521279041a9ed41383d886e5580250 (diff)
downloadtor-b0f9ecdbb138529fb9428121a62e8a5004767761.tar.gz
tor-b0f9ecdbb138529fb9428121a62e8a5004767761.zip
Move 01g-strings.md into doxygen.
-rw-r--r--src/lib/string/strings.dox (renamed from doc/HACKING/design/01g-strings.md)10
-rw-r--r--src/mainpage.dox2
2 files changed, 11 insertions, 1 deletions
diff --git a/doc/HACKING/design/01g-strings.md b/src/lib/string/strings.dox
index 145a35cd6f..71c9826800 100644
--- a/doc/HACKING/design/01g-strings.md
+++ b/src/lib/string/strings.dox
@@ -1,5 +1,6 @@
+/**
-## String processing in Tor ##
+@page strings String processing in Tor
Since you're reading about a C program, you probably expected this
section: it's full of functions for manipulating the (notoriously
@@ -77,6 +78,11 @@ full of substrings in order. Then you can concatenate them into a
single string with smartlist_join_strings(), which also takes optional
separator and terminator arguments.
+Alternatively, you might find it more convenient (and more
+allocation-efficient) to use the buffer API in buffers.c: Construct a buf_t
+object, add your data to it with buf_add_string(), buf_add_printf(), and so
+on, then call buf_extract() to get the resulting output.
+
As a convenience, we provide smartlist_add_asprintf(), which combines
the two methods above together. Many of the cryptographic digest
functions also accept a not-yet-concatenated smartlist of strings.
@@ -93,3 +99,5 @@ you can use hex_str(memory, length) for that.
The escaped() and hex_str() functions both provide outputs that are
only valid till they are next invoked; they are not threadsafe.
+
+*/
diff --git a/src/mainpage.dox b/src/mainpage.dox
index a568d52fc0..4f565cf6ec 100644
--- a/src/mainpage.dox
+++ b/src/mainpage.dox
@@ -36,6 +36,8 @@ Tor repository.
@subpage threading
+@subpage strings
+
**/
/**