diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2004-01-13 15:40:04 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2004-01-13 15:40:04 +0000 |
commit | 0eb20f4388e3133c41c2e45b1355a3d6291e59f7 (patch) | |
tree | 0320cc9be2541cca976deb7e994ea3d2fae6809c /frm | |
parent | 41fbb0c944d7edd1b0f6de472e2d128bc358f767 (diff) | |
download | mailutils-0eb20f4388e3133c41c2e45b1355a3d6291e59f7.tar.gz mailutils-0eb20f4388e3133c41c2e45b1355a3d6291e59f7.tar.bz2 |
(action): Optimized select condition
Diffstat (limited to 'frm')
-rw-r--r-- | frm/frm.c | 22 |
1 files changed, 4 insertions, 18 deletions
@@ -350,24 +350,10 @@ action (observer_t o, size_t type) | |||
350 | message_get_attribute (msg, &attr); | 350 | message_get_attribute (msg, &attr); |
351 | message_get_header (msg, &hdr); | 351 | message_get_header (msg, &hdr); |
352 | 352 | ||
353 | if (select_attribute | 353 | if (((select_attribute & IS_READ) && (!attribute_is_read (attr))) |
354 | && (select_attribute & IS_READ) | 354 | || (select_attribute & IS_NEW) && (!attribute_is_recent (attr)) |
355 | && (!attribute_is_read (attr))) | 355 | || (select_attribute & IS_OLD) && (!attribute_is_seen (attr))) |
356 | { | 356 | break; |
357 | break; | ||
358 | } | ||
359 | else if (select_attribute | ||
360 | && (select_attribute & IS_NEW) | ||
361 | && (!attribute_is_recent (attr))) | ||
362 | { | ||
363 | break; | ||
364 | } | ||
365 | else if (select_attribute | ||
366 | && (select_attribute & IS_OLD) | ||
367 | && (!attribute_is_seen (attr))) | ||
368 | { | ||
369 | break; | ||
370 | } | ||
371 | 357 | ||
372 | if (attribute_is_recent (attr)) | 358 | if (attribute_is_recent (attr)) |
373 | have_new_mail = 1; | 359 | have_new_mail = 1; |