diff options
author | Wojciech Polak <polak@gnu.org> | 2004-01-13 11:02:03 +0000 |
---|---|---|
committer | Wojciech Polak <polak@gnu.org> | 2004-01-13 11:02:03 +0000 |
commit | 96435a4d7de61fdd5aff4971770089c8d08f48d6 (patch) | |
tree | e809bfb40d5752fc6749f35abe058ac9a7f6e512 /frm | |
parent | fb6c2751c8e31256d0dbd5b954e065a37de36ad7 (diff) | |
download | mailutils-96435a4d7de61fdd5aff4971770089c8d08f48d6.tar.gz mailutils-96435a4d7de61fdd5aff4971770089c8d08f48d6.tar.bz2 |
Fixed
Diffstat (limited to 'frm')
-rw-r--r-- | frm/frm.c | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -245,12 +245,13 @@ get_personal (header_t hdr, const char *field, char *personal, size_t buflen) /* Observable Action this is being call at every message discover. */ /* FIXME: The format of the display is poorly done, please correct. */ static int action (observer_t o, size_t type) { static int counter; + int status; switch (type) { case MU_EVT_MESSAGE_ADD: { mailbox_t mbox = observer_get_owner (o); @@ -293,48 +294,51 @@ action (observer_t o, size_t type) if (show_number) printf ("%d: ", counter); if (show_field) { char hfield[256]; - int status = header_get_value_unfold (hdr, show_field, hfield, - sizeof (hfield), NULL); + status = header_get_value_unfold (hdr, show_field, hfield, + sizeof (hfield), NULL); if (status == 0) printf ("%s", hfield); } if (show_to) { char hto[16]; - int status = get_personal (hdr, MU_HEADER_TO, hto, sizeof (hto)); + status = get_personal (hdr, MU_HEADER_TO, hto, sizeof (hto)); + if (status == 0) printf ("(%s) ", hto); else printf ("(------)"); } if (show_from) { char hfrom[32]; - int status = get_personal (hdr, MU_HEADER_FROM, hfrom, - sizeof (hfrom)); + status = get_personal (hdr, MU_HEADER_FROM, hfrom, + sizeof (hfrom)); if (status == 0) printf ("%s\t", hfrom); else printf ("-----\t"); } if (show_subject) { char hsubject[64]; - int status = header_get_value_unfold (hdr, MU_HEADER_SUBJECT, - hsubject, - sizeof (hsubject), NULL); - frm_rfc2047_decode (hsubject, sizeof (hsubject)); - if(status == 0) - printf ("%s", hsubject); + status = header_get_value_unfold (hdr, MU_HEADER_SUBJECT, + hsubject, + sizeof (hsubject), NULL); + if (status == 0) + { + frm_rfc2047_decode (hsubject, sizeof (hsubject)); + printf ("%s", hsubject); + } } printf ("\n"); break; } case MU_EVT_MAILBOX_PROGRESS: |