*** empty log message ***
[m17n/m17n-test.git] / fifotest2.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <unistd.h>
4 #include <errno.h>
5 #include <sys/types.h>
6 #include <sys/stat.h>
7
8 #define PIPE_IN "/tmp/mimdemo-in"
9 #define PIPE_OUT "/tmp/mimdemo-out"
10
11 int
12 main (int argc, char **argv)
13 {
14   FILE *out = fopen (PIPE_IN, "w");
15   FILE *in = fopen (PIPE_OUT, "r");
16   int c;
17
18   fprintf (out, "%s %s %s", argv[1], argv[2], argv[3]);
19   fclose (out);
20
21   while ((c = getc (in)) != EOF)
22     putchar (c);
23   fclose (in);
24   exit (0);
25 }