From 4aa7b79d7aaa11807a434d67419f10730081eb71 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Thu, 1 Oct 2026 19:08:05 -0500 Subject: [PATCH] cleanup(NWC24MsgObj): rename unk_0x28/2C to date/receivedDate Evidence from NWC24MBoxCtrl entry->date / entry->receivedDate copies. --- libs/RevoEX/include/private/nwc24/NWC24MsgObj.h | 4 ++-- libs/RevoEX/src/nwc24/NWC24MBoxCtrl.c | 10 +++++----- libs/RevoEX/src/nwc24/NWC24MsgCommit.c | 8 ++++---- libs/RevoEX/src/nwc24/NWC24MsgObj.c | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libs/RevoEX/include/private/nwc24/NWC24MsgObj.h b/libs/RevoEX/include/private/nwc24/NWC24MsgObj.h index 017eee33..9d2c13ec 100644 --- a/libs/RevoEX/include/private/nwc24/NWC24MsgObj.h +++ b/libs/RevoEX/include/private/nwc24/NWC24MsgObj.h @@ -44,8 +44,8 @@ typedef struct NWC24MsgObjPrivate { #else NWC24UserId fromId; // 0x20 #endif - u32 unk_0x28; - u32 unk_0x2C; + u32 date; // 0x28 + u32 receivedDate; // 0x2C NWC24Data unk_0x30; NWC24Data unk_0x38; NWC24Data subject; // 0x40 diff --git a/libs/RevoEX/src/nwc24/NWC24MBoxCtrl.c b/libs/RevoEX/src/nwc24/NWC24MBoxCtrl.c index 2553d636..7756f998 100644 --- a/libs/RevoEX/src/nwc24/NWC24MBoxCtrl.c +++ b/libs/RevoEX/src/nwc24/NWC24MBoxCtrl.c @@ -783,7 +783,7 @@ static NWC24Err DuplicationCheck(MBCHeader* header, const NWC24MsgObjPrivate* ms continue; } if (msg->unk_0x1C != 0 && entry->crc == msg->unk_0x1C && entry->type == msg->type && entry->length == msg->length && - entry->flags == msg->unk_0x10 && (s32)entry->date == (s32)msg->unk_0x28) { + entry->flags == msg->unk_0x10 && (s32)entry->date == (s32)msg->date) { duplicateId = entry->msgId; duplicateOffset = offset; continue; @@ -962,8 +962,8 @@ static NWC24Err CopyMsgObjToMBCFmt(const NWC24MsgObjPrivate* msg, MBCEntry* entr entry->crc = msg->unk_0x1C; entry->fromIdHigh = msg->fromIdHigh; entry->fromIdLow = msg->fromIdLow; - entry->date = msg->unk_0x28; - entry->receivedDate = msg->unk_0x2C; + entry->date = msg->date; + entry->receivedDate = msg->receivedDate; entry->numTo = msg->numTo; entry->numAttached = msg->numAttached; entry->groupId = msg->groupId; @@ -1009,8 +1009,8 @@ static NWC24Err CopyMsgObjToPrvFmt(const MBCEntry* entry, NWC24MsgObjPrivate* ms msg->unk_0x1C = entry->crc; msg->fromIdHigh = entry->fromIdHigh; msg->fromIdLow = entry->fromIdLow; - msg->unk_0x28 = entry->date; - msg->unk_0x2C = entry->receivedDate; + msg->date = entry->date; + msg->receivedDate = entry->receivedDate; msg->numTo = entry->numTo; msg->numAttached = entry->numAttached; msg->groupId = entry->groupId; diff --git a/libs/RevoEX/src/nwc24/NWC24MsgCommit.c b/libs/RevoEX/src/nwc24/NWC24MsgCommit.c index e4ec87e5..ae83afd3 100644 --- a/libs/RevoEX/src/nwc24/NWC24MsgCommit.c +++ b/libs/RevoEX/src/nwc24/NWC24MsgCommit.c @@ -158,7 +158,7 @@ static inline NWC24Err WriteMessageIdField(NWC24MsgObjPrivate* msg) { Mail_memset(buffer, 0, 1024); Mail_strcpy(buffer, "Message-Id: <"); Mail_memset(idText, 0, 32); - Mail_sprintf(idText, "%05X%08X%08X%08X", msg->msgId, (u32)(myId >> 32), (u32)myId, msg->unk_0x28); + Mail_sprintf(idText, "%05X%08X%08X%08X", msg->msgId, (u32)(myId >> 32), (u32)myId, msg->date); Mail_strcat(buffer, idText); Mail_strcat(buffer, domain); Mail_strcat(buffer, ">\r\n"); @@ -312,7 +312,7 @@ static NWC24Err NWC24CommitMsgInternal(NWC24MsgObjPrivate* msg, NWC24MBoxType ty } CHECK_WRITE(WriteExtraFields(msg)); Mail_memset(MultiPartDivider, 0, 40); - Mail_sprintf(MultiPartDivider, "Boundary-NWC24-%08X%05X", msg->unk_0x28, msg->msgId); + Mail_sprintf(MultiPartDivider, "Boundary-NWC24-%08X%05X", msg->date, msg->msgId); buffer = NWC24WorkP->stringWork; Mail_memset(buffer, 0, 1024); Mail_strcpy(buffer, "MIME-Version: 1.0\r\n"); @@ -654,9 +654,9 @@ static NWC24Err WriteDateField(NWC24MsgObjPrivate* msg) { date.sec = calendar.sec; if (date.month > 12) return NWC24_ERR_FORMAT; - NWC24iDateToMinutes(&msg->unk_0x28, &date); + NWC24iDateToMinutes(&msg->date, &date); if (msg->type & 0x1000000) - NWC24iMinutesToDate(&date, msg->unk_0x2C); + NWC24iMinutesToDate(&date, msg->receivedDate); buffer = NWC24WorkP->stringWork; Mail_memset(buffer, 0, 1024); Mail_sprintf(buffer, "Date: %02d %s %d %02d:%02d:%02d -0000\r\n", date.day, months[date.month - 1], date.year, date.hour, date.min, date.sec); diff --git a/libs/RevoEX/src/nwc24/NWC24MsgObj.c b/libs/RevoEX/src/nwc24/NWC24MsgObj.c index 1c9c07bd..4291bbf0 100644 --- a/libs/RevoEX/src/nwc24/NWC24MsgObj.c +++ b/libs/RevoEX/src/nwc24/NWC24MsgObj.c @@ -46,9 +46,9 @@ NWC24Err NWC24InitMsgObj(NWC24MsgObj* msg, NWC24MsgType type) { return NWC24_ERR_INVALID_VALUE; } - msgObj->unk_0x28 = 0; + msgObj->date = 0; msgObj->type |= 0x200000; - msgObj->unk_0x2C = 0; + msgObj->receivedDate = 0; NWC24GetMyUserId(&msgObj->fromId); msgObj->numTo = 0; @@ -477,7 +477,7 @@ NWC24Err NWC24GetMsgFromId(const NWC24MsgObj* msg, NWC24UserId* fromId) { NWC24Err NWC24GetMsgDate(const NWC24MsgObj* msg, OSCalendarTime* msgDate) { const NWC24MsgObjPrivate* msgObj = (const NWC24MsgObjPrivate*)msg; - NWC24iMinutesToOSCalendarTime(msgDate, msgObj->unk_0x28); + NWC24iMinutesToOSCalendarTime(msgDate, msgObj->date); return NWC24_OK; } -- 2.49.1