- Add LibLog 1.1.x support.

This commit is contained in:
Arnaud G. GIBERT 2024-08-09 15:10:58 +02:00
parent cc97394120
commit da05b521f6
4 changed files with 107 additions and 106 deletions

View File

@ -5,7 +5,8 @@ LibNode V 3.0.0-1 - A. GIBERT - 2024/05/xx
- All:
- Working on new API...
- Add DataStruct Handlers,
- Update Open_DataStruct() API.
- Update Open_DataStruct() API,
- Add LibLog 1.1 support.

View File

@ -370,12 +370,12 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
default:
{
LG_LOG_ERROR_1( "Manager called with an undefined command: (%d)", Command);
LG_LOG_ERROR( "Manager called with an undefined command: (%d)", Command);
return( NDS_ERRAPI);
}
}
LG_LOG_ERROR_2( "Manager internal error with command: (%d) name: [%s]", Command, Command_Name);
LG_LOG_ERROR( "Manager internal error with command: (%d) name: [%s]", Command, Command_Name);
return( NDS_OK);
}
@ -519,7 +519,7 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
default:
{
LG_LOG_ERROR_1( "Unknown COMP idx: (%d)", Index_Id);
LG_LOG_ERROR( "Unknown COMP idx: (%d)", Index_Id);
return( NDS_KO);
}
}
@ -636,12 +636,12 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
default:
{
LG_LOG_ERROR_1( "Manager called with an undefined command: (%d)", Command);
LG_LOG_ERROR( "Manager called with an undefined command: (%d)", Command);
return( NDS_ERRAPI);
}
}
LG_LOG_ERROR_2( "Manager internal error with command: (%d) name: [%s]", Command, Command_Name);
LG_LOG_ERROR( "Manager internal error with command: (%d) name: [%s]", Command, Command_Name);
return( NDS_OK);
}
@ -690,7 +690,7 @@ NDT_Status ND_Library_Open_I( int Debug_Mode)
#if !defined(_WIN32)
if( ( NDG_Base.DL_Ptr = dlopen( NULL, ( RTLD_NOW | RTLD_GLOBAL))) == NULL)
{
LG_LOG_ERROR_1( "Can't dlopen: [%s]", dlerror());
LG_LOG_ERROR( "Can't dlopen: [%s]", dlerror());
return( NDS_KO);
}
@ -716,7 +716,7 @@ NDT_Status ND_Library_Open_C( int Debug_Mode)
if( NDG_Base.Open_Status != NDD_FALSE)
{
LG_LOG_ERROR_0( "Library is not closed");
LG_LOG_ERROR( "Library is not closed");
return( NDS_KO);
}
@ -726,7 +726,7 @@ NDT_Status ND_Library_Open_C( int Debug_Mode)
{
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");
LG_LOG_ERROR( "Can't open OpenStruct");
return( NDS_KO);
}
@ -767,7 +767,7 @@ NDT_Status ND_Library_Close_I( void)
#if !defined(_WIN32)
if( dlclose( NDG_Base.DL_Ptr) != 0)
{
LG_LOG_ERROR_1( "Can't dlclose: [%s]", dlerror());
LG_LOG_ERROR( "Can't dlclose: [%s]", dlerror());
return( NDS_KO);
}
@ -803,11 +803,11 @@ NDT_Status ND_Library_Close_C( void)
{
if( NDG_Base.OpenStruct_Ptr->Index_Tab[NDD_INDEX_PRIMARY].Node_Number > 0)
{
LG_LOG_ERROR_0( "Unclosed DataStruct:");
LG_LOG_ERROR( "Unclosed DataStruct:");
if( ( status = ND_DataStruct_Info_Print_I( NDG_Base.Err_Stream, NDG_Base.OpenStruct_Ptr, NDD_RECURSIVE_MODE_PARENT_CHILD, 0, 0)) != NDS_OK)
{
LG_LOG_ERROR_0( "Can't print OpenStruct info");
LG_LOG_ERROR( "Can't print OpenStruct info");
return( NDS_KO);
}
@ -815,7 +815,7 @@ NDT_Status ND_Library_Close_C( void)
if( ( status = ND_DataStruct_Close_I( NDG_Base.OpenStruct_Ptr)) != NDS_OK)
{
LG_LOG_ERROR_0( "Can't close OpenStruct");
LG_LOG_ERROR( "Can't close OpenStruct");
return( NDS_KO);
}
@ -878,7 +878,7 @@ NDT_Status ND_Index_Open_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_In
if( ( status = ND_Index_Clear( Root_Ptr, Index_Id)) != NDS_OK)
{
LG_LOG_ERROR_0( "Index cleaning error");
LG_LOG_ERROR( "Index cleaning error");
return( NDS_KO);
}
@ -891,7 +891,7 @@ NDT_Status ND_Index_Open_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_In
{
if( ( status = ND_Index_Node_First_Get_I( &node_ptr, Root_Ptr, NDD_INDEX_PRIMARY)) != NDS_OK)
{
LG_LOG_ERROR_0( "Can't get first primary index node");
LG_LOG_ERROR( "Can't get first primary index node");
return( NDS_KO);
}
@ -900,14 +900,14 @@ NDT_Status ND_Index_Open_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_In
{
if( ( status = ND_Index_Value_Add_I( Root_Ptr, Index_Id, node_ptr->Value)) != NDS_OK)
{
LG_LOG_ERROR_0( "Can't add value");
LG_LOG_ERROR( "Can't add value");
return( NDS_KO);
}
if( ( status = ND_Index_Node_Next_Get_I( &node_ptr, node_ptr)) != NDS_OK)
{
LG_LOG_ERROR_0( "Can't get next node");
LG_LOG_ERROR( "Can't get next node");
return( NDS_KO);
}
@ -936,14 +936,14 @@ NDT_Status ND_Index_Open_C( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_I
if( !ND_INDEX_STATUS_CLOSED_IS( Root_Ptr, Index_Id))
{
LG_LOG_ERROR_0( "Index is not closed");
LG_LOG_ERROR( "Index is not closed");
return( NDS_ERRAPI);
}
if( ( Root_Ptr->Index_Open_Count == 0) && ( Index_Id != NDD_INDEX_PRIMARY))
{
LG_LOG_ERROR_0( "Fist opened index should be the primary");
LG_LOG_ERROR( "Fist opened index should be the primary");
return( NDS_ERRAPI);
}
@ -1094,7 +1094,7 @@ NDT_Status ND_DataStruct_Open_C( NDT_Root **Root_Ptr_Ptr, NDT_DataStruct_Name
{
if( ( status = ND_DataStruct_Value_Add_I( NDG_Base.OpenStruct_Ptr, (void **)*Root_Ptr_Ptr)) != NDS_OK)
{
LG_LOG_ERROR_0( "Can't add value in OpenStruct");
LG_LOG_ERROR( "Can't add value in OpenStruct");
return( NDS_KO);
}
@ -1121,7 +1121,7 @@ NDT_Status ND_Index_Close_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id)
if( ( Root_Ptr->Index_Open_Count != 1) && ( Index_Id == NDD_INDEX_PRIMARY))
{
LG_LOG_ERROR_0( "The primary should be the last closed");
LG_LOG_ERROR( "The primary should be the last closed");
return(NDS_ERRAPI);
}
@ -1154,7 +1154,7 @@ NDT_Status ND_Index_Close_C( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id)
if( !ND_INDEX_STATUS_OPENED_IS( Root_Ptr, Index_Id))
{
LG_LOG_ERROR_0( "Index is not opened");
LG_LOG_ERROR( "Index is not opened");
return( NDS_ERRAPI);
}
@ -1210,7 +1210,7 @@ NDT_Status ND_DataStruct_Close_C( NDT_Root *Root_Ptr)
{
if( ( status = ND_DataStruct_Value_Remove_I( NDG_Base.OpenStruct_Ptr, (void *)Root_Ptr)) != NDS_OK)
{
LG_LOG_ERROR_0( "Can't remove value from OpenStruct");
LG_LOG_ERROR( "Can't remove value from OpenStruct");
return( NDS_KO);
}
@ -1362,7 +1362,7 @@ NDT_Status ND_Index_Check_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, int
}
else
{
LG_LOG_ERROR_3( "Unknown structure type: (%d) in structure: (%p:%d)\n", Root_Ptr->Index_Tab[Index_Id].Type, Root_Ptr, Index_Id);
LG_LOG_ERROR( "Unknown structure type: (%d) in structure: (%p:%d)\n", Root_Ptr->Index_Tab[Index_Id].Type, Root_Ptr, Index_Id);
(*Detected_Nb_Ptr)++;
return( NDS_OK);
@ -1372,11 +1372,11 @@ NDT_Status ND_Index_Check_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, int
if( *Detected_Nb_Ptr == 0)
{
LG_LOG_INFO_2( "No error detected in the node structure (%p:%d)", Root_Ptr, Index_Id);
LG_LOG_INFO( "No error detected in the node structure (%p:%d)", Root_Ptr, Index_Id);
}
else
{
LG_LOG_INFO_4( "%d/%d error(s) corrected in the node structure (%p:%d)\n", *Corrected_Nb_Ptr, *Detected_Nb_Ptr, Root_Ptr, Index_Id);
LG_LOG_INFO( "%d/%d error(s) corrected in the node structure (%p:%d)\n", *Corrected_Nb_Ptr, *Detected_Nb_Ptr, Root_Ptr, Index_Id);
}
}
@ -1562,7 +1562,7 @@ NDT_Status ND_Index_Convert_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
default:
{
LG_LOG_ERROR_1( "Unknown structure type: (%d)", Root_Ptr->Index_Tab[Index_Id].Type);
LG_LOG_ERROR( "Unknown structure type: (%d)", Root_Ptr->Index_Tab[Index_Id].Type);
return( NDS_ERRAPI);
}
@ -1679,7 +1679,7 @@ NDT_Status ND_Index_Reorg_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id)
}
else
{
LG_LOG_ERROR_3( "Unknown structure type: (%d) in structure: (%p:%d)\n", Root_Ptr->Index_Tab[Index_Id].Type, Root_Ptr, Index_Id);
LG_LOG_ERROR( "Unknown structure type: (%d) in structure: (%p:%d)\n", Root_Ptr->Index_Tab[Index_Id].Type, Root_Ptr, Index_Id);
return( NDS_ERRAPI);
}
@ -2075,13 +2075,13 @@ NDT_Status ND_Index_Info_Print_I( FILE *Out, NDT_Root *Root_Ptr, NDT_Index_Id
NDD_PRINTF_PTR_PREFIX, Root_Ptr->Index_Tab[Index_Id].Save);
*/
LG_LOG_INFO_11( "%s Index Id: (%d)\tType: (%#06x) [%s:%s:%s]\tNode Nb: (%ld)\tHead: (%s%p)\tTail: (%s%p)",
LG_LOG_INFO( "%s Index Id: (%d)\tType: (%#06x) [%s:%s:%s]\tNode Nb: (%ld)\tHead: (%s%p)\tTail: (%s%p)",
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, NDD_PRINTF_PTR_PREFIX, Root_Ptr->Index_Tab[Index_Id].Head, NDD_PRINTF_PTR_PREFIX, Root_Ptr->Index_Tab[Index_Id].Tail);
LG_LOG_INFO_7( "%s Min Depth: (%ld)\tMax Depth: (%ld)\tMax Dif: (%ld)\tNb Equ: (%ld)\tSave: (%s%p)",
LG_LOG_INFO( "%s Min Depth: (%ld)\tMax Depth: (%ld)\tMax Dif: (%ld)\tNb Equ: (%ld)\tSave: (%s%p)",
offset, Root_Ptr->Index_Tab[Index_Id].Min_Depth, Root_Ptr->Index_Tab[Index_Id].Max_Depth, Root_Ptr->Index_Tab[Index_Id].Max_Dif, Root_Ptr->Index_Tab[Index_Id].Nb_Equ,
NDD_PRINTF_PTR_PREFIX, Root_Ptr->Index_Tab[Index_Id].Save);
LG_LOG_INFO_0( "");
LG_LOG_INFO( "");
}
if( ND_RECURSIVE_CHILD_IS( Recursive_Mode))
@ -2158,22 +2158,22 @@ NDT_Status ND_DataStruct_Info_Print_I( FILE *Out, NDT_Root *Root_Ptr, NDT_Recu
offset, version_name);
*/
LG_LOG_INFO_8( "%sRoot: (%s%p)\tName: [%s]\tIndex Nb: (%d)\tIndex Open Count: (%d)\tRoot_Size: (%ld)\tStatus: [%s]",
LG_LOG_INFO( "%sRoot: (%s%p)\tName: [%s]\tIndex Nb: (%d)\tIndex Open Count: (%d)\tRoot_Size: (%ld)\tStatus: [%s]",
offset, NDD_PRINTF_PTR_PREFIX, Root_Ptr, Root_Ptr->Name, Root_Ptr->Index_Nb, Root_Ptr->Index_Open_Count, Root_Ptr->Root_Size, NDD_DATASTRUCT_STATUS_VALUE_ASCII_GET( Root_Ptr->Status));
LG_LOG_INFO_13( "%sManager: (%s%p) [%s]\tInit: (%s%p) [%s]\tAlloc: (%s%p) [%s]\tFree: (%s%p) [%s]", offset,
LG_LOG_INFO( "%sManager: (%s%p) [%s]\tInit: (%s%p) [%s]\tAlloc: (%s%p) [%s]\tFree: (%s%p) [%s]", offset,
NDD_PRINTF_PTR_PREFIX, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_MANAGER].Ptr, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_MANAGER].Name,
NDD_PRINTF_PTR_PREFIX, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_INIT ].Ptr, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_INIT ].Name,
NDD_PRINTF_PTR_PREFIX, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_ALLOC ].Ptr, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_ALLOC ].Name,
NDD_PRINTF_PTR_PREFIX, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_FREE ].Ptr, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_FREE ].Name);
LG_LOG_INFO_13( "%sOpen: (%s%p) [%s]\tClose: (%s%p) [%s]\tLock: (%s%p) [%s]\tUnlock: (%s%p) [%s]", offset,
LG_LOG_INFO( "%sOpen: (%s%p) [%s]\tClose: (%s%p) [%s]\tLock: (%s%p) [%s]\tUnlock: (%s%p) [%s]", offset,
NDD_PRINTF_PTR_PREFIX, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_OPEN ].Ptr, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_OPEN ].Name,
NDD_PRINTF_PTR_PREFIX, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_CLOSE ].Ptr, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_CLOSE ].Name,
NDD_PRINTF_PTR_PREFIX, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_LOCK ].Ptr, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_LOCK ].Name,
NDD_PRINTF_PTR_PREFIX, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_UNLOCK].Ptr, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_UNLOCK].Name);
LG_LOG_INFO_4( "%sUser: (%s%p)\tManager Version: [%s]",
LG_LOG_INFO( "%sUser: (%s%p)\tManager Version: [%s]",
offset, NDD_PRINTF_PTR_PREFIX, Root_Ptr->User_Ptr, version_name);
if( ( status = ND_Handler_Info_Exec_I( Root_Ptr, Recursive_Offset, Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_INFO].Name, ( NDT_Handler_Info *)Root_Ptr->Handler_Tab[ NDD_HANDLER_ID_INFO].Ptr)) != NDS_OK)
@ -2181,7 +2181,7 @@ NDT_Status ND_DataStruct_Info_Print_I( FILE *Out, NDT_Root *Root_Ptr, NDT_Recu
return( status);
}
LG_LOG_INFO_0( "");
LG_LOG_INFO( "");
}
if( ND_RECURSIVE_CHILD_IS( Recursive_Mode))
@ -2324,7 +2324,7 @@ NDT_Status ND_Index_Value_Add_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, v
}
else
{
LG_LOG_ERROR_1( "Unknown structure type: (%d)", Root_Ptr->Index_Tab[Index_Id].Type);
LG_LOG_ERROR( "Unknown structure type: (%d)", Root_Ptr->Index_Tab[Index_Id].Type);
return( NDS_ERRAPI);
}
@ -2713,7 +2713,7 @@ NDT_Status ND_Index_Node_Add_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, ND
else if( ND_INDEX_TYPE_TREE_IS( Root_Ptr, Index_Id)) return ND_Tree_Node_Add( Root_Ptr, Index_Id, Node_Ptr);
else
{
LG_LOG_ERROR_1( "Unknown structure type (%d)", Root_Ptr->Index_Tab[Index_Id].Type);
LG_LOG_ERROR( "Unknown structure type (%d)", Root_Ptr->Index_Tab[Index_Id].Type);
return( NDS_ERRAPI);
}
@ -2838,7 +2838,7 @@ NDT_Status ND_Index_Node_Remove_I( NDT_Node *Node_Ptr)
}
else
{
LG_LOG_ERROR_1( "Unknown structure type (%d)", root_ptr->Index_Tab[index_id].Type);
LG_LOG_ERROR( "Unknown structure type (%d)", root_ptr->Index_Tab[index_id].Type);
return(NDS_ERRAPI);
}
@ -3083,7 +3083,7 @@ NDT_Status ND_Index_Node_Find_VI( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr
}
else
{
LG_LOG_ERROR_1( "Unknown structure type (%d)", Root_Ptr->Index_Tab[Index_Id].Type);
LG_LOG_ERROR( "Unknown structure type (%d)", Root_Ptr->Index_Tab[Index_Id].Type);
return( NDS_KO);
}
@ -3154,7 +3154,7 @@ NDT_Status ND_Index_Node_Find_I( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr,
}
else
{
LG_LOG_ERROR_1( "Unknown structure type (%d)", Root_Ptr->Index_Tab[Index_Id].Type);
LG_LOG_ERROR( "Unknown structure type (%d)", Root_Ptr->Index_Tab[Index_Id].Type);
status = NDS_KO;
}
@ -3501,7 +3501,7 @@ NDT_Status ND_Root_Tmp_Alloc( NDT_Root **Root_Tmp_Ptr_Ptr, size_t Root_Extra_
if( ( *Root_Tmp_Ptr_Ptr = malloc( root_size)) == NULL)
{
LG_LOG_ERROR_1( "Can't allocate memory for data structure: [%s]", Name);
LG_LOG_ERROR( "Can't allocate memory for data structure: [%s]", Name);
return( NDS_ERRMEM);
}
@ -3526,7 +3526,7 @@ NDT_Status ND_Root_Tmp_Alloc( NDT_Root **Root_Tmp_Ptr_Ptr, size_t Root_Extra_
{
if( ( status = ND_Index_Open_I( ( *Root_Tmp_Ptr_Ptr), index_id, Type_Ptr[ index_id])) != NDS_OK)
{
LG_LOG_ERROR_0( "Index open error");
LG_LOG_ERROR( "Index open error");
return( status);
}
}
@ -3534,7 +3534,7 @@ NDT_Status ND_Root_Tmp_Alloc( NDT_Root **Root_Tmp_Ptr_Ptr, size_t Root_Extra_
{
if( ( status = ND_Index_Clear( ( *Root_Tmp_Ptr_Ptr), index_id)) != NDS_OK)
{
LG_LOG_ERROR_0( "Index cleaning error");
LG_LOG_ERROR( "Index cleaning error");
return( status);
}
@ -3573,7 +3573,7 @@ NDT_Status ND_Manager_Exec_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
{
if( ND_Symbol_Find( (void **)&manager_ptr, Root_Ptr->Manager_Name) != NDS_OK)
{
LG_LOG_ERROR_0( "Cant't find manger function");
LG_LOG_ERROR( "Cant't find manger function");
return( NDS_KO);
}
@ -3607,7 +3607,7 @@ NDT_Status ND_Manager_Exec_VC( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
if( !Root_Ptr->Manager_Ptr || !*(Root_Ptr->Manager_Ptr))
{
LG_LOG_ERROR_0( "Undefined function name");
LG_LOG_ERROR( "Undefined function name");
return( NDS_ERRAPI);
}
@ -3648,7 +3648,7 @@ NDT_Status ND_Manager_Exec_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_
{
if( ND_Symbol_Find( (void **)&manager_ptr, Root_Ptr->Manager_Name) != NDS_OK)
{
LG_LOG_ERROR_0( "Cant't find manger function");
LG_LOG_ERROR( "Cant't find manger function");
return( NDS_KO);
}
@ -3688,7 +3688,7 @@ NDT_Status ND_Manager_Exec_C( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_
if( !Root_Ptr->Manager_Ptr || !*(Root_Ptr->Manager_Ptr))
{
LG_LOG_ERROR_0( "Undefined function name");
LG_LOG_ERROR( "Undefined function name");
return( NDS_ERRAPI);
}
@ -4102,7 +4102,7 @@ NDT_Status ND_Allocator_Exec_I( void **Ptr_Ptr, NDT_Root *Root_Ptr, size_t S
{
if( ND_Symbol_Find( (void **)&allocator_ptr, Allocator_Name) != NDS_OK)
{
LG_LOG_ERROR_0( "Cant't find allocator function");
LG_LOG_ERROR( "Cant't find allocator function");
return( NDS_KO);
}
@ -4162,7 +4162,7 @@ NDT_Status ND_Deallocator_Exec_I( void *Ptr, NDT_Root *Root_Ptr, NDT_Deallocat
{
if( ND_Symbol_Find( (void **)&deallocator_ptr, Deallocator_Name) != NDS_OK)
{
LG_LOG_ERROR_0( "Cant't find deallocator function");
LG_LOG_ERROR( "Cant't find deallocator function");
return( NDS_KO);
}
@ -4191,7 +4191,7 @@ NDT_Status ND_Deallocator_Exec_C( void *Ptr, NDT_Root *Root_Ptr, NDT_Deallocat
if( ( Deallocator_Name == NULL) && ( Deallocator_Ptr == NULL))
{
LG_LOG_ERROR_0( "Undefined function name");
LG_LOG_ERROR( "Undefined function name");
return( NDS_ERRAPI);
}
@ -4427,7 +4427,7 @@ NDT_Status ND_Symbol_Find( void **Ptr_Ptr, const char *Symbol_Name)
if( ( *Ptr_Ptr = dlsym( NDG_Base.DL_Ptr, (const char *)Symbol_Name)) == NULL)
{
LG_LOG_ERROR_2( "Unable to find: [%s] in symbol table: (%s)", Symbol_Name, dlerror());
LG_LOG_ERROR( "Unable to find: [%s] in symbol table: (%s)", Symbol_Name, dlerror());
return( NDS_KO);
}
@ -4435,7 +4435,7 @@ NDT_Status ND_Symbol_Find( void **Ptr_Ptr, const char *Symbol_Name)
Symbol_Ptr = (NDT_Symbol *)malloc( sizeof( NDT_Symbol));
if( Symbol_Ptr == NULL)
{
LG_LOG_ERROR_0( "No more memory");
LG_LOG_ERROR( "No more memory");
return( NDS_KO);
}
@ -4700,7 +4700,7 @@ NDT_Status ND_List_Node_Add( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_N
}
}
LG_LOG_ERROR_1( "Unknown list type: (%d)", Root_Ptr->Index_Tab[Index_Id].Type);
LG_LOG_ERROR( "Unknown list type: (%d)", Root_Ptr->Index_Tab[Index_Id].Type);
return( NDS_ERRAPI);
}
@ -5370,7 +5370,7 @@ int ND_Node_Compare( void **Node1_Ptr_Ptr, void **Node2_Ptr_Ptr)
default:
{
LG_LOG_ERROR_1( "Incorrect return code from the manager: (%d)", rc);
LG_LOG_ERROR( "Incorrect return code from the manager: (%d)", rc);
return( 0);
}
@ -5574,7 +5574,7 @@ void ND_List_Link_Check( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, int *Nb_D
{
Root_Ptr->Index_Tab[Index_Id].Node_Number = left2right_node_number;
LG_LOG_WARNING_2( "\t- number of node has been corrected on structure: (%p:%d)", Root_Ptr, Index_Id);
LG_LOG_WARNING( "\t- number of node has been corrected on structure: (%p:%d)", Root_Ptr, Index_Id);
(*Nb_Detected_Ptr)++;
(*Nb_Corrected_Ptr)++;
@ -5591,7 +5591,7 @@ void ND_List_Link_Check( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, int *Nb_D
{
if( node_ptr->Right && ( node_ptr->Right->Left != node_ptr))
{
LG_LOG_WARNING_3( "\t- link 'Left' has been corrected on node: (%p) of structure: (%p:%d)", node_ptr->Right, Root_Ptr, Index_Id);
LG_LOG_WARNING( "\t- link 'Left' has been corrected on node: (%p) of structure: (%p:%d)", node_ptr->Right, Root_Ptr, Index_Id);
node_ptr->Right->Left = node_ptr;
(*Nb_Detected_Ptr)++;
@ -5600,7 +5600,7 @@ void ND_List_Link_Check( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, int *Nb_D
if( !node_ptr->Right && ( node_ptr != Root_Ptr->Index_Tab[Index_Id].Tail))
{
LG_LOG_WARNING_2( "\t- link 'Tail' has been corrected on structure: (%p:%d)", Root_Ptr, Index_Id);
LG_LOG_WARNING( "\t- link 'Tail' has been corrected on structure: (%p:%d)", Root_Ptr, Index_Id);
Root_Ptr->Index_Tab[Index_Id].Tail = node_ptr;
(*Nb_Detected_Ptr)++;
@ -5612,7 +5612,7 @@ void ND_List_Link_Check( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, int *Nb_D
if( Root_Ptr->Index_Tab[Index_Id].Node_Number != left2right_node_number)
{
LG_LOG_WARNING_2( "\t- number of node has been corrected on structure: (%p:%d)", Root_Ptr, Index_Id);
LG_LOG_WARNING( "\t- number of node has been corrected on structure: (%p:%d)", Root_Ptr, Index_Id);
Root_Ptr->Index_Tab[Index_Id].Node_Number = left2right_node_number;
(*Nb_Detected_Ptr)++;
@ -5632,7 +5632,7 @@ void ND_List_Link_Check( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, int *Nb_D
{
if( node_ptr->Left && ( node_ptr->Left->Right != node_ptr))
{
LG_LOG_WARNING_3( "\t- link 'Right' has been corrected on node: (%p) of list: (%p:%d)", node_ptr->Left, Root_Ptr, Index_Id);
LG_LOG_WARNING( "\t- link 'Right' has been corrected on node: (%p) of list: (%p:%d)", node_ptr->Left, Root_Ptr, Index_Id);
node_ptr->Left->Right = node_ptr;
(*Nb_Detected_Ptr)++;
@ -5641,7 +5641,7 @@ void ND_List_Link_Check( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, int *Nb_D
if( !node_ptr->Left && ( node_ptr != Root_Ptr->Index_Tab[Index_Id].Head))
{
LG_LOG_WARNING_2( "\t- link 'Head' has been corrected on the structure root: (%p:%d)", Root_Ptr, Index_Id);
LG_LOG_WARNING( "\t- link 'Head' has been corrected on the structure root: (%p:%d)", Root_Ptr, Index_Id);
Root_Ptr->Index_Tab[Index_Id].Head = node_ptr;
(*Nb_Detected_Ptr)++;
@ -5653,7 +5653,7 @@ void ND_List_Link_Check( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, int *Nb_D
if( Root_Ptr->Index_Tab[Index_Id].Node_Number != right2left_node_number)
{
LG_LOG_WARNING_2( "\t- number of node has been corrected on structure: (%p:%d)", Root_Ptr, Index_Id);
LG_LOG_WARNING( "\t- number of node has been corrected on structure: (%p:%d)", Root_Ptr, Index_Id);
Root_Ptr->Index_Tab[Index_Id].Node_Number = right2left_node_number;
(*Nb_Detected_Ptr)++;
@ -5685,7 +5685,7 @@ void ND_Value_Check( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, int *Nb_Dete
if( !node_ptr->Value)
{
LG_LOG_WARNING_3( "\t- node: (%p) has been removed from structure (%p:%d) because no value is attached to it", node_ptr, Root_Ptr, Index_Id);
LG_LOG_WARNING( "\t- node: (%p) has been removed from structure (%p:%d) because no value is attached to it", node_ptr, Root_Ptr, Index_Id);
ND_Index_Node_Remove_I( node_ptr);
@ -5696,7 +5696,7 @@ void ND_Value_Check( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, int *Nb_Dete
}
else if( ND_Address_Check( node_ptr->Value) != NDS_OK)
{
LG_LOG_WARNING_3( "\t- node %p has been removed from structure %p:%d because its value cannot be accessed", node_ptr, Root_Ptr, Index_Id);
LG_LOG_WARNING( "\t- node %p has been removed from structure %p:%d because its value cannot be accessed", node_ptr, Root_Ptr, Index_Id);
ND_Index_Node_Remove_I( node_ptr);
@ -5751,7 +5751,7 @@ void ND_Tree_Link_Check( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, int *Nb_
{
Root_Ptr->Index_Tab[Index_Id].Head->Root = Root_Ptr;
LG_LOG_WARNING_3( "\t- link 'Root' has been corrected on node: (%p) of structure: (%p:%d)", Root_Ptr->Index_Tab[Index_Id].Head, Root_Ptr, Index_Id);
LG_LOG_WARNING( "\t- link 'Root' has been corrected on node: (%p) of structure: (%p:%d)", Root_Ptr->Index_Tab[Index_Id].Head, Root_Ptr, Index_Id);
(*Nb_Detected_Ptr)++;
(*Nb_Corrected_Ptr)++;
@ -5776,7 +5776,7 @@ void ND_Tree_Link_Check( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, int *Nb_
{
ND_Index_Node_Add_I( Root_Ptr, Index_Id, Root_Ptr->Index_Tab[Index_Id].Save);
LG_LOG_WARNING_3( "\t- saved node: (%p) has been restored to structure: (%p:%d)", Root_Ptr->Index_Tab[Index_Id].Save, Root_Ptr, Index_Id);
LG_LOG_WARNING( "\t- saved node: (%p) has been restored to structure: (%p:%d)", Root_Ptr->Index_Tab[Index_Id].Save, Root_Ptr, Index_Id);
(*Nb_Detected_Ptr)++;
(*Nb_Corrected_Ptr)++;
@ -5798,7 +5798,7 @@ void ND_Tree_Link_Recursive_Check( NDT_Node *Node_Ptr, int *Nb_Detected_Ptr,
{
Node_Ptr->Left->Root = Node_Ptr->Root;
LG_LOG_WARNING_3( "\t- link 'Root' has been corrected on node: (%p) of structure: (%p:%d)", Node_Ptr->Left, Node_Ptr->Root, Node_Ptr->Index);
LG_LOG_WARNING( "\t- link 'Root' has been corrected on node: (%p) of structure: (%p:%d)", Node_Ptr->Left, Node_Ptr->Root, Node_Ptr->Index);
(*Nb_Detected_Ptr)++;
(*Nb_Corrected_Ptr)++;
@ -5808,7 +5808,7 @@ void ND_Tree_Link_Recursive_Check( NDT_Node *Node_Ptr, int *Nb_Detected_Ptr,
{
Node_Ptr->Left->Parent = Node_Ptr;
LG_LOG_WARNING_3( "\t- link 'Parent' has been corrected on node: (%p) of structure: (%p:%d)", Node_Ptr->Left, Node_Ptr->Root, Node_Ptr->Index);
LG_LOG_WARNING( "\t- link 'Parent' has been corrected on node: (%p) of structure: (%p:%d)", Node_Ptr->Left, Node_Ptr->Root, Node_Ptr->Index);
(*Nb_Detected_Ptr)++;
(*Nb_Corrected_Ptr)++;
@ -5825,7 +5825,7 @@ void ND_Tree_Link_Recursive_Check( NDT_Node *Node_Ptr, int *Nb_Detected_Ptr,
{
Node_Ptr->Right->Root = Node_Ptr->Root;
LG_LOG_WARNING_3( "\t- link 'Root' has been corrected on node: (%p) of structure: (%p:%d)", Node_Ptr->Right, Node_Ptr->Root, Node_Ptr->Index);
LG_LOG_WARNING( "\t- link 'Root' has been corrected on node: (%p) of structure: (%p:%d)", Node_Ptr->Right, Node_Ptr->Root, Node_Ptr->Index);
(*Nb_Detected_Ptr)++;
(*Nb_Corrected_Ptr)++;
@ -5835,7 +5835,7 @@ void ND_Tree_Link_Recursive_Check( NDT_Node *Node_Ptr, int *Nb_Detected_Ptr,
{
Node_Ptr->Right->Parent = Node_Ptr;
LG_LOG_WARNING_3( "\t- link 'Parent' has been corrected on node: (%p) of structure: (%p:%d)", Node_Ptr->Right, Node_Ptr->Root, Node_Ptr->Index);
LG_LOG_WARNING( "\t- link 'Parent' has been corrected on node: (%p) of structure: (%p:%d)", Node_Ptr->Right, Node_Ptr->Root, Node_Ptr->Index);
(*Nb_Detected_Ptr)++;
(*Nb_Corrected_Ptr)++;
@ -5873,14 +5873,14 @@ NDT_Status ND_Address_Check( void *Address)
if( ( rc = sigaction( SIGBUS, &act, &oact_bus)) != 0)
{
LG_LOG_ERROR_2( "Sigaction (Add SIGBUS Hdl) rc: (%d) errno: (%d)", rc, errno);
LG_LOG_ERROR( "Sigaction (Add SIGBUS Hdl) rc: (%d) errno: (%d)", rc, errno);
return( NDS_KO);
}
if( ( rc = sigaction( SIGSEGV, &act, &oact_segv)) != 0)
{
LG_LOG_ERROR_2( "Sigaction (Add SIGSEGV Hdl) rc: (%d) errno: (%d)", rc, errno);
LG_LOG_ERROR( "Sigaction (Add SIGSEGV Hdl) rc: (%d) errno: (%d)", rc, errno);
return( NDS_KO);
}
@ -5906,14 +5906,14 @@ NDT_Status ND_Address_Check( void *Address)
if( ( rc = sigaction( SIGBUS, &oact_bus, &act)) != 0)
{
LG_LOG_ERROR_2( "Sigaction (Remove SIGBUS Hdl) rc: (%d) errno: (%d)", rc, errno);
LG_LOG_ERROR( "Sigaction (Remove SIGBUS Hdl) rc: (%d) errno: (%d)", rc, errno);
return( NDS_KO);
}
if( ( rc = sigaction( SIGSEGV, &oact_segv, &act)) != 0)
{
LG_LOG_ERROR_2( "Sigaction (Remove SIGSEGV Hdl) rc: (%d) errno: (%d)", rc, errno);
LG_LOG_ERROR( "Sigaction (Remove SIGSEGV Hdl) rc: (%d) errno: (%d)", rc, errno);
return( NDS_KO);
}
@ -5933,7 +5933,7 @@ NDT_Status ND_Address_Check( void *Address)
if( ( old_sigsegv_sighandler = signal( SIGSEGV, ND_Signal_Trap)) == SIG_ERR)
{
LG_LOG_ERROR_1( "Signal (Add SIGSEGV Hdl) errno: (%d)", errno);
LG_LOG_ERROR( "Signal (Add SIGSEGV Hdl) errno: (%d)", errno);
return( NDS_KO);
}
@ -5959,7 +5959,7 @@ NDT_Status ND_Address_Check( void *Address)
if( ( old_sigsegv_sighandler = signal( SIGSEGV, old_sigsegv_sighandler)) == SIG_ERR)
{
LG_LOG_ERROR_1( "Signal (Remove SIGSEGV Hdl) errno: (%d)", errno);
LG_LOG_ERROR( "Signal (Remove SIGSEGV Hdl) errno: (%d)", errno);
return( NDS_KO);
}

View File

@ -125,12 +125,12 @@ NDT_Base NDG_Base =
/* */
/*------------------------------------------------------------------------------*/
#define ND_LIBNODE_OPEN_CHECK() if( NDG_Base.Open_Status != NDD_TRUE) { LG_LOG_ERROR_0( "LibNode library is not opened"); return( NDS_ERRAPI); }
#define ND_NOT_NULL_CHECK( Ptr, Msg) if( !( Ptr)) { LG_LOG_ERROR_1( "%s is null", ( Msg)); return( NDS_ERRAPI); }
#define ND_LIBNODE_OPEN_CHECK() if( NDG_Base.Open_Status != NDD_TRUE) { LG_LOG_ERROR( "LibNode library is not opened"); return( NDS_ERRAPI); }
#define ND_NOT_NULL_CHECK( Ptr, Msg) if( !( Ptr)) { LG_LOG_ERROR( "%s is null", ( Msg)); return( NDS_ERRAPI); }
#define ND_HANDLER_NOT_NULL_CHECK( Function_Name, Function_Ptr) if( ( !( Function_Name)) && ( !( Function_Ptr))) { LG_LOG_ERROR_0( "Undefined function name"); return( NDS_ERRAPI); }
#define ND_HANDLER_NOT_NULL_CHECK( Function_Name, Function_Ptr) if( ( !( Function_Name)) && ( !( Function_Ptr))) { LG_LOG_ERROR( "Undefined function name"); return( NDS_ERRAPI); }
#define ND_HANDLER_SYMBOL_FIND( Function_Ptr, Handler_Name, Handler_Ptr) if( ( Handler_Ptr)) { ( Function_Ptr) = ( Handler_Ptr);} \
else { if( ND_Symbol_Find( (void **)&( Function_Ptr), ( Handler_Name)) != NDS_OK) { LG_LOG_ERROR_0( "Cant't find free handler function"); return( NDS_KO);}}
else { if( ND_Symbol_Find( (void **)&( Function_Ptr), ( Handler_Name)) != NDS_OK) { LG_LOG_ERROR( "Cant't find free handler function"); return( NDS_KO);}}

View File

@ -687,7 +687,7 @@ void Command_Get( int *choice, char **arg1, char **arg2, FILE *File_Output,
void Command_Exec_Begin_Print( FILE *File_Output, int Choice)
{
// fprintf( File_Output, "%s: %s...\n", Command_Tab[Choice].Name, Command_Tab[Choice].FullName);
LG_LOG_INFO_2( "%s: %s...", Command_Tab[Choice].Name, Command_Tab[Choice].FullName);
LG_LOG_INFO( "%s: %s...", Command_Tab[Choice].Name, Command_Tab[Choice].FullName);
// fflush( File_Output);
}
@ -704,12 +704,12 @@ void Command_Exec_End_Print( FILE *File_Output, int Choice, cpt T_Exec, int
if( nb == 1)
{
// fprintf( File_Output, "%s: Completed in (%.4f) second !\n", Command_Tab[Choice].Name, T_Exec.sec);
LG_LOG_INFO_2( "%s: Completed in (%.4f) second !", Command_Tab[Choice].Name, T_Exec.sec);
LG_LOG_INFO( "%s: Completed in (%.4f) second !", Command_Tab[Choice].Name, T_Exec.sec);
}
else
{
// fprintf( File_Output, "%s: Completed in (%.4f) second, (%.2f) per second !\n", Command_Tab[Choice].Name, T_Exec.sec, nb / T_Exec.sec);
LG_LOG_INFO_3( "%s: Completed in (%.4f) second, (%.2f) per second !", Command_Tab[Choice].Name, T_Exec.sec, nb / T_Exec.sec);
LG_LOG_INFO( "%s: Completed in (%.4f) second, (%.2f) per second !", Command_Tab[Choice].Name, T_Exec.sec, nb / T_Exec.sec);
}
}
@ -935,7 +935,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
// fprintf( File_Output, "DS_Value_Add: Adding from: (%d) to: (%d) order: (%d)...\n", low, high, order);
// fflush( File_Output);
LG_LOG_INFO_3( "DS_Value_Add: Adding from: (%d) to: (%d) order: (%d)...", low, high, order);
LG_LOG_INFO( "DS_Value_Add: Adding from: (%d) to: (%d) order: (%d)...", low, high, order);
t_start( t_exec);
@ -955,7 +955,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
{
// fprintf( File_Output, "DS_Value_Add: Allocation Failled !\n");
LG_LOG_ERROR_0( "DS_Value_Add: Allocation Failled !");
LG_LOG_ERROR( "DS_Value_Add: Allocation Failled !");
break;
}
@ -976,7 +976,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
else
{
// fprintf( File_Output, "DS_Value_Add: Allocation Failled !\n");
LG_LOG_ERROR_0( "DS_Value_Add: Allocation Failled !");
LG_LOG_ERROR( "DS_Value_Add: Allocation Failled !");
break;
}
@ -1083,7 +1083,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
// fprintf( File_Output, "DS_Value_Find: from: (%d) to: (%d)...\n", low, high);
// fflush( File_Output);
LG_LOG_INFO_2( "DS_Value_Find: from: (%d) to: (%d)...", low, high);
LG_LOG_INFO( "DS_Value_Find: from: (%d) to: (%d)...", low, high);
i = low;
@ -1115,7 +1115,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
// fprintf( File_Output, "Index_List_Open: Opening a FIFO List from: (%d) to: (%d)...\n", low, high);
// fflush( File_Output);
LG_LOG_INFO_2( "Index_List_Open: Opening a FIFO List from: (%d) to: (%d)...", low, high);
LG_LOG_INFO( "Index_List_Open: Opening a FIFO List from: (%d) to: (%d)...", low, high);
t_start( t_exec);
@ -1141,7 +1141,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
// fprintf( File_Output, "Index_Tree_Open: Opening a balanced Tree from: (%d) to: (%d)...\n", low, high);
// fflush( File_Output);
LG_LOG_INFO_2( "Index_Tree_Open: Opening a balanced Tree from: (%d) to: (%d)...", low, high);
LG_LOG_INFO( "Index_Tree_Open: Opening a balanced Tree from: (%d) to: (%d)...", low, high);
t_start( t_exec);
@ -1167,7 +1167,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
// fprintf( File_Output, "Index_Close: Closing index from: (%d) to: (%d)...\n", low, high);
// fflush( File_Output);
LG_LOG_INFO_2( "Index_Close: Closing index from: (%d) to: (%d)...", low, high);
LG_LOG_INFO( "Index_Close: Closing index from: (%d) to: (%d)...", low, high);
t_start( t_exec);
@ -1234,7 +1234,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
if( index_subtype != NDD_INDEX_SUBTYPE_UNKNOWN)
{
// fprintf( File_Output, "Index_List_SubType_Set: Setting List SubType to: (%d) (%s) !\n", index_subtype, ND_INDEX_SUBTYPE_VALUE_ASCII_GET( index_subtype));
LG_LOG_INFO_2( "Index_List_SubType_Set: Setting List SubType to: (%d) (%s) !", index_subtype, ND_INDEX_SUBTYPE_VALUE_ASCII_GET( index_subtype));
LG_LOG_INFO( "Index_List_SubType_Set: Setting List SubType to: (%d) (%s) !", index_subtype, ND_INDEX_SUBTYPE_VALUE_ASCII_GET( index_subtype));
t_start( t_exec);
@ -1339,7 +1339,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
// fprintf( File_Output, "Index_Reorg: Reorganizing index (%d)...\n", i);
// fflush( File_Output);
LG_LOG_INFO_1( "Index_Reorg: Reorganizing index (%d)...", i);
LG_LOG_INFO( "Index_Reorg: Reorganizing index (%d)...", i);
ND_Index_Reorg( *DS_Ptr_Ptr, (NDT_Index_Id)i);
}
@ -1365,7 +1365,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
// fprintf( File_Output, "Index_Tree_To_List: Converting Index (%d)...\n", i);
// fflush( File_Output);
LG_LOG_INFO_1( "Index_Tree_To_List: Converting Index (%d)...", i);
LG_LOG_INFO( "Index_Tree_To_List: Converting Index (%d)...", i);
ND_Index_Convert( *DS_Ptr_Ptr, (NDT_Index_Id)i, idx_type_sorted_list);
}
@ -1391,7 +1391,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
// fprintf( File_Output, "Index_List_To_Tree: Converting Index (%d)...\n", i);
// fflush( File_Output);
LG_LOG_INFO_1( "Index_List_To_Tree: Converting Index (%d)...", i);
LG_LOG_INFO( "Index_List_To_Tree: Converting Index (%d)...", i);
ND_Index_Convert( *DS_Ptr_Ptr, (NDT_Index_Id)i, idx_type_balanced_tree);
}
@ -1413,7 +1413,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
// fprintf( File_Output, "Index_Info_Print: Printing index from: (%d) to: (%d)...\n", low, high);
// fflush( File_Output);
LG_LOG_INFO_2( "Index_Info_Print: Printing index from: (%d) to: (%d)...", low, high);
LG_LOG_INFO( "Index_Info_Print: Printing index from: (%d) to: (%d)...", low, high);
for( i = low; i <= high; i++)
{
@ -1429,7 +1429,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
// fprintf( File_Output, "DS_Value_Print:\n");
// fflush( File_Output);
LG_LOG_INFO_0( "DS_Value_Print:");
LG_LOG_INFO( "DS_Value_Print:");
ND_DataStruct_Value_Print( File_Output, *DS_Ptr_Ptr, NDD_RECURSIVE_MODE_PARENT_CHILD, 99, 0);
break;
@ -1460,7 +1460,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
// low, high);
// fflush( File_Output);
LG_LOG_INFO_3( "Index_Value_Break: Breaking: (%s) values from index: (%d) to: (%d)...",
LG_LOG_INFO( "Index_Value_Break: Breaking: (%s) values from index: (%d) to: (%d)...",
( position == 0 ) ? "Head" : ( ( position == 1) ? "Tail" : "Random"),
low, high);
@ -1501,7 +1501,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
// fprintf( File_Output, "0x(%x)", node_ptr);
// fflush( File_Output);
LG_LOG_INFO_1( "Index_Value_Break: Breaking value of node: 0x(%x)", node_ptr);
LG_LOG_INFO( "Index_Value_Break: Breaking value of node: 0x(%x)", node_ptr);
node_ptr->Value = (void *)-1;
}
@ -1537,8 +1537,8 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
// fprintf( File_Output, "Index_Check: ");
// fflush( File_Output);
LG_LOG_INFO_1( "Index_Check: Checking Index (%d)...", i);
LG_LOG_INFO_0( "Index_Check: ");
LG_LOG_INFO( "Index_Check: Checking Index (%d)...", i);
LG_LOG_INFO( "Index_Check: ");
Nb_Corrected = Nb_Detected = 0;
ND_Index_Check( *DS_Ptr_Ptr, (NDT_Index_Id)i, &Nb_Detected, &Nb_Corrected, File_Output);
@ -1571,20 +1571,20 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
if( file_input == NULL)
{
// fprintf( File_Output, "Batch_Run: Can't open file (%s)!\n", Arg1);
LG_LOG_ERROR_1( "Batch_Run: Can't open file (%s)!", Arg1);
LG_LOG_ERROR( "Batch_Run: Can't open file (%s)!", Arg1);
}
else
{
// fprintf( File_Output, "\n\n--------------------------------------------------------------------------------\n");
// fprintf( File_Output, "Batch_Run: Starting execution (%s)...\n", Arg1);
LG_LOG_INFO_0( "--------------------------------------------------------------------------------");
LG_LOG_INFO_1( "Batch_Run: Starting execution (%s)...", Arg1);
LG_LOG_INFO( "--------------------------------------------------------------------------------");
LG_LOG_INFO( "Batch_Run: Starting execution (%s)...", Arg1);
Batch_Run( DS_Ptr_Ptr, File_Output, file_input, 0);
// fprintf( File_Output, "\n");
// fprintf( File_Output, "Batch_Run: Ending execution (%s)...\n", Arg1);
LG_LOG_INFO_1( "Batch_Run: Ending execution (%s)...", Arg1);
LG_LOG_INFO( "Batch_Run: Ending execution (%s)...", Arg1);
fclose( file_input);
}
@ -1654,7 +1654,7 @@ int main( int argc, char **argv)
return( -1);
}
LG_LOG_INFO_0( "Start NDBench");
LG_LOG_INFO( "Start NDBench");
/* Init Random numbers... */
@ -1708,7 +1708,7 @@ int main( int argc, char **argv)
}
LG_LOG_INFO_0( "End NDBench");
LG_LOG_INFO( "End NDBench");
if( ( lg_status = LG_Library_Close( true)) != LGS_OK)
{