Fix C++ comments in C file
This commit is contained in:
parent
2030995f6b
commit
e951db4c49
@ -96,25 +96,25 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
|||||||
|
|
||||||
/* Convert the command line arguments to UTF-8 */
|
/* Convert the command line arguments to UTF-8 */
|
||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
// find the required size of the buffer
|
/* find the required size of the buffer */
|
||||||
int u8size = WideCharToMultiByte(CP_UTF8, // CodePage
|
int u8size = WideCharToMultiByte(CP_UTF8, /* CodePage */
|
||||||
0, // dwFlags
|
0, /* dwFlags */
|
||||||
wideArgv[i], // lpWideCharStr
|
wideArgv[i], /* lpWideCharStr */
|
||||||
-1, // cchWideChar
|
-1, /* cchWideChar */
|
||||||
NULL, // lpMultiByteStr
|
NULL, /* lpMultiByteStr */
|
||||||
0, // cbMultiByte
|
0, /* cbMultiByte */
|
||||||
NULL, // lpDefaultChar
|
NULL, /* lpDefaultChar */
|
||||||
NULL); // lpUsedDefaultChar
|
NULL); /* lpUsedDefaultChar */
|
||||||
if (u8size > 0) {
|
if (u8size > 0) {
|
||||||
char *strbuf = (char *)malloc(u8size);
|
char *strbuf = (char *)malloc(u8size);
|
||||||
int ret = WideCharToMultiByte(CP_UTF8, // CodePage
|
int ret = WideCharToMultiByte(CP_UTF8, /* CodePage */
|
||||||
0, // dwFlags
|
0, /* dwFlags */
|
||||||
wideArgv[i], // lpWideCharStr
|
wideArgv[i], /* lpWideCharStr */
|
||||||
-1, // cchWideChar
|
-1, /* cchWideChar */
|
||||||
strbuf, // lpMultiByteStr
|
strbuf, /* lpMultiByteStr */
|
||||||
u8size, // cbMultiByte
|
u8size, /* cbMultiByte */
|
||||||
NULL, // lpDefaultChar
|
NULL, /* lpDefaultChar */
|
||||||
NULL); // lpUsedDefaultChar
|
NULL); /* lpUsedDefaultChar */
|
||||||
if (ret) {
|
if (ret) {
|
||||||
argv[i] = strbuf;
|
argv[i] = strbuf;
|
||||||
} else {
|
} else {
|
||||||
@ -125,7 +125,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
|||||||
argv[i] = _strdup("");
|
argv[i] = _strdup("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
argv[argc] = NULL; // required by C standard at end of list
|
argv[argc] = NULL; /* required by C standard at end of list */
|
||||||
|
|
||||||
/* Free the wide character string array */
|
/* Free the wide character string array */
|
||||||
LocalFree(wideArgv);
|
LocalFree(wideArgv);
|
||||||
|
Loading…
Reference in New Issue
Block a user