simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Fri Sep 22 17:18:56 BST 2023


TL;DR:
  374bb487 Remove spurious 'clipboard' storage enumeration.
  b29758c1 Add ability to specify custom load and save separately.
  4ec48921 Centralise defaults for non-saved options.
  18ba4fe8 conf.h: improve comments for a couple of options.

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:           2023-09-22 17:18:56

commit 374bb4872e65b87efc9d1208372479dcf2196923
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=374bb4872e65b87efc9d1208372479dcf2196923;hp=92594f3e41a84b5c3205485d99162ab63b6bac3f
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Sep 22 15:58:29 2023 +0100

    Remove spurious 'clipboard' storage enumeration.
    
    It's not used! The only config items that specified it are doing their
    load/save in a custom way anyway, and they _don't_ use anything
    resembling that enum - instead, they map the integer values in Conf to
    strings in the storage format. That enum was a total lie and an
    artefact of my conversion macros. Ahem.

 conf-enums.h | 7 -------
 conf.h       | 3 ---
 2 files changed, 10 deletions(-)

commit b29758c1b6621d76fd97caebfdf7c3a50dcc97b9
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b29758c1b6621d76fd97caebfdf7c3a50dcc97b9;hp=374bb4872e65b87efc9d1208372479dcf2196923
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Sep 22 16:04:25 2023 +0100

    Add ability to specify custom load and save separately.
    
    This allows a couple more settings to be treated automatically on
    save, which are more complicated on load because they still honour
    older alternative save keywords.
    
    In particular, CONF_proxy_type and CONF_remote_qtitle_action now have
    explicit enum mappings. These were needed for the automated save code,
    but also, I've rewritten the custom load code to use them too. This
    decouples the storage format of those settings from the order of
    values in the internal enum, which is generally an advantage of
    specifying storage enums explicitly.
    
    Those two settings weren't already tested by test_conf, because I
    wasn't changing them in previous commits. Now I've added extra code
    that does test them, and verified it works when backported to commit
    b567c9b2b5e159f where I introduced test_conf before beginning the main
    refactoring.
    
    A setting can also be specified explicitly as not loaded and saved at
    all. There were quite a few commented that way, but now there's a
    machine-readable indication of it.
    
    test_conf will now check that all these settings make sense together -
    things shouldn't have a save keyword unless they use it, and should
    have one if they don't, and shouldn't specify combinations of options
    that conflict.
    
    (For that reason, test_conf is now also running the consistency check
    before the main test, so that a missing keyword will cause an error
    message _before_ it causes a segfault, saving some debugging!)

 conf-enums.h      |  26 ++++++++
 conf.h            | 131 +++++++++++++++------------------------
 putty.h           |   4 ++
 settings.c        |  72 +++++++++++-----------
 test/test_conf.c  | 180 +++++++++++++++++++++++++++++++++++++++++++-----------
 utils/conf_data.c |  17 +++---
 6 files changed, 272 insertions(+), 158 deletions(-)

commit 4ec489212444f0c81f5d030cd1b9dbb41a54cea4
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=4ec489212444f0c81f5d030cd1b9dbb41a54cea4;hp=b29758c1b6621d76fd97caebfdf7c3a50dcc97b9
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Sep 22 16:30:24 2023 +0100

    Centralise defaults for non-saved options.
    
    These are now specified in conf.h and filled in by automated code,
    which means test_conf can make sure we didn't forget to provide them.
    
    The default for a mapping type (not that we currently have any unsaved
    ones) is expected to be empty.
    
    Also, while adding test_conf checks, I realised I hadn't filled in the
    rest of the comment in conf.h. Belatedly updated that.

 conf.h           | 24 +++++++++++++++++++++++-
 settings.c       | 25 ++++++++++++++++++-------
 test/test_conf.c | 18 +++++++++++++++---
 3 files changed, 56 insertions(+), 11 deletions(-)

commit 18ba4fe868fb7075a36d0747486d714d5e3caff2
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=18ba4fe868fb7075a36d0747486d714d5e3caff2;hp=4ec489212444f0c81f5d030cd1b9dbb41a54cea4
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Sep 22 17:12:10 2023 +0100

    conf.h: improve comments for a couple of options.

 conf.h | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)



More information about the tartarus-commits mailing list