simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Thu Mar 27 07:50:26 GMT 2025


TL;DR:
  2b00d599 Parse DCS commands too

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2025-03-27 07:50:26

commit 2b00d599d35ec7a79f407a91bf6d360df65e97e2
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=2b00d599d35ec7a79f407a91bf6d360df65e97e2;hp=24a2ede7732eb7e29232540dee81ebc8f469d568
Author: Johannes Altmanninger <aclopte at gmail.com>
Date:   Wed Mar 12 22:04:38 2025 +0100

    Parse DCS commands too
    
    [ECMA-48] section 8.3.27 specifies the format of Device Control String
    (DCS) commands which are used for XTGETTCAP and other sequences.
    
    We don't parse DCS commands. This causes this command to wrongly
    output some characters:
    
        printf '\033P+q616d\033\\'
    
    Fix that by parsing DCS commands just like other OSC-like commands.
    (Apart from the initial characters, DCS has the same format as OSC.)
    
    We also allow 0x07 as sequence terminator which does not seem specified
    but a lot of people use it with OSC; it's fine because 0x07 is not
    allowed in the OSC/DCS payload.
    
    [ECMA-48]: https://www.ecma-international.org/wp-content/uploads/ECMA-48_2nd_edition_august_1979.pdf

 terminal/terminal.c | 8 +++++---
 terminal/terminal.h | 3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)



More information about the tartarus-commits mailing list