mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Deglobalise the Unicode module. Despite all my grand plans, I've
just done this the very simple way - bundle all the globals into a data structure and pass pointers around. One particularly ugly wart is that wc_to_mb now takes a pointer to this structure as an argument (optional, may be NULL, and unused in any Unicode layer that's even marginally less of a mess than the Windows one). I do need to do this properly at some point, but for now this should just about be adequate. As usual, the Mac port has not been updated. [originally from svn r2592]
This commit is contained in:
@ -171,6 +171,8 @@ struct terminal_tag {
|
||||
|
||||
void *logctx;
|
||||
|
||||
struct unicode_data *ucsdata;
|
||||
|
||||
/*
|
||||
* We maintain a full _copy_ of a Config structure here, not
|
||||
* merely a pointer to it. That way, when we're passed a new
|
||||
@ -181,6 +183,6 @@ struct terminal_tag {
|
||||
Config cfg;
|
||||
};
|
||||
|
||||
#define in_utf(term) ((term)->utf || line_codepage==CP_UTF8)
|
||||
#define in_utf(term) ((term)->utf || (term)->ucsdata->line_codepage==CP_UTF8)
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user