mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -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:
@ -4,6 +4,7 @@
|
||||
|
||||
#include <time.h>
|
||||
#include "putty.h"
|
||||
#include "terminal.h"
|
||||
#include "misc.h"
|
||||
|
||||
/*
|
||||
@ -22,7 +23,7 @@ void luni_send(wchar_t * widebuf, int len, int interactive)
|
||||
{
|
||||
static char *linebuffer = 0;
|
||||
static int linesize = 0;
|
||||
int ratio = (in_utf)?6:1;
|
||||
int ratio = (in_utf(term))?6:1;
|
||||
int i;
|
||||
char *p;
|
||||
|
||||
@ -32,7 +33,7 @@ void luni_send(wchar_t * widebuf, int len, int interactive)
|
||||
linesize = len * ratio * 2;
|
||||
}
|
||||
|
||||
if (in_utf) {
|
||||
if (in_utf(term)) {
|
||||
/* UTF is a simple algorithm */
|
||||
for (p = linebuffer, i = 0; i < len; i++) {
|
||||
wchar_t ch = widebuf[i];
|
||||
|
Reference in New Issue
Block a user