X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=mymail.c;h=88e09549769aa819540c9571d11047eea49287e5;hb=93e55a350d0053c490a31e4a671925eb9c2fb6ee;hp=27b48f4fe8a5f2f481d46932e4ae4b266eba78be;hpb=b18f24afc58a95f309f33e06ba7b2e67db06bea8;p=mymail.git diff --git a/mymail.c b/mymail.c index 27b48f4..88e0954 100644 --- a/mymail.c +++ b/mymail.c @@ -62,8 +62,9 @@ int action_index; enum { ID_MAIL = 0, ID_FROM, - ID_DEST, + ID_TO, ID_SUBJECT, + ID_DATE, ID_PARTICIPANT, MAX_ID }; @@ -71,8 +72,9 @@ enum { static char *field_names[] = { "mail", "from", - "dest", + "to", "subject", + "date", "part" }; @@ -100,7 +102,7 @@ static struct parsable_field fields_to_parse[] = { }, { - ID_DEST, + ID_TO, "^\\([Tt][Oo]\\|[Cc][Cc]\\|[Bb][Cc][Cc]\\): ", { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, @@ -111,6 +113,12 @@ static struct parsable_field fields_to_parse[] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { + ID_DATE, + "^[Dd][Aa][Tt][Ee]: ", + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + }, + }; /********************************************************************/ @@ -184,7 +192,7 @@ int mbox_line_match_search(struct search_request *request, int mbox_id, char *mbox_value) { return (request->field_id == mbox_id || - (request->field_id == ID_PARTICIPANT && (mbox_id == ID_FROM || mbox_id == ID_DEST))) + (request->field_id == ID_PARTICIPANT && (mbox_id == ID_FROM || mbox_id == ID_TO))) && regexec(&request->regexp, mbox_value, 0, 0, 0) == 0; }