summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-03-05 09:54:38 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-03-05 09:54:38 +0000
commit1d480f497d253ee376e215551c56f2f55a712d8c (patch)
tree5e83b56ae65c283b1c3de12c8da520595e7859b4 /mail
parent0c5d5ae3661b615ecf3fd8c85296fcd912934909 (diff)
downloadmailutils-1d480f497d253ee376e215551c56f2f55a712d8c.tar.gz
mailutils-1d480f497d253ee376e215551c56f2f55a712d8c.tar.bz2
(util_mark_read): New function
Diffstat (limited to 'mail')
-rw-r--r--mail/mail.h4
-rw-r--r--mail/util.c13
2 files changed, 15 insertions, 2 deletions
diff --git a/mail/mail.h b/mail/mail.h
index 794f83041..ce192de47 100644
--- a/mail/mail.h
+++ b/mail/mail.h
@@ -1,5 +1,5 @@
/* GNU Mailutils -- a suite of utilities for electronic mail
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -327,6 +327,8 @@ void util_run_cached_commands __P((list_t *list));
const char *util_reply_prefix __P((void));
void util_rfc2047_decode __P((char **value));
+void util_mark_read __P((message_t msg));
+
extern int ml_got_interrupt __P ((void));
extern void ml_clear_interrupt __P ((void));
extern void ml_readline_init __P ((void));
diff --git a/mail/util.c b/mail/util.c
index f80fe9878..b8586ee63 100644
--- a/mail/util.c
+++ b/mail/util.c
@@ -1,6 +1,6 @@
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002, 2003,
- 2004 Free Software Foundation, Inc.
+ 2004, 2005 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -604,6 +604,16 @@ util_isdeleted (size_t n)
return attribute_is_deleted (attr);
}
+void
+util_mark_read (message_t msg)
+{
+ attribute_t attr;
+
+ message_get_attribute (msg, &attr);
+ attribute_set_read (attr);
+ attribute_set_userflag (attr, MAIL_ATTRIBUTE_SHOWN);
+}
+
char *
util_get_homedir ()
{
@@ -1392,3 +1402,4 @@ util_rfc2047_decode (char **value)
*value = tmp;
}
}
+

Return to:

Send suggestions and report system problems to the System administrator.