summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRocco Rutte <pdmef@gmx.net>2008-05-21 20:36:33 +0200
committerRocco Rutte <pdmef@gmx.net>2008-05-21 20:36:33 +0200
commit515fd80d2927fcc7d5210c40282437e5096656e2 (patch)
tree67b1b8e3ce23d7b0b5b28537283201d314d83011
parent64f7f723f43c09c167985a75fa4d89a44b443c03 (diff)
Fix new mail detection for >2 GB mboxes with $check_mbox_size set
-rw-r--r--ChangeLog10
-rw-r--r--buffy.c14
-rw-r--r--buffy.h2
3 files changed, 18 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 76643501..f5d4fb9e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-05-21 19:23 +0200 Rocco Rutte <pdmef@gmx.net> (4a2a637ba8a3)
+
+ * mbox.c, sendlib.c: Use ftello() instead of ftell() in more places
+ that need it (fixes progress updates for >2 GB mbox files)
+
+2008-05-21 18:30 +0200 Rocco Rutte <pdmef@gmx.net> (927465b4aab2)
+
+ * ChangeLog, doc/manual.xml.head, init.h: Improve documentation for
+ handling multiple folders and new mail detection
+
2008-05-20 17:08 +0200 Paul Walker <paul@black-sun.demon.co.uk> (a4d423798321)
* parse.c: Fix more compiler warnings on amd64 by use of %p instead of
diff --git a/buffy.c b/buffy.c
index d0998ff2..41e69150 100644
--- a/buffy.c
+++ b/buffy.c
@@ -48,7 +48,7 @@ static short BuffyNotify = 0; /* # of unnotified new boxes */
/* Find the last message in the file.
* upon success return 0. If no message found - return -1 */
-int fseek_last_message (FILE * f)
+static int fseek_last_message (FILE * f)
{
LOFF_T pos;
char buffer[BUFSIZ + 9]; /* 7 for "\n\nFrom " */
@@ -94,7 +94,7 @@ int fseek_last_message (FILE * f)
}
/* Return 1 if the last message is new */
-int test_last_status_new (FILE * f)
+static int test_last_status_new (FILE * f)
{
HEADER *hdr;
ENVELOPE* tmp_envelope;
@@ -114,7 +114,7 @@ int test_last_status_new (FILE * f)
return result;
}
-int test_new_folder (const char *path)
+static int test_new_folder (const char *path)
{
FILE *f;
int rc = 0;
@@ -160,7 +160,7 @@ void mutt_update_mailbox (BUFFY * b)
return;
if (stat (b->path, &sb) == 0)
- b->size = (long) sb.st_size;
+ b->size = (off_t) sb.st_size;
else
b->size = 0;
return;
@@ -235,7 +235,7 @@ int mutt_parse_mailboxes (BUFFER *path, BUFFER *s, unsigned long data, BUFFER *e
stat ((*tmp)->path, &sb) == 0 && !test_new_folder ((*tmp)->path))
{
/* some systems out there don't have an off_t type */
- (*tmp)->size = (long) sb.st_size;
+ (*tmp)->size = (off_t) sb.st_size;
}
else
(*tmp)->size = 0;
@@ -358,7 +358,7 @@ int mutt_buffy_check (int force)
else if (option(OPTCHECKMBOXSIZE))
{
/* some other program has deleted mail from the folder */
- tmp->size = (long) sb.st_size;
+ tmp->size = (off_t) sb.st_size;
}
if (tmp->newly_created &&
(sb.st_ctime != sb.st_mtime || sb.st_ctime != sb.st_atime))
@@ -396,7 +396,7 @@ int mutt_buffy_check (int force)
}
}
else if (option(OPTCHECKMBOXSIZE) && Context && Context->path)
- tmp->size = (long) sb.st_size; /* update the size */
+ tmp->size = (off_t) sb.st_size; /* update the size of current folder */
if (!tmp->new)
tmp->notified = 0;
diff --git a/buffy.h b/buffy.h
index b86d1aa4..14f95172 100644
--- a/buffy.h
+++ b/buffy.h
@@ -23,7 +23,7 @@
typedef struct buffy_t
{
char *path;
- long size;
+ off_t size;
struct buffy_t *next;
short new; /* mailbox has new mail */
short notified; /* user has been notified */