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

Add guards around CXX macros definitions

994d7ad8c48d6c295926dd58d86cd0e9ed1d3e19 authored about 1 year ago by brliron <[email protected]>
gdi: add W versions of lower_ functions

bb8dc6d11dc394aa769e44a06fa356e51daca1b3 authored over 1 year ago by 32th-System <[email protected]>
Detect Windows 11

82b4a43ff69098f8dd8f66fe7dac69e5a1b08e55 authored about 2 years ago by brliron <[email protected]>
Fix build error in last commit

2103997ef3acf595ba7f560ef473f72275f58756 authored about 3 years ago by brliron <[email protected]>
Fix behavior of GetModuleHandleExU with GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS

Passing something other than a string in the lpFilename parameter is valid
when the GET_MODULE_...

942e72010a36dae3f6728c5cd619ac2c6ad0cfb0 authored about 3 years ago by zero318 <[email protected]>
Fix behavior of GetModuleHandleExU with NULL name

GetModuleHandle variants have special behavior when called with a NULL module name.
However, th...

e320764e24c3790b7c12d9f0f437a56875d838df authored about 3 years ago by zero318 <[email protected]>
Add CharLowerU

5f8d70f11d2a3a01889e73ebb1e4a2c2bc4332da authored over 3 years ago by brliron <[email protected]>
Fix GetModuleHandleExA/U pair

1e70b9e714ce99c6b5ffb0a6bb461f6e036bccf2 authored almost 4 years ago by 32th System <[email protected]>
Merge pull request #10 from bluecataudio/More-Wrappers

Added GetModuleHandleEx function

449f0cd4dabb3d1a7a8412b6a1d7a3039d3a5ae8 authored almost 4 years ago by brliron <[email protected]>
Export GetModuleHandleEx in win32_utf8.def

c4307bd52828999d6ade97150a44868b499a629f authored almost 4 years ago by brliron <[email protected]>
Fixed GetModuleHandleEx

Fixed wrong variable used for GetModuleHandleExW function call.

0aa44f0092ebfddb4db11bacb20c2c0d48c41106 authored almost 4 years ago by Blue Cat Audio <[email protected]>
Fixing function definition

third argument should be HMODULE *

0ad11f120b602201a59bf1426de366d4b9efac30 authored about 4 years ago by Blue Cat Audio <[email protected]>
Added GetModuleHandleEx function

Added one more useful function. Kept the right order and tab indentation this time.

775d68f18de2ae1b1e1d5b370c6d45685bb70e53 authored about 4 years ago by Blue Cat Audio <[email protected]>
Add IsolationAwareMessageBoxU

See #9.

fed9841d95cf39ca9a9cc5596d60def8b52eeece authored about 4 years ago by Egor <[email protected]>
Add new Win32 function wrappers

- Added a couple of useful function wrappers.
- Defined CallWindowProc as CallWindowProcW. Many ...

5d6a06ca545d0470d5e0955b24a1ad1992a302e5 authored about 4 years ago by Blue Cat Audio <[email protected]>
Update .gitignore

626bdf19914059df2f654c84521c8c9887188056 authored about 4 years ago by Egor <[email protected]>
Fix memory leaks

The leak in WCHAR_T_CONV only happens in debug builds.

Merges #8

c2602e1eda798fc0b9bc8601f32bc6ce32ea8e8a authored about 4 years ago by Blue Cat Audio <[email protected]>
Ignore unused parameters in winmain

6a1ce033bff557f3c0bef9b4eab020c44a61fe29 authored about 4 years ago by brliron <[email protected]>
Fix more warnings

6d5320b42dfde1845314759b61f8e80af812a7c9 authored about 4 years ago by brliron <[email protected]>
Fix warnings about unused parameters

68b77723de4fa0c87c507ae1d284ea338e8967ac authored about 4 years ago by brliron <[email protected]>
PathAddBackslashU: don't add a backslash if the path ends with a forward slash

50d93ac9223fe938cc5f7dbe13290e0138f096bd authored over 4 years ago by brliron <[email protected]>
Don't issue a warning on redefinition of _CRT_SECURE_NO_WARNINGS

af1980f77958532dbc267b9e86bd517e213a535a authored about 5 years ago by brliron <[email protected]>
Add ReadFile/WriteFile wrapper

