Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/thpatch/win32_utf8

Transparent UTF-8 support for native Win32 ANSI applications
https://github.com/thpatch/win32_utf8

Fix a few warnings thrown by GCC.

ae826165568313a52dc089b8bb75c4b7ab52dc1a authored over 9 years ago by nmlgc <[email protected]>
Fix the last implicit dependency on the UNICODE #define.

f43f715ed245277f6d51994ac2f999f8540ec416 authored over 9 years ago by nmlgc <[email protected]>
Include all required headers from win32_utf8_build.c only.

Interestingly, on Visual C++, this doesn't further reduce build times quite as
much as I would h...

0097c9ea30752b3191ad9409eb1d48c645acbcdd authored over 9 years ago by nmlgc <[email protected]>
Change the build process to use a single translation unit.

Trivializes inclusion into other codebases, and cuts the compilation time in
half.

2c992d601c4ecece53ee16db2dc52eae292a605f authored over 9 years ago by nmlgc <[email protected]>
OPENFILENAME functions: Write nFileOffset and nFileExtension.

EditDisk actually reads those.

aa5b4ec49e4fd161131cdd1715c5380fbcc8a459 authored over 9 years ago by nmlgc <[email protected]>
FormatMessage(): Actually use the correct size for the allocated buffer -.-

Too bad that the Wine unit tests only cover the most boring of test cases for
that function.

16f7b877b2e6351cf7d379b7002b510f587aa310 authored over 9 years ago by nmlgc <[email protected]>
FormatMessage(): Parse the formatting syntax and convert any string arguments.

2c7b0e7876016f502182a99a4eb093934559f4ca authored over 9 years ago by nmlgc <[email protected]>
FormatMessage(): Fix a few return value and error code issues.

aa81dde325648aa58f79f7fc17600fae805945fd authored over 9 years ago by nmlgc <[email protected]>
Import printf format specifier parsing from thcrap.

95e9304ce737848e744c5fd69a0474226a2a8eb4 authored over 9 years ago by nmlgc <[email protected]>
FormatMessage(): Fix non-allocating calls.

Testing this function using Wine's unit tests now… and apparently, we never
had a test case that...

3a000ca8d433511c6c74cb37cf851e78e4fe997e authored over 9 years ago by nmlgc <[email protected]>
FormatMessage(): Support FORMAT_MESSAGE_FROM_STRING.

4edc4c9f2b52c71cd4d62f0189126e2f32153e8e authored over 9 years ago by nmlgc <[email protected]>
StringToUTF8(): Don't include the terminating \0 in the returned length.

The majority of Win32 API functions we cover actually behave like this, with
GetCurrentDirectory...

6869156f08800a84e76bd35ef10064faf6e493d4 authored over 9 years ago by nmlgc <[email protected]>
Precompile win32_utf8.h to speed up compilation.

I wanted to optimize the #includes as well, but in the end, you just can't
avoid Windows.h witho...

9401007200f9ec4cc6ae6dc46f33125c5c31d624 authored over 9 years ago by nmlgc <[email protected]>
Add the project name to IntDir to be consistent with thcrap's naming scheme.

065facc440bbd304f9bcbdd37111c4c2a11074b4 authored over 9 years ago by nmlgc <[email protected]>
Delay-load all DLLs that might not need to be loaded into the target process.

Not only is this bound to reduce program startup time a bit, which will become
more and more imp...

bc282ac8e85eb88ce95022fcf170bb734421368e authored over 9 years ago by nmlgc <[email protected]>
Support compilation on MinGW.

Which thankfully can be done without breaking the Visual Studio build.

9b15b07924808ec6bdcb53827080b9e696a36f2b authored over 9 years ago by nmlgc <[email protected]>
Remove the SAL annotations copied from Microsoft's headers.

MinGW doesn't have them, but we don't care about them anyway.

4d6a075aedd43f8847d1be0b94c362bd07f1ed2f authored over 9 years ago by nmlgc <[email protected]>
Restore os_compat.png, which accidentally got destroyed by .gitattributes.

