2015-08-06 17:03:31 +00:00
|
|
|
/*
|
|
|
|
* Windows CE console application entry point
|
|
|
|
*
|
2020-08-07 11:07:28 +00:00
|
|
|
* Copyright The Mbed TLS Contributors
|
2023-11-02 19:47:20 +00:00
|
|
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
2015-08-06 17:03:31 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#if defined(_WIN32_WCE)
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
extern int main(int, const char **);
|
2015-08-06 17:03:31 +00:00
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
int _tmain(int argc, _TCHAR *targv[])
|
2015-08-06 17:03:31 +00:00
|
|
|
{
|
|
|
|
char **argv;
|
|
|
|
int i;
|
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
argv = (char **) calloc(argc, sizeof(char *));
|
2015-08-06 17:03:31 +00:00
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
for (i = 0; i < argc; i++) {
|
2015-08-06 17:03:31 +00:00
|
|
|
size_t len;
|
2023-01-11 13:50:10 +00:00
|
|
|
len = _tcslen(targv[i]) + 1;
|
|
|
|
argv[i] = (char *) calloc(len, sizeof(char));
|
|
|
|
wcstombs(argv[i], targv[i], len);
|
2015-08-06 17:03:31 +00:00
|
|
|
}
|
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
return main(argc, argv);
|
2015-08-06 17:03:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* defined(_WIN32_WCE) */
|