]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Rationalisation of the system of frontend handles. Most modular bits
authorSimon Tatham <anakin@pobox.com>
Fri, 11 Apr 2003 18:36:27 +0000 (18:36 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 11 Apr 2003 18:36:27 +0000 (18:36 +0000)
commitd93f7113d1564d9e2b23863e3aa7049b64b7f926
tree4f2037b92e040ba62e6e6c68213eb4ee436559a8
parent8e3c37d30984e433d15a32d263017ad3a18cc30a
Rationalisation of the system of frontend handles. Most modular bits
of PuTTY (terminal, backend, logctx etc) take a `void *' handle
passed to them from the frontend, and used as a context for all
their callbacks. Most of these point at the frontend structure
itself (on platforms where this is meaningful), except that the
handle passed to the backend has always pointed at the terminal
because from_backend() was implemented in terminal.c. This has
finally bitten Unix PuTTY, because both backend and logctx have
been passing their respective and very different frontend handles to
logevent(), so I've fixed it.
from_backend() is now a function supplied by the _frontend_ itself,
in all cases, and the frontend handle passed to backends must be the
same as that passed to everything else. What was from_backend() in
terminal.c is now called term_data(), and the typical implementation
of from_backend() in a GUI frontend will just extract the terminal
handle from the frontend structure and delegate to that.
This appears to work on Unix and Windows, but has most likely broken
the Mac build.

[originally from svn r3100]
putty.h
terminal.c
unix/pterm.c
unix/uxputty.c
window.c