mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-14 01:27:35 -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:
8
raw.c
8
raw.c
@ -15,12 +15,13 @@
|
||||
|
||||
static Socket s = NULL;
|
||||
static int raw_bufsize;
|
||||
static void *frontend;
|
||||
|
||||
static void raw_size(void);
|
||||
|
||||
static void c_write(char *buf, int len)
|
||||
{
|
||||
int backlog = from_backend(0, buf, len);
|
||||
int backlog = from_backend(frontend, 0, buf, len);
|
||||
sk_set_frozen(s, backlog > RAW_MAX_BACKLOG);
|
||||
}
|
||||
|
||||
@ -58,7 +59,8 @@ static void raw_sent(Plug plug, int bufsize)
|
||||
* Also places the canonical host name into `realhost'. It must be
|
||||
* freed by the caller.
|
||||
*/
|
||||
static char *raw_init(char *host, int port, char **realhost, int nodelay)
|
||||
static char *raw_init(void *frontend_handle, char *host, int port,
|
||||
char **realhost, int nodelay)
|
||||
{
|
||||
static struct plug_function_table fn_table = {
|
||||
raw_closing,
|
||||
@ -69,6 +71,8 @@ static char *raw_init(char *host, int port, char **realhost, int nodelay)
|
||||
SockAddr addr;
|
||||
char *err;
|
||||
|
||||
frontend = frontend_handle;
|
||||
|
||||
/*
|
||||
* Try to find host.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user