Not really utf-8 related, but still a useful backport from Win 8.

Needed by th17.5 trial on Win 7

a56ce67ffd4057a413aa8d2e43e1aecaaee0ee3b authored about 5 years ago by Egor <[email protected]>
Don't write to an LPCSTR

1014442d49d161e49aae8d5ac7d168901c319639 authored over 5 years ago by 32th System <[email protected]>
CreateDirectory: don't fail when the parameter ends with a / or a \\

039a93a7606e2d8c37d5fa162a61649788587cb9 authored over 5 years ago by brliron <[email protected]>
Add functions mentioned by Issue #3

376a1b426d049c41f7d23db00b086b39d515bacd authored over 5 years ago by 32th System <[email protected]>
Split off a separate SAFE_CLEANUP() macro from SAFE_FREE().

Less duplication if you want to do the same for the C++ delete and
delete[] keywords.

a0b1e11b77aeeab316e2752ac966b44a931bbd9e authored over 6 years ago by nmlgc <[email protected]>
Remove WM_NOTIFY from message_enum.h

If WM_NOTIFY isn't defined, Richedit.h redefines the NMHDR structure.
That means we can't #undef...

1cac217febe42e2fa86409d185abe2fe56464c5e authored almost 7 years ago by brliron <[email protected]>
Add PathFindFileName().

e96cc94cbb3046a3885d21bb17506a44988423e8 authored almost 7 years ago by nmlgc <[email protected]>
Add macros for implementing IUnknown in COM proxy classes.

It's only thcrap which needs it now, but DirectInput has A and W
versions of its interfaces, so ...

9a8e0da3c6dc8cc79cef861a747c71fe9c42cb8e authored almost 7 years ago by nmlgc <[email protected]>
MultiByteToWideCharU(): Only try the fallback→UTF-8 conversion if necessary.

And that's all the error-checking we need to also cover cbMultiByte
being 0. Every other paramet...

99daa06d24ba048c2f4aadb275039e2113d5e9f6 authored almost 7 years ago by nmlgc <[email protected]>
StringToUTF16: if str_len is 0, the function just returns 0.

2fa0303364f7aeb79ac345a44e89a24c85a5e78b authored almost 7 years ago by brliron <[email protected]>
Fix all whitespace and encoding issues.

And removing a certain comment that proved rather annoying for people on
a DBCS locale…

bce4a022f3b1274a1ce8177a9a4626dcd3ace41b authored almost 7 years ago by nmlgc <[email protected]>
Consistently use WCHAR_T_FREE() for arrays declared with WCHAR_T_DEC().

f19f2f8b4b110612ae4b20aa5639a61593737819 authored almost 7 years ago by nmlgc <[email protected]>
Add InternetOpen().

Unexpectedly necessary.

8f69ebfe20ee41de1b8c302431c3646843b4f5ca authored almost 7 years ago by nmlgc <[email protected]>
InternetCombineUrl(): Include the terminating \0 in the buffer size branch.

Three bugs O_O

f8a598ab87927e2d43e1d36a00aa17bda19f66c1 authored about 7 years ago by nmlgc <[email protected]>
InternetCombineUrl(): Use the correct buffer in the buffer size branch.

Two bugs in this function, even.

afbef5ae5926c2ac0fafa2caae26d3f0aeb3a24e authored about 7 years ago by nmlgc <[email protected]>
InternetCombineUrl(): Don't overwrite the U buffer length with the W one.

Which effectively broke the function for every non-ASCII character in
the combined URL.

631ae8508a271164ca56dbe40f0d72b5c841802f authored about 7 years ago by nmlgc <[email protected]>
Add CreateFileMapping() and OpenFileMapping().

50d6add1392109c6513cba9dae5f1227643b4d27 authored about 7 years ago by nmlgc <[email protected]>
Add LoadLibraryEx(), dummying out the search path flags on systems without KB2533623.

Second case for a separate and even smaller win32_sanity library. How
many more until I start wi...

b5e57538548faa6e0a7a5d9adc9930a92eeb430c authored about 7 years ago by nmlgc <[email protected]>
CreateDirectory(): Actually pass the security attributes.

5c080faccfde012a2f084a4f8bdc1d4d269b3dbf authored about 7 years ago by nmlgc <[email protected]>
FormatMessage(): Fix the broken example strings in the comment.

