Commit 7af90e80 7af90e80ddc3985f09f375870ee717360c0c0e4b by Sergey Poznyakoff

Implemented inc[orporate] command.

1 parent f21fd984
/* GNU mailutils - a suite of utilities for electronic mail
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "mail.h"
/*
* inc[orporate]
*/
int
mail_inc (int argc, char **argv)
{
if (!mailbox_is_updated (mbox))
{
mailbox_messages_count (mbox, &total);
fprintf (ofile, "New mail has arrived\n");
}
else
fprintf (ofile, "No new mail for %s\n", mail_whoami());
return 0;
}
......@@ -138,6 +138,7 @@ int mail_headers __P((int argc, char **argv));
int mail_hold __P((int argc, char **argv));
int mail_help __P((int argc, char **argv));
int mail_if __P((int argc, char **argv));
int mail_inc __P((int argc, char **argv));
int mail_list __P((int argc, char **argv));
int mail_send __P((int argc, char **argv)); /* command mail */
int mail_mbox __P((int argc, char **argv));
......
......@@ -48,6 +48,7 @@ const struct mail_command_entry mail_command_table[] = {
{ "ho", "hold", 0, mail_hold, "ho[ld] [msglist]" },
{ "i", "if", EF_FLOW, mail_if, "i[f] s|r|t" },
{ "ig", "ignore", 0, mail_discard,"ig[nore] [header-field...]" },
{ "inc", "incorporate", 0, mail_inc, "inc[orporate]" },
{ "l", "list", 0, mail_list, "l[ist]" },
{ "m", "mail", EF_SEND, mail_send, "m[ail] [address...]" },
{ "mb", "mbox", 0, mail_mbox, "mb[ox] [msglist]" },
......