a0c446e34e086543a283aa1942a8189d090745b0
[h316.git] / pc-tools / src-filters / turn.c
1 #include <stdio.h>
2 #include <termios.h>
3 #include <sys/types.h>
4 #include <sys/stat.h>
5 #include <fcntl.h>
6 #include <signal.h>
7 #include <stdlib.h>
8
9 #define BUFFER_SIZE 1000000
10
11 char * buffer;
12 int sp;
13
14 int main(int argc, char ** argv){
15 sp=0;
16 buffer=(char *) malloc(BUFFER_SIZE);
17 while (read(0, buffer+sp++,1)&& sp-BUFFER_SIZE);
18 fprintf(stderr,"Eingelesen: %i\n",--sp);
19 while(sp) write(1, buffer+--sp,1);
20
21 } //main();
22 // Ende.