21adbb9c07856d9d6f5f79e6918a9988df853ac9 authored about 7 years ago by nmlgc <[email protected]>
Remove the nonsensical WCHAR_T_CONV_VLA() macro.

Yeah, right, when *don't* we want to pass an incoming NULL to the
W function? StringToUTF16_VLA(...

6f41d0a44976d37bba99815c52ba15cdbfc1f02a authored about 7 years ago by nmlgc <[email protected]>
GetGlyphOutline: move the character encoding conversion to a new

function (CharToUTF16).

9003fc7e421abbf4d4d0734c02cda6626a58ce22 authored about 7 years ago by brliron <[email protected]>
Add GetPrivateProfileString().

Prioritizing the fallback encoding here because INI is old and the
chance of those strings being...

f604d214be1d1d8603460df36a405ea9e09b0811 authored about 7 years ago by nmlgc <[email protected]>
MSBuild: Define NDEBUG in Release mode in order to remove assert().

0b3d2b8ffcd466582e3ea7af613f6332fdcccc88 authored about 7 years ago by nmlgc <[email protected]>
CharNext: Change the parameter to be const.

407f847b286648ed9556a2e51c40109ad9d734a0 authored about 7 years ago by nmlgc <[email protected]>
DrawText: Don't include the terminating \0.

Whatever the original rationale for this was, *it was wrong*, since it
led to DrawText() and Get...

ab1e1bcf9b1b83bd140967236999956e7b6faa15 authored about 7 years ago by nmlgc <[email protected]>
FixedLengthStringConvert: Remove unnecessary ZeroMemory(), wcslen(), and strlen() calls.

c18f71e074df28fee40cd36278f7a826ce23a4d8 authored about 7 years ago by nmlgc <[email protected]>
Add SetEnvironmentVariable().

12d53739408ba11ef75563175576456081eadd48 authored about 7 years ago by nmlgc <[email protected]>
Add a function for describing the currently running Windows or Wine version.

0ae005b637dd5049205f5d8a8c142b86acf4e424 authored over 7 years ago by nmlgc <[email protected]>
Add WinMain().

At least the entry point selection behavior for WinMain() is the same as
for main() in all three...

f715ba78a7afcc4b8a2f9ef5a77b7179815985b7 authored over 7 years ago by nmlgc <[email protected]>
Define wmain() in addition to main().

Saving those precious nanoseconds that the C runtime would otherwise
waste with needlessly conve...

f9a4ae765c2d0f2b20b8520119610ae3b97f342f authored over 7 years ago by nmlgc <[email protected]>
Surround the entry point declarations with `extern "C"`.

f60ef6635be63dee309fb266bda53e8d040e494d authored over 7 years ago by nmlgc <[email protected]>
main(): Take the user's main() function as a function pointer.

This allows us to move the UTF-16 → UTF-8 conversion into the DLL for
a dynamic build, and keep ...

109686e3a566fb2f2d52c51bf3ebb6b153ba452a authored over 7 years ago by nmlgc <[email protected]>
Finally move win32_utf8.h out of the src/ directory.

More logical to have all "public" headers and source files at the top
level, and more convenient...

12787fc45d21dd503865d68c4e2050b51d2ab90a authored over 7 years ago by nmlgc <[email protected]>
Move build code shared between dynamic and static builds to a separate file.

The dynamic one will require some further unique code…

410193d3ced4c1ae1b0fbb7fe9c925fcb659662a authored over 7 years ago by nmlgc <[email protected]>
Add #pragma comment(lib) statements for the remaining default libraries.

Visual Studio adds these by default, but cl.exe doesn't.

b2f2bad41f2a6af68382d5a690045a2e527cc53c authored over 7 years ago by nmlgc <[email protected]>
message_enum: Add the multimedia messages from mmsystem.h.

4c620b3d60d1ee84d3ae3c7fa74732a4c74e0810 authored over 7 years ago by nmlgc <[email protected]>
Add SHParseDisplayName().

The fact that the original UTF-16-only version (and even the COM
function it wraps, IShellFolder...

461bb6840cae75eb096f3f0a41e9e49727b4b51e authored over 7 years ago by nmlgc <[email protected]>
w32u8_strcmp: assert() the pointers instead of comparing them.

Not only because it was actually wrong to do so (it previously returned
"strings are equal" if o...

83798d722247e9234158701de8df5b125214bdca authored over 7 years ago by nmlgc <[email protected]>
Fix -Wtypedef-redefinition.

0da56e669c09cda1f17518aaadf9604984fbf1bb authored over 7 years ago by nmlgc <[email protected]>
Fix -Wmissing-braces.

In case someone wants to compile this with -Wall… (Hint: We might.)

e08d70af75186275b5f1ef3bf5fe945171aab416 authored over 7 years ago by nmlgc <[email protected]>
Add GetFullPathName()

8d193265f9d71c8d18dd78c1aa35909b1db0f2f5 authored almost 8 years ago by Bruno Liron <[email protected]>
Add an error-checked strcmp function.

897dcb7d13340a7c4be79e440dda9d4275ee538f authored almost 8 years ago by nmlgc <[email protected]>
CharNextA: Try to handle the given string as utf-8 before handling it as

beeing in fallback_codepage.

70e84cdd1d72576230d0ccb82947673fa85924f1 authored almost 8 years ago by Bruno Liron <[email protected]>
Add an elementsof() macro.

b864f8101a5b978f4e730f3609fda465f7a458eb authored about 8 years ago by nmlgc <[email protected]>
Conform to C99's inline semantics.

Fixes link errors when using GCC 5, which defaults to -std=gnu11.

4033deaaf6f77845d4e4587e4d61a9def207e078 authored about 8 years ago by nmlgc <[email protected]>
MinGW requires lowercase Win32 header file names on case-sensitive systems.

a9d3aa32aa870e4404c0a90240d1ce200f017011 authored about 8 years ago by nmlgc <[email protected]>
Globally #include assert.h.

f2dd0f6b7f7677a9c3a8481319e63c6a3b4a1aba authored about 8 years ago by nmlgc <[email protected]>
Change our error-checked strlen/wcslen macros to inline functions.

Replacing a standard function name with an expression is asking for
trouble once win32_utf8 is i...

987f06c88c954a67e6a6505b04545231e7c70e07 authored about 8 years ago by nmlgc <[email protected]>
Surround all declarations with `extern "C"` if we're included from C++.

7e0a1633717bf5983fbcadf7e6ae7ae3fde2760e authored about 8 years ago by nmlgc <[email protected]>
Automatically generate a typedef for every wrapped function.

In C++, these are necessary for function pointers because you can't
simply use FARPROC there.

1e03e3c37f42225cdedabc19ebf83003416889f0 authored about 8 years ago by nmlgc <[email protected]>
Add SHGetFolderPath().

06322ef131c7353e1373adcfd9357c652ecafe4a authored over 8 years ago by nmlgc <[email protected]>
Redefine window message IDs as an enum for debugger visibility.

Except for the *FIRST and *LAST definitions, which are rather useless in
debugging situations, t...

50575cba1ace705fc1b32b69bd87b74051475190 authored over 8 years ago by nmlgc <[email protected]>
Remove the .vcxproj.filters file.

Aannoying in the git diff if Visual Studio suddenly decides to sort files
differently, useless f...

dd5dcaee5824d3ce03505c05814a7acbe711121d authored over 8 years ago by nmlgc <[email protected]>
Treat type differences between function declaration and definition as errors.

a246ee3d6860028e601f6daa9316d3eef0316e17 authored over 8 years ago by nmlgc <[email protected]>
Define _CRT_SECURE_NO_WARNINGS.

Should have been done long ago. Ignoring these "manually" on every compilation
can quickly get h...

2c3a3f94da9ce1134a89c62a5cb56bfcad48dd19 authored over 8 years ago by nmlgc <[email protected]>
Consistently define pointer-less function types.

8c5f886577cdd6afe808ae0f761044ae14e6cc31 authored over 8 years ago by nmlgc <[email protected]>
Add EnumFonts() and EnumFontFamilies().

The Inno Setup-based installers used from TH10 onwards *require* a successful
enumeration of MS ...

076c0ca3144d1d69253a1f7fa69a857df166a3d3 authored over 8 years ago by nmlgc <[email protected]>
Correctly sort GetWindowLong(), GetWindowLongPtr(), and PathFileExists().

e04844ffd6211f297092500d0aba7af873c76219 authored over 8 years ago by nmlgc <[email protected]>
GetModuleFileName(): Retain the last-error code.

54aa30943eeba440068b8c614ae3ba432ef62f20 authored over 8 years ago by nmlgc <[email protected]>
Add CopyFile() and CopyFileEx().

7ac57475a642fabf3e16276a980276a5b33e7fa9 authored over 8 years ago by nmlgc <[email protected]>
Forgot dsound.dll in the delay-loading linker options -.-

2e5ae2246286a8288cd93ed7a49fe001531bcd45 authored over 8 years ago by nmlgc <[email protected]>
CreateWindow(), GetClassInfo(), UnregisterClass(): Support class name atoms.

b2360859f514f818ed9faa7e92627b45b10e7bd9 authored almost 9 years ago by nmlgc <[email protected]>
README: Fix some Markdown syntax errors.

bf41eb41e725241966a44b699b9d0d9808958359 authored about 9 years ago by nmlgc <[email protected]>
Add MMSystem.h before dsound.h

I don't know why there are errors, but when compiling thcrap in my system,
lack of WAVEFORMATEX ...

f6e930e8a2281436dbdf6eaf3ed0d22da204e0a0 authored over 9 years ago by VBChunguk <[email protected]>
Fix build errors caused by non-ASCII characters

Using non-ASCII characters may cause mysterious errors in some
codepage(like CJK) when they are ...

74977db827501a413fbccd2bbf5cbf7a664efd39 authored over 9 years ago by VBChunguk <[email protected]>
Actually initialize and clean up our submodules in our custom main() function.

The version.dll OS compatibility wrappers now also work when linking win32_utf8
statically.

84160f6b3bee4dc2f3f24a4456ff1a3f6114ff38 authored over 9 years ago by nmlgc <[email protected]>
Remove some old initialization cruft.

cbdd54c66c22e3f2f6826fbb545628337be12227 authored over 9 years ago by nmlgc <[email protected]>
README: Rewrite the Building section and document our custom main() function.

02c1565b8c8fa6b75c11dff65e9227bf2d17ae27 authored over 9 years ago by nmlgc <[email protected]>
Add main().

SDL style!

8cf7cbadd26ef29dcf3221baae726b69b0afa5d3 authored over 9 years ago by nmlgc <[email protected]>
Add a #define to optionally remove w32u8_get_wrapped_functions() from a build.

Necessary for Visual C++ to eliminate unused wrapper functions from builds.
Interestingly, MinGW...

ca6f8c4fae87bd871641f3eaa88b674f8e72846b authored over 9 years ago by nmlgc <[email protected]>
Add DirectSoundCaptureEnumerate() and DirectSoundEnumerate().

Yeah, it's probably not worth it to define a shared callback wrapper structure.

3f1de6321a9bb4b9bb165fa7e5409317fc642974 authored over 9 years ago by nmlgc <[email protected]>
Add CommandLineToArgv().

a9204f1a032b98e1bb22bcf5def811367030188e authored over 9 years ago by nmlgc <[email protected]>
Add GetCommandLine().

Note that we don't free() the malloc()ed command_line buffer. This is modern
Windows, the operat...

f0db87b7e8e04dc785032caae2ef00e3d2613c73 authored over 9 years ago by nmlgc <[email protected]>
Pull in the required Windows DLLs via #pragmas in win32_utf8_build.c.

This further simplifies static linking of win32_utf8 into other codebases by
not requiring them ...

64d691b74699efd83271e485fc6d6dc4a5e28b2f authored over 9 years ago by nmlgc <[email protected]>
README: Mention that Cygwin's gcc is unsupported and explain why.

ecae46a2478a5fd293f56e9624d66d9949aa6478 authored over 9 years ago by nmlgc <[email protected]>
FormatMessage(): Fix FORMAT_MESSAGE_ARGUMENT_ARRAY for 32-bit builds.

fa89ed5c7c4987564c90526c16fcc3424c56c3b4 authored over 9 years ago by nmlgc <[email protected]>
Wrap1P(): Change the return type to size_t.

DWORD is still a 32-bit type in 64-bit builds, and we certainly don't want to
truncate any poten...

9ef6d33df0b2e0cb60b6ba10215261fb8d13c587 authored over 9 years ago by nmlgc <[email protected]>