2 #include "tree_viewer.h"
4 int emufs_indice_b_ver(INDICE *idx, WINDOW *win, int w, int h, int id)
15 if (id == -1) return 0;
19 mvwaddstr(win, y++, 0, "Nombre : ");
20 waddstr(win, idx->nombre);
23 nodo = b_leer_nodo(idx, id);
24 b_leer_header(nodo, &header);
25 claves = b_leer_claves(nodo, &header);
27 mvwaddstr(win, y++, 0, "Nodo Nro ");
28 sprintf(tmp, "%d", id);
30 mvwaddstr(win, y++, 0, "Nivel = ");
31 sprintf(tmp, "%d", header.nivel);
33 mvwaddstr(win, y++, 0, "Cantidad de hijo = ");
34 sprintf(tmp, "%d", header.cant);
36 mvwaddstr(win, y++, 0, "Padre = ");
37 sprintf(tmp, "%d", header.padre);
40 /* Muestro las claves */
41 mvwaddstr(win, y++, 0, "Claves");
43 sprintf(tmp, "%d", header.hijo_izquierdo);
45 for(i=0; i<header.cant; i++) {
46 sprintf(tmp, "(%d)%d",
47 claves[i].clave.i_clave,
49 claves[i].dato.bloque,*/
50 claves[i].hijo_derecho
57 form = form_crear(win);
58 form_agregar_widget(form, INPUT, "Ver (-1 para volver)", 4, "");
59 form_ejecutar(form, 0, h-2);
60 proximo = form_obtener_valor_int(form, "Ver (-1 para volver)");
63 emufs_indice_b_ver(idx, win, w, h, proximo);
64 } while (proximo != -1);