X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/87f4567d04c1fbe0b7d01ead5605417960c27cde..6506ff0f4b593a8958ac45c3240df9030530e160:/src/blocksorting/main.c diff --git a/src/blocksorting/main.c b/src/blocksorting/main.c index c3ae302..56e849b 100644 --- a/src/blocksorting/main.c +++ b/src/blocksorting/main.c @@ -1,6 +1,21 @@ #include "bs.h" +void print_v(char *txt, char *data, Uint32 len) +{ + Uint32 i; + + printf("%s", txt); + + for(i=0; i %ld\n", salida, k); - bs_restore(orig, salida, k, i); - printf("Orig : %s\n", orig); + bs_restore(orig, salida+sizeof(Uint32), k, i); + print_v("Leido : ", data, i); + print_v("BS : ", salida+sizeof(Uint32), i); + /*print_v("Restorado : ", orig, i);*/ } else - fwrite(salida, 1, i, fp); + fwrite(salida, 1, i, stdout); } fclose(fp); bs_destroy(bs);