1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 11:32:48 -05:00

Major destabilisation, phase 1. In this phase I've moved (I think)

all the global and function-static variables out of terminal.c into
a dynamically allocated data structure. Note that this does not yet
confer the ability to run more than one of them in the same process,
because other things (the line discipline, the back end) are still
global, and also in particular the address of the dynamically
allocated terminal-data structure is held in a global variable
`term'. But what I've got here represents a reasonable stopping
point at which to check things in. In _theory_ this should all still
work happily, on both Unix and Windows. In practice, who knows?

[originally from svn r2115]
This commit is contained in:
Simon Tatham
2002-10-22 16:11:33 +00:00
parent 48314f7dc0
commit 0a80c983e2
15 changed files with 1577 additions and 1608 deletions

View File

@ -69,7 +69,7 @@ DWORD orig_console_mode;
WSAEVENT netevent;
int term_ldisc(int mode)
int term_ldisc(Terminal *term, int mode)
{
return FALSE;
}
@ -164,7 +164,7 @@ void try_output(int is_stderr)
}
}
int from_backend(int is_stderr, char *data, int len)
int from_backend(void *frontend_handle, int is_stderr, char *data, int len)
{
HANDLE h = (is_stderr ? errhandle : outhandle);
int osize, esize;
@ -529,7 +529,7 @@ int main(int argc, char **argv)
int nodelay = cfg.tcp_nodelay &&
(GetFileType(GetStdHandle(STD_INPUT_HANDLE)) == FILE_TYPE_CHAR);
error = back->init(cfg.host, cfg.port, &realhost, nodelay);
error = back->init(NULL, cfg.host, cfg.port, &realhost, nodelay);
if (error) {
fprintf(stderr, "Unable to open connection:\n%s", error);
return 1;