Fix printf into fprint in ND_*_Info_Print() functions.\n

This commit is contained in:
agibert 2005-01-11 16:17:44 +00:00
parent 3d91078a5c
commit 3ce278d6e5

View File

@ -1,9 +1,9 @@
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* $RCSfile: libnode.c,v $ */ /* $RCSfile: libnode.c,v $ */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* $Revision: 2.12 $ */ /* $Revision: 2.13 $ */
/* $Name: $ */ /* $Name: $ */
/* $Date: 2004/08/23 22:47:22 $ */ /* $Date: 2005/01/11 16:17:44 $ */
/* $Author: agibert $ */ /* $Author: agibert $ */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
@ -34,7 +34,7 @@
#include <libnode.h> #include <libnode.h>
#ifdef _LIBVER_SUPPORT #ifdef _LIBVER_SUPPORT
VER_INFO_EXPORT( libnode, "$Revision: 2.12 $", "$Name: $", __FILE__, "$Author: agibert $") VER_INFO_EXPORT( libnode, "$Revision: 2.13 $", "$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.12 $ $Name: $ $Date: 2004/08/23 22:47:22 $ $Author: agibert $"; *Version_Name_Ptr = "$Revision: 2.13 $ $Name: $ $Date: 2005/01/11 16:17:44 $ $Author: agibert $";
return( NDS_OK); return( NDS_OK);
} }
@ -369,7 +369,7 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
Command_Name = "NDD_CMD_MANAGER_VERSION"; Command_Name = "NDD_CMD_MANAGER_VERSION";
*Version_Name_Ptr = "$Revision: 2.12 $ $Name: $ $Date: 2004/08/23 22:47:22 $ $Author: agibert $"; *Version_Name_Ptr = "$Revision: 2.13 $ $Name: $ $Date: 2005/01/11 16:17:44 $ $Author: agibert $";
return( NDS_OK); return( NDS_OK);
} }
@ -698,7 +698,7 @@ NDT_Status ND_Library_Close_C( void)
return( NDS_KO); return( NDS_KO);
} }
if( NDG_Base.Debug_Mode == NDD_TRUE) if( ( NDG_Base.Debug_Mode == NDD_TRUE) && ( NDG_Base.Err_Stream != NULL))
{ {
if( NDG_Base.OpenStruct_Ptr->Index_Tab[NDD_INDEX_PRIMARY].Node_Number > 0) if( NDG_Base.OpenStruct_Ptr->Index_Tab[NDD_INDEX_PRIMARY].Node_Number > 0)
{ {
@ -2162,7 +2162,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: (%#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", fprintf( Out, "%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,
@ -2249,7 +2249,7 @@ NDT_Status ND_DataStruct_Info_Print_I( FILE *Out, NDT_Root *Root_Ptr, NDT_Recu
status = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_UNKNOWN, NULL, NDD_CMD_MANAGER_VERSION, &version_name); status = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_UNKNOWN, NULL, NDD_CMD_MANAGER_VERSION, &version_name);
if( ND_ERROR( status)) return( status); if( ND_ERROR( status)) return( status);
printf( "%sRoot: (%s%p)\tIndex Nb: (%d)\tIndex Open Count: (%d)\tManager: (%s%p) [%s]\n%sAllocator: (%s%p) [%s]\tDesallocator: (%s%p) [%s]\tUser: (%s%p)\n%sManager Version: [%s]\n\n", fprintf( Out, "%sRoot: (%s%p)\tIndex Nb: (%d)\tIndex Open Count: (%d)\tManager: (%s%p) [%s]\n%sAllocator: (%s%p) [%s]\tDesallocator: (%s%p) [%s]\tUser: (%s%p)\n%sManager Version: [%s]\n\n",
offset, NDD_PRINTF_PTR_PREFIX, Root_Ptr, Root_Ptr->Index_Nb, Root_Ptr->Index_Open_Count, NDD_PRINTF_PTR_PREFIX, Root_Ptr->Manager_Ptr, Root_Ptr->Manager_Name, offset, NDD_PRINTF_PTR_PREFIX, Root_Ptr, Root_Ptr->Index_Nb, Root_Ptr->Index_Open_Count, NDD_PRINTF_PTR_PREFIX, Root_Ptr->Manager_Ptr, Root_Ptr->Manager_Name,
offset, NDD_PRINTF_PTR_PREFIX, Root_Ptr->Allocator_Ptr, Root_Ptr->Allocator_Name, NDD_PRINTF_PTR_PREFIX, Root_Ptr->Desallocator_Ptr, Root_Ptr->Desallocator_Name, NDD_PRINTF_PTR_PREFIX, Root_Ptr->User, offset, NDD_PRINTF_PTR_PREFIX, Root_Ptr->Allocator_Ptr, Root_Ptr->Allocator_Name, NDD_PRINTF_PTR_PREFIX, Root_Ptr->Desallocator_Ptr, Root_Ptr->Desallocator_Name, NDD_PRINTF_PTR_PREFIX, Root_Ptr->User,
offset, version_name); offset, version_name);
@ -4855,11 +4855,11 @@ NDT_Status ND_Tree_Make( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id )
NDT_Status ND_Tree_Equalize( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id) NDT_Status ND_Tree_Equalize( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id)
{ {
NDT_Status rc; NDT_Status rc;
NDT_Index_Type type; NDT_Index_Type type;
// char manager[30]; // Win32 // char manager[30]; // Win32
void *manager; // Win32 NDT_Manager *manager; // Win32
long max_dif, nb_equ; long max_dif, nb_equ;
type = Root_Ptr->Index_Tab[Index_Id].Type; type = Root_Ptr->Index_Tab[Index_Id].Type;