/[mailutils]/mailutils/mh/mh_format.c
ViewVC logotype

Diff of /mailutils/mh/mh_format.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by gray, Sat Jan 11 22:21:03 2003 UTC revision 1.21 by gray, Mon Jan 13 15:08:21 2003 UTC
# Line 1613  builtin_unre (struct mh_machine *mach) Line 1613  builtin_unre (struct mh_machine *mach)
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[] = {
# Line 1689  mh_builtin_t builtin_tab[] = { Line 1716  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    

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26