From dc49cd4292f64112a3c18a140a3cab539ffbd728 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Thu, 11 Oct 2018 04:11:33 +0000
Subject: [PATCH] Since rev 1.27 of prntfile.cpp (Sept-30), the stock
 scanmsg.asc menu ('?' from the Reading Messages prompt) would not fully
 display because it contains a Ctrl-Z character (for the right-arrow symbol).
 Rather than revert the menu() change (where CPM-EOF mode is the default for
 menu files) - change the Ctrl-AZ sequence from "premature end-of-file" to
 instead send an actual Ctrl-Z character (similiar to Ctrl-AA, Ctrl-AL, etc.).
 This changes the long-standing behavior of what Ctrl-AZ does, but since that
 was a dubious "feature" that I'm pretty sure nobody used, I'm will to take
 that chance. If you need a premature EOF now, just use a regular ole Ctrl-Z
 char instead (or even the @eof@ code). Of course the msgscan.asc now has to
 change accordingly.

---
 src/sbbs3/con_out.cpp | 8 ++++++--
 src/sbbs3/putmsg.cpp  | 3 +--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/sbbs3/con_out.cpp b/src/sbbs3/con_out.cpp
index e231950b6b..c815fee7ad 100644
--- a/src/sbbs3/con_out.cpp
+++ b/src/sbbs3/con_out.cpp
@@ -1,4 +1,5 @@
 /* Synchronet console output routines */
+// vi: tabstop=4
 
 /* $Id$ */
 
@@ -89,7 +90,7 @@ int sbbs_t::bputs(const char *str)
 /* Raw put string (remotely)												*/
 /* Performs Telnet IAC escaping												*/
 /* Performs saveline buffering (for restoreline)							*/
-/* DOES NOT expand ctrl-A codes, track colunms, lines, auto-pause, etc.     */
+/* DOES NOT expand ctrl-A codes, track columns, lines, auto-pause, etc.     */
 /****************************************************************************/
 int sbbs_t::rputs(const char *str, size_t len)
 {
@@ -474,7 +475,7 @@ void sbbs_t::ctrl_a(char x)
 		case ')':   /* turn echo back on */
 			console&=~CON_ECHO_OFF;
 			break;
-		case '+':	/* push current attribte */
+		case '+':	/* push current attribute */
 			if(attr_sp<(int)sizeof(attr_stack))
 				attr_stack[attr_sp++]=curatr;
 			break;
@@ -557,6 +558,9 @@ void sbbs_t::ctrl_a(char x)
 		case 'A':   /* Ctrl-A */
 			outchar(CTRL_A);
 			break;
+		case 'Z':	/* Ctrl-Z */
+			outchar(CTRL_Z);
+			break;
 		case 'H': 	/* High intensity */
 			atr|=HIGH;
 			attr(atr);
diff --git a/src/sbbs3/putmsg.cpp b/src/sbbs3/putmsg.cpp
index 7974a4b3d2..e2b4b6f084 100644
--- a/src/sbbs3/putmsg.cpp
+++ b/src/sbbs3/putmsg.cpp
@@ -1,4 +1,5 @@
 /* Synchronet message/menu display routine */
+// vi: tabstop=4
  
 /* $Id$ */
 
@@ -88,8 +89,6 @@ char sbbs_t::putmsg(const char *buf, long mode)
 				printfile(tmp3,0);
 				sys_status&=~SS_NEST_PF; 
 			}
-			else if(toupper(str[l+1])=='Z')             /* Ctrl-AZ==EOF */
-				break;
 			else {
 				ctrl_a(str[l+1]);
 				if((sys_status&SS_ABORT) && !lines_printed)	/* Aborted at (auto) pause prompt (e.g. due to CLS)? */
-- 
GitLab