1 : /*
2 : * Copyright (c) 2013 The Native Client Authors. All rights reserved.
3 : * Use of this source code is governed by a BSD-style license that can be
4 : * found in the LICENSE file.
5 : */
6 : #include <stdio.h>
7 : #include <string.h>
8 :
9 : #include "native_client/src/shared/gio/gio.h"
10 :
11 1 : int main(void) {
12 : char buf[8 * 1024];
13 : size_t ix;
14 : struct GioFile gf;
15 :
16 1 : for (ix = 0; ix < sizeof buf - 1; ++ix) {
17 1 : buf[ix] = "0123456789abcdef"[ix & 0xf];
18 1 : }
19 1 : buf[sizeof buf - 1] = '\0';
20 1 : if (!GioFileRefCtor(&gf, stdout)) {
21 0 : fprintf(stderr, "GioFileRefCtor failed\n");
22 0 : return 1;
23 : }
24 1 : gprintf((struct Gio *) &gf, "data: %s\n", buf);
25 1 : return 0;
26 1 : }
|