437b3ba8 |
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> |
b30bf85c |
8 | #include <unistd.h> |
437b3ba8 |
9 | |
10 | #define BUFFER_SIZE 1000000 |
11 | |
12 | char * buffer; |
13 | int sp; |
14 | |
15 | int main(int argc, char ** argv){ |
16 | sp=0; |
17 | buffer=(char *) malloc(BUFFER_SIZE); |
18 | while (read(0, buffer+sp++,1)&& sp-BUFFER_SIZE); |
19 | fprintf(stderr,"Eingelesen: %i\n",--sp); |
20 | while(sp) write(1, buffer+--sp,1); |
21 | |
22 | } //main(); |
23 | // Ende. |