home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Mail / qpopper-2.4-MIHS / pop_rset.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-11  |  1.0 KB  |  42 lines

  1. /*
  2.  * Copyright (c) 1989 Regents of the University of California.
  3.  * All rights reserved.  The Berkeley software License Agreement
  4.  * specifies the terms and conditions for redistribution.
  5.  */
  6.  
  7. /*
  8.  * Copyright (c) 1997 by Qualcomm Incorporated.
  9.  */
  10.  
  11. #include <config.h>
  12. #include <stdio.h>
  13. #include <sys/types.h>
  14. #include "popper.h"
  15.  
  16. /* 
  17.  *  rset:   Unflag all messages flagged for deletion in a POP maildrop
  18.  */
  19.  
  20. int pop_rset (p)
  21. POP     *   p;
  22. {
  23.     MsgInfoList     *   mp;         /*  Pointer to the message info list */
  24.     register int        i;
  25.  
  26.     /*  Unmark all the messages */
  27.     for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) {
  28.         mp->del_flag = FALSE; 
  29.         mp->retr_flag = mp->orig_retr_state; 
  30.     }
  31.     
  32.     /*  Reset the messages-deleted and bytes-deleted counters */
  33.     p->msgs_deleted = 0;
  34.     p->bytes_deleted = 0;
  35.     
  36.     /*  Reset the last-message-access flag */
  37.     p->last_msg = 0;
  38.  
  39.     return (pop_msg(p,POP_SUCCESS,"Maildrop has %u messages (%u octets)",
  40.         p->msg_count,p->drop_size));
  41. }
  42.