display how many messages were fetched from the server

This commit is contained in:
Michael Elkins 2000-12-31 22:37:36 +00:00
parent 521b68eb63
commit ab6decd8a9

4
sync.c
View File

@ -50,6 +50,7 @@ sync_mailbox (mailbox_t * mbox, imap_t * imap, int flags, unsigned int max_size)
char *p; char *p;
int fd; int fd;
int ret; int ret;
int fetched = 0;
if (mbox->uidvalidity > 0) if (mbox->uidvalidity > 0)
{ {
@ -172,6 +173,7 @@ sync_mailbox (mailbox_t * mbox, imap_t * imap, int flags, unsigned int max_size)
/* give some visual feedback that something is happening */ /* give some visual feedback that something is happening */
fputs (".", stdout); fputs (".", stdout);
fflush (stdout); fflush (stdout);
fetched++;
ret = imap_fetch_message (imap, cur->uid, fd); ret = imap_fetch_message (imap, cur->uid, fd);
@ -195,7 +197,7 @@ sync_mailbox (mailbox_t * mbox, imap_t * imap, int flags, unsigned int max_size)
unlink (path); unlink (path);
} }
} }
puts (""); printf (" %d messages\n", fetched);
return 0; return 0;
} }