*----------------------------------------------------------------------------
* Creado: jue abr 8 18:07:57 ART 2004
* Autores: Nicolás Dimov <sagardua@uolsinectis.com.ar>
+ * Leandro Lucarella <llucare@fi.uba.ar>
*----------------------------------------------------------------------------
*
* $Id$
*/
#include "did.h"
+#include <string.h>
+#include <unistd.h>
+
+int emufs_did_crear(EMUFS* efs)
+{
+ return emufs_crear_archivo_auxiliar(efs->nombre, EMUFS_DID_EXT);
+}
int emufs_did_get_last(EMUFS *emu)
{
char name_f_did[255];
strcpy(name_f_did, emu->nombre);
- strcat(name_f_did, ".did");
+ 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);
char name_f_did[255];
strcpy(name_f_did, emu->nombre);
- strcat(name_f_did, ".did");
+ strcat(name_f_did, EMUFS_DID_EXT);
if ( (f_did = fopen(name_f_did,"a+")) == NULL) return -1;
fwrite(&ID, sizeof(int), 1, f_did);