Skip to content
Snippets Groups Projects
Commit a7d85fec authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Rename WM_CR_STRIP to WM_STRIP_CR to match the <verb><noun> pattern

of other WM_* mode flags (e.g. WM_EXPANDLF).
parent 79f3aed0
Branches
No related tags found
No related merge requests found
...@@ -609,7 +609,7 @@ var WM_EDIT =(1<<10); /* Editing existing message */ ...@@ -609,7 +609,7 @@ var WM_EDIT =(1<<10); /* Editing existing message */
var WM_FORCEFWD =(1<<11); /* Force "yes" to ForwardMailQ for email */ var WM_FORCEFWD =(1<<11); /* Force "yes" to ForwardMailQ for email */
var WM_NOFWD =(1<<12); /* Don't forward email to netmail */ var WM_NOFWD =(1<<12); /* Don't forward email to netmail */
var WM_EXPANDLF =(1<<13); /* Insure CRLF-terminated lines */ var WM_EXPANDLF =(1<<13); /* Insure CRLF-terminated lines */
var WM_CR_STRIP =(1<<14); /* Insure no carriage-returns in output */ var WM_STRIP_CR =(1<<14); /* Insure no carriage-returns in output */
/********************************************/ /********************************************/
/************************************************/ /************************************************/
......
...@@ -732,7 +732,7 @@ typedef enum { // Values for xtrn_t.event ...@@ -732,7 +732,7 @@ typedef enum { // Values for xtrn_t.event
#define WM_FORCEFWD (1 << 11) // Force "yes" to ForwardMailQ for email #define WM_FORCEFWD (1 << 11) // Force "yes" to ForwardMailQ for email
#define WM_NOFWD (1 << 12) // Don't forward email to netmail #define WM_NOFWD (1 << 12) // Don't forward email to netmail
#define WM_EXPANDLF (1 << 13) // Insure CRLF-terminated lines #define WM_EXPANDLF (1 << 13) // Insure CRLF-terminated lines
#define WM_CR_STRIP (1 << 14) // Insure no carriage-returns in output #define WM_STRIP_CR (1 << 14) // Insure no carriage-returns in output
// Bits in the mode of loadposts() // Bits in the mode of loadposts()
#define LP_BYSELF (1 << 0) // Include messages sent by self #define LP_BYSELF (1 << 0) // Include messages sent by self
......
...@@ -155,14 +155,14 @@ int sbbs_t::process_edited_text(char* buf, FILE* stream, int mode, unsigned* lin ...@@ -155,14 +155,14 @@ int sbbs_t::process_edited_text(char* buf, FILE* stream, int mode, unsigned* lin
useron_xedit = 0; useron_xedit = 0;
for (l = i = 0; buf[l] && i < maxlines; l++) { for (l = i = 0; buf[l] && i < maxlines; l++) {
if (buf[l] == '\r' && (mode & WM_CR_STRIP)) if (buf[l] == '\r' && (mode & WM_STRIP_CR))
continue; continue;
if ((uchar)buf[l] == FIDO_SOFT_CR && useron_xedit if ((uchar)buf[l] == FIDO_SOFT_CR && useron_xedit
&& !(cfg.xedit[useron_xedit - 1]->misc & XTRN_UTF8)) { && !(cfg.xedit[useron_xedit - 1]->misc & XTRN_UTF8)) {
i++; i++;
switch (cfg.xedit[useron_xedit - 1]->soft_cr) { switch (cfg.xedit[useron_xedit - 1]->soft_cr) {
case XEDIT_SOFT_CR_EXPAND: case XEDIT_SOFT_CR_EXPAND:
if (mode & WM_CR_STRIP) if (mode & WM_STRIP_CR)
len += fwrite("\n", 1, 1, stream); len += fwrite("\n", 1, 1, stream);
else else
len += fwrite(crlf, 1, 2, stream); len += fwrite(crlf, 1, 2, stream);
...@@ -225,7 +225,7 @@ int sbbs_t::process_edited_text(char* buf, FILE* stream, int mode, unsigned* lin ...@@ -225,7 +225,7 @@ int sbbs_t::process_edited_text(char* buf, FILE* stream, int mode, unsigned* lin
buf[l] = 0; buf[l] = 0;
} }
if (lastch != '\n') { if (lastch != '\n') {
if (mode & WM_CR_STRIP) if (mode & WM_STRIP_CR)
len += fwrite("\n", 1, 1, stream); len += fwrite("\n", 1, 1, stream);
else else
len += fwrite(crlf, 1, 2, stream); len += fwrite(crlf, 1, 2, stream);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment