X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/e4e1c30961f8271ccf63a9762606c2ab1ebd234f..27a4c952dbd58578a9c55fca54bc3ef6df319154:/emufs_gui/registros.c diff --git a/emufs_gui/registros.c b/emufs_gui/registros.c index 3199736..aa9c867 100644 --- a/emufs_gui/registros.c +++ b/emufs_gui/registros.c @@ -334,10 +334,12 @@ char *procesar_registro_articulo_tipo1(EMUFS *emu, char *ptr, EMUFS_REG_SIZE *si } else { cant_header++; offset += curr_size; + fprintf(stderr, "Sume %lu\n", curr_size); } - } while (offset < (*size)); + } while (offset+sizeof(EMUFS_REG_SIZE)+sizeof(EMUFS_REG_ID) < (*size)); /* Proceso */ + fprintf(stderr, "Cantidad de headers = %d\n", cant_header); salida = (char *)malloc((*size)-sizeof(unsigned int)*cant_header*3 + 3*cant_header*10+1); tmp = ptr; tmp1 = salida; @@ -367,7 +369,9 @@ char *procesar_registro_articulo_tipo1(EMUFS *emu, char *ptr, EMUFS_REG_SIZE *si sprintf(tmp1, "[%08d]", *((unsigned int *)tmp)); tmp1 += 10; tmp += sizeof(unsigned int); - j = sizeof(unsigned int);; + j = sizeof(unsigned int); + PERR("Voy aca"); + fprintf(stderr, "son %lu\n", curr_size); while (j < curr_size) { if (*tmp == '\0') { if (ant == (*tmp)) @@ -382,6 +386,7 @@ char *procesar_registro_articulo_tipo1(EMUFS *emu, char *ptr, EMUFS_REG_SIZE *si tmp1++; j++; } + PERR("Y hasta todo bien"); i++; } /* Tengo que trabajar sobre lo que me falte (seguro es espacio libre) */