use binary mode for file access
authorThorsten Maerz <torte@netztorte.de>
Tue, 2 Jul 2002 21:37:37 +0000 (21:37 +0000)
committerThorsten Maerz <torte@netztorte.de>
Tue, 2 Jul 2002 21:37:37 +0000 (21:37 +0000)
ChangeLog.claws
configure.in
src/jpilot.c
src/msgcache.c
src/rfc2015.c

index 793c40c769b57d296c647bb25c2eeed2895c439c..fc8fdc1f2c78f09aee5857709f8a460fda731b7b 100644 (file)
@@ -1,3 +1,10 @@
+2002-07-02 [thorsten]  0.7.8claws44
+
+       * src/jpilot.c
+       * src/msgcache.c
+       * src/rfc2015.c
+               use binary mode for file access
+
 2002-07-02 [christoph] 0.7.8claws43
 
        * major code cleanup (part 1)
index eaf4d8e025a1c2cdae843b6094cdcb5cbd70d58d..69931ad443ab2041786ef48dfd79b9b14ba8e0a0 100644 (file)
@@ -9,7 +9,7 @@ MINOR_VERSION=7
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws43
+EXTRA_VERSION=claws44
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 52367193b276abe8df99e874eb31095dd54ad96d..398293cbb9e93dbd23be2ae437c53e77d03de4a9 100644 (file)
@@ -1620,7 +1620,7 @@ gchar *jpilot_find_pilotdb( void ) {
        strcat( str, JPILOT_DBHOME_FILE );
 
        /* Attempt to open */
-       if( ( fp = fopen( str, "r" ) ) != NULL ) {
+       if( ( fp = fopen( str, "rb" ) ) != NULL ) {
                fclose( fp );
        }
        else {
index 4f1c0aac24355f043c702366ad03e324c78f0ddf..2d4b696d46800773e61d0536e238e2137e7c7e03 100644 (file)
@@ -194,7 +194,7 @@ MsgCache *msgcache_read_cache(FolderItem *item, const gchar *cache_file)
        g_return_val_if_fail(cache_file != NULL, NULL);
        g_return_val_if_fail(item != NULL, NULL);
 
-       if ((fp = fopen(cache_file, "r")) == NULL) {
+       if ((fp = fopen(cache_file, "rb")) == NULL) {
                debug_print(_("\tNo cache file\n"));
                return NULL;
        }
@@ -269,7 +269,7 @@ void msgcache_read_mark(MsgCache *cache, const gchar *mark_file)
        gint ver;
        guint num;
 
-       if ((fp = fopen(mark_file, "r")) == NULL) {
+       if ((fp = fopen(mark_file, "rb")) == NULL) {
                debug_print(_("Mark file not found.\n"));
                return;
        } else if (fread(&ver, sizeof(ver), 1, fp) != 1 || MARK_VERSION != ver) {
@@ -369,7 +369,7 @@ gint msgcache_write(const gchar *cache_file, const gchar *mark_file, MsgCache *c
 
        debug_print(_("\tWriting message cache to %s and %s...\n"), cache_file, mark_file);
 
-       if ((fp = fopen(cache_file, "w")) == NULL) {
+       if ((fp = fopen(cache_file, "wb")) == NULL) {
                FILE_OP_ERROR(cache_file, "fopen");
                return -1;
        }
@@ -380,7 +380,7 @@ gint msgcache_write(const gchar *cache_file, const gchar *mark_file, MsgCache *c
        WRITE_CACHE_DATA_INT(ver, fp);  
        write_fps.cache_fp = fp;
 
-       if ((fp = fopen(mark_file, "w")) == NULL) {
+       if ((fp = fopen(mark_file, "wb")) == NULL) {
                FILE_OP_ERROR(mark_file, "fopen");
                fclose(write_fps.cache_fp);
                return -1;
index 6304da2fee9b0368c7c13ff70e5fc9b91cc98dd0..a550c0534e406a1077d70060d926171a77114d05 100644 (file)
@@ -486,7 +486,7 @@ gboolean rfc2015_msg_is_encrypted (gchar *file)
        MimeInfo *mimeinfo;
        int ret;
 
-       if ((fp = fopen(file, "r")) == NULL)
+       if ((fp = fopen(file, "rb")) == NULL)
                return FALSE;
 
        mimeinfo = procmime_scan_mime_header(fp);