Chromium Code Reviews| Index: native_client_sdk/src/examples/dlopen/eightball.cc |
| =================================================================== |
| --- native_client_sdk/src/examples/dlopen/eightball.cc (revision 0) |
| +++ native_client_sdk/src/examples/dlopen/eightball.cc (revision 0) |
| @@ -0,0 +1,20 @@ |
| +#include <stdlib.h> |
| +#include <stdio.h> |
| + |
| +#include "eightball.h" |
| + |
| +const char *Magic8Ball(void) { |
|
Brad Chen
2012/01/31 22:29:54
I'm so happy you dropped the __attribute__ stuff.
noelallen1
2012/02/01 17:46:10
Windows bots are passing, but we don't have all OS
|
| + const int NSIDES = 8; |
| + const char* answer[NSIDES] = { |
| + "YES", |
| + "NO", |
| + "MAYBE", |
| + "MAYBE NOT", |
| + "DEFINITELY", |
| + "ASK ME TOMORROW", |
| + "PARTLY CLOUDY", |
| + "42", |
| + }; |
| + return answer[rand() % NSIDES]; |
| +} |
| + |
| Property changes on: native_client_sdk/src/examples/dlopen/eightball.cc |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |