Commit d775d8e3 d775d8e3c32ee0d3e7cea169c8447642711a5813 by Sergey Poznyakoff

builtin_msg(): return sequence number of the message, not its ordinal

number in mailbox.
builtin_cur(): implemented.
1 parent 1a0bcb4e
...@@ -396,14 +396,17 @@ builtin_not_implemented (char *name) ...@@ -396,14 +396,17 @@ builtin_not_implemented (char *name)
396 static void 396 static void
397 builtin_msg (struct mh_machine *mach) 397 builtin_msg (struct mh_machine *mach)
398 { 398 {
399 mach->reg_num = mach->msgno; 399 size_t msgno = mach->msgno;
400 mh_message_number (mach->message, &msgno);
401 mach->reg_num = msgno;
400 } 402 }
401 403
402 static void 404 static void
403 builtin_cur (struct mh_machine *mach) 405 builtin_cur (struct mh_machine *mach)
404 { 406 {
405 /*FIXME*/ 407 size_t msgno = mach->msgno;
406 mach->reg_num = 0; 408 mh_message_number (mach->message, &msgno);
409 mach->reg_num = msgno == current_message;
407 } 410 }
408 411
409 static void 412 static void
......