X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/9da17243492426daba1cf11c353f4216e7e34ca1..b54ff8cf3f228245ecfa0a27fb9b339d1068cacf:/emufs/emufs.c diff --git a/emufs/emufs.c b/emufs/emufs.c index 69a2519..96460cd 100644 --- a/emufs/emufs.c +++ b/emufs/emufs.c @@ -392,12 +392,15 @@ int emufs_agregar_indice(EMUFS *emu, char *nombre, INDICE_FUNCION funcion, INDIC return 1; } -INDICE_DATO *emufs_buscar_registros(EMUFS *emu, char *indice, CLAVE clave, int *cant) +INDICE_DATO *emufs_buscar_registros(EMUFS *emu, char *indice, char *data, int *cant) { + CLAVE k; INDICE *tmp; + tmp = emu->indices; while (tmp) { if (strcmp(tmp->nombre, indice) == 0) break; + tmp = tmp->sig; } if (tmp == NULL) { @@ -406,6 +409,10 @@ INDICE_DATO *emufs_buscar_registros(EMUFS *emu, char *indice, CLAVE clave, int * return NULL; } - return tmp->buscar_entradas(tmp, clave, cant); + PERR("GENERANDO CLAVE") + PERR(data); + k = emufs_indice_generar_clave_desde_valor(tmp, data); + PERR("DONE"); + return tmp->buscar_entradas(tmp, k, cant); }