]> mj.ucw.cz Git - eval.git/blob - judge/test-io.c
mop: mo-score has gained a --table option for nice textual tables
[eval.git] / judge / test-io.c
1 #include <stdio.h>
2
3 #include "judge.h"
4
5 int main(void)
6 {
7 #if 0
8   struct stream *i = sopen_read("/etc/profile");
9   struct stream *o = sopen_write("/dev/stdout");
10 #else
11   struct stream *i = sopen_fd("stdin", 0);
12   struct stream *o = sopen_fd("stdout", 1);
13 #endif
14
15   int c;
16   while ((c = sgetc(i)) >= 0)
17     sputc(o, c);
18
19   sclose(i);
20   sclose(o);
21   return 0;
22 }