simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Fri Sep 22 15:41:15 BST 2023


TL;DR:
  41b4f78b Make test_conf return failure status on failure!
  30d3b609 Fix type mismatches in new conf_key_info.
  92594f3e test_conf: directly check consistency of conf_key_info.

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 15:41:15

commit 41b4f78b9bc8e332bc2b5f14f459c18a4aef6b16
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=41b4f78b9bc8e332bc2b5f14f459c18a4aef6b16;hp=8e9520837761ac3806690904aa3763960c63369e
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Sep 22 15:15:11 2023 +0100

    Make test_conf return failure status on failure!
    
    Ahem. Of course I've been running it interactively until now, so I
    never noticed that I'd forgotten to fill in that important point. But
    now it's run as part of my build, it should make sure to fail if it
    fails.

 test/test_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 30d3b609d36d824d0a8710bc33fbd9f131934066
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=30d3b609d36d824d0a8710bc33fbd9f131934066;hp=41b4f78b9bc8e332bc2b5f14f459c18a4aef6b16
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Sep 22 15:31:02 2023 +0100

    Fix type mismatches in new conf_key_info.
    
    I suspected there'd be one or two mistakes introduced by that
    transcription in spite of the test suite, and there were!
    
    CONF_mouseautocopy had its default labelled as int rather than bool,
    because it didn't _look_ boolean to my conversion scripts or to my
    eyeballs - but its default value is actually a macro that expands to
    'true' or 'false' (depending on platform), so it is really.
    
    And CONF_supdup_ascii_set, conversely, is an int which had its default
    labelled as bool, which was due to my conversion scripts faithfully
    transcribing the same confusion in the original code.

 conf.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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

    test_conf: directly check consistency of conf_key_info.
    
    This is why I wrote conf.h in the form of macros that expanded to
    named structure field assignments, instead of just filling it with
    named structure field assignments directly. This way, I can #include
    the same file again with different macro definitions, and build up a
    list of what fields were set in what config options.
    
    This new code checks that if a config option has a default, then the
    type of the default matches the declared type of the option value
    itself. That's what caught the two goofs in the previous commit.
    
    This is also the part of test_conf that I _won't_ want to delete once
    I've finished with the refactoring: it can stay there forever, doing
    type checking at test time that the compiler isn't doing for me at
    build time.

 test/test_conf.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)



More information about the tartarus-commits mailing list