diff options
Diffstat (limited to 'frm')
-rw-r--r-- | frm/frm.c | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -248,6 +248,7 @@ static int | |||
248 | action (observer_t o, size_t type) | 248 | action (observer_t o, size_t type) |
249 | { | 249 | { |
250 | static int counter; | 250 | static int counter; |
251 | int status; | ||
251 | 252 | ||
252 | switch (type) | 253 | switch (type) |
253 | { | 254 | { |
@@ -296,8 +297,8 @@ action (observer_t o, size_t type) | |||
296 | if (show_field) | 297 | if (show_field) |
297 | { | 298 | { |
298 | char hfield[256]; | 299 | char hfield[256]; |
299 | int status = header_get_value_unfold (hdr, show_field, hfield, | 300 | status = header_get_value_unfold (hdr, show_field, hfield, |
300 | sizeof (hfield), NULL); | 301 | sizeof (hfield), NULL); |
301 | if (status == 0) | 302 | if (status == 0) |
302 | printf ("%s", hfield); | 303 | printf ("%s", hfield); |
303 | } | 304 | } |
@@ -305,7 +306,8 @@ action (observer_t o, size_t type) | |||
305 | if (show_to) | 306 | if (show_to) |
306 | { | 307 | { |
307 | char hto[16]; | 308 | char hto[16]; |
308 | int status = get_personal (hdr, MU_HEADER_TO, hto, sizeof (hto)); | 309 | status = get_personal (hdr, MU_HEADER_TO, hto, sizeof (hto)); |
310 | |||
309 | if (status == 0) | 311 | if (status == 0) |
310 | printf ("(%s) ", hto); | 312 | printf ("(%s) ", hto); |
311 | else | 313 | else |
@@ -315,8 +317,8 @@ action (observer_t o, size_t type) | |||
315 | if (show_from) | 317 | if (show_from) |
316 | { | 318 | { |
317 | char hfrom[32]; | 319 | char hfrom[32]; |
318 | int status = get_personal (hdr, MU_HEADER_FROM, hfrom, | 320 | status = get_personal (hdr, MU_HEADER_FROM, hfrom, |
319 | sizeof (hfrom)); | 321 | sizeof (hfrom)); |
320 | if (status == 0) | 322 | if (status == 0) |
321 | printf ("%s\t", hfrom); | 323 | printf ("%s\t", hfrom); |
322 | else | 324 | else |
@@ -326,12 +328,14 @@ action (observer_t o, size_t type) | |||
326 | if (show_subject) | 328 | if (show_subject) |
327 | { | 329 | { |
328 | char hsubject[64]; | 330 | char hsubject[64]; |
329 | int status = header_get_value_unfold (hdr, MU_HEADER_SUBJECT, | 331 | status = header_get_value_unfold (hdr, MU_HEADER_SUBJECT, |
330 | hsubject, | 332 | hsubject, |
331 | sizeof (hsubject), NULL); | 333 | sizeof (hsubject), NULL); |
332 | frm_rfc2047_decode (hsubject, sizeof (hsubject)); | 334 | if (status == 0) |
333 | if(status == 0) | 335 | { |
334 | printf ("%s", hsubject); | 336 | frm_rfc2047_decode (hsubject, sizeof (hsubject)); |
337 | printf ("%s", hsubject); | ||
338 | } | ||
335 | } | 339 | } |
336 | printf ("\n"); | 340 | printf ("\n"); |
337 | break; | 341 | break; |