X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/47449fb00cf570119b7c0392bbf8805805966bed..d25b453b6d6096981cc559ece795812d035a7bf9:/src/blocksorting/bs.c diff --git a/src/blocksorting/bs.c b/src/blocksorting/bs.c index 59a0de9..0aff024 100644 --- a/src/blocksorting/bs.c +++ b/src/blocksorting/bs.c @@ -102,7 +102,7 @@ void bs_solve(char *in, char *out, t_BlockSort *bs, Uint32 *k, Uint32 leido) /* Guardo el k y el tamaƱo en el array */ memcpy(out, &leido, sizeof(Uint32)); memcpy(out+sizeof(Uint32), k, sizeof(Uint32)); - + printf("%ld -> %ld\n", *k, *(Uint32 *)(out+sizeof(Uint32))); bs->len = l; } @@ -124,8 +124,11 @@ void bs_restore(char *dst, char *c, Uint32 k, Uint32 len) i=0; do { dst[i++] = in[current].c; + printf("(%c)", dst[i-1]); current = in[current].pos; + printf("[%d]", current); } while (current != k); + printf("\n"); free(in); }