/[mailutils]/mailutils/mail/undelete.c
ViewVC logotype

Diff of /mailutils/mail/undelete.c

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

revision 1.8 by polak, Mon Dec 23 22:01:34 2002 UTC revision 1.9 by gray, Sun Dec 29 13:37:43 2002 UTC
# Line 21  Line 21 
21   * u[ndelete] [msglist]   * u[ndelete] [msglist]
22   */   */
23    
24    static int
25    undelete0 (msgset_t *mspec, message_t msg, void *data)
26    {
27      attribute_t attr;
28    
29      message_get_attribute (msg, &attr);
30      attribute_unset_deleted (attr);
31      return 0;
32    }
33    
34  int  int
35  mail_undelete (int argc, char **argv)  mail_undelete (int argc, char **argv)
36  {  {
37    if (argc > 1)    return util_foreach_msg (argc, argv, MSG_ALL, undelete0, NULL);
     return util_msglist_command (mail_undelete, argc, argv, 1);  
   else  
     {  
       message_t msg;  
       attribute_t attr;  
       if (util_get_message (mbox, cursor, &msg, MSG_ALL))  
         return 1;  
   
       message_get_attribute (msg, &attr);  
       if (attribute_is_deleted (attr))  
         attribute_unset_deleted (attr);  
       return 0;  
     }  
   return 1;  
38  }  }
39    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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