1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Move Windows definition of CP_UTF8 into windows subdir.

I've only just noticed that the definition of CP_UTF8 as 65001 (the
Windows code page number for UTF-8) is in the main putty.h, under an
ifdef that checks whether the per-platform header file had already
defined it to something else. That's a silly way to do things! Better
that the Windows-specific definition goes _in_ the Windows platform
header, and putty.h contains no fallback. That way, anyone writing a
third separate platform directory will get an error reminding them
that they have to provide the right definition for their platform,
instead of finding out later via a runtime failure.
This commit is contained in:
Simon Tatham 2023-01-28 14:53:55 +00:00
parent 343f64c2ca
commit 658ec0457f
2 changed files with 1 additions and 3 deletions

View File

@ -2492,9 +2492,6 @@ extern const char commitid[];
/*
* Exports from unicode.c in platform subdirs.
*/
#ifndef CP_UTF8
#define CP_UTF8 65001
#endif
/* void init_ucs(void); -- this is now in platform-specific headers */
bool is_dbcs_leadbyte(int codepage, char byte);
int mb_to_wc(int codepage, int flags, const char *mbstr, int mblen,

View File

@ -194,6 +194,7 @@ void centre_window(HWND hwnd);
#define DEFAULT_CODEPAGE CP_ACP
#define USES_VTLINE_HACK
#define CP_UTF8 65001
#ifndef NO_GSSAPI
/*