7 Commits

Author SHA1 Message Date
agibert
76e61fb382 Add libnode home page URL and arnaud email address. 2002-08-02 12:34:32 +00:00
agibert
ebfe0b2aec Replace TIMAT_DataStruct by NDT_DataStruct . 2002-08-02 12:30:06 +00:00
agibert
6c7c5cd686 Fix demo0.dsp path. 2002-07-31 13:20:10 +00:00
agibert
490684cdb6 Add 2.0.4-1 entry:
Minor corrections in order to pass valgrind test.
2002-07-29 15:04:09 +00:00
agibert
2b81ff3566 Minor fixes... 2002-07-29 15:02:03 +00:00
agibert
5f92190c59 Add fclose() call at the end of batch_run.
ndbench pass valgrind test!
2002-07-29 14:55:57 +00:00
agibert
2260f97db2 Add and use ND_Index_Clear() private function.
libnode pass valgrind test!
2002-07-29 14:53:50 +00:00
7 changed files with 100 additions and 35 deletions

View File

@@ -1,7 +1,7 @@
# $RCSfile: ReadMe.txt,v $ # $RCSfile: ReadMe.txt,v $
# $Revision: 2.3 $ # $Revision: 2.5 $
# $Name: $ # $Name: $
# $Date: 2002/03/01 09:43:21 $ # $Date: 2002/08/02 12:34:32 $
# $Author: agibert $ # $Author: agibert $
@@ -12,7 +12,7 @@ Welcome to LibNode 2.0.x !
This release of LibNode support the following OS: This release of LibNode supports the following OS:
- Linux 2.2.X and 2.4.x (tested on RedHat & Mandrake), - Linux 2.2.X and 2.4.x (tested on RedHat & Mandrake),
- Solaris 2.6, - Solaris 2.6,
- Windows NT4 & 2000. - Windows NT4 & 2000.
@@ -24,12 +24,12 @@ LibShm and LibDataStr are no more supported.
Warning: Associated documentation is outdated... Warning: Associated documentation (including the comments !) is outdated...
Please read demo and ndbench code. Please read demo and ndbench code.
Libnode is licensed under the GPL/LGPL GNU License. Libnode is licensed under the LGPL/GPL GNU Licenses.
For more information, please read the corresponding source file headers. For more information, please read the corresponding source file headers.
The license details can be found in the GNU-GPL.txt, GNU-LGPL.txt and GNU-FDL.txt files. The license details can be found in the GNU-GPL.txt, GNU-LGPL.txt and GNU-FDL.txt files.
@@ -38,3 +38,6 @@ The license details can be found in the GNU-GPL.txt, GNU-LGPL.txt and GNU-FDL.tx
Enjoy it! Enjoy it!
Your LibNode Team. Your LibNode Team.
arnaud@rx3.net
http://www.rx3.org/dvp/libnode

View File

@@ -1,13 +1,23 @@
# $RCSfile: ReleaseNotes.txt,v $ # $RCSfile: ReleaseNotes.txt,v $
# $Revision: 2.9 $ # $Revision: 2.10 $
# $Name: $ # $Name: $
# $Date: 2002/04/09 17:41:44 $ # $Date: 2002/07/29 15:04:09 $
# $Author: agibert $ # $Author: agibert $
--------------------------------------------------------------------------------
LibNode V 2.0.4-1 - A. Gibert - 29/07/02
--------------------------------------------------------------------------------
All: This release of libnode pass with sucess valgrind test on linux.
LibNode: Add and use ND_Index_Clear() private API,
NbBench: Add fclose() call at the end of batch_run.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
LibNode V 2.0.3-1 - A. Gibert - 09/04/02 LibNode V 2.0.3-1 - A. Gibert - 09/04/02
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
# $RCSfile: ToDo.txt,v $ # $RCSfile: ToDo.txt,v $
# $Revision: 2.1 $ # $Revision: 2.2 $
# $Name: $ # $Name: $
# $Date: 2001/11/26 11:25:11 $ # $Date: 2002/08/02 12:30:06 $
# $Author: agibert $ # $Author: agibert $
@@ -11,4 +11,4 @@
- More debug ! - More debug !
- New English documentation (man/tex), - New English documentation (man/tex),
- Improve API consitency, - Improve API consitency,
- Re-enable LibShm/LibDataStr support (via TIMAT_DataStruct implementation). - Re-enable LibShm/LibDataStr support (via NDT_DataStruct implementation).

View File

