projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Line discipline module now uses dynamically allocated data. Also
[u/mdw/putty]
/
unicode.c
diff --git
a/unicode.c
b/unicode.c
index
f8cd3b5
..
19a2e1d
100644
(file)
--- a/
unicode.c
+++ b/
unicode.c
@@
-8,6
+8,7
@@
#include <time.h>
#include "putty.h"
#include <time.h>
#include "putty.h"
+#include "terminal.h"
#include "misc.h"
/* Character conversion arrays; they are usually taken from windows,
#include "misc.h"
/* Character conversion arrays; they are usually taken from windows,
@@
-597,14
+598,14
@@
static void link_font(WCHAR * line_tbl, WCHAR * font_tbl, WCHAR attr)
}
}
}
}
-void lpage_send(int codepage, char *buf, int len, int interactive)
+void lpage_send(
void *ldisc,
int codepage, char *buf, int len, int interactive)
{
static wchar_t *widebuffer = 0;
static int widesize = 0;
int wclen;
if (codepage < 0) {
{
static wchar_t *widebuffer = 0;
static int widesize = 0;
int wclen;
if (codepage < 0) {
- ldisc_send(buf, len, interactive);
+ ldisc_send(
ldisc,
buf, len, interactive);
return;
}
return;
}
@@
-615,14
+616,14
@@
void lpage_send(int codepage, char *buf, int len, int interactive)
}
wclen = mb_to_wc(codepage, 0, buf, len, widebuffer, widesize);
}
wclen = mb_to_wc(codepage, 0, buf, len, widebuffer, widesize);
- luni_send(widebuffer, wclen, interactive);
+ luni_send(
ldisc,
widebuffer, wclen, interactive);
}
}
-void luni_send(wchar_t * widebuf, int len, int interactive)
+void luni_send(
void *ldisc,
wchar_t * widebuf, int len, int interactive)
{
static char *linebuffer = 0;
static int linesize = 0;
{
static char *linebuffer = 0;
static int linesize = 0;
- int ratio = (in_utf)?3:1;
+ int ratio = (in_utf
(term)
)?3:1;
int i;
char *p;
int i;
char *p;
@@
-632,7
+633,7
@@
void luni_send(wchar_t * widebuf, int len, int interactive)
linesize = len * ratio * 2;
}
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];
/* UTF is a simple algorithm */
for (p = linebuffer, i = 0; i < len; i++) {
wchar_t ch = widebuf[i];
@@
-676,7
+677,7
@@
void luni_send(wchar_t * widebuf, int len, int interactive)
}
}
if (p > linebuffer)
}
}
if (p > linebuffer)
- ldisc_send(linebuffer, p - linebuffer, interactive);
+ ldisc_send(l
disc, l
inebuffer, p - linebuffer, interactive);
}
wchar_t xlat_uskbd2cyrllic(int ch)
}
wchar_t xlat_uskbd2cyrllic(int ch)