-/* Return 1 if the last message is new */
-static int test_last_status_new (FILE * f)
-{
- HEADER *hdr;
- ENVELOPE *tmp_envelope;
- int result = 0;
-
- if (fseek_last_message (f) == -1)
- return (0);
-
- hdr = mutt_new_header ();
- tmp_envelope = mutt_read_rfc822_header (f, hdr, 0, 0);
- if (!(hdr->read || hdr->old))
- result = 1;
-
- mutt_free_envelope (&tmp_envelope);
- mutt_free_header (&hdr);
-
- return result;
-}
-
-static int test_new_folder (const char *path)
-{
- FILE *f;
- int rc = 0;
- int typ;
-
- typ = mx_get_magic (path);
-
- if (typ != M_MBOX && typ != M_MMDF)
- return 0;
-
- if ((f = fopen (path, "rb"))) {
- rc = test_last_status_new (f);
- fclose (f);
- }
-
- return rc;
-}
-
-BUFFY *buffy_find_mailbox (const char *path)
-{
- struct stat sb;
- struct stat tmp_sb;
- int i = 0;
-
- if (stat (path, &sb) != 0)
- return NULL;
-
- if (!list_empty(Incoming)) {
- for (i = 0; i < Incoming->length; i++) {
- if (stat (Incoming->data[i], &tmp_sb) == 0 &&
- sb.st_dev == tmp_sb.st_dev && sb.st_ino == tmp_sb.st_ino)
- return ((BUFFY*) Incoming->data[i]);
- }
- }
- return (NULL);
-}
-
-void buffy_update_mailbox (BUFFY * b)
-{
- struct stat sb;
-
- if (!b)
- return;
-
- if (stat (b->path, &sb) == 0)
- b->size = (long) sb.st_size;
- else
- b->size = 0;
- return;
-}
-#endif
-
-/* func to free buffy for list_del() */
-static void buffy_free (void** p) {
- FREE(&(*((BUFFY**) p))->path);
- FREE(p);
-}