X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/8c97736956c57a9bfa4537fa172c503ac2daff1b..d3112f9c7895a9f419c365eabe7db963e148454a:/tipo3/emufs.h diff --git a/tipo3/emufs.h b/tipo3/emufs.h index 4314f6d..2cbc027 100644 --- a/tipo3/emufs.h +++ b/tipo3/emufs.h @@ -7,16 +7,17 @@ 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 ); + 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; + 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); +EMUFS *emufs_abrir(const char *filename); +int emufs_destruir(EMUFS *e); #endif