Compare commits

..

No commits in common. "7afac7d3499d3886ba53183bf3735590e9778a57" and "b477d4b15497aa287c5bb5697a7c752e9865f24f" have entirely different histories.

9 changed files with 432 additions and 953 deletions

View File

@ -1,7 +1,7 @@
# $RCSfile: Makefile.rule,v $
# $Revision: 1.5 $
# $Revision: 1.4 $
# $Name: $
# $Date: 2010/06/06 21:28:14 $
# $Date: 2003/07/16 23:37:37 $
# $Author: agibert $
#------------------------------------------------------------------------------
@ -20,7 +20,7 @@ default:all
# Here are all the rules allowing to compile sources files
# c -> o
%.o:%.c
$(CC) $(CFLAGS) $(INCLUDE) -fPIC -c $< -o $@
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
# c -> executable
.c :

View File

@ -1,19 +1,19 @@
# $RCSfile: ReadMe.txt,v $
# $Revision: 2.10 $
# $Revision: 2.8 $
# $Name: $
# $Date: 2010/06/06 21:38:28 $
# $Date: 2005/01/24 01:19:50 $
# $Author: agibert $
Welcome to LibNode 2.2.x !
Welcome to LibNode 2.1.x !
This release of LibNode supports the following OS:
- Linux 2.2.x, 2.4.x and 2.6.x (tested on RedHat & Mandriva),
- Linux 2.2.x, 2.4.x and 2.6.x (tested on RedHat & Mandrake),
- Solaris 2.6,
- Windows NT4, 2000 and XP.
@ -41,4 +41,4 @@ Enjoy it!
Your LibNode Team.
arnaud@rx3.net
http://www.rx3.org/dvp/?dvp=libnode
http://www.rx3.org/dvp/libnode

View File

@ -1,28 +1,13 @@
# $RCSfile: ReleaseNotes.txt,v $
# $Revision: 2.22 $
# $Revision: 2.20 $
# $Name: $
# $Date: 2010/06/06 21:30:59 $
# $Date: 2005/01/24 00:50:55 $
# $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
------------------------------------------------------------------------------------------------------------------------------------

View File

