diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-09-08 07:16:34 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-09-08 07:16:34 +0000 |
commit | 0ef85f6dbad170d7757b60c782d2b0df87eafb9d (patch) | |
tree | 548aaf844bde663bbad40ff7cda1350454496a7d /src/common/util.h | |
parent | c66e4c48704b8be1425c2b6253542beed49ce0eb (diff) | |
download | tor-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.h | 4 |
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); |