mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 02:17:36 +08:00
auto-make standard CP950 table from the extended table
This commit is contained in:
4439
include/cp950_uni.h
4439
include/cp950_uni.h
File diff suppressed because it is too large
Load Diff
@@ -518,7 +518,7 @@ bool CodePageHostToGuestUTF16(char *d/*CROSS_LEN*/,const uint16_t *s/*CROSS_LEN*
|
||||
case 949:
|
||||
return String_HOST_TO_DBCS_UTF16<uint16_t>(d,s,cp949_to_unicode_hitbl,cp949_to_unicode_raw,sizeof(cp949_to_unicode_raw)/sizeof(cp949_to_unicode_raw[0]));
|
||||
case 950:
|
||||
if (chinasea) return String_HOST_TO_DBCS_UTF16<uint16_t>(d,s,cp950sea_to_unicode_hitbl,cp950sea_to_unicode_raw,sizeof(cp950sea_to_unicode_raw)/sizeof(cp950sea_to_unicode_raw[0]));
|
||||
if (chinasea) return String_HOST_TO_DBCS_UTF16<uint16_t>(d,s,cp950ext_to_unicode_hitbl,cp950ext_to_unicode_raw,sizeof(cp950ext_to_unicode_raw)/sizeof(cp950ext_to_unicode_raw[0]));
|
||||
return String_HOST_TO_DBCS_UTF16<uint16_t>(d,s,cp950_to_unicode_hitbl,cp950_to_unicode_raw,sizeof(cp950_to_unicode_raw)/sizeof(cp950_to_unicode_raw[0]));
|
||||
case 1250:
|
||||
return String_HOST_TO_SBCS_UTF16<uint16_t>(d,s,cp1250_to_unicode,sizeof(cp1250_to_unicode)/sizeof(cp1250_to_unicode[0]));
|
||||
@@ -597,7 +597,7 @@ bool CodePageHostToGuestUTF8(char *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*/) {
|
||||
case 949:
|
||||
return String_HOST_TO_DBCS_UTF8<uint16_t>(d,s,cp949_to_unicode_hitbl,cp949_to_unicode_raw,sizeof(cp949_to_unicode_raw)/sizeof(cp949_to_unicode_raw[0]));
|
||||
case 950:
|
||||
if (chinasea) return String_HOST_TO_DBCS_UTF8<uint16_t>(d,s,cp950sea_to_unicode_hitbl,cp950sea_to_unicode_raw,sizeof(cp950sea_to_unicode_raw)/sizeof(cp950sea_to_unicode_raw[0]));
|
||||
if (chinasea) return String_HOST_TO_DBCS_UTF8<uint16_t>(d,s,cp950ext_to_unicode_hitbl,cp950ext_to_unicode_raw,sizeof(cp950ext_to_unicode_raw)/sizeof(cp950ext_to_unicode_raw[0]));
|
||||
return String_HOST_TO_DBCS_UTF8<uint16_t>(d,s,cp950_to_unicode_hitbl,cp950_to_unicode_raw,sizeof(cp950_to_unicode_raw)/sizeof(cp950_to_unicode_raw[0]));
|
||||
case 1250:
|
||||
return String_HOST_TO_SBCS_UTF8<uint16_t>(d,s,cp1250_to_unicode,sizeof(cp1250_to_unicode)/sizeof(cp1250_to_unicode[0]));
|
||||
@@ -676,7 +676,7 @@ bool CodePageGuestToHostUTF16(uint16_t *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*
|
||||
case 949:
|
||||
return String_DBCS_TO_HOST_UTF16<uint16_t>(d,s,cp949_to_unicode_hitbl,cp949_to_unicode_raw,sizeof(cp949_to_unicode_raw)/sizeof(cp949_to_unicode_raw[0]));
|
||||
case 950:
|
||||
if (chinasea) return String_DBCS_TO_HOST_UTF16<uint16_t>(d,s,cp950sea_to_unicode_hitbl,cp950sea_to_unicode_raw,sizeof(cp950sea_to_unicode_raw)/sizeof(cp950sea_to_unicode_raw[0]));
|
||||
if (chinasea) return String_DBCS_TO_HOST_UTF16<uint16_t>(d,s,cp950ext_to_unicode_hitbl,cp950ext_to_unicode_raw,sizeof(cp950ext_to_unicode_raw)/sizeof(cp950ext_to_unicode_raw[0]));
|
||||
return String_DBCS_TO_HOST_UTF16<uint16_t>(d,s,cp950_to_unicode_hitbl,cp950_to_unicode_raw,sizeof(cp950_to_unicode_raw)/sizeof(cp950_to_unicode_raw[0]));
|
||||
case 1250:
|
||||
return String_SBCS_TO_HOST_UTF16<uint16_t>(d,s,cp1250_to_unicode,sizeof(cp1250_to_unicode)/sizeof(cp1250_to_unicode[0]));
|
||||
@@ -755,7 +755,7 @@ bool CodePageGuestToHostUTF8(char *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*/) {
|
||||
case 949:
|
||||
return String_DBCS_TO_HOST_UTF8<uint16_t>(d,s,cp949_to_unicode_hitbl,cp949_to_unicode_raw,sizeof(cp949_to_unicode_raw)/sizeof(cp949_to_unicode_raw[0]));
|
||||
case 950:
|
||||
if (chinasea) return String_DBCS_TO_HOST_UTF8<uint16_t>(d,s,cp950sea_to_unicode_hitbl,cp950sea_to_unicode_raw,sizeof(cp950sea_to_unicode_raw)/sizeof(cp950sea_to_unicode_raw[0]));
|
||||
if (chinasea) return String_DBCS_TO_HOST_UTF8<uint16_t>(d,s,cp950ext_to_unicode_hitbl,cp950ext_to_unicode_raw,sizeof(cp950ext_to_unicode_raw)/sizeof(cp950ext_to_unicode_raw[0]));
|
||||
return String_DBCS_TO_HOST_UTF8<uint16_t>(d,s,cp950_to_unicode_hitbl,cp950_to_unicode_raw,sizeof(cp950_to_unicode_raw)/sizeof(cp950_to_unicode_raw[0]));
|
||||
case 1250:
|
||||
return String_SBCS_TO_HOST_UTF8<uint16_t>(d,s,cp1250_to_unicode,sizeof(cp1250_to_unicode)/sizeof(cp1250_to_unicode[0]));
|
||||
|
@@ -210,7 +210,7 @@ static uint32_t Ticks = 0;
|
||||
extern double rtdelta;
|
||||
static LoopHandler* loop;
|
||||
|
||||
void increaseticks();
|
||||
void increaseticks(), makestdcp950table();
|
||||
|
||||
/* The whole load of startups for all the subfunctions */
|
||||
void MEM_Init(Section *);
|
||||
@@ -1068,6 +1068,7 @@ void DOSBOX_RealInit() {
|
||||
Section_prop *ttf_section = static_cast<Section_prop *>(control->GetSection("ttf"));
|
||||
gbk = ttf_section->Get_bool("gbk");
|
||||
chinasea = ttf_section->Get_bool("chinasea");
|
||||
if (!chinasea) makestdcp950table();
|
||||
dos.loaded_codepage = cp;
|
||||
#if (defined(WIN32) && !defined(HX_DOS) || defined(LINUX) && C_X11) && !defined(C_SDL2) && defined(SDL_DOSBOX_X_SPECIAL)
|
||||
if (enableime && !control->opt_silent) {
|
||||
|
Reference in New Issue
Block a user