@ -1,9 +1,9 @@
/*---------------------------------------------------------------------------------*/
/* $RCSfile: nddemo0.c,v $ */
/*---------------------------------------------------------------------------------*/
/* $Revision: 2.9 $ */
/* $Revision: 2.8 $ */
/* $Name: $ */
/* $Date: 2010/06/06 21:27:12 $ */
/* $Date: 2004/08/23 22:48:37 $ */
/* $Author: agibert $ */
/*---------------------------------------------------------------------------------*/
@ -64,7 +64,7 @@ typedef struct Demo_Value
/* 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 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_Ptr)
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_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:
{
ND_VA_ARG_GET( Version_Name_Ptr, *Args_Ptr, NDT_Version_Name *);
NDT_Version_Name *Version_Name_Ptr = (NDT_Version_Name *)va_arg( Args, NDT_Version_Name *);
Command_Name = "NDD_CMD_MANAGER_VERSION";
*Version_Name_Ptr = "$Revision: 2.9 $ $Name: $ $Date: 2010/06/06 21:27:12 $ $Author: agibert $";
*Version_Name_Ptr = "$Revision: 2.8 $ $Name: $ $Date: 2004/08/23 22:48:37 $ $Author: agibert $";
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:
{
/*
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 *);
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
void *Value_ptr = (void *)va_arg( Args, 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, Demo_Value *);
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
Demo_Value *Value_ptr = (Demo_Value *)va_arg( Args, Demo_Value *);
Command_Name = "NDD_CMD_INDEX_GET";
@ -159,15 +159,12 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
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);
void **Value_Ptr_Ptr = (void **)va_arg( Args, 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, ...);
*/
ND_VA_ARG_GET( Value_Ptr_Ptr, *Args_Ptr, Demo_Value **);
Demo_Value **Value_Ptr_Ptr = va_arg( Args, Demo_Value **);
Command_Name = "NDD_CMD_VALUE_ALLOC";
@ -190,15 +187,12 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
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);
void *Value_Ptr = (void *)va_arg( Args, 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, ...);
*/
ND_VA_ARG_GET( Value_Ptr, *Args_Ptr, Demo_Value *);
Demo_Value *Value_Ptr = (Demo_Value *)va_arg( Args, Demo_Value *);
Command_Name = "NDD_CMD_VALUE_FREE";
@ -211,17 +205,14 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
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);
void *Value1_Ptr = (void *)va_arg( Args, void *);
void *Value2_Ptr = (void *)va_arg( Args, 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, ...);
*/
ND_VA_ARG_GET( Value1_Ptr, *Args_Ptr, Demo_Value *);
ND_VA_ARG_GET( Value2_Ptr, *Args_Ptr, Demo_Value *);
Demo_Value *Value1_Ptr = va_arg( Args, Demo_Value *);
Demo_Value *Value2_Ptr = va_arg( Args, Demo_Value *);
Command_Name = "NDD_CMD_VALUE_COMP";
@ -311,17 +302,12 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
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);
void *Value_Ptr = (void *)va_arg( Args, 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, ...);
*/
Command_Name = "NDD_CMD_VALUE_ADD";
return( NDS_OK);
@ -330,54 +316,36 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
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);
void *Value_Ptr = (void *)va_arg( Args, 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, ...);
*/
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 *);
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, 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, ...);
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;
*/
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_CLOSE( lib_args);
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, 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);
Demo_Value *Value_Ptr = Node_Ptr->Value;
@ -393,25 +361,18 @@ NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
case NDD_CMD_INFO_PRINT:
{
/*
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, 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, ...);
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_INFO_PRINT";
return( NDS_OK);
@ -448,7 +409,7 @@ void DataStruct_Load( NDT_Root *ds_ptr, FILE *demo_file)
while( !feof( demo_file))
{
str = fgets( input_string, STRING_SIZE, demo_file);
if( str != NULL)
if( ( (const int)str != EOF) && ( str != NULL))
{
if( strlen( input_string) >= STRING_LEN)
{

View File

@ -1,9 +1,9 @@
/*---------------------------------------------------------------------------------*/
/* $RCSfile: node.h,v $ */
/*---------------------------------------------------------------------------------*/
/* $Revision: 2.13 $ */
/* $Revision: 2.12 $ */
/* $Name: $ */
/* $Date: 2010/06/06 21:26:31 $ */
/* $Date: 2005/01/20 00:00:25 $ */
/* $Author: agibert $ */
/*---------------------------------------------------------------------------------*/
@ -151,349 +151,6 @@ 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: 2.13 $ $Name: $ $Date: 2010/06/06 21:26:31 $ $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 */
typedef int NDT_Command;
@ -559,7 +216,7 @@ struct NDT_Node;
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 */
@ -896,8 +553,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) 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_VC( 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_I( NDT_Root *, NDT_Command, ...);
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_C( NDT_Root *, NDT_Command, ...);
@ -943,7 +600,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) 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_C( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
@ -958,8 +615,8 @@ NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_C( FILE *, NDT_Root *, NDT_
/* (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_VC( 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_I( void **, NDT_Root *, void *, ...);
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_C( void **, NDT_Root *, void *, ...);
@ -1046,8 +703,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) 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_VC( 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_I( NDT_Root *, NDT_Index_Id, NDT_Command, ...);
NDD_DLL_API NDT_Status ND_Index_Traverse_C( NDT_Root *, NDT_Index_Id, NDT_Command, ...);
@ -1095,7 +752,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) 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_C( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
@ -1174,8 +831,8 @@ NDD_DLL_API NDT_Status ND_Index_Node_Previous_Get_C( NDT_Node **, NDT_Node *)
/* (I) Value : pointeur sur la valeur à rechercher */
/* (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_VC( 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_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 *, ...);
@ -1220,8 +877,8 @@ NDD_DLL_API NDT_Status ND_Value_Free_C( NDT_Root *, void *);
/*------------------------------------------------------------------------------*/
/* (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_VC( 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_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, ...);

View File

@ -1,9 +1,9 @@
/*---------------------------------------------------------------------------------*/
/* $RCSfile: libnode.c,v $ */
/*---------------------------------------------------------------------------------*/
/* $Revision: 2.17 $ */
/* $Revision: 2.15 $ */
/* $Name: $ */
/* $Date: 2010/06/06 21:26:31 $ */
/* $Date: 2005/01/19 23:59:41 $ */
/* $Author: agibert $ */
/*---------------------------------------------------------------------------------*/
@ -34,7 +34,7 @@
#include <libnode.h>
#ifdef _LIBVER_SUPPORT
VER_INFO_EXPORT( libnode, "$Revision: 2.17 $", "$Name: $", __FILE__, "$Author: agibert $")
VER_INFO_EXPORT( libnode, "$Revision: 2.15 $", "$Name: $", __FILE__, "$Author: agibert $")
#endif
@ -49,7 +49,7 @@ VER_INFO_EXPORT( libnode, "$Revision: 2.17 $", "$Name: $", __FILE__, "$Author:
/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/
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_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list Args)
{
NDT_Command_Name Command_Name;
@ -58,12 +58,12 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
{
case NDD_CMD_MANAGER_VERSION:
{
ND_VA_ARG_GET( Version_Name_Ptr, *Args_Ptr, NDT_Version_Name *);
NDT_Version_Name *Version_Name_Ptr = (NDT_Version_Name *)va_arg( Args, NDT_Version_Name *);
Command_Name = "NDD_CMD_MANAGER_VERSION";
*Version_Name_Ptr = "$Revision: 2.17 $ $Name: $ $Date: 2010/06/06 21:26:31 $ $Author: agibert $";
*Version_Name_Ptr = "$Revision: 2.15 $ $Name: $ $Date: 2005/01/19 23:59:41 $ $Author: agibert $";
return( NDS_OK);
}
@ -71,15 +71,15 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
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 *);
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
void *Value_ptr = (void *)va_arg( Args, 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 *);
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
void *Value_ptr = (void *)va_arg( Args, void *);
Command_Name = "NDD_CMD_INDEX_GET";
@ -111,14 +111,10 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
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);
void **Value_Ptr_Ptr = (void **)va_arg( Args, 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, ...);
*/
@ -141,14 +137,10 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
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);
void *Value_Ptr = (void *)va_arg( Args, 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, ...);
*/
@ -164,15 +156,11 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
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);
void *Value1_Ptr = (void *)va_arg( Args, void *);
void *Value2_Ptr = (void *)va_arg( Args, 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, ...);
*/
@ -239,22 +227,18 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
return( NDS_KO);
}
}
*/
return( NDS_OK);
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);
void *Value_Ptr = (void *)va_arg( Args, 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, ...);
*/
@ -268,14 +252,10 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
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);
void *Value_Ptr = (void *)va_arg( Args, 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, ...);
*/
@ -288,22 +268,15 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
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);
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, 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;
*/
@ -321,22 +294,17 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
case NDD_CMD_INFO_PRINT:
{
/*
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, 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, ...);
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;
*/
@ -350,15 +318,10 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
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);
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, 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);
... = (...)va_arg( user_args, ...);
void *Value_Ptr = Node_Ptr->Value;
*/
@ -392,7 +355,7 @@ NDT_Status ND_Default_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
/* 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_Ptr)
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_Command_Name Command_Name;
@ -401,12 +364,12 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
{
case NDD_CMD_MANAGER_VERSION:
{
ND_VA_ARG_GET( Version_Name_Ptr, *Args_Ptr, NDT_Version_Name *);
NDT_Version_Name *Version_Name_Ptr = (NDT_Version_Name *)va_arg( Args, NDT_Version_Name *);
Command_Name = "NDD_CMD_MANAGER_VERSION";
*Version_Name_Ptr = "$Revision: 2.17 $ $Name: $ $Date: 2010/06/06 21:26:31 $ $Author: agibert $";
*Version_Name_Ptr = "$Revision: 2.15 $ $Name: $ $Date: 2005/01/19 23:59:41 $ $Author: agibert $";
return( NDS_OK);
}
@ -414,15 +377,15 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
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 *);
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
void *Value_ptr = (void *)va_arg( Args, 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 *);
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
void *Value_ptr = (void *)va_arg( Args, void *);
Command_Name = "NDD_CMD_INDEX_GET";
@ -443,14 +406,10 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
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);
void **Value_Ptr_Ptr = (void **)va_arg( Args, 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, ...);
*/
@ -462,14 +421,10 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
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);
void *Value_Ptr = (void *)va_arg( Args, 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, ...);
*/
@ -481,18 +436,15 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
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);
void *Value1_Ptr = (void *)va_arg( Args, void *);
void *Value2_Ptr = (void *)va_arg( Args, 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, ...);
*/
ND_VA_ARG_GET( Value1_Ptr, *Args_Ptr, void *);
ND_VA_ARG_GET( Value2_Ptr, *Args_Ptr, void *);
void *Value1_Ptr = (void *)va_arg( Args, void *);
void *Value2_Ptr = (void *)va_arg( Args, void *);
Command_Name = "NDD_CMD_VALUE_COMP";
@ -531,14 +483,10 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
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);
void *Value_Ptr = (void *)va_arg( Args, 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, ...);
*/
@ -550,14 +498,10 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
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);
void *Value_Ptr = (void *)va_arg( Args, 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, ...);
*/
@ -569,22 +513,15 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
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);
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, 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;
*/
@ -598,33 +535,25 @@ NDT_Status ND_OpenStruct_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
case NDD_CMD_INFO_PRINT:
{
/*
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, 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, ...);
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;
*/
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_CLOSE( lib_args);
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, 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);
void *Value_Ptr = Node_Ptr->Value;
@ -678,7 +607,7 @@ NDT_Status ND_Library_Open_I( int Debug_Mode)
#if !defined(_WIN32)
if( ( NDG_Base.DL_Ptr = dlopen( NULL, ( RTLD_NOW | RTLD_GLOBAL))) == NULL)
{
sprintf( NDG_Base.Err_String, "Error ND_Library_Open_I: can't dlopen [%s]", dlerror());
sprintf( NDG_Base.Err_String, "Error ND_Library_Open: can't dlopen [%s]", dlerror());
ND_Error_Print();
return( NDS_KO);
@ -755,7 +684,7 @@ NDT_Status ND_Library_Close_I( void)
#if !defined(_WIN32)
if( dlclose( NDG_Base.DL_Ptr) != 0)
{
sprintf( NDG_Base.Err_String, "Error ND_Library_Close_I: can't dlclose [%s]", dlerror());
sprintf( NDG_Base.Err_String, "Error ND_Library_Open: can't dlclose [%s]", dlerror());
ND_Error_Print();
return( NDS_KO);
@ -1107,7 +1036,7 @@ NDT_Status ND_DataStruct_Open_C( NDT_Root **Root_Ptr_Ptr, NDT_Index_Nb Index_
return( status);
}
if( ( NDG_Base.Debug_Mode == NDD_TRUE) && ( Manager_Ptr != NULL) && ( NDG_Base.Open_Status == NDD_TRUE))
if( ( NDG_Base.Debug_Mode == NDD_TRUE) && ( NDG_Base.Open_Status == NDD_TRUE))
{
if( ( status = ND_DataStruct_Value_Add_I( NDG_Base.OpenStruct_Ptr, (void **)*Root_Ptr_Ptr)) != NDS_OK)
{
@ -1933,7 +1862,7 @@ NDT_Status ND_DataStruct_Reorg_C( NDT_Root *Root_Ptr)
/* (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_Ptr)
NDT_Status ND_Index_Traverse_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Command Command, va_list Args)
{
NDT_Status rc;
NDT_Node *Node_Ptr, *Next_Node_Ptr;
@ -1952,7 +1881,7 @@ NDT_Status ND_Index_Traverse_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, ND
case NDD_CMD_VALUE_FREE:
{
rc = ND_Manager_Exec_I( Root_Ptr, Index_Id, Node_Ptr, Command, Node_Ptr->Value, Args_Ptr);
rc = ND_Manager_Exec_I( Root_Ptr, Index_Id, Node_Ptr, Command, Node_Ptr->Value, Args);
if (ND_ERROR( rc)) return rc;
rc = ND_Index_Node_Remove_I( Node_Ptr);
@ -1966,7 +1895,7 @@ NDT_Status ND_Index_Traverse_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, ND
default:
{
rc = ND_Manager_Exec_I( Root_Ptr, Index_Id, Node_Ptr, Command, Next_Node_Ptr, Args_Ptr);
rc = ND_Manager_Exec_I( Root_Ptr, Index_Id, Node_Ptr, Command, Next_Node_Ptr, Args);
if (ND_ERROR( rc)) return rc;
break;
@ -1992,7 +1921,7 @@ NDT_Status ND_Index_Traverse_VI( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, ND
/* (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_Ptr)
NDT_Status ND_Index_Traverse_VC( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Command Command, va_list Args)
{
if( NDG_Base.Open_Status != NDD_TRUE)
{
@ -2010,7 +1939,7 @@ NDT_Status ND_Index_Traverse_VC( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, N
return( NDS_ERRAPI);
}
return( ND_Index_Traverse_VI( Root_Ptr, Index_Id, Command, Args_Ptr));
return( ND_Index_Traverse_VI( Root_Ptr, Index_Id, Command, Args));
}
@ -2050,7 +1979,7 @@ NDT_Status ND_Index_Traverse_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
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);
status = ND_Index_Node_Remove_I( Node_Ptr);
@ -2064,7 +1993,7 @@ NDT_Status ND_Index_Traverse_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
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);
break;
@ -2116,7 +2045,7 @@ NDT_Status ND_Index_Traverse_C( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, ND
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);
@ -2136,7 +2065,7 @@ NDT_Status ND_Index_Traverse_C( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, ND
/* (I) Data : pointeur de données utilisateur */
/*------------------------------------------------------------------------------*/
NDT_Status ND_DataStruct_Traverse_VI( NDT_Root *Root_Ptr, NDT_Command Command, va_list *Args_Ptr)
NDT_Status ND_DataStruct_Traverse_VI( NDT_Root *Root_Ptr, NDT_Command Command, va_list Args)
{
NDT_Status status;
NDT_Index_Id new_index;
@ -2146,7 +2075,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);
if( ND_ERROR(status)) return( status);
return( ND_Index_Traverse_VI( Root_Ptr, new_index, new_cmd, Args_Ptr));
return( ND_Index_Traverse_VI( Root_Ptr, new_index, new_cmd, Args));
}
@ -2162,7 +2091,7 @@ NDT_Status ND_DataStruct_Traverse_VI( NDT_Root *Root_Ptr, NDT_Command Command,
/* (I) Data : pointeur de données utilisateur */
/*------------------------------------------------------------------------------*/
NDT_Status ND_DataStruct_Traverse_VC( NDT_Root *Root_Ptr, NDT_Command Command, va_list *Args_Ptr)
NDT_Status ND_DataStruct_Traverse_VC( NDT_Root *Root_Ptr, NDT_Command Command, va_list Args)
{
if( NDG_Base.Open_Status != NDD_TRUE)
{
@ -2179,7 +2108,7 @@ NDT_Status ND_DataStruct_Traverse_VC( NDT_Root *Root_Ptr, NDT_Command Command
return( NDS_ERRAPI);
}
return( ND_DataStruct_Traverse_VI( Root_Ptr, Command, Args_Ptr));
return( ND_DataStruct_Traverse_VI( Root_Ptr, Command, Args));
}
@ -2208,7 +2137,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);
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);
@ -2252,7 +2181,7 @@ NDT_Status ND_DataStruct_Traverse_C( NDT_Root *Root_Ptr, NDT_Command Command,
return( NDS_ERRAPI);
}
status = ND_DataStruct_Traverse_VI( Root_Ptr, Command, &args);
status = ND_DataStruct_Traverse_VI( Root_Ptr, Command, args);
va_end( args);
@ -2738,12 +2667,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) 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_Ptr)
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 status;
status = ND_Index_Traverse_I( Root_Ptr, Index_Id, NDD_CMD_VALUE_PRINT, Out, Recursive_Mode, Recursive_Depth, Recursive_Offset, Args_Ptr);
status = ND_Index_Traverse_I( Root_Ptr, Index_Id, NDD_CMD_VALUE_PRINT, Out, Recursive_Mode, Recursive_Depth, Recursive_Offset, Args);
return( status);
}
@ -2766,7 +2695,7 @@ NDT_Status ND_Index_Value_Print_I( FILE *Out, NDT_Root *Root_Ptr, NDT_Index_Id
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);
@ -2816,7 +2745,7 @@ NDT_Status ND_Index_Value_Print_C( FILE *Out, NDT_Root *Root_Ptr, NDT_Index_I
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);
@ -2833,11 +2762,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) 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_Ptr)
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 status;
status = ND_DataStruct_Traverse_I( Root_Ptr, NDD_CMD_VALUE_PRINT, Out, Recursive_Mode, Recursive_Depth, Recursive_Offset, User_Args_Ptr);
status = ND_DataStruct_Traverse_I( Root_Ptr, NDD_CMD_VALUE_PRINT, Out, Recursive_Mode, Recursive_Depth, Recursive_Offset, User_Args);
return( status);
}
@ -2860,7 +2789,7 @@ NDT_Status ND_DataStruct_Value_Print_I( FILE *Out, NDT_Root *Root_Ptr, NDT_Rec
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);
@ -2910,7 +2839,7 @@ NDT_Status ND_DataStruct_Value_Print_C( FILE *Out, NDT_Root *Root_Ptr, NDT_Re
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);
@ -3372,15 +3301,15 @@ NDT_Status ND_Index_Node_Previous_Get_C( NDT_Node **Prev_Node_Ptr_Ptr, NDT_Nod
/* (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_Ptr)
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)
{
if( ND_INDEX_TYPE_LIST_IS( Root_Ptr, Index_Id))
{
*Node_Ptr_Ptr = ND_List_Node_Find( Root_Ptr, Index_Id, Value_Ptr, Args_Ptr);
*Node_Ptr_Ptr = ND_List_Node_Find( Root_Ptr, Index_Id, Value_Ptr, Args);
}
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_Ptr);
*Node_Ptr_Ptr = ND_Tree_Node_Find( Root_Ptr, Index_Id, Value_Ptr, Args);
}
else
{
@ -3406,7 +3335,7 @@ NDT_Status ND_Index_Node_Find_VI( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr
/* (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_Ptr)
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 status;
@ -3435,7 +3364,7 @@ NDT_Status ND_Index_Node_Find_VC( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr
return( NDS_ERRAPI);
}
status = ND_Index_Node_Find_VI( Node_Ptr_Ptr, Root_Ptr, Index_Id, Value_Ptr, Args_Ptr);
status = ND_Index_Node_Find_VI( Node_Ptr_Ptr, Root_Ptr, Index_Id, Value_Ptr, Args);
return( status);
@ -3463,11 +3392,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))
{
*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))
{
*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
{
@ -3525,7 +3454,7 @@ NDT_Status ND_Index_Node_Find_C( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr,
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);
@ -3545,7 +3474,7 @@ NDT_Status ND_Index_Node_Find_C( NDT_Node **Node_Ptr_Ptr, NDT_Root *Root_Ptr,
/* (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_Ptr)
NDT_Status ND_DataStruct_Value_Find_VI( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, va_list Args)
{
NDT_Status status;
NDT_Index_Id new_index;
@ -3556,7 +3485,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);
if( ND_ERROR(status)) return( status);
status = ND_Index_Node_Find_VI( &node_ptr, Root_Ptr, new_index, Ref_Value_Ptr, Args_Ptr);
status = ND_Index_Node_Find_VI( &node_ptr, Root_Ptr, new_index, Ref_Value_Ptr, Args);
if( ND_ERROR(status)) return( status);
if( node_ptr != NULL)
@ -3584,7 +3513,7 @@ NDT_Status ND_DataStruct_Value_Find_VI( void **Value_Ptr_Ptr, NDT_Root *Root_
/* (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_Ptr)
NDT_Status ND_DataStruct_Value_Find_VC( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, va_list Args)
{
NDT_Status status;
@ -3613,7 +3542,7 @@ NDT_Status ND_DataStruct_Value_Find_VC( void **Value_Ptr_Ptr, NDT_Root *Root_
return( NDS_ERRAPI);
}
status = ND_DataStruct_Value_Find_VI( Value_Ptr_Ptr, Root_Ptr, Ref_Value_Ptr, Args_Ptr);
status = ND_DataStruct_Value_Find_VI( Value_Ptr_Ptr, Root_Ptr, Ref_Value_Ptr, Args);
return( status);
}
@ -3645,7 +3574,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);
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( node_ptr != NULL)
@ -3707,7 +3636,7 @@ NDT_Status ND_DataStruct_Value_Find_C( void **Value_Ptr_Ptr, NDT_Root *Root_P
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);
@ -3788,7 +3717,7 @@ NDT_Status ND_Value_Alloc_I( NDT_Root *Root_Ptr, void **Value_Ptr_Ptr, ...)
/* 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);
@ -3835,7 +3764,7 @@ NDT_Status ND_Value_Alloc_C( NDT_Root *Root_Ptr, void **Value_Ptr_Ptr, ...)
/* 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);
@ -3909,7 +3838,7 @@ NDT_Status ND_Value_Free_C( NDT_Root *Root_Ptr, void *Value_Ptr)
/* (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_Ptr)
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 status;
NDT_Manager *manager_ptr;
@ -3930,7 +3859,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_Ptr);
status = manager_ptr( Root_Ptr, Index_Id, Node_Ptr, Command, Args);
return( status);
}
@ -3944,7 +3873,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 */
/*------------------------------------------------------------------------------*/
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 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 status;
@ -3973,7 +3902,7 @@ NDT_Status ND_Manager_Exec_VC( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT
return( NDS_ERRAPI);
}
status = ND_Manager_Exec_VI( Root_Ptr, Index_Id, Node_Ptr, Command, Args_Ptr);
status = ND_Manager_Exec_VI( Root_Ptr, Index_Id, Node_Ptr, Command, Args);
return( status);
}
@ -4012,7 +3941,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);
@ -4061,7 +3990,7 @@ NDT_Status ND_Manager_Exec_C( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_
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);
@ -4675,7 +4604,7 @@ NDT_Status ND_Tree_Value_Add( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void
/* (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_Ptr)
NDT_Node *ND_List_Node_Find( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void *Value_Ptr, va_list User_Args)
{
NDT_Node *node_ptr;
NDT_Status rc;
@ -4689,7 +4618,7 @@ NDT_Node *ND_List_Node_Find( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void
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_Ptr);
rc = ND_Manager_Exec_I( Root_Ptr, Index_Id, node_ptr, NDD_CMD_VALUE_COMP, Value_Ptr, node_ptr->Value, User_Args);
switch( rc)
{
@ -4717,7 +4646,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 */
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))
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))
{
node_ptr = node_ptr->Right;
}
@ -4740,14 +4669,14 @@ NDT_Node *ND_List_Node_Find( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void
/*------------------------------ Recursive Kernel ------------------------------*/
NDT_Node *ND_Tree_Node_Recursive_Find( NDT_Node *Node_Ptr, void *Value_Ptr, va_list *User_Args_Ptr)
NDT_Node *ND_Tree_Node_Recursive_Find( NDT_Node *Node_Ptr, void *Value_Ptr, va_list User_Args)
{
NDT_Status answer;
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_Ptr);
answer = ND_Manager_Exec_I( Node_Ptr->Root, Node_Ptr->Index, Node_Ptr, NDD_CMD_VALUE_COMP, Value_Ptr, Node_Ptr->Value, User_Args);
/* Noeud trouvé */
@ -4755,9 +4684,9 @@ NDT_Node *ND_Tree_Node_Recursive_Find( NDT_Node *Node_Ptr, void *Value_Ptr, v
/* 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_Ptr));
if( answer == NDS_LOWER) return( ND_Tree_Node_Recursive_Find( Node_Ptr->Left, Value_Ptr, User_Args));
if( answer == NDS_GREATER) return( ND_Tree_Node_Recursive_Find( Node_Ptr->Right, Value_Ptr, User_Args_Ptr));
if( answer == NDS_GREATER) return( ND_Tree_Node_Recursive_Find( Node_Ptr->Right, Value_Ptr, User_Args));
return( NULL);
}
@ -4766,9 +4695,9 @@ NDT_Node *ND_Tree_Node_Recursive_Find( NDT_Node *Node_Ptr, void *Value_Ptr, v
/*-------------------------------- main body ---------------------------------*/
NDT_Node *ND_Tree_Node_Find( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void *Value_Ptr, va_list *User_Args_Ptr)
NDT_Node *ND_Tree_Node_Find( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, void *Value_Ptr, va_list User_Args)
{
return( ND_Tree_Node_Recursive_Find( Root_Ptr->Index_Tab[Index_Id].Head, Value_Ptr, User_Args_Ptr));
return( ND_Tree_Node_Recursive_Find( Root_Ptr->Index_Tab[Index_Id].Head, Value_Ptr, User_Args));
}

View File

@ -1,9 +1,9 @@
/*---------------------------------------------------------------------------------*/
/* $RCSfile: libnode.h,v $ */
/*---------------------------------------------------------------------------------*/
/* $Revision: 2.10 $ */
/* $Revision: 2.9 $ */
/* $Name: $ */
/* $Date: 2010/06/06 21:26:31 $ */
/* $Date: 2005/01/19 23:59:42 $ */
/* $Author: agibert $ */
/*---------------------------------------------------------------------------------*/
@ -127,14 +127,14 @@ NDT_Base NDG_Base =
/*------------------------------------------------------------------------------*/
/* (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 */
/*------------------------------------------------------------------------------*/
/* (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 */
@ -233,12 +233,12 @@ NDT_Status ND_List_Make( NDT_Root *, NDT_Index_Id);
/*------------------------------------------------------------------------------*/
/* 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 */
/*------------------------------------------------------------------------------*/
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 */
@ -328,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_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 *);

View File

@ -1,13 +1,8 @@
Name: libnode
Version: 2.2.0
Version: 2.1.0
Release: 1rx3
%define release_nb 1
Release: %{release_nb}rx3
%define libnode_name %{name}-%{version}-%{release_nb}
%define libnode_name %{name}-%{version}-%{release}
%define source %{libnode_name}.src.tgz
@ -19,8 +14,8 @@ Distribution: Rx3 OpenSource
Vendor: Rx3
Packager: Arnaud G. Gibert <arnaud@rx3.net>
Source: ftp://ftp.rx3.org/pub/arc/dvp/%{source}
Url: http://www.rx3.org/dvp/?dvp=libnode
Source: ftp://ftp.rx3.org/pub/%{source}
Url: http://www.rx3.org/dvp/libnode/download/
BuildRoot: %{_tmppath}/%{libnode_name}-buildroot
AutoReqProv: no
@ -58,10 +53,6 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Sun Jun 6 2010 Arnaud G. Gibert <arnaud@rx3.net> 2.2.0-1rx3
- Update to 2.2.0 release,
- Update Source and URL entry.
* Mon Jan 24 2005 Arnaud G. Gibert <arnaud@rx3.net> 2.1.0-1rx3
- Update to 2.1.0 release,
- Now use "rx3" as release suffix,

View File

@ -1,9 +1,9 @@
/*---------------------------------------------------------------------------------*/
/* $RCSfile: ndbench.c,v $ */
/*---------------------------------------------------------------------------------*/
/* $Revision: 2.10 $ */
/* $Revision: 2.9 $ */
/* $Name: $ */
/* $Date: 2010/06/06 21:27:12 $ */
/* $Date: 2005/01/20 00:07:27 $ */
/* $Author: agibert $ */
/*---------------------------------------------------------------------------------*/
@ -59,7 +59,7 @@
/*---------------------------------------------------------------------------------*/
#ifdef _LIBVER_SUPPORT
VER_INFO_EXPORT( ndbench, "$Revision: 2.10 $", "$Name: $", __FILE__, "$Author: agibert $");
VER_INFO_EXPORT( ndbench, "$Revision: 2.9 $", "$Name: $", __FILE__, "$Author: agibert $");
# define USAGE "Usage : %s [ --help | --version [-v] | --batch_run <batch_file_name>]\n"
#else
# 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 */
/*---------------------------------------------------------------------------------*/
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 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_Ptr)
NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list Args)
{
NDT_Command_Name Command_Name;
@ -267,12 +267,11 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
{
case NDD_CMD_MANAGER_VERSION:
{
ND_VA_ARG_GET( Version_Name_Ptr, *Args_Ptr, NDT_Version_Name *);
NDT_Version_Name *Version_Name_Ptr = (NDT_Version_Name *)va_arg( Args, NDT_Version_Name *);
Command_Name = "NDD_CMD_MANAGER_VERSION";
*Version_Name_Ptr = "$Revision: 2.10 $ $Name: $ $Date: 2010/06/06 21:27:12 $ $Author: agibert $";
*Version_Name_Ptr = "$Revision: 2.9 $ $Name: $ $Date: 2005/01/20 00:07:27 $ $Author: agibert $";
return( NDS_OK);
}
@ -280,15 +279,15 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
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 *);
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
void *Value_ptr = (void *)va_arg( Args, 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( Module_Ptr_Ptr, *Args_Ptr, T_Module **);
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
T_Module **Module_Ptr_Ptr = (T_Module **)va_arg( Args, T_Module **);
Command_Name = "NDD_CMD_INDEX_GET";
@ -319,23 +318,15 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
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);
void **Value_Ptr_Ptr = (void **)va_arg( Args, 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, ...);
*/
ND_VA_ARG_GET( Module_Ptr_Ptr, *Args_Ptr, T_Module **);
ND_VA_LIST_OPEN( user_args, *Args_Ptr);
ND_VA_ARG_GET( Nom, user_args, char *);
ND_VA_ARG_GET( Id, user_args, int);
ND_VA_LIST_CLOSE( user_args);
T_Module **Module_Ptr_Ptr = (T_Module **)va_arg( Args, T_Module **);
va_list user_args = (va_list)va_arg( Args, va_list);
char *Nom = (char *)va_arg( user_args, char *);
int Id = (int)va_arg( user_args, int);
Command_Name = "NDD_CMD_VALUE_ALLOC";
@ -357,16 +348,12 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
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);
void *Value_Ptr = (void *)va_arg( Args, 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, ...);
*/
ND_VA_ARG_GET( Module_Ptr, *Args_Ptr, T_Module *);
T_Module *Module_Ptr = (T_Module *)va_arg( Args, T_Module *);
Command_Name = "NDD_CMD_VALUE_FREE";
@ -381,18 +368,14 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
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);
void *Value1_Ptr = (void *)va_arg( Args, void *);
void *Value2_Ptr = (void *)va_arg( Args, 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, ...);
*/
ND_VA_ARG_GET( Module1_Ptr, *Args_Ptr, T_Module *);
ND_VA_ARG_GET( Module2_Ptr, *Args_Ptr, T_Module *);
T_Module *Value1 = (T_Module *)va_arg( Args, T_Module *);
T_Module *Value2 = (T_Module *)va_arg( Args, T_Module *);
Command_Name = "NDD_CMD_VALUE_COMP";
@ -402,7 +385,7 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
int rc;
rc = Module1_Ptr->Id - Module2_Ptr->Id;
rc = Value1->Id - Value2->Id;
if( rc < 0)
{
@ -432,14 +415,10 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
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);
void *Value_Ptr = (void *)va_arg( Args, 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, ...);
*/
@ -451,14 +430,10 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
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);
void *Value_Ptr = (void *)va_arg( Args, 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, ...);
*/
@ -469,35 +444,22 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
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);
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, 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_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_CLOSE( lib_args);
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, 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);
T_Module *Module_Ptr = Node_Ptr->Value;
@ -512,22 +474,16 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
case NDD_CMD_INFO_PRINT:
{
/*
ND_VA_ARG_GET( Next_Node_Ptr, *Args_Ptr, NDT_Node *);
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, 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, ...);
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;
*/