simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sat Oct 6 07:34:51 BST 2018


TL;DR:
  e0130a48 Switch the unifont system over to using FROMFIELD.
  b7982308 Name vtable structure types more consistently.
  884a7df9 Make Socket and Plug into structs.
  ed652a70 Get rid of #ifdef DEFINE_PLUG_METHOD_MACROS.
  9396fcc9 Rename FROMFIELD to 'container_of'.

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-06 07:34:51

commit e0130a48ca94773f80b7b0bd3327e5c0239ca468
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=e0130a48ca94773f80b7b0bd3327e5c0239ca468;hp=96ec2c2500b82c6a354e3472decad75bba660174
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Oct 5 07:02:19 2018 +0100

    Switch the unifont system over to using FROMFIELD.
    
    Now that I'm doing that in so many of the new classes as a more
    type-safe alternative to ordinary C casts, I should make sure all the
    old code is also reaping the benefits. This commit converts the system
    of unifont vtables in the GTK front end, and also the 'unifontsel'
    structure that exposes only a few of its fields outside gtkfont.c.

 unix/gtkfont.c | 59 +++++++++++++++++++++++++++++-----------------------------
 1 file changed, 30 insertions(+), 29 deletions(-)

commit b7982308448deb2cc025c219e971053aa417ff6b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b7982308448deb2cc025c219e971053aa417ff6b;hp=e0130a48ca94773f80b7b0bd3327e5c0239ca468
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Oct 5 07:03:46 2018 +0100

    Name vtable structure types more consistently.
    
    Now they're all called FooVtable, instead of a mixture of that and
    Foo_vtable.

 be_all.c           |  2 +-
 be_all_s.c         |  2 +-
 be_none.c          |  2 +-
 be_nos_s.c         |  2 +-
 be_nossh.c         |  2 +-
 be_ssh.c           |  2 +-
 cmdline.c          |  2 +-
 config.c           |  4 ++--
 defs.h             | 10 +++++-----
 errsock.c          |  4 ++--
 network.h          |  4 ++--
 nullplug.c         |  4 ++--
 pageant.c          |  8 ++++----
 portfwd.c          |  8 ++++----
 proxy.c            |  4 ++--
 proxy.h            |  4 ++--
 putty.h            | 22 +++++++++++-----------
 raw.c              |  6 +++---
 rlogin.c           |  6 +++---
 settings.c         | 12 ++++++------
 ssh.c              |  6 +++---
 sshshare.c         |  8 ++++----
 telnet.c           |  6 +++---
 testback.c         |  4 ++--
 unix/gtkfont.c     | 16 ++++++++--------
 unix/gtkfont.h     |  4 ++--
 unix/gtkwin.c      |  2 +-
 unix/unix.h        |  6 +++---
 unix/uxnet.c       |  4 ++--
 unix/uxpgnt.c      |  4 ++--
 unix/uxplink.c     |  4 ++--
 unix/uxproxy.c     |  4 ++--
 unix/uxpterm.c     |  2 +-
 unix/uxpty.c       |  2 +-
 unix/uxputty.c     |  6 +++---
 unix/uxser.c       |  2 +-
 windows/window.c   |  4 ++--
 windows/winhsock.c |  4 ++--
 windows/winnet.c   |  4 ++--
 windows/winnps.c   |  4 ++--
 windows/winplink.c |  4 ++--
 windows/winser.c   |  2 +-
 windows/winstuff.h |  2 +-
 x11fwd.c           |  4 ++--
 44 files changed, 109 insertions(+), 109 deletions(-)

commit 884a7df94b9bf83ba2915d64f2658e0c55e6491d
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=884a7df94b9bf83ba2915d64f2658e0c55e6491d;hp=b7982308448deb2cc025c219e971053aa417ff6b
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Oct 5 07:24:16 2018 +0100

    Make Socket and Plug into structs.
    
    I think that means that _every_ one of my traitoids is now a struct
    containing a vtable pointer as one of its fields (albeit sometimes the
    only field), and never just a bare pointer.

 defs.h             |  7 ++----
 errsock.c          | 12 +++++------
 network.h          | 46 +++++++++++++++++++++++++++-------------
 nullplug.c         |  4 ++--
 pageant.c          | 22 +++++++++----------
 portfwd.c          | 24 ++++++++++-----------
 proxy.c            | 42 ++++++++++++++++++------------------
 proxy.h            |  4 ++--
 raw.c              | 14 ++++++------
 rlogin.c           | 14 ++++++------
 ssh.c              | 16 +++++++-------
 sshshare.c         | 22 +++++++++----------
 telnet.c           | 14 ++++++------
 unix/uxnet.c       | 62 +++++++++++++++++++++++++++---------------------------
 unix/uxpgnt.c      |  6 +++---
 unix/uxproxy.c     | 28 ++++++++++++------------
 windows/winhsock.c | 24 ++++++++++-----------
 windows/winnet.c   | 46 ++++++++++++++++++++--------------------
 windows/winnps.c   | 12 +++++------
 x11fwd.c           | 12 +++++------
 20 files changed, 222 insertions(+), 209 deletions(-)

