need_to_free_msg = 1;
}
if (msg != NULL) {
- if (msg->cm_fields[eTimestamp] != NULL) {
+ if (!CM_IsEmpty(msg, eTimestamp)) {
if (imap_datecmp(itemlist[pos+1].Key,
atol(msg->cm_fields[eTimestamp])) < 0) {
match = 1;
need_to_free_msg = 1;
}
if (msg != NULL) {
- if (strlen(msg->cm_fields[eMesageText]) > atoi(itemlist[pos+1].Key)) {
+ if (msg->cm_lengths[eMesageText] > atoi(itemlist[pos+1].Key)) {
match = 1;
}
}
need_to_free_msg = 1;
}
if (msg != NULL) {
- if (msg->cm_fields[eTimestamp] != NULL) {
+ if (!CM_IsEmpty(msg, eTimestamp)) {
if (imap_datecmp(itemlist[pos+1].Key,
atol(msg->cm_fields[eTimestamp])) == 0) {
match = 1;
need_to_free_msg = 1;
}
if (msg != NULL) {
- if (msg->cm_fields[eTimestamp] != NULL) {
+ if (!CM_IsEmpty(msg, eTimestamp)) {
if (imap_datecmp(itemlist[pos+1].Key,
atol(msg->cm_fields[eTimestamp])) < 0) {
match = 1;
need_to_free_msg = 1;
}
if (msg != NULL) {
- if (msg->cm_fields[eTimestamp] != NULL) {
+ if (!CM_IsEmpty(msg, eTimestamp)) {
if (imap_datecmp(itemlist[pos+1].Key,
atol(msg->cm_fields[eTimestamp])) == 0) {
match = 1;
need_to_free_msg = 1;
}
if (msg != NULL) {
- if (msg->cm_fields[eTimestamp] != NULL) {
+ if (!CM_IsEmpty(msg, eTimestamp)) {
if (imap_datecmp(itemlist[pos+1].Key,
atol(msg->cm_fields[eTimestamp])) >= 0) {
match = 1;
need_to_free_msg = 1;
}
if (msg != NULL) {
- if (msg->cm_fields[eTimestamp] != NULL) {
+ if (!CM_IsEmpty(msg, eTimestamp)) {
if (imap_datecmp(itemlist[pos+1].Key,
atol(msg->cm_fields[eTimestamp])) >= 0) {
match = 1;
need_to_free_msg = 1;
}
if (msg != NULL) {
- if (strlen(msg->cm_fields[eMesageText]) < atoi(itemlist[pos+1].Key)) {
+ if (msg->cm_lengths[eMesageText] < atoi(itemlist[pos+1].Key)) {
match = 1;
}
}
}
if (need_to_free_msg) {
- CtdlFreeMessage(msg);
+ CM_Free(msg);
}
return(match);
}