(builtin_in_reply_to, builtin_references): New functions. Interfaces to rfc2822 functions.
Showing
1 changed file
with
24 additions
and
0 deletions
... | @@ -1664,6 +1664,28 @@ builtin_printstr (struct mh_machine *mach) | ... | @@ -1664,6 +1664,28 @@ builtin_printstr (struct mh_machine *mach) |
1664 | print_obj (mach, mach->reg_num, &mach->reg_str); | 1664 | print_obj (mach, mach->reg_num, &mach->reg_str); |
1665 | } | 1665 | } |
1666 | 1666 | ||
1667 | static void | ||
1668 | builtin_in_reply_to (struct mh_machine *mach) | ||
1669 | { | ||
1670 | char *value; | ||
1671 | |||
1672 | strobj_free (&mach->arg_str); | ||
1673 | mu_rfc2822_in_reply_to (mach->message, &value); | ||
1674 | strobj_create (&mach->arg_str, value); | ||
1675 | free (value); | ||
1676 | } | ||
1677 | |||
1678 | static void | ||
1679 | builtin_references (struct mh_machine *mach) | ||
1680 | { | ||
1681 | char *value; | ||
1682 | |||
1683 | strobj_free (&mach->reg_str); | ||
1684 | mu_rfc2822_references (mach->message, &value); | ||
1685 | strobj_create (&mach->arg_str, value); | ||
1686 | free (value); | ||
1687 | } | ||
1688 | |||
1667 | /* Builtin function table */ | 1689 | /* Builtin function table */ |
1668 | 1690 | ||
1669 | mh_builtin_t builtin_tab[] = { | 1691 | mh_builtin_t builtin_tab[] = { |
... | @@ -1743,6 +1765,8 @@ mh_builtin_t builtin_tab[] = { | ... | @@ -1743,6 +1765,8 @@ mh_builtin_t builtin_tab[] = { |
1743 | { "rcpt", builtin_rcpt, mhtype_num, mhtype_str }, | 1765 | { "rcpt", builtin_rcpt, mhtype_num, mhtype_str }, |
1744 | { "concat", builtin_concat, mhtype_none, mhtype_str, 1 }, | 1766 | { "concat", builtin_concat, mhtype_none, mhtype_str, 1 }, |
1745 | { "printstr", builtin_printstr, mhtype_none, mhtype_str }, | 1767 | { "printstr", builtin_printstr, mhtype_none, mhtype_str }, |
1768 | { "in_reply_to", builtin_in_reply_to, mhtype_str, mhtype_none }, | ||
1769 | { "references", builtin_references, mhtype_str, mhtype_none }, | ||
1746 | { 0 } | 1770 | { 0 } |
1747 | }; | 1771 | }; |
1748 | 1772 | ... | ... |
-
Please register or sign in to post a comment