/[mailutils]/mailutils/mailbox/mailbox.c
ViewVC logotype

Diff of /mailutils/mailbox/mailbox.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.55 by sroberts, Mon Mar 25 03:46:11 2002 UTC revision 1.56 by gray, Sun Aug 4 08:22:00 2002 UTC
# Line 199  mailbox_close (mailbox_t mbox) Line 199  mailbox_close (mailbox_t mbox)
199  {  {
200    if (mbox == NULL || mbox->_close == NULL)    if (mbox == NULL || mbox->_close == NULL)
201      return MU_ERR_EMPTY_VFN;      return MU_ERR_EMPTY_VFN;
202    
203    return mbox->_close (mbox);    return mbox->_close (mbox);
204  }  }
205    
206    int
207    mailbox_flush (mailbox_t mbox, int expunge)
208    {
209      size_t i, total = 0;
210      int status = 0;
211      
212      mailbox_messages_count (mbox, &total);
213      for (i = 1; i <= total; i++)
214        {
215          message_t msg = NULL;
216          attribute_t attr = NULL;
217          mailbox_get_message (mbox, i, &msg);
218          message_get_attribute (msg, &attr);
219          attribute_set_seen (attr);
220        }
221      if (expunge)
222        status = mailbox_expunge (mbox);
223      else
224        status = mailbox_save_attributes (mbox);
225      return status;
226    }
227    
228  /* messages */  /* messages */
229  int  int
230  mailbox_append_message (mailbox_t mbox, message_t msg)  mailbox_append_message (mailbox_t mbox, message_t msg)

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26