X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/50b99b153d4e8d299e999eca83678ae23b2accbc..0189fdaa9744c0aeddcf72ca0f3f7fa3981e53a2:/otros/mtf/main.c?ds=inline diff --git a/otros/mtf/main.c b/otros/mtf/main.c index f864de3..9b7b459 100644 --- a/otros/mtf/main.c +++ b/otros/mtf/main.c @@ -3,25 +3,24 @@ #include #include +#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