struct sbcs_data * (first element an array of unsigned long) into a
wchar_t *, but I think it's reasonably safe to assume that it was a
mistake.
git-svn-id: svn://svn.tartarus.org/sgt/putty@2399
cda61777-01e9-0310-a592-
d414129be87e
charset_state *state,
void (*emit)(void *ctx, long int output), void *emitctx)
{
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;
- 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)
{
}
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;
* We should be using the ucs2sbcs table.
*/
for (i = 0; i < 256; i++)
* 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;
}
emit(emitctx, i);
return;
}