- Add open mode to ND_DataStruct_Open() API,

- ADD data struct name and open mode to init handler.
This commit is contained in:
Arnaud G. GIBERT 2024-05-28 17:41:24 +02:00
parent 6d13e890a9
commit 4756903ac3
5 changed files with 65 additions and 82 deletions

View File

@ -625,7 +625,7 @@ void Demo( char *Demo_File_Name, short Optimized_Mode)
index_type_ptr = index_type_final_tab;
}
if( ( status = ND_DataStruct_Open( &demo_ds_ptr, "NDDemo0", INDEX_NB, index_type_ptr, "Demo_DS_Manager", Demo_DS_Manager, NULL, 0, NULL)) != NDS_OK)
if( ( status = ND_DataStruct_Open( &demo_ds_ptr, "NDDemo0", ND_OPEN_FLAG_CREATE, INDEX_NB, index_type_ptr, "Demo_DS_Manager", Demo_DS_Manager, NULL, 0, NULL)) != NDS_OK)
{
printf( "ND_DataStruct_Open() failed (%d) !\n", status);
}

View File

@ -712,19 +712,7 @@ typedef short NDT_Handler_Nb;
typedef char NDT_Handler_Name[ NDD_HANDLER_NAME_SIZE];
typedef NDT_Status ( NDT_Handler_Function)( void);
typedef NDT_Status NDT_Handler_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Cmd, va_list *);
typedef NDT_Status NDT_Handler_Init( size_t *Root_Extra_Size, NDT_Handler *Handler_Tab, void *User_Ptr);
typedef NDT_Status NDT_Handler_Alloc( void **Memory_Ptr_Ptr, NDT_Root *Root_Ptr, size_t Size, void *User_Ptr);
typedef NDT_Status NDT_Handler_Free( void *Memory_Ptr, NDT_Root *Root_Ptr, void *User_Ptr);
typedef NDT_Status NDT_Handler_Open( NDT_Root *Root_Ptr, NDT_Open_Flag Open_Mode, void *User_Ptr);
typedef NDT_Status NDT_Handler_Close( NDT_Root *Root_Ptr, NDT_Close_Flag Close_Mode, void *User_Ptr);
typedef NDT_Status NDT_Handler_Info( NDT_Root *Root_Ptr, NDT_Recursive_Offset Recursive_Offset);
typedef NDT_Status NDT_Handler_Lock( NDT_Root *Root_Ptr, NDT_Lock_Flag Lock_Mode, bool *Locked_Ptr, void *User_Ptr);
typedef NDT_Status NDT_Handler_Unlock( NDT_Root *Root_Ptr, void *User_Ptr);
/*----------------------------------------------------------------------------*/
@ -818,6 +806,22 @@ typedef struct NDT_Node
/*----------------------------------------------------------------------------*/
/* Handler protypes */
/*----------------------------------------------------------------------------*/
typedef NDT_Status NDT_Handler_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Cmd, va_list *);
typedef NDT_Status NDT_Handler_Init( NDT_Root **Root_Ptr_Ptr, size_t *Root_Extra_Size, NDT_DataStruct_Name Name, NDT_Open_Flag Open_Mode, NDT_Handler *Handler_Tab, void *User_Ptr);
typedef NDT_Status NDT_Handler_Alloc( void **Memory_Ptr_Ptr, NDT_Root *Root_Ptr, size_t Size, void *User_Ptr);
typedef NDT_Status NDT_Handler_Free( void *Memory_Ptr, NDT_Root *Root_Ptr, void *User_Ptr);
typedef NDT_Status NDT_Handler_Open( NDT_Root *Root_Ptr, NDT_Open_Flag Open_Mode, void *User_Ptr);
typedef NDT_Status NDT_Handler_Close( NDT_Root *Root_Ptr, NDT_Close_Flag Close_Mode, void *User_Ptr);
typedef NDT_Status NDT_Handler_Info( NDT_Root *Root_Ptr, NDT_Recursive_Offset Recursive_Offset);
typedef NDT_Status NDT_Handler_Lock( NDT_Root *Root_Ptr, NDT_Lock_Flag Lock_Mode, bool *Locked_Ptr, void *User_Ptr);
typedef NDT_Status NDT_Handler_Unlock( NDT_Root *Root_Ptr, void *User_Ptr);
/* Alias API definition */
# ifndef ND_MODE
@ -990,26 +994,18 @@ NDD_DLL_API NDT_Status ND_Library_StdErr_Set_C( FILE *);
/*----------------------------------------------------------------------------*/
/* (O) Root_Ptr_Ptr: Pointer adress of the new data structure */
/* (I) DataStruct_Name: Name of the data structure */
/* (I) Open_Mode: Open mode */
/* (I) Index_Nb: Number of index */
/* (I) Index_Type_Ptr: Array of Index type (List, tree, ...) */
/* (I) Manager_Name: Manager function name */
/* (I) Manager_Ptr: Manager function pointer */
/* (I) Handlers_Ptr: Pointer to the data structure handlers */
/* (I) Allocator_Name: Value allocator function name */
/* (I) Allocator_Ptr: Value allocator function pointer */
/* (I) Deallocator_Name: Value deallocator function name */
/* (I) Deallocator_Ptr: Value deallocator function pointer */
/* (I) Own_Value: Flag indicating if the structure is the node owner */
/* (I) Data_Ptr: User pointer */
/* (I) User_Ptr: User pointer */
/*----------------------------------------------------------------------------*/
//NDD_DLL_API NDT_Status ND_DataStruct_Open_I( NDT_Root **, NDT_Index_Nb, NDT_Index_Type *, NDT_Manager_Name, NDT_Manager *, NDT_Allocator_Name, NDT_Allocator *, NDT_Deallocator_Name, NDT_Deallocator *, short, void *);
//NDD_DLL_API NDT_Status ND_DataStruct_Open_C( NDT_Root **, NDT_Index_Nb, NDT_Index_Type *, NDT_Manager_Name, NDT_Manager *, NDT_Allocator_Name, NDT_Allocator *, NDT_Deallocator_Name, NDT_Deallocator *, short, void *);
NDT_Status ND_DataStruct_Open_I( NDT_Root **Root_Ptr_Ptr, NDT_DataStruct_Name Name, NDT_Index_Nb Index_Nb, NDT_Index_Type *Type_Ptr, NDT_Manager_Name Manager_Name, NDT_Manager *Manager_Ptr, NDT_Handler *Handler_Ptr, short Own_Value, void *Data_Ptr);
NDT_Status ND_DataStruct_Open_C( NDT_Root **Root_Ptr_Ptr, NDT_DataStruct_Name Name, NDT_Index_Nb Index_Nb, NDT_Index_Type *Type_Ptr, NDT_Manager_Name Manager_Name, NDT_Manager *Manager_Ptr, NDT_Handler *Handler_Ptr, short Own_Value, void *Data_Ptr);
NDT_Status ND_DataStruct_Open_I( NDT_Root **Root_Ptr_Ptr, NDT_DataStruct_Name Name, NDT_Open_Flag Open_Mode, NDT_Index_Nb Index_Nb, NDT_Index_Type *Type_Ptr, NDT_Manager_Name Manager_Name, NDT_Manager *Manager_Ptr, NDT_Handler *Handler_Ptr, short Own_Value, void *User_Ptr);
NDT_Status ND_DataStruct_Open_C( NDT_Root **Root_Ptr_Ptr, NDT_DataStruct_Name Name, NDT_Open_Flag Open_Mode, NDT_Index_Nb Index_Nb, NDT_Index_Type *Type_Ptr, NDT_Manager_Name Manager_Name, NDT_Manager *Manager_Ptr, NDT_Handler *Handler_Ptr, short Own_Value, void *User_Ptr);
@ -1495,15 +1491,18 @@ NDD_DLL_API NDT_Status ND_Free_C( void *, NDT_Root *, void *);
/*----------------------------------------------------------------------------*/
/* Execute an init handler function */
/*----------------------------------------------------------------------------*/
/* (O) Root_Ptr_Ptr: Pointer adress of the new data structure */
/* (O) Root_Extra_Size: Pointer on the extra root size */
/* (I) DataStruct_Name: Name of the data structure */
/* (I) Open_Mode: Open mode */
/* (I) Handler_Tab: Pointer on the handler tab */
/* (I) Handler_Init_Name: Init handler function name */
/* (I) Handler_Init_Ptr: Init handler function pointer */
/* (I) User_Ptr: User pointer */
/*----------------------------------------------------------------------------*/
NDT_Status ND_Handler_Init_Exec_I( size_t *Root_Extra_Size, NDT_Handler *Handler_Tab, NDT_Handler_Name Handler_Init_Name, NDT_Handler_Init *Handler_Init_Ptr, void *User_Ptr);
NDT_Status ND_Handler_Init_Exec_C( size_t *Root_Extra_Size, NDT_Handler *Handler_Tab, NDT_Handler_Name Handler_Init_Name, NDT_Handler_Init *Handler_Init_Ptr, void *User_Ptr);
NDT_Status ND_Handler_Init_Exec_I( NDT_Root **Root_Ptr_Ptr, size_t *Root_Extra_Size, NDT_DataStruct_Name Name, NDT_Open_Flag Open_Mode, NDT_Handler *Handler_Tab, NDT_Handler_Name Handler_Init_Name, NDT_Handler_Init *Handler_Init_Ptr, void *User_Ptr);
NDT_Status ND_Handler_Init_Exec_C( NDT_Root **Root_Ptr_Ptr, size_t *Root_Extra_Size, NDT_DataStruct_Name Name, NDT_Open_Flag Open_Mode, NDT_Handler *Handler_Tab, NDT_Handler_Name Handler_Init_Name, NDT_Handler_Init *Handler_Init_Ptr, void *User_Ptr);

