simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Wed Apr 26 11:04:16 BST 2023


TL;DR:
  62b69a4f Fix factor-of-1000 error in Unix bell overload config.

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-04-26 11:04:16

commit 62b69a4f16875e75ece3c06fbe474104c5b5c089
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=62b69a4f16875e75ece3c06fbe474104c5b5c089;hp=289d123fb8bb8175c5a0d7a9944d45556f3886db
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Apr 26 10:45:10 2023 +0100

    Fix factor-of-1000 error in Unix bell overload config.
    
    During the transition to cmake, commit b00e5fb12929da5 renamed
    unix/unix.h to unix/platform.h, and for visual consistency, also
    renamed the guard macro PUTTY_UNIX_H to PUTTY_UNIX_PLATFORM_H.
    
    But I had failed to notice that that guard macro is re-tested in
    settings.c, as a convenient method of knowing whether we're building
    the Windows or Unix version of PuTTY in order to store some settings
    differently. So all those '#ifdef PUTTY_UNIX_H' statements silently
    became equivalent to '#if 0', because PUTTY_UNIX_H is _never_ defined
    any more.
    
    Specifically, these ifdefs were causing the time intervals relating to
    bell overloads to be off by a factor of 1000, because for some reason
    I can't remember, we were storing those intervals using a different
    time unit on Unix and Windows. In my own configuration, for example,
    ~/.putty/sessions/Default%20Settings contains "BellOverloadT=2000000"
    and "BellOverloadS=5000000", which originally meant that too many
    bells within 2 seconds would silence the bell until there were 5
    seconds of silence - but current PuTTY shows it in the configurer as
    2000 and 5000 seconds!
    
    This commit belatedly rewrites the ifdefs in settings.c, so that saved
    sessions from before 0.77 will now be interpreted correctly. Saved
    sessions from after that may need a rewrite. (But you have to have one
    or the other.)

 settings.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)



More information about the tartarus-commits mailing list