Commit 61594c3a 61594c3a1709805838d3a6f9c15ce58f7d177810 by Sergey Poznyakoff

Allow a single argument as an extension to the

standard '=' command. The effect is to move the current
pointer to the given message.
1 parent aad76f4b
Showing 1 changed file with 25 additions and 1 deletions
...@@ -24,7 +24,31 @@ ...@@ -24,7 +24,31 @@
24 int 24 int
25 mail_eq (int argc, char **argv) 25 mail_eq (int argc, char **argv)
26 { 26 {
27 (void)argc; (void)argv; 27 msgset_t *list = NULL;
28
29 switch (argc)
30 {
31 case 1:
32 fprintf (ofile, "%d\n", realcursor);
33 break;
34
35 case 2:
36 if (msgset_parse (argc, argv, &list) == 0)
37 {
38 if (list->msg_part[0] <= total)
39 {
40 realcursor = cursor = list->msg_part[0];
28 fprintf (ofile, "%d\n", realcursor); 41 fprintf (ofile, "%d\n", realcursor);
42 }
43 else
44 util_error_range (list->msg_part[0]);
45 msgset_free (list);
46 }
47 break;
48
49 default:
50 return 1;
51 }
52
29 return 0; 53 return 0;
30 } 54 }
......