X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/72ecd48aa05023a3a2ed66cb462e7304acf0a119..eea6a39a33b92f101cd2ad851d04d2ce95102f4c:/charset/sbcs.c diff --git a/charset/sbcs.c b/charset/sbcs.c index a71e5d84..c92bdea6 100644 --- a/charset/sbcs.c +++ b/charset/sbcs.c @@ -16,18 +16,18 @@ void read_sbcs(charset_spec const *charset, long int input_chr, charset_state *state, void (*emit)(void *ctx, long int output), void *emitctx) { - wchar_t const *table = (wchar_t const *)charset->data; + const struct sbcs_data *sd = charset->data; UNUSEDARG(state); - emit(emitctx, table[input_chr]); + emit(emitctx, sd->sbcs2ucs[input_chr]); } void write_sbcs(charset_spec const *charset, long int input_chr, charset_state *state, void (*emit)(void *ctx, long int output), void *emitctx) { - wchar_t const *table = (wchar_t const *)charset->data; + const struct sbcs_data *sd = charset->data; int i; UNUSEDARG(state); @@ -37,7 +37,7 @@ void write_sbcs(charset_spec const *charset, long int input_chr, * We should be using the ucs2sbcs table. */ for (i = 0; i < 256; i++) - if (table[i] == input_chr) { + if (sd->sbcs2ucs[i] == input_chr) { emit(emitctx, i); return; }