[Avl-cvs] avl/src avl.cpp,1.19,1.20
Brought to you by:
hetfield666,
jah2003
From: Patrizio B. <het...@us...> - 2004-09-17 12:44:30
|
Update of /cvsroot/avl/avl/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17326/src Modified Files: avl.cpp Log Message: aggiunto il controllo, aggiornato il todo Index: avl.cpp =================================================================== RCS file: /cvsroot/avl/avl/src/avl.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** avl.cpp 17 Sep 2004 10:41:17 -0000 1.19 --- avl.cpp 17 Sep 2004 12:44:16 -0000 1.20 *************** *** 194,197 **** --- 194,209 ---- // 2= test comparativo + if (base_tree<upperbound) { + + upperbound=base_tree-1; + gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton2),upperbound); + GtkWidget *dialog=gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, + GTK_BUTTONS_CLOSE,"The changement number you entered is bigger than the tree start dimension. Reduced to %d\n",upperbound); + gtk_dialog_run (GTK_DIALOG(dialog)); + gtk_widget_destroy (dialog); + + } + + if (choice==0) { prova = new Test(0,upperbound,base_tree); *************** *** 290,293 **** --- 302,311 ---- printf("Insert the number of changements you want to do on the tree\n"); scanf("%d",&upperbound); + + if (base_tree<upperbound) { + upperbound=base_tree-1; + printf("The changement number you entered is bigger than the tree start dimension. Reduced to %d\n",upperbound); + } + if (choice==0) { printf("Processing AVL, wait\n"); *************** *** 304,307 **** --- 322,326 ---- prova = new Test(2,upperbound,base_tree); } + // stampa colorata if (choice==0) aux_avl->print_best_look(); |