From db0539fbc69b926acc59bcd33896b368a4604d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net> Date: Mon, 3 Mar 2025 16:59:27 -0500 Subject: [PATCH] Always pass P_NOATCODES when calling print() This is to work around an issue when fiddling with text data, and will likely be able to be removed at some point. --- exec/textedit.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/exec/textedit.js b/exec/textedit.js index e8b0bb0e2a..19671b55cd 100644 --- a/exec/textedit.js +++ b/exec/textedit.js @@ -1,3 +1,4 @@ +require("sbbsdefs.js", "P_NOATCODES"); require("key_defs.js", "KEY_UP"); const a = "\x01"; @@ -272,7 +273,7 @@ function runmsg() console.cleartoeol(); } console.gotoxy(0, 0); - console.print("Example text\r\nbefore message.\r\n"); + console.print("Example text\r\nbefore message.\r\n", P_NOATCODES); console.question = "Example question"; var fmtd = formatted(a + 'Q' + msgstr, msg); switch (displaywith) { @@ -285,11 +286,11 @@ function runmsg() df = 'mnemonics()'; break; case 2: - console.print(fmtd); + console.print(fmtd, P_NOATCODES); df = 'print() '; break; } - console.print("Example text after message.\r\n"); + console.print("Example text after message.\r\n", P_NOATCODES); } // TODO: Message 765 is too big @@ -299,7 +300,7 @@ function redraw(str, num) console.clear(); console.gotoxy(0,0); console.attributes = 7; - console.print("Example text\r\nbefore message.\r\n"); + console.print("Example text\r\nbefore message.\r\n", P_NOATCODES); console.question = "Example question"; // Stuff in a CTRL-C for things like @EXEC:yesnobar@ console.ungetkeys(ctrl('C'), true); @@ -314,27 +315,27 @@ function redraw(str, num) df = 'mnemonics()'; break; case 2: - console.print(fmtd); + console.print(fmtd, P_NOATCODES); df = 'print() '; break; } // Pull out the CTRL-C console.inkey(); - console.print("Example text after message.\r\n"); + console.print("Example text after message.\r\n", P_NOATCODES); if (console.screen_columns < 80) { console.gotoxy(0, inprow - 2); - console.print(a + "h" + a + "w" + a + "4" + " " + df + " ^^ As seen on BBS ^^" + a + ">"); + console.print(a + "h" + a + "w" + a + "4" + " " + df + " ^^ As seen on BBS ^^" + a + ">", P_NOATCODES); console.gotoxy(0, inprow - 1); - console.print(a + "h" + a + "w" + a + "4" + " vv " + tnames[num] + " (" + num + ") vv" + a + ">"); + console.print(a + "h" + a + "w" + a + "4" + " vv " + tnames[num] + " (" + num + ") vv" + a + ">", P_NOATCODES); console.gotoxy(0, inprow); } else { console.gotoxy(0, inprow - 1); - console.print(a + "h" + a + "w" + a + "4" + " " + df + " ^^ As seen on BBS ^^" + " vv " + tnames[num] + " (" + num + ") vv" + a + ">"); + console.print(a + "h" + a + "w" + a + "4" + " " + df + " ^^ As seen on BBS ^^" + " vv " + tnames[num] + " (" + num + ") vv" + a + ">", P_NOATCODES); console.gotoxy(0, inprow); } console.cleartoeos(7); - console.print(format_entry(msgstr)); + console.print(format_entry(msgstr), P_NOATCODES); place_cursor(); } -- GitLab