X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/ddc964cd151aae4713a5d2d658da986df7cd3441..439bc9dba0fb23fa34afeebb80e1288d9f8d39f4:/emufs_gui/tree_viewer.c diff --git a/emufs_gui/tree_viewer.c b/emufs_gui/tree_viewer.c index 3dc30d5..7f83b26 100644 --- a/emufs_gui/tree_viewer.c +++ b/emufs_gui/tree_viewer.c @@ -10,10 +10,12 @@ int emufs_indice_b_ver(INDICE *idx, WINDOW *win, int w, int h, int id) char *nodo; char tmp[100]; int i; + int posibles_proximos[1000]; int proximo; if (id == -1) return 0; + memset(posibles_proximos, -1, sizeof(int)*100); do { y = 0; mvwaddstr(win, y++, 0, "Nombre : "); @@ -42,6 +44,7 @@ int emufs_indice_b_ver(INDICE *idx, WINDOW *win, int w, int h, int id) wmove(win, y, 0); sprintf(tmp, "%d", header.hijo_izquierdo); waddstr(win, tmp); + fprintf(stderr, "CANT DE CLAVES = %d\n", header.cant); for(i=0; i=(header.cant+1)) proximo = id; /* Si no es un nodo valido, lo anulo*/ + } + + /* Solo voy a otro nodo si no soy el mismo */ + if (proximo != id) { + werase(win); + wrefresh(win); + emufs_indice_b_ver(idx, win, w, h, proximo); + } } while (proximo != -1); werase(win); wrefresh(win); + return 0; }