1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 11:02:48 -05:00

The Unicode module no longer depends on `cfg', since it gets the

relevant bits of it passed in to init_ucs(). (Actually I pass in all
of it in the Windows version, since it's a bit hairy in there.)

[originally from svn r2565]
This commit is contained in:
Simon Tatham
2003-01-12 14:59:54 +00:00
parent 5ecbac2441
commit ac2367bc72
6 changed files with 16 additions and 16 deletions

View File

@ -2306,7 +2306,7 @@ int main(int argc, char **argv)
inst->compound_text_atom = gdk_atom_intern("COMPOUND_TEXT", FALSE);
inst->utf8_string_atom = gdk_atom_intern("UTF8_STRING", FALSE);
inst->direct_to_font = init_ucs(font_charset);
inst->direct_to_font = init_ucs(cfg.line_codepage, font_charset);
inst->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

View File

@ -69,7 +69,7 @@ void (*putty_signal(int sig, void (*func)(int)))(int);
/*
* Exports from unicode.c.
*/
int init_ucs(int font_charset);
int init_ucs(char *line_codepage, int font_charset);
/*
* Spare function exported directly from uxnet.c.

View File

@ -104,7 +104,7 @@ int wc_to_mb(int codepage, int flags, wchar_t *wcstr, int wclen,
/*
* Return value is TRUE if pterm is to run in direct-to-font mode.
*/
int init_ucs(int font_charset)
int init_ucs(char *linecharset, int font_charset)
{
int i, ret = 0;
@ -120,9 +120,9 @@ int init_ucs(int font_charset)
* line_codepage should be decoded from the specification in
* cfg.
*/
line_codepage = charset_from_mimeenc(cfg.line_codepage);
line_codepage = charset_from_mimeenc(linecharset);
if (line_codepage == CS_NONE)
line_codepage = charset_from_xenc(cfg.line_codepage);
line_codepage = charset_from_xenc(linecharset);
/*
* If line_codepage is _still_ CS_NONE, we assume we're using