From: Ricardo Markiewicz Date: Wed, 23 Jun 2004 04:15:15 +0000 (+0000) Subject: Bugfixes, saco algunos prints ... algunos md5 no me dan bien :-/ X-Git-Tag: svn_import~76 X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/commitdiff_plain/2ea01495176fc0d471d75a01354d3f630ee5328a?hp=d25b453b6d6096981cc559ece795812d035a7bf9 Bugfixes, saco algunos prints ... algunos md5 no me dan bien :-/ --- diff --git a/src/blocksorting/bs.c b/src/blocksorting/bs.c index 0aff024..5c9be2a 100644 --- a/src/blocksorting/bs.c +++ b/src/blocksorting/bs.c @@ -102,7 +102,6 @@ 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,11 +123,8 @@ 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); } diff --git a/src/jacu.c b/src/jacu.c index f08e731..ca93ae6 100644 --- a/src/jacu.c +++ b/src/jacu.c @@ -102,20 +102,22 @@ int main(int argc, char* argv[]) fp = fopen(argv[optind], "rb"); fp_out = fopen("tmp.comp", "wb"); - c = fgetc(fp); + /*c = fgetc(fp);*/ total = 0; while (!feof(fp)) { i = 0; while ((!feof(fp)) && (i < pagesize)) { - data[i++] = c; - c = fgetc(fp); + data[i++] = fgetc(fp); total++; } + /* Saco un EOF que lee de mas */ + if (i 0) { + printf("PageSize = %ld\n", block_size); fread(&z_len, sizeof(int), 1, fp_in); z = malloc(sizeof(char)*z_len); fread(z, z_len, sizeof(char), fp_in); - printf("MTF Z (len=%d) = [", z_len); + /*printf("MTF Z (len=%d) = [", z_len); { int ii; for(ii=0; ii