Rationalisation of the system of frontend handles. Most modular bits
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 11 Apr 2003 18:36:27 +0000 (18:36 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 11 Apr 2003 18:36:27 +0000 (18:36 +0000)
commitfbf6cb3b1fcbb6c3a19dd61d308d116878ed2d3d
tree4f2037b92e040ba62e6e6c68213eb4ee436559a8
parentabb6895f8e13fb0fda3b6567a2b36b590ea7bfda
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@3100 cda61777-01e9-0310-a592-d414129be87e
putty.h
terminal.c
unix/pterm.c
unix/uxputty.c
window.c