Große Umstellung. Viel hinzugefügt.
[h316.git] / pc-tools / src-filters / turn.c
diff --git a/pc-tools/src-filters/turn.c b/pc-tools/src-filters/turn.c
new file mode 100644 (file)
index 0000000..a0c446e
--- /dev/null
@@ -0,0 +1,22 @@
+#include <stdio.h>
+#include <termios.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <stdlib.h>
+
+#define BUFFER_SIZE 1000000
+
+char * buffer;
+int sp;
+
+int main(int argc, char ** argv){
+    sp=0;
+    buffer=(char *) malloc(BUFFER_SIZE);
+    while (read(0, buffer+sp++,1)&& sp-BUFFER_SIZE);
+    fprintf(stderr,"Eingelesen: %i\n",--sp);
+    while(sp) write(1, buffer+--sp,1);
+
+} //main();
+// Ende.