replaced WCStrLen with winchar_strlen

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5058 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-04-11 21:37:08 +00:00
parent df24dbe687
commit 4cf73d2316
3 changed files with 2 additions and 5 deletions

View file

@ -4735,7 +4735,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
{
// get VS_FIXEDFILEINFO from VS_VERSIONINFO
WCHAR *szKey = (WCHAR *)(ver + sizeof(WORD) * 3);
int len = WCStrLen(szKey) * sizeof(WCHAR) + sizeof(WORD) * 3;
int len = (winchar_strlen(szKey) + 1) * sizeof(WCHAR) + sizeof(WORD) * 3;
len = (len + 3) & ~3; // align on DWORD boundry
VS_FIXEDFILEINFO *verinfo = (VS_FIXEDFILEINFO *)(ver + len);
if (versize > len && verinfo->dwSignature == VS_FFI_SIGNATURE)

View file

@ -451,7 +451,7 @@ int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr,
}
if (cchWideChar < 0) {
cchWideChar = (int) WCStrLen(lpWideCharStr); // including null char
cchWideChar = (int) winchar_strlen(lpWideCharStr) + 1;
}
if (cbMultiByte == 0) {

View file

@ -46,9 +46,6 @@ unsigned char* generate_uninstall_icon_data(const char* filename, size_t &size);
int generate_unicons_offsets(unsigned char* exeHeader, size_t exeHeaderSize, unsigned char* uninstIconData);
#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
// returns the number of WCHARs in str including null charcter
size_t WCStrLen(const WCHAR* szwStr);
size_t my_strftime(char *s, size_t max, const char *fmt, const struct tm *tm);
std::string get_full_path(const std::string& path);