diff options
author | Reuben Thomas <rrt@sc3d.org> | 2019-09-01 14:04:47 +0100 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2019-09-01 14:04:47 +0100 |
commit | f3b06198a2da9b850e355b15f84d9549b8c84d28 (patch) | |
tree | e55759a377670f02736f3aaf6bd65f8fdec621a5 /src | |
parent | 5a2d2be42bc69f238ad7eeb47508fd9a9f8b941e (diff) | |
download | enchant-f3b06198a2da9b850e355b15f84d9549b8c84d28.tar.gz |
src/pwl.c: treat PWL as text, not binary
Diffstat (limited to 'src')
-rw-r--r-- | src/pwl.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -207,7 +207,7 @@ EnchantPWL* enchant_pwl_init_with_file(const char * file) { g_return_val_if_fail (file != NULL, NULL); - FILE* fd = g_fopen(file, "a+b"); + FILE* fd = g_fopen(file, "a+"); if(fd == NULL) return NULL; fclose(fd); @@ -232,7 +232,7 @@ static void enchant_pwl_refresh_from_file(EnchantPWL* pwl) g_hash_table_destroy (pwl->words_in_trie); pwl->words_in_trie = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); - FILE *f = g_fopen(pwl->filename, "rb"); + FILE *f = g_fopen(pwl->filename, "r"); if (!f) return; @@ -321,7 +321,7 @@ void enchant_pwl_add(EnchantPWL *pwl, if (pwl->filename != NULL) { - FILE *f = g_fopen(pwl->filename, "a+b"); + FILE *f = g_fopen(pwl->filename, "a+"); if (f) { /* Since this function does not signal I/O |