simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Fri Nov 26 17:59:58 GMT 2021


TL;DR:
  d13547d5 Move some more files into subdirectories.
  3260e429 Move STR() and CAT() into defs.h.
  53f7da8c Merge be_*.c into one ifdef-controlled module.

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:           2021-11-26 17:59:58

commit d13547d5044fa50df0f713e39743c97838d14ea2
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=d13547d5044fa50df0f713e39743c97838d14ea2;hp=67b11add593153244f4ec910352c4a65fb3d63c9
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Nov 23 18:52:15 2021 +0000

    Move some more files into subdirectories.
    
    While I'm in the mood for cleaning up the top-level directory here:
    all the 'nostuff.c' files have moved into a new 'stubs' directory, and
    I broke up be_misc.c into smaller modules that can live in 'utils'.

 CMakeLists.txt                        |  6 ++--
 network.h                             |  3 --
 nocmdline.c => stubs/nocmdline.c      |  0
 nogss.c => stubs/nogss.c              |  0
 noprint.c => stubs/noprint.c          |  0
 norand.c => stubs/norand.c            |  0
 noterm.c => stubs/noterm.c            |  0
 notiming.c => stubs/notiming.c        |  0
 nullplug.c => stubs/nullplug.c        |  0
 unix/CMakeLists.txt                   | 23 +++++++------
 utils/CMakeLists.txt                  |  2 ++
 utils/backend_socket_log.c            | 62 +++++++++++++++++++++++++++++++++++
 be_misc.c => utils/log_proxy_stderr.c | 61 ----------------------------------
 windows/CMakeLists.txt                | 12 +++----
 14 files changed, 84 insertions(+), 85 deletions(-)

commit 3260e429a13efdbc8e371206f26c2761b365ab13
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=3260e429a13efdbc8e371206f26c2761b365ab13;hp=d13547d5044fa50df0f713e39743c97838d14ea2
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Nov 24 19:02:40 2021 +0000

    Move STR() and CAT() into defs.h.
    
    I'm actually quite surprised there was only _one_ copy of each of
    these standard macros in the code base, given my general habit of
    casually redefining them anywhere I need them! But each one was in a
    silly place. Moved them up to the top level where they're available
    globally.

 defs.h             | 24 ++++++++++++++++++++++++
 unix/gtk-common.c  |  2 --
 windows/platform.h |  2 --
 3 files changed, 24 insertions(+), 4 deletions(-)

commit 53f7da8ce74e998e9987fddbbd73e6910064e87d
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=53f7da8ce74e998e9987fddbbd73e6910064e87d;hp=3260e429a13efdbc8e371206f26c2761b365ab13
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Nov 26 17:58:55 2021 +0000

    Merge be_*.c into one ifdef-controlled module.
    
    This commit replaces all those fiddly little linking modules
    (be_all.c, be_none.c, be_ssh.c etc) with a single source file
    controlled by ifdefs, and introduces a function be_list() in
    setup.cmake that makes it easy to compile a version of it appropriate
    to each application.
    
    This is a net reduction in code according to 'git diff --stat', even
    though I've introduced more comments. It also gets rid of another pile
    of annoying little source files in the top-level directory that didn't
    deserve to take up so much room in 'ls'.
    
    More concretely, doing this has some maintenance advantages.
    Centralisation means less to maintain (e.g. n_ui_backends is worked
    out once in a way that makes sense everywhere), and also, 'appname'
    can now be reliably set per program. Previously, some programs got the
    wrong appname due to sharing the same linking module (e.g. Plink had
    appname="PuTTY"), which was a latent bug that would have manifested if
    I'd wanted to reuse the same string in another context.
    
    One thing I've changed in this rework is that Windows pterm no longer
    has the ConPTY backend in its backends[]: it now has an empty one. The
    special be_conpty.c module shouldn't really have been there in the
    first place: it was used in the very earliest uncommitted drafts of
    the ConPTY work, where I was using another method of selecting that
    backend, but now that Windows pterm has a dedicated
    backend_vt_from_conf() that refers to conpty_backend by name, it has
    no need to live in backends[] at all, just as it doesn't have to in
    Unix pterm.

 CMakeLists.txt         |  17 ++++---
 be_all.c               |  31 -------------
 be_all_s.c             |  32 --------------
 be_list.c              | 118 +++++++++++++++++++++++++++++++++++++++++++++++++
 be_none.c              |  15 -------
 be_nos_s.c             |  22 ---------
 be_nossh.c             |  21 ---------
 be_ssh.c               |  18 --------
 cmake/setup.cmake      |  14 ++++++
 fuzzterm.c             |   1 -
 pscp.c                 |   2 -
 psftp.c                |   2 -
 unix/CMakeLists.txt    |  22 ++++-----
 unix/pageant.c         |   2 -
 unix/psusan.c          |   2 -
 unix/pterm.c           |   1 -
 unix/uppity.c          |   2 -
 windows/CMakeLists.txt |   8 ++--
 windows/be_conpty.c    |  13 ------
 19 files changed, 158 insertions(+), 185 deletions(-)



More information about the tartarus-commits mailing list