Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win64 unicode #332

Merged
merged 36 commits into from Jan 2, 2019
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ea3d51e
Handle both an ASCII (UTF8) and a WIDE (UTF16) version of image/vm na…
nicolas-cellier-aka-nice Dec 29, 2018
8bdd0b6
DropPlugin: modernize OpenFile/_lwrite/_lclose API
nicolas-cellier-aka-nice Dec 30, 2018
cb32e41
Drop plugin: let tempPathName be Wide
nicolas-cellier-aka-nice Dec 30, 2018
85e0883
Fix 2 potential buffer overrun in sqWin32Service.c
nicolas-cellier-aka-nice Dec 30, 2018
f689145
Setting fp flags _MCW_PC and _MCW_IC is not supported on ARM nor X64
nicolas-cellier-aka-nice Dec 29, 2018
49eff31
The pageSize and pageMask are too short on WIN64
nicolas-cellier-aka-nice Dec 30, 2018
627bc5e
Use the eventually true UNICODE imageNameT if -DUNICODE
nicolas-cellier-aka-nice Dec 30, 2018
98fc85d
interpret pluginName as UTF8 rather than pure ASCII
nicolas-cellier-aka-nice Dec 30, 2018
4f6f191
refactor sqMessageBox to void using toUnicode
nicolas-cellier-aka-nice Dec 30, 2018
545ec0a
Discard now unused toUnicode fromUnicode fromSqueak fromSqueak2 lstrrchr
nicolas-cellier-aka-nice Dec 30, 2018
2024d43
#if 0 ? YAGNI ! we now use builtin _WIN32 _WIN64 anyway
nicolas-cellier-aka-nice Dec 30, 2018
e1e83f7
which SetUpPreferences()? There is no SetUpPreferences()!
nicolas-cellier-aka-nice Dec 30, 2018
8638522
RegisterWindowMessage takes a TCHAR *
nicolas-cellier-aka-nice Dec 30, 2018
1893512
Platform specific knowledge: WIN32_FILE and STD_FILE are mutually exc…
nicolas-cellier-aka-nice Dec 30, 2018
f250415
We can't compare a TCHAR*windowClassName with a char*buf
nicolas-cellier-aka-nice Dec 30, 2018
84a8d17
Tu quoque NewspeakVM, frustra TEXT macro...
nicolas-cellier-aka-nice Dec 31, 2018
7d3264e
gai_strerror returns a TCHAR*, we cannot simply fprintf it...
nicolas-cellier-aka-nice Dec 31, 2018
6ff9625
Let lookup account for NULL terminating a WCHAR*
nicolas-cellier-aka-nice Dec 31, 2018
32840ac
Revert to ASCII only version of DnsInfo
nicolas-cellier-aka-nice Dec 31, 2018
475d84c
iconPath is char*, LoadImage expects a TCHAR*
nicolas-cellier-aka-nice Dec 31, 2018
ef245b6
And account for the fact that iconPath is not NULL-TERMINATED!
nicolas-cellier-aka-nice Dec 31, 2018
07ff6a6
DPRINTF must take a TCHAR*fmt because wvsprintf does!
nicolas-cellier-aka-nice Dec 31, 2018
dfe4d09
NOTIFYICONDATA.szTip maybe a WCHAR* if -DUNICODE
nicolas-cellier-aka-nice Dec 31, 2018
db33158
_DISPLAY_DEVICE.DeviceString may be a WCHAR* if -DUNICODE, we cannot …
nicolas-cellier-aka-nice Dec 31, 2018
46bd992
VM_VERSION_TEXT is a TCHAR*, we cannot simply fprintf
nicolas-cellier-aka-nice Dec 31, 2018
c5f207c
iniName, manufacturer and model may be WCHAR* if -DUNICODE
nicolas-cellier-aka-nice Dec 31, 2018
d9b3927
Information queried in Registry can be WideChar if -DUNICODE
nicolas-cellier-aka-nice Dec 31, 2018
8b14fbf
Make stderrName and stdoutName be WCHAR*
nicolas-cellier-aka-nice Dec 31, 2018
643a5e3
Retract support for Windows95 (no you don't dream it's nearly 2019!)
nicolas-cellier-aka-nice Dec 31, 2018
1f61637
Handle UTF16 logName and serviceName
nicolas-cellier-aka-nice Dec 31, 2018
e5cd4fb
Fix 3 potential buffer overrun
nicolas-cellier-aka-nice Jan 1, 2019
4ded318
Fix my own confusion about wcsncat
nicolas-cellier-aka-nice Jan 1, 2019
af19ed7
Fix: Shlemiel the painter needs to paint strncat too
nicolas-cellier-aka-nice Jan 1, 2019
bf3840c
Fix a TCHAR*crashInfo trying to mix a char*msg
nicolas-cellier-aka-nice Jan 1, 2019
252e2a8
Fix another potential Buffer overrun in sqWin32MIDI.c
nicolas-cellier-aka-nice Jan 2, 2019
3e51616
fixup: skip only 18 WCHAR if keyName begins with \\registry\\machine
nicolas-cellier-aka-nice Jan 2, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions platforms/win32/vm/sqWin32Main.c
Expand Up @@ -771,7 +771,7 @@ void gatherSystemInfo(void) {
NULL, NULL, (LPBYTE)drivers, &dwSize);
}
if (!ok) {
strncat(tmpString,"\nDriver Versions:",sizeof(tmpString));
strncat(tmpString,"\nDriver Versions:",sizeof(tmpString) - 1 - strlen(tmpString));
/* InstalledDrivers is REG_MULTI_SZ (extra terminating zero) */
for(drv = drivers; drv[0]; drv +=wcslen(drv)) {
DWORD verSize, hh;
Expand All @@ -781,9 +781,9 @@ void gatherSystemInfo(void) {

/* Concat driver name */
if (WideCharToMultiByte(CP_UTF8,0,drv,-1,drvA,MAX_PATH_UTF8,NULL,NULL)>0) {
strncat(tmpString, "\n\t", sizeof(tmpString));
strncat(tmpString, drvA , sizeof(tmpString));
strncat(tmpString, ": " , sizeof(tmpString));
strncat(tmpString, "\n\t", sizeof(tmpString) - 1 - strlen(tmpString));
strncat(tmpString, drvA , sizeof(tmpString) - 1 - strlen(tmpString));
strncat(tmpString, ": " , sizeof(tmpString) - 1 - strlen(tmpString));
}

verSize = GetFileVersionInfoSizeW(drv, &hh);
Expand All @@ -799,7 +799,7 @@ void gatherSystemInfo(void) {
char *utf8 = (char *)malloc(utf8_len);
if(utf8) {
WideCharToMultiByte(CP_UTF8, 0, vInfo, -1, utf8, utf8_len, NULL, NULL);
strncat(tmpString, utf8,sizeof(tmpString));
strncat(tmpString, utf8,sizeof(tmpString) - 1 - strlen(tmpString));
free(utf8);
goto done;
}
Expand All @@ -812,21 +812,21 @@ void gatherSystemInfo(void) {
char *utf8 = (char *)malloc(utf8_len);
if (utf8) {
WideCharToMultiByte(CP_UTF8, 0, vInfo, -1, utf8, utf8_len, NULL, NULL);
strncat(tmpString, utf8, sizeof(tmpString));
strncat(tmpString, utf8, sizeof(tmpString) - 1 - strlen(tmpString));
free(utf8);
goto done;
}
}

strncat(tmpString, "???", sizeof(tmpString));
strncat(tmpString, "???", sizeof(tmpString) - 1 - strlen(tmpString));

done:
if (verInfo) {
free(verInfo);
verInfo = NULL;
}
}
strncat(tmpString,"\n",sizeof(tmpString));
strncat(tmpString,"\n",sizeof(tmpString) - 1 - strlen(tmpString));
}
RegCloseKey(hk);
}
Expand Down