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

Unified Diff: native_client_sdk/src/examples/getting_started/simple_hello_world/hello_world.c

Issue 15011003: ppapi_simple (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits, rename Created 7 years, 7 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/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..dba9b27f315f2c7086eb6bed34688acc995a7041
--- /dev/null
+++ b/native_client_sdk/src/examples/getting_started/simple_hello_world/hello_world.c
@@ -0,0 +1,28 @@
+/* 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/c/ppb_var.h"
+#include "ppapi/c/ppb_messaging.h"
+#include "ppapi/c/ppb_console.h"
+
+#include "ppapi_simple/ppapi_simple_main.h"
+
+=
nfullagar1 2013/05/30 00:47:04 there's a stray '=' on line above
noelallen1 2013/05/30 03:10:05 Done.
+int example_main(int argc, const char* argv[]) {
+ // Use PostMessage to send "Hello World" to JavaScript.
+ printf("Hello World STDOUT.\n");
+
+ // Use PPAPI Console interface to send "Hello World" to the
+ // JavaScript Console.
+ fprintf(stderr, "Hello World STDERR.\n");
+ return 0;
+}
+
+// Regsiter the function to call once the Instance Object is initialized.
+// see: pappi_simple/ppapi_simple_main.h
+PPAPI_SIMPLE_REGISTER_MAIN(example_main)

Powered by Google App Engine
This is Rietveld 408576698