Update to 2.2.0-1.
This commit is contained in:
parent
b581d36913
commit
af81f630c5
@ -1,19 +1,19 @@
|
|||||||
# %RCSfile: ReadMe.txt,v %
|
# $RCSfile: ReadMe.txt,v $
|
||||||
# %Revision: 2.8 %
|
# $Revision: 1.2 $
|
||||||
# %Name: libnode-2_1_0-1 %
|
# $Name: $
|
||||||
# %Date: 2005/01/24 01:19:50 %
|
# $Date: 2010/06/06 22:19:26 $
|
||||||
# %Author: agibert %
|
# $Author: agibert $
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Welcome to LibNode 2.1.x !
|
Welcome to LibNode 2.2.x !
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
This release of LibNode supports the following OS:
|
This release of LibNode supports the following OS:
|
||||||
- Linux 2.2.x, 2.4.x and 2.6.x (tested on RedHat & Mandrake),
|
- Linux 2.2.x, 2.4.x and 2.6.x (tested on RedHat & Mandriva),
|
||||||
- Solaris 2.6,
|
- Solaris 2.6,
|
||||||
- Windows NT4, 2000 and XP.
|
- Windows NT4, 2000 and XP.
|
||||||
|
|
||||||
@ -41,4 +41,4 @@ Enjoy it!
|
|||||||
Your LibNode Team.
|
Your LibNode Team.
|
||||||
|
|
||||||
arnaud@rx3.net
|
arnaud@rx3.net
|
||||||
http://www.rx3.org/dvp/libnode
|
http://www.rx3.org/dvp/?dvp=libnode
|
||||||
|
@ -1,13 +1,28 @@
|
|||||||
# %RCSfile: ReleaseNotes.txt,v %
|
# $RCSfile: ReleaseNotes.txt,v $
|
||||||
# %Revision: 2.20 %
|
# $Revision: 1.2 $
|
||||||
# %Name: libnode-2_1_0-1 %
|
# $Name: $
|
||||||
# %Date: 2005/01/24 00:50:55 %
|
# $Date: 2010/06/06 22:19:27 $
|
||||||
# %Author: agibert %
|
# $Author: agibert $
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
LibNode V 2.2.0-1 - A. Gibert - 06/06/10
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
All: Add support C99 va_arg for curent gcc (4.4.1),
|
||||||
|
Add -fPIC flag in .c to .o makefile rule,
|
||||||
|
LibNode: Add ND_VA_* macros to help manager varargs,
|
||||||
|
Update Managers to use ND_VA_* macros,
|
||||||
|
Improve LibShMem support by restricting OpenStruct tracking on local DataStruct (Manager_Ptr != NULL),
|
||||||
|
Add example manager template in public node.h file,
|
||||||
|
NDDemo0: Add LibNode 2.2 support: Use ND_VA_* macros in manager,
|
||||||
|
NDBench: Add LibNode 2.2 support: Use ND_VA_* macros in manager.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 2.1.0-1 - A. Gibert - 24/01/05
|
LibNode V 2.1.0-1 - A. Gibert - 24/01/05
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# %RCSfile: ToDo.txt,v %
|
# $RCSfile: ToDo.txt,v $
|
||||||
# %Revision: 2.5 %
|
# $Revision: 1.2 $
|
||||||
# %Name: libnode-2_1_0-1 %
|
# $Name: $
|
||||||
# %Date: 2005/01/24 01:19:50 %
|
# $Date: 2010/06/06 22:19:27 $
|
||||||
# %Author: agibert %
|
# $Author: agibert $
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* %RCSfile: nddemo0.c,v % */
|
/* $RCSfile: nddemo0.c,v $ */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* %Revision: 2.8 % */
|
/* $Revision: 1.2 $ */
|
||||||
/* %Name: libnode-2_1_0-1 % */
|
/* $Name: $ */
|
||||||
/* %Date: 2004/08/23 22:48:37 % */
|
/* $Date: 2010/06/06 22:20:16 $ */
|
||||||
/* %Author: agibert % */
|
/* $Author: agibert $ */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
@ -64,7 +64,7 @@ typedef struct Demo_Value
|
|||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status Demo_DS_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
NDT_Status Demo_DS_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list *);
|
||||||
void DataStruct_Load( NDT_Root *, FILE *);
|
void DataStruct_Load( NDT_Root *, FILE *);
|
||||||
void DataStruct_Load( NDT_Root *, FILE *);
|
void DataStruct_Load( NDT_Root *, FILE *);
|
||||||
void Demo( char *, short);
|
void Demo( char *, short);
|
||||||
@ -80,7 +80,7 @@ int main( int, char **);
|
|||||||
/* */
|
/* */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list Args)
|
NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Command_Name Command_Name;
|
NDT_Command_Name Command_Name;
|
||||||
|
|
||||||
@ -89,12 +89,12 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
{
|
{
|
||||||
case NDD_CMD_MANAGER_VERSION:
|
case NDD_CMD_MANAGER_VERSION:
|
||||||
{
|
{
|
||||||
NDT_Version_Name *Version_Name_Ptr = (NDT_Version_Name *)va_arg( Args, NDT_Version_Name *);
|
ND_VA_ARG_GET( Version_Name_Ptr, *Args_Ptr, NDT_Version_Name *);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
||||||
|
|
||||||
*Version_Name_Ptr = "%Revision: 2.8 % %Name: libnode-2_1_0-1 % %Date: 2004/08/23 22:48:37 % %Author: agibert %";
|
*Version_Name_Ptr = "$Revision: 1.2 $ $Name: $ $Date: 2010/06/06 22:20:16 $ $Author: agibert $";
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
@ -102,15 +102,15 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_INDEX_GET:
|
case NDD_CMD_INDEX_GET:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
|
ND_VA_ARG_GET( Reply_Index_Id_Ptr, *Args_Ptr, NDT_Index_Id *);
|
||||||
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
|
ND_VA_ARG_GET( Reply_Command_Ptr, *Args_Ptr, NDT_Command *);
|
||||||
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
|
ND_VA_ARG_GET( Cmd, *Args_Ptr, NDT_Command);
|
||||||
void *Value_ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
*/
|
*/
|
||||||
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
|
ND_VA_ARG_GET( Reply_Index_Id_Ptr, *Args_Ptr, NDT_Index_Id *);
|
||||||
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
|
ND_VA_ARG_GET( Reply_Command_Ptr, *Args_Ptr, NDT_Command *);
|
||||||
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
|
ND_VA_ARG_GET( Cmd, *Args_Ptr, NDT_Command);
|
||||||
Demo_Value *Value_ptr = (Demo_Value *)va_arg( Args, Demo_Value *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, Demo_Value *);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_INDEX_GET";
|
Command_Name = "NDD_CMD_INDEX_GET";
|
||||||
@ -159,12 +159,15 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_VALUE_ALLOC:
|
case NDD_CMD_VALUE_ALLOC:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void **Value_Ptr_Ptr = (void **)va_arg( Args, void **);
|
ND_VA_ARG_GET( Value_Ptr_Ptr, *Args_Ptr, void **);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
Demo_Value **Value_Ptr_Ptr = va_arg( Args, Demo_Value **);
|
ND_VA_ARG_GET( Value_Ptr_Ptr, *Args_Ptr, Demo_Value **);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_VALUE_ALLOC";
|
Command_Name = "NDD_CMD_VALUE_ALLOC";
|
||||||
@ -187,12 +190,15 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_VALUE_FREE:
|
case NDD_CMD_VALUE_FREE:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
Demo_Value *Value_Ptr = (Demo_Value *)va_arg( Args, Demo_Value *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, Demo_Value *);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_VALUE_FREE";
|
Command_Name = "NDD_CMD_VALUE_FREE";
|
||||||
@ -205,14 +211,17 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_VALUE_COMP:
|
case NDD_CMD_VALUE_COMP:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value1_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value1_Ptr, *Args_Ptr, void *);
|
||||||
void *Value2_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value2_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
Demo_Value *Value1_Ptr = va_arg( Args, Demo_Value *);
|
ND_VA_ARG_GET( Value1_Ptr, *Args_Ptr, Demo_Value *);
|
||||||
Demo_Value *Value2_Ptr = va_arg( Args, Demo_Value *);
|
ND_VA_ARG_GET( Value2_Ptr, *Args_Ptr, Demo_Value *);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_VALUE_COMP";
|
Command_Name = "NDD_CMD_VALUE_COMP";
|
||||||
@ -302,12 +311,17 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_VALUE_ADD:
|
case NDD_CMD_VALUE_ADD:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_VALUE_ADD";
|
Command_Name = "NDD_CMD_VALUE_ADD";
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
@ -316,36 +330,54 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_VALUE_REMOVE:
|
case NDD_CMD_VALUE_REMOVE:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_VALUE_REMOVE";
|
Command_Name = "NDD_CMD_VALUE_REMOVE";
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
case NDD_CMD_VALUE_PRINT:
|
case NDD_CMD_VALUE_PRINT:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
|
||||||
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
|
||||||
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
|
||||||
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
|
||||||
va_list user_args = (va_list)va_arg( lib_args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
|
||||||
void *Value_Ptr = Node_Ptr->Value;
|
ND_VA_LIST_OPEN( lib_args, *Args_Ptr);
|
||||||
|
|
||||||
|
ND_VA_ARG_GET( Out, lib_args, FILE *);
|
||||||
|
ND_VA_ARG_GET( Recursive_Mode, lib_args, NDT_Recursive_Mode);
|
||||||
|
ND_VA_ARG_GET( Recursive_Depth, lib_args, NDT_Recursive_Depth);
|
||||||
|
ND_VA_ARG_GET( Recursive_Offset, lib_args, NDT_Recursive_Offset);
|
||||||
|
|
||||||
|
ND_VA_LIST_OPEN( user_args, lib_args);
|
||||||
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
|
ND_VA_LIST_CLOSE( lib_args);
|
||||||
*/
|
*/
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
|
||||||
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
ND_VA_LIST_OPEN( lib_args, *Args_Ptr);
|
||||||
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
|
||||||
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
ND_VA_ARG_GET( Out, lib_args, FILE *);
|
||||||
|
ND_VA_ARG_GET( Recursive_Mode, lib_args, NDT_Recursive_Mode);
|
||||||
|
ND_VA_ARG_GET( Recursive_Depth, lib_args, NDT_Recursive_Depth);
|
||||||
|
ND_VA_ARG_GET( Recursive_Offset, lib_args, NDT_Recursive_Offset);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( lib_args);
|
||||||
|
|
||||||
|
|
||||||
Demo_Value *Value_Ptr = Node_Ptr->Value;
|
Demo_Value *Value_Ptr = Node_Ptr->Value;
|
||||||
|
|
||||||
@ -361,18 +393,25 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_INFO_PRINT:
|
case NDD_CMD_INFO_PRINT:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
|
||||||
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
|
||||||
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
|
||||||
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
|
||||||
va_list user_args = (va_list)va_arg( lib_args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
|
||||||
void *Value_Ptr = Node_Ptr->Value;
|
ND_VA_LIST_OPEN( lib_args, *Args_Ptr);
|
||||||
|
|
||||||
|
ND_VA_ARG_GET( Out, lib_args, FILE *);
|
||||||
|
ND_VA_ARG_GET( Recursive_Mode, lib_args, NDT_Recursive_Mode);
|
||||||
|
ND_VA_ARG_GET( Recursive_Depth, lib_args, NDT_Recursive_Depth);
|
||||||
|
ND_VA_ARG_GET( Recursive_Offset, lib_args, NDT_Recursive_Offset);
|
||||||
|
|
||||||
|
ND_VA_LIST_OPEN( user_args, lib_args);
|
||||||
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
|
ND_VA_LIST_CLOSE( lib_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_INFO_PRINT";
|
Command_Name = "NDD_CMD_INFO_PRINT";
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
@ -409,7 +448,7 @@ void DataStruct_Load( NDT_Root *ds_ptr, FILE *demo_file)
|
|||||||
while( !feof( demo_file))
|
while( !feof( demo_file))
|
||||||
{
|
{
|
||||||
str = fgets( input_string, STRING_SIZE, demo_file);
|
str = fgets( input_string, STRING_SIZE, demo_file);
|
||||||
if( ( (const int)str != EOF) && ( str != NULL))
|
if( str != NULL)
|
||||||
{
|
{
|
||||||
if( strlen( input_string) >= STRING_LEN)
|
if( strlen( input_string) >= STRING_LEN)
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# %RCSfile: nddemo0.dat,v %
|
# $RCSfile: nddemo0.dat,v $
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# %Revision: 2.1 %
|
# $Revision: 1.2 $
|
||||||
# %Name: libnode-2_1_0-1 %
|
# $Name: $
|
||||||
# %Date: 2003/07/16 00:17:02 %
|
# $Date: 2010/06/06 22:20:17 $
|
||||||
# %Author: agibert %
|
# $Author: agibert $
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ggg 1 xxxxxx example
|
ggg 1 xxxxxx example
|
||||||
aaa 7 x this
|
aaa 7 x this
|
||||||
|
BIN
src/libnode/doc/libnode.doc
Normal file
BIN
src/libnode/doc/libnode.doc
Normal file
Binary file not shown.
947
src/libnode/doc/man3/libnode.3
Normal file
947
src/libnode/doc/man3/libnode.3
Normal file
@ -0,0 +1,947 @@
|
|||||||
|
'\" t
|
||||||
|
.\" @(#)LIBNODE.3 1.0 99/10/12 SMA;
|
||||||
|
.TH LIBNODE 3 "10 Oct 1999"
|
||||||
|
.SH NOM
|
||||||
|
LIBNODE (librairie de structure de donnees a base de noeuds)
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.LP
|
||||||
|
.B cc [flag ...] file ... -lver -ldl -lnode [library ...]
|
||||||
|
.LP
|
||||||
|
.B #include <node.h>
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Library_Open ( int " Debug_Mode " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Library_Close ( void );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Library_Stderr_Set ( FILE * " Out " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_DataStruct_Open ( NDT_Root ** " Root ", NDT_DataStruct_Type " Type ", const char * " Allocator ", const char * " Desallocator ", void * " User " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_DataStruct_Close ( NDT_Root * " Root " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_DataStruct_Reorg ( NDT_Root * " Root " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_DataStruct_Traverse ( NDT_Root * " Root ", NDT_Command, void * " Command ", void * " Data " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_DataStruct_Convert ( NDT_Root * " Root ", ND_Conversion_Type " Target_Type " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_DataStruct_Info_Print ( NDT_Root * " Root ", FILE * " Out " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_DataStruct_Print ( NDT_Root * " Root ", FILE * " Out " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_DataStruct_Check ( NDT_Root * " Root ", int * " Nb_Detected ", int * " Nb_Corrected " ,FILE * " Out " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_DataStruct_Dump ( NDT_Root * " Root ", FILE * " Out " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Node_Root_Get ( NDT_Root ** " Root ", NDT_Node * " Node " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Node_First_Get ( NDT_Root * " Root ", NDT_Node ** " Node " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Node_Last_Get ( NDT_Root * " Root ", NDT_Node ** " Node " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Node_Next_Get ( NDT_Node * " Node ", NDT_Node ** " Next_Node " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Node_Previous_Get ( NDT_Node * " Node ", NDT_Node ** " Prev_Node " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Node_Add ( NDT_Root * " Root ", NDT_Node * " Node " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Node_Remove ( NDT_Node * " Node " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Node_Find ( NDT_Root * " Root ", NDT_Node ** " Node ",void * " Value " , void * " Data " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Value_Alloc ( NDT_Root * " Root ", void ** " Value ", ... );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Value_Add ( NDT_Root * " Root ", void * " Value " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Value_Remove ( NDT_Root * " Root ", void * " Reference_Value " , void ** " Removed_Value " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Value_Free ( NDT_Root * " Root ", void * " Value " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Manager_Exec (const char * " Function_Name ", ...)"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Allocator_Exec (const char * " Function_Name ", void ** " Ptr ", size_t " Size ", void * " Data " );"
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Desallocator_Exec (const char * " Function_Name ", void * " Ptr ", void * " Data " );"
|
||||||
|
.LP
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.LP
|
||||||
|
La bibliotheque LIBNODE implemente deux types de structure de donnees a base de noeuds :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
- liste chainee
|
||||||
|
.LP
|
||||||
|
- arbre binaire
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
Une structure de donnees est composee d'une racine ( voir le type
|
||||||
|
.B NDT_Root
|
||||||
|
) et de zero, un ou plusieurs noeuds (voir le type
|
||||||
|
.B NDT_Node
|
||||||
|
).
|
||||||
|
.LP
|
||||||
|
Fondamentalement, seul le chainage entre les noeuds distingue les differents types de structure implementes dans cette librairie.
|
||||||
|
.LP
|
||||||
|
La librairie LIBNODE implemente les fonctions minimales pour ce type de structure.
|
||||||
|
Elle pourra bien entendu etre enrichie suite aux remarques des utilisateurs.
|
||||||
|
.LP
|
||||||
|
.SH TYPES
|
||||||
|
.LP
|
||||||
|
La librairie LIBNODE definit les types suivants :
|
||||||
|
.LP
|
||||||
|
.BI NDT_Root
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Designe le type d'une racine de structure de donnees
|
||||||
|
.LP
|
||||||
|
Il s'agit d'une structure qui contient toutes les informations statistiques de la structure de donnees sous-jacente :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
- nombre de noeuds (
|
||||||
|
.B ND_Node_Number
|
||||||
|
)
|
||||||
|
.LP
|
||||||
|
- profondeur minimum (
|
||||||
|
.B Min_Depth
|
||||||
|
) (pour les arbres)
|
||||||
|
.LP
|
||||||
|
- profondeur maximum (
|
||||||
|
.B Max_Depth
|
||||||
|
) (pour les arbres)
|
||||||
|
.LP
|
||||||
|
- nombre de reequilibrages (
|
||||||
|
.B Nb_Equ
|
||||||
|
) (pour les arbres)
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
La structure racine pointe sur les noeuds de tete (
|
||||||
|
.B Head
|
||||||
|
) et de queue (
|
||||||
|
.B Queue
|
||||||
|
) de la structure de donnees.
|
||||||
|
Pour une liste chainee, le noeud de tete est le premier noeud de la liste et le noeud de queue est le dernier noeud de la liste.
|
||||||
|
Pour un arbre binaire, le noeud de tete et le noeud de queue correpondent tous deux au meme noeud racine de l'arbre.
|
||||||
|
.LP
|
||||||
|
La gestion des arbres binaires prend en compte un reequilibrage automatique.
|
||||||
|
La structure racine conserve pour cela la taille de la plus grande branche de l'arbre (
|
||||||
|
.B Max_Depth
|
||||||
|
) ainsi que celle de la plus courte (
|
||||||
|
.B Min_Depth
|
||||||
|
).
|
||||||
|
Pour un arbre auto-equilibre, le depassement d'un seuil (
|
||||||
|
.B Max_Dif
|
||||||
|
) provoque immediatement son reequilibrage.
|
||||||
|
.LP
|
||||||
|
La racine d'une structure reference enfin les fonctions suivantes par leur nom :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
-
|
||||||
|
.B Manager
|
||||||
|
: fonction qui implemente les commandes specifiques a realiser sur les valeurs, notamment :
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
- la creation d'une valeur
|
||||||
|
.LP
|
||||||
|
- la suppression d'une valeur
|
||||||
|
.LP
|
||||||
|
- l'affichage d'une valeur
|
||||||
|
.LP
|
||||||
|
- la comparaison de deux valeurs
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B Allocator
|
||||||
|
: fonction qui realise l'allocation de memoire pour la structure
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B Desallocator
|
||||||
|
: fonction qui realise la desallocation de memoire pour la structure
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.I NB
|
||||||
|
: une racine contient un pointeur librement utilisable par l'utilisateur (
|
||||||
|
.B User
|
||||||
|
).
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.B NDT_DataStruct_Type
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Ce type definit sur un entier long le type de chainage de la structure de donnees :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
-
|
||||||
|
.B NDD_DS_LIST
|
||||||
|
: liste chainee
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDD_DS_TREE
|
||||||
|
: arbre binaire
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
et son mode de gestion :
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDD_MN_FIFO
|
||||||
|
(ou
|
||||||
|
.B NDD_MN_LILO
|
||||||
|
) : principe de la file d'attente (First In First Out)
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDD_MN_FILO
|
||||||
|
(ou
|
||||||
|
.B NDD_MN_LIFO
|
||||||
|
) : principe de la pile (First In Last Out)
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDD_MN_ORDERED
|
||||||
|
: ordonnancement des valeurs (liste triee).
|
||||||
|
Losque deux noeuds ont la meme valeur, ils seront ordonnes dans l'ordre chronologique d'insertion.
|
||||||
|
.LP
|
||||||
|
Toutefois, l'utilisateur pourra combiner par addition binaire les types
|
||||||
|
.B NDD_MN_ORDERED
|
||||||
|
et
|
||||||
|
.B NDD_MN_FILO
|
||||||
|
afin que deux noeuds de meme valeur soient ordonnes dans l'ordre inverse.
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDD_MN_AUTO_EQU
|
||||||
|
: auto-equilibre (arbre)
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
Les valeurs NDD_DS* et NDD_MN* peuvent etre utilisees de maniere combinee par addition binaire.
|
||||||
|
.LP
|
||||||
|
.I Exemple
|
||||||
|
:
|
||||||
|
.LP
|
||||||
|
Mon_Type =
|
||||||
|
.B NDD_DS_LIST
|
||||||
|
|
|
||||||
|
.B NDD_MN_ORDERED
|
||||||
|
;
|
||||||
|
.LP
|
||||||
|
Mon_Type =
|
||||||
|
.B NDD_DS_TREE
|
||||||
|
|
|
||||||
|
.B NDD_MN_AUTO_EQU
|
||||||
|
;
|
||||||
|
.LP
|
||||||
|
Des valeurs "masque" permettent de ne recuperer que l'une des deux parties du type :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
-
|
||||||
|
.B NDD_DS_MSK
|
||||||
|
: masque sur le type de chainage
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDD_MN_MSK
|
||||||
|
: masque sur le mode de gestion
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.I Exemple
|
||||||
|
:
|
||||||
|
.LP
|
||||||
|
(Mon_Type &
|
||||||
|
.B NDD_DS_MSK
|
||||||
|
) renverra la valeur
|
||||||
|
.B NDD_DS_LIST
|
||||||
|
ou
|
||||||
|
.B NDD_DS_TREE
|
||||||
|
.
|
||||||
|
.LP
|
||||||
|
(Mon_Type &
|
||||||
|
.B NDD_MN_MSK
|
||||||
|
) renverra l'une des valeurs
|
||||||
|
.B NDD_MN_FILO
|
||||||
|
,
|
||||||
|
.B NDD_MN_FIFO
|
||||||
|
,
|
||||||
|
.B NDD_MN_ORDERED
|
||||||
|
ou
|
||||||
|
.B NDD_MN_AUTO_EQU
|
||||||
|
.
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI NDT_Node
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Designe le type d'un noeud
|
||||||
|
.LP
|
||||||
|
Il s'agit d'une structure qui permet aux noeuds d'etre relies les uns aux autres :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
- pointeur sur le noeud droite (
|
||||||
|
.B Right
|
||||||
|
)
|
||||||
|
.LP
|
||||||
|
- pointeur sur le noeud gauche (
|
||||||
|
.B Left
|
||||||
|
)
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
Pour une structure de type arbre, chaque noeud pointe aussi sur son noeud pere (
|
||||||
|
.B Parent
|
||||||
|
).
|
||||||
|
Chaque noeud possede enfin un pointeur sur sa structure racine (
|
||||||
|
.B Root
|
||||||
|
).
|
||||||
|
.LP
|
||||||
|
A chaque noeud sera associee une valeur dont l'utilisateur de la librairie devra lui meme definir le type.
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.BI NDT_Value
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Designe le type d'une valeur attachee a un noeud. Ce type sera surcharge par celui defini par l'utilisateur.
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI NDT_Manager
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Designe le type d'une fonction manager.
|
||||||
|
.LP
|
||||||
|
Une fonction manager est attachee a la racine de la structure via son nom et permet d'executer des commandes (voir
|
||||||
|
.B NDT_Command
|
||||||
|
) specifiques sur la structure ou sur ses valeurs.
|
||||||
|
.LP
|
||||||
|
L'implementation des ces commandes est a definir par l'utilisateur lui-meme.
|
||||||
|
.LP
|
||||||
|
Le premier argument d'une fonction manager correspond toujours au type de la commande a executer.
|
||||||
|
.LP
|
||||||
|
Les autres arguments dependent bien evidemment de la commande a executer.
|
||||||
|
.LP
|
||||||
|
Une fonction manager doit etre executee via la fonction
|
||||||
|
.B NDT_Manager_Exec
|
||||||
|
(voir FONCTIONS).
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI NDT_Command
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Designe le type d'une commande pouvant etre executee par le manager :
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDD_CMD_COMP_VALUE
|
||||||
|
: comparaison de valeurs
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDD_CMD_MAKE_VALUE
|
||||||
|
: creation de valeur
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDD_CMD_PRINT_VALUE
|
||||||
|
: affichage de valeur
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDD_CMD_DELETE_VALUE
|
||||||
|
: suppression de valeur
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDD_CMD_PRINT_INFO
|
||||||
|
: affichage des informations de la racine
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.I NB
|
||||||
|
Toutes ces commandes ne doivent pas necessairement etre implementees par l'utilisateur. A priori, seule la commande permettant de detruire une valeur est obligatoire.
|
||||||
|
De nouvelles commandes pourront aussi etre definies par l'utilisateur, sous reserve qu'elles soient implementee par la fonction manager.
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.BI NDT_Allocator
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Designe le type d'une fonction d'allocation memoire.
|
||||||
|
.LP
|
||||||
|
Une fonction d'allocation est attachee a la racine de la structure par son nom et permet de d'allouer de la memoire pour le stockage de la structure (racine et noeuds).
|
||||||
|
.LP
|
||||||
|
Par defaut, une structure de donnees definira la fonction malloc() comme fonction d'allocation.
|
||||||
|
.LP
|
||||||
|
.I NB
|
||||||
|
: une fonction d'allocation devra etre executee via la fonction
|
||||||
|
.B NDT_Allocator_Exec
|
||||||
|
(voir FONCTIONS).
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI NDT_Desallocator
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Designe le type d'une fonction de desallocation memoire.
|
||||||
|
.LP
|
||||||
|
Une fonction de desallocation est attachee a la racine de la structure par son nom et permet de liberer la memoire allouee pour le stockage de la structure.
|
||||||
|
.LP
|
||||||
|
Par defaut, une structure de donnees definira la fonction free() comme fonction de desallocation.
|
||||||
|
.LP
|
||||||
|
.I NB
|
||||||
|
: une fonction de desallocation devra etre executee via la fonction
|
||||||
|
.B NDT_Desallocator_Exec
|
||||||
|
(voir FONCTIONS).
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.SH FONCTIONS
|
||||||
|
.BI "ND_Library_Open ( int " Debug_Mode " )"
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
Cette fonction permet d'initialiser les eventuelles ressources de la librairie.
|
||||||
|
Elle doit etre systematiquement appelee au debut de chaque programme utilisant la librairie.
|
||||||
|
.LP
|
||||||
|
L'argument
|
||||||
|
.I Debug_Mode
|
||||||
|
(TRUE ou FALSE) permet d'utiliser la librairie en mode bavard ou non, ce qui sigifie que tous les messages d'erreur seront affiches par defaut sur la sortie standard.
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "ND_Library_Close ( void )"
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
Cette fonction permet de fermer les eventuelles ressources de la librairie.
|
||||||
|
Elle doit etre systematiquement appelee a la fin de chaque programme utilisant la librairie.
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Library_Stderr_Set ( FILE * " Out " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet de definir
|
||||||
|
.I Out
|
||||||
|
comme la sortie standard des messages d'erreur de la librarie.
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_DataStruct_Open ( NDT_Root ** " Root ", NDT_DataStruct_Type " Type ", const char * " Allocator ", const char * " Desallocator ", void * " User " , int " Own_Value " );"
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
Cette fonction permet de creer une structure de donnees.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (Out)
|
||||||
|
.I Root
|
||||||
|
: l'adresse du pointeur sur la racine de la nouvelle structure de donnees
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Type
|
||||||
|
: le type de la nouvelle structure de donnees
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Allocator
|
||||||
|
: le nom de la fonction d'allocation memoire (fonction de type
|
||||||
|
.B NDT_Allocator
|
||||||
|
) associee a la nouvelle structure de donnees.
|
||||||
|
Si cet argument est positionne a NULL, alors la fonction d'allocation locale malloc() sera utilisee par defaut.
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Desallocator
|
||||||
|
: le nom de la fonction de desallocation memoire (fonction de type
|
||||||
|
.B NDT_Desallocator
|
||||||
|
) associee a la nouvelle structure de donnees.
|
||||||
|
Si cet argument est positionne a NULL, alors la fonction de desallocation locale free() sera utilisee par defaut.
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I User
|
||||||
|
: un pointeur de donnees qui sera systematiquement passe au manager pour l'allocation et la desallocation.
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Own_Value
|
||||||
|
: valeur TRUE ou FALSE indiquant si la structure est proprietaire de ses valeurs.
|
||||||
|
.LP
|
||||||
|
.I NB
|
||||||
|
: si une structure est proprietaire de ses valeurs, alors sa destruction provoque aussi la desallocation des valeurs rattachees a ses noeuds
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_DataStruct_Close ( NDT_Root * " Root " );"
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
Cette fonction permet de detruire une structure de donnees (desallocation des ressources).
|
||||||
|
.LP
|
||||||
|
L'argument
|
||||||
|
.I Root
|
||||||
|
est un pointeur sur la racine de la structure de donnees a detruire.
|
||||||
|
.LP
|
||||||
|
.I NB
|
||||||
|
: les valeurs de la structure seront desallouees en meme temps que leur noeud selon que la structure est proprietaire ou non de ses valeurs.
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_DataStruct_Reorg ( NDT_Root * " Root " );"
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
Cette fonction permet de reorganiser les donnees d'une structure (tri pour une liste, reequilibrage pour un arbre).
|
||||||
|
.LP
|
||||||
|
L'argument
|
||||||
|
.I Root
|
||||||
|
est un pointeur sur la racine de la structure de donnees a reorganiser.
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_DataStruct_Traverse ( NDT_Root * " Root ", NDT_Command, void * " Command ", void * " Data " );"
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
Cette fonction permet de parcourir tous les noeuds d'une structure de donnees avec execution d'une commande sur chacun d'eux.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure de donnees a parcourir.
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Command
|
||||||
|
: la commande a executer sur chaque noeud traverse
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Data
|
||||||
|
: un pointeur de donnees propre a la commande
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_DataStruct_Convert ( NDT_Root * " Root ", ND_Conversion_Type " Target_Type " );"
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
Cette fonction permet de convertir une structure de donnees d'un type en un autre.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure de donnees a convertir.
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Target_Type
|
||||||
|
: le type cible de la structure
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_DataStruct_Print ( NDT_Root * " Root ", FILE * " Out " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet d'afficher toutes les valeurs des noeuds d'une structure de donnees.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure de donnees a afficher.
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Out
|
||||||
|
: un pointeur sur le flux de sortie
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_DataStruct_Info_Print ( NDT_Root * " Root ", FILE * " Out " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet d'afficher des informations concernant une structure de donnees.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure de donnees
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Out
|
||||||
|
: un pointeur sur le flux de sortie
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_DataStruct_Check ( NDT_Root * " Root ", int * " Nb_Detected ", int * " Nb_Corrected " ,FILE * " Out " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet de verifier et de corriger des incoherences contenues dans une structure de donnees.
|
||||||
|
Elle verifie notamment les liens entre les noeuds, supprime les noeuds sans valeur ou ceux dont les valeurs ne sont pas accessibles et met a jour les informations statistiques de la racine.
|
||||||
|
Un rapport de toutes les erreurs detectees ou corrigees est affiche.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure de donnees a verifier.
|
||||||
|
.LP
|
||||||
|
* (Out)
|
||||||
|
.I Nb_Detected
|
||||||
|
: un pointeur sur le nombre d'erreurs detectees
|
||||||
|
.LP
|
||||||
|
* (Out)
|
||||||
|
.I Nb_Corrected
|
||||||
|
: un pointeur sur le nombre d'erreurs corrigees
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Out
|
||||||
|
: un pointeur sur le flux de sortie du rapport
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_DataStruct_Dump ( NDT_Root * " Root ", FILE * " Out " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet d'afficher toutes les informations de la structure (racine et contenu).
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure de donnees a afficher.
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Out
|
||||||
|
: un pointeur sur le flux de sortie
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.I NB
|
||||||
|
: cette fonction a ete implementee dans une optique de deboggage.
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Node_Root_Get ( NDT_Root ** " Root ", NDT_Node * " Node " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet de recuperer la racine d'une structure a partir d'un de ses noeuds.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (Out)
|
||||||
|
.I Root
|
||||||
|
: l'adresse d'un pointeur sur la racine a recuperer
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Node
|
||||||
|
: un pointeur sur un noeud
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Node_First_Get ( NDT_Root * " Root ", NDT_Node ** " Node " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet de recuperer le premier noeud d'une structure.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure
|
||||||
|
.LP
|
||||||
|
* (Out)
|
||||||
|
.I Node
|
||||||
|
: l'adresse d'un pointeur sur le premier noeud a recuperer
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Node_Last_Get ( NDT_Root * " Root ", NDT_Node ** " Node " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet de recuperer le dernier noeud d'une structure.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure
|
||||||
|
.LP
|
||||||
|
* (Out)
|
||||||
|
.I Node
|
||||||
|
: un pointeur sur le dernier noeud a recuperer
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Node_Next_Get ( NDT_Node * " Node ", NDT_Node ** " Next_Node " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet de recuperer le noeud qui suit immediatement un noeud particulier.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Node
|
||||||
|
: un pointeur sur le noeud de reference
|
||||||
|
.LP
|
||||||
|
* (Out)
|
||||||
|
.I Next_Node
|
||||||
|
: l'adresse d'un pointeur sur le noeud qui suit le noeud de reference
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Node_Previous_Get ( NDT_Node * " Node ", NDT_Node ** " Prev_Node " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet de recuperer le noeud qui precede immediatement un noeud particulier.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Node
|
||||||
|
: un pointeur sur le noeud de reference
|
||||||
|
.LP
|
||||||
|
* (Out)
|
||||||
|
.I Prev_Node
|
||||||
|
: l'adresse d'un pointeur sur le noeud qui precede le noeud de reference
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Node_Add ( NDT_Root * " Root ", NDT_Node * " Node " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet d'ajouter un noeud a une structure.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure de donnees
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Node
|
||||||
|
: un pointeur sur le noeud a ajouter
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Node_Remove ( NDT_Node * " Node " );"
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
Cette fonction permet de supprimer le noeud d'une structure de donnees.
|
||||||
|
.LP
|
||||||
|
L'argument
|
||||||
|
.I Node
|
||||||
|
est un pointeur sur le noeud a supprimer
|
||||||
|
.LP
|
||||||
|
.I NB
|
||||||
|
: le noeud supprime n'est pas detruit mais simplement detache de la structure
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Node_Find ( NDT_Root * " Root ", NDT_Node ** " Node ", void * " Value " , void * " Data " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet de rechercher dans une structure de donnees le premier noeud correspondant a une valeur.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure de donnees
|
||||||
|
.LP
|
||||||
|
* (Out)
|
||||||
|
.I Node
|
||||||
|
: l'adresse d'un pointeur sur le noeud resultat
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Value
|
||||||
|
: un pointeur sur la valeur a rechercher
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Data
|
||||||
|
: un pointeur de donnees qui sera passe a la fonction manager pour la recherche
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.BI "NDT_Status ND_Value_Alloc ( NDT_Root * " Root ", void ** " Value ", ... );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet d'allouer une valeur pour une structure de donnees.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure de donnees
|
||||||
|
.LP
|
||||||
|
* (Out)
|
||||||
|
.I Value
|
||||||
|
: l'adresse d'un pointeur sur la valeur a allouer
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I ...
|
||||||
|
: des arguments supplementaires pour l'allocation de la valeur
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Value_Add ( NDT_Root * " Root ", void * " Value " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet d'ajouter une valeur a une structure de donnees.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure de donnees
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Value
|
||||||
|
: un pointeur sur la valeur a ajouter
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Value_Remove ( NDT_Root * " Root ", void * " Reference_Value " , void ** " Removed_Value " );"
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
Cette fonction permet de supprimer le premier noeud correspondant a une valeur.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure de donnees
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Reference_Value
|
||||||
|
: un pointeur sur la valeur de reference
|
||||||
|
.LP
|
||||||
|
* (Out)
|
||||||
|
.I Removed_Value
|
||||||
|
: l'adresse d'un pointeur sur la valeur du noeud supprime
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.I NB
|
||||||
|
: la suppression d'un noeud implique son retrait de la structure et sa desallocation.
|
||||||
|
.LP
|
||||||
|
Si la structure contient plusieurs fois la valeur, seul le premier noeud correspondant a cette valeur est detruit.
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Value_Free ( NDT_Root * " Root ", void * " Value " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet de desallouer une valeur faisant partie d'une structure de donnees.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
* (In)
|
||||||
|
.I Root
|
||||||
|
: un pointeur sur la racine de la structure de donnees
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Value
|
||||||
|
: un pointeur sur la valeur a desallouer
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Manager_Exec (const char * " Function_Name ", ...)"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet d'executer une fonction manager a partir de son nom.
|
||||||
|
.LP
|
||||||
|
L'argument
|
||||||
|
.I Function_Name
|
||||||
|
est le nom de la fonction manager (fonction de type
|
||||||
|
.B NDT_Manager
|
||||||
|
), suivi de tous les arguments contextuels necessaires a son execution.
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Allocator_Exec (const char * " Function_Name ", void ** " Ptr ", size_t " Size ", void * " Data " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet d'executer une fonction d'allocation a partir de son nom.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Function_Name
|
||||||
|
: le nom de la fonction d'allocation (fonction de type
|
||||||
|
.B NDT_Allocator
|
||||||
|
)
|
||||||
|
.LP
|
||||||
|
* (Out)
|
||||||
|
.I Ptr
|
||||||
|
: l'adresse d'un pointeur sur la zone a allouer
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Size
|
||||||
|
: la taille a allouer
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Data
|
||||||
|
: un pointeur de donneees utile a la fonction d'allocation
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.BI "NDT_Status ND_Desallocator_Exec (const char * " Function_Name ", void * " Ptr ", void * " Data " );"
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Cette fonction permet d'executer une fonction de desallocation a partir de son nom.
|
||||||
|
.LP
|
||||||
|
Elle doit recevoir les arguments suivants :
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Function_Name
|
||||||
|
: le nom de la fonction de desallocation (fonction de type
|
||||||
|
.B NDT_Desallocator
|
||||||
|
)
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Ptr
|
||||||
|
: l'adresse de la zone memoire a desallouer
|
||||||
|
.LP
|
||||||
|
* (In)
|
||||||
|
.I Data
|
||||||
|
: un pointeur de donneees utile a la fonction de desallocation
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.SH CODES RETOUR
|
||||||
|
.LP
|
||||||
|
Toutes les fonctions constituant l'API de la librairie LIBND retournent un code de type
|
||||||
|
.B NDT_Status
|
||||||
|
:
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
-
|
||||||
|
.B NDS_OK
|
||||||
|
: la fonction s'est correctement executee et a produit un resultat
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDS_KO
|
||||||
|
: la fonction s'est correctement executee mais n'a pas produit de resultat
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDS_ERRAPI
|
||||||
|
: la fonction a ete appelee avec des arguments de valeur incorrecte
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDS_ERRMEM
|
||||||
|
: la fonction ne s'est pas correctement executee pour un probleme d'allocation memoire
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
La macro
|
||||||
|
.B ND_ERROR(rc)
|
||||||
|
permet de tester si un code retour correspond a une erreur.
|
||||||
|
.LP
|
||||||
|
En cas d'erreur, la variable ND_Error_Msg contient un message du type :
|
||||||
|
.LP
|
||||||
|
.RS 3
|
||||||
|
Error <Nom fonction> : <message d'erreur>
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
Lorsque le manager est appele avec la commande
|
||||||
|
.B NDD_CMD_COMP_VALUE
|
||||||
|
(comparaison de valeurs), l'une des trois valeurs suivantes est retournee :
|
||||||
|
.RS 3
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDS_EQUAL
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDS_LOWER
|
||||||
|
.LP
|
||||||
|
-
|
||||||
|
.B NDS_GREATER
|
||||||
|
.LP
|
||||||
|
.RS -3
|
||||||
|
.LP
|
||||||
|
.SH VOIR AUSSI
|
||||||
|
.B libdatastr
|
||||||
|
(3)
|
@ -1,19 +1,10 @@
|
|||||||
/*----------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* $Workfile: node.h $ */
|
/* $RCSfile: node.h,v $ */
|
||||||
/*----------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
/* $Revision: 1.2 $ */
|
||||||
|
/* $Name: $ */
|
||||||
|
/* $Date: 2010/06/06 22:20:17 $ */
|
||||||
/* $Author: agibert $ */
|
/* $Author: agibert $ */
|
||||||
/* $Date: 2008/11/12 02:25:23 $ */
|
|
||||||
/* $Revision: 1.1 $ */
|
|
||||||
/* $Label: $ */
|
|
||||||
/*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
|
||||||
/* %RCSfile: node.h,v % */
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
|
||||||
/* %Revision: 2.12 % */
|
|
||||||
/* %Name: libnode-2_1_0-1 % */
|
|
||||||
/* %Date: 2005/01/20 00:00:25 % */
|
|
||||||
/* %Author: agibert % */
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
@ -160,6 +151,349 @@ typedef int NDT_Index_Type;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Manager Template */
|
||||||
|
|
||||||
|
// NDT_Status ND_Example_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list *Args_Ptr)
|
||||||
|
// {
|
||||||
|
// NDT_Command_Name Command_Name;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// switch( Command)
|
||||||
|
// {
|
||||||
|
// case NDD_CMD_MANAGER_VERSION:
|
||||||
|
// {
|
||||||
|
// ND_VA_ARG_GET( Version_Name_Ptr, *Args_Ptr, NDT_Version_Name *);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Command_Name = "NDD_CMD_MANAGER_VERSION";
|
||||||
|
//
|
||||||
|
// *Version_Name_Ptr = "$Revision: 1.2 $ $Name: $ $Date: 2010/06/06 22:20:17 $ $Author: agibert $";
|
||||||
|
//
|
||||||
|
// return( NDS_OK);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// case NDD_CMD_INDEX_GET:
|
||||||
|
// {
|
||||||
|
// /*
|
||||||
|
// ND_VA_ARG_GET( Reply_Index_Id_Ptr, *Args_Ptr, NDT_Index_Id *);
|
||||||
|
// ND_VA_ARG_GET( Reply_Command_Ptr, *Args_Ptr, NDT_Command *);
|
||||||
|
// ND_VA_ARG_GET( Cmd, *Args_Ptr, NDT_Command);
|
||||||
|
// ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
|
// */
|
||||||
|
// ND_VA_ARG_GET( Reply_Index_Id_Ptr, *Args_Ptr, NDT_Index_Id *);
|
||||||
|
// ND_VA_ARG_GET( Reply_Command_Ptr, *Args_Ptr, NDT_Command *);
|
||||||
|
// ND_VA_ARG_GET( Cmd, *Args_Ptr, NDT_Command);
|
||||||
|
// ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Command_Name = "NDD_CMD_INDEX_GET";
|
||||||
|
//
|
||||||
|
// switch(Cmd)
|
||||||
|
// {
|
||||||
|
// /*
|
||||||
|
// case NDT_CMD_SOME_USER_CMD:
|
||||||
|
// {
|
||||||
|
// *Reply_Index_Id_Ptr = 0;
|
||||||
|
// *Reply_Command_Ptr = NDD_CMD_SOME_OTHER_CMD;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// ...
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
// default:
|
||||||
|
// {
|
||||||
|
// *Reply_Index_Id_Ptr = Index_Id;
|
||||||
|
// *Reply_Command_Ptr = Cmd;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return( NDS_OK);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// case NDD_CMD_VALUE_ALLOC:
|
||||||
|
// {
|
||||||
|
// /*
|
||||||
|
// ND_VA_ARG_GET( Value_Ptr_Ptr, *Args_Ptr, void **);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
|
//
|
||||||
|
// ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
// ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_CLOSE( user_args);
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Command_Name = "NDD_CMD_VALUE_ALLOC";
|
||||||
|
//
|
||||||
|
// /*
|
||||||
|
// if( ( *Value_Ptr_Ptr = (void *)malloc( sizeof(void))) == NULL)
|
||||||
|
// {
|
||||||
|
// return(NDS_ERRMEM);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// ...
|
||||||
|
//
|
||||||
|
// return( NDS_OK);
|
||||||
|
// }
|
||||||
|
// */
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// case NDD_CMD_VALUE_FREE:
|
||||||
|
// {
|
||||||
|
// /*
|
||||||
|
// ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
|
//
|
||||||
|
// ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
// ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_CLOSE( user_args);
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Command_Name = "NDD_CMD_VALUE_FREE";
|
||||||
|
//
|
||||||
|
// /*
|
||||||
|
// free( Value_Ptr);
|
||||||
|
//
|
||||||
|
// return( NDS_OK);
|
||||||
|
// */
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// case NDD_CMD_VALUE_COMP:
|
||||||
|
// {
|
||||||
|
// /*
|
||||||
|
// ND_VA_ARG_GET( Value1_Ptr, *Args_Ptr, void *);
|
||||||
|
// ND_VA_ARG_GET( Value2_Ptr, *Args_Ptr, void *);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
|
//
|
||||||
|
// ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
// ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_CLOSE( user_args);
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Command_Name = "NDD_CMD_VALUE_COMP";
|
||||||
|
//
|
||||||
|
// switch( Index_Id)
|
||||||
|
// {
|
||||||
|
// case 0:
|
||||||
|
// {
|
||||||
|
// int rc;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// rc = strcmp( Value1_Ptr->..., Value2_Ptr->...);
|
||||||
|
//
|
||||||
|
// if( rc < 0)
|
||||||
|
// {
|
||||||
|
// return(NDS_LOWER);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// if( rc > 0)
|
||||||
|
// {
|
||||||
|
// return(NDS_GREATER);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// return(NDS_EQUAL);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// case 1:
|
||||||
|
// {
|
||||||
|
// int val1 = atoi(Value1_Ptr->...);
|
||||||
|
// int val2 = atoi(Value2_Ptr->...);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// if( val1 < val2)
|
||||||
|
// {
|
||||||
|
// return(NDS_LOWER);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// if( val1 > val2)
|
||||||
|
// {
|
||||||
|
// return(NDS_GREATER);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// return(NDS_EQUAL);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// case 2:
|
||||||
|
// {
|
||||||
|
// ...
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// default:
|
||||||
|
// {
|
||||||
|
// printf( "Unknown COMP idx (%d) !\n", Index_Id);
|
||||||
|
// return( NDS_KO);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return( NDS_OK);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// case NDD_CMD_VALUE_ADD:
|
||||||
|
// {
|
||||||
|
// /*
|
||||||
|
// ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
|
//
|
||||||
|
// ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
// ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_CLOSE( user_args);
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Command_Name = "NDD_CMD_VALUE_ADD";
|
||||||
|
//
|
||||||
|
// /*
|
||||||
|
// return( NDS_OK);
|
||||||
|
// */
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// case NDD_CMD_VALUE_REMOVE:
|
||||||
|
// {
|
||||||
|
// /*
|
||||||
|
// ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
|
//
|
||||||
|
// ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
// ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_CLOSE( user_args);
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Command_Name = "NDD_CMD_VALUE_REMOVE";
|
||||||
|
// /*
|
||||||
|
// return( NDS_OK);
|
||||||
|
// */
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// case NDD_CMD_VALUE_PRINT:
|
||||||
|
// {
|
||||||
|
// /*
|
||||||
|
// ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_OPEN( lib_args, *Args_Ptr);
|
||||||
|
//
|
||||||
|
// ND_VA_ARG_GET( Out, lib_args, FILE *);
|
||||||
|
// ND_VA_ARG_GET( Recursive_Mode, lib_args, NDT_Recursive_Mode);
|
||||||
|
// ND_VA_ARG_GET( Recursive_Depth, lib_args, NDT_Recursive_Depth);
|
||||||
|
// ND_VA_ARG_GET( Recursive_Offset, lib_args, NDT_Recursive_Offset);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_OPEN( user_args, lib_args);
|
||||||
|
//
|
||||||
|
// ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
// ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_CLOSE( user_args);
|
||||||
|
// ND_VA_LIST_CLOSE( lib_args);
|
||||||
|
//
|
||||||
|
// void *Value_Ptr = Node_Ptr->Value;
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Command_Name = "NDD_CMD_VALUE_PRINT";
|
||||||
|
//
|
||||||
|
// /*
|
||||||
|
// fprintf( Out, "...\n", Value_Ptr->..., ...);
|
||||||
|
//
|
||||||
|
// return( NDS_OK);
|
||||||
|
// */
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// case NDD_CMD_INFO_PRINT:
|
||||||
|
// {
|
||||||
|
// /*
|
||||||
|
// ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_OPEN( lib_args, *Args_Ptr);
|
||||||
|
//
|
||||||
|
// ND_VA_ARG_GET( Out, lib_args, FILE *);
|
||||||
|
// ND_VA_ARG_GET( Recursive_Mode, lib_args, NDT_Recursive_Mode);
|
||||||
|
// ND_VA_ARG_GET( Recursive_Depth, lib_args, NDT_Recursive_Depth);
|
||||||
|
// ND_VA_ARG_GET( Recursive_Offset, lib_args, NDT_Recursive_Offset);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_OPEN( user_args, lib_args);
|
||||||
|
//
|
||||||
|
// ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
// ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_CLOSE( user_args);
|
||||||
|
// ND_VA_LIST_CLOSE( lib_args);
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Command_Name = "NDD_CMD_INFO_PRINT";
|
||||||
|
//
|
||||||
|
// /*
|
||||||
|
// return( NDS_OK);
|
||||||
|
// */
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// case NDD_CMD_USER_TRAVERSE:
|
||||||
|
// {
|
||||||
|
// /*
|
||||||
|
// ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
|
//
|
||||||
|
// ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
// ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
//
|
||||||
|
// ND_VA_LIST_CLOSE( user_args);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// void *Value_Ptr = Node_Ptr->Value;
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Command_Name = "NDD_CMD_USER_TRAVERSE";
|
||||||
|
//
|
||||||
|
// /*
|
||||||
|
// return( NDS_OK);
|
||||||
|
// */
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// default:
|
||||||
|
// {
|
||||||
|
// printf( "ND_Default_Manager() called with an undefined command %d\n", Command);
|
||||||
|
// return(NDS_ERRAPI);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// printf( "ND_Default_Manager() called with command %d (%s)\n", Command, Command_Name);
|
||||||
|
// return(NDS_OK);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Var Args Manager Macros */
|
||||||
|
|
||||||
|
#define ND_VA_LIST_OPEN( VA_List_Target, VA_List_Source) va_list VA_List_Target; va_copy( VA_List_Target, *va_arg( VA_List_Source, va_list *))
|
||||||
|
#define ND_VA_LIST_CLOSE( VA_List) va_end( VA_List)
|
||||||
|
#define ND_VA_ARG_GET( Arg, VA_List, Type) Type Arg = va_arg( VA_List, Type)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Commandes du manager */
|
/* Commandes du manager */
|
||||||
|
|
||||||
typedef int NDT_Command;
|
typedef int NDT_Command;
|
||||||
@ -225,7 +559,7 @@ struct NDT_Node;
|
|||||||
|
|
||||||
typedef char *NDT_Manager_Name;
|
typedef char *NDT_Manager_Name;
|
||||||
|
|
||||||
typedef NDT_Status NDT_Manager( struct NDT_Root *, NDT_Index_Id, struct NDT_Node *, NDT_Command, va_list);
|
typedef NDT_Status NDT_Manager( struct NDT_Root *, NDT_Index_Id, struct NDT_Node *, NDT_Command, va_list *);
|
||||||
|
|
||||||
|
|
||||||
/* Pointeur de fonction sur l'allocateur */
|
/* Pointeur de fonction sur l'allocateur */
|
||||||
@ -562,8 +896,8 @@ NDD_DLL_API NDT_Status ND_DataStruct_Convert_C( NDT_Root *, NDT_Index_Type *)
|
|||||||
/* (I) Command: Commande à exécuter sur chaque noeud traversé */
|
/* (I) Command: Commande à exécuter sur chaque noeud traversé */
|
||||||
/* (I) Data: pointeur de données utilisateur */
|
/* (I) Data: pointeur de données utilisateur */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_VI( NDT_Root *, NDT_Command, va_list);
|
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_VI( NDT_Root *, NDT_Command, va_list *);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_VC( NDT_Root *, NDT_Command, va_list);
|
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_VC( NDT_Root *, NDT_Command, va_list *);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_I( NDT_Root *, NDT_Command, ...);
|
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_I( NDT_Root *, NDT_Command, ...);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_C( NDT_Root *, NDT_Command, ...);
|
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_C( NDT_Root *, NDT_Command, ...);
|
||||||
|
|
||||||
@ -609,7 +943,7 @@ NDD_DLL_API NDT_Status ND_DataStruct_Value_Remove_C( NDT_Root *, void *);
|
|||||||
/* (I) Root: pointeur sur la racine de la structure de données */
|
/* (I) Root: pointeur sur la racine de la structure de données */
|
||||||
/* (I) Out : flux de sortie */
|
/* (I) Out : flux de sortie */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_VI( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, va_list);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_VI( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, va_list *);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_I( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_I( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_C( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_C( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
||||||
|
|
||||||
@ -624,8 +958,8 @@ NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_C( FILE *, NDT_Root *, NDT_
|
|||||||
/* (I) Data : pointeur de données */
|
/* (I) Data : pointeur de données */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_VI( void **, NDT_Root *, void *, va_list);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_VI( void **, NDT_Root *, void *, va_list *);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_VC( void **, NDT_Root *, void *, va_list);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_VC( void **, NDT_Root *, void *, va_list *);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_I( void **, NDT_Root *, void *, ...);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_I( void **, NDT_Root *, void *, ...);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_C( void **, NDT_Root *, void *, ...);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_C( void **, NDT_Root *, void *, ...);
|
||||||
|
|
||||||
@ -712,8 +1046,8 @@ NDD_DLL_API NDT_Status ND_Index_Reorg_C( NDT_Root *, NDT_Index_Id);
|
|||||||
/* (I) Command: Commande à exécuter sur chaque noeud traversé */
|
/* (I) Command: Commande à exécuter sur chaque noeud traversé */
|
||||||
/* (I) Data: pointeur de données utilisateur */
|
/* (I) Data: pointeur de données utilisateur */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Index_Traverse_VI( NDT_Root *, NDT_Index_Id, NDT_Command, va_list);
|
NDD_DLL_API NDT_Status ND_Index_Traverse_VI( NDT_Root *, NDT_Index_Id, NDT_Command, va_list *);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Traverse_VC( NDT_Root *, NDT_Index_Id, NDT_Command, va_list);
|
NDD_DLL_API NDT_Status ND_Index_Traverse_VC( NDT_Root *, NDT_Index_Id, NDT_Command, va_list *);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Traverse_I( NDT_Root *, NDT_Index_Id, NDT_Command, ...);
|
NDD_DLL_API NDT_Status ND_Index_Traverse_I( NDT_Root *, NDT_Index_Id, NDT_Command, ...);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Traverse_C( NDT_Root *, NDT_Index_Id, NDT_Command, ...);
|
NDD_DLL_API NDT_Status ND_Index_Traverse_C( NDT_Root *, NDT_Index_Id, NDT_Command, ...);
|
||||||
|
|
||||||
@ -761,7 +1095,7 @@ NDD_DLL_API NDT_Status ND_Index_Value_Remove_C( NDT_Root *, NDT_Index_Id, void
|
|||||||
/* (I) Root: pointeur sur la racine de la structure de données */
|
/* (I) Root: pointeur sur la racine de la structure de données */
|
||||||
/* (I) Out : flux de sortie */
|
/* (I) Out : flux de sortie */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Index_Value_Print_VI( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, va_list);
|
NDD_DLL_API NDT_Status ND_Index_Value_Print_VI( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, va_list *);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Value_Print_I( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
NDD_DLL_API NDT_Status ND_Index_Value_Print_I( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Value_Print_C( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
NDD_DLL_API NDT_Status ND_Index_Value_Print_C( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
||||||
|
|
||||||
@ -840,8 +1174,8 @@ NDD_DLL_API NDT_Status ND_Index_Node_Previous_Get_C( NDT_Node **, NDT_Node *)
|
|||||||
/* (I) Value : pointeur sur la valeur à rechercher */
|
/* (I) Value : pointeur sur la valeur à rechercher */
|
||||||
/* (I) Data : pointeur de données */
|
/* (I) Data : pointeur de données */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Index_Node_Find_VI( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, va_list);
|
NDD_DLL_API NDT_Status ND_Index_Node_Find_VI( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, va_list *);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Node_Find_VC( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, va_list);
|
NDD_DLL_API NDT_Status ND_Index_Node_Find_VC( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, va_list *);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Node_Find_I( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, ...);
|
NDD_DLL_API NDT_Status ND_Index_Node_Find_I( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, ...);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Node_Find_C( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, ...);
|
NDD_DLL_API NDT_Status ND_Index_Node_Find_C( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, ...);
|
||||||
|
|
||||||
@ -886,8 +1220,8 @@ NDD_DLL_API NDT_Status ND_Value_Free_C( NDT_Root *, void *);
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) Function : nom de la fonction manager à exécuter */
|
/* (I) Function : nom de la fonction manager à exécuter */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Manager_Exec_VI( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
NDD_DLL_API NDT_Status ND_Manager_Exec_VI( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list *);
|
||||||
NDD_DLL_API NDT_Status ND_Manager_Exec_VC( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
NDD_DLL_API NDT_Status ND_Manager_Exec_VC( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list *);
|
||||||
NDD_DLL_API NDT_Status ND_Manager_Exec_I( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, ...);
|
NDD_DLL_API NDT_Status ND_Manager_Exec_I( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, ...);
|
||||||
NDD_DLL_API NDT_Status ND_Manager_Exec_C( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, ...);
|
NDD_DLL_API NDT_Status ND_Manager_Exec_C( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, ...);
|
||||||
|
|
||||||
|
@ -1,19 +1,10 @@
|
|||||||
/*----------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* $Workfile: libnode.c $ */
|
/* $RCSfile: libnode.c,v $ */
|
||||||
/*----------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
/* $Revision: 1.2 $ */
|
||||||
|
/* $Name: $ */
|
||||||
|
/* $Date: 2010/06/06 22:20:17 $ */
|
||||||
/* $Author: agibert $ */
|
/* $Author: agibert $ */
|
||||||
/* $Date: 2008/11/12 02:25:23 $ */
|
|
||||||
/* $Revision: 1.1 $ */
|
|
||||||
/* $Label: $ */
|
|
||||||
/*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
|
||||||
/* %RCSfile: libnode.c,v % */
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
|
||||||
/* %Revision: 2.15 % */
|
|
||||||
/* %Name: libnode-2_1_0-1 % */
|
|
||||||
/* %Date: 2005/01/19 23:59:41 % */
|
|
||||||
/* %Author: agibert % */
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
@ -43,11 +34,9 @@
|
|||||||
#include <libnode.h>
|
#include <libnode.h>
|
||||||
|
|
||||||
#ifdef _LIBVER_SUPPORT
|
#ifdef _LIBVER_SUPPORT
|
||||||
VER_INFO_EXPORT( libnode, "%Revision: 2.15 %", "%Name: libnode-2_1_0-1 %", __FILE__, "%Author: agibert %")
|
VER_INFO_EXPORT( libnode, "$Revision: 1.2 $", "$Name: $", __FILE__, "$Author: agibert $")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char IMRG_ND_WHAT_IDENT[] = "@(#) VERSIONIMR: $Label: $ $Date: 2008/11/12 02:25:23 $ $Workfile: libnode.c $";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -60,7 +49,7 @@ char IMRG_ND_WHAT_IDENT[] = "@(#) VERSIONIMR: $Label: $ $Date: 2008/11/12 02:
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list Args)
|
NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Command_Name Command_Name;
|
NDT_Command_Name Command_Name;
|
||||||
|
|
||||||
@ -69,12 +58,12 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
{
|
{
|
||||||
case NDD_CMD_MANAGER_VERSION:
|
case NDD_CMD_MANAGER_VERSION:
|
||||||
{
|
{
|
||||||
NDT_Version_Name *Version_Name_Ptr = (NDT_Version_Name *)va_arg( Args, NDT_Version_Name *);
|
ND_VA_ARG_GET( Version_Name_Ptr, *Args_Ptr, NDT_Version_Name *);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
||||||
|
|
||||||
*Version_Name_Ptr = "%Revision: 2.15 % %Name: libnode-2_1_0-1 % %Date: 2005/01/19 23:59:41 % %Author: agibert %";
|
*Version_Name_Ptr = "$Revision: 1.2 $ $Name: $ $Date: 2010/06/06 22:20:17 $ $Author: agibert $";
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
@ -82,15 +71,15 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
case NDD_CMD_INDEX_GET:
|
case NDD_CMD_INDEX_GET:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
|
ND_VA_ARG_GET( Reply_Index_Id_Ptr, *Args_Ptr, NDT_Index_Id *);
|
||||||
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
|
ND_VA_ARG_GET( Reply_Command_Ptr, *Args_Ptr, NDT_Command *);
|
||||||
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
|
ND_VA_ARG_GET( Cmd, *Args_Ptr, NDT_Command);
|
||||||
void *Value_ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
*/
|
*/
|
||||||
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
|
ND_VA_ARG_GET( Reply_Index_Id_Ptr, *Args_Ptr, NDT_Index_Id *);
|
||||||
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
|
ND_VA_ARG_GET( Reply_Command_Ptr, *Args_Ptr, NDT_Command *);
|
||||||
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
|
ND_VA_ARG_GET( Cmd, *Args_Ptr, NDT_Command);
|
||||||
void *Value_ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_INDEX_GET";
|
Command_Name = "NDD_CMD_INDEX_GET";
|
||||||
@ -122,10 +111,14 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
case NDD_CMD_VALUE_ALLOC:
|
case NDD_CMD_VALUE_ALLOC:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void **Value_Ptr_Ptr = (void **)va_arg( Args, void **);
|
ND_VA_ARG_GET( Value_Ptr_Ptr, *Args_Ptr, void **);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -148,10 +141,14 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
case NDD_CMD_VALUE_FREE:
|
case NDD_CMD_VALUE_FREE:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -167,11 +164,15 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
case NDD_CMD_VALUE_COMP:
|
case NDD_CMD_VALUE_COMP:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value1_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value1_Ptr, *Args_Ptr, void *);
|
||||||
void *Value2_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value2_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -238,18 +239,22 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
return( NDS_KO);
|
return( NDS_KO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return( NDS_OK);
|
|
||||||
*/
|
*/
|
||||||
|
return( NDS_OK);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case NDD_CMD_VALUE_ADD:
|
case NDD_CMD_VALUE_ADD:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -263,10 +268,14 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
case NDD_CMD_VALUE_REMOVE:
|
case NDD_CMD_VALUE_REMOVE:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -279,15 +288,22 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
case NDD_CMD_VALUE_PRINT:
|
case NDD_CMD_VALUE_PRINT:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
|
||||||
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
ND_VA_LIST_OPEN( lib_args, *Args_Ptr);
|
||||||
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
|
||||||
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
ND_VA_ARG_GET( Out, lib_args, FILE *);
|
||||||
NDT_Recursive_Offset Recursive_Offset = (NDT_Recursive_Offset)va_arg( lib_args, NDT_Recursive_Offset);
|
ND_VA_ARG_GET( Recursive_Mode, lib_args, NDT_Recursive_Mode);
|
||||||
va_list user_args = (va_list)va_arg( lib_args, va_list);
|
ND_VA_ARG_GET( Recursive_Depth, lib_args, NDT_Recursive_Depth);
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_ARG_GET( Recursive_Offset, lib_args, NDT_Recursive_Offset);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_LIST_OPEN( user_args, lib_args);
|
||||||
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
|
ND_VA_LIST_CLOSE( lib_args);
|
||||||
|
|
||||||
void *Value_Ptr = Node_Ptr->Value;
|
void *Value_Ptr = Node_Ptr->Value;
|
||||||
*/
|
*/
|
||||||
@ -305,17 +321,22 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
case NDD_CMD_INFO_PRINT:
|
case NDD_CMD_INFO_PRINT:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
|
||||||
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
|
||||||
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
|
||||||
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
|
||||||
NDT_Recursive_Offset Recursive_Offset = (NDT_Recursive_Offset)va_arg( lib_args, NDT_Recursive_Offset);
|
|
||||||
va_list user_args = (va_list)va_arg( lib_args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
|
||||||
void *Value_Ptr = Node_Ptr->Value;
|
ND_VA_LIST_OPEN( lib_args, *Args_Ptr);
|
||||||
|
|
||||||
|
ND_VA_ARG_GET( Out, lib_args, FILE *);
|
||||||
|
ND_VA_ARG_GET( Recursive_Mode, lib_args, NDT_Recursive_Mode);
|
||||||
|
ND_VA_ARG_GET( Recursive_Depth, lib_args, NDT_Recursive_Depth);
|
||||||
|
ND_VA_ARG_GET( Recursive_Offset, lib_args, NDT_Recursive_Offset);
|
||||||
|
|
||||||
|
ND_VA_LIST_OPEN( user_args, lib_args);
|
||||||
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
|
ND_VA_LIST_CLOSE( lib_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -329,10 +350,15 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
case NDD_CMD_USER_TRAVERSE:
|
case NDD_CMD_USER_TRAVERSE:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
|
|
||||||
|
|
||||||
void *Value_Ptr = Node_Ptr->Value;
|
void *Value_Ptr = Node_Ptr->Value;
|
||||||
*/
|
*/
|
||||||
@ -366,7 +392,7 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
/* OpenStruct Manager */
|
/* OpenStruct Manager */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list Args)
|
NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Command_Name Command_Name;
|
NDT_Command_Name Command_Name;
|
||||||
|
|
||||||
@ -375,12 +401,12 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
|
|||||||
{
|
{
|
||||||
case NDD_CMD_MANAGER_VERSION:
|
case NDD_CMD_MANAGER_VERSION:
|
||||||
{
|
{
|
||||||
NDT_Version_Name *Version_Name_Ptr = (NDT_Version_Name *)va_arg( Args, NDT_Version_Name *);
|
ND_VA_ARG_GET( Version_Name_Ptr, *Args_Ptr, NDT_Version_Name *);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
||||||
|
|
||||||
*Version_Name_Ptr = "%Revision: 2.15 % %Name: libnode-2_1_0-1 % %Date: 2005/01/19 23:59:41 % %Author: agibert %";
|
*Version_Name_Ptr = "$Revision: 1.2 $ $Name: $ $Date: 2010/06/06 22:20:17 $ $Author: agibert $";
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
@ -388,15 +414,15 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
|
|||||||
case NDD_CMD_INDEX_GET:
|
case NDD_CMD_INDEX_GET:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
|
ND_VA_ARG_GET( Reply_Index_Id_Ptr, *Args_Ptr, NDT_Index_Id *);
|
||||||
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
|
ND_VA_ARG_GET( Reply_Command_Ptr, *Args_Ptr, NDT_Command *);
|
||||||
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
|
ND_VA_ARG_GET( Cmd, *Args_Ptr, NDT_Command);
|
||||||
void *Value_ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
*/
|
*/
|
||||||
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
|
ND_VA_ARG_GET( Reply_Index_Id_Ptr, *Args_Ptr, NDT_Index_Id *);
|
||||||
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
|
ND_VA_ARG_GET( Reply_Command_Ptr, *Args_Ptr, NDT_Command *);
|
||||||
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
|
ND_VA_ARG_GET( Cmd, *Args_Ptr, NDT_Command);
|
||||||
void *Value_ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_INDEX_GET";
|
Command_Name = "NDD_CMD_INDEX_GET";
|
||||||
@ -417,10 +443,14 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
|
|||||||
case NDD_CMD_VALUE_ALLOC:
|
case NDD_CMD_VALUE_ALLOC:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void **Value_Ptr_Ptr = (void **)va_arg( Args, void **);
|
ND_VA_ARG_GET( Value_Ptr_Ptr, *Args_Ptr, void **);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -432,10 +462,14 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
|
|||||||
case NDD_CMD_VALUE_FREE:
|
case NDD_CMD_VALUE_FREE:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -447,15 +481,18 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
|
|||||||
case NDD_CMD_VALUE_COMP:
|
case NDD_CMD_VALUE_COMP:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value1_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value1_Ptr, *Args_Ptr, void *);
|
||||||
void *Value2_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value2_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
*/
|
|
||||||
|
|
||||||
void *Value1_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
void *Value2_Ptr = (void *)va_arg( Args, void *);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
|
*/
|
||||||
|
ND_VA_ARG_GET( Value1_Ptr, *Args_Ptr, void *);
|
||||||
|
ND_VA_ARG_GET( Value2_Ptr, *Args_Ptr, void *);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_VALUE_COMP";
|
Command_Name = "NDD_CMD_VALUE_COMP";
|
||||||
@ -494,10 +531,14 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
|
|||||||
case NDD_CMD_VALUE_ADD:
|
case NDD_CMD_VALUE_ADD:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -509,10 +550,14 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
|
|||||||
case NDD_CMD_VALUE_REMOVE:
|
case NDD_CMD_VALUE_REMOVE:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -524,15 +569,22 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
|
|||||||
case NDD_CMD_VALUE_PRINT:
|
case NDD_CMD_VALUE_PRINT:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
|
||||||
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
ND_VA_LIST_OPEN( lib_args, *Args_Ptr);
|
||||||
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
|
||||||
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
ND_VA_ARG_GET( Out, lib_args, FILE *);
|
||||||
NDT_Recursive_Offset Recursive_Offset = (NDT_Recursive_Offset)va_arg( lib_args, NDT_Recursive_Offset);
|
ND_VA_ARG_GET( Recursive_Mode, lib_args, NDT_Recursive_Mode);
|
||||||
va_list user_args = (va_list)va_arg( lib_args, va_list);
|
ND_VA_ARG_GET( Recursive_Depth, lib_args, NDT_Recursive_Depth);
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_ARG_GET( Recursive_Offset, lib_args, NDT_Recursive_Offset);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_LIST_OPEN( user_args, lib_args);
|
||||||
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
|
ND_VA_LIST_CLOSE( lib_args);
|
||||||
|
|
||||||
void *Value_Ptr = Node_Ptr->Value;
|
void *Value_Ptr = Node_Ptr->Value;
|
||||||
*/
|
*/
|
||||||
@ -546,25 +598,33 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
|
|||||||
case NDD_CMD_INFO_PRINT:
|
case NDD_CMD_INFO_PRINT:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
|
||||||
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
|
||||||
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
|
||||||
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
|
||||||
NDT_Recursive_Offset Recursive_Offset = (NDT_Recursive_Offset)va_arg( lib_args, NDT_Recursive_Offset);
|
|
||||||
va_list user_args = (va_list)va_arg( lib_args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
|
||||||
void *Value_Ptr = Node_Ptr->Value;
|
ND_VA_LIST_OPEN( lib_args, *Args_Ptr);
|
||||||
|
|
||||||
|
ND_VA_ARG_GET( Out, lib_args, FILE *);
|
||||||
|
ND_VA_ARG_GET( Recursive_Mode, lib_args, NDT_Recursive_Mode);
|
||||||
|
ND_VA_ARG_GET( Recursive_Depth, lib_args, NDT_Recursive_Depth);
|
||||||
|
ND_VA_ARG_GET( Recursive_Offset, lib_args, NDT_Recursive_Offset);
|
||||||
|
|
||||||
|
ND_VA_LIST_OPEN( user_args, lib_args);
|
||||||
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
|
ND_VA_LIST_CLOSE( lib_args);
|
||||||
*/
|
*/
|
||||||
|
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
|
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
ND_VA_LIST_OPEN( lib_args, *Args_Ptr);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
|
||||||
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
ND_VA_ARG_GET( Out, lib_args, FILE *);
|
||||||
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
ND_VA_ARG_GET( Recursive_Mode, lib_args, NDT_Recursive_Mode);
|
||||||
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
ND_VA_ARG_GET( Recursive_Depth, lib_args, NDT_Recursive_Depth);
|
||||||
NDT_Recursive_Offset Recursive_Offset = (NDT_Recursive_Offset)va_arg( lib_args, NDT_Recursive_Offset);
|
ND_VA_ARG_GET( Recursive_Offset, lib_args, NDT_Recursive_Offset);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( lib_args);
|
||||||
|
|
||||||
void *Value_Ptr = Node_Ptr->Value;
|
void *Value_Ptr = Node_Ptr->Value;
|
||||||
|
|
||||||
@ -618,7 +678,7 @@ NDT_Status ND_Library_Open_I( int Debug_Mode)
|
|||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
if( ( NDG_Base.DL_Ptr = dlopen( NULL, ( RTLD_NOW | RTLD_GLOBAL))) == NULL)
|
if( ( NDG_Base.DL_Ptr = dlopen( NULL, ( RTLD_NOW | RTLD_GLOBAL))) == NULL)
|
||||||
{
|
{
|
||||||
sprintf( NDG_Base.Err_String, "Error ND_Library_Open: can't dlopen [%s]", dlerror());
|
sprintf( NDG_Base.Err_String, "Error ND_Library_Open_I: can't dlopen [%s]", dlerror());
|
||||||
ND_Error_Print();
|
ND_Error_Print();
|
||||||
|
|
||||||
return( NDS_KO);
|
return( NDS_KO);
|
||||||
@ -693,16 +753,13 @@ NDT_Status ND_Library_Close_I( void)
|
|||||||
NDG_Base.Symbol_First_Ptr = (NDT_Symbol *)NULL;
|
NDG_Base.Symbol_First_Ptr = (NDT_Symbol *)NULL;
|
||||||
|
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
/*
|
|
||||||
if( dlclose( NDG_Base.DL_Ptr) != 0)
|
if( dlclose( NDG_Base.DL_Ptr) != 0)
|
||||||
{
|
{
|
||||||
sprintf( NDG_Base.Err_String, "Error ND_Library_Open: can't dlclose [%s]", dlerror());
|
sprintf( NDG_Base.Err_String, "Error ND_Library_Close_I: can't dlclose [%s]", dlerror());
|
||||||
ND_Error_Print();
|
ND_Error_Print();
|
||||||
|
|
||||||
return( NDS_KO);
|
return( NDS_KO);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
/* dlclose buggy on HPUX... 8^/ */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NDG_Base.Open_Status = NDD_FALSE;
|
NDG_Base.Open_Status = NDD_FALSE;
|
||||||
@ -1050,7 +1107,7 @@ NDT_Status ND_DataStruct_Open_C( NDT_Root **Root_Ptr_Ptr, NDT_Index_Nb Index_
|
|||||||
return( status);
|
return( status);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ( NDG_Base.Debug_Mode == NDD_TRUE) && ( NDG_Base.Open_Status == NDD_TRUE))
|
if( ( NDG_Base.Debug_Mode == NDD_TRUE) && ( Manager_Ptr != NULL) && ( NDG_Base.Open_Status == NDD_TRUE))
|
||||||
{
|
{
|
||||||
if( ( status = ND_DataStruct_Value_Add_I( NDG_Base.OpenStruct_Ptr, (void **)*Root_Ptr_Ptr)) != NDS_OK)
|
if( ( status = ND_DataStruct_Value_Add_I( NDG_Base.OpenStruct_Ptr, (void **)*Root_Ptr_Ptr)) != NDS_OK)
|
||||||
{
|
{
|
||||||
@ -1876,7 +1933,7 @@ NDT_Status ND_DataStruct_Reorg_C( NDT_Root *Root_Ptr)
|
|||||||
/* (I) Data : pointeur de données utilisateur */
|
/* (I) Data : pointeur de données utilisateur */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status ND_Index_Traverse_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Command Command, va_list Args)
|
NDT_Status ND_Index_Traverse_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Command Command, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Status rc;
|
NDT_Status rc;
|
||||||
NDT_Node *Node_Ptr, *Next_Node_Ptr;
|
NDT_Node *Node_Ptr, *Next_Node_Ptr;
|
||||||
@ -1895,7 +1952,7 @@ NDT_Status ND_Index_Traverse_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, ND
|
|||||||
case NDD_CMD_VALUE_FREE:
|
case NDD_CMD_VALUE_FREE:
|
||||||
{
|
{
|
||||||
|
|
||||||
rc = ND_Manager_Exec_I( Root_Ptr, Index_Id, Node_Ptr, Command, Node_Ptr->Value, Args);
|
rc = ND_Manager_Exec_I( Root_Ptr, Index_Id, Node_Ptr, Command, Node_Ptr->Value, Args_Ptr);
|
||||||
if (ND_ERROR( rc)) return rc;
|
if (ND_ERROR( rc)) return rc;
|
||||||
|
|
||||||
rc = ND_Index_Node_Remove_I( Node_Ptr);
|
rc = ND_Index_Node_Remove_I( Node_Ptr);
|
||||||
@ -1909,7 +1966,7 @@ NDT_Status ND_Index_Traverse_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, ND
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
rc = ND_Manager_Exec_I( Root_Ptr, Index_Id, Node_Ptr, Command, Next_Node_Ptr, Args);
|
rc = ND_Manager_Exec_I( Root_Ptr, Index_Id, Node_Ptr, Command, Next_Node_Ptr, Args_Ptr);
|
||||||
if (ND_ERROR( rc)) return rc;
|
if (ND_ERROR( rc)) return rc;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -1935,7 +1992,7 @@ NDT_Status ND_Index_Traverse_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, ND
|
|||||||
/* (I) Data : pointeur de données utilisateur */
|
/* (I) Data : pointeur de données utilisateur */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status ND_Index_Traverse_VC( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Command Command, va_list Args)
|
NDT_Status ND_Index_Traverse_VC( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Command Command, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
if( NDG_Base.Open_Status != NDD_TRUE)
|
if( NDG_Base.Open_Status != NDD_TRUE)
|
||||||
{
|
{
|
||||||
@ -1953,7 +2010,7 @@ NDT_Status ND_Index_Traverse_VC( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, N
|
|||||||
return( NDS_ERRAPI);
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
return( ND_Index_Traverse_VI( Root_Ptr, Index_Id, Command, Args));
|
return( ND_Index_Traverse_VI( Root_Ptr, Index_Id, Command, Args_Ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1993,7 +2050,7 @@ NDT_Status ND_Index_Traverse_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
case NDD_CMD_VALUE_FREE:
|
case NDD_CMD_VALUE_FREE:
|
||||||
{
|
{
|
||||||
|
|
||||||
status = ND_Manager_Exec_I( Root_Ptr, Index_Id, Node_Ptr, Command, Node_Ptr->Value, args);
|
status = ND_Manager_Exec_I( Root_Ptr, Index_Id, Node_Ptr, Command, Node_Ptr->Value, &args);
|
||||||
if( ND_ERROR( status)) return( status);
|
if( ND_ERROR( status)) return( status);
|
||||||
|
|
||||||
status = ND_Index_Node_Remove_I( Node_Ptr);
|
status = ND_Index_Node_Remove_I( Node_Ptr);
|
||||||
@ -2007,7 +2064,7 @@ NDT_Status ND_Index_Traverse_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
status = ND_Manager_Exec_I( Root_Ptr, Index_Id, Node_Ptr, Command, Next_Node_Ptr, args);
|
status = ND_Manager_Exec_I( Root_Ptr, Index_Id, Node_Ptr, Command, Next_Node_Ptr, &args);
|
||||||
if( ND_ERROR( status)) return( status);
|
if( ND_ERROR( status)) return( status);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -2059,7 +2116,7 @@ NDT_Status ND_Index_Traverse_C( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, ND
|
|||||||
return( NDS_ERRAPI);
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = ND_Index_Traverse_VI( Root_Ptr, Index_Id, Command, args);
|
status = ND_Index_Traverse_VI( Root_Ptr, Index_Id, Command, &args);
|
||||||
|
|
||||||
va_end( args);
|
va_end( args);
|
||||||
|
|
||||||
@ -2079,7 +2136,7 @@ NDT_Status ND_Index_Traverse_C( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, ND
|
|||||||
/* (I) Data : pointeur de données utilisateur */
|
/* (I) Data : pointeur de données utilisateur */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status ND_DataStruct_Traverse_VI( NDT_Root *Root_Ptr, NDT_Command Command, va_list Args)
|
NDT_Status ND_DataStruct_Traverse_VI( NDT_Root *Root_Ptr, NDT_Command Command, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Status status;
|
NDT_Status status;
|
||||||
NDT_Index_Id new_index;
|
NDT_Index_Id new_index;
|
||||||
@ -2089,7 +2146,7 @@ NDT_Status ND_DataStruct_Traverse_VI( NDT_Root *Root_Ptr, NDT_Command Command,
|
|||||||
status = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_PRIMARY, NULL, NDD_CMD_INDEX_GET, &new_index, &new_cmd, Command, NULL);
|
status = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_PRIMARY, NULL, NDD_CMD_INDEX_GET, &new_index, &new_cmd, Command, NULL);
|
||||||
if( ND_ERROR(status)) return( status);
|
if( ND_ERROR(status)) return( status);
|
||||||
|
|
||||||
return( ND_Index_Traverse_VI( Root_Ptr, new_index, new_cmd, Args));
|
return( ND_Index_Traverse_VI( Root_Ptr, new_index, new_cmd, Args_Ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2105,7 +2162,7 @@ NDT_Status ND_DataStruct_Traverse_VI( NDT_Root *Root_Ptr, NDT_Command Command,
|
|||||||
/* (I) Data : pointeur de données utilisateur */
|
/* (I) Data : pointeur de données utilisateur */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status ND_DataStruct_Traverse_VC( NDT_Root *Root_Ptr, NDT_Command Command, va_list Args)
|
NDT_Status ND_DataStruct_Traverse_VC( NDT_Root *Root_Ptr, NDT_Command Command, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
if( NDG_Base.Open_Status != NDD_TRUE)
|
if( NDG_Base.Open_Status != NDD_TRUE)
|
||||||
{
|
{
|
||||||
@ -2122,7 +2179,7 @@ NDT_Status ND_DataStruct_Traverse_VC( NDT_Root *Root_Ptr, NDT_Command Command
|
|||||||
return( NDS_ERRAPI);
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
return( ND_DataStruct_Traverse_VI( Root_Ptr, Command, Args));
|
return( ND_DataStruct_Traverse_VI( Root_Ptr, Command, Args_Ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2151,7 +2208,7 @@ NDT_Status ND_DataStruct_Traverse_I( NDT_Root *Root_Ptr, NDT_Command Command,
|
|||||||
status = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_PRIMARY, NULL, NDD_CMD_INDEX_GET, &new_index, &new_cmd, Command, NULL);
|
status = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_PRIMARY, NULL, NDD_CMD_INDEX_GET, &new_index, &new_cmd, Command, NULL);
|
||||||
if( ND_ERROR( status)) return( status);
|
if( ND_ERROR( status)) return( status);
|
||||||
|
|
||||||
status = ND_Index_Traverse_VI( Root_Ptr, new_index, new_cmd, args);
|
status = ND_Index_Traverse_VI( Root_Ptr, new_index, new_cmd, &args);
|
||||||
|
|
||||||
va_end( args);
|
va_end( args);
|
||||||
|
|
||||||
@ -2195,7 +2252,7 @@ NDT_Status ND_DataStruct_Traverse_C( NDT_Root *Root_Ptr, NDT_Command Command,
|
|||||||
return( NDS_ERRAPI);
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = ND_DataStruct_Traverse_VI( Root_Ptr, Command, args);
|
status = ND_DataStruct_Traverse_VI( Root_Ptr, Command, &args);
|
||||||
|
|
||||||
va_end( args);
|
va_end( args);
|
||||||
|
|
||||||
@ -2681,12 +2738,12 @@ NDT_Status ND_DataStruct_Value_Remove_C( NDT_Root *Root_Ptr, void *Value_Ptr)
|
|||||||
/* (I) Root : pointeur sur la racine de la structure de données à afficher */
|
/* (I) Root : pointeur sur la racine de la structure de données à afficher */
|
||||||
/* (I) Out : flux de sortie */
|
/* (I) Out : flux de sortie */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_Index_Value_Print_VI( FILE *Out, NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset, va_list Args)
|
NDT_Status ND_Index_Value_Print_VI( FILE *Out, NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Status status;
|
NDT_Status status;
|
||||||
|
|
||||||
|
|
||||||
status = ND_Index_Traverse_I( Root_Ptr, Index_Id, NDD_CMD_VALUE_PRINT, Out, Recursive_Mode, Recursive_Depth, Recursive_Offset, Args);
|
status = ND_Index_Traverse_I( Root_Ptr, Index_Id, NDD_CMD_VALUE_PRINT, Out, Recursive_Mode, Recursive_Depth, Recursive_Offset, Args_Ptr);
|
||||||
|
|
||||||
return( status);
|
return( status);
|
||||||
}
|
}
|
||||||
@ -2709,7 +2766,7 @@ NDT_Status ND_Index_Value_Print_I( FILE *Out, NDT_Root *Root_Ptr, NDT_Index_Id
|
|||||||
|
|
||||||
va_start( user_args, Recursive_Offset);
|
va_start( user_args, Recursive_Offset);
|
||||||
|
|
||||||
status = ND_Index_Traverse_I( Root_Ptr, Index_Id, NDD_CMD_VALUE_PRINT, Out, Recursive_Mode, Recursive_Depth, Recursive_Offset, user_args);
|
status = ND_Index_Traverse_I( Root_Ptr, Index_Id, NDD_CMD_VALUE_PRINT, Out, Recursive_Mode, Recursive_Depth, Recursive_Offset, &user_args);
|
||||||
|
|
||||||
va_end( user_args);
|
va_end( user_args);
|
||||||
|
|
||||||
@ -2759,7 +2816,7 @@ NDT_Status ND_Index_Value_Print_C( FILE *Out, NDT_Root *Root_Ptr, NDT_Index_I
|
|||||||
return( NDS_ERRAPI);
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = ND_Index_Value_Print_VI( Out, Root_Ptr, Index_Id, Recursive_Mode, Recursive_Depth, Recursive_Offset, user_args);
|
status = ND_Index_Value_Print_VI( Out, Root_Ptr, Index_Id, Recursive_Mode, Recursive_Depth, Recursive_Offset, &user_args);
|
||||||
|
|
||||||
va_end( user_args);
|
va_end( user_args);
|
||||||
|
|
||||||
@ -2776,11 +2833,11 @@ NDT_Status ND_Index_Value_Print_C( FILE *Out, NDT_Root *Root_Ptr, NDT_Index_I
|
|||||||
/* (I) Root : pointeur sur la racine de la structure de données à afficher */
|
/* (I) Root : pointeur sur la racine de la structure de données à afficher */
|
||||||
/* (I) Out : flux de sortie */
|
/* (I) Out : flux de sortie */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_DataStruct_Value_Print_VI( FILE *Out, NDT_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset, va_list User_Args)
|
NDT_Status ND_DataStruct_Value_Print_VI( FILE *Out, NDT_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset, va_list *User_Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Status status;
|
NDT_Status status;
|
||||||
|
|
||||||
status = ND_DataStruct_Traverse_I( Root_Ptr, NDD_CMD_VALUE_PRINT, Out, Recursive_Mode, Recursive_Depth, Recursive_Offset, User_Args);
|
status = ND_DataStruct_Traverse_I( Root_Ptr, NDD_CMD_VALUE_PRINT, Out, Recursive_Mode, Recursive_Depth, Recursive_Offset, User_Args_Ptr);
|
||||||
|
|
||||||
return( status);
|
return( status);
|
||||||
}
|
}
|
||||||
@ -2803,7 +2860,7 @@ NDT_Status ND_DataStruct_Value_Print_I( FILE *Out, NDT_Root *Root_Ptr, NDT_Rec
|
|||||||
|
|
||||||
va_start( user_args, Recursive_Offset);
|
va_start( user_args, Recursive_Offset);
|
||||||
|
|
||||||
status = ND_DataStruct_Traverse_I( Root_Ptr, NDD_CMD_VALUE_PRINT, Out, Recursive_Mode, Recursive_Depth, Recursive_Offset, user_args);
|
status = ND_DataStruct_Traverse_I( Root_Ptr, NDD_CMD_VALUE_PRINT, Out, Recursive_Mode, Recursive_Depth, Recursive_Offset, &user_args);
|
||||||
|
|
||||||
va_end( user_args);
|
va_end( user_args);
|
||||||
|
|
||||||
@ -2853,7 +2910,7 @@ NDT_Status ND_DataStruct_Value_Print_C( FILE *Out, NDT_Root *Root_Ptr, NDT_Re
|
|||||||
return( NDS_ERRAPI);
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = ND_DataStruct_Value_Print_VI( Out, Root_Ptr, Recursive_Mode, Recursive_Depth, Recursive_Offset, user_args);
|
status = ND_DataStruct_Value_Print_VI( Out, Root_Ptr, Recursive_Mode, Recursive_Depth, Recursive_Offset, &user_args);
|
||||||
|
|
||||||
va_end( user_args);
|
va_end( user_args);
|
||||||
|
|
||||||
@ -3315,15 +3372,15 @@ NDT_Status ND_Index_Node_Previous_Get_C( NDT_Node **Prev_Node_Ptr_Ptr, NDT_Nod
|
|||||||
/* (I) Data : pointeur de données */
|
/* (I) Data : pointeur de données */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status ND_Index_Node_Find_VI( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void *Value_Ptr, va_list Args)
|
NDT_Status ND_Index_Node_Find_VI( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void *Value_Ptr, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
if( ND_INDEX_TYPE_LIST_IS( Root_Ptr, Index_Id))
|
if( ND_INDEX_TYPE_LIST_IS( Root_Ptr, Index_Id))
|
||||||
{
|
{
|
||||||
*Node_Ptr_Ptr = ND_List_Node_Find( Root_Ptr, Index_Id, Value_Ptr, Args);
|
*Node_Ptr_Ptr = ND_List_Node_Find( Root_Ptr, Index_Id, Value_Ptr, Args_Ptr);
|
||||||
}
|
}
|
||||||
else if ( ND_INDEX_TYPE_TREE_IS( Root_Ptr, Index_Id))
|
else if ( ND_INDEX_TYPE_TREE_IS( Root_Ptr, Index_Id))
|
||||||
{
|
{
|
||||||
*Node_Ptr_Ptr = ND_Tree_Node_Find( Root_Ptr, Index_Id, Value_Ptr, Args);
|
*Node_Ptr_Ptr = ND_Tree_Node_Find( Root_Ptr, Index_Id, Value_Ptr, Args_Ptr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3349,7 +3406,7 @@ NDT_Status ND_Index_Node_Find_VI( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr
|
|||||||
/* (I) Data : pointeur de données */
|
/* (I) Data : pointeur de données */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status ND_Index_Node_Find_VC( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void *Value_Ptr, va_list Args)
|
NDT_Status ND_Index_Node_Find_VC( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void *Value_Ptr, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Status status;
|
NDT_Status status;
|
||||||
|
|
||||||
@ -3378,7 +3435,7 @@ NDT_Status ND_Index_Node_Find_VC( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr
|
|||||||
return( NDS_ERRAPI);
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = ND_Index_Node_Find_VI( Node_Ptr_Ptr, Root_Ptr, Index_Id, Value_Ptr, Args);
|
status = ND_Index_Node_Find_VI( Node_Ptr_Ptr, Root_Ptr, Index_Id, Value_Ptr, Args_Ptr);
|
||||||
|
|
||||||
|
|
||||||
return( status);
|
return( status);
|
||||||
@ -3406,11 +3463,11 @@ NDT_Status ND_Index_Node_Find_I( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr,
|
|||||||
|
|
||||||
if( ND_INDEX_TYPE_LIST_IS( Root_Ptr, Index_Id))
|
if( ND_INDEX_TYPE_LIST_IS( Root_Ptr, Index_Id))
|
||||||
{
|
{
|
||||||
*Node_Ptr_Ptr = ND_List_Node_Find( Root_Ptr, Index_Id, Value_Ptr, user_args);
|
*Node_Ptr_Ptr = ND_List_Node_Find( Root_Ptr, Index_Id, Value_Ptr, &user_args);
|
||||||
}
|
}
|
||||||
else if ( ND_INDEX_TYPE_TREE_IS( Root_Ptr, Index_Id))
|
else if ( ND_INDEX_TYPE_TREE_IS( Root_Ptr, Index_Id))
|
||||||
{
|
{
|
||||||
*Node_Ptr_Ptr = ND_Tree_Node_Find( Root_Ptr, Index_Id, Value_Ptr, user_args);
|
*Node_Ptr_Ptr = ND_Tree_Node_Find( Root_Ptr, Index_Id, Value_Ptr, &user_args);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3468,7 +3525,7 @@ NDT_Status ND_Index_Node_Find_C( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr,
|
|||||||
return( NDS_ERRAPI);
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = ND_Index_Node_Find_VI( Node_Ptr_Ptr, Root_Ptr, Index_Id, Value_Ptr, user_args);
|
status = ND_Index_Node_Find_VI( Node_Ptr_Ptr, Root_Ptr, Index_Id, Value_Ptr, &user_args);
|
||||||
|
|
||||||
va_end( user_args);
|
va_end( user_args);
|
||||||
|
|
||||||
@ -3488,7 +3545,7 @@ NDT_Status ND_Index_Node_Find_C( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr,
|
|||||||
/* (I) Data : pointeur de données */
|
/* (I) Data : pointeur de données */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status ND_DataStruct_Value_Find_VI( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, va_list Args)
|
NDT_Status ND_DataStruct_Value_Find_VI( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Status status;
|
NDT_Status status;
|
||||||
NDT_Index_Id new_index;
|
NDT_Index_Id new_index;
|
||||||
@ -3499,7 +3556,7 @@ NDT_Status ND_DataStruct_Value_Find_VI( void **Value_Ptr_Ptr, NDT_Root *Root_
|
|||||||
status = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_PRIMARY, NULL, NDD_CMD_INDEX_GET, &new_index, &new_cmd, NDD_CMD_VALUE_FIND, Ref_Value_Ptr);
|
status = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_PRIMARY, NULL, NDD_CMD_INDEX_GET, &new_index, &new_cmd, NDD_CMD_VALUE_FIND, Ref_Value_Ptr);
|
||||||
if( ND_ERROR(status)) return( status);
|
if( ND_ERROR(status)) return( status);
|
||||||
|
|
||||||
status = ND_Index_Node_Find_VI( &node_ptr, Root_Ptr, new_index, Ref_Value_Ptr, Args);
|
status = ND_Index_Node_Find_VI( &node_ptr, Root_Ptr, new_index, Ref_Value_Ptr, Args_Ptr);
|
||||||
if( ND_ERROR(status)) return( status);
|
if( ND_ERROR(status)) return( status);
|
||||||
|
|
||||||
if( node_ptr != NULL)
|
if( node_ptr != NULL)
|
||||||
@ -3527,7 +3584,7 @@ NDT_Status ND_DataStruct_Value_Find_VI( void **Value_Ptr_Ptr, NDT_Root *Root_
|
|||||||
/* (I) Data : pointeur de données */
|
/* (I) Data : pointeur de données */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status ND_DataStruct_Value_Find_VC( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, va_list Args)
|
NDT_Status ND_DataStruct_Value_Find_VC( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Status status;
|
NDT_Status status;
|
||||||
|
|
||||||
@ -3556,7 +3613,7 @@ NDT_Status ND_DataStruct_Value_Find_VC( void **Value_Ptr_Ptr, NDT_Root *Root_
|
|||||||
return( NDS_ERRAPI);
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = ND_DataStruct_Value_Find_VI( Value_Ptr_Ptr, Root_Ptr, Ref_Value_Ptr, Args);
|
status = ND_DataStruct_Value_Find_VI( Value_Ptr_Ptr, Root_Ptr, Ref_Value_Ptr, Args_Ptr);
|
||||||
|
|
||||||
return( status);
|
return( status);
|
||||||
}
|
}
|
||||||
@ -3588,7 +3645,7 @@ NDT_Status ND_DataStruct_Value_Find_I( void **Value_Ptr_Ptr, NDT_Root *Root_P
|
|||||||
status = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_PRIMARY, NULL, NDD_CMD_INDEX_GET, &new_index, &new_cmd, NDD_CMD_VALUE_FIND, Ref_Value_Ptr);
|
status = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_PRIMARY, NULL, NDD_CMD_INDEX_GET, &new_index, &new_cmd, NDD_CMD_VALUE_FIND, Ref_Value_Ptr);
|
||||||
if( ND_ERROR(status)) return( status);
|
if( ND_ERROR(status)) return( status);
|
||||||
|
|
||||||
status = ND_Index_Node_Find_VI( &node_ptr, Root_Ptr, new_index, Ref_Value_Ptr, user_args);
|
status = ND_Index_Node_Find_VI( &node_ptr, Root_Ptr, new_index, Ref_Value_Ptr, &user_args);
|
||||||
if( ND_ERROR(status)) return( status);
|
if( ND_ERROR(status)) return( status);
|
||||||
|
|
||||||
if( node_ptr != NULL)
|
if( node_ptr != NULL)
|
||||||
@ -3650,7 +3707,7 @@ NDT_Status ND_DataStruct_Value_Find_C( void **Value_Ptr_Ptr, NDT_Root *Root_P
|
|||||||
return( NDS_ERRAPI);
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = ND_DataStruct_Value_Find_VI( Value_Ptr_Ptr, Root_Ptr, Ref_Value_Ptr, user_args);
|
status = ND_DataStruct_Value_Find_VI( Value_Ptr_Ptr, Root_Ptr, Ref_Value_Ptr, &user_args);
|
||||||
|
|
||||||
va_end( user_args);
|
va_end( user_args);
|
||||||
|
|
||||||
@ -3731,7 +3788,7 @@ NDT_Status ND_Value_Alloc_I( NDT_Root *Root_Ptr, void **Value_Ptr_Ptr, ...)
|
|||||||
|
|
||||||
/* Appel du manager */
|
/* Appel du manager */
|
||||||
|
|
||||||
rc = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_UNKNOWN, NULL, NDD_CMD_VALUE_ALLOC, Value_Ptr_Ptr, user_args);
|
rc = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_UNKNOWN, NULL, NDD_CMD_VALUE_ALLOC, Value_Ptr_Ptr, &user_args);
|
||||||
|
|
||||||
va_end( user_args);
|
va_end( user_args);
|
||||||
|
|
||||||
@ -3778,7 +3835,7 @@ NDT_Status ND_Value_Alloc_C( NDT_Root *Root_Ptr, void **Value_Ptr_Ptr, ...)
|
|||||||
|
|
||||||
/* Appel du manager */
|
/* Appel du manager */
|
||||||
|
|
||||||
rc = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_UNKNOWN, NULL, NDD_CMD_VALUE_ALLOC, Value_Ptr_Ptr, user_args);
|
rc = ND_Manager_Exec_I( Root_Ptr, NDD_INDEX_UNKNOWN, NULL, NDD_CMD_VALUE_ALLOC, Value_Ptr_Ptr, &user_args);
|
||||||
|
|
||||||
va_end( user_args);
|
va_end( user_args);
|
||||||
|
|
||||||
@ -3852,7 +3909,7 @@ NDT_Status ND_Value_Free_C( NDT_Root *Root_Ptr, void *Value_Ptr)
|
|||||||
/* (I) Function : nom de la fonction manager à exécuter */
|
/* (I) Function : nom de la fonction manager à exécuter */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status ND_Manager_Exec_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list Args)
|
NDT_Status ND_Manager_Exec_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Status status;
|
NDT_Status status;
|
||||||
NDT_Manager *manager_ptr;
|
NDT_Manager *manager_ptr;
|
||||||
@ -3873,7 +3930,7 @@ NDT_Status ND_Manager_Exec_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
status = manager_ptr( Root_Ptr, Index_Id, Node_Ptr, Command, Args);
|
status = manager_ptr( Root_Ptr, Index_Id, Node_Ptr, Command, Args_Ptr);
|
||||||
|
|
||||||
return( status);
|
return( status);
|
||||||
}
|
}
|
||||||
@ -3887,7 +3944,7 @@ NDT_Status ND_Manager_Exec_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
/* (I) Function : nom de la fonction manager à exécuter */
|
/* (I) Function : nom de la fonction manager à exécuter */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status ND_Manager_Exec_VC( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list Args)
|
NDT_Status ND_Manager_Exec_VC( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Status status;
|
NDT_Status status;
|
||||||
|
|
||||||
@ -3916,7 +3973,7 @@ NDT_Status ND_Manager_Exec_VC( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
|
|||||||
return( NDS_ERRAPI);
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = ND_Manager_Exec_VI( Root_Ptr, Index_Id, Node_Ptr, Command, Args);
|
status = ND_Manager_Exec_VI( Root_Ptr, Index_Id, Node_Ptr, Command, Args_Ptr);
|
||||||
|
|
||||||
return( status);
|
return( status);
|
||||||
}
|
}
|
||||||
@ -3955,7 +4012,7 @@ NDT_Status ND_Manager_Exec_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
status = manager_ptr( Root_Ptr, Index_Id, Node_Ptr, Command, args);
|
status = manager_ptr( Root_Ptr, Index_Id, Node_Ptr, Command, &args);
|
||||||
|
|
||||||
va_end( args);
|
va_end( args);
|
||||||
|
|
||||||
@ -4004,7 +4061,7 @@ NDT_Status ND_Manager_Exec_C( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_
|
|||||||
return( NDS_ERRAPI);
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = ND_Manager_Exec_VI( Root_Ptr, Index_Id, Node_Ptr, Command, args);
|
status = ND_Manager_Exec_VI( Root_Ptr, Index_Id, Node_Ptr, Command, &args);
|
||||||
|
|
||||||
va_end( args);
|
va_end( args);
|
||||||
|
|
||||||
@ -4618,7 +4675,7 @@ NDT_Status ND_Tree_Value_Add( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void
|
|||||||
/* (I) Data : pointeur de données */
|
/* (I) Data : pointeur de données */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Node *ND_List_Node_Find( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void *Value_Ptr, va_list User_Args)
|
NDT_Node *ND_List_Node_Find( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void *Value_Ptr, va_list *User_Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Node *node_ptr;
|
NDT_Node *node_ptr;
|
||||||
NDT_Status rc;
|
NDT_Status rc;
|
||||||
@ -4632,7 +4689,7 @@ NDT_Node *ND_List_Node_Find( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void
|
|||||||
|
|
||||||
while( node_ptr)
|
while( node_ptr)
|
||||||
{
|
{
|
||||||
rc = ND_Manager_Exec_I( Root_Ptr, Index_Id, node_ptr, NDD_CMD_VALUE_COMP, Value_Ptr, node_ptr->Value, User_Args);
|
rc = ND_Manager_Exec_I( Root_Ptr, Index_Id, node_ptr, NDD_CMD_VALUE_COMP, Value_Ptr, node_ptr->Value, User_Args_Ptr);
|
||||||
|
|
||||||
switch( rc)
|
switch( rc)
|
||||||
{
|
{
|
||||||
@ -4660,7 +4717,7 @@ NDT_Node *ND_List_Node_Find( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void
|
|||||||
{
|
{
|
||||||
/* Pour les listes non triées, il faut parcourir toute la liste */
|
/* Pour les listes non triées, il faut parcourir toute la liste */
|
||||||
|
|
||||||
while( node_ptr && ( ND_Manager_Exec_I( Root_Ptr, Index_Id, node_ptr, NDD_CMD_VALUE_COMP, Value_Ptr, node_ptr->Value, User_Args) != NDS_EQUAL))
|
while( node_ptr && ( ND_Manager_Exec_I( Root_Ptr, Index_Id, node_ptr, NDD_CMD_VALUE_COMP, Value_Ptr, node_ptr->Value, User_Args_Ptr) != NDS_EQUAL))
|
||||||
{
|
{
|
||||||
node_ptr = node_ptr->Right;
|
node_ptr = node_ptr->Right;
|
||||||
}
|
}
|
||||||
@ -4683,14 +4740,14 @@ NDT_Node *ND_List_Node_Find( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void
|
|||||||
|
|
||||||
/*------------------------------ Recursive Kernel ------------------------------*/
|
/*------------------------------ Recursive Kernel ------------------------------*/
|
||||||
|
|
||||||
NDT_Node *ND_Tree_Node_Recursive_Find( NDT_Node *Node_Ptr, void *Value_Ptr, va_list User_Args)
|
NDT_Node *ND_Tree_Node_Recursive_Find( NDT_Node *Node_Ptr, void *Value_Ptr, va_list *User_Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Status answer;
|
NDT_Status answer;
|
||||||
|
|
||||||
|
|
||||||
if( !Node_Ptr) return(NULL);
|
if( !Node_Ptr) return(NULL);
|
||||||
|
|
||||||
answer = ND_Manager_Exec_I( Node_Ptr->Root, Node_Ptr->Index, Node_Ptr, NDD_CMD_VALUE_COMP, Value_Ptr, Node_Ptr->Value, User_Args);
|
answer = ND_Manager_Exec_I( Node_Ptr->Root, Node_Ptr->Index, Node_Ptr, NDD_CMD_VALUE_COMP, Value_Ptr, Node_Ptr->Value, User_Args_Ptr);
|
||||||
|
|
||||||
/* Noeud trouvé */
|
/* Noeud trouvé */
|
||||||
|
|
||||||
@ -4698,9 +4755,9 @@ NDT_Node *ND_Tree_Node_Recursive_Find( NDT_Node *Node_Ptr, void *Value_Ptr, v
|
|||||||
|
|
||||||
/* Continuation de la recherche par appel récursif */
|
/* Continuation de la recherche par appel récursif */
|
||||||
|
|
||||||
if( answer == NDS_LOWER) return( ND_Tree_Node_Recursive_Find( Node_Ptr->Left, Value_Ptr, User_Args));
|
if( answer == NDS_LOWER) return( ND_Tree_Node_Recursive_Find( Node_Ptr->Left, Value_Ptr, User_Args_Ptr));
|
||||||
|
|
||||||
if( answer == NDS_GREATER) return( ND_Tree_Node_Recursive_Find( Node_Ptr->Right, Value_Ptr, User_Args));
|
if( answer == NDS_GREATER) return( ND_Tree_Node_Recursive_Find( Node_Ptr->Right, Value_Ptr, User_Args_Ptr));
|
||||||
|
|
||||||
return( NULL);
|
return( NULL);
|
||||||
}
|
}
|
||||||
@ -4709,9 +4766,9 @@ NDT_Node *ND_Tree_Node_Recursive_Find( NDT_Node *Node_Ptr, void *Value_Ptr, v
|
|||||||
|
|
||||||
/*-------------------------------- main body ---------------------------------*/
|
/*-------------------------------- main body ---------------------------------*/
|
||||||
|
|
||||||
NDT_Node *ND_Tree_Node_Find( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void *Value_Ptr, va_list User_Args)
|
NDT_Node *ND_Tree_Node_Find( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void *Value_Ptr, va_list *User_Args_Ptr)
|
||||||
{
|
{
|
||||||
return( ND_Tree_Node_Recursive_Find( Root_Ptr->Index_Tab[Index_Id].Head, Value_Ptr, User_Args));
|
return( ND_Tree_Node_Recursive_Find( Root_Ptr->Index_Tab[Index_Id].Head, Value_Ptr, User_Args_Ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,19 +1,10 @@
|
|||||||
/*----------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* $Workfile: libnode.h $ */
|
/* $RCSfile: libnode.h,v $ */
|
||||||
/*----------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
/* $Revision: 1.2 $ */
|
||||||
|
/* $Name: $ */
|
||||||
|
/* $Date: 2010/06/06 22:20:17 $ */
|
||||||
/* $Author: agibert $ */
|
/* $Author: agibert $ */
|
||||||
/* $Date: 2008/11/12 02:25:23 $ */
|
|
||||||
/* $Revision: 1.1 $ */
|
|
||||||
/* $Label: $ */
|
|
||||||
/*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
|
||||||
/* %RCSfile: libnode.h,v % */
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
|
||||||
/* %Revision: 2.9 % */
|
|
||||||
/* %Name: libnode-2_1_0-1 % */
|
|
||||||
/* %Date: 2005/01/19 23:59:42 % */
|
|
||||||
/* %Author: agibert % */
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
@ -136,14 +127,14 @@ NDT_Base NDG_Base =
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) va_list Arguments : Liste d'arguments contextuels */
|
/* (I) va_list Arguments : Liste d'arguments contextuels */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_Default_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
NDT_Status ND_Default_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* OpenStruct Manager */
|
/* OpenStruct Manager */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) va_list Arguments : Liste d'arguments contextuels */
|
/* (I) va_list Arguments : Liste d'arguments contextuels */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_OpenStruct_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
NDT_Status ND_OpenStruct_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Redéfinition de la fonction malloc() avec retour de type NDT_Status */
|
/* Redéfinition de la fonction malloc() avec retour de type NDT_Status */
|
||||||
@ -242,12 +233,12 @@ NDT_Status ND_List_Make( NDT_Root *, NDT_Index_Id);
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Recherche une valeur dans une liste et retourne le noeud correspondant */
|
/* Recherche une valeur dans une liste et retourne le noeud correspondant */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Node *ND_List_Node_Find( NDT_Root *, NDT_Index_Id, void *, va_list);
|
NDT_Node *ND_List_Node_Find( NDT_Root *, NDT_Index_Id, void *, va_list *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Recherche un noeud dans un arbre et retourne le pointeur sur le noeud */
|
/* Recherche un noeud dans un arbre et retourne le pointeur sur le noeud */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Node *ND_Tree_Node_Find( NDT_Root *, NDT_Index_Id, void *, va_list);
|
NDT_Node *ND_Tree_Node_Find( NDT_Root *, NDT_Index_Id, void *, va_list *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Conversion d'une structure en arbre binaire */
|
/* Conversion d'une structure en arbre binaire */
|
||||||
@ -337,7 +328,7 @@ NDT_Node *ND_Tree_Node_First_Recursive_Get( NDT_Node *);
|
|||||||
|
|
||||||
NDT_Node *ND_Tree_Node_Last_Recursive_Get( NDT_Node *);
|
NDT_Node *ND_Tree_Node_Last_Recursive_Get( NDT_Node *);
|
||||||
|
|
||||||
NDT_Node *ND_Tree_Node_Recursive_Find( NDT_Node *, void *, va_list);
|
NDT_Node *ND_Tree_Node_Recursive_Find( NDT_Node *, void *, va_list *);
|
||||||
|
|
||||||
NDT_Node *ND_Tree_Parent_Next_Recursive_Get( NDT_Node *);
|
NDT_Node *ND_Tree_Parent_Next_Recursive_Get( NDT_Node *);
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* %RCSfile: ndbench.c,v % */
|
/* $RCSfile: ndbench.c,v $ */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* %Revision: 2.9 % */
|
/* $Revision: 1.2 $ */
|
||||||
/* %Name: libnode-2_1_0-1 % */
|
/* $Name: $ */
|
||||||
/* %Date: 2005/01/20 00:07:27 % */
|
/* $Date: 2010/06/06 22:20:17 $ */
|
||||||
/* %Author: agibert % */
|
/* $Author: agibert $ */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
@ -59,7 +59,7 @@
|
|||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef _LIBVER_SUPPORT
|
#ifdef _LIBVER_SUPPORT
|
||||||
VER_INFO_EXPORT( ndbench, "%Revision: 2.9 %", "%Name: libnode-2_1_0-1 %", __FILE__, "%Author: agibert %");
|
VER_INFO_EXPORT( ndbench, "$Revision: 1.2 $", "$Name: $", __FILE__, "$Author: agibert $");
|
||||||
# define USAGE "Usage : %s [ --help | --version [-v] | --batch_run <batch_file_name>]\n"
|
# define USAGE "Usage : %s [ --help | --version [-v] | --batch_run <batch_file_name>]\n"
|
||||||
#else
|
#else
|
||||||
# define USAGE "Usage : %s [ --help | --batch_run <batch_file_name>]\n"
|
# define USAGE "Usage : %s [ --help | --batch_run <batch_file_name>]\n"
|
||||||
@ -200,7 +200,7 @@ NDT_Index_Type idx_type_balanced_tree = NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYP
|
|||||||
/* Prototype */
|
/* Prototype */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status Module_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
NDT_Status Module_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list *);
|
||||||
|
|
||||||
void Menu_Print( FILE *, NDT_Root *);
|
void Menu_Print( FILE *, NDT_Root *);
|
||||||
void Command_Get( int *, char **, char **, FILE *, FILE *, short);
|
void Command_Get( int *, char **, char **, FILE *, FILE *, short);
|
||||||
@ -258,7 +258,7 @@ Command Command_Tab[] =
|
|||||||
/* */
|
/* */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list Args)
|
NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list *Args_Ptr)
|
||||||
{
|
{
|
||||||
NDT_Command_Name Command_Name;
|
NDT_Command_Name Command_Name;
|
||||||
|
|
||||||
@ -267,11 +267,12 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
|||||||
{
|
{
|
||||||
case NDD_CMD_MANAGER_VERSION:
|
case NDD_CMD_MANAGER_VERSION:
|
||||||
{
|
{
|
||||||
NDT_Version_Name *Version_Name_Ptr = (NDT_Version_Name *)va_arg( Args, NDT_Version_Name *);
|
ND_VA_ARG_GET( Version_Name_Ptr, *Args_Ptr, NDT_Version_Name *);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
||||||
|
|
||||||
*Version_Name_Ptr = "%Revision: 2.9 % %Name: libnode-2_1_0-1 % %Date: 2005/01/20 00:07:27 % %Author: agibert %";
|
*Version_Name_Ptr = "$Revision: 1.2 $ $Name: $ $Date: 2010/06/06 22:20:17 $ $Author: agibert $";
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
@ -279,15 +280,15 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
|||||||
case NDD_CMD_INDEX_GET:
|
case NDD_CMD_INDEX_GET:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
|
ND_VA_ARG_GET( Reply_Index_Id_Ptr, *Args_Ptr, NDT_Index_Id *);
|
||||||
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
|
ND_VA_ARG_GET( Reply_Command_Ptr, *Args_Ptr, NDT_Command *);
|
||||||
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
|
ND_VA_ARG_GET( Cmd, *Args_Ptr, NDT_Command);
|
||||||
void *Value_ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
*/
|
*/
|
||||||
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
|
ND_VA_ARG_GET( Reply_Index_Id_Ptr, *Args_Ptr, NDT_Index_Id *);
|
||||||
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
|
ND_VA_ARG_GET( Reply_Command_Ptr, *Args_Ptr, NDT_Command *);
|
||||||
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
|
ND_VA_ARG_GET( Cmd, *Args_Ptr, NDT_Command);
|
||||||
T_Module **Module_Ptr_Ptr = (T_Module **)va_arg( Args, T_Module **);
|
ND_VA_ARG_GET( Module_Ptr_Ptr, *Args_Ptr, T_Module **);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_INDEX_GET";
|
Command_Name = "NDD_CMD_INDEX_GET";
|
||||||
@ -318,15 +319,23 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
|||||||
case NDD_CMD_VALUE_ALLOC:
|
case NDD_CMD_VALUE_ALLOC:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void **Value_Ptr_Ptr = (void **)va_arg( Args, void **);
|
ND_VA_ARG_GET( Value_Ptr_Ptr, *Args_Ptr, void **);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
T_Module **Module_Ptr_Ptr = (T_Module **)va_arg( Args, T_Module **);
|
ND_VA_ARG_GET( Module_Ptr_Ptr, *Args_Ptr, T_Module **);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
char *Nom = (char *)va_arg( user_args, char *);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
int Id = (int)va_arg( user_args, int);
|
|
||||||
|
ND_VA_ARG_GET( Nom, user_args, char *);
|
||||||
|
ND_VA_ARG_GET( Id, user_args, int);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_VALUE_ALLOC";
|
Command_Name = "NDD_CMD_VALUE_ALLOC";
|
||||||
@ -348,12 +357,16 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
|||||||
case NDD_CMD_VALUE_FREE:
|
case NDD_CMD_VALUE_FREE:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
T_Module *Module_Ptr = (T_Module *)va_arg( Args, T_Module *);
|
ND_VA_ARG_GET( Module_Ptr, *Args_Ptr, T_Module *);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_VALUE_FREE";
|
Command_Name = "NDD_CMD_VALUE_FREE";
|
||||||
@ -368,14 +381,18 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
|||||||
case NDD_CMD_VALUE_COMP:
|
case NDD_CMD_VALUE_COMP:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value1_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value1_Ptr, *Args_Ptr, void *);
|
||||||
void *Value2_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value2_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
T_Module *Value1 = (T_Module *)va_arg( Args, T_Module *);
|
ND_VA_ARG_GET( Module1_Ptr, *Args_Ptr, T_Module *);
|
||||||
T_Module *Value2 = (T_Module *)va_arg( Args, T_Module *);
|
ND_VA_ARG_GET( Module2_Ptr, *Args_Ptr, T_Module *);
|
||||||
|
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_VALUE_COMP";
|
Command_Name = "NDD_CMD_VALUE_COMP";
|
||||||
@ -385,7 +402,7 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
|||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
|
||||||
rc = Value1->Id - Value2->Id;
|
rc = Module1_Ptr->Id - Module2_Ptr->Id;
|
||||||
|
|
||||||
if( rc < 0)
|
if( rc < 0)
|
||||||
{
|
{
|
||||||
@ -415,10 +432,14 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
|||||||
case NDD_CMD_VALUE_ADD:
|
case NDD_CMD_VALUE_ADD:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -430,10 +451,14 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
|||||||
case NDD_CMD_VALUE_REMOVE:
|
case NDD_CMD_VALUE_REMOVE:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -444,22 +469,35 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
|||||||
case NDD_CMD_VALUE_PRINT:
|
case NDD_CMD_VALUE_PRINT:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
|
||||||
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
ND_VA_LIST_OPEN( lib_args, *Args_Ptr);
|
||||||
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
|
||||||
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
ND_VA_ARG_GET( Out, lib_args, FILE *);
|
||||||
va_list user_args = (va_list)va_arg( lib_args, va_list);
|
ND_VA_ARG_GET( Recursive_Mode, lib_args, NDT_Recursive_Mode);
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
ND_VA_ARG_GET( Recursive_Depth, lib_args, NDT_Recursive_Depth);
|
||||||
... = (...)va_arg( user_args, ...);
|
ND_VA_ARG_GET( Recursive_Offset, lib_args, NDT_Recursive_Offset);
|
||||||
|
|
||||||
|
ND_VA_LIST_OPEN( user_args, lib_args);
|
||||||
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
|
ND_VA_LIST_CLOSE( lib_args);
|
||||||
|
|
||||||
void *Value_Ptr = Node_Ptr->Value;
|
void *Value_Ptr = Node_Ptr->Value;
|
||||||
*/
|
*/
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
|
||||||
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
ND_VA_LIST_OPEN( lib_args, *Args_Ptr);
|
||||||
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
|
||||||
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
ND_VA_ARG_GET( Out, lib_args, FILE *);
|
||||||
|
ND_VA_ARG_GET( Recursive_Mode, lib_args, NDT_Recursive_Mode);
|
||||||
|
ND_VA_ARG_GET( Recursive_Depth, lib_args, NDT_Recursive_Depth);
|
||||||
|
ND_VA_ARG_GET( Recursive_Offset, lib_args, NDT_Recursive_Offset);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( lib_args);
|
||||||
|
|
||||||
T_Module *Module_Ptr = Node_Ptr->Value;
|
T_Module *Module_Ptr = Node_Ptr->Value;
|
||||||
|
|
||||||
@ -474,16 +512,22 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
|||||||
case NDD_CMD_INFO_PRINT:
|
case NDD_CMD_INFO_PRINT:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
|
||||||
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
|
||||||
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
|
||||||
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
|
||||||
va_list user_args = (va_list)va_arg( lib_args, va_list);
|
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
|
||||||
... = (...)va_arg( user_args, ...);
|
|
||||||
|
|
||||||
void *Value_Ptr = Node_Ptr->Value;
|
ND_VA_LIST_OPEN( lib_args, *Args_Ptr);
|
||||||
|
|
||||||
|
ND_VA_ARG_GET( Out, lib_args, FILE *);
|
||||||
|
ND_VA_ARG_GET( Recursive_Mode, lib_args, NDT_Recursive_Mode);
|
||||||
|
ND_VA_ARG_GET( Recursive_Depth, lib_args, NDT_Recursive_Depth);
|
||||||
|
ND_VA_ARG_GET( Recursive_Offset, lib_args, NDT_Recursive_Offset);
|
||||||
|
|
||||||
|
ND_VA_LIST_OPEN( user_args, lib_args);
|
||||||
|
|
||||||
|
ND_VA_ARG_GET( user_data, user_args, user_type);
|
||||||
|
ND_VA_ARG_GET( ..., user_args, ...);
|
||||||
|
|
||||||
|
ND_VA_LIST_CLOSE( user_args);
|
||||||
|
ND_VA_LIST_CLOSE( lib_args);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
BIN
src/libnode/util/ndbench.xls
Normal file
BIN
src/libnode/util/ndbench.xls
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user