commit ed652a70e80ae505a2b0e3302b0d2640df6a0e05
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=ed652a70e80ae505a2b0e3302b0d2640df6a0e05;hp=884a7df94b9bf83ba2915d64f2658e0c55e6491d
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Oct 5 19:42:32 2018 +0100

    Get rid of #ifdef DEFINE_PLUG_METHOD_MACROS.
    
    I don't actually know why this was ever here; it appeared in the very
    first commit that invented Plug in the first place (7b0e08270) without
    explanation. Perhaps Dave's original idea was that sometimes you'd
    need those macros _not_ to be defined so that the same names could be
    reused as the methods for a particular Plug instance? But I don't
    think that ever actually happened, and the code base builds just fine
    with those macros defined unconditionally just like all the other sets
    of method macros we now have, so let's get rid of this piece of cruft
    that was apparently unnecessary all along.

 be_misc.c          | 1 -
 cproxy.c           | 1 -
 errsock.c          | 1 -
 network.h          | 2 --
 nocproxy.c         | 1 -
 proxy.c            | 1 -
 unix/uxnet.c       | 1 -
 unix/uxproxy.c     | 1 -
 unix/uxshare.c     | 1 -
 windows/winhsock.c | 1 -
 windows/winnet.c   | 1 -
 windows/winnpc.c   | 1 -
 windows/winnps.c   | 1 -
 windows/winproxy.c | 1 -
 windows/winshare.c | 1 -
 15 files changed, 16 deletions(-)

commit 9396fcc9f7fbece620fcf602f734b35ee921740b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=9396fcc9f7fbece620fcf602f734b35ee921740b;hp=ed652a70e80ae505a2b0e3302b0d2640df6a0e05
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Oct 5 23:49:08 2018 +0100

    Rename FROMFIELD to 'container_of'.
    
    Ian Jackson points out that the Linux kernel has a macro of this name
    with the same purpose, and suggests that it's a good idea to use the
    same name as they do, so that at least some people reading one code
    base might recognise it from the other.
    
    I never really thought very hard about what order FROMFIELD's
    parameters should go in, and therefore I'm pleasantly surprised to
    find that my order agrees with the kernel's, so I don't have to
    permute every call site as part of making this change :-)

 agentf.c           |  8 +++---
 defs.h             |  2 +-
 errsock.c          |  6 ++---
 import.c           |  2 +-
 misc.c             | 10 ++++----
 pageant.c          | 10 ++++----
 portfwd.c          | 23 +++++++++--------
 proxy.c            | 26 +++++++++----------
 raw.c              | 22 ++++++++--------
 rlogin.c           | 26 +++++++++----------
 ssh.c              | 42 +++++++++++++++----------------
 ssh1bpp.c          |  8 +++---
 ssh1connection.c   | 38 ++++++++++++++--------------
 ssh1login.c        | 14 ++++++-----
 ssh2bpp-bare.c     |  6 ++---
 ssh2bpp.c          | 10 ++++----
 ssh2connection.c   | 74 +++++++++++++++++++++++++++---------------------------
 ssh2transport.c    | 18 ++++++-------
 ssh2userauth.c     | 12 ++++-----
 sshaes.c           | 12 ++++-----
 ssharcf.c          |  6 ++---
 sshblowf.c         | 20 +++++++--------
 sshccp.c           | 21 ++++++++--------
 sshcommon.c        |  6 ++---
 sshdes.c           | 38 ++++++++++++++--------------
 sshdss.c           | 18 ++++++-------
 sshecc.c           | 20 +++++++--------
 sshmd5.c           | 12 ++++++---
 sshrsa.c           | 20 +++++++--------
 sshsh256.c         | 16 ++++++------
 sshsh512.c         | 10 ++++----
 sshsha.c           | 16 ++++++------
 sshshare.c         | 11 ++++----
 sshverstring.c     | 10 ++++----
 sshzlib.c          |  8 +++---
 telnet.c           | 32 +++++++++++------------
 testback.c         |  4 +--
 unix/gtkfont.c     | 26 +++++++++----------
 unix/uxnet.c       | 20 +++++++--------
 unix/uxproxy.c     | 14 +++++------
 unix/uxpty.c       | 30 +++++++++++-----------
 unix/uxser.c       | 14 +++++------
 windows/winhsock.c | 16 ++++++------
 windows/winnet.c   | 18 ++++++-------
 windows/winnps.c   |  6 ++---
 windows/winser.c   | 14 +++++------
 x11fwd.c           | 14 +++++------
 47 files changed, 410 insertions(+), 399 deletions(-)



More information about the tartarus-commits mailing list