View File

@ -724,7 +724,7 @@ NDT_Status ND_Library_Open_C( int Debug_Mode)
{
if( Debug_Mode == NDD_TRUE)
{
if( ( status = ND_DataStruct_Open_I( &(NDG_Base.OpenStruct_Ptr), "OpenStruct", 1, NDG_Base.OpenStruct_Index_Type, "ND_OpenStruct_Manager", ND_OpenStruct_Manager, NULL, 0, NULL)) != NDS_OK)
if( ( status = ND_DataStruct_Open_I( &(NDG_Base.OpenStruct_Ptr), "OpenStruct", ND_OPEN_FLAG_CREATE, 1, NDG_Base.OpenStruct_Index_Type, "ND_OpenStruct_Manager", ND_OpenStruct_Manager, NULL, 0, NULL)) != NDS_OK)
{
LG_LOG_ERROR_0( "Can't open OpenStruct");
@ -960,20 +960,18 @@ NDT_Status ND_Index_Open_C( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_I
/*----------------------------------------------------------------------------*/
/* (O) Root_Ptr_Ptr: Pointer adress of the new sata structure */
/* (I) DataStruct_Name: Name of the data structure */
/* (I) Open_Mode: Open mode */
/* (I) Index_Nb: Number of index */
/* (I) Index_Type_Ptr: Array of Index type (List, tree, ...) */
/* (I) Manager_Name: Manager function name */
/* (I) Manager_Ptr: Manager function pointer */
/* (I) Handlers_Ptr: Pointer to the data structure handlers */
/* (I) Own_Value: Flag indicating if the structure is the node owner */
/* (I) Data_Ptr: User pointer */
/* (I) User_Ptr: User pointer */
/*----------------------------------------------------------------------------*/
//NDT_Status ND_DataStruct_Open_I( NDT_Root **Root_Ptr_Ptr, NDT_Index_Nb Index_Nb, NDT_Index_Type *Type_Ptr, NDT_Manager_Name Manager_Name, NDT_Manager *Manager_Ptr,
// NDT_Allocator_Name Allocator_Name, NDT_Allocator *Allocator_Ptr, NDT_Deallocator_Name Deallocator_Name, NDT_Deallocator *Deallocator_Ptr, short Own_Value, void *Data)
NDT_Status ND_DataStruct_Open_I( NDT_Root **Root_Ptr_Ptr, NDT_DataStruct_Name Name, NDT_Index_Nb Index_Nb, NDT_Index_Type *Type_Ptr, NDT_Manager_Name Manager_Name, NDT_Manager *Manager_Ptr,
NDT_Handler *Handler_Tab, short Own_Value, void *User_Ptr)
NDT_Status ND_DataStruct_Open_I( NDT_Root **Root_Ptr_Ptr, NDT_DataStruct_Name Name, NDT_Open_Flag Open_Mode, NDT_Index_Nb Index_Nb, NDT_Index_Type *Type_Ptr,
NDT_Manager_Name Manager_Name, NDT_Manager *Manager_Ptr, NDT_Handler *Handler_Tab, short Own_Value, void *User_Ptr)
{
NDT_Status status;
NDT_Handler handler_target_tab[ NDD_HANDLER_NB];
@ -1017,21 +1015,23 @@ NDT_Status ND_DataStruct_Open_I( NDT_Root **Root_Ptr_Ptr, NDT_DataStruct_Name
/* Call init function */
if( ( status = ND_Handler_Init_Exec_I( &root_extra_size, handler_target_tab, handler_target_tab[ NDD_HANDLER_ID_INIT].Name, ( NDT_Handler_Init *)handler_target_tab[ NDD_HANDLER_ID_INIT].Ptr, User_Ptr)) != NDS_OK)
*Root_Ptr_Ptr = NULL;
if( ( status = ND_Handler_Init_Exec_I( Root_Ptr_Ptr, &root_extra_size, Name, Open_Mode, handler_target_tab, handler_target_tab[ NDD_HANDLER_ID_INIT].Name, ( NDT_Handler_Init *)handler_target_tab[ NDD_HANDLER_ID_INIT].Ptr, User_Ptr)) != NDS_OK)
{
return( status);
}
if( ( status = ND_Node_Root_Alloc( Root_Ptr_Ptr, Name, Index_Nb, Type_Ptr, handler_target_tab, root_extra_size, Own_Value, User_Ptr)) != NDS_OK)
if( ( *Root_Ptr_Ptr != NULL) && ( status = ND_Node_Root_Alloc( Root_Ptr_Ptr, Name, Index_Nb, Type_Ptr, handler_target_tab, root_extra_size, Own_Value, User_Ptr)) != NDS_OK)
{
return( status);
}
/* Call init function */
/* Call Open function */
if( ( status = ND_Handler_Open_Exec_I( *Root_Ptr_Ptr, 0, handler_target_tab[ NDD_HANDLER_ID_OPEN].Name, ( NDT_Handler_Open *)handler_target_tab[ NDD_HANDLER_ID_OPEN].Ptr, User_Ptr)) != NDS_OK)
if( ( status = ND_Handler_Open_Exec_I( *Root_Ptr_Ptr, Open_Mode, handler_target_tab[ NDD_HANDLER_ID_OPEN].Name, ( NDT_Handler_Open *)handler_target_tab[ NDD_HANDLER_ID_OPEN].Ptr, User_Ptr)) != NDS_OK)
{
return( status);
}
@ -1056,21 +1056,18 @@ NDT_Status ND_DataStruct_Open_I( NDT_Root **Root_Ptr_Ptr, NDT_DataStruct_Name
/* (I) Deallocator_Name: Value deallocator function name */
/* (I) Deallocator_Ptr: Value deallocator function pointer */
/* (I) Own_Value: Flag indicating if the structure is the node owner */
/* (I) Data_Ptr: User pointer */
/* (I) User_Ptr: User pointer */
/*----------------------------------------------------------------------------*/
//NDT_Status ND_DataStruct_Open_C( NDT_Root **Root_Ptr_Ptr, NDT_Index_Nb Index_Nb, NDT_Index_Type *Type_Ptr, NDT_Manager_Name Manager_Name, NDT_Manager *Manager_Ptr,
// NDT_Allocator_Name Allocator_Name, NDT_Allocator *Allocator_Ptr, NDT_Deallocator_Name Deallocator_Name, NDT_Deallocator *Deallocator_Ptr, short Own_Value, void *Data_Ptr)
NDT_Status ND_DataStruct_Open_C( NDT_Root **Root_Ptr_Ptr, NDT_DataStruct_Name Name, NDT_Index_Nb Index_Nb, NDT_Index_Type *Type_Ptr, NDT_Manager_Name Manager_Name, NDT_Manager *Manager_Ptr,
NDT_Handler *Handler_Tab, short Own_Value, void *Data_Ptr)
NDT_Status ND_DataStruct_Open_C( NDT_Root **Root_Ptr_Ptr, NDT_DataStruct_Name Name, NDT_Open_Flag Open_Mode, NDT_Index_Nb Index_Nb, NDT_Index_Type *Type_Ptr, NDT_Manager_Name Manager_Name, NDT_Manager *Manager_Ptr,
NDT_Handler *Handler_Tab, short Own_Value, void *User_Ptr)
{
NDT_Status status;
ND_LIBNODE_OPEN_CHECK();
if( ( status = ND_DataStruct_Open_I( Root_Ptr_Ptr, Name, Index_Nb, Type_Ptr, Manager_Name, Manager_Ptr, Handler_Tab, Own_Value, Data_Ptr)) != NDS_OK)
if( ( status = ND_DataStruct_Open_I( Root_Ptr_Ptr, Name, Open_Mode, Index_Nb, Type_Ptr, Manager_Name, Manager_Ptr, Handler_Tab, Own_Value, User_Ptr)) != NDS_OK)
{
return( status);
}
@ -3625,33 +3622,24 @@ NDT_Status ND_Manager_Exec_C( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_
/*----------------------------------------------------------------------------*/
/* Execute an init handler function */
/*----------------------------------------------------------------------------*/
/* (O) Root_Ptr_Ptr: Pointer adress of the new data structure */
/* (O) Root_Extra_Size: Pointer on the extra root size */
/* (I) DataStruct_Name: Name of the data structure */
/* (I) Open_Mode: Open mode */
/* (I) Handler_Tab: Pointer on the handler tab */
/* (I) Handler_Init_Name: Init handler function name */
/* (I) Handler_Init_Ptr: Init handler function pointer */
/* (I) User_Ptr: User pointer */
/*----------------------------------------------------------------------------*/
NDT_Status ND_Handler_Init_Exec_I( size_t *Root_Extra_Size, NDT_Handler *Handler_Tab, NDT_Handler_Name Handler_Init_Name, NDT_Handler_Init *Handler_Init_Ptr, void *User_Ptr)
NDT_Status ND_Handler_Init_Exec_I( NDT_Root **Root_Ptr_Ptr, size_t *Root_Extra_Size, NDT_DataStruct_Name Name, NDT_Open_Flag Open_Mode, NDT_Handler *Handler_Tab, NDT_Handler_Name Handler_Init_Name, NDT_Handler_Init *Handler_Init_Ptr, void *User_Ptr)
{
NDT_Handler_Init *handler_init_ptr;
if( Handler_Init_Ptr != NULL)
{
handler_init_ptr = Handler_Init_Ptr;
}
else
{
if( ND_Symbol_Find( (void **)&handler_init_ptr, Handler_Init_Name) != NDS_OK)
{
LG_LOG_ERROR_0( "Cant't find init handler function");
ND_HANDLER_SYMBOL_FIND( handler_init_ptr, Handler_Init_Name, Handler_Init_Ptr);
return( NDS_KO);
}
}
return( handler_init_ptr( Root_Extra_Size, Handler_Tab, User_Ptr));
return( handler_init_ptr( Root_Ptr_Ptr, Root_Extra_Size, Name, Open_Mode, Handler_Tab, User_Ptr));
}
@ -3661,20 +3649,23 @@ NDT_Status ND_Handler_Init_Exec_I( size_t *Root_Extra_Size, NDT_Handler *Hand
/*----------------------------------------------------------------------------*/
/* Execute an init handler function */
/*----------------------------------------------------------------------------*/
/* (O) Root_Ptr_Ptr: Pointer adress of the new data structure */
/* (O) Root_Extra_Size: Pointer on the extra root size */
/* (I) DataStruct_Name: Name of the data structure */
/* (I) Open_Mode: Open mode */
/* (I) Handler_Tab: Pointer on the handler tab */
/* (I) Handler_Init_Name: Init handler function name */
/* (I) Handler_Init_Ptr: Init handler function pointer */
/* (I) User_Ptr: User pointer */
/*----------------------------------------------------------------------------*/
NDT_Status ND_Handler_Init_Exec_C( size_t *Root_Extra_Size, NDT_Handler *Handler_Tab, NDT_Handler_Name Handler_Init_Name, NDT_Handler_Init *Handler_Init_Ptr, void *User_Ptr)
NDT_Status ND_Handler_Init_Exec_C( NDT_Root **Root_Ptr_Ptr, size_t *Root_Extra_Size, NDT_DataStruct_Name Name, NDT_Open_Flag Open_Mode, NDT_Handler *Handler_Tab, NDT_Handler_Name Handler_Init_Name, NDT_Handler_Init *Handler_Init_Ptr, void *User_Ptr)
{
ND_LIBNODE_OPEN_CHECK();
ND_HANDLER_NOT_NULL_CHECK( Handler_Init_Name, Handler_Init_Ptr);
return( ND_Handler_Init_Exec_I( Root_Extra_Size, Handler_Tab, Handler_Init_Name, Handler_Init_Ptr, User_Ptr));
return( ND_Handler_Init_Exec_I( Root_Ptr_Ptr, Root_Extra_Size, Name, Open_Mode, Handler_Tab, Handler_Init_Name, Handler_Init_Ptr, User_Ptr));
}
@ -3697,19 +3688,7 @@ NDT_Status ND_Handler_Alloc_Exec_I( void **Memory_Ptr_Ptr, NDT_Root *Root_Ptr
NDT_Handler_Alloc *handler_alloc_ptr;
if( Handler_Alloc_Ptr != NULL)
{
handler_alloc_ptr = Handler_Alloc_Ptr;
}
else
{
if( ND_Symbol_Find( (void **)&handler_alloc_ptr, Handler_Alloc_Name) != NDS_OK)
{
LG_LOG_ERROR_0( "Cant't find alloc handler function");
return( NDS_KO);
}
}
ND_HANDLER_SYMBOL_FIND( handler_alloc_ptr, Handler_Alloc_Name, Handler_Alloc_Ptr);
return( handler_alloc_ptr( Memory_Ptr_Ptr, Root_Ptr, Size, User_Ptr));
}
@ -3884,7 +3863,7 @@ NDT_Status ND_Handler_Close_Exec_C( NDT_Root *Root_Ptr, NDT_Close_Flag Close_
/*----------------------------------------------------------------------------*/
/* Execute an Info handler function */
/* Execute an info handler function */
/*----------------------------------------------------------------------------*/
/* (I) Root_Ptr: Data structure pointer */
/* (I) Recursive_Offset: Print line offset */
@ -3907,7 +3886,7 @@ NDT_Status ND_Handler_Info_Exec_I( NDT_Root *Root_Ptr, NDT_Recursive_Offset R
/*----------------------------------------------------------------------------*/
/* Execute an Info handler function */
/* Execute an info handler function */
/*----------------------------------------------------------------------------*/
/* (I) Root_Ptr: Data structure pointer */
/* (I) Recursive_Offset: Print line offset */
@ -4160,12 +4139,15 @@ NDT_Status ND_Deallocator_Exec_C( void *Ptr, NDT_Root *Root_Ptr, NDT_Deallocat
/* - Return extra root size */
/* - Update handler tab */
/*----------------------------------------------------------------------------*/
/* (O) Root_Ptr_Ptr: Pointer adress of the new data structure */
/* (O) Root_Extra_Size: Pointer on the extra root size */
/* (I) DataStruct_Name: Name of the data structure */
/* (I) Open_Mode: Open mode */
/* (I) Handler_Tab: Pointer on the handler tab */
/* (I) User_Ptr: User pointer */
/*----------------------------------------------------------------------------*/
NDT_Status ND_Handler_Init_Default( size_t *Root_Extra_Size, NDT_Handler *Handler_Tab, void *User_Ptr)
NDT_Status ND_Handler_Init_Default( NDT_Root **Root_Ptr_Ptr, size_t *Root_Extra_Size, NDT_DataStruct_Name Name, NDT_Open_Flag Open_Mode, NDT_Handler *Handler_Tab, void *User_Ptr)
{
*Root_Extra_Size = 0L;

View File

@ -206,7 +206,6 @@ NDT_Status ND_Index_Clear( NDT_Root *, NDT_Index_Id);
/* (I) Own_Value: Flag indicating if the structure is the node owner */
/* (I) User_Ptr: User pointer */
/*----------------------------------------------------------------------------*/
//NDT_Status ND_Node_Root_Alloc( NDT_Root **, NDT_Index_Nb, NDT_Index_Type[], char *, NDT_Manager *, char *, NDT_Allocator *, char *, NDT_Deallocator *, short, void *);
NDT_Status ND_Node_Root_Alloc( NDT_Root **Root_Ptr_Ptr, NDT_DataStruct_Name Name, NDT_Index_Nb Index_Nb, NDT_Index_Type *Type_Ptr, NDT_Handler *Handler_Tab, size_t Root_Extra_Size, short Own_Value, void *User_Ptr);
@ -339,12 +338,15 @@ NDT_Status ND_List_Sort( NDT_Root *, NDT_Index_Id);
/* - Return extra root size */
/* - Update handler tab */
/*----------------------------------------------------------------------------*/
/* (O) Root_Ptr_Ptr: Pointer adress of the new data structure */
/* (O) Root_Extra_Size: Pointer on the extra root size */
/* (I) DataStruct_Name: Name of the data structure */
/* (I) Open_Mode: Open mode */
/* (I) Handler_Tab: Pointer on the handler tab */
/* (I) User_Ptr: User pointer */
/*----------------------------------------------------------------------------*/
NDT_Status ND_Handler_Init_Default( size_t *Root_Extra_Size, NDT_Handler *Handler_Tab, void *User_Ptr);
NDT_Status ND_Handler_Init_Default( NDT_Root **Root_Ptr_Ptr, size_t *Root_Extra_Size, NDT_DataStruct_Name Name, NDT_Open_Flag Open_Mode, NDT_Handler *Handler_Tab, void *User_Ptr);

View File

@ -839,12 +839,12 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
if( sub_choice == 0)
{
// ND_DataStruct_Open( DS_Ptr_Ptr, INDEX_NB, idx_type_tab, "Module_Manager", Module_Manager, NULL, NULL, NULL, NULL, NDD_TRUE, NULL);
ND_DataStruct_Open( DS_Ptr_Ptr, "NDBench", INDEX_NB, idx_type_tab, "Module_Manager", Module_Manager, NULL, NDD_TRUE, NULL);
ND_DataStruct_Open( DS_Ptr_Ptr, "NDBench", ND_OPEN_FLAG_CREATE, INDEX_NB, idx_type_tab, "Module_Manager", Module_Manager, NULL, NDD_TRUE, NULL);
}
else
{
// ND_DataStruct_Open( DS_Ptr_Ptr, INDEX_NB, idx_type_tab, "Module_Manager", NULL, NULL, NULL, NULL, NULL, NDD_TRUE, NULL);
ND_DataStruct_Open( DS_Ptr_Ptr, "NDBench", INDEX_NB, idx_type_tab, "Module_Manager", NULL, NULL, NDD_TRUE, NULL);
ND_DataStruct_Open( DS_Ptr_Ptr, "NDBench", ND_OPEN_FLAG_CREATE, INDEX_NB, idx_type_tab, "Module_Manager", NULL, NULL, NDD_TRUE, NULL);
}
t_stop( t_exec);