From: Nicolás Dimov Date: Sun, 11 Apr 2004 18:40:52 +0000 (+0000) Subject: definitivamente hacia lo mismo... la saque X-Git-Tag: svn_import_r684~523 X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/commitdiff_plain/67c6b07f6bd9d779f3314b5ce3de40ea4aa9dd51?ds=sidebyside definitivamente hacia lo mismo... la saque --- diff --git a/emufs/idx.c b/emufs/idx.c index a46c46b..f465d20 100644 --- a/emufs/idx.c +++ b/emufs/idx.c @@ -261,18 +261,3 @@ EMUFS_REG_ID emufs_idx_get_id_at(EMUFS *emu, long pos) return id.id_reg; } - -int emufs_idx_get_cant_reg(EMUFS* emu) -{ - FILE *fp; - char name_f_idx[255]; - long cant; - strcpy(name_f_idx,emu->nombre); - strcat(name_f_idx, EMUFS_IDX_EXT); - - if ( (fp = fopen(name_f_idx, "r")) == NULL ) return -1;/*EMUFS_NOT_FOUND*/; - fseek(fp, 0, SEEK_END); - cant = ftell(fp)/sizeof(EMUFS_IDX); - fclose(fp); - return cant; -} diff --git a/emufs/idx.h b/emufs/idx.h index 4dfeda2..605bf1b 100644 --- a/emufs/idx.h +++ b/emufs/idx.h @@ -67,7 +67,4 @@ EMUFS_REG_ID emufs_idx_get_id_at(EMUFS *, long pos); EMUFS_REG_ID emufs_idx_get_new_id(EMUFS*, int*); -/*me informa la cantidad de registros existentes en .dat*/ -int emufs_idx_get_cant_reg(EMUFS*); - #endif /* _EMUFS_IDX_H */ diff --git a/emufs/tipo3_main.c b/emufs/tipo3_main.c index 8aaf748..6123bcd 100644 --- a/emufs/tipo3_main.c +++ b/emufs/tipo3_main.c @@ -105,7 +105,7 @@ int main(int argc, char *argv[]) ver_archivo_FS(fp); - printf("la cantidad de registros eeeeesssss: %d\n", emufs_idx_get_cant_reg(fp)); + printf("la cantidad de registros eeeeesssss: %d\n", emufs_idx_get_count(fp)); printf("la cantidad de espacio libre es: %d\n", emufs_fsc_get_total_fs(fp)); emufs_destruir(fp);