diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-03-22 13:35:06 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-03-22 13:35:06 +0000 |
commit | 1d62bb643ccf89a731bdb4e8bafb0f22eb284ef9 (patch) | |
tree | 8f5f14eb1b13ce9c5df67c129f62821a5245aa42 /mail | |
parent | e3a077ec31261e47c4ee7a8babed0e510feaa152 (diff) | |
download | mailutils-1d62bb643ccf89a731bdb4e8bafb0f22eb284ef9.tar.gz mailutils-1d62bb643ccf89a731bdb4e8bafb0f22eb284ef9.tar.bz2 |
(mail_from0): Bugfix.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/from.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mail/from.c b/mail/from.c index 2414ef1f6..0e2f6e90e 100644 --- a/mail/from.c +++ b/mail/from.c @@ -44,7 +44,7 @@ mail_from0 (msgset_t *mspec, message_t msg, void *data) if (address_create (&address, from) == 0) { char name[128]; - size_t len = strlen (from); + size_t len = strlen (from) + 1; *name = '\0'; address_get_personal (address, 1, name, sizeof name, NULL); if (*name && len) @@ -53,7 +53,7 @@ mail_from0 (msgset_t *mspec, message_t msg, void *data) from[len - 1] = '\0'; } else - address_get_email (address, 1, from, strlen (from), NULL); + address_get_email (address, 1, from, len, NULL); address_destroy (&address); } } @@ -61,17 +61,17 @@ mail_from0 (msgset_t *mspec, message_t msg, void *data) message_get_attribute (msg, &attr); - if (attribute_is_userflag(attr, MAIL_ATTRIBUTE_MBOXED)) + if (attribute_is_userflag (attr, MAIL_ATTRIBUTE_MBOXED)) cflag = 'M'; - else if (attribute_is_userflag(attr, MAIL_ATTRIBUTE_SAVED)) + else if (attribute_is_userflag (attr, MAIL_ATTRIBUTE_SAVED)) cflag = '*'; - else if (attribute_is_userflag(attr, MAIL_ATTRIBUTE_TAGGED)) + else if (attribute_is_userflag (attr, MAIL_ATTRIBUTE_TAGGED)) cflag = 'T'; else if (attribute_is_read (attr)) cflag = 'R'; else if (attribute_is_seen (attr)) cflag = 'U'; - else if (attribute_is_recent(attr)) + else if (attribute_is_recent (attr)) cflag = 'N'; else cflag = ' '; @@ -79,13 +79,13 @@ mail_from0 (msgset_t *mspec, message_t msg, void *data) message_get_envelope (msg, &env); envelope_date (env, date, sizeof (date), NULL); p = date; - if (mu_parse_ctime_date_time(&p, &tm, &tz) == 0) + if (mu_parse_ctime_date_time (&p, &tm, &tz) == 0) strftime (date, sizeof(date), "%a %b %e %H:%M", &tm); message_size (msg, &m_size); message_lines (msg, &m_lines); - snprintf (st, sizeof(st), "%3d/%-5d", m_lines, m_size); + snprintf (st, sizeof (st), "%3d/%-5d", m_lines, m_size); /* The "From" field will take a third of the screen. Subject will take the rest. |