| 3593 |
WriteInt(Section, "UnicodeEmojiWidth", FName, ts->UnicodeEmojiWidth); |
WriteInt(Section, "UnicodeEmojiWidth", FName, ts->UnicodeEmojiWidth); |
| 3594 |
} |
} |
| 3595 |
|
|
| 3596 |
void PASCAL CopySerialList(PCHAR IniSrcA, PCHAR IniDestA, PCHAR section, |
void PASCAL CopySerialList(const wchar_t *IniSrc, const wchar_t *IniDest, const wchar_t *section, |
| 3597 |
PCHAR key, int MaxList) |
const wchar_t *key, int MaxList) |
| 3598 |
{ |
{ |
| 3599 |
int i, j; |
int i, j; |
| 3600 |
char EntName[10], EntName2[10]; |
wchar_t EntName[10], EntName2[10]; |
| 3601 |
char TempHost[HostNameMaxLength + 1]; |
wchar_t TempHost[HostNameMaxLength + 1]; |
|
#if INI_FILE_IS_UNICODE |
|
|
const wchar_t *IniSrc = ToWcharA(IniSrcA); |
|
|
const wchar_t *IniDest = ToWcharA(IniDestA); |
|
|
#else |
|
|
const char *IniSrc = IniSrcA; |
|
|
const char *IniDest = IniDestA; |
|
|
#endif |
|
| 3602 |
|
|
|
#if INI_FILE_IS_UNICODE |
|
| 3603 |
if (_wcsicmp(IniSrc, IniDest) == 0) |
if (_wcsicmp(IniSrc, IniDest) == 0) |
| 3604 |
return; |
return; |
|
#else |
|
|
if (_stricmp(IniSrc, IniDest) == 0) |
|
|
return; |
|
|
#endif |
|
| 3605 |
|
|
| 3606 |
WritePrivateProfileString(section, NULL, NULL, IniDest); |
WritePrivateProfileStringW(section, NULL, NULL, IniDest); |
| 3607 |
|
|
| 3608 |
i = j = 1; |
i = j = 1; |
| 3609 |
do { |
do { |
| 3610 |
_snprintf_s(EntName, sizeof(EntName), _TRUNCATE, "%s%i", key, i); |
_snwprintf_s(EntName, _countof(EntName), _TRUNCATE, L"%s%i", key, i); |
| 3611 |
_snprintf_s(EntName2, sizeof(EntName2), _TRUNCATE, "%s%i", key, j); |
_snwprintf_s(EntName2, _countof(EntName2), _TRUNCATE, L"%s%i", key, j); |
| 3612 |
|
|
| 3613 |
/* Get one hostname from file IniSrc */ |
/* Get one hostname from file IniSrc */ |
| 3614 |
GetPrivateProfileString(section, EntName, "", |
GetPrivateProfileStringW(section, EntName, L"", |
| 3615 |
TempHost, sizeof(TempHost), IniSrc); |
TempHost, _countof(TempHost), IniSrc); |
| 3616 |
/* Copy it to the file IniDest */ |
/* Copy it to the file IniDest */ |
| 3617 |
if (strlen(TempHost) > 0) { |
if (TempHost[0] != 0) { |
| 3618 |
WritePrivateProfileString(section, EntName2, TempHost, IniDest); |
WritePrivateProfileStringW(section, EntName2, TempHost, IniDest); |
| 3619 |
j++; |
j++; |
| 3620 |
} |
} |
| 3621 |
i++; |
i++; |
| 3623 |
while (i <= MaxList); |
while (i <= MaxList); |
| 3624 |
|
|
| 3625 |
/* update file */ |
/* update file */ |
| 3626 |
WritePrivateProfileString(NULL, NULL, NULL, IniDest); |
WritePrivateProfileStringW(NULL, NULL, NULL, IniDest); |
| 3627 |
} |
} |
| 3628 |
|
|
| 3629 |
void PASCAL AddValueToList(PCHAR FNameA, PCHAR Host, PCHAR section, |
void PASCAL AddValueToList(PCHAR FNameA, PCHAR Host, PCHAR section, |
| 3692 |
} |
} |
| 3693 |
|
|
| 3694 |
/* copy hostlist from source IniFile to dest IniFile */ |
/* copy hostlist from source IniFile to dest IniFile */ |
| 3695 |
void PASCAL CopyHostList(PCHAR IniSrc, PCHAR IniDest) |
void PASCAL CopyHostList(const wchar_t *IniSrc, const wchar_t *IniDest) |
| 3696 |
{ |
{ |
| 3697 |
CopySerialList(IniSrc, IniDest, "Hosts", "Host", MAXHOSTLIST); |
CopySerialList(IniSrc, IniDest, L"Hosts", L"Host", MAXHOSTLIST); |
| 3698 |
} |
} |
| 3699 |
|
|
| 3700 |
void PASCAL AddHostToList(PCHAR FName, PCHAR Host) |
void PASCAL AddHostToList(PCHAR FName, PCHAR Host) |