summaryrefslogtreecommitdiff
path: root/src/common/util.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-12-15 21:26:23 +0000
committerNick Mathewson <nickm@torproject.org>2006-12-15 21:26:23 +0000
commit078aab810b7410086685d648b4d3328b140ddea5 (patch)
treed2f60647cad33c30c2c1adc1b97558a9bbde4c6a /src/common/util.h
parentab2fc7bd62f2a91dfe003f2a99b7cf223762fec8 (diff)
downloadtor-078aab810b7410086685d648b4d3328b140ddea5.tar.gz
tor-078aab810b7410086685d648b4d3328b140ddea5.zip
r11597@Kushana: nickm | 2006-12-15 15:49:27 -0500
Add a rudimentary line-wrapping function for use in dumping comments in config files. svn:r9132
Diffstat (limited to 'src/common/util.h')
-rw-r--r--src/common/util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/util.h b/src/common/util.h
index 13d51b4413..54a2552da5 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -138,6 +138,9 @@ int tor_mem_is_zero(const char *mem, size_t len) ATTR_PURE;
int tor_digest_is_zero(const char *digest) ATTR_PURE;
char *esc_for_log(const char *string) ATTR_MALLOC;
const char *escaped(const char *string);
+struct smartlist_t;
+void wrap_string(struct smartlist_t *out, const char *string, size_t width,
+ const char *prefix0, const char *prefixRest);
void base16_encode(char *dest, size_t destlen, const char *src, size_t srclen);
int base16_decode(char *dest, size_t destlen, const char *src, size_t srclen);
@@ -174,7 +177,6 @@ typedef struct sized_chunk_t {
const char *bytes;
size_t len;
} sized_chunk_t;
-struct smartlist_t;
int write_chunks_to_file(const char *fname, const struct smartlist_t *chunks,
int bin);
int append_bytes_to_file(const char *fname, const char *str, size_t len,