mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-18 11:31:00 -05:00
dup_mb_to_wc, dup_wc_to_mb: remove the 'flags' parameter.
This parameter was undocumented, and Windows-specific: its semantics date from before PuTTY was cross-platform, and are "Pass this flags parameter straight through to the Win32 API's conversion functions". So in Windows platform code you can pass flags like MB_USEGLYPHCHARS, but in cross-platform code, you dare not pass anything nonzero at all because the Unix frontend won't recognise it (or, likely, even compile). I've kept the flag for now in the underlying mb_to_wc / wc_to_mb functions. Partly that's because there's one place in the Windows code where the parameter _is_ used; mostly, it's because I'm about to replace those functions anyway, so there's no point in editing all the call sites twice.
This commit is contained in:
8
misc.h
8
misc.h
@ -71,12 +71,12 @@ void strbuf_finalise_agent_query(strbuf *buf);
|
||||
|
||||
/* String-to-Unicode converters that auto-allocate the destination and
|
||||
* work around the rather deficient interface of mb_to_wc. */
|
||||
wchar_t *dup_mb_to_wc_c(int codepage, int flags, const char *string,
|
||||
wchar_t *dup_mb_to_wc_c(int codepage, const char *string,
|
||||
size_t len, size_t *outlen_p);
|
||||
wchar_t *dup_mb_to_wc(int codepage, int flags, const char *string);
|
||||
char *dup_wc_to_mb_c(int codepage, int flags, const wchar_t *string,
|
||||
wchar_t *dup_mb_to_wc(int codepage, const char *string);
|
||||
char *dup_wc_to_mb_c(int codepage, const wchar_t *string,
|
||||
size_t len, const char *defchr, size_t *outlen_p);
|
||||
char *dup_wc_to_mb(int codepage, int flags, const wchar_t *string,
|
||||
char *dup_wc_to_mb(int codepage, const wchar_t *string,
|
||||
const char *defchr);
|
||||
|
||||
static inline int toint(unsigned u)
|
||||
|
Reference in New Issue
Block a user