diff options
Diffstat (limited to 'third_party/rust/lucet-wasi-wasmsbx/examples/pseudoquine.c')
-rw-r--r-- | third_party/rust/lucet-wasi-wasmsbx/examples/pseudoquine.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/third_party/rust/lucet-wasi-wasmsbx/examples/pseudoquine.c b/third_party/rust/lucet-wasi-wasmsbx/examples/pseudoquine.c new file mode 100644 index 0000000000..9111caf25d --- /dev/null +++ b/third_party/rust/lucet-wasi-wasmsbx/examples/pseudoquine.c @@ -0,0 +1,18 @@ +#include <stdio.h> +#include <stdlib.h> + +int main() +{ + FILE *self = fopen("/examples/pseudoquine.c", "r"); + if (self == NULL) { + return 1; + } + + char c = fgetc(self); + while (c != EOF) { + if (fputc(c, stdout) == EOF) { + return 1; + } + c = fgetc(self); + } +} |