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