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

Diff of /mailutils/mail/size.c

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

revision 1.10 by polak, Mon Dec 23 22:01:34 2002 UTC revision 1.11 by gray, Sun Dec 29 13:37:43 2002 UTC
# Line 21  Line 21 
21   * si[ze] [msglist]   * si[ze] [msglist]
22   */   */
23    
24    static int
25    size0 (msgset_t *mspec, message_t msg, void *data)
26    {
27      size_t size = 0, lines = 0;
28    
29      message_size (msg, &size);
30      message_lines (msg, &lines);
31      
32      fprintf (ofile, "%c%2d %3d/%-5d\n",
33               mspec->msg_part[0] == cursor ? '>' : ' ',
34               mspec->msg_part[0], lines, size);
35      return 0;
36    }
37    
38  int  int
39  mail_size (int argc, char **argv)  mail_size (int argc, char **argv)
40  {  {
41    if (argc > 1)    return util_foreach_msg (argc, argv, MSG_ALL, size0, NULL);
42      util_msglist_command (mail_size, argc, argv, 0);  }
   else  
     {  
       size_t size = 0, lines = 0;  
       message_t msg;  
   
       if (util_get_message (mbox, cursor, &msg, MSG_ALL))  
         return 1;  
43    
       message_size (msg, &size);  
       message_lines (msg, &lines);  
44    
       fprintf (ofile, "%c%2d %3d/%-5d\n", cursor == realcursor ? '>' : ' ',  
                cursor, lines, size);  
       return 0;  
     }  
   return 1;  
 }  

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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