X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/a9c0245444b7b67e077826089b026d46297fab64..792de8f6b5f879879e11feb59bd7754da5e0db89:/unicode.c diff --git a/unicode.c b/unicode.c index 60dc0653..76ffa4c0 100644 --- a/unicode.c +++ b/unicode.c @@ -8,10 +8,6 @@ #include "putty.h" #include "misc.h" -void init_ucs_tables(void); -void lpage_send(int codepage, char *buf, int len); -void luni_send(wchar_t * widebuf, int len); - static void get_unitab(int codepage, wchar_t * unitab, int ftype); /* Character conversion arrays; they are usually taken from windows, @@ -249,8 +245,6 @@ static struct cp_list_item cp_list[] = { {"Win1257 (Baltic)", 1257}, {"Win1258 (Vietnamese)", 1258}, - {"Win1258 (Vietnamese)", 1258}, - {"CP437", 437}, {"CP819", 28591}, {"CP878", 20866}, @@ -441,14 +435,14 @@ static void link_font(WCHAR * line_tbl, WCHAR * font_tbl, WCHAR attr) } } -void lpage_send(int codepage, char *buf, int len) +void lpage_send(int codepage, char *buf, int len, int interactive) { static wchar_t *widebuffer = 0; static int widesize = 0; int wclen; if (codepage < 0) { - ldisc_send(buf, len); + ldisc_send(buf, len, interactive); return; } @@ -460,10 +454,10 @@ void lpage_send(int codepage, char *buf, int len) wclen = MultiByteToWideChar(codepage, 0, buf, len, widebuffer, widesize); - luni_send(widebuffer, wclen); + luni_send(widebuffer, wclen, interactive); } -void luni_send(wchar_t * widebuf, int len) +void luni_send(wchar_t * widebuf, int len, int interactive) { static char *linebuffer = 0; static int linesize = 0; @@ -521,7 +515,7 @@ void luni_send(wchar_t * widebuf, int len) } } if (p > linebuffer) - ldisc_send(linebuffer, p - linebuffer); + ldisc_send(linebuffer, p - linebuffer, interactive); } wchar_t xlat_uskbd2cyrllic(int ch) @@ -967,6 +961,8 @@ int decode_codepage(char *cp_name) codepage = cpi->codepage; if (codepage == CP_UTF8) goto break_break; + if (codepage == -1) + return codepage; if (codepage == 0) { codepage = 65536 + (cpi - cp_list); goto break_break;