+ tmp->tipo = T3;
+ tmp->tam_bloque = tam_bloque;
+ tmp->leer_bloque = leer_bloque;
+ tmp->leer_registro = leer_registro;
+ tmp->grabar_registro = grabar_registro;
+ tmp->borrar_registro = NULL;
+ tmp->nombre = str_dup(filename);
+
+ strcpy(name, filename);
+ strcat(name, EXT_TIPO3_DATA);
+ fp = fopen(name, "w");
+ if (fp == NULL) {
+ /* ERROR */
+ free(tmp->nombre);
+ free(tmp);
+ return NULL;
+ }
+ /* Guardo el Header */
+ fwrite(&tipo, sizeof(char), 1, fp);
+ 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);