summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2002-11-05 13:47:24 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2002-11-05 13:47:24 +0000
commitd30e3f3e9bc58f307546fe2c3fc1e58d97bc63e8 (patch)
treeecd8961e4682bb489c3182555ffdb6e06d012041
parent77f4f2a634a25f47432e5d0bf65a19f6ce67b55e (diff)
downloadmailutils-d30e3f3e9bc58f307546fe2c3fc1e58d97bc63e8.tar.gz
mailutils-d30e3f3e9bc58f307546fe2c3fc1e58d97bc63e8.tar.bz2
Use MSG_.* macros in calls to util_get_message.
-rw-r--r--mail/copy.c2
-rw-r--r--mail/delete.c2
-rw-r--r--mail/followup.c2
-rw-r--r--mail/hold.c2
-rw-r--r--mail/mbox.c2
-rw-r--r--mail/pipe.c2
-rw-r--r--mail/print.c2
-rw-r--r--mail/quit.c2
-rw-r--r--mail/size.c3
-rw-r--r--mail/top.c2
-rw-r--r--mail/undelete.c2
-rw-r--r--mail/write.c2
12 files changed, 13 insertions, 12 deletions
diff --git a/mail/copy.c b/mail/copy.c
index 6c6e51934..b21457e23 100644
--- a/mail/copy.c
+++ b/mail/copy.c
@@ -71,13 +71,13 @@ mail_copy0 (int argc, char **argv, int mark)
}
for (mp = msglist; mp; mp = mp->next)
{
int status;
- status = util_get_message (mbox, mp->msg_part[0], &msg, 1);
+ status = util_get_message (mbox, mp->msg_part[0], &msg, MSG_NODELETED);
if (status)
break;
mailbox_append_message (mbx, msg);
message_size (msg, &size);
diff --git a/mail/delete.c b/mail/delete.c
index a64cbd4a0..d7a84de35 100644
--- a/mail/delete.c
+++ b/mail/delete.c
@@ -24,13 +24,13 @@
static int
mail_delete0 (void)
{
message_t msg;
attribute_t attr;
- if (util_get_message (mbox, cursor, &msg, 0))
+ if (util_get_message (mbox, cursor, &msg, MSG_ALL))
return 1;
message_get_attribute (msg, &attr);
attribute_set_deleted (attr);
return 0;
}
diff --git a/mail/followup.c b/mail/followup.c
index df88a2296..a071ef910 100644
--- a/mail/followup.c
+++ b/mail/followup.c
@@ -33,13 +33,13 @@ mail_followup (int argc, char **argv)
int status;
compose_init (&env);
if (msgset_parse (argc, argv, &msglist))
return 1;
- if (util_get_message (mbox, cursor, &msg, 1))
+ if (util_get_message (mbox, cursor, &msg, MSG_NODELETED))
{
msgset_free (msglist);
return 1;
}
/* Create subject value */
diff --git a/mail/hold.c b/mail/hold.c
index 34a7eaead..60a761f8c 100644
--- a/mail/hold.c
+++ b/mail/hold.c
@@ -29,13 +29,13 @@ mail_hold (int argc, char **argv)
attribute_t attr;
if (argc > 1)
return util_msglist_command (mail_hold, argc, argv, 1);
else
{
- if (util_get_message (mbox, cursor, &msg, 0))
+ if (util_get_message (mbox, cursor, &msg, MSG_ALL))
return 1;
message_get_attribute (msg, &attr);
attribute_unset_userflag (attr, MAIL_ATTRIBUTE_MBOXED);
}
return 0;
diff --git a/mail/mbox.c b/mail/mbox.c
index 1963f4bf2..79980c907 100644
--- a/mail/mbox.c
+++ b/mail/mbox.c
@@ -28,13 +28,13 @@ mail_mbox (int argc, char **argv)
attribute_t attr;
if (argc > 1)
return util_msglist_command (mail_mbox, argc, argv, 1);
else
{
- if (util_get_message (mbox, cursor, &msg, 1))
+ if (util_get_message (mbox, cursor, &msg, MSG_NODELETED))
return 1;
/* Mark the message */
message_get_attribute (msg, &attr);
attribute_set_userflag (attr, MAIL_ATTRIBUTE_MBOXED);
}
diff --git a/mail/pipe.c b/mail/pipe.c
index c1a112ffe..824e7906a 100644
--- a/mail/pipe.c
+++ b/mail/pipe.c
@@ -43,13 +43,13 @@ mail_pipe (int argc, char **argv)
return 1;
tube = popen (cmd, "w");
for (mp = list; mp; mp = mp->next)
{
- if (util_get_message (mbox, mp->msg_part[0], &msg, 1) == 0)
+ if (util_get_message (mbox, mp->msg_part[0], &msg, MSG_NODELETED) == 0)
{
message_get_stream (msg, &stream);
off = 0;
while (stream_read (stream, buffer, sizeof (buffer) - 1, off,
&n) == 0 && n != 0)
{
diff --git a/mail/print.c b/mail/print.c
index 086e3d826..d193bfc8b 100644
--- a/mail/print.c
+++ b/mail/print.c
@@ -39,13 +39,13 @@ mail_print (int argc, char **argv)
off_t off = 0;
size_t n = 0, lines = 0;
FILE *out = ofile;
attribute_t attr;
int pagelines = util_get_crt ();
- if (util_get_message (mbox, cursor, &mesg, 1))
+ if (util_get_message (mbox, cursor, &mesg, MSG_NODELETED))
return 1;
message_lines (mesg, &lines);
/* If it is POP or IMAP the lines number is not known, so try
to be smart about it. */
diff --git a/mail/quit.c b/mail/quit.c
index b74c1ab96..62a4f0151 100644
--- a/mail/quit.c
+++ b/mail/quit.c
@@ -83,13 +83,13 @@ mail_mbox_commit ()
}
mailbox_destroy (&mb);
}
for (i = 1; i <= total; i++)
{
- if (util_get_message (mbox, i, &msg, 0))
+ if (util_get_message (mbox, i, &msg, MSG_ALL))
return 1;
message_get_attribute (msg, &attr);
if (!is_user_mbox
&& !attribute_is_deleted (attr)
diff --git a/mail/size.c b/mail/size.c
index ab1dc7779..4014986ea 100644
--- a/mail/size.c
+++ b/mail/size.c
@@ -27,13 +27,14 @@ mail_size (int argc, char **argv)
if (argc > 1)
util_msglist_command (mail_size, argc, argv, 0);
else
{
size_t size = 0, lines = 0;
message_t msg;
- if (util_get_message (mbox, cursor, &msg, 0))
+
+ if (util_get_message (mbox, cursor, &msg, MSG_ALL))
return 1;
message_size (msg, &size);
message_lines (msg, &lines);
fprintf (ofile, "%c%2d %3d/%-5d\n", cursor == realcursor ? '>' : ' ',
diff --git a/mail/top.c b/mail/top.c
index 727895f58..7fb2563a0 100644
--- a/mail/top.c
+++ b/mail/top.c
@@ -36,13 +36,13 @@ mail_top (int argc, char **argv)
int lines;
if (util_getenv (&lines, "toplines", Mail_env_number, 1)
|| lines < 0)
return 1;
- if (util_get_message (mbox, cursor, &msg, 1))
+ if (util_get_message (mbox, cursor, &msg, MSG_NODELETED))
return 1;
message_get_stream (msg, &stream);
for (n = 0, off = 0; lines > 0; lines--, off += n)
{
int status = stream_readline (stream, buf, sizeof (buf), off, &n);
diff --git a/mail/undelete.c b/mail/undelete.c
index 2f00f5b83..85d70fda9 100644
--- a/mail/undelete.c
+++ b/mail/undelete.c
@@ -27,13 +27,13 @@ mail_undelete (int argc, char **argv)
if (argc > 1)
return util_msglist_command (mail_undelete, argc, argv, 1);
else
{
message_t msg;
attribute_t attr;
- if (util_get_message (mbox, cursor, &msg, 0))
+ if (util_get_message (mbox, cursor, &msg, MSG_ALL))
return 1;
message_get_attribute (msg, &attr);
if (attribute_is_deleted (attr))
attribute_unset_deleted (attr);
return 0;
diff --git a/mail/write.c b/mail/write.c
index e78b6407b..ff2a569b2 100644
--- a/mail/write.c
+++ b/mail/write.c
@@ -78,13 +78,13 @@ mail_write (int argc, char **argv)
{
attribute_t attr;
char buffer[512];
off_t off = 0;
size_t n = 0;
- if (util_get_message (mbox, mp->msg_part[0], &msg, 1))
+ if (util_get_message (mbox, mp->msg_part[0], &msg, MSG_NODELETED))
continue;
message_get_body (msg, &bod);
body_size (bod, &size);
total_size += size;

Return to:

Send suggestions and report system problems to the System administrator.