tidy-up: TEXT() vs _TEXT() vs _T() use (Windows)

Use `_TEXT()` when interacting with CRT functions (also prefer over
synonym `_T()`), `TEXT()` for Win32 functions.

Within curl, they mean the same because CRT/Win32 Unicode mode are
always enabled in sync.

Ref: https://devblogs.microsoft.com/oldnewthing/20040212-00/?p=40643/

Closes #22334
This commit is contained in:
Viktor Szakats 2026-07-15 14:08:18 +02:00
parent d52c7e78a3
commit 5f2a70abe3
No known key found for this signature in database
4 changed files with 19 additions and 18 deletions

View file

@ -150,7 +150,7 @@ int main(int argc, char *argv[])
#ifdef _WIN32
/* Undocumented diagnostic option to list the full paths of all loaded
modules. This is purposely pre-init. */
if(argc == 2 && !_tcscmp(argv[1], _T("--dump-module-paths"))) {
if(argc == 2 && !_tcscmp(argv[1], _TEXT("--dump-module-paths"))) {
struct curl_slist *item, *head = GetLoadedModulePaths();
for(item = head; item; item = item->next)
curl_mprintf("%s\n", item->data);