Skip to content
Snippets Groups Projects
Commit 3a1923d8 authored by rswindell's avatar rswindell
Browse files

Export/import the original message editor column width (when known) as a new

FidoNet "Kludge line" (control line): "\1COLS: <columns>\r" where <columns>
is a value between 0 and 255 and a value of 0 is special, meaning "unknown"
and not normally specified (this is the default assumption when there is no
"columns"/COLS header field). When a message editor column width is unknown,
is is normally assumed to have been 80 columns for word-wrapping/re-wrapping
purposes when displaying the message text.

This feature has worked well for Synchronet's QWK networking (i.e. there are
far fewer instances of word-wrapping/re-wrapping issues when viewing messages
on DOVE-Net), so I decided to support this message header field over FTN
(SBBSecho) as well. Hopefully other FidoNet software authors will notice and
support this header field in the future as there are still numerous examples
of word-wrap issues when viewing FidoNet messages. At least Synchronet <->
Synchronet systems over FidoNet should be able to re-wrap and display all
message text nicely when both ends support this kludge line.

Incremented SBBSecho version number to 3.07.
parent e27d4a8f
Branches
Tags
No related merge requests found
...@@ -1213,6 +1213,8 @@ int create_netmail(const char *to, const smbmsg_t* msg, const char *subject, con ...@@ -1213,6 +1213,8 @@ int create_netmail(const char *to, const smbmsg_t* msg, const char *subject, con
if(hdr.origpoint) if(hdr.origpoint)
fprintf(fp,"\1FMPT %hu\r",hdr.origpoint); fprintf(fp,"\1FMPT %hu\r",hdr.origpoint);
fprintf(fp,"\1PID: %s\r", (msg==NULL || msg->ftn_pid==NULL) ? sbbsecho_pid() : msg->ftn_pid); fprintf(fp,"\1PID: %s\r", (msg==NULL || msg->ftn_pid==NULL) ? sbbsecho_pid() : msg->ftn_pid);
if(msg->columns)
fprintf(fp,"\1COLS: %u\r", (unsigned int)msg->columns);
if(msg != NULL) { if(msg != NULL) {
/* Unknown kludge lines are added here */ /* Unknown kludge lines are added here */
for(int i=0; i<msg->total_hfields; i++) for(int i=0; i<msg->total_hfields; i++)
...@@ -3472,6 +3474,13 @@ int fmsgtosmsg(char* fbuf, fmsghdr_t* hdr, uint user, uint subnum) ...@@ -3472,6 +3474,13 @@ int fmsgtosmsg(char* fbuf, fmsghdr_t* hdr, uint user, uint subnum)
msg.hdr.when_written.zone = fmsgzone(fbuf+l); msg.hdr.when_written.zone = fmsgzone(fbuf+l);
} }
else if(!strncmp((char *)fbuf+l+1,"COLS:", 5)) { /* SBBSecho */
l+=5;
while(l<length && fbuf[l] <= ' ' && fbuf[l] >= 0) l++;
uint8_t columns = atoi(fbuf + l);
smb_hfield_bin(&msg, SMB_COLUMNS, columns);
}
else { /* Unknown kludge line */ else { /* Unknown kludge line */
while(l<length && fbuf[l]<=' ' && fbuf[l]>=0) l++; while(l<length && fbuf[l]<=' ' && fbuf[l]>=0) l++;
m=l; m=l;
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include "fidodefs.h" #include "fidodefs.h"
#define SBBSECHO_VERSION_MAJOR 3 #define SBBSECHO_VERSION_MAJOR 3
#define SBBSECHO_VERSION_MINOR 6 #define SBBSECHO_VERSION_MINOR 7
#define SBBSECHO_PRODUCT_CODE 0x12FF /* from http://ftsc.org/docs/ftscprod.013 */ #define SBBSECHO_PRODUCT_CODE 0x12FF /* from http://ftsc.org/docs/ftscprod.013 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment