blob: 30a8a3cc006d496ba7943bbf4713d60575ad5a82 [file] [log] [blame]
Manuel Pégourié-Gonnardfa1304a2015-08-06 19:03:31 +02001/*
2 * Windows CE console application entry point
3 *
Manuel Pégourié-Gonnard6fb81872015-07-27 11:11:48 +02004 * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
Manuel Pégourié-Gonnardfa1304a2015-08-06 19:03:31 +02005 *
6 * This file is part of mbed TLS (https://tls.mbed.org)
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22
23#if defined(_WIN32_WCE)
24
25#include <windows.h>
26
27extern int main( int, const char ** );
28
29int _tmain( int argc, _TCHAR* targv[] )
30{
31 char **argv;
32 int i;
33
34 argv = ( char ** ) calloc( argc, sizeof( char * ) );
35
36 for ( i = 0; i < argc; i++ ) {
37 size_t len;
38 len = _tcslen( targv[i] ) + 1;
39 argv[i] = ( char * ) calloc( len, sizeof( char ) );
40 wcstombs( argv[i], targv[i], len );
41 }
42
43 return main( argc, argv );
44}
45
46#endif /* defined(_WIN32_WCE) */