summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2002-11-05 13:45:42 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2002-11-05 13:45:42 +0000
commit268030e3a835a8251b83fc0b27b5f7080ca7b288 (patch)
tree5e2a067056c8e517e5931ad0cd38c7818accfa5f
parentb481b31ede6b8fe148d7c13423be6f2e371031f0 (diff)
downloadmailutils-268030e3a835a8251b83fc0b27b5f7080ca7b288.tar.gz
mailutils-268030e3a835a8251b83fc0b27b5f7080ca7b288.tar.bz2
(util_get_message): Expanded semantics of the last
argument. It now contains flags that control how util_get_message operates. Flags are a bitwise sum of the following: MSG_ALL Return any message (deleted or not) MSG_NODELETED Do not return deleted messages. MSG_SILENT Do not output warnings about deleted messages.
-rw-r--r--mail/util.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mail/util.c b/mail/util.c
index d7e976fe2..2422e3ea9 100644
--- a/mail/util.c
+++ b/mail/util.c
@@ -1225,7 +1225,7 @@ util_header_expand (header_t *phdr)
}
int
-util_get_message (mailbox_t mbox, size_t msgno, message_t *msg, int delflag)
+util_get_message (mailbox_t mbox, size_t msgno, message_t *msg, int flag)
{
int status;
@@ -1243,9 +1243,11 @@ util_get_message (mailbox_t mbox, size_t msgno, message_t *msg, int delflag)
return status;
}
- if (delflag && util_isdeleted (*msg))
+ if ((flag & MSG_NODELETED) && util_isdeleted (*msg))
{
- util_error ("%d: Inappropriate message (has been deleted)");
+ if (!(flag & MSG_SILENT))
+ util_error ("%lu: Inappropriate message (has been deleted)",
+ (unsigned long) msgno);
return ENOENT;
}
return 0;

Return to:

Send suggestions and report system problems to the System administrator.