summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--native_client_sdk/src/examples/hello_world/hello_world.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/native_client_sdk/src/examples/hello_world/hello_world.c b/native_client_sdk/src/examples/hello_world/hello_world.c
index 79ecc75..80dbe21 100644
--- a/native_client_sdk/src/examples/hello_world/hello_world.c
+++ b/native_client_sdk/src/examples/hello_world/hello_world.c
@@ -22,6 +22,20 @@
#include "ppapi/c/ppp_instance.h"
#include "ppapi/c/ppp_messaging.h"
+enum {
+ newlib = 0,
+ glibc = 1,
+ pnacl = 2,
+ host = 3,
+ TCMAX
+};
+
+static const char *s_TCNames[TCMAX] = {
+ "Hello World (newlib)!",
+ "Hello World (glibc)!",
+ "Hello World (pnacl)!",
+ "Hello World (host plugin)!",
+};
static PPB_Messaging* ppb_messaging_interface = NULL;
static PPB_Var* ppb_var_interface = NULL;
@@ -69,7 +83,7 @@ static PP_Bool Instance_DidCreate(PP_Instance instance,
const char* argn[],
const char* argv[]) {
ppb_messaging_interface->PostMessage(instance,
- CStrToVar("Hello World: " TCNAME));
+ CStrToVar(s_TCNames[TCNAME]));
return PP_TRUE;
}