@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
############################################################################### ###############################################################################
Project: "demo0"=.\demo0\demo0.dsp - Package Owner=<4> Project: "demo0"=.\demo0.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{

View File

@@ -1,9 +1,9 @@
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* $RCSfile: libnode.c,v $ */ /* $RCSfile: libnode.c,v $ */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* $Revision: 2.6 $ */ /* $Revision: 2.7 $ */
/* $Name: $ */ /* $Name: $ */
/* $Date: 2002/04/09 17:08:17 $ */ /* $Date: 2002/07/29 14:53:50 $ */
/* $Author: agibert $ */ /* $Author: agibert $ */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
@@ -34,7 +34,7 @@
#include <libnode.h> #include <libnode.h>
#ifdef _LIBVER #ifdef _LIBVER
VER_INFO_EXPORT (libnode,"$Revision: 2.6 $", "$Name: $",__FILE__,"$Author: agibert $") VER_INFO_EXPORT (libnode,"$Revision: 2.7 $", "$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.6 $ $Name: $ $Date: 2002/04/09 17:08:17 $ $Author: agibert $"; *Version_Name_Ptr = "$Revision: 2.7 $ $Name: $ $Date: 2002/07/29 14:53:50 $ $Author: agibert $";
return( NDS_OK); return( NDS_OK);
} }
@@ -491,19 +491,15 @@ NDT_Status ND_Index_Open_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_In
return(NDS_ERRAPI); return(NDS_ERRAPI);
} }
if( ( status = ND_Index_Clear( Root_Ptr, Index_Id)) != NDS_OK)
{
sprintf( ND_Error_Msg, "Error ND_Index_Open_I: Index cleaning error");
ND_Error_Print();
return( NDS_KO);
}
Root_Ptr->Index_Tab[Index_Id].Type = Type & NDD_INDEX_STATUS_RMSK | NDD_INDEX_STATUS_OPENED ; Root_Ptr->Index_Tab[Index_Id].Type = Type & NDD_INDEX_STATUS_RMSK | NDD_INDEX_STATUS_OPENED ;
Root_Ptr->Index_Tab[Index_Id].Head = NULL;
Root_Ptr->Index_Tab[Index_Id].Tail = NULL;
Root_Ptr->Index_Tab[Index_Id].Save = NULL;
Root_Ptr->Index_Tab[Index_Id].Max_Dif = DEF_MAX_DIF;
Root_Ptr->Index_Tab[Index_Id].Node_Number = 0;
Root_Ptr->Index_Tab[Index_Id].Max_Depth = 0;
Root_Ptr->Index_Tab[Index_Id].Min_Depth = NDD_HUGE_LONG;
Root_Ptr->Index_Tab[Index_Id].Nb_Equ = 0;
Root_Ptr->Index_Open_Count++; Root_Ptr->Index_Open_Count++;
if( Index_Id != NDD_INDEX_PRIMARY) if( Index_Id != NDD_INDEX_PRIMARY)
@@ -533,7 +529,7 @@ NDT_Status ND_Index_Open_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_In
} }
} }
return(NDS_OK); return( NDS_OK);
} }
@@ -3426,6 +3422,39 @@ NDT_Status ND_Node_Free ( NDT_Root *Root_Ptr, NDT_Node *Node_Ptr)
/*------------------------------------------------------------------------------*/
/* Création d'une nouvelle structure de données */
/*------------------------------------------------------------------------------*/
/* (O) Root: adresse d'un pointeur sur la racine de la nouvelle structure */
/* (I) Type: type de la structure.de données (liste ou arbre binaire) */
/* (I) Allocator: pointeur vers la fonction d'allocation */
/* (I) Desallocator: pointeur vers la fonction de désallocation */
/* (I) Data : pointeur de données utiles à l'allocateur */
/* (I) Own_Value : indique si la structure est propriétaire de ses valeurs */
/*------------------------------------------------------------------------------*/
NDT_Status ND_Index_Clear( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id)
{
Root_Ptr->Index_Tab[Index_Id].Type = NDD_INDEX_STATUS_UNKNOWN;
Root_Ptr->Index_Tab[Index_Id].Head = NULL;
Root_Ptr->Index_Tab[Index_Id].Tail = NULL;
Root_Ptr->Index_Tab[Index_Id].Save = NULL;
Root_Ptr->Index_Tab[Index_Id].Max_Dif = DEF_MAX_DIF;
Root_Ptr->Index_Tab[Index_Id].Node_Number = 0;
Root_Ptr->Index_Tab[Index_Id].Max_Depth = 0;
Root_Ptr->Index_Tab[Index_Id].Min_Depth = NDD_HUGE_LONG;
Root_Ptr->Index_Tab[Index_Id].Nb_Equ = 0;
return( NDS_OK);
}
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Allocation d'une racine de structure de données */ /* Allocation d'une racine de structure de données */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
@@ -3465,13 +3494,22 @@ NDT_Status ND_Node_Root_Alloc( NDT_Root **Root_Ptr_Ptr, NDT_Index_Nb Index_Nb,
for( index_id = 0; index_id < Index_Nb; index_id++) for( index_id = 0; index_id < Index_Nb; index_id++)
{ {
(*Root_Ptr_Ptr)->Index_Tab[index_id].Type = NDD_INDEX_STATUS_CLOSED;
if( ( Type_Ptr[index_id] & NDD_INDEX_STATUS_MSK) == NDD_INDEX_STATUS_OPENED) if( ( Type_Ptr[index_id] & NDD_INDEX_STATUS_MSK) == NDD_INDEX_STATUS_OPENED)
{ {
status = ND_Index_Open_I( *Root_Ptr_Ptr, index_id, Type_Ptr[index_id]); status = ND_Index_Open_I( *Root_Ptr_Ptr, index_id, Type_Ptr[index_id]);
if( ND_ERROR( status)) return( status); if( ND_ERROR( status)) return( status);
} }
else
{
if( ( status = ND_Index_Clear( *Root_Ptr_Ptr, index_id)) != NDS_OK)
{
sprintf( ND_Error_Msg, "Error ND_Index_Open_I: Index cleaning error");
ND_Error_Print();
return( NDS_KO);
}
(*Root_Ptr_Ptr)->Index_Tab[index_id].Type = NDD_INDEX_STATUS_CLOSED;
}
} }
return(NDS_OK); return(NDS_OK);

View File

@@ -1,9 +1,9 @@
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* $RCSfile: libnode.h,v $ */ /* $RCSfile: libnode.h,v $ */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* $Revision: 2.3 $ */ /* $Revision: 2.4 $ */
/* $Name: $ */ /* $Name: $ */
/* $Date: 2002/02/28 21:53:47 $ */ /* $Date: 2002/07/29 14:53:51 $ */
/* $Author: agibert $ */ /* $Author: agibert $ */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
@@ -116,6 +116,18 @@ NDT_Status ND_Node_Alloc (NDT_Root * Root, NDT_Node ** New_Node);
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
NDT_Status ND_Node_Free (NDT_Root * Root, NDT_Node * Node); NDT_Status ND_Node_Free (NDT_Root * Root, NDT_Node * Node);
/*------------------------------------------------------------------------------*/
/* Création d'une nouvelle structure de données */
/*------------------------------------------------------------------------------*/
/* (O) Root: adresse d'un pointeur sur la racine de la nouvelle structure */
/* (I) Type: type de la structure.de données (liste ou arbre binaire) */
/* (I) Allocator: pointeur vers la fonction d'allocation */
/* (I) Desallocator: pointeur vers la fonction de désallocation */
/* (I) Data : pointeur de données utiles à l'allocateur */
/* (I) Own_Value : indique si la structure est propriétaire de ses valeurs */
/*------------------------------------------------------------------------------*/
NDT_Status ND_Index_Clear( NDT_Root *, NDT_Index_Id);
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Création de la racine d'une structure de données quelconque */ /* Création de la racine d'une structure de données quelconque */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/

View File

@@ -1,9 +1,9 @@
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* $RCSfile: ndbench.c,v $ */ /* $RCSfile: ndbench.c,v $ */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* $Revision: 2.3 $ */ /* $Revision: 2.4 $ */
/* $Name: $ */ /* $Name: $ */
/* $Date: 2002/02/28 22:00:00 $ */ /* $Date: 2002/07/29 14:55:57 $ */
/* $Author: agibert $ */ /* $Author: agibert $ */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
@@ -65,7 +65,7 @@
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
#ifdef _LIBVER #ifdef _LIBVER
VER_INFO_EXPORT( ndbench, "$Revision: 2.3 $", "$Name: $", __FILE__, "$Author: agibert $") VER_INFO_EXPORT( ndbench, "$Revision: 2.4 $", "$Name: $", __FILE__, "$Author: agibert $")
#endif #endif
#define ND_MODE 1 #define ND_MODE 1
@@ -262,7 +262,7 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
Command_Name = "NDD_CMD_MANAGER_VERSION"; Command_Name = "NDD_CMD_MANAGER_VERSION";
*Version_Name_Ptr = "$Revision: 2.3 $ $Name: $ $Date: 2002/02/28 22:00:00 $ $Author: agibert $"; *Version_Name_Ptr = "$Revision: 2.4 $ $Name: $ $Date: 2002/07/29 14:55:57 $ $Author: agibert $";
return( NDS_OK); return( NDS_OK);
} }
@@ -1338,6 +1338,8 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
Batch_Run( DS_Ptr_Ptr, File_Output, file_input, 0); Batch_Run( DS_Ptr_Ptr, File_Output, file_input, 0);
fprintf( File_Output, "\n"); fprintf( File_Output, "\n");
fprintf( File_Output, "Batch_Run: Ending execution (%s)...\n", Arg1); fprintf( File_Output, "Batch_Run: Ending execution (%s)...\n", Arg1);
fclose( file_input);
} }
break; break;