aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-09-08 07:16:34 +0000
committerNick Mathewson <nickm@torproject.org>2004-09-08 07:16:34 +0000
commit0ef85f6dbad170d7757b60c782d2b0df87eafb9d (patch)
tree548aaf844bde663bbad40ff7cda1350454496a7d /src/common/util.h
parentc66e4c48704b8be1425c2b6253542beed49ce0eb (diff)
downloadtor-0ef85f6dbad170d7757b60c782d2b0df87eafb9d.tar.gz
tor-0ef85f6dbad170d7757b60c782d2b0df87eafb9d.zip
Some platforms have weird translations when you open files in "test" mode; make read/write_str_to_file aware.
svn:r2336
Diffstat (limited to 'src/common/util.h')
-rw-r--r--src/common/util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/util.h b/src/common/util.h
index e96b16129d..9c68fba977 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -219,8 +219,8 @@ typedef enum { FN_ERROR, FN_NOENT, FN_FILE, FN_DIR} file_status_t;
file_status_t file_status(const char *filename);
int check_private_dir(const char *dirname, int create);
-int write_str_to_file(const char *fname, const char *str);
-char *read_file_to_str(const char *filename);
+int write_str_to_file(const char *fname, const char *str, int bin);
+char *read_file_to_str(const char *filename, int bin);
int parse_line_from_file(char *line, int maxlen, FILE *f, char **key_out, char **value_out);
char *expand_filename(const char *filename);
int replace_file(const char *from, const char *to);