From d8f67a00406b98d3beb85d85f8839d357d47ac0c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Mon, 31 Mar 2025 09:51:38 -0400
Subject: [PATCH] Split up the subtypes of ECMA-35 escape sequences

These all have slightly different semantics (that don't matter yet),
so split the up appropriately.
---
 src/conio/cterm.adoc | 50 ++++++++++++++++++++++++++++++--------------
 src/syncterm/CHANGES |  1 +
 2 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/src/conio/cterm.adoc b/src/conio/cterm.adoc
index f2232e4525..706decd266 100644
--- a/src/conio/cterm.adoc
+++ b/src/conio/cterm.adoc
@@ -37,7 +37,7 @@ received:
 Any normal printable character when the cursor is at the right
 margin (of the screen or scrollable area).
 
-== Control characters
+== C0 Control characters
 
 === `0x00` NUL (`NUL`)
 In doorway mode, indicates that the next character is
@@ -86,11 +86,25 @@ not valid, the `ESC` is ignored.
 
 SOURCE: <<ECMA-48>>
 
-== Control Codes
+== nF Escape Sequences
 
-Control codes are in the following format: +
-`ESC {'0'` to `'~'}`
-Legal combinations which are not handled are silently dropped.
+nF Escape Sequences are in the following format: +
+`ESC {SPACE to '/}{'0'` to `'~'}` +
+There may be multiple characters from the {SPACE to '/'} before the
+terminating {'@' to '~'} character.
+
+At present, CTerm does not support any nF escape sequences.
+
+SOURCE: <<ECMA-35>>
+
+== Private control functions
+
+Private control functions are in the following format: +
+`ESC {'0'` to `'?'}` +
+
+SOURCE: <<ECMA-35>>
+
+Legal combinations not handled are silently dropped.
 
 === `ESC 7` Save Cursor (`DECSC`)
 Saves the current cursor position same as `CSI s`
@@ -102,6 +116,12 @@ Restores the current cursor position same as `CSI u`
 
 SOURCE: <<VT102>>
 
+== Control functions in the C1 set
+
+Control codes are in the following format: +
+`ESC {'@'` to `'_'}`
+Legal combinations which are not handled are silently dropped.
+
 === `ESC E` Next Line (`NEL`)
 Moves to the line home position of the next line.
 (Same as `CR` `LF`)
@@ -533,22 +553,20 @@ transfer.
 	`CSI = 1 ; pR - n`
 	pR is 0 if JXL support is not available, and 1 if it is.
 
-=== `ESC c` Reset to Initial State (`RIS`)
-Resets all the terminal settings, clears the screen, and homes
-the cursor.
+== Standardized single control functions
 
-SOURCE: <<ECMA-48>>
+Standardized single control functions are in the following format: +
+`ESC {'\`'` to `'~'}` +
 
-== nF Escape Sequences
+SOURCE: <<ECMA-35>>
 
-nF Escape Sequences are in the following format: +
-`ESC {SPACE to '/}{'0'` to `'~'}` +
-There may be multiple characters from the {SPACE to '/'} before the
-terminating {'@' to '~'} character.
+Legal combinations not handled are silently dropped.
 
-At present, CTerm does not support any nF escape sequences.
+=== `ESC c` Reset to Initial State (`RIS`)
+Resets all the terminal settings, clears the screen, and homes
+the cursor.
 
-SOURCE: <<ECMA-35>>
+SOURCE: <<ECMA-48>>
 
 == Control Sequences:
 
diff --git a/src/syncterm/CHANGES b/src/syncterm/CHANGES
index 6c0b1b4505..1341b8a8d8 100644
--- a/src/syncterm/CHANGES
+++ b/src/syncterm/CHANGES
@@ -7,6 +7,7 @@ Don't disable status line for Atari ST modes
 Fix broken vertical (U+00A6) vs. vertical line (U+007C)
 Add custom palette support to list file
 Pass control key combinations in BBC Micro mode
+Add support for DECSC/DECRC control codes
 
 Version 1.6
 ------------
-- 
GitLab