xref: /third_party/node/test/wasi/c/stdin.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/wasi/c/
11cb0ef41Sopenharmony_ci#include <stdio.h>
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ciint main(void) {
41cb0ef41Sopenharmony_ci  char x[32];
51cb0ef41Sopenharmony_ci
61cb0ef41Sopenharmony_ci  if (fgets(x, sizeof x, stdin) == NULL) {
71cb0ef41Sopenharmony_ci    return ferror(stdin);
81cb0ef41Sopenharmony_ci  }
91cb0ef41Sopenharmony_ci  if (fputs(x, stdout) == EOF) {
101cb0ef41Sopenharmony_ci    return ferror(stdout);
111cb0ef41Sopenharmony_ci  }
121cb0ef41Sopenharmony_ci  return 0;
131cb0ef41Sopenharmony_ci}
14

Indexes created Thu Nov 07 10:32:03 CST 2024