|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
|
3 * |
|
4 * This library is free software; you can redistribute it and/or |
|
5 * modify it under the terms of the GNU Lesser General Public |
|
6 * License as published by the Free Software Foundation; either |
|
7 * version 2 of the License, or (at your option) any later version. |
|
8 * |
|
9 * This library is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
12 * Lesser General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Lesser General Public |
|
15 * License along with this library; if not, write to the |
|
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
|
17 * Boston, MA 02111-1307, USA. |
|
18 * |
|
19 * Description: |
|
20 * |
|
21 */ |
|
22 |
|
23 |
|
24 // This is a test application used by g_spawn APIs. This application |
|
25 // is spawned by them. |
|
26 |
|
27 #include <stdio.h> |
|
28 |
|
29 int main(int argc,char *argv[]) |
|
30 { |
|
31 int i; |
|
32 FILE *fp; |
|
33 |
|
34 fp = fopen("c:\\Helloworld.txt", "w"); |
|
35 |
|
36 if(!fp) |
|
37 { |
|
38 printf("File creation failed\n"); |
|
39 return 0; |
|
40 } |
|
41 |
|
42 fprintf(fp,"argc = %d\n", argc ); |
|
43 |
|
44 for(i=0;i<argc;i++) |
|
45 { |
|
46 fprintf(fp,"argv[%d] = %s\n",i,argv[i]); |
|
47 } |
|
48 |
|
49 fclose(fp); |
|
50 return 0; |
|
51 } |