#include <stdio.h>
#include "mtf.h"
+#include <string.h>
+#include <stdlib.h>
+
+#define BUFFER_SIZE 2000000
int main(int argc, char *argv[] )
{
- char dato[20];
- char *z;
- int i, *pos;
- int len = 11;
- int size;
-
- strcpy( dato,"RDARCAAAABB");
+ int buff[BUFFER_SIZE];
+ int *pos;
+ int len;
+ int i;
+ len = fread(buff, 1, BUFFER_SIZE, stdin);
+ buff[len] = '\0';
+
+ pos = jacu_mtf(buff, len);
- /*printf("la posicion de R es: %d\n",get_pos(z, len, 'R'));*/
- pos = jacu_mtf(dato, len);
-
for(i=0; i<len; i++)
- printf("%d ", pos[i]);
- printf("\n");
-
- free(z);
+ putchar(pos[i]);
+
free(pos);
-
-return 0;
+
+ return 0;
}
+