X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/0213eecd485623b3f5def829c4b16acaf4baad2e..990a2380d0acd43cfb5a867f77bdc460bab90769:/emufs/tipo3.c diff --git a/emufs/tipo3.c b/emufs/tipo3.c index bf93f81..4e0e0db 100644 --- a/emufs/tipo3.c +++ b/emufs/tipo3.c @@ -575,16 +575,21 @@ void emufs_tipo3_leer_bloque_raw(EMUFS *efs, EMUFS_BLOCK_ID id, char **actual, c (*size1) = (*size2) = (*size3) = efs->tam_bloque; } -int emufs_tipo3_insertar_ordenado(EMUFS *emu, void *ptr, CLAVE clave, int *err) +CLAVE obtener_clave(void *ptr, INDICE *indice) { - FILE *f; - char f_name[255]; - char *bloque; - - strcpy(f_name, emu->nombre); - strcat(f_name, ".dat"); - - + CLAVE clave; + switch ( indice->tipo_dato ){ + case IDX_FLOAT: + memcpy(&clave, ptr+indice->offset, sizeof(float)); + break; + case IDX_INT: + memcpy(&clave, ptr+indice->offset, sizeof(int)); + } + return clave; +} + +int emufs_tipo3_insertar_ordenado(EMUFS *emu, void *ptr, CLAVE clave, int offset, EMUFS_BLOCK_ID num_bloque, int *err) +{ return 0; }