From 665933e87533a1e2017889bd5769b83f025ec405 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Fri, 12 Jan 2018 08:48:10 +0000 Subject: [PATCH] Introduce new text.dat line: MsgHdrBodySeparator This is display between the msg header text.dat lines and the message body (previously, just hard-coded to a blank line). This enables us to now execute showmsgavatar.js much faster than loading msghdr.asc file, and using it to execute showmsghdr.js. So... if you're upgrading to this build, you can get rid of msghdr.asc and get a message viewing performance boost. The results should look the same (but the message header will display immediately, with no discernable delay). --- src/sbbs3/getmsg.cpp | 4 +--- src/sbbs3/text.h | 1 + src/sbbs3/text_defaults.c | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sbbs3/getmsg.cpp b/src/sbbs3/getmsg.cpp index a632519f6d..fb5daf6a31 100644 --- a/src/sbbs3/getmsg.cpp +++ b/src/sbbs3/getmsg.cpp @@ -161,9 +161,7 @@ void sbbs_t::show_msghdr(smbmsg_t* msg) ,timestr(msg->hdr.when_written.time) ,smb_zonestr(msg->hdr.when_written.zone,NULL) ,age_of_posted_item(age, sizeof(age), msg->hdr.when_written.time - (smb_tzutc(msg->hdr.when_written.zone) * 60))); - if(column) - CRLF; - CRLF; // use a custom header file if you don't want a blank line separating the header and body + bputs(text[MsgHdrBodySeparator]); } for(i=0;i<msg->total_hfields;i++) { if(msg->hfield[i].type==SENDER) diff --git a/src/sbbs3/text.h b/src/sbbs3/text.h index 935040e8e7..4dbdc62152 100644 --- a/src/sbbs3/text.h +++ b/src/sbbs3/text.h @@ -808,6 +808,7 @@ enum { ,SPAMVisibilityIsNow ,VoteInThisPollNow ,MIMEDecodedPlainText + ,MsgHdrBodySeparator ,TOTAL_TEXT }; diff --git a/src/sbbs3/text_defaults.c b/src/sbbs3/text_defaults.c index 7871be7f00..ec943a0564 100644 --- a/src/sbbs3/text_defaults.c +++ b/src/sbbs3/text_defaults.c @@ -11,7 +11,7 @@ const char * const text_defaults[TOTAL_TEXT]={ "\x01\x6e\x01\x63\xc4\xc4\xc4\xc4\xc4\xfa\xfa\xfa\xfa\x0d\x0a\x01\x68\xb3\x20\x01\x62\x53\x75\x62\x6a\x01\x6e\x01\x62\x3a\x20\x01" "\x68\x01\x63\x25\x2e\x37\x30\x73" // 001 MsgSubj ,"\x0d\x0a\xb3\x20\x01\x62\x41\x74\x74\x72\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x25\x73\x25\x73\x25\x73\x25\x73\x25\x73\x25\x73" - "\x25\x73\x25\x73\x25\x73\x25\x73\x25\x73\x25\x73\x25\x73" // 002 MsgAttr + "\x25\x73\x25\x73\x25\x73\x25\x73\x25\x73\x25\x73\x25\x73\x25\x73" // 002 MsgAttr ,"\x0d\x0a\xb3\x20\x01\x62\x54\x6f\x20\x20\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x25\x2e\x37\x30\x73" // 003 MsgTo ,"\x20\x23\x25\x73" // 004 MsgToExt ,"\x20\x28\x25\x2e\x34\x30\x73\x29" // 005 MsgToNet @@ -1320,4 +1320,5 @@ const char * const text_defaults[TOTAL_TEXT]={ "\x6f\x77\x2e\x0d\x0a" // 796 VoteInThisPollNow ,"\x01\x6e\x01\x6d\x4d\x49\x4d\x45\x2d\x64\x65\x63\x6f\x64\x65\x64\x20\x70\x6c\x61\x69\x6e\x2d\x74\x65\x78\x74\x3a\x01\x6e\x0d\x0a" "" // 797 MIMEDecodedPlainText + ,"\x01\x2f\x0d\x0a" // 798 MsgHdrBodySeparator }; -- GitLab