X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/8a6f628c163936c6f0852c398694f2d5fc946c37..2ef63227431ca5dc261ef1b3186d0a30d5742f25:/tipo3/emufs.c diff --git a/tipo3/emufs.c b/tipo3/emufs.c index b559489..9883f70 100644 --- a/tipo3/emufs.c +++ b/tipo3/emufs.c @@ -6,6 +6,8 @@ #define EXT_TIPO3_ID ".id3" #define EXT_TIPO3_DATA ".dat" #define EXT_TIPO3_DISP ".fsc" +#define EXT_TIPO3_IDS ".idc" +#define EXT_TIPO3_EXTRA ".ids" char *str_dup(const char *s) { @@ -50,6 +52,26 @@ EMUFS *emufs_crear(const char *filename, char tipo, unsigned int tam_bloque, uns fwrite(&tam_bloque, sizeof(unsigned int), 1, fp); fwrite(&tam_reg, sizeof(unsigned int), 1, fp); fclose(fp); + + strcpy(name, filename); + strcat(name, EXT_TIPO3_ID); + fp = fopen(name, "w"); + fclose(fp); + + strcpy(name, filename); + strcat(name, EXT_TIPO3_DISP); + fp = fopen(name, "w"); + fclose(fp); + + strcpy(name, filename); + strcat(name, EXT_TIPO3_IDS); + fp = fopen(name, "w"); + fclose(fp); + + strcpy(name, filename); + strcat(name, EXT_TIPO3_EXTRA); + fp = fopen(name, "w"); + fclose(fp); break; default: free(tmp);