Fix an index bug in ND_Tree_Node_Recursive_Add() and ND_List_Sort(),

Fix GPL Header.
This commit is contained in:
agibert 2004-06-17 22:28:04 +00:00
parent 79b8e412a2
commit fa40487565

View File

@ -1,9 +1,9 @@
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* $RCSfile: libnode.c,v $ */ /* $RCSfile: libnode.c,v $ */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* $Revision: 2.8 $ */ /* $Revision: 2.9 $ */
/* $Name: $ */ /* $Name: $ */
/* $Date: 2003/01/17 08:06:57 $ */ /* $Date: 2004/06/17 22:28:04 $ */
/* $Author: agibert $ */ /* $Author: agibert $ */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
@ -21,7 +21,7 @@
/* GNU Lesser General Public License for more details. */ /* GNU Lesser General Public License for more details. */
/* */ /* */
/* You should have received a copy of the GNU Lesser General Public License */ /* You should have received a copy of the GNU Lesser General Public License */
/* along with Foobar; if not, write to the Free Software */ /* along with LibNode; if not, write to the Free Software */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
@ -34,7 +34,7 @@
#include <libnode.h> #include <libnode.h>
#ifdef _LIBVER_SUPPORT #ifdef _LIBVER_SUPPORT
VER_INFO_EXPORT (libnode,"$Revision: 2.8 $", "$Name: $",__FILE__,"$Author: agibert $") VER_INFO_EXPORT (libnode,"$Revision: 2.9 $", "$Name: $",__FILE__,"$Author: agibert $")
#endif #endif
@ -63,7 +63,7 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
Command_Name = "NDD_CMD_MANAGER_VERSION"; Command_Name = "NDD_CMD_MANAGER_VERSION";
*Version_Name_Ptr = "$Revision: 2.8 $ $Name: $ $Date: 2003/01/17 08:06:57 $ $Author: agibert $"; *Version_Name_Ptr = "$Revision: 2.9 $ $Name: $ $Date: 2004/06/17 22:28:04 $ $Author: agibert $";
return( NDS_OK); return( NDS_OK);
} }
@ -4236,7 +4236,7 @@ void ND_Tree_Node_Recursive_Add( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, N
if( Max_Depth + Depth - 1 > Root_Ptr->Index_Tab[Index_Id].Max_Depth) Root_Ptr->Index_Tab[Index_Id].Max_Depth = Max_Depth + Depth - 1; if( Max_Depth + Depth - 1 > Root_Ptr->Index_Tab[Index_Id].Max_Depth) Root_Ptr->Index_Tab[Index_Id].Max_Depth = Max_Depth + Depth - 1;
if (Min_Depth + Depth - 1 < Root_Ptr->Index_Tab[0].Min_Depth) Root_Ptr->Index_Tab[0].Min_Depth = Min_Depth + Depth - 1 ; if (Min_Depth + Depth - 1 < Root_Ptr->Index_Tab[Index_Id].Min_Depth) Root_Ptr->Index_Tab[Index_Id].Min_Depth = Min_Depth + Depth - 1;
} }
} }
@ -4407,7 +4407,7 @@ NDT_Status ND_List_Sort( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id)
/* On met à jour les liens entre les noeuds */ /* On met à jour les liens entre les noeuds */
for (i = 0; i < Root_Ptr->Index_Tab[0].Node_Number; i++) for (i = 0; i < Root_Ptr->Index_Tab[Index_Id].Node_Number; i++)
{ {
node_ptr = (NDT_Node *)tab[i]; node_ptr = (NDT_Node *)tab[i];