1613 |
} |
} |
1614 |
} |
} |
1615 |
|
|
1616 |
|
int |
1617 |
|
mh_decode_rcpt_flag (const char *arg) |
1618 |
|
{ |
1619 |
|
if (strcmp (arg, "to") == 0) |
1620 |
|
return RCPT_TO; |
1621 |
|
else if (strcmp (arg, "cc") == 0) |
1622 |
|
return RCPT_CC; |
1623 |
|
else if (strcmp (arg, "me") == 0) |
1624 |
|
return RCPT_ME; |
1625 |
|
else if (strcmp (arg, "all") == 0) |
1626 |
|
return RCPT_ALL; |
1627 |
|
|
1628 |
|
return RCPT_NONE; |
1629 |
|
} |
1630 |
|
|
1631 |
|
static void |
1632 |
|
builtin_rcpt (struct mh_machine *mach) |
1633 |
|
{ |
1634 |
|
int rc = mh_decode_rcpt_flag (strobj_ptr (&mach->arg_str)); |
1635 |
|
if (rc == RCPT_NONE) |
1636 |
|
{ |
1637 |
|
mh_error (_("Invalid recipient mask")); |
1638 |
|
/* try to continue anyway */ |
1639 |
|
} |
1640 |
|
mach->arg_num = rc & rcpt_mask; |
1641 |
|
} |
1642 |
|
|
1643 |
/* Builtin function table */ |
/* Builtin function table */ |
1644 |
|
|
1645 |
mh_builtin_t builtin_tab[] = { |
mh_builtin_t builtin_tab[] = { |
1716 |
{ "formataddr", builtin_formataddr, mhtype_none, mhtype_str, 1 }, |
{ "formataddr", builtin_formataddr, mhtype_none, mhtype_str, 1 }, |
1717 |
{ "putaddr", builtin_putaddr, mhtype_none, mhtype_str }, |
{ "putaddr", builtin_putaddr, mhtype_none, mhtype_str }, |
1718 |
{ "unre", builtin_unre, mhtype_str, mhtype_str }, |
{ "unre", builtin_unre, mhtype_str, mhtype_str }, |
1719 |
|
{ "rcpt", builtin_rcpt, mhtype_num, mhtype_str }, |
1720 |
{ 0 } |
{ 0 } |
1721 |
}; |
}; |
1722 |
|
|