X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/30325d1797a0a3ecaf622c261d07366801040c88..064dc9896dce3d936a5876b927cece0f44808912:/tipo3/emufs.h diff --git a/tipo3/emufs.h b/tipo3/emufs.h index ed4d1b8..cf16da9 100644 --- a/tipo3/emufs.h +++ b/tipo3/emufs.h @@ -3,19 +3,21 @@ #include #include +#include "malloc_debug.h" typedef enum {T1, T2, T3} EMUFS_TYPE; typedef struct _emu_fs_t { - EMUFS_TYPE tipo; /* Corregir nombres */ - unsigned long tam_bloque; /* 0 si no tiene bloques */ - int (*leer_bloque)(struct _emu_fs_t *, int, void *); - int (*leer_registro)(struct _emu_fs_t *, int, void *, unsigned long); - int (*grabar_registro)(int , void *, unsigned long ); - char *nombre; + EMUFS_TYPE tipo; /* Corregir nombres */ + unsigned long tam_bloque; /* 0 si no tiene bloques */ + int (*leer_bloque)(struct _emu_fs_t *, int, void *); + int (*leer_registro)(struct _emu_fs_t *, int, void *, unsigned long); + int (*grabar_registro)(struct _emu_fs_t *, void *, unsigned long ); + int (*borrar_registro)(struct _emu_fs_t *, int); + char *nombre; } EMUFS; -EMUFS *emufs_crear(const char *filename, int tipo); - +EMUFS *emufs_crear(const char *filename, char tipo, unsigned int tam_bloque, unsigned int tam_reg); +int emufs_destruir(EMUFS *e); #endif