Commit 8edfebc7 authored by rswindell's avatar rswindell
Browse files

putmsg() (used to display menus, text files, messages to the terminal console)

no longer ignores Ctrl-Z characters (CP/M EOF) by default. If you want the
old behavior (Ctrl-Z characters not displayed, just skipped), specify the
P_CPM_EOF mode flag.
parent 413e624f
/* putmsg.cpp */
/* Synchronet message/menu display routine */
/* $Id$ */
......@@ -46,7 +44,7 @@
/* If P_SAVEATR bit is set in mode, the attributes set by the message */
/* will be the current attributes after the message is displayed, otherwise */
/* the attributes prior to diplaying the message are always restored. */
/* Ignores Ctrl-Z's */
/* Ignores Ctrl-Z's (only in P_CPM_EOF mode) */
/****************************************************************************/
char sbbs_t::putmsg(const char *buf, long mode)
{
......@@ -264,7 +262,7 @@ char sbbs_t::putmsg(const char *buf, long mode)
if(i) /* if valid string, go to top */
continue;
}
if(str[l]!=CTRL_Z) {
if(!(mode&P_CPM_EOF) || str[l]!=CTRL_Z) {
outchar(str[l]);
#if 0
if(!(mode&P_HTML) && !exatr && !outchar_esc && lncntr && lbuflen && cols && ++col==cols)
......
......@@ -717,6 +717,7 @@ typedef enum { /* Values for xtrn_t.event */
#define P_HTML (1<<5) /* Message is HTML */
#define P_NOCRLF (1<<6) /* Don't prepend a CRLF in printfile() */
#define P_WORDWRAP (1<<7) /* Word-wrap long lines for user's terminal */
#define P_CPM_EOF (1<<8) /* Ignore Ctrl-Z chars (CPM End-of-File) */
/* Bits in 'mode' for listfiles */
#define FL_ULTIME (1<<0) /* List files by upload time */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment