12 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
agibert
a512c467f7 Add 2.0.3-1 entry:
Rework the Microsoft Visual Studio project files to generate correctly Debug and Release config,
   Minor fix in libnode.c.
2002-04-09 17:41:44 +00:00
agibert
af664cd6a0 Fix Release config generation,
Now generate ndbench.exe and ndbenchd.exe.
2002-04-09 17:16:54 +00:00
agibert
2966eb9115 Fix Release config generation,
Now generate demo0.exe and demo0d.exe.
2002-04-09 17:11:17 +00:00
agibert
ea02a52457 Fix Release config generation,
Now generate libnode.dll and libnoded.dll libraries.
2002-04-09 17:10:20 +00:00
agibert
882cde0d40 Change index type numeric print value from decimal to hexa in ND_Index_Info_Print_I() API,
Add new cases in ND_Index_Convert_I() handling (List->List:FIFO and List->List:LIFO).
2002-04-09 17:08:17 +00:00
10 changed files with 160 additions and 63 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,37 @@
# $RCSfile: ReleaseNotes.txt,v $ # $RCSfile: ReleaseNotes.txt,v $
# $Revision: 2.8 $ # $Revision: 2.10 $
# $Name: $ # $Name: $
# $Date: 2002/03/01 09:48:04 $ # $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
--------------------------------------------------------------------------------
All: Fix Microsoft Visual Project to generate Debug and Release config correctly,
LibNode: Change index type numeric print value from decimal to hexa in ND_Index_Info_Print() API,
LibNode: Add new cases in ND_Index_Convert() handling (List->List:FIFO and List->List:LIFO),
LibNode: Generate in Debug mode libnoded.lib, libnoded.dll, libnoded_a.lib,
LibNode: Generate in Release mode libnode.lib, libnode.dll, libnode_a.lib,
Demo0: Generate in Debug mode demo0d.exe and in Release mode demo0d.exe,
NbBench: Generate in Debug mode ndbenchd.exe and in Release mode ndbenchd.exe.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
LibNode V 2.0.2-2 - A. Gibert - 01/03/02 LibNode V 2.0.2-2 - A. Gibert - 01/03/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

@@ -37,11 +37,12 @@ RSC=rc.exe
# PROP BASE Target_Dir "" # PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
# PROP Use_Debug_Libraries 0 # PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release" # PROP Output_Dir ""
# PROP Intermediate_Dir "Release" # PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@@ -49,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libnode.lib /nologo /subsystem:console /incremental:yes /machine:I386
!ELSEIF "$(CFG)" == "demo0 - Win32 Debug" !ELSEIF "$(CFG)" == "demo0 - Win32 Debug"
@@ -60,12 +61,12 @@ LINK32=link.exe
# PROP BASE Target_Dir "" # PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug" # PROP Output_Dir ""
# PROP Intermediate_Dir "Debug" # PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@@ -73,7 +74,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libnode.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libnoded.lib /nologo /subsystem:console /debug /machine:I386 /out:"demo0d.exe" /pdbtype:sept
!ENDIF !ENDIF

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.5 $ */ /* $Revision: 2.7 $ */
/* $Name: $ */ /* $Name: $ */
/* $Date: 2002/02/28 21:53:47 $ */ /* $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.5 $", "$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.5 $ $Name: $ $Date: 2002/02/28 21:53:47 $ $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)
@@ -1066,19 +1062,31 @@ NDT_Status ND_Index_Convert_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
{ {
rc = ND_List_Sort( Root_Ptr, Index_Id); rc = ND_List_Sort( Root_Ptr, Index_Id);
if( ND_ERROR( rc)) return( rc); if( ND_ERROR( rc)) return( rc);
if( rc == NDS_OK) Root_Ptr->Index_Tab[Index_Id].Type = Target_Type;
Root_Ptr->Index_Tab[Index_Id].Type = Target_Type;
return( rc); return( rc);
} }
case( NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_FIFO):
case( NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_LIFO):
{
Root_Ptr->Index_Tab[Index_Id].Type = Target_Type;
return( NDS_OK);
}
case( NDD_INDEX_TYPE_TREE | NDD_INDEX_SUBTYPE_BALANCED): case( NDD_INDEX_TYPE_TREE | NDD_INDEX_SUBTYPE_BALANCED):
case( NDD_INDEX_TYPE_TREE | NDD_INDEX_SUBTYPE_UNBALANCED):
{ {
rc = ND_List_Sort( Root_Ptr, Index_Id); rc = ND_List_Sort( Root_Ptr, Index_Id);
if( rc != NDS_OK) return( rc); if( rc != NDS_OK) return( rc);
rc = ND_Tree_Make( Root_Ptr, Index_Id); rc = ND_Tree_Make( Root_Ptr, Index_Id);
if( ND_ERROR( rc)) return( rc); if( ND_ERROR( rc)) return( rc);
if( rc == NDS_OK) Root_Ptr->Index_Tab[Index_Id].Type = Target_Type;
Root_Ptr->Index_Tab[Index_Id].Type = Target_Type;
return( rc); return( rc);
} }
@@ -1103,7 +1111,10 @@ NDT_Status ND_Index_Convert_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
rc = ND_List_Make( Root_Ptr, Index_Id); rc = ND_List_Make( Root_Ptr, Index_Id);
if( ND_ERROR( rc)) return( rc); if( ND_ERROR( rc)) return( rc);
if( rc == NDS_OK) Root_Ptr->Index_Tab[Index_Id].Type = Target_Type;
Root_Ptr->Index_Tab[Index_Id].Type = Target_Type;
return( rc);
} }
default: default:
@@ -1657,7 +1668,7 @@ NDT_Status ND_Index_Info_Print_I( FILE *Out, NDT_Root *Root_Ptr, NDT_Index_Id
memset( offset, ' ', Recursive_Offset * ND_RECURSIVE_PRINT_OFFSET); memset( offset, ' ', Recursive_Offset * ND_RECURSIVE_PRINT_OFFSET);
offset[Recursive_Offset * ND_RECURSIVE_PRINT_OFFSET] = '\0'; offset[Recursive_Offset * ND_RECURSIVE_PRINT_OFFSET] = '\0';
printf( "%s Index Id: (%d)\tType: (%d) [%s:%s:%s]\tNode Nb: (%d)\tHead: (%s%p)\tTail: (%s%p)\n%s Min Depth: (%d)\tMax Depth: (%d)\tMax Dif: (%d)\tNb Equ: (%d)\tSave: (%s%p)\n\n", printf( "%s Index Id: (%d)\tType: (%#06x) [%s:%s:%s]\tNode Nb: (%d)\tHead: (%s%p)\tTail: (%s%p)\n%s Min Depth: (%d)\tMax Depth: (%d)\tMax Dif: (%d)\tNb Equ: (%d)\tSave: (%s%p)\n\n",
offset, Index_Id, Root_Ptr->Index_Tab[Index_Id].Type, ND_INDEX_STATUS_ASCII_GET( Root_Ptr, Index_Id), ND_INDEX_TYPE_ASCII_GET( Root_Ptr, Index_Id), ND_INDEX_SUBTYPE_ASCII_GET( Root_Ptr, Index_Id), offset, Index_Id, Root_Ptr->Index_Tab[Index_Id].Type, ND_INDEX_STATUS_ASCII_GET( Root_Ptr, Index_Id), ND_INDEX_TYPE_ASCII_GET( Root_Ptr, Index_Id), ND_INDEX_SUBTYPE_ASCII_GET( Root_Ptr, Index_Id),
Root_Ptr->Index_Tab[Index_Id].Node_Number, Root_Ptr->Index_Tab[Index_Id].Node_Number,
NDD_PRINTF_PTR_PREFIX, Root_Ptr->Index_Tab[Index_Id].Head, NDD_PRINTF_PTR_PREFIX, Root_Ptr->Index_Tab[Index_Id].Tail, NDD_PRINTF_PTR_PREFIX, Root_Ptr->Index_Tab[Index_Id].Head, NDD_PRINTF_PTR_PREFIX, Root_Ptr->Index_Tab[Index_Id].Tail,
@@ -3411,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 */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
@@ -3450,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

@@ -38,11 +38,12 @@ RSC=rc.exe
# PROP BASE Target_Dir "" # PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
# PROP Use_Debug_Libraries 0 # PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release" # PROP Output_Dir ""
# PROP Intermediate_Dir "Release" # PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNODE_EXPORTS" /YX /FD /c # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNODE_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNODE_EXPORTS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNODE_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD BASE RSC /l 0x809 /d "NDEBUG"
@@ -52,13 +53,13 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /machine:I386
# Begin Custom Build - Creating static library libnode_a.lib... # Begin Custom Build - Creating static library libnode_a.lib...
InputPath=.\Release\libnode.dll InputPath=.\libnode.dll
SOURCE="$(InputPath)" SOURCE="$(InputPath)"
"Release\libnode_a.lib" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" "libnode_a.lib" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
lib /nologo /out:Release\libnode_a.lib Release\*.obj lib /nologo /out:libnode_a.lib Release\*.obj
# End Custom Build # End Custom Build
@@ -71,7 +72,7 @@ SOURCE="$(InputPath)"
# PROP BASE Target_Dir "" # PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug" # PROP Output_Dir ""
# PROP Intermediate_Dir "Debug" # PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
@@ -87,14 +88,14 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"libnoded.dll" /pdbtype:sept
# SUBTRACT LINK32 /map # SUBTRACT LINK32 /map
# Begin Custom Build - Creating static library libnode_a.lib... # Begin Custom Build - Creating static library libnoded_a.lib...
InputPath=.\Debug\libnode.dll InputPath=.\libnoded.dll
SOURCE="$(InputPath)" SOURCE="$(InputPath)"
"Debug\libnode_a.lib" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" "libnoded_a.lib" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
lib /nologo /out:Debug\libnode_a.lib Debug\*.obj lib /nologo /out:libnoded_a.lib Debug\*.obj
# End Custom Build # End Custom Build

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;

View File

@@ -37,11 +37,12 @@ RSC=rc.exe
# PROP BASE Target_Dir "" # PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
# PROP Use_Debug_Libraries 0 # PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release" # PROP Output_Dir ""
# PROP Intermediate_Dir "Release" # PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@@ -49,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libnode.lib /nologo /subsystem:console /incremental:yes /machine:I386
!ELSEIF "$(CFG)" == "ndbench - Win32 Debug" !ELSEIF "$(CFG)" == "ndbench - Win32 Debug"
@@ -60,7 +61,7 @@ LINK32=link.exe
# PROP BASE Target_Dir "" # PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug" # PROP Output_Dir ""
# PROP Intermediate_Dir "Debug" # PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
@@ -73,8 +74,8 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libnode.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libnoded.lib /nologo /subsystem:console /debug /machine:I386 /out:"ndbenchd.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none # SUBTRACT LINK32 /profile /pdb:none
!ENDIF !ENDIF