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 26 additions and 2 deletions
......@@ -24,7 +24,31 @@
int
mail_eq (int argc, char **argv)
{
(void)argc; (void)argv;
fprintf (ofile, "%d\n", realcursor);
msgset_t *list = NULL;
switch (argc)
{
case 1:
fprintf (ofile, "%d\n", realcursor);
break;
case 2:
if (msgset_parse (argc, argv, &list) == 0)
{
if (list->msg_part[0] <= total)
{
realcursor = cursor = list->msg_part[0];
fprintf (ofile, "%d\n", realcursor);
}
else
util_error_range (list->msg_part[0]);
msgset_free (list);
}
break;
default:
return 1;
}
return 0;
}
......