Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: native_client_sdk/src/examples/hello_world_stdio/hello_world.c

Issue 13488007: [NaCl SDK] Make the SDK examples buildable as a packaged app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix license headers Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/examples/hello_world_stdio/hello_world.c
diff --git a/native_client_sdk/src/examples/hello_world_stdio/hello_world.c b/native_client_sdk/src/examples/hello_world_stdio/hello_world.c
index be1c3978ffcae5c89fbc5affba7beb281af94ee6..e553da55658d5a83659058193e65ddf9b8536850 100644
--- a/native_client_sdk/src/examples/hello_world_stdio/hello_world.c
+++ b/native_client_sdk/src/examples/hello_world_stdio/hello_world.c
@@ -13,12 +13,13 @@
#include "ppapi_main/ppapi_main.h"
-// Have the Module object provided by ppapi_main create a basic
-// PPAPI instance with default arguments which mounts the dev
-// file system providing /dev/null, /dev/tty, and /devl/console3
-// for null STDIN, STDOUT directed to PostMessage and STDERR
-// directed to the JavaScript Console with LogLevel 'ERROR'
-PPAPI_MAIN_WITH_DEFAULT_ARGS
+// The default arguments to PPAPI_MAIN maps:
+// STDIN -> /dev/stdin
+// STDOUT -> /dev/stdout
+// STDERR -> /dev/console3
+// We use our own args here so that stdout sends messages to JavaScript via
+// PostMessage (/dev/tty).
+PPAPI_MAIN_WITH_ARGS("pm_stdout", "/dev/tty", NULL, NULL)
//
// The "main" entry point called by PPAPIInstance once initialization

Powered by Google App Engine
This is Rietveld 408576698