simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Wed Jun 1 09:36:15 BST 2022


TL;DR:
  8a907510 decode_codepage(): add missing const in prototype.
  5a28658a Remove uni_tbl from struct unicode_data.

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:           2022-06-01 09:36:14

commit 8a907510dd8fa184f49b367c8207fc58c4e04e9f
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=8a907510dd8fa184f49b367c8207fc58c4e04e9f;hp=a647296d51f876c2302c5f14be526f2c3db3b6ad
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Jun 1 08:29:29 2022 +0100

    decode_codepage(): add missing const in prototype.

 putty.h           | 2 +-
 unix/unicode.c    | 2 +-
 windows/unicode.c | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

commit 5a28658a6d815a69df75166115fb2c1e20b5c19a
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=5a28658a6d815a69df75166115fb2c1e20b5c19a;hp=8a907510dd8fa184f49b367c8207fc58c4e04e9f
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Jun 1 08:35:12 2022 +0100

    Remove uni_tbl from struct unicode_data.
    
    Instead of maintaining a single sparse table mapping Unicode to the
    currently selected code page, we now maintain a collection of such
    tables mapping Unicode to any code page we've so far found a need to
    work with, and we add code pages to that list as necessary, and never
    throw them away (since there are a limited number of them).
    
    This means that the wc_to_mb family of functions are effectively
    stateless: they no longer depend on a 'struct unicode_data'
    corresponding to the current terminal settings. So I've removed that
    parameter from all of them.
    
    This fills in the missing piece of yesterday's commit a216d86106d40c3:
    now wc_to_mb too should be able to handle internally-implemented
    character sets, by hastily making their reverse mapping table if it
    doesn't already have it.
    
    (That was only a _latent_ bug, because the only use of wc_to_mb in the
    cross-platform or Windows code _did_ want to convert to the currently
    selected code page, so the old strategy worked in that case. But there
    was no protection against an unworkable use of it being added later.)

 misc.h               |   4 +-
 putty.h              |   4 +-
 terminal/terminal.c  |   2 +-
 unix/unicode.c       |   3 +-
 unix/unifont.c       |   7 ++-
 unix/window.c        |   3 +-
 utils/dup_wc_to_mb.c |   9 ++--
 windows/unicode.c    | 149 +++++++++++++++++++++++++++++++++++++++------------
 windows/window.c     |   2 +-
 9 files changed, 130 insertions(+), 53 deletions(-)



More information about the tartarus-commits mailing list