837 |
cond_keyword (struct parsebuf *pb) |
cond_keyword (struct parsebuf *pb) |
838 |
{ |
{ |
839 |
char *s = _search_arg (pb); |
char *s = _search_arg (pb); |
|
int rc; |
|
840 |
attribute_t attr = NULL; |
attribute_t attr = NULL; |
841 |
|
|
842 |
message_get_attribute (pb->msg, &attr); |
message_get_attribute (pb->msg, &attr); |
843 |
if (!strcmp (s, "\\Seen")) |
_search_push (pb, util_attribute_matches_flag (attr, s)); |
|
rc = attribute_is_seen (attr); |
|
|
else if (!strcmp (s, "\\Answered")) |
|
|
rc = attribute_is_answered (attr); |
|
|
else if (!strcmp (s, "\\Flagged")) |
|
|
rc = attribute_is_flagged (attr); |
|
|
else if (!strcmp (s, "\\Deleted")) |
|
|
rc = attribute_is_deleted (attr); |
|
|
else if (!strcmp (s, "\\Draft")) |
|
|
rc = attribute_is_draft (attr); |
|
|
else if (!strcmp (s, "\\Recent")) |
|
|
rc = attribute_is_recent (attr); |
|
|
else |
|
|
rc = 0; |
|
|
_search_push (pb, rc); |
|
844 |
} |
} |
845 |
|
|
846 |
void |
void |