ab2db1763b6300bb7858add2d1c0e3901202ced2 authored almost 10 years ago by nmlgc <[email protected]>
STUB GetClassInfo() and GetClassInfoEx().

79d2e55cc4d909dd85e2f86ae9fcc5da14cbb8f2 authored about 10 years ago by nmlgc <[email protected]>
Add GetOpenFileName() and GetSaveFileName().

bdec9c19bef7c9b404c7bce4b0e83645c62898e3 authored about 10 years ago by nmlgc <[email protected]>
Introduce dynamic binding for functions not available on Windows XP.

Starting with the version.dll functions that accidentally XP compatibility two
commits ago.

18f8c0e5229b41c3f31b7b5de49295af6aec20c5 authored about 10 years ago by nmlgc <[email protected]>
RegisterClass*(): Fix a crash if lpszMenuName is an integer resource ID.

R~ight, MAKEINTRESOURCE(). In a higher-level language, these resource IDs
(which can either be s...

05e99e5007e9f399534ed1a1f3e29a67f04adb28 authored about 10 years ago by nmlgc <[email protected]>
Add the GetFileVersionInfo functions.

f131d83a4b7312a1c194c64656e1c6d0f734b9f9 authored about 10 years ago by nmlgc <[email protected]>
StringToUTF16_VLA(): Don't free the VLA if the original string is NULL.

It's just useless since the caller has to free the VLA anyway if the string is
not NULL. There's...

e2ef4899a780ef8440ba15283b9b61ffc0fb60fd authored about 10 years ago by nmlgc <[email protected]>
Add ExtTextOut() and TabbedTextOut().

Message and class stuff is still too hard (as in "do I really need a hash
table to elegantly wor...

b5b8a64bb487206e4309d468d6b96a1353a20a11 authored about 10 years ago by nmlgc <[email protected]>
Refactor conversion of the WNDCLASS and WNDCLASSEX structures.

We will also be converting into the opposite direction.

b93717f4268b088145e580ed79572b7eda4e261a authored about 10 years ago by nmlgc <[email protected]>
Add UnregisterClass().

a382659845d39cc9131e7f0ffc3193443df63c0e authored about 10 years ago by nmlgc <[email protected]>
Add GetGlyphOutline().

Another relic from the Windows 3.1 days, back when Unicode still was 16-bit,
and it shows. If an...

5220aecbe203566c3178ffcaac13e502c4654bd8 authored about 10 years ago by nmlgc <[email protected]>
Restore optimization and PDB creation for Release builds.

c379fabce5b549c69866c4d7fdc41d2fdcb23086 authored about 10 years ago by nmlgc <[email protected]>
Add ExtractIcon() and ExtractIconEx().

614b2e9e7ecb5507284252096f59eb3b9f4494ec authored about 10 years ago by nmlgc <[email protected]>
Add WritePrivateProfileString().

Eh, the Touhou-Online launcher is too hard. It actually does everything right,
but it can't be r...

c3d1e5a3a9a70bcc05612cecb9b1c08ced9743ad authored about 10 years ago by nmlgc <[email protected]>
Import the wininet.dll wrappers from thcrap_update.

These should have been here all along, and thcrap will be moving to a better
library in the futu...

e74675fba9e4471802e04cf3073969742107ee61 authored about 10 years ago by nmlgc <[email protected]>
Add static library and x64 build configurations.

Also introducing a naming scheme for all the different build permutations
while we're at it.

.....

85cb7765c0c32dec78cb8940f7c83bc22f5fac4f authored about 10 years ago by nmlgc <[email protected]>
Update to Visual C++ 2013.

Yeah, I know, I'm still using bullshit proprietary "enterprise" software, but
still, MinGW manag...

b4fec83e37afed5eeb3f7ffc48b9d7f33a420e79 authored about 10 years ago by nmlgc <[email protected]>
Add .gitattributes and .gitignore.

Separate project, separate files.

5886e21f2edb04ed2f0a92e86aa18c81c28482b5 authored about 10 years ago by nmlgc <[email protected]>
Add SHBrowseForFolder().

Really, folder browse dialogs without an edit box should be outlawed. I mean,
all you have to do...

9390ff587fedaec4ab0d9c98571096d6e4a59baf authored about 10 years ago by nmlgc <[email protected]>
CreateFontIndirect*(): Limit face name conversion to the actual string length.

db836ce0e3659569ee81321986bf5d4965058283 authored about 10 years ago by nmlgc <[email protected]>
LoadString(): Return the string in the fallback codepage if possible.

'Cause you know, it might get concatenated with a hardcoded string in the
fallback codepage, lea...

8fa2ea41bf2320be5c65fb137f3890a6ad5020da authored about 10 years ago by nmlgc <[email protected]>
shell32: Ensure the correct calling convention.

We've never had a test case for detouring SHGetPathFromIDList(), and due to a
typo in the old ma...

1f87fc17dedbd662dd14a2d609dc5b994e0286c0 authored about 10 years ago by nmlgc <[email protected]>
Provide an API to return a static list of wrapped functions per DLL.

Now that thcrap and win32_utf8 are split into separate repositories, it makes
sense to move that...

d512406e5978d4eb514ebb367880423e1363b983 authored about 10 years ago by nmlgc <[email protected]>
Add license, tweak README.md

c1ed5f82d9978eb756dd6123093167ac5f3f566e authored over 10 years ago by MuffinPimp <[email protected]>
win32_utf8: Add DragQueryFile().

This came out of a fruitless attempt to turn EditDisk into Unicode for an
easier setup of the PC...

bc0963bc5cbe440a64942344dd419c80461ed89f authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Export function level promotion for the CreateFont() family.

Yeah, it feels sort of weird to export these as part of win32_utf8, but hey, thcrap needs that f...

5e494b2fb48d50dcc0fc67288b48717cf1484c73 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add CreateFontIndirect() and CreateFontIndirectEx().

ff4ac9776e663796b8033f637b858f090d8f3e35 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add EnumFontFamiliesEx().

228c2c88dc362faa5c9ca0c1c389add21d1763b3 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add SHGetPathFromIDList().

ae217c812aeba496660607923470bba466f73d2f authored over 10 years ago by nmlgc <[email protected]>
Add a wrapper macro for the typical Win32 return value pattern.

Yeah, it also took me a while to wrap my head around the concept of returning zero (= 1 value) f...

89d561d018ed9575582f538da575a47a52064ea7 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add DeleteFile().

59e290e5d2d819955d753ba351457f8b9d91ce3a authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add RemoveDirectory().

bc2f39de63d1838f9d302cba05effb528f237775 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add fopen().

Well, we had to enter CRT territory at one point.

f8ae365e179d5eb13633476bb995e98a1019dbcc authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add InsertMenuItem().

2ade752a2d31757bad148e1118e86af9a3c8c906 authored over 10 years ago by nmlgc <[email protected]>
Split off StringToUTF16()'s conversion into a MultiByteToWideChar() detour.

a4f5a0344de96f0139eaa0b86d62bed559687482 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8(): Add WideCharToMultiByte().

093899961b30429204a915300a01f6bafc176540 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add LoadString().

6df3dfe58d3ba4e11019a3b2d9e4d580297b513e authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add GetFileAttributes() and GetFileAttributesEx().

3f1a1798f1c5151daf766ab0b67abf05c7412b30 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Correctly sort GetPrivateProfileIntU().

75504d16fcfe7df651396e35fb2a6f0140f33cd9 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add a wrapper for GetCurrentDirectory()-like functions.

52ec319ccc62e780ad1659c78d88ca33e3467719 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add GetTempPath().

c6aae0c083b2d8eff17c10a06baf31ff95e4fb8c authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add a wrapper for functions taking only one string parameter.

I've been thinking for a long time about how to reduce the redundancy in all these wrappers, and...

cee5c3cb06f721f41d1a13d737aac90944dee2be authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add MoveFile(), MoveFileEx() and MoveFileWithProgress().

92c9d2ef7a5afa1d3fb73bae7b2bf5d3c00acbc0 authored over 10 years ago by nmlgc <[email protected]>
Cleanup: Random fixes

4a25a23b58af7ad8e8cbb051afd1f06bdca53800 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add IsDBCSLeadByteFB().

Required for Danmakufu. And yes, it works, even through UPX. I can't believe it either.

d8b3e99c07450a486f83055945285c3cadf565b3 authored almost 11 years ago by nmlgc <[email protected]>
Use the WCHAR_T_CONV_VLA macro wherever it makes sense.

92c857f864333a91fbb83a1a4aff06797a0ff621 authored about 11 years ago by nmlgc <[email protected]>
Fix some memory leaks.

c8f0c9753ea01949b3ae6180892d242103c84b67 authored about 11 years ago by nmlgc <[email protected]>
Reorder function definitions to match their order in the header file.

This is driving me ma~d.

596ee1d8c4e7a34020579dfefcf86a8c5a0a1814 authored about 11 years ago by nmlgc <[email protected]>
Use a single conditional branch to guard against null parameters.

abf4d73f667edc2d01329d079bc86b81be013bff authored about 11 years ago by nmlgc <[email protected]>
Use the WCHAR_T_FREE macro where appropriate.

bcca1995aaaac164356d6bf59cc76c16c74df3c3 authored about 11 years ago by nmlgc <[email protected]>
Eliminate potential VLA memory leaks.

Whoops.

2ab57daddec5eb7459dd5e842ee05481564b1a1b authored about 11 years ago by nmlgc <[email protected]>
win32_utf8: Add SetDlgItemText().

Necessary for the pad input check in the custom.exe of th06 (... and later games, if only it act...

47b74fc0a1eac2eabefd44c411994f321d62a5cc authored about 11 years ago by nmlgc <[email protected]>
Add a macro for VLA conversions to UTF-16.

1d8263a18d6e7c5840f6ba69a381cb9f95c521a7 authored about 11 years ago by nmlgc <[email protected]>
Cleanup.

... and a bit of everything: missing initializations of local variables, alphabetical sorting of...

589bb985d15147af47e897f7cefc8df65aa2703b authored about 11 years ago by nmlgc <[email protected]>
Correct types.

efeed3746901d3468e7b3a5b5833559e888899eb authored about 11 years ago by nmlgc <[email protected]>
Change leftover spaces to tabs.

33b996380995c040466162b6b5fc693b3f1e74c1 authored about 11 years ago by nmlgc <[email protected]>
Add macros for conversions from UTF-16 to UTF-8.

For the few cases where we need them.

7efb678e1d9785c7a656f707dbe0c03ec51cca8c authored about 11 years ago by nmlgc <[email protected]>
Change "old-style" empty function declarations to the (void) syntax.

That's the kind of stuff you only notice when testing a different compiler. Another lesson learned.

c6511411fab11328157556fb8ff531c0b9c565c2 authored about 11 years ago by nmlgc <[email protected]>
win32_utf8: Add GetPrivateProfileInt().

Necessary for vpatch chaining.

89370eaf2058230bfb683300e970f6a6bc8b96a1 authored about 11 years ago by nmlgc <[email protected]>
Cleanup.

Huh, I forgot sorting the detoured functions in win32_detour.c back in 7e258645f7caa7ee67dc24cf1...

8eb563a0d15eef726128845bcd5d5e97905a11d0 authored about 11 years ago by nmlgc <[email protected]>
StringToUTF8: Take the actual buffer length as parameter.

... instead of intransparently multiplying it by some factor. You should not be able to accident...

d329b31ad18284d2949ddaa78b4d68fce2377d9a authored about 11 years ago by nmlgc <[email protected]>
Cleanup.

That should have been all the whitespace issues.

5d9457d5770bdf56cfeabcc8740b5983ee2d679c authored about 11 years ago by nmlgc <[email protected]>
Add a macro for the most common StringToUTF16 use case.

ee4108d48b200d188d33bd0922819d6a2e7da981 authored over 11 years ago by nmlgc <[email protected]>
Describe the extended functionality of certain win32_utf8 functions in the readme file.

edc1a5290d7ff2d06e845d04286785029096ae91 authored over 11 years ago by nmlgc <[email protected]>
GetModuleFileNameU(): Return the required length if NULL is passed.

Finally, we have the "GetCurrentDirectory functionality" the original function unfortunately lacks.

a26632c77fea1da8835b253d3245d7edce917024 authored over 11 years ago by nmlgc <[email protected]>
Cleanup.

4c029147d24323e66f2026015f6c4166913bec98 authored over 11 years ago by nmlgc <[email protected]>
win32_utf8: Add GetModuleFileNameEx().

f7ea7a248ce086dbcddb2816be654841d8276c7f authored over 11 years ago by nmlgc <[email protected]>
Eliminate directory creation confusion and patch CreateDirectoryA.

The existing calls to win32_utf8's custom CreateDirectory function assumed that the directory pa...

1decdb864106c3f522e9fc9584825e0ae7817e20 authored over 11 years ago by nmlgc <[email protected]>
Cleanup.

Now with more "hey, didn't I have a macro for that?".

a7a239cf8f53a16c3d8b7a1e83765c58083e2511 authored over 11 years ago by nmlgc <[email protected]>
win32_utf8: Add DrawText.

2574c11477b100a821dc643ab8b6aa29f30030c4 authored over 11 years ago by nmlgc <[email protected]>
Allow length calculations in the UTF conversion functions.

You can now:
* pass NULL as the destination parameter to get the required buffer size for the co...

667c064a3ac82b682d75f61bd118f1fbad3f9dc6 authored over 11 years ago by nmlgc <[email protected]>
win32_utf8: Add CreateDialogParam and DialogBoxParam.

Bravo, Microsoft. What a great design.

If you just replaced lpTemplateName with an integer para...

8709b3fe295c3a39964daaa2ee9d2418ca32fc5e authored over 11 years ago by nmlgc <[email protected]>
Cleanup.

Recently, I seem to have forgotten that VLAs need to be freed, too.

0c73e890b4110d322bbd34288adbfc6d2dd253d3 authored over 11 years ago by nmlgc <[email protected]>
Add EnsureUTF8().

cdc137673d7a5f993ae2a1553e8c6d4aaa5961e7 authored over 11 years ago by nmlgc <[email protected]>
Add json_object_get_numkey().

9f568955f933385ac466be581fe76452ab511825 authored over 11 years ago by nmlgc <[email protected]>
win32_utf8: Add GetEnvironmentVariable.

This is necessary to run th125 and later with user names that contain non-ASCII characters.

10ab238231dab933dc5e00348d91d757edf5891c authored over 11 years ago by nmlgc <[email protected]>
win32_utf8: Order functions alphabetically.

fb17c70c343b931a84f3341a3a45302b613ecad3 authored over 11 years ago by nmlgc <[email protected]>
TextOutU/GetTextExtentPoint32U: Clear out the wchar_t buffer before writing.

This correctly terminates the resulting string in any case. :)

9c8f187d865b41ff76996182e08ef71d3c7b0065 authored over 11 years ago by nmlgc <[email protected]>
StringToUTF16: Actually observe input and output widths correctly.

I must have read over the "size, in wide characters" part. This becomes a problem once you only ...

a013b504bed323fcfbab706119ea84098d08562a authored over 11 years ago by nmlgc <[email protected]>
Fixing some comments and cleaning some whitespace.

13bb12cc1e2f00fd3247107607543045652b7dd4 authored over 11 years ago by nmlgc <[email protected]>
Initial commit

e555b221cf3a1893bc61ddae6d1c8ce4ed521eab authored over 11 years ago by nmlgc <[email protected]>