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