Re: imap_header strangeness
| From: | Mark Musone | Date: | Wed, 18 Aug 1999 21:05:10 +0000 |
| Subject: | Re: imap_header strangeness | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-10003@lists.php.net to get a copy of this message | ||
This was taken verbatum from mtest.c, (the definitive guide
to programing c-client software)
tmp[0] = cache->recent ? (cache->seen ? 'R': 'N') : ' ';
tmp[1] = (cache->recent | cache->seen) ? ' ' : 'U';
tmp[2] = cache->flagged ? 'F' : ' ';
tmp[3] = cache->answered ? 'A' : ' ';
tmp[4] = cache->deleted ? 'D' : ' ';
i beleive the logic is:
if it's recent but not seen, mark it as "R"
if it's recent but seen, mark it as "N"
if it's not recent or not seen mark it as "U"..
i think the theory is that you can have Recent or New messages,
both or which are mutually exclusive..
but you can also have Unread messages, which is independent of
the "newness" of a message..
Make sense???
It doesnt to me :^)
i personally dont care what is done with the flags..i just like
keeping everything consistent, (c-client = mtest = pine)
Mark
>
> I'm curious about these two lines (1887 and 1888) from php3_imap_headerinfo:
>
> add_property_string(return_value,"Recent",cache->recent ? (cache->seen ?
> "R": "N") : " ",1);
> add_property_string(return_value,"Unseen",(cache->recent | cache->seen) ?
> " " : "U",1);
>
> The first makes sense, although it is non-obvious that you need to check for
> both R and N to determine if a message is really recent.
>
> Why the second, though? If a message is unseen, it's unseen - why act as if
> it's seen if it's also recent?
>
> I'd really like to see these changed to boolean properties, but I guess that
> would break a lot of code. Is there any reason why 1888 couldn't be changed
> to just depend on cache->seen, though?
>
> -chuck
>
> --
> Charles Hagenbuch, <chagenbu@wso.williams.edu>
> --
> "sleep comes from acorns." - jess
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>