From b6cebf82986e178a0594a09fdee52de6f56b9350 Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Windows 11)" <rob@synchro.net>
Date: Tue, 8 Apr 2025 16:44:45 -0700
Subject: [PATCH] Disable Celerity "pipe code" parsing when displaying ".rip"
 files

RIP sequences conflict with Celerity pipe codes, so don't convert them to
color codes (even when enabled in SCFG->Systems->Extra Attribute Codes...).

We *used* to disable all pipe code parsing when sending to a RIP-enabled
terminal but since we don't do that any longer, this is a better/cleaner fix.

Renegade "pipe codes" (|xx where xx are decimal digits) don't "seem" to
conflict with any RIP sequences (so leave that parsing enabled for .rip files)
but Deuce can help me to be sure about that (please).
---
 src/sbbs3/prntfile.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/sbbs3/prntfile.cpp b/src/sbbs3/prntfile.cpp
index 31485a3242..5266f11e14 100644
--- a/src/sbbs3/prntfile.cpp
+++ b/src/sbbs3/prntfile.cpp
@@ -79,6 +79,9 @@ bool sbbs_t::printfile(const char* inpath, int mode, int org_cols, JSObject* obj
 	if (!(mode & P_NOXATTRS))
 		mode |= (cfg.sys_misc & SM_XATTR_SUPPORT) << P_XATTR_SHIFT;
 
+	if (rip) // Let's not eat the pipe codes used in RIP files
+		mode &= ~(P_CELERITY);
+
 	if ((stream = fnopen(&file, fpath, O_RDONLY | O_DENYNONE)) == NULL) {
 		if (!(mode & P_NOERROR)) {
 			lprintf(LOG_NOTICE, "!Error %d (%s) opening: %s"
-- 
GitLab