summaryrefslogtreecommitdiff
path: root/src/lib/encoding/confline.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-02-26 10:10:27 -0500
committerNick Mathewson <nickm@torproject.org>2020-03-05 10:13:50 -0500
commit9dc946ba67a5d457ce00bf2853f624c3c7c344aa (patch)
tree9eb8b13ccf0d6a77505f783add1dc2e03a76dd5f /src/lib/encoding/confline.h
parentba8d71d9c37dcce213a0386e96731de5ba7d80fa (diff)
downloadtor-9dc946ba67a5d457ce00bf2853f624c3c7c344aa.tar.gz
tor-9dc946ba67a5d457ce00bf2853f624c3c7c344aa.zip
Add a config_lines_partition() function to help with LINELIST_V.
This function works a little bit like strsep(), to get a chunk of configuration lines with a given header. We can use this to make hidden service config easier to parse.
Diffstat (limited to 'src/lib/encoding/confline.h')
-rw-r--r--src/lib/encoding/confline.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/encoding/confline.h b/src/lib/encoding/confline.h
index cd343e0e99..ce0d6c6e17 100644
--- a/src/lib/encoding/confline.h
+++ b/src/lib/encoding/confline.h
@@ -50,6 +50,7 @@ const config_line_t *config_line_find(const config_line_t *lines,
const char *key);
const config_line_t *config_line_find_case(const config_line_t *lines,
const char *key);
+config_line_t *config_lines_partition(config_line_t *inp, const char *header);
int config_lines_eq(const config_line_t *a, const config_line_t *b);
int config_count_key(const config_line_t *a, const char *key);
void config_free_lines_(config_line_t *front);