--- a/src/log.c Sat Nov 08 05:52:39 2003 +0000 +++ b/src/log.c Sat Nov 08 08:21:48 2003 +0000 @@ -615,7 +615,7 @@ GaimLog *log = NULL; GList *list = NULL; - if (!(file = fopen(path, "r"))) { + if (!(file = fopen(path, "rb"))) { g_free(path); return NULL; } @@ -648,6 +648,9 @@ strlen("---- New Conversation @ ") + strlen("----"); } + if(strchr(buf, '\r')) + data->length--; + if (data->length != 0) list = g_list_append(list, log); else @@ -682,7 +685,7 @@ char * old_logger_read (GaimLog *log, GaimLogReadFlags *flags) { struct old_logger_data *data = log->logger_data; - FILE *file = fopen(data->path, "r"); + FILE *file = fopen(data->path, "rb"); char *read = g_malloc(data->length + 1); fseek(file, data->offset, SEEK_SET); fread(read, data->length, 1, file); @@ -690,6 +693,7 @@ *flags = 0; if(strstr(read, "<BR>")) *flags |= GAIM_LOG_READ_NO_NEWLINE; + gaim_str_strip_linefeed(read); return read; }