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

Diff of /mailutils/mail/next.c

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

revision 1.9 by gray, Thu Aug 29 14:45:09 2002 UTC revision 1.10 by gray, Sat Dec 14 23:43:01 2002 UTC
# Line 25  Line 25 
25  int  int
26  mail_next (int argc, char **argv)  mail_next (int argc, char **argv)
27  {  {
28      size_t n;
29      message_t msg;
30    
31    if (argc < 2)    if (argc < 2)
32      {      {
33        if (cursor < total)        int rc = 1;
34          for (n = cursor + 1; n <= total; n++)
35          {          {
36            cursor++;            rc = util_get_message (mbox, n, &msg, MSG_NODELETED|MSG_SILENT);
37            realcursor++;            if (rc == 0)
38                break;
39            }
40    
41          if (rc)
42            {
43              util_error ("No applicable message");
44              return 1;
45          }          }
46      }      }
47    else    else
48      {      {
49        msgset_t *list = NULL;        msgset_t *list = NULL;
50        msgset_parse (argc, argv, &list);        msgset_parse (argc, argv, &list);
51        cursor = list->msg_part[0];        n = list->msg_part[0];
       realcursor = cursor;  
52        msgset_free (list);        msgset_free (list);
53          if (util_get_message (mbox, n, &msg, MSG_NODELETED|MSG_SILENT))
54            return 1;
55      }      }
56      cursor = realcursor = n;
57    util_do_command("print");    util_do_command("print");
58    return 0;    return 0;
59  }  }

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

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