simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Thu Oct 25 18:50:17 BST 2018


TL;DR:
  f789251e Fix a couple of benign compile warnings.
  6714fcdd Fix a newly introduced segfault in callback.c.
  291c1b07 Remove unused and bit-rotted scroll optimisation.
  64f8f68a Remove the 'Frontend' type and replace it with a vtable.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2018-10-25 18:50:17

commit f789251ee495a05068589db15719ce5bd11d27f0
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=f789251ee495a05068589db15719ce5bd11d27f0;hp=8a60fdaa57e6e6691cfcf661152e151d63dd498b
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Oct 25 18:33:56 2018 +0100

    Fix a couple of benign compile warnings.
    
    A function containing assert(FALSE && "Should never be called")
    doesn't _really_ need to return a value, but it makes compilers
    happier if it pretends to.

 ssh2connection-client.c | 2 ++
 1 file changed, 2 insertions(+)

commit 6714fcddc626f88373dbaf02af182f3236ca2109
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=6714fcddc626f88373dbaf02af182f3236ca2109;hp=f789251ee495a05068589db15719ce5bd11d27f0
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Oct 25 18:34:19 2018 +0100

    Fix a newly introduced segfault in callback.c.
    
    Colin Harrison points out that commit c31e3cd43 was less cautious than
    it should have been: when delete_callbacks_for_context nulls out the
    'next' pointer in the new tail element of the callbacks list, it
    should only do so if there _is_ a new tail element. If the list has
    just become empty, that won't work very well!

 callback.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

commit 291c1b07f22ecaccdedf2bfe4a0923673eb8f14b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=291c1b07f22ecaccdedf2bfe4a0923673eb8f14b;hp=6714fcddc626f88373dbaf02af182f3236ca2109
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Oct 25 18:34:39 2018 +0100

    Remove unused and bit-rotted scroll optimisation.
    
    In the very old days, when PuTTY was new and computers were slow, I
    tried to implement a feature where scrolling the window would be
    implemented using a fast rectangle-copy GDI operation, rather than an
    expensive character-by-character redraw of all the changed areas.
    
    It never quite worked right, and I ended up conditioning it out on
    Windows, and never even tried to implement it on GTK. It's now been
    sitting around unused for so long that I think it's no longer worth
    keeping in the code at all - if I tried to put it back in, it surely
    wouldn't even compile, and would need rewriting from scratch anyway.
    
    Disturbingly, it looks as if I _tried_ to re-enable it at one point,
    in that there was a '#define OPTIMISE_IS_SCROLL 1' in putty.h - but
    that never had any effect, because the macro name is misspelled. All
    the #ifdefs are for 'OPTIMISE_SCROLL', without the 'IS'. So despite
    appearances, it really _has_ been conditioned out all along!

 putty.h          |   4 --
 terminal.c       | 122 +++----------------------------------------------------
 terminal.h       |  13 ------
 windows/window.c |  21 ----------
 4 files changed, 5 insertions(+), 155 deletions(-)

commit 64f8f68a3434e883bb672f5e484e72845765da4d
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=64f8f68a3434e883bb672f5e484e72845765da4d;hp=291c1b07f22ecaccdedf2bfe4a0923673eb8f14b
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Oct 25 18:44:04 2018 +0100

    Remove the 'Frontend' type and replace it with a vtable.
    
    After the recent Seat and LogContext revamps, _nearly_ all the
    remaining uses of the type 'Frontend' were in terminal.c, which needs
    all sorts of interactions with the GUI window the terminal lives in,
    from the obvious (actually drawing text on the window, reading and
    writing the clipboard) to the obscure (minimising, maximising and
    moving the window in response to particular escape sequences).
    
    All of those functions are now provided by an abstraction called
    TermWin. The few remaining uses of Frontend after _that_ are internal
    to a particular platform directory, so as to spread the implementation
    of that particular kind of Frontend between multiple source files; so
    I've renamed all of those so that they take a more specifically named
    type that refers to the particular implementation rather than the
    general abstraction.
    
    So now the name 'Frontend' no longer exists in the code base at all,
    and everywhere one used to be used, it's completely clear whether it
    was operating in one of Frontend's three abstract roles (and if so,
    which), or whether it was specific to a particular implementation.
    
    Another type that's disappeared is 'Context', which used to be a
    typedef defined to something different on each platform, describing
    whatever short-lived resources were necessary to draw on the terminal
    window: the front end would provide a ready-made one when calling
    term_paint, and the terminal could request one with get_ctx/free_ctx
    if it wanted to do proactive window updates. Now that drawing context
    lives inside the TermWin itself, because there was never any need to
    have two of those contexts live at the same time.
    
    (Another minor API change is that the window-title functions - both
    reading and writing - have had a missing 'const' added to their char *
    parameters / return values.)
    
    I don't expect this change to enable any particularly interesting new
    functionality (in particular, I have no plans that need more than one
    implementation of TermWin in the same application). But it completes
    the tidying-up that began with the Seat and LogContext rework.

 defs.h             |   3 +-
 fuzzterm.c         | 105 ++++++---
 putty.h            | 165 +++++++++++---
 terminal.c         | 165 +++++++-------
 terminal.h         |   2 +-
 unix/gtkapp.c      |   4 +-
 unix/gtkmain.c     |   2 +-
 unix/gtkwin.c      | 630 +++++++++++++++++++++++++++++------------------------
 unix/unix.h        |   8 +-
 windows/windlg.c   |   2 +-
 windows/window.c   | 317 +++++++++++++++++----------
 windows/winstuff.h |   4 +-
 12 files changed, 839 insertions(+), 568 deletions(-)



More information about the tartarus-commits mailing list