Chromium Code Reviews| Index: native_client_sdk/src/examples/getting_started/simple_hello_world/hello_world.c |
| diff --git a/native_client_sdk/src/examples/getting_started/simple_hello_world/hello_world.c b/native_client_sdk/src/examples/getting_started/simple_hello_world/hello_world.c |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..37aa95a8d287d90d4739f1ceed420b09283d3b5b |
| --- /dev/null |
| +++ b/native_client_sdk/src/examples/getting_started/simple_hello_world/hello_world.c |
| @@ -0,0 +1,22 @@ |
| +/* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +#include <stdio.h> |
| +#include <string.h> |
| + |
| +#include "ppapi_simple/ps_main.h" |
| + |
| +int example_main(int argc, const char* argv[]) { |
| + /* Use ppb_messaging to send "Hello World" to JavaScript. */ |
| + printf("Hello World STDOUT.\n"); |
| + |
| + /* Use ppb_console send "Hello World" to the JavaScript Console. */ |
| + fprintf(stderr, "Hello World STDERR.\n"); |
| + return 0; |
| +} |
| + |
| +// Register the function to call once the Instance Object is initialized. |
|
nfullagar1
2013/05/30 21:07:31
mix of // & /* */ in this file
noelallen1
2013/05/30 21:58:03
Done.
|
| +// see: pappi_simple/ps_main.h |
| +PPAPI_SIMPLE_REGISTER_MAIN(example_main) |