Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / hello_world / dump_env.c
1 /*
2  * Copyright 2010 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7
8 #include <stdio.h>
9
10 int main(int argc, char *argv[], char *envp[]) {
11   int i;
12   for (i = 0 ; i < argc; i++) {
13     printf("argv[%d] = [%s]\n", i, argv[i]);
14   }
15
16   if (envp) {
17     for (i = 0 ; envp[i] != 0; i++) {
18       printf("evp[%d] = [%s]\n", i, envp[i]);
19     }
20   }
21
22   printf("# argc %d argv %p\n", argc, (void *) argv);
23   printf("# nenv %d envp %p\n", i, (void *) envp);
24   return 0;
25 }