[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 28cf9c: Fix TEXT(VMOPTION('foo"))
GitHub
noreply at github.com
Fri Dec 28 12:12:53 UTC 2018
Branch: refs/heads/win64_cleanups
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 28cf9c626ee5eb0fce7bad34b8a87753fd974417
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/28cf9c626ee5eb0fce7bad34b8a87753fd974417
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2018-12-27 (Thu, 27 Dec 2018)
Changed paths:
M platforms/win32/vm/sqWin32Window.c
Log Message:
-----------
Fix TEXT(VMOPTION('foo"))
TEXT is a macro that prepend a L, like TEXT("foo") => L"foo".
It does not work for concatenated constants: TEXT("foo" "bar") => L"foo" "bar".
VMOPTION concatenates a "-".
Therefore we need a specific TVMOPTION macro.
Commit: 9e82899e688d01935a7157b27fa885329e98d143
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/9e82899e688d01935a7157b27fa885329e98d143
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2018-12-27 (Thu, 27 Dec 2018)
Changed paths:
M platforms/win32/plugins/HostWindowPlugin/sqWin32HostWindowPlugin.c
M platforms/win32/vm/sqWin32Window.c
Log Message:
-----------
Concatenate TEXT constants rather than TEXT concatenated constants
TEXT("foo" "bar") => L"foo" "bar" => error concatenating wide string and ascii string
TEXT("foo") TEXT("bar") => L"foo" L"bar" => compile OK
Commit: 4e947dac58a702889adb281377708f897b0fc8c4
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/4e947dac58a702889adb281377708f897b0fc8c4
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2018-12-27 (Thu, 27 Dec 2018)
Changed paths:
M platforms/win32/plugins/SoundPlugin/sqWin32Sound.c
M platforms/win32/vm/sqWin32Alloc.c
M platforms/win32/vm/sqWin32PluginSupport.c
Log Message:
-----------
printLastError & warnPrintf take a TCHAR *, not a char *
Commit: 3227fcf750b035281697da052df88f60b5c391d6
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/3227fcf750b035281697da052df88f60b5c391d6
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2018-12-27 (Thu, 27 Dec 2018)
Changed paths:
M platforms/win32/plugins/SoundPlugin/sqWin32Sound.c
Log Message:
-----------
DPRINTF takes a TCHAR * when it is a warnPrintf in disguise
thus, it requires usage of a TEXT macro to enable -DUNICODE compilation
Commit: 8d44470f37b62c5c0519cf9c5ae5349ec320582e
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/8d44470f37b62c5c0519cf9c5ae5349ec320582e
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2018-12-28 (Fri, 28 Dec 2018)
Changed paths:
M platforms/win32/vm/sqWin32Window.c
Log Message:
-----------
Splash file and title may use Unicode variant
We could also have used GetPrivateProfileStringA as a workaround, but let's not insult the future (internationalization)
Commit: 0eeffa0d7e337e92b0f01dcd74698667c168d835
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0eeffa0d7e337e92b0f01dcd74698667c168d835
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2018-12-28 (Fri, 28 Dec 2018)
Changed paths:
M platforms/win32/vm/sqWin32.h
M platforms/win32/vm/sqWin32Prefs.c
M platforms/win32/vm/sqWin32Window.c
Log Message:
-----------
windowTitle is not a TCHAR *, it is a UTF8 encoded char *
Commit: 3d55c5d4a6396772719230fc56e5b11b7faafe0b
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/3d55c5d4a6396772719230fc56e5b11b7faafe0b
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2018-12-28 (Fri, 28 Dec 2018)
Changed paths:
M platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.c
Log Message:
-----------
make win23OpenGL UNICODE friendly
CreateWindow is the generic call that can switch to CreateWindowA or CreateWindowW
It must take TCHAR * arguments.
Commit: 001d21af530cfd2255e43d4f20b3df84ac735cbe
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/001d21af530cfd2255e43d4f20b3df84ac735cbe
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2018-12-28 (Fri, 28 Dec 2018)
Changed paths:
M platforms/win32/plugins/CroquetPlugin/sqWin32CroquetPlugin.c
M platforms/win32/vm/sqWin32Main.c
Log Message:
-----------
Invoke LoadLibraryA when there's no point to internationalize library name
Most library names are dumb ASCII strings, so encoding them in UTF-16 has no added value.
Commit: 616cacb0048b76385e265230406782db341e4a98
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/616cacb0048b76385e265230406782db341e4a98
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2018-12-28 (Fri, 28 Dec 2018)
Changed paths:
M platforms/win32/vm/sqWin32ExternalPrims.c
Log Message:
-----------
GetProcAddress takes simple byte string procedure name
Until now, there's no such thing as internationalized procedure names.
Probably because low level languages do not support non ASCII identifiers.
Commit: 4b328037903d7eb1b9e0da5ef325693040831c4a
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/4b328037903d7eb1b9e0da5ef325693040831c4a
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2018-12-28 (Fri, 28 Dec 2018)
Changed paths:
M platforms/win32/plugins/LocalePlugin/sqWin32Locale.c
Log Message:
-----------
Use GetLocaleInfoA rather than generic version
This is the least change that makes the plugin compile correctly with -DUNICODE
But this is maybe not the right thing.
If the answer contains a character that is not available in the code page,
then it will be replaced by a question mark.
https://docs.microsoft.com/en-us/windows/desktop/api/winnls/nf-winnls-getlocaleinfow
The right thing would be to go thru GetLocaleInfoW and WideCharToMultiByte dance to answer an UTF-8 encoded string.
Commit: 539c7692dee3292456301dfb14b8a36513a9cc76
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/539c7692dee3292456301dfb14b8a36513a9cc76
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2018-12-28 (Fri, 28 Dec 2018)
Changed paths:
M platforms/win32/vm/sqWin32Window.c
Log Message:
-----------
remove unused LongFileNameFromPossiblyShortName
This might be a nice piece of code, but it's dead code.
Dead code has maintenance costs that generally do not pay back.
For example when reviewing UNICODE compatibility, I just paid for what I did not buy.
For archeology purposes, there is a source code/version control system.
Commit: 7c5fe91432e72fdcc6a7e098818a8bcfccb3371f
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/7c5fe91432e72fdcc6a7e098818a8bcfccb3371f
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2018-12-28 (Fri, 28 Dec 2018)
Changed paths:
M platforms/win32/vm/sqWin32PluginSupport.c
Log Message:
-----------
the DPRINTF used in sqWin32PluginSupport.c takes a TCHAR *, not a char *
It's hard to decipher, because DPRINTF is both:
- a MACRO at top of this file (and in many other files just to shuffle the cards)
- a function in sqWin32Main.c
Since the MACRO looks like recursive, it's a kind of dangerously convoluted code!
Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/b52caab76f7f...7c5fe91432e7
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
More information about the Vm-dev
mailing list