X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/6c5fe1e15e441c27ba01b22b91bf1e5843ae53f2..b172089853a56455742c11dfaf940544f57fef70:/emufs/did.c diff --git a/emufs/did.c b/emufs/did.c index f193025..8492aa7 100644 --- a/emufs/did.c +++ b/emufs/did.c @@ -20,6 +20,7 @@ *---------------------------------------------------------------------------- * Creado: jue abr 8 18:07:57 ART 2004 * Autores: Nicolás Dimov + * Leandro Lucarella *---------------------------------------------------------------------------- * * $Id$ @@ -39,16 +40,19 @@ #include #include -#define EMUFS_DID_EXT ".did" +int emufs_did_crear(EMUFS* efs) +{ + return emufs_crear_archivo_auxiliar(efs->nombre, EMUFS_DID_EXT); +} -int emufs_did_get_last(EMUFS *emu) +EMUFS_REG_ID emufs_did_get_last(EMUFS *emu) { FILE * f_did; int id, offset; char name_f_did[255]; strcpy(name_f_did, emu->nombre); - strcat(name_f_did, EMUFS_DID_EXT); + strcat(name_f_did, EMUFS_DID_EXT); if ( (f_did = fopen(name_f_did,"r")) == NULL) return -1; /*ERROR*/ fseek(f_did, 0, SEEK_END); @@ -74,7 +78,7 @@ int emufs_did_get_last(EMUFS *emu) } /*agrego un elemento al archivo */ -int emufs_did_agregar(EMUFS *emu, int ID) +int emufs_did_agregar(EMUFS *emu, EMUFS_REG_ID ID) { FILE *f_did; char name_f_did[255];