X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/a9564429c158d89dfc16a0ba3f2df2993de1d12f..8f161fb90db32293100c689806720acde9844b00:/otros/mtf/main.c?ds=inline diff --git a/otros/mtf/main.c b/otros/mtf/main.c index 71d7404..3ef990e 100644 --- a/otros/mtf/main.c +++ b/otros/mtf/main.c @@ -1,25 +1,26 @@ #include #include "mtf.h" +#include +#include int main(int argc, char *argv[] ) { - char dato[20]; - char *z; - int i, *pos; - int len = 11; - int size; - - strcpy( dato,"RDARCAAAABB"); + int buff[BUFSIZ]; + int *pos; + int len; + int i; + + len = fread(buff, 1, BUFSIZ, 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