pmuser:Thanks guys, these are very interesting information. Just a few additional queries:
- What does the "mtime" field stands for? The equivalent of date field or something else?
"mtime" is a crude hash value based on the date which is used only when
sorting the folder. The code which calculates this value is as follows:
long extract_time (char *s)
{
int year, mon, day, hour, min, i;
char monthstr [10], *base;
long l;
/* Extract a date in RFC-822 date format, and:
** i: Sprintf() it into a consistent format for display.
** ii: Calculate a sequence value. The sequence value is
** used for sorting by date, and is crudely calculated.
** It is very nominally the number of minutes since
** Jan 1 1990, but in fact it ends up being nothing like
** this. This doesn't matter provided the sequence it
** produces is correct (which it is).
*/
if (s [3] == ',')
base = s + 4;
else
base = s;
if (sscanf (base, "%d %s %d %d:%d", &day, monthstr, &year,
&hour, &min) != 5)
return 0L;
for (mon = 0, i = 0; i < 12; i ++)
if (stricmp (monthstr, months
) == 0)
{
mon = i;
break;
}
if (year > 1900) year -= 1900;
l = (year - 90) * 535680L; /* 12 * 31 * 1440 (months) */
l += (mon * 44640L); /* 31 * 1440 (days) */
l += (day * 1440L); /* 60 * 24 hours */
l += (hour * 60L); /* 60 minutes */
l += min;
sprintf (s, "%2d %s %02d %2d:%02d", day, monthstr, year, hour, min);
return l;
}
Han van den Bogaerde - support@vandenbogaerde.net
Member of Pegasus Mail Support Group.
My own Pegasus Mail related web information:
http://www.vandenbogaerde.net/